(function(Ba,X,Y,ba,Ta,Ua,Va,Wa,Xa,Ya,da,I,V,Za,Ha,Ca,K,Z,xa,C,oa,W,b,U,S,L,$a,O,ha,ab,E,ja,e,ca,bb,qa,H,m,p,s,q,t,u,z,w,r,y,D,B,M,G,N,R,T,P,$,aa,ea,ka,la,ma,ia,fa,pa,na,ga,va,ra,wa,sa,Da,ya,ta,za,Ia,Ja,ua,Ka,La,Ea,Aa,Ma,Na,Oa,Pa,Qa,Fa,Ra,Sa,Ga){___JmolDate="$Date: 2014-01-05 16:16:19 -0600 (Sun, 05 Jan 2014) $";___fullJmolProperties="src/org/jmol/viewer/Jmol.properties";___JmolVersion="14.0.4";Math.log10||(Math.log10=function(b){return Math.log(b)/2.302585092994046});Ba=Number.prototype.toString;
java.lang.Number=Number;if(ya)for(Y=0;Y<ta.length;Y++)ba=ta[Y],Number.prototype[ba]=JavaObject.prototype[ba];Number.prototype.toString=Ba;Number.__CLASS_NAME__="Number";wa(Number,java.io.Serializable);Number.equals=ua.equals;Number.getName=ua.getName;b(Number,"shortValue",function(){var b=Math.round(this)&65535;return 0>this&&0<b?b-65536:b});b(Number,"byteValue",function(){var b=Math.round(this)&255;return 0>this&&0<b?b-256:b});b(Number,"intValue",function(){return Math.round(this)&4294967295});b(Number,
"longValue",function(){return Math.round(this)});b(Number,"floatValue",function(){return this.valueOf()});b(Number,"doubleValue",function(){return parseFloat(this.valueOf())});e(Number,"hashCode",function(){return this.valueOf()});java.lang.Integer=Integer=function(){t(this,arguments)};ga(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()};oa(Integer,function(b){null==b&&(b=0);"number"!=typeof b&&(b=Integer.parseIntRadix(b,10));this.valueOf=function(){return b}});Integer.MIN_VALUE=Integer.prototype.MIN_VALUE=-2147483648;Integer.MAX_VALUE=Integer.prototype.MAX_VALUE=2147483647;Integer.TYPE=Integer.prototype.TYPE=Integer;b(Integer,"bitCount",function(b){b-=b>>>1&1431655765;b=(b&858993459)+(b>>>2&858993459);b=b+(b>>>4)&252645135;b+=b>>>8;return b+(b>>>16)&63},"Number");Integer.bitCount=Integer.prototype.bitCount;b(Integer,
"numberOfLeadingZeros",function(b){if(0==b)return 32;var e=1;0==b>>>16&&(e+=16,b<<=16);0==b>>>24&&(e+=8,b<<=8);0==b>>>28&&(e+=4,b<<=4);0==b>>>30&&(e+=2,b<<=2);return e-(b>>>31)},"Number");Integer.numberOfLeadingZeros=Integer.prototype.numberOfLeadingZeros;b(Integer,"numberOfTrailingZeros",function(b){if(0==b)return 32;var e=31,m=b<<16;0!=m&&(e-=16,b=m);m=b<<8;0!=m&&(e-=8,b=m);m=b<<4;0!=m&&(e-=4,b=m);m=b<<2;0!=m&&(e-=2,b=m);return e-(b<<1>>>31)},"Number");Integer.numberOfTrailingZeros=Integer.prototype.numberOfTrailingZeros;
b(Integer,"parseIntRadix",function(b,e){if(null==b)throw new NumberFormatException("null");if(2>e)throw new NumberFormatException("radix "+e+" less than Character.MIN_RADIX");if(36<e)throw new NumberFormatException("radix "+e+" greater than Character.MAX_RADIX");if(10==e)for(var m=b.length;0<=--m;){var a=b.charCodeAt(m);if(!(48<=a&&57>=a)&&(0<m||43!=a&&45!=a))throw new NumberFormatException("Not a Number : "+b);}m=parseInt(b,e);if(isNaN(m))throw new NumberFormatException("Not a Number : "+b);return m},
"String, Number");Integer.parseIntRadix=Integer.prototype.parseIntRadix;b(Integer,"parseInt",function(b){return Integer.parseIntRadix(b,10)},"String");Integer.parseInt=Integer.prototype.parseInt;e(Integer,"$valueOf",function(b){return new Integer(b)});Integer.$valueOf=Integer.prototype.$valueOf;e(Integer,"equals",function(b){return null==b||!s(b,Integer)?!1:b.valueOf()==this.valueOf()},"Object");Integer.toHexString=Integer.prototype.toHexString=function(b){b.valueOf&&(b=b.valueOf());if(0>b){var e=
b&16777215;return(b>>24&255)._numberToString(16)+(e=e._numberToString(16)).substring(e.length-6)}return b._numberToString(16)};Integer.toOctalString=Integer.prototype.toOctalString=function(b){b.valueOf&&(b=b.valueOf());return b._numberToString(8)};Integer.toBinaryString=Integer.prototype.toBinaryString=function(b){b.valueOf&&(b=b.valueOf());return b._numberToString(2)};Integer.decodeRaw=b(Integer,"decodeRaw",function(b){0<=b.indexOf(".")&&(b="");var e=b.startsWith("-")?1:0;b=b.replace(/\#/,"0x").toLowerCase();
e=b.startsWith("0x",e)?16:b.startsWith("0",e)?8:10;b=Number(b);return 8==e?parseInt(b,8):b},"~S");Integer.decode=b(Integer,"decode",function(b){b=Integer.decodeRaw(b);if(isNaN(b)||b<Integer.MIN_VALUE||b>Integer.MAX_VALUE)throw new NumberFormatException("Invalid Integer");return new Integer(b)},"~S");e(Integer,"hashCode",function(){return this.valueOf()});java.lang.Long=Long=function(){t(this,arguments)};ga(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()};oa(Long,function(b){null==b&&(b=0);b="number"==typeof b?Math.round(b):Integer.parseIntRadix(b,10);this.valueOf=function(){return b}});Long.TYPE=Long.prototype.TYPE=Long;b(Long,"parseLong",function(b,e){return Integer.parseInteger(b,e||10)});Long.parseLong=Long.prototype.parseLong;e(Long,"$valueOf",function(b){return new Long(b)});Long.$valueOf=Long.prototype.$valueOf;
e(Long,"equals",function(b){return null==b||!s(b,Long)?!1:b.valueOf()==this.valueOf()},"Object");Long.toHexString=Long.prototype.toHexString=function(b){return b.toString(16)};Long.toOctalString=Long.prototype.toOctalString=function(b){return b.toString(8)};Long.toBinaryString=Long.prototype.toBinaryString=function(b){return b.toString(2)};Long.decode=b(Long,"decode",function(b){b=Integer.decodeRaw(b);if(isNaN(b))throw new NumberFormatException("Invalid Long");return new Long(b)},"~S");java.lang.Short=
Short=function(){t(this,arguments)};ga(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()};oa(Short,function(b){null==b&&(b=0);"number"!=typeof b&&(b=Integer.parseIntRadix(b,10));b=b.shortValue();this.valueOf=function(){return b}});Short.MIN_VALUE=Short.prototype.MIN_VALUE=-32768;Short.MAX_VALUE=Short.prototype.MAX_VALUE=
32767;Short.TYPE=Short.prototype.TYPE=Short;b(Short,"parseShortRadix",function(b,e){return Integer.parseIntRadix(b,e).shortValue()},"String, Number");Short.parseShortRadix=Short.prototype.parseShortRadix;b(Short,"parseShort",function(b){return Short.parseShortRadix(b,10)},"String");Short.parseShort=Short.prototype.parseShort;e(Short,"$valueOf",function(b){return new Short(b)});Short.$valueOf=Short.prototype.$valueOf;e(Short,"equals",function(b){return null==b||!s(b,Short)?!1:b.valueOf()==this.valueOf()},
"Object");Short.toHexString=Short.prototype.toHexString=function(b){return b.toString(16)};Short.toOctalString=Short.prototype.toOctalString=function(b){return b.toString(8)};Short.toBinaryString=Short.prototype.toBinaryString=function(b){return b.toString(2)};Short.decode=b(Short,"decode",function(b){b=Integer.decodeRaw(b);if(isNaN(b)||-32768>b||32767<b)throw new NumberFormatException("Invalid Short");return new Short(b)},"~S");java.lang.Byte=Byte=function(){t(this,arguments)};ga(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()};w(Byte,function(b){"number"!=typeof b&&(b=Integer.parseIntRadix(b,10));b=b.byteValue();this.valueOf=function(){return b}});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;b(Byte,"parseByteRadix",function(b,e){return Integer.parseIntRadix(b,e).byteValue()},"String, Number");Byte.parseByteRadix=Byte.prototype.parseByteRadix;b(Byte,"parseByte",function(b){return Byte.parseByte(b,10)},"String");Byte.parseByte=Byte.prototype.parseByte;e(Byte,"$valueOf",function(b){return new Byte(b)});Byte.$valueOf=Byte.prototype.$valueOf;e(Byte,"equals",function(b){return null==b||!s(b,Byte)?!1:b.valueOf()==this.valueOf()},"Object");
Byte.toHexString=Byte.prototype.toHexString=function(b){return b.toString(16)};Byte.toOctalString=Byte.prototype.toOctalString=function(b){return b.toString(8)};Byte.toBinaryString=Byte.prototype.toBinaryString=function(b){return b.toString(2)};Byte.decode=b(Byte,"decode",function(b){b=Integer.decodeRaw(b);if(isNaN(b)||-128>b||127<b)throw new NumberFormatException("Invalid Byte");return new Byte(b)},"~S");java.lang.Float=Float=function(){t(this,arguments)};ga(Float,"Float",Number,Comparable,null,
!0);Float.prototype.valueOf=function(){return 0};Float.toString=Float.prototype.toString=function(){return 0!=arguments.length?""+arguments[0]:this===Float?"class java.lang.Float":""+this.valueOf()};oa(Float,function(b){null==b&&(b=0);"number"!=typeof b&&(b=Number(b));this.valueOf=function(){return b}});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;b(Float,"parseFloat",function(b){if(null==b)throw new NumberFormatException("null");if("number"==typeof b)return b;var e=Number(b);if(isNaN(e))throw new NumberFormatException("Not a Number : "+b);return e},"String");Float.parseFloat=Float.prototype.parseFloat;e(Float,"$valueOf",function(b){return new Float(b)});Float.$valueOf=Float.prototype.$valueOf;b(Float,"isNaN",
function(b){return isNaN(b)},"Number");Float.isNaN=Float.prototype.isNaN;b(Float,"isInfinite",function(b){return!isFinite(b)},"Number");Float.isInfinite=Float.prototype.isInfinite;e(Float,"equals",function(b){return null==b||!s(b,Float)?!1:b.valueOf()==this.valueOf()},"Object");java.lang.Double=Double=function(){t(this,arguments)};ga(Double,"Double",Number,Comparable,null,!0);Double.prototype.valueOf=function(){return 0};Double.toString=Double.prototype.toString=function(){return 0!=arguments.length?
""+arguments[0]:this===Double?"class java.lang.Double":""+this.valueOf()};oa(Double,function(b){null==b&&(b=0);"number"!=typeof b&&(b=Double.parseDouble(b));this.valueOf=function(){return b}});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;b(Double,"isNaN",function(b){return isNaN(b)},"Number");Double.isNaN=Double.prototype.isNaN;b(Double,"isInfinite",function(b){return!isFinite(b)},"Number");Double.isInfinite=Double.prototype.isInfinite;b(Double,"parseDouble",function(b){if(null==b)throw new NumberFormatException("null");if("number"==typeof b)return b;var e=Number(b);if(isNaN(e))throw new NumberFormatException("Not a Number : "+b);return e},"String");Double.parseDouble=Double.prototype.parseDouble;
b(Double,"$valueOf",function(b){return new Double(b)},"Number");Double.$valueOf=Double.prototype.$valueOf;e(Double,"equals",function(b){return null==b||!s(b,Double)?!1:b.valueOf()==this.valueOf()},"Object");java.lang.B00lean=Boolean;Boolean=java.lang.Boolean=Boolean||function(){t(this,arguments)};if(ya)for(Y=0;Y<ta.length;Y++)ba=ta[Y],Boolean.prototype[ba]=JavaObject.prototype[ba];Boolean.__CLASS_NAME__="Boolean";wa(Boolean,[java.io.Serializable,java.lang.Comparable]);Boolean.equals=ua.equals;Boolean.getName=
ua.getName;Boolean.serialVersionUID=Boolean.prototype.serialVersionUID=-0x32df8d7f2a630600;Da(Boolean,function(b){var e=("string"==typeof b?Boolean.toBoolean(b):b)?!0:!1;this.valueOf=function(){return e}},"~O");Boolean.parseBoolean=b(Boolean,"parseBoolean",function(b){return Boolean.toBoolean(b)},"~S");b(Boolean,"booleanValue",function(){return this.valueOf()});Boolean.$valueOf=e(Boolean,"$valueOf",function(b){return b?Boolean.TRUE:Boolean.FALSE});e(Boolean,"toString",function(){return this.valueOf()?
"true":"false"});e(Boolean,"hashCode",function(){return this.valueOf()?1231:1237});e(Boolean,"equals",function(b){return s(b,Boolean)?this.booleanValue()==b.booleanValue():!1},"~O");Boolean.getBoolean=b(Boolean,"getBoolean",function(b){var e=!1;try{e=Boolean.toBoolean(System.getProperty(b))}catch(m){if(!s(m,IllegalArgumentException)&&!s(m,NullPointerException))throw m;}return e},"~S");e(Boolean,"compareTo",function(b){return b.value==this.value?0:this.value?1:-1},"Boolean");Boolean.toBoolean=b(Boolean,
"toBoolean",($fz=function(b){return null!=b&&b.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;Encoding={UTF8:"utf-8",UTF16:"utf-16",ASCII:"ascii",guessEncoding:function(b){return 239==b.charCodeAt(0)&&187==b.charCodeAt(1)&&191==b.charCodeAt(2)?Encoding.UTF8:255==b.charCodeAt(0)&&254==b.charCodeAt(1)?Encoding.UTF16:Encoding.ASCII},readUTF8:function(b){var e=
this.guessEncoding(b),m=0;e==Encoding.UTF8?m=3:e==Encoding.UTF16&&(m=2);for(e=[];m<b.length;m++){var a=b.charCodeAt(m);if(128>a)e[e.length]=b.charAt(m);else if(192<a&&224>a){a&=31;m++;var c=b.charCodeAt(m)&63,a=(a<<6)+c;e[e.length]=String.fromCharCode(a)}else if(224<=a){a&=15;m++;c=b.charCodeAt(m)&63;m++;var d=b.charCodeAt(m)&63,a=(a<<12)+(c<<6)+d;e[e.length]=String.fromCharCode(a)}}return e.join("")},convert2UTF8:function(b){var e=this.guessEncoding(b),m=0;if(e==Encoding.UTF8)return b;e==Encoding.UTF16&&
(m=2);for(var e=Array(0+b.length-m),a=m;a<b.length;a++){var c=b.charCodeAt(a);if(128>c)e[0+a-m]=b.charAt(a);else if(2047>=c){var d=192+((c&1984)>>6),n=128+(c&63);e[0+a-m]=String.fromCharCode(d)+String.fromCharCode(n)}else d=224+((c&61440)>>12),n=128+((c&4032)>>6),c=128+(c&63),e[0+a-m]=String.fromCharCode(d)+String.fromCharCode(n)+String.fromCharCode(c)}return e.join("")},base64Chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),encodeBase64:function(b){if(null==b||0==
b.length)return b;for(var e=Encoding.base64Chars,m=b.length,a=0,c=[],d,n;a<m;)d=b.charCodeAt(a++),c[c.length]=e[d>>2],a<m?(n=b.charCodeAt(a++),c[c.length]=e[d<<4&48|n>>4],a<m?(d=b.charCodeAt(a++),c[c.length]=e[n<<2&60|d>>6],c[c.length]=e[d&63]):(c[c.length]=e[n<<2&60],c[c.length]="=")):(c[c.length]=e[d<<4&48],c[c.length]="=",c[c.length]="=");return c.join("")},decodeBase64:function(b){if(null==b||0==b.length)return b;var e=Encoding.base64Chars,m=Encoding.xBase64Chars;if(null==Encoding.xBase64Chars){for(var m=
{},a=0;a<e.length;a++)m[e[a]]=a;Encoding.xBase64Chars=m}for(var e=b.length,a=0,c=[],d,n,f,g,h=0;a<e&&6E4>h++;)d=m[b.charAt(a++)],n=m[b.charAt(a++)],f=m[b.charAt(a++)],g=m[b.charAt(a++)],c[c.length]=String.fromCharCode(d<<2&255|n>>4),null!=f&&(c[c.length]=String.fromCharCode(n<<4&255|f>>2),null!=g&&(c[c.length]=String.fromCharCode(f<<6&255|g)));return c.join("")}};if(null==String.prototype.$replace){java.lang.String=String;if(ya)for(Y=0;Y<ta.length;Y++)ba=ta[Y],"to$tring"==ba||("toString"==ba||"equals"==
ba||"hashCode"==ba)||(String.prototype[ba]=JavaObject.prototype[ba]);wa(String,[java.io.Serializable,CharSequence,Comparable]);String.getName=ua.getName;String.serialVersionUID=String.prototype.serialVersionUID=-0x5f0f5bc785c44c00;String.prototype.$replace=function(b,e){if(b==e||0>this.indexOf(b))return""+this;1==b.length?0<="\\$.*+|?^{}()[]".indexOf(b)&&(b="\\"+b):b=b.replace(/([\\\$\.\*\+\|\?\^\{\}\(\)\[\]])/g,function(b,a){return"\\"+a});return this.replace(RegExp(b,"gm"),e)};String.prototype.$generateExpFunction=
function(b){var e=[],m=[],a=0;e[0]="";for(var c=0;c<b.length;c++){var d=b.charAt(c);c!=b.length-1&&"\\"==d?(c++,d=b.charAt(c),"\\"==d&&(e[a]+="\\"),e[a]+=d):c!=b.length-1&&"$"==d?(c++,m[a]=parseInt(b.charAt(c)),a++,e[a]=""):e[a]="\r"==d?e[a]+"\\r":"\n"==d?e[a]+"\\n":"\t"==d?e[a]+"\\t":'"'==d?e[a]+'\\"':e[a]+d}b="f = function (";a=Math.max.apply({},m);for(c=0;c<=a;c++)b+="$"+c,c!=a&&(b+=", ");b+=") { return ";for(c=0;c<e.length-1;c++)b+='"'+e[c]+'" + $'+m[c]+" + ";b+='"'+e[c]+'"; }';eval(b);return null};
String.prototype.replaceAll=function(b,e){return this.replace(RegExp(b,"gm"),this.$generateExpFunction(e))};String.prototype.replaceFirst=function(b,e){return this.replace(RegExp(b,"m"),this.$generateExpFunction(e))};String.prototype.matches=function(b){null!=b&&(b="^("+b+")$");b=this.match(RegExp(b,"gm"));return null!=b&&0!=b.length};String.prototype.regionMatches=function(b,e,m,a,c){if("number"==typeof b||!0!=b&&!1!=b)c=a,a=m,m=e,e=b,b=!1;if(0>a||0>e||e>this.length-c||a>m.length-c)return!1;e=this.substring(e,
e+c);m=m.substring(a,a+c);b&&(e=e.toLowerCase(),m=m.toLowerCase());return e==m};String.prototype.$plit=function(b,e){if(null!=e&&0<e){if(1==e)return this;var m=RegExp("("+b+")","gm"),a=1,c=this.replace(m,function(c){a++;return a==e?"@@_@@":c}),m=RegExp(b,"gm"),m=this.split(m);m.length>e&&(m[e-1]=c.substring(c.indexOf("@@_@@")+5),m.length=e);return m}m=RegExp(b,"gm");return this.split(m)};String.prototype.trim=function(){for(var b=this.length,e=0;e<b&&" ">=this.charAt(e);)e++;for(;e<b&&" ">=this.charAt(b-
1);)b--;return 0<e?this.substring(e,b):this};String.prototype.trim=function(){return this.replace(/^\s+/g,"").replace(/\s+$/g,"")};String.prototype.startsWith_string_number=function(b,e){var m=e,a=0,c=b.length;if(0>e||e>this.length-c)return!1;for(;0<=--c;)if(this.charAt(m++)!=b.charAt(a++))return!1;return!0};String.prototype.startsWith=function(b){return 1==arguments.length?this.startsWith_string_number(arguments[0],0):2==arguments.length?this.startsWith_string_number(arguments[0],arguments[1]):!1};
String.prototype.endsWith=function(b){return this.startsWith(b,this.length-b.length)};String.prototype.equals=function(b){return this.valueOf()==b};String.prototype.equalsIgnoreCase=function(b){return null==b?!1:this==b||this.toLowerCase()==b.toLowerCase()};String.prototype.hash=0;String.prototype.hashCode=function(){var b=this.hash;if(0==b){for(var e=0,m=this.length,a=0;a<m;a++)b=31*b+this.charCodeAt(e++),b&=4294967295;this.hash=b}return b};String.prototype.getBytes=function(){if(4==arguments.length)return this.getChars(arguments[0],
arguments[1],arguments[2],arguments[3]);var b=this;if(1==arguments.length){for(var e=arguments[0].toString().toLowerCase(),m="utf-8 UTF8 us-ascii iso-8859-1 8859_1 gb2312 gb18030 gbk".split(" "),a=!1,c=0;c<m.length;c++)if(m[c]==e){a=!0;break}if(!a)throw new java.io.UnsupportedEncodingException;if("utf-8"==e||"utf8"==e)b=Encoding.convert2UTF8(this)}e=Array(b.length);for(c=a=m=0;c<b.length;c++)m=b.charCodeAt(c),255<m?(e[a]=26,e[a+1]=m&255,e[a+2]=(m&65280)>>8,a+=2):e[a]=m,a++;return e};String.prototype.contains=
function(b){return 0<=this.indexOf(b)};String.prototype.compareTo=function(b){return this>b?1:this<b?-1:0};String.prototype.toCharArray=function(){for(var b=Array(this.length),e=0;e<this.length;e++)b[e]=this.charAt(e);return b};String.value0f=String.valueOf;String.valueOf=function(b){if("undefined"==b)return String.value0f();if(b instanceof Array){if(1==arguments.length)return b.join("");for(var e=arguments[1],m=arguments[2],a=Array(m),c=0;c<m;c++)a[c]=b[e+c];return a.join("")}return""+b};String.prototype.subSequence=
function(b,e){return this.substring(b,e)};String.prototype.compareToIgnoreCase=function(b){if(null==b)throw new NullPointerException;var e=this.toUpperCase(),m=b.toUpperCase();if(e==m)return 0;e=this.toLowerCase();m=b.toLowerCase();return e==m?0:e>m?1:-1};String.prototype.contentEquals=function(b){if(this.length!=b.length())return!1;b=b.getValue();for(var e=0,m=0,a=this.length;0!=a--;)if(this.charCodeAt(e++)!=b[m++])return!1;return!0};String.prototype.getChars=function(b,e,m,a){if(0>b)throw new StringIndexOutOfBoundsException(b);
if(e>this.length)throw new StringIndexOutOfBoundsException(e);if(b>e)throw new StringIndexOutOfBoundsException(e-b);if(null==m)throw new NullPointerException;for(var c=0;c<e-b;c++)m[a+c]=this.charAt(b+c)};String.prototype.$concat=String.prototype.concat;String.prototype.concat=function(b){if(null==b)throw new NullPointerException;return this.$concat(b)};String.prototype.$lastIndexOf=String.prototype.lastIndexOf;String.prototype.lastIndexOf=function(b,e){return null!=e&&0>=e+this.length?-1:null!=e?
this.$lastIndexOf(b,e):this.$lastIndexOf(b)};String.prototype.intern=function(){return this.valueOf()};String.copyValueOf=String.prototype.copyValueOf=function(){return 1==arguments.length?String.instantialize(arguments[0]):String.instantialize(arguments[0],arguments[1],arguments[2])};String.indexOf=function(b,e,m,a,c,d,n){if(n>=m)return 0==d?m:-1;0>n&&(n=0);if(0==d)return n;var f=a[c];n=e+n;m=e+(m-d);a:for(;;){for(;n<=m&&b[n]!=f;)n++;if(n>m)return-1;for(var g=n+1,h=g+d-1,l=c+1;g<h;)if(b[g++]!=a[l++]){n++;
continue a}return n-e}};String.instantialize=function(){switch(arguments.length){case 0:return new String;case 1:var b=arguments[0];if("string"==typeof b||b instanceof String)return new String(b);if(b instanceof Array||b instanceof Int32Array){if(0<b.length&&"number"==typeof b[0]){for(var e=Array(b.length),m=0;m<b.length;m++)e[m]=String.fromCharCode(b[m]&255);return Encoding.readUTF8(e.join(""))}return b.join("")}if("StringBuffer"==b.__CLASS_NAME__||"java.lang.StringBuffer"==b.__CLASS_NAME__){for(var e=
b.shareValue(),a=b.length(),b=Array(a),m=0;m<a;m++)b[m]=e[m];return b.join("")}return""+b;case 2:return b=arguments[0],a=arguments[1],"string"==typeof a?String.instantialize(b,0,b.length,a):String.instantialize(b,a,0,b.length);case 3:var b=arguments[0],c=arguments[1],a=arguments[2];arguments[2]instanceof Array&&(b=arguments[2],c=arguments[0],a=arguments[1]);e=Array(a);if(0>c||a+c>b.length)throw new IndexOutOfBoundsException;if(0<a)if(null!=b[c].length)for(m=0;m<a;m++)e[m]=b[c+m];else for(m=0;m<a;m++)e[m]=
String.fromCharCode(b[c+m]);return e.join("");case 4:var b=arguments[0],d=arguments[3];if("string"==typeof d||d instanceof String){c=arguments[1];a=arguments[2];e=Array(a);for(m=0;m<a;m++)e[m]=b[c+m],"number"==typeof e[m]&&(e[m]=String.fromCharCode(e[m]&255));m=d.toLowerCase();return"utf-8"==m||"utf8"==m?Encoding.readUTF8(e.join("")):e.join("")}m=arguments[3];c=arguments[2];a=arguments[1];e=Array(m);if(0==a)for(;0<m--;)e[m]=String.fromCharCode(b[m+c]&255);else for(a<<=8;0<m--;)e[m]=String.fromCharCode(a|
b[m+c]&255);return e.join("");default:e="";for(m=0;m<arguments.length;m++)e+=arguments[m];return e}};-1!=navigator.userAgent.toLowerCase().indexOf("chrome")&&(String.prototype.toString=function(){return this})}c$=I(function(){this.value=0;H(this,arguments)},java.lang,"Character",null,[java.io.Serializable,Comparable]);C(c$,function(b){this.value=b},"~N");b(c$,"charValue",function(){return this.value});e(c$,"hashCode",function(){return this.value.charCodeAt(0)});e(c$,"equals",function(b){return S(b,
Character)?this.value.charCodeAt(0)==b.charValue().charCodeAt(0):!1},"~O");e(c$,"compareTo",function(b){return this.value.charCodeAt(0)-b.value.charCodeAt(0)},"Character");c$.toLowerCase=b(c$,"toLowerCase",function(b){return(""+b).toLowerCase().charAt(0)},"~N");c$.toUpperCase=b(c$,"toUpperCase",function(b){return(""+b).toUpperCase().charAt(0)},"~N");c$.isDigit=b(c$,"isDigit",function(b){if(48<=b.charCodeAt(0)&&57>=b.charCodeAt(0))return!0;b.charCodeAt(0);return!1},"~N");c$.isUpperCase=b(c$,"isUpperCase",
function(b){return 65<=b.charCodeAt(0)&&90>=b.charCodeAt(0)?!0:!1},"~N");c$.isLowerCase=b(c$,"isLowerCase",function(b){return 97<=b.charCodeAt(0)&&122>=b.charCodeAt(0)?!0:!1},"~N");c$.isWhitespace=b(c$,"isWhitespace",function(b){return 28<=b.charCodeAt(0)&&32>=b.charCodeAt(0)||9<=b.charCodeAt(0)&&13>=b.charCodeAt(0)||5760==b.charCodeAt(0)?!0:8192>b.charCodeAt(0)||8199==b.charCodeAt(0)?!1:8203>=b.charCodeAt(0)||8232==b.charCodeAt(0)||8233==b.charCodeAt(0)||12288==b.charCodeAt(0)},"~N");c$.isLetter=
b(c$,"isLetter",function(b){if(65<=b.charCodeAt(0)&&90>=b.charCodeAt(0)||97<=b.charCodeAt(0)&&122>=b.charCodeAt(0))return!0;b.charCodeAt(0);return!1},"~N");c$.isLetterOrDigit=b(c$,"isLetterOrDigit",function(b){return Character.isLetter(b)||Character.isDigit(b)},"~N");c$.isSpaceChar=b(c$,"isSpaceChar",function(b){return 32==b.charCodeAt(0)||160==b.charCodeAt(0)||5760==b.charCodeAt(0)?!0:8192>b.charCodeAt(0)?!1:8203>=b.charCodeAt(0)||8232==b.charCodeAt(0)||8233==b.charCodeAt(0)||8239==b.charCodeAt(0)||
12288==b.charCodeAt(0)},"~N");c$.digit=b(c$,"digit",function(b,e){if(2<=e&&36>=e&&128>b.charCodeAt(0)){var m=-1;48<=b.charCodeAt(0)&&57>=b.charCodeAt(0)?m=b.charCodeAt(0)-48:97<=b.charCodeAt(0)&&122>=b.charCodeAt(0)?m=b.charCodeAt(0)-87:65<=b.charCodeAt(0)&&90>=b.charCodeAt(0)&&(m=b.charCodeAt(0)-55);return m<e?m:-1}return-1},"~N,~N");e(c$,"toString",function(){return String.valueOf([this.value])});c$.toString=e(c$,"toString",function(b){return this===Character?"class java.lang.Character":String.valueOf(b)},
"~N");ha(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$=E(java.lang.reflect,"Array");c$.newInstance=b(c$,"newInstance",function(){return X(length)},"Class,~N");java.util.Date=Date;Date.TYPE="java.util.Date";Date.__CLASS_NAME__="Date";wa(Date,[java.io.Serializable,java.lang.Comparable]);b(java.util.Date,"clone",function(){return new Date(this.getTime())});
b(java.util.Date,"before",function(b){return this.getTime()<b.getTime()},"java.util.Date");b(java.util.Date,"after",function(b){return this.getTime()>b.getTime()},"java.util.Date");b(java.util.Date,"equals",function(b){return s(b,java.util.Date)&&this.getTime()==b.getTime()},"Object");b(java.util.Date,"compareTo",function(b){var e=this.getTime();b=b.getTime();return e<b?-1:e==b?0:1},"java.util.Date");b(java.util.Date,"compareTo",function(b){return this.compareTo(b)},"Object");e(java.util.Date,"hashCode",
function(){var b=this.getTime();return parseInt(b)^parseInt(b>>32)});c$=I(function(){this.source=null;H(this,arguments)},java.util,"EventObject",null,java.io.Serializable);C(c$,function(b){if(null!=b)this.source=b;else throw new IllegalArgumentException;},"~O");b(c$,"getSource",function(){return this.source});e(c$,"toString",function(){return this.getClass().getName()+"[source="+String.valueOf(this.source)+"]"});Z(java.util,"EventListener");c$=I(function(){this.listener=null;H(this,arguments)},java.util,
"EventListenerProxy",null,java.util.EventListener);C(c$,function(b){this.listener=b},"java.util.EventListener");b(c$,"getListener",function(){return this.listener});Z(java.util,"Iterator");Z(java.util,"ListIterator",java.util.Iterator);Z(java.util,"Enumeration");Z(java.util,"Collection",Iterable);Z(java.util,"Set",java.util.Collection);Z(java.util,"Map");Z(java.util.Map,"Entry");Z(java.util,"List",java.util.Collection);Z(java.util,"Queue",java.util.Collection);Z(java.util,"RandomAccess");c$=I(function(){this.stackTrace=
this.cause=this.detailMessage=null;H(this,arguments)},java.lang,"Throwable",null,java.io.Serializable);qa(c$,function(){this.cause=this});C(c$,function(){this.fillInStackTrace()});C(c$,function(b){this.fillInStackTrace();this.detailMessage=b},"~S");C(c$,function(b,e){this.fillInStackTrace();this.detailMessage=b;this.cause=e},"~S,Throwable");C(c$,function(b){this.fillInStackTrace();this.detailMessage=null==b?null:b.toString();this.cause=b},"Throwable");b(c$,"getMessage",function(){return"undefined"!=
typeof this.message?this.message:this.detailMessage});b(c$,"getLocalizedMessage",function(){return this.getMessage()});b(c$,"getCause",function(){return this.cause===this?null:this.cause});b(c$,"initCause",function(b){if(this.cause!==this)throw new IllegalStateException("Can't overwrite cause");if(b===this)throw new IllegalArgumentException("Self-causation not permitted");this.cause=b;return this},"Throwable");e(c$,"toString",function(){var b=this.getClass().getName(),e=this.getLocalizedMessage();
return null!=e?b+": "+e:b});b(c$,"printStackTrace",function(){System.err.println(this);for(var b=0;b<this.stackTrace.length;b++){var e=this.stackTrace[b],m=e.methodName.indexOf("(");("construct"!=e.methodName.substring(0,m).replace(/\s+/g,"")||null==e.nativeClazz||0>Ka(e.nativeClazz,Throwable))&&System.err.println(e)}});b(c$,"printStackTrace",function(){this.printStackTrace()},"java.io.PrintStream");b(c$,"printStackTrace",function(){this.printStackTrace()},"java.io.PrintWriter");b(c$,"fillInStackTrace",
function(){this.stackTrace=[];for(var b=arguments.callee.caller,e=null,m=[],a=za.length-1,c=!0;-1<a||null!=b;){var d=null;if(!c||b==Sa||b==ja||null==b){if(0>a)break;c=!0;e=za[a].caller;d=za[a].owner;a--}else e=b,null!=e.claxxOwner?d=e.claxxOwner:null!=e.exClazz&&(d=e.exClazz);b=new StackTraceElement(null!=d&&0!=d.__CLASS_NAME__.length?d.__CLASS_NAME__:"anonymous",(null==e.exName?"anonymous":e.exName)+" ("+La(e.arguments)+")",null,-1);b.nativeClazz=d;this.stackTrace[this.stackTrace.length]=b;for(d=
0;d<m.length;d++)m[d]==e&&(b=new StackTraceElement("lost","missing",null,-3),b.nativeClazz=null,this.stackTrace[this.stackTrace.length]=b,c=!1);null!=e&&(m[m.length]=e);b=e.arguments.callee.caller}Clazz_initializingException=!1;return this});b(c$,"setStackTrace",function(b){b=b.clone();for(var e=0;e<b.length;e++)if(null==b[e])throw new NullPointerException("stackTrace["+e+"]");this.stackTrace=b},"~A");c$=I(function(){this.fileName=this.methodName=this.declaringClass=null;this.lineNumber=0;H(this,
arguments)},java.lang,"StackTraceElement",null,java.io.Serializable);C(c$,function(b,e,m,a){if(null==b||null==e)throw new NullPointerException;this.declaringClass=b;this.methodName=e;this.fileName=m;this.lineNumber=a},"~S,~S,~S,~N");e(c$,"equals",function(b){if(!S(b,StackTraceElement)||(null==this.methodName||null==b.methodName)||!this.getMethodName().equals(b.getMethodName())||!this.getClassName().equals(b.getClassName()))return!1;var e=this.getFileName();if(null==e){if(null!=b.getFileName())return!1}else if(!e.equals(b.getFileName()))return!1;
return this.getLineNumber()!=b.getLineNumber()?!1:!0},"~O");b(c$,"getClassName",function(){return null==this.declaringClass?"<unknown class>":this.declaringClass});b(c$,"getFileName",function(){return this.fileName});b(c$,"getLineNumber",function(){return this.lineNumber});b(c$,"getMethodName",function(){return null==this.methodName?"<unknown method>":this.methodName});e(c$,"hashCode",function(){return null==this.methodName?0:this.methodName.hashCode()^this.declaringClass.hashCode()});b(c$,"isNativeMethod",
function(){return-2==this.lineNumber});e(c$,"toString",function(){var b=new StringBuilder(80);b.append(this.getClassName());b.append(".");b.append(this.getMethodName());if(this.isNativeMethod())b.append("(Native Method)");else{var e=this.getFileName();if(null==e)b.append("(Unknown Source)");else{var m=this.getLineNumber();b.append("(");b.append(e);0<=m&&(b.append(":"),b.append(m));b.append(")")}}return b.toString()});c$=E(java.lang,"Error",Throwable);c$=E(java.lang,"LinkageError",Error);c$=E(java.lang,
"IncompatibleClassChangeError",LinkageError);c$=E(java.lang,"AbstractMethodError",IncompatibleClassChangeError);c$=E(java.lang,"AssertionError",Error);C(c$,function(b){O(this,AssertionError,[String.valueOf(b),S(b,Throwable)?b:null])},"~O");C(c$,function(b){this.construct(String.valueOf(b))},"~B");C(c$,function(b){this.construct(String.valueOf(b))},"~N");C(c$,function(b){this.construct(Integer.toString(b))},"~N");C(c$,function(b){this.construct(Long.toString(b))},"~N");C(c$,function(b){this.construct(Float.toString(b))},
"~N");C(c$,function(b){this.construct(Double.toString(b))},"~N");c$=E(java.lang,"ClassCircularityError",LinkageError);c$=E(java.lang,"ClassFormatError",LinkageError);c$=I(function(){this.exception=null;H(this,arguments)},java.lang,"ExceptionInInitializerError",LinkageError);C(c$,function(){O(this,ExceptionInInitializerError);this.initCause(null)});C(c$,function(b){O(this,ExceptionInInitializerError,[b]);this.initCause(null)},"~S");C(c$,function(b){O(this,ExceptionInInitializerError);this.exception=
b;this.initCause(b)},"Throwable");b(c$,"getException",function(){return this.exception});e(c$,"getCause",function(){return this.exception});c$=E(java.lang,"IllegalAccessError",IncompatibleClassChangeError);c$=E(java.lang,"InstantiationError",IncompatibleClassChangeError);c$=E(java.lang,"VirtualMachineError",Error);c$=E(java.lang,"InternalError",VirtualMachineError);c$=E(java.lang,"NoClassDefFoundError",LinkageError);c$=E(java.lang,"NoSuchFieldError",IncompatibleClassChangeError);c$=E(java.lang,"NoSuchMethodError",
IncompatibleClassChangeError);c$=E(java.lang,"OutOfMemoryError",VirtualMachineError);c$=E(java.lang,"StackOverflowError",VirtualMachineError);c$=E(java.lang,"UnknownError",VirtualMachineError);c$=E(java.lang,"UnsatisfiedLinkError",LinkageError);c$=E(java.lang,"UnsupportedClassVersionError",ClassFormatError);c$=E(java.lang,"VerifyError",LinkageError);c$=E(java.lang,"ThreadDeath",Error);C(c$,function(){O(this,ThreadDeath,[])});c$=E(java.lang,"Exception",Throwable);c$=E(java.lang,"RuntimeException",
Exception);c$=E(java.lang,"ArithmeticException",RuntimeException);c$=E(java.lang,"IndexOutOfBoundsException",RuntimeException);c$=E(java.lang,"ArrayIndexOutOfBoundsException",IndexOutOfBoundsException);C(c$,function(b){O(this,ArrayIndexOutOfBoundsException,["Array index out of range: "+b])},"~N");c$=E(java.lang,"ArrayStoreException",RuntimeException);c$=E(java.lang,"ClassCastException",RuntimeException);c$=I(function(){this.ex=null;H(this,arguments)},java.lang,"ClassNotFoundException",Exception);
C(c$,function(){O(this,ClassNotFoundException,[fa("Throwable")])});C(c$,function(b){O(this,ClassNotFoundException,[b,null])},"~S");C(c$,function(b,e){O(this,ClassNotFoundException,[b]);this.ex=e},"~S,Throwable");b(c$,"getException",function(){return this.ex});e(c$,"getCause",function(){return this.ex});c$=E(java.lang,"CloneNotSupportedException",Exception);c$=E(java.lang,"IllegalAccessException",Exception);c$=E(java.lang,"IllegalArgumentException",RuntimeException);C(c$,function(b){O(this,IllegalArgumentException,
[null==b?null:b.toString(),b])},"Throwable");c$=E(java.lang,"IllegalMonitorStateException",RuntimeException);c$=E(java.lang,"IllegalStateException",RuntimeException);C(c$,function(b){O(this,IllegalStateException,[null==b?null:b.toString(),b])},"Throwable");c$=E(java.lang,"IllegalThreadStateException",IllegalArgumentException);c$=E(java.lang,"InstantiationException",Exception);c$=E(java.lang,"InterruptedException",Exception);c$=E(java.lang,"NegativeArraySizeException",RuntimeException);c$=E(java.lang,
"NoSuchFieldException",Exception);c$=E(java.lang,"NoSuchMethodException",Exception);c$=E(java.lang,"NullPointerException",RuntimeException);c$=E(java.lang,"NumberFormatException",IllegalArgumentException);c$=E(java.lang,"SecurityException",RuntimeException);C(c$,function(b){O(this,SecurityException,[null==b?null:b.toString(),b])},"Throwable");c$=E(java.lang,"StringIndexOutOfBoundsException",IndexOutOfBoundsException);C(c$,function(b){O(this,StringIndexOutOfBoundsException,["String index out of range: "+
b])},"~N");c$=E(java.lang,"UnsupportedOperationException",RuntimeException);C(c$,function(){O(this,UnsupportedOperationException,[])});C(c$,function(b){O(this,UnsupportedOperationException,[null==b?null:b.toString(),b])},"Throwable");c$=I(function(){this.target=null;H(this,arguments)},java.lang.reflect,"InvocationTargetException",Exception);C(c$,function(){O(this,java.lang.reflect.InvocationTargetException,[fa("Throwable")])});C(c$,function(b){O(this,java.lang.reflect.InvocationTargetException,[null,
b]);this.target=b},"Throwable");C(c$,function(b,e){O(this,java.lang.reflect.InvocationTargetException,[e,b]);this.target=b},"Throwable,~S");b(c$,"getTargetException",function(){return this.target});e(c$,"getCause",function(){return this.target});c$=I(function(){this.undeclaredThrowable=null;H(this,arguments)},java.lang.reflect,"UndeclaredThrowableException",RuntimeException);C(c$,function(b){O(this,java.lang.reflect.UndeclaredThrowableException);this.undeclaredThrowable=b;this.initCause(b)},"Throwable");
C(c$,function(b,e){O(this,java.lang.reflect.UndeclaredThrowableException,[e]);this.undeclaredThrowable=b;this.initCause(b)},"Throwable,~S");b(c$,"getUndeclaredThrowable",function(){return this.undeclaredThrowable});e(c$,"getCause",function(){return this.undeclaredThrowable});c$=E(java.io,"IOException",Exception);c$=E(java.io,"CharConversionException",java.io.IOException);c$=E(java.io,"EOFException",java.io.IOException);c$=E(java.io,"FileNotFoundException",java.io.IOException);c$=I(function(){this.bytesTransferred=
0;H(this,arguments)},java.io,"InterruptedIOException",java.io.IOException);c$=E(java.io,"ObjectStreamException",java.io.IOException);c$=I(function(){this.classname=null;H(this,arguments)},java.io,"InvalidClassException",java.io.ObjectStreamException);C(c$,function(b,e){O(this,java.io.InvalidClassException,[e]);this.classname=b},"~S,~S");b(c$,"getMessage",function(){var b=ja(this,java.io.InvalidClassException,"getMessage",[]);null!=this.classname&&(b=this.classname+"; "+b);return b});c$=E(java.io,
"InvalidObjectException",java.io.ObjectStreamException);c$=E(java.io,"NotActiveException",java.io.ObjectStreamException);c$=E(java.io,"NotSerializableException",java.io.ObjectStreamException);c$=I(function(){this.eof=!1;this.length=0;H(this,arguments)},java.io,"OptionalDataException",java.io.ObjectStreamException);c$=E(java.io,"StreamCorruptedException",java.io.ObjectStreamException);c$=E(java.io,"SyncFailedException",java.io.IOException);c$=E(java.io,"UnsupportedEncodingException",java.io.IOException);
c$=E(java.io,"UTFDataFormatException",java.io.IOException);c$=I(function(){this.detail=null;H(this,arguments)},java.io,"WriteAbortedException",java.io.ObjectStreamException);C(c$,function(b,e){O(this,java.io.WriteAbortedException,[b]);this.detail=e;this.initCause(e)},"~S,Exception");b(c$,"getMessage",function(){var b=ja(this,java.io.WriteAbortedException,"getMessage",[]);null!=this.detail&&(b=b+"; "+this.detail.toString());return b});e(c$,"getCause",function(){return this.detail});c$=E(java.util,
"ConcurrentModificationException",RuntimeException);C(c$,function(){O(this,java.util.ConcurrentModificationException,[])});c$=E(java.util,"EmptyStackException",RuntimeException);c$=I(function(){this.key=this.className=null;H(this,arguments)},java.util,"MissingResourceException",RuntimeException);C(c$,function(b,e,m){O(this,java.util.MissingResourceException,[b]);this.className=e;this.key=m},"~S,~S,~S");b(c$,"getClassName",function(){return this.className});b(c$,"getKey",function(){return this.key});
c$=E(java.util,"NoSuchElementException",RuntimeException);c$=E(java.util,"TooManyListenersException",Exception);c$=E(java.lang,"Void");ha(c$,"TYPE",null);java.lang.Void.TYPE=java.lang.Void;Z(java.lang.reflect,"GenericDeclaration");Z(java.lang.reflect,"AnnotatedElement");c$=E(java.lang.reflect,"AccessibleObject",null,java.lang.reflect.AnnotatedElement);C(c$,function(){});b(c$,"isAccessible",function(){return!1});c$.setAccessible=b(c$,"setAccessible",function(){},"~A,~B");b(c$,"setAccessible",function(){},
"~B");e(c$,"isAnnotationPresent",function(){return!1},"Class");e(c$,"getDeclaredAnnotations",function(){return[]});e(c$,"getAnnotations",function(){return[]});e(c$,"getAnnotation",function(){return null},"Class");c$.marshallArguments=b(c$,"marshallArguments",function(){return null},"~A,~A");b(c$,"invokeV",function(){},"~O,~A");b(c$,"invokeL",function(){return null},"~O,~A");b(c$,"invokeI",function(){return 0},"~O,~A");b(c$,"invokeJ",function(){return 0},"~O,~A");b(c$,"invokeF",function(){return 0},
"~O,~A");b(c$,"invokeD",function(){return 0},"~O,~A");c$.emptyArgs=c$.prototype.emptyArgs=[];Z(java.lang.reflect,"InvocationHandler");c$=Z(java.lang.reflect,"Member");ha(c$,"PUBLIC",0,"DECLARED",1);c$=E(java.lang.reflect,"Modifier");C(c$,function(){});c$.isAbstract=b(c$,"isAbstract",function(b){return 0!=(b&1024)},"~N");c$.isFinal=b(c$,"isFinal",function(b){return 0!=(b&16)},"~N");c$.isInterface=b(c$,"isInterface",function(b){return 0!=(b&512)},"~N");c$.isNative=b(c$,"isNative",function(b){return 0!=
(b&256)},"~N");c$.isPrivate=b(c$,"isPrivate",function(b){return 0!=(b&2)},"~N");c$.isProtected=b(c$,"isProtected",function(b){return 0!=(b&4)},"~N");c$.isPublic=b(c$,"isPublic",function(b){return 0!=(b&1)},"~N");c$.isStatic=b(c$,"isStatic",function(b){return 0!=(b&8)},"~N");c$.isStrict=b(c$,"isStrict",function(b){return 0!=(b&2048)},"~N");c$.isSynchronized=b(c$,"isSynchronized",function(b){return 0!=(b&32)},"~N");c$.isTransient=b(c$,"isTransient",function(b){return 0!=(b&128)},"~N");c$.isVolatile=
b(c$,"isVolatile",function(b){return 0!=(b&64)},"~N");c$.toString=b(c$,"toString",function(b){var e=[];java.lang.reflect.Modifier.isPublic(b)&&(e[e.length]="public");java.lang.reflect.Modifier.isProtected(b)&&(e[e.length]="protected");java.lang.reflect.Modifier.isPrivate(b)&&(e[e.length]="private");java.lang.reflect.Modifier.isAbstract(b)&&(e[e.length]="abstract");java.lang.reflect.Modifier.isStatic(b)&&(e[e.length]="static");java.lang.reflect.Modifier.isFinal(b)&&(e[e.length]="final");java.lang.reflect.Modifier.isTransient(b)&&
(e[e.length]="transient");java.lang.reflect.Modifier.isVolatile(b)&&(e[e.length]="volatile");java.lang.reflect.Modifier.isSynchronized(b)&&(e[e.length]="synchronized");java.lang.reflect.Modifier.isNative(b)&&(e[e.length]="native");java.lang.reflect.Modifier.isStrict(b)&&(e[e.length]="strictfp");java.lang.reflect.Modifier.isInterface(b)&&(e[e.length]="interface");return 0<e.length?e.join(" "):""},"~N");ha(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$=I(function(){this.exceptionTypes=this.parameterTypes=this.clazz=null;this.modifiers=0;H(this,arguments)},java.lang.reflect,"Constructor",java.lang.reflect.AccessibleObject,[java.lang.reflect.GenericDeclaration,java.lang.reflect.Member]);C(c$,function(b,e,m,a){O(this,java.lang.reflect.Constructor,[]);this.clazz=b;this.parameterTypes=e;this.exceptionTypes=
m;this.modifiers=a},"Class,~A,~A,~N");e(c$,"getTypeParameters",function(){return null});b(c$,"toGenericString",function(){return null});b(c$,"getGenericParameterTypes",function(){return null});b(c$,"getGenericExceptionTypes",function(){return null});b(c$,"getParameterAnnotations",function(){return null});b(c$,"isVarArgs",function(){return!1});e(c$,"isSynthetic",function(){return!1});e(c$,"equals",function(b){if(null!=b&&S(b,java.lang.reflect.Constructor)&&this.getDeclaringClass()===b.getDeclaringClass()){var e=
this.parameterTypes;b=b.parameterTypes;if(e.length==b.length){for(var m=0;m<e.length;m++)if(e[m]!==b[m])return!1;return!0}}return!1},"~O");e(c$,"getDeclaringClass",function(){return this.clazz});b(c$,"getExceptionTypes",function(){return this.exceptionTypes});e(c$,"getModifiers",function(){return this.modifiers});e(c$,"getName",function(){return this.getDeclaringClass().getName()});b(c$,"getParameterTypes",function(){return this.parameterTypes});e(c$,"hashCode",function(){return this.getDeclaringClass().getName().hashCode()});
b(c$,"newInstance",function(b){var e=new this.clazz(Ca);H(e,b);return e},"~A");e(c$,"toString",function(){return null});c$=E(java.lang.reflect,"Field",java.lang.reflect.AccessibleObject,java.lang.reflect.Member);e(c$,"isSynthetic",function(){return!1});b(c$,"toGenericString",function(){return null});b(c$,"isEnumConstant",function(){return!1});b(c$,"getGenericType",function(){return null});e(c$,"equals",function(){return!1},"~O");e(c$,"getDeclaringClass",function(){return null});e(c$,"getName",function(){return null});
b(c$,"getType",function(){return null});e(c$,"hashCode",function(){return 0});e(c$,"toString",function(){return null});c$=I(function(){this.exceptionTypes=this.parameterTypes=this.returnType=this.name=this.clazz=null;this.modifiers=0;H(this,arguments)},java.lang.reflect,"Method",java.lang.reflect.AccessibleObject,[java.lang.reflect.GenericDeclaration,java.lang.reflect.Member]);C(c$,function(b,e,m,a,c,d){O(this,java.lang.reflect.Method,[]);this.clazz=b;this.name=e;this.parameterTypes=m;this.returnType=
a;this.exceptionTypes=c;this.modifiers=d},"Class,~S,~A,Class,~A,~N");e(c$,"getTypeParameters",function(){return null});b(c$,"toGenericString",function(){return null});b(c$,"getGenericParameterTypes",function(){return null});b(c$,"getGenericExceptionTypes",function(){return null});b(c$,"getGenericReturnType",function(){return null});b(c$,"getParameterAnnotations",function(){return null});b(c$,"isVarArgs",function(){return!1});b(c$,"isBridge",function(){return!1});e(c$,"isSynthetic",function(){return!1});
b(c$,"getDefaultValue",function(){return null});e(c$,"equals",function(b){if(null!=b&&S(b,java.lang.reflect.Method)&&this.getDeclaringClass()===b.getDeclaringClass()&&this.getName()===b.getName()){var e=this.parameterTypes;b=b.parameterTypes;if(e.length==b.length){for(var m=0;m<e.length;m++)if(e[m]!==b[m])return!1;return!0}}return!1},"~O");e(c$,"getDeclaringClass",function(){return this.clazz});b(c$,"getExceptionTypes",function(){return this.exceptionTypes});e(c$,"getModifiers",function(){return this.modifiers});
e(c$,"getName",function(){return this.name});b(c$,"getParameterTypes",function(){return this.parameterTypes});b(c$,"getReturnType",function(){return this.returnType});e(c$,"hashCode",function(){return this.getDeclaringClass().getName().hashCode()^this.getName().hashCode()});b(c$,"invoke",function(b,e){var m=this.clazz.prototype[this.getName()];null==m&&(m=this.clazz[this.getName()]);null!=m&&m.apply(b,e)},"~O,~A");e(c$,"toString",function(){return null});(function(){if(!Jmol._debugCode){q(["java.io.FilterInputStream"],
"java.io.BufferedInputStream",["java.io.IOException","java.lang.IndexOutOfBoundsException"],function(){c$=u(function(){this.buf=null;this.pos=this.count=0;this.markpos=-1;this.marklimit=0;t(this,arguments)},java.io,"BufferedInputStream",java.io.FilterInputStream);b(c$,"getInIfOpen",function(){var a=this.$in;if(null==a)throw new java.io.IOException("Stream closed");return a});b(c$,"getBufIfOpen",function(){var a=this.buf;if(null==a)throw new java.io.IOException("Stream closed");return a});e(c$,"resetStream",
function(){});w(c$,function(a){R(this,java.io.BufferedInputStream,[a]);this.buf=T(java.io.BufferedInputStream.defaultBufferSize,0)},"java.io.InputStream");b(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 c=this.pos-this.markpos;System.arraycopy(a,this.markpos,a,0,c);this.pos=c;this.markpos=0}else a.length>=this.marklimit?(this.markpos=-1,this.pos=0):(c=2*this.pos,c>this.marklimit&&(c=this.marklimit),c=T(c,0),System.arraycopy(a,
0,c,0,this.pos),a=this.buf=c);this.count=this.pos;a=this.getInIfOpen().read(a,this.pos,a.length-this.pos);0<a&&(this.count=a+this.pos)});e(c$,"readByteAsInt",function(){return this.pos>=this.count&&(this.fill(),this.pos>=this.count)?-1:this.getBufIfOpen()[this.pos++]&255});b(c$,"read1",function(a,c,d){var n=this.count-this.pos;if(0>=n){if(d>=this.getBufIfOpen().length&&0>this.markpos)return this.getInIfOpen().read(a,c,d);this.fill();n=this.count-this.pos;if(0>=n)return-1}d=n<d?n:d;System.arraycopy(this.getBufIfOpen(),
this.pos,a,c,d);this.pos+=d;return d},"~A,~N,~N");e(c$,"read",function(a,c,d){this.getBufIfOpen();if(0>(c|d|c+d|a.length-(c+d)))throw new IndexOutOfBoundsException;if(0==d)return 0;for(var n=0;;){var b=this.read1(a,c+n,d-n);if(0>=b)return 0==n?b:n;n+=b;if(n>=d)return n;b=this.$in;if(null!=b&&0>=b.available())return n}},"~A,~N,~N");e(c$,"skip",function(a){this.getBufIfOpen();if(0>=a)return 0;var c=this.count-this.pos;if(0>=c){if(0>this.markpos)return this.getInIfOpen().skip(a);this.fill();c=this.count-
this.pos;if(0>=c)return 0}a=c<a?c:a;this.pos+=a;return a},"~N");e(c$,"available",function(){var a=this.count-this.pos,c=this.getInIfOpen().available();return a>2147483647-c?2147483647:a+c});e(c$,"mark",function(a){this.marklimit=a;this.markpos=this.pos},"~N");e(c$,"reset",function(){this.getBufIfOpen();if(0>this.markpos)throw new java.io.IOException("Resetting to invalid mark");this.pos=this.markpos});e(c$,"markSupported",function(){return!0});e(c$,"close",function(){var a=this.$in;this.$in=null;
null!=a&&a.close()});B(c$,"defaultBufferSize",8192)});q(["java.io.Reader"],"java.io.BufferedReader",["java.io.IOException","java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","JU.SB"],function(){c$=u(function(){this.cb=this.$in=null;this.nextChar=this.nChars=0;this.markedChar=-1;this.readAheadLimit=0;this.markedSkipLF=this.skipLF=!1;t(this,arguments)},java.io,"BufferedReader",java.io.Reader);b(c$,"setSize",function(a){if(0>=a)throw new IllegalArgumentException("Buffer size <= 0");this.cb=
ra(a,"\x00");this.nextChar=this.nChars=0},"~N");w(c$,function(a){R(this,java.io.BufferedReader,[a]);this.$in=a;this.setSize(java.io.BufferedReader.defaultCharBufferSize)},"java.io.Reader");b(c$,"ensureOpen",function(){if(null==this.$in)throw new java.io.IOException("Stream closed");});b(c$,"fill",function(){var a;if(-1>=this.markedChar)a=0;else{var c=this.nextChar-this.markedChar;c>=this.readAheadLimit?(this.markedChar=-2,a=this.readAheadLimit=0):(this.readAheadLimit<=this.cb.length?System.arraycopy(this.cb,
this.markedChar,this.cb,0,c):(a=ra(this.readAheadLimit,"\x00"),System.arraycopy(this.cb,this.markedChar,a,0,c),this.cb=a),this.markedChar=0,this.nextChar=this.nChars=a=c)}do c=this.$in.read(this.cb,a,this.cb.length-a);while(0==c);0<c&&(this.nChars=a+c,this.nextChar=a)});b(c$,"read1",function(a,c,d){if(this.nextChar>=this.nChars){if(d>=this.cb.length&&-1>=this.markedChar&&!this.skipLF)return this.$in.read(a,c,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,c,d);this.nextChar+=d;return d},"~A,~N,~N");b(c$,"read",function(a,c,d){this.ensureOpen();if(0>c||c>a.length||0>d||c+d>a.length||0>c+d)throw new IndexOutOfBoundsException;if(0==d)return 0;var n=this.read1(a,c,d);if(0>=n)return n;for(;n<d&&this.$in.ready();){var b=this.read1(a,c+n,d-n);if(0>=b)break;n+=b}return n},"~A,~N,~N");
b(c$,"readLine1",function(a){var c=null,d;this.ensureOpen();for(var n=a||this.skipLF;;){this.nextChar>=this.nChars&&this.fill();if(this.nextChar>=this.nChars)return null!=c&&0<c.length()?c.toString():null;var b=!1;a=String.fromCharCode(0);var g;n&&"\n"==this.cb[this.nextChar]&&this.nextChar++;n=this.skipLF=!1;g=this.nextChar;a:for(;g<this.nChars;g++)if(a=this.cb[g],"\n"==a||"\r"==a){b=!0;break a}d=this.nextChar;this.nextChar=g;if(b)return null==c?c=String.instantialize(this.cb,d,g-d):(c.appendCB(this.cb,
d,g-d),c=c.toString()),this.nextChar++,"\r"==a&&(this.skipLF=!0),c;null==c&&(c=JU.SB.newN(java.io.BufferedReader.defaultExpectedLineLength));c.appendCB(this.cb,d,g-d)}},"~B");b(c$,"readLine",function(){return this.readLine1(!1)});e(c$,"skip",function(a){if(0>a)throw new IllegalArgumentException("skip value is negative");this.ensureOpen();for(var c=a;0<c;){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(c<=d){this.nextChar+=c;c=0;break}c-=d;this.nextChar=this.nChars}return a-c},"~N");b(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()});e(c$,"markSupported",function(){return!0});e(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");e(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});b(c$,"close",function(){null!=this.$in&&(this.$in.close(),this.cb=this.$in=null)});B(c$,"INVALIDATED",-2,"UNMARKED",-1,"defaultCharBufferSize",8192,"defaultExpectedLineLength",80)});W(["java.io.Writer"],
"java.io.BufferedWriter",["java.io.IOException","java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","$.StringIndexOutOfBoundsException"],function(){c$=I(function(){this.buf=this.out=null;this.pos=0;this.lineSeparator="\r\n";H(this,arguments)},java.io,"BufferedWriter",java.io.Writer);C(c$,function(a){O(this,java.io.BufferedWriter,[a]);this.out=a;this.buf=X(8192,"\x00")},"java.io.Writer");C(c$,function(a,c){O(this,java.io.BufferedWriter,[a]);if(0<c)this.out=a,this.buf=X(c,"\x00");else throw new IllegalArgumentException("K0058");
},"java.io.Writer,~N");b(c$,"close",function(){this.isOpen()&&(this.flush(),this.out.close(),this.out=this.buf=null)});b(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");});b(c$,"isOpen",($fz=function(){return null!=this.out},$fz.isPrivate=!0,$fz));b(c$,"newLine",function(){this.write("\r\n",0,2)});b(c$,"write",function(a,c,d){if(!this.isOpen())throw new java.io.IOException("K005d");if(0>
c||c>a.length-d||0>d)throw new IndexOutOfBoundsException;if(0==this.pos&&d>=this.buf.length)this.out.write(a,c,d);else{var n=this.buf.length-this.pos;d<n&&(n=d);0<n&&(System.arraycopy(a,c,this.buf,this.pos,n),this.pos+=n);this.pos==this.buf.length&&(this.out.write(this.buf,0,this.buf.length),this.pos=0,d>n&&(c+=n,n=d-n,n>=this.buf.length?this.out.write(a,c,n):(System.arraycopy(a,c,this.buf,this.pos,n),this.pos+=n)))}},"~A,~N,~N");b(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");b(c$,"write",function(a,c,d){if(!this.isOpen())throw new java.io.IOException("K005d");if(!(0>=d)){if(c>a.length-d||0>c)throw new StringIndexOutOfBoundsException;if(0==this.pos&&d>=this.buf.length){var n=X(d,"\x00");a.getChars(c,c+d,n,0);this.out.write(n,0,d)}else{var b=this.buf.length-this.pos;d<b&&(b=d);0<b&&(a.getChars(c,c+b,this.buf,this.pos),this.pos+=
b);this.pos==this.buf.length&&(this.out.write(this.buf,0,this.buf.length),this.pos=0,d>b&&(c+=b,b=d-b,b>=this.buf.length?(n=X(d,"\x00"),a.getChars(c,c+b,n,0),this.out.write(n,0,b)):(a.getChars(c,c+b,this.buf,this.pos),this.pos+=b)))}}},"~S,~N,~N")});q(["java.io.InputStream"],"java.io.ByteArrayInputStream",["java.lang.IndexOutOfBoundsException","$.NullPointerException"],function(){c$=u(function(){this.buf=null;this.count=this.$mark=this.pos=0;t(this,arguments)},java.io,"ByteArrayInputStream",java.io.InputStream);
w(c$,function(a){R(this,java.io.ByteArrayInputStream,[]);this.buf=a;this.pos=0;this.count=a.length},"~A");e(c$,"readByteAsInt",function(){return this.pos<this.count?this.buf[this.pos++]&255:-1});e(c$,"read",function(a,c,d){if(null==a)throw new NullPointerException;if(0>c||0>d||d>a.length-c)throw new IndexOutOfBoundsException;if(this.pos>=this.count)return-1;var n=this.count-this.pos;d>n&&(d=n);if(0>=d)return 0;System.arraycopy(this.buf,this.pos,a,c,d);this.pos+=d;return d},"~A,~N,~N");e(c$,"skip",
function(a){var c=this.count-this.pos;a<c&&(c=0>a?0:a);this.pos+=c;return c},"~N");e(c$,"available",function(){return this.count-this.pos});e(c$,"markSupported",function(){return!0});e(c$,"mark",function(){this.$mark=this.pos},"~N");e(c$,"resetStream",function(){});e(c$,"reset",function(){this.pos=this.$mark});e(c$,"close",function(){})});q(["java.io.OutputStream"],"java.io.ByteArrayOutputStream",["java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","$.OutOfMemoryError"],function(){c$=
u(function(){this.buf=null;this.count=0;t(this,arguments)},java.io,"ByteArrayOutputStream",java.io.OutputStream);w(c$,function(){this.construct(32)});w(c$,function(a){R(this,java.io.ByteArrayOutputStream,[]);if(0>a)throw new IllegalArgumentException("Negative initial size: "+a);this.buf=T(a,0)},"~N");b(c$,"ensureCapacity",function(a){0<a-this.buf.length&&this.grow(a)},"~N");b(c$,"grow",function(a){var c=this.buf.length<<1;0>c-a&&(c=a);if(0>c){if(0>a)throw new OutOfMemoryError;c=a}this.buf=java.io.ByteArrayOutputStream.arrayCopyByte(this.buf,
c)},"~N");c$.arrayCopyByte=b(c$,"arrayCopyByte",function(a,c){var d=T(c,0);System.arraycopy(a,0,d,0,a.length<c?a.length:c);return d},"~A,~N");e(c$,"writeByteAsInt",function(a){this.ensureCapacity(this.count+1);this.buf[this.count]=a;this.count+=1},"~N");b(c$,"write",function(a,c,d){if(0>c||c>a.length||0>d||0<c+d-a.length)throw new IndexOutOfBoundsException;this.ensureCapacity(this.count+d);System.arraycopy(a,c,this.buf,this.count,d);this.count+=d},"~A,~N,~N");b(c$,"writeTo",function(a){a.write(this.buf,
0,this.count)},"java.io.OutputStream");b(c$,"reset",function(){this.count=0});b(c$,"toByteArray",function(){return this.count==this.buf.length?this.buf:java.io.ByteArrayOutputStream.arrayCopyByte(this.buf,this.count)});b(c$,"size",function(){return this.count});e(c$,"toString",function(){return String.instantialize(this.buf,0,this.count)});e(c$,"close",function(){})});q(["java.io.InputStream"],"java.io.FilterInputStream",null,function(){c$=u(function(){this.$in=null;t(this,arguments)},java.io,"FilterInputStream",
java.io.InputStream);w(c$,function(a){R(this,java.io.FilterInputStream,[]);this.$in=a},"java.io.InputStream");b(c$,"readByteAsInt",function(){return this.$in.readByteAsInt()});b(c$,"read",function(a,c,d){return this.$in.read(a,c,d)},"~A,~N,~N");b(c$,"skip",function(a){return this.$in.skip(a)},"~N");b(c$,"available",function(){return this.$in.available()});b(c$,"close",function(){this.$in.close()});b(c$,"mark",function(a){this.$in.mark(a)},"~N");b(c$,"reset",function(){this.$in.reset()});b(c$,"markSupported",
function(){return this.$in.markSupported()})});q(null,"java.io.InputStream",["java.io.IOException","java.lang.IndexOutOfBoundsException","$.NullPointerException"],function(){c$=G(java.io,"InputStream");b(c$,"read",function(a,c,d){if(null==a)throw new NullPointerException;if(0>c||0>d||d>a.length-c)throw new IndexOutOfBoundsException;if(0==d)return 0;var n=this.readByteAsInt();if(-1==n)return-1;a[c]=n;var b=1;try{for(;b<d;b++){n=this.readByteAsInt();if(-1==n)break;a[c+b]=n}}catch(g){if(!y(g,java.io.IOException))throw g;
}return b},"~A,~N,~N");b(c$,"skip",function(a){var c=a,d;null==java.io.InputStream.skipBuffer&&(java.io.InputStream.skipBuffer=T(2048,0));var n=java.io.InputStream.skipBuffer;if(0>=a)return 0;for(;0<c;){d=this.read(n,0,Math.min(2048,c));if(0>d)break;c-=d}return a-c},"~N");b(c$,"available",function(){return 0});b(c$,"close",function(){});b(c$,"mark",function(){},"~N");b(c$,"reset",function(){throw new java.io.IOException("mark/reset not supported");});b(c$,"markSupported",function(){return!1});b(c$,
"resetStream",function(){});B(c$,"SKIP_BUFFER_SIZE",2048,"skipBuffer",null)});q(["java.io.Reader"],"java.io.InputStreamReader",["java.lang.NullPointerException"],function(){c$=u(function(){this.$in=null;this.isOpen=!0;this.charsetName=null;this.isUTF8=!1;this.bytearr=null;this.pos=0;t(this,arguments)},java.io,"InputStreamReader",java.io.Reader);w(c$,function(a,c){R(this,java.io.InputStreamReader,[a]);this.$in=a;this.charsetName=c;if(!(this.isUTF8="UTF-8".equals(c))&&!"ISO-8859-1".equals(c))throw new NullPointerException("charsetName");
},"java.io.InputStream,~S");b(c$,"getEncoding",function(){return this.charsetName});e(c$,"read",function(a,c,d){if(null==this.bytearr||this.bytearr.length<d)this.bytearr=T(d,0);var n,b,g=0,h=c,l=this.$in.read(this.bytearr,this.pos,d-this.pos),e=this.$in.available();if(0>l)return-1;for(var k=l;g<k;){d=this.bytearr[g]&255;if(this.isUTF8)switch(d>>4){case 12:case 13:if(g+1>=l){if(1<=e){k=g;continue}}else if(128==((n=this.bytearr[g+1])&192)){a[h++]=String.fromCharCode((d&31)<<6|n&63);g+=2;continue}this.isUTF8=
!1;break;case 14:if(g+2>=l){if(2<=e){k=g;continue}}else if(128==((n=this.bytearr[g+1])&192)&&128==((b=this.bytearr[g+2])&192)){a[h++]=String.fromCharCode((d&15)<<12|(n&63)<<6|b&63);g+=3;continue}this.isUTF8=!1}g++;a[h++]=String.fromCharCode(d)}this.pos=l-g;for(a=0;a<this.pos;a++)this.bytearr[a]=this.bytearr[g++];return h-c},"~A,~N,~N");e(c$,"ready",function(){return this.isOpen});e(c$,"close",function(){this.$in.close();this.isOpen=!1})});q(["java.io.Closeable","$.Flushable"],"java.io.OutputStream",
["java.lang.IndexOutOfBoundsException","$.NullPointerException"],function(){c$=G(java.io,"OutputStream",null,[java.io.Closeable,java.io.Flushable]);b(c$,"write",function(a,c,d){if(null==a)throw new NullPointerException;if(0>c||c>a.length||0>d||c+d>a.length||0>c+d)throw new IndexOutOfBoundsException;if(0!=d)for(var n=0;n<d;n++)this.writeByteAsInt(a[c+n])},"~A,~N,~N");e(c$,"flush",function(){});e(c$,"close",function(){})});q(["java.io.Closeable"],"java.io.Reader",["java.io.IOException","java.lang.IllegalArgumentException",
"$.NullPointerException"],function(){c$=u(function(){this.skipBuffer=this.lock=null;t(this,arguments)},java.io,"Reader",null,java.io.Closeable);w(c$,function(a){if(null==a)throw new NullPointerException;this.lock=a},"~O");b(c$,"skip",function(a){if(0>a)throw new IllegalArgumentException("skip value is negative");var c=Math.min(a,8192);if(null==this.skipBuffer||this.skipBuffer.length<c)this.skipBuffer=ra(c,"\x00");for(var d=a;0<d;){var n=this.read(this.skipBuffer,0,Math.min(d,c));if(-1==n)break;d-=
n}return a-d},"~N");b(c$,"ready",function(){return!1});b(c$,"markSupported",function(){return!1});b(c$,"mark",function(){throw new java.io.IOException("mark() not supported");},"~N");b(c$,"reset",function(){throw new java.io.IOException("reset() not supported");});B(c$,"maxSkipBufferSize",8192)});q(["java.io.Reader"],"java.io.StringReader",["java.io.IOException","java.lang.IllegalArgumentException","$.IndexOutOfBoundsException"],function(){c$=u(function(){this.str=null;this.$mark=this.next=this.length=
0;t(this,arguments)},java.io,"StringReader",java.io.Reader);w(c$,function(a){R(this,java.io.StringReader,[a]);this.str=a;this.length=a.length},"~S");b(c$,"ensureOpen",function(){if(null==this.str)throw new java.io.IOException("Stream closed");});e(c$,"read",function(a,c,d){this.ensureOpen();if(0>c||c>a.length||0>d||c+d>a.length||0>c+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,c);this.next+=d;return d},"~A,~N,~N");e(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");e(c$,"ready",function(){this.ensureOpen();return!0});e(c$,"markSupported",function(){return!0});e(c$,"mark",function(a){if(0>a)throw new IllegalArgumentException("Read-ahead limit < 0");this.ensureOpen();this.$mark=this.next},"~N");e(c$,"reset",function(){this.ensureOpen();this.next=this.$mark});
e(c$,"close",function(){this.str=null})});W(["java.io.Closeable","$.Flushable","java.lang.Appendable"],"java.io.Writer",["java.lang.NullPointerException","$.StringIndexOutOfBoundsException"],function(){c$=I(function(){this.lock=null;H(this,arguments)},java.io,"Writer",null,[Appendable,java.io.Closeable,java.io.Flushable]);C(c$,function(){this.lock=this});C(c$,function(a){if(null!=a)this.lock=a;else throw new NullPointerException;},"~O");b(c$,"write",function(a){this.write(a,0,a.length)},"~A");b(c$,
"write",function(a){var c=X(1,"\x00");c[0]=String.fromCharCode(a);this.write(c)},"~N");b(c$,"write",function(a){var c=X(a.length,"\x00");a.getChars(0,c.length,c,0);this.write(c)},"~S");b(c$,"write",function(a,c,d){if(0<=d){var n=X(d,"\x00");a.getChars(c,c+d,n,0);this.write(n)}else throw new StringIndexOutOfBoundsException;},"~S,~N,~N");b(c$,"append",function(a){this.write(a.charCodeAt(0));return this},"~N");b(c$,"append",function(a){null==a?this.write("null"):this.write(a.toString());return this},
"CharSequence");b(c$,"append",function(a,c,d){null==a?this.write("null".substring(c,d)):this.write(a.subSequence(c,d).toString());return this},"CharSequence,~N,~N");ha(c$,"TOKEN_NULL","null")});W(null,"java.lang.AbstractStringBuilder","java.io.InvalidObjectException java.lang.ArrayIndexOutOfBoundsException $.IndexOutOfBoundsException $.NegativeArraySizeException $.NullPointerException $.StringIndexOutOfBoundsException".split(" "),function(){c$=I(function(){this.value=null;this.count=0;this.shared=
!1;H(this,arguments)},java.lang,"AbstractStringBuilder");b(c$,"getValue",function(){return this.value});b(c$,"shareValue",function(){this.shared=!0;return this.value});b(c$,"set",function(a,c){null==a&&(a=X(0,"\x00"));if(a.length<c)throw new java.io.InvalidObjectException("K0199");this.shared=!1;this.value=a;this.count=c},"~A,~N");C(c$,function(){this.value=X(16,"\x00")});C(c$,function(a){if(0>a)throw new NegativeArraySizeException;this.value=X(a,"\x00")},"~N");C(c$,function(a){this.count=a.length;
this.shared=!1;this.value=X(this.count+16,"\x00");a.getChars(0,this.count,this.value,0)},"~S");b(c$,"enlargeBuffer",($fz=function(a){var c=(this.value.length<<1)+2;a=X(a>c?a:c,"\x00");System.arraycopy(this.value,0,a,0,this.count);this.value=a;this.shared=!1},$fz.isPrivate=!0,$fz),"~N");b(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"});b(c$,"append0",function(a){var c=this.count+a.length;c>this.value.length?this.enlargeBuffer(c):this.shared&&(this.value=this.value.clone(),this.shared=!1);System.arraycopy(a,0,this.value,this.count,a.length);this.count=c},"~A");b(c$,"append0",function(a,c,d){if(null==a)throw new NullPointerException;if(0<=c&&0<=d&&d<=a.length-c){var n=this.count+d;n>this.value.length?this.enlargeBuffer(n):this.shared&&(this.value=this.value.clone(),this.shared=!1);System.arraycopy(a,
c,this.value,this.count,d);this.count=n}else throw new ArrayIndexOutOfBoundsException;},"~A,~N,~N");b(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");b(c$,"append0",function(a){if(null==a)this.appendNull();else{var c=a.length,d=this.count+c;d>this.value.length?this.enlargeBuffer(d):this.shared&&(this.value=this.value.clone(),this.shared=!1);a.getChars(0,c,this.value,
this.count);this.count=d}},"~S");b(c$,"append0",function(a,c,d){null==a&&(a="null");if(0>c||0>d||c>d||d>a.length())throw new IndexOutOfBoundsException;this.append0(a.subSequence(c,d).toString())},"CharSequence,~N,~N");b(c$,"capacity",function(){return this.value.length});b(c$,"charAt",function(a){if(0>a||a>=this.count)throw new StringIndexOutOfBoundsException(a);return this.value[a]},"~N");b(c$,"delete0",function(a,c){if(0<=a){c>this.count&&(c=this.count);if(c==a)return;if(c>a){var d=this.count-c;
if(0<d)if(this.shared){var n=X(this.value.length,"\x00");System.arraycopy(this.value,0,n,0,a);System.arraycopy(this.value,c,n,a,d);this.value=n;this.shared=!1}else System.arraycopy(this.value,c,this.value,a,d);this.count-=c-a;return}}throw new StringIndexOutOfBoundsException;},"~N,~N");b(c$,"deleteCharAt0",function(a){if(0>a||a>=this.count)throw new StringIndexOutOfBoundsException(a);var c=this.count-a-1;if(0<c)if(this.shared){var d=X(this.value.length,"\x00");System.arraycopy(this.value,0,d,0,a);
System.arraycopy(this.value,a+1,d,a,c);this.value=d;this.shared=!1}else System.arraycopy(this.value,a+1,this.value,a,c);this.count--},"~N");b(c$,"ensureCapacity",function(a){a>this.value.length&&this.enlargeBuffer(a)},"~N");b(c$,"getChars",function(a,c,d,n){if(a>this.count||c>this.count||a>c)throw new StringIndexOutOfBoundsException;System.arraycopy(this.value,a,d,n,c-a)},"~N,~N,~A,~N");b(c$,"insert0",function(a,c){if(0>a||a>this.count)throw new StringIndexOutOfBoundsException(a);0!=c.length&&(this.move(c.length,
a),System.arraycopy(c,0,this.value,a,c.length),this.count+=c.length)},"~N,~A");b(c$,"insert0",function(a,c,d,n){if(0<=a&&a<=this.count){if(0<=d&&0<=n&&n<=c.length-d){0!=n&&(this.move(n,a),System.arraycopy(c,d,this.value,a,n),this.count+=n);return}throw new StringIndexOutOfBoundsException("offset "+d+", len "+n+", array.length "+c.length);}throw new StringIndexOutOfBoundsException(a);},"~N,~A,~N,~N");b(c$,"insert0",function(a,c){if(0>a||a>this.count)throw new ArrayIndexOutOfBoundsException(a);this.move(1,
a);this.value[a]=c;this.count++},"~N,~N");b(c$,"insert0",function(a,c){if(0<=a&&a<=this.count){null==c&&(c="null");var d=c.length;0!=d&&(this.move(d,a),c.getChars(0,d,this.value,a),this.count+=d)}else throw new StringIndexOutOfBoundsException(a);},"~N,~S");b(c$,"insert0",function(a,c,d,n){null==c&&(c="null");if(0>a||a>this.count||0>d||0>n||d>n||n>c.length())throw new IndexOutOfBoundsException;this.insert0(a,c.subSequence(d,n).toString())},"~N,CharSequence,~N,~N");b(c$,"length",function(){return this.count});
b(c$,"move",($fz=function(a,c){var d;if(this.value.length-this.count>=a){if(!this.shared){System.arraycopy(this.value,c,this.value,c+a,this.count-c);return}d=this.value.length}else{d=this.count+a;var n=(this.value.length<<1)+2;d=d>n?d:n}d=X(d,"\x00");System.arraycopy(this.value,0,d,0,c);System.arraycopy(this.value,c,d,c+a,this.count-c);this.value=d;this.shared=!1},$fz.isPrivate=!0,$fz),"~N,~N");b(c$,"replace0",function(a,c,d){if(0<=a){c>this.count&&(c=this.count);if(c>a){var n=d.length,b=c-a-n;if(0<
b)if(this.shared){var g=X(this.value.length,"\x00");System.arraycopy(this.value,0,g,0,a);System.arraycopy(this.value,c,g,a+n,this.count-c);this.value=g;this.shared=!1}else System.arraycopy(this.value,c,this.value,a+n,this.count-c);else 0>b?this.move(-b,c):this.shared&&(this.value=this.value.clone(),this.shared=!1);d.getChars(0,n,this.value,a);this.count-=b;return}if(a==c){if(null==d)throw new NullPointerException;this.insert0(a,d);return}}throw new StringIndexOutOfBoundsException;},"~N,~N,~S");b(c$,
"reverse0",function(){if(!(2>this.count))if(this.shared){for(var a=X(this.value.length,"\x00"),c=0,d=this.count;c<this.count;c++)a[--d]=this.value[c];this.value=a;this.shared=!1}else for(var c=0,d=this.count,a=Math.floor(this.count/2);c<a;c++){var n=this.value[--d];this.value[d]=this.value[c];this.value[c]=n}});b(c$,"setCharAt",function(a,c){if(0>a||a>=this.count)throw new StringIndexOutOfBoundsException(a);this.shared&&(this.value=this.value.clone(),this.shared=!1);this.value[a]=c},"~N,~N");b(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 c=X(this.value.length,"\x00");System.arraycopy(this.value,0,c,0,this.count);this.value=c;this.shared=!1}else for(c=this.count;c<a;c++)this.value[c]=String.fromCharCode(0);this.count=a},"~N");b(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");b(c$,"substring",function(a,c){if(0<=a&&a<=c&&c<=this.count){if(a==c)return"";this.shared=!0;return String.instantialize(this.value,a,c-a)}throw new StringIndexOutOfBoundsException;},"~N,~N");e(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)});b(c$,"subSequence",function(a,c){return this.substring(a,c)},"~N,~N");b(c$,
"indexOf",function(a){return this.indexOf(a,0)},"~S");b(c$,"indexOf",function(a,c){0>c&&(c=0);var d=a.length;if(0<d){if(d+c>this.count)return-1;for(var n=a.charAt(0);;){for(var b=c,g=!1;b<this.count;b++)if(this.value[b].charCodeAt(0)==n.charCodeAt(0)){g=!0;break}if(!g||d+b>this.count)return-1;for(var g=b,h=0;++h<d&&this.value[++g].charCodeAt(0)==a.charAt(h).charCodeAt(0););if(h==d)return b;c=b+1}}return c<this.count||0==c?c:this.count},"~S,~N");b(c$,"lastIndexOf",function(a){return this.lastIndexOf(a,
this.count)},"~S");b(c$,"lastIndexOf",function(a,c){var d=a.length;if(d<=this.count&&0<=c){if(0<d){c>this.count-d&&(c=this.count-d);for(var n=a.charAt(0);;){for(var b=c,g=!1;0<=b;--b)if(this.value[b].charCodeAt(0)==n.charCodeAt(0)){g=!0;break}if(!g)return-1;for(var g=b,h=0;++h<d&&this.value[++g].charCodeAt(0)==a.charAt(h).charCodeAt(0););if(h==d)return b;c=b-1}}return c<this.count?c:this.count}return-1},"~S,~N");b(c$,"trimToSize",function(){if(this.count<this.value.length){var a=X(this.count,"\x00");
System.arraycopy(this.value,0,a,0,this.count);this.value=a;this.shared=!1}});ha(c$,"INITIAL_CAPACITY",16)});W(null,"java.lang.Enum",["java.lang.CloneNotSupportedException","$.IllegalArgumentException","$.NullPointerException","java.security.AccessController","$.PrivilegedExceptionAction"],function(){c$=I(function(){this.$name=null;this.$ordinal=0;H(this,arguments)},java.lang,"Enum",null,[java.io.Serializable,Comparable]);C(c$,function(a,c){this.$name=a;this.$ordinal=c},"~S,~N");b(c$,"name",function(){return this.$name});
b(c$,"ordinal",function(){return this.$ordinal});e(c$,"toString",function(){return this.$name});e(c$,"equals",function(a){return this===a},"~O");e(c$,"hashCode",function(){return this.$ordinal+(null==this.$name?0:this.$name.hashCode())});e(c$,"clone",function(){throw new CloneNotSupportedException("KA004");});e(c$,"compareTo",function(a){return this.$ordinal-a.$ordinal},"~O");b(c$,"getDeclaringClass",function(){var a=this.getClass(),c=a.getSuperclass();return Enum===c?a:c});c$.$valueOf=b(c$,"$valueOf",
function(a,c){if(null==a||null==c)throw new NullPointerException("KA001");var d=Enum.getValues(a);if(null==d)throw new IllegalArgumentException("KA005");for(var n,b=0;b<d.length&&((n=d[b])||1);b++)if(n.$name.equals(c))return n;throw new IllegalArgumentException("KA006");},"Class,~S");c$.getValues=b(c$,"getValues",function(a){try{return java.security.AccessController.doPrivileged((V("Enum$1")?0:java.lang.Enum.$Enum$1$(),U(Enum$1,this,Ha("enumType",a)))).invoke(a,fa("Array"))}catch(c){if(S(c,Exception))return null;
throw c;}},"Class");c$.$Enum$1$=function(){K();c$=ca(null,"Enum$1",null,java.security.PrivilegedExceptionAction);e(c$,"run",function(){var a=this.f$.enumType.getMethod("values",null);a.setAccessible(!0);return a});c$=L()}});W(["java.lang.AbstractStringBuilder","$.Appendable"],"java.lang.StringBuffer",["java.lang.Character","$.Double","$.Float","$.Long"],function(){c$=E(java.lang,"StringBuffer",AbstractStringBuilder,[Appendable,java.io.Serializable,CharSequence]);C(c$,function(a){if(null==a)throw new NullPointerException;
O(this,StringBuffer,[a.toString()])},"CharSequence");b(c$,"append",function(a){return this.append(a?"true":"false")},"~B");b(c$,"append",function(a){this.append0(a);return this},"~N");b(c$,"append",function(a){return this.append(Double.toString(a))},"~N");b(c$,"append",function(a){null==a?this.appendNull():this.append0(a.toString());return this},"~O");b(c$,"append",function(a){this.append0(a);return this},"~S");b(c$,"append",function(a){null==a?this.appendNull():this.append0(a.getValue(),0,a.length());
return this},"StringBuffer");b(c$,"append",function(a){this.append0(a);return this},"~A");b(c$,"append",function(a,c,d){this.append0(a,c,d);return this},"~A,~N,~N");b(c$,"append",function(a){null==a?this.appendNull():this.append0(a.toString());return this},"CharSequence");b(c$,"append",function(a,c,d){this.append0(a,c,d);return this},"CharSequence,~N,~N");b(c$,"appendCodePoint",function(a){return this.append(Character.toChars(a))},"~N");b(c$,"$delete",function(a,c){this.delete0(a,c);return this},
"~N,~N");b(c$,"deleteCharAt",function(a){this.deleteCharAt0(a);return this},"~N");b(c$,"insert",function(a,c){this.insert0(a,c);return this},"~N,~N");b(c$,"insert",function(a,c){return this.insert(a,c?"true":"false")},"~N,~B");b(c$,"insert",function(a,c){return this.insert(a,Integer.toString(c))},"~N,~N");b(c$,"insert",function(a,c){return this.insert(a,Long.toString(c))},"~N,~N");b(c$,"insert",function(a,c){return this.insert(a,Double.toString(c))},"~N,~N");b(c$,"insert",function(a,c){return this.insert(a,
Float.toString(c))},"~N,~N");b(c$,"insert",function(a,c){return this.insert(a,null==c?"null":c.toString())},"~N,~O");b(c$,"insert",function(a,c){this.insert0(a,c);return this},"~N,~S");b(c$,"insert",function(a,c){this.insert0(a,c);return this},"~N,~A");b(c$,"insert",function(a,c,d,n){this.insert0(a,c,d,n);return this},"~N,~A,~N,~N");b(c$,"insert",function(a,c){this.insert0(a,null==c?"null":c.toString());return this},"~N,CharSequence");b(c$,"insert",function(a,c,d,n){this.insert0(a,c,d,n);return this},
"~N,CharSequence,~N,~N");b(c$,"replace",function(a,c,d){this.replace0(a,c,d);return this},"~N,~N,~S");b(c$,"reverse",function(){this.reverse0();return this});e(c$,"subSequence",function(a,c){return ja(this,StringBuffer,"substring",[a,c])},"~N,~N")});W(["java.lang.AbstractStringBuilder","$.Appendable"],"java.lang.StringBuilder",["java.lang.Double","$.Float","$.Long"],function(){c$=E(java.lang,"StringBuilder",AbstractStringBuilder,[Appendable,CharSequence,java.io.Serializable]);C(c$,function(a){O(this,
StringBuilder,[a.toString()])},"CharSequence");b(c$,"append",function(a){this.append0(a?"true":"false");return this},"~B");b(c$,"append",function(a){this.append0(a);return this},"~N");b(c$,"append",function(a){this.append0(Integer.toString(a));return this},"~N");b(c$,"append",function(a){this.append0(Long.toString(a));return this},"~N");b(c$,"append",function(a){this.append0(Float.toString(a));return this},"~N");b(c$,"append",function(a){this.append0(Double.toString(a));return this},"~N");b(c$,"append",
function(a){null==a?this.appendNull():this.append0(a.toString());return this},"~O");b(c$,"append",function(a){this.append0(a);return this},"~S");b(c$,"append",function(a){null==a?this.appendNull():this.append0(a.getValue(),0,a.length());return this},"StringBuffer");b(c$,"append",function(a){this.append0(a);return this},"~A");b(c$,"append",function(a,c,d){this.append0(a,c,d);return this},"~A,~N,~N");b(c$,"append",function(a){null==a?this.appendNull():this.append0(a.toString());return this},"CharSequence");
b(c$,"append",function(a,c,d){this.append0(a,c,d);return this},"CharSequence,~N,~N");b(c$,"$delete",function(a,c){this.delete0(a,c);return this},"~N,~N");b(c$,"deleteCharAt",function(a){this.deleteCharAt0(a);return this},"~N");b(c$,"insert",function(a,c){this.insert0(a,c?"true":"false");return this},"~N,~B");b(c$,"insert",function(a,c){this.insert0(a,c);return this},"~N,~N");b(c$,"insert",function(a,c){this.insert0(a,Integer.toString(c));return this},"~N,~N");b(c$,"insert",function(a,c){this.insert0(a,
Long.toString(c));return this},"~N,~N");b(c$,"insert",function(a,c){this.insert0(a,Float.toString(c));return this},"~N,~N");b(c$,"insert",function(a,c){this.insert0(a,Double.toString(c));return this},"~N,~N");b(c$,"insert",function(a,c){this.insert0(a,null==c?"null":c.toString());return this},"~N,~O");b(c$,"insert",function(a,c){this.insert0(a,c);return this},"~N,~S");b(c$,"insert",function(a,c){this.insert0(a,c);return this},"~N,~A");b(c$,"insert",function(a,c,d,n){this.insert0(a,c,d,n);return this},
"~N,~A,~N,~N");b(c$,"insert",function(a,c){this.insert0(a,null==c?"null":c.toString());return this},"~N,CharSequence");b(c$,"insert",function(a,c,d,n){this.insert0(a,c,d,n);return this},"~N,CharSequence,~N,~N");b(c$,"replace",function(a,c,d){this.replace0(a,c,d);return this},"~N,~N,~S");b(c$,"reverse",function(){this.reverse0();return this})});W(null,"java.lang.Thread",["java.lang.IllegalArgumentException","$.ThreadGroup","java.util.Date"],function(){c$=I(function(){this.name=this.group=this.target=
null;this.priority=0;H(this,arguments)},java.lang,"Thread",null,Runnable);c$.currentThread=b(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=b(c$,"sleep",function(){Clazz_alert("Thread.sleep is not implemented in Java2Script!")},"~N");C(c$,function(){});C(c$,function(a){this.init(null,a,"Thread-"+(new java.util.Date).getTime()+Math.random(),0)},"Runnable");C(c$,function(a,c){this.init(a,
c,"Thread-"+(new java.util.Date).getTime()+Math.random(),0)},"ThreadGroup,Runnable");C(c$,function(a){this.init(null,null,a,0)},"~S");C(c$,function(a,c){this.init(a,null,c,0)},"ThreadGroup,~S");C(c$,function(a,c){this.init(null,a,c,0)},"Runnable,~S");C(c$,function(a,c,d){this.init(a,c,d,0)},"ThreadGroup,Runnable,~S");C(c$,function(a,c,d,n){this.init(a,c,d,n)},"ThreadGroup,Runnable,~S,~N");b(c$,"init",($fz=function(a,c,d){null==a&&(a=new ThreadGroup);this.group=a;this.target=c;this.name=d;this.priority=
5},$fz.isPrivate=!0,$fz),"ThreadGroup,Runnable,~S,~N");b(c$,"start",function(){window.setTimeout(function(a){return function(){a.run()}}(this),0)});b(c$,"run",function(){null!=this.target&&this.target.run()});b(c$,"setPriority",function(a){if(10<a||1>a)throw new IllegalArgumentException;this.priority=a},"~N");b(c$,"getPriority",function(){return this.priority});b(c$,"interrupt",function(){});b(c$,"setName",function(a){this.name=a},"~S");b(c$,"getName",function(){return String.valueOf(this.name)});
b(c$,"getThreadGroup",function(){return this.group});e(c$,"toString",function(){var a=this.getThreadGroup();return null!=a?"Thread["+this.getName()+","+this.getPriority()+","+a.getName()+"]":"Thread["+this.getName()+","+this.getPriority()+",]"});ha(c$,"MIN_PRIORITY",1,"NORM_PRIORITY",5,"MAX_PRIORITY",10,"J2S_THREAD",null)});W(null,"java.lang.ThreadGroup",["java.lang.NullPointerException","$.Thread"],function(){c$=I(function(){this.name=this.parent=null;this.maxPriority=0;H(this,arguments)},java.lang,
"ThreadGroup");C(c$,function(){this.name="system";this.maxPriority=10});C(c$,function(a){this.construct(Thread.currentThread().getThreadGroup(),a)},"~S");C(c$,function(a,c){if(null==a)throw new NullPointerException;this.name=c;this.parent=a;this.maxPriority=10},"ThreadGroup,~S");b(c$,"getName",function(){return this.name});b(c$,"getParent",function(){return this.parent});b(c$,"getMaxPriority",function(){return this.maxPriority})});p("java.net");q(["java.io.IOException"],"java.net.MalformedURLException",
null,function(){c$=G(java.net,"MalformedURLException",java.io.IOException);w(c$,function(){R(this,java.net.MalformedURLException,[])})});p("java.net");c$=u(function(){this.ref=this.query=this.path=null;t(this,arguments)},java.net,"Parts");w(c$,function(a){var c=a.indexOf("#");this.ref=0>c?null:a.substring(c+1);a=0>c?a:a.substring(0,c);c=a.lastIndexOf("?");-1!=c?(this.query=a.substring(c+1),this.path=a.substring(0,c)):this.path=a},"~S");b(c$,"getPath",function(){return this.path});b(c$,"getQuery",
function(){return this.query});b(c$,"getRef",function(){return this.ref});p("java.net");q(["java.util.Hashtable"],"java.net.URL",["java.io.IOException","java.lang.Character","$.Error","java.net.MalformedURLException"],function(){c$=u(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;t(this,arguments)},java.net,"URL",null,java.io.Serializable);w(c$,function(a,c,d){var n,b,g,h=0,l=null,e=!1,k=
!1;if(null!=d){var v=System.getSecurityManager();null!=v&&this.checkSpecifyHandler(v)}try{for(b=c.length;0<b&&" ">=c.charAt(b-1);)b--;for(;h<b&&" ">=c.charAt(h);)h++;c.regionMatches(!0,h,"url:",0,4)&&(h+=4);h<c.length&&"#"==c.charAt(h)&&(e=!0);for(n=h;!e&&n<b&&47!=(g=c.charCodeAt(n));n++)if(58==g){var A=c.substring(h,n).toLowerCase();this.isValidProtocol(A)&&(l=A,h=n+1);break}this.protocol=l;if(null!=a&&(null==l||l.equalsIgnoreCase(a.protocol)))null==d&&(d=a.handler),null!=a.path&&a.path.startsWith("/")&&
(l=null),null==l&&(this.protocol=a.protocol,this.authority=a.authority,this.userInfo=a.userInfo,this.host=a.host,this.port=a.port,this.file=a.file,this.path=a.path,k=!0);if(null==this.protocol)throw new java.net.MalformedURLException("no protocol: "+c);if(null==d&&null==(d=java.net.URL.getURLStreamHandler(this.protocol)))throw new java.net.MalformedURLException("unknown protocol: "+this.protocol);this.handler=d;n=c.indexOf("#",h);0<=n&&(this.ref=c.substring(n+1,b),b=n);k&&h==b&&(this.query=a.query,
null==this.ref&&(this.ref=a.ref));d.parseURL(this,c,h,b)}catch(F){if(y(F,java.net.MalformedURLException))throw F;if(y(F,Exception))throw a=F,c=new java.net.MalformedURLException(a.getMessage()),c.initCause(a),c;throw F;}},"java.net.URL,~S,java.net.URLStreamHandler");b(c$,"isValidProtocol",function(a){var c=a.length;if(1>c)return!1;var d=a.charAt(0);if(!Character.isLetter(d))return!1;for(var n=1;n<c;n++)if(d=a.charAt(n),!Character.isLetterOrDigit(d)&&"."!=d&&"+"!=d&&"-"!=d)return!1;return!0},"~S");
b(c$,"checkSpecifyHandler",function(){},"SecurityManager");b(c$,"set5",function(a,c,d,n,b){this.protocol=a;this.host=c;this.authority=-1==d?c:c+":"+d;this.port=d;this.file=n;this.ref=b;this.$hashCode=-1;a=n.lastIndexOf("?");-1!=a?(this.query=n.substring(a+1),this.path=n.substring(0,a)):this.path=n},"~S,~S,~N,~S,~S");b(c$,"set",function(a,c,d,n,b,g,h,l){this.protocol=a;this.host=c;this.port=d;this.file=null==h?g:g+"?"+h;this.userInfo=b;this.path=g;this.ref=l;this.$hashCode=-1;this.query=h;this.authority=
n},"~S,~S,~N,~S,~S,~S,~S,~S");b(c$,"getQuery",function(){return this.query});b(c$,"getPath",function(){return this.path});b(c$,"getUserInfo",function(){return this.userInfo});b(c$,"getAuthority",function(){return this.authority});b(c$,"getPort",function(){return this.port});b(c$,"getDefaultPort",function(){return this.handler.getDefaultPort()});b(c$,"getProtocol",function(){return this.protocol});b(c$,"getHost",function(){return this.host});b(c$,"getFile",function(){return this.file});b(c$,"getRef",
function(){return this.ref});e(c$,"equals",function(a){return!s(a,java.net.URL)?!1:this.handler.equals2(this,a)},"~O");e(c$,"hashCode",function(){return-1!=this.$hashCode?this.$hashCode:this.$hashCode=this.handler.hashCode(this)});b(c$,"sameFile",function(a){return this.handler.sameFile(this,a)},"java.net.URL");e(c$,"toString",function(){return this.toExternalForm()});b(c$,"toExternalForm",function(){return this.handler.toExternalForm(this)});b(c$,"openConnection",function(){return this.handler.openConnection(this)});
b(c$,"openStream",function(){return this.openConnection().getInputStream()});b(c$,"getContent",function(){return this.openConnection().getInputStream()});c$.setURLStreamHandlerFactory=b(c$,"setURLStreamHandlerFactory",function(a){if(null!=java.net.URL.factory)throw Error("factory already defined");var c=System.getSecurityManager();null!=c&&c.checkSetFactory();java.net.URL.handlers.clear();java.net.URL.factory=a},"java.net.URLStreamHandlerFactory");c$.getURLStreamHandler=b(c$,"getURLStreamHandler",
function(a){var c=java.net.URL.handlers.get(a);null==c&&null!=java.net.URL.factory&&(c=java.net.URL.factory.createURLStreamHandler(a));return c},"~S");B(c$,"factory",null);c$.handlers=c$.prototype.handlers=new java.util.Hashtable;c$.streamHandlerLock=c$.prototype.streamHandlerLock=new JavaObject});p("java.net");q(null,"java.net.URLConnection",["java.lang.IllegalStateException","$.NullPointerException","java.net.UnknownServiceException","JU.List"],function(){c$=u(function(){this.url=null;this.doInput=
!0;this.connected=this.doOutput=!1;this.requests=null;t(this,arguments)},java.net,"URLConnection");b(c$,"setDoInput",function(a){if(this.connected)throw new IllegalStateException("Already connected");this.doInput=a},"~B");b(c$,"getDoInput",function(){return this.doInput});b(c$,"setDoOutput",function(a){if(this.connected)throw new IllegalStateException("Already connected");this.doOutput=a},"~B");b(c$,"getDoOutput",function(){return this.doOutput});w(c$,function(a){this.url=a},"java.net.URL");b(c$,
"getURL",function(){return this.url});b(c$,"getInputStream",function(){throw new java.net.UnknownServiceException("protocol doesn't support input");});b(c$,"getOutputStream",function(){throw new java.net.UnknownServiceException("protocol doesn't support output");});b(c$,"setRequestProperty",function(a,c){if(this.connected)throw new IllegalStateException("Already connected");if(null==a)throw new NullPointerException("key is null");null==this.requests&&(this.requests=new JU.List);for(var d=this.requests.size();0<=
--d;)if(this.requests.get(d)[0].equals(a)){this.requests.get(d)[1]=c;return}this.requests.addLast([a,c])},"~S,~S")});xa("java.net");W(null,"java.net.URLDecoder",["java.lang.NullPointerException"],function(){c$=E(java.net,"URLDecoder");c$.decode=b(c$,"decode",function(a){return decodeURIComponent(a)},"~S");c$.decode=b(c$,"decode",function(a){return decodeURIComponent(a)},"~S,~S")});xa("java.net");c$=E(java.net,"URLEncoder");c$.encode=b(c$,"encode",function(a){return encodeURIComponent(a)},"~S");c$.encode=
b(c$,"encode",function(a){return encodeURIComponent(a)},"~S,~S");ha(c$,"digits","0123456789ABCDEF");p("java.net");q(null,"java.net.URLStreamHandler",["java.lang.IllegalArgumentException","$.SecurityException","$.UnsupportedOperationException"],function(){c$=G(java.net,"URLStreamHandler");b(c$,"openConnectionProxy",function(){throw new UnsupportedOperationException("Method not implemented.");},"java.net.URL,java.net.Proxy");b(c$,"parseURL",function(a,c,d,n){var b=a.getProtocol(),g=a.getAuthority(),
h=a.getUserInfo(),l=a.getHost(),e=a.getPort(),k=a.getPath(),v=a.getQuery(),A=a.getRef(),F=!1,m=!1;if(d<n){var p=c.indexOf("?"),m=p==d;-1!=p&&p<n&&(v=c.substring(p+1,n),n>p&&(n=p),c=c.substring(0,p))}var Q=0;if(!(d<=n-4&&"/"==c.charAt(d)&&"/"==c.charAt(d+1)&&"/"==c.charAt(d+2)&&"/"==c.charAt(d+3))&&d<=n-2&&"/"==c.charAt(d)&&"/"==c.charAt(d+1)){d+=2;Q=c.indexOf("/",d);0>Q&&(Q=c.indexOf("?",d),0>Q&&(Q=n));l=g=c.substring(d,Q);p=g.indexOf("@");-1!=p?(h=g.substring(0,p),l=g.substring(p+1)):h=null;if(null!=
l){if(0<l.length&&"["==l.charAt(0))throw new IllegalArgumentException("Invalid host: "+l);p=l.indexOf(":");e=-1;0<=p&&(l.length>p+1&&(e=Integer.parseInt(l.substring(p+1))),l=l.substring(0,p))}else l="";if(-1>e)throw new IllegalArgumentException("Invalid port number :"+e);d=Q;0<g.length&&(k="")}null==l&&(l="");d<n?"/"==c.charAt(d)?k=c.substring(d,n):null!=k&&0<k.length?(F=!0,p=k.lastIndexOf("/"),m="",-1==p&&null!=g&&(m="/"),k=k.substring(0,p+1)+m+c.substring(d,n)):k=(null!=g?"/":"")+c.substring(d,
n):m&&null!=k&&(p=k.lastIndexOf("/"),0>p&&(p=0),k=k.substring(0,p)+"/");null==k&&(k="");if(F){for(;0<=(Q=k.indexOf("/./"));)k=k.substring(0,Q)+k.substring(Q+2);for(Q=0;0<=(Q=k.indexOf("/../",Q));)0<Q&&0<=(n=k.lastIndexOf("/",Q-1))&&0!=k.indexOf("/../",n)?(k=k.substring(0,n)+k.substring(Q+3),Q=0):Q+=3;for(;k.endsWith("/..");)if(Q=k.indexOf("/.."),0<=(n=k.lastIndexOf("/",Q-1)))k=k.substring(0,n+1);else break;k.startsWith("./")&&2<k.length&&(k=k.substring(2));k.endsWith("/.")&&(k=k.substring(0,k.length-
1))}this.setURL(a,b,l,e,g,h,k,v,A)},"java.net.URL,~S,~N,~N");b(c$,"getDefaultPort",function(){return-1});b(c$,"equals2",function(a,c){var d=a.getRef(),n=c.getRef();return(d===n||null!=d&&d.equals(n))&&this.sameFile(a,c)},"java.net.URL,java.net.URL");b(c$,"hashCode",function(a){var c=0,d=a.getProtocol();null!=d&&(c+=d.hashCode());c+=a.toString().hashCode();d=a.getFile();null!=d&&(c+=d.hashCode());c=-1==a.getPort()?c+this.getDefaultPort():c+a.getPort();a=a.getRef();null!=a&&(c+=a.hashCode());return c},
"java.net.URL");b(c$,"sameFile",function(a,c){if(!(a.getProtocol()===c.getProtocol()||null!=a.getProtocol()&&a.getProtocol().equalsIgnoreCase(c.getProtocol()))||!(a.getFile()===c.getFile()||null!=a.getFile()&&a.getFile().equals(c.getFile())))return!1;var d,n;d=-1!=a.getPort()?a.getPort():a.handler.getDefaultPort();n=-1!=c.getPort()?c.getPort():c.handler.getDefaultPort();return d!=n||!this.hostsEqual(a,c)?!1:!0},"java.net.URL,java.net.URL");b(c$,"hostsEqual",function(a,c){return null!=a.getHost()&&
null!=c.getHost()?a.getHost().equalsIgnoreCase(c.getHost()):null==a.getHost()&&null==c.getHost()},"java.net.URL,java.net.URL");b(c$,"toExternalForm",function(){return""},"java.net.URL");b(c$,"setURL",function(a,c,d,n,b,g,h,l,e){if(this!==a.handler)throw new SecurityException("handler for url different from this handler");a.set(a.getProtocol(),d,n,b,g,h,l,e)},"java.net.URL,~S,~S,~N,~S,~S,~S,~S,~S");b(c$,"setURLDeprecated",function(a,c,d,n,b,g){var h=null,l=null;if(null!=d&&0!=d.length){var h=-1==n?
d:d+":"+n,e=d.lastIndexOf("@");-1!=e&&(l=d.substring(0,e),d=d.substring(e+1))}var k=null,e=null;null!=b&&(k=b.lastIndexOf("?"),-1!=k?(e=b.substring(k+1),k=b.substring(0,k)):k=b);this.setURL(a,c,d,n,h,l,k,e,g)},"java.net.URL,~S,~S,~N,~S,~S")});p("java.net");P(java.net,"URLStreamHandlerFactory");xa("java.text");c$=I(function(){this.pattern=null;H(this,arguments)},java.text,"MessageFormat");C(c$,function(a){this.pattern=a},"~S");C(c$,function(a){this.pattern=a},"~S,java.util.Locale");c$.format=b(c$,
"format",function(a,c){return a.replace(/\{(\d+)\}/g,function(a,n){var b=parseInt(n);return null==c?null:c[b]})},"~S,~A");b(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$=E(java.util,"AbstractCollection",null,java.util.Collection);C(c$,function(){});e(c$,"add",function(){throw new UnsupportedOperationException;
},"~O");e(c$,"addAll",function(a){var c=!1;for(a=a.iterator();a.hasNext();)this.add(a.next())&&(c=!0);return c},"java.util.Collection");e(c$,"clear",function(){for(var a=this.iterator();a.hasNext();)a.next(),a.remove()});e(c$,"contains",function(a){var c=this.iterator();if(null!=a)for(;c.hasNext();){if(a.equals(c.next()))return!0}else for(;c.hasNext();)if(null==c.next())return!0;return!1},"~O");e(c$,"containsAll",function(a){for(a=a.iterator();a.hasNext();)if(!this.contains(a.next()))return!1;return!0},
"java.util.Collection");e(c$,"isEmpty",function(){return 0==this.size()});e(c$,"remove",function(a){var c=this.iterator();if(null!=a)for(;c.hasNext();){if(a.equals(c.next()))return c.remove(),!0}else for(;c.hasNext();)if(null==c.next())return c.remove(),!0;return!1},"~O");e(c$,"removeAll",function(a){for(var c=!1,d=this.iterator();d.hasNext();)a.contains(d.next())&&(d.remove(),c=!0);return c},"java.util.Collection");e(c$,"retainAll",function(a){for(var c=!1,d=this.iterator();d.hasNext();)a.contains(d.next())||
(d.remove(),c=!0);return c},"java.util.Collection");b(c$,"toArray",function(){for(var a=this.size(),c=0,d=this.iterator(),n=Array(a);c<a;)n[c++]=d.next();return n});b(c$,"toArray",function(a){var c=this.size(),d=0;c>a.length&&(a=a.getClass().getComponentType(),a=java.lang.reflect.Array.newInstance(a,c));for(var n,c=this.iterator();c.hasNext()&&((n=c.next())||1);)a[d++]=n;d<a.length&&(a[d]=null);return a},"~A");e(c$,"toString",function(){if(this.isEmpty())return"[]";var a=new StringBuilder(16*this.size());
a.append("[");for(var c=this.iterator();c.hasNext();){var d=c.next();d!==this?a.append(d):a.append("(this Collection)");c.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$=I(function(){this.modCount=0;V("java.util.AbstractList.SimpleListIterator")||java.util.AbstractList.$AbstractList$SimpleListIterator$();V("java.util.AbstractList.FullListIterator")||java.util.AbstractList.$AbstractList$FullListIterator$();H(this,arguments)},java.util,"AbstractList",java.util.AbstractCollection,java.util.List);b(c$,"add",function(){throw new UnsupportedOperationException;},"~N,~O");b(c$,"add",function(a){this.add(this.size(),a);return!0},"~O");b(c$,"addAll",function(a,
c){for(var d=c.iterator();d.hasNext();)this.add(a++,d.next());return!c.isEmpty()},"~N,java.util.Collection");e(c$,"clear",function(){this.removeRange(0,this.size())});e(c$,"equals",function(a){if(this===a)return!0;if(S(a,java.util.List)){if(a.size()!=this.size())return!1;var c=this.iterator();for(a=a.iterator();c.hasNext();){var d=c.next(),n=a.next();if(!(null==d?null==n:d.equals(n)))return!1}return!0}return!1},"~O");e(c$,"hashCode",function(){for(var a=1,c=this.iterator();c.hasNext();)var d=c.next(),
a=31*a+(null==d?0:d.hashCode());return a});e(c$,"indexOf",function(a){var c=this.listIterator();if(null!=a)for(;c.hasNext();){if(a.equals(c.next()))return c.previousIndex()}else for(;c.hasNext();)if(null==c.next())return c.previousIndex();return-1},"~O");e(c$,"iterator",function(){return U(java.util.AbstractList.SimpleListIterator,this,null)});e(c$,"lastIndexOf",function(a){var c=this.listIterator(this.size());if(null!=a)for(;c.hasPrevious();){if(a.equals(c.previous()))return c.nextIndex()}else for(;c.hasPrevious();)if(null==
c.previous())return c.nextIndex();return-1},"~O");b(c$,"listIterator",function(){return this.listIterator(0)});b(c$,"listIterator",function(a){return U(java.util.AbstractList.FullListIterator,this,null,a)},"~N");b(c$,"remove",function(){throw new UnsupportedOperationException;},"~N");b(c$,"removeRange",function(a,c){for(var d=this.listIterator(a),n=a;n<c;n++)d.next(),d.remove()},"~N,~N");e(c$,"set",function(){throw new UnsupportedOperationException;},"~N,~O");e(c$,"subList",function(a,c){if(0<=a&&
c<=this.size()){if(a<=c)return S(this,java.util.RandomAccess)?new java.util.AbstractList.SubAbstractListRandomAccess(this,a,c):new java.util.AbstractList.SubAbstractList(this,a,c);throw new IllegalArgumentException;}throw new IndexOutOfBoundsException;},"~N,~N");c$.$AbstractList$SimpleListIterator$=function(){K();c$=I(function(){da(this,arguments);this.pos=-1;this.expectedModCount=0;this.lastPosition=-1;H(this,arguments)},java.util.AbstractList,"SimpleListIterator",null,java.util.Iterator);C(c$,function(){this.expectedModCount=
this.b$["java.util.AbstractList"].modCount});e(c$,"hasNext",function(){return this.pos+1<this.b$["java.util.AbstractList"].size()});e(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(c){if(S(c,IndexOutOfBoundsException))throw new java.util.NoSuchElementException;throw c;}throw new java.util.ConcurrentModificationException;});e(c$,"remove",function(){if(this.expectedModCount==
this.b$["java.util.AbstractList"].modCount){try{this.b$["java.util.AbstractList"].remove(this.lastPosition)}catch(a){if(S(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$=L()};c$.$AbstractList$FullListIterator$=function(){K();c$=I(function(){da(this,arguments);H(this,
arguments)},java.util.AbstractList,"FullListIterator",java.util.AbstractList.SimpleListIterator,java.util.ListIterator,U(java.util.AbstractList.SimpleListIterator,this,null,Ca));C(c$,function(a){O(this,java.util.AbstractList.FullListIterator);if(0<=a&&a<=this.b$["java.util.AbstractList"].size())this.pos=a-1;else throw new IndexOutOfBoundsException;},"~N");e(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(c){if(S(c,IndexOutOfBoundsException))throw new java.util.NoSuchElementException;throw c;}this.pos++;this.lastPosition=-1;this.b$["java.util.AbstractList"].modCount!=this.expectedModCount&&this.expectedModCount++}else throw new java.util.ConcurrentModificationException;},"~O");e(c$,"hasPrevious",function(){return 0<=this.pos});e(c$,"nextIndex",function(){return this.pos+1});e(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(c){if(S(c,IndexOutOfBoundsException))throw new java.util.NoSuchElementException;throw c;}throw new java.util.ConcurrentModificationException;});e(c$,"previousIndex",function(){return this.pos});e(c$,"set",function(a){if(this.expectedModCount==this.b$["java.util.AbstractList"].modCount)try{this.b$["java.util.AbstractList"].set(this.lastPosition,a)}catch(c){if(S(c,IndexOutOfBoundsException))throw new IllegalStateException;throw c;}else throw new java.util.ConcurrentModificationException;
},"~O");c$=L()};K();c$=E(java.util.AbstractList,"SubAbstractListRandomAccess",java.util.AbstractList.SubAbstractList,java.util.RandomAccess);c$=L();K();c$=I(function(){this.fullList=null;this.$size=this.offset=0;H(this,arguments)},java.util.AbstractList,"SubAbstractList",java.util.AbstractList);C(c$,function(a,c,d){O(this,java.util.AbstractList.SubAbstractList);this.fullList=a;this.modCount=this.fullList.modCount;this.offset=c;this.$size=d-c},"java.util.AbstractList,~N,~N");b(c$,"add",function(a,
c){if(this.modCount==this.fullList.modCount)if(0<=a&&a<=this.$size)this.fullList.add(a+this.offset,c),this.$size++,this.modCount=this.fullList.modCount;else throw new IndexOutOfBoundsException;else throw new java.util.ConcurrentModificationException;},"~N,~O");b(c$,"addAll",function(a,c){if(this.modCount==this.fullList.modCount){if(0<=a&&a<=this.$size){var d=this.fullList.addAll(a+this.offset,c);d&&(this.$size+=c.size(),this.modCount=this.fullList.modCount);return d}throw new IndexOutOfBoundsException;
}throw new java.util.ConcurrentModificationException;},"~N,java.util.Collection");b(c$,"addAll",function(a){if(this.modCount==this.fullList.modCount){var c=this.fullList.addAll(this.offset+this.$size,a);c&&(this.$size+=a.size(),this.modCount=this.fullList.modCount);return c}throw new java.util.ConcurrentModificationException;},"java.util.Collection");b(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");e(c$,"iterator",function(){return this.listIterator(0)});b(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");b(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");b(c$,"removeRange",function(a,c){if(a!=c)if(this.modCount==this.fullList.modCount)this.fullList.removeRange(a+this.offset,c+this.offset),this.$size-=c-a,this.modCount=this.fullList.modCount;else throw new java.util.ConcurrentModificationException;},"~N,~N");b(c$,
"set",function(a,c){if(this.modCount==this.fullList.modCount){if(0<=a&&a<this.$size)return this.fullList.set(a+this.offset,c);throw new IndexOutOfBoundsException;}throw new java.util.ConcurrentModificationException;},"~N,~O");e(c$,"size",function(){return this.$size});b(c$,"sizeChanged",function(a){a?this.$size++:this.$size--;this.modCount=this.fullList.modCount},"~B");K();c$=I(function(){this.iterator=this.subList=null;this.end=this.start=0;H(this,arguments)},java.util.AbstractList.SubAbstractList,
"SubAbstractListIterator",null,java.util.ListIterator);C(c$,function(a,c,d,n){this.iterator=a;this.subList=c;this.start=d;this.end=this.start+n},"java.util.ListIterator,java.util.AbstractList.SubAbstractList,~N,~N");b(c$,"add",function(a){this.iterator.add(a);this.subList.sizeChanged(!0);this.end++},"~O");e(c$,"hasNext",function(){return this.iterator.nextIndex()<this.end});e(c$,"hasPrevious",function(){return this.iterator.previousIndex()>=this.start});b(c$,"next",function(){if(this.iterator.nextIndex()<
this.end)return this.iterator.next();throw new java.util.NoSuchElementException;});b(c$,"nextIndex",function(){return this.iterator.nextIndex()-this.start});b(c$,"previous",function(){if(this.iterator.previousIndex()>=this.start)return this.iterator.previous();throw new java.util.NoSuchElementException;});b(c$,"previousIndex",function(){var a=this.iterator.previousIndex();return a>=this.start?a-this.start:-1});b(c$,"remove",function(){this.iterator.remove();this.subList.sizeChanged(!1);this.end--});
b(c$,"set",function(a){this.iterator.set(a)},"~O");c$=L();c$=L()});W(["java.util.Map"],"java.util.AbstractMap",["java.lang.StringBuilder","$.UnsupportedOperationException","java.util.AbstractCollection","$.AbstractSet","$.Iterator"],function(){c$=I(function(){this.valuesCollection=this.$keySet=null;H(this,arguments)},java.util,"AbstractMap",null,java.util.Map);C(c$,function(){});e(c$,"clear",function(){this.entrySet().clear()});e(c$,"containsKey",function(a){var c=this.entrySet().iterator();if(null!=
a)for(;c.hasNext();){if(a.equals(c.next().getKey()))return!0}else for(;c.hasNext();)if(null==c.next().getKey())return!0;return!1},"~O");e(c$,"containsValue",function(a){var c=this.entrySet().iterator();if(null!=a)for(;c.hasNext();){if(a.equals(c.next().getValue()))return!0}else for(;c.hasNext();)if(null==c.next().getValue())return!0;return!1},"~O");e(c$,"equals",function(a){if(this===a)return!0;if(S(a,java.util.Map)){if(this.size()!=a.size())return!1;a=a.entrySet();for(var c=this.entrySet().iterator();c.hasNext();)if(!a.contains(c.next()))return!1;
return!0}return!1},"~O");e(c$,"get",function(a){var c=this.entrySet().iterator();if(null!=a)for(;c.hasNext();){var d=c.next();if(a.equals(d.getKey()))return d.getValue()}else for(;c.hasNext();)if(d=c.next(),null==d.getKey())return d.getValue();return null},"~O");e(c$,"hashCode",function(){for(var a=0,c=this.entrySet().iterator();c.hasNext();)a+=c.next().hashCode();return a});e(c$,"isEmpty",function(){return 0==this.size()});e(c$,"keySet",function(){null==this.$keySet&&(this.$keySet=(V("java.util.AbstractMap$1")?
0:java.util.AbstractMap.$AbstractMap$1$(),U(java.util.AbstractMap$1,this,null)));return this.$keySet});e(c$,"put",function(){throw new UnsupportedOperationException;},"~O,~O");e(c$,"putAll",function(a){var c;for(a=a.entrySet().iterator();a.hasNext()&&((c=a.next())||1);)this.put(c.getKey(),c.getValue())},"java.util.Map");e(c$,"remove",function(a){var c=this.entrySet().iterator();if(null!=a)for(;c.hasNext();){var d=c.next();if(a.equals(d.getKey()))return c.remove(),d.getValue()}else for(;c.hasNext();)if(d=
c.next(),null==d.getKey())return c.remove(),d.getValue();return null},"~O");e(c$,"size",function(){return this.entrySet().size()});e(c$,"toString",function(){if(this.isEmpty())return"{}";var a=new StringBuilder(28*this.size());a.append("{");for(var c=this.entrySet().iterator();c.hasNext();){var d=c.next(),n=d.getKey();n!==this?a.append(n):a.append("(this Map)");a.append("=");d=d.getValue();d!==this?a.append(d):a.append("(this Map)");c.hasNext()&&a.append(", ")}a.append("}");return a.toString()});
e(c$,"values",function(){null==this.valuesCollection&&(this.valuesCollection=(V("java.util.AbstractMap$2")?0:java.util.AbstractMap.$AbstractMap$2$(),U(java.util.AbstractMap$2,this,null)));return this.valuesCollection});b(c$,"clone",function(){var a=ja(this,java.util.AbstractMap,"clone",[]);a.$keySet=null;a.valuesCollection=null;return a});c$.$AbstractMap$1$=function(){K();c$=ca(java.util,"AbstractMap$1",java.util.AbstractSet);e(c$,"contains",function(a){return this.b$["java.util.AbstractMap"].containsKey(a)},
"~O");e(c$,"size",function(){return this.b$["java.util.AbstractMap"].size()});e(c$,"iterator",function(){return V("java.util.AbstractMap$1$1")?0:java.util.AbstractMap.$AbstractMap$1$1$(),U(java.util.AbstractMap$1$1,this,null)});c$=L()};c$.$AbstractMap$1$1$=function(){K();c$=I(function(){da(this,arguments);this.setIterator=null;H(this,arguments)},java.util,"AbstractMap$1$1",null,java.util.Iterator);qa(c$,function(){this.setIterator=this.b$["java.util.AbstractMap"].entrySet().iterator()});e(c$,"hasNext",
function(){return this.setIterator.hasNext()});e(c$,"next",function(){return this.setIterator.next().getKey()});e(c$,"remove",function(){this.setIterator.remove()});c$=L()};c$.$AbstractMap$2$=function(){K();c$=ca(java.util,"AbstractMap$2",java.util.AbstractCollection);e(c$,"size",function(){return this.b$["java.util.AbstractMap"].size()});e(c$,"contains",function(a){return this.b$["java.util.AbstractMap"].containsValue(a)},"~O");e(c$,"iterator",function(){return V("java.util.AbstractMap$2$1")?0:java.util.AbstractMap.$AbstractMap$2$1$(),
U(java.util.AbstractMap$2$1,this,null)});c$=L()};c$.$AbstractMap$2$1$=function(){K();c$=I(function(){da(this,arguments);this.setIterator=null;H(this,arguments)},java.util,"AbstractMap$2$1",null,java.util.Iterator);qa(c$,function(){this.setIterator=this.b$["java.util.AbstractMap"].entrySet().iterator()});e(c$,"hasNext",function(){return this.setIterator.hasNext()});e(c$,"next",function(){return this.setIterator.next().getValue()});e(c$,"remove",function(){this.setIterator.remove()});c$=L()}});W(["java.util.AbstractCollection",
"$.Set"],"java.util.AbstractSet",null,function(){c$=E(java.util,"AbstractSet",java.util.AbstractCollection,java.util.Set);e(c$,"equals",function(a){return this===a?!0:S(a,java.util.Set)?this.size()==a.size()&&this.containsAll(a):!1},"~O");e(c$,"hashCode",function(){for(var a=0,c=this.iterator();c.hasNext();)var d=c.next(),a=a+(null==d?0:d.hashCode());return a});e(c$,"removeAll",function(a){var c=!1;if(this.size()<=a.size())for(var d=this.iterator();d.hasNext();)a.contains(d.next())&&(d.remove(),c=
!0);else for(d=a.iterator();d.hasNext();)c=this.remove(d.next())||c;return c},"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$=I(function(){this.lastIndex=this.firstIndex=0;this.array=null;H(this,arguments)},java.util,"ArrayList",java.util.AbstractList,[java.util.List,Cloneable,java.io.Serializable,java.util.RandomAccess]);
oa(c$,function(){this.setup(0)});b(c$,"setup",function(a){O(this,java.util.ArrayList,[]);this.firstIndex=this.lastIndex=0;try{this.array=this.newElementArray(a)}catch(c){if(S(c,NegativeArraySizeException))throw new IllegalArgumentException;throw c;}},"~N");b(c$,"newElementArray",($fz=function(a){return Array(a)},$fz.isPrivate=!0,$fz),"~N");e(c$,"add",function(a,c){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 n=a+this.firstIndex;System.arraycopy(this.array,n,this.array,n+1,d-a);this.lastIndex++}this.array[a+this.firstIndex]=c}else if(0==a)0==this.firstIndex&&this.growAtFront(1),this.array[--this.firstIndex]=c;else if(a==d)this.lastIndex==this.array.length&&this.growAtEnd(1),this.array[this.lastIndex++]=c;else throw new IndexOutOfBoundsException;
this.modCount++},"~N,~O");e(c$,"add1",function(a){this.lastIndex==this.array.length&&this.growAtEnd(1);this.array[this.lastIndex++]=a;this.modCount++;return!0},"~O");e(c$,"addAll",function(a){var c=a.size();if(0<c){this.lastIndex>this.array.length-c&&this.growAtEnd(c);a=a.iterator();for(c=this.lastIndex+c;this.lastIndex<c;)this.array[this.lastIndex++]=a.next();this.modCount++;return!0}return!1},"java.util.Collection");e(c$,"clear",function(){this.firstIndex!=this.lastIndex&&(this.fill(this.firstIndex,
this.lastIndex),this.firstIndex=this.lastIndex=0,this.modCount++)});b(c$,"fill",function(a,c){for(var d=c;--d>=a;)this.array[d]=null},"~N,~N");b(c$,"clone",function(){try{var a=ja(this,java.util.ArrayList,"clone",[]);a.array=this.array.clone();return a}catch(c){if(S(c,CloneNotSupportedException))return null;throw c;}});e(c$,"contains",function(a){if(null!=a)for(var c=this.firstIndex;c<this.lastIndex;c++){if(a.equals(this.array[c]))return!0}else for(c=this.firstIndex;c<this.lastIndex;c++)if(null==
this.array[c])return!0;return!1},"~O");b(c$,"ensureCapacity",function(a){this.array.length<a&&(0<this.firstIndex?this.growAtFront(a-this.array.length):this.growAtEnd(a-this.array.length))},"~N");e(c$,"get",function(a){if(0<=a&&a<this.size())return this.array[this.firstIndex+a];throw new IndexOutOfBoundsException;},"~N");b(c$,"growAtEnd",($fz=function(a){var c=this.size();if(this.firstIndex>=a-(this.array.length-this.lastIndex))a=this.lastIndex-this.firstIndex,0<c&&(System.arraycopy(this.array,this.firstIndex,
this.array,0,c),this.fill(a<this.firstIndex?this.firstIndex:a,this.array.length)),this.firstIndex=0,this.lastIndex=a;else{var d=Math.floor(c/2);a>d&&(d=a);12>d&&(d=12);a=this.newElementArray(c+d);0<c&&System.arraycopy(this.array,this.firstIndex,a,this.firstIndex,c);this.array=a}},$fz.isPrivate=!0,$fz),"~N");b(c$,"growAtFront",($fz=function(a){var c=this.size();if(this.array.length-this.lastIndex>=a)a=this.array.length-c,0<c&&(System.arraycopy(this.array,this.firstIndex,this.array,a,c),this.fill(this.firstIndex,
this.firstIndex+c>a?a:this.firstIndex+c)),this.firstIndex=a,this.lastIndex=this.array.length;else{var d=Math.floor(c/2);a>d&&(d=a);12>d&&(d=12);a=this.newElementArray(c+d);0<c&&System.arraycopy(this.array,this.firstIndex,a,a.length-c,c);this.firstIndex=a.length-c;this.lastIndex=a.length;this.array=a}},$fz.isPrivate=!0,$fz),"~N");b(c$,"growForInsert",($fz=function(a,c){var d=this.size(),n=Math.floor(d/2);c>n&&(n=c);12>n&&(n=12);var b=this.newElementArray(d+n);if(a<Math.floor(d/2)){var g=b.length-(d+
c);System.arraycopy(this.array,a,b,a+n,d-a);System.arraycopy(this.array,this.firstIndex,b,g,a);this.firstIndex=g;this.lastIndex=b.length}else System.arraycopy(this.array,this.firstIndex,b,0,a),System.arraycopy(this.array,a,b,a+c,d-a),this.firstIndex=0,this.lastIndex+=c;this.array=b},$fz.isPrivate=!0,$fz),"~N,~N");e(c$,"indexOf",function(a){if(null!=a)for(var c=this.firstIndex;c<this.lastIndex;c++){if(a.equals(this.array[c]))return c-this.firstIndex}else for(c=this.firstIndex;c<this.lastIndex;c++)if(null==
this.array[c])return c-this.firstIndex;return-1},"~O");e(c$,"isEmpty",function(){return this.lastIndex==this.firstIndex});e(c$,"lastIndexOf",function(a){if(null!=a)for(var c=this.lastIndex-1;c>=this.firstIndex;c--){if(a.equals(this.array[c]))return c-this.firstIndex}else for(c=this.lastIndex-1;c>=this.firstIndex;c--)if(null==this.array[c])return c-this.firstIndex;return-1},"~O");e(c$,"remove",function(a){var c,d=this.size();if(0<=a&&a<d)if(a==d-1)c=this.array[--this.lastIndex],this.array[this.lastIndex]=
null;else if(0==a)c=this.array[this.firstIndex],this.array[this.firstIndex++]=null;else{var n=this.firstIndex+a;c=this.array[n];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,n+1,this.array,n,d-a-1),this.array[--this.lastIndex]=null)}else throw new IndexOutOfBoundsException;this.modCount++;return c},"~N");b(c$,"removeObject",function(a){a=this.indexOf(a);return 0>a?null:this.remove(a)},
"~O");e(c$,"removeRange",function(a,c){if(0<=a&&a<=c&&c<=this.size()){if(a!=c){var d=this.size();c==d?(this.fill(this.firstIndex+a,this.lastIndex),this.lastIndex=this.firstIndex+a):0==a?(this.fill(this.firstIndex,this.firstIndex+c),this.firstIndex+=c):(System.arraycopy(this.array,this.firstIndex+c,this.array,this.firstIndex+a,d-c),d=this.lastIndex+a-c,this.fill(d,this.lastIndex),this.lastIndex=d);this.modCount++}}else throw new IndexOutOfBoundsException;},"~N,~N");e(c$,"set",function(a,c){if(0<=a&&
a<this.size()){var d=this.array[this.firstIndex+a];this.array[this.firstIndex+a]=c;return d}throw new IndexOutOfBoundsException;},"~N,~O");e(c$,"size",function(){return this.lastIndex-this.firstIndex});e(c$,"toArray",function(a){var c=this.size();if(!a||c>a.length)a=Array(c);System.arraycopy(this.array,this.firstIndex,a,0,c);c<a.length&&(a[c]=null);return a},"~O");b(c$,"trimToSize",function(){var a=this.size(),c=this.newElementArray(a);System.arraycopy(this.array,this.firstIndex,c,0,a);this.array=
c;this.firstIndex=0;this.lastIndex=this.array.length})});W(["java.util.AbstractList","$.RandomAccess"],"java.util.Arrays",["java.lang.ArrayIndexOutOfBoundsException","$.IllegalArgumentException","$.NullPointerException"],function(){c$=E(java.util,"Arrays");c$.sort=e(c$,"sort",function(a,c,d,n){switch(arguments.length){case 1:for(var b=a.sort(function(a,c){return"string"==typeof a||a instanceof Comparable?a.compareTo(c):a-c}),g=0;g<a.length;g++)a[g]=b[g];break;case 2:b=a.sort(function(a,d){return null!=
c?c.compare(a,d):"string"==typeof a||a instanceof Comparable?a.compareTo(d):a-d});for(g=0;g<a.length;g++)a[g]=b[g];break;case 3:var h=c,l=d;this.rangeCheck(a.length,h,l);b=[];for(g=h;g<l;g++)b[g-h]=a[g];b=b.sort(function(a,c){return"string"==typeof a||a instanceof Comparable?a.compareTo(c):a-c});for(g=h;g<l;g++)a[g]=b[g-h];break;case 4:h=c;l=d;c=n;this.rangeCheck(a.length,h,l);b=[];for(g=h;g<l;g++)b[g-h]=a[g];b=b.sort(function(a,d){return null!=c?c.compare(a,d):"string"==typeof a||a instanceof Comparable?
a.compareTo(d):a-d});for(g=h;g<l;g++)a[g]=b[g-h]}});c$.rangeCheck=b(c$,"rangeCheck",($fz=function(a,c,d){if(c>d)throw new IllegalArgumentException("fromIndex("+c+") > toIndex("+d+")");if(0>c)throw new ArrayIndexOutOfBoundsException(c);if(d>a)throw new ArrayIndexOutOfBoundsException(d);},$fz.isPrivate=!0,$fz),"~N,~N,~N");c$.binarySearch=b(c$,"binarySearch",function(a,c){for(var d=0,n=a.length-1;d<=n;){var b=d+n>>1,g=a[b];if(g<c)d=b+1;else if(g>c)n=b-1;else return b}return-(d+1)},"~A,~N");c$.binarySearch=
b(c$,"binarySearch",function(a,c){for(var d=0,n=a.length-1;d<=n;){var b=d+n>>1,g=a[b].compareTo(c);if(0>g)d=b+1;else if(0<g)n=b-1;else return b}return-(d+1)},"~A,~O");c$.binarySearch=b(c$,"binarySearch",function(a,c,d){if(null==d)return java.util.Arrays.binarySearch(a,c);for(var n=0,b=a.length-1;n<=b;){var g=n+b>>1,h=d.compare(a[g],c);if(0>h)n=g+1;else if(0<h)b=g-1;else return g}return-(n+1)},"~A,~O,java.util.Comparator");c$.equals=b(c$,"equals",function(a,c){if(a===c)return!0;if(null==a||null==c)return!1;
var d=a.length;if(c.length!=d)return!1;for(var n=0;n<d;n++){var b=a[n],g=c[n];if(!(null==b?null==g:null==b.equals?b==g:b.equals(g)))return!1}return!0},"~A,~A");c$.fill=e(c$,"fill",function(a,c,d,n){2==arguments.length&&(n=c,c=0,d=a.length);java.util.Arrays.rangeCheck(a.length,c,d);for(var b=c;b<d;b++)a[b]=n});c$.asList=b(c$,"asList",function(a){return new java.util.Arrays.ArrayList(a)},"~A");K();c$=I(function(){this.a=null;H(this,arguments)},java.util.Arrays,"ArrayList",java.util.AbstractList,[java.util.RandomAccess,
java.io.Serializable]);C(c$,function(a){O(this,java.util.Arrays.ArrayList,[]);if(null==a)throw new NullPointerException;this.a=a},"~A");e(c$,"size",function(){return this.a.length});b(c$,"toArray",function(){return this.a.clone()});e(c$,"get",function(a){return this.a[a]},"~N");e(c$,"set",function(a,c){var d=this.a[a];this.a[a]=c;return d},"~N,~O");e(c$,"indexOf",function(a){if(null==a)for(var c=0;c<this.a.length;c++){if(null==this.a[c])return c}else for(c=0;c<this.a.length;c++)if(a.equals(this.a[c]))return c;
return-1},"~O");e(c$,"contains",function(a){return-1!=this.indexOf(a)},"~O");c$=L();ha(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$=E(java.util,"Collections");c$.binarySearch=b(c$,"binarySearch",function(a,c){if(null==a)throw new NullPointerException;if(a.isEmpty())return-1;if(!S(a,java.util.RandomAccess)){for(var d=a.listIterator();d.hasNext();){var n;if(0>=(n=c.compareTo(d.next())))return 0==n?d.previousIndex():-d.previousIndex()-1}return-a.size()-1}var d=0,b=a.size(),g=b-1;for(n=-1;d<=g;)if(b=d+g>>1,0<(n=c.compareTo(a.get(b))))d=b+1;else{if(0==n)return b;g=b-1}return-b-(0>n?1:2)},"java.util.List,~O");c$.binarySearch=
b(c$,"binarySearch",function(a,c,d){if(null==d)return java.util.Collections.binarySearch(a,c);if(!S(a,java.util.RandomAccess)){for(var n=a.listIterator();n.hasNext();){var b;if(0>=(b=d.compare(c,n.next())))return 0==b?n.previousIndex():-n.previousIndex()-1}return-a.size()-1}var n=0,g=a.size(),h=g-1;for(b=-1;n<=h;)if(g=n+h>>1,0<(b=d.compare(c,a.get(g))))n=g+1;else{if(0==b)return g;h=g-1}return-g-(0>b?1:2)},"java.util.List,~O,java.util.Comparator");c$.copy=b(c$,"copy",function(a,c){if(a.size()<c.size())throw new ArrayIndexOutOfBoundsException;
for(var d=c.iterator(),b=a.listIterator();d.hasNext();){try{b.next()}catch(f){if(S(f,java.util.NoSuchElementException))throw new ArrayIndexOutOfBoundsException;throw f;}b.set(d.next())}},"java.util.List,java.util.List");c$.enumeration=b(c$,"enumeration",function(a){V("java.util.Collections$1")||java.util.Collections.$Collections$1$(a);return U(java.util.Collections$1,this,null)},"java.util.Collection");c$.fill=b(c$,"fill",function(a,c){for(var d=a.listIterator();d.hasNext();)d.next(),d.set(c)},"java.util.List,~O");
c$.max=b(c$,"max",function(a){a=a.iterator();for(var c=a.next();a.hasNext();){var d=a.next();0>c.compareTo(d)&&(c=d)}return c},"java.util.Collection");c$.max=b(c$,"max",function(a,c){for(var d=a.iterator(),b=d.next();d.hasNext();){var f=d.next();0>c.compare(b,f)&&(b=f)}return b},"java.util.Collection,java.util.Comparator");c$.min=b(c$,"min",function(a){a=a.iterator();for(var c=a.next();a.hasNext();){var d=a.next();0<c.compareTo(d)&&(c=d)}return c},"java.util.Collection");c$.min=b(c$,"min",function(a,
c){for(var d=a.iterator(),b=d.next();d.hasNext();){var f=d.next();0<c.compare(b,f)&&(b=f)}return b},"java.util.Collection,java.util.Comparator");c$.nCopies=b(c$,"nCopies",function(a,c){return new java.util.Collections.CopiesList(a,c)},"~N,~O");c$.reverse=b(c$,"reverse",function(a){var c=a.size(),d=a.listIterator();a=a.listIterator(c);for(var b=0;b<Math.floor(c/2);b++){var f=d.next(),g=a.previous();d.set(g);a.set(f)}},"java.util.List");c$.reverseOrder=b(c$,"reverseOrder",function(){return new java.util.Collections.ReverseComparator});
c$.reverseOrder=b(c$,"reverseOrder",function(a){return null==a?java.util.Collections.reverseOrder():new java.util.Collections.ReverseComparatorWithComparator(a)},"java.util.Comparator");c$.shuffle=b(c$,"shuffle",function(a){java.util.Collections.shuffle(a,new java.util.Random)},"java.util.List");c$.shuffle=b(c$,"shuffle",function(a,c){if(S(a,java.util.RandomAccess))for(b=a.size()-1;0<b;b--)f=c.nextInt()%(b+1),0>f&&(f=-f),a.set(f,a.set(b,a.get(f)));else{for(var d=a.toArray(),b=d.length-1;0<b;b--){var f=
c.nextInt()%(b+1);0>f&&(f=-f);var g=d[b];d[b]=d[f];d[f]=g}b=0;for(f=a.listIterator();f.hasNext();)f.next(),f.set(d[b++])}},"java.util.List,java.util.Random");c$.singleton=b(c$,"singleton",function(a){return new java.util.Collections.SingletonSet(a)},"~O");c$.singletonList=b(c$,"singletonList",function(a){return new java.util.Collections.SingletonList(a)},"~O");c$.singletonMap=b(c$,"singletonMap",function(a,c){return new java.util.Collections.SingletonMap(a,c)},"~O,~O");c$.sort=b(c$,"sort",function(a){var c=
a.toArray();java.util.Arrays.sort(c);var d=0;for(a=a.listIterator();a.hasNext();)a.next(),a.set(c[d++])},"java.util.List");c$.sort=b(c$,"sort",function(a,c){var d=a.toArray(Array(a.size()));java.util.Arrays.sort(d,c);for(var b=0,f=a.listIterator();f.hasNext();)f.next(),f.set(d[b++])},"java.util.List,java.util.Comparator");c$.swap=b(c$,"swap",function(a,c,d){if(null==a)throw new NullPointerException;c!=d&&a.set(d,a.set(c,a.get(d)))},"java.util.List,~N,~N");c$.replaceAll=b(c$,"replaceAll",function(a,
c,d){for(var b,f=!1;-1<(b=a.indexOf(c));)f=!0,a.set(b,d);return f},"java.util.List,~O,~O");c$.rotate=b(c$,"rotate",function(a,c){var d=a.size();if(0!=d){var b;b=0<c?c%d:d- -1*(c%d);if(!(0==b||b==d))if(S(a,java.util.RandomAccess))for(var f=a.get(0),g=0,h=0,l=0;l<d;l++)g=(g+b)%d,f=a.set(g,f),g==h&&(g=++h,f=a.get(h));else f=(d-b)%d,b=a.subList(0,f),d=a.subList(f,d),java.util.Collections.reverse(b),java.util.Collections.reverse(d),java.util.Collections.reverse(a)}},"java.util.List,~N");c$.indexOfSubList=
b(c$,"indexOfSubList",function(a,c){var d=a.size(),b=c.size();if(b>d)return-1;if(0==b)return 0;var f=c.get(0),g=a.indexOf(f);if(-1==g)return-1;for(;g<d&&d-g>=b;){var h=a.listIterator(g);if(null==f?null==h.next():f.equals(h.next())){for(var l=c.listIterator(1),e=!1;l.hasNext();){var k=l.next();if(!h.hasNext())return-1;if(null==k?null!=h.next():!k.equals(h.next())){e=!0;break}}if(!e)return g}g++}return-1},"java.util.List,java.util.List");c$.lastIndexOfSubList=b(c$,"lastIndexOfSubList",function(a,c){var d=
c.size(),b=a.size();if(d>b)return-1;if(0==d)return b;for(var b=c.get(d-1),f=a.lastIndexOf(b);-1<f&&f+1>=d;){var g=a.listIterator(f+1);if(null==b?null==g.previous():b.equals(g.previous())){for(var h=c.listIterator(d-1),l=!1;h.hasPrevious();){var e=h.previous();if(!g.hasPrevious())return-1;if(null==e?null!=g.previous():!e.equals(g.previous())){l=!0;break}}if(!l)return g.nextIndex()}f--}return-1},"java.util.List,java.util.List");c$.list=b(c$,"list",function(a){for(var c=new java.util.ArrayList;a.hasMoreElements();)c.add(a.nextElement());
return c},"java.util.Enumeration");c$.synchronizedCollection=b(c$,"synchronizedCollection",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedCollection(a)},"java.util.Collection");c$.synchronizedList=b(c$,"synchronizedList",function(a){if(null==a)throw new NullPointerException;return S(a,java.util.RandomAccess)?new java.util.Collections.SynchronizedRandomAccessList(a):new java.util.Collections.SynchronizedList(a)},"java.util.List");c$.synchronizedMap=
b(c$,"synchronizedMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedMap(a)},"java.util.Map");c$.synchronizedSet=b(c$,"synchronizedSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedSet(a)},"java.util.Set");c$.synchronizedSortedMap=b(c$,"synchronizedSortedMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedSortedMap(a)},"java.util.SortedMap");
c$.synchronizedSortedSet=b(c$,"synchronizedSortedSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedSortedSet(a)},"java.util.SortedSet");c$.unmodifiableCollection=b(c$,"unmodifiableCollection",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableCollection(a)},"java.util.Collection");c$.unmodifiableList=b(c$,"unmodifiableList",function(a){if(null==a)throw new NullPointerException;return S(a,java.util.RandomAccess)?
new java.util.Collections.UnmodifiableRandomAccessList(a):new java.util.Collections.UnmodifiableList(a)},"java.util.List");c$.unmodifiableMap=b(c$,"unmodifiableMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableMap(a)},"java.util.Map");c$.unmodifiableSet=b(c$,"unmodifiableSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableSet(a)},"java.util.Set");c$.unmodifiableSortedMap=b(c$,"unmodifiableSortedMap",
function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableSortedMap(a)},"java.util.SortedMap");c$.unmodifiableSortedSet=b(c$,"unmodifiableSortedSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableSortedSet(a)},"java.util.SortedSet");c$.frequency=b(c$,"frequency",function(a,c){if(null==a)throw new NullPointerException;if(a.isEmpty())return 0;for(var d=0,b=a.iterator();b.hasNext();){var f=b.next();(null==c?
null==f:c.equals(f))&&d++}return d},"java.util.Collection,~O");c$.emptyList=b(c$,"emptyList",function(){return java.util.Collections.EMPTY_LIST});c$.emptySet=b(c$,"emptySet",function(){return java.util.Collections.EMPTY_SET});c$.emptyMap=b(c$,"emptyMap",function(){return java.util.Collections.EMPTY_MAP});c$.checkedCollection=b(c$,"checkedCollection",function(a,c){return new java.util.Collections.CheckedCollection(a,c)},"java.util.Collection,Class");c$.checkedMap=b(c$,"checkedMap",function(a,c,d){return new java.util.Collections.CheckedMap(a,
c,d)},"java.util.Map,Class,Class");c$.checkedList=b(c$,"checkedList",function(a,c){return S(a,java.util.RandomAccess)?new java.util.Collections.CheckedRandomAccessList(a,c):new java.util.Collections.CheckedList(a,c)},"java.util.List,Class");c$.checkedSet=b(c$,"checkedSet",function(a,c){return new java.util.Collections.CheckedSet(a,c)},"java.util.Set,Class");c$.checkedSortedMap=b(c$,"checkedSortedMap",function(a,c,d){return new java.util.Collections.CheckedSortedMap(a,c,d)},"java.util.SortedMap,Class,Class");
c$.checkedSortedSet=b(c$,"checkedSortedSet",function(a,c){return new java.util.Collections.CheckedSortedSet(a,c)},"java.util.SortedSet,Class");c$.addAll=b(c$,"addAll",function(a,c){for(var d=!1,b=0;b<c.length;b++)d=(new Boolean(d|a.add(c[b]))).valueOf();return d},"java.util.Collection,~A");c$.disjoint=b(c$,"disjoint",function(a,c){if(S(a,java.util.Set)&&!S(c,java.util.Set)||c.size()>a.size()){var d=a;a=c;c=d}for(d=a.iterator();d.hasNext();)if(c.contains(d.next()))return!1;return!0},"java.util.Collection,java.util.Collection");
c$.checkType=b(c$,"checkType",function(a,c){if(!c.isInstance(a))throw new ClassCastException("Attempt to insert "+a.getClass()+" element into collection with element type "+c);return a},"~O,Class");c$.$Collections$1$=function(a){K();c$=I(function(){da(this,arguments);this.it=null;H(this,arguments)},java.util,"Collections$1",null,java.util.Enumeration);qa(c$,function(){this.it=a.iterator()});b(c$,"hasMoreElements",function(){return this.it.hasNext()});b(c$,"nextElement",function(){return this.it.next()});
c$=L()};K();c$=I(function(){this.n=0;this.element=null;H(this,arguments)},java.util.Collections,"CopiesList",java.util.AbstractList,java.io.Serializable);C(c$,function(a,c){O(this,java.util.Collections.CopiesList,[]);if(0>a)throw new IllegalArgumentException;this.n=a;this.element=c},"~N,~O");e(c$,"contains",function(a){return null==this.element?null==a:this.element.equals(a)},"~O");e(c$,"size",function(){return this.n});e(c$,"get",function(a){if(0<=a&&a<this.n)return this.element;throw new IndexOutOfBoundsException;
},"~N");c$=L();K();c$=E(java.util.Collections,"EmptyList",java.util.AbstractList,java.io.Serializable);e(c$,"contains",function(){return!1},"~O");e(c$,"size",function(){return 0});e(c$,"get",function(){throw new IndexOutOfBoundsException;},"~N");c$=L();K();c$=E(java.util.Collections,"EmptySet",java.util.AbstractSet,java.io.Serializable);e(c$,"contains",function(){return!1},"~O");e(c$,"size",function(){return 0});e(c$,"iterator",function(){return V("java.util.Collections$EmptySet$1")?0:java.util.Collections.EmptySet.$Collections$EmptySet$1$(),
U(java.util.Collections$EmptySet$1,this,null)});c$.$Collections$EmptySet$1$=function(){K();c$=ca(java.util,"Collections$EmptySet$1",null,java.util.Iterator);e(c$,"hasNext",function(){return!1});e(c$,"next",function(){throw new java.util.NoSuchElementException;});e(c$,"remove",function(){throw new UnsupportedOperationException;});c$=L()};c$=L();K();c$=E(java.util.Collections,"EmptyMap",java.util.AbstractMap,java.io.Serializable);e(c$,"containsKey",function(){return!1},"~O");e(c$,"containsValue",function(){return!1},
"~O");e(c$,"entrySet",function(){return java.util.Collections.EMPTY_SET});e(c$,"get",function(){return null},"~O");e(c$,"keySet",function(){return java.util.Collections.EMPTY_SET});e(c$,"values",function(){return java.util.Collections.EMPTY_LIST});c$=L();K();c$=E(java.util.Collections,"ReverseComparator",null,[java.util.Comparator,java.io.Serializable]);e(c$,"compare",function(a,c){return c.compareTo(a)},"~O,~O");c$=L();K();c$=I(function(){this.comparator=null;H(this,arguments)},java.util.Collections,
"ReverseComparatorWithComparator",null,[java.util.Comparator,java.io.Serializable]);C(c$,function(a){this.comparator=a},"java.util.Comparator");b(c$,"compare",function(a,c){return this.comparator.compare(c,a)},"~O,~O");c$=L();K();c$=I(function(){this.element=null;H(this,arguments)},java.util.Collections,"SingletonSet",java.util.AbstractSet,java.io.Serializable);C(c$,function(a){O(this,java.util.Collections.SingletonSet,[]);this.element=a},"~O");e(c$,"contains",function(a){return null==this.element?
null==a:this.element.equals(a)},"~O");e(c$,"size",function(){return 1});e(c$,"iterator",function(){return V("java.util.Collections$SingletonSet$1")?0:java.util.Collections.SingletonSet.$Collections$SingletonSet$1$(),U(java.util.Collections$SingletonSet$1,this,null)});c$.$Collections$SingletonSet$1$=function(){K();c$=I(function(){da(this,arguments);this.$hasNext=!0;H(this,arguments)},java.util,"Collections$SingletonSet$1",null,java.util.Iterator);e(c$,"hasNext",function(){return this.$hasNext});e(c$,
"next",function(){if(this.$hasNext)return this.$hasNext=!1,this.b$["java.util.Collections.SingletonSet"].element;throw new java.util.NoSuchElementException;});e(c$,"remove",function(){throw new UnsupportedOperationException;});c$=L()};c$=L();K();c$=I(function(){this.element=null;H(this,arguments)},java.util.Collections,"SingletonList",java.util.AbstractList,java.io.Serializable);C(c$,function(a){O(this,java.util.Collections.SingletonList,[]);this.element=a},"~O");e(c$,"contains",function(a){return null==
this.element?null==a:this.element.equals(a)},"~O");e(c$,"get",function(a){if(0==a)return this.element;throw new IndexOutOfBoundsException;},"~N");e(c$,"size",function(){return 1});c$=L();K();c$=I(function(){this.v=this.k=null;H(this,arguments)},java.util.Collections,"SingletonMap",java.util.AbstractMap,java.io.Serializable);C(c$,function(a,c){O(this,java.util.Collections.SingletonMap,[]);this.k=a;this.v=c},"~O,~O");e(c$,"containsKey",function(a){return null==this.k?null==a:this.k.equals(a)},"~O");
e(c$,"containsValue",function(a){return null==this.v?null==a:this.v.equals(a)},"~O");e(c$,"get",function(a){return this.containsKey(a)?this.v:null},"~O");e(c$,"size",function(){return 1});e(c$,"entrySet",function(){return V("java.util.Collections$SingletonMap$1")?0:java.util.Collections.SingletonMap.$Collections$SingletonMap$1$(),U(java.util.Collections$SingletonMap$1,this,null)});c$.$Collections$SingletonMap$1$=function(){K();c$=ca(java.util,"Collections$SingletonMap$1",java.util.AbstractSet);e(c$,
"contains",function(a){return S(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");e(c$,"size",function(){return 1});e(c$,"iterator",function(){return V("java.util.Collections$SingletonMap$1$1")?0:java.util.Collections.$Collections$SingletonMap$1$1$(),U(java.util.Collections$SingletonMap$1$1,this,null)});c$=L()};c$.$Collections$SingletonMap$1$1$=function(){K();c$=I(function(){da(this,
arguments);this.$hasNext=!0;H(this,arguments)},java.util,"Collections$SingletonMap$1$1",null,java.util.Iterator);e(c$,"hasNext",function(){return this.$hasNext});e(c$,"next",function(){if(this.$hasNext)return this.$hasNext=!1,V("java.util.Collections$SingletonMap$1$1$1")?0:java.util.Collections.$Collections$SingletonMap$1$1$1$(),U(java.util.Collections$SingletonMap$1$1$1,this,null);throw new java.util.NoSuchElementException;});e(c$,"remove",function(){throw new UnsupportedOperationException;});c$=
L()};c$.$Collections$SingletonMap$1$1$1$=function(){K();c$=ca(java.util,"Collections$SingletonMap$1$1$1",null,java.util.Map.Entry);e(c$,"equals",function(a){return this.b$["java.util.Collections$SingletonMap$1"].contains(a)},"~O");e(c$,"getKey",function(){return this.b$["java.util.Collections.SingletonMap"].k});e(c$,"getValue",function(){return this.b$["java.util.Collections.SingletonMap"].v});e(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())});e(c$,"setValue",function(){throw new UnsupportedOperationException;},"~O");c$=L()};c$=L();K();c$=I(function(){this.mutex=this.c=null;H(this,arguments)},java.util.Collections,"SynchronizedCollection",null,[java.util.Collection,java.io.Serializable]);C(c$,function(a){this.c=a;this.mutex=this},"java.util.Collection");C(c$,function(a,c){this.c=a;this.mutex=c},"java.util.Collection,~O");
b(c$,"add",function(a){return this.c.add(a)},"~O");b(c$,"addAll",function(a){return this.c.addAll(a)},"java.util.Collection");b(c$,"clear",function(){this.c.clear()});b(c$,"contains",function(a){return this.c.contains(a)},"~O");b(c$,"containsAll",function(a){return this.c.containsAll(a)},"java.util.Collection");b(c$,"isEmpty",function(){return this.c.isEmpty()});b(c$,"iterator",function(){return this.c.iterator()});b(c$,"remove",function(a){return this.c.remove(a)},"~O");b(c$,"removeAll",function(a){return this.c.removeAll(a)},
"java.util.Collection");b(c$,"retainAll",function(a){return this.c.retainAll(a)},"java.util.Collection");b(c$,"size",function(){return this.c.size()});b(c$,"toArray",function(){return this.c.toArray()});b(c$,"toString",function(){return this.c.toString()});b(c$,"toArray",function(a){return this.c.toArray(a)},"~A");c$=L();K();c$=E(java.util.Collections,"SynchronizedRandomAccessList",java.util.Collections.SynchronizedList,java.util.RandomAccess);e(c$,"subList",function(a,c){return new java.util.Collections.SynchronizedRandomAccessList(this.list.subList(a,
c),this.mutex)},"~N,~N");c$=L();K();c$=I(function(){this.list=null;H(this,arguments)},java.util.Collections,"SynchronizedList",java.util.Collections.SynchronizedCollection,java.util.List);C(c$,function(a){O(this,java.util.Collections.SynchronizedList,[a]);this.list=a},"java.util.List");C(c$,function(a,c){O(this,java.util.Collections.SynchronizedList,[a,c]);this.list=a},"java.util.List,~O");b(c$,"add",function(a,c){this.list.add(a,c)},"~N,~O");b(c$,"addAll",function(a,c){return this.list.addAll(a,
c)},"~N,java.util.Collection");e(c$,"equals",function(a){return this.list.equals(a)},"~O");b(c$,"get",function(a){return this.list.get(a)},"~N");e(c$,"hashCode",function(){return this.list.hashCode()});b(c$,"indexOf",function(a){return this.list.indexOf(a)},"~O");b(c$,"lastIndexOf",function(a){return this.list.lastIndexOf(a)},"~O");b(c$,"listIterator",function(){return this.list.listIterator()});b(c$,"listIterator",function(a){return this.list.listIterator(a)},"~N");b(c$,"remove",function(a){return this.list.remove(a)},
"~N");b(c$,"set",function(a,c){return this.list.set(a,c)},"~N,~O");b(c$,"subList",function(a,c){return new java.util.Collections.SynchronizedList(this.list.subList(a,c),this.mutex)},"~N,~N");c$=L();K();c$=I(function(){this.mutex=this.m=null;H(this,arguments)},java.util.Collections,"SynchronizedMap",null,[java.util.Map,java.io.Serializable]);C(c$,function(a){this.m=a;this.mutex=this},"java.util.Map");C(c$,function(a,c){this.m=a;this.mutex=c},"java.util.Map,~O");b(c$,"clear",function(){this.m.clear()});
b(c$,"containsKey",function(a){return this.m.containsKey(a)},"~O");b(c$,"containsValue",function(a){return this.m.containsValue(a)},"~O");b(c$,"entrySet",function(){return new java.util.Collections.SynchronizedSet(this.m.entrySet(),this.mutex)});e(c$,"equals",function(a){return this.m.equals(a)},"~O");b(c$,"get",function(a){return this.m.get(a)},"~O");e(c$,"hashCode",function(){return this.m.hashCode()});b(c$,"isEmpty",function(){return this.m.isEmpty()});b(c$,"keySet",function(){return new java.util.Collections.SynchronizedSet(this.m.keySet(),
this.mutex)});b(c$,"put",function(a,c){return this.m.put(a,c)},"~O,~O");b(c$,"putAll",function(a){this.m.putAll(a)},"java.util.Map");b(c$,"remove",function(a){return this.m.remove(a)},"~O");b(c$,"size",function(){return this.m.size()});b(c$,"values",function(){return new java.util.Collections.SynchronizedCollection(this.m.values(),this.mutex)});b(c$,"toString",function(){return this.m.toString()});c$=L();K();c$=E(java.util.Collections,"SynchronizedSet",java.util.Collections.SynchronizedCollection,
java.util.Set);e(c$,"equals",function(a){return this.c.equals(a)},"~O");e(c$,"hashCode",function(){return this.c.hashCode()});c$=L();K();c$=I(function(){this.sm=null;H(this,arguments)},java.util.Collections,"SynchronizedSortedMap",java.util.Collections.SynchronizedMap,java.util.SortedMap);C(c$,function(a){O(this,java.util.Collections.SynchronizedSortedMap,[a]);this.sm=a},"java.util.SortedMap");C(c$,function(a,c){O(this,java.util.Collections.SynchronizedSortedMap,[a,c]);this.sm=a},"java.util.SortedMap,~O");
b(c$,"comparator",function(){return this.sm.comparator()});b(c$,"firstKey",function(){return this.sm.firstKey()});b(c$,"headMap",function(a){return new java.util.Collections.SynchronizedSortedMap(this.sm.headMap(a),this.mutex)},"~O");b(c$,"lastKey",function(){return this.sm.lastKey()});b(c$,"subMap",function(a,c){return new java.util.Collections.SynchronizedSortedMap(this.sm.subMap(a,c),this.mutex)},"~O,~O");b(c$,"tailMap",function(a){return new java.util.Collections.SynchronizedSortedMap(this.sm.tailMap(a),
this.mutex)},"~O");c$=L();K();c$=I(function(){this.ss=null;H(this,arguments)},java.util.Collections,"SynchronizedSortedSet",java.util.Collections.SynchronizedSet,java.util.SortedSet);C(c$,function(a){O(this,java.util.Collections.SynchronizedSortedSet,[a]);this.ss=a},"java.util.SortedSet");C(c$,function(a,c){O(this,java.util.Collections.SynchronizedSortedSet,[a,c]);this.ss=a},"java.util.SortedSet,~O");b(c$,"comparator",function(){return this.ss.comparator()});b(c$,"first",function(){return this.ss.first()});
b(c$,"headSet",function(a){return new java.util.Collections.SynchronizedSortedSet(this.ss.headSet(a),this.mutex)},"~O");b(c$,"last",function(){return this.ss.last()});b(c$,"subSet",function(a,c){return new java.util.Collections.SynchronizedSortedSet(this.ss.subSet(a,c),this.mutex)},"~O,~O");b(c$,"tailSet",function(a){return new java.util.Collections.SynchronizedSortedSet(this.ss.tailSet(a),this.mutex)},"~O");c$=L();K();c$=I(function(){this.c=null;H(this,arguments)},java.util.Collections,"UnmodifiableCollection",
null,[java.util.Collection,java.io.Serializable]);C(c$,function(a){this.c=a},"java.util.Collection");e(c$,"add",function(){throw new UnsupportedOperationException;},"~O");e(c$,"addAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");e(c$,"clear",function(){throw new UnsupportedOperationException;});b(c$,"contains",function(a){return this.c.contains(a)},"~O");b(c$,"containsAll",function(a){return this.c.containsAll(a)},"java.util.Collection");b(c$,"isEmpty",function(){return this.c.isEmpty()});
b(c$,"iterator",function(){return V("java.util.Collections$UnmodifiableCollection$1")?0:java.util.Collections.UnmodifiableCollection.$Collections$UnmodifiableCollection$1$(),U(java.util.Collections$UnmodifiableCollection$1,this,null)});e(c$,"remove",function(){throw new UnsupportedOperationException;},"~O");e(c$,"removeAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");e(c$,"retainAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");b(c$,
"size",function(){return this.c.size()});b(c$,"toArray",function(){return this.c.toArray()});b(c$,"toArray",function(a){return this.c.toArray(a)},"~A");b(c$,"toString",function(){return this.c.toString()});c$.$Collections$UnmodifiableCollection$1$=function(){K();c$=I(function(){da(this,arguments);this.iterator=null;H(this,arguments)},java.util,"Collections$UnmodifiableCollection$1",null,java.util.Iterator);qa(c$,function(){this.iterator=this.b$["java.util.Collections.UnmodifiableCollection"].c.iterator()});
b(c$,"hasNext",function(){return this.iterator.hasNext()});b(c$,"next",function(){return this.iterator.next()});e(c$,"remove",function(){throw new UnsupportedOperationException;});c$=L()};c$=L();K();c$=E(java.util.Collections,"UnmodifiableRandomAccessList",java.util.Collections.UnmodifiableList,java.util.RandomAccess);e(c$,"subList",function(a,c){return new java.util.Collections.UnmodifiableRandomAccessList(this.list.subList(a,c))},"~N,~N");c$=L();K();c$=I(function(){this.list=null;H(this,arguments)},
java.util.Collections,"UnmodifiableList",java.util.Collections.UnmodifiableCollection,java.util.List);C(c$,function(a){O(this,java.util.Collections.UnmodifiableList,[a]);this.list=a},"java.util.List");b(c$,"add",function(){throw new UnsupportedOperationException;},"~N,~O");b(c$,"addAll",function(){throw new UnsupportedOperationException;},"~N,java.util.Collection");e(c$,"equals",function(a){return this.list.equals(a)},"~O");b(c$,"get",function(a){return this.list.get(a)},"~N");e(c$,"hashcode",function(){return this.list.hashCode()});
b(c$,"indexOf",function(a){return this.list.indexOf(a)},"~O");b(c$,"lastIndexOf",function(a){return this.list.lastIndexOf(a)},"~O");b(c$,"listIterator",function(){return this.listIterator(0)});b(c$,"listIterator",function(){return V("java.util.Collections$UnmodifiableList$1")?0:java.util.Collections.UnmodifiableList.$Collections$UnmodifiableList$1$(),U(java.util.Collections$UnmodifiableList$1,this,null)},"~N");b(c$,"remove",function(){throw new UnsupportedOperationException;},"~N");e(c$,"set",function(){throw new UnsupportedOperationException;
},"~N,~O");b(c$,"subList",function(a,c){return new java.util.Collections.UnmodifiableList(this.list.subList(a,c))},"~N,~N");c$.$Collections$UnmodifiableList$1$=function(){K();c$=I(function(){da(this,arguments);this.iterator=null;H(this,arguments)},java.util,"Collections$UnmodifiableList$1",null,java.util.ListIterator);qa(c$,function(){this.iterator=this.b$["java.util.Collections.UnmodifiableList"].list.listIterator(location)});e(c$,"add",function(){throw new UnsupportedOperationException;},"~O");
b(c$,"hasNext",function(){return this.iterator.hasNext()});b(c$,"hasPrevious",function(){return this.iterator.hasPrevious()});b(c$,"next",function(){return this.iterator.next()});b(c$,"nextIndex",function(){return this.iterator.nextIndex()});b(c$,"previous",function(){return this.iterator.previous()});b(c$,"previousIndex",function(){return this.iterator.previousIndex()});e(c$,"remove",function(){throw new UnsupportedOperationException;});e(c$,"set",function(){throw new UnsupportedOperationException;
},"~O");c$=L()};c$=L();K();c$=I(function(){this.m=null;H(this,arguments)},java.util.Collections,"UnmodifiableMap",null,[java.util.Map,java.io.Serializable]);C(c$,function(a){this.m=a},"java.util.Map");e(c$,"clear",function(){throw new UnsupportedOperationException;});b(c$,"containsKey",function(a){return this.m.containsKey(a)},"~O");b(c$,"containsValue",function(a){return this.m.containsValue(a)},"~O");b(c$,"entrySet",function(){return new java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet(this.m.entrySet())});
e(c$,"equals",function(a){return this.m.equals(a)},"~O");b(c$,"get",function(a){return this.m.get(a)},"~O");e(c$,"hashcode",function(){return this.m.hashCode()});b(c$,"isEmpty",function(){return this.m.isEmpty()});b(c$,"keySet",function(){return new java.util.Collections.UnmodifiableSet(this.m.keySet())});e(c$,"put",function(){throw new UnsupportedOperationException;},"~O,~O");e(c$,"putAll",function(){throw new UnsupportedOperationException;},"java.util.Map");e(c$,"remove",function(){throw new UnsupportedOperationException;
},"~O");b(c$,"size",function(){return this.m.size()});b(c$,"values",function(){return new java.util.Collections.UnmodifiableCollection(this.m.values())});b(c$,"toString",function(){return this.m.toString()});K();c$=E(java.util.Collections.UnmodifiableMap,"UnmodifiableEntrySet",java.util.Collections.UnmodifiableSet);e(c$,"iterator",function(){return V("java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1")?0:java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.$Collections$UnmodifiableMap$UnmodifiableEntrySet$1$(),
U(java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1,this,null)});b(c$,"toArray",function(){for(var a=this.c.size(),c=Array(a),d=this.iterator();0<=--a;)c[a]=d.next();return c});b(c$,"toArray",function(a){var c=this.c.size(),d=0,b=this.iterator();c>a.length&&(a=a.getClass().getComponentType(),a=java.lang.reflect.Array.newInstance(a,c));for(;d<c;)a[d++]=b.next();d<a.length&&(a[d]=null);return a},"~A");c$.$Collections$UnmodifiableMap$UnmodifiableEntrySet$1$=function(){K();c$=I(function(){da(this,
arguments);this.iterator=null;H(this,arguments)},java.util,"Collections$UnmodifiableMap$UnmodifiableEntrySet$1",null,java.util.Iterator);qa(c$,function(){this.iterator=this.b$["java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet"].c.iterator()});b(c$,"hasNext",function(){return this.iterator.hasNext()});b(c$,"next",function(){return new java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableMapEntry(this.iterator.next())});e(c$,"remove",function(){throw new UnsupportedOperationException;
});c$=L()};K();c$=I(function(){this.mapEntry=null;H(this,arguments)},java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet,"UnmodifiableMapEntry",null,java.util.Map.Entry);C(c$,function(a){this.mapEntry=a},"java.util.Map.Entry");e(c$,"equals",function(a){return this.mapEntry.equals(a)},"~O");b(c$,"getKey",function(){return this.mapEntry.getKey()});b(c$,"getValue",function(){return this.mapEntry.getValue()});e(c$,"hashcode",function(){return this.mapEntry.hashCode()});e(c$,"setValue",function(){throw new UnsupportedOperationException;
},"~O");b(c$,"toString",function(){return this.mapEntry.toString()});c$=L();c$=L();c$=L();K();c$=E(java.util.Collections,"UnmodifiableSet",java.util.Collections.UnmodifiableCollection,java.util.Set);e(c$,"equals",function(a){return this.c.equals(a)},"~O");e(c$,"hashCode",function(){return this.c.hashCode()});c$=L();K();c$=I(function(){this.sm=null;H(this,arguments)},java.util.Collections,"UnmodifiableSortedMap",java.util.Collections.UnmodifiableMap,java.util.SortedMap);C(c$,function(a){O(this,java.util.Collections.UnmodifiableSortedMap,
[a]);this.sm=a},"java.util.SortedMap");b(c$,"comparator",function(){return this.sm.comparator()});b(c$,"firstKey",function(){return this.sm.firstKey()});b(c$,"headMap",function(a){return new java.util.Collections.UnmodifiableSortedMap(this.sm.headMap(a))},"~O");b(c$,"lastKey",function(){return this.sm.lastKey()});b(c$,"subMap",function(a,c){return new java.util.Collections.UnmodifiableSortedMap(this.sm.subMap(a,c))},"~O,~O");b(c$,"tailMap",function(a){return new java.util.Collections.UnmodifiableSortedMap(this.sm.tailMap(a))},
"~O");c$=L();K();c$=I(function(){this.ss=null;H(this,arguments)},java.util.Collections,"UnmodifiableSortedSet",java.util.Collections.UnmodifiableSet,java.util.SortedSet);C(c$,function(a){O(this,java.util.Collections.UnmodifiableSortedSet,[a]);this.ss=a},"java.util.SortedSet");b(c$,"comparator",function(){return this.ss.comparator()});b(c$,"first",function(){return this.ss.first()});b(c$,"headSet",function(a){return new java.util.Collections.UnmodifiableSortedSet(this.ss.headSet(a))},"~O");b(c$,"last",
function(){return this.ss.last()});b(c$,"subSet",function(a,c){return new java.util.Collections.UnmodifiableSortedSet(this.ss.subSet(a,c))},"~O,~O");b(c$,"tailSet",function(a){return new java.util.Collections.UnmodifiableSortedSet(this.ss.tailSet(a))},"~O");c$=L();K();c$=I(function(){this.type=this.c=null;H(this,arguments)},java.util.Collections,"CheckedCollection",null,[java.util.Collection,java.io.Serializable]);C(c$,function(a,c){if(null==a||null==c)throw new NullPointerException;this.c=a;this.type=
c},"java.util.Collection,Class");b(c$,"size",function(){return this.c.size()});b(c$,"isEmpty",function(){return this.c.isEmpty()});b(c$,"contains",function(a){return this.c.contains(a)},"~O");b(c$,"iterator",function(){var a=this.c.iterator();S(a,java.util.ListIterator)&&(a=new java.util.Collections.CheckedListIterator(a,this.type));return a});b(c$,"toArray",function(){return this.c.toArray()});b(c$,"toArray",function(a){return this.c.toArray(a)},"~A");b(c$,"add",function(a){return this.c.add(java.util.Collections.checkType(a,
this.type))},"~O");b(c$,"remove",function(a){return this.c.remove(a)},"~O");b(c$,"containsAll",function(a){return this.c.containsAll(a)},"java.util.Collection");e(c$,"addAll",function(a){var c=a.size();if(0==c)return!1;var d=Array(c);a=a.iterator();for(var b=0;b<c;b++)d[b]=java.util.Collections.checkType(a.next(),this.type);a=!1;for(b=0;b<c;b++)a=(new Boolean(a|this.c.add(d[b]))).valueOf();return a},"java.util.Collection");b(c$,"removeAll",function(a){return this.c.removeAll(a)},"java.util.Collection");
b(c$,"retainAll",function(a){return this.c.retainAll(a)},"java.util.Collection");b(c$,"clear",function(){this.c.clear()});b(c$,"toString",function(){return this.c.toString()});c$=L();K();c$=I(function(){this.type=this.i=null;H(this,arguments)},java.util.Collections,"CheckedListIterator",null,java.util.ListIterator);C(c$,function(a,c){this.i=a;this.type=c},"java.util.ListIterator,Class");b(c$,"hasNext",function(){return this.i.hasNext()});b(c$,"next",function(){return this.i.next()});b(c$,"remove",
function(){this.i.remove()});b(c$,"hasPrevious",function(){return this.i.hasPrevious()});b(c$,"previous",function(){return this.i.previous()});b(c$,"nextIndex",function(){return this.i.nextIndex()});b(c$,"previousIndex",function(){return this.i.previousIndex()});b(c$,"set",function(a){this.i.set(java.util.Collections.checkType(a,this.type))},"~O");b(c$,"add",function(a){this.i.add(java.util.Collections.checkType(a,this.type))},"~O");c$=L();K();c$=I(function(){this.l=null;H(this,arguments)},java.util.Collections,
"CheckedList",java.util.Collections.CheckedCollection,java.util.List);C(c$,function(a,c){O(this,java.util.Collections.CheckedList,[a,c]);this.l=a},"java.util.List,Class");b(c$,"addAll",function(a,c){var d=c.size();if(0==d)return!1;for(var b=Array(d),f=c.iterator(),g=0;g<d;g++)b[g]=java.util.Collections.checkType(f.next(),this.type);return this.l.addAll(a,java.util.Arrays.asList(b))},"~N,java.util.Collection");b(c$,"get",function(a){return this.l.get(a)},"~N");b(c$,"set",function(a,c){return this.l.set(a,
java.util.Collections.checkType(c,this.type))},"~N,~O");b(c$,"add",function(a,c){this.l.add(a,java.util.Collections.checkType(c,this.type))},"~N,~O");b(c$,"remove",function(a){return this.l.remove(a)},"~N");b(c$,"indexOf",function(a){return this.l.indexOf(a)},"~O");b(c$,"lastIndexOf",function(a){return this.l.lastIndexOf(a)},"~O");b(c$,"listIterator",function(){return new java.util.Collections.CheckedListIterator(this.l.listIterator(),this.type)});b(c$,"listIterator",function(a){return new java.util.Collections.CheckedListIterator(this.l.listIterator(a),
this.type)},"~N");b(c$,"subList",function(a,c){return java.util.Collections.checkedList(this.l.subList(a,c),this.type)},"~N,~N");e(c$,"equals",function(a){return this.l.equals(a)},"~O");e(c$,"hashcode",function(){return this.l.hashCode()});c$=L();K();c$=E(java.util.Collections,"CheckedRandomAccessList",java.util.Collections.CheckedList,java.util.RandomAccess);c$=L();K();c$=E(java.util.Collections,"CheckedSet",java.util.Collections.CheckedCollection,java.util.Set);e(c$,"equals",function(a){return this.c.equals(a)},
"~O");e(c$,"hashCode",function(){return this.c.hashCode()});c$=L();K();c$=I(function(){this.valueType=this.keyType=this.m=null;H(this,arguments)},java.util.Collections,"CheckedMap",null,[java.util.Map,java.io.Serializable]);C(c$,($fz=function(a,c,d){if(null==a||null==c||null==d)throw new NullPointerException;this.m=a;this.keyType=c;this.valueType=d},$fz.isPrivate=!0,$fz),"java.util.Map,Class,Class");b(c$,"size",function(){return this.m.size()});b(c$,"isEmpty",function(){return this.m.isEmpty()});
b(c$,"containsKey",function(a){return this.m.containsKey(a)},"~O");b(c$,"containsValue",function(a){return this.m.containsValue(a)},"~O");b(c$,"get",function(a){return this.m.get(a)},"~O");b(c$,"put",function(a,c){return this.m.put(java.util.Collections.checkType(a,this.keyType),java.util.Collections.checkType(c,this.valueType))},"~O,~O");b(c$,"remove",function(a){return this.m.remove(a)},"~O");e(c$,"putAll",function(a){var c=a.size();if(0!=c){var d=Array(c);a=a.entrySet().iterator();for(var b=0;b<
c;b++){var f=a.next();java.util.Collections.checkType(f.getKey(),this.keyType);java.util.Collections.checkType(f.getValue(),this.valueType);d[b]=f}for(f=0;f<c;f++)this.m.put(d[f].getKey(),d[f].getValue())}},"java.util.Map");b(c$,"clear",function(){this.m.clear()});b(c$,"keySet",function(){return this.m.keySet()});b(c$,"values",function(){return this.m.values()});b(c$,"entrySet",function(){return new java.util.Collections.CheckedMap.CheckedEntrySet(this.m.entrySet(),this.valueType)});e(c$,"equals",
function(a){return this.m.equals(a)},"~O");e(c$,"hashcode",function(){return this.m.hashCode()});b(c$,"toString",function(){return this.m.toString()});K();c$=I(function(){this.valueType=this.e=null;H(this,arguments)},java.util.Collections.CheckedMap,"CheckedEntry",null,java.util.Map.Entry);C(c$,function(a,c){if(null==a)throw new NullPointerException;this.e=a;this.valueType=c},"java.util.Map.Entry,Class");b(c$,"getKey",function(){return this.e.getKey()});b(c$,"getValue",function(){return this.e.getValue()});
b(c$,"setValue",function(a){return this.e.setValue(java.util.Collections.checkType(a,this.valueType))},"~O");e(c$,"equals",function(a){return this.e.equals(a)},"~O");e(c$,"hashcode",function(){return this.e.hashCode()});c$=L();K();c$=I(function(){this.valueType=this.s=null;H(this,arguments)},java.util.Collections.CheckedMap,"CheckedEntrySet",null,java.util.Set);C(c$,function(a,c){this.s=a;this.valueType=c},"java.util.Set,Class");b(c$,"iterator",function(){return new java.util.Collections.CheckedMap.CheckedEntrySet.CheckedEntryIterator(this.s.iterator(),
this.valueType)});b(c$,"toArray",function(){for(var a=this.size(),c=Array(a),d=this.iterator(),b=0;b<a;b++)c[b]=d.next();return c});b(c$,"toArray",function(a){var c=this.size();if(a.length<c){var d=a.getClass().getComponentType();a=java.lang.reflect.Array.newInstance(d,c)}for(var d=this.iterator(),b=0;b<c;b++)a[b]=d.next();c<a.length&&(a[c]=null);return a},"~A");b(c$,"retainAll",function(a){return this.s.retainAll(a)},"java.util.Collection");b(c$,"removeAll",function(a){return this.s.removeAll(a)},
"java.util.Collection");b(c$,"containsAll",function(a){return this.s.containsAll(a)},"java.util.Collection");e(c$,"addAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");b(c$,"remove",function(a){return this.s.remove(a)},"~O");b(c$,"contains",function(a){return this.s.contains(a)},"~O");e(c$,"add",function(){throw new UnsupportedOperationException;},"java.util.Map.Entry");b(c$,"isEmpty",function(){return this.s.isEmpty()});b(c$,"clear",function(){this.s.clear()});b(c$,
"size",function(){return this.s.size()});e(c$,"hashcode",function(){return this.s.hashCode()});e(c$,"equals",function(a){return this.s.equals(a)},"~O");K();c$=I(function(){this.valueType=this.i=null;H(this,arguments)},java.util.Collections.CheckedMap.CheckedEntrySet,"CheckedEntryIterator",null,java.util.Iterator);C(c$,function(a,c){this.i=a;this.valueType=c},"java.util.Iterator,Class");b(c$,"hasNext",function(){return this.i.hasNext()});b(c$,"remove",function(){this.i.remove()});b(c$,"next",function(){return new java.util.Collections.CheckedMap.CheckedEntry(this.i.next(),
this.valueType)});c$=L();c$=L();c$=L();K();c$=I(function(){this.ss=null;H(this,arguments)},java.util.Collections,"CheckedSortedSet",java.util.Collections.CheckedSet,java.util.SortedSet);C(c$,function(a,c){O(this,java.util.Collections.CheckedSortedSet,[a,c]);this.ss=a},"java.util.SortedSet,Class");b(c$,"comparator",function(){return this.ss.comparator()});b(c$,"subSet",function(a,c){return new java.util.Collections.CheckedSortedSet(this.ss.subSet(a,c),this.type)},"~O,~O");b(c$,"headSet",function(a){return new java.util.Collections.CheckedSortedSet(this.ss.headSet(a),
this.type)},"~O");b(c$,"tailSet",function(a){return new java.util.Collections.CheckedSortedSet(this.ss.tailSet(a),this.type)},"~O");b(c$,"first",function(){return this.ss.first()});b(c$,"last",function(){return this.ss.last()});c$=L();K();c$=I(function(){this.sm=null;H(this,arguments)},java.util.Collections,"CheckedSortedMap",java.util.Collections.CheckedMap,java.util.SortedMap);C(c$,function(a,c,d){O(this,java.util.Collections.CheckedSortedMap,[a,c,d]);this.sm=a},"java.util.SortedMap,Class,Class");
b(c$,"comparator",function(){return this.sm.comparator()});b(c$,"subMap",function(a,c){return new java.util.Collections.CheckedSortedMap(this.sm.subMap(a,c),this.keyType,this.valueType)},"~O,~O");b(c$,"headMap",function(a){return new java.util.Collections.CheckedSortedMap(this.sm.headMap(a),this.keyType,this.valueType)},"~O");b(c$,"tailMap",function(a){return new java.util.Collections.CheckedSortedMap(this.sm.tailMap(a),this.keyType,this.valueType)},"~O");b(c$,"firstKey",function(){return this.sm.firstKey()});
b(c$,"lastKey",function(){return this.sm.lastKey()});c$=L();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$=E(java.util,"Dictionary");C(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$=I(function(){this.elementCount=0;this.elementData=null;this.firstSlot=this.threshold=this.loadFactor=0;this.lastSlot=-1;this.modCount=0;V("java.util.Hashtable.HashIterator")||java.util.Hashtable.$Hashtable$HashIterator$();V("java.util.Hashtable.HashEnumerator")||java.util.Hashtable.$Hashtable$HashEnumerator$();H(this,arguments)},java.util,"Hashtable",java.util.Dictionary,[java.util.Map,Cloneable,java.io.Serializable]);c$.newEntry=b(c$,"newEntry",($fz=function(a,c){return new java.util.Hashtable.Entry(a,
c)},$fz.isPrivate=!0,$fz),"~O,~O,~N");oa(c$,function(){this.elementCount=0;this.elementData=this.newElementArray(11);this.firstSlot=this.elementData.length;this.loadFactor=0.75;this.computeMaxSize()});b(c$,"newElementArray",($fz=function(a){return Array(a)},$fz.isPrivate=!0,$fz),"~N");e(c$,"clear",function(){this.elementCount=0;for(var a=this.elementData.length;0<=--a;)this.elementData[a]=null;this.modCount++});b(c$,"clone",function(){try{var a=ja(this,java.util.Hashtable,"clone",[]);a.elementData=
this.elementData.clone();for(var c,d=this.elementData.length;0<=--d;)if(null!=(c=this.elementData[d]))a.elementData[d]=c.clone();return a}catch(b){if(S(b,CloneNotSupportedException))return null;throw b;}});b(c$,"computeMaxSize",($fz=function(){this.threshold=Math.round(this.elementData.length*this.loadFactor)},$fz.isPrivate=!0,$fz));b(c$,"contains",function(a){if(null==a)throw new NullPointerException;for(var c=this.elementData.length;0<=--c;)for(var d=this.elementData[c];null!=d;){if(a.equals(d.value))return!0;
d=d.next}return!1},"~O");e(c$,"containsKey",function(a){return null!=this.getEntry(a)},"~O");e(c$,"containsValue",function(a){return this.contains(a)},"~O");e(c$,"elements",function(){return 0==this.elementCount?java.util.Hashtable.EMPTY_ENUMERATION:U(java.util.Hashtable.HashEnumerator,this,null,!1)});e(c$,"entrySet",function(){return new java.util.Collections.SynchronizedSet((V("java.util.Hashtable$2")?0:java.util.Hashtable.$Hashtable$2$(),U(java.util.Hashtable$2,this,null)),this)});e(c$,"equals",
function(a){if(this===a)return!0;if(S(a,java.util.Map)){if(this.size()!=a.size())return!1;var c=this.entrySet(),d;for(a=a.entrySet().iterator();a.hasNext()&&((d=a.next())||1);)if(!c.contains(d))return!1;return!0}return!1},"~O");e(c$,"get",function(a){for(var c=a.hashCode(),d=this.elementData[(c&2147483647)%this.elementData.length];null!=d;){if(d.equalsKey(a,c))return d.value;d=d.next}return null},"~O");b(c$,"getEntry",function(a){for(var c=a.hashCode(),d=this.elementData[(c&2147483647)%this.elementData.length];null!=
d;){if(d.equalsKey(a,c))return d;d=d.next}return null},"~O");e(c$,"hashCode",function(){for(var a=0,c=this.entrySet().iterator();c.hasNext();)var d=c.next(),b=d.getKey(),d=d.getValue(),b=(b!==this?b.hashCode():0)^(d!==this?null!=d?d.hashCode():0:0),a=a+b;return a});e(c$,"isEmpty",function(){return 0==this.elementCount});e(c$,"keys",function(){return 0==this.elementCount?java.util.Hashtable.EMPTY_ENUMERATION:U(java.util.Hashtable.HashEnumerator,this,null,!0)});e(c$,"keySet",function(){return new java.util.Collections.SynchronizedSet((V("java.util.Hashtable$3")?
0:java.util.Hashtable.$Hashtable$3$(),U(java.util.Hashtable$3,this,null)),this)});e(c$,"put",function(a,c){if(null!=a&&null!=c){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 b=a.hashCode(),f=(b&2147483647)%this.elementData.length,g=this.elementData[f];null!=g&&!g.equalsKey(a,b);)g=g.next;if(null==g)return this.modCount++,++this.elementCount>this.threshold&&(this.rehash(),f=(b&2147483647)%this.elementData.length),
f<this.firstSlot&&(this.firstSlot=f),f>this.lastSlot&&(this.lastSlot=f),g=java.util.Hashtable.newEntry(a,c,b),g.next=this.elementData[f],this.elementData[f]=g,null;b=g.value;g.value=c;return b}throw new NullPointerException;},"~O,~O");e(c$,"putAll",function(a){var c;for(a=a.entrySet().iterator();a.hasNext()&&((c=a.next())||1);)this.put(c.getKey(),c.getValue())},"java.util.Map");b(c$,"rehash",function(){var a=(this.elementData.length<<1)+1;0==a&&(a=1);for(var c=a,d=-1,b=this.newElementArray(a),f=this.lastSlot+
1;--f>=this.firstSlot;)for(var g=this.elementData[f];null!=g;){var h=(g.getKeyHash()&2147483647)%a;h<c&&(c=h);h>d&&(d=h);var l=g.next;g.next=b[h];b[h]=g;g=l}this.firstSlot=c;this.lastSlot=d;this.elementData=b;this.computeMaxSize()});e(c$,"remove",function(a){for(var c=a.hashCode(),d=(c&2147483647)%this.elementData.length,b=null,f=this.elementData[d];null!=f&&!f.equalsKey(a,c);)b=f,f=f.next;return null!=f?(this.modCount++,null==b?this.elementData[d]=f.next:b.next=f.next,this.elementCount--,a=f.value,
f.value=null,a):null},"~O");e(c$,"size",function(){return this.elementCount});e(c$,"toString",function(){if(this.isEmpty())return"{}";var a=new StringBuilder(28*this.size());a.append("{");for(var c=this.lastSlot;c>=this.firstSlot;c--)for(var d=this.elementData[c];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()});
e(c$,"values",function(){return new java.util.Collections.SynchronizedCollection((V("java.util.Hashtable$4")?0:java.util.Hashtable.$Hashtable$4$(),U(java.util.Hashtable$4,this,null)),this)});c$.$Hashtable$HashIterator$=function(){K();c$=I(function(){da(this,arguments);this.expectedModCount=this.position=0;this.lastEntry=this.type=null;this.lastPosition=0;this.canRemove=!1;H(this,arguments)},java.util.Hashtable,"HashIterator",null,java.util.Iterator);C(c$,function(a){this.type=a;this.position=this.b$["java.util.Hashtable"].lastSlot;
this.expectedModCount=this.b$["java.util.Hashtable"].modCount},"java.util.MapEntry.Type");e(c$,"hasNext",function(){if(null!=this.lastEntry&&null!=this.lastEntry.next)return!0;for(;this.position>=this.b$["java.util.Hashtable"].firstSlot;)if(null==this.b$["java.util.Hashtable"].elementData[this.position])this.position--;else return!0;return!1});e(c$,"next",function(){if(this.expectedModCount==this.b$["java.util.Hashtable"].modCount){null!=this.lastEntry&&(this.lastEntry=this.lastEntry.next);if(null==
this.lastEntry){for(;this.position>=this.b$["java.util.Hashtable"].firstSlot&&null==(this.lastEntry=this.b$["java.util.Hashtable"].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;});e(c$,"remove",function(){if(this.expectedModCount==this.b$["java.util.Hashtable"].modCount)if(this.canRemove){var a=
this.canRemove=!1,c=this.b$["java.util.Hashtable"].elementData[this.lastPosition];if(c===this.lastEntry)this.b$["java.util.Hashtable"].elementData[this.lastPosition]=c.next,a=!0;else{for(;null!=c&&c.next!==this.lastEntry;)c=c.next;null!=c&&(c.next=this.lastEntry.next,a=!0)}if(a){this.b$["java.util.Hashtable"].modCount++;this.b$["java.util.Hashtable"].elementCount--;this.expectedModCount++;return}}else throw new IllegalStateException;throw new java.util.ConcurrentModificationException;});c$=L()};c$.$Hashtable$HashEnumerator$=
function(){K();c$=I(function(){da(this,arguments);this.key=!1;this.start=0;this.entry=null;H(this,arguments)},java.util.Hashtable,"HashEnumerator",null,java.util.Enumeration);C(c$,function(a){this.key=a;this.start=this.b$["java.util.Hashtable"].lastSlot+1},"~B");e(c$,"hasMoreElements",function(){if(null!=this.entry)return!0;for(;--this.start>=this.b$["java.util.Hashtable"].firstSlot;)if(null!=this.b$["java.util.Hashtable"].elementData[this.start])return this.entry=this.b$["java.util.Hashtable"].elementData[this.start],
!0;return!1});e(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$=L()};c$.$Hashtable$2$=function(){K();c$=ca(java.util,"Hashtable$2",java.util.AbstractSet);e(c$,"size",function(){return this.b$["java.util.Hashtable"].elementCount});e(c$,"clear",function(){this.b$["java.util.Hashtable"].clear()});e(c$,"remove",function(a){return this.contains(a)?(this.b$["java.util.Hashtable"].remove(a.getKey()),
!0):!1},"~O");b(c$,"contains",function(a){var c=this.b$["java.util.Hashtable"].getEntry(a.getKey());return a.equals(c)},"~O");b(c$,"iterator",function(){return U(java.util.Hashtable.HashIterator,this,null,(V("java.util.Hashtable$2$1")?0:java.util.Hashtable.$Hashtable$2$1$(),U(java.util.Hashtable$2$1,this,null)))});c$=L()};c$.$Hashtable$2$1$=function(){K();c$=ca(java.util,"Hashtable$2$1",null,java.util.MapEntry.Type);e(c$,"get",function(a){return a},"java.util.MapEntry");c$=L()};c$.$Hashtable$3$=function(){K();
c$=ca(java.util,"Hashtable$3",java.util.AbstractSet);e(c$,"contains",function(a){return this.b$["java.util.Hashtable"].containsKey(a)},"~O");e(c$,"size",function(){return this.b$["java.util.Hashtable"].elementCount});e(c$,"clear",function(){this.b$["java.util.Hashtable"].clear()});e(c$,"remove",function(a){return this.b$["java.util.Hashtable"].containsKey(a)?(this.b$["java.util.Hashtable"].remove(a),!0):!1},"~O");e(c$,"iterator",function(){return U(java.util.Hashtable.HashIterator,this,null,(V("java.util.Hashtable$3$1")?
0:java.util.Hashtable.$Hashtable$3$1$(),U(java.util.Hashtable$3$1,this,null)))});c$=L()};c$.$Hashtable$3$1$=function(){K();c$=ca(java.util,"Hashtable$3$1",null,java.util.MapEntry.Type);e(c$,"get",function(a){return a.key},"java.util.MapEntry");c$=L()};c$.$Hashtable$4$=function(){K();c$=ca(java.util,"Hashtable$4",java.util.AbstractCollection);e(c$,"contains",function(a){return this.b$["java.util.Hashtable"].contains(a)},"~O");e(c$,"size",function(){return this.b$["java.util.Hashtable"].elementCount});
e(c$,"clear",function(){this.b$["java.util.Hashtable"].clear()});e(c$,"iterator",function(){return U(java.util.Hashtable.HashIterator,this,null,(V("java.util.Hashtable$4$1")?0:java.util.Hashtable.$Hashtable$4$1$(),U(java.util.Hashtable$4$1,this,null)))});c$=L()};c$.$Hashtable$4$1$=function(){K();c$=ca(java.util,"Hashtable$4$1",null,java.util.MapEntry.Type);e(c$,"get",function(a){return a.value},"java.util.MapEntry");c$=L()};c$.$Hashtable$1$=function(){K();c$=ca(java.util,"Hashtable$1",null,java.util.Enumeration);
e(c$,"hasMoreElements",function(){return!1});e(c$,"nextElement",function(){throw new java.util.NoSuchElementException;});c$=L()};K();c$=I(function(){this.next=null;this.hashcode=0;H(this,arguments)},java.util.Hashtable,"Entry",java.util.MapEntry);oa(c$,function(a,c){this.key=a;this.value=c;this.hashcode=a.hashCode()});b(c$,"clone",function(){var a=ja(this,java.util.Hashtable.Entry,"clone",[]);null!=this.next&&(a.next=this.next.clone());return a});e(c$,"setValue",function(a){if(null==a)throw new NullPointerException;
var c=this.value;this.value=a;return c},"~O");b(c$,"getKeyHash",function(){return this.key.hashCode()});b(c$,"equalsKey",function(a){return this.hashcode==a.hashCode()&&this.key.equals(a)},"~O,~N");e(c$,"toString",function(){return this.key+"="+this.value});c$=L();c$.EMPTY_ENUMERATION=c$.prototype.EMPTY_ENUMERATION=(V("java.util.Hashtable$1")?0:java.util.Hashtable.$Hashtable$1$(),U(java.util.Hashtable$1,this,null))});W(["java.util.Map"],"java.util.MapEntry",null,function(){c$=I(function(){this.value=
this.key=null;H(this,arguments)},java.util,"MapEntry",null,[java.util.Map.Entry,Cloneable]);C(c$,function(a){this.key=a},"~O");C(c$,function(a,c){this.key=a;this.value=c},"~O,~O");b(c$,"clone",function(){try{return ja(this,java.util.MapEntry,"clone",[])}catch(a){if(S(a,CloneNotSupportedException))return null;throw a;}});e(c$,"equals",function(a){return this===a?!0:S(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");e(c$,"getKey",function(){return this.key});e(c$,"getValue",function(){return this.value});e(c$,"hashCode",function(){return(null==this.key?0:this.key.hashCode())^(null==this.value?0:this.value.hashCode())});e(c$,"setValue",function(a){var c=this.value;this.value=a;return c},"~O");e(c$,"toString",function(){return this.key+"="+this.value});Z(java.util.MapEntry,"Type")});W(["java.util.Hashtable"],"java.util.Properties",["java.lang.NullPointerException","$.StringBuffer"],function(){c$=I(function(){this.defaults=
this.builder=null;H(this,arguments)},java.util,"Properties",java.util.Hashtable);C(c$,function(a){O(this,java.util.Properties,[]);this.defaults=a},"java.util.Properties");b(c$,"dumpString",($fz=function(a,c,d){var b=0;!d&&(b<c.length&&32==c.charAt(b).charCodeAt(0))&&(a.append("\\ "),b++);for(;b<c.length;b++){var f=c.charAt(b);switch(f){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(f)||d&&
32==f.charCodeAt(0))&&a.append("\\");if(!(32<=f.charCodeAt(0)&&126>=f.charCodeAt(0))){f=Integer.toHexString(f.charCodeAt(0));a.append("\\u");for(var g=0;g<4-f.length;g++)a.append("0")}a.append(f)}}},$fz.isPrivate=!0,$fz),"StringBuilder,~S,~B");b(c$,"getProperty",function(a){var c=this.get(a),c=S(c,String)?c:null;null==c&&null!=this.defaults&&(c=this.defaults.getProperty(a));return c},"~S");b(c$,"getProperty",function(a,c){var d=this.get(a),d=S(d,String)?d:null;null==d&&null!=this.defaults&&(d=this.defaults.getProperty(a));
return null==d?c:d},"~S,~S");b(c$,"list",function(a){if(null==a)throw new NullPointerException;for(var c=new StringBuffer(80),d=this.propertyNames();d.hasMoreElements();){var b=d.nextElement();c.append(b);c.append("=");for(var f=this.get(b),g=this.defaults;null==f;)f=g.get(b),g=g.defaults;40<f.length?(c.append(f.substring(0,37)),c.append("...")):c.append(f);a.println(c.toString());c.setLength(0)}},"java.io.PrintStream");b(c$,"list",function(a){if(null==a)throw new NullPointerException;for(var c=new StringBuffer(80),
d=this.propertyNames();d.hasMoreElements();){var b=d.nextElement();c.append(b);c.append("=");for(var f=this.get(b),g=this.defaults;null==f;)f=g.get(b),g=g.defaults;40<f.length?(c.append(f.substring(0,37)),c.append("...")):c.append(f);a.println(c.toString());c.setLength(0)}},"java.io.PrintWriter");b(c$,"load",function(){},"java.io.InputStream");b(c$,"propertyNames",function(){if(null==this.defaults)return this.keys();for(var a=new java.util.Hashtable(this.defaults.size()+this.size()),c=this.defaults.propertyNames();c.hasMoreElements();)a.put(c.nextElement(),
a);for(c=this.keys();c.hasMoreElements();)a.put(c.nextElement(),a);return a.keys()});b(c$,"save",function(a,c){try{this.store(a,c)}catch(d){if(!S(d,java.io.IOException))throw d;}},"java.io.OutputStream,~S");b(c$,"setProperty",function(a,c){return this.put(a,c)},"~S,~S");b(c$,"store",function(){},"java.io.OutputStream,~S");b(c$,"loadFromXML",function(){},"java.io.InputStream");b(c$,"storeToXML",function(){},"java.io.OutputStream,~S");b(c$,"storeToXML",function(){},"java.io.OutputStream,~S,~S");b(c$,
"substitutePredefinedEntries",($fz=function(a){return a.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll("'","&apos;").replaceAll('"',"&quot;")},$fz.isPrivate=!0,$fz),"~S");ha(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$=I(function(){this.haveNextNextGaussian=!1;this.nextNextGaussian=this.seed=0;H(this,arguments)},java.util,"Random",null,java.io.Serializable);C(c$,function(){this.setSeed(System.currentTimeMillis())});C(c$,function(a){this.setSeed(a)},"~N");b(c$,"next",function(a){this.seed=25214903917*this.seed+11&0xffffffffffff;return this.seed>>>
48-a},"~N");b(c$,"nextBoolean",function(){return 0.5<Math.random()});b(c$,"nextBytes",function(){for(var a=0;a<bytes.length;a++)bytes[a]=Math.round(256*Math.random())},"~A");b(c$,"nextDouble",function(){return Math.random()});b(c$,"nextFloat",function(){return Math.random()});b(c$,"nextGaussian",function(){if(this.haveNextNextGaussian)return this.haveNextNextGaussian=!1,this.nextNextGaussian;var a,c,d;do a=2*this.nextDouble()-1,c=2*this.nextDouble()-1,d=a*a+c*c;while(1<=d);d=Math.sqrt(-2*Math.log(d)/
d);this.nextNextGaussian=c*d;this.haveNextNextGaussian=!0;return a*d});b(c$,"nextInt",function(){return Math.ceil(65535*Math.random())-32768});b(c$,"nextInt",function(a){if(0<a){if((a&-a)==a)return a*this.next(31)>>31;var c,d;do c=this.next(31),d=c%a;while(0>c-d+(a-1));return d}throw new IllegalArgumentException;},"~N");b(c$,"nextLong",function(){return Math.ceil(4294967295*Math.random())-2147483648});b(c$,"setSeed",function(a){this.seed=(a^25214903917)&0xffffffffffff;this.haveNextNextGaussian=!1},
"~N");ha(c$,"multiplier",25214903917)});W(["java.util.Map"],"java.util.SortedMap",null,function(){Z(java.util,"SortedMap",java.util.Map)});W(["java.util.Set"],"java.util.SortedSet",null,function(){Z(java.util,"SortedSet",java.util.Set)});W(["java.util.Enumeration"],"java.util.StringTokenizer",["java.lang.NullPointerException","java.util.NoSuchElementException"],function(){c$=I(function(){this.delimiters=this.string=null;this.returnDelimiters=!1;this.position=0;H(this,arguments)},java.util,"StringTokenizer",
null,java.util.Enumeration);C(c$,function(a){this.construct(a," \t\n\r\f",!1)},"~S");C(c$,function(a,c){this.construct(a,c,!1)},"~S,~S");C(c$,function(a,c,d){if(null!=a)this.string=a,this.delimiters=c,this.returnDelimiters=d,this.position=0;else throw new NullPointerException;},"~S,~S,~B");b(c$,"countTokens",function(){for(var a=0,c=!1,d=this.position,b=this.string.length;d<b;d++)0<=this.delimiters.indexOf(this.string.charAt(d),0)?(this.returnDelimiters&&a++,c&&(a++,c=!1)):c=!0;c&&a++;return a});
e(c$,"hasMoreElements",function(){return this.hasMoreTokens()});b(c$,"hasMoreTokens",function(){var a=this.string.length;if(this.position<a){if(this.returnDelimiters)return!0;for(var c=this.position;c<a;c++)if(-1==this.delimiters.indexOf(this.string.charAt(c),0))return!0}return!1});e(c$,"nextElement",function(){return this.nextToken()});b(c$,"nextToken",function(){var a=this.position,c=this.string.length;if(a<c){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<c;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<c&&0<=this.delimiters.indexOf(this.string.charAt(a),0);)a++;this.position=a;if(a<c){for(this.position++;this.position<c;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;});b(c$,"nextToken",function(a){this.delimiters=a;return this.nextToken()},"~S")});p("javajs.api");P(javajs.api,"BytePoster");p("javajs.api");P(javajs.api,"EventManager");p("javajs.api");P(javajs.api,"FontManager");p("javajs.api");P(javajs.api,"GenericColor");p("javajs.api");P(javajs.api,"GenericFileInterface");p("javajs.api");P(javajs.api,"GenericMenuInterface");p("javajs.api");P(javajs.api,"GenericMouseInterface");p("javajs.api");
q(["javajs.api.FontManager"],"javajs.api.GenericPlatform",null,function(){c$=P(javajs.api,"GenericPlatform",javajs.api.FontManager);B(c$,"CURSOR_DEFAULT",0,"CURSOR_CROSSHAIR",1,"CURSOR_WAIT",3,"CURSOR_ZOOM",8,"CURSOR_HAND",12,"CURSOR_MOVE",13)});p("javajs.api");P(javajs.api,"JSInterface");p("javajs.api");P(javajs.api,"PlatformViewer");p("javajs.api");P(javajs.api,"ZInputStream");p("javajs.awt");q(["javajs.api.GenericColor"],"javajs.awt.Color",null,function(){c$=u(function(){this.argb=0;t(this,arguments)},
javajs.awt,"Color",null,javajs.api.GenericColor);e(c$,"getRGB",function(){return this.argb&16777215});e(c$,"getOpacity255",function(){return this.argb>>24&255});e(c$,"setOpacity255",function(a){this.argb=this.argb&16777215|(a&255)<<24},"~N");c$.get1=b(c$,"get1",function(a){var c=new javajs.awt.Color;c.argb=a|4278190080;return c},"~N");c$.get3=b(c$,"get3",function(a,c,d){return(new javajs.awt.Color).set4(a,c,d,255)},"~N,~N,~N");c$.get4=b(c$,"get4",function(a,c,d,b){return(new javajs.awt.Color).set4(a,
c,d,b)},"~N,~N,~N,~N");b(c$,"set4",function(a,c,d,b){this.argb=(b<<24|a<<16|c<<8|d)&4294967295;return this},"~N,~N,~N,~N")});p("javajs.awt");c$=u(function(){this.height=this.width=0;t(this,arguments)},javajs.awt,"Dimension");w(c$,function(a,c){this.set(a,c)},"~N,~N");b(c$,"set",function(a,c){this.width=a;this.height=c;return this},"~N,~N");p("javajs.awt.event");c$=u(function(){this.source=null;t(this,arguments)},javajs.awt.event,"Event");b(c$,"getSource",function(){return this.source});B(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);p("javajs.awt");q(null,"javajs.awt.Font",["JU.AU"],function(){c$=u(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;t(this,arguments)},javajs.awt,"Font");w(c$,function(a,c,d,b,f,g,h){this.manager=a;this.fid=c;this.fontFace=javajs.awt.Font.fontFaces[d];this.fontStyle=
javajs.awt.Font.fontStyles[b];this.idFontFace=d;this.idFontStyle=b;this.fontSize=f;this.isBold=1==(b&1);this.isItalic=2==(b&2);this.fontSizeNominal=g;this.font=a.newFont(javajs.awt.Font.fontFaces[d],this.isBold,this.isItalic,f);this.fontMetrics=a.getFontMetrics(this,h);this.descent=a.getFontDescent(this.fontMetrics);this.ascent=a.getFontAscent(this.fontMetrics)},"javajs.api.FontManager,~N,~N,~N,~N,~N,~O");c$.getFont3D=b(c$,"getFont3D",function(a){return javajs.awt.Font.font3ds[a&255]},"~N");c$.createFont3D=
b(c$,"createFont3D",function(a,c,d,b,f,g){255<d&&(d=255);for(var h=z(d)<<4,h=a&3|(c&3)<<2|h<<4,l=javajs.awt.Font.fontkeyCount;0<--l;)if(h==javajs.awt.Font.fontkeys[l]&&javajs.awt.Font.font3ds[l].fontSizeNominal==b)return javajs.awt.Font.font3ds[l];l=javajs.awt.Font.fontkeyCount++;l==javajs.awt.Font.fontkeys.length&&(javajs.awt.Font.fontkeys=JU.AU.arrayCopyI(javajs.awt.Font.fontkeys,l+8));javajs.awt.Font.font3ds=JU.AU.arrayCopyObject(javajs.awt.Font.font3ds,l+8);a=new javajs.awt.Font(f,l,a,c,d,b,g);
javajs.awt.Font.font3ds[l]=a;javajs.awt.Font.fontkeys[l]=h;return a},"~N,~N,~N,~N,javajs.api.FontManager,~O");c$.getFontFaceID=b(c$,"getFontFaceID",function(a){return"Monospaced".equalsIgnoreCase(a)?2:"Serif".equalsIgnoreCase(a)?1:0},"~S");c$.getFontStyleID=b(c$,"getFontStyleID",function(a){for(var c=4;0<=--c;)if(javajs.awt.Font.fontStyles[c].equalsIgnoreCase(a))return c;return-1},"~S");b(c$,"getAscent",function(){return this.ascent});b(c$,"getDescent",function(){return this.descent});b(c$,"getHeight",
function(){return this.getAscent()+this.getDescent()});b(c$,"getFontMetrics",function(){return this.fontMetrics});b(c$,"stringWidth",function(a){return this.manager.fontStringWidth(this,a)},"~S");b(c$,"getInfo",function(){return this.fontSizeNominal+" "+this.fontFace+" "+this.fontStyle});B(c$,"FONT_ALLOCATION_UNIT",8,"fontkeyCount",1,"fontkeys",D(8,0));c$.font3ds=c$.prototype.font3ds=Array(8);B(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"])});p("JU");q(null,"JU.A4",["JU.T3"],function(){c$=u(function(){this.angle=this.z=this.y=this.x=0;t(this,arguments)},JU,"A4",null,java.io.Serializable);w(c$,function(){this.z=1});c$.new4=b(c$,"new4",function(a,c,d,b){var f=new JU.A4;f.set4(a,c,d,b);return f},"~N,~N,~N,~N");c$.newAA=b(c$,"newAA",function(a){var c=new JU.A4;c.set4(a.x,a.y,a.z,a.angle);return c},
"JU.A4");c$.newVA=b(c$,"newVA",function(a,c){var d=new JU.A4;d.setVA(a,c);return d},"JU.V3,~N");b(c$,"setVA",function(a,c){this.x=a.x;this.y=a.y;this.z=a.z;this.angle=c},"JU.V3,~N");b(c$,"set4",function(a,c,d,b){this.x=a;this.y=c;this.z=d;this.angle=b},"~N,~N,~N,~N");b(c$,"setAA",function(a){this.x=a.x;this.y=a.y;this.z=a.z;this.angle=a.angle},"JU.A4");b(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");b(c$,"setFromMat",function(a,c,d,b,f,g,h,
l,e){a=0.5*(a+f+e-1);this.x=l-g;this.y=d-h;this.z=b-c;c=0.5*Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z);this.angle=Math.atan2(c,a)},"~N,~N,~N,~N,~N,~N,~N,~N,~N");e(c$,"toString",function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.angle+")"});e(c$,"equals",function(a){return!s(a,JU.A4)?!1:this.x==a.x&&this.y==a.y&&this.z==a.z&&this.angle==a.angle},"~O");e(c$,"hashCode",function(){return JU.T3.floatToIntBits0(this.x)^JU.T3.floatToIntBits0(this.y)^JU.T3.floatToIntBits0(this.z)^JU.T3.floatToIntBits0(this.angle)})});
p("JU");q(["java.net.URLConnection"],"JU.AjaxURLConnection",null,function(){c$=u(function(){this.bytesOut=null;this.postOut="";t(this,arguments)},JU,"AjaxURLConnection",java.net.URLConnection);b(c$,"doAjax",function(){return Jmol._doAjax(this.url,this.postOut,this.bytesOut)});e(c$,"connect",function(){});b(c$,"outputBytes",function(a){this.bytesOut=a},"~A");b(c$,"outputString",function(a){this.postOut=a},"~S");b(c$,"getSB",function(){return this.doAjax()})});p("JU");q(["java.net.URLStreamHandler"],
"JU.AjaxURLStreamHandler",["JU.AjaxURLConnection","$.SB"],function(){c$=u(function(){this.protocol=null;t(this,arguments)},JU,"AjaxURLStreamHandler",java.net.URLStreamHandler);w(c$,function(a){R(this,JU.AjaxURLStreamHandler,[]);this.protocol=a},"~S");e(c$,"openConnection",function(a){return new JU.AjaxURLConnection(a)},"java.net.URL");e(c$,"toExternalForm",function(a){var c=new JU.SB;c.append(a.getProtocol());c.append(":");null!=a.getAuthority()&&0<a.getAuthority().length&&(c.append("//"),c.append(a.getAuthority()));
null!=a.getPath()&&c.append(a.getPath());null!=a.getQuery()&&(c.append("?"),c.append(a.getQuery()));null!=a.getRef()&&(c.append("#"),c.append(a.getRef()));return c.toString()},"java.net.URL")});p("JU");q(["java.net.URLStreamHandlerFactory","java.util.Hashtable"],"JU.AjaxURLStreamHandlerFactory",["JU.AjaxURLStreamHandler"],function(){c$=u(function(){this.htFactories=null;t(this,arguments)},JU,"AjaxURLStreamHandlerFactory",null,java.net.URLStreamHandlerFactory);N(c$,function(){this.htFactories=new java.util.Hashtable});
e(c$,"createURLStreamHandler",function(a){var c=this.htFactories.get(a);null==c&&this.htFactories.put(a,c=new JU.AjaxURLStreamHandler(a));return null==c.protocol?null:c},"~S")});p("JU");q(null,"JU.AU",["java.util.Arrays","JU.List"],function(){c$=G(JU,"AU");c$.ensureLength=b(c$,"ensureLength",function(a,c){return null!=a&&JU.AU.getLength(a)>=c?a:JU.AU.arrayCopyObject(a,c)},"~O,~N");c$.ensureLengthS=b(c$,"ensureLengthS",function(a,c){return null!=a&&a.length>=c?a:JU.AU.arrayCopyS(a,c)},"~A,~N");c$.ensureLengthA=
b(c$,"ensureLengthA",function(a,c){return null!=a&&a.length>=c?a:JU.AU.arrayCopyF(a,c)},"~A,~N");c$.ensureLengthI=b(c$,"ensureLengthI",function(a,c){return null!=a&&a.length>=c?a:JU.AU.arrayCopyI(a,c)},"~A,~N");c$.ensureLengthShort=b(c$,"ensureLengthShort",function(a,c){return null!=a&&a.length>=c?a:JU.AU.arrayCopyShort(a,c)},"~A,~N");c$.ensureLengthByte=b(c$,"ensureLengthByte",function(a,c){return null!=a&&a.length>=c?a:JU.AU.arrayCopyByte(a,c)},"~A,~N");c$.doubleLength=b(c$,"doubleLength",function(a){return JU.AU.arrayCopyObject(a,
null==a?16:2*JU.AU.getLength(a))},"~O");c$.doubleLengthS=b(c$,"doubleLengthS",function(a){return JU.AU.arrayCopyS(a,null==a?16:2*a.length)},"~A");c$.doubleLengthF=b(c$,"doubleLengthF",function(a){return JU.AU.arrayCopyF(a,null==a?16:2*a.length)},"~A");c$.doubleLengthI=b(c$,"doubleLengthI",function(a){return JU.AU.arrayCopyI(a,null==a?16:2*a.length)},"~A");c$.doubleLengthShort=b(c$,"doubleLengthShort",function(a){return JU.AU.arrayCopyShort(a,null==a?16:2*a.length)},"~A");c$.doubleLengthByte=b(c$,
"doubleLengthByte",function(a){return JU.AU.arrayCopyByte(a,null==a?16:2*a.length)},"~A");c$.doubleLengthBool=b(c$,"doubleLengthBool",function(a){return JU.AU.arrayCopyBool(a,null==a?16:2*a.length)},"~A");c$.deleteElements=b(c$,"deleteElements",function(a,c,d){if(0==d||null==a)return a;var b=JU.AU.getLength(a);if(c>=b)return a;b-=c+d;0>b&&(b=0);var f=JU.AU.newInstanceO(a,c+b);0<c&&System.arraycopy(a,0,f,0,c);0<b&&System.arraycopy(a,c+d,f,c,b);return f},"~O,~N,~N");c$.arrayCopyObject=b(c$,"arrayCopyObject",
function(a,c){if(null==a)return null;var d=JU.AU.getLength(a);if(c==d)return a;var b=JU.AU.newInstanceO(a,c);System.arraycopy(a,0,b,0,d<c?d:c);return b},"~O,~N");c$.newInstanceO=b(c$,"newInstanceO",function(a,c){return Array(c)},"~O,~N");c$.getLength=b(c$,"getLength",function(a){return a.length},"~O");c$.arrayCopyS=b(c$,"arrayCopyS",function(a,c){0>c&&(c=a.length);var d=Array(c);if(null!=a){var b=a.length;System.arraycopy(a,0,d,0,b<c?b:c)}return d},"~A,~N");c$.arrayCopyII=b(c$,"arrayCopyII",function(a,
c){var d=JU.AU.newInt2(c);if(null!=a){var b=a.length;System.arraycopy(a,0,d,0,b<c?b:c)}return d},"~A,~N");c$.arrayCopyPt=b(c$,"arrayCopyPt",function(a,c){0>c&&(c=a.length);var d=Array(c);if(null!=a){var b=a.length;System.arraycopy(a,0,d,0,b<c?b:c)}return d},"~A,~N");c$.arrayCopyF=b(c$,"arrayCopyF",function(a,c){0>c&&(c=a.length);var d=M(c,0);if(null!=a){var b=a.length;System.arraycopy(a,0,d,0,b<c?b:c)}return d},"~A,~N");c$.arrayCopyI=b(c$,"arrayCopyI",function(a,c){0>c&&(c=a.length);var d=D(c,0);
if(null!=a){var b=a.length;System.arraycopy(a,0,d,0,b<c?b:c)}return d},"~A,~N");c$.arrayCopyRangeI=b(c$,"arrayCopyRangeI",function(a,c,d){if(null==a)return null;var b=a.length;-1==d&&(d=b);-2==d&&(d=m(b/2));d-=c;b=D(d,0);System.arraycopy(a,c,b,0,d);return b},"~A,~N,~N");c$.arrayCopyRangeRevI=b(c$,"arrayCopyRangeRevI",function(a,c,d){if(null==a)return null;c=JU.AU.arrayCopyRangeI(a,c,d);0>d&&(d=a.length);for(a=m(d/2);0<=--a;)JU.AU.swapInt(c,a,d-1-a);return c},"~A,~N,~N");c$.arrayCopyShort=b(c$,"arrayCopyShort",
function(a,c){0>c&&(c=a.length);var d=ea(c,0);if(null!=a){var b=a.length;System.arraycopy(a,0,d,0,b<c?b:c)}return d},"~A,~N");c$.arrayCopyByte=b(c$,"arrayCopyByte",function(a,c){0>c&&(c=a.length);var d=T(c,0);if(null!=a){var b=a.length;System.arraycopy(a,0,d,0,b<c?b:c)}return d},"~A,~N");c$.arrayCopyBool=b(c$,"arrayCopyBool",function(a,c){0>c&&(c=a.length);var d=va(c,!1);if(null!=a){var b=a.length;System.arraycopy(a,0,d,0,b<c?b:c)}return d},"~A,~N");c$.swapInt=b(c$,"swapInt",function(a,c,d){var b=
a[c];a[c]=a[d];a[d]=b},"~A,~N,~N");c$.dumpArray=b(c$,"dumpArray",function(a,c,d,b,f,g){a="dumpArray: "+a+"\n";for(var h=d;h<=b;h++)a+="\t*"+h+"*";for(;g>=f;g--){a+="\n*"+g+"*";for(h=d;h<=b;h++)a+="\t"+(h<c.length&&g<c[h].length?c[h][g]:NaN)}return a},"~S,~A,~N,~N,~N,~N");c$.dumpIntArray=b(c$,"dumpIntArray",function(a,c){for(var d="",b=0;b<c;b++)d+=" "+a[b];return d},"~A,~N");c$.sortedItem=b(c$,"sortedItem",function(a,c){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[c%d.length]},"JU.List,~N");c$.createArrayOfArrayList=b(c$,"createArrayOfArrayList",function(a){return Array(a)},"~N");c$.createArrayOfHashtable=b(c$,"createArrayOfHashtable",function(a){return Array(a)},"~N");c$.swap=b(c$,"swap",function(a,c,d){var b=a[c];a[c]=a[d];a[d]=b},"~A,~N,~N");c$.newFloat2=b(c$,"newFloat2",function(a){return ia(a,null)},"~N");c$.newInt2=b(c$,"newInt2",function(a){return ia(a,null)},"~N");c$.newInt3=b(c$,"newInt3",function(a){return ia(a,null)},
"~N,~N");c$.newFloat3=b(c$,"newFloat3",function(a){return ia(a,null)},"~N,~N");c$.newInt4=b(c$,"newInt4",function(a){return ia(a,null)},"~N");c$.newShort2=b(c$,"newShort2",function(a){return ia(a,null)},"~N");c$.newByte2=b(c$,"newByte2",function(a){return ia(a,null)},"~N");c$.newDouble2=b(c$,"newDouble2",function(a){return ia(a,null)},"~N");c$.removeMapKeys=b(c$,"removeMapKeys",function(a,c){for(var d=new JU.List,b,f=a.keySet().iterator();f.hasNext()&&((b=f.next())||1);)b.startsWith(c)&&d.addLast(b);
for(b=d.size();0<=--b;)a.remove(d.get(b));return d.size()},"java.util.Map,~S")});p("JU");q(null,"JU.Base64",["JU.SB"],function(){c$=G(JU,"Base64");c$.getBytes64=b(c$,"getBytes64",function(a){return JU.Base64.getBase64(a).toBytes(0,-1)},"~A");c$.getBase64=b(c$,"getBase64",function(a){var c=a.length,d=new JU.SB;if(0==c)return d;for(var b=0,f=0;b<c&&0==f;){0==b%75&&0!=b&&d.append("\r\n");var f=b+2==c?1:b+1==c?2:0,g=a[b++]<<16&16711680|(2==f?0:a[b++]<<8)&65280|(1<=f?0:a[b++])&255;d.appendC(JU.Base64.base64.charAt(g>>
18&63));d.appendC(JU.Base64.base64.charAt(g>>12&63));d.appendC(2==f?"=":JU.Base64.base64.charAt(g>>6&63));d.appendC(1<=f?"=":JU.Base64.base64.charAt(g&63))}return d},"~A");c$.decodeBase64=b(c$,"decodeBase64",function(a){var c=0,d,b=a.indexOf(";base64,")+1;0<b&&(b+=7);a=a.toCharArray();var f=a.length;if(0==f)return T(0,0);for(var g=f;--g>=b;)c+=65==(d=a[g].charCodeAt(0)&127)||0<JU.Base64.decode64[d]?3:0;for(var c=c>>2,h=T(c,0),l=18,g=b,e=b=0;g<f;g++)if(0<JU.Base64.decode64[d=a[g].charCodeAt(0)&127]||
65==d||61==d)e|=JU.Base64.decode64[d]<<l,l-=6,0>l&&(h[b++]=(e&16711680)>>16,b<c&&(h[b++]=(e&65280)>>8),b<c&&(h[b++]=e&255),l=18,e=0);return h},"~S");B(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])});p("JU");q(["javajs.api.JSONEncodable"],"JU.BS",["java.lang.IndexOutOfBoundsException","$.NegativeArraySizeException","JU.SB"],function(){c$=u(function(){this.words=null;this.wordsInUse=0;this.sizeIsSticky=!1;t(this,arguments)},JU,"BS",null,[Cloneable,javajs.api.JSONEncodable]);c$.wordIndex=b(c$,"wordIndex",function(a){return a>>5},"~N");b(c$,"recalculateWordsInUse",function(){var a;for(a=this.wordsInUse-1;0<=a&&0==this.words[a];a--);this.wordsInUse=
a+1});w(c$,function(){this.initWords(32);this.sizeIsSticky=!1});c$.newN=b(c$,"newN",function(a){var c=new JU.BS;c.init(a);return c},"~N");b(c$,"init",function(a){if(0>a)throw new NegativeArraySizeException("nbits < 0: "+a);this.initWords(a);this.sizeIsSticky=!0},"~N");b(c$,"initWords",function(a){this.words=D(JU.BS.wordIndex(a-1)+1,0)},"~N");b(c$,"ensureCapacity",function(a){this.words.length<a&&(a=Math.max(2*this.words.length,a),this.setLength(a),this.sizeIsSticky=!1)},"~N");b(c$,"expandTo",function(a){a+=
1;this.wordsInUse<a&&(this.ensureCapacity(a),this.wordsInUse=a)},"~N");b(c$,"set",function(a){if(0>a)throw new IndexOutOfBoundsException("bitIndex < 0: "+a);var c=JU.BS.wordIndex(a);this.expandTo(c);this.words[c]|=1<<a},"~N");b(c$,"setBitTo",function(a,c){c?this.set(a):this.clear(a)},"~N,~B");b(c$,"setBits",function(a,c){if(a!=c){var d=JU.BS.wordIndex(a),b=JU.BS.wordIndex(c-1);this.expandTo(b);var f=-1<<a,g=-1>>>-c;if(d==b)this.words[d]|=f&g;else{this.words[d]|=f;for(d+=1;d<b;d++)this.words[d]=-1;
this.words[b]|=g}}},"~N,~N");b(c$,"clear",function(a){if(0>a)throw new IndexOutOfBoundsException("bitIndex < 0: "+a);var c=JU.BS.wordIndex(a);c>=this.wordsInUse||(this.words[c]&=~(1<<a),this.recalculateWordsInUse())},"~N");b(c$,"clearBits",function(a,c){if(a!=c){var d=JU.BS.wordIndex(a);if(!(d>=this.wordsInUse)){var b=JU.BS.wordIndex(c-1);b>=this.wordsInUse&&(c=this.length(),b=this.wordsInUse-1);var f=-1<<a,g=-1>>>-c;if(d==b)this.words[d]&=~(f&g);else{this.words[d]&=~f;for(d+=1;d<b;d++)this.words[d]=
0;this.words[b]&=~g}this.recalculateWordsInUse()}}},"~N,~N");b(c$,"clearAll",function(){for(;0<this.wordsInUse;)this.words[--this.wordsInUse]=0});b(c$,"get",function(a){if(0>a)throw new IndexOutOfBoundsException("bitIndex < 0: "+a);var c=JU.BS.wordIndex(a);return c<this.wordsInUse&&0!=(this.words[c]&1<<a)},"~N");b(c$,"nextSetBit",function(a){if(0>a)throw new IndexOutOfBoundsException("fromIndex < 0: "+a);var c=JU.BS.wordIndex(a);if(c>=this.wordsInUse)return-1;for(a=this.words[c]&-1<<a;;){if(0!=a)return 32*
c+Integer.numberOfTrailingZeros(a);if(++c==this.wordsInUse)return-1;a=this.words[c]}},"~N");b(c$,"nextClearBit",function(a){if(0>a)throw new IndexOutOfBoundsException("fromIndex < 0: "+a);var c=JU.BS.wordIndex(a);if(c>=this.wordsInUse)return a;for(a=~this.words[c]&-1<<a;;){if(0!=a)return 32*c+Integer.numberOfTrailingZeros(a);if(++c==this.wordsInUse)return 32*this.wordsInUse;a=~this.words[c]}},"~N");b(c$,"length",function(){return 0==this.wordsInUse?0:32*(this.wordsInUse-1)+(32-Integer.numberOfLeadingZeros(this.words[this.wordsInUse-
1]))});b(c$,"isEmpty",function(){return 0==this.wordsInUse});b(c$,"intersects",function(a){for(var c=Math.min(this.wordsInUse,a.wordsInUse)-1;0<=c;c--)if(0!=(this.words[c]&a.words[c]))return!0;return!1},"JU.BS");b(c$,"cardinality",function(){for(var a=0,c=0;c<this.wordsInUse;c++)a+=Integer.bitCount(this.words[c]);return a});b(c$,"and",function(a){if(this!==a){for(;this.wordsInUse>a.wordsInUse;)this.words[--this.wordsInUse]=0;for(var c=0;c<this.wordsInUse;c++)this.words[c]&=a.words[c];this.recalculateWordsInUse()}},
"JU.BS");b(c$,"or",function(a){if(this!==a){var c=Math.min(this.wordsInUse,a.wordsInUse);this.wordsInUse<a.wordsInUse&&(this.ensureCapacity(a.wordsInUse),this.wordsInUse=a.wordsInUse);for(var d=0;d<c;d++)this.words[d]|=a.words[d];c<a.wordsInUse&&System.arraycopy(a.words,c,this.words,c,this.wordsInUse-c)}},"JU.BS");b(c$,"xor",function(a){var c=Math.min(this.wordsInUse,a.wordsInUse);this.wordsInUse<a.wordsInUse&&(this.ensureCapacity(a.wordsInUse),this.wordsInUse=a.wordsInUse);for(var d=0;d<c;d++)this.words[d]^=
a.words[d];c<a.wordsInUse&&System.arraycopy(a.words,c,this.words,c,a.wordsInUse-c);this.recalculateWordsInUse()},"JU.BS");b(c$,"andNot",function(a){for(var c=Math.min(this.wordsInUse,a.wordsInUse)-1;0<=c;c--)this.words[c]&=~a.words[c];this.recalculateWordsInUse()},"JU.BS");e(c$,"hashCode",function(){for(var a=1234,c=this.wordsInUse;0<=--c;)a^=this.words[c]*(c+1);return a>>32^a});b(c$,"size",function(){return 32*this.words.length});e(c$,"equals",function(a){if(!s(a,JU.BS))return!1;if(this===a)return!0;
if(this.wordsInUse!=a.wordsInUse)return!1;for(var c=0;c<this.wordsInUse;c++)if(this.words[c]!=a.words[c])return!1;return!0},"~O");e(c$,"clone",function(){!this.sizeIsSticky&&this.wordsInUse!=this.words.length&&this.setLength(this.wordsInUse);return JU.BS.copy(this)});b(c$,"setLength",function(a){var c=D(a,0);System.arraycopy(this.words,0,c,0,Math.min(this.wordsInUse,a));this.words=c},"~N");e(c$,"toString",function(){var a=128<this.wordsInUse?this.cardinality():32*this.wordsInUse,a=JU.SB.newN(6*a+
2);a.appendC("[");var c=this.nextSetBit(0);if(-1!=c){a.appendI(c);for(c=this.nextSetBit(c+1);0<=c;c=this.nextSetBit(c+1)){var d=this.nextClearBit(c);do a.append(", ").appendI(c);while(++c<d)}}a.appendC("]");return a.toString()});c$.copy=b(c$,"copy",function(a){var c=null,c=Ia(a),d=a.wordsInUse;0==d?c.words=JU.BS.emptyBitmap:(c.words=D(d,0),System.arraycopy(a.words,0,c.words,0,d));return c},"JU.BS");b(c$,"cardinalityN",function(a){for(var c=this.cardinality(),d=this.length();--d>=a;)this.get(d)&&c--;
return c},"~N");e(c$,"toJSON",function(){return this.toString()});B(c$,"ADDRESS_BITS_PER_WORD",5,"BITS_PER_WORD",32,"WORD_MASK",4294967295,"emptyBitmap",D(0,0))});p("JU");q(["java.util.Hashtable"],"JU.CU",["JU.P3","$.PT"],function(){c$=G(JU,"CU");c$.toRGBHexString=b(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 b="00"+Integer.toHexString(d>>8&255),b=b.substring(b.length-2),d="00"+Integer.toHexString(d&255),
d=d.substring(d.length-2);return a+b+d},"javajs.api.GenericColor");c$.toCSSString=b(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=b(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 b;if(0<=a.indexOf(",")){b=JU.PT.split(a.substring(1,a.length-1),
",");if(3!=b.length)return 0;a=JU.PT.parseFloat(b[0]);d=JU.PT.parseFloat(b[1]);b=JU.PT.parseFloat(b[2]);return JU.CU.colorTriadToFFRGB(a,d,b)}switch(d){case 9:b="x";break;case 10:b="0x";break;default:return 0}if(1!=a.indexOf(b))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(f){if(y(f,Exception))return 0;throw f;}a=JU.CU.mapJavaScriptColors.get(a.toLowerCase());return null==a?0:a.intValue()},"~S");c$.colorTriadToFFRGB=
b(c$,"colorTriadToFFRGB",function(a,d,b){1>=a&&(1>=d&&1>=b)&&(0<a&&(a=256*a-1),0<d&&(d=256*d-1),0<b&&(b=256*b-1));return JU.CU.rgb(z(a),z(d),z(b))},"~N,~N,~N");c$.rgb=b(c$,"rgb",function(a,d,b){return 4278190080|a<<16|d<<8|b},"~N,~N,~N");c$.colorPtFromString=b(c$,"colorPtFromString",function(a,d){return JU.CU.toRGBpt(JU.CU.getArgbFromString(a),d)},"~S,JU.P3");c$.colorPtFromInt2=b(c$,"colorPtFromInt2",function(a){return JU.P3.new3(a>>16&255,a>>8&255,a&255)},"~N");c$.colorPtToFFRGB=b(c$,"colorPtToFFRGB",
function(a){return JU.CU.colorTriadToFFRGB(a.x,a.y,a.z)},"JU.T3");c$.toRGBpt=b(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=b(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=b(c$,"toFFGGGfromRGB",function(a){a=m((2989*(a>>16&255)+5870*(a>>8&255)+1140*(a&255)+5E3)/1E4)&16777215;return JU.CU.rgb(a,a,a)},"~N");B(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]))});p("JU");q(["java.lang.Boolean"],
"JU.DF",["java.lang.Double","$.Float","JU.PT","$.SB"],function(){c$=G(JU,"DF");c$.setUseNumberLocalization=b(c$,"setUseNumberLocalization",function(a){JU.DF.useNumberLocalization[0]=a?Boolean.TRUE:Boolean.FALSE},"~B");c$.formatDecimalDbl=b(c$,"formatDecimalDbl",function(a,c){return 2147483647==c||-Infinity==a||Infinity==a||Double.isNaN(a)?""+a:JU.DF.formatDecimal(a,c)},"~N,~N");c$.formatDecimal=b(c$,"formatDecimal",function(a,c){if(2147483647==c||-Infinity==a||Infinity==a||Float.isNaN(a))return""+
a;var d;if(0>c){c=-c;c>JU.DF.formattingStrings.length&&(c=JU.DF.formattingStrings.length);if(0==a)return JU.DF.formattingStrings[c]+"E+0";var b;1>Math.abs(a)?(d=10,b=1E-10*a):(d=-10,b=1E10*a);b=(""+b).toUpperCase();var f=b.indexOf("E");d=JU.PT.parseInt(b.substring(f+1))+d;return 0>f?""+a:JU.DF.formatDecimal(JU.PT.parseFloat(b.substring(0,f)),c-1)+"E"+(0<=d?"+":"")+d}c>=JU.DF.formattingStrings.length&&(c=JU.DF.formattingStrings.length-1);b=(""+a).toUpperCase();var g=b.startsWith("-");g&&(b=b.substring(1));
d=b.indexOf(".");if(0>d)return b+JU.DF.formattingStrings[c].substring(1);f=b.indexOf("E-");0<f&&(d=JU.PT.parseInt(b.substring(f+1)),b="0."+"0000000000000000000000000000000000000000".substring(0,-d-1)+b.substring(0,1)+b.substring(2,f),d=1);f=b.indexOf("E");0<f&&(d=JU.PT.parseInt(b.substring(f+1)),b=b.substring(0,1)+b.substring(2,f)+"0000000000000000000000000000000000000000",b=b.substring(0,d+1)+"."+b.substring(d+1),d=b.indexOf("."));var h=b.length,f=c+d+1;if(f<h&&"5"<=b.charAt(f))return JU.DF.formatDecimal(a+
(g?-1:1)*JU.DF.formatAdds[c],c);for(var l=JU.SB.newS(b.substring(0,0==c?d:++d)),f=0;f<c;f++,d++)d<h?l.appendC(b.charAt(d)):l.appendC("0");b=(g?"-":"")+l;return Boolean.TRUE.equals(JU.DF.useNumberLocalization[0])?b:b.$replace(",",".")},"~N,~N");c$.formatDecimalTrimmed=b(c$,"formatDecimalTrimmed",function(a,c){for(var d=JU.DF.formatDecimalDbl(a,c),b=d.length-1;0<=b&&"0"==d.charAt(b);)b--;return d.substring(0,b+1)},"~N,~N");B(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]});p("JU");q(["java.lang.Enum"],"JU.Encoding",null,function(){c$=G(JU,"Encoding",Enum);r(c$,"NONE",0,[]);r(c$,"UTF8",1,[]);r(c$,"UTF_16BE",2,[]);r(c$,"UTF_16LE",3,[]);r(c$,"UTF_32BE",4,[]);r(c$,"UTF_32LE",5,[])});p("JU");q(["java.util.ArrayList"],"JU.List",null,function(){c$=G(JU,"List",java.util.ArrayList);
b(c$,"addLast",function(a){return this.add1(a)},"~O");b(c$,"removeObj",function(a){return this.removeObject(a)},"~O")});p("JU");q(null,"JU.M3",["java.lang.ArrayIndexOutOfBoundsException","JU.T3"],function(){c$=u(function(){this.m22=this.m21=this.m20=this.m12=this.m11=this.m10=this.m02=this.m01=this.m00=0;t(this,arguments)},JU,"M3",null,java.io.Serializable);w(c$,function(){});c$.newA=b(c$,"newA",function(a){var c=new JU.M3;c.setA(a);return c},"~A");c$.newM=b(c$,"newM",function(a){var c=new JU.M3;
if(null==a)return c.setIdentity(),c;c.m00=a.m00;c.m01=a.m01;c.m02=a.m02;c.m10=a.m10;c.m11=a.m11;c.m12=a.m12;c.m20=a.m20;c.m21=a.m21;c.m22=a.m22;return c},"JU.M3");e(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+"] ]"});b(c$,"setIdentity",function(){this.m00=1;this.m10=this.m02=this.m01=0;this.m11=1;this.m21=this.m20=this.m12=0;this.m22=1});b(c$,"setElement",function(a,c,d){switch(a){case 0:switch(c){case 0:this.m00=
d;return;case 1:this.m01=d;return;case 2:this.m02=d;return}break;case 1:switch(c){case 0:this.m10=d;return;case 1:this.m11=d;return;case 2:this.m12=d;return}break;case 2:switch(c){case 0:this.m20=d;return;case 1:this.m21=d;return;case 2:this.m22=d;return}}throw new ArrayIndexOutOfBoundsException("matrix column/row out of bounds");},"~N,~N,~N");b(c$,"getElement",function(a,c){switch(a){case 0:switch(c){case 0:return this.m00;case 1:return this.m01;case 2:return this.m02}break;case 1:switch(c){case 0:return this.m10;
case 1:return this.m11;case 2:return this.m12}break;case 2:switch(c){case 0:return this.m20;case 1:return this.m21;case 2:return this.m22}}throw new ArrayIndexOutOfBoundsException("matrix column/row out of bounds");},"~N,~N");b(c$,"setRow",function(a,c,d,b){if(0==a)this.m00=c,this.m01=d,this.m02=b;else if(1==a)this.m10=c,this.m11=d,this.m12=b;else if(2==a)this.m20=c,this.m21=d,this.m22=b;else throw new ArrayIndexOutOfBoundsException("row must be 0 to 2 and is "+a);},"~N,~N,~N,~N");b(c$,"setRowV",
function(a,c){if(0==a)this.m00=c.x,this.m01=c.y,this.m02=c.z;else if(1==a)this.m10=c.x,this.m11=c.y,this.m12=c.z;else if(2==a)this.m20=c.x,this.m21=c.y,this.m22=c.z;else throw new ArrayIndexOutOfBoundsException("row must be 0 to 2 and is "+a);},"~N,JU.T3");b(c$,"getRow",function(a,c){switch(a){case 0:c[0]=this.m00;c[1]=this.m01;c[2]=this.m02;return;case 1:c[0]=this.m10;c[1]=this.m11;c[2]=this.m12;return;case 2:c[0]=this.m20;c[1]=this.m21;c[2]=this.m22;return}throw new ArrayIndexOutOfBoundsException("row must be 0 to 2 and is "+
a);},"~N,~A");b(c$,"setRowA",function(a,c){if(0==a)this.m00=c[0],this.m01=c[1],this.m02=c[2];else if(1==a)this.m10=c[0],this.m11=c[1],this.m12=c[2];else if(2==a)this.m20=c[0],this.m21=c[1],this.m22=c[2];else throw new ArrayIndexOutOfBoundsException("row must be 0 to 2 and is "+a);},"~N,~A");b(c$,"setColumn",function(a,c,d,b){if(0==a)this.m00=c,this.m10=d,this.m20=b;else if(1==a)this.m01=c,this.m11=d,this.m21=b;else if(2==a)this.m02=c,this.m12=d,this.m22=b;else throw new ArrayIndexOutOfBoundsException("column must be 0 to 2 and is "+
a);},"~N,~N,~N,~N");b(c$,"setColumnV",function(a,c){if(0==a)this.m00=c.x,this.m10=c.y,this.m20=c.z;else if(1==a)this.m01=c.x,this.m11=c.y,this.m21=c.z;else if(2==a)this.m02=c.x,this.m12=c.y,this.m22=c.z;else throw new ArrayIndexOutOfBoundsException("column must be 0 to 2 and is "+a);},"~N,JU.V3");b(c$,"setColumnA",function(a,c){if(0==a)this.m00=c[0],this.m10=c[1],this.m20=c[2];else if(1==a)this.m01=c[0],this.m11=c[1],this.m21=c[2];else if(2==a)this.m02=c[0],this.m12=c[1],this.m22=c[2];else throw new ArrayIndexOutOfBoundsException("column must be 0 to 2 and is "+
a);},"~N,~A");b(c$,"getColumnV",function(a,c){if(0==a)c.x=this.m00,c.y=this.m10,c.z=this.m20;else if(1==a)c.x=this.m01,c.y=this.m11,c.z=this.m21;else if(2==a)c.x=this.m02,c.y=this.m12,c.z=this.m22;else throw new ArrayIndexOutOfBoundsException("column must be 0 to 2 and is "+a);},"~N,JU.V3");b(c$,"getColumn",function(a,c){if(0==a)c[0]=this.m00,c[1]=this.m10,c[2]=this.m20;else if(1==a)c[0]=this.m01,c[1]=this.m11,c[2]=this.m21;else if(2==a)c[0]=this.m02,c[1]=this.m12,c[2]=this.m22;else throw new ArrayIndexOutOfBoundsException("column must be 0 to 2 and is "+
a);},"~N,~A");b(c$,"add",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");b(c$,"sub",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");b(c$,"transpose",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});b(c$,"transposeM",function(a){this.setM(a);this.transpose()},"JU.M3");b(c$,"setAA",function(a){this.setFromAxisAngle(a.x,a.y,a.z,a.angle)},"JU.A4");b(c$,"setFromAxisAngle",function(a,c,d,b){var f=Math.sqrt(a*a+c*c+d*d),f=1/f;a*=f;c*=f;d*=f;var g=Math.cos(b);b=Math.sin(b);f=1-g;this.m00=g+a*a*f;this.m11=g+c*c*f;this.m22=g+d*d*f;var g=a*c*f,h=d*b;this.m01=g-h;this.m10=g+h;g=a*d*f;h=c*b;this.m02=g+h;this.m20=g-h;g=c*d*f;h=a*b;this.m12=g-h;this.m21=g+h},"~N,~N,~N,~N");b(c$,"setM",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");b(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");b(c$,"invertM",function(a){this.setM(a);this.invert()},"JU.M3");b(c$,"invert",function(){var a=this.determinant();0!=a&&(a=1/a,this.set(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.mulf(a))});b(c$,"determinant",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)});b(c$,"setScale",function(a){this.m00=a;this.m10=this.m02=
this.m01=0;this.m11=a;this.m21=this.m20=this.m12=0;this.m22=a},"~N");b(c$,"rotX",function(a){var c=Math.cos(a);a=Math.sin(a);this.m00=1;this.m10=this.m02=this.m01=0;this.m11=c;this.m12=-a;this.m20=0;this.m21=a;this.m22=c},"~N");b(c$,"rotY",function(a){var c=Math.cos(a);a=Math.sin(a);this.m00=c;this.m01=0;this.m02=a;this.m10=0;this.m11=1;this.m12=0;this.m20=-a;this.m21=0;this.m22=c},"~N");b(c$,"rotZ",function(a){var c=Math.cos(a);a=Math.sin(a);this.m00=c;this.m01=-a;this.m02=0;this.m10=a;this.m11=
c;this.m21=this.m20=this.m12=0;this.m22=1},"~N");b(c$,"mulf",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");b(c$,"mul",function(a){this.mul2(this,a)},"JU.M3");b(c$,"mul2",function(a,c){this.set(a.m00*c.m00+a.m01*c.m10+a.m02*c.m20,a.m00*c.m01+a.m01*c.m11+a.m02*c.m21,a.m00*c.m02+a.m01*c.m12+a.m02*c.m22,a.m10*c.m00+a.m11*c.m10+a.m12*c.m20,a.m10*c.m01+a.m11*c.m11+a.m12*c.m21,a.m10*c.m02+a.m11*c.m12+a.m12*c.m22,a.m20*c.m00+
a.m21*c.m10+a.m22*c.m20,a.m20*c.m01+a.m21*c.m11+a.m22*c.m21,a.m20*c.m02+a.m21*c.m12+a.m22*c.m22)},"JU.M3,JU.M3");e(c$,"equals",function(a){return!s(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");e(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)});b(c$,"setZero",function(){this.m22=this.m21=this.m20=this.m12=this.m11=this.m10=this.m02=this.m01=this.m00=0});b(c$,"transform",function(a){this.transform2(a,a)},"JU.T3");b(c$,"transform2",function(a,c){c.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");b(c$,"transformAdd",function(a,
c,d){d.x+=c*(this.m00*a.x+this.m01*a.y+this.m02*a.z);d.y+=c*(this.m10*a.x+this.m11*a.y+this.m12*a.z);d.z+=c*(this.m20*a.x+this.m21*a.y+this.m22*a.z)},"JU.T3,~N,JU.T3");b(c$,"toArrayD",function(){return[[this.m00,this.m01,this.m02],[this.m10,this.m11,this.m12],[this.m20,this.m21,this.m22]]});b(c$,"set",function(a,c,d,b,f,g,h,l,e){this.m00=a;this.m01=c;this.m02=d;this.m10=b;this.m11=f;this.m12=g;this.m20=h;this.m21=l;this.m22=e},"~N,~N,~N,~N,~N,~N,~N,~N,~N")});p("JU");q(null,"JU.M4",["java.lang.ArrayIndexOutOfBoundsException",
"JU.T3"],function(){c$=u(function(){this.m33=this.m32=this.m31=this.m30=this.m23=this.m22=this.m21=this.m20=this.m13=this.m12=this.m11=this.m10=this.m03=this.m02=this.m01=this.m00=0;t(this,arguments)},JU,"M4",null,java.io.Serializable);c$.newA=b(c$,"newA",function(a){var c=new JU.M4;c.m00=a[0];c.m01=a[1];c.m02=a[2];c.m03=a[3];c.m10=a[4];c.m11=a[5];c.m12=a[6];c.m13=a[7];c.m20=a[8];c.m21=a[9];c.m22=a[10];c.m23=a[11];c.m30=a[12];c.m31=a[13];c.m32=a[14];c.m33=a[15];return c},"~A");c$.newM=b(c$,"newM",
function(a){var c=new JU.M4;if(null==a)return c.setIdentity(),c;c.m00=a.m00;c.m01=a.m01;c.m02=a.m02;c.m03=a.m03;c.m10=a.m10;c.m11=a.m11;c.m12=a.m12;c.m13=a.m13;c.m20=a.m20;c.m21=a.m21;c.m22=a.m22;c.m23=a.m23;c.m30=a.m30;c.m31=a.m31;c.m32=a.m32;c.m33=a.m33;return c},"JU.M4");c$.newMV=b(c$,"newMV",function(a,c){var d=new JU.M4;d.setMV(a,c);return d},"JU.M3,JU.V3");b(c$,"setMV",function(a,c){this.setM3(a);this.setTranslation(c)},"JU.M3,JU.V3");b(c$,"setAA",function(a){this.setFromAxisAngle(a.x,a.y,a.z,
a.angle)},"JU.A4");b(c$,"setFromAxisAngle",function(a,c,d,b){var f=Math.sqrt(a*a+c*c+d*d),f=1/f;a*=f;c*=f;d*=f;var g=Math.cos(b);b=Math.sin(b);f=1-g;this.m00=g+a*a*f;this.m11=g+c*c*f;this.m22=g+d*d*f;var g=a*c*f,h=d*b;this.m01=g-h;this.m10=g+h;g=a*d*f;h=c*b;this.m02=g+h;this.m20=g-h;g=c*d*f;h=a*b;this.m12=g-h;this.m21=g+h},"~N,~N,~N,~N");b(c$,"setM",function(a){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},"JU.M4");e(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+"] ]"});b(c$,"setIdentity",function(){this.m00=1;this.m10=this.m03=this.m02=this.m01=0;this.m11=1;this.m21=this.m20=this.m13=
this.m12=0;this.m22=1;this.m32=this.m31=this.m30=this.m23=0;this.m33=1});b(c$,"setElement",function(a,c,d){if(0==a)if(0==c)this.m00=d;else if(1==c)this.m01=d;else if(2==c)this.m02=d;else if(3==c)this.m03=d;else throw new ArrayIndexOutOfBoundsException("column must be 0 to 3 and is "+c);else if(1==a)if(0==c)this.m10=d;else if(1==c)this.m11=d;else if(2==c)this.m12=d;else if(3==c)this.m13=d;else throw new ArrayIndexOutOfBoundsException("column must be 0 to 3 and is "+c);else if(2==a)if(0==c)this.m20=
d;else if(1==c)this.m21=d;else if(2==c)this.m22=d;else if(3==c)this.m23=d;else throw new ArrayIndexOutOfBoundsException("column must be 0 to 3 and is "+c);else if(3==a)if(0==c)this.m30=d;else if(1==c)this.m31=d;else if(2==c)this.m32=d;else if(3==c)this.m33=d;else throw new ArrayIndexOutOfBoundsException("column must be 0 to 3 and is "+c);else throw new ArrayIndexOutOfBoundsException("row must be 0 to 2 and is "+a);},"~N,~N,~N");b(c$,"getElement",function(a,c){switch(a){case 0:switch(c){case 0:return this.m00;
case 1:return this.m01;case 2:return this.m02;case 3:return this.m03}break;case 1:switch(c){case 0:return this.m10;case 1:return this.m11;case 2:return this.m12;case 3:return this.m13}break;case 2:switch(c){case 0:return this.m20;case 1:return this.m21;case 2:return this.m22;case 3:return this.m23}break;case 3:switch(c){case 0:return this.m30;case 1:return this.m31;case 2:return this.m32;case 3:return this.m33}}throw new ArrayIndexOutOfBoundsException("matrix column/row out of bounds");},"~N,~N");
b(c$,"get",function(a){a.x=this.m03;a.y=this.m13;a.z=this.m23},"JU.V3");b(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");b(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");b(c$,"setRow",function(a,c){if(0==a)this.m00=c[0],this.m01=c[1],this.m02=
c[2],this.m03=c[3];else if(1==a)this.m10=c[0],this.m11=c[1],this.m12=c[2],this.m13=c[3];else if(2==a)this.m20=c[0],this.m21=c[1],this.m22=c[2],this.m23=c[3];else if(3==a)this.m30=c[0],this.m31=c[1],this.m32=c[2],this.m33=c[3];else throw new ArrayIndexOutOfBoundsException("row must be 0 to 3 and is "+a);},"~N,~A");b(c$,"getRow",function(a,c){if(0==a)c[0]=this.m00,c[1]=this.m01,c[2]=this.m02,c[3]=this.m03;else if(1==a)c[0]=this.m10,c[1]=this.m11,c[2]=this.m12,c[3]=this.m13;else if(2==a)c[0]=this.m20,
c[1]=this.m21,c[2]=this.m22,c[3]=this.m23;else if(3==a)c[0]=this.m30,c[1]=this.m31,c[2]=this.m32,c[3]=this.m33;else throw new ArrayIndexOutOfBoundsException("row must be 0 to 3 and is "+a);},"~N,~A");b(c$,"setColumn4",function(a,c,d,b,f){if(0==a)this.m00=c,this.m10=d,this.m20=b,this.m30=f;else if(1==a)this.m01=c,this.m11=d,this.m21=b,this.m31=f;else if(2==a)this.m02=c,this.m12=d,this.m22=b,this.m32=f;else if(3==a)this.m03=c,this.m13=d,this.m23=b,this.m33=f;else throw new ArrayIndexOutOfBoundsException("column must be 0 to 3 and is "+
a);},"~N,~N,~N,~N,~N");b(c$,"setColumn",function(a,c){if(0==a)this.m00=c[0],this.m10=c[1],this.m20=c[2],this.m30=c[3];else if(1==a)this.m01=c[0],this.m11=c[1],this.m21=c[2],this.m31=c[3];else if(2==a)this.m02=c[0],this.m12=c[1],this.m22=c[2],this.m32=c[3];else if(3==a)this.m03=c[0],this.m13=c[1],this.m23=c[2],this.m33=c[3];else throw new ArrayIndexOutOfBoundsException("column must be 0 to 3 and is "+a);},"~N,~A");b(c$,"getColumn",function(a,c){if(0==a)c[0]=this.m00,c[1]=this.m10,c[2]=this.m20,c[3]=
this.m30;else if(1==a)c[0]=this.m01,c[1]=this.m11,c[2]=this.m21,c[3]=this.m31;else if(2==a)c[0]=this.m02,c[1]=this.m12,c[2]=this.m22,c[3]=this.m32;else if(3==a)c[0]=this.m03,c[1]=this.m13,c[2]=this.m23,c[3]=this.m33;else throw new ArrayIndexOutOfBoundsException("column must be 0 to 3 and is "+a);},"~N,~A");b(c$,"sub",function(a){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},"JU.M4");b(c$,"transpose",function(){var a=this.m01;this.m01=this.m10;this.m10=a;a=this.m02;this.m02=this.m20;this.m20=a;a=this.m03;this.m03=this.m30;this.m30=a;a=this.m12;this.m12=this.m21;this.m21=a;a=this.m13;this.m13=this.m31;this.m31=a;a=this.m23;this.m23=this.m32;this.m32=a});b(c$,"invertM",function(a){this.setM(a);this.invert()},"JU.M4");b(c$,"invert",function(){var a=this.determinant();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.mul(a))});b(c$,"determinant",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)});b(c$,"setM3",function(a){this.m00=a.m00;this.m01=a.m01;this.m02=a.m02;this.m03=0;this.m10=a.m10;this.m11=a.m11;this.m12=a.m12;this.m13=0;this.m20=a.m20;this.m21=a.m21;this.m22=a.m22;this.m32=this.m31=this.m30=this.m23=0;this.m33=1},"JU.M3");b(c$,"setA",function(a,c){this.m00=a[c++];
this.m01=a[c++];this.m02=a[c++];this.m03=a[c++];this.m10=a[c++];this.m11=a[c++];this.m12=a[c++];this.m13=a[c++];this.m20=a[c++];this.m21=a[c++];this.m22=a[c++];this.m23=a[c++];this.m30=a[c++];this.m31=a[c++];this.m32=a[c++];this.m33=a[c++]},"~A,~N");b(c$,"toA",function(a){a[0]=this.m00;a[1]=this.m01;a[2]=this.m02;a[3]=this.m03;a[4]=this.m10;a[5]=this.m11;a[6]=this.m12;a[7]=this.m13;a[8]=this.m20;a[9]=this.m21;a[10]=this.m22;a[11]=this.m23;a[12]=this.m30;a[13]=this.m31;a[14]=this.m32;a[15]=this.m33},
"~A");b(c$,"setTranslation",function(a){this.m03=a.x;this.m13=a.y;this.m23=a.z},"JU.V3");b(c$,"rotX",function(a){var c=Math.cos(a);a=Math.sin(a);this.m00=1;this.m10=this.m03=this.m02=this.m01=0;this.m11=c;this.m12=-a;this.m20=this.m13=0;this.m21=a;this.m22=c;this.m32=this.m31=this.m30=this.m23=0;this.m33=1},"~N");b(c$,"rotY",function(a){var c=Math.cos(a);a=Math.sin(a);this.m00=c;this.m01=0;this.m02=a;this.m10=this.m03=0;this.m11=1;this.m13=this.m12=0;this.m20=-a;this.m21=0;this.m22=c;this.m32=this.m31=
this.m30=this.m23=0;this.m33=1},"~N");b(c$,"rotZ",function(a){var c=Math.cos(a);a=Math.sin(a);this.m00=c;this.m01=-a;this.m03=this.m02=0;this.m10=a;this.m11=c;this.m21=this.m20=this.m13=this.m12=0;this.m22=1;this.m32=this.m31=this.m30=this.m23=0;this.m33=1},"~N");b(c$,"mul",function(a){this.m00*=a;this.m01*=a;this.m02*=a;this.m03*=a;this.m10*=a;this.m11*=a;this.m12*=a;this.m13*=a;this.m20*=a;this.m21*=a;this.m22*=a;this.m23*=a;this.m30*=a;this.m31*=a;this.m32*=a;this.m33*=a},"~N");b(c$,"mulM4",function(a){this.mul2(this,
a)},"JU.M4");b(c$,"mul2",function(a,c){this.set(a.m00*c.m00+a.m01*c.m10+a.m02*c.m20+a.m03*c.m30,a.m00*c.m01+a.m01*c.m11+a.m02*c.m21+a.m03*c.m31,a.m00*c.m02+a.m01*c.m12+a.m02*c.m22+a.m03*c.m32,a.m00*c.m03+a.m01*c.m13+a.m02*c.m23+a.m03*c.m33,a.m10*c.m00+a.m11*c.m10+a.m12*c.m20+a.m13*c.m30,a.m10*c.m01+a.m11*c.m11+a.m12*c.m21+a.m13*c.m31,a.m10*c.m02+a.m11*c.m12+a.m12*c.m22+a.m13*c.m32,a.m10*c.m03+a.m11*c.m13+a.m12*c.m23+a.m13*c.m33,a.m20*c.m00+a.m21*c.m10+a.m22*c.m20+a.m23*c.m30,a.m20*c.m01+a.m21*c.m11+
a.m22*c.m21+a.m23*c.m31,a.m20*c.m02+a.m21*c.m12+a.m22*c.m22+a.m23*c.m32,a.m20*c.m03+a.m21*c.m13+a.m22*c.m23+a.m23*c.m33,a.m30*c.m00+a.m31*c.m10+a.m32*c.m20+a.m33*c.m30,a.m30*c.m01+a.m31*c.m11+a.m32*c.m21+a.m33*c.m31,a.m30*c.m02+a.m31*c.m12+a.m32*c.m22+a.m33*c.m32,a.m30*c.m03+a.m31*c.m13+a.m32*c.m23+a.m33*c.m33)},"JU.M4,JU.M4");e(c$,"equals",function(a){return!s(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");e(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)});b(c$,"transformT2",function(a,c){c.set(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");b(c$,"transform4",function(a){this.transformT2(a,
a)},"JU.T4");b(c$,"transform",function(a){this.transform2(a,a)},"JU.T3");b(c$,"rotate",function(a,c){c.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");b(c$,"transform2",function(a,c){try{c.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)}catch(d){if(!y(d,NullPointerException))throw d;}},"JU.T3,JU.T3");b(c$,"setZero",
function(){this.m33=this.m32=this.m31=this.m30=this.m23=this.m22=this.m21=this.m20=this.m13=this.m12=this.m11=this.m10=this.m03=this.m02=this.m01=this.m00=0});b(c$,"set",function(a,c,d,b,f,g,h,l,e,k,v,A,F,m,p,Q){this.m00=a;this.m01=c;this.m02=d;this.m03=b;this.m10=f;this.m11=g;this.m12=h;this.m13=l;this.m20=e;this.m21=k;this.m22=v;this.m23=A;this.m30=F;this.m31=m;this.m32=p;this.m33=Q},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N")});p("JU");q(["java.io.OutputStream"],"JU.OC",["java.io.BufferedWriter",
"$.ByteArrayOutputStream","$.OutputStreamWriter","JU.SB"],function(){c$=u(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;t(this,arguments)},JU,"OC",java.io.OutputStream);b(c$,"setParams",function(a,c,d,b){this.bytePoster=a;this.fileName=c;this.os=b;this.isLocalFile=null!=c&&!(c.startsWith("http://")||c.startsWith("https://"));d&&null!=b&&(this.bw=new java.io.BufferedWriter(new java.io.OutputStreamWriter(b)));
return this},"javajs.api.BytePoster,~S,~B,java.io.OutputStream");b(c$,"getFileName",function(){return this.fileName});b(c$,"getByteCount",function(){return this.byteCount});b(c$,"setType",function(a){this.type=a},"~S");b(c$,"getType",function(){return this.type});b(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 c=a.getBytes();this.os.write(c,0,c.length);this.byteCount+=c.length;return this}}catch(d){if(!y(d,
java.io.IOException))throw d;}this.byteCount+=a.length;return this},"~S");e(c$,"write",function(a,c,d){null==this.os&&(this.os=new java.io.ByteArrayOutputStream);this.os.write(a,c,d);this.byteCount+=d},"~A,~N,~N");e(c$,"writeByteAsInt",function(a){null==this.os&&(this.os=new java.io.ByteArrayOutputStream);this.os.writeByteAsInt(a);this.byteCount++},"~N");b(c$,"cancel",function(){this.isCanceled=!0;this.closeChannel()});b(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())}catch(a){if(!y(a,Exception))throw a;}if(this.isCanceled)return this.closed=!0,null;if(null==this.fileName||this.closed)return null==this.sb?null:this.sb.toString();this.closed=!0;var c=null==this.sb?this.toByteArray():this.sb.toString();"function"==typeof this.fileName?this.fileName(c):Jmol._doAjax(this.fileName,null,c);return null});b(c$,"toByteArray",function(){return s(this.os,java.io.ByteArrayOutputStream)?this.os.toByteArray():
null});b(c$,"close",function(){this.closeChannel()});e(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"});b(c$,"postByteArray",function(){var a=null==this.sb?this.toByteArray():this.sb.toString().getBytes();return this.bytePoster.postByteArray(this.fileName,a)})});p("JU");q(["JU.T3"],"JU.P3",null,function(){c$=G(JU,"P3",JU.T3);c$.newP=b(c$,"newP",function(a){var c=new JU.P3;
c.x=a.x;c.y=a.y;c.z=a.z;return c},"JU.T3");c$.new3=b(c$,"new3",function(a,c,d){var b=new JU.P3;b.x=a;b.y=c;b.z=d;return b},"~N,~N,~N")});p("JU");q(["JU.T3i"],"JU.P3i",null,function(){c$=G(JU,"P3i",JU.T3i);c$.new3=b(c$,"new3",function(a,c,d){var b=new JU.P3i;b.x=a;b.y=c;b.z=d;return b},"~N,~N,~N")});p("JU");q(["JU.T4"],"JU.P4",null,function(){c$=G(JU,"P4",JU.T4);c$.new4=b(c$,"new4",function(a,c,d,b){var f=new JU.P4;f.set(a,c,d,b);return f},"~N,~N,~N,~N");c$.newPt=b(c$,"newPt",function(a){var c=new JU.P4;
c.set(a.x,a.y,a.z,a.w);return c},"JU.P4");b(c$,"distance",function(a){var c=this.x-a.x,d=this.y-a.y,b=this.z-a.z;a=this.w-a.w;return Math.sqrt(c*c+d*d+b*b+a*a)},"JU.P4")});p("JU");q(null,"JU.PT","java.lang.Character $.Double $.Float java.util.Map javajs.api.JSONEncodable JU.A4 $.DF $.List $.M3 $.M4 $.P4 $.SB $.T3".split(" "),function(){c$=G(JU,"PT");c$.parseInt=b(c$,"parseInt",function(a){return JU.PT.parseIntNext(a,[0])},"~S");c$.parseIntNext=b(c$,"parseIntNext",function(a,c){var d=a.length;return 0>
c[0]||c[0]>=d?-2147483648:JU.PT.parseIntChecked(a,d,c)},"~S,~A");c$.parseIntChecked=b(c$,"parseIntChecked",function(a,c,d){var b=!1,f=0,g=d[0];if(0>g)return-2147483648;for(var h;g<c&&JU.PT.isWhiteSpace(a,g);)++g;var l=!1;g<c&&45==a.charCodeAt(g)&&(l=!0,++g);for(;g<c&&48<=(h=a.charCodeAt(g))&&57>=h;)f=10*f+(h-48),b=!0,++g;b?l&&(f=-f):f=-2147483648;d[0]=g;return f},"~S,~N,~A");c$.isWhiteSpace=b(c$,"isWhiteSpace",function(a,c){var d;return 0<=c&&(" "==(d=a.charAt(c))||"\t"==d||"\n"==d)},"~S,~N");c$.parseFloatChecked=
b(c$,"parseFloatChecked",function(a,c,d,b){var f=!1,g=d[0];if(b&&a.indexOf("\n")!=a.lastIndexOf("\n"))return NaN;for(;g<c&&JU.PT.isWhiteSpace(a,g);)++g;var h=!1;g<c&&"-"==a.charAt(g)&&(++g,h=!0);for(var l=0,e=0,k=0;g<c&&48<=(l=a.charCodeAt(g))&&57>=l;)e=10*e+1*(l-48),++g,f=!0;var v=!1,A=0,F=0==e?-1:0;if(46==l)for(v=!0;++g<c&&48<=(l=a.charCodeAt(g))&&57>=l;){f=!0;if(0>F){if(48==l){F--;continue}F=-F}A<JU.PT.decimalScale.length&&(k=10*k+1*(l-48),A++)}f?0<k?(f=k*JU.PT.decimalScale[A-1],f=1<F?F-2<JU.PT.decimalScale.length?
f*JU.PT.decimalScale[F-2]:f*Math.pow(10,1-F):f+e):f=e:f=NaN;e=!1;if(g<c&&(69==l||101==l||68==l)){e=!0;if(++g>=c)return NaN;l=a.charCodeAt(g);if(43==l&&++g>=c)return NaN;d[0]=g;g=JU.PT.parseIntChecked(a,c,d);if(-2147483648==g)return NaN;0<g&&g<=JU.PT.tensScale.length?f*=JU.PT.tensScale[g-1]:0>g&&-g<=JU.PT.decimalScale.length?f*=JU.PT.decimalScale[-g-1]:0!=g&&(f*=Math.pow(10,g))}else d[0]=g;h&&(f=-f);Infinity==f&&(f=3.4028235E38);return!b||(!e||v)&&JU.PT.checkTrailingText(a,d[0],c)?f:NaN},"~S,~N,~A,~B");
c$.checkTrailingText=b(c$,"checkTrailingText",function(a,c,d){for(var b;c<d&&(Character.isWhitespace(b=a.charAt(c))||";"==b);)++c;return c==d},"~S,~N,~N");c$.parseFloatArray=b(c$,"parseFloatArray",function(a){return JU.PT.parseFloatArrayNext(a,D(1,0),null,null,null)},"~S");c$.parseFloatArrayInfested=b(c$,"parseFloatArrayInfested",function(a,c){for(var d=c.length,b=a.length,f=0,g=0,h=0;0<=h&&h<d&&f<b;h++){for(var l;Float.isNaN(l=JU.PT.parseFloat(a[f++]))&&f<b;);Float.isNaN(l)||(c[g=h]=l);if(f==b)break}return g+
1},"~A,~A");c$.parseFloatArrayNext=b(c$,"parseFloatArrayNext",function(a,c,d,b,f){var g=0,h=c[0];0<=h&&(null!=b&&(g=a.indexOf(b,h),0<=g&&(c[0]=g+b.length)),a=a.substring(c[0]),h=null==f?-1:a.indexOf(f),0>h?h=a.length:a=a.substring(0,h),c[0]+=h+1,a=JU.PT.getTokens(a),null==d&&(d=M(a.length,0)),g=JU.PT.parseFloatArrayInfested(a,d));if(null==d)return M(0,0);for(a=g;a<d.length;a++)d[a]=NaN;return d},"~S,~A,~A,~S,~S");c$.parseFloatRange=b(c$,"parseFloatRange",function(a,c,d){var b=a.length;c>b&&(c=b);
return 0>d[0]||d[0]>=c?NaN:JU.PT.parseFloatChecked(a,c,d,!1)},"~S,~N,~A");c$.parseFloatNext=b(c$,"parseFloatNext",function(a,c){var d=null==a?-1:a.length;return 0>c[0]||c[0]>=d?NaN:JU.PT.parseFloatChecked(a,d,c,!1)},"~S,~A");c$.parseFloatStrict=b(c$,"parseFloatStrict",function(a){var c=a.length;return 0==c?NaN:JU.PT.parseFloatChecked(a,c,[0],!0)},"~S");c$.parseFloat=b(c$,"parseFloat",function(a){return JU.PT.parseFloatNext(a,[0])},"~S");c$.parseIntRadix=b(c$,"parseIntRadix",function(a,c){return Integer.parseIntRadix(a,
c)},"~S,~N");c$.getTokens=b(c$,"getTokens",function(a){return JU.PT.getTokensAt(a,0)},"~S");c$.parseToken=b(c$,"parseToken",function(a){return JU.PT.parseTokenNext(a,[0])},"~S");c$.parseTrimmed=b(c$,"parseTrimmed",function(a){return JU.PT.parseTrimmedRange(a,0,a.length)},"~S");c$.parseTrimmedAt=b(c$,"parseTrimmedAt",function(a,c){return JU.PT.parseTrimmedRange(a,c,a.length)},"~S,~N");c$.parseTrimmedRange=b(c$,"parseTrimmedRange",function(a,c,d){var b=a.length;d<b&&(b=d);return b<c?"":JU.PT.parseTrimmedChecked(a,
c,b)},"~S,~N,~N");c$.getTokensAt=b(c$,"getTokensAt",function(a,c){if(null==a)return null;var d=a.length;if(0>c||c>d)return null;var b=JU.PT.countTokens(a,c),f=Array(b),g=D(1,0);g[0]=c;for(var h=0;h<b;++h)f[h]=JU.PT.parseTokenChecked(a,d,g);return f},"~S,~N");c$.countTokens=b(c$,"countTokens",function(a,c){var d=0;if(null!=a)for(var b=a.length;;){for(;c<b&&JU.PT.isWhiteSpace(a,c);)++c;if(c==b)break;++d;do++c;while(c<b&&!JU.PT.isWhiteSpace(a,c))}return d},"~S,~N");c$.parseTokenNext=b(c$,"parseTokenNext",
function(a,c){var d=a.length;return 0>c[0]||c[0]>=d?null:JU.PT.parseTokenChecked(a,d,c)},"~S,~A");c$.parseTokenRange=b(c$,"parseTokenRange",function(a,c,d){var b=a.length;c>b&&(c=b);return 0>d[0]||d[0]>=c?null:JU.PT.parseTokenChecked(a,c,d)},"~S,~N,~A");c$.parseTokenChecked=b(c$,"parseTokenChecked",function(a,c,d){for(var b=d[0];b<c&&JU.PT.isWhiteSpace(a,b);)++b;for(var f=b;b<c&&!JU.PT.isWhiteSpace(a,b);)++b;d[0]=b;return f==b?null:a.substring(f,b)},"~S,~N,~A");c$.parseTrimmedChecked=b(c$,"parseTrimmedChecked",
function(a,c,d){for(;c<d&&JU.PT.isWhiteSpace(a,c);)++c;for(d-=1;d>=c&&JU.PT.isWhiteSpace(a,d);)--d;return d<c?"":a.substring(c,d+1)},"~S,~N,~N");c$.dVal=b(c$,"dVal",function(a){if(null==a)throw new NumberFormatException("null");var c=parseFloat(a);if(isNaN(c))throw new NumberFormatException("Not a Number : "+a);return c},"~S");c$.fVal=b(c$,"fVal",function(a){return this.dVal(a)},"~S");c$.parseIntRange=b(c$,"parseIntRange",function(a,c,d){var b=a.length;c>b&&(c=b);return 0>d[0]||d[0]>=c?-2147483648:
JU.PT.parseIntChecked(a,c,d)},"~S,~N,~A");c$.parseFloatArrayData=b(c$,"parseFloatArrayData",function(a,c){JU.PT.parseFloatArrayDataN(a,c,c.length)},"~A,~A");c$.parseFloatArrayDataN=b(c$,"parseFloatArrayDataN",function(a,c,d){for(;0<=--d;)c[d]=d>=a.length?NaN:JU.PT.parseFloat(a[d])},"~A,~A,~N");c$.split=b(c$,"split",function(a,c){if(0==a.length)return[];var d=1,b=a.indexOf(c),f,g=c.length;if(0>b||0==g)return f=Array(1),f[0]=a,f;for(var h=a.length-g;0<=b&&b<h;d++)b=a.indexOf(c,b+g);f=Array(d);for(var l=
b=0,e=0;0<=(l=a.indexOf(c,b))&&e+1<d;)f[e++]=a.substring(b,l),b=l+g;a.indexOf(c,h)!=h&&(h+=g);f[e]=a.substring(b,h);return f},"~S,~S");c$.getQuotedStringAt=b(c$,"getQuotedStringAt",function(a,c){return JU.PT.getQuotedStringNext(a,[c])},"~S,~N");c$.getQuotedStringNext=b(c$,"getQuotedStringNext",function(a,c){var d=a,b=c[0];if(0>b||0>(b=d.indexOf('"',b)))return"";c[0]=++b;d=d.substring(b);for(b=-1;++b<d.length&&'"'!=d.charAt(b);)"\\"==d.charAt(b)&&b++;c[0]+=b+1;return d.substring(0,b)},"~S,~A");c$.isOneOf=
b(c$,"isOneOf",function(a,c){if(0==c.length)return!1;";"!=c.charAt(0)&&(c=";"+c+";");return 0>a.indexOf(";")&&0<=c.indexOf(";"+a+";")},"~S,~S");c$.getQuotedAttribute=b(c$,"getQuotedAttribute",function(a,c){var d=a.indexOf(c+"=");return 0>d?null:JU.PT.getQuotedStringAt(a,d)},"~S,~S");c$.approx=b(c$,"approx",function(a,c){return Math.round(a*c)/c},"~N,~N");c$.simpleReplace=b(c$,"simpleReplace",function(a,c,d){if(null==a||0==c.length||0>a.indexOf(c))return a;var b=0<=d.indexOf(c);do a=a.$replace(c,d);
while(!b&&0<=a.indexOf(c));return a},"~S,~S,~S");c$.formatF=b(c$,"formatF",function(a,c,d,b,f){return JU.PT.formatS(JU.DF.formatDecimal(a,d),c,0,b,f)},"~N,~N,~N,~B,~B");c$.formatD=b(c$,"formatD",function(a,c,d,b,f){return JU.PT.formatS(JU.DF.formatDecimal(a,-1-d),c,0,b,f)},"~N,~N,~N,~B,~B,~B");c$.formatS=b(c$,"formatS",function(a,c,d,b,f){if(null==a)return"";var g=a.length;2147483647!=d&&0<d&&d<g?a=a.substring(0,d):0>d&&0<=g+d&&(a=a.substring(g+d+1));d=c-a.length;if(0>=d)return a;c=f&&!b&&"-"==a.charAt(0);
f=f?"0":" ";var h=c?"-":f,g=new JU.SB;b&&g.append(a);for(g.appendC(h);0<--d;)g.appendC(f);b||g.append(c?f+a.substring(1):a);return g.toString()},"~S,~N,~N,~B,~B");c$.replaceAllCharacters=b(c$,"replaceAllCharacters",function(a,c,d){for(var b=c.length;0<=--b;){var f=c.substring(b,b+1);a=JU.PT.simpleReplace(a,f,d)}return a},"~S,~S,~S");c$.trim=b(c$,"trim",function(a,c){if(0==c.length)return a.trim();for(var d=a.length,b=0;b<d&&0<=c.indexOf(a.charAt(b));)b++;for(d=a.length-1;d>b&&0<=c.indexOf(a.charAt(d));)d--;
return a.substring(b,d+1)},"~S,~S");c$.trimQuotes=b(c$,"trimQuotes",function(a){return null!=a&&1<a.length&&a.startsWith('"')&&a.endsWith('"')?a.substring(1,a.length-1):a},"~S");c$.replaceAllCharacter=b(c$,"replaceAllCharacter",function(a,c,d){if(null==a)return null;for(var b=c.length;0<=--b;)a=a.$replace(c.charAt(b),d);return a},"~S,~S,~S");c$.toJSON=b(c$,"toJSON",function(a,c){var d=new JU.SB,b="";if(null==c)return JU.PT.packageJSON(a,null);if(s(c,Integer)||s(c,Float)||s(c,Double))return JU.PT.packageJSON(a,
c.toString());if(s(c,String))d.append(JU.PT.fixString(c));else if(s(c,javajs.api.JSONEncodable))d.append(c.toJSON());else if(JU.PT.isAS(c)){d.append("[");for(var f=c.length,g=0;g<f;g++)d.append(b).append(JU.PT.fixString(c[g])),b=",";d.append("]")}else if(JU.PT.isAI(c)){d.append("[");f=c.length;for(g=0;g<f;g++)d.append(b).appendI(c[g]),b=",";d.append("]")}else if(JU.PT.isAF(c)){d.append("[");f=c.length;for(g=0;g<f;g++)d.append(b).appendF(c[g]),b=",";d.append("]")}else if(JU.PT.isAD(c)){d.append("[");
f=c.length;for(g=0;g<f;g++)d.append(b).appendD(c[g]),b=",";d.append("]")}else if(JU.PT.isAP(c)){d.append("[");f=c.length;for(g=0;g<f;g++)d.append(b),JU.PT.addJsonTuple(d,c[g]),b=",";d.append("]")}else if(JU.PT.isASS(c)){d.append("[");f=c.length;for(g=0;g<f;g++)d.append(b).append(JU.PT.toJSON(null,c[g])),b=",";d.append("]")}else if(JU.PT.isAII(c)){d.append("[");f=c.length;for(g=0;g<f;g++)d.append(b).append(JU.PT.toJSON(null,c[g])),b=",";d.append("]")}else if(JU.PT.isAFF(c)){d.append("[");f=c.length;
for(g=0;g<f;g++)d.append(b).append(JU.PT.toJSON(null,c[g])),b=",";d.append("]")}else if(JU.PT.isADD(c)){d.append("[");f=c.length;for(g=0;g<f;g++)d.append(b).append(JU.PT.toJSON(null,c[g])),b=",";d.append("]")}else if(JU.PT.isAFFF(c)){d.append("[");f=c.length;for(g=0;g<f;g++)d.append(b).append(JU.PT.toJSON(null,c[g])),b=",";d.append("]")}else if(s(c,JU.List)){d.append("[ ");f=c.size();for(g=0;g<f;g++)d.append(b).append(JU.PT.toJSON(null,c.get(g))),b=",";d.append(" ]")}else if(s(c,JU.M4)){b=M(4,0);
d.appendC("[");for(g=0;4>g;g++)0<g&&d.appendC(","),c.getRow(g,b),d.append(JU.PT.toJSON(null,b));d.appendC("]")}else if(s(c,JU.M3)){b=M(3,0);d.appendC("[");for(g=0;3>g;g++)0<g&&d.appendC(","),c.getRow(g,b),d.append(JU.PT.toJSON(null,b));d.appendC("]")}else if(s(c,JU.T3))JU.PT.addJsonTuple(d,c);else if(s(c,JU.A4))d.append("[").appendF(c.x).append(",").appendF(c.y).append(",").appendF(c.z).append(",").appendF(180*c.angle/3.141592653589793).append("]");else if(s(c,JU.P4))d.append("[").appendF(c.x).append(",").appendF(c.y).append(",").appendF(c.z).append(",").appendF(c.w).append("]");
else if(s(c,java.util.Map)){d.append("{ ");for(f=c.keySet().iterator();f.hasNext()&&((g=f.next())||1);)d.append(b).append(JU.PT.packageJSON(g,JU.PT.toJSON(null,c.get(g)))),b=",";d.append(" }")}else d.append(JU.PT.fixString(c.toString()));return JU.PT.packageJSON(a,d.toString())},"~S,~O");c$.packageJSON=b(c$,"packageJSON",function(a,c){return null==a?c:'"'+a+'": '+c},"~S,~S");c$.fixString=b(c$,"fixString",function(a){if("undefined"==typeof a)return"null";if(null==a||0==a.indexOf('{"'))return a;a=JU.PT.simpleReplace(a,
'"','\\"');a=JU.PT.simpleReplace(a,"\n","\\n");return'"'+a+'"'},"~S");c$.addJsonTuple=b(c$,"addJsonTuple",function(a,c){a.append("[").appendF(c.x).append(",").appendF(c.y).append(",").appendF(c.z).append("]")},"JU.SB,JU.T3");c$.isAS=b(c$,"isAS",function(a){return Ma(a)},"~O");c$.isASS=b(c$,"isASS",function(a){return Na(a)},"~O");c$.isAP=b(c$,"isAP",function(a){return Oa(a)},"~O");c$.isAF=b(c$,"isAF",function(a){return Ea(a)},"~O");c$.isAFloat=b(c$,"isAFloat",function(a){return Pa(a)},"~O");c$.isAD=
b(c$,"isAD",function(a){return Ea(a)},"~O");c$.isADD=b(c$,"isADD",function(a){return Fa(a)},"~O");c$.isAB=b(c$,"isAB",function(a){return Aa(a)},"~O");c$.isAI=b(c$,"isAI",function(a){return Aa(a)},"~O");c$.isAII=b(c$,"isAII",function(a){return Qa(a)},"~O");c$.isAFF=b(c$,"isAFF",function(a){return Fa(a)},"~O");c$.isAFFF=b(c$,"isAFFF",function(a){return Ra(a)},"~O");c$.escapeUrl=b(c$,"escapeUrl",function(a){a=JU.PT.simpleReplace(a,"\n","");a=JU.PT.simpleReplace(a,"%","%25");a=JU.PT.simpleReplace(a,"#",
"%23");a=JU.PT.simpleReplace(a,"[","%5B");a=JU.PT.simpleReplace(a,"]","%5D");return a=JU.PT.simpleReplace(a," ","%20")},"~S");B(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)});p("JU");c$=u(function(){this.s=this.sb=null;t(this,arguments)},JU,"SB");w(c$,function(){this.s=""});c$.newN=b(c$,"newN",function(){return new JU.SB},"~N");c$.newS=b(c$,"newS",function(a){var c=new JU.SB;c.s=a;return c},"~S");b(c$,"append",function(a){this.s+=
a;return this},"~S");b(c$,"appendC",function(a){this.s+=a;return this},"~S");b(c$,"appendI",function(a){this.s+=a;return this},"~N");b(c$,"appendB",function(a){this.s+=a;return this},"~B");b(c$,"appendF",function(a){a=""+a;0>a.indexOf(".")&&0>a.indexOf("e")&&(a+=".0");this.s+=a;return this},"~N");b(c$,"appendD",function(a){a=""+a;0>a.indexOf(".")&&0>a.indexOf("e")&&(a+=".0");this.s+=a;return this},"~N");b(c$,"appendSB",function(a){this.s+=a.s;return this},"JU.SB");b(c$,"appendO",function(a){null!=
a&&(this.s+=a.toString());return this},"~O");b(c$,"appendCB",function(a,c,d){for(;0<=--d;)this.s+=a[c++]},"~A,~N,~N");e(c$,"toString",function(){return this.s});b(c$,"length",function(){return this.s.length});b(c$,"indexOf",function(a){return this.s.indexOf(a)},"~S");b(c$,"charAt",function(a){return this.s.charAt(a)},"~N");b(c$,"setLength",function(a){this.s=this.s.substring(0,a)},"~N");b(c$,"lastIndexOf",function(a){return this.s.lastIndexOf(a)},"~S");b(c$,"indexOf2",function(a,c){return this.s.indexOf(a,
c)},"~S,~N");b(c$,"substring",function(a){return this.s.substring(a)},"~N");b(c$,"substring2",function(a,c){return this.s.substring(a,c)},"~N,~N");b(c$,"toBytes",function(a,c){0>c&&(c=this.length()-a);for(var d=T(c,0),b=a+c,f=b-a;--b>=a;)d[--f]=this.charAt(b).charCodeAt(0);return d},"~N,~N");p("JU");q(null,"JU.T3",["java.lang.Float"],function(){c$=u(function(){this.z=this.y=this.x=0;t(this,arguments)},JU,"T3",null,java.io.Serializable);w(c$,function(){});b(c$,"set",function(a,c,d){this.x=a;this.y=
c;this.z=d},"~N,~N,~N");b(c$,"setA",function(a){this.x=a[0];this.y=a[1];this.z=a[2]},"~A");b(c$,"setT",function(a){this.x=a.x;this.y=a.y;this.z=a.z},"JU.T3");b(c$,"add2",function(a,c){this.x=a.x+c.x;this.y=a.y+c.y;this.z=a.z+c.z},"JU.T3,JU.T3");b(c$,"add",function(a){this.x+=a.x;this.y+=a.y;this.z+=a.z},"JU.T3");b(c$,"distanceSquared",function(a){var c=this.x-a.x,d=this.y-a.y;a=this.z-a.z;return c*c+d*d+a*a},"JU.T3");b(c$,"distance",function(a){return Math.sqrt(this.distanceSquared(a))},"JU.T3");
b(c$,"sub2",function(a,c){this.x=a.x-c.x;this.y=a.y-c.y;this.z=a.z-c.z},"JU.T3,JU.T3");b(c$,"sub",function(a){this.x-=a.x;this.y-=a.y;this.z-=a.z},"JU.T3");b(c$,"scale",function(a){this.x*=a;this.y*=a;this.z*=a},"~N");b(c$,"scaleAdd2",function(a,c,d){this.x=a*c.x+d.x;this.y=a*c.y+d.y;this.z=a*c.z+d.z},"~N,JU.T3,JU.T3");b(c$,"ave",function(a,c){this.x=(a.x+c.x)/2;this.y=(a.y+c.y)/2;this.z=(a.z+c.z)/2},"JU.T3,JU.T3");b(c$,"dot",function(a){return this.x*a.x+this.y*a.y+this.z*a.z},"JU.T3");b(c$,"lengthSquared",
function(){return this.x*this.x+this.y*this.y+this.z*this.z});b(c$,"length",function(){return Math.sqrt(this.lengthSquared())});b(c$,"normalize",function(){var a=this.length();this.x/=a;this.y/=a;this.z/=a});e(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=b(c$,"floatToIntBits0",function(a){return 0==a?0:Float.floatToIntBits(a)},"~N");e(c$,"equals",function(a){return!s(a,
JU.T3)?!1:this.x==a.x&&this.y==a.y&&this.z==a.z},"~O");e(c$,"toString",function(){return"("+this.x+", "+this.y+", "+this.z+")"})});p("JU");q(null,"JU.T3d",["java.lang.Double"],function(){c$=u(function(){this.z=this.y=this.x=0;t(this,arguments)},JU,"T3d",null,java.io.Serializable);w(c$,function(){});b(c$,"set",function(a,c,d){this.x=a;this.y=c;this.z=d},"~N,~N,~N");b(c$,"setA",function(a){this.x=a[0];this.y=a[1];this.z=a[2]},"~A");b(c$,"setT",function(a){this.x=a.x;this.y=a.y;this.z=a.z},"JU.T3d");
b(c$,"add2",function(a,c){this.x=a.x+c.x;this.y=a.y+c.y;this.z=a.z+c.z},"JU.T3d,JU.T3d");b(c$,"add",function(a){this.x+=a.x;this.y+=a.y;this.z+=a.z},"JU.T3d");b(c$,"sub2",function(a,c){this.x=a.x-c.x;this.y=a.y-c.y;this.z=a.z-c.z},"JU.T3d,JU.T3d");b(c$,"sub",function(a){this.x-=a.x;this.y-=a.y;this.z-=a.z},"JU.T3d");b(c$,"scale",function(a){this.x*=a;this.y*=a;this.z*=a},"~N");b(c$,"scaleAdd",function(a,c,d){this.x=a*c.x+d.x;this.y=a*c.y+d.y;this.z=a*c.z+d.z},"~N,JU.T3d,JU.T3d");e(c$,"hashCode",function(){var a=
JU.T3d.doubleToLongBits0(this.x),c=JU.T3d.doubleToLongBits0(this.y),d=JU.T3d.doubleToLongBits0(this.z);return a^a>>32^c^c>>32^d^d>>32});c$.doubleToLongBits0=b(c$,"doubleToLongBits0",function(a){return 0==a?0:Double.doubleToLongBits(a)},"~N");e(c$,"equals",function(a){return!s(a,JU.T3d)?!1:this.x==a.x&&this.y==a.y&&this.z==a.z},"~O");e(c$,"toString",function(){return"("+this.x+", "+this.y+", "+this.z+")"})});p("JU");c$=u(function(){this.z=this.y=this.x=0;t(this,arguments)},JU,"T3i",null,java.io.Serializable);
w(c$,function(){});b(c$,"set",function(a,c,d){this.x=a;this.y=c;this.z=d},"~N,~N,~N");b(c$,"setT",function(a){this.x=a.x;this.y=a.y;this.z=a.z},"JU.T3i");b(c$,"add",function(a){this.x+=a.x;this.y+=a.y;this.z+=a.z},"JU.T3i");b(c$,"scaleAdd",function(a,c,d){this.x=a*c.x+d.x;this.y=a*c.y+d.y;this.z=a*c.z+d.z},"~N,JU.T3i,JU.T3i");e(c$,"hashCode",function(){return this.x^this.y^this.z});e(c$,"equals",function(a){return!s(a,JU.T3i)?!1:this.x==a.x&&this.y==a.y&&this.z==a.z},"~O");e(c$,"toString",function(){return"("+
this.x+", "+this.y+", "+this.z+")"});p("JU");q(null,"JU.T4",["JU.T3"],function(){c$=u(function(){this.w=this.z=this.y=this.x=0;t(this,arguments)},JU,"T4",null,java.io.Serializable);w(c$,function(){});b(c$,"set",function(a,c,d,b){this.x=a;this.y=c;this.z=d;this.w=b},"~N,~N,~N,~N");b(c$,"scale",function(a){this.x*=a;this.y*=a;this.z*=a;this.w*=a},"~N");e(c$,"hashCode",function(){return JU.T3.floatToIntBits0(this.x)^JU.T3.floatToIntBits0(this.y)^JU.T3.floatToIntBits0(this.z)^JU.T3.floatToIntBits0(this.w)});
e(c$,"equals",function(a){return!s(a,JU.T4)?!1:this.x==a.x&&this.y==a.y&&this.z==a.z&&this.w==a.w},"~O");e(c$,"toString",function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"})});p("JU");q(["JU.T3"],"JU.V3",null,function(){c$=G(JU,"V3",JU.T3);c$.newV=b(c$,"newV",function(a){return JU.V3.new3(a.x,a.y,a.z)},"JU.T3");c$.newVsub=b(c$,"newVsub",function(a,c){return JU.V3.new3(a.x-c.x,a.y-c.y,a.z-c.z)},"JU.T3,JU.T3");c$.new3=b(c$,"new3",function(a,c,d){var b=new JU.V3;b.x=a;b.y=c;b.z=d;return b},
"~N,~N,~N");b(c$,"cross",function(a,c){this.set(a.y*c.z-a.z*c.y,a.z*c.x-a.x*c.z,a.x*c.y-a.y*c.x)},"JU.V3,JU.V3");b(c$,"angle",function(a){var c=this.y*a.z-this.z*a.y,d=this.z*a.x-this.x*a.z,b=this.x*a.y-this.y*a.x,c=Math.sqrt(c*c+d*d+b*b);return Math.abs(Math.atan2(c,this.dot(a)))},"JU.V3")});p("JU");q(["JU.T3d"],"JU.V3d",null,function(){c$=G(JU,"V3d",JU.T3d);b(c$,"cross",function(a,c){this.set(a.y*c.z-a.z*c.y,a.z*c.x-a.x*c.z,a.x*c.y-a.y*c.x)},"JU.V3d,JU.V3d");b(c$,"normalize",function(){var a=this.length();
this.x/=a;this.y/=a;this.z/=a});b(c$,"dot",function(a){return this.x*a.x+this.y*a.y+this.z*a.z},"JU.V3d");b(c$,"lengthSquared",function(){return this.x*this.x+this.y*this.y+this.z*this.z});b(c$,"length",function(){return Math.sqrt(this.lengthSquared())})});p("J.adapter.readers.molxyz");q(["J.adapter.smarter.AtomSetCollectionReader"],"J.adapter.readers.molxyz.MolReader",["java.lang.Exception","$.Float","J.adapter.smarter.Atom","J.api.JmolAdapter","J.util.Logger"],function(){c$=u(function(){this.haveAtomSerials=
this.isV3000=this.is2D=!1;this.dimension=null;this.allow2D=!0;this.iatom0=0;t(this,arguments)},J.adapter.readers.molxyz,"MolReader",J.adapter.smarter.AtomSetCollectionReader);e(c$,"initializeReader",function(){this.is2D=this.checkFilterKey("2D")});e(c$,"checkLine",function(){var a=this.line.startsWith("$MDL");if(a&&(this.discardLinesUntilStartsWith("$HDR"),this.readLine(),null==this.line))return J.util.Logger.warn("$HDR not found in MDL RG file"),this.continuing=!1;if(this.doGetModel(++this.modelNumber,
null))return this.processMolSdHeader(),this.processCtab(a),this.iatom0=this.atomSetCollection.getAtomCount(),this.isV3000=!1,this.isLastModel(this.modelNumber)?this.continuing=!1:!0;this.discardLinesUntilStartsWith("$$$$");return!0});b(c$,"readUserData",function(a){if(!this.isV3000)for(;null!=this.readLine()&&0!=this.line.indexOf("$$$$");)if(this.line.toUpperCase().contains("_PARTIAL_CHARGES"))try{for(var c=this.atomSetCollection.getAtoms(),d=this.parseIntStr(this.readLine());0<=--d;){var b=J.adapter.smarter.AtomSetCollectionReader.getTokensStr(this.readLine()),
f=this.parseIntStr(b[0])+a-1,g=this.parseFloatStr(b[1]);Float.isNaN(g)||(c[f].partialCharge=g)}}catch(h){if(y(h,Exception))break;else throw h;}},"~N");e(c$,"finalizeReader",function(){this.finalizeReaderMR()});b(c$,"finalizeReaderMR",function(){this.is2D&&this.set2D();this.isTrajectory=!1;this.finalizeReaderASCR()});b(c$,"processMolSdHeader",function(){var a,c=this.line;a=""+(this.line+"\n");this.atomSetCollection.setCollectionName(this.line);this.readLine();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.atomSetCollection.setAtomSetCollectionAuxiliaryInfo("dimension",this.dimension);this.readLine();null!=this.line&&(a+=this.line+"\n",J.util.Logger.info(a),this.checkCurrentLineForScript(),this.atomSetCollection.setAtomSetCollectionAuxiliaryInfo("fileHeader",a),this.newAtomSet(c))}});b(c$,"processCtab",function(a){var c=null;a&&this.discardLinesUntilStartsWith("$CTAB");
if(this.isV3000=null!=this.readLine()&&0<=this.line.indexOf("V3000"))this.is2D=this.dimension.equals("2D"),this.discardLinesUntilContains("COUNTS"),c=this.getTokens();if(null!=this.line){a=this.isV3000?this.parseIntStr(c[3]):this.parseIntRange(this.line,0,3);var c=this.isV3000?this.parseIntStr(c[4]):this.parseIntRange(this.line,3,6),d=this.atomSetCollection.getAtomCount();this.readAtoms(a);this.readBonds(c);this.readUserData(d);this.isV3000&&this.discardLinesUntilContains("END CTAB");this.applySymmetryAndSetTrajectory()}},
"~B");b(c$,"readAtoms",function(a){this.isV3000&&this.discardLinesUntilContains("BEGIN ATOM");for(var c=0;c<a;++c){this.readLine();var d=this.line.length,b,f,g,h,l=0,e=0,k=-2147483648;if(this.isV3000){this.checkLineContinuation();d=this.getTokens();k=this.parseIntStr(d[2]);b=d[3];if(b.equals("*"))continue;f=this.parseFloatStr(d[4]);g=this.parseFloatStr(d[5]);h=this.parseFloatStr(d[6]);for(var v=7;v<d.length;v++){var A=d[v].toUpperCase();A.startsWith("CHG=")?l=this.parseIntStr(d[v].substring(4)):A.startsWith("MASS=")&&
(e=this.parseIntStr(d[v].substring(5)))}1<e&&b.equals("H")&&(e=1-e)}else if(f=this.parseFloatRange(this.line,0,10),g=this.parseFloatRange(this.line,10,20),h=this.parseFloatRange(this.line,20,30),34>d)b=this.line.substring(31).trim();else if(b=this.line.substring(31,34).trim(),39<=d){d=this.parseIntRange(this.line,36,39);1<=d&&7>=d&&(l=4-d);d=this.parseIntRange(this.line,34,36);if(0!=d&&-3<=d&&4>=d)switch(e=J.api.JmolAdapter.getNaturalIsotope(J.api.JmolAdapter.getElementNumber(b)),e){case 0:break;
case 1:e=-d;break;default:e+=d}-2147483648==k&&this.haveAtomSerials&&(k=c+1)}switch(e){case 0:break;case -1:b="D";break;case -2:b="T";break;default:b=e+b}this.is2D&&0!=h&&(this.is2D=!1);e=new J.adapter.smarter.Atom;e.elementSymbol=b;e.formalCharge=l;this.setAtomCoordXYZ(e,f,g,h);-2147483648==k?this.atomSetCollection.addAtom(e):(this.haveAtomSerials=!0,e.atomSerial=k,this.atomSetCollection.addAtomWithMappedSerialNumber(e))}this.isV3000&&this.discardLinesUntilContains("END ATOM")},"~N");b(c$,"checkLineContinuation",
function(){for(;this.line.endsWith("-");){var a=this.line;this.readLine();this.line=a+this.line}});b(c$,"readBonds",function(a){this.isV3000&&this.discardLinesUntilContains("BEGIN BOND");for(var c=0;c<a;++c){this.readLine();var d,b,f,g=0;if(this.isV3000){this.checkLineContinuation();var h=this.getTokens();f=this.parseIntStr(h[3]);d=this.parseIntStr(h[4]);b=this.parseIntStr(h[5]);for(var l=6;l<h.length;l++){var e=h[l].toUpperCase();if(e.startsWith("CFG=")){g=this.parseIntStr(h[l].substring(4));break}else if(e.startsWith("ENDPTS=")&&
!(0>this.line.indexOf("ATTACH=ALL"))){h=J.adapter.smarter.AtomSetCollectionReader.getTokensAt(this.line,this.line.indexOf("ENDPTS=")+8);l=this.parseIntStr(h[0]);f=this.fixOrder(f,0);for(e=1;e<=l;e++)b=this.parseIntStr(h[e]),this.atomSetCollection.addNewBondWithMappedSerialNumbers(d,b,f);break}}}else d=this.parseIntRange(this.line,0,3),b=this.parseIntRange(this.line,3,6),f=this.parseIntRange(this.line,6,9),this.is2D&&(1==f&&12<=this.line.length)&&(g=this.parseIntRange(this.line,9,12));f=this.fixOrder(f,
g);this.haveAtomSerials?this.atomSetCollection.addNewBondWithMappedSerialNumbers(d,b,f):this.atomSetCollection.addNewBondWithOrder(this.iatom0+d-1,this.iatom0+b-1,f)}this.isV3000&&this.discardLinesUntilContains("END BOND")},"~N");b(c$,"fixOrder",function(a,c){switch(a){default:case 0:case -10:return 1;case 1:switch(c){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")});
p("J.adapter.readers.molxyz");q(["J.adapter.smarter.AtomSetCollectionReader"],"J.adapter.readers.molxyz.XyzReader",["java.lang.Float","J.util.Logger"],function(){c$=G(J.adapter.readers.molxyz,"XyzReader",J.adapter.smarter.AtomSetCollectionReader);e(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.readLine();
this.checkCurrentLineForScript();this.atomSetCollection.newAtomSet();var c=this.line;this.readAtoms(a);this.applySymmetryAndSetTrajectory();this.atomSetCollection.setAtomSetName(c);if(this.isLastModel(this.modelNumber))return this.continuing=!1}else this.skipAtomSet(a);this.discardLinesUntilNonBlank();return!1});e(c$,"finalizeReader",function(){this.isTrajectory=!1;this.finalizeReaderASCR()});b(c$,"skipAtomSet",function(a){for(this.readLine();0<=--a;)this.readLine()},"~N");b(c$,"readAtoms",function(a){for(var c=
0;c<a;++c){this.readLine();var d=this.getTokens();if(4>d.length)J.util.Logger.warn("line cannot be read for XYZ atom data: "+this.line);else{var b=this.atomSetCollection.addNewAtom();this.setElementAndIsotope(b,d[0]);b.x=this.parseFloatStr(d[1]);b.y=this.parseFloatStr(d[2]);b.z=this.parseFloatStr(d[3]);if(Float.isNaN(b.x)||Float.isNaN(b.y)||Float.isNaN(b.z))J.util.Logger.warn("line cannot be read for XYZ atom data: "+this.line),b.set(0,0,0);var f=4;this.setAtomCoord(b);switch(d.length){case 4:continue;
case 5:case 6:case 8:case 9:if(0<=d[4].indexOf("."))b.partialCharge=this.parseFloatStr(d[4]);else{var g=this.parseIntStr(d[4]);-2147483648!=g&&(b.formalCharge=g)}switch(d.length){case 5:continue;case 6:b.radius=this.parseFloatStr(d[5]);continue;case 9:b.atomSerial=this.parseIntStr(d[8])}f++;default:var g=this.parseFloatStr(d[f++]),h=this.parseFloatStr(d[f++]),d=this.parseFloatStr(d[f++]);if(Float.isNaN(g)||Float.isNaN(h)||Float.isNaN(d))continue;this.atomSetCollection.addVibrationVector(b.index,g,
h,d)}}}},"~N")});p("J.adapter.smarter");q(["JU.P3"],"J.adapter.smarter.Atom",["java.lang.Float","JU.AU","$.List","$.V3"],function(){c$=u(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;t(this,arguments)},J.adapter.smarter,"Atom",JU.P3,Cloneable);b(c$,"addTensor",function(a,c,d){if(null==a)return null;if(d||null==this.tensors)this.tensors=new JU.List;this.tensors.addLast(a);null!=c&&a.setType(c);return a},"J.util.Tensor,~S,~B");Da(c$,function(){this.set(NaN,NaN,NaN)});b(c$,"getClone",function(){var a=this.clone();null!=this.vib&&(a.vib=JU.V3.newV(a.vib));null!=this.anisoBorU&&(a.anisoBorU=
JU.AU.arrayCopyF(this.anisoBorU,-1));if(null!=this.tensors){a.tensors=new JU.List;for(var c=this.tensors.size();0<=--c;)a.tensors.addLast(this.tensors.get(c).copyTensor())}return a});b(c$,"getElementSymbol",function(){if(null==this.elementSymbol&&null!=this.atomName){for(var a=this.atomName.length,c=0,d=String.fromCharCode(0);c<a&&!J.adapter.smarter.Atom.isValidFirstSymbolChar(d=this.atomName.charAt(c));)++c;switch(a-c){case 0:break;default:if(a=this.atomName.charAt(c+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=b(c$,"isValidElementSymbol",function(a){return"A"<=a&&"Z">=a&&0>J.adapter.smarter.Atom.elementCharMasks[a.charCodeAt(0)-65]},"~S");c$.isValidElementSymbol2=b(c$,"isValidElementSymbol2",function(a,c){return"A">a||"Z"<a||"a">c||"z"<c?!1:0!=(J.adapter.smarter.Atom.elementCharMasks[a.charCodeAt(0)-65]>>c.charCodeAt(0)-97&1)},"~S,~S");
c$.isValidElementSymbolNoCaseSecondChar2=b(c$,"isValidElementSymbolNoCaseSecondChar2",function(a,c){"A"<=c&&"Z">=c&&(c=String.fromCharCode(c.charCodeAt(0)+32));return"A">a||"Z"<a||"a">c||"z"<c?!1:0!=(J.adapter.smarter.Atom.elementCharMasks[a.charCodeAt(0)-65]>>c.charCodeAt(0)-97&1)},"~S,~S");c$.isValidFirstSymbolChar=b(c$,"isValidFirstSymbolChar",function(a){return"A"<=a&&"Z">=a&&0!=J.adapter.smarter.Atom.elementCharMasks[a.charCodeAt(0)-65]},"~S");c$.isValidElementSymbolNoCaseSecondChar=b(c$,"isValidElementSymbolNoCaseSecondChar",
function(a){if(null==a)return!1;var c=a.length;if(0==c)return!1;var d=a.charAt(0);if(1==c)return J.adapter.smarter.Atom.isValidElementSymbol(d);if(2<c)return!1;a=a.charAt(1);return J.adapter.smarter.Atom.isValidElementSymbolNoCaseSecondChar2(d,a)},"~S");b(c$,"scaleVector",function(a){null==this.vib||Float.isNaN(this.vib.z)||this.vib.scale(a)},"~N");B(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])});p("J.adapter.smarter");q(["J.api.JmolAdapterAtomIterator"],"J.adapter.smarter.AtomIterator",["java.lang.Float","J.api.JmolAdapter"],function(){c$=u(function(){this.iatom=0;this.atom=null;this.atomCount=0;this.bsAtoms=this.atoms=null;t(this,arguments)},J.adapter.smarter,"AtomIterator",null,J.api.JmolAdapterAtomIterator);w(c$,function(a){this.atomCount=a.getAtomCount();this.atoms=
a.getAtoms();this.bsAtoms=a.bsAtoms;this.iatom=0},"J.adapter.smarter.AtomSetCollection");e(c$,"hasNext",function(){if(this.iatom==this.atomCount)return!1;for(;null==(this.atom=this.atoms[this.iatom++])||null!=this.bsAtoms&&!this.bsAtoms.get(this.atom.index);)if(this.iatom==this.atomCount)return!1;this.atoms[this.iatom-1]=null;return!0});e(c$,"getAtomSetIndex",function(){return this.atom.atomSetIndex});e(c$,"getAtomSymmetry",function(){return this.atom.bsSymmetry});e(c$,"getAtomSite",function(){return this.atom.atomSite+
1});e(c$,"getUniqueID",function(){return Integer.$valueOf(this.atom.index)});e(c$,"getElementNumber",function(){return 0<this.atom.elementNumber?this.atom.elementNumber:J.api.JmolAdapter.getElementNumber(this.atom.getElementSymbol())});e(c$,"getAtomName",function(){return this.atom.atomName});e(c$,"getFormalCharge",function(){return this.atom.formalCharge});e(c$,"getPartialCharge",function(){return this.atom.partialCharge});e(c$,"getTensors",function(){return this.atom.tensors});e(c$,"getRadius",
function(){return this.atom.radius});e(c$,"getVib",function(){return null==this.atom.vib||Float.isNaN(this.atom.vib.z)?null:this.atom.vib});e(c$,"getBfactor",function(){return Float.isNaN(this.atom.bfactor)&&null!=this.atom.anisoBorU?100*this.atom.anisoBorU[7]:this.atom.bfactor});e(c$,"getOccupancy",function(){return z(100*this.atom.foccupancy)});e(c$,"getIsHetero",function(){return this.atom.isHetero});e(c$,"getAtomSerial",function(){return this.atom.atomSerial});e(c$,"getChainID",function(){return this.atom.chainID});
e(c$,"getAlternateLocationID",function(){return J.api.JmolAdapter.canonizeAlternateLocationID(this.atom.altLoc)});e(c$,"getGroup3",function(){return this.atom.group3});e(c$,"getSequenceNumber",function(){return this.atom.sequenceNumber});e(c$,"getInsertionCode",function(){return J.api.JmolAdapter.canonizeInsertionCode(this.atom.insertionCode)});e(c$,"getXYZ",function(){return this.atom})});p("J.adapter.smarter");q(["java.util.Hashtable","JU.P3"],"J.adapter.smarter.AtomSetCollection","java.lang.Boolean $.Float java.util.Collections $.Properties JU.AU $.BS $.List $.M3 $.M4 $.P3i $.PT $.SB $.V3 J.adapter.smarter.Atom $.Bond $.SmarterJmolAdapter J.api.Interface J.util.BSUtil $.Escape $.Logger".split(" "),
function(){c$=u(function(){this.atomSetCollectionAuxiliaryInfo=this.collectionName=this.fileTypeName=this.bsAtoms=null;this.atomCount=0;this.atoms=null;this.bondCount=0;this.bonds=null;this.structureCount=0;this.structures=null;this.atomSetCount=0;this.currentAtomSetIndex=-1;this.errorMessage=this.latticeCells=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.doFixPeriodic=!1;this.notionalUnitCell=null;this.allowMultiple=!1;this.vConnect=this.readerList=this.reader=null;this.connectNextAtomSet=this.connectNextAtomIndex=0;this.bsStructuredModels=this.connectLast=null;this.symmetryRange=0;this.centroidPacked=this.doCentroidUnitCell=!1;this.symmetry=this.fmatSupercell=this.ptSupercell=null;this.haveUnitCell=!1;this.doNormalize=!0;this.doPackUnitCell=!1;this.rmaxz=this.rmaxy=this.rmaxx=
this.rminz=this.rminy=this.rminx=0;this.maxXYZ0=this.minXYZ0=this.maxXYZ=this.minXYZ=this.unitCellOffset=this.ptOffset=null;this.haveAnisou=!1;this.dtype=3;this.unitCellTranslations=null;this.baseSymmetryAtomCount=0;this.checkLatticeOnly=!1;this.latticeOp=0;this.latticeOnly=!1;this.bondIndex0=this.bondCount0=this.firstSymmetryAtom=this.noSymmetryCount=0;this.applySymmetryToBonds=!1;this.checkSpecial=!0;this.checkAll=!1;this.atomSymbolicMap=this.mTemp=this.ptTemp=null;this.haveMappedSerials=!1;t(this,
arguments)},J.adapter.smarter,"AtomSetCollection");N(c$,function(){this.atomSetCollectionAuxiliaryInfo=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.notionalUnitCell=M(6,0);this.ptOffset=new JU.P3;this.atomSymbolicMap=new java.util.Hashtable});b(c$,"getFileTypeName",function(){return this.fileTypeName});
b(c$,"getCollectionName",function(){return this.collectionName});b(c$,"setCollectionName",function(a){null!=a&&(a=a.trim(),0!=a.length&&(this.collectionName=a))},"~S");b(c$,"getAtomSetCollectionAuxiliaryInfoMap",function(){return this.atomSetCollectionAuxiliaryInfo});b(c$,"clearGlobalBoolean",function(a){this.atomSetCollectionAuxiliaryInfo.remove(J.adapter.smarter.AtomSetCollection.globalBooleans[a])},"~N");b(c$,"setGlobalBoolean",function(a){this.setAtomSetCollectionAuxiliaryInfo(J.adapter.smarter.AtomSetCollection.globalBooleans[a],
Boolean.TRUE)},"~N");b(c$,"getGlobalBoolean",function(a){return this.getAtomSetCollectionAuxiliaryInfo(J.adapter.smarter.AtomSetCollection.globalBooleans[a])===Boolean.TRUE},"~N");b(c$,"getAtomCount",function(){return this.atomCount});b(c$,"getHydrogenAtomCount",function(){for(var a=0,c=0;c<this.atomCount;c++)(1==this.atoms[c].elementNumber||this.atoms[c].elementSymbol.equals("H"))&&a++;return a});b(c$,"getAtoms",function(){return this.atoms});b(c$,"getAtom",function(a){return this.atoms[a]},"~N");
b(c$,"getBondCount",function(){return this.bondCount});b(c$,"getBonds",function(){return this.bonds});b(c$,"getBond",function(a){return this.bonds[a]},"~N");b(c$,"getStructureCount",function(){return this.structureCount});b(c$,"getStructures",function(){return this.structures});b(c$,"getAtomSetCount",function(){return this.atomSetCount});b(c$,"getCurrentAtomSetIndex",function(){return this.currentAtomSetIndex});b(c$,"setCurrentAtomSetIndex",function(a){this.currentAtomSetIndex=a},"~N");b(c$,"setDoFixPeriodic",
function(){this.doFixPeriodic=!0});w(c$,function(a,c,d,b){this.fileTypeName=a;this.reader=c;this.allowMultiple=null==c||0>c.desiredVibrationNumber;a=new java.util.Properties;a.put("PATH_KEY",".PATH");a.put("PATH_SEPARATOR",J.adapter.smarter.SmarterJmolAdapter.PATH_SEPARATOR);this.setAtomSetCollectionAuxiliaryInfo("properties",a);if(null!=d){b=0;this.readerList=new JU.List;for(a=0;a<d.length;a++)(0<d[a].atomCount||null!=d[a].reader&&d[a].reader.mustFinalizeModelSet)&&this.appendAtomSetCollection(b++,
d[a]);1<b&&this.setAtomSetCollectionAuxiliaryInfo("isMultiFile",Boolean.TRUE)}else null!=b&&(this.setAtomSetCollectionAuxiliaryInfo("isMultiFile",Boolean.TRUE),this.appendAtomSetCollectionList(b))},"~S,J.adapter.smarter.AtomSetCollectionReader,~A,JU.List");b(c$,"appendAtomSetCollectionList",function(a){var c=a.size();if(0==c)this.errorMessage="No file found!";else for(var d=0;d<c;d++){var b=a.get(d);s(b,JU.List)?this.appendAtomSetCollectionList(b):this.appendAtomSetCollection(d,b)}},"JU.List");b(c$,
"setTrajectory",function(){this.isTrajectory||(this.trajectorySteps=new JU.List);this.isTrajectory=!0;this.addTrajectoryStep()});b(c$,"appendAtomSetCollection",function(a,c){null!=c.reader&&c.reader.mustFinalizeModelSet&&this.readerList.addLast(c.reader);var d=this.atomCount;this.setAtomSetCollectionAuxiliaryInfo("loadState",c.getAtomSetCollectionAuxiliaryInfo("loadState"));if(null!=c.bsAtoms){null==this.bsAtoms&&(this.bsAtoms=new JU.BS);for(var b=c.bsAtoms.nextSetBit(0);0<=b;b=c.bsAtoms.nextSetBit(b+
1))this.bsAtoms.set(d+b)}for(var b=0,f=this.atomSetCount,g=0;g<c.atomSetCount;g++){this.newAtomSet();var h=(this.atomSetAuxiliaryInfo[this.currentAtomSetIndex]=c.atomSetAuxiliaryInfo[g]).get("PDB_CONECT_firstAtom_count_max");null!=h&&(h[0]+=d);this.setAtomSetAuxiliaryInfo("title",c.collectionName);this.setAtomSetName(c.getAtomSetName(g));for(h=0;h<c.atomSetAtomCounts[g];h++){try{null!=this.bsAtoms&&this.bsAtoms.set(this.atomCount),this.newCloneAtom(c.atoms[b])}catch(l){if(y(l,Exception))this.errorMessage=
"appendAtomCollection error: "+l;else throw l;}b++}this.atomSetNumbers[this.currentAtomSetIndex]=0>a?this.currentAtomSetIndex+1:1E6*(a+1)+c.atomSetNumbers[g]}for(b=0;b<c.bondCount;b++)g=c.bonds[b],this.addNewBondWithOrder(g.atomIndex1+d,g.atomIndex2+d,g.order);for(b=J.adapter.smarter.AtomSetCollection.globalBooleans.length;0<=--b;)c.getGlobalBoolean(b)&&this.setGlobalBoolean(b);for(b=0;b<c.structureCount;b++)d=c.structures[b],this.addStructure(d),d.modelStartEnd[0]+=f,d.modelStartEnd[1]+=f},"~N,J.adapter.smarter.AtomSetCollection");
b(c$,"setNoAutoBond",function(){this.setAtomSetCollectionAuxiliaryInfo("noAutoBond",Boolean.TRUE)});b(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");b(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.atomCount;a++)this.atoms[a].atomSetIndex=this.atomSetCount-1-this.atoms[a].atomSetIndex;for(a=0;a<this.structureCount;a++){var c=this.structures[a].modelStartEnd[0];0<=c&&(this.structures[a].modelStartEnd[0]=this.atomSetCount-1-this.structures[a].modelStartEnd[1],this.structures[a].modelStartEnd[1]=this.atomSetCount-1-c)}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.List;for(a=0;a<this.atomCount;a++)d[this.atoms[a].atomSetIndex].addLast(this.atoms[a]);for(var c=D(this.atomCount,0),b=this.atomCount,a=this.atomSetCount;0<=--a;)for(var f=d[a].size();0<=--f;){var g=this.atoms[--b]=d[a].get(f);c[g.index]=b;g.index=b}for(a=0;a<this.bondCount;a++)this.bonds[a].atomIndex1=c[this.bonds[a].atomIndex1],this.bonds[a].atomIndex2=c[this.bonds[a].atomIndex2];for(a=0;a<this.atomSetCount;a++)d=
this.getAtomSetAuxiliaryInfoValue(a,"PDB_CONECT_firstAtom_count_max"),null!=d&&(d[0]=c[d[0]],d[1]=this.atomSetAtomCounts[a])});b(c$,"reverseSets",function(a,c){for(var d=JU.AU.createArrayOfArrayList(this.atomSetCount),b=0;b<this.atomSetCount;b++)d[b]=new JU.List;for(b=0;b<c;b++){if(0>a[b].atomSetIndex)return;d[a[b].atomSetIndex].addLast(a[b])}for(b=this.atomSetCount;0<=--b;)for(var f=d[b].size();0<=--f;)a[--c]=d[b].get(f)},"~A,~N");b(c$,"reverseObject",function(a){for(var c=this.atomSetCount,d=m(c/
2);0<=--d;)JU.AU.swap(a,d,c-1-d)},"~A");c$.reverseList=b(c$,"reverseList",function(a){null!=a&&java.util.Collections.reverse(a)},"JU.List");b(c$,"reverseArray",function(a){for(var c=this.atomSetCount,d=m(c/2);0<=--d;)JU.AU.swapInt(a,d,c-1-d)},"~A");b(c$,"getList",function(a){var c;for(c=this.atomCount;0<=--c&&!(null!=this.atoms[c]&&"\x00"!=(a?this.atoms[c].altLoc:this.atoms[c].insertionCode)););if(!(0>c)){var d=Array(this.atomSetCount);for(c=0;c<this.atomSetCount;c++)d[c]="";var b;for(c=0;c<this.atomCount;c++)if(null!=
this.atoms[c]){var f=a?this.atoms[c].altLoc:this.atoms[c].insertionCode;if("\x00"!=f&&0>d[b=this.atoms[c].atomSetIndex].indexOf(f))d[b]+=f}a=a?"altLocs":"insertionCodes";for(c=0;c<this.atomSetCount;c++)0<d[c].length&&this.setAtomSetAuxiliaryInfoForSet(a,d[c],c)}},"~B");b(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.atomSetCollectionAuxiliaryInfo=new java.util.Hashtable;this.atomSetCount=0;this.atomSetNumbers=D(16,0);this.atomSymbolicMap=new java.util.Hashtable;this.connectLast=this.bonds=null;this.currentAtomSetIndex=-1;this.symmetry=this.readerList=this.notionalUnitCell=this.latticeCells=null;this.structures=Array(16);this.structureCount=0;this.vConnect=this.vibrationSteps=this.trajectorySteps=null});b(c$,"discardPreviousAtoms",function(){for(var a=this.atomCount;0<=
--a;)this.atoms[a]=null;this.atomCount=0;this.clearSymbolicMap();this.atomSetCount=0;this.currentAtomSetIndex=-1;for(a=this.atomSetAuxiliaryInfo.length;0<=--a;)this.atomSetAtomCounts[a]=0,this.atomSetBondCounts[a]=0,this.atomSetAuxiliaryInfo[a]=null});b(c$,"removeAtomSet",function(a){null==this.bsAtoms&&(this.bsAtoms=new JU.BS,this.bsAtoms.setBits(0,this.atomCount));var c=this.atomSetAtomIndexes[a],d=c+this.atomSetAtomCounts[a];this.bsAtoms.clearBits(c,d);for(c=d;c<this.atomCount;c++)this.atoms[c].atomSetIndex--;
for(c=a+1;c<this.atomSetCount;c++)this.atomSetAuxiliaryInfo[c-1]=this.atomSetAuxiliaryInfo[c],this.atomSetAtomIndexes[c-1]=this.atomSetAtomIndexes[c],this.atomSetBondCounts[c-1]=this.atomSetBondCounts[c],this.atomSetAtomCounts[c-1]=this.atomSetAtomCounts[c],this.atomSetNumbers[c-1]=this.atomSetNumbers[c];for(c=d=0;c<this.structureCount;c++){var b=this.structures[c];b.modelStartEnd[0]==a&&b.modelStartEnd[1]==a&&(this.structures[c]=null,d++)}if(0<d){a=Array(this.structureCount-d);for(d=c=0;c<this.structureCount;c++)null!=
this.structures[c]&&(a[d++]=this.structures[c]);this.structures=a}for(c=0;c<this.bondCount;c++)this.bonds[c].atomSetIndex=this.atoms[this.bonds[c].atomIndex1].atomSetIndex;this.atomSetAuxiliaryInfo[--this.atomSetCount]=null},"~N");b(c$,"removeCurrentAtomSet",function(){0>this.currentAtomSetIndex||(this.currentAtomSetIndex--,this.atomSetCount--)});b(c$,"newCloneAtom",function(a){a=a.getClone();this.addAtom(a);return a},"J.adapter.smarter.Atom");b(c$,"cloneFirstAtomSet",function(a){if(this.allowMultiple){this.newAtomSet();
0==a&&(a=this.atomSetAtomCounts[0]);for(var c=0;c<a;++c)this.newCloneAtom(this.atoms[c])}},"~N");b(c$,"cloneFirstAtomSetWithBonds",function(a){if(this.allowMultiple){this.cloneFirstAtomSet(0);for(var c=this.atomSetAtomCounts[0],d=0;d<a;d++){var b=this.bonds[this.bondCount-a];this.addNewBondWithOrder(b.atomIndex1+c,b.atomIndex2+c,b.order)}}},"~N");b(c$,"cloneLastAtomSet",function(){this.cloneLastAtomSetFromPoints(0,null)});b(c$,"cloneLastAtomSetFromPoints",function(a,c){if(this.allowMultiple){var d=
0<a?a:this.getLastAtomSetAtomCount(),b=this.getLastAtomSetAtomIndex();this.newAtomSet();for(var f=0;f<d;++f){var g=this.newCloneAtom(this.atoms[b++]);null!=c&&g.setT(c[f])}}},"~N,~A");b(c$,"getFirstAtomSetAtomCount",function(){return this.atomSetAtomCounts[0]});b(c$,"getLastAtomSetAtomCount",function(){return this.atomSetAtomCounts[this.currentAtomSetIndex]});b(c$,"getLastAtomSetAtomIndex",function(){return this.atomCount-this.atomSetAtomCounts[this.currentAtomSetIndex]});b(c$,"addNewAtom",function(){var a=
new J.adapter.smarter.Atom;this.addAtom(a);return a});b(c$,"addAtom",function(a){this.atomCount==this.atoms.length&&(this.atoms=2E5<this.atomCount?JU.AU.ensureLength(this.atoms,this.atomCount+5E4):JU.AU.doubleLength(this.atoms));0==this.atomSetCount&&this.newAtomSet();a.index=this.atomCount;this.atoms[this.atomCount++]=a;a.atomSetIndex=this.currentAtomSetIndex;a.atomSite=this.atomSetAtomCounts[this.currentAtomSetIndex]++},"J.adapter.smarter.Atom");b(c$,"addAtomWithMappedName",function(a){this.addAtom(a);
this.mapMostRecentAtomName()},"J.adapter.smarter.Atom");b(c$,"addAtomWithMappedSerialNumber",function(a){this.addAtom(a);this.mapMostRecentAtomSerialNumber()},"J.adapter.smarter.Atom");b(c$,"addNewBondWithOrder",function(a,c,d){if(0>a||a>=this.atomCount||0>c||c>=this.atomCount)return null;a=new J.adapter.smarter.Bond(a,c,d);this.addBond(a);return a},"~N,~N,~N");b(c$,"addNewBondFromNames",function(a,c,d){return this.addNewBondWithOrder(this.getAtomIndexFromName(a),this.getAtomIndexFromName(c),d)},
"~S,~S,~N");b(c$,"addNewBondWithMappedSerialNumbers",function(a,c,d){return this.addNewBondWithOrder(this.getAtomIndexFromSerial(a),this.getAtomIndexFromSerial(c),d)},"~N,~N,~N");b(c$,"addConnection",function(a){null==this.vConnect&&(this.connectLast=null,this.vConnect=new JU.List);null!=this.connectLast&&a[0]==this.connectLast[0]&&a[1]==this.connectLast[1]&&2048!=a[2]?this.connectLast[2]++:this.vConnect.addLast(this.connectLast=a)},"~A");b(c$,"connectAllBad",function(a){for(var c=this.connectNextAtomIndex,
d=this.connectNextAtomSet;d<this.atomSetCount;d++)this.setAtomSetAuxiliaryInfoForSet("PDB_CONECT_firstAtom_count_max",[c,this.atomSetAtomCounts[d],a],d),null!=this.vConnect&&(this.setAtomSetAuxiliaryInfoForSet("PDB_CONECT_bonds",this.vConnect,d),this.setGlobalBoolean(3)),c+=this.atomSetAtomCounts[d];this.vConnect=null;this.connectNextAtomSet=this.currentAtomSetIndex+1;this.connectNextAtomIndex=c},"~N");b(c$,"connectAll",function(a,c){if(!(0>this.currentAtomSetIndex))if(c)this.connectAllBad(a);else if(this.setAtomSetAuxiliaryInfo("PDB_CONECT_firstAtom_count_max",
[this.atomSetAtomIndexes[this.currentAtomSetIndex],this.atomSetAtomCounts[this.currentAtomSetIndex],a]),null!=this.vConnect){for(var d=this.connectNextAtomIndex,b=this.connectNextAtomSet;b<this.atomSetCount;b++)this.setAtomSetAuxiliaryInfoForSet("PDB_CONECT_bonds",this.vConnect,b),this.setGlobalBoolean(3),d+=this.atomSetAtomCounts[b];this.vConnect=null;this.connectNextAtomSet=this.currentAtomSetIndex+1;this.connectNextAtomIndex=d}},"~N,~B");b(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?J.util.Logger.debugging&&J.util.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.currentAtomSetIndex]++))},"J.adapter.smarter.Bond");b(c$,"finalizeStructures",function(){if(0!=this.structureCount){this.bsStructuredModels=
new JU.BS;for(var a=new java.util.Hashtable,c=0;c<this.structureCount;c++){var d=this.structures[c];-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],b=a.get(d),b=(null==b?0:b.intValue())+1;a.put(d,Integer.$valueOf(b))}}for(c=0;c<this.structureCount;c++)d=this.structures[c],1==d.strandCount&&(d.strandCount=a.get(d.structureID+
" "+d.modelStartEnd[0]).intValue())}});b(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");b(c$,"addVibrationVectorWithSymmetry",function(a,c,d,b,f){if(f){f=this.atoms[a].atomSite;for(var g=this.atoms[a].atomSetIndex;a<this.atomCount&&this.atoms[a].atomSetIndex==g;a++)this.atoms[a].atomSite==f&&this.addVibrationVector(a,c,
d,b)}else this.addVibrationVector(a,c,d,b)},"~N,~N,~N,~N,~B");b(c$,"addVibrationVector",function(a,c,d,b){this.allowMultiple||(a%=this.atomCount);this.atoms[a].vib=JU.V3.new3(c,d,b)},"~N,~N,~N,~N");b(c$,"setAtomSetSpaceGroupName",function(a){this.setAtomSetAuxiliaryInfo("spaceGroup",a+"")},"~S");b(c$,"setCoordinatesAreFractional",function(a){this.coordinatesAreFractional=a;this.setAtomSetAuxiliaryInfo("coordinatesAreFractional",Boolean.$valueOf(a));a&&this.setGlobalBoolean(0)},"~B");b(c$,"setSymmetryRange",
function(a){this.symmetryRange=a;this.setAtomSetCollectionAuxiliaryInfo("symmetryRange",Float.$valueOf(a))},"~N");b(c$,"setLatticeCells",function(a,c,d,b,f,g,h){this.latticeCells=a;var l=555>=a[0]&&555<=a[1]&&(0==a[2]||1==a[2]||-1==a[2]);this.doNormalize=0!=a[0]&&(!l||1==a[2]);this.applySymmetryToBonds=c;this.doPackUnitCell=d;this.doCentroidUnitCell=b;this.centroidPacked=f;null!=g?this.setSuperCell(g):this.ptSupercell=h},"~A,~B,~B,~B,~B,~S,JU.P3");b(c$,"setSupercellFromPoint",function(a){this.ptSupercell=
a;J.util.Logger.info("Using supercell "+J.util.Escape.eP(a))},"JU.P3");b(c$,"setSuperCell",function(a){null==this.fmatSupercell&&(this.fmatSupercell=M(16,0),null==this.getSymmetry().getMatrixFromString(a,this.fmatSupercell,!0,0)?this.fmatSupercell=null:J.util.Logger.info("Using supercell \n"+JU.M4.newA(this.fmatSupercell)))},"~S");b(c$,"getSymmetry",function(){null==this.symmetry&&(this.symmetry=J.api.Interface.getOptionInterface("symmetry.Symmetry"));return this.symmetry});b(c$,"setNotionalUnitCell",
function(a,c,d){this.notionalUnitCell=M(a.length,0);this.unitCellOffset=d;for(var b=0;b<a.length;b++)this.notionalUnitCell[b]=a[b];this.haveUnitCell=!0;this.setAtomSetAuxiliaryInfo("notionalUnitcell",this.notionalUnitCell);this.setGlobalBoolean(2);this.getSymmetry().setUnitCell(this.notionalUnitCell);null!=d&&(this.symmetry.setOffsetPt(d),this.setAtomSetAuxiliaryInfo("unitCellOffset",d));null!=c&&(this.symmetry.setUnitCellOrientation(c),this.setAtomSetAuxiliaryInfo("matUnitCellOrientation",c))},"~A,JU.M3,JU.P3");
b(c$,"addSpaceGroupOperation",function(a){this.getSymmetry().setSpaceGroup(this.doNormalize);return this.symmetry.addSpaceGroupOperation(a,0)},"~S");b(c$,"setLatticeParameter",function(a){this.getSymmetry().setSpaceGroup(this.doNormalize);this.symmetry.setLattice(a)},"~N");b(c$,"applySymmetry",function(a,c){null!=a&&this.getSymmetry().setSpaceGroupS(a);this.applySymmetryLattice(c)},"J.api.SymmetryInterface,J.adapter.smarter.MSInterface");b(c$,"applySymmetryLattice",function(a){if(this.coordinatesAreFractional&&
null!=this.getSymmetry().getSpaceGroup()){var c=this.latticeCells[0],d=this.latticeCells[1],b=Math.abs(this.latticeCells[2]);if(null!=this.fmatSupercell){this.rminz=this.rminy=this.rminx=3.4028235E38;this.rmaxz=this.rmaxy=this.rmaxx=-3.4028235E38;var f=this.setSym(0,1,2),g=this.setSym(4,5,6),h=this.setSym(8,9,10);this.minXYZ=JU.P3i.new3(z(this.rminx),z(this.rminy),z(this.rminz));this.maxXYZ=JU.P3i.new3(z(this.rmaxx),z(this.rmaxy),z(this.rmaxz));this.applyAllSymmetry(a);for(var l=this.getLastAtomSetAtomIndex(),
e=l;e<this.atomCount;e++)this.symmetry.toCartesian(this.atoms[e],!0);this.symmetry=null;this.setNotionalUnitCell([0,0,0,0,0,0,f.x,f.y,f.z,g.x,g.y,g.z,h.x,h.y,h.z],null,this.getAtomSetAuxiliaryInfoValue(-1,"unitCellOffset"));this.setAtomSetSpaceGroupName("P1");this.getSymmetry().setSpaceGroup(this.doNormalize);this.symmetry.addSpaceGroupOperation("x,y,z",0);for(e=l;e<this.atomCount;e++)this.symmetry.toFractional(this.atoms[e],!0);this.haveAnisou=!1;this.atomSetAuxiliaryInfo[this.currentAtomSetIndex].remove("matUnitCellOrientation");
this.doPackUnitCell=!1}this.minXYZ=new JU.P3i;this.maxXYZ=JU.P3i.new3(c,d,b);this.applyAllSymmetry(a);this.fmatSupercell=null}},"J.adapter.smarter.MSInterface");b(c$,"setSym",function(a,c,d){var b=new JU.P3;b.set(this.fmatSupercell[a],this.fmatSupercell[c],this.fmatSupercell[d]);this.setSymmetryMinMax(b);this.symmetry.toCartesian(b,!1);return b},"~N,~N,~N");b(c$,"setSymmetryMinMax",function(a){this.rminx>a.x&&(this.rminx=a.x);this.rminy>a.y&&(this.rminy=a.y);this.rminz>a.z&&(this.rminz=a.z);this.rmaxx<
a.x&&(this.rmaxx=a.x);this.rmaxy<a.y&&(this.rmaxy=a.y);this.rmaxz<a.z&&(this.rmaxz=a.z)},"JU.P3");b(c$,"isInSymmetryRange",function(a){return a.x>=this.rminx&&a.y>=this.rminy&&a.z>=this.rminz&&a.x<=this.rmaxx&&a.y<=this.rmaxy&&a.z<=this.rmaxz},"JU.P3");b(c$,"isWithinCell",function(a,c,d,b,f,g,h,l,e){return c.x>d-e&&c.x<b+e&&(2>a||c.y>f-e&&c.y<g+e)&&(3>a||c.z>h-e&&c.z<l+e)},"~N,JU.P3,~N,~N,~N,~N,~N,~N,~N");b(c$,"setAnisoBorU",function(a,c,d){this.haveAnisou=!0;a.anisoBorU=c;c[6]=d},"J.adapter.smarter.Atom,~A,~N");
b(c$,"getAnisoBorU",function(a){return a.anisoBorU},"J.adapter.smarter.Atom");b(c$,"setTensors",function(){if(this.haveAnisou){this.getSymmetry();for(var a=this.getLastAtomSetAtomIndex();a<this.atomCount;a++)this.atoms[a].addTensor(this.symmetry.getTensor(this.atoms[a].anisoBorU),null,!1)}});b(c$,"setLatticeOnly",function(a){this.checkLatticeOnly=a},"~B");b(c$,"setBaseSymmetryAtomCount",function(a){this.baseSymmetryAtomCount=a},"~N");b(c$,"applyAllSymmetry",function(a){if(0!=this.atomCount){this.noSymmetryCount=
0==this.baseSymmetryAtomCount?this.getLastAtomSetAtomCount():this.baseSymmetryAtomCount;this.firstSymmetryAtom=this.getLastAtomSetAtomIndex();this.setTensors();this.bondCount0=this.bondCount;this.finalizeSymmetry(this.symmetry);var c=this.symmetry.getSpaceGroupOperationCount();this.dtype=z(this.symmetry.getUnitCellInfoType(6));this.symmetry.setMinMaxLatticeParameters(this.minXYZ,this.maxXYZ);this.doCentroidUnitCell&&this.setAtomSetCollectionAuxiliaryInfo("centroidMinMax",[this.minXYZ.x,this.minXYZ.y,
this.minXYZ.z,this.maxXYZ.x,this.maxXYZ.y,this.maxXYZ.z,this.centroidPacked?1:0]);if(null!=this.ptSupercell)switch(this.setAtomSetAuxiliaryInfo("supercell",this.ptSupercell),this.dtype){case 3:this.minXYZ.z*=z(Math.abs(this.ptSupercell.z)),this.maxXYZ.z*=z(Math.abs(this.ptSupercell.z));case 2:this.minXYZ.y*=z(Math.abs(this.ptSupercell.y)),this.maxXYZ.y*=z(Math.abs(this.ptSupercell.y));case 1:this.minXYZ.x*=z(Math.abs(this.ptSupercell.x)),this.maxXYZ.x*=z(Math.abs(this.ptSupercell.x))}if(this.doCentroidUnitCell||
this.doPackUnitCell||0!=this.symmetryRange&&1==this.maxXYZ.x-this.minXYZ.x&&1==this.maxXYZ.y-this.minXYZ.y&&1==this.maxXYZ.z-this.minXYZ.z)switch(this.minXYZ0=JU.P3.new3(this.minXYZ.x,this.minXYZ.y,this.minXYZ.z),this.maxXYZ0=JU.P3.new3(this.maxXYZ.x,this.maxXYZ.y,this.maxXYZ.z),null!=a&&(a.setMinMax0(this.minXYZ0,this.maxXYZ0),this.minXYZ.set(z(this.minXYZ0.x),z(this.minXYZ0.y),z(this.minXYZ0.z)),this.maxXYZ.set(z(this.maxXYZ0.x),z(this.maxXYZ0.y),z(this.maxXYZ0.z))),this.dtype){case 3:this.minXYZ.z--,
this.maxXYZ.z++;case 2:this.minXYZ.y--,this.maxXYZ.y++;case 1:this.minXYZ.x--,this.maxXYZ.x++}for(var d=(this.maxXYZ.x-this.minXYZ.x)*(this.maxXYZ.y-this.minXYZ.y)*(this.maxXYZ.z-this.minXYZ.z),b=this.checkSpecial?this.noSymmetryCount*c*d:0<this.symmetryRange?this.noSymmetryCount*c:1,f=Array(b),g=0;g<this.noSymmetryCount;g++)this.atoms[g+this.firstSymmetryAtom].bsSymmetry=J.util.BSUtil.newBitSet(c*(d+1));var g=0,h=D(d,0);this.unitCellTranslations=Array(d);var l=d=0,e=Math.abs(this.symmetryRange),
k=0!=this.symmetryRange,v=0>this.symmetryRange,A=0<this.symmetryRange;k&&(this.rminz=this.rminy=this.rminx=3.4028235E38,this.rmaxz=this.rmaxy=this.rmaxx=-3.4028235E38);var F=this.symmetry,m=F;this.latticeOp=F.getLatticeOp();this.checkAll=1==this.atomSetCount&&this.checkSpecial&&0<=this.latticeOp;this.latticeOnly=this.checkLatticeOnly&&0<=this.latticeOp;var p=F.getSpaceGroupOperation(0);this.doPackUnitCell&&this.ptOffset.set(0,0,0);for(var Q=this.minXYZ.x;Q<this.maxXYZ.x;Q++)for(var r=this.minXYZ.y;r<
this.maxXYZ.y;r++)for(var q=this.minXYZ.z;q<this.maxXYZ.z;q++)if(this.unitCellTranslations[d]=JU.V3.new3(Q,r,q),h[d++]=555+100*Q+10*r+q,!(0!=Q||0!=r||0!=q||0==f.length)){for(g=0;g<this.noSymmetryCount;g++){l=this.atoms[this.firstSymmetryAtom+g];null!=a&&(F=a.getAtomSymmetry(l,this.symmetry),F!==m&&(0==F.getSpaceGroupOperationCount()&&this.finalizeSymmetry(m=F),p=F.getSpaceGroupOperation(0)));var s=JU.P3.newP(l);p.transform(s);F.toCartesian(s,!1);this.doPackUnitCell&&(F.toUnitCell(s,this.ptOffset),
l.setT(s),F.toFractional(l,!1));l.bsSymmetry.set(d*c);l.bsSymmetry.set(0);k&&this.setSymmetryMinMax(s);g<b&&(f[g]=s)}v&&(this.rminx-=e,this.rminy-=e,this.rminz-=e,this.rmaxx+=e,this.rmaxy+=e,this.rmaxz+=e);l=g=this.symmetryAddAtoms(this.firstSymmetryAtom,this.noSymmetryCount,0,0,0,0,g,d*c,f,a)}A&&(this.rminx-=e,this.rminy-=e,this.rminz-=e,this.rmaxx+=e,this.rmaxy+=e,this.rmaxz+=e);d=0;for(Q=this.minXYZ.x;Q<this.maxXYZ.x;Q++)for(r=this.minXYZ.y;r<this.maxXYZ.y;r++)for(q=this.minXYZ.z;q<this.maxXYZ.z;q++)if(d++,
0!=Q||0!=r||0!=q)g=this.symmetryAddAtoms(this.firstSymmetryAtom,this.noSymmetryCount,Q,r,q,l,g,d*c,f,a);d*this.noSymmetryCount==this.atomCount-this.firstSymmetryAtom&&this.appendAtomProperties(d);this.setSymmetryOps();this.setAtomSetAuxiliaryInfo("presymmetryAtomIndex",Integer.$valueOf(this.firstSymmetryAtom));this.setAtomSetAuxiliaryInfo("presymmetryAtomCount",Integer.$valueOf(this.noSymmetryCount));this.setAtomSetAuxiliaryInfo("latticeDesignation",F.getLatticeDesignation());this.setAtomSetAuxiliaryInfo("unitCellRange",
h);this.setAtomSetAuxiliaryInfo("unitCellTranslations",this.unitCellTranslations);this.notionalUnitCell=M(6,0);this.coordinatesAreFractional=!1;this.setAtomSetAuxiliaryInfo("hasSymmetry",Boolean.TRUE);this.setGlobalBoolean(1)}},"J.adapter.smarter.MSInterface");b(c$,"finalizeSymmetry",function(a){var c=this.getAtomSetAuxiliaryInfoValue(-1,"spaceGroup");a.setFinalOperations(c,this.atoms,this.firstSymmetryAtom,this.noSymmetryCount,this.doNormalize);(null==c||c.equals("unspecified!"))&&this.setAtomSetSpaceGroupName(a.getSpaceGroupName())},
"J.api.SymmetryInterface");b(c$,"setSymmetryOps",function(){var a=this.symmetry.getSpaceGroupOperationCount();if(0<a){for(var c=Array(a),d=0;d<a;d++)c[d]=""+this.symmetry.getSpaceGroupXyz(d,this.doNormalize);this.setAtomSetAuxiliaryInfo("symmetryOperations",c)}this.setAtomSetAuxiliaryInfo("symmetryCount",Integer.$valueOf(a))});b(c$,"setCheckSpecial",function(a){this.checkSpecial=a},"~B");b(c$,"symmetryAddAtoms",function(a,c,d,b,f,g,h,l,e,k){var v=0==g,A=this.bondCount0>this.bondIndex0&&this.applySymmetryToBonds,
F=A?D(c,0):null;this.doPackUnitCell&&this.ptOffset.set(d,b,f);var m=this.symmetryRange*this.symmetryRange,p=0>this.symmetryRange,Q=0<this.symmetryRange,r=v&&Q,Q=(new Boolean(Q&!v)).valueOf(),q=this.symmetry.getSpaceGroupOperationCount();1==q&&(this.checkSpecial=!1);var s=p||Q,t=this.checkSpecial||s,u=this.checkSpecial||r,z=this.symmetry;p&&(g=c);c=a+c;for(var p=new JU.P3,y=0;y<q;y++)if(!(v&&0==y||this.latticeOnly&&0<y&&y!=this.latticeOp)){for(var w=this.checkSpecial?h:Q?g:0,B=a;B<c;B++)if(!this.atoms[B].ignoreSymmetry&&
(null==this.bsAtoms||this.bsAtoms.get(B))){null!=k&&(z=k.getAtomSymmetry(this.atoms[B],this.symmetry));z.newSpaceGroupPoint(y,this.atoms[B],p,d,b,f);var C=null,E=JU.P3.newP(p);z.toCartesian(E,!1);if(this.doPackUnitCell&&(z.toUnitCell(E,this.ptOffset),p.setT(E),z.toFractional(p,!1),!this.isWithinCell(this.dtype,p,this.minXYZ0.x,this.maxXYZ0.x,this.minXYZ0.y,this.maxXYZ0.y,this.minXYZ0.z,this.maxXYZ0.z,0.02)))continue;r&&this.setSymmetryMinMax(E);if(t){var G=3.4028235E38;if(s&&!this.isInSymmetryRange(E))continue;
for(var H=this.checkAll?this.atomCount:w;0<=--H;){var I=E.distanceSquared(e[H]);if(this.checkSpecial&&1E-4>I){C=this.atoms[a+H];if(null==C.atomName||C.atomName.equals(this.atoms[B].atomName))break;C=null}Q&&(H<g&&I<G)&&(G=I)}if(Q&&G>m)continue}H=this.atoms[B].atomSite;if(null!=C)A&&(F[H]=C.index),C.bsSymmetry.set(l+y),C.bsSymmetry.set(y);else if(A&&(F[H]=this.atomCount),C=this.newCloneAtom(this.atoms[B]),C.setT(p),C.atomSite=H,C.bsSymmetry=J.util.BSUtil.newAndSetBit(l+y),C.bsSymmetry.set(y),u&&(e[h++]=
E),null!=this.atoms[B].tensors){C.tensors=null;for(H=this.atoms[B].tensors.size();0<=--H;)E=this.atoms[B].tensors.get(H),null!=E&&(1==q?C.addTensor(E.copyTensor(),null,!1):this.addRotatedTensor(C,E,y,!1,z))}}if(A)for(w=this.bondIndex0;w<this.bondCount0;w++)B=this.bonds[w],C=this.atoms[B.atomIndex1],E=this.atoms[B.atomIndex2],null==C||null==E||(C=F[C.atomSite],E=F[E.atomSite],(C>=c||E>=c)&&this.addNewBondWithOrder(C,E,B.order))}return h},"~N,~N,~N,~N,~N,~N,~N,~N,~A,J.adapter.smarter.MSInterface");
b(c$,"addRotatedTensor",function(a,c,d,b,f){null==this.ptTemp&&(this.ptTemp=new JU.P3,this.mTemp=new JU.M3);return a.addTensor(J.api.Interface.getOptionInterface("util.Tensor").setFromEigenVectors(f.rotateAxes(d,c.eigenVectors,this.ptTemp,this.mTemp),c.eigenValues,c.isIsotropic?"iso":c.type,c.id),null,b)},"J.adapter.smarter.Atom,J.util.Tensor,~N,~B,J.api.SymmetryInterface");b(c$,"applySymmetryBio",function(a,c,d,b){if(null!=this.latticeCells&&0!=this.latticeCells[0])J.util.Logger.error("Cannot apply biomolecule when lattice cells are indicated");
else{var f=0<=b.indexOf("BYCHAIN")?1:0<=b.indexOf("BYSYMOP")?2:0;this.doNormalize=!1;this.symmetry=null;var g=a.get("biomts");if(!(2>g.size())){Float.isNaN(c[0])||this.setNotionalUnitCell(c,null,this.unitCellOffset);this.getSymmetry().setSpaceGroup(this.doNormalize);this.addSpaceGroupOperation("x,y,z");a=a.get("name");this.setAtomSetSpaceGroupName(a);a=g.size();this.applySymmetryToBonds=d;this.bondCount0=this.bondCount;c=(d=this.bondCount0>this.bondIndex0&&d)?D(this.atomCount,0):null;this.firstSymmetryAtom=
this.getLastAtomSetAtomIndex();var h=this.atomCount,l=new java.util.Hashtable,e=0;switch(f){case 1:for(f=h;--f>=this.firstSymmetryAtom;){var k=Integer.$valueOf(this.atoms[f].chainID),v=l.get(k);null==v&&(e++,l.put(k,v=new JU.BS));v.set(f)}this.bsAtoms=new JU.BS;for(f=0;f<e;f++)this.bsAtoms.set(h+f),k=new J.adapter.smarter.Atom,k.set(0,0,0),k.radius=16,this.addAtom(k);for(var A=0,m,l=l.entrySet().iterator();l.hasNext()&&((m=l.next())||1);){k=this.atoms[h+A++];v=m.getValue();for(f=v.nextSetBit(0);0<=
f;f=v.nextSetBit(f+1))k.add(this.atoms[f]);k.scale(1/v.cardinality());k.atomName="Pt"+A;k.chainID=m.getKey().intValue()}this.firstSymmetryAtom=h;h+=e;break;case 2:this.bsAtoms=new JU.BS;this.bsAtoms.set(h);k=this.atoms[h]=new J.adapter.smarter.Atom;k.set(0,0,0);for(f=h;--f>=this.firstSymmetryAtom;)k.add(this.atoms[f]);k.scale(1/(h-this.firstSymmetryAtom));k.atomName="Pt";k.radius=16;this.firstSymmetryAtom=h++}0<=b.indexOf("#<")&&(a=Math.min(a,JU.PT.parseInt(b.substring(b.indexOf("#<")+2))-1),b=JU.PT.simpleReplace(b,
"#<","_<"));for(m=this.firstSymmetryAtom;m<h;m++)this.atoms[m].bsSymmetry=J.util.BSUtil.newAndSetBit(0);for(f=1;f<a;f++){if(0<=b.indexOf("!#")){if(0<=b.indexOf("!#"+(f+1)+";"))continue}else if(0<=b.indexOf("#")&&0>b.indexOf("#"+(f+1)+";"))continue;e=g.get(f);for(m=this.firstSymmetryAtom;m<h;m++)if(null==this.bsAtoms||this.bsAtoms.get(m))try{var x=this.atoms[m].atomSite,p;d&&(c[x]=this.atomCount);p=this.newCloneAtom(this.atoms[m]);null!=this.bsAtoms&&this.bsAtoms.set(p.index);p.atomSite=x;e.transform(p);
p.bsSymmetry=J.util.BSUtil.newAndSetBit(f);if(d)for(var Q=this.bondIndex0;Q<this.bondCount0;Q++){var r=this.bonds[Q],q=c[this.atoms[r.atomIndex1].atomSite],s=c[this.atoms[r.atomIndex2].atomSite];(q>=h||s>=h)&&this.addNewBondWithOrder(q,s,r.order)}}catch(t){if(y(t,Exception))this.errorMessage="appendAtomCollection error: "+t;else throw t;}0<f&&this.symmetry.addBioMoleculeOperation(e,!1)}this.noSymmetryCount=h-this.firstSymmetryAtom;this.setAtomSetAuxiliaryInfo("presymmetryAtomIndex",Integer.$valueOf(this.firstSymmetryAtom));
this.setAtomSetAuxiliaryInfo("presymmetryAtomCount",Integer.$valueOf(this.noSymmetryCount));this.setAtomSetAuxiliaryInfo("biosymmetryCount",Integer.$valueOf(a));this.setAtomSetAuxiliaryInfo("biosymmetry",this.symmetry);this.finalizeSymmetry(this.symmetry);this.setSymmetryOps();this.symmetry=null;this.coordinatesAreFractional=!1;this.setAtomSetAuxiliaryInfo("hasSymmetry",Boolean.TRUE);this.setGlobalBoolean(1)}}},"java.util.Map,~A,~B,~S");b(c$,"mapMostRecentAtomName",function(){if(0<this.atomCount){var a=
this.atomCount-1,c=this.atoms[a].atomName;null!=c&&this.atomSymbolicMap.put(c,Integer.$valueOf(a))}});b(c$,"clearSymbolicMap",function(){this.atomSymbolicMap.clear();this.haveMappedSerials=!1});b(c$,"mapMostRecentAtomSerialNumber",function(){if(0!=this.atomCount){var a=this.atomCount-1,c=this.atoms[a].atomSerial;-2147483648!=c&&this.atomSymbolicMap.put(Integer.$valueOf(c),Integer.$valueOf(a));this.haveMappedSerials=!0}});b(c$,"createAtomSerialMap",function(){if(!(this.haveMappedSerials||0>this.currentAtomSetIndex)){for(var a=
this.getLastAtomSetAtomCount();a<this.atomCount;a++){var c=this.atoms[a].atomSerial;-2147483648!=c&&this.atomSymbolicMap.put(Integer.$valueOf(c),Integer.$valueOf(a))}this.haveMappedSerials=!0}});b(c$,"getAtomIndexFromName",function(a){return this.getMapIndex(a)},"~S");b(c$,"getAtomIndexFromSerial",function(a){return this.getMapIndex(Integer.$valueOf(a))},"~N");b(c$,"getMapIndex",function(a){a=this.atomSymbolicMap.get(a);return null==a?-1:a.intValue()},"~O");b(c$,"setAtomSetCollectionAuxiliaryInfo",
function(a,c){null==c?this.atomSetCollectionAuxiliaryInfo.remove(a):this.atomSetCollectionAuxiliaryInfo.put(a,c)},"~S,~O");b(c$,"setAtomSetCollectionPartialCharges",function(a){if(!this.atomSetCollectionAuxiliaryInfo.containsKey(a))return!1;for(var c=this.atomSetCollectionAuxiliaryInfo.get(a),d=c.size();0<=--d;)this.atoms[d].partialCharge=c.get(d).floatValue();J.util.Logger.info("Setting partial charges type "+a);return!0},"~S");b(c$,"mapPartialCharge",function(a,c){this.atoms[this.getAtomIndexFromName(a)].partialCharge=
c},"~S,~N");b(c$,"getAtomSetCollectionAuxiliaryInfo",function(a){return this.atomSetCollectionAuxiliaryInfo.get(a)},"~S");b(c$,"addTrajectoryStep",function(){for(var a=Array(this.atomCount),c=0<this.atomCount&&null!=this.atoms[0].vib&&!Float.isNaN(this.atoms[0].vib.z),d=c?Array(this.atomCount):null,b=0==this.trajectoryStepCount?null:this.trajectorySteps.get(this.trajectoryStepCount-1),f=0;f<this.atomCount;f++){var g=JU.P3.newP(this.atoms[f]);this.doFixPeriodic&&null!=b&&(g=J.adapter.smarter.AtomSetCollection.fixPeriodic(g,
b[f]));a[f]=g;c&&(d[f]=this.atoms[f].vib)}if(c){if(null==this.vibrationSteps){this.vibrationSteps=new JU.List;for(f=0;f<this.trajectoryStepCount;f++)this.vibrationSteps.addLast(null)}this.vibrationSteps.addLast(d)}this.trajectorySteps.addLast(a);this.trajectoryStepCount++});c$.fixPeriodic=b(c$,"fixPeriodic",function(a,c){a.x=J.adapter.smarter.AtomSetCollection.fixPoint(a.x,c.x);a.y=J.adapter.smarter.AtomSetCollection.fixPoint(a.y,c.y);a.z=J.adapter.smarter.AtomSetCollection.fixPoint(a.z,c.z);return a},
"JU.P3,JU.P3");c$.fixPoint=b(c$,"fixPoint",function(a,c){for(;0.9<a-c;)a-=1;for(;-0.9>a-c;)a+=1;return a},"~N,~N");b(c$,"finalizeTrajectoryAs",function(a,c){this.trajectorySteps=a;this.vibrationSteps=c;this.trajectoryStepCount=a.size();this.finalizeTrajectory()},"JU.List,JU.List");b(c$,"finalizeTrajectory",function(){if(0!=this.trajectoryStepCount){var a=this.trajectorySteps.get(0),c=null==this.vibrationSteps?null:this.vibrationSteps.get(0),d=new JU.V3;if(null!=this.vibrationSteps&&null!=c&&c.length<
this.atomCount||a.length<this.atomCount)this.errorMessage="File cannot be loaded as a trajectory";else{for(var b=0;b<this.atomCount;b++)null!=this.vibrationSteps&&(this.atoms[b].vib=null==c?d:c[b]),null!=a[b]&&this.atoms[b].setT(a[b]);this.setAtomSetCollectionAuxiliaryInfo("trajectorySteps",this.trajectorySteps);null!=this.vibrationSteps&&this.setAtomSetCollectionAuxiliaryInfo("vibrationSteps",this.vibrationSteps)}}});b(c$,"newAtomSet",function(){this.newAtomSetClear(!0)});b(c$,"newAtomSetClear",
function(a){!this.allowMultiple&&0<=this.currentAtomSetIndex&&this.discardPreviousAtoms();this.bondIndex0=this.bondCount;this.isTrajectory&&this.discardPreviousAtoms();this.currentAtomSetIndex=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.currentAtomSetIndex]=this.atomCount;this.atomSetCount+this.trajectoryStepCount>this.atomSetNumbers.length&&(this.atomSetNumbers=JU.AU.doubleLengthI(this.atomSetNumbers));this.isTrajectory?this.atomSetNumbers[this.currentAtomSetIndex+this.trajectoryStepCount]=this.atomSetCount+this.trajectoryStepCount:this.atomSetNumbers[this.currentAtomSetIndex]=this.atomSetCount;a&&this.atomSymbolicMap.clear();this.setAtomSetAuxiliaryInfo("title",this.collectionName)},"~B");b(c$,"getAtomSetAtomIndex",
function(a){return this.atomSetAtomIndexes[a]},"~N");b(c$,"getAtomSetAtomCount",function(a){return this.atomSetAtomCounts[a]},"~N");b(c$,"getAtomSetBondCount",function(a){return this.atomSetBondCounts[a]},"~N");b(c$,"setAtomSetName",function(a){this.isTrajectory?this.setTrajectoryName(a):(this.setAtomSetAuxiliaryInfoForSet("name",a,this.currentAtomSetIndex),this.allowMultiple||this.setCollectionName(a))},"~S");b(c$,"setTrajectoryName",function(a){if(0!=this.trajectoryStepCount){null==this.trajectoryNames&&
(this.trajectoryNames=new JU.List);for(var c=this.trajectoryNames.size();c<this.trajectoryStepCount;c++)this.trajectoryNames.addLast(null);this.trajectoryNames.set(this.trajectoryStepCount-1,a)}},"~S");b(c$,"setAtomSetNames",function(a,c,d){for(var b=this.currentAtomSetIndex;0<=--c&&0<=b;--b)(null==d||!d.get(b))&&this.setAtomSetAuxiliaryInfoForSet("name",a,b)},"~S,~N,JU.BS");b(c$,"setCurrentAtomSetNumber",function(a){this.setAtomSetNumber(this.currentAtomSetIndex+(this.isTrajectory?this.trajectoryStepCount:
0),a)},"~N");b(c$,"setAtomSetNumber",function(a,c){this.atomSetNumbers[a]=c},"~N,~N");b(c$,"setAtomSetModelProperty",function(a,c){this.setAtomSetModelPropertyForSet(a,c,this.currentAtomSetIndex)},"~S,~S");b(c$,"setAtomSetModelPropertyForSet",function(a,c,d){var b=this.getAtomSetAuxiliaryInfoValue(d,"modelProperties");null==b&&this.setAtomSetAuxiliaryInfoForSet("modelProperties",b=new java.util.Properties,d);b.put(a,c)},"~S,~S,~N");b(c$,"setAtomSetAtomProperty",function(a,c,d){c.endsWith("\n")||(c+=
"\n");0>d&&(d=this.currentAtomSetIndex);var b=this.getAtomSetAuxiliaryInfoValue(d,"atomProperties");null==b&&this.setAtomSetAuxiliaryInfoForSet("atomProperties",b=new java.util.Hashtable,d);b.put(a,c)},"~S,~S,~N");b(c$,"appendAtomProperties",function(a){var c=this.getAtomSetAuxiliaryInfoValue(-1,"atomProperties");if(null!=c)for(var d,b=c.entrySet().iterator();b.hasNext()&&((d=b.next())||1);){for(var f=d.getKey(),g=d.getValue(),h=new JU.SB,l=a;0<=--l;)h.append(g);c.put(f,h.toString())}},"~N");b(c$,
"setAtomSetPartialCharges",function(a){if(!this.atomSetAuxiliaryInfo[this.currentAtomSetIndex].containsKey(a))return!1;a=this.getAtomSetAuxiliaryInfoValue(this.currentAtomSetIndex,a);for(var c=a.size();0<=--c;)this.atoms[c].partialCharge=a.get(c).floatValue();return!0},"~S");b(c$,"getAtomSetAuxiliaryInfoValue",function(a,c){return this.atomSetAuxiliaryInfo[0<=a?a:this.currentAtomSetIndex].get(c)},"~N,~S");b(c$,"setAtomSetAuxiliaryInfo",function(a,c){this.setAtomSetAuxiliaryInfoForSet(a,c,this.currentAtomSetIndex)},
"~S,~O");b(c$,"setAtomSetAuxiliaryInfoForSet",function(a,c,d){0>d||(null==this.atomSetAuxiliaryInfo[d]&&(this.atomSetAuxiliaryInfo[d]=new java.util.Hashtable),null==c?this.atomSetAuxiliaryInfo[d].remove(a):this.atomSetAuxiliaryInfo[d].put(a,c))},"~S,~O,~N");b(c$,"setAtomSetPropertyForSets",function(a,c,d){for(var b=this.currentAtomSetIndex;0<=--d&&0<=b;--b)this.setAtomSetModelPropertyForSet(a,c,b)},"~S,~S,~N");b(c$,"cloneLastAtomSetProperties",function(){this.cloneAtomSetProperties(this.currentAtomSetIndex-
1)});b(c$,"cloneAtomSetProperties",function(a){a=this.getAtomSetAuxiliaryInfoValue(a,"modelProperties");null!=a&&this.setAtomSetAuxiliaryInfoForSet("modelProperties",a.clone(),this.currentAtomSetIndex)},"~N");b(c$,"getAtomSetNumber",function(a){return this.atomSetNumbers[a>=this.atomSetCount?0:a]},"~N");b(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");b(c$,"getAtomSetAuxiliaryInfo",function(a){return this.atomSetAuxiliaryInfo[a>=this.atomSetCount?this.atomSetCount-1:a]},"~N");b(c$,"setAtomNames",function(a){if(null==a)return null;for(var c,d=0;d<this.atomCount;d++)if(null!=(c=a.getProperty(this.atoms[d].atomName)))this.atoms[d].atomName=c;return null},"java.util.Properties");b(c$,"setAtomSetEnergy",function(a,c){0>this.currentAtomSetIndex||(J.util.Logger.info("Energy for model "+(this.currentAtomSetIndex+1)+" = "+a),this.setAtomSetAuxiliaryInfo("EnergyString",
a),this.setAtomSetAuxiliaryInfo("Energy",Float.$valueOf(c)),this.setAtomSetModelProperty("Energy",""+c))},"~S,~N");b(c$,"setAtomSetFrequency",function(a,c,d,b){d+=" "+(null==b?"cm^-1":b);b=(null==c?"":c+" ")+d;this.setAtomSetName(b);this.setAtomSetModelProperty("Frequency",d);null!=c&&this.setAtomSetModelProperty("FrequencyLabel",c);this.setAtomSetModelProperty(".PATH",(null==a?"":a+J.adapter.smarter.SmarterJmolAdapter.PATH_SEPARATOR+"Frequencies")+"Frequencies");return b},"~S,~S,~S,~S");b(c$,"toCartesian",
function(a){for(var c=this.getLastAtomSetAtomIndex();c<this.atomCount;c++)a.toCartesian(this.atoms[c],!0)},"J.api.SymmetryInterface");b(c$,"getBondList",function(){for(var a=Array(this.bondCount),c=0;c<this.bondCount;c++)a[c]=[this.atoms[this.bonds[c].atomIndex1].atomName,this.atoms[this.bonds[c].atomIndex2].atomName,""+this.bonds[c].order];return a});b(c$,"centralize",function(){for(var a=new JU.P3,c=0;c<this.atomSetCount;c++){var d=this.atomSetAtomCounts[c],b=this.atomSetAtomIndexes[c];a.set(0,
0,0);for(var f=b+d;--f>=b;)a.add(this.atoms[f]);a.scale(1/d);for(f=b+d;--f>=b;)this.atoms[f].sub(a)}});b(c$,"mergeTrajectories",function(a){if(this.isTrajectory&&a.isTrajectory&&null==this.vibrationSteps){for(var c=0;c<a.trajectoryStepCount;c++)this.trajectorySteps.add(this.trajectoryStepCount++,a.trajectorySteps.get(c));this.setAtomSetCollectionAuxiliaryInfo("trajectorySteps",this.trajectorySteps)}},"J.adapter.smarter.AtomSetCollection");B(c$,"globalBooleans",["someModelsHaveFractionalCoordinates",
"someModelsHaveSymmetry","someModelsHaveUnitcells","someModelsHaveCONECT","isPDB"],"GLOBAL_FRACTCOORD",0,"GLOBAL_SYMMETRY",1,"GLOBAL_UNITCELLS",2,"GLOBAL_CONECT",3,"GLOBAL_ISPDB",4,"notionalUnitcellTags","a b c alpha beta gamma".split(" "),"PARTICLE_NONE",0,"PARTICLE_CHAIN",1,"PARTICLE_SYMOP",2)});p("J.adapter.smarter");q(["JU.SB"],"J.adapter.smarter.AtomSetCollectionReader","java.io.BufferedReader java.lang.Boolean $.Character $.Float JU.BS $.List $.M3 $.P3 $.PT $.V3 J.adapter.smarter.Atom $.AtomSetCollection J.api.Interface $.JmolAdapter $.JmolDocument J.util.BSUtil $.Logger $.Parser $.Quaternion".split(" "),
function(){c$=u(function(){this.isBinary=!1;this.next=this.prevline=this.line=this.trajectorySteps=this.htParams=this.readerName=this.doc=this.reader=this.atomSetCollection=null;this.ptLine=0;this.latticeCells=null;this.iHaveSymmetryOperators=this.iHaveUnitCell=this.doProcessLines=!1;this.continuing=!0;this.viewer=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.spaceGroup=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.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=null;this.stateScriptVersionInt=2147483647;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.nFiltered=this.filterN=0;this.reverseModels=this.doReadMolecularOrbitals=this.useAltNames=this.addVibrations=this.doCentralize=this.doSetOrientation=!1;this.nameRequired=null;this.centroidPacked=this.doCentroidUnitCell=!1;this.siteScript=this.previousScript=this.ms=this.matrixRotate=this.filter2=this.filter1=
null;t(this,arguments)},J.adapter.smarter,"AtomSetCollectionReader");N(c$,function(){this.next=D(1,0);this.loadNote=new JU.SB});b(c$,"setup",function(a,c,d){this.setupASCR(a,c,d)},"~S,java.util.Map,~O");b(c$,"setupASCR",function(a,c,d){null!=a&&(this.htParams=c,this.filePath=a.$replace("\\","/"),a=this.filePath.lastIndexOf("/"),this.fileName=this.filePath.substring(a+1),s(d,java.io.BufferedReader)?this.reader=d:s(d,J.api.JmolDocument)&&(this.doc=d))},"~S,java.util.Map,~O");b(c$,"readData",function(){this.initialize();
this.atomSetCollection=new J.adapter.smarter.AtomSetCollection(this.readerName,this,null,null);try{this.initializeReader();if(null==this.doc)for(null==this.line&&this.continuing&&this.readLine();null!=this.line&&this.continuing;)this.checkLine()&&this.readLine();else this.doc.setOutputChannel(this.out),this.processBinaryDocument(this.doc);this.finalizeReader()}catch(a){J.util.Logger.info("Reader error: "+a),this.viewer.isJS||a.printStackTrace(),this.setError(a)}null!=this.reader&&this.reader.close();
null!=this.doc&&this.doc.close();return this.finish()});b(c$,"fixBaseIndices",function(){try{var a=this.htParams.get("baseAtomIndex").intValue(),c=this.htParams.get("baseModelIndex").intValue(),a=a+this.atomSetCollection.getAtomCount(),c=c+this.atomSetCollection.getAtomSetCount();this.htParams.put("baseAtomIndex",Integer.$valueOf(a));this.htParams.put("baseModelIndex",Integer.$valueOf(c))}catch(d){if(!y(d,Exception))throw d;}});b(c$,"readDataObject",function(a){this.initialize();this.atomSetCollection=
new J.adapter.smarter.AtomSetCollection(this.readerName,this,null,null);this.initializeReader();this.processDOM(a);return this.finish()},"~O");b(c$,"processDOM",function(){},"~O");b(c$,"processBinaryDocument",function(){},"J.api.JmolDocument");b(c$,"initializeReader",function(){});b(c$,"checkLine",function(){return!0});b(c$,"checkLastModel",function(){if(this.isLastModel(this.modelNumber)&&this.doProcessLines)return this.continuing=!1;this.doProcessLines=!1;return!0});b(c$,"isLastModel",function(a){return 0<
this.desiredModelNumber||a>=this.lastModelNumber},"~N");b(c$,"appendLoadNote",function(a){this.loadNote.append(a).append("\n");J.util.Logger.info(a);return a},"~S");b(c$,"initializeTrajectoryFile",function(){this.atomSetCollection.addAtom(new J.adapter.smarter.Atom);this.trajectorySteps=this.htParams.get("trajectorySteps");null==this.trajectorySteps&&this.htParams.put("trajectorySteps",this.trajectorySteps=new JU.List)});b(c$,"finalizeReader",function(){this.finalizeReaderASCR()});b(c$,"finalizeReaderASCR",
function(){this.applySymmetryAndSetTrajectory();this.setLoadNote();this.atomSetCollection.finalizeStructures();this.doCentralize&&this.atomSetCollection.centralize()});b(c$,"setLoadNote",function(){0<this.loadNote.length()&&this.atomSetCollection.setAtomSetCollectionAuxiliaryInfo("modelLoadNote",this.loadNote.toString())});b(c$,"setIsPDB",function(){this.atomSetCollection.setGlobalBoolean(4);this.atomSetCollection.setAtomSetAuxiliaryInfo("isPDB",Boolean.TRUE);null!=this.htParams.get("pdbNoHydrogens")&&
this.atomSetCollection.setAtomSetCollectionAuxiliaryInfo("pdbNoHydrogens",this.htParams.get("pdbNoHydrogens"));this.checkFilterKey("ADDHYDROGENS")&&this.atomSetCollection.setAtomSetCollectionAuxiliaryInfo("pdbAddHydrogens",Boolean.TRUE)});b(c$,"finish",function(){var a=this.htParams.get("loadState");this.atomSetCollection.setAtomSetCollectionAuxiliaryInfo("loadState",null==a?"":a);a=this.htParams.get("smilesString");null!=a&&this.atomSetCollection.setAtomSetCollectionAuxiliaryInfo("smilesString",
a);this.htParams.containsKey("templateAtomCount")||this.htParams.put("templateAtomCount",Integer.$valueOf(this.atomSetCollection.getAtomCount()));this.htParams.containsKey("bsFilter")&&this.htParams.put("filteredAtomCount",Integer.$valueOf(J.util.BSUtil.cardinalityOf(this.htParams.get("bsFilter"))));this.calculationType.equals("?")||this.atomSetCollection.setAtomSetCollectionAuxiliaryInfo("calculationType",this.calculationType);var c=a=this.atomSetCollection.getFileTypeName();0<=c.indexOf("(")&&(c=
c.substring(0,c.indexOf("(")));for(var d=this.atomSetCollection.getAtomSetCount();0<=--d;)this.atomSetCollection.setAtomSetAuxiliaryInfoForSet("fileName",this.filePath,d),this.atomSetCollection.setAtomSetAuxiliaryInfoForSet("fileType",c,d);this.atomSetCollection.freeze(this.reverseModels);if(null!=this.atomSetCollection.errorMessage)return this.atomSetCollection.errorMessage+"\nfor file "+this.filePath+"\ntype "+a;if(0==(null==this.atomSetCollection.bsAtoms?this.atomSetCollection.getAtomCount():this.atomSetCollection.bsAtoms.cardinality())&&
0>c.indexOf("DataOnly")&&null==this.atomSetCollection.getAtomSetCollectionAuxiliaryInfo("dataOnly"))return"No atoms found\nfor file "+this.filePath+"\ntype "+a;this.fixBaseIndices();return this.atomSetCollection});b(c$,"setError",function(a){var c;c=a.getMessage?a.getMessage():a.toString();this.atomSetCollection.errorMessage=null==this.line?"Error reading file at end of file \n"+c:"Error reading file at line "+this.ptLine+":\n"+this.line+"\n"+c;this.viewer.isJS||a.printStackTrace()},"Throwable");
b(c$,"initialize",function(){var a=this.htParams.get("supercell");s(a,String)?this.strSupercell=a:this.ptSupercell=a;this.initializeSymmetry();this.viewer=this.htParams.remove("viewer");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);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),s(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=J.util.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.spaceGroup=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))});b(c$,"initializeSymmetryOptions",function(){this.latticeCells=D(3,0);var a=this.htParams.get("lattice");this.forcePacked&&null==a&&
(a=JU.P3.new3(1,1,1));if(null!=a){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[0]=0,this.latticeCells[1]=0,this.latticeCells[2]=0)});b(c$,"doGetModel",function(a,c){if(null!=c&&null!=this.nameRequired&&0<this.nameRequired.length&&0>c.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.atomSetCollection.discardPreviousAtoms();this.haveModel=(new Boolean(this.haveModel|d)).valueOf();d&&(this.doProcessLines=!0);return d},"~N,~S");b(c$,"initializeSymmetry",function(){this.previousSpaceGroup=this.spaceGroup;this.previousUnitCell=this.notionalUnitCell;this.iHaveUnitCell=this.ignoreFileUnitCell;if(!this.ignoreFileUnitCell){this.notionalUnitCell=M(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.spaceGroup="unspecified!");this.doCheckUnitCell=!1});b(c$,"newAtomSet",function(a){0<=this.atomSetCollection.getCurrentAtomSetIndex()?(this.atomSetCollection.newAtomSet(),this.atomSetCollection.setCollectionName("<collection of "+(this.atomSetCollection.getCurrentAtomSetIndex()+
1)+" models>")):this.atomSetCollection.setCollectionName(a);this.atomSetCollection.setAtomSetAuxiliaryInfoForSet("name",a,Math.max(0,this.atomSetCollection.getCurrentAtomSetIndex()))},"~S");b(c$,"cloneLastAtomSet",function(a,c){var d=this.atomSetCollection.getLastAtomSetAtomCount();this.atomSetCollection.cloneLastAtomSetFromPoints(a,c);this.atomSetCollection.haveUnitCell&&(this.doCheckUnitCell=this.iHaveUnitCell=!0,this.spaceGroup=this.previousSpaceGroup,this.notionalUnitCell=this.previousUnitCell);
return d},"~N,~A");b(c$,"setSpaceGroupName",function(a){this.ignoreFileSpaceGroupName||(this.spaceGroup=a.trim(),J.util.Logger.info("Setting space group name to "+this.spaceGroup))},"~S");b(c$,"setSymmetryOperator",function(a){if(this.ignoreFileSymmetryOperators)return-1;this.setLatticeCells(!1);var c=this.atomSetCollection.addSpaceGroupOperation(a);0>c&&J.util.Logger.warn("Skipping symmetry operation "+a);this.iHaveSymmetryOperators=!0;return c},"~S");b(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});b(c$,"clearUnitCell",function(){if(!this.ignoreFileUnitCell){for(var a=6;22>a;a++)this.notionalUnitCell[a]=NaN;this.checkUnitCell(6)}});b(c$,"setUnitCellItem",function(a,c){if(!this.ignoreFileUnitCell&&!(0==a&&1==c||3==a&&0==c))!Float.isNaN(c)&&(6<=a&&Float.isNaN(this.notionalUnitCell[6]))&&this.initializeCartesianToFractional(),this.notionalUnitCell[a]=c,J.util.Logger.debugging&&
J.util.Logger.debug("setunitcellitem "+a+" "+c),6>a||Float.isNaN(c)?this.iHaveUnitCell=this.checkUnitCell(6):12==++this.nMatrixElements&&this.checkUnitCell(22)},"~N,~N");b(c$,"setUnitCell",function(a,c,d,b,f,g){this.ignoreFileUnitCell||(this.clearUnitCell(),this.notionalUnitCell[0]=a,this.notionalUnitCell[1]=c,this.notionalUnitCell[2]=d,0!=b&&(this.notionalUnitCell[3]=b),0!=f&&(this.notionalUnitCell[4]=f),0!=g&&(this.notionalUnitCell[5]=g),this.iHaveUnitCell=this.checkUnitCell(6))},"~N,~N,~N,~N,~N,~N");
b(c$,"addPrimitiveLatticeVector",function(a,c,d){if(!this.ignoreFileUnitCell){if(0==a)for(var b=0;6>b;b++)this.notionalUnitCell[b]=0;a=6+3*a;this.notionalUnitCell[a++]=c[d++];this.notionalUnitCell[a++]=c[d++];this.notionalUnitCell[a]=c[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");b(c$,"checkUnitCell",function(a){for(var c=0;c<a;c++)if(Float.isNaN(this.notionalUnitCell[c]))return!1;this.getSymmetry().setUnitCell(this.notionalUnitCell);
this.doApplySymmetry&&(this.doConvertToFractional=!this.fileCoordinatesAreFractional);this.checkUnitCellOffset();return!0},"~N");b(c$,"checkUnitCellOffset",function(){null==this.symmetry||null==this.fileOffsetFractional||(this.fileOffset.setT(this.fileOffsetFractional),this.unitCellOffsetFractional!=this.fileCoordinatesAreFractional&&(this.unitCellOffsetFractional?this.symmetry.toCartesian(this.fileOffset,!1):this.symmetry.toFractional(this.fileOffset,!1)))});b(c$,"getSymmetry",function(){return this.symmetry=
J.api.Interface.getOptionInterface("symmetry.Symmetry")});b(c$,"setFractionalCoordinates",function(a){this.iHaveFractionalCoordinates=this.fileCoordinatesAreFractional=a;this.checkUnitCellOffset()},"~B");b(c$,"setFilterAtomTypeStr",function(a){this.filterAtomTypeStr=a;this.filterAtomNameTerminator="\x00"},"~S");b(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");this.checkFilterKey("NAME=")&&(this.nameRequired=this.filter.substring(this.filter.indexOf("NAME=")+5),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.simpleReplace(this.filter,this.nameRequired,""),this.filter=JU.PT.simpleReplace(this.filter,"NAME=",""));if(null!=this.filter&&(this.filterAtomName=this.checkFilterKey("*.")||this.checkFilterKey("!."),this.filterElement=this.checkFilterKey("_"),this.filterHetero=this.checkFilterKey("HETATM"),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(",",";"),J.util.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");b(c$,"getFilter",function(a){var c=null==this.filter?-1:this.filter.indexOf(a);return 0>c?null:this.filter.substring(c+a.length,this.filter.indexOf(";",c))},"~S");b(c$,"checkFilterKey",function(a){return null!=this.filter&&
0<=this.filter.indexOf(a)},"~S");b(c$,"filterAtom",function(a,c){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<=c?c:this.atomSetCollection.getAtomCount(),d);return d},"J.adapter.smarter.Atom,~N");b(c$,"checkFilter",function(a,c){return(!this.filterGroup3||null==a.group3||!this.filterReject(c,"[",a.group3.toUpperCase()+
"]"))&&(!this.filterAtomName||this.allowAtomName(a.atomName,c))&&(null==this.filterAtomTypeStr||null==a.atomName||0<=a.atomName.toUpperCase().indexOf("\x00"+this.filterAtomTypeStr))&&(!this.filterElement||null==a.elementSymbol||!this.filterReject(c,"_",a.elementSymbol.toUpperCase()+";"))&&(!this.filterChain||0==a.chainID||!this.filterReject(c,":",""+this.viewer.getChainIDStr(a.chainID)))&&(!this.filterAltLoc||"\x00"==a.altLoc||!this.filterReject(c,"%",""+a.altLoc))&&(!this.filterHetero||!this.filterReject(c,
"HETATM",a.isHetero?"HETATM":"ATOM"))},"J.adapter.smarter.Atom,~S");b(c$,"rejectAtomName",function(a){return this.filterAtomName&&!this.allowAtomName(a,this.filter)},"~S");b(c$,"allowAtomName",function(a,c){return null==a||!this.filterReject(c,".",a.toUpperCase()+this.filterAtomNameTerminator)},"~S,~S");b(c$,"filterReject",function(a,c,d){return 0<=a.indexOf(c)&&(0<=a.indexOf("!"+c)?0<=a.indexOf(c+d):0>a.indexOf(c+d))},"~S,~S,~S");b(c$,"set2D",function(){this.atomSetCollection.setAtomSetCollectionAuxiliaryInfo("is2D",
Boolean.TRUE);this.checkFilterKey("NOMIN")||this.atomSetCollection.setAtomSetCollectionAuxiliaryInfo("doMinimize",Boolean.TRUE)});b(c$,"doGetVibration",function(a){return this.addVibrations&&(0>=this.desiredVibrationNumber||a==this.desiredVibrationNumber)},"~N");b(c$,"setTransform",function(a,c,d,b,f,g,h,l,e){null==this.matrixRotate&&this.doSetOrientation&&(this.matrixRotate=new JU.M3,a=JU.V3.new3(a,c,d),a.normalize(),this.matrixRotate.setColumnV(0,a),a.set(b,f,g),a.normalize(),this.matrixRotate.setColumnV(1,
a),a.set(h,l,e),a.normalize(),this.matrixRotate.setColumnV(2,a),this.atomSetCollection.setAtomSetCollectionAuxiliaryInfo("defaultOrientationMatrix",JU.M3.newM(this.matrixRotate)),b=J.util.Quaternion.newM(this.matrixRotate),this.atomSetCollection.setAtomSetCollectionAuxiliaryInfo("defaultOrientationQuaternion",b),J.util.Logger.info("defaultOrientationMatrix = "+this.matrixRotate))},"~N,~N,~N,~N,~N,~N,~N,~N,~N");b(c$,"setAtomCoordXYZ",function(a,c,d,b){a.set(c,d,b);this.setAtomCoord(a)},"J.adapter.smarter.Atom,~N,~N,~N");
b(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.symmetry)&&(this.symmetry.haveUnitCell()||this.symmetry.setUnitCell(this.notionalUnitCell),this.symmetry.toFractional(a,!1),this.iHaveFractionalCoordinates=!0);this.doCheckUnitCell=!0},"J.adapter.smarter.Atom");b(c$,"addSites",function(a){this.atomSetCollection.setAtomSetAuxiliaryInfo("pdbSites",
a);var c="",d;for(a=a.entrySet().iterator();a.hasNext()&&((d=a.next())||1);){for(var b=d.getKey(),f=d.getValue(),g,h=b.length;0<=--h;)if(!Character.isLetterOrDigit(g=b.charAt(h))&&"'"!=g)b=b.substring(0,h)+"_"+b.substring(h+1);f=f.get("groups");0!=f.length&&(this.addSiteScript("@site_"+b+" "+f),this.addSiteScript("site_"+b+' = "'+f+'".split(",")'),c+=(""===c?"":",")+"site_"+b)}this.addSiteScript('site_list = "'+c+'".split(",")')},"java.util.Map");b(c$,"applySymmetryAndSetTrajectory",function(){this.applySymTrajASCR()});
b(c$,"applySymTrajASCR",function(){this.forcePacked&&this.initializeSymmetryOptions();var a=null;if(this.iHaveUnitCell&&this.doCheckUnitCell){this.atomSetCollection.setCoordinatesAreFractional(this.iHaveFractionalCoordinates);this.atomSetCollection.setNotionalUnitCell(this.notionalUnitCell,this.matUnitCellOrientation,this.unitCellOffset);a=this.atomSetCollection.symmetry;this.atomSetCollection.setAtomSetSpaceGroupName(this.spaceGroup);this.atomSetCollection.setSymmetryRange(this.symmetryRange);if(this.doConvertToFractional||
this.fileCoordinatesAreFractional)if(this.setLatticeCells(!1),this.ignoreFileSpaceGroupName||!this.iHaveSymmetryOperators){if((!this.merging||null==this.symmetry)&&this.getSymmetry(),this.symmetry.createSpaceGroup(this.desiredSpaceGroupIndex,0<=this.spaceGroup.indexOf("!")?"P1":this.spaceGroup,this.notionalUnitCell))this.atomSetCollection.applySymmetry(this.symmetry,this.ms),this.atomSetCollection.setAtomSetSpaceGroupName(this.symmetry.getSpaceGroupName())}else this.doPreSymmetry(),this.atomSetCollection.applySymmetry(null,
this.ms);this.iHaveFractionalCoordinates&&(this.merging&&null!=this.symmetry)&&(this.atomSetCollection.toCartesian(this.symmetry),this.atomSetCollection.setCoordinatesAreFractional(!1),this.addVibrations=!1)}this.isTrajectory&&this.atomSetCollection.setTrajectory();this.initializeSymmetry();return a});b(c$,"doPreSymmetry",function(){});b(c$,"finalizeMOData",function(a){this.atomSetCollection.setAtomSetAuxiliaryInfo("moData",a);null!=a&&(a=a.get("mos"),null!=a&&J.util.Logger.info(a.size()+" molecular orbitals read in model "+
this.atomSetCollection.getAtomSetCount()))},"java.util.Map");c$.getElementSymbol=b(c$,"getElementSymbol",function(a){return J.api.JmolAdapter.getElementSymbol(a)},"~N");b(c$,"fillDataBlockFixed",function(a,c,d,b){if(0==d)this.fillDataBlock(a,b);else{b=a.length;for(var f=0;f<b;f++){this.discardLinesUntilNonBlank();var g=m((this.line.length-c+1)/d);a[f]=Array(g);for(var h=0,l=c;h<g;h++,l+=d)a[f][h]=this.line.substring(l,Math.min(this.line.length,l+d))}}},"~A,~N,~N,~N");b(c$,"fillDataBlock",function(a,
c){for(var d=a.length,b=0;b<d;b++)a[b]=J.adapter.smarter.AtomSetCollectionReader.getTokensStr(this.discardLinesUntilNonBlank()),a[b].length<c&&--b},"~A,~N");b(c$,"fillFloatArray",function(a,c,d){for(var b=[],f=0,g=0;g<d.length;g++){for(;null!=b&&f>=b.length;){null==a&&(a=this.readLine());if(0==c)b=J.adapter.smarter.AtomSetCollectionReader.getTokensStr(a);else{b=Array(m(a.length/c));for(f=0;f<b.length;f++)b[f]=a.substring(f*c,(f+1)*c)}a=null;f=0}if(null==b)break;d[g]=this.parseFloatStr(b[f++])}return d},
"~S,~N,~A");b(c$,"fillFrequencyData",function(a,c,d,b,f,g,h,l,e){var k=d!=c;null!=l&&(c=l.length);c=f?c:3*c;var v=b.length,A=Array(c);this.fillDataBlockFixed(A,g,h,e);for(h=g=0;g<c;g++,h++){e=A[g];for(var m=f?null:A[++g],x=f?null:A[++g],p=e.length-(f?3*v:v)-1,Q=0,r=0;r<v;r++){++p;var q=e[p];")"==q.charAt(0)&&(q=q.substring(1));var q=this.parseFloatStr(q),s=this.parseFloatStr(f?e[++p]:m[p]),t=this.parseFloatStr(f?e[++p]:x[p]);if(!b[r]){var u=null==l?h:l[h];0>u||(J.util.Logger.debugging&&J.util.Logger.debug("atom "+
u+" vib"+Q+": "+q+" "+s+" "+t),this.atomSetCollection.addVibrationVectorWithSymmetry(a+d*Q++ +u,q,s,t,k))}}}},"~N,~N,~N,~A,~B,~N,~N,~A,~N");b(c$,"readLines",function(a){for(;0<=--a;)this.readLine();return this.line},"~N");b(c$,"discardLinesUntilStartsWith",function(a){for(;null!=this.readLine()&&!this.line.startsWith(a););return this.line},"~S");b(c$,"discardLinesUntilContains",function(a){for(;null!=this.readLine()&&0>this.line.indexOf(a););return this.line},"~S");b(c$,"discardLinesUntilContains2",
function(a,c){for(;null!=this.readLine()&&0>this.line.indexOf(a)&&0>this.line.indexOf(c););return this.line},"~S,~S");b(c$,"discardLinesUntilBlank",function(){for(;null!=this.readLine()&&0!=this.line.trim().length;);});b(c$,"discardLinesUntilNonBlank",function(){for(;null!=this.readLine()&&0==this.line.trim().length;);return this.line});b(c$,"checkLineForScript",function(a){this.line=a;this.checkCurrentLineForScript()},"~S");b(c$,"checkCurrentLineForScript",function(){if(0<=this.line.indexOf("Jmol")&&
(0<=this.line.indexOf("Jmol PDB-encoded data")&&(this.atomSetCollection.setAtomSetCollectionAuxiliaryInfo("jmolData",this.line),this.line.endsWith("#noautobond")||(this.line+="#noautobond")),0<=this.line.indexOf("Jmol data min"))){J.util.Logger.info(this.line);var a=M(15,0);this.parseStringInfestedFloatArray(this.line.substring(10).$replace("="," ").$replace("{"," ").$replace("}"," "),a);var c=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.setLatticeCells(!0);this.setUnitCell(2*a.x/(d.x-c.x),2*a.y/(d.y-c.y),2*a.z/(d.z==c.z?1:d.z-c.z),90,90,90);this.unitCellOffset=JU.P3.newP(a);this.unitCellOffset.scale(-1);this.symmetry.toFractional(this.unitCellOffset,!1);this.unitCellOffset.scaleAdd2(-1,
c,this.unitCellOffset);this.symmetry.setOffsetPt(this.unitCellOffset);this.atomSetCollection.setAtomSetCollectionAuxiliaryInfo("jmolDataScaling",[c,d,a])}this.line.endsWith("#noautobond")&&(this.line=this.line.substring(0,this.line.lastIndexOf("#")).trim(),this.atomSetCollection.setNoAutoBond());c=this.line.indexOf("jmolscript:");0<=c&&(d=this.line.substring(c+11,this.line.length),0<=d.indexOf("#")&&(d=d.substring(0,d.indexOf("#"))),this.addJmolScript(d),this.line=this.line.substring(0,c).trim())});
b(c$,"setLatticeCells",function(a){a?this.atomSetCollection.setLatticeCells(this.latticeCells,!0,!1,!1,!1,null,null):this.atomSetCollection.setLatticeCells(this.latticeCells,this.applySymmetryToBonds,this.doPackUnitCell,this.doCentroidUnitCell,this.centroidPacked,this.strSupercell,this.ptSupercell)},"~B");b(c$,"addJmolScript",function(a){J.util.Logger.info("#jmolScript: "+a);null==this.previousScript?this.previousScript="":this.previousScript.endsWith(";")||(this.previousScript+=";");this.previousScript+=
a;this.atomSetCollection.setAtomSetCollectionAuxiliaryInfo("jmolscript",this.previousScript)},"~S");b(c$,"addSiteScript",function(a){null==this.siteScript?this.siteScript="":this.siteScript.endsWith(";")||(this.siteScript+=";");this.siteScript+=a;this.atomSetCollection.setAtomSetCollectionAuxiliaryInfo("sitescript",this.siteScript)},"~S");b(c$,"readLine",function(){return this.RL()});b(c$,"RL",function(){this.prevline=this.line;this.line=this.reader.readLine();if(null!=this.out&&null!=this.line){var a=
this.line.getBytes();this.out.write(a,0,a.length);this.out.writeByteAsInt(10)}this.ptLine++;J.util.Logger.debugging&&J.util.Logger.debug(this.line);return this.line});c$.getStrings=b(c$,"getStrings",function(a,c,d){for(var b=Array(c),f=0,g=0;f<c;f++,g+=d)b[f]=a.substring(g,g+d);return b},"~S,~N,~N");b(c$,"getTokens",function(){return JU.PT.getTokens(this.line)});b(c$,"parseStringInfestedFloatArray",function(a,c){J.util.Parser.parseStringInfestedFloatArray(a,null,c)},"~S,~A");c$.getTokensFloat=b(c$,
"getTokensFloat",function(a,c,d){null==c&&(c=M(d,0));JU.PT.parseFloatArrayDataN(J.adapter.smarter.AtomSetCollectionReader.getTokensStr(a),c,d);return c},"~S,~A,~N");c$.getTokensStr=b(c$,"getTokensStr",function(a){return JU.PT.getTokens(a)},"~S");c$.getTokensAt=b(c$,"getTokensAt",function(a,c){return JU.PT.getTokensAt(a,c)},"~S,~N");b(c$,"parseFloat",function(){return JU.PT.parseFloatNext(this.line,this.next)});b(c$,"parseFloatStr",function(a){this.next[0]=0;return JU.PT.parseFloatNext(a,this.next)},
"~S");b(c$,"parseFloatRange",function(a,c,d){this.next[0]=c;return JU.PT.parseFloatRange(a,d,this.next)},"~S,~N,~N");b(c$,"parseInt",function(){return JU.PT.parseIntNext(this.line,this.next)});b(c$,"parseIntStr",function(a){this.next[0]=0;return JU.PT.parseIntNext(a,this.next)},"~S");b(c$,"parseIntAt",function(a,c){this.next[0]=c;return JU.PT.parseIntNext(a,this.next)},"~S,~N");b(c$,"parseIntRange",function(a,c,d){this.next[0]=c;return JU.PT.parseIntRange(a,d,this.next)},"~S,~N,~N");b(c$,"parseToken",
function(){return JU.PT.parseTokenNext(this.line,this.next)});b(c$,"parseTokenStr",function(a){this.next[0]=0;return JU.PT.parseTokenNext(a,this.next)},"~S");b(c$,"parseTokenNext",function(a){return JU.PT.parseTokenNext(a,this.next)},"~S");b(c$,"parseTokenRange",function(a,c,d){this.next[0]=c;return JU.PT.parseTokenRange(a,d,this.next)},"~S,~N,~N");c$.parseTrimmedAt=b(c$,"parseTrimmedAt",function(a,c){return JU.PT.parseTrimmedAt(a,c)},"~S,~N");c$.parseTrimmedRange=b(c$,"parseTrimmedRange",function(a,
c,d){return JU.PT.parseTrimmedRange(a,c,d)},"~S,~N,~N");c$.getFortranFormatLengths=b(c$,"getFortranFormatLengths",function(a){var c=new JU.List,d=0,b=0,f=1,g=!1,h=!0;a+=",";for(var l=0;l<a.length;l++){var e=a.charAt(l);switch(e){case ".":g=!1;continue;case ",":for(g=0;g<b;g++)c.addLast(Integer.$valueOf(d*f));g=!1;h=!0;b=0;continue;case "X":d=b;b=1;f=-1;continue}Character.isDigit(e)?g?d=10*d+e.charCodeAt(0)-48:h&&(b=10*b+e.charCodeAt(0)-48):Character.isLetter(e)?(d=0,g=!0,h=!1,f=1):g=!1}return c},
"~S");b(c$,"read3Vectors",function(a){for(var c=Array(3),d=M(3,0),b=0;3>b;b++){if(0<b||Float.isNaN(this.parseFloatStr(this.line)))if(this.readLine(),0==b&&null!=this.line){b=-1;continue}this.fillFloatArray(this.line,0,d);c[b]=new JU.V3;c[b].setA(d);a&&c[b].scale(0.5291772)}return c},"~B");b(c$,"setElementAndIsotope",function(a,c){var d=this.parseIntStr(c);-2147483648==d?a.elementSymbol=c:(c=c.substring((""+d).length),a.elementNumber=0==c.length?d:(d<<7)+J.api.JmolAdapter.getElementNumber(c))},"J.adapter.smarter.Atom,~S");
b(c$,"finalizeModelSet",function(){});b(c$,"setChainID",function(a,c){a.chainID=this.viewer.getChainID(""+c)},"J.adapter.smarter.Atom,~S");b(c$,"setU",function(a,c,d){var b=this.atomSetCollection.getAnisoBorU(a);null==b&&this.atomSetCollection.setAnisoBorU(a,b=M(8,0),8);b[c]=d},"J.adapter.smarter.Atom,~N,~N");B(c$,"ANGSTROMS_PER_BOHR",0.5291772)});p("J.adapter.smarter");c$=u(function(){this.atomSetIndex=0;t(this,arguments)},J.adapter.smarter,"AtomSetObject");p("J.adapter.smarter");q(["J.adapter.smarter.AtomSetObject"],
"J.adapter.smarter.Bond",null,function(){c$=u(function(){this.order=this.atomIndex2=this.atomIndex1=0;this.uniqueID=this.colix=this.radius=-1;t(this,arguments)},J.adapter.smarter,"Bond",J.adapter.smarter.AtomSetObject);w(c$,function(a,c,d){R(this,J.adapter.smarter.Bond,[]);this.atomIndex1=a;this.atomIndex2=c;this.order=d},"~N,~N,~N")});p("J.adapter.smarter");q(["J.api.JmolAdapterBondIterator"],"J.adapter.smarter.BondIterator",null,function(){c$=u(function(){this.bonds=this.bsAtoms=null;this.ibond=
0;this.bond=null;this.bondCount=0;t(this,arguments)},J.adapter.smarter,"BondIterator",J.api.JmolAdapterBondIterator);w(c$,function(a){R(this,J.adapter.smarter.BondIterator,[]);this.bsAtoms=a.bsAtoms;this.bonds=a.getBonds();this.bondCount=a.getBondCount();this.ibond=0},"J.adapter.smarter.AtomSetCollection");e(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});e(c$,"getAtomUniqueID1",function(){return Integer.$valueOf(this.bond.atomIndex1)});e(c$,"getAtomUniqueID2",function(){return Integer.$valueOf(this.bond.atomIndex2)});e(c$,"getEncodedOrder",function(){return this.bond.order});e(c$,"getRadius",function(){return this.bond.radius});e(c$,"getColix",function(){return this.bond.colix})});p("J.adapter.smarter");q(null,"J.adapter.smarter.Resolver","java.lang.Character $.Float java.util.StringTokenizer JU.PT J.adapter.smarter.AtomSetCollectionReader $.SmarterJmolAdapter J.api.JmolDocument J.io.LimitedLineReader J.util.Logger".split(" "),
function(){c$=G(J.adapter.smarter,"Resolver");c$.getReaderClassBase=b(c$,"getReaderClassBase",function(a){var c=a+"Reader";if(a.startsWith("Xml"))return"J.adapter.readers.xml."+c;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]+c;return"J.adapter.readers.???."+c},"~S");c$.getFileType=b(c$,"getFileType",function(a){try{return J.adapter.smarter.Resolver.determineAtomSetCollectionReader(a,
!1)}catch(c){if(y(c,Exception))return null;throw c;}},"java.io.BufferedReader");c$.getAtomCollectionReader=b(c$,"getAtomCollectionReader",function(a,c,d,b,f){var g=null,h;a=a.$replace("\\","/");var l=null;null!=c?(h=J.adapter.smarter.Resolver.getReaderFromType(c),null==h?l="unrecognized file format type "+c:J.util.Logger.info("The Resolver assumes "+h)):(h=J.adapter.smarter.Resolver.determineAtomSetCollectionReader(d,!0),"\n"==h.charAt(0)&&(c=b.get("defaultType"),null!=c&&(c=J.adapter.smarter.Resolver.getReaderFromType(c),
null!=c&&(h=c))),"\n"==h.charAt(0)?l="unrecognized file format for file "+a+"\n"+h:h.equals("spt")?l="NOTE: file recognized as a script file: "+a+"\n":a.equals("ligand")||J.util.Logger.info("The Resolver thinks "+h));if(null!=l)return J.adapter.smarter.SmarterJmolAdapter.close(d),l;b.put("ptFile",Integer.$valueOf(f));0>=f&&b.put("readerName",h);0==h.indexOf("Xml")&&(h="Xml");a=null;var e;c=null;try{try{a=J.adapter.smarter.Resolver.getReaderClassBase(h),e=Class.forName(a),g=e.newInstance()}catch(k){if(y(k,
Exception))return c="File reader was not found:"+a,J.util.Logger.error(c),c;throw k;}return g}catch(v){if(y(v,Exception))return c="uncaught error in file loading for "+a,J.util.Logger.error(c),System.out.println(v.getMessage()),c;throw v;}},"~S,~S,~O,java.util.Map,~N");c$.DOMResolve=b(c$,"DOMResolve",function(a,c){var d=null,b,f,g=J.adapter.smarter.Resolver.getXmlType(c.get("nameSpaceInfo"));J.util.Logger.debugging&&J.util.Logger.debug("The Resolver thinks "+g);c.put("readerName",g);try{return d=
"J.adapter.readers.xml.XmlReader",b=Class.forName(d),f=b.newInstance()}catch(h){if(y(h,Exception))return d="File reader was not found:"+d,J.util.Logger.errorEx(d,h),d;throw h;}},"~O,java.util.Map");c$.determineAtomSetCollectionReader=b(c$,"determineAtomSetCollectionReader",function(a,c){if(s(a,J.api.JmolDocument))return"PyMOL";for(var d=new J.io.LimitedLineReader(a,16384),b=d.getHeader(64).trim(),f=0;f<J.adapter.smarter.Resolver.fileStartsWithRecords.length;++f)for(var g=J.adapter.smarter.Resolver.fileStartsWithRecords[f],
h=1;h<g.length;++h)if(b.startsWith(g[h]))return g[0];if(1==b.indexOf("PNG")&&0<=b.indexOf("PNGJ"))return"pngj";if(1==b.indexOf("PNG")||1==b.indexOf("JPG")||6==b.indexOf("JFIF"))return"spt";if(b.startsWith("##TITLE"))return"Jcampdx";b=Array(16);for(f=g=0;f<b.length;++f)b[f]=d.readLineWithNewline(),0<b[f].length&&g++;var l;return null!=(l=J.adapter.smarter.Resolver.checkSpecial(g,b,!1))||null!=(l=J.adapter.smarter.Resolver.checkLineStarts(b))||null!=(l=J.adapter.smarter.Resolver.checkHeaderContains(d.getHeader(0)))||
null!=(l=J.adapter.smarter.Resolver.checkSpecial(g,b,!0))?l:c?"\n"+b[0]+"\n"+b[1]+"\n"+b[2]+"\n":null},"~O,~B");c$.checkHeaderContains=b(c$,"checkHeaderContains",function(a){for(var c=0;c<J.adapter.smarter.Resolver.headerContainsRecords.length;++c)for(var d=J.adapter.smarter.Resolver.headerContainsRecords[c],b=1;b<d.length;++b)if(!(0>a.indexOf(d[b])))return c=d[0],!c.equals("Xml")?c: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=b(c$,"checkLineStarts",function(a){for(var c=0;c<J.adapter.smarter.Resolver.lineStartsWithRecords.length;++c)for(var d=J.adapter.smarter.Resolver.lineStartsWithRecords[c],b=1;b<d.length;++b)for(var f=d[b],g=0;g<a.length;++g)if(a[g].startsWith(f))return d[0];return null},"~A");c$.getXmlType=b(c$,"getXmlType",function(a){return 0<=a.indexOf("http://www.molpro.net/")?J.adapter.smarter.Resolver.specialTags[19][0]:0<=a.indexOf("odyssey")?J.adapter.smarter.Resolver.specialTags[20][0]:
0<=a.indexOf("C3XML")?J.adapter.smarter.Resolver.specialTags[18][0]:0<=a.indexOf("arguslab")?J.adapter.smarter.Resolver.specialTags[16][0]:0<=a.indexOf("jvxl")||0<=a.indexOf("http://www.xml-cml.org/schema")||0<=a.indexOf("cml:")?J.adapter.smarter.Resolver.specialTags[17][0]:0<=a.indexOf("XSD")?J.adapter.smarter.Resolver.specialTags[21][0]:0<=a.indexOf(">vasp")?J.adapter.smarter.Resolver.specialTags[22][0]:0<=a.indexOf("<GEOMETRY_INFO>")?J.adapter.smarter.Resolver.specialTags[23][0]:J.adapter.smarter.Resolver.specialTags[17][0]+
"(unidentified)"},"~S");c$.getReaderFromType=b(c$,"getReaderFromType",function(a){a=a.toLowerCase();var c=null;return null!=(c=J.adapter.smarter.Resolver.checkType(J.adapter.smarter.Resolver.specialTags,a))||null!=(c=J.adapter.smarter.Resolver.checkType(J.adapter.smarter.Resolver.fileStartsWithRecords,a))||null!=(c=J.adapter.smarter.Resolver.checkType(J.adapter.smarter.Resolver.lineStartsWithRecords,a))?c:J.adapter.smarter.Resolver.checkType(J.adapter.smarter.Resolver.headerContainsRecords,a)},"~S");
c$.checkType=b(c$,"checkType",function(a,c){for(var d=0;d<a.length;++d)if(a[d][0].toLowerCase().equals(c))return a[d][0];return null},"~A,~S");c$.checkSpecial=b(c$,"checkSpecial",function(a,c,d){if(d){if(J.adapter.smarter.Resolver.checkGromacs(c))return J.adapter.smarter.Resolver.specialTags[14][0];if(J.adapter.smarter.Resolver.checkCrystal(c))return J.adapter.smarter.Resolver.specialTags[12][0];if(J.adapter.smarter.Resolver.checkCastep(c))return J.adapter.smarter.Resolver.specialTags[10][0];if(J.adapter.smarter.Resolver.checkVaspposcar(c))return J.adapter.smarter.Resolver.specialTags[13][0]}else{if(1==
a&&0<c[0].length&&Character.isDigit(c[0].charAt(0)))return J.adapter.smarter.Resolver.specialTags[0][0];if(J.adapter.smarter.Resolver.checkMopacGraphf(c))return J.adapter.smarter.Resolver.specialTags[1][0];if(J.adapter.smarter.Resolver.checkOdyssey(c))return J.adapter.smarter.Resolver.specialTags[3][0];if(J.adapter.smarter.Resolver.checkMol(c))return J.adapter.smarter.Resolver.specialTags[4][0];if(J.adapter.smarter.Resolver.checkXyz(c))return J.adapter.smarter.Resolver.specialTags[5][0];if(J.adapter.smarter.Resolver.checkAlchemy(c[0]))return J.adapter.smarter.Resolver.specialTags[8][0];
if(J.adapter.smarter.Resolver.checkFoldingXyz(c))return J.adapter.smarter.Resolver.specialTags[6][0];if(J.adapter.smarter.Resolver.checkCube(c))return J.adapter.smarter.Resolver.specialTags[7][0];if(J.adapter.smarter.Resolver.checkWien2k(c))return J.adapter.smarter.Resolver.specialTags[9][0];if(J.adapter.smarter.Resolver.checkAims(c))return J.adapter.smarter.Resolver.specialTags[11][0];if(J.adapter.smarter.Resolver.checkGenNBO(c))return J.adapter.smarter.Resolver.specialTags[15][0]}return null},"~N,~A,~B");
c$.checkAims=b(c$,"checkAims",function(a){for(var c=0;c<a.length&&!a[c].startsWith("mol 1");c++){var d=JU.PT.getTokens(a[c]);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=b(c$,"checkAlchemy",function(a){var c;if(0<=(c=a.indexOf("ATOMS"))&&a.indexOf("BONDS")>c)try{return 0<Integer.parseInt(a.substring(0,c).trim())}catch(d){if(!y(d,NumberFormatException))throw d;
}return!1},"~S");c$.checkCastep=b(c$,"checkCastep",function(a){for(var c=0;c<a.length;c++)if(1==a[c].indexOf("Frequencies in         cm-1")||a[c].contains("CASTEP")||a[c].toUpperCase().startsWith("%BLOCK LATTICE_ABC")||a[c].toUpperCase().startsWith("%BLOCK LATTICE_CART")||a[c].toUpperCase().startsWith("%BLOCK POSITIONS_FRAC")||a[c].toUpperCase().startsWith("%BLOCK POSITIONS_ABS")||a[c].contains("<-- E"))return!0;return!1},"~A");c$.checkVaspposcar=b(c$,"checkVaspposcar",function(a){var c=a[8].trim().toLowerCase();
if(c.contains("direct")||c.contains("cartesian")||c.contains("selective"))return!0;a=a[7].trim().toLowerCase();return a.contains("direct")||a.contains("cartesian")?!0:!1},"~A");c$.checkCrystal=b(c$,"checkCrystal",function(a){var c=a[1].trim();if(c.equals("SLAB")||c.equals("MOLECULE")||c.equals("CRYSTAL")||c.equals("POLYMER")||(c=a[3]).equals("SLAB")||c.equals("MOLECULE")||c.equals("POLYMER"))return!0;for(c=0;c<a.length;c++)if(a[c].trim().equals("OPTGEOM"))return!0;return!1},"~A");c$.checkCube=b(c$,
"checkCube",function(a){try{for(var c=2;5>=c;c++){var d=new java.util.StringTokenizer(a[c]),b=d.countTokens();if(!(4==b||2==c&&5==b))return!1;Integer.parseInt(d.nextToken());for(var f=3;0<=--f;)JU.PT.fVal(d.nextToken());5==b&&Integer.parseInt(d.nextToken())}return!0}catch(g){if(!y(g,NumberFormatException))throw g;}return!1},"~A");c$.checkFoldingXyz=b(c$,"checkFoldingXyz",function(a){var c=new java.util.StringTokenizer(a[0].trim()," \t");if(2>c.countTokens())return!1;try{Integer.parseInt(c.nextToken().trim())}catch(d){if(y(d,
NumberFormatException))return!1;throw d;}c=a[1].trim();0==c.length&&(c=a[2].trim());c=new java.util.StringTokenizer(c," \t");if(0==c.countTokens())return!1;try{Integer.parseInt(c.nextToken().trim())}catch(b){if(y(b,NumberFormatException))return!1;throw b;}return!0},"~A");c$.checkGenNBO=b(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=b(c$,"checkGromacs",function(a){if(-2147483648==JU.PT.parseInt(a[1]))return!1;for(var c=-1,d=2;16>d&&0!=c;d++)if(69!=(c=a[d].length)&&45!=c&&0!=c)return!1;return!0},"~A");c$.checkMol=b(c$,"checkMol",function(a){var c=("X"+a[3]).trim().toUpperCase();if(7>c.length||0<=c.indexOf("."))return!1;if(c.endsWith("V2000")||c.endsWith("V3000"))return!0;try{var d=Integer.parseInt(a[3].substring(0,3).trim()),b=Integer.parseInt(a[3].substring(3,6).trim());return 0<d&&0<=b&&0!=a[0].indexOf("@<TRIPOS>")&&
0!=a[1].indexOf("@<TRIPOS>")&&0!=a[2].indexOf("@<TRIPOS>")}catch(f){if(!y(f,NumberFormatException))throw f;}return!1},"~A");c$.checkMopacGraphf=b(c$,"checkMopacGraphf",function(a){return 2<a[0].indexOf("MOPAC-Graphical data")},"~A");c$.checkOdyssey=b(c$,"checkOdyssey",function(a){var c;for(c=0;c<a.length&&(a[c].startsWith("C ")||0==a[c].length);c++);if(c>=a.length||" "!=a[c].charAt(0)||(c+=2)+1>=a.length)return!1;try{var d=Integer.parseInt(a[c].substring(2).trim()),b=Integer.parseInt(a[c].substring(0,
2).trim()),f=Integer.parseInt(a[++c].substring(0,2).trim());if(0>d||5<d||0>=f||5<b)return!1;var g=J.adapter.smarter.AtomSetCollectionReader.getTokensFloat(a[c],null,5);return!Float.isNaN(g[1])&&!Float.isNaN(g[2])&&!Float.isNaN(g[3])&&Float.isNaN(g[4])}catch(h){if(!y(h,Exception))throw h;}return!1},"~A");c$.checkWien2k=b(c$,"checkWien2k",function(a){return a[2].startsWith("MODE OF CALC=")||a[2].startsWith("             RELA")||a[2].startsWith("             NREL")},"~A");c$.checkXyz=b(c$,"checkXyz",
function(a){try{return Integer.parseInt(a[0].trim()),!0}catch(c){if(!y(c,NumberFormatException))throw c;}return!1},"~A");B(c$,"classBase","J.adapter.readers.");c$.readerSets=c$.prototype.readerSets="cif. ;Cif; molxyz. ;Mol3D;Mol;Xyz; more. ;BinaryDcd;Gromacs;Jcampdx;MdCrd;MdTop;Mol2;Pqr;P2n;TlsDataOnly; quantum. ;Adf;Csf;Dgrid;GamessUK;GamessUS;Gaussian;GausianWfn;Jaguar;Molden;MopacGraphf;GenNBO;NWChem;Odyssey;Psi;Qchem;Spartan;SpartanSmol;WebMO; pdb. ;Pdb; pymol. ;PyMOL; simple. ;Alchemy;Ampac;Cube;FoldingXyz;GhemicalMM;HyperChem;Jme;Mopac;MopacArchive;ZMatrix;JSON; xtal. ;Abinit;Aims;Castep;Crystal;Dmol;Espresso;Gulp;Jana;Magres;Shelx;Siesta;VaspOutcar;VaspPoscar;Wien2k;Xcrysden;".split(" ");
B(c$,"CML_NAMESPACE_URI","http://www.xml-cml.org/schema","SPECIAL_JME",0,"SPECIAL_MOPACGRAPHF",1,"SPECIAL_ODYSSEY",3,"SPECIAL_MOL",4,"SPECIAL_XYZ",5,"SPECIAL_FOLDINGXYZ",6,"SPECIAL_CUBE",7,"SPECIAL_ALCHEMY",8,"SPECIAL_WIEN",9,"SPECIAL_CASTEP",10,"SPECIAL_AIMS",11,"SPECIAL_CRYSTAL",12,"SPECIAL_VASPPOSCAR",13,"SPECIAL_GROMACS",14,"SPECIAL_GENNBO",15,"SPECIAL_ARGUS_XML",16,"SPECIAL_CML_XML",17,"SPECIAL_CHEM3D_XML",18,"SPECIAL_MOLPRO_XML",19,"SPECIAL_ODYSSEY_XML",20,"SPECIAL_XSD_XML",21,"SPECIAL_VASP_XML",
22,"SPECIAL_QE_XML",23,"SPECIAL_ARGUS_DOM",24,"SPECIAL_CML_DOM",25,"SPECIAL_CHEM3D_DOM",26,"SPECIAL_MOLPRO_DOM",27,"SPECIAL_ODYSSEY_DOM",28,"SPECIAL_XSD_DOM",29,"SPECIAL_VASP_DOM",30,"specialTags",[["Jme"],["MopacGraphf"],["Mol3D"],["Odyssey"],["Mol"],["Xyz"],["FoldingXyz"],["Cube"],["Alchemy"],["Wien2k"],["Castep"],["Aims"],["Crystal"],["VaspPoscar"],["Gromacs"],["GenNBO"],["XmlArgus"],["XmlCml"],["XmlChem3d"],["XmlMolpro"],["XmlOdyssey"],["XmlXsd"],["XmlVasp"],["XmlQE"],["XmlArgus(DOM)"],["XmlCml(DOM)"],
["XmlChem3d(DOM)"],["XmlMolpro(DOM)"],["XmlOdyssey(DOM)"],["XmlXsd(DOM)"],["XmlVasp(DOM)"],["MdCrd"]],"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":']);c$.fileStartsWithRecords=c$.prototype.fileStartsWithRecords=[J.adapter.smarter.Resolver.sptContainsRecords,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];B(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"],"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.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];B(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."],
"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"],"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.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]});p("J.adapter.smarter");q(["J.api.JmolAdapter"],"J.adapter.smarter.SmarterJmolAdapter","java.io.BufferedReader J.adapter.smarter.AtomIterator $.AtomSetCollection $.AtomSetCollectionReader $.BondIterator $.Resolver $.StructureIterator J.api.JmolDocument J.util.Logger".split(" "),function(){c$=G(J.adapter.smarter,"SmarterJmolAdapter",J.api.JmolAdapter);e(c$,"getFileTypeName",function(a){return s(a,
J.adapter.smarter.AtomSetCollection)?a.getFileTypeName():s(a,java.io.BufferedReader)?J.adapter.smarter.Resolver.getFileType(a):null},"~O");e(c$,"getAtomSetCollectionReader",function(a,c,d,b){return J.adapter.smarter.SmarterJmolAdapter.staticGetAtomSetCollectionReader(a,c,d,b)},"~S,~S,~O,java.util.Map");c$.staticGetAtomSetCollectionReader=b(c$,"staticGetAtomSetCollectionReader",function(a,c,d,b){try{var f=J.adapter.smarter.Resolver.getAtomCollectionReader(a,c,d,b,-1);if(s(f,String))try{J.adapter.smarter.SmarterJmolAdapter.close(d)}catch(g){if(!y(g,
Exception))throw g;}else f.setup(a,b,d);return f}catch(h){try{J.adapter.smarter.SmarterJmolAdapter.close(d)}catch(l){if(!y(l,Exception))throw l;}J.util.Logger.error(""+h);return""+h}},"~S,~S,~O,java.util.Map");b(c$,"getAtomSetCollectionFromReader",function(a,c,d){var b=J.adapter.smarter.Resolver.getAtomCollectionReader(a,null,c,d,-1);return s(b,J.adapter.smarter.AtomSetCollectionReader)?(b.setup(a,d,c),b.readData()):""+b},"~S,~O,java.util.Map");e(c$,"getAtomSetCollection",function(a){return J.adapter.smarter.SmarterJmolAdapter.staticGetAtomSetCollection(a)},
"~O");c$.staticGetAtomSetCollection=b(c$,"staticGetAtomSetCollection",function(a){var c=null;try{var c=a.reader,d=a.readData();return!s(d,J.adapter.smarter.AtomSetCollection)?d:null!=d.errorMessage?d.errorMessage:d}catch(b){try{System.out.println(b.toString())}catch(f){if(y(f,Exception))J.util.Logger.error(b.toString());else throw f;}try{c.close()}catch(g){if(!y(g,Exception))throw g;}J.util.Logger.error(""+b);return""+b}},"J.adapter.smarter.AtomSetCollectionReader");e(c$,"getAtomSetCollectionReaders",
function(a,c,d,b,f){for(var g=c.length,h=f?Array(g):null,l=f?null:Array(g),e=null,k=b.get("viewer"),v=0;v<g;v++)try{null!=e&&b.put("viewer",k);var A=a.getBufferedReaderOrBinaryDocument(v,!1);if(!s(A,java.io.BufferedReader)&&!s(A,J.api.JmolDocument))return A;var m=J.adapter.smarter.Resolver.getAtomCollectionReader(c[v],null==d?null:d[v],A,b,v);if(!s(m,J.adapter.smarter.AtomSetCollectionReader))return m;e=m;e.setup(null,null,null);e.isBinary?e.setup(c[v],b,a.getBufferedReaderOrBinaryDocument(v,!0)):
e.setup(c[v],b,A);if(f)h[v]=e;else{m=e.readData();if(!s(m,J.adapter.smarter.AtomSetCollection))return m;l[v]=m;if(null!=l[v].errorMessage)return l[v].errorMessage}}catch(x){return J.util.Logger.error(""+x),k.isJS||x.printStackTrace(),""+x}return f?h:this.getAtomSetCollectionFromSet(h,l,b)},"J.api.JmolFilesReaderInterface,~A,~A,java.util.Map,~B");e(c$,"getAtomSetCollectionFromSet",function(a,c,d){var b=null==c?Array(a.length):c;if(null==c)for(c=0;c<a.length;c++)try{var f=a[c].readData();if(!s(f,J.adapter.smarter.AtomSetCollection))return f;
b[c]=f;if(null!=b[c].errorMessage)return b[c].errorMessage}catch(g){return J.util.Logger.error(""+g),""+g}if(d.containsKey("trajectorySteps")){a=b[0];try{a.finalizeTrajectoryAs(d.get("trajectorySteps"),d.get("vibrationSteps"))}catch(h){if(y(h,Exception))null==a.errorMessage&&(a.errorMessage=""+h);else throw h;}}else if(b[0].isTrajectory){a=b[0];for(c=1;c<b.length;c++)b[0].mergeTrajectories(b[c])}else a=new J.adapter.smarter.AtomSetCollection("Array",null,b,null);return null==a.errorMessage?a:a.errorMessage},
"~O,~O,java.util.Map");e(c$,"getAtomSetCollectionFromDOM",function(a,c){try{var d=J.adapter.smarter.Resolver.DOMResolve(a,c);if(!s(d,J.adapter.smarter.AtomSetCollectionReader))return d;var b=d;b.setup("DOM node",c,null);d=b.readDataObject(a);return!s(d,J.adapter.smarter.AtomSetCollection)?d:null!=d.errorMessage?d.errorMessage:d}catch(f){return J.util.Logger.error(""+f),""+f}},"~O,java.util.Map");e(c$,"finish",function(a){a.finish()},"~O");e(c$,"getAtomSetCollectionName",function(a){return a.getCollectionName()},
"~O");e(c$,"getAtomSetCollectionAuxiliaryInfo",function(a){return a.getAtomSetCollectionAuxiliaryInfoMap()},"~O");e(c$,"getAtomSetCount",function(a){return a.getAtomSetCount()},"~O");e(c$,"getAtomSetNumber",function(a,c){return a.getAtomSetNumber(c)},"~O,~N");e(c$,"getAtomSetName",function(a,c){return a.getAtomSetName(c)},"~O,~N");e(c$,"getAtomSetAuxiliaryInfo",function(a,c){return a.getAtomSetAuxiliaryInfo(c)},"~O,~N");e(c$,"getHydrogenAtomCount",function(a){return a.getHydrogenAtomCount()},"~O");
e(c$,"getBondList",function(a){return a.getBondList()},"~O");e(c$,"getAtomCount",function(a){return null==a.bsAtoms?a.getAtomCount():a.bsAtoms.cardinality()},"~O");e(c$,"coordinatesAreFractional",function(a){return a.coordinatesAreFractional},"~O");e(c$,"getNotionalUnitcell",function(a){return a.notionalUnitCell},"~O");e(c$,"getPdbScaleMatrix",function(a){a=a.notionalUnitCell;if(22>a.length)return null;for(var c=M(16,0),d=0;16>d;d++)c[d]=a[6+d];return c},"~O");e(c$,"getPdbScaleTranslate",function(a){a=
a.notionalUnitCell;if(22>a.length)return null;var c=M(3,0);c[0]=a[9];c[1]=a[13];c[2]=a[17];return c},"~O");e(c$,"getAtomIterator",function(a){return new J.adapter.smarter.AtomIterator(a)},"~O");e(c$,"getBondIterator",function(a){return new J.adapter.smarter.BondIterator(a)},"~O");e(c$,"getStructureIterator",function(a){return 0==a.getStructureCount()?null:new J.adapter.smarter.StructureIterator(a)},"~O");c$.close=b(c$,"close",function(a){s(a,java.io.BufferedReader);a.close()},"~O");B(c$,"PATH_KEY",
".PATH");c$.PATH_SEPARATOR=c$.prototype.PATH_SEPARATOR=System.getProperty("path.separator","/")});p("J.adapter.smarter");q(["J.api.JmolAdapterStructureIterator"],"J.adapter.smarter.StructureIterator",["J.api.JmolAdapter"],function(){c$=u(function(){this.structureCount=0;this.structure=this.structures=null;this.istructure=0;this.bsModelsDefined=null;t(this,arguments)},J.adapter.smarter,"StructureIterator",J.api.JmolAdapterStructureIterator);w(c$,function(a){R(this,J.adapter.smarter.StructureIterator,
[]);this.structureCount=a.getStructureCount();this.structures=a.getStructures();this.istructure=0;this.bsModelsDefined=a.bsStructuredModels},"J.adapter.smarter.AtomSetCollection");e(c$,"hasNext",function(){if(this.istructure==this.structureCount)return!1;this.structure=this.structures[this.istructure++];return!0});e(c$,"getStructureType",function(){return this.structure.structureType});e(c$,"getSubstructureType",function(){return this.structure.substructureType});e(c$,"getStructureID",function(){return this.structure.structureID});
e(c$,"getSerialID",function(){return this.structure.serialID});e(c$,"getStartChainID",function(){return this.structure.startChainID});e(c$,"getStartSequenceNumber",function(){return this.structure.startSequenceNumber});e(c$,"getStartInsertionCode",function(){return J.api.JmolAdapter.canonizeInsertionCode(this.structure.startInsertionCode)});e(c$,"getEndChainID",function(){return this.structure.endChainID});e(c$,"getEndSequenceNumber",function(){return this.structure.endSequenceNumber});e(c$,"getEndInsertionCode",
function(){return this.structure.endInsertionCode});e(c$,"getStrandCount",function(){return this.structure.strandCount});e(c$,"getStructuredModels",function(){return this.bsModelsDefined});e(c$,"getAtomIndices",function(){return this.structure.atomStartEnd});e(c$,"getModelIndices",function(){return this.structure.modelStartEnd})});p("J.api");P(J.api,"AtomIndexIterator");p("J.api");q(null,"J.api.Interface",["J.util.Logger"],function(){c$=G(J.api,"Interface");c$.getOptionInterface=b(c$,"getOptionInterface",
function(a){return J.api.Interface.getInterface("J."+a)},"~S");c$.getApplicationInterface=b(c$,"getApplicationInterface",function(a){return J.api.Interface.getInterface("org.openscience.jmol.app."+a)},"~S");c$.getInterface=b(c$,"getInterface",function(a){try{var c=Class.forName(a);return null==c?null:c.newInstance()}catch(d){if(y(d,Exception))return J.util.Logger.error("Interface.java Error creating instance for "+a+": \n"+d),null;throw d;}},"~S")});p("J.api");q(["J.constant.EnumQuantumShell"],"J.api.JmolAdapter",
["java.util.Hashtable","J.api.JmolViewer","J.modelset.Group","J.util.Elements","J.viewer.JC"],function(){c$=G(J.api,"JmolAdapter");c$.getShellEnumeration=b(c$,"getShellEnumeration",function(a){return J.constant.EnumQuantumShell.getItem(a)},"~N");c$.getNewDfCoefMap=b(c$,"getNewDfCoefMap",function(){return J.constant.EnumQuantumShell.getNewDfCoefMap()});c$.getElementSymbol=b(c$,"getElementSymbol",function(a){return J.util.Elements.elementSymbolFromNumber(a)},"~N");c$.getElementNumber=b(c$,"getElementNumber",
function(a){return J.util.Elements.elementNumberFromSymbol(a,!1)},"~S");c$.getNaturalIsotope=b(c$,"getNaturalIsotope",function(a){return J.util.Elements.getNaturalIsotope(a)},"~N");c$.isHetero=b(c$,"isHetero",function(a){return J.viewer.JC.isHetero(a)},"~S");c$.getQuantumShellTag=b(c$,"getQuantumShellTag",function(a){return J.constant.EnumQuantumShell.getQuantumShellTag(a)},"~N");c$.getQuantumShellTagID=b(c$,"getQuantumShellTagID",function(a){return J.constant.EnumQuantumShell.getQuantumShellTagID(a)},
"~S");c$.getQuantumShellTagIDSpherical=b(c$,"getQuantumShellTagIDSpherical",function(a){return J.constant.EnumQuantumShell.getQuantumShellTagIDSpherical(a)},"~S");c$.lookupGroupID=b(c$,"lookupGroupID",function(a){return J.modelset.Group.lookupGroupID(a)},"~S");c$.getBondingRadiusFloat=b(c$,"getBondingRadiusFloat",function(a,c){return J.util.Elements.getBondingRadiusFloat(a,c)},"~N,~N");b(c$,"getAtomSetCollectionFromReader",function(a,c,d,b){null==b&&(b=new java.util.Hashtable);b.containsKey("viewer")||
b.put("viewer",J.api.JmolViewer.allocateViewer(null,this));a=this.getAtomSetCollectionReader(a,c,d,b);return s(a,String)?a:this.getAtomSetCollection(a)},"~S,~S,~O,java.util.Map");b(c$,"openBufferedReader",function(a,c){return this.getAtomSetCollectionFromReader(a,null,c,null)},"~S,java.io.BufferedReader");b(c$,"openBufferedReader",function(a,c,d){return this.getAtomSetCollectionFromReader(a,null,c,d)},"~S,java.io.BufferedReader,java.util.Map");b(c$,"openBufferedReader",function(a,c,d){return this.getAtomSetCollectionFromReader(a,
c,d,null)},"~S,~S,java.io.BufferedReader");c$.canonizeAlphaDigit=b(c$,"canonizeAlphaDigit",function(a){return"A"<=a&&"Z">=a||"a"<=a&&"z">=a||"0"<=a&&"9">=a?a:"\x00"},"~S");c$.canonizeInsertionCode=b(c$,"canonizeInsertionCode",function(a){return J.api.JmolAdapter.canonizeAlphaDigit(a)},"~S");c$.canonizeAlternateLocationID=b(c$,"canonizeAlternateLocationID",function(a){return J.api.JmolAdapter.canonizeAlphaDigit(a)},"~S");B(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_AS_SINGLE",65536);c$.SHELL_S=c$.prototype.SHELL_S=J.constant.EnumQuantumShell.S.id;c$.SHELL_P=c$.prototype.SHELL_P=J.constant.EnumQuantumShell.P.id;c$.SHELL_SP=c$.prototype.SHELL_SP=J.constant.EnumQuantumShell.SP.id;c$.SHELL_L=c$.prototype.SHELL_L=
J.constant.EnumQuantumShell.SP.id;c$.SHELL_D_SPHERICAL=c$.prototype.SHELL_D_SPHERICAL=J.constant.EnumQuantumShell.D_SPHERICAL.id;c$.SHELL_D_CARTESIAN=c$.prototype.SHELL_D_CARTESIAN=J.constant.EnumQuantumShell.D_CARTESIAN.id;c$.SHELL_F_SPHERICAL=c$.prototype.SHELL_F_SPHERICAL=J.constant.EnumQuantumShell.F_SPHERICAL.id;c$.SHELL_F_CARTESIAN=c$.prototype.SHELL_F_CARTESIAN=J.constant.EnumQuantumShell.F_CARTESIAN.id;c$.SHELL_G_SPHERICAL=c$.prototype.SHELL_G_SPHERICAL=J.constant.EnumQuantumShell.G_SPHERICAL.id;
c$.SHELL_G_CARTESIAN=c$.prototype.SHELL_G_CARTESIAN=J.constant.EnumQuantumShell.G_CARTESIAN.id;c$.SHELL_H_SPHERICAL=c$.prototype.SHELL_H_SPHERICAL=J.constant.EnumQuantumShell.H_SPHERICAL.id;c$.SHELL_H_CARTESIAN=c$.prototype.SHELL_H_CARTESIAN=J.constant.EnumQuantumShell.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: ";B(c$,"cellParamNames","_cell_length_a _cell_length_b _cell_length_c _cell_angle_alpha _cell_angle_beta _cell_angle_gamma".split(" "))});
p("J.api");P(J.api,"JmolAdapterAtomIterator");p("J.api");c$=G(J.api,"JmolAdapterBondIterator");p("J.api");c$=G(J.api,"JmolAdapterStructureIterator");p("J.api");P(J.api,"JmolAppConsoleInterface");p("J.api");q(["J.api.JmolSyncInterface"],"J.api.JmolAppletInterface",null,function(){P(J.api,"JmolAppletInterface",J.api.JmolSyncInterface)});p("J.api");P(J.api,"JmolCallbackListener");p("J.api");P(J.api,"JmolDocument");p("J.api");P(J.api,"JmolGraphicsInterface");p("J.api");P(J.api,"JmolMeasurementClient");
p("J.api");P(J.api,"JmolModulationSet");p("J.api");P(J.api,"JmolNavigatorInterface",Runnable);p("J.api");q(["J.api.JmolGraphicsInterface"],"J.api.JmolRendererInterface",null,function(){P(J.api,"JmolRendererInterface",J.api.JmolGraphicsInterface)});p("J.api");P(J.api,"JmolRepaintManager");p("J.api");q(["J.api.JmolCallbackListener"],"J.api.JmolStatusListener",null,function(){P(J.api,"JmolStatusListener",J.api.JmolCallbackListener)});p("J.api");P(J.api,"JmolSyncInterface");p("J.api");q(["javajs.api.JSInterface"],
"J.api.JmolViewer",["java.lang.Boolean","java.util.Hashtable"],function(){c$=u(function(){this.apiPlatform=this.menuStructure=null;t(this,arguments)},J.api,"JmolViewer",null,javajs.api.JSInterface);c$.allocateViewer=b(c$,"allocateViewer",function(a,c,d,b,f,g,h,l){var e=new java.util.Hashtable;null!=a&&e.put("display",a);null!=c&&e.put("adapter",c);null!=h&&e.put("statuslistener",h);null!=l&&e.put("platform",l);null!=g&&e.put("options",g);null!=d&&e.put("fullname",d);null!=b&&e.put("documentbase",
b);null!=f&&e.put("codebase",f);return new J.viewer.Viewer(e)},"~O,J.api.JmolAdapter,~S,java.net.URL,java.net.URL,~S,J.api.JmolStatusListener,javajs.api.GenericPlatform");c$.allocateViewer=b(c$,"allocateViewer",function(a,c){return J.api.JmolViewer.allocateViewer(a,c,null,null,null,null,null,null)},"~O,J.api.JmolAdapter");c$.allocateViewer=b(c$,"allocateViewer",function(a,c,d,b,f,g,h){return J.api.JmolViewer.allocateViewer(a,c,d,b,f,g,h,null)},"~O,J.api.JmolAdapter,~S,java.net.URL,java.net.URL,~S,J.api.JmolStatusListener");
b(c$,"setConsole",function(a){this.getProperty("DATA_API","getAppConsole",a)},"J.api.JmolAppConsoleInterface");c$.getJmolVersion=b(c$,"getJmolVersion",function(){return J.viewer.Viewer.getJmolVersion()});c$.checkOption=b(c$,"checkOption",function(a,c){var d=a.getParameter(c);return s(d,Boolean)&&d.booleanValue()||s(d,Integer)&&0!=d.intValue()},"J.api.JmolViewer,~S");b(c$,"openFileAsync",function(a){this.openFileAsyncSpecial(a,0)},"~S");b(c$,"mouseEvent",function(a,c,d,b,f){this.processMouseEvent(a,
c,d,b,f)},"~N,~N,~N,~N,~N");b(c$,"renderScreenImage",function(a,c){this.apiPlatform.renderScreenImage(a,c)},"~O,~O,~O");b(c$,"getJsObjectInfo",function(a,c,d){return this.apiPlatform.getJsObjectInfo(a,c,d)},"~A,~S,~A");c$.getJmolValueAsString=b(c$,"getJmolValueAsString",function(a,c){return null==a?"":""+a.getParameter(c)},"J.api.JmolViewer,~S")});p("J.appletjs");q(["J.util.GenericApplet","java.util.Hashtable"],"J.appletjs.Jmol",["JU.PT","J.constant.EnumCallback","J.util.Logger","$.Parser"],function(){c$=
u(function(){this.htParams=null;t(this,arguments)},J.appletjs,"Jmol",J.util.GenericApplet);N(c$,function(){this.htParams=new java.util.Hashtable});w(c$,function(a){R(this,J.appletjs.Jmol,[]);null==a&&(a=new java.util.Hashtable);this.viewerOptions=a;for(var c,d=a.entrySet().iterator();d.hasNext()&&((c=d.next())||1);)this.htParams.put(c.getKey().toLowerCase(),c.getValue());this.documentBase=""+a.get("documentBase");this.codeBase=""+a.get("codePath");this.isJS=!0;this.init(this)},"java.util.Map");e(c$,
"setStereoGraphics",function(a){return a?viewer.apiPlatform.context:null},"~B");e(c$,"initOptions",function(){this.viewerOptions.remove("debug");this.viewerOptions.put("fullName",this.fullName);this.haveDocumentAccess="true".equalsIgnoreCase(""+this.getValue("allowjavascript","true"));this.mayScript=!0});e(c$,"getParameter",function(a){a=this.htParams.get(a.toLowerCase());return null==a?null:String.instantialize(a.toString())},"~S");e(c$,"doSendJsTextStatus",function(a){System.out.println(a)},"~S");
e(c$,"doSendJsTextareaStatus",function(a){System.out.println(a)},"~S");b(c$,"doNotifySync",function(a,c){var d=this.b$.get(J.constant.EnumCallback.SYNC);if(!this.mayScript||null==d||!this.haveDocumentAccess&&!d.startsWith("Jmol."))return a;J.util.Logger.info("Jmol.notifySync "+c+" >> "+a);try{if("Jmol._mySyncCallback"==d)return;Jmol._mySyncCallback(this.htmlName,a,c);return eval(d)(this.htmlName,a,c)}catch(b){if(y(b,Exception))this.haveNotifiedError||J.util.Logger.debugging&&J.util.Logger.debug("syncCallback call error to "+
d+": "+b),this.haveNotifiedError=!0;else throw b;}return a},"~S,~S");e(c$,"doFunctionXY",function(a,c,d){var b=M(Math.abs(c),Math.abs(d),0);if(!this.mayScript||!this.haveDocumentAccess||0==c||0==d)return b;try{if(0<c&&0<d)for(var f=0;f<c;f++)for(var g=0;g<d;g++)b[f][g]=eval(a)(this.htmlName,f,g);else if(0<d){var h;h=eval(a)(this.htmlName,c,d);c=Math.abs(c);var l=M(c*d,0);J.util.Parser.parseStringInfestedFloatArray(h,null,l);for(a=f=0;f<c;f++)for(g=0;g<d;g++,a++)b[f][g]=l[a]}else eval(a)(htmlName,
c,d,b)}catch(e){if(y(e,Exception))J.util.Logger.error("Exception "+e+" with nX, nY: "+c+" "+d);else throw e;}return b},"~S,~N,~N");e(c$,"doFunctionXYZ",function(a,c,d,b){var f=M(Math.abs(c),Math.abs(d),Math.abs(b),0);if(!this.mayScript||!this.haveDocumentAccess||0==c||0==d||0==b)return f;try{eval(a)(this.htmlName,c,d,b,f)}catch(g){if(y(g,Exception))J.util.Logger.error("Exception "+g+" for "+a+" with nX, nY, nZ: "+c+" "+d+" "+b);else throw g;}return f},"~S,~N,~N,~N");e(c$,"doShowDocument",function(a){window.open(a.toString())},
"java.net.URL");e(c$,"doSendCallback",function(a,c,d){if(!(null==a||0==a.length))if(a.equals("alert"))alert(d);else{d=JU.PT.split(a,".");try{for(var b=window[d[0]],f=1;f<d.length;f++)b=b[d[f]];for(f=0;f<c.length;f++)c[f]&&c[f].booleanValue&&(c[f]=c[f].booleanValue());return b(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7])}catch(g){System.out.println(a+" failed "+g)}}return""},"~S,~A,~S");e(c$,"doEval",function(a){try{return""+eval(a)}catch(c){if(y(c,Exception))J.util.Logger.error("# error evaluating "+
a+":"+c.toString());else throw c;}return""},"~S");e(c$,"doShowStatus",function(a){try{System.out.println(a)}catch(c){if(!y(c,Exception))throw c;}},"~S")});p("J.atomdata");c$=u(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.atomCount=0;t(this,arguments)},J.atomdata,"AtomData");w(c$,function(){});B(c$,"MODE_FILL_COORDS",1,"MODE_FILL_RADII",2,"MODE_FILL_MOLECULES",4,"MODE_GET_ATTACHED_HYDROGENS",8,"MODE_FILL_MULTIMODEL",16);p("J.atomdata");P(J.atomdata,"AtomDataServer");p("J.atomdata");q(["java.lang.Enum","J.constant.EnumVdw"],"J.atomdata.RadiusData",["java.lang.Float","JU.SB"],function(){c$=u(function(){this.vdwType=this.factorType=this.info=null;this.value=NaN;this.valueExtended=
0;this.values=null;t(this,arguments)},J.atomdata,"RadiusData");N(c$,function(){this.factorType=J.atomdata.RadiusData.EnumType.ABSOLUTE;this.vdwType=J.constant.EnumVdw.AUTO});w(c$,function(a,c,d,b){null!=a?(this.values=a,this.value=2147483647):null!=d&&(this.factorType=d,this.value=c,null!=b&&(this.vdwType=b))},"~A,~N,J.atomdata.RadiusData.EnumType,J.constant.EnumVdw");e(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.constant.EnumVdw.AUTO&&a.append(this.vdwType.getVdwLabel());break;case J.atomdata.RadiusData.EnumType.SCREEN:a.appendI(z(this.value))}return a.toString()});aa();c$=G(J.atomdata.RadiusData,"EnumType",Enum);r(c$,"ABSOLUTE",0,[]);r(c$,"OFFSET",1,[]);r(c$,"FACTOR",2,[]);r(c$,"SCREEN",3,[]);c$=$()});
p("J.awtjs");c$=G(J.awtjs,"Image");c$.grabPixels=b(c$,"grabPixels",function(){return null},"~O,~N,~N");c$.drawImageToBuffer=b(c$,"drawImageToBuffer",function(){return null},"~O,~O,~O,~N,~N,~N");c$.getTextPixels=b(c$,"getTextPixels",function(){return null},"~S,javajs.awt.Font,~O,~O,~N,~N,~N");c$.newBufferedImage=b(c$,"newBufferedImage",function(){return null},"~O,~N,~N");c$.newBufferedImage=b(c$,"newBufferedImage",function(){return null},"~N,~N");c$.allocateRgbImage=b(c$,"allocateRgbImage",function(){return null},
"~N,~N,~A,~N,~B");c$.getStaticGraphics=b(c$,"getStaticGraphics",function(){return null},"~O,~B");c$.getGraphics=b(c$,"getGraphics",function(){return null},"~O");c$.drawImage=b(c$,"drawImage",function(){},"~O,~O,~N,~N,~N,~N");c$.flush=b(c$,"flush",function(){},"~O");c$.disposeGraphics=b(c$,"disposeGraphics",function(){},"~O");p("J.awtjs");c$=G(J.awtjs,"JSFont");c$.newFont=b(c$,"newFont",function(){return null},"~S,~B,~B,~N");c$.getFontMetrics=b(c$,"getFontMetrics",function(){return null},"~O,~O");
c$.getAscent=b(c$,"getAscent",function(){return 0},"~O");c$.getDescent=b(c$,"getDescent",function(){return 0},"~O");c$.stringWidth=b(c$,"stringWidth",function(){return 0},"javajs.awt.Font,~S");p("J.awtjs");q(["J.awtjs2d.Platform"],"J.awtjs.Platform",["J.awtjs.Image","$.JSFont"],function(){c$=G(J.awtjs,"Platform",J.awtjs2d.Platform);e(c$,"allocateRgbImage",function(a,c,d,b,f){return J.awtjs.Image.allocateRgbImage(a,c,d,b,f)},"~N,~N,~A,~N,~B,~B");e(c$,"disposeGraphics",function(a){J.awtjs.Image.disposeGraphics(a)},
"~O");e(c$,"drawImage",function(a,c,d,b,f,g){J.awtjs.Image.drawImage(a,c,d,b,f,g)},"~O,~O,~N,~N,~N,~N");e(c$,"grabPixels",function(){return null},"~O,~N,~N,~A,~N,~N");e(c$,"drawImageToBuffer",function(a,c,d,b,f,g){return J.awtjs.Image.drawImageToBuffer(a,c,d,b,f,g)},"~O,~O,~O,~N,~N,~N");e(c$,"getTextPixels",function(a,c,d,b,f,g,h){return J.awtjs.Image.getTextPixels(a,c,d,b,f,g,h)},"~S,javajs.awt.Font,~O,~O,~N,~N,~N");e(c$,"flushImage",function(a){J.awtjs.Image.flush(a)},"~O");e(c$,"getGraphics",function(a){return J.awtjs.Image.getGraphics(a)},
"~O");e(c$,"getStaticGraphics",function(a,c){return J.awtjs.Image.getStaticGraphics(a,c)},"~O,~B");e(c$,"newBufferedImage",function(a,c,d){return J.awtjs.Image.newBufferedImage(a,c,d)},"~O,~N,~N");e(c$,"newOffScreenImage",function(a,c){return J.awtjs.Image.newBufferedImage(a,c)},"~N,~N");e(c$,"fontStringWidth",function(a,c){return J.awtjs.JSFont.stringWidth(a,c)},"javajs.awt.Font,~S");e(c$,"getFontAscent",function(a){return J.awtjs.JSFont.getAscent(a)},"~O");e(c$,"getFontDescent",function(a){return J.awtjs.JSFont.getDescent(a)},
"~O");e(c$,"getFontMetrics",function(a,c){return J.awtjs.JSFont.getFontMetrics(c,a)},"javajs.awt.Font,~O");e(c$,"newFont",function(a,c,d,b){return J.awtjs.JSFont.newFont(a,c,d,b)},"~S,~B,~B,~N")});p("J.awtjs2d");c$=G(J.awtjs2d,"Display");c$.getFullScreenDimensions=b(c$,"getFullScreenDimensions",function(a,c){c[0]=a.width;c[1]=a.height},"~O,~A");c$.hasFocus=b(c$,"hasFocus",function(){return!0},"~O");c$.requestFocusInWindow=b(c$,"requestFocusInWindow",function(){},"~O");c$.repaint=b(c$,"repaint",function(){},
"~O");c$.renderScreenImage=b(c$,"renderScreenImage",function(){},"javajs.api.PlatformViewer,~O,~O");c$.setTransparentCursor=b(c$,"setTransparentCursor",function(){},"~O");c$.setCursor=b(c$,"setCursor",function(){},"~N,~O");c$.prompt=b(c$,"prompt",function(a,c){var d=prompt(a,c);return null!=d?d:"null"},"~S,~S,~A,~B");c$.convertPointFromScreen=b(c$,"convertPointFromScreen",function(){},"~O,JU.P3");p("J.awtjs2d");c$=G(J.awtjs2d,"Image");c$.getWidth=b(c$,"getWidth",function(a){return a.imageWidth?a.imageWidth:
a.width},"~O");c$.getHeight=b(c$,"getHeight",function(a){return a.imageHeight?a.imageHeight:a.height},"~O");c$.grabPixels=b(c$,"grabPixels",function(a,c,d){if(a._buf32)return a._buf32;a=a.getImageData(0,0,c,d).data;return this.toIntARGB(a)},"~O,~N,~N");c$.toIntARGB=b(c$,"toIntARGB",function(a){for(var c=m(a.length/4),d=D(c,0),b=0,f=0;b<c;f++)d[b++]=a[f++]<<16|a[f++]<<8|a[f++]|4278190080;return d},"~A");c$.getTextPixels=b(c$,"getTextPixels",function(a,c,d,b,f,g){d.fillStyle="#000000";d.fillRect(0,
0,b,f);d.fillStyle="#FFFFFF";d.font=c.font;d.fillText(a,0,g);return this.grabPixels(d,b,f)},"~S,javajs.awt.Font,~O,~N,~N,~N");c$.allocateRgbImage=b(c$,"allocateRgbImage",function(a,c,d,b,f,g){null==g&&(g={width:a,height:c});g.buf32=d;return g},"~N,~N,~A,~N,~B,~O");c$.getStaticGraphics=b(c$,"getStaticGraphics",function(a){return this.getGraphics(a)},"~O,~B");c$.getGraphics=b(c$,"getGraphics",function(a){return a.getContext("2d")},"~O");c$.drawImage=b(c$,"drawImage",function(a,c,d,b,f,g){var h=c.buf8,
l=c.buf32;g*=f;for(var e=4*(c.width-f),k=0,v=4*d;k<g;)h[v++]=l[k]>>16&255,h[v++]=l[k]>>8&255,h[v++]=l[k]&255,h[v++]=255,0==++k%f&&(v+=e);a.putImageData(c.imgdata,d,b)},"~O,~O,~N,~N,~N,~N");p("J.awtjs2d");q(["javajs.api.GenericFileInterface"],"J.awtjs2d.JSFile",["JU.PT","J.viewer.FileManager","$.Viewer"],function(){c$=u(function(){this.fullName=this.name=null;t(this,arguments)},J.awtjs2d,"JSFile",null,javajs.api.GenericFileInterface);c$.newFile=b(c$,"newFile",function(a){return new J.awtjs2d.JSFile(a)},
"~S");w(c$,function(a){this.name=a.$replace("\\","/");this.fullName=a;!this.fullName.startsWith("/")&&0>J.viewer.FileManager.urlTypeIndex(a)&&(this.fullName=J.viewer.Viewer.jsDocumentBase+"/"+this.fullName);this.fullName=JU.PT.simpleReplace(this.fullName,"/./","/");a.substring(a.lastIndexOf("/")+1)},"~S");e(c$,"getParentAsFile",function(){var a=this.fullName.lastIndexOf("/");return 0>a?null:new J.awtjs2d.JSFile(this.fullName.substring(0,a))});e(c$,"getFullPath",function(){return this.fullName});e(c$,
"getName",function(){return this.name});e(c$,"isDirectory",function(){return this.fullName.endsWith("/")});e(c$,"length",function(){return 0});c$.getBufferedURLInputStream=b(c$,"getBufferedURLInputStream",function(a,c,d){try{var b=a.openConnection();null!=c?b.outputBytes(c):null!=d&&b.outputString(d);return b.getSB()}catch(f){if(y(f,Exception))return f.toString();throw f;}},"java.net.URL,~A,~S")});p("J.awtjs2d");c$=G(J.awtjs2d,"JSFont");c$.newFont=b(c$,"newFont",function(a,c,d,b,f){a=a.equals("Monospaced")?
"Courier":a.startsWith("Sans")?"Sans-Serif":"Serif";return(c?"bold ":"")+(d?"italic ":"")+b+f+" "+a},"~S,~B,~B,~N,~S");c$.getFontMetrics=b(c$,"getFontMetrics",function(a,c){c.font!=a.font&&(c.font=a.font,a.font=c.font,c._fontAscent=Math.ceil(a.fontSize),c._fontDescent=Math.ceil(0.25*a.fontSize));return c},"javajs.awt.Font,~O");c$.getAscent=b(c$,"getAscent",function(a){return Math.ceil(a._fontAscent)},"~O");c$.getDescent=b(c$,"getDescent",function(a){return Math.ceil(a._fontDescent)},"~O");c$.stringWidth=
b(c$,"stringWidth",function(a,c,d){c.font=a.font;return Math.ceil(c.measureText(d).width)},"javajs.awt.Font,~O,~S");p("J.awtjs2d");q(["javajs.api.GenericMouseInterface","javajs.awt.event.Event"],"J.awtjs2d.Mouse",["java.lang.Character","JU.V3","J.util.Escape","$.Logger"],function(){c$=u(function(){this.manager=this.viewer=null;this.keyBuffer="";this.wheeling=this.isMouseDown=!1;this.modifiersWhenPressed10=this.yWhenPressed=this.xWhenPressed=0;t(this,arguments)},J.awtjs2d,"Mouse",null,javajs.api.GenericMouseInterface);
w(c$,function(a,c){this.viewer=c;this.manager=this.viewer.getActionManager()},"~N,javajs.api.PlatformViewer,~O");e(c$,"clear",function(){});e(c$,"dispose",function(){});e(c$,"processEvent",function(a,c,d,b,f){-1!=a&&(b=J.awtjs2d.Mouse.applyLeftMouse(b));switch(a){case -1:this.wheeled(f,c,b);break;case 501:this.xWhenPressed=c;this.yWhenPressed=d;this.modifiersWhenPressed10=b;this.pressed(f,c,d,b,!1);break;case 506:this.dragged(f,c,d,b);break;case 504:this.entered(f,c,d);break;case 505:this.exited(f,
c,d);break;case 503:this.moved(f,c,d,b);break;case 502:this.released(f,c,d,b);c==this.xWhenPressed&&(d==this.yWhenPressed&&b==this.modifiersWhenPressed10)&&this.clicked(f,c,d,b,1);break;default:return!1}return!0},"~N,~N,~N,~N,~N");e(c$,"processTwoPointGesture",function(a){if(!(2>a[0].length)){var c=a[0],d=a[1],b=c[0],f=c[d.length-1];a=b[0];var g=f[0],b=b[1],f=f[1],h=JU.V3.new3(g-a,f-b,0),l=h.length(),e=d[0],k=d[d.length-1],d=e[0],v=k[0],e=e[1],k=k[1],A=JU.V3.new3(v-d,k-e,0),m=A.length();1>l||1>m||
(h.normalize(),A.normalize(),h=h.dot(A),0.8<h?(a=z(g-c[c.length-2][0]),c=z(f-c[c.length-2][1]),this.viewer.translateXYBy(a,c)):-0.8>h&&(h=JU.V3.new3(d-a,e-b,0),A=JU.V3.new3(v-g,k-f,0),c=A.length()-h.length(),this.wheeled(System.currentTimeMillis(),0>c?-1:1,32)))}},"~A");b(c$,"mouseClicked",function(a){this.clicked(a.getWhen(),a.getX(),a.getY(),a.getModifiers(),a.getClickCount())},"java.awt.event.MouseEvent");b(c$,"mouseEntered",function(a){this.entered(a.getWhen(),a.getX(),a.getY())},"java.awt.event.MouseEvent");
b(c$,"mouseExited",function(a){this.exited(a.getWhen(),a.getX(),a.getY())},"java.awt.event.MouseEvent");b(c$,"mousePressed",function(a){this.pressed(a.getWhen(),a.getX(),a.getY(),a.getModifiers(),a.isPopupTrigger())},"java.awt.event.MouseEvent");b(c$,"mouseReleased",function(a){this.released(a.getWhen(),a.getX(),a.getY(),a.getModifiers())},"java.awt.event.MouseEvent");b(c$,"mouseDragged",function(a){var c=a.getModifiers();0==(c&28)&&(c|=16);this.dragged(a.getWhen(),a.getX(),a.getY(),c)},"java.awt.event.MouseEvent");
b(c$,"mouseMoved",function(a){this.moved(a.getWhen(),a.getX(),a.getY(),a.getModifiers())},"java.awt.event.MouseEvent");b(c$,"mouseWheelMoved",function(a){a.consume();this.wheeled(a.getWhen(),a.getWheelRotation(),a.getModifiers())},"java.awt.event.MouseWheelEvent");b(c$,"keyTyped",function(a){a.consume();if(this.viewer.menuEnabled()){var c=a.getKeyChar(),d=a.getModifiers();J.util.Logger.debuggingHigh&&J.util.Logger.debug("MouseManager keyTyped: "+c+" "+(0+c.charCodeAt(0))+" "+d);if(0!=d&&1!=d)switch(c){case String.fromCharCode(11):case "k":a=
!this.viewer.getBooleanProperty("allowKeyStrokes");switch(d){case 2:this.viewer.setBooleanProperty("allowKeyStrokes",a);this.viewer.setBooleanProperty("showKeyStrokes",!0);break;case 10:case 1:this.viewer.setBooleanProperty("allowKeyStrokes",a),this.viewer.setBooleanProperty("showKeyStrokes",!1)}this.clearKeyBuffer();this.viewer.refresh(3,"showkey");break;case 26:case "z":switch(d){case 2:this.viewer.undoMoveAction(4165,1);break;case 3:this.viewer.undoMoveAction(4139,1)}break;case 25:case "y":switch(d){case 2:this.viewer.undoMoveAction(4139,
1)}}else this.viewer.getBooleanProperty("allowKeyStrokes")&&this.addKeyBuffer(1==a.getModifiers()?Character.toUpperCase(c):c)}},"java.awt.event.KeyEvent");b(c$,"keyPressed",function(a){this.viewer.isApplet()&&a.consume();this.manager.keyPressed(a.getKeyCode(),a.getModifiers())},"java.awt.event.KeyEvent");b(c$,"keyReleased",function(a){a.consume();this.manager.keyReleased(a.getKeyCode())},"java.awt.event.KeyEvent");b(c$,"clearKeyBuffer",function(){0!=this.keyBuffer.length&&(this.keyBuffer="",this.viewer.getBooleanProperty("showKeyStrokes")&&
this.viewer.evalStringQuietSync('!set echo _KEYSTROKES; set echo bottom left;echo ""',!0,!0))});b(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.viewer.getBooleanProperty("showKeyStrokes")&&this.viewer.evalStringQuietSync("!set echo _KEYSTROKES; set echo bottom left;echo "+J.util.Escape.eS("\u0001"+this.keyBuffer),!0,!0))},"~S");b(c$,"sendKeyBuffer",
function(){var a=this.keyBuffer;this.viewer.getBooleanProperty("showKeyStrokes")&&this.viewer.evalStringQuietSync("!set echo _KEYSTROKES; set echo bottom left;echo "+J.util.Escape.eS(this.keyBuffer),!0,!0);this.clearKeyBuffer();this.viewer.evalStringQuietSync(a,!1,!0)});b(c$,"entered",function(a,c,d){this.wheeling=!1;this.manager.mouseEnterExit(a,c,d,!1)},"~N,~N,~N");b(c$,"exited",function(a,c,d){this.wheeling=!1;this.manager.mouseEnterExit(a,c,d,!0)},"~N,~N,~N");b(c$,"clicked",function(a,c,d,b){this.clearKeyBuffer();
this.manager.mouseAction(2,a,c,d,1,b)},"~N,~N,~N,~N,~N");b(c$,"moved",function(a,c,d,b){this.clearKeyBuffer();this.isMouseDown?this.manager.mouseAction(1,a,c,d,0,J.awtjs2d.Mouse.applyLeftMouse(b)):this.manager.mouseAction(0,a,c,d,0,b)},"~N,~N,~N,~N");b(c$,"wheeled",function(a,c,d){this.clearKeyBuffer();this.wheeling=!0;this.manager.mouseAction(3,a,0,c,0,d&-29|32)},"~N,~N,~N");b(c$,"pressed",function(a,c,d,b){this.clearKeyBuffer();this.isMouseDown=!0;this.wheeling=!1;this.manager.mouseAction(4,a,c,
d,0,b)},"~N,~N,~N,~N,~B");b(c$,"released",function(a,c,d,b){this.wheeling=this.isMouseDown=!1;this.manager.mouseAction(5,a,c,d,0,b)},"~N,~N,~N,~N");b(c$,"dragged",function(a,c,d,b){this.wheeling||(20==(b&20)&&(b=b&-5|2),this.manager.mouseAction(1,a,c,d,0,b))},"~N,~N,~N,~N");c$.applyLeftMouse=b(c$,"applyLeftMouse",function(a){return 0==(a&28)?a|16:a},"~N")});p("J.awtjs2d");q(["javajs.api.GenericPlatform"],"J.awtjs2d.Platform","java.net.URL JU.AjaxURLStreamHandlerFactory J.api.Interface J.awtjs2d.Display $.Image $.JSFile $.JSFont $.Mouse".split(" "),
function(){c$=u(function(){this.context=this.viewer=this.canvas=null;t(this,arguments)},J.awtjs2d,"Platform",null,javajs.api.GenericPlatform);e(c$,"setViewer",function(a,c){this.viewer=a;this.canvas=c;null!=c&&(this.context=c.getContext("2d"),c.imgdata=this.context.getImageData(0,0,c.width,c.height),c.buf8=c.imgdata.data);try{java.net.URL.setURLStreamHandlerFactory(new JU.AjaxURLStreamHandlerFactory)}catch(d){}},"javajs.api.PlatformViewer,~O");e(c$,"isSingleThreaded",function(){return!0});e(c$,"getJsObjectInfo",
function(a,c,d){return"localName"==c?a[0].nodeName:null==d?a[0][c]:a[0][c](d[0])},"~A,~S,~A");e(c$,"isHeadless",function(){return!1});e(c$,"getMouseManager",function(a,c){return new J.awtjs2d.Mouse(a,this.viewer,c)},"~N,~O");e(c$,"convertPointFromScreen",function(a,c){J.awtjs2d.Display.convertPointFromScreen(a,c)},"~O,JU.P3");e(c$,"getFullScreenDimensions",function(a,c){J.awtjs2d.Display.getFullScreenDimensions(a,c)},"~O,~A");e(c$,"getMenuPopup",function(a,c){var d="j"==c?"awtjs2d.JSmolPopup":"awtjs2d.JSModelKitPopup",
b=J.api.Interface.getOptionInterface(d);try{null!=b&&b.jpiInitialize(this.viewer,a)}catch(f){if(y(f,Exception))return System.out.println("Exception creating "+d+":"+f),null;throw f;}return b},"~S,~S");e(c$,"hasFocus",function(a){return J.awtjs2d.Display.hasFocus(a)},"~O");e(c$,"prompt",function(a,c,d,b){return J.awtjs2d.Display.prompt(a,c,d,b)},"~S,~S,~A,~B");e(c$,"renderScreenImage",function(a,c){J.awtjs2d.Display.renderScreenImage(this.viewer,a,c)},"~O,~O");e(c$,"drawImage",function(a,c,d,b,f,g){J.awtjs2d.Image.drawImage(a,
c,d,b,f,g)},"~O,~O,~N,~N,~N,~N");e(c$,"requestFocusInWindow",function(a){J.awtjs2d.Display.requestFocusInWindow(a)},"~O");e(c$,"repaint",function(a){J.awtjs2d.Display.repaint(a)},"~O");e(c$,"setTransparentCursor",function(a){J.awtjs2d.Display.setTransparentCursor(a)},"~O");e(c$,"setCursor",function(a,c){J.awtjs2d.Display.setCursor(a,c)},"~N,~O");e(c$,"allocateRgbImage",function(a,c,d,b,f,g){return J.awtjs2d.Image.allocateRgbImage(a,c,d,b,f,g?null:this.canvas)},"~N,~N,~A,~N,~B,~B");e(c$,"notifyEndOfRendering",
function(){});e(c$,"createImage",function(){return null},"~O");e(c$,"disposeGraphics",function(){},"~O");e(c$,"grabPixels",function(a,c,d){a.image&&(c!=a.width||d!=a.height)&&Jmol._setCanvasImage(a,c,d);if(a.buf32)return a.buf32;c=J.awtjs2d.Image.grabPixels(J.awtjs2d.Image.getGraphics(a),c,d);return a.buf32=c},"~O,~N,~N,~A,~N,~N");e(c$,"drawImageToBuffer",function(a,c,d,b,f){return this.grabPixels(d,b,f,null,0,0)},"~O,~O,~O,~N,~N,~N");e(c$,"getTextPixels",function(a,c,d,b,f,g,h){return J.awtjs2d.Image.getTextPixels(a,
c,d,f,g,h)},"~S,javajs.awt.Font,~O,~O,~N,~N,~N");e(c$,"flushImage",function(){},"~O");e(c$,"getGraphics",function(a){return J.awtjs2d.Image.getGraphics(a)},"~O");e(c$,"getImageHeight",function(a){return null==a?-1:J.awtjs2d.Image.getHeight(a)},"~O");e(c$,"getImageWidth",function(a){return null==a?-1:J.awtjs2d.Image.getWidth(a)},"~O");e(c$,"getStaticGraphics",function(a,c){return J.awtjs2d.Image.getStaticGraphics(a,c)},"~O,~B");e(c$,"newBufferedImage",function(a,c,d){return"undefined"!=typeof Jmol&&
Jmol._getHiddenCanvas?Jmol._getHiddenCanvas(this.viewer.applet,"stereoImage",c,d):null},"~O,~N,~N");e(c$,"newOffScreenImage",function(a,c){return"undefined"!=typeof Jmol&&Jmol._getHiddenCanvas?Jmol._getHiddenCanvas(this.viewer.applet,"textImage",a,c):null},"~N,~N");e(c$,"waitForDisplay",function(a,c){if("undefined"==typeof Jmol||!Jmol._getHiddenCanvas)return!1;var d=this.viewer,b=d.getEvalContextAndHoldQueue(d.eval),f=a[0];return Jmol._loadImage(this,a,c,function(a,c){d.loadImageData(a,c,f,b)})},
"~O,~O");e(c$,"fontStringWidth",function(a,c){return J.awtjs2d.JSFont.stringWidth(a,this.context,c)},"javajs.awt.Font,~S");e(c$,"getFontAscent",function(a){return J.awtjs2d.JSFont.getAscent(a)},"~O");e(c$,"getFontDescent",function(a){return J.awtjs2d.JSFont.getDescent(a)},"~O");e(c$,"getFontMetrics",function(a,c){return J.awtjs2d.JSFont.getFontMetrics(a,c)},"javajs.awt.Font,~O");e(c$,"newFont",function(a,c,d,b){return J.awtjs2d.JSFont.newFont(a,c,d,b,"px")},"~S,~B,~B,~N");e(c$,"getDateFormat",function(a){if(a){var c=
new Date;a=c.toString().split(" ");var d="0"+c.getMonth(),d=d.substring(d.length-2),c="0"+c.getDate(),c=c.substring(c.length-2);return a[3]+d+c+a[4].replace(/\:/g,"")+a[5].substring(3,6)+"'"+a[5].substring(6,8)+"'"}return(""+new Date).split(" (")[0]},"~B");e(c$,"newFile",function(a){return new J.awtjs2d.JSFile(a)},"~S");e(c$,"getBufferedFileInputStream",function(){return null},"~S");e(c$,"getBufferedURLInputStream",function(a,c,d){return J.awtjs2d.JSFile.getBufferedURLInputStream(a,c,d)},"java.net.URL,~A,~S");
e(c$,"getLocalUrl",function(){return null},"~S")});p("J.bspt");q(null,"J.bspt.Bspf",["JU.AU","J.bspt.Bspt","J.util.Logger"],function(){c$=u(function(){this.dimMax=0;this.bspts=null;this.isValid=!1;this.cubeIterators=this.bsptsValid=null;t(this,arguments)},J.bspt,"Bspf");b(c$,"validate",function(a){this.isValid=a},"~B");b(c$,"validateModel",function(a,c){this.bsptsValid[a]=c},"~N,~B");b(c$,"isInitialized",function(){return this.isValid});b(c$,"isInitializedIndex",function(a){return this.bspts.length>
a&&null!=this.bspts[a]&&this.bsptsValid[a]},"~N");w(c$,function(a){this.dimMax=a;this.bspts=[];this.bsptsValid=va(0,!1);this.cubeIterators=[]},"~N");b(c$,"getBsptCount",function(){return this.bspts.length});b(c$,"addTuple",function(a,c){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(c)},"~N,JU.P3");b(c$,"stats",function(){for(var a=
0;a<this.bspts.length;++a)null!=this.bspts[a]&&this.bspts[a].stats()});b(c$,"dump",function(){for(var a=0;a<this.bspts.length;++a)J.util.Logger.info(">>>>\nDumping bspt #"+a+"\n>>>>"),this.bspts[a].dump();J.util.Logger.info("<<<<")});b(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");b(c$,"getNewCubeIterator",function(a){return this.bspts[a].allocateCubeIterator()},"~N");b(c$,"initialize",function(a,c,d){null!=this.bspts[a]&&this.bspts[a].reset();for(var b=d.nextSetBit(0);0<=b;b=d.nextSetBit(b+1))this.addTuple(a,c[b]);this.bsptsValid[a]=!0},"~N,~A,JU.BS")});p("J.bspt");q(null,"J.bspt.Bspt",["JU.SB","J.bspt.CubeIterator","$.Leaf","J.util.Logger"],function(){c$=u(function(){this.index=this.dimMax=this.treeDepth=
0;this.eleRoot=null;t(this,arguments)},J.bspt,"Bspt");w(c$,function(a,c){this.dimMax=a;this.index=c;this.reset()},"~N,~N");b(c$,"reset",function(){this.eleRoot=new J.bspt.Leaf(this,null,0);this.treeDepth=1});b(c$,"addTuple",function(a){this.eleRoot=this.eleRoot.addTuple(0,a)},"JU.P3");b(c$,"stats",function(){});b(c$,"dump",function(){var a=new JU.SB;this.eleRoot.dump(0,a);J.util.Logger.info(a.toString())});b(c$,"allocateCubeIterator",function(){return new J.bspt.CubeIterator(this)});B(c$,"leafCountMax",
2,"MAX_TREE_DEPTH",100)});p("J.bspt");q(null,"J.bspt.CubeIterator",["J.bspt.Node"],function(){c$=u(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;t(this,arguments)},J.bspt,"CubeIterator");w(c$,function(a){this.set(a)},"J.bspt.Bspt");b(c$,"set",function(a){this.bspt=a;this.stack=Array(a.treeDepth)},"J.bspt.Bspt");b(c$,"initialize",function(a,c,d){this.radius=c;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.P3,~N,~B");b(c$,"release",function(){this.set(this.bspt)});b(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});b(c$,"nextElement",function(){return this.leaf.tuples[this.leafIndex++]});b(c$,"foundDistance2",function(){return this.dx*
this.dx+this.dy*this.dy+this.dz*this.dz});b(c$,"findLeftLeaf",function(){this.leaf=null;if(0!=this.sp){for(var a=this.stack[--this.sp];s(a,J.bspt.Node);){var c;switch(a.dim){case 0:c=this.cx;break;case 1:c=this.cy;break;default:c=this.cz}var d=c+this.radius;if(!this.tHemisphere||0!=a.dim)c-=this.radius;if(c<=a.maxLeft&&d>=a.minLeft)d>=a.minRight&&c<=a.maxRight&&(this.stack[this.sp++]=a.eleRight),a=a.eleLeft;else if(d>=a.minRight&&c<=a.maxRight)a=a.eleRight;else{if(0==this.sp)return;a=this.stack[--this.sp]}}this.leaf=
a;this.leafIndex=0}});b(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.P3")});p("J.bspt");c$=u(function(){this.bspt=null;this.count=0;t(this,arguments)},J.bspt,"Element");p("J.bspt");q(["J.bspt.Element"],"J.bspt.Leaf",["J.bspt.Node","J.util.Escape"],function(){c$=u(function(){this.tuples=null;t(this,arguments)},J.bspt,
"Leaf",J.bspt.Element);w(c$,function(a,c,d){R(this,J.bspt.Leaf,[]);this.bspt=a;this.count=0;this.tuples=Array(2);if(null!=c){for(a=d;2>a;++a)this.tuples[this.count++]=c.tuples[a],c.tuples[a]=null;c.count=d}},"J.bspt.Bspt,J.bspt.Leaf,~N");b(c$,"sort",function(a){for(var c=this.count;0<--c;)for(var d=this.tuples[c],b=J.bspt.Node.getDimensionValue(d,a),f=c;0<=--f;){var g=this.tuples[f],h=J.bspt.Node.getDimensionValue(g,a);h>b&&(this.tuples[c]=g,this.tuples[f]=d,d=g,b=h)}},"~N");e(c$,"addTuple",function(a,
c){return 2>this.count?(this.tuples[this.count++]=c,this):(new J.bspt.Node(this.bspt,a,this)).addTuple(a,c)},"~N,JU.P3");e(c$,"dump",function(a,c){for(var d=0;d<this.count;++d){for(var b=this.tuples[d],f=0;f<a;++f)c.append(".");c.append(J.util.Escape.eP(b)).append("Leaf ").appendI(d).append(": ").append(b.getInfo())}},"~N,JU.SB");e(c$,"toString",function(){return"leaf:"+this.count+"\n"})});p("J.bspt");q(["J.bspt.Element"],"J.bspt.Node",["java.lang.NullPointerException","J.bspt.Leaf"],function(){c$=
u(function(){this.maxLeft=this.minLeft=this.dim=0;this.eleLeft=null;this.maxRight=this.minRight=0;this.eleRight=null;t(this,arguments)},J.bspt,"Node",J.bspt.Element);w(c$,function(a,c,d){R(this,J.bspt.Node,[]);this.bspt=a;c==a.treeDepth&&(a.treeDepth=c+1);if(2!=d.count)throw new NullPointerException;this.dim=c%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");b(c$,"addTuple",function(a,c){var d=J.bspt.Node.getDimensionValue(c,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,c)):(d<this.minRight?this.minRight=d:d>this.maxRight&&(this.maxRight=d),this.eleRight=this.eleRight.addTuple(a+1,c));return this},"~N,JU.P3");b(c$,"dump",function(a,c){c.append("\nnode LEFT"+a);this.eleLeft.dump(a+1,c);for(var d=0;d<a;++d)c.append("->");c.append(" RIGHT"+a);this.eleRight.dump(a+1,c)},"~N,JU.SB");b(c$,"toString",function(){return this.eleLeft.toString()+this.dim+":\n"+this.eleRight.toString()});c$.getDimensionValue=
b(c$,"getDimensionValue",function(a,c){return 0==c?a.x:1==c?a.y:a.z},"JU.P3,~N")});p("J.constant");q(["java.lang.Enum"],"J.constant.EnumAnimationMode",null,function(){c$=G(J.constant,"EnumAnimationMode",Enum);r(c$,"ONCE",0,[]);r(c$,"LOOP",1,[]);r(c$,"PALINDROME",2,[])});p("J.constant");q(["java.lang.Enum"],"J.constant.EnumAxesMode",null,function(){c$=u(function(){this.code=0;t(this,arguments)},J.constant,"EnumAxesMode",Enum);w(c$,function(a){this.code=a},"~N");b(c$,"getCode",function(){return this.code});
c$.getAxesMode=b(c$,"getAxesMode",function(a){for(var c,d=0,b=J.constant.EnumAxesMode.values();d<b.length&&((c=b[d])||1);d++)if(c.getCode()==a)return c;return null},"~N");r(c$,"BOUNDBOX",0,[0]);r(c$,"MOLECULAR",1,[1]);r(c$,"UNITCELL",2,[2])});p("J.constant");q(["java.lang.Enum"],"J.constant.EnumCallback",["JU.SB"],function(){c$=G(J.constant,"EnumCallback",Enum);c$.getCallback=b(c$,"getCallback",function(a){a=a.toUpperCase();a=a.substring(0,Math.max(a.indexOf("CALLBACK"),0));for(var c,d=0,b=J.constant.EnumCallback.values();d<
b.length&&((c=b[d])||1);d++)if(c.name().equalsIgnoreCase(a))return c;return null},"~S");c$.getNameList=b(c$,"getNameList",function(){if(null==J.constant.EnumCallback.nameList){for(var a=new JU.SB,c,d=0,b=J.constant.EnumCallback.values();d<b.length&&((c=b[d])||1);d++)a.append(c.name().toLowerCase()).append("Callback;");J.constant.EnumCallback.nameList=a.toString()}return J.constant.EnumCallback.nameList});c$.nameList=null;r(c$,"ANIMFRAME",0,[]);r(c$,"APPLETREADY",1,[]);r(c$,"ATOMMOVED",2,[]);r(c$,
"CLICK",3,[]);r(c$,"ECHO",4,[]);r(c$,"ERROR",5,[]);r(c$,"EVAL",6,[]);r(c$,"HOVER",7,[]);r(c$,"LOADSTRUCT",8,[]);r(c$,"MEASURE",9,[]);r(c$,"MESSAGE",10,[]);r(c$,"MINIMIZATION",11,[]);r(c$,"PICK",12,[]);r(c$,"RESIZE",13,[]);r(c$,"SCRIPT",14,[]);r(c$,"SYNC",15,[]);r(c$,"STRUCTUREMODIFIED",16,[])});p("J.constant");q(["java.lang.Enum"],"J.constant.EnumFileStatus",null,function(){c$=u(function(){this.code=0;t(this,arguments)},J.constant,"EnumFileStatus",Enum);b(c$,"getCode",function(){return this.code});
w(c$,function(a){this.code=a},"~N");r(c$,"DELETED",0,[5]);r(c$,"CREATED",1,[3]);r(c$,"CREATING_MODELSET",2,[2]);r(c$,"ZAPPED",3,[0]);r(c$,"NOT_LOADED",4,[-1])});p("J.constant");q(["java.lang.Enum"],"J.constant.EnumPalette",["java.lang.Byte"],function(){c$=u(function(){this.$$name=null;this.id=0;t(this,arguments)},J.constant,"EnumPalette",Enum);w(c$,function(a,c){this.$$name=a;this.id=c},"~S,~N");c$.pidOf=b(c$,"pidOf",function(a){return s(a,J.constant.EnumPalette)?a.id:s(a,Byte)?a.byteValue():J.constant.EnumPalette.UNKNOWN.id},
"~O");c$.isPaletteVariable=b(c$,"isPaletteVariable",function(a){return 0!=(a&64)},"~N");c$.getPalette=b(c$,"getPalette",function(a){if(0>a.indexOf("_"))for(var c,d=0,b=J.constant.EnumPalette.values();d<b.length&&((c=b[d])||1);d++)if(a.equalsIgnoreCase(c.$$name))return c;return 0==a.indexOf("property_")?J.constant.EnumPalette.PROPERTY:J.constant.EnumPalette.UNKNOWN},"~S");c$.getPaletteID=b(c$,"getPaletteID",function(a){if(0>a.indexOf("_"))for(var c,d=0,b=J.constant.EnumPalette.values();d<b.length&&
((c=b[d])||1);d++)if(a.equalsIgnoreCase(c.$$name))return c.id;return 0==a.indexOf("property_")?J.constant.EnumPalette.PROPERTY.id:J.constant.EnumPalette.UNKNOWN.id},"~S");c$.getPaletteName=b(c$,"getPaletteName",function(a){for(var c,d=0,b=J.constant.EnumPalette.values();d<b.length&&((c=b[d])||1);d++)if(c.id==a)return c.$$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];r(c$,"UNKNOWN",0,[null,255]);r(c$,"NONE",1,["none",0]);r(c$,"CPK",2,["cpk",1]);r(c$,"PARTIAL_CHARGE",3,["partialcharge",2]);r(c$,"FORMAL_CHARGE",
4,["formalcharge",3]);r(c$,"TEMP",5,["temperature",68]);r(c$,"FIXEDTEMP",6,["fixedtemperature",5]);r(c$,"SURFACE",7,["surfacedistance",70]);r(c$,"STRUCTURE",8,["structure",7]);r(c$,"AMINO",9,["amino",8]);r(c$,"SHAPELY",10,["shapely",9]);r(c$,"CHAIN",11,["chain",10]);r(c$,"GROUP",12,["group",75]);r(c$,"MONOMER",13,["monomer",76]);r(c$,"MOLECULE",14,["molecule",77]);r(c$,"ALTLOC",15,["altloc",14]);r(c$,"INSERTION",16,["insertion",15]);r(c$,"JMOL",17,["jmol",16]);r(c$,"RASMOL",18,["rasmol",17]);r(c$,
"TYPE",19,["type",18]);r(c$,"ENERGY",20,["energy",19]);r(c$,"PROPERTY",21,["property",84]);r(c$,"VARIABLE",22,["variable",85]);r(c$,"STRAIGHTNESS",23,["straightness",86]);r(c$,"POLYMER",24,["polymer",87])});p("J.constant");q(["java.lang.Enum"],"J.constant.EnumQuantumShell",["JU.SB"],function(){c$=u(function(){this.tag2=this.tag=null;this.idSpherical=this.id=0;t(this,arguments)},J.constant,"EnumQuantumShell",Enum);w(c$,function(a,c,d,b){this.tag=a;this.tag2=c;this.id=d;this.idSpherical=b},"~S,~S,~N,~N");
c$.getNewDfCoefMap=b(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=b(c$,"getQuantumShellTagID",function(a){if(a.equals("L"))return J.constant.EnumQuantumShell.SP.id;a=J.constant.EnumQuantumShell.getQuantumShell(a);return null==a?-1:a.id},"~S");c$.getQuantumShell=b(c$,"getQuantumShell",function(a){for(var c,d=0,b=J.constant.EnumQuantumShell.values();d<b.length&&((c=b[d])||1);d++)if(c.tag.equals(a)||
c.tag2.equals(a))return c;return null},"~S");c$.getQuantumShellTagIDSpherical=b(c$,"getQuantumShellTagIDSpherical",function(a){if(a.equals("L"))return J.constant.EnumQuantumShell.SP.idSpherical;a=J.constant.EnumQuantumShell.getQuantumShell(a);return null==a?-1:a.idSpherical},"~S");c$.getItem=b(c$,"getItem",function(a){switch(a){case 0:return J.constant.EnumQuantumShell.S;case 1:return J.constant.EnumQuantumShell.P;case 2:return J.constant.EnumQuantumShell.SP;case 3:return J.constant.EnumQuantumShell.D_SPHERICAL;
case 4:return J.constant.EnumQuantumShell.D_CARTESIAN;case 5:return J.constant.EnumQuantumShell.F_SPHERICAL;case 6:return J.constant.EnumQuantumShell.F_CARTESIAN;case 7:return J.constant.EnumQuantumShell.G_SPHERICAL;case 8:return J.constant.EnumQuantumShell.G_CARTESIAN;case 9:return J.constant.EnumQuantumShell.H_SPHERICAL;case 10:return J.constant.EnumQuantumShell.H_CARTESIAN;case 11:return J.constant.EnumQuantumShell.I_SPHERICAL;case 12:return J.constant.EnumQuantumShell.I_CARTESIAN}return null},
"~N");c$.getQuantumShellTag=b(c$,"getQuantumShellTag",function(a){for(var c,d=0,b=J.constant.EnumQuantumShell.values();d<b.length&&((c=b[d])||1);d++)if(c.id==a)return c.tag;return""+a},"~N");c$.getMOString=b(c$,"getMOString",function(a){var c=new JU.SB;if(2==a.length)return""+z(0>a[0]?-a[1]:a[1]);c.appendC("[");for(var d=0;d<a.length;d+=2)0<d&&c.append(", "),c.appendF(a[d]).append(" ").appendI(z(a[d+1]));c.appendC("]");return c.toString()},"~A");c$.SUPPORTED_BASIS_FUNCTIONS="SPLDF";r(c$,"S",0,["S",
"S",0,0]);r(c$,"P",1,["P","X",1,1]);r(c$,"SP",2,["SP","SP",2,2]);r(c$,"D_SPHERICAL",3,["5D","5D",3,3]);r(c$,"D_CARTESIAN",4,["D","XX",4,3]);r(c$,"F_SPHERICAL",5,["7F","7F",5,5]);r(c$,"F_CARTESIAN",6,["F","XXX",6,5]);r(c$,"G_SPHERICAL",7,["9G","9G",7,7]);r(c$,"G_CARTESIAN",8,["G","XXXX",8,7]);r(c$,"H_SPHERICAL",9,["11H","11H",9,9]);r(c$,"H_CARTESIAN",10,["H","XXXXX",10,9]);r(c$,"I_SPHERICAL",11,["13I","13I",11,11]);r(c$,"I_CARTESIAN",12,["I","XXXXXX",12,11])});p("J.constant");q(["java.lang.Enum"],
"J.constant.EnumStereoMode",null,function(){c$=u(function(){this.$$name=null;this.$isBiColor=!1;t(this,arguments)},J.constant,"EnumStereoMode",Enum);w(c$,function(a,c){this.$$name=a;this.$isBiColor=c},"~S,~B");b(c$,"getName",function(){return this.$$name});b(c$,"isBiColor",function(){return this.$isBiColor});c$.getStereoMode=b(c$,"getStereoMode",function(a){for(var c,d=0,b=J.constant.EnumStereoMode.values();d<b.length&&((c=b[d])||1);d++)if(c.$$name.equalsIgnoreCase(a))return c;return null},"~S");
c$.DEFAULT_STEREO_DEGREES=-5;r(c$,"NONE",0,["OFF",!1]);r(c$,"DOUBLE",1,["",!1]);r(c$,"REDCYAN",2,["REDCYAN",!0]);r(c$,"REDBLUE",3,["REDBLUE",!0]);r(c$,"REDGREEN",4,["REDGREEN",!0]);r(c$,"CUSTOM",5,["",!0])});p("J.constant");q(["java.lang.Enum"],"J.constant.EnumStructure",null,function(){c$=u(function(){this.color=this.id=0;t(this,arguments)},J.constant,"EnumStructure",Enum);w(c$,function(a,c){this.id=a;this.color=c},"~N,~N");b(c$,"getId",function(){return this.id});b(c$,"getColor",function(){return this.color});
c$.getProteinStructureType=b(c$,"getProteinStructureType",function(a){for(var c,d=0,b=J.constant.EnumStructure.values();d<b.length&&((c=b[d])||1);d++)if(a.equalsIgnoreCase(c.name()))return c.isProtein()?c:J.constant.EnumStructure.NOT;return J.constant.EnumStructure.NOT},"~S");b(c$,"getBioStructureTypeName",function(a){return 0>this.id?"":a&&this.isProtein()?"protein":this.name()},"~B");b(c$,"isProtein",function(){return 0<=this.id&&3>=this.id||7<=this.id});r(c$,"NOT",0,[-1,4286611584]);r(c$,"NONE",
1,[0,4294967295]);r(c$,"TURN",2,[1,4284514559]);r(c$,"SHEET",3,[2,4294952960]);r(c$,"HELIX",4,[3,4294901888]);r(c$,"DNA",5,[4,4289593598]);r(c$,"RNA",6,[5,4294771042]);r(c$,"CARBOHYDRATE",7,[6,4289111802]);r(c$,"HELIX310",8,[7,4288675968]);r(c$,"HELIXALPHA",9,[8,4294901888]);r(c$,"HELIXPI",10,[9,4284481664])});p("J.constant");q(["java.lang.Enum"],"J.constant.EnumVdw",null,function(){c$=u(function(){this.pt=0;this.type2=this.type=null;t(this,arguments)},J.constant,"EnumVdw",Enum);w(c$,function(a,c,
d){this.pt=a;this.type=c;this.type2=d},"~N,~S,~S");b(c$,"getVdwLabel",function(){return null==this.type?this.type2:this.type});c$.getVdwType=b(c$,"getVdwType",function(a){if(null!=a)for(var c,d=0,b=J.constant.EnumVdw.values();d<b.length&&((c=b[d])||1);d++)if(a.equalsIgnoreCase(c.type))return c;return null},"~S");c$.getVdwType2=b(c$,"getVdwType2",function(a){if(null!=a)for(var c,d=0,b=J.constant.EnumVdw.values();d<b.length&&((c=b[d])||1);d++)if(a.equalsIgnoreCase(c.type2))return c;return null},"~S");
r(c$,"JMOL",0,[0,"Jmol",null]);r(c$,"BABEL",1,[1,"Babel",null]);r(c$,"RASMOL",2,[2,"RasMol",null]);r(c$,"BABEL21",3,[3,"Babel21",null]);r(c$,"AUTO_JMOL",4,[0,null,"Jmol"]);r(c$,"AUTO_BABEL",5,[1,null,"Babel"]);r(c$,"AUTO_RASMOL",6,[2,null,"RasMol"]);r(c$,"AUTO",7,[0,"Auto",null]);r(c$,"USER",8,[-1,"User",null]);r(c$,"ADPMAX",9,[-1,null,"adpmax"]);r(c$,"ADPMIN",10,[-1,null,"adpmin"]);r(c$,"HYDRO",11,[-1,null,"hydrophobic"]);r(c$,"IONIC",12,[-1,null,"ionic"]);r(c$,"TEMP",13,[-1,null,"temperature"]);
r(c$,"NOJMOL",14,[-1,null,null]);r(c$,"NADA",15,[-1,null,null])});p("J.g3d");q(null,"J.g3d.CylinderRenderer",["JU.AU","J.util.Shader"],function(){c$=u(function(){this.shader=this.line3d=this.g3d=null;this.colixB=this.colixA=0;this.shadesA=null;this.isScreenedA=!1;this.shadesB=null;this.isScreenedB=!1;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;t(this,arguments)},J.g3d,"CylinderRenderer");N(c$,function(){this.tRaster=M(32,0);this.txRaster=M(32,
0);this.tyRaster=M(32,0);this.tzRaster=M(32,0);this.xRaster=D(32,0);this.yRaster=D(32,0);this.zRaster=D(32,0);this.fp8ShadeIndexUp=D(32,0)});w(c$,function(a){this.g3d=a;this.line3d=a.line3d;this.shader=a.shader},"J.g3d.Graphics3D");b(c$,"render",function(a,c,d,b,f,g,h,l,e,k,v,A){if(!(g>3*this.g3d.getRenderHeight())){this.isScreenedA=d;this.isScreenedB=b;var F=m(g/2)+1,x=this.g3d.clipCode3(h-F,l-F,e-F),p=this.g3d.clipCode3(h+F,l+F,e+F),Q=this.g3d.clipCode3(k-F,v-F,A-F),F=this.g3d.clipCode3(k+F,v+F,
A+F);this.clipped=0!=(x|p|Q|F);if(0==(x&F&p&Q))if(this.dxB=k-h,this.dyB=v-l,this.dzB=A-e,1>=g)this.line3d.plotLineDelta(this.g3d.getColorArgbOrGray(a),d,this.g3d.getColorArgbOrGray(c),b,h,l,e,this.dxB,this.dyB,this.dzB,this.clipped);else{this.drawBackside=this.clipped||2==f||0==f;this.diameter=g;this.xA=h;this.yA=l;this.zA=e;this.endcaps=f;this.shadesA=this.g3d.getShades(this.colixA=a);this.shadesB=this.g3d.getShades(this.colixB=c);this.calcArgbEndcap(!0,!1);this.generateBaseEllipse();(2==f||4==f)&&
this.renderFlatEndcap(!0);this.g3d.setZMargin(5);for(a=this.rasterCount;0<=--a;)this.plotRaster(a);this.g3d.setZMargin(0);3==f&&this.renderSphericalEndcaps()}}},"~N,~N,~B,~B,~N,~N,~N,~N,~N,~N,~N,~N");b(c$,"renderBits",function(a,c,d,b,f,g,h,l,e,k,v,A){if(!(g>3*this.g3d.getRenderHeight())){this.isScreenedA=d;this.isScreenedB=b;var F=m(g/2)+1,x=Math.round(h),p=Math.round(l),Q=Math.round(e),r=Math.round(k),q=Math.round(v),s=Math.round(A),t=this.g3d.clipCode3(x-F,p-F,Q-F),x=this.g3d.clipCode3(x+F,p+F,
Q+F),p=this.g3d.clipCode3(r-F,q-F,s-F),F=this.g3d.clipCode3(r+F,q+F,s+F);this.clipped=0!=(t|x|p|F);if(0==(t&F&x&p))if(this.dxBf=k-h,this.dyBf=v-l,this.dzBf=A-e,0==g||1==g)this.line3d.plotLineDelta(this.g3d.getColorArgbOrGray(a),d,this.g3d.getColorArgbOrGray(c),b,z(h),z(l),z(e),z(this.dxBf),z(this.dyBf),z(this.dzBf),this.clipped);else{0<g&&(this.diameter=g,this.xAf=h,this.yAf=l,this.zAf=e);this.drawBackside=!d&&!b&&(this.clipped||2==f||0==f);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=c);this.endcaps=f;this.calcArgbEndcap(!0,!0);0<g&&this.generateBaseEllipsePrecisely(!1);2==f&&this.renderFlatEndcapPrecisely(!0);this.line3d.setLineBits(this.dxBf,this.dyBf);this.g3d.setZMargin(5);for(a=this.rasterCount;0<=--a;)this.plotRasterBits(a);this.g3d.setZMargin(0);3==f&&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");b(c$,"plotRasterBits",function(a){var c=this.fp8ShadeIndexUp[a]>>8,d=c>>1,b=this.xRaster[a],f=this.yRaster[a];a=this.zRaster[a];this.tEndcapOpen&&0!=this.argbEndcap&&(this.clipped?(this.g3d.plotPixelClippedArgb(this.argbEndcap,this.xEndcap+b,this.yEndcap+f,this.zEndcap-a-1),this.g3d.plotPixelClippedArgb(this.argbEndcap,this.xEndcap-b,this.yEndcap-f,this.zEndcap+a-1)):(this.g3d.plotPixelUnclippedArgb(this.argbEndcap,this.xEndcap+b,this.yEndcap+
f,this.zEndcap-a-1),this.g3d.plotPixelUnclippedArgb(this.argbEndcap,this.xEndcap-b,this.yEndcap-f,this.zEndcap+a-1)));this.line3d.plotLineDeltaBits(this.shadesA,this.isScreenedA,this.shadesB,this.isScreenedB,c,this.xA+b,this.yA+f,this.zA-a,this.dxB,this.dyB,this.dzB,this.clipped);this.drawBackside&&this.line3d.plotLineDelta(this.shadesA[d],this.isScreenedA,this.shadesB[d],this.isScreenedB,this.xA-b,this.yA-f,this.zA+a,this.dxB,this.dyB,this.dzB,this.clipped)},"~N");b(c$,"renderCone",function(a,c,
d,b,f,g,h,e,j,k,v,A){if(!(b>3*this.g3d.getRenderHeight()))if(this.dxBf=e-(this.xAf=f),this.dyBf=j-(this.yAf=g),this.dzBf=k-(this.zAf=h),this.xA=m(Math.floor(this.xAf)),this.yA=m(Math.floor(this.yAf)),this.zA=m(Math.floor(this.zAf)),this.dxB=m(Math.floor(this.dxBf)),this.dyB=m(Math.floor(this.dyBf)),this.dzB=m(Math.floor(this.dzBf)),this.xTip=e,this.yTip=j,this.zTip=k,this.colixA=a,this.isScreenedA=c,this.shadesA=this.g3d.getShades(a),a=this.shader.getShadeIndex(this.dxB,this.dyB,-this.dzB),this.g3d.plotPixelClippedScreened(this.shadesA[a],
this.isScreenedA,z(e),z(j),z(k)),this.diameter=b,1>=b)1==b&&this.line3d.plotLineDelta(this.colixA,this.isScreenedA,this.colixA,this.isScreenedA,this.xA,this.yA,this.zA,this.dxB,this.dyB,this.dzB,this.clipped);else{this.endcaps=d;this.calcArgbEndcap(!1,!0);this.generateBaseEllipsePrecisely(A);!A&&2==this.endcaps&&this.renderFlatEndcapPrecisely(!1);this.g3d.setZMargin(5);for(d=this.rasterCount;0<=--d;)this.plotRasterCone(d,v,A);this.g3d.setZMargin(0)}},"~N,~B,~N,~N,~N,~N,~N,~N,~N,~N,~B,~B");b(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 c=Math.sqrt(a),a=Math.sqrt(a+this.dzB*this.dzB);this.cosTheta=this.dzB/a;this.cosPhi=this.dxB/c;this.sinPhi=this.dyB/c}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)});b(c$,"generateBaseEllipsePrecisely",
function(a){this.tEvenDiameter=0==(this.diameter&1);this.radius=this.diameter/2;this.radius2=this.radius*this.radius;var c=this.dxBf*this.dxBf+this.dyBf*this.dyBf;if(0==c)this.cosPhi=this.cosTheta=1,this.sinPhi=0;else{var d=Math.sqrt(c),c=Math.sqrt(c+this.dzBf*this.dzBf);this.cosTheta=this.dzBf/c;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]=m(Math.floor(this.txRaster[a])),this.yRaster[a]=m(Math.floor(this.tyRaster[a])),this.zRaster[a]=m(Math.floor(this.tzRaster[a]))},"~B");b(c$,"calcRotatedPoint",function(a,c,d){this.tRaster[c]=a;a*=3.141592653589793;var b=Math.sin(a)*this.cosTheta,f=Math.cos(a);a=this.radius*(b*this.cosPhi-f*this.sinPhi);b=this.radius*(b*this.sinPhi+f*this.cosPhi);
f=this.radius2-(a*a+b*b);f=0<f?Math.sqrt(f):0;d?(this.txRaster[c]=a,this.tyRaster[c]=b,this.tzRaster[c]=f):(this.tEvenDiameter?(this.xRaster[c]=m(a-0.5),this.yRaster[c]=m(b-0.5)):(this.xRaster[c]=m(a),this.yRaster[c]=m(b)),this.zRaster[c]=m(f+0.5));this.fp8ShadeIndexUp[c]=this.shader.getShadeFp8(a,b,f)},"~N,~N,~B");b(c$,"interpolate",function(a,c){var d=this.xRaster[c]-this.xRaster[a];0>d&&(d=-d);var b=this.yRaster[c]-this.yRaster[a];0>b&&(b=-b);if(!(1>=d+b)){for(var d=this.tRaster[a],b=this.tRaster[c],
f=this.allocRaster(!1),g=4;0<=--g;){var h=(d+b)/2;this.calcRotatedPoint(h,f,!1);if(this.xRaster[f]==this.xRaster[a]&&this.yRaster[f]==this.yRaster[a])this.fp8ShadeIndexUp[a]=this.fp8ShadeIndexUp[a]+this.fp8ShadeIndexUp[f]>>>1,d=h;else if(this.xRaster[f]==this.xRaster[c]&&this.yRaster[f]==this.yRaster[c])this.fp8ShadeIndexUp[c]=this.fp8ShadeIndexUp[c]+this.fp8ShadeIndexUp[f]>>>1,b=h;else{this.interpolate(a,f);this.interpolate(f,c);return}}this.xRaster[f]=this.xRaster[a];this.yRaster[f]=this.yRaster[c]}},
"~N,~N");b(c$,"interpolatePrecisely",function(a,c){var d=m(Math.floor(this.txRaster[c]))-m(Math.floor(this.txRaster[a]));0>d&&(d=-d);var b=m(Math.floor(this.tyRaster[c]))-m(Math.floor(this.tyRaster[a]));0>b&&(b=-b);if(!(1>=d+b)){for(var d=this.tRaster[a],b=this.tRaster[c],f=this.allocRaster(!0),g=4;0<=--g;){var h=(d+b)/2;this.calcRotatedPoint(h,f,!0);if(m(Math.floor(this.txRaster[f]))==m(Math.floor(this.txRaster[a]))&&m(Math.floor(this.tyRaster[f]))==m(Math.floor(this.tyRaster[a])))this.fp8ShadeIndexUp[a]=
this.fp8ShadeIndexUp[a]+this.fp8ShadeIndexUp[f]>>>1,d=h;else if(m(Math.floor(this.txRaster[f]))==m(Math.floor(this.txRaster[c]))&&m(Math.floor(this.tyRaster[f]))==m(Math.floor(this.tyRaster[c])))this.fp8ShadeIndexUp[c]=this.fp8ShadeIndexUp[c]+this.fp8ShadeIndexUp[f]>>>1,b=h;else{this.interpolatePrecisely(a,f);this.interpolatePrecisely(f,c);return}}this.txRaster[f]=this.txRaster[a];this.tyRaster[f]=this.tyRaster[c]}},"~N,~N");b(c$,"plotRaster",function(a){var c=this.fp8ShadeIndexUp[a]>>8,d=c>>1,b=
this.xRaster[a],f=this.yRaster[a];a=this.zRaster[a];this.tEndcapOpen&&0!=this.argbEndcap&&(this.clipped?(this.g3d.plotPixelClippedArgb(this.argbEndcap,this.xEndcap+b,this.yEndcap+f,this.zEndcap-a-1),this.g3d.plotPixelClippedArgb(this.argbEndcap,this.xEndcap-b,this.yEndcap-f,this.zEndcap+a-1)):(this.g3d.plotPixelUnclippedArgb(this.argbEndcap,this.xEndcap+b,this.yEndcap+f,this.zEndcap-a-1),this.g3d.plotPixelUnclippedArgb(this.argbEndcap,this.xEndcap-b,this.yEndcap-f,this.zEndcap+a-1)));this.line3d.plotLineDeltaA(this.shadesA,
this.isScreenedA,this.shadesB,this.isScreenedB,c,this.xA+b,this.yA+f,this.zA-a,this.dxB,this.dyB,this.dzB,this.clipped);this.drawBackside&&this.line3d.plotLineDelta(this.shadesA[d],this.isScreenedA,this.shadesB[d],this.isScreenedB,this.xA-b,this.yA-f,this.zA+a,this.dxB,this.dyB,this.dzB,this.clipped)},"~N");b(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");b(c$,"findMinMaxY",function(){this.yMin=this.yMax=this.yRaster[0];for(var a=this.rasterCount;0<--a;){var c=this.yRaster[a];
c<this.yMin?this.yMin=c:c>this.yMax?this.yMax=c:(c=-c,c<this.yMin?this.yMin=c:c>this.yMax&&(this.yMax=c))}});b(c$,"findMinMaxX",function(a){this.xMin=2147483647;this.xMax=-2147483648;for(var c=this.rasterCount;0<=--c;){if(this.yRaster[c]==a){var d=this.xRaster[c];d<this.xMin&&(this.xMin=d,this.zXMin=this.zRaster[c]);d>this.xMax&&(this.xMax=d,this.zXMax=this.zRaster[c])}this.yRaster[c]==-a&&(d=-this.xRaster[c],d<this.xMin&&(this.xMin=d,this.zXMin=-this.zRaster[c]),d>this.xMax&&(this.xMax=d,this.zXMax=
-this.zRaster[c]))}},"~N");b(c$,"renderFlatEndcap",function(a){if(0!=this.dzB&&this.g3d.setColix(this.colixEndcap)){var c=this.xA,d=this.yA,b=this.zA;if(a&&0>this.dzB){if(4==this.endcaps)return;c+=this.dxB;d+=this.dyB;b+=this.dzB}this.findMinMaxY();for(a=this.yMin;a<=this.yMax;++a){this.findMinMaxX(a);var f=this.xMax-this.xMin+1;this.g3d.setColorNoisy(this.endcapShadeIndex);this.g3d.plotPixelsClippedRaster(f,c+this.xMin,d+a,b-this.zXMin-1,b-this.zXMax-1,null,null)}}},"~B");b(c$,"renderFlatEndcapPrecisely",
function(a){if(0!=this.dzBf&&this.g3d.setColix(this.colixEndcap)){var c=this.xAf,d=this.yAf,b=this.zAf;a&&0>this.dzBf&&(c+=this.dxBf,d+=this.dyBf,b+=this.dzBf);a=z(c);d=z(d);b=z(b);this.findMinMaxY();for(c=this.yMin;c<=this.yMax;++c){this.findMinMaxX(c);var f=this.xMax-this.xMin+1;this.g3d.setColorNoisy(this.endcapShadeIndex);this.g3d.plotPixelsClippedRaster(f,a+this.xMin,d+c,b-this.zXMin-1,b-this.zXMax-1,null,null)}}},"~B");b(c$,"renderSphericalEndcaps",function(){0!=this.colixA&&this.g3d.setColix(this.colixA)&&
this.g3d.fillSphereXYZ(this.diameter,this.xA,this.yA,this.zA+1);0!=this.colixB&&this.g3d.setColix(this.colixB)&&this.g3d.fillSphereXYZ(this.diameter,this.xA+this.dxB,this.yA+this.dyB,this.zA+this.dzB+1)});b(c$,"plotRasterCone",function(a,c,d){var b=this.txRaster[a],f=this.tyRaster[a],g=this.tzRaster[a],h=this.xAf+b,e=this.yAf+f,j=this.zAf-g,b=this.xAf-b,f=this.yAf-f,g=this.zAf+g,k=this.shadesA[0];this.tEndcapOpen&&0!=this.argbEndcap&&(this.g3d.plotPixelClippedScreened(this.argbEndcap,this.isScreenedA,
z(h),z(e),z(j)),this.g3d.plotPixelClippedScreened(this.argbEndcap,this.isScreenedA,z(b),z(f),z(g)));a=this.fp8ShadeIndexUp[a]>>8;0!=k&&(this.line3d.plotLineDeltaA(this.shadesA,this.isScreenedA,this.shadesA,this.isScreenedA,a,z(h),z(e),z(j),m(Math.ceil(this.xTip-h)),m(Math.ceil(this.yTip-e)),m(Math.ceil(this.zTip-j)),!0),c&&(this.line3d.plotLineDeltaA(this.shadesA,this.isScreenedA,this.shadesA,this.isScreenedA,a,z(h),z(e)+1,z(j),m(Math.ceil(this.xTip-h)),m(Math.ceil(this.yTip-e))+1,m(Math.ceil(this.zTip-
j)),!0),this.line3d.plotLineDeltaA(this.shadesA,this.isScreenedA,this.shadesA,this.isScreenedA,a,z(h)+1,z(e),z(j),m(Math.ceil(this.xTip-h))+1,m(Math.ceil(this.yTip-e)),m(Math.ceil(this.zTip-j)),!0)),!d&&!(2!=this.endcaps&&0<this.dzB)&&this.line3d.plotLineDelta(k,this.isScreenedA,k,this.isScreenedA,z(b),z(f),z(g),m(Math.ceil(this.xTip-b)),m(Math.ceil(this.yTip-f)),m(Math.ceil(this.zTip-g)),!0))},"~N,~B,~B");b(c$,"calcArgbEndcap",function(a,c){this.tEndcapOpen=!1;var d=c?this.dzBf:this.dzB;if(!(3==
this.endcaps||0==d)){this.xEndcap=this.xA;this.yEndcap=this.yA;this.zEndcap=this.zA;var b=c?this.dxBf:this.dxB,f=c?this.dyBf:this.dyB;0<=d||!a?(this.endcapShadeIndex=this.shader.getShadeIndex(-b,-f,d),this.colixEndcap=this.colixA,d=this.shadesA):(this.endcapShadeIndex=this.shader.getShadeIndex(b,f,-d),this.colixEndcap=this.colixB,d=this.shadesB,this.xEndcap+=this.dxB,this.yEndcap+=this.dyB,this.zEndcap+=this.dzB);this.endcapShadeIndex>J.util.Shader.shadeIndexNoisyLimit&&(this.endcapShadeIndex=J.util.Shader.shadeIndexNoisyLimit);
this.argbEndcap=d[this.endcapShadeIndex];this.tEndcapOpen=1==this.endcaps}},"~B,~B")});p("J.g3d");P(J.g3d,"G3DRenderer");p("J.g3d");q(["J.api.JmolRendererInterface","J.util.GData","JU.V3","J.util.Normix"],"J.g3d.Graphics3D","java.lang.NullPointerException java.util.Arrays javajs.awt.Font JU.AU J.api.Interface J.constant.EnumStereoMode J.g3d.CylinderRenderer $.ImageRenderer $.LineRenderer $.Pixelator $.PixelatorShaded $.Platform3D $.SphereRenderer $.TextRenderer $.TextSorter $.TextString J.util.C $.Shader".split(" "),
function(){c$=u(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.addAllPixels=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;t(this,arguments)},J.g3d,"Graphics3D",J.util.GData,J.api.JmolRendererInterface);N(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=T(J.g3d.Graphics3D.normixCount,0);this.shadeIndexes2Sided=T(J.g3d.Graphics3D.normixCount,0)});e(c$,"clear",function(){this.stringCount=0;this.strings=null;J.g3d.TextRenderer.clearFontCache()});e(c$,"destroy",function(){this.releaseBuffers();this.graphicsForMetrics=this.platform=null});e(c$,"getGData",function(){return this});b(c$,"setZMargin",function(a){this.zMargin=
a},"~N");w(c$,function(){R(this,J.g3d.Graphics3D,[])});e(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");e(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");b(c$,"getRenderer",function(a){return J.api.Interface.getOptionInterface("g3d."+a+"Renderer").set(this)},"~S");e(c$,"currentlyRendering",function(){return this.$currentlyRendering});e(c$,"setWindowParameters",function(a,c,d){this.setWinParams(a,c,d);this.$currentlyRendering&&this.endRendering()},"~N,~N,~B");e(c$,"checkTranslucent",function(a){a&&
(this.$haveTranslucentObjects=!0);return!this.twoPass||this.twoPass&&this.$isPass2==a},"~B");e(c$,"beginRendering",function(a,c,d,b){this.$currentlyRendering&&this.endRendering();this.renderLow=b;if(this.windowWidth!=this.newWindowWidth||this.windowHeight!=this.newWindowHeight||this.newAntialiasing!=this.isFullSceneAntialiasingEnabled)this.windowWidth=this.newWindowWidth,this.windowHeight=this.newWindowHeight,this.isFullSceneAntialiasingEnabled=this.newAntialiasing,this.releaseBuffers();this.setRotationMatrix(a);
this.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=!c;this.addAllPixels=!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");e(c$,"setBackgroundTransparent",function(a){null!=this.platform&&this.platform.setBackgroundTransparent(a)},"~B");b(c$,"releaseBuffers",function(){this.aobuf=this.zbufT=this.pbufT=this.zbuf=this.pbuf=null;this.platform.releaseBuffers();this.line3d.clearLineCache()});e(c$,
"setPass2",function(a){if(!this.$haveTranslucentObjects||!this.$currentlyRendering)return!1;this.$isPass2=!0;this.colixCurrent=0;this.addAllPixels=!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");e(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=b(c$,"mergeBufferPixel",function(a,c,d,b){if(0!=d){var f=a[c];if(f!=d){0==f&&(f=b);b=f&16711935;var f=f&65280,g=d&16711935,h=d&65280;switch(d>>24&15){case 0:b=g;f=h;break;case 1:b=(g<<2)+(g<<1)+g+b>>3&16711935;f=(h<<2)+ +(h<<1)+h+f>>3&65280;break;case 2:b=(g<<1)+g+b>>2&16711935;f=(h<<1)+h+f>>2&65280;break;case 3:b=(g<<2)+g+(b<<1)+b>>3&16711935;f=(h<<2)+h+(f<<1)+f>>3&65280;break;case 4:b=b+g>>1&16711935;f=f+h>>
1&65280;break;case 5:b=(g<<1)+g+(b<<2)+b>>3&16711935;f=(h<<1)+h+(f<<2)+f>>3&65280;break;case 6:b=(b<<1)+b+g>>2&16711935;f=(f<<1)+f+h>>2&65280;break;case 7:b=(b<<2)+(b<<1)+b+g>>3&16711935,f=(f<<2)+(f<<1)+f+h>>3&65280}a[c]=4278190080|b|f}}},"~A,~N,~N,~N");e(c$,"getScreenImage",function(a){var c=this.platform.bufferedImage;a&&this.releaseBuffers();return c},"~B");e(c$,"applyAnaglygh",function(a,c){switch(a){case J.constant.EnumStereoMode.REDCYAN:this.applyCyanAnaglyph();break;case J.constant.EnumStereoMode.CUSTOM:this.applyCustomAnaglyph(c);
break;case J.constant.EnumStereoMode.REDBLUE:this.applyBlueAnaglyph();break;case J.constant.EnumStereoMode.REDGREEN:this.applyGreenAnaglyph()}},"J.constant.EnumStereoMode,~A");e(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=T(this.anaglyphLength,0);for(var a=this.anaglyphLength;0<=
--a;)this.anaglyphChannelBytes[a]=this.pbuf[a]});b(c$,"applyCustomAnaglyph",function(a){var c=a[0];a=a[1]&16777215;for(var d=this.anaglyphLength;0<=--d;){var b=this.anaglyphChannelBytes[d]&255,b=(b|(b|b<<8)<<8)&a;this.pbuf[d]=this.pbuf[d]&c|b}},"~A");b(c$,"applyGreenAnaglyph",function(){for(var a=this.anaglyphLength;0<=--a;)this.pbuf[a]=this.pbuf[a]&4294901760|(this.anaglyphChannelBytes[a]&255)<<8});b(c$,"applyBlueAnaglyph",function(){for(var a=this.anaglyphLength;0<=--a;)this.pbuf[a]=this.pbuf[a]&
4294901760|this.anaglyphChannelBytes[a]&255});b(c$,"applyCyanAnaglyph",function(){for(var a=this.anaglyphLength;0<=--a;){var c=this.anaglyphChannelBytes[a]&255;this.pbuf[a]=this.pbuf[a]&4294901760|c<<8|c}});e(c$,"releaseScreenImage",function(){this.platform.clearScreenBufferThreaded()});e(c$,"haveTranslucentObjects",function(){return this.$haveTranslucentObjects});b(c$,"setTempZSlab",function(a){this.zSlab=a},"~N");e(c$,"setZShade",function(a,c,d,b){a?(this.setZShade2(c,d,b),this.pixel=new J.g3d.PixelatorShaded(this)):
this.pixel=new J.g3d.Pixelator(this)},"~B,~N,~N,~N");b(c$,"downsampleFullSceneAntialiasing",function(a){var c=this.width,d=0,b=0,f=this.bgcolor;a&&(f+=255==(f&255)?-1:1);for(var g=this.pbuf.length;0<=--g;)0==this.pbuf[g]&&(this.pbuf[g]=f);f&=16777215;for(g=this.windowHeight;0<=--g;b+=c)for(var h=this.windowWidth;0<=--h;++d){var e=(this.pbuf[b]>>2&1061109567)+(this.pbuf[b++ +c]>>2&1061109567)+(this.pbuf[b]>>2&1061109567)+(this.pbuf[b++ +c]>>2&1061109567),e=e+((e&3233857728)>>6);this.pbuf[d]=e&16777215|
4278190080}if(a){d=b=0;for(g=this.windowHeight;0<=--g;b+=c)for(h=this.windowWidth;0<=--h;++d,++b)a=Math.min(this.zbuf[b],this.zbuf[b+c]),a=Math.min(a,this.zbuf[++b]),a=Math.min(a,this.zbuf[b+c]),2147483647!=a&&(a>>=1),this.zbuf[d]=this.pbuf[d]==f?2147483647:a;this.antialiasThisFrame=!1;this.setWidthHeight(!1)}},"~B");b(c$,"hasContent",function(){return this.platform.hasContent()});e(c$,"setColor",function(a){this.argbCurrent=this.argbNoisyUp=this.argbNoisyDn=a},"~N");e(c$,"setColix",function(a){var c=
J.util.C.isColixLastAvailable(a);if(!c&&a==this.colixCurrent&&-1==this.currentShadeIndex)return!0;var d=a&30720;if(16384==d)return!1;this.renderLow&&(d=0);var b=0!=d;this.isScreened=b&&30720==d;if(!this.checkTranslucent(b&&!this.isScreened))return!1;this.addAllPixels=this.$isPass2||!b;this.$isPass2?(this.translucencyMask=d<<13|16777215,this.translucencyLog=d>>11):this.translucencyLog=0;this.colixCurrent=a;c&&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");b(c$,"addPixel",function(a,c,d){this.pixel.addPixel(a,c,d)},"~N,~N,~N");b(c$,"clearPixel",function(a,c){this.pixel.clearPixel(a,c)},"~N,~N");e(c$,"drawFilledCircle",function(a,c,d,b,f,g){if(!this.isClippedZ(g)){var h=m((d+1)/2),h=b<h||b+h>=this.width||f<h||f+h>=this.height;if(!h||
!this.isClippedXY(d,b,f))0!=a&&this.setColix(a)&&(h?this.circle3d.plotCircleCenteredClipped(b,f,g,d):this.circle3d.plotCircleCenteredUnclipped(b,f,g,d)),0!=c&&this.setColix(c)&&(h?this.circle3d.plotFilledCircleCenteredClipped(b,f,g,d):this.circle3d.plotFilledCircleCenteredUnclipped(b,f,g,d))}},"~N,~N,~N,~N,~N,~N");e(c$,"volumeRender4",function(a,c,d,b){if(1==a)this.plotPixelClippedXYZ(c,d,b);else if(!this.isClippedZ(b)){var f=m((a+1)/2),f=c<f||c+f>=this.width||d<f||d+f>=this.height;if(!f||!this.isClippedXY(a,
c,d))f?this.circle3d.plotFilledCircleCenteredClipped(c,d,b,a):this.circle3d.plotFilledCircleCenteredUnclipped(c,d,b,a)}},"~N,~N,~N,~N");e(c$,"fillSphereXYZ",function(a,c,d,b){switch(a){case 1:this.plotPixelClippedArgb(this.argbCurrent,c,d,b);return;case 0:return}a<=(this.antialiasThisFrame?2E3:1E3)&&this.sphere3d.render(this.shadesCurrent,!this.addAllPixels,a,c,d,b,null,null,null,-1,null,this.addAllPixels)},"~N,~N,~N,~N");e(c$,"volumeRender",function(a){a?(this.saveAmbient=this.shader.ambientPercent,
this.saveDiffuse=this.shader.diffusePercent,this.setAmbientPercent(100),this.setDiffusePercent(0)):(this.setAmbientPercent(this.saveAmbient),this.setDiffusePercent(this.saveDiffuse))},"~B");e(c$,"fillSphereI",function(a,c){this.fillSphereXYZ(a,c.x,c.y,c.z)},"~N,JU.P3i");e(c$,"fillSphere",function(a,c){this.fillSphereXYZ(a,Math.round(c.x),Math.round(c.y),Math.round(c.z))},"~N,JU.P3");e(c$,"fillEllipsoid",function(a,c,d,b,f,g,h,e,j,k,v){switch(g){case 1:this.plotPixelClippedArgb(this.argbCurrent,d,
b,f);return;case 0:return}g<=(this.antialiasThisFrame?2E3:1E3)&&this.sphere3d.render(this.shadesCurrent,!this.addAllPixels,g,d,b,f,h,e,j,k,v,this.addAllPixels)},"JU.P3,~A,~N,~N,~N,~N,JU.M3,~A,JU.M4,~N,~A");e(c$,"drawRect",function(a,c,d,b,f,g){if(!(0!=b&&this.isClippedZ(b))){b=f-1;g-=1;f=a+b;var h=c+g;0<=c&&c<this.height&&this.drawHLine(a,c,d,b);0<=h&&h<this.height&&this.drawHLine(a,h,d,b);0<=a&&a<this.width&&this.drawVLine(a,c,d,g);0<=f&&f<this.width&&this.drawVLine(f,c,d,g)}},"~N,~N,~N,~N,~N,~N");
b(c$,"drawHLine",function(a,c,d,b){0>b&&(a+=b,b=-b);0>a&&(b+=a,a=0);a+b>=this.width&&(b=this.width-1-a);var f=a+this.width*c;if(this.addAllPixels)for(a=0;a<=b;a++)d<this.zbuf[f]&&this.addPixel(f,d,this.argbCurrent),f++;else{c=0!=((a^c)&1);for(a=0;a<=b;a++)(c=!c)&&d<this.zbuf[f]&&this.addPixel(f,d,this.argbCurrent),f++}},"~N,~N,~N,~N");b(c$,"drawVLine",function(a,c,d,b){0>b&&(c+=b,b=-b);0>c&&(b+=c,c=0);c+b>=this.height&&(b=this.height-1-c);var f=a+this.width*c;if(this.addAllPixels)for(a=0;a<=b;a++)d<
this.zbuf[f]&&this.addPixel(f,d,this.argbCurrent),f+=this.width;else{c=0!=((a^c)&1);for(a=0;a<=b;a++)(c=!c)&&d<this.zbuf[f]&&this.addPixel(f,d,this.argbCurrent),f+=this.width}},"~N,~N,~N,~N");e(c$,"fillRect",function(a,c,d,b,f,g){if(!this.isClippedZ(b)){if(0>a){f+=a;if(0>=f)return;a=0}if(a+f>this.width&&(f=this.width-a,0>=f))return;if(0>c){g+=c;if(0>=g)return;c=0}for(c+g>this.height&&(g=this.height-c);0<=--g;)this.plotPixelsUnclippedCount(f,a,c++,d)}},"~N,~N,~N,~N,~N,~N");e(c$,"drawString",function(a,
c,d,b,f,g,h){this.currentShadeIndex=0;null!=a&&(this.isClippedZ(g)||this.drawStringNoSlab(a,c,d,b,f,h))},"~S,javajs.awt.Font,~N,~N,~N,~N,~N");e(c$,"drawStringNoSlab",function(a,c,d,b,f,g){if(null!=a){null==this.strings&&(this.strings=Array(10));this.stringCount==this.strings.length&&(this.strings=JU.AU.doubleLength(this.strings));var h=new J.g3d.TextString;h.setText(a,null==c?this.currentFont:this.currentFont=c,this.argbCurrent,J.util.C.isColixTranslucent(g)?this.getColorArgbOrGray(g)&16777215|(g&
30720)<<13:0,d,b,f);this.strings[this.stringCount++]=h}},"~S,javajs.awt.Font,~N,~N,~N,~N");e(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 c=0;c<this.stringCount;c++){var d=this.strings[c];this.plotText(d.x,d.y,d.z,d.argb,d.bgargb,d.text,d.font,a)}this.strings=null;this.stringCount=0}},"~O");e(c$,"plotText",function(a,c,d,b,f,
g,h,e){J.g3d.TextRenderer.plot(a,c,d,b,f,g,h,this,e,this.antialiasThisFrame)},"~N,~N,~N,~N,~N,~S,javajs.awt.Font,J.api.JmolRendererInterface");e(c$,"drawImage",function(a,c,d,b,f,g,h,e){null==a||(0==h||0==e||this.isClippedZ(f))||this.plotImage(c,d,b,a,null,g,h,e)},"~O,~N,~N,~N,~N,~N,~N,~N");b(c$,"plotImage",function(a,c,d,b,f,g,h,e){this.setColix(g);this.$isPass2||(this.translucencyMask=-1);0==g&&(this.argbCurrent=0);J.g3d.ImageRenderer.plotImage(a,c,d,b,this,f,this.antialiasThisFrame,this.argbCurrent,
h,e)},"~N,~N,~N,~O,J.api.JmolRendererInterface,~N,~N,~N");e(c$,"setFontFid",function(a){this.currentFont=javajs.awt.Font.getFont3D(a)},"~N");e(c$,"setFont",function(a){this.currentFont=a},"javajs.awt.Font");e(c$,"getFont3DCurrent",function(){return this.currentFont});e(c$,"drawPixel",function(a,c,d){this.plotPixelClippedXYZ(a,c,d)},"~N,~N,~N");e(c$,"drawPoints",function(a,c,d){if(1<d)for(var b=0.8*d*d,f=-d;f<d;f++)for(var g=-d;g<d;g++)f*f+g*g>b||(this.plotPoints(a,c,f,g),this.plotPoints(a,c,f,g));
else this.plotPoints(a,c,0,0)},"~N,~A,~N");e(c$,"drawDashedLine",function(a,c,d,b){this.line3d.plotDashedLine(this.argbCurrent,!this.addAllPixels,a,c,d.x,d.y,d.z,b.x,b.y,b.z,!0)},"~N,~N,JU.P3i,JU.P3i");e(c$,"drawDottedLine",function(a,c){this.line3d.plotDashedLine(this.argbCurrent,!this.addAllPixels,2,1,a.x,a.y,a.z,c.x,c.y,c.z,!0)},"JU.P3i,JU.P3i");e(c$,"drawLineXYZ",function(a,c,d,b,f,g){this.line3d.plotLine(this.argbCurrent,!this.addAllPixels,this.argbCurrent,!this.addAllPixels,a,c,d,b,f,g,!0)},
"~N,~N,~N,~N,~N,~N");e(c$,"drawLine",function(a,c,d,b,f,g,h,e){this.setColix(a)||(a=0);var j=!this.addAllPixels,k=this.argbCurrent;this.setColix(c)||(c=0);0==a&&0==c||this.line3d.plotLine(k,j,this.argbCurrent,!this.addAllPixels,d,b,f,g,h,e,!0)},"~N,~N,~N,~N,~N,~N,~N,~N");e(c$,"drawLineAB",function(a,c){this.line3d.plotLine(this.argbCurrent,!this.addAllPixels,this.argbCurrent,!this.addAllPixels,a.x,a.y,a.z,c.x,c.y,c.z,!0)},"JU.P3i,JU.P3i");e(c$,"fillCylinderXYZ",function(a,c,d,b,f,g,h,e,j,k){this.setColix(a)||
(a=0);var v=!this.addAllPixels;this.setColix(c)||(c=0);0==a&&0==c||this.cylinder3d.render(a,c,v,!this.addAllPixels,d,b,f,g,h,e,j,k)},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");e(c$,"fillCylinderScreen",function(a,c,d,b,f,g,h,e){this.cylinder3d.render(this.colixCurrent,this.colixCurrent,!this.addAllPixels,!this.addAllPixels,a,c,d,b,f,g,h,e)},"~N,~N,~N,~N,~N,~N,~N,~N");e(c$,"fillCylinderScreen3I",function(a,c,d,b){this.cylinder3d.render(this.colixCurrent,this.colixCurrent,!this.addAllPixels,!this.addAllPixels,
a,c,d.x,d.y,d.z,b.x,b.y,b.z)},"~N,~N,JU.P3i,JU.P3i,JU.P3,JU.P3,~N");e(c$,"fillCylinder",function(a,c,d,b){this.cylinder3d.render(this.colixCurrent,this.colixCurrent,!this.addAllPixels,!this.addAllPixels,a,c,d.x,d.y,d.z,b.x,b.y,b.z)},"~N,~N,JU.P3i,JU.P3i");e(c$,"fillCylinderBits",function(a,c,d,b){this.cylinder3d.renderBits(this.colixCurrent,this.colixCurrent,!this.addAllPixels,!this.addAllPixels,a,c,d.x,d.y,d.z,b.x,b.y,b.z)},"~N,~N,JU.P3,JU.P3");e(c$,"fillConeScreen",function(a,c,d,b,f){this.cylinder3d.renderCone(this.colixCurrent,
!this.addAllPixels,a,c,d.x,d.y,d.z,b.x,b.y,b.z,!1,f)},"~N,~N,JU.P3i,JU.P3i,~B");e(c$,"fillConeSceen3f",function(a,c,d,b){this.cylinder3d.renderCone(this.colixCurrent,!this.addAllPixels,a,c,d.x,d.y,d.z,b.x,b.y,b.z,!0,!1)},"~N,~N,JU.P3,JU.P3");e(c$,"drawHermite4",function(a,c,d,b,f){this.hermite3d.renderHermiteRope(!1,a,0,0,0,c,d,b,f)},"~N,JU.P3i,JU.P3i,JU.P3i,JU.P3i");e(c$,"drawHermite7",function(a,c,d,b,f,g,h,e,j,k,v,A,m){if(0==m)this.hermite3d.renderHermiteRibbon(a,c,d,b,f,g,h,e,j,k,v,A,0);else{this.hermite3d.renderHermiteRibbon(a,
c,d,b,f,g,h,e,j,k,v,A,1);var x=this.colixCurrent;this.setColix(m);this.hermite3d.renderHermiteRibbon(a,c,d,b,f,g,h,e,j,k,v,A,-1);this.setColix(x)}},"~B,~B,~N,JU.P3i,JU.P3i,JU.P3i,JU.P3i,JU.P3i,JU.P3i,JU.P3i,JU.P3i,~N,~N");e(c$,"fillHermite",function(a,c,d,b,f,g,h,e){this.hermite3d.renderHermiteRope(!0,a,c,d,b,f,g,h,e)},"~N,~N,~N,~N,JU.P3i,JU.P3i,JU.P3i,JU.P3i");e(c$,"drawTriangle3C",function(a,c,d,b,f,g,h){1==(h&1)&&this.drawLine(c,b,a.x,a.y,a.z,d.x,d.y,d.z);2==(h&2)&&this.drawLine(b,g,d.x,d.y,d.z,
f.x,f.y,f.z);4==(h&4)&&this.drawLine(c,g,a.x,a.y,a.z,f.x,f.y,f.z)},"JU.P3i,~N,JU.P3i,~N,JU.P3i,~N,~N");e(c$,"drawTriangle3I",function(a,c,d,b){1==(b&1)&&this.line3d.plotLine(this.argbCurrent,!this.addAllPixels,this.argbCurrent,!this.addAllPixels,a.x,a.y,a.z,c.x,c.y,c.z,!0);2==(b&2)&&this.line3d.plotLine(this.argbCurrent,!this.addAllPixels,this.argbCurrent,!this.addAllPixels,c.x,c.y,c.z,d.x,d.y,d.z,!0);4==(b&4)&&this.line3d.plotLine(this.argbCurrent,!this.addAllPixels,this.argbCurrent,!this.addAllPixels,
a.x,a.y,a.z,d.x,d.y,d.z,!0)},"JU.P3i,JU.P3i,JU.P3i,~N");e(c$,"fillTriangleTwoSided",function(a,c,d,b,f,g,h,e,j,k){this.setColorNoisy(this.getShadeIndex(a));this.triangle3d.fillTriangleXYZ(c,d,b,f,g,h,e,j,k,!1)},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");e(c$,"fillTriangle3f",function(a,c,d,b){var f=this.getShadeIndexP3(a,c,d);b?this.setColorNoisy(f):this.setColor(this.shadesCurrent[f]);this.triangle3d.fillTriangleP3f(a,c,d,!1)},"JU.P3,JU.P3,JU.P3,~B");e(c$,"fillTriangle3i",function(a,c,d){this.triangle3d.fillTriangleP3i(a,
c,d,!1)},"JU.P3i,JU.P3i,JU.P3i,JU.P3,JU.P3,JU.P3");e(c$,"fillTriangle",function(a,c,d,b,f,g,h,e,j,k){if(!this.$isPass2&&d==g&&d==j&&c==f&&c==e)this.setTriangleColixAndShadeIndex(c,this.getShadeIndex(d)),c=!1;else{if(!this.setTriangleTranslucency(c,f,e))return;this.triangle3d.setGouraud(this.getShades(c)[this.getShadeIndex(d)],this.getShades(f)[this.getShadeIndex(g)],this.getShades(e)[this.getShadeIndex(j)]);c=!0}this.triangle3d.fillTriangleP3if(a,b,h,k,c)},"JU.P3i,~N,~N,JU.P3i,~N,~N,JU.P3i,~N,~N,~N");
e(c$,"fillTriangle3CN",function(a,c,d,b,f,g,h,e,j){if(!this.$isPass2&&d==g&&d==j&&c==f&&c==e)this.setTriangleColixAndShadeIndex(c,this.getShadeIndex(d)),c=!1;else{if(!this.setTriangleTranslucency(c,f,e))return;this.triangle3d.setGouraud(this.getShades(c)[this.getShadeIndex(d)],this.getShades(f)[this.getShadeIndex(g)],this.getShades(e)[this.getShadeIndex(j)]);c=!0}this.triangle3d.fillTriangleP3i(a,b,h,c)},"JU.P3i,~N,~N,JU.P3i,~N,~N,JU.P3i,~N,~N");b(c$,"setTriangleColixAndShadeIndex",function(a,c){a==
this.colixCurrent&&this.currentShadeIndex==c||(this.currentShadeIndex=-1,this.setColix(a),this.setColorNoisy(c))},"~N,~N");b(c$,"setTriangleTranslucency",function(a,c,d){if(!this.$isPass2)return!0;a&=14336;c&=14336;d&=14336;this.translucencyMask=(J.util.GData.roundInt(m((a+c+d)/3))&30720)<<13|16777215;return!0},"~N,~N,~N");e(c$,"drawQuadrilateral",function(a,c,d,b,f){this.setColix(a);this.drawLineAB(c,d);this.drawLineAB(d,b);this.drawLineAB(b,f);this.drawLineAB(f,c)},"~N,JU.P3i,JU.P3i,JU.P3i,JU.P3i");
e(c$,"fillQuadrilateral",function(a,c,d,b){this.setColorNoisy(this.getShadeIndexP3(a,c,d));this.triangle3d.fillTriangleP3f(a,c,d,!1);this.triangle3d.fillTriangleP3f(a,d,b,!1)},"JU.P3,JU.P3,JU.P3,JU.P3");e(c$,"fillQuadrilateral3i",function(a,c,d,b,f,g,h,e,j,k,v,A){this.fillTriangle3CN(a,c,d,b,f,g,h,e,j);this.fillTriangle3CN(a,c,d,h,e,j,k,v,A)},"JU.P3i,~N,~N,JU.P3i,~N,~N,JU.P3i,~N,~N,JU.P3i,~N,~N");e(c$,"drawSurface",function(){},"J.util.MeshSurface,~N");b(c$,"plotPixelClippedXYZ",function(a,c,d){this.isClipped3(a,
c,d)||(a=c*this.width+a,d<this.zbuf[a]&&this.addPixel(a,d,this.argbCurrent))},"~N,~N,~N");e(c$,"plotPixelClippedP3i",function(a){this.plotPixelClippedXYZ(a.x,a.y,a.z)},"JU.P3i");b(c$,"plotPixelClippedArgb",function(a,c,d,b){this.isClipped3(c,d,b)||(c=d*this.width+c,b<this.zbuf[c]&&this.addPixel(c,b,a))},"~N,~N,~N,~N");e(c$,"plotImagePixel",function(a,c,d,b,f,g){this.isClipped(c,d)||(c=d*this.width+c,b<this.zbuf[c]&&this.shadeTextPixel(c,b,a,g,f))},"~N,~N,~N,~N,~N,~N");b(c$,"plotPixelClippedScreened",
function(a,c,d,b,f){!this.isClipped3(d,b,f)&&!(c&&0!=((d^b)&1))&&(c=b*this.width+d,f<this.zbuf[c]&&this.addPixel(c,f,a))},"~N,~B,~N,~N,~N");b(c$,"plotPixelUnclipped",function(a,c,d){a=c*this.width+a;d<this.zbuf[a]&&this.addPixel(a,d,this.argbCurrent)},"~N,~N,~N");b(c$,"plotPixelUnclippedArgb",function(a,c,d,b){c=d*this.width+c;b<this.zbuf[c]&&this.addPixel(c,b,a)},"~N,~N,~N,~N");b(c$,"plotPixelsClipped",function(a,c,d,b){if(!(0>d||d>=this.height||c>=this.width))if(0>c&&(a+=c,c=0),a+c>this.width&&
(a=this.width-c),!(0>=a)){var f=d*this.width+c;a=f+a;var g=1;this.addAllPixels||(g=2,0!=((c^d)&1)&&++f);for(;f<a;)b<this.zbuf[f]&&this.addPixel(f,b,this.argbCurrent),f+=g}},"~N,~N,~N,~N");b(c$,"plotPixelsClippedRaster",function(a,c,d,b,f,g,h){if(!(0>=a||0>d||d>=this.height||c>=this.width||b<this.slab&&f<this.slab||b>this.depth&&f>this.depth)){var e=(c<<16)+(d<<1)^858993459,j=(b<<10)+512;b=f-b;f=m(a/2);b=J.util.GData.roundInt(m(((b<<10)+(0<=b?f:-f))/a));if(0>c){c=-c;j+=b*c;a-=c;if(0>=a)return;c=0}a+
c>this.width&&(a=this.width-c);f=0!=((c^d)&1);c=d*this.width+c;if(null==g)for(;0<=--a;){if(this.addAllPixels||!0==(f=!f))h=j>>10,h>=this.slab&&(h<=this.depth&&h<this.zbuf[c])&&(e=(e<<16)+(e<<1)+e&2147483647,g=e>>16&7,this.addPixel(c,h,0==g?this.argbNoisyDn:1==g?this.argbNoisyUp:this.argbCurrent));++c;j+=b}else{e=g.rScaled<<8;d=m((h.rScaled-g.rScaled<<8)/a);var k=g.gScaled,v=m((h.gScaled-k)/a);g=g.bScaled;for(var A=m((h.bScaled-g)/a);0<=--a;){if(this.addAllPixels||(f=!f))h=j>>10,h>=this.slab&&(h<=
this.depth&&h<this.zbuf[c])&&this.addPixel(c,h,4278190080|e&16711680|k&65280|g>>8&255);++c;j+=b;e+=d;k+=v;g+=A}}}},"~N,~N,~N,~N,~N,J.util.Rgb16,J.util.Rgb16");b(c$,"plotPixelsUnclippedRaster",function(a,c,d,b,f,g,h){if(!(0>=a)){var e=((c<<16)+(d<<1)^858993459)&2147483647,j=0!=((c^d)&1),k=(b<<10)+512;b=f-b;f=m(a/2);b=J.util.GData.roundInt(m(((b<<10)+(0<=b?f:-f))/a));c=d*this.width+c;if(null==g)for(;0<=--a;){if(this.addAllPixels||(j=!j))h=k>>10,h<this.zbuf[c]&&(e=(e<<16)+(e<<1)+e&2147483647,g=e>>16&
7,this.addPixel(c,h,0==g?this.argbNoisyDn:1==g?this.argbNoisyUp:this.argbCurrent));++c;k+=b}else{e=g.rScaled<<8;d=J.util.GData.roundInt(m((h.rScaled-g.rScaled<<8)/a));f=g.gScaled;var v=J.util.GData.roundInt(m((h.gScaled-f)/a));g=g.bScaled;for(var A=J.util.GData.roundInt(m((h.bScaled-g)/a));0<=--a;){if(this.addAllPixels||(j=!j))h=k>>10,h<this.zbuf[c]&&this.addPixel(c,h,4278190080|e&16711680|f&65280|g>>8&255);++c;k+=b;e+=d;f+=v;g+=A}}}},"~N,~N,~N,~N,~N,J.util.Rgb16,J.util.Rgb16");b(c$,"plotPixelsUnclippedCount",
function(a,c,d,b){var f=d*this.width+c;if(this.addAllPixels)for(;0<=--a;)b<this.zbuf[f]&&this.addPixel(f,b,this.argbCurrent),++f;else if(a=f+a,!(0!=((c^d)&1)&&++f==a)){do b<this.zbuf[f]&&this.addPixel(f,b,this.argbCurrent),f+=2;while(f<a)}},"~N,~N,~N,~N");b(c$,"plotPoints",function(a,c,d,b){for(a*=3;0<a;){var f=c[--a],g=c[--a]+b,h=c[--a]+d;if(!this.isClipped3(h,g,f)){var e=g*this.width+h++;f<this.zbuf[e]&&this.addPixel(e,f,this.argbCurrent);this.antialiasThisFrame&&(e=g*this.width+h,!this.isClipped3(h,
g,f)&&f<this.zbuf[e]&&this.addPixel(e,f,this.argbCurrent),e=++g*this.width+h,!this.isClipped3(h,g,f)&&f<this.zbuf[e]&&this.addPixel(e,f,this.argbCurrent),e=g*this.width+--h,!this.isClipped3(h,g,f)&&f<this.zbuf[e]&&this.addPixel(e,f,this.argbCurrent))}}},"~N,~A,~N,~N");b(c$,"setColorNoisy",function(a){this.currentShadeIndex=a;this.argbCurrent=this.shadesCurrent[a];this.argbNoisyUp=this.shadesCurrent[a<J.util.Shader.shadeIndexLast?a+1:J.util.Shader.shadeIndexLast];this.argbNoisyDn=this.shadesCurrent[0<
a?a-1:0]},"~N");e(c$,"setNoisySurfaceShade",function(a,c,d){this.vectorAB.set(c.x-a.x,c.y-a.y,c.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));a>J.util.Shader.shadeIndexNoisyLimit&&(a=J.util.Shader.shadeIndexNoisyLimit);
this.setColorNoisy(a)},"JU.P3i,JU.P3i,JU.P3i");b(c$,"getShadeIndexP3",function(a,c,d){this.vectorAB.sub2(c,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");e(c$,"renderBackground",function(a){null!=this.backgroundImage&&this.plotImage(-2147483648,
0,-2147483648,this.backgroundImage,a,0,0,0)},"J.api.JmolRendererInterface");e(c$,"drawAtom",function(a){this.fillSphereXYZ(a.sD,a.sX,a.sY,a.sZ)},"J.modelset.Atom");e(c$,"getExportType",function(){return 0});e(c$,"getExportName",function(){return null});b(c$,"canDoTriangles",function(){return!0});b(c$,"isCartesianExport",function(){return!1});e(c$,"initializeExporter",function(){return null},"J.viewer.Viewer,~N,J.util.GData,java.util.Map");e(c$,"finalizeOutput",function(){return null});e(c$,"drawBond",
function(){},"JU.P3,JU.P3,~N,~N,~N,~N,~N");e(c$,"drawEllipse",function(){return!1},"JU.P3,JU.P3,JU.P3,~B,~B");b(c$,"getPrivateKey",function(){return 0});e(c$,"clearFontCache",function(){J.g3d.TextRenderer.clearFontCache()});e(c$,"getTransformedVertexVectors",function(){return this.transformedVectors});e(c$,"isDirectedTowardsCamera",function(a){return 0>a||0<this.transformedVectors[a].z},"~N");b(c$,"setRotationMatrix",function(a){for(var c=J.util.Normix.getVertexVectors(),d=J.g3d.Graphics3D.normixCount;0<=
--d;){var b=this.transformedVectors[d];a.transform2(c[d],b);this.shadeIndexes[d]=this.shader.getShadeB(b.x,-b.y,b.z);this.shadeIndexes2Sided[d]=0<=b.z?this.shadeIndexes[d]:this.shader.getShadeB(-b.x,b.y,-b.z)}},"JU.M3");b(c$,"getShadeIndex",function(a){return-1E4==a||9999==a?J.g3d.Graphics3D.nullShadeIndex:0>a?this.shadeIndexes2Sided[~a]:this.shadeIndexes[a]},"~N");e(c$,"renderCrossHairs",function(a,c,d,b,f){c=this.isAntialiased();this.setColix(0>f?10:100<f?11:23);f=Math.max(Math.min(this.width,Math.round(b.x)),
0);d=Math.max(Math.min(this.height,Math.round(b.y)),0);var g=Math.round(b.z)+1,h=c?8:4,e=c?20:10;c=c?2:1;this.drawRect(f-h,d,g,0,e,c);this.drawRect(f,d-h,g,0,c,e);this.drawRect(f-h,d-h,g,0,e,e);h=e;e>>=1;this.setColix(a[1]<b.x?21:11);this.drawRect(f-h,d,g,0,e,c);this.setColix(a[0]>b.x?21:11);this.drawRect(f+e,d,g,0,e,c);this.setColix(a[3]<b.y?21:11);this.drawRect(f,d-h,g,0,c,e);this.setColix(a[2]>b.y?21:11);this.drawRect(f,d+e,g,0,c,e)},"~A,~N,~N,JU.P3,~N");e(c$,"initializeOutput",function(){return!1},
"J.viewer.Viewer,~N,J.util.GData,java.util.Map");b(c$,"shadeTextPixel",function(a,c,d,b,f){switch(f){case 8:this.addPixel(a,c,d);return}0!=b&&J.g3d.Graphics3D.mergeBufferPixel(this.pbuf,a,b,this.bgcolor);f+=this.translucencyLog;7<f||(J.g3d.Graphics3D.mergeBufferPixel(this.pbuf,a,d&16777215|f<<24,this.bgcolor),this.zbuf[a]=c)},"~N,~N,~N,~N,~N");B(c$,"sort",null);c$.normixCount=c$.prototype.normixCount=J.util.Normix.getNormixCount();B(c$,"nullShadeIndex",50)});p("J.g3d");c$=G(J.g3d,"ImageRenderer");
c$.plotImage=b(c$,"plotImage",function(a,c,d,b,f,g,h,e,j,k){e=(h=-2147483648==a)?f.bgcolor:e;h&&(a=0,d=2147483646,j=f.width,k=f.height);0>=a+j||(a>=f.width||0>=c+k||c>=f.height)||(b=f.apiPlatform.drawImageToBuffer(null,f.platform.offscreenImage,b,j,k,h?e:0),null!=b&&(null!=g||0>a||a+j>f.width||0>c||c+k>f.height?J.g3d.ImageRenderer.plotImageClipped(a,c,d,f,g,j,k,b,e):J.g3d.ImageRenderer.plotImageUnClipped(a,c,d,f,j,k,b,e)))},"~N,~N,~N,~O,J.g3d.Graphics3D,J.api.JmolRendererInterface,~B,~N,~N,~N");c$.plotImageClipped=
b(c$,"plotImageClipped",function(a,c,d,b,f,g,h,e,j){null==f&&(f=b);for(var k=b=0;b<h;b++)for(var v=0;v<g;v++){var A=e[k++];f.plotImagePixel(A,a+v,c+b,d,8,j)}},"~N,~N,~N,J.g3d.Graphics3D,J.api.JmolRendererInterface,~N,~N,~A,~N");c$.plotImageUnClipped=b(c$,"plotImageUnClipped",function(a,c,d,b,f,g,h){var e=b.zbuf,j=b.width;a=c*j+a;for(var k=c=0,v=0;c<g;){for(;k<f;)d<e[a]&&b.addPixel(a,d,h[v]),++v,++k,++a;++c;k-=f;a+=j-f}},"~N,~N,~N,J.g3d.Graphics3D,~N,~N,~A,~N");p("J.g3d");q(["java.util.Hashtable"],
"J.g3d.LineRenderer",["java.lang.Float","J.util.BSUtil","$.Logger","$.Shader"],function(){c$=u(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;t(this,arguments)},J.g3d,"LineRenderer");N(c$,function(){this.lineCache=new java.util.Hashtable});w(c$,function(a){this.g3d=a;this.shader=a.shader},"J.g3d.Graphics3D");b(c$,"setLineBits",
function(a,c){this.slope=0!=a?c/a:0<=c?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=J.util.BSUtil.newBitSet(this.nBits);c=Math.abs(c);a=Math.abs(a);if(c>a){var d=a;a=c;c=d}for(var d=0,b=a+a,f=c+c,g=0;g<this.nBits;g++)d+=f,d>a&&(this.lineBits.set(g),d-=b);this.lineCache.put(this.slopeKey,this.lineBits);this.nCached++}},"~N,~N");b(c$,"clearLineCache",function(){this.lineCache.clear();
this.nCached=0});b(c$,"plotLine",function(a,c,d,b,f,g,h,e,j,k,v){this.x1t=f;this.x2t=e;this.y1t=g;this.y2t=j;this.z1t=h;this.z2t=k;if(v)switch(this.getTrimmedLine()){case 0:v=!1;break;case 2:return}this.plotLineClipped(a,c,d,b,f,g,h,e-f,j-g,k-h,v,0,0)},"~N,~B,~N,~B,~N,~N,~N,~N,~N,~N,~B");b(c$,"plotLineDelta",function(a,c,d,b,f,g,h,e,j,k,v){this.x1t=f;this.x2t=f+e;this.y1t=g;this.y2t=g+j;this.z1t=h;this.z2t=h+k;if(v)switch(this.getTrimmedLine()){case 2:return;case 0:v=!1}this.plotLineClipped(a,c,d,
b,f,g,h,e,j,k,v,0,0)},"~N,~B,~N,~B,~N,~N,~N,~N,~N,~N,~B");b(c$,"plotLineDeltaA",function(a,c,d,b,f,g,h,e,j,k,v,A){this.x1t=g;this.x2t=g+j;this.y1t=h;this.y2t=h+k;this.z1t=e;this.z2t=e+v;if(A)switch(this.getTrimmedLine()){case 2:return;case 0:A=!1}this.plotLineClippedA(a,c,d,b,f,g,h,e,j,k,v,A,0,0)},"~A,~B,~A,~B,~N,~N,~N,~N,~N,~N,~N,~B");b(c$,"plotLineDeltaBits",function(a,c,d,b,f,g,h,e,j,k,v,A){this.x1t=g;this.x2t=g+j;this.y1t=h;this.y2t=h+k;this.z1t=e;this.z2t=e+v;A&&2==this.getTrimmedLine()||this.plotLineClippedBits(a,
c,d,b,f,g,h,e,j,k,v,0,0)},"~A,~B,~A,~B,~N,~N,~N,~N,~N,~N,~N,~B");b(c$,"plotDashedLine",function(a,c,d,b,f,g,h,e,j,k,v){this.x1t=f;this.x2t=e;this.y1t=g;this.y2t=j;this.z1t=h;this.z2t=k;if(v)switch(this.getTrimmedLine()){case 2:return;case 0:v=!1}this.plotLineClipped(a,c,a,c,f,g,h,e-f,j-g,k-h,v,d,b)},"~N,~B,~N,~N,~N,~N,~N,~N,~N,~N,~B");b(c$,"getCachedLine",function(){this.slopeKey=Float.$valueOf(this.slope);if(!this.lineCache.containsKey(this.slopeKey))return!1;this.lineBits=this.lineCache.get(this.slopeKey);
J.util.Logger.debugging&&(this.nFound++,1E6==this.nFound&&J.util.Logger.debug("nCached/nFound lines: "+this.nCached+" "+this.nFound));return!0});b(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,c=this.g3d.yLast,d=this.g3d.slab,b=this.g3d.depth;do{if(0!=(this.cc1&this.cc2))return 2;var f=this.x2t-this.x1t,g=this.y2t-this.y1t,h=this.z2t-this.z1t;0!=
this.cc1?(0!=(this.cc1&8)?(this.y1t+=z(-this.x1t*g/f),this.z1t+=z(-this.x1t*h/f),this.x1t=0):0!=(this.cc1&4)?(this.y1t+=z((a-this.x1t)*g/f),this.z1t+=z((a-this.x1t)*h/f),this.x1t=a):0!=(this.cc1&2)?(this.x1t+=z(-this.y1t*f/g),this.z1t+=z(-this.y1t*h/g),this.y1t=0):0!=(this.cc1&1)?(this.x1t+=z((c-this.y1t)*f/g),this.z1t+=z((c-this.y1t)*h/g),this.y1t=c):0!=(this.cc1&32)?(this.x1t+=z((d-this.z1t)*f/h),this.y1t+=z((d-this.z1t)*g/h),this.z1t=d):(this.x1t+=z((b-this.z1t)*f/h),this.y1t+=z((b-this.z1t)*g/
h),this.z1t=b),this.cc1=this.g3d.clipCode3(this.x1t,this.y1t,this.z1t)):(0!=(this.cc2&8)?(this.y2t+=z(-this.x2t*g/f),this.z2t+=z(-this.x2t*h/f),this.x2t=0):0!=(this.cc2&4)?(this.y2t+=z((a-this.x2t)*g/f),this.z2t+=z((a-this.x2t)*h/f),this.x2t=a):0!=(this.cc2&2)?(this.x2t+=z(-this.y2t*f/g),this.z2t+=z(-this.y2t*h/g),this.y2t=0):0!=(this.cc2&1)?(this.x2t+=z((c-this.y2t)*f/g),this.z2t+=z((c-this.y2t)*h/g),this.y2t=c):0!=(this.cc2&32)?(this.x2t+=z((d-this.z2t)*f/h),this.y2t+=z((d-this.z2t)*g/h),this.z2t=
d):(this.x2t+=z((b-this.z2t)*f/h),this.y2t+=z((b-this.z2t)*g/h),this.z2t=b),this.cc2=this.g3d.clipCode3(this.x2t,this.y2t,this.z2t))}while(0!=(this.cc1|this.cc2));return 1});b(c$,"plotLineClipped",function(a,c,d,b,f,g,h,e,j,k,v,A,F){var x=this.g3d.zbuf,p=this.g3d.getRenderWidth(),r=0;0==A&&(F=2147483647,A=1);var q=g*p+f,s=this.g3d.bufferSize,t=0!=((f^g)&1);0!=a&&(!v&&0<=q&&q<s&&h<x[q]&&(!c||(t=!t)))&&this.g3d.addPixel(q,h,a);if(!(0==e&&0==j)){v=1;var u=p;f+=e;var y=g+j;0>e&&(e=-e,v=-1);0>j&&(j=-j,
u=-p);p=e+e;g=j+j;h<<=10;if(j<=e){var z=e-1;0>k&&(z=-z);k=m(((k<<10)+z)/e);j=0;z=Math.abs(f-this.x2t)-1;f=Math.abs(f-this.x1t)-1;for(var y=e-1,w=m(y/2);--y>=z&&!(y==w&&(c=b,a=d,0==a));){q+=v;h+=k;j+=g;j>e&&(q+=u,j-=p,t=!t);if(0!=a&&y<f&&0<=q&&q<s&&r<F&&(!c||(t=!t))){var B=h>>10;B<x[q]&&this.g3d.addPixel(q,B,a)}r=(r+1)%A}}else{z=j-1;0>k&&(z=-z);k=m(((k<<10)+z)/j);e=0;z=Math.abs(y-this.y2t)-1;f=Math.abs(y-this.y1t)-1;y=j-1;for(w=m(y/2);--y>=z&&!(y==w&&(c=b,a=d,0==a));){q+=u;h+=k;e+=p;e>j&&(q+=v,e-=
g,t=!t);if(0!=a&&y<f&&0<=q&&q<s&&r<F&&(!c||(t=!t)))B=h>>10,B<x[q]&&this.g3d.addPixel(q,B,a);r=(r+1)%A}}}},"~N,~B,~N,~B,~N,~N,~N,~N,~N,~N,~B,~N,~N");b(c$,"plotLineClippedA",function(a,c,d,b,f,g,h,e,j,k,v,A,F,x){var p=this.g3d.zbuf,r=this.g3d.getRenderWidth(),q=0;0==F&&(x=2147483647,F=1);var s=h*r+g,t=this.g3d.bufferSize,u=f<J.util.Shader.shadeIndexLast?f+1:f,y=0<f?f-1:f,z=a[u],w=a[y],B=d[f],u=d[u];d=d[y];a=a[f];f=c;var C=0!=((g^h)&1);0!=a&&(!A&&0<=s&&s<t&&e<p[s]&&(!f||(C=!C)))&&this.g3d.addPixel(s,
e,a);if(!(0==j&&0==k)){A=1;var y=r,D=g+j,E=h+k;0>j&&(j=-j,A=-1);0>k&&(k=-k,y=-r);h=j+j;g=k+k;e<<=10;if(k<=j){var H=j-1;0>v&&(H=-H);v=m(((v<<10)+H)/j);k=0;for(var H=Math.abs(D-this.x2t)-1,D=Math.abs(D-this.x1t)-1,E=j-1,G=m(E/2);--E>=H;){if(E==G){a=B;if(0==a)break;z=u;w=d;if((f=b)&&!c)var C=m(s/r),I=s%r,C=0==((I^C)&1)}s+=A;e+=v;k+=g;k>j&&(s+=y,k-=h,C=!C);if(0!=a&&E<D&&0<=s&&s<t&&q<x&&(!f||(C=!C)))if(I=e>>10,I<p[s]){var K=this.shader.nextRandom8Bit();this.g3d.addPixel(s,I,85>K?w:170<K?z:a)}q=(q+1)%F}}else{H=
k-1;0>v&&(H=-H);v=m(((v<<10)+H)/k);j=0;H=Math.abs(E-this.y2t)-1;D=Math.abs(E-this.y1t)-1;E=k-1;for(G=m(E/2);--E>=H;){if(E==G){a=B;if(0==a)break;z=u;w=d;if((f=b)&&!c)C=m(s/r),I=s%r,C=0==((I^C)&1)}s+=y;e+=v;j+=h;j>k&&(s+=A,j-=g,C=!C);if(0!=a&&E<D&&0<=s&&s<t&&q<x&&(!f||(C=!C)))I=e>>10,I<p[s]&&(K=this.g3d.shader.nextRandom8Bit(),this.g3d.addPixel(s,I,85>K?w:170<K?z:a));q=(q+1)%F}}}},"~A,~B,~A,~B,~N,~N,~N,~N,~N,~N,~N,~B,~N,~N");b(c$,"plotLineClippedBits",function(a,c,d,b,f,g,h,e,j,k,v,A,F){var x=this.g3d.zbuf,
p=this.g3d.width,r=0;0==A&&(F=2147483647,A=1);var q=f<J.util.Shader.shadeIndexLast?f+1:f,s=0<f?f-1:f,t=a[f],u=a[q],y=a[s];f=d[f];q=d[q];d=d[s];var s=c,w=0!=((g^h)&1);a=h*p+g;var C=this.g3d.bufferSize,B,D,E,H,I;this.lineTypeX?(B=g,D=this.x1t,E=this.x2t,g+=m(j/2),H=h=0<=j?1:-1,I=0<=k?p:-p,j=v/Math.abs(j)):(B=h,D=this.y1t,E=this.y2t,g=h+m(k/2),h=0<=k?1:-1,H=0<=k?p:-p,I=0<=j?1:-1,j=v/Math.abs(k));k=!1;for(v=B;;v+=h,B+=h){v==D&&(k=!0);if(v==g){t=f;if(0==t)break;u=q;y=d;if((s=b)&&!c)w=m(a/p),w=0==((a%p^
w)&1)}if(0!=t&&(k&&0<=a&&a<C&&r<F&&(!s||(w=!w)))&&e<x[a]){var G=this.shader.nextRandom8Bit();this.g3d.addPixel(a,z(e),85>G?y:170<G?u:t)}if(v==E)break;r=(r+1)%A;for(a+=H;0>B;)B+=this.nBits;this.lineBits.get(B%this.nBits)&&(a+=I);e+=j}},"~A,~B,~A,~B,~N,~N,~N,~N,~N,~N,~N,~N,~N");B(c$,"VISIBILITY_UNCLIPPED",0,"VISIBILITY_CLIPPED",1,"VISIBILITY_OFFSCREEN",2)});p("J.g3d");q(null,"J.g3d.Pixelator",["J.g3d.Graphics3D"],function(){c$=u(function(){this.g=null;t(this,arguments)},J.g3d,"Pixelator");w(c$,function(a){this.g=
a},"J.g3d.Graphics3D");b(c$,"clearPixel",function(a,c){!this.g.$isPass2&&this.g.zbuf[a]>c&&(this.g.zbuf[a]=2147483647)},"~N,~N");b(c$,"addPixel",function(a,c,d){this.addPixel1(a,c,d)},"~N,~N,~N");b(c$,"addPixel1",function(a,c,d){if(this.g.$isPass2){var b=this.g.zbufT[a];if(c<b){var f=this.g.pbufT[a];!this.g.translucentCoverOnly&&(0!=f&&b-c>this.g.zMargin)&&J.g3d.Graphics3D.mergeBufferPixel(this.g.pbuf,a,f,this.g.bgcolor);this.g.zbufT[a]=c;this.g.pbufT[a]=d&this.g.translucencyMask}else c!=b&&!this.g.translucentCoverOnly&&
c-b>this.g.zMargin&&J.g3d.Graphics3D.mergeBufferPixel(this.g.pbuf,a,d&this.g.translucencyMask,this.g.bgcolor)}else this.g.zbuf[a]=c,this.g.pbuf[a]=d},"~N,~N,~N")});p("J.g3d");q(["J.g3d.Pixelator"],"J.g3d.PixelatorShaded",null,function(){c$=G(J.g3d,"PixelatorShaded",J.g3d.Pixelator);e(c$,"addPixel",function(a,c,d){if(!(c>this.g.zDepth)){if(c<=this.g.zDepth&&c>=this.g.zSlab){var b=(d&65280)>>8,f=(d&16711680)>>16,g=d&4278190080,h=(this.g.zDepth-c)/(this.g.zDepth-this.g.zSlab);if(1<this.g.zShadePower)for(var e=
0;e<this.g.zShadePower;e++)h*=h;d=this.g.zShadeR+z(h*((d&255)-this.g.zShadeR));b=this.g.zShadeG+z(h*(b-this.g.zShadeG));f=this.g.zShadeB+z(h*(f-this.g.zShadeB));d=f<<16|b<<8|d|g}this.addPixel1(a,c,d)}},"~N,~N,~N")});p("J.g3d");c$=u(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;t(this,arguments)},J.g3d,"Platform3D");w(c$,function(a){this.apiPlatform=a},"javajs.api.GenericPlatform");b(c$,"getGraphicsForMetrics",function(){return this.apiPlatform.getGraphics(this.allocateOffscreenImage(1,1))});b(c$,"allocateTBuffers",function(a){this.bufferSizeT=a?this.bufferSize:this.windowSize;this.zBufferT=D(this.bufferSizeT,0);this.pBufferT=D(this.bufferSizeT,0)},"~B");b(c$,"allocateBuffers",function(a,c,d,b){this.windowWidth=a;this.windowHeight=
c;this.windowSize=a*c;d&&(a*=2,c*=2);this.bufferWidth=a;this.bufferHeight=c;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,b)},"~N,~N,~B,~B");b(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});b(c$,"hasContent",function(){for(var a=this.bufferSize;0<=--a;)if(2147483647!=this.zBuffer[a])return!0;return!1});b(c$,"clearScreenBuffer",function(){for(var a=this.bufferSize;0<=--a;)this.zBuffer[a]=2147483647,this.pBuffer[a]=0});b(c$,"setBackgroundColor",function(a){if(null!=this.pBuffer)for(var c=this.bufferSize;0<=--c;)0==this.pBuffer[c]&&(this.pBuffer[c]=a)},
"~N");b(c$,"clearTBuffer",function(){for(var a=this.bufferSizeT;0<=--a;)this.zBufferT[a]=2147483647,this.pBufferT[a]=0});b(c$,"clearBuffer",function(){this.clearScreenBuffer()});b(c$,"clearScreenBufferThreaded",function(){});b(c$,"notifyEndOfRendering",function(){this.apiPlatform.notifyEndOfRendering()});b(c$,"getGraphicsForTextOrImage",function(a,c){if(a>this.widthOffscreen||c>this.heightOffscreen)null!=this.offscreenImage&&(this.apiPlatform.disposeGraphics(this.graphicsForTextOrImage),this.apiPlatform.flushImage(this.offscreenImage)),
a>this.widthOffscreen&&(this.widthOffscreen=a),c>this.heightOffscreen&&(this.heightOffscreen=c),this.offscreenImage=this.allocateOffscreenImage(this.widthOffscreen,this.heightOffscreen),this.graphicsForTextOrImage=this.apiPlatform.getStaticGraphics(this.offscreenImage,J.g3d.Platform3D.backgroundTransparent);return this.graphicsForTextOrImage},"~N,~N");b(c$,"allocateOffscreenImage",function(a,c){return this.apiPlatform.newOffScreenImage(a,c)},"~N,~N");b(c$,"setBackgroundTransparent",function(a){J.g3d.Platform3D.backgroundTransparent=
a},"~B");B(c$,"backgroundTransparent",!1);p("J.g3d");q(["JU.P3","J.util.Shader"],"J.g3d.SphereRenderer",["J.util.GData"],function(){c$=u(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;t(this,arguments)},J.g3d,"SphereRenderer");N(c$,function(){this.zroot=sa(2,0);this.ptTemp=new JU.P3;this.planeShades=D(3,0);this.dxyz=M(3,3,0)});w(c$,function(a){this.g3d=a;this.shader=a.shader},"J.g3d.Graphics3D");b(c$,"render",function(a,c,d,b,f,g,h,e,j,k,v,A){if(1!=g&&(this.width=this.g3d.width,this.height=this.g3d.height,49<d&&(d&=-2),!this.g3d.isClippedXY(d,b,f))){var m=d+1>>1;this.minX=b-m;this.maxX=b+m;this.minY=f-m;this.maxY=f+m;this.slab=
this.g3d.slab;this.depth=this.g3d.depth;this.minZ=g-m;this.maxZ=g+m;this.maxZ<this.slab||this.minZ>this.depth||(this.shader.nOut=this.shader.nIn=0,this.zbuf=this.g3d.zbuf,this.addAllPixels=A,this.offsetPbufBeginLine=this.width*f+b,this.x=b,this.y=f,this.z=g,this.diameter=d,this.tScreened=c,this.shades=a,this.mat=h,null!=h&&(this.coef=e,this.mDeriv=j,this.selectedOctant=k,this.octantPoints=v),null!=h||128<d?(this.renderLarge(),null!=h&&(this.octantPoints=this.mDeriv=this.coef=this.mat=null)):(a=this.getSphereShape(d),
0>this.minX||this.maxX>=this.width||0>this.minY||this.maxY>=this.height||this.minZ<this.slab||g>this.depth?this.renderShapeClipped(a):this.renderShapeUnclipped(a)),this.zbuf=this.shades=null)}},"~A,~B,~N,~N,~N,~N,JU.M3,~A,JU.M4,~N,~A,~B");b(c$,"getSphereShape",function(a){var c;return null==(c=this.shader.sphereShapeCache[a-1])?this.createSphereShape(a):c},"~N");b(c$,"createSphereShape",function(a){for(var c=0,d=0!=(a&1),b=a/2,f=b*b,g=m((a+1)/2),h=d?0:0.5,e=0;e<g;++e,++h)for(var j=h*h,k=d?0:0.5,v=
0;v<g;++v,++k){var A=k*k,A=f-j-A;0<=A&&++c}for(var c=D(c,0),F=0,h=d?0:0.5,e=0;e<g;++e,++h){j=h*h;k=d?0:0.5;for(v=0;v<g;++v,++k)if(A=k*k,A=f-j-A,0<=A){var x=Math.sqrt(A),A=z(x),p=this.shader.getShadeN(k,h,x,b),r=this.shader.getShadeN(-k,h,x,b),q=this.shader.getShadeN(k,-h,x,b),x=this.shader.getShadeN(-k,-h,x,b),A=A|p<<7|r<<13|q<<19|x<<25;c[F++]=A}c[F-1]|=2147483648}return this.shader.sphereShapeCache[a-1]=c},"~N");b(c$,"renderShapeUnclipped",function(a){var c=0,d=1-(this.diameter&1),b=this.offsetPbufBeginLine,
f=b-d*this.width,g=m((this.diameter+1)/2);if(this.tScreened){var h=(this.x^this.y)&1,e=h^d,h=h|(h^d)<<1|e<<2|(e^d)<<3;do{j=b;k=b-d;v=f;A=f-d;e=h=~h;do F=a[c++],x=this.z-(F&127),0!=(e&1)&&x<this.zbuf[j]&&this.g3d.addPixel(j,x,this.shades[F>>7&63]),0!=(e&2)&&x<this.zbuf[k]&&this.g3d.addPixel(k,x,this.shades[F>>13&63]),0!=(e&4)&&x<this.zbuf[v]&&this.g3d.addPixel(v,x,this.shades[F>>19&63]),0!=(e&8)&&x<this.zbuf[A]&&this.g3d.addPixel(A,x,this.shades[F>>25&63]),++j,--k,++v,--A,e=~e;while(0<=F);b+=this.width;
f-=this.width}while(0<--g)}else{do{var j=b,k=b-d,v=f,A=f-d,F;do{F=a[c++];var x=this.z-(F&127);x<this.zbuf[j]&&this.g3d.addPixel(j,x,this.shades[F>>7&63]);x<this.zbuf[k]&&this.g3d.addPixel(k,x,this.shades[F>>13&63]);x<this.zbuf[v]&&this.g3d.addPixel(v,x,this.shades[F>>19&63]);x<this.zbuf[A]&&this.g3d.addPixel(A,x,this.shades[F>>25&63]);++j;--k;++v;--A}while(0<=F);b+=this.width;f-=this.width}while(0<--g)}},"~A");b(c$,"renderShapeClipped",function(a){var c=0,d=1-(this.diameter&1),b=this.offsetPbufBeginLine,
f=b-d*this.width,g=m((this.diameter+1)/2),h=this.y,e=this.y-d,j=(this.x<<16)+(this.y<<1)^858993459,k=(this.x^this.y)&1,v=k^d,k=k|(k^d)<<1|v<<2|(v^d)<<3;do{var v=0<=h&&h<this.height,A=0<=e&&e<this.height,F=b,x=b-d,p=f,r=f-d,q,s=k=~k,t=this.x,u=this.x-d;do{var y=0<=u&&u<this.width,z=0<=t&&t<this.width;q=a[c++];var w;w=q&127;var B;this.z<this.slab?(B=this.z+w,w=B>=this.slab):(B=this.z-w,w=B<this.slab);w&&(B=this.slab);if(B>=this.slab&&B<=this.depth){if(v){if(z&&(this.addAllPixels||0!=(s&1))&&B<this.zbuf[F]){var C=
w?J.g3d.SphereRenderer.SHADE_SLAB_CLIPPED-3+(j>>7&7):q>>7&63;this.g3d.addPixel(F,B,this.shades[C])}if(y&&(this.addAllPixels||0!=(s&2))&&B<this.zbuf[x])C=w?J.g3d.SphereRenderer.SHADE_SLAB_CLIPPED-3+(j>>13&7):q>>13&63,this.g3d.addPixel(x,B,this.shades[C])}if(A){if(z&&(!this.tScreened||0!=(s&4))&&B<this.zbuf[p])C=w?J.g3d.SphereRenderer.SHADE_SLAB_CLIPPED-3+(j>>19&7):q>>19&63,this.g3d.addPixel(p,B,this.shades[C]);if(y&&(!this.tScreened||0!=(s&8))&&B<this.zbuf[r])C=w?J.g3d.SphereRenderer.SHADE_SLAB_CLIPPED-
3+(j>>25&7):q>>25&63,this.g3d.addPixel(r,B,this.shades[C])}}++F;--x;++p;--r;++t;--u;s=~s;w&&(j=(j<<16)+(j<<1)+j&2147483647)}while(0<=q);b+=this.width;f-=this.width;++h;--e}while(0<--g)},"~A");b(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)});b(c$,"renderQuadrant",function(a,
c){var d=m(this.diameter/2),b=this.x+d*a,f=(0>this.x?-1:this.x<this.width?0:1)+(0>b?-2:b<this.width?0:2);-3==f||3==f||(b=this.y+d*c,b=(0>this.y?-1:this.y<this.height?0:1)+(0>b?-2:b<this.height?0:2),-3==b||3==b||(null==this.mat&&0==f&&0==b&&this.z-d>=this.slab&&this.z<=this.depth?this.renderQuadrantUnclipped(d,a,c):this.renderQuadrantClipped(d,a,c)))},"~N,~N");b(c$,"renderQuadrantUnclipped",function(a,c,d){for(var b=a*a,f=2*a+1,g=0==((this.x^this.y)&1),h=0>d?-this.width:this.width,e=this.offsetPbufBeginLine,
j=0,k=0;k<=b;k+=j+ ++j,e+=h)for(var v=e,A=g=!g,F=b-k,x=this.z-a,p=m((j*d+a<<8)/f),r=0,q=0;q<=F;q+=r+ ++r,v+=c)if((this.addAllPixels||(A=!A))&&!(this.zbuf[v]<=x))if(x=m(Math.sqrt(F-q)),x=this.z-x,!(this.zbuf[v]<=x)){var s=m((r*c+a<<8)/f);this.g3d.addPixel(v,x,this.shades[this.shader.sphereShadeIndexes[(p<<8)+s]])}},"~N,~N,~N");b(c$,"renderQuadrantClipped",function(a,c,d){for(var b=null!=this.mat,f=0<=this.selectedOctant,g=a*a,h=2*a+1,e=0>d?-this.width:this.width,j=this.offsetPbufBeginLine,k=(this.x<<
16)+(this.y<<1)^858993459,v=this.y,A=0,F=0,x=0,p=0;p<=g;p+=x+ ++x,j+=e,v+=d)if(0>v){if(0>d)break}else if(v>=this.height){if(0<d)break}else{var r=g-(b?0:p),q=this.x;b||(A=m((x*d+a<<8)/h));for(var k=(k<<16)+(k<<1)+k&2147483647,s=-1,t=1,u=j,y=0,z=0;z<=r;z+=y+ ++y,u+=c,q+=c)if(0>q){if(0>c)break}else if(q>=this.width){if(0<c)break}else if(!(this.tScreened&&0!=((q^v)&1))){var w;if(b){if(!J.g3d.SphereRenderer.getQuardricZ(q,v,this.coef,this.zroot)){if(0<=s)break;continue}s=this.z<this.slab?1:0;w=m(this.zroot[s]);
0==w&&(w=this.z);t=2;this.z0=w;if(f){this.ptTemp.set(q-this.x,v-this.y,w-this.z);this.mat.transform(this.ptTemp);J.util.GData.getScreenOctant(this.ptTemp)==this.selectedOctant&&(F=this.getPlaneShade(q,v,this.zroot),w=m(this.zroot[0]),t=3);var B=this.z<this.slab?w>=this.slab:w<this.slab;B&&(this.z0=w=this.slab,t=0)}if(w<this.slab||w>this.depth||this.zbuf[u]<=this.z0)continue}else{w=m(Math.sqrt(r-z));w=this.z+(this.z<this.slab?w:-w);if(B=this.z<this.slab?w>=this.slab:w<this.slab)w=this.slab,t=0;if(w<
this.slab||w>this.depth||this.zbuf[u]<=w)continue}switch(t){case 0:F=J.g3d.SphereRenderer.SHADE_SLAB_CLIPPED-3+(k>>8&7);k=(k<<16)+(k<<1)+k&2147483647;t=1;break;case 2:F=this.shader.getEllipsoidShade(q,v,this.zroot[s],a,this.mDeriv);break;case 3:this.g3d.clearPixel(u,this.z0);break;default:F=m((y*c+a<<8)/h),F=this.shader.sphereShadeIndexes[(A<<8)+F]}this.g3d.addPixel(u,w,this.shades[F])}k=(k+q+v|1)&2147483647}},"~N,~N,~N");c$.getQuardricZ=b(c$,"getQuardricZ",function(a,c,d,b){var f=(d[4]*a+d[5]*c+
d[8])/d[2]/2;a=f*f-(d[0]*a*a+d[1]*c*c+d[3]*a*c+d[6]*a+d[7]*c-1)/d[2];if(0>a)return!1;a=Math.sqrt(a);b[0]=-f-a;b[1]=-f+a;return!0},"~N,~N,~A,~A");b(c$,"setPlaneDerivatives",function(){this.planeShade=-1;for(var a=0;3>a;a++){var c=this.dxyz[a][0]=this.octantPoints[a].x-this.x,d=this.dxyz[a][1]=this.octantPoints[a].y-this.y,b=this.dxyz[a][2]=this.octantPoints[a].z-this.z;this.planeShades[a]=this.shader.getShadeIndex(c,d,-b);if(0==c&&0==d){this.planeShade=this.planeShades[a];break}}});b(c$,"getPlaneShade",
function(a,c,d){if(0<=this.planeShade)return this.planeShade;for(var b=3,f,g=3.4028235E38,h=0;3>h;h++)if(0!=(f=this.dxyz[h][2]))f=this.z+(-this.dxyz[h][0]*(a-this.x)-this.dxyz[h][1]*(c-this.y))/f,f<g&&(g=f,b=h);3==b&&(b=0,g=this.z);d[0]=g;return this.planeShades[b]},"~N,~N,~A");B(c$,"maxOddSizeSphere",49,"maxSphereDiameter",1E3,"maxSphereDiameter2",2E3);c$.SHADE_SLAB_CLIPPED=c$.prototype.SHADE_SLAB_CLIPPED=J.util.Shader.shadeIndexNormal-5});p("J.g3d");q(["java.util.Hashtable"],"J.g3d.TextRenderer",
["JU.CU"],function(){c$=u(function(){this.size=this.mapWidth=this.width=this.ascent=this.height=0;this.tmap=null;this.isInvalid=!1;t(this,arguments)},J.g3d,"TextRenderer");c$.clearFontCache=b(c$,"clearFontCache",function(){J.g3d.TextRenderer.working||(J.g3d.TextRenderer.htFont3d.clear(),J.g3d.TextRenderer.htFont3dAntialias.clear())});c$.plot=b(c$,"plot",function(a,c,d,b,f,g,h,e,j,k){if(0==g.length)return 0;if(0<=g.indexOf("<su")||0<=g.indexOf("<color"))return J.g3d.TextRenderer.plotByCharacter(a,
c,d,b,f,g,h,e,j,k);var v=h.getAscent();c-=v;g=J.g3d.TextRenderer.getPlotText3D(a,c,e,g,h,k);if(g.isInvalid)return g.width;k&&0==(b&12632256)&&(b|=263172);null!=j||0>a||a+g.width>e.width||0>c||c+g.height>e.height?J.g3d.TextRenderer.plotClipped(a,c,d,b,f,e,j,g.mapWidth,g.height,g.tmap):J.g3d.TextRenderer.plotUnclipped(a,c,d,b,f,e,g.mapWidth,g.height,g.tmap);return g.width},"~N,~N,~N,~N,~N,~S,javajs.awt.Font,J.g3d.Graphics3D,J.api.JmolRendererInterface,~B");c$.plotByCharacter=b(c$,"plotByCharacter",
function(a,c,d,b,f,g,h,e,j,k){for(var v=0,A=g.length,m=Math.round(0.25*h.getHeight()),x=-Math.round(0.3*h.getHeight()),p=0,r=0;r<A;r++){if("<"==g.charAt(r)){if(r+5<A&&g.substring(r,r+6).equals("<color")){var p=b,q=g.indexOf(">",r);if(0>q)continue;b=JU.CU.getArgbFromString(g.substring(r+7,q).trim());r=q;continue}if(r+7<A&&g.substring(r,r+8).equals("</color>")){r+=7;b=p;continue}if(r+4<A&&g.substring(r,r+5).equals("<sub>")){r+=4;c+=m;continue}if(r+4<A&&g.substring(r,r+5).equals("<sup>")){r+=4;c+=x;
continue}if(r+5<A&&g.substring(r,r+6).equals("</sub>")){r+=5;c-=m;continue}if(r+5<A&&g.substring(r,r+6).equals("</sup>")){r+=5;c-=x;continue}}q=J.g3d.TextRenderer.plot(a+v,c,d,b,f,g.substring(r,r+1),h,e,j,k);v+=q}return v},"~N,~N,~N,~N,~N,~S,javajs.awt.Font,J.g3d.Graphics3D,J.api.JmolRendererInterface,~B");c$.plotUnclipped=b(c$,"plotUnclipped",function(a,c,d,b,f,g,h,e,j){var k=0,v=g.zbuf,A=g.width;a=c*A+a;for(c=0;c<e;c++){for(var m=0;m<h;m++){var x=j[k++];0!=x&&d<v[a]&&g.shadeTextPixel(a,d,b,f,x);
a++}a+=A-h}},"~N,~N,~N,~N,~N,J.g3d.Graphics3D,~N,~N,~A");c$.plotClipped=b(c$,"plotClipped",function(a,c,d,b,f,g,h,e,j,k){null==h&&(h=g);for(var v=g=0;v<j;v++)for(var A=0;A<e;A++){var m=k[g++];0!=m&&h.plotImagePixel(b,a+A,c+v,d,m,f)}},"~N,~N,~N,~N,~N,J.g3d.Graphics3D,J.api.JmolRendererInterface,~N,~N,~A");w(c$,function(a,c){this.ascent=c.getAscent();this.height=c.getHeight();this.width=c.stringWidth(a);0!=this.width&&(this.mapWidth=this.width,this.size=this.mapWidth*this.height)},"~S,javajs.awt.Font");
c$.getPlotText3D=b(c$,"getPlotText3D",function(a,c,d,b,f,g){J.g3d.TextRenderer.working=!0;g=g?J.g3d.TextRenderer.htFont3dAntialias:J.g3d.TextRenderer.htFont3d;var h=g.get(f),e=null,j=!1,k=!1;null!=h?e=h.get(b):(h=new java.util.Hashtable,j=!0);null==e&&(e=new J.g3d.TextRenderer(b,f),k=!0);e.isInvalid=0==e.width||0>=a+e.width||a>=d.width||0>=c+e.height||c>=d.height;if(e.isInvalid)return e;j&&g.put(f,h);k&&(e.setTranslucency(b,f,d),h.put(b,e));J.g3d.TextRenderer.working=!1;return e},"~N,~N,J.g3d.Graphics3D,~S,javajs.awt.Font,~B");
b(c$,"setTranslucency",function(a,c,d){a=d.apiPlatform.getTextPixels(a,c,d.platform.getGraphicsForTextOrImage(this.mapWidth,this.height),d.platform.offscreenImage,this.mapWidth,this.height,this.ascent);if(null!=a){this.tmap=T(this.size,0);for(c=a.length;0<=--c;)d=a[c]&255,0!=d&&(this.tmap[c]=J.g3d.TextRenderer.translucency[d>>5])}},"~S,javajs.awt.Font,J.g3d.Graphics3D");B(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});p("J.g3d");c$=G(J.g3d,"TextSorter",null,java.util.Comparator);e(c$,"compare",function(a,c){return null==a||null==c?0:a.z>c.z?-1:a.z<c.z?1:0},"J.g3d.TextString,J.g3d.TextString");p("J.g3d");q(["JU.P3i"],"J.g3d.TextString",null,function(){c$=u(function(){this.font=this.text=null;this.bgargb=this.argb=0;t(this,arguments)},J.g3d,"TextString",JU.P3i);b(c$,"setText",function(a,c,d,b,f,g,h){this.text=a;this.font=c;this.argb=d;this.bgargb=b;this.x=
f;this.y=g;this.z=h},"~S,javajs.awt.Font,~N,~N,~N,~N,~N");b(c$,"toString",function(){return na(this,J.g3d.TextString,"toString",[])+" "+this.text})});p("J.g3d");q(["J.g3d.G3DRenderer","J.util.Rgb16"],"J.g3d.TriangleRenderer",["J.util.GData"],function(){c$=u(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;t(this,arguments)},J.g3d,"TriangleRenderer",null,J.g3d.G3DRenderer);N(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 J.util.Rgb16;this.rgb16t2=new J.util.Rgb16});w(c$,function(){});e(c$,"set",function(a){try{this.rgb16sW=Array(64);this.rgb16sE=Array(64);for(var c=64;0<=--c;)this.rgb16sW[c]=new J.util.Rgb16,this.rgb16sE[c]=new J.util.Rgb16;this.g3d=a;this.rgb16sGouraud=Array(3);for(c=3;0<=--c;)this.rgb16sGouraud[c]=new J.util.Rgb16}catch(d){if(!y(d,Exception))throw d;}return this},"J.api.JmolRendererInterface");
b(c$,"reallocRgb16s",function(a,c){var d=Array(c);System.arraycopy(a,0,d,0,a.length);for(var b=a.length;b<c;++b)d[b]=new J.util.Rgb16;return d},"~A,~N");b(c$,"setGouraud",function(a,c,d){this.rgb16sGouraud[0].setInt(a);this.rgb16sGouraud[1].setInt(c);this.rgb16sGouraud[2].setInt(d)},"~N,~N,~N");b(c$,"drawfillTriangle",function(a,c,d,b,f,g,h,e,j,k){this.ax[0]=a;this.ax[1]=b;this.ax[2]=h;this.ay[0]=c;this.ay[1]=f;this.ay[2]=e;this.az[0]=d;this.az[1]=g;this.az[2]=j;this.fillTriangleB(k)},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~B");
b(c$,"fillTriangleXYZ",function(a,c,d,b,f,g,h,e,j,k){this.ax[0]=a;this.ax[1]=b;this.ax[2]=h;this.ay[0]=c;this.ay[1]=f;this.ay[2]=e;this.az[0]=d;this.az[1]=g;this.az[2]=j;this.fillTriangleB(k)},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~B");b(c$,"fillTriangleP3i",function(a,c,d,b){this.ax[0]=a.x;this.ax[1]=c.x;this.ax[2]=d.x;this.ay[0]=a.y;this.ay[1]=c.y;this.ay[2]=d.y;this.az[0]=a.z;this.az[1]=c.z;this.az[2]=d.z;this.fillTriangleB(b)},"JU.P3i,JU.P3i,JU.P3i,~B");b(c$,"fillTriangleP3f",function(a,c,d,b){this.ax[0]=
Math.round(a.x);this.ax[1]=Math.round(c.x);this.ax[2]=Math.round(d.x);this.ay[0]=Math.round(a.y);this.ay[1]=Math.round(c.y);this.ay[2]=Math.round(d.y);this.az[0]=Math.round(a.z);this.az[1]=Math.round(c.z);this.az[2]=Math.round(d.z);this.fillTriangleB(b)},"JU.P3,JU.P3,JU.P3,~B");b(c$,"fillTriangleP3if",function(a,c,d,b,f){this.ax[0]=a.x;this.ax[1]=c.x;this.ax[2]=d.x;this.ay[0]=a.y;this.ay[1]=c.y;this.ay[2]=d.y;this.az[0]=a.z;this.az[1]=c.z;this.az[2]=d.z;J.g3d.TriangleRenderer.adjustVertex(this.ax,
b);J.g3d.TriangleRenderer.adjustVertex(this.ay,b);J.g3d.TriangleRenderer.adjustVertex(this.az,b);this.fillTriangleB(f)},"JU.P3i,JU.P3i,JU.P3i,~N,~B");c$.adjustVertex=b(c$,"adjustVertex",function(a,c){for(var d=(a[0]+a[1]+a[2])/3,b=0;3>b;b++)a[b]+=c*(d-a[b])},"~A,~N");b(c$,"fillTriangleB",function(a){if(!(1>=this.az[0]||1>=this.az[1]||1>=this.az[2])){var c=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]),b=this.g3d.clipCode3(this.ax[2],this.ay[2],
this.az[2]),f=0!=(c|d|b);if(!(f&&0!=(c&d&b))){c=0;this.ay[1]<this.ay[c]&&(c=1);this.ay[2]<this.ay[c]&&(c=2);d=(c+1)%3;b=(c+2)%3;if(this.ay[d]>this.ay[b])var g=d,d=b,b=g;var h=this.ay[c],e=this.ay[d],j=this.ay[b],k=j-h+1;if(!(k>3*this.g3d.height)){k>this.axW.length&&this.reallocRasterArrays(k);var v,A;a?(v=this.rgb16sW,A=this.rgb16sE):v=A=null;g=e-h;0==g?(this.ax[d]<this.ax[c]&&(g=d,d=c,c=g),this.generateRaster(k,c,b,this.axW,this.azW,0,v),this.generateRaster(k,d,b,this.axE,this.azE,0,A)):e==j?(this.ax[b]<
this.ax[d]&&(g=d,d=b,b=g),this.generateRaster(k,c,d,this.axW,this.azW,0,v),this.generateRaster(k,c,b,this.axE,this.azE,0,A)):(e=this.ax[b]-this.ax[c],j=J.util.GData.roundInt(m(k/2)),0>e&&(j=-j),this.ax[c]+m((e*g+j)/k)<this.ax[d]?(this.generateRaster(k,c,b,this.axW,this.azW,0,v),this.generateRaster(g+1,c,d,this.axE,this.azE,0,A),this.generateRaster(k-g,d,b,this.axE,this.azE,g,A)):(this.generateRaster(g+1,c,d,this.axW,this.azW,0,v),this.generateRaster(k-g,d,b,this.axW,this.azW,g,v),this.generateRaster(k,
c,b,this.axE,this.azE,0,A)));this.g3d.setZMargin(5);a?this.fillRasterG(h,k,f,this.g3d.$isPass2?1:0):this.fillRaster(h,k,f,this.g3d.$isPass2?1:0);this.g3d.setZMargin(0)}}}},"~B");b(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");b(c$,"generateRaster",function(a,c,d,b,f,g,h){var e=this.ax[c],j=this.az[c],k=this.ax[d]-e,v=this.az[d]-j,
A,F,x;0<=k?(A=1,F=k,x=0):(A=-1,F=-k,x=1-a);var j=(j<<10)+512,p=J.util.GData.roundInt(m(a/2));0>v&&(p=-p);v=m(((v<<10)+p)/a);F<=a?p=0:(p=J.util.GData.roundInt(m(k/a)),F%=a);for(var r=0,k=g;r<a;j+=v,++k,++r)b[k]=e,f[k]=j>>10,e+=p,x+=F,0<x&&(e+=A,x-=a);if(null!=h){b=this.rgb16t1;b.setRgb(this.rgb16sGouraud[c]);c=this.rgb16t2;c.diffDiv(this.rgb16sGouraud[d],b,a);k=g;for(a=g+a;k<a;++k)h[k].setAndIncrement(b,c)}},"~N,~N,~N,~A,~A,~N,~A");b(c$,"fillRaster",function(a,c,d,b){var f=0;0>a&&(c+=a,f-=a,a=0);a+
c>this.g3d.height&&(c=this.g3d.height-a);if(d)for(;--c>=b;++a,++f){d=this.axW[f];var g=this.axE[f]-d+1-b;0<g&&this.g3d.plotPixelsClippedRaster(g,d,a,this.azW[f],this.azE[f],null,null)}else for(;--c>=b;++a,++f)g=this.axE[f]-(d=this.axW[f])+1-b,1==b&&0>g&&(g=1,d--),0<g&&this.g3d.plotPixelsUnclippedRaster(g,d,a,this.azW[f],this.azE[f],null,null)},"~N,~N,~B,~N");b(c$,"fillRasterG",function(a,c,d,b){var f=0;0>a&&(c+=a,f-=a,a=0);a+c>this.g3d.height&&(c=this.g3d.height-a);if(d)for(;--c>=b;++a,++f){d=this.axW[f];
var g=this.axE[f]-d+1-b;0<g&&this.g3d.plotPixelsClippedRaster(g,d,a,this.azW[f],this.azE[f],this.rgb16sW[f],this.rgb16sE[f])}else for(;--c>=b;++a,++f)g=this.axE[f]-(d=this.axW[f])+1-b,1==b&&0>g&&(g=1,d--),0<g&&this.g3d.plotPixelsUnclippedRaster(g,d,a,this.azW[f],this.azE[f],this.rgb16sW[f],this.rgb16sE[f])},"~N,~N,~B,~N");B(c$,"DEFAULT",64)});p("J.i18n");q(["java.util.Hashtable","J.i18n.Language","$.Resource"],"J.i18n.GT",["java.text.MessageFormat","J.util.Logger"],function(){c$=u(function(){this.resources=
null;this.resourceCount=0;this.doTranslate=!0;this.language=null;t(this,arguments)},J.i18n,"GT");w(c$,function(){});w(c$,function(a,c){J.i18n.GT.viewer=a;this.resources=null;this.resourceCount=0;J.i18n.GT.$getTextWrapper=this;null!=c&&0==c.length&&(c="none");null!=c&&(this.language=c);"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,b=null,f=null,g=this.language.indexOf("_");
if(0<=g&&(d=d.substring(0,g),b=this.language,0<=(g=b.indexOf("_",++g))))b=b.substring(0,g),f=this.language;if(null==(this.language=this.getSupported(f))&&null==(this.language=this.getSupported(b))&&null==(this.language=this.getSupported(d)))this.language="en",System.out.println(this.language+" not supported -- using en");else{b=f=null;switch(this.language.length){default:f=this.language;b=this.language.substring(0,5);d=this.language.substring(0,2);break;case 5:b=this.language;d=this.language.substring(0,
2);break;case 2:d=this.language}b=this.getSupported(b);d=this.getSupported(d);if(d===b||"en_US".equals(d))d=null;b===f&&(b=null);"en_US".equals(b)||(J.i18n.GT.allowDebug&&J.util.Logger.debugging&&J.util.Logger.debug("Instantiating gettext wrapper for "+this.language+" using files for language:"+d+" country:"+b+" variant:"+f),J.i18n.GT.$ignoreApplicationBundle||this.addBundles("Jmol",f,b,d),this.addBundles("JmolApplet",f,b,d))}},"J.api.JmolViewer,~S");c$.getLanguageList=b(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=b(c$,"getLanguage",function(){return J.i18n.GT.getTextWrapper().language});c$.ignoreApplicationBundle=b(c$,"ignoreApplicationBundle",function(){J.i18n.GT.$ignoreApplicationBundle=!0});c$.setDoTranslate=b(c$,"setDoTranslate",function(a){var c=J.i18n.GT.getDoTranslate();J.i18n.GT.getTextWrapper().doTranslate=a;return c},"~B");c$.getDoTranslate=b(c$,"getDoTranslate",
function(){return J.i18n.GT.getTextWrapper().doTranslate});c$._=b(c$,"_",function(a){return J.i18n.GT.getTextWrapper().getString(a)},"~S");c$.o=b(c$,"o",function(a,c){s(c,Array)||(c=[c]);return java.text.MessageFormat.format(a,c)},"~S,~O");c$.i=b(c$,"i",function(a,c){return J.i18n.GT.o(a,""+c)},"~S,~N");c$.escapeHTML=b(c$,"escapeHTML",function(a){for(var c,d=a.length;0<=--d;)if(127<(c=a.charAt(d)).charCodeAt(0))a=a.substring(0,d)+"&#"+c.charCodeAt(0)+";"+a.substring(d+1);return a},"~S");c$.getTextWrapper=
b(c$,"getTextWrapper",function(){return null==J.i18n.GT.$getTextWrapper?J.i18n.GT.$getTextWrapper=new J.i18n.GT(null,null):J.i18n.GT.$getTextWrapper});b(c$,"createLanguageList",function(){var a=this.doTranslate;this.doTranslate=!1;J.i18n.GT.languageList=J.i18n.Language.getLanguageList();this.doTranslate=a});b(c$,"getSupported",function(a){if(null==a)return null;var c=J.i18n.GT.htLanguages.get(a);if(null!=c)return 0==c.length?null:c;c=J.i18n.Language.getSupported(J.i18n.GT.getLanguageList(this),a);
J.i18n.GT.htLanguages.put(a,null==c?"":c);return c},"~S");b(c$,"addBundles",function(a,c,d,b){try{a="J.translation."+a+".",null!=c&&this.addBundle(a,c),null!=d&&this.addBundle(a,d),null!=b&&this.addBundle(a,b)}catch(f){if(y(f,Exception))J.i18n.GT.allowDebug&&J.util.Logger.errorEx("Some exception occurred!",f),this.resources=null,this.resourceCount=0;else throw f;}},"~S,~S,~S,~S");b(c$,"addBundle",function(a,c){var d=J.i18n.Resource.getResource(a,c);null!=d&&(null==this.resources&&(this.resources=
Array(8),this.resourceCount=0),this.resources[this.resourceCount]=d,this.resourceCount++,J.i18n.GT.allowDebug&&J.util.Logger.debug("GT adding "+a))},"~S,~S");b(c$,"getString",function(a){var c=null;if(this.doTranslate){for(var d=this.resourceCount;0<=--d;)if(c=this.resources[d].getString(a),null!=c){a=c;break}0<this.resourceCount&&(null==c&&J.i18n.GT.allowDebug&&J.util.Logger.debugging)&&J.util.Logger.debug("No trans, using default: "+a)}null==c&&(a.startsWith("[")?a=a.substring(a.indexOf("]")+1):
a.endsWith("]")&&(a=a.substring(0,a.indexOf("["))));return a},"~S");B(c$,"$ignoreApplicationBundle",!1,"$getTextWrapper",null,"languageList",null,"allowDebug",!1,"viewer",null);c$.htLanguages=c$.prototype.htLanguages=new java.util.Hashtable});p("J.i18n");q(null,"J.i18n.Language",["J.i18n.GT"],function(){c$=u(function(){this.nativeLanguage=this.language=this.code=null;this.display=!1;t(this,arguments)},J.i18n,"Language");c$.getLanguageList=b(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)]});w(c$,function(a,c,d,b){this.code=a;this.language=c;this.nativeLanguage=
d;this.display=b},"~S,~S,~S,~B");c$.getSupported=b(c$,"getSupported",function(a,c){for(var d=a.length;0<=--d;)if(a[d].code.equalsIgnoreCase(c))return a[d].code;for(d=a.length;0<=--d;)if(a[d].code.startsWith(c))return a[d].code;return null},"~A,~S")});p("J.i18n");q(null,"J.i18n.Resource",["java.util.Hashtable","JU.PT","J.i18n.GT","J.util.Logger"],function(){c$=u(function(){this.resourceMap=this.resource=null;t(this,arguments)},J.i18n,"Resource");w(c$,function(a,c){null==c?this.resourceMap=a:this.resource=
a},"~O,~S");c$.getResource=b(c$,"getResource",function(a,c){var d=null;if(J.i18n.GT.viewer.isApplet())return d=J.i18n.GT.viewer.appletIdiomaBase+"/"+c+".po",J.util.Logger.info("Loading language resource "+d),d=J.i18n.GT.viewer.getFileAsString(d),J.i18n.Resource.getResourceFromPO(d);d=null;a+=c+".Messages_"+c;try{d=Class.forName(a)}catch(b){J.util.Logger.error("GT could not find the class "+a)}try{if(null!=d&&java.util.ResourceBundle.isAssignableFrom(d))return new J.i18n.Resource(d.newInstance(),a)}catch(f){if(y(f,
IllegalAccessException))J.util.Logger.warn("Illegal Access Exception: "+f.toString());else if(y(f,InstantiationException))J.util.Logger.warn("Instantiation Exception: "+f.toString());else throw f;}return null},"~S,~S");b(c$,"getString",function(a){try{return null==this.resource?this.resourceMap.get(a):this.resource.getString(a)}catch(c){if(y(c,Exception))return null;throw c;}},"~S");c$.getLanguage=b(c$,"getLanguage",function(){var a=null;return a=Jmol.featureDetection.getDefaultLanguage().replace(/-/g,
"_")});c$.getResourceFromPO=b(c$,"getResourceFromPO",function(a){if(null==a||0==a.length)return null;var c=new java.util.Hashtable;try{var d=JU.PT.split(a,"\n");a=0;for(var b="",f="",g=0;g<d.length;g++){var h=d[g];2>=h.length?(2==a&&(0!=b.length&&0!=f.length)&&c.put(f,b),a=0):0==h.indexOf("msgid")?(a=1,f=J.i18n.Resource.fix(h)):0==h.indexOf("msgstr")?(a=2,b=J.i18n.Resource.fix(h)):1==a?f+=J.i18n.Resource.fix(h):2==a&&(b+=J.i18n.Resource.fix(h))}}catch(e){if(!y(e,Exception))throw e;}J.util.Logger.info(c.size()+
" translations loaded");return 0==c.size()?null:new J.i18n.Resource(c,null)},"~S");c$.fix=b(c$,"fix",function(a){return JU.PT.simpleReplace(a.substring(a.indexOf('"')+1,a.lastIndexOf('"')),"\\n","\n")},"~S")});p("J.io");q(["JU.SB"],"J.io.CifDataReader",["java.util.Hashtable","JU.List","J.util.Logger"],function(){c$=u(function(){this.str=this.line=this.br=this.reader=null;this.cch=this.ich=0;this.wasUnQuoted=!1;this.strPeeked=null;this.fieldCount=this.ichPeeked=0;this.fileHeader=this.loopData=null;
this.isHeader=!0;this.allData=this.data=null;t(this,arguments)},J.io,"CifDataReader");N(c$,function(){this.fileHeader=new JU.SB});w(c$,function(a){this.reader=a},"J.api.JmolLineReader");w(c$,function(a){this.br=a},"java.io.BufferedReader");b(c$,"getFileHeader",function(){return this.fileHeader.toString()});c$.readCifData=b(c$,"readCifData",function(a){return(new J.io.CifDataReader(a)).getAllCifData()},"java.io.BufferedReader");b(c$,"getAllCifData",function(){this.line="";var a;this.allData=new java.util.Hashtable;
var c=new JU.List;this.allData.put("models",c);try{for(;null!=(a=this.getNextToken());)if(a.startsWith("global_")||a.startsWith("data_"))c.addLast(this.data=new java.util.Hashtable),this.data.put("name",a);else if(a.startsWith("loop_"))this.getCifLoopData();else if(0!=a.indexOf("_"))J.util.Logger.warn("CIF ERROR ? should be an underscore: "+a);else{var d=this.getNextToken();null==d?J.util.Logger.warn("CIF ERROR ? end of file; data missing: "+a):this.data.put(a,d)}}catch(b){if(!y(b,Exception))throw b;
}try{null!=this.br&&this.br.close()}catch(f){if(!y(f,Exception))throw f;}return this.allData});b(c$,"readLine",function(){try{this.line=null!=this.reader?this.reader.readNextLine():this.br.readLine();if(null==this.line)return null;this.isHeader&&(this.line.startsWith("#")?this.fileHeader.append(this.line).appendC("\n"):this.isHeader=!1);return this.line}catch(a){if(y(a,Exception))return null;throw a;}});b(c$,"getData",function(){for(var a=0;a<this.fieldCount;++a)if(null==(this.loopData[a]=this.getNextDataToken()))return!1;
return!0});b(c$,"getNextToken",function(){for(;!this.hasMoreTokens();)if(null==this.setStringNextLine())return null;return this.nextToken()});b(c$,"setString",function(a){this.str=this.line=a;this.cch=null==a?0:a.length;this.ich=0},"~S");b(c$,"setStringNextLine",function(){this.setString(this.readLine());if(null==this.line||0==this.line.length)return this.line;if(";"!=this.line.charAt(0))return this.str.startsWith("###non-st#")&&(this.ich=10),this.line;this.ich=1;for(var a="\u0001"+this.line.substring(1)+
"\n";null!=this.readLine();){if(this.line.startsWith(";")){a=a.substring(0,a.length-1)+"\u0001"+this.line.substring(1);break}a+=this.line+"\n"}this.setString(a);return a});b(c$,"hasMoreTokens",function(){if(null==this.str)return!1;for(var a="#";this.ich<this.cch&&(" "==(a=this.str.charAt(this.ich))||"\t"==a);)++this.ich;return this.ich<this.cch&&"#"!=a});b(c$,"nextToken",function(){if(this.ich==this.cch)return null;var a=this.ich,c=this.str.charAt(a);if("'"!=c&&'"'!=c&&"\u0001"!=c){for(this.wasUnQuoted=
!0;this.ich<this.cch&&" "!=(c=this.str.charAt(this.ich))&&"\t"!=c;)++this.ich;return this.ich==a+1&&("."==this.str.charAt(a)||"?"==this.str.charAt(a))?"\x00":this.str.substring(a,this.ich)}this.wasUnQuoted=!1;for(var d=c,b=!1;++this.ich<this.cch;){c=this.str.charAt(this.ich);if(b&&(" "==c||"\t"==c))break;b=c==d}if(this.ich==this.cch)return b?this.str.substring(a+1,this.ich-1):this.str.substring(a,this.ich);++this.ich;return this.str.substring(a+1,this.ich-2)});b(c$,"getNextDataToken",function(){var a=
this.peekToken();return null==a||this.wasUnQuoted&&("_"==a.charAt(0)||a.startsWith("loop_")||a.startsWith("data_")||a.startsWith("stop_")||a.startsWith("global_"))?null:this.getTokenPeeked()});b(c$,"peekToken",function(){for(;!this.hasMoreTokens();)if(null==this.setStringNextLine())return null;var a=this.ich;this.strPeeked=this.nextToken();this.ichPeeked=this.ich;this.ich=a;return this.strPeeked});b(c$,"getTokenPeeked",function(){this.ich=this.ichPeeked;return this.strPeeked});b(c$,"fullTrim",function(a){for(var c=
0,d=a.length;c<d&&!(0>"\n\t ".indexOf(a.charAt(c)));c++);for(;c<d&&!(0>"\n\t ".indexOf(a.charAt(d-1)));d--);return a.substring(c,d)},"~S");b(c$,"getCifLoopData",function(){for(var a,c=new JU.List;null!=(a=this.peekToken())&&"_"==a.charAt(0);)a=this.getTokenPeeked(),c.addLast(a),this.data.put(a,new JU.List);this.fieldCount=c.size();if(0!=this.fieldCount)for(this.loopData=Array(this.fieldCount);this.getData();)for(a=0;a<this.fieldCount;a++)this.data.get(c.get(a)).addLast(this.loopData[a])});b(c$,"toUnicode",
function(a){var c;try{for(;0<=(c=a.indexOf("\\"));){var d=a.charCodeAt(c+1),b=65<=d&&90>=d?"ABX\u0394E\u03a6\u0393HI_K\u039bMNO\u03a0\u0398P\u03a3TY_\u03a9\u039e\u03a5Z".substring(d-65,d-64):97<=d&&122>=d?"\u03b1\u03b2\u03c7\u03a4\u03a5\u03c6\u03b3\u03b7\u03b9_\u03ba\u03bb\u03bc\u03bd\u03bf\u03c0\u03b8\u03c1\u03c3\u03c4\u03c5_\u03c9\u03be\u03c5\u03b6".substring(d-97,d-96):"_";a=a.substring(0,c)+b+a.substring(c+2)}}catch(f){if(!y(f,Exception))throw f;}return a},"~S");B(c$,"grABC","ABX\u0394E\u03a6\u0393HI_K\u039bMNO\u03a0\u0398P\u03a3TY_\u03a9\u039e\u03a5Z",
"grabc","\u03b1\u03b2\u03c7\u03a4\u03a5\u03c6\u03b3\u03b7\u03b9_\u03ba\u03bb\u03bc\u03bd\u03bf\u03c0\u03b8\u03c1\u03c3\u03c4\u03c5_\u03c9\u03be\u03c5\u03b6")});p("J.io");q(null,"J.io.FileReader","java.io.BufferedInputStream $.BufferedReader $.Reader javajs.api.ZInputStream JU.PT J.api.Interface $.JmolDocument J.io.JmolBinary J.util.Logger".split(" "),function(){c$=u(function(){this.htParams=this.reader=this.atomSetCollection=this.fileTypeIn=this.nameAsGivenIn=this.fullPathNameIn=this.fileNameIn=this.viewer=
this.fm=null;this.isAppend=!1;this.bytes=null;t(this,arguments)},J.io,"FileReader");w(c$,function(a,c,d,b,f,g,h,e,j){this.fm=a;this.viewer=c;this.fileNameIn=d;this.fullPathNameIn=b;this.nameAsGivenIn=f;this.fileTypeIn=g;this.reader=s(h,java.io.BufferedReader)?h:s(h,java.io.Reader)?new java.io.BufferedReader(h):null;this.bytes=JU.PT.isAB(h)?h:null;this.htParams=e;this.isAppend=j},"J.viewer.FileManager,J.viewer.Viewer,~S,~S,~S,~S,~O,java.util.Map,~B");b(c$,"run",function(){!this.isAppend&&this.viewer.displayLoadErrors&&
this.viewer.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||s(a,String)){a=null==a?"error opening:"+this.nameAsGivenIn:a;a.startsWith("NOTE:")||J.util.Logger.error("file ERROR: "+this.fullPathNameIn+"\n"+a);this.atomSetCollection=a;return}if(s(a,java.io.BufferedReader))this.reader=a;else if(s(a,javajs.api.ZInputStream)){var c=this.fullPathNameIn,d=null;0<=c.indexOf("|")&&!c.endsWith(".zip")&&
(d=JU.PT.split(c,"|"),c=d[0]);null!=d&&this.htParams.put("subFileList",d);d=a;a=this.fm.getZipDirectory(c,!0);this.atomSetCollection=a=J.io.JmolBinary.getAtomSetCollectionOrBufferedReaderFromZip(this.viewer.getModelAdapter(),d,c,a,this.htParams,!1);try{d.close()}catch(b){if(!y(b,Exception))throw b;}}}s(a,java.io.BufferedInputStream)&&(c=J.api.Interface.getOptionInterface("io2.BinaryDocument"),c.setStream(a,!0),this.reader=c);if(null!=this.reader){this.atomSetCollection=this.viewer.getModelAdapter().getAtomSetCollectionReader(this.fullPathNameIn,
this.fileTypeIn,this.reader,this.htParams);s(this.atomSetCollection,String)||(this.atomSetCollection=this.viewer.getModelAdapter().getAtomSetCollection(this.atomSetCollection));try{s(this.reader,java.io.BufferedReader)?this.reader.close():s(this.reader,J.api.JmolDocument)&&this.reader.close()}catch(f){if(!y(f,java.io.IOException))throw f;}}s(this.atomSetCollection,String)||(!this.isAppend&&!this.viewer.displayLoadErrors&&this.viewer.zap(!1,!0,!1),this.fm.setFileInfo([this.fullPathNameIn,this.nameAsGivenIn,
this.fileNameIn]))});b(c$,"getAtomSetCollection",function(){return this.atomSetCollection})});p("J.io");q(null,"J.io.JmolBinary","java.io.BufferedInputStream $.BufferedReader $.ByteArrayInputStream $.InputStreamReader $.StringReader JU.AU $.Base64 $.Encoding $.PT $.SB J.api.Interface J.io.LimitedLineReader J.util.Logger J.viewer.FileManager".split(" "),function(){c$=G(J.io,"JmolBinary");c$.determineSurfaceTypeIs=b(c$,"determineSurfaceTypeIs",function(a){var c;try{c=J.io.JmolBinary.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(c)},"java.io.InputStream");c$.determineSurfaceFileType=b(c$,"determineSurfaceFileType",function(a){var c=null,d=null;try{d=new J.io.LimitedLineReader(a,16E3),c=d.getHeader(0)}catch(b){if(!y(b,Exception))throw b;}if(null==d||null==c||0==c.length)return null;switch(c.charAt(0)){case "@":if(0==c.indexOf("@text"))return"Kinemage";break;case "#":if(0<=c.indexOf(".obj"))return"Obj";if(0<=
c.indexOf("MSMS"))return"Msms";break;case "&":if(0==c.indexOf("&plot"))return"Jaguar";break;case "\r":case "\n":if(0<=c.indexOf("ZYX"))return"Xplor"}if(0<=c.indexOf("Here is your gzipped map"))return"UPPSALA"+c;if(0<=c.indexOf("! nspins"))return"CastepDensity";if(0<=c.indexOf("<jvxl")&&0<=c.indexOf("<?xml"))return"JvxlXml";if(0<=c.indexOf("#JVXL+"))return"Jvxl+";if(0<=c.indexOf("#JVXL"))return"Jvxl";if(0<=c.indexOf("<efvet "))return"Efvet";if(0<=c.indexOf("usemtl"))return"Obj";if(0==c.indexOf("# object with"))return"Nff";
if(0<=c.indexOf("BEGIN_DATAGRID_3D")||0<=c.indexOf("BEGIN_BANDGRID_3D"))return"Xsf";if(0<=c.indexOf("\x00")){if(0==c.indexOf("PM\u0001\x00"))return"Pmesh";if(0==c.indexOf("\u0014\x00\x00\x00"))return"DelPhi";if(208==c.indexOf("MAP "))return"Mrc";if(37<c.length&&(0==c.charCodeAt(36)&&100==c.charCodeAt(37)||0==c.charCodeAt(36)&&100==c.charCodeAt(37)))return"Dsn6"}if(0<=c.indexOf(" 0.00000e+00 0.00000e+00      0      0\n"))return"Uhbd";c=d.readLineWithNewline();if(0==c.indexOf("object 1 class gridpositions counts"))return"Apbs";
var f=JU.PT.getTokens(c);a=d.readLineWithNewline();if(2==f.length&&(3==JU.PT.parseInt(f[0])&&-2147483648!=JU.PT.parseInt(f[1]))&&(f=JU.PT.getTokens(a),3==f.length&&-2147483648!=JU.PT.parseInt(f[0])&&-2147483648!=JU.PT.parseInt(f[1])&&-2147483648!=JU.PT.parseInt(f[2])))return"PltFormatted";f=d.readLineWithNewline();if(c.startsWith("v ")&&a.startsWith("v ")&&f.startsWith("v "))return"Obj";a=JU.PT.parseInt(f);if(-2147483648==a)return 0==f.indexOf("+")?"Jvxl+":null;if(0<=a)return"Cube";for(a=4+-a;0<=
--a;)if(null==(c=d.readLineWithNewline()))return null;c=JU.PT.parseInt(c);return-2147483648==c?null:0>c?"Jvxl":"Cube"},"java.io.BufferedReader");c$.getUTFEncodingForStream=b(c$,"getUTFEncodingForStream",function(a){a.resetStream();var c=T(4,0);c[3]=1;try{a.mark(5)}catch(d){if(y(d,Exception))return JU.Encoding.NONE;throw d;}a.read(c,0,4);a.reset();return J.io.JmolBinary.getUTFEncoding(c)},"java.io.BufferedInputStream");c$.fixUTF=b(c$,"fixUTF",function(a){var c=J.io.JmolBinary.getUTFEncoding(a);if(c!==
JU.Encoding.NONE)try{var d=String.instantialize(a,c.name().$replace("_","-"));switch(c){case JU.Encoding.UTF8:case JU.Encoding.UTF_16BE:case JU.Encoding.UTF_16LE:d=d.substring(1)}return d}catch(b){if(y(b,java.io.UnsupportedEncodingException))System.out.println(b);else throw b;}return String.instantialize(a)},"~A");c$.getUTFEncoding=b(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$.getMagic=b(c$,"getMagic",function(a,c){var d=T(c,0);a.resetStream();try{a.mark(c+1),a.read(d,0,c)}catch(b){if(!y(b,java.io.IOException))throw b;}try{a.reset()}catch(f){if(!y(f,java.io.IOException))throw f;}return d},"java.io.InputStream,~N");c$.isCompoundDocumentS=b(c$,"isCompoundDocumentS",
function(a){return J.io.JmolBinary.isCompoundDocumentB(J.io.JmolBinary.getMagic(a,8))},"java.io.InputStream");c$.isCompoundDocumentB=b(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=b(c$,"isGzipS",function(a){return J.io.JmolBinary.isGzipB(J.io.JmolBinary.getMagic(a,2))},"java.io.InputStream");c$.isGzipB=b(c$,"isGzipB",function(a){return null!=a&&2<=a.length&&31==a[0]&&139==a[1]},"~A");
c$.isPickleS=b(c$,"isPickleS",function(a){return J.io.JmolBinary.isPickleB(J.io.JmolBinary.getMagic(a,2))},"java.io.InputStream");c$.isPickleB=b(c$,"isPickleB",function(a){return null!=a&&2<=a.length&&125==a[0]&&113==a[1]},"~A");c$.isZipS=b(c$,"isZipS",function(a){return J.io.JmolBinary.isZipB(J.io.JmolBinary.getMagic(a,4))},"java.io.InputStream");c$.isZipB=b(c$,"isZipB",function(a){return 4<=a.length&&80==a[0]&&75==a[1]&&3==a[2]&&4==a[3]},"~A");c$.isPngZipStream=b(c$,"isPngZipStream",function(a){if(J.io.JmolBinary.isZipS(a))return!1;
a=J.io.JmolBinary.getMagic(a,55);return 80==a[51]&&78==a[52]&&71==a[53]&&74==a[54]},"java.io.InputStream");c$.getZipRoot=b(c$,"getZipRoot",function(a){var c=a.indexOf("|");return 0>c?a:a.substring(0,c)},"~S");c$.getStreamBytes=b(c$,"getStreamBytes",function(a,c){for(var d=0<c&&1024>c?c:1024,b=T(d,0),f=T(0>c?4096:c,0),g=0,h=0;(0>c||h<c)&&0<(g=a.read(b,0,d));)h+=g,h>f.length&&(f=JU.AU.ensureLengthByte(f,2*h)),System.arraycopy(b,0,f,h-g,g);if(h==f.length)return f;b=T(h,0);System.arraycopy(f,0,b,0,h);
return b},"java.io.InputStream,~N");c$.getEmbeddedScript=b(c$,"getEmbeddedScript",function(a){if(null==a)return a;var c=a.indexOf("**** Jmol Embedded Script ****");if(0>c)return a;var d=a.lastIndexOf("/*",c),b=a.indexOf(("*"==a.charAt(d+2)?"*":"")+"*/",c);for(0<=d&&b>=c&&(a=a.substring(c+30,b)+"\n");0<=(d=a.indexOf(" #Jmol...\x00"));)a=a.substring(0,d)+a.substring(d+10+4);J.util.Logger.debugging&&J.util.Logger.debug(a);return a},"~S");c$.getJzu=b(c$,"getJzu",function(){return null==J.io.JmolBinary.jzu?
J.io.JmolBinary.jzu=J.api.Interface.getOptionInterface("io2.ZipUtil"):J.io.JmolBinary.jzu});c$.getZipDirectoryAsStringAndClose=b(c$,"getZipDirectoryAsStringAndClose",function(a){return J.io.JmolBinary.getJzu().getZipDirectoryAsStringAndClose(a)},"java.io.BufferedInputStream");c$.newGZIPInputStream=b(c$,"newGZIPInputStream",function(a){return J.io.JmolBinary.getJzu().newGZIPInputStream(a)},"java.io.BufferedInputStream");c$.newZipInputStream=b(c$,"newZipInputStream",function(a){return J.io.JmolBinary.getJzu().newZipInputStream(a)},
"java.io.InputStream");c$.getZipFileContents=b(c$,"getZipFileContents",function(a,c,d,b){return J.io.JmolBinary.getJzu().getZipFileContents(a,c,d,b)},"java.io.BufferedInputStream,~A,~N,~B");c$.getZipDirectoryAndClose=b(c$,"getZipDirectoryAndClose",function(a,c){return J.io.JmolBinary.getJzu().getZipDirectoryAndClose(a,c)},"java.io.BufferedInputStream,~B");c$.getAllZipData=b(c$,"getAllZipData",function(a,c,d,b,f){J.io.JmolBinary.getJzu().getAllZipData(a,c,d,b,f)},"java.io.BufferedInputStream,~A,~S,~S,java.util.Map");
c$.getZipFileContentsAsBytes=b(c$,"getZipFileContentsAsBytes",function(a,c,d){return J.io.JmolBinary.getJzu().getZipFileContentsAsBytes(a,c,d)},"java.io.BufferedInputStream,~A,~N");c$.getStreamAsBytes=b(c$,"getStreamAsBytes",function(a,c){for(var d=T(1024,0),b=null==c?T(4096,0):null,f=0,g=0;0<(f=a.read(d,0,1024));)g+=f,null==c?(g>=b.length&&(b=JU.AU.ensureLengthByte(b,2*g)),System.arraycopy(d,0,b,g-f,f)):c.write(d,0,f);a.close();return null==c?JU.AU.arrayCopyByte(b,g):g+" bytes"},"java.io.BufferedInputStream,JU.OC");
c$.isBase64=b(c$,"isBase64",function(a){return 0==a.indexOf(";base64,")},"JU.SB");c$.getBytesFromSB=b(c$,"getBytesFromSB",function(a){return J.io.JmolBinary.isBase64(a)?JU.Base64.decodeBase64(a.substring(8)):a.toBytes(0,-1)},"JU.SB");c$.getBIS=b(c$,"getBIS",function(a){return new java.io.BufferedInputStream(new java.io.ByteArrayInputStream(a))},"~A");c$.getBR=b(c$,"getBR",function(a){return new java.io.BufferedReader(new java.io.StringReader(a))},"~S");c$.getCachedPngjBytes=b(c$,"getCachedPngjBytes",
function(a,c){return 0>c.indexOf(".png")?null:J.io.JmolBinary.getJzu().getCachedPngjBytes(a,c)},"J.viewer.FileManager,~S");c$.cachePngjFile=b(c$,"cachePngjFile",function(a,c){return J.io.JmolBinary.getJzu().cachePngjFile(a,c)},"J.viewer.FileManager,~A");c$.getAtomSetCollectionOrBufferedReaderFromZip=b(c$,"getAtomSetCollectionOrBufferedReaderFromZip",function(a,c,d,b,f,g){return J.io.JmolBinary.getJzu().getAtomSetCollectionOrBufferedReaderFromZip(a,c,d,b,f,1,g)},"J.api.JmolAdapter,java.io.InputStream,~S,~A,java.util.Map,~B");
c$.spartanFileList=b(c$,"spartanFileList",function(a,c){return J.io.JmolBinary.getJzu().spartanFileList(a,c)},"~S,~S");c$.getFileReferences=b(c$,"getFileReferences",function(a,c){for(var d=0;d<J.viewer.FileManager.scriptFilePrefixes.length;d++)for(var b=J.viewer.FileManager.scriptFilePrefixes[d],f=-1;0<=(f=a.indexOf(b,f+1));){var g=JU.PT.getQuotedStringAt(a,f);0<=g.indexOf("::")&&(g=JU.PT.split(g,"::")[1]);c.addLast(g)}},"~S,JU.List");c$.checkPngZipStream=b(c$,"checkPngZipStream",function(a){if(!J.io.JmolBinary.isPngZipStream(a))return a;
var c=null;a.mark(75);try{c=J.io.JmolBinary.getStreamBytes(a,74);a.reset();for(var d=0,b=64,f=1;54<--b;f*=10)d+=(c[b]-48)*f;for(var g=0,b=74,f=1;64<--b;f*=10)g+=(c[b]-48)*f;for(;0<d;)d-=a.skip(d);c=J.io.JmolBinary.getStreamBytes(a,g);a.close()}catch(h){c=T(0,0)}return J.io.JmolBinary.getBIS(c)},"java.io.BufferedInputStream");c$.getBufferedReader=b(c$,"getBufferedReader",function(a,c){if(J.io.JmolBinary.getUTFEncodingForStream(a)===JU.Encoding.NONE)return new java.io.BufferedReader(new java.io.InputStreamReader(a,
null==c?"UTF-8":c));var d=J.io.JmolBinary.getStreamBytes(a,-1);a.close();return J.io.JmolBinary.getBR(null==c?J.io.JmolBinary.fixUTF(d):String.instantialize(d,c))},"java.io.BufferedInputStream,~S");c$.getManifestScriptPath=b(c$,"getManifestScriptPath",function(a){if(0<=a.indexOf("$SCRIPT_PATH$"))return"";var c=0<=a.indexOf("\n")?"\n":"\r";if(0<=a.indexOf(".spt")){a=JU.PT.split(a,c);for(c=a.length;0<=--c;)if(0<=a[c].indexOf(".spt"))return"|"+JU.PT.trim(a[c],"\r\n \t")}return null},"~S");c$.getBinaryType=
b(c$,"getBinaryType",function(a){if(null==a)return null;var c=a.lastIndexOf(".");if(0>c||0>(c=";pse=PyMOL;".indexOf(";"+a.substring(c+1)+"=")))return null;c=";pse=PyMOL;".indexOf("=",c);a=";pse=PyMOL;".substring(c+1);return a.substring(0,a.indexOf(";"))},"~S");c$.checkBinaryType=b(c$,"checkBinaryType",function(a){return 0<=";pse=PyMOL;".indexOf("="+a+";")},"~S");c$.StreamToString=b(c$,"StreamToString",function(a){var c=Array(1);try{J.io.JmolBinary.readAll(J.io.JmolBinary.getBufferedReader(a,"UTF-8"),
-1,!0,c,0)}catch(d){if(!y(d,java.io.IOException))throw d;}return c[0]},"java.io.BufferedInputStream");c$.readAll=b(c$,"readAll",function(a,c,d,b,f){try{var g=JU.SB.newN(8192),h;if(0>c){if(h=a.readLine(),d||null!=h&&0>h.indexOf("\x00")&&(4!=h.length||65533!=h.charCodeAt(0)||1!=h.indexOf("PNG")))for(g.append(h).appendC("\n");null!=(h=a.readLine());)g.append(h).appendC("\n")}else{d=0;for(var e;d<c&&null!=(h=a.readLine());){if(c-d<(e=h.length)+1)h=h.substring(0,c-d-1);g.append(h).appendC("\n");d+=e+1}}a.close();
b[f]=g.toString();return!0}catch(j){if(y(j,Exception))return b[f]=j.toString(),!1;throw j;}},"java.io.BufferedReader,~N,~B,~A,~N");c$.addZipEntry=b(c$,"addZipEntry",function(a,c){J.io.JmolBinary.getJzu().addZipEntry(a,c)},"~O,~S");c$.closeZipEntry=b(c$,"closeZipEntry",function(a){J.io.JmolBinary.getJzu().closeZipEntry(a)},"~O");c$.getZipOutputStream=b(c$,"getZipOutputStream",function(a){return J.io.JmolBinary.getJzu().getZipOutputStream(a)},"~O");c$.getCrcValue=b(c$,"getCrcValue",function(a){return J.io.JmolBinary.getJzu().getCrcValue(a)},
"~A");c$.getBufferedReaderForResource=b(c$,"getBufferedReaderForResource",function(a,c,d,b){b=a.viewerOptions.get("codePath")+d+b;return a.getBufferedReaderOrErrorMessageFromName(b,[null,null],!1)},"J.viewer.Viewer,~O,~S,~S");c$.getUnzippedInputStream=b(c$,"getUnzippedInputStream",function(a){for(;J.io.JmolBinary.isGzipS(a);)a=new java.io.BufferedInputStream(J.io.JmolBinary.newGZIPInputStream(a));return a},"java.io.BufferedInputStream");B(c$,"JPEG_CONTINUE_STRING"," #Jmol...\x00","PMESH_BINARY_MAGIC_NUMBER",
"PM\u0001\x00","DELPHI_BINARY_MAGIC_NUMBER","\u0014\x00\x00\x00","jzu",null)});p("J.io");c$=u(function(){this.buf=null;this.ichCurrent=this.cchBuf=0;t(this,arguments)},J.io,"LimitedLineReader");w(c$,function(a,c){a.mark(c+1);this.buf=ra(c,"\x00");this.cchBuf=Math.max(a.read(this.buf,0,c),0);this.ichCurrent=0;a.reset()},"java.io.BufferedReader,~N");b(c$,"getHeader",function(a){return 0==a?String.instantialize(this.buf):String.instantialize(this.buf,0,Math.min(this.cchBuf,a))},"~N");b(c$,"readLineWithNewline",
function(){for(;this.ichCurrent<this.cchBuf;){for(var a=this.ichCurrent,c=String.fromCharCode(0);this.ichCurrent<this.cchBuf&&"\r"!=(c=this.buf[this.ichCurrent++])&&"\n"!=c;);"\r"==c&&(this.ichCurrent<this.cchBuf&&"\n"==this.buf[this.ichCurrent])&&++this.ichCurrent;c=this.ichCurrent-a;if("#"!=this.buf[a])return String.instantialize(this.buf,a,c)}return""});p("J.io");q(null,"J.io.XmlUtil",["JU.PT"],function(){c$=G(J.io,"XmlUtil");w(c$,function(){});c$.openDocument=b(c$,"openDocument",function(a){a.append('<?xml version="1.0"?>\n')},
"JU.SB");c$.openTag=b(c$,"openTag",function(a,c){a.append("<").append(c).append(">\n")},"JU.SB,~S");c$.openTagAttr=b(c$,"openTagAttr",function(a,c,d){J.io.XmlUtil.appendTagAll(a,c,d,null,!1,!1);a.append("\n")},"JU.SB,~S,~A");c$.closeTag=b(c$,"closeTag",function(a,c){a.append("</").append(c).append(">\n")},"JU.SB,~S");c$.appendTagAll=b(c$,"appendTagAll",function(a,c,d,b,f,g){var h=">";c.endsWith("/")&&(c=c.substring(0,c.length-1),null==b&&(h="/>\n",g=!1));a.append("<").append(c);if(null!=d)for(var e=
0;e<d.length;e++){var j=d[e];if(null!=j)if(s(j,Array))for(var k=0;k<j.length;k+=2)J.io.XmlUtil.appendAttrib(a,j[k],j[k+1]);else J.io.XmlUtil.appendAttrib(a,j,d[++e])}a.append(h);null!=b&&(f&&(b=J.io.XmlUtil.wrapCdata(b)),a.appendO(b));g&&J.io.XmlUtil.closeTag(a,c)},"JU.SB,~S,~A,~O,~B,~B");c$.wrapCdata=b(c$,"wrapCdata",function(a){a=""+a;return 0>a.indexOf("&")&&0>a.indexOf("<")?(a.startsWith("\n")?"":"\n")+a:"<![CDATA["+JU.PT.simpleReplace(a,"]]\x3e","]]]]\x3e<![CDATA[>")+"]]\x3e"},"~O");c$.unwrapCdata=
b(c$,"unwrapCdata",function(a){return a.startsWith("<![CDATA[")&&a.endsWith("]]\x3e")?JU.PT.simpleReplace(a.substring(9,a.length-3),"]]]]\x3e<![CDATA[>","]]\x3e"):a},"~S");c$.appendTagObj=b(c$,"appendTagObj",function(a,c,d,b){J.io.XmlUtil.appendTagAll(a,c,d,b,!1,!0)},"JU.SB,~S,~A,~O");c$.appendTag=b(c$,"appendTag",function(a,c,d){s(d,Array)?J.io.XmlUtil.appendTagAll(a,c,d,null,!1,!0):J.io.XmlUtil.appendTagAll(a,c,null,d,!1,!0)},"JU.SB,~S,~O");c$.appendCdata=b(c$,"appendCdata",function(a,c,d,b){J.io.XmlUtil.appendTagAll(a,
c,d,b,!0,!0)},"JU.SB,~S,~A,~S");c$.appendAttrib=b(c$,"appendAttrib",function(a,c,d){null!=d&&a.append(" ").appendO(c).append('="').appendO(d).append('"')},"JU.SB,~O,~O")});p("J.modelset");q(["J.util.JmolNode","$.Point3fi","J.constant.EnumPalette","J.viewer.JC"],"J.modelset.Atom","java.lang.Float JU.CU $.P3 $.SB $.V3 J.atomdata.RadiusData J.constant.EnumVdw J.util.C $.Elements $.Escape".split(" "),function(){c$=u(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;t(this,arguments)},J.modelset,"Atom",J.util.Point3fi,J.util.JmolNode);N(c$,function(){this.paletteID=J.constant.EnumPalette.CPK.id});b(c$,"getAtomID",function(){return this.atomID});b(c$,"getBonds",function(){return this.bonds});b(c$,"setBonds",function(a){this.bonds=
a},"~A");b(c$,"getNBackbonesDisplayed",function(){return this.nBackbonesDisplayed});e(c$,"setAtom",function(a,c,d,b,f,g,h,e,j){this.modelIndex=a;this.atomSymmetry=f;this.atomSite=g;this.index=c;this.atomicAndIsotopeNumber=h;j&&(this.formalChargeAndFlags=2);0!=e&&-2147483648!=e&&this.setFormalCharge(e);this.userDefinedVanDerWaalRadius=b;this.setT(d);return this},"~N,~N,JU.P3,~N,JU.BS,~N,~N,~N,~B");b(c$,"setAltLoc",function(a){this.altloc=a},"~S");b(c$,"setShapeVisibilityFlags",function(a){this.shapeVisibilityFlags=
a},"~N");b(c$,"setShapeVisibility",function(a,c){this.shapeVisibilityFlags=c?this.shapeVisibilityFlags|a:this.shapeVisibilityFlags&~a},"~N,~B");b(c$,"isCovalentlyBonded",function(a){if(null!=this.bonds)for(var c=this.bonds.length;0<=--c;)if(this.bonds[c].isCovalent()&&this.bonds[c].getOtherAtom(this)===a)return!0;return!1},"J.modelset.Atom");b(c$,"isBonded",function(a){if(null!=this.bonds)for(var c=this.bonds.length;0<=--c;)if(this.bonds[c].getOtherAtom(this)===a)return!0;return!1},"J.modelset.Atom");
b(c$,"getBond",function(a){if(null!=this.bonds)for(var c=this.bonds.length;0<=--c;)if(null!=this.bonds[c].getOtherAtom(a))return this.bonds[c];return null},"J.modelset.Atom");b(c$,"addDisplayedBond",function(a,c){this.nBondsDisplayed+=c?1:-1;this.setShapeVisibility(a,0<this.nBondsDisplayed)},"~N,~B");b(c$,"addDisplayedBackbone",function(a,c){this.nBackbonesDisplayed+=c?1:-1;this.setShapeVisibility(a,c)},"~N,~B");b(c$,"deleteBond",function(a){if(null!=this.bonds)for(var c=this.bonds.length;0<=--c;)if(this.bonds[c]===
a){this.deleteBondAt(c);break}},"J.modelset.Bond");b(c$,"deleteBondAt",function(a){var c=this.bonds.length-1;if(0==c)this.bonds=null;else{for(var d=Array(c),b=0;b<a;++b)d[b]=this.bonds[b];for(;b<c;++b)d[b]=this.bonds[b+1];this.bonds=d}},"~N");b(c$,"clearBonds",function(){this.bonds=null});e(c$,"getBondedAtomIndex",function(a){return this.bonds[a].getOtherAtom(this).index},"~N");b(c$,"setMadAtom",function(a,c){this.madAtom=this.calculateMad(a,c)},"J.viewer.Viewer,J.atomdata.RadiusData");b(c$,"calculateMad",
function(a,c){if(null==c)return 0;var d=c.value;if(0==d)return 0;switch(c.factorType){case J.atomdata.RadiusData.EnumType.SCREEN:return pa(d);case J.atomdata.RadiusData.EnumType.FACTOR:case J.atomdata.RadiusData.EnumType.OFFSET:var b=0;switch(c.vdwType){case J.constant.EnumVdw.TEMP:b=a.getBfactor100Hi();b=0<b?this.getBfactor100()/b:0;break;case J.constant.EnumVdw.HYDRO:b=Math.abs(this.getHydrophobicity());break;case J.constant.EnumVdw.IONIC:b=this.getBondingRadiusFloat();break;case J.constant.EnumVdw.ADPMIN:case J.constant.EnumVdw.ADPMAX:b=
this.getADPMinMax(c.vdwType===J.constant.EnumVdw.ADPMAX);break;default:b=this.getVanderwaalsRadiusFloat(a,c.vdwType)}d=c.factorType===J.atomdata.RadiusData.EnumType.FACTOR?d*b:d+b;break;case J.atomdata.RadiusData.EnumType.ABSOLUTE:if(16.1==d)return J.modelset.Atom.MAD_GLOBAL}b=pa(0>d?d:2E3*d);0>b&&0<d&&(b=0);return b},"J.viewer.Viewer,J.atomdata.RadiusData");b(c$,"getADPMinMax",function(a){var c=this.getTensors();if(null==c)return 0;var d=c[0];if(null==d||1!=d.iType)return 0;this.group.chain.model.modelSet.isModulated(this.index)&&
d.isUnmodulated&&(d=c[1]);return d.getFactoredValue(a?2:1)},"~B");b(c$,"getTensors",function(){return this.group.chain.model.modelSet.getAtomTensorList(this.index)});b(c$,"getRasMolRadius",function(){return Math.abs(m(this.madAtom/8))});e(c$,"getCovalentBondCount",function(){if(null==this.bonds)return 0;for(var a=0,c,d=this.bonds.length;0<=--d;)0!=((c=this.bonds[d]).order&1023)&&!c.getOtherAtom(this).isDeleted()&&++a;return a});e(c$,"getCovalentHydrogenCount",function(){if(null==this.bonds)return 0;
for(var a=0,c=this.bonds.length;0<=--c;)if(0!=(this.bonds[c].order&1023)){var d=this.bonds[c].getOtherAtom(this);0<=d.valence&&1==d.getElementNumber()&&++a}return a});e(c$,"getEdges",function(){return this.bonds});b(c$,"setColixAtom",function(a){this.colixAtom=a},"~N");b(c$,"setPaletteID",function(a){this.paletteID=a},"~N");b(c$,"setTranslucent",function(a,c){this.colixAtom=J.util.C.getColixTranslucent3(this.colixAtom,a,c)},"~B,~N");b(c$,"isTranslucent",function(){return J.util.C.isColixTranslucent(this.colixAtom)});
e(c$,"getElementNumber",function(){return J.util.Elements.getElementNumber(this.atomicAndIsotopeNumber)});e(c$,"getIsotopeNumber",function(){return J.util.Elements.getIsotopeNumber(this.atomicAndIsotopeNumber)});e(c$,"getAtomicAndIsotopeNumber",function(){return this.atomicAndIsotopeNumber});b(c$,"setAtomicAndIsotopeNumber",function(a){if(0>a||(a&127)>=J.util.Elements.elementNumberMax||32767<a)a=0;this.atomicAndIsotopeNumber=a},"~N");b(c$,"getElementSymbolIso",function(a){return J.util.Elements.elementSymbolFromNumber(a?
this.atomicAndIsotopeNumber:this.atomicAndIsotopeNumber&127)},"~B");b(c$,"getElementSymbol",function(){return this.getElementSymbolIso(!0)});b(c$,"getAlternateLocationID",function(){return this.altloc});b(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");b(c$,"isHetero",function(){return 0!=(this.formalChargeAndFlags&2)});b(c$,"hasVibration",function(){return 0!=(this.formalChargeAndFlags&
1)});b(c$,"setFormalCharge",function(a){this.formalChargeAndFlags=this.formalChargeAndFlags&3|(-2147483648==a?0:7<a?7:-3>a?-3:a)<<2},"~N");b(c$,"setVibrationVector",function(){this.formalChargeAndFlags|=1});e(c$,"getFormalCharge",function(){return this.formalChargeAndFlags>>2});b(c$,"getOccupancy100",function(){var a=this.group.chain.model.modelSet.occupancies;return null==a?100:a[this.index]});b(c$,"getBfactor100",function(){var a=this.group.chain.model.modelSet.bfactor100s;return null==a?0:a[this.index]});
b(c$,"getHydrophobicity",function(){var a=this.group.chain.model.modelSet.hydrophobicities;return null==a?J.util.Elements.getHydrophobicity(this.group.getGroupID()):a[this.index]});b(c$,"setRadius",function(a){return!Float.isNaN(this.userDefinedVanDerWaalRadius=0<a?a:NaN)},"~N");b(c$,"deleteBonds",function(a){this.valence=-1;if(null!=this.bonds)for(var c=this.bonds.length;0<=--c;){var d=this.bonds[c];d.getOtherAtom(this).deleteBond(d);a.set(d.index)}this.bonds=null},"JU.BS");e(c$,"isDeleted",function(){return 0>
this.valence});b(c$,"setValence",function(a){this.isDeleted()||(this.valence=0>a?0:239>a?a:239)},"~N");e(c$,"getValence",function(){if(this.isDeleted())return-1;var a=this.valence;if(0==a&&null!=this.bonds)for(var c=this.bonds.length;0<=--c;)a+=this.bonds[c].getValence();return a});e(c$,"getImplicitHydrogenCount",function(){return this.group.chain.model.modelSet.getImplicitHydrogenCount(this,!1)});b(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});b(c$,"getDimensionValue",function(a){return 0==a?this.x:1==a?this.y:this.z},"~N");b(c$,"getVanderwaalsRadiusFloat",function(a,c){return Float.isNaN(this.userDefinedVanDerWaalRadius)?a.getVanderwaalsMarType(this.atomicAndIsotopeNumber,this.getVdwType(c))/1E3:this.userDefinedVanDerWaalRadius},"J.viewer.Viewer,J.constant.EnumVdw");b(c$,"getVdwType",function(a){switch(a){case J.constant.EnumVdw.AUTO:a=this.group.chain.model.modelSet.getDefaultVdwType(this.modelIndex);
break;case J.constant.EnumVdw.NOJMOL:a=this.group.chain.model.modelSet.getDefaultVdwType(this.modelIndex),a===J.constant.EnumVdw.AUTO_JMOL&&(a=J.constant.EnumVdw.AUTO_BABEL)}return a},"J.constant.EnumVdw");b(c$,"getCovalentRadiusFloat",function(){return J.util.Elements.getBondingRadiusFloat(this.atomicAndIsotopeNumber,0)});b(c$,"getBondingRadiusFloat",function(){var a=this.group.chain.model.modelSet.ionicRadii,a=null==a?0:a[this.index];return 0==a?J.util.Elements.getBondingRadiusFloat(this.atomicAndIsotopeNumber,
this.getFormalCharge()):a});b(c$,"getVolume",function(a,c){var d=null==c?this.userDefinedVanDerWaalRadius:NaN;Float.isNaN(d)&&(d=a.getVanderwaalsMarType(this.getElementNumber(),this.getVdwType(c))/1E3);var b=0;if(null!=this.bonds)for(var f=0;f<this.bonds.length;f++)if(this.bonds[f].isCovalent()){var g=this.bonds[f].getOtherAtom(this),h=null==c?g.userDefinedVanDerWaalRadius:NaN;Float.isNaN(h)&&(h=a.getVanderwaalsMarType(g.getElementNumber(),g.getVdwType(c))/1E3);g=this.distance(g);if(!(g>d+h)){if(g+
d<=h)return 0;h=d-(d*d+g*g-h*h)/(2*g);b-=1.0471975511965976*h*h*(3*d-h)}}return b+4.1887902047863905*d*d*d},"J.viewer.Viewer,J.constant.EnumVdw");b(c$,"getCurrentBondCount",function(){return null==this.bonds?0:this.bonds.length});b(c$,"getColix",function(){return this.colixAtom});b(c$,"getPaletteID",function(){return this.paletteID});b(c$,"getRadius",function(){return Math.abs(this.madAtom/2E3)});e(c$,"getIndex",function(){return this.index});e(c$,"getAtomSite",function(){return this.atomSite});b(c$,
"setAtomSymmetry",function(a){this.atomSymmetry=a},"JU.BS");b(c$,"getAtomSymmetry",function(){return this.atomSymmetry});b(c$,"setGroup",function(a){this.group=a},"J.modelset.Group");b(c$,"getGroup",function(){return this.group});e(c$,"getGroupBits",function(a){this.group.selectAtoms(a)},"JU.BS");e(c$,"getAtomName",function(){return 0<this.atomID?J.viewer.JC.getSpecialAtomName(this.atomID):this.group.chain.model.modelSet.atomNames[this.index]});e(c$,"getAtomType",function(){var a=this.group.chain.model.modelSet.atomTypes,
a=null==a?null:a[this.index];return null==a?this.getAtomName():a});b(c$,"getAtomNumber",function(){var a=this.group.chain.model.modelSet.atomSerials;return null!=a?a[this.index]:this.index});b(c$,"isInFrame",function(){return 0!=(this.shapeVisibilityFlags&1)});b(c$,"getShapeVisibilityFlags",function(){return this.shapeVisibilityFlags});b(c$,"isShapeVisible",function(a){return 0!=(this.shapeVisibilityFlags&a)},"~N");b(c$,"getPartialCharge",function(){var a=this.group.chain.model.modelSet.partialCharges;
return null==a?0:a[this.index]});b(c$,"getSymmetryTranslation",function(a,c,d){for(var b=0;b<c.length;b++)if(this.atomSymmetry.get(a+=d))return c[b];return 0},"~N,~A,~N");b(c$,"getCellTranslation",function(a,c,d){for(var b=d,f=0;f<c.length;f++)for(var g=0;g<d;g++,b++)if(this.atomSymmetry.get(b)&&c[f]==a)return c[f];return 0},"~N,~A,~N");b(c$,"getSymmetryOperatorList",function(){var a="",c=this.group.chain.model.modelSet,d=c.getModelSymmetryCount(this.modelIndex);if(0==d||null==this.atomSymmetry)return"";
for(var c=c.getModelCellRange(this.modelIndex),b=d,f=null==c?1:c.length,g=0;g<f;g++)for(var h=0;h<d;h++)this.atomSymmetry.get(b++)&&(a+=","+(h+1)+""+c[g]);return 0==a.length?"":a.substring(1)});e(c$,"getModelIndex",function(){return this.modelIndex});b(c$,"getMoleculeNumber",function(a){return this.group.chain.model.modelSet.getMoleculeIndex(this.index,a)+1},"~B");b(c$,"getFractionalCoord",function(a,c){var d=this.getFractionalCoordPt(c);return"X"==a?d.x:"Y"==a?d.y:d.z},"~S,~B");b(c$,"getFractionalCoordPt",
function(a){var c=this.getUnitCell();if(null==c)return this;var d=JU.P3.newP(this);c.toFractional(d,a);return d},"~B");b(c$,"getUnitCell",function(){return this.group.chain.model.modelSet.getUnitCellForAtom(this.index)});b(c$,"getFractionalUnitCoord",function(a){var c=this.getFractionalUnitCoordPt(!1);return"X"==a?c.x:"Y"==a?c.y:c.z},"~S");b(c$,"getFractionalUnitCoordPt",function(a){var c=this.getUnitCell();if(null==c)return this;var d=JU.P3.newP(this);this.group.chain.model.isJmolDataFrame?(c.toFractional(d,
!1),a&&c.toCartesian(d,!1)):(c.toUnitCell(d,null),a||c.toFractional(d,!1));return d},"~B");b(c$,"getFractionalUnitDistance",function(a,c,d){var b=this.getUnitCell();if(null==b)return this.distance(a);c.setT(this);d.setT(a);this.group.chain.model.isJmolDataFrame?(b.toFractional(c,!0),b.toFractional(d,!0)):(b.toUnitCell(c,null),b.toUnitCell(d,null));return c.distance(d)},"JU.P3,JU.P3,JU.P3");b(c$,"setFractionalCoord",function(a,c,d){var b=this.getUnitCell();null!=b&&b.toFractional(this,d);switch(a){case 1112541191:case 1112541188:this.x=
c;break;case 1112541192:case 1112541189:this.y=c;break;case 1112541193:case 1112541190:this.z=c}null!=b&&b.toCartesian(this,d)},"~N,~N,~B");b(c$,"setFractionalCoordTo",function(a,c){this.setFractionalCoordPt(this,a,c)},"JU.P3,~B");b(c$,"setFractionalCoordPt",function(a,c,d){a.setT(c);c=this.getUnitCell();null!=c&&c.toCartesian(a,d&&!this.group.chain.model.isJmolDataFrame)},"JU.P3,JU.P3,~B");b(c$,"isCursorOnTopOf",function(a,c,d,b){var f=m(this.sD/2);f<d&&(f=d);d=f*f;f=this.sX-a;f*=f;if(f>d)return!1;
var g=this.sY-c;d-=f+g*g;if(0>d)return!1;if(null==b)return!0;var f=this.sZ,g=b.sZ,h=m(b.sD/2);if(f<g-h)return!0;a=b.sX-a;c=b.sY-c;c=h*h-(a*a+c*c);return f-Math.sqrt(d)<g-Math.sqrt(c)},"~N,~N,~N,J.modelset.Atom");b(c$,"getInfo",function(){return this.getIdentity(!0)});b(c$,"getInfoXYZ",function(a){if(a){a=this.getGroup3(!0);var c=this.getChainID(),d=this.getFractionalCoordPt(!0);return"Atom: "+(null==a?this.getElementSymbol():this.getAtomName())+" "+this.getAtomNumber()+(null!=a&&0<a.length?(this.isHetero()?
" Hetero: ":" Group: ")+a+" "+this.getResno()+(0!=c&&32!=c?" Chain: "+this.group.chain.getIDStr():""):"")+" Model: "+this.getModelNumber()+" Coordinates: "+this.x+" "+this.y+" "+this.z+(null==d?"":" Fractional: "+d.x+" "+d.y+" "+d.z)}return this.getIdentityXYZ(!0)},"~B");b(c$,"getIdentityXYZ",function(a){var c=this.group.chain.model.isJmolDataFrame?this.getFractionalCoordPt(!1):this;return this.getIdentity(a)+" "+c.x+" "+c.y+" "+c.z},"~B");b(c$,"getIdentity",function(a){var c=new JU.SB,d=this.getGroup3(!0);
if(null!=d&&0<d.length){c.append("[");c.append(d);c.append("]");d=this.getSeqcodeString();null!=d&&c.append(d);d=this.getChainID();if(0!=d&&32!=d){c.append(":");var b=this.getChainIDStr();256<=d&&(b=J.util.Escape.eS(b));c.append(b)}if(!a)return c.toString();c.append(".")}c.append(this.getAtomName());0==c.length()&&(c.append(this.getElementSymbolIso(!1)),c.append(" "),c.appendI(this.getAtomNumber()));0!=this.altloc.charCodeAt(0)&&(c.append("%"),c.appendC(this.altloc));1<this.group.chain.model.modelSet.modelCount&&
(c.append("/"),c.append(this.getModelNumberForLabel()));c.append(" #");c.appendI(this.getAtomNumber());return c.toString()},"~B");e(c$,"getGroup3",function(a){var c=this.group.getGroup3();return a||null!=c&&0<c.length?c:"UNK"},"~B");e(c$,"getGroup1",function(a){var c=this.group.getGroup1();return"\x00"!=c?""+c:"\x00"!=a?""+a:""},"~S");e(c$,"isProtein",function(){return this.group.isProtein()});b(c$,"isCarbohydrate",function(){return this.group.isCarbohydrate()});e(c$,"isNucleic",function(){return this.group.isNucleic()});
e(c$,"isDna",function(){return this.group.isDna()});e(c$,"isRna",function(){return this.group.isRna()});e(c$,"isPurine",function(){return this.group.isPurine()});e(c$,"isPyrimidine",function(){return this.group.isPyrimidine()});b(c$,"getSeqcode",function(){return this.group.seqcode});e(c$,"getResno",function(){return this.group.getResno()});b(c$,"isClickable",function(){return!this.isVisible(0)?!1:0!=((this.shapeVisibilityFlags|this.group.shapeVisibilityFlags)&this.clickabilityFlags)});b(c$,"getClickabilityFlags",
function(){return this.clickabilityFlags});b(c$,"setClickable",function(a){this.clickabilityFlags=0==a?0:this.clickabilityFlags|a},"~N");b(c$,"isVisible",function(a){if(!this.isInFrame()||this.group.chain.model.modelSet.isAtomHidden(this.index))return!1;if(0!=a)return this.isShapeVisible(a);a=this.shapeVisibilityFlags;if(this.group.shapeVisibilityFlags!=J.modelset.Atom.BACKBONE_VISIBILITY_FLAG||this.isLeadAtom())a|=this.group.shapeVisibilityFlags;return 0!=(a&-2)},"~N");e(c$,"isLeadAtom",function(){return this.group.isLeadAtom(this.index)});
b(c$,"getGroupParameter",function(a){return this.group.getGroupParameter(a)},"~N");e(c$,"getChainID",function(){return this.group.chain.chainID});e(c$,"getChainIDStr",function(){return this.group.chain.getIDStr()});b(c$,"getSurfaceDistance100",function(){return this.group.chain.model.modelSet.getSurfaceDistance100(this.index)});b(c$,"getVibrationVector",function(){return this.group.chain.model.modelSet.getVibration(this.index,!1)});b(c$,"getVibrationCoord",function(a){return this.group.chain.model.modelSet.getVibrationCoord(this.index,
a)},"~S");b(c$,"getPolymerLength",function(){return this.group.getBioPolymerLength()});b(c$,"getPolymerIndexInModel",function(){return this.group.getBioPolymerIndexInModel()});b(c$,"getMonomerIndex",function(){return this.group.getMonomerIndex()});b(c$,"getSelectedGroupCountWithinChain",function(){return this.group.chain.selectedGroupCount});b(c$,"getSelectedGroupIndexWithinChain",function(){return this.group.getSelectedGroupIndex()});b(c$,"getSelectedMonomerCountWithinPolymer",function(){return this.group.getSelectedMonomerCount()});
b(c$,"getSelectedMonomerIndexWithinPolymer",function(){return this.group.getSelectedMonomerIndex()});b(c$,"getChain",function(){return this.group.chain});b(c$,"getModelNumberForLabel",function(){return this.group.chain.model.modelSet.getModelNumberForAtomLabel(this.modelIndex)});b(c$,"getModelNumber",function(){return this.group.chain.model.modelSet.getModelNumber(this.modelIndex)%1E6});b(c$,"getModelFileIndex",function(){return this.group.chain.model.fileIndex});b(c$,"getModelFileNumber",function(){return this.group.chain.model.modelSet.getModelFileNumber(this.modelIndex)});
e(c$,"getBioStructureTypeName",function(){return this.getProteinStructureType().getBioStructureTypeName(!0)});b(c$,"getProteinStructureType",function(){return this.group.getProteinStructureType()});b(c$,"getProteinStructureSubType",function(){return this.group.getProteinStructureSubType()});b(c$,"getStrucNo",function(){return this.group.getStrucNo()});b(c$,"getStructureId",function(){return this.group.getStructureId()});b(c$,"getProteinStructureTag",function(){return this.group.getProteinStructureTag()});
b(c$,"getGroupID",function(){return this.group.groupID});b(c$,"getSeqcodeString",function(){return this.group.getSeqcodeString()});b(c$,"getInsertionCode",function(){return this.group.getInsertionCode()});e(c$,"equals",function(a){return this===a},"~O");e(c$,"hashCode",function(){return this.index});b(c$,"findAromaticNeighbor",function(a){if(null==this.bonds)return null;for(var c=this.bonds.length;0<=--c;){var d=this.bonds[c],b=d.getOtherAtom(this);if(d.isAromatic()&&b.index!=a)return b}return null},
"~N");c$.atomPropertyInt=b(c$,"atomPropertyInt",function(a,c){switch(c){case 1095763969:return a.getAtomNumber();case 1095761922:return a.atomID;case 1095761923:return a.getIndex();case 1095761924:return a.getCovalentBondCount();case 1095761927:return a.group.chain.index+1;case 1766856708:return a.group.chain.model.modelSet.viewer.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.modelIndex;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 1095761940:return a.getAtomSite();case 1641025539:return a.getProteinStructureType().getId();case 1238369286:return a.getProteinStructureSubType().getId();case 1095761941:return a.getStrucNo();case 1297090050:return a.getSymOp();case 1095763990:return a.getValence()}return 0},"J.modelset.Atom,~N");b(c$,"getSymOp",function(){return null==this.atomSymmetry?0:this.atomSymmetry.nextSetBit(0)+1});c$.atomPropertyFloat=b(c$,"atomPropertyFloat",function(a,c,d){switch(d){case 1666189314:return c.getRadius();
case 1114638363:return a.isAtomSelected(c.index)?1:0;case 1112539151:return c.group.chain.model.modelSet.getSurfaceDistanceMax(),c.getSurfaceDistance100()/100;case 1112541199:return c.getBfactor100()/100;case 1114638362:return c.getHydrophobicity();case 1313866249:return c.getVolume(a,J.constant.EnumVdw.AUTO);case 1112539137:return c.getADPMinMax(!0);case 1112539138:return c.getADPMinMax(!1);case 1112541185:case 1112541205:return c.x;case 1112541186:case 1112541206:return c.y;case 1112541187:case 1112541207:return c.z;
case 1112539140:return c.getCovalentRadiusFloat();case 1112541188:return c.getFractionalCoord("X",!0);case 1112541189:return c.getFractionalCoord("Y",!0);case 1112541190:return c.getFractionalCoord("Z",!0);case 1112541191:return c.getFractionalCoord("X",!1);case 1112541192:return c.getFractionalCoord("Y",!1);case 1112541193:return c.getFractionalCoord("Z",!1);case 1112539147:return c.sX;case 1112539148:return c.group.chain.model.modelSet.viewer.getScreenHeight()-c.sY;case 1112539149:return c.sZ;case 1112541195:return c.getBondingRadiusFloat();
case 1112539143:return c.getMass();case 1129318401:return c.getOccupancy100()/100;case 1112541196:return c.getPartialCharge();case 1112539145:case 1112539146:case 1112539144:if(c.group.chain.model.isJmolDataFrame&&c.group.chain.model.jmolFrameType.startsWith("plot ramachandran"))switch(d){case 1112539145:return c.getFractionalCoord("X",!1);case 1112539146:return c.getFractionalCoord("Y",!1);case 1112539144:if(c.group.chain.model.isJmolDataFrame&&c.group.chain.model.jmolFrameType.equals("plot ramachandran"))return a=
c.getFractionalCoord("Z",!1)-180,-180>a?360+a:a}return c.getGroupParameter(d);case 1112539141:case 1112539152:case 1112539150:return c.getGroupParameter(d);case 1113200651:return c.getRadius();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.getAtomShapeValue(d,c.group,c.index);case 1112539153:return c.getFractionalUnitCoord("X");case 1112539154:return c.getFractionalUnitCoord("Y");
case 1112539155:return c.getFractionalUnitCoord("Z");case 1649412120:return c.getVanderwaalsRadiusFloat(a,J.constant.EnumVdw.AUTO);case 1112541202:return c.getVibrationCoord("X");case 1112541203:return c.getVibrationCoord("Y");case 1112541204:return c.getVibrationCoord("Z");case 1649410049:return c=c.getVibrationVector(),null==c?0:c.length()*a.getFloat(1649410049);case 1112539142:return a.getNMRCalculation().getMagneticShielding(c);case 1112539139:return a.getNMRCalculation().getChemicalShift(c)}return J.modelset.Atom.atomPropertyInt(c,
d)},"J.viewer.Viewer,J.modelset.Atom,~N");b(c$,"getMass",function(){var a=this.getIsotopeNumber();return 0<a?a:J.util.Elements.getAtomicMass(this.getElementNumber())});c$.atomPropertyString=b(c$,"atomPropertyString",function(a,c,d){switch(d){case 1087373315:return a=c.altloc,"\x00"==a?"":""+a;case 1087375362:return c.getAtomName();case 1087375361:return c.getAtomType();case 1087373316:return c.getChainIDStr();case 1087373320:return c.getGroup1("?");case 1087373319:return c.getGroup1("\x00");case 1087373318:return c.getGroup3(!1);
case 1087375365:return c.getElementSymbolIso(!0);case 1087373321:return c.getIdentity(!0);case 1087373322:return a=c.getInsertionCode(),"\x00"==a?"":""+a;case 1826248715:case 1288701960:return a=c.group.chain.model.modelSet.getAtomLabel(c.getIndex()),null==a&&(a=""),a;case 1641025539:return c.getProteinStructureType().getBioStructureTypeName(!1);case 1238369286:return c.getProteinStructureSubType().getBioStructureTypeName(!1);case 1087373324:return c.getStructureId();case 1087373323:return a.getHybridizationAndAxes(c.index,
null,null,"d");case 1087375373:return c.getElementSymbolIso(!1);case 1089470478:return c.getSymmetryOperatorList()}return""},"J.viewer.Viewer,J.modelset.Atom,~N");c$.atomPropertyTuple=b(c$,"atomPropertyTuple",function(a,c){switch(c){case 1146095627:return a.getFractionalCoordPt(!a.group.chain.model.isJmolDataFrame);case 1146095629:return a.getFractionalCoordPt(!1);case 1146093582:return a.group.chain.model.isJmolDataFrame?a.getFractionalCoordPt(!1):a.getFractionalUnitCoordPt(!1);case 1146095628:return JU.P3.new3(a.sX,
a.group.chain.model.modelSet.viewer.getScreenHeight()-a.sY,a.sZ);case 1146095631:var d=a.getVibrationVector();null==d&&(d=new JU.V3);return d;case 1146095626:return a;case 1766856708:return JU.CU.colorPtFromInt2(a.group.chain.model.modelSet.viewer.getColorArgbOrGray(a.getColix()))}return null},"J.modelset.Atom,~N");b(c$,"isWithinStructure",function(a){return this.group.isWithinStructure(a)},"J.constant.EnumStructure");e(c$,"getOffsetResidueAtom",function(a,c){return this.group.chain.model.modelSet.getGroupAtom(this,
c,a)},"~S,~N");e(c$,"isCrossLinked",function(a){return this.group.isCrossLinked(a.getGroup())},"J.util.JmolNode");e(c$,"getCrossLinkLeadAtomIndexes",function(a){return this.group.getCrossLinkLead(a)},"JU.List");e(c$,"toString",function(){return this.getInfo()});b(c$,"isWithinFourBonds",function(a){if(this.modelIndex!=a.modelIndex)return!1;if(this.isCovalentlyBonded(a))return!0;for(var c=a.bonds,d=0;d<c.length;d++){var b=c[d].getOtherAtom(a);if(this.isCovalentlyBonded(b))return!0;for(var f=0;f<this.bonds.length;f++)if(this.bonds[f].getOtherAtom(this).isCovalentlyBonded(b))return!0}return!1},
"J.modelset.Atom");e(c$,"findAtomsLike",function(a){return this.group.chain.model.modelSet.viewer.getAtomBitSet(a)},"~S");B(c$,"VIBRATION_VECTOR_FLAG",1,"IS_HETERO_FLAG",2,"FLAG_MASK",3,"RADIUS_MAX",16,"RADIUS_GLOBAL",16.1,"MAD_GLOBAL",32200);c$.BACKBONE_VISIBILITY_FLAG=c$.prototype.BACKBONE_VISIBILITY_FLAG=J.viewer.JC.getShapeVisibilityFlag(9)});p("J.modelset");q(["java.lang.Float","JU.BS","$.V3"],"J.modelset.AtomCollection","java.lang.Character java.util.Arrays $.Hashtable JU.A4 $.AU $.List $.M3 $.P3 $.PT J.api.Interface J.atomdata.RadiusData J.constant.EnumPalette $.EnumStructure $.EnumVdw J.modelset.Group J.script.T J.util.BSUtil $.Elements $.Escape $.Logger $.Measure $.Parser $.Txt $.Vibration J.viewer.JC".split(" "),
function(){c$=u(function(){this.atoms=this.g3d=this.viewer=null;this.atomCount=0;this.surfaceDistance100s=this.atomTensors=this.atomTensorList=this.hydrophobicities=this.ionicRadii=this.partialCharges=this.bfactor100s=this.occupancies=this.vibrations=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=null;this.preserveState=!0;this.tainted=null;this.canSkipLoad=!0;this.aaRet=this.bsFoundRectangle=this.bsEmpty=null;la("J.modelset.AtomCollection.AtomSorter")||J.modelset.AtomCollection.$AtomCollection$AtomSorter$();this.bsModulated=null;t(this,arguments)},J.modelset,"AtomCollection");N(c$,function(){this.bsHidden=new JU.BS;this.bsEmpty=new JU.BS;this.bsFoundRectangle=new JU.BS});b(c$,"releaseModelSet",function(){this.releaseModelSetAC()});b(c$,"releaseModelSetAC",
function(){this.atomTensors=this.ionicRadii=this.partialCharges=this.bfactor100s=this.occupancies=this.vibrations=this.atomSerials=this.atomTypes=this.atomNames=this.tainted=this.bsSurface=this.surfaceDistance100s=this.bspf=this.g3d=this.viewer=this.atoms=null});b(c$,"mergeAtomArrays",function(a){this.tainted=a.tainted;this.atomNames=a.atomNames;this.atomTypes=a.atomTypes;this.atomSerials=a.atomSerials;this.vibrations=a.vibrations;this.occupancies=a.occupancies;this.bfactor100s=a.bfactor100s;this.ionicRadii=
a.ionicRadii;this.partialCharges=a.partialCharges;this.atomTensors=a.atomTensors;this.atomTensorList=a.atomTensorList;this.bsModulated=a.bsModulated;this.setHaveStraightness(!1);this.surfaceDistance100s=null},"J.modelset.AtomCollection");b(c$,"setHaveStraightness",function(a){this.haveStraightness=a},"~B");b(c$,"getHaveStraightness",function(){return this.haveStraightness});b(c$,"getAtomPointVector",function(a){var c=new JU.List;if(null!=a)for(var d=a.nextSetBit(0);0<=d;d=a.nextSetBit(d+1))c.addLast(this.atoms[d]);
return c},"JU.BS");b(c$,"getAtomCount",function(){return this.atomCount});b(c$,"modelSetHasVibrationVectors",function(){return null!=this.vibrations});b(c$,"getAtomTypes",function(){return this.atomTypes});b(c$,"getPartialCharges",function(){return this.partialCharges});b(c$,"getIonicRadii",function(){return this.ionicRadii});b(c$,"getBFactors",function(){return this.bfactor100s});b(c$,"getHydrophobicity",function(){return this.hydrophobicities});b(c$,"setBsHidden",function(a){this.bsHidden=a},"JU.BS");
b(c$,"isAtomHidden",function(a){return this.bsHidden.get(a)},"~N");b(c$,"getAtomInfo",function(a,c){return null==c?this.atoms[a].getInfo():this.getLabeler().formatLabel(this.viewer,this.atoms[a],c)},"~N,~S");b(c$,"getLabeler",function(){return null==this.labeler?this.labeler=J.api.Interface.getOptionInterface("modelset.LabelToken"):this.labeler});b(c$,"getAtomInfoXYZ",function(a,c){return this.atoms[a].getInfoXYZ(c)},"~N,~B");b(c$,"getElementSymbol",function(a){return this.atoms[a].getElementSymbol()},
"~N");b(c$,"getElementNumber",function(a){return this.atoms[a].getElementNumber()},"~N");b(c$,"getElementName",function(a){return J.util.Elements.elementNameFromNumber(this.atoms[a].getAtomicAndIsotopeNumber())},"~N");b(c$,"getAtomName",function(a){return this.atoms[a].getAtomName()},"~N");b(c$,"getAtomNumber",function(a){return this.atoms[a].getAtomNumber()},"~N");b(c$,"getAtomPoint3f",function(a){return this.atoms[a]},"~N");b(c$,"getAtomRadius",function(a){return this.atoms[a].getRadius()},"~N");
b(c$,"getAtomVdwRadius",function(a,c){return this.atoms[a].getVanderwaalsRadiusFloat(this.viewer,c)},"~N,J.constant.EnumVdw");b(c$,"getAtomColix",function(a){return this.atoms[a].getColix()},"~N");b(c$,"getAtomChain",function(a){return this.atoms[a].getChainIDStr()},"~N");b(c$,"getQuaternion",function(a,c){return 0>a?null:this.atoms[a].group.getQuaternion(c)},"~N,~S");b(c$,"getHelixData",function(a,c){var d=a.nextSetBit(0);return 0>d?"null":this.atoms[d].group.getHelixData(c,this.viewer.getQuaternionFrame(),
this.viewer.getInt(553648146))},"JU.BS,~N");b(c$,"getAtomIndexFromAtomNumber",function(a,c){for(var d=0;d<this.atomCount;d++){var b=this.atoms[d];if(b.getAtomNumber()==a&&c.get(b.modelIndex))return d}return-1},"~N,JU.BS");b(c$,"setFormalCharges",function(a,c){if(null!=a)for(var d=a.nextSetBit(0);0<=d;d=a.nextSetBit(d+1))this.atoms[d].setFormalCharge(c),this.taintAtom(d,4)},"JU.BS,~N");b(c$,"getAtomicCharges",function(){for(var a=M(this.atomCount,0),c=this.atomCount;0<=--c;)a[c]=this.atoms[c].getElementNumber();
return a});b(c$,"getRadiusVdwJmol",function(a){return J.util.Elements.getVanderwaalsMar(a.getElementNumber(),J.constant.EnumVdw.JMOL)/1E3},"J.modelset.Atom");b(c$,"getMaxVanderwaalsRadius",function(){1.4E-45==this.maxVanderwaalsRadius&&this.findMaxRadii();return this.maxVanderwaalsRadius});b(c$,"findMaxRadii",function(){for(var a=this.atomCount;0<=--a;){var c=this.atoms[a],d=c.getBondingRadiusFloat();d>this.maxBondingRadius&&(this.maxBondingRadius=d);c=c.getVanderwaalsRadiusFloat(this.viewer,J.constant.EnumVdw.AUTO);
c>this.maxVanderwaalsRadius&&(this.maxVanderwaalsRadius=c)}});b(c$,"clearBfactorRange",function(){this.hasBfactorRange=!1});b(c$,"calcBfactorRange",function(a){if(!this.hasBfactorRange){this.bfactor100Lo=2147483647;this.bfactor100Hi=-2147483648;if(null==a)for(var c=0;c<this.atomCount;c++)this.setBf(c);else for(c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))this.setBf(c);this.hasBfactorRange=!0}},"JU.BS");b(c$,"setBf",function(a){a=this.atoms[a].getBfactor100();a<this.bfactor100Lo?this.bfactor100Lo=a:
a>this.bfactor100Hi&&(this.bfactor100Hi=a)},"~N");b(c$,"getBfactor100Lo",function(){this.hasBfactorRange||(this.viewer.global.rangeSelected?this.calcBfactorRange(this.viewer.getSelectionSet(!1)):this.calcBfactorRange(null));return this.bfactor100Lo});b(c$,"getBfactor100Hi",function(){this.getBfactor100Lo();return this.bfactor100Hi});b(c$,"getSurfaceDistanceMax",function(){null==this.surfaceDistance100s&&this.calcSurfaceDistances();return this.surfaceDistanceMax});b(c$,"calculateVolume",function(a,
c){var d=0;if(null!=a)for(var b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1))d+=this.atoms[b].getVolume(this.viewer,c);return d},"JU.BS,J.constant.EnumVdw");b(c$,"getSurfaceDistance100",function(a){if(0==this.nSurfaceAtoms)return-1;null==this.surfaceDistance100s&&this.calcSurfaceDistances();return this.surfaceDistance100s[a]},"~N");b(c$,"calcSurfaceDistances",function(){this.calculateSurface(null,-1)});b(c$,"calculateSurface",function(a,c){0>c&&(c=3);var d=J.api.Interface.getOptionInterface("geodesic.EnvelopeCalculation").set(this.viewer,
this.atomCount,null);d.calculate(new J.atomdata.RadiusData(null,c,J.atomdata.RadiusData.EnumType.ABSOLUTE,null),3.4028235E38,a,J.util.BSUtil.copyInvert(a,this.atomCount),!1,!1,!1,!0);var b=d.getPoints();this.surfaceDistanceMax=0;this.bsSurface=d.getBsSurfaceClone();this.surfaceDistance100s=D(this.atomCount,0);this.nSurfaceAtoms=J.util.BSUtil.cardinalityOf(this.bsSurface);if(0==this.nSurfaceAtoms||null==b||0==b.length)return b;for(var d=3.4028235E38==c?0:c,f=0;f<this.atomCount;f++)if(this.bsSurface.get(f))this.surfaceDistance100s[f]=
0;else{for(var g=3.4028235E38,h=this.atoms[f],e=b.length;0<=--e;){var j=Math.abs(b[e].distance(h)-d);0>j&&J.util.Logger.debugging&&J.util.Logger.debug("draw d"+e+" "+J.util.Escape.eP(b[e])+' "'+j+" ? "+h.getInfo()+'"');g=Math.min(j,g)}j=this.surfaceDistance100s[f]=m(Math.floor(100*g));this.surfaceDistanceMax=Math.max(this.surfaceDistanceMax,j)}return b},"JU.BS,~N");b(c$,"setAtomCoord2",function(a,c,d){var b=null,f=null,g=null,h=0,e=1;if(s(d,JU.P3))b=d;else if(s(d,JU.List)){g=d;if(0==(e=g.size()))return;
h=1}else if(JU.PT.isAP(d)){f=d;if(0==(e=f.length))return;h=2}else return;d=0;if(null!=a)for(var j=a.nextSetBit(0);0<=j;j=a.nextSetBit(j+1)){switch(h){case 1:if(d>=e)return;b=g.get(d++);break;case 2:if(d>=e)return;b=f[d++]}switch(c){case 1146095626:this.setAtomCoord(j,b.x,b.y,b.z);break;case 1146095627:this.atoms[j].setFractionalCoordTo(b,!0);this.taintAtom(j,2);break;case 1146095629:this.atoms[j].setFractionalCoordTo(b,!1);this.taintAtom(j,2);break;case 1146095631:this.setAtomVibrationVector(j,b)}}},
"JU.BS,~N,~O");b(c$,"setAtomVibrationVector",function(a,c){this.setVibrationVector(a,c);this.taintAtom(a,12)},"~N,JU.T3");b(c$,"setAtomCoord",function(a,c,d,b){if(!(0>a||a>=this.atomCount)){var f=this.atoms[a];f.set(c,d,b);this.fixTrajectory(f);this.taintAtom(a,2)}},"~N,~N,~N,~N");b(c$,"fixTrajectory",function(a){var c=a.modelIndex;if(this.isTrajectory(c)){var d=null!=this.unitCells&&this.unitCells[c].getCoordinatesAreFractional(),b=this.trajectorySteps.get(c)[a.index-this.models[c].firstAtomIndex];
b.set(a.x,a.y,a.z);d&&this.unitCells[c].toFractional(b,!0)}},"J.modelset.Atom");b(c$,"setAtomCoordRelative",function(a,c,d,b){if(!(0>a||a>=this.atomCount)){var f=this.atoms[a];f.x+=c;f.y+=d;f.z+=b;this.fixTrajectory(f);this.taintAtom(a,2)}},"~N,~N,~N,~N");b(c$,"setAtomsCoordRelative",function(a,c,d,b){if(null!=a)for(var f=a.nextSetBit(0);0<=f;f=a.nextSetBit(f+1))this.setAtomCoordRelative(f,c,d,b)},"JU.BS,~N,~N,~N");b(c$,"setAPa",function(a,c,d,b,f,g,h){var e=0;if(!(null!=g&&0==g.length||null==a)){for(var j=
null!=g&&g.length==this.atomCount||null!=h&&h.length==this.atomCount,k=a.nextSetBit(0);0<=k;k=a.nextSetBit(k+1)){j&&(e=k);if(null!=g){if(e>=g.length)return;b=g[e++];d=z(b)}else if(null!=h){if(e>=h.length)return;f=h[e++]}var v=this.atoms[k];switch(c){case 1087375362:this.taintAtom(k,0);this.setAtomName(k,f);break;case 1095763969:this.taintAtom(k,13);this.setAtomNumber(k,d);break;case 1087375361:this.taintAtom(k,1);this.setAtomType(k,f);break;case 1112541185:case 1112541205:this.setAtomCoord(k,b,v.y,
v.z);break;case 1112541186:case 1112541206:this.setAtomCoord(k,v.x,b,v.z);break;case 1112541187:case 1112541207:this.setAtomCoord(k,v.x,v.y,b);break;case 1112541202:case 1112541203:case 1112541204:this.setVibrationVector2(k,c,b);break;case 1112541188:case 1112541189:case 1112541190:v.setFractionalCoord(c,b,!0);this.taintAtom(k,2);break;case 1112541191:case 1112541192:case 1112541193:v.setFractionalCoord(c,b,!1);this.taintAtom(k,2);break;case 1095763978:case 1087375365:this.setElement(v,d);break;case 1632634891:v.setFormalCharge(d);
this.taintAtom(k,4);break;case 1114638362:this.setHydrophobicity(k,b)&&this.taintAtom(k,5);break;case 1826248715:case 1288701960:this.viewer.setAtomLabel(f,k);break;case 1129318401:2>d&&(d=m(Math.floor(100*b)));this.setOccupancy(k,d)&&this.taintAtom(k,7);break;case 1112541196:this.setPartialCharge(k,b)&&this.taintAtom(k,8);break;case 1112541195:this.setIonicRadius(k,b)&&this.taintAtom(k,6);break;case 1666189314:case 1113200651:0>b?b=0:16<b&&(b=16.1);v.madAtom=pa(2E3*b);break;case 1114638363:this.viewer.setSelectedAtom(v.index,
0!=b);break;case 1112541199:this.setBFactor(k,b)&&this.taintAtom(k,9);break;case 1095763990:v.setValence(d);this.taintAtom(k,10);break;case 1649412120:v.setRadius(b)?this.taintAtom(k,11):this.untaint(k,11);break;default:J.util.Logger.error("unsettable atom property: "+J.script.T.nameOf(c))}}1114638363==c&&this.viewer.setSelectedAtom(-1,!1)}},"JU.BS,~N,~N,~N,~S,~A,~A");b(c$,"setElement",function(a,c){this.taintAtom(a.index,3);a.setAtomicAndIsotopeNumber(c);a.setPaletteID(J.constant.EnumPalette.CPK.id);
a.setColixAtom(this.viewer.getColixAtomPalette(a,J.constant.EnumPalette.CPK.id))},"J.modelset.Atom,~N");b(c$,"getVibrationCoord",function(a,c){var d;if(null==this.vibrations||null==(d=this.vibrations[a]))return 0;switch(c){case "X":return d.x;case "Y":return d.y;default:return d.z}},"~N,~S");b(c$,"getVibration",function(a,c){var d=null==this.vibrations?null:this.vibrations[a];return null==d&&c?new J.util.Vibration:d},"~N,~B");b(c$,"setVibrationVector",function(a,c){if(!Float.isNaN(c.x)&&!Float.isNaN(c.y)&&
!Float.isNaN(c.z)){if(null==this.vibrations||this.vibrations.length<a)this.vibrations=Array(this.atoms.length);s(c,J.util.Vibration)?this.vibrations[a]=c:(null==this.vibrations[a]&&(this.vibrations[a]=new J.util.Vibration),this.vibrations[a].setT(c));this.atoms[a].setVibrationVector()}},"~N,JU.T3");b(c$,"setVibrationVector2",function(a,c,d){var b=this.getVibration(a,!0);switch(c){case 1112541202:b.x=d;break;case 1112541203:b.y=d;break;case 1112541204:b.z=d}this.setAtomVibrationVector(a,b)},"~N,~N,~N");
b(c$,"setAtomName",function(a,c){var d=J.viewer.JC.lookupSpecialAtomID(c);this.atoms[a].atomID=d;0<d&&this.models[this.atoms[a].modelIndex].isBioModel||(null==this.atomNames&&(this.atomNames=Array(this.atoms.length)),this.atomNames[a]=c)},"~N,~S");b(c$,"setAtomType",function(a,c){null==this.atomTypes&&(this.atomTypes=Array(this.atoms.length));this.atomTypes[a]=c},"~N,~S");b(c$,"setAtomNumber",function(a,c){null==this.atomSerials&&(this.atomSerials=D(this.atoms.length,0));this.atomSerials[a]=c;return!0},
"~N,~N");b(c$,"setOccupancy",function(a,c){if(null==this.occupancies){if(100==c)return!1;this.occupancies=T(this.atoms.length,0);for(var d=this.atoms.length;0<=--d;)this.occupancies[d]=100}this.occupancies[a]=255<c?255:0>c?0:c;return!0},"~N,~N");b(c$,"setPartialCharge",function(a,c){if(Float.isNaN(c))return!1;if(null==this.partialCharges){if(0==c&&!Float.$valueOf(c).equals(J.modelset.AtomCollection.MINUSZERO))return!1;this.partialCharges=M(this.atoms.length,0)}this.partialCharges[a]=c;return!0},"~N,~N");
b(c$,"setIonicRadius",function(a,c){if(Float.isNaN(c))return!1;null==this.ionicRadii&&(this.ionicRadii=M(this.atoms.length,0));this.ionicRadii[a]=c;return!0},"~N,~N");b(c$,"setBFactor",function(a,c){if(Float.isNaN(c))return!1;if(null==this.bfactor100s){if(0==c&&null==this.bfactor100s)return!1;this.bfactor100s=ea(this.atoms.length,0)}this.bfactor100s[a]=Ja(100*(-327.68>c?-327.68:327.67<c?327.67:c)+(0>c?-0.5:0.5));return!0},"~N,~N");b(c$,"setHydrophobicity",function(a,c){if(Float.isNaN(c))return!1;
if(null==this.hydrophobicities){this.hydrophobicities=M(this.atoms.length,0);for(var d=0;d<this.atoms.length;d++)this.hydrophobicities[d]=J.util.Elements.getHydrophobicity(this.atoms[d].getGroupID())}this.hydrophobicities[a]=c;return!0},"~N,~N");b(c$,"setAtomData",function(a,c,d,b){var f=null,g=null;switch(a){case 2:this.loadCoordinates(d,!1,!b);return;case 12:this.loadCoordinates(d,!0,!0);return;case 14:f=M(this.atomCount,0),g=J.util.BSUtil.newBitSet(this.atomCount)}b=J.util.Parser.markLines(d,";");
var h=0;try{for(var e=JU.PT.parseInt(d.substring(0,b[0]-1)),j=1;j<=e;j++){var k=JU.PT.getTokens(JU.PT.parseTrimmed(d.substring(b[j],b[j+1]-1))),v=JU.PT.parseInt(k[0])-1;if(!(0>v||v>=this.atomCount)){var A=this.atoms[v];h++;var m=k.length-1,x=JU.PT.parseFloat(k[m]);switch(a){case 14:f[v]=x;g.set(v);continue;case 13:this.setAtomNumber(v,z(x));break;case 0:this.setAtomName(v,k[m]);break;case 1:this.setAtomType(v,k[m]);break;case 3:A.setAtomicAndIsotopeNumber(z(x));A.setPaletteID(J.constant.EnumPalette.CPK.id);
A.setColixAtom(this.viewer.getColixAtomPalette(A,J.constant.EnumPalette.CPK.id));break;case 4:A.setFormalCharge(z(x));break;case 5:this.setHydrophobicity(v,x);break;case 6:this.setIonicRadius(v,x);break;case 8:this.setPartialCharge(v,x);break;case 9:this.setBFactor(v,x);break;case 10:A.setValence(z(x));break;case 11:A.setRadius(x)}this.taintAtom(v,a)}}14==a&&0<h&&this.viewer.setData(c,[c,f,g,Integer.$valueOf(1)],0,0,0,0,0)}catch(p){if(y(p,Exception))J.util.Logger.error("AtomCollection.loadData error: "+
p);else throw p;}},"~N,~S,~S,~B");b(c$,"loadCoordinates",function(a,c,d){var b=J.util.Parser.markLines(a,";"),f=c?new JU.V3:null;try{for(var g=JU.PT.parseInt(a.substring(0,b[0]-1)),h=1;h<=g;h++){var e=JU.PT.getTokens(JU.PT.parseTrimmed(a.substring(b[h],b[h+1]))),j=JU.PT.parseInt(e[0])-1,k=JU.PT.parseFloat(e[3]),v=JU.PT.parseFloat(e[4]),A=JU.PT.parseFloat(e[5]);c?(f.set(k,v,A),this.setAtomVibrationVector(j,f)):(this.setAtomCoord(j,k,v,A),d||this.untaint(j,2))}}catch(m){if(y(m,Exception))J.util.Logger.error("Frame.loadCoordinate error: "+
m);else throw m;}},"~S,~B,~B");b(c$,"validateBspf",function(a){null!=this.bspf&&this.bspf.validate(a)},"~B");b(c$,"validateBspfForModel",function(a,c){null!=this.bspf&&this.bspf.validateModel(a,c)},"~N,~B");b(c$,"setPreserveState",function(a){this.preserveState=a},"~B");c$.getUserSettableType=b(c$,"getUserSettableType",function(a){var c=0==a.indexOf("property_");a=c?a.substring(9):a;for(var d=0;14>d;d++)if(J.modelset.AtomCollection.userSettableValues[d].equalsIgnoreCase(a))return d;return c?14:-1},
"~S");b(c$,"getTaintedAtoms",function(a){return null==this.tainted?null:this.tainted[a]},"~N");b(c$,"taintAtoms",function(a,c){this.canSkipLoad=!1;if(this.preserveState)for(var d=a.nextSetBit(0);0<=d;d=a.nextSetBit(d+1))this.taintAtom(d,c)},"JU.BS,~N");b(c$,"taintAtom",function(a,c){this.preserveState&&(null==this.tainted&&(this.tainted=Array(14)),null==this.tainted[c]&&(this.tainted[c]=J.util.BSUtil.newBitSet(this.atomCount)),this.tainted[c].set(a),2==c&&this.validateBspfForModel(this.models[this.atoms[a].modelIndex].trajectoryBaseIndex,
!1))},"~N,~N");b(c$,"untaint",function(a,c){this.preserveState&&(null==this.tainted||null==this.tainted[c]||this.tainted[c].clear(a))},"~N,~N");b(c$,"setTaintedAtoms",function(a,c){this.preserveState&&(null==a?null!=this.tainted&&(this.tainted[c]=null):(null==this.tainted&&(this.tainted=Array(14)),null==this.tainted[c]&&(this.tainted[c]=J.util.BSUtil.newBitSet(this.atomCount)),J.util.BSUtil.copy2(a,this.tainted[c])))},"JU.BS,~N");b(c$,"unTaintAtoms",function(a,c){if(!(null==this.tainted||null==this.tainted[c])){for(var d=
a.nextSetBit(0);0<=d;d=a.nextSetBit(d+1))this.tainted[c].clear(d);0>this.tainted[c].nextSetBit(0)&&(this.tainted[c]=null)}},"JU.BS,~N");b(c$,"findNearest2",function(a,c,d,b,f){for(var g=null,h=this.atomCount;0<=--h;)if(!(null!=b&&b.get(h))){var e=this.atoms[h];e.isClickable()&&this.isCursorOnTopOf(e,a,c,f,g)&&(g=e)}d[0]=g},"~N,~N,~A,JU.BS,~N");b(c$,"isCursorOnTopOf",function(a,c,d,b,f){return 1<a.sZ&&!this.g3d.isClippedZ(a.sZ)&&this.g3d.isInDisplayRange(a.sX,a.sY)&&a.isCursorOnTopOf(c,d,b,f)},"J.modelset.Atom,~N,~N,~N,J.modelset.Atom");
b(c$,"findAtomsInRectangle",function(a,c){this.bsFoundRectangle.and(this.bsEmpty);for(var d=this.atomCount;0<=--d;){var b=this.atoms[d];c.get(b.modelIndex)&&(b.isVisible(0)&&a.contains(b.sX,b.sY))&&this.bsFoundRectangle.set(d)}return this.bsFoundRectangle},"J.util.Rectangle,JU.BS");b(c$,"fillADa",function(a,c){a.atomXyz=this.atoms;a.atomCount=this.atomCount;a.atomicNumber=D(this.atomCount,0);var d=0!=(c&2);d&&(a.atomRadius=M(this.atomCount,0));for(var b=0!=(c&16),f=0;f<this.atomCount;f++){var g=this.atoms[f];
g.isDeleted()||!b&&0<=a.modelIndex&&g.modelIndex!=a.firstModelIndex?(null==a.bsIgnored&&(a.bsIgnored=new JU.BS),a.bsIgnored.set(f)):(a.atomicNumber[f]=g.getElementNumber(),a.lastModelIndex=g.modelIndex,d&&(a.atomRadius[f]=this.getWorkingRadius(g,a)))}},"J.atomdata.AtomData,~N");b(c$,"getWorkingRadius",function(a,c){var d=0,b=c.radiusData;switch(b.factorType){case J.atomdata.RadiusData.EnumType.ABSOLUTE:d=b.value;break;case J.atomdata.RadiusData.EnumType.FACTOR:case J.atomdata.RadiusData.EnumType.OFFSET:switch(b.vdwType){case J.constant.EnumVdw.IONIC:d=
a.getBondingRadiusFloat();break;case J.constant.EnumVdw.ADPMAX:d=a.getADPMinMax(!0);break;case J.constant.EnumVdw.ADPMIN:d=a.getADPMinMax(!1);break;default:d=a.getVanderwaalsRadiusFloat(this.viewer,c.radiusData.vdwType)}d=b.factorType===J.atomdata.RadiusData.EnumType.FACTOR?d*b.value:d+b.value}return d+b.valueExtended},"J.modelset.Atom,J.atomdata.AtomData");b(c$,"calculateHydrogens",function(a,c,d,b,f){var g=new JU.V3,h=new JU.V3,e=Array(this.atomCount),j=this.viewer.getDeletedAtoms(),k,v=0;if(null!=
a)for(var A=a.nextSetBit(0);0<=A;A=a.nextSetBit(A+1))if(!(null!=j&&j.get(A))){var m=this.atoms[A],x=m.getElementNumber();if(!(b&&6!=x)){var p=6>=x?1.1:10>=x?1:1.3;switch(x){case 7:case 8:p=1}if(!(d&&0<m.getCovalentHydrogenCount())&&(k=this.getImplicitHydrogenCount(m,!1),0!=k)){var r=this.aaRet[0],q=this.aaRet[2],s=this.aaRet[3];e[A]=Array(k);var t=0;if(0==s)switch(k){case 4:g.set(0.635,0.635,0.635),k=JU.P3.newP(g),k.add(m),e[A][t++]=k,null!=f&&f.addLast(m);case 3:g.set(-0.635,-0.635,0.635),k=JU.P3.newP(g),
k.add(m),e[A][t++]=k,null!=f&&f.addLast(m);case 2:g.set(-0.635,0.635,-0.635),k=JU.P3.newP(g),k.add(m),e[A][t++]=k,null!=f&&f.addLast(m);case 1:g.set(0.635,-0.635,-0.635),k=JU.P3.newP(g),k.add(m),e[A][t++]=k,null!=f&&f.addLast(m)}else switch(k){case 3:this.getHybridizationAndAxes(A,x,g,h,"sp3b",!1,!0);k=new JU.P3;k.scaleAdd2(p,g,m);e[A][t++]=k;null!=f&&f.addLast(m);this.getHybridizationAndAxes(A,x,g,h,"sp3c",!1,!0);k=new JU.P3;k.scaleAdd2(p,g,m);e[A][t++]=k;null!=f&&f.addLast(m);this.getHybridizationAndAxes(A,
x,g,h,"sp3d",!1,!0);k=new JU.P3;k.scaleAdd2(p,g,m);e[A][t++]=k;null!=f&&f.addLast(m);break;case 2:q=2==q||5==x||1==s&&4==r||7==x&&this.isAdjacentSp2(m);this.getHybridizationAndAxes(A,x,g,h,q?"sp2b":3==r?"sp3c":"lpa",!1,!0);k=JU.P3.newP(g);k.scaleAdd2(p,g,m);e[A][t++]=k;null!=f&&f.addLast(m);this.getHybridizationAndAxes(A,x,g,h,q?"sp2c":3==r?"sp3d":"lpb",!1,!0);k=JU.P3.newP(g);k.scaleAdd2(p,g,m);e[A][t++]=k;null!=f&&f.addLast(m);break;case 1:switch(r-s){case 1:if(8==x&&m===m.getGroup().getCarbonylOxygenAtom()){e[A]=
null;continue}null!=this.getHybridizationAndAxes(A,x,g,h,2==q||5==x||7==x&&this.isAdjacentSp2(m)?"sp2c":"sp3d",!0,!1)?(k=JU.P3.newP(g),k.scaleAdd2(p,g,m),e[A][t++]=k,null!=f&&f.addLast(m)):e[A]=[];break;case 2:this.getHybridizationAndAxes(A,x,g,h,4==r?"sp2c":"sp2b",!1,!1);k=JU.P3.newP(g);k.scaleAdd2(p,g,m);e[A][t++]=k;null!=f&&f.addLast(m);break;case 3:this.getHybridizationAndAxes(A,x,g,h,"spb",!1,!0),k=JU.P3.newP(g),k.scaleAdd2(p,g,m),e[A][t++]=k,null!=f&&f.addLast(m)}}v+=t}}}c[0]=v;return e},"JU.BS,~A,~B,~B,JU.List");
b(c$,"isAdjacentSp2",function(a){for(var c=a.bonds,d=0;d<c.length;d++)for(var b=c[d].getOtherAtom(a).bonds,f=0;f<b.length;f++)switch(b[f].order){case 515:case 514:case 2:case 3:return!0}return!1},"J.modelset.Atom");b(c$,"getImplicitHydrogenCount",function(a,c){var d=a.getTargetValence();if(0>d)return 0;var b=a.getFormalCharge();null==this.aaRet&&(this.aaRet=D(4,0));this.aaRet[0]=d;this.aaRet[1]=b;this.aaRet[2]=0;this.aaRet[3]=a.getCovalentBondCount();var f=this.models[a.modelIndex],f=f.isBioModel&&
!f.isPdbWithMultipleBonds?a.group.getGroup3():null;null!=f&&0==b&&J.viewer.JC.getAminoAcidValenceAndCharge(f,a.getAtomName(),this.aaRet)&&(d=this.aaRet[0],b=this.aaRet[1]);0!=b&&(d+=4==d?-Math.abs(b):b,this.aaRet[0]=d);d-=a.getValence();return 0>d&&!c?0:d},"J.modelset.Atom,~B");b(c$,"fixFormalCharges",function(a){for(var c=0,d=a.nextSetBit(0);0<=d;d=a.nextSetBit(d+1)){var b=this.atoms[d],f=this.getImplicitHydrogenCount(b,!0);if(0!=f){var g=b.getFormalCharge(),f=g-f;b.setFormalCharge(f);this.taintAtom(d,
4);J.util.Logger.debugging&&J.util.Logger.debug("atom "+b+" formal charge "+g+" -> "+f);c++}}return c},"JU.BS");b(c$,"getHybridizationAndAxes",function(a,c,d,b,f,g,h){var e=0<f.length&&"-"==f.charAt(0)?f.substring(1):f;if(0<=f.indexOf("d")&&!f.endsWith("sp3d"))return this.getHybridizationAndAxesD(a,d,b,e);var j=this.atoms[a];0==c&&(c=j.getElementNumber());var k=this.getAttached(j,4,g),v=k.length,m=e.charCodeAt(e.length-1)-97;if(0>m||6<m)m=0;d.set(0,0,0);b.set(0,0,0);for(var F=Array(4),x=0;x<v;x++)F[x]=
JU.V3.newVsub(j,k[x]),F[x].normalize(),d.add(F[x]);0<v&&b.setT(F[0]);x=!1;a=new JU.V3;3<=v&&(2.984513>b.angle(F[1])?a.cross(b,F[1]):a.cross(b,F[2]),a.normalize(),f=new JU.V3,2.984513>F[1].angle(F[2])?f.cross(F[1],F[2]):f.cross(b,F[2]),f.normalize(),x=0.95<=Math.abs(f.dot(a)));var p=0==e.indexOf("sp3"),r=!p&&0==e.indexOf("sp2"),q=!p&&!r&&0==e.indexOf("sp"),s=0==e.indexOf("p"),t=0==e.indexOf("lp");f=null;if(g){if(0==v)return null;if(p){if(3<m||4<v)return null}else if(r){if(2<m||3<v)return null}else if(q&&
(1<m||2<v))return null;switch(v){case 1:if(1==c&&!p)return null;if(p){f="sp3";break}switch(k[0].getCovalentBondCount()){case 1:if(2!=k[0].getValence()){f="sp";break}case 2:f=q?"sp":"sp2";break;case 3:if(!r&&!s)return null;f="sp2"}break;case 2:if(0.1>d.length()){if(0<=e.indexOf("2")||0<=e.indexOf("3"))return null;f="sp";break}f=p?"sp3":"sp2";if(0==e.indexOf("sp"))break;if(t){f="lp";break}f=e;break;default:if(x)f="sp2";else{if(t&&3==v){f="lp";break}f="sp3"}}if(null==f)return null;if(0==e.indexOf("p")){if("sp3"===
f)return null}else if(0>e.indexOf(f))return null}if(m<v&&!e.startsWith("p")&&!e.startsWith("l"))return d.sub2(k[m],j),d.normalize(),f;switch(v){case 0:e.equals("sp3c")||e.equals("sp2d")||e.equals("lpa")?d.set(-0.5,-0.7,1):e.equals("sp3b")||e.equals("lpb")?d.set(0.5,-0.7,-1):e.equals("sp3a")?d.set(0,1,0):d.set(0,0,1);b.set(1,0,0);break;case 1:a.setT(J.modelset.AtomCollection.vRef);b.cross(a,d);if(p){for(x=0;x<k[0].bonds.length;x++)if(k[0].bonds[x].isCovalent()&&k[0].getBondedAtomIndex(x)!=j.index&&
(b.sub2(k[0],k[0].bonds[x].getOtherAtom(k[0])),b.cross(d,b),0!=b.length())){b.cross(b,d);break}b.normalize();Float.isNaN(b.x)&&(b.setT(J.modelset.AtomCollection.vRef),b.cross(b,d));a.cross(d,b);a.normalize();d.normalize();b.scaleAdd2(2.828,b,d);3!=m&&(b.normalize(),c=JU.A4.new4(d.x,d.y,d.z,2.09439507*(2==m?1:-1)),h=JU.M3.newM(null),h.setAA(c),h.transform(b));d.setT(b);b.cross(a,d);break}a.cross(b,d);switch(k[0].getCovalentBondCount()){case 1:if(2!=k[0].getValence())break;case 2:h=k[0];b.setT(d);for(a.setT(J.modelset.AtomCollection.vRef);null!=
h&&2==h.getCovalentBondCount();){e=h.bonds;c=null;for(x=0;x<e.length;x++)if(e[x].isCovalent()&&(c=e[x].getOtherAtom(h),c!==j)){a.sub2(c,h);break}a.cross(a,b);if(0.1<a.length()||2!=c.getCovalentBondCount())break;j=h;h=c}0.1<a.length()?(d.cross(a,b),d.normalize(),1==m&&d.scale(-1),d.scale(J.modelset.AtomCollection.sqrt3_2),d.scaleAdd2(0.5,b,d),s&&(a.cross(d,b),d.setT(a),a.setT(b)),b.cross(a,d)):(d.setT(b),b.cross(J.modelset.AtomCollection.vRef,b));break;case 3:this.getHybridizationAndAxes(k[0].index,
0,b,a,"pz",!1,h),a.setT(b),r?(b.cross(b,d),1==m&&b.scale(-1),b.scale(J.modelset.AtomCollection.sqrt3_2),d.scaleAdd2(0.5,d,b)):(a.setT(d),d.setT(b)),b.cross(a,d)}break;case 2:if(0.1>d.length()){if(!e.equals("pz")){c=k[0];(j=3==c.getCovalentBondCount())||(j=3==(c=k[1]).getCovalentBondCount());if(j){this.getHybridizationAndAxes(c.index,0,b,d,"pz",!1,h);e.equals("px")&&b.scale(-1);d.setT(F[0]);break}a.setT(J.modelset.AtomCollection.vRef);d.cross(a,b);a.cross(d,b)}d.setT(b);b.cross(a,d);break}a.cross(d,
b);if(r){b.cross(d,a);break}if(p||t){a.normalize();d.normalize();e.equals("lp")||(0==m||2==m?d.scaleAdd2(-1.2,a,d):d.scaleAdd2(1.2,a,d));b.cross(d,a);break}b.cross(d,a);d.setT(a);0>d.z&&(d.scale(-1),b.scale(-1));break;default:if(p)break;if(!x){b.cross(d,b);break}d.setT(a);0>d.z&&h&&(d.scale(-1),b.scale(-1))}b.normalize();d.normalize();return f},"~N,~N,JU.V3,JU.V3,~S,~B,~B");b(c$,"getHybridizationAndAxesD",function(a,c,d,b){b.startsWith("sp3d2")&&(b="d2sp3"+(5==b.length?"a":b.substring(5)));b.startsWith("sp3d")&&
(b="dsp3"+(4==b.length?"a":b.substring(4)));if(b.equals("d2sp3")||b.equals("dsp3"))b+="a";var f=b.startsWith("dsp3"),g=b.charCodeAt(b.length-1)-97;if(null!=c&&(!f&&(5<g||!b.startsWith("d2sp3"))||f&&4<g))return null;a=this.atoms[a];b=this.getAttached(a,6,!0);if(null==b)return null==c?null:"?";var h=b.length;if(3>h&&null!=c)return null;for(var e=g>=h,j=m(h*(h-1)/2),k=JU.AU.newInt2(j),v=D(3,0),j=D(3,j,0),A=0,F=0,x=0;x<h-1;x++)for(var p=x+1;p<h;p++){var r=J.util.Measure.computeAngleABC(b[x],a,b[p],!0),
r=105>r?0:150<=r?2:1;j[r][v[r]]=A;v[r]++;k[A++]=[x,p];0==x&&1==r&&F++}A=100*v[0]+10*v[1]+v[2];if(null==c)switch(A){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(J.util.Measure.computeTorsion(b[0],a,b[1],b[2],!0))?"trigonal planar":"trigonal pyramidal";case 330:return 1==F%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(A){default:return null;case 201:break;case 210:case 330:case 411:case 631:if(!f)return null;break;case 300:case 402:case 501:case 802:case 1203:if(f)return null}if(e)if(f)switch(v[1]){case 0:c.sub2(b[k[j[0][0]][0]],a);d.sub2(b[k[j[0][0]][1]],a);c.cross(c,d);c.normalize();4==g&&c.scale(-1);v=this.findNotAttached(h,k,j[2],v[2]);x=v.nextSetBit(0);d.sub2(b[x],
a);d.normalize();d.scale(0.5);c.scaleAdd2(J.modelset.AtomCollection.sqrt3_2,c,d);g=-1;break;case 1:4==g?(d=k[j[1][0]],c.add2(b[d[0]],b[d[1]]),c.scaleAdd2(-2,a,c),g=-1):(v=this.findNotAttached(h,k,j[1],v[1]),g=v.nextSetBit(0));break;default:v=this.findNotAttached(h,k,j[1],v[1]),g=v.nextSetBit(0)}else{A=!1;if(4==h)switch(v[2]){case 1:v=this.findNotAttached(h,k,j[2],v[2]);x=v.nextSetBit(0);g=4==g?x:v.nextSetBit(x+1);break;default:A=!0}else{v=this.findNotAttached(h,k,j[2],v[2]);x=v.nextSetBit(0);for(p=
h;p<g&&0<=x;p++)x=v.nextSetBit(x+1);-1==x?A=!0:g=x}A&&(c.sub2(b[k[j[0][0]][0]],a),d.sub2(b[k[j[0][0]][1]],a),c.cross(c,d),4==g&&c.scale(-1),g=-1)}0<=g&&c.sub2(b[g],a);e&&c.scale(-1);c.normalize();return f?"dsp3":"d2sp3"},"~N,JU.V3,JU.V3,~S");b(c$,"getAttached",function(a,c,d){var b=a.getCovalentBondCount();if(b>c)return null;c=Array(b);if(0<b){for(var b=a.bonds,f=0,g=0;g<b.length;g++)b[g].isCovalent()&&(c[f++]=b[g].getOtherAtom(a));d&&java.util.Arrays.sort(c,ka(J.modelset.AtomCollection.AtomSorter,
this,null))}return c},"J.modelset.Atom,~N,~B");b(c$,"findNotAttached",function(a,c,d,b){var f=J.util.BSUtil.newBitSet(a);f.setBits(0,a);for(var g=0;g<a;g++)for(var h=0;h<b;h++){var e=c[d[h]];(e[0]==g||e[1]==g)&&f.clear(g)}return f},"~N,~A,~A,~N");b(c$,"getAtomBitsMDa",function(a,c){var d=new JU.BS,b,f,g=0;switch(a){case 1297090050:b=c.intValue();for(g=this.atomCount;0<=--g;)this.atoms[g].getSymOp()==b&&d.set(g);break;case 1095763969:b=c.intValue();for(g=this.atomCount;0<=--g;)this.atoms[g].getAtomNumber()==
b&&d.set(g);break;case 1087375362:b=","+c+",";for(g=this.atomCount;0<=--g;)f=this.atoms[g].getAtomName(),0<=b.indexOf(f)&&0<=b.indexOf(","+f+",")&&d.set(g);break;case 1087375361:b=","+c+",";for(g=this.atomCount;0<=--g;)f=this.atoms[g].getAtomType(),0<=b.indexOf(f)&&0<=b.indexOf(","+f+",")&&d.set(g);break;case 1048613:b=c.intValue();for(g=this.atomCount;0<=--g;)this.atoms[g].getGroupID()==b&&d.set(g);break;case 1048609:return J.util.BSUtil.copy(this.getChainBits(c.intValue()));case 1048614:return J.util.BSUtil.copy(this.getSeqcodeBits(c.intValue(),
!0));case 1613758470:for(g=this.atomCount;0<=--g;)this.atoms[g].isHetero()&&d.set(g);break;case 1613758476:for(g=this.atomCount;0<=--g;)1==this.atoms[g].getElementNumber()&&d.set(g);break;case 3145744:for(g=this.atomCount;0<=--g;)this.atoms[g].isProtein()&&d.set(g);break;case 3145764:for(g=this.atomCount;0<=--g;)this.atoms[g].isCarbohydrate()&&d.set(g);break;case 137363468:case 3145760:f=137363468==a?J.constant.EnumStructure.HELIX:J.constant.EnumStructure.SHEET;for(g=this.atomCount;0<=--g;)this.atoms[g].isWithinStructure(f)&&
d.set(g);break;case 3145742:for(g=this.atomCount;0<=--g;)this.atoms[g].isNucleic()&&d.set(g);break;case 3145732:for(g=this.atomCount;0<=--g;)this.atoms[g].isDna()&&d.set(g);break;case 3145750:for(g=this.atomCount;0<=--g;)this.atoms[g].isRna()&&d.set(g);break;case 3145746:for(g=this.atomCount;0<=--g;)this.atoms[g].isPurine()&&d.set(g);break;case 3145748:for(g=this.atomCount;0<=--g;)this.atoms[g].isPyrimidine()&&d.set(g);break;case 1087375365:b=c;f=new JU.BS;for(g=b.nextSetBit(0);0<=g;g=b.nextSetBit(g+
1))f.set(this.getElementNumber(g));for(g=this.atomCount;0<=--g;)f.get(this.getElementNumber(g))&&d.set(g);break;case 1095761940:b=c;f=new JU.BS;for(g=b.nextSetBit(0);0<=g;g=b.nextSetBit(g+1))f.set(this.atoms[g].atomSite);for(g=this.atomCount;0<=--g;)f.get(this.atoms[g].atomSite)&&d.set(g);break;case 1073741824:return this.getIdentifierOrNull(c);case 1048608:b=c.toUpperCase();0<=b.indexOf("\\?")&&(b=JU.PT.simpleReplace(b,"\\?","\u0001"));for(g=this.atomCount;0<=--g;)this.isAtomNameMatch(this.atoms[g],
b,!1)&&d.set(g);break;case 1048607:for(g=this.atomCount;0<=--g;)this.atoms[g].isAltLoc(c)&&d.set(g);break;case 1048612:return this.getSpecName(c)}if(0>g)return d;b=c;var h;f=b.nextSetBit(0);if(0>f)return d;g=0;switch(a){case 1087373318:for(g=f;0<=g;g=b.nextSetBit(g+1))f=this.atoms[g].getGroup().selectAtoms(d),f>g&&(g=f);break;case 1095766030:for(g=f;0<=g;g=b.nextSetBit(g+1))if(!d.get(g)){h=this.atoms[g].modelIndex;d.set(g);for(f=g;0<=--f;)if(this.atoms[f].modelIndex==h)d.set(f);else break;for(;++g<
this.atomCount;)if(this.atoms[g].modelIndex==h)d.set(g);else break}break;case 1087373316:b=J.util.BSUtil.copy(c);for(g=b.nextSetBit(0);0<=g;g=b.nextSetBit(g+1))this.atoms[g].getChain().setAtomBitSet(d),b.andNot(d);break;case 1095761937:for(g=f;0<=g;g=b.nextSetBit(g+1))if(!d.get(g)){h=this.atoms[g].getPolymerIndexInModel();d.set(g);for(f=g;0<=--f;)if(this.atoms[f].getPolymerIndexInModel()==h)d.set(f);else break;for(;++g<this.atomCount;)if(this.atoms[g].getPolymerIndexInModel()==h)d.set(g);else break}break;
case 1641025539:for(g=f;0<=g;g=b.nextSetBit(g+1))if(!d.get(g)){h=this.atoms[g].getGroup().getStructure();d.set(g);for(f=g;0<=--f;)if(this.atoms[f].getGroup().getStructure()===h)d.set(f);else break;for(;++g<this.atomCount;)if(this.atoms[g].getGroup().getStructure()===h)d.set(g);else break}}0==g&&J.util.Logger.error("MISSING getAtomBits entry for "+J.script.T.nameOf(a));return d},"~N,~O");b(c$,"getIdentifierOrNull",function(a){var c=this.getSpecNameOrNull(a,!1);0<=a.indexOf("\\?")&&(a=JU.PT.simpleReplace(a,
"\\?","\u0001"));if(null!=c||0<a.indexOf("?"))return c;if(0<a.indexOf("*"))return this.getSpecNameOrNull(a,!0);for(var d=a.length,b=0;b<d&&Character.isLetter(a.charAt(b));)++b;c=this.getSpecNameOrNull(a.substring(0,b),!1);if(b==d)return c;null==c&&(c=new JU.BS);for(var f=b;b<d&&Character.isDigit(a.charAt(b));)++b;var g=0;try{g=Integer.parseInt(a.substring(f,b))}catch(h){if(y(h,NumberFormatException))return null;throw h;}f=" ";b<d&&"^"==a.charAt(b)&&++b<d&&(f=a.charAt(b));g=J.modelset.Group.getSeqcodeFor(g,
f);g=this.getSeqcodeBits(g,!1);if(null==g){" "!=f&&(g=this.getSeqcodeBits(Character.toUpperCase(a.charAt(b)).charCodeAt(0),!1));if(null==g)return null;b++}c.and(g);if(b>=d)return c;if(b!=d-1)return null;c.and(this.getChainBits(a.charCodeAt(b)));return c},"~S");b(c$,"getSpecName",function(a){var c=this.getSpecNameOrNull(a,!1);if(null!=c)return c;0<a.indexOf("*")&&(c=this.getSpecNameOrNull(a,!0));return null==c?new JU.BS:c},"~S");b(c$,"getSpecNameOrNull",function(a,c){var d=null;a=a.toUpperCase();0<=
a.indexOf("\\?")&&(a=JU.PT.simpleReplace(a,"\\?","\u0001"));for(var b=this.atomCount;0<=--b;){var f=this.atoms[b].getGroup3(!0);if(null!=f&&0<f.length){if(J.util.Txt.isMatch(f,a,c,!0)){null==d&&(d=J.util.BSUtil.newBitSet(b+1));for(d.set(b);0<=--b&&this.atoms[b].getGroup3(!0).equals(f);)d.set(b);b++}}else this.isAtomNameMatch(this.atoms[b],a,c)&&(null==d&&(d=J.util.BSUtil.newBitSet(b+1)),d.set(b))}return d},"~S,~B");b(c$,"isAtomNameMatch",function(a,c,d){return J.util.Txt.isMatch(a.getAtomName().toUpperCase(),
c,d,!1)},"J.modelset.Atom,~S,~B");b(c$,"getSeqcodeBits",function(a,c){var d=new JU.BS,b=J.modelset.Group.getSeqNumberFor(a),f=2147483647!=b,g=!0,h=J.modelset.Group.getInsertionCodeChar(a);switch(h){case "?":for(var e=this.atomCount;0<=--e;){var j=this.atoms[e].getSeqcode();if(!f||b==J.modelset.Group.getSeqNumberFor(j)&&0!=J.modelset.Group.getInsertionCodeFor(j))d.set(e),g=!1}break;default:for(e=this.atomCount;0<=--e;)if(j=this.atoms[e].getSeqcode(),a==j||!f&&a==J.modelset.Group.getInsertionCodeFor(j)||
"*"==h&&b==J.modelset.Group.getSeqNumberFor(j))d.set(e),g=!1}return!g||c?d:null},"~N,~B");b(c$,"getChainBits",function(a){var c=256>a&&this.viewer.getBoolean(603979822);c||(a=J.modelset.AtomCollection.chainToUpper(a));for(var d=new JU.BS,b=J.util.BSUtil.newBitSet(this.atomCount),f,g=b.nextClearBit(0);g<this.atomCount;g=b.nextClearBit(g+1)){var h=this.atoms[g].getChain();a==(f=h.chainID)||!c&&a==J.modelset.AtomCollection.chainToUpper(f)?(h.setAtomBitSet(d),b.or(d)):h.setAtomBitSet(b)}return d},"~N");
c$.chainToUpper=b(c$,"chainToUpper",function(a){return String.fromCharCode(a).toUpperCase().charCodeAt(0)},"~N");b(c$,"getAtomIndices",function(a){for(var c=0,d=D(this.atomCount,0),b=a.nextSetBit(0);0<=b&&b<this.atomCount;b=a.nextSetBit(b+1))d[b]=++c;return d},"JU.BS");b(c$,"getAtomsWithin",function(a,c){for(var d=new JU.BS,b=this.atomCount;0<=--b;){var f=this.atoms[b],g=J.util.Measure.distanceToPlane(c,f);(0<a&&-0.1<=g&&g<=a||0>a&&0.1>=g&&g>=a||0==a&&0.01>Math.abs(g))&&d.set(f.index)}return d},"~N,JU.P4");
b(c$,"getAtomsWithinBs",function(a,c,d){var b=new JU.BS;if(0==c.length||null!=d&&0==d.cardinality())return b;null==d&&(d=J.util.BSUtil.setAll(c.length));for(var f=this.atomCount;0<=--f;)for(var g=this.atoms[f],h=d.nextSetBit(0);0<=h;h=d.nextSetBit(h+1))if(g.distance(c[h])<a){b.set(f);break}return b},"~N,~A,JU.BS");b(c$,"getVisibleSet",function(){for(var a=new JU.BS,c=this.atomCount;0<=--c;)this.atoms[c].isVisible(0)&&a.set(c);return a});b(c$,"getClickableSet",function(){for(var a=new JU.BS,c=this.atomCount;0<=
--c;)this.atoms[c].isClickable()&&a.set(c);return a});b(c$,"isModulated",function(a){return null!=this.bsModulated&&this.bsModulated.get(a)},"~N");b(c$,"deleteModelAtoms",function(a,c,d){this.atoms=JU.AU.deleteElements(this.atoms,a,c);this.atomCount=this.atoms.length;for(var b=a;b<this.atomCount;b++)this.atoms[b].index=b,this.atoms[b].modelIndex--;null!=this.bsModulated&&J.util.BSUtil.deleteBits(this.bsModulated,d);this.deleteAtomTensors(d);this.atomNames=JU.AU.deleteElements(this.atomNames,a,c);
this.atomTypes=JU.AU.deleteElements(this.atomTypes,a,c);this.atomSerials=JU.AU.deleteElements(this.atomSerials,a,c);this.bfactor100s=JU.AU.deleteElements(this.bfactor100s,a,c);this.hasBfactorRange=!1;this.occupancies=JU.AU.deleteElements(this.occupancies,a,c);this.partialCharges=JU.AU.deleteElements(this.partialCharges,a,c);this.atomTensorList=JU.AU.deleteElements(this.atomTensorList,a,c);this.vibrations=JU.AU.deleteElements(this.vibrations,a,c);this.nSurfaceAtoms=0;this.surfaceDistance100s=this.bsSurface=
null;if(null!=this.tainted)for(a=0;14>a;a++)J.util.BSUtil.deleteBits(this.tainted[a],d)},"~N,~N,JU.BS");b(c$,"getAtomIdentityInfo",function(a,c){c.put("_ipt",Integer.$valueOf(a));c.put("atomIndex",Integer.$valueOf(a));c.put("atomno",Integer.$valueOf(this.getAtomNumber(a)));c.put("info",this.getAtomInfo(a,null));c.put("sym",this.getElementSymbol(a))},"~N,java.util.Map");b(c$,"getAtomTensorList",function(a){return 0>a||null==this.atomTensorList||a>=this.atomTensorList.length?null:this.atomTensorList[a]},
"~N");b(c$,"deleteAtomTensors",function(a){if(null!=this.atomTensors){for(var c=new JU.List,d,b=this.atomTensors.keySet().iterator();b.hasNext()&&((d=b.next())||1);){for(var f=this.atomTensors.get(d),g=f.size();0<=--g;){var h=f.get(g);(a.get(h.atomIndex1)||0<=h.atomIndex2&&a.get(h.atomIndex2))&&f.remove(g)}0==f.size()&&c.addLast(d)}for(g=c.size();0<=--g;)this.atomTensors.remove(c.get(g))}},"JU.BS");b(c$,"setAtomTensors",function(a,c){if(!(null==c||0==c.size())){null==this.atomTensors&&(this.atomTensors=
new java.util.Hashtable);null==this.atomTensorList&&(this.atomTensorList=Array(this.atoms.length));this.atomTensorList=JU.AU.ensureLength(this.atomTensorList,this.atoms.length);this.atomTensorList[a]=J.modelset.AtomCollection.getTensorList(c);for(var d=c.size();0<=--d;){var b=c.get(d);b.atomIndex1=a;b.atomIndex2=-1;b.modelIndex=this.atoms[a].modelIndex;this.addTensor(b,b.type);null!=b.altType&&this.addTensor(b,b.altType)}}},"~N,JU.List");c$.getTensorList=b(c$,"getTensorList",function(a){for(var c=
-1,d=!1,b=a.size(),f=b;0<=--f;){var g=a.get(f);g.forThermalEllipsoid?c=f:2==g.iType&&(d=!0)}var h=Array((0<=c||!d?0:1)+b);if(0<=c&&(h[0]=a.get(c),1==a.size()))return h;if(d){c=0;for(f=b;0<=--f;)g=a.get(f),g.forThermalEllipsoid||(h[++c]=g)}else for(f=0;f<b;f++)h[f]=a.get(f);return h},"JU.List");b(c$,"getAtomTensor",function(a,c){var d=this.getAtomTensorList(a);if(null!=d&&null!=c){c=c.toLowerCase();for(var b=0;b<d.length;b++){var f=d[b];if(null!=f&&(c.equals(f.type)||c.equals(f.altType)))return f}}return null},
"~N,~S");b(c$,"addTensor",function(a,c){c=c.toLowerCase();var d=this.atomTensors.get(c);null==d&&this.atomTensors.put(c,d=new JU.List);d.addLast(a)},"J.util.Tensor,~S");b(c$,"getAllAtomTensors",function(a){if(null==this.atomTensors)return null;if(null!=a)return this.atomTensors.get(a.toLowerCase());a=new JU.List;for(var c,d=this.atomTensors.entrySet().iterator();d.hasNext()&&((c=d.next())||1);)a.addAll(c.getValue());return a},"~S");c$.$AtomCollection$AtomSorter$=function(){aa();c$=u(function(){ma(this,
arguments);t(this,arguments)},J.modelset.AtomCollection,"AtomSorter",null,java.util.Comparator);e(c$,"compare",function(a,c){return a.index>c.index?1:a.index<c.index?-1:0},"J.modelset.Atom,J.modelset.Atom");c$=$()};c$.MINUSZERO=c$.prototype.MINUSZERO=Float.$valueOf(-0);B(c$,"TAINT_ATOMNAME",0,"TAINT_ATOMTYPE",1,"TAINT_COORD",2,"TAINT_ELEMENT",3,"TAINT_FORMALCHARGE",4,"TAINT_HYDROPHOBICITY",5,"TAINT_IONICRADIUS",6,"TAINT_OCCUPANCY",7,"TAINT_PARTIALCHARGE",8,"TAINT_TEMPERATURE",9,"TAINT_VALENCE",10,
"TAINT_VANDERWAALS",11,"TAINT_VIBRATION",12,"TAINT_ATOMNO",13,"TAINT_MAX",14,"userSettableValues","atomName atomType coord element formalCharge hydrophobicity ionic occupany partialCharge temperature valence vanderWaals vibrationVector atomNo".split(" "));14!=J.modelset.AtomCollection.userSettableValues.length&&J.util.Logger.error("AtomCollection.java userSettableValues is not length TAINT_MAX!");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);
B(c$,"almost180",2.984513)});p("J.modelset");q(["J.api.AtomIndexIterator"],"J.modelset.AtomIteratorWithinModel",["J.atomdata.RadiusData"],function(){c$=u(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.viewer=this.atoms=null;this.iNext=0;t(this,arguments)},
J.modelset,"AtomIteratorWithinModel",null,J.api.AtomIndexIterator);w(c$,function(){});b(c$,"initialize",function(a,c,d,b,f,g){this.bspf=a;this.bsSelected=c;this.isGreaterOnly=d;this.isZeroBased=b;this.hemisphereOnly=f;this.threadSafe=g;this.cubeIterator=null},"J.bspt.Bspf,JU.BS,~B,~B,~B,~B");e(c$,"setModel",function(a,c,d,b,f,g,h){this.threadSafe&&(c=-1-c);if(c!=this.modelIndex||null==this.cubeIterator)this.cubeIterator=this.bspf.getCubeIterator(c),this.modelIndex=c;this.zeroBase=this.isZeroBased?
d:0;if(-2147483648!=g){this.atomIndex=0>g?-1:b;if(this.isVdw=null!=h)this.radiusData=h,this.atoms=a.atoms,this.viewer=a.viewer,g=h.factorType===J.atomdata.RadiusData.EnumType.OFFSET?5+h.value:5*h.value,this.vdw1=this.atoms[b].getVanderwaalsRadiusFloat(this.viewer,h.vdwType);this.checkGreater=this.isGreaterOnly&&2147483647!=b;this.setCenter(f,g)}},"J.modelset.ModelCollection,~N,~N,~N,JU.P3,~N,J.atomdata.RadiusData");e(c$,"setCenter",function(a,c){this.setCenter2(a,c)},"JU.P3,~N");b(c$,"setCenter2",
function(a,c){null!=this.cubeIterator&&(this.cubeIterator.initialize(a,c,this.hemisphereOnly),this.distanceSquared=c*c)},"JU.P3,~N");e(c$,"hasNext",function(){return this.hasNext2()});b(c$,"hasNext2",function(){if(0<=this.atomIndex)for(;this.cubeIterator.hasMoreElements();){var a=this.cubeIterator.nextElement();if((this.iNext=a.index)!=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.index,!0;this.iNext=-1;return!1});e(c$,"next",function(){return this.iNext-this.zeroBase});e(c$,"foundDistance2",function(){return null==this.cubeIterator?-1:this.cubeIterator.foundDistance2()});e(c$,"addAtoms",function(a){for(var c;this.hasNext();)if(0<=(c=this.next())){var d;if(this.isVdw){d=this.atoms[c].getVanderwaalsRadiusFloat(this.viewer,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(c)}},"JU.BS");e(c$,"release",function(){null!=this.cubeIterator&&(this.cubeIterator.release(),this.cubeIterator=null)})});p("J.modelset");q(["J.modelset.AtomIteratorWithinModel"],"J.modelset.AtomIteratorWithinModelSet",null,function(){c$=u(function(){this.center=this.bsModels=null;this.distance=0;t(this,arguments)},J.modelset,"AtomIteratorWithinModelSet",
J.modelset.AtomIteratorWithinModel);w(c$,function(a){R(this,J.modelset.AtomIteratorWithinModelSet,[]);this.bsModels=a},"JU.BS");e(c$,"setCenter",function(a,c){this.center=a;this.distance=c;this.set(0)},"JU.P3,~N");b(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");e(c$,"hasNext",function(){return this.hasNext2()?!0:!this.set(this.modelIndex+
1)?!1:this.hasNext()})});p("J.modelset");q(["J.util.JmolEdge","J.viewer.JC"],"J.modelset.Bond",["J.util.C"],function(){c$=u(function(){this.atom2=this.atom1=null;this.shapeVisibilityFlags=this.colix=this.mad=0;t(this,arguments)},J.modelset,"Bond",J.util.JmolEdge);w(c$,function(a,c,d,b,f){R(this,J.modelset.Bond,[]);this.atom1=a;this.atom2=c;this.colix=f;this.setOrder(d);this.setMad(b)},"J.modelset.Atom,J.modelset.Atom,~N,~N,~N");b(c$,"setMad",function(a){this.mad=a;this.setShapeVisibility(0!=a)},"~N");
b(c$,"setShapeVisibilityFlags",function(a){this.shapeVisibilityFlags=a},"~N");b(c$,"getShapeVisibilityFlags",function(){return this.shapeVisibilityFlags});b(c$,"setShapeVisibility",function(a){0!=(this.shapeVisibilityFlags&J.modelset.Bond.myVisibilityFlag)!=a&&(this.atom1.addDisplayedBond(J.modelset.Bond.myVisibilityFlag,a),this.atom2.addDisplayedBond(J.modelset.Bond.myVisibilityFlag,a),this.shapeVisibilityFlags=a?this.shapeVisibilityFlags|J.modelset.Bond.myVisibilityFlag:this.shapeVisibilityFlags&
~J.modelset.Bond.myVisibilityFlag)},"~B");b(c$,"getIdentity",function(){return this.index+1+" "+this.getOrderNumberAsString()+" "+this.atom1.getInfo()+" -- "+this.atom2.getInfo()+" "+this.atom1.distance(this.atom2)});e(c$,"isCovalent",function(){return 0!=(this.order&1023)});e(c$,"isHydrogen",function(){return J.modelset.Bond.isOrderH(this.order)});c$.isOrderH=b(c$,"isOrderH",function(a){return 0!=(a&30720)},"~N");b(c$,"isStereo",function(){return 0!=(this.order&1024)});b(c$,"isPartial",function(){return 0!=
(this.order&224)});b(c$,"isAromatic",function(){return 0!=(this.order&512)});b(c$,"setPaletteID",function(){},"~N");b(c$,"getEnergy",function(){return 0});b(c$,"getValence",function(){return!this.isCovalent()?0:this.isPartial()||this.is(515)?1:this.order&7});b(c$,"deleteAtomReferences",function(){null!=this.atom1&&this.atom1.deleteBond(this);null!=this.atom2&&this.atom2.deleteBond(this);this.atom1=this.atom2=null});b(c$,"setColix",function(a){this.colix=a},"~N");b(c$,"setTranslucent",function(a,c){this.colix=
J.util.C.getColixTranslucent3(this.colix,a,c)},"~B,~N");b(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");b(c$,"getAtom1",function(){return this.atom1});b(c$,"getAtom2",function(){return this.atom2});e(c$,"getAtomIndex1",function(){return this.atom1.index});e(c$,"getAtomIndex2",function(){return this.atom2.index});b(c$,"getRadius",function(){return this.mad/2E3});e(c$,"getCovalentOrder",
function(){return J.util.JmolEdge.getCovalentBondOrder(this.order)});b(c$,"getOrderName",function(){return J.util.JmolEdge.getBondOrderNameFromOrder(this.order)});b(c$,"getOrderNumberAsString",function(){return J.util.JmolEdge.getBondOrderNumberFromOrder(this.order)});b(c$,"getColix1",function(){return J.util.C.getColixInherited(this.colix,this.atom1.colixAtom)});b(c$,"getColix2",function(){return J.util.C.getColixInherited(this.colix,this.atom2.colixAtom)});b(c$,"getOtherAtom",function(a){return this.atom1===
a?this.atom2:this.atom2===a?this.atom1:null},"J.modelset.Atom");b(c$,"setIndex",function(a){this.index=a},"~N");b(c$,"is",function(a){return(this.order&-131073)==a},"~N");e(c$,"getOtherAtomNode",function(a){return this.atom1===a?this.atom2:this.atom2===a?this.atom1:null},"J.util.JmolNode");e(c$,"toString",function(){return this.atom1+" - "+this.atom2});c$.myVisibilityFlag=c$.prototype.myVisibilityFlag=J.viewer.JC.getShapeVisibilityFlag(1)});p("J.modelset");q(["J.modelset.AtomCollection","JU.BS"],
"J.modelset.BondCollection","java.lang.Float JU.AU J.modelset.Bond $.BondIteratorSelected $.HBond J.util.BSUtil $.C $.JmolEdge $.Logger".split(" "),function(){c$=u(function(){this.molecules=null;this.moleculeCount=0;this.bonds=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;t(this,arguments)},J.modelset,"BondCollection",J.modelset.AtomCollection);N(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});e(c$,"releaseModelSet",function(){this.releaseModelSetBC()});b(c$,"releaseModelSetBC",function(){this.freeBonds=this.bonds=null;this.releaseModelSetAC()});b(c$,"resetMolecules",function(){this.molecules=null;this.moleculeCount=0});b(c$,"getBondAt",function(a){return this.bonds[a]},"~N");b(c$,"getBondIteratorForType",function(a,c){return new J.modelset.BondIteratorSelected(this.bonds,this.bondCount,
a,c,this.viewer.getBoolean(603979812))},"~N,JU.BS");b(c$,"getBondIterator",function(a){return new J.modelset.BondIteratorSelected(this.bonds,this.bondCount,131071,a,!1)},"JU.BS");b(c$,"getBondAtom1",function(a){return this.bonds[a].atom1},"~N");b(c$,"getBondAtom2",function(a){return this.bonds[a].atom2},"~N");b(c$,"getBondRadius",function(a){return this.bonds[a].getRadius()},"~N");b(c$,"getBondOrder",function(a){return this.bonds[a].order},"~N");b(c$,"getBondColix1",function(a){return this.bonds[a].getColix1()},
"~N");b(c$,"getBondColix2",function(a){return this.bonds[a].getColix2()},"~N");b(c$,"getBondModelIndex",function(a){return this.bonds[a].atom1.modelIndex},"~N");b(c$,"getBondCountInModel",function(a){for(var c=0,d=this.bondCount;0<=--d;)this.bonds[d].atom1.modelIndex==a&&c++;return c},"~N");b(c$,"getBondsForSelectedAtoms",function(a,c){for(var d=new JU.BS,b=0;b<this.bondCount;++b){var f=this.bonds[b],g=a.get(f.atom1.index),f=a.get(f.atom2.index);((new Boolean(!c&g&f)).valueOf()||(new Boolean(c&(new Boolean(g|
f)).valueOf())).valueOf())&&d.set(b)}return d},"JU.BS,~B");b(c$,"bondAtoms",function(a,c,d,b,f,g,h,e){d=this.getOrAddBond(a,c,d,b,f,g,!0);e&&(d.order|=131072,h&&(a.group=c.group,a.group.addAtoms(a.index)));return d},"J.modelset.Atom,J.modelset.Atom,~N,~N,JU.BS,~N,~B,~B");b(c$,"getOrAddBond",function(a,c,d,b,f,g,h){if(131071==d||65535==d)d=1;a.isBonded(c)?(a=a.getBond(c).index,h&&(this.bonds[a].setOrder(d),this.bonds[a].setMad(b),s(this.bonds[a],J.modelset.HBond)&&(this.bonds[a].energy=g))):(this.bondCount==
this.bonds.length&&(this.bonds=JU.AU.arrayCopyObject(this.bonds,this.bondCount+250)),a=this.setBond(this.bondCount++,this.bondMutually(a,c,d,b,g)).index);null!=f&&f.set(a);return this.bonds[a]},"J.modelset.Atom,J.modelset.Atom,~N,~N,JU.BS,~N,~B");b(c$,"setBond",function(a,c){return this.bonds[c.index=a]=c},"~N,J.modelset.Bond");b(c$,"bondMutually",function(a,c,d,b,f){d=J.modelset.Bond.isOrderH(d)?new J.modelset.HBond(a,c,d,b,0,f):new J.modelset.Bond(a,c,d,b,0);this.addBondToAtom(a,d);this.addBondToAtom(c,
d);return d},"J.modelset.Atom,J.modelset.Atom,~N,~N,~N");b(c$,"addBondToAtom",function(a,c){null==a.bonds?(a.bonds=Array(1),a.bonds[0]=c):a.bonds=this.addToBonds(c,a.bonds)},"J.modelset.Atom,J.modelset.Bond");b(c$,"addToBonds",function(a,c){var d;if(null==c)d=0<this.numCached[1]?this.freeBonds[1][--this.numCached[1]]:Array(1),d[0]=a;else{var b=c.length;d=b+1;d=5>d&&0<this.numCached[d]?this.freeBonds[d][--this.numCached[d]]:Array(d);d[b]=a;for(var f=b;0<=--f;)d[f]=c[f];5>b&&200>this.numCached[b]&&
(this.freeBonds[b][this.numCached[b]++]=c)}return d},"J.modelset.Bond,~A");b(c$,"addHBond",function(a,c,d,b){this.bondCount==this.bonds.length&&(this.bonds=JU.AU.arrayCopyObject(this.bonds,this.bondCount+250));return this.setBond(this.bondCount++,this.bondMutually(a,c,d,1,b)).index},"J.modelset.Atom,J.modelset.Atom,~N,~N");c$.getBondOrderFull=b(c$,"getBondOrderFull",function(a,c,d,b,f){if(0==a||0==c||d<b)return 0;a=a+c+f;return d>a*a?0:1},"~N,~N,~N,~N,~N");b(c$,"checkValencesAndBond",function(a,c,
d,b,f){if(20<a.getCurrentBondCount()||20<c.getCurrentBondCount())return this.haveWarned||J.util.Logger.warn("maximum auto bond count reached"),this.haveWarned=!0,!1;var g=a.getFormalCharge();if(0!=g){var h=c.getFormalCharge();if(0>g&&0>h||0<g&&0<h)return!1}if(a.altloc!=c.altloc&&"\x00"!=a.altloc&&"\x00"!=c.altloc&&null==this.getVibration(a.index,!1))return!1;this.getOrAddBond(a,c,d,b,f,0,!1);return!0},"J.modelset.Atom,J.modelset.Atom,~N,~N,JU.BS");b(c$,"deleteAllBonds2",function(){this.viewer.setShapeProperty(1,
"reset",null);for(var a=this.bondCount;0<=--a;)this.bonds[a].deleteAtomReferences(),this.bonds[a]=null;this.bondCount=0});b(c$,"getDefaultMadFromOrder",function(a){return J.modelset.Bond.isOrderH(a)?1:0!=(a&32768)?m(Math.floor(2E3*this.viewer.getFloat(570425406))):this.defaultCovalentMad},"~N");b(c$,"deleteConnections",function(a,c,d,b,f,g,h,e,j){var k=0>a,v=0>c,m=0,p=0;k&&(a=-a);v&&(c=-c);var x=new JU.BS,r=0,q=d|=131072;!h&&J.modelset.Bond.isOrderH(d)&&(d=30720);if(g)g=b;else{g=new JU.BS;for(var s=
b.nextSetBit(0);0<=s;s=b.nextSetBit(s+1)){var t=this.atoms[s];if(null!=t.bonds)for(var u=t.bonds.length;0<=--u;)f.get(t.getBondedAtomIndex(u))&&g.set(t.bonds[u].index)}}for(s=g.nextSetBit(0);s<this.bondCount&&0<=s;s=g.nextSetBit(s+1)){b=this.bonds[s];f=b.atom1;t=b.atom2;u=f.distanceSquared(t);if(k||v)m=f.distance(t),p=f.getBondingRadiusFloat()+t.getBondingRadiusFloat();if(!(k?m<p*a:u<e)&&!(v?m>p*c:u>j))if(h||q==(b.order&-257|131072)||0!=(d&b.order&30720))x.set(s),r++}0<r&&this.dBm(x,!1);return[0,
r]},"~N,~N,~N,JU.BS,JU.BS,~B,~B,~N,~N");b(c$,"dBm",function(a,c){this.deleteBonds(a,c)},"JU.BS,~B");b(c$,"dBb",function(a,c){var d=a.nextSetBit(0);if(!(0>d)){this.resetMolecules();for(var b=-1,f=a.cardinality(),g=d;g<this.bondCount;++g){var h=this.bonds[g];if(0<f&&a.get(g)){f--;if(!c){var e=h.atom1.modelIndex;e!=b&&this.models[b=e].resetBoundCount()}h.deleteAtomReferences()}else this.setBond(d++,h)}for(b=this.bondCount;--b>=d;)this.bonds[b]=null;this.bondCount=d;d=this.viewer.getShapeProperty(1,"sets");
if(null!=d)for(b=0;b<d.length;b++)J.util.BSUtil.deleteBits(d[b],a);J.util.BSUtil.deleteBits(this.bsAromatic,a)}},"JU.BS,~B");b(c$,"resetAromatic",function(){for(var a=this.bondCount;0<=--a;){var c=this.bonds[a];c.isAromatic()&&c.setOrder(515)}});b(c$,"assignAromaticBonds",function(){this.assignAromaticBondsBs(!0,null)});b(c$,"assignAromaticBondsBs",function(a,c){a||(this.bsAromatic=new JU.BS);this.bsAromaticSingle=new JU.BS;this.bsAromaticDouble=new JU.BS;for(var d=null==c,b=d?this.bondCount-1:c.nextSetBit(0),
f=b;0<=f;f=d?f-1:c.nextSetBit(f+1)){var g=this.bonds[f];this.bsAromatic.get(f)&&g.setOrder(515);switch(g.order&-131073){case 515:this.bsAromatic.set(f);break;case 513:this.bsAromaticSingle.set(f);break;case 514:this.bsAromaticDouble.set(f)}}for(f=b=(d=null==c)?this.bondCount-1:c.nextSetBit(0);0<=f;f=d?f-1:c.nextSetBit(f+1))g=this.bonds[f],g.is(515)&&(!this.bsAromaticDouble.get(f)&&!this.bsAromaticSingle.get(f))&&(this.assignAromaticDouble(g)||this.assignAromaticSingle(g));for(f=b;0<=f;f=d?f-1:c.nextSetBit(f+
1))if(g=this.bonds[f],this.bsAromaticDouble.get(f))g.is(514)||(this.bsAromatic.set(f),g.setOrder(514));else if((this.bsAromaticSingle.get(f)||g.isAromatic())&&!g.is(513))this.bsAromatic.set(f),g.setOrder(513);this.assignAromaticNandO(c);this.bsAromaticDouble=this.bsAromaticSingle=null},"~B,JU.BS");b(c$,"assignAromaticDouble",function(a){var c=a.index;if(this.bsAromaticSingle.get(c))return!1;if(this.bsAromaticDouble.get(c))return!0;this.bsAromaticDouble.set(c);return!this.assignAromaticSingleForAtom(a.atom1,
c)||!this.assignAromaticSingleForAtom(a.atom2,c)?(this.bsAromaticDouble.clear(c),!1):!0},"J.modelset.Bond");b(c$,"assignAromaticSingle",function(a){var c=a.index;if(this.bsAromaticDouble.get(c))return!1;if(this.bsAromaticSingle.get(c))return!0;this.bsAromaticSingle.set(c);return!this.assignAromaticDoubleForAtom(a.atom1)||!this.assignAromaticDoubleForAtom(a.atom2)?(this.bsAromaticSingle.clear(c),!1):!0},"J.modelset.Bond");b(c$,"assignAromaticSingleForAtom",function(a,c){var d=a.bonds;if(null==d||this.assignAromaticSingleHetero(a))return!1;
for(var b=d.length;0<=--b;){var f=d[b],g=f.index;if(!(g==c||!f.isAromatic()||this.bsAromaticSingle.get(g)))if(this.bsAromaticDouble.get(g)||!this.assignAromaticSingle(f))return!1}return!0},"J.modelset.Atom,~N");b(c$,"assignAromaticDoubleForAtom",function(a){var c=a.bonds;if(null==c)return!1;a=this.assignAromaticSingleHetero(a);for(var d=-1,b=c.length;0<=--b;)this.bsAromaticDouble.get(c[b].index)&&(a=!0),c[b].isAromatic()&&(d=b);for(b=c.length;0<=--b;){var f=c[b],g=f.index;if(f.isAromatic()&&!this.bsAromaticDouble.get(g)&&
!this.bsAromaticSingle.get(g))if(!a&&this.assignAromaticDouble(f))a=!0;else if((a||b<d)&&!this.assignAromaticSingle(f))return!1}return a},"J.modelset.Atom");b(c$,"assignAromaticSingleHetero",function(a){var c=a.getElementNumber();switch(c){case 6:case 7:case 8:case 16:break;default:return!0}var d=a.getValence();switch(c){case 6:return 4==d;case 7:case 8:return d==10-c&&1>a.getFormalCharge();case 16:return d==18-c&&1>a.getFormalCharge()}return!1},"J.modelset.Atom");b(c$,"assignAromaticNandO",function(a){for(var c,
d=null==a,b=d?this.bondCount-1:a.nextSetBit(0);0<=b;b=d?b-1:a.nextSetBit(b+1))if(c=this.bonds[b],c.is(513)){var f,g=c.atom2,h,e=g.getElementNumber();7==e||8==e?(h=e,f=g,g=c.atom1,e=g.getElementNumber()):(f=c.atom1,h=f.getElementNumber());if(!(7!=h&&8!=h)){var j=f.getValence();if(!(0>j)){var k=f.getCovalentBondCount();f=f.getFormalCharge();switch(h){case 7:3==j&&(3==k&&1>f&&6==e&&3==g.getValence())&&c.setOrder(514);break;case 8:1==j&&(0==f&&(14==e||16==e))&&c.setOrder(514)}}}}},"JU.BS");b(c$,"getAtomBitsMDb",
function(a,c){var d;switch(a){default:return this.getAtomBitsMDa(a,c);case 1678770178:d=new JU.BS;for(var b=c.nextSetBit(0);0<=b;b=c.nextSetBit(b+1))d.set(this.bonds[b].atom1.index),d.set(this.bonds[b].atom2.index);return d;case 1048585:d=new JU.BS;for(b=this.bondCount;0<=--b;)this.bonds[b].isAromatic()&&(d.set(this.bonds[b].atom1.index),d.set(this.bonds[b].atom2.index));return d}},"~N,~O");b(c$,"setBondOrder",function(a,c){var d=c.charCodeAt(0)-48,b=this.bonds[a];switch(c){case "0":case "1":case "2":case "3":break;
case "p":case "m":d=J.util.JmolEdge.getBondOrderNumberFromOrder(b.getCovalentOrder()).charCodeAt(0)-48+("p"==c?1:-1);3<d?d=1:0>d&&(d=3);break;default:return null}var f=new JU.BS;try{if(0==d){var g=new JU.BS;g.set(b.index);f.set(b.getAtomIndex1());f.set(b.getAtomIndex2());this.dBm(g,!1);return f}b.setOrder(d|131072);this.removeUnnecessaryBonds(b.atom1,!1);this.removeUnnecessaryBonds(b.atom2,!1);f.set(b.getAtomIndex1());f.set(b.getAtomIndex2())}catch(h){if(y(h,Exception))J.util.Logger.error("Exception in seBondOrder: "+
h.toString());else throw h;}return f},"~N,~S");b(c$,"removeUnnecessaryBonds",function(a,c){var d=new JU.BS,b=new JU.BS,f=a.bonds;if(null!=f){for(var g=0;g<f.length;g++)f[g].isCovalent()?1==f[g].getOtherAtom(a).getElementNumber()&&d.set(f[g].getOtherAtom(a).index):b.set(f[g].index);0<=b.nextSetBit(0)&&this.dBm(b,!1);c&&d.set(a.index);0<=d.nextSetBit(0)&&this.viewer.deleteAtoms(d,!1)}},"J.modelset.Atom,~B");b(c$,"displayBonds",function(a,c){c||(this.haveHiddenBonds=!0);for(var d=a.nextSetBit(0);0<=
d;d=a.nextSetBit(d+1))d<this.bondCount&&0!=this.bonds[d].mad&&this.bonds[d].setShapeVisibility(c)},"J.modelset.BondSet,~B");b(c$,"setBondParametersBS",function(a,c,d,b,f,g,h){if(null==d)this.setBondParameters(a,c,b,f,g,h);else for(c=d.nextSetBit(0);0<=c;c=d.nextSetBit(c+1))this.setBondParameters(a,c,b,f,g,h)},"~N,~N,JU.BS,~N,~N,~N,~N");b(c$,"setBondParameters",function(a,c,d,b,f,g){0>c||c>=this.bondCount||(c=this.bonds[c],0<=a&&c.atom1.modelIndex!=a||(Float.isNaN(d)||(c.mad=pa(2E3*d)),a=c.colix,2147483647!=
f&&(a=J.util.C.getColix(f)),Float.isNaN(g)?c.colix!=a&&(c.colix=J.util.C.copyColixTranslucency(c.colix,a)):c.colix=J.util.C.getColixTranslucent3(a,0!=g,g),1==b?c.order&=-65537:0==b&&(c.order|=65536)))},"~N,~N,~N,~N,~N,~N");B(c$,"BOND_GROWTH_INCREMENT",250,"MAX_BONDS_LENGTH_TO_CACHE",5,"MAX_NUM_TO_CACHE",200)});p("J.modelset");P(J.modelset,"BondIterator");p("J.modelset");q(["J.modelset.BondIterator"],"J.modelset.BondIteratorSelected",null,function(){c$=u(function(){this.bonds=null;this.iBond=this.bondType=
this.bondCount=0;this.bsSelected=null;this.bondSelectionModeOr=!1;t(this,arguments)},J.modelset,"BondIteratorSelected",null,J.modelset.BondIterator);w(c$,function(a,c,d,b,f){this.bonds=a;this.bondCount=c;this.bondType=d;this.bsSelected=b;this.bondSelectionModeOr=f},"~A,~N,~N,JU.BS,~B");e(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&&0!=(a.order&32768))){var c=this.bsSelected.get(a.atom1.index),a=this.bsSelected.get(a.atom2.index);if(!this.bondSelectionModeOr&&c&&a||this.bondSelectionModeOr&&(c||a))return!0}}return!1});e(c$,"nextIndex",function(){return this.iBond});e(c$,"next",function(){return this.bonds[this.iBond++]})});p("J.modelset");q(["JU.BS"],"J.modelset.BondSet",["J.util.BSUtil"],function(){c$=u(function(){this.associatedAtoms=null;t(this,
arguments)},J.modelset,"BondSet",JU.BS);w(c$,function(){R(this,J.modelset.BondSet,[])});b(c$,"getAssociatedAtoms",function(){return this.associatedAtoms});w(c$,function(a){R(this,J.modelset.BondSet,[]);J.util.BSUtil.copy2(a,this)},"JU.BS");w(c$,function(a,c){this.construct(a);this.associatedAtoms=c},"JU.BS,~A")});p("J.modelset");c$=u(function(){this.model=null;this.index=this.chainID=0;this.isRna=this.isDna=!1;this.groupCount=0;this.groups=null;this.selectedGroupCount=0;t(this,arguments)},J.modelset,
"Chain");N(c$,function(){this.groups=Array(16)});b(c$,"getAtom",function(a){return this.model.modelSet.atoms[a]},"~N");w(c$,function(a,c,d){this.model=a;this.chainID=c;this.index=d},"J.modelset.Model,~N,~N");b(c$,"getGroup",function(a){return this.groups[a]},"~N");b(c$,"getGroupCount",function(){return this.groupCount});b(c$,"calcSelectedGroupsCount",function(a){for(var c=this.selectedGroupCount=0;c<this.groupCount;c++)this.groups[c].selectedIndex=this.groups[c].isSelected(a)?this.selectedGroupCount++:
-1},"JU.BS");b(c$,"selectSeqcodeRange",function(a,c,d,b){var f,g,h,e=!1;for(g=a;g<this.groupCount&&this.groups[g].seqcode!=c;g++);if(g==this.groupCount){if(0<a)return-1;e=!0;h=2147483647;for(var j=this.groupCount;0<=--j;)if((f=this.groups[j].seqcode)>c&&f-c<h)g=j,h=f-c;if(2147483647==h)return-1}if(2147483647==d)c=this.groupCount-1,e=!0;else{for(c=g;c<this.groupCount&&this.groups[c].seqcode!=d;c++);if(c==this.groupCount){if(0<a)return-1;e=!0;h=2147483647;for(j=g;j<this.groupCount;j++)if((f=this.groups[j].seqcode)<
d&&d-f<h)c=j,h=d-f;if(2147483647==h)return-1}}for(j=g;j<=c;++j)this.groups[j].selectAtoms(b);return e?-1:c+1},"~N,~N,~N,JU.BS");b(c$,"fixIndices",function(a,c){for(var d=0;d<this.groupCount;d++)this.groups[d].fixIndices(a,c)},"~N,JU.BS");b(c$,"setAtomBitSet",function(a){for(var c=0;c<this.groupCount;c++)this.groups[c].selectAtoms(a)},"JU.BS");b(c$,"getIDStr",function(){return 0==this.chainID?"":256>this.chainID?""+String.fromCharCode(this.chainID):this.model.modelSet.viewer.chainMap.get(Integer.$valueOf(this.chainID))});
p("J.modelset");q(["java.lang.Short","java.util.Hashtable","J.viewer.JC"],"J.modelset.Group","java.lang.Float JU.AU $.BS $.P3 $.V3 J.constant.EnumStructure J.util.BSUtil $.Logger $.Quaternion".split(" "),function(){c$=u(function(){this.groupIndex=0;this.chain=null;this.leadAtomIndex=this.firstAtomIndex=-1;this.groupID=this.seqcode=this.lastAtomIndex=0;this.$isProtein=!1;this.shapeVisibilityFlags=this.selectedIndex=0;this.theta=this.mu=this.straightness=this.omega=this.psi=this.phi=NaN;this.bsAdded=
null;t(this,arguments)},J.modelset,"Group");b(c$,"getGroupIndex",function(){return this.groupIndex});b(c$,"setGroupIndex",function(a){this.groupIndex=a},"~N");w(c$,function(){});b(c$,"setGroup",function(a,d,b,f,g){this.chain=a;this.seqcode=b;null==d&&(d="");this.groupID=J.modelset.Group.getGroupIdFor(d);this.$isProtein=1<=this.groupID&&24>this.groupID;this.firstAtomIndex=f;this.lastAtomIndex=g;return this},"J.modelset.Chain,~S,~N,~N,~N");b(c$,"calcBioParameters",function(){return!1});b(c$,"haveParameters",
function(){return!0});b(c$,"setGroupParameter",function(a,d){switch(a){case 1112539145:this.phi=d;break;case 1112539146:this.psi=d;break;case 1112539144:this.omega=d;break;case 1112539141:this.mu=d;break;case 1112539152:this.theta=d;break;case 1112539150:this.straightness=d}},"~N,~N");b(c$,"getGroupParameter",function(a){this.haveParameters()||this.calcBioParameters();switch(a){case 1112539144:return this.omega;case 1112539145:return this.phi;case 1112539146:return this.psi;case 1112539141:return this.mu;
case 1112539152:return this.theta;case 1112539150:return this.straightness}return NaN},"~N");b(c$,"setModelSet",function(a){this.chain.model.modelSet=a},"J.modelset.ModelSet");b(c$,"setShapeVisibility",function(a,d){this.shapeVisibilityFlags=d?this.shapeVisibilityFlags|a:this.shapeVisibilityFlags&~a},"~N,~B");b(c$,"getGroup3",function(){return J.modelset.Group.group3Names[this.groupID]});c$.getGroup3For=b(c$,"getGroup3For",function(a){return J.modelset.Group.group3Names[a]},"~N");b(c$,"getGroup1",
function(){return this.groupID>=J.viewer.JC.predefinedGroup1Names.length?"?":J.viewer.JC.predefinedGroup1Names[this.groupID]});b(c$,"getGroupID",function(){return this.groupID});b(c$,"getChainID",function(){return this.chain.chainID});b(c$,"getBioPolymerLength",function(){return 0});b(c$,"getMonomerIndex",function(){return-1});b(c$,"getGroups",function(){return null});b(c$,"getStructure",function(){return null});b(c$,"getStrucNo",function(){return 0});b(c$,"getProteinStructureType",function(){return J.constant.EnumStructure.NOT});
b(c$,"getProteinStructureSubType",function(){return this.getProteinStructureType()});b(c$,"setProteinStructureType",function(){return-1},"J.constant.EnumStructure,~N");b(c$,"isProtein",function(){return this.$isProtein});b(c$,"isNucleic",function(){return 24<=this.groupID&&42>this.groupID});b(c$,"isDna",function(){return!1});b(c$,"isRna",function(){return!1});b(c$,"isPurine",function(){return!1});b(c$,"isPyrimidine",function(){return!1});b(c$,"isCarbohydrate",function(){return!1});c$.addGroup3Name=
b(c$,"addGroup3Name",function(a){J.modelset.Group.group3NameCount==J.modelset.Group.group3Names.length&&(J.modelset.Group.group3Names=JU.AU.doubleLengthS(J.modelset.Group.group3Names));var d=J.modelset.Group.group3NameCount++;J.modelset.Group.group3Names[d]=a;J.modelset.Group.htGroup.put(a,Short.$valueOf(d));return d},"~S");c$.getGroupIdFor=b(c$,"getGroupIdFor",function(a){if(null==a)return-1;var d=J.modelset.Group.lookupGroupID(a);return-1!=d?d:J.modelset.Group.addGroup3Name(a)},"~S");c$.lookupGroupID=
b(c$,"lookupGroupID",function(a){return null!=a&&(a=J.modelset.Group.htGroup.get(a),null!=a)?a.shortValue():-1},"~S");b(c$,"getResno",function(){return-2147483648==this.seqcode?0:this.seqcode>>8});c$.getSeqNumberFor=b(c$,"getSeqNumberFor",function(a){return J.modelset.Group.haveSequenceNumber(a)?a>>8:2147483647},"~N");c$.haveSequenceNumber=b(c$,"haveSequenceNumber",function(a){return 0!=(a&128)},"~N");b(c$,"getSeqcodeString",function(){return J.modelset.Group.getSeqcodeStringFor(this.seqcode)});c$.getSeqcodeFor=
b(c$,"getSeqcodeFor",function(a,d){if(-2147483648==a)return a;"A"<=d&&"Z">=d||("a"<=d&&"z">=d||"0"<=d&&"9">=d||"?"==d||"*"==d)||(" "!=d&&"\x00"!=d&&J.util.Logger.warn("unrecognized insertionCode:"+d),d="\x00");return(2147483647==a?0:a<<8|128)+d.charCodeAt(0)},"~N,~S");c$.getSeqcodeStringFor=b(c$,"getSeqcodeStringFor",function(a){return-2147483648==a?null:0==(a&127)?""+(a>>8):""+(a>>8)+"^"+String.fromCharCode(a&127)},"~N");b(c$,"getInsertionCode",function(){return-2147483648==this.seqcode?"\x00":String.fromCharCode(this.seqcode&
127)});c$.getInsertionCodeFor=b(c$,"getInsertionCodeFor",function(a){return a&127},"~N");c$.getInsertionCodeChar=b(c$,"getInsertionCodeChar",function(a){return-2147483648==a?"\x00":String.fromCharCode(a&127)},"~N");b(c$,"isAdded",function(a){return null!=this.bsAdded&&this.bsAdded.get(a)},"~N");b(c$,"addAtoms",function(a){null==this.bsAdded&&(this.bsAdded=new JU.BS);this.bsAdded.set(a)},"~N");b(c$,"selectAtoms",function(a){a.setBits(this.firstAtomIndex,this.lastAtomIndex+1);null!=this.bsAdded&&a.or(this.bsAdded);
return this.lastAtomIndex},"JU.BS");b(c$,"isSelected",function(a){var d=a.nextSetBit(this.firstAtomIndex);return 0<=d&&d<=this.lastAtomIndex||null!=this.bsAdded&&this.bsAdded.intersects(a)},"JU.BS");b(c$,"isHetero",function(){return this.chain.getAtom(this.firstAtomIndex).isHetero()});e(c$,"toString",function(){return"["+this.getGroup3()+"-"+this.getSeqcodeString()+"]"});b(c$,"scaleToScreen",function(a,d){return this.chain.model.modelSet.viewer.scaleToScreen(a,d)},"~N,~N");b(c$,"isCursorOnTopOf",
function(a,d,b,f,g){return this.chain.model.modelSet.isCursorOnTopOf(a,d,b,f,g)},"J.modelset.Atom,~N,~N,~N,J.modelset.Atom");b(c$,"isAtomHidden",function(a){return this.chain.model.modelSet.isAtomHidden(a)},"~N");b(c$,"getModel",function(){return this.chain.model});b(c$,"getModelIndex",function(){return this.chain.model.modelIndex});b(c$,"getSelectedMonomerCount",function(){return 0});b(c$,"getSelectedMonomerIndex",function(){return-1});b(c$,"getSelectedGroupIndex",function(){return this.selectedIndex});
b(c$,"isLeadAtom",function(){return!1},"~N");b(c$,"getLeadAtomOr",function(a){var d=this.getLeadAtom();return null==d?a:d},"J.modelset.Atom");b(c$,"getLeadAtom",function(){return null});b(c$,"getQuaternion",function(){return null},"~S");b(c$,"getQuaternionFrame",function(a){if(3>this.lastAtomIndex-this.firstAtomIndex)return null;var d=this.firstAtomIndex;return J.util.Quaternion.getQuaternionFrame(a[d],a[++d],a[++d])},"~A");b(c$,"setStrucNo",function(){},"~N");b(c$,"getHelixData",function(a){switch(a){case 135266320:return new JU.P3;
case 1073741854:case 1666189314:return new JU.V3;case 135266305:return Float.$valueOf(NaN);case 135266306:case 1073742001:return[]}return""},"~N,~S,~N");b(c$,"isWithinStructure",function(){return!1},"J.constant.EnumStructure");b(c$,"getProteinStructureTag",function(){return null});b(c$,"getStructureId",function(){return""});b(c$,"getBioPolymerIndexInModel",function(){return-1});b(c$,"isCrossLinked",function(){return!1},"J.modelset.Group");b(c$,"getCrossLinkLead",function(){return!1},"JU.List");b(c$,
"isConnectedPrevious",function(){return!1});b(c$,"getNitrogenAtom",function(){return null});b(c$,"getCarbonylOxygenAtom",function(){return null});b(c$,"fixIndices",function(a,d){this.firstAtomIndex-=a;this.leadAtomIndex-=a;this.lastAtomIndex-=a;null!=this.bsAdded&&J.util.BSUtil.deleteBits(this.bsAdded,d)},"~N,JU.BS");b(c$,"getGroupInfo",function(a){var d=new java.util.Hashtable;d.put("groupIndex",Integer.$valueOf(a));d.put("groupID",Short.$valueOf(this.groupID));a=this.getSeqcodeString();null!=a&&
d.put("seqCode",a);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.modelSet.getAtomInfo(this.firstAtomIndex,null));d.put("atomInfo2",this.chain.model.modelSet.getAtomInfo(this.lastAtomIndex,null));d.put("visibilityFlags",Integer.$valueOf(this.shapeVisibilityFlags));return d},"~N");b(c$,"getMinZ",function(a,d){d[0]=2147483647;for(var b=this.firstAtomIndex;b<=
this.lastAtomIndex;b++)this.checkMinZ(a[b],d);if(null!=this.bsAdded)for(b=this.bsAdded.nextSetBit(0);0<=b;b=this.bsAdded.nextSetBit(b+1))this.checkMinZ(a[b],d)},"~A,~A");b(c$,"checkMinZ",function(a,d){var b=a.sZ-m(a.sD/2)-2;b<d[0]&&(d[0]=Math.max(1,b))},"J.modelset.Atom,~A");B(c$,"SEQUENCE_NUMBER_FLAG",128,"INSERTION_CODE_MASK",127,"SEQUENCE_NUMBER_SHIFT",8);c$.htGroup=c$.prototype.htGroup=new java.util.Hashtable;c$.group3Names=c$.prototype.group3Names=Array(128);B(c$,"group3NameCount",0);for(var a=
0;a<J.viewer.JC.predefinedGroup3Names.length;++a)J.modelset.Group.addGroup3Name(J.viewer.JC.predefinedGroup3Names[a])});p("J.modelset");q(["J.modelset.Bond"],"J.modelset.HBond",["J.util.Logger"],function(){c$=u(function(){this.paletteID=this.energy=0;t(this,arguments)},J.modelset,"HBond",J.modelset.Bond);w(c$,function(a,c,d,b,f,g){R(this,J.modelset.HBond,[a,c,d,b,f]);this.energy=g;J.util.Logger.debugging&&J.util.Logger.debug("HBond energy = "+g+" #"+this.getIdentity())},"J.modelset.Atom,J.modelset.Atom,~N,~N,~N,~N");
b(c$,"getEnergy",function(){return this.energy});b(c$,"getPaletteId",function(){return this.paletteID});e(c$,"setPaletteID",function(a){this.paletteID=a},"~N");c$.getEnergy=b(c$,"getEnergy",function(a,c,d,b){return Math.round(-27888/a- -27888/b+-27888/d- -27888/c)},"~N,~N,~N,~N");B(c$,"QConst",-27888)});p("J.modelset");q(null,"J.modelset.LabelToken","java.lang.Character $.Float java.util.Hashtable JU.PT $.SB J.modelset.Atom J.script.T".split(" "),function(){c$=u(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;t(this,arguments)},J.modelset,"LabelToken");w(c$,function(){});b(c$,"set",function(a,c){this.text=a;this.pt=c;return this},"~S,~N");c$.isLabelPropertyTok=b(c$,"isLabelPropertyTok",function(a){for(var c=J.modelset.LabelToken.labelTokenIds.length;0<=--c;)if(J.modelset.LabelToken.labelTokenIds[c]==a)return!0;return!1},"~N");c$.compile=b(c$,"compile",function(a,c,d,b){if(null==
c||0==c.length)return null;if(0>c.indexOf("%")||2>c.length)return[(new J.modelset.LabelToken).set(c,-1)];for(var f=0,g=-1,h=c.length;++g<h&&0<=(g=c.indexOf("%",g));)f++;for(var f=Array(2*f+1),e,j=0,g=0;0<=(e=c.indexOf("%",g));)g!=e&&(f[j++]=(new J.modelset.LabelToken).set(c.substring(g,e),-1)),g=f[j++]=(new J.modelset.LabelToken).set(null,e),a.autoCalculate(g.tok),g=J.modelset.LabelToken.setToken(a,c,g,h,d.charCodeAt(0),b);g<h&&(f[j++]=(new J.modelset.LabelToken).set(c.substring(g),-1));return f},
"J.viewer.Viewer,~S,~S,java.util.Map");c$.formatLabel=b(c$,"formatLabel",function(a,c,d){if(null==d||0==d.length)return null;d=J.modelset.LabelToken.compile(a,d,"\x00",null);return J.modelset.LabelToken.formatLabelAtomArray(a,c,d,"\x00",null)},"J.viewer.Viewer,J.modelset.Atom,~S");c$.formatLabelAtomArray=b(c$,"formatLabelAtomArray",function(a,c,d,b,f){if(null==c)return null;var g="0"<b?null:new JU.SB;if(null!=d)for(var h=0;h<d.length;h++){var e=d[h];if(null==e)break;"0"<b&&e.ch1!=b||(0>=e.tok||null!=
e.key?null!=g&&(g.append(e.text),"\x00"!=e.ch1&&g.appendC(e.ch1)):J.modelset.LabelToken.appendAtomTokenValue(a,c,e,g,f))}return null==g?null:g.toString().intern()},"J.viewer.Viewer,J.modelset.Atom,~A,~S,~A");c$.getBondLabelValues=b(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=b(c$,"formatLabelBond",function(a,c,d,b,f){b.put("#",""+(c.index+
1));b.put("ORDER",""+c.getOrderNumberAsString());b.put("TYPE",c.getOrderName());b.put("LENGTH",Float.$valueOf(c.atom1.distance(c.atom2)));b.put("ENERGY",Float.$valueOf(c.getEnergy()));J.modelset.LabelToken.setValues(d,b);J.modelset.LabelToken.formatLabelAtomArray(a,c.atom1,d,"1",f);J.modelset.LabelToken.formatLabelAtomArray(a,c.atom2,d,"2",f);return J.modelset.LabelToken.getLabel(d)},"J.viewer.Viewer,J.modelset.Bond,~A,java.util.Map,~A");c$.formatLabelMeasure=b(c$,"formatLabelMeasure",function(a,
c,d,b,f){var g=new java.util.Hashtable;g.put("#",""+(c.index+1));g.put("VALUE",Float.$valueOf(b));g.put("UNITS",f);d=J.modelset.LabelToken.compile(a,d,"\u0001",g);if(null==d)return"";J.modelset.LabelToken.setValues(d,g);g=c.modelSet.atoms;c=c.countPlusIndices;for(b=c[0];1<=b;--b)0<=c[b]&&J.modelset.LabelToken.formatLabelAtomArray(a,g[c[b]],d,String.fromCharCode(48+b),null);d=J.modelset.LabelToken.getLabel(d);return null==d?"":d},"J.viewer.Viewer,J.modelset.Measurement,~S,~N,~S");c$.setValues=b(c$,
"setValues",function(a,c){for(var d=0;d<a.length;d++){var b=a[d];if(null==b)break;if(null!=b.key){var f=c.get(b.key);b.text=s(f,Float)?b.format(f.floatValue(),null,null):b.format(NaN,f,null)}}},"~A,java.util.Map");c$.getLabel=b(c$,"getLabel",function(a){for(var c=new JU.SB,d=0;d<a.length;d++){var b=a[d];if(null==b)break;c.append(b.text)}return c.toString()},"~A");c$.setToken=b(c$,"setToken",function(a,c,d,b,f,g){var h=d.pt+1;if(h>=b)return h;var e;"-"==c.charAt(h)&&(d.alignLeft=!0,++h);h<b&&"0"==
c.charAt(h)&&(d.zeroPad=!0,++h);for(;h<b&&Character.isDigit(e=c.charAt(h));)d.width=10*d.width+(e.charCodeAt(0)-48),++h;d.precision=2147483647;var j=!1;if(h<b&&"."==c.charAt(h)){++h;if(h<b&&"-"==(e=c.charAt(h)))j=!0,++h;if(h<b&&Character.isDigit(e=c.charAt(h)))d.precision=e.charCodeAt(0)-48,j&&(d.precision=-1-d.precision),++h}if(h<b&&null!=g){var k;for(g=g.keySet().iterator();g.hasNext()&&((k=g.next())||1);)if(c.indexOf(k)==h)return h+(d.key=k).length}if(h<b)switch(e=c.charAt(h++)){case "%":return d.text=
"%",h;case "[":k=c.indexOf("]",h);if(k<h){h=b;break}h=c.substring(h,k).toLowerCase();h.startsWith("property_")?(d.text=h,d.tok=135270407,d.data=a.getDataFloat(d.text)):(a=J.script.T.getTokenFromName(h),null!=a&&J.modelset.LabelToken.isLabelPropertyTok(a.tok)&&(d.tok=a.tok));h=k+1;break;case "{":k=c.indexOf("}",h);if(k<h){h=b;break}d.text=c.substring(h,k);d.data=a.getDataFloat(d.text);null==d.data?(d.data=a.getData(d.text),s(d.data,Array)&&(d.data=d.data[1],s(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=135270407;h=k+1;break;default:var v,m;if(h<b&&0<=(v="fuv".indexOf(e))&&0<=(m="xyz".indexOf(c.charAt(h))))d.tok=J.modelset.LabelToken.twoCharLabelTokenIds[3*v+m],h++;else if(0<=(v="AaBbCcDEefGgIiLlMmNnoPpQqRrSsTtUuVvWXxYyZz%%%gqW".indexOf(e)))d.tok=J.modelset.LabelToken.labelTokenIds[v]}d.text=c.substring(d.pt,h);if(h<b&&0!=f&&Character.isDigit(e=c.charAt(h)))h++,d.ch1=e,e.charCodeAt(0)!=f&&1!=f&&(d.tok=0);return h},"J.viewer.Viewer,~S,J.modelset.LabelToken,~N,~N,java.util.Map");
c$.appendAtomTokenValue=b(c$,"appendAtomTokenValue",function(a,c,d,b,f){var g=null,h=NaN,e=null;try{switch(d.tok){case 1095761923:g=""+(null==f?c.index:f[c.index]);break;case 1766856708:e=J.modelset.Atom.atomPropertyTuple(c,d.tok);break;case 135270407:null!=d.data&&(h=d.data[c.index]);break;case 135266306:if(null!=d.data)var j=d.data,g=c.index<j.length?j[c.index]:"";break;case 1632634891:var k=c.getFormalCharge(),g=0<k?""+k+"+":0>k?""+-k+"-":"";break;case "g":g=""+c.getSelectedGroupIndexWithinChain();
break;case 1095766030:g=c.getModelNumberForLabel();break;case 1129318401:g=""+J.modelset.Atom.atomPropertyInt(c,d.tok);break;case "Q":h=c.getOccupancy100()/100;break;case 1666189314:h=J.modelset.Atom.atomPropertyFloat(a,c,d.tok);break;case "r":g=c.getSeqcodeString();break;case 1087373324:g=c.getStructureId();break;case 1095761941:var v=c.getStrucNo(),g=0>=v?"":""+v;break;case 1112539150:h=c.getGroupParameter(1112539150);Float.isNaN(h)&&(g="null");break;case 4:g=a.getModelAtomProperty(c,d.text.substring(2,
d.text.length-1));break;case 1641025539:case 1238369286:g=J.modelset.Atom.atomPropertyString(a,c,d.tok);break;case "W":g=c.getIdentityXYZ(!1);break;default:switch(d.tok&1137704960){case 1095761920:d.intAsFloat?h=J.modelset.Atom.atomPropertyInt(c,d.tok):g=""+J.modelset.Atom.atomPropertyInt(c,d.tok);break;case 1112539136:h=J.modelset.Atom.atomPropertyFloat(a,c,d.tok);break;case 1087373312:g=J.modelset.Atom.atomPropertyString(a,c,d.tok);break;case 1078984704:e=J.modelset.Atom.atomPropertyTuple(c,d.tok)}}}catch(m){if(y(m,
IndexOutOfBoundsException))h=NaN,e=g=null;else throw m;}g=d.format(h,g,e);null==b?d.text=g:b.append(g)},"J.viewer.Viewer,J.modelset.Atom,J.modelset.LabelToken,JU.SB,~A");b(c$,"format",function(a,c,d){return Float.isNaN(a)?null!=c?JU.PT.formatS(c,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");B(c$,"labelTokenParams","AaBbCcDEefGgIiLlMmNnoPpQqRrSsTtUuVvWXxYyZz%%%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",1095761940,
1087373316,1112539150,1112541199,1087373321,1112539151,1649412120,1146095631,"W",1112541188,1112541185,1112541189,1112541186,1112541190,1112541187,1115297793,1113200642,1113198595,1113198596,1113198597,1113200646,1113200647,1113200649,1113200650,1113200652,1650071565,1113200654,1112539137,1112539138,1095761922,1095761924,1766856708,1095761932,1112539140,1229984263,1288701960,1826248715,1112539143,1095761935,1112539141,1112539144,1095761937,1716520985,1666189314,1114638363,1087373323,1087373320,1113200651,
1641025539,1238369286,1095761941,1087373324,1087375373,1112539152,1112539153,1112539154,1112539155,1095763990,1649410049,1112541202,1112541203,1112541204,1313866249,1146093582,1146095627,1146095626,1146095629,1112541191,1112541192,1112541193,1114638362,1112539147,1112539148,1112539149,1146095628,1112539142,1112539139,1095761927],"STANDARD_LABEL","%[identify]","twoCharLabelTokenParams","fuv","twoCharLabelTokenIds",[1112541188,1112541189,1112541190,1112539153,1112539154,1112539155,1112541202,1112541203,
1112541204])});p("J.modelset");q(null,"J.modelset.Measurement","java.lang.Float JU.List $.SB J.atomdata.RadiusData J.constant.EnumVdw J.modelset.LabelToken J.util.Escape $.Measure".split(" "),function(){c$=u(function(){this.modelSet=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.viewer=this.text=this.strFormat=null;this.tainted=!1;this.renderArc=this.renderAxis=null;t(this,arguments)},J.modelset,"Measurement");N(c$,function(){this.countPlusIndices=D(5,0)});b(c$,"isTainted",function(){return this.tainted&&!(this.tainted=!1)});b(c$,"setM",function(a,c,d,b,f,g){this.modelSet=a;this.index=g;this.viewer=a.viewer;this.colix=b;this.strFormat=f;null!=c&&(this.tickInfo=c.tickInfo,this.pts=c.pts,this.mad=c.mad,this.thisID=c.thisID,this.text=c.text,null!=this.thisID&&
null!=this.text&&(this.labelColix=this.text.colix));null==this.pts&&(this.pts=Array(4));c=null==c?null:c.countPlusIndices;this.count=null==c?0:c[0];0<this.count&&(System.arraycopy(c,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},"J.modelset.ModelSet,J.modelset.Measurement,~N,~N,~S,~N");b(c$,"setPoints",function(a,c,d,b){this.modelSet=
a;this.countPlusIndices=c;this.count=c[0];this.pts=null==d?Array(4):d;this.viewer=a.viewer;this.tickInfo=b;return this},"J.modelset.ModelSet,~A,~A,J.modelset.TickInfo");b(c$,"setCount",function(a){this.setCountM(a)},"~N");b(c$,"setCountM",function(a){this.count=this.countPlusIndices[0]=a},"~N");b(c$,"getAtomIndex",function(a){return 0<a&&a<=this.count?this.countPlusIndices[a]:-1},"~N");b(c$,"getAtom",function(a){a=this.countPlusIndices[a];return-1>a?this.pts[-2-a]:this.modelSet.atoms[a]},"~N");b(c$,
"getLastIndex",function(){return 0<this.count?this.countPlusIndices[this.count]:-1});b(c$,"getString",function(){return this.strMeasurement});b(c$,"getStringUsing",function(a,c,d){this.viewer=a;this.value=this.getMeasurement(null);this.formatMeasurementAs(c,d,!0);return null==c?this.getInfoAsString(d):this.strMeasurement},"J.viewer.Viewer,~S,~S");b(c$,"getStringDetail",function(){return(2==this.count?"Distance":3==this.count?"Angle":"Torsion")+this.getMeasurementScript(" - ",!1)+" : "+this.value});
b(c$,"refresh",function(a){this.value=this.getMeasurement(a);this.isTrajectory=this.modelSet.isTrajectoryMeasurement(this.countPlusIndices);this.formatMeasurement(null)},"~A");b(c$,"getMeasurementScript",function(a,c){for(var d="",b=a.equals(" "),f=1;f<=this.count;f++)d+=(1<f?a:" ")+this.getLabel(f,b,c);return d},"~S,~B");b(c$,"formatMeasurementAs",function(a,c,d){null!=a&&0==a.length&&(a=null);if(d||!(null!=a&&0!=a.indexOf(this.countPlusIndices[0]+":")))this.strFormat=a,this.formatMeasurement(c)},
"~S,~S,~B");b(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");b(c$,"reformatDistanceIfSelected",function(){2==this.count&&this.viewer.isSelected(this.countPlusIndices[1])&&this.viewer.isSelected(this.countPlusIndices[2])&&this.formatMeasurement(null)});b(c$,"formatDistance",function(a){var c=
this.getLabelString();if(null==c)return"";if(null==a){var d=this.strFormat.indexOf("//");a=0<=d?this.strFormat.substring(d+2):null;null==a&&(a=this.viewer.getMeasureDistanceUnits(),this.strFormat+="//"+a)}a=J.modelset.Measurement.fixUnits(a);d=c.indexOf("//");0<=d&&(c=c.substring(0,d),0==c.length&&(c="%VALUE"));d=this.fixValue(a,0<=c.indexOf("%V"));return this.formatString(d,a,c)},"~S");c$.fixUnits=b(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");b(c$,"fixValue",function(a,c){if(2!=this.count)return this.value;var d=this.value;if(null!=a){var b=a.equals("%");if(b||a.endsWith("hz")){var f=this.getAtomIndex(1),g=this.getAtomIndex(2);if(0<=f&&0<=g){var f=this.getAtom(1),g=this.getAtom(2),h=!b&&1==J.modelset.Measurement.nmrType(a);this.type=b?"percent":h?"dipoleCouplingConstant":"J-CouplingConstant";d=b?d/(f.getVanderwaalsRadiusFloat(this.viewer,J.constant.EnumVdw.AUTO)+g.getVanderwaalsRadiusFloat(this.viewer,
J.constant.EnumVdw.AUTO)):h?this.viewer.getNMRCalculation().getDipolarConstantHz(f,g):this.viewer.getNMRCalculation().getIsoOrAnisoHz(!0,f,g,a,null);this.$isValid=!Float.isNaN(d);b&&(a="pm")}}if(a.equals("nm"))return c?Math.round(100*d)/1E3:d/10;if(a.equals("pm"))return c?Math.round(1E3*d)/10:100*d;if(a.equals("au"))return c?Math.round(1E3*(d/0.5291772))/1E3:d/0.5291772;if(a.endsWith("khz"))return c?Math.round(d/10)/100:d/1E3}return c?Math.round(100*d)/100:d},"~S,~B");c$.nmrType=b(c$,"nmrType",function(a){return 0>
a.indexOf("hz")?0:a.startsWith("dc_")||a.equals("khz")?1:2},"~S");b(c$,"formatAngle",function(a){var c=this.getLabelString();0<=c.indexOf("%V")&&(a=Math.round(10*a)/10);return this.formatString(a,"\u00b0",c)},"~N");b(c$,"getLabelString",function(){var a=this.countPlusIndices[0]+":",c=null;if(null!=this.strFormat){if(0==this.strFormat.length)return null;c=2<this.strFormat.length&&0==this.strFormat.indexOf(a)?this.strFormat:null}null==c&&(this.strFormat=null,c=this.viewer.getDefaultMeasurementLabel(this.countPlusIndices[0]));
0==c.indexOf(a)&&(c=c.substring(2));null==this.strFormat&&(this.strFormat=a+c);return c});b(c$,"formatString",function(a,c,d){return J.modelset.LabelToken.formatLabelMeasure(this.viewer,this,d,a,c)},"~N,~S,~S");b(c$,"sameAsPoints",function(a,c){if(this.count!=a[0])return!1;for(var d=!0,b=1;b<=this.count&&d;b++)d=this.countPlusIndices[b]==a[b];if(d)for(b=0;b<this.count&&d;b++)null!=c[b]&&(d=0.01>this.pts[b].distance(c[b]));if(d)return!0;switch(this.count){default:return!0;case 2:return this.sameAsIJ(a,
c,1,2)&&this.sameAsIJ(a,c,2,1);case 3:return this.sameAsIJ(a,c,1,3)&&this.sameAsIJ(a,c,2,2)&&this.sameAsIJ(a,c,3,1);case 4:return this.sameAsIJ(a,c,1,4)&&this.sameAsIJ(a,c,2,3)&&this.sameAsIJ(a,c,3,2)&&this.sameAsIJ(a,c,4,1)}},"~A,~A");b(c$,"sameAsIJ",function(a,c,d,b){d=this.countPlusIndices[d];a=a[b];return 0<=d||0<=a?d==a:0.01>this.pts[-2-d].distance(c[-2-a])},"~A,~A,~N,~N");b(c$,"sameAs",function(a,c){return this.sameAsIJ(this.countPlusIndices,this.pts,a,c)},"~N,~N");b(c$,"toVector",function(a){for(var c=
new JU.List,d=1;d<=this.count;d++)c.addLast(this.getLabel(d,a,!1));c.addLast(this.strMeasurement);return c},"~B");b(c$,"getMeasurement",function(a){if(null==this.countPlusIndices||2>this.count)return NaN;for(var c=this.count;0<=--c;)if(-1==this.countPlusIndices[c+1])return NaN;var c=null==a?this.getAtom(1):a[0],d=null==a?this.getAtom(2):a[1],b;switch(this.count){case 2:return c.distance(d);case 3:return b=null==a?this.getAtom(3):a[2],J.util.Measure.computeAngleABC(c,d,b,!0);case 4:return b=null==
a?this.getAtom(3):a[2],a=null==a?this.getAtom(4):a[3],J.util.Measure.computeTorsion(c,d,b,a,!0);default:return NaN}},"~A");b(c$,"getLabel",function(a,c,d){var b=this.countPlusIndices[a];return 0>b?(d?"modelIndex "+this.getAtom(a).modelIndex+" ":"")+J.util.Escape.eP(this.getAtom(a)):c?"(({"+b+"}))":this.viewer.getAtomInfo(b)},"~N,~B,~B");b(c$,"setModelIndex",function(a){if(null!=this.pts)for(var c=0;c<this.count;c++)null!=this.pts[c]&&(this.pts[c].modelIndex=a)},"~N");b(c$,"isValid",function(){return!(this.sameAs(1,
2)||2<this.count&&this.sameAs(1,3)||4==this.count&&this.sameAs(2,4))});c$.find=b(c$,"find",function(a,c){for(var d=c.countPlusIndices,b=c.pts,f=a.size();0<=--f;)if(a.get(f).sameAsPoints(d,b))return f;return-1},"JU.List,J.modelset.Measurement");b(c$,"isConnected",function(a,c){for(var d=-1,b=1;b<=c;b++){var f=this.getAtomIndex(b);if(!(0>f)){if(0<=d&&!a[f].isBonded(a[d]))return!1;d=f}}return!0},"~A,~N");b(c$,"getInfoAsString",function(a){var c=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(c);a.append(" \t").append(J.util.Escape.eS(this.strMeasurement));for(c=1;c<=this.count;c++)a.append(" \t").append(this.getLabel(c,!1,!1));null!=this.thisID&&a.append(" \t").append(this.thisID);return a.toString()},"~S");b(c$,"isInRange",function(a,c){if(a.factorType===J.atomdata.RadiusData.EnumType.FACTOR){var d=this.getAtom(1),b=this.getAtom(2),d=(d.getVanderwaalsRadiusFloat(this.viewer,a.vdwType)+b.getVanderwaalsRadiusFloat(this.viewer,
a.vdwType))*a.value;return c<=d}return 3.4028235E38==a.values[0]||c>=a.values[0]&&c<=a.values[1]},"J.atomdata.RadiusData,~N");b(c$,"isIntramolecular",function(a,c){for(var d=-1,b=1;b<=c;b++){var f=this.getAtomIndex(b);if(!(0>f))if(f=a[f].getMoleculeNumber(!1),0>d)d=f;else if(f!=d)return!1}return!0},"~A,~N");b(c$,"isMin",function(a){var c=this.getAtom(1),d=this.getAtom(2),b=z(100*d.distanceSquared(c)),c=c.getAtomName(),d=d.getAtomName(),d=0>c.compareTo(d)?c+d:d+c;a=a.get(d);return null!=a&&b==a.intValue()},
"java.util.Map");B(c$,"NMR_NOT",0,"NMR_DC",1,"NMR_JC",2)});p("J.modelset");q(["J.api.JmolMeasurementClient"],"J.modelset.MeasurementData",["java.lang.Float","JU.BS","$.List","J.modelset.Measurement","J.util.BSUtil"],function(){c$=u(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.viewer=this.modelSet=this.minArray=this.units=this.atoms=this.text=this.thisID=null;this.iFirstAtom=0;this.justOneModel=!0;this.htMin=null;t(this,arguments)},J.modelset,"MeasurementData",null,J.api.JmolMeasurementClient);w(c$,function(){});b(c$,"init",function(a,c,d){this.viewer=c;this.points=d;this.thisID=a;return this},"~S,J.viewer.Viewer,JU.List");b(c$,"setModelSet",function(a){this.modelSet=a;return this},"J.modelset.ModelSet");b(c$,"set",function(a,c,d,b,f,g,h,e,j,k,v,m,p){this.modelSet=
this.viewer.getModelSet();this.tokAction=a;2<=this.points.size()&&(s(this.points.get(0),JU.BS)&&s(this.points.get(1),JU.BS))&&(this.justOneModel=J.util.BSUtil.haveCommon(this.viewer.getModelBitSet(this.points.get(0),!1),this.viewer.getModelBitSet(this.points.get(1),!1)));this.htMin=c;this.radiusData=d;this.strFormat=b;this.units=f;this.tickInfo=g;this.mustBeConnected=h;this.mustNotBeConnected=e;this.intramolecular=j;this.isAll=k;this.mad=v;this.colix=m;this.text=p;return this},"~N,java.util.Map,J.atomdata.RadiusData,~S,~S,J.modelset.TickInfo,~B,~B,Boolean,~B,~N,~N,J.modelset.Text");
b(c$,"processNextMeasure",function(a){var c=a.getMeasurement(null);if(!(null!=this.htMin&&!a.isMin(this.htMin)||null!=this.radiusData&&!a.isInRange(this.radiusData,c)))if(null==this.measurementStrings&&null==this.measurements){var d=this.minArray[this.iFirstAtom];a.value=c;c=a.fixValue(this.units,!1);this.minArray[this.iFirstAtom]=-Infinity==1/d?c:Math.min(d,c)}else null!=this.measurementStrings?this.measurementStrings.addLast(a.getStringUsing(this.viewer,this.strFormat,this.units)):this.measurements.addLast(Float.$valueOf(a.getMeasurement(null)))},
"J.modelset.Measurement");b(c$,"getMeasurements",function(a,c){if(c){this.minArray=M(this.points.get(0).cardinality(),0);for(var d=0;d<this.minArray.length;d++)this.minArray[d]=-0;this.define(null,this.modelSet);return this.minArray}if(a)return this.measurements=new JU.List,this.define(null,this.modelSet),this.measurements;this.measurementStrings=new JU.List;this.define(null,this.modelSet);return this.measurementStrings},"~B,~B");b(c$,"define",function(a,c){this.client=null==a?this:a;this.atoms=c.atoms;
var d=this.points.size();if(!(2>d)){var b=-1,f=Array(4),g=D(5,0),h=(new J.modelset.Measurement).setPoints(c,g,f,null);h.setCount(d);for(var e=-1,j=0;j<d;j++){var k=this.points.get(j);if(s(k,JU.BS)){e=k.cardinality();if(0==e)return;1<e&&(b=0);e=j;0==j&&(this.iFirstAtom=0);g[j+1]=k.nextSetBit(0)}else f[j]=k,g[j+1]=-2-j}this.nextMeasure(0,e,h,b)}},"J.api.JmolMeasurementClient,J.modelset.ModelSet");b(c$,"nextMeasure",function(a,c,d,b){if(a>c)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 f=this.points.get(a),g=d.countPlusIndices,h=0==a?2147483647:g[a];if(0>h)this.nextMeasure(a+1,c,d,b);else{for(var e=!1,j=f.nextSetBit(0),k=0;0<=j;j=f.nextSetBit(j+1),k++)if(j!=h){var v=this.atoms[j].getModelIndex();if(0<=b&&this.justOneModel)if(0==a)b=v;else if(b!=v)continue;g[a+1]=j;0==a&&(this.iFirstAtom=
k);e=!0;this.nextMeasure(a+1,c,d,b)}e||this.nextMeasure(a+1,c,d,b)}}},"~N,~N,J.modelset.Measurement,~N")});p("J.modelset");q(["J.modelset.Measurement"],"J.modelset.MeasurementPending",null,function(){c$=u(function(){this.haveModified=this.haveTarget=!1;this.numSet=0;this.lastIndex=-1;t(this,arguments)},J.modelset,"MeasurementPending",J.modelset.Measurement);b(c$,"set",function(a){return this.setM(a,null,NaN,0,null,0)},"J.modelset.ModelSet");b(c$,"checkPoint",function(a){for(var c=1;c<=this.numSet;c++)if(this.countPlusIndices[c]==
-1-c&&0.01>this.pts[c-1].distance(a))return!1;return!0},"J.util.Point3fi");b(c$,"getIndexOf",function(a){for(var c=1;c<=this.numSet;c++)if(this.countPlusIndices[c]==a)return c;return 0},"~N");e(c$,"setCount",function(a){this.setCountM(a);this.numSet=a},"~N");b(c$,"addPoint",function(a,c,d){this.haveModified=a!=this.lastIndex;this.lastIndex=a;if(null==c){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(c))return d&&(this.numSet=this.count),this.count;a=this.numSet;this.haveModified=this.haveTarget=!0;this.count=this.numSet+1;this.pts[a]=c;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,J.util.Point3fi,~B")});p("J.modelset");q(["JU.BS","$.SB"],"J.modelset.Model",
["java.util.Hashtable","JU.AU","J.util.BSUtil"],function(){c$=u(function(){this.modelSet=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.atomCount=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.simpleCage=null;t(this,arguments)},J.modelset,"Model");N(c$,function(){this.loadScript=new JU.SB;this.bsAtoms=new JU.BS;this.bsAtomsDeleted=new JU.BS;
this.chains=Array(8)});b(c$,"getModelSet",function(){return this.modelSet});b(c$,"isModelkit",function(){return this.isModelKit});b(c$,"getTrueAtomCount",function(){return this.bsAtoms.cardinality()-this.bsAtomsDeleted.cardinality()});b(c$,"setSelectedTrajectory",function(a){this.selectedTrajectory=a},"~N");b(c$,"getSelectedTrajectory",function(){return this.selectedTrajectory});b(c$,"resetBoundCount",function(){this.bondCount=-1});b(c$,"getBondCount",function(){if(0<=this.bondCount)return this.bondCount;
var a=this.modelSet.bonds;this.bondCount=0;for(var c=this.modelSet.bondCount;0<=--c;)a[c].atom1.modelIndex==this.modelIndex&&this.bondCount++;return this.bondCount});w(c$,function(a,c,d,b,f,g){this.modelSet=a;this.dataSourceFrame=this.modelIndex=c;this.trajectoryBaseIndex=(this.isTrajectory=0<=d)?d:c;null==g&&(g=new java.util.Hashtable);this.auxiliaryInfo=g;g.containsKey("biosymmetryCount")&&(this.biosymmetryCount=g.get("biosymmetryCount").intValue(),this.biosymmetry=g.get("biosymmetry"));this.properties=
f;null==b?this.jmolFrameType="modelSet":(this.jmolData=b,this.isJmolDataFrame=!0,g.put("jmolData",b),g.put("title",b),this.jmolFrameType=0<=b.indexOf("ramachandran")?"ramachandran":0<=b.indexOf("quaternion")?"quaternion":"data")},"J.modelset.ModelSet,~N,~N,~S,java.util.Properties,java.util.Map");b(c$,"setNAltLocs",function(a){this.nAltLocs=a},"~N");b(c$,"setNInsertions",function(a){this.nInsertions=a},"~N");b(c$,"getModelNumberDotted",function(){return this.modelSet.getModelNumberDotted(this.modelIndex)});
b(c$,"getModelTitle",function(){return this.modelSet.getModelTitle(this.modelIndex)});b(c$,"isStructureTainted",function(){return this.structureTainted});b(c$,"getChains",function(){return this.chains});b(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");b(c$,"getGroupCountHetero",function(a){for(var c=0,d=this.chainCount;0<=--d;)for(var b=this.chains[d].groupCount;0<=--b;)this.chains[d].groups[b].isHetero()==
a&&c++;return c},"~B");b(c$,"calcSelectedGroupsCount",function(a){for(var c=this.chainCount;0<=--c;)this.chains[c].calcSelectedGroupsCount(a)},"JU.BS");b(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});b(c$,"getChainAt",function(a){return a<this.chainCount?this.chains[a]:null},"~N");b(c$,"getChain",function(a){for(var c=this.chainCount;0<=--c;){var d=this.chains[c];if(d.chainID==
a)return d}return null},"~N");b(c$,"fixIndices",function(a,c,d){this.fixIndicesM(a,c,d)},"~N,~N,JU.BS");b(c$,"fixIndicesM",function(a,c,d){this.dataSourceFrame>a&&this.dataSourceFrame--;this.trajectoryBaseIndex>a&&this.trajectoryBaseIndex--;this.firstAtomIndex-=c;for(a=0;a<this.chainCount;a++)this.chains[a].fixIndices(c,d);J.util.BSUtil.deleteBits(this.bsAtoms,d);J.util.BSUtil.deleteBits(this.bsAtomsDeleted,d)},"~N,~N,JU.BS");b(c$,"freeze",function(){this.freezeM()});b(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)});b(c$,"getPdbData",function(){},"J.viewer.Viewer,~S,~S,~B,JU.BS,JU.OC,~A,JU.SB,JU.BS");b(c$,"getDefaultLargePDBRendering",function(){},"JU.SB,~N");b(c$,"getBioBranches",function(a){return a},"JU.List");b(c$,"getGroupsWithin",function(){},"~N,JU.BS,JU.BS");b(c$,"getSequenceBits",function(){},
"~S,JU.BS,JU.BS");b(c$,"getRasmolHydrogenBonds",function(){},"JU.BS,JU.BS,JU.List,~B,~N,~B,JU.BS");b(c$,"clearRasmolHydrogenBonds",function(){},"JU.BS");b(c$,"clearBioPolymers",function(){});b(c$,"calcSelectedMonomersCount",function(){},"JU.BS");b(c$,"calculatePolymers",function(){},"~A,~N,~N,JU.BS,~B");b(c$,"getAllPolymerInfo",function(){},"JU.BS,java.util.Map,JU.List");b(c$,"getBioPolymerCount",function(){return 0});b(c$,"getPolymerPointsAndVectors",function(){},"JU.BS,JU.List,~B,~N");b(c$,"getPolymerLeadMidPoints",
function(){return null},"~N");b(c$,"recalculateLeadMidpointsAndWingVectors",function(){});b(c$,"calculateStructures",function(){return""},"~B,~B,~B,~B,~B");b(c$,"setStructureList",function(){},"java.util.Map");b(c$,"getChimeInfo",function(a,c){this.getChimeInfoM(a,c)},"JU.SB,~N");b(c$,"getChimeInfoM",function(a,c){a.append("\nNumber of Atoms ..... "+(this.modelSet.atomCount-c));0<c&&a.append(" ("+c+")");a.append("\nNumber of Bonds ..... "+this.modelSet.bondCount);a.append("\nNumber of Models ...... "+
this.modelSet.modelCount)},"JU.SB,~N");b(c$,"calculateStruts",function(){return 0},"J.modelset.ModelSet,JU.BS,JU.BS");b(c$,"calculateStraightness",function(){},"J.viewer.Viewer,~S,~S,~N");b(c$,"selectSeqcodeRange",function(){},"~N,~N,~N,JU.BS,~B");b(c$,"setConformation",function(){},"JU.BS");b(c$,"getPdbConformation",function(){return!1},"JU.BS,~N");b(c$,"getProteinStructureState",function(){return null},"JU.BS,~B,~B,~N");b(c$,"getFullPDBHeader",function(){return null})});p("J.modelset");q(["J.modelset.BondCollection",
"JU.BS","$.List","$.P3","J.util.BoxInfo"],"J.modelset.ModelCollection","java.lang.Boolean $.Character $.Float java.util.Date $.Hashtable JU.AU $.P4 $.PT $.SB $.V3 J.api.Interface $.JmolModulationSet J.bspt.Bspf J.constant.EnumPalette $.EnumVdw J.io.XmlUtil J.modelset.Atom $.AtomIteratorWithinModel $.AtomIteratorWithinModelSet $.Bond $.HBond $.LabelToken $.Model $.StateScript J.util.BSUtil $.Elements $.Escape $.JmolEdge $.JmolMolecule $.Logger $.Point3fi $.Quaternion $.Txt J.viewer.Viewer".split(" "),
function(){c$=u(function(){this.models=this.modelSetName=this.bsSymmetry=null;this.modelCount=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.modelSetAuxiliaryInfo=this.modelSetProperties=null;this.someModelsHaveFractionalCoordinates=this.someModelsHaveAromaticBonds=this.someModelsHaveSymmetry=!1;this.averageAtomPoint=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.shapeManager=this.bsAll=null;this.proteinStructureTainted=!1;this.triangulator=this.vOrientations=this.htPeaks=this.symTemp=null;t(this,arguments)},J.modelset,"ModelCollection",J.modelset.BondCollection);N(c$,function(){this.models=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.averageAtomPoint=new JU.P3;this.boxInfo=new J.util.BoxInfo;this.boxInfo.addBoundBoxPoint(JU.P3.new3(-10,-10,-10));this.boxInfo.addBoundBoxPoint(JU.P3.new3(10,10,10));this.stateScripts=new JU.List;this.selectedMolecules=new JU.BS;this.ptTemp1=new JU.P3;this.ptTemp2=new JU.P3});b(c$,"mergeModelArrays",function(a){this.atoms=a.atoms;this.bonds=a.bonds;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)},"J.modelset.ModelSet");e(c$,"releaseModelSet",function(){this.unitCells=this.bsAll=this.bsSymmetry=this.models=null;this.releaseModelSetBC()});b(c$,"getUnitCell",function(a){return!this.haveUnitCells||
0>a||a>=this.modelCount?null:null!=this.models[a].simpleCage?this.models[a].simpleCage:null==this.unitCells||a>=this.unitCells.length||!this.unitCells[a].haveUnitCell()?null:this.unitCells[a]},"~N");b(c$,"setModelCage",function(a,c){0>a||a>=this.modelCount||(this.models[a].simpleCage=c,this.haveUnitCells=!0)},"~N,J.api.SymmetryInterface");b(c$,"getPlaneIntersection",function(a,c,d,b,f){var g=null;switch(a){case 1614417948:if(null==f)return null;g=f.getCanonicalCopy(d,!0);break;case 1679429641:g=this.boxInfo.getCanonicalCopy(d)}a=
new JU.List;a.addLast(g);return this.intersectPlane(c,a,b)},"~N,JU.P4,~N,~N,J.api.SymmetryInterface");b(c$,"getModelName",function(a){return 1>this.modelCount?"":0<=a?this.modelNames[a]:this.modelNumbersForAtomLabel[-1-a]},"~N");b(c$,"getModelTitle",function(a){return this.getModelAuxiliaryInfoValue(a,"title")},"~N");b(c$,"getModelFileName",function(a){return this.getModelAuxiliaryInfoValue(a,"fileName")},"~N");b(c$,"getModelFileType",function(a){return this.getModelAuxiliaryInfoValue(a,"fileType")},
"~N");b(c$,"setFrameTitle",function(a,c){if(s(c,String))for(var d=a.nextSetBit(0);0<=d;d=a.nextSetBit(d+1))this.frameTitles[d]=c;else for(var d=a.nextSetBit(0),b=0;0<=d;d=a.nextSetBit(d+1))b<c.length&&(this.frameTitles[d]=c[b++])},"JU.BS,~O");b(c$,"getFrameTitle",function(a){return 0<=a&&a<this.modelCount?this.frameTitles[a]:""},"~N");b(c$,"getModelNumberForAtomLabel",function(a){return this.modelNumbersForAtomLabel[a]},"~N");b(c$,"calculatePolymers",function(a,c,d,b){if(this.isPDB)for(var f=!this.viewer.getBoolean(603979892),
g=0;g<this.modelCount;g++)if((null==b||!b.get(g))&&this.models[g].isBioModel){this.models[g].calculatePolymers(a,c,d,b,f);break}},"~A,~N,~N,JU.BS");b(c$,"getGroups",function(){for(var a=0,c=0;c<this.modelCount;c++)a+=this.models[c].getGroupCount();for(var a=Array(a),d=c=0;c<this.modelCount;c++)for(var b=0;b<this.models[c].chainCount;b++)for(var f=0;f<this.models[c].chains[b].groupCount;f++)a[d]=this.models[c].chains[b].groups[f],a[d].groupIndex=d,d++;return a});b(c$,"getNotionalUnitcell",function(){var a=
this.getUnitCell(0);return null==a?null:a.getNotionalUnitCell()});b(c$,"setCrystallographicDefaults",function(){return!this.isPDB&&this.someModelsHaveSymmetry&&this.someModelsHaveFractionalCoordinates});b(c$,"getAverageAtomPoint",function(){return this.averageAtomPoint});b(c$,"getBoundBoxCenter",function(a){return this.isJmolDataFrameForModel(a)?new JU.P3:this.boxInfo.getBoundBoxCenter()},"~N");b(c$,"getBoundBoxCornerVector",function(){return this.boxInfo.getBoundBoxCornerVector()});b(c$,"getBboxVertices",
function(){return this.boxInfo.getBoundBoxVertices()});b(c$,"getBoundBoxInfo",function(){return this.boxInfo.getBoundBoxInfo()});b(c$,"getBoundBoxModels",function(){return this.bboxModels});b(c$,"setBoundBox",function(a,c,d,b){this.isBbcageDefault=!1;this.bboxAtoms=this.bboxModels=null;this.boxInfo.setBoundBox(a,c,d,b)},"JU.P3,JU.P3,~B,~N");b(c$,"getBoundBoxCommand",function(a){if(!a&&null!=this.bboxAtoms)return"boundbox "+J.util.Escape.eBS(this.bboxAtoms);this.ptTemp.setT(this.boxInfo.getBoundBoxCenter());
var c=this.boxInfo.getBoundBoxCornerVector();a=a?"boundbox "+J.util.Escape.eP(this.ptTemp)+" "+J.util.Escape.eP(c)+"\n#or\n":"";this.ptTemp.sub(c);a+="boundbox corners "+J.util.Escape.eP(this.ptTemp)+" ";this.ptTemp.scaleAdd2(2,c,this.ptTemp);c=Math.abs(8*c.x*c.y*c.z);return a+=J.util.Escape.eP(this.ptTemp)+" # volume = "+c},"~B");b(c$,"getDefaultVdwType",function(a){return!this.models[a].isBioModel?J.constant.EnumVdw.AUTO_BABEL:0==this.models[a].hydrogenCount?J.constant.EnumVdw.AUTO_JMOL:J.constant.EnumVdw.AUTO_BABEL},
"~N");b(c$,"setRotationRadius",function(a,c){return this.isJmolDataFrameForModel(a)?(this.models[a].defaultRotationRadius=c,!1):!0},"~N,~N");b(c$,"calcRotationRadius",function(a,c){if(this.isJmolDataFrameForModel(a)){var d=this.models[a].defaultRotationRadius;return 0==d?10:d}for(var d=0,b=this.atomCount;0<=--b;)if(this.isJmolDataFrameForAtom(this.atoms[b]))for(a=this.atoms[b].modelIndex;0<=b&&this.atoms[b].modelIndex==a;)b--;else{var f=this.atoms[b],f=c.distance(f)+this.getRadiusVdwJmol(f);f>d&&
(d=f)}return 0==d?10:d},"~N,JU.P3");b(c$,"calcBoundBoxDimensions",function(a,c){null!=a&&0>a.nextSetBit(0)&&(a=null);null==a&&this.isBbcageDefault||2>this.atomCount||(this.bboxModels=this.getModelBitSet(this.bboxAtoms=J.util.BSUtil.copy(a),!1),this.calcAtomsMinMax(a,this.boxInfo)==this.atomCount&&(this.isBbcageDefault=!0),null==a&&(this.averageAtomPoint.setT(this.getAtomSetCenter(null)),null!=this.unitCells&&this.calcUnitCellMinMax()),this.boxInfo.setBbcage(c))},"JU.BS,~N");b(c$,"getBoxInfo",function(a,
c){if(null==a)return this.boxInfo;var d=new J.util.BoxInfo;this.calcAtomsMinMax(a,d);d.setBbcage(c);return d},"JU.BS,~N");b(c$,"calcAtomsMinMax",function(a,c){c.reset();for(var d=0,b=null==a,f=b?this.atomCount-1:a.nextSetBit(0);0<=f;f=b?f-1:a.nextSetBit(f+1))d++,this.isJmolDataFrameForAtom(this.atoms[f])||c.addBoundBoxPoint(this.atoms[f]);return d},"JU.BS,J.util.BoxInfo");b(c$,"calcUnitCellMinMax",function(){for(var a=0;a<this.modelCount;a++)if(this.unitCells[a].getCoordinatesAreFractional())for(var c=
this.unitCells[a].getUnitCellVertices(),d=0;8>d;d++)this.boxInfo.addBoundBoxPoint(c[d])});b(c$,"calcRotationRadiusBs",function(a){for(var c=this.getAtomSetCenter(a),d=0,b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1)){var f=this.atoms[b],f=c.distance(f)+this.getRadiusVdwJmol(f);f>d&&(d=f)}return 0==d?10:d},"JU.BS");b(c$,"getCenterAndPoints",function(a,c){for(var d,b,f=c?1:0,g=a.size();0<=--g;){var h=a.get(g);d=h[0];s(h[1],JU.BS)?(b=h[1],f+=Math.min(d.cardinality(),b.cardinality())):f+=Math.min(d.cardinality(),
h[1].length)}var e=ia(2,f,null);c&&(e[0][0]=new JU.P3,e[1][0]=new JU.P3);for(g=a.size();0<=--g;)if(h=a.get(g),d=h[0],s(h[1],JU.BS)){b=h[1];for(var h=d.nextSetBit(0),j=b.nextSetBit(0);0<=h&&0<=j;h=d.nextSetBit(h+1),j=b.nextSetBit(j+1))e[0][--f]=this.atoms[h],e[1][f]=this.atoms[j],c&&(e[0][0].add(this.atoms[h]),e[1][0].add(this.atoms[j]))}else{b=h[1];h=d.nextSetBit(0);for(j=0;0<=h&&j<b.length;h=d.nextSetBit(h+1),j++)e[0][--f]=this.atoms[h],e[1][f]=b[j],c&&(e[0][0].add(this.atoms[h]),e[1][0].add(b[j]))}c&&
(e[0][0].scale(1/(e[0].length-1)),e[1][0].scale(1/(e[1].length-1)));return e},"JU.List,~B");b(c$,"getAtomSetCenter",function(a){var c=JU.P3.new3(0,0,0),d=0;if(null!=a)for(var b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1))this.isJmolDataFrameForAtom(this.atoms[b])||(d++,c.add(this.atoms[b]));0<d&&c.scale(1/d);return c},"JU.BS");b(c$,"setAPm",function(a,c,d,b,f,g,h){this.setAPa(a,c,d,b,f,g,h);switch(c){case 1095763990:case 1632634891:this.viewer.getBoolean(603979944)&&this.assignAromaticBonds()}},"JU.BS,~N,~N,~N,~S,~A,~A");
b(c$,"addStateScript",function(a,c,d,b,f,g,h){var e=this.viewer.getCurrentModelIndex();g?(this.thisStateModel!=e&&(a="frame "+(0>e?"all #"+e:this.getModelNumberDotted(e))+";\n  "+a),this.thisStateModel=e):this.thisStateModel=-1;a=new J.modelset.StateScript(this.thisStateModel,a,c,d,b,f,h);a.isValid()&&this.stateScripts.addLast(a);return a},"~S,JU.BS,JU.BS,JU.BS,~S,~B,~B");b(c$,"calculateStructuresAllExcept",function(a,c,d,b,f,g){this.freezeModels();var h="";a=J.util.BSUtil.copyInvert(a,this.modelCount);
f&&this.setDefaultStructure(a);for(var e=a.nextSetBit(0);0<=e;e=a.nextSetBit(e+1))h+=this.models[e].calculateStructures(c,d,b,f,g);f&&this.setStructureIndexes();return h},"JU.BS,~B,~B,~B,~B,~B");b(c$,"setDefaultStructure",function(a){for(var c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))this.models[c].isBioModel&&null==this.models[c].defaultStructure&&(this.models[c].defaultStructure=this.getProteinStructureState(this.models[c].bsAtoms,!1,!1,0))},"JU.BS");b(c$,"setProteinType",function(a,c){var d=-1,
b=-1,f=this.getModelBitSet(a,!1);this.setDefaultStructure(f);for(var g=a.nextSetBit(0);0<=g;g=a.nextSetBit(g+1)){b!=g-1&&(d=-1);var d=this.atoms[g].group.setProteinStructureType(c,d),h=this.atoms[g].modelIndex;this.proteinStructureTainted=this.models[h].structureTainted=!0;b=g=this.atoms[g].group.lastAtomIndex}d=D(this.modelCount,0);for(g=0;g<this.atomCount;)h=this.atoms[g].modelIndex,f.get(h)?(b=this.atoms[g].getStrucNo(),1E3>b&&b>d[h]&&(d[h]=b),g=this.atoms[g].group.lastAtomIndex+1):g=this.models[h].firstAtomIndex+
this.models[h].atomCount;for(g=0;g<this.atomCount;)h=this.atoms[g].modelIndex,f.get(h)?(1E3<this.atoms[g].getStrucNo()&&this.atoms[g].group.setStrucNo(++d[h]),g=this.atoms[g].group.lastAtomIndex+1):g=this.models[h].firstAtomIndex+this.models[h].atomCount},"JU.BS,J.constant.EnumStructure");b(c$,"freezeModels",function(){for(var a=this.modelCount;0<=--a;)this.models[a].freeze()});b(c$,"getStructureList",function(){return this.viewer.getStructureList()});b(c$,"setStructureList",function(a){for(var c=
this.modelCount;0<=--c;)this.models[c].setStructureList(a)},"java.util.Map");b(c$,"setConformation",function(a){for(var c=this.getModelBitSet(a,!1),d=c.nextSetBit(0);0<=d;d=c.nextSetBit(d+1))this.models[d].setConformation(a);return a},"JU.BS");b(c$,"getConformation",function(a,c,d){for(var b=new JU.BS,f=this.modelCount;0<=--f;)if(f==a||0>a){var g=this.getAltLocListInModel(f),h=this.getAltLocCountInModel(f);if(!(0<c&&c>=h)){var e=this.viewer.getModelUndeletedAtomsBitSet(f);if(0<=c&&!this.models[f].getPdbConformation(e,
c))for(;0<=--h;)h!=c&&e.andNot(this.getAtomBitsMDa(1048607,g.substring(h,h+1)));0<=e.nextSetBit(0)&&(b.or(e),d&&this.models[f].setConformation(e))}}return b},"~N,~N,~B");b(c$,"getHeteroList",function(a){for(var c=new java.util.Hashtable,d=!1,b=this.modelCount;0<=--b;)if(0>a||b==a){var f=this.getModelAuxiliaryInfoValue(b,"hetNames");if(null!=f)for(var d=!0,g,f=f.entrySet().iterator();f.hasNext()&&((g=f.next())||1);){var h=g.getKey();c.put(h,g.getValue())}}return d?c:this.getModelSetAuxiliaryInfoValue("hetNames")},
"~N");b(c$,"getModelSetProperties",function(){return this.modelSetProperties});b(c$,"getModelSetAuxiliaryInfo",function(){return this.modelSetAuxiliaryInfo});b(c$,"getModelSetProperty",function(a){return null==this.modelSetProperties?null:this.modelSetProperties.getProperty(a)},"~S");b(c$,"getModelSetAuxiliaryInfoValue",function(a){return null==this.modelSetAuxiliaryInfo?null:this.modelSetAuxiliaryInfo.get(a)},"~S");b(c$,"getModelSetAuxiliaryInfoBoolean",function(a){a=this.getModelSetAuxiliaryInfoValue(a);
return s(a,Boolean)&&a.booleanValue()},"~S");b(c$,"mergeTrajectories",function(a){if(null==this.trajectorySteps){if(!a)return 0;this.trajectorySteps=new JU.List}for(a=this.trajectorySteps.size();a<this.modelCount;a++)this.trajectorySteps.addLast(null);return this.modelCount},"~B");b(c$,"getTrajectoryIndex",function(a){return this.models[a].trajectoryBaseIndex},"~N");b(c$,"isTrajectory",function(a){return this.models[a].isTrajectory},"~N");b(c$,"isTrajectoryMeasurement",function(a){if(null==a)return!1;
for(var c=a[0],d,b=1;b<=c;b++)if(0<=(d=a[b])&&this.models[this.atoms[d].modelIndex].isTrajectory)return!0;return!1},"~A");b(c$,"getModelBitSet",function(a,c){for(var d=new JU.BS,b=0,f=null==a,b=f?0:a.nextSetBit(0);0<=b&&b<this.atomCount;b=f?b+1:a.nextSetBit(b+1)){d.set(b=this.atoms[b].modelIndex);if(c)for(var g=this.models[b].trajectoryBaseIndex,h=0;h<this.modelCount;h++)this.models[h].trajectoryBaseIndex==g&&d.set(h);b=this.models[b].firstAtomIndex+this.models[b].atomCount-1}return d},"JU.BS,~B");
b(c$,"getIterativeModels",function(a){for(var c=new JU.BS,d=0;d<this.modelCount;d++)(a||!this.isJmolDataFrameForModel(d))&&this.models[d].trajectoryBaseIndex==d&&c.set(d);return c},"~B");b(c$,"isTrajectorySubFrame",function(a){return this.models[a].isTrajectory&&this.models[a].trajectoryBaseIndex!=a},"~N");b(c$,"selectDisplayedTrajectories",function(a){for(var c=0;c<this.modelCount;c++)this.models[c].isTrajectory&&this.atoms[this.models[c].firstAtomIndex].modelIndex!=c&&a.clear(c);return a},"JU.BS");
b(c$,"fillAtomData",function(a,c){if(0!=(c&4)){this.getMolecules();a.bsMolecules=Array(this.molecules.length);a.atomMolecule=D(this.atomCount,0);for(var d,b=0;b<this.molecules.length;b++){d=a.bsMolecules[b]=this.molecules[b].atomList;for(var f=d.nextSetBit(0);0<=f;f=d.nextSetBit(f+1))a.atomMolecule[f]=b}}0!=(c&8)?(d=D(1,0),a.hAtomRadius=this.viewer.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.models[a.modelIndex].firstAtomIndex,a.lastModelIndex=a.firstModelIndex=0==this.atomCount?0:this.atoms[a.firstAtomIndex].modelIndex,a.modelName=this.getModelNumberDotted(a.firstModelIndex),this.fillADa(a,c))},"J.atomdata.AtomData,~N");b(c$,"getModelNumberDotted",function(a){return 1>this.modelCount||a>=this.modelCount||0>a?"":J.util.Escape.escapeModelFileNumber(this.modelFileNumbers[a])},"~N");b(c$,"getModelNumber",function(a){2147483647==
a&&(a=this.modelCount-1);return this.modelNumbers[a]},"~N");b(c$,"getModelFileNumber",function(a){return this.modelFileNumbers[a]},"~N");b(c$,"getModelProperties",function(a){return this.models[a].properties},"~N");b(c$,"getModelProperty",function(a,c){var d=this.models[a].properties;return null==d?null:d.getProperty(c)},"~N,~S");b(c$,"getModelAuxiliaryInfo",function(a){return 0>a?null:this.models[a].auxiliaryInfo},"~N");b(c$,"setModelAuxiliaryInfo",function(a,c,d){this.models[a].auxiliaryInfo.put(c,
d)},"~N,~O,~O");b(c$,"getModelAuxiliaryInfoValue",function(a,c){return 0>a?null:this.models[a].auxiliaryInfo.get(c)},"~N,~S");b(c$,"getModelAuxiliaryInfoBoolean",function(a,c){var d=this.models[a].auxiliaryInfo;return null!=d&&d.containsKey(c)&&d.get(c).booleanValue()},"~N,~S");b(c$,"getModelAuxiliaryInfoInt",function(a,c){var d=this.models[a].auxiliaryInfo;return null!=d&&d.containsKey(c)?d.get(c).intValue():-2147483648},"~N,~S");b(c$,"getModelAtomProperty",function(a,c){var d=this.getModelAuxiliaryInfoValue(a.modelIndex,
c);if(!s(d,Array))return"";var b=a.index-this.models[a.modelIndex].firstAtomIndex;return b<d.length?d[b].toString():""},"J.modelset.Atom,~S");b(c$,"getInsertionCountInModel",function(a){return this.models[a].nInsertions},"~N");c$.modelFileNumberFromFloat=b(c$,"modelFileNumberFromFloat",function(a){var c=m(Math.floor(a));for(a=m(Math.floor(1E4*(a-c+1E-5)));0!=a&&0==a%10;)a/=10;return 1E6*c+a},"~N");b(c$,"getAltLocCountInModel",function(a){return this.models[a].nAltLocs},"~N");b(c$,"getChainCount",
function(a){for(var c=0,d=this.modelCount;0<=--d;)c+=this.models[d].getChainCount(a);return c},"~B");b(c$,"getBioPolymerCount",function(){for(var a=0,c=this.modelCount;0<=--c;)this.isTrajectorySubFrame(c)||(a+=this.models[c].getBioPolymerCount());return a});b(c$,"getBioPolymerCountInModel",function(a){return 0>a?this.getBioPolymerCount():this.isTrajectorySubFrame(a)?0:this.models[a].getBioPolymerCount()},"~N");b(c$,"getPolymerPointsAndVectors",function(a,c,d,b){for(var f=0;f<this.modelCount;++f)this.models[f].getPolymerPointsAndVectors(a,
c,d,b)},"JU.BS,JU.List,~B,~N");b(c$,"recalculateLeadMidpointsAndWingVectors",function(a){if(0>a)for(a=0;a<this.modelCount;a++)this.isTrajectorySubFrame(a)||this.models[a].recalculateLeadMidpointsAndWingVectors();else this.models[a].recalculateLeadMidpointsAndWingVectors()},"~N");b(c$,"getPolymerLeadMidPoints",function(a,c){return this.models[a].getPolymerLeadMidPoints(c)},"~N,~N");b(c$,"getChainCountInModel",function(a,c){return 0>a?this.getChainCount(c):this.models[a].getChainCount(c)},"~N,~B");
b(c$,"getGroupCount",function(){for(var a=0,c=this.modelCount;0<=--c;)a+=this.models[c].getGroupCount();return a});b(c$,"getGroupCountInModel",function(a){return 0>a?this.getGroupCount():this.models[a].getGroupCount()},"~N");b(c$,"calcSelectedGroupsCount",function(a){for(var c=this.modelCount;0<=--c;)this.models[c].calcSelectedGroupsCount(a)},"JU.BS");b(c$,"calcSelectedMonomersCount",function(a){for(var c=this.modelCount;0<=--c;)this.models[c].calcSelectedMonomersCount(a)},"JU.BS");b(c$,"calcRasmolHydrogenBonds",
function(a,c,d,b,f,g,h){for(var e=null==c||a.equals(c),j=this.modelCount;0<=--j;)this.models[j].isBioModel&&this.models[j].trajectoryBaseIndex==j&&(null==d&&(this.models[j].clearRasmolHydrogenBonds(a),e||this.models[j].clearRasmolHydrogenBonds(c)),this.models[j].getRasmolHydrogenBonds(a,c,d,b,f,g,h))},"JU.BS,JU.BS,JU.List,~B,~N,~B,JU.BS");b(c$,"calculateStraightness",function(){if(!this.getHaveStraightness()){for(var a=this.viewer.getQuaternionFrame(),c=this.viewer.getInt(553648146),d=this.modelCount;0<=
--d;)this.models[d].calculateStraightness(this.viewer,"S",a,c);this.setHaveStraightness(!0)}});b(c$,"getAtomGroupQuaternions",function(a,c,d){for(var b=0,f=new JU.List,g=a.nextSetBit(0);0<=g&&b<c;g=a.nextSetBit(g+1)){var h=this.atoms[g].group,e=h.getQuaternion(d);if(null==e&&(-2147483648==h.seqcode&&(e=h.getQuaternionFrame(this.atoms)),null==e))continue;b++;f.addLast(e);g=h.lastAtomIndex}return f.toArray(Array(f.size()))},"JU.BS,~N,~S");b(c$,"getPdbAtomData",function(a,c){if(0==this.atomCount||0>
a.nextSetBit(0))return"";null==c&&(c=this.viewer.getOutputChannel(null,null));var d=this.atoms[a.nextSetBit(0)].modelIndex,b=-1,f="%6.2Q%6.2b          ";if("PQR".equals(c.getType())){for(var f="%8.4P%7.4V       ",g=0,h=a.nextSetBit(0);0<=h;h=a.nextSetBit(h+1))g+=this.atoms[h].getPartialCharge();c.append("REMARK   1 PQR file generated by Jmol "+J.viewer.Viewer.getJmolVersion()).append("\nREMARK   1 created "+new java.util.Date).append("\nREMARK   1 Forcefield Used: unknown\nREMARK   1").append("\nREMARK   5").append("\nREMARK   6 Total charge on this protein: "+
g+" e\nREMARK   6\n")}for(var h=a.length()-1,e=(g=d!=this.atoms[h].modelIndex)?null:new JU.SB,d=this.models[d].isPdbWithMultipleBonds,j,h=a.nextSetBit(0);0<=h;h=a.nextSetBit(h+1)){var k=this.atoms[h];g&&k.modelIndex!=b&&(-1!=b&&c.append("ENDMDL\n"),b=k.modelIndex,c.append("MODEL     "+(b+1)+"\n"));var v=k.getAtomName();j=2==k.getElementSymbol().length||4<=v.length||Character.isDigit(v.charAt(0));var m=this.models[k.modelIndex].isBioModel,v=k.isHetero();j=m?v?j?J.modelset.LabelToken.compile(this.viewer,
"HETATM%5.-5i %-4.4a%1A%3.-3n %1c%4.-4R%1E   %8.3x%8.3y%8.3z"+f,"\x00",null):J.modelset.LabelToken.compile(this.viewer,"HETATM%5.-5i  %-3.3a%1A%3.-3n %1c%4.-4R%1E   %8.3x%8.3y%8.3z"+f,"\x00",null):j?J.modelset.LabelToken.compile(this.viewer,"ATOM  %5.-5i %-4.4a%1A%3.-3n %1c%4.-4R%1E   %8.3x%8.3y%8.3z"+f,"\x00",null):J.modelset.LabelToken.compile(this.viewer,"ATOM  %5.-5i  %-3.3a%1A%3.-3n %1c%4.-4R%1E   %8.3x%8.3y%8.3z"+f,"\x00",null):j?J.modelset.LabelToken.compile(this.viewer,"HETATM%5.-5i %-4.4a%1AUNK %1c   1%1E   %8.3x%8.3y%8.3z"+
f,"\x00",null):J.modelset.LabelToken.compile(this.viewer,"HETATM%5.-5i  %-3.3a%1AUNK %1c   1%1E   %8.3x%8.3y%8.3z"+f,"\x00",null);var p=k.getElementSymbolIso(!1).toUpperCase();c.append(J.modelset.LabelToken.formatLabelAtomArray(this.viewer,k,j,"\x00",null)).append(1==p.length?" "+p:p.substring(0,2)).append("  \n");if(!g&&(!m||v||d))if(m=k.getBonds(),null!=m)for(j=0;j<m.length;j++){var x=k.getAtomNumber(),r=m[j].getOtherAtom(k);if(a.get(r.index)&&(p=m[j].getCovalentOrder(),!(1==p&&d&&!v)))switch(r=
r.getAtomNumber(),p){case 2:case 3:if(r<x)continue;case 1:e.append("CONECT").append(J.util.Txt.formatStringI("%5i","i",x));for(x=0;x<p;x++)e.append(J.util.Txt.formatStringI("%5i","i",r));e.appendC("\n")}}}g?c.append("ENDMDL\n"):c.append(e.toString());return c.toString()},"JU.BS,JU.OC");b(c$,"getPdbData",function(a,c,d,b,f){this.isJmolDataFrameForModel(a)&&(a=this.getJmolDataSourceFrame(a));if(0>a)return"";var g=this.models[a].isBioModel;if(null==b&&!g)return null;var h=this.models[a];null==f&&(f=
this.viewer.getOutputChannel(null,null));var e=new JU.SB,j=0<=c.indexOf("draw"),k=null,v=new JU.BS,m="\x00",p=this.getLabeler().compile(this.viewer,"ATOM  %-6i%4a%1A%3n %1c%4R%1E   ","\x00",null);if(null==b)m=11<c.length&&0<=c.indexOf("quaternion ")?c.charAt(11):"R",h.getPdbData(this.viewer,c,m,j,d,f,p,e,v),k=this.viewer.getModelUndeletedAtomsBitSet(a);else{k=b[0];a=b[1];var h=b[2],x=b[3],r=null!=x,q=b[4],s=b[5],t=b[6];b=b[7];f.append("REMARK   6 Jmol PDB-encoded data: ").append(c).append(";\n");
f.append("REMARK   6 Jmol data").append(" min = ").append(J.util.Escape.eP(q)).append(" max = ").append(J.util.Escape.eP(s)).append(" unScaledXyz = xyz * ").append(J.util.Escape.eP(t)).append(" + ").append(J.util.Escape.eP(b)).append(";\n");c=null;b=k.nextSetBit(0);for(q=0;0<=b;b=k.nextSetBit(b+1),q++){var s=a[q],t=h[q],u=r?x[q]:0;if(!Float.isNaN(s)&&!Float.isNaN(t)&&!Float.isNaN(u)){var w=this.atoms[b];f.append(J.modelset.LabelToken.formatLabelAtomArray(this.viewer,w,p,"\x00",null));g&&v.set(b);
f.append(J.util.Txt.sprintf("%-8.2f%-8.2f%-10.2f    %6.3f          %2s    %s\n","ssF",[w.getElementSymbolIso(!1).toUpperCase(),"",[s,t,u,0]]));null!=c&&c.getPolymerIndexInModel()==w.getPolymerIndexInModel()&&e.append("CONECT").append(J.util.Txt.formatStringI("%5i","i",c.getAtomNumber())).append(J.util.Txt.formatStringI("%5i","i",w.getAtomNumber())).appendC("\n");c=w}}}f.append(e.toString());if(j)return f.toString();d.and(k);g&&f.append("\n\n"+this.getProteinStructureState(v,!1,"R"==m,1));return f.toString()},
"~N,~S,JU.BS,~A,JU.OC");b(c$,"isJmolDataFrameForModel",function(a){return 0<=a&&a<this.modelCount&&this.models[a].isJmolDataFrame},"~N");b(c$,"isJmolDataFrameForAtom",function(a){return this.models[a.modelIndex].isJmolDataFrame},"J.modelset.Atom");b(c$,"setJmolDataFrame",function(a,c,d){var b=this.models[null==a?this.models[d].dataSourceFrame:c];null==a&&(a=this.models[d].jmolFrameType);0<=c&&(null==b.dataFrames&&(b.dataFrames=new java.util.Hashtable),this.models[d].dataSourceFrame=c,this.models[d].jmolFrameType=
a,b.dataFrames.put(a,Integer.$valueOf(d)));a.startsWith("quaternion")&&0>a.indexOf("deriv")&&(a=a.substring(0,a.indexOf(" ")),b.dataFrames.put(a,Integer.$valueOf(d)))},"~S,~N,~N");b(c$,"getJmolDataFrameIndex",function(a,c){if(null==this.models[a].dataFrames)return-1;var d=this.models[a].dataFrames.get(c);return null==d?-1:d.intValue()},"~N,~S");b(c$,"clearDataFrameReference",function(a){for(var c=0;c<this.modelCount;c++){var d=this.models[c].dataFrames;if(null!=d)for(d=d.values().iterator();d.hasNext();)d.next().intValue()==
a&&d.remove()}},"~N");b(c$,"getJmolFrameType",function(a){return 0<=a&&a<this.modelCount?this.models[a].jmolFrameType:"modelSet"},"~N");b(c$,"getJmolDataSourceFrame",function(a){return 0<=a&&a<this.modelCount?this.models[a].dataSourceFrame:-1},"~N");b(c$,"saveModelOrientation",function(a,c){this.models[a].orientation=c},"~N,J.modelset.Orientation");b(c$,"getModelOrientation",function(a){return this.models[a].orientation},"~N");b(c$,"getPDBHeader",function(a){return this.models[a].isBioModel?this.models[a].getFullPDBHeader():
this.getFileHeader(a)},"~N");b(c$,"getFileHeader",function(a){if(0>a)return"";if(this.models[a].isBioModel)return this.models[a].getFullPDBHeader();a=this.getModelAuxiliaryInfoValue(a,"fileHeader");null==a&&(a=this.modelSetName);return null!=a?a:"no header information found"},"~N");b(c$,"getAltLocIndexInModel",function(a,c){if("\x00"==c)return 0;var d=this.getAltLocListInModel(a);return 0==d.length?0:d.indexOf(c)+1},"~N,~S");b(c$,"getInsertionCodeIndexInModel",function(a,c){if("\x00"==c)return 0;
var d=this.getInsertionListInModel(a);return 0==d.length?0:d.indexOf(c)+1},"~N,~S");b(c$,"getAltLocListInModel",function(a){if(0>a)return"";a=this.getModelAuxiliaryInfoValue(a,"altLocs");return null==a?"":a},"~N");b(c$,"getInsertionListInModel",function(a){a=this.getModelAuxiliaryInfoValue(a,"insertionCodes");return null==a?"":a},"~N");b(c$,"getModelSymmetryCount",function(a){return 0<this.models[a].biosymmetryCount?this.models[a].biosymmetryCount:null==this.unitCells||null==this.unitCells[a]?0:this.unitCells[a].getSpaceGroupOperationCount()},
"~N");b(c$,"getSymmetryInfoString",function(a,c,d,b,f,g,h){a=this.getSymTemp(!0).getSpaceGroupInfo(this,a,c,d,b,f,g);return null==a?"":this.symTemp.getSymmetryInfoString(a,d,g,h)},"~N,~S,~N,JU.P3,JU.P3,~S,~B");b(c$,"getModelCellRange",function(a){return null==this.unitCells?null:this.unitCells[a].getCellRange()},"~N");b(c$,"getLastVibrationVector",function(a,c){if(null!=this.vibrations)for(var d=this.atomCount;0<=--d;)if((0>a||this.atoms[d].modelIndex==a)&&null!=this.vibrations[d]&&0<this.vibrations[d].length()&&
(0==c||1276121113==c==s(this.vibrations[d],J.api.JmolModulationSet)))return d;return-1},"~N,~N");b(c$,"getModulationList",function(a,c,d){var b=new JU.List;if(null!=this.vibrations)for(var f=a.nextSetBit(0);0<=f;f=a.nextSetBit(f+1))s(this.vibrations[f],J.api.JmolModulationSet)?b.addLast(this.vibrations[f].getModulation(c,d)):b.addLast(null);return b},"JU.BS,~S,JU.P3");b(c$,"getElementsPresentBitSet",function(a){if(0<=a)return this.elementsPresent[a];a=new JU.BS;for(var c=0;c<this.modelCount;c++)a.or(this.elementsPresent[c]);
return a},"~N");b(c$,"getSymmetryInfoAsStringForModel",function(a){a=this.getUnitCell(a);return null==a?"no symmetry information":a.getSymmetryInfoString()},"~N");b(c$,"getMoleculeIndex",function(a,c){0==this.moleculeCount&&this.getMolecules();for(var d=0;d<this.moleculeCount;d++)if(this.molecules[d].atomList.get(a))return c?this.molecules[d].indexInModel:d;return 0},"~N,~B");b(c$,"getMoleculeBitSet",function(a){0==this.moleculeCount&&this.getMolecules();var c=J.util.BSUtil.copy(a);a=J.util.BSUtil.copy(a);
for(var d=0,b=new JU.BS;0<=(d=a.length()-1);)b=this.getMoleculeBitSetForAtom(d),null==b?(a.clear(d),c.clear(d)):(a.andNot(b),c.or(b));return c},"JU.BS");b(c$,"getMoleculeBitSetForAtom",function(a){0==this.moleculeCount&&this.getMolecules();for(var c=0;c<this.moleculeCount;c++)if(this.molecules[c].atomList.get(a))return this.molecules[c].atomList;return null},"~N");b(c$,"getModelDipole",function(a){if(0>a)return null;var c=this.getModelAuxiliaryInfoValue(a,"dipole");null==c&&(c=this.getModelAuxiliaryInfoValue(a,
"DIPOLE_VEC"));return c},"~N");b(c$,"calculateMolecularDipole",function(a){if(null==this.partialCharges||0>a)return null;for(var c=0,d=0,b=0,f=0,g=new JU.V3,h=new JU.V3,e=0;e<this.atomCount;e++)if(this.atoms[e].modelIndex==a){var j=this.partialCharges[e];0>j?(d++,f+=j,h.scaleAdd2(j,this.atoms[e],h)):0<j&&(c++,b+=j,g.scaleAdd2(j,this.atoms[e],g))}if(0==d||0==c)return null;g.scale(1/b);h.scale(1/f);g.sub(h);J.util.Logger.warn("CalculateMolecularDipole: this is an approximate result -- needs checking");
g.scale(4.8*b);return g},"~N");b(c$,"getMoleculeCountInModel",function(a){var c=0;0==this.moleculeCount&&this.getMolecules();if(0>a)return this.moleculeCount;for(var d=0;d<this.modelCount;d++)a==d&&(c+=this.models[d].moleculeCount);return c},"~N");b(c$,"calcSelectedMoleculesCount",function(a){0==this.moleculeCount&&this.getMolecules();this.selectedMolecules.xor(this.selectedMolecules);for(var c=new JU.BS,d=0;d<this.moleculeCount;d++)J.util.BSUtil.copy2(a,c),c.and(this.molecules[d].atomList),0<c.length()&&
this.selectedMolecules.set(d)},"JU.BS");b(c$,"setCentroid",function(a,c){var d=this.getNotInCentroid(a,c);null!=d&&0<=d.nextSetBit(0)&&this.viewer.deleteAtoms(d,!1)},"JU.BS,~A");b(c$,"getNotInCentroid",function(a,c){var d=a.nextSetBit(0);if(0>d)return null;d=this.getUnitCell(this.atoms[d].modelIndex);return null==d?null:d.notInCentroid(this,a,c)},"JU.BS,~A");b(c$,"getMolecules",function(){if(0<this.moleculeCount)return this.molecules;null==this.molecules&&(this.molecules=Array(4));this.moleculeCount=
0;for(var a=null,c=Array(this.modelCount),d=null,b=0;b<this.modelCount;b++)c[b]=this.viewer.getModelUndeletedAtomsBitSet(b),a=this.models[b],a.moleculeCount=0,d=a.getBioBranches(d);this.molecules=J.util.JmolMolecule.getMolecules(this.atoms,c,d,null);for(b=this.moleculeCount=this.molecules.length;0<=--b;)a=this.models[this.molecules[b].modelIndex],a.firstMoleculeIndex=b,a.moleculeCount++;return this.molecules});b(c$,"initializeBspf",function(){if(!(null!=this.bspf&&this.bspf.isInitialized())){this.showRebondTimes&&
J.util.Logger.startTimer("build bspf");var a=new J.bspt.Bspf(3);J.util.Logger.debugging&&J.util.Logger.debug("sequential bspt order");for(var c=J.util.BSUtil.newBitSet(this.modelCount),d=this.atomCount;0<=--d;){var b=this.atoms[d];!b.isDeleted()&&!this.isTrajectorySubFrame(b.modelIndex)&&(a.addTuple(this.models[b.modelIndex].trajectoryBaseIndex,b),c.set(b.modelIndex))}this.showRebondTimes&&(J.util.Logger.checkTimer("build bspf",!1),a.stats());for(d=c.nextSetBit(0);0<=d;d=c.nextSetBit(d+1))a.validateModel(d,
!0);a.validate(!0);this.bspf=a}});b(c$,"initializeBspt",function(a){this.initializeBspf();this.bspf.isInitializedIndex(a)||this.bspf.initialize(a,this.atoms,this.viewer.getModelUndeletedAtomsBitSet(a))},"~N");b(c$,"setIteratorForPoint",function(a,c,d,b){0>c?a.setCenter(d,b):(this.initializeBspt(c),a.setModel(this,c,this.models[c].firstAtomIndex,2147483647,d,b,null))},"J.api.AtomIndexIterator,~N,JU.P3,~N");b(c$,"setIteratorForAtom",function(a,c,d,b,f){0>c&&(c=this.atoms[d].modelIndex);c=this.models[c].trajectoryBaseIndex;
this.initializeBspt(c);a.setModel(this,c,this.models[c].firstAtomIndex,d,this.atoms[d],b,f)},"J.api.AtomIndexIterator,~N,~N,~N,J.atomdata.RadiusData");b(c$,"getSelectedAtomIterator",function(a,c,d,b,f){this.initializeBspf();if(f){f=this.getModelBitSet(a,!1);for(var g=f.nextSetBit(0);0<=g;g=f.nextSetBit(g+1))this.initializeBspt(g);f=new J.modelset.AtomIteratorWithinModelSet(f)}else f=new J.modelset.AtomIteratorWithinModel;f.initialize(this.bspf,a,c,d,b,this.viewer.isParallel());return f},"JU.BS,~B,~B,~B,~B");
e(c$,"getBondCountInModel",function(a){return 0>a?this.bondCount:this.models[a].getBondCount()},"~N");b(c$,"calculateStruts",function(a,c){return this.calculateStrutsMC(a,c)},"JU.BS,JU.BS");b(c$,"calculateStrutsMC",function(a,c){this.makeConnections2(0,3.4028235E38,32768,12291,a,c,null,!1,!1,0);var d=a.nextSetBit(0);if(0>d)return 0;d=this.models[this.atoms[d].modelIndex];return d.isBioModel?d.calculateStruts(this,a,c):0},"JU.BS,JU.BS");b(c$,"getAtomCountInModel",function(a){return 0>a?this.atomCount:
this.models[a].atomCount},"~N");b(c$,"getModelAtomBitSetIncludingDeletedBs",function(a){var c=new JU.BS;null==a&&null==this.bsAll&&(this.bsAll=J.util.BSUtil.setAll(this.atomCount));if(null==a)c.or(this.bsAll);else for(var d=a.nextSetBit(0);0<=d;d=a.nextSetBit(d+1))c.or(this.getModelAtomBitSetIncludingDeleted(d,!1));return c},"JU.BS");b(c$,"getModelAtomBitSetIncludingDeleted",function(a,c){var d=0>a?this.bsAll:this.models[a].bsAtoms;null==d&&(d=this.bsAll=J.util.BSUtil.setAll(this.atomCount));return c?
J.util.BSUtil.copy(d):d},"~N,~B");b(c$,"getAtomBitsMaybeDeleted",function(a,c){var d,b;switch(a){default:return this.getAtomBitsMDa(a,c);case 1678770178:case 1048585:return this.getAtomBitsMDb(a,c);case 1073741864:return this.getBasePairBits(c);case 1679429641:var f=this.getBoxInfo(c,1);b=this.getAtomsWithin(f.getBoundBoxCornerVector().length()+1E-4,f.getBoundBoxCenter(),null,-1);for(d=b.nextSetBit(0);0<=d;d=b.nextSetBit(d+1))f.isWithin(this.atoms[d])||b.clear(d);return b;case 1095761925:b=new JU.BS;
d=c;this.ptTemp1.set(d[0]/1E3,d[1]/1E3,d[2]/1E3);f=!this.viewer.getBoolean(603979848);for(d=this.atomCount;0<=--d;)this.isInLatticeCell(d,this.ptTemp1,this.ptTemp2,f)&&b.set(d);return b;case 1095761926:b=J.util.BSUtil.newBitSet2(0,this.atomCount);d=c;f=[m(d[0]/1E3)-1,m(d[1]/1E3)-1,m(d[2]/1E3)-1,m(d[0]/1E3),m(d[1]/1E3),m(d[2]/1E3),0];for(d=this.modelCount;0<=--d;){var g=this.getUnitCell(d);null==g?J.util.BSUtil.andNot(b,this.models[d].bsAtoms):b.andNot(g.notInCentroid(this,this.models[d].bsAtoms,f))}return b;
case 1095761936:return this.getMoleculeBitSet(c);case 1087373320:return this.getSequenceBits(c,null);case 1048615:d=c;var f=d[0],g=d[1],h=d[2];b=new JU.BS;var e=this.viewer.getBoolean(603979822);0<=h&&(256>h&&!e)&&(h=J.modelset.AtomCollection.chainToUpper(h));for(d=this.modelCount;0<=--d;)this.models[d].isBioModel&&this.models[d].selectSeqcodeRange(f,g,h,b,e);return b;case 3145772:b=J.util.BSUtil.newBitSet(this.atomCount);f=-1;g=0;for(d=this.atomCount;0<=--d;)if(e=this.atoms[d],h=e.getAtomSymmetry(),
null!=h){if(e.modelIndex!=f){f=e.modelIndex;if(null==this.getModelCellRange(f))continue;g=this.getModelSymmetryCount(f)}for(var e=0,j=g;0<=--j;)if(h.get(j)&&1<++e){b.set(d);break}}return b;case 1089470478:return J.util.BSUtil.copy(null==this.bsSymmetry?this.bsSymmetry=J.util.BSUtil.newBitSet(this.atomCount):this.bsSymmetry);case 1614417948:b=new JU.BS;if(null==this.viewer.getCurrentUnitCell())return b;this.ptTemp1.set(1,1,1);for(d=this.atomCount;0<=--d;)this.isInLatticeCell(d,this.ptTemp1,this.ptTemp2,
!1)&&b.set(d);return b}},"~N,~O");b(c$,"isInLatticeCell",function(a,c,d,b){var f=this.getUnitCell(this.atoms[a].modelIndex);d.setT(this.atoms[a]);return null!=f&&f.checkUnitCell(f,c,d,b)},"~N,JU.P3,JU.P3,~B");b(c$,"getAtomsWithinRD",function(a,c,d,b){var f=new JU.BS,g=this.getIterativeModels(!1);c=J.util.BSUtil.andNot(c,this.viewer.getDeletedAtoms());var h=this.getSelectedAtomIterator(null,!1,!1,!1,!1);if(d)for(d=c.nextSetBit(0);0<=d;d=c.nextSetBit(d+1))for(var e=this.modelCount;0<=--e;)g.get(e)&&
(0>a?this.getAtomsWithin(a,this.atoms[d].getFractionalUnitCoordPt(!0),f,-1):(this.setIteratorForAtom(h,e,d,a,b),h.addAtoms(f)));else{f.or(c);for(d=c.nextSetBit(0);0<=d;d=c.nextSetBit(d+1))0>a?this.getAtomsWithin(a,this.atoms[d],f,this.atoms[d].modelIndex):(this.setIteratorForAtom(h,-1,d,a,b),h.addAtoms(f))}h.release();return f},"~N,JU.BS,~B,J.atomdata.RadiusData");b(c$,"getGroupsWithin",function(a,c){for(var d=this.getIterativeModels(!1),b=new JU.BS,f=this.modelCount;0<=--f;)d.get(f)&&this.models[f].isBioModel&&
this.models[f].getGroupsWithin(a,c,b);return b},"~N,JU.BS");b(c$,"getAtomsWithin",function(a,c,d,b){null==d&&(d=new JU.BS);if(0>a){a=-a;for(var f=this.atomCount;0<=--f;){var g=this.atoms[f];0<=b&&this.atoms[f].modelIndex!=b||!d.get(f)&&g.getFractionalUnitDistance(c,this.ptTemp1,this.ptTemp2)<=a&&d.set(g.index)}return d}b=this.getIterativeModels(!0);f=this.getSelectedAtomIterator(null,!1,!1,!1,!1);for(g=this.modelCount;0<=--g;)b.get(g)&&(this.setIteratorForAtom(f,-1,this.models[g].firstAtomIndex,-1,
null),f.setCenter(c,a),f.addAtoms(d));f.release();return d},"~N,JU.P3,JU.BS,~N");b(c$,"getBasePairBits",function(a){var c=new JU.BS;if(0!=a.length%2)return c;var d=null,b=null,c=new JU.List;if(0==a.length)d=b=this.viewer.getAllAtoms(),this.calcRasmolHydrogenBonds(d,b,c,!0,1,!1,null);else for(var f=0;f<a.length;)d=this.getSequenceBits(a.substring(f,++f),null),0!=d.cardinality()&&(b=this.getSequenceBits(a.substring(f,++f),null),0!=b.cardinality()&&this.calcRasmolHydrogenBonds(d,b,c,!0,1,!1,null));a=
new JU.BS;for(f=c.size();0<=--f;)d=c.get(f),a.set(d.atom1.index),a.set(d.atom2.index);return this.getAtomBitsMDb(1087373318,a)},"~S");b(c$,"getSequenceBits",function(a,c){null==c&&(c=this.viewer.getAllAtoms());var d=new JU.BS;if(0<a.length)for(var b=0;b<this.modelCount;++b)this.models[b].isBioModel&&this.models[b].getSequenceBits(a,c,d);return d},"~S,JU.BS");b(c$,"deleteBonds",function(a,c){if(!c)for(var d=new JU.BS,b=new JU.BS,f=a.nextSetBit(0);0<=f;f=a.nextSetBit(f+1)){var g=this.bonds[f].atom1;
this.models[g.modelIndex].isModelKit||(d.clearAll(),b.clearAll(),d.set(g.index),b.set(this.bonds[f].getAtomIndex2()),this.addStateScript("connect ",null,d,b,"delete",!1,!0))}this.dBb(a,c)},"JU.BS,~B");b(c$,"makeConnections2",function(a,c,d,b,f,g,h,e,j,k){null==h&&(h=new JU.BS);var v=65535==d,m=131071==d;m&&(d=1);var p=J.modelset.Bond.isOrderH(d),x=!1,r=!1,q=!1,s=!1,t=a*a,u=c*c;switch(b){case 12291:return this.deleteConnections(a,c,d,f,g,e,m,t,u);case 603979874:case 1073741852:if(515!=d)return this.autoBond(f,
g,h,e,p,603979874==b);s=r=!0;break;case 1087373321:x=!0;break;case 1073742025:r=!0;break;case 1073741904:q=!0}this.defaultCovalentMad=this.viewer.getMadBond();b=0>a;m=0>c;b&&(a=-a);m&&(c=-c);for(var w=this.getDefaultMadFromOrder(d),y=0,z=0,B=null,C=e?1:this.atomCount,D=null,E=null,H=0,I=0,G=d|131072,K=f.nextSetBit(0);0<=K;K=f.nextSetBit(K+1)){if(e)B=this.bonds[K],D=B.atom1,E=B.atom2;else if(D=this.atoms[K],D.isDeleted())continue;for(var L=this.isModulated(K)?"\x00":D.altloc,M=e?C:g.nextSetBit(0);0<=
M;M=e?M-1:g.nextSetBit(M+1)){if(!e){if(M==K)continue;E=this.atoms[M];if(D.modelIndex!=E.modelIndex||E.isDeleted())continue;if("\x00"!=L&&L!=E.altloc&&"\x00"!=E.altloc)continue;B=D.getBond(E)}if(!(null==B&&(x||r)||null!=B&&q)){var N=D.distanceSquared(E);if(b||m)H=D.distance(E),I=D.getBondingRadiusFloat()+E.getBondingRadiusFloat();if(!(b?H<I*a:N<t)&&!(m?H>I*c:N>u))if(null!=B){if(!x&&!v&&(B.setOrder(d),this.bsAromatic.clear(B.index)),!x||v||d==B.order||G==B.order||p&&B.isHydrogen())h.set(B.index),z++}else h.set(this.bondAtoms(D,
E,d,w,h,k,j,!0).index),y++}}}s&&this.assignAromaticBondsBs(!0,h);x||this.shapeManager.setShapeSizeBs(1,-2147483648,null,h);return[y,z]},"~N,~N,~N,~N,JU.BS,JU.BS,JU.BS,~B,~B,~N");b(c$,"autoBondBs4",function(a,c,d,b,f,g){if(g)return this.autoBond_Pre_11_9_24(a,c,d,b,f);if(0==this.atomCount)return 0;0==f&&(f=1);1.4E-45==this.maxBondingRadius&&this.findMaxRadii();g=this.viewer.getFloat(570425348);var h=this.viewer.getFloat(570425364),h=h*h,e=0;this.showRebondTimes&&J.util.Logger.startTimer("autobond");
var j=-1,k=null==a,v,m;k?(m=0,v=null):(a.equals(c)?v=a:(v=J.util.BSUtil.copy(a),v.or(c)),m=v.nextSetBit(0));for(var p=this.getSelectedAtomIterator(null,!1,!1,!0,!1);0<=m&&m<this.atomCount;m=k?m+1:v.nextSetBit(m+1)){var x=k||a.get(m),r=k||c.get(m),q=this.atoms[m];if(!q.isDeleted()){var s=q.modelIndex;if(s!=j&&(j=s,this.isJmolDataFrameForModel(s))){m=this.models[s].firstAtomIndex+this.models[s].atomCount-1;continue}s=q.getBondingRadiusFloat();if(0!=s){var t=null!=d&&d.get(m);for(this.setIteratorForAtom(p,
-1,m,s+this.maxBondingRadius+g,null);p.hasNext();){var u=this.atoms[p.next()];if(!u.isDeleted()){var w=u.index,y=k||a.get(w),z=k||c.get(w);!y&&!z||(!(x&&z||r&&y)||t&&d.get(w))||(w=J.modelset.BondCollection.getBondOrderFull(s,u.getBondingRadiusFloat(),p.foundDistance2(),h,g),0<w&&this.checkValencesAndBond(q,u,w,f,b)&&e++)}}p.release()}}}this.showRebondTimes&&J.util.Logger.checkTimer("autoBond",!1);return e},"JU.BS,JU.BS,JU.BS,JU.BS,~N,~B");b(c$,"autoBond_Pre_11_9_24",function(a,c,d,b,f){if(0==this.atomCount)return 0;
0==f&&(f=1);1.4E-45==this.maxBondingRadius&&this.findMaxRadii();var g=this.viewer.getFloat(570425348),h=this.viewer.getFloat(570425364),h=h*h,e=0;this.initializeBspf();for(var j=-1,k=this.atomCount;0<=--k;){var v=null==a||a.get(k),m=null==c||c.get(k);if(v||m){var p=this.atoms[k];if(!p.isDeleted()){var x=p.modelIndex;if(x!=j&&(j=x,this.isJmolDataFrameForModel(x))){for(;0<=--k&&this.atoms[k].modelIndex==x;);k++;continue}var r=p.getBondingRadiusFloat();if(0!=r){var q=r+this.maxBondingRadius+g;this.initializeBspt(x);
x=this.bspf.getCubeIterator(x);for(x.initialize(p,q,!0);x.hasMoreElements();)if(q=x.nextElement(),!(q===p||q.isDeleted())){var s=q.index,t=null==a||a.get(s),u=null==c||c.get(s);if(!(!t&&!u||null!=d&&d.get(s)&&d.get(k)))if(v&&u||m&&t)s=J.modelset.BondCollection.getBondOrderFull(r,q.getBondingRadiusFloat(),x.foundDistance2(),h,g),0<s&&this.checkValencesAndBond(p,q,s,f,b)&&e++}x.release()}}}}return e},"JU.BS,JU.BS,JU.BS,JU.BS,~N");b(c$,"autoBond",function(a,c,d,b,f,g){if(b){b=a;a=new JU.BS;c=new JU.BS;
for(var h=b.nextSetBit(0);0<=h;h=b.nextSetBit(h+1))a.set(this.bonds[h].atom1.index),c.set(this.bonds[h].atom2.index)}return[f?this.autoHbond(a,c,!1):this.autoBondBs4(a,c,null,d,this.viewer.getMadBond(),g),0]},"JU.BS,JU.BS,JU.BS,~B,~B,~B");b(c$,"autoHbond",function(a,c,d){if(d){for(var b=this.getModelBitSet(a,!1),f=b.nextSetBit(0);0<=f&&d;f=b.nextSetBit(f+1))d=!this.models[f].hasRasmolHBonds;if(d)return 0}d=!1;for(f=a.nextSetBit(0);0<=f;f=a.nextSetBit(f+1))if(1==this.atoms[f].getElementNumber()){d=
!0;break}b=new JU.BS;f=this.viewer.getBoolean(603979853);if(null==c||f&&!d)return J.util.Logger.info((null==c?"DSSP ":"RasMol")+" pseudo-hbond calculation"),this.calcRasmolHydrogenBonds(a,c,null,!1,2147483647,!1,b),-J.util.BSUtil.cardinalityOf(b);J.util.Logger.info(d?"Standard Hbond calculation":"Jmol pseudo-hbond calculation");var g=null;if(!d){g=new JU.BS;for(f=a.nextSetBit(0);0<=f;f=a.nextSetBit(f+1))switch(this.atoms[f].atomID){case 64:case 4:case 14:case 15:case 16:case 17:g.set(f)}}var h=this.viewer.getFloat(570425361),
e=3.141592653589793*this.viewer.getFloat(570425360)/180,j=h*h,k=J.modelset.ModelCollection.hbondMin*J.modelset.ModelCollection.hbondMin,v=h>J.modelset.ModelCollection.hbondMin?k:j,m=h>J.modelset.ModelCollection.hbondMin?J.modelset.ModelCollection.hbondMin:h,p=0,x=0,r=new JU.V3,q=new JU.V3;this.showRebondTimes&&J.util.Logger.debugging&&J.util.Logger.startTimer("hbond");var s=null,t=null;c=this.getSelectedAtomIterator(c,!1,!1,!1,!1);for(f=a.nextSetBit(0);0<=f;f=a.nextSetBit(f+1)){var u=this.atoms[f],
w=u.getElementNumber(),y=1==w;if(!(!y&&(d||7!=w&&8!=w)||y&&!d)){var z,B,C;if(y){w=u.bonds;if(null==w)continue;C=!1;for(z=0;z<w.length&&!C;z++)C=w[z].getOtherAtom(u).getElementNumber(),C=7==C||8==C;if(!C)continue;B=m;w=1;z=v;C=!1}else B=h,w=k,z=j,C=g.get(f);for(this.setIteratorForAtom(c,-1,u.index,B,null);c.hasNext();){B=this.atoms[c.next()];var D=B.getElementNumber();if(!(B===u||!y&&7!=D&&8!=D||y&&1==D||(x=c.foundDistance2())<w||x>z||C&&g.get(B.index)||u.isBonded(B))){if(0<e){r.sub2(u,B);if(null==
(t=J.modelset.ModelCollection.checkMinAttachedAngle(u,e,r,q,d)))continue;r.scale(-1);if(null==(s=J.modelset.ModelCollection.checkMinAttachedAngle(B,e,r,q,d)))continue}var D=0,E;y&&!Float.isNaN(s.x)&&!Float.isNaN(t.x)?(E=4096,D=J.modelset.HBond.getEnergy(Math.sqrt(x),s.distance(u),s.distance(t),B.distance(t))/1E3):E=2048;b.set(this.addHBond(u,B,E,D));p++}}}}c.release();this.shapeManager.setShapeSizeBs(1,-2147483648,null,b);this.showRebondTimes&&J.util.Logger.checkTimer("hbond",!1);return d?p:-p},"JU.BS,JU.BS,~B");
c$.checkMinAttachedAngle=b(c$,"checkMinAttachedAngle",function(a,c,d,b,f){var g=a.bonds;if(null==g||0==g.length)return JU.P3.new3(NaN,0,0);for(var h=null,e=3.4028235E38,j=g.length;0<=--j;)if(g[j].isCovalent()){var k=g[j].getOtherAtom(a);if(f||1!=k.getElementNumber()){b.sub2(a,k);var v=b.angle(d);if(v<c)return null;v<e&&(h=k,e=v)}}return h},"J.modelset.Atom,~N,JU.V3,JU.V3,~B");b(c$,"setStructureIndexes",function(){for(var a,c=0,d=-1,b=-1,f=-1,g=0;g<this.atomCount;g++){if((b=this.atoms[g].modelIndex)!=
f)c=0,f=b,d=-1;if((a=this.atoms[g].getStrucNo())!=d&&0!=a)this.atoms[g].getGroup().setStrucNo(++c),d=c}});b(c$,"getProteinStructureState",function(a,c,d,b){if(!this.isPDB)return"";for(var f=0;f<this.modelCount;f++)if(this.models[f].isBioModel)return this.models[f].getProteinStructureState(a,c,d,b);return""},"JU.BS,~B,~B,~N");b(c$,"getModelInfoAsString",function(){var a=(new JU.SB).append('<models count="');a.appendI(this.modelCount).append('" modelSetHasVibrationVectors="').append(this.modelSetHasVibrationVectors()+
'">\n<properties>');if(null!=this.modelSetProperties){for(var c=this.modelSetProperties.propertyNames();c.hasMoreElements();){var d=c.nextElement();a.append('\n <property name="').append(d).append('" value=').append(J.util.Escape.eS(this.modelSetProperties.getProperty(d))).append(" />")}a.append("\n</properties>")}for(c=0;c<this.modelCount;++c)a.append('\n<model index="').appendI(c).append('" n="').append(this.getModelNumberDotted(c)).append('" id=').append(J.util.Escape.eS(""+this.getModelAuxiliaryInfoValue(c,
"modelID"))),d=this.viewer.getJDXBaseModelIndex(c),d!=c&&a.append(" baseModelId=").append(J.util.Escape.eS(this.getModelAuxiliaryInfoValue(d,"jdxModelID"))),a.append(" name=").append(J.util.Escape.eS(this.getModelName(c))).append(" title=").append(J.util.Escape.eS(this.getModelTitle(c))).append(' hasVibrationVectors="').appendB(this.viewer.modelHasVibrationVectors(c)).append('" />');a.append("\n</models>");return a.toString()});b(c$,"getSymmetryInfoAsString",function(){for(var a=(new JU.SB).append("Symmetry Information:"),
c=0;c<this.modelCount;++c)a.append("\nmodel #").append(this.getModelNumberDotted(c)).append("; name=").append(this.getModelName(c)).append("\n").append(this.getSymmetryInfoAsStringForModel(c));return a.toString()});b(c$,"getAtomsConnected",function(a,c,d,b){for(var f=new JU.BS,g=D(this.atomCount,0),h,e=30720==d,j=65535==d,k=0;k<this.bondCount;k++){var v=this.bonds[k];if(j||v.is(d)||e&&v.isHydrogen())b.get(v.atom1.index)&&(g[h=v.atom2.index]++,f.set(h)),b.get(v.atom2.index)&&(g[h=v.atom1.index]++,
f.set(h))}d=0==a;for(h=this.atomCount;0<=--h;)b=g[h],b<a||b>c?f.clear(h):d&&0==b&&f.set(h);return f},"~N,~N,~N,JU.BS");b(c$,"getUnitCellInfoText",function(){var a=this.viewer.getCurrentModelIndex();if(0>a)return"no single current model";a=this.getUnitCell(a);return null==a?"not applicable":a.getUnitCellInfo()});b(c$,"getSymTemp",function(a){if(null==this.symTemp||a)this.symTemp=J.api.Interface.getOptionInterface("symmetry.Symmetry");return this.symTemp},"~B");b(c$,"createModels",function(a){a=this.modelCount+
a;var c=JU.AU.arrayCopyObject(this.models,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=m(this.getModelFileNumber(this.modelCount-1)/1E6)+1,b=this.modelCount,f=0;b<a;b++)this.modelNumbers[b]=b+this.modelCount,
this.modelFileNumbers[b]=1E6*d+ ++f,this.modelNumbersForAtomLabel[b]=this.modelNames[b]=d+"."+f;this.thisStateModel=-1;d=this.getModelSetAuxiliaryInfoValue("group3Lists");null!=d&&(b=this.getModelSetAuxiliaryInfoValue("group3Counts"),d=JU.AU.arrayCopyS(d,a),b=JU.AU.arrayCopyII(b,a),this.modelSetAuxiliaryInfo.put("group3Lists",d),this.modelSetAuxiliaryInfo.put("group3Counts",b));this.unitCells=JU.AU.arrayCopyObject(this.unitCells,a);for(b=this.modelCount;b<a;b++)c[b]=new J.modelset.Model(this,b,-1,
null,null,null),c[b].loadState=" model create #"+b+";";this.models=c;this.modelCount=a},"~N");b(c$,"deleteModel",function(a,c,d,b,f){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 g=this.getModelSetAuxiliaryInfoValue("group3Lists"),h=this.getModelSetAuxiliaryInfoValue("group3Counts"),e=a+1;if(null!=g&&null!=g[e])for(var j=m(g[e].length/6);0<=--j;)0<h[e][j]&&(h[0][j]-=h[e][j],0==h[0][j]&&(g[0]=g[0].substring(0,6*j)+",["+g[0].substring(6*j+2)));null!=g&&(this.modelSetAuxiliaryInfo.put("group3Lists",JU.AU.deleteElements(g,a,1)),this.modelSetAuxiliaryInfo.put("group3Counts",JU.AU.deleteElements(h,
a,1)));null!=this.unitCells&&(this.unitCells=JU.AU.deleteElements(this.unitCells,a,1));for(j=this.stateScripts.size();0<=--j;)this.stateScripts.get(j).deleteAtoms(a,f,b)||this.stateScripts.remove(j);this.deleteModelAtoms(c,d,b);this.viewer.deleteModelAtoms(c,d,b)}},"~N,~N,~N,JU.BS,JU.BS");b(c$,"getMoInfo",function(a){for(var c=new JU.SB,d=0;d<this.modelCount;d++)if(!(0<=a&&d!=a)){var b=this.viewer.getModelAuxiliaryInfoValue(d,"moData");if(null!=b){var b=b.get("mos"),f=null==b?0:b.size();if(0!=f)for(;0<=
--f;){var g=b.get(f),h=g.get("type");null==h&&(h="");var e=g.get("energyUnits");null==e&&(e="");var j=g.get("occupancy");null!=j&&(h="occupancy "+j.floatValue()+" "+h);j=g.get("symmetry");null!=j&&(h+=j);j=""+g.get("energy");Float.isNaN(JU.PT.parseFloat(j))?c.append(J.util.Txt.sprintf("model %-2s;  mo %-2i # %s\n","sis",[this.getModelNumberDotted(d),Integer.$valueOf(f+1),h])):c.append(J.util.Txt.sprintf("model %-2s;  mo %-2i # energy %-8.3f %s %s\n","sifss",[this.getModelNumberDotted(d),Integer.$valueOf(f+
1),g.get("energy"),e,h]))}}}return c.toString()},"~N");b(c$,"assignAtom",function(a,c,d){null==c&&(c="C");var b=this.atoms[a],f=new JU.BS,g=1==b.getElementNumber(),f=J.util.Elements.elementNumberFromSymbol(c,!0),h=!1;if(0<f)this.setElement(b,f),this.viewer.setShapeSizeRD(0,this.viewer.getDefaultRadiusData(),J.util.BSUtil.newAndSetBit(a)),this.setAtomName(a,c+b.getAtomNumber()),this.models[b.modelIndex].isModelKit||this.taintAtom(a,0);else if(c.equals("Pl"))b.setFormalCharge(b.getFormalCharge()+1);
else if(c.equals("Mi"))b.setFormalCharge(b.getFormalCharge()-1);else if(c.equals("X"))h=!0;else if(!c.equals("."))return;this.removeUnnecessaryBonds(b,h);c=0;1==b.getCovalentBondCount()&&(g?c=1.5:!g&&1==f&&(c=1));0!=c&&(g=JU.V3.newVsub(b,this.atoms[b.getBondedAtomIndex(0)]),h=g.length(),g.normalize(),g.scale(c-h),this.setAtomCoordRelative(a,g.x,g.y,g.z));a=J.util.BSUtil.newAndSetBit(a);1!=f&&d&&(this.validateBspf(!1),f=this.getAtomsWithinRD(1,a,!1,null),f.andNot(a),0<=f.nextSetBit(0)&&this.viewer.deleteAtoms(f,
!1),f=this.viewer.getModelUndeletedAtomsBitSet(b.modelIndex),f.andNot(this.getAtomBitsMDa(1613758476,null)),this.makeConnections2(0.1,1.8,1,1073741904,a,f,null,!1,!1,0));this.viewer.addHydrogens(a,!1,!0)},"~N,~S,~B");b(c$,"deleteAtoms",function(a){if(null!=a){for(var c=new JU.BS,d=a.nextSetBit(0);0<=d&&d<this.atomCount;d=a.nextSetBit(d+1))this.atoms[d].deleteBonds(c);for(d=0;d<this.modelCount;d++)this.models[d].bsAtomsDeleted.or(a),this.models[d].bsAtomsDeleted.and(this.models[d].bsAtoms);this.deleteBonds(c,
!1)}},"JU.BS");b(c$,"getModelCml",function(a,c,d){var b=new JU.SB;if(0==J.util.BSUtil.cardinalityOf(a))return"";var f=J.api.Interface.getOptionInterface("io.XmlUtil");f.openTag(b,"molecule");f.openTag(b,"atomArray");for(var g=new JU.BS,h=a.nextSetBit(0);0<=h&&!(0>--c);h=a.nextSetBit(h+1)){var e=this.atoms[h],j=e.getAtomName();JU.PT.simpleReplace(j,'"',"''");g.set(e.index);f.appendTag(b,"atom/",["id","a"+(e.index+1),"title",e.getAtomName(),"elementType",e.getElementSymbol(),"x3",""+e.x,"y3",""+e.y,
"z3",""+e.z])}f.closeTag(b,"atomArray");if(d){f.openTag(b,"bondArray");for(h=0;h<this.bondCount;h++)a=this.bonds[h],c=a.atom2,g.get(a.atom1.index)&&g.get(c.index)&&(c=J.util.JmolEdge.getCmlBondOrder(a.order),null!=c&&f.appendTag(b,"bond/",["atomRefs2","a"+(a.atom1.index+1)+" a"+(a.atom2.index+1),"order",c]));f.closeTag(b,"bondArray")}f.closeTag(b,"molecule");return b.toString()},"JU.BS,~N,~B");b(c$,"adjustAtomArrays",function(a,c,d){this.atomCount=d;for(var b=c;b<d;b++){this.atoms[b]=this.atoms[a[b]];
this.atoms[b].index=b;var f=this.models[this.atoms[b].modelIndex];f.firstAtomIndex==a[b]&&(f.firstAtomIndex=b);f.bsAtoms.set(b)}if(null!=this.vibrations)for(b=c;b<d;b++)this.vibrations[b]=this.vibrations[a[b]];if(null!=this.occupancies)for(b=c;b<d;b++)this.occupancies[b]=this.occupancies[a[b]];if(null!=this.bfactor100s)for(b=c;b<d;b++)this.bfactor100s[b]=this.bfactor100s[a[b]];if(null!=this.partialCharges)for(b=c;b<d;b++)this.partialCharges[b]=this.partialCharges[a[b]];if(null!=this.atomTensorList)for(b=
c;b<d;b++)for(var f=this.atomTensorList[b]=this.atomTensorList[a[b]],g=f.length;0<=--g;){var h=f[g];null!=h&&(h.atomIndex1=a[h.atomIndex1])}if(null!=this.atomNames)for(b=c;b<d;b++)this.atomNames[b]=this.atomNames[a[b]];if(null!=this.atomTypes)for(b=c;b<d;b++)this.atomTypes[b]=this.atomTypes[a[b]];if(null!=this.atomSerials)for(b=c;b<d;b++)this.atomSerials[b]=this.atomSerials[a[b]]},"~A,~N,~N");b(c$,"growAtomArrays",function(a){this.atoms=JU.AU.arrayCopyObject(this.atoms,a);null!=this.vibrations&&(this.vibrations=
JU.AU.arrayCopyObject(this.vibrations,a));null!=this.occupancies&&(this.occupancies=JU.AU.arrayCopyByte(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))},"~N");b(c$,"addAtom",function(a,c,d,b,f,g,h,e,j,k,v,m,p,x,r,q,s){g=(new J.modelset.Atom).setAtom(a,this.atomCount,h,e,s,g,d,k,r);this.models[a].atomCount++;this.models[a].bsAtoms.set(this.atomCount);J.util.Elements.isElement(d,1)&&this.models[a].hydrogenCount++;this.atomCount>=this.atoms.length&&this.growAtomArrays(this.atomCount+100);this.atoms[this.atomCount]=g;this.setBFactor(this.atomCount,
p);this.setOccupancy(this.atomCount,m);this.setPartialCharge(this.atomCount,v);null!=x&&this.setAtomTensors(this.atomCount,x);g.group=c;g.colixAtom=this.viewer.getColixAtomPalette(g,J.constant.EnumPalette.CPK.id);if(null!=b){if(0<=(a=b.indexOf("\x00")))null==this.atomTypes&&(this.atomTypes=Array(this.atoms.length)),this.atomTypes[this.atomCount]=b.substring(a+1),b=b.substring(0,a);g.atomID=q;0==q&&(null==this.atomNames&&(this.atomNames=Array(this.atoms.length)),this.atomNames[this.atomCount]=b.intern())}-2147483648!=
f&&(null==this.atomSerials&&(this.atomSerials=D(this.atoms.length,0)),this.atomSerials[this.atomCount]=f);null!=j&&this.setVibrationVector(this.atomCount,j);this.atomCount++;return g},"~N,J.modelset.Group,~N,~S,~N,~N,JU.P3,~N,JU.V3,~N,~N,~N,~N,JU.List,~B,~N,JU.BS");b(c$,"getInlineData",function(a){var c=null;if(0<=a)c=this.models[a].loadScript;else for(a=this.modelCount;0<=--a&&!(0<(c=this.models[a].loadScript).length()););a=c.lastIndexOf('data "');if(0>a)return null;a=c.indexOf2('"',a+7);var d=c.lastIndexOf('end "');
return d<a||0>a?null:c.substring2(a+2,d)},"~N");b(c$,"isAtomPDB",function(a){return 0<=a&&this.models[this.atoms[a].modelIndex].isBioModel},"~N");b(c$,"isAtomAssignable",function(a){return 0<=a&&this.atoms[a].modelIndex==this.modelCount-1},"~N");b(c$,"getGroupAtom",function(a,c,d){var b=a.group;a=b.getMonomerIndex();if(0>a)return-1;b=b.getGroups();a+=c;if(0<=a&&a<b.length){a=b[a];if(1==c&&!a.isConnectedPrevious())return-1;if("0".equals(d))return a.leadAtomIndex;for(c=a.firstAtomIndex;c<=a.lastAtomIndex;c++)if(null==
d||d.equalsIgnoreCase(this.atoms[c].getAtomName()))return c}return-1},"J.modelset.Atom,~N,~S");b(c$,"haveModelKit",function(){for(var a=0;a<this.modelCount;a++)if(this.models[a].isModelKit)return!0;return!1});b(c$,"getModelKitStateBitset",function(a,c){for(var d=J.util.BSUtil.copy(c),b=0;b<this.modelCount;b++)this.models[b].isModelKit||d.andNot(this.models[b].bsAtoms);return J.util.BSUtil.deleteBits(a,d)},"JU.BS,JU.BS");b(c$,"setAtomNamesAndNumbers",function(a,c,d){0>c&&(a=this.models[this.atoms[a].modelIndex].firstAtomIndex);
null==this.atomSerials&&(this.atomSerials=D(this.atomCount,0));null==this.atomNames&&(this.atomNames=Array(this.atomCount));for(var b=this.isXYZ&&this.viewer.getBoolean(603979978),f=2147483647,g=1;a<this.atomCount;++a){var h=this.atoms[a];h.modelIndex!=f&&(f=h.modelIndex,g=b?0:1);if(a>=-c){if(0==this.atomSerials[a]||0>c)this.atomSerials[a]=a<c?d.atomSerials[a]:g;if(null==this.atomNames[a]||0>c)this.atomNames[a]=(h.getElementSymbol()+this.atomSerials[a]).intern()}(!this.models[f].isModelKit||0<h.getElementNumber()&&
!h.isDeleted())&&g++}},"~N,~N,J.modelset.AtomCollection");b(c$,"setUnitCellOffset",function(a,c,d){null!=a&&(null==c?a.setOffset(d):a.setOffsetPt(c))},"J.api.SymmetryInterface,JU.P3,~N");b(c$,"connect",function(a){this.resetMolecules();for(var c=new JU.BS,d=0;d<a.length;d++){var b=a[d];if(!(null==b||2>b.length)){var f=z(b[0]),g=0>f;g&&(f=-1-f);var h=z(b[1]);if(!(0>h||f>=this.atomCount||h>=this.atomCount)){var e=2<b.length?z(b[2]):1;0>e&&(e&=65535);var j=3<b.length?pa(1E3*a[d][3]):this.getDefaultMadFromOrder(e);
0==e||0==j&&32768!=e&&!J.modelset.Bond.isOrderH(e)?(b=this.atoms[f].getBond(this.atoms[h]),null!=b&&c.set(b.index)):this.bondAtoms(this.atoms[f],this.atoms[h],e,j,null,4<b.length?b[4]:0,g,!0)}}}0<=c.nextSetBit(0)&&this.deleteBonds(c,!1)},"~A");b(c$,"allowSpecAtom",function(){return 1!=this.modelCount||this.models[0].isBioModel});b(c$,"setFrameDelayMs",function(a,c){for(var d=c.nextSetBit(0);0<=d;d=c.nextSetBit(d+1))this.models[this.models[d].trajectoryBaseIndex].frameDelay=a},"~N,JU.BS");b(c$,"getFrameDelayMs",
function(a){return a<this.models.length&&0<=a?this.models[this.models[a].trajectoryBaseIndex].frameDelay:0},"~N");b(c$,"getModelIndexFromId",function(a){var c=0<=a.indexOf("#"),d=a.toLowerCase().endsWith(".basemodel");d&&(a=a.substring(0,a.length-10));for(var b=-1,f=null,g=0;g<this.modelCount;g++){var h=this.getModelAuxiliaryInfoValue(g,"modelID"),e=a.startsWith("~")?"~"+this.getModelNumberDotted(g):null;if(!(null==e&&null==h&&null==(h=this.getModelTitle(g)))){c&&(f=this.getModelFileName(g)+"#",h=
f+h);if(a.equalsIgnoreCase(h)||a.equalsIgnoreCase(e))return d?this.viewer.getJDXBaseModelIndex(g):g;null!=f&&a.startsWith(f)&&(b=-2)}}return null==f&&!c?-2:b},"~S");b(c$,"getAuxiliaryInfo",function(a){var c=this.modelSetAuxiliaryInfo;if(null==c)return null;for(var d=new JU.List,b=0;b<this.modelCount;++b)if(null==a||a.get(b)){var f=this.getModelAuxiliaryInfo(b);d.addLast(f)}c.put("models",d);return c},"JU.BS");b(c$,"getDihedralMap",function(a){for(var c=new JU.List,d=a.length,b=null,f=null,g=null,
h=null,e=d-1;0<=--e;)for(var j=d;--j>e;)if(b=this.atoms[a[e]],f=this.atoms[a[j]],b.isBonded(f))for(var k=d;0<=--k;)if(k!=e&&k!=j&&(g=this.atoms[a[k]]).isBonded(b))for(var v=d;0<=--v;)if(v!=e&&v!=j&&v!=k&&(h=this.atoms[a[v]]).isBonded(f)){var m=D(4,0);m[0]=g.index;m[1]=b.index;m[2]=f.index;m[3]=h.index;c.addLast(m)}d=c.size();a=JU.AU.newInt2(d);for(e=d;0<=--e;)a[d-e-1]=c.get(e);return a},"~A");b(c$,"setModulation",function(a,c,d,b){if(null==this.bsModulated)if(c)this.bsModulated=new JU.BS;else if(null==
a)return;null==a&&(a=this.getModelAtomBitSetIncludingDeleted(-1,!1));for(var f=this.viewer.getFloat(1276121113),g=a.nextSetBit(0);0<=g;g=a.nextSetBit(g+1)){var h=this.getVibration(g,!1);s(h,J.api.JmolModulationSet)&&(h.setModTQ(this.atoms[g],c,d,b,f),null!=this.bsModulated&&this.bsModulated.setBitTo(g,c))}},"JU.BS,~B,JU.P3,~B");b(c$,"getDynamicAtom",function(a,c){var d=this.getVibration(a,!1);if(null==d)return this.atoms[a];null==c&&(c=new J.util.Point3fi);c.setT(this.atoms[a]);c=this.viewer.getVibrationPoint(d,
c);c.sD=-1;return c},"~N,J.util.Point3fi");b(c$,"getBoundBoxOrientation",function(a,c){var d=c.nextSetBit(0);if(0>d)return"{0 0 0 1}";var b=null==this.vOrientations?0:this.vOrientations.length;if(0==b){for(var f=Array(3375),b=0,g=new JU.P4,h=-7;7>=h;h++)for(var e=-7;7>=e;e++)for(var j=0;14>=j;j++,b++)1<(f[b]=JU.V3.new3(h/7,e/7,j/14)).length()&&--b;this.vOrientations=Array(b);for(h=b;0<=--h;)j=Math.sqrt(1-f[h].lengthSquared()),Float.isNaN(j)&&(j=0),g.set(f[h].x,f[h].y,f[h].z,j),this.vOrientations[h]=
J.util.Quaternion.newP4(g)}for(var f=new JU.P3,g=3.4028235E38,k=null,v=null,h=0;h<b;h++){var j=this.vOrientations[h],m=new J.util.BoxInfo;m.setMargin(0);for(e=d;0<=e;e=c.nextSetBit(e+1))m.addBoundBoxPoint(j.transformP2(this.atoms[e],f));switch(a){default:case 1313866249:case 1073741863:e=(m.bbCorner1.x-m.bbCorner0.x)*(m.bbCorner1.y-m.bbCorner0.y)*(m.bbCorner1.z-m.bbCorner0.z);break;case 1112541205:e=m.bbCorner1.x-m.bbCorner0.x;break;case 1112541206:e=m.bbCorner1.y-m.bbCorner0.y;break;case 1112541207:e=
m.bbCorner1.z-m.bbCorner0.z}e<g&&(k=j,v=m,g=e)}if(1313866249!=a&&1073741863!=a)return k.toString();j=J.util.Quaternion.newQ(k);d=v.bbCorner1.x-v.bbCorner0.x;b=v.bbCorner1.y-v.bbCorner0.y;h=v.bbCorner1.z-v.bbCorner0.z;d<b&&(f.set(0,0,1),j=J.util.Quaternion.newVA(f,90).mulQ(j),e=d,d=b,b=e);b<h&&(h>d&&(f.set(0,1,0),j=J.util.Quaternion.newVA(f,90).mulQ(j),e=d,d=h,h=e),f.set(1,0,0),j=J.util.Quaternion.newVA(f,90).mulQ(j),e=b,b=h,h=e);return 1313866249==a?g+"\t{"+d+" "+b+" "+h+"}":0==j.getTheta()?"{0 0 0 1}":
j.toString()},"~N,JU.BS");b(c$,"intersectPlane",function(a,c,d){return(null==this.triangulator?this.triangulator=J.api.Interface.getOptionInterface("util.TriangleData"):this.triangulator).intersectPlane(a,c,d)},"JU.P4,JU.List,~N");b(c$,"getUnitCellForAtom",function(a){if(0>a||a>this.atomCount)return null;if(null!=this.bsModulated){var c=this.getVibration(a,!1);if(null!=c)return c.getUnitCell()}return this.getUnitCell(this.atoms[a].modelIndex)},"~N");B(c$,"hbondMin",2.5)});p("J.modelset");q(["java.util.Hashtable",
"JU.BS","J.viewer.JC"],"J.modelset.ModelLoader","java.lang.Boolean $.Float $.NullPointerException java.util.Arrays JU.AU $.List $.P3 $.PT $.SB $.V3 J.api.Interface J.modelset.Chain $.Group $.Model $.ModelSet J.util.BSUtil $.Elements $.JmolMolecule $.Logger".split(" "),function(){c$=u(function(){this.mergeModelSet=this.modelSet=this.viewer=null;this.appendNew=this.merging=!1;this.specialAtomIndexes=this.group3Counts=this.group3Lists=this.jmolData=null;this.doRemoveAddedHydrogens=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.currentModelIndex=0;this.currentModel=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=null;this.iChain=0;this.structuresDefinedInFile=this.vStereo=null;t(this,arguments)},J.modelset,"ModelLoader");N(c$,function(){this.specialAtomIndexes=D(J.viewer.JC.ATOMID_MAX,0);this.htAtomMap=new java.util.Hashtable;this.structuresDefinedInFile=new JU.BS});w(c$,function(a,c,d,b,f,g){this.viewer=
a;this.modelSet=new J.modelset.ModelSet(a,c);var h=a.getModelAdapter();this.mergeModelSet=f;(this.merging=null!=this.mergeModelSet&&0<this.mergeModelSet.atomCount)?this.modelSet.canSkipLoad=!1:a.resetShapes(!1);this.modelSet.preserveState=a.getPreserveState();this.modelSet.showRebondTimes=a.getBoolean(603979934);null==g?(this.initializeInfo(c,null),this.createModelSet(null,null,null),a.setStringProperty("_fileType","")):(this.modelSet.preserveState||(this.modelSet.canSkipLoad=!1),a=h.getAtomSetCollectionAuxiliaryInfo(b),
a.put("loadScript",d),this.initializeInfo(h.getFileTypeName(b).toLowerCase().intern(),a),this.createModelSet(h,b,g))},"J.viewer.Viewer,~S,JU.SB,~O,J.modelset.ModelSet,JU.BS");b(c$,"initializeInfo",function(a,c){this.modelSet.g3d=this.viewer.getGraphicsData();this.modelSet.modelSetTypeName=a;this.modelSet.isXYZ="xyz"===a;this.modelSet.modelSetAuxiliaryInfo=c;this.modelSet.modelSetProperties=this.modelSet.getModelSetAuxiliaryInfoValue("properties");if(this.isPDB=this.modelSet.isPDB=this.modelSet.getModelSetAuxiliaryInfoBoolean("isPDB"))try{this.jbr=
Class.forName("J.modelsetbio.Resolver").newInstance(),this.jbr.initialize(this)}catch(d){if(y(d,Exception))J.util.Logger.error("developer error: J.modelsetbio.Resolver could not be found");else throw d;}this.jmolData=this.modelSet.getModelSetAuxiliaryInfoValue("jmolData");this.fileHeader=this.modelSet.getModelSetAuxiliaryInfoValue("fileHeader");this.modelSet.trajectorySteps=this.modelSet.getModelSetAuxiliaryInfoValue("trajectorySteps");this.isTrajectory=null!=this.modelSet.trajectorySteps;this.isPyMOLsession=
this.modelSet.getModelSetAuxiliaryInfoBoolean("isPyMOL");this.doAddHydrogens=null!=this.jbr&&!this.isTrajectory&&!this.isPyMOLsession&&!this.modelSet.getModelSetAuxiliaryInfoBoolean("pdbNoHydrogens")&&(this.modelSet.getModelSetAuxiliaryInfoBoolean("pdbAddHydrogens")||this.viewer.getBooleanProperty("pdbAddHydrogens"));null!=c&&(c.remove("pdbNoHydrogens"),c.remove("pdbAddHydrogens"),c.remove("trajectorySteps"),this.isTrajectory&&(this.modelSet.vibrationSteps=c.remove("vibrationSteps")));this.modulationOn=
this.modelSet.getModelSetAuxiliaryInfoBoolean("modulationOn");this.noAutoBond=this.modelSet.getModelSetAuxiliaryInfoBoolean("noAutoBond");this.doMinimize=(this.is2D=this.modelSet.getModelSetAuxiliaryInfoBoolean("is2D"))&&this.modelSet.getModelSetAuxiliaryInfoBoolean("doMinimize");this.adapterTrajectoryCount=null==this.modelSet.trajectorySteps?0:this.modelSet.trajectorySteps.size();this.modelSet.someModelsHaveSymmetry=this.modelSet.getModelSetAuxiliaryInfoBoolean("someModelsHaveSymmetry");this.someModelsHaveUnitcells=
this.modelSet.getModelSetAuxiliaryInfoBoolean("someModelsHaveUnitcells");this.someModelsAreModulated=this.modelSet.getModelSetAuxiliaryInfoBoolean("someModelsAreModulated");this.modelSet.someModelsHaveFractionalCoordinates=this.modelSet.getModelSetAuxiliaryInfoBoolean("someModelsHaveFractionalCoordinates");this.merging&&(this.modelSet.isPDB=(new Boolean(this.modelSet.isPDB|this.mergeModelSet.isPDB)).valueOf(),this.modelSet.someModelsHaveSymmetry=(new Boolean(this.modelSet.someModelsHaveSymmetry|this.mergeModelSet.getModelSetAuxiliaryInfoBoolean("someModelsHaveSymmetry"))).valueOf(),
this.someModelsHaveUnitcells=(new Boolean(this.someModelsHaveUnitcells|this.mergeModelSet.getModelSetAuxiliaryInfoBoolean("someModelsHaveUnitcells"))).valueOf(),this.modelSet.someModelsHaveFractionalCoordinates=(new Boolean(this.modelSet.someModelsHaveFractionalCoordinates|this.mergeModelSet.getModelSetAuxiliaryInfoBoolean("someModelsHaveFractionalCoordinates"))).valueOf(),this.modelSet.someModelsHaveAromaticBonds=(new Boolean(this.modelSet.someModelsHaveAromaticBonds|this.mergeModelSet.someModelsHaveAromaticBonds)).valueOf(),
this.modelSet.modelSetAuxiliaryInfo.put("someModelsHaveSymmetry",Boolean.$valueOf(this.modelSet.someModelsHaveSymmetry)),this.modelSet.modelSetAuxiliaryInfo.put("someModelsHaveUnitcells",Boolean.$valueOf(this.someModelsHaveUnitcells)),this.modelSet.modelSetAuxiliaryInfo.put("someModelsHaveFractionalCoordinates",Boolean.$valueOf(this.modelSet.someModelsHaveFractionalCoordinates)),this.modelSet.modelSetAuxiliaryInfo.put("someModelsHaveAromaticBonds",Boolean.$valueOf(this.modelSet.someModelsHaveAromaticBonds)))},
"~S,java.util.Map");b(c$,"getGroup3",function(a){return a>=this.group3Of.length?null:this.group3Of[a]},"~N");b(c$,"getFirstAtomIndex",function(a){return this.firstAtomIndexes[a]},"~N");b(c$,"getAtomCount",function(){return this.modelSet.atomCount});b(c$,"createModelSet",function(a,c,d){var b=null==a?0:a.getAtomCount(c);0<b&&J.util.Logger.info("reading "+b+" atoms");this.adapterModelCount=null==a?1:a.getAtomSetCount(c);this.appendNew=!this.merging||null==a||1<this.adapterModelCount||this.isTrajectory||
this.viewer.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.currentModelIndex=-1;this.currentModel=null;if(this.merging&&(this.baseModelCount=this.mergeModelSet.modelCount,this.baseTrajectoryCount=this.mergeModelSet.mergeTrajectories(this.isTrajectory),0<this.baseTrajectoryCount)){if(this.isTrajectory){if(null==
this.mergeModelSet.vibrationSteps){this.mergeModelSet.vibrationSteps=new JU.List;for(var f=this.mergeModelSet.trajectorySteps.size();0<=--f;)this.mergeModelSet.vibrationSteps.addLast(null)}for(f=0;f<this.modelSet.trajectorySteps.size();f++)this.mergeModelSet.trajectorySteps.addLast(this.modelSet.trajectorySteps.get(f)),this.mergeModelSet.vibrationSteps.addLast(null==this.modelSet.vibrationSteps?null:this.modelSet.vibrationSteps.get(f))}this.modelSet.trajectorySteps=this.mergeModelSet.trajectorySteps;
this.modelSet.vibrationSteps=this.mergeModelSet.vibrationSteps}this.initializeAtomBondModelCounts(b);null!=d&&(this.doMinimize||this.is2D)&&d.setBits(this.baseAtomIndex,this.baseAtomIndex+b);null==a?this.setModelNameNumberProperties(0,-1,"",1,null,null,null):(0<this.adapterModelCount&&(J.util.Logger.info("ModelSet: haveSymmetry:"+this.modelSet.someModelsHaveSymmetry+" haveUnitcells:"+this.someModelsHaveUnitcells+" haveFractionalCoord:"+this.modelSet.someModelsHaveFractionalCoordinates),J.util.Logger.info(this.adapterModelCount+
" model"+(1==this.modelSet.modelCount?"":"s")+' in this collection. Use getProperty "modelInfo" or getProperty "auxiliaryInfo" to inspect them.')),f=this.modelSet.getModelSetAuxiliaryInfoValue("defaultOrientationQuaternion"),null!=f&&(J.util.Logger.info("defaultOrientationQuaternion = "+f),J.util.Logger.info('Use "set autoLoadOrientation TRUE" before loading or "restore orientation DEFAULT" after loading to view this orientation.')),this.iterateOverAllNewModels(a,c),this.iterateOverAllNewAtoms(a,
c),this.iterateOverAllNewBonds(a,c),this.merging&&!this.appendNew&&(f=a.getAtomSetAuxiliaryInfo(c,0),this.modelSet.setModelAuxiliaryInfo(this.baseModelIndex,"initialAtomCount",f.get("initialAtomCount")),this.modelSet.setModelAuxiliaryInfo(this.baseModelIndex,"initialBondCount",f.get("initialBondCount"))),this.initializeUnitCellAndSymmetry(),this.initializeBonding());this.finalizeGroupBuild();this.is2D&&this.doMinimize&&this.applyStereochemistry();this.doAddHydrogens&&this.jbr.finalizeHydrogens();
null!=a&&(this.modelSet.calculatePolymers(this.groups,this.groupCount,this.baseGroupIndex,null),null!=this.jbr&&this.jbr.iterateOverAllNewStructures(a,c));this.setDefaultRendering(this.viewer.getInt(553648170));var g=this.viewer.getDefaultRadiusData();d=this.modelSet.atomCount;b=this.modelSet.atoms;for(f=this.baseAtomIndex;f<d;f++)b[f].setMadAtom(this.viewer,g);g=this.modelSet.models;for(f=g[this.baseModelIndex].firstAtomIndex;f<d;f++)g[b[f].modelIndex].bsAtoms.set(f);this.freeze();this.finalizeShapes();
this.viewer.setModelSet(this.modelSet);this.setAtomProperties();null!=a&&a.finish(c);null!=this.mergeModelSet&&this.mergeModelSet.releaseModelSet();this.mergeModelSet=null},"J.api.JmolAdapter,~O,JU.BS");b(c$,"setDefaultRendering",function(a){if(!this.isPyMOLsession){for(var c=new JU.SB,d=this.modelSet.modelCount,b=this.modelSet.models,f=this.baseModelIndex;f<d;f++)b[f].isBioModel&&b[f].getDefaultLargePDBRendering(c,a);0!=c.length()&&(c.append("select *;"),a=this.modelSet.getModelSetAuxiliaryInfoValue("jmolscript"),
null==a&&(a=""),c.append(a),this.modelSet.modelSetAuxiliaryInfo.put("jmolscript",c.toString()))}},"~N");b(c$,"setAtomProperties",function(){for(var a=this.modelSet.modelCount,c=this.baseModelIndex;c<a;c++){var d=this.modelSet.getModelAuxiliaryInfoValue(c,"atomProperties");if(null!=d)for(var b,d=d.entrySet().iterator();d.hasNext()&&((b=d.next())||1);){var f=b.getKey(),g=b.getValue(),h=this.modelSet.getModelAtomBitSetIncludingDeleted(c,!0);this.doAddHydrogens&&(g=this.jbr.fixPropertyValue(h,g));f="property_"+
f.toLowerCase();J.util.Logger.info("creating "+f+" for model "+this.modelSet.getModelName(c));this.viewer.setData(f,[f,g,h,Integer.$valueOf(0),Boolean.FALSE],this.modelSet.atomCount,0,0,2147483647,0)}}});b(c$,"initializeAtomBondModelCounts",function(a){var c=this.adapterTrajectoryCount;this.merging?(this.appendNew?(this.baseModelIndex=this.baseModelCount,this.modelSet.modelCount=this.baseModelCount+this.adapterModelCount):(this.baseModelIndex=this.viewer.getCurrentModelIndex(),0>this.baseModelIndex&&
(this.baseModelIndex=this.baseModelCount-1),this.modelSet.modelCount=this.baseModelCount),this.modelSet.atomCount=this.baseAtomIndex=this.mergeModelSet.atomCount,this.modelSet.bondCount=this.mergeModelSet.bondCount,this.$mergeGroups=this.mergeModelSet.getGroups(),this.groupCount=this.baseGroupIndex=this.$mergeGroups.length,this.modelSet.mergeModelArrays(this.mergeModelSet),this.modelSet.growAtomArrays(this.modelSet.atomCount+a)):(this.modelSet.modelCount=this.adapterModelCount,this.modelSet.atomCount=
0,this.modelSet.bondCount=0,this.modelSet.atoms=Array(a),this.modelSet.bonds=Array(250+a));this.doAddHydrogens&&this.jbr.initializeHydrogenAddition();1<c&&(this.modelSet.modelCount+=c-1);this.modelSet.models=JU.AU.arrayCopyObject(this.modelSet.models,this.modelSet.modelCount);this.modelSet.modelFileNumbers=JU.AU.arrayCopyI(this.modelSet.modelFileNumbers,this.modelSet.modelCount);this.modelSet.modelNumbers=JU.AU.arrayCopyI(this.modelSet.modelNumbers,this.modelSet.modelCount);this.modelSet.modelNumbersForAtomLabel=
JU.AU.arrayCopyS(this.modelSet.modelNumbersForAtomLabel,this.modelSet.modelCount);this.modelSet.modelNames=JU.AU.arrayCopyS(this.modelSet.modelNames,this.modelSet.modelCount);this.modelSet.frameTitles=JU.AU.arrayCopyS(this.modelSet.frameTitles,this.modelSet.modelCount);if(this.merging)for(a=0;a<this.mergeModelSet.modelCount;a++)(this.modelSet.models[a]=this.mergeModelSet.models[a]).modelSet=this.modelSet},"~N");b(c$,"mergeGroups",function(){var a=this.mergeModelSet.getAuxiliaryInfo(null),c=a.get("group3Lists"),
a=a.get("group3Counts");if(null!=c){for(var d=0;d<this.baseModelCount;d++)this.group3Lists[d+1]=c[d+1],this.group3Counts[d+1]=a[d+1],this.structuresDefinedInFile.set(d);this.group3Lists[0]=c[0];this.group3Counts[0]=a[0]}!this.appendNew&&this.isPDB&&this.structuresDefinedInFile.clear(this.baseModelIndex)});b(c$,"iterateOverAllNewModels",function(a,c){this.group3Lists=Array(this.modelSet.modelCount+1);this.group3Counts=JU.AU.newInt2(this.modelSet.modelCount+1);this.structuresDefinedInFile=new JU.BS;
this.merging&&this.mergeGroups();for(var d=this.isTrajectory?this.baseTrajectoryCount:-1,b=this.baseModelIndex,f=0;f<this.adapterModelCount;++f,++b){var g=a.getAtomSetNumber(c,f),h=a.getAtomSetName(c,f),e=a.getAtomSetAuxiliaryInfo(c,f);e.containsKey("modelID")&&e.put("modelID0",e.get("modelID"));var j=e.get("modelProperties");this.viewer.setStringProperty("_fileType",e.get("fileType"));null==h&&(h=null!=this.jmolData&&2<this.jmolData.indexOf(";")?this.jmolData.substring(this.jmolData.indexOf(":")+
2,this.jmolData.indexOf(";")):this.appendNew?""+g%1E6:"");this.setModelNameNumberProperties(b,d,h,g,j,e,this.jmolData)&&(this.group3Lists[b+1]=J.viewer.JC.getGroup3List(),this.group3Counts[b+1]=D(J.viewer.JC.getGroup3Count()+10,0),null==this.group3Lists[0]&&(this.group3Lists[0]=J.viewer.JC.getGroup3List(),this.group3Counts[0]=D(J.viewer.JC.getGroup3Count()+10,0)));null!=this.modelSet.getModelAuxiliaryInfoValue(b,"periodicOriginXyz")&&(this.modelSet.someModelsHaveSymmetry=!0)}d=this.modelSet.models[this.baseModelIndex];
this.viewer.setSmilesString(this.modelSet.modelSetAuxiliaryInfo.get("smilesString"));f=this.modelSet.modelSetAuxiliaryInfo.remove("loadState");g=this.modelSet.modelSetAuxiliaryInfo.remove("loadScript");if(0>g.indexOf("Viewer.AddHydrogens")||!d.isModelKit){h=JU.PT.split(f,"\n");e=new JU.SB;for(f=0;f<h.length;f++)j=d.loadState.indexOf(h[f]),(0>j||j!=d.loadState.lastIndexOf(h[f]))&&e.append(h[f]).appendC("\n");d.loadState+=d.loadScript.toString()+e.toString();d.loadScript=new JU.SB;d.loadScript.append("  ").appendSB(g).append(";\n")}if(this.isTrajectory){f=
this.modelSet.modelCount-b+1;J.util.Logger.info(f+" trajectory steps read");this.modelSet.setModelAuxiliaryInfo(this.baseModelCount,"trajectoryStepCount",Integer.$valueOf(f));d=this.adapterModelCount;for(f=b;f<this.modelSet.modelCount;f++,d++)this.modelSet.models[f]=this.modelSet.models[this.baseModelCount],this.modelSet.modelNumbers[f]=a.getAtomSetNumber(c,d),this.modelSet.modelNames[f]=a.getAtomSetName(c,d),this.structuresDefinedInFile.set(f)}this.finalizeModels(this.baseModelCount)},"J.api.JmolAdapter,~O");
b(c$,"setModelNameNumberProperties",function(a,c,d,b,f,g,h){var e=null!=g&&Boolean.TRUE===g.get("isPDB");this.appendNew?(this.modelSet.models[a]=e?this.jbr.getBioModel(a,c,h,f,g):new J.modelset.Model(this.modelSet,a,c,h,f,g),this.modelSet.modelNumbers[a]=b,this.modelSet.modelNames[a]=d):(c=g.get("PDB_CONECT_firstAtom_count_max"),null!=c&&this.modelSet.setModelAuxiliaryInfo(a,"PDB_CONECT_firstAtom_count_max",c));c=this.modelSet.models;b=this.modelSet.atoms;c[a].bsAtoms.set(b.length+1);c[a].bsAtoms.clear(b.length+
1);b=this.modelSet.getModelAuxiliaryInfoValue(a,"altLocs");c[a].setNAltLocs(null==b?0:b.length);null!=b&&(b=b.toCharArray(),java.util.Arrays.sort(b),b=String.valueOf(b),this.modelSet.setModelAuxiliaryInfo(a,"altLocs",b));b=this.modelSet.getModelAuxiliaryInfoValue(a,"insertionCodes");c[a].setNInsertions(null==b?0:b.length);d=null!=this.modelSet.modelSetName&&this.modelSet.modelSetName.startsWith("Jmol Model Kit")||d.startsWith("Jmol Model Kit")||"Jme".equals(this.modelSet.getModelAuxiliaryInfoValue(a,
"fileType"));c[a].isModelKit=d;return e},"~N,~N,~S,~N,java.util.Properties,java.util.Map,~S");b(c$,"finalizeModels",function(a){var c=this.modelSet.modelCount;if(c!=a){var d,b=0,f=-1,g=this.modelSet.modelNumbers,h=this.modelSet.modelNames;if(this.isTrajectory)for(var e=a;++e<this.modelSet.modelCount;)g[e]=g[e-1]+1;if(0<a){if(1E6>g[0])for(e=0;e<a;e++)0==h[e].length&&(h[e]=""+g[e]),g[e]+=1E6,this.modelSet.modelNumbersForAtomLabel[e]="1."+(e+1);var j=g[a-1],j=j-j%1E6;1E6>g[a]&&(j+=1E6);for(e=a;e<c;e++)g[e]+=
j}for(var k=this.modelSet.models,e=a;e<c;++e)if(this.modelSet.setModelAuxiliaryInfo(e,"fileType",this.modelSet.modelSetTypeName),null!=this.fileHeader&&this.modelSet.setModelAuxiliaryInfo(e,"fileHeader",this.fileHeader),j=m(g[e]/1E6),j!=f&&(b=0,f=j),b++,0==j?(d=""+this.modelSet.getModelNumber(e),j=1):d=j+"."+b,this.modelSet.modelNumbersForAtomLabel[e]=d,k[e].fileIndex=j-1,this.modelSet.modelFileNumbers[e]=1E6*j+b,null==h[e]||0==h[e].length)h[e]=d;if(this.merging)for(e=0;e<a;e++)k[e].modelSet=this.modelSet;
for(e=0;e<c;e++)this.modelSet.setModelAuxiliaryInfo(e,"modelName",h[e]),this.modelSet.setModelAuxiliaryInfo(e,"modelNumber",Integer.$valueOf(g[e]%1E6)),this.modelSet.setModelAuxiliaryInfo(e,"modelFileNumber",Integer.$valueOf(this.modelSet.modelFileNumbers[e])),this.modelSet.setModelAuxiliaryInfo(e,"modelNumberDotted",this.modelSet.getModelNumberDotted(e)),a=this.modelSet.getModelAuxiliaryInfoValue(e,"altLocs"),null!=a&&J.util.Logger.info("model "+this.modelSet.getModelNumberDotted(e)+" alternative locations: "+
a)}},"~N");b(c$,"iterateOverAllNewAtoms",function(a,c){var d=-1,b=!1,f=!1,g=a.getAtomIterator(c),h=0,e=this.modelSet.models;0<this.modelSet.modelCount&&(this.nullGroup=(new J.modelset.Group).setGroup(new J.modelset.Chain(this.modelSet.models[this.baseModelIndex],32,-1),"",0,-1,-1));for(;g.hasNext();){h++;var j=g.getAtomSetIndex()+this.baseModelIndex;j!=d&&(this.iChain=0,this.currentModelIndex=j,this.currentModel=e[j],this.currentChainID=2147483647,this.isNewChain=!0,e[j].bsAtoms.clearAll(),b=e[j].isBioModel,
d=j,f=b&&this.doAddHydrogens,null!=this.jbr&&this.jbr.setHaveHsAlready(!1));var j=g.getGroup3(),k=g.getChainID();this.checkNewGroup(a,k,j,g.getSequenceNumber(),g.getInsertionCode(),f,!1);k=g.getElementNumber();f&&1==J.util.Elements.getElementNumber(k)&&this.jbr.setHaveHsAlready(!0);var m=g.getAtomName(),A=f?this.getPdbCharge(j,m):g.getFormalCharge();this.addAtom(b,g.getAtomSymmetry(),g.getAtomSite(),g.getUniqueID(),k,m,A,g.getPartialCharge(),g.getTensors(),g.getOccupancy(),g.getBfactor(),g.getXYZ(),
g.getIsHetero(),g.getAtomSerial(),j,g.getVib(),g.getAlternateLocationID(),g.getRadius())}0<this.groupCount&&f&&this.jbr.addImplicitHydrogenAtoms(a,this.groupCount-1,this.isNewChain?1:0);d=-1;b=null;f=this.modelSet.atoms;for(g=0;g<this.modelSet.atomCount;g++)f[g].modelIndex!=d&&(d=f[g].modelIndex,e[d].firstAtomIndex=g,j=this.modelSet.getDefaultVdwType(d),j!==b&&(J.util.Logger.info("Default Van der Waals type for model set to "+j.getVdwLabel()),b=j));J.util.Logger.info(h+" atoms created")},"J.api.JmolAdapter,~O");
b(c$,"getPdbCharge",function(a,c){return a.equals("ARG")&&c.equals("NH1")||a.equals("LYS")&&c.equals("NZ")||a.equals("HIS")&&c.equals("ND1")?1:0},"~S,~S");b(c$,"addAtom",function(a,c,d,b,f,g,h,e,j,k,m,A,p,x,r,q,s,t){var u=0;null!=g&&(a&&0<=g.indexOf("*")&&(g=g.$replace("*","'")),u=J.viewer.JC.lookupSpecialAtomID(g),a&&(2==u&&"CA".equalsIgnoreCase(r))&&(u=0));a=this.modelSet.addAtom(this.currentModelIndex,this.nullGroup,f,g,x,d,A,t,q,h,e,k,m,j,p,u,c);a.setAltLoc(s);this.htAtomMap.put(b,a)},"~B,JU.BS,~N,~O,~N,~S,~N,~N,JU.List,~N,~N,JU.P3,~B,~N,~S,JU.V3,~S,~N");
b(c$,"checkNewGroup",function(a,c,d,b,f,g,h){var e=null==d?null:d.intern();c!=this.currentChainID&&(this.currentChainID=c,this.currentChain=this.getOrAllocateChain(this.currentModel,c),this.currentGroupInsertionCode="\uffff",this.currentGroupSequenceNumber=-1,this.currentGroup3="xxxx",this.isNewChain=!0);if(b!=this.currentGroupSequenceNumber||f!=this.currentGroupInsertionCode||e!==this.currentGroup3){0<this.groupCount&&g&&(this.jbr.addImplicitHydrogenAtoms(a,this.groupCount-1,this.isNewChain&&!h?
1:0),this.jbr.setHaveHsAlready(!1));this.currentGroupSequenceNumber=b;this.currentGroupInsertionCode=f;for(this.currentGroup3=e;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.modelSet.atomCount;this.chainOf[this.groupCount]=this.currentChain;this.group3Of[this.groupCount]=
d;this.seqcodes[this.groupCount]=J.modelset.Group.getSeqcodeFor(b,f);++this.groupCount}},"J.api.JmolAdapter,~N,~S,~N,~S,~B,~B");b(c$,"getOrAllocateChain",function(a,c){var d=a.getChain(c);if(null!=d)return d;a.chainCount==a.chains.length&&(a.chains=JU.AU.doubleLength(a.chains));return a.chains[a.chainCount++]=new J.modelset.Chain(a,c,0==c||32==c?-1:this.iChain++)},"J.modelset.Model,~N");b(c$,"iterateOverAllNewBonds",function(a,c){var d=a.getBondIterator(c);if(null!=d){var b=this.viewer.getMadBond();
this.modelSet.defaultCovalentMad=null==this.jmolData?b:0;for(var f=!1;d.hasNext();){var g=d.getEncodedOrder(),h=g,e=this.bondAtoms(d.getAtomUniqueID1(),d.getAtomUniqueID2(),h);null!=e&&(1<h&&(1025!=h&&1041!=h)&&(f=!0),h=d.getRadius(),0<h&&e.setMad(pa(2E3*h)),h=d.getColix(),0<=h&&e.setColix(h),e.order|=g&65536)}f&&(this.modelSet.someModelsHaveSymmetry&&!this.viewer.getBoolean(603979794))&&J.util.Logger.info('ModelSet: use "set appletSymmetryToBonds TRUE " to apply the file-based multiple bonds to symmetry-generated atoms.');
this.modelSet.defaultCovalentMad=b}},"J.api.JmolAdapter,~O");b(c$,"bondAtoms",function(a,c,d){var b=this.htAtomMap.get(a);if(null==b)return J.util.Logger.error("bondAtoms cannot find atomUid1?:"+a),null;a=this.htAtomMap.get(c);if(null==a)return J.util.Logger.error("bondAtoms cannot find atomUid2?:"+c),null;if(b.isBonded(a))return null;1025==d||1041==d?(c=this.modelSet.bondMutually(b,a,this.is2D?d:1,this.modelSet.getDefaultMadFromOrder(1),0),null==this.vStereo&&(this.vStereo=new JU.List),this.vStereo.addLast(c)):
(c=this.modelSet.bondMutually(b,a,d,this.modelSet.getDefaultMadFromOrder(d),0),c.isAromatic()&&(this.modelSet.someModelsHaveAromaticBonds=!0));this.modelSet.bondCount==this.modelSet.bonds.length&&(this.modelSet.bonds=JU.AU.arrayCopyObject(this.modelSet.bonds,this.modelSet.bondCount+250));this.modelSet.setBond(this.modelSet.bondCount++,c);return c},"~O,~O,~N");b(c$,"initializeUnitCellAndSymmetry",function(){this.someModelsAreModulated&&null==this.modelSet.bsModulated&&(this.modelSet.bsModulated=new JU.BS);
if(this.someModelsHaveUnitcells){this.modelSet.unitCells=Array(this.modelSet.modelCount);this.modelSet.haveUnitCells=!0;for(var a=null!=this.mergeModelSet&&null!=this.mergeModelSet.unitCells,c=0;c<this.modelSet.modelCount;c++)a&&c<this.baseModelCount?this.modelSet.unitCells[c]=this.mergeModelSet.unitCells[c]:(this.modelSet.unitCells[c]=J.api.Interface.getOptionInterface("symmetry.Symmetry"),this.modelSet.unitCells[c].setSymmetryInfo(c,this.modelSet.getModelAuxiliaryInfo(c)))}if(this.appendNew&&this.modelSet.someModelsHaveSymmetry){this.modelSet.getAtomBits(1089470478,
null);for(var a=this.modelSet.atoms,c=this.baseAtomIndex,d=-1,b=0;c<this.modelSet.atomCount;c++)a[c].modelIndex!=d&&(d=a[c].modelIndex,b=this.baseAtomIndex+this.modelSet.getModelAuxiliaryInfoInt(d,"presymmetryAtomIndex")+this.modelSet.getModelAuxiliaryInfoInt(d,"presymmetryAtomCount")),c>=b&&this.modelSet.bsSymmetry.set(c)}if(this.appendNew&&this.modelSet.someModelsHaveFractionalCoordinates){a=this.modelSet.atoms;b=-1;d=null;for(c=this.baseAtomIndex;c<this.modelSet.atomCount;c++)a[c].modelIndex!=
b&&(b=a[c].modelIndex,d=this.modelSet.getUnitCell(b)),null!=d&&d.getCoordinatesAreFractional()&&(d=a[c].getUnitCell(),d.toCartesian(d.toSupercell(a[c]),!1));for(a=this.baseModelIndex;a<this.modelSet.modelCount;a++)if(this.modelSet.isTrajectory(a)&&(d=this.modelSet.getUnitCell(a),null!=d&&d.getCoordinatesAreFractional()&&d.isSupercell())){b=this.modelSet.trajectorySteps.get(a);for(c=b.length;0<=--c;)null!=b[c]&&d.toSupercell(b[c])}}});b(c$,"initializeBonding",function(){var a=null==this.modelSet.getModelSetAuxiliaryInfoValue("someModelsHaveCONECT")?
null:new JU.BS;null!=a&&this.modelSet.setPdbConectBonding(this.baseAtomIndex,this.baseModelIndex,a);var c=0,d=this.viewer.getBoolean(603979794),b=this.viewer.getBoolean(603979798),f=this.viewer.getBoolean(603979846),g=null,h=!1,e=this.modelSet.modelCount,j=this.modelSet.models;if(!this.noAutoBond)for(var k=this.baseModelIndex;k<e;k++){var c=j[k].bsAtoms.cardinality(),v=this.modelSet.getModelAuxiliaryInfoInt(k,"initialBondCount"),A=j[k].isBioModel;0>v&&(v=this.modelSet.bondCount);var p=this.modelSet.getModelAuxiliaryInfoBoolean(k,
"hasSymmetry");if(f||b&&(0==v||A&&null==this.jmolData&&(this.modelSet.getModelSetAuxiliaryInfoBoolean("havePDBHeaderName")||v<m(c/2))||p&&!d&&!this.modelSet.getModelAuxiliaryInfoBoolean(k,"hasBonds")))if(h=!0,this.merging||1<e)null==g&&(g=J.util.BSUtil.newBitSet(this.modelSet.atomCount)),(k==this.baseModelIndex||!this.isTrajectory)&&g.or(j[k].bsAtoms)}h?(this.modulationOn&&this.modelSet.setModulation(null,!0,null,!1),this.modelSet.autoBondBs4(g,g,a,null,this.modelSet.defaultCovalentMad,this.viewer.getBoolean(603979874)),
J.util.Logger.info("ModelSet: autobonding; use  autobond=false  to not generate bonds automatically")):(this.modelSet.initializeBspf(),J.util.Logger.info("ModelSet: not autobonding; use  forceAutobond=true  to force automatic bond creation"))});b(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.modelSet);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.modelSet.atomCount:this.firstAtomIndexes[a+1]);if(null!=this.group3Lists&&null!=this.modelSet.modelSetAuxiliaryInfo){this.modelSet.modelSetAuxiliaryInfo.put("group3Lists",this.group3Lists);this.modelSet.modelSetAuxiliaryInfo.put("group3Counts",this.group3Counts);for(a=0;a<this.group3Counts.length;a++)null==this.group3Counts[a]&&(this.group3Counts[a]=D(0,0))}});b(c$,"distinguishAndPropagateGroup",function(a,
c,d,b,f,g){var h=g-1;if(h<f)throw new NullPointerException;var e=this.modelSet.atoms[f].modelIndex,j=null==d||null==this.jbr?null:this.jbr.distinguishAndPropagateGroup(c,d,b,f,g,e,this.specialAtomIndexes,this.modelSet.atoms);null==j?(j=(new J.modelset.Group).setGroup(c,d,b,f,h),b="o>"):b=j.isProtein()?"p>":j.isNucleic()?"n>":j.isCarbohydrate()?"c>":"o>";null!=d&&this.countGroup(e,b,d);this.addGroup(c,j);this.groups[a]=j;j.setGroupIndex(a);for(a=g;--a>=f;)this.modelSet.atoms[a].setGroup(j)},"~N,J.modelset.Chain,~S,~N,~N,~N");
b(c$,"addGroup",function(a,c){a.groupCount==a.groups.length&&(a.groups=JU.AU.doubleLength(a.groups));a.groups[a.groupCount++]=c},"J.modelset.Chain,J.modelset.Group");b(c$,"countGroup",function(a,c,d){var b=a+1;if(!(null==this.group3Lists||null==this.group3Lists[b])){var f=(d+"   ").substring(0,3),g=this.group3Lists[b].indexOf(f);0>g&&(this.group3Lists[b]+=",["+f+"]",g=this.group3Lists[b].indexOf(f),this.group3Counts[b]=JU.AU.arrayCopyI(this.group3Counts[b],this.group3Counts[b].length+10));this.group3Counts[b][m(g/
6)]++;g=this.group3Lists[b].indexOf(",["+f);0<=g&&(this.group3Lists[b]=this.group3Lists[b].substring(0,g)+c+this.group3Lists[b].substring(g+2));0<=a&&this.countGroup(-1,c,d)}},"~N,~S,~S");b(c$,"freeze",function(){this.htAtomMap.clear();this.modelSet.atomCount<this.modelSet.atoms.length&&this.modelSet.growAtomArrays(this.modelSet.atomCount);this.modelSet.bondCount<this.modelSet.bonds.length&&(this.modelSet.bonds=JU.AU.arrayCopyObject(this.modelSet.bonds,this.modelSet.bondCount));for(var a=5;0<--a;){this.modelSet.numCached[a]=
0;for(var c=this.modelSet.freeBonds[a],d=c.length;0<=--d;)c[d]=null}this.modelSet.setAtomNamesAndNumbers(0,this.baseAtomIndex,this.mergeModelSet);this.findElementsPresent();this.modelSet.resetMolecules();this.currentChain=this.currentModel=null;!this.isPDB||this.isPyMOLsession?this.modelSet.freezeModels():(a=this.viewer.getBoolean(603979825),a=this.modelSet.calculateStructuresAllExcept(this.structuresDefinedInFile,a,!1,!0,!0,a),0<a.length&&J.util.Logger.info(a))});b(c$,"findElementsPresent",function(){this.modelSet.elementsPresent=
Array(this.modelSet.modelCount);for(var a=0;a<this.modelSet.modelCount;a++)this.modelSet.elementsPresent[a]=J.util.BSUtil.newBitSet(64);for(a=this.modelSet.atomCount;0<=--a;){var c=this.modelSet.atoms[a].getAtomicAndIsotopeNumber();c>=J.util.Elements.elementNumberMax&&(c=J.util.Elements.elementNumberMax+J.util.Elements.altElementIndexFromNumber(c));this.modelSet.elementsPresent[this.modelSet.atoms[a].modelIndex].set(c)}});b(c$,"applyStereochemistry",function(){this.set2dZ(this.baseAtomIndex,this.modelSet.atomCount);
if(null!=this.vStereo){var a=new JU.BS;a.setBits(this.baseAtomIndex,this.modelSet.atomCount);for(var c=this.vStereo.size();0<=--c;){var d=this.vStereo.get(c),b=1025==d.order?3:-3;d.order=1;d.atom2.z!=d.atom1.z&&0>b==d.atom2.z<d.atom1.z&&(b/=3);var f=J.util.JmolMolecule.getBranchBitSet(this.modelSet.atoms,d.atom2.index,a,null,d.atom1.index,!1,!0);f.set(d.atom2.index);for(var g=f.nextSetBit(0);0<=g;g=f.nextSetBit(g+1))this.modelSet.atoms[g].z+=b;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});b(c$,"set2dZ",function(a,c){var d=J.util.BSUtil.newBitSet(c),b=new JU.BS,f=new JU.V3,g=JU.V3.new3(0,1,0),h=new JU.V3,e=new JU.BS;e.setBits(a,c);for(var j=a;j<c;j++)!d.get(j)&&!b.get(j)&&(b=this.getBranch2dZ(j,-1,e,b,f,g,h),d.or(b))},"~N,~N");b(c$,"getBranch2dZ",function(a,c,d,b,f,g,h){b=J.util.BSUtil.newBitSet(this.modelSet.atomCount);if(0>a)return b;var e=new JU.BS;e.or(d);0<=c&&e.clear(c);J.modelset.ModelLoader.setBranch2dZ(this.modelSet.atoms[a],b,
e,f,g,h);return b},"~N,~N,JU.BS,JU.BS,JU.V3,JU.V3,JU.V3");c$.setBranch2dZ=b(c$,"setBranch2dZ",function(a,c,d,b,f,g){var h=a.index;if(d.get(h)&&(d.clear(h),c.set(h),null!=a.bonds))for(h=a.bonds.length;0<=--h;){var e=a.bonds[h];e.isHydrogen()||(e=e.getOtherAtom(a),J.modelset.ModelLoader.setAtom2dZ(a,e,b,f,g),J.modelset.ModelLoader.setBranch2dZ(e,c,d,b,f,g))}},"J.modelset.Atom,JU.BS,JU.BS,JU.V3,JU.V3,JU.V3");c$.setAtom2dZ=b(c$,"setAtom2dZ",function(a,c,d,b,f){d.sub2(c,a);d.z=0;d.normalize();f.cross(b,
d);d=Math.acos(d.dot(b));c.z=a.z+0.8*Math.sin(4*d)},"J.modelset.Atom,J.modelset.Atom,JU.V3,JU.V3,JU.V3");b(c$,"finalizeShapes",function(){this.modelSet.shapeManager=this.viewer.getShapeManager();this.modelSet.shapeManager.setModelSet(this.modelSet);this.modelSet.setBsHidden(this.viewer.getHiddenSet());this.merging||this.modelSet.shapeManager.resetShapes();this.modelSet.shapeManager.loadDefaultShapes(this.modelSet);this.modelSet.someModelsHaveAromaticBonds&&this.viewer.getBoolean(603979944)&&this.modelSet.assignAromaticBondsBs(!1,
null);this.merging&&1==this.baseModelCount&&this.modelSet.shapeManager.setShapePropertyBs(6,"clearModelIndex",null,null)});b(c$,"undeleteAtom",function(a){this.modelSet.atoms[a].valence=0},"~N");b(c$,"deleteAtoms",function(a){this.doRemoveAddedHydrogens=!0;for(var c=D(this.modelSet.atomCount,0),d=D(this.modelSet.atomCount-a.cardinality(),0),b=this.baseAtomIndex,f=this.modelSet.models,g=this.modelSet.atoms,h=this.baseAtomIndex;h<this.modelSet.atomCount;h++)f[g[h].modelIndex].bsAtoms.clear(h),f[g[h].modelIndex].bsAtomsDeleted.clear(h),
a.get(h)?(c[h]=b-1,f[g[h].modelIndex].atomCount--):(d[b]=h,c[h]=b++);this.modelSet.modelSetAuxiliaryInfo.put("bsDeletedAtoms",a);for(h=this.baseGroupIndex;h<this.groups.length;h++)a=this.groups[h],a.firstAtomIndex>=this.baseAtomIndex&&(a.firstAtomIndex=c[a.firstAtomIndex],a.lastAtomIndex=c[a.lastAtomIndex],0<=a.leadAtomIndex&&(a.leadAtomIndex=c[a.leadAtomIndex]));this.modelSet.adjustAtomArrays(d,this.baseAtomIndex,b);this.modelSet.calcBoundBoxDimensions(null,1);this.modelSet.resetMolecules();this.modelSet.validateBspf(!1)},
"JU.BS");c$.createAtomDataSet=b(c$,"createAtomDataSet",function(a,c,d,b,f){if(null!=b){var g=a.getModelAdapter(),h=new JU.P3,e=c.atoms,j=a.getFloat(570425363);if(null!=c.unitCells)for(var k=f.nextSetBit(0);0<=k;k=f.nextSetBit(k+1))if(null!=e[k].getAtomSymmetry()){j=-j;break}for(var k=-1,m=0,A=J.util.BSUtil.cardinalityOf(f)==a.getAtomCount(),p=g.getAtomIterator(b);p.hasNext();){var x=p.getXYZ();if(!Float.isNaN(x.x+x.y+x.z))if(1146095626==d){k=f.nextSetBit(k+1);if(0>k)break;m++;J.util.Logger.debugging&&
J.util.Logger.debug("atomIndex = "+k+": "+e[k]+" --\x3e ("+x.x+","+x.y+","+x.z);c.setAtomCoord(k,x.x,x.y,x.z)}else{h.setT(x);x=J.util.BSUtil.newBitSet(c.atomCount);c.getAtomsWithin(j,h,x,-1);x.and(f);if(A)if(m=J.util.BSUtil.cardinalityOf(x),0==m){J.util.Logger.warn("createAtomDataSet: no atom found at position "+h);continue}else 1<m&&J.util.Logger.debugging&&J.util.Logger.debug("createAtomDataSet: "+m+" atoms found at position "+h);switch(d){case 1146095631:var r=p.getVib();if(null==r)continue;J.util.Logger.debugging&&
J.util.Logger.debug("xyz: "+h+" vib: "+r);c.setAtomCoords(x,1146095631,r);break;case 1129318401:c.setAtomProperty(x,d,p.getOccupancy(),0,null,null,null);break;case 1112541196:c.setAtomProperty(x,d,0,p.getPartialCharge(),null,null,null);break;case 1112541199:c.setAtomProperty(x,d,0,p.getBfactor(),null,null,null)}}}switch(d){case 1146095631:c=g.getAtomSetName(b,0);J.util.Logger.info("_vibrationName = "+c);a.setStringProperty("_vibrationName",c);break;case 1146095626:J.util.Logger.info(m+" atom positions read"),
c.recalculateLeadMidpointsAndWingVectors(-1)}}},"J.viewer.Viewer,J.modelset.ModelSet,~N,~O,JU.BS");B(c$,"defaultGroupCount",32)});p("J.modelset");q(["J.modelset.ModelCollection","JU.M3","$.M4","$.V3"],"J.modelset.ModelSet","java.lang.Boolean java.util.Hashtable JU.A4 $.BS $.List $.P3 $.SB J.api.Interface J.atomdata.RadiusData J.util.BSUtil $.JmolMolecule $.Measure $.Quaternion J.viewer.JC".split(" "),function(){c$=u(function(){this.echoShapeActive=this.selectionHaloEnabled=!1;this.vTemp=this.mat4t=
this.mat4=this.matInv=this.matTemp=this.pointGroup=this.closest=this.modelSetTypeName=null;t(this,arguments)},J.modelset,"ModelSet",J.modelset.ModelCollection);N(c$,function(){this.closest=Array(1);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});w(c$,function(a,c){R(this,J.modelset.ModelSet,[]);this.viewer=a;this.modelSetName=c},"J.viewer.Viewer,~S");b(c$,"releaseModelSet",function(){this.models=null;this.closest[0]=null;na(this,J.modelset.ModelSet,
"releaseModelSet",[])});b(c$,"setSelectionHaloEnabled",function(a){this.selectionHaloEnabled=a},"~B");b(c$,"getSelectionHaloEnabled",function(){return this.selectionHaloEnabled});b(c$,"getEchoStateActive",function(){return this.echoShapeActive});b(c$,"setEchoStateActive",function(a){this.echoShapeActive=a},"~B");b(c$,"getModelSetTypeName",function(){return this.modelSetTypeName});b(c$,"getModelNumberIndex",function(a,c,d){if(c){for(c=0;c<this.modelCount;c++)if(this.modelNumbers[c]==a||1E6>a&&this.modelNumbers[c]==
1E6+a)return c;return-1}for(c=0;c<this.modelCount;c++)if(this.modelFileNumbers[c]==a)return d&&this.isTrajectory(c)&&this.setTrajectory(c),c;return-1},"~N,~B,~B");b(c$,"getBitSetTrajectories",function(){if(null==this.trajectorySteps)return null;for(var a=new JU.BS,c=this.modelCount;0<=--c;){var d=this.models[c].getSelectedTrajectory();0<=d&&(a.set(d),c=this.models[c].trajectoryBaseIndex)}return a});b(c$,"setTrajectoryBs",function(a){for(var c=0;c<this.modelCount;c++)a.get(c)&&this.setTrajectory(c)},
"JU.BS");b(c$,"setTrajectory",function(a){if(!(0>a)&&this.isTrajectory(a)&&this.atoms[this.models[a].firstAtomIndex].modelIndex!=a){var c=this.models[a].trajectoryBaseIndex;this.models[c].setSelectedTrajectory(a);this.setAtomPositions(c,a,this.trajectorySteps.get(a),null,0,null==this.vibrationSteps?null:this.vibrationSteps.get(a),!0);c=this.viewer.getCurrentModelIndex();0<=c&&(c!=a&&this.models[c].fileIndex==this.models[a].fileIndex)&&this.viewer.setCurrentModelIndexClear(a,!1)}},"~N");b(c$,"morphTrajectories",
function(a,c,d){if(!(0>a||0>c||!this.isTrajectory(a)||!this.isTrajectory(c)))if(0==d)this.setTrajectory(a);else if(1==d)this.setTrajectory(c);else{var b=this.models[a].trajectoryBaseIndex;this.models[b].setSelectedTrajectory(a);this.setAtomPositions(b,a,this.trajectorySteps.get(a),this.trajectorySteps.get(c),d,null==this.vibrationSteps?null:this.vibrationSteps.get(a),!0);c=this.viewer.getCurrentModelIndex();0<=c&&(c!=a&&this.models[c].fileIndex==this.models[a].fileIndex)&&this.viewer.setCurrentModelIndexClear(a,
!1)}},"~N,~N,~N");b(c$,"setAtomPositions",function(a,c,d,b,f,g,h){var e=new JU.BS,j=new JU.V3,k=this.models[a].firstAtomIndex,m=k+this.getAtomCountInModel(a);if(0==f)for(var A=0;k<m&&A<d.length;k++,A++)this.atoms[k].modelIndex=c,null!=d[A]&&(h?this.atoms[k].setFractionalCoordTo(d[A],!0):this.atoms[k].setT(d[A]),null!=this.vibrationSteps&&(null!=g&&null!=g[A]&&(j=g[A]),this.setVibrationVector(k,j)),e.set(k));else{g=new JU.P3;j=Math.min(d.length,b.length);for(A=0;k<m&&A<j;k++,A++)this.atoms[k].modelIndex=
c,null==d[A]||null==b[A]||(g.sub2(b[A],d[A]),g.scaleAdd2(f,g,d[A]),h?this.atoms[k].setFractionalCoordTo(g,!0):this.atoms[k].setT(g),e.set(k))}this.initializeBspf();this.validateBspfForModel(a,!1);this.recalculateLeadMidpointsAndWingVectors(a);this.shapeManager.refreshShapeTrajectories(a,e,null);this.models[a].hasRasmolHBonds&&(this.models[a].clearRasmolHydrogenBonds(null),this.models[a].getRasmolHydrogenBonds(e,e,null,!1,2147483647,!1,null))},"~N,~N,~A,~A,~N,~A,~B");b(c$,"getFrameOffsets",function(a){if(null==
a)return null;for(var c=Array(this.modelCount),d=0;d<this.modelCount;d++)c[d]=new JU.P3;for(var b=0,f=0,g=c[0],h=null!=this.trajectorySteps&&this.trajectorySteps.size()==this.modelCount,e=h?this.modelCount:1,j=0;j<e;j++){h&&this.setTrajectory(j);for(d=0;d<=this.atomCount;d++){if(d==this.atomCount||this.atoms[d].modelIndex!=b){0<f&&(g.scale(-1/f),0!=b&&g.sub(c[0]),f=0);if(d==this.atomCount)break;b=this.atoms[d].modelIndex;g=c[b]}a.get(d)&&(g.add(this.atoms[d]),f++)}}c[0].set(0,0,0);return c},"JU.BS");
b(c$,"getAtomBits",function(a,c){switch(a){default:return J.util.BSUtil.andNot(this.getAtomBitsMaybeDeleted(a,c),this.viewer.getDeletedAtoms());case 1048610:var d=c.intValue(),b=this.getModelNumberIndex(d,!0,!0);return 0>b&&0<d?new JU.BS:this.viewer.getModelUndeletedAtomsBitSet(b)}},"~N,~O");b(c$,"getAtomLabel",function(a){return this.viewer.getShapePropertyIndex(5,"label",a)},"~N");b(c$,"findNearestAtomIndex",function(a,c,d,b){if(0==this.atomCount)return-1;this.closest[0]=null;this.g3d.isAntialiased()&&
(a<<=1,c<<=1);this.findNearest2(a,c,this.closest,d,b);this.shapeManager.findNearestShapeAtomIndex(a,c,this.closest,d);a=null==this.closest[0]?-1:this.closest[0].index;this.closest[0]=null;return a},"~N,~N,JU.BS,~N");b(c$,"calculateStructures",function(a,c,d,b){var f=new JU.BS;a=J.util.BSUtil.copyInvert(this.modelsOf(a,f),this.modelCount);if(!b)return this.calculateStructuresAllExcept(a,c,!0,d,!1,!1);for(b=0;b<this.modelCount;b++)a.get(b)||this.models[b].clearBioPolymers();this.calculatePolymers(null,
0,0,a);c=this.calculateStructuresAllExcept(a,c,!0,d,!0,!1);this.viewer.resetBioshapes(f);this.setStructureIndexes();return c},"JU.BS,~B,~B,~B");b(c$,"calculatePointGroup",function(a){return this.calculatePointGroupForFirstModel(a,!1,!1,!1,null,0,0)},"JU.BS");b(c$,"getPointGroupInfo",function(a){return this.calculatePointGroupForFirstModel(a,!1,!1,!0,null,0,0)},"JU.BS");b(c$,"getPointGroupAsString",function(a,c,d,b,f){return this.calculatePointGroupForFirstModel(a,!0,c,!1,d,b,f)},"JU.BS,~B,~S,~N,~N");
b(c$,"calculatePointGroupForFirstModel",function(a,c,d,b,f,g,h){var e=this.viewer.getCurrentModelIndex(),j=null==a?-1:a.nextSetBit(0);0>e&&0<=j&&(e=this.atoms[j].getModelIndex());0>e&&(e=this.viewer.getVisibleFramesBitSet().nextSetBit(0),a=null);var k=this.viewer.getModelUndeletedAtomsBitSet(e);null!=a&&k.and(a);j=k.nextSetBit(0);0>j&&(k=this.viewer.getModelUndeletedAtomsBitSet(e),j=k.nextSetBit(0));a=this.viewer.getShapePropertyIndex(18,"mad",j);a=null!=a&&0!=a.intValue()||this.viewer.isVibrationOn();
this.pointGroup=J.api.Interface.getOptionInterface("symmetry.Symmetry").setPointGroup(this.pointGroup,this.atoms,k,a,this.viewer.getFloat(570425382),this.viewer.getFloat(570425384));if(!c&&!b)return this.pointGroup.getPointGroupName();c=this.pointGroup.getPointGroupInfo(e,d,b,f,g,h);return b?c:(1<this.modelCount?"frame "+this.getModelNumberDotted(e)+"; ":"")+c},"JU.BS,~B,~B,~B,~S,~N,~N");b(c$,"modelsOf",function(a,c){for(var d=J.util.BSUtil.newBitSet(this.modelCount),b=null==a,f=b?this.atomCount-
1:a.nextSetBit(0);0<=f;f=b?f-1:a.nextSetBit(f+1)){var g=this.models[this.atoms[f].modelIndex].trajectoryBaseIndex;this.isJmolDataFrameForModel(g)||(d.set(g),c.set(f))}return d},"JU.BS,JU.BS");b(c$,"getDefaultStructure",function(a,c){for(var d=this.modelsOf(a,c),b=new JU.SB,f=d.nextSetBit(0);0<=f;f=d.nextSetBit(f+1))this.models[f].isBioModel&&null!=this.models[f].defaultStructure&&b.append(this.models[f].defaultStructure);return b.toString()},"JU.BS,JU.BS");b(c$,"makeConnections",function(a,c,d,b,
f,g,h,e,j,k){if(1073741852==b&&2048!=d){var m="connect ";0.1!=a&&(m+=a+" ");1E8!=c&&(m+=c+" ");this.addStateScript(m,e?f:null,e?null:f,e?null:g," auto",!1,!0)}this.moleculeCount=0;return this.makeConnections2(a,c,d,b,f,g,h,e,j,k)},"~N,~N,~N,~N,JU.BS,JU.BS,JU.BS,~B,~B,~N");b(c$,"setPdbConectBonding",function(a,c,d){for(var b=this.viewer.getMadBond();c<this.modelCount;c++){var f=this.getModelAuxiliaryInfoValue(c,"PDB_CONECT_bonds");if(null!=f){var g=f.size();this.setModelAuxiliaryInfo(c,"initialBondCount",
Integer.$valueOf(g));for(var h=this.getModelAuxiliaryInfoValue(c,"PDB_CONECT_firstAtom_count_max"),e=h[0]+a,j=e+h[1],h=h[2],k=D(h+1,0),m=e;m<j;m++)if(0<(e=this.atomSerials[m]))k[e]=m+1;for(j=0;j<g;j++){var m=f.get(j),A=m[0],e=m[1],m=m[2];0>A||(0>e||A>h||e>h)||(A=k[A]-1,e=k[e]-1,0>A||0>e||(null!=d&&(this.atoms[A].isHetero()&&d.set(A),this.atoms[e].isHetero()&&d.set(e)),this.checkValencesAndBond(this.atoms[A],this.atoms[e],m,2048==m?1:b,null)))}}}},"~N,~N,JU.BS");b(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()});b(c$,"includeAllRelatedFrames",function(a){for(var c,d=0;d<this.modelCount;d++)if(a.get(d)){if(this.isTrajectory(d)&&!a.get(c=this.models[d].trajectoryBaseIndex)){a.set(c);this.includeAllRelatedFrames(a);break}}else(this.isTrajectory(d)&&a.get(this.models[d].trajectoryBaseIndex)||this.isJmolDataFrameForModel(d)&&a.get(this.models[d].dataSourceFrame))&&a.set(d)},"JU.BS");
b(c$,"deleteModels",function(a){this.moleculeCount=0;a=this.getModelBitSet(a,!1);this.includeAllRelatedFrames(a);var c=J.util.BSUtil.cardinalityOf(a);if(0==c)return null;for(var d=a.nextSetBit(0);0<=d;d=a.nextSetBit(d+1))this.clearDataFrameReference(d);if(c==this.modelCount)return c=this.getModelAtomBitSetIncludingDeleted(-1,!0),this.viewer.zap(!0,!1,!1),c;this.validateBspf(!1);for(var b=Array(this.modelCount-c),f=this.models,c=new JU.BS,g=d=0;d<this.modelCount;d++)a.get(d)?(this.getAtomCountInModel(d),
c.or(this.getModelAtomBitSetIncludingDeleted(d,!1))):(this.models[d].modelIndex=g,b[g++]=this.models[d]);this.models=b;var h=this.modelCount,e=this.getBondsForSelectedAtoms(c,!0);this.deleteBonds(e,!0);for(g=d=0;d<h;d++)if(a.get(d)){var j=f[d].atomCount;if(0!=j){var k=f[d].bsAtoms,m=f[d].firstAtomIndex;J.util.BSUtil.deleteBits(this.bsSymmetry,k);this.deleteModel(g,m,j,k,e);for(var A=h;--A>d;)f[A].fixIndices(g,j,k);this.viewer.deleteShapeAtoms([b,this.atoms,[g,m,j]],k);this.modelCount--}}else g++;
this.deleteModel(-1,0,0,null,null);return c},"JU.BS");b(c$,"setAtomProperty",function(a,c,d,b,f,g,h){switch(c){case 1115297793:case 1113200642:case 1113200647:case 1113200649:case 1113200650:case 1650071565:case 1113200654:if(4<b&&(b=4),null!=g){d=M(this.atomCount,0);f=a.nextSetBit(0);for(h=0;0<=f;f=a.nextSetBit(f+1))d[f]=g[h++];g=d}case 1113200646:case 1113200652:d=null;f=0;null==g?(16<b&&(b=16.1),0>b&&(b=0),f=m(Math.floor(2E3*b))):d=new J.atomdata.RadiusData(g,0,null,null);this.shapeManager.setShapeSizeBs(J.viewer.JC.shapeTokenIndex(c),
f,d,a);return}this.setAPm(a,c,d,b,f,g,h)},"JU.BS,~N,~N,~N,~S,~A,~A");b(c$,"getFileData",function(a){if(0>a)return"";var c=this.getModelAuxiliaryInfoValue(a,"fileData");if(null!=c)return c;if(!this.getModelAuxiliaryInfoBoolean(a,"isCIF"))return this.getPDBHeader(a);c=this.viewer.getCifData(a);this.setModelAuxiliaryInfo(a,"fileData",c);return c},"~N");e(c$,"calculateStruts",function(a,c){this.viewer.setModelVisibility();return this.calculateStrutsMC(a,c)},"JU.BS,JU.BS");b(c$,"addHydrogens",function(a,
c){var d=this.modelCount-1,b=new JU.BS;if(this.isTrajectory(d)||1<this.models[d].getGroupCount())return b;this.growAtomArrays(this.atomCount+c.length);for(var f=this.viewer.getDefaultRadiusData(),g=this.getDefaultMadFromOrder(1),h=0,e=this.models[d].atomCount+1;h<a.size();h++,e++){var j=a.get(h),k=this.addAtom(d,j.group,1,"H"+e,e,e,c[h],NaN,null,0,0,100,NaN,null,!1,0,null);k.setMadAtom(this.viewer,f);b.set(k.index);this.bondAtoms(j,k,1,g,null,0,!1,!1)}this.shapeManager.loadDefaultShapes(this);return b},
"JU.List,~A");b(c$,"setAtomCoordsRelative",function(a,c){this.setAtomsCoordRelative(c,a.x,a.y,a.z);this.mat4.setIdentity();this.vTemp.setT(a);this.mat4.setTranslation(this.vTemp);this.recalculatePositionDependentQuantities(c,this.mat4)},"JU.T3,JU.BS");b(c$,"setAtomCoords",function(a,c,d){this.setAtomCoord2(a,c,d);switch(c){case 1112541202:case 1112541203:case 1112541204:case 1146095631:break;default:this.recalculatePositionDependentQuantities(a,null)}},"JU.BS,~N,~O");b(c$,"invertSelected",function(a,
c,d,b,f){if(null!=a)for(var g=f.nextSetBit(0);0<=g;g=f.nextSetBit(g+1)){d=2*(a.x-this.atoms[g].x);b=2*(a.y-this.atoms[g].y);var h=2*(a.z-this.atoms[g].z);this.setAtomCoordRelative(g,d,b,h)}else if(null!=c){a=JU.V3.new3(c.x,c.y,c.z);a.normalize();for(var e=Math.sqrt(c.x*c.x+c.y*c.y+c.z*c.z),g=f.nextSetBit(0);0<=g;g=f.nextSetBit(g+1))h=2*-J.util.Measure.distanceToPlaneD(c,e,this.atoms[g]),d=a.x*h,b=a.y*h,h*=a.z,this.setAtomCoordRelative(g,d,b,h)}else if(0<=d&&(c=this.atoms[d],a=c.bonds,null!=a)){f=
new JU.BS;h=new JU.List;e=this.viewer.getModelUndeletedAtomsBitSet(c.modelIndex);for(g=0;g<a.length;g++){var j=a[g].getOtherAtom(c);b.get(j.index)?f.or(J.util.JmolMolecule.getBranchBitSet(this.atoms,j.index,e,null,d,!0,!0)):h.addLast(j)}0!=h.size()&&(a=J.util.Measure.getCenterAndPoints(h)[0],g=JU.V3.newVsub(c,a),g=J.util.Quaternion.newVA(g,180),this.moveAtoms(null,g.getMatrix(),null,f,c,!0,!1))}},"JU.P3,JU.P4,~N,JU.BS,JU.BS");b(c$,"setDihedrals",function(a,c,d){var b=m(a.length/6);1<d&&(d=1);for(var f=
0,g=0;f<b;f++,g+=6){var h=c[f];if(!(null==h||h.isEmpty())){var e=this.atoms[z(a[g+1])],j=JU.V3.newVsub(this.atoms[z(a[g+2])],e),j=JU.A4.newVA(j,-((a[g+5]-a[g+4])*d)/57.29577951308232);this.matTemp.setAA(j);this.ptTemp.setT(e);for(e=h.nextSetBit(0);0<=e;e=h.nextSetBit(e+1))this.atoms[e].sub(this.ptTemp),this.matTemp.transform(this.atoms[e]),this.atoms[e].add(this.ptTemp),this.taintAtom(e,2)}}},"~A,~A,~N");b(c$,"moveAtoms",function(a,c,d,b,f,g,h){if(!h){null==a?this.matTemp.setM(c):(this.matInv.setM(c),
this.matInv.invert(),this.ptTemp.set(0,0,0),this.matTemp.mul2(a,c),this.matTemp.mul2(this.matInv,this.matTemp));g?(this.vTemp.setT(f),this.mat4.setIdentity(),this.mat4.setTranslation(this.vTemp),this.mat4t.setM3(this.matTemp),this.mat4.mulM4(this.mat4t),this.mat4t.setIdentity(),this.vTemp.scale(-1),this.mat4t.setTranslation(this.vTemp),this.mat4.mulM4(this.mat4t)):this.mat4.setM3(this.matTemp);for(a=b.nextSetBit(0);0<=a;a=b.nextSetBit(a+1))g?this.mat4.transform(this.atoms[a]):(this.ptTemp.add(this.atoms[a]),
this.mat4.transform(this.atoms[a]),this.ptTemp.sub(this.atoms[a])),this.taintAtom(a,2);g||(this.ptTemp.scale(1/b.cardinality()),null==d&&(d=new JU.V3),d.add(this.ptTemp))}if(null!=d){for(a=b.nextSetBit(0);0<=a;a=b.nextSetBit(a+1))this.atoms[a].add(d);h||(this.mat4t.setIdentity(),this.mat4t.setTranslation(d),this.mat4.mul2(this.mat4t,this.mat4))}this.recalculatePositionDependentQuantities(b,this.mat4)},"JU.M3,JU.M3,JU.V3,JU.BS,JU.P3,~B,~B");b(c$,"recalculatePositionDependentQuantities",function(a,
c){this.getHaveStraightness()&&this.calculateStraightness();this.recalculateLeadMidpointsAndWingVectors(-1);for(var d=this.getModelBitSet(a,!1),b=d.nextSetBit(0);0<=b;b=d.nextSetBit(b+1))this.shapeManager.refreshShapeTrajectories(b,a,c)},"JU.BS,JU.M4");b(c$,"getBsBranches",function(a){for(var c=m(a.length/6),d=Array(c),b=new java.util.Hashtable,f=0,g=0;f<c;f++,g+=6)if(!(1>Math.abs(a[g+5]-a[g+4]))){var h=z(a[g+1]),e=z(a[g+2]),j=""+h+"_"+e;if(!b.containsKey(j)){b.put(j,Boolean.TRUE);for(var j=this.viewer.getBranchBitSet(e,
h,!0),k=this.atoms[h].bonds,h=this.atoms[h],v=0;v<k.length;v++){var A=k[v];if(A.isCovalent()&&(A=A.getOtherAtom(h).index,A!=e&&j.get(A))){j=null;break}}d[f]=j}}return d},"~A");b(c$,"getSymMatrices",function(a){var c=this.getModelSymmetryCount(a);if(0==c)return null;var d=Array(c),b=this.models[a].biosymmetry;null==b&&(b=this.viewer.getModelUnitCell(a));for(a=c;0<=--a;)d[a]=b.getSpaceGroupOperation(a);return d},"~N")});p("J.modelset");q(["JU.M3","$.P3"],"J.modelset.Orientation",["J.util.Escape"],function(){c$=
u(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.viewer=this.pymolView=this.moveToText=null;t(this,arguments)},J.modelset,"Orientation");N(c$,function(){this.rotationMatrix=new JU.M3;this.center=new JU.P3;this.navCenter=new JU.P3});w(c$,function(a,c,d){this.viewer=a;null!=d?(this.pymolView=
d,this.moveToText="moveTo -1.0 PyMOL "+J.util.Escape.eAF(d)):(a.finalizeTransformParameters(),c?(c=a.getModelSetAuxiliaryInfoValue("defaultOrientationMatrix"),null==c?this.rotationMatrix.setIdentity():this.rotationMatrix.setM(c)):a.getRotation(this.rotationMatrix),this.xTrans=a.getTranslationXPercent(),this.yTrans=a.getTranslationYPercent(),this.zoom=a.getZoomSetting(),this.center.setT(a.getRotationCenter()),this.windowCenteredFlag=a.isWindowCentered(),this.rotationRadius=a.getFloat(570425388),this.navigationMode=
a.getBoolean(603979887),this.moveToText=a.getMoveToText(-1),this.navigationMode&&(this.xNav=a.getNavigationOffsetPercent("X"),this.yNav=a.getNavigationOffsetPercent("Y"),this.navDepth=a.getNavigationDepthPercent(),this.navCenter=JU.P3.newP(a.getNavigationCenter())),0!=a.getCamera().z&&(this.cameraDepth=a.getCameraDepth(),this.cameraX=a.getCamera().x,this.cameraY=a.getCamera().y))},"J.viewer.Viewer,~B,~A");b(c$,"getMoveToText",function(a){return a?"   "+this.moveToText+"\n  save orientation "+J.util.Escape.eS(this.saveName.substring(12))+
";\n":this.moveToText},"~B");b(c$,"restore",function(a,c){c?(this.viewer.setBooleanProperty("windowCentered",this.windowCenteredFlag),this.viewer.setBooleanProperty("navigationMode",this.navigationMode),null==this.pymolView?this.viewer.moveTo(this.viewer.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.viewer.movePyMOL(this.viewer.eval,a,this.pymolView)):
this.viewer.setRotationMatrix(this.rotationMatrix);return!0},"~N,~B")});p("J.modelset");q(null,"J.modelset.StateScript",["JU.SB","J.util.BSUtil","$.Escape"],function(){c$=u(function(){this.modelIndex=0;this.script2=this.script1=this.bsAtoms2=this.bsAtoms1=this.bsBonds=null;this.inDefinedStateBlock=!1;t(this,arguments)},J.modelset,"StateScript");w(c$,function(a,c,d,b,f,g,h){this.modelIndex=a;this.script1=c;this.bsBonds=J.util.BSUtil.copy(d);this.bsAtoms1=J.util.BSUtil.copy(b);this.bsAtoms2=J.util.BSUtil.copy(f);
this.script2=g;this.inDefinedStateBlock=h},"~N,~S,JU.BS,JU.BS,JU.BS,~S,~B");b(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))});e(c$,"toString",function(){if(!this.isValid())return"";var a=JU.SB.newS(this.script1);null!=this.bsBonds&&a.append(" ").append(J.util.Escape.eBond(this.bsBonds));null!=this.bsAtoms1&&a.append(" ").append(J.util.Escape.eBS(this.bsAtoms1));
null!=this.bsAtoms2&&a.append(" ").append(J.util.Escape.eBS(this.bsAtoms2));null!=this.script2&&a.append(" ").append(this.script2);a=a.toString();a.endsWith(";")||(a+=";");return a});b(c$,"isConnect",function(){return 0<=this.script1.indexOf("connect")});b(c$,"deleteAtoms",function(a,c,d){if(a==this.modelIndex)return!1;if(a>this.modelIndex)return!0;J.util.BSUtil.deleteBits(this.bsBonds,c);J.util.BSUtil.deleteBits(this.bsAtoms1,d);J.util.BSUtil.deleteBits(this.bsAtoms2,d);return this.isValid()},"~N,JU.BS,JU.BS");
b(c$,"setModelIndex",function(a){this.modelIndex=a},"~N")});p("J.modelset");c$=u(function(){this.id="";this.type=" ";this.scale=this.tickLabelFormats=this.ticks=null;this.first=0;this.signFactor=1;this.reference=null;t(this,arguments)},J.modelset,"TickInfo");w(c$,function(a){this.ticks=a},"JU.P3");p("J.render");q(["J.render.ShapeRenderer"],"J.render.BallsRenderer",["J.shape.Shape"],function(){c$=G(J.render,"BallsRenderer",J.render.ShapeRenderer);e(c$,"render",function(){var a=!1;if(this.isExport||
this.viewer.checkMotionRendering(1141899265))for(var c=this.modelSet.atoms,d=this.shape.colixes,b=this.viewer.getRenderableBitSet(),f=b.nextSetBit(0);0<=f;f=b.nextSetBit(f+1)){var g=c[f];0<g.sD&&0!=(g.getShapeVisibilityFlags()&this.myVisibilityFlag)&&(this.g3d.setColix(null==d?g.getColix():J.shape.Shape.getColix(d,f,g))?this.g3d.drawAtom(g):a=!0)}return a})});p("J.render");q(["J.render.ShapeRenderer","JU.P3","$.P3i","$.V3"],"J.render.FontLineShapeRenderer",["java.lang.Float","J.constant.EnumAxesMode",
"J.util.Txt"],function(){c$=u(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;t(this,arguments)},J.render,"FontLineShapeRenderer",J.render.ShapeRenderer);N(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});b(c$,"getDiameter",function(a,c){var d;d=20<c;switch(this.exportType){case 1:d=d?c:m(Math.floor(1E3*this.viewer.unscaleToScreen(a,2*c)));break;default:d?d=z(this.viewer.scaleToScreen(a,c)):(this.g3d.isAntialiased()&&(c+=c),d=c)}return d},"~N,~N");b(c$,"renderLine",function(a,c,d,b,f,g){b.set(m(Math.floor(a.x)),
m(Math.floor(a.y)),m(Math.floor(a.z)));f.set(m(Math.floor(c.x)),m(Math.floor(c.y)),m(Math.floor(c.z)));0>d?this.g3d.drawDottedLine(b,f):this.g3d.fillCylinder(this.endcap,d,b,f);g&&null!=this.tickInfo&&(this.atomA.sX=b.x,this.atomA.sY=b.y,this.atomA.sZ=b.z,this.atomB.sX=f.x,this.atomB.sY=f.y,this.atomB.sZ=f.z,this.drawTicks(this.atomA,this.atomB,d,!0))},"JU.P3,JU.P3,~N,JU.P3i,JU.P3i,~B");b(c$,"drawTicks",function(a,c,d,b){Float.isNaN(this.tickInfo.first)&&(this.tickInfo.first=0);this.drawTicks2(a,
c,this.tickInfo.ticks.x,8,d,!b?null:null==this.tickInfo.tickLabelFormats?["%0.2f"]:this.tickInfo.tickLabelFormats);this.drawTicks2(a,c,this.tickInfo.ticks.y,4,d,null);this.drawTicks2(a,c,this.tickInfo.ticks.z,2,d,null)},"J.util.Point3fi,J.util.Point3fi,~N,~B");b(c$,"drawTicks2",function(a,c,d,b,f,g){if(0!=d&&(this.g3d.isAntialiased()&&(b*=2),this.vectorT2.set(c.sX,c.sY,0),this.vectorT.set(a.sX,a.sY,0),this.vectorT2.sub(this.vectorT),!(50>this.vectorT2.length()))){var h=this.tickInfo.signFactor;this.vectorT.sub2(c,
a);var e=this.vectorT.length();if(null!=this.tickInfo.scale)if(Float.isNaN(this.tickInfo.scale.x)){var j=this.viewer.getUnitCellInfo(0);Float.isNaN(j)||this.vectorT.set(this.vectorT.x/j,this.vectorT.y/this.viewer.getUnitCellInfo(1),this.vectorT.z/this.viewer.getUnitCellInfo(2))}else this.vectorT.set(this.vectorT.x*this.tickInfo.scale.x,this.vectorT.y*this.tickInfo.scale.y,this.vectorT.z*this.tickInfo.scale.z);j=this.vectorT.length()+1E-4*d;if(!(j<d)){this.vectorT.scale(d/j*e/j);c=(c.sZ-a.sZ)/(j/d);
j+=this.tickInfo.first;e=m(Math.floor(this.tickInfo.first/d))*d-this.tickInfo.first;this.pointT.scaleAdd2(e/d,this.vectorT,a);e+=this.tickInfo.first;a=a.sZ;0>f&&(f=1);this.vectorT2.set(-this.vectorT2.y,this.vectorT2.x,0);this.vectorT2.scale(b/this.vectorT2.length());b=this.tickInfo.reference;null==b?(this.pointT3.setT(this.viewer.getBoundBoxCenter()),this.viewer.getAxesMode()===J.constant.EnumAxesMode.BOUNDBOX&&(this.pointT3.x+=1,this.pointT3.y+=1,this.pointT3.z+=1)):this.pointT3.setT(b);this.viewer.transformPtScr(this.pointT3,
this.pt2i);b=0.2>Math.abs(this.vectorT2.x/this.vectorT2.y);for(var k=!b,v=!b&&0>this.vectorT2.x,A=null!=g&&0<g.length,p,x,r=Array(1),q=this.draw000?0:-1;e<j;){if(e>=this.tickInfo.first&&(this.pointT2.setT(this.pointT),this.viewer.transformPt3f(this.pointT2,this.pointT2),this.drawLine(m(Math.floor(this.pointT2.x)),m(Math.floor(this.pointT2.y)),z(a),p=m(Math.floor(this.pointT2.x+this.vectorT2.x)),x=m(Math.floor(this.pointT2.y+this.vectorT2.y)),z(a),f),A&&(this.draw000||0!=e))){r[0]=Float.$valueOf(0==
e?0:e*h);var s=J.util.Txt.sprintf(g[q%g.length],"f",r);this.drawString(p,x,z(a),4,v,b,k,m(Math.floor(this.pointT2.y)),s)}this.pointT.add(this.vectorT);e+=d;a+=c;q++}}}},"J.util.Point3fi,J.util.Point3fi,~N,~N,~N,~A");b(c$,"drawLine",function(a,c,d,b,f,g,e){return this.drawLine2(a,c,d,b,f,g,e)},"~N,~N,~N,~N,~N,~N,~N");b(c$,"drawLine2",function(a,c,d,b,f,g,e){this.pt0i.set(a,c,d);this.pt1i.set(b,f,g);if(this.dotsOrDashes)null!=this.dashDots&&this.drawDashed(a,c,d,b,f,g,this.dashDots);else{if(0>e)return this.g3d.drawDashedLine(4,
2,this.pt0i,this.pt1i),1;this.g3d.fillCylinder(2,e,this.pt0i,this.pt1i)}return m((e+1)/2)},"~N,~N,~N,~N,~N,~N,~N");b(c$,"drawString",function(a,c,d,b,f,g,e,l,j){if(null!=j){var k=this.font3d.stringWidth(j),v=this.font3d.getAscent();a=f?a-(m(b/2)+2+k):g?a-(m(b/2)+2+m(k/2)):a+(m(b/2)+2);f=c;f=e?f+m(v/2):0==l||l<c?f+v:f-m(b/2);c=d-b-2;1>c&&(c=1);this.g3d.drawString(j,this.font3d,a,f,c,c,0)}},"~N,~N,~N,~N,~B,~B,~B,~N,~S");b(c$,"drawDashed",function(a,c,d,b,f,g,e){if(!(null==e||0>this.width)){var l=e[0];
b-=a;f-=c;g-=d;var j=0,k=e===J.render.FontLineShapeRenderer.ndots,v=k||e===J.render.FontLineShapeRenderer.sixdots;if(v){var p=(b*b+f*f)/(this.width*this.width);k?(l=Math.sqrt(p)/1.5,j=z(l)+3):8>p?e=J.render.FontLineShapeRenderer.twodots:32>p&&(e=J.render.FontLineShapeRenderer.fourdots)}var p=e[1],r=e[2],x=this.colixA,q=0==r?this.colixB:this.colixA;0==j&&(j=e.length);for(var s=0,t=3;t<j;t++){var s=k?s+1:e[t],u=m(Math.floor(a+b*s/l)),w=m(Math.floor(c+f*s/l)),y=m(Math.floor(d+g*s/l));if(v)this.s1.set(u,
w,y),t==p?this.g3d.setColix(this.colixA):t==r&&this.g3d.setColix(this.colixB),this.g3d.fillSphereI(this.width,this.s1);else{t==p&&(x=this.colixB);s=e[++t];t==r&&(q=this.colixB);var B=m(Math.floor(a+b*s/l)),C=m(Math.floor(c+f*s/l)),D=m(Math.floor(d+g*s/l));this.fillCylinder(x,q,2,this.width,u,w,y,B,C,D)}}}},"~N,~N,~N,~N,~N,~N,~A");b(c$,"fillCylinder",function(a,c,d,b,f,g,e,l,j,k){this.asLineOnly?this.g3d.drawLine(a,c,f,g,e,l,j,k):this.g3d.fillCylinderXYZ(a,c,d,!this.isExport||1==this.mad?b:this.mad,
f,g,e,l,j,k)},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");B(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])});p("J.render");q(["J.render.ShapeRenderer"],"J.render.FrankRenderer",["J.util.C"],function(){c$=G(J.render,"FrankRenderer",J.render.ShapeRenderer);e(c$,"render",function(){var a=this.shape,c=this.viewer.getBooleanProperty("allowKeyStrokes"),d=this.viewer.getBoolean(603979883);this.colix=
d?20:this.viewer.isSignedApplet()?c||this.viewer.isJS&&!this.viewer.isWebGL?5:10:c?7:12;if(this.isExport||!this.viewer.getShowFrank())return!1;if(!this.g3d.setColix(J.util.C.getColixTranslucent3(this.colix,this.g3d.haveTranslucentObjects(),0.5)))return!0;c=this.viewer.getImageFontScaling();a.getFont(c);var c=z(a.frankWidth+4*c),b=a.frankDescent;this.g3d.drawStringNoSlab(a.frankString,a.font3d,this.g3d.getRenderWidth()-c,this.g3d.getRenderHeight()-b,0,0);d&&this.g3d.fillRect(0,0,0,0,2*b,m(3*c/2));
return!1})});p("J.render");q(["J.api.JmolRepaintManager","JU.BS"],"J.render.RepaintManager",["J.util.Logger","J.viewer.JC"],function(){c$=u(function(){this.bsTranslucent=this.renderers=this.shapeManager=this.viewer=null;this.holdRepaint=0;this.repaintPending=!1;t(this,arguments)},J.render,"RepaintManager",null,J.api.JmolRepaintManager);N(c$,function(){this.bsTranslucent=JU.BS.newN(36)});w(c$,function(){});e(c$,"set",function(a,c){this.viewer=a;this.shapeManager=c},"J.viewer.Viewer,J.viewer.ShapeManager");
e(c$,"isRepaintPending",function(){return this.repaintPending});e(c$,"pushHoldRepaint",function(){++this.holdRepaint},"~S");e(c$,"popHoldRepaint",function(a,c){--this.holdRepaint;0>=this.holdRepaint&&(this.holdRepaint=0,a&&(this.repaintPending=!0,this.repaintNow(c)))},"~B,~S");e(c$,"requestRepaintAndWait",function(){"undefined"!=typeof Jmol&&Jmol._repaint&&Jmol._repaint(this.viewer.applet,!1);this.repaintDone()},"~S");e(c$,"repaintIfReady",function(a){if(this.repaintPending)return!1;this.repaintPending=
!0;0==this.holdRepaint&&this.repaintNow(a);return!0},"~S");b(c$,"repaintNow",function(){this.viewer.haveDisplay&&"undefined"!=typeof Jmol&&Jmol._repaint&&Jmol._repaint(this.viewer.applet,!0)},"~S");e(c$,"repaintDone",function(){this.repaintPending=!1});e(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");b(c$,"getRenderer",function(a){if(null!=this.renderers[a])return this.renderers[a];var c=J.viewer.JC.getShapeClassName(a,
!0)+"Renderer";try{var d=Class.forName(c).newInstance();d.setViewerG3dShapeID(this.viewer,a);return this.renderers[a]=d}catch(b){if(y(b,Exception))return J.util.Logger.errorEx("Could not instantiate renderer:"+c,b),null;throw b;}},"~N");e(c$,"render",function(a,c,d,b){var f=this.viewer.getBoolean(603979934);try{a.renderBackground(null);if(d){this.bsTranslucent.clearAll();null!=b&&a.renderCrossHairs(b,this.viewer.getScreenWidth(),this.viewer.getScreenHeight(),this.viewer.getNavigationOffset(),this.viewer.getNavigationDepthPercent());
var g=this.viewer.getRubberBandSelection();null!=g&&a.setColix(this.viewer.getColixRubberband())&&a.drawRect(g.x,g.y,0,0,g.width,g.height)}null==this.renderers&&(this.renderers=Array(36));b=null;for(g=0;36>g&&a.currentlyRendering();++g){var e=this.shapeManager.getShape(g);null!=e&&(f&&(b="rendering "+J.viewer.JC.getShapeClassName(g,!1),J.util.Logger.startTimer(b)),(d||this.bsTranslucent.get(g))&&this.getRenderer(g).renderShape(a,c,e)&&this.bsTranslucent.set(g),f&&J.util.Logger.checkTimer(b,!1))}a.renderAllStrings(null)}catch(l){if(y(l,
Exception))this.viewer.isJS||l.printStackTrace(),J.util.Logger.error("rendering error? "+l);else throw l;}},"J.util.GData,J.modelset.ModelSet,~B,~A");e(c$,"renderExport",function(a,c,d){a=this.viewer.getBoolean(603979934);this.viewer.finalizeTransformParameters();this.shapeManager.finalizeAtoms(null,null);this.shapeManager.transformAtoms();var b=this.viewer.initializeExporter(d);if(null==b)return J.util.Logger.error("Cannot export "+d.get("type")),null;b.renderBackground(b);null==this.renderers&&
(this.renderers=Array(36));d=null;for(var f=0;36>f;++f){var g=this.shapeManager.getShape(f);null!=g&&(a&&(d="rendering "+J.viewer.JC.getShapeClassName(f,!1),J.util.Logger.startTimer(d)),this.getRenderer(f).renderShape(b,c,g),a&&J.util.Logger.checkTimer(d,!1))}b.renderAllStrings(b);return b.finalizeOutput()},"J.util.GData,J.modelset.ModelSet,java.util.Map")});p("J.render");q(null,"J.render.ShapeRenderer",["J.viewer.JC"],function(){c$=u(function(){this.shape=this.modelSet=this.g3d=this.viewer=null;
this.exportType=this.madEnd=this.madMid=this.madBeg=this.mad=this.colix=this.shapeID=this.myVisibilityFlag=0;this.isExport=!1;t(this,arguments)},J.render,"ShapeRenderer");b(c$,"initRenderer",function(){});b(c$,"setViewerG3dShapeID",function(a,c){this.viewer=a;this.shapeID=c;this.myVisibilityFlag=J.viewer.JC.getShapeVisibilityFlag(c);this.initRenderer()},"J.viewer.Viewer,~N");b(c$,"renderShape",function(a,c,d){this.g3d=a;this.modelSet=c;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,J.modelset.ModelSet,J.shape.Shape")});p("J.render");q(["J.render.FontLineShapeRenderer","JU.BS","$.P3","$.V3"],"J.render.SticksRenderer",["java.lang.Float","J.constant.EnumPalette","J.modelset.Bond","J.util.C","$.JmolEdge"],function(){c$=u(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;t(this,arguments)},J.render,"SticksRenderer",J.render.FontLineShapeRenderer);N(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)});e(c$,"render",function(){var a=this.modelSet.bonds;if(null==a)return!1;(this.isPass2=this.g3d.isPass2())||this.bsForPass2.clearAll();this.slabbing=this.viewer.getSlabEnabled();this.slabByAtom=this.viewer.getBoolean(603979938);this.endcaps=3;this.dashDots=this.viewer.getBoolean(603979889)?J.render.FontLineShapeRenderer.sixdots:J.render.FontLineShapeRenderer.dashes;this.multipleBondSpacing=
this.viewer.getFloat(570425370);this.isCartesianExport=1==this.exportType;0==this.multipleBondSpacing&&this.isCartesianExport&&(this.multipleBondSpacing=0.2);this.multipleBondRadiusFactor=this.viewer.getFloat(570425369);this.modeMultipleBond=this.viewer.getModeMultipleBond();this.showMultipleBonds=0!=this.multipleBondSpacing&&0!=this.modeMultipleBond&&this.viewer.getBoolean(603979928);this.wireframeOnly=!this.viewer.checkMotionRendering(1678770178);this.ssbondsBackbone=this.viewer.getBoolean(603979952);
this.hbondsBackbone=this.viewer.getBoolean(603979852);this.bondsBackbone=(new Boolean(this.hbondsBackbone|this.ssbondsBackbone)).valueOf();this.hbondsSolid=this.viewer.getBoolean(603979854);this.isAntialiased=this.g3d.isAntialiased();var c=!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.modelSet.bondCount;0<=--d;)this.bond=a[d],0!=(this.bond.getShapeVisibilityFlags()&this.myVisibilityFlag)&&
this.renderBond()&&(c=!0,this.bsForPass2.set(d));return c});b(c$,"renderBond",function(){var a,c;this.a=a=this.bond.getAtom1();this.b=c=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&&J.modelset.Bond.isOrderH(d)&&(this.a=this.a.getGroup().getLeadAtomOr(this.a),this.b=this.b.getGroup().getLeadAtomOr(this.b)));if(!this.isPass2&&
(!this.a.isInFrame()||!this.b.isInFrame()||!this.g3d.isInDisplayRange(this.a.sX,this.a.sY)||!this.g3d.isInDisplayRange(this.b.sX,this.b.sY)||this.modelSet.isAtomHidden(this.a.getIndex())||this.modelSet.isAtomHidden(this.b.getIndex()))||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=c.getColix();2==((this.colix=this.bond.colix)&-30721)?(this.colix&=30720,this.colixA=J.util.C.getColixInherited(this.colix|this.viewer.getColixAtomPalette(a,J.constant.EnumPalette.CPK.id),this.colixA),this.colixB=J.util.C.getColixInherited(this.colix|this.viewer.getColixAtomPalette(c,J.constant.EnumPalette.CPK.id),this.colixB)):(this.colixA=J.util.C.getColixInherited(this.colix,this.colixA),this.colixB=J.util.C.getColixInherited(this.colix,this.colixB));a=!1;if(!this.isExport&&!this.isPass2){c=
!J.util.C.isColixTranslucent(this.colixA);var b=!J.util.C.isColixTranslucent(this.colixB);if(!c||!b){if(!c&&!b&&!a)return this.g3d.setColix(!c?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||0!=(this.bondOrder&65536))))this.bondOrder=1;c=0;switch(this.bondOrder){case 1:case 2:case 3:case 4:break;case 17:case 513:this.bondOrder=
1;c=513==d?0:1;break;case 515:case 514:this.bondOrder=2;c=515==d?this.getAromaticDottedBondMask():0;break;default:0!=(this.bondOrder&224)?(this.bondOrder=J.util.JmolEdge.getPartialBondOrder(d),c=J.util.JmolEdge.getPartialBondDotted(d)):J.modelset.Bond.isOrderH(this.bondOrder)?(this.bondOrder=1,this.hbondsSolid||(c=-1)):32768==this.bondOrder&&(this.bondOrder=1)}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.viewer.scaleToScreen(m((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(c){case -1:this.drawDashed(this.xA,this.yA,this.zA,this.xB,this.yB,this.zB,J.render.FontLineShapeRenderer.hDashes);break;default:this.drawBond(c)}return a});b(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 c=0==this.dx&&0==this.dy;if(!c||!this.asLineOnly){var d=1<this.bondOrder&&0<this.multipleBondSpacing,b=d&&(null!=this.viewer.getHybridizationAndAxes(this.a.index,this.z,this.x,"pz")||null!=this.viewer.getHybridizationAndAxes(this.b.index,this.z,this.x,"pz"))&&!Float.isNaN(this.x.x);if(c&&!d){a=m(this.width/8)+3;a=this.width+a;d=this.yA-m((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(c=0!=(a&1),1==this.bondOrder)c?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){b||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&&!c?this.g3d.drawBond(this.p1,this.p2,this.colixA,this.colixB,this.endcaps,this.mad,-2):(this.viewer.transformPtScr(this.p1,this.s1),
this.viewer.transformPtScr(this.p2,this.s2),c?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,c=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");b(c$,"resetAxisCoordinates",function(){var a=this.mag2d>>3;-1!=this.multipleBondSpacing&&0>this.multipleBondSpacing&&(a*=-this.multipleBondSpacing);a=this.width+a;this.dxStep=m(a*this.dy/this.mag2d);this.dyStep=m(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-=m(this.dxStep*a/2);this.yAxis1-=m(this.dyStep*a/2);this.xAxis2-=m(this.dxStep*a/2);this.yAxis2-=m(this.dyStep*a/2)});b(c$,"stepAxisCoordinates",function(){this.xAxis1+=this.dxStep;this.yAxis1+=this.dyStep;this.xAxis2+=this.dxStep;this.yAxis2+=this.dyStep});b(c$,"getAromaticDottedBondMask",function(){var a=this.b.findAromaticNeighbor(this.a.getIndex());return null==a?1:0>this.dx*(a.sY-this.yA)-
this.dy*(a.sX-this.xA)?2:1})});p("J.script");q(["J.script.T"],"J.script.ContextToken",["java.util.Hashtable","J.script.SV"],function(){c$=u(function(){this.name0=this.contextVariables=null;t(this,arguments)},J.script,"ContextToken",J.script.T);c$.newContext=b(c$,"newContext",function(a){a=a?J.script.ContextToken.newCmd(1276383749,"{"):J.script.ContextToken.newCmd(1276383249,"}");a.intValue=0;return a},"~B");c$.newCmd=b(c$,"newCmd",function(a,c){var d=new J.script.ContextToken;d.tok=a;d.value=c;return d},
"~N,~O");b(c$,"addName",function(a){null==this.contextVariables&&(this.contextVariables=new java.util.Hashtable);this.contextVariables.put(a,J.script.SV.newS("").setName(a))},"~S")});p("J.script");c$=u(function(){this.aatoken=null;this.chk=this.allowJSThreads=!1;this.contextPath=" >> ";this.contextVariables=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.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;t(this,
arguments)},J.script,"ScriptContext");w(c$,function(){this.id=++J.script.ScriptContext.contextCount});B(c$,"contextCount",0);p("J.script");q(["java.lang.Exception"],"J.script.ScriptException",null,function(){c$=u(function(){this.untranslated=this.message=this.eval=null;t(this,arguments)},J.script,"ScriptException",Exception);w(c$,function(a,c,d,b){R(this,J.script.ScriptException,[]);this.eval=a;this.message=c;b&&this.eval.setException(this,c,d)},"J.api.JmolScriptEvaluator,~S,~S,~B");b(c$,"getErrorMessageUntranslated",
function(){return this.untranslated});e(c$,"toString",function(){return this.message})});p("J.script");q(["javajs.api.JSONEncodable","J.script.T","JU.P3"],"J.script.SV","java.lang.Boolean $.Float java.util.Arrays $.Collections $.Hashtable $.Map JU.BS $.List $.M3 $.M4 $.P4 $.PT $.SB $.V3 J.modelset.BondSet J.util.BSUtil $.Escape $.Measure $.Quaternion $.Txt".split(" "),function(){c$=u(function(){this.index=2147483647;this.flags=2;this.myName=null;la("J.script.SV.Sort")||J.script.SV.$SV$Sort$();t(this,
arguments)},J.script,"SV",J.script.T,javajs.api.JSONEncodable);c$.newV=b(c$,"newV",function(a,c){var d=new J.script.SV;d.tok=a;d.value=c;return d},"~N,~O");c$.newI=b(c$,"newI",function(a){var c=new J.script.SV;c.tok=2;c.intValue=a;return c},"~N");c$.newS=b(c$,"newS",function(a){return J.script.SV.newV(4,a)},"~S");c$.newT=b(c$,"newT",function(a){return J.script.SV.newSV(a.tok,a.intValue,a.value)},"J.script.T");c$.newSV=b(c$,"newSV",function(a,c,d){a=J.script.SV.newV(a,d);a.intValue=c;return a},"~N,~N,~O");
c$.sizeOf=b(c$,"sizeOf",function(a){switch(null==a?0:a.tok){case 10:return J.util.BSUtil.cardinalityOf(J.script.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 4:return a.value.length;case 7:return 2147483647==a.intValue?a.getList().size():J.script.SV.sizeOf(J.script.SV.selectItemTok(a,-2147483648));case 6:return a.value.size();default:return 0}},"J.script.T");c$.isVariableType=b(c$,"isVariableType",
function(a){return s(a,J.script.SV)||s(a,JU.BS)||s(a,Boolean)||s(a,Float)||s(a,Integer)||s(a,String)||s(a,JU.P3)||s(a,JU.V3)||s(a,JU.P4)||s(a,J.util.Quaternion)||s(a,java.util.Map)||J.script.SV.isArray(a)},"~O");c$.getVariable=b(c$,"getVariable",function(a){return null==a?J.script.SV.newS(""):s(a,J.script.SV)?a:s(a,Boolean)?J.script.SV.getBoolean(a.booleanValue()):s(a,Integer)?J.script.SV.newI(a.intValue()):s(a,Float)?J.script.SV.newV(3,a):s(a,String)?(a=J.script.SV.unescapePointOrBitsetAsVariable(a),
s(a,J.script.SV)?a:J.script.SV.newV(4,a)):s(a,JU.P3)?J.script.SV.newV(8,a):s(a,JU.V3)?J.script.SV.newV(8,JU.P3.newP(a)):s(a,JU.BS)?J.script.SV.newV(10,a):s(a,JU.P4)?J.script.SV.newV(9,a):s(a,J.util.Quaternion)?J.script.SV.newV(9,a.toPoint4f()):s(a,JU.M3)?J.script.SV.newV(11,a):s(a,JU.M4)?J.script.SV.newV(12,a):s(a,java.util.Map)?J.script.SV.getVariableMap(a):s(a,JU.List)?J.script.SV.getVariableList(a):J.util.Escape.isAV(a)?J.script.SV.getVariableAV(a):JU.PT.isAI(a)?J.script.SV.getVariableAI(a):JU.PT.isAB(a)?
J.script.SV.getVariableAB(a):JU.PT.isAF(a)?J.script.SV.getVariableAF(a):JU.PT.isAD(a)?J.script.SV.getVariableAD(a):JU.PT.isAS(a)?J.script.SV.getVariableAS(a):JU.PT.isAP(a)?J.script.SV.getVariableAP(a):JU.PT.isAII(a)?J.script.SV.getVariableAII(a):JU.PT.isAFF(a)?J.script.SV.getVariableAFF(a):JU.PT.isAFloat(a)?J.script.SV.newV(13,a):J.script.SV.newS(J.util.Escape.toReadable(null,a))},"~O");c$.isArray=b(c$,"isArray",function(a){return s(a,Array)},"~O");c$.getVariableMap=b(c$,"getVariableMap",function(a){for(var c=
a,d=null,b,f=c.values().iterator();f.hasNext()&&((b=f.next())||1);){d=b;break}if(!s(d,J.script.SV)){a=new java.util.Hashtable;for(var g,c=c.entrySet().iterator();c.hasNext()&&((g=c.next())||1);)b=g.getKey(),d=g.getValue(),a.put(b,J.script.SV.isVariableType(d)?J.script.SV.getVariable(d):J.script.SV.newV(4,J.util.Escape.toReadable(null,d)))}return J.script.SV.newV(6,a)},"java.util.Map");c$.getVariableList=b(c$,"getVariableList",function(a){var c=a.size();if(0<c&&s(a.get(0),J.script.SV))return J.script.SV.newV(7,
a);for(var d=new JU.List,b=0;b<c;b++)d.addLast(J.script.SV.getVariable(a.get(b)));return J.script.SV.newV(7,d)},"JU.List");c$.getVariableAV=b(c$,"getVariableAV",function(a){for(var c=new JU.List,d=0;d<a.length;d++)c.addLast(a[d]);return J.script.SV.newV(7,c)},"~A");c$.getVariableAD=b(c$,"getVariableAD",function(a){for(var c=new JU.List,d=0;d<a.length;d++)c.addLast(J.script.SV.newV(3,Float.$valueOf(a[d])));return J.script.SV.newV(7,c)},"~A");c$.getVariableAS=b(c$,"getVariableAS",function(a){for(var c=
new JU.List,d=0;d<a.length;d++)c.addLast(J.script.SV.newV(4,a[d]));return J.script.SV.newV(7,c)},"~A");c$.getVariableAP=b(c$,"getVariableAP",function(a){for(var c=new JU.List,d=0;d<a.length;d++)c.addLast(J.script.SV.newV(8,a[d]));return J.script.SV.newV(7,c)},"~A");c$.getVariableAFF=b(c$,"getVariableAFF",function(a){for(var c=new JU.List,d=0;d<a.length;d++)c.addLast(J.script.SV.getVariableAF(a[d]));return J.script.SV.newV(7,c)},"~A");c$.getVariableAII=b(c$,"getVariableAII",function(a){for(var c=new JU.List,
d=0;d<a.length;d++)c.addLast(J.script.SV.getVariableAI(a[d]));return J.script.SV.newV(7,c)},"~A");c$.getVariableAF=b(c$,"getVariableAF",function(a){for(var c=new JU.List,d=0;d<a.length;d++)c.addLast(J.script.SV.newV(3,Float.$valueOf(a[d])));return J.script.SV.newV(7,c)},"~A");c$.getVariableAI=b(c$,"getVariableAI",function(a){for(var c=new JU.List,d=0;d<a.length;d++)c.addLast(J.script.SV.newI(a[d]));return J.script.SV.newV(7,c)},"~A");c$.getVariableAB=b(c$,"getVariableAB",function(a){for(var c=new JU.List,
d=0;d<a.length;d++)c.addLast(J.script.SV.newI(a[d]));return J.script.SV.newV(7,c)},"~A");b(c$,"setv",function(a,c){this.index=a.index;this.intValue=a.intValue;this.tok=a.tok;this.value=a.value;if(c)switch(this.tok){case 6:this.value=new java.util.Hashtable(a.value);break;case 7:for(var d=new JU.List,b=a.getList(),f=0;f<b.size();f++)d.addLast(b.get(f));this.value=d}return this},"J.script.SV,~B");b(c$,"setName",function(a){this.myName=a;this.flags|=1;return this},"~S");b(c$,"setGlobal",function(){this.flags&=
-3;return this});b(c$,"canIncrement",function(){return J.script.T.tokAttr(this.flags,1)});b(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:this.value=J.script.SV.nValue(this),s(this.value,Integer)?(this.tok=2,this.intValue=this.value.intValue()):this.tok=3}return!0},"~N");b(c$,"asBoolean",function(){return J.script.SV.bValue(this)});b(c$,"asInt",function(){return J.script.SV.iValue(this)});
b(c$,"asFloat",function(){return J.script.SV.fValue(this)});b(c$,"asString",function(){return J.script.SV.sValue(this)});c$.oValue=b(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 J.script.SV.selectItemVar(a).value;default:return a.value}},"J.script.SV");c$.nValue=b(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(J.script.SV.toFloat(a.value));a=z(J.script.SV.toFloat(a.value));break;default:a=0}return Integer.$valueOf(a)},"J.script.T");c$.bValue=b(c$,"bValue",function(a){switch(null==a?0:a.tok){case 1048589:case 6:return!0;case 1048588:return!1;case 2:return 0!=a.intValue;case 3:case 4:case 7:return 0!=J.script.SV.fValue(a);case 10:return 0!=J.script.SV.iValue(a);case 8:case 9:case 11:case 12:return 1E-4<Math.abs(J.script.SV.fValue(a));default:return!1}},
"J.script.T");c$.iValue=b(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(J.script.SV.fValue(a));case 10:return J.util.BSUtil.cardinalityOf(J.script.SV.bsSelectToken(a));default:return 0}},"J.script.T");c$.fValue=b(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 J.script.SV.toFloat(J.script.SV.sValue(a));case 10:return J.script.SV.iValue(a);case 8:return a.value.length();case 9:return J.util.Measure.distanceToPlane(a.value,J.script.SV.pt0);case 11:var c=new JU.P3;a.value.transform(c);return c.length();case 12:return c=new JU.P3,a.value.transform(c),c.length();default:return 0}},"J.script.T");c$.sValue=b(c$,"sValue",function(a){if(null==a)return"";var c,d;switch(a.tok){case 1048589:return"true";case 1048588:return"false";
case 2:return""+a.intValue;case 10:return c=J.script.SV.bsSelectToken(a),s(a.value,J.modelset.BondSet)?J.util.Escape.eBond(c):J.util.Escape.eBS(c);case 7:if(d=a.getList(),c=a.intValue,0>=c&&(c=d.size()-c),2147483647!=c)return 1>c||c>d.size()?"":J.script.SV.sValue(d.get(c-1));case 6:return c=new JU.SB,d=new java.util.Hashtable,J.script.SV.sValueArray(c,a,d,0,!1),c.toString();case 4:return d=a.value,c=a.intValue,0>=c&&(c=d.length-c),2147483647==c?d:1>c||c>d.length?"":""+d.charAt(c-1);case 8:return J.util.Escape.eP(a.value);
case 9:return J.util.Escape.eP4(a.value);case 11:case 12:return J.util.Escape.e(a.value);default:return a.value.toString()}},"J.script.T");c$.sValueArray=b(c$,"sValueArray",function(a,c,d,b,f){switch(c.tok){case 6:if(d.containsKey(c)){a.append(f?"{}":null==c.myName?"<circular reference>":"<"+c.myName+">");break}d.put(c,Boolean.TRUE);var g=c.value;c=g.keySet();var e=g.keySet().toArray(Array(c.size()));java.util.Arrays.sort(e);if(f){a.append("{ ");f="";for(c=0;c<e.length;c++){var l=e[c];a.append(f).append(J.util.Escape.eS(l)).appendC(":");
J.script.SV.sValueArray(a,g.get(l),d,b+1,!0);f=", "}a.append(" }");break}for(c=0;c<e.length;c++){a.append(e[c]).append("\t:");var l=g.get(e[c]),j=new JU.SB;J.script.SV.sValueArray(j,l,d,b+1,f);l=j.toString();a.append(0<=l.indexOf("\n")?"\n":"\t");a.append(l).append("\n")}break;case 7:if(d.containsKey(c)){a.append(f?"[]":null==c.myName?"<circular reference>":"<"+c.myName+">");break}d.put(c,Boolean.TRUE);f&&a.append("[");g=c.getList();for(c=0;c<g.size();c++)f&&0<c&&a.append(","),e=g.get(c),J.script.SV.sValueArray(a,
e,d,b+1,f),f||a.append("\n");f&&a.append("]");break;default:if(!f)for(d=0;d<b-1;d++)a.append("\t");a.append(f?c.escape():J.script.SV.sValue(c))}},"JU.SB,J.script.SV,java.util.Map,~N,~B");c$.ptValue=b(c$,"ptValue",function(a){switch(a.tok){case 8:return a.value;case 4:if(a=J.util.Escape.uP(a.value),s(a,JU.P3))return a}return null},"J.script.SV");c$.pt4Value=b(c$,"pt4Value",function(a){switch(a.tok){case 9:return a.value;case 4:a=J.util.Escape.uP(a.value);if(!s(a,JU.P4))break;return a}return null},
"J.script.SV");c$.toFloat=b(c$,"toFloat",function(a){return a.equalsIgnoreCase("true")?1:a.equalsIgnoreCase("false")||0==a.length?0:JU.PT.parseFloatStrict(a)},"~S");c$.concatList=b(c$,"concatList",function(a,c,d){var b=a.getList(),f=c.getList();if(!d){if(null==f)b.addLast(J.script.SV.newT(c));else for(d=0;d<f.size();d++)b.addLast(f.get(d));return a}var g=new JU.List;if(null==b)g.addLast(a);else for(d=0;d<b.size();d++)g.addLast(b.get(d));if(null==f)g.addLast(c);else for(d=0;d<f.size();d++)g.addLast(f.get(d));
return J.script.SV.getVariableList(g)},"J.script.SV,J.script.SV,~B");c$.bsSelectToken=b(c$,"bsSelectToken",function(a){a=J.script.SV.selectItemTok(a,-2147483648);return a.value},"J.script.T");c$.bsSelectVar=b(c$,"bsSelectVar",function(a){2147483647==a.index&&(a=J.script.SV.selectItemVar(a));return a.value},"J.script.SV");c$.bsSelectRange=b(c$,"bsSelectRange",function(a,c){a=J.script.SV.selectItemTok(a,-2147483648);a=J.script.SV.selectItemTok(a,0>=c?c:1);a=J.script.SV.selectItemTok(a,0>=c?2147483646:
c);return a.value},"J.script.T,~N");c$.selectItemVar=b(c$,"selectItemVar",function(a){return 2147483647!=a.index||7==a.tok&&2147483647==a.intValue?a:J.script.SV.selectItemTok(a,-2147483648)},"J.script.SV");c$.selectItemTok=b(c$,"selectItemTok",function(a,c){switch(a.tok){case 11:case 12:case 10:case 7:case 4:break;default:return a}var d=null,b=null,f=a.intValue;if(2147483647==f)return-2147483648==c&&(c=f),J.script.SV.newSV(a.tok,c,a.value);var g=0,e=s(a,J.script.SV)&&2147483647!=a.index,l=J.script.SV.newSV(a.tok,
2147483647,null);switch(a.tok){case 10:s(a.value,J.modelset.BondSet)?(d=new J.modelset.BondSet(a.value,a.value.getAssociatedAtoms()),g=J.util.BSUtil.cardinalityOf(d)):(d=J.util.BSUtil.copy(a.value),g=e?1:J.util.BSUtil.cardinalityOf(d));break;case 7:g=a.getList().size();break;case 4:b=a.value;g=b.length;break;case 11:g=-3;break;case 12:g=-4}if(0>g){g=-g;if(0<f&&Math.abs(f)>g)return l=f%10,f=m((f-l)/10),0<l&&l<=g&&f<=g?J.script.SV.newV(3,Float.$valueOf(a.value.getElement(f-1,l-1))):J.script.SV.newV(4,
"");if(Math.abs(f)>g)return J.script.SV.newV(4,"");l=M(g,0);0>f?a.value.getColumn(-1-f,l):a.value.getRow(f-1,l);return-2147483648==c?J.script.SV.getVariableAF(l):1>c||c>g?J.script.SV.newV(4,""):J.script.SV.newV(3,Float.$valueOf(l[c-1]))}0>=f&&(f=g+f);1>f&&(f=1);0==c?c=g:0>c&&(c=g+c);c>g?c=g:c<f&&(c=f);switch(a.tok){case 10:l.value=d;if(e){1<f&&d.clearAll();break}g=0;for(b=d.nextSetBit(0);0<=b;b=d.nextSetBit(b+1))(++g<f||g>c)&&d.clear(b);break;case 4:l.value=1>f||f>g?"":b.substring(f-1,c);break;case 7:if(1>
f||f>g||c>g)return J.script.SV.newV(4,"");if(c==f)return a.getList().get(f-1);d=new JU.List;b=a.getList();g=c-f+1;for(e=0;e<g;e++)d.addLast(J.script.SV.newT(b.get(e+f-1)));l.value=d}return l},"J.script.T,~N");b(c$,"setSelectedValue",function(a,c){if(2147483647==a)return!1;var d;switch(this.tok){case 11:case 12:d=11==this.tok?3:4;if(10<a){var b=a%10,f=m((a-b)/10);if(0<b&&b<=d&&f<=d)return this.value.setElement(f-1,b-1,J.script.SV.fValue(c)),!0}if(0!=a&&(Math.abs(a)<=d&&7==c.tok)&&(b=c.getList(),b.size()==
d)){for(var f=M(d,0),g=0;g<d;g++)f[g]=J.script.SV.fValue(b.get(g));0<a?11==this.tok?this.value.setRowA(a-1,f):this.value.setRow(a-1,f):11==this.tok?this.value.setColumnA(-1-a,f):this.value.setColumn(-1-a,f);return!0}break;case 4:d=this.value;b=d.length;0>=a&&(a=b+a);for(0>--a&&(a=0);a>=d.length;)d+=" ";this.value=d.substring(0,a)+J.script.SV.sValue(c)+d.substring(a+1);return!0;case 7:d=this.getList().size();0>=a&&(a=d+a);0>--a&&(a=0);if(d<=a)for(g=d;g<=a;g++)this.getList().addLast(J.script.SV.newV(4,
""));this.getList().set(a,c);return!0}return!1},"~N,J.script.SV");b(c$,"escape",function(){switch(this.tok){case 4:return J.util.Escape.eS(this.value);case 7:case 6:var a=new JU.SB,c=new java.util.Hashtable;J.script.SV.sValueArray(a,this,c,0,!0);return a.toString();default:return J.script.SV.sValue(this)}});c$.unescapePointOrBitsetAsVariable=b(c$,"unescapePointOrBitsetAsVariable",function(a){if(null==a)return a;var c=null,d=null;if(s(a,J.script.SV))switch(a.tok){case 8:case 9:case 11:case 12:case 10:c=
a.value;break;case 4:d=a.value;break;default:d=J.script.SV.sValue(a)}else s(a,String)&&(d=a);if(null!=d&&0==d.length)return d;null==c&&(c=J.util.Escape.uABsM(d));return s(c,JU.P3)?J.script.SV.newV(8,c):s(c,JU.P4)?J.script.SV.newV(9,c):s(c,JU.BS)?(null!=d&&0==d.indexOf("[{")&&(c=new J.modelset.BondSet(c)),J.script.SV.newV(10,c)):s(c,JU.M3)?J.script.SV.newV(11,c):s(c,JU.M4)?J.script.SV.newV(12,c):a},"~O");c$.getBoolean=b(c$,"getBoolean",function(a){return J.script.SV.newT(a?J.script.SV.vT:J.script.SV.vF)},
"~B");c$.sprintf=b(c$,"sprintf",function(a,c){if(null==c)return a;var d=0<=a.indexOf("d")||0<=a.indexOf("i")?D(1,0):null,b=0<=a.indexOf("f")?M(1,0):null,f=0<=a.indexOf("e")?sa(1,0):null,g=0<=a.indexOf("s"),e=0<=a.indexOf("p")&&8==c.tok,l=0<=a.indexOf("q")&&9==c.tok,j=[d,b,f,null,null,null];if(7!=c.tok)return J.script.SV.sprintf(a,c,j,d,b,f,g,e,l);for(var k=c.getList(),m=Array(k.size()),p=0;p<m.length;p++)m[p]=J.script.SV.sprintf(a,k.get(p),j,d,b,f,g,e,l);return m},"~S,J.script.SV");c$.sprintf=b(c$,
"sprintf",function(a,c,d,b,f,g,e,l,j){null!=b&&(b[0]=J.script.SV.iValue(c));null!=f&&(f[0]=J.script.SV.fValue(c));null!=g&&(g[0]=J.script.SV.fValue(c));e&&(d[3]=J.script.SV.sValue(c));l&&(d[4]=c.value);j&&(d[5]=c.value);return J.util.Txt.sprintf(a,"IFDspq",d)},"~S,J.script.SV,~A,~A,~A,~A,~B,~B,~B");c$.sprintfArray=b(c$,"sprintfArray",function(a){switch(a.length){case 0:return"";case 1:return J.script.SV.sValue(a[0])}var c=JU.PT.split(JU.PT.simpleReplace(J.script.SV.sValue(a[0]),"%%","\u0001"),"%"),
d=new JU.SB;d.append(c[0]);for(var b=1;b<c.length;b++){var f=J.script.SV.sprintf(J.util.Txt.formatCheck("%"+c[b]),b<a.length?a[b]:null);if(JU.PT.isAS(f))for(var g=0;g<f.length;g++)d.append(f[g]).append("\n");else d.append(f)}return d.toString()},"~A");e(c$,"toString",function(){return this.toString2()+"["+this.myName+" index ="+this.index+" intValue="+this.intValue+"]"});c$.getBitSet=b(c$,"getBitSet",function(a,c){switch(a.tok){case 10:return J.script.SV.bsSelectVar(a);case 7:for(var d=new JU.BS,
b=a.value,f=0;f<b.size();f++)if(!b.get(f).unEscapeBitSetArray(d)&&c)return null;return d}return c?null:new JU.BS},"J.script.SV,~B");c$.areEqual=b(c$,"areEqual",function(a,c){return null==a||null==c?!1:4==a.tok&&4==c.tok?J.script.SV.sValue(a).equalsIgnoreCase(J.script.SV.sValue(c)):8==a.tok&&8==c.tok||9==a.tok&&9==c.tok?1E-6>a.value.distance(c.value):1E-6>Math.abs(J.script.SV.fValue(a)-J.script.SV.fValue(c))},"J.script.SV,J.script.SV");b(c$,"sortOrReverse",function(a){var c=this.getList();if(null!=
c&&1<c.size())if(-2147483648==a){a=c.size();for(var d=0;d<a;d++){var b=c.get(d);c.set(d,c.get(--a));c.set(a,b)}}else java.util.Collections.sort(this.getList(),ka(J.script.SV.Sort,this,null,--a));return this},"~N");b(c$,"pushPop",function(a){var c=this.getList();if(null==a||null==c)return null==c||0==c.size()?J.script.SV.newS(""):c.remove(c.size()-1);c.addLast(J.script.SV.getVariable(J.script.SV.selectItemVar(a).value));return this},"J.script.SV");b(c$,"unEscapeBitSetArray",function(a){switch(this.tok){case 4:var c=
J.util.Escape.uB(this.value);if(null==c)break;a.or(c);return!0;case 10:return a.or(this.value),!0}return!1},"JU.BS");c$.unEscapeBitSetArray=b(c$,"unEscapeBitSetArray",function(a,c){for(var d=new JU.BS,b=0;b<a.size();b++)if(!a.get(b).unEscapeBitSetArray(d)&&c)return null;return d},"java.util.ArrayList,~B");c$.listValue=b(c$,"listValue",function(a){if(7!=a.tok)return[J.script.SV.sValue(a)];a=a.getList();for(var c=Array(a.size()),d=a.size();0<=--d;)c[d]=J.script.SV.sValue(a.get(d));return c},"J.script.T");
c$.flistValue=b(c$,"flistValue",function(a,c){if(7!=a.tok)return[J.script.SV.fValue(a)];var d=a.getList(),b;b=M(Math.max(c,d.size()),0);0==c&&(c=b.length);for(var f=Math.min(d.size(),c);0<=--f;)b[f]=J.script.SV.fValue(d.get(f));return b},"J.script.T,~N");b(c$,"toArray",function(){var a,c=null,d=null;switch(this.tok){case 11:c=this.value;a=3;break;case 12:d=this.value;a=4;break;default:return}this.tok=7;for(var b=new JU.List,f=0;f<a;f++){var g=M(a,0);null==c?d.getRow(f,g):c.getRow(f,g);b.set(f,J.script.SV.getVariableAF(g))}this.value=
b});b(c$,"mapValue",function(a){return 6==this.tok?this.value.get(a):null},"~S");b(c$,"getList",function(){return 7==this.tok?this.value:null});c$.isScalar=b(c$,"isScalar",function(a){switch(a.tok){case 7:return!1;case 4:return 0>a.value.indexOf("\n");default:return!0}},"J.script.SV");e(c$,"toJSON",function(){switch(this.tok){case 1048589:case 1048588:case 2:case 3:return J.script.SV.sValue(this);default:return JU.PT.toJSON(null,this.value)}});c$.$SV$Sort$=function(){aa();c$=u(function(){ma(this,
arguments);this.arrayPt=0;t(this,arguments)},J.script.SV,"Sort",null,java.util.Comparator);w(c$,function(a){this.arrayPt=a},"~N");e(c$,"compare",function(a,c){if(a.tok!=c.tok){if(3==a.tok||2==a.tok||3==c.tok||2==c.tok){var d=J.script.SV.fValue(a),b=J.script.SV.fValue(c);return d<b?-1:d>b?1:0}if(4==a.tok||4==c.tok)return J.script.SV.sValue(a).compareTo(J.script.SV.sValue(c))}switch(a.tok){case 4:return J.script.SV.sValue(a).compareTo(J.script.SV.sValue(c));case 7:d=a.getList();b=c.getList();if(d.size()!=
b.size())return d.size()<b.size()?-1:1;var f=this.arrayPt;0>f&&(f+=d.size());return 0>f||f>=d.size()?0:this.compare(d.get(f),b.get(f));default:return d=J.script.SV.fValue(a),b=J.script.SV.fValue(c),d<b?-1:d>b?1:0}},"J.script.SV,J.script.SV");c$=$()};c$.vT=c$.prototype.vT=J.script.SV.newSV(1048589,1,"true");c$.vF=c$.prototype.vF=J.script.SV.newSV(1048588,0,"false");B(c$,"FLAG_CANINCREMENT",1,"FLAG_LOCALVAR",2);c$.pt0=c$.prototype.pt0=new JU.P3});p("J.script");q(["java.util.Hashtable"],"J.script.T",
["java.lang.Boolean","java.util.Arrays","JU.AU","$.List","J.util.Logger"],function(){c$=u(function(){this.tok=0;this.value=null;this.intValue=2147483647;t(this,arguments)},J.script,"T");c$.t=b(c$,"t",function(a){var c=new J.script.T;c.tok=a;return c},"~N");c$.tv=b(c$,"tv",function(a,c,d){a=J.script.T.t(a);a.intValue=c;a.value=d;return a},"~N,~N,~O");c$.o=b(c$,"o",function(a,c){var d=J.script.T.t(a);d.value=c;return d},"~N,~O");c$.n=b(c$,"n",function(a,c){var d=J.script.T.t(a);d.intValue=c;return d},
"~N,~N");c$.i=b(c$,"i",function(a){var c=J.script.T.t(2);c.intValue=a;return c},"~N");c$.tokAttr=b(c$,"tokAttr",function(a,c){return(a&c)==(c&c)},"~N,~N");c$.tokAttrOr=b(c$,"tokAttrOr",function(a,c,d){return(a&c)==(c&c)||(a&d)==(d&d)},"~N,~N,~N");c$.getPrecedence=b(c$,"getPrecedence",function(a){return a>>4&15},"~N");c$.getMaxMathParams=b(c$,"getMaxMathParams",function(a){return a>>9&7},"~N");c$.addToken=b(c$,"addToken",function(a,c){J.script.T.tokenMap.put(a,c)},"~S,J.script.T");c$.getTokenFromName=
b(c$,"getTokenFromName",function(a){return J.script.T.tokenMap.get(a)},"~S");c$.getTokFromName=b(c$,"getTokFromName",function(a){a=J.script.T.getTokenFromName(a.toLowerCase());return null==a?0:a.tok},"~S");c$.nameOf=b(c$,"nameOf",function(a){for(var c,d=J.script.T.tokenMap.values().iterator();d.hasNext()&&((c=d.next())||1);)if(c.tok==a)return""+c.value;return"0x"+Integer.toHexString(a)},"~N");e(c$,"toString",function(){return this.toString2()});b(c$,"toString2",function(){return"Token["+J.script.T.astrType[14>
this.tok?this.tok:14]+"("+this.tok%512+"/0x"+Integer.toHexString(this.tok)+")"+(2147483647==this.intValue?"":" intValue="+this.intValue+"(0x"+Integer.toHexString(this.intValue)+")")+(null==this.value?"":s(this.value,String)?' value="'+this.value+'"':" value="+this.value)+"]"});c$.getCommandSet=b(c$,"getCommandSet",function(a){var c="",d=new java.util.Hashtable,b=0;a=null==a||0==a.length?null:a.toLowerCase();for(var f=null!=a&&1<a.length,g,n=J.script.T.tokenMap.entrySet().iterator();n.hasNext()&&((g=
n.next())||1);){var e=g.getKey(),m=g.getValue();0!=(m.tok&4096)&&((null==a||0==e.indexOf(a))&&(f||m.value.equals(e)))&&d.put(e,Boolean.TRUE)}for(n=d.entrySet().iterator();n.hasNext()&&((g=n.next())||1);)if(e=g.getKey(),"s"!=e.charAt(e.length-1)||!d.containsKey(e.substring(0,e.length-1)))c+=(0==b++?"":";")+e;return c},"~S");c$.getAtomPropertiesLike=b(c$,"getAtomPropertiesLike",function(a){a=a.toLowerCase();for(var c=new JU.List,d=0==a.length,b,f=J.script.T.tokenMap.entrySet().iterator();f.hasNext()&&
((b=f.next())||1);){var g=b.getKey();if("_"!=g.charAt(0)){var n=b.getValue();if(J.script.T.tokAttr(n.tok,1078984704)&&(d||g.toLowerCase().startsWith(a))){if(d||!n.value.toLowerCase().startsWith(a))n=J.script.T.o(n.tok,g);c.addLast(n)}}}return 0==c.size()?null:c},"~S");c$.getTokensLike=b(c$,"getTokensLike",function(a){a=a.equals("setparam")?536870912:a.equals("misc")?1073741824:a.equals("mathfunc")?135266304:4096;for(var c=536870912==a?1610612736:0,d=new JU.List,b,f=J.script.T.tokenMap.entrySet().iterator();f.hasNext()&&
((b=f.next())||1);){var g=b.getKey(),n=b.getValue();J.script.T.tokAttr(n.tok,a)&&(0==c||!J.script.T.tokAttr(n.tok,c))&&d.addLast(g)}b=d.toArray(Array(d.size()));java.util.Arrays.sort(b);return b},"~S");c$.getSettableTokFromString=b(c$,"getSettableTokFromString",function(a){a=J.script.T.getTokFromName(a);return 0!=a&&J.script.T.tokAttr(a,2048)&&!J.script.T.tokAttr(a,1141899264)?a:0},"~S");c$.completeCommand=b(c$,"completeCommand",function(a,c,d,b,f){null==a?a=J.script.T.tokenMap:d=!1;var g=new JU.List;
b=b.toLowerCase();var n;for(a=a.keySet().iterator();a.hasNext()&&((n=a.next())||1);)if(n.startsWith(b)){var e=J.script.T.getTokFromName(n);(d?J.script.T.tokAttr(e,4096):c?J.script.T.tokAttr(e,536870912)&&!J.script.T.tokAttr(e,1610612736):1)&&g.addLast(n)}return JU.AU.sortedItem(g,f)},"java.util.Map,~B,~B,~S,~N");c$.getParamType=b(c$,"getParamType",function(a){return!J.script.T.tokAttr(a,536870912)?0:a&662700032},"~N");c$.getTokensType=b(c$,"getTokensType",function(a,c){for(var d,b=J.script.T.tokenMap.entrySet().iterator();b.hasNext()&&
((d=b.next())||1);){var f=d.getValue();J.script.T.tokAttr(f.tok,c)&&a.put(d.getKey(),d.getValue())}},"java.util.Map,~N");c$.isIDcmd=b(c$,"isIDcmd",function(a){switch(a){case 135180:case 135176:case 135174:case 135188:case 135402505:return!0;default:return!1}},"~N");B(c$,"nada",0,"integer",2,"decimal",3,"string",4,"seqcode",5,"hash",6,"varray",7,"point3f",8,"point4f",9,"bitset",10,"matrix3f",11,"matrix4f",12,"listf",13,"keyword",14,"astrType","nada identifier integer decimal string seqcode hash array point point4 bitset matrix3f matrix4f listf keyword".split(" "),
"setparam",536870912,"misc",1073741824,"deprecatedparam",1610612736,"identifier",1073741824,"scriptCommand",4096,"atomExpressionCommand",12288,"implicitStringCommand",20480,"mathExpressionCommand",36864,"flowCommand",102400,"shapeCommand",135168,"noArgs",262144,"defaultON",524288,"expression",1048576,"predefinedset",3145728,"atomproperty",1078984704,"strproperty",1087373312,"intproperty",1095761920,"floatproperty",1112539136,"PROPERTYFLAGS",1137704960,"strparam",545259520,"intparam",553648128,"floatparam",
570425344,"booleanparam",603979776,"paramTypes",662700032,"mathproperty",1141899264,"mathfunc",135266304,"mathop",269484032,"comparator",269484288,"center",12289,"define",1060866,"$delete",12291,"display",1610625028,"fixed",1060869,"hide",12294,"restrict",12295,"subset",3158024,"zap",1060873,"print",36865,"returncmd",36866,"set",1085443,"$var",36868,"log",36869,"echo",537022465,"help",20482,"hover",544771,"message",20485,"pause",20487,"elseif",102402,"elsecmd",364547,"endifcmd",364548,"whilecmd",
102406,"breakcmd",102407,"continuecmd",102408,"end",1150985,"switchcmd",102410,"casecmd",102411,"catchcmd",102412,"defaultcmd",102413,"trycmd",364558,"animation",4097,"assign",4098,"background",1610616835,"bind",4100,"bondorder",4101,"calculate",4102,"capture",4103,"cd",1069064,"centerAt",4105,"connect",4106,"console",528395,"delay",528397,"depth",554176526,"exit",266255,"exitjmol",266256,"font",4114,"frame",4115,"gotocmd",20500,"hbond",1612189718,"history",1610616855,"initialize",266264,"invertSelected",
4121,"loop",528410,"mapProperty",1052700,"minimize",4126,"move",4128,"moveto",4130,"navigate",4131,"parallel",102436,"plot",4133,"process",102439,"quit",266281,"ramachandran",1052714,"redomove",4139,"refresh",266284,"reset",4141,"restore",4142,"resume",266287,"rotate",528432,"rotateSelected",4145,"save",4146,"selectionhalos",1611141171,"show",4148,"slab",554176565,"spin",1611141175,"ssbond",1611141176,"step",266298,"stereo",528443,"sync",4156,"timeout",536875070,"translate",4160,"translateSelected",
4162,"unbind",4164,"undomove",4165,"vibration",4166,"zoom",4168,"zoomTo",4170,"axes",1611272194,"cgo",135174,"dipole",135175,"draw",135176,"frank",1611272202,"isosurface",135180,"lcaocartoon",135182,"measurements",537006096,"mo",1183762,"pmesh",135188,"plot3d",135190,"polyhedra",135192,"struts",1708058,"unitcell",1614417948,"vector",135198,"wireframe",659488,"expressionBegin",1048577,"expressionEnd",1048578,"all",1048579,"branch",1048580,"coord",1048582,"dollarsign",1048583,"per",1048584,"isaromatic",
1048585,"leftbrace",1048586,"none",1048587,"off",1048588,"on",1048589,"rightbrace",1048590,"semicolon",1048591,"spec_alternate",1048607,"spec_atom",1048608,"spec_chain",1048609,"spec_model",1048610,"spec_model2",1048611,"spec_name_pattern",1048612,"spec_resid",1048613,"spec_seqcode",1048614,"spec_seqcode_range",1048615,"amino",3145730,"dna",3145732,"hetero",1613758470,"helixalpha",3145735,"helix310",3145736,"helixpi",3145738,"hydrogen",1613758476,"nucleic",3145742,"protein",3145744,"purine",3145746,
"pyrimidine",3145748,"rna",3145750,"solvent",1613758488,"sidechain",3145754,"surface",3145756,"thismodel",3145758,"sheet",3145760,"spine",3145762,"carbohydrate",3145764,"clickable",3145766,"displayed",3145768,"hidden",3145770,"specialposition",3145772,"visible",3145774,"basemodel",3145776,"nonequivalent",3145778,"leftparen",269484048,"rightparen",269484049,"opIf",806354977,"colon",269484066,"comma",269484080,"leftsquare",269484096,"rightsquare",269484097,"opOr",269484112,"opXor",269484113,"opToggle",
269484114,"opAnd",269484128,"opNot",269484144,"opAND",269484160,"opGT",269484432,"opGE",269484433,"opLE",269484434,"opLT",269484435,"opEQ",269484436,"opNE",269484438,"minus",269484192,"plus",269484193,"divide",269484208,"times",269484209,"percent",269484210,"leftdivide",269484211,"unaryMinus",269484224,"minusMinus",269484225,"plusPlus",269484226,"timestimes",269484227,"propselector",269484241,"andequals",269484242,"minmaxmask",480,"min",32,"max",64,"average",96,"sum",128,"sum2",160,"stddev",192,"selectedfloat",
224,"allfloat",256,"settable",2048,"atoms",1141899265,"bonds",1678770178,"length",1141899267,"lines",1141899268,"reverse",1141899269,"size",1141899270,"type",1141899272,"boundbox",1679429641,"xyz",1146095626,"fracxyz",1146095627,"screenxyz",1146095628,"fuxyz",1146095629,"unitxyz",1146093582,"vibxyz",1146095631,"w",1141899280,"keys",1141899281,"occupancy",1129318401,"radius",1666189314,"structure",1641025539,"atomtype",1087375361,"atomname",1087375362,"altloc",1087373315,"chain",1087373316,"element",
1087375365,"group",1087373318,"group1",1087373319,"sequence",1087373320,"identify",1087373321,"insertion",1087373322,"shape",1087373323,"strucid",1087373324,"symbol",1087375373,"symmetry",1089470478,"atomno",1095763969,"atomid",1095761922,"atomindex",1095761923,"bondcount",1095761924,"cell",1095761925,"centroid",1095761926,"chainno",1095761927,"configuration",1095766024,"elemisono",1095761929,"elemno",1095763978,"formalcharge",1632634891,"groupid",1095761932,"groupindex",1095761933,"model",1095766030,
"modelindex",1095761935,"molecule",1095761936,"polymer",1095761937,"polymerlength",1095761938,"resno",1095761939,"site",1095761940,"strucno",1095761941,"valence",1095763990,"adpmax",1112539137,"adpmin",1112539138,"chemicalshift",1112539139,"covalent",1112539140,"eta",1112539141,"magneticshielding",1112539142,"mass",1112539143,"omega",1112539144,"phi",1112539145,"psi",1112539146,"screenx",1112539147,"screeny",1112539148,"screenz",1112539149,"straightness",1112539150,"surfacedistance",1112539151,"theta",
1112539152,"unitx",1112539153,"unity",1112539154,"unitz",1112539155,"vectorscale",1649410049,"atomx",1112541185,"atomy",1112541186,"atomz",1112541187,"fracx",1112541188,"fracy",1112541189,"fracz",1112541190,"fux",1112541191,"fuy",1112541192,"fuz",1112541193,"ionic",1112541195,"partialcharge",1112541196,"temperature",1112541199,"vibx",1112541202,"viby",1112541203,"vibz",1112541204,"x",1112541205,"y",1112541206,"z",1112541207,"vanderwaals",1649412120,"property",1716520985,"hydrophobic",1114638362,"selected",
1114638363,"backbone",1115297793,"cartoon",1113200642,"dots",1113198595,"ellipsoid",1113198596,"geosurface",1113198597,"halo",1113200646,"meshRibbon",1113200647,"ribbon",1113200649,"rocket",1113200650,"spacefill",1113200651,"star",1113200652,"strands",1650071565,"trace",1113200654,"angle",135266305,"array",135266306,"axisangle",135266307,"color",1766856708,"compare",135270405,"connected",135266310,"data",135270407,"format",1288701960,"$function",135368713,"getproperty",1276121098,"label",1826248715,
"helix",137363468,"measure",1746538509,"now",135266318,"plane",135266319,"point",135266320,"pop",1276383249,"quaternion",135270418,"sort",1276117011,"count",1276117012,"within",135266325,"write",135270422,"cache",135270423,"tensor",1276117016,"modulation",1276121113,"acos",135266819,"sin",135266820,"cos",135266821,"sqrt",135266822,"file",1229984263,"forcmd",135369224,"ifcmd",135369225,"abs",135266826,"javascript",135287308,"div",1276117504,"dot",1276117505,"join",1276117506,"mul",1276117507,"mul3",
1276117508,"push",1276383749,"split",1276117510,"sub",1276117511,"trim",1276117512,"volume",1313866249,"col",1276117514,"row",1276117515,"cross",135267329,"load",135271426,"random",135267332,"script",135271429,"substructure",1238369286,"search",135267335,"smiles",135267336,"contact",135402505,"add",1276118017,"distance",1276118018,"replace",1276118019,"hkl",135267841,"intersection",135267842,"prompt",135304707,"select",135280132,"bin",1276118529,"symop",1297090050,"find",1276118531,"bondmode",1610612737,
"fontsize",1610612738,"measurementnumbers",1610612739,"scale3d",1610612740,"togglelabel",1610612741,"backgroundmodel",536870914,"debug",536870916,"defaultlattice",536870918,"highlight",536870920,"showscript",536870922,"specular",536870924,"trajectory",536870926,"undo",536870928,"usercolorscheme",536870930,"animationmode",545259521,"appletproxy",545259522,"atomtypes",545259524,"axescolor",545259526,"axis1color",545259528,"axis2color",545259530,"axis3color",545259532,"backgroundcolor",545259534,"boundboxcolor",
545259536,"currentlocalpath",545259538,"dataseparator",545259540,"defaultanglelabel",545259542,"defaultlabelpdb",545259543,"defaultlabelxyz",545259544,"defaultcolorscheme",545259545,"defaultdirectory",545259546,"defaultdistancelabel",545259547,"defaultdropscript",545259548,"defaultloadfilter",545259549,"defaultloadscript",545259550,"defaults",545259552,"defaulttorsionlabel",545259554,"defaultvdw",545259555,"edsurlcutoff",545259556,"edsurlformat",545259557,"energyunits",545259558,"filecachedirectory",
545259559,"forcefield",545259560,"helppath",545259561,"hoverlabel",545259562,"language",545259564,"loadformat",545259565,"loadligandformat",545259566,"logfile",545259567,"measurementunits",545259568,"nmrpredictformat",545259569,"nmrurlformat",545259570,"pathforallfiles",545259571,"picking",545259572,"pickingstyle",545259574,"picklabel",545259576,"propertycolorscheme",545259578,"quaternionframe",545259580,"smilesurlformat",545259582,"smiles2dimageformat",545259584,"unitcellcolor",545259586,"axesscale",
570425346,"bondtolerance",570425348,"cameradepth",570425350,"defaultdrawarrowscale",570425352,"defaulttranslucent",570425354,"dipolescale",570425355,"drawfontsize",570425356,"ellipsoidaxisdiameter",570425357,"exportscale",570425358,"gestureswipefactor",570425359,"hbondsangleminimum",570425360,"hbondsdistancemaximum",570425361,"hoverdelay",570425362,"loadatomdatatolerance",570425363,"minbonddistance",570425364,"minimizationcriterion",570425365,"modulationscale",570425366,"mousedragfactor",570425367,
"mousewheelfactor",570425368,"multiplebondradiusfactor",570425369,"multiplebondspacing",570425370,"navfps",570425371,"navigationdepth",570425372,"navigationslab",570425373,"navigationspeed",570425374,"navx",570425376,"navy",570425378,"navz",570425380,"particleradius",570425381,"pointgroupdistancetolerance",570425382,"pointgrouplineartolerance",570425384,"rotationradius",570425388,"scaleangstromsperinch",570425390,"sheetsmoothing",570425392,"slabrange",570425393,"solventproberadius",570425394,"spinfps",
570425396,"spinx",570425398,"spiny",570425400,"spinz",570425402,"starscale",570425403,"stereodegrees",570425404,"strutdefaultradius",570425406,"strutlengthmaximum",570425408,"vibrationperiod",570425412,"vibrationscale",570425414,"visualrange",570425416,"ambientocclusion",553648129,"ambientpercent",553648130,"animationfps",553648132,"axesmode",553648134,"bondradiusmilliangstroms",553648136,"celshadingpower",553648137,"delaymaximumms",553648138,"diffusepercent",553648142,"dotdensity",553648143,"dotscale",
553648144,"ellipsoiddotcount",553648145,"helixstep",553648146,"hermitelevel",553648147,"historylevel",553648148,"isosurfacepropertysmoothingpower",553648149,"loglevel",553648150,"meshscale",553648151,"minimizationsteps",553648152,"minpixelselradius",553648153,"percentvdwatom",553648154,"perspectivemodel",553648155,"phongexponent",553648156,"pickingspinrate",553648157,"platformspeed",553648158,"propertyatomnumberfield",553648159,"propertyatomnumbercolumncount",553648160,"propertydatacolumncount",553648162,
"propertydatafield",553648164,"repaintwaitms",553648165,"ribbonaspectratio",553648166,"scriptreportinglevel",553648168,"smallmoleculemaxatoms",553648170,"specularexponent",553648172,"specularpercent",553648174,"specularpower",553648176,"strandcount",553648178,"strandcountformeshribbon",553648180,"strandcountforstrands",553648182,"strutspacing",553648184,"zdepth",553648186,"zslab",553648188,"zshadepower",553648190,"allowembeddedscripts",603979778,"allowgestures",603979780,"allowkeystrokes",603979781,
"allowmodelkit",603979782,"allowmoveatoms",603979783,"allowmultitouch",603979784,"allowrotateselected",603979785,"antialiasdisplay",603979786,"antialiasimages",603979788,"antialiastranslucent",603979790,"appendnew",603979792,"applysymmetrytobonds",603979794,"atompicking",603979796,"autobond",603979798,"autofps",603979800,"axesmolecular",603979804,"axesorientationrasmol",603979806,"axesunitcell",603979808,"axeswindow",603979810,"bondmodeor",603979812,"bondpicking",603979814,"cartoonbaseedges",603979817,
"cartoonrockets",603979818,"cartoonsfancy",603979819,"cartoonladders",603979820,"celshading",603979821,"chaincasesensitive",603979822,"colorrasmol",603979823,"debugscript",603979824,"defaultstructuredssp",603979825,"disablepopupmenu",603979826,"displaycellparameters",603979828,"dotsselectedonly",603979829,"dotsurface",603979830,"dragselected",603979831,"drawhover",603979832,"drawpicking",603979833,"dsspcalchydrogen",603979834,"ellipsoidarcs",603979836,"ellipsoidarrows",603979837,"ellipsoidaxes",603979838,
"ellipsoidball",603979839,"ellipsoiddots",603979840,"ellipsoidfill",603979841,"filecaching",603979842,"fontcaching",603979844,"fontscaling",603979845,"forceautobond",603979846,"fractionalrelative",603979848,"greyscalerendering",603979850,"hbondsbackbone",603979852,"hbondsrasmol",603979853,"hbondssolid",603979854,"hidenameinpopup",603979858,"hidenavigationpoint",603979860,"hidenotselected",603979862,"highresolution",603979864,"imagestate",603979868,"iskiosk",603979869,"isosurfacekey",603979870,"isosurfacepropertysmoothing",
603979871,"justifymeasurements",603979872,"languagetranslation",603979873,"legacyautobonding",603979874,"legacyhaddition",603979875,"logcommands",603979876,"loggestures",603979877,"measureallmodels",603979878,"measurementlabels",603979879,"messagestylechime",603979880,"minimizationrefresh",603979881,"minimizationsilent",603979882,"modelkitmode",603979883,"monitorenergy",603979884,"multiprocessor",603979885,"navigatesurface",603979886,"navigationmode",603979887,"navigationperiodic",603979888,"partialdots",
603979889,"pdbaddhydrogens",603979890,"pdbgetheader",603979891,"pdbsequential",603979892,"perspectivedepth",603979893,"preservestate",603979894,"rangeselected",603979895,"refreshing",603979896,"ribbonborder",603979898,"rocketbarrels",603979900,"saveproteinstructurestate",603979902,"scriptqueue",603979904,"selectallmodels",603979906,"selecthetero",603979908,"selecthydrogen",603979910,"showaxes",603979914,"showboundbox",603979916,"showfrank",603979918,"showhiddenselectionhalos",603979920,"showhydrogens",
603979922,"showkeystrokes",603979924,"showmeasurements",603979926,"showmultiplebonds",603979928,"shownavigationpointalways",603979930,"showtiming",603979934,"showunitcell",603979936,"slabbyatom",603979938,"slabbymolecule",603979940,"slabenabled",603979942,"smartaromatic",603979944,"solventprobe",603979948,"ssbondsbackbone",603979952,"statusreporting",603979954,"strutsmultiple",603979955,"syncmouse",603979956,"syncscript",603979958,"testflag1",603979960,"testflag2",603979962,"testflag3",603979964,
"testflag4",603979965,"tracealpha",603979966,"translucent",603979967,"twistedsheets",603979968,"usearcball",603979969,"useminimizationthread",603979970,"usenumberlocalization",603979972,"vectorsymmetry",603979973,"waitformoveto",603979974,"windowcentered",603979975,"wireframerotation",603979976,"zerobasedxyzrasmol",603979978,"zoomenabled",603979980,"zoomheight",603979982,"zoomlarge",603979983,"zshade",603979984,"absolute",1073741826,"addhydrogens",1073741828,"adjust",1073741830,"align",1073741832,
"allconnected",1073741834,"angstroms",1073741836,"anisotropy",1073741838,"append",1073741839,"arc",1074790416,"area",1073741842,"aromatic",1076887572,"arrow",1073741846,"as",1073741848,"atomicorbital",1073741850,"auto",1073741852,"axis",1073741854,"babel",1073741856,"babel21",1073741858,"back",1073741859,"balls",1073741860,"barb",1073741861,"backlit",1073741862,"best",1073741863,"basepair",1073741864,"binary",1073741866,"blockdata",1073741868,"bondset",1073741870,"bottom",1073741871,"brillouin",1073741872,
"cancel",1073741874,"cap",1074790451,"cavity",1073741876,"check",1073741878,"chemical",1073741879,"circle",1073741880,"clash",1073741881,"clear",1073741882,"clipboard",1073741884,"collapsed",1073741886,"colorscheme",1073741888,"command",1073741890,"commands",1073741892,"constraint",1073741894,"contour",1073741896,"contourlines",1073741898,"contours",1073741900,"corners",1073741902,"create",1073741904,"criterion",1073741905,"crossed",1073741906,"curve",1073741908,"cutoff",1073741910,"cylinder",1073741912,
"density",1073741914,"dssp",1073741915,"diameter",1073741916,"direction",1073741918,"discrete",1073741920,"displacement",1073741922,"distancefactor",1073741924,"dotted",1073741926,"downsample",1073741928,"drawing",1073741929,"eccentricity",1073741930,"ed",1074790508,"edges",1073741933,"energy",1073741934,"error",1073741935,"facecenteroffset",1073741937,"fill",1073741938,"filter",1073741940,"first",1073741942,"fixedtemp",1073741946,"flat",1073741948,"fps",1074790526,"from",1073741952,"front",1073741954,
"frontedges",1073741956,"frontlit",1073741958,"frontonly",1073741960,"full",1073741961,"fullplane",1073741962,"fullylit",1073741964,"functionxy",1073741966,"functionxyz",1073741968,"gridpoints",1073741970,"homo",1073741973,"id",1074790550,"ignore",1073741976,"inchi",1073741977,"inchikey",1073741978,"image",1073741979,"$in",1073741980,"increment",1073741981,"info",1073741982,"inline",1073741983,"insideout",1073741984,"interior",1073741986,"internal",1073741988,"intramolecular",1073741989,"intermolecular",
1073741990,"jmol",1073741992,"last",1073741993,"lattice",1073741994,"lighting",1073741995,"left",1073741996,"line",1073741998,"link",1073741999,"linedata",1073742E3,"list",1073742001,"lobe",1073742002,"lonepair",1073742004,"lp",1073742006,"lumo",1073742008,"manifest",1073742010,"maxset",1073742014,"menu",1073742015,"mep",1073742016,"mesh",1073742018,"middle",1073742019,"minset",1073742020,"mlp",1073742022,"mode",1073742024,"modify",1073742025,"modifyorcreate",1073742026,"modelbased",1073742028,"molecular",
1073742029,"monomer",1073742030,"morph",1073742031,"movie",1073742032,"mrc",1073742033,"msms",1073742034,"name",1073742035,"nci",1073742036,"next",1073742037,"nmr",1073742038,"nocontourlines",1073742039,"nocross",1073742040,"nodebug",1073742041,"nodots",1073742042,"noedges",1073742044,"nofill",1073742046,"nohead",1073742048,"noload",1073742050,"nomesh",1073742052,"noplane",1073742054,"normal",1073742056,"notfrontonly",1073742058,"notriangles",1073742060,"obj",1073742062,"object",1073742064,"offset",
1073742066,"offsetside",1073742068,"once",1073742070,"only",1073742072,"opaque",1073742074,"options",1073742075,"orbital",1073742076,"orientation",1073742077,"origin",1073742078,"out",1073742079,"packed",1073742080,"palindrome",1073742082,"parameters",1073742083,"path",1073742084,"pdb",1074790662,"pdbheader",1073742088,"period",1073742090,"perpendicular",1073742092,"phase",1073742094,"play",1073742096,"playrev",1073742098,"pocket",1073742100,"pointgroup",1073742102,"pointsperangstrom",1073742104,
"polygon",1073742106,"prev",1073742108,"probe",1073742109,"pymol",1073742110,"rad",1073742111,"radical",1073742112,"range",1073742114,"rasmol",1073742116,"reference",1073742118,"remove",1073742119,"residue",1073742120,"resolution",1073742122,"reversecolor",1073742124,"rewind",1073742126,"right",1073742128,"rock",1073742129,"rotate45",1073742130,"rotation",1073742132,"rubberband",1073742134,"sasurface",1073742136,"scale",1073742138,"scene",1073742139,"selection",1073742140,"shapely",1073742144,"sigma",
1073742146,"sign",1073742147,"silent",1073742148,"solid",1073742150,"spacegroup",1073742152,"sphere",1073742154,"squared",1073742156,"state",1073742158,"stop",1073742162,"supercell",1073742163,"ticks",1073742164,"title",1073742166,"titleformat",1073742168,"to",1074790746,"top",1074790748,"torsion",1073742174,"transform",1073742176,"translation",1073742178,"triangles",1073742182,"url",1074790760,"user",1073742186,"val",1073742188,"variable",1073742190,"variables",1073742192,"vertices",1073742194,"spacebeforesquare",
1073742195,"width",1073742196);c$.tokenSpaceBeforeSquare=c$.prototype.tokenSpaceBeforeSquare=J.script.T.o(1073742195," ");c$.tokenOn=c$.prototype.tokenOn=J.script.T.tv(1048589,1,"on");c$.tokenOff=c$.prototype.tokenOff=J.script.T.tv(1048588,0,"off");c$.tokenAll=c$.prototype.tokenAll=J.script.T.o(1048579,"all");c$.tokenIf=c$.prototype.tokenIf=J.script.T.o(135369225,"if");c$.tokenAnd=c$.prototype.tokenAnd=J.script.T.o(269484128,"and");c$.tokenAND=c$.prototype.tokenAND=J.script.T.o(269484160,"");c$.tokenOr=
c$.prototype.tokenOr=J.script.T.o(269484112,"or");c$.tokenAndFALSE=c$.prototype.tokenAndFALSE=J.script.T.o(269484128,"and");c$.tokenOrTRUE=c$.prototype.tokenOrTRUE=J.script.T.o(269484112,"or");c$.tokenOpIf=c$.prototype.tokenOpIf=J.script.T.o(806354977,"?");c$.tokenComma=c$.prototype.tokenComma=J.script.T.o(269484080,",");c$.tokenDefineString=c$.prototype.tokenDefineString=J.script.T.tv(1060866,4,"@");c$.tokenPlus=c$.prototype.tokenPlus=J.script.T.o(269484193,"+");c$.tokenMinus=c$.prototype.tokenMinus=
J.script.T.o(269484192,"-");c$.tokenMul3=c$.prototype.tokenMul3=J.script.T.o(1276117508,"mul3");c$.tokenTimes=c$.prototype.tokenTimes=J.script.T.o(269484209,"*");c$.tokenDivide=c$.prototype.tokenDivide=J.script.T.o(269484208,"/");c$.tokenLeftParen=c$.prototype.tokenLeftParen=J.script.T.o(269484048,"(");c$.tokenRightParen=c$.prototype.tokenRightParen=J.script.T.o(269484049,")");c$.tokenArraySquare=c$.prototype.tokenArraySquare=J.script.T.o(135266306,"[");c$.tokenArraySelector=c$.prototype.tokenArraySelector=
J.script.T.o(269484096,"[");c$.tokenExpressionBegin=c$.prototype.tokenExpressionBegin=J.script.T.o(1048577,"expressionBegin");c$.tokenExpressionEnd=c$.prototype.tokenExpressionEnd=J.script.T.o(1048578,"expressionEnd");c$.tokenConnected=c$.prototype.tokenConnected=J.script.T.o(135266310,"connected");c$.tokenCoordinateBegin=c$.prototype.tokenCoordinateBegin=J.script.T.o(1048586,"{");c$.tokenRightBrace=c$.prototype.tokenRightBrace=J.script.T.o(1048590,"}");c$.tokenCoordinateEnd=c$.prototype.tokenCoordinateEnd=
J.script.T.tokenRightBrace;c$.tokenColon=c$.prototype.tokenColon=J.script.T.o(269484066,":");c$.tokenSetCmd=c$.prototype.tokenSetCmd=J.script.T.o(1085443,"set");c$.tokenSet=c$.prototype.tokenSet=J.script.T.tv(1085443,61,"");c$.tokenSetArray=c$.prototype.tokenSetArray=J.script.T.tv(1085443,91,"");c$.tokenSetProperty=c$.prototype.tokenSetProperty=J.script.T.tv(1085443,46,"");c$.tokenSetVar=c$.prototype.tokenSetVar=J.script.T.tv(1085443,61,"var");c$.tokenEquals=c$.prototype.tokenEquals=J.script.T.o(269484436,
"=");c$.tokenScript=c$.prototype.tokenScript=J.script.T.o(135271429,"script");c$.tokenSwitch=c$.prototype.tokenSwitch=J.script.T.o(102410,"switch");c$.tokenMap=c$.prototype.tokenMap=new java.util.Hashtable;for(var a=["(",J.script.T.tokenLeftParen,")",J.script.T.tokenRightParen,"and",J.script.T.tokenAnd,"&",null,"&&",null,"or",J.script.T.tokenOr,"|",null,"||",null,"?",J.script.T.tokenOpIf,",",J.script.T.tokenComma,"+=",J.script.T.t(269484242),"-=",null,"*=",null,"/=",null,"\\=",null,"&=",null,"|=",
null,"not",J.script.T.t(269484144),"!",null,"xor",J.script.T.t(269484113),"tog",J.script.T.t(269484114),"<",J.script.T.t(269484435),"<=",J.script.T.t(269484434),">=",J.script.T.t(269484433),">",J.script.T.t(269484432),"=",J.script.T.tokenEquals,"==",null,"!=",J.script.T.t(269484438),"<>",null,"within",J.script.T.t(135266325),".",J.script.T.t(1048584),"[",J.script.T.t(269484096),"]",J.script.T.t(269484097),"{",J.script.T.t(1048586),"}",J.script.T.t(1048590),"$",J.script.T.t(1048583),"%",J.script.T.t(269484210),
":",J.script.T.tokenColon,";",J.script.T.t(1048591),"++",J.script.T.t(269484226),"--",J.script.T.t(269484225),"**",J.script.T.t(269484227),"+",J.script.T.tokenPlus,"-",J.script.T.tokenMinus,"*",J.script.T.tokenTimes,"/",J.script.T.tokenDivide,"\\",J.script.T.t(269484211),"animation",J.script.T.t(4097),"anim",null,"assign",J.script.T.t(4098),"axes",J.script.T.t(1611272194),"backbone",J.script.T.t(1115297793),"background",J.script.T.t(1610616835),"bind",J.script.T.t(4100),"bondorder",J.script.T.t(4101),
"boundbox",J.script.T.t(1679429641),"boundingBox",null,"break",J.script.T.t(102407),"calculate",J.script.T.t(4102),"capture",J.script.T.t(4103),"cartoon",J.script.T.t(1113200642),"cartoons",null,"case",J.script.T.t(102411),"catch",J.script.T.t(102412),"cd",J.script.T.t(1069064),"center",J.script.T.t(12289),"centre",null,"centerat",J.script.T.t(4105),"cgo",J.script.T.t(135174),"color",J.script.T.t(1766856708),"colour",null,"compare",J.script.T.t(135270405),"configuration",J.script.T.t(1095766024),
"conformation",null,"config",null,"connect",J.script.T.t(4106),"console",J.script.T.t(528395),"contact",J.script.T.t(135402505),"contacts",null,"continue",J.script.T.t(102408),"data",J.script.T.t(135270407),"default",J.script.T.t(102413),"define",J.script.T.t(1060866),"@",null,"delay",J.script.T.t(528397),"delete",J.script.T.t(12291),"density",J.script.T.t(1073741914),"depth",J.script.T.t(554176526),"dipole",J.script.T.t(135175),"dipoles",null,"display",J.script.T.t(1610625028),"dot",J.script.T.t(1276117505),
"dots",J.script.T.t(1113198595),"draw",J.script.T.t(135176),"echo",J.script.T.t(537022465),"ellipsoid",J.script.T.t(1113198596),"ellipsoids",null,"else",J.script.T.t(364547),"elseif",J.script.T.t(102402),"end",J.script.T.t(1150985),"endif",J.script.T.t(364548),"exit",J.script.T.t(266255),"file",J.script.T.t(1229984263),"files",null,"font",J.script.T.t(4114),"for",J.script.T.t(135369224),"format",J.script.T.t(1288701960),"frame",J.script.T.t(4115),"frames",null,"frank",J.script.T.t(1611272202),"function",
J.script.T.t(135368713),"functions",null,"geosurface",J.script.T.t(1113198597),"getProperty",J.script.T.t(1276121098),"goto",J.script.T.t(20500),"halo",J.script.T.t(1113200646),"halos",null,"helix",J.script.T.t(137363468),"helixalpha",J.script.T.t(3145735),"helix310",J.script.T.t(3145736),"helixpi",J.script.T.t(3145738),"hbond",J.script.T.t(1612189718),"hbonds",null,"help",J.script.T.t(20482),"hide",J.script.T.t(12294),"history",J.script.T.t(1610616855),"hover",J.script.T.t(544771),"if",J.script.T.t(135369225),
"in",J.script.T.t(1073741980),"initialize",J.script.T.t(266264),"invertSelected",J.script.T.t(4121),"isosurface",J.script.T.t(135180),"javascript",J.script.T.t(135287308),"label",J.script.T.t(1826248715),"labels",null,"lcaoCartoon",J.script.T.t(135182),"lcaoCartoons",null,"load",J.script.T.t(135271426),"log",J.script.T.t(36869),"loop",J.script.T.t(528410),"measure",J.script.T.t(1746538509),"measures",null,"monitor",null,"monitors",null,"meshribbon",J.script.T.t(1113200647),"meshribbons",null,"message",
J.script.T.t(20485),"minimize",J.script.T.t(4126),"minimization",null,"mo",J.script.T.t(1183762),"model",J.script.T.t(1095766030),"models",null,"modulation",J.script.T.t(1276121113),"move",J.script.T.t(4128),"moveTo",J.script.T.t(4130),"navigate",J.script.T.t(4131),"navigation",null,"origin",J.script.T.t(1073742078),"out",J.script.T.t(1073742079),"parallel",J.script.T.t(102436),"pause",J.script.T.t(20487),"wait",null,"plot",J.script.T.t(4133),"plot3d",J.script.T.t(135190),"pmesh",J.script.T.t(135188),
"polygon",J.script.T.t(1073742106),"polyhedra",J.script.T.t(135192),"print",J.script.T.t(36865),"process",J.script.T.t(102439),"prompt",J.script.T.t(135304707),"quaternion",J.script.T.t(135270418),"quaternions",null,"quit",J.script.T.t(266281),"ramachandran",J.script.T.t(1052714),"rama",null,"refresh",J.script.T.t(266284),"reset",J.script.T.t(4141),"unset",null,"restore",J.script.T.t(4142),"restrict",J.script.T.t(12295),"return",J.script.T.t(36866),"ribbon",J.script.T.t(1113200649),"ribbons",null,
"rocket",J.script.T.t(1113200650),"rockets",null,"rotate",J.script.T.t(528432),"rotateSelected",J.script.T.t(4145),"save",J.script.T.t(4146),"script",J.script.T.tokenScript,"source",null,"select",J.script.T.t(135280132),"selectionHalos",J.script.T.t(1611141171),"selectionHalo",null,"showSelections",null,"set",J.script.T.tokenSetCmd,"sheet",J.script.T.t(3145760),"show",J.script.T.t(4148),"slab",J.script.T.t(554176565),"spacefill",J.script.T.t(1113200651),"cpk",null,"spin",J.script.T.t(1611141175),
"ssbond",J.script.T.t(1611141176),"ssbonds",null,"star",J.script.T.t(1113200652),"stars",null,"step",J.script.T.t(266298),"steps",null,"stereo",J.script.T.t(528443),"strand",J.script.T.t(1650071565),"strands",null,"structure",J.script.T.t(1641025539),"_structure",null,"strucNo",J.script.T.t(1095761941),"struts",J.script.T.t(1708058),"strut",null,"subset",J.script.T.t(3158024),"switch",J.script.T.tokenSwitch,"synchronize",J.script.T.t(4156),"sync",null,"trace",J.script.T.t(1113200654),"translate",
J.script.T.t(4160),"translateSelected",J.script.T.t(4162),"try",J.script.T.t(364558),"unbind",J.script.T.t(4164),"unitcell",J.script.T.t(1614417948),"var",J.script.T.t(36868),"vector",J.script.T.t(135198),"vectors",null,"vibration",J.script.T.t(4166),"while",J.script.T.t(102406),"wireframe",J.script.T.t(659488),"write",J.script.T.t(135270422),"zap",J.script.T.t(1060873),"zoom",J.script.T.t(4168),"zoomTo",J.script.T.t(4170),"atom",J.script.T.t(1141899265),"atoms",null,"axis",J.script.T.t(1073741854),
"axisangle",J.script.T.t(135266307),"basepair",J.script.T.t(1073741864),"basepairs",null,"orientation",J.script.T.t(1073742077),"orientations",null,"pdbheader",J.script.T.t(1073742088),"polymer",J.script.T.t(1095761937),"polymers",null,"residue",J.script.T.t(1073742120),"residues",null,"rotation",J.script.T.t(1073742132),"row",J.script.T.t(1276117515),"sequence",J.script.T.t(1087373320),"shape",J.script.T.t(1087373323),"state",J.script.T.t(1073742158),"symbol",J.script.T.t(1087375373),"symmetry",
J.script.T.t(1089470478),"spaceGroup",J.script.T.t(1073742152),"transform",J.script.T.t(1073742176),"translation",J.script.T.t(1073742178),"url",J.script.T.t(1074790760),"abs",J.script.T.t(135266826),"absolute",J.script.T.t(1073741826),"acos",J.script.T.t(135266819),"add",J.script.T.t(1276118017),"adpmax",J.script.T.t(1112539137),"adpmin",J.script.T.t(1112539138),"align",J.script.T.t(1073741832),"all",J.script.T.tokenAll,"altloc",J.script.T.t(1087373315),"altlocs",null,"ambientOcclusion",J.script.T.t(553648129),
"amino",J.script.T.t(3145730),"angle",J.script.T.t(135266305),"array",J.script.T.t(135266306),"as",J.script.T.t(1073741848),"atomID",J.script.T.t(1095761922),"_atomID",null,"_a",null,"atomIndex",J.script.T.t(1095761923),"atomName",J.script.T.t(1087375362),"atomno",J.script.T.t(1095763969),"atomType",J.script.T.t(1087375361),"atomX",J.script.T.t(1112541185),"atomY",J.script.T.t(1112541186),"atomZ",J.script.T.t(1112541187),"average",J.script.T.t(96),"babel",J.script.T.t(1073741856),"babel21",J.script.T.t(1073741858),
"back",J.script.T.t(1073741859),"backlit",J.script.T.t(1073741862),"balls",J.script.T.t(1073741860),"baseModel",J.script.T.t(3145776),"best",J.script.T.t(1073741863),"bin",J.script.T.t(1276118529),"bondCount",J.script.T.t(1095761924),"bottom",J.script.T.t(1073741871),"branch",J.script.T.t(1048580),"brillouin",J.script.T.t(1073741872),"bzone",null,"wignerSeitz",null,"cache",J.script.T.t(135270423),"carbohydrate",J.script.T.t(3145764),"cell",J.script.T.t(1095761925),"chain",J.script.T.t(1087373316),
"chains",null,"chainNo",J.script.T.t(1095761927),"chemicalShift",J.script.T.t(1112539139),"cs",null,"clash",J.script.T.t(1073741881),"clear",J.script.T.t(1073741882),"clickable",J.script.T.t(3145766),"clipboard",J.script.T.t(1073741884),"connected",J.script.T.t(135266310),"constraint",J.script.T.t(1073741894),"contourLines",J.script.T.t(1073741898),"coord",J.script.T.t(1048582),"coordinates",null,"coords",null,"cos",J.script.T.t(135266821),"cross",J.script.T.t(135267329),"covalent",J.script.T.t(1112539140),
"direction",J.script.T.t(1073741918),"displacement",J.script.T.t(1073741922),"displayed",J.script.T.t(3145768),"distance",J.script.T.t(1276118018),"div",J.script.T.t(1276117504),"DNA",J.script.T.t(3145732),"dotted",J.script.T.t(1073741926),"DSSP",J.script.T.t(1073741915),"element",J.script.T.t(1087375365),"elemno",J.script.T.t(1095763978),"_e",J.script.T.t(1095761929),"error",J.script.T.t(1073741935),"exportScale",J.script.T.t(570425358),"fill",J.script.T.t(1073741938),"find",J.script.T.t(1276118531),
"fixedTemperature",J.script.T.t(1073741946),"forcefield",J.script.T.t(545259560),"formalCharge",J.script.T.t(1632634891),"charge",null,"eta",J.script.T.t(1112539141),"front",J.script.T.t(1073741954),"frontlit",J.script.T.t(1073741958),"frontOnly",J.script.T.t(1073741960),"fullylit",J.script.T.t(1073741964),"fx",J.script.T.t(1112541188),"fy",J.script.T.t(1112541189),"fz",J.script.T.t(1112541190),"fxyz",J.script.T.t(1146095627),"fux",J.script.T.t(1112541191),"fuy",J.script.T.t(1112541192),"fuz",J.script.T.t(1112541193),
"fuxyz",J.script.T.t(1146095629),"group",J.script.T.t(1087373318),"groups",null,"group1",J.script.T.t(1087373319),"groupID",J.script.T.t(1095761932),"_groupID",null,"_g",null,"groupIndex",J.script.T.t(1095761933),"hidden",J.script.T.t(3145770),"highlight",J.script.T.t(536870920),"hkl",J.script.T.t(135267841),"hydrophobic",J.script.T.t(1114638362),"hydrophobicity",null,"hydro",null,"id",J.script.T.t(1074790550),"identify",J.script.T.t(1087373321),"ident",null,"image",J.script.T.t(1073741979),"info",
J.script.T.t(1073741982),"inline",J.script.T.t(1073741983),"insertion",J.script.T.t(1087373322),"insertions",null,"intramolecular",J.script.T.t(1073741989),"intra",null,"intermolecular",J.script.T.t(1073741990),"inter",null,"ionic",J.script.T.t(1112541195),"ionicRadius",null,"isAromatic",J.script.T.t(1048585),"Jmol",J.script.T.t(1073741992),"join",J.script.T.t(1276117506),"keys",J.script.T.t(1141899281),"last",J.script.T.t(1073741993),"left",J.script.T.t(1073741996),"length",J.script.T.t(1141899267),
"lines",J.script.T.t(1141899268),"list",J.script.T.t(1073742001),"magneticShielding",J.script.T.t(1112539142),"ms",null,"mass",J.script.T.t(1112539143),"max",J.script.T.t(64),"mep",J.script.T.t(1073742016),"mesh",J.script.T.t(1073742018),"middle",J.script.T.t(1073742019),"min",J.script.T.t(32),"mlp",J.script.T.t(1073742022),"mode",J.script.T.t(1073742024),"modify",J.script.T.t(1073742025),"modifyOrCreate",J.script.T.t(1073742026),"molecule",J.script.T.t(1095761936),"molecules",null,"modelIndex",J.script.T.t(1095761935),
"monomer",J.script.T.t(1073742030),"morph",J.script.T.t(1073742031),"movie",J.script.T.t(1073742032),"mul",J.script.T.t(1276117507),"mul3",J.script.T.t(1276117508),"nci",J.script.T.t(1073742036),"next",J.script.T.t(1073742037),"noDots",J.script.T.t(1073742042),"noFill",J.script.T.t(1073742046),"noMesh",J.script.T.t(1073742052),"none",J.script.T.t(1048587),"null",null,"inherit",null,"normal",J.script.T.t(1073742056),"noContourLines",J.script.T.t(1073742039),"nonequivalent",J.script.T.t(3145778),"notFrontOnly",
J.script.T.t(1073742058),"noTriangles",J.script.T.t(1073742060),"now",J.script.T.t(135266318),"nucleic",J.script.T.t(3145742),"occupancy",J.script.T.t(1129318401),"off",J.script.T.tokenOff,"false",null,"on",J.script.T.tokenOn,"true",null,"omega",J.script.T.t(1112539144),"only",J.script.T.t(1073742072),"opaque",J.script.T.t(1073742074),"options",J.script.T.t(1073742075),"partialCharge",J.script.T.t(1112541196),"phi",J.script.T.t(1112539145),"plane",J.script.T.t(135266319),"planar",null,"play",J.script.T.t(1073742096),
"playRev",J.script.T.t(1073742098),"point",J.script.T.t(135266320),"points",null,"pointGroup",J.script.T.t(1073742102),"polymerLength",J.script.T.t(1095761938),"pop",J.script.T.t(1276383249),"previous",J.script.T.t(1073742108),"prev",null,"probe",J.script.T.t(1073742109),"property",J.script.T.t(1716520985),"properties",null,"protein",J.script.T.t(3145744),"psi",J.script.T.t(1112539146),"purine",J.script.T.t(3145746),"push",J.script.T.t(1276383749),"PyMOL",J.script.T.t(1073742110),"pyrimidine",J.script.T.t(3145748),
"random",J.script.T.t(135267332),"range",J.script.T.t(1073742114),"rasmol",J.script.T.t(1073742116),"replace",J.script.T.t(1276118019),"resno",J.script.T.t(1095761939),"resume",J.script.T.t(266287),"rewind",J.script.T.t(1073742126),"reverse",J.script.T.t(1141899269),"right",J.script.T.t(1073742128),"RNA",J.script.T.t(3145750),"rock",J.script.T.t(1073742129),"rubberband",J.script.T.t(1073742134),"saSurface",J.script.T.t(1073742136),"scale",J.script.T.t(1073742138),"scene",J.script.T.t(1073742139),
"search",J.script.T.t(135267335),"smarts",null,"selected",J.script.T.t(1114638363),"shapely",J.script.T.t(1073742144),"sidechain",J.script.T.t(3145754),"sin",J.script.T.t(135266820),"site",J.script.T.t(1095761940),"size",J.script.T.t(1141899270),"smiles",J.script.T.t(135267336),"substructure",J.script.T.t(1238369286),"solid",J.script.T.t(1073742150),"sort",J.script.T.t(1276117011),"specialPosition",J.script.T.t(3145772),"sqrt",J.script.T.t(135266822),"split",J.script.T.t(1276117510),"starScale",J.script.T.t(570425403),
"stddev",J.script.T.t(192),"straightness",J.script.T.t(1112539150),"structureId",J.script.T.t(1087373324),"supercell",J.script.T.t(1073742163),"sub",J.script.T.t(1276117511),"sum",J.script.T.t(128),"sum2",J.script.T.t(160),"surface",J.script.T.t(3145756),"surfaceDistance",J.script.T.t(1112539151),"symop",J.script.T.t(1297090050),"sx",J.script.T.t(1112539147),"sy",J.script.T.t(1112539148),"sz",J.script.T.t(1112539149),"sxyz",J.script.T.t(1146095628),"temperature",J.script.T.t(1112541199),"relativeTemperature",
null,"tensor",J.script.T.t(1276117016),"theta",J.script.T.t(1112539152),"thisModel",J.script.T.t(3145758),"ticks",J.script.T.t(1073742164),"top",J.script.T.t(1074790748),"torsion",J.script.T.t(1073742174),"trajectory",J.script.T.t(536870926),"trajectories",null,"translucent",J.script.T.t(603979967),"triangles",J.script.T.t(1073742182),"trim",J.script.T.t(1276117512),"type",J.script.T.t(1141899272),"ux",J.script.T.t(1112539153),"uy",J.script.T.t(1112539154),"uz",J.script.T.t(1112539155),"uxyz",J.script.T.t(1146093582),
"user",J.script.T.t(1073742186),"valence",J.script.T.t(1095763990),"vanderWaals",J.script.T.t(1649412120),"vdw",null,"vdwRadius",null,"visible",J.script.T.t(3145774),"volume",J.script.T.t(1313866249),"vx",J.script.T.t(1112541202),"vy",J.script.T.t(1112541203),"vz",J.script.T.t(1112541204),"vxyz",J.script.T.t(1146095631),"xyz",J.script.T.t(1146095626),"w",J.script.T.t(1141899280),"x",J.script.T.t(1112541205),"y",J.script.T.t(1112541206),"z",J.script.T.t(1112541207),"addHydrogens",J.script.T.t(1073741828),
"allConnected",J.script.T.t(1073741834),"angstroms",J.script.T.t(1073741836),"anisotropy",J.script.T.t(1073741838),"append",J.script.T.t(1073741839),"arc",J.script.T.t(1074790416),"area",J.script.T.t(1073741842),"aromatic",J.script.T.t(1076887572),"arrow",J.script.T.t(1073741846),"auto",J.script.T.t(1073741852),"barb",J.script.T.t(1073741861),"binary",J.script.T.t(1073741866),"blockData",J.script.T.t(1073741868),"cancel",J.script.T.t(1073741874),"cap",J.script.T.t(1074790451),"cavity",J.script.T.t(1073741876),
"centroid",J.script.T.t(1095761926),"check",J.script.T.t(1073741878),"chemical",J.script.T.t(1073741879),"circle",J.script.T.t(1073741880),"collapsed",J.script.T.t(1073741886),"col",J.script.T.t(1276117514),"colorScheme",J.script.T.t(1073741888),"command",J.script.T.t(1073741890),"commands",J.script.T.t(1073741892),"contour",J.script.T.t(1073741896),"contours",J.script.T.t(1073741900),"corners",J.script.T.t(1073741902),"count",J.script.T.t(1276117012),"criterion",J.script.T.t(1073741905),"create",
J.script.T.t(1073741904),"crossed",J.script.T.t(1073741906),"curve",J.script.T.t(1073741908),"cutoff",J.script.T.t(1073741910),"cylinder",J.script.T.t(1073741912),"diameter",J.script.T.t(1073741916),"discrete",J.script.T.t(1073741920),"distanceFactor",J.script.T.t(1073741924),"downsample",J.script.T.t(1073741928),"drawing",J.script.T.t(1073741929),"eccentricity",J.script.T.t(1073741930),"ed",J.script.T.t(1074790508),"edges",J.script.T.t(1073741933),"energy",J.script.T.t(1073741934),"exitJmol",J.script.T.t(266256),
"faceCenterOffset",J.script.T.t(1073741937),"filter",J.script.T.t(1073741940),"first",J.script.T.t(1073741942),"fixed",J.script.T.t(1060869),"fix",null,"flat",J.script.T.t(1073741948),"fps",J.script.T.t(1074790526),"from",J.script.T.t(1073741952),"frontEdges",J.script.T.t(1073741956),"full",J.script.T.t(1073741961),"fullPlane",J.script.T.t(1073741962),"functionXY",J.script.T.t(1073741966),"functionXYZ",J.script.T.t(1073741968),"gridPoints",J.script.T.t(1073741970),"homo",J.script.T.t(1073741973),
"ignore",J.script.T.t(1073741976),"InChI",J.script.T.t(1073741977),"InChIKey",J.script.T.t(1073741978),"increment",J.script.T.t(1073741981),"insideout",J.script.T.t(1073741984),"interior",J.script.T.t(1073741986),"intersection",J.script.T.t(135267842),"intersect",null,"internal",J.script.T.t(1073741988),"lattice",J.script.T.t(1073741994),"line",J.script.T.t(1073741998),"lineData",J.script.T.t(1073742E3),"link",J.script.T.t(1073741999),"lobe",J.script.T.t(1073742002),"lonePair",J.script.T.t(1073742004),
"lp",J.script.T.t(1073742006),"lumo",J.script.T.t(1073742008),"manifest",J.script.T.t(1073742010),"mapProperty",J.script.T.t(1052700),"map",null,"maxSet",J.script.T.t(1073742014),"menu",J.script.T.t(1073742015),"minSet",J.script.T.t(1073742020),"modelBased",J.script.T.t(1073742028),"molecular",J.script.T.t(1073742029),"mrc",J.script.T.t(1073742033),"msms",J.script.T.t(1073742034),"name",J.script.T.t(1073742035),"nmr",J.script.T.t(1073742038),"noCross",J.script.T.t(1073742040),"noDebug",J.script.T.t(1073742041),
"noEdges",J.script.T.t(1073742044),"noHead",J.script.T.t(1073742048),"noLoad",J.script.T.t(1073742050),"noPlane",J.script.T.t(1073742054),"object",J.script.T.t(1073742064),"obj",J.script.T.t(1073742062),"offset",J.script.T.t(1073742066),"offsetSide",J.script.T.t(1073742068),"once",J.script.T.t(1073742070),"orbital",J.script.T.t(1073742076),"atomicOrbital",J.script.T.t(1073741850),"packed",J.script.T.t(1073742080),"palindrome",J.script.T.t(1073742082),"parameters",J.script.T.t(1073742083),"path",J.script.T.t(1073742084),
"pdb",J.script.T.t(1074790662),"period",J.script.T.t(1073742090),"periodic",null,"perpendicular",J.script.T.t(1073742092),"perp",null,"phase",J.script.T.t(1073742094),"pocket",J.script.T.t(1073742100),"pointsPerAngstrom",J.script.T.t(1073742104),"radical",J.script.T.t(1073742112),"rad",J.script.T.t(1073742111),"reference",J.script.T.t(1073742118),"remove",J.script.T.t(1073742119),"resolution",J.script.T.t(1073742122),"reverseColor",J.script.T.t(1073742124),"rotate45",J.script.T.t(1073742130),"selection",
J.script.T.t(1073742140),"sigma",J.script.T.t(1073742146),"sign",J.script.T.t(1073742147),"silent",J.script.T.t(1073742148),"sphere",J.script.T.t(1073742154),"squared",J.script.T.t(1073742156),"stop",J.script.T.t(1073742162),"title",J.script.T.t(1073742166),"titleFormat",J.script.T.t(1073742168),"to",J.script.T.t(1074790746),"value",J.script.T.t(1073742188),"variable",J.script.T.t(1073742190),"variables",J.script.T.t(1073742192),"vertices",J.script.T.t(1073742194),"width",J.script.T.t(1073742196),
"backgroundModel",J.script.T.t(536870914),"celShading",J.script.T.t(603979821),"celShadingPower",J.script.T.t(553648137),"debug",J.script.T.t(536870916),"defaultLattice",J.script.T.t(536870918),"measurements",J.script.T.t(537006096),"measurement",null,"scale3D",J.script.T.t(1610612740),"toggleLabel",J.script.T.t(1610612741),"userColorScheme",J.script.T.t(536870930),"timeout",J.script.T.t(536875070),"timeouts",null,"animationMode",J.script.T.t(545259521),"appletProxy",J.script.T.t(545259522),"atomTypes",
J.script.T.t(545259524),"axesColor",J.script.T.t(545259526),"axis1Color",J.script.T.t(545259528),"axis2Color",J.script.T.t(545259530),"axis3Color",J.script.T.t(545259532),"backgroundColor",J.script.T.t(545259534),"bondmode",J.script.T.t(1610612737),"boundBoxColor",J.script.T.t(545259536),"boundingBoxColor",null,"currentLocalPath",J.script.T.t(545259538),"dataSeparator",J.script.T.t(545259540),"defaultAngleLabel",J.script.T.t(545259542),"defaultColorScheme",J.script.T.t(545259545),"defaultColors",
null,"defaultDirectory",J.script.T.t(545259546),"defaultDistanceLabel",J.script.T.t(545259547),"defaultDropScript",J.script.T.t(545259548),"defaultLabelPDB",J.script.T.t(545259543),"defaultLabelXYZ",J.script.T.t(545259544),"defaultLoadFilter",J.script.T.t(545259549),"defaultLoadScript",J.script.T.t(545259550),"defaults",J.script.T.t(545259552),"defaultTorsionLabel",J.script.T.t(545259554),"defaultVDW",J.script.T.t(545259555),"drawFontSize",J.script.T.t(570425356),"edsUrlCutoff",J.script.T.t(545259556),
"edsUrlFormat",J.script.T.t(545259557),"energyUnits",J.script.T.t(545259558),"fileCacheDirectory",J.script.T.t(545259559),"fontsize",J.script.T.t(1610612738),"helpPath",J.script.T.t(545259561),"hoverLabel",J.script.T.t(545259562),"language",J.script.T.t(545259564),"loadFormat",J.script.T.t(545259565),"loadLigandFormat",J.script.T.t(545259566),"logFile",J.script.T.t(545259567),"measurementUnits",J.script.T.t(545259568),"nmrPredictFormat",J.script.T.t(545259569),"nmrUrlFormat",J.script.T.t(545259570),
"pathForAllFiles",J.script.T.t(545259571),"picking",J.script.T.t(545259572),"pickingStyle",J.script.T.t(545259574),"pickLabel",J.script.T.t(545259576),"platformSpeed",J.script.T.t(553648158),"propertyColorScheme",J.script.T.t(545259578),"quaternionFrame",J.script.T.t(545259580),"smilesUrlFormat",J.script.T.t(545259582),"smiles2dImageFormat",J.script.T.t(545259584),"unitCellColor",J.script.T.t(545259586),"axesScale",J.script.T.t(570425346),"axisScale",null,"bondTolerance",J.script.T.t(570425348),"cameraDepth",
J.script.T.t(570425350),"defaultDrawArrowScale",J.script.T.t(570425352),"defaultTranslucent",J.script.T.t(570425354),"dipoleScale",J.script.T.t(570425355),"ellipsoidAxisDiameter",J.script.T.t(570425357),"gestureSwipeFactor",J.script.T.t(570425359),"hbondsAngleMinimum",J.script.T.t(570425360),"hbondsDistanceMaximum",J.script.T.t(570425361),"hoverDelay",J.script.T.t(570425362),"loadAtomDataTolerance",J.script.T.t(570425363),"minBondDistance",J.script.T.t(570425364),"minimizationCriterion",J.script.T.t(570425365),
"modulationScale",J.script.T.t(570425366),"mouseDragFactor",J.script.T.t(570425367),"mouseWheelFactor",J.script.T.t(570425368),"navFPS",J.script.T.t(570425371),"navigationDepth",J.script.T.t(570425372),"navigationSlab",J.script.T.t(570425373),"navigationSpeed",J.script.T.t(570425374),"navX",J.script.T.t(570425376),"navY",J.script.T.t(570425378),"navZ",J.script.T.t(570425380),"particleRadius",J.script.T.t(570425381),"pointGroupDistanceTolerance",J.script.T.t(570425382),"pointGroupLinearTolerance",
J.script.T.t(570425384),"radius",J.script.T.t(1666189314),"rotationRadius",J.script.T.t(570425388),"scaleAngstromsPerInch",J.script.T.t(570425390),"sheetSmoothing",J.script.T.t(570425392),"slabRange",J.script.T.t(570425393),"solventProbeRadius",J.script.T.t(570425394),"spinFPS",J.script.T.t(570425396),"spinX",J.script.T.t(570425398),"spinY",J.script.T.t(570425400),"spinZ",J.script.T.t(570425402),"stereoDegrees",J.script.T.t(570425404),"strutDefaultRadius",J.script.T.t(570425406),"strutLengthMaximum",
J.script.T.t(570425408),"vectorScale",J.script.T.t(1649410049),"vectorSymmetry",J.script.T.t(603979973),"vibrationPeriod",J.script.T.t(570425412),"vibrationScale",J.script.T.t(570425414),"visualRange",J.script.T.t(570425416),"ambientPercent",J.script.T.t(553648130),"ambient",null,"animationFps",J.script.T.t(553648132),"axesMode",J.script.T.t(553648134),"bondRadiusMilliAngstroms",J.script.T.t(553648136),"delayMaximumMs",J.script.T.t(553648138),"diffusePercent",J.script.T.t(553648142),"diffuse",null,
"dotDensity",J.script.T.t(553648143),"dotScale",J.script.T.t(553648144),"ellipsoidDotCount",J.script.T.t(553648145),"helixStep",J.script.T.t(553648146),"hermiteLevel",J.script.T.t(553648147),"historyLevel",J.script.T.t(553648148),"lighting",J.script.T.t(1073741995),"logLevel",J.script.T.t(553648150),"meshScale",J.script.T.t(553648151),"minimizationSteps",J.script.T.t(553648152),"minPixelSelRadius",J.script.T.t(553648153),"percentVdwAtom",J.script.T.t(553648154),"perspectiveModel",J.script.T.t(553648155),
"phongExponent",J.script.T.t(553648156),"pickingSpinRate",J.script.T.t(553648157),"propertyAtomNumberField",J.script.T.t(553648159),"propertyAtomNumberColumnCount",J.script.T.t(553648160),"propertyDataColumnCount",J.script.T.t(553648162),"propertyDataField",J.script.T.t(553648164),"repaintWaitMs",J.script.T.t(553648165),"ribbonAspectRatio",J.script.T.t(553648166),"scriptReportingLevel",J.script.T.t(553648168),"showScript",J.script.T.t(536870922),"smallMoleculeMaxAtoms",J.script.T.t(553648170),"specular",
J.script.T.t(536870924),"specularExponent",J.script.T.t(553648172),"specularPercent",J.script.T.t(553648174),"specPercent",null,"specularPower",J.script.T.t(553648176),"specpower",null,"strandCount",J.script.T.t(553648178),"strandCountForMeshRibbon",J.script.T.t(553648180),"strandCountForStrands",J.script.T.t(553648182),"strutSpacing",J.script.T.t(553648184),"zDepth",J.script.T.t(553648186),"zSlab",J.script.T.t(553648188),"zshadePower",J.script.T.t(553648190),"allowEmbeddedScripts",J.script.T.t(603979778),
"allowGestures",J.script.T.t(603979780),"allowKeyStrokes",J.script.T.t(603979781),"allowModelKit",J.script.T.t(603979782),"allowMoveAtoms",J.script.T.t(603979783),"allowMultiTouch",J.script.T.t(603979784),"allowRotateSelected",J.script.T.t(603979785),"antialiasDisplay",J.script.T.t(603979786),"antialiasImages",J.script.T.t(603979788),"antialiasTranslucent",J.script.T.t(603979790),"appendNew",J.script.T.t(603979792),"applySymmetryToBonds",J.script.T.t(603979794),"atomPicking",J.script.T.t(603979796),
"autobond",J.script.T.t(603979798),"autoFPS",J.script.T.t(603979800),"axesMolecular",J.script.T.t(603979804),"axesOrientationRasmol",J.script.T.t(603979806),"axesUnitCell",J.script.T.t(603979808),"axesWindow",J.script.T.t(603979810),"bondModeOr",J.script.T.t(603979812),"bondPicking",J.script.T.t(603979814),"bonds",J.script.T.t(1678770178),"bond",null,"cartoonBaseEdges",J.script.T.t(603979817),"cartoonsFancy",J.script.T.t(603979819),"cartoonFancy",null,"cartoonLadders",J.script.T.t(603979820),"cartoonRockets",
J.script.T.t(603979818),"chainCaseSensitive",J.script.T.t(603979822),"colorRasmol",J.script.T.t(603979823),"debugScript",J.script.T.t(603979824),"defaultStructureDssp",J.script.T.t(603979825),"disablePopupMenu",J.script.T.t(603979826),"displayCellParameters",J.script.T.t(603979828),"dotsSelectedOnly",J.script.T.t(603979829),"dotSurface",J.script.T.t(603979830),"dragSelected",J.script.T.t(603979831),"drawHover",J.script.T.t(603979832),"drawPicking",J.script.T.t(603979833),"dsspCalculateHydrogenAlways",
J.script.T.t(603979834),"ellipsoidArcs",J.script.T.t(603979836),"ellipsoidArrows",J.script.T.t(603979837),"ellipsoidAxes",J.script.T.t(603979838),"ellipsoidBall",J.script.T.t(603979839),"ellipsoidDots",J.script.T.t(603979840),"ellipsoidFill",J.script.T.t(603979841),"fileCaching",J.script.T.t(603979842),"fontCaching",J.script.T.t(603979844),"fontScaling",J.script.T.t(603979845),"forceAutoBond",J.script.T.t(603979846),"fractionalRelative",J.script.T.t(603979848),"greyscaleRendering",J.script.T.t(603979850),
"hbondsBackbone",J.script.T.t(603979852),"hbondsRasmol",J.script.T.t(603979853),"hbondsSolid",J.script.T.t(603979854),"hetero",J.script.T.t(1613758470),"hideNameInPopup",J.script.T.t(603979858),"hideNavigationPoint",J.script.T.t(603979860),"hideNotSelected",J.script.T.t(603979862),"highResolution",J.script.T.t(603979864),"hydrogen",J.script.T.t(1613758476),"hydrogens",null,"imageState",J.script.T.t(603979868),"isKiosk",J.script.T.t(603979869),"isosurfaceKey",J.script.T.t(603979870),"isosurfacePropertySmoothing",
J.script.T.t(603979871),"isosurfacePropertySmoothingPower",J.script.T.t(553648149),"justifyMeasurements",J.script.T.t(603979872),"languageTranslation",J.script.T.t(603979873),"legacyAutoBonding",J.script.T.t(603979874),"legacyHAddition",J.script.T.t(603979875),"logCommands",J.script.T.t(603979876),"logGestures",J.script.T.t(603979877),"measureAllModels",J.script.T.t(603979878),"measurementLabels",J.script.T.t(603979879),"measurementNumbers",J.script.T.t(1610612739),"messageStyleChime",J.script.T.t(603979880),
"minimizationRefresh",J.script.T.t(603979881),"minimizationSilent",J.script.T.t(603979882),"modelkitMode",J.script.T.t(603979883),"monitorEnergy",J.script.T.t(603979884),"multipleBondRadiusFactor",J.script.T.t(570425369),"multipleBondSpacing",J.script.T.t(570425370),"multiProcessor",J.script.T.t(603979885),"navigateSurface",J.script.T.t(603979886),"navigationMode",J.script.T.t(603979887),"navigationPeriodic",J.script.T.t(603979888),"partialDots",J.script.T.t(603979889),"pdbAddHydrogens",J.script.T.t(603979890),
"pdbGetHeader",J.script.T.t(603979891),"pdbSequential",J.script.T.t(603979892),"perspectiveDepth",J.script.T.t(603979893),"preserveState",J.script.T.t(603979894),"rangeSelected",J.script.T.t(603979895),"redoMove",J.script.T.t(4139),"refreshing",J.script.T.t(603979896),"ribbonBorder",J.script.T.t(603979898),"rocketBarrels",J.script.T.t(603979900),"saveProteinStructureState",J.script.T.t(603979902),"scriptQueue",J.script.T.t(603979904),"selectAllModels",J.script.T.t(603979906),"selectHetero",J.script.T.t(603979908),
"selectHydrogen",J.script.T.t(603979910),"showAxes",J.script.T.t(603979914),"showBoundBox",J.script.T.t(603979916),"showBoundingBox",null,"showFrank",J.script.T.t(603979918),"showHiddenSelectionHalos",J.script.T.t(603979920),"showHydrogens",J.script.T.t(603979922),"showKeyStrokes",J.script.T.t(603979924),"showMeasurements",J.script.T.t(603979926),"showMultipleBonds",J.script.T.t(603979928),"showNavigationPointAlways",J.script.T.t(603979930),"showTiming",J.script.T.t(603979934),"showUnitcell",J.script.T.t(603979936),
"slabByAtom",J.script.T.t(603979938),"slabByMolecule",J.script.T.t(603979940),"slabEnabled",J.script.T.t(603979942),"smartAromatic",J.script.T.t(603979944),"solvent",J.script.T.t(1613758488),"solventProbe",J.script.T.t(603979948),"ssBondsBackbone",J.script.T.t(603979952),"statusReporting",J.script.T.t(603979954),"strutsMultiple",J.script.T.t(603979955),"syncMouse",J.script.T.t(603979956),"syncScript",J.script.T.t(603979958),"testFlag1",J.script.T.t(603979960),"testFlag2",J.script.T.t(603979962),"testFlag3",
J.script.T.t(603979964),"testFlag4",J.script.T.t(603979965),"traceAlpha",J.script.T.t(603979966),"twistedSheets",J.script.T.t(603979968),"undo",J.script.T.t(536870928),"undoMove",J.script.T.t(4165),"useArcBall",J.script.T.t(603979969),"useMinimizationThread",J.script.T.t(603979970),"useNumberLocalization",J.script.T.t(603979972),"waitForMoveTo",J.script.T.t(603979974),"windowCentered",J.script.T.t(603979975),"wireframeRotation",J.script.T.t(603979976),"zeroBasedXyzRasmol",J.script.T.t(603979978),
"zoomEnabled",J.script.T.t(603979980),"zoomHeight",J.script.T.t(603979982),"zoomLarge",J.script.T.t(603979983),"zShade",J.script.T.t(603979984)],c=null,d,n,f,g=0;g+1<a.length;g+=2)d=a[g],f=d.toLowerCase(),n=a[g+1],null==n&&(n=c),null==n.value&&(n.value=d),null!=J.script.T.tokenMap.get(f)&&J.util.Logger.error("duplicate token definition:"+f),J.script.T.tokenMap.put(f,n),c=n;a=null});p("J.shape");q(["J.shape.Shape"],"J.shape.AtomShape","JU.AU $.BS J.atomdata.RadiusData J.constant.EnumPalette $.EnumVdw J.util.BSUtil $.C".split(" "),
function(){c$=u(function(){this.mad=-1;this.paletteIDs=this.colixes=this.mads=null;this.atomCount=0;this.atoms=null;this.isActive=!1;this.monomerCount=0;this.rd=this.bsSizeDefault=null;t(this,arguments)},J.shape,"AtomShape",J.shape.Shape);b(c$,"getMonomers",function(){return null});e(c$,"initModelSet",function(){this.atoms=this.modelSet.atoms;this.atomCount=this.modelSet.getAtomCount();null!=this.mads&&(this.mads=JU.AU.arrayCopyShort(this.mads,this.atomCount));null!=this.colixes&&(this.colixes=JU.AU.arrayCopyShort(this.colixes,
this.atomCount));null!=this.paletteIDs&&(this.paletteIDs=JU.AU.arrayCopyByte(this.paletteIDs,this.atomCount))});e(c$,"getSize",function(a){return null==this.mads?0:this.mads[a]},"~N");e(c$,"setSize",function(a,c){this.setSize2(a,c)},"~N,JU.BS");b(c$,"setSize2",function(a,c){0==a?this.setSizeRD(null,c):(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,c))},"~N,JU.BS");e(c$,"setSizeRD",function(a,c){if(null!=this.atoms){this.isActive=
!0;null==this.bsSizeSet&&(this.bsSizeSet=new JU.BS);var d=null!=a&&0!=a.value,b=null==c,f=b?this.atomCount-1:c.nextSetBit(0);null==this.mads&&0<=f&&(this.mads=ea(this.atomCount,0));for(;0<=f;f=b?f-1:c.nextSetBit(f+1))this.setSizeRD2(f,a,d)}},"J.atomdata.RadiusData,JU.BS");b(c$,"setSizeRD2",function(a,c,d){var b=this.atoms[a];this.mads[a]=b.calculateMad(this.viewer,c);this.bsSizeSet.setBitTo(a,d);b.setShapeVisibility(this.myVisibilityFlag,d)},"~N,J.atomdata.RadiusData,~B");b(c$,"setPropAS",function(a,
c,d){if("color"===a){this.isActive=!0;var b=J.util.C.getColixO(c);a=J.constant.EnumPalette.pidOf(c);null==this.bsColixSet&&(this.bsColixSet=new JU.BS);for(c=d.nextSetBit(0);0<=c;c=d.nextSetBit(c+1))this.setColixAndPalette(b,a,c)}else if("params"===a){this.isActive=!0;a=c[0];var f=c[1],g=c[2],e=new J.atomdata.RadiusData(null,0,J.atomdata.RadiusData.EnumType.FACTOR,J.constant.EnumVdw.AUTO);null==this.bsColixSet&&(this.bsColixSet=new JU.BS);null==this.bsSizeSet&&(this.bsSizeSet=new JU.BS);c=d.nextSetBit(0);
null==this.mads&&0<=c&&(this.mads=ea(this.atomCount,0));for(var l=0;0<=c;c=d.nextSetBit(c+1),l++){b=null==a?0:a[l];0==b&&(b=0);var j=null==f?0:f[l];0.01<j&&(b=J.util.C.getColixTranslucent3(b,!0,j));this.setColixAndPalette(b,J.constant.EnumPalette.UNKNOWN.id,c);null!=g&&(b=0<(e.value=g[l]),this.setSizeRD2(c,e,b))}}else if("translucency"===a){this.isActive=!0;a=c.equals("translucent");null==this.bsColixSet&&(this.bsColixSet=new JU.BS);for(c=d.nextSetBit(0);0<=c;c=d.nextSetBit(c+1))null==this.colixes&&
(this.colixes=ea(this.atomCount,0),this.paletteIDs=T(this.atomCount,0)),this.colixes[c]=J.util.C.getColixTranslucent3(this.colixes[c],a,this.translucentLevel),a&&this.bsColixSet.set(c)}else"deleteModelAtoms"===a?(this.atoms=c[1],a=c[2],this.atomCount=this.modelSet.getAtomCount(),c=a[1],a=a[2],this.mads=JU.AU.deleteElements(this.mads,c,a),this.colixes=JU.AU.deleteElements(this.colixes,c,a),this.paletteIDs=JU.AU.deleteElements(this.paletteIDs,c,a),J.util.BSUtil.deleteBits(this.bsSizeSet,d),J.util.BSUtil.deleteBits(this.bsColixSet,
d)):this.setPropS(a,c,d)},"~S,~O,JU.BS");b(c$,"setColixAndPalette",function(a,c,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.atomCount));this.colixes[d]=a=this.getColixI(a,c,d);this.bsColixSet.setBitTo(d,0!=a);this.paletteIDs[d]=c},"~N,~N,~N");e(c$,"setModelClickability",function(){if(this.isActive)for(var a=
this.atomCount;0<=--a;){var c=this.atoms[a];0==(c.getShapeVisibilityFlags()&this.myVisibilityFlag)||this.modelSet.isAtomHidden(a)||c.setClickable(this.myVisibilityFlag)}});e(c$,"getShapeState",function(){return this.isActive?this.viewer.getAtomShapeState(this):""});b(c$,"getInfoAsString",function(){return null},"~N")});p("J.shape");q(["J.shape.AtomShape"],"J.shape.Balls",["JU.BS","J.constant.EnumPalette","J.util.C"],function(){c$=G(J.shape,"Balls",J.shape.AtomShape);e(c$,"setSizeRD",function(a,c){this.isActive=
!0;null==this.bsSizeSet&&(this.bsSizeSet=new JU.BS);for(var d=Math.min(this.atoms.length,c.length()),b=c.nextSetBit(0);0<=b&&b<d;b=c.nextSetBit(b+1))this.atoms[b].setMadAtom(this.viewer,a),this.bsSizeSet.set(b)},"J.atomdata.RadiusData,JU.BS");e(c$,"setProperty",function(a,c,d){if("color"===a){var b=J.util.C.getColixO(c);0==b&&(b=2);null==this.bsColixSet&&(this.bsColixSet=new JU.BS);var f=J.constant.EnumPalette.pidOf(c);for(a=d.nextSetBit(0);0<=a;a=d.nextSetBit(a+1)){var g=this.atoms[a];g.setColixAtom(this.getColixA(b,
f,g));this.bsColixSet.setBitTo(a,2!=b||f!=J.constant.EnumPalette.NONE.id);g.setPaletteID(f)}}else if("colorValues"===a){if(0!=c.length){null==this.bsColixSet&&(this.bsColixSet=new JU.BS);var e=0,f=null;for(a=d.nextSetBit(0);0<=a&&!(e>=c.length);a=d.nextSetBit(a+1))f=Integer.$valueOf(c[e++]),b=J.util.C.getColixO(f),0==b&&(b=2),f=J.constant.EnumPalette.pidOf(f),g=this.atoms[a],g.setColixAtom(this.getColixA(b,f,g)),this.bsColixSet.setBitTo(a,2!=b||f!=J.constant.EnumPalette.NONE.id),g.setPaletteID(f)}}else if("colors"===
a){c=c[0];null==this.bsColixSet&&(this.bsColixSet=new JU.BS);for(a=d.nextSetBit(0);0<=a;a=d.nextSetBit(a+1))a>=c.length||(this.atoms[a].setColixAtom(c[a]),this.atoms[a].setPaletteID(J.constant.EnumPalette.UNKNOWN.id),this.bsColixSet.set(a))}else if("translucency"===a){c=c.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(c,this.translucentLevel),c&&this.bsColixSet.set(a)}else a.startsWith("ball")&&(a=
a.substring(4).intern()),this.setPropAS(a,c,d)},"~S,~O,JU.BS");e(c$,"setModelClickability",function(){for(var a=this.viewer.getDeletedAtoms(),c=this.atomCount;0<=--c;){var d=this.atoms[c];d.setClickable(0);null!=a&&a.get(c)||(0==(d.getShapeVisibilityFlags()&this.myVisibilityFlag)||this.modelSet.isAtomHidden(c))||d.setClickable(this.myVisibilityFlag)}});e(c$,"setVisibilityFlags",function(a){for(var c=this.viewer.getBoolean(603979922),d=this.viewer.getDeletedAtoms(),b=this.atomCount;0<=--b;){var f=
this.atoms[b],g=f.getShapeVisibilityFlags(),g=g&-2&~this.myVisibilityFlag;f.setShapeVisibilityFlags(g);null!=d&&d.get(b)||!c&&1==f.getElementNumber()||(g=f.getModelIndex(),a.get(g)&&(f.setShapeVisibility(1,!0),0!=f.madAtom&&!this.modelSet.isAtomHidden(b)&&f.setShapeVisibility(this.myVisibilityFlag,!0)))}},"JU.BS");e(c$,"getShapeState",function(){return this.viewer.getShapeState(this)})});p("J.shape");q(["J.shape.FontShape"],"J.shape.FontLineShape",null,function(){c$=u(function(){this.tickInfos=null;
this.mad=0;t(this,arguments)},J.shape,"FontLineShape",J.shape.FontShape);N(c$,function(){this.tickInfos=Array(4)});b(c$,"setPropFLS",function(a,c){"tickInfo"===a?null==c.ticks?c.type.equals(" ")?this.tickInfos[0]=this.tickInfos[1]=this.tickInfos[2]=this.tickInfos[3]=null:this.tickInfos["xyz".indexOf(c.type)+1]=null:this.tickInfos["xyz".indexOf(c.type)+1]=c:this.setPropFS(a,c)},"~S,~O");e(c$,"getShapeState",function(){var a=this.viewer.getFontState(this.myType,this.font3d);return null==this.tickInfos?
a:this.viewer.getFontLineShapeState(a,this.myType,this.tickInfos)})});p("J.shape");q(["J.shape.Shape"],"J.shape.FontShape",null,function(){c$=u(function(){this.font3d=this.myType=null;t(this,arguments)},J.shape,"FontShape",J.shape.Shape);e(c$,"initShape",function(){this.translucentAllowed=!1});b(c$,"setPropFS",function(a,c){"font"===a&&(this.font3d=c)},"~S,~O")});p("J.shape");q(["J.shape.FontShape"],"J.shape.Frank",["J.i18n.GT"],function(){c$=u(function(){this.frankString="Jmol";this.baseFont3d=this.currentMetricsFont3d=
null;this.dy=this.dx=this.y=this.x=this.frankDescent=this.frankAscent=this.frankWidth=0;t(this,arguments)},J.shape,"Frank",J.shape.FontShape);b(c$,"initShape",function(){na(this,J.shape.Frank,"initShape",[]);this.myType="frank";this.baseFont3d=this.font3d=this.gdata.getFont3DFSS("SansSerif","Plain",16);this.calcMetrics()});e(c$,"setProperty",function(a,c){this.setPropFS(a,c)},"~S,~O,JU.BS");e(c$,"wasClicked",function(a,c){var d=this.viewer.getScreenWidth(),b=this.viewer.getScreenHeight();return 0<
d&&0<b&&a>d-this.frankWidth-4&&c>b-this.frankAscent-4},"~N,~N");e(c$,"checkObjectHovered",function(a,c){if(!this.viewer.getShowFrank()||!this.wasClicked(a,c)||!this.viewer.menuEnabled())return!1;this.gdata.isDisplayAntialiased()&&!this.viewer.isSingleThreaded&&(a<<=1,c<<=1);this.viewer.hoverOnPt(a,c,J.i18n.GT._("Click for menu..."),null,null);return!0},"~N,~N,JU.BS");b(c$,"calcMetrics",function(){this.viewer.isJS?this.frankString="JSmol":this.viewer.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())});b(c$,"getFont",function(a){this.font3d=this.gdata.getFont3DScaled(this.baseFont3d,a);this.calcMetrics()},"~N");e(c$,"getShapeState",function(){return this.viewer.getFontState(this.myType,this.font3d)});B(c$,"defaultFontName","SansSerif","defaultFontStyle","Plain","defaultFontSize",16,"frankMargin",
4)});p("J.shape");q(null,"J.shape.Shape",["J.constant.EnumPalette","J.util.C","$.Logger","J.viewer.JC"],function(){c$=u(function(){this.gdata=this.modelSet=this.viewer=null;this.translucentLevel=this.myVisibilityFlag=this.shapeID=0;this.translucentAllowed=!0;this.isBioShape=!1;this.bsColixSet=this.bsSizeSet=null;t(this,arguments)},J.shape,"Shape");b(c$,"getViewer",function(){return this.viewer});b(c$,"initializeShape",function(a,c,d,b){this.viewer=a;this.gdata=c;this.shapeID=b;this.myVisibilityFlag=
J.viewer.JC.getShapeVisibilityFlag(b);this.setModelSet(d);this.initShape()},"J.viewer.Viewer,J.util.GData,J.modelset.ModelSet,~N");b(c$,"getSize",function(){return 0},"~N");b(c$,"getSizeG",function(){return 0},"J.modelset.Group");b(c$,"setModelSet",function(a){this.modelSet=a;this.initModelSet()},"J.modelset.ModelSet");b(c$,"initModelSet",function(){});b(c$,"initShape",function(){});b(c$,"merge",function(){},"J.shape.Shape");b(c$,"setShapeSizeRD",function(a,c,d){null==c?this.setSize(a,d):this.setSizeRD(c,
d)},"~N,J.atomdata.RadiusData,JU.BS");b(c$,"setSize",function(){},"~N,JU.BS");b(c$,"setSizeRD",function(){},"J.atomdata.RadiusData,JU.BS");b(c$,"getPropertyData",function(){return!1},"~S,~A");b(c$,"setPropS",function(a,c,d){if("setProperties"===a)for(null==d&&(d=this.viewer.getSelectionSet(!1));0<c.size();)a=c.remove(0),this.setProperty(a[0].intern(),a[1],d);else"translucentLevel"===a?this.translucentLevel=c.floatValue():"refreshTrajectories"!==a&&J.util.Logger.warn("unassigned "+J.viewer.JC.shapeClassBases[this.shapeID]+
" + shape setProperty:"+a+":"+c)},"~S,~O,JU.BS");b(c$,"getProperty",function(){return null},"~S,~N");b(c$,"getIndexFromName",function(){return-1},"~S");b(c$,"wasClicked",function(){return!1},"~N,~N");b(c$,"findNearestAtomIndex",function(){},"~N,~N,~A,JU.BS");b(c$,"checkBoundsMinMax",function(){},"JU.P3,JU.P3");b(c$,"setModelClickability",function(){});b(c$,"checkObjectClicked",function(){return null},"~N,~N,~N,JU.BS,~B");b(c$,"checkObjectHovered",function(){return!1},"~N,~N,JU.BS");b(c$,"checkObjectDragged",
function(){return!1},"~N,~N,~N,~N,~N,JU.BS");b(c$,"coordinateInRange",function(a,c,d,b,f){this.viewer.transformPtScr(d,f);a=(a-f.x)*(a-f.x)+(c-f.y)*(c-f.y);return a<b?a:-1},"~N,~N,JU.P3,~N,JU.P3i");b(c$,"getColixI",function(a,c,d){return this.getColixA(a,c,this.modelSet.atoms[d])},"~N,~N,~N");b(c$,"getColixA",function(a,c,d){return 2==a?this.viewer.getColixAtomPalette(d,c):a},"~N,~N,J.modelset.Atom");b(c$,"getColixB",function(a,c,d){return 2==a?this.viewer.getColixBondPalette(d,c):a},"~N,~N,J.modelset.Bond");
b(c$,"getShapeDetail",function(){return null});b(c$,"setVisibilityFlags",function(){},"JU.BS");c$.getColix=b(c$,"getColix",function(a,c,d){return J.util.C.getColixInherited(null==a||c>=a.length?0:a[c],d.getColix())},"~A,~N,J.modelset.Atom");c$.getFontCommand=b(c$,"getFontCommand",function(a,c){return null==c?"":"font "+a+" "+c.getInfo()},"~S,javajs.awt.Font");c$.getColorCommandUnk=b(c$,"getColorCommandUnk",function(a,c,d){return J.shape.Shape.getColorCommand(a,J.constant.EnumPalette.UNKNOWN.id,c,
d)},"~S,~N,~B");c$.getColorCommand=b(c$,"getColorCommand",function(a,c,d,b){if(c==J.constant.EnumPalette.UNKNOWN.id&&0==d)return"";c=c==J.constant.EnumPalette.UNKNOWN.id&&0==d?"":(b?J.shape.Shape.getTranslucentLabel(d)+" ":"")+(c!=J.constant.EnumPalette.UNKNOWN.id&&!J.constant.EnumPalette.isPaletteVariable(c)?J.constant.EnumPalette.getPaletteName(c):J.shape.Shape.encodeColor(d));return"color "+a+" "+c},"~S,~N,~N,~B");c$.encodeColor=b(c$,"encodeColor",function(a){return J.util.C.isColixColorInherited(a)?
"none":J.util.C.getHexCode(a)},"~N");c$.getTranslucentLabel=b(c$,"getTranslucentLabel",function(a){return J.util.C.isColixTranslucent(a)?"translucent "+J.util.C.getColixTranslucencyFractional(a):"opaque"},"~N");c$.appendCmd=b(c$,"appendCmd",function(a,c){0!=c.length&&a.append("  ").append(c).append(";\n")},"JU.SB,~S");B(c$,"RADIUS_MAX",4)});p("J.shape");q(["J.shape.Shape","JU.P3i"],"J.shape.Sticks","java.util.Hashtable JU.BS $.P3 J.constant.EnumPalette J.util.BSUtil $.C $.Escape $.JmolEdge".split(" "),
function(){c$=u(function(){this.myMask=0;this.reportAll=!1;this.ptXY=this.selectedBonds=this.bsOrderSet=null;t(this,arguments)},J.shape,"Sticks",J.shape.Shape);N(c$,function(){this.ptXY=new JU.P3i});b(c$,"initShape",function(){na(this,J.shape.Sticks,"initShape",[]);this.myMask=1023;this.reportAll=!1});e(c$,"setSize",function(a,c){if(2147483647==a)this.selectedBonds=J.util.BSUtil.copy(c);else if(-2147483648==a)null==this.bsOrderSet&&(this.bsOrderSet=new JU.BS),this.bsOrderSet.or(c);else{null==this.bsSizeSet&&
(this.bsSizeSet=new JU.BS);for(var d=null!=this.selectedBonds?this.modelSet.getBondIterator(this.selectedBonds):this.modelSet.getBondIteratorForType(this.myMask,c);d.hasNext();)this.bsSizeSet.set(d.nextIndex()),d.next().setMad(a)}},"~N,JU.BS");e(c$,"setProperty",function(a,c,d){if("type"===a)this.myMask=c.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=c.shortValue();for(d=null!=this.selectedBonds?this.modelSet.getBondIterator(this.selectedBonds):this.modelSet.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=J.util.C.getColixO(c),c=s(c,J.constant.EnumPalette)?c:null,c===J.constant.EnumPalette.TYPE||c===J.constant.EnumPalette.ENERGY){var b=c===J.constant.EnumPalette.ENERGY;for(d=null!=this.selectedBonds?this.modelSet.getBondIterator(this.selectedBonds):
this.modelSet.getBondIteratorForType(this.myMask,d);d.hasNext();){this.bsColixSet.set(d.nextIndex());var f=d.next();b?(f.setColix(this.getColixB(a,c.id,f)),f.setPaletteID(c.id)):f.setColix(J.util.C.getColix(J.util.JmolEdge.getArgbHbondType(f.order)))}}else{if(!(2==a&&c!==J.constant.EnumPalette.CPK))for(d=null!=this.selectedBonds?this.modelSet.getBondIterator(this.selectedBonds):this.modelSet.getBondIteratorForType(this.myMask,d);d.hasNext();)c=d.nextIndex(),f=d.next(),f.setColix(a),this.bsColixSet.setBitTo(c,
0!=a&&2!=a)}else if("translucency"===a){null==this.bsColixSet&&(this.bsColixSet=new JU.BS);a=c.equals("translucent");for(d=null!=this.selectedBonds?this.modelSet.getBondIterator(this.selectedBonds):this.modelSet.getBondIteratorForType(this.myMask,d);d.hasNext();)this.bsColixSet.set(d.nextIndex()),d.next().setTranslucent(a,this.translucentLevel)}else"deleteModelAtoms"!==a&&this.setPropS(a,c,d)},"~S,~O,JU.BS");e(c$,"getProperty",function(a){return a.equals("selectionState")?null!=this.selectedBonds?
"select BONDS "+J.util.Escape.eBS(this.selectedBonds)+"\n":"":a.equals("sets")?[this.bsOrderSet,this.bsSizeSet,this.bsColixSet]:null},"~S,~N");e(c$,"setModelClickability",function(){for(var a=this.modelSet.bonds,c=this.modelSet.bondCount;0<=--c;){var d=a[c];0==(d.getShapeVisibilityFlags()&this.myVisibilityFlag)||(this.modelSet.isAtomHidden(d.getAtomIndex1())||this.modelSet.isAtomHidden(d.getAtomIndex2()))||(d.getAtom1().setClickable(this.myVisibilityFlag),d.getAtom2().setClickable(this.myVisibilityFlag))}});
e(c$,"getShapeState",function(){return this.viewer.getBondState(this,this.bsOrderSet,this.reportAll)});e(c$,"checkObjectHovered",function(a,c,d){var b=new JU.P3;a=this.findPickedBond(a,c,d,b);if(null==a)return!1;this.viewer.highlightBond(a.index,!0);return!0},"~N,~N,JU.BS");e(c$,"checkObjectClicked",function(a,c,d,b){d=new JU.P3;a=this.findPickedBond(a,c,b,d);if(null==a)return null;c=a.getAtom1().modelIndex;b=a.getIdentity();var f=new java.util.Hashtable;f.put("pt",d);f.put("index",Integer.$valueOf(a.index));
f.put("modelIndex",Integer.$valueOf(c));f.put("model",this.viewer.getModelNumberDotted(c));f.put("type","bond");f.put("info",b);this.viewer.setStatusAtomPicked(-3,'["bond","'+a.getIdentity()+'",'+d.x+","+d.y+","+d.z+"]");return f},"~N,~N,~N,JU.BS,~B");b(c$,"findPickedBond",function(a,c,d,b){d=100;this.gdata.isAntialiased()&&(a<<=1,c<<=1,d<<=1);for(var f=null,g=new JU.P3,e=this.modelSet.bonds,l=this.modelSet.bondCount;0<=--l;){var j=e[l];if(0!=j.getShapeVisibilityFlags()){var k=j.getAtom1(),m=j.getAtom2();
if(k.isVisible(0)&&m.isVisible(0)){g.ave(k,m);var p=this.coordinateInRange(a,c,g,d,this.ptXY);0<=p&&(k=1*(this.ptXY.x-k.sX)/(m.sX-k.sX),0.4>k||0.6<k||(d=p,f=j,b.setT(g)))}}}return f},"~N,~N,JU.BS,JU.P3");B(c$,"MAX_BOND_CLICK_DISTANCE_SQUARED",100)});p("J.thread");q(["J.thread.JmolThread"],"J.thread.HoverWatcherThread",["java.lang.Thread"],function(){c$=u(function(){this.moved=this.current=this.actionManager=null;this.hoverDelay=0;t(this,arguments)},J.thread,"HoverWatcherThread",J.thread.JmolThread);
w(c$,function(a,c,d,b){R(this,J.thread.HoverWatcherThread);this.setViewer(b,"HoverWatcher");this.actionManager=a;this.current=c;this.moved=d;this.start()},"J.viewer.ActionManager,J.viewer.MouseState,J.viewer.MouseState,J.viewer.Viewer");e(c$,"run1",function(a){for(;;)switch(a){case -1:this.isJS||Thread.currentThread().setPriority(1);a=0;break;case 0:this.hoverDelay=this.viewer.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")});p("J.thread");q(["java.lang.Thread"],"J.thread.JmolThread",["J.util.Logger"],function(){c$=u(function(){this.$name="JmolThread";this.sc=this.eval=this.viewer=null;this.hoverEnabled=!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;t(this,
arguments)},J.thread,"JmolThread",Thread);b(c$,"setManager",function(){return 0},"~O,J.viewer.Viewer,~O");b(c$,"setViewer",function(a,c){this.setName(c);this.$name=c+"_"+ ++J.thread.JmolThread.threadIndex;this.viewer=a;this.isJS=a.isSingleThreaded},"J.viewer.Viewer,~S");b(c$,"setEval",function(a){this.eval=a;this.sc=this.viewer.getEvalContextAndHoldQueue(a);null!=this.sc&&(this.useTimeout=a.getAllowJSThreads())},"J.api.JmolScriptEvaluator");b(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)});b(c$,"start",function(){this.isJS?(J.util.Logger.info("starting "+this.$name),this.run()):na(this,J.thread.JmolThread,"start",[])});e(c$,"run",function(){this.startTime=System.currentTimeMillis();try{this.run1(-1)}catch(a){if(y(a,InterruptedException)){var c=a;J.util.Logger.debugging&&!s(this,J.thread.HoverWatcherThread)&&this.oops(c)}else if(y(a,Exception))this.oops(a);else throw a;}});
b(c$,"oops",function(a){J.util.Logger.debug(this.$name+" exception "+a);this.viewer.isJS||a.printStackTrace();this.viewer.queueOnHold=!1},"Exception");b(c$,"runSleep",function(a,c){if(this.isJS&&!this.useTimeout)return!0;var d=this;setTimeout(function(){d.run1(c)},Math.max(a,0));return!1},"~N,~N");b(c$,"interrupt",function(){this.stopped=!0;this.viewer.startHoverWatcher(!0);this.isJS||na(this,J.thread.JmolThread,"interrupt",[])});b(c$,"checkInterrupted",function(){return this.stopped});b(c$,"reset",
function(){this.isReset=!0;this.interrupt()});B(c$,"threadIndex",0,"INIT",-1,"MAIN",0,"FINISH",-2,"CHECK1",1,"CHECK2",2,"CHECK3",3)});p("J.thread");q(["J.thread.JmolThread"],"J.thread.TimeoutThread",["java.lang.Thread","JU.SB"],function(){c$=u(function(){this.script=null;this.status=0;this.triggered=!0;this.timeouts=null;t(this,arguments)},J.thread,"TimeoutThread",J.thread.JmolThread);w(c$,function(a,c,d,b){R(this,J.thread.TimeoutThread,[]);this.setViewer(a,c);this.$name=c;this.set(d,b)},"J.viewer.Viewer,~S,~N,~S");
b(c$,"set",function(a,c){this.sleepTime=a;null!=c&&(this.script=c)},"~N,~S");e(c$,"toString",function(){return"timeout name="+this.$name+" executions="+this.status+" mSec="+this.sleepTime+" secRemaining="+(this.targetTime-System.currentTimeMillis())/1E3+" script="+this.script});e(c$,"run1",function(a){for(;;)switch(a){case -1:this.isJS||Thread.currentThread().setPriority(1);this.timeouts=this.viewer.getTimeouts();this.targetTime=System.currentTimeMillis()+Math.abs(this.sleepTime);a=0;break;case 0:if(this.checkInterrupted()||
(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.viewer.checkInMotion(2):this.viewer.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=b(c$,"clear",function(a){for(var c,d=a.values().iterator();d.hasNext()&&((c=d.next())||1);){var b=c;b.script.equals("exitJmol")||b.interrupt()}a.clear()},"java.util.Map");c$.setTimeout=b(c$,"setTimeout",function(a,c,d,b,f){var g=c.get(d);0==b?null!=g&&(g.interrupt(),c.remove(d)):null!=g?g.set(b,f):(g=new J.thread.TimeoutThread(a,d,b,f),c.put(d,g),g.start())},
"J.viewer.Viewer,java.util.Map,~S,~N,~S");c$.trigger=b(c$,"trigger",function(a,c){var d=a.get(c);null!=d&&(d.triggered=0>d.sleepTime)},"java.util.Map,~S");c$.showTimeout=b(c$,"showTimeout",function(a,c){var d=new JU.SB;if(null!=a)for(var b,f=a.values().iterator();f.hasNext()&&((b=f.next())||1);){var g=b;(null==c||g.$name.equalsIgnoreCase(c))&&d.append(g.toString()).append("\n")}return 0<d.length()?d.toString():"<no timeouts set>"},"java.util.Map,~S")});p("J.util");q(["JU.P3","$.P3i","$.V3"],"J.util.BoxInfo",
["java.util.Hashtable","JU.List","$.P4","J.util.Measure","$.Point3fi"],function(){c$=u(function(){this.bbVertices=this.bbVector=this.bbCenter=this.bbCorner1=this.bbCorner0=null;this.isScaleSet=!1;this.margin=0;t(this,arguments)},J.util,"BoxInfo");N(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 J.util.Point3fi;for(a=0;8>a;a++)J.util.BoxInfo.unitBboxPoints[a]=JU.P3.new3(-1,
-1,-1),J.util.BoxInfo.unitBboxPoints[a].scaleAdd2(2,J.util.BoxInfo.unitCubePoints[a],J.util.BoxInfo.unitBboxPoints[a])});w(c$,function(){this.reset()});b(c$,"intersectPlane",function(a,c,d,b){var f=new JU.List;f.addLast(this.getCanonicalCopy(d));return a.intersectPlane(c,f,b)},"J.modelset.ModelSet,JU.P4,~N,~N");b(c$,"getCanonicalCopy",function(a){return J.util.BoxInfo.getCanonicalCopy(this.bbVertices,a)},"~N");c$.getCanonicalCopy=b(c$,"getCanonicalCopy",function(a,c){for(var d=Array(8),b=0;8>b;b++)d[J.util.BoxInfo.toCanonical[b]]=
JU.P3.newP(a[b]);J.util.BoxInfo.scaleBox(d,c);return d},"~A,~N");c$.scaleBox=b(c$,"scaleBox",function(a,c){if(!(0==c||1==c)){for(var d=new JU.P3,b=new JU.V3,f=0;8>f;f++)d.add(a[f]);d.scale(0.125);for(f=0;8>f;f++)b.sub2(a[f],d),b.scale(c),a[f].add2(d,b)}},"~A,~N");c$.getFacesFromCriticalPoints=b(c$,"getFacesFromCriticalPoints",function(a){for(var c=Array(6),d=new JU.V3,b=new JU.V3,f=new JU.V3,g=new JU.P3,e=new JU.P3,l=new JU.P3,j=Array(8),k=0;8>k;k++)j[k]=JU.P3.newP(a[0]),1==(k&1)&&j[k].add(a[1]),
2==(k&2)&&j[k].add(a[2]),4==(k&4)&&j[k].add(a[3]);for(k=0;6>k;k++)g.setT(j[J.util.BoxInfo.facePoints[k].x]),e.setT(j[J.util.BoxInfo.facePoints[k].y]),l.setT(j[J.util.BoxInfo.facePoints[k].z]),J.util.Measure.getPlaneThroughPoints(g,e,l,d,b,f,c[k]=new JU.P4);return c},"~A");c$.getCriticalPoints=b(c$,"getCriticalPoints",function(a,c){var d=JU.P3.newP(a[0]),b=JU.P3.newP(a[1]),f=JU.P3.newP(a[2]),g=JU.P3.newP(a[4]);b.sub(d);f.sub(d);g.sub(d);null!=c&&d.add(c);return[d,b,f,g]},"~A,JU.T3");b(c$,"getBoundBoxCenter",
function(){this.isScaleSet||this.setBbcage(1);return this.bbCenter});b(c$,"getBoundBoxCornerVector",function(){this.isScaleSet||this.setBbcage(1);return this.bbVector});b(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");b(c$,"getBoundBoxVertices",function(){this.isScaleSet||this.setBbcage(1);return this.bbVertices});b(c$,"getBoundBoxInfo",function(){this.isScaleSet||
this.setBbcage(1);var a=new java.util.Hashtable;a.put("center",JU.P3.newP(this.bbCenter));a.put("vector",JU.V3.newV(this.bbVector));a.put("corner0",JU.P3.newP(this.bbCorner0));a.put("corner1",JU.P3.newP(this.bbCorner1));return a});b(c$,"setBoundBox",function(a,c,d,b){if(null!=a){if(0==b)return;if(d){if(0==a.distance(c))return;this.bbCorner0.set(Math.min(a.x,c.x),Math.min(a.y,c.y),Math.min(a.z,c.z));this.bbCorner1.set(Math.max(a.x,c.x),Math.max(a.y,c.y),Math.max(a.z,c.z))}else{if(0==c.x||0==c.y&&0==
c.z)return;this.bbCorner0.set(a.x-c.x,a.y-c.y,a.z-c.z);this.bbCorner1.set(a.x+c.x,a.y+c.y,a.z+c.z)}}this.setBbcage(b)},"JU.P3,JU.P3,~B,~N");b(c$,"reset",function(){this.isScaleSet=!1;this.bbCorner0.set(3.4028235E38,3.4028235E38,3.4028235E38);this.bbCorner1.set(-3.4028235E38,-3.4028235E38,-3.4028235E38)});b(c$,"setMargin",function(a){this.margin=a},"~N");b(c$,"addBoundBoxPoint",function(a){this.isScaleSet=!1;J.util.BoxInfo.addPoint(a,this.bbCorner0,this.bbCorner1,this.margin)},"JU.P3");c$.addPoint=
b(c$,"addPoint",function(a,c,d,b){a.x-b<c.x&&(c.x=a.x-b);a.x+b>d.x&&(d.x=a.x+b);a.y-b<c.y&&(c.y=a.y-b);a.y+b>d.y&&(d.y=a.y+b);a.z-b<c.z&&(c.z=a.z-b);a.z+b>d.z&&(d.z=a.z+b)},"JU.P3,JU.P3,JU.P3,~N");c$.addPointXYZ=b(c$,"addPointXYZ",function(a,c,d,b,f,g){a-g<b.x&&(b.x=a-g);a+g>f.x&&(f.x=a+g);c-g<b.y&&(b.y=c-g);c+g>f.y&&(f.y=c+g);d-g<b.z&&(b.z=d-g);d+g>f.z&&(f.z=d+g)},"~N,~N,~N,JU.P3,JU.P3,~N");b(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 c=this.bbVertices[a];c.setT(J.util.BoxInfo.unitBboxPoints[a]);c.x*=this.bbVector.x;c.y*=this.bbVector.y;c.z*=this.bbVector.z;c.add(this.bbCenter)}this.bbCorner0.setT(this.bbVertices[0]);this.bbCorner1.setT(this.bbVertices[7])},"~N");b(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");B(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)];B(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)});p("J.util");q(["JU.BS"],"J.util.BSUtil",null,function(){c$=G(J.util,
"BSUtil");c$.newAndSetBit=b(c$,"newAndSetBit",function(a){var c=J.util.BSUtil.newBitSet(a+1);c.set(a);return c},"~N");c$.areEqual=b(c$,"areEqual",function(a,c){return null==a||null==c?null==a&&null==c:a.equals(c)},"JU.BS,JU.BS");c$.haveCommon=b(c$,"haveCommon",function(a,c){return null==a||null==c?!1:a.intersects(c)},"JU.BS,JU.BS");c$.cardinalityOf=b(c$,"cardinalityOf",function(a){return null==a?0:a.cardinality()},"JU.BS");c$.newBitSet2=b(c$,"newBitSet2",function(a,c){var d=J.util.BSUtil.newBitSet(c);
d.setBits(a,c);return d},"~N,~N");c$.setAll=b(c$,"setAll",function(a){var c=J.util.BSUtil.newBitSet(a);c.setBits(0,a);return c},"~N");c$.andNot=b(c$,"andNot",function(a,c){null!=c&&null!=a&&a.andNot(c);return a},"JU.BS,JU.BS");c$.copy=b(c$,"copy",function(a){return null==a?null:a.clone()},"JU.BS");c$.copy2=b(c$,"copy2",function(a,c){if(null==a||null==c)return null;c.clearAll();c.or(a);return c},"JU.BS,JU.BS");c$.copyInvert=b(c$,"copyInvert",function(a,c){return null==a?null:J.util.BSUtil.andNot(J.util.BSUtil.setAll(c),
a)},"JU.BS,~N");c$.invertInPlace=b(c$,"invertInPlace",function(a,c){return J.util.BSUtil.copy2(J.util.BSUtil.copyInvert(a,c),a)},"JU.BS,~N");c$.toggleInPlace=b(c$,"toggleInPlace",function(a,c){a.equals(c)?a.clearAll():0==J.util.BSUtil.andNot(J.util.BSUtil.copy(c),a).length()?J.util.BSUtil.andNot(a,c):a.or(c);return a},"JU.BS,JU.BS");c$.deleteBits=b(c$,"deleteBits",function(a,c){if(null==a||null==c)return a;var d=c.nextSetBit(0);if(0>d)return a;var b=a.length(),f=Math.min(b,c.length()),g;for(g=c.nextClearBit(d);g<
f&&0<=g;g=c.nextClearBit(g+1))a.setBitTo(d++,a.get(g));for(g=f;g<b;g++)a.setBitTo(d++,a.get(g));d<b&&a.clearBits(d,b);return a},"JU.BS,JU.BS");c$.newBitSet=b(c$,"newBitSet",function(a){return JU.BS.newN(a)},"~N");c$.offset=b(c$,"offset",function(a,c,d){if(null!=a){for(var b=JU.BS.newN(a.length()+d),f=a.nextSetBit(0);f>=c;f=a.nextSetBit(f+1))b.set(f+d);J.util.BSUtil.copy2(b,a)}},"JU.BS,~N,~N");c$.setMapBitSet=b(c$,"setMapBitSet",function(a,c,d,b){var f;a.containsKey(b)?f=a.get(b):a.put(b,f=new JU.BS);
f.setBits(c,d+1)},"java.util.Map,~N,~N,~S");c$.emptySet=c$.prototype.emptySet=new JU.BS});p("J.util");q(["J.util.Int2IntHash"],"J.util.C","java.lang.Byte $.Float JU.AU $.CU $.PT $.SB J.constant.EnumPalette J.util.Escape $.Logger".split(" "),function(){c$=G(J.util,"C");w(c$,function(){});c$.getColix=b(c$,"getColix",function(a){if(0==a)return 0;var d=0;-16777216!=(a&4278190080)&&(d=J.util.C.getTranslucentFlag(a>>24&255),a|=4278190080);var b=J.util.C.colixHash.get(a);3==(b&3)&&(d=0);return(0<b?b:J.util.C.allocateColix(a))|
d},"~N");c$.allocateColix=b(c$,"allocateColix",function(a){for(var d=J.util.C.colixMax;4<=--d;)if((a&16777215)==(J.util.C.argbs[d]&16777215))return d;J.util.C.colixMax==J.util.C.argbs.length&&(d=2*J.util.C.colixMax,2048<d&&(d=2048),J.util.C.argbs=JU.AU.arrayCopyI(J.util.C.argbs,d),null!=J.util.C.argbsGreyscale&&(J.util.C.argbsGreyscale=JU.AU.arrayCopyI(J.util.C.argbsGreyscale,d)));J.util.C.argbs[J.util.C.colixMax]=a;null!=J.util.C.argbsGreyscale&&(J.util.C.argbsGreyscale[J.util.C.colixMax]=JU.CU.toFFGGGfromRGB(a));
J.util.C.colixHash.put(a,J.util.C.colixMax);return 2047>J.util.C.colixMax?J.util.C.colixMax++:J.util.C.colixMax},"~N");c$.setLastGrey=b(c$,"setLastGrey",function(a){J.util.C.calcArgbsGreyscale();J.util.C.argbsGreyscale[2047]=JU.CU.toFFGGGfromRGB(a)},"~N");c$.calcArgbsGreyscale=b(c$,"calcArgbsGreyscale",function(){if(null==J.util.C.argbsGreyscale){for(var a=D(J.util.C.argbs.length,0),d=J.util.C.argbs.length;4<=--d;)a[d]=JU.CU.toFFGGGfromRGB(J.util.C.argbs[d]);J.util.C.argbsGreyscale=a}});c$.getArgbGreyscale=
b(c$,"getArgbGreyscale",function(a){null==J.util.C.argbsGreyscale&&J.util.C.calcArgbsGreyscale();return J.util.C.argbsGreyscale[a&-30721]},"~N");c$.getColixO=b(c$,"getColixO",function(a){if(null==a)return 0;if(s(a,J.constant.EnumPalette))return a===J.constant.EnumPalette.NONE?0:2;if(s(a,Integer))return J.util.C.getColix(a.intValue());if(s(a,String))return J.util.C.getColixS(a);if(s(a,Byte))return 0==a.byteValue()?0:2;J.util.Logger.debugging&&J.util.Logger.debug("?? getColix("+a+")");return 22},"~O");
c$.getTranslucentFlag=b(c$,"getTranslucentFlag",function(a){return 0==a?0:0>a?30720:Float.isNaN(a)||255<=a||1==a?16384:(m(Math.floor(1>a?256*a:9>=a?m(Math.floor(a-1))<<5:15>a?256:a))>>5&15)<<11},"~N");c$.isColixLastAvailable=b(c$,"isColixLastAvailable",function(a){return 0<a&&2047==(a&2047)},"~N");c$.getArgb=b(c$,"getArgb",function(a){return J.util.C.argbs[a&-30721]},"~N");c$.isColixColorInherited=b(c$,"isColixColorInherited",function(a){switch(a){case 0:case 1:return!0;default:return 1==(a&-30721)}},
"~N");c$.getColixInherited=b(c$,"getColixInherited",function(a,d){switch(a){case 0:return d;case 1:return d&-30721;default:return 1==(a&-30721)?d&-30721|a&30720:a}},"~N,~N");c$.isColixTranslucent=b(c$,"isColixTranslucent",function(a){return 0!=(a&30720)},"~N");c$.getChangeableColixIndex=b(c$,"getChangeableColixIndex",function(a){return 0<=a?-1:a&2047},"~N");c$.getColixTranslucent3=b(c$,"getColixTranslucent3",function(a,d,b){a&=-30721;0==a&&(a=1);return d?a|J.util.C.getTranslucentFlag(b):a},"~N,~B,~N");
c$.copyColixTranslucency=b(c$,"copyColixTranslucency",function(a,d){return J.util.C.getColixTranslucent3(d,J.util.C.isColixTranslucent(a),J.util.C.getColixTranslucencyLevel(a))},"~N,~N");c$.getColixTranslucencyFractional=b(c$,"getColixTranslucencyFractional",function(a){a=J.util.C.getColixTranslucencyLevel(a);return-1==a?0.5:0==a?0:255==a?1:a/256},"~N");c$.getColixTranslucencyLevel=b(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=b(c$,"getColixS",function(a){var d=JU.CU.getArgbFromString(a);return 0!=d?J.util.C.getColix(d):"none".equalsIgnoreCase(a)?0:"opaque".equalsIgnoreCase(a)?1:2},"~S");c$.getColixArray=b(c$,"getColixArray",function(a){if(null==a||0==a.length)return null;a=JU.PT.getTokens(a);for(var d=ea(a.length,0),b=0;b<a.length;b++)if(d[b]=J.util.C.getColix(JU.CU.getArgbFromString(a[b])),0==d[b])return null;return d},"~S");c$.getHexCode=b(c$,"getHexCode",function(a){return J.util.Escape.escapeColor(J.util.C.getArgb(a))},
"~N");c$.getHexCodes=b(c$,"getHexCodes",function(a){if(null==a)return null;for(var d=new JU.SB,b=0;b<a.length;b++)d.append(0==b?"":" ").append(J.util.C.getHexCode(a[b]));return d.toString()},"~A");c$.getColixTranslucent=b(c$,"getColixTranslucent",function(a){var d=a>>24&255;return 255==d?J.util.C.getColix(a):J.util.C.getColixTranslucent3(J.util.C.getColix(a),!0,d/255)},"~N");c$.getBgContrast=b(c$,"getBgContrast",function(a){return 128>(JU.CU.toFFGGGfromRGB(a)&255)?8:4},"~N");B(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 J.util.Int2IntHash(256);B(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,"predefinedArgbs",[4278190080,4294944E3,4294951115,4278190335,4294967295,4278255615,4294901760,4278222848,4286611584,4290822336,4278255360,4286578688,4278190208,4286611456,4286578816,4278222976,4294902015,4294967040,4294928820,4294956800]);for(var a=0;a<J.util.C.predefinedArgbs.length;++a)J.util.C.getColix(J.util.C.predefinedArgbs[a])});p("J.util");q(null,"J.util.ColorEncoder",
"java.lang.Boolean $.Float java.util.Hashtable JU.AU $.CU $.List $.PT J.constant.EnumPalette J.util.C $.Escape $.Logger J.viewer.JC".split(" "),function(){c$=u(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.propertyColorEncoder=null;t(this,arguments)},J.util,"ColorEncoder");N(c$,function(){this.userScale=[-8355712];this.thisScale=[-8355712]});w(c$,function(a){null==a?(this.schemes=new java.util.Hashtable,this.argbsCpk=J.constant.EnumPalette.argbsCpk,this.argbsRoygb=J.viewer.JC.argbsRoygbScale,this.argbsRwb=J.viewer.JC.argbsRwbScale,this.argbsShapely=J.viewer.JC.argbsShapely,this.argbsAmino=J.viewer.JC.argbsAmino,this.ihalf=m(J.viewer.JC.argbsRoygbScale.length/3),this.propertyColorEncoder=
this):(this.propertyColorEncoder=a,this.schemes=a.schemes)},"J.util.ColorEncoder");c$.getSchemeIndex=b(c$,"getSchemeIndex",function(a){for(var c=0;c<J.util.ColorEncoder.colorSchemes.length;c++)if(J.util.ColorEncoder.colorSchemes[c].equalsIgnoreCase(a))return 16<=c?c-16:13>c?c:-c;return-1},"~S");c$.fixName=b(c$,"fixName",function(a){if(a.equalsIgnoreCase("byelement"))return"byelement_jmol";var c=J.util.ColorEncoder.getSchemeIndex(a);return 0<=c?J.util.ColorEncoder.colorSchemes[c]:a.toLowerCase()},
"~S");b(c$,"makeColorScheme",function(a,c,d){a=J.util.ColorEncoder.fixName(a);if(null==c){this.schemes.remove(a);a=this.createColorScheme(a,!1,d);if(d)switch(a){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=J.viewer.JC.argbsRoygbScale;break;case 6:case 7:this.argbsRwb=J.viewer.JC.argbsRwbScale;break;case 2:this.argbsCpk=J.constant.EnumPalette.argbsCpk;break;case 3:J.util.ColorEncoder.getRasmolScale();
break;case 5:this.argbsAmino=J.viewer.JC.argbsAmino;break;case 4:this.argbsShapely=J.viewer.JC.argbsShapely}return 2147483647==a?0:a}this.schemes.put(a,c);this.setThisScheme(a,c);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=m(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");b(c$,"createColorScheme",function(a,c,d){a=a.toLowerCase();if(a.equals("inherit"))return 15;var b=Math.max(a.indexOf("="),a.indexOf("["));if(0<=b){c=JU.PT.replaceAllCharacters(a.substring(0,b)," =","");0<c.length&&(d=!0);var f=0;a.length>b+1&&!a.contains("[")&&(a="["+a.substring(b+1).trim()+"]",a=JU.PT.simpleReplace(a.$replace("\n"," "),"  "," "),a=JU.PT.simpleReplace(a,", ",",").$replace(" ",","),a=JU.PT.simpleReplace(a,
",","]["));for(b=-1;0<=(b=a.indexOf("[",b+1));)f++;if(0==f)return this.makeColorScheme(c,null,d);for(var g=D(f,0),f=0;0<=(b=a.indexOf("[",b+1));){var e=a.indexOf("]",b);0>e&&(e=a.length-1);var l=JU.CU.getArgbFromString(a.substring(b,e+1));0==l&&(l=JU.CU.getArgbFromString(a.substring(b+1,e).trim()));if(0==l)return J.util.Logger.error("error in color value: "+a.substring(b,e+1)),0;g[f++]=l}return c.equals("user")?(this.setUserScale(g),-13):this.makeColorScheme(c,g,d)}a=J.util.ColorEncoder.fixName(a);
d=J.util.ColorEncoder.getSchemeIndex(a);return this.schemes.containsKey(a)?(this.setThisScheme(a,this.schemes.get(a)),d):-1!=d?d:c?0:2147483647},"~S,~B,~B");b(c$,"setUserScale",function(a){this.propertyColorEncoder.userScale=a;this.makeColorScheme("user",a,!1)},"~A");b(c$,"getColorSchemeArray",function(a){switch(a){case -1:return this.thisScale;case 0:return this.propertyColorEncoder.argbsRoygb;case 1:return JU.AU.arrayCopyRangeRevI(this.propertyColorEncoder.argbsRoygb,0,-1);case 8:return JU.AU.arrayCopyRangeI(this.propertyColorEncoder.argbsRoygb,
0,this.propertyColorEncoder.ihalf);case 9:var c=JU.AU.arrayCopyRangeI(this.propertyColorEncoder.argbsRoygb,this.propertyColorEncoder.argbsRoygb.length-2*this.propertyColorEncoder.ihalf,-1);a=D(this.propertyColorEncoder.ihalf,0);for(var d=a.length,b=c.length;0<=--d&&0<=--b;)a[d]=c[b--];return a;case 12:return this.getPaletteAC();case 10:return this.getPaletteBW();case 11:return this.getPaletteWB();case 6:return this.propertyColorEncoder.argbsRwb;case 7:return JU.AU.arrayCopyRangeRevI(this.propertyColorEncoder.argbsRwb,
0,-1);case 2:return this.propertyColorEncoder.argbsCpk;case 3:return J.util.ColorEncoder.getRasmolScale();case 4:return this.propertyColorEncoder.argbsShapely;case 5:return this.propertyColorEncoder.argbsAmino;case -13:return this.propertyColorEncoder.userScale;case -14:return JU.AU.arrayCopyRangeRevI(this.propertyColorEncoder.userScale,0,-1);default:return null}},"~N");b(c$,"getColorIndexFromPalette",function(a,c,d,b,f){b=J.util.C.getColix(this.getArgbFromPalette(a,c,d,b));f&&(a=(d-a)/(d-c),1<a?
a=1:0.125>a&&(a=0.125),b=J.util.C.getColixTranslucent3(b,!0,a));return b},"~N,~N,~N,~N,~B");b(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.propertyColorEncoder.argbsRoygb.length;case 8:case 9:return this.propertyColorEncoder.ihalf;case 6:case 7:return this.propertyColorEncoder.argbsRwb.length;case -13:case -14:return this.propertyColorEncoder.userScale.length;case 2:return this.argbsCpk.length;
case 3:return J.util.ColorEncoder.getRasmolScale().length;case 4:return this.propertyColorEncoder.argbsShapely.length;case 5:return this.propertyColorEncoder.argbsAmino.length;case 12:return this.getPaletteAC().length;default:return 0}},"~N");b(c$,"getArgbFromPalette",function(a,c,d,b){if(Float.isNaN(a))return-8355712;var f=this.getPaletteColorCount(b);switch(b){case -1:return this.isColorIndex&&(c=0,d=this.thisScale.length),this.thisScale[J.util.ColorEncoder.quantize(a,c,d,f)];case 10:return this.getPaletteBW()[J.util.ColorEncoder.quantize(a,
c,d,f)];case 11:return this.getPaletteWB()[J.util.ColorEncoder.quantize(a,c,d,f)];case 0:return this.propertyColorEncoder.argbsRoygb[J.util.ColorEncoder.quantize(a,c,d,f)];case 1:return this.propertyColorEncoder.argbsRoygb[J.util.ColorEncoder.quantize(-a,-d,-c,f)];case 8:return this.propertyColorEncoder.argbsRoygb[J.util.ColorEncoder.quantize(a,c,d,f)];case 9:return this.propertyColorEncoder.argbsRoygb[this.propertyColorEncoder.ihalf+2*J.util.ColorEncoder.quantize(a,c,d,f)];case 6:return this.propertyColorEncoder.argbsRwb[J.util.ColorEncoder.quantize(a,
c,d,f)];case 7:return this.propertyColorEncoder.argbsRwb[J.util.ColorEncoder.quantize(-a,-d,-c,f)];case -13:return 0==this.propertyColorEncoder.userScale.length?-8355712:this.propertyColorEncoder.userScale[J.util.ColorEncoder.quantize(a,c,d,f)];case -14:return 0==this.propertyColorEncoder.userScale.length?-8355712:this.propertyColorEncoder.userScale[J.util.ColorEncoder.quantize(-a,-d,-c,f)];case 2:return this.propertyColorEncoder.argbsCpk[J.util.ColorEncoder.colorIndex(a,f)];case 3:return J.util.ColorEncoder.getRasmolScale()[J.util.ColorEncoder.colorIndex(a,
f)];case 4:return this.propertyColorEncoder.argbsShapely[J.util.ColorEncoder.colorIndex(a,f)];case 5:return this.propertyColorEncoder.argbsAmino[J.util.ColorEncoder.colorIndex(a,f)];case 12:return this.getPaletteAC()[J.util.ColorEncoder.colorIndexRepeat(a,f)];default:return-8355712}},"~N,~N,~N,~N");b(c$,"setThisScheme",function(a,c){this.thisName=a;this.thisScale=c;a.equals("user")&&(this.userScale=c);this.isColorIndex=0==a.indexOf("byelement")||0==a.indexOf("byresidue")},"~S,~A");b(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");b(c$,"getArgbMinMax",function(a,c,d){return this.isReversed?this.getArgbFromPalette(-a,-d,-c,this.currentPalette):this.getArgbFromPalette(a,c,d,this.currentPalette)},"~N,~N,~N");b(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");b(c$,"getColorKey",function(){for(var a=new java.util.Hashtable,c=this.getPaletteColorCount(this.currentPalette),d=new JU.List,b=M(c+1,0),f=(this.hi-this.lo)/c,g=f*(this.isReversed?-0.5:0.5),e=0;e<c;e++)b[e]=this.isReversed?this.hi-e*f:this.lo+e*f,d.addLast(JU.CU.colorPtFromInt2(this.getArgb(b[e]+g)));b[c]=this.isReversed?this.lo:this.hi;a.put("values",b);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});b(c$,"setColorScheme",function(a,c){this.isTranslucent=c;null!=a&&(this.currentPalette=this.createColorScheme(a,!0,!1))},"~S,~B");b(c$,"setRange",function(a,c,d){3.4028235E38==c&&(a=1,c=this.getPaletteColorCount(this.currentPalette)+1);this.lo=Math.min(a,c);this.hi=Math.max(a,c);this.isReversed=d},"~N,~N,~B");b(c$,"getCurrentColorSchemeName",function(){return this.getColorSchemeName(this.currentPalette)});
b(c$,"getColorSchemeName",function(a){var c=Math.abs(a);return-1==a?this.thisName:c<J.util.ColorEncoder.colorSchemes.length&&0<=c?J.util.ColorEncoder.colorSchemes[c]:null},"~N");c$.getColorSchemeList=b(c$,"getColorSchemeList",function(a){if(null==a)return"";for(var c="",d=0;d<a.length;d++)c+=(0==d?"":" ")+J.util.Escape.escapeColor(a[d]);return c},"~A");c$.getRasmolScale=b(c$,"getRasmolScale",function(){if(null!=J.util.ColorEncoder.rasmolScale)return J.util.ColorEncoder.rasmolScale;J.util.ColorEncoder.rasmolScale=
D(J.constant.EnumPalette.argbsCpk.length,0);for(var a=J.constant.EnumPalette.argbsCpkRasmol[0]|4278190080,c=J.util.ColorEncoder.rasmolScale.length;0<=--c;)J.util.ColorEncoder.rasmolScale[c]=a;for(c=J.constant.EnumPalette.argbsCpkRasmol.length;0<=--c;)a=J.constant.EnumPalette.argbsCpkRasmol[c],J.util.ColorEncoder.rasmolScale[a>>24]=a|4278190080;return J.util.ColorEncoder.rasmolScale});b(c$,"getPaletteAC",function(){return null==this.propertyColorEncoder.paletteFriendly?this.propertyColorEncoder.paletteFriendly=
[8421504,1067945,11141282,13235712,16753152,2640510,8331387,10467374,12553008,339310,7209065,8626176,10906112,4488148,13907405,14219839,16759360,6984660,13918415,14809713,16764019]:this.propertyColorEncoder.paletteFriendly});b(c$,"getPaletteWB",function(){if(null!=this.propertyColorEncoder.paletteWB)return this.propertyColorEncoder.paletteWB;for(var a=D(J.viewer.JC.argbsRoygbScale.length,0),c=0;c<a.length;c++){var d=1/a.length*(a.length-c);a[c]=JU.CU.colorTriadToFFRGB(d,d,d)}return this.propertyColorEncoder.paletteWB=
a});c$.getPaletteAtoB=b(c$,"getPaletteAtoB",function(a,c,d){2>d&&(d=J.viewer.JC.argbsRoygbScale.length);var b=D(d,0),f=M(3,0),g=M(3,0);JU.CU.toRGB3f(a,f);JU.CU.toRGB3f(c,g);a=(g[0]-f[0])/(d-1);c=(g[1]-f[1])/(d-1);for(var g=(g[2]-f[2])/(d-1),e=0;e<d;e++)b[e]=JU.CU.colorTriadToFFRGB(f[0]+a*e,f[1]+c*e,f[2]+g*e);return b},"~N,~N,~N");b(c$,"getPaletteBW",function(){if(null!=this.propertyColorEncoder.paletteBW)return this.propertyColorEncoder.paletteBW;for(var a=D(J.viewer.JC.argbsRoygbScale.length,0),
c=0;c<a.length;c++){var d=1/a.length*c;a[c]=JU.CU.colorTriadToFFRGB(d,d,d)}return this.propertyColorEncoder.paletteBW=a});b(c$,"quantize",function(a,c){var d=this.getPaletteColorCount(this.currentPalette);a=(z(a*d)+(c?0:1))/d;return 0>=a?this.lo:1<=a?this.hi:this.lo+(this.hi-this.lo)*a},"~N,~B");c$.quantize=b(c$,"quantize",function(a,c,d,b){d-=c;if(0>=d||Float.isNaN(a))return m(b/2);a-=c;if(0>=a)return 0;a=z(a/(d/b)+1E-4);a>=b&&(a=b-1);return a},"~N,~N,~N,~N");c$.colorIndex=b(c$,"colorIndex",function(a,
c){return m(Math.floor(0>=a||a>=c?0:a))},"~N,~N");c$.colorIndexRepeat=b(c$,"colorIndexRepeat",function(a,c){return m(Math.floor(0>=a?0:a))%c},"~N,~N");b(c$,"getColorScheme",function(){return(this.isTranslucent?"translucent ":"")+(0>this.currentPalette?J.util.ColorEncoder.getColorSchemeList(this.getColorSchemeArray(this.currentPalette)):this.getColorSchemeName(this.currentPalette))});c$.RGBtoHSL=b(c$,"RGBtoHSL",function(a,c,d,b){a/=255;c/=255;d/=255;1<a&&(a=1);1<c&&(c=1);1<d&&(d=1);var f=Math.min(a,
Math.min(c,d)),g=Math.max(a,Math.max(c,d)),e=0;g==f?e=0:g==a?e=(60*(c-d)/(g-f)+360)%360:g==c?e=60*(d-a)/(g-f)+120:g==d&&(e=60*(a-c)/(g-f)+240);a=(g+f)/2;b[0]=e/360;b[1]=g==f?0:0.5>=a?(g-f)/(g+f):(g-f)/(2-g-f);b[2]=a},"~N,~N,~N,~A");B(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";B(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(" ");B(c$,"rasmolScale",
null)});p("J.util");q(null,"J.util.CommandHistory",["JU.List"],function(){c$=u(function(){this.commandList=null;this.maxSize=100;this.cursorPos=this.nextCommand=0;this.isOn=!0;t(this,arguments)},J.util,"CommandHistory");w(c$,function(){this.reset(100)});b(c$,"clear",function(){this.reset(this.maxSize)});b(c$,"reset",function(a){this.maxSize=a;this.commandList=new JU.List;this.nextCommand=0;this.commandList.addLast("");this.cursorPos=0},"~N");b(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");b(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});b(c$,"getCommandDown",function(){if(this.cursorPos>=this.nextCommand)return null;this.cursorPos++;return this.getCommand()});
b(c$,"getCommand",function(){return this.commandList.get(this.cursorPos)});b(c$,"addCommand",function(a){if((this.isOn||a.endsWith("#??"))&&!a.endsWith("#----")){for(var c;0<=(c=a.indexOf("\n"));){var d=a.substring(0,c);0<d.length&&this.addCommandLine(d);a=a.substring(c+1)}0<a.length&&this.addCommandLine(a)}},"~S");b(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 c="";a<this.nextCommand;a++)this.commandList.get(a).toUpperCase().startsWith("WRITE HISTORY")||(c+=this.commandList.get(a)+"\n");return c},"~N");b(c$,"removeCommand",function(){return this.removeCommand(this.nextCommand-1)});b(c$,"removeCommand",function(a){if(0>a||a>=this.nextCommand)return"";a=this.commandList.remove(a);this.nextCommand--;return a},"~N");b(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");B(c$,"ERROR_FLAG","#??","NOHISTORYLINE_FLAG","#--","NOHISTORYATALL_FLAG","#----","DEFAULT_MAX_SIZE",100)});p("J.util");q(["J.util.LoggerInterface"],"J.util.DefaultLogger",["J.util.Logger"],function(){c$=G(J.util,
"DefaultLogger",null,J.util.LoggerInterface);b(c$,"log",function(a,c,d,b){a===System.err&&System.out.flush();if(null!=a&&(null!=d||null!=b))if(a.println((J.util.Logger.logLevel()?"["+J.util.Logger.getLevel(c)+"] ":"")+(null!=d?d:"")+(null!=b?": "+b.toString():"")),null!=b&&(c=b.getStackTrace(),null!=c))for(d=0;d<c.length;d++)a.println(c[d].getClassName()+" - "+c[d].getLineNumber()+" - "+c[d].getMethodName());a===System.err&&System.err.flush()},"java.io.PrintStream,~N,~S,Throwable");e(c$,"debug",function(a){this.log(System.out,
5,a,null)},"~S");e(c$,"info",function(a){this.log(System.out,4,a,null)},"~S");e(c$,"warn",function(a){this.log(System.out,3,a,null)},"~S");e(c$,"warnEx",function(a,c){this.log(System.out,3,a,c)},"~S,Throwable");e(c$,"error",function(a){this.log(System.err,2,a,null)},"~S");e(c$,"errorEx",function(a,c){this.log(System.err,2,a,c)},"~S,Throwable");e(c$,"fatal",function(a){this.log(System.err,1,a,null)},"~S");e(c$,"fatalEx",function(a,c){this.log(System.err,1,a,c)},"~S,Throwable")});p("J.util");q(["JU.BS"],
"J.util.Elements",["java.lang.Character","java.util.Hashtable","JU.PT","J.util.Logger"],function(){c$=G(J.util,"Elements");c$.getAtomicMass=b(c$,"getAtomicMass",function(a){return 1>a||a>=J.util.Elements.atomicMass.length?0:J.util.Elements.atomicMass[a]},"~N");c$.elementNumberFromSymbol=b(c$,"elementNumberFromSymbol",function(a,d){if(null==J.util.Elements.htElementMap){for(var b=new java.util.Hashtable,f=J.util.Elements.elementNumberMax;0<=--f;){var g=J.util.Elements.elementSymbols[f],e=Integer.$valueOf(f);
b.put(g,e);2==g.length&&b.put(g.toUpperCase(),e)}for(f=J.util.Elements.altElementMax;4<=--f;)g=J.util.Elements.altElementSymbols[f],e=Integer.$valueOf(J.util.Elements.altElementNumbers[f]),b.put(g,e),2==g.length&&b.put(g.toUpperCase(),e);J.util.Elements.htElementMap=b}if(null==a)return 0;b=J.util.Elements.htElementMap.get(a);if(null!=b)return b.intValue();if(Character.isDigit(a.charAt(0))&&(g=a.length-2,0<=g&&Character.isDigit(a.charAt(g))&&g++,b=0<g?JU.PT.parseInt(a.substring(0,g)):0,0<b&&(g=J.util.Elements.elementNumberFromSymbol(a.substring(g),
!0),0<g)))return b=J.util.Elements.getAtomicAndIsotopeNumber(g,b),J.util.Elements.htElementMap.put(a.toUpperCase(),Integer.$valueOf(b)),b;d||J.util.Logger.error("'"+a+"' is not a recognized symbol");return 0},"~S,~B");c$.elementSymbolFromNumber=b(c$,"elementSymbolFromNumber",function(a){var d=0;if(a>=J.util.Elements.elementNumberMax){for(d=J.util.Elements.altElementMax;0<=--d;)if(a==J.util.Elements.altElementNumbers[d])return J.util.Elements.altElementSymbols[d];d=J.util.Elements.getIsotopeNumber(a);
return""+d+J.util.Elements.getElementSymbol(a%128)}return J.util.Elements.getElementSymbol(a)},"~N");c$.getElementSymbol=b(c$,"getElementSymbol",function(a){if(0>a||a>=J.util.Elements.elementNumberMax)a=0;return J.util.Elements.elementSymbols[a]},"~N");c$.elementNameFromNumber=b(c$,"elementNameFromNumber",function(a){if(a>=J.util.Elements.elementNumberMax){for(var d=J.util.Elements.altElementMax;0<=--d;)if(a==J.util.Elements.altElementNumbers[d])return J.util.Elements.altElementNames[d];a%=128}if(0>
a||a>=J.util.Elements.elementNumberMax)a=0;return J.util.Elements.elementNames[a]},"~N");c$.altElementNameFromIndex=b(c$,"altElementNameFromIndex",function(a){return J.util.Elements.altElementNames[a]},"~N");c$.altElementNumberFromIndex=b(c$,"altElementNumberFromIndex",function(a){return J.util.Elements.altElementNumbers[a]},"~N");c$.altElementSymbolFromIndex=b(c$,"altElementSymbolFromIndex",function(a){return J.util.Elements.altElementSymbols[a]},"~N");c$.altIsotopeSymbolFromIndex=b(c$,"altIsotopeSymbolFromIndex",
function(a){a=J.util.Elements.altElementNumbers[a];return(a>>7)+J.util.Elements.elementSymbolFromNumber(a&127)},"~N");c$.altIsotopeSymbolFromIndex2=b(c$,"altIsotopeSymbolFromIndex2",function(a){a=J.util.Elements.altElementNumbers[a];return J.util.Elements.elementSymbolFromNumber(a&127)+(a>>7)},"~N");c$.getElementNumber=b(c$,"getElementNumber",function(a){return a&127},"~N");c$.getIsotopeNumber=b(c$,"getIsotopeNumber",function(a){return a>>7},"~N");c$.getAtomicAndIsotopeNumber=b(c$,"getAtomicAndIsotopeNumber",
function(a,d){return(0>a?0:a)+(0>=d?0:d<<7)},"~N,~N");c$.altElementIndexFromNumber=b(c$,"altElementIndexFromNumber",function(a){for(var d=0;d<J.util.Elements.altElementMax;d++)if(J.util.Elements.altElementNumbers[d]==a)return d;return 0},"~N");c$.getNaturalIsotope=b(c$,"getNaturalIsotope",function(a){for(var d=0;d<J.util.Elements.naturalIsotopeMasses.length;d+=2)if(J.util.Elements.naturalIsotopeMasses[d]==a)return J.util.Elements.naturalIsotopeMasses[++d];return 0},"~N");c$.isNaturalIsotope=b(c$,
"isNaturalIsotope",function(a){return 0<="1H,12C,14N,".indexOf(a+",")},"~S");c$.getBondingRadiusFloat=b(c$,"getBondingRadiusFloat",function(a,d){var b=a&127;return 0<d&&J.util.Elements.bsCations.get(b)?J.util.Elements.getBondingRadFromTable(b,d,J.util.Elements.cationLookupTable):0>d&&J.util.Elements.bsAnions.get(b)?J.util.Elements.getBondingRadFromTable(b,d,J.util.Elements.anionLookupTable):J.util.Elements.covalentMars[b]/1E3},"~N,~N");c$.getBondingRadFromTable=b(c$,"getBondingRadFromTable",function(a,
d,b){d=(a<<4)+(d+4);for(var f=0,g=0,e=0,l=m(b.length/2);e!=l;)if(g=m((e+l)/2),f=b[g<<1],f>d)l=g;else if(f<d)e=g+1;else return b[(g<<1)+1]/1E3;f>d&&g--;f=b[g<<1];a!=f>>4&&g++;return b[(g<<1)+1]/1E3},"~N,~N,~A");c$.getVanderwaalsMar=b(c$,"getVanderwaalsMar",function(a,d){return J.util.Elements.vanderwaalsMars[((a&127)<<2)+d.pt%4]},"~N,J.constant.EnumVdw");c$.getHydrophobicity=b(c$,"getHydrophobicity",function(a){return 1>a||a>=J.util.Elements.hydrophobicities.length?0:J.util.Elements.hydrophobicities[a]},
"~N");c$.getAllredRochowElectroNeg=b(c$,"getAllredRochowElectroNeg",function(a){return 0<a&&a<J.util.Elements.electroNegativities.length?J.util.Elements.electroNegativities[a]:0},"~N");c$.isElement=b(c$,"isElement",function(a,d){return(a&127)==d},"~N,~N");B(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=J.util.Elements.elementSymbols.length;B(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=J.util.Elements.altElementNumbers.length;B(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],"covalentMars",[0,230,930,680,350,830,680,680,680,640,1120,970,1100,1350,1200,750,1020,990,1570,1330,990,1440,1470,1330,1350,1350,1340,1330,1500,1520,1450,1220,1170,1210,1220,1210,1910,1470,1120,1780,1560,1480,1470,1350,1400,1450,1500,1590,1690,1630,1460,1460,1470,1400,1980,1670,1340,1870,1830,1820,1810,1800,1800,1990,1790,1760,1750,1740,1730,1720,1940,1720,1570,
1430,1370,1350,1370,1320,1500,1500,1700,1550,1540,1540,1680,1700,2400,2E3,1900,1880,1790,1610,1580,1550,1530,1510,1500,1500,1500,1500,1500,1500,1500,1500,1600,1600,1600,1600,1600,1600],"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<J.util.Elements.anionLookupTable.length;a+=2)J.util.Elements.bsAnions.set(J.util.Elements.anionLookupTable[a]>>
4);for(a=0;a<J.util.Elements.cationLookupTable.length;a+=2)J.util.Elements.bsCations.set(J.util.Elements.cationLookupTable[a]>>4);B(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]);(J.util.Elements.elementNames.length!=J.util.Elements.elementNumberMax||m(J.util.Elements.vanderwaalsMars.length/4)!=J.util.Elements.elementNumberMax||J.util.Elements.covalentMars.length!=J.util.Elements.elementNumberMax)&&J.util.Logger.error("ERROR!!! Element table length mismatch:\n elementSymbols.length="+
J.util.Elements.elementSymbols.length+"\n elementNames.length="+J.util.Elements.elementNames.length+"\n vanderwaalsMars.length="+J.util.Elements.vanderwaalsMars.length+"\n covalentMars.length="+J.util.Elements.covalentMars.length);B(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])});
p("J.util");q(null,"J.util.Escape","java.lang.Character $.Float java.util.Map JU.A4 $.BS $.List $.M3 $.M4 $.P3 $.P4 $.PT $.SB $.T3 J.script.SV J.util.BSUtil".split(" "),function(){c$=G(J.util,"Escape");c$.escapeColor=b(c$,"escapeColor",function(a){return 0==a?null:"[x"+J.util.Escape.getHexColorFromRGB(a)+"]"},"~N");c$.getHexColorFromRGB=b(c$,"getHexColorFromRGB",function(a){if(0==a)return null;var c="00"+Integer.toHexString(a>>16&255),c=c.substring(c.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 c+d+a},"~N");c$.eP=b(c$,"eP",function(a){return null==a?"null":"{"+a.x+" "+a.y+" "+a.z+"}"},"JU.T3");c$.matrixToScript=b(c$,"matrixToScript",function(a){return JU.PT.replaceAllCharacters(a.toString(),"\n\r ","").$replace("\t"," ")},"~O");c$.eP4=b(c$,"eP4",function(a){return"{"+a.x+" "+a.y+" "+a.z+" "+a.w+"}"},"JU.P4");c$.e=b(c$,"e",function(a){return null==a?"null":s(a,String)?J.util.Escape.eS(a):s(a,JU.List)?
J.util.Escape.eV(a):s(a,JU.BS)?J.util.Escape.eBS(a):s(a,JU.T3)?J.util.Escape.eP(a):s(a,JU.P4)?J.util.Escape.eP4(a):JU.PT.isAS(a)?J.util.Escape.eAS(a,!0):JU.PT.isAI(a)?J.util.Escape.eAI(a):JU.PT.isAF(a)?J.util.Escape.eAF(a):JU.PT.isAD(a)?J.util.Escape.eAD(a):JU.PT.isAP(a)?J.util.Escape.eAP(a):s(a,JU.M3)||s(a,JU.M4)?JU.PT.simpleReplace(a.toString(),"\t",",\t"):s(a,JU.A4)?"{"+a.x+" "+a.y+" "+a.z+" "+180*a.angle/3.141592653589793+"}":s(a,java.util.Map)?J.util.Escape.escapeMap(a):JU.PT.isAII(a)||JU.PT.isAFF(a)||
JU.PT.isADD(a)||JU.PT.isAFFF(a)?JU.PT.toJSON(null,a):a.toString()},"~O");c$.eS=b(c$,"eS",function(a){if(null==a||0==a.length)return'""';for(var c=!1,d=0;10>d;d+=2)if(0<=a.indexOf('\\\\\tt\rr\nn""'.charAt(d))){c=!0;break}if(c)for(;10>d;){for(var c=-1,b='\\\\\tt\rr\nn""'.charAt(d++),f='\\\\\tt\rr\nn""'.charAt(d++),g=new JU.SB,e=0;0<=(c=a.indexOf(b,c+1));)g.append(a.substring(e,c)).appendC("\\").appendC(f),e=c+1;g.append(a.substring(e,a.length));a=g.toString()}for(d=a.length;0<=--d;)127<a.charCodeAt(d)&&
(a=a.substring(0,d)+J.util.Escape.unicode(a.charAt(d))+a.substring(d+1));return'"'+a+'"'},"~S");c$.unicode=b(c$,"unicode",function(a){a="0000"+Integer.toHexString(a.charCodeAt(0));return"\\u"+a.substring(a.length-4)},"~S");c$.eV=b(c$,"eV",function(a){if(null==a)return J.util.Escape.eS("");var c=new JU.SB;c.append("[");for(var d=0;d<a.size();d++)0<d&&c.append(", "),c.append(J.util.Escape.escapeNice(a.get(d).asString()));c.append("]");return c.toString()},"JU.List");c$.escapeMap=b(c$,"escapeMap",function(a){var c=
new JU.SB;c.append("{ ");var d="",b;for(a=a.entrySet().iterator();a.hasNext()&&((b=a.next())||1);){var f=b.getKey();c.append(d).append(J.util.Escape.eS(f)).appendC(":");d=b.getValue();s(d,J.script.SV)||(d=J.script.SV.getVariable(d));c.append(d.escape());d=","}c.append(" }");return c.toString()},"java.util.Map");c$.escapeFloatA=b(c$,"escapeFloatA",function(a,c){if(c)return JU.PT.toJSON(null,a);for(var d=new JU.SB,b=0;b<a.length;b++)0<b&&d.appendC("\n"),d.appendF(a[b]);return d.toString()},"~A,~B");
c$.escapeFloatAA=b(c$,"escapeFloatAA",function(a,c){for(var d=new JU.SB,b=c?";\n":"\n",f=0;f<a.length;f++)if(null!=a[f]){0<f&&d.append(b);for(var g=0;g<a[f].length;g++)d.appendF(a[f][g]).appendC("\t")}return d.toString()},"~A,~B");c$.escapeFloatAAA=b(c$,"escapeFloatAAA",function(a,c){var d=new JU.SB,b=c?";\n":"\n";if(null==a[0]||null==a[0][0])return"0 0 0"+b;d.appendI(a.length).append(" ").appendI(a[0].length).append(" ").appendI(a[0][0].length);for(var f=0;f<a.length;f++)if(null!=a[f]){d.append(b);
for(var g=0;g<a[f].length;g++)if(null!=a[f][g]){d.append(b);for(var e=0;e<a[f][g].length;e++)d.appendF(a[f][g][e]).appendC("\t")}}return d.toString()},"~A,~B");c$.eAS=b(c$,"eAS",function(a,c){if(null==a)return J.util.Escape.eS("");var d=new JU.SB;d.append("[");for(var b=0;b<a.length;b++)0<b&&d.append(", "),d.append(c?J.util.Escape.escapeNice(a[b]):J.util.Escape.eS(a[b]));d.append("]");return d.toString()},"~A,~B");c$.eAI=b(c$,"eAI",function(a){if(null==a)return J.util.Escape.eS("");var c=new JU.SB;
c.append("[");for(var d=0;d<a.length;d++)0<d&&c.append(", "),c.appendI(a[d]);return c.append("]").toString()},"~A");c$.eAD=b(c$,"eAD",function(a){if(null==a)return J.util.Escape.eS("");var c=new JU.SB;c.append("[");for(var d=0;d<a.length;d++)0<d&&c.append(", "),c.appendD(a[d]);return c.append("]").toString()},"~A");c$.eAF=b(c$,"eAF",function(a){if(null==a)return J.util.Escape.eS("");var c=new JU.SB;c.append("[");for(var d=0;d<a.length;d++)0<d&&c.append(", "),c.appendF(a[d]);return c.append("]").toString()},
"~A");c$.eAP=b(c$,"eAP",function(a){if(null==a)return J.util.Escape.eS("");var c=new JU.SB;c.append("[");for(var d=0;d<a.length;d++)0<d&&c.append(", "),c.append(J.util.Escape.eP(a[d]));return c.append("]").toString()},"~A");c$.escapeNice=b(c$,"escapeNice",function(a){if(null==a)return"null";var c=JU.PT.parseFloatStrict(a);return Float.isNaN(c)?J.util.Escape.eS(a):a},"~S");c$.uABsM=b(c$,"uABsM",function(a){return"{"==a.charAt(0)?J.util.Escape.uP(a):(J.util.Escape.isStringArray(a)||a.startsWith("[{")&&
a.indexOf("[{")==a.lastIndexOf("[{"))&&0>a.indexOf(",")&&0>a.indexOf(".")&&0>a.indexOf("-")?J.util.Escape.uB(a):a.startsWith("[[")?J.util.Escape.unescapeMatrix(a):a},"~S");c$.isStringArray=b(c$,"isStringArray",function(a){return a.startsWith("({")&&0==a.lastIndexOf("({")&&a.indexOf("})")==a.length-2},"~S");c$.uP=b(c$,"uP",function(a){if(null==a||0==a.length)return a;var c=a.$replace("\n"," ").trim();if("{"!=c.charAt(0)||"}"!=c.charAt(c.length-1))return a;for(var d=M(5,0),b=0,c=c.substring(1,c.length-
1),f=D(1,0);5>b;b++)if(d[b]=JU.PT.parseFloatNext(c,f),Float.isNaN(d[b])){if(f[0]>=c.length||","!=c.charAt(f[0]))break;f[0]++;b--}return 3==b?JU.P3.new3(d[0],d[1],d[2]):4==b?JU.P4.new4(d[0],d[1],d[2],d[3]):a},"~S");c$.uB=b(c$,"uB",function(a){var c,d;if(null==a||4>(d=(a=a.trim()).length)||a.equalsIgnoreCase("({null})")||"("!=(c=a.charAt(0))&&"["!=c||a.charAt(d-1)!=("("==c?")":"]")||"{"!=a.charAt(1)||a.indexOf("}")!=d-2)return null;for(var b=d-=2;2<=--b;)if(!Character.isDigit(c=a.charAt(b))&&" "!=c&&
"\t"!=c&&":"!=c)return null;for(var f=d;Character.isDigit(a.charAt(--f)););if(++f==d)f=0;else try{f=Integer.parseInt(a.substring(f,d))}catch(g){if(y(g,NumberFormatException))return null;throw g;}for(var e=J.util.BSUtil.newBitSet(f),l=f=-1,j=-2,b=2;b<=d;b++)switch(c=a.charAt(b)){case "\t":case " ":case "}":if(0>j)break;if(j<f)return null;f=j;0>l&&(l=j);e.setBits(l,j+1);l=-1;j=-2;break;case ":":l=f=j;j=-2;break;default:Character.isDigit(c)&&(0>j&&(j=0),j=10*j+(c.charCodeAt(0)-48))}return 0<=l?null:
e},"~S");c$.unescapeMatrix=b(c$,"unescapeMatrix",function(a){if(null==a||0==a.length)return a;var c=a.$replace("\n"," ").trim();if(0!=c.lastIndexOf("[[")||c.indexOf("]]")!=c.length-2)return a;for(var d=M(16,0),c=c.substring(2,c.length-2).$replace("["," ").$replace("]"," ").$replace(","," "),b=D(1,0),f=0;16>f&&!(d[f]=JU.PT.parseFloatNext(c,b),Float.isNaN(d[f]));f++);return!Float.isNaN(JU.PT.parseFloatNext(c,b))?a:9==f?JU.M3.newA(d):16==f?JU.M4.newA(d):a},"~S");c$.eBS=b(c$,"eBS",function(a){return J.util.Escape.eB(a,
"(",")")},"JU.BS");c$.eBond=b(c$,"eBond",function(a){return J.util.Escape.eB(a,"[","]")},"JU.BS");c$.eB=b(c$,"eB",function(a,c,d){if(null==a)return c+"{}"+d;var b=new JU.SB;b.append(c+"{");c=a.length();for(var f=-1,g=-2,e=-1;++e<=c;){var l=a.get(e);if(e==c||0<=f&&!l){0<=f&&g!=f&&b.append((g==f-1?" ":":")+f);if(e==c)break;f=-1}a.get(e)&&(0>f&&(b.append((-2==g?"":" ")+e),g=e),f=e)}b.append("}").appendC(d);return b.toString()},"JU.BS,~S,~S");c$.toReadable=b(c$,"toReadable",function(a,c){var d=new JU.SB,
b="";if(null==c)return"null";if(s(c,String))return J.util.Escape.packageReadable(a,null,J.util.Escape.eS(c));if(JU.PT.isAS(c)){d.append("[");for(var f=c.length,g=0;g<f;g++)d.append(b).append(J.util.Escape.eS(c[g])),b=",";d.append("]");return J.util.Escape.packageReadableSb(a,"String["+f+"]",d)}if(JU.PT.isAI(c)){d.append("[");f=c.length;for(g=0;g<f;g++)d.append(b).appendI(c[g]),b=",";d.append("]");return J.util.Escape.packageReadableSb(a,"int["+f+"]",d)}if(JU.PT.isAF(c)){d.append("[");f=c.length;for(g=
0;g<f;g++)d.append(b).appendF(c[g]),b=",";d.append("]");return J.util.Escape.packageReadableSb(a,"float["+f+"]",d)}if(JU.PT.isAD(c)){d.append("[");f=c.length;for(g=0;g<f;g++)d.append(b).appendD(c[g]),b=",";d.append("]");return J.util.Escape.packageReadableSb(a,"double["+f+"]",d)}if(JU.PT.isAP(c)){d.append("[");f=c.length;for(g=0;g<f;g++)d.append(b).append(J.util.Escape.eP(c[g])),b=",";d.append("]");return J.util.Escape.packageReadableSb(a,"point3f["+f+"]",d)}if(JU.PT.isASS(c)){d.append("[");f=c.length;
for(g=0;g<f;g++)d.append(b).append(J.util.Escape.toReadable(null,c[g])),b=",\n";d.append("]");return J.util.Escape.packageReadableSb(a,"String["+f+"][]",d)}if(JU.PT.isAII(c)){d.append("[");f=c.length;for(g=0;g<f;g++)d.append(b).append(J.util.Escape.toReadable(null,c[g])),b=",";d.append("]");return J.util.Escape.packageReadableSb(a,"int["+f+"][]",d)}if(JU.PT.isAFF(c)){d.append("[\n");f=c.length;for(g=0;g<f;g++)d.append(b).append(J.util.Escape.toReadable(null,c[g])),b=",\n";d.append("]");return J.util.Escape.packageReadableSb(a,
"float[][]",d)}if(JU.PT.isADD(c)){d.append("[\n");f=c.length;for(g=0;g<f;g++)d.append(b).append(J.util.Escape.toReadable(null,c[g])),b=",\n";d.append("]");return J.util.Escape.packageReadableSb(a,"double[][]",d)}if(s(c,JU.List)){f=c.size();for(g=0;g<f;g++)d.append(J.util.Escape.toReadable(a+"["+(g+1)+"]",c.get(g)));return J.util.Escape.packageReadableSb(a,"List["+f+"]",d)}if(s(c,JU.M3)||s(c,JU.T3)||s(c,JU.P4)||s(c,JU.A4))return d.append(J.util.Escape.e(c)),J.util.Escape.packageReadableSb(a,null,d);
if(s(c,java.util.Map)){for(b=c.keySet().iterator();b.hasNext();)f=b.next(),d.append(J.util.Escape.toReadable((null==a?"":a+".")+f,c.get(f)));return d.toString()}return J.util.Escape.packageReadable(a,null,c.toString())},"~S,~O");c$.packageReadableSb=b(c$,"packageReadableSb",function(a,c,d){return J.util.Escape.packageReadable(a,c,d.toString())},"~S,~S,JU.SB");c$.packageReadable=b(c$,"packageReadable",function(a,c,d){return null==a?(null==c?"":c+"\t")+d:"\n"+a+"\t"+(null==c?"":"*"+c+"\t")+d},"~S,~S,~S");
c$.escapeModelFileNumber=b(c$,"escapeModelFileNumber",function(a){return""+m(a/1E6)+"."+a%1E6},"~N");c$.encapsulateData=b(c$,"encapsulateData",function(a,c,d){return'  DATA "'+a+'"\n'+(2==d?J.util.Escape.escapeFloatAA(c,!0)+";\n":3==d?J.util.Escape.escapeFloatAAA(c,!0)+";\n":c)+'    END "'+a+'";\n'},"~S,~O,~N");c$.unescapeUnicode=b(c$,"unescapeUnicode",function(a){for(var c=a.length,d=JU.SB.newN(c),b=0;b<c;){var f=a.charAt(b++);if("\\"==f&&b<c)switch(f=a.charAt(b++),f){case "u":if(b<c){for(var f=
0,g=4;0<=--g&&b<c;){var e=a.charAt(b),e=J.util.Escape.getHexitValue(e);if(0>e)break;f<<=4;f+=e;++b}f=String.fromCharCode(f)}}d.appendC(f)}return d.toString()},"~S");c$.getHexitValue=b(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=b(c$,"unescapeStringArray",function(a){if(null==a||!a.startsWith("[")||
!a.endsWith("]"))return null;var c=new JU.List,d=D(1,0);for(d[0]=1;d[0]<a.length;){var b=JU.PT.getQuotedStringNext(a,d);if(null==b)return null;for(c.addLast(JU.PT.simpleReplace(b,'\\"','"'));d[0]<a.length&&'"'!=a.charAt(d[0]);)d[0]++}return c.toArray(Array(c.size()))},"~S");c$.isAV=b(c$,"isAV",function(a){return s(a[0],J.scriSV)},"~O");B(c$,"escapable",'\\\\\tt\rr\nn""')});p("J.util");q(["J.api.JmolGraphicsInterface"],"J.util.GData",["javajs.awt.Font","JU.AU","J.util.C","$.Shader"],function(){c$=
u(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;t(this,arguments)},J.util,"GData",null,J.api.JmolGraphicsInterface);N(c$,function(){this.changeableColixMap=ea(16,0)});b(c$,"setTranslucentCoverOnly",function(a){this.translucentCoverOnly=a},"~B");b(c$,"getTranslucentCoverOnly",function(){return this.translucentCoverOnly});w(c$,function(){this.shader=new J.util.Shader});b(c$,"initialize",function(a){this.apiPlatform=
a},"javajs.api.GenericPlatform");e(c$,"setDepth",function(a){this.depth=0>a?0:a},"~N");e(c$,"setSlab",function(a){this.slab=0>a?0:a},"~N");b(c$,"setZShade",function(a,c,d,b){a&&this.setZShade2(c,d,b)},"~B,~N,~N,~N");b(c$,"setZShade2",function(a,c,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>c?0:c;this.zShadePower=d},"~N,~N,~N");e(c$,"setAmbientOcclusion",function(a){this.ambientOcclusion=a},"~N");e(c$,
"getRenderWidth",function(){return this.width});e(c$,"getRenderHeight",function(){return this.height});e(c$,"getSlab",function(){return this.slab});e(c$,"getDepth",function(){return this.depth});b(c$,"isDisplayAntialiased",function(){return this.antialiasEnabled});e(c$,"isAntialiased",function(){return this.antialiasThisFrame});b(c$,"getChangeableColix",function(a,c){a>=this.changeableColixMap.length&&(this.changeableColixMap=JU.AU.arrayCopyShort(this.changeableColixMap,a+16));0==this.changeableColixMap[a]&&
(this.changeableColixMap[a]=J.util.C.getColix(c));return a|-32768},"~N,~N");b(c$,"changeColixArgb",function(a,c){a<this.changeableColixMap.length&&0!=this.changeableColixMap[a]&&(this.changeableColixMap[a]=J.util.C.getColix(c))},"~N,~N");b(c$,"getBgColixes",function(a){return a},"~A");e(c$,"getColorArgbOrGray",function(a){0>a&&(a=this.changeableColixMap[a&2047]);return this.inGreyscaleMode?J.util.C.getArgbGreyscale(a):J.util.C.getArgb(a)},"~N");b(c$,"getShades",function(a){0>a&&(a=this.changeableColixMap[a&
2047]);return this.inGreyscaleMode?this.shader.getShadesG(a):this.shader.getShades(a)},"~N");b(c$,"setGreyscaleMode",function(a){this.inGreyscaleMode=a},"~B");b(c$,"getSpecularPower",function(){return this.shader.specularPower});b(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");b(c$,"getSpecularPercent",function(){return this.shader.specularPercent});b(c$,
"setSpecularPercent",function(a){this.shader.specularPercent!=a&&(this.shader.specularPercent=a,this.shader.specularFactor=a/100,this.shader.flushCaches())},"~N");b(c$,"getSpecularExponent",function(){return this.shader.specularExponent});b(c$,"setSpecularExponent",function(a){this.shader.specularExponent!=a&&(this.shader.specularExponent=a,this.shader.phongExponent=m(Math.pow(2,a)),this.shader.usePhongExponent=!1,this.shader.flushCaches())},"~N");b(c$,"getPhongExponent",function(){return this.shader.phongExponent});
b(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");b(c$,"getDiffusePercent",function(){return this.shader.diffusePercent});b(c$,"setDiffusePercent",function(a){this.shader.diffusePercent!=a&&(this.shader.diffusePercent=a,this.shader.diffuseFactor=a/100,this.shader.flushCaches())},
"~N");b(c$,"getAmbientPercent",function(){return this.shader.ambientPercent});b(c$,"setAmbientPercent",function(a){this.shader.ambientPercent!=a&&(this.shader.ambientPercent=a,this.shader.ambientFraction=a/100,this.shader.flushCaches())},"~N");b(c$,"getSpecular",function(){return this.shader.specularOn});b(c$,"setSpecular",function(a){this.shader.specularOn!=a&&(this.shader.specularOn=a,this.shader.flushCaches())},"~B");b(c$,"setCel",function(a){this.shader.setCel(a,this.shader.celPower,this.bgcolor)},
"~B");b(c$,"getCel",function(){return this.shader.celOn});b(c$,"getCelPower",function(){return this.shader.celPower});b(c$,"setCelPower",function(a){this.shader.setCel(this.shader.celOn||0==this.shader.celPower,a,this.bgcolor)},"~N");b(c$,"getLightSource",function(){return this.shader.lightSource});b(c$,"isClipped3",function(a,c,d){return 0>a||a>=this.width||0>c||c>=this.height||d<this.slab||d>this.depth},"~N,~N,~N");b(c$,"isClipped",function(a,c){return 0>a||a>=this.width||0>c||c>=this.height},"~N,~N");
e(c$,"isInDisplayRange",function(a,c){return a>=this.displayMinX&&a<this.displayMaxX&&c>=this.displayMinY&&c<this.displayMaxY},"~N,~N");e(c$,"isClippedXY",function(a,c,d){a=a+1>>1;return c<-a||c>=this.width+a||d<-a||d>=this.height+a},"~N,~N,~N");e(c$,"isClippedZ",function(a){return-2147483648!=a&&(a<this.slab||a>this.depth)},"~N");b(c$,"clipCode3",function(a,c,d){var b=0;0>a?b|=8:a>=this.width&&(b|=4);0>c?b|=2:c>=this.height&&(b|=1);d<this.slab?b|=32:d>this.depth&&(b|=16);return b},"~N,~N,~N");b(c$,
"clipCode",function(a){var c=0;a<this.slab?c|=32:a>this.depth&&(c|=16);return c},"~N");b(c$,"getFont3D",function(a){return javajs.awt.Font.createFont3D(0,0,a,a,this.apiPlatform,this.graphicsForMetrics)},"~N");b(c$,"getFont3DFS",function(a,c){return javajs.awt.Font.createFont3D(javajs.awt.Font.getFontFaceID(a),0,c,c,this.apiPlatform,this.graphicsForMetrics)},"~S,~N");b(c$,"getFontFidFS",function(a,c){return this.getFont3DFSS(a,"Bold",c).fid},"~S,~N");b(c$,"getFont3DFSS",function(a,c,d){c=javajs.awt.Font.getFontStyleID(c);
0>c&&(c=0);return javajs.awt.Font.createFont3D(javajs.awt.Font.getFontFaceID(a),c,d,d,this.apiPlatform,this.graphicsForMetrics)},"~S,~S,~N");e(c$,"getFont3DScaled",function(a,c){var d=a.fontSizeNominal*c;return d==a.fontSize?a:javajs.awt.Font.createFont3D(a.idFontFace,a.idFontStyle,d,a.fontSizeNominal,this.apiPlatform,this.graphicsForMetrics)},"javajs.awt.Font,~N");e(c$,"getFontFid",function(a){return this.getFont3D(a).fid},"~N");c$.getFontStyleID=b(c$,"getFontStyleID",function(a){return javajs.awt.Font.getFontStyleID(a)},
"~S");b(c$,"setBackgroundTransparent",function(){},"~B");b(c$,"setBackgroundArgb",function(a){this.bgcolor=a;this.setCel(this.shader.celOn)},"~N");b(c$,"setBackgroundImage",function(a){this.backgroundImage=a},"~O");b(c$,"setWindowParameters",function(a,c,d){this.setWinParams(a,c,d)},"~N,~N,~B");b(c$,"setWinParams",function(a,c,d){this.newWindowWidth=a;this.newWindowHeight=c;this.newAntialiasing=d},"~N,~N,~B");b(c$,"setNewWindowParametersForExport",function(){this.windowWidth=this.newWindowWidth;this.windowHeight=
this.newWindowHeight;this.setWidthHeight(!1)});b(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");b(c$,"beginRendering",function(){},"JU.M3,~B,~B,~B");b(c$,"endRendering",
function(){});b(c$,"snapshotAnaglyphChannelBytes",function(){});b(c$,"getScreenImage",function(){return null},"~B");b(c$,"releaseScreenImage",function(){});b(c$,"applyAnaglygh",function(){},"J.constant.EnumStereoMode,~A");b(c$,"setPass2",function(){return!1},"~B");b(c$,"destroy",function(){});b(c$,"clearFontCache",function(){});b(c$,"plotImage",function(){},"~N,~N,~N,java.awt.Image,J.api.JmolRendererInterface,~N,~N,~N");b(c$,"plotText",function(){},"~N,~N,~N,~N,~N,~S,javajs.awt.Font,J.api.JmolRendererInterface");
b(c$,"renderBackground",function(){},"J.api.JmolRendererInterface");b(c$,"getFont3DCurrent",function(){return null});b(c$,"setFont",function(){},"javajs.awt.Font");b(c$,"setFontFid",function(){},"~N");b(c$,"setColor",function(a){this.argbCurrent=a},"~N");b(c$,"isPass2",function(){return this.$isPass2});b(c$,"setColix",function(){return!0},"~N");b(c$,"isDirectedTowardsCamera",function(){return!0},"~N");b(c$,"getTransformedVertexVectors",function(){return null});b(c$,"setNoisySurfaceShade",function(){},
"JU.P3i,JU.P3i,JU.P3i");c$.roundInt=b(c$,"roundInt",function(a){return a},"~N");b(c$,"clear",function(){});e(c$,"renderAllStrings",function(){},"~O");c$.getScreenOctant=b(c$,"getScreenOctant",function(a){var c=0;0>a.x&&(c|=1);0>a.y&&(c|=2);0>a.z&&(c|=4);return c},"JU.P3");b(c$,"addRenderer",function(){},"~N");B(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)});p("J.util");q(["J.api.JmolAppletInterface","$.JmolStatusListener","java.util.Hashtable"],"J.util.GenericApplet","java.lang.Boolean java.net.URL javajs.awt.Dimension JU.List $.PT $.SB J.constant.EnumCallback J.i18n.GT J.util.Escape $.Logger J.viewer.JC $.Viewer".split(" "),function(){c$=u(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.viewerOptions=
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;t(this,arguments)},J.util,"GenericApplet",null,[J.api.JmolAppletInterface,J.api.JmolStatusListener]);N(c$,function(){this.b$=new java.util.Hashtable});b(c$,"init",function(a){this.appletObject=a;this.htmlName=this.getParameter("name");this.syncId=this.getParameter("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]"');J.util.Logger.setLogLevel(a);J.i18n.GT.ignoreApplicationBundle();this.initOptions();J.util.GenericApplet.checkIn(this.fullName,this.appletObject);this.initApplication()},"~O");b(c$,"initApplication",
function(){this.viewerOptions.put("applet",Boolean.TRUE);null==this.getParameter("statusListener")&&this.viewerOptions.put("statusListener",this);this.viewer=new J.viewer.Viewer(this.viewerOptions);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 c,a=0,d=J.constant.EnumCallback.values();a<d.length&&((c=d[a])||1);a++)this.setValue(c.name()+"Callback",null);this.loading=!1;this.language=this.getParameter("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.constant.EnumCallback.SCRIPT)&&
null==this.b$.get(J.constant.EnumCallback.ERROR)&&(null!=this.b$.get(J.constant.EnumCallback.MESSAGE)||null!=this.statusForm||null!=this.statusText))this.doTranslate&&null==this.getValue("doTranslate",null)&&(this.doTranslate=!1,J.util.Logger.warn("Note -- Presence of message callback disables disable translation; to enable message translation use jmolSetTranslation(true) prior to jmolApplet()")),this.doTranslate&&J.util.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),J.util.Logger.warn("Note -- language translation disabled"));this.getBooleanValue("popupMenu",!0)||this.viewer.getProperty("DATA_API","disablePopupMenu",null);c=this.getValue("script","");a=this.getValue("loadInline",null);if(null==a){if(null!=(a=this.getValue("load",null)))c='load "'+a+'";'+c;a=null}this.viewer.popHoldRepaint("applet init");null!=a&&null!=this.viewer.loadInline(a)&&(c="");0<c.length&&this.scriptProcessor(c,null,2);this.viewer.notifyStatusReady(!0)});
e(c$,"destroy",function(){this.gRight=null;this.viewer.notifyStatusReady(!1);this.viewer=null;J.util.GenericApplet.checkOut(this.fullName)});b(c$,"getBooleanValue",function(a,c){var d=this.getValue(a,c?"true":"");return d.equalsIgnoreCase("true")||d.equalsIgnoreCase("on")||d.equalsIgnoreCase("yes")},"~S,~B");b(c$,"getValue",function(a,c){var d=this.getParameter(a);System.out.println("Jmol getValue "+a+" "+d);return null==d?c:d},"~S,~S");b(c$,"getValueLowerCase",function(a,c){var d=this.getValue(a,
c);null!=d&&(d=d.trim().toLowerCase(),0==d.length&&(d=null));return d},"~S,~S");b(c$,"setValue",function(a,c){this.setStringProperty(a,this.getValue(a,c))},"~S,~S");b(c$,"setStringProperty",function(a,c){null!=c&&(J.util.Logger.info(a+' = "'+c+'"'),this.viewer.setStringProperty(a,c))},"~S,~S");b(c$,"scriptProcessor",function(a,c,d){if(null==a||0==a.length)return"";switch(d){case 0:return a=this.viewer.scriptCheck(a),s(a,String)?a:"";case 1:return null!=c?this.viewer.scriptWaitStatus(a,c).toString():
this.viewer.scriptWait(a);default:return this.viewer.script(a)}},"~S,~S,~N");e(c$,"register",function(a,c){J.util.GenericApplet.checkIn(a,c)},"~S,J.api.JmolSyncInterface");e(c$,"getJSpecViewProperty",function(){return null},"~S");b(c$,"syncScript",function(a){this.viewer.syncScript(a,"~",0)},"~S");e(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");e(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"),
[J.viewer.JC.version,J.viewer.JC.date])+"\nhtmlName = "+J.util.Escape.eS(this.htmlName)+"\nsyncId = "+J.util.Escape.eS(this.syncId)+"\ndocumentBase = "+J.util.Escape.eS(this.documentBase)+"\ncodeBase = "+J.util.Escape.eS(this.codeBase)});e(c$,"script",function(a){this.scriptNoWait(a)},"~S");e(c$,"scriptCheck",function(a){return null==a||0==a.length?"":this.scriptProcessor(a,null,0)},"~S");e(c$,"scriptNoWait",function(a){return null==a||0==a.length?"":this.scriptProcessor(a,null,2)},"~S");b(c$,"scriptWait",
function(a){return this.scriptWait(a,null)},"~S");b(c$,"scriptWait",function(a,c){if(null==a||0==a.length)return"";this.outputBuffer=null;return this.scriptProcessor(a,c,1)},"~S,~S");e(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");e(c$,"getProperty",function(a,c){c||(c="");return this.viewer.getProperty(null,a,c)},"~S,~S");
e(c$,"getPropertyAsString",function(a,c){c||(c="");return this.viewer.getProperty("readable",a,c).toString()},"~S,~S");e(c$,"getPropertyAsJSON",function(a,c){c||(c="");return this.viewer.getProperty("JSON",a,c).toString()},"~S,~S");e(c$,"loadInlineString",function(a,c,d){a=this.viewer.loadInlineAppend(a,d);null==a&&this.script(c);return a},"~S,~S,~B");e(c$,"loadInlineArray",function(a,c,d){if(null==a||0==a.length)return null;a=this.viewer.loadInline(a,d);null==a&&this.script(c);return a},"~A,~S,~B");
e(c$,"loadDOMNode",function(a){return this.viewer.openDOM(a)},"~O");b(c$,"loadInline",function(a){return this.loadInlineString(a,"",!1)},"~S");b(c$,"loadInline",function(a,c){return this.loadInlineString(a,c,!1)},"~S,~S");b(c$,"loadInline",function(a){return this.loadInlineArray(a,"",!1)},"~A");b(c$,"loadInline",function(a,c){return this.loadInlineArray(a,c,!1)},"~A,~S");b(c$,"output",function(a){null!=this.outputBuffer&&null!=a&&this.outputBuffer.append(a).appendC("\n")},"~S");e(c$,"setCallbackFunction",
function(a,c){if(!a.equalsIgnoreCase("modelkit"))if(a.equalsIgnoreCase("language"))this.consoleMessage(""),this.consoleMessage(null);else{var d=J.constant.EnumCallback.getCallback(a);null!=d&&(this.loading||d!==J.constant.EnumCallback.EVAL)?null==c?this.b$.remove(d):this.b$.put(d,c):this.consoleMessage("Available callbacks include: "+J.constant.EnumCallback.getNameList().$replace(";"," ").trim())}},"~S,~S");b(c$,"consoleMessage",function(a){this.notifyCallback(J.constant.EnumCallback.ECHO,["",a])},
"~S");e(c$,"notifyEnabled",function(a){switch(a){case J.constant.EnumCallback.ECHO:case J.constant.EnumCallback.MESSAGE:case J.constant.EnumCallback.MEASURE:case J.constant.EnumCallback.PICK:case J.constant.EnumCallback.SYNC:return!0;case J.constant.EnumCallback.ANIMFRAME:case J.constant.EnumCallback.ERROR:case J.constant.EnumCallback.EVAL:case J.constant.EnumCallback.LOADSTRUCT:case J.constant.EnumCallback.STRUCTUREMODIFIED:case J.constant.EnumCallback.SCRIPT:return!this.isJNLP}return null!=this.b$.get(a)},
"J.constant.EnumCallback");b(c$,"notifyCallback",function(a,c){var d=this.b$.get(a),b=null!=d&&(null==c||null==c[0]),f=!1;null!=c&&(c[0]=this.htmlName);var g=null==c||null==c[1]?null:c[1].toString();switch(a){case J.constant.EnumCallback.APPLETREADY:c[3]=this.appletObject;break;case J.constant.EnumCallback.CLICK:"alert".equals(d)&&(g="x="+c[1]+" y="+c[2]+" action="+c[3]+" clickCount="+c[4]);break;case J.constant.EnumCallback.ANIMFRAME:var e=c[1],l=e[0],j=e[1],k=e[2],m=e[3],e=e[4],p=-2>=l,r=0>m?-1:
1,x=0>e?-1:1;b&&(c=[this.htmlName,Integer.$valueOf(Math.max(l,-2-l)),Integer.$valueOf(j),Integer.$valueOf(k),Integer.$valueOf(Math.abs(m)),Integer.$valueOf(Math.abs(e)),Integer.$valueOf(p?1:0),Integer.$valueOf(r),Integer.$valueOf(x)]);break;case J.constant.EnumCallback.ECHO:j=(l=2==c.length)||1==c[2].intValue();b||(j&&(f=!0),b=!l&&null!=(d=this.b$.get(a=J.constant.EnumCallback.MESSAGE)));f||this.output(g);break;case J.constant.EnumCallback.LOADSTRUCT:l=c[4];if(null!=l){l=(0<=l.indexOf("NOTE:")?"":
J.i18n.GT._("File Error:"))+l;this.doShowStatus(l);this.notifyCallback(J.constant.EnumCallback.MESSAGE,["",l]);return}break;case J.constant.EnumCallback.MEASURE:b||(b=null!=(d=this.b$.get(a=J.constant.EnumCallback.MESSAGE)));l=c[3];0<=l.indexOf("Picked")||0<=l.indexOf("Sequence")?(this.doShowStatus(g),f=!0):0<=l.indexOf("Completed")&&(g=l+": "+g,f=!0);break;case J.constant.EnumCallback.MESSAGE:f=!b;b=(new Boolean(b&null!=g)).valueOf();f||this.output(g);break;case J.constant.EnumCallback.PICK:this.doShowStatus(g);
f=!0;break;case J.constant.EnumCallback.SCRIPT:!(0<c[3].intValue())&&!b&&(b=null!=(d=this.b$.get(a=J.constant.EnumCallback.MESSAGE)));this.output(g);this.doShowStatus(g);break;case J.constant.EnumCallback.STRUCTUREMODIFIED:this.notifyStructureModified(c[1].intValue(),c[2].intValue());break;case J.constant.EnumCallback.SYNC:this.sendScript(g,c[2],!0,b);return}f&&(f=this.viewer.getProperty("DATA_API","getAppConsole",null),null!=f&&(f.notifyCallback(a,c),this.output(g),this.doSendJsTextareaStatus(g)));
if(b&&this.mayScript)try{this.doSendCallback(d,c,g)}catch(q){if(y(q,Exception))this.haveNotifiedError||J.util.Logger.debugging&&J.util.Logger.debug(a.name()+"Callback call error to "+d+": "+q),this.haveNotifiedError=!0;else throw q;}},"J.constant.EnumCallback,~A");b(c$,"notifyStructureModified",function(){},"~N,~N");b(c$,"sendScript",function(a,c,d,b){if(b&&(a=this.notifySync(a,c),null==a||0==a.length||a.equals("0")))return"";var f=new JU.List;J.util.GenericApplet.findApplets(c,this.syncId,this.fullName,
f);var g=f.size();if(0==g)return!b&&!c.equals("*")&&J.util.Logger.error(this.fullName+" couldn't find applet "+c),"";c=d?null:new JU.SB;b=d&&a.equals("GET_GRAPHICS");var e=d&&a.equals("SET_GRAPHICS_OFF");b&&(this.gRight=null);for(var l=0;l<g;l++){var j=f.get(l),k=J.util.GenericApplet.htRegistry.get(j);J.util.Logger.debugging&&J.util.Logger.debug(this.fullName+" sending to "+j+": "+a);try{if(b||e)return this.isStereoSlave=b,this.gRight=k.setStereoGraphics(b),"";d?k.syncScript(a):c.append(k.scriptWait(a,
"output")).append("\n")}catch(m){if(y(m,Exception))j=this.htmlName+" couldn't send to "+j+": "+a+": "+m,J.util.Logger.error(j),d||c.append(j);else throw m;}}return d?"":c.toString()},"~S,~S,~B,~B");b(c$,"notifySync",function(a,c){var d=this.b$.get(J.constant.EnumCallback.SYNC);if(!this.mayScript||null==d)return a;try{return this.doSendCallback(d,[this.htmlName,a,c],null)}catch(b){if(y(b,Exception))this.haveNotifiedError||J.util.Logger.debugging&&J.util.Logger.debug("syncCallback call error to "+d+
": "+b),this.haveNotifiedError=!0;else throw b;}return a},"~S,~S");e(c$,"eval",function(a){var c=a.indexOf("\u0001");return 0<=c?this.sendScript(a.substring(c+1),a.substring(0,c),!1,!1):!this.haveDocumentAccess?"NO EVAL ALLOWED":null!=this.b$.get(J.constant.EnumCallback.EVAL)?(this.notifyCallback(J.constant.EnumCallback.EVAL,[null,a]),""):this.doEval(a)},"~S");e(c$,"functionXY",function(a,c,d){return this.doFunctionXY(a,c,d)},"~S,~N,~N");e(c$,"functionXYZ",function(a,c,d,b){return this.doFunctionXYZ(a,
c,d,b)},"~S,~N,~N,~N");e(c$,"createImage",function(){return null},"~S,~S,~O,~N");e(c$,"getRegistryInfo",function(){J.util.GenericApplet.checkIn(null,null);return J.util.GenericApplet.htRegistry});e(c$,"showUrl",function(a){J.util.Logger.debugging&&J.util.Logger.debug("showUrl("+a+")");if(null!=a&&0<a.length)try{this.doShowDocument(new java.net.URL(fa("java.net.URL"),a,null))}catch(c){if(y(c,java.net.MalformedURLException))this.consoleMessage("Malformed URL:"+a);else throw c;}},"~S");e(c$,"resizeInnerPanel",
function(){return new javajs.awt.Dimension(0,0)},"~S");c$.checkIn=b(c$,"checkIn",function(a,c){null!=a&&(J.util.Logger.info("AppletRegistry.checkIn("+a+")"),J.util.GenericApplet.htRegistry.put(a,c));if(J.util.Logger.debugging)for(var d,b=J.util.GenericApplet.htRegistry.entrySet().iterator();b.hasNext()&&((d=b.next())||1);){var f=d.getKey();J.util.Logger.debug(f+" "+d.getValue())}},"~S,~O");c$.checkOut=b(c$,"checkOut",function(a){J.util.GenericApplet.htRegistry.remove(a)},"~S");c$.findApplets=b(c$,
"findApplets",function(a,c,d,b){if(null!=a&&0<=a.indexOf(",")){var f=JU.PT.split(a,",");for(a=0;a<f.length;a++)J.util.GenericApplet.findApplets(f[a],c,d,b)}else if(c="__"+c+"__",null==a||a.equals("*")||a.equals(">"))for(a=J.util.GenericApplet.htRegistry.keySet().iterator();a.hasNext()&&((f=a.next())||1);)!f.equals(d)&&0<f.indexOf(c)&&b.addLast(f);else 0>a.indexOf("__")&&(a+=c),J.util.GenericApplet.htRegistry.containsKey(a)||(a="jmolApplet"+a),!a.equals(d)&&J.util.GenericApplet.htRegistry.containsKey(a)&&
b.addLast(a)},"~S,~S,~S,JU.List");c$.htRegistry=c$.prototype.htRegistry=new java.util.Hashtable;B(c$,"SCRIPT_CHECK",0,"SCRIPT_WAIT",1,"SCRIPT_NOWAIT",2)});p("J.util");q(["JU.AU"],"J.util.Geodesic",["java.lang.NullPointerException","$.Short","java.util.Hashtable","JU.V3"],function(){c$=G(J.util,"Geodesic");c$.getNeighborVertexesArrays=b(c$,"getNeighborVertexesArrays",function(){null==J.util.Geodesic.vertexCounts&&J.util.Geodesic.createGeodesic(3);return J.util.Geodesic.neighborVertexesArrays});c$.getVertexCount=
b(c$,"getVertexCount",function(a){null==J.util.Geodesic.vertexCounts&&J.util.Geodesic.createGeodesic(3);return J.util.Geodesic.vertexCounts[a]},"~N");c$.getVertexVectors=b(c$,"getVertexVectors",function(){null==J.util.Geodesic.vertexCounts&&J.util.Geodesic.createGeodesic(3);return J.util.Geodesic.vertexVectors});c$.getVertexVector=b(c$,"getVertexVector",function(a){return J.util.Geodesic.vertexVectors[a]},"~N");c$.getFaceVertexes=b(c$,"getFaceVertexes",function(a){return J.util.Geodesic.faceVertexesArrays[a]},
"~N");c$.createGeodesic=b(c$,"createGeodesic",function(a){if(!(a<J.util.Geodesic.currentLevel)){J.util.Geodesic.currentLevel=a;var c=ea(a+1,0);J.util.Geodesic.neighborVertexesArrays=JU.AU.newShort2(a+1);J.util.Geodesic.faceVertexesArrays=JU.AU.newShort2(a+1);J.util.Geodesic.vertexVectors=Array(12);J.util.Geodesic.vertexVectors[0]=JU.V3.new3(0,0,J.util.Geodesic.halfRoot5);for(var d=0;5>d;++d)J.util.Geodesic.vertexVectors[d+1]=JU.V3.new3(Math.cos(1.2566371*d),Math.sin(1.2566371*d),0.5),J.util.Geodesic.vertexVectors[d+
6]=JU.V3.new3(Math.cos(1.2566371*d+0.62831855),Math.sin(1.2566371*d+0.62831855),-0.5);J.util.Geodesic.vertexVectors[11]=JU.V3.new3(0,0,-J.util.Geodesic.halfRoot5);for(d=12;0<=--d;)J.util.Geodesic.vertexVectors[d].normalize();J.util.Geodesic.faceVertexesArrays[0]=J.util.Geodesic.faceVertexesIcosahedron;J.util.Geodesic.neighborVertexesArrays[0]=J.util.Geodesic.neighborVertexesIcosahedron;c[0]=12;for(d=0;d<a;++d)J.util.Geodesic.quadruple(d,c);J.util.Geodesic.vertexCounts=c}},"~N");c$.quadruple=b(c$,
"quadruple",function(a,c){J.util.Geodesic.htVertex=new java.util.Hashtable;var d=J.util.Geodesic.vertexVectors.length,b=J.util.Geodesic.faceVertexesArrays[a],f=b.length,g=m(f/3),e=d+(d+g-2),g=4*g;J.util.Geodesic.vertexVectors=JU.AU.arrayCopyObject(J.util.Geodesic.vertexVectors,e);g=ea(3*g,0);J.util.Geodesic.faceVertexesArrays[a+1]=g;var l=ea(6*e,0);J.util.Geodesic.neighborVertexesArrays[a+1]=l;for(var j=l.length;0<=--j;)l[j]=-1;c[a+1]=e;J.util.Geodesic.vertexNext=d;for(j=d=0;j<f;){var k=b[j++],v=
b[j++],p=b[j++],r=J.util.Geodesic.getVertex(k,v),x=J.util.Geodesic.getVertex(v,p),q=J.util.Geodesic.getVertex(p,k);g[d++]=k;g[d++]=r;g[d++]=q;g[d++]=v;g[d++]=x;g[d++]=r;g[d++]=p;g[d++]=q;g[d++]=x;g[d++]=q;g[d++]=r;g[d++]=x;J.util.Geodesic.addNeighboringVertexes(l,r,k);J.util.Geodesic.addNeighboringVertexes(l,r,q);J.util.Geodesic.addNeighboringVertexes(l,r,x);J.util.Geodesic.addNeighboringVertexes(l,r,v);J.util.Geodesic.addNeighboringVertexes(l,x,v);J.util.Geodesic.addNeighboringVertexes(l,x,q);J.util.Geodesic.addNeighboringVertexes(l,
x,p);J.util.Geodesic.addNeighboringVertexes(l,q,p);J.util.Geodesic.addNeighboringVertexes(l,q,k)}f=J.util.Geodesic.vertexVectors.length;if(d!=g.length)throw new NullPointerException;if(J.util.Geodesic.vertexNext!=e)throw new NullPointerException;for(j=0;12>j;++j)for(b=0;5>b;++b){d=l[6*j+b];if(0>d)throw new NullPointerException;if(d>=f)throw new NullPointerException;if(-1!=l[6*j+5])throw new NullPointerException;}for(j=72;j<l.length;++j){d=l[j];if(0>d)throw new NullPointerException;if(d>=f)throw new NullPointerException;
}for(j=0;j<e;++j){f=0;for(b=l.length;0<=--b;)l[b]==j&&++f;if(12>j&&5!=f||12<=j&&6!=f)throw new NullPointerException;f=0;for(b=g.length;0<=--b;)g[b]==j&&++f;if(12>j&&5!=f||12<=j&&6!=f)throw new NullPointerException;}J.util.Geodesic.htVertex=null},"~N,~A");c$.addNeighboringVertexes=b(c$,"addNeighboringVertexes",function(a,c,d){for(var b=6*c,f=b+6;b<f;++b){if(a[b]==d)return;if(0>a[b]){a[b]=d;for(var g=6*d,e=g+6;g<e;++g){if(a[g]==c)return;if(0>a[g]){a[g]=c;return}}}}throw new NullPointerException;},"~A,~N,~N");
c$.getVertex=b(c$,"getVertex",function(a,c){if(a>c){var d=a;a=c;c=d}var d=Integer.$valueOf((a<<16)+c),b=J.util.Geodesic.htVertex.get(d);if(null!=b)return b.shortValue();b=J.util.Geodesic.vertexVectors[J.util.Geodesic.vertexNext]=new JU.V3;b.add2(J.util.Geodesic.vertexVectors[a],J.util.Geodesic.vertexVectors[c]);b.normalize();J.util.Geodesic.htVertex.put(d,Short.$valueOf(J.util.Geodesic.vertexNext));return J.util.Geodesic.vertexNext++},"~N,~N");c$.halfRoot5=c$.prototype.halfRoot5=0.5*Math.sqrt(5);
B(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)});p("J.util");c$=u(function(){this.entryCount=0;this.entries=null;la("J.util.Int2IntHash.Entry")||J.util.Int2IntHash.$Int2IntHash$Entry$();t(this,arguments)},J.util,"Int2IntHash");w(c$,function(a){this.entries=Array(a)},"~N");b(c$,"get",function(a){for(var c=this.entries,c=c[(a&2147483647)%c.length];null!=c;c=c.next)if(c.key==a)return c.value;return-2147483648},"~N");b(c$,"put",function(a,c){for(var d=this.entries,
b=(a&2147483647)%d.length,b=d[b];null!=b;b=b.next)if(b.key==a){b.value=c;return}this.entryCount>d.length&&this.rehash();d=this.entries;b=(a&2147483647)%d.length;d[b]=ka(J.util.Int2IntHash.Entry,this,null,a,c,d[b]);++this.entryCount},"~N,~N");b(c$,"rehash",function(){for(var a=this.entries,c=a.length,d=2*c+1,b=Array(d);0<=--c;)for(var f=a[c];null!=f;){var g=f,f=f.next,e=(g.key&2147483647)%d;g.next=b[e];b[e]=g}this.entries=b});c$.$Int2IntHash$Entry$=function(){aa();c$=u(function(){ma(this,arguments);
this.value=this.key=0;this.next=null;t(this,arguments)},J.util.Int2IntHash,"Entry");w(c$,function(a,c,d){this.key=a;this.value=c;this.next=d},"~N,~N,J.util.Int2IntHash.Entry");c$=$()};p("J.util");q(["java.lang.Enum"],"J.util.JmolEdge",null,function(){c$=u(function(){this.index=-1;this.order=0;t(this,arguments)},J.util,"JmolEdge");c$.getArgbHbondType=b(c$,"getArgbHbondType",function(a){return J.util.JmolEdge.argbsHbondType[(a&30720)>>11]},"~N");c$.getBondOrderNumberFromOrder=b(c$,"getBondOrderNumberFromOrder",
function(a){a&=-131073;return 131071==a||65535==a?"0":J.modelset.Bond.isOrderH(a)||0!=(a&256)?J.util.JmolEdge.EnumBondOrder.SINGLE.number:0!=(a&224)?(a>>5)+"."+(a&31):J.util.JmolEdge.EnumBondOrder.getNumberFromCode(a)},"~N");c$.getCmlBondOrder=b(c$,"getCmlBondOrder",function(a){a=J.util.JmolEdge.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=b(c$,"getBondOrderNameFromOrder",function(a){a&=-131073;switch(a){case 65535:case 131071:return"";case 32768:return J.util.JmolEdge.EnumBondOrder.STRUT.$$name;case 1:return J.util.JmolEdge.EnumBondOrder.SINGLE.$$name;case 2:return J.util.JmolEdge.EnumBondOrder.DOUBLE.$$name}return 0!=(a&224)?"partial "+J.util.JmolEdge.getBondOrderNumberFromOrder(a):J.modelset.Bond.isOrderH(a)?J.util.JmolEdge.EnumBondOrder.H_REGULAR.$$name:
0!=(a&256)?J.util.JmolEdge.EnumBondOrder.SINGLE.$$name:J.util.JmolEdge.EnumBondOrder.getNameFromCode(a)},"~N");c$.getPartialBondDotted=b(c$,"getPartialBondDotted",function(a){return a&31},"~N");c$.getPartialBondOrder=b(c$,"getPartialBondOrder",function(a){return(a&-131073)>>5},"~N");c$.getCovalentBondOrder=b(c$,"getCovalentBondOrder",function(a){if(0==(a&1023))return 0;a&=-131073;if(0!=(a&224))return J.util.JmolEdge.getPartialBondOrder(a);0!=(a&256)&&(a&=-257);0!=(a&248)&&(a=1);return a&7},"~N");
c$.getBondOrderFromFloat=b(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=b(c$,"getBondOrderFromString",function(a){return J.util.JmolEdge.EnumBondOrder.getCodeFromName(a)},"~S");aa();c$=u(function(){this.code=0;this.$$name=this.number=null;t(this,arguments)},J.util.JmolEdge,
"EnumBondOrder",Enum);w(c$,function(a,c,d){this.code=a;this.number=c;this.$$name=d},"~N,~S,~S");c$.getCodeFromName=b(c$,"getCodeFromName",function(a){for(var c,d=0,b=J.util.JmolEdge.EnumBondOrder.values();d<b.length&&((c=b[d])||1);d++)if(c.$$name.equalsIgnoreCase(a))return c.code;return 131071},"~S");c$.getNameFromCode=b(c$,"getNameFromCode",function(a){for(var c,d=0,b=J.util.JmolEdge.EnumBondOrder.values();d<b.length&&((c=b[d])||1);d++)if(c.code==a)return c.$$name;return"?"},"~N");c$.getNumberFromCode=
b(c$,"getNumberFromCode",function(a){for(var c,d=0,b=J.util.JmolEdge.EnumBondOrder.values();d<b.length&&((c=b[d])||1);d++)if(c.code==a)return c.number;return"?"},"~N");r(c$,"SINGLE",0,[1,"1","single"]);r(c$,"DOUBLE",1,[2,"2","double"]);r(c$,"TRIPLE",2,[3,"3","triple"]);r(c$,"QUADRUPLE",3,[4,"4","quadruple"]);r(c$,"AROMATIC",4,[515,"1.5","aromatic"]);r(c$,"STRUT",5,[32768,"1","struts"]);r(c$,"H_REGULAR",6,[2048,"1","hbond"]);r(c$,"PARTIAL01",7,[33,"0.5","partial"]);r(c$,"PARTIAL12",8,[66,"1.5","partialDouble"]);
r(c$,"PARTIAL23",9,[97,"2.5","partialTriple"]);r(c$,"PARTIAL32",10,[100,"2.5","partialTriple2"]);r(c$,"AROMATIC_SINGLE",11,[513,"1","aromaticSingle"]);r(c$,"AROMATIC_DOUBLE",12,[514,"2","aromaticDouble"]);r(c$,"UNSPECIFIED",13,[17,"1","unspecified"]);c$=$();B(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_AS_SINGLE",65536,"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)});p("J.util");q(["J.util.Elements"],"J.util.JmolMolecule",["JU.AU","$.BS","J.util.BSUtil"],function(){c$=u(function(){this.nodes=null;this.nElements=this.atomCount=
this.firstAtomIndex=this.indexInModel=this.modelIndex=this.moleculeIndex=0;this.altElementCounts=this.elementCounts=null;this.altElementMax=this.elementNumberMax=0;this.atomList=this.mf=null;t(this,arguments)},J.util,"JmolMolecule");N(c$,function(){this.elementCounts=D(J.util.Elements.elementNumberMax,0);this.altElementCounts=D(J.util.Elements.altElementMax,0)});w(c$,function(){});c$.getMolecules=b(c$,"getMolecules",function(a,c,d,b){var f=null,g=new JU.BS,e=-1,l=0,j=0,k=Array(4);null==b&&(b=new JU.BS);
for(var m=0;m<a.length;m++)if(!b.get(m)&&!g.get(m))if(a[m].isDeleted())b.set(m);else{var p=a[m].getModelIndex();p!=e&&(e=p,l=0,f=c[p]);g=J.util.JmolMolecule.getBranchBitSet(a,m,f,d,-1,!0,!0);0<=g.nextSetBit(0)&&(k=J.util.JmolMolecule.addMolecule(k,j++,a,m,g,p,l++,b))}return J.util.JmolMolecule.allocateArray(k,j)},"~A,~A,JU.List,JU.BS");c$.getBranchBitSet=b(c$,"getBranchBitSet",function(a,c,b,n,f,g,e){var l=J.util.BSUtil.newBitSet(a.length);if(0>c)return l;0<=f&&b.clear(f);return J.util.JmolMolecule.getCovalentlyConnectedBitSet(a,
a[c],b,g,e,n,l)?l:new JU.BS},"~A,~N,JU.BS,JU.List,~N,~B,~B");c$.addMolecule=b(c$,"addMolecule",function(a,c,b,n,f,g,e,l){l.or(f);c==a.length&&(a=J.util.JmolMolecule.allocateArray(a,2*c+1));a[c]=J.util.JmolMolecule.initialize(b,c,n,f,g,e);return a},"~A,~N,~A,~N,JU.BS,~N,~N,JU.BS");c$.getMolecularFormula=b(c$,"getMolecularFormula",function(a,c,b){var n=new J.util.JmolMolecule;n.nodes=a;n.atomList=c;return n.getMolecularFormula(b)},"~A,JU.BS,~B");b(c$,"getMolecularFormula",function(a){if(null!=this.mf)return this.mf;
this.getElementAndAtomCount(a);for(var c=a="",b,n=1;n<=this.elementNumberMax;n++)b=this.elementCounts[n],0!=b&&(a+=c+J.util.Elements.elementSymbolFromNumber(n)+" "+b,c=" ");for(n=1;n<=this.altElementMax;n++)b=this.altElementCounts[n],0!=b&&(a+=c+J.util.Elements.elementSymbolFromNumber(J.util.Elements.altElementNumberFromIndex(n))+" "+b,c=" ");return a},"~B");c$.initialize=b(c$,"initialize",function(a,c,b,n,f,g){var e=new J.util.JmolMolecule;e.nodes=a;e.firstAtomIndex=b;e.atomList=n;e.atomCount=n.cardinality();
e.moleculeIndex=c;e.modelIndex=f;e.indexInModel=g;return e},"~A,~N,~N,JU.BS,~N,~N");b(c$,"getElementAndAtomCount",function(a){null==this.atomList&&(this.atomList=new JU.BS,this.atomList.setBits(0,this.nodes.length));this.elementCounts=D(J.util.Elements.elementNumberMax,0);this.altElementCounts=D(J.util.Elements.altElementMax,0);this.atomCount=this.atomList.cardinality();for(var c=this.atomList.nextSetBit(0);0<=c;c=this.atomList.nextSetBit(c+1)){var b=this.nodes[c].getAtomicAndIsotopeNumber();b<J.util.Elements.elementNumberMax?
(this.elementCounts[b]++,1==this.elementCounts[b]&&this.nElements++,this.elementNumberMax=Math.max(this.elementNumberMax,b),a&&(b=this.nodes[c].getImplicitHydrogenCount(),0<b&&(0==this.elementCounts[1]&&this.nElements++,this.elementCounts[1]+=b))):(b=J.util.Elements.altElementIndexFromNumber(b),this.altElementCounts[b]++,1==this.altElementCounts[b]&&this.nElements++,this.altElementMax=Math.max(this.altElementMax,b))}},"~B");c$.getCovalentlyConnectedBitSet=b(c$,"getCovalentlyConnectedBitSet",function(a,
c,b,n,f,g,e){var l=c.getIndex();if(!b.get(l)||!f&&0<c.getBioStructureTypeName().length)return n;b.clear(l);if(null!=g&&!e.get(l))for(var j=g.size();0<=--j;){var k=g.get(j);if(k.get(l)){e.or(k);b.andNot(k);for(j=k.nextSetBit(0);0<=j;j=k.nextSetBit(j+1)){var m=a[j];b.set(j);J.util.JmolMolecule.getCovalentlyConnectedBitSet(a,m,b,n,f,g,e);b.clear(j)}break}}e.set(l);l=c.getEdges();if(null==l)return!0;for(j=l.length;0<=--j;)if(k=l[j],k.isCovalent()&&!J.util.JmolMolecule.getCovalentlyConnectedBitSet(a,k.getOtherAtomNode(c),
b,n,f,g,e))return!1;return!0},"~A,J.util.JmolNode,JU.BS,~B,~B,JU.List,JU.BS");c$.allocateArray=b(c$,"allocateArray",function(a,c){return c==a.length?a:JU.AU.arrayCopyObject(a,c)},"~A,~N")});p("J.util");P(J.util,"JmolNode");p("J.util");q(["java.util.Hashtable","J.util.DefaultLogger"],"J.util.Logger",["java.lang.Long"],function(){c$=G(J.util,"Logger");c$.getProperty=b(c$,"getProperty",function(a,c){try{var b=System.getProperty("jmol.logger."+a,null);if(null!=b)return b.equalsIgnoreCase("true")}catch(n){if(!y(n,
Exception))throw n;}return c},"~S,~B");c$.setLogger=b(c$,"setLogger",function(a){J.util.Logger._logger=a;J.util.Logger.debugging=J.util.Logger.isActiveLevel(5)||J.util.Logger.isActiveLevel(6);J.util.Logger.debuggingHigh=J.util.Logger.debugging&&J.util.Logger._activeLevels[6]},"J.util.LoggerInterface");c$.isActiveLevel=b(c$,"isActiveLevel",function(a){return null!=J.util.Logger._logger&&0<=a&&7>a&&J.util.Logger._activeLevels[a]},"~N");c$.setActiveLevel=b(c$,"setActiveLevel",function(a,c){0>a&&(a=0);
7<=a&&(a=6);J.util.Logger._activeLevels[a]=c;J.util.Logger.debugging=J.util.Logger.isActiveLevel(5)||J.util.Logger.isActiveLevel(6);J.util.Logger.debuggingHigh=J.util.Logger.debugging&&J.util.Logger._activeLevels[6]},"~N,~B");c$.setLogLevel=b(c$,"setLogLevel",function(a){for(var c=7;0<=--c;)J.util.Logger.setActiveLevel(c,c<=a)},"~N");c$.getLevel=b(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=b(c$,"logLevel",function(){return J.util.Logger._logLevel});c$.doLogLevel=b(c$,"doLogLevel",function(a){J.util.Logger._logLevel=a},"~B");c$.debug=b(c$,"debug",function(a){if(J.util.Logger.debugging)try{J.util.Logger._logger.debug(a)}catch(c){}},"~S");c$.info=b(c$,"info",function(a){try{J.util.Logger.isActiveLevel(4)&&J.util.Logger._logger.info(a)}catch(c){}},"~S");c$.warn=b(c$,"warn",function(a){try{J.util.Logger.isActiveLevel(3)&&J.util.Logger._logger.warn(a)}catch(c){}},"~S");
c$.warnEx=b(c$,"warnEx",function(a,c){try{J.util.Logger.isActiveLevel(3)&&J.util.Logger._logger.warnEx(a,c)}catch(b){}},"~S,Throwable");c$.error=b(c$,"error",function(a){try{J.util.Logger.isActiveLevel(2)&&J.util.Logger._logger.error(a)}catch(c){}},"~S");c$.errorEx=b(c$,"errorEx",function(a,c){try{J.util.Logger.isActiveLevel(2)&&J.util.Logger._logger.errorEx(a,c)}catch(b){}},"~S,Throwable");c$.getLogLevel=b(c$,"getLogLevel",function(){for(var a=7;0<=--a;)if(J.util.Logger.isActiveLevel(a))return a;
return 0});c$.fatal=b(c$,"fatal",function(a){try{J.util.Logger.isActiveLevel(1)&&J.util.Logger._logger.fatal(a)}catch(c){}},"~S");c$.fatalEx=b(c$,"fatalEx",function(a,c){try{J.util.Logger.isActiveLevel(1)&&J.util.Logger._logger.fatalEx(a,c)}catch(b){}},"~S,Throwable");c$.startTimer=b(c$,"startTimer",function(a){null!=a&&J.util.Logger.htTiming.put(a,Long.$valueOf(System.currentTimeMillis()))},"~S");c$.getTimerMsg=b(c$,"getTimerMsg",function(a,c){0==c&&(c=J.util.Logger.getTimeFrom(a));return"Time for "+
a+": "+c+" ms"},"~S,~N");c$.getTimeFrom=b(c$,"getTimeFrom",function(a){var c;return null==a||null==(c=J.util.Logger.htTiming.get(a))?-1:System.currentTimeMillis()-c.longValue()},"~S");c$.checkTimer=b(c$,"checkTimer",function(a,c){var b=J.util.Logger.getTimeFrom(a);0<=b&&!a.startsWith("(")&&J.util.Logger.info(J.util.Logger.getTimerMsg(a,b));c&&J.util.Logger.startTimer(a);return b},"~S,~B");c$.checkMemory=b(c$,"checkMemory",function(){J.util.Logger.info("Memory: Total-Free=0; Total=0; Free=0; Max=0")});
c$._logger=c$.prototype._logger=new J.util.DefaultLogger;B(c$,"LEVEL_FATAL",1,"LEVEL_ERROR",2,"LEVEL_WARN",3,"LEVEL_INFO",4,"LEVEL_DEBUG",5,"LEVEL_DEBUGHIGH",6,"LEVEL_MAX",7,"_activeLevels",va(7,!1),"_logLevel",!1,"debugging",!1,"debuggingHigh",!1);J.util.Logger._activeLevels[6]=J.util.Logger.getProperty("debugHigh",!1);J.util.Logger._activeLevels[5]=J.util.Logger.getProperty("debug",!1);J.util.Logger._activeLevels[4]=J.util.Logger.getProperty("info",!0);J.util.Logger._activeLevels[3]=J.util.Logger.getProperty("warn",
!0);J.util.Logger._activeLevels[2]=J.util.Logger.getProperty("error",!0);J.util.Logger._activeLevels[1]=J.util.Logger.getProperty("fatal",!0);J.util.Logger._logLevel=J.util.Logger.getProperty("logLevel",!1);J.util.Logger.debugging=null!=J.util.Logger._logger&&(J.util.Logger._activeLevels[5]||J.util.Logger._activeLevels[6]);J.util.Logger.debuggingHigh=J.util.Logger.debugging&&J.util.Logger._activeLevels[6];c$.htTiming=c$.prototype.htTiming=new java.util.Hashtable});p("J.util");P(J.util,"LoggerInterface");
p("J.util");q(null,"J.util.Measure","java.lang.Float JU.List $.P3 $.P4 $.V3 J.api.Interface J.modelset.Atom J.util.Escape $.Logger $.Quaternion J.viewer.JC".split(" "),function(){c$=G(J.util,"Measure");c$.computeAngle=b(c$,"computeAngle",function(a,c,b,n,f,g){n.sub2(a,c);f.sub2(b,c);a=n.angle(f);return g?a/0.017453292:a},"JU.T3,JU.T3,JU.T3,JU.V3,JU.V3,~B");c$.computeAngleABC=b(c$,"computeAngleABC",function(a,c,b,n){var f=new JU.V3,g=new JU.V3;return J.util.Measure.computeAngle(a,c,b,f,g,n)},"JU.T3,JU.T3,JU.T3,~B");
c$.computeTorsion=b(c$,"computeTorsion",function(a,c,b,n,f){var g=a.x-c.x,e=a.y-c.y;a=a.z-c.z;var l=b.x-c.x,j=b.y-c.y,k=b.z-c.z,m=b.x-n.x,p=b.y-n.y,r=b.z-n.z;n=e*k-a*j;c=a*l-g*k;var x=g*j-e*l;b=j*r-k*p;k=k*m-l*r;l=l*p-j*m;m=1/(b*b+k*k+l*l);j=Math.sqrt(1/(n*n+c*c+x*x));m=Math.sqrt(m);n=(n*b+c*k+x*l)*j*m;1<n&&(n=1);-1>n&&(n=-1);n=Math.acos(n);g=g*b+e*k+a*l;e=Math.abs(g);n=0<g/e?n:-n;return f?n/0.017453292:n},"JU.T3,JU.T3,JU.T3,JU.T3,~B");c$.computeHelicalAxis=b(c$,"computeHelicalAxis",function(a,c,
b,n,f){var g=new JU.V3;g.sub2(n,b);var e=f.getTheta(),l=f.getNormal(),j=g.dot(l);1E-4>Math.abs(j)&&(j=0);if(1073741854==c)return 0!=j&&l.scale(j),l;var k=new JU.V3;k.cross(g,l);0!=k.dot(k)&&k.normalize();var m=new JU.V3,p=JU.V3.newV(l);0==j&&(j=1.4E-45);p.scale(j);m.sub2(p,g);m.scale(0.5);k.scale(0==e?0:m.length()/Math.tan(3.141592653589793*(e/2/180)));g=JU.V3.newV(k);0!=e&&g.add(m);if(1666189314==c)return g;m=JU.P3.newP(b);m.sub(g);if(135266320==c)return m;1.4E-45!=j&&l.scale(j);k=JU.P3.newP(m);
k.add(l);e=J.util.Measure.computeTorsion(b,m,k,n,!0);if(Float.isNaN(e)||1E-4>g.length())e=f.getThetaDirectedV(l);if(135266305==c)return Float.$valueOf(e);if(135176==c)return'draw ID "'+a+'" VECTOR '+J.util.Escape.eP(m)+" "+J.util.Escape.eP(l)+" color "+(0>e?"{255.0 200.0 0.0}":"{255.0 0.0 128.0}");if(1746538509==c)return"measure "+J.util.Escape.eP(b)+J.util.Escape.eP(m)+J.util.Escape.eP(k)+J.util.Escape.eP(n);a=Math.abs(0==e?0:360/e);j=Math.abs(1.4E-45==j?0:l.length()*(0==e?1:360/e));switch(c){case 135266306:return[m,
l,g,JU.P3.new3(e,j,a)];case 1073742001:return[J.util.Escape.eP(m),J.util.Escape.eP(l),J.util.Escape.eP(g),J.util.Escape.eP(JU.P3.new3(e,j,a))];default:return null}},"~S,~N,JU.P3,JU.P3,J.util.Quaternion");c$.getPlaneThroughPoints=b(c$,"getPlaneThroughPoints",function(a,c,b,n,f,g,e){a=J.util.Measure.getNormalThroughPoints(a,c,b,n,f,g);e.set(n.x,n.y,n.z,a)},"JU.P3,JU.P3,JU.P3,JU.V3,JU.V3,JU.V3,JU.P4");c$.getPlaneThroughPoint=b(c$,"getPlaneThroughPoint",function(a,c,b){b.set(c.x,c.y,c.z,-c.dot(a))},"JU.P3,JU.V3,JU.P4");
c$.distanceToPlane=b(c$,"distanceToPlane",function(a,c){return null==a?NaN:(a.x*c.x+a.y*c.y+a.z*c.z+a.w)/Math.sqrt(a.x*a.x+a.y*a.y+a.z*a.z)},"JU.P4,JU.P3");c$.distanceToPlaneD=b(c$,"distanceToPlaneD",function(a,c,b){return null==a?NaN:(a.x*b.x+a.y*b.y+a.z*b.z+a.w)/c},"JU.P4,~N,JU.P3");c$.distanceToPlaneV=b(c$,"distanceToPlaneV",function(a,c,b){return null==a?NaN:(a.x*b.x+a.y*b.y+a.z*b.z+c)/Math.sqrt(a.x*a.x+a.y*a.y+a.z*a.z)},"JU.V3,~N,JU.P3");c$.calcNormalizedNormal=b(c$,"calcNormalizedNormal",function(a,
c,b,n,f,g){f.sub2(c,a);g.sub2(b,a);n.cross(f,g);n.normalize()},"JU.P3,JU.P3,JU.P3,JU.V3,JU.V3,JU.V3");c$.getDirectedNormalThroughPoints=b(c$,"getDirectedNormalThroughPoints",function(a,c,b,n,f,g,e){c=J.util.Measure.getNormalThroughPoints(a,c,b,f,g,e);null!=n&&(b=JU.P3.newP(a),b.add(f),g=b.distance(n),b.sub2(a,f),g>b.distance(n)&&(f.scale(-1),c=-c));return c},"JU.P3,JU.P3,JU.P3,JU.P3,JU.V3,JU.V3,JU.V3");c$.getNormalThroughPoints=b(c$,"getNormalThroughPoints",function(a,c,b,n,f,g){J.util.Measure.calcNormalizedNormal(a,
c,b,n,f,g);f.setT(a);return-f.dot(n)},"JU.P3,JU.P3,JU.P3,JU.V3,JU.V3,JU.V3");c$.getPlaneProjection=b(c$,"getPlaneProjection",function(a,c,b,n){var f=J.util.Measure.distanceToPlane(c,a);n.set(c.x,c.y,c.z);n.normalize();n.scale(-f);b.add2(a,n)},"JU.P3,JU.P4,JU.P3,JU.V3");c$.getNormalFromCenter=b(c$,"getNormalFromCenter",function(a,c,b,n,f,g){var e=new JU.V3,l=new JU.V3;c=J.util.Measure.getNormalThroughPoints(c,b,n,g,e,l);a=0<J.util.Measure.distanceToPlaneV(g,c,a);a==f&&g.scale(-1);return!a},"JU.P3,JU.P3,JU.P3,JU.P3,~B,JU.V3");
c$.getNormalToLine=b(c$,"getNormalToLine",function(a,c,b){b.sub2(a,c);b.cross(b,J.viewer.JC.axisY);b.normalize();Float.isNaN(b.x)&&b.set(1,0,0)},"JU.P3,JU.P3,JU.V3");c$.getBisectingPlane=b(c$,"getBisectingPlane",function(a,c,b,n,f){b.scaleAdd2(0.5,c,a);n.setT(c);n.normalize();J.util.Measure.getPlaneThroughPoint(b,n,f)},"JU.P3,JU.V3,JU.P3,JU.V3,JU.P4");c$.projectOntoAxis=b(c$,"projectOntoAxis",function(a,c,b,n){n.sub2(a,c);var f=n.dot(b);a.scaleAdd2(f,b,c);n.sub2(a,c)},"JU.P3,JU.P3,JU.V3,JU.V3");c$.calcBestAxisThroughPoints=
b(c$,"calcBestAxisThroughPoints",function(a,c,b,n,f){var g=a.length;c.setT(a[0]);b.sub2(a[g-1],c);b.normalize();J.util.Measure.calcAveragePointN(a,g,c);for(var e=0;e++<f&&0.001<J.util.Measure.findAxis(a,g,c,b,n););a=JU.P3.newP(a[0]);J.util.Measure.projectOntoAxis(a,c,b,n);c.setT(a)},"~A,JU.P3,JU.V3,JU.V3,~N");c$.findAxis=b(c$,"findAxis",function(a,c,b,n,f){for(var g=new JU.V3,e=new JU.V3,l=new JU.P3,j=new JU.P3,k=JU.V3.newV(n),m=0;0<=--c;)l.setT(a[c]),j.setT(l),J.util.Measure.projectOntoAxis(j,b,
n,f),e.sub2(l,j),e.cross(f,e),g.add(e),m+=f.lengthSquared();a=JU.V3.newV(g);a.scale(1/m);e.cross(a,n);n.add(e);n.normalize();e.sub2(n,k);return e.length()},"~A,~N,JU.P3,JU.V3,JU.V3");c$.calcAveragePoint=b(c$,"calcAveragePoint",function(a,c,b){b.set((a.x+c.x)/2,(a.y+c.y)/2,(a.z+c.z)/2)},"JU.P3,JU.P3,JU.P3");c$.calcAveragePointN=b(c$,"calcAveragePointN",function(a,c,b){b.setT(a[0]);for(var n=1;n<c;n++)b.add(a[n]);b.scale(1/c)},"~A,~N,JU.P3");c$.getCenterAndPoints=b(c$,"getCenterAndPoints",function(a){var c=
a.size(),b=Array(c+1);b[0]=new JU.P3;if(0<c){for(var n=0;n<c;n++)b[0].add(b[n+1]=a.get(n));b[0].scale(1/c)}return b},"JU.List");c$.getTransformMatrix4=b(c$,"getTransformMatrix4",function(a,c,b,n){a=J.util.Measure.getCenterAndPoints(a);var f=J.util.Measure.getCenterAndPoints(c);c=M(2,0);var g=J.util.Measure.calculateQuaternionRotation([a,f],c,!0),f=JU.V3.newVsub(f[0],a[0]);b.setMV(g.getMatrix(),f);null!=n&&n.setT(a[0]);return c[1]},"JU.List,JU.List,JU.M4,JU.P3");c$.calculateQuaternionRotation=b(c$,
"calculateQuaternionRotation",function(a,c,b){c[1]=NaN;var n=new J.util.Quaternion;if(1==a[0].length||a[0].length!=a[1].length)return n;var f=a[0].length-1;if(b)for(var g=1;g<=f;g++){var e=a[0][g],l=a[1][g];if(s(e,J.modelset.Atom)&&s(l,J.modelset.Atom))J.util.Logger.info(" atom 1 "+e.getInfo()+"\tatom 2 "+l.getInfo());else break}if(2>f)return n;for(var j=b=0,k=0,m=0,p=0,r=0,x=0,q=0,t=0,u=new JU.P3,w=new JU.P3,g=f+1;1<=--g;)e=a[0][g],l=a[1][g],u.sub2(e,a[0][0]),w.sub2(l,a[0][1]),b+=u.x*w.x,j+=u.x*
w.y,k+=u.x*w.z,m+=u.y*w.x,p+=u.y*w.y,r+=u.y*w.z,x+=u.z*w.x,q+=u.z*w.y,t+=u.z*w.z;c[0]=J.util.Measure.getRmsd(a,n);n=sa(4,4,0);n[0][0]=b+p+t;n[0][1]=n[1][0]=r-q;n[0][2]=n[2][0]=x-k;n[0][3]=n[3][0]=j-m;n[1][1]=b-p-t;n[1][2]=n[2][1]=j+m;n[1][3]=n[3][1]=x+k;n[2][2]=-b+p-t;n[2][3]=n[3][2]=r+q;n[3][3]=-b-p+t;n=J.api.Interface.getOptionInterface("util.Eigen").newM(n).getEigenvectorsFloatTransposed()[3];n=J.util.Quaternion.newP4(JU.P4.new4(n[1],n[2],n[3],n[0]));c[1]=J.util.Measure.getRmsd(a,n);return n},
"~A,~A,~B");c$.getRmsd=b(c$,"getRmsd",function(a,c){for(var b=0,n=a[0],f=a[1],g=n[0],e=f[0],l=n.length-1,j=new JU.P3,k=l+1;1<=--k;)j.sub2(n[k],g),c.transformP2(j,j).add(e),b+=j.distanceSquared(f[k]);return Math.sqrt(b/l)},"~A,J.util.Quaternion");c$.transformPoints=b(c$,"transformPoints",function(a,c,b){for(var n=new JU.List,f=0;f<a.size();f++){var g=JU.P3.newP(a.get(f));g.sub(b);c.transform2(g,g);g.add(b);n.addLast(g)}return n},"JU.List,JU.M4,JU.P3");c$.isInTetrahedron=b(c$,"isInTetrahedron",function(a,
c,b,n,f,g,e,l,j,k){J.util.Measure.getPlaneThroughPoints(n,f,c,e,l,j,g);var m=0<=J.util.Measure.distanceToPlane(g,a);J.util.Measure.getPlaneThroughPoints(c,f,b,e,l,j,g);if(m!=0<=J.util.Measure.distanceToPlane(g,a))return!1;J.util.Measure.getPlaneThroughPoints(b,f,n,e,l,j,g);if(m!=0<=J.util.Measure.distanceToPlane(g,a))return!1;J.util.Measure.getPlaneThroughPoints(c,b,n,e,l,j,g);a=J.util.Measure.distanceToPlane(g,a);if(k)return m==0<=a;f=J.util.Measure.distanceToPlane(g,f);return 0>=f*a||Math.abs(f)>
Math.abs(a)},"JU.P3,JU.P3,JU.P3,JU.P3,JU.P3,JU.P4,JU.V3,JU.V3,JU.V3,~B");c$.getIntersectionPP=b(c$,"getIntersectionPP",function(a,c){var b=a.x,n=a.y,f=a.z,g=a.w,e=c.x,l=c.y,j=c.z,k=c.w,m=JU.V3.new3(b,n,f),p=JU.V3.new3(e,l,j),r=new JU.V3;r.cross(m,p);var m=Math.abs(r.x),p=Math.abs(r.y),x=Math.abs(r.z);switch(m>p?m>x?1:3:p>x?2:3){case 1:m=0;p=n*j-l*f;if(0.01>Math.abs(p))return null;f=(f*k-j*g)/p;b=(l*g-k*n)/p;break;case 2:p=b*j-e*f;if(0.01>Math.abs(p))return null;m=(f*k-j*g)/p;f=0;b=(e*g-k*b)/p;break;
default:p=b*l-e*n;if(0.01>Math.abs(p))return null;m=(n*k-l*g)/p;f=(e*g-k*b)/p;b=0}n=new JU.List;n.addLast(JU.P3.new3(m,f,b));r.normalize();n.addLast(r);return n},"JU.P4,JU.P4");c$.getIntersection=b(c$,"getIntersection",function(a,c,b,n,f,g){J.util.Measure.getPlaneProjection(a,b,n,f);f.set(b.x,b.y,b.z);f.normalize();null==c&&(c=JU.V3.newV(f));b=c.dot(f);if(0.01>Math.abs(b))return null;g.sub2(n,a);n.scaleAdd2(g.dot(f)/b,c,a);return n},"JU.P3,JU.V3,JU.P4,JU.P3,JU.V3,JU.V3");B(c$,"radiansPerDegree",0.017453292519943295)});
p("J.util");q(null,"J.util.MeshSurface","java.lang.Float java.util.Hashtable JU.AU $.BS $.List $.P3 $.P4 $.PT $.SB J.util.BSUtil $.BoxInfo $.C $.Escape $.Geodesic $.Measure $.TempArray".split(" "),function(){c$=u(function(){this.meshType=this.spanningVectors=null;this.vertexCount=0;this.vertexSource=this.vertexValues=this.vertices=null;this.polygonCount=0;this.polygonTranslucencies=this.polygonIndexes=null;this.haveQuads=this.isTriangleSet=!1;this.colixBack=this.colix=0;this.isColorSolid=!0;this.normalsTemp=
this.normals=this.vertexColixes=this.polygonColixes=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;t(this,arguments)},J.util,"MeshSurface");w(c$,function(){});c$.newMesh=b(c$,"newMesh",function(a,c,b,n,f,g){var e=new J.util.MeshSurface;e.polygonIndexes=n;a?e.altVertices=c:e.vertices=c;e.vertexCount=0==b?c.length:b;e.normals=f;e.normalCount=0==g&&null!=f?f.length:g;return e},"~B,~A,~N,~A,~A,~N");c$.newSlab=b(c$,"newSlab",function(a,c,b,n,f,g){var e=new J.util.MeshSurface;e.vertices=a;e.vertexValues=b;e.vertexCount=c;e.polygonIndexes=n;e.polygonCount=
f;e.checkCount=g;return e},"~A,~N,~A,~A,~N,~N");b(c$,"getVertices",function(){return null==this.altVertices?this.vertices:this.altVertices});b(c$,"getFaces",function(){return this.polygonIndexes});b(c$,"setColix",function(a){this.colix=a},"~N");b(c$,"setColixBack",function(a){this.colixBack=a},"~N");b(c$,"addV",function(a){0==this.vertexCount?this.vertices=Array(25):this.vertexCount==this.vertices.length&&(this.vertices=JU.AU.doubleLength(this.vertices));this.vertices[this.vertexCount]=JU.P3.newP(a);
return this.vertexCount++},"JU.P3");b(c$,"addTriangle",function(a,c,b){this.addPolygon([a,c,b],null)},"~N,~N,~N");b(c$,"addQuad",function(a,c,b,n){this.haveQuads=!0;this.addPolygon([a,c,b,n],null)},"~N,~N,~N,~N");b(c$,"setPolygonCount",function(a){this.polygonCount=a;if(!(0>a)&&(null==this.polygonIndexes||a>this.polygonIndexes.length))this.polygonIndexes=JU.AU.newInt2(a)},"~N");b(c$,"addVCVal",function(a,c){0==this.vertexCount?this.vertexValues=M(25,0):this.vertexCount>=this.vertexValues.length&&
(this.vertexValues=JU.AU.doubleLengthF(this.vertexValues));this.vertexValues[this.vertexCount]=c;return this.addV(a)},"JU.P3,~N");b(c$,"addTriangleCheck",function(a,c,b,n,f,g){return null==this.vertices||null!=this.vertexValues&&(Float.isNaN(this.vertexValues[a])||Float.isNaN(this.vertexValues[c])||Float.isNaN(this.vertexValues[b]))||Float.isNaN(this.vertices[a].x)||Float.isNaN(this.vertices[c].x)||Float.isNaN(this.vertices[b].x)?-1:this.addPolygonV3(a,c,b,n,f,g,null)},"~N,~N,~N,~N,~N,~N");b(c$,"addPolygonV3",
function(a,c,b,n,f,g,e){return 2==this.checkCount?this.addPolygonC([a,c,b,n,f],g,e):this.addPolygon([a,c,b,n],e)},"~N,~N,~N,~N,~N,~N,JU.BS");b(c$,"addPolygonC",function(a,c,b){if(0!=c){if(null==this.polygonColixes||0==this.polygonCount)this.lastColor=0;c=c==this.lastColor?this.lastColix:this.lastColix=J.util.C.getColix(this.lastColor=c);this.setPolygonColix(this.polygonCount,c)}return this.addPolygon(a,b)},"~A,~N,JU.BS");b(c$,"addPolygon",function(a,c){var b=this.polygonCount;0==this.polygonCount?
this.polygonIndexes=JU.AU.newInt2(25):this.polygonCount==this.polygonIndexes.length&&(this.polygonIndexes=JU.AU.doubleLength(this.polygonIndexes));null!=c&&c.set(this.polygonCount);this.polygonIndexes[this.polygonCount++]=a;return b},"~A,JU.BS");b(c$,"setPolygonColix",function(a,c){null==this.polygonColixes?this.polygonColixes=ea(25,0):a>=this.polygonColixes.length&&(this.polygonColixes=JU.AU.doubleLengthShort(this.polygonColixes));this.polygonColixes[a]=c},"~N,~N");b(c$,"invalidatePolygons",function(){for(var a=
this.polygonCount;--a>=this.mergePolygonCount0;)if((null==this.bsSlabDisplay||this.bsSlabDisplay.get(a))&&!this.setABC(a))this.polygonIndexes[a]=null});b(c$,"setABC",function(a){if(null!=this.bsSlabDisplay&&!this.bsSlabDisplay.get(a)&&(null==this.bsSlabGhost||!this.bsSlabGhost.get(a)))return!1;a=this.polygonIndexes[a];if(null==a||3>a.length)return!1;this.iA=a[0];this.iB=a[1];this.iC=a[2];return null==this.vertexValues||!(Float.isNaN(this.vertexValues[this.iA])||Float.isNaN(this.vertexValues[this.iB])||
Float.isNaN(this.vertexValues[this.iC]))},"~N");b(c$,"setTranslucentVertices",function(){},"JU.BS");b(c$,"setSlab",function(a,c,b,n,f){this.bsSlabDisplay=a;this.bsSlabGhost=c;this.slabMeshType=b.equalsIgnoreCase("mesh")?1073742018:1073741938;this.slabColix=J.util.C.getColixTranslucent3(J.util.C.getColixS(n),!0,f)},"JU.BS,JU.BS,~S,~S,~N");b(c$,"getSlabColor",function(){return null==this.bsSlabGhost?null:J.util.C.getHexCode(this.slabColix)});b(c$,"getSlabTranslucency",function(){return null==this.bsSlabGhost?
null:""+J.util.C.getColixTranslucencyFractional(this.slabColix)});b(c$,"getSlabType",function(){return null!=this.bsSlabGhost&&1073742018==this.slabMeshType?"mesh":null});b(c$,"resetTransPolygons",function(){for(var a=J.util.C.isColixTranslucent(this.colix),c=J.util.C.getColixTranslucencyFractional(this.colix),b=0;b<this.polygonCount;b++)this.bsTransPolygons.get(b)&&this.setABC(b)&&(this.vertexColixes[this.iA]=J.util.C.getColixTranslucent3(this.vertexColixes[this.iA],a,c),this.vertexColixes[this.iB]=
J.util.C.getColixTranslucent3(this.vertexColixes[this.iB],a,c),this.vertexColixes[this.iC]=J.util.C.getColixTranslucent3(this.vertexColixes[this.iC],a,c));this.polygonTranslucencies=this.bsTransPolygons=null});b(c$,"resetSlab",function(){this.slabPolygons(J.util.TempArray.getSlabObjectType(1048587,null,!1,null),!1)});c$.getCapSlabObject=b(c$,"getCapSlabObject",function(a,c){try{if(0==a.indexOf("array")){var b=JU.PT.split(a.substring(6,a.length-1),",");return J.util.TempArray.getSlabObjectType(1679429641,
[J.util.Escape.uP(b[0]),J.util.Escape.uP(b[1]),J.util.Escape.uP(b[2]),J.util.Escape.uP(b[3])],c,null)}var n=J.util.Escape.uP(a);if(s(n,JU.P4))return J.util.TempArray.getSlabObjectType(135266319,n,c,null)}catch(f){if(!y(f,Exception))throw f;}return null},"~S,~B");b(c$,"slabPolygonsList",function(a,c){for(var b=0;b<a.size()&&this.slabPolygons(a.get(b),c);b++);},"JU.List,~B");b(c$,"slabPolygons",function(a,c){if(0>this.polygonCount0)return!1;var b=a[0].intValue();if(1048587==b||1073741872==b){if(null!=
this.bsSlabDisplay&&(0!=this.polygonCount0||0!=this.vertexCount0))this.polygonCount=this.polygonCount0,this.vertexCount=this.vertexCount0,this.polygonCount0=this.vertexCount0=0,this.normixCount=this.isTriangleSet?this.polygonCount:this.vertexCount,this.bsSlabDisplay.setBits(0,0==this.polygonCount?this.vertexCount:this.polygonCount),this.slabOptions=(new JU.SB).append(this.meshType+" slab none"),this.bsSlabGhost=null,this.slabMeshType=1048587;if(1048587==b)return!1}var n=a[1],f=a[2].booleanValue()&&
1073741872!=b;if(f&&!c)return!1;var g=a[3],e=null!=g;if(null==this.bsSlabDisplay||0==this.polygonCount0&&0==this.vertexCount0){if(this.polygonCount0=this.polygonCount,this.vertexCount0=this.vertexCount,this.bsSlabDisplay=J.util.BSUtil.setAll(0==this.polygonCount?this.vertexCount:this.polygonCount),this.bsSlabGhost=null,0==this.polygonCount&&0==this.vertexCount)return!1}else this.isMerged&&(0==this.polygonCount?this.bsSlabDisplay.setBits(this.mergeVertexCount0,this.vertexCount):this.bsSlabDisplay.setBits(this.mergePolygonCount0,
this.polygonCount));e&&(null==this.bsSlabGhost&&(this.bsSlabGhost=new JU.BS),this.slabMeshType=g[0].intValue(),this.slabColix=g[1].shortValue(),f=!1,this.colix=J.util.C.getColixTranslucent3(this.colix,!1,0));g=new JU.SB;g.append(f?" cap ":" slab ");if(e){g.append("translucent ").appendF(J.util.C.getColixTranslucencyFractional(this.slabColix)).append(" ");var l=J.util.C.getHexCode(this.slabColix);null!=l&&g.append(l).append(" ");1073742018==this.slabMeshType&&g.append("mesh ")}switch(b){case 1073741872:g.append("brillouin");
this.slabBrillouin(n);break;case 3:this.getIntersection(0,null,null,null,null,n,null,f,!1,3,e);break;case 135266319:g.append(J.util.Escape.eP4(n));this.getIntersection(0,n,null,null,null,null,null,f,!1,135266319,e);break;case 1614417948:case 1679429641:g.append("within ").append(J.util.Escape.eAP(n));n=J.util.BoxInfo.getFacesFromCriticalPoints(n);for(l=0;l<n.length;l++)this.getIntersection(0,n[l],null,null,null,null,null,f,!1,135266319,e);break;case 135270407:this.getIntersection(0,null,null,null,
n,null,null,!1,!1,32,e);break;case 135266325:case 1073742114:case 1073742018:switch(l=n[0].floatValue(),b){case 135266325:b=n[1];n=n[2];g.append("within ").appendF(l).append(null==n?J.util.Escape.e(b):J.util.Escape.e(n));this.getIntersection(l,null,b,null,null,null,null,f,!1,0<l?1276118018:1073742154,e);break;case 1073742114:if(null==this.vertexValues)return!1;b=n[1].floatValue();g.append("within range ").appendF(l).append(" ").appendF(b);n=b<l?J.util.BSUtil.copy(this.bsSlabDisplay):null;this.getIntersection(l,
null,null,null,null,null,null,f,!1,32,e);l=null==n?null:J.util.BSUtil.copy(this.bsSlabDisplay);J.util.BSUtil.copy2(n,this.bsSlabDisplay);this.getIntersection(b,null,null,null,null,null,null,f,!1,64,e);null!=l&&this.bsSlabDisplay.or(l);break;case 1073742018:this.getIntersection(0,null,null,null,null,null,n[1],f,!1,0>l?32:64,e)}}f=g.toString();null==this.slabOptions&&(this.slabOptions=new JU.SB);0>this.slabOptions.indexOf(f)&&this.slabOptions.append(0<this.slabOptions.length()?"; ":"").append(this.meshType).append(f);
return!0},"~A,~B");b(c$,"slabBrillouin",function(){},"~A");b(c$,"addIntersectionVertex",function(a,c,b,n,f,g,e){e=g>e?e+"_"+g:g+"_"+e;if(0<=g&&(g=f.get(e),null!=g))return g.intValue();null!=this.vertexSource&&(this.vertexCount>=this.vertexSource.length&&(this.vertexSource=JU.AU.doubleLengthI(this.vertexSource)),this.vertexSource[this.vertexCount]=b);null!=this.vertexSets&&(this.vertexCount>=this.vertexSets.length&&(this.vertexSets=JU.AU.doubleLengthI(this.vertexSets)),this.vertexSets[this.vertexCount]=
n);a=this.addVCVal(a,c);f.put(e,Integer.$valueOf(a));return a},"JU.P3,~N,~N,~N,java.util.Map,~N,~N");b(c$,"getIntersection",function(a,c,b,n,f,g,e,l,j,k,m){var p=null==n,r=null;if(null==f)if(3==k&&null!=g){f=M(this.vertexCount,0);for(e=0;e<this.vertexCount;e++)-1==(f[e]=this.vertexSource[e])&&System.out.println("meshsurface hmm")}else f=this.vertexValues;var x=new java.util.Hashtable;if(null!=b||m)l=!1;var q=M(2,0),s=M(2,0),t=Math.abs(a),u,w,y,z,B,C,E=0,H=0,I=0,G=0,K=l?new JU.List:null;if(0==this.polygonCount)for(e=
this.mergeVertexCount0;e<this.vertexCount;e++)(Float.isNaN(f[e])||0<J.util.MeshSurface.checkSlab(k,this.vertices[e],f[e],a,c,b,g))&&this.bsSlabDisplay.clear(e);else{var L=this.polygonCount;for(e=this.mergePolygonCount0;e<L;e++)if(this.setABC(e)){var N=null!=this.bsSlabGhost&&this.bsSlabGhost.get(e)?this.bsSlabGhost:this.bsSlabDisplay,O=this.polygonIndexes[e][3],P=2==this.checkCount?this.polygonIndexes[e][4]:0,R=this.vertices[this.iA],S=this.vertices[this.iB],T=this.vertices[this.iC];z=f[this.iA];
B=f[this.iB];C=f[this.iC];null!=this.vertexSource&&(E=this.vertexSource[this.iA],H=this.vertexSource[this.iB],I=this.vertexSource[this.iC]);null!=this.vertexSets&&(G=this.vertexSets[this.iA]);u=J.util.MeshSurface.checkSlab(k,R,z,null==g?a:E,c,b,g);w=J.util.MeshSurface.checkSlab(k,S,B,null==g?a:H,c,b,g);y=J.util.MeshSurface.checkSlab(k,T,C,null==g?a:I,c,b,g);var U=(0!=u&&0>u?1:0)+(0!=w&&0>w?2:0)+(0!=y&&0>y?4:0);switch(U){case 1:case 6:r=null==b?[J.util.MeshSurface.interpolatePoint(R,S,-u,w,z,B,q,s,
0),J.util.MeshSurface.interpolatePoint(R,T,-u,y,z,C,q,s,1)]:[this.interpolateSphere(R,S,-u,-w,t,z,B,q,s,0),this.interpolateSphere(R,T,-u,-y,t,z,C,q,s,1)];break;case 2:case 5:r=null==b?[J.util.MeshSurface.interpolatePoint(S,R,-w,u,B,z,q,s,1),J.util.MeshSurface.interpolatePoint(S,T,-w,y,B,C,q,s,0)]:[this.interpolateSphere(S,R,-w,-u,t,B,z,q,s,1),this.interpolateSphere(S,T,-w,-y,t,B,C,q,s,0)];break;case 3:case 4:r=null==b?[J.util.MeshSurface.interpolatePoint(T,R,-y,u,C,z,q,s,0),J.util.MeshSurface.interpolatePoint(T,
S,-y,w,C,B,q,s,1)]:[this.interpolateSphere(T,R,-y,-u,t,C,z,q,s,0),this.interpolateSphere(T,S,-y,-w,t,C,B,q,s,1)]}this.doClear=!0;this.doGhost=m;this.doCap=l;if(p){switch(U){case 0:this.doCap=!1;break;case 7:continue;case 1:case 6:if((w=1==U)||m){if(!this.getDE(s,0,this.iA,this.iB,this.iC,w))break;0>this.iD&&(this.iD=this.addIntersectionVertex(r[0],q[0],E,G,x,this.iA,this.iB));0>this.iE&&(this.iE=this.addIntersectionVertex(r[1],q[1],E,G,x,this.iA,this.iC));u=w?N:this.bsSlabGhost;this.addPolygonV3(this.iA,
this.iD,this.iE,O&5|2,P,0,u);if(!m)break}if(!this.getDE(s,1,this.iA,this.iC,this.iB,w))break;u=w?this.bsSlabGhost:N;0>this.iE&&(this.iE=this.addIntersectionVertex(r[0],q[0],H,G,x,this.iA,this.iB),this.addPolygonV3(this.iE,this.iB,this.iC,O&3,P,0,u));0>this.iD&&(this.iD=this.addIntersectionVertex(r[1],q[1],I,G,x,this.iA,this.iC),this.addPolygonV3(this.iD,this.iE,this.iC,O&4|1,P,0,u));break;case 5:case 2:if((w=2==U)||m){if(!this.getDE(s,0,this.iB,this.iC,this.iA,w))break;u=w?N:this.bsSlabGhost;0>this.iE&&
(this.iE=this.addIntersectionVertex(r[0],q[0],H,G,x,this.iB,this.iA));0>this.iD&&(this.iD=this.addIntersectionVertex(r[1],q[1],H,G,x,this.iB,this.iC));this.addPolygonV3(this.iE,this.iB,this.iD,O&3|4,P,0,u);if(!m)break}if(!this.getDE(s,1,this.iB,this.iA,this.iC,w))break;u=w?this.bsSlabGhost:N;0>this.iD&&(this.iD=this.addIntersectionVertex(r[0],q[0],E,G,x,this.iB,this.iA),this.addPolygonV3(this.iA,this.iD,this.iC,O&5,P,0,u));0>this.iE&&(this.iE=this.addIntersectionVertex(r[1],q[1],I,G,x,this.iB,this.iC),
this.addPolygonV3(this.iD,this.iE,this.iC,O&2|1,P,0,u));break;case 4:case 3:if((w=4==U)||m){if(!this.getDE(s,0,this.iC,this.iA,this.iB,w))break;0>this.iD&&(this.iD=this.addIntersectionVertex(r[0],q[0],I,G,x,this.iA,this.iC));0>this.iE&&(this.iE=this.addIntersectionVertex(r[1],q[1],I,G,x,this.iB,this.iC));u=w?N:this.bsSlabGhost;this.addPolygonV3(this.iD,this.iE,this.iC,O&6|1,P,0,u);if(!m)break}if(!this.getDE(s,1,this.iC,this.iB,this.iA,w))break;u=w?this.bsSlabGhost:N;0>this.iE&&(this.iE=this.addIntersectionVertex(r[0],
q[0],E,G,x,this.iA,this.iC),this.addPolygonV3(this.iA,this.iB,this.iE,O&5,P,0,u));0>this.iD&&(this.iD=this.addIntersectionVertex(r[1],q[1],H,G,x,this.iB,this.iC),this.addPolygonV3(this.iE,this.iB,this.iD,O&2|4,P,0,u))}this.doClear&&(N.clear(e),this.doGhost&&this.bsSlabGhost.set(e));this.doCap&&K.addLast([this.iD,this.iE])}else null!=r&&n.addLast(r)}if(l&&0<K.size()){c=new JU.P3;for(e=K.size();0<=--e;)a=K.get(e),c.add(this.vertices[a[0]]),c.add(this.vertices[a[1]]);c.scale(0.5/K.size());x=this.addIntersectionVertex(c,
0,-1,G,x,-1,-1);for(e=K.size();0<=--e;)a=K.get(e),this.addPolygonV3(a[0],x,a[1],0,0,0,this.bsSlabDisplay)}if(j){x=new JU.BS;G=new JU.BS;for(e=0;e<this.polygonCount;e++)if(null!=this.polygonIndexes[e]){G.set(e);for(j=0;3>j;j++)x.set(this.polygonIndexes[e][j])}K=0;G=G.cardinality();if(G!=this.polygonCount){a=D(this.vertexCount,0);for(e=0;e<this.vertexCount;e++)x.get(e)&&(a[e]=K++);c=Array(K);for(e=K=0;e<this.vertexCount;e++)x.get(e)&&(c[K++]=this.vertices[e]);x=JU.AU.newInt2(G);for(e=G=0;e<this.polygonCount;e++)if(null!=
this.polygonIndexes[e]){for(j=0;3>j;j++)this.polygonIndexes[e][j]=a[this.polygonIndexes[e][j]];x[G++]=this.polygonIndexes[e]}this.vertices=c;this.vertexCount=K;this.polygonIndexes=x;this.polygonCount=G}}}},"~N,JU.P4,~A,JU.List,~A,JU.BS,J.util.MeshSurface,~B,~B,~N,~B");c$.setPoint=b(c$,"setPoint",function(a,c,b,n){return 0==a[c]?b:1==a[c]?n:-1},"~A,~N,~N,~N");b(c$,"getDE",function(a,c,b,n,f,g){this.iD=J.util.MeshSurface.setPoint(a,c,b,n);this.iE=J.util.MeshSurface.setPoint(a,1-c,b,f);if(this.iD==b&&
this.iE==b)return this.doClear=g,this.doCap=!1;if(this.iD==n&&this.iE==f)return this.doClear=!g,!1;if(this.iD==b||this.iE==b)return this.doClear=g,0>this.iD?this.iD=g?n:f:0>this.iE&&(this.iE=g?f:n),this.doCap;this.doGhost=!1;return!0},"~A,~N,~N,~N,~N,~B");c$.checkSlab=b(c$,"checkSlab",function(a,c,b,n,f,g,e){switch(a){case 3:return 0<=b&&e.get(z(b))?1:-1;case 32:a=n-b;break;case 64:a=b-n;break;case 135266319:a=J.util.Measure.distanceToPlane(f,c);break;case 1276118018:a=J.util.MeshSurface.minDist(c,
g)-n;break;default:a=-J.util.MeshSurface.minDist(c,g)-n}return 1E-4>Math.abs(a)?0:a},"~N,JU.P3,~N,~N,JU.P4,~A,JU.BS");c$.minDist=b(c$,"minDist",function(a,c){for(var b=2147483647,n=c.length;0<=--n;){var f=c[n].distance(a);f<b&&(b=f)}return b},"JU.P3,~A");b(c$,"interpolateSphere",function(a,c,b,n,f,g,e,l,j,k){return J.util.MeshSurface.interpolateFraction(a,c,J.util.MeshSurface.getSphericalInterpolationFraction(f,b,n,a.distance(c)),g,e,l,j,k)},"JU.P3,JU.P3,~N,~N,~N,~N,~N,~A,~A,~N");c$.interpolatePoint=
b(c$,"interpolatePoint",function(a,c,b,n,f,g,e,l,j){return J.util.MeshSurface.interpolateFraction(a,c,b/(b+n),f,g,e,l,j)},"JU.P3,JU.P3,~N,~N,~N,~N,~A,~A,~N");c$.interpolateFraction=b(c$,"interpolateFraction",function(a,c,b,n,f,g,e,l){1E-4>b?b=0:0.9999<b&&(b=1);e[l]=b;g[l]=(f-n)*b+n;return JU.P3.new3(a.x+(c.x-a.x)*b,a.y+(c.y-a.y)*b,a.z+(c.z-a.z)*b)},"JU.P3,JU.P3,~N,~N,~N,~A,~A,~N");c$.getSphericalInterpolationFraction=b(c$,"getSphericalInterpolationFraction",function(a,c,b,n){c=Math.abs(a+c)/n;b=Math.abs(a+
b)/n;a/=n;n=c*c;var f=n-b*b+1;return(f+(c<b?1:-1)*Math.sqrt(f*f+4*(a*a-n)))/2},"~N,~N,~N,~N");c$.getSphereData=b(c$,"getSphereData",function(a){J.util.Geodesic.createGeodesic(a);var c=J.util.Geodesic.getVertexCount(a),b=J.util.Geodesic.getFaceVertexes(a),n=m(b.length/3);a=JU.AU.newInt2(n);for(var f=0,g=0;f<n;f++)a[f]=[b[g++],b[g++],b[g++]];b=Array(c);for(f=0;f<c;f++)b[f]=J.util.Geodesic.getVertexVector(f);return J.util.MeshSurface.newMesh(!0,b,0,a,b,0)},"~N");B(c$,"SEED_COUNT",25)});p("J.util");q(["J.util.Geodesic"],
"J.util.Normix",["JU.BS"],function(){c$=G(J.util,"Normix");c$.getNormixCount=b(c$,"getNormixCount",function(){0==J.util.Normix.normixCount&&(J.util.Normix.normixCount=J.util.Geodesic.getVertexCount(3));return J.util.Normix.normixCount});c$.newVertexBitSet=b(c$,"newVertexBitSet",function(){return JU.BS.newN(J.util.Normix.getNormixCount())});c$.getVertexVectors=b(c$,"getVertexVectors",function(){null==J.util.Normix.vertexVectors&&(J.util.Normix.vertexVectors=J.util.Geodesic.getVertexVectors());return J.util.Normix.vertexVectors});
c$.setInverseNormixes=b(c$,"setInverseNormixes",function(){if(null==J.util.Normix.inverseNormixes){J.util.Normix.getNormixCount();J.util.Normix.getVertexVectors();J.util.Normix.inverseNormixes=ea(J.util.Normix.normixCount,0);for(var a=new JU.BS,c=J.util.Normix.normixCount;0<=--c;){var b=J.util.Normix.vertexVectors[c];J.util.Normix.inverseNormixes[c]=J.util.Normix.getNormix(-b.x,-b.y,-b.z,3,a)}}});c$.getInverseNormix=b(c$,"getInverseNormix",function(a){return J.util.Normix.inverseNormixes[a]},"~N");
c$.getNeighborVertexArrays=b(c$,"getNeighborVertexArrays",function(){null==J.util.Normix.neighborVertexesArrays&&(J.util.Normix.neighborVertexesArrays=J.util.Geodesic.getNeighborVertexesArrays());return J.util.Normix.neighborVertexesArrays});c$.getNormixV=b(c$,"getNormixV",function(a,c){return J.util.Normix.getNormix(a.x,a.y,a.z,3,c)},"JU.V3,JU.BS");c$.get2SidedNormix=b(c$,"get2SidedNormix",function(a,c){return~J.util.Normix.getNormixV(a,c)},"JU.V3,JU.BS");c$.getNormix=b(c$,"getNormix",function(a,
c,b,n,f){var g,e;0<=b?(g=0,e=b-1):(g=11,e=b- -1);f.clearAll();f.set(g);J.util.Normix.getVertexVectors();J.util.Normix.getNeighborVertexArrays();e=a*a+c*c+e*e;for(var l=0;l<=n;++l)for(var j=J.util.Normix.neighborVertexesArrays[l],k=6*g,m=k+(12>g?5:6);--m>=k;){var p=j[m];if(!f.get(p)){f.set(p);var r=J.util.Normix.vertexVectors[p],x;x=r.x-a;var q=x*x;q>=e||(x=r.y-c,q+=x*x,q>=e||(x=r.z-b,q+=x*x,q>=e||(g=p,e=q)))}}return g},"~N,~N,~N,~N,JU.BS");B(c$,"NORMIX_GEODESIC_LEVEL",3,"normixCount",0,"vertexVectors",
null,"inverseNormixes",null,"neighborVertexesArrays",null,"NORMIX_NULL",9999)});p("J.util");q(null,"J.util.Parser",["java.lang.Float","JU.AU","$.PT"],function(){c$=G(J.util,"Parser");c$.parseStringInfestedFloatArray=b(c$,"parseStringInfestedFloatArray",function(a,c,b){return J.util.Parser.parseFloatArrayBsData(JU.PT.getTokens(a),c,b)},"~S,JU.BS,~A");c$.parseFloatArrayBsData=b(c$,"parseFloatArrayBsData",function(a,c,b){for(var n=b.length,f=a.length,g=0,e=0,l=null!=c,j=l?c.nextSetBit(0):0;0<=j&&j<n&&
g<f;j=l?c.nextSetBit(j+1):j+1){for(var k;Float.isNaN(k=JU.PT.parseFloat(a[g++]))&&g<f;);Float.isNaN(k)||(b[e=j]=k);if(g==f)break}return e+1},"~A,JU.BS,~A");c$.parseFloatArrayFromMatchAndField=b(c$,"parseFloatArrayFromMatchAndField",function(a,c,b,n,f,g,e,l,j){var k,m=-1,p=null!=f,r=J.util.Parser.markLines(a,0<=a.indexOf("\n")?"\n":";");j=1>=j||j>=r.length?0:j-1;var q=0==j?0:r[j-1],s=r.length;null==l&&(l=M(s-j,0));for(var t=l.length,u=0>=e?Math.max(g,b):Math.max(g+e,b+n)-1,w=null!=c;j<s;j++){var y=
a.substring(q,r[j]).trim(),q=r[j],z=0>=e?JU.PT.getTokens(y):null;if(0>=e){if(z.length<u||Float.isNaN(k=JU.PT.parseFloat(z[g-1])))continue}else if(y.length<u||Float.isNaN(k=JU.PT.parseFloat(y.substring(g-1,g+e-1))))continue;if(p){y=JU.PT.parseInt(null==z?y.substring(b-1,b+n-1):z[b-1]);if(-2147483648==y||0>y||y>=t||0>(y=f[y]))continue;w&&c.set(y)}else{w?m=c.nextSetBit(m+1):m++;if(0>m||m>=t)break;y=m}l[y]=k}return l},"~S,JU.BS,~N,~N,~A,~N,~N,~A,~N");c$.fixDataString=b(c$,"fixDataString",function(a){a=
a.$replace(";",0>a.indexOf("\n")?"\n":" ");a=JU.PT.trim(a,"\n \t");a=JU.PT.simpleReplace(a,"\n ","\n");return a=JU.PT.simpleReplace(a,"\n\n","\n")},"~S");c$.parseFloatArray2d=b(c$,"parseFloatArray2d",function(a){a=J.util.Parser.fixDataString(a);for(var c=J.util.Parser.markLines(a,"\n"),b=c.length,n=JU.AU.newFloat2(b),f=0,g=0;f<b;g=c[f++])g=JU.PT.getTokens(a.substring(g,c[f])),JU.PT.parseFloatArrayData(g,n[f]=M(g.length,0));return n},"~S");c$.parseFloatArray3d=b(c$,"parseFloatArray3d",function(a){a=
J.util.Parser.fixDataString(a);var c=J.util.Parser.markLines(a,"\n"),b=c.length,n=JU.PT.getTokens(a.substring(0,c[0]));if(3!=n.length)return M(0,0,0,0);var f=JU.PT.parseInt(n[0]),g=JU.PT.parseInt(n[1]),e=JU.PT.parseInt(n[2]);if(1>f||1>g||1>e)return M(1,1,1,0);for(var l=JU.AU.newFloat3(f,g),j=0,k=0,m=1,n=c[0];m<b&&j<f;n=c[m++])n=JU.PT.getTokens(a.substring(n,c[m])),n.length<e||(JU.PT.parseFloatArrayData(n,l[j][k]=M(n.length,0)),++k==g&&(j++,k=0));return j!=f?(System.out.println("Error reading 3D data -- nX = "+
f+", but only "+j+" blocks read"),M(1,1,1,0)):l},"~S");c$.markLines=b(c$,"markLines",function(a,c){for(var b=0,n=a.length;0<=--n;)a.charAt(n)==c&&b++;for(var n=D(b+1,0),f=b=0;0<=(f=a.indexOf(c,f));)n[b++]=++f;n[b]=a.length;return n},"~S,~S")});p("J.util");q(["JU.P3"],"J.util.Point3fi",null,function(){c$=u(function(){this.sZ=this.sY=this.sX=this.index=0;this.modelIndex=this.sD=-1;t(this,arguments)},J.util,"Point3fi",JU.P3,Cloneable);c$.set2=b(c$,"set2",function(a,c){a.x=c.x;a.y=c.y;a.z=c.z},"JU.P3,JU.P3i");
b(c$,"copy",function(){try{return this.clone()}catch(a){if(y(a,CloneNotSupportedException))return null;throw a;}})});p("J.util");q(["JU.P4"],"J.util.Quaternion","java.lang.Float JU.A4 $.M3 $.P3 $.V3 J.util.Escape $.Logger $.Txt".split(" "),function(){c$=u(function(){this.q3=this.q2=this.q1=this.q0=0;this.mat=null;t(this,arguments)},J.util,"Quaternion");w(c$,function(){this.q0=1});c$.newQ=b(c$,"newQ",function(a){var c=new J.util.Quaternion;c.set(a);return c},"J.util.Quaternion");c$.newVA=b(c$,"newVA",
function(a,c){var b=new J.util.Quaternion;b.setTA(a,c);return b},"JU.T3,~N");c$.newM=b(c$,"newM",function(a){var c=new J.util.Quaternion;c.setM(a);return c},"JU.M3");c$.newAA=b(c$,"newAA",function(a){var c=new J.util.Quaternion;c.setAA(a);return c},"JU.A4");c$.newP4=b(c$,"newP4",function(a){var c=new J.util.Quaternion;c.setP4(a);return c},"JU.P4");c$.new4=b(c$,"new4",function(a,c,b,n){var f=new J.util.Quaternion;if(-1>a)return f.q0=-1,f;if(1<a)return f.q0=1,f;f.q0=a;f.q1=c;f.q2=b;f.q3=n;return f},
"~N,~N,~N,~N");b(c$,"set",function(a){this.q0=a.q0;this.q1=a.q1;this.q2=a.q2;this.q3=a.q3},"J.util.Quaternion");b(c$,"setP4",function(a){var c=null==a?0:a.distance(J.util.Quaternion.qZero);0==c?this.q0=1:(this.q0=a.w/c,this.q1=a.x/c,this.q2=a.y/c,this.q3=a.z/c)},"JU.P4");b(c$,"setTA",function(a,c){if(0==a.x&&0==a.y&&0==a.z)this.q0=1;else{var b=Math.sin(0.017453292519943295*(c/2))/Math.sqrt(a.x*a.x+a.y*a.y+a.z*a.z);this.q0=Math.cos(0.017453292519943295*(c/2));this.q1=a.x*b;this.q2=a.y*b;this.q3=a.z*
b}},"JU.T3,~N");b(c$,"setAA",function(a){a=JU.A4.newAA(a);0==a.angle&&(a.y=1);var c=new JU.M3;c.setAA(a);this.setM(c)},"JU.A4");b(c$,"setM",function(a){this.mat=a;var c=a.m00+a.m11+a.m22,b,n,f;0.5<=c?(c=Math.sqrt(1+c),b=(a.m21-a.m12)/c,n=(a.m02-a.m20)/c,f=(a.m10-a.m01)/c):0.5<=(b=a.m00+a.m00-c)?(b=Math.sqrt(1+b),c=(a.m21-a.m12)/b,n=(a.m10+a.m01)/b,f=(a.m20+a.m02)/b):0.5<=(b=a.m11+a.m11-c)||a.m11>a.m22?(n=Math.sqrt(1+b),c=(a.m02-a.m20)/n,b=(a.m10+a.m01)/n,f=(a.m21+a.m12)/n):(f=Math.sqrt(1+a.m22+a.m22-
c),c=(a.m10-a.m01)/f,b=(a.m20+a.m02)/f,n=(a.m21+a.m12)/f);this.q0=0.5*c;this.q1=0.5*b;this.q2=0.5*n;this.q3=0.5*f},"JU.M3");b(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)},"J.util.Quaternion");c$.getQuaternionFrame=b(c$,"getQuaternionFrame",function(a,c,b){c=JU.V3.newV(c);b=JU.V3.newV(b);null!=a&&(c.sub(a),b.sub(a));return J.util.Quaternion.getQuaternionFrameV(c,b,null,!1)},"JU.P3,JU.T3,JU.T3");c$.getQuaternionFrameV=
b(c$,"getQuaternionFrameV",function(a,c,b,n){null==b&&(b=new JU.V3,b.cross(a,c),n&&a.cross(c,b));c=new JU.V3;c.cross(b,a);a.normalize();c.normalize();b.normalize();n=new JU.M3;n.setColumnV(0,a);n.setColumnV(1,c);n.setColumnV(2,b);return J.util.Quaternion.newM(n)},"JU.V3,JU.V3,JU.V3,~B");b(c$,"getMatrix",function(){null==this.mat&&this.setMatrix();return this.mat});b(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});b(c$,"add",function(a){return J.util.Quaternion.newVA(this.getNormal(),
this.getTheta()+a)},"~N");b(c$,"mul",function(a){return 1==a?J.util.Quaternion.new4(this.q0,this.q1,this.q2,this.q3):J.util.Quaternion.newVA(this.getNormal(),this.getTheta()*a)},"~N");b(c$,"mulQ",function(a){return J.util.Quaternion.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)},"J.util.Quaternion");b(c$,"div",function(a){return this.mulQ(a.inv())},
"J.util.Quaternion");b(c$,"divLeft",function(a){return this.inv().mulQ(a)},"J.util.Quaternion");b(c$,"dot",function(a){return this.q0*a.q0+this.q1*a.q1+this.q2*a.q2+this.q3*a.q3},"J.util.Quaternion");b(c$,"inv",function(){return J.util.Quaternion.new4(this.q0,-this.q1,-this.q2,-this.q3)});b(c$,"negate",function(){return J.util.Quaternion.new4(-this.q0,-this.q1,-this.q2,-this.q3)});b(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});b(c$,"getVector",function(a){return this.getVectorS(a,1)},"~N");b(c$,"getVectorS",function(a,c){if(-1==a)return c*=this.getFixFactor(),JU.V3.new3(this.q1*c,this.q2*c,this.q3*c);null==this.mat&&this.setMatrix();var b=new JU.V3;this.mat.getColumnV(a,b);1!=c&&b.scale(c);return b},"~N,~N");b(c$,"getNormal",function(){var a=J.util.Quaternion.getRawNormal(this);a.scale(this.getFixFactor());return a});c$.getRawNormal=b(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},"J.util.Quaternion");b(c$,"getTheta",function(){return 360*Math.acos(Math.abs(this.q0))/3.141592653589793});b(c$,"getThetaRadians",function(){return 2*Math.acos(Math.abs(this.q0))});b(c$,"getNormalDirected",function(a){var c=this.getNormal();0>c.x*a.x+c.y*a.y+c.z*a.z&&c.scale(-1);return c},"JU.V3");b(c$,"get3dProjection",function(a){a.set(this.q1,this.q2,this.q3);return a},"JU.V3");b(c$,"getThetaDirected",function(a){var c=this.getTheta(),b=this.getNormal();0>a.x*this.q1+
a.y*this.q2+a.z*this.q3&&(b.scale(-1),c=-c);a.set(b.x,b.y,b.z,c);return a},"JU.P4");b(c$,"getThetaDirectedV",function(a){var c=this.getTheta(),b=this.getNormal();0>a.x*this.q1+a.y*this.q2+a.z*this.q3&&(b.scale(-1),c=-c);return c},"JU.V3");b(c$,"toPoint4f",function(){return JU.P4.new4(this.q1,this.q2,this.q3,this.q0)});b(c$,"toAxisAngle4f",function(){var a=2*Math.acos(Math.abs(this.q0)),c=Math.sin(a/2),b=this.getNormal();0>c&&(b.scale(-1),a=3.141592653589793-a);return JU.A4.newVA(b,a)});b(c$,"transformPt",
function(a){null==this.mat&&this.setMatrix();a=JU.P3.newP(a);this.mat.transform(a);return a},"JU.P3");b(c$,"transformP2",function(a,c){null==this.mat&&this.setMatrix();this.mat.transform2(a,c);return c},"JU.T3,JU.T3");b(c$,"transform",function(a){null==this.mat&&this.setMatrix();a=JU.V3.newV(a);this.mat.transform(a);return a},"JU.V3");b(c$,"leftDifference",function(a){a=0>this.dot(a)?a.negate():a;return this.inv().mulQ(a)},"J.util.Quaternion");b(c$,"rightDifference",function(a){a=0>this.dot(a)?a.negate():
a;return this.mulQ(a.inv())},"J.util.Quaternion");b(c$,"getInfo",function(){var a=this.toAxisAngle4f();return J.util.Txt.sprintf("%10.6f%10.6f%10.6f%10.6f  %6.2f  %10.5f %10.5f %10.5f","F",[[this.q0,this.q1,this.q2,this.q3,180*a.angle/3.141592653589793,a.x,a.y,a.z]])});b(c$,"draw",function(a,c,b,n){b=" VECTOR "+J.util.Escape.eP(b)+" ";0==n&&(n=1);return"draw "+a+"x"+c+b+J.util.Escape.eP(this.getVectorS(0,n))+" color red\ndraw "+a+"y"+c+b+J.util.Escape.eP(this.getVectorS(1,n))+" color green\ndraw "+
a+"z"+c+b+J.util.Escape.eP(this.getVectorS(2,n))+" color blue\n"},"~S,~S,JU.P3,~N");e(c$,"toString",function(){return"{"+this.q1+" "+this.q2+" "+this.q3+" "+this.q0+"}"});c$.div=b(c$,"div",function(a,c,b,n){var f;if(null==a||null==c||0==(f=Math.min(a.length,c.length)))return null;0<b&&f>b&&(f=b);b=Array(f);for(var g=0;g<f;g++){if(null==a[g]||null==c[g])return null;b[g]=n?a[g].divLeft(c[g]):a[g].div(c[g])}return b},"~A,~A,~N,~B");c$.sphereMean=b(c$,"sphereMean",function(a,c,b){if(null==a||0==a.length)return new J.util.Quaternion;
null==c&&(c=M(1,0));if(1==a.length)return c[0]=0,J.util.Quaternion.newQ(a[0]);for(var n=3.4028235E38,f=3.4028235E38,g=J.util.Quaternion.simpleAverage(a),e=0;n>b&&0!=f&&100>e;)g=J.util.Quaternion.newMean(a,g),c[0]=J.util.Quaternion.stdDev(a,g),n=Math.abs(c[0]-f),f=c[0],J.util.Logger.info(++e+" sphereMean "+g+" stddev="+f+" diff="+n);return g},"~A,~A,~N");c$.simpleAverage=b(c$,"simpleAverage",function(a){var c=JU.V3.new3(0,0,1),b=a[0].getNormal();c.add(b);for(var n=a.length;0<=--n;)c.add(a[n].getNormalDirected(c));
c.sub(b);c.normalize();for(var f=0,n=a.length;0<=--n;)f+=Math.abs(a[n].get3dProjection(b).dot(c));0!=f&&c.scale(f/a.length);f=Math.sqrt(1-c.lengthSquared());Float.isNaN(f)&&(f=0);return J.util.Quaternion.newP4(JU.P4.new4(c.x,c.y,c.z,f))},"~A");c$.newMean=b(c$,"newMean",function(a,c){for(var b=new JU.V3,n,f,g=a.length;0<=--g;)n=a[g],f=n.div(c),n=f.getNormal(),n.scale(f.getTheta()),b.add(n);b.scale(1/a.length);return J.util.Quaternion.newVA(b,b.length()).mulQ(c)},"~A,J.util.Quaternion");c$.stdDev=b(c$,
"stdDev",function(a,c){for(var b=0,n=a.length,f=n;0<=--f;)var g=a[f].div(c).getTheta(),b=b+g*g;return Math.sqrt(b/n)},"~A,J.util.Quaternion");b(c$,"getEulerZYZ",function(){var a,c,b;a=Math.atan2(2*(this.q2*this.q3-this.q0*this.q1),2*(this.q1*this.q3+this.q0*this.q2));c=Math.acos(this.q3*this.q3-this.q2*this.q2-this.q1*this.q1+this.q0*this.q0);b=Math.atan2(2*(this.q2*this.q3+this.q0*this.q1),2*(this.q0*this.q2-this.q1*this.q3));return[a/0.017453292519943295,c/0.017453292519943295,b/0.017453292519943295]});
b(c$,"getEulerZXZ",function(){var a,c,b;a=Math.atan2(2*(this.q1*this.q3+this.q0*this.q2),2*(this.q0*this.q1-this.q2*this.q3));c=Math.acos(this.q3*this.q3-this.q2*this.q2-this.q1*this.q1+this.q0*this.q0);b=Math.atan2(2*(this.q1*this.q3-this.q0*this.q2),2*(this.q2*this.q3+this.q0*this.q1));return[a/0.017453292519943295,c/0.017453292519943295,b/0.017453292519943295]});c$.qZero=c$.prototype.qZero=new JU.P4;B(c$,"RAD_PER_DEG",0.017453292519943295)});p("J.util");c$=u(function(){this.height=this.width=this.y=
this.x=0;t(this,arguments)},J.util,"Rectangle");b(c$,"contains",function(a,c){return a>=this.x&&c>=this.y&&a-this.x<this.width&&c-this.y<this.height},"~N,~N");p("J.util");q(null,"J.util.Rgb16",["JU.SB"],function(){c$=u(function(){this.bScaled=this.gScaled=this.rScaled=0;t(this,arguments)},J.util,"Rgb16");w(c$,function(){});c$.newI=b(c$,"newI",function(a){var c=new J.util.Rgb16;c.setInt(a);return c},"~N");b(c$,"setInt",function(a){this.rScaled=a>>8&65280|128;this.gScaled=a&65280|128;this.bScaled=a<<
8&65280|128},"~N");b(c$,"setRgb",function(a){this.rScaled=a.rScaled;this.gScaled=a.gScaled;this.bScaled=a.bScaled},"J.util.Rgb16");b(c$,"diffDiv",function(a,c,b){this.rScaled=m((a.rScaled-c.rScaled)/b);this.gScaled=m((a.gScaled-c.gScaled)/b);this.bScaled=m((a.bScaled-c.bScaled)/b)},"J.util.Rgb16,J.util.Rgb16,~N");b(c$,"setAndIncrement",function(a,c){this.rScaled=a.rScaled;a.rScaled+=c.rScaled;this.gScaled=a.gScaled;a.gScaled+=c.gScaled;this.bScaled=a.bScaled;a.bScaled+=c.bScaled},"J.util.Rgb16,J.util.Rgb16");
b(c$,"getArgb",function(){return 4278190080|this.rScaled<<8&16711680|this.gScaled&65280|this.bScaled>>8});e(c$,"toString",function(){return(new JU.SB).append("Rgb16(").appendI(this.rScaled).appendC(",").appendI(this.gScaled).appendC(",").appendI(this.bScaled).append(" -> ").appendI(this.rScaled>>8&255).appendC(",").appendI(this.gScaled>>8&255).appendC(",").appendI(this.bScaled>>8&255).appendC(")").toString()})});p("J.util");q(["JU.AU","$.V3"],"J.util.Shader",["JU.CU","J.util.C"],function(){c$=u(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;t(this,arguments)},J.util,"Shader");N(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=T(65536,0);this.sphereShapeCache=JU.AU.newInt2(128)});w(c$,function(){this.setLightSource(-1,-1,2.5)});b(c$,"setLightSource",function(a,c,b){this.lightSource.set(a,
c,b);this.lightSource.normalize();this.xLight=this.lightSource.x;this.yLight=this.lightSource.y;this.zLight=this.lightSource.z},"~N,~N,~N");b(c$,"setCel",function(a,c,b){a=a&&0!=c;b=J.util.C.getArgb(J.util.C.getBgContrast(b));b=4278190080==b?4278453252:-1==b?-2:b+1;this.celOn==a&&this.celRGB==b&&this.celPower==c||(this.celOn=a,this.celPower=c,this.useLight=!this.celOn||0<c,this.celZ=1-Math.pow(2,-Math.abs(c)/10),this.celRGB=b,this.flushCaches())},"~B,~N,~N");b(c$,"flushCaches",function(){this.flushShades();
this.flushSphereCache()});b(c$,"setLastColix",function(a,c){J.util.C.allocateColix(a);this.checkShades();c&&J.util.C.setLastGrey(a);this.ashades[2047]=this.getShades2(a,!1)},"~N,~B");b(c$,"getShades",function(a){this.checkShades();a&=-30721;var c=this.ashades[a];null==c&&(c=this.ashades[a]=this.getShades2(J.util.C.argbs[a],!1));return c},"~N");b(c$,"getShadesG",function(a){this.checkShades();a&=-30721;null==this.ashadesGreyscale&&(this.ashadesGreyscale=JU.AU.newInt2(this.ashades.length));var c=this.ashadesGreyscale[a];
null==c&&(c=this.ashadesGreyscale[a]=this.getShades2(J.util.C.argbs[a],!0));return c},"~N");b(c$,"checkShades",function(){null!=this.ashades&&this.ashades.length==J.util.C.colixMax||(this.ashades=JU.AU.arrayCopyII(this.ashades,J.util.C.colixMax),null!=this.ashadesGreyscale&&(this.ashadesGreyscale=JU.AU.arrayCopyII(this.ashadesGreyscale,J.util.C.colixMax)))});b(c$,"flushShades",function(){this.checkShades();for(var a=J.util.C.colixMax;0<=--a;)this.ashades[a]=null;this.calcSphereShading()});b(c$,"getShades2",
function(a,c){var b=D(J.util.Shader.shadeIndexMax,0);if(0==a)return b;for(var n=a>>16&255,f=a>>8&255,g=a&255,e=0,l=0,j=0,k=this.ambientFraction;;)if(e=n*k+0.5,l=f*k+0.5,j=g*k+0.5,0<k&&4>e&&4>l&&4>j)n++,f++,g++,0.1>k&&(k+=0.1),a=JU.CU.rgb(m(Math.floor(n)),m(Math.floor(f)),m(Math.floor(g)));else break;var p=0,k=(1-k)/J.util.Shader.shadeIndexNormal,n=n*k,f=f*k,g=g*k;if(this.celOn){var k=m(J.util.Shader.shadeIndexMax/2),r=JU.CU.rgb(m(Math.floor(e)),m(Math.floor(l)),m(Math.floor(j)));if(0<=this.celPower)for(;p<
k;++p)b[p]=r;l+=f*k;j+=g*k;for(r=JU.CU.rgb(m(Math.floor(e+n*k)),m(Math.floor(l)),m(Math.floor(j)));p<J.util.Shader.shadeIndexMax;p++)b[p]=r;b[0]=b[1]=this.celRGB}else{for(;p<J.util.Shader.shadeIndexNormal;++p)b[p]=JU.CU.rgb(m(Math.floor(e)),m(Math.floor(l)),m(Math.floor(j))),e+=n,l+=f,j+=g;b[p++]=a;k=this.intenseFraction/(J.util.Shader.shadeIndexMax-p);n=(255.5-e)*k;f=(255.5-l)*k;for(g=(255.5-j)*k;p<J.util.Shader.shadeIndexMax;p++)e+=n,l+=f,j+=g,b[p]=JU.CU.rgb(m(Math.floor(e)),m(Math.floor(l)),m(Math.floor(j)))}if(c)for(;0<=
--p;)b[p]=JU.CU.toFFGGGfromRGB(b[p]);return b},"~N,~B");b(c$,"getShadeIndex",function(a,c,b){var n=Math.sqrt(a*a+c*c+b*b);return Math.round(this.getShadeF(a/n,c/n,b/n)*J.util.Shader.shadeIndexLast)},"~N,~N,~N");b(c$,"getShadeB",function(a,c,b){return Math.round(this.getShadeF(a,c,b)*J.util.Shader.shadeIndexLast)},"~N,~N,~N");b(c$,"getShadeFp8",function(a,c,b){var n=Math.sqrt(a*a+c*c+b*b);return m(Math.floor(256*this.getShadeF(a/n,c/n,b/n)*J.util.Shader.shadeIndexLast))},"~N,~N,~N");b(c$,"getShadeF",
function(a,c,b){c=this.useLight?a*this.xLight+c*this.yLight+b*this.zLight:b;if(0>=c)return 0;a=c*this.diffuseFactor;if(this.specularOn&&(c=2*c*b-this.zLight,0<c)){if(this.usePhongExponent)c=Math.pow(c,this.phongExponent);else for(var n=this.specularExponent;0<=--n&&1E-4<c;)c*=c;a+=c*this.specularFactor}return this.celOn&&b<this.celZ?0:1<a?1:a},"~N,~N,~N");b(c$,"getShadeN",function(a,c,b,n){c=m(Math.floor(256*this.getShadeF(a/n,c/n,b/n)*J.util.Shader.shadeIndexLast));a=c>>8;if(!this.useLight)return a;
(c&255)>this.nextRandom8Bit()&&++a;c=this.seed&65535;21845>c&&0<a?--a:43690<c&&a<J.util.Shader.shadeIndexLast&&++a;return a},"~N,~N,~N,~N");b(c$,"calcSphereShading",function(){for(var a=-127.5,c=0;256>c;++a,++c)for(var b=-127.5,n=a*a,f=0;256>f;++b,++f){var g=0,e=16900-n-b*b;0<e&&(g=Math.sqrt(e),g=this.getShadeN(a,b,g,130));this.sphereShadeIndexes[(f<<8)+c]=g}});b(c$,"nextRandom8Bit",function(){var a=this.seed;this.seed=a=(a<<16)+(a<<1)+a&2147483647;return a>>23});b(c$,"getEllipsoidShade",function(a,
c,b,n,f){var g=f.m00*a+f.m01*c+f.m02*b+f.m03,e=f.m10*a+f.m11*c+f.m12*b+f.m13;a=f.m20*a+f.m21*c+f.m22*b+f.m23;n=Math.min(n/2,45)/Math.sqrt(g*g+e*e+a*a);g=z(-g*n);e=z(-e*n);n=z(a*n);if(a=-20>g||20<=g||-20>e||20<=e||0>n||40<=n){for(;0==g%2&&0==e%2&&0==n%2&&0<g+e+n;)g>>=1,e>>=1,n>>=1;a=-20>g||20<=g||-20>e||20<=e||0>n||40<=n}a?this.nOut++:this.nIn++;return a?this.getShadeIndex(g,e,n):this.ellipsoidShades[g+20][e+20][n]},"~N,~N,~N,~N,JU.M4");b(c$,"createEllipsoidShades",function(){this.ellipsoidShades=
T(40,40,40,0);for(var a=0;40>a;a++)for(var c=0;40>c;c++)for(var b=0;40>b;b++)this.ellipsoidShades[a][c][b]=this.getShadeIndex(a-20,c-20,b)});b(c$,"flushSphereCache",function(){for(var a=128;0<=--a;)this.sphereShapeCache[a]=null;this.ellipsoidShades=null});b(c$,"occludePixels",function(a,c,b,n,f){a=c.length;for(var g=b=0,e=0;e<a;e++){var l=Math.min(c[e]>>5,0);if(0!=l){for(var j=Math.min(n,b+l),k=Math.min(f,g+l),m=Math.max(0,b-l);m<j;m++)for(var p=Math.max(0,g-l);p<k;p++);++b==n&&(b=0,g++)}}},"~A,~A,~A,~N,~N,~N");
B(c$,"shadeIndexMax",64);c$.shadeIndexLast=c$.prototype.shadeIndexLast=J.util.Shader.shadeIndexMax-1;B(c$,"shadeIndexNormal",52,"shadeIndexNoisyLimit",56,"SLIM",20,"SDIM",40,"maxSphereCache",128)});p("J.util");q(null,"J.util.SimpleUnitCell",["java.lang.Float","JU.AU","$.M4","$.V3"],function(){c$=u(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.matrixFtoCAbsolute=this.matrixCtoFAbsolute=null;t(this,arguments)},J.util,"SimpleUnitCell");b(c$,"isSupercell",function(){return 1<this.na||1<this.nb||1<this.nc});c$.isValid=b(c$,"isValid",function(a){return null!=a&&(0<a[0]||14<a.length&&!Float.isNaN(a[14]))},"~A");w(c$,function(){});c$.newA=b(c$,"newA",function(a){var c=new J.util.SimpleUnitCell;c.set(a);return c},"~A");b(c$,
"set",function(a){null==a&&(a=[1,1,1,90,90,90]);if(J.util.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 c=JU.V3.new3(a[6],a[7],a[8]),b=JU.V3.new3(a[9],a[10],a[11]),n=JU.V3.new3(a[12],
a[13],a[14]);this.a=c.length();this.b=b.length();this.c=n.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:b.angle(n)/0.017453292;this.beta=0>this.c?90:c.angle(n)/0.017453292;this.gamma=0>this.b?90:c.angle(b)/0.017453292;0>this.c&&(a=JU.AU.arrayCopyF(a,-1),0>this.b&&(b.set(0,0,1),b.cross(b,c),0.001>b.length()&&b.set(0,1,0),b.normalize(),a[9]=b.x,a[10]=b.y,a[11]=b.z),0>this.c&&(n.cross(c,b),n.normalize(),a[12]=n.x,a[13]=n.y,a[14]=n.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);c=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*c;this.cA_=(this.cosAlpha-this.cosBeta*this.cosGamma)/this.sinGamma;this.cB_=c/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])){c=M(16,0);for(b=0;16>b;b++){switch(b%4){case 0:n=this.na;break;case 1:n=this.nb;break;case 2:n=this.nc;break;default:n=1}c[b]=a[6+b]*n}this.matrixCartesianToFractional=
JU.M4.newA(c);this.matrixFractionalToCartesian=new JU.M4;this.matrixFractionalToCartesian.invertM(this.matrixCartesianToFractional)}else 14<a.length&&!Float.isNaN(a[14])?(c=this.matrixFractionalToCartesian=new JU.M4,c.setColumn4(0,a[6]*this.na,a[7]*this.na,a[8]*this.na,0),c.setColumn4(1,a[9]*this.nb,a[10]*this.nb,a[11]*this.nb,0),c.setColumn4(2,a[12]*this.nc,a[13]*this.nc,a[14]*this.nc,0)):(c=this.matrixFractionalToCartesian=new JU.M4,c.setColumn4(0,this.a,0,0,0),c.setColumn4(1,this.b*this.cosGamma,
this.b*this.sinGamma,0,0),c.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)),c.setColumn4(3,0,0,0,1),this.matrixCartesianToFractional=new JU.M4,this.matrixCartesianToFractional.invertM(this.matrixFractionalToCartesian);this.matrixCtoFAbsolute=this.matrixCartesianToFractional;this.matrixFtoCAbsolute=this.matrixFractionalToCartesian}},"~A");b(c$,"toSupercell",function(a){a.x/=this.na;a.y/=this.nb;a.z/=this.nc;
return a},"JU.P3");b(c$,"toCartesian",function(a,c){null!=this.matrixFractionalToCartesian&&(c?this.matrixFtoCAbsolute:this.matrixFractionalToCartesian).transform(a)},"JU.T3,~B");b(c$,"toFractional",function(a,c){null!=this.matrixCartesianToFractional&&(c?this.matrixCtoFAbsolute:this.matrixCartesianToFractional).transform(a)},"JU.T3,~B");b(c$,"isPolymer",function(){return 1==this.dimension});b(c$,"isSlab",function(){return 2==this.dimension});b(c$,"getNotionalUnitCell",function(){return this.notionalUnitcell});
b(c$,"getUnitCellAsArray",function(a){var c=this.matrixFractionalToCartesian;return a?[c.m00,c.m10,c.m20,c.m01,c.m11,c.m21,c.m02,c.m12,c.m22]:[this.a,this.b,this.c,this.alpha,this.beta,this.gamma,c.m00,c.m10,c.m20,c.m01,c.m11,c.m21,c.m02,c.m12,c.m22,this.dimension,this.volume]},"~B");b(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=b(c$,"ijkToPoint3f",function(a,c,b){b-=5;c.x=m(a/100)+b;c.y=m(a%100/10)+b;c.z=a%10+b},"~N,JU.P3,~N");B(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)});p("J.util");q(null,"J.util.TempArray",["java.lang.Boolean","$.Float","JU.P3","$.P3i"],function(){c$=u(function(){this.freeEnum=this.lengthsFreeEnum=this.freeScreens=this.lengthsFreeScreens=this.freePoints=this.lengthsFreePoints=null;t(this,arguments)},J.util,
"TempArray");N(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)});w(c$,function(){});b(c$,"clear",function(){this.clearTempPoints();this.clearTempScreens()});c$.findBestFit=b(c$,"findBestFit",function(a,c){for(var b=-1,n=2147483647,f=c.length;0<=--f;){var g=c[f];g>=a&&g<n&&(n=g,b=f)}0<=b&&(c[b]=0);return b},"~N,~A");c$.findShorter=b(c$,"findShorter",function(a,c){for(var b=
c.length;0<=--b;)if(0==c[b])return c[b]=a,b;for(var n=0,f=c[0],b=c.length;0<--b;)c[b]<f&&(f=c[b],n=b);return f<a?(c[n]=a,n):-1},"~N,~A");b(c$,"clearTempPoints",function(){for(var a=0;6>a;a++)this.lengthsFreePoints[a]=0,this.freePoints[a]=null});b(c$,"allocTempPoints",function(a){var c;c=J.util.TempArray.findBestFit(a,this.lengthsFreePoints);if(0<c)c=this.freePoints[c];else for(c=Array(a);0<=--a;)c[a]=new JU.P3;return c},"~N");b(c$,"freeTempPoints",function(a){for(var c=0;c<this.freePoints.length;c++)if(this.freePoints[c]===
a){this.lengthsFreePoints[c]=a.length;return}c=J.util.TempArray.findShorter(a.length,this.lengthsFreePoints);0<=c&&(this.freePoints[c]=a)},"~A");b(c$,"clearTempScreens",function(){for(var a=0;6>a;a++)this.lengthsFreeScreens[a]=0,this.freeScreens[a]=null});b(c$,"allocTempScreens",function(a){var c;c=J.util.TempArray.findBestFit(a,this.lengthsFreeScreens);if(0<c)c=this.freeScreens[c];else for(c=Array(a);0<=--a;)c[a]=new JU.P3i;return c},"~N");b(c$,"freeTempScreens",function(a){for(var c=0;c<this.freeScreens.length;c++)if(this.freeScreens[c]===
a){this.lengthsFreeScreens[c]=a.length;return}c=J.util.TempArray.findShorter(a.length,this.lengthsFreeScreens);0<=c&&(this.freeScreens[c]=a)},"~A");b(c$,"allocTempEnum",function(a){var c=J.util.TempArray.findBestFit(a,this.lengthsFreeEnum);return 0<c?this.freeEnum[c]:Array(a)},"~N");b(c$,"freeTempEnum",function(a){for(var c=0;c<this.freeEnum.length;c++)if(this.freeEnum[c]===a){this.lengthsFreeEnum[c]=a.length;return}c=J.util.TempArray.findShorter(a.length,this.lengthsFreeEnum);0<=c&&(this.freeEnum[c]=
a)},"~A");c$.getSlabWithinRange=b(c$,"getSlabWithinRange",function(a,c){return[Integer.$valueOf(1073742114),[Float.$valueOf(a),Float.$valueOf(c)],Boolean.FALSE,null]},"~N,~N");c$.getSlabObjectType=b(c$,"getSlabObjectType",function(a,c,b,n){return[Integer.$valueOf(a),c,Boolean.$valueOf(b),n]},"~N,~O,~B,~O");B(c$,"freePointsSize",6,"freeScreensSize",6,"freeEnumSize",2)});p("J.util");q(null,"J.util.Txt",["java.lang.Character","$.Double","$.Float","JU.PT","$.SB"],function(){c$=G(J.util,"Txt");c$.formatStringS=
b(c$,"formatStringS",function(a,c,b){return J.util.Txt.formatString(a,c,b,NaN,NaN,!1)},"~S,~S,~S");c$.formatStringF=b(c$,"formatStringF",function(a,c,b){return J.util.Txt.formatString(a,c,null,b,NaN,!1)},"~S,~S,~N");c$.formatStringI=b(c$,"formatStringI",function(a,c,b){return J.util.Txt.formatString(a,c,""+b,NaN,NaN,!1)},"~S,~S,~N");c$.sprintf=b(c$,"sprintf",function(a,c,b){if(null==b)return a;var n=c.length;if(n==b.length)try{for(var f=0;f<n;f++)if(null!=b[f])switch(c.charAt(f)){case "s":a=J.util.Txt.formatString(a,
"s",b[f],NaN,NaN,!0);break;case "f":a=J.util.Txt.formatString(a,"f",null,b[f].floatValue(),NaN,!0);break;case "i":a=J.util.Txt.formatString(a,"d",""+b[f],NaN,NaN,!0);a=J.util.Txt.formatString(a,"i",""+b[f],NaN,NaN,!0);break;case "d":a=J.util.Txt.formatString(a,"e",null,NaN,b[f].doubleValue(),!0);break;case "p":var g=b[f];a=J.util.Txt.formatString(a,"p",null,g.x,NaN,!0);a=J.util.Txt.formatString(a,"p",null,g.y,NaN,!0);a=J.util.Txt.formatString(a,"p",null,g.z,NaN,!0);break;case "q":var e=b[f];a=J.util.Txt.formatString(a,
"q",null,e.x,NaN,!0);a=J.util.Txt.formatString(a,"q",null,e.y,NaN,!0);a=J.util.Txt.formatString(a,"q",null,e.z,NaN,!0);a=J.util.Txt.formatString(a,"q",null,e.w,NaN,!0);break;case "S":for(var l=b[f],j=0;j<l.length;j++)a=J.util.Txt.formatString(a,"s",l[j],NaN,NaN,!0);break;case "F":for(var k=b[f],j=0;j<k.length;j++)a=J.util.Txt.formatString(a,"f",null,k[j],NaN,!0);break;case "I":for(var m=b[f],j=0;j<m.length;j++)a=J.util.Txt.formatString(a,"d",""+m[j],NaN,NaN,!0);for(j=0;j<m.length;j++)a=J.util.Txt.formatString(a,
"i",""+m[j],NaN,NaN,!0);break;case "D":for(var p=b[f],j=0;j<p.length;j++)a=J.util.Txt.formatString(a,"e",null,NaN,p[j],!0)}return JU.PT.simpleReplace(a,"%%","%")}catch(r){if(!y(r,Exception))throw r;}System.out.println("TextFormat.sprintf error "+c+" "+a);return JU.PT.simpleReplace(a,"%","?")},"~S,~S,~A");c$.formatString=b(c$,"formatString",function(a,c,b,n,f,g){if(null==a)return null;if("".equals(a))return"";var e=c.length;if(0>a.indexOf("%")||0==e||0>a.indexOf(c))return a;var l="",j,k,m;for(j=0;0<=
(k=a.indexOf("%",j))&&0<=(m=a.indexOf(c,k+1));)if(j!=k&&(l+=a.substring(j,k)),j=k+1,m>k+6)l+="%";else try{var p=!1;"-"==a.charAt(j)&&(p=!0,++j);var r=!1;"0"==a.charAt(j)&&(r=!0,++j);for(var q,s=0;"0"<=(q=a.charAt(j))&&"9">=q;)s=10*s+(q.charCodeAt(0)-48),++j;var t=2147483647,u=!1;if("."==a.charAt(j)){++j;if("-"==(q=a.charAt(j)))u=!0,++j;if("0"<=(q=a.charAt(j))&&"9">=q)t=q.charCodeAt(0)-48,++j;u&&(t=-t-(null==b?1:0))}if(a.substring(j,j+e).equals(c)){if(j+=e,Float.isNaN(n)?null!=b?l+=JU.PT.formatS(b,
s,t,p,r):Double.isNaN(f)||(l+=JU.PT.formatD(f,s,t,p,r,!0)):l+=JU.PT.formatF(n,s,t,p,r),g)break}else j=k+1,l+="%"}catch(w){if(y(w,IndexOutOfBoundsException)){j=k;break}else throw w;}return l+=a.substring(j)},"~S,~S,~S,~N,~N,~B");c$.formatCheck=b(c$,"formatCheck",function(a){if(null==a||0>a.indexOf("p")&&0>a.indexOf("q"))return a;a=JU.PT.simpleReplace(a,"%%","\u0001");a=JU.PT.simpleReplace(a,"%p","%6.2p");a=JU.PT.simpleReplace(a,"%q","%6.2q");a=JU.PT.split(a,"%");var c=new JU.SB;c.append(a[0]);for(var b=
1;b<a.length;b++){var n="%"+a[b],f;if(3<=n.length){if(0<=(f=n.indexOf("p")))n=J.util.Txt.fdup(n,f,3);if(0<=(f=n.indexOf("q")))n=J.util.Txt.fdup(n,f,4)}c.append(n)}return c.toString().$replace("\u0001","%")},"~S");c$.fdup=b(c$,"fdup",function(a,c,b){for(var n,f=0,g=c;1<=--g;)if(!Character.isDigit(n=a.charAt(g)))switch(n){case ".":if(0!=f++)return a;continue;case "-":if(1!=g)return a;continue;default:return a}n=a.substring(0,c+1);f=new JU.SB;for(g=0;g<b;g++)f.append(n);f.append(a.substring(c+1));return f.toString()},
"~S,~N,~N");c$.leftJustify=b(c$,"leftJustify",function(a,c,b){a.append(b);b=c.length-b.length;0<b&&a.append(c.substring(0,b))},"JU.SB,~S,~S");c$.rightJustify=b(c$,"rightJustify",function(a,c,b){var n=c.length-b.length;0<n&&a.append(c.substring(0,n));a.append(b)},"JU.SB,~S,~S");c$.safeTruncate=b(c$,"safeTruncate",function(a,c){-0.001<a&&0.001>a&&(a=0);return(a+"         ").substring(0,c)},"~N,~N");c$.isWild=b(c$,"isWild",function(a){return null!=a&&(0<=a.indexOf("*")||0<=a.indexOf("?"))},"~S");c$.isMatch=
b(c$,"isMatch",function(a,c,b,n){var f=0,g=c.length,e=a.length;if(0==e||0==g)return e==g||1==g&&"*"==c.charAt(0);if((f=b&&n?"*"==c.charAt(0):!1)&&"*"==c.charAt(g-1))return 3>g||0<=a.indexOf(c.substring(1,g-1));for(var l="????";l.length<a.length;)l+=l;if(b){n&&f&&(c=l+c.substring(1));if("*"==c.charAt(f=c.length-1))c=c.substring(0,f)+l;g=c.length}if(g<e)return!1;for(f=0;g>e;){if(n&&"?"==c.charAt(f))++f;else if("?"!=c.charAt(f+g-1))return!1;--g}for(b=e;0<=--b;)if(n=c.charAt(f+b),"?"!=n&&n!=a.charAt(b)&&
("\u0001"!=n||"?"!=a.charAt(b)))return!1;return!0},"~S,~S,~B,~B");c$.join=b(c$,"join",function(a,c,b){if(a.length<b)return null;var n=new JU.SB;for(n.append(a[b++]);b<a.length;b++)n.appendC(c).append(a[b]);return n.toString()},"~A,~S,~N");c$.replaceQuotedStrings=b(c$,"replaceQuotedStrings",function(a,c,b){for(var n=c.size(),f=0;f<n;f++){var g=c.get(f),e=b.get(f);e.equals(g)||(a=JU.PT.simpleReplace(a,'"'+g+'"','"'+e+'"'))}return a},"~S,java.util.List,java.util.List");c$.replaceStrings=b(c$,"replaceStrings",
function(a,c,b){for(var n=c.size(),f=0;f<n;f++){var g=c.get(f),e=b.get(f);e.equals(g)||(a=JU.PT.simpleReplace(a,g,e))}return a},"~S,java.util.List,java.util.List");c$.ichMathTerminator=b(c$,"ichMathTerminator",function(a,c,b){for(var n=1,f="\x00",g="\x00";0<n&&++c<b;){var e=a.charAt(c);if("\x00"!=f)"\\"==g?e="\x00":e==f&&(f="\x00"),g=e;else switch(e){case "'":case '"':f=e;break;case "{":n++;break;case "}":n--}}return c},"~S,~N,~N")});p("J.util");q(["JU.V3"],"J.util.Vibration",null,function(){c$=G(J.util,
"Vibration",JU.V3);b(c$,"setTempPoint",function(a,c,b){a.scaleAdd2(Math.cos(6.283185307179586*c.x)*b,this,a)},"JU.T3,JU.T3,~N,~N");b(c$,"getInfo",function(a){a.put("vibVector",JU.V3.newV(this))},"java.util.Map");b(c$,"getUnitCell",function(){return null});B(c$,"twoPI",6.283185307179586)});p("J.viewer");q(["javajs.api.EventManager","J.util.Rectangle","J.viewer.MouseState"],"J.viewer.ActionManager","java.lang.Boolean $.Character $.Float java.util.Hashtable JU.List $.P3 $.PT J.i18n.GT J.thread.HoverWatcherThread J.util.BSUtil $.Escape $.Logger $.Point3fi J.viewer.binding.Binding $.JmolBinding".split(" "),
function(){c$=u(function(){this.viewer=null;this.haveMultiTouchInput=!1;this.predragBinding=this.rasmolBinding=this.dragBinding=this.pfaatBinding=this.jmolBinding=this.binding=null;this.LEFT_DRAGGED=this.LEFT_CLICKED=0;this.hoverWatcherThread=null;la("J.viewer.ActionManager.MotionPoint")||J.viewer.ActionManager.$ActionManager$MotionPoint$();this.dragGesture=null;la("J.viewer.ActionManager.Gesture")||J.viewer.ActionManager.$ActionManager$Gesture$();this.atomPickingMode=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.measurementPending=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;t(this,arguments)},J.viewer,"ActionManager",null,javajs.api.EventManager);N(c$,function(){this.dragGesture=ka(J.viewer.ActionManager.Gesture,this,null,20);this.current=new J.viewer.MouseState("current");this.moved=new J.viewer.MouseState("moved");
this.clicked=new J.viewer.MouseState("clicked");this.pressed=new J.viewer.MouseState("pressed");this.dragged=new J.viewer.MouseState("dragged");this.rectRubber=new J.util.Rectangle});b(c$,"setViewer",function(a){this.viewer=a;this.setBinding(this.jmolBinding=new J.viewer.binding.JmolBinding);this.LEFT_CLICKED=J.viewer.binding.Binding.getMouseAction(1,16,2);this.LEFT_DRAGGED=J.viewer.binding.Binding.getMouseAction(1,16,1)},"J.viewer.Viewer,~S");b(c$,"checkHover",function(){if(!this.viewer.getInMotion(!0)&&
!this.viewer.getSpinOn()&&!this.viewer.getNavOn()&&!this.viewer.checkObjectHovered(this.current.x,this.current.y)){var a=this.viewer.findNearestAtomIndex(this.current.x,this.current.y);if(!(0>a)){var c=2==this.getAtomPickingMode()&&this.isBound(J.viewer.binding.Binding.getMouseAction(this.clickedCount,this.moved.modifiers,1),10);this.viewer.hoverOn(a,c)}}});b(c$,"processMultitouchEvent",function(){},"~N,~N,~N,~N,JU.P3,~N");b(c$,"isBound",function(a,c){return this.binding.isBound(a,c)},"~N,~N");b(c$,
"bindAction",function(a,c){var b=J.viewer.ActionManager.getActionFromName(c),e=J.viewer.binding.Binding.getMouseActionStr(a);0!=e&&(0<=b?this.binding.bindAction(e,b):this.binding.bindName(e,c))},"~S,~S");b(c$,"clearBindings",function(){this.setBinding(this.jmolBinding=new J.viewer.binding.JmolBinding);this.rasmolBinding=this.dragBinding=this.pfaatBinding=null});b(c$,"unbindAction",function(a,c){if(null==a&&null==c)this.clearBindings();else{var b=J.viewer.ActionManager.getActionFromName(c),e=J.viewer.binding.Binding.getMouseActionStr(a);
0<=b?this.binding.unbindAction(e,b):0!=e&&this.binding.unbindName(e,c);null==c&&this.binding.unbindUserAction(a)}},"~S,~S");c$.newAction=b(c$,"newAction",function(a,c,b){J.viewer.ActionManager.actionInfo[a]=b;J.viewer.ActionManager.actionNames[a]=c},"~N,~S,~S");c$.getActionName=b(c$,"getActionName",function(a){return a<J.viewer.ActionManager.actionNames.length?J.viewer.ActionManager.actionNames[a]:null},"~N");c$.getActionFromName=b(c$,"getActionFromName",function(a){for(var c=0;c<J.viewer.ActionManager.actionNames.length;c++)if(J.viewer.ActionManager.actionNames[c].equalsIgnoreCase(a))return c;
return-1},"~S");b(c$,"getBindingInfo",function(a){return this.binding.getBindingInfo(J.viewer.ActionManager.actionInfo,J.viewer.ActionManager.actionNames,a)},"~S");b(c$,"setBinding",function(a){this.binding=a},"J.viewer.binding.Binding");c$.getPickingModeName=b(c$,"getPickingModeName",function(a){return 0>a||a>=J.viewer.ActionManager.pickingModeNames.length?"off":J.viewer.ActionManager.pickingModeNames[a]},"~N");c$.getPickingMode=b(c$,"getPickingMode",function(a){for(var c=J.viewer.ActionManager.pickingModeNames.length;0<=
--c;)if(a.equalsIgnoreCase(J.viewer.ActionManager.pickingModeNames[c]))return c;return-1},"~S");b(c$,"getAtomPickingMode",function(){return this.atomPickingMode});b(c$,"setPickingMode",function(a){var c=!1;switch(a){case -1:c=!0;this.bondPickingMode=35;a=1;break;case 35:case 34:case 33:this.viewer.setBooleanProperty("bondPicking",!0);this.bondPickingMode=a;return;case 8:this.bondPickingMode=a;if(this.viewer.getBondPicking())return;c=!0}c=(new Boolean(c|this.atomPickingMode!=a)).valueOf();this.atomPickingMode=
a;c&&this.resetMeasurement()},"~N");b(c$,"setAtomPickingOption",function(a){switch(this.atomPickingMode){case 32:this.pickAtomAssignType=a,this.isPickAtomAssignCharge=this.pickAtomAssignType.equals("Pl")||this.pickAtomAssignType.equals("Mi")}},"~S");b(c$,"setBondPickingOption",function(a){switch(this.bondPickingMode){case 33:this.pickBondAssignType=Character.toLowerCase(a.charAt(0))}},"~S");c$.getPickingStyleName=b(c$,"getPickingStyleName",function(a){return 0>a||a>=J.viewer.ActionManager.pickingStyleNames.length?
"toggle":J.viewer.ActionManager.pickingStyleNames[a]},"~N");c$.getPickingStyleIndex=b(c$,"getPickingStyleIndex",function(a){for(var c=J.viewer.ActionManager.pickingStyleNames.length;0<=--c;)if(a.equalsIgnoreCase(J.viewer.ActionManager.pickingStyleNames[c]))return c;return-1},"~S");b(c$,"getPickingState",function(){var a=";set modelkitMode "+this.viewer.getBoolean(603979883)+";set picking "+J.viewer.ActionManager.getPickingModeName(this.atomPickingMode);32==this.atomPickingMode&&(a+="_"+this.pickAtomAssignType);
a+=";";0!=this.bondPickingMode&&(a+="set picking "+J.viewer.ActionManager.getPickingModeName(this.bondPickingMode));33==this.bondPickingMode&&(a+="_"+this.pickBondAssignType);return a+";"});b(c$,"getPickingStyle",function(){return this.pickingStyle});b(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.binding.name.equals("extendedSelect")||
this.setBinding(null==this.pfaatBinding?this.pfaatBinding=J.viewer.binding.Binding.newBinding("Pfaat"):this.pfaatBinding);break;case 3:this.binding.name.equals("drag")||this.setBinding(null==this.dragBinding?this.dragBinding=J.viewer.binding.Binding.newBinding("Drag"):this.dragBinding);this.rubberbandSelectionMode=!0;break;case 1:this.binding.name.equals("selectOrToggle")||this.setBinding(null==this.rasmolBinding?this.rasmolBinding=J.viewer.binding.Binding.newBinding("Rasmol"):this.rasmolBinding);
break;default:this.binding!==this.jmolBinding&&this.setBinding(this.jmolBinding)}this.binding.name.equals("drag")||(this.predragBinding=this.binding)},"~N");b(c$,"getMouseInfo",function(){for(var a=new java.util.Hashtable,c=new JU.List,b,e=this.binding.getBindings().values().iterator();e.hasNext()&&((b=e.next())||1);)s(b,Boolean)||(JU.PT.isAI(b)&&(b=[J.viewer.binding.Binding.getMouseActionName(b[0],!1),J.viewer.ActionManager.getActionName(b[1])]),c.addLast(b));a.put("bindings",c);a.put("bindingName",
this.binding.name);a.put("actionNames",J.viewer.ActionManager.actionNames);a.put("actionInfo",J.viewer.ActionManager.actionInfo);a.put("bindingInfo",JU.PT.split(this.getBindingInfo(null),"\n"));return a});b(c$,"setGestureSwipeFactor",function(a){this.gestureSwipeFactor=a},"~N");b(c$,"setMouseDragFactor",function(a){this.mouseDragFactor=a},"~N");b(c$,"setMouseWheelFactor",function(a){this.mouseWheelFactor=a},"~N");b(c$,"setCurrent",function(a,c,b,e){this.viewer.hoverOff();this.current.set(a,c,b,e)},
"~N,~N,~N,~N");b(c$,"getCurrentX",function(){return this.current.x});b(c$,"getCurrentY",function(){return this.current.y});b(c$,"setMouseMode",function(){this.drawMode=this.labelMode=!1;this.dragSelectedMode=this.viewer.getDragSelected();this.measuresEnabled=!this.dragSelectedMode;if(!this.dragSelectedMode)switch(this.atomPickingMode){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)});b(c$,"clearMouseInfo",function(){this.pressedCount=this.clickedCount=0;this.dragGesture.setAction(0,0);this.exitMeasurementMode(null)});b(c$,"isMTClient",function(){return this.isMultiTouchClient});b(c$,"isMTServer",function(){return this.isMultiTouchServer});b(c$,"dispose",function(){this.clear()});b(c$,"clear",function(){this.startHoverWatcher(!1);null!=this.predragBinding&&
(this.binding=this.predragBinding);this.viewer.setPickingMode(null,1);this.viewer.setPickingStyle(null,this.rootPickingStyle);this.isAltKeyReleased=!0});b(c$,"startHoverWatcher",function(a){if(!this.viewer.isPreviewOnly())try{a?null==this.hoverWatcherThread&&(this.current.time=-1,this.hoverWatcherThread=new J.thread.HoverWatcherThread(this,this.current,this.moved,this.viewer)):null!=this.hoverWatcherThread&&(this.current.time=-1,this.hoverWatcherThread.interrupt(),this.hoverWatcherThread=null)}catch(c){if(!y(c,
Exception))throw c;}},"~B");b(c$,"setModeMouse",function(a){-1==a&&this.startHoverWatcher(!1)},"~N");e(c$,"keyPressed",function(a,c){if(this.keyProcessing)return!1;this.viewer.hoverOff();this.keyProcessing=!0;switch(a){case 18:this.dragSelectedMode&&this.isAltKeyReleased&&this.viewer.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 b=8464|this.moved.modifiers;!this.labelMode&&!this.binding.isUserAction(b)&&this.checkMotionRotateZoom(b,this.current.x,0,0,!1);if(this.viewer.getBoolean(603979887))switch(a){case 38:case 40:case 37:case 39:case 32:case 46:this.viewer.navigate(a,c)}this.keyProcessing=!1;return!0},"~N,~N");e(c$,"keyReleased",function(a){switch(a){case 18:this.dragSelectedMode&&this.viewer.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.viewer.setCursor(0);if(this.viewer.getBoolean(603979887))switch(a){case 38:case 40:case 37:case 39:this.viewer.navigate(0,0)}},"~N");e(c$,"mouseEnterExit",function(a,c,b,e){this.setCurrent(a,c,b,0);e&&this.exitMeasurementMode("mouseExit")},"~N,~N,~N,~B");b(c$,"setMouseActions",function(a,c,b){this.pressAction=J.viewer.binding.Binding.getMouseAction(a,
c,b?5:4);this.dragAction=J.viewer.binding.Binding.getMouseAction(a,c,1);this.clickAction=J.viewer.binding.Binding.getMouseAction(a,c,2)},"~N,~N,~B");e(c$,"mouseAction",function(a,c,b,e,f,g){if(this.viewer.getMouseEnabled())switch(J.util.Logger.debuggingHigh&&0!=a&&this.viewer.showString("mouse action: "+a+" "+g+" "+J.viewer.binding.Binding.getMouseActionName(J.viewer.binding.Binding.getMouseAction(f,g,a),!1),!1),a){case 0:this.setCurrent(c,b,e,g);this.moved.setCurrent(this.current,0);if(null!=this.measurementPending||
this.hoverActive){this.clickAction=J.viewer.binding.Binding.getMouseAction(this.clickedCount,g,0);this.checkClickAction(b,e,c,0);break}if(this.isZoomArea(b)){this.checkMotionRotateZoom(this.LEFT_DRAGGED,0,0,0,!1);break}8==this.viewer.getCursor()&&this.viewer.setCursor(0);break;case 4:this.setMouseMode();this.pressedCount=this.pressed.check(0,0,0,g,c,700)?this.pressedCount+1:1;1==this.pressedCount&&(this.viewer.checkInMotion(1),this.setCurrent(c,b,e,g));this.pressAction=J.viewer.binding.Binding.getMouseAction(this.pressedCount,
g,4);this.viewer.setCursor(12);this.pressed.setCurrent(this.current,1);this.dragged.setCurrent(this.current,1);this.viewer.setFocus();this.dragGesture.setAction(this.dragAction,c);this.checkPressedAction(b,e,c);break;case 1:this.setMouseMode();this.setMouseActions(this.pressedCount,g,!1);a=b-this.dragged.x;f=e-this.dragged.y;this.setCurrent(c,b,e,g);this.dragged.setCurrent(this.current,-1);32!=this.atomPickingMode&&this.exitMeasurementMode(null);this.dragGesture.add(this.dragAction,b,e,c);this.checkDragWheelAction(this.dragAction,
b,e,a,f,c,1);break;case 5:this.setMouseActions(this.pressedCount,g,!0);this.setCurrent(c,b,e,g);this.viewer.spinXYBy(0,0,0);g=!this.pressed.check(this.xyRange,b,e,g,c,9223372036854775E3);this.checkReleaseAction(b,e,c,g);break;case 3:if(this.viewer.isApplet()&&!this.viewer.hasFocus())break;this.setCurrent(c,this.current.x,this.current.y,g);this.checkDragWheelAction(J.viewer.binding.Binding.getMouseAction(0,g,3),this.current.x,this.current.y,0,e,c,3);break;case 2:this.setMouseMode();this.clickedCount=
1<f?f:this.clicked.check(0,0,0,g,c,700)?this.clickedCount+1:1;1==this.clickedCount&&this.setCurrent(c,b,e,g);this.setMouseActions(this.clickedCount,g,!1);this.clicked.setCurrent(this.current,this.clickedCount);this.viewer.setFocus();if(9!=this.atomPickingMode&&this.isBound(J.viewer.binding.Binding.getMouseAction(1,g,4),31))break;this.clickAction=J.viewer.binding.Binding.getMouseAction(this.clickedCount,g,2);this.checkClickAction(b,e,c,this.clickedCount)}},"~N,~N,~N,~N,~N,~N");b(c$,"checkPressedAction",
function(a,c,b){var e=J.viewer.binding.Binding.getButtonMods(this.pressAction),f=this.isBound(J.viewer.binding.Binding.getMouseAction(1,e,4),31);if(0!=e){this.pressAction=this.viewer.notifyMouseClicked(a,c,this.pressAction,4);if(0==this.pressAction)return;e=J.viewer.binding.Binding.getButtonMods(this.pressAction)}this.setMouseActions(this.pressedCount,e,!1);J.util.Logger.debugging&&J.util.Logger.debug(J.viewer.binding.Binding.getMouseActionName(this.pressAction,!1));if(this.drawMode&&(this.isBound(this.dragAction,
8)||this.isBound(this.dragAction,9))||this.labelMode&&this.isBound(this.dragAction,10))this.viewer.checkObjectDragged(-2147483648,0,a,c,this.dragAction);else{this.checkUserAction(this.pressAction,a,c,0,0,b,4);b=!1;switch(this.atomPickingMode){case 32:b=this.isBound(this.clickAction,0);break;case 28:b=this.isBound(this.dragAction,7)||this.isBound(this.dragAction,14);break;case 26:case 36:case 27:b=this.isBound(this.dragAction,7)||this.isBound(this.dragAction,27)||this.isBound(this.dragAction,14);break;
case 29:b=this.isBound(this.dragAction,11)||this.isBound(this.dragAction,14);break;case 30:b=this.isBound(this.dragAction,12)||this.isBound(this.dragAction,27)||this.isBound(this.dragAction,14)}if(b){if(this.dragAtomIndex=this.viewer.findNearestAtomIndexMovable(a,c,!0),0<=this.dragAtomIndex&&(32==this.atomPickingMode||31==this.atomPickingMode)&&this.viewer.isAtomAssignable(this.dragAtomIndex))this.enterMeasurementMode(this.dragAtomIndex),this.measurementPending.addPoint(this.dragAtomIndex,null,!1)}else this.isBound(this.pressAction,
23)?(f="j",this.viewer.getBoolean(603979883)&&(f=this.viewer.checkObjectClicked(a,c,this.LEFT_CLICKED),f=null!=f&&"bond".equals(f.get("type"))?"b":0<=this.viewer.findNearestAtomIndex(a,c)?"a":"m"),this.viewer.popupMenu(a,c,f)):this.dragSelectedMode?(this.haveSelection=!0,f&&(this.haveSelection=0<=this.viewer.findNearestAtomIndexMovable(a,c,!0)),this.haveSelection&&(this.isBound(this.dragAction,13)||this.isBound(this.dragAction,14))&&this.viewer.moveSelected(-2147483648,0,-2147483648,-2147483648,-2147483648,
null,!1,!1)):(this.viewer.global.useArcBall&&this.viewer.rotateArcBall(a,c,0),this.checkMotionRotateZoom(this.dragAction,a,0,0,!0))}},"~N,~N,~N");b(c$,"checkDragWheelAction",function(a,c,b,e,f,g,h){var l=J.viewer.binding.Binding.getButtonMods(a);if(0!=l){l=this.viewer.notifyMouseClicked(c,b,J.viewer.binding.Binding.getMouseAction(this.pressedCount,l,h),h);if(0==l)return;0<l&&(a=l)}if(this.isRubberBandSelect(a))this.calcRectRubberBand(),this.viewer.refresh(3,"rubberBand selection");else if(!this.checkUserAction(a,
c,b,e,f,g,h)){if(0<=this.viewer.getRotateBondIndex()){if(this.isBound(a,26)){this.viewer.moveSelected(e,f,-2147483648,c,b,null,!1,!1);return}this.isBound(a,25)||this.viewer.setRotateBondIndex(-1)}g=null;if(0<=this.dragAtomIndex)switch(this.atomPickingMode){case 26:this.setMotion(13,!0);this.isBound(a,27)&&this.viewer.getBoolean(603979785)?this.viewer.rotateSelected(this.getDegrees(e,0),this.getDegrees(f,1),null):this.viewer.moveSelected(e,f,this.isBound(a,14)?-f:-2147483648,-2147483648,-2147483648,
null,!0,!1);return;case 36:case 27:case 30:g=this.viewer.getAtomBits(1095761936,J.util.BSUtil.newAndSetBit(this.dragAtomIndex)),36==this.atomPickingMode&&g.and(this.viewer.getAtomBitSet("ligand"));case 28:case 29:1==this.dragGesture.getPointCount()&&this.viewer.undoMoveActionClear(this.dragAtomIndex,2,!0);this.setMotion(13,!0);if(this.isBound(a,27))this.viewer.rotateSelected(this.getDegrees(e,0),this.getDegrees(f,1),g);else{switch(this.atomPickingMode){case 36:case 27:case 30:this.viewer.select(g,
!1,0,!0)}this.viewer.moveAtomWithHydrogens(this.dragAtomIndex,e,f,this.isBound(a,14)?-f:-2147483648,g)}return}0<=this.dragAtomIndex&&1==h&&this.isBound(this.clickAction,0)&&32==this.atomPickingMode?(f=this.viewer.findNearestAtomIndexMovable(c,b,!1),0<=f?(null!=this.measurementPending?this.measurementPending.setCount(1):this.measuresEnabled&&this.enterMeasurementMode(f),this.addToMeasurement(f,null,!0),this.measurementPending.colix=20):null!=this.measurementPending&&(this.measurementPending.setCount(1),
this.measurementPending.colix=23),null!=this.measurementPending&&(this.measurementPending.traceX=c,this.measurementPending.traceY=b,this.viewer.refresh(3,"assignNew"))):!this.drawMode&&!this.labelMode&&this.isBound(a,45)?this.viewer.translateXYBy(e,f):this.dragSelectedMode&&this.haveSelection&&(this.isBound(a,13)||this.isBound(a,27))?(c=this.viewer.getSelectionSet(!1).nextSetBit(0),0>c||(1==this.dragGesture.getPointCount()?this.viewer.undoMoveActionClear(c,2,!0):this.viewer.moveSelected(2147483647,
0,-2147483648,-2147483648,-2147483648,null,!1,!1),this.setMotion(13,!0),this.isBound(a,27)&&this.viewer.getBoolean(603979785)?this.viewer.rotateSelected(this.getDegrees(e,0),this.getDegrees(f,1),null):this.viewer.moveSelected(e,f,-2147483648,-2147483648,-2147483648,null,!0,!1))):this.drawMode&&(this.isBound(a,8)||this.isBound(a,9))||this.labelMode&&this.isBound(a,10)?(this.setMotion(13,!0),this.viewer.checkObjectDragged(this.dragged.x,this.dragged.y,c,b,a)):this.checkMotionRotateZoom(a,c,e,f,!0)?
this.viewer.getSlabEnabled()&&this.checkSlideZoom(a)?this.viewer.slabDepthByPixels(f):this.viewer.zoomBy(f):this.isBound(a,25)?(a=this.getDegrees(e,0),f=this.getDegrees(f,1),this.viewer.global.useArcBall?this.viewer.rotateArcBall(c,b,this.mouseDragFactor):this.viewer.rotateXYBy(a,f)):this.isBound(a,29)?0==e&&1<Math.abs(f)?(this.setMotion(8,!0),this.viewer.zoomBy(f+(0<f?-1:1))):0==f&&1<Math.abs(e)&&(this.setMotion(13,!0),this.viewer.rotateZBy(-e+(0<e?1:-1),2147483647,2147483647)):this.isBound(a,46)?
this.zoomByFactor(f,2147483647,2147483647):this.isBound(a,28)?(this.setMotion(13,!0),this.viewer.rotateZBy(-e,2147483647,2147483647)):this.viewer.getSlabEnabled()&&(this.isBound(a,6)?this.viewer.depthByPixels(f):this.isBound(a,38)?this.viewer.slabByPixels(f):this.isBound(a,39)&&this.viewer.slabDepthByPixels(f))}},"~N,~N,~N,~N,~N,~N,~N");b(c$,"checkReleaseAction",function(a,c,b,e){J.util.Logger.debugging&&J.util.Logger.debug(J.viewer.binding.Binding.getMouseActionName(this.pressAction,!1));this.viewer.checkInMotion(0);
this.viewer.setInMotion(!1);this.viewer.setCursor(0);this.dragGesture.add(this.dragAction,a,c,b);e&&this.viewer.setRotateBondIndex(-2147483648);0<=this.dragAtomIndex&&(29==this.atomPickingMode||30==this.atomPickingMode)&&this.minimize(!0);if(32==this.atomPickingMode&&this.isBound(this.clickAction,0))null==this.measurementPending||0>this.dragAtomIndex||this.assignNew(a,c);else if(this.dragAtomIndex=-1,this.isRubberBandSelect(this.dragAction)&&this.selectRb(this.clickAction),this.rubberbandSelectionMode=
this.binding.name.equals("drag"),this.rectRubber.x=2147483647,e&&this.viewer.notifyMouseClicked(a,c,J.viewer.binding.Binding.getMouseAction(this.pressedCount,0,5),5),this.drawMode&&(this.isBound(this.dragAction,8)||this.isBound(this.dragAction,9))||this.labelMode&&this.isBound(this.dragAction,10))this.viewer.checkObjectDragged(2147483647,0,a,c,this.dragAction);else if(this.dragSelectedMode&&(this.isBound(this.dragAction,13)&&this.haveSelection)&&this.viewer.moveSelected(2147483647,0,-2147483648,-2147483648,
-2147483648,null,!1,!1),(!e||!this.checkUserAction(this.pressAction,a,c,0,0,b,5))&&this.viewer.getBoolean(603979780)&&this.isBound(this.dragAction,44))a=this.getExitRate(),0<a&&this.viewer.spinXYBy(this.dragGesture.getDX(4,2),this.dragGesture.getDY(4,2),30*a*this.gestureSwipeFactor),this.viewer.global.logGestures&&this.viewer.log("$NOW$ swipe "+this.dragGesture+" "+a)},"~N,~N,~N,~B");b(c$,"checkClickAction",function(a,c,b,e){if(this.viewer.haveModelSet()){if(0<e){if(this.checkUserAction(this.clickAction,
a,c,0,0,b,32768))return;this.clickAction=this.viewer.notifyMouseClicked(a,c,this.clickAction,32768);if(0==this.clickAction)return}J.util.Logger.debugging&&J.util.Logger.debug(J.viewer.binding.Binding.getMouseActionName(this.clickAction,!1));if(this.isBound(this.clickAction,2)&&this.viewer.frankClicked(a,c))this.viewer.popupMenu(-a,c,"j");else if(this.isBound(this.clickAction,2)&&this.viewer.frankClickedModelKit(a,c))this.viewer.popupMenu(0,0,"m");else{b=null;var f=!1,g=!1,h=null;this.drawMode||(h=
this.viewer.checkObjectClicked(a,c,this.clickAction),null!=h&&(f="bond".equals(h.get("type")),g="isosurface".equals(h.get("type")),b=this.getPoint(h)));f&&(e=1);if(!(null!=b&&Float.isNaN(b.x))){var l=this.findNearestAtom(a,c,b,0<e);if(0==e&&32!=this.atomPickingMode)null!=this.measurementPending&&((null!=b||0==this.measurementPending.getIndexOf(l))&&this.measurementPending.addPoint(l,b,!1),this.measurementPending.haveModified&&this.viewer.setPendingMeasurement(this.measurementPending),this.viewer.refresh(3,
"measurementPending"));else if(this.setMouseMode(),this.isBound(this.clickAction,43)&&this.viewer.stopMotion(),this.viewer.getBoolean(603979887)&&23==this.atomPickingMode&&this.isBound(this.clickAction,21))this.viewer.navTranslatePercent(100*a/this.viewer.getScreenWidth()-50,100*c/this.viewer.getScreenHeight()-50);else{if(f){if(this.isBound(this.clickAction,34==this.bondPickingMode||33==this.bondPickingMode?0:5)){this.bondPicked(h.get("index").intValue());return}}else{if(g)return;if(32!=this.atomPickingMode&&
null!=this.measurementPending&&this.isBound(this.clickAction,20)){this.atomOrPointPicked(l,b);4==this.addToMeasurement(l,b,!1)&&this.toggleMeasurement();return}if(this.isBound(this.clickAction,37)){null!=this.measurementPending?(this.addToMeasurement(l,b,!0),this.toggleMeasurement()):!this.drawMode&&(!this.labelMode&&!this.dragSelectedMode&&this.measuresEnabled)&&(this.enterMeasurementMode(l),this.addToMeasurement(l,b,!0));this.atomOrPointPicked(l,b);return}}this.isSelectAction(this.clickAction)?
g||this.atomOrPointPicked(l,b):this.isBound(this.clickAction,24)&&0>l&&this.reset()}}}}},"~N,~N,~N,~N");b(c$,"checkUserAction",function(a,c,b,e,f,g,h){if(!this.binding.isUserAction(a))return!1;for(var l=!1,j,k=this.binding.getBindings(),m=a+"\t",p,r=k.keySet().iterator();r.hasNext()&&((p=r.next())||1);)if(0==p.indexOf(m)&&JU.PT.isAS(j=k.get(p))){var q=j[1],s=null;if(0<=q.indexOf("_ATOM")){var t=this.findNearestAtom(c,b,null,!0),q=JU.PT.simpleReplace(q,"_ATOM","({"+(0<=t?""+t:"")+"})");0<=t&&(q=JU.PT.simpleReplace(q,
"_POINT",J.util.Escape.eP(this.viewer.getModelSet().atoms[t])))}if(!this.drawMode&&(0<=q.indexOf("_POINT")||0<=q.indexOf("_OBJECT")||0<=q.indexOf("_BOND"))){t=this.viewer.checkObjectClicked(c,b,a);if(null!=t&&null!=(s=t.get("pt")))t.get("type").equals("bond")&&(q=JU.PT.simpleReplace(q,"_BOND","[{"+t.get("index")+"}]")),q=JU.PT.simpleReplace(q,"_POINT",J.util.Escape.eP(s)),q=JU.PT.simpleReplace(q,"_OBJECT",J.util.Escape.escapeMap(t));q=JU.PT.simpleReplace(q,"_BOND","[{}]");q=JU.PT.simpleReplace(q,
"_OBJECT","{}")}q=JU.PT.simpleReplace(q,"_POINT","{}");q=JU.PT.simpleReplace(q,"_ACTION",""+a);q=JU.PT.simpleReplace(q,"_X",""+c);q=JU.PT.simpleReplace(q,"_Y",""+(this.viewer.getScreenHeight()-b));q=JU.PT.simpleReplace(q,"_DELTAX",""+e);q=JU.PT.simpleReplace(q,"_DELTAY",""+f);q=JU.PT.simpleReplace(q,"_TIME",""+g);q=JU.PT.simpleReplace(q,"_MODE",""+h);q.startsWith("+:")&&(l=!0,q=q.substring(2));this.viewer.evalStringQuiet(q)}return!l},"~N,~N,~N,~N,~N,~N,~N");b(c$,"checkMotionRotateZoom",function(a,
c,b,e,f){c=this.checkSlideZoom(a);var g=this.isBound(a,25),h=this.isBound(a,29);if(!c&&!g&&!h)return!1;a=(b=h&&(0==b||Math.abs(e)>5*Math.abs(b)))||this.isZoomArea(this.moved.x)||this.isBound(a,46)?8:g||h?13:this.isBound(a,1)?12:0;this.setMotion(a,f);return b||c},"~N,~N,~N,~N,~B");b(c$,"getExitRate",function(){return 10<this.dragGesture.getTimeDifference(2)?0:this.dragGesture.getSpeedPixelsPerMillisecond(4,2)});b(c$,"isRubberBandSelect",function(a){a=a&-8193|32768;return this.rubberbandSelectionMode&&
(this.isBound(a,35)||this.isBound(a,34)||this.isBound(a,32))},"~N");b(c$,"getRubberBand",function(){return!this.rubberbandSelectionMode||2147483647==this.rectRubber.x?null:this.rectRubber});b(c$,"calcRectRubberBand",function(){var a=this.viewer.isAntialiased()?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)});b(c$,"getDegrees",function(a,c){var b=0==c?this.viewer.getScreenWidth():this.viewer.getScreenHeight();500<b&&(b=500);return 180*(a/b)*this.mouseDragFactor},"~N,~N");b(c$,"checkSlideZoom",function(a){return this.isBound(a,40)&&this.isZoomArea(this.pressed.x)},"~N");b(c$,"isZoomArea",function(a){return a>98*this.viewer.getScreenWidth()*
(this.viewer.isStereoDouble()?2:1)/100},"~N");b(c$,"getPoint",function(a){var c=new J.util.Point3fi;c.setT(a.get("pt"));c.modelIndex=a.get("modelIndex").intValue();return c},"java.util.Map");b(c$,"findNearestAtom",function(a,c,b,e){a=this.drawMode||null!=b?-1:this.viewer.findNearestAtomIndexMovable(a,c,!1);return 0<=a&&(e||null==this.measurementPending)&&!this.viewer.isInSelectionSubset(a)?-1:a},"~N,~N,J.util.Point3fi,~B");b(c$,"isSelectAction",function(a){return this.isBound(a,17)||!this.drawMode&&
!this.labelMode&&1==this.atomPickingMode&&this.isBound(a,1)||this.dragSelectedMode&&(this.isBound(this.dragAction,27)||this.isBound(this.dragAction,13))||this.isBound(a,22)||this.isBound(a,35)||this.isBound(a,32)||this.isBound(a,34)||this.isBound(a,36)||this.isBound(a,30)},"~N");b(c$,"enterMeasurementMode",function(a){this.viewer.setPicked(-1);this.viewer.setPicked(a);this.viewer.setCursor(1);this.viewer.setPendingMeasurement(this.measurementPending=this.viewer.getMP());this.measurementQueued=this.measurementPending},
"~N");b(c$,"addToMeasurement",function(a,c,b){if(-1==a&&null==c||null==this.measurementPending)return this.exitMeasurementMode(null),0;var e=this.measurementPending.count;-2147483648!=this.measurementPending.traceX&&2==e&&this.measurementPending.setCount(e=1);return 4==e&&!b?e:this.measurementPending.addPoint(a,c,!0)},"~N,J.util.Point3fi,~B");b(c$,"resetMeasurement",function(){this.exitMeasurementMode(null);this.measurementQueued=this.viewer.getMP()});b(c$,"exitMeasurementMode",function(a){null!=
this.measurementPending&&(this.viewer.setPendingMeasurement(this.measurementPending=null),this.viewer.setCursor(0),null!=a&&this.viewer.refresh(3,a))},"~S");b(c$,"getSequence",function(){var a=this.measurementQueued.getAtomIndex(1),c=this.measurementQueued.getAtomIndex(2);0>a||0>c||(a=this.viewer.getSmiles(a,c,null,!0,!1,!1,!1),this.viewer.setStatusMeasuring("measureSequence",-2,a,0))});b(c$,"minimize",function(a){this.viewer.stopMinimization();var c=this.dragAtomIndex;a&&(this.dragAtomIndex=-1);
a=0==this.viewer.getMotionFixedAtoms().cardinality()?this.viewer.getAtomBits(this.viewer.isAtomPDB(c)?1087373318:1095761936,J.util.BSUtil.newAndSetBit(c)):J.util.BSUtil.setAll(this.viewer.getAtomCount());this.viewer.minimize(2147483647,0,a,null,0,!1,!1,!1,!1)},"~B");b(c$,"queueAtom",function(a,c){var b=this.measurementQueued.addPoint(a,c,!0);0<=a&&this.viewer.setStatusAtomPicked(a,"Atom #"+b+":"+this.viewer.getAtomInfo(a));return b},"~N,J.util.Point3fi");b(c$,"setMotion",function(a,c){switch(this.viewer.getCursor()){case 3:break;
default:this.viewer.setCursor(a)}c&&this.viewer.setInMotion(!0)},"~N,~B");b(c$,"zoomByFactor",function(a,c,b){0!=a&&(this.setMotion(8,!0),this.viewer.zoomByFactor(Math.pow(this.mouseWheelFactor,a),c,b),this.viewer.setInMotion(!1))},"~N,~N,~N");b(c$,"runScript",function(a){this.viewer.script(a)},"~S");b(c$,"atomOrPointPicked",function(a,c){if(0>a){this.resetMeasurement();if(this.isBound(this.clickAction,33)){this.runScript("select none");return}if(5!=this.atomPickingMode&&6!=this.atomPickingMode)return}var b=
2;switch(this.atomPickingMode){case 28:case 29:return;case 0:return;case 25:case 24:case 8:var e=8==this.atomPickingMode,b=25==this.atomPickingMode;if(!this.isBound(this.clickAction,e?5:3))return;if(null==this.measurementQueued||0==this.measurementQueued.count||2<this.measurementQueued.count)this.resetMeasurement(),this.enterMeasurementMode(a);this.addToMeasurement(a,c,!0);if(2!=this.queueAtom(a,c))return;e=e||this.measurementQueued.isConnected(this.viewer.getModelSet().atoms,2)?" DELETE":b?"STRUTS":
"";this.runScript("connect "+this.measurementQueued.getMeasurementScript(" ",!0)+e);this.resetMeasurement();return;case 21:b++;case 20:b++;case 18:case 19:case 22:if(!this.isBound(this.clickAction,20))return;if(null==this.measurementQueued||0==this.measurementQueued.count||this.measurementQueued.count>b)this.resetMeasurement(),this.enterMeasurementMode(a);this.addToMeasurement(a,c,!0);this.queueAtom(a,c);e=this.measurementQueued.count;1==e&&(this.viewer.setPicked(-1),this.viewer.setPicked(a));if(e<
b)return;22==this.atomPickingMode?this.getSequence():(this.viewer.setStatusMeasuring("measurePicked",b,this.measurementQueued.getStringDetail(),this.measurementQueued.value),(18==this.atomPickingMode||4==this.pickingStyleMeasure)&&this.runScript("measure "+this.measurementQueued.getMeasurementScript(" ",!0)));this.resetMeasurement();return}e=null!=this.measurementPending&&1!=this.atomPickingMode?1:this.atomPickingMode;switch(e){case 3:if(!this.isBound(this.clickAction,17))return;null==c?this.zoomTo(a):
this.runScript("zoomTo "+J.util.Escape.eP(c));return;case 5:case 6:this.isBound(this.clickAction,17)&&this.checkTwoAtomAction(c,a)}if(null==c){switch(e){case 1:!this.drawMode&&!this.labelMode&&this.isBound(this.clickAction,1)?this.zoomTo(a):this.isBound(this.clickAction,17)&&this.viewer.setStatusAtomPicked(a,null);return;case 2:this.isBound(this.clickAction,19)&&(this.runScript("set labeltoggle {atomindex="+a+"}"),this.viewer.setStatusAtomPicked(a,null));return;case 31:if(this.isBound(this.clickAction,
0)){var b=this.viewer.getAtomBitSet("connected(atomIndex="+a+") and !within(SMARTS,'[r50,R]')"),f=b.cardinality();switch(f){case 0:case 1:return;case 3:case 4:for(var g=D(f,0),h=D(f,0),l=0,e=b.nextSetBit(0);0<=e;e=b.nextSetBit(e+1),l++)g[l]=this.viewer.getBranchBitSet(e,a,!0).cardinality(),h[l]=e;for(l=0;l<f-2;l++){for(var j=-2147483648,k=0,e=0;e<f;e++)g[e]>=j&&b.get(h[e])&&(k=h[e],j=g[e]);b.clear(k)}}this.viewer.undoMoveActionClear(a,2,!0);this.viewer.invertSelected(null,null,a,b);this.viewer.setStatusAtomPicked(a,
"inverted: "+J.util.Escape.eBS(b))}return;case 7:this.isBound(this.clickAction,4)&&(b=J.util.BSUtil.newAndSetBit(a),this.viewer.deleteAtoms(b,!1),this.viewer.setStatusAtomPicked(a,"deleted: "+J.util.Escape.eBS(b)));return}e="atomindex="+a;switch(this.atomPickingMode){default:return;case 9:this.selectAtoms(e);break;case 10:this.selectAtoms("within(group, "+e+")");break;case 11:this.selectAtoms("within(chain, "+e+")");break;case 13:this.selectAtoms("within(polymer, "+e+")");break;case 14:this.selectAtoms("within(structure, "+
e+")");break;case 12:this.selectAtoms("within(molecule, "+e+")");break;case 16:this.selectAtoms("within(model, "+e+")");break;case 17:this.selectAtoms("visible and within(element, "+e+")");break;case 15:this.selectAtoms("visible and within(site, "+e+")")}this.viewer.clearClickCount();this.viewer.setStatusAtomPicked(a,null)}},"~N,J.util.Point3fi");b(c$,"assignNew",function(a,c){if(2==this.measurementPending.count)this.viewer.undoMoveActionClear(-1,4146,!0),this.runScript("assign connect "+this.measurementPending.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 b="assign atom ({"+this.dragAtomIndex+'}) "'+this.pickAtomAssignType+'"';this.isPickAtomAssignCharge?(b+=";{atomindex="+this.dragAtomIndex+"}.label='%C'; ",this.viewer.undoMoveActionClear(this.dragAtomIndex,4,!0)):this.viewer.undoMoveActionClear(-1,4146,!0);this.runScript(b)}else this.isPickAtomAssignCharge||(this.viewer.undoMoveActionClear(-1,
4146,!0),b=this.viewer.getModelSet().atoms[this.dragAtomIndex],1==b.getElementNumber()?this.runScript("assign atom ({"+this.dragAtomIndex+'}) "X"'):(b=JU.P3.new3(a,c,b.sZ),this.viewer.unTransformPoint(b,b),this.runScript("assign atom ({"+this.dragAtomIndex+'}) "'+this.pickAtomAssignType+'" '+J.util.Escape.eP(b))));this.exitMeasurementMode(null)},"~N,~N");b(c$,"bondPicked",function(a){33==this.bondPickingMode&&this.viewer.undoMoveActionClear(-1,4146,!0);switch(this.bondPickingMode){case 33:this.runScript("assign bond [{"+
a+'}] "'+this.pickBondAssignType+'"');break;case 34:this.viewer.setRotateBondIndex(a);break;case 8:this.viewer.deleteBonds(J.util.BSUtil.newAndSetBit(a))}},"~N");b(c$,"checkTwoAtomAction",function(a,c){var b=5==this.atomPickingMode;if(this.viewer.getSpinOn()||this.viewer.getNavOn()||null!=this.viewer.getPendingMeasurement())this.resetMeasurement(),this.viewer.getSpinOn()&&this.runScript("spin off");else{2<=this.measurementQueued.count&&this.resetMeasurement();var e=this.measurementQueued.count;if(1==
e)if(null==a){if(this.measurementQueued.getAtomIndex(1)==c)return}else if(0==this.measurementQueued.getAtom(1).distance(a))return;if(0<=c||null!=a)e=this.queueAtom(c,a);2>e?b?this.viewer.scriptStatus(1==e?J.i18n.GT._("pick one more atom in order to spin the model around an axis"):J.i18n.GT._("pick two atoms in order to spin the model around an axis")):this.viewer.scriptStatus(1==e?J.i18n.GT._("pick one more atom in order to display the symmetry relationship"):J.i18n.GT._("pick two atoms in order to display the symmetry relationship between them")):
(e=this.measurementQueued.getMeasurementScript(" ",!1),b?this.runScript("spin"+e+" "+this.viewer.getInt(553648157)):this.runScript("draw symop"+e+";show symop"+e))}},"J.util.Point3fi,~N");b(c$,"reset",function(){this.runScript("!reset")});b(c$,"selectAtoms",function(a){if(!(null!=this.measurementPending||this.selectionWorking)){this.selectionWorking=!0;var c=this.rubberbandSelectionMode||this.isBound(this.clickAction,35)?"selected and not ("+a+") or (not selected) and ":this.isBound(this.clickAction,
32)?"selected and not ":this.isBound(this.clickAction,34)?"selected or ":0==this.clickAction||this.isBound(this.clickAction,36)?"selected tog ":this.isBound(this.clickAction,30)?"":null;if(null!=c)try{var b=this.viewer.getAtomBitSetEval(null,c+("("+a+")"));this.viewer.select(b,!1,0,!1);this.viewer.refresh(3,"selections set")}catch(e){if(!y(e,Exception))throw e;}this.selectionWorking=!1}},"~S");b(c$,"selectRb",function(a){var c=this.viewer.findAtomsInRectangle(this.rectRubber);0<c.length()&&(c=J.util.Escape.eBS(c),
this.isBound(a,34)?this.runScript("selectionHalos on;select selected or "+c):this.isBound(a,32)?this.runScript("selectionHalos on;select selected and not "+c):this.runScript("selectionHalos on;select selected tog "+c));this.viewer.refresh(3,"mouseReleased")},"~N");b(c$,"toggleMeasurement",function(){if(null!=this.measurementPending){var a=this.measurementPending.count;2<=a&&4>=a&&this.runScript("!measure "+this.measurementPending.getMeasurementScript(" ",!0));this.exitMeasurementMode(null)}});b(c$,
"zoomTo",function(a){this.runScript("zoomTo (atomindex="+a+")");this.viewer.setStatusAtomPicked(a,null)},"~N");e(c$,"keyTyped",function(){return!1},"~N,~N");c$.$ActionManager$MotionPoint$=function(){aa();c$=u(function(){ma(this,arguments);this.time=this.y=this.x=this.index=0;t(this,arguments)},J.viewer.ActionManager,"MotionPoint");b(c$,"set",function(a,c,b,e){this.index=a;this.x=c;this.y=b;this.time=e},"~N,~N,~N,~N");e(c$,"toString",function(){return"[x = "+this.x+" y = "+this.y+" time = "+this.time+
" ]"});c$=$()};c$.$ActionManager$Gesture$=function(){aa();c$=u(function(){ma(this,arguments);this.action=0;this.nodes=null;this.time0=this.ptNext=0;t(this,arguments)},J.viewer.ActionManager,"Gesture");w(c$,function(a){this.nodes=Array(a);for(var c=0;c<a;c++)this.nodes[c]=ka(J.viewer.ActionManager.MotionPoint,this,null)},"~N");b(c$,"setAction",function(a,c){this.action=a;this.ptNext=0;this.time0=c;for(var b=0;b<this.nodes.length;b++)this.nodes[b].index=-1},"~N,~N");b(c$,"add",function(a,c,b,e){this.action=
a;this.getNode(this.ptNext).set(this.ptNext,c,b,e-this.time0);this.ptNext++;return this.ptNext},"~N,~N,~N,~N");b(c$,"getTimeDifference",function(a){a=this.getPointCount2(a,0);if(2>a)return 0;var c=this.getNode(this.ptNext-1);a=this.getNode(this.ptNext-a);return c.time-a.time},"~N");b(c$,"getSpeedPixelsPerMillisecond",function(a,c){a=this.getPointCount2(a,c);if(2>a)return 0;var b=this.getNode(this.ptNext-1-c),e=this.getNode(this.ptNext-a-c),f=360*((b.x-e.x)/this.b$["J.viewer.ActionManager"].viewer.getScreenWidth()),
g=360*((b.y-e.y)/this.b$["J.viewer.ActionManager"].viewer.getScreenHeight());return Math.sqrt(f*f+g*g)/(b.time-e.time)},"~N,~N");b(c$,"getDX",function(a,c){a=this.getPointCount2(a,c);if(2>a)return 0;var b=this.getNode(this.ptNext-1-c),e=this.getNode(this.ptNext-a-c);return b.x-e.x},"~N,~N");b(c$,"getDY",function(a,c){a=this.getPointCount2(a,c);if(2>a)return 0;var b=this.getNode(this.ptNext-1-c),e=this.getNode(this.ptNext-a-c);return b.y-e.y},"~N,~N");b(c$,"getPointCount",function(){return this.ptNext});
b(c$,"getPointCount2",function(a,c){a>this.nodes.length-c&&(a=this.nodes.length-c);for(var b=a+1;0<=--b&&!(0<=this.getNode(this.ptNext-b-c).index););return b},"~N,~N");b(c$,"getNode",function(a){return this.nodes[(a+this.nodes.length+this.nodes.length)%this.nodes.length]},"~N");e(c$,"toString",function(){return 0==this.nodes.length?""+this:J.viewer.binding.Binding.getMouseActionName(this.action,!1)+" nPoints = "+this.ptNext+" "+this.nodes[0]});c$=$()};B(c$,"ACTION_assignNew",0,"ACTION_center",1,"ACTION_clickFrank",
2,"ACTION_connectAtoms",3,"ACTION_deleteAtom",4,"ACTION_deleteBond",5,"ACTION_depth",6,"ACTION_dragAtom",7,"ACTION_dragDrawObject",8,"ACTION_dragDrawPoint",9,"ACTION_dragLabel",10,"ACTION_dragMinimize",11,"ACTION_dragMinimizeMolecule",12,"ACTION_dragSelected",13,"ACTION_dragZ",14,"ACTION_multiTouchSimulation",15,"ACTION_navTranslate",16,"ACTION_pickAtom",17,"ACTION_pickIsosurface",18,"ACTION_pickLabel",19,"ACTION_pickMeasure",20,"ACTION_pickNavigate",21,"ACTION_pickPoint",22,"ACTION_popupMenu",23,
"ACTION_reset",24,"ACTION_rotate",25,"ACTION_rotateBranch",26,"ACTION_rotateSelected",27,"ACTION_rotateZ",28,"ACTION_rotateZorZoom",29,"ACTION_select",30,"ACTION_selectAndDrag",31,"ACTION_selectAndNot",32,"ACTION_selectNone",33,"ACTION_selectOr",34,"ACTION_selectToggle",35,"ACTION_selectToggleExtended",36,"ACTION_setMeasure",37,"ACTION_slab",38,"ACTION_slabAndDepth",39,"ACTION_slideZoom",40,"ACTION_spinDrawObjectCCW",41,"ACTION_spinDrawObjectCW",42,"ACTION_stopMotion",43,"ACTION_swipe",44,"ACTION_translate",
45,"ACTION_wheelZoom",46,"ACTION_count",47);c$.actionInfo=c$.prototype.actionInfo=Array(47);c$.actionNames=c$.prototype.actionNames=Array(47);J.viewer.ActionManager.newAction(0,"_assignNew",J.i18n.GT.o(J.i18n.GT._("assign/new atom or bond (requires {0})"),"set picking assignAtom_??/assignBond_?"));J.viewer.ActionManager.newAction(1,"_center",J.i18n.GT._("center"));J.viewer.ActionManager.newAction(2,"_clickFrank",J.i18n.GT._("pop up recent context menu (click on Jmol frank)"));J.viewer.ActionManager.newAction(4,
"_deleteAtom",J.i18n.GT.o(J.i18n.GT._("delete atom (requires {0})"),"set picking DELETE ATOM"));J.viewer.ActionManager.newAction(5,"_deleteBond",J.i18n.GT.o(J.i18n.GT._("delete bond (requires {0})"),"set picking DELETE BOND"));J.viewer.ActionManager.newAction(6,"_depth",J.i18n.GT.o(J.i18n.GT._("adjust depth (back plane; requires {0})"),"SLAB ON"));J.viewer.ActionManager.newAction(7,"_dragAtom",J.i18n.GT.o(J.i18n.GT._("move atom (requires {0})"),"set picking DRAGATOM"));J.viewer.ActionManager.newAction(8,
"_dragDrawObject",J.i18n.GT.o(J.i18n.GT._("move whole DRAW object (requires {0})"),"set picking DRAW"));J.viewer.ActionManager.newAction(9,"_dragDrawPoint",J.i18n.GT.o(J.i18n.GT._("move specific DRAW point (requires {0})"),"set picking DRAW"));J.viewer.ActionManager.newAction(10,"_dragLabel",J.i18n.GT.o(J.i18n.GT._("move label (requires {0})"),"set picking LABEL"));J.viewer.ActionManager.newAction(11,"_dragMinimize",J.i18n.GT.o(J.i18n.GT._("move atom and minimize molecule (requires {0})"),"set picking DRAGMINIMIZE"));
J.viewer.ActionManager.newAction(12,"_dragMinimizeMolecule",J.i18n.GT.o(J.i18n.GT._("move and minimize molecule (requires {0})"),"set picking DRAGMINIMIZEMOLECULE"));J.viewer.ActionManager.newAction(13,"_dragSelected",J.i18n.GT.o(J.i18n.GT._("move selected atoms (requires {0})"),"set DRAGSELECTED"));J.viewer.ActionManager.newAction(14,"_dragZ",J.i18n.GT.o(J.i18n.GT._("drag atoms in Z direction (requires {0})"),"set DRAGSELECTED"));J.viewer.ActionManager.newAction(15,"_multiTouchSimulation",J.i18n.GT._("simulate multi-touch using the mouse)"));
J.viewer.ActionManager.newAction(16,"_navTranslate",J.i18n.GT.o(J.i18n.GT._("translate navigation point (requires {0} and {1})"),["set NAVIGATIONMODE","set picking NAVIGATE"]));J.viewer.ActionManager.newAction(17,"_pickAtom",J.i18n.GT._("pick an atom"));J.viewer.ActionManager.newAction(3,"_pickConnect",J.i18n.GT.o(J.i18n.GT._("connect atoms (requires {0})"),"set picking CONNECT"));J.viewer.ActionManager.newAction(18,"_pickIsosurface",J.i18n.GT.o(J.i18n.GT._("pick an ISOSURFACE point (requires {0}"),
"set DRAWPICKING"));J.viewer.ActionManager.newAction(19,"_pickLabel",J.i18n.GT.o(J.i18n.GT._("pick a label to toggle it hidden/displayed (requires {0})"),"set picking LABEL"));J.viewer.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"));J.viewer.ActionManager.newAction(21,"_pickNavigate",J.i18n.GT.o(J.i18n.GT._("pick a point or atom to navigate to (requires {0})"),
"set NAVIGATIONMODE"));J.viewer.ActionManager.newAction(22,"_pickPoint",J.i18n.GT.o(J.i18n.GT._("pick a DRAW point (for measurements) (requires {0}"),"set DRAWPICKING"));J.viewer.ActionManager.newAction(23,"_popupMenu",J.i18n.GT._("pop up the full context menu"));J.viewer.ActionManager.newAction(24,"_reset",J.i18n.GT._("reset (when clicked off the model)"));J.viewer.ActionManager.newAction(25,"_rotate",J.i18n.GT._("rotate"));J.viewer.ActionManager.newAction(26,"_rotateBranch",J.i18n.GT.o(J.i18n.GT._("rotate branch around bond (requires {0})"),
"set picking ROTATEBOND"));J.viewer.ActionManager.newAction(27,"_rotateSelected",J.i18n.GT.o(J.i18n.GT._("rotate selected atoms (requires {0})"),"set DRAGSELECTED"));J.viewer.ActionManager.newAction(28,"_rotateZ",J.i18n.GT._("rotate Z"));J.viewer.ActionManager.newAction(29,"_rotateZorZoom",J.i18n.GT._("rotate Z (horizontal motion of mouse) or zoom (vertical motion of mouse)"));J.viewer.ActionManager.newAction(30,"_select",J.i18n.GT.o(J.i18n.GT._("select an atom (requires {0})"),"set pickingStyle EXTENDEDSELECT"));
J.viewer.ActionManager.newAction(31,"_selectAndDrag",J.i18n.GT.o(J.i18n.GT._("select and drag atoms (requires {0})"),"set DRAGSELECTED"));J.viewer.ActionManager.newAction(32,"_selectAndNot",J.i18n.GT.o(J.i18n.GT._("unselect this group of atoms (requires {0})"),"set pickingStyle DRAG/EXTENDEDSELECT"));J.viewer.ActionManager.newAction(33,"_selectNone",J.i18n.GT.o(J.i18n.GT._("select NONE (requires {0})"),"set pickingStyle EXTENDEDSELECT"));J.viewer.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"));J.viewer.ActionManager.newAction(35,"_selectToggle",J.i18n.GT.o(J.i18n.GT._("toggle selection (requires {0})"),"set pickingStyle DRAG/EXTENDEDSELECT/RASMOL"));J.viewer.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"));J.viewer.ActionManager.newAction(37,"_setMeasure",J.i18n.GT._("pick an atom to initiate or conclude a measurement"));
J.viewer.ActionManager.newAction(38,"_slab",J.i18n.GT.o(J.i18n.GT._("adjust slab (front plane; requires {0})"),"SLAB ON"));J.viewer.ActionManager.newAction(39,"_slabAndDepth",J.i18n.GT.o(J.i18n.GT._("move slab/depth window (both planes; requires {0})"),"SLAB ON"));J.viewer.ActionManager.newAction(40,"_slideZoom",J.i18n.GT._("zoom (along right edge of window)"));J.viewer.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"));J.viewer.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"));J.viewer.ActionManager.newAction(43,"_stopMotion",J.i18n.GT.o(J.i18n.GT._("stop motion (requires {0})"),"set waitForMoveTo FALSE"));J.viewer.ActionManager.newAction(44,"_swipe",J.i18n.GT._("spin model (swipe and release button and stop motion simultaneously)"));J.viewer.ActionManager.newAction(45,"_translate",
J.i18n.GT._("translate"));J.viewer.ActionManager.newAction(46,"_wheelZoom",J.i18n.GT._("zoom"));B(c$,"PICKING_OFF",0,"PICKING_IDENTIFY",1,"PICKING_LABEL",2,"PICKING_CENTER",3,"PICKING_DRAW",4,"PICKING_SPIN",5,"PICKING_SYMMETRY",6,"PICKING_DELETE_ATOM",7,"PICKING_DELETE_BOND",8,"PICKING_SELECT_ATOM",9,"PICKING_SELECT_GROUP",10,"PICKING_SELECT_CHAIN",11,"PICKING_SELECT_MOLECULE",12,"PICKING_SELECT_POLYMER",13,"PICKING_SELECT_STRUCTURE",14,"PICKING_SELECT_SITE",15,"PICKING_SELECT_MODEL",16,"PICKING_SELECT_ELEMENT",
17,"PICKING_MEASURE",18,"PICKING_MEASURE_DISTANCE",19,"PICKING_MEASURE_ANGLE",20,"PICKING_MEASURE_TORSION",21,"PICKING_MEASURE_SEQUENCE",22,"PICKING_NAVIGATE",23,"PICKING_CONNECT",24,"PICKING_STRUTS",25,"PICKING_DRAG_SELECTED",26,"PICKING_DRAG_MOLECULE",27,"PICKING_DRAG_ATOM",28,"PICKING_DRAG_MINIMIZE",29,"PICKING_DRAG_MINIMIZE_MOLECULE",30,"PICKING_INVERT_STEREO",31,"PICKING_ASSIGN_ATOM",32,"PICKING_ASSIGN_BOND",33,"PICKING_ROTATE_BOND",34,"PICKING_IDENTIFY_BOND",35,"PICKING_DRAG_LIGAND",36,"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".split(" "),"PICKINGSTYLE_SELECT_JMOL",0,"PICKINGSTYLE_SELECT_CHIME",0,"PICKINGSTYLE_SELECT_RASMOL",1,"PICKINGSTYLE_SELECT_PFAAT",2,"PICKINGSTYLE_SELECT_DRAG",3,"PICKINGSTYLE_MEASURE_ON",
4,"PICKINGSTYLE_MEASURE_OFF",5,"pickingStyleNames","toggle selectOrToggle extendedSelect drag measure measureoff".split(" "),"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)});p("J.viewer");q(["JU.BS","J.constant.EnumAnimationMode"],"J.viewer.AnimationManager",["J.api.Interface","J.util.BSUtil"],function(){c$=u(function(){this.viewer=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.currentAnimationFrame=this.currentModelIndex=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.currentAtomIndex=-1;t(this,arguments)},J.viewer,"AnimationManager");N(c$,function(){this.bsVisibleModels=new JU.BS;this.animationReplayMode=J.constant.EnumAnimationMode.ONCE});w(c$,function(a){this.viewer=a},"J.viewer.Viewer");b(c$,"setAnimationOn",function(a){a!=this.animationOn&&(!a||!this.viewer.haveModelSet()||this.viewer.isHeadless()?this.stopThread(!1):(this.viewer.getSpinOn()||this.viewer.refresh(3,"Anim:setAnimationOn"),this.setAnimationRange(-1,
-1),this.resumeAnimation()))},"~B");b(c$,"stopThread",function(a){var c=!1;null!=this.animationThread&&(this.animationThread.interrupt(),this.animationThread=null,c=!0);this.animationPaused=a;c&&!this.viewer.getSpinOn()&&this.viewer.refresh(3,"Viewer:setAnimationOff");this.animation(!1);this.viewer.setStatusFrameChanged(!1,!0)},"~B");b(c$,"setAnimationNext",function(){return this.setAnimationRelative(this.animationDirection)});b(c$,"getCurrentModelIndex",function(){return this.currentModelIndex});
b(c$,"currentIsLast",function(){return this.isMovie?this.lastFramePainted==this.currentAnimationFrame:this.lastModelPainted==this.currentModelIndex});b(c$,"currentFrameIs",function(a){var c=this.getCurrentModelIndex();return 0==this.morphCount?c==a:0.001>Math.abs(this.currentMorphModel-a)},"~N");b(c$,"clear",function(){this.setMovie(null);this.initializePointers(0);this.setAnimationOn(!1);this.setModel(0,!0);this.currentDirection=1;this.currentAtomIndex=-1;this.setAnimationDirection(1);this.setAnimationFps(10);
this.setAnimationReplayMode(J.constant.EnumAnimationMode.ONCE,0,0);this.initializePointers(0)});b(c$,"getModelSpecial",function(a){switch(a){case -1:a=this.firstFrameIndex;break;case 0:if(0<this.morphCount)return"-"+(1+this.currentMorphModel);a=this.getCurrentModelIndex();break;case 1:a=this.lastFrameIndex}return this.viewer.getModelNumberDotted(a)},"~N");b(c$,"setDisplay",function(a){this.bsDisplay=null==a||0==a.cardinality()?null:J.util.BSUtil.copy(a)},"JU.BS");b(c$,"setMorphCount",function(a){this.morphCount=
this.isMovie?0:a},"~N");b(c$,"morph",function(a){var c=z(a);0.001>Math.abs(c-a)?a=c:0.999<Math.abs(c-a)&&(a=c+=1);a-=c;c-=1;if(0==a)this.currentMorphModel=c,this.setModel(c,!0);else{var b;this.setModel(c,!0);b=c+1;this.currentMorphModel=c+a;b==c||(0>b||0>c)||this.viewer.modelSet.morphTrajectories(c,b,a)}},"~N");b(c$,"setModel",function(a,c){0>a&&this.stopThread(!1);var b=this.currentModelIndex,e=this.viewer.getModelSet(),f=null==e?0:e.modelCount;if(1==f)this.currentModelIndex=a=0;else if(0>a||a>=
f)a=-1;var e=null,g=!1;if(this.currentModelIndex!=a){if(0<f){var f=this.viewer.isJmolDataFrameForModel(a),h=this.viewer.isJmolDataFrameForModel(this.currentModelIndex);h&&this.viewer.setJmolDataFrame(null,-1,this.currentModelIndex);-1!=this.currentModelIndex&&this.viewer.saveModelOrientation();if(h||f)e=this.viewer.getJmolFrameType(a)+" "+a+" <--  "+this.currentModelIndex+" "+this.viewer.getJmolFrameType(this.currentModelIndex),g=this.viewer.getJmolDataSourceFrame(a)==this.viewer.getJmolDataSourceFrame(this.currentModelIndex)}this.currentModelIndex=
a;null!=e&&(0<=a&&this.viewer.restoreModelOrientation(a),g&&(0<=e.indexOf("quaternion")||0>e.indexOf("plot")&&0>e.indexOf("ramachandran")&&0>e.indexOf(" property "))&&this.viewer.restoreModelRotation(b))}this.setViewer(c)},"~N,~B");b(c$,"setBackgroundModelIndex",function(a){var c=this.viewer.getModelSet();if(null==c||0>a||a>=c.modelCount)a=-1;this.backgroundModelIndex=a;0<=a&&this.viewer.setTrajectory(a);this.viewer.setTainted(!0);this.setFrameRangeVisible()},"~N");b(c$,"initializePointers",function(a){this.firstFrameIndex=
0;this.lastFrameIndex=(0==a?0:this.getFrameCount())-1;this.frameStep=a;this.viewer.setFrameVariables()},"~N");b(c$,"setAnimationDirection",function(a){this.animationDirection=a},"~N");b(c$,"setAnimationFps",function(a){this.animationFps=a;this.viewer.setFrameVariables()},"~N");b(c$,"setAnimationReplayMode",function(a,c,b){this.firstFrameDelay=0<c?c:0;this.firstFrameDelayMs=z(1E3*this.firstFrameDelay);this.lastFrameDelay=0<b?b:0;this.lastFrameDelayMs=z(1E3*this.lastFrameDelay);this.animationReplayMode=
a;this.viewer.setFrameVariables()},"J.constant.EnumAnimationMode,~N,~N");b(c$,"setAnimationRange",function(a,c){var b=this.getFrameCount();0>a&&(a=0);0>c&&(c=b);a>=b&&(a=b-1);c>=b&&(c=b-1);this.currentMorphModel=this.firstFrameIndex=a;this.lastFrameIndex=c;this.frameStep=c<a?-1:1;this.rewindAnimation()},"~N,~N");b(c$,"pauseAnimation",function(){this.stopThread(!0)});b(c$,"reverseAnimation",function(){this.currentDirection=-this.currentDirection;this.animationOn||this.resumeAnimation()});b(c$,"repaintDone",
function(){this.lastModelPainted=this.currentModelIndex;this.lastFramePainted=this.currentAnimationFrame});b(c$,"resumeAnimation",function(){0>this.currentModelIndex&&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.getOptionInterface("thread.AnimationThread"),this.animationThread.setManager(this,this.viewer,[this.firstFrameIndex,
this.lastFrameIndex,this.intAnimThread]),this.animationThread.start()))});b(c$,"setAnimationLast",function(){this.setFrame(0<this.animationDirection?this.lastFrameIndex:this.firstFrameIndex)});b(c$,"rewindAnimation",function(){this.setFrame(0<this.animationDirection?this.firstFrameIndex:this.lastFrameIndex);this.currentDirection=1;this.viewer.setFrameVariables()});b(c$,"setAnimationPrevious",function(){return this.setAnimationRelative(-this.animationDirection)});b(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 c=Math.min(this.firstFrameIndex,this.lastFrameIndex),a=Math.max(this.firstFrameIndex,this.lastFrameIndex),b=1*(a-c)/this.animationFps+this.firstFrameDelay+this.lastFrameDelay;c<=a;c++)b+=this.viewer.getFrameDelayMs(this.modelIndexForFrame(c))/1E3;return b});b(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.currentAnimationFrame=a.get("currentFrame").intValue(),0>this.currentAnimationFrame||this.currentAnimationFrame>=this.animationFrames.length)this.currentAnimationFrame=0;this.setFrame(this.currentAnimationFrame)}this.isMovie||(this.animationFrames=null);this.viewer.setBooleanProperty("_ismovie",this.isMovie);this.bsDisplay=null;this.currentMorphModel=this.morphCount=0},"java.util.Map");b(c$,
"getAnimationFrames",function(){return this.animationFrames});b(c$,"getCurrentFrameIndex",function(){return this.currentAnimationFrame});b(c$,"modelIndexForFrame",function(a){return this.isMovie?this.animationFrames[a]-1:a},"~N");b(c$,"getFrameCount",function(){return this.isMovie?this.animationFrames.length:this.viewer.getModelCount()});b(c$,"setFrame",function(a){try{if(this.isMovie){var c=this.modelIndexForFrame(a);this.currentAnimationFrame=a;a=c}else this.currentAnimationFrame=a;this.setModel(a,
!0)}catch(b){if(!y(b,Exception))throw b;}},"~N");b(c$,"setViewer",function(a){this.viewer.setTrajectory(this.currentModelIndex);this.viewer.setFrameOffset(this.currentModelIndex);-1==this.currentModelIndex&&a&&this.setBackgroundModelIndex(-1);this.viewer.setTainted(!0);this.setFrameRangeVisible();this.viewer.setStatusFrameChanged(!1,!0);null!=this.viewer.modelSet&&!this.viewer.global.selectAllModels&&this.viewer.setSelectionSubset(this.viewer.getModelUndeletedAtomsBitSet(this.currentModelIndex))},
"~B");b(c$,"setFrameRangeVisible",function(){this.bsVisibleModels.clearAll();0<=this.backgroundModelIndex&&this.bsVisibleModels.set(this.backgroundModelIndex);if(0<=this.currentModelIndex)this.bsVisibleModels.set(this.currentModelIndex);else if(0!=this.frameStep){for(var a=0,c=0,b=this.firstFrameIndex;b!=this.lastFrameIndex;b+=this.frameStep){var e=this.modelIndexForFrame(b);this.viewer.isJmolDataFrameForModel(e)||(this.bsVisibleModels.set(e),a++,c=b)}e=this.modelIndexForFrame(this.lastFrameIndex);
if(this.firstFrameIndex==this.lastFrameIndex||!this.viewer.isJmolDataFrameForModel(e)||0==a)this.bsVisibleModels.set(e),0==a&&(this.firstFrameIndex=this.lastFrameIndex),a=0;1==a&&0>this.currentModelIndex&&this.setFrame(c)}});b(c$,"animation",function(a){this.animationOn=a;this.viewer.setBooleanProperty("_animating",a)},"~B");b(c$,"setAnimationRelative",function(a){a=this.getFrameStep(a);var c=(this.isMovie?this.currentAnimationFrame:this.currentModelIndex)+a,b=0,e=0,f;0<this.morphCount?(b=1/(this.morphCount+
1),e=this.currentMorphModel+a*b,f=this.isNotInRange(e)):f=this.isNotInRange(c);if(f)switch(this.animationReplayMode){case J.constant.EnumAnimationMode.ONCE:return!1;case J.constant.EnumAnimationMode.LOOP:e=c=this.animationDirection==this.currentDirection?this.firstFrameIndex:this.lastFrameIndex;break;case J.constant.EnumAnimationMode.PALINDROME:this.currentDirection=-this.currentDirection,c-=2*a,e-=2*a*b}if(1>this.morphCount){if(0>c||c>=this.getFrameCount())return!1;this.setFrame(c);return!0}this.morph(e+
1);return!0},"~N");b(c$,"isNotInRange",function(a){var c=a-0.001;return c>this.firstFrameIndex&&c>this.lastFrameIndex||(c=a+0.001)<this.firstFrameIndex&&c<this.lastFrameIndex},"~N");b(c$,"getFrameStep",function(a){return this.frameStep*a*this.currentDirection},"~N");B(c$,"FRAME_FIRST",-1,"FRAME_LAST",1,"MODEL_CURRENT",0)});p("J.viewer.binding");q(["java.util.Hashtable"],"J.viewer.binding.Binding","java.lang.Boolean java.util.Arrays JU.List $.PT $.SB J.api.Interface J.util.Escape $.Logger $.Txt".split(" "),
function(){c$=u(function(){this.bindings=this.name=null;t(this,arguments)},J.viewer.binding,"Binding");N(c$,function(){this.bindings=new java.util.Hashtable});c$.getMouseAction=b(c$,"getMouseAction",function(a,c,b){2<a&&(a=2);switch(a){case 0:break;case 1:a=256;break;default:a=512}switch(b){case 4:b=4096;break;case 1:b=8192;break;case 5:b=16384;break;case 2:b=32768;break;case 3:b=32}return c&63|a|b},"~N,~N,~N");c$.getMouseActionStr=b(c$,"getMouseActionStr",function(a){if(null==a)return 0;var c=0;
a=a.toUpperCase();c=0<=a.indexOf("MIDDLE")?8:0<=a.indexOf("RIGHT")?4:0<=a.indexOf("WHEEL")?32:16;0<=a.indexOf("DOWN")?c|=4096:0<=a.indexOf("DRAG")?c|=8192:0<=a.indexOf("UP")?c|=16384:32!=c&&(c|=32768);32!=c&&0<=a.indexOf("DOUBLE")?c|=512:0<c&&(c|=256);288!=c&&0<=a.indexOf("ALT")&&(c|=8);0<=a.indexOf("CTRL")&&(c|=2);0<=a.indexOf("SHIFT")&&(c|=1);return c},"~S");c$.getButtonMods=b(c$,"getButtonMods",function(a){return a&63},"~N");c$.getClickCount=b(c$,"getClickCount",function(a){return(a&768)>>8},"~N");
c$.getMouseActionName=b(c$,"getMouseActionName",function(a,c){var b=new JU.SB;if(0==a)return"";var e=J.viewer.binding.Binding.includes(a,8)&&!J.viewer.binding.Binding.includes(a,16)&&!J.viewer.binding.Binding.includes(a,4),f="      ".toCharArray();J.viewer.binding.Binding.includes(a,2)&&(b.append("CTRL+"),f[5]="C");!e&&J.viewer.binding.Binding.includes(a,8)&&(b.append("ALT+"),f[4]="A");J.viewer.binding.Binding.includes(a,1)&&(b.append("SHIFT+"),f[3]="S");J.viewer.binding.Binding.includes(a,16)?(f[2]=
"L",b.append("LEFT")):J.viewer.binding.Binding.includes(a,4)?(f[2]="R",b.append("RIGHT")):e?(f[2]="M",b.append("MIDDLE")):J.viewer.binding.Binding.includes(a,32)&&(f[2]="W",b.append("WHEEL"));J.viewer.binding.Binding.includes(a,512)&&(b.append("+double"),f[1]="2");J.viewer.binding.Binding.includes(a,4096)?(b.append("+down"),f[0]="1"):J.viewer.binding.Binding.includes(a,8192)?(b.append("+drag"),f[0]="2"):J.viewer.binding.Binding.includes(a,16384)?(b.append("+up"),f[0]="3"):J.viewer.binding.Binding.includes(a,
32768)&&(b.append("+click"),f[0]="4");return c?String.instantialize(f)+":"+b.toString():b.toString()},"~N,~B");b(c$,"getBindings",function(){return this.bindings});w(c$,function(){});b(c$,"bindAction",function(a,c){this.addBinding(a+"\t"+c,[a,c])},"~N,~N");b(c$,"bindName",function(a,c){this.addBinding(a+"\t",Boolean.TRUE);this.addBinding(a+"\t"+c,[J.viewer.binding.Binding.getMouseActionName(a,!1),c])},"~N,~S");b(c$,"unbindAction",function(a,c){0==a?this.unbindJmolAction(c):this.removeBinding(null,
a+"\t"+c)},"~N,~N");b(c$,"unbindName",function(a,c){null==c?this.unbindMouseAction(a):this.removeBinding(null,a+"\t"+c)},"~N,~S");b(c$,"unbindJmolAction",function(a){var c=this.bindings.keySet().iterator();for(a="\t"+a;c.hasNext();){var b=c.next();b.endsWith(a)&&this.removeBinding(c,b)}},"~N");b(c$,"addBinding",function(a,c){J.util.Logger.debugging&&J.util.Logger.debug("adding binding "+a+"\t==\t"+J.util.Escape.e(c));this.bindings.put(a,c)},"~S,~O");b(c$,"removeBinding",function(a,c){J.util.Logger.debugging&&
J.util.Logger.debug("removing binding "+c);null==a?this.bindings.remove(c):a.remove()},"java.util.Iterator,~S");b(c$,"unbindUserAction",function(a){var c=this.bindings.keySet().iterator();for(a="\t"+a;c.hasNext();){var b=c.next();b.endsWith(a)&&this.removeBinding(c,b)}},"~S");b(c$,"unbindMouseAction",function(a){var c=this.bindings.keySet().iterator();for(a+="\t";c.hasNext();){var b=c.next();b.startsWith(a)&&this.removeBinding(c,b)}},"~N");b(c$,"isBound",function(a,c){return this.bindings.containsKey(a+
"\t"+c)},"~N,~N");b(c$,"isUserAction",function(a){return this.bindings.containsKey(a+"\t")},"~N");b(c$,"getBindingInfo",function(a,c,b){var e=new JU.SB;b=null==b||b.equalsIgnoreCase("all")?null:b.toLowerCase();for(var f=Array(a.length),g=new JU.List,h,l=this.bindings.values().iterator();l.hasNext()&&((h=l.next())||1);)if(JU.PT.isAI(h)){var j=h,k=j[1];null==f[k]&&(f[k]=new JU.List);j=J.viewer.binding.Binding.getMouseActionName(j[0],!0);(null==b||0<=(c[k]+";"+a[k]+";"+j).toLowerCase().indexOf(b))&&
f[k].addLast(j)}else JU.PT.isAS(h)&&(k=h[0],j=h[1],(null==b||0<=b.indexOf("user")||0<=k.indexOf(b)||0<=j.indexOf(b))&&g.addLast(h));for(k=0;k<a.length;k++){var m;null==f[k]||0==(m=f[k].size())||this.addInfo(e,f[k].toArray(Array(m)),c[k],a[k])}for(k=0;k<g.size();k++)j=g.get(k),this.addInfo(e,["USER:::"+j[0]],"user-defined",j[1]);return e.toString()},"~A,~A,~S");b(c$,"addInfo",function(a,c,b,e){java.util.Arrays.sort(c);J.util.Txt.leftJustify(a,"                      ",b);a.append("\t");b="";for(var f=
a.length(),g=0;g<c.length;g++)a.append(b).append(c[g].substring(7)),b=", ";f=a.length()-f;20>f&&a.append("                 ".substring(0,20-f));a.append("\t").append(e).appendC("\n")},"JU.SB,~A,~S,~S");c$.includes=b(c$,"includes",function(a,c){return(a&c)==c},"~N,~N");c$.newBinding=b(c$,"newBinding",function(a){return J.api.Interface.getOptionInterface("viewer.binding."+a+"Binding")},"~S");B(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)});p("J.viewer.binding");q(["J.viewer.binding.JmolBinding"],"J.viewer.binding.DragBinding",null,function(){c$=G(J.viewer.binding,"DragBinding",J.viewer.binding.JmolBinding);w(c$,function(){R(this,J.viewer.binding.DragBinding,[]);this.set("drag")});e(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)})});p("J.viewer.binding");q(["J.viewer.binding.Binding"],"J.viewer.binding.JmolBinding",null,function(){c$=G(J.viewer.binding,"JmolBinding",J.viewer.binding.Binding);w(c$,function(){R(this,J.viewer.binding.JmolBinding,[]);this.set("toggle")});b(c$,"set",function(a){this.name=a;this.setGeneralBindings();this.setSelectBindings()},"~S");b(c$,"setSelectBindings",function(){this.bindAction(33296,30);
this.bindAction(33040,36)});b(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(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)})});p("J.viewer");q(["J.util.ColorEncoder"],"J.viewer.ColorManager","java.lang.Float JU.AU J.constant.EnumPalette J.util.C $.Elements $.Logger J.viewer.JC".split(" "),function(){c$=u(function(){this.colorData=this.altArgbsCpk=this.argbsCpk=this.g3d=this.viewer=this.propertyColorEncoder=null;this.isDefaultColorRasmol=
!1;this.colixRubberband=22;this.colixBackgroundContrast=0;t(this,arguments)},J.viewer,"ColorManager");N(c$,function(){this.propertyColorEncoder=new J.util.ColorEncoder(null)});w(c$,function(a,c){this.viewer=a;this.g3d=c;this.argbsCpk=J.constant.EnumPalette.argbsCpk;this.altArgbsCpk=JU.AU.arrayCopyRangeI(J.viewer.JC.altArgbsCpk,0,-1)},"J.viewer.Viewer,J.util.GData");b(c$,"clear",function(){});b(c$,"getDefaultColorRasmol",function(){return this.isDefaultColorRasmol});b(c$,"resetElementColors",function(){this.setDefaultColors(!1)});
b(c$,"setDefaultColors",function(a){a?(this.isDefaultColorRasmol=!0,this.argbsCpk=JU.AU.arrayCopyI(J.util.ColorEncoder.getRasmolScale(),-1)):(this.isDefaultColorRasmol=!1,this.argbsCpk=J.constant.EnumPalette.argbsCpk);this.altArgbsCpk=JU.AU.arrayCopyRangeI(J.viewer.JC.altArgbsCpk,0,-1);this.propertyColorEncoder.createColorScheme(a?"Rasmol=":"Jmol=",!0,!0);for(a=J.constant.EnumPalette.argbsCpk.length;0<=--a;)this.g3d.changeColixArgb(a,this.argbsCpk[a]);for(a=J.viewer.JC.altArgbsCpk.length;0<=--a;)this.g3d.changeColixArgb(J.util.Elements.elementNumberMax+
a,this.altArgbsCpk[a])},"~B");b(c$,"setRubberbandArgb",function(a){this.colixRubberband=0==a?0:J.util.C.getColix(a)},"~N");b(c$,"setColixBackgroundContrast",function(a){this.colixBackgroundContrast=J.util.C.getBgContrast(a)},"~N");b(c$,"getColixBondPalette",function(a,c){switch(c){case 19:return this.propertyColorEncoder.getColorIndexFromPalette(a.getEnergy(),-2.5,-0.5,7,!1)}return 10},"J.modelset.Bond,~N");b(c$,"getColixAtomPalette",function(a,c){var b=0,e;switch(c){case 84:return null==this.colorData||
a.index>=this.colorData.length?12:this.getColixForPropertyValue(this.colorData[a.index]);case 0:case 1:b=a.getAtomicAndIsotopeNumber();if(b<J.util.Elements.elementNumberMax)return this.g3d.getChangeableColix(b,this.argbsCpk[b]);e=b;b=J.util.Elements.altElementIndexFromNumber(b);return 0==b?(b=J.util.Elements.getElementNumber(e),this.g3d.getChangeableColix(b,this.argbsCpk[b])):this.g3d.getChangeableColix(J.util.Elements.elementNumberMax+b,this.altArgbsCpk[b]);case 2:return b=J.util.ColorEncoder.quantize(a.getPartialCharge(),
-1,1,J.viewer.JC.PARTIAL_CHARGE_RANGE_SIZE),this.g3d.getChangeableColix(J.viewer.JC.PARTIAL_CHARGE_COLIX_RED+b,J.viewer.JC.argbsRwbScale[b]);case 3:return b=a.getFormalCharge()- -4,this.g3d.getChangeableColix(J.viewer.JC.FORMAL_CHARGE_COLIX_RED+b,J.viewer.JC.argbsFormalCharge[b]);case 68:case 5:return 68==c?(b=this.viewer.getModelSet(),e=b.getBfactor100Lo(),b=b.getBfactor100Hi()):(e=0,b=1E4),this.propertyColorEncoder.getColorIndexFromPalette(a.getBfactor100(),e,b,7,!1);case 86:return this.propertyColorEncoder.getColorIndexFromPalette(a.getGroupParameter(1112539150),
-1,1,7,!1);case 70:return b=this.viewer.getSurfaceDistanceMax(),this.propertyColorEncoder.getColorIndexFromPalette(a.getSurfaceDistance100(),0,b,7,!1);case 8:return this.propertyColorEncoder.getColorIndexFromPalette(a.getGroupID(),0,0,5,!1);case 9:return this.propertyColorEncoder.getColorIndexFromPalette(a.getGroupID(),0,0,4,!1);case 75:return this.propertyColorEncoder.getColorIndexFromPalette(a.getSelectedGroupIndexWithinChain(),0,a.getSelectedGroupCountWithinChain()-1,1,!1);case 87:return b=this.viewer.getModelSet().models[a.modelIndex],
this.propertyColorEncoder.getColorIndexFromPalette(a.getPolymerIndexInModel(),0,b.getBioPolymerCount()-1,1,!1);case 76:return this.propertyColorEncoder.getColorIndexFromPalette(a.getSelectedMonomerIndexWithinPolymer(),0,a.getSelectedMonomerCountWithinPolymer()-1,1,!1);case 77:return b=this.viewer.getModelSet(),this.propertyColorEncoder.getColorIndexFromPalette(b.getMoleculeIndex(a.getIndex(),!0),0,b.getMoleculeCountInModel(a.getModelIndex())-1,0,!1);case 14:return b=this.viewer.getModelSet(),e=a.getModelIndex(),
this.propertyColorEncoder.getColorIndexFromPalette(b.getAltLocIndexInModel(e,a.getAlternateLocationID()),0,b.getAltLocCountInModel(e),0,!1);case 15:return b=this.viewer.getModelSet(),e=a.getModelIndex(),this.propertyColorEncoder.getColorIndexFromPalette(b.getInsertionCodeIndexInModel(e,a.getInsertionCode()),0,b.getInsertionCountInModel(e),0,!1);case 16:b=a.getAtomicAndIsotopeNumber();b=this.getJmolOrRasmolArgb(b,1073741992);break;case 17:b=a.getAtomicAndIsotopeNumber();b=this.getJmolOrRasmolArgb(b,
1073742116);break;case 7:b=a.getProteinStructureSubType().getColor();break;case 10:b=a.getChainID(),b=((0>b?0:256<=b?b-256:b)&31)%J.viewer.JC.argbsChainAtom.length,b=(a.isHetero()?J.viewer.JC.argbsChainHetero:J.viewer.JC.argbsChainAtom)[b]}return 0==b?22:J.util.C.getColix(b)},"J.modelset.Atom,~N");b(c$,"getJmolOrRasmolArgb",function(a,c){switch(c){case 1073741992:if(a>=J.util.Elements.elementNumberMax)break;return this.propertyColorEncoder.getArgbFromPalette(a,0,0,2);case 1073742116:if(a>=J.util.Elements.elementNumberMax)break;
return this.propertyColorEncoder.getArgbFromPalette(a,0,0,3);default:return c}return J.viewer.JC.altArgbsCpk[J.util.Elements.altElementIndexFromNumber(a)]},"~N,~N");b(c$,"setElementArgb",function(a,c){1073741992==c&&this.argbsCpk===J.constant.EnumPalette.argbsCpk||(c=this.getJmolOrRasmolArgb(a,c),this.argbsCpk===J.constant.EnumPalette.argbsCpk&&(this.argbsCpk=JU.AU.arrayCopyRangeI(J.constant.EnumPalette.argbsCpk,0,-1),this.altArgbsCpk=JU.AU.arrayCopyRangeI(J.viewer.JC.altArgbsCpk,0,-1)),a<J.util.Elements.elementNumberMax?
(this.argbsCpk[a]=c,this.g3d.changeColixArgb(a,c)):(a=J.util.Elements.altElementIndexFromNumber(a),this.altArgbsCpk[a]=c,this.g3d.changeColixArgb(J.util.Elements.elementNumberMax+a,c)))},"~N,~N");b(c$,"getPropertyColorRange",function(){return this.propertyColorEncoder.isReversed?[this.propertyColorEncoder.hi,this.propertyColorEncoder.lo]:[this.propertyColorEncoder.lo,this.propertyColorEncoder.hi]});b(c$,"setPropertyColorRangeData",function(a,c,b){this.colorData=a;this.propertyColorEncoder.currentPalette=
this.propertyColorEncoder.createColorScheme(b,!0,!1);this.propertyColorEncoder.hi=-3.4028235E38;this.propertyColorEncoder.lo=3.4028235E38;if(null!=a){b=null==c;for(var e,f=b?a.length-1:c.nextSetBit(0);0<=f;f=b?f-1:c.nextSetBit(f+1))if(!Float.isNaN(e=a[f]))this.propertyColorEncoder.hi=Math.max(this.propertyColorEncoder.hi,e),this.propertyColorEncoder.lo=Math.min(this.propertyColorEncoder.lo,e);this.setPropertyColorRange(this.propertyColorEncoder.lo,this.propertyColorEncoder.hi)}},"~A,JU.BS,~S");b(c$,
"setPropertyColorRange",function(a,c){this.propertyColorEncoder.setRange(a,c,a>c);J.util.Logger.debugging&&J.util.Logger.debug('ColorManager: color "'+this.propertyColorEncoder.getCurrentColorSchemeName()+'" range '+a+" "+c)},"~N,~N");b(c$,"setPropertyColorScheme",function(a,c,b){var e=0==a.length;e&&(a="=");var f=this.getPropertyColorRange();this.propertyColorEncoder.currentPalette=this.propertyColorEncoder.createColorScheme(a,!0,b);e||this.setPropertyColorRange(f[0],f[1]);this.propertyColorEncoder.isTranslucent=
c},"~S,~B,~B");b(c$,"setUserScale",function(a){this.propertyColorEncoder.setUserScale(a)},"~A");b(c$,"getColorSchemeList",function(a){a=null==a||0==a.length?this.propertyColorEncoder.currentPalette:this.propertyColorEncoder.createColorScheme(a,!0,!1);return J.util.ColorEncoder.getColorSchemeList(this.propertyColorEncoder.getColorSchemeArray(a))},"~S");b(c$,"getColixForPropertyValue",function(a){return this.propertyColorEncoder.getColorIndex(a)},"~N");b(c$,"getColorEncoder",function(a){if(null==a||
0==a.length)return this.propertyColorEncoder;var c=new J.util.ColorEncoder(this.propertyColorEncoder);c.currentPalette=c.createColorScheme(a,!1,!0);return 2147483647==c.currentPalette?null:c},"~S")});p("J.viewer");q(["javajs.api.BytePoster","java.util.Hashtable"],"J.viewer.FileManager","java.io.BufferedInputStream $.BufferedReader java.lang.Boolean java.net.URL $.URLEncoder JU.AU $.Base64 $.List $.PT $.SB J.api.Interface J.io.FileReader $.JmolBinary J.util.Logger $.Txt J.viewer.Viewer".split(" "),
function(){c$=u(function(){this.viewer=null;this.pathForAllFiles="";this.nameAsGiven="zapped";this.lastFullPathName=this.fullPathName=null;this.lastNameAsGiven="zapped";this.cache=this.spardirCache=this.pngjCache=this.appletProxy=this.appletDocumentBaseURL=this.fileName=null;t(this,arguments)},J.viewer,"FileManager",null,javajs.api.BytePoster);N(c$,function(){this.cache=new java.util.Hashtable});w(c$,function(a){this.viewer=a;this.clear()},"J.viewer.Viewer");b(c$,"clear",function(){this.setFileInfo([this.viewer.getZapName()]);
this.spardirCache=null});b(c$,"setLoadState",function(a){this.viewer.getPreserveState()&&a.put("loadState",this.viewer.getLoadState(a))},"java.util.Map");b(c$,"getPathForAllFiles",function(){return this.pathForAllFiles});b(c$,"setPathForAllFiles",function(a){0<a.length&&(!a.endsWith("/")&&!a.endsWith("|"))&&(a+="/");return this.pathForAllFiles=a},"~S");b(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");b(c$,"getFileInfo",function(){return[this.fullPathName,this.fileName,this.nameAsGiven]});b(c$,"getFullPathName",function(a){var c=null!=this.fullPathName?this.fullPathName:this.nameAsGiven;return!a||!c.equals("zapped")?c:null!=this.lastFullPathName?this.lastFullPathName:this.lastNameAsGiven},"~B");b(c$,"getFileName",function(){return null!=this.fileName?this.fileName:this.nameAsGiven});b(c$,"getAppletDocumentBase",
function(){return null==this.appletDocumentBaseURL?"":this.appletDocumentBaseURL.toString()});b(c$,"setAppletContext",function(a){try{System.out.println('setting document base to "'+a+'"'),this.appletDocumentBaseURL=0==a.length?null:new java.net.URL(fa("java.net.URL"),a,null)}catch(c){if(y(c,java.net.MalformedURLException))System.out.println("error setting document base to "+a);else throw c;}},"~S");b(c$,"setAppletProxy",function(a){this.appletProxy=null==a||0==a.length?null:a},"~S");b(c$,"createAtomSetCollectionFromFile",
function(a,c,b){null==c.get("atomDataOnly")&&this.setLoadState(c);a=this.viewer.resolveDatabaseFormat(a);var e=a.indexOf("::"),f=0<=e?a.substring(e+2):a,e=0<=e?a.substring(0,e):null;J.util.Logger.info("\nFileManager.getAtomSetCollectionFromFile("+f+")"+(a.equals(f)?"":" //"+a));var g=this.classifyName(f,!0);if(1==g.length)return g[0];a=g[0];g=g[1];c.put("fullPathName",(null==e?"":e+"::")+a.$replace("\\","/"));this.viewer.getBoolean(603979880)&&this.viewer.getBoolean(603979824)&&this.viewer.scriptStatus("Requesting "+
a);c=new J.io.FileReader(this,this.viewer,g,a,f,e,null,c,b);c.run();return c.getAtomSetCollection()},"~S,java.util.Map,~B");b(c$,"createAtomSetCollectionFromFiles",function(a,c,b){this.setLoadState(c);for(var e=Array(a.length),f=Array(a.length),g=Array(a.length),h=0;h<a.length;h++){var l=a[h].indexOf("::"),j=0<=l?a[h].substring(l+2):a[h],l=0<=l?a[h].substring(0,l):null,k=this.classifyName(j,!0);if(1==k.length)return k[0];e[h]=k[0];a[h]=k[0].$replace("\\","/");g[h]=l;f[h]=j}c.put("fullPathNames",e);
c.put("fileTypes",g);a=this.newFilesReader(e,f,g,null,c,b);a.run();return a.getAtomSetCollection()},"~A,java.util.Map,~B");b(c$,"createAtomSetCollectionFromString",function(a,c,b){this.setLoadState(c);var e=0<=a.indexOf("Viewer.AddHydrogens")?this.getFileInfo():null;c=new J.io.FileReader(this,this.viewer,"string","string","string",null,J.io.JmolBinary.getBR(a),c,b);c.run();null!=e&&this.setFileInfo(e);!b&&!s(c.getAtomSetCollection(),String)&&(this.viewer.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 c.getAtomSetCollection()},"~S,java.util.Map,~B");b(c$,"createAtomSeCollectionFromStrings",function(a,c,b,e){if(!b.containsKey("isData")){var f='"'+this.viewer.getDataSeparator()+'"',g='"'+(e?"append":"model")+' inline"',h=new JU.SB;h.append('set dataSeparator "~~~next file~~~";\ndata ').append(g);for(var l=0;l<a.length;l++)0<l&&h.append("~~~next file~~~"),h.append(a[l]);h.append("end ").append(g).append(";set dataSeparator ").append(f);c.appendSB(h)}this.setLoadState(b);
J.util.Logger.info("FileManager.getAtomSetCollectionFromStrings(string[])");c=Array(a.length);f=Array(a.length);for(l=0;l<a.length;l++)c[l]="string["+l+"]",f[l]=this.newDataReader(a[l]);a=this.newFilesReader(c,c,null,f,b,e);a.run();return a.getAtomSetCollection()},"~A,JU.SB,java.util.Map,~B");b(c$,"createAtomSeCollectionFromArrayData",function(a,c,b){J.util.Logger.info("FileManager.getAtomSetCollectionFromArrayData(Vector)");for(var e=a.size(),f=Array(e),g=Array(e),h=0;h<e;h++)f[h]="String["+h+"]",
g[h]=this.newDataReader(a.get(h));a=this.newFilesReader(f,f,null,g,c,b);a.run();return a.getAtomSetCollection()},"JU.List,java.util.Map,~B");b(c$,"newFilesReader",function(a,c,b,e,f,g){var h=J.api.Interface.getOptionInterface("io2.FilesReader");h.set(this,this.viewer,a,c,b,e,f,g);return h},"~A,~A,~A,~A,java.util.Map,~B");b(c$,"newDataReader",function(a){var c=s(a,String)?"String":JU.PT.isAS(a)?"Array":s(a,JU.List)?"List":null;return null==c?null:J.api.Interface.getOptionInterface("io2."+c+"DataReader").setData(a)},
"~O");b(c$,"createAtomSetCollectionFromDOM",function(a,c){var b=J.api.Interface.getOptionInterface("io2.DOMReadaer");b.set(this,this.viewer,a,c);b.run();return b.getAtomSetCollection()},"~O,java.util.Map");b(c$,"createAtomSetCollectionFromReader",function(a,c,b,e){a=new J.io.FileReader(this,this.viewer,c,a,c,null,b,e,!1);a.run();return a.getAtomSetCollection()},"~S,~S,~O,java.util.Map");b(c$,"getBufferedInputStream",function(a){a=this.getBufferedReaderOrErrorMessageFromName(a,Array(2),!0,!0);return s(a,
java.io.BufferedInputStream)?a:null},"~S");b(c$,"getBufferedInputStreamOrErrorMessageFromName",function(a,c,b,e,f,g){var h=null;null==f&&(h=null==c||null==this.pngjCache?null:J.io.JmolBinary.getCachedPngjBytes(this,c),null==h&&(h=this.cacheGet(a,!0)));var l=c=null;try{if(null==h){var j=0<=a.indexOf("?POST?_PNGJBIN_"),k=j||0<=a.indexOf("?POST?_PNGJ_");if(0<a.indexOf("?POST?_PNG_")||k){var m=Array(1),p=this.viewer.getImageAsBytes(k?"PNGJ":"PNG",0,0,-1,m);if(null!=m[0])return m[0];j?(f=p,a=JU.PT.simpleReplace(a,
"?_","=_")):a=(new JU.SB).append(a).append("=").appendSB(JU.Base64.getBase64(p)).toString()}var r=J.viewer.FileManager.urlTypeIndex(a),j=0<=r,k=null;if(j&&0<=(r=a.indexOf("?POST?")))k=a.substring(r+6),a=a.substring(0,r);var q=null!=this.appletDocumentBaseURL;0<=a.indexOf(".png")&&(null==this.pngjCache&&this.viewer.cachePngFiles())&&J.io.JmolBinary.cachePngjFile(this,null);if(q||j){q&&(j&&null!=this.appletProxy)&&(a=this.appletProxy+"?url="+this.urlEncode(a));var t=q?new java.net.URL(this.appletDocumentBaseURL,
a,null):new java.net.URL(fa("java.net.URL"),a,null);if(e)return null;a=t.toString();b&&0>a.toLowerCase().indexOf("password")&&J.util.Logger.info("FileManager opening 1 "+a);l=this.viewer.apiPlatform.getBufferedURLInputStream(t,f,k);p=null;if(s(l,JU.SB)){a=l;if(g&&!J.io.JmolBinary.isBase64(a))return J.io.JmolBinary.getBR(a.toString());p=J.io.JmolBinary.getBytesFromSB(a)}else JU.PT.isAB(l)&&(p=l);null!=p&&(l=J.io.JmolBinary.getBIS(p))}else if(null==(h=this.cacheGet(a,!0)))b&&J.util.Logger.info("FileManager opening 2 "+
a),l=this.viewer.apiPlatform.getBufferedFileInputStream(a);if(s(l,String))return l}c=null==h?l:J.io.JmolBinary.getBIS(h);e&&(c.close(),c=null);return c}catch(u){if(y(u,Exception))try{null!=c&&c.close()}catch(w){if(!y(w,java.io.IOException))throw w;}else throw u;}return""+u},"~S,~S,~B,~B,~A,~B");b(c$,"urlEncode",function(a){try{return java.net.URLEncoder.encode(a,"utf-8")}catch(c){if(y(c,java.io.UnsupportedEncodingException))return a;throw c;}},"~S");b(c$,"getEmbeddedFileState",function(a){var c=null,
c=this.getZipDirectory(a,!1);if(0==c.length)return a=this.viewer.getFileAsString4(a,-1,!1,!0,!1),0>a.indexOf("**** Jmol Embedded Script ****")?"":J.io.JmolBinary.getEmbeddedScript(a);for(var b=0;b<c.length;b++)if(0<=c[b].indexOf(".spt"))return a=[a+"|"+c[b],null],this.getFileDataOrErrorAsString(a,-1,!1,!1,!1),a[1];return""},"~S");b(c$,"getFullPathNameOrError",function(a){var c=this.classifyName(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=J.io.JmolBinary.getZipRoot(a);a=this.getBufferedInputStreamOrErrorMessageFromName(a,c,!1,!0,null,!1);return[c,s(a,String)?a:null]},"~S");b(c$,"getBufferedReaderOrErrorMessageFromName",function(a,c,b,e){var f=this.cacheGet(a,!1),g=JU.PT.isAB(f),h=g?f:null;if(a.startsWith("cache://")){if(null==f)return"cannot read "+a;if(g)h=f;else return J.io.JmolBinary.getBR(f)}f=this.classifyName(a,!0);if(null==f)return"cannot read file name: "+a;null!=c&&(c[0]=f[0].$replace("\\","/"));return this.getUnzippedReaderOrStreamFromName(f[0],
h,!1,b,!1,e,null)},"~S,~A,~B,~B");b(c$,"getUnzippedReaderOrStreamFromName",function(a,c,b,e,f,g,h){var l=null;g=null==c&&g?this.getSpartanFileList(a):null;var j=a;if(null!=g){if(f)return g;if(null!=g[2]){b=g[1];e=new java.util.Hashtable;3==g.length&&(l=this.getObjectAsSections(g[2],b,e),e.put("OUTPUT",l),g=J.io.JmolBinary.spartanFileList(a,e.get(l)),3==g.length&&(l=this.getObjectAsSections(g[2],b,e),e.put("OUTPUT",l),g=J.io.JmolBinary.spartanFileList(g[1],e.get(l))));l=new JU.SB;null!=e.get("OUTPUT")&&
l.append(e.get(e.get("OUTPUT")));for(var k=2;k<g.length;k++)a=g[k],a=this.getObjectAsSections(a,b,e),J.util.Logger.info("reading "+a),a=e.get(a),l.append(a);a=l.toString();null==this.spardirCache&&(this.spardirCache=new java.util.Hashtable);this.spardirCache.put(j.$replace("\\","/"),a.getBytes());return J.io.JmolBinary.getBR(a)}}null==c&&null!=this.pngjCache&&(c=J.io.JmolBinary.getCachedPngjBytes(this,a),null!=c&&null!=h&&h.put("sourcePNGJ",Boolean.TRUE));g=a;0<=a.indexOf("|")&&(l=JU.PT.split(a,"|"),
null==c&&J.util.Logger.info("FileManager opening 3 "+a),a=l[0]);a=null==c?this.getBufferedInputStreamOrErrorMessageFromName(a,g,!0,!1,null,!e):J.io.JmolBinary.getBIS(c);try{if(s(a,String)||s(a,java.io.BufferedReader))return a;k=J.io.JmolBinary.getUnzippedInputStream(a);if(J.io.JmolBinary.isCompoundDocumentS(k)){var m=J.api.Interface.getOptionInterface("io2.CompoundDocument");m.setStream(k,!0);return J.io.JmolBinary.getBR(m.getAllDataFiles("Molecule","Input").toString())}if(J.io.JmolBinary.isPickleS(k))return k;
k=J.io.JmolBinary.checkPngZipStream(k);if(J.io.JmolBinary.isZipS(k)){if(b)return J.io.JmolBinary.newZipInputStream(k);var p=J.io.JmolBinary.getZipFileContents(k,l,1,e);return s(p,String)?J.io.JmolBinary.getBR(p):p}return e?k:J.io.JmolBinary.getBufferedReader(k,null)}catch(r){if(y(r,Exception))return r.toString();throw r;}},"~S,~A,~B,~B,~B,~B,java.util.Map");b(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 c=a.lastIndexOf(".spardir");return 0>c?null:a.lastIndexOf("/")>c?["SpartanSmol","Directory Entry ",a+"/input",a+"/archive",a+"/Molecule:asBinaryString",a+"/proparc"]:["SpartanSmol","Directory Entry ",a+"/output"]},"~S");b(c$,"getObjectAsSections",function(a,c,b){if(null==a)return null;var e=null,f=!1,g=a.$replace("\\","/");0<=a.indexOf(":asBinaryString")&&(f=!0,a=a.substring(0,a.indexOf(":asBinaryString")));
var h=null;if(b.containsKey(g))return g;if(0<=a.indexOf("#JMOL_MODEL "))return b.put(g,g+"\n"),g;var l=a;0<=a.indexOf("|")&&(e=JU.PT.split(a,"|"),a=e[0]);var j=null;try{var k=this.getBufferedInputStreamOrErrorMessageFromName(a,l,!1,!1,null,!1);if(s(k,String))return b.put(g,k+"\n"),g;j=k;if(J.io.JmolBinary.isCompoundDocumentS(j)){var m=J.api.Interface.getOptionInterface("io2.CompoundDocument");m.setStream(j,!0);m.getAllDataMapped(a.$replace("\\","/"),"Molecule",b)}else if(J.io.JmolBinary.isZipS(j))J.io.JmolBinary.getAllZipData(j,
e,a.$replace("\\","/"),"Molecule",b);else{if(f){var p=J.api.Interface.getOptionInterface("io2.BinaryDocument");p.setStream(j,!1);h=new JU.SB;null!=c&&h.append("BEGIN Directory Entry "+g+"\n");try{for(;;)h.append(Integer.toHexString(p.readByte()&255)).appendC(" ")}catch(r){if(y(r,Exception))h.appendC("\n");else throw r;}}else{var q=J.io.JmolBinary.getBufferedReader(J.io.JmolBinary.isGzipS(j)?new java.io.BufferedInputStream(J.io.JmolBinary.newGZIPInputStream(j)):j,null),t,h=new JU.SB;for(null!=c&&h.append("BEGIN Directory Entry "+
g+"\n");null!=(t=q.readLine());)h.append(t),h.appendC("\n");q.close()}null!=c&&h.append("\nEND Directory Entry "+g+"\n");b.put(g,h.toString())}}catch(u){if(y(u,Exception))b.put(g,u.toString());else throw u;}if(null!=j)try{j.close()}catch(w){if(!y(w,Exception))throw w;}b.containsKey(g)||b.put(g,"FILE NOT FOUND: "+g+"\n");return g},"~S,~S,java.util.Map");b(c$,"getZipDirectory",function(a,c){var b=this.getBufferedInputStreamOrErrorMessageFromName(a,a,!1,!1,null,!1);return J.io.JmolBinary.getZipDirectoryAndClose(b,
c)},"~S,~B");b(c$,"getFileAsBytes",function(a,c,b){if(null==a)return null;var e=a,f=null;0<=a.indexOf("|")&&(f=JU.PT.split(a,"|"),a=f[0],b=!0);a=this.getBufferedInputStreamOrErrorMessageFromName(a,e,!1,!1,null,!1);if(s(a,String))return"Error:"+a;try{var g=null!=c||!b||null==f||1>=f.length||!J.io.JmolBinary.isZipS(a)&&!J.io.JmolBinary.isPngZipStream(a)?J.io.JmolBinary.getStreamAsBytes(a,c):J.io.JmolBinary.getZipFileContentsAsBytes(a,f,1);a.close();return g}catch(h){if(y(h,Exception))return h.toString();
throw h;}},"~S,JU.OC,~B");b(c$,"getFileDataOrErrorAsString",function(a,c,b,e,f){a[1]="";var g=a[0];if(null==g)return!1;b=this.getBufferedReaderOrErrorMessageFromName(g,a,!1,b);if(s(b,String))return a[1]=b,!1;if(f&&!this.checkSecurity(a[0]))return a[1]="java.io. Security exception: cannot read file "+a[0],!1;try{return J.io.JmolBinary.readAll(b,c,e,a,1)}catch(h){if(y(h,Exception))return!1;throw h;}},"~A,~N,~B,~B,~B");b(c$,"checkSecurity",function(a){if(!a.startsWith("file:"))return!0;var c=a.lastIndexOf("/");
return a.lastIndexOf(":/")==c-1||0<=a.indexOf("/.")||a.lastIndexOf(".")<a.lastIndexOf("/")?!1:!0},"~S");b(c$,"loadImage",function(a,c){for(var b=null,e=null,f="";null!=a;){f=this.classifyName(a,!0);if(null==f){f="cannot read file name: "+a;break}var g=this.viewer.apiPlatform,f=f[0].$replace("\\","/");if(0<f.indexOf("|")){e=this.getFileAsBytes(f,null,!0);if(!JU.PT.isAB(e)){f=""+e;break}b=this.viewer.isJS?e:g.createImage(e)}else if(!this.viewer.isJS)if(0<=J.viewer.FileManager.urlTypeIndex(f))try{b=
g.createImage(new java.net.URL(fa("java.net.URL"),f,null))}catch(h){if(y(h,Exception)){f="bad URL: "+f;break}else throw h;}else b=g.createImage(f);e=[c,f];try{if(!g.waitForDisplay(e,b)){b=null;break}f=null;break}catch(l){if(y(l,Exception)){System.out.println(l.toString());f=l.toString()+" opening 4 "+f;b=null;break}else throw l;}}this.viewer.loadImageData(b,f,c,null)},"~S,~S");c$.urlTypeIndex=b(c$,"urlTypeIndex",function(a){if(null==a)return-2;for(var c=0;c<J.viewer.FileManager.urlPrefixes.length;++c)if(a.startsWith(J.viewer.FileManager.urlPrefixes[c]))return c;
return-1},"~S");c$.isLocal=b(c$,"isLocal",function(a){if(null==a)return!1;a=J.viewer.FileManager.urlTypeIndex(a);return 0>a||3==a},"~S");b(c$,"classifyName",function(a,c){if(null==a)return[null];var b=0<this.pathForAllFiles.length;if(a.startsWith("?")){if(null==(a=this.viewer.dialogAsk("Load",a.substring(1))))return[c?"#CANCELED#":null];b=!1}var e=null,f=null,g=null;if(a.startsWith("cache://"))return g=Array(3),g[0]=g[2]=a,g[1]=J.viewer.FileManager.stripPath(g[0]),g;a=this.viewer.resolveDatabaseFormat(a);
0>a.indexOf(":")&&0!=a.indexOf("/")&&(a=J.viewer.FileManager.addDirectory(this.viewer.getDefaultDirectory(),a));if(null==this.appletDocumentBaseURL)if(0<=J.viewer.FileManager.urlTypeIndex(a)||this.viewer.haveAccess(J.viewer.Viewer.ACCESS.NONE)||this.viewer.haveAccess(J.viewer.Viewer.ACCESS.READSPT)&&!a.endsWith(".spt")&&!a.endsWith("/"))try{f=new java.net.URL(fa("java.net.URL"),a,null)}catch(h){if(y(h,java.net.MalformedURLException))return[c?h.toString():null];throw h;}else var e=this.viewer.apiPlatform.newFile(a),
g=e.getFullPath(),l=e.getName(),g=[null==g?l:g,l,null==g?l:"file:/"+g.$replace("\\","/")];else try{if(1==a.indexOf(":\\")||1==a.indexOf(":/"))a="file:/"+a;f=new java.net.URL(this.appletDocumentBaseURL,a,null)}catch(j){if(y(j,java.net.MalformedURLException))return[c?j.toString():null];throw j;}null!=f&&(g=Array(3),g[0]=g[2]=f.toString(),g[1]=J.viewer.FileManager.stripPath(g[0]));b&&(b=g[0],g[0]=this.pathForAllFiles+g[1],J.util.Logger.info("FileManager substituting "+b+" --\x3e "+g[0]));if(c&&(null!=
e||3==J.viewer.FileManager.urlTypeIndex(g[0])))e=null==e?JU.PT.trim(g[0].substring(5),"/"):g[0],b=e.length-g[1].length-1,0<b&&(e=e.substring(0,b),J.viewer.FileManager.setLocalPath(this.viewer,e,!0));return g},"~S,~B");c$.addDirectory=b(c$,"addDirectory",function(a,c){if(0==a.length)return c;var b=0<c.length?c.charAt(0):" ",e=a.toLowerCase();if((e.endsWith(".zip")||e.endsWith(".tar"))&&"|"!=b&&"/"!=b)a+="|";return a+("/"==b||"/"==b||"|"==(b=a.charAt(a.length-1))||"/"==b?"":"/")+c},"~S,~S");b(c$,"getDefaultDirectory",
function(a){a=this.classifyName(a,!0);if(null==a)return"";a=J.viewer.FileManager.fixPath(a[0]);return null==a?"":a.substring(0,a.lastIndexOf("/"))},"~S");c$.fixPath=b(c$,"fixPath",function(a){a=a.$replace("\\","/");a=JU.PT.simpleReplace(a,"/./","/");var c=a.lastIndexOf("//")+1;1>c&&(c=a.indexOf(":/")+1);1>c&&(c=a.indexOf("/"));if(0>c)return null;var b=a.substring(0,c);for(a=a.substring(c);0<=(c=a.lastIndexOf("/../"));){var e=a.substring(0,c).lastIndexOf("/");if(0>e)return JU.PT.simpleReplace(b+a,
"/../","/");a=a.substring(0,e)+a.substring(c+3)}0==a.length&&(a="/");return b+a},"~S");b(c$,"getFilePath",function(a,c,b){a=this.classifyName(a,!1);return null==a||1==a.length?"":b?a[1]:c?a[2]:null==a[0]?"":a[0].$replace("\\","/")},"~S,~B,~B");c$.getLocalDirectory=b(c$,"getLocalDirectory",function(a,c){var b=a.getParameter(c?"currentLocalPath":"defaultDirectoryLocal");c&&0==b.length&&(b=a.getParameter("defaultDirectoryLocal"));if(0==b.length)return a.isApplet()?null:a.apiPlatform.newFile(System.getProperty("user.dir",
"."));a.isApplet()&&0==b.indexOf("file:/")&&(b=b.substring(6));b=a.apiPlatform.newFile(b);try{return b.isDirectory()?b:b.getParentAsFile()}catch(e){if(y(e,Exception))return null;throw e;}},"J.viewer.Viewer,~B");c$.setLocalPath=b(c$,"setLocalPath",function(a,c,b){for(;c.endsWith("/")||c.endsWith("\\");)c=c.substring(0,c.length-1);a.setStringProperty("currentLocalPath",c);b||a.setStringProperty("defaultDirectoryLocal",c)},"J.viewer.Viewer,~S,~B");c$.getLocalPathForWritingFile=b(c$,"getLocalPathForWritingFile",
function(a,c){if(0==c.indexOf("file:/"))return c.substring(6);if(0==c.indexOf("/")||0<=c.indexOf(":"))return c;var b=null;try{b=J.viewer.FileManager.getLocalDirectory(a,!1)}catch(e){if(!y(e,Exception))throw e;}return null==b?c:J.viewer.FileManager.fixPath(b.toString()+"/"+c)},"J.viewer.Viewer,~S");c$.setScriptFileReferences=b(c$,"setScriptFileReferences",function(a,c,b,e){null!=c&&(a=J.viewer.FileManager.setScriptFileRefs(a,c,!0));null!=b&&(a=J.viewer.FileManager.setScriptFileRefs(a,b,!1));a=JU.PT.simpleReplace(a,
'\u0001"','"');if(null!=e){for(;e.endsWith("/");)e=e.substring(0,e.length-1);for(c=0;c<J.viewer.FileManager.scriptFilePrefixes.length;c++)b=J.viewer.FileManager.scriptFilePrefixes[c],a=JU.PT.simpleReplace(a,b+".",b+e)}return a},"~S,~S,~S,~S");c$.setScriptFileRefs=b(c$,"setScriptFileRefs",function(a,c,b){if(null==c)return a;var e=0==c.length,f=new JU.List;J.io.JmolBinary.getFileReferences(a,f);for(var g=new JU.List,h=new JU.List,l=f.size(),j=0;j<l;j++){var k=f.get(j),m=k;if(b==J.viewer.FileManager.isLocal(m)){var p=
e?-1:m.indexOf("/"+c+"/");0<=p?m=m.substring(p+1):(p=m.lastIndexOf("/"),0>p&&!e&&(m="/"+m),(0>p||e)&&p++,m=c+m.substring(p))}J.util.Logger.info("FileManager substituting "+k+" --\x3e "+m);g.addLast('"'+k+'"');h.addLast('\u0001"'+m+'"')}return J.util.Txt.replaceStrings(a,g,h)},"~S,~S,~B");c$.stripPath=b(c$,"stripPath",function(a){var c=Math.max(a.lastIndexOf("|"),a.lastIndexOf("/"));return a.substring(c+1)},"~S");c$.fixFileNameVariables=b(c$,"fixFileNameVariables",function(a,c){var b=JU.PT.simpleReplace(a,
"%FILE",c);if(0>b.indexOf("%LC"))return b;c=c.toLowerCase();b=JU.PT.simpleReplace(b,"%LCFILE",c);4==c.length&&(b=JU.PT.simpleReplace(b,"%LC13",c.substring(1,3)));return b},"~S,~S");b(c$,"clearPngjCache",function(a){null!=a&&(null==this.pngjCache||!this.pngjCache.containsKey(this.getCanonicalName(J.io.JmolBinary.getZipRoot(a))))||(this.pngjCache=null,J.util.Logger.info("PNGJ cache cleared"))},"~S");b(c$,"cachePut",function(a,c){a=a.$replace("\\","/");J.util.Logger.debugging&&J.util.Logger.debug("cachePut "+
a);null==c||"".equals(c)?this.cache.remove(a):(this.cache.put(a,c),J.io.JmolBinary.getCachedPngjBytes(this,a))},"~S,~O");b(c$,"cacheGet",function(a,c){a=a.$replace("\\","/");var b=a.indexOf("|");0<=b&&(a=a.substring(0,b));J.util.Logger.debugging&&J.util.Logger.debug("cacheGet "+a+" "+this.cache.containsKey(a));b=this.cache.get(a);return c&&s(b,String)?null:b},"~S,~B");b(c$,"cacheClear",function(){J.util.Logger.info("cache cleared");this.cache.clear();this.clearPngjCache(null)});b(c$,"cacheFileByNameAdd",
function(a,c){if(null==a||!c&&a.equalsIgnoreCase(""))return this.cacheClear(),-1;var b;if(c){a=this.viewer.resolveDatabaseFormat(a);b=this.getFileAsBytes(a,null,!0);if(s(b,String))return 0;this.cachePut(a,b)}else{if(a.endsWith("*"))return JU.AU.removeMapKeys(this.cache,a.substring(0,a.length-1));b=this.cache.remove(a.$replace("\\","/"))}return null==b?0:(s(b,String),b.length)},"~S,~B");b(c$,"cacheList",function(){for(var a=new java.util.Hashtable,c,b=this.cache.entrySet().iterator();b.hasNext()&&
((c=b.next())||1);)a.put(c.getKey(),Integer.$valueOf(JU.PT.isAB(c.getValue())?c.getValue().length:c.getValue().toString().length));return a});b(c$,"getCanonicalName",function(a){var c=this.classifyName(a,!0);return null==c?a:c[2]},"~S");e(c$,"postByteArray",function(a,c){var b=this.getBufferedInputStreamOrErrorMessageFromName(a,null,!1,!1,c,!1);if(s(b,String))return b;try{b=J.io.JmolBinary.getStreamAsBytes(b,null)}catch(e){if(y(e,java.io.IOException))try{b.close()}catch(f){if(!y(f,java.io.IOException))throw f;
}else throw e;}return null==b?"":J.io.JmolBinary.fixUTF(b)},"~S,~A");B(c$,"URL_LOCAL",3,"urlPrefixes",["http:","https:","ftp:","file:"]);c$.scriptFilePrefixes=c$.prototype.scriptFilePrefixes=['/*file*/"','FILE0="','FILE1="']});p("J.viewer");q(["java.util.Hashtable","JU.P3","J.constant.EnumAxesMode","$.EnumCallback"],"J.viewer.GlobalSettings","java.lang.Boolean $.Float JU.BS $.DF $.List J.constant.EnumStructure J.script.SV J.util.BSUtil $.Escape $.Logger $.Txt J.viewer.JC $.StateManager $.Viewer".split(" "),
function(){c$=u(function(){this.databases=this.htUserVariables=this.htPropertyFlagsRemoved=this.htBooleanParameterFlags=this.htNonbooleanParameterValues=this.viewer=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.fractionalRelative=this.forceAutoBond=!1;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="load('http://eds.bmc.uu.se/eds/dfs/%LC13/%LCFILE/%LCFILE.sfdat').lines.find('MAP_SIGMA').split(' ')[2]";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.cartoonLadders=this.cartoonFancy=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.starScale=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.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.useArcBall=this.strutsMultiple=!1;this.waitForMoveTo=this.useScriptQueue=this.useNumberLocalization=this.useMinimizationThread=!0;this.vectorScale=1;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;t(this,arguments)},J.viewer,"GlobalSettings");N(c$,function(){this.htUserVariables=new java.util.Hashtable;this.ptDefaultLattice=new JU.P3;this.axesMode=J.constant.EnumAxesMode.BOUNDBOX;this.objColors=D(8,0);this.objStateOn=va(8,!1);this.objMad=D(8,0);this.structureList=new java.util.Hashtable;this.structureList.put(J.constant.EnumStructure.TURN,[30,90,-15,95]);this.structureList.put(J.constant.EnumStructure.SHEET,[-180,-10,70,180,-180,-45,
-180,-130,140,180,90,180]);this.structureList.put(J.constant.EnumStructure.HELIX,[-160,0,-100,45])});w(c$,function(a,c,b){this.viewer=a;this.registerAllValues(c,b)},"J.viewer.Viewer,J.viewer.GlobalSettings,~B");b(c$,"clear",function(){for(var a=this.htUserVariables.keySet().iterator();a.hasNext();){var c=a.next();("@"==c.charAt(0)||c.startsWith("site_"))&&a.remove()}this.setPicked(-1);this.setI("_atomhovered",-1);this.setS("_pickinfo","");this.setB("selectionhalos",!1);this.setB("hidenotselected",
!1);this.setB("measurementlabels",this.measurementLabels=!0);this.setB("drawHover",this.drawHover=!1);this.viewer.saveScene("DELETE",null)});b(c$,"registerAllValues",function(a,c){this.htNonbooleanParameterValues=new java.util.Hashtable;this.htBooleanParameterFlags=new java.util.Hashtable;this.htPropertyFlagsRemoved=new java.util.Hashtable;null!=a&&(c||(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.platformSpeed=a.platformSpeed,this.useScriptQueue=a.useScriptQueue,this.useArcBall=a.useArcBall,this.databases=a.databases,this.showTiming=a.showTiming,this.wireframeRotation=a.wireframeRotation);null==this.databases&&(this.databases=
new java.util.Hashtable,this.getDataBaseList(J.viewer.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 b,e=0,f=J.constant.EnumCallback.values();e<
f.length&&((b=f[e])||1);e++)this.resetValue(b.name()+"Callback",a);this.setI("historyLevel",0);this.setI("depth",0);this.setF("gestureSwipeFactor",1);this.setB("hideNotSelected",!1);this.setS("hoverLabel","");this.setB("isKiosk",this.viewer.isKiosk());this.setS("logFile",this.viewer.getLogFileName());this.setI("logLevel",J.util.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.setS("pathForAllFiles","");this.setI("perspectiveModel",11);this.setS("picking","identify");this.setS("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.viewer.getStatusManager().syncingScripts);this.setB("syncMouse",this.viewer.getStatusManager().syncingMouse);this.setB("syncStereo",this.viewer.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",J.viewer.GlobalSettings.getJmolVersionInt());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.setS("currentLocalPath","");this.setS("defaultLattice","{0 0 0}");this.setS("defaultColorScheme","Jmol");this.setS("defaultDirectoryLocal","");this.setS("defaults","Jmol");this.setS("defaultVDW","Jmol");this.setS("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.setS("appletProxy",this.appletProxy);this.setB("applySymmetryToBonds",this.applySymmetryToBonds);this.setB("atomPicking",this.atomPicking);this.setS("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("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("cartoonRockets",this.cartoonRockets);this.setB("chainCaseSensitive",this.chainCaseSensitive);this.setB("celShading",this.celShading);this.setI("celShadingPower",this.celShadingPower);this.setS("dataSeparator",this.dataSeparator);this.setB("debugScript",this.debugScript);this.setS("defaultAngleLabel",this.defaultAngleLabel);this.setF("defaultDrawArrowScale",this.defaultDrawArrowScale);this.setS("defaultDirectory",this.defaultDirectory);
this.setS("defaultDistanceLabel",this.defaultDistanceLabel);this.setS("defaultDropScript",this.defaultDropScript);this.setS("defaultLabelPDB",this.defaultLabelPDB);this.setS("defaultLabelXYZ",this.defaultLabelXYZ);this.setS("defaultLoadFilter",this.defaultLoadFilter);this.setS("defaultLoadScript",this.defaultLoadScript);this.setB("defaultStructureDSSP",this.defaultStructureDSSP);this.setS("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.setS("edsUrlFormat",this.edsUrlFormat);this.setS("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.setS("energyUnits",this.energyUnits);this.setF("exportScale",this.exportScale);this.setB("fontScaling",this.fontScaling);this.setB("fontCaching",this.fontCaching);this.setB("forceAutoBond",this.forceAutoBond);this.setS("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.setS("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.setS("loadFormat",
this.loadFormat);this.setS("loadLigandFormat",this.loadLigandFormat);this.setB("logCommands",this.logCommands);this.setB("logGestures",this.logGestures);this.setB("measureAllModels",this.measureAllModels);this.setB("measurementLabels",this.measurementLabels);this.setS("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<J.viewer.Viewer.nProcessors);this.setB("navigationMode",this.navigationMode);this.setB("navigationPeriodic",this.navigationPeriodic);this.setF("navigationSpeed",this.navigationSpeed);this.setS("nmrPredictFormat",this.nmrPredictFormat);this.setS("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.setS("pickLabel",this.pickLabel);this.setI("platformSpeed",this.platformSpeed);this.setF("pointGroupLinearTolerance",this.pointGroupLinearTolerance);this.setF("pointGroupDistanceTolerance",this.pointGroupDistanceTolerance);this.setB("preserveState",this.preserveState);this.setS("propertyColorScheme",this.propertyColorScheme);
this.setS("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.setS("smilesUrlFormat",this.smilesUrlFormat);this.setS("nihResolverFormat",this.nihResolverFormat);this.setS("pubChemFormat",this.pubChemFormat);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("starScale",this.starScale);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("useArcBall",this.useArcBall);this.setB("useMinimizationThread",this.useMinimizationThread);this.setB("useNumberLocalization",
this.useNumberLocalization);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)},"J.viewer.GlobalSettings,~B");b(c$,"setDefaultLattice",function(a){Float.isNaN(a.x+a.y+a.z)||this.ptDefaultLattice.setT(a)},"JU.P3");b(c$,"setUnits",function(a){var c=this.measureDistanceUnits,b=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");c.equalsIgnoreCase(this.measureDistanceUnits)?b.equalsIgnoreCase(this.energyUnits)||
this.setS("energyUnits",this.energyUnits):this.setS("measurementUnits",this.measureDistanceUnits)},"~S");b(c$,"isJmolVariable",function(a){return"_"==a.charAt(0)||this.htNonbooleanParameterValues.containsKey(a=a.toLowerCase())||this.htBooleanParameterFlags.containsKey(a)||0<=J.viewer.GlobalSettings.unreportedProperties.indexOf(";"+a+";")},"~S");b(c$,"resetValue",function(a,c){this.setS(a,null==c?"":c.getParameter(a))},"~S,J.viewer.GlobalSettings");b(c$,"setB",function(a,c){a=a.toLowerCase();this.htNonbooleanParameterValues.containsKey(a)||
this.htBooleanParameterFlags.put(a,c?Boolean.TRUE:Boolean.FALSE)},"~S,~B");b(c$,"setI",function(a,c){a=a.toLowerCase();this.htBooleanParameterFlags.containsKey(a)||this.htNonbooleanParameterValues.put(a,Integer.$valueOf(c))},"~S,~N");b(c$,"setF",function(a,c){Float.isNaN(c)||(a=a.toLowerCase(),this.htBooleanParameterFlags.containsKey(a)||this.htNonbooleanParameterValues.put(a,Float.$valueOf(c)))},"~S,~N");b(c$,"setS",function(a,c){a=a.toLowerCase();null==c||this.htBooleanParameterFlags.containsKey(a)||
this.htNonbooleanParameterValues.put(a,c)},"~S,~S");b(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");b(c$,"setUserVariable",function(a,c){if(null==c)return null;a=a.toLowerCase();this.htUserVariables.put(a,c.setName(a).setGlobal());
return c},"~S,J.script.SV");b(c$,"unsetUserVariable",function(a){a.equals("all")||a.equals("variables")?(this.htUserVariables.clear(),J.util.Logger.info("all user-defined variables deleted")):this.htUserVariables.containsKey(a)&&(J.util.Logger.info("variable "+a+" deleted"),this.htUserVariables.remove(a))},"~S");b(c$,"removeUserVariable",function(a){this.htUserVariables.remove(a)},"~S");b(c$,"getUserVariable",function(a){if(null==a)return null;a=a.toLowerCase();return this.htUserVariables.get(a)},
"~S");b(c$,"getParameterEscaped",function(a,c){a=a.toLowerCase();if(this.htNonbooleanParameterValues.containsKey(a)){var b=this.htNonbooleanParameterValues.get(a);return J.viewer.StateManager.varClip(a,J.util.Escape.e(b),c)}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");b(c$,"getParameter",function(a){a=
this.getParam(a,!1);return null==a?"":a},"~S");b(c$,"getOrSetNewVariable",function(a,c){if(null==a||0==a.length)a="x";var b=this.getParam(a,!0);return null==b&&c&&"_"!=a.charAt(0)?this.setUserVariable(a,J.script.SV.newV(4,"")):J.script.SV.getVariable(b)},"~S,~B");b(c$,"getParam",function(a,c){a=a.toLowerCase();if(a.equals("_memory")){var b=JU.DF.formatDecimal(0,1)+"/"+JU.DF.formatDecimal(0,1);this.htNonbooleanParameterValues.put("_memory",b)}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)?(b=this.htUserVariables.get(a),c?b:J.script.SV.oValue(b)):null},"~S,~B");b(c$,"getVariableList",function(){return J.viewer.StateManager.getVariableList(this.htUserVariables,0,!0,!1)});b(c$,"setStructureList",function(a,c){this.haveSetStructureList=!0;this.structureList.put(c,a)},"~A,J.constant.EnumStructure");
b(c$,"getStructureList",function(){return this.structureList});b(c$,"setPicked",function(a){var c=null,b=null;0<=a&&(this.setI("_atompicked",a),c=this.getParam("picked",!0),b=this.getParam("pickedList",!0));if(null==c||10!=c.tok)c=J.script.SV.newV(10,new JU.BS),b=J.script.SV.getVariableList(new JU.List),this.setUserVariable("picked",c),this.setUserVariable("pickedList",b);0>a||(J.script.SV.getBitSet(c,!1).set(a),c=b.pushPop(null),10==c.tok&&b.pushPop(c),(10!=c.tok||!c.value.get(a))&&b.pushPop(J.script.SV.newV(10,
J.util.BSUtil.newAndSetBit(a))))},"~N");b(c$,"resolveDataBase",function(a,c){var b=this.databases.get(a.toLowerCase());if(null==b)return null;0>c.indexOf("/")&&(a.equals("pubchem")?c="name/"+c:a.equals("nci")&&(c+="/file?format=sdf&get3d=True"));return 0>b.indexOf("%FILE")?b+c:J.util.Txt.formatStringS(b,"FILE",c)},"~S,~S");c$.doReportProperty=b(c$,"doReportProperty",function(a){return"_"!=a.charAt(0)&&0>J.viewer.GlobalSettings.unreportedProperties.indexOf(";"+a+";")},"~S");b(c$,"getDataBaseList",
function(a){if(null!=a)for(var c=0;c<a.length;c+=2)this.databases.put(a[c].toLowerCase(),a[c+1])},"~A");c$.getJmolVersionInt=b(c$,"getJmolVersionInt",function(){var a=J.viewer.JC.version,c=-1;try{var b=a.indexOf(".");if(0>b)return c=1E5*Integer.parseInt(a);c=1E5*Integer.parseInt(a.substring(0,b));a=a.substring(b+1);b=a.indexOf(".");if(0>b)return c+=1E3*Integer.parseInt(a);c+=1E3*Integer.parseInt(a.substring(0,b));a=a.substring(b+1);b=a.indexOf("_");0<=b&&(a=a.substring(0,b));b=a.indexOf(" ");0<=b&&
(a=a.substring(0,b));c+=Integer.parseInt(a)}catch(e){if(!y(e,NumberFormatException))throw e;}return c});b(c$,"getAllVariables",function(){var a=new java.util.Hashtable;a.putAll(this.htBooleanParameterFlags);a.putAll(this.htNonbooleanParameterValues);a.putAll(this.htUserVariables);return a});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;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;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.constant.EnumCallback.getNameList()+";undo;bondpicking;modelkitmode;allowgestures;allowkeystrokes;allowmultitouch;allowmodelkit;").toLowerCase()});p("J.viewer");q(["JU.SB","$.V3","J.util.Elements","$.Txt"],"J.viewer.JC",["java.util.Hashtable","JU.PT"],function(){c$=G(J.viewer,"JC");c$.embedScript=b(c$,"embedScript",function(a){return"\n/****** Jmol Embedded Script **** \n"+a+"\n**/"},"~S");c$.getSpecialAtomName=b(c$,"getSpecialAtomName",function(a){return J.viewer.JC.specialAtomNames[a]},"~N");
c$.getSpecialAtomNames=b(c$,"getSpecialAtomNames",function(){J.viewer.JC.htSpecialAtoms=new java.util.Hashtable;for(var a=J.viewer.JC.specialAtomNames.length;0<=--a;){var c=J.viewer.JC.specialAtomNames[a];null!=c&&J.viewer.JC.htSpecialAtoms.put(c,Integer.$valueOf(a))}});c$.lookupSpecialAtomID=b(c$,"lookupSpecialAtomID",function(a){null==J.viewer.JC.htSpecialAtoms&&J.viewer.JC.getSpecialAtomNames();a=J.viewer.JC.htSpecialAtoms.get(a);return null!=a?a.intValue():0},"~S");c$.getAminoAcidValenceAndCharge=
b(c$,"getAminoAcidValenceAndCharge",function(a,c,b){if(null==a||0==a.length||3<a.length||c.equals("CA")||c.equals("CB"))return!1;var g=c.charAt(0),e=1==c.length?"\x00":c.charAt(1),l=!1,j=b[3];switch(a.length){case 3:if(1==c.length)switch(g){case "N":if(1<j)return!1;b[1]=1;break;case "O":l=0>"HOH;DOD;WAT".indexOf(a);break;default:l=!0}else a+=g,l=0<="ARGN;ASNN;ASNO;ASPO;GLNN;GLNO;GLUO;HISN;HISC;PHECTRPC;TRPN;TYRC".indexOf(a),0<="LYSN".indexOf(a)?b[1]=1:"O"==g&&"X"==e&&(b[1]=-1);break;case 1:case 2:if(2<
c.length&&"'"==c.charAt(2))return!1;switch(g){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)&&b[0]--;break;case "7":b[0]--}}l=!0}if(l)switch(g){case "N":b[2]=2;break;case "C":b[2]=2;b[0]--;break;case "O":b[0]--}return!0},"~S,~S,~A");c$.getStandardPdbHydrogenCount=b(c$,"getStandardPdbHydrogenCount",function(a){return 0>a||a>=J.viewer.JC.pdbHydrogenCount.length?-1:J.viewer.JC.pdbHydrogenCount[a]},"~N");c$.getPdbBondInfo=
b(c$,"getPdbBondInfo",function(a,c){if(0>a||a>J.viewer.JC.pdbBondInfo.length)return null;var b=J.viewer.JC.pdbBondInfo[a];if(c&&0<=(a=b.indexOf("O3'")))b=b.substring(0,a);for(var g=JU.PT.getTokens(b),e=Array(m(g.length/2)),l=0,j=0;l<e.length;l++){var k=g[j++],p=g[j++];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<k.compareTo(p)&&(b=p,p=
k,k=b);e[l]=[k,p,p.startsWith("H")?"1":"2"]}return e},"~N,~B");c$.checkCarbohydrate=b(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=b(c$,"getGroup3List",function(){if(null!=J.viewer.JC.group3List)return J.viewer.JC.group3List;for(var a=new JU.SB,c=1;42>c;c++)a.append(",[").append((J.viewer.JC.predefinedGroup3Names[c]+"   ").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]");
J.viewer.JC.group3Count=m(a.length()/6);return J.viewer.JC.group3List=a.toString()});c$.isHetero=b(c$,"isHetero",function(a){return 42<=J.viewer.JC.getGroup3Pt(a)},"~S");c$.getGroup3Pt=b(c$,"getGroup3Pt",function(a){J.viewer.JC.getGroup3List();var c=(new JU.SB).append("[");c.append(a);switch(a.length){case 1:c.append("  ");break;case 2:c.append(" ")}a=J.viewer.JC.group3List.indexOf(c.toString());return 0>a?2147483647:m(a/6)+1},"~S");c$.getGroup3Count=b(c$,"getGroup3Count",function(){if(0<J.viewer.JC.group3Count)return J.viewer.JC.group3Count;
J.viewer.JC.getGroup3List();return J.viewer.JC.group3Count=m(J.viewer.JC.group3List.length/6)});c$.isShapeSecondary=b(c$,"isShapeSecondary",function(a){return 9<=a&&16>a},"~N");c$.shapeTokenIndex=b(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 1826248715: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 31;case 1679429641:return 32;case 1614417948:return 33;case 544771:return 34;case 1611272202:return 35}return-1},"~N");c$.getShapeClassName=b(c$,"getShapeClassName",function(a,c){return 0>a?J.viewer.JC.shapeClassBases[~a]:"J."+(c?"render":"shape")+(9<=a&&16>a?"bio.":16<=a&&23>a?"special.":24<=a&&29>a?"surface.":23==a?"cgo.":".")+J.viewer.JC.shapeClassBases[a]},"~N,~B");c$.getShapeVisibilityFlag=b(c$,"getShapeVisibilityFlag",function(a){return 4<<a},
"~N");c$.getOffset=b(c$,"getOffset",function(a,c){a=Math.min(Math.max(a,-127),127);c=Math.min(Math.max(c,-127),127);return(a&255)<<8|c&255},"~N,~N");c$.getXOffset=b(c$,"getXOffset",function(a){switch(a){case 0:return 4;case 32767:return 0;default:return a<<48>>56}},"~N");c$.getYOffset=b(c$,"getYOffset",function(a){switch(a){case 0:return-4;case 32767:return 0;default:return-(a<<56>>56)}},"~N");c$.getAlignmentName=b(c$,"getAlignmentName",function(a){return J.viewer.JC.hAlignNames[a&3]},"~N");c$.getPointer=
b(c$,"getPointer",function(a){return 0==(a&1)?"":0<(a&2)?"background":"on"},"~N");B(c$,"copyright","(C) 2012 Jmol Development","version",null,"date",null);var a=null,c=null,a=___JmolVersion,c=___JmolDate;null!=c&&(c=c.substring(7,24));J.viewer.JC.version=null!=a?a:"(Unknown version)";J.viewer.JC.date=null!=c?c:"(Unknown date)";B(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=[J.viewer.JC.axisX,J.viewer.JC.axisY,J.viewer.JC.axisZ,J.viewer.JC.axisNX,J.viewer.JC.axisNY,J.viewer.JC.axisNZ];B(c$,"XY_ZTOP",100,"DEFAULT_PERCENT_VDW_ATOM",23,"DEFAULT_BOND_RADIUS",0.15,"DEFAULT_BOND_MILLIANGSTROM_RADIUS",pa(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=J.util.Elements.elementSymbols.length;c$.PARTIAL_CHARGE_COLIX_RED=c$.prototype.PARTIAL_CHARGE_COLIX_RED=J.util.Elements.elementSymbols.length+J.viewer.JC.argbsFormalCharge.length;c$.PARTIAL_CHARGE_RANGE_SIZE=c$.prototype.PARTIAL_CHARGE_RANGE_SIZE=
J.viewer.JC.argbsRwbScale.length;B(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=J.viewer.JC.specialAtomNames.length;B(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_C4_PRIME",8,"ATOMID_C3_PRIME",9,"ATOMID_O3_PRIME",10,"ATOMID_C1_PRIME",12,"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","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?GCATUIGCATUIGCATUII".split(""),"predefinedVariable","@_1H _H & !(_2H,_3H);@_12C _C & !(_13C,_14C);@_14N _N & !(_15N);@water _g>=42 & _g<45, oxygen & connected(2) & connected(2, hydrogen), (hydrogen) & connected(oxygen & connected(2) & connected(2, hydrogen));@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(";"),
"databases","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/predictor?POST?molfile= nmrdb http://www.nmrdb.org/service/predictor?POST?molfile= pdb http://www.rcsb.org/pdb/files/%FILE.pdb.gz pubchem http://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/%FILE/SDF?record_type=3d".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_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_PMESH",28,"SHAPE_PLOT3D",29,"SHAPE_MAX_SURFACE",29,"SHAPE_MAX_MESH_COLLECTION",29,"SHAPE_ECHO",30,"SHAPE_MAX_HAS_ID",31,"SHAPE_AXES",31,"SHAPE_BBCAGE",32,"SHAPE_UCCAGE",33,"SHAPE_HOVER",34,"SHAPE_FRANK",35,"SHAPE_MAX",36,"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 Axes Bbcage Uccage Hover Frank".split(" "),
"ATOM_IN_FRAME",1,"ATOM_SLABBED",2,"binaryExtensions",";pse=PyMOL;","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;";B(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)});p("J.viewer");q(null,"J.viewer.ModelManager",["J.modelset.ModelLoader"],function(){c$=u(function(){this.fileName=this.modelSetPathName=this.modelSet=this.viewer=null;t(this,arguments)},J.viewer,"ModelManager");w(c$,function(a){this.viewer=a},"J.viewer.Viewer");b(c$,"zap",function(){this.modelSetPathName=this.fileName=null;new J.modelset.ModelLoader(this.viewer,this.viewer.getZapName(),
null,null,null,null)});b(c$,"getModelSetFileName",function(){return null!=this.fileName?this.fileName:this.viewer.getZapName()});b(c$,"getModelSetPathName",function(){return this.modelSetPathName});b(c$,"createModelSet",function(a,c,b,e,f,g){var h=null;g?(h=this.modelSet.modelSetName,h.equals("zapped")?h=null:0>h.indexOf(" (modified)")&&(h+=" (modified)")):null==e?this.zap():(this.modelSetPathName=a,this.fileName=c);null!=e&&(null==h&&(h=this.viewer.getModelAdapter().getAtomSetCollectionName(e),null!=
h&&(h=h.trim(),0==h.length&&(h=null)),null==h&&(h=J.viewer.ModelManager.reduceFilename(c))),new J.modelset.ModelLoader(this.viewer,h,b,e,g?this.modelSet:null,f));0==this.modelSet.getAtomCount()&&!this.modelSet.getModelSetAuxiliaryInfoBoolean("isPyMOL")&&this.zap()},"~S,~S,JU.SB,~O,JU.BS,~B");c$.reduceFilename=b(c$,"reduceFilename",function(a){if(null==a)return null;var c=a.indexOf(".");0<c&&(a=a.substring(0,c));24<a.length&&(a=a.substring(0,20)+" ...");return a},"~S");b(c$,"createAtomDataSet",function(a,
c){J.modelset.ModelLoader.createAtomDataSet(this.viewer,this.modelSet,c,a,this.viewer.getSelectionSet(!1))},"~O,~N")});p("J.viewer");c$=u(function(){this.y=this.x=-1E3;this.modifiers=0;this.time=-1;this.name=null;t(this,arguments)},J.viewer,"MouseState");w(c$,function(a){this.name=a},"~S");b(c$,"set",function(a,c,b,e){this.time=a;this.x=c;this.y=b;this.modifiers=e},"~N,~N,~N,~N");b(c$,"setCurrent",function(a,c){this.time=a.time;2>c&&(this.x=a.x,this.y=a.y);this.modifiers=a.modifiers},"J.viewer.MouseState,~N");
b(c$,"inRange",function(a,c,b){return Math.abs(this.x-c)<=a&&Math.abs(this.y-b)<=a},"~N,~N,~N");b(c$,"check",function(a,c,b,e,f,g){return this.modifiers==e&&(2147483647<=g?this.inRange(a,c,b):f-this.time<g&&20<f-this.time)},"~N,~N,~N,~N,~N,~N");b(c$,"is",function(a){return a.x==this.x&&a.y==this.y&&a.time==this.time},"J.viewer.MouseState");B(c$,"MIN_DELAY_MS",20);p("J.viewer");q(["JU.BS"],"J.viewer.SelectionManager",["JU.AU","J.i18n.GT","J.util.BSUtil"],function(){c$=u(function(){this.bsDeleted=this.bsSubset=
this.bsFixed=this.bsSelection=this.bsHidden=this.listeners=this.viewer=null;this.empty=1;this.hideNotSelected=!1;this.bsTemp=null;t(this,arguments)},J.viewer,"SelectionManager");N(c$,function(){this.listeners=[];this.bsHidden=new JU.BS;this.bsSelection=new JU.BS;this.bsFixed=new JU.BS;this.bsTemp=new JU.BS});w(c$,function(a){this.viewer=a},"J.viewer.Viewer");b(c$,"deleteModelAtoms",function(a){J.util.BSUtil.deleteBits(this.bsHidden,a);J.util.BSUtil.deleteBits(this.bsSelection,a);J.util.BSUtil.deleteBits(this.bsSubset,
a);J.util.BSUtil.deleteBits(this.bsFixed,a);J.util.BSUtil.deleteBits(this.bsDeleted,a)},"JU.BS");b(c$,"clear",function(){this.clearSelection(!0);this.hide(null,null,0,!0);this.setSelectionSubset(null);this.bsDeleted=null;this.setMotionFixedAtoms(null)});b(c$,"display",function(a,c,b,e){switch(b){default:b=a.getModelAtomBitSetIncludingDeleted(-1,!1),this.bsHidden.or(b);case 1276118017:null!=c&&this.bsHidden.andNot(c);break;case 1073742119:null!=c&&this.bsHidden.or(c)}J.util.BSUtil.andNot(this.bsHidden,
this.bsDeleted);a.setBsHidden(this.bsHidden);e||this.viewer.reportSelection(J.i18n.GT.i(J.i18n.GT._("{0} atoms hidden"),this.bsHidden.cardinality()))},"J.modelset.ModelSet,JU.BS,~N,~B");b(c$,"hide",function(a,c,b,e){J.viewer.SelectionManager.setBitSet(this.bsHidden,c,b);null!=a&&a.setBsHidden(this.bsHidden);e||this.viewer.reportSelection(J.i18n.GT.i(J.i18n.GT._("{0} atoms hidden"),this.bsHidden.cardinality()))},"J.modelset.ModelSet,JU.BS,~N,~B");b(c$,"setSelectionSet",function(a,c){J.viewer.SelectionManager.setBitSet(this.bsSelection,
a,c);this.empty=-1;this.selectionChanged(!1)},"JU.BS,~N");c$.setBitSet=b(c$,"setBitSet",function(a,c,b){switch(b){default:a.clearAll();case 1276118017:null!=c&&a.or(c);break;case 1073742119:null!=c&&a.andNot(c)}},"JU.BS,JU.BS,~N");b(c$,"getHiddenSet",function(){return this.bsHidden});b(c$,"getHideNotSelected",function(){return this.hideNotSelected});b(c$,"setHideNotSelected",function(a){(this.hideNotSelected=a)&&this.selectionChanged(!1)},"~B");b(c$,"isSelected",function(a){return 0<=a&&this.bsSelection.get(a)},
"~N");b(c$,"select",function(a,c,b){null==a?(this.selectAll(!0),this.viewer.getBoolean(1613758476)||this.excludeSelectionSet(this.viewer.getAtomBits(1613758476,null)),this.viewer.getBoolean(1613758470)||this.excludeSelectionSet(this.viewer.getAtomBits(1613758470,null)),this.selectionChanged(!1)):this.setSelectionSet(a,c);if((a=this.viewer.getBoolean(603979880))||!b)c=this.getSelectionCount(),a?this.viewer.reportSelection((0==c?"No atoms":1==c?"1 atom":c+" atoms")+" selected!"):b||this.viewer.reportSelection(J.i18n.GT.i(J.i18n.GT._("{0} atoms selected"),
c))},"JU.BS,~N,~B");b(c$,"selectAll",function(a){var c=this.viewer.getAtomCount();for(this.empty=0==c?1:0;0<=--c;)this.bsSelection.set(c);J.util.BSUtil.andNot(this.bsSelection,this.bsDeleted);this.selectionChanged(a)},"~B");b(c$,"clearSelection",function(a){this.setHideNotSelected(!1);this.bsSelection.clearAll();this.empty=1;this.selectionChanged(a)},"~B");b(c$,"isAtomSelected",function(a){return((null==this.bsSubset||this.bsSubset.get(a))&&null==this.bsDeleted||!this.bsDeleted.get(a))&&this.bsSelection.get(a)},
"~N");b(c$,"setSelectedAtom",function(a,c){0>a?this.selectionChanged(!0):null!=this.bsSubset&&!this.bsSubset.get(a)||null!=this.bsDeleted&&this.bsDeleted.get(a)||(this.bsSelection.setBitTo(a,c),this.empty=c?0:-1)},"~N,~B");b(c$,"setSelectionSubset",function(a){this.bsSubset=a},"JU.BS");b(c$,"isInSelectionSubset",function(a){return 0>a||null==this.bsSubset||this.bsSubset.get(a)},"~N");b(c$,"invertSelection",function(){J.util.BSUtil.invertInPlace(this.bsSelection,this.viewer.getAtomCount());this.empty=
0<this.bsSelection.length()?0:1;this.selectionChanged(!1)});b(c$,"excludeSelectionSet",function(a){null==a||1==this.empty||(this.bsSelection.andNot(a),this.empty=-1)},"JU.BS");b(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});b(c$,"addListener",function(a){for(var c=this.listeners.length;0<=
--c;)if(this.listeners[c]===a){this.listeners[c]=null;break}for(var b=this.listeners.length,c=b;0<=--c;)if(null==this.listeners[c]){this.listeners[c]=a;return}this.listeners=0==this.listeners.length?Array(1):JU.AU.doubleLength(this.listeners);this.listeners[b]=a},"J.api.JmolSelectionListener");b(c$,"selectionChanged",function(a){this.hideNotSelected&&this.hide(this.viewer.getModelSet(),J.util.BSUtil.copyInvert(this.bsSelection,this.viewer.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");b(c$,"deleteAtoms",function(a){var c=J.util.BSUtil.copy(a);null==this.bsDeleted?this.bsDeleted=c:(c.andNot(this.bsDeleted),this.bsDeleted.or(a));this.bsHidden.andNot(this.bsDeleted);this.bsSelection.andNot(this.bsDeleted);return c.cardinality()},"JU.BS");b(c$,"getDeletedAtoms",function(){return this.bsDeleted});b(c$,"getSelectionSet",function(a){if(a||null==this.bsDeleted&&null==this.bsSubset)return this.bsSelection;
a=new JU.BS;a.or(this.bsSelection);this.excludeAtoms(a,!1);return a},"~B");b(c$,"getSelectionSubset",function(){return this.bsSubset});b(c$,"excludeAtoms",function(a,c){null!=this.bsDeleted&&a.andNot(this.bsDeleted);!c&&null!=this.bsSubset&&a.and(this.bsSubset)},"JU.BS,~B");b(c$,"processDeletedModelAtoms",function(a){null!=this.bsDeleted&&J.util.BSUtil.deleteBits(this.bsDeleted,a);null!=this.bsSubset&&J.util.BSUtil.deleteBits(this.bsSubset,a);J.util.BSUtil.deleteBits(this.bsFixed,a);J.util.BSUtil.deleteBits(this.bsHidden,
a);var c=J.util.BSUtil.copy(this.bsSelection);J.util.BSUtil.deleteBits(c,a);this.setSelectionSet(c,0)},"JU.BS");b(c$,"setMotionFixedAtoms",function(a){this.bsFixed.clearAll();null!=a&&this.bsFixed.or(a)},"JU.BS");b(c$,"getMotionFixedAtoms",function(){return this.bsFixed});B(c$,"TRUE",1,"FALSE",0,"UNKNOWN",-1)});p("J.viewer");q(["JU.BS"],"J.viewer.ShapeManager","java.lang.Boolean java.util.Hashtable JU.P3 $.SB J.constant.EnumPalette $.EnumVdw J.modelset.Atom J.util.BSUtil $.Logger J.viewer.JC".split(" "),
function(){c$=u(function(){this.navigationCrossHairMinMax=this.bsRenderableAtoms=this.viewer=this.shapes=this.modelSet=this.gdata=null;t(this,arguments)},J.viewer,"ShapeManager");N(c$,function(){this.bsRenderableAtoms=new JU.BS;this.navigationCrossHairMinMax=D(4,0)});w(c$,function(a){this.viewer=a;this.gdata=a.getGraphicsData()},"J.viewer.Viewer");b(c$,"findNearestShapeAtomIndex",function(a,c,b,e){if(null!=this.shapes)for(var f=0;f<this.shapes.length&&null==b[0];++f)null!=this.shapes[f]&&this.shapes[f].findNearestAtomIndex(a,
c,b,e)},"~N,~N,~A,JU.BS");b(c$,"getShapes",function(){return this.shapes});b(c$,"getShapePropertyIndex",function(a,c,b){if(null==this.shapes||null==this.shapes[a])return null;this.viewer.setShapeErrorState(a,"get "+c);a=this.shapes[a].getProperty(c,b);this.viewer.setShapeErrorState(-1,null);return a},"~N,~S,~N");b(c$,"getShapePropertyData",function(a,c,b){if(null==this.shapes||null==this.shapes[a])return!1;this.viewer.setShapeErrorState(a,"get "+c);a=this.shapes[a].getPropertyData(c,b);this.viewer.setShapeErrorState(-1,
null);return a},"~N,~S,~A");b(c$,"getShapeIdFromObjectName",function(a){if(null!=this.shapes)for(var c=16;29>c;++c)if(null!=this.shapes[c]&&0<=this.shapes[c].getIndexFromName(a))return c;return-1},"~S");b(c$,"loadDefaultShapes",function(a){this.modelSet=a;if(null!=this.shapes)for(var c=0;c<this.shapes.length;++c)null!=this.shapes[c]&&this.shapes[c].setModelSet(a);this.loadShape(0);this.loadShape(1)},"J.modelset.ModelSet");b(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 c=J.viewer.JC.getShapeClassName(a,!1);try{var b=Class.forName(c).newInstance();this.viewer.setShapeErrorState(a,"allocate");b.initializeShape(this.viewer,this.gdata,this.modelSet,a);this.viewer.setShapeErrorState(-1,null);return this.shapes[a]=b}catch(e){if(y(e,Exception))return J.util.Logger.errorEx("Could not instantiate shape:"+c,e),null;throw e;}},"~N");b(c$,"refreshShapeTrajectories",function(a,c,b){var e=Integer.$valueOf(a);a=this.viewer.getModelUndeletedAtomsBitSet(a);
for(var f=0;36>f;f++)null!=this.shapes[f]&&this.setShapePropertyBs(f,"refreshTrajectories",[e,c,b],a)},"~N,JU.BS,JU.M4");b(c$,"releaseShape",function(a){null!=this.shapes&&(this.shapes[a]=null)},"~N");b(c$,"resetShapes",function(){this.viewer.noGraphicsAllowed()||(this.shapes=Array(36))});b(c$,"setShapeSizeBs",function(a,c,b,e){if(null!=this.shapes){if(null==e&&(1!=a||2147483647!=c))e=this.viewer.getSelectionSet(!1);null!=b&&(0!=b.value&&b.vdwType===J.constant.EnumVdw.TEMP)&&this.modelSet.getBfactor100Lo();
this.viewer.setShapeErrorState(a,"set size");(null==b?0!=c:0!=b.value)&&this.loadShape(a);null!=this.shapes[a]&&this.shapes[a].setShapeSizeRD(c,b,e);this.viewer.setShapeErrorState(-1,null)}},"~N,~N,J.atomdata.RadiusData,JU.BS");b(c$,"setLabel",function(a,c){if(null==a){if(null==this.shapes[5])return}else this.loadShape(5),this.setShapeSizeBs(5,0,null,c);this.setShapePropertyBs(5,"label",a,c)},"~S,JU.BS");b(c$,"setShapePropertyBs",function(a,c,b,e){null==this.shapes||null==this.shapes[a]||(null==e&&
(e=this.viewer.getSelectionSet(!1)),this.viewer.setShapeErrorState(a,"set "+c),this.shapes[a].setProperty(c.intern(),b,e),this.viewer.setShapeErrorState(-1,null))},"~N,~S,~O,JU.BS");b(c$,"checkFrankclicked",function(a,c){var b=this.shapes[35];return null!=b&&b.wasClicked(a,c)},"~N,~N");b(c$,"checkObjectClicked",function(a,c,b,e,f){var g,h=null;if(0!=b&&this.viewer.getBondPicking()&&null!=(h=this.shapes[1].checkObjectClicked(a,c,b,e,f)))return h;for(var l=0;l<J.viewer.ShapeManager.clickableMax;l++)if(null!=
(g=this.shapes[J.viewer.ShapeManager.hoverable[l]])&&null!=(h=g.checkObjectClicked(a,c,b,e,f)))return h;return null},"~N,~N,~N,JU.BS,~B");b(c$,"checkObjectDragged",function(a,c,b,e,f,g,h){for(var l=!1,j=0<h?h+1:36;!l&&h<j;++h)null!=this.shapes[h]&&(l=this.shapes[h].checkObjectDragged(a,c,b,e,f,g));return l},"~N,~N,~N,~N,~N,JU.BS,~N");b(c$,"checkObjectHovered",function(a,c,b,e){var f=this.shapes[1];if(e&&null!=f&&f.checkObjectHovered(a,c,b))return!0;for(e=0;e<J.viewer.ShapeManager.hoverable.length;e++)if(f=
this.shapes[J.viewer.ShapeManager.hoverable[e]],null!=f&&f.checkObjectHovered(a,c,b))return!0;return!1},"~N,~N,JU.BS,~B");b(c$,"deleteShapeAtoms",function(a,c){if(null!=this.shapes)for(var b=0;36>b;b++)null!=this.shapes[b]&&this.setShapePropertyBs(b,"deleteModelAtoms",a,c)},"~A,JU.BS");b(c$,"deleteVdwDependentShapes",function(a){null==a&&(a=this.viewer.getSelectionSet(!1));null!=this.shapes[24]&&this.shapes[24].setProperty("deleteVdw",null,a);null!=this.shapes[25]&&this.shapes[25].setProperty("deleteVdw",
null,a)},"JU.BS");b(c$,"getAtomShapeValue",function(a,c,b){a=J.viewer.JC.shapeTokenIndex(a);if(0>a||null==this.shapes[a])return 0;b=this.shapes[a].getSize(b);if(0==b){if(0==(c.shapeVisibilityFlags&this.shapes[a].myVisibilityFlag))return 0;b=this.shapes[a].getSizeG(c)}return b/2E3},"~N,J.modelset.Group,~N");b(c$,"getObjectMap",function(a,c){if(null!=this.shapes)for(var b=Boolean.$valueOf(c),e=16;29>e;++e)this.getShapePropertyData(e,"getNames",[a,b])},"java.util.Map,~B");b(c$,"getProperty",function(a){return a.equals("getShapes")?
this.shapes:null},"~O");b(c$,"getRenderableBitSet",function(){return this.bsRenderableAtoms});b(c$,"getShape",function(a){return null==this.shapes?null:this.shapes[a]},"~N");b(c$,"getShapeInfo",function(){var a=new java.util.Hashtable,c=new JU.SB;if(null!=this.shapes)for(var b=0;36>b;++b){var e=this.shapes[b];if(null!=e){var f=J.viewer.JC.shapeClassBases[b],e=e.getShapeDetail();null!=e&&a.put(f,e)}}0<c.length()&&a.put("shapeCommands",c.toString());return a});b(c$,"mergeShapes",function(a){if(null!=
a)if(null==this.shapes)this.shapes=a;else for(var c=0;c<a.length;++c)null!=a[c]&&(null==this.shapes[c]&&this.loadShape(c),this.shapes[c].merge(a[c]))},"~A");b(c$,"resetBioshapes",function(a){if(null!=this.shapes)for(var c=0;c<this.shapes.length;++c)null!=this.shapes[c]&&this.shapes[c].isBioShape&&(this.shapes[c].setModelSet(this.modelSet),this.shapes[c].setShapeSizeRD(0,null,a),this.shapes[c].setProperty("color",J.constant.EnumPalette.NONE,a))},"JU.BS");b(c$,"setAtomLabel",function(a,c){null!=this.shapes&&
(this.loadShape(5),this.shapes[5].setProperty("label:"+a,Integer.$valueOf(c),null))},"~S,~N");b(c$,"setModelVisibility",function(){if(!(null==this.shapes||null==this.shapes[0])){for(var a=this.viewer.getVisibleFramesBitSet(),c=1;36>c;c++)null!=this.shapes[c]&&this.shapes[c].setVisibilityFlags(a);this.shapes[0].setVisibilityFlags(a);for(c=0;36>c;++c)a=this.shapes[c],null!=a&&a.setModelClickability()}});b(c$,"finalizeAtoms",function(a,c){if(null!=a){var b=this.viewer.getAtomSetCenter(a),e=new JU.P3;
this.viewer.transformPt3f(b,e);e.add(c);this.viewer.unTransformPoint(e,e);e.sub(b);this.viewer.setAtomCoordsRelative(e,a);c.set(0,0,0)}this.bsRenderableAtoms.clearAll();b=this.modelSet.atoms;for(e=this.modelSet.getAtomCount();0<=--e;)0!=(b[e].getShapeVisibilityFlags()&1)&&this.bsRenderableAtoms.set(e)},"JU.BS,JU.P3");b(c$,"transformAtoms",function(){for(var a=this.modelSet.vibrations,c=this.modelSet.atoms,b=null!=a&&this.viewer.isVibrationOn(),e=this.bsRenderableAtoms.nextSetBit(0);0<=e;e=this.bsRenderableAtoms.nextSetBit(e+
1)){var f=c[e],g=b&&f.hasVibration()?this.viewer.transformPtVib(f,a[e]):this.viewer.transformPt(f);f.sX=g.x;f.sY=g.y;f.sZ=g.z;var h=Math.abs(f.madAtom);h==J.modelset.Atom.MAD_GLOBAL&&(h=z(2E3*this.viewer.getFloat(1141899265)));f.sD=pa(this.viewer.scaleToScreen(g.z,h))}if(this.viewer.getSlabEnabled()){e=this.viewer.getBoolean(603979940);a=this.viewer.getBoolean(603979938);b=this.gdata.getSlab();g=this.gdata.getDepth();if(e){f=this.modelSet.getMolecules();h=this.modelSet.getMoleculeCountInModel(-1);
for(e=0;e<h;e++){var l=f[e],j=0,k=l.firstAtomIndex;if(this.bsRenderableAtoms.get(k)){for(;j<l.atomCount&&!this.gdata.isClippedZ(c[k].sZ-(c[k].sD>>1));j++,k++);if(j!=l.atomCount){k=l.firstAtomIndex;for(j=0;j<l.atomCount;j++)this.bsRenderableAtoms.clear(k),c[k++].sZ=0}}}}for(e=this.bsRenderableAtoms.nextSetBit(0);0<=e;e=this.bsRenderableAtoms.nextSetBit(e+1))if(f=c[e],this.gdata.isClippedZ(f.sZ-(a?c[e].sD>>1:0)))f.setClickable(0),h=m((a?-1:1)*f.sD/2),(f.sZ+h<b||f.sZ-h>g||!this.gdata.isInDisplayRange(f.sX,
f.sY))&&this.bsRenderableAtoms.clear(e)}if(0==this.modelSet.getAtomCount()||!this.viewer.getShowNavigationPoint())return null;a=2147483647;b=-2147483648;g=2147483647;h=-2147483648;for(e=this.bsRenderableAtoms.nextSetBit(0);0<=e;e=this.bsRenderableAtoms.nextSetBit(e+1))f=c[e],f.sX<a&&(a=f.sX),f.sX>b&&(b=f.sX),f.sY<g&&(g=f.sY),f.sY>h&&(h=f.sY);this.navigationCrossHairMinMax[0]=a;this.navigationCrossHairMinMax[1]=b;this.navigationCrossHairMinMax[2]=g;this.navigationCrossHairMinMax[3]=h;return this.navigationCrossHairMinMax});
b(c$,"setModelSet",function(a){this.modelSet=this.viewer.modelSet=a},"J.modelset.ModelSet");b(c$,"checkInheritedShapes",function(){null!=this.shapes[24]&&this.setShapePropertyBs(24,"remapInherited",null,null)});b(c$,"restrictSelected",function(a,c){var b=J.util.BSUtil.copy(this.viewer.getSelectionSet(!0));if(c){this.viewer.invertSelection();var e=this.viewer.getSelectionSubset();null!=e&&(b=J.util.BSUtil.copy(this.viewer.getSelectionSet(!0)),b.and(e),this.viewer.select(b,!1,0,!0),J.util.BSUtil.invertInPlace(b,
this.viewer.getAtomCount()),b.and(e))}J.util.BSUtil.andNot(b,this.viewer.getDeletedAtoms());e=this.viewer.getBoolean(603979812);a||this.viewer.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 f=this.viewer.getSelectionSet(!1),g=21;0<=--g;)6!=g&&null!=this.getShape(g)&&this.setShapeSizeBs(g,0,null,f);null!=this.getShape(21)&&
this.setShapePropertyBs(21,"delete",f,null);this.setLabel(null,f);a||this.viewer.setBooleanProperty("bondModeOr",e);this.viewer.select(b,!1,0,!0)},"~B,~B");B(c$,"hoverable",[30,25,24,22,35]);c$.clickableMax=c$.prototype.clickableMax=J.viewer.ShapeManager.hoverable.length-1});p("J.viewer");q(["java.util.Hashtable"],"J.viewer.StateManager","java.util.Arrays JU.BS $.SB J.modelset.Orientation J.util.BSUtil J.viewer.GlobalSettings".split(" "),function(){c$=u(function(){this.saved=this.viewer=null;this.lastCoordinates=
this.lastShape=this.lastState=this.lastSelected=this.lastScene=this.lastConnections=this.lastOrientation="";la("J.viewer.StateManager.Scene")||J.viewer.StateManager.$StateManager$Scene$();la("J.viewer.StateManager.Connections")||J.viewer.StateManager.$StateManager$Connections$();la("J.viewer.StateManager.Connection")||J.viewer.StateManager.$StateManager$Connection$();t(this,arguments)},J.viewer,"StateManager");N(c$,function(){this.saved=new java.util.Hashtable});c$.getVariableList=b(c$,"getVariableList",
function(a,c,b,e){var f=new JU.SB,g=0,h=Array(a.size()),l;for(a=a.entrySet().iterator();a.hasNext()&&((l=a.next())||1);){var j=l.getKey(),k=l.getValue();if((b||!j.startsWith("site_"))&&(!e||"@"==j.charAt(0)))h[g++]=j+("@"==j.charAt(0)?" "+k.asString():" = "+J.viewer.StateManager.varClip(j,k.escape(),c))}java.util.Arrays.sort(h,0,g);for(c=0;c<g;c++)null!=h[c]&&f.append("  ").append(h[c]).append(";\n");0==g&&!e&&f.append("# --no global user variables defined--;\n");return f.toString()},"java.util.Map,~N,~B,~B");
c$.getObjectIdFromName=b(c$,"getObjectIdFromName",function(a){if(null==a)return-1;a="background axis1      axis2      axis3      boundbox   unitcell   frank      ".indexOf(a.toLowerCase());return 0>a?a:m(a/11)},"~S");c$.getObjectNameFromId=b(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");w(c$,function(a){this.viewer=a},"J.viewer.Viewer");b(c$,"getGlobalSettings",function(a,
c){this.saved.clear();return new J.viewer.GlobalSettings(this.viewer,a,c)},"J.viewer.GlobalSettings,~B");b(c$,"clear",function(a){this.viewer.setShowAxes(!1);this.viewer.setShowBbcage(!1);this.viewer.setShowUnitCell(!1);a.clear()},"J.viewer.GlobalSettings");b(c$,"setCrystallographicDefaults",function(){this.viewer.setAxesModeUnitCell(!0);this.viewer.setShowAxes(!0);this.viewer.setShowUnitCell(!0);this.viewer.setBooleanProperty("perspectiveDepth",!1)});b(c$,"setCommonDefaults",function(){this.viewer.setBooleanProperty("perspectiveDepth",
!0);this.viewer.setFloatProperty("bondTolerance",0.45);this.viewer.setFloatProperty("minBondDistance",0.4);this.viewer.setBooleanProperty("translucent",!0)});b(c$,"setJmolDefaults",function(){this.setCommonDefaults();this.viewer.setStringProperty("ColorScheme","Jmol");this.viewer.setBooleanProperty("axesOrientationRasmol",!1);this.viewer.setBooleanProperty("zeroBasedXyzRasmol",!1);this.viewer.setIntProperty("percentVdwAtom",23);this.viewer.setIntProperty("bondRadiusMilliAngstroms",150);this.viewer.setVdwStr("auto")});
b(c$,"setRasMolDefaults",function(){this.setCommonDefaults();this.viewer.setStringProperty("defaultColorScheme","RasMol");this.viewer.setBooleanProperty("axesOrientationRasmol",!0);this.viewer.setBooleanProperty("zeroBasedXyzRasmol",!0);this.viewer.setIntProperty("percentVdwAtom",0);this.viewer.setIntProperty("bondRadiusMilliAngstroms",1);this.viewer.setVdwStr("Rasmol")});b(c$,"setPyMOLDefaults",function(){this.setCommonDefaults();this.viewer.setStringProperty("measurementUnits","ANGSTROMS");this.viewer.setBooleanProperty("zoomHeight",
!0)});c$.getNoCase=b(c$,"getNoCase",function(a,c){for(var b,e=a.entrySet().iterator();e.hasNext()&&((b=e.next())||1);)if(b.getKey().equalsIgnoreCase(c))return b.getValue();return null},"java.util.Map,~S");b(c$,"listSavedStates",function(){for(var a="",c,b=this.saved.keySet().iterator();b.hasNext()&&((c=b.next())||1);)a+="\n"+c;return a});b(c$,"deleteSavedType",function(a){for(var c=this.saved.keySet().iterator();c.hasNext();)c.next().startsWith(a)&&c.remove()},"~S");b(c$,"deleteSaved",function(a){this.saved.remove(a)},
"~S");b(c$,"saveSelection",function(a,c){a.equalsIgnoreCase("DELETE")?this.deleteSavedType("Selected_"):(a=this.lastSelected="Selected_"+a,this.saved.put(a,J.util.BSUtil.copy(c)))},"~S,JU.BS");b(c$,"restoreSelection",function(a){a=J.viewer.StateManager.getNoCase(this.saved,0<a.length?"Selected_"+a:this.lastSelected);if(null==a)return this.viewer.select(new JU.BS,!1,0,!1),!1;this.viewer.select(a,!1,0,!1);return!0},"~S");b(c$,"saveState",function(a){a.equalsIgnoreCase("DELETE")?this.deleteSavedType("State_"):
(a=this.lastState="State_"+a,this.saved.put(a,this.viewer.getStateInfo()))},"~S");b(c$,"getSavedState",function(a){a=J.viewer.StateManager.getNoCase(this.saved,0<a.length?"State_"+a:this.lastState);return null==a?"":a},"~S");b(c$,"saveStructure",function(a){a.equalsIgnoreCase("DELETE")?this.deleteSavedType("Shape_"):(a=this.lastShape="Shape_"+a,this.saved.put(a,this.viewer.getStructureState()))},"~S");b(c$,"getSavedStructure",function(a){a=J.viewer.StateManager.getNoCase(this.saved,0<a.length?"Shape_"+
a:this.lastShape);return null==a?"":a},"~S");b(c$,"saveCoordinates",function(a,c){a.equalsIgnoreCase("DELETE")?this.deleteSavedType("Coordinates_"):(a=this.lastCoordinates="Coordinates_"+a,this.saved.put(a,this.viewer.getCoordinateState(c)))},"~S,JU.BS");b(c$,"getSavedCoordinates",function(a){a=J.viewer.StateManager.getNoCase(this.saved,0<a.length?"Coordinates_"+a:this.lastCoordinates);return null==a?"":a},"~S");b(c$,"getOrientation",function(){return new J.modelset.Orientation(this.viewer,!1,null)});
b(c$,"getSavedOrientationText",function(a){var c;if(null!=a)return c=this.getOrientationFor(a),null==c?"":c.getMoveToText(!0);a=new JU.SB;for(var b=this.saved.entrySet().iterator();b.hasNext()&&((c=b.next())||1);)c.getKey().startsWith("Orientation_")&&a.append(c.getValue().getMoveToText(!0));return a.toString()},"~S");b(c$,"saveScene",function(a,c){if(a.equalsIgnoreCase("DELETE"))this.deleteSavedType("Scene_");else{var b=ka(J.viewer.StateManager.Scene,this,null,c);b.saveName=this.lastScene="Scene_"+
a;this.saved.put(b.saveName,b)}},"~S,java.util.Map");b(c$,"restoreScene",function(a,c){var b=this.getSceneFor(a);return null!=b&&b.restore(c)},"~S,~N");b(c$,"getSceneFor",function(a){return J.viewer.StateManager.getNoCase(this.saved,0<a.length?"Scene_"+a:this.lastScene)},"~S");b(c$,"saveOrientation",function(a,c){if(a.equalsIgnoreCase("DELETE"))this.deleteSavedType("Orientation_");else{var b=new J.modelset.Orientation(this.viewer,a.equalsIgnoreCase("default"),c);b.saveName=this.lastOrientation="Orientation_"+
a;this.saved.put(b.saveName,b)}},"~S,~A");b(c$,"restoreOrientation",function(a,c,b){a=this.getOrientationFor(a);return null!=a&&a.restore(c,b)},"~S,~N,~B");b(c$,"getOrientationFor",function(a){return J.viewer.StateManager.getNoCase(this.saved,0<a.length?"Orientation_"+a:this.lastOrientation)},"~S");b(c$,"saveBonds",function(a){if(a.equalsIgnoreCase("DELETE"))this.deleteSavedType("Bonds_");else{var c=ka(J.viewer.StateManager.Connections,this,null);c.saveName=this.lastConnections="Bonds_"+a;this.saved.put(c.saveName,
c)}},"~S");b(c$,"restoreBonds",function(a){a=J.viewer.StateManager.getNoCase(this.saved,0<a.length?"Bonds_"+a:this.lastConnections);return null!=a&&a.restore()},"~S");c$.varClip=b(c$,"varClip",function(a,c,b){0<b&&c.length>b&&(c=c.substring(0,b)+" #...more ("+c.length+" bytes -- use SHOW "+a+" or MESSAGE @"+a+" to view)");return c},"~S,~S,~N");c$.$StateManager$Scene$=function(){aa();c$=u(function(){ma(this,arguments);this.scene=this.saveName=null;t(this,arguments)},J.viewer.StateManager,"Scene");
w(c$,function(a){this.scene=a},"java.util.Map");b(c$,"restore",function(a){var c=this.scene.get("generator");null!=c&&c.generateScene(this.scene);c=this.scene.get("pymolView");return null!=c&&this.b$["J.viewer.StateManager"].viewer.movePyMOL(this.b$["J.viewer.StateManager"].viewer.eval,a,c)},"~N");c$=$()};c$.$StateManager$Connections$=function(){aa();c$=u(function(){ma(this,arguments);this.saveName=null;this.bondCount=0;this.connections=null;t(this,arguments)},J.viewer.StateManager,"Connections");
w(c$,function(){var a=this.b$["J.viewer.StateManager"].viewer.getModelSet();if(null!=a){this.bondCount=a.bondCount;this.connections=Array(this.bondCount+1);for(var a=a.bonds,c=this.bondCount;0<=--c;){var b=a[c];this.connections[c]=ka(J.viewer.StateManager.Connection,this,null,b.getAtomIndex1(),b.getAtomIndex2(),b.mad,b.colix,b.order,b.getEnergy(),b.getShapeVisibilityFlags())}}});b(c$,"restore",function(){var a=this.b$["J.viewer.StateManager"].viewer.getModelSet();if(null==a)return!1;a.deleteAllBonds();
for(var c=this.bondCount;0<=--c;){var b=this.connections[c],e=a.getAtomCount();b.atomIndex1>=e||b.atomIndex2>=e||(e=a.bondAtoms(a.atoms[b.atomIndex1],a.atoms[b.atomIndex2],b.order,b.mad,null,b.energy,!1,!0),e.setColix(b.colix),e.setShapeVisibilityFlags(b.shapeVisibilityFlags))}for(b=this.bondCount;0<=--b;)a.getBondAt(b).setIndex(b);this.b$["J.viewer.StateManager"].viewer.setShapeProperty(1,"reportAll",null);return!0});c$=$()};c$.$StateManager$Connection$=function(){aa();c$=u(function(){ma(this,arguments);
this.shapeVisibilityFlags=this.energy=this.order=this.colix=this.mad=this.atomIndex2=this.atomIndex1=0;t(this,arguments)},J.viewer.StateManager,"Connection");w(c$,function(a,c,b,e,f,g,h){this.atomIndex1=a;this.atomIndex2=c;this.mad=b;this.colix=e;this.order=f;this.energy=g;this.shapeVisibilityFlags=h},"~N,~N,~N,~N,~N,~N,~N");c$=$()};B(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      ")});
p("J.viewer");q(["java.util.Hashtable"],"J.viewer.StatusManager","java.lang.Boolean $.Float javajs.awt.Dimension JU.List $.PT J.api.Interface J.constant.EnumCallback J.util.Logger".split(" "),function(){c$=u(function(){this.jmolCallbackListener=this.jmolStatusListener=this.viewer=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;t(this,arguments)},J.viewer,"StatusManager");N(c$,function(){this.messageQueue=new java.util.Hashtable;this.jmolScriptCallbacks=new java.util.Hashtable});w(c$,function(a){this.viewer=a},"J.viewer.Viewer");b(c$,"setAllowStatusReporting",function(a){this.allowStatusReporting=a},"~B");b(c$,"getStatusList",function(){return this.statusList});b(c$,"getMessageQueue",function(){return this.messageQueue});b(c$,"recordStatus",function(a){return this.allowStatusReporting&&
0<this.statusList.length&&(this.statusList.equals("all")||0<=this.statusList.indexOf(a))},"~S");b(c$,"setStatusChanged",function(a,c,b,e){if(this.recordStatus(a)){var f=new JU.List;f.addLast(Integer.$valueOf(++this.statusPtr));f.addLast(a);f.addLast(Integer.$valueOf(c));f.addLast(b);c=e?null:this.messageQueue.get(a);null==c?this.messageQueue.put(a,c=new JU.List):c.size()==J.viewer.StatusManager.MAXIMUM_QUEUE_LENGTH&&c.remove(0);c.addLast(f)}},"~S,~N,~O,~B");b(c$,"getStatusChanged",function(a){var c=
0<a.length&&"-"==a.charAt(0),b=0<a.length&&"+"==a.charAt(0),e=!1;c?this.statusList=JU.PT.simpleReplace(this.statusList,a.substring(1,a.length),""):(a=JU.PT.simpleReplace(a,"+",""),this.statusList.equals(a)||b&&0<=this.statusList.indexOf(a)?e=!0:(b||(this.statusList=""),this.statusList+=a,J.util.Logger.debugging&&J.util.Logger.debug("StatusManager messageQueue = "+this.statusList)));a=new JU.List;if(e)for(var f,e=this.messageQueue.entrySet().iterator();e.hasNext()&&((f=e.next())||1);)a.addLast(f.getValue());
this.messageQueue.clear();this.statusPtr=0;return a},"~S");b(c$,"setJmolStatusListener",function(a,c){this.jmolStatusListener=a;this.jmolCallbackListener=null==c?a:c},"J.api.JmolStatusListener,J.api.JmolCallbackListener");b(c$,"setJmolCallbackListener",function(a){this.jmolCallbackListener=a},"J.api.JmolCallbackListener");b(c$,"jmolScriptCallback",function(a){a=this.jmolScriptCallbacks.get(a);null!=a&&this.viewer.evalStringQuietSync(a,!0,!1);return a},"J.constant.EnumCallback");b(c$,"setCallbackFunction",
function(a,c){var b=J.constant.EnumCallback.getCallback(a);if(null!=b){var e=null==c?0:7<c.length&&0==c.toLowerCase().indexOf("script:")?7:11<c.length&&0==c.toLowerCase().indexOf("jmolscript:")?11:0;0==e?this.jmolScriptCallbacks.remove(b):this.jmolScriptCallbacks.put(b,c.substring(e).trim())}null!=this.jmolCallbackListener&&this.jmolCallbackListener.setCallbackFunction(a,c)},"~S,~S");b(c$,"notifyEnabled",function(a){return null!=this.jmolCallbackListener&&this.jmolCallbackListener.notifyEnabled(a)},
"J.constant.EnumCallback");b(c$,"setStatusAppletReady",function(a,c){var b=c?this.jmolScriptCallback(J.constant.EnumCallback.APPLETREADY):null;this.notifyEnabled(J.constant.EnumCallback.APPLETREADY)&&this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.APPLETREADY,[b,a,Boolean.$valueOf(c),null])},"~S,~B");b(c$,"setStatusAtomMoved",function(a){var c=this.jmolScriptCallback(J.constant.EnumCallback.ATOMMOVED);this.setStatusChanged("atomMoved",-1,a,!1);this.notifyEnabled(J.constant.EnumCallback.ATOMMOVED)&&
this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.ATOMMOVED,[c,a])},"JU.BS");b(c$,"setStatusAtomPicked",function(a,c){var b=this.jmolScriptCallback(J.constant.EnumCallback.PICK);J.util.Logger.info("setStatusAtomPicked("+a+","+c+")");this.setStatusChanged("atomPicked",a,c,!1);this.notifyEnabled(J.constant.EnumCallback.PICK)&&this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.PICK,[b,c,Integer.$valueOf(a)])},"~N,~S");b(c$,"setStatusClicked",function(a,c,b,e,f){var g=this.jmolScriptCallback(J.constant.EnumCallback.CLICK);
if(!this.notifyEnabled(J.constant.EnumCallback.CLICK))return b;f=[b,f];this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.CLICK,[g,Integer.$valueOf(a),Integer.$valueOf(c),Integer.$valueOf(b),Integer.$valueOf(e),f]);return f[0]},"~N,~N,~N,~N,~N");b(c$,"setStatusResized",function(a,c){var b=this.jmolScriptCallback(J.constant.EnumCallback.RESIZE);this.notifyEnabled(J.constant.EnumCallback.RESIZE)&&this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.RESIZE,[b,Integer.$valueOf(a),
Integer.$valueOf(c)])},"~N,~N");b(c$,"setStatusAtomHovered",function(a,c){var b=this.jmolScriptCallback(J.constant.EnumCallback.HOVER);this.notifyEnabled(J.constant.EnumCallback.HOVER)&&this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.HOVER,[b,c,Integer.$valueOf(a)])},"~N,~S");b(c$,"setStatusObjectHovered",function(a,c,b){var e=this.jmolScriptCallback(J.constant.EnumCallback.HOVER);this.notifyEnabled(J.constant.EnumCallback.HOVER)&&this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.HOVER,
[e,c,Integer.$valueOf(-1),a,Float.$valueOf(b.x),Float.$valueOf(b.y),Float.$valueOf(b.z)])},"~S,~S,JU.P3");b(c$,"setFileLoadStatus",function(a,c,b,e,f,g,h){null==a&&"resetUndo".equals(c)&&(c=this.viewer.getProperty("DATA_API","getAppConsole",null),null!=c&&c.zap(),c=this.viewer.getZapName());this.setStatusChanged("fileLoaded",f,a,!1);null!=e&&this.setStatusChanged("fileLoadError",f,e,!1);var l=this.jmolScriptCallback(J.constant.EnumCallback.LOADSTRUCT);g&&this.notifyEnabled(J.constant.EnumCallback.LOADSTRUCT)&&
(g=this.viewer.getParameter("_smilesString"),0!=g.length&&(c=g),this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.LOADSTRUCT,[l,a,c,b,e,Integer.$valueOf(f),this.viewer.getParameter("_modelNumber"),this.viewer.getModelNumberDotted(this.viewer.getModelCount()-1),h]))},"~S,~S,~S,~S,~N,~B,Boolean");b(c$,"setStatusFrameChanged",function(a,c,b,e,f,g,h){if(null!=this.viewer.getModelSet()){var l=this.viewer.isAnimationOn();this.setStatusChanged("frameChanged",a,0<=a?this.viewer.getModelNumberDotted(a):
"",!1);var j=this.jmolScriptCallback(J.constant.EnumCallback.ANIMFRAME);l&&(a=-2-a);this.notifyEnabled(J.constant.EnumCallback.ANIMFRAME)&&this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.ANIMFRAME,[j,[a,c,b,e,f,g],h]);null!=this.viewer.jmolpopup&&!l&&this.viewer.jmolpopup.jpiUpdateComputedMenus()}},"~N,~N,~N,~N,~N,~N,~S");b(c$,"setScriptEcho",function(a,c){if(null!=a){this.setStatusChanged("scriptEcho",0,a,!1);var b=this.jmolScriptCallback(J.constant.EnumCallback.ECHO);this.notifyEnabled(J.constant.EnumCallback.ECHO)&&
this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.ECHO,[b,a,Integer.$valueOf(c?1:0)])}},"~S,~B");b(c$,"setStatusMeasuring",function(a,c,b,e){this.setStatusChanged(a,c,b,!1);var f=null;a.equals("measureCompleted")?(J.util.Logger.info("measurement["+c+"] = "+b),f=this.jmolScriptCallback(J.constant.EnumCallback.MEASURE)):a.equals("measurePicked")&&(this.setStatusChanged("measurePicked",c,b,!1),J.util.Logger.info("measurePicked "+c+" "+b));this.notifyEnabled(J.constant.EnumCallback.MEASURE)&&
this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.MEASURE,[f,b,Integer.$valueOf(c),a,Float.$valueOf(e)])},"~S,~N,~S,~N");b(c$,"notifyError",function(a,c,b){var e=this.jmolScriptCallback(J.constant.EnumCallback.ERROR);this.notifyEnabled(J.constant.EnumCallback.ERROR)&&this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.ERROR,[e,a,c,this.viewer.getShapeErrorState(),b])},"~S,~S,~S");b(c$,"notifyMinimizationStatus",function(a,c,b,e,f){var g=this.jmolScriptCallback(J.constant.EnumCallback.MINIMIZATION);
this.notifyEnabled(J.constant.EnumCallback.MINIMIZATION)&&this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.MINIMIZATION,[g,a,c,b,e,f])},"~S,Integer,Float,Float,~S");b(c$,"setScriptStatus",function(a,c,b,e){if(-1>b){var f=-2-b;this.setStatusChanged("scriptStarted",f,c,!1);a="script "+f+" started"}else if(null==a)return;var f=0==b?this.jmolScriptCallback(J.constant.EnumCallback.SCRIPT):null,g="Script completed"===a;if(this.recordStatus("script")){var h=null!=e;this.setStatusChanged(h?
"scriptError":"scriptStatus",0,a,!1);if(h||g)this.setStatusChanged("scriptTerminated",1,"Jmol script terminated"+(h?" unsuccessfully: "+a:" successfully"),!1)}g&&(this.viewer.getBoolean(603979880)&&this.viewer.getBoolean(603979824))&&(a=[null,"script <exiting>",c,Integer.$valueOf(-1),e],this.notifyEnabled(J.constant.EnumCallback.SCRIPT)&&this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.SCRIPT,a),this.processScript(a),a="Jmol script completed.");a=[f,a,c,Integer.$valueOf(g?-1:b),e];
this.notifyEnabled(J.constant.EnumCallback.SCRIPT)&&this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.SCRIPT,a);this.processScript(a)},"~S,~S,~N,~S");b(c$,"processScript",function(a){var c=a[3].intValue();null!=this.viewer.scriptEditor&&(0<c?this.viewer.scriptEditor.notifyScriptTermination():0>c?-2==c&&this.viewer.scriptEditor.notifyScriptStart():this.viewer.scriptEditor.isVisible()&&0<a[2].length&&this.viewer.scriptEditor.notifyContext(this.viewer.getScriptContext("SE notify"),a));
null!=this.viewer.appConsole&&0==c&&this.viewer.appConsole.sendConsoleMessage(null==a[1]?null:a[1].toString())},"~A");b(c$,"doSync",function(){return this.isSynced&&this.drivingSync&&!this.syncDisabled});b(c$,"setSync",function(a){this.syncingMouse?null!=a&&this.syncSend(a,"*",0):this.syncingScripts||this.syncSend("!"+this.viewer.getMoveToText(this.minSyncRepeatMs/1E3),"*",0)},"~S");b(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}J.util.Logger.debugging&&J.util.Logger.debug(this.viewer.getHtmlName()+" sync mode="+a+"; synced? "+this.isSynced+"; driving? "+this.drivingSync+"; disabled? "+this.syncDisabled)},"~N");b(c$,"syncSend",
function(a,c,b){(0!=b||this.notifyEnabled(J.constant.EnumCallback.SYNC))&&this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.SYNC,[null,a,c,Integer.$valueOf(b)])},"~S,~S,~N");b(c$,"modifySend",function(a,c,b){this.notifyEnabled(J.constant.EnumCallback.STRUCTUREMODIFIED)&&this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.STRUCTUREMODIFIED,[null,Integer.$valueOf(b),Integer.$valueOf(a),Integer.$valueOf(c)])},"~N,~N,~N");b(c$,"getSyncMode",function(){return!this.isSynced?
0:this.drivingSync?1:2});b(c$,"showUrl",function(a){null!=this.jmolStatusListener&&this.jmolStatusListener.showUrl(a)},"~S");b(c$,"clearConsole",function(){null!=this.viewer.appConsole&&this.viewer.appConsole.sendConsoleMessage(null);null!=this.jmolStatusListener&&this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.MESSAGE,null)});b(c$,"functionXY",function(a,c,b){return null==this.jmolStatusListener?M(Math.abs(c),Math.abs(b),0):this.jmolStatusListener.functionXY(a,c,b)},"~S,~N,~N");
b(c$,"functionXYZ",function(a,c,b,e){return null==this.jmolStatusListener?M(Math.abs(c),Math.abs(b),Math.abs(b),0):this.jmolStatusListener.functionXYZ(a,c,b,e)},"~S,~N,~N,~N");b(c$,"jsEval",function(a){return null==this.jmolStatusListener?"":this.jmolStatusListener.eval(a)},"~S");b(c$,"createImage",function(a,c,b,e,f){return null==this.jmolStatusListener?null:this.jmolStatusListener.createImage(a,c,null==b?e:b,f)},"~S,~S,~S,~A,~N");b(c$,"getRegistryInfo",function(){return null==this.jmolStatusListener?
null:this.jmolStatusListener.getRegistryInfo()});b(c$,"dialogAsk",function(a,c){var b=a.equals("Save Image"),e=J.api.Interface.getOptionInterface("dialog.Dialog");if(null==e)return null;e.setupUI(!1);b&&e.setImageInfo(this.qualityJPG,this.qualityPNG,this.imageType);var f=e.getFileNameFromDialog(this.viewer,a,c);b&&null!=f&&(this.qualityJPG=e.getQuality("JPG"),this.qualityPNG=e.getQuality("PNG"),b=e.getType(),null!=b&&(this.imageType=b));return f},"~S,~S");b(c$,"getJspecViewProperties",function(a){return null==
this.jmolStatusListener?null:this.jmolStatusListener.getJSpecViewProperty(null==a||0==a.length?"":":"+a)},"~S");b(c$,"resizeInnerPanel",function(a,c){return null==this.jmolStatusListener?new javajs.awt.Dimension(a,c):this.jmolStatusListener.resizeInnerPanel("preferredWidthHeight "+a+" "+c+";")},"~N,~N");B(c$,"MAXIMUM_QUEUE_LENGTH",16,"SYNC_OFF",0,"SYNC_DRIVER",1,"SYNC_SLAVE",2,"SYNC_DISABLE",3,"SYNC_ENABLE",4,"SYNC_STEREO",5)});p("J.viewer");q("JU.A4 $.M3 $.M4 $.P3 $.P3i $.V3 J.constant.EnumStereoMode J.util.Point3fi".split(" "),
"J.viewer.TransformManager","java.lang.Boolean $.Float java.util.Hashtable JU.P4 $.SB J.api.Interface J.util.Escape $.Logger $.Quaternion".split(" "),function(){c$=u(function(){this.viewer=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.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=this.arcBall0Rotation=this.arcBallAxis=this.arcBall1=this.arcBall0=null;this.yTranslationFraction=this.xTranslationFraction=0.5;this.previousY=this.previousX=this.prevZoomSetting=0;this.zoomEnabled=!0;this.zoomPercentSetting=this.zoomPercent=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.motion=this.matrixTest=this.aaTest1=this.ptTest3=this.ptTest2=this.ptTest1=this.untransformedPoint=this.pointTsp=null;this.navOn=this.spinOn=!1;this.spinThread=null;this.vibrationOn=this.spinIsGesture=!1;this.vibrationScale=this.vibrationPeriodMs=
this.vibrationPeriod=0;this.stereoColors=this.stereoMode=this.vibrationThread=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;t(this,arguments)},J.viewer,"TransformManager");N(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.arcBall0=new JU.V3;this.arcBall1=new JU.V3;this.arcBallAxis=new JU.V3;this.arcBall0Rotation=new JU.M3;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 J.util.Point3fi;this.pointTsp=new JU.P3;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.constant.EnumStereoMode.NONE;this.matrixStereo=new JU.M3;this.frameOffset=new JU.P3;this.ptOffset=new JU.P3});w(c$,function(a,c,b){this.setViewer(a,c,b)},"J.viewer.Viewer,~N,~N");b(c$,"setViewer",function(a,c,b){this.viewer=a;this.setScreenParameters(c,b,!0,!1,!0,!0)},"J.viewer.Viewer,~N,~N");b(c$,"homePosition",function(a){a&&this.setSpinOff();this.setNavOn(!1);this.navFps=
10;this.navX=this.navY=this.navZ=0;this.rotationCenterDefault.setT(this.viewer.getBoundBoxCenter());this.setFixedRotationCenter(this.rotationCenterDefault);this.rotationRadiusDefault=this.setRotationRadius(0,!0);this.windowCentered=!0;this.setRotationCenterAndRadiusXYZ(null,!0);this.matrixRotate.setIdentity();a=this.viewer.getModelSetAuxiliaryInfoValue("defaultOrientationMatrix");null!=a&&this.matrixRotate.setM(a);this.setZoomEnabled(!0);this.zoomToPercent(this.viewer.global.modelKitMode?50:100);
this.zoomPercent=this.zoomPercentSetting;this.slabReset();this.resetFitToScreen(!0);this.viewer.isJmolDataFrame()?this.fixedRotationCenter.set(0,0,0):this.viewer.global.axesOrientationRasmol&&this.rotateX(3.141592653589793);this.viewer.saveOrientation("default",null);1==this.mode&&this.setNavigationMode(!0)},"~B");b(c$,"clear",function(){this.clearVibration();this.clearSpin();this.stopMotion();this.fixedRotationCenter.set(0,0,0);this.navigating=!1;this.zSlabPoint=this.depthPlane=this.slabPlane=null;
this.resetNavigationPoint(!0)});b(c$,"setFixedRotationCenter",function(a){null!=a&&this.fixedRotationCenter.setT(a)},"JU.P3");b(c$,"setRotationPointXY",function(a){a=this.transformPoint(a);this.fixedTranslation.set(a.x,a.y,0)},"JU.P3");b(c$,"spinXYBy",function(a,c,b){if(0==a&&0==c)null!=this.spinThread&&this.spinIsGesture&&this.clearSpin();else{this.clearSpin();var e=JU.P3.newP(this.fixedRotationCenter),f=new JU.P3;this.transformPoint2(e,f);a=JU.P3.new3(-c,a,0);a.add(f);this.unTransformPoint(a,a);
this.viewer.setInMotion(!1);this.rotateAboutPointsInternal(null,a,e,10*b,NaN,!1,!0,null,!0,null,null,null)}},"~N,~N,~N");b(c$,"rotateArcBall",function(a,c,b){var e=(this.screenPixelCount>>2)*this.screenPixelCount;a-=this.fixedTranslation.x;c-=this.fixedTranslation.y;e=e-a*a-c*c;e=(0>e?-1:1)*Math.sqrt(Math.abs(e));0==b?(this.arcBall0Rotation.setM(this.matrixRotate),this.arcBall0.set(a,-c,e),Float.isNaN(e)||this.arcBall0.normalize()):!Float.isNaN(this.arcBall0.z)&&!Float.isNaN(e)&&(this.arcBall1.set(a,
-c,e),this.arcBall1.normalize(),this.arcBallAxis.cross(this.arcBall0,this.arcBall1),this.axisangleT.setVA(this.arcBallAxis,b*Math.acos(this.arcBall0.dot(this.arcBall1))),this.matrixRotate.setM(this.arcBall0Rotation),this.rotateAxisAngle2(this.axisangleT,null))},"~N,~N,~N");b(c$,"rotateXYBy",function(a,c,b){this.rotateXRadians(0.017453292*c,b);this.rotateYRadians(0.017453292*a,b)},"~N,~N,JU.BS");b(c$,"rotateZBy",function(a,c,b){2147483647!=c&&2147483647!=b&&this.resetXYCenter(c,b);this.rotateZRadians(a/
57.29577951308232)},"~N,~N,~N");b(c$,"rotateFront",function(){this.matrixRotate.setIdentity()});b(c$,"rotateX",function(a){this.matrixRotate.rotX(a)},"~N");b(c$,"rotateY",function(a){this.matrixRotate.rotY(a)},"~N");b(c$,"rotateZ",function(a){this.matrixRotate.rotZ(a)},"~N");b(c$,"applyRotation",function(a,c,b,e,f){null==b?this.matrixRotate.mul2(a,this.matrixRotate):(this.viewer.moveAtoms(a,this.matrixRotate,e,this.internalRotationCenter,c,b,f),null!=e&&this.internalRotationCenter.add(e))},"JU.M3,~B,JU.BS,JU.V3,~B");
b(c$,"rotateXRadians",function(a,c){this.matrixTemp3.rotX(a);this.applyRotation(this.matrixTemp3,!1,c,null,!1)},"~N,JU.BS");b(c$,"rotateYRadians",function(a,c){this.matrixTemp3.rotY(a);this.applyRotation(this.matrixTemp3,!1,c,null,!1)},"~N,JU.BS");b(c$,"rotateZRadians",function(a){this.matrixTemp3.rotZ(a);this.applyRotation(this.matrixTemp3,!1,null,null,!1)},"~N");b(c$,"rotateAxisAngle",function(a,c){this.axisangleT.setVA(a,c);this.rotateAxisAngle2(this.axisangleT,null)},"JU.V3,~N");b(c$,"rotateAxisAngle2",
function(a,c){this.matrixTemp3.setAA(a);this.applyRotation(this.matrixTemp3,!1,c,null,!1)},"JU.A4,JU.BS");b(c$,"rotateAxisAngleAtCenter",function(a,c,b,e,f,g,h){null!=c&&this.moveRotationCenter(c,!0);this.setSpinOff();this.setNavOn(!1);if(this.viewer.isHeadless()){if(g&&3.4028235E38==f)return!1;g=!1}if(Float.isNaN(e)||0==e||0==f)return!1;null!=c&&this.setRotationPointXY(c);this.setFixedRotationCenter(c);this.rotationAxis.setT(b);this.rotationRate=e;if(g)return this.fixedRotationAxis.setVA(b,0.017453292*
e),this.isSpinInternal=!1,this.isSpinFixed=!0,this.isSpinSelected=null!=h,this.setSpin(a,!0,f,null,null,h,!1),!1;a=0.017453292*f;this.fixedRotationAxis.setVA(b,f);this.rotateAxisAngleRadiansFixed(a,h);return!0},"J.api.JmolScriptEvaluator,JU.P3,JU.V3,~N,~N,~B,JU.BS");b(c$,"rotateAxisAngleRadiansFixed",function(a,c){this.axisangleT.setAA(this.fixedRotationAxis);this.axisangleT.angle=a;this.rotateAxisAngle2(this.axisangleT,c)},"~N,JU.BS");b(c$,"rotateAboutPointsInternal",function(a,c,b,e,f,g,h,l,j,k,
p,r){this.setSpinOff();this.setNavOn(!1);if(this.viewer.isHeadless()){if(h&&3.4028235E38==f)return!1;h=!1}if(null==r&&(null==k||0.001>k.length())&&(!h||0==f||Float.isNaN(e)||0==e)&&(h||0==f))return!1;var q=null;null==r&&(q=JU.V3.newVsub(b,c),g&&q.scale(-1),this.internalRotationCenter.setT(c),this.rotationAxis.setT(q),this.internalTranslation=null==k?null:JU.V3.newV(k));c=null!=l;if(h)return null==r?(h=m(Math.abs(f)/Math.abs(e)*this.spinFps+0.5),Float.isNaN(f)?this.rotationRate=e:(this.rotationRate=
f/h*this.spinFps,null!=k&&this.internalTranslation.scale(1/h)),this.internalRotationAxis.setVA(q,0.017453292*(Float.isNaN(this.rotationRate)?0:this.rotationRate)),this.isSpinInternal=!0,this.isSpinFixed=!1,this.isSpinSelected=c):f=e,this.setSpin(a,!0,f,p,r,l,j),null!=r||null!=l;a=0.017453292*f;this.internalRotationAxis.setVA(q,a);this.rotateAxisAngleRadiansInternal(a,l);return!1},"J.api.JmolScriptEvaluator,JU.P3,JU.P3,~N,~N,~B,~B,JU.BS,~B,JU.V3,JU.List,~A");b(c$,"rotateAxisAngleRadiansInternal",function(a,
c){this.internalRotationAngle=a;this.vectorT.set(this.internalRotationAxis.x,this.internalRotationAxis.y,this.internalRotationAxis.z);this.matrixRotate.transform2(this.vectorT,this.vectorT2);this.axisangleT.setVA(this.vectorT2,a);this.matrixTemp3.setAA(this.axisangleT);this.applyRotation(this.matrixTemp3,!0,c,this.internalTranslation,1E6<a);null==c&&this.getNewFixedRotationCenter()},"~N,JU.BS");b(c$,"getNewFixedRotationCenter",function(){this.axisangleT.setAA(this.internalRotationAxis);this.axisangleT.angle=
-this.internalRotationAngle;this.matrixTemp4.setAA(this.axisangleT);this.vectorT.setT(this.internalRotationCenter);this.pointT2.sub2(this.fixedRotationCenter,this.vectorT);var a=new JU.P3;this.matrixTemp4.transform2(this.pointT2,a);a.add(this.vectorT);this.setRotationCenterAndRadiusXYZ(a,!1)});b(c$,"setTranslationFractions",function(){this.xTranslationFraction=this.fixedTranslation.x/this.width;this.yTranslationFraction=this.fixedTranslation.y/this.height});b(c$,"centerAt",function(a,c,b){null==b?
this.translateXYBy(a,c):(this.windowCentered&&this.viewer.setBooleanProperty("windowCentered",!1),this.fixedTranslation.x=a,this.fixedTranslation.y=c,this.setFixedRotationCenter(b))},"~N,~N,JU.P3");b(c$,"percentToPixels",function(a,c){switch(a){case "x":return m(Math.floor(c/100*this.width));case "y":return m(Math.floor(c/100*this.height));case "z":return m(Math.floor(c/100*this.screenPixelCount))}return 0},"~S,~N");b(c$,"angstromsToPixels",function(a){return m(Math.floor(this.scalePixelsPerAngstrom*
a))},"~N");b(c$,"translateXYBy",function(a,c){this.fixedTranslation.x+=a;this.fixedTranslation.y+=c;this.setTranslationFractions()},"~N,~N");b(c$,"setCamera",function(a,c){this.cameraSetting.set(a,c,0==a&&0==c?0:1)},"~N,~N");b(c$,"translateToPercent",function(a,c){switch(a){case "x":this.xTranslationFraction=0.5+c/100;this.fixedTranslation.x=this.width*this.xTranslationFraction;break;case "y":this.yTranslationFraction=0.5+c/100;this.fixedTranslation.y=this.height*this.yTranslationFraction;break;case "z":1==
this.mode&&this.setNavigationDepthPercent(c)}},"~S,~N");b(c$,"getTranslationXPercent",function(){return 0==this.width?0:100*(this.fixedTranslation.x-this.width/2)/this.width});b(c$,"getTranslationYPercent",function(){return 0==this.height?0:100*(this.fixedTranslation.y-this.height/2)/this.height});b(c$,"getTranslationZPercent",function(){return 0});b(c$,"getTranslationScript",function(){var a="",c=this.getTranslationXPercent();0!=c&&(a+="translate x "+c+";");c=this.getTranslationYPercent();0!=c&&
(a+="translate y "+c+";");return a});b(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,J.viewer.TransformManager.truncate2(a,this.getTranslationXPercent()),J.viewer.TransformManager.truncate2(a,this.getTranslationYPercent()),a.toString();default:return this.getMoveToText(1,!0)+"\n#OR\n"+this.getRotateZyzText(!0)}},"~N");b(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 c=new JU.A4;this.getAxisAngle(c);a.put("axisAngle",c);a.put("quaternion",J.util.Quaternion.newAA(c).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.zoomPercent));a.put("modelRadius",Float.$valueOf(this.modelRadius));1==this.mode&&(a.put("navigationCenter","navigate center "+J.util.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});b(c$,"getAxisAngle",function(a){a.setM(this.matrixRotate)},
"JU.A4");b(c$,"getTransformText",function(){return this.matrixRotate.toString()});b(c$,"getMatrixRotate",function(){return this.matrixRotate});b(c$,"setRotation",function(a){Float.isNaN(a.m00)||this.matrixRotate.setM(a)},"JU.M3");b(c$,"getRotation",function(a){a.setM(this.matrixRotate)},"JU.M3");b(c$,"zoomBy",function(a){20<a?a=20:-20>a&&(a=-20);var c=a*this.zoomPercentSetting/50;0==c&&(c=0<a?1:0>c?-1:0);this.zoomRatio=(c+this.zoomPercentSetting)/this.zoomPercentSetting;this.zoomPercentSetting+=c},
"~N");b(c$,"getZoomPercentFloat",function(){return this.zoomPercent});b(c$,"zoomToPercent",function(a){this.zoomPercentSetting=a;this.zoomRatio=0},"~N");b(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.zoomPercentSetting,this.zoomPercentSetting=a))},"~N");b(c$,"zoomByFactor0",function(a,c,b){!(0>=a)&&this.zoomEnabled&&(this.zoomRatio=a,
this.zoomPercentSetting*=a,this.resetXYCenter(c,b))},"~N,~N,~N");b(c$,"resetXYCenter",function(a,c){if(!(2147483647==a||2147483647==c)){this.windowCentered&&this.viewer.setBooleanProperty("windowCentered",!1);var b=new JU.P3;this.transformPoint2(this.fixedRotationCenter,b);b.set(a,c,b.z);this.unTransformPoint(b,b);this.fixedTranslation.set(a,c,0);this.setFixedRotationCenter(b)}},"~N,~N");b(c$,"zoomByPercent",function(a){var c=a*this.zoomPercentSetting/100;0==c&&(c=0>a?-1:1);this.zoomRatio=(c+this.zoomPercentSetting)/
this.zoomPercentSetting;this.zoomPercentSetting+=c},"~N");b(c$,"setScaleAngstromsPerInch",function(a){if(this.scale3D=0<a)this.scale3DAngstromsPerInch=a;this.perspectiveDepth=!this.scale3D},"~N");b(c$,"setZslabPoint",function(a){this.zSlabPoint=null==a?null:JU.P3.newP(a)},"JU.P3");b(c$,"getZShadeStart",function(){return this.zShadeEnabled?this.zDepthValue:0});b(c$,"setSlabRange",function(a){this.slabRange=a},"~N");b(c$,"setSlabEnabled",function(a){this.slabEnabled=a;this.viewer.global.setB("slabEnabled",
a)},"~B");b(c$,"setZShadeEnabled",function(a){this.zShadeEnabled=a;this.viewer.global.setB("zShade",a)},"~B");b(c$,"setZoomEnabled",function(a){this.zoomEnabled=a;this.viewer.global.setB("zoomEnabled",a)},"~B");b(c$,"slabReset",function(){this.slabToPercent(100);this.depthToPercent(0);this.slabPlane=this.depthPlane=null;this.setSlabEnabled(!1);this.setZShadeEnabled(!1)});b(c$,"getSlabPercentSetting",function(){return this.slabPercentSetting});b(c$,"slabByPercentagePoints",function(a){this.slabPlane=
null;this.slabPercentSetting+=a;this.slabDepthChanged();this.depthPercentSetting>=this.slabPercentSetting&&(this.depthPercentSetting=this.slabPercentSetting-1)},"~N");b(c$,"slabDepthChanged",function(){this.viewer.global.setI("slab",this.slabPercentSetting);this.viewer.global.setI("depth",this.depthPercentSetting)});b(c$,"depthByPercentagePoints",function(a){this.depthPlane=null;this.depthPercentSetting+=a;this.slabPercentSetting<=this.depthPercentSetting&&(this.slabPercentSetting=this.depthPercentSetting+
1);this.slabDepthChanged()},"~N");b(c$,"slabDepthByPercentagePoints",function(a){this.depthPlane=this.slabPlane=null;this.slabPercentSetting+=a;this.depthPercentSetting+=a;this.slabDepthChanged()},"~N");b(c$,"slabToPercent",function(a){this.viewer.setFloatProperty("slabRange",0);this.slabPercentSetting=a;this.slabPlane=null;this.depthPercentSetting>=this.slabPercentSetting&&(this.depthPercentSetting=this.slabPercentSetting-1);this.slabDepthChanged()},"~N");b(c$,"depthToPercent",function(a){this.viewer.global.setI("depth",
a);this.depthPercentSetting=a;this.slabPercentSetting<=this.depthPercentSetting&&(this.slabPercentSetting=this.depthPercentSetting+1);this.slabDepthChanged()},"~N");b(c$,"zSlabToPercent",function(a){this.zSlabPercentSetting=a;this.zDepthPercentSetting>this.zSlabPercentSetting&&(this.zDepthPercentSetting=a)},"~N");b(c$,"zDepthToPercent",function(a){this.zDepthPercentSetting=a;this.zDepthPercentSetting>this.zSlabPercentSetting&&(this.zSlabPercentSetting=a)},"~N");b(c$,"slabInternal",function(a,c){c?
(this.depthPlane=a,this.depthPercentSetting=0):(this.slabPlane=a,this.slabPercentSetting=100)},"JU.P4,~B");b(c$,"setSlabDepthInternal",function(a){this.finalizeTransformParameters();a?this.depthPlane=null:this.slabPlane=null;this.slabInternal(this.getSlabDepthPlane(a),a)},"~B");b(c$,"getSlabDepthPlane",function(a){if(a){if(null!=this.depthPlane)return this.depthPlane}else if(null!=this.slabPlane)return this.slabPlane;var c=this.matrixTransform;return JU.P4.new4(-c.m20,-c.m21,-c.m22,-c.m23+(a?this.depthValue:
this.slabValue))},"~B");b(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(m(this.screenWidth/2),m(this.screenHeight/2),this.referencePlaneOffset);this.unTransformPoint(a,a);var c=JU.P3.new3(m(this.screenWidth/2),m(this.screenHeight/2),0);this.viewer.unTransformPoint(c,c);c.sub(this.fixedRotationCenter);var b=JU.P3.new3(m(this.screenWidth/
2),m(this.screenHeight/2),this.cameraDistanceFromCenter*this.scalePixelsPerAngstrom);this.viewer.unTransformPoint(b,b);b.sub(this.fixedRotationCenter);c.add(b);return[a,c,this.fixedRotationCenter,JU.P3.new3(this.cameraDistanceFromCenter,this.aperatureAngle,this.scalePixelsPerAngstrom)]});b(c$,"getFrontPlane",function(){return z(this.cameraDistance)});b(c$,"setPerspectiveDepth",function(a){this.perspectiveDepth!=a&&(this.perspectiveDepth=a,this.viewer.global.setB("perspectiveDepth",a),this.resetFitToScreen(!1))},
"~B");b(c$,"getPerspectiveDepth",function(){return this.perspectiveDepth});b(c$,"setCameraDepthPercent",function(a,c){this.resetNavigationPoint(c);var b=0>a?-a/100:a;0!=b&&(this.cameraDepthSetting=b,this.viewer.global.setF("cameraDepth",this.cameraDepthSetting),1==this.mode&&(this.cameraDepth=NaN))},"~N,~B");b(c$,"getCameraDepth",function(){return this.cameraDepthSetting});b(c$,"setVisualRange",function(a){this.visualRange=a},"~N");b(c$,"getUnscaledTransformMatrix",function(){var a=JU.M4.newM(null);
this.vectorTemp.setT(this.fixedRotationCenter);this.matrixTemp.setZero();this.matrixTemp.setTranslation(this.vectorTemp);a.sub(this.matrixTemp);this.matrixTemp.setM3(this.matrixRotate);a.mul2(this.matrixTemp,a);return a});b(c$,"setScreenParameters0",function(a,c,b,e,f,g){2147483647!=a&&(this.screenWidth=a,this.screenHeight=c,this.useZoomLarge=b,this.width=(this.antialias=e)?2*a:a,this.height=e?2*c:c,this.scaleFitToScreen(!1,b,f,g))},"~N,~N,~B,~B,~B,~B");b(c$,"setAntialias",function(a){var c=this.antialias!=
a;this.width=(this.antialias=a)?2*this.screenWidth:this.screenWidth;this.height=this.antialias?2*this.screenHeight:this.screenHeight;c&&this.scaleFitToScreen(!1,this.useZoomLarge,!1,!1)},"~B");b(c$,"defaultScaleToScreen",function(a){return this.screenPixelCount/2/a},"~N");b(c$,"resetFitToScreen",function(a){this.scaleFitToScreen(a,this.viewer.global.zoomLarge,!0,!0)},"~B");b(c$,"scaleFitToScreen",function(a,c,b,e){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),e&&this.resetNavigationPoint(b),this.zoomHeight&&(c=this.height>this.width),this.screenPixelCount=c==this.height>this.width?this.height:this.width);2<this.screenPixelCount&&(this.screenPixelCount-=2);this.scaleDefaultPixelsPerAngstrom=this.defaultScaleToScreen(this.modelRadius)},"~B,~B,~B,~B");b(c$,"scaleToScreen",function(a,c){if(0==c||2>a)return 0;var b=this.scaleToPerspective(a,
c*this.scalePixelsPerAngstrom/1E3);return 0<b?b:1},"~N,~N");b(c$,"unscaleToScreen",function(a,c){var b=c/this.scalePixelsPerAngstrom;return this.perspectiveDepth?b/this.getPerspectiveFactor(a):b},"~N,~N");b(c$,"scaleToPerspective",function(a,c){return this.perspectiveDepth?c*this.getPerspectiveFactor(a):c},"~N,~N");b(c$,"getMatrixtransform",function(){return this.matrixTransform});b(c$,"setNavigationMode",function(a){this.mode=a&&this.canNavigate()?1:this.defaultMode;this.resetNavigationPoint(!0)},
"~B");b(c$,"isNavigating",function(){return this.navigating||this.navOn});b(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.zoomPercent!=a&&(this.zoomPercent=a,this.viewer.global.fontCaching||this.viewer.getGraphicsData().clearFontCache());this.calcCameraFactors();this.calcTransformMatrix();
1==this.mode?this.calcNavigationPoint():this.calcSlabAndDepthValues()});b(c$,"getZoomSetting",function(){5>this.zoomPercentSetting&&(this.zoomPercentSetting=5);2E5<this.zoomPercentSetting&&(this.zoomPercentSetting=2E5);return this.zoomEnabled||1==this.mode?this.zoomPercentSetting:100});b(c$,"calcSlabAndDepthValues",function(){this.slabValue=1>this.slabRange?this.zValueFromPercent(this.slabPercentSetting):m(Math.floor(this.modelCenterOffset*this.slabRange/(2*this.modelRadius)*(this.zoomPercentSetting/
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.transformPoint2(this.zSlabPoint,this.pointT2),this.zSlabValue=z(this.pointT2.z)}catch(a){if(!y(a,Exception))throw a;}this.viewer.global.setS("_slabPlane",
J.util.Escape.eP4(this.getSlabDepthPlane(!1)));this.viewer.global.setS("_depthPlane",J.util.Escape.eP4(this.getSlabDepthPlane(!0)));this.slabEnabled||(this.slabValue=0,this.depthValue=2147483647)});b(c$,"zValueFromPercent",function(a){return m(Math.floor((1-a/50)*this.modelRadiusPixels+this.modelCenterOffset))},"~N");b(c$,"calcTransformMatrix",function(){this.matrixTransform.setIdentity();this.vectorTemp.sub2(this.fixedRotationCenter,this.frameOffset);this.matrixTemp.setZero();this.matrixTemp.setTranslation(this.vectorTemp);
this.matrixTransform.sub(this.matrixTemp);this.matrixTemp.setM3(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;}});b(c$,"rotatePoint",function(a,c){this.matrixRotate.transform2(a,c);c.y=-c.y},"JU.P3,JU.P3");b(c$,"transformPoints",function(a,c,b){for(;0<=--a;)b[a].setT(this.transformPoint(c[a]))},"~N,~A,~A");b(c$,"transformPointScr",function(a,c){c.setT(this.transformPoint(a))},"JU.P3,JU.P3i");b(c$,"transformPointNoClip",function(a,c){this.getTempScreenPt(a,null);c.setT(this.point3fScreenTemp)},"JU.P3,JU.P3");b(c$,"transformPoint",
function(a){return 3.4028235E38==a.z||-3.4028235E38==a.z?this.transformScreenPoint(a):this.getTempScreenPt(a,this.internalSlab?a:null)},"JU.P3");b(c$,"transformScreenPoint",function(a){-3.4028235E38==a.z?(this.point3iScreenTemp.x=m(Math.floor(a.x/100*this.screenWidth)),this.point3iScreenTemp.y=m(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.transform2(this.fixedRotationCenter,this.pointTsp);this.point3iScreenTemp.z=z(this.pointTsp.z);return this.point3iScreenTemp},"JU.P3");b(c$,"transformPointVib",function(a,c){this.ptVibTemp.setT(a);return this.getTempScreenPt(this.getVibrationPoint(c,this.ptVibTemp),a)},"JU.P3,J.util.Vibration");b(c$,"getVibrationPoint",function(a,c){a.setTempPoint(c,this.vibrationT,this.vibrationScale,this.viewer.global.modulationScale);return c},"J.util.Vibration,J.util.Point3fi");b(c$,"transformPoint2",
function(a,c){this.getTempScreenPt(a,a);c.setT(this.point3fScreenTemp)},"JU.P3,JU.P3");b(c$,"transformVector",function(a,c){this.matrixTransform.rotate(a,c)},"JU.V3,JU.V3");b(c$,"move",function(a,c,b,e,f,g,h){var l=J.api.Interface.getOptionInterface("thread.MoveThread");l.setManager(this,this.viewer,[c,e,[b,f,g,h]]);0<g&&l.setEval(a);l.run()},"J.api.JmolScriptEvaluator,JU.V3,~N,JU.V3,~N,~N,~N");b(c$,"isInPosition",function(a,c){if(Float.isNaN(c))return!0;this.aaTest1.setVA(a,c/57.29577951308232);
this.ptTest1.set(4.321,1.23456,3.14159);this.getRotation(this.matrixTest);this.matrixTest.transform2(this.ptTest1,this.ptTest2);this.matrixTest.setAA(this.aaTest1);this.matrixTest.transform2(this.ptTest1,this.ptTest3);return 0.1>this.ptTest3.distance(this.ptTest2)},"JU.V3,~N");b(c$,"moveToPyMOL",function(a,c,b){var e=JU.M3.newA(b);e.invert();var f=b[9],g=-b[10],h=-b[11],l=JU.P3.new3(b[12],b[13],b[14]),j=b[15],k=b[16],m=b[17];this.setPerspectiveDepth(!(0<=m));var m=Math.abs(m)/2,p=Math.tan(3.141592653589793*
m/180),m=h*p,p=0.5/p-0.5,r=50/m;0<j&&(j=50+z((h-j)*r),h=50+z((h-k)*r),this.setSlabEnabled(!0),this.slabToPercent(j),this.depthToPercent(h),21==b.length&&(k=0!=b[18],r=0!=b[19],b=b[20],this.setZShadeEnabled(k),k&&(r?this.viewer.setIntProperty("zSlab",z(Math.min(100,j+b*(h-j)))):this.viewer.setIntProperty("zSlab",z((j+h)/2)),this.viewer.setIntProperty("zDepth",h))));this.moveTo(a,c,l,null,0,e,100,NaN,NaN,m,null,NaN,NaN,NaN,p,f,g)},"J.api.JmolScriptEvaluator,~N,~A");b(c$,"moveTo",function(a,c,b,e,f,
g,h,l,j,k,m,p,r,q,s,t,u){if(null==g)if(g=new JU.M3,e=JU.V3.newV(e),Float.isNaN(f))g.m00=NaN;else if(0.01>f&&-0.01<f)g.setIdentity();else{if(0==e.x&&0==e.y&&0==e.z)return;var w=new JU.A4;w.setVA(e,f/57.29577951308232);g.setAA(w)}t==this.cameraSetting.x&&(t=NaN);u==this.cameraSetting.y&&(u=NaN);s==this.cameraDepth&&(s=NaN);Float.isNaN(t)||(l=50*t/k/this.width*this.screenPixelCount);Float.isNaN(u)||(j=50*u/k/this.height*this.screenPixelCount);f=null==b?this.scaleDefaultPixelsPerAngstrom:this.defaultScaleToScreen(k);
if(0>=c)this.setAll(b,g,m,h,l,j,k,f,q,p,r,s,t,u),this.viewer.moveUpdate(c),this.viewer.finalizeTransformParameters();else try{null==this.motion&&(this.motion=J.api.Interface.getOptionInterface("thread.MoveToThread"));var z=this.motion.setManager(this,this.viewer,[b,g,m,[c,h,l,j,k,f,q,p,r,s,t,u]]);0>=z||this.viewer.global.waitForMoveTo?(0<z&&this.motion.setEval(a),this.motion.run(),this.viewer.isSingleThreaded||(this.motion=null)):this.motion.start()}catch(B){if(!y(B,Exception))throw B;}},"J.api.JmolScriptEvaluator,~N,JU.P3,JU.T3,~N,JU.M3,~N,~N,~N,~N,JU.P3,~N,~N,~N,~N,~N,~N");
b(c$,"stopMotion",function(){this.motion=null});b(c$,"getRotationQuaternion",function(){return J.util.Quaternion.newM(this.matrixRotate)});b(c$,"getRotationText",function(){this.axisangleT.setM(this.matrixRotate);var a=57.29577951308232*this.axisangleT.angle,c=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);c.append("{");J.viewer.TransformManager.truncate0(c,this.vectorT.x);J.viewer.TransformManager.truncate0(c,
this.vectorT.y);J.viewer.TransformManager.truncate0(c,this.vectorT.z);J.viewer.TransformManager.truncate2(c,a);c.append("}");return c.toString()});b(c$,"getMoveToText",function(a,c){this.finalizeTransformParameters();var b=new JU.SB;b.append("moveto ");c&&b.append("/* time, axisAngle */ ");b.appendF(a);b.append(" ").append(this.getRotationText());c&&b.append(" /* zoom, translation */ ");J.viewer.TransformManager.truncate2(b,this.zoomPercentSetting);J.viewer.TransformManager.truncate2(b,this.getTranslationXPercent());
J.viewer.TransformManager.truncate2(b,this.getTranslationYPercent());b.append(" ");c&&b.append(" /* center, rotationRadius */ ");b.append(this.getCenterText());b.append(" ").appendF(this.modelRadius);b.append(this.getNavigationText(c));c&&b.append(" /* cameraDepth, cameraX, cameraY */ ");J.viewer.TransformManager.truncate2(b,this.cameraDepth);J.viewer.TransformManager.truncate2(b,this.cameraSetting.x);J.viewer.TransformManager.truncate2(b,this.cameraSetting.y);b.append(";");return b.toString()},"~N,~B");
b(c$,"getCenterText",function(){return J.util.Escape.eP(this.fixedRotationCenter)});b(c$,"getRotateXyzText",function(){var a=new JU.SB,c=this.matrixRotate.m20,b=-(57.29577951308232*Math.asin(c)),e;0.999<c||-0.999>c?(c=-(57.29577951308232*Math.atan2(this.matrixRotate.m12,this.matrixRotate.m11)),e=0):(c=57.29577951308232*Math.atan2(this.matrixRotate.m21,this.matrixRotate.m22),e=57.29577951308232*Math.atan2(this.matrixRotate.m10,this.matrixRotate.m00));a.append("reset");a.append(";center ").append(this.getCenterText());
0!=c&&(a.append("; rotate x"),J.viewer.TransformManager.truncate2(a,c));0!=b&&(a.append("; rotate y"),J.viewer.TransformManager.truncate2(a,b));0!=e&&(a.append("; rotate z"),J.viewer.TransformManager.truncate2(a,e));a.append(";");this.addZoomTranslationNavigationText(a);return a.toString()});b(c$,"addZoomTranslationNavigationText",function(a){100!=this.zoomPercent&&(a.append(" zoom"),J.viewer.TransformManager.truncate2(a,this.zoomPercent),a.append(";"));var c=this.getTranslationXPercent();0!=c&&(a.append(" translate x"),
J.viewer.TransformManager.truncate2(a,c),a.append(";"));c=this.getTranslationYPercent();0!=c&&(a.append(" translate y"),J.viewer.TransformManager.truncate2(a,c),a.append(";"));if(this.modelRadius!=this.rotationRadiusDefault||10==this.modelRadius)a.append(" set rotationRadius"),J.viewer.TransformManager.truncate2(a,this.modelRadius),a.append(";");1==this.mode&&(a.append("navigate 0 center ").append(J.util.Escape.eP(this.navigationCenter)),a.append(";navigate 0 translate"),J.viewer.TransformManager.truncate2(a,
this.getNavigationOffsetPercent("X")),J.viewer.TransformManager.truncate2(a,this.getNavigationOffsetPercent("Y")),a.append(";navigate 0 depth "),J.viewer.TransformManager.truncate2(a,this.getNavigationDepthPercent()),a.append(";"))},"JU.SB");b(c$,"getRotateZyzText",function(a){var c=new JU.SB,b=this.viewer.getModelSetAuxiliaryInfoValue("defaultOrientationMatrix");null==b?b=this.matrixRotate:(b=JU.M3.newM(b),b.invert(),b.mul2(this.matrixRotate,b));var e=b.m22,f=57.29577951308232*Math.acos(e);0.999<
e||-0.999>e?(e=57.29577951308232*Math.atan2(b.m10,b.m11),b=0):(e=57.29577951308232*Math.atan2(b.m21,-b.m20),b=57.29577951308232*Math.atan2(b.m12,b.m02));0!=e&&(0!=f&&0!=b&&a)&&c.append("#Follows Z-Y-Z convention for Euler angles\n");c.append("reset");c.append(";center ").append(this.getCenterText());0!=e&&(c.append("; rotate z"),J.viewer.TransformManager.truncate2(c,e));0!=f&&(c.append("; rotate y"),J.viewer.TransformManager.truncate2(c,f));0!=b&&(c.append("; rotate z"),J.viewer.TransformManager.truncate2(c,
b));c.append(";");this.addZoomTranslationNavigationText(c);return c.toString()},"~B");c$.truncate0=b(c$,"truncate0",function(a,c){a.appendC(" ");a.appendI(Math.round(c))},"JU.SB,~N");c$.truncate2=b(c$,"truncate2",function(a,c){a.appendC(" ");a.appendF(Math.round(100*c)/100)},"JU.SB,~N");b(c$,"setSpinXYZ",function(a,c,b){Float.isNaN(a)||(this.spinX=a);Float.isNaN(c)||(this.spinY=c);Float.isNaN(b)||(this.spinZ=b);(this.isSpinInternal||this.isSpinFixed)&&this.clearSpin()},"~N,~N,~N");b(c$,"setSpinFps",
function(a){0>=a?a=1:50<a&&(a=50);this.spinFps=a},"~N");b(c$,"setNavXYZ",function(a,c,b){Float.isNaN(a)||(this.navX=a);Float.isNaN(c)||(this.navY=c);Float.isNaN(b)||(this.navZ=b)},"~N,~N,~N");b(c$,"clearSpin",function(){this.setSpinOff();this.setNavOn(!1);this.isSpinFixed=this.isSpinInternal=!1});b(c$,"getSpinOn",function(){return this.spinOn});b(c$,"getNavOn",function(){return this.navOn});b(c$,"setSpinOn",function(){this.setSpin(null,!0,3.4028235E38,null,null,null,!1)});b(c$,"setSpinOff",function(){this.setSpin(null,
!1,3.4028235E38,null,null,null,!1)});b(c$,"setSpin",function(a,c,b,e,f,g,h){this.navOn&&c&&this.setNavOn(!1);this.spinOn!=c&&(this.spinOn=c,this.viewer.global.setB("_spinning",c),c?null==this.spinThread&&(this.spinThread=J.api.Interface.getOptionInterface("thread.SpinThread"),this.spinThread.setManager(this,this.viewer,[Float.$valueOf(b),e,f,g,h?Boolean.TRUE:null]),this.spinIsGesture=h,null==g&&null==f?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.List,~A,JU.BS,~B");b(c$,"setNavOn",function(a){if(!Float.isNaN(this.navFps)){var c=this.navOn;a&&this.spinOn&&this.setSpin(null,!1,0,null,null,null,!1);this.navOn=a;this.viewer.global.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.getOptionInterface("thread.SpinThread"),
this.spinThread.setManager(this,this.viewer,null),this.spinThread.start())):c&&null!=this.spinThread&&(this.spinThread.interrupt(),this.spinThread=null)}},"~B");b(c$,"setVibrationScale",function(a){this.vibrationScale=a},"~N");b(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.viewer.modelGetLastVibrationIndex(this.viewer.getCurrentModelIndex(),0))},"~N");b(c$,"setVibrationT",function(a){this.vibrationT.x=a;0==this.vibrationScale&&(this.vibrationScale=this.viewer.global.vibrationScale)},"~N");b(c$,"isVibrationOn",function(){return this.vibrationOn});b(c$,"setVibrationOn",function(a){a?1>this.viewer.getModelCount()?this.vibrationOn=!1:(null==this.vibrationThread&&(this.vibrationThread=J.api.Interface.getOptionInterface("thread.VibrationThread"),this.vibrationThread.setManager(this,
this.viewer,null),this.vibrationThread.start()),this.vibrationOn=!0):(null!=this.vibrationThread&&(this.vibrationThread.interrupt(),this.vibrationThread=null),this.vibrationOn=!1)},"~B");b(c$,"clearVibration",function(){this.setVibrationOn(!1);this.vibrationScale=0});b(c$,"setStereoMode2",function(a){this.stereoMode=J.constant.EnumStereoMode.CUSTOM;this.stereoColors=a},"~A");b(c$,"setStereoMode",function(a){this.stereoColors=null;this.stereoMode=a},"J.constant.EnumStereoMode");b(c$,"setStereoDegrees",
function(a){this.stereoDegrees=a;this.stereoRadians=0.017453292*a},"~N");b(c$,"getStereoRotationMatrix",function(a){this.stereoFrame=a;if(!a)return this.matrixRotate;this.matrixTemp3.rotY(-this.stereoRadians);this.matrixStereo.mul2(this.matrixTemp3,this.matrixRotate);return this.matrixStereo},"~B");b(c$,"isWindowCentered",function(){return this.windowCentered});b(c$,"setWindowCentered",function(a){this.windowCentered=a;this.resetNavigationPoint(!0)},"~B");b(c$,"getRotationCenter",function(){return this.fixedRotationCenter});
b(c$,"getRotationRadius",function(){return this.modelRadius});b(c$,"setRotationRadius",function(a,c){a=this.modelRadius=0>=a?this.viewer.calcRotationRadius(this.fixedRotationCenter):a;c&&this.viewer.setRotationRadius(a,!1);return a},"~N,~B");b(c$,"setRotationCenterAndRadiusXYZ",function(a,c){this.resetNavigationPoint(!1);null==a?(this.setFixedRotationCenter(this.rotationCenterDefault),this.modelRadius=this.rotationRadiusDefault):(this.setFixedRotationCenter(a),c&&this.windowCentered&&(this.modelRadius=
this.viewer.calcRotationRadius(this.fixedRotationCenter)))},"JU.P3,~B");b(c$,"setRotCenterRel",function(a,c){var b=JU.P3.newP(c);"average"===a?b.add(this.viewer.getAverageAtomPoint()):"boundbox"===a?b.add(this.viewer.getBoundBoxCenter()):"absolute"!==a&&b.setT(this.rotationCenterDefault);this.setRotationCenterAndRadiusXYZ(b,!0)},"~S,JU.P3");b(c$,"setNewRotationCenter",function(a,c){null==a&&(a=this.rotationCenterDefault);this.windowCentered?(this.translateToPercent("x",0),this.translateToPercent("y",
0),this.setRotationCenterAndRadiusXYZ(a,!0),c&&this.resetFitToScreen(!0)):this.moveRotationCenter(a,!0)},"JU.P3,~B");b(c$,"moveRotationCenter",function(a,c){this.setRotationCenterAndRadiusXYZ(a,!1);c&&this.setRotationPointXY(this.fixedRotationCenter)},"JU.P3,~B");b(c$,"setCenter",function(){this.setRotationCenterAndRadiusXYZ(this.fixedRotationCenter,!0)});b(c$,"setCenterAt",function(a,c){this.setRotCenterRel(a,c);this.resetFitToScreen(!0)},"~S,JU.P3");b(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");b(c$,"setFrameOffsets",function(a){this.frameOffsets=a},"~A");b(c$,"setSelectedTranslation",function(a,c,b){this.bsSelectedAtoms=a;switch(c){case "X":case "x":this.ptOffset.x+=b;break;case "Y":case "y":this.ptOffset.y+=b;break;case "Z":case "z":this.ptOffset.z+=b}},"JU.BS,~S,~N");b(c$,"setNavFps",function(a){this.navFps=a},"~N");b(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.zoomPercent/100;this.modelRadiusPixels=
this.modelRadius*this.scalePixelsPerAngstrom}});b(c$,"calcNavCameraFactors",function(a){3.4028235E38==this.zoomFactor?(1E4<this.zoomPercent&&(this.zoomPercent=1E4),this.modelCenterOffset=100*a/this.zoomPercent):this.prevZoomSetting!=this.zoomPercentSetting&&(this.modelCenterOffset=0==this.zoomRatio?100*a/this.zoomPercentSetting:this.modelCenterOffset+(1-this.zoomRatio)*this.referencePlaneOffset,this.navMode=-1);this.prevZoomSetting=this.zoomPercentSetting;this.zoomFactor=this.modelCenterOffset/this.referencePlaneOffset;
this.zoomPercent=0==this.zoomFactor?1E4:100*(a/this.modelCenterOffset)},"~N");b(c$,"getPerspectiveFactor",function(a){return 0>=a?this.referencePlaneOffset:this.referencePlaneOffset/a},"~N");b(c$,"getTempScreenPt",function(a,c){this.matrixTransform.transform2(a,this.point3fScreenTemp);var b=this.point3fScreenTemp.z;Float.isNaN(b)?(!this.haveNotifiedNaN&&J.util.Logger.debugging&&J.util.Logger.debug("NaN seen in TransformPoint"),this.haveNotifiedNaN=!0,b=this.point3fScreenTemp.z=1):0>=b&&(b=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&&(b=this.getPerspectiveFactor(b),this.point3fScreenTemp.x*=b,this.point3fScreenTemp.y*=b);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&&(J.util.Logger.debugging&&J.util.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!=c&&(null!=this.slabPlane&&
0<c.x*this.slabPlane.x+c.y*this.slabPlane.y+c.z*this.slabPlane.z+this.slabPlane.w||null!=this.depthPlane&&0>c.x*this.depthPlane.x+c.y*this.depthPlane.y+c.z*this.depthPlane.z+this.depthPlane.w))this.point3iScreenTemp.z=1;return this.point3iScreenTemp},"JU.P3,JU.P3");b(c$,"unTransformPoint",function(a,c){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 b=this.getPerspectiveFactor(this.untransformedPoint.z);this.untransformedPoint.x/=b;this.untransformedPoint.y/=b}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.transform2(this.untransformedPoint,c)},"JU.P3,JU.P3");b(c$,"canNavigate",function(){return!0});b(c$,"resetNavigationPoint",function(a){5>this.zoomPercent&&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.viewer.setFloatProperty("slabRange",0),a&&this.setSlabEnabled(1==this.mode),
this.zoomFactor=3.4028235E38,this.zoomPercentSetting=this.zoomPercent)},"~B");b(c$,"setNavigatePt",function(a){this.navigationCenter.setT(a);this.navMode=3;this.navigating=!0;this.finalizeTransformParameters();this.navigating=!1},"JU.P3");b(c$,"getNavigationCenter",function(){return this.navigationCenter});b(c$,"getNavigationDepthPercent",function(){return this.navigationDepth});b(c$,"setNavigationSlabOffsetPercent",function(a){this.viewer.global.setF("navigationSlab",a);this.calcCameraFactors();
this.navigationSlabOffset=a/50*this.modelRadiusPixels},"~N");b(c$,"getNavigationOffset",function(){this.transformPoint2(this.navigationCenter,this.navigationOffset);return this.navigationOffset});b(c$,"getNavPtHeight",function(){return this.height/2});b(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");b(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+J.util.Escape.eP(this.navigationCenter)+" "+this.getNavigationOffsetPercent("X")+" "+this.getNavigationOffsetPercent("Y")+" "+this.getNavigationDepthPercent()},"~B");b(c$,"setScreenParameters",function(a,c,b,e,f,g){var h=1==this.mode?JU.P3.newP(this.navigationCenter):null,l=JU.P3.newP(this.navigationOffset);l.x/=this.width;l.y/=this.height;
this.setScreenParameters0(a,c,b,e,f,g);null!=h&&(this.navigationCenter.setT(h),this.navTranslatePercentOrTo(-1,l.x*this.width,l.y*this.height),this.setNavigatePt(h))},"~N,~N,~B,~B,~B,~B");b(c$,"navInterrupt",function(){null!=this.nav&&this.nav.interrupt()});b(c$,"getNav",function(){if(null!=this.nav)return!0;this.nav=J.api.Interface.getOptionInterface("navigate.Navigator");if(null==this.nav)return!1;this.nav.set(this,this.viewer);return!0});b(c$,"navigateList",function(a,c){this.getNav()&&this.nav.navigateList(a,
c)},"J.api.JmolScriptEvaluator,JU.List");b(c$,"navigateAxis",function(a,c){this.getNav()&&this.nav.navigateAxis(a,c)},"JU.V3,~N");b(c$,"zoomByFactor",function(a,c,b){1!=this.mode||!this.zoomEnabled||0>=a?this.zoomByFactor0(a,c,b):this.getNav()&&this.nav.zoomByFactor(a,c,b)},"~N,~N,~N");b(c$,"setNavigationOffsetRelative",function(){this.getNav()&&this.nav.setNavigationOffsetRelative()});b(c$,"navigateKey",function(a,c){this.getNav()&&this.nav.navigateKey(a,c)},"~N,~N");b(c$,"setNavigationDepthPercent",
function(a){this.getNav()&&this.nav.setNavigationDepthPercent(a)},"~N");b(c$,"navTranslatePercentOrTo",function(a,c,b){this.getNav()&&this.nav.navTranslatePercentOrTo(a,c,b)},"~N,~N,~N");b(c$,"calcNavigationPoint",function(){this.getNav()&&this.nav.calcNavigationPoint()});b(c$,"getNavigationState",function(){return 1==this.mode&&this.getNav()?this.nav.getNavigationState():""});b(c$,"setZoomHeight",function(a,c){this.zoomHeight=a;this.scaleFitToScreen(!1,c,!1,!0)},"~B,~B");b(c$,"setAll",function(a,
c,b,e,f,g,h,l,j,k,m,p,r,q){this.setRotation(c);null!=a&&this.moveRotationCenter(a,!this.windowCentered);null!=b&&1==this.mode&&this.navigationCenter.setT(b);Float.isNaN(p)||this.setCameraDepthPercent(p,!1);!Float.isNaN(r)&&!Float.isNaN(q)&&this.setCamera(r,q);Float.isNaN(e)||this.zoomToPercent(e);Float.isNaN(h)||(this.modelRadius=h);Float.isNaN(l)||(this.scaleDefaultPixelsPerAngstrom=l);!Float.isNaN(f)&&!Float.isNaN(g)&&(this.translateToPercent("x",f),this.translateToPercent("y",g));1==this.mode&&
(!Float.isNaN(k)&&!Float.isNaN(m)&&this.navTranslatePercentOrTo(0,k,m),Float.isNaN(j)||this.setNavigationDepthPercent(j))},"JU.P3,JU.M3,JU.P3,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");B(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)});p("J.viewer");c$=G(J.viewer,"TransformManager11");p("J.viewer");q("java.lang.Enum javajs.api.PlatformViewer J.api.JmolViewer J.atomdata.AtomDataServer java.util.Hashtable javajs.awt.Dimension JU.List J.atomdata.RadiusData J.constant.EnumVdw J.i18n.GT J.util.CommandHistory".split(" "),"J.viewer.Viewer","java.io.Reader java.lang.Boolean $.Character $.Float JU.AU $.BS $.CU $.DF $.P3 $.P3i $.PT $.SB $.V3 J.adapter.smarter.SmarterJmolAdapter J.api.Interface $.JmolAppConsoleInterface J.constant.EnumAnimationMode $.EnumAxesMode $.EnumFileStatus $.EnumStereoMode J.io.CifDataReader $.JmolBinary J.modelset.Group J.script.SV $.T J.thread.TimeoutThread J.util.BSUtil $.C $.Elements $.Escape $.GData $.JmolMolecule $.Logger $.Measure $.Parser $.TempArray $.Txt J.viewer.ActionManager $.AnimationManager $.ColorManager $.FileManager $.JC $.ModelManager $.SelectionManager $.ShapeManager $.StateManager $.StatusManager $.TransformManager J.viewer.binding.Binding".split(" "),
function(){c$=u(function(){this.queueOnHold=this.isSingleThreaded=this.isWebGL=this.isJS=this.haveDisplay=this.autoExit=!1;this.appletCodeBase=this.appletDocumentBase=this.fullName="";this.fileManager=this.modelSet=this.definedAtomSets=this.compiler=this.appletIdiomaBase=null;this.mustRender=this.listCommands=this.isSyntaxCheck=this.isSyntaxAndFileCheck=this.isJNLP=this.$isApplet=!1;this.insertedCommand=this.htmlName="";this.transformManager=this.statusManager=this.global=this.repaintManager=this.selectionManager=
this.shapeManager=this.dataManager=this.colorManager=this.animationManager=this.actionManager=this.applet=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.scriptManager=this.stateManager=this.modelManager=this.smilesMatcher=this.symmetry=this.commandHistory=this.access=this.modelAdapter=this.display=this.viewerOptions=
this.commandOptions=null;this.$isPreviewOnly=!1;this.mouse=null;this.mouseEnabled=!0;this.noneSelected=!1;this.frameOffsets=this.bsFrameOffsets=this.sc=this.ligandModelSet=this.ligandModels=null;this.motionEventNumber=0;this.inMotion=!1;this.refreshing=!0;this.axesAreTainted=!1;this.dimScreen=null;this.maximumSize=2147483647;this.imageFontScaling=1;this.jsParams=this.captureParams=null;this.antialiasDisplay=!1;this.hoverAtomIndex=-1;this.hoverText=null;this.hoverEnabled=!0;this.currentCursor=0;this.prevFrame=
-2147483648;this.haveJDX=!1;this.rd=this.language=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=this.minimizer=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.htPdbBondInfo=this.jsExporter3D=null;t(this,arguments)},J.viewer,"Viewer",J.api.JmolViewer,[J.atomdata.AtomDataServer,javajs.api.PlatformViewer]);N(c$,
function(){this.commandHistory=new J.util.CommandHistory;this.dimScreen=new javajs.awt.Dimension(0,0);this.language=J.i18n.GT.getLanguage();this.rd=new J.atomdata.RadiusData(null,0,null,null);this.defaultVdw=J.constant.EnumVdw.JMOL;this.localFunctions=new java.util.Hashtable;this.privateKey=Math.random();this.actionStates=new JU.List;this.actionStatesRedo=new JU.List;this.chainMap=new java.util.Hashtable;this.chainList=new JU.List});b(c$,"finalize",function(){J.util.Logger.debugging&&J.util.Logger.debug("viewer finalize "+
this);na(this,J.viewer.Viewer,"finalize",[])});b(c$,"hasDisplay",function(){return this.haveDisplay});e(c$,"isApplet",function(){return this.$isApplet});b(c$,"setInsertedCommand",function(a){this.insertedCommand=a},"~S");b(c$,"getActionManager",function(){return this.actionManager});b(c$,"getLogFilePath",function(){return this.logFilePath});b(c$,"isSignedApplet",function(){return this.$isSignedApplet});c$.getJmolVersion=e(c$,"getJmolVersion",function(){return null==J.viewer.Viewer.version_date?J.viewer.Viewer.version_date=
J.viewer.JC.version+"  "+J.viewer.JC.date:J.viewer.Viewer.version_date});c$.allocateViewer=b(c$,"allocateViewer",function(a,c,b,e,f,g,h,l){var j=new java.util.Hashtable;j.put("display",a);j.put("adapter",c);j.put("statusListener",h);j.put("platform",l);j.put("options",g);j.put("fullName",b);j.put("documentBase",e);j.put("codeBase",f);return new J.viewer.Viewer(j)},"~O,J.api.JmolAdapter,~S,java.net.URL,java.net.URL,~S,J.api.JmolStatusListener,javajs.api.GenericPlatform");w(c$,function(a){R(this,J.viewer.Viewer,
[]);this.setOptions(a)},"java.util.Map");b(c$,"getStatusManager",function(){return this.statusManager});b(c$,"haveAccess",function(a){return this.access===a},"J.viewer.Viewer.ACCESS");e(c$,"getModelAdapter",function(){null==this.modelAdapter&&(this.modelAdapter=new J.adapter.smarter.SmarterJmolAdapter);return this.modelAdapter});b(c$,"getSymmetry",function(){null==this.symmetry&&(this.symmetry=J.api.Interface.getOptionInterface("symmetry.Symmetry"));return this.symmetry});b(c$,"getSymmetryInfo",function(a,
c,b,e,f,g,h){return this.getPropertyManager().getSymmetryInfo(a,c,b,e,f,g,h)},"JU.BS,~S,~N,JU.P3,JU.P3,~S,~N");b(c$,"getSmilesMatcher",function(){null==this.smilesMatcher&&(this.smilesMatcher=J.api.Interface.getOptionInterface("smiles.SmilesMatcher"));return this.smilesMatcher});e(c$,"getSmartsMatch",function(a,c){null==c&&(c=this.getSelectionSet(!1));return this.getSmilesMatcher().getSubstructureSet(a,this.modelSet.atoms,this.getAtomCount(),c,!0,!1)},"~S,JU.BS");b(c$,"getViewerOptions",function(){return this.viewerOptions});
b(c$,"setOptions",function(a){this.viewerOptions=a;J.util.Logger.debugging&&J.util.Logger.debug("Viewer constructor "+this);this.modelAdapter=a.get("adapter");var c=a.get("statusListener");this.fullName=a.get("fullName");null==this.fullName&&(this.fullName="");var b=a.get("codePath");null==b&&(b="../java/");this.appletCodeBase=b.toString();this.appletIdiomaBase=this.appletCodeBase.substring(0,this.appletCodeBase.lastIndexOf("/",this.appletCodeBase.length-2)+1)+"idioma";b=a.get("documentBase");this.appletDocumentBase=
null==b?"":b.toString();b=a.get("options");this.commandOptions=null==b?"":b.toString();(a.containsKey("debug")||0<=this.commandOptions.indexOf("-debug"))&&J.util.Logger.setLogLevel(5);(this.isJNLP=this.checkOption2("isJNLP","-jnlp"))&&J.util.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");b=this.fullName.indexOf("__");
this.htmlName=0>b?this.fullName:this.fullName.substring(0,b);this.syncId=0>b?"":this.fullName.substring(b+2,this.fullName.length-2);this.$isApplet&&(self.Jmol&&(this.applet=Jmol._applets[this.htmlName.split("_object")[0]],this.strJavaVersion=J.viewer.Viewer.strJavaVersion=Jmol._version),a.containsKey("maximumSize")&&this.setMaximumSize(a.get("maximumSize").intValue()));this.access=this.checkOption2("access:READSPT","-r")?J.viewer.Viewer.ACCESS.READSPT:this.checkOption2("access:NONE","-R")?J.viewer.Viewer.ACCESS.NONE:
J.viewer.Viewer.ACCESS.ALL;(this.$isPreviewOnly=a.containsKey("previewOnly"))&&a.remove("previewOnly");this.isPrintOnly=this.checkOption2("printOnly","-p");var b=a.get("platform"),e="unknown";null==b&&(b=this.commandOptions.contains("platform=")?this.commandOptions.substring(this.commandOptions.indexOf("platform=")+9):"J.awt.Platform");s(b,String)&&(e=b,this.isJS=(this.isWebGL=0<=e.indexOf(".awtjs."))||0<=e.indexOf(".awtjs2d."),b=J.api.Interface.getInterface(e));this.apiPlatform=b;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);b=a.get("graphicsAdapter");null==b&&!this.isWebGL&&(b=J.api.Interface.getInterface("J.g3d.Graphics3D"));this.gdata=null==b?new J.util.GData:b;this.gdata.initialize(this.apiPlatform);this.stateManager=new J.viewer.StateManager(this);this.colorManager=new J.viewer.ColorManager(this,this.gdata);this.statusManager=new J.viewer.StatusManager(this);this.transformManager=new J.viewer.TransformManager(this,2147483647,0);this.selectionManager=
new J.viewer.SelectionManager(this);this.haveDisplay&&(this.actionManager=this.multiTouch?J.api.Interface.getOptionInterface("multitouch.ActionManagerMT"):new J.viewer.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.modelManager=new J.viewer.ModelManager(this);
this.shapeManager=new J.viewer.ShapeManager(this);this.tempArray=new J.util.TempArray;this.animationManager=new J.viewer.AnimationManager(this);b=a.get("repaintManager");null==b&&(b=J.api.Interface.getOptionInterface("render.RepaintManager"));null!=b&&!b.equals("")&&(this.repaintManager=b).set(this,this.shapeManager);this.initialize(!0);this.fileManager=new J.viewer.FileManager(this);this.definedAtomSets=new java.util.Hashtable;this.setJmolStatusListener(c);this.$isApplet?(J.util.Logger.info("viewerOptions: \n"+
J.util.Escape.escapeMap(this.viewerOptions)),c=this.viewerOptions.get("documentLocation"),!this.isJS&&(null!=c&&c.startsWith("file:/"))&&(c=c.substring(0,c.substring(0,(c+"?").indexOf("?")).lastIndexOf("/")),J.util.Logger.info("setting current directory to "+c),this.cd(c)),c=this.appletDocumentBase,b=c.indexOf("#"),0<=b&&(c=c.substring(0,b)),b=c.lastIndexOf("?"),0<=b&&(c=c.substring(0,b)),b=c.lastIndexOf("/"),0<=b&&(c=c.substring(0,b)),J.viewer.Viewer.jsDocumentBase=c,this.fileManager.setAppletContext(this.appletDocumentBase),
c=a.get("appletProxy"),null!=c&&this.setStringProperty("appletProxy",c),this.$isSignedApplet?(this.logFilePath=JU.PT.simpleReplace(this.appletCodeBase,"file://",""),this.logFilePath=JU.PT.simpleReplace(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"))&&J.util.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"),b=a.get("headlistMaxTimeMs"),null==b&&(b=Integer.$valueOf(6E4)),this.setTimeout(""+Math.random(),b.intValue(),"exitJmol")));this.useCommandThread=!this.isHeadless()&&this.checkOption2("useCommandThread",
"-threaded");this.setStartupBooleans();this.setIntProperty("_nProcessors",J.viewer.Viewer.nProcessors);b=a.get("menuFile");null!=b&&this.getProperty("DATA_API","setMenu",this.getFileAsString(b));this.isSilent||J.util.Logger.info("(C) 2012 Jmol Development\nJmol Version: "+J.viewer.Viewer.getJmolVersion()+"\njava.vendor: "+J.viewer.Viewer.strJavaVendor+"\njava.version: "+J.viewer.Viewer.strJavaVersion+"\nos.name: "+J.viewer.Viewer.strOSName+"\nAccess: "+this.access+"\nmemory: "+this.getParameter("_memory")+
"\nprocessors available: "+J.viewer.Viewer.nProcessors+"\nuseCommandThread: "+this.useCommandThread+(!this.$isApplet?"":"\nappletId:"+this.htmlName+(this.$isSignedApplet?" (signed)":"")));this.zap(!1,!0,!1);this.global.setS("language",J.i18n.GT.getLanguage());this.stateManager.setJmolDefaults()},"java.util.Map");b(c$,"setDisplay",function(a){this.display=a;this.apiPlatform.setViewer(this,a)},"~O");b(c$,"getDataManager",function(){return null==this.dataManager?this.dataManager=J.api.Interface.getOptionInterface("viewer.DataManager").set(this):
this.dataManager});b(c$,"getScriptManager",function(){this.allowScripting&&null==this.scriptManager&&(this.scriptManager=J.api.Interface.getOptionInterface("script.ScriptManager"),this.scriptManager.setViewer(this),this.eval=this.scriptManager.getEval(),this.useCommandThread&&this.scriptManager.startCommandWatcher(!0));return this.scriptManager});b(c$,"checkOption2",function(a,c){return this.viewerOptions.containsKey(a)||0<=this.commandOptions.indexOf(c)},"~S,~S");b(c$,"isPreviewOnly",function(){return this.$isPreviewOnly});
b(c$,"isHeadless",function(){return this.apiPlatform.isHeadless()});b(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)});b(c$,"noGraphicsAllowed",function(){return this.$noGraphicsAllowed});
b(c$,"getExportDriverList",function(){return this.haveAccess(J.viewer.Viewer.ACCESS.ALL)?this.global.getParameter("exportDrivers"):""});b(c$,"getHtmlName",function(){return this.htmlName});e(c$,"getDisplay",function(){return this.display});b(c$,"clearMouse",function(){this.mouse.clear()});b(c$,"disposeMouse",function(){this.actionManager.dispose();this.mouse.dispose();this.mouse=null});e(c$,"processTwoPointGesture",function(a){this.mouse.processTwoPointGesture(a)},"~A");e(c$,"processMouseEvent",function(a,
c,b,e,f){return this.mouse.processEvent(a,c,b,e,f)},"~N,~N,~N,~N,~N");b(c$,"reset",function(a){this.modelSet.calcBoundBoxDimensions(null,1);this.axesAreTainted=!0;this.transformManager.homePosition(a);this.modelSet.setCrystallographicDefaults()?this.stateManager.setCrystallographicDefaults():this.setAxesModeMolecular(!1);this.prevFrame=-2147483648;this.getSpinOn()||this.refresh(-1,"Viewer:homePosition()")},"~B");e(c$,"homePosition",function(){this.evalString("reset spin")});b(c$,"getAppletInfo",function(){var a=
new java.util.Hashtable;a.put("htmlName",this.htmlName);a.put("syncId",this.syncId);a.put("fullName",this.fullName);this.$isApplet&&(a.put("documentBase",this.appletDocumentBase),a.put("codeBase",this.appletCodeBase),a.put("registry",this.statusManager.getRegistryInfo()));a.put("version",J.viewer.JC.version);a.put("date",J.viewer.JC.date);a.put("javaVendor",J.viewer.Viewer.strJavaVendor);a.put("javaVersion",J.viewer.Viewer.strJavaVersion+(!this.isJS?"":this.isWebGL?"(WebGL)":"(HTML5)"));a.put("operatingSystem",
J.viewer.Viewer.strOSName);return a});b(c$,"initialize",function(a){this.global=this.stateManager.getGlobalSettings(this.global,a);this.setStartupBooleans();this.global.setI("_width",this.dimScreen.width);this.global.setI("_height",this.dimScreen.height);this.haveDisplay&&(this.global.setB("_is2D",this.isJS&&!this.isWebGL),this.global.setB("_multiTouchClient",this.actionManager.isMTClient()),this.global.setB("_multiTouchServer",this.actionManager.isMTServer()));this.colorManager.resetElementColors();
this.setObjectColor("background","black");this.setObjectColor("axis1","red");this.setObjectColor("axis2","green");this.setObjectColor("axis3","blue");this.gdata.setAmbientPercent(this.global.ambientPercent);this.gdata.setDiffusePercent(this.global.diffusePercent);this.gdata.setSpecular(this.global.specular);this.gdata.setCel(this.global.celShading);this.gdata.setCelPower(this.global.celShadingPower);this.gdata.setSpecularPercent(this.global.specularPercent);this.gdata.setSpecularPower(-this.global.specularExponent);
this.gdata.setPhongExponent(this.global.phongExponent);this.gdata.setSpecularPower(this.global.specularPower);null!=this.modelSet&&this.animationManager.setAnimationOn(!1);this.animationManager.setAnimationFps(this.global.animationFps);this.statusManager.setAllowStatusReporting(this.global.statusReporting);this.setBooleanProperty("antialiasDisplay",this.global.antialiasDisplay);this.setTransformManagerDefaults()},"~B");b(c$,"listSavedStates",function(){return this.stateManager.listSavedStates()});
b(c$,"saveOrientation",function(a,c){this.stateManager.saveOrientation(a,c)},"~S,~A");b(c$,"saveScene",function(a,c){this.stateManager.saveScene(a,c)},"~S,java.util.Map");b(c$,"restoreScene",function(a,c){this.stateManager.restoreScene(a,c)},"~S,~N");b(c$,"restoreOrientation",function(a,c){return this.stateManager.restoreOrientation(a,c,!0)},"~S,~N");b(c$,"restoreRotation",function(a,c){this.stateManager.restoreOrientation(a,c,!1)},"~S,~N");b(c$,"saveModelOrientation",function(){this.modelSet.saveModelOrientation(this.animationManager.currentModelIndex,
this.stateManager.getOrientation())});b(c$,"getOrientation",function(){return this.stateManager.getOrientation()});b(c$,"restoreModelOrientation",function(a){a=this.modelSet.getModelOrientation(a);null!=a&&a.restore(-1,!0)},"~N");b(c$,"restoreModelRotation",function(a){a=this.modelSet.getModelOrientation(a);null!=a&&a.restore(-1,!1)},"~N");b(c$,"saveBonds",function(a){this.stateManager.saveBonds(a)},"~S");b(c$,"restoreBonds",function(a){this.clearModelDependentObjects();return this.stateManager.restoreBonds(a)},
"~S");b(c$,"saveState",function(a){this.stateManager.saveState(a)},"~S");b(c$,"deleteSavedState",function(a){this.stateManager.deleteSaved("State_"+a)},"~S");b(c$,"getSavedState",function(a){return this.stateManager.getSavedState(a)},"~S");b(c$,"saveStructure",function(a){this.stateManager.saveStructure(a)},"~S");b(c$,"getSavedStructure",function(a){return this.stateManager.getSavedStructure(a)},"~S");b(c$,"saveCoordinates",function(a,c){this.stateManager.saveCoordinates(a,c)},"~S,JU.BS");b(c$,"getSavedCoordinates",
function(a){return this.stateManager.getSavedCoordinates(a)},"~S");b(c$,"saveSelection",function(a){this.stateManager.saveSelection(a,this.getSelectionSet(!1));this.stateManager.restoreSelection(a)},"~S");b(c$,"restoreSelection",function(a){return this.stateManager.restoreSelection(a)},"~S");b(c$,"getMatrixtransform",function(){return this.transformManager.getMatrixtransform()});b(c$,"getRotationQuaternion",function(){return this.transformManager.getRotationQuaternion()});b(c$,"setRotationRadius",
function(a,c){c&&(a=this.transformManager.setRotationRadius(a,!1));this.modelSet.setRotationRadius(this.animationManager.currentModelIndex,a)&&this.global.setF("rotationRadius",a)},"~N,~B");b(c$,"getRotationCenter",function(){return this.transformManager.getRotationCenter()});b(c$,"setCenterAt",function(a,c){this.isJmolDataFrame()||this.transformManager.setCenterAt(a,c)},"~S,JU.P3");b(c$,"setCenterBitSet",function(a,c){var b=0<J.util.BSUtil.cardinalityOf(a)?this.getAtomSetCenter(a):null;this.isJmolDataFrame()||
this.transformManager.setNewRotationCenter(b,c)},"JU.BS,~B");b(c$,"setNewRotationCenter",function(a){this.isJmolDataFrame()||this.transformManager.setNewRotationCenter(a,!0)},"JU.P3");b(c$,"getNavigationCenter",function(){return this.transformManager.getNavigationCenter()});b(c$,"getNavigationDepthPercent",function(){return this.transformManager.getNavigationDepthPercent()});b(c$,"navigate",function(a,c){this.isJmolDataFrame()||(this.transformManager.navigateKey(a,c),!this.transformManager.vibrationOn&&
0!=a&&this.refresh(1,"Viewer:navigate()"))},"~N,~N");b(c$,"getNavigationOffset",function(){return this.transformManager.getNavigationOffset()});b(c$,"getNavigationOffsetPercent",function(a){return this.transformManager.getNavigationOffsetPercent(a)},"~S");b(c$,"isNavigating",function(){return this.transformManager.isNavigating()});b(c$,"isInPosition",function(a,c){return this.transformManager.isInPosition(a,c)},"JU.V3,~N");b(c$,"move",function(a,c,b,e,f,g,h){this.transformManager.move(a,c,b,e,f,g,
h);this.moveUpdate(g)},"J.api.JmolScriptEvaluator,JU.V3,~N,JU.V3,~N,~N,~N");b(c$,"stopMotion",function(){this.transformManager.stopMotion()});b(c$,"setRotationMatrix",function(a){this.transformManager.setRotation(a)},"JU.M3");b(c$,"moveTo",function(a,c,b,e,f,g,h,l,j,k,m,p,r,q,s,t,u){this.haveDisplay||(c=0);this.setTainted(!0);this.transformManager.moveTo(a,c,b,e,f,g,h,l,j,k,m,p,r,q,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");b(c$,"moveUpdate",function(a){0<
a?this.requestRepaintAndWait("moveUpdate"):0==a&&this.setSync()},"~N");b(c$,"getMoveToText",function(a){return this.transformManager.getMoveToText(a,!1)},"~N");b(c$,"navigateList",function(a,c){this.isJmolDataFrame()||this.transformManager.navigateList(a,c)},"J.api.JmolScriptEvaluator,JU.List");b(c$,"navigatePt",function(a){this.transformManager.setNavigatePt(a);this.setSync()},"JU.P3");b(c$,"navigateAxis",function(a,c){this.transformManager.navigateAxis(a,c);this.setSync()},"JU.V3,~N");b(c$,"navTranslatePercent",
function(a,c){this.isJmolDataFrame()||(this.transformManager.navTranslatePercentOrTo(0,a,c),this.setSync())},"~N,~N");b(c$,"setMouseEnabled",function(a){this.mouseEnabled=a},"~B");e(c$,"processMultitouchEvent",function(a,c,b,e,f,g){this.actionManager.processMultitouchEvent(a,c,b,e,f,g)},"~N,~N,~N,~N,JU.P3,~N");b(c$,"zoomBy",function(a){this.mouseEnabled&&this.transformManager.zoomBy(a);this.refresh(2,this.statusManager.syncingMouse?"Mouse: zoomBy "+a:"")},"~N");b(c$,"zoomByFactor",function(a,c,b){this.mouseEnabled&&
this.transformManager.zoomByFactor(a,c,b);this.refresh(2,!this.statusManager.syncingMouse?"":"Mouse: zoomByFactor "+a+(2147483647==c?"":" "+c+" "+b))},"~N,~N,~N");b(c$,"rotateXYBy",function(a,c){this.mouseEnabled&&this.transformManager.rotateXYBy(a,c,null);this.refresh(2,this.statusManager.syncingMouse?"Mouse: rotateXYBy "+a+" "+c:"")},"~N,~N");b(c$,"spinXYBy",function(a,c,b){this.mouseEnabled&&this.transformManager.spinXYBy(a,c,b);0==a&&0==c||this.refresh(2,this.statusManager.syncingMouse?"Mouse: spinXYBy "+
a+" "+c+" "+b:"")},"~N,~N,~N");b(c$,"rotateZBy",function(a,c,b){this.mouseEnabled&&this.transformManager.rotateZBy(a,c,b);this.refresh(2,this.statusManager.syncingMouse?"Mouse: rotateZBy "+a+(2147483647==c?"":" "+c+" "+b):"")},"~N,~N,~N");b(c$,"rotateSelected",function(a,c,b){this.isJmolDataFrame()||(this.mouseEnabled&&(this.transformManager.rotateXYBy(a,c,this.setMovableBitSet(b,!1)),this.refreshMeasures(!0)),this.refresh(2,this.statusManager.syncingMouse?"Mouse: rotateMolecule "+a+" "+c:""))},"~N,~N,JU.BS");
b(c$,"setMovableBitSet",function(a,c){null==a&&(a=this.getSelectionSet(!1));a=J.util.BSUtil.copy(a);J.util.BSUtil.andNot(a,this.getMotionFixedAtoms());c&&!this.global.allowMoveAtoms&&(a=this.modelSet.getMoleculeBitSet(a));return a},"JU.BS,~B");b(c$,"translateXYBy",function(a,c){this.mouseEnabled&&this.transformManager.translateXYBy(a,c);this.refresh(2,this.statusManager.syncingMouse?"Mouse: translateXYBy "+a+" "+c:"")},"~N,~N");e(c$,"rotateFront",function(){this.transformManager.rotateFront();this.refresh(1,
"Viewer:rotateFront()")});e(c$,"rotateX",function(a){this.transformManager.rotateX(a);this.refresh(1,"Viewer:rotateX()")},"~N");e(c$,"rotateY",function(a){this.transformManager.rotateY(a);this.refresh(1,"Viewer:rotateY()")},"~N");e(c$,"rotateZ",function(a){this.transformManager.rotateZ(a);this.refresh(1,"Viewer:rotateZ()")},"~N");e(c$,"rotateXDeg",function(a){this.rotateX(0.017453292*a)},"~N");e(c$,"rotateYDeg",function(a){this.rotateY(0.017453292*a)},"~N");b(c$,"translate",function(a,c,b,e){var f=
"\x00"==b?z(c):"%"==b?this.transformManager.percentToPixels(a,c):this.transformManager.angstromsToPixels(c*("n"==b?10:1));if(null!=e){if(0==f)return;this.transformManager.setSelectedTranslation(e,a,f)}else switch(a){case "X":case "x":"\x00"==b?this.transformManager.translateToPercent("x",c):this.transformManager.translateXYBy(f,0);break;case "Y":case "y":"\x00"==b?this.transformManager.translateToPercent("y",c):this.transformManager.translateXYBy(0,f);break;case "Z":case "z":"\x00"==b?this.transformManager.translateToPercent("z",
c):this.transformManager.translateZBy(f)}this.refresh(1,"Viewer:translate()")},"~S,~N,~S,JU.BS");b(c$,"getTranslationXPercent",function(){return this.transformManager.getTranslationXPercent()});b(c$,"getTranslationYPercent",function(){return this.transformManager.getTranslationYPercent()});b(c$,"getTranslationZPercent",function(){return this.transformManager.getTranslationZPercent()});b(c$,"getTranslationScript",function(){return this.transformManager.getTranslationScript()});b(c$,"getZShadeStart",
function(){return this.transformManager.getZShadeStart()});b(c$,"isWindowCentered",function(){return this.transformManager.isWindowCentered()});e(c$,"getZoomPercent",function(){return z(this.getZoomSetting())});b(c$,"getZoomSetting",function(){return this.transformManager.getZoomSetting()});e(c$,"getZoomPercentFloat",function(){return this.transformManager.getZoomPercentFloat()});b(c$,"getMaxZoomPercent",function(){return 2E5});b(c$,"slabReset",function(){this.transformManager.slabReset()});b(c$,
"getZoomEnabled",function(){return this.transformManager.zoomEnabled});b(c$,"getSlabEnabled",function(){return this.transformManager.slabEnabled});b(c$,"slabByPixels",function(a){this.transformManager.slabByPercentagePoints(a);this.refresh(3,"slabByPixels")},"~N");b(c$,"depthByPixels",function(a){this.transformManager.depthByPercentagePoints(a);this.refresh(3,"depthByPixels")},"~N");b(c$,"slabDepthByPixels",function(a){this.transformManager.slabDepthByPercentagePoints(a);this.refresh(3,"slabDepthByPixels")},
"~N");b(c$,"slabInternal",function(a,c){this.transformManager.slabInternal(a,c)},"JU.P4,~B");b(c$,"slabToPercent",function(a){this.transformManager.slabToPercent(a)},"~N");b(c$,"depthToPercent",function(a){this.transformManager.depthToPercent(a)},"~N");b(c$,"setSlabDepthInternal",function(a){this.transformManager.setSlabDepthInternal(a)},"~B");b(c$,"zValueFromPercent",function(a){return this.transformManager.zValueFromPercent(a)},"~N");e(c$,"getUnscaledTransformMatrix",function(){return this.transformManager.getUnscaledTransformMatrix()});
b(c$,"finalizeTransformParameters",function(){this.transformManager.finalizeTransformParameters();this.gdata.setSlab(this.transformManager.slabValue);this.gdata.setDepth(this.transformManager.depthValue);this.gdata.setZShade(this.transformManager.zShadeEnabled,this.transformManager.zSlabValue,this.transformManager.zDepthValue,this.global.zShadePower)});b(c$,"rotatePoint",function(a,c){this.transformManager.rotatePoint(a,c)},"JU.P3,JU.P3");b(c$,"transformPt",function(a){return this.transformManager.transformPoint(a)},
"JU.P3");b(c$,"transformPtVib",function(a,c){return this.transformManager.transformPointVib(a,c)},"JU.P3,J.util.Vibration");b(c$,"transformPtScr",function(a,c){this.transformManager.transformPointScr(a,c)},"JU.P3,JU.P3i");b(c$,"transformPtNoClip",function(a,c){this.transformManager.transformPointNoClip(a,c)},"JU.P3,JU.P3");b(c$,"transformPt3f",function(a,c){this.transformManager.transformPoint2(a,c)},"JU.P3,JU.P3");b(c$,"transformPoints",function(a,c){this.transformManager.transformPoints(a.length,
a,c)},"~A,~A");b(c$,"transformVector",function(a,c){this.transformManager.transformVector(a,c)},"JU.V3,JU.V3");b(c$,"unTransformPoint",function(a,c){this.transformManager.unTransformPoint(a,c)},"JU.P3,JU.P3");b(c$,"getScalePixelsPerAngstrom",function(a){return this.transformManager.scalePixelsPerAngstrom*(a||!this.antialiasDisplay?1:0.5)},"~B");b(c$,"scaleToScreen",function(a,c){return this.transformManager.scaleToScreen(a,c)},"~N,~N");b(c$,"unscaleToScreen",function(a,c){return this.transformManager.unscaleToScreen(a,
c)},"~N,~N");b(c$,"scaleToPerspective",function(a,c){return this.transformManager.scaleToPerspective(a,c)},"~N,~N");b(c$,"setSpin",function(a,c){if(JU.PT.isOneOf(a,"x;y;z;fps;X;Y;Z;FPS")){var b="x;y;z;fps;X;Y;Z;FPS".indexOf(a);switch(b){case 0:this.transformManager.setSpinXYZ(c,NaN,NaN);break;case 2:this.transformManager.setSpinXYZ(NaN,c,NaN);break;case 4:this.transformManager.setSpinXYZ(NaN,NaN,c);break;default:this.transformManager.setSpinFps(c);break;case 10:this.transformManager.setNavXYZ(c,NaN,
NaN);break;case 12:this.transformManager.setNavXYZ(NaN,c,NaN);break;case 14:this.transformManager.setNavXYZ(NaN,NaN,c);break;case 16:this.transformManager.setNavFps(c)}this.global.setI((10>b?"spin":"nav")+a,c)}},"~S,~N");b(c$,"getSpinState",function(){return this.getStateCreator().getSpinState(!1)});b(c$,"setSpinOn",function(a){a?this.transformManager.setSpinOn():this.transformManager.setSpinOff()},"~B");b(c$,"getSpinOn",function(){return this.transformManager.getSpinOn()});b(c$,"setNavOn",function(a){this.transformManager.setNavOn(a)},
"~B");b(c$,"getNavOn",function(){return this.transformManager.getNavOn()});b(c$,"setNavXYZ",function(a,c,b){this.transformManager.setNavXYZ(z(a),z(c),z(b))},"~N,~N,~N");b(c$,"getOrientationText",function(a,c){switch(a){case 1313866249:case 1073741863:case 1112541205:case 1112541206:case 1112541207:case 135270418:return this.modelSet.getBoundBoxOrientation(a,this.getSelectionSet(!1));case 1073742035:return this.stateManager.getSavedOrientationText(c);default:return this.transformManager.getOrientationText(a)}},
"~N,~S");b(c$,"getOrientationInfo",function(){return this.transformManager.getOrientationInfo()});b(c$,"getMatrixRotate",function(){return this.transformManager.getMatrixRotate()});b(c$,"getAxisAngle",function(a){this.transformManager.getAxisAngle(a)},"JU.A4");b(c$,"getTransformText",function(){return this.transformManager.getTransformText()});b(c$,"getRotation",function(a){this.transformManager.getRotation(a)},"JU.M3");b(c$,"getCurrentColorRange",function(){return this.colorManager.getPropertyColorRange()});
b(c$,"setDefaultColors",function(a){this.colorManager.setDefaultColors(a);this.global.setB("colorRasmol",a);this.global.setS("defaultColorScheme",a?"rasmol":"jmol")},"~B");b(c$,"getColorArgbOrGray",function(a){return this.gdata.getColorArgbOrGray(a)},"~N");b(c$,"setRubberbandArgb",function(a){this.colorManager.setRubberbandArgb(a)},"~N");b(c$,"getColixRubberband",function(){return this.colorManager.colixRubberband});b(c$,"setElementArgb",function(a,c){this.global.setS("=color "+J.util.Elements.elementNameFromNumber(a),
J.util.Escape.escapeColor(c));this.colorManager.setElementArgb(a,c)},"~N,~N");e(c$,"setVectorScale",function(a){this.global.setF("vectorScale",a);this.global.vectorScale=a},"~N");b(c$,"isVibrationOn",function(){return this.transformManager.vibrationOn});e(c$,"setVibrationScale",function(a){this.transformManager.setVibrationScale(a);this.global.vibrationScale=a;this.global.setF("vibrationScale",a)},"~N");b(c$,"setVibrationOff",function(){this.transformManager.setVibrationPeriod(0)});e(c$,"setVibrationPeriod",
function(a){this.transformManager.setVibrationPeriod(a);a=Math.abs(a);this.global.vibrationPeriod=a;this.global.setF("vibrationPeriod",a)},"~N");b(c$,"setObjectColor",function(a,c){null==c||0==c.length||this.setObjectArgb(a,JU.CU.getArgbFromString(c))},"~S,~S");b(c$,"setObjectVisibility",function(a,c){var b=J.viewer.StateManager.getObjectIdFromName(a);0<=b&&this.setShapeProperty(b,"display",c?Boolean.TRUE:Boolean.FALSE)},"~S,~B");b(c$,"setObjectArgb",function(a,c){var b=J.viewer.StateManager.getObjectIdFromName(a);
if(0>b)a.equalsIgnoreCase("axes")&&(this.setObjectArgb("axis1",c),this.setObjectArgb("axis2",c),this.setObjectArgb("axis3",c));else{this.global.objColors[b]=c;switch(b){case 0:this.gdata.setBackgroundArgb(c),this.colorManager.setColixBackgroundContrast(c)}this.global.setS(a+"Color",J.util.Escape.escapeColor(c))}},"~S,~N");b(c$,"setBackgroundImage",function(a,c){this.global.backgroundImageFileName=a;this.gdata.setBackgroundImage(c)},"~S,~O");b(c$,"getObjectArgb",function(a){return this.global.objColors[a]},
"~N");b(c$,"getObjectColix",function(a){a=this.getObjectArgb(a);return 0==a?this.getColixBackgroundContrast():J.util.C.getColix(a)},"~N");b(c$,"getFontState",function(a,c){return this.getStateCreator().getFontState(a,c)},"~S,javajs.awt.Font");e(c$,"setColorBackground",function(a){this.setObjectColor("background",a)},"~S");e(c$,"getBackgroundArgb",function(){return this.getObjectArgb(0)});b(c$,"setObjectMad",function(a,c,b){var e=J.viewer.StateManager.getObjectIdFromName(c.equalsIgnoreCase("axes")?
"axis":c);if(!(0>e)){if(-2==b||-4==b){var f=b+3;b=this.getObjectMad(e);0==b&&(b=f)}this.global.setB("show"+c,0!=b);this.global.objStateOn[e]=0!=b;0!=b&&(this.global.objMad[e]=b,this.setShapeSize(a,b,null))}},"~N,~S,~N");b(c$,"getObjectMad",function(a){return this.global.objStateOn[a]?this.global.objMad[a]:0},"~N");b(c$,"setPropertyColorScheme",function(a,c,b){this.global.propertyColorScheme=a;a.startsWith("translucent ")&&(c=!0,a=a.substring(12).trim());this.colorManager.setPropertyColorScheme(a,
c,b)},"~S,~B,~B");b(c$,"getPropertyColorScheme",function(){return this.global.propertyColorScheme});b(c$,"getColixBackgroundContrast",function(){return this.colorManager.colixBackgroundContrast});b(c$,"getSpecularState",function(){return this.getStateCreator().getSpecularState()});b(c$,"getColixAtomPalette",function(a,c){return this.colorManager.getColixAtomPalette(a,c)},"J.modelset.Atom,~N");b(c$,"getColixBondPalette",function(a,c){return this.colorManager.getColixBondPalette(a,c)},"J.modelset.Bond,~N");
b(c$,"getColorSchemeList",function(a){return this.colorManager.getColorSchemeList(a)},"~S");b(c$,"setUserScale",function(a){this.colorManager.setUserScale(a)},"~A");b(c$,"getColixForPropertyValue",function(a){return this.colorManager.getColixForPropertyValue(a)},"~N");b(c$,"getColorPointForPropertyValue",function(a){return JU.CU.colorPtFromInt2(this.gdata.getColorArgbOrGray(this.colorManager.getColixForPropertyValue(a)))},"~N");b(c$,"select",function(a,c,b,e){c&&(a=this.getUndeletedGroupAtomBits(a));
this.selectionManager.select(a,b,e);this.shapeManager.setShapeSizeBs(1,2147483647,null,null)},"JU.BS,~B,~N,~B");e(c$,"setSelectionSet",function(a){this.select(a,!1,0,!0)},"JU.BS");b(c$,"selectBonds",function(a){this.shapeManager.setShapeSizeBs(1,2147483647,null,a)},"JU.BS");b(c$,"displayAtoms",function(a,c,b,e,f){b&&(a=this.getUndeletedGroupAtomBits(a));c?this.selectionManager.display(this.modelSet,a,e,f):this.selectionManager.hide(this.modelSet,a,e,f)},"JU.BS,~B,~B,~N,~B");b(c$,"getUndeletedGroupAtomBits",
function(a){a=this.getAtomBits(1087373318,a);J.util.BSUtil.andNot(a,this.selectionManager.getDeletedAtoms());return a},"JU.BS");b(c$,"getHiddenSet",function(){return this.selectionManager.getHiddenSet()});b(c$,"isSelected",function(a){return this.selectionManager.isSelected(a)},"~N");b(c$,"isInSelectionSubset",function(a){return this.selectionManager.isInSelectionSubset(a)},"~N");b(c$,"reportSelection",function(a){this.modelSet.getSelectionHaloEnabled()&&this.setTainted(!0);(this.isScriptQueued()||
this.global.debugScript)&&this.scriptStatus(a)},"~S");b(c$,"getAtomSetCenter",function(a){return this.modelSet.getAtomSetCenter(a)},"JU.BS");b(c$,"clearAtomSets",function(){this.setSelectionSubset(null);this.definedAtomSets.clear()});b(c$,"getDefinedAtomSet",function(a){a=this.definedAtomSets.get(a.toLowerCase());return s(a,JU.BS)?a:new JU.BS},"~S");e(c$,"selectAll",function(){this.selectionManager.selectAll(!1)});b(c$,"setNoneSelected",function(a){this.noneSelected=a},"~B");b(c$,"getNoneSelected",
function(){return this.noneSelected?Boolean.TRUE:Boolean.FALSE});e(c$,"clearSelection",function(){this.selectionManager.clearSelection(!0);this.global.setB("hideNotSelected",!1)});b(c$,"setSelectionSubset",function(a){this.selectionManager.setSelectionSubset(a)},"JU.BS");b(c$,"getSelectionSubset",function(){return this.selectionManager.getSelectionSubset()});b(c$,"invertSelection",function(){this.selectionManager.invertSelection()});b(c$,"getSelectionSet",function(a){return this.selectionManager.getSelectionSet(a)},
"~B");b(c$,"setSelectedAtom",function(a,c){this.selectionManager.setSelectedAtom(a,c)},"~N,~B");b(c$,"isAtomSelected",function(a){return this.selectionManager.isAtomSelected(a)},"~N");e(c$,"getSelectionCount",function(){return this.selectionManager.getSelectionCount()});b(c$,"setFormalCharges",function(a){this.modelSet.setFormalCharges(this.getSelectionSet(!1),a)},"~N");e(c$,"addSelectionListener",function(a){this.selectionManager.addListener(a)},"J.api.JmolSelectionListener");e(c$,"removeSelectionListener",
function(a){this.selectionManager.addListener(a)},"J.api.JmolSelectionListener");b(c$,"getAtomBitSetEval",function(a,c){return!this.allowScripting?(System.out.println("viewer.getAtomBitSetEval not allowed"),new JU.BS):this.getScriptManager().getAtomBitSetEval(a,c)},"J.api.JmolScriptEvaluator,~O");e(c$,"setModeMouse",function(a){if(-1==a){null!=this.mouse&&this.disposeMouse();this.clearScriptQueue();this.clearThreads();this.haltScriptExecution();null!=this.scriptManager&&this.scriptManager.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(c){if(!y(c,Exception))throw c;}}},"~N");b(c$,"getRubberBandSelection",function(){return this.haveDisplay?this.actionManager.getRubberBand():null});b(c$,"isBound",function(a,c){return this.haveDisplay&&this.actionManager.isBound(a,
c)},"~N,~N");b(c$,"getCursorX",function(){return this.haveDisplay?this.actionManager.getCurrentX():0});b(c$,"getCursorY",function(){return this.haveDisplay?this.actionManager.getCurrentY():0});b(c$,"getDefaultDirectory",function(){return this.global.defaultDirectory});b(c$,"getLocalUrl",function(a){return this.apiPlatform.getLocalUrl(a)},"~S");e(c$,"getBufferedInputStream",function(a){return this.fileManager.getBufferedInputStream(a)},"~S");b(c$,"getBufferedReaderOrErrorMessageFromName",function(a,
c,b){return this.fileManager.getBufferedReaderOrErrorMessageFromName(a,c,b,!0)},"~S,~A,~B");b(c$,"setLoadParameters",function(a,c){null==a&&(a=new java.util.Hashtable);a.put("viewer",this);0<this.global.atomTypes.length&&a.put("atomTypes",this.global.atomTypes);a.containsKey("lattice")||a.put("lattice",this.global.ptDefaultLattice);this.global.applySymmetryToBonds&&a.put("applySymmetryToBonds",Boolean.TRUE);this.global.pdbGetHeader&&a.put("getHeader",Boolean.TRUE);this.global.pdbSequential&&a.put("isSequential",
Boolean.TRUE);a.put("stateScriptVersionInt",Integer.$valueOf(this.stateScriptVersionInt));if(!a.containsKey("filter")){var b=this.getDefaultLoadFilter();0<b.length&&a.put("filter",b)}b=c&&!this.global.appendNew&&0<this.getAtomCount();a.put("baseAtomIndex",Integer.$valueOf(c?this.getAtomCount():0));a.put("baseModelIndex",Integer.$valueOf(0==this.getAtomCount()?0:this.getModelCount()+(b?-1:0)));b&&a.put("merging",Boolean.TRUE);return a},"java.util.Map,~B");e(c$,"openFileAsyncSpecial",function(a,c){this.getScriptManager().openFileAsync(a,
c)},"~S,~N");e(c$,"openFile",function(a){this.zap(!0,!0,!1);return this.loadModelFromFileRepaint(null,a,null,null)},"~S");e(c$,"openFiles",function(a){this.zap(!0,!0,!1);return this.loadModelFromFileRepaint(null,null,a,null)},"~A");e(c$,"openReader",function(a,c,b){this.zap(!0,!0,!1);return this.loadModelFromFileRepaint(a,c,null,b)},"~S,~S,java.io.Reader");e(c$,"openDOM",function(a){this.zap(!0,!0,!1);return this.loadModelFromFileRepaint("?","?",null,a)},"~O");b(c$,"loadModelFromFileRepaint",function(a,
c,b,e){a=this.loadModelFromFile(a,c,b,e,!1,null,null,0);this.refresh(1,"loadModelFromFileRepaint");return a},"~S,~S,~A,~O");b(c$,"loadModelFromFile",function(a,c,b,e,f,g,h,l){null==g&&(g=this.setLoadParameters(null,f));var j=this.fileManager.getFileInfo();if(null!=b){if(null==h){h=(new JU.SB).append("load files");for(c=0;c<b.length;c++)h.append(" /*file*/$FILENAME"+(c+1)+"$")}c=System.currentTimeMillis();a=this.fileManager.createAtomSetCollectionFromFiles(b,this.setLoadParameters(g,f),f);c=System.currentTimeMillis()-
c;J.util.Logger.info("openFiles("+b.length+") "+c+" ms");b=g.get("fullPathNames");e=g.get("fileTypes");h=h.toString();for(c=0;c<b.length;c++){var k=b[c];null!=e&&null!=e[c]&&(k=e[c]+"::"+k);h=JU.PT.simpleReplace(h,"$FILENAME"+(c+1)+"$",J.util.Escape.eS(k.$replace("\\","/")))}h=(new JU.SB).append(h)}else null==e?(null==h&&(h=(new JU.SB).append("load /*file*/$FILENAME$")),a=this.openFileFull(c,f,g,h)):a=s(e,java.io.Reader)?this.fileManager.createAtomSetCollectionFromReader(a,c,e,g):this.fileManager.createAtomSetCollectionFromDOM(e,
g);if(0!=l)return this.fileManager.setFileInfo(j),this.loadAtomDataAndReturnError(a,l);if(g.containsKey("isData"))return a;null!=h&&(k=g.get("fullPathName"),null==k&&(k=""),g.containsKey("loadScript")&&(h=g.get("loadScript")),g.put("loadScript",h=(new JU.SB).append(JU.PT.simpleReplace(h.toString(),"$FILENAME$",J.util.Escape.eS(k.$replace("\\","/"))))));return this.createModelSetAndReturnError(a,f,h,g)},"~S,~S,~A,~O,~B,java.util.Map,JU.SB,~N");b(c$,"setLigandModel",function(a,c){null==this.ligandModels&&
(this.ligandModels=new java.util.Hashtable);this.ligandModels.put(a,c)},"~S,~S");b(c$,"getLigandModel",function(a,c,b,e){if(null==a){if(null!=this.ligandModelSet)for(a=this.ligandModels.entrySet().iterator();a.hasNext();){var f=a.next();s(f.getValue(),Boolean)&&a.remove()}return null}var g=c.equals("ligand_");g&&(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 h=this.ligandModels.get(a),f=null;if(s(h,Boolean))return null;null==h&&(h=this.ligandModels.get(a+b));var l=!1;if(null==h){if(g){f=this.setLoadFormat("#"+a,"#",!1);if(0==f.length)return null;this.scriptEcho("fetching "+f);h=this.getFileAsString(f)}else h=this.getFileAsString(c),l=null==e?-1:h.indexOf(e),0<=l&&(h=h.substring(0,l));(l=0==h.indexOf("java."))||this.ligandModels.put(a+b,h)}if(!g)return h;!l&&s(h,String)&&(b=h,0!=b.length&&(g=new java.util.Hashtable,g.put("modelOnly",Boolean.TRUE),
h=this.getModelAdapter().getAtomSetCollectionReader("ligand",null,J.io.JmolBinary.getBR(b),g),l=s(h,String),l||(h=this.getModelAdapter().getAtomSetCollection(h),l=s(h,String),null!=f&&!l&&this.scriptEcho(this.getModelAdapter().getAtomSetCollectionAuxiliaryInfo(h).get("modelLoadNote")))));return l?(this.scriptEcho(h.toString()),this.ligandModels.put(a,Boolean.FALSE),null):h},"~S,~S,~S,~S");b(c$,"openFileFull",function(a,c,b,e){if(null==a||0<=a.indexOf("[]"))return null;var f="openFile("+a+")";J.util.Logger.startTimer(f);
b=this.setLoadParameters(b,c);var g=a.startsWith("@"),h=b.containsKey("fileData");0==a.indexOf("$")&&b.put("smilesString",a.substring(1));var l=a.equalsIgnoreCase("string")||a.equals("Jmol Model Kit"),j=null;if(h){if(j=b.get("fileData"),b.containsKey("isData"))return this.loadInlineScript(j,"\x00",c,b)}else if(l){j=this.modelSet.getInlineData(-1);if(null==j)if(this.global.modelKitMode)j="5\n\nC 0 0 0\nH .63 .63 .63\nH -.63 -.63 .63\nH -.63 .63 -.63\nH .63 -.63 -.63";else return"cannot find string data";
null!=e&&b.put("loadScript",e=(new JU.SB).append(JU.PT.simpleReplace(e.toString(),"$FILENAME$",'data "model inline"\n'+j+'end "model inline"')))}null!=j?(c||this.zap(!0,!1,!1),!g&&(!h||l)&&this.getStateCreator().getInlineData(e,j,c,this.getDefaultLoadFilter()),a=this.fileManager.createAtomSetCollectionFromString(j,b,c)):a=this.fileManager.createAtomSetCollectionFromFile(a,b,c);J.util.Logger.checkTimer(f,!1);return a},"~S,~B,java.util.Map,JU.SB");e(c$,"openStringInline",function(a){a=this.openStringInlineParamsAppend(a,
null,!1);this.refresh(1,"openStringInline");return a},"~S");b(c$,"loadInline",function(a){return this.loadInlineScriptRepaint(a,this.global.inlineNewlineChar,!1)},"~S");b(c$,"loadInline",function(a,c){return this.loadInlineScriptRepaint(a,c,!1)},"~S,~S");e(c$,"loadInlineAppend",function(a,c){return this.loadInlineScriptRepaint(a,"\x00",c)},"~S,~B");b(c$,"loadInlineScriptRepaint",function(a,c,b){a=this.loadInlineScript(a,c,b,null);this.refresh(1,"loadInlineScript");return a},"~S,~S,~B");b(c$,"loadInline",
function(a){return this.loadInline(a,!1)},"~A");b(c$,"loadInline",function(a,c){if(null==a||0==a.length)return null;var b=this.openStringsInlineParamsAppend(a,null,c);this.refresh(1,"loadInline String[]");return b},"~A,~B");b(c$,"loadInline",function(a,c){if(null==a||0==a.size())return null;c||this.zap(!0,!1,!1);for(var b=new JU.List,e=0;e<a.size();e++)b.addLast(a.get(e));b=this.fileManager.createAtomSeCollectionFromArrayData(b,this.setLoadParameters(null,c),c);b=this.createModelSetAndReturnError(b,
c,null,null);this.refresh(1,"loadInline");return b},"java.util.List,~B");b(c$,"loadInlineScript",function(a,c,b,e){if(null==a||0==a.length)return null;a=J.viewer.Viewer.fixInlineString(a,c);0!=c.charCodeAt(0)&&J.util.Logger.info("loading model inline, "+a.length+" bytes, with newLine character "+c.charCodeAt(0)+" isAppend="+b);J.util.Logger.debugging&&J.util.Logger.debug(a);c=this.getDataSeparator();var f;if(null!=c&&""!==c&&0<=(f=a.indexOf(c))&&0>a.indexOf("# Jmol state")){for(var g=2;0<=(f=a.indexOf(c,
f+1));)g++;var h=Array(g),l=0,j=0;for(f=0;f<g;f++)l=a.indexOf(c,j),0>l&&(l=a.length),h[f]=a.substring(j,l),j=l+c.length;return this.openStringsInlineParamsAppend(h,e,b)}return this.openStringInlineParamsAppend(a,e,b)},"~S,~S,~B,java.util.Map");c$.fixInlineString=b(c$,"fixInlineString",function(a,c){var b;0<=a.indexOf("\\/n")&&(a=JU.PT.simpleReplace(a,"\n",""),a=JU.PT.simpleReplace(a,"\\/n","\n"),c=String.fromCharCode(0));if(0!=c.charCodeAt(0)&&"\n"!=c){var e=0<=a.indexOf("\n"),f=a.length;for(b=0;b<
f&&" "==a.charAt(b);++b);b<f&&a.charAt(b)==c&&(a=a.substring(b+1));a=e?JU.PT.simpleReplace(a,""+c,""):a.$replace(c,"\n")}return a},"~S,~S");b(c$,"openStringInlineParamsAppend",function(a,c,b){var e=J.io.JmolBinary.getBR(a),e=this.getModelAdapter().getFileTypeName(e);if(null==e)return"unknown file type";if(e.equals("spt"))return"cannot open script inline";c=this.setLoadParameters(c,b);var e=c.get("loadScript"),f=c.containsKey("isData");null==e&&(e=new JU.SB);b||this.zap(!0,!1,!1);f||this.getStateCreator().getInlineData(e,
a,b,this.getDefaultLoadFilter());a=this.fileManager.createAtomSetCollectionFromString(a,c,b);return this.createModelSetAndReturnError(a,b,e,null)},"~S,java.util.Map,~B");b(c$,"openStringsInlineParamsAppend",function(a,c,b){var e=new JU.SB;b||this.zap(!0,!1,!1);a=this.fileManager.createAtomSeCollectionFromStrings(a,e,this.setLoadParameters(c,b),b);return this.createModelSetAndReturnError(a,b,e,null)},"~A,java.util.Map,~B");b(c$,"getInlineChar",function(){return this.global.inlineNewlineChar});b(c$,
"getDataSeparator",function(){return this.global.getParameter("dataseparator")});b(c$,"createModelSetAndReturnError",function(a,c,b,e){var f=this.fileManager.getFullPathName(!1),g=this.fileManager.getFileName();null==b&&(this.setBooleanProperty("preserveState",!1),b=(new JU.SB).append('load "???"'));if(s(a,String))return this.setFileLoadStatus(J.constant.EnumFileStatus.NOT_LOADED,f,null,null,a,null),this.displayLoadErrors&&(!c&&!a.equals("#CANCELED#"))&&this.zapMsg(a),a;c?this.clearAtomSets():this.global.modelKitMode&&
!g.equals("Jmol Model Kit")&&this.setModelKitMode(!1);this.setFileLoadStatus(J.constant.EnumFileStatus.CREATING_MODELSET,f,g,null,null,null);this.pushHoldRepaintWhy("createModelSet");this.setErrorMessage(null,null);try{var h=new JU.BS;this.modelManager.createModelSet(f,g,b,a,h,c);if(0<h.cardinality()){var l=this.modelSet.getModelSetAuxiliaryInfoValue("jmolscript");this.modelSet.getModelSetAuxiliaryInfoBoolean("doMinimize")?this.minimize(2147483647,0,h,null,0,!0,!0,!0,!0):this.addHydrogens(h,!1,!0);
null!=l&&this.modelSet.getModelSetAuxiliaryInfo().put("jmolscript",l)}this.initializeModel(c)}catch(j){if(y(j,Error))this.handleError(j,!0),a=this.getShapeErrorState(),a="ERROR creating model: "+j+(0==a.length?"":"|"+a),this.zapMsg(a),this.setErrorMessage(a,null);else throw j;}this.popHoldRepaint("createModelSet \u0001## REPAINT_IGNORE ##");a=this.getErrorMessage();this.setFileLoadStatus(J.constant.EnumFileStatus.CREATED,f,g,this.getModelSetName(),a,null==e?null:e.get("async"));c&&(this.selectAll(),
this.setTainted(!0),this.axesAreTainted=!0);System.gc();return a},"~O,~B,JU.SB,java.util.Map");b(c$,"loadAtomDataAndReturnError",function(a,c){if(s(a,String))return a;this.setErrorMessage(null,null);try{switch(this.modelManager.createAtomDataSet(a,c),c){case 4166:this.setStatusFrameChanged(!0,!0);break;case 1649412120:this.shapeManager.deleteVdwDependentShapes(null)}}catch(b){if(y(b,Error)){this.handleError(b,!0);var e=this.getShapeErrorState(),e="ERROR adding atom data: "+b+(0==e.length?"":"|"+e);
this.zapMsg(e);this.setErrorMessage(e,null);this.setParallel(!1)}else throw b;}return this.getErrorMessage()},"~O,~N");e(c$,"getEmbeddedFileState",function(a){return this.fileManager.getEmbeddedFileState(a)},"~S");e(c$,"getFileAsBytes",function(a,c){return this.fileManager.getFileAsBytes(a,c,!0)},"~S,JU.OC");b(c$,"getCurrentFileAsString",function(){var a=this.getFullPathName(!1);if(a.equals("string")||a.equals("Jmol Model Kit"))return this.modelSet.getInlineData(this.getCurrentModelIndex());if(0<=
a.indexOf("[]"))return a;if("JSNode"===a)return"<DOM NODE>";a=this.modelManager.getModelSetPathName();return null==a?null:this.getFileAsString4(a,-1,!0,!1,!1)});b(c$,"getFullPathName",function(a){return this.fileManager.getFullPathName(a)},"~B");b(c$,"getFileName",function(){return this.fileManager.getFileName()});b(c$,"getFullPathNameOrError",function(a){return this.fileManager.getFullPathNameOrError(a)},"~S");e(c$,"getFileAsString",function(a){return this.getFileAsString4(a,-1,!1,!1,!1)},"~S");
b(c$,"getFileAsString4",function(a,c,b,e,f){if(null==a)return this.getCurrentFileAsString();var g=Array(2);g[0]=a;this.fileManager.getFileDataOrErrorAsString(g,c,b,e,f);return g[1]},"~S,~N,~B,~B,~B");b(c$,"getFileAsStringBin",function(a){return this.fileManager.getFileDataOrErrorAsString(a,-1,!1,!0,!1)},"~A");b(c$,"getFilePath",function(a,c){return this.fileManager.getFilePath(a,!1,c)},"~S,~B");b(c$,"getFileInfo",function(){return this.fileManager.getFileInfo()});b(c$,"setFileInfo",function(a){this.fileManager.setFileInfo(a)},
"~A");b(c$,"autoCalculate",function(a){switch(a){case 1112539151:this.modelSet.getSurfaceDistanceMax();break;case 1112539150:this.modelSet.calculateStraightness()}},"~N");b(c$,"getSurfaceDistanceMax",function(){return this.modelSet.getSurfaceDistanceMax()});b(c$,"calculateStraightness",function(){this.modelSet.setHaveStraightness(!1);this.modelSet.calculateStraightness()});b(c$,"calculateSurface",function(a,c){null==a&&(a=this.getSelectionSet(!1));if(3.4028235E38==c||-1==c)this.addStateScriptRet("calculate surfaceDistance "+
(3.4028235E38==c?"FROM":"WITHIN"),null,a,null,"",!1,!0);return this.modelSet.calculateSurface(a,c)},"JU.BS,~N");b(c$,"getStructureList",function(){return this.global.getStructureList()});b(c$,"setStructureList",function(a,c){this.global.setStructureList(a,c);this.modelSet.setStructureList(this.getStructureList())},"~A,J.constant.EnumStructure");b(c$,"getDefaultStructure",function(a,c){null==a&&(a=this.getSelectionSet(!1));return this.modelSet.getDefaultStructure(a,c)},"JU.BS,JU.BS");b(c$,"calculateStructures",
function(a,c,b){null==a&&(a=this.getSelectionSet(!1));return this.modelSet.calculateStructures(a,c,this.global.dsspCalcHydrogen,b)},"JU.BS,~B,~B");e(c$,"getSelectedAtomIterator",function(a,c,b,e){return this.modelSet.getSelectedAtomIterator(a,c,b,!1,e)},"JU.BS,~B,~B,~B");e(c$,"setIteratorForAtom",function(a,c,b){this.modelSet.setIteratorForAtom(a,-1,c,b,null)},"J.api.AtomIndexIterator,~N,~N");e(c$,"setIteratorForPoint",function(a,c,b,e){this.modelSet.setIteratorForPoint(a,c,b,e)},"J.api.AtomIndexIterator,~N,JU.P3,~N");
e(c$,"fillAtomData",function(a,c){a.programInfo="Jmol Version "+J.viewer.Viewer.getJmolVersion();a.fileName=this.getFileName();this.modelSet.fillAtomData(a,c)},"J.atomdata.AtomData,~N");b(c$,"addStateScript",function(a,c,b){return this.addStateScriptRet(a,null,null,null,null,c,b)},"~S,~B,~B");b(c$,"addStateScriptRet",function(a,c,b,e,f,g,h){return this.modelSet.addStateScript(a,c,b,e,f,g,h)},"~S,JU.BS,JU.BS,JU.BS,~S,~B,~B");b(c$,"getEchoStateActive",function(){return this.modelSet.getEchoStateActive()});
b(c$,"setEchoStateActive",function(a){this.modelSet.setEchoStateActive(a)},"~B");b(c$,"clearModelDependentObjects",function(){this.setFrameOffsets(null);this.stopMinimization();this.minimizer=null;null!=this.smilesMatcher&&(this.smilesMatcher=null);null!=this.symmetry&&(this.symmetry=null)});b(c$,"zap",function(a,c,b){this.clearThreads();null!=this.modelSet?(this.ligandModelSet=null,this.clearModelDependentObjects(),this.fileManager.clear(),this.clearRepaintManager(-1),this.animationManager.clear(),
this.transformManager.clear(),this.selectionManager.clear(),this.clearAllMeasurements(),this.clearMinimization(),this.gdata.clear(),this.modelManager.zap(),null!=this.scriptManager&&this.scriptManager.clear(!1),null!=this.nmrCalculation&&this.getNMRCalculation().setChemicalShiftReference(null,0),this.haveDisplay&&(this.mouse.clear(),this.clearTimeouts(),this.actionManager.clear()),this.stateManager.clear(this.global),this.tempArray.clear(),this.chainMap.clear(),this.chainList.clear(),this.colorManager.clear(),
this.definedAtomSets.clear(),null!=this.dataManager&&this.dataManager.clear(),c&&(b&&this.global.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.modelManager.zap();this.initializeModel(!1);a&&this.setFileLoadStatus(J.constant.EnumFileStatus.ZAPPED,
null,c?"resetUndo":this.getZapName(),null,null,null);J.util.Logger.debugging&&J.util.Logger.checkMemory()},"~B,~B,~B");b(c$,"zapMsg",function(a){this.zap(!0,!0,!1);this.echoMessage(a)},"~S");b(c$,"echoMessage",function(a){this.loadShape(30);this.setShapeProperty(30,"font",this.getFont3D("SansSerif","Plain",9));this.setShapeProperty(30,"target","error");this.setShapeProperty(30,"text",a)},"~S");b(c$,"initializeModel",function(a){this.clearThreads();a?this.animationManager.initializePointers(1):(this.reset(!0),
this.selectAll(),this.rotatePrev1=this.rotateBondIndex=-1,this.noneSelected=this.movingSelected=!1,this.hoverEnabled=!0,this.transformManager.setCenter(),this.animationManager.initializePointers(1),this.modelSet.getModelSetAuxiliaryInfoBoolean("isPyMOL")||(this.clearAtomSets(),this.setCurrentModelIndex(0)),this.setBackgroundModelIndex(-1),this.setFrankOn(this.getShowFrank()),this.startHoverWatcher(!0),this.setTainted(!0),this.finalizeTransformParameters())},"~B");e(c$,"startHoverWatcher",function(a){a&&
this.inMotion||(!this.haveDisplay||a&&(!this.hoverEnabled||this.animationManager.animationOn))||this.actionManager.startHoverWatcher(a)},"~B");e(c$,"getModelSetName",function(){return null==this.modelSet?null:this.modelSet.modelSetName});e(c$,"getModelSetFileName",function(){return this.modelManager.getModelSetFileName()});b(c$,"getUnitCellInfoText",function(){return this.modelSet.getUnitCellInfoText()});b(c$,"getUnitCellInfo",function(a){var c=this.getCurrentUnitCell();return null==c?NaN:c.getUnitCellInfoType(a)},
"~N");b(c$,"getSpaceGroupInfo",function(a){return this.modelSet.getSymTemp(!0).getSpaceGroupInfo(this.modelSet,-1,a,0,null,null,null)},"~S");b(c$,"getPolymerPointsAndVectors",function(a,c){this.modelSet.getPolymerPointsAndVectors(a,c,this.global.traceAlpha,this.global.sheetSmoothing)},"JU.BS,JU.List");b(c$,"getModelSetProperty",function(a){return this.modelSet.getModelSetProperty(a)},"~S");b(c$,"getModelSetAuxiliaryInfoValue",function(a){return this.modelSet.getModelSetAuxiliaryInfoValue(a)},"~S");
e(c$,"getModelSetPathName",function(){return this.modelManager.getModelSetPathName()});b(c$,"getModelSetTypeName",function(){return this.modelSet.getModelSetTypeName()});e(c$,"haveFrame",function(){return this.haveModelSet()});b(c$,"haveModelSet",function(){return null!=this.modelSet});b(c$,"clearBfactorRange",function(){this.modelSet.clearBfactorRange()});b(c$,"getHybridizationAndAxes",function(a,c,b,e){return this.modelSet.getHybridizationAndAxes(a,0,c,b,e,!0,!0)},"~N,JU.V3,JU.V3,~S");b(c$,"getMoleculeBitSet",
function(a){return this.modelSet.getMoleculeBitSetForAtom(a)},"~N");b(c$,"getAllAtoms",function(){return this.getModelUndeletedAtomsBitSet(-1)});b(c$,"getModelUndeletedAtomsBitSet",function(a){a=this.modelSet.getModelAtomBitSetIncludingDeleted(a,!0);this.excludeAtoms(a,!1);return a},"~N");b(c$,"getModelBitSet",function(a,c){return this.modelSet.getModelBitSet(a,c)},"JU.BS,~B");b(c$,"getModelUndeletedAtomsBitSetBs",function(a){a=this.modelSet.getModelAtomBitSetIncludingDeletedBs(a);this.excludeAtoms(a,
!1);return a},"JU.BS");b(c$,"excludeAtoms",function(a,c){this.selectionManager.excludeAtoms(a,c)},"JU.BS,~B");b(c$,"getModelSet",function(){return this.modelSet});b(c$,"getBoundBoxCommand",function(a){return this.modelSet.getBoundBoxCommand(a)},"~B");b(c$,"setBoundBox",function(a,c,b,e){this.modelSet.setBoundBox(a,c,b,e)},"JU.P3,JU.P3,~B,~N");e(c$,"getBoundBoxCenter",function(){return this.modelSet.getBoundBoxCenter(this.animationManager.currentModelIndex)});b(c$,"getAverageAtomPoint",function(){return this.modelSet.getAverageAtomPoint()});
b(c$,"calcBoundBoxDimensions",function(a,c){this.modelSet.calcBoundBoxDimensions(a,c);this.axesAreTainted=!0},"JU.BS,~N");b(c$,"getBoxInfo",function(a,c){return this.modelSet.getBoxInfo(a,c)},"JU.BS,~N");b(c$,"calcRotationRadius",function(a){return this.modelSet.calcRotationRadius(this.animationManager.currentModelIndex,a)},"JU.P3");b(c$,"calcRotationRadiusBs",function(a){return this.modelSet.calcRotationRadiusBs(a)},"JU.BS");e(c$,"getBoundBoxCornerVector",function(){return this.modelSet.getBoundBoxCornerVector()});
b(c$,"getBoundBoxVertices",function(){return this.modelSet.getBboxVertices()});b(c$,"getBoundBoxInfo",function(){return this.modelSet.getBoundBoxInfo()});b(c$,"getBoundBoxModels",function(){return this.modelSet.getBoundBoxModels()});b(c$,"getBoundBoxCenterX",function(){return m(this.dimScreen.width/2)});b(c$,"getBoundBoxCenterY",function(){return m(this.dimScreen.height/2)});e(c$,"getModelCount",function(){return null==this.modelSet?0:this.modelSet.modelCount});b(c$,"getModelInfoAsString",function(){return this.modelSet.getModelInfoAsString()});
b(c$,"getSymmetryInfoAsString",function(){return this.modelSet.getSymmetryInfoAsString()});b(c$,"getSymmetryOperation",function(a,c,b,e,f){return this.modelSet.getSymmetryInfoString(this.animationManager.currentModelIndex,a,c,b,e,null,f)},"~S,~N,JU.P3,JU.P3,~B");e(c$,"getModelSetProperties",function(){return this.modelSet.getModelSetProperties()});e(c$,"getModelSetAuxiliaryInfo",function(){return this.modelSet.getModelSetAuxiliaryInfo()});e(c$,"getModelNumber",function(a){return 0>a?a:this.modelSet.getModelNumber(a)},
"~N");b(c$,"getModelFileNumber",function(a){return 0>a?0:this.modelSet.getModelFileNumber(a)},"~N");e(c$,"getModelNumberDotted",function(a){return 0>a?"0":null==this.modelSet?null:this.modelSet.getModelNumberDotted(a)},"~N");e(c$,"getModelName",function(a){return null==this.modelSet?null:this.modelSet.getModelName(a)},"~N");e(c$,"getModelProperties",function(a){return this.modelSet.getModelProperties(a)},"~N");e(c$,"getModelProperty",function(a,c){return this.modelSet.getModelProperty(a,c)},"~N,~S");
b(c$,"getModelFileInfo",function(){return this.getPropertyManager().getModelFileInfo(this.getVisibleFramesBitSet())});b(c$,"getModelFileInfoAll",function(){return this.getPropertyManager().getModelFileInfo(null)});e(c$,"getModelAuxiliaryInfo",function(a){return this.modelSet.getModelAuxiliaryInfo(a)},"~N");e(c$,"getModelAuxiliaryInfoValue",function(a,c){return this.modelSet.getModelAuxiliaryInfoValue(a,c)},"~N,~S");b(c$,"getModelNumberIndex",function(a,c,b){return this.modelSet.getModelNumberIndex(a,
c,b)},"~N,~B,~B");b(c$,"modelSetHasVibrationVectors",function(){return this.modelSet.modelSetHasVibrationVectors()});e(c$,"modelGetLastVibrationIndex",function(a,c){return this.modelSet.getLastVibrationVector(a,c)},"~N,~N");e(c$,"modelHasVibrationVectors",function(a){return 0<=this.modelSet.getLastVibrationVector(a,4166)},"~N");e(c$,"getChainCount",function(){return this.modelSet.getChainCount(!0)});e(c$,"getChainCountInModel",function(a){return this.modelSet.getChainCountInModel(a,!1)},"~N");b(c$,
"getChainCountInModelWater",function(a,c){return this.modelSet.getChainCountInModel(a,c)},"~N,~B");e(c$,"getGroupCount",function(){return this.modelSet.getGroupCount()});e(c$,"getGroupCountInModel",function(a){return this.modelSet.getGroupCountInModel(a)},"~N");e(c$,"getPolymerCount",function(){return this.modelSet.getBioPolymerCount()});e(c$,"getPolymerCountInModel",function(a){return this.modelSet.getBioPolymerCountInModel(a)},"~N");e(c$,"getAtomCount",function(){return this.modelSet.getAtomCount()});
e(c$,"getAtomCountInModel",function(a){return this.modelSet.getAtomCountInModel(a)},"~N");e(c$,"getBondCount",function(){return this.modelSet.bondCount});e(c$,"getBondCountInModel",function(a){return this.modelSet.getBondCountInModel(a)},"~N");b(c$,"getBondsForSelectedAtoms",function(a){return this.modelSet.getBondsForSelectedAtoms(a,this.global.bondModeOr||1==J.util.BSUtil.cardinalityOf(a))},"JU.BS");b(c$,"frankClicked",function(a,c){return!this.global.disablePopupMenu&&this.getShowFrank()&&this.shapeManager.checkFrankclicked(a,
c)},"~N,~N");b(c$,"frankClickedModelKit",function(a,c){return!this.global.disablePopupMenu&&this.global.modelKitMode&&0<=a&&0<=c&&40>a&&80>c},"~N,~N");e(c$,"findNearestAtomIndex",function(a,c){return this.findNearestAtomIndexMovable(a,c,!1)},"~N,~N");b(c$,"findNearestAtomIndexMovable",function(a,c,b){return null==this.modelSet||!this.global.atomPicking?-1:this.modelSet.findNearestAtomIndex(a,c,b?this.selectionManager.getMotionFixedAtoms():null,this.global.minPixelSelRadius)},"~N,~N,~B");b(c$,"findAtomsInRectangle",
function(a){return this.modelSet.findAtomsInRectangle(a,this.getVisibleFramesBitSet())},"J.util.Rectangle");b(c$,"toCartesian",function(a,c){var b=this.getCurrentUnitCell();null!=b&&b.toCartesian(a,c)},"JU.P3,~B");b(c$,"toFractional",function(a,c){var b=this.getCurrentUnitCell();null!=b&&b.toFractional(a,c)},"JU.P3,~B");b(c$,"toUnitCell",function(a,c){var b=this.getCurrentUnitCell();null!=b&&b.toUnitCell(a,c)},"JU.P3,JU.P3");b(c$,"setCurrentCage",function(a){a=[a,null];this.shapeManager.getShapePropertyData(24,
"unitCell",a);this.modelSet.setModelCage(this.getCurrentModelIndex(),a[1])},"~S");b(c$,"setCurrentCagePts",function(a){this.modelSet.setModelCage(this.getCurrentModelIndex(),this.getSymmetry().getUnitCell(a,!0))},"~A");b(c$,"setCurrentUnitCellOffset",function(a,c){this.modelSet.setUnitCellOffset(this.getCurrentUnitCell(),a,c)},"JU.P3,~N");b(c$,"addUnitCellOffset",function(a){var c=this.getCurrentUnitCell();null!=c&&a.add(c.getCartesianOffset())},"JU.P3");b(c$,"setAtomData",function(a,c,b,e){this.modelSet.setAtomData(a,
c,b,e);2==a&&this.checkCoordinatesChanged();this.refreshMeasures(!0)},"~N,~S,~S,~B");e(c$,"setCenterSelected",function(){this.setCenterBitSet(this.getSelectionSet(!1),!0)});b(c$,"setApplySymmetryToBonds",function(a){this.global.applySymmetryToBonds=a},"~B");e(c$,"setBondTolerance",function(a){this.global.setF("bondTolerance",a);this.global.bondTolerance=a},"~N");e(c$,"setMinBondDistance",function(a){this.global.setF("minBondDistance",a);this.global.minBondDistance=a},"~N");b(c$,"getAtomIndices",function(a){return this.modelSet.getAtomIndices(a)},
"JU.BS");b(c$,"getAtomBits",function(a,c){return this.modelSet.getAtomBits(a,c)},"~N,~O");b(c$,"getSequenceBits",function(a,c){return this.modelSet.getSequenceBits(a,c)},"~S,JU.BS");b(c$,"getAtomsNearPt",function(a,c){var b=new JU.BS;this.modelSet.getAtomsWithin(a,c,b,-1);return b},"~N,JU.P3");b(c$,"getAtomsNearPts",function(a,c,b){return this.modelSet.getAtomsWithinBs(a,c,b)},"~N,~A,JU.BS");b(c$,"getAtomsNearPlane",function(a,c){return this.modelSet.getAtomsWithin(a,c)},"~N,JU.P4");b(c$,"getAtomsWithinRadius",
function(a,c,b,e){return this.modelSet.getAtomsWithinRD(a,c,b,e)},"~N,JU.BS,~B,J.atomdata.RadiusData");b(c$,"getAtomsConnected",function(a,c,b,e){return this.modelSet.getAtomsConnected(a,c,b,e)},"~N,~N,~N,JU.BS");b(c$,"getBranchBitSet",function(a,c,b){return 0>a||a>=this.getAtomCount()?new JU.BS:J.util.JmolMolecule.getBranchBitSet(this.modelSet.atoms,a,this.getModelUndeletedAtomsBitSet(this.modelSet.atoms[a].modelIndex),null,c,b,!0)},"~N,~N,~B");b(c$,"getAtomIndexFromAtomNumber",function(a){return this.modelSet.getAtomIndexFromAtomNumber(a,
this.getVisibleFramesBitSet())},"~N");e(c$,"getElementsPresentBitSet",function(a){return this.modelSet.getElementsPresentBitSet(a)},"~N");e(c$,"getHeteroList",function(a){return this.modelSet.getHeteroList(a)},"~N");b(c$,"getVisibleSet",function(){return this.modelSet.getVisibleSet()});b(c$,"getClickableSet",function(){return this.modelSet.getClickableSet()});b(c$,"calcSelectedGroupsCount",function(){this.modelSet.calcSelectedGroupsCount(this.getSelectionSet(!1))});b(c$,"calcSelectedMonomersCount",
function(){this.modelSet.calcSelectedMonomersCount(this.getSelectionSet(!1))});b(c$,"calcSelectedMoleculesCount",function(){this.modelSet.calcSelectedMoleculesCount(this.getSelectionSet(!1))});b(c$,"getFileHeader",function(){return this.modelSet.getFileHeader(this.animationManager.currentModelIndex)});b(c$,"getFileData",function(){return this.modelSet.getFileData(this.animationManager.currentModelIndex)});b(c$,"getCifData",function(a){a=this.getModelFileName(a);a=this.getFileAsString(a);return null==
a?null:J.io.CifDataReader.readCifData(J.io.JmolBinary.getBR(a))},"~N");b(c$,"getPDBHeader",function(){return this.modelSet.getPDBHeader(this.animationManager.currentModelIndex)});b(c$,"getAuxiliaryInfo",function(a){return this.modelSet.getAuxiliaryInfo(this.getModelBitSet(this.getAtomBitSet(a),!1))},"~O");b(c$,"getChimeInfo",function(a){return this.getPropertyManager().getChimeInfo(a,this.getSelectionSet(!1))},"~N");b(c$,"getStateCreator",function(){null==this.sc&&(this.sc=J.api.Interface.getOptionInterface("viewer.StateCreator")).setViewer(this);
return this.sc});b(c$,"getWrappedStateScript",function(){return this.getOutputManager().getWrappedState(null,null,null,null)});e(c$,"getStateInfo",function(){return this.getStateInfo3(null,0,0)});b(c$,"getStateInfo3",function(a,c,b){return this.global.preserveState?this.getStateCreator().getStateScript(a,c,b):""},"~S,~N,~N");b(c$,"getStructureState",function(){return this.getStateCreator().getModelState(null,!1,!0)});b(c$,"getProteinStructureState",function(){return this.modelSet.getProteinStructureState(this.getSelectionSet(!1),
!1,!1,3)});b(c$,"getCoordinateState",function(a){return this.getStateCreator().getAtomicPropertyState(2,a)},"JU.BS");b(c$,"setCurrentColorRange",function(a){var c=this.getDataFloat(a);a=null==c?null:this.getDataManager().getData(a)[2];null!=a&&this.global.rangeSelected&&a.and(this.getSelectionSet(!1));this.setCurrentColorRangeData(c,a)},"~S");b(c$,"setCurrentColorRangeData",function(a,c){this.colorManager.setPropertyColorRangeData(a,c,this.global.propertyColorScheme)},"~A,JU.BS");b(c$,"setCurrentColorRange",
function(a,c){this.colorManager.setPropertyColorRange(a,c)},"~N,~N");b(c$,"getArgbMinMax",function(a,c,b){return this.colorManager.propertyColorEncoder.getArgbMinMax(a,c,b)},"~N,~N,~N");b(c$,"setData",function(a,c,b,e,f,g,h){this.getDataManager().setData(a,c,b,this.getAtomCount(),e,f,g,h)},"~S,~A,~N,~N,~N,~N,~N");b(c$,"getData",function(a){return this.getDataManager().getData(a)},"~S");b(c$,"getDataFloat",function(a){return this.getDataManager().getDataFloatA(a)},"~S");b(c$,"getDataFloat2D",function(a){return this.getDataManager().getDataFloat2D(a)},
"~S");b(c$,"getDataFloat3D",function(a){return this.getDataManager().getDataFloat3D(a)},"~S");b(c$,"getDataFloatAt",function(a,c){return this.getDataManager().getDataFloat(a,c)},"~S,~N");e(c$,"getAltLocListInModel",function(a){return this.modelSet.getAltLocListInModel(a)},"~N");b(c$,"setConformation",function(){return this.modelSet.setConformation(this.getSelectionSet(!1))});b(c$,"getConformation",function(a,c,b){return this.modelSet.getConformation(a,c,b)},"~N,~N,~B");b(c$,"autoHbond",function(a,
c,b){null==a&&(a=c=this.getSelectionSet(!1));return this.modelSet.autoHbond(a,c,b)},"JU.BS,JU.BS,~B");e(c$,"havePartialCharges",function(){return null!=this.modelSet.getPartialCharges()});b(c$,"getCurrentUnitCell",function(){if(0<=this.animationManager.currentAtomIndex)return this.modelSet.getUnitCellForAtom(this.animationManager.currentAtomIndex);if(0<=this.animationManager.currentModelIndex)return this.modelSet.getUnitCell(this.animationManager.currentModelIndex);for(var a=this.getVisibleFramesBitSet(),
c=null,b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1)){var e=this.modelSet.getUnitCell(b);if(null!=e)if(null==c)c=e;else if(!c.unitCellEquals(e))return null}return c});b(c$,"getModelUnitCell",function(a){return this.modelSet.getUnitCell(a)},"~N");b(c$,"getDefaultMeasurementLabel",function(a){switch(a){case 2:return this.global.defaultDistanceLabel;case 3:return this.global.defaultAngleLabel;default:return this.global.defaultTorsionLabel}},"~N");e(c$,"getMeasurementCount",function(){var a=this.getShapePropertyAsInt(6,
"count");return 0>=a?0:a});e(c$,"getMeasurementStringValue",function(a){return""+this.getShapePropertyIndex(6,"stringValue",a)},"~N");b(c$,"getMeasurementInfo",function(){return this.getShapeProperty(6,"info")});b(c$,"getMeasurementInfoAsString",function(){return this.getShapeProperty(6,"infostring")});e(c$,"getMeasurementCountPlusIndices",function(a){return this.getShapePropertyIndex(6,"countPlusIndices",a)},"~N");b(c$,"setPendingMeasurement",function(a){this.loadShape(6);this.setShapeProperty(6,
"pending",a)},"J.modelset.MeasurementPending");b(c$,"getPendingMeasurement",function(){return this.getShapeProperty(6,"pending")});b(c$,"clearAllMeasurements",function(){this.setShapeProperty(6,"clear",null)});e(c$,"clearMeasurements",function(){this.evalString("measures delete")});b(c$,"setAnimation",function(a){switch(a){case 1073742098:this.animationManager.reverseAnimation();case 1073742096:case 266287:this.animationManager.animationOn||this.animationManager.resumeAnimation();break;case 20487:this.animationManager.animationOn&&
!this.animationManager.animationPaused&&this.animationManager.pauseAnimation();break;case 1073742037:this.animationManager.setAnimationNext();break;case 1073742108:this.animationManager.setAnimationPrevious();break;case 1073741942:case 1073742126:this.animationManager.rewindAnimation();break;case 1073741993:this.animationManager.setAnimationLast()}},"~N");b(c$,"setAnimationDirection",function(a){this.animationManager.setAnimationDirection(a)},"~N");b(c$,"getAnimationDirection",function(){return this.animationManager.animationDirection});
b(c$,"getAnimationInfo",function(){return this.getStateCreator().getInfo(this.animationManager)});e(c$,"setAnimationFps",function(a){1>a&&(a=1);50<a&&(a=50);this.animationManager.setAnimationFps(a)},"~N");b(c$,"setAnimationMode",function(a){a.equalsIgnoreCase("once")?this.setAnimationReplayMode(J.constant.EnumAnimationMode.ONCE,0,0):a.equalsIgnoreCase("loop")?this.setAnimationReplayMode(J.constant.EnumAnimationMode.LOOP,1,1):a.startsWith("pal")&&this.setAnimationReplayMode(J.constant.EnumAnimationMode.PALINDROME,
1,1)},"~S");b(c$,"setAnimationReplayMode",function(a,c,b){this.animationManager.setAnimationReplayMode(a,c,b)},"J.constant.EnumAnimationMode,~N,~N");b(c$,"getAnimationReplayMode",function(){return this.animationManager.animationReplayMode});b(c$,"setAnimationOn",function(a){a!=this.animationManager.animationOn&&this.animationManager.setAnimationOn(a)},"~B");b(c$,"setAnimationRange",function(a,c){this.animationManager.setAnimationRange(a,c)},"~N,~N");e(c$,"getVisibleFramesBitSet",function(){return this.modelSet.selectDisplayedTrajectories(J.util.BSUtil.copy(this.animationManager.bsVisibleModels))});
b(c$,"isAnimationOn",function(){return this.animationManager.animationOn});b(c$,"setMovie",function(a){this.animationManager.setMovie(a)},"java.util.Map");b(c$,"setAnimMorphCount",function(a){this.animationManager.setMorphCount(a)},"~N");b(c$,"isMovie",function(){return this.animationManager.isMovie});b(c$,"getFrameCount",function(){return this.animationManager.getFrameCount()});b(c$,"defineAtomSets",function(a){this.definedAtomSets.putAll(a)},"java.util.Map");b(c$,"morph",function(a){this.animationManager.morph(a)},
"~N");b(c$,"setAnimDisplay",function(a){this.animationManager.setDisplay(a);this.isAnimationOn()||this.animationManager.morph(this.animationManager.currentMorphModel+1)},"JU.BS");b(c$,"setCurrentModelIndex",function(a){-2147483648==a?(this.prevFrame=-2147483648,this.setCurrentModelIndexClear(this.animationManager.currentModelIndex,!0)):this.animationManager.setModel(a,!0)},"~N");b(c$,"setTrajectory",function(a){this.modelSet.setTrajectory(a)},"~N");b(c$,"setTrajectoryBs",function(a){this.modelSet.setTrajectoryBs(a)},
"JU.BS");b(c$,"isTrajectory",function(a){return this.modelSet.isTrajectory(a)},"~N");b(c$,"getBitSetTrajectories",function(){return this.modelSet.getBitSetTrajectories()});b(c$,"getTrajectoryState",function(){return this.getStateCreator().getTrajectoryState()});b(c$,"setFrameOffset",function(a){this.transformManager.setFrameOffset(a)},"~N");b(c$,"setFrameOffsets",function(a){this.bsFrameOffsets=a;this.transformManager.setFrameOffsets(this.frameOffsets=this.modelSet.getFrameOffsets(this.bsFrameOffsets))},
"JU.BS");b(c$,"getFrameOffsets",function(){return this.bsFrameOffsets});b(c$,"setCurrentModelIndexClear",function(a,c){this.animationManager.setModel(a,c)},"~N,~B");b(c$,"getCurrentModelIndex",function(){return this.animationManager.currentModelIndex});e(c$,"getDisplayModelIndex",function(){return this.animationManager.currentModelIndex});b(c$,"haveFileSet",function(){return 1<this.getModelCount()&&2E6<this.getModelNumber(2147483647)});b(c$,"setBackgroundModelIndex",function(a){this.animationManager.setBackgroundModelIndex(a);
this.global.setS("backgroundModel",this.modelSet.getModelNumberDotted(a))},"~N");b(c$,"setFrameVariables",function(){this.global.setS("animationMode",this.animationManager.animationReplayMode.name());this.global.setI("animationFps",this.animationManager.animationFps);this.global.setS("_firstFrame",this.animationManager.getModelSpecial(-1));this.global.setS("_lastFrame",this.animationManager.getModelSpecial(1));this.global.setF("_animTimeSec",this.animationManager.getAnimRunTimeSeconds());this.global.setB("_animMovie",
this.animationManager.isMovie)});b(c$,"getInMotion",function(a){return this.inMotion||a&&this.animationManager.animationOn},"~B");e(c$,"getMotionEventNumber",function(){return this.motionEventNumber});e(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,"viewer setInMotion "+a)))},"~B");b(c$,"setRefreshing",function(a){this.refreshing=
a},"~B");b(c$,"getRefreshing",function(){return this.refreshing});e(c$,"pushHoldRepaint",function(){this.pushHoldRepaintWhy(null)});b(c$,"pushHoldRepaintWhy",function(a){null!=this.repaintManager&&this.repaintManager.pushHoldRepaint(a)},"~S");e(c$,"popHoldRepaint",function(a){null!=this.repaintManager&&this.repaintManager.popHoldRepaint(0>a.indexOf("\u0001## REPAINT_IGNORE ##"),a)},"~S");e(c$,"refresh",function(a,c){if(null!=this.repaintManager&&this.refreshing&&!(6==a&&this.getInMotion(!0))){if(this.isWebGL){if(2==
a||7==a){this.transformManager.finalizeTransformParameters();if(!self.Jmol)return;Jmol._refresh&&Jmol._refresh(this.applet,a,c,[this.transformManager.fixedRotationCenter,this.transformManager.getRotationQuaternion(),this.transformManager.xTranslationFraction,this.transformManager.yTranslationFraction,this.transformManager.scalePixelsPerAngstrom,this.transformManager.zoomPercent])}}else 0<a&&7!=a&&this.repaintManager.repaintIfReady("refresh "+a+" "+c);7!=a&&0!=a%3&&this.statusManager.doSync()&&this.statusManager.setSync(2==
a?c:null)}},"~N,~S");b(c$,"requestRepaintAndWait",function(a){this.haveDisplay&&null!=this.repaintManager&&(this.repaintManager.requestRepaintAndWait(a),this.setSync())},"~S");b(c$,"clearShapeRenderers",function(){this.clearRepaintManager(-1)});b(c$,"isRepaintPending",function(){return null==this.repaintManager?!1:this.repaintManager.isRepaintPending()});e(c$,"notifyViewerRepaintDone",function(){null!=this.repaintManager&&this.repaintManager.repaintDone();this.animationManager.repaintDone()});b(c$,
"areAxesTainted",function(){var a=this.axesAreTainted;this.axesAreTainted=!1;return a});b(c$,"setMaximumSize",function(a){this.maximumSize=Math.max(a,100)},"~N");e(c$,"setScreenDimension",function(a,c){c=Math.min(c,this.maximumSize);a=Math.min(a,this.maximumSize);this.isStereoDouble()&&(a=m((a+1)/2));this.dimScreen.width==a&&this.dimScreen.height==c||this.resizeImage(a,c,!1,!1,!0)},"~N,~N");b(c$,"getImageFontScaling",function(){return this.imageFontScaling});b(c$,"resizeImage",function(a,c,b,e,f){if(b||
!this.creatingImage)!e&&!b&&this.setShapeProperty(5,"clearBoxes",null),this.antialiasDisplay=f?this.global.antialiasDisplay&&this.checkMotionRendering(603979786):b&&!e?this.global.antialiasImages:!1,this.imageFontScaling=(f||0>=a?1:m((this.global.zoomLarge==c>a?c:a)/this.getScreenDim()))*(this.antialiasDisplay?2:1),0<a?(this.dimScreen.width=a,this.dimScreen.height=c,b||(this.global.setI("_width",a),this.global.setI("_height",c),this.setStatusResized(a,c))):(a=0==this.dimScreen.width?this.dimScreen.width=
500:this.dimScreen.width,c=0==this.dimScreen.height?this.dimScreen.height=500:this.dimScreen.height),this.transformManager.setScreenParameters(a,c,b||f?this.global.zoomLarge:!1,this.antialiasDisplay,!1,!1),this.gdata.setWindowParameters(a,c,this.antialiasDisplay)},"~N,~N,~B,~B,~B");e(c$,"getScreenWidth",function(){return this.dimScreen.width});e(c$,"getScreenHeight",function(){return this.dimScreen.height});b(c$,"getScreenDim",function(){return this.global.zoomLarge==this.dimScreen.height>this.dimScreen.width?
this.dimScreen.height:this.dimScreen.width});e(c$,"generateOutputForExport",function(a){return this.$noGraphicsAllowed||null==this.repaintManager?null:this.getOutputManager().getOutputFromExport(a)},"java.util.Map");b(c$,"clearRepaintManager",function(a){null!=this.repaintManager&&this.repaintManager.clear(a)},"~N");e(c$,"renderScreenImageStereo",function(a,c,b,e){this.updateWindow(b,e)&&(null==c?this.getScreenImageBuffer(a,!1):(this.render1(c,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",Integer.$valueOf(1150985)),this.processWriteOrCapture(this.captureParams));this.notifyViewerRepaintDone()},"~O,~O,~N,~N");e(c$,"updateJS",function(a,c){if(this.isWebGL)null==this.jsParams&&(this.jsParams=new java.util.Hashtable,this.jsParams.put("type","JS")),this.updateWindow(a,c)&&this.render(),
this.notifyViewerRepaintDone();else{var b=null,e=null;this.statusManager.jmolStatusListener.isStereoSlave||(b=this.apiPlatform.context,e=this.statusManager.jmolStatusListener.gright,this.renderScreenImageStereo(b,e,a,c))}},"~N,~N");b(c$,"updateWindow",function(a,c){if(!this.refreshing||this.creatingImage)return!1;(this.isTainted||this.getSlabEnabled())&&this.setModelVisibility();this.isTainted=!1;null!=this.repaintManager&&0!=a&&this.setScreenDimension(a,c);return!0},"~N,~N");b(c$,"renderScreenImage",
function(a,c,b){this.renderScreenImageStereo(a,null,c,b)},"~O,~N,~N");b(c$,"getImage",function(a,c){if(this.isWebGL)return null;var b=null;try{this.beginRendering(a,c),this.render(),this.gdata.endRendering(),b=this.gdata.getScreenImage(c)}catch(e){if(y(e,Error))this.gdata.getScreenImage(c),this.handleError(e,!1),this.setErrorMessage("Error during rendering: "+e,null);else throw e;}return b},"~B,~B");b(c$,"beginRendering",function(a,c){this.gdata.beginRendering(this.transformManager.getStereoRotationMatrix(a),
this.global.translucent,c,!this.checkMotionRendering(603979967))},"~B,~B");b(c$,"isAntialiased",function(){return this.antialiasDisplay});b(c$,"render",function(){if(!(null==this.modelSet||!this.mustRender||!this.refreshing&&!this.creatingImage||null==this.repaintManager)){var a=this.antialiasDisplay&&this.global.antialiasTranslucent;this.finalizeTransformParameters();this.shapeManager.finalizeAtoms(this.transformManager.bsSelectedAtoms,this.transformManager.ptOffset);var c=this.shapeManager.transformAtoms();
this.transformManager.bsSelectedAtoms=null;this.isWebGL?(this.repaintManager.renderExport(this.gdata,this.modelSet,this.jsParams),this.notifyViewerRepaintDone()):(this.repaintManager.render(this.gdata,this.modelSet,!0,c),this.gdata.setPass2(a)&&(this.transformManager.setAntialias(a),this.repaintManager.render(this.gdata,this.modelSet,!1,null),this.transformManager.setAntialias(this.antialiasDisplay)))}});b(c$,"render1",function(a,c,b,e){null!=a&&null!=c&&this.apiPlatform.drawImage(a,c,b,e,this.dimScreen.width,
this.dimScreen.height);this.gdata.releaseScreenImage()},"~O,~O,~N,~N");e(c$,"getScreenImageBuffer",function(a,c){if(this.isWebGL)return null;var b=null==a&&this.isStereoDouble(),e;this.transformManager.stereoMode.isBiColor()?(this.beginRendering(!0,c),this.render(),this.gdata.endRendering(),this.gdata.snapshotAnaglyphChannelBytes(),this.beginRendering(!1,c),this.render(),this.gdata.endRendering(),this.gdata.applyAnaglygh(this.transformManager.stereoMode,this.transformManager.stereoColors),e=this.gdata.getScreenImage(c)):
e=this.getImage(this.isStereoDouble(),c);var f=null;b&&(f=this.apiPlatform.newBufferedImage(e,this.dimScreen.width<<1,this.dimScreen.height),a=this.apiPlatform.getGraphics(f));null!=a&&(this.isStereoDouble()&&(this.render1(a,e,this.dimScreen.width,0),e=this.getImage(!1,!1)),this.render1(a,e,0,0));return b?f:e},"~O,~B");e(c$,"getImageAsBytes",function(a,c,b,e,f){return this.isWebGL?null:this.getOutputManager().getImageAsBytes(a,c,b,e,f)},"~S,~N,~N,~N,~A");e(c$,"releaseScreenImage",function(){this.gdata.releaseScreenImage()});
e(c$,"evalFile",function(a){if(!this.allowScripting)return null;var c=a.indexOf(" -noqueue");return 0<=c?this.evalStringWaitStatusQueued("String",a.substring(0,c),"",!0,!1,!1):this.getScriptManager().addScript(a,!0,!1)},"~S");b(c$,"getInsertedCommand",function(){var a=this.insertedCommand;this.insertedCommand="";J.util.Logger.debugging&&""!==a&&J.util.Logger.debug("inserting: "+a);return a});e(c$,"script",function(a){return this.evalStringQuietSync(a,!1,!0)},"~S");e(c$,"evalString",function(a){return this.evalStringQuietSync(a,
!1,!0)},"~S");e(c$,"evalStringQuiet",function(a){return this.evalStringQuietSync(a,!0,!0)},"~S");b(c$,"evalStringQuietSync",function(a,c,b){return null==this.getScriptManager()?null:this.scriptManager.evalStringQuietSync(a,c,b)},"~S,~B,~B");b(c$,"clearScriptQueue",function(){null!=this.scriptManager&&this.scriptManager.clearQueue()});b(c$,"setScriptQueue",function(a){(this.global.useScriptQueue=a)||this.clearScriptQueue()},"~B");e(c$,"checkHalt",function(a,c){return null!=this.scriptManager&&this.scriptManager.checkHalt(a,
c)},"~S,~B");e(c$,"scriptWait",function(a){return this.evalWait("JSON",a,"+scriptStarted,+scriptStatus,+scriptEcho,+scriptTerminated")},"~S");e(c$,"scriptWaitStatus",function(a,c){return this.evalWait("object",a,c)},"~S,~S");b(c$,"evalWait",function(a,c,b){if(null==this.getScriptManager())return null;this.scriptManager.waitForQueue();var e=J.i18n.GT.setDoTranslate(!1);a=this.evalStringWaitStatusQueued(a,c,b,!1,!1,!1);J.i18n.GT.setDoTranslate(e);return a},"~S,~S,~S");b(c$,"evalStringWaitStatusQueued",
function(a,c,b,e,f,g){return 0==c.indexOf("JSCONSOLE")?(this.applet._showInfo(0>c.indexOf("CLOSE")),0<=c.indexOf("CLEAR")&&this.applet._clearConsole(),null):null==this.getScriptManager()?null:this.scriptManager.evalStringWaitStatusQueued(a,c,b,e,f,g)},"~S,~S,~S,~B,~B,~B");b(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;}J.util.Logger.debugging&&J.util.Logger.debug("exitJmol -- exiting");
System.out.flush();System.exit(0)}});b(c$,"scriptCheckRet",function(a,c){return null==this.getScriptManager()?null:this.scriptManager.scriptCheckRet(a,c)},"~S,~B");e(c$,"scriptCheck",function(a){return null==this.getScriptManager()?null:this.scriptCheckRet(a,!1)},"~S");e(c$,"isScriptExecuting",function(){return null!=this.eval&&this.eval.isExecuting()});e(c$,"haltScriptExecution",function(){null!=this.eval&&(this.eval.haltExecution(),this.eval.stopScriptThreads());this.setStringPropertyTok("pathForAllFiles",
545259571,"");this.clearTimeouts()});b(c$,"pauseScriptExecution",function(){null!=this.eval&&this.eval.pauseExecution(!0)});b(c$,"getDefaultLoadFilter",function(){return this.global.defaultLoadFilter});b(c$,"getDefaultLoadScript",function(){return this.global.defaultLoadScript});b(c$,"resolveDatabaseFormat",function(a){J.viewer.Viewer.hasDatabasePrefix(a)&&(a=this.setLoadFormat(a,a.charAt(0),!1));return a},"~S");c$.isDatabaseCode=b(c$,"isDatabaseCode",function(a){return"$"==a||"="==a||":"==a},"~S");
c$.hasDatabasePrefix=b(c$,"hasDatabasePrefix",function(a){return 0!=a.length&&J.viewer.Viewer.isDatabaseCode(a.charAt(0))},"~S");b(c$,"setLoadFormat",function(a,c,b){var e=a.substring(1);switch(c){case "=":if(a.startsWith("=="))e=e.substring(1),c="#";else if(0<e.indexOf("/"))try{var f=e.indexOf("/"),g=e.substring(0,f),e=this.global.resolveDataBase(g,e.substring(f+1));return null==e?a:e}catch(h){if(y(h,Exception))return a;throw h;}case "#":return b="="==c?this.global.loadFormat:this.global.loadLigandFormat,
0<e.indexOf(".")&&0<=b.indexOf("%FILE.")&&(b=b.substring(0,b.indexOf("%FILE")+5)),J.util.Txt.formatStringS(b,"FILE",e);case ":":a=this.global.pubChemFormat;b=e.toLowerCase();c=-2147483648;try{c=Integer.parseInt(e)}catch(l){if(!y(l,Exception))throw l;}-2147483648!=c?e="cid/"+c:b.startsWith("smiles:")?(a+="?POST?smiles="+e.substring(7),e="smiles"):b.startsWith("cid:")?e="cid/"+e.substring(4):(b.startsWith("name:")&&(e=e.substring(5)),b.startsWith("cas:")&&(e=e.substring(4)),e="name/"+JU.PT.escapeUrl(e));
return J.util.Txt.formatStringS(a,"FILE",e);case "$":if(a.startsWith("$$"))return e=e.substring(1),a=JU.PT.simpleReplace(this.global.smilesUrlFormat,"&get3d=True",""),J.util.Txt.formatStringS(a,"FILE",JU.PT.escapeUrl(e));case "N":case "2":case "I":case "K":case "/":e=JU.PT.escapeUrl(e);switch(c){case "N":a=this.global.nihResolverFormat+"/names";break;case "2":a=this.global.nihResolverFormat+"/image";break;case "I":a=this.global.nihResolverFormat+"/stdinchi";break;case "K":a=this.global.nihResolverFormat+
"/inchikey";break;case "/":a=this.global.nihResolverFormat+"/";break;default:a=this.global.smilesUrlFormat}return(b?"MOL3D::":"")+J.util.Txt.formatStringS(a,"FILE",e);case "_":return b=J.viewer.FileManager.fixFileNameVariables(this.global.edsUrlFormat,e),e=J.viewer.FileManager.fixFileNameVariables(this.global.edsUrlCutoff,e),[b,e]}return e},"~S,~S,~B");b(c$,"getElectronDensityLoadInfo",function(){return[this.global.edsUrlFormat,this.global.edsUrlCutoff,this.global.edsUrlOptions]});b(c$,"getStandardLabelFormat",
function(a){switch(a){default:case 0:return"%[identify]";case 1:return this.global.defaultLabelXYZ;case 2:return this.global.defaultLabelPDB}},"~N");b(c$,"getAdditionalHydrogens",function(a,c,b,e){null==a&&(a=this.getSelectionSet(!1));var f=D(1,0);a=this.modelSet.calculateHydrogens(a,f,c,b,e);f=Array(f[0]);for(b=c=0;c<a.length;c++)if(null!=a[c])for(e=0;e<a[c].length;e++)f[b++]=a[c][e];return f},"JU.BS,~B,~B,JU.List");e(c$,"setMarBond",function(a){this.global.bondRadiusMilliAngstroms=a;this.global.setI("bondRadiusMilliAngstroms",
a);this.setShapeSize(1,2*a,J.util.BSUtil.setAll(this.getAtomCount()))},"~N");b(c$,"setHoverLabel",function(a){this.loadShape(34);this.setShapeProperty(34,"label",a);(this.hoverEnabled=null!=a)||this.startHoverWatcher(!1)},"~S");b(c$,"hoverOn",function(a,c){this.setStatusAtomHovered(a,this.getAtomInfoXYZ(a,!1));if(this.hoverEnabled)if(this.global.modelKitMode)this.isAtomAssignable(a)&&this.highlight(J.util.BSUtil.newAndSetBit(a)),this.refresh(3,"hover on atom");else if(!(null!=this.eval&&this.isScriptExecuting()||
a==this.hoverAtomIndex||0==this.global.hoverDelayMs)&&this.isInSelectionSubset(a))this.loadShape(34),c&&this.modelSet.atoms[a].isShapeVisible(J.viewer.JC.getShapeVisibilityFlag(5))&&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");b(c$,"hoverOnPt",function(a,c,b,e,f){this.hoverEnabled&&!(null!=this.eval&&
this.isScriptExecuting())&&(this.loadShape(34),this.setShapeProperty(34,"xy",JU.P3i.new3(a,c,0)),this.setShapeProperty(34,"target",null),this.setShapeProperty(34,"specialLabel",null),this.setShapeProperty(34,"text",b),this.hoverAtomIndex=-1,this.hoverText=b,null!=e&&null!=f&&this.setStatusObjectHovered(e,b,f),this.refresh(3,"hover on point"))},"~N,~N,~S,~S,JU.P3");b(c$,"hoverOff",function(){try{if(this.global.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(c){if(!y(c,Exception))throw c;}});b(c$,"getBfactor100Hi",function(){return this.modelSet.getBfactor100Hi()});b(c$,"getColix",function(a){return J.util.C.getColixO(a)},"~O");e(c$,"setDebugScript",function(a){this.global.debugScript=a;this.global.setB("debugScript",
a);null!=this.eval&&this.eval.setDebugging()},"~B");b(c$,"clearClickCount",function(){this.setTainted(!0)});b(c$,"getCursor",function(){return this.currentCursor});b(c$,"setCursor",function(a){if(!this.$isKiosk&&!(this.currentCursor==a||this.multiTouch||!this.haveDisplay))this.apiPlatform.setCursor(this.currentCursor=a,this.display)},"~N");b(c$,"setPickingMode",function(a,c){if(this.haveDisplay){this.showSelected=!1;var b=null;if(null!=a){var e=a.indexOf("_");0<=e&&(b=a.substring(e+1),a=a.substring(0,
e));c=J.viewer.ActionManager.getPickingMode(a)}0>c&&(c=1);this.actionManager.setPickingMode(c);this.global.setS("picking",J.viewer.ActionManager.getPickingModeName(this.actionManager.getAtomPickingMode()));if(!(null==b||0==b.length))switch(b=Character.toUpperCase(b.charAt(0))+(1==b.length?"":b.substring(1,2)),c){case 32:this.setAtomPickingOption(b);break;case 33:this.setBondPickingOption(b);break;default:J.util.Logger.error("Bad picking mode: "+a+"_"+b)}}},"~S,~N");b(c$,"getPickingMode",function(){return this.haveDisplay?
this.actionManager.getAtomPickingMode():0});b(c$,"setPickingStyle",function(a,c){this.haveDisplay&&(null!=a&&(c=J.viewer.ActionManager.getPickingStyleIndex(a)),0>c&&(c=0),this.actionManager.setPickingStyle(c),this.global.setS("pickingStyle",J.viewer.ActionManager.getPickingStyleName(this.actionManager.getPickingStyle())))},"~S,~N");b(c$,"getDrawHover",function(){return this.haveDisplay&&this.global.drawHover});e(c$,"getAtomInfo",function(a){return 0<=a?this.modelSet.getAtomInfo(a,null):this.shapeManager.getShapePropertyIndex(6,
"pointInfo",-a)},"~N");b(c$,"getAtomInfoXYZ",function(a,c){return this.modelSet.getAtomInfoXYZ(a,c)},"~N,~B");b(c$,"setSync",function(){this.statusManager.doSync()&&this.statusManager.setSync(null)});e(c$,"setJmolCallbackListener",function(a){this.statusManager.setJmolCallbackListener(a)},"J.api.JmolCallbackListener");e(c$,"setJmolStatusListener",function(a){this.statusManager.setJmolStatusListener(a,null)},"J.api.JmolStatusListener");b(c$,"getMessageQueue",function(){return this.statusManager.getMessageQueue()});
b(c$,"getStatusChanged",function(a){return null==a?null:this.statusManager.getStatusChanged(a)},"~S");b(c$,"menuEnabled",function(){return!this.global.disablePopupMenu&&null!=this.getPopupMenu()});b(c$,"popupMenu",function(a,c,b){if(this.haveDisplay&&this.refreshing&&!this.$isPreviewOnly&&!this.global.disablePopupMenu)switch(b){case "j":try{this.getPopupMenu(),this.jmolpopup.jpiShow(a,c)}catch(e){this.global.disablePopupMenu=!0}break;case "a":case "b":case "m":this.modelkitPopup=this.apiPlatform.getMenuPopup(null,
b),null!=this.modelkitPopup&&this.modelkitPopup.jpiShow(a,c)}},"~N,~N,~S");b(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 "+J.viewer.Viewer.getJmolVersion()+"|_GET_MENU|"+a)},"~S");b(c$,"getPopupMenu",function(){return null==this.jmolpopup&&(this.jmolpopup=this.allowScripting?this.apiPlatform.getMenuPopup(this.menuStructure,"j"):null,null==this.jmolpopup)?
(this.global.disablePopupMenu=!0,null):this.jmolpopup.jpiGetMenuAsObject()});b(c$,"setMenu",function(a,c){c&&J.util.Logger.info("Setting menu "+(0==a.length?"to Jmol defaults":"from file "+a));0==a.length?a=null:c&&(a=this.getFileAsString(a));this.getProperty("DATA_API","setMenu",a);this.statusManager.setCallbackFunction("menu",a)},"~S,~B");b(c$,"setStatusFrameChanged",function(a){a&&(this.prevFrame=-2147483648);a=this.animationManager.getCurrentModelIndex();this.transformManager.setVibrationPeriod(NaN);
var c=this.animationManager.firstFrameIndex,b=this.animationManager.lastFrameIndex,e=this.isMovie(),f=this.animationManager.currentModelIndex;c==b&&!e&&(f=c);var g=this.getModelFileNumber(f),h=this.animationManager.getCurrentModelIndex(),l=g,j=g%1E6,k=e?c:this.getModelFileNumber(c),p=e?b:this.getModelFileNumber(b),r;e?r=""+(a+1):0==l?(r=this.getModelNumberDotted(c),c!=b&&(r+=" - "+this.getModelNumberDotted(b)),m(k/1E6)==m(p/1E6)&&(l=k)):r=this.getModelNumberDotted(f);0!=l&&(l=1E6>l?1:m(l/1E6));e||
(this.global.setI("_currentFileNumber",l),this.global.setI("_currentModelNumberInFile",j));this.global.setI("_currentFrame",h);this.global.setI("_morphCount",this.animationManager.morphCount);this.global.setF("_currentMorphFrame",this.animationManager.currentMorphModel);this.global.setI("_frameID",g);this.global.setS("_modelNumber",r);this.global.setS("_modelName",0>f?"":this.getModelName(f));c=0>f?"":this.getModelTitle(f);this.global.setS("_modelTitle",null==c?"":c);this.global.setS("_modelFile",
0>f?"":this.modelSet.getModelFileName(f));this.global.setS("_modelType",0>f?"":this.modelSet.getModelFileType(f));h!=this.prevFrame&&(this.prevFrame=h,e?e=""+(this.animationManager.getCurrentModelIndex()+1):(e=this.getModelName(a),c=""+this.getModelNumberDotted(a),e.equals(c)||(e=c+": "+e),50<e.length&&(e=e.substring(0,45)+"...")),this.statusManager.setStatusFrameChanged(a,l,j,0>this.animationManager.animationDirection?-k:k,0>this.animationManager.currentDirection?-p:p,h,e),this.doHaveJDX()&&this.getJSV().setModel(f))},
"~B,~B");b(c$,"doHaveJDX",function(){return this.haveJDX||(this.haveJDX=this.getBooleanProperty("_jspecview"))});b(c$,"getJSV",function(){null==this.jsv&&(this.jsv=J.api.Interface.getOptionInterface("viewer.JSpecView"),this.jsv.setViewer(this));return this.jsv});b(c$,"getJDXBaseModelIndex",function(a){return!this.doHaveJDX()?a:this.getJSV().getBaseModelIndex(a)},"~N");b(c$,"getJspecViewProperties",function(a){a=this.statusManager.getJspecViewProperties(""+a);null!=a&&(this.haveJDX=!0);return a},"~O");
b(c$,"scriptEcho",function(a){J.util.Logger.isActiveLevel(4)&&(System.out.println(a),this.statusManager.setScriptEcho(a,this.isScriptQueued()),this.listCommands&&(null!=a&&0==a.indexOf("$["))&&J.util.Logger.info(a))},"~S");b(c$,"isScriptQueued",function(){return null!=this.scriptManager&&this.scriptManager.isScriptQueued()});b(c$,"notifyError",function(a,c,b){this.global.setS("_errormessage",b);this.statusManager.notifyError(a,c,b)},"~S,~S,~S");b(c$,"jsEval",function(a){return this.statusManager.jsEval(a)},
"~S");b(c$,"setStatusAtomHovered",function(a,c){this.global.setI("_atomhovered",a);this.statusManager.setStatusAtomHovered(a,c)},"~N,~S");b(c$,"setStatusObjectHovered",function(a,c,b){this.global.setS("_objecthovered",a);this.statusManager.setStatusObjectHovered(a,c,b)},"~S,~S,JU.P3");b(c$,"setFileLoadStatus",function(a,c,b,e,f,g){this.setErrorMessage(f,null);this.global.setI("_loadPoint",a.getCode());var h=a!==J.constant.EnumFileStatus.CREATING_MODELSET;h&&this.setStatusFrameChanged(!1,!1);this.statusManager.setFileLoadStatus(c,
b,e,f,a.getCode(),h,g);h&&this.doHaveJDX()&&this.getJSV().setModel(this.getCurrentModelIndex())},"J.constant.EnumFileStatus,~S,~S,~S,~S,Boolean");b(c$,"getZapName",function(){return this.global.modelKitMode?"Jmol Model Kit":"zapped"});b(c$,"setStatusMeasuring",function(a,c,b,e){this.statusManager.setStatusMeasuring(a,c,b,e)},"~S,~N,~S,~N");b(c$,"notifyMinimizationStatus",function(){var a=this.getParameter("_minimizationStep"),c=this.getParameter("_minimizationForceField");this.statusManager.notifyMinimizationStatus(this.getParameter("_minimizationStatus"),
s(a,String)?Integer.$valueOf(0):a,this.getParameter("_minimizationEnergy"),a.toString().equals("0")?Float.$valueOf(0):this.getParameter("_minimizationEnergyDiff"),c)});b(c$,"setStatusAtomPicked",function(a,c){null==c&&(c=this.global.pickLabel,c=0==c.length?this.getAtomInfoXYZ(a,this.global.messageStyleChime):this.modelSet.getAtomInfo(a,c));this.global.setPicked(a);this.global.setS("_pickinfo",c);this.statusManager.setStatusAtomPicked(a,c);1==this.statusManager.getSyncMode()&&this.doHaveJDX()&&this.getJSV().atomPicked(a)},
"~N,~S");b(c$,"setStatusResized",function(a,c){this.statusManager.setStatusResized(a,c)},"~N,~N");b(c$,"scriptStatus",function(a){this.setScriptStatus(a,"",0,null)},"~S");b(c$,"scriptStatusMsg",function(a,c){this.setScriptStatus(a,c,0,null)},"~S,~S");b(c$,"setScriptStatus",function(a,c,b,e){this.statusManager.setScriptStatus(a,c,b,e)},"~S,~S,~N,~S");b(c$,"getModelTitle",function(a){return null==this.modelSet?null:this.modelSet.getModelTitle(a)},"~N");e(c$,"getModelFileName",function(a){return null==
this.modelSet?null:this.modelSet.getModelFileName(a)},"~N");b(c$,"dialogAsk",function(a,c){return prompt(a,c)},"~S,~S");e(c$,"showUrl",function(a){if(null!=a){if(0>a.indexOf(":")){var c=this.fileManager.getAppletDocumentBase();""===c&&(c=this.fileManager.getFullPathName(!1));0<=c.indexOf("/")?c=c.substring(0,c.lastIndexOf("/")+1):0<=c.indexOf("\\")&&(c=c.substring(0,c.lastIndexOf("\\")+1));a=c+a}J.util.Logger.info("showUrl:"+a);this.statusManager.showUrl(a)}},"~S");b(c$,"setMeshCreator",function(a){this.loadShape(24);
this.setShapeProperty(24,"meshCreator",a)},"~O");b(c$,"showConsole",function(a){if(this.haveDisplay)try{null==this.appConsole&&a&&this.getProperty("DATA_API","getAppConsole",Boolean.TRUE),this.appConsole.setVisible(!0)}catch(c){}},"~B");b(c$,"clearConsole",function(){this.statusManager.clearConsole()});b(c$,"getParameterEscaped",function(a){return this.global.getParameterEscaped(a,0)},"~S");e(c$,"getParameter",function(a){return this.global.getParameter(a)},"~S");b(c$,"getOrSetNewVariable",function(a,
c){return this.global.getOrSetNewVariable(a,c)},"~S,~B");b(c$,"setUserVariable",function(a,c){return this.global.setUserVariable(a,c)},"~S,J.script.SV");b(c$,"unsetProperty",function(a){a=a.toLowerCase();(a.equals("all")||a.equals("variables"))&&this.fileManager.setPathForAllFiles("");this.global.unsetUserVariable(a)},"~S");b(c$,"getVariableList",function(){return this.global.getVariableList()});e(c$,"notifyStatusReady",function(a){System.out.println("Jmol applet "+this.fullName+(a?" ready":" destroyed"));
a||this.setModeMouse(-1);this.statusManager.setStatusAppletReady(this.fullName,a)},"~B");e(c$,"getBooleanProperty",function(a){a=a.toLowerCase();if(this.global.htBooleanParameterFlags.containsKey(a))return this.global.htBooleanParameterFlags.get(a).booleanValue();if(a.endsWith("p!")){if(null==this.actionManager)return!1;var c=this.actionManager.getPickingState().toLowerCase();a=a.substring(0,a.length-2)+";";return 0<=c.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.modelSet.getBFactors();if(a.equalsIgnoreCase("colorRasmol"))return this.colorManager.getDefaultColorRasmol();if(a.equalsIgnoreCase("frank"))return this.getShowFrank();if(a.equalsIgnoreCase("spinOn"))return this.getSpinOn();if(a.equalsIgnoreCase("isNavigating"))return this.isNavigating();if(a.equalsIgnoreCase("showSelections"))return this.modelSet.getSelectionHaloEnabled();
if(this.global.htUserVariables.containsKey(a)){c=this.global.getUserVariable(a);if(1048589==c.tok)return!0;if(1048588==c.tok)return!1}J.util.Logger.error("viewer.getBooleanProperty("+a+") - unrecognized");return!1},"~S");e(c$,"getInt",function(a){switch(a){case 553648132:return this.animationManager.animationFps;case 553648143:return this.global.dotDensity;case 553648144:return this.global.dotScale;case 553648146:return this.global.helixStep;case 553648151:return this.global.meshScale;case 553648153:return this.global.minPixelSelRadius;
case 553648154:return this.global.percentVdwAtom;case 553648157:return this.global.pickingSpinRate;case 553648158:return this.global.platformSpeed;case 553648166:return this.global.ribbonAspectRatio;case 536870922:return this.global.scriptDelay;case 553648170:return this.global.smallMoleculeMaxAtoms;case 553648184:return this.global.strutSpacing}J.util.Logger.error("viewer.getInt("+J.script.T.nameOf(a)+") - not listed");return 0},"~N");b(c$,"getDelayMaximumMs",function(){return this.haveDisplay?this.global.delayMaximumMs:
1});b(c$,"getHermiteLevel",function(){return this.getSpinOn()?0:this.global.hermiteLevel});b(c$,"getHoverDelay",function(){return this.global.modelKitMode?20:this.global.hoverDelayMs});e(c$,"getBoolean",function(a){switch(a){case 1074790662:return this.modelSet.getModelSetAuxiliaryInfoBoolean("isPDB");case 603979780:return this.global.allowGestures;case 603979784:return this.global.allowMultiTouch;case 603979785:return this.global.allowRotateSelected;case 603979792:return this.global.appendNew;case 603979794:return this.global.applySymmetryToBonds;
case 603979796:return this.global.atomPicking;case 603979798:return this.global.autoBond;case 603979800:return this.global.autoFps;case 603979806:return this.global.axesOrientationRasmol;case 603979812:return this.global.bondModeOr;case 603979817:return this.global.cartoonBaseEdges;case 603979819:return this.global.cartoonFancy;case 603979820:return this.global.cartoonLadders;case 603979818:return this.global.cartoonRockets;case 603979822:return this.global.chainCaseSensitive||0<this.chainList.size();
case 603979824:return this.global.debugScript;case 603979825:return this.global.defaultStructureDSSP;case 603979826:return this.global.disablePopupMenu;case 603979828:return this.global.displayCellParameters;case 603979830:return this.global.dotSurface;case 603979829:return this.global.dotsSelectedOnly;case 603979833:return this.global.drawPicking;case 603979844:return this.global.fontCaching;case 603979845:return this.global.fontScaling;case 603979846:return this.global.forceAutoBond;case 603979848:return this.global.fractionalRelative;
case 603979850:return this.global.greyscaleRendering;case 603979852:return this.global.hbondsBackbone;case 603979853:return this.global.hbondsRasmol;case 603979854:return this.global.hbondsSolid;case 1613758470:return this.global.rasmolHeteroSetting;case 603979858:return this.global.hideNameInPopup;case 603979864:return this.global.highResolutionFlag;case 1613758476:return this.global.rasmolHydrogenSetting;case 603979870:return this.global.isosurfaceKey;case 603979872:return this.global.justifyMeasurements;
case 603979874:return this.global.legacyAutoBonding;case 603979875:return this.global.legacyHAddition;case 603979877:return this.global.logGestures;case 603979878:return this.global.measureAllModels;case 603979879:return this.global.measurementLabels;case 603979880:return this.global.messageStyleChime;case 603979883:return this.global.modelKitMode;case 603979887:return this.global.navigationMode;case 603979888:return this.global.navigationPeriodic;case 603979889:return this.global.partialDots;case 603979892:return this.global.pdbSequential;
case 603979894:return this.global.preserveState;case 603979898:return this.global.ribbonBorder;case 603979900:return this.global.rocketBarrels;case 603979906:return this.global.selectAllModels;case 603979920:return this.global.showHiddenSelectionHalos;case 603979922:return this.global.showHydrogens;case 603979926:return this.global.showMeasurements;case 603979928:return this.global.showMultipleBonds;case 603979934:return this.global.showTiming;case 603979938:return this.global.slabByAtom;case 603979940:return this.global.slabByMolecule;
case 603979944:return this.global.smartAromatic;case 1613758488:return this.global.solventOn;case 603979952:return this.global.ssbondsBackbone;case 603979955:return this.global.strutsMultiple;case 603979966:return this.global.traceAlpha;case 603979967:return this.global.translucent;case 603979968:return this.global.twistedSheets;case 603979973:return this.global.vectorSymmetry;case 603979974:return this.global.waitForMoveTo;case 603979978:return this.global.zeroBasedXyzRasmol}J.util.Logger.error("viewer.getBoolean("+
J.script.T.nameOf(a)+") - not listed");return!1},"~N");b(c$,"allowEmbeddedScripts",function(){return this.global.allowEmbeddedScripts&&!this.$isPreviewOnly});b(c$,"getDragSelected",function(){return this.global.dragSelected&&!this.global.modelKitMode});b(c$,"getBondPicking",function(){return this.global.bondPicking||this.global.modelKitMode});b(c$,"useMinimizationThread",function(){return this.global.useMinimizationThread&&!this.autoExit});e(c$,"getFloat",function(a){switch(a){case 1141899265:return this.global.particleRadius;
case 570425346:return this.global.axesScale;case 570425348:return this.global.bondTolerance;case 570425354:return this.global.defaultTranslucent;case 570425352:return this.global.defaultDrawArrowScale;case 570425355:return this.global.dipoleScale;case 570425356:return this.global.drawFontSize;case 570425358:return this.global.exportScale;case 570425360:return this.global.hbondsAngleMinimum;case 570425361:return this.global.hbondsDistanceMaximum;case 570425363:return this.global.loadAtomDataTolerance;
case 570425364:return this.global.minBondDistance;case 1276121113:return this.global.modulationScale;case 570425370:return this.global.multipleBondSpacing;case 570425369:return this.global.multipleBondRadiusFactor;case 570425374:return this.global.navigationSpeed;case 570425382:return this.global.pointGroupDistanceTolerance;case 570425384:return this.global.pointGroupLinearTolerance;case 570425388:return this.transformManager.getRotationRadius();case 570425392:return this.global.sheetSmoothing;case 570425394:return this.global.solventProbeRadius;
case 570425403:return this.global.starScale;case 570425406:return this.global.strutDefaultRadius;case 570425408:return this.global.strutLengthMaximum;case 1649410049:return this.global.vectorScale;case 570425412:return this.global.vibrationPeriod}J.util.Logger.error("viewer.getFloat("+J.script.T.nameOf(a)+") - not listed");return 0},"~N");e(c$,"setStringProperty",function(a,c){if(null!=c)if("_"==a.charAt(0))this.global.setS(a,c);else{var b=J.script.T.getTokFromName(a);switch(J.script.T.getParamType(b)){case 603979776:this.setBooleanPropertyTok(a,
b,J.script.SV.newV(4,c).asBoolean());break;case 553648128:this.setIntPropertyTok(a,b,J.script.SV.newV(4,c).asInt());break;case 570425344:this.setFloatPropertyTok(a,b,JU.PT.parseFloat(c));break;default:this.setStringPropertyTok(a,b,c)}}},"~S,~S");b(c$,"setStringPropertyTok",function(a,c,b){switch(c){case 545259521:this.setAnimationMode(b);return;case 545259569:this.global.nmrPredictFormat=b;break;case 545259548:this.global.defaultDropScript=b;break;case 545259571:b=this.fileManager.setPathForAllFiles(b);
break;case 545259558:this.setUnits(b,!1);return;case 545259560:this.global.forceField=b="UFF".equalsIgnoreCase(b)?"UFF":"MMFF";this.minimizer=null;break;case 545259570:this.global.nmrUrlFormat=b;break;case 545259568:this.setUnits(b,!0);return;case 545259566:this.global.loadLigandFormat=b;break;case 545259543:this.global.defaultLabelPDB=b;break;case 545259544:this.global.defaultLabelXYZ=b;break;case 545259549:this.global.defaultLoadFilter=b;break;case 545259567:b=this.getOutputManager().setLogFile(b);
if(null==b)return;break;case 545259559:break;case 545259524:this.global.atomTypes=b;break;case 545259538:break;case 545259576:this.global.pickLabel=b;break;case 545259580:this.global.quaternionFrame=2==b.length&&b.startsWith("R")?b.substring(0,2):""+(b.toLowerCase()+"p").charAt(0);JU.PT.isOneOf(this.global.quaternionFrame,"RC;RP;a;b;c;n;p;q;x;")||(this.global.quaternionFrame="p");this.modelSet.setHaveStraightness(!1);break;case 545259555:this.setVdwStr(b);return;case 545259564:new J.i18n.GT(this,
b);this.language=J.i18n.GT.getLanguage();this.modelkitPopup=null;null!=this.jmolpopup&&(this.jmolpopup.jpiDispose(),this.jmolpopup=null,this.getPopupMenu());this.statusManager.setCallbackFunction("language",this.language);b=J.i18n.GT.getLanguage();break;case 545259565:this.global.loadFormat=b;break;case 545259534:this.setObjectColor("background",b);return;case 545259528:this.setObjectColor("axis1",b);return;case 545259530:this.setObjectColor("axis2",b);return;case 545259532:this.setObjectColor("axis3",
b);return;case 545259536:this.setObjectColor("boundbox",b);return;case 545259586:this.setObjectColor("unitcell",b);return;case 545259578:this.setPropertyColorScheme(b,!1,!1);break;case 545259562:this.setShapeProperty(34,"atomLabel",b);break;case 545259547:this.global.defaultDistanceLabel=b;break;case 545259542:this.global.defaultAngleLabel=b;break;case 545259554:this.global.defaultTorsionLabel=b;break;case 545259550:this.global.defaultLoadScript=b;break;case 545259522:this.fileManager.setAppletProxy(b);
break;case 545259546:null==b&&(b="");b=b.$replace("\\","/");this.global.defaultDirectory=b;break;case 545259561:this.global.helpPath=b;break;case 545259552:!b.equalsIgnoreCase("RasMol")&&!b.equalsIgnoreCase("PyMOL")&&(b="Jmol");this.setDefaultsType(b);break;case 545259545:this.setDefaultColors(b.equalsIgnoreCase("rasmol"));return;case 545259572:this.setPickingMode(b,0);return;case 545259574:this.setPickingStyle(b,0);return;case 545259540:break;default:if(a.toLowerCase().endsWith("callback")){this.statusManager.setCallbackFunction(a,
0==b.length||b.equalsIgnoreCase("none")?null:b);break}if(!this.global.htNonbooleanParameterValues.containsKey(a.toLowerCase())){this.global.setUserVariable(a,J.script.SV.newV(4,b));return}}this.global.setS(a,b)},"~S,~N,~S");e(c$,"setFloatProperty",function(a,c){if(!Float.isNaN(c))if("_"==a.charAt(0))this.global.setF(a,c);else{var b=J.script.T.getTokFromName(a);switch(J.script.T.getParamType(b)){case 545259520:this.setStringPropertyTok(a,b,""+c);break;case 603979776:this.setBooleanPropertyTok(a,b,
0!=c);break;case 553648128:this.setIntPropertyTok(a,b,z(c));break;default:this.setFloatPropertyTok(a,b,c)}}},"~S,~N");b(c$,"setFloatPropertyTok",function(a,c,b){switch(c){case 570425366:this.modelSet.setModulation(null,!1,null,!1);this.global.modulationScale=Math.max(1,b);this.modelSet.setModulation(null,!0,null,!1);break;case 570425381:this.global.particleRadius=Math.abs(b);break;case 570425356:this.global.drawFontSize=b;break;case 570425358:this.global.exportScale=b;break;case 570425403:this.global.starScale=
b;break;case 570425369:this.global.multipleBondRadiusFactor=b;break;case 570425370:this.global.multipleBondSpacing=b;break;case 570425393:this.transformManager.setSlabRange(b);break;case 570425365:this.global.minimizationCriterion=b;break;case 570425359:this.haveDisplay&&this.actionManager.setGestureSwipeFactor(b);break;case 570425367:this.haveDisplay&&this.actionManager.setMouseDragFactor(b);break;case 570425368:this.haveDisplay&&this.actionManager.setMouseWheelFactor(b);break;case 570425408:this.global.strutLengthMaximum=
b;break;case 570425406:this.global.strutDefaultRadius=b;break;case 570425376:this.setSpin("X",z(b));break;case 570425378:this.setSpin("Y",z(b));break;case 570425380:this.setSpin("Z",z(b));break;case 570425371:if(Float.isNaN(b))return;this.setSpin("FPS",z(b));break;case 570425363:this.global.loadAtomDataTolerance=b;break;case 570425360:this.global.hbondsAngleMinimum=b;break;case 570425361:this.global.hbondsDistanceMaximum=b;break;case 570425382:this.global.pointGroupDistanceTolerance=b;break;case 570425384:this.global.pointGroupLinearTolerance=
b;break;case 570425357:this.global.ellipsoidAxisDiameter=b;break;case 570425398:this.setSpin("x",z(b));break;case 570425400:this.setSpin("y",z(b));break;case 570425402:this.setSpin("z",z(b));break;case 570425396:this.setSpin("fps",z(b));break;case 570425352:this.global.defaultDrawArrowScale=b;break;case 570425354:this.global.defaultTranslucent=b;break;case 570425346:this.setAxesScale(b);break;case 570425416:this.transformManager.setVisualRange(b);this.refresh(1,"set visualRange");break;case 570425372:this.setNavigationDepthPercent(b);
break;case 570425374:this.global.navigationSpeed=b;break;case 570425373:this.transformManager.setNavigationSlabOffsetPercent(b);break;case 570425350:this.transformManager.setCameraDepthPercent(b,!1);this.refresh(1,"set cameraDepth");return;case 570425388:this.setRotationRadius(b,!0);return;case 570425362:this.global.hoverDelayMs=z(1E3*b);break;case 570425392:this.global.sheetSmoothing=b;break;case 570425355:b=J.viewer.Viewer.checkFloatRange(b,-10,10);this.global.dipoleScale=b;break;case 570425404:this.transformManager.setStereoDegrees(b);
break;case 1649410049:this.setVectorScale(b);return;case 570425412:this.setVibrationPeriod(b);return;case 570425414:this.setVibrationScale(b);return;case 570425348:this.setBondTolerance(b);return;case 570425364:this.setMinBondDistance(b);return;case 570425390:this.transformManager.setScaleAngstromsPerInch(b);break;case 570425394:b=J.viewer.Viewer.checkFloatRange(b,0,10);this.global.solventProbeRadius=b;break;default:if(!this.global.htNonbooleanParameterValues.containsKey(a.toLowerCase())){this.global.setUserVariable(a,
J.script.SV.newV(3,Float.$valueOf(b)));return}}this.global.setF(a,b)},"~S,~N,~N");e(c$,"setIntProperty",function(a,c){if(-2147483648!=c)if("_"==a.charAt(0))this.global.setI(a,c);else{var b=J.script.T.getTokFromName(a);switch(J.script.T.getParamType(b)){case 545259520:this.setStringPropertyTok(a,b,""+c);break;case 603979776:this.setBooleanPropertyTok(a,b,0!=c);break;case 570425344:this.setFloatPropertyTok(a,b,c);break;default:this.setIntPropertyTok(a,b,c)}}},"~S,~N");b(c$,"setIntPropertyTok",function(a,
c,b){switch(c){case 553648137:this.global.celShadingPower=b;this.gdata.setCelPower(b);break;case 553648129:this.gdata.setAmbientOcclusion(b);break;case 553648158:this.global.platformSpeed=Math.min(Math.max(b,0),10);break;case 553648151:this.global.meshScale=b;break;case 553648153:this.global.minPixelSelRadius=b;break;case 553648149:this.global.isosurfacePropertySmoothingPower=b;break;case 553648165:this.global.repaintWaitMs=b;break;case 553648170:this.global.smallMoleculeMaxAtoms=b;break;case 553648152:this.global.minimizationSteps=
b;break;case 553648184:this.global.strutSpacing=b;break;case 553648156:b=J.viewer.Viewer.checkIntRange(b,0,1E3);this.gdata.setPhongExponent(b);break;case 553648146:this.global.helixStep=b;this.modelSet.setHaveStraightness(!1);break;case 553648144:this.global.dotScale=b;break;case 553648143:this.global.dotDensity=b;break;case 553648138:this.global.delayMaximumMs=b;break;case 553648150:J.util.Logger.setLogLevel(b);J.util.Logger.info("logging level set to "+b);this.global.setI("logLevel",b);null!=this.eval&&
this.eval.setDebugging();return;case 553648134:switch(J.constant.EnumAxesMode.getAxesMode(b)){case J.constant.EnumAxesMode.MOLECULAR:this.setAxesModeMolecular(!0);break;case J.constant.EnumAxesMode.BOUNDBOX:this.setAxesModeMolecular(!1);break;case J.constant.EnumAxesMode.UNITCELL:this.setAxesModeUnitCell(!0)}return;case 553648178:this.setStrandCount(0,b);return;case 553648182:this.setStrandCount(12,b);return;case 553648180:this.setStrandCount(13,b);return;case 553648155:return;case 536870922:this.global.scriptDelay=
b;break;case 553648176:b=0>b?J.viewer.Viewer.checkIntRange(b,-10,-1):J.viewer.Viewer.checkIntRange(b,0,100);this.gdata.setSpecularPower(b);break;case 553648172:b=J.viewer.Viewer.checkIntRange(-b,-10,-1);this.gdata.setSpecularPower(b);break;case 553648136:this.setMarBond(b);return;case 536870924:this.setBooleanPropertyTok(a,c,1==b);return;case 553648174:b=J.viewer.Viewer.checkIntRange(b,0,100);this.gdata.setSpecularPercent(b);break;case 553648142:b=J.viewer.Viewer.checkIntRange(b,0,100);this.gdata.setDiffusePercent(b);
break;case 553648130:b=J.viewer.Viewer.checkIntRange(b,0,100);this.gdata.setAmbientPercent(b);break;case 553648186:this.transformManager.zDepthToPercent(b);break;case 553648188:this.transformManager.zSlabToPercent(b);break;case 554176526:this.transformManager.depthToPercent(b);break;case 554176565:this.transformManager.slabToPercent(b);break;case 553648190:this.global.zShadePower=Math.max(b,1);break;case 553648166:this.global.ribbonAspectRatio=b;break;case 553648157:this.global.pickingSpinRate=1>
b?1:b;break;case 553648132:this.setAnimationFps(b);return;case 553648154:this.setPercentVdwAtom(b);break;case 553648147:this.global.hermiteLevel=b;break;case 553648145:case 553648148:case 553648160:case 553648159:case 553648162:case 553648164:break;default:if(!this.global.htNonbooleanParameterValues.containsKey(a)){this.global.setUserVariable(a,J.script.SV.newI(b));return}}this.global.setI(a,b)},"~S,~N,~N");c$.checkIntRange=b(c$,"checkIntRange",function(a,c,b){return a<c?c:a>b?b:a},"~N,~N,~N");c$.checkFloatRange=
b(c$,"checkFloatRange",function(a,c,b){return a<c?c:a>b?b:a},"~N,~N,~N");e(c$,"setBooleanProperty",function(a,c){if("_"==a.charAt(0))this.global.setB(a,c);else{var b=J.script.T.getTokFromName(a);switch(J.script.T.getParamType(b)){case 545259520:this.setStringPropertyTok(a,b,"");break;case 553648128:this.setIntPropertyTok(a,b,c?1:0);break;case 570425344:this.setFloatPropertyTok(a,b,c?1:0);break;default:this.setBooleanPropertyTok(a,b,c)}}},"~S,~B");b(c$,"setBooleanPropertyTok",function(a,c,b){var e=
!0;switch(c){case 603979837:this.global.ellipsoidArrows=b;break;case 603979967:this.global.translucent=b;break;case 603979820:this.global.cartoonLadders=b;break;case 603979968:c=this.global.twistedSheets;this.global.twistedSheets=b;c!=b&&this.checkCoordinatesChanged();break;case 603979821:this.global.celShading=b;this.gdata.setCel(b);break;case 603979819:this.global.cartoonFancy=b;break;case 603979934:this.global.showTiming=b;break;case 603979973:this.global.vectorSymmetry=b;break;case 603979870:this.global.isosurfaceKey=
b;break;case 603979889:this.global.partialDots=b;break;case 603979874:this.global.legacyAutoBonding=b;break;case 603979825:this.global.defaultStructureDSSP=b;break;case 603979834:this.global.dsspCalcHydrogen=b;break;case 603979782:(this.global.allowModelkit=b)||this.setModelKitMode(!1);break;case 603979883:this.setModelKitMode(b);break;case 603979885:this.global.multiProcessor=b&&1<J.viewer.Viewer.nProcessors;break;case 603979884:this.global.monitorEnergy=b;break;case 603979853:this.global.hbondsRasmol=
b;break;case 603979881:this.global.minimizationRefresh=b;break;case 603979882:this.global.minimizationSilent=b;break;case 603979969:this.global.useArcBall=b;break;case 603979869:b&&(this.$isKiosk=!0,this.global.disablePopupMenu=!0,null!=this.display&&this.apiPlatform.setTransparentCursor(this.display));break;case 603979974:this.global.waitForMoveTo=b;break;case 603979876:this.global.logCommands=!0;break;case 603979877:this.global.logGestures=!0;break;case 603979784:this.global.allowMultiTouch=b;break;
case 603979894:this.global.preserveState=b;this.modelSet.setPreserveState(b);this.undoClear();break;case 603979955:this.global.strutsMultiple=b;break;case 603979842:break;case 603979938:this.global.slabByAtom=b;break;case 603979940:this.global.slabByMolecule=b;break;case 603979902:this.global.saveProteinStructureState=b;break;case 603979780:this.global.allowGestures=b;break;case 603979868:this.global.imageState=b;break;case 603979970:this.global.useMinimizationThread=b;break;case 603979781:this.global.disablePopupMenu&&
(b=!1);this.global.allowKeyStrokes=b;break;case 603979831:this.global.dragSelected=b;this.showSelected=!1;break;case 603979924:this.global.showKeyStrokes=b;break;case 603979844:this.global.fontCaching=b;break;case 603979796:this.global.atomPicking=b;break;case 603979814:this.highlight(null);this.global.bondPicking=b;break;case 603979906:this.global.selectAllModels=b;break;case 603979880:this.global.messageStyleChime=b;break;case 603979892:this.global.pdbSequential=b;break;case 603979890:this.global.pdbAddHydrogens=
b;break;case 603979891:this.global.pdbGetHeader=b;break;case 603979838:this.global.ellipsoidAxes=b;break;case 603979836:this.global.ellipsoidArcs=b;break;case 603979839:this.global.ellipsoidBall=b;break;case 603979840:this.global.ellipsoidDots=b;break;case 603979841:this.global.ellipsoidFill=b;break;case 603979845:this.global.fontScaling=b;break;case 603979956:this.setSyncTarget(0,b);break;case 603979958:this.setSyncTarget(1,b);break;case 603979976:this.global.wireframeRotation=b;break;case 603979871:this.global.isosurfacePropertySmoothing=
b;break;case 603979833:this.global.drawPicking=b;break;case 603979786:case 603979790:case 603979788:this.setAntialias(c,b);break;case 603979944:this.global.smartAromatic=b;break;case 603979794:this.setApplySymmetryToBonds(b);break;case 603979792:this.setAppendNew(b);break;case 603979800:this.global.autoFps=b;break;case 603979972:JU.DF.setUseNumberLocalization(this.global.useNumberLocalization=b);break;case 1611272202:a="showFrank";this.setFrankOn(b);break;case 603979918:this.setFrankOn(b);break;case 1613758488:a=
"solventProbe";this.global.solventOn=b;break;case 603979948:this.global.solventOn=b;break;case 603979785:this.global.allowRotateSelected=b;break;case 603979783:this.global.allowMoveAtoms=b;this.global.allowRotateSelected=b;this.global.dragSelected=b;this.showSelected=!1;break;case 536870922:this.setIntPropertyTok("showScript",c,b?1:0);return;case 603979778:this.global.allowEmbeddedScripts=b;break;case 603979888:this.global.navigationPeriodic=b;break;case 603979984:this.transformManager.setZShadeEnabled(b);
return;case 603979832:this.haveDisplay&&(this.global.drawHover=b);break;case 603979887:this.setNavigationMode(b);break;case 603979886:return;case 603979860:this.global.hideNavigationPoint=b;break;case 603979930:this.global.showNavigationPointAlways=b;break;case 603979896:this.setRefreshing(b);break;case 603979872:this.global.justifyMeasurements=b;break;case 603979952:this.global.ssbondsBackbone=b;break;case 603979852:this.global.hbondsBackbone=b;break;case 603979854:this.global.hbondsSolid=b;break;
case 536870924:this.gdata.setSpecular(b);break;case 603979942:this.transformManager.setSlabEnabled(b);return;case 603979980:this.transformManager.setZoomEnabled(b);return;case 603979864:this.global.highResolutionFlag=b;break;case 603979966:this.global.traceAlpha=b;break;case 603979983:this.global.zoomLarge=b;this.transformManager.setZoomHeight(this.global.zoomHeight,b);break;case 603979982:this.global.zoomHeight=b;this.transformManager.setZoomHeight(b,this.global.zoomLarge);break;case 603979873:J.i18n.GT.setDoTranslate(b);
break;case 603979862:this.selectionManager.setHideNotSelected(b);break;case 603979904:this.setScriptQueue(b);break;case 603979830:this.global.dotSurface=b;break;case 603979829:this.global.dotsSelectedOnly=b;break;case 1611141171:this.setSelectionHalos(b);break;case 603979910:this.global.rasmolHydrogenSetting=b;break;case 603979908:this.global.rasmolHeteroSetting=b;break;case 603979928:this.global.showMultipleBonds=b;break;case 603979920:this.global.showHiddenSelectionHalos=b;break;case 603979975:this.transformManager.setWindowCentered(b);
break;case 603979828:this.global.displayCellParameters=b;break;case 603979960:this.global.testFlag1=b;break;case 603979962:this.global.testFlag2=b;break;case 603979964:this.global.testFlag3=b;break;case 603979965:this.jmolTest();this.global.testFlag4=b;break;case 603979898:this.global.ribbonBorder=b;break;case 603979817:this.global.cartoonBaseEdges=b;break;case 603979818:this.global.cartoonRockets=b;break;case 603979900:this.global.rocketBarrels=b;break;case 603979850:this.gdata.setGreyscaleMode(this.global.greyscaleRendering=
b);break;case 603979879:this.global.measurementLabels=b;break;case 603979810:this.setAxesModeMolecular(!b);return;case 603979804:this.setAxesModeMolecular(b);return;case 603979808:this.setAxesModeUnitCell(b);return;case 603979806:this.setAxesOrientationRasmol(b);return;case 603979823:this.setStringPropertyTok("defaultcolorscheme",545259545,b?"rasmol":"jmol");return;case 603979824:this.setDebugScript(b);return;case 603979893:this.setPerspectiveDepth(b);return;case 603979798:this.setAutoBond(b);return;
case 603979914:this.setShowAxes(b);return;case 603979916:this.setShowBbcage(b);return;case 603979922:this.setShowHydrogens(b);return;case 603979926:this.setShowMeasurements(b);return;case 603979936:this.setShowUnitCell(b);return;case 603979812:e=!1;this.global.bondModeOr=b;break;case 603979978:e=!1;this.global.zeroBasedXyzRasmol=b;this.reset(!0);break;case 603979895:e=!1;this.global.rangeSelected=b;break;case 603979878:e=!1;this.global.measureAllModels=b;break;case 603979954:e=!1;this.statusManager.setAllowStatusReporting(b);
break;case 603979822:e=!1;this.global.chainCaseSensitive=b;break;case 603979858:e=!1;this.global.hideNameInPopup=b;break;case 603979826:e=!1;this.global.disablePopupMenu=b;break;case 603979846:e=!1;this.global.forceAutoBond=b;break;case 603979848:e=!1;this.global.fractionalRelative=b;break;default:if(!this.global.htBooleanParameterFlags.containsKey(a.toLowerCase())){this.global.setUserVariable(a,J.script.SV.getBoolean(b));return}}this.global.setB(a,b);e&&this.setTainted(!0)},"~S,~N,~B");b(c$,"setModelKitMode",
function(a){if(null!=this.actionManager&&this.allowScripting){if(a||this.global.modelKitMode)this.setPickingMode(null,a?33:1),this.setPickingMode(null,a?32:1);var c=this.global.modelKitMode!=a;this.global.modelKitMode=a;this.highlight(null);a?(this.setNavigationMode(!1),this.selectAll(),this.setAtomPickingOption("C"),this.setBondPickingOption("p"),this.$isApplet||this.popupMenu(0,0,"m"),c&&this.statusManager.setCallbackFunction("modelkit","ON"),this.global.modelKitMode=!0,0==this.getAtomCount()&&
this.zap(!1,!0,!0)):(this.actionManager.setPickingMode(-1),this.setStringProperty("pickingStyle","toggle"),this.setBooleanProperty("bondPicking",!1),c&&this.statusManager.setCallbackFunction("modelkit","OFF"))}},"~B");b(c$,"getLanguage",function(){return this.language});b(c$,"setSmilesString",function(a){null==a?this.global.removeParam("_smilesString"):this.global.setS("_smilesString",a)},"~S");b(c$,"removeUserVariable",function(a){this.global.removeUserVariable(a);a.endsWith("callback")&&this.statusManager.setCallbackFunction(a,
null)},"~S");b(c$,"isJmolVariable",function(a){return this.global.isJmolVariable(a)},"~S");b(c$,"jmolTest",function(){});b(c$,"showParameter",function(a,c,b){b=""+this.global.getParameterEscaped(a,b);(c||0>b.indexOf("<not defined>"))&&this.showString(a+" = "+b,!1)},"~S,~B,~N");b(c$,"showString",function(a,c){this.isScriptQueued()&&((!this.isSilent||c)&&!this.isJS)&&J.util.Logger.warn(a);this.scriptEcho(a)},"~S,~B");b(c$,"getAllSettings",function(a){return this.getStateCreator().getAllSettings(a)},
"~S");b(c$,"getBindingInfo",function(a){return this.haveDisplay?this.actionManager.getBindingInfo(a):""},"~S");b(c$,"getIsosurfacePropertySmoothing",function(a){return a?this.global.isosurfacePropertySmoothingPower:this.global.isosurfacePropertySmoothing?1:0},"~B");b(c$,"setNavigationDepthPercent",function(a){this.transformManager.setNavigationDepthPercent(a);this.refresh(1,"set navigationDepth")},"~N");b(c$,"getShowNavigationPoint",function(){return!this.global.navigationMode||!this.transformManager.canNavigate()?
!1:this.isNavigating()&&!this.global.hideNavigationPoint||this.global.showNavigationPointAlways||this.getInMotion(!0)});b(c$,"getCurrentSolventProbeRadius",function(){return this.global.solventOn?this.global.solventProbeRadius:0});b(c$,"getTestFlag",function(a){switch(a){case 1:return this.global.testFlag1;case 2:return this.global.testFlag2;case 3:return this.global.testFlag3;case 4:return this.global.testFlag4}return!1},"~N");e(c$,"setPerspectiveDepth",function(a){this.transformManager.setPerspectiveDepth(a)},
"~B");e(c$,"setAxesOrientationRasmol",function(a){this.global.setB("axesOrientationRasmol",a);this.global.axesOrientationRasmol=a;this.reset(!0)},"~B");b(c$,"setAxesScale",function(a){a=J.viewer.Viewer.checkFloatRange(a,-100,100);this.global.axesScale=a;this.axesAreTainted=!0},"~N");b(c$,"getAxisPoints",function(){return 0==this.getObjectMad(1)||this.getAxesMode()!==J.constant.EnumAxesMode.UNITCELL||this.getShapeProperty(31,"axesTypeXY").booleanValue()||null!=this.getShapeProperty(31,"origin")?null:
this.getShapeProperty(31,"axisPoints")});b(c$,"resetError",function(){this.global.removeParam("_errormessage")});b(c$,"setAxesModeMolecular",function(a){this.global.axesMode=a?J.constant.EnumAxesMode.MOLECULAR:J.constant.EnumAxesMode.BOUNDBOX;this.axesAreTainted=!0;this.global.removeParam("axesunitcell");this.global.removeParam(a?"axeswindow":"axesmolecular");this.global.setI("axesMode",this.global.axesMode.getCode());this.global.setB(a?"axesMolecular":"axesWindow",!0)},"~B");b(c$,"setAxesModeUnitCell",
function(a){this.global.axesMode=a?J.constant.EnumAxesMode.UNITCELL:J.constant.EnumAxesMode.BOUNDBOX;this.axesAreTainted=!0;this.global.removeParam("axesmolecular");this.global.removeParam(a?"axeswindow":"axesunitcell");this.global.setB(a?"axesUnitcell":"axesWindow",!0);this.global.setI("axesMode",this.global.axesMode.getCode())},"~B");b(c$,"getAxesMode",function(){return this.global.axesMode});e(c$,"getPerspectiveDepth",function(){return this.transformManager.getPerspectiveDepth()});e(c$,"setSelectionHalos",
function(a){null==this.modelSet||a==this.modelSet.getSelectionHaloEnabled()||(this.global.setB("selectionHalos",a),this.loadShape(8),this.modelSet.setSelectionHaloEnabled(a))},"~B");b(c$,"getSelectionHaloEnabled",function(a){var c=this.modelSet.getSelectionHaloEnabled()||a&&this.showSelected;a&&(this.showSelected=!1);return c},"~B");b(c$,"setStrandCount",function(a,c){c=J.viewer.Viewer.checkIntRange(c,0,20);switch(a){case 12:this.global.strandCountForStrands=c;break;case 13:this.global.strandCountForMeshRibbon=
c;break;default:this.global.strandCountForStrands=c,this.global.strandCountForMeshRibbon=c}this.global.setI("strandCount",c);this.global.setI("strandCountForStrands",this.global.strandCountForStrands);this.global.setI("strandCountForMeshRibbon",this.global.strandCountForMeshRibbon)},"~N,~N");b(c$,"getStrandCount",function(a){return 12==a?this.global.strandCountForStrands:this.global.strandCountForMeshRibbon},"~N");b(c$,"setNavigationMode",function(a){this.global.navigationMode=a;this.transformManager.setNavigationMode(a)},
"~B");b(c$,"setTransformManagerDefaults",function(){this.transformManager.setCameraDepthPercent(this.global.defaultCameraDepth,!0);this.transformManager.setPerspectiveDepth(this.global.defaultPerspectiveDepth);this.transformManager.setStereoDegrees(-5);this.transformManager.setVisualRange(this.global.visualRange);this.transformManager.setSpinOff();this.transformManager.setVibrationPeriod(0);this.transformManager.setFrameOffsets(this.frameOffsets)});b(c$,"getCameraFactors",function(){return this.transformManager.getCameraFactors()});
b(c$,"getCameraDepth",function(){return this.transformManager.getCameraDepth()});b(c$,"getLoadState",function(a){return this.getStateCreator().getLoadState(a)},"java.util.Map");e(c$,"setAutoBond",function(a){this.global.setB("autobond",a);this.global.autoBond=a},"~B");b(c$,"makeConnections",function(a,c,b,e,f,g,h,l,j,k){this.clearModelDependentObjects();this.clearMinimization();return this.modelSet.makeConnections(a,c,b,e,f,g,h,l,j,k)},"~N,~N,~N,~N,JU.BS,JU.BS,JU.BS,~B,~B,~N");e(c$,"rebond",function(){this.rebondState(!1)});
b(c$,"rebondState",function(a){this.clearModelDependentObjects();this.modelSet.deleteAllBonds();a=a&&this.global.legacyAutoBonding;this.modelSet.autoBondBs4(null,null,null,null,this.getMadBond(),a);this.addStateScript(a?"set legacyAutoBonding TRUE;connect;set legacyAutoBonding FALSE;":"connect;",!1,!0)},"~B");b(c$,"setPdbConectBonding",function(a,c){this.clearModelDependentObjects();this.modelSet.deleteAllBonds();var b=new JU.BS;this.modelSet.setPdbConectBonding(0,0,b);if(a){var e=c&&this.global.legacyAutoBonding;
this.modelSet.autoBondBs4(null,null,b,null,this.getMadBond(),e);this.addStateScript(e?"set legacyAutoBonding TRUE;connect PDB AUTO;set legacyAutoBonding FALSE;":"connect PDB auto;",!1,!0)}else this.addStateScript("connect PDB;",!1,!0)},"~B,~B");e(c$,"setPercentVdwAtom",function(a){this.global.setI("percentVdwAtom",a);this.global.percentVdwAtom=a;this.rd.value=a/100;this.rd.factorType=J.atomdata.RadiusData.EnumType.FACTOR;this.rd.vdwType=J.constant.EnumVdw.AUTO;this.setShapeSizeRD(0,this.rd,null)},
"~N");b(c$,"getDefaultRadiusData",function(){return this.rd});e(c$,"getMadBond",function(){return 2*this.global.bondRadiusMilliAngstroms});b(c$,"getMarBond",function(){return this.global.bondRadiusMilliAngstroms});b(c$,"getModeMultipleBond",function(){return this.global.modeMultipleBond});e(c$,"setShowHydrogens",function(a){this.global.setB("showHydrogens",a);this.global.showHydrogens=a},"~B");e(c$,"setShowBbcage",function(a){this.setObjectMad(32,"boundbox",a?-4:0);this.global.setB("showBoundBox",
a)},"~B");e(c$,"getShowBbcage",function(){return 0!=this.getObjectMad(4)});b(c$,"setShowUnitCell",function(a){this.setObjectMad(33,"unitcell",a?-2:0);this.global.setB("showUnitCell",a)},"~B");b(c$,"getShowUnitCell",function(){return 0!=this.getObjectMad(5)});e(c$,"setShowAxes",function(a){this.setObjectMad(31,"axes",a?-2:0);this.global.setB("showAxes",a)},"~B");e(c$,"getShowAxes",function(){return 0!=this.getObjectMad(1)});e(c$,"setFrankOn",function(a){this.$isPreviewOnly&&(a=!1);this.frankOn=a;this.setObjectMad(35,
"frank",a?1:0)},"~B");b(c$,"getShowFrank",function(){return this.$isPreviewOnly||this.$isApplet&&this.creatingImage?!1:!this.isJS&&this.$isSignedApplet&&!this.isSignedAppletLocal||this.frankOn});e(c$,"setShowMeasurements",function(a){this.global.setB("showMeasurements",a);this.global.showMeasurements=a},"~B");b(c$,"setUnits",function(a,c){this.global.setUnits(a);c&&(this.global.setUnits(a),this.setShapeProperty(6,"reformatDistances",null))},"~S,~B");b(c$,"getMeasureDistanceUnits",function(){return this.global.measureDistanceUnits});
b(c$,"getEnergyUnits",function(){return this.global.energyUnits});b(c$,"setAppendNew",function(a){this.global.appendNew=a},"~B");e(c$,"setRasmolDefaults",function(){this.setDefaultsType("RasMol")});e(c$,"setJmolDefaults",function(){this.setDefaults()});b(c$,"setDefaultsType",function(a){a.equalsIgnoreCase("RasMol")?this.stateManager.setRasMolDefaults():a.equalsIgnoreCase("PyMOL")?this.stateManager.setPyMOLDefaults():this.setDefaults()},"~S");b(c$,"setDefaults",function(){this.setShapeSizeRD(0,this.rd,
this.getAllAtoms())});b(c$,"setAntialias",function(a,c){switch(a){case 603979786:this.global.antialiasDisplay=c;break;case 603979790:this.global.antialiasTranslucent=c;break;case 603979788:this.global.antialiasImages=c;return}this.resizeImage(0,0,!1,!1,!0)},"~N,~B");b(c$,"allocTempPoints",function(a){return this.tempArray.allocTempPoints(a)},"~N");b(c$,"freeTempPoints",function(a){this.tempArray.freeTempPoints(a)},"~A");b(c$,"allocTempScreens",function(a){return this.tempArray.allocTempScreens(a)},
"~N");b(c$,"freeTempScreens",function(a){this.tempArray.freeTempScreens(a)},"~A");b(c$,"allocTempEnum",function(a){return this.tempArray.allocTempEnum(a)},"~N");b(c$,"freeTempEnum",function(a){this.tempArray.freeTempEnum(a)},"~A");b(c$,"getFont3D",function(a,c,b){return this.gdata.getFont3DFSS(a,c,b)},"~S,~S,~N");b(c$,"formatText",function(a){if(0>a.indexOf("@{")&&0>a.indexOf("%{"))return a;var c=a,b=0<=c.indexOf("\\");b&&(c=JU.PT.simpleReplace(c,"\\%","\u0001"),c=JU.PT.simpleReplace(c,"\\@","\u0002"),
b=!c.equals(a));for(var c=JU.PT.simpleReplace(c,"%{","@{"),e;0<=(a=c.indexOf("@{"));){a++;var f=a+1;e=c.length;a=J.util.Txt.ichMathTerminator(c,a,e);if(a>=e)return c;e=c.substring(f,a);if(0==e.length)return c;e=this.evaluateExpression(e);s(e,JU.P3)&&(e=J.util.Escape.eP(e));c=c.substring(0,f-2)+e.toString()+c.substring(a+1)}b&&(c=JU.PT.simpleReplace(c,"\u0002","@"),c=JU.PT.simpleReplace(c,"\u0001","%"));return c},"~S");b(c$,"getElementSymbol",function(a){return this.modelSet.getElementSymbol(a)},"~N");
b(c$,"getElementNumber",function(a){return this.modelSet.getElementNumber(a)},"~N");e(c$,"getAtomName",function(a){return this.modelSet.getAtomName(a)},"~N");e(c$,"getAtomNumber",function(a){return this.modelSet.getAtomNumber(a)},"~N");b(c$,"getAtomGroupQuaternions",function(a,c){return this.modelSet.getAtomGroupQuaternions(a,c,this.getQuaternionFrame())},"JU.BS,~N");b(c$,"getAtomQuaternion",function(a){return this.modelSet.getQuaternion(a,this.getQuaternionFrame())},"~N");e(c$,"getAtomPoint3f",function(a){return this.modelSet.atoms[a]},
"~N");b(c$,"getAtomPointVector",function(a){return this.modelSet.getAtomPointVector(a)},"JU.BS");e(c$,"getAtomRadius",function(a){return this.modelSet.getAtomRadius(a)},"~N");e(c$,"getAtomArgb",function(a){return this.gdata.getColorArgbOrGray(this.modelSet.getAtomColix(a))},"~N");e(c$,"getAtomModelIndex",function(a){return this.modelSet.atoms[a].modelIndex},"~N");e(c$,"getBondRadius",function(a){return this.modelSet.getBondRadius(a)},"~N");e(c$,"getBondOrder",function(a){return this.modelSet.getBondOrder(a)},
"~N");b(c$,"assignAromaticBonds",function(){this.modelSet.assignAromaticBonds()});b(c$,"resetAromatic",function(){this.modelSet.resetAromatic()});e(c$,"getBondArgb1",function(a){return this.gdata.getColorArgbOrGray(this.modelSet.getBondColix1(a))},"~N");e(c$,"getBondModelIndex",function(a){return this.modelSet.getBondModelIndex(a)},"~N");e(c$,"getBondArgb2",function(a){return this.gdata.getColorArgbOrGray(this.modelSet.getBondColix2(a))},"~N");e(c$,"getPolymerLeadMidPoints",function(a,c){return this.modelSet.getPolymerLeadMidPoints(a,
c)},"~N,~N");b(c$,"setStereoMode",function(a,c,b){this.setFloatProperty("stereoDegrees",b);this.setBooleanProperty("greyscaleRendering",c.isBiColor());null!=a?this.transformManager.setStereoMode2(a):this.transformManager.setStereoMode(c)},"~A,J.constant.EnumStereoMode,~N");b(c$,"isStereoDouble",function(){return this.transformManager.stereoMode===J.constant.EnumStereoMode.DOUBLE});e(c$,"getOperatingSystemName",function(){return J.viewer.Viewer.strOSName+(!this.isJS?"":this.isWebGL?"(WebGL)":"(HTML5)")});
e(c$,"getJavaVendor",function(){return J.viewer.Viewer.strJavaVendor});e(c$,"getJavaVersion",function(){return J.viewer.Viewer.strJavaVersion});b(c$,"getGraphicsData",function(){return this.gdata});e(c$,"getProperty",function(a,c,b){if(!"DATA_API".equals(a))return this.getPropertyManager().getProperty(a,c,b);switch("scriptCheck.........consoleText.........scriptEditor........scriptEditorState...getAppConsole.......getScriptEditor.....setMenu.............spaceGroupInfo......disablePopupMenu....defaultDirectory....getPopupMenu........shapeManager........".indexOf(c)){case 0:return this.scriptCheckRet(b,
!0);case 20:return null==this.appConsole?"":this.appConsole.getText();case 40:return this.showEditor(b),null;case 60:return this.scriptEditorVisible=b.booleanValue(),null;case 80:return this.$isKiosk?this.appConsole=null:s(b,J.api.JmolAppConsoleInterface)?this.appConsole=b:null!=b&&!b.booleanValue()?this.appConsole=null:null==this.appConsole&&(null!=b&&b.booleanValue())&&(this.isJS&&(this.appConsole=J.api.Interface.getOptionInterface("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!=b&&b.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=b;case 140:return this.getSpaceGroupInfo(null);case 160:return this.global.disablePopupMenu=
!0,null;case 180:return this.global.defaultDirectory;case 200:return s(b,String)?this.getMenu(b):this.getPopupMenu();case 220:return this.shapeManager.getProperty(b)}J.util.Logger.error("ERROR in getProperty DATA_API: "+c);return null},"~S,~S,~O");b(c$,"showEditor",function(a){var c=this.getProperty("DATA_API","getScriptEditor",Boolean.TRUE);null!=c&&c.show(a)},"~A");b(c$,"getPropertyManager",function(){null==this.pm&&(this.pm=J.api.Interface.getOptionInterface("viewer.PropertyManager")).setViewer(this);
return this.pm});b(c$,"getModelExtract",function(a,c,b,e){return this.getPropertyManager().getModelExtract(this.getAtomBitSet(a),c,b,e)},"~O,~B,~B,~S");b(c$,"setTainted",function(a){this.isTainted=this.axesAreTainted=a&&(this.refreshing||this.creatingImage)},"~B");b(c$,"notifyMouseClicked",function(a,c,b,e){var f=J.viewer.binding.Binding.getButtonMods(b),g=J.viewer.binding.Binding.getClickCount(b);this.global.setI("_mouseX",a);this.global.setI("_mouseY",this.dimScreen.height-c);this.global.setI("_mouseAction",
b);this.global.setI("_mouseModifiers",f);this.global.setI("_clickCount",g);return this.statusManager.setStatusClicked(a,this.dimScreen.height-c,b,g,e)},"~N,~N,~N,~N");b(c$,"checkObjectClicked",function(a,c,b){return this.shapeManager.checkObjectClicked(a,c,b,this.getVisibleFramesBitSet(),this.global.drawPicking)},"~N,~N,~N");b(c$,"checkObjectHovered",function(a,c){return 0<=a&&null!=this.shapeManager&&this.shapeManager.checkObjectHovered(a,c,this.getVisibleFramesBitSet(),this.getBondPicking())},"~N,~N");
b(c$,"checkObjectDragged",function(a,c,b,e,f){var g=0;switch(this.getPickingMode()){case 2:g=5;break;case 4:g=22}this.shapeManager.checkObjectDragged(a,c,b,e,f,this.getVisibleFramesBitSet(),g)&&(this.refresh(1,"checkObjectDragged"),22==g&&this.scriptEcho(this.getShapeProperty(22,"command")))},"~N,~N,~N,~N,~N");b(c$,"rotateAxisAngleAtCenter",function(a,c,b,e,f,g,h){(a=this.transformManager.rotateAxisAngleAtCenter(a,c,b,e,f,g,h))&&this.refresh(-1,"rotateAxisAngleAtCenter");return a},"J.api.JmolScriptEvaluator,JU.P3,JU.V3,~N,~N,~B,JU.BS");
b(c$,"rotateAboutPointsInternal",function(a,c,b,e,f,g,h,l,j,k){(a=this.transformManager.rotateAboutPointsInternal(a,c,b,e,f,!1,g,h,!1,l,j,k))&&this.refresh(-1,"rotateAxisAboutPointsInternal");return a},"J.api.JmolScriptEvaluator,JU.P3,JU.P3,~N,~N,~B,JU.BS,JU.V3,JU.List,~A");b(c$,"startSpinningAxis",function(a,c,b){this.getSpinOn()||this.getNavOn()?(this.setSpinOn(!1),this.setNavOn(!1)):this.transformManager.rotateAboutPointsInternal(null,a,c,this.global.pickingSpinRate,3.4028235E38,b,!0,null,!1,null,
null,null)},"JU.P3,JU.P3,~B");b(c$,"getModelDipole",function(){return this.modelSet.getModelDipole(this.animationManager.currentModelIndex)});b(c$,"calculateMolecularDipole",function(){return this.modelSet.calculateMolecularDipole(this.animationManager.currentModelIndex)});b(c$,"getAtomIdentityInfo",function(a,c){this.modelSet.getAtomIdentityInfo(a,c)},"~N,java.util.Map");b(c$,"setDefaultLattice",function(a){this.global.setDefaultLattice(a);this.global.setS("defaultLattice",J.util.Escape.eP(a))},
"JU.P3");b(c$,"getDefaultLattice",function(){return this.global.ptDefaultLattice});b(c$,"getTaintedAtoms",function(a){return this.modelSet.getTaintedAtoms(a)},"~N");b(c$,"setTaintedAtoms",function(a,c){this.modelSet.setTaintedAtoms(a,c)},"JU.BS,~N");b(c$,"getData",function(a,c){var b="";if(c.equalsIgnoreCase("MOL")||c.equalsIgnoreCase("SDF")||c.equalsIgnoreCase("V2000")||c.equalsIgnoreCase("V3000")||c.equalsIgnoreCase("XYZVIB")||c.equalsIgnoreCase("CD")||c.equalsIgnoreCase("JSON"))return this.getModelExtract(a,
!1,!1,c);if(0==c.toLowerCase().indexOf("property_"))b='{selected}.label("%{'+c+'}")';else{if(c.equalsIgnoreCase("CML"))return this.getModelCml(this.getAtomBitSet(a),2147483647,!0);b=c.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':c.equalsIgnoreCase("XYZRN")?'"" + {selected}.size + "\n\n"+{selected}.label("%-2e %8.3x %8.3y %8.3z %4.2[vdw] 1 [%n]%r.%a#%i").lines':
c.startsWith("USER:")?'{selected}.label("'+c.substring(5)+'").lines':'"" + {selected}.size + "\n\n"+{selected}.label("%-2e %10.5x %10.5y %10.5z").lines'}a.equals("selected")||(b=JU.PT.simpleReplace(b,"selected",a));return this.evaluateExpression(b)},"~S,~S");b(c$,"getModelCml",function(a,c,b){return this.modelSet.getModelCml(a,c,b)},"JU.BS,~N,~B");b(c$,"getHelixData",function(a,c){return this.modelSet.getHelixData(a,c)},"JU.BS,~N");b(c$,"getPdbAtomData",function(a,c){return this.modelSet.getPdbAtomData(null==
a?this.getSelectionSet(!0):a,c)},"JU.BS,JU.OC");b(c$,"isJmolDataFrameForModel",function(a){return this.modelSet.isJmolDataFrameForModel(a)},"~N");b(c$,"isJmolDataFrame",function(){return this.modelSet.isJmolDataFrameForModel(this.animationManager.currentModelIndex)});b(c$,"getJmolDataFrameIndex",function(a,c){return this.modelSet.getJmolDataFrameIndex(a,c)},"~N,~S");b(c$,"setJmolDataFrame",function(a,c,b){this.modelSet.setJmolDataFrame(a,c,b)},"~S,~N,~N");b(c$,"setFrameTitle",function(a,c){this.modelSet.setFrameTitle(J.util.BSUtil.newAndSetBit(a),
c)},"~N,~S");b(c$,"setFrameTitleObj",function(a){this.loadShape(30);this.modelSet.setFrameTitle(this.getVisibleFramesBitSet(),a)},"~O");b(c$,"getFrameTitle",function(){return this.modelSet.getFrameTitle(this.animationManager.currentModelIndex)});b(c$,"getJmolFrameType",function(a){return this.modelSet.getJmolFrameType(a)},"~N");b(c$,"getJmolDataSourceFrame",function(a){return this.modelSet.getJmolDataSourceFrame(a)},"~N");b(c$,"setAtomProperty",function(a,c,b,e,f,g,h){1649412120==c&&this.shapeManager.deleteVdwDependentShapes(a);
this.clearMinimization();this.modelSet.setAtomProperty(a,c,b,e,f,g,h);switch(c){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");b(c$,"checkCoordinatesChanged",function(){this.modelSet.recalculatePositionDependentQuantities(null,null);this.refreshMeasures(!0)});b(c$,"setAtomCoord",function(a,c,b,e){this.modelSet.setAtomCoord(a,c,b,e)},
"~N,~N,~N,~N");b(c$,"setAtomCoordRelative",function(a,c,b,e){this.modelSet.setAtomCoordRelative(a,c,b,e)},"~N,~N,~N,~N");b(c$,"setAtomCoords",function(a,c,b){0!=a.cardinality()&&(this.modelSet.setAtomCoords(a,c,b),this.checkMinimization(),this.statusManager.setStatusAtomMoved(a))},"JU.BS,~N,~O");b(c$,"setAtomCoordsRelative",function(a,c){null==c&&(c=this.getSelectionSet(!1));0!=c.cardinality()&&(this.modelSet.setAtomCoordsRelative(a,c),this.checkMinimization(),this.statusManager.setStatusAtomMoved(c))},
"JU.T3,JU.BS");b(c$,"invertAtomCoordPt",function(a,c){this.modelSet.invertSelected(a,null,-1,null,c);this.checkMinimization();this.statusManager.setStatusAtomMoved(c)},"JU.P3,JU.BS");b(c$,"invertAtomCoordPlane",function(a,c){this.modelSet.invertSelected(null,a,-1,null,c);this.checkMinimization();this.statusManager.setStatusAtomMoved(c)},"JU.P4,JU.BS");b(c$,"invertSelected",function(a,c,b,e){var f=this.getSelectionSet(!1);0!=f.cardinality()&&(this.modelSet.invertSelected(a,c,b,e,f),this.checkMinimization(),
this.statusManager.setStatusAtomMoved(f))},"JU.P3,JU.P4,~N,JU.BS");b(c$,"moveAtoms",function(a,c,b,e,f,g,h){0!=g.cardinality()&&(this.modelSet.moveAtoms(a,c,b,g,e,f,h),this.checkMinimization(),this.statusManager.setStatusAtomMoved(g))},"JU.M3,JU.M3,JU.V3,JU.P3,~B,JU.BS,~B");b(c$,"moveSelected",function(a,c,b,e,f,g,h,l){0!=b&&(-2147483648==e&&(this.rotateBondIndex=-1),this.isJmolDataFrame()||(-2147483648==a?(this.showSelected=!0,this.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!=e?this.actionRotateBond(a,c,e,f):(g=this.setMovableBitSet(g,!l),0!=g.cardinality()&&(h?(e=this.getAtomSetCenter(g),this.transformManager.finalizeTransformParameters(),f=this.global.antialiasDisplay?2:1,h=this.transformPt(e),a=-2147483648!=b?JU.P3.new3(h.x,h.y,h.z+b+0.5):JU.P3.new3(h.x+a*f+0.5,h.y+c*f+0.5,h.z),c=new JU.P3,this.unTransformPoint(a,
c),c.sub(e),this.setAtomCoordsRelative(c,g)):this.transformManager.rotateXYBy(a,c,g))),this.refresh(2,""),this.movingSelected=!1)))},"~N,~N,~N,~N,~N,JU.BS,~B,~B");b(c$,"highlightBond",function(a,c){if(!c||this.hoverEnabled){var b=null;if(0<=a){var e=this.modelSet.bonds[a],b=e.getAtomIndex2();if(!this.isAtomAssignable(b))return;b=J.util.BSUtil.newAndSetBit(b);b.set(e.getAtomIndex1())}this.highlight(b);this.refresh(3,"highlightBond")}},"~N,~B");b(c$,"highlight",function(a){null!=a&&this.loadShape(8);
this.setShapeProperty(8,"highlight",a)},"JU.BS");b(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");b(c$,"getRotateBondIndex",function(){return this.rotateBondIndex});b(c$,"actionRotateBond",function(a,c,b,e){if(!(0>this.rotateBondIndex)){var f=this.bsRotateBranch,g,h;if(null==f){h=this.modelSet.bonds[this.rotateBondIndex];g=h.getAtom1();h=h.getAtom2();this.undoMoveActionClear(g.index,
2,!0);b=JU.P3.new3(b,e,m((g.sZ+h.sZ)/2));this.transformManager.unTransformPoint(b,b);if(1==h.getCovalentBondCount()||b.distance(g)<b.distance(h)&&1!=g.getCovalentBondCount())e=g,g=h,h=e;if(90<J.util.Measure.computeAngleABC(b,g,h,!0)||90<J.util.Measure.computeAngleABC(b,h,g,!0))f=this.getBranchBitSet(h.index,g.index,!0);if(null!=f){b=0;for(e=g.getBonds().length;0<=--e;)if(f.get(g.getBondedAtomIndex(e))&&2==++b){f=null;break}}null==f&&(f=this.getMoleculeBitSet(g.index));this.bsRotateBranch=f;this.rotatePrev1=
g.index;this.rotatePrev2=h.index}else g=this.modelSet.atoms[this.rotatePrev1],h=this.modelSet.atoms[this.rotatePrev2];b=JU.V3.new3(h.sX-g.sX,h.sY-g.sY,0);a=JU.V3.new3(a,c,0);b.cross(b,a);a=(0<b.z?1:-1)*a.length();f=J.util.BSUtil.copy(f);f.andNot(this.selectionManager.getMotionFixedAtoms());this.rotateAboutPointsInternal(this.eval,g,h,0,a,!1,f,null,null,null)}},"~N,~N,~N,~N");b(c$,"refreshMeasures",function(a){this.setShapeProperty(6,"refresh",null);a&&this.stopMinimization()},"~B");b(c$,"functionXY",
function(a,c,b){var e=null;if(0==a.indexOf("file:"))e=this.getFileAsString(a.substring(5));else if(0!=a.indexOf("data2d_"))return this.statusManager.functionXY(a,c,b);c=Math.abs(c);b=Math.abs(b);if(null==e){a=this.getDataFloat2D(a);if(null!=a)return a;e=""}a=M(c,b,0);var f=M(c*b,0);J.util.Parser.parseStringInfestedFloatArray(e,null,f);for(var g=e=0;e<c;e++)for(var h=0;h<b;h++)a[e][h]=f[g++];return a},"~S,~N,~N");b(c$,"functionXYZ",function(a,c,b,e){var f=null;if(0==a.indexOf("file:"))f=this.getFileAsString(a.substring(5));
else if(0!=a.indexOf("data3d_"))return this.statusManager.functionXYZ(a,c,b,e);c=Math.abs(c);b=Math.abs(b);e=Math.abs(e);if(null==f){a=this.getDataFloat3D(a);if(null!=a)return a;f=""}a=M(c,b,e,0);var g=M(c*b*e,0);J.util.Parser.parseStringInfestedFloatArray(f,null,g);for(var h=f=0;f<c;f++)for(var l=0;l<b;l++)for(var j=0;j<e;j++)a[f][l][j]=g[h++];return a},"~S,~N,~N,~N");e(c$,"extractMolData",function(a){if(null==a){a=this.getCurrentModelIndex();if(0>a)return null;a=this.getModelNumberDotted(a)}return this.getModelExtract(a,
!0,!1,"V2000")},"~S");b(c$,"getNMRPredict",function(a){var c=this.getModelExtract("selected",!0,!1,"V2000"),b=c.indexOf("\n"),c="Jmol "+J.viewer.Viewer.version_date+c.substring(b);return a?(this.$isApplet?this.showUrl(this.global.nmrUrlFormat+c):(this.syncScript("true","*",0),this.syncScript("JSpecView:",".",0)),null):this.getFileAsString(this.global.nmrPredictFormat+c)},"~B");b(c$,"getHelp",function(a){0>this.global.helpPath.indexOf("?")?(0<a.length&&0!=a.indexOf("?")&&(a="?search="+JU.PT.simpleReplace(a,
" ","%20")),a+=(0==a.length?"?ver=":"&ver=")+J.viewer.JC.version):a="&"+a;this.showUrl(this.global.helpPath+a)},"~S");b(c$,"show2D",function(a){this.showUrl(this.setLoadFormat("_"+a,"2",!1))},"~S");b(c$,"getChemicalInfo",function(a,c,b){a=this.setLoadFormat("_"+a,c,!1);"/"==c&&(a+=JU.PT.simpleReplace(b," ","%20"));return this.getFileAsString4(a,-1,!1,!1,!1)},"~S,~S,~S");b(c$,"addCommand",function(a){!this.autoExit&&(this.haveDisplay&&this.getPreserveState())&&this.commandHistory.addCommand(JU.PT.replaceAllCharacters(a,
"\r\n\t"," "))},"~S");b(c$,"removeCommand",function(){return this.commandHistory.removeCommand()});e(c$,"getSetHistory",function(a){return this.commandHistory.getSetHistory(a)},"~N");b(c$,"getOutputChannel",function(a,c){return this.getOutputManager().getOutputChannel(a,c)},"~S,~A");e(c$,"writeTextFile",function(a,c){var b=new java.util.Hashtable;b.put("fileName",a);b.put("type","txt");b.put("text",c);this.outputToFile(b)},"~S,~S");e(c$,"clipImageOrPasteText",function(a){return!this.haveAccess(J.viewer.Viewer.ACCESS.ALL)?
"no":this.getOutputManager().clipImageOrPasteText(a)},"~S");e(c$,"getClipboardText",function(){if(!this.haveAccess(J.viewer.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;}});b(c$,"processWriteOrCapture",function(a){return this.getOutputManager().processWriteOrCapture(a)},"java.util.Map");b(c$,"createZip",function(a,c,b){var e=new java.util.Hashtable;e.put("fileName",
a);e.put("type",c);e.put("text",this.getStateInfo());null!=b&&e.put("scripts",b);return this.getOutputManager().outputToFile(e)},"~S,~S,~A");e(c$,"outputToFile",function(a){return this.getOutputManager().outputToFile(a)},"java.util.Map");b(c$,"getOutputManager",function(){return null!=this.outputManager?this.outputManager:(this.outputManager=J.api.Interface.getOptionInterface(this.isJS&&!this.isWebGL?"viewer.OutputManagerJS":"viewer.OutputManagerAwt")).setViewer(this,this.privateKey)});b(c$,"setSyncTarget",
function(a,c){switch(a){case 0:this.statusManager.syncingMouse=c;break;case 1:this.statusManager.syncingScripts=c;break;case 2:this.statusManager.syncSend(c?"GET_GRAPHICS":"SET_GRAPHICS_OFF","*",0);Float.isNaN(this.transformManager.stereoDegrees)&&this.setFloatProperty("stereoDegrees",-5);c&&(this.setBooleanProperty("_syncMouse",!1),this.setBooleanProperty("_syncScript",!1));return}!this.statusManager.syncingScripts&&!this.statusManager.syncingMouse&&this.refresh(-1,"set sync")},"~N,~B");e(c$,"syncScript",
function(a,c,b){this.getStateCreator().syncScript(a,c,b)},"~S,~S,~N");b(c$,"getModelIndexFromId",function(a){return this.modelSet.getModelIndexFromId(a)},"~S");b(c$,"setSyncDriver",function(a){this.statusManager.setSyncDriver(a)},"~N");b(c$,"getPartialCharges",function(){return this.modelSet.getPartialCharges()});b(c$,"setProteinType",function(a,c){this.modelSet.setProteinType(null==c?this.getSelectionSet(!1):c,a)},"J.constant.EnumStructure,JU.BS");e(c$,"getBondPoint3f1",function(a){return this.modelSet.getBondAtom1(a)},
"~N");e(c$,"getBondPoint3f2",function(a){return this.modelSet.getBondAtom2(a)},"~N");b(c$,"getVibration",function(a){return this.modelSet.getVibration(a,!1)},"~N");b(c$,"getVanderwaalsMar",function(a){return this.defaultVdw===J.constant.EnumVdw.USER?this.userVdwMars[a]:J.util.Elements.getVanderwaalsMar(a,this.defaultVdw)},"~N");b(c$,"getVanderwaalsMarType",function(a,c){if(null==c)c=this.defaultVdw;else switch(c){case J.constant.EnumVdw.USER:if(null==this.bsUserVdws)c=this.defaultVdw;else return this.userVdwMars[a&
127];break;case J.constant.EnumVdw.AUTO:case J.constant.EnumVdw.JMOL:case J.constant.EnumVdw.BABEL:case J.constant.EnumVdw.RASMOL:this.defaultVdw!==J.constant.EnumVdw.AUTO&&(c=this.defaultVdw)}return J.util.Elements.getVanderwaalsMar(a,c)},"~N,J.constant.EnumVdw");b(c$,"setVdwStr",function(a){a=J.constant.EnumVdw.getVdwType(a);null==a&&(a=J.constant.EnumVdw.AUTO);switch(a){case J.constant.EnumVdw.JMOL:case J.constant.EnumVdw.BABEL:case J.constant.EnumVdw.RASMOL:case J.constant.EnumVdw.AUTO:case J.constant.EnumVdw.USER:break;
default:a=J.constant.EnumVdw.JMOL}a!==this.defaultVdw&&(a===J.constant.EnumVdw.USER&&null==this.bsUserVdws)&&this.setUserVdw(this.defaultVdw);this.defaultVdw=a;this.global.setS("defaultVDW",a.getVdwLabel())},"~S");b(c$,"setUserVdw",function(a){this.userVdwMars=D(J.util.Elements.elementNumberMax,0);this.userVdws=M(J.util.Elements.elementNumberMax,0);this.bsUserVdws=new JU.BS;a===J.constant.EnumVdw.USER&&(a=J.constant.EnumVdw.JMOL);for(var c=1;c<J.util.Elements.elementNumberMax;c++)this.userVdwMars[c]=
J.util.Elements.getVanderwaalsMar(c,a),this.userVdws[c]=this.userVdwMars[c]/1E3},"J.constant.EnumVdw");b(c$,"getDefaultVdwNameOrData",function(a,c,b){switch(a){case -2147483648:return this.defaultVdw.getVdwLabel();case 2147483647:if(null==(b=this.bsUserVdws))return"";c=J.constant.EnumVdw.USER}if(null==c||c===J.constant.EnumVdw.AUTO)c=this.defaultVdw;c===J.constant.EnumVdw.USER&&null==this.bsUserVdws&&this.setUserVdw(this.defaultVdw);return this.getDataManager().getDefaultVdwNameOrData(c,b)},"~N,J.constant.EnumVdw,JU.BS");
b(c$,"deleteAtoms",function(a,c){var b=null==a?-1:a.nextSetBit(0);if(0>b)return 0;this.clearModelDependentObjects();if(!c){this.statusManager.modifySend(b,this.modelSet.atoms[b].modelIndex,4);this.modelSet.deleteAtoms(a);var e=this.selectionManager.deleteAtoms(a);this.setTainted(!0);this.statusManager.modifySend(b,this.modelSet.atoms[b].modelIndex,-4);return e}b=this.modelSet.atoms[b].modelIndex;this.statusManager.modifySend(-1,b,5);this.setCurrentModelIndexClear(0,!1);this.animationManager.setAnimationOn(!1);
var e=J.util.BSUtil.copy(this.getDeletedAtoms()),f=this.modelSet.deleteModels(a);this.selectionManager.processDeletedModelAtoms(f);this.setAnimationRange(0,0);null!=this.eval&&this.eval.deleteAtomsInVariables(f);this.clearRepaintManager(-1);this.animationManager.clear();this.animationManager.initializePointers(1);this.setCurrentModelIndexClear(1<this.getModelCount()?-1:0,1<this.getModelCount());this.hoverAtomIndex=-1;this.setFileLoadStatus(J.constant.EnumFileStatus.DELETED,null,null,null,null,null);
this.refreshMeasures(!0);null!=e&&f.andNot(e);this.statusManager.modifySend(-1,b,-5);return J.util.BSUtil.cardinalityOf(f)},"JU.BS,~B");b(c$,"deleteBonds",function(a){this.modelSet.deleteBonds(a,!1)},"JU.BS");b(c$,"deleteModelAtoms",function(a,c,b){this.selectionManager.deleteModelAtoms(b);J.util.BSUtil.deleteBits(this.getFrameOffsets(),b);this.setFrameOffsets(this.getFrameOffsets());this.getDataManager().deleteModelAtoms(a,c,b)},"~N,~N,JU.BS");b(c$,"getDeletedAtoms",function(){return this.selectionManager.getDeletedAtoms()});
b(c$,"getQuaternionFrame",function(){return this.global.quaternionFrame.charAt(2==this.global.quaternionFrame.length?1:0)});b(c$,"calculatePointGroup",function(){return this.modelSet.calculatePointGroup(this.getSelectionSet(!1))});b(c$,"getPointGroupInfo",function(a){return this.modelSet.getPointGroupInfo(this.getAtomBitSet(a))},"~O");b(c$,"getPointGroupAsString",function(a,c,b,e){return this.modelSet.getPointGroupAsString(this.getSelectionSet(!1),a,c,b,e)},"~B,~S,~N,~N");b(c$,"loadImage",function(a,
c){this.fileManager.loadImage(a,c)},"~S,~S");b(c$,"loadImageData",function(a,c,b,e){null!=c&&(null==a&&J.util.Logger.info(c),null==b?this.setBackgroundImage(null==a?null:c,a):(this.loadShape(30),this.setShapeProperty(30,"text",c),null!=a&&this.setShapeProperty(30,"image",a)),null!=e&&(e.mustResumeEval=!0,this.eval.resumeEval(e)))},"~O,~S,~S,J.script.ScriptContext");b(c$,"cd",function(a){null==a?a=".":0==a.length&&(this.setStringProperty("defaultDirectory",""),a=".");a=this.fileManager.getDefaultDirectory(a+
(a.equals("=")?"":a.endsWith("/")?"X.spt":"/X.spt"));0<a.length&&this.setStringProperty("defaultDirectory",a);this.fileManager.getFilePath(a+"/",!0,!1).startsWith("file:/")&&J.viewer.FileManager.setLocalPath(this,a,!1);return a},"~S");b(c$,"setErrorMessage",function(a,c){this.errorMessageUntranslated=c;null!=a&&this.eval.stopScriptThreads();return this.errorMessage=a},"~S,~S");e(c$,"getErrorMessage",function(){return this.errorMessage});e(c$,"getErrorMessageUn",function(){return null==this.errorMessageUntranslated?
this.errorMessage:this.errorMessageUntranslated});b(c$,"setShapeErrorState",function(a,c){this.currentShapeID=a;this.currentShapeState=c},"~N,~S");b(c$,"getShapeErrorState",function(){if(0>this.currentShapeID)return"";null!=this.modelSet&&this.shapeManager.releaseShape(this.currentShapeID);this.clearRepaintManager(this.currentShapeID);return J.viewer.JC.getShapeClassName(this.currentShapeID,!1)+" "+this.currentShapeState});b(c$,"handleError",function(a,c){try{c&&this.zapMsg(""+a),this.undoClear(),
0==J.util.Logger.getLogLevel()&&J.util.Logger.setLogLevel(4),this.setCursor(0),this.setBooleanProperty("refreshing",!0),this.fileManager.setPathForAllFiles(""),J.util.Logger.error("viewer handling error condition: "+a+"  "),this.isJS||a.printStackTrace(),this.notifyError("Error","doClear="+c+"; "+a,""+a)}catch(b){try{J.util.Logger.error("Could not notify error "+a+": due to "+b)}catch(e){}}},"Error,~B");b(c$,"getAtomicCharges",function(){return this.modelSet.getAtomicCharges()});b(c$,"getFunctions",
function(a){return a?J.viewer.Viewer.staticFunctions:this.localFunctions},"~B");b(c$,"removeFunction",function(a){null!=this.getFunction(a)&&(J.viewer.Viewer.staticFunctions.remove(a),this.localFunctions.remove(a))},"~S");b(c$,"getFunction",function(a){if(null==a)return null;a=(J.viewer.Viewer.isStaticFunction(a)?J.viewer.Viewer.staticFunctions:this.localFunctions).get(a);return null==a||null==a.geTokens()?null:a},"~S");c$.isStaticFunction=b(c$,"isStaticFunction",function(a){return a.startsWith("static_")},
"~S");b(c$,"isFunction",function(a){return(J.viewer.Viewer.isStaticFunction(a)?J.viewer.Viewer.staticFunctions:this.localFunctions).containsKey(a)},"~S");b(c$,"clearFunctions",function(){J.viewer.Viewer.staticFunctions.clear();this.localFunctions.clear()});b(c$,"addFunction",function(a){var c=a.getName();(J.viewer.Viewer.isStaticFunction(c)?J.viewer.Viewer.staticFunctions:this.localFunctions).put(c,a)},"J.api.JmolScriptFunction");b(c$,"getFunctionCalls",function(a){return this.getStateCreator().getFunctionCalls(a)},
"~S");b(c$,"showMessage",function(a){this.isPrintOnly||J.util.Logger.warn(a)},"~S");b(c$,"getMoInfo",function(a){return this.modelSet.getMoInfo(a)},"~N");b(c$,"checkPrivateKey",function(a){return a==this.privateKey},"~N");b(c$,"bindAction",function(a,c){this.haveDisplay&&this.actionManager.bindAction(a,c)},"~S,~S");b(c$,"unBindAction",function(a,c){this.haveDisplay&&this.actionManager.unbindAction(a,c)},"~S,~S");b(c$,"getMouseInfo",function(){return this.haveDisplay?this.actionManager.getMouseInfo():
null});b(c$,"getFrontPlane",function(){return this.transformManager.getFrontPlane()});b(c$,"getPlaneIntersection",function(a,c,b,e){return this.modelSet.getPlaneIntersection(a,c,b,e,1614417948==a?this.getCurrentUnitCell():null)},"~N,JU.P4,~N,~N");b(c$,"calculateStruts",function(a,c){return this.modelSet.calculateStruts(null==a?this.getSelectionSet(!1):a,null==c?this.getSelectionSet(!1):c)},"JU.BS,JU.BS");b(c$,"getPreserveState",function(){return this.global.preserveState&&null!=this.scriptManager});
b(c$,"isKiosk",function(){return this.$isKiosk});b(c$,"hasFocus",function(){return this.haveDisplay&&(this.$isKiosk||this.apiPlatform.hasFocus(this.display))});b(c$,"setFocus",function(){this.haveDisplay&&!this.apiPlatform.hasFocus(this.display)&&this.apiPlatform.requestFocusInWindow(this.display)});b(c$,"getMinimizer",function(a){null==this.minimizer&&a&&(this.minimizer=J.api.Interface.getOptionInterface("minimize.Minimizer"),this.minimizer.setProperty("viewer",this));return this.minimizer},"~B");
b(c$,"stopMinimization",function(){null!=this.minimizer&&this.minimizer.setProperty("stop",null)});b(c$,"clearMinimization",function(){null!=this.minimizer&&this.minimizer.setProperty("clear",null)});b(c$,"getMinimizationInfo",function(){return null==this.minimizer?"":this.minimizer.getProperty("log",0)});b(c$,"checkMinimization",function(){this.refreshMeasures(!0);this.global.monitorEnergy&&(this.minimize(0,0,this.getAllAtoms(),null,0,!1,!1,!0,!1),this.echoMessage(this.getParameter("_minimizationForceField")+
" Energy = "+this.getParameter("_minimizationEnergy")))});b(c$,"minimize",function(a,c,b,e,f,g,h,l,j){var k=this.global.forceField,m=this.getModelUndeletedAtomsBitSetBs(this.getVisibleFramesBitSet());null==b?b=this.getModelUndeletedAtomsBitSet(this.getVisibleFramesBitSet().length()-1):b.and(m);0>=f&&(f=5);e=J.util.BSUtil.copy(null==e?this.selectionManager.getMotionFixedAtoms():e);var p=0<e.cardinality();p&&b.andNot(e);f=h?new JU.BS:this.getAtomsWithinRadius(f,b,!0,null);f.andNot(b);p?e.and(f):e=f;
e.and(m);g&&b.or(this.addHydrogens(b,j,l));if(200<b.cardinality())J.util.Logger.error("Too many atoms for minimization (>200)");else try{l||J.util.Logger.info("Minimizing "+b.cardinality()+" atoms"),this.getMinimizer(!0).minimize(a,c,b,e,p,l,k)}catch(r){if(y(r,Exception))J.util.Logger.error("Minimization error: "+r.toString()),this.isJS||r.printStackTrace();else throw r;}},"~N,~N,JU.BS,JU.BS,~N,~B,~B,~B,~B");b(c$,"setMotionFixedAtoms",function(a){this.selectionManager.setMotionFixedAtoms(a)},"JU.BS");
b(c$,"getMotionFixedAtoms",function(){return this.selectionManager.getMotionFixedAtoms()});b(c$,"rotateArcBall",function(a,c,b){this.transformManager.rotateArcBall(a,c,b);this.refresh(2,this.statusManager.syncingMouse?"Mouse: rotateArcBall "+a+" "+c+" "+b:"")},"~N,~N,~N");b(c$,"getAtomicPropertyState",function(a,c,b,e,f){this.getStateCreator().getAtomicPropertyStateBuffer(a,c,b,e,f)},"JU.SB,~N,JU.BS,~S,~A");b(c$,"getCenterAndPoints",function(a,c){return this.modelSet.getCenterAndPoints(a,c)},"JU.List,~B");
b(c$,"writeFileData",function(a,c,b,e){return this.getOutputManager().writeFileData(a,c,b,e)},"~S,~S,~N,~A");b(c$,"getPdbData",function(a,c,b){return this.modelSet.getPdbData(a,c,this.getSelectionSet(!1),b,null)},"~N,~S,~A");b(c$,"getGroupsWithin",function(a,c){return this.modelSet.getGroupsWithin(a,c)},"~N,JU.BS");b(c$,"getExecutor",function(){if(null!=this.executor||2>J.viewer.Viewer.nProcessors)return this.executor;try{this.executor=J.api.Interface.getOptionInterface("parallel.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&&J.util.Logger.error("parallel processing is not available");return this.executor});b(c$,"getShapeInfo",function(){return this.shapeManager.getShapeInfo()});b(c$,"togglePickingLabel",function(a){null==a&&(a=this.getSelectionSet(!1));this.loadShape(5);this.shapeManager.setShapePropertyBs(5,"toggleLabel",null,a)},"JU.BS");b(c$,"loadShape",function(a){this.shapeManager.loadShape(a)},"~N");b(c$,"setShapeSize",
function(a,c,b){null==b&&(b=this.getSelectionSet(!1));this.shapeManager.setShapeSizeBs(a,c,null,b)},"~N,~N,JU.BS");b(c$,"setShapeSizeRD",function(a,c,b){this.shapeManager.setShapeSizeBs(a,0,c,b)},"~N,J.atomdata.RadiusData,JU.BS");b(c$,"setShapeProperty",function(a,c,b){0>a||this.shapeManager.setShapePropertyBs(a,c,b,null)},"~N,~S,~O");b(c$,"getShapeProperty",function(a,c){return this.shapeManager.getShapePropertyIndex(a,c,-2147483648)},"~N,~S");b(c$,"getShapePropertyData",function(a,c,b){return this.shapeManager.getShapePropertyData(a,
c,b)},"~N,~S,~A");b(c$,"getShapePropertyIndex",function(a,c,b){return this.shapeManager.getShapePropertyIndex(a,c,b)},"~N,~S,~N");b(c$,"getShapePropertyAsInt",function(a,c){var b=this.getShapeProperty(a,c);return null==b||!s(b,Integer)?-2147483648:b.intValue()},"~N,~S");b(c$,"setModelVisibility",function(){null!=this.shapeManager&&this.shapeManager.setModelVisibility()});b(c$,"resetShapes",function(a){this.shapeManager.resetShapes();a&&(this.shapeManager.loadDefaultShapes(this.modelSet),this.clearRepaintManager(-1))},
"~B");b(c$,"setAtomLabel",function(a,c){this.shapeManager.setAtomLabel(a,c)},"~S,~N");b(c$,"deleteShapeAtoms",function(a,c){this.shapeManager.deleteShapeAtoms(a,c)},"~A,JU.BS");b(c$,"resetBioshapes",function(a){this.shapeManager.resetBioshapes(a)},"JU.BS");b(c$,"getAtomShapeValue",function(a,c,b){return this.shapeManager.getAtomShapeValue(a,c,b)},"~N,J.modelset.Group,~N");b(c$,"mergeShapes",function(a){this.shapeManager.mergeShapes(a)},"~A");b(c$,"getShapeManager",function(){return this.shapeManager});
b(c$,"setParallel",function(a){return this.$isParallel=this.global.multiProcessor&&a},"~B");b(c$,"isParallel",function(){return this.global.multiProcessor&&this.$isParallel});b(c$,"getRenderableBitSet",function(){return this.shapeManager.getRenderableBitSet()});b(c$,"setAtomPickingOption",function(a){this.haveDisplay&&this.actionManager.setAtomPickingOption(a)},"~S");b(c$,"setBondPickingOption",function(a){this.haveDisplay&&this.actionManager.setBondPickingOption(a)},"~S");b(c$,"undoClear",function(){this.actionStates.clear();
this.actionStatesRedo.clear()});b(c$,"undoMoveAction",function(a,c){this.getStateCreator().undoMoveAction(a,c)},"~N,~N");b(c$,"undoMoveActionClear",function(a,c,b){this.global.preserveState&&this.getStateCreator().undoMoveActionClear(a,c,b)},"~N,~N,~B");b(c$,"assignBond",function(a,c){try{var b=this.modelSet.setBondOrder(a,c);null==b||"0"==c?this.refresh(3,"setBondOrder"):this.addHydrogens(b,!1,!0)}catch(e){if(y(e,Exception))J.util.Logger.error("assignBond failed");else throw e;}},"~N,~S");b(c$,"assignAtom",
function(a,c,b){b.equals("X")&&this.setRotateBondIndex(-1);if(this.modelSet.atoms[a].modelIndex==this.modelSet.modelCount-1)if(this.clearModelDependentObjects(),null==c){this.statusManager.modifySend(a,this.modelSet.atoms[a].modelIndex,1);var e=this.modelSet.getAtomCount();this.modelSet.assignAtom(a,b,!0);JU.PT.isOneOf(b,";Mi;Pl;X;")||this.modelSet.setAtomNamesAndNumbers(a,-e,null);this.statusManager.modifySend(a,this.modelSet.atoms[a].modelIndex,-1);this.refresh(3,"assignAtom")}else{var f=this.modelSet.atoms[a],
e=J.util.BSUtil.newAndSetBit(a);c=[c];var g=new JU.List;g.addLast(f);f=f.modelIndex;this.statusManager.modifySend(a,f,3);try{e=this.addHydrogensInline(e,g,c),a=e.nextSetBit(0),this.modelSet.assignAtom(a,b,!1)}catch(h){if(!y(h,Exception))throw h;}this.modelSet.setAtomNamesAndNumbers(a,-1,null);this.statusManager.modifySend(a,f,-3)}},"~N,JU.P3,~S");b(c$,"assignConnect",function(a,c){this.clearModelDependentObjects();var b=JU.AU.newFloat2(1);b[0]=[a,c];var e=this.modelSet.atoms[a].modelIndex;this.statusManager.modifySend(a,
e,2);this.modelSet.connect(b);this.modelSet.assignAtom(a,".",!0);this.modelSet.assignAtom(c,".",!0);this.statusManager.modifySend(a,e,-2);this.refresh(3,"assignConnect")},"~N,~N");b(c$,"moveAtomWithHydrogens",function(a,c,b,e,f){this.stopMinimization();if(null==f){var g=this.modelSet.atoms[a];f=J.util.BSUtil.newAndSetBit(a);a=g.getBonds();if(null!=a)for(var h=0;h<a.length;h++){var l=a[h].getOtherAtom(g);1==l.getElementNumber()&&f.set(l.index)}}this.moveSelected(c,b,e,-2147483648,-2147483648,f,!0,
!0)},"~N,~N,~N,~N,JU.BS");b(c$,"isAtomPDB",function(a){return this.modelSet.isAtomPDB(a)},"~N");b(c$,"isModelPDB",function(a){return this.modelSet.models[a].isBioModel},"~N");b(c$,"isAtomAssignable",function(a){return this.modelSet.isAtomAssignable(a)},"~N");e(c$,"deleteMeasurement",function(a){this.setShapeProperty(6,"delete",Integer.$valueOf(a))},"~N");b(c$,"haveModelKit",function(){return this.modelSet.haveModelKit()});b(c$,"getModelKitStateBitSet",function(a,c){return this.modelSet.getModelKitStateBitset(a,
c)},"JU.BS,JU.BS");b(c$,"getSmiles",function(a,c,b,e,f,g,h){var l=this.modelSet.atoms;null==b&&(0>a||0>c?b=this.getSelectionSet(!0):(e&&(a>c&&(b=a,a=c,c=b),a=l[a].getGroup().firstAtomIndex,c=l[c].getGroup().lastAtomIndex),b=new JU.BS,b.setBits(a,c+1)));a=h?J.viewer.Viewer.getJmolVersion()+" "+this.getModelName(this.getCurrentModelIndex()):null;return this.getSmilesMatcher().getSmiles(l,this.getAtomCount(),b,e,f,g,a)},"~N,~N,JU.BS,~B,~B,~B,~B");b(c$,"connect",function(a){this.modelSet.connect(a)},
"~A");b(c$,"prompt",function(a,c,b,e){return this.$isKiosk?"null":this.apiPlatform.prompt(a,c,b,e)},"~S,~S,~A,~B");b(c$,"getColorEncoder",function(a){return this.colorManager.getColorEncoder(a)},"~S");b(c$,"displayBonds",function(a,c){this.modelSet.displayBonds(a,c)},"J.modelset.BondSet,~B");b(c$,"getModelAtomProperty",function(a,c){return this.modelSet.getModelAtomProperty(a,c)},"J.modelset.Atom,~S");b(c$,"setStateScriptVersion",function(a){if(null!=a){a=JU.PT.getTokens(a.$replace("."," ").$replace("_",
" "));try{var c=JU.PT.parseInt(a[0]),b=JU.PT.parseInt(a[1]),e=JU.PT.parseInt(a[2]);-2147483648==e&&(e=0);if(-2147483648!=c&&-2147483648!=b){this.stateScriptVersionInt=1E4*c+100*b+e;this.global.legacyAutoBonding=110924>this.stateScriptVersionInt;this.global.legacyHAddition=130117>this.stateScriptVersionInt;return}}catch(f){if(!y(f,Exception))throw f;}}this.setBooleanProperty("legacyautobonding",!1);this.stateScriptVersionInt=2147483647},"~S");b(c$,"initializeExporter",function(a){var c=a.get("type").equals("JS"),
b;if(c){if(null!=this.jsExporter3D)return this.jsExporter3D.initializeOutput(this,this.privateKey,this.gdata,a),this.jsExporter3D;b="J.exportjs.Export3D"}else{var e=a.get("fileName");b=a.get("fullPath");e=this.getOutputChannel(e,b);if(null==e)return null;a.put("outputChannel",e);b="J.export.Export3D"}e=null;try{e=Class.forName(b).newInstance()}catch(f){if(y(f,Exception))return null;throw f;}a=e.initializeExporter(this,this.privateKey,this.gdata,a);c&&null!=a&&(this.jsExporter3D=e);return null==a?
null:e},"java.util.Map");b(c$,"getMouseEnabled",function(){return this.refreshing&&!this.creatingImage});b(c$,"setZslabPoint",function(a){this.transformManager.setZslabPoint(a)},"JU.P3");e(c$,"calcAtomsMinMax",function(a,c){this.modelSet.calcAtomsMinMax(a,c)},"JU.BS,J.util.BoxInfo");b(c$,"getObjectMap",function(a,c){switch(c){case "{":if(null!=this.getScriptManager()){var b=this.eval.getDefinedAtomSets();null!=b&&a.putAll(b);J.script.T.getTokensType(a,3145728)}break;case "$":case "0":this.shapeManager.getObjectMap(a,
"$"==c)}},"java.util.Map,~S");b(c$,"getPdbBondInfo",function(a){null==this.htPdbBondInfo&&(this.htPdbBondInfo=new java.util.Hashtable);var c=this.htPdbBondInfo.get(a);if(null!=c)return c;c=J.viewer.JC.getPdbBondInfo(J.modelset.Group.lookupGroupID(a),this.global.legacyHAddition);this.htPdbBondInfo.put(a,c);return c},"~S");b(c$,"setPicked",function(a){this.global.setPicked(a)},"~N");e(c$,"runScript",function(a){var c=new JU.SB;try{if(null==this.getScriptManager())return null;this.eval.runScriptBuffer(a,
c)}catch(b){if(y(b,Exception))return this.eval.getErrorMessage();throw b;}return c.toString()},"~S");b(c$,"allowSpecAtom",function(){return this.modelSet.allowSpecAtom()});b(c$,"setFrameDelayMs",function(a){this.modelSet.setFrameDelayMs(a,this.getVisibleFramesBitSet())},"~N");b(c$,"getFrameDelayMs",function(a){return this.modelSet.getFrameDelayMs(a)},"~N");b(c$,"getBaseModelBitSet",function(){return this.modelSet.getModelAtomBitSetIncludingDeleted(this.getJDXBaseModelIndex(this.getCurrentModelIndex()),
!0)});b(c$,"getTimeouts",function(){return this.timeouts});b(c$,"clearTimeouts",function(){null!=this.timeouts&&J.thread.TimeoutThread.clear(this.timeouts)});b(c$,"setTimeout",function(a,c,b){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,c,b)))},"~S,~N,~S");b(c$,"triggerTimeout",function(a){this.haveDisplay&&null!=this.timeouts&&J.thread.TimeoutThread.trigger(this.timeouts,
a)},"~S");b(c$,"clearTimeout",function(a){this.setTimeout(a,0,null)},"~S");b(c$,"showTimeout",function(a){return this.haveDisplay?J.thread.TimeoutThread.showTimeout(this.timeouts,a):""},"~S");b(c$,"calculatePartialCharges",function(a){if(null==a||0==a.cardinality())a=this.getModelUndeletedAtomsBitSetBs(this.getVisibleFramesBitSet());this.getMinimizer(!0).calculatePartialCharges(this.modelSet.bonds,this.modelSet.bondCount,this.modelSet.atoms,a)},"JU.BS");b(c$,"setCurrentModelID",function(a){var c=
this.getCurrentModelIndex();0<=c&&this.modelSet.setModelAuxiliaryInfo(c,"modelID",a)},"~S");b(c$,"setCentroid",function(a,c){this.modelSet.setCentroid(a,c)},"JU.BS,~A");b(c$,"getPathForAllFiles",function(){return this.fileManager.getPathForAllFiles()});b(c$,"cacheGet",function(a){return this.fileManager.cacheGet(a,!1)},"~S");b(c$,"cacheClear",function(){this.fileManager.cacheClear()});e(c$,"cachePut",function(a,c){J.util.Logger.info("Viewer cachePut "+a);this.fileManager.cachePut(a,c)},"~S,~O");e(c$,
"cacheFileByName",function(a,c){return this.fileManager.cacheFileByNameAdd(a,c)},"~S,~B");b(c$,"cacheList",function(){return this.fileManager.cacheList()});b(c$,"clearThreads",function(){null!=this.eval&&this.eval.stopScriptThreads();this.stopMinimization();this.setVibrationOff();this.setSpinOn(!1);this.setNavOn(!1);this.setAnimationOn(!1)});b(c$,"getEvalContextAndHoldQueue",function(a){if(null==a||!this.isJS)return null;a.pushContextDown("getEvalContextAndHoldQueue");for(var c=a=a.getThisContext();null!=
c;)c.mustResumeEval=!0,c=c.parentContext;this.queueOnHold=a.isJSThread=!0;return a},"J.api.JmolScriptEvaluator");b(c$,"checkInheritedShapes",function(){this.shapeManager.checkInheritedShapes()});e(c$,"resizeInnerPanel",function(a,c){return this.autoExit||!this.haveDisplay?(this.setScreenDimension(a,c),this.dimScreen):this.statusManager.resizeInnerPanel(a,c)},"~N,~N");b(c$,"getFontLineShapeState",function(a,c,b){return this.getStateCreator().getFontLineShapeState(a,c,b)},"~S,~S,~A");b(c$,"getShapeSetState",
function(a,c,b,e,f,g,h){this.getStateCreator().getShapeSetState(a,c,b,e,f,g,h)},"J.shape.AtomShape,J.shape.Shape,~N,~A,JU.BS,java.util.Map,java.util.Map");b(c$,"getMeasurementState",function(a,c,b,e,f){return this.getStateCreator().getMeasurementState(a,c,b,e,f)},"J.shape.Measures,JU.List,~N,javajs.awt.Font,J.modelset.TickInfo");b(c$,"getBondState",function(a,c,b){return this.getStateCreator().getBondState(a,c,b)},"J.shape.Shape,JU.BS,~B");b(c$,"getAtomShapeSetState",function(a,c){return this.getStateCreator().getAtomShapeSetState(a,
c)},"J.shape.Shape,~A");b(c$,"getShapeState",function(a){return this.getStateCreator().getShapeState(a)},"J.shape.Shape");b(c$,"getAtomShapeState",function(a){return this.getStateCreator().getAtomShapeState(a)},"J.shape.AtomShape");b(c$,"getDefaultPropertyParam",function(a){return this.getPropertyManager().getDefaultPropertyParam(a)},"~N");b(c$,"getPropertyNumber",function(a){return this.getPropertyManager().getPropertyNumber(a)},"~S");b(c$,"checkPropertyParameter",function(a){return this.getPropertyManager().checkPropertyParameter(a)},
"~S");b(c$,"extractProperty",function(a,c,b){return this.getPropertyManager().extractProperty(a,c,b)},"~O,~A,~N");b(c$,"addHydrogens",function(a,c,b){var e=null==a;null==a&&(a=this.getModelUndeletedAtomsBitSet(this.getVisibleFramesBitSet().length()-1));var f=new JU.BS;if(0==a.cardinality()||this.modelSet.atoms[a.nextSetBit(0)].modelIndex!=this.modelSet.modelCount-1)return f;var g=new JU.List,e=this.getAdditionalHydrogens(a,e,!1,g),h=!1,h=this.global.appendNew;if(0<e.length){this.clearModelDependentObjects();
try{f=c?this.modelSet.addHydrogens(g,e):this.addHydrogensInline(a,g,e)}catch(l){if(y(l,Exception))System.out.println(l.toString());else throw l;}h&&this.setAppendNew(!0)}b||this.scriptStatus(J.i18n.GT.i(J.i18n.GT._("{0} hydrogens added"),e.length));return f},"JU.BS,~B,~B");b(c$,"addHydrogensInline",function(a,c,b){return null==this.getScriptManager()?null:this.eval.addHydrogensInline(a,c,b)},"JU.BS,JU.List,~A");e(c$,"evalFunctionFloat",function(a,c,b){return null==this.getScriptManager()?0:this.eval.evalFunctionFloat(a,
c,b)},"~O,~O,~A");b(c$,"evalParallel",function(a,c){this.displayLoadErrors=!1;var b=null!=this.getScriptManager()&&this.eval.evaluateParallel(a,null==c?this.shapeManager:c);this.displayLoadErrors=!0;return b},"J.script.ScriptContext,J.viewer.ShapeManager");e(c$,"evaluateExpression",function(a){return null==this.getScriptManager()?null:this.eval.evaluateExpression(a,!1)},"~O");b(c$,"evaluateExpressionAsVariable",function(a){return null==this.getScriptManager()?null:this.eval.evaluateExpression(a,!0)},
"~O");b(c$,"getAtomBitSet",function(a){if(s(a,JU.BS))return a;this.getScriptManager();return this.getAtomBitSetEval(this.eval,a)},"~O");b(c$,"getAtomBitSetVector",function(a){return null==this.getScriptManager()?null:this.eval.getAtomBitSetVector(this.getAtomCount(),a)},"~O");b(c$,"getContextVariables",function(){return null==this.getScriptManager()?null:this.eval.getContextVariables()});b(c$,"getScriptContext",function(a){return null==this.getScriptManager()?null:this.eval.getScriptContext(a)},"~S");
e(c$,"getAtomDefs",function(a){return this.getStateCreator().getAtomDefs(a)},"java.util.Map");b(c$,"createModels",function(a){this.modelSet.createModels(a)},"~N");b(c$,"setCGO",function(a){this.shapeManager.loadShape(23);this.shapeManager.setShapePropertyBs(23,"setCGO",a,null)},"JU.List");b(c$,"setFrame",function(a){this.animationManager.setFrame(a-1)},"~N");b(c$,"movePyMOL",function(a,c,b){this.transformManager.moveToPyMOL(a,c,b);return!0},"J.api.JmolScriptEvaluator,~N,~A");b(c$,"getCamera",function(){return this.transformManager.camera});
b(c$,"setModelSet",function(a){this.modelSet=this.modelManager.modelSet=a},"J.modelset.ModelSet");b(c$,"setObjectProp",function(a,c){this.getScriptManager();null==a&&(a="*");return null==this.eval?null:this.eval.setObjectPropSafe(a,c,-1)},"~S,~N");b(c$,"getSceneList",function(){try{return this.getModelSetAuxiliaryInfoValue("scenes")}catch(a){if(y(a,Exception))return null;throw a;}});b(c$,"setBondParameters",function(a,c,b,e,f,g,h){this.modelSet.setBondParametersBS(a,c,b,e,f,g,h)},"~N,~N,JU.BS,~N,~N,~N,~N");
b(c$,"getDihedralMap",function(a){return this.modelSet.getDihedralMap(a)},"~A");b(c$,"setDihedrals",function(a,c,b){null==c&&(c=this.getBsBranches(a));this.modelSet.setDihedrals(a,c,b)},"~A,~A,~N");b(c$,"getBsBranches",function(a){return this.modelSet.getBsBranches(a)},"~A");b(c$,"getChainID",function(a){var c=this.chainMap.get(a);if(null!=c)return c.intValue();var b=a.charCodeAt(0);1<a.length&&(b=256+this.chainList.size(),this.chainList.addLast(a));c=Integer.$valueOf(b);this.chainMap.put(c,a);this.chainMap.put(a,
c);return b},"~S");b(c$,"getChainIDStr",function(a){return this.chainMap.get(Integer.$valueOf(a))},"~N");b(c$,"getScriptQueueInfo",function(){return null!=this.scriptManager&&this.scriptManager.isQueueProcessing()?Boolean.TRUE:Boolean.FALSE});b(c$,"getNMRCalculation",function(){return null==this.nmrCalculation?(this.nmrCalculation=J.api.Interface.getOptionInterface("quantum.NMRCalculation")).setViewer(this):this.nmrCalculation});b(c$,"getDistanceUnits",function(a){null==a&&(a=this.getDefaultMeasurementLabel(2));
var c=a.indexOf("//");return 0>c?this.getMeasureDistanceUnits():a.substring(c+2)},"~S");b(c$,"calculateFormalCharges",function(a){null==a&&(a=this.getSelectionSet(!1));return this.modelSet.fixFormalCharges(a)},"JU.BS");b(c$,"cachePngFiles",function(){return!this.getTestFlag(1)});b(c$,"setModulation",function(a,c,b,e){e&&this.global.setS("_modt",J.util.Escape.eP(b));this.modelSet.setModulation(null==a?this.getAllAtoms():a,c,b,e);this.refreshMeasures(!0)},"JU.BS,~B,JU.P3,~B");b(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.global.hoverDelayMs,"!setInMotion");break;case 2:this.setInMotion(!0),this.refresh(3,"timeoutThread set in motion")}},"~N");b(c$,"checkMotionRendering",function(a){if(!this.getInMotion(!0)&&!this.transformManager.spinOn&&!this.transformManager.vibrationOn&&!this.animationManager.animationOn)return!0;if(this.global.wireframeRotation)return!1;var c=0;switch(a){case 1678770178:case 1141899265:c=2;break;case 1113198596:c=3;break;
case 1113198597:c=4;break;case 1113200642:c=5;break;case 1073742018:c=6;break;case 603979967:c=7;break;case 603979786:c=8}return this.global.platformSpeed>=c},"~N");b(c$,"openExportChannel",function(a,c,b){return this.getOutputManager().openOutputChannel(a,c,b,!1)},"~N,~S,~B");e(c$,"log",function(a){null!=a&&this.getOutputManager().logToFile(a)},"~S");b(c$,"getLogFileName",function(){return null==this.logFileName?"":this.logFileName});b(c$,"getCommands",function(a,c,b){return this.getStateCreator().getCommands(a,
c,b)},"java.util.Map,java.util.Map,~S");b(c$,"allowCapture",function(){return!this.$isApplet||this.$isSignedApplet});b(c$,"getMP",function(){return J.api.Interface.getOptionInterface("modelset.MeasurementPending").set(this.modelSet)});e(c$,"getApplet",function(){return this.applet});b(c$,"getModulationList",function(a,c,b){return this.modelSet.getModulationList(a,c,b)},"JU.BS,~S,JU.P3");b(c$,"getVibrationPoint",function(a,c){return this.transformManager.getVibrationPoint(a,c)},"J.util.Vibration,J.util.Point3fi");
b(c$,"setCurrentAtom",function(a){this.animationManager.currentAtomIndex=a},"~N");b(c$,"getCurrentAtom",function(){return this.animationManager.currentAtomIndex});aa();c$=G(J.viewer.Viewer,"ACCESS",Enum);r(c$,"NONE",0,[]);r(c$,"READSPT",1,[]);r(c$,"ALL",2,[]);c$=$();B(c$,"jsDocumentBase","");c$.strJavaVendor=c$.prototype.strJavaVendor=System.getProperty("java.vendor","j2s");c$.strOSName=c$.prototype.strOSName=System.getProperty("os.name","j2s");c$.strJavaVersion=c$.prototype.strJavaVersion=System.getProperty("java.version",
"0.0");B(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;B(c$,"nProcessors",1)});p("JSV.api");P(JSV.api,"AnnotationData");p("JSV.api");P(JSV.api,"AppletFrame");p("JSV.api");q(["JSV.api.JSVAppletInterface","$.ScriptInterface"],"JSV.api.JSVAppInterface",null,function(){P(JSV.api,"JSVAppInterface",[JSV.api.JSVAppletInterface,JSV.api.ScriptInterface])});p("JSV.api");P(JSV.api,
"JSVAppletInterface");p("JSV.api");P(JSV.api,"JSVFileHelper");p("JSV.api");P(JSV.api,"JSVGraphics");p("JSV.api");P(JSV.api,"JSVMainPanel");p("JSV.api");q(["JSV.api.JSVViewPanel"],"JSV.api.JSVPanel",null,function(){P(JSV.api,"JSVPanel",JSV.api.JSVViewPanel)});p("JSV.api");P(JSV.api,"JSVTree");p("JSV.api");P(JSV.api,"JSVTreeNode");p("JSV.api");P(JSV.api,"JSVTreePath");p("JSV.api");P(JSV.api,"JSVViewPanel");p("JSV.api");P(JSV.api,"JSVZipReader");p("JSV.api");P(JSV.api,"PanelListener");p("JSV.api");P(JSV.api,
"ScriptInterface");p("JSV.api");P(JSV.api,"XYScaleConverter");p("JSV.app");q(["JSV.api.JSVAppInterface","$.PanelListener"],"JSV.app.JSVApp","java.lang.Boolean $.Double JU.List $.PT JSV.common.Coordinate $.JSVFileManager $.JSViewer $.PanelNode $.Parameters $.PeakPickEvent $.ScriptToken $.ScriptTokenizer $.SubSpecChangeEvent $.ZoomEvent JSV.source.FileReader JSV.util.JSVEscape J.util.Logger".split(" "),function(){c$=u(function(){this.appletFrame=null;this.scriptLevelCount=this.nViews=this.fileCount=
0;this.isNewWindow=!1;this.allowMenu=this.allowCompoundMenu=!0;this.loadImaginary=this.interfaceOverlaid=this.autoIntegrate=!1;this.obscureTitleFromUser=null;this.initialEndIndex=this.initialStartIndex=-1;this.returnFromJmolModel=this.prevPanel=this.viewer=this.syncCallbackFunctionName=this.peakCallbackFunctionName=this.loadFileCallbackFunctionName=this.coordCallbackFunctionName=this.appletReadyCallbackFunctionName=this.integrationRatios=null;t(this,arguments)},JSV.app,"JSVApp",null,[JSV.api.PanelListener,
JSV.api.JSVAppInterface]);w(c$,function(a,c){this.appletFrame=a;this.initViewer(c);this.init()},"JSV.api.AppletFrame,~B");b(c$,"initViewer",function(a){this.viewer=new JSV.common.JSViewer(this,!0,a);this.appletFrame.setDropTargetListener(this.isSigned(),this.viewer);a=this.appletFrame.getDocumentBase();JSV.common.JSVFileManager.setDocumentBase(this.viewer,a)},"~B");e(c$,"isPro",function(){return this.isSigned()});e(c$,"isSigned",function(){return!0});e(c$,"siSetCurrentSource",function(a){this.viewer.currentSource=
a},"JSV.source.JDXSource");e(c$,"siGetFileCount",function(){return this.fileCount});e(c$,"siSetFileCount",function(a){this.fileCount=a},"~N");e(c$,"siSetIntegrationRatios",function(a){this.integrationRatios=a},"~S");e(c$,"siGetIntegrationRatios",function(){return this.integrationRatios});b(c$,"getAppletFrame",function(){return this.appletFrame});e(c$,"siSetLoadImaginary",function(a){this.loadImaginary=a},"~B");e(c$,"siIncrementScriptLevelCount",function(a){return this.scriptLevelCount+=a},"~N");e(c$,
"siIncrementViewCount",function(a){return this.nViews+=a},"~N");b(c$,"dispose",function(){try{this.viewer.dispose()}catch(a){if(y(a,Exception))a.printStackTrace();else throw a;}});e(c$,"getPropertyAsJavaObject",function(a){return this.viewer.getPropertyAsJavaObject(a)},"~S");e(c$,"getPropertyAsJSON",function(a){return JU.PT.toJSON(null,this.getPropertyAsJavaObject(a))},"~S");e(c$,"getCoordinate",function(){return this.viewer.getCoordinate()});e(c$,"loadInline",function(a){this.siOpenDataOrFile(a,
null,null,null,-1,-1,!0);this.appletFrame.validateContent(3)},"~S");e(c$,"exportSpectrum",function(a,c){return this.viewer.$export(a,c)},"~S,~N");e(c$,"setFilePath",function(a){this.runScript("load "+JSV.util.JSVEscape.eS(a))},"~S");e(c$,"setSpectrumNumber",function(a){this.runScript(JSV.common.ScriptToken.SPECTRUMNUMBER+" "+a)},"~N");e(c$,"reversePlot",function(){this.toggle(JSV.common.ScriptToken.REVERSEPLOT)});e(c$,"toggleGrid",function(){this.toggle(JSV.common.ScriptToken.GRIDON)});e(c$,"toggleCoordinate",
function(){this.toggle(JSV.common.ScriptToken.COORDINATESON)});e(c$,"toggleIntegration",function(){this.toggle(JSV.common.ScriptToken.INTEGRATE)});b(c$,"toggle",function(a){null!=this.viewer.selectedPanel&&this.runScript(a+" TOGGLE")},"JSV.common.ScriptToken");e(c$,"addHighlight",function(a,c,b,e,f,g){this.viewer.addHighLight(a,c,b,e,f,g)},"~N,~N,~N,~N,~N,~N");e(c$,"removeAllHighlights",function(){this.viewer.removeAllHighlights()});e(c$,"removeHighlight",function(a,c){this.viewer.removeHighlight(a,
c)},"~N,~N");e(c$,"syncScript",function(a){this.viewer.syncScript(a)},"~S");e(c$,"writeStatus",function(a){J.util.Logger.info(a)},"~S");b(c$,"init",function(){this.initParams(this.appletFrame.getParameter("script"))});b(c$,"initParams",function(a){this.parseInitScript(a);this.newAppletPanel();this.viewer.setPopupMenu(this.allowMenu,this.viewer.parameters.getBoolean(JSV.common.ScriptToken.ENABLEZOOM));this.runScriptNow(a)},"~S");b(c$,"newAppletPanel",function(){J.util.Logger.info("newAppletPanel");
this.appletFrame.addNewPanel(this.viewer)});e(c$,"siSendPanelChange",function(a){a!==this.prevPanel&&(this.prevPanel=a,this.viewer.sendPanelChange(a))},"JSV.api.JSVPanel");e(c$,"siNewWindow",function(a,c){this.isNewWindow=a;c?null!=this.viewer.jsvpPopupMenu&&this.viewer.jsvpPopupMenu.setSelected("Window",!1):this.appletFrame.newWindow(a)},"~B,~B");e(c$,"repaint",function(){"undefined"!=typeof Jmol&&(Jmol._repaint&&this.viewer.applet)&&Jmol._repaint(this.viewer.applet,!0)});b(c$,"updateJS",function(){},
"~N,~N");e(c$,"siValidateAndRepaint",function(){null!=this.viewer.selectedPanel&&(this.viewer.selectedPanel.getPanelData().taintedAll=!0);this.appletFrame.validate();this.repaint()});e(c$,"siSyncLoad",function(a){this.newAppletPanel();J.util.Logger.info("JSVP syncLoad reading "+a);this.siOpenDataOrFile(null,null,null,a,-1,-1,!1);this.appletFrame.validateContent(3)},"~S");b(c$,"parseInitScript",function(a){null==a&&(a="");a=new JSV.common.ScriptTokenizer(a,!0);for(J.util.Logger.debugging&&J.util.Logger.info("Running in DEBUG mode");a.hasMoreTokens();){var c=
a.nextToken(),b=new JSV.common.ScriptTokenizer(c,!1),e=b.nextToken();e.equalsIgnoreCase("SET")&&(e=b.nextToken());var e=e.toUpperCase(),f=JSV.common.ScriptToken.getScriptToken(e),c=JSV.common.ScriptToken.getValue(f,b,c);J.util.Logger.info("KEY-> "+e+" VALUE-> "+c+" : "+f);try{switch(f){default:this.viewer.parameters.set(null,f,c);break;case JSV.common.ScriptToken.UNKNOWN:break;case JSV.common.ScriptToken.APPLETID:this.viewer.fullName=this.viewer.appletID+"__"+(this.viewer.appletID=c)+"__";"undefined"!=
typeof Jmol&&(this.viewer.applet=Jmol._applets[c]);break;case JSV.common.ScriptToken.APPLETREADYCALLBACKFUNCTIONNAME:this.appletReadyCallbackFunctionName=c;break;case JSV.common.ScriptToken.AUTOINTEGRATE:this.autoIntegrate=JSV.common.Parameters.isTrue(c);break;case JSV.common.ScriptToken.COMPOUNDMENUON:this.allowCompoundMenu=Boolean.parseBoolean(c);break;case JSV.common.ScriptToken.COORDCALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.LOADFILECALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.PEAKCALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.SYNCCALLBACKFUNCTIONNAME:this.siExecSetCallback(f,
c);break;case JSV.common.ScriptToken.ENDINDEX:this.initialEndIndex=Integer.parseInt(c);break;case JSV.common.ScriptToken.INTERFACE:this.siExecSetInterface(c);break;case JSV.common.ScriptToken.IRMODE:this.viewer.setIRmode(c);break;case JSV.common.ScriptToken.MENUON:this.allowMenu=Boolean.parseBoolean(c);break;case JSV.common.ScriptToken.OBSCURE:null==this.obscureTitleFromUser&&(this.obscureTitleFromUser=Boolean.$valueOf(c));break;case JSV.common.ScriptToken.STARTINDEX:this.initialStartIndex=Integer.parseInt(c);
break;case JSV.common.ScriptToken.SYNCID:this.viewer.fullName=this.viewer.appletID+"__"+(this.viewer.syncID=c)+"__"}}catch(g){if(!y(g,Exception))throw g;}}},"~S");e(c$,"siOpenDataOrFile",function(a,c,b,e,f,g,h){a=this.viewer.openDataOrFile(a,c,b,e,f,g,h);-1!=a&&(0!=a?this.siSetSelectedPanel(null):(null!=this.viewer.jsvpPopupMenu&&this.viewer.jsvpPopupMenu.setCompoundMenu(this.viewer.panelNodes,this.allowCompoundMenu),J.util.Logger.info(this.appletFrame.getAppletInfo()+" File "+this.viewer.currentSource.getFilePath()+
" Loaded Successfully")))},"~S,~S,JU.List,~S,~N,~N,~B");e(c$,"siProcessCommand",function(a){this.viewer.runScriptNow(a)},"~S");e(c$,"runScriptNow",function(a){return this.viewer.runScriptNow(a)},"~S");b(c$,"checkCallbacks",function(){if(!(null==this.coordCallbackFunctionName&&null==this.peakCallbackFunctionName)){var a=new JSV.common.Coordinate,c=null==this.peakCallbackFunctionName?null:new JSV.common.Coordinate;if(this.viewer.selectedPanel.getPanelData().getPickedCoordinates(a,c)){var b=this.viewer.viewPanel.getCurrentPanelIndex();
null==c?this.appletFrame.callToJavaScript(this.coordCallbackFunctionName,[Double.$valueOf(a.getXVal()),Double.$valueOf(a.getYVal()),Integer.$valueOf(b+1)]):this.appletFrame.callToJavaScript(this.peakCallbackFunctionName,[Double.$valueOf(a.getXVal()),Double.$valueOf(a.getYVal()),Double.$valueOf(c.getXVal()),Double.$valueOf(c.getYVal()),Integer.$valueOf(b+1)])}}});e(c$,"siSetSelectedPanel",function(a){this.viewer.viewPanel.setSelectedPanel(a,this.viewer.panelNodes);this.viewer.selectedPanel=a;this.viewer.spectraTree.setSelectedPanel(this,
a);this.appletFrame.validate();null!=a&&(a.setEnabled(!0),a.setFocusable(!0))},"JSV.api.JSVPanel");b(c$,"doAdvanced",function(){},"~S");e(c$,"panelEvent",function(a){s(a,JSV.common.PeakPickEvent)?this.viewer.processPeakPickEvent(a,!1):s(a,JSV.common.ZoomEvent)||s(a,JSV.common.SubSpecChangeEvent)},"~O");e(c$,"siExecSetCallback",function(a,c){switch(a){case JSV.common.ScriptToken.LOADFILECALLBACKFUNCTIONNAME:this.loadFileCallbackFunctionName=c;break;case JSV.common.ScriptToken.PEAKCALLBACKFUNCTIONNAME:this.peakCallbackFunctionName=
c;break;case JSV.common.ScriptToken.SYNCCALLBACKFUNCTIONNAME:this.syncCallbackFunctionName=c;break;case JSV.common.ScriptToken.COORDCALLBACKFUNCTIONNAME:this.coordCallbackFunctionName=c}},"JSV.common.ScriptToken,~S");e(c$,"getSolnColour",function(){return this.viewer.getSolutionColor()});e(c$,"siExecClose",function(a){var c=!a.startsWith("!");c&&(a=a.substring(1));this.viewer.close(a);c||this.siValidateAndRepaint()},"~S");e(c$,"siExecLoad",function(a){this.viewer.load(a);if(null==this.viewer.selectedPanel)return null;
null!=this.loadFileCallbackFunctionName&&this.appletFrame.callToJavaScript(this.loadFileCallbackFunctionName,[this.viewer.appletID,a]);return null},"~S");e(c$,"siExecHidden",function(){},"~B");e(c$,"siExecSetInterface",function(a){this.interfaceOverlaid=a.equalsIgnoreCase("single")||a.equalsIgnoreCase("overlay")},"~S");e(c$,"siExecScriptComplete",function(){this.siValidateAndRepaint()},"~S,~B");e(c$,"siExecSetAutoIntegrate",function(a){this.autoIntegrate=a},"~B");e(c$,"syncToJmol",function(a){null!=
this.syncCallbackFunctionName&&(J.util.Logger.info("JSVApp.syncToJmol JSV>Jmol "+a),this.appletFrame.callToJavaScript(this.syncCallbackFunctionName,[this.viewer.fullName,a]))},"~S");e(c$,"setVisible",function(a){this.appletFrame.setPanelVisible(a)},"~B");e(c$,"siUpdateBoolean",function(){},"JSV.common.ScriptToken,~B");e(c$,"siCheckCallbacks",function(){this.checkCallbacks()},"~S");e(c$,"siSetNode",function(a){a.jsvp!==this.viewer.selectedPanel&&this.siSetSelectedPanel(a.jsvp);this.siSendPanelChange(a.jsvp);
this.appletFrame.validateContent(2);this.siValidateAndRepaint()},"JSV.common.PanelNode,~B");e(c$,"siCloseSource",function(a){this.viewer.closeSource(a)},"JSV.source.JDXSource");e(c$,"setCursor",function(a){this.viewer.apiPlatform.setCursor(a,this.appletFrame)},"~N");e(c$,"siGetAutoCombine",function(){return this.interfaceOverlaid});e(c$,"siCreateSource",function(a,c){return JSV.source.FileReader.createJDXSource(JSV.common.JSVFileManager.getBufferedReaderForString(a),c,this.obscureTitleFromUser===
Boolean.TRUE,this.loadImaginary,-1,-1)},"~S,~S,~N,~N");e(c$,"siGetNewJSVPanel2",function(a){a=this.appletFrame.getJSVPanel(this.viewer,a,this.initialStartIndex,this.initialEndIndex);this.initialEndIndex=this.initialStartIndex=-1;a.getPanelData().addListener(this);this.viewer.parameters.setFor(a,null,!0);return a},"JU.List");e(c$,"siGetNewJSVPanel",function(a){if(null==a)return this.initialEndIndex=this.initialStartIndex=-1,null;var c=new JU.List;c.addLast(a);a=this.appletFrame.getJSVPanel(this.viewer,
c,this.initialStartIndex,this.initialEndIndex);a.getPanelData().addListener(this);this.viewer.parameters.setFor(a,null,!0);return a},"JSV.common.JDXSpectrum");e(c$,"siGetNewPanelNode",function(a,c,b,e){return new JSV.common.PanelNode(a,c,b,e)},"~S,~S,JSV.source.JDXSource,JSV.api.JSVPanel");e(c$,"siGetAutoShowLegend",function(){return!1});e(c$,"siSetReturnFromJmolModel",function(a){this.returnFromJmolModel=a},"~S");e(c$,"siGetReturnFromJmolModel",function(){return this.returnFromJmolModel});e(c$,"siSetPropertiesFromPreferences",
function(a){this.autoIntegrate&&a.getPanelData().integrateAll(this.viewer.parameters)},"JSV.api.JSVPanel,~B");e(c$,"siSetLoaded",function(){},"~S,~S");e(c$,"siSetMenuEnables",function(){},"JSV.common.PanelNode,~B");e(c$,"siSetRecentURL",function(){},"~S");e(c$,"siUpdateRecentMenus",function(){},"~S");e(c$,"siExecTest",function(){this.loadInline('##TITLE= Acetophenone\n##JCAMP-DX= 5.01\n##DATA TYPE= MASS SPECTRUM\n##DATA CLASS= XYPOINTS\n##ORIGIN= UWI, Mona, JAMAICA\n##OWNER= public domain\n##LONGDATE= 2012/02/19 22:20:06.0416 -0600 $$ export date from JSpecView\n##BLOCK_ID= 4\n##$URL= http://wwwchem.uwimona.edu.jm/spectra\n##SPECTROMETER/DATA SYSTEM= Finnigan\n##.INSTRUMENT PARAMETERS= LOW RESOLUTION\n##.SPECTROMETER TYPE= TRAP\n##.INLET= GC\n##.IONIZATION MODE= EI+\n##MOLFORM= C 8 H 8 O\n##$MODELS= \n<Models>\n<ModelData id="acetophenone" type="MOL">\nacetophenone\nDSViewer          3D                             0\n\n17 17  0  0  0  0  0  0  0  0999 V2000\n-1.6931    0.0078    0.0000 C   0  0  0  0  0  0  0  0  0  1\n-0.2141    0.0078    0.0000 C   0  0  0  0  0  0  0  0  0  2\n2.5839    0.0872    0.0000 C   0  0  0  0  0  0  0  0  0  3\n0.4615    1.2373   -0.0005 C   0  0  0  0  0  0  0  0  0  4\n0.5257   -1.1809    0.0001 C   0  0  0  0  0  0  0  0  0  5\n1.9188   -1.1393    0.0005 C   0  0  0  0  0  0  0  0  0  6\n1.8539    1.2756   -0.0001 C   0  0  0  0  0  0  0  0  0  7\n-0.1262    2.1703   -0.0009 H   0  0  0  0  0  0  0  0  0  8\n0.0144   -2.1556    0.0002 H   0  0  0  0  0  0  0  0  0  9\n2.4947   -2.0764    0.0009 H   0  0  0  0  0  0  0  0  0 10\n2.3756    2.2439   -0.0001 H   0  0  0  0  0  0  0  0  0 11\n3.6838    0.1161    0.0003 H   0  0  0  0  0  0  0  0  0 12\n-2.3403    1.0639    0.0008 O   0  0  0  0  0  0  0  0  0 13\n-2.3832   -1.3197   -0.0010 C   0  0  0  0  0  0  0  0  0 14\n-2.0973   -1.8988    0.9105 H   0  0  0  0  0  0  0  0  0 15\n-2.0899   -1.9018   -0.9082 H   0  0  0  0  0  0  0  0  0 16\n-3.4920   -1.1799   -0.0059 H   0  0  0  0  0  0  0  0  0 17\n1  2  1  0  0  0\n2  5  4  0  0  0\n2  4  4  0  0  0\n3 12  1  0  0  0\n4  7  4  0  0  0\n5  6  4  0  0  0\n6 10  1  0  0  0\n6  3  4  0  0  0\n7  3  4  0  0  0\n7 11  1  0  0  0\n8  4  1  0  0  0\n9  5  1  0  0  0\n13  1  2  0  0  0\n14 16  1  0  0  0\n14  1  1  0  0  0\n14 15  1  0  0  0\n17 14  1  0  0  0\nM  END\n</ModelData>\n<ModelData id="2" type="MOL">\nacetophenone m/z 120\nDSViewer          3D                             0\n\n17 17  0  0  0  0  0  0  0  0999 V2000\n-1.6931    0.0078    0.0000 C   0  0  0  0  0  0  0  0  0  1\n-0.2141    0.0078    0.0000 C   0  0  0  0  0  0  0  0  0  2\n2.5839    0.0872    0.0000 C   0  0  0  0  0  0  0  0  0  3\n0.4615    1.2373   -0.0005 C   0  0  0  0  0  0  0  0  0  4\n0.5257   -1.1809    0.0001 C   0  0  0  0  0  0  0  0  0  5\n1.9188   -1.1393    0.0005 C   0  0  0  0  0  0  0  0  0  6\n1.8539    1.2756   -0.0001 C   0  0  0  0  0  0  0  0  0  7\n-0.1262    2.1703   -0.0009 H   0  0  0  0  0  0  0  0  0  8\n0.0144   -2.1556    0.0002 H   0  0  0  0  0  0  0  0  0  9\n2.4947   -2.0764    0.0009 H   0  0  0  0  0  0  0  0  0 10\n2.3756    2.2439   -0.0001 H   0  0  0  0  0  0  0  0  0 11\n3.6838    0.1161    0.0003 H   0  0  0  0  0  0  0  0  0 12\n-2.3403    1.0639    0.0008 O   0  0  0  0  0  0  0  0  0 13\n-2.3832   -1.3197   -0.0010 C   0  0  0  0  0  0  0  0  0 14\n-2.0973   -1.8988    0.9105 H   0  0  0  0  0  0  0  0  0 15\n-2.0899   -1.9018   -0.9082 H   0  0  0  0  0  0  0  0  0 16\n-3.4920   -1.1799   -0.0059 H   0  0  0  0  0  0  0  0  0 17\n1  2  1  0  0  0\n2  5  4  0  0  0\n2  4  4  0  0  0\n3 12  1  0  0  0\n4  7  4  0  0  0\n5  6  4  0  0  0\n6 10  1  0  0  0\n6  3  4  0  0  0\n7  3  4  0  0  0\n7 11  1  0  0  0\n8  4  1  0  0  0\n9  5  1  0  0  0\n13  1  2  0  0  0\n14 16  1  0  0  0\n14  1  1  0  0  0\n14 15  1  0  0  0\n17 14  1  0  0  0\nM  END\nacetophenone m/z 105\n\ncreated with ArgusLab version 4.0.1\n13 13  0  0  0  0  0  0  0  0  0 V2000\n-1.6931    0.0078    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n-0.2141    0.0078    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n2.5839    0.0872    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n0.4615    1.2373   -0.0005 C   0  0  0  0  0  0  0  0  0  0  0  0\n0.5257   -1.1809    0.0001 C   0  0  0  0  0  0  0  0  0  0  0  0\n1.9188   -1.1393    0.0005 C   0  0  0  0  0  0  0  0  0  0  0  0\n1.8539    1.2756   -0.0001 C   0  0  0  0  0  0  0  0  0  0  0  0\n-2.3403    1.0639    0.0008 O   0  0  0  0  0  0  0  0  0  0  0  0\n-0.1262    2.1703   -0.0009 H   0  0  0  0  0  0  0  0  0  0  0  0\n0.0144   -2.1556    0.0002 H   0  0  0  0  0  0  0  0  0  0  0  0\n2.4947   -2.0764    0.0009 H   0  0  0  0  0  0  0  0  0  0  0  0\n2.3756    2.2439   -0.0001 H   0  0  0  0  0  0  0  0  0  0  0  0\n3.6838    0.1161    0.0003 H   0  0  0  0  0  0  0  0  0  0  0  0\n1  2  1  0  0  0  0\n1  8  2  0  0  0  0\n2  4  4  0  0  0  0\n2  5  4  0  0  0  0\n3  6  4  0  0  0  0\n3  7  4  0  0  0  0\n3 13  1  0  0  0  0\n4  7  4  0  0  0  0\n4  9  1  0  0  0  0\n5  6  4  0  0  0  0\n5 10  1  0  0  0  0\n6 11  1  0  0  0  0\n7 12  1  0  0  0  0\nM  END\nacetophenone m/z 77\n\ncreated with ArgusLab version 4.0.1\n11 11  0  0  0  0  0  0  0  0  0 V2000\n-0.2141    0.0078    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n2.5839    0.0872    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n0.4615    1.2373   -0.0005 C   0  0  0  0  0  0  0  0  0  0  0  0\n0.5257   -1.1809    0.0001 C   0  0  0  0  0  0  0  0  0  0  0  0\n1.9188   -1.1393    0.0005 C   0  0  0  0  0  0  0  0  0  0  0  0\n1.8539    1.2756   -0.0001 C   0  0  0  0  0  0  0  0  0  0  0  0\n-0.1262    2.1703   -0.0009 H   0  0  0  0  0  0  0  0  0  0  0  0\n0.0144   -2.1556    0.0002 H   0  0  0  0  0  0  0  0  0  0  0  0\n2.4947   -2.0764    0.0009 H   0  0  0  0  0  0  0  0  0  0  0  0\n2.3756    2.2439   -0.0001 H   0  0  0  0  0  0  0  0  0  0  0  0\n3.6838    0.1161    0.0003 H   0  0  0  0  0  0  0  0  0  0  0  0\n1  3  4  0  0  0  0\n1  4  4  0  0  0  0\n2  5  4  0  0  0  0\n2  6  4  0  0  0  0\n2 11  1  0  0  0  0\n3  6  4  0  0  0  0\n3  7  1  0  0  0  0\n4  5  4  0  0  0  0\n4  8  1  0  0  0  0\n5  9  1  0  0  0  0\n6 10  1  0  0  0  0\nM  END\n</ModelData>\n</Models>\n##$PEAKS= \n<Peaks type="MS" xUnits="M/Z" yUnits="RELATIVE ABUNDANCE" >\n<PeakData id="1" title="molecular ion (~120)" peakShape="sharp" model="2.1"  xMax="121" xMin="119"  yMax="100" yMin="0" />\n<PeakData id="2" title="fragment 1 (~105)" peakShape="sharp" model="2.2"  xMax="106" xMin="104"  yMax="100" yMin="0" />\n<PeakData id="3" title="fragment 2 (~77)" peakShape="sharp" model="2.3"  xMax="78" xMin="76"  yMax="100" yMin="0" />\n</Peaks>\n##XUNITS= M/Z\n##YUNITS= RELATIVE ABUNDANCE\n##XFACTOR= 1E0\n##YFACTOR= 1E0\n##FIRSTX= 0\n##FIRSTY= 0\n##LASTX= 121\n##NPOINTS= 19\n##XYPOINTS= (XY..XY)\n0.000000, 0.000000 \n38.000000, 5.200000 \n39.000000, 8.000000 \n43.000000, 21.900000 \n50.000000, 20.200000 \n51.000000, 41.900000 \n52.000000, 4.000000 \n63.000000, 3.800000 \n74.000000, 6.600000 \n75.000000, 3.700000 \n76.000000, 4.600000 \n77.000000, 100.000000 \n78.000000, 10.400000 \n89.000000, 1.000000 \n91.000000, 1.000000 \n105.000000, 80.800000 \n106.000000, 6.000000 \n120.000000, 23.100000 \n121.000000, 2.000000 \n##END=')},
"~S");e(c$,"siSetFileAsString",function(a){return JSV.common.JSVFileManager.getFileAsString(a)},"~S");e(c$,"siCreateTree",function(a,c){return this.viewer.spectraTree.createTree(this,a,c)},"JSV.source.JDXSource,~A");e(c$,"siGetViewer",function(){return this.viewer});e(c$,"runScript",function(a){this.viewer.runScript(a)},"~S");e(c$,"getScriptQueue",function(){return this.viewer.scriptQueue})});p("JSV.appletjs");q(["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.JsPanel $.JsViewPanel J.util.Logger".split(" "),
function(){c$=u(function(){this.viewer=this.app=null;this.isStandalone=!1;this.htParams=this.viewerOptions=null;t(this,arguments)},JSV.appletjs,"JSVApplet",null,[JSV.api.JSVAppletInterface,JSV.api.AppletFrame]);w(c$,function(a){null==a&&(a=new java.util.Hashtable);this.viewerOptions=a;this.htParams=new java.util.Hashtable;var c;for(a=a.entrySet().iterator();a.hasNext()&&((c=a.next())||1);)this.htParams.put(c.getKey().toLowerCase(),c.getValue());this.init()},"java.util.Map");b(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.appletID,this.viewer.fullName,Boolean.TRUE,this])});b(c$,"initViewer",function(){this.viewer=this.app.viewer;this.setLogging();this.viewerOptions.remove("debug");var a=this.viewerOptions.get("display"),a=document.getElementById(a);this.viewer.setDisplay(a);J.util.Logger.info(this.getAppletInfo())});b(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]"');J.util.Logger.setLogLevel(a)});b(c$,"getParameter",function(a){a=this.htParams.get(a.toLowerCase());return null==a?null:String.instantialize(a.toString())},"~S");b(c$,"getBooleanValue",function(a,c){var b=this.getValue(a,c?"true":"");return b.equalsIgnoreCase("true")||b.equalsIgnoreCase("on")||
b.equalsIgnoreCase("yes")},"~S,~B");b(c$,"getValue",function(a,c){var b=this.getParameter(a);System.out.println("getValue "+a+" = "+b);return null!=b?b:c},"~S,~S");e(c$,"isPro",function(){return this.app.isPro()});e(c$,"isSigned",function(){return this.app.isSigned()});e(c$,"finalize",function(){System.out.println("JSpecView "+this+" finalized")});b(c$,"destroy",function(){this.app.dispose();this.app=null});b(c$,"getParameter",function(a,c){return this.isStandalone?System.getProperty(a,c):null!=this.getParameter(a)?
this.getParameter(a):c},"~S,~S");e(c$,"getAppletInfo",function(){return"JSpecView Applet "+JSV.common.JSVersion.VERSION});e(c$,"getSolnColour",function(){return this.app.getSolnColour()});e(c$,"getCoordinate",function(){return this.app.getCoordinate()});e(c$,"loadInline",function(a){this.app.loadInline(a)},"~S");b(c$,"$export",function(a,c){return this.app.exportSpectrum(a,c)},"~S,~N");e(c$,"exportSpectrum",function(a,c){return this.app.exportSpectrum(a,c)},"~S,~N");e(c$,"setFilePath",function(a){this.app.setFilePath(a)},
"~S");e(c$,"setSpectrumNumber",function(a){this.app.setSpectrumNumber(a)},"~N");e(c$,"toggleGrid",function(){this.app.toggleGrid()});e(c$,"toggleCoordinate",function(){this.app.toggleCoordinate()});e(c$,"toggleIntegration",function(){this.app.toggleIntegration()});e(c$,"addHighlight",function(a,c,b,e,f,g){this.app.addHighlight(a,c,b,e,f,g)},"~N,~N,~N,~N,~N,~N");e(c$,"removeAllHighlights",function(){this.app.removeAllHighlights()});e(c$,"removeHighlight",function(a,c){this.app.removeHighlight(a,c)},
"~N,~N");e(c$,"reversePlot",function(){this.app.reversePlot()});b(c$,"script",function(a){this.app.initParams(a)},"~S");e(c$,"runScript",function(a){this.app.runScript(a)},"~S");e(c$,"syncScript",function(a){this.app.syncScript(a)},"~S");e(c$,"writeStatus",function(a){this.app.writeStatus(a)},"~S");e(c$,"getPropertyAsJavaObject",function(a){return this.app.getPropertyAsJavaObject(a)},"~S");e(c$,"getPropertyAsJSON",function(a){return this.app.getPropertyAsJSON(a)},"~S");e(c$,"runScriptNow",function(a){return this.app.runScriptNow(a)},
"~S");e(c$,"setDropTargetListener",function(){},"~B,JSV.common.JSViewer");e(c$,"validateContent",function(){},"~N");e(c$,"addNewPanel",function(a){a.viewPanel=new JSV.js2d.JsViewPanel},"JSV.common.JSViewer");e(c$,"newWindow",function(){},"~B");e(c$,"callToJavaScript",function(a,c){var b=JU.PT.split(a,".");try{for(var e=window[b[0]],f=1;f<b.length;f++)e=e[b[f]];return e(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9])}catch(g){System.out.println(a+" failed "+g)}},"~S,~A");e(c$,"setPanelVisible",
function(){},"~B");e(c$,"getJSVPanel",function(a,c,b,e){return JSV.js2d.JsPanel.getPanelMany(a,c,b,e)},"JSV.common.JSViewer,JU.List,~N,~N");e(c$,"setVisible",function(){},"~B");e(c$,"getDocumentBase",function(){try{return new java.net.URL(fa("java.net.URL"),this.viewerOptions.get("documentBase"),null)}catch(a){if(y(a,java.net.MalformedURLException))return null;throw a;}});e(c$,"repaint",function(){});e(c$,"validate",function(){});e(c$,"doExitJmol",function(){});e(c$,"getApp",function(){return this.app})});
p("JSV.common");q(["java.lang.Enum","JSV.common.Coordinate"],"JSV.common.Annotation",["java.lang.Double","JU.CU"],function(){c$=u(function(){this.text="";this.is2D=this.$isPixels=!1;this.offsetY=this.offsetX=0;this.spec=null;t(this,arguments)},JSV.common,"Annotation",JSV.common.Coordinate);b(c$,"setA",function(a,c,b,e,f,g,h,l){this.set(a,c);this.spec=b;this.text=e;this.$isPixels=f;this.is2D=g;this.offsetX=h;this.offsetY=l;return this},"~N,~N,JSV.common.JDXSpectrum,~S,~B,~B,~N,~N");b(c$,"setSpec",
function(a){this.spec=a;return this},"JSV.common.JDXSpectrum");b(c$,"addSpecShift",function(a){this.setXVal(this.getXVal()+a)},"~N");b(c$,"isPixels",function(){return this.$isPixels});e(c$,"toString",function(){return"["+this.getXVal()+", "+this.getYVal()+","+this.text+"]"});c$.getColoredAnnotation=b(c$,"getColoredAnnotation",function(a,c,b,e){var f,g=0,h=1,l=2,j=3,k=b.size();try{switch(k){default:return null;case 1:f=b.get(0);g=h=-1;'"'==f.charAt(0)?(j=0,l=-1):(l=0,j=-1);break;case 2:g=h=-1;f=b.get(0);
'"'==f.charAt(0)?(j=0,l=1):(l=0,j=1);break;case 3:case 4:f=b.get(2),'"'==f.charAt(0)?(j=2,l=4==k?3:-1):(l=2,j=4==k?3:-1),f=b.get(2),'"'==f.charAt(0)?(j=2,l=-1):(l=2,j=-1)}if(null==e&&(0>g||0>h||0>j||0>l))return null;var m=0>g?e.getXVal():Double.$valueOf(b.get(g)).doubleValue(),p=0>h?e.getYVal():Double.$valueOf(b.get(h)).doubleValue(),r=0>l?e.getColor():a.getColor1(JU.CU.getArgbFromString(b.get(l))),q;0>j?q=e.text:(q=b.get(j),'"'==q.charAt(0)&&(q=q.substring(1,q.length-1)));return(new JSV.common.ColoredAnnotation).setCA(m,
p,c,q,r,!1,!1,0,0)}catch(s){if(y(s,Exception))return null;throw s;}},"JSV.api.JSVGraphics,JSV.common.JDXSpectrum,JU.List,JSV.common.Annotation");aa();c$=G(JSV.common.Annotation,"AType",Enum);r(c$,"Integration",0,[]);r(c$,"PeakList",1,[]);r(c$,"Measurements",2,[]);r(c$,"OverlayLegend",3,[]);r(c$,"Views",4,[]);r(c$,"NONE",5,[]);c$=$()});p("JSV.common");q(["JSV.common.Annotation"],"JSV.common.ColoredAnnotation",null,function(){c$=u(function(){this.color=null;t(this,arguments)},JSV.common,"ColoredAnnotation",
JSV.common.Annotation);b(c$,"getColor",function(){return this.color});w(c$,function(){R(this,JSV.common.ColoredAnnotation,[])});b(c$,"setCA",function(a,c,b,e,f,g,h,l,j){this.setA(a,c,b,e,g,h,l,j);this.color=f;return this},"~N,~N,JSV.common.JDXSpectrum,~S,javajs.api.GenericColor,~B,~B,~N,~N")});p("JSV.common");q(["JSV.common.Parameters"],"JSV.common.ColorParameters",["java.util.Hashtable","$.StringTokenizer","JU.CU","$.List","JSV.common.ScriptToken"],function(){c$=u(function(){this.plotColors=this.elementColors=
this.displayFontName=this.titleFontName=null;this.isDefault=!1;t(this,arguments)},JSV.common,"ColorParameters",JSV.common.Parameters);w(c$,function(){R(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)});b(c$,"setFor",function(a,c,b){null==c&&(c=this);b&&a.getPanelData().setBooleans(c,null);a=a.getPanelData();null!=a.getCurrentPlotColor(1)&&a.setPlotColors(this.plotColors);a.setColorOrFont(c,null)},"JSV.api.JSVPanel,JSV.common.ColorParameters,~B");b(c$,"set",function(a,c,b){var e=null;switch(c){default:this.setP(a,
c,b);return;case JSV.common.ScriptToken.PLOTCOLORS:null==a?this.getPlotColors(b):a.setPlotColors(this.getPlotColors(b));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(c,b);break;case JSV.common.ScriptToken.TITLEFONTNAME:case JSV.common.ScriptToken.DISPLAYFONTNAME:e=this.getFontName(c,b)}null!=a&&null!=e&&a.setColorOrFont(this,c)},"JSV.common.PanelData,JSV.common.ScriptToken,~S");b(c$,"getElementColor",function(a){return this.elementColors.get(a)},"JSV.common.ScriptToken");b(c$,"setColor",function(a,c){null!=c&&this.elementColors.put(a,c);return c},"JSV.common.ScriptToken,javajs.api.GenericColor");b(c$,"copy",function(){return this.copy(this.name)});
b(c$,"setElementColors",function(a){this.displayFontName=a.displayFontName;var c;for(a=a.elementColors.entrySet().iterator();a.hasNext()&&((c=a.next())||1);)this.setColor(c.getKey(),c.getValue());return this},"JSV.common.ColorParameters");b(c$,"getColorFromString",function(a){return this.getColor1(JU.CU.getArgbFromString(a))},"~S");b(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 c=new JU.List;try{for(;a.hasMoreTokens();)c.addLast(this.getColorFromString(a.nextToken()))}catch(b){if(y(b,Exception))return null;throw b;}return c.toArray(Array(c.size()))},"~S");b(c$,"setColorFromString",function(a,c){return this.setColor(a,this.getColorFromString(c))},"JSV.common.ScriptToken,~S");b(c$,"getFontName",function(a,c){var b=this.isValidFontName(c);switch(a){case JSV.common.ScriptToken.TITLEFONTNAME:return b?this.titleFontName=c:this.titleFontName;case JSV.common.ScriptToken.DISPLAYFONTNAME:return b?
this.displayFontName=c:this.displayFontName}return null},"JSV.common.ScriptToken,~S");B(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(" ")});p("JSV.common");c$=G(JSV.common,"CoordComparator",null,java.util.Comparator);e(c$,"compare",function(a,c){return a.getXVal()>c.getXVal()?
1:a.getXVal()<c.getXVal()?-1:0},"JSV.common.Coordinate,JSV.common.Coordinate");p("JSV.common");q(["JSV.common.CoordComparator"],"JSV.common.Coordinate",["java.lang.Double","java.util.Arrays","$.StringTokenizer","JU.DF","$.List"],function(){c$=u(function(){this.yVal=this.xVal=0;t(this,arguments)},JSV.common,"Coordinate");w(c$,function(){});b(c$,"set",function(a,c){this.xVal=a;this.yVal=c;return this},"~N,~N");b(c$,"getXVal",function(){return this.xVal});b(c$,"getYVal",function(){return this.yVal});
b(c$,"getXString",function(){return JU.DF.formatDecimalTrimmed(this.xVal,8)});b(c$,"getYString",function(){return JU.DF.formatDecimalTrimmed(this.yVal,8)});b(c$,"setXVal",function(a){this.xVal=a},"~N");b(c$,"setYVal",function(a){this.yVal=a},"~N");b(c$,"copy",function(){return(new JSV.common.Coordinate).set(this.xVal,this.yVal)});b(c$,"equals",function(a){return a.xVal==this.xVal&&a.yVal==this.yVal},"JSV.common.Coordinate");e(c$,"toString",function(){return"["+this.xVal+", "+this.yVal+"]"});c$.isYInRange=
b(c$,"isYInRange",function(a,c,b){return JSV.common.Coordinate.getMinY(a,0,a.length)>=c&&JSV.common.Coordinate.getMaxY(a,0,a.length)>=b},"~A,~N,~N");c$.normalise=b(c$,"normalise",function(a,c,b){var e=Array(a.length),f=JSV.common.Coordinate.getMinY(a,0,a.length);b=(JSV.common.Coordinate.getMaxY(a,0,a.length)-f)/(b-c);for(var g=0;g<a.length;g++)e[g]=(new JSV.common.Coordinate).set(a[g].getXVal(),(a[g].getYVal()-f)/b-c);return e},"~A,~N,~N");c$.reverse=b(c$,"reverse",function(a){for(var c=a.length,
b=0;b<c;b++){var e=a[b];a[b]=a[--c];a[c]=e}return a},"~A");c$.parseDSV=b(c$,"parseDSV",function(a,c,b){var e,f=e=0,g=new JU.List;for(a=new java.util.StringTokenizer(a," \t\n\r\f,;");a.hasMoreTokens();)e=a.nextToken().trim(),f=a.nextToken().trim(),e=Double.parseDouble(e),f=Double.parseDouble(f),e=(new JSV.common.Coordinate).set(e*c,f*b),g.addLast(e);c=Array(g.size());return g.toArray(c)},"~S,~N,~N");c$.deltaX=b(c$,"deltaX",function(a,c,b){return(a-c)/(b-1)},"~N,~N,~N");c$.removeScale=b(c$,"removeScale",
function(a,c,b){JSV.common.Coordinate.applyScale(a,1/c,1/b)},"~A,~N,~N");c$.applyScale=b(c$,"applyScale",function(a,c,b){if(1!=c||1!=b)for(var e=0;e<a.length;e++)a[e].setXVal(a[e].getXVal()*c),a[e].setYVal(a[e].getYVal()*b)},"~A,~N,~N");c$.applyShiftReference=b(c$,"applyShiftReference",function(a,c,b,e,f,g,h){if(!(c>a.length||0>c)){switch(h){case 0:f=a[a.length-c].getXVal()-f*g;break;case 1:f=b-f*g;break;case 2:f=e+f}for(b=0;b<a.length;b++)c=a[b],c.setXVal(c.getXVal()-f),a[b]=c}},"~A,~N,~N,~N,~N,~N,~N");
c$.getMinX=b(c$,"getMinX",function(a,c,b){for(var e=1.7976931348623157E308;c<b;c++){var f=a[c].getXVal();f<e&&(e=f)}return e},"~A,~N,~N");c$.getMinX=b(c$,"getMinX",function(a,c){for(var b=1.7976931348623157E308,e=0;e<a.size();e++){var f=a.get(e).getXYCoords(),f=JSV.common.Coordinate.getMinX(f,c.getStartingPointIndex(e),c.getEndingPointIndex(e));f<b&&(b=f)}return b},"JU.List,JSV.common.ViewData");c$.getMaxX=b(c$,"getMaxX",function(a,c,b){for(var e=-1.7976931348623157E308;c<b;c++){var f=a[c].getXVal();
f>e&&(e=f)}return e},"~A,~N,~N");c$.getMaxX=b(c$,"getMaxX",function(a,c){for(var b=-1.7976931348623157E308,e=0;e<a.size();e++){var f=a.get(e).getXYCoords(),f=JSV.common.Coordinate.getMaxX(f,c.getStartingPointIndex(e),c.getEndingPointIndex(e));f>b&&(b=f)}return b},"JU.List,JSV.common.ViewData");c$.getMinY=b(c$,"getMinY",function(a,c,b){for(var e=1.7976931348623157E308;c<b;c++){var f=a[c].getYVal();f<e&&(e=f)}return e},"~A,~N,~N");c$.getMinYUser=b(c$,"getMinYUser",function(a,c){for(var b=1.7976931348623157E308,
e=0;e<a.size();e++){var f=a.get(e).getUserYFactor(),g=a.get(e).getYRef(),h=a.get(e).getXYCoords(),f=(JSV.common.Coordinate.getMinY(h,c.getStartingPointIndex(e),c.getEndingPointIndex(e))-g)*f+g;f<b&&(b=f)}return b},"JU.List,JSV.common.ViewData");c$.getMaxY=b(c$,"getMaxY",function(a,c,b){for(var e=-1.7976931348623157E308;c<b;c++){var f=a[c].getYVal();f>e&&(e=f)}return e},"~A,~N,~N");c$.getMaxYUser=b(c$,"getMaxYUser",function(a,c){for(var b=-1.7976931348623157E308,e=0;e<a.size();e++){var f=a.get(e).getUserYFactor(),
g=a.get(e).getYRef(),h=a.get(e).getXYCoords(),f=(JSV.common.Coordinate.getMaxY(h,c.getStartingPointIndex(e),c.getEndingPointIndex(e))-g)*f+g;f>b&&(b=f)}return b},"JU.List,JSV.common.ViewData");c$.getYValueAt=b(c$,"getYValueAt",function(a,c){var b=JSV.common.Coordinate.getNearestIndexForX(a,c);if(0==b||b==a.length)return NaN;var e=a[b].getXVal(),f=a[b-1].getXVal(),g=a[b].getYVal(),b=a[b-1].getYVal();return e==f?g:b+(g-b)/(e-f)*(c-f)},"~A,~N");c$.intoRange=b(c$,"intoRange",function(a,c,b){return Math.max(Math.min(a,
b),c)},"~N,~N,~N");c$.intoRange=b(c$,"intoRange",function(a,c,b){return Math.max(Math.min(a,b),c)},"~N,~N,~N");c$.getNearestIndexForX=b(c$,"getNearestIndexForX",function(a,c){var b=(new JSV.common.Coordinate).set(c,0),b=java.util.Arrays.binarySearch(a,b,JSV.common.Coordinate.c);0>b&&(b=-1-b);return 0>b?0:b>a.length-1?a.length-1:b},"~A,~N");c$.findXForPeakNearest=b(c$,"findXForPeakNearest",function(a,c,b){c=JSV.common.Coordinate.getNearestIndexForX(a,c);for(b=b?-1:1;c<a.length-1&&0<b*(a[c+1].yVal-
a[c].yVal);)c++;for(;1<=c&&0<b*(a[c-1].yVal-a[c].yVal);)c--;return 0==c||c==a.length-1?a[c].xVal:JSV.common.Coordinate.parabolicInterpolation(a,c)},"~A,~N,~B");c$.parabolicInterpolation=b(c$,"parabolicInterpolation",function(a,c){var b=a[c-1].yVal,e=a[c+1].yVal;return a[c].xVal+(b-e)/2/(b-2*a[c].yVal+e)*(a[c+1].xVal-a[c].xVal)},"~A,~N");c$.getPickedCoordinates=b(c$,"getPickedCoordinates",function(a,c,b,e){if(null==c)return!1;var f=c.getXVal();b.setXVal(f);b.setYVal(c.getYVal());if(null==e)return!0;
c=JSV.common.Coordinate.getNearestIndexForX(a,f);e.setXVal(a[c].getXVal());e.setYVal(a[c].getYVal());return!0},"~A,JSV.common.Coordinate,JSV.common.Coordinate,JSV.common.Coordinate");c$.shiftX=b(c$,"shiftX",function(a,c){for(var b=a.length;0<=--b;)a[b].xVal+=c},"~A,~N");c$.getNearestXWithYAbove=b(c$,"getNearestXWithYAbove",function(a,c,b,e,f){c=JSV.common.Coordinate.getNearestIndexForX(a,c);var g=e?-1:1;if(f)for(;c<a.length&&0>g*(a[c].yVal-b);)c++;else for(;0<=c&&0>g*(a[c].yVal-b);)c--;return-1==
c||c==a.length?NaN:JSV.common.Coordinate.findXForPeakNearest(a,a[c].getXVal(),e)},"~A,~N,~N,~B,~B");c$.c=c$.prototype.c=new JSV.common.CoordComparator});p("JSV.common");q(["java.lang.Enum"],"JSV.common.ExportType",null,function(){c$=G(JSV.common,"ExportType",Enum);c$.getType=b(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 c,b=0,e=JSV.common.ExportType.values();b<e.length&&
((c=e[b])||1);b++)if(c.name().equals(a))return c;return JSV.common.ExportType.UNK},"~S");c$.isExportMode=b(c$,"isExportMode",function(a){return JSV.common.ExportType.getType(a)!==JSV.common.ExportType.UNK},"~S");r(c$,"UNK",0,[]);r(c$,"SOURCE",1,[]);r(c$,"DIF",2,[]);r(c$,"FIX",3,[]);r(c$,"SQZ",4,[]);r(c$,"PAC",5,[]);r(c$,"XY",6,[]);r(c$,"DIFDUP",7,[]);r(c$,"PNG",8,[]);r(c$,"JPG",9,[]);r(c$,"SVG",10,[]);r(c$,"SVGI",11,[]);r(c$,"CML",12,[]);r(c$,"AML",13,[]);r(c$,"PDF",14,[])});p("JSV.common");q("java.lang.Enum JSV.api.XYScaleConverter java.util.Hashtable JU.BS $.List 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 $.JDXSpectrum $.Measurement $.MeasurementData $.PanelData $.Parameters $.PeakData $.PeakPickEvent $.PlotWidget $.ScaleData $.ScriptToken $.ViewData J.util.Logger".split(" "),function(){c$=u(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=this.splitPointers=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;la("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;t(this,arguments)},
JSV.common,"GraphSet",null,JSV.api.XYScaleConverter);N(c$,function(){this.highlights=new JU.List;this.spectra=new JU.List;this.splitPointers=[0];this.graphsTemp=new JU.List;this.bsSelected=new JU.BS;this.coordTemp=new JSV.common.Coordinate;this.mapX=new java.util.Hashtable});w(c$,function(a){this.pd=a;this.jsvp=a.jsvp;this.g2d=a.g2d},"JSV.common.PanelData");b(c$,"setSpectrumMovedTo",function(a){return this.iSpectrumMovedTo=a},"~N");b(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");b(c$,"setSpectrumSelected",function(a){var c=a!=this.iSpectrumSelected;this.iSpectrumSelected=a;c&&this.getCurrentView();return this.iSpectrumSelected},"~N");b(c$,"closeDialogsExcept",function(a){if(null!=this.dialogs)for(var c,b=this.dialogs.entrySet().iterator();b.hasNext()&&((c=b.next())||1);){var e=c.getValue();s(e,JSV.dialog.JSVDialog)&&
(a===JSV.common.Annotation.AType.NONE||e.getAType()!==a)&&e.setVisible(!1)}},"JSV.common.Annotation.AType");b(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,c=this.dialogs.entrySet().iterator();c.hasNext()&&((a=c.next())||1);){var b=a.getValue();s(b,JSV.dialog.JSVDialog)&&b.dispose()}this.dialogs=null});b(c$,"isDrawNoSpectra",
function(){return-2147483648==this.iSpectrumSelected});b(c$,"getFixedSelectedSpectrumIndex",function(){return Math.max(this.iSpectrumSelected,0)});b(c$,"getSpectrum",function(){return this.getSpectrumAt(this.getFixedSelectedSpectrumIndex()).getCurrentSubSpectrum()});b(c$,"getSpectrumAt",function(a){return this.spectra.get(a)},"~N");b(c$,"getSpectrumIndex",function(a){for(var c=this.spectra.size();0<=--c;)if(this.spectra.get(c)===a)return c;return-1},"JSV.common.JDXSpectrum");b(c$,"addSpec",function(a){this.spectra.addLast(a);
this.nSpectra++},"JSV.common.JDXSpectrum");b(c$,"splitStack",function(a,c){c&&this.isSplittable?(this.nSplit=this.nSpectra,this.showAllStacked=!1,this.setSpectrumClicked(0)):(this.nSplit=1,this.splitPointers[0]=0,this.showAllStacked=this.allowStacking&&!c,this.setSpectrumClicked(-1));this.stackSelected=!1;JSV.common.GraphSet.setFractionalPositions(this.pd,a,JSV.common.PanelData.LinkMode.NONE)},"JU.List,~B");b(c$,"setPositionForFrame",function(a){var c=this.height-50;this.xPixel00=m(this.width*this.fX0);
this.xPixel11=m(this.xPixel00+this.width*this.fracX-1);this.xHArrows=this.xPixel00+25;this.xVArrows=this.xPixel11-m(this.right/2);this.xPixel0=this.xPixel00+m(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)+m(this.height*this.fY0);this.yPixel00=this.yPixel000+m(c*this.fracY*a);this.yPixel11=this.yPixel00+m(c*this.fracY)-1;this.yHArrows=this.yPixel11-12;this.yPixel0=this.yPixel00+m(this.top/
2);this.yPixel1=this.yPixel11-m(this.bottom/2);this.yPixels=this.yPixel1-this.yPixel0+1;null!=this.imageView&&this.is2DSpectrum&&(this.setImageWindow(),this.pd.display1D?(this.xPixels=m(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");b(c$,"hasPoint",function(a,c){return a>=this.xPixel00&&a<=this.xPixel11&&c>=this.yPixel000&&c<=this.yPixel11*
this.nSplit},"~N,~N");b(c$,"isInPlotRegion",function(a,c){return a>=this.xPixel0&&a<=this.xPixel1&&c>=this.yPixel0&&c<=this.yPixel1},"~N,~N");b(c$,"getSplitPoint",function(a){return Math.min(m((a-this.yPixel000)/(this.yPixel11-this.yPixel00)),this.nSplit-1)},"~N");b(c$,"isSplitWidget",function(a,c){return this.isSplittable&&a>=this.xPixel11-20&&c>=this.yPixel00+1&&a<=this.xPixel11-10&&c<=this.yPixel00+11},"~N,~N");b(c$,"initGraphSet",function(a,c){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 b=D(this.nSpectra,0),e=D(this.nSpectra,0);this.bsSelected.setBits(0,this.nSpectra);this.allowStackedYScale=!0;0>=c&&(c=2147483647);this.isSplittable=1<this.nSpectra;this.showAllStacked=(this.allowStacking=this.spectra.get(0).isStackable())&&1<this.nSpectra;for(var f=0;f<this.nSpectra;f++){var g=this.spectra.get(f).getXYCoords().length-
1;b[f]=JSV.common.Coordinate.intoRange(a,0,g);e[f]=JSV.common.Coordinate.intoRange(c,0,g);this.allowStackedYScale=(new Boolean(this.allowStackedYScale&(this.spectra.get(f).getYUnits().equals(this.spectra.get(0).getYUnits())&&this.spectra.get(f).getUserYFactor()==this.spectra.get(0).getUserYFactor()))).valueOf()}this.getView(0,0,0,0,b,e,null,null);this.viewList=new JU.List;this.viewList.addLast(this.viewData)},"~N,~N");b(c$,"getView",function(a,c,b,e,f,g,h,l){var j=0==this.graphsTemp.size()?this.spectra:
this.graphsTemp,k=this.getSpectrumAt(0).getSubSpectra(),m=null==k||2==k.size()&&k.get(1).isImaginary(),p=!this.getSpectrumAt(0).is1D();m&&b==e?j=this.spectra:b==e&&(this.viewData=new JSV.common.ViewData(k,b,e,this.getSpectrum().isContinuous()),j=null);null!=j&&(this.viewData=new JSV.common.ViewData(j,b,e,f,g,this.getSpectrumAt(0).isContinuous(),p),a!=c&&this.getScale().setXRange(a,c));null!=h&&(JSV.common.ScaleData.copyScaleFactors(h,this.viewData.getScaleData()),null!=l&&JSV.common.ScaleData.copyYScales(l,
this.viewData.getScaleData()),this.getCurrentView())},"~N,~N,~N,~N,~A,~A,~A,~A");b(c$,"isNearby",function(a,c,b,e){var f=a.getXVal(),g=b.toPixelX(f);a=this.toPixelY(a.getYVal());f=c.getXVal();b=b.toPixelX(f);c=this.toPixelY(c.getYVal());return Math.abs(g-b)+Math.abs(a-c)<e},"JSV.common.Coordinate,JSV.common.Coordinate,JSV.api.XYScaleConverter,~N");b(c$,"setReversePlot",function(a){(this.reversePlot=a)&&this.closeDialogsExcept(JSV.common.Annotation.AType.NONE);this.setDrawXAxis()},"~B");b(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)});b(c$,"fixX",function(a){return JSV.common.Coordinate.intoRange(a,this.xPixel0,this.xPixel1)},"~N");b(c$,"isInTopBar",function(a,c){return a==this.fixX(a)&&c>this.pin1Dx0.yPixel0-2&&c<this.pin1Dx0.yPixel1},"~N,~N");b(c$,"isInTopBar2D",function(a,c){return null!=this.imageView&&a==this.imageView.fixX(a)&&
c>this.pin2Dx0.yPixel0-2&&c<this.pin2Dx0.yPixel1},"~N,~N");b(c$,"isInRightBar",function(a,c){return c==this.fixY(c)&&a>this.pin1Dy0.xPixel1&&a<this.pin1Dy0.xPixel0+2},"~N,~N");b(c$,"isInRightBar2D",function(a,c){return null!=this.imageView&&c==this.fixY(c)&&a>this.pin2Dy0.xPixel1&&a<this.pin2Dy0.xPixel0+2},"~N,~N");b(c$,"getScale",function(){return this.viewData.getScale()});b(c$,"getXPixels",function(){return this.xPixels});b(c$,"getXPixel0",function(){return this.xPixel0});e(c$,"getYPixels",function(){return this.yPixels});
e(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");b(c$,"toX0",function(a){return this.viewList.get(0).getScale().toX0(this.fixX(a),this.xPixel0,this.xPixel1,this.drawXAxisLeftToRight)},"~N");b(c$,"toPixelX",function(a){return this.getScale().toPixelX(a,this.xPixel0,this.xPixel1,this.drawXAxisLeftToRight)},"~N");b(c$,"toPixelX0",function(a){return this.viewList.get(0).getScale().toPixelX0(a,
this.xPixel0,this.xPixel1,this.drawXAxisLeftToRight)},"~N");e(c$,"toY",function(a){return this.getScale().toY(a,this.yPixel0)},"~N");b(c$,"toPixelY",function(a){return this.getScale().toPixelY(a,this.yPixel1)},"~N");b(c$,"toY0",function(a){return this.viewList.get(0).getScale().toY0(this.fixY(a),this.yPixel0,this.yPixel1)},"~N");b(c$,"toPixelY0",function(a){return this.fixY(this.viewList.get(0).getScale().toPixelY0(a,this.yPixel0,this.yPixel1))},"~N");b(c$,"fixY",function(a){return JSV.common.Coordinate.intoRange(a,
this.yPixel0,this.yPixel1)},"~N");b(c$,"toPixelYint",function(a){return this.yPixel1-m(Double.isNaN(a)?-2147483648:this.yPixels*a)},"~N");b(c$,"findAnnotation2D",function(a){for(var c=this.annotations.size();0<=--c;){var b=this.annotations.get(c);if(this.isNearby(b,a,this.imageView,10))return b}return null},"JSV.common.Coordinate");b(c$,"addAnnotation",function(a,c){null==this.annotations&&(this.annotations=new JU.List);for(var b=!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)))b=!0,this.annotations.remove(e);0<a.text.length&&(!b||!c)&&this.annotations.addLast(a)},"JSV.common.Annotation,~B");b(c$,"setImageWindow",function(){this.imageView.setPixelWidthHeight(m((this.pd.display1D?0.6:1)*this.xPixels0),this.yPixels);this.imageView.setXY0(this.getSpectrumAt(0),m(Math.floor(this.xPixel10-this.imageView.xPixels)),this.yPixel0)});b(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!0});b(c$,"setXPixelMovedTo",function(a,c,b,e){1.7976931348623157E308==a&&1.7976931348623157E308==c?(this.xPixelMovedTo=b,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!=c&&(this.xPixelMovedTo2=this.toPixelX(c)))},"~N,~N,~N,~N");b(c$,"processPendingMeasurement",function(a,c,b){if(this.isInPlotRegion(a,c)){var e=this.toX(a),f=this.toY(c),g=e;switch(b){case 0:this.pendingMeasurement.setPt2(this.toX(a),this.toY(c));break;case 3:case 2:if(0>this.iSpectrumClicked)break;var h=this.spectra.get(this.iSpectrumClicked);this.setScale(this.iSpectrumClicked);
3!=b&&(b=this.findMeasurement(this.selectedSpectrumMeasurements,a,c,1),null!=b?(e=b.getXVal(),f=b.getYVal()):null!=(b=this.findMeasurement(this.selectedSpectrumMeasurements,a,c,2))?(e=b.getXVal2(),f=b.getYVal2()):e=this.getNearestPeak(h,e,f));this.pendingMeasurement=(new JSV.common.Measurement).setM1(e,f,h);this.pendingMeasurement.setPt2(g,f);this.pd.repaint();break;case 1:case -2:case -3:if(null==this.pendingMeasurement)break;this.setScale(this.getSpectrumIndex(this.pendingMeasurement.spec));3!=
b&&this.findNearestMaxMin()&&(a=this.xPixelMovedTo);e=this.toX(a);f=this.toY(c);this.pendingMeasurement.setPt2(e,f);0==this.pendingMeasurement.text.length?this.pendingMeasurement=null:(this.setMeasurement(this.pendingMeasurement),1==b?(this.setSpectrumClicked(this.getSpectrumIndex(this.pendingMeasurement.spec)),this.pendingMeasurement=(new JSV.common.Measurement).setM1(e,f,this.pendingMeasurement.spec)):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");b(c$,"checkIntegralNormalizationClick",function(a,c){if(null==this.selectedSpectrumIntegrals)return!1;var b=this.findMeasurement(this.selectedSpectrumIntegrals,a,c,-5);if(null==b)return!1;this.selectedIntegral=b;this.pd.normalizeIntegral();this.updateDialog(JSV.common.Annotation.AType.Integration,-1);this.setSpectrumClicked(this.getSpectrumIndex(b.spec));return!0},"~N,~N");b(c$,"getNearestPeak",function(a,c,b){var e=JSV.common.Coordinate.getNearestXWithYAbove(a.getXYCoords(),c,b,
a.isInverted(),!1);a=JSV.common.Coordinate.getNearestXWithYAbove(a.getXYCoords(),c,b,a.isInverted(),!0);return Double.isNaN(e)?a:Double.isNaN(a)?e:Math.abs(e-c)<Math.abs(a-c)?e:a},"JSV.common.JDXSpectrum,~N,~N");b(c$,"findMeasurement",function(a,c,b,e){if(null==a||0==a.size())return null;if(0==e){var f=this.findMeasurement(a,c,b,-1);return null!=f||s(a.get(0),JSV.common.Integral)?f:this.findMeasurement(a,c,b,-2)}for(var g=a.size();0<=--g;){var f=a.get(g),h,l,j,k;s(f,JSV.common.Integral)?(h=l=this.toPixelX(f.getXVal2()),
j=this.toPixelYint(f.getYVal()),k=this.toPixelYint(f.getYVal2())):(h=this.toPixelX(f.getXVal()),l=this.toPixelX(f.getXVal2()),j=k=-2==e?this.yPixel1-2:this.toPixelY(f.getYVal()));switch(e){case 1:if(4>Math.abs(c-h)+Math.abs(b-j))return f;break;case 2:if(4>Math.abs(c-l)+Math.abs(b-k))return f;break;case -5:j=k=m((j+k)/2),l=h+20;default:if(JSV.common.GraphSet.isOnLine(c,b,h,j,l,k))return f}}return null},"JSV.common.MeasurementData,~N,~N,~N");b(c$,"setMeasurement",function(a){var c=this.getSpectrumIndex(a.spec),
b=this.getDialog(JSV.common.Annotation.AType.Measurements,c);null==b&&this.addDialog(c,JSV.common.Annotation.AType.Measurements,b=new JSV.common.MeasurementData(JSV.common.Annotation.AType.Measurements,a.spec));b.getData().addLast(a.copyM());this.updateDialog(JSV.common.Annotation.AType.Measurements,-1)},"JSV.common.Measurement");b(c$,"checkArrowUpDownClick",function(a,c){var b=!1,e=this.isArrowClick(a,c,JSV.common.GraphSet.ArrowType.UP)?JSV.common.GraphSet.RT2:this.isArrowClick(a,c,JSV.common.GraphSet.ArrowType.DOWN)?
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);b=!0}else this.isArrowClick(a,c,JSV.common.GraphSet.ArrowType.RESET)&&(this.clearViews(),this.showAllStacked&&!this.stackSelected&&this.closeDialogsExcept(JSV.common.Annotation.AType.NONE),this.viewData.resetScaleFactors(),
this.updateDialogs(),b=!0);b&&(null!=this.imageView&&(this.update2dImage(!1),this.resetPinsFromView()),this.pd.taintedAll=!0);return b},"~N,~N");b(c$,"checkArrowLeftRightClick",function(a,c){if(this.haveLeftRightArrows){var b=this.isArrowClick(a,c,JSV.common.GraphSet.ArrowType.LEFT)?-1:this.isArrowClick(a,c,JSV.common.GraphSet.ArrowType.RIGHT)?1:0;if(0!=b)return this.setSpectrumClicked((this.iSpectrumSelected+b)%this.nSpectra),!0;if(this.isArrowClick(a,c,JSV.common.GraphSet.ArrowType.HOME))return this.showAllStacked?
(this.showAllStacked=!1,this.setSpectrumClicked(this.getFixedSelectedSpectrumIndex())):(this.showAllStacked=this.allowStacking,this.setSpectrumSelected(-1),this.stackSelected=!1),!0}return!1},"~N,~N");b(c$,"isArrowClick",function(a,c,b){switch(b){case JSV.common.GraphSet.ArrowType.UP:case JSV.common.GraphSet.ArrowType.DOWN:case JSV.common.GraphSet.ArrowType.RESET:return b=m((this.yPixel00+this.yPixel11)/2)+15*(b===JSV.common.GraphSet.ArrowType.UP?-1:b===JSV.common.GraphSet.ArrowType.DOWN?1:0),10>
Math.abs(this.xVArrows-a)&&10>Math.abs(b-c);case JSV.common.GraphSet.ArrowType.LEFT:case JSV.common.GraphSet.ArrowType.RIGHT:case JSV.common.GraphSet.ArrowType.HOME:return b=this.xHArrows+15*(b===JSV.common.GraphSet.ArrowType.LEFT?-1:b===JSV.common.GraphSet.ArrowType.RIGHT?1:0),10>Math.abs(b-a)&&10>Math.abs(this.yHArrows-c)}return!1},"~N,~N,JSV.common.GraphSet.ArrowType");b(c$,"setWidgetValueByUser",function(a){var c;c=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?""+m(Math.min(this.pin2Dy0.getYVal(),this.pin2Dy1.getYVal()))+" - "+m(Math.max(this.pin2Dy0.getYVal(),
this.pin2Dy1.getYVal())):""+a.getValue();c=this.pd.getInput("New value?","Set Slider",c);if(null!=c){c=c.trim();try{if(a===this.pin1Dx01||a===this.pin1Dy01||a===this.pin2Dx01||a===this.pin2Dy01){var b=c.indexOf("-",1);if(!(0>b)){var e=Double.$valueOf(c.substring(0,b)).doubleValue(),f=Double.$valueOf(c.substring(b+1)).doubleValue();a===this.pin1Dx01?this.doZoom(e,this.pin1Dy0.getYVal(),f,this.pin1Dy1.getYVal(),!0,!1,!1,!0,!0):a===this.pin1Dy01?this.doZoom(this.pin1Dx0.getXVal(),e,this.pin1Dx1.getXVal(),
f,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(f),this.pin2Dy1.yPixel0),this.doZoom(e,this.pin1Dy0.getYVal(),f,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(f)),this.doZoom(this.imageView.toX(this.imageView.xPixel0),this.getScale().minY,this.imageView.toX(this.imageView.xPixel0+
this.imageView.xPixels-1),this.getScale().maxY,!1,!1,!1,!1,!0))}}else{var g=Double.$valueOf(c).doubleValue();a.isXtype?(f=a===this.pin1Dx0||a===this.cur2Dx0||a===this.pin2Dx0?this.pin1Dx1.getXVal():this.pin1Dx0.getXVal(),this.doZoom(g,0,f,0,!a.is2D,!1,!1,!0,!0)):a===this.cur2Dy?this.setCurrentSubSpectrum(m(g)):a===this.pin2Dy0||a===this.pin2Dy1?(f=a===this.pin2Dy0?this.pin2Dy1.yPixel0:this.pin2Dy0.yPixel0,this.imageView.setView0(this.pin2Dx0.xPixel0,this.imageView.subIndexToPixelY(m(g)),this.pin2Dx1.xPixel0,
f)):(f=a===this.pin1Dy0?this.pin1Dy1.getYVal():this.pin1Dy0.getYVal(),this.doZoom(this.pin1Dx0.getXVal(),g,this.pin1Dx1.getXVal(),f,null==this.imageView,null==this.imageView,!1,!1,!0))}}catch(h){if(!y(h,Exception))throw h;}}},"JSV.common.PlotWidget");b(c$,"removeAllHighlights",function(a){if(null==a)this.highlights.clear();else for(var c=this.highlights.size();0<=--c;)this.highlights.get(c).spectrum===a&&this.highlights.remove(c)},"JSV.common.JDXSpectrum");b(c$,"setCoordClicked",function(a,c,b){0==
b&&(this.nextClickForSetPeak=!1);if(Double.isNaN(c))return this.pd.coordClicked=null,this.pd.coordsClicked=null;this.pd.coordClicked=(new JSV.common.Coordinate).set(this.lastClickX=c,b);this.pd.coordsClicked=this.getSpectrum().getXYCoords();this.pd.xPixelClicked=this.lastPixelX=a;return this.pd.coordClicked},"~N,~N,~N");b(c$,"setWidgets",function(a,c,b){if(a||null==this.pin1Dx0)null==this.zoomBox1D?this.newPins():this.resetPinPositions();this.setDerivedPins(c);this.setPinSliderPositions(b)},"~B,~N,~B");
b(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]});b(c$,"setWidgetX",function(a,c){a.setX(c,this.toPixelX0(c))},"JSV.common.PlotWidget,~N");b(c$,"setWidgetY",function(a,c){a.setY(c,this.toPixelY0(c))},"JSV.common.PlotWidget,~N");b(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))});b(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())))});b(c$,"resetX",function(a){this.setWidgetX(a,a.getXVal())},"JSV.common.PlotWidget");b(c$,"resetY",function(a){this.setWidgetY(a,a.getYVal())},"JSV.common.PlotWidget");b(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?m((this.xPixel1+this.imageView.xPixel0)/2):this.imageView.xPixel0-6,this.cur2Dy.xPixel1=this.imageView.xPixel1+5)},"~B");b(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,m((this.pin1Dx0.xPixel0+this.pin1Dx1.xPixel0)/2));this.pin1Dy01.setY(0,m((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 c=
this.pin1Dx0.getXVal();this.cur2Dx0.setX(c,this.imageView.toPixelX(c));c=this.pin1Dx1.getXVal();this.cur2Dx1.setX(c,this.imageView.toPixelX(c));c=this.imageView.toX(this.imageView.xPixel0);this.pin2Dx0.setX(c,this.imageView.toPixelX0(c));c=this.imageView.toX(this.imageView.xPixel1);this.pin2Dx1.setX(c,this.imageView.toPixelX0(c));this.pin2Dx01.setX(0,m((this.pin2Dx0.xPixel0+this.pin2Dx1.xPixel0)/2));c=this.imageView.imageHeight-1-this.imageView.yView1;this.pin2Dy0.setY(c,this.imageView.toPixelY0(c));
c=this.imageView.imageHeight-1-this.imageView.yView2;this.pin2Dy1.setY(c,this.imageView.toPixelY0(c));this.pin2Dy01.setY(0,m((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");b(c$,"doZoom",function(a,c,b,e,f,g,h,l,j){a==b?(a=this.getScale().minXOnScale,b=this.getScale().maxXOnScale):this.isLinked&&l&&this.pd.doZoomLinked(this,a,b,j,h,f);a>b&&(l=a,a=b,b=l);c>e&&(l=c,c=e,e=l);l=!f&&null!=this.imageView&&(this.imageView.minZ!=c||this.imageView.maxZ!=e);if(this.zoomEnabled||l){if(h){if(!this.getScale().isInRangeX(a)&&!this.getScale().isInRangeX(b))return;this.getScale().isInRangeX(a)?
this.getScale().isInRangeX(b)||(b=this.getScale().maxX):a=this.getScale().minX}this.pd.taintedAll=!0;h=this.viewData.getScaleData();var k=D(this.nSpectra,0),m=D(this.nSpectra,0);this.graphsTemp.clear();var p=this.getSpectrumAt(0).getSubSpectra(),p=null==p||2==p.size();if(this.getSpectrumAt(0).is1D()&&!p){if(this.graphsTemp.addLast(this.getSpectrum()),!JSV.common.ScaleData.setDataPointIndices(this.graphsTemp,a,b,3,k,m))return}else if(!JSV.common.ScaleData.setDataPointIndices(this.spectra,a,b,3,k,m))return;
if(p=c==e)f=!l&&f?f=this.getScale().spectrumScaleFactor:1,1E-4>Math.abs(f-1)&&(c=this.getScale().minYOnScale,e=this.getScale().maxYOnScale);f=null;if(p||g)this.getCurrentView(),f=this.viewData.getNewScales(this.iSpectrumSelected,p,c,e);this.getView(a,b,c,e,k,m,h,f);this.setXPixelMovedTo(1E10,1.7976931348623157E308,0,0);this.setWidgetX(this.pin1Dx0,a);this.setWidgetX(this.pin1Dx1,b);this.setWidgetY(this.pin1Dy0,c);this.setWidgetY(this.pin1Dy1,e);null==this.imageView?this.updateDialogs():(a=this.getSpectrumAt(0).getSubIndex(),
b=this.imageView.fixSubIndex(a),b!=a&&this.setCurrentSubSpectrum(b),l&&this.update2dImage(!1));j&&this.addCurrentZoom()}},"~N,~N,~N,~N,~B,~B,~B,~B,~B");b(c$,"updateDialogs",function(){this.updateDialog(JSV.common.Annotation.AType.PeakList,-1);this.updateDialog(JSV.common.Annotation.AType.Measurements,-1)});b(c$,"setCurrentSubSpectrum",function(a){var c=this.getSpectrumAt(0);a=c.setCurrentSubSpectrum(a);c.isForcedSubset()&&this.viewData.setXRangeForSubSpectrum(this.getSpectrum().getXYCoords());this.pd.notifySubSpectrumChange(a,
this.getSpectrum())},"~N");b(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++});b(c$,"setZoomTo",function(a){this.currentZoomIndex=a;this.viewData=this.viewList.get(a);this.resetPinsFromView()},"~N");b(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)});b(c$,"drawAll",function(a,c,b,e,f){this.g2d=this.pd.g2d;this.gMain=a;var g=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(b),this.draw2DImage());var h=this.stackSelected||!this.showAllStacked?this.iSpectrumSelected:-1,l=!this.showAllStacked||1==this.nSpectra||0<=h,j=null==this.imageView||this.pd.display1D,k=0<=h?1:0,m=this.getFixedSelectedSpectrumIndex();if(j&&f&&(this.fillBox(a,this.xPixel0,this.yPixel0,this.xPixel1,this.yPixel1,JSV.common.ScriptToken.PLOTAREACOLOR),0>h)){l=!0;for(h=0;h<this.nSpectra;h++)this.doPlot(h,b)&&0!=k++&&(l=(new Boolean(l&this.viewData.areYScalesSame(h-1,h))).valueOf())}var p=
1==this.nSpectra?0:!this.showAllStacked?this.iSpectrumMovedTo:this.iSpectrumSelected;if(f){var h=!this.isLinked&&this.isSplittable&&(!this.isSplittable||1==this.nSplit||this.pd.currentSplitPoint==b),r=this.pd.isCurrentGraphSet(this)&&this.zoomEnabled&&this.spectra.get(0).isScalable()&&(h||1==this.nSpectra)&&(1==this.nSplit||this.pd.currentSplitPoint==this.iSpectrumMovedTo)&&!this.isDrawNoSpectra();this.drawFrame(a,p,h,this.isSplittable,r)}if(this.pd.isCurrentGraphSet(this)&&b==this.pd.currentSplitPoint&&
(2>k||0<=this.iSpectrumSelected))this.$haveSelectedSpectrum=!0;this.haveSingleYScale=this.showAllStacked&&1<this.nSpectra?this.allowStackedYScale&&l:!0;if(j){l=z(this.yPixels*(this.yStackOffsetPercent/100));this.haveLeftRightArrows=!1;for(r=h=0;h<this.nSpectra;h++)if(this.doPlot(h,b)){var p=this.stackSelected&&0<=this.iSpectrumSelected&&this.iSpectrumSelected!=h,q=!this.reversePlot&&this.getShowAnnotation(JSV.common.Annotation.AType.Integration,h)&&(!this.showAllStacked||this.iSpectrumSelected==h)?
this.getDialog(JSV.common.Annotation.AType.Integration,h).getData():null;this.setScale(h);var s=this.spectra.get(h);1<this.nSplit&&(m=h);var t=!p&&(1==this.nSplit||this.showAllStacked||this.iSpectrumSelected==b),u=t&&this.$haveSelectedSpectrum&&h==m;t&&(this.resetPinsFromView(),this.drawWidgets(c,g,e,j,u,!1));this.haveSingleYScale&&(h==m&&f)&&(this.drawGrid(a),this.pd.isPrinting&&1<this.nSplit&&this.drawSpectrumSource(a,h));t&&this.drawWidgets(c,g,!1,j,u,!0);this.haveSingleYScale&&(!this.isDrawNoSpectra()&&
h==m&&(1==this.nSpectra||0<=this.iSpectrumSelected))&&this.drawHighlightsAndPeakTabs(c,h);if(f){if((1==k&&0>this.iSpectrumSelected||this.iSpectrumSelected==h&&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&&h==m&&(this.pd.getBoolean(JSV.common.ScriptToken.YSCALEON)&&this.drawYScale(a,this),this.pd.getBoolean(JSV.common.ScriptToken.YUNITSON)&&this.drawYUnits(a));
this.drawSpectrum(a,h,r,p,q)}this.drawMeasurements(c,h);null!=this.pendingMeasurement&&this.pendingMeasurement.spec===s&&this.drawMeasurement(c,this.pendingMeasurement);(1<this.nSplit?h==this.iSpectrumMovedTo:this.isLinked||h==m)&&(!this.pd.isPrinting&&0<=this.xPixelMovedTo&&s.isContinuous())&&this.drawSpectrumPointer(c,s,q);1<this.nSpectra&&(1==this.nSplit&&this.pd.isCurrentGraphSet(this)&&f)&&(this.haveLeftRightArrows=!0,this.pd.isPrinting||(this.setScale(0),p=this.iSpectrumSelected,2!=this.nSpectra&&
(this.setPlotColor(a,(p+this.nSpectra-1)%this.nSpectra),this.fillArrow(a,JSV.common.GraphSet.ArrowType.LEFT,this.yHArrows,this.xHArrows-9,!0),this.setCurrentBoxColor(a),this.fillArrow(a,JSV.common.GraphSet.ArrowType.LEFT,this.yHArrows,this.xHArrows-9,!1)),0<=p&&(this.setPlotColor(a,p),this.fillCircle(a,this.xHArrows,this.yHArrows,!0)),this.setCurrentBoxColor(a),this.fillCircle(a,this.xHArrows,this.yHArrows,!1),this.setPlotColor(a,(p+1)%this.nSpectra),this.fillArrow(a,JSV.common.GraphSet.ArrowType.RIGHT,
this.yHArrows,this.xHArrows+9,!0),this.setCurrentBoxColor(a),this.fillArrow(a,JSV.common.GraphSet.ArrowType.RIGHT,this.yHArrows,this.xHArrows+9,!1)));r-=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<=g&&this.draw2DUnits(a)),
this.drawWidgets(c,g,e,j,!0,!1),this.drawWidgets(c,g,e,j,!0,!0);null!=this.annotations&&this.drawAnnotations(c,this.annotations,null)},"~O,~O,~N,~B,~B");b(c$,"drawSpectrumSource",function(a,c){this.pd.printFilePath(a,this.pd.thisWidth-this.pd.right,this.yPixel0,this.spectra.get(c).getFilePath())},"~O,~N");b(c$,"doPlot",function(a,c){var b=this.stackSelected&&0<=this.iSpectrumSelected&&this.iSpectrumSelected!=a,e=this.showAllStacked||-1==this.iSpectrumSelected||this.iSpectrumSelected==a;return 1<this.nSplit?
a==c:e&&(!this.pd.isPrinting||!b)},"~N,~N");b(c$,"drawSpectrumPointer",function(a,c,b){this.setColorFromToken(a,JSV.common.ScriptToken.PEAKTABCOLOR);var e=this.pd.integralShiftMode;null!=b&&((!this.pd.ctrlPressed||this.pd.isIntegralDrag)&&!this.isOnSpectrum(this.pd.mouseX,this.pd.mouseY,-1)?b=null:0==e&&(e=this.getShiftMode(this.pd.mouseX,this.pd.mouseY)));var f=this.yValueMovedTo;this.yValueMovedTo=null==b?c.getYValueAt(this.xValueMovedTo):b.getPercentYValueAt(this.xValueMovedTo);this.setCoordStr(this.xValueMovedTo,
this.yValueMovedTo);0!=e?(this.setPlotColor(a,0),c=0>e?this.yPixelPlot0:this.yPixelPlot1,this.drawHandle(a,0>e?this.xPixelPlot1:this.xPixelPlot0,c,!1)):(null!=b&&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):(c=null==b?this.toPixelY(this.yValueMovedTo):
this.toPixelYint(this.yValueMovedTo/100),c==this.fixY(c)&&this.g2d.drawLine(a,this.xPixelMovedTo,c-10,this.xPixelMovedTo,c+10)),null!=b&&this.g2d.setStrokeBold(a,!1))},"~O,JSV.common.JDXSpectrum,JSV.common.IntegralData");b(c$,"setScale",function(a){this.viewData.setScale(a,this.xPixels,this.yPixels,this.spectra.get(a).isInverted())},"~N");b(c$,"draw2DUnits",function(a){var c=this.getSpectrumAt(0).nucleusX,b=this.getSpectrumAt(0).nucleusY;this.setColorFromToken(a,JSV.common.ScriptToken.PLOTCOLOR);
this.drawUnits(a,c,this.imageView.xPixel1+5*this.pd.scalingFactor,this.yPixel1,1,1);this.drawUnits(a,b,this.imageView.xPixel0-5*this.pd.scalingFactor,this.yPixel0,1,0)},"~O");b(c$,"drawPeakTabs",function(a,c){var b=1==this.nSpectra||0<=this.iSpectrumSelected?c.getPeakList():null;if(null!=b&&0<b.size()){null!=this.piMouseOver&&this.piMouseOver.spectrum===c&&this.pd.isMouseUp()?(this.g2d.setGraphicsColor(a,this.g2d.getColor4(240,240,240,140)),this.drawPeak(a,this.piMouseOver,!0),c.setHighlightedPeak(this.piMouseOver)):
c.setHighlightedPeak(null);this.setColorFromToken(a,JSV.common.ScriptToken.PEAKTABCOLOR);for(var e=b.size();0<=--e;)this.drawPeak(a,b.get(e),!1)}},"~O,JSV.common.JDXSpectrum");b(c$,"drawPeak",function(a,c,b){if(!this.pd.isPrinting){var e=c.getXMin(),f=c.getXMax();e!=f&&this.drawBar(a,c,e,f,null,b)}},"~O,JSV.common.PeakInfo,~B");b(c$,"drawWidgets",function(a,c,b,e,f,g){this.setWidgets(b,c,e);if(!this.pd.isPrinting||!(null==this.imageView?!this.cur1D2Locked:this.sticky2Dcursor)){!this.pd.isPrinting&&
!g&&(e?(this.fillBox(a,this.xPixel0,this.pin1Dx0.yPixel1,this.xPixel1,this.pin1Dx1.yPixel1+2,JSV.common.ScriptToken.GRIDCOLOR),this.fillBox(a,this.pin1Dx0.xPixel0,this.pin1Dx0.yPixel1,this.pin1Dx1.xPixel0,this.pin1Dx1.yPixel1+2,JSV.common.ScriptToken.PLOTCOLOR)):(this.fillBox(a,this.imageView.xPixel0,this.pin2Dx0.yPixel1,this.imageView.xPixel1,this.pin2Dx0.yPixel1+2,JSV.common.ScriptToken.GRIDCOLOR),this.fillBox(a,this.pin2Dx0.xPixel0,this.pin2Dx0.yPixel1,this.pin2Dx1.xPixel0,this.pin2Dx1.yPixel1+
2,JSV.common.ScriptToken.PLOTCOLOR),this.fillBox(a,this.pin2Dy0.xPixel1,this.yPixel1,this.pin2Dy1.xPixel1+2,this.yPixel0,JSV.common.ScriptToken.GRIDCOLOR),this.fillBox(a,this.pin2Dy0.xPixel1,this.pin2Dy0.yPixel1,this.pin2Dy1.xPixel1+2,this.pin2Dy1.yPixel0,JSV.common.ScriptToken.PLOTCOLOR)),this.fillBox(a,this.pin1Dy0.xPixel1,this.yPixel1,this.pin1Dy1.xPixel1+2,this.yPixel0,JSV.common.ScriptToken.GRIDCOLOR),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(b=this.widgets[c],!(null==b||!b.isPinOrCursor&&!this.zoomEnabled)){var h=b===this.cur1D2x1||b===this.cur1D2x2||b===this.cur2Dx0||b===this.cur2Dx1||b===this.cur2Dy;if((b.isPin||!b.isPinOrCursor)!=g){if(b.is2D){if(b===this.cur2Dx0&&!e)continue}else{var l=b===this.pin1Dy0||b===this.pin1Dy1||b===this.pin1Dy01;if(null!=this.imageView&&e==l||l&&!f||b===this.cur1D2x1&&null==this.gs2dLinkedX||b===this.cur1D2x2&&null==this.gs2dLinkedY||
b===this.zoomBox1D&&(this.pd.isIntegralDrag||0!=this.pd.integralShiftMode))if(!this.isLinked||null!=this.imageView)continue}if(!this.pd.isPrinting||h)b.isPinOrCursor?(this.setColorFromToken(a,b.color),this.g2d.drawLine(a,b.xPixel0,b.yPixel0,b.xPixel1,b.yPixel1),b.isVisible=!0,b.isPin&&this.drawHandle(a,b.xPixel0,b.yPixel0,!b.isEnabled)):b.xPixel1!=b.xPixel0&&this.fillBox(a,b.xPixel0,b.yPixel0,b.xPixel1,b.yPixel1,b===this.zoomBox1D&&this.pd.shiftPressed?JSV.common.ScriptToken.ZOOMBOXCOLOR2:JSV.common.ScriptToken.ZOOMBOXCOLOR)}}}},
"~O,~N,~B,~B,~B,~B");b(c$,"drawBar",function(a,c,b,e,f,g){b=this.toPixelX(b);e=this.toPixelX(e);if(b>e){var h=b;b=e;e=h}b=this.fixX(b);e=this.fixX(e);3>e-b&&(b-=2,e+=2);null!=c&&c.setPixelRange(b,e);this.fillBox(a,b,this.yPixel0,e,this.yPixel0+(g?this.yPixels:5),f);null!=c&&!g&&(b=m((b+e)/2),this.fillBox(a,b-1,this.yPixel0,b+1,this.yPixel0+7,f))},"~O,JSV.common.PeakInfo,~N,~N,JSV.common.ScriptToken,~B");b(c$,"drawSpectrum",function(a,c,b,e,f){var g=this.spectra.get(c);this.drawPlot(a,c,g.getXYCoords(),
g.isContinuous(),b,e,null);null!=f&&(this.haveIntegralDisplayed(c)&&this.drawPlot(a,c,this.getIntegrationGraph(c).getXYCoords(),!0,b,!1,f),this.drawIntegralValues(a,c,b));null!=this.getIntegrationRatios(c)&&this.drawAnnotations(a,this.getIntegrationRatios(c),JSV.common.ScriptToken.INTEGRALPLOTCOLOR)},"~O,~N,~N,~B,JSV.common.IntegralData");b(c$,"getMeasurements",function(a,c){var b=this.getDialog(a,c);return null==b||0==b.getData().size()||!b.getState()?null:b.getData()},"JSV.common.Annotation.AType,~N");
b(c$,"drawPlot",function(a,c,b,e,f,g,h){var l=null!=h;h=null==h?null:h.getBitSet();var j=!l&&!g&&null!=this.pendingIntegral&&this.pendingIntegral.spec===this.spectra.get(c);g=g?-2:l?-1:!this.allowStacking?0:c;this.setPlotColor(a,g);var k=!0,m=this.toPixelY(0),j=(new Boolean(j&m==this.fixY(m))).valueOf(),p=this.viewData.getStartingPointIndex(c);c=this.viewData.getEndingPointIndex(c);if(e){c--;var r=!j&&this.g2d.canDoLineTo();r&&this.g2d.doStroke(a,!0);var q=!1;for(e=p;e<=c;e++){var s=b[e],t=b[e+1],
u=l?this.toPixelYint(s.getYVal()):this.toPixelY(s.getYVal());if(-2147483648!=u){var w=l?this.toPixelYint(t.getYVal()):this.toPixelY(t.getYVal());if(-2147483648!=w){var y=this.toPixelX(s.getXVal()),z=this.toPixelX(t.getXVal()),u=this.fixY(f+u),w=this.fixY(f+w);l&&(e==p&&(this.xPixelPlot1=y,this.yPixelPlot0=u),this.xPixelPlot0=z,this.yPixelPlot1=w);if(!(z==y&&u==w))if(j&&this.pendingIntegral.overlaps(s.getXVal(),t.getXVal()))this.setColorFromToken(a,JSV.common.ScriptToken.INTEGRALPLOTCOLOR),this.g2d.drawLine(a,
y,m,y,u),this.setPlotColor(a,g);else if(!(u==w&&(u==this.yPixel0||u==this.yPixel1)))if(null!=h&&h.get(e)!=k&&(k=h.get(e),!this.pd.isPrinting&&0!=this.pd.integralShiftMode?this.setPlotColor(a,0):k?this.setColorFromToken(a,JSV.common.ScriptToken.INTEGRALPLOTCOLOR):this.setPlotColor(a,-3)),!this.pd.isPrinting||k)q?this.g2d.lineTo(a,z,w):(this.g2d.drawLine(a,y,u,z,w),q=r)}}}r&&this.g2d.doStroke(a,!1)}else{for(e=p;e<=c;e++)l=b[e],w=this.toPixelY(l.getYVal()),-2147483648!=w&&(y=this.toPixelX(l.getXVal()),
u=this.toPixelY(Math.max(this.getScale().minYOnScale,0)),u=this.fixY(f+u),w=this.fixY(f+w),u==w&&(u==this.yPixel0||u==this.yPixel1)||this.g2d.drawLine(a,y,u,y,w));this.getScale().isYZeroOnScale()&&(b=f+this.toPixelY(this.getScale().spectrumYRef),b==this.fixY(b)&&this.g2d.drawLine(a,this.xPixel1,b,this.xPixel0,b))}},"~O,~N,~A,~B,~N,~B,JSV.common.IntegralData");b(c$,"drawFrame",function(a,c,b,e,f){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);f&&(0<=c&&(this.setPlotColor(a,c),this.fillArrow(a,JSV.common.GraphSet.ArrowType.UP,this.xVArrows,m((this.yPixel00+this.yPixel11)/2)-9,!0),this.fillArrow(a,JSV.common.GraphSet.ArrowType.DOWN,this.xVArrows,m((this.yPixel00+this.yPixel11)/2)+9,!0),this.setCurrentBoxColor(a)),this.fillArrow(a,JSV.common.GraphSet.ArrowType.UP,this.xVArrows,m((this.yPixel00+this.yPixel11)/2)-9,!1),this.fillCircle(a,
this.xVArrows,m((this.yPixel00+this.yPixel11)/2),!1),this.fillArrow(a,JSV.common.GraphSet.ArrowType.DOWN,this.xVArrows,m((this.yPixel00+this.yPixel11)/2)+9,!1));if(null==this.imageView&&b){c=this.xPixel00+10;b=this.xPixel11-10;f=this.yPixel00+1;var g=this.yPixel11-2;this.g2d.drawLine(a,c,f,b,f);this.g2d.drawLine(a,b,f,b,g);this.g2d.drawLine(a,c,g,b,g);e&&this.fillBox(a,this.xPixel11-20,this.yPixel00+1,this.xPixel11-10,this.yPixel00+11,null)}},"~O,~N,~B,~B,~B");b(c$,"drawGrid",function(a){if(this.pd.gridOn&&
null==this.imageView){this.setColorFromToken(a,JSV.common.ScriptToken.GRIDCOLOR);var c;if(Double.isNaN(this.getScale().firstX)){c=this.getScale().maxXOnScale+this.getScale().steps[0]/2;for(var b=this.getScale().minXOnScale;b<c;b+=this.getScale().steps[0]){var e=this.toPixelX(b);this.g2d.drawLine(a,e,this.yPixel0,e,this.yPixel1)}}else{c=1.0001*this.getScale().maxXOnScale;for(b=this.getScale().firstX;b<=c;b+=this.getScale().steps[0])e=this.toPixelX(b),this.g2d.drawLine(a,e,this.yPixel0,e,this.yPixel1)}for(b=
this.getScale().firstY;b<this.getScale().maxYOnScale+this.getScale().steps[1]/2;b+=this.getScale().steps[1])c=this.toPixelY(b),c==this.fixY(c)&&this.g2d.drawLine(a,this.xPixel0,c,this.xPixel1,c)}},"~O");b(c$,"drawXScale",function(a,c){this.setColorFromToken(a,JSV.common.ScriptToken.SCALECOLOR);this.pd.isPrinting&&this.g2d.drawLine(a,c.getXPixel0(),this.yPixel1,c.getXPixel0()+c.getXPixels()-1,this.yPixel1);for(var b=this.getScale().precision[0],e=this.pd.setFont(a,c.getXPixels(),0,this.pd.isPrinting?
10:12,!1),f=this.yPixel1,g=this.yPixel1+4*this.pd.scalingFactor,h=this.yPixel1+2*this.pd.scalingFactor,e=e.getHeight(),l=c.toPixelX(this.getScale().steps[0])-c.toPixelX(0),j=Math.abs(0.95*l),k=this.getScale().firstX-this.getScale().steps[0],p=1.0001*(this.getScale().maxXOnScale+this.getScale().steps[0]),r=0;2>r;r++){1==r&&JSV.common.ScaleData.fixScale(this.mapX);for(var q=1E10,s=k;s<=p;s+=this.getScale().steps[0]){var l=c.toPixelX(s),t=Double.$valueOf(s),u;switch(r){case 0:u=JU.DF.formatDecimalDbl(s,
b);this.mapX.put(t,u);this.drawTick(a,l,f,g,c);l=Math.abs(q-s);q=this.getScale().minorTickCounts[0];if(0!=q){l/=q;for(u=1;u<q;u++)this.drawTick(a,c.toPixelX(s-u*l),f,h,c)}q=s;continue;case 1:u=this.mapX.get(t);if(null==u||l!=c.fixX(l))continue;var t=this.pd.getStringWidth(u),w=l+m(t/2)==c.fixX(l+m(t/2))?2:0;0<w&&this.g2d.drawString(a,u,l-m(t/w),g+e);s+=Math.floor(t/j)*this.getScale().steps[0]}}}this.mapX.clear()},"~O,JSV.api.XYScaleConverter");b(c$,"drawTick",function(a,c,b,e,f){c==f.fixX(c)&&this.g2d.drawLine(a,
c,b,c,e)},"~O,~N,~N,~N,JSV.api.XYScaleConverter");b(c$,"drawYScale",function(a,c){var b=c.getScale(),e=b.precision[1],f=this.pd.setFont(a,c.getXPixels(),0,this.pd.isPrinting?10:12,!1).getHeight(),g=b.maxYOnScale+b.steps[1]/2,h=-2147483648;this.setColorFromToken(a,JSV.common.ScriptToken.SCALECOLOR);for(var l=0;2>l;l++){1==l&&JSV.common.ScaleData.fixScale(this.mapX);for(var j=b.firstY;j<g;j+=b.steps[1]){var k=Double.$valueOf(j),p=c.getXPixel0(),r=c.toPixelY(j);if(r==c.fixY(r)){var q;0==l&&this.g2d.drawLine(a,
p,r,p-3*this.pd.scalingFactor,r);if(!(Math.abs(r-h)<=f))switch(h=r,l){case 0:q=JU.DF.formatDecimalDbl(j,e);this.mapX.put(k,q);break;case 1:q=this.mapX.get(k);if(null==q)continue;q.startsWith("0")&&q.contains("E")&&(q="0");this.g2d.drawString(a,q,p-4*this.pd.scalingFactor-this.pd.getStringWidth(q),r+m(f/3))}}}}this.mapX.clear()},"~O,JSV.api.XYScaleConverter");b(c$,"drawXUnits",function(a){var c=this.spectra.get(0).getAxisLabel(!0);null!=c&&this.drawUnits(a,c,this.xPixel1+25*this.pd.scalingFactor,this.yPixel1+
5*this.pd.scalingFactor,1,1)},"~O");b(c$,"drawUnits",function(a,c,b,e,f,g){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,c,m(b-this.pd.getStringWidth(c)*f),m(e+this.pd.getFontHeight()*g))},"~O,~S,~N,~N,~N,~N");b(c$,"drawYUnits",function(a){var c=this.spectra.get(0).getAxisLabel(!1);null!=c&&this.drawUnits(a,c,(this.pd.isPrinting?30:5)*this.pd.scalingFactor,this.yPixel0+(this.pd.isPrinting?
0:5)*this.pd.scalingFactor,0,-1)},"~O");b(c$,"drawHighlightsAndPeakTabs",function(a,c){var b=this.getMeasurements(JSV.common.Annotation.AType.PeakList,c),e=this.spectra.get(c);if(this.pd.isPrinting)null!=b&&(this.setColorFromToken(a,JSV.common.ScriptToken.PEAKTABCOLOR),this.printPeakList(a,e,b));else{if(null==b){for(var f=0;f<this.highlights.size();f++){var g=this.highlights.get(f);g.spectrum===e&&(this.pd.setHighlightColor(g.color),this.drawBar(a,null,g.x1,g.x2,JSV.common.ScriptToken.HIGHLIGHTCOLOR,
!0))}this.drawPeakTabs(a,e)}if(null!=b){e=e.isInverted()?this.yPixel1-10*this.pd.scalingFactor:this.yPixel0;this.setColorFromToken(a,JSV.common.ScriptToken.PEAKTABCOLOR);for(f=b.size();0<=--f;)g=b.get(f),g=this.toPixelX(g.getXVal()),this.g2d.drawLine(a,g,e,g,e+10*this.pd.scalingFactor);this.isVisible(this.getDialog(JSV.common.Annotation.AType.PeakList,c))&&(e=this.toPixelY(b.getThresh()),e==this.fixY(e)&&!this.pd.isPrinting&&this.g2d.drawLine(a,this.xPixel0,e,this.xPixel1,e))}}},"~O,~N");b(c$,"printPeakList",
function(a,b,d){var e=d.getMeasurementListArray(null);if(0!=e.length){this.pd.setFont(a,this.xPixels,0,8,!1);for(var f=this.pd.getFontHeight(),g=D(d.size(),0),h=D(d.size(),0),l=0,j=5*this.pd.scalingFactor,k=10*this.pd.scalingFactor,p=15*this.pd.scalingFactor,r=25*this.pd.scalingFactor,q=0;q<e.length;q++)h[q]=this.toPixelX(Double.parseDouble(e[q][1])),0==q?g[q]=h[q]:(g[q]=Math.max(g[q-1]+f,h[q]+f),l+=g[q]-h[q]);l/=2*e.length;g[0]-l<this.xPixel0+r&&(l=g[0]-(this.xPixel0+r));for(q=0;q<e.length;q++)g[q]-=
l;q=b.isInverted();b=this.pd.getStringWidth("99.9999");for(var l=6<=e[0].length?this.pd.getStringWidth("99.99"):0,r=q?-1:1,s=(q?this.yPixel1:this.yPixel0)+r*(l+b+p),q=0;q<e.length;q++)this.g2d.drawLine(a,g[q],s,g[q],s+j*r),this.g2d.drawLine(a,g[q],s+j*r,h[q],s+k*r),this.g2d.drawLine(a,h[q],s+k*r,h[q],s+p*r),0<l&&0<e[q][4].length&&this.g2d.drawLine(a,m((g[q]+g[q-1])/2),s-b+j,m((g[q]+g[q-1])/2),s-b-j);s-=2*r*this.pd.scalingFactor;0<l&&(this.drawStringRotated(a,-90,g[0]-p,s,"  ppm"),this.drawStringRotated(a,
-90,g[0]-p,s-b-j," Hz"));for(q=d.size();0<=--q;)this.drawStringRotated(a,-90*r,g[q]+m(r*f/3),s,e[q][1]),0<l&&0<e[q][4].length&&(d=m((g[q]+g[q-1])/2)+m(f/3),this.drawStringRotated(a,-90,d,s-b-j,e[q][4]))}},"~O,JSV.common.JDXSpectrum,JSV.common.PeakData");b(c$,"drawStringRotated",function(a,b,d,e,f){this.g2d.drawStringRotated(a,f,d,e,b)},"~O,~N,~N,~N,~S");b(c$,"drawAnnotations",function(a,b,d){this.pd.setFont(a,this.xPixels,1,12,!1);for(var e=b.size();0<=--e;){var f=b.get(e);this.setAnnotationColor(a,
f,d);var g=(f.is2D?this.imageView:this).toPixelX(f.getXVal()),h=f.isPixels()?m(this.yPixel0+10*this.pd.scalingFactor-f.getYVal()):f.is2D?this.imageView.subIndexToPixelY(m(f.getYVal())):this.toPixelY(f.getYVal());this.g2d.drawString(a,f.text,g+f.offsetX*this.pd.scalingFactor,h-f.offsetY*this.pd.scalingFactor)}},"~O,JU.List,JSV.common.ScriptToken");b(c$,"drawIntegralValues",function(a,b,d){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 f=this.pd.getFontHeight();this.g2d.setStrokeBold(a,!0);for(var g=e.size();0<=--g;){var h=e.get(g);if(0!=h.getValue()){var l=this.toPixelX(h.getXVal2()),j=d*this.pd.scalingFactor+this.toPixelYint(h.getYVal()),k=d*this.pd.scalingFactor+this.toPixelYint(h.getYVal2());l!=this.fixX(l)||(j!=this.fixY(j)||k!=this.fixY(k))||(this.pd.isPrinting||this.g2d.drawLine(a,l,j,l,k),this.g2d.drawString(a,
"  "+h.text,l,m((j+k)/2)+m(f/3)))}}this.g2d.setStrokeBold(a,!1)}b==this.getFixedSelectedSpectrumIndex()&&(this.selectedSpectrumIntegrals=e)},"~O,~N,~N");b(c$,"drawMeasurements",function(a,b){var d=this.getMeasurements(JSV.common.Annotation.AType.Measurements,b);if(null!=d)for(var e=d.size();0<=--e;)this.drawMeasurement(a,d.get(e));b==this.getFixedSelectedSpectrumIndex()&&(this.selectedSpectrumMeasurements=d)},"~O,~N");b(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.HIGHLIGHTCOLOR):this.pd.BLACK);var d=this.toPixelX(b.getXVal()),e=this.toPixelY(b.getYVal()),f=this.toPixelX(b.getXVal2());if(!Double.isNaN(b.getXVal())&&!(d!=this.fixX(d)||f!=this.fixX(f))){var g=2<=Math.abs(d-f),h=this.getScale().isYZeroOnScale()&&b.spec.isHNMR(),l=m((d+f)/2);this.g2d.setStrokeBold(a,!0);g&&this.g2d.drawLine(a,d,e,f,e);h&&this.g2d.drawLine(a,d+1,this.yPixel1-1,f,
this.yPixel1-1);this.g2d.setStrokeBold(a,!1);g&&this.g2d.drawString(a,b.text,l+b.offsetX,e-b.offsetY);h&&(this.g2d.drawLine(a,d,this.yPixel1,d,this.yPixel1-6*this.pd.scalingFactor),this.g2d.drawLine(a,f,this.yPixel1,f,this.yPixel1-6*this.pd.scalingFactor))}}},"~O,JSV.common.Measurement");b(c$,"getPinSelected",function(a,b){if(null!=this.widgets)for(var d=0;d<this.widgets.length;d++)if(null!=this.widgets[d]&&this.widgets[d].isPinOrCursor&&this.widgets[d].selected(a,b))return this.widgets[d];return null},
"~N,~N");b(c$,"set2DCrossHairs",function(a,b){var d;if(a==this.imageView.fixX(a)&&b==this.fixY(b)&&(this.pin1Dx1.setX(d=this.imageView.toX(a),this.toPixelX(d)),this.cur2Dx1.setX(d,a),this.setCurrentSubSpectrum(this.imageView.toSubspectrumIndex(b)),this.isLinked)){var e=this.imageView.toY(b);this.pd.set2DCrossHairsLinked(this,d,e,!this.sticky2Dcursor)}},"~N,~N");b(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");b(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");b(c$,"checkIntegral",function(a,b,d){var e=this.getDialog(JSV.common.Annotation.AType.Integration,-1);null!=
e&&(a=e.getData().addIntegralRegion(a,b),d&&s(e,JSV.dialog.JSVDialog)&&e.update(null,0,0),this.selectedSpectrumIntegrals=null,this.pendingIntegral=d?null:a)},"~N,~N,~B");b(c$,"setToolTipForPixels",function(a,b){var d=this.getPinSelected(a,b),e=this.getScale().precision[0],f=this.getScale().precision[1];if(null!=d)this.setStartupPinTip()||(d===this.pin1Dx01||d===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):d===this.pin1Dy01?e=JU.DF.formatDecimalDbl(Math.min(this.pin1Dy0.getYVal(),this.pin1Dy1.getYVal()),f)+" - "+JU.DF.formatDecimalDbl(Math.max(this.pin1Dy0.getYVal(),this.pin1Dy1.getYVal()),f):d===this.cur2Dy?(d=this.imageView.toSubspectrumIndex(d.yPixel0),e=this.get2DYLabel(d,e)):e=d===this.pin2Dy01?""+m(Math.min(this.pin2Dy0.getYVal(),this.pin2Dy1.getYVal()))+" - "+m(Math.max(this.pin2Dy0.getYVal(),this.pin2Dy1.getYVal())):d.isXtype?JU.DF.formatDecimalDbl(d.getXVal(),e):
d.is2D?""+m(d.getYVal()):JU.DF.formatDecimalDbl(d.getYVal(),f),this.pd.setToolTipText(e));else{if(null!=this.imageView){if(this.imageView.fixX(a)==a&&this.fixY(b)==b){d=this.imageView.toSubspectrumIndex(b);e=JU.DF.formatDecimalDbl(this.imageView.toX(a),e)+" "+this.getSpectrum().getAxisLabel(!0)+",  "+this.get2DYLabel(d,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 d=this.toX(this.fixX(a)),
e=null!=this.imageView&&this.imageView.isXWithinRange(a)?this.imageView.toSubspectrumIndex(this.fixY(b)):this.toY(this.fixY(b)),f=this.setCoordStr(d,e),g=this.getFixedSelectedSpectrumIndex();this.isInPlotRegion(a,b)?1!=this.nSpectra&&this.haveIntegralDisplayed(g)&&(e=this.getIntegrationGraph(g).getPercentYValueAt(d),f+=", "+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:f)}},"~N,~N");b(c$,"setCoordStr",function(a,b){var d=JU.DF.formatDecimalDbl(a,this.getScale().precision[0]);this.pd.coordStr="("+d+(this.haveSingleYScale||0<=this.iSpectrumSelected?", "+JU.DF.formatDecimalDbl(b,this.getScale().precision[1]):"")+")";return d},"~N,~N");b(c$,"setStartupPinTip",
function(){if(null==this.pd.startupPinTip)return!1;this.pd.setToolTipText(this.pd.startupPinTip);this.pd.startupPinTip=null;return!0});b(c$,"get2DYLabel",function(a,b){var d=this.getSpectrumAt(0).getSubSpectra().get(a);return JU.DF.formatDecimalDbl(d.getY2D(),b)+(d.y2DUnits.equals("HZ")?" HZ ("+JU.DF.formatDecimalDbl(d.getY2DPPM(),b)+" PPM)":"")},"~N,~N");b(c$,"isOnSpectrum",function(a,b,d){var e=null,f=!0,g=0>d;if(g){e=this.getDialog(JSV.common.Annotation.AType.Integration,-1);if(null==e)return!1;
e=e.getData().getXYCoords();d=this.getFixedSelectedSpectrumIndex()}else{this.setScale(d);var h=this.spectra.get(d),e=h.xyCoords,f=h.isContinuous()}var h=d*z(this.yPixels*(this.yStackOffsetPercent/100)),l=this.viewData.getStartingPointIndex(d);d=this.viewData.getEndingPointIndex(d);if(f)for(f=l;f<d;f++){var j=e[f],k=e[f+1],l=this.toPixelX(j.getXVal()),m=this.toPixelX(k.getXVal()),j=g?this.toPixelYint(j.getYVal()):this.toPixelY(j.getYVal()),k=g?this.toPixelYint(k.getYVal()):this.toPixelY(k.getYVal());
if(!(-2147483648==j||-2147483648==k))if(j=h+this.fixY(j),k=h+this.fixY(k),JSV.common.GraphSet.isOnLine(a,b,l,j,m,k))return!0}else for(f=l;f<=d;f++)if(g=e[f],k=this.toPixelY(g.getYVal()),-2147483648!=k&&(l=this.toPixelX(g.getXVal()),j=this.toPixelY(Math.max(this.getScale().minYOnScale,0)),j=this.fixY(j),k=this.fixY(k),!(j==k&&(j==this.yPixel0||j==this.yPixel1))&&JSV.common.GraphSet.isOnLine(a,b,l,j,l,k)))return!0;return!1},"~N,~N,~N");c$.distance=b(c$,"distance",function(a,b){return Math.sqrt(a*a+
b*b)},"~N,~N");c$.findCompatibleGraphSet=b(c$,"findCompatibleGraphSet",function(a,b){for(var d=0;d<a.size();d++)if(JSV.common.JDXSpectrum.areXScalesCompatible(b,a.get(d).getSpectrum(),!1,!1))return a.get(d);return null},"JU.List,JSV.common.JDXSpectrum");c$.isGoodEvent=b(c$,"isGoodEvent",function(a,b,d){return null==b?5<Math.abs(a.xPixel1-a.xPixel0)&&5<Math.abs(a.yPixel1-a.yPixel0):d?5<Math.abs(a.xPixel0-b.xPixel0):5<Math.abs(a.yPixel0-b.yPixel0)},"JSV.common.PlotWidget,JSV.common.PlotWidget,~B");
c$.isOnLine=b(c$,"isOnLine",function(a,b,d,e,f,g){var h=Math.abs(d-a);if(2>h&&2>Math.abs(e-b))return!0;var l=f-a;if(2>Math.abs(l)&&2>Math.abs(g-b))return!0;var j=e-g;if(2<Math.abs(j)&&e<b==g<b)return!1;var k=d-f;return 2<Math.abs(k)&&d<a==f<a?!1:JSV.common.GraphSet.distance(h,e-b)+JSV.common.GraphSet.distance(l,b-g)<JSV.common.GraphSet.distance(k,j)+2},"~N,~N,~N,~N,~N,~N");c$.setFractionalPositions=b(c$,"setFractionalPositions",function(a,b,d){var e=b.size(),f=0,g=0;a.isLinked=d!==JSV.common.PanelData.LinkMode.NONE;
if(d===JSV.common.PanelData.LinkMode.NONE){for(var h=0;h<e;h++)d=b.get(h),f+=(d.getSpectrumAt(0).is1D(),1)*d.nSplit;f=1/f;for(h=0;h<e;h++)d=b.get(h),d.isLinked=!1,a=d.getSpectrumAt(0).is1D()?f:1*f,d.fX0=0,d.fY0=g,d.fracX=1,d.fracY=a,g+=a*d.nSplit}else{var f=null,l=-1;if(2==e||3==e)for(h=0;h<e;h++)if(d=b.get(h),!d.getSpectrum().is1D()){f=d;0<=l&&(h=-2);l=h;break}if(-2==l||-1==l&&2!=e)JSV.common.GraphSet.setFractionalPositions(a,b,JSV.common.PanelData.LinkMode.NONE);else for(h=0;h<e;h++)d=b.get(h),
d.isLinked=!0,a=d.getSpectrumAt(0),a.is1D()?(null!=f&&(l=f.getSpectrumAt(0),JSV.common.JDXSpectrum.areLinkableX(a,l)&&(d.gs2dLinkedX=f),JSV.common.JDXSpectrum.areLinkableY(a,l)&&(d.gs2dLinkedY=f)),d.fX0=0,d.fY0=g,d.fracX=null==f?1:0.5,d.fracY=3==e||null==f?0.5:1,g+=0.5):(d.fX0=0.5,d.fY0=0,d.fracX=0.5,d.fracY=1)}},"JSV.common.PanelData,JU.List,JSV.common.PanelData.LinkMode");b(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 d=this.getAnnotation(a,this.lastAnnotation);if(null==d)return null;if(null==this.annotations&&1==a.size()&&'"'==a.get(0).charAt(0))return d=d.text,this.getSpectrum().setTitle(d),d;this.lastAnnotation=d;this.addAnnotation(d,!1);return null},"JU.List,~S");b(c$,"addHighlight",
function(a,b,d,e){null==d&&(d=this.getSpectrumAt(0));a=ka(JSV.common.GraphSet.Highlight,this,null,a,b,d,null==e?this.pd.getColor(JSV.common.ScriptToken.HIGHLIGHTCOLOR):e);this.highlights.contains(a)||this.highlights.addLast(a)},"~N,~N,JSV.common.JDXSpectrum,javajs.api.GenericColor");b(c$,"addPeakHighlight",function(a){for(var b=this.spectra.size();0<=--b;){var d=this.spectra.get(b);this.removeAllHighlights(d);if(!(null==a||a.isClearAll()||d!==a.spectrum)){var e=a.toString();if(null!=e){var f=JU.PT.getQuotedAttribute(e,
"xMin"),e=JU.PT.getQuotedAttribute(e,"xMax");if(null==f||null==e)break;f=JU.PT.parseFloat(f);e=JU.PT.parseFloat(e);if(Float.isNaN(f)||Float.isNaN(e))break;this.pd.addHighlight(this,f,e,d,200,200,200,200);d.setSelectedPeak(a);!this.getScale().isInRangeX(f)&&!(this.getScale().isInRangeX(e)||f<this.getScale().minX&&this.getScale().maxX<e)&&this.setZoomTo(0)}}}},"JSV.common.PeakInfo");b(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");b(c$,"checkSpectrumClickedEvent",function(a,b,d){if(this.nextClickForSetPeak)return!1;if(0<d&&this.checkArrowLeftRightClick(a,b))return!0;if(1<d||(null!=this.pendingMeasurement||!this.isInPlotRegion(a,b))||0==d&&(d=this.isOnSpectrum(a,b,-1),this.pd.integralShiftMode=d?this.getShiftMode(a,b):0,this.pd.isIntegralDrag=0==this.pd.integralShiftMode&&(d||this.haveIntegralDisplayed(-1)&&null!=this.findMeasurement(this.getIntegrationGraph(-1),a,
b,0)),System.out.println("pd.isIntegralDrag set in checkSPelick "+this.pd.isIntegralDrag),0!=this.pd.integralShiftMode)||!this.showAllStacked)return!1;this.stackSelected=!1;for(d=0;d<this.nSpectra;d++)if(this.isOnSpectrum(a,b,d))return a=d!=this.iSpectrumSelected,this.setSpectrumClicked(this.iPreviousSpectrumClicked=d),a;if(this.isDialogOpen())return!1;this.setSpectrumClicked(-1);return this.stackSelected=!1},"~N,~N,~N");b(c$,"getShiftMode",function(a,b){return this.isStartEndIntegral(a,!1)?b:this.isStartEndIntegral(a,
!0)?-b:0},"~N,~N");b(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))});b(c$,"isStartEndIntegral",function(a,b){return b?20>this.xPixelPlot1-a:20>a-this.xPixelPlot0},"~N,~B");b(c$,"checkWidgetEvent",function(a,b,d){if(this.zoomEnabled&&this.triggered)if(this.triggered=!1,d)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&&(d=this.getPinSelected(a,b),null==d&&(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,d=this.zoomBox1D):null!=this.imageView&&a<this.imageView.xPixel1&&
(this.zoomBox2D.setX(this.imageView.toX(a),this.imageView.fixX(a)),this.zoomBox2D.yPixel0=b,d=this.zoomBox2D)),this.pd.thisWidget=d);else if(this.nextClickForSetPeak=!1,d=this.pd.thisWidget,null!=d)if(d===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(d===this.zoomBox2D)this.zoomBox2D.xPixel1=this.imageView.fixX(a),
this.zoomBox2D.yPixel1=this.fixY(b);else if(d===this.cur2Dy)b=this.fixY(b),this.cur2Dy.yPixel0=this.cur2Dy.yPixel1=b,this.setCurrentSubSpectrum(this.imageView.toSubspectrumIndex(b));else if(!(d===this.cur2Dx0||d===this.cur2Dx1))if(d===this.pin1Dx0||d===this.pin1Dx1||d===this.pin1Dx01){a=this.fixX(a);d.setX(this.toX0(a),a);if(d===this.pin1Dx01){d=a-m((this.pin1Dx0.xPixel0+this.pin1Dx1.xPixel0)/2);a=this.pin1Dx0.xPixel0+d;b=this.pin1Dx1.xPixel0+d;if(0==d||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(d===this.pin1Dy0||d===this.pin1Dy1||d===this.pin1Dy01){b=this.fixY(b);d.setY(this.toY0(b),b);if(d===this.pin1Dy01){d=b-m((this.pin1Dy0.yPixel0+this.pin1Dy1.yPixel0)/2)+1;b=this.pin1Dy0.yPixel0+d;a=this.pin1Dy1.yPixel0+d;d=this.toY0(b);var e=this.toY0(a);if(Math.min(d,e)==this.getScale().minY||Math.max(d,e)==this.getScale().maxY)return;this.pin1Dy0.setY(d,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(d===this.pin2Dx0||d===this.pin2Dx1||d===this.pin2Dx01){a=this.imageView.fixX(a);d.setX(this.imageView.toX0(a),a);if(d===this.pin2Dx01){d=a-m((this.pin2Dx0.xPixel0+this.pin2Dx1.xPixel0)/2)+1;a=this.pin2Dx0.xPixel0+d;b=this.pin2Dx1.xPixel0+d;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(d===this.pin2Dy0||d===this.pin2Dy1||d===this.pin2Dy01){b=this.fixY(b);d.setY(this.imageView.toSubspectrumIndex(b),b);if(d===this.pin2Dy01){d=b-m((this.pin2Dy0.yPixel0+this.pin2Dy1.yPixel0)/
2)+1;b=this.pin2Dy0.yPixel0+d;a=this.pin2Dy1.yPixel0+d;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");b(c$,"clearIntegrals",function(){this.checkIntegral(NaN,0,!1)});b(c$,"clearMeasurements",
function(){this.removeDialog(this.getFixedSelectedSpectrumIndex(),JSV.common.Annotation.AType.Measurements)});c$.createGraphSetsAndSetLinkMode=b(c$,"createGraphSetsAndSetLinkMode",function(a,b,d,e,f,g){for(var h=new JU.List,l=0;l<d.size();l++){var j=d.get(l),k=g===JSV.common.PanelData.LinkMode.NONE?JSV.common.GraphSet.findCompatibleGraphSet(h,j):null;null==k&&h.addLast(k=new JSV.common.GraphSet(b.getPanelData()));k.addSpec(j)}JSV.common.GraphSet.setFractionalPositions(a,h,g);for(l=h.size();0<=--l;)h.get(l).initGraphSet(e,
f),J.util.Logger.info("JSVGraphSet "+(l+1)+" nSpectra = "+h.get(l).nSpectra);return h},"JSV.common.PanelData,JSV.api.JSVPanel,JU.List,~N,~N,JSV.common.PanelData.LinkMode");b(c$,"drawGraphSet",function(a,b,d,e,f,g,h,l,j,k){this.zoomEnabled=this.pd.getBoolean(JSV.common.ScriptToken.ENABLEZOOM);this.height=e*this.pd.scalingFactor;this.width=d*this.pd.scalingFactor;this.left=f*this.pd.scalingFactor;this.right=g*this.pd.scalingFactor;this.top=h*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(d=0;d<this.widgets.length;d++)null!=this.widgets[d]&&(this.widgets[d].isVisible=!1);for(d=0;d<this.nSplit;d++)this.setPositionForFrame(d),this.drawAll(a,b,d,j||1<this.nSplit,k);this.setPositionForFrame(1<this.nSplit?this.pd.currentSplitPoint:0)},"~O,~O,~N,~N,~N,~N,~N,~N,~B,~B");b(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=b(c$,"findGraphSet",function(a,b,d){for(var e=a.size();0<=--e;)if(a.get(e).hasPoint(b,d))return a.get(e);return null},"JU.List,~N,~N");b(c$,"findMatchingPeakInfo",
function(a){for(var b=null,d=0;d<this.spectra.size()&&null==(b=this.spectra.get(d).findMatchingPeakInfo(a));d++);return b},"JSV.common.PeakInfo");b(c$,"getCurrentSpectrumIndex",function(){return 1==this.nSpectra?0:this.iSpectrumSelected});b(c$,"getSelectedIntegral",function(){return this.selectedIntegral});b(c$,"getShowAnnotation",function(a,b){var d=this.getDialog(a,b);return null!=d&&d.getState()},"JSV.common.Annotation.AType,~N");b(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");b(c$,"haveSelectedSpectrum",function(){return this.$haveSelectedSpectrum});b(c$,"mouseClickedEvent",function(a,b,d,e){this.selectedIntegral=this.selectedMeasurement=null;var f=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 g=this.getPinSelected(a,
b);if(null!=g)this.setWidgetValueByUser(g);else if(g=null!=this.imageView&&a==this.imageView.fixX(a)&&b==this.fixY(b),2==d&&(-1==this.iSpectrumClicked&&0<=this.iPreviousSpectrumClicked)&&this.setSpectrumClicked(this.iPreviousSpectrumClicked),!g&&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==d)g?(this.sticky2Dcursor&&this.addAnnotation(this.getAnnotation(this.imageView.toX(a),
this.imageView.toSubspectrumIndex(b),this.pd.coordStr,!1,!0,5,5),!0),this.sticky2Dcursor=!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(g){if(null!=this.annotations&&(d=(new JSV.common.Coordinate).set(this.imageView.toX(a),this.imageView.toSubspectrumIndex(b)),d=this.findAnnotation2D(d),null!=d&&this.setAnnotationText(d)))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(f){this.shiftSpectrum(NaN,NaN);return}}else this.setCoordClicked(0,NaN,0);this.pd.notifyPeakPickedListeners(null)}}},"~N,~N,~N,~B");b(c$,"updateDialog",function(a,b){var d=this.getDialog(a,b);if(null!=d&&this.isVisible(d)){var e=this.toX(this.xPixel1)-this.toX(this.xPixel0),f=this.getSpectrum().isInverted()?this.yPixel1-
this.pd.mouseY:this.pd.mouseY-this.yPixel0;d.update(this.pd.coordClicked,e,f)}},"JSV.common.Annotation.AType,~N");b(c$,"isVisible",function(a){return s(a,JSV.dialog.JSVDialog)&&a.isVisible()},"JSV.api.AnnotationData");b(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 d=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(d===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(d===this.zoomBox1D){if(JSV.common.GraphSet.isGoodEvent(this.zoomBox1D,null,!0)){var d=this.zoomBox1D.xPixel1,e=this.pd.shiftPressed;this.doZoom(this.toX(this.zoomBox1D.xPixel0),e?this.toY(this.zoomBox1D.yPixel0):
0,this.toX(d),e?this.toY(this.zoomBox1D.yPixel1):0,!0,e,!0,!0,!0);this.zoomBox1D.xPixel1=this.zoomBox1D.xPixel0}}else(d===this.pin1Dx0||d===this.pin1Dx1||d===this.cur2Dx0||d===this.cur2Dx1)&&this.addCurrentZoom()}},"~N,~N");b(c$,"mouseMovedEvent",function(a,b){if(1<this.nSpectra){var d=this.getSplitPoint(b);this.setPositionForFrame(d);this.setSpectrumMovedTo(1<this.nSplit?d: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 d=this.getDialog(JSV.common.Annotation.AType.Integration,-1),e=d.getData().getXYCoords(),e=e[0<this.pd.integralShiftMode?e.length-1:0].getYVal();d.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,d=1<this.nSplit?this.iSpectrumMovedTo:this.iSpectrumClicked,!this.isDrawNoSpectra()&&0<=d&&(d=this.spectra.get(d),null!=d.getPeakList()&&(this.coordTemp.setXVal(this.toX(a)),this.coordTemp.setYVal(this.toY(b)),this.piMouseOver=d.findPeakByCoord(a,this.coordTemp)))):!this.pd.display1D&&this.sticky2Dcursor&&
this.set2DCrossHairs(a,b)))},"~N,~N");b(c$,"nextView",function(){this.currentZoomIndex+1<this.viewList.size()&&this.setZoomTo(this.currentZoomIndex+1)});b(c$,"previousView",function(){0<this.currentZoomIndex&&this.setZoomTo(this.currentZoomIndex-1)});b(c$,"resetView",function(){this.setZoomTo(0)});b(c$,"removeAllHighlights",function(){this.removeAllHighlights(null)});b(c$,"removeHighlight",function(a){this.highlights.remove(a)},"~N");b(c$,"removeHighlight",function(a,b){for(var d=this.highlights.size();0<=
--d;){var e=this.highlights.get(d);e.x1==a&&e.x2==b&&this.highlights.remove(d)}},"~N,~N");b(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");b(c$,"selectSpectrum",function(a,b,d){for(var e=!1,f=this.spectra.size();0<=--f;)if((null==a||this.getSpectrumAt(f).getFilePathForwardSlash().equals(a))&&this.getSpectrumAt(f).matchesPeakTypeModel(b,
d))this.setSpectrumSelected(f),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");b(c$,"selectPeakByFileIndex",function(a,b){for(var d,e=this.spectra.size();0<=--e;)if(null!=(d=this.getSpectrumAt(e).selectPeakByFileIndex(a,b)))return d;return null},"~S,~S");b(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");b(c$,"setSelectedIntegral",function(a){var b=this.selectedIntegral.getSpectrum();this.getIntegrationGraph(this.getSpectrumIndex(b)).setSelectedIntegral(this.selectedIntegral,a)},"~N");b(c$,"setShowAnnotation",function(a,b){var d=this.getDialog(a,-1);if(null==d)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)s(d,JSV.dialog.JSVDialog)?d.setVisible(!1):d.setState(!d.getState());else{var e=b.booleanValue();d.setState(e);(e||s(d,JSV.dialog.JSVDialog))&&this.pd.showDialog(a)}},"JSV.common.Annotation.AType,Boolean");b(c$,"checkIntegral",function(a,b){if(!this.getSpectrum().canIntegrate()||this.reversePlot)return!1;var d=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(d,a);break;case JSV.common.IntegralData.IntMode.OFF:this.integrate(d,null);break;case JSV.common.IntegralData.IntMode.TOGGLE:this.integrate(d,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 f=Double.parseDouble(JSV.common.ScriptToken.getTokens(b).get(1));e.getData().setMinimumIntegral(f)}catch(g){if(!y(g,Exception))throw g;}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");b(c$,"setSpectrum",function(a,b){b?1<this.nSplit&&this.setSpectrumClicked(a):(this.setSpectrumClicked(a),this.showAllStacked=this.stackSelected=!1)},"~N,~B");b(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.JDXSpectrum");b(c$,"setZoom",function(a,b,d,e){this.setZoomTo(0);0==a&&0==d&&0==
b&&0==e?(this.newPins(),this.imageView=null,this.getScale(),this.getScale()):this.doZoom(a,b,d,e,!0,b!=e,!1,!0,!0)},"~N,~N,~N,~N");b(c$,"shiftSpectrum",function(a,b){var d=this.getSpectrum();if(!d.isNMR()||!d.is1D())return!1;if(1.7976931348623157E308==b||1.7976931348623157E308==a)a=-d.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(d,this.lastClickX,this.toY(this.pd.mouseY));if(Double.isNaN(e))return!1;if(Double.isNaN(b))try{var f=this.pd.getInput("New chemical shift (set blank to reset)","Set Reference",""+e).trim();b=0==f.length?e-d.addSpecShift(0):Double.parseDouble(f)}catch(g){if(y(g,Exception))return!1;throw g;}a=b-e}}if(0==a)return!1;d.addSpecShift(a);if(null!=this.annotations)for(e=this.annotations.size();0<=--e;)this.annotations.get(e).spec===d&&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()===d&&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");b(c$,"toPeak",function(a){a*=this.drawXAxisLeftToRight?1:-1;Double.isNaN(this.lastClickX)&&(this.lastClickX=this.lastPixelX=
0);var b=this.getSpectrum(),d=this.setCoordClicked(this.lastPixelX,this.lastClickX,0);a=b.setNextPeak(d,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");b(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");e(c$,"toString",function(){return"gs: "+
this.nSpectra+" "+this.spectra+" "+this.spectra.get(0).getFilePath()});b(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.JDXSpectrum,~N");b(c$,"setXPointer2",function(a,b){null!=a&&this.setSpectrumClicked(this.getSpectrumIndex(a));this.setXPixelMovedTo(1.7976931348623157E308,b,0,0)},"JSV.common.JDXSpectrum,~N");
b(c$,"hasCurrentMeasurement",function(a){return null!=(a===JSV.common.Annotation.AType.Integration?this.selectedSpectrumIntegrals:this.selectedSpectrumMeasurements)},"JSV.common.Annotation.AType");b(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");b(c$,"removeDialog",function(a,b){null!=this.dialogs&&0<=a&&this.dialogs.remove(b+"_"+a)},"~N,JSV.common.Annotation.AType");b(c$,"addDialog",
function(a,b,d){null==this.dialogs&&(this.dialogs=new java.util.Hashtable);a=b+"_"+a;d.setGraphSetKey(a);this.dialogs.put(a,d);return d},"~N,JSV.common.Annotation.AType,JSV.api.AnnotationData");b(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");b(c$,"getPeakListing",function(a,b,d){0>a&&(a=this.getCurrentSpectrumIndex());if(0>a)return null;var e=this.getDialog(JSV.common.Annotation.AType.PeakList,-1);
if(null==e){if(!d)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());s(e,JSV.dialog.JSVDialog)&&e.setFields();return e.getData()},"~N,JSV.common.Parameters,~B");b(c$,"setPeakListing",function(a){var b=this.getDialog(JSV.common.Annotation.AType.PeakList,-1),d=s(b,JSV.dialog.JSVDialog)?b:null;(null==a?null==d||!d.isVisible():a.booleanValue())?
this.pd.showDialog(JSV.common.Annotation.AType.PeakList):s(b,JSV.dialog.JSVDialog)&&b.setVisible(!1)},"Boolean");b(c$,"haveIntegralDisplayed",function(a){a=this.getDialog(JSV.common.Annotation.AType.Integration,a);return null!=a&&a.getState()},"~N");b(c$,"getIntegrationGraph",function(a){a=this.getDialog(JSV.common.Annotation.AType.Integration,a);return null==a?null:a.getData()},"~N");b(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");b(c$,"getIntegrationRatios",function(a){return null==this.aIntegrationRatios?null:this.aIntegrationRatios[a]},"~N");b(c$,"integrate",function(a,b){var d=this.getSpectrumAt(a);if(null==b||!d.canIntegrate())return this.removeDialog(a,JSV.common.Annotation.AType.Integration),!1;this.addDialog(a,JSV.common.Annotation.AType.Integration,new JSV.common.IntegralData(d,
b));return!0},"~N,JSV.common.Parameters");b(c$,"getIntegration",function(a,b,d){0>a&&(a=this.getCurrentSpectrumIndex());if(0>a)return null;var e=this.getDialog(JSV.common.Annotation.AType.Integration,-1);if(null==e){if(!d)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");b(c$,"getMeasurementInfo",function(a,b){var d;switch(a){case JSV.common.Annotation.AType.PeakList:d=this.getPeakListing(b,
null,!1);break;case JSV.common.Annotation.AType.Integration:d=this.getIntegration(b,null,!1);break;default:return null}if(null==d)return null;var e=new java.util.Hashtable;d.getInfo(e);return e},"JSV.common.Annotation.AType,~N");b(c$,"getInfo",function(a,b){var d=new java.util.Hashtable;if("viewInfo".equalsIgnoreCase(a))return this.getScale().getInfo(d);var e=new JU.List;d.put("spectra",e);for(var f=0;f<this.nSpectra;f++)if(!(0<=b&&f!=b)){var g=this.spectra.get(f),h=g.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",g.getDataType());JSV.common.Parameters.putInfo(a,h,"titleLabel",g.getTitleLabel());JSV.common.Parameters.putInfo(a,h,"filePath",g.getFilePath().$replace("\\","/"));JSV.common.Parameters.putInfo(a,h,"PeakList",JSV.common.Parameters.isMatch(a,"PeakList")?this.getMeasurementInfo(JSV.common.Annotation.AType.PeakList,f):null);JSV.common.Parameters.putInfo(a,h,"Integration",JSV.common.Parameters.isMatch(a,
"Integration")?this.getMeasurementInfo(JSV.common.Annotation.AType.Integration,f):null);if(0<=b)return h;e.addLast(h)}return d},"~S,~N");b(c$,"getTitle",function(a){return 1==this.nSpectra||0<=this.iSpectrumSelected&&(!a||1==this.nSplit)?this.getSpectrum().getTitle():null},"~B");b(c$,"getCurrentView",function(){this.setScale(this.getFixedSelectedSpectrumIndex());return this.viewData.getScale()});b(c$,"set2DXY",function(a,b,d){null!=this.gs2dLinkedX&&this.cur1D2x1.setX(a,this.toPixelX(a));null!=this.gs2dLinkedY&&
this.cur1D2x2.setX(b,this.toPixelX(b));this.cur1D2Locked=d},"~N,~N,~B");b(c$,"dialogsToFront",function(){if(null!=this.dialogs)for(var a,b=this.dialogs.entrySet().iterator();b.hasNext()&&((a=b.next())||1);){var d=a.getValue();this.isVisible(d)&&d.setVisible(!0)}});b(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 d=this.nSpectra-b.length;System.arraycopy(b,
0,a,0,b.length);for(var e=0,b=b.length;e<d;e++,b++)a[b]=this.generateRandomColor();b=a}this.plotColors=b},"~O");b(c$,"disposeImage",function(){null!=this.image2D&&this.image2D.parentNode.removeChild(this.image2D);this.plotColors=this.highlights=this.pd=this.jsvp=this.image2D=null});b(c$,"generateRandomColor",function(){for(;;){var a=m(255*Math.random()),b=m(255*Math.random()),d=m(255*Math.random()),a=this.g2d.getColor3(a,b,d);if(0!=a.getRGB())return a}});b(c$,"setPlotColor0",function(a){this.plotColors[0]=
a},"~O");b(c$,"getPlotColor",function(a){return a>=this.plotColors.length?null:this.plotColors[a]},"~N");b(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");b(c$,"setPlotColor",function(a,b){var d;switch(b){case -3:d=JSV.common.GraphSet.veryLightGrey;break;case -2:d=this.pd.BLACK;break;case -1:d=this.pd.getColor(JSV.common.ScriptToken.INTEGRALPLOTCOLOR);break;default:d=
this.plotColors[b]}this.g2d.setGraphicsColor(a,d)},"~O,~N");b(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)});b(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});b(c$,"update2dImage",function(a){this.imageView.set(this.viewData.getScale());var b=this.getSpectrumAt(0),d=this.imageView.get2dBuffer(b,!a);if(null==d)return this.imageView=this.image2D=null,!1;a&&(d=this.imageView.adjustView(b,this.viewData),this.imageView.resetView());this.image2D=this.g2d.newGrayScaleImage(this.gMain,this.image2D,this.imageView.imageWidth,this.imageView.imageHeight,d);this.setImageWindow();
return!0},"~B");b(c$,"getAnnotation",function(a,b,d,e,f,g,h){return(new JSV.common.ColoredAnnotation).setCA(a,b,this.getSpectrum(),d,this.pd.BLACK,e,f,g,h)},"~N,~N,~S,~B,~B,~N,~N");b(c$,"getAnnotation",function(a,b){return JSV.common.Annotation.getColoredAnnotation(this.g2d,this.getSpectrum(),a,b)},"JU.List,JSV.common.Annotation");b(c$,"fillBox",function(a,b,d,e,f,g){this.setColorFromToken(a,g);this.g2d.fillRect(a,Math.min(b,e),Math.min(d,f),Math.abs(b-e),Math.abs(d-f))},"~O,~N,~N,~N,~N,JSV.common.ScriptToken");
b(c$,"drawHandle",function(a,b,d,e){e?this.g2d.drawRect(a,b-2,d-2,4,4):this.g2d.fillRect(a,b-2,d-2,5,5)},"~O,~N,~N,~B");b(c$,"setCurrentBoxColor",function(a){this.g2d.setGraphicsColor(a,this.pd.BLACK)},"~O");b(c$,"fillArrow",function(a,b,d,e,f){var g=1;switch(b){case JSV.common.GraphSet.ArrowType.LEFT:case JSV.common.GraphSet.ArrowType.UP:g=-1}d=[d-5,d-5,d+5,d+5,d+8,d,d-8];e=[e+5*g,e-g,e-g,e+5*g,e+5*g,e+10*g,e+5*g];switch(b){case JSV.common.GraphSet.ArrowType.LEFT:case JSV.common.GraphSet.ArrowType.RIGHT:f?
this.g2d.fillPolygon(a,e,d,7):this.g2d.drawPolygon(a,e,d,7);break;case JSV.common.GraphSet.ArrowType.UP:case JSV.common.GraphSet.ArrowType.DOWN:f?this.g2d.fillPolygon(a,d,e,7):this.g2d.drawPolygon(a,d,e,7)}},"~O,JSV.common.GraphSet.ArrowType,~N,~N,~B");b(c$,"fillCircle",function(a,b,d,e){e?this.g2d.fillCircle(a,b-4,d-4,8):this.g2d.drawCircle(a,b-4,d-4,8)},"~O,~N,~N,~B");b(c$,"setAnnotationColor",function(a,b,d){null!=d?this.setColorFromToken(a,d):(d=null,s(b,JSV.common.ColoredAnnotation)&&(d=b.getColor()),
null==d&&(d=this.pd.BLACK),this.g2d.setGraphicsColor(a,d))},"~O,JSV.common.Annotation,JSV.common.ScriptToken");c$.$GraphSet$Highlight$=function(){aa();c$=u(function(){ma(this,arguments);this.x2=this.x1=0;this.spectrum=this.color=null;t(this,arguments)},JSV.common.GraphSet,"Highlight");e(c$,"toString",function(){return"highlight "+this.x1+" "+this.x2+" "+this.spectrum});w(c$,function(a,b,d,e){this.x1=a;this.x2=b;this.color=e;this.spectrum=d},"~N,~N,JSV.common.JDXSpectrum,javajs.api.GenericColor");
e(c$,"equals",function(a){return!s(a,JSV.common.GraphSet.Highlight)?!1:a.x1==this.x1&&a.x2==this.x2},"~O");c$=$()};aa();c$=G(JSV.common.GraphSet,"ArrowType",Enum);r(c$,"LEFT",0,[]);r(c$,"RIGHT",1,[]);r(c$,"UP",2,[]);r(c$,"DOWN",3,[]);r(c$,"RESET",4,[]);r(c$,"HOME",5,[]);c$=$();c$.RT2=c$.prototype.RT2=Math.sqrt(2);B(c$,"veryLightGrey",null,"minNumOfPointsForZoom",3,"MIN_DRAG_PIXELS",5,"ONLINE_CUTOFF",2)});p("JSV.common");q(["JSV.api.XYScaleConverter"],"JSV.common.ImageView",["java.lang.Double","JSV.common.Coordinate",
"$.ScaleData"],function(){c$=u(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;t(this,arguments)},JSV.common,"ImageView",null,JSV.api.XYScaleConverter);b(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");b(c$,"setZoom",function(a,b,d,e){this.xPixelZoom1=Math.min(a,d);this.yPixelZoom1=Math.min(b,e);this.xPixelZoom2=Math.max(a,d);this.yPixelZoom2=Math.max(b,e);this.setView()},"~N,~N,~N,~N");b(c$,"setXY0",function(a,b,d){this.xPixel0=b;this.yPixel0=d;this.xPixel1=this.xPixel0+this.xPixels-1;this.yPixel1=this.yPixel0+this.yPixels-1;this.setMinMaxY(a)},"JSV.common.JDXSpectrum,~N,~N");
b(c$,"setPixelWidthHeight",function(a,b){this.xPixels=a;this.yPixels=b},"~N,~N");b(c$,"resetView",function(){this.yView1=this.xView1=0;this.xView2=this.imageWidth-1;this.yView2=this.imageHeight-1});b(c$,"setView",function(){0==this.xPixelZoom1&&this.resetZoom();var a=this.toImageX(this.xPixelZoom1),b=this.toImageY(this.yPixelZoom1),d=this.toImageX(this.xPixelZoom2),e=this.toImageY(this.yPixelZoom2);this.xView1=Math.min(a,d);this.yView1=Math.min(b,e);this.xView2=Math.max(a,d);this.yView2=Math.max(b,
e);this.setScaleData();this.resetZoom()});b(c$,"resetZoom",function(){this.xPixelZoom1=this.xPixel0;this.yPixelZoom1=this.yPixel0;this.xPixelZoom2=this.xPixel1;this.yPixelZoom2=this.yPixel1});b(c$,"toImageX",function(a){return this.xView1+m(Math.floor((a-this.xPixel0)/(this.xPixels-1)*(this.xView2-this.xView1)))},"~N");b(c$,"toImageY",function(a){return this.yView1+m(Math.floor((a-this.yPixel0)/(this.yPixels-1)*(this.yView2-this.yView1)))},"~N");b(c$,"toImageX0",function(a){return JSV.common.Coordinate.intoRange(m((1*
a-this.xPixel0)/(this.xPixels-1)*(this.imageWidth-1)),0,this.imageWidth-1)},"~N");b(c$,"toImageY0",function(a){return JSV.common.Coordinate.intoRange(m((1*a-this.yPixel0)/(this.yPixels-1)*(this.imageHeight-1)),0,this.imageHeight-1)},"~N");b(c$,"isXWithinRange",function(a){return a>=this.xPixel0-5&&a<this.xPixel0+this.xPixels+5},"~N");b(c$,"toSubspectrumIndex",function(a){return JSV.common.Coordinate.intoRange(this.imageHeight-1-this.toImageY(a),0,this.imageHeight-1)},"~N");b(c$,"toX0",function(a){return this.maxX+
(this.minX-this.maxX)*(this.fixX(a)-this.xPixel0)/(this.xPixels-1)},"~N");b(c$,"toPixelX0",function(a){return this.xPixel1-m((a-this.minX)/(this.maxX-this.minX)*(this.xPixels-1))},"~N");b(c$,"toPixelY0",function(a){return this.yPixel1-m(a/(this.imageHeight-1)*(this.yPixels-1))},"~N");b(c$,"subIndexToPixelY",function(a){return this.yPixel0+m(1*(this.imageHeight-1-a-this.yView1)/(this.yView2-this.yView1)*(this.yPixels-1))},"~N");b(c$,"fixSubIndex",function(a){return JSV.common.Coordinate.intoRange(a,
this.imageHeight-1-this.yView2,this.imageHeight-1-this.yView1)},"~N");e(c$,"fixX",function(a){return a<this.xPixel0?this.xPixel0:a>this.xPixel1?this.xPixel1:a},"~N");e(c$,"toX",function(a){return this.maxX+(this.minX-this.maxX)*this.toImageX(this.fixX(a))/(this.imageWidth-1)},"~N");e(c$,"toPixelX",function(a){var b=this.toX(this.xPixel0),d=this.toX(this.xPixel1);return this.xPixel0+m((a-b)/(d-b)*(this.xPixels-1))},"~N");b(c$,"setView0",function(a,b,d,e){a=this.toImageX0(a);b=this.toImageY0(b);d=this.toImageX0(d);
e=this.toImageY0(e);this.xView1=Math.min(a,d);this.yView1=Math.min(b,e);this.xView2=Math.max(a,d);this.yView2=Math.max(b,e);this.resetZoom()},"~N,~N,~N,~N");b(c$,"get2dBuffer",function(a,b){var d=a.getSubSpectra();if(null==d||!d.get(0).isContinuous())return null;var e=a.getXYCoords(),f=d.size();this.imageWidth=e.length;this.imageHeight=f;var g=255/(this.maxZ-this.minZ);if(!b&&null!=this.buf2d&&g==this.grayFactorLast)return this.buf2d;this.grayFactorLast=g;for(var h=this.imageWidth*this.imageHeight,
l=D(h,0),j=0,k=0;k<f;k++){var p=d.get(k).xyCoords;if(p.length!=e.length)return null;for(var r=d.get(k).getUserYFactor(),q=0;q<e.length;q++){var s=p[q].getYVal(),s=255-JSV.common.Coordinate.intoRange(m((s*r-this.minZ)*g),0,255);l[--h]=s;j+=s}}this.averageGray=1-j/(this.imageWidth*this.imageHeight)/255;System.out.println("Average gray = "+this.averageGray);return this.buf2d=l},"JSV.common.JDXSpectrum,~B");b(c$,"adjustView",function(a,b){for(var d=0,e=!1;((e=0.05>this.averageGray)||0.3<this.averageGray)&&
10>d++;)b.scaleSpectrum(-2,e?2:0.5),this.set(b.getScale()),this.get2dBuffer(a,!1);return this.buf2d},"JSV.common.JDXSpectrum,JSV.common.ViewData");b(c$,"getBuffer",function(){return this.buf2d});b(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.JDXSpectrum");b(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)});e(c$,"getScale",function(){return this.scaleData});e(c$,"getYPixels",function(){return this.yPixels});e(c$,"getXPixels",function(){return this.xPixels});e(c$,"getXPixel0",function(){return this.xPixel0});e(c$,"toY",function(a){a=this.toSubspectrumIndex(a);return this.maxY+(this.minY-this.maxY)*a/(this.imageWidth-1)},"~N");e(c$,"fixY",function(a){return JSV.common.Coordinate.intoRange(a,this.yPixel0,
this.yPixel1)},"~N");e(c$,"toPixelY",function(a){return m(this.yPixel0+(a-this.scaleData.minYOnScale)/(this.scaleData.maxYOnScale-this.scaleData.minYOnScale)*this.yPixels)},"~N");B(c$,"DEFAULT_MIN_GRAY",0.05,"DEFAULT_MAX_GRAY",0.3)});p("JSV.common");q(["JSV.common.Measurement"],"JSV.common.Integral",null,function(){c$=G(JSV.common,"Integral",JSV.common.Measurement);b(c$,"setInt",function(a,b,d,e,f,g){this.setA(a,b,d,"",!1,!1,0,6);this.setPt2(f,g);this.setValue(e);return this},"~N,~N,JSV.common.JDXSpectrum,~N,~N,~N")});
p("JSV.common");c$=G(JSV.common,"IntegralComparator",null,java.util.Comparator);e(c$,"compare",function(a,b){return a.getXVal()<b.getXVal()?-1:a.getXVal()>b.getXVal()?1:0},"JSV.common.Measurement,JSV.common.Measurement");p("JSV.common");q(["java.lang.Enum","JSV.common.MeasurementData","$.IntegralComparator"],"JSV.common.IntegralData","java.lang.Double java.util.Collections $.StringTokenizer JU.AU $.BS $.DF $.List $.PT JSV.common.Annotation $.Coordinate $.Integral $.ScriptToken".split(" "),function(){c$=
u(function(){this.intRange=this.percentOffset=this.percentMinY=0;this.normalizationFactor=1;this.integralTotal=this.offset=this.percentRange=0;this.haveRegions=!1;this.xyCoords=null;t(this,arguments)},JSV.common,"IntegralData",JSV.common.MeasurementData);b(c$,"getPercentMinimumY",function(){return this.percentMinY});b(c$,"getPercentOffset",function(){return this.percentOffset});b(c$,"getIntegralFactor",function(){return this.intRange});w(c$,function(a,b,d,e){R(this,JSV.common.IntegralData,[JSV.common.Annotation.AType.Integration,
e]);this.percentMinY=a;this.percentOffset=b;this.percentRange=d;this.calculateIntegral()},"~N,~N,~N,JSV.common.JDXSpectrum");w(c$,function(a,b){R(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.JDXSpectrum,JSV.common.Parameters");b(c$,"update",function(a){this.update(a.integralMinY,a.integralOffset,a.integralRange)},"JSV.common.Parameters");
b(c$,"update",function(a,b,d){var e=this.percentRange;if(!(0>=d||d==this.percentRange&&b==this.percentOffset)){this.percentOffset=b;this.percentRange=d;this.checkRange();a=d/100/this.integralTotal;b/=100;for(var f=0;f<this.xyCoords.length;f++){var g=this.xyCoords[f].getYVal(),g=(g-this.offset)/this.intRange;this.xyCoords[f].setYVal(g*a+b)}1!=this.normalizationFactor&&(this.normalizationFactor*=e/d);if(this.haveRegions)for(f=this.size();0<=--f;)d=this.get(f),e=this.getYValueAt(d.getXVal()),g=this.getYValueAt(d.getXVal2()),
d.setYVal(e),d.setYVal2(g),d.setValue(100*Math.abs(g-e)*this.normalizationFactor);this.intRange=a;this.offset=b}},"~N,~N,~N");b(c$,"getYValueAt",function(a){return JSV.common.Coordinate.getYValueAt(this.xyCoords,a)},"~N");b(c$,"addIntegralRegion",function(a,b){if(Double.isNaN(a))return this.haveRegions=!1,this.clear(),null;if(a==b)return null;var d=this.getYValueAt(a),e=this.getYValueAt(b);this.haveRegions=!0;d=(new JSV.common.Integral).setInt(a,d,this.spec,100*Math.abs(e-d)*this.normalizationFactor,
b,e);this.clear(a,b);this.addLast(d);java.util.Collections.sort(this,JSV.common.IntegralData.c);return d},"~N,~N");e(c$,"setSpecShift",function(a){JSV.common.Coordinate.shiftX(this.xyCoords,a);for(var b=this.size();1<=--b;)this.get(b).addSpecShift(a)},"~N");b(c$,"addMarks",function(a){a=JU.PT.simpleReplace(" "+a,","," ");a=JU.PT.simpleReplace(a," -"," #");a=JU.PT.simpleReplace(a,"--","-#");a=a.$replace("-","^");a=a.$replace("#","-");a=JSV.common.ScriptToken.getTokens(a);for(var b=0;b<a.size();b++)try{var d=
a.get(b),e=0,f=d.indexOf("^");if(!(0>f)){var g=d.indexOf(":");g>f&&(e=Double.$valueOf(d.substring(g+1).trim()).doubleValue(),d=d.substring(0,g).trim());var h=Double.$valueOf(d.substring(0,f).trim()).doubleValue(),l=Double.$valueOf(d.substring(f+1).trim()).doubleValue();0==l&&0==h&&this.clear();if(l!=h){var j=this.addIntegralRegion(Math.max(l,h),Math.min(l,h));null!=j&&0<e&&this.setSelectedIntegral(j,e)}}}catch(k){if(!y(k,Exception))throw k;}},"~S");b(c$,"calculateIntegral",function(){var a=this.spec.getXYCoords();
this.xyCoords=Array(a.length);this.integralTotal=0;this.checkRange();for(var b=1E100,d=0;d<a.length;d++){var e=a[d].getYVal();e<b&&0<=e&&(b=e)}for(d=0;d<a.length;d++)e=a[d].getYVal(),-1.7976931348623157E308<e&&(this.integralTotal+=e-b);this.intRange=this.percentRange/100/this.integralTotal;this.offset=this.percentOffset/100;for(var f=0,d=a.length;0<=--d;)e=a[d].getYVal(),-1.7976931348623157E308<e&&(f+=e-b),this.xyCoords[d]=(new JSV.common.Coordinate).set(a[d].getXVal(),f*this.intRange+this.offset);
return this.xyCoords});b(c$,"checkRange",function(){this.percentOffset=Math.max(5,this.percentOffset);this.percentRange=Math.max(10,this.percentRange)});c$.getIntegrationRatiosFromString=b(c$,"getIntegrationRatiosFromString",function(a,b){for(var d=new JU.List,e=new java.util.StringTokenizer(b,",");e.hasMoreTokens();){var f=e.nextToken(),f=new java.util.StringTokenizer(f,":"),f=(new JSV.common.Annotation).setA(Double.parseDouble(f.nextToken()),0,a,f.nextToken(),!0,!1,0,0);d.addLast(f)}return d},"JSV.common.JDXSpectrum,~S");
b(c$,"getXYCoords",function(){return this.xyCoords});b(c$,"getPercentYValueAt",function(a){return 100*this.getYValueAt(a)},"~N");b(c$,"dispose",function(){this.xyCoords=this.spec=null});b(c$,"setSelectedIntegral",function(a,b){var d=a.getValue();this.factorAllIntegrals(0>=b?1/this.normalizationFactor:b/d,0>=b)},"JSV.common.Measurement,~N");b(c$,"factorAllIntegrals",function(a,b){for(var d=0;d<this.size();d++){var e=this.get(d);e.setValue(a*e.getValue())}this.normalizationFactor=b?1:this.normalizationFactor*
a},"~N,~B");b(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 d=this.get(b),e=JSV.common.Coordinate.getNearestIndexForX(this.xyCoords,d.getXVal()),d=JSV.common.Coordinate.getNearestIndexForX(this.xyCoords,d.getXVal2());a.setBits(Math.min(e,d),Math.max(e,d))}return a});e(c$,"getMeasurementListArray",function(){for(var a=Array(this.size()),b=0,d=this.size();0<=--d;)a[b++]=[""+b,JU.DF.formatDecimalDbl(this.get(d).getXVal(),
2),JU.DF.formatDecimalDbl(this.get(d).getXVal2(),2),this.get(d).text];return a},"~S");e(c$,"getMeasurementListArrayReal",function(){for(var a=JU.AU.newDouble2(this.size()),b=0,d=this.size();0<=--d;b++)a[b]=[this.get(d).getXVal(),this.get(d).getXVal2(),this.get(d).getValue()];return a},"~S");e(c$,"getDataHeader",function(){return JSV.common.IntegralData.$HEADER});b(c$,"shiftY",function(a,b,d,e){b=m(100*(d+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");b(c$,"autoIntegrate",function(){null==this.xyCoords&&this.calculateIntegral();if(0!=this.xyCoords.length){this.clear();for(var a=-1,b=0,d=this.xyCoords[this.xyCoords.length-1].getYVal(),e=this.xyCoords.length-1;0<=--e;){var f=this.xyCoords[e].getYVal();b++;1E-4>f-d&&0>a?f<d&&(d=f,b=0):0>a?(a=e+Math.min(b,20),d=f,b=0):1E-4>f-d?(1==b&&(d=f),20<=b&&(this.addIntegralRegion(this.xyCoords[a].getXVal(),this.xyCoords[e].getXVal()),a=-1,d=f,b=0)):(b=0,d=f)}0<this.spec.nH&&
this.factorAllIntegrals(this.spec.nH/this.percentRange,!1)}});b(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));na(this,JSV.common.IntegralData,"getInfo",[a])},"java.util.Map");b(c$,"setMinimumIntegral",function(a){for(var b=this.size();0<=--b;)this.get(b).getValue()<a&&this.remove(b)},
"~N");aa();c$=G(JSV.common.IntegralData,"IntMode",Enum);c$.getMode=b(c$,"getMode",function(a){for(var b,d=0,e=JSV.common.IntegralData.IntMode.values();d<e.length&&((b=e[d])||1);d++)if(a.startsWith(b.name()))return b;return JSV.common.IntegralData.IntMode.ON},"~S");r(c$,"OFF",0,[]);r(c$,"ON",1,[]);r(c$,"TOGGLE",2,[]);r(c$,"AUTO",3,[]);r(c$,"LIST",4,[]);r(c$,"MARK",5,[]);r(c$,"MIN",6,[]);r(c$,"UPDATE",7,[]);c$=$();B(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"]});p("JSV.common");q(["java.lang.Enum","JSV.source.JDXDataObject","JU.List"],"JSV.common.JDXSpectrum","java.lang.Boolean $.Double java.util.Hashtable JSV.common.Coordinate $.Parameters $.PeakInfo JSV.source.JDXSourceStreamTokenizer J.util.Logger".split(" "),function(){c$=u(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;t(this,arguments)},JSV.common,"JDXSpectrum",JSV.source.JDXDataObject);N(c$,function(){this.peakList=new JU.List});e(c$,"finalize",function(){System.out.println("JDXSpectrum "+this+" finalized "+this.title)});b(c$,"dispose",function(){});b(c$,"isForcedSubset",function(){return this.$isForcedSubset});b(c$,"setId",function(a){this.id=a},"~S");w(c$,function(){R(this,JSV.common.JDXSpectrum,
[]);this.headerTable=new JU.List;this.xyCoords=[];this.parent=this});b(c$,"copy",function(){var a=new JSV.common.JDXSpectrum;this.copyTo(a);a.setPeakList(this.peakList,this.piUnitsX,null);return a});b(c$,"getXYCoords",function(){return this.getCurrentSubSpectrum().xyCoords});b(c$,"getPeakList",function(){return this.peakList});b(c$,"setPeakList",function(a,b,d){this.peakList=a;System.out.println("setting peaklist for "+this+" to "+a);null==this.peakList&&System.out.println("ohoh");this.piUnitsX=b;
this.piUnitsY=d;for(b=a.size();0<=--b;)this.peakList.get(b).spectrum=this;J.util.Logger.debugging&&J.util.Logger.info("Spectrum "+this.getTitle()+" peaks: "+a.size());return a.size()},"JU.List,~S,~S");b(c$,"selectPeakByFileIndex",function(a,b){if(null!=this.peakList&&0<this.peakList.size())for(var d=0;d<this.peakList.size();d++)if(this.peakList.get(d).checkFileIndex(a,b))return System.out.println("selecting peak in "+this+" "+this.peakList.get(d)),this.selectedPeak=this.peakList.get(d);return null},
"~S,~S");b(c$,"selectPeakByFilePathTypeModel",function(a,b,d){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,d))return System.out.println("selecting peak in "+this+" "+this.peakList.get(e)),this.selectedPeak=this.peakList.get(e);return null},"~S,~S,~S");b(c$,"matchesPeakTypeModel",function(a,b){if(null!=this.peakList&&0<this.peakList.size())for(var d=0;d<this.peakList.size();d++)if(this.peakList.get(d).checkTypeModel(a,
b))return!0;return!1},"~S,~S");b(c$,"setSelectedPeak",function(a){this.selectedPeak=a},"JSV.common.PeakInfo");b(c$,"setHighlightedPeak",function(a){this.highlightedPeak=a},"JSV.common.PeakInfo");b(c$,"getSelectedPeak",function(){return this.selectedPeak});b(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});b(c$,"getAssociatedPeakInfo",function(a,b){this.selectedPeak=
this.findPeakByCoord(a,b);return null==this.selectedPeak?this.getBasePeakInfo():this.selectedPeak},"~N,JSV.common.Coordinate");b(c$,"findPeakByCoord",function(a,b){if(null!=b&&null!=this.peakList&&0<this.peakList.size()){for(var d=b.getXVal(),e=-1,f=1E100,g=0;g<this.peakList.size();g++){var h=this.peakList.get(g).checkRange(a,d);h<f&&(f=h,e=g)}if(0<=e)return this.peakList.get(e)}return null},"~N,JSV.common.Coordinate");b(c$,"getPeakTitle",function(){return null!=this.selectedPeak?this.selectedPeak.getTitle():
null!=this.highlightedPeak?this.highlightedPeak.getTitle():this.getTitleLabel()});b(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()});b(c$,"setNextPeak",function(a,b){if(null==this.peakList||0==this.peakList.size())return-1;for(var d=a.getXVal()+1E-6*b,e=-1,f=-1,g=1.7976931348623157E308*b,h=0,l=this.peakList.size();0<=--l;){var j=this.peakList.get(l).getX();
0<b?j>d&&j<g?(e=l,g=j):j<d&&j-d<h&&(f=l,h=j-d):j<d&&j>g?(e=l,g=j):j>d&&j-d>h&&(f=l,h=j-d)}if(0>e){if(0>f)return-1;e=f}return e},"JSV.common.Coordinate,~N");b(c$,"getPercentYValueAt",function(a){return!this.isContinuous()?NaN:this.getYValueAt(a)},"~N");b(c$,"getYValueAt",function(a){return JSV.common.Coordinate.getYValueAt(this.xyCoords,a)},"~N");b(c$,"setUserYFactor",function(a){this.userYFactor=a},"~N");b(c$,"getUserYFactor",function(){return this.userYFactor});b(c$,"getConvertedSpectrum",function(){return this.convertedSpectrum});
b(c$,"setConvertedSpectrum",function(a){this.convertedSpectrum=a},"JSV.common.JDXSpectrum");c$.taConvert=b(c$,"taConvert",function(a,b){if(!a.isContinuous())return a;switch(b){case JSV.common.JDXSpectrum.IRMode.NO_CONVERT:return a;case JSV.common.JDXSpectrum.IRMode.TO_ABS:if(!a.isTransmittance())return a;break;case JSV.common.JDXSpectrum.IRMode.TO_TRANS:if(!a.isAbsorbance())return a}var d=a.getConvertedSpectrum();return null!=d?d:a.isAbsorbance()?JSV.common.JDXSpectrum.toT(a):JSV.common.JDXSpectrum.toA(a)},
"JSV.common.JDXSpectrum,JSV.common.JDXSpectrum.IRMode");c$.toT=b(c$,"toT",function(a){if(!a.isAbsorbance())return null;var b=a.getXYCoords(),d=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++)d[e]=(new JSV.common.Coordinate).set(b[e].getXVal(),JSV.common.JDXSpectrum.toTransmittance(b[e].getYVal()));return JSV.common.JDXSpectrum.newSpectrum(a,d,"TRANSMITTANCE")},"JSV.common.JDXSpectrum");c$.toA=b(c$,"toA",function(a){if(!a.isTransmittance())return null;
for(var b=a.getXYCoords(),d=Array(b.length),e=JSV.common.Coordinate.isYInRange(b,-2,2),f=0;f<b.length;f++)d[f]=(new JSV.common.Coordinate).set(b[f].getXVal(),JSV.common.JDXSpectrum.toAbsorbance(b[f].getYVal(),e));return JSV.common.JDXSpectrum.newSpectrum(a,d,"ABSORBANCE")},"JSV.common.JDXSpectrum");c$.newSpectrum=b(c$,"newSpectrum",function(a,b,d){var e=a.copy();e.setOrigin("JSpecView Converted");e.setOwner("JSpecView Generated");e.setXYCoords(b);e.setYUnits(d);a.setConvertedSpectrum(e);e.setConvertedSpectrum(a);
return e},"JSV.common.JDXSpectrum,~A,~S");c$.toAbsorbance=b(c$,"toAbsorbance",function(a,b){return Math.min(4,b?2-JSV.common.JDXSpectrum.log10(a):-JSV.common.JDXSpectrum.log10(a))},"~N,~B");c$.toTransmittance=b(c$,"toTransmittance",function(a){return 0>=a?1:Math.pow(10,-a)},"~N");c$.log10=b(c$,"log10",function(a){return Math.log(a)/Math.log(10)},"~N");c$.process=b(c$,"process",function(a,b){if(b===JSV.common.JDXSpectrum.IRMode.TO_ABS||b===JSV.common.JDXSpectrum.IRMode.TO_TRANS)for(var d=0;d<a.size();d++)a.set(d,
JSV.common.JDXSpectrum.taConvert(a.get(d),b));return!0},"JU.List,JSV.common.JDXSpectrum.IRMode");b(c$,"getSubSpectra",function(){return this.subSpectra});b(c$,"getCurrentSubSpectrum",function(){return null==this.subSpectra?this:this.subSpectra.get(this.currentSubSpectrumIndex)});b(c$,"advanceSubSpectrum",function(a){return this.setCurrentSubSpectrum(this.currentSubSpectrumIndex+a)},"~N");b(c$,"setCurrentSubSpectrum",function(a){return this.currentSubSpectrumIndex=JSV.common.Coordinate.intoRange(a,
0,this.subSpectra.size()-1)},"~N");b(c$,"addSubSpectrum",function(a,b){if(!b&&(2>this.numDim||this.blockID!=a.blockID)||!JSV.common.JDXSpectrum.allowSubSpec(this,a))return!1;this.$isForcedSubset=b;null==this.subSpectra&&(this.subSpectra=new JU.List,this.addSubSpectrum(this,!0));this.subSpectra.addLast(a);a.parent=this;return!0},"JSV.common.JDXSpectrum,~B");b(c$,"getSubIndex",function(){return null==this.subSpectra?-1:this.currentSubSpectrumIndex});b(c$,"setExportXAxisDirection",function(a){this.exportXAxisLeftToRight=
a},"~B");b(c$,"isExportXAxisLeftToRight",function(){return this.exportXAxisLeftToRight});b(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 d="header".equals(a);if(!d&&null!=a)for(var e=this.headerTable.size();0<=--e;){var f=this.headerTable.get(e);if(f[0].equalsIgnoreCase(a)||f[2].equalsIgnoreCase(a))return b.put(a,f[1]),b}for(var f=new java.util.Hashtable,
g=this.getHeaderRowDataAsArray(),e=0;e<g.length;e++){var h=JSV.source.JDXSourceStreamTokenizer.cleanLabel(g[e][0]);if(!(null!=a&&!d&&!h.equals(a))){var l=JSV.common.JDXSpectrum.fixInfoValue(g[e][1]);if(null==a){var j=new java.util.Hashtable;j.put("value",l);j.put("index",Integer.$valueOf(e+1));b.put(h,j)}else b.put(h,l)}}0<f.size()&&b.put("header",f);d||(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=b(c$,"fixInfoValue",function(a){try{return Integer.$valueOf(a)}catch(b){if(!y(b,Exception))throw b;}try{return Double.$valueOf(a)}catch(d){if(!y(d,Exception))throw d;}return a},"~S");e(c$,"toString",function(){return this.getTitleLabel()});b(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");b(c$,"getBasePeakInfo",function(){return 0==this.peakList.size()?new JSV.common.PeakInfo:new JSV.common.PeakInfo(' baseModel="" '+this.peakList.get(0))});b(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");b(c$,"findXForPeakNearest",function(a){return JSV.common.Coordinate.findXForPeakNearest(this.xyCoords,
a,this.isInverted())},"~N");b(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 d=this.subSpectra.get(b);d!==this&&d!==this.parent&&d.addSpecShift(a)}return this.specShift},"~N");c$.allowSubSpec=b(c$,"allowSubSpec",function(a,b){return a.is1D()==b.is1D()&&a.xUnits.equalsIgnoreCase(b.xUnits)&&a.isHNMR()==b.isHNMR()},"JSV.common.JDXSpectrum,JSV.common.JDXSpectrum");c$.areXScalesCompatible=
b(c$,"areXScalesCompatible",function(a,b,d,e){var f=a.isNMR();if(f!=b.isNMR()||!e&&!a.xUnits.equalsIgnoreCase(b.xUnits))return!1;if(d){if(a.is1D()!=b.is1D())return!1}else if(e){if(!f)return!0}else if(!a.is1D()||!b.is1D())return!1;return!f||b.is1D()&&a.parent.nucleusX.equals(b.parent.nucleusX)},"JSV.common.JDXSpectrum,JSV.common.JDXSpectrum,~B,~B");c$.areLinkableX=b(c$,"areLinkableX",function(a,b){return a.isNMR()&&b.isNMR()&&a.nucleusX.equals(b.nucleusX)},"JSV.common.JDXSpectrum,JSV.common.JDXSpectrum");
c$.areLinkableY=b(c$,"areLinkableY",function(a,b){return a.isNMR()&&b.isNMR()&&a.nucleusX.equals(b.nucleusY)},"JSV.common.JDXSpectrum,JSV.common.JDXSpectrum");b(c$,"setNHydrogens",function(a){this.nH=a},"~N");aa();c$=G(JSV.common.JDXSpectrum,"IRMode",Enum);c$.getMode=b(c$,"getMode",function(a){switch(null==a?"I":a.toUpperCase().charAt(0)){case "A":return JSV.common.JDXSpectrum.IRMode.TO_ABS;case "T":return a.equalsIgnoreCase("TOGGLE")?JSV.common.JDXSpectrum.IRMode.TOGGLE:JSV.common.JDXSpectrum.IRMode.TO_TRANS;
case "N":return JSV.common.JDXSpectrum.IRMode.NO_CONVERT;default:return JSV.common.JDXSpectrum.IRMode.TOGGLE}},"~S");r(c$,"NO_CONVERT",0,[]);r(c$,"TO_TRANS",1,[]);r(c$,"TO_ABS",2,[]);r(c$,"TOGGLE",3,[]);c$=$();B(c$,"MAXABS",4)});___date="$Date: 2013-12-05 10:37:03 -0600 (Thu, 05 Dec 2013) $";___svnRev="$LastChangedRevision: 1461 $";___version="2.1.0";p("JSV.common");c$=G(JSV.common,"JSVersion");B(c$,"VERSION",null,"VERSION_SHORT",null);var ba=null,Y=null,ga=null,ba=self.___version,Y=self.___date,
ga=self.___svnRev;null!=Y&&(Y=Y.substring(7,23));null!=ga&&(ga=ga.substring(22,27));JSV.common.JSVersion.VERSION_SHORT=null!=ba?ba:"(Unknown version)";JSV.common.JSVersion.VERSION=JSV.common.JSVersion.VERSION_SHORT+"/SVN"+ga+"/"+(null!=Y?Y:"(Unknown date)");p("JSV.common");q(null,"JSV.common.JSVFileManager","java.io.BufferedInputStream $.BufferedReader $.IOException $.InputStreamReader $.StringReader java.net.URL java.util.Hashtable JU.AU $.Encoding $.PT $.SB JSV.common.JSVersion $.JSViewer JSV.util.JSVEscape J.util.Logger".split(" "),
function(){c$=G(JSV.common,"JSVFileManager");b(c$,"isApplet",function(){return null!=JSV.common.JSVFileManager.appletDocumentBase});c$.getFileAsString=b(c$,"getFileAsString",function(a){if(null==a)return null;var b,d=new JU.SB;try{b=JSV.common.JSVFileManager.getBufferedReaderFromName(a,null);for(var e;null!=(e=b.readLine());)d.append(e),d.appendC("\n");b.close()}catch(f){if(y(f,Exception))return null;throw f;}return d.toString()},"~S");c$.getBufferedReaderForInputStream=b(c$,"getBufferedReaderForInputStream",
function(a){try{return new java.io.BufferedReader(new java.io.InputStreamReader(a,"UTF-8"))}catch(b){if(y(b,java.io.UnsupportedEncodingException))return null;throw b;}},"java.io.InputStream");c$.getBufferedReaderForString=b(c$,"getBufferedReaderForString",function(a){return null==a?null:new java.io.BufferedReader(new java.io.StringReader(a))},"~S");c$.getBufferedReaderFromName=b(c$,"getBufferedReaderFromName",function(a,b){if(null==a)throw new java.io.IOException("Cannot find "+a);J.util.Logger.info("JSVFileManager getBufferedReaderFromName "+
a);var d=JSV.common.JSVFileManager.getFullPathName(a);J.util.Logger.info("JSVFileManager getBufferedReaderFromName "+d);return JSV.common.JSVFileManager.getUnzippedBufferedReaderFromName(d,b)},"~S,~S");c$.getFullPathName=b(c$,"getFullPathName",function(a){if(null==JSV.common.JSVFileManager.appletDocumentBase)return JSV.common.JSVFileManager.isURL(a)?(a=new java.net.URL(fa("java.net.URL"),a,null),a.toString()):JSV.common.JSVFileManager.viewer.apiPlatform.newFile(a).getFullPath();if(1==a.indexOf(":\\")||
1==a.indexOf(":/"))a="file:///"+a;a=new java.net.URL(JSV.common.JSVFileManager.appletDocumentBase,a,null);return a.toString()},"~S");c$.isURL=b(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=b(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=b(c$,"isLocal",function(a){if(null==a)return!1;a=JSV.common.JSVFileManager.urlTypeIndex(a);return 0>a||4==a},"~S");c$.getUnzippedBufferedReaderFromName=b(c$,"getUnzippedBufferedReaderFromName",function(a,b){var d=null;0<=a.indexOf("|")&&(d=JU.PT.split(a,"|"),null!=d&&0<d.length&&(a=d[0]));if(a.startsWith("http://SIMULATION/"))return JSV.common.JSVFileManager.getBufferedReaderForString(JSV.common.JSVFileManager.getNMRSimulationJCampDX(a.substring(18)));if(JSV.common.JSVFileManager.viewer.isApplet)return d=
JSV.common.JSVFileManager.viewer.apiPlatform.getBufferedURLInputStream(new java.net.URL(fa("java.net.URL"),a,null),null,null),s(d,JU.SB)||s(d,String)?new java.io.BufferedReader(new java.io.StringReader(d.toString())):JSV.common.JSVFileManager.isAB(d)?new java.io.BufferedReader(new java.io.StringReader(String.instantialize(d))):new java.io.BufferedReader(new java.io.InputStreamReader(d,"UTF-8"));var e=JSV.common.JSVFileManager.getInputStream(a,!0,null),f=new java.io.BufferedInputStream(e),e=f;if(JSV.common.JSVFileManager.isZipFile(f))return JSV.common.JSViewer.getInterface("JSV.util.JSVZipUtil").newJSVZipFileSequentialReader(e,
d,b);JSV.common.JSVFileManager.isGzip(f)&&(e=JSV.common.JSViewer.getInterface("JSV.util.JSVZipUtil").newGZIPInputStream(e));return new java.io.BufferedReader(new java.io.InputStreamReader(e,"UTF-8"))},"~S,~S");c$.isAB=b(c$,"isAB",function(a){return Aa(a)},"~O");c$.isZipFile=b(c$,"isZipFile",function(a){var b=T(4,0);a.mark(5);var d=a.read(b,0,4);a.reset();return 4==d&&80==b[0]&&75==b[1]&&3==b[2]&&4==b[3]},"java.io.InputStream");c$.isGzip=b(c$,"isGzip",function(a){var b=T(4,0);a.mark(5);var d=a.read(b,
0,4);a.reset();return 4==d&&31==b[0]&&139==b[1]},"java.io.InputStream");c$.getStreamAsBytes=b(c$,"getStreamAsBytes",function(a,b){for(var d=T(1024,0),e=null==b?T(4096,0):null,f=0,g=0;0<(f=a.read(d,0,1024));)g+=f,null==b?(g>=e.length&&(e=JU.AU.ensureLengthByte(e,2*g)),System.arraycopy(d,0,e,g-f,f)):b.write(d,0,f);a.close();return null==b?JU.AU.arrayCopyByte(e,g):g+" bytes"},"java.io.BufferedInputStream,JU.OC");c$.postByteArray=b(c$,"postByteArray",function(a,b){var d=null;try{d=JSV.common.JSVFileManager.getInputStream(a,
!1,b)}catch(e){if(y(e,Exception))return e.toString();throw e;}if(s(d,String))return d;try{d=JSV.common.JSVFileManager.getStreamAsBytes(d,null)}catch(f){if(y(f,java.io.IOException))try{d.close()}catch(g){if(!y(g,java.io.IOException))throw g;}else throw f;}return null==d?"":JSV.common.JSVFileManager.fixUTF(d)},"~S,~A");c$.getUTFEncoding=b(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=b(c$,"fixUTF",function(a){var b=JSV.common.JSVFileManager.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$.getInputStream=b(c$,"getInputStream",function(a,b,d){var e=JSV.common.JSVFileManager.isURL(a),f=null!=JSV.common.JSVFileManager.appletDocumentBase,g=null,g=null,h;if(e&&0<=(h=a.indexOf("?POST?")))g=a.substring(h+6),a=a.substring(0,h);if(f||e){if(a=new java.net.URL(JSV.common.JSVFileManager.appletDocumentBase,a,null),J.util.Logger.info("JSVFileManager opening URL "+a+(null==g?"":" with POST of "+
g.length+" bytes")),g=JSV.common.JSVFileManager.viewer.apiPlatform.getBufferedURLInputStream(a,d,g),s(g,String))return J.util.Logger.info("JSVFileManager could not get this URL:"+g),null}else b&&J.util.Logger.info("JSVFileManager opening file "+a),g=JSV.common.JSVFileManager.viewer.apiPlatform.getBufferedFileInputStream(a);return g},"~S,~B,~A");c$.getNMRSimulationJCampDX=b(c$,"getNMRSimulationJCampDX",function(a){null==JSV.common.JSVFileManager.htSimulate&&(JSV.common.JSVFileManager.htSimulate=new java.util.Hashtable);
var b=""+a.substring(a.indexOf("V2000")+1).hashCode(),d=JSV.common.JSVFileManager.htSimulate.get(b);if(null!=d)return d;var e=a.startsWith("MOL="),f;null==(f=e?JU.PT.simpleReplace(a.substring(4),"\\n","\n"):JSV.common.JSVFileManager.getFileAsString(JU.PT.simpleReplace(JSV.common.JSVFileManager.nciResolver,"%FILE",JU.PT.escapeUrl(a.substring(1)))))&&J.util.Logger.info("no data returned");var g=f.indexOf("\n");f="/JSpecView "+JSV.common.JSVersion.VERSION+f.substring(g);f=JU.PT.simpleReplace(f,"?","_");
d=JSV.common.JSVFileManager.getFileAsString(JSV.common.JSVFileManager.nmrdbServer+f);System.out.println(d);d=JU.PT.simpleReplace(d,"\\r\\n","\n");d=JU.PT.simpleReplace(d,"\\t","\t");d=JU.PT.simpleReplace(d,"\\n","\n");f=JSV.common.JSVFileManager.getQuotedJSONAttribute(d,"molfile",null);var h=JSV.common.JSVFileManager.getQuotedJSONAttribute(d,"xml",null),h=JU.PT.simpleReplace(h,"</","\n</"),h=JU.PT.simpleReplace(h,"><",">\n<"),h=JU.PT.simpleReplace(h,'\\"','"'),d=JSV.common.JSVFileManager.getQuotedJSONAttribute(d,
"jcamp",null),d="##TITLE="+(e?"JMOL SIMULATION":a)+"\n"+d.substring(d.indexOf("\n##")+1);J.util.Logger.info(d.substring(0,d.indexOf("##XYDATA")+40)+"...");var g=d.indexOf("##."),l=a.indexOf("id='");e&&0<l&&(a=a.substring(l+4,(a+"'").indexOf("'",l+4)));d=d.substring(0,g)+"##$MODELS=\n<Models>\n<ModelData id="+JSV.util.JSVEscape.eS(a)+'\n type="MOL">\n'+f+"</ModelData>\n</Models>\n##$SIGNALS=\n"+h+"\n"+d.substring(g);JSV.common.JSVFileManager.htSimulate.put(b,d);return d},"~S");c$.getResource=b(c$,
"getResource",function(a,b,d){var e=null;try{if(null==(e=a.getClass().getResource(b)))d[0]="Couldn't find file: "+b}catch(f){if(y(f,Exception))d[0]="Exception "+f+" in getResource "+b;else throw f;}return e},"~O,~S,~A");c$.getResourceString=b(c$,"getResourceString",function(a,b,d){a=JSV.common.JSVFileManager.getResource(a,b,d);if(null==a)return d[0]="Error loading resource "+b,null;if(s(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")),f;null!=(f=e.readLine());)b.append(f).append("\n");e.close()}catch(g){if(y(g,Exception))d[0]=g.toString();else throw g;}return b.toString()},"~O,~S,~A");c$.getJmolFilePath=b(c$,"getJmolFilePath",function(a){try{a=JSV.common.JSVFileManager.getFullPathName(a)}catch(b){if(y(b,java.net.MalformedURLException))return null;throw b;}return null==JSV.common.JSVFileManager.appletDocumentBase?a.$replace("\\","/"):a},"~S");c$.getName=b(c$,"getName",function(a){if(null==a)return"String"+ ++JSV.common.JSVFileManager.stringCount;
if(JSV.common.JSVFileManager.isURL(a))try{if(a.startsWith("http://SIMULATION/")&&100<a.length)return a.substring(0,Math.min(a.length,30))+"...";var b=(new java.net.URL(fa("java.net.URL"),a,null)).getFile();return b.substring(b.lastIndexOf("/")+1)}catch(d){if(y(d,java.net.MalformedURLException))return null;throw d;}return JSV.common.JSVFileManager.viewer.apiPlatform.newFile(a).getName()},"~S");c$.getQuotedJSONAttribute=b(c$,"getQuotedJSONAttribute",function(a,b,d){null==d&&(d=b);d='"'+d+'":';b=a.indexOf('"'+
b+'":');var e=a.indexOf(d,b);return 0>b||0>e?null:JU.PT.getQuotedStringAt(a,e+d.length)},"~S,~S,~S");c$.setDocumentBase=b(c$,"setDocumentBase",function(a,b){JSV.common.JSVFileManager.viewer=a;JSV.common.JSVFileManager.appletDocumentBase=b},"JSV.common.JSViewer,java.net.URL");B(c$,"SIMULATION_PROTOCOL","http://SIMULATION/","appletDocumentBase",null,"viewer",null,"jsDocumentBase","");c$.urlPrefixes=c$.prototype.urlPrefixes=["http:","https:","ftp:","http://SIMULATION/","file:"];B(c$,"URL_LOCAL",4,"nciResolver",
"http://cactus.nci.nih.gov/chemical/structure/%FILE/file?format=sdf","nmrdbServer","http://www.nmrdb.org/tools/jmol/predict.php?POST?molfile=","htSimulate",null,"stringCount",0)});p("JSV.common");q(["javajs.api.BytePoster","$.JSInterface","$.PlatformViewer","javajs.awt.Dimension","JSV.common.JDXSpectrum"],"JSV.common.JSViewer","java.lang.Boolean $.Double $.Float $.Thread java.net.URL java.util.Hashtable JU.List $.OC $.PT $.SB JSV.common.Annotation $.ExportType $.JSVFileManager $.PanelData $.PanelNode $.Parameters $.PeakInfo $.PrintLayout $.RepaintManager $.ScriptToken $.ScriptTokenizer JSV.source.JDXSource JSV.tree.SimpleTree JSV.util.JSVEscape J.util.Logger".split(" "),
function(){c$=u(function(){this.irMode=this.overlayLegendDialog=this.viewDialog=this.dialogManager=this.jsvpPopupMenu=this.fileHelper=this.scriptQueue=this.properties=this.viewPanel=this.selectedPanel=this.repaintManager=this.parameters=this.panelNodes=this.currentSource=this.spectraTree=this.g2d=this.si=null;this.isSigned=this.isJS=this.isApplet=this.isSingleThreaded=!1;this.recentScript="";this.display=this.applet=this.syncID=this.fullName=this.appletID=null;this.maximumSize=2147483647;this.apiPlatform=
this.dimScreen=null;this.popupZoomEnabled=this.popupAllowMenu=!0;this.overlayLegendVisible=!1;this.recentStackPercent=5;this.offWindowFrame=this.lastPrintLayout=null;t(this,arguments)},JSV.common,"JSViewer",null,[javajs.api.PlatformViewer,javajs.api.JSInterface,javajs.api.BytePoster]);N(c$,function(){this.irMode=JSV.common.JDXSpectrum.IRMode.NO_CONVERT;this.dimScreen=new javajs.awt.Dimension(0,0)});b(c$,"setProperty",function(a,b){null!=this.properties&&this.properties.setProperty(a,b)},"~S,~S");
b(c$,"setNode",function(a,b){this.si.siSetNode(a,b)},"JSV.common.PanelNode,~B");w(c$,function(a,b,d){this.si=a;this.isJS=(this.isApplet=b)&&d;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.List;this.repaintManager=new JSV.common.RepaintManager(this);b||this.setPopupMenu(!0,!0)},"JSV.api.ScriptInterface,~B,~B");b(c$,"setPopupMenu",function(a,b){this.popupAllowMenu=a;this.popupZoomEnabled=b},"~B,~B");b(c$,"showMenu",function(a,b){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(d){if(y(d,Exception)){System.out.println(d+" initializing popup menu");return}throw d;}this.jsvpPopupMenu.jpiShow(a,b)},"~N,~N");b(c$,"runScriptNow",function(a){this.si.siIncrementViewCount(1);null==a&&(a="");a=a.trim();a.startsWith("!")&&(a=a.substring(1).trim());System.out.println("RUNSCRIPT "+a);var b=!0,d=10;a=new JSV.common.ScriptTokenizer(a,!0);for(var e=null;a.hasMoreTokens()&&0<d&&b;){var f=a.nextToken(),g=new JSV.common.ScriptTokenizer(f,!1),h=JSV.common.ScriptToken.getKey(g);
if(null!=h){var l=JSV.common.ScriptToken.getScriptToken(h),f=JSV.common.ScriptToken.getValue(l,g,f);System.out.println("KEY-> "+h+" VALUE-> "+f+" : "+l);try{switch(l){case JSV.common.ScriptToken.UNKNOWN:J.util.Logger.info("Unrecognized parameter: "+h);--d;break;default:if(null==this.selectedPanel)break;this.parameters.set(this.pd(),l,f);this.si.siUpdateBoolean(l,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(l,
f);break;case JSV.common.ScriptToken.AUTOINTEGRATE:this.si.siExecSetAutoIntegrate(JSV.common.Parameters.isTrue(f));break;case JSV.common.ScriptToken.CLOSE:this.si.siExecClose(f);break;case JSV.common.ScriptToken.DEBUG:J.util.Logger.setLogLevel(f.toLowerCase().equals("high")?6:JSV.common.Parameters.isTrue(f)?5:4);break;case JSV.common.ScriptToken.GETPROPERTY:var j=null==this.selectedPanel?null:this.getPropertyAsJavaObject(f);null!=j&&this.selectedPanel.showMessage(JU.PT.toJSON(null,j),f);break;case JSV.common.ScriptToken.HIDDEN:this.si.siExecHidden(JSV.common.Parameters.isTrue(f));
break;case JSV.common.ScriptToken.INTEGRATIONRATIOS:this.si.siSetIntegrationRatios(f);null!=this.selectedPanel&&this.execIntegrate(null);break;case JSV.common.ScriptToken.INTERFACE:this.si.siExecSetInterface(f);break;case JSV.common.ScriptToken.INTEGRALOFFSET:case JSV.common.ScriptToken.INTEGRALRANGE:this.execSetIntegralParameter(l,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:e=
this.si.siExecLoad(f);break;case JSV.common.ScriptToken.LOADIMAGINARY:this.si.siSetLoadImaginary(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 k=this.si.siSetFileAsString(f);null!=k&&
100>this.si.siIncrementScriptLevelCount(0)&&this.runScriptNow(k)}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.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(null==
this.selectedPanel){b=!1;break}switch(l){case JSV.common.ScriptToken.FINDX:this.pd().findX(null,Double.parseDouble(f));break;case JSV.common.ScriptToken.GETSOLUTIONCOLOR:this.selectedPanel.showMessage(this.getSolutionColorHtml(),"Predicted Colour");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(m){if(y(m,Exception))alert(m+"\n"+Ga()),b=!1,--d;else throw m;}}}this.si.siIncrementViewCount(-1);this.si.siExecScriptComplete(e,!0);return b},"~S");b(c$,"pd",function(){return this.selectedPanel.getPanelData()});b(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(d){if(!y(d,Exception))throw d;}},"~S");b(c$,"execPeakList",function(a){var b=this.selectedPanel,d=this.parameters,e=JSV.common.Parameters.getTFToggle(a);if(0>a.indexOf("="))null!=b&&b.getPanelData().getPeakListing(null,e);
else for(var e=JSV.common.ScriptToken.getTokens(a),f=e.size();0<=--f;){a=e.get(f);var g=a.indexOf("=");if(!(0>=g)){var h=a.substring(0,g);a=a.substring(g+1);try{h.startsWith("thr")?d.peakListThreshold=Double.$valueOf(a).doubleValue():h.startsWith("int")&&(d.peakListInterpolation=a.equalsIgnoreCase("none")?"NONE":"parabolic"),null!=b&&b.getPanelData().getPeakListing(d,Boolean.TRUE)}catch(l){if(!y(l,Exception))throw l;}}}},"~S");b(c$,"execZoom",function(a){var b=0,d=0,e=0,f=0;a=JSV.common.ScriptToken.getTokens(a);
switch(a.size()){default:return!1;case 1:return this.zoomTo(a.get(0)),!0;case 2:b=Double.parseDouble(a.get(0));d=Double.parseDouble(a.get(1));break;case 4:b=Double.parseDouble(a.get(0)),e=Double.parseDouble(a.get(1)),d=Double.parseDouble(a.get(2)),f=Double.parseDouble(a.get(3))}this.pd().setZoom(b,e,d,f);return!0},"~S");b(c$,"zoomTo",function(a){var b=this.pd();a.equalsIgnoreCase("next")?b.nextView():a.toLowerCase().startsWith("prev")?b.previousView():a.equalsIgnoreCase("out")?b.resetView():a.equalsIgnoreCase("clear")&&
b.clearAllView()},"~S");b(c$,"scaleSelectedBy",function(a,b){try{for(var d=Double.parseDouble(b),e=a.size();0<=--e;)a.get(e).jsvp.getPanelData().scaleSelectedBy(d)}catch(f){if(!y(f,Exception))throw f;}},"JU.List,~S");b(c$,"execSelect",function(a){for(var b=this.panelNodes,d=b.size();0<=--d;)b.get(d).jsvp.getPanelData().selectFromEntireSet(-2147483648);b=new JU.List;this.fillSpecList(a,b,!1)},"~S");b(c$,"execView",function(a,b){if(a.equals(""))this.checkOverlay();else{var d=new JU.List,e=this.fillSpecList(a,
d,!0);0<d.size()&&this.si.siOpenDataOrFile(null,e,d,e,-1,-1,!1);b||this.si.siValidateAndRepaint()}},"~S,~B");b(c$,"execIRMode",function(a){var b=JSV.common.JDXSpectrum.IRMode.getMode(a),d=this.pd(),e=d.getSpectrum(),b=JSV.common.JDXSpectrum.taConvert(e,b);b!==e&&(d.setSpectrum(b),this.setIRmode(a))},"~S");b(c$,"execIntegrate",function(a){var b=this.selectedPanel;null!=b&&(b.getPanelData().checkIntegral(this.parameters,a),a=this.si.siGetIntegrationRatios(),null!=a&&b.getPanelData().setIntegrationRatios(a),
this.si.siSetIntegrationRatios(null),b.doRepaint(!0))},"~S");b(c$,"execSetIntegralParameter",function(a,b){var d=this.parameters;switch(a){case JSV.common.ScriptToken.INTEGRALRANGE:d.integralRange=b;break;case JSV.common.ScriptToken.INTEGRALOFFSET:d.integralOffset=b}d=this.selectedPanel;null!=d&&d.getPanelData().checkIntegral(this.parameters,"update")},"JSV.common.ScriptToken,~N");b(c$,"setYScale",function(a){var b=JSV.common.ScriptToken.getTokens(a),d=0,e=!1;1<b.size()&&b.get(0).equalsIgnoreCase("ALL")&&
(e=!0,d++);a=Double.parseDouble(b.get(d++));b=Double.parseDouble(b.get(d));if(e){e=this.pd().getSpectrum();for(d=this.panelNodes.size();0<=--d;){var f=this.panelNodes.get(d);f.source===this.currentSource&&JSV.common.JDXSpectrum.areXScalesCompatible(e,f.getSpectrum(),!1,!1)&&f.jsvp.getPanelData().setZoom(0,a,0,b)}}else this.pd().setZoom(0,a,0,b)},"~S");b(c$,"setOverlayLegendVisibility",function(a,b){b&&(this.overlayLegendVisible=null==a?!this.overlayLegendVisible:a===Boolean.TRUE);for(var d=JSV.common.PanelNode.findNode(this.selectedPanel,
this.panelNodes),e=this.panelNodes.size();0<=--e;)this.showOverlayLegend(this.panelNodes.get(e),this.panelNodes.get(e)===d&&this.overlayLegendVisible)},"Boolean,~B");b(c$,"showOverlayLegend",function(a,b){var d=a.legend;null==d&&b&&(d=a.setLegend(1<a.jsvp.getPanelData().getNumberOfSpectraInCurrentSet()&&1==a.jsvp.getPanelData().getNumberOfGraphSets()?this.getDialog(JSV.common.Annotation.AType.OverlayLegend,null):null));null!=d&&d.setVisible(b)},"JSV.common.PanelNode,~B");b(c$,"addHighLight",function(a,
b,d,e,f,g){var h=this.selectedPanel;null!=h&&(h.getPanelData().addHighlight(null,a,b,null,d,e,f,g),h.doRepaint(!1))},"~N,~N,~N,~N,~N,~N");b(c$,"syncScript",function(a){a.equals("TEST")&&(a=JSV.common.JSViewer.testScript);J.util.Logger.info("JSViewer.syncScript Jmol>JSV "+a);if(0>a.indexOf("<PeakData")){if(this.runScriptNow(a),0<=a.indexOf("#SYNC_PEAKS")&&(a=this.currentSource,null!=a))try{var b="file="+JSV.util.JSVEscape.eS(a.getFilePath()),d=a.getSpectra().get(0).getPeakList(),e=new JU.SB;e.append("[");
var f=d.size();for(a=0;a<f;a++){var g=d.get(a).toString(),g=g+" "+b;e.append(JSV.util.JSVEscape.eS(g));0<a&&e.append(",")}e.append("]");this.si.syncToJmol("Peaks: "+e)}catch(h){if(!y(h,Exception))throw h;}}else if(a=JU.PT.simpleReplace(a,'\\"',""),b=JU.PT.getQuotedAttribute(a,"file"),System.out.println("file2="+b),d=JU.PT.getQuotedAttribute(a,"index"),!(null==b||null==d))if(d=JU.PT.getQuotedAttribute(a,"model"),e=JU.PT.getQuotedAttribute(a,"src"),f=null!=e&&e.startsWith("Jmol")?null:this.si.siGetReturnFromJmolModel(),
null!=d&&null!=f&&!d.equals(f))J.util.Logger.info("JSV ignoring model "+d+"; should be "+f);else{this.si.siSetReturnFromJmolModel(null);if(0==this.panelNodes.size()||!this.checkFileAlreadyLoaded(b))J.util.Logger.info("file "+b+" not found -- JSViewer closing all and reopening"),this.si.siSyncLoad(b);f=this.selectPanelByPeak(a);g=this.selectedPanel;a=JU.PT.getQuotedAttribute(a,"type");g.getPanelData().selectSpectrum(b,a,d,!0);this.si.siSendPanelChange(g);g.getPanelData().addPeakHighlight(f);g.doRepaint(!0);
(null==e||null!=f&&null!=f.getAtoms())&&this.si.syncToJmol(this.jmolSelect(f))}},"~S");b(c$,"checkFileAlreadyLoaded",function(a){var b=this.selectedPanel;if(null!=b&&b.getPanelData().hasFileLoaded(a))return!0;for(b=this.panelNodes.size();0<=--b;)if(this.panelNodes.get(b).jsvp.getPanelData().hasFileLoaded(a))return this.si.siSetSelectedPanel(this.panelNodes.get(b).jsvp),!0;return!1},"~S");b(c$,"selectPanelByPeak",function(a){if(null==this.panelNodes)return null;var b=JU.PT.getQuotedAttribute(a,"file");
a=JU.PT.getQuotedAttribute(a,"index");for(var d=null,e=this.panelNodes.size();0<=--e;)this.panelNodes.get(e).jsvp.getPanelData().addPeakHighlight(null);e=this.selectedPanel;d=e.getPanelData().selectPeakByFileIndex(b,a);System.out.println(Thread.currentThread()+"JSViewer selectPanelByPeak pi = "+d);if(null!=d)this.setNode(JSV.common.PanelNode.findNode(e,this.panelNodes),!1);else for(e=this.panelNodes.size();0<=--e;){var f=this.panelNodes.get(e);if(null!=(d=f.jsvp.getPanelData().selectPeakByFileIndex(b,
a))){this.setNode(f,!1);break}}return d},"~S");b(c$,"processPeakPickEvent",function(a){if(s(a,JSV.common.PeakInfo)){var b=this.selectedPanel.getPanelData().findMatchingPeakInfo(a);if(null==b){if(!"ALL".equals(a.getTitle()))return;for(var d=null,e=0;e<this.panelNodes.size();e++)if(null!=(b=this.panelNodes.get(e).jsvp.getPanelData().findMatchingPeakInfo(a))){d=this.panelNodes.get(e);break}if(null==d)return;this.setNode(d,!1)}a=b}else this.si.siSetSelectedPanel(a.getSource()),a=a.getPeakInfo();this.pd().addPeakHighlight(a);
this.syncToJmol(a);a.isClearAll()?this.selectedPanel.doRepaint(!1):this.pd().selectSpectrum(a.getFilePath(),a.getType(),a.getModel(),!0);this.si.siCheckCallbacks(a.getTitle())},"~O,~B");b(c$,"syncToJmol",function(a){this.si.siSetReturnFromJmolModel(a.getModel());this.si.syncToJmol(this.jmolSelect(a))},"JSV.common.PeakInfo");b(c$,"sendPanelChange",function(a){var b=a.getPanelData(),d=b.getSpectrum(),e=d.getSelectedPeak();null==e&&(e=d.getModelPeakInfoForAutoSelectOnLoad());null==e&&(e=d.getBasePeakInfo());
b.addPeakHighlight(e);J.util.Logger.info(Thread.currentThread()+"JSViewer sendFrameChange "+a);this.syncToJmol(e)},"JSV.api.JSVPanel");b(c$,"jmolSelect",function(a){var b=null,b="IR".equals(a.getType())||"RAMAN".equals(a.getType())?"vibration ON; selectionHalos OFF;":null!=a.getAtoms()?"vibration OFF; selectionhalos ON;":"vibration OFF; selectionhalos OFF;",b="Select: "+a+' script="'+b;System.out.println("JSViewer.jmolSelect "+b);return b},"JSV.common.PeakInfo");b(c$,"getPropertyAsJavaObject",function(a){var b=
!1;if(null!=a&&a.toUpperCase().startsWith("ALL ")||"all".equalsIgnoreCase(a))a=a.substring(3).trim(),b=!0;"".equals(a)&&(a=null);var d=new java.util.Hashtable,e=this.pd().getInfo(!0,a);if(!b&&null!=e)return e;null!=e&&d.put("current",e);b=new JU.List;for(e=0;e<this.panelNodes.size();e++)null!=this.panelNodes.get(e).jsvp&&b.addLast(this.panelNodes.get(e).getInfo(a));d.put("items",b);return d},"~S");b(c$,"getCoordinate",function(){if(null!=this.selectedPanel){var a=this.pd().getClickedCoordinate();
if(null!=a)return a.getXVal()+" "+a.getYVal()}return""});b(c$,"fillSpecList",function(a,b,d){var e,f=null,g=a.equalsIgnoreCase("NONE");if(g||a.equalsIgnoreCase("all"))a="*";if(0>a.indexOf("*")){e=a.$plit(" ");a=new JU.SB;for(var h=0;h<e.length;h++){var l=e[h].indexOf(".");l!=e[h].lastIndexOf(".")&&(e[h]=e[h].substring(0,l+1)+e[h].substring(l+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('"'))e=JSV.common.ScriptToken.getTokens(a);else if(a=JU.PT.simpleReplace(a,"_"," _ "),a=JU.PT.simpleReplace(a,"-"," - "),e=JSV.common.ScriptToken.getTokens(a),f=JSV.common.ScriptToken.getTokens(JSV.common.PanelNode.getSpectrumListAsString(this.panelNodes)),0==f.size())return null;var j=null==this.selectedPanel?"1.":JSV.common.PanelNode.findNode(this.selectedPanel,this.panelNodes).id,j=j.substring(0,j.indexOf(".")+1);a=new JU.SB;for(var k=e.size(),m=null,h=0;h<k;h++){var p=e.get(h),
l=NaN,r=-1;h+1<k&&e.get(h+1).equals("*")?(h+=2,l=Double.parseDouble(e.get(h))):h+1<k&&e.get(h+1).equals("_")&&(h+=2,r=Integer.parseInt(e.get(h)));if(p.equals("-")){null==m&&(m=f.get(0));p=h+1==k?f.get(f.size()-1):e.get(++h);p.contains(".")||(p=j+p);for(l=0;l<f.size()&&!f.get(l).equals(m);)l++;for(l++;l<f.size()&&!m.equals(p);)b.addLast(JSV.common.PanelNode.findNodeById(m=f.get(l++),this.panelNodes).jsvp.getPanelData().getSpectrumAt(0)),a.append(",").append(m)}else{var q;if(p.startsWith('"')){p=JU.PT.trim(p,
'"');for(r=0;r<this.panelNodes.size();r++)if(q=this.panelNodes.get(r),null!=q.fileName&&q.fileName.startsWith(p)||null!=q.frameTitle&&q.frameTitle.startsWith(p))this.addSpecToList(q.jsvp.getPanelData(),l,-1,b,d),a.append(",").append(q.id)}else p.contains(".")||(p=j+p),q=JSV.common.PanelNode.findNodeById(p,this.panelNodes),null!=q&&(m=p,this.addSpecToList(q.jsvp.getPanelData(),l,r,b,d),a.append(",").append(p),0<r&&a.append(".").appendI(r))}}d&&1==b.size()&&(q=JSV.common.PanelNode.findNodeById(m,this.panelNodes),
null!=q&&(this.setNode(q,!0),b.clear()));return g?"NONE":0<a.length()?a.toString().substring(1):null},"~S,JU.List,~B");b(c$,"addSpecToList",function(a,b,d,e,f){f?(a.getSpectrumAt(0).setUserYFactor(Double.isNaN(b)?1:b),a.addToList(d-1,e)):a.selectFromEntireSet(d-1)},"JSV.common.PanelData,~N,~N,JU.List,~B");b(c$,"getSolutionColor",function(){var a=this.pd().getSpectrum();return a.canShowSolutionColor()?JSV.common.JSViewer.getInterface("JSV.common.Visible").getColour(a.getXYCoords(),a.getYUnits()):"255,255,255"});
b(c$,"getSolutionColorHtml",function(){var a=this.getSolutionColor();return"<html><body style='background-color:rgb("+a+")'><br />Predicted Solution Colour- RGB("+a+")<br /><br /></body></html>"});b(c$,"openDataOrFile",function(a,b,d,e,f,g,h){if("NONE".equals(b))return this.close("View*"),0;this.si.writeStatus("");var l=null,j=null,k=null;b=!1;if(null==a)if(null!=d)b=!0,j=k=l="View"+this.si.siIncrementViewCount(1);else if(null!=e)try{l=(new java.net.URL(JSV.common.JSVFileManager.appletDocumentBase,
e,null)).toString(),this.si.siSetRecentURL(l),k=JSV.common.JSVFileManager.getName(l)}catch(m){if(y(m,java.net.MalformedURLException))l=this.apiPlatform.newFile(e),k=l.getName(),j=l=l.getFullPath(),this.si.siSetRecentURL(null);else throw m;}if(!b&&(JSV.common.PanelNode.isOpen(this.panelNodes,l)||JSV.common.PanelNode.isOpen(this.panelNodes,e)))return this.si.writeStatus(l+" is already open"),-1;!h&&!b&&this.close("all");this.si.setCursor(3);try{this.si.siSetCurrentSource(b?JSV.source.JDXSource.createView(d):
this.si.siCreateSource(a,l,f,g))}catch(p){if(y(p,Exception))return alert(p+"\n"+Ga()),this.si.setCursor(0),-3;throw p;}this.si.setCursor(0);System.gc();null==j?(j=this.currentSource.getFilePath(),null!=j&&(k=j.substring(j.lastIndexOf("/")+1))):this.currentSource.setFilePath(j);this.si.siSetLoaded(k,j);a=this.currentSource.getJDXSpectrum(0);if(null==a)return-4;d=this.currentSource.getSpectra();JSV.common.JDXSpectrum.process(d,this.irMode);d=this.si.siGetAutoCombine()||a.isAutoOverlayFromJmolClick();
b||d&&this.currentSource.isCompoundSource?this.combineSpectra(b?e:null):this.splitSpectra();this.selectedPanel.getPanelData().taintedAll=!0;b||this.si.siUpdateRecentMenus(l);return 0},"~S,~S,JU.List,~S,~N,~N,~B");b(c$,"close",function(a){if(null==a||a.equalsIgnoreCase("all")||a.equals("*"))this.si.siCloseSource(null);else{a=a.$replace("\\","/");if(a.endsWith("*")){a=a.substring(0,a.length-1);for(var b=this.panelNodes.size();0<=--b;)b<this.panelNodes.size()&&this.panelNodes.get(b).fileName.startsWith(a)&&
this.si.siCloseSource(this.panelNodes.get(b).source)}else if(a.equals("selected")){a=new JU.List;for(var d=null,b=this.panelNodes.size();0<=--b;){var e=this.panelNodes.get(b).source;this.panelNodes.get(b).isSelected&&(null==d||d!==e)&&a.addLast(e);d=e}for(b=a.size();0<=--b;)this.si.siCloseSource(a.get(b))}else{e=0==a.length?this.currentSource:JSV.common.PanelNode.findSourceByNameOrId(a,this.panelNodes);if(null==e)return;this.si.siCloseSource(e)}null==this.selectedPanel&&0<this.panelNodes.size()&&
this.si.siSetSelectedPanel(JSV.common.PanelNode.getLastFileFirstNode(this.panelNodes))}},"~S");b(c$,"load",function(a){var b=JSV.common.ScriptToken.getTokens(a);a=b.get(0);var d=0,e=a.equalsIgnoreCase("APPEND"),f=a.equalsIgnoreCase("CHECK");if(e||f)a=b.get(++d);a.equalsIgnoreCase("MOL")&&(a="http://SIMULATION/MOL="+JU.PT.trimQuotes(b.get(++d)));!f&&!e&&(a.equals('""')&&null!=this.currentSource&&(a=this.currentSource.getFilePath()),this.close("all"));a=JU.PT.trimQuotes(a);a.startsWith("$")&&(a="http://SIMULATION/"+
a);f=d+1<b.size()?Integer.$valueOf(b.get(++d)).intValue():-1;b=d+1<b.size()?Integer.$valueOf(b.get(++d)).intValue():f;this.si.siOpenDataOrFile(null,null,null,a,f,b,e)},"~S");b(c$,"combineSpectra",function(a){var b=this.currentSource,d=b.getSpectra(),d=this.si.siGetNewJSVPanel2(d);d.setTitle(b.getTitle());d.getTitle().equals("")&&(d.getPanelData().setViewTitle(b.getFilePath()),d.setTitle(a));this.si.siSetPropertiesFromPreferences(d,!0);this.si.siCreateTree(b,[d]).getPanelNode().isView=!0;b=JSV.common.PanelNode.findNode(this.selectedPanel,
this.panelNodes);b.setFrameTitle(a);b.isView=!0;this.si.siGetAutoShowLegend()&&1==this.pd().getNumberOfGraphSets()&&b.setLegend(this.getDialog(JSV.common.Annotation.AType.OverlayLegend,null));this.si.siSetMenuEnables(b,!1)},"~S");b(c$,"closeSource",function(a){for(var b=this.spectraTree.getRootNode(),d=null==a?null:a.getFilePath(),e=new JU.List,b=b.children();b.hasMoreElements();){var f=b.nextElement();if(null==d||f.getPanelNode().source.getFilePath().equals(d)){for(var g=f.children();g.hasMoreElements();){var h=
g.nextElement();e.addLast(h);this.panelNodes.removeObj(h.getPanelNode())}e.addLast(f);if(null!=d)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(d=a=0;d<this.panelNodes.size();d++)e=JU.PT.parseFloat(this.panelNodes.get(d).id),e>=a+1&&(a=m(Math.floor(e)));this.si.siSetFileCount(a);
System.gc();J.util.Logger.checkMemory()},"JSV.source.JDXSource");b(c$,"setFrameAndTreeNode",function(a){null==this.panelNodes||(0>a||a>=this.panelNodes.size())||this.setNode(this.panelNodes.get(a),!1)},"~N");b(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");b(c$,"setSpectrum",function(a){if(0<=
a.indexOf(".")){a=JSV.common.PanelNode.findNodeById(a,this.panelNodes);if(null==a)return!1;this.setNode(a,!1)}else{a=JU.PT.parseInt(a);if(0>=a)return this.checkOverlay(),!1;this.setFrameAndTreeNode(a-1)}return!0},"~S");b(c$,"splitSpectra",function(){for(var a=this.currentSource,b=a.getSpectra(),d=Array(b.size()),e=null,f=0;f<b.size();f++)e=b.get(f),e=this.si.siGetNewJSVPanel(e),this.si.siSetPropertiesFromPreferences(e,!0),d[f]=e;this.si.siCreateTree(a,d);this.si.siGetNewJSVPanel(null);a=JSV.common.PanelNode.findNode(this.selectedPanel,
this.panelNodes);this.si.siSetMenuEnables(a,!0)});b(c$,"selectedTreeNode",function(a){null!=a&&(a.isLeaf()?this.setNode(a.getPanelNode(),!0):System.out.println("not a leaf"),this.si.siSetCurrentSource(a.getPanelNode().source))},"JSV.api.JSVTreeNode");b(c$,"removeAllHighlights",function(){var a=this.selectedPanel;null!=a&&(a.getPanelData().removeAllHighlights(),a.doRepaint(!1))});b(c$,"removeHighlight",function(a,b){var d=this.selectedPanel;null!=d&&(d.getPanelData().removeHighlight(a,b),d.doRepaint(!1))},
"~N,~N");b(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)});b(c$,"runScript",function(a){null==this.scriptQueue?this.si.siProcessCommand(a):
this.scriptQueue.addLast(a)},"~S");b(c$,"requestRepaint",function(){null!=this.selectedPanel&&this.repaintManager.refresh()});b(c$,"repaintDone",function(){this.repaintManager.repaintDone()});b(c$,"checkOverlay",function(){null!=this.viewPanel&&this.viewPanel.markSelectedPanels(this.panelNodes);this.viewDialog=this.getDialog(JSV.common.Annotation.AType.Views,null)});b(c$,"execOverlayOffsetY",function(a){if(null!=this.selectedPanel){if(-2147483648==a){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.pd().setYStackOffsetPercent(a)}},"~N");b(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");b(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");e(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");b(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");
e(c$,"updateJS",function(){null!=this.selectedPanel&&this.selectedPanel.paintComponent(this.apiPlatform.context)},"~N,~N");e(c$,"processMouseEvent",function(a,b,d,e,f){return null!=this.selectedPanel&&this.selectedPanel.processMouseEvent(a,b,d,e,f)},"~N,~N,~N,~N,~N");e(c$,"processTwoPointGesture",function(a){null!=this.selectedPanel&&this.selectedPanel.processTwoPointGesture(a)},"~A");e(c$,"getApplet",function(){return this.applet});e(c$,"startHoverWatcher",function(){},"~B");e(c$,"cacheFileByName",
function(){return 0},"~S,~B");e(c$,"cachePut",function(){},"~S,~O");e(c$,"openFileAsyncSpecial",function(){},"~S,~N");b(c$,"getHeight",function(){return this.dimScreen.height});b(c$,"getWidth",function(){return this.dimScreen.width});b(c$,"getPlatformInterface",function(a){return JSV.common.JSViewer.getInterface("JSV."+(this.isJS?"js2d.Js":"java.Awt")+a)},"~S");b(c$,"getDialogManager",function(){if(null!=this.dialogManager)return this.dialogManager;this.dialogManager=this.getPlatformInterface("DialogManager");
return this.dialogManager.set(this)});b(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.JDXSpectrum");b(c$,"show",function(a){this.getDialogManager();a.equals("properties")?
this.dialogManager.showProperties(null,this.pd().getSpectrum()):a.equals("errors")?this.dialogManager.showSourceErrors(null,this.currentSource):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.currentSource))},"~S");b(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(d){if(!y(d,Exception))throw d;}return new JSV.common.PrintLayout},"~B");b(c$,"setIRmode",function(a){this.irMode=a.equals("AtoT")?JSV.common.JDXSpectrum.IRMode.TO_TRANS:a.equals("TtoA")?JSV.common.JDXSpectrum.IRMode.TO_ABS:JSV.common.JDXSpectrum.IRMode.getMode(a)},"~S");b(c$,"getOptionFromDialog",function(a,b,d){this.getDialogManager().getOptionFromDialog(null,a,this.selectedPanel,b,d);return 0},"~A,~S,~S");b(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");b(c$,"$export",function(a,b){null==a&&(a="XY");var d=this.pd(),e=d.getNumberOfSpectraInCurrentSet();if(-1>b||b>=e)return"Maximum spectrum index (0-based) is "+(e-1)+".";d=0>b?d.getSpectrum():d.getSpectrumAt(b);try{return JSV.common.JSViewer.getInterface("JSV.export.Exporter").exportTheSpectrum(this,JSV.common.ExportType.getType(a),
null,d,0,d.getXYCoords().length-1,null)}catch(f){if(y(f,Exception))return System.out.println(f),null;throw f;}},"~S,~N");e(c$,"postByteArray",function(a,b){return JSV.common.JSVFileManager.postByteArray(a,b)},"~S,~A");b(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=b(c$,"getInterface",function(a){try{var b=Class.forName(a);return null==b?null:b.newInstance()}catch(d){if(y(d,Exception))return J.util.Logger.error("Interface.java Error creating instance for "+
a+": \n"+d),null;throw d;}},"~S");B(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,"noColor","255,255,255","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)});p("JSV.common");
q(["JSV.common.Annotation","$.Coordinate"],"JSV.common.Measurement",null,function(){c$=u(function(){this.pt2=null;this.value=0;t(this,arguments)},JSV.common,"Measurement",JSV.common.Annotation);N(c$,function(){this.pt2=new JSV.common.Coordinate});b(c$,"setM1",function(a,b,d){this.setA(a,b,d,"",!1,!1,0,6);this.setPt2(this.getXVal(),this.getYVal());return this},"~N,~N,JSV.common.JDXSpectrum");b(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});b(c$,"setPt2",function(a,b){this.spec=a;b&&this.setPt2(this.getXVal(),this.getYVal());return this},"JSV.common.JDXSpectrum,~B");b(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");b(c$,"getSpectrum",function(){return this.spec});b(c$,"setValue",function(a){this.value=a;this.text=this.spec.setMeasurementText(this)},
"~N");b(c$,"getValue",function(){return this.value});b(c$,"getXVal2",function(){return this.pt2.getXVal()});b(c$,"getYVal2",function(){return this.pt2.getYVal()});e(c$,"addSpecShift",function(a){this.setXVal(this.getXVal()+a);this.pt2.setXVal(this.pt2.getXVal()+a)},"~N");b(c$,"setYVal2",function(a){this.pt2.setYVal(a)},"~N");b(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");e(c$,"toString",
function(){return"["+this.getXVal()+","+this.pt2.getXVal()+"]"})});p("JSV.common");q(["JU.List","JSV.api.AnnotationData"],"JSV.common.MeasurementData",["JU.AU","$.DF","JSV.common.Annotation","$.Parameters"],function(){c$=u(function(){this.units=this.spec=this.type=null;this.precision=0;this.myParams=null;this.isON=!0;this.key=null;t(this,arguments)},JSV.common,"MeasurementData",JU.List,JSV.api.AnnotationData);w(c$,function(a,b){R(this,JSV.common.MeasurementData,[]);this.type=a;this.spec=b;this.myParams=
(new JSV.common.Parameters).setName("MeasurementData")},"JSV.common.Annotation.AType,JSV.common.JDXSpectrum");b(c$,"getMeasurements",function(){return this});e(c$,"getAType",function(){return this.type});e(c$,"getState",function(){return this.isON});e(c$,"setState",function(a){this.isON=a},"~B");b(c$,"setMeasurements",function(){},"JU.List");e(c$,"getParameters",function(){return this.myParams});b(c$,"getDataHeader",function(){return JSV.common.MeasurementData.HEADER});b(c$,"getMeasurementListArray",
function(a){this.units=a;var b=this.getMeasurementListArrayReal(a),d=this.spec.isNMR()?4:2;a=this.spec.isHNMR()&&a.equals("ppm")?4:2;for(var e=Array(this.size()),f=this.size();0<=--f;)e[f]=[""+(f+1),JU.DF.formatDecimalDbl(b[f][0],d),JU.DF.formatDecimalDbl(b[f][1],d),JU.DF.formatDecimalDbl(b[f][2],a)];return e},"~S");b(c$,"getMeasurementListArrayReal",function(a){a=this.spec.isNMR()&&a.equalsIgnoreCase("HZ");for(var b=JU.AU.newDouble2(this.size()),d=0,e=this.size();0<=--e;){var f=this.get(e).getValue();
a&&(f*=this.spec.observedFreq);b[d++]=[this.get(e).getXVal(),this.get(e).getXVal2(),f]}return b},"~S");c$.checkParameters=b(c$,"checkParameters",function(a,b){if(0==a.size())return!1;var d=a.getParameters();switch(a.getAType()){case JSV.common.Annotation.AType.PeakList:return b.peakListInterpolation.equals(d.peakListInterpolation)&&b.peakListThreshold==d.peakListThreshold}return!1},"JSV.common.MeasurementData,JSV.common.ColorParameters");e(c$,"getSpectrum",function(){return this.spec});e(c$,"getData",
function(){return this});b(c$,"clear",function(a,b){for(var d=this.size();0<=--d;){var e=this.get(d);(0==e.text.length||e.overlaps(a,b))&&this.remove(d)}},"~N,~N");e(c$,"setSpecShift",function(a){for(var b=this.size();0<=--b;){var d=this.get(b),e=d.getXVal()+a;d.setXVal(e);d.setValue(e);d.text=JU.DF.formatDecimalDbl(e,this.precision)}},"~N");e(c$,"getGraphSetKey",function(){return this.key});e(c$,"setGraphSetKey",function(a){this.key=a},"~S");e(c$,"isVisible",function(){return!0});b(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"]});p("JSV.common");q(["java.lang.Enum","javajs.api.EventManager","java.util.Hashtable","JU.List"],"JSV.common.PanelData","java.lang.Boolean $.Double javajs.awt.Font JU.CU JSV.api.JSVGraphics JSV.common.Annotation $.Coordinate $.GraphSet $.JDXSpectrum $.JSVFileManager $.JSVersion $.MeasurementData $.Parameters $.PeakPickEvent $.ScriptToken $.SubSpecChangeEvent $.ZoomEvent JSV.dialog.JSVDialog J.util.Logger".split(" "),
function(){c$=u(function(){this.graphSets=this.jsvp=this.options=this.currentGraphSet=this.listeners=this.viewer=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;t(this,arguments)},JSV.common,"PanelData",null,javajs.api.EventManager);N(c$,function(){this.listeners=new JU.List;this.options=new java.util.Hashtable});w(c$,function(a,b){this.viewer=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");b(c$,"addListener",function(a){this.listeners.contains(a)||this.listeners.addLast(a)},"JSV.api.PanelListener");b(c$,"getCurrentGraphSet",function(){return this.currentGraphSet});b(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});b(c$,"setViewTitle",function(a){this.viewTitle=a},"~S");b(c$,"getViewTitle",function(){return null==this.viewTitle?this.getTitle():this.viewTitle});b(c$,"getInfo",function(a,b){var d=new java.util.Hashtable,e=null;if(a)return this.currentGraphSet.getInfo(b,this.getCurrentSpectrumIndex());for(var f,e=this.options.entrySet().iterator();e.hasNext()&&((f=e.next())||1);)JSV.common.Parameters.putInfo(b,d,f.getKey().name(),f.getValue());
JSV.common.Parameters.putInfo(b,d,"type",this.getSpectrumAt(0).getDataType());JSV.common.Parameters.putInfo(b,d,"title",this.title);JSV.common.Parameters.putInfo(b,d,"nSets",Integer.$valueOf(this.graphSets.size()));e=new JU.List;for(f=this.graphSets.size();0<=--f;)e.addLast(this.graphSets.get(f).getInfo(b,-1));d.put("sets",e);return d},"~B,~S");b(c$,"setBooleans",function(a,b){if(null==b)for(var d,e=a.getBooleans().entrySet().iterator();e.hasNext()&&((d=e.next())||1);)this.setBooleans(a,d.getKey());
else this.setBoolean(b,a.getBoolean(b))},"JSV.common.Parameters,JSV.common.ScriptToken");b(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");b(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&&s(a,Boolean)&&a===Boolean.TRUE},"JSV.common.ScriptToken");b(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");b(c$,"getDisplay1D",function(){return this.display1D});b(c$,"initOne",function(a){this.spectra=new JU.List;this.spectra.addLast(a);this.initMany(this.spectra,
0,0)},"JSV.common.JDXSpectrum");b(c$,"initMany",function(a,b,d){this.startIndex=b;this.endIndex=d;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.List,~N,~N");b(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");b(c$,"findMatchingPeakInfo",function(a){for(var b=null,d=0;d<this.graphSets.size()&&null==(b=this.graphSets.get(d).findMatchingPeakInfo(a));d++);return b},"JSV.common.PeakInfo");b(c$,"integrateAll",function(a){for(var b=this.graphSets.size();0<=--b;)this.graphSets.get(b).integrate(-1,a)},"JSV.common.ColorParameters");b(c$,"getNumberOfGraphSets",
function(){return this.graphSets.size()});b(c$,"getTitle",function(){return this.title});b(c$,"refresh",function(){this.doReset=!0});b(c$,"addAnnotation",function(a){a=this.currentGraphSet.addAnnotation(a,this.getTitle());null!=a&&(this.title=a)},"JU.List");b(c$,"addPeakHighlight",function(a){for(var b=0;b<this.graphSets.size();b++)this.graphSets.get(b).addPeakHighlight(a)},"JSV.common.PeakInfo");b(c$,"selectPeakByFileIndex",function(a,b){var d=this.currentGraphSet.selectPeakByFileIndex(a,b);if(null==
d)for(var e=this.graphSets.size();0<=--e&&!(this.graphSets.get(e)!==this.currentGraphSet&&null!=(d=this.graphSets.get(e).selectPeakByFileIndex(a,b))););return d},"~S,~S");b(c$,"setPlotColors",function(a){for(var b=this.graphSets.size();0<=--b;)this.graphSets.get(b).setPlotColors(a)},"~A");b(c$,"selectSpectrum",function(a,b,d,e){e&&this.currentGraphSet.selectSpectrum(a,b,d);for(e=0;e<this.graphSets.size();e+=1)this.graphSets.get(e)!==this.currentGraphSet&&this.graphSets.get(e).selectSpectrum(a,b,d)},
"~S,~S,~S,~B");b(c$,"hasFileLoaded",function(a){for(var b=this.graphSets.size();0<=--b;)if(this.graphSets.get(b).hasFileLoaded(a))return!0;return!1},"~S");b(c$,"clearAllView",function(){for(var a=this.graphSets.size();0<=--a;)this.graphSets.get(a).clearViews()});b(c$,"drawGraph",function(a,b,d,e,f){var g;this.gMain=a;this.display1D=!this.isLinked&&this.getBoolean(JSV.common.ScriptToken.DISPLAY1D);var h=40,l=50,j=this.isPrinting||this.doReset||this.thisWidth!=d||this.thisHeight!=e;j&&(this.taintedAll=
!0);this.taintedAll&&this.g2d.fillBackground(a,this.bgcolor);b!==a&&(this.g2d.fillBackground(b,null),this.g2d.setStrokeBold(a,!1));this.isPrinting?(h*=3,l*=3,this.scalingFactor=10,g=!1):(this.scalingFactor=1,g=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=d;this.thisHeight=e;for(var k=this.graphSets.size();0<=--k;)this.graphSets.get(k).drawGraphSet(a,
b,d,e,this.left,this.right,h,l,j,this.taintedAll);this.titleOn&&(!this.titleDrawn&&this.taintedAll)&&this.drawTitle(a,e*this.scalingFactor,d*this.scalingFactor,this.getDrawTitle(this.isPrinting));g&&null!=this.coordStr&&this.drawCoordinates(b,h,this.thisWidth-this.right,h-20);f&&this.taintedAll&&(d=null!=this.commonFilePath?this.commonFilePath:1==this.graphSets.size()&&null!=this.currentGraphSet.getTitle(!0)?this.getSpectrum().getFilePath():null,null!=d&&this.printFilePath(a,this.left,e,d));this.isPrinting&&
this.printVersion(a,e);this.taintedAll=this.isPrinting||a===b},"~O,~O,~N,~N,~B");b(c$,"drawCoordinates",function(a,b,d,e){this.g2d.setGraphicsColor(a,this.coordinatesColor);b=this.setFont(a,this.jsvp.getWidth(),0,12,!0);this.g2d.drawString(a,this.coordStr,d-b.stringWidth(this.coordStr),e)},"~O,~N,~N,~N");b(c$,"setFont",function(a,b,d,e,f){return this.g2d.setFont(a,this.getFont(a,b,d,e,f))},"~O,~N,~N,~N,~B");b(c$,"printFilePath",function(a,b,d,e){b*=this.scalingFactor;d*=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 f=this.setFont(a,1E3,0,9,!0);b!=this.left*this.scalingFactor&&(b-=f.stringWidth(e));this.g2d.drawString(a,e,b,d-f.getHeight())},"~O,~N,~N,~S");b(c$,"printVersion",function(a,b){this.g2d.setGraphicsColor(a,this.BLACK);var d=this.setFont(a,100,0,12,!0),e=this.jsvp.getApiPlatform().getDateFormat(!1)+" JSpecView "+JSV.common.JSVersion.VERSION_SHORT,f=d.stringWidth(e);
this.g2d.drawString(a,e,(this.thisWidth-this.right)*this.scalingFactor-f,b*this.scalingFactor-3*d.getHeight())},"~O,~N");b(c$,"drawTitle",function(a,b,d,e){e=e.$replace("\n"," ");var f=this.getFont(a,d,this.isPrinting||this.getBoolean(JSV.common.ScriptToken.TITLEBOLDON)?1:0,14,!0),g=f.stringWidth(e);g>d&&(f=m(14*d/g),10>f&&(f=10),f=this.getFont(a,d,this.isPrinting||this.getBoolean(JSV.common.ScriptToken.TITLEBOLDON)?1:0,f,!0));this.g2d.setGraphicsColor(a,this.titleColor);this.setCurrentFont(this.g2d.setFont(a,
f));this.g2d.drawString(a,e,this.isPrinting?this.left*this.scalingFactor:5,b-m(f.getHeight()*(this.isPrinting?2:0.5)))},"~O,~N,~N,~S");b(c$,"setCurrentFont",function(a){this.currentFont=a},"javajs.awt.Font");b(c$,"getFontHeight",function(){return this.currentFont.getAscent()});b(c$,"getStringWidth",function(a){return this.currentFont.stringWidth(a)},"~S");b(c$,"selectFromEntireSet",function(a){for(var b=0,d=0;b<this.graphSets.size();b++)if(-2147483648==a)this.graphSets.get(b).setSelected(-1);else for(var e=
this.graphSets.get(b).spectra,f=0;f<e.size();f++,d++)(0>a||a==d)&&this.graphSets.get(b).setSelected(f)},"~N");b(c$,"addToList",function(a,b){for(var d=0;d<this.spectra.size();d++)(0>a||d==a)&&b.addLast(this.spectra.get(d))},"~N,JU.List");b(c$,"scaleSelectedBy",function(a){for(var b=this.graphSets.size();0<=--b;)this.graphSets.get(b).scaleSelectedBy(a)},"~N");b(c$,"setCurrentGraphSet",function(a,b,d){b=a.getSplitPoint(b);var e=this.currentGraphSet!==a,f=e||this.currentSplitPoint!=b;this.currentGraphSet=
a;this.currentSplitPoint=b;(e||1<a.nSplit&&f)&&this.setSpectrum(this.currentSplitPoint,!0);if(!e&&(e=a.checkSpectrumClickedEvent(this.mouseX,this.mouseY,d),!e))return;(e||1<a.nSplit&&f)&&this.setSpectrum(this.currentSplitPoint,!0);a=a.getSpectrum();this.notifySubSpectrumChange(a.getSubIndex(),a)},"JSV.common.GraphSet,~N,~N");b(c$,"splitStack",function(a){this.currentGraphSet.splitStack(this.graphSets,a)},"~B");b(c$,"getNumberOfSpectraInCurrentSet",function(){return this.currentGraphSet.nSpectra});
b(c$,"getStartingPointIndex",function(a){return this.currentGraphSet.viewData.getStartingPointIndex(a)},"~N");b(c$,"getEndingPointIndex",function(a){return this.currentGraphSet.viewData.getEndingPointIndex(a)},"~N");b(c$,"haveSelectedSpectrum",function(){return this.currentGraphSet.haveSelectedSpectrum()});b(c$,"getShowAnnotation",function(a){return this.currentGraphSet.getShowAnnotation(a,-1)},"JSV.common.Annotation.AType");b(c$,"showAnnotation",function(a,b){this.currentGraphSet.setShowAnnotation(a,
b)},"JSV.common.Annotation.AType,Boolean");b(c$,"setYStackOffsetPercent",function(a){this.currentGraphSet.yStackOffsetPercent=a},"~N");b(c$,"setSpectrum",function(a,b){this.currentGraphSet.setSpectrum(a,b)},"~N,~B");b(c$,"getSpectrum",function(){return this.currentGraphSet.getSpectrum()});b(c$,"setSpectrum",function(a){this.taintedAll=!0;var b=this.currentGraphSet.getSpectrum();this.currentGraphSet.setSpectrumJDX(a);for(var d=0;d<this.spectra.size();d++)this.spectra.get(d)===b&&this.spectra.set(d,
a)},"JSV.common.JDXSpectrum");b(c$,"isShowAllStacked",function(){return this.currentGraphSet.showAllStacked});b(c$,"getCurrentSpectrumIndex",function(){return this.currentGraphSet.getCurrentSpectrumIndex()});b(c$,"getSpectrumAt",function(a){return this.currentGraphSet.getSpectrumAt(a)},"~N");b(c$,"addHighlight",function(a,b,d,e,f,g,h,l){(null==a?this.currentGraphSet:a).addHighlight(b,d,e,this.g2d.getColor4(f,g,h,l))},"JSV.common.GraphSet,~N,~N,JSV.common.JDXSpectrum,~N,~N,~N,~N");b(c$,"removeHighlight",
function(a,b){this.currentGraphSet.removeHighlight(a,b)},"~N,~N");b(c$,"removeAllHighlights",function(){this.currentGraphSet.removeAllHighlights()});b(c$,"setZoom",function(a,b,d,e){this.currentGraphSet.setZoom(a,b,d,e);this.taintedAll=this.doReset=!0;this.notifyListeners(new JSV.common.ZoomEvent(a,b,d,e))},"~N,~N,~N,~N");b(c$,"resetView",function(){this.currentGraphSet.resetView()});b(c$,"previousView",function(){this.currentGraphSet.previousView()});b(c$,"nextView",function(){this.currentGraphSet.nextView()});
b(c$,"getSelectedIntegral",function(){return this.currentGraphSet.getSelectedIntegral()});b(c$,"advanceSubSpectrum",function(a){this.currentGraphSet.advanceSubSpectrum(a)},"~N");b(c$,"setSelectedIntegral",function(a){this.currentGraphSet.setSelectedIntegral(a)},"~N");b(c$,"scaleYBy",function(a){this.currentGraphSet.scaleYBy(a)},"~N");b(c$,"toPeak",function(a){this.currentGraphSet.toPeak(a)},"~N");b(c$,"getClickedCoordinate",function(){return this.coordClicked});b(c$,"getPickedCoordinates",function(a,
b){return JSV.common.Coordinate.getPickedCoordinates(this.coordsClicked,this.coordClicked,a,b)},"JSV.common.Coordinate,JSV.common.Coordinate");b(c$,"shiftSpectrum",function(a,b){return this.currentGraphSet.shiftSpectrum(a,b)},"~N,~N");b(c$,"findX",function(a,b){this.currentGraphSet.setXPointer(a,b)},"JSV.common.JDXSpectrum,~N");b(c$,"setXPointers",function(a,b,d,e){this.currentGraphSet.setXPointer(a,b);this.currentGraphSet.setXPointer2(d,e)},"JSV.common.JDXSpectrum,~N,JSV.common.JDXSpectrum,~N");
b(c$,"isCurrentGraphSet",function(a){return a===this.currentGraphSet},"JSV.common.GraphSet");b(c$,"repaint",function(){this.jsvp.doRepaint(!1)});b(c$,"setToolTipText",function(a){this.jsvp.setToolTipText(a)},"~S");b(c$,"setHighlightColor",function(a){this.jsvp.getPanelData().setColor(JSV.common.ScriptToken.HIGHLIGHTCOLOR,a)},"javajs.api.GenericColor");b(c$,"getInput",function(a,b,d){return this.jsvp.getInput(a,b,d)},"~S,~S,~S");b(c$,"getFont",function(a,b,d,e,f){e*=this.scalingFactor;f?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,d,e,e,this.jsvp.getApiPlatform(),a)},"~O,~N,~N,~N,~B");b(c$,"notifySubSpectrumChange",function(a,b){this.notifyListeners(new JSV.common.SubSpecChangeEvent(a,null==b?null:b.getTitleLabel()))},"~N,JSV.common.JDXSpectrum");b(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");b(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");b(c$,"escapeKeyPressed",function(a){this.currentGraphSet.escapeKeyPressed(a)},"~B");b(c$,"hasFocus",function(){return this.jsvp.hasFocus()});b(c$,"isMouseUp",function(){return this.mouseState===JSV.common.PanelData.Mouse.UP});
b(c$,"doMouseMoved",function(a,b){this.mouseX=a;this.mouseY=b;this.mouseState=JSV.common.PanelData.Mouse.UP;this.clickCount=0;var d=JSV.common.GraphSet.findGraphSet(this.graphSets,a,b);null!=d&&d.mouseMovedEvent(a,b)},"~N,~N");b(c$,"doMousePressed",function(a,b){this.mouseState=JSV.common.PanelData.Mouse.DOWN;var d=JSV.common.GraphSet.findGraphSet(this.graphSets,a,b);null!=d&&(this.setCurrentGraphSet(d,b,0),this.clickCount=++this.clickCount%3,d.checkWidgetEvent(a,b,!0))},"~N,~N");b(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");b(c$,"doMouseReleased",function(a,b,d){this.mouseState=JSV.common.PanelData.Mouse.UP;!(null==this.thisWidget&&null==this.currentGraphSet.pendingMeasurement)&&d&&(this.currentGraphSet.mouseReleasedEvent(a,
b),this.thisWidget=null,this.isIntegralDrag=!1,this.integralShiftMode=0)},"~N,~N,~B");b(c$,"doMouseClicked",function(a,b,d){var e=JSV.common.GraphSet.findGraphSet(this.graphSets,a,b);null!=e&&(this.setCurrentGraphSet(e,b,this.clickCount),e.mouseClickedEvent(a,b,this.clickCount,d),this.repaint())},"~N,~N,~B");b(c$,"hasCurrentMeasurements",function(a){return this.currentGraphSet.hasCurrentMeasurement(a)},"JSV.common.Annotation.AType");b(c$,"getDialog",function(a){return this.currentGraphSet.getDialog(a,
-1)},"JSV.common.Annotation.AType");b(c$,"addDialog",function(a,b,d){this.currentGraphSet.addDialog(a,b,d)},"~N,JSV.common.Annotation.AType,JSV.api.AnnotationData");b(c$,"getPeakListing",function(a,b){null!=a&&this.currentGraphSet.getPeakListing(-1,a,!0);this.currentGraphSet.setPeakListing(b)},"JSV.common.Parameters,Boolean");b(c$,"checkIntegral",function(a,b){this.currentGraphSet.checkIntegral(a,b)},"JSV.common.Parameters,~S");b(c$,"setIntegrationRatios",function(a){this.currentGraphSet.setIntegrationRatios(a)},
"~S");b(c$,"getView",function(){return this.currentGraphSet.getCurrentView()});b(c$,"closeAllDialogsExcept",function(a){for(var b=this.graphSets.size();0<=--b;)this.graphSets.get(b).closeDialogsExcept(a)},"JSV.common.Annotation.AType");b(c$,"removeDialog",function(a){this.currentGraphSet.removeDialog(a)},"JSV.dialog.JSVDialog");b(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(d){if(!y(d,Exception))throw d;}}});b(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");b(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());return b},"~B");b(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");b(c$,"doZoomLinked",function(a,b,d,e,f,g){if(!this.linking){this.linking=!0;for(var h=a.getSpectrumAt(0),l=this.graphSets.size();0<=--l;){var j=this.graphSets.get(l);j!==a&&JSV.common.JDXSpectrum.areXScalesCompatible(h,this.graphSets.get(l).getSpectrumAt(0),!1,!0)&&j.doZoom(b,0,d,0,g,!1,f,!1,e)}this.linking=!1}},"JSV.common.GraphSet,~N,~N,~B,~B,~B");b(c$,"clearLinkViews",function(a){if(!this.linking){this.linking=
!0;for(var b=a.getSpectrum(),d=this.graphSets.size();0<=--d;){var e=this.graphSets.get(d);e!==a&&JSV.common.JDXSpectrum.areXScalesCompatible(b,this.graphSets.get(d).getSpectrum(),!1,!0)&&e.clearViews()}this.linking=!1}},"JSV.common.GraphSet");b(c$,"setlinkedXMove",function(a,b,d){if(!this.linking){this.linking=!0;for(var e=a.getSpectrum(),f=this.graphSets.size();0<=--f;){var g=this.graphSets.get(f);g!==a&&JSV.common.JDXSpectrum.areXScalesCompatible(e,this.graphSets.get(f).getSpectrum(),!1,!0)&&null==
g.imageView&&(d?g.setXPixelMovedTo(1.7976931348623157E308,b,0,0):g.setXPixelMovedTo(b,1.7976931348623157E308,0,0))}this.linking=!1}},"JSV.common.GraphSet,~N,~B");b(c$,"set2DCrossHairsLinked",function(a,b,d,e){0.1>Math.abs(b-d)&&(b=d=1.7976931348623157E308);for(var f=this.graphSets.size();0<=--f;){var g=this.graphSets.get(f);g!==a&&g.set2DXY(b,d,e)}},"JSV.common.GraphSet,~N,~N,~B");b(c$,"dialogsToFront",function(){this.currentGraphSet.dialogsToFront()});b(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 d=this.graphSets.size();0<=--d;)this.graphSets.get(d).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:J.util.Logger.warn("AwtPanel --- unrecognized color: "+a)}},"JSV.common.ScriptToken,javajs.api.GenericColor");b(c$,"getColor",function(a){switch(a){default:return J.util.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");b(c$,"getOverlayLegendData",function(){for(var a=this.currentGraphSet.nSpectra,b=Array(a),d=this.getSpectrumAt(0).getFilePath(),e=this.getSpectrumAt(a-1).getFilePath(),d=!d.equals(e),e=0;e<a;e++){var f=Array(3),g=this.getSpectrumAt(e);this.title=g.getTitle();d&&(this.title=JSV.common.JSVFileManager.getName(g.getFilePath())+" - "+this.title);g=this.getCurrentPlotColor(e);f[0]=new Integer(e+1);f[1]=g;f[2]=" "+
this.title;b[e]=f}return b});b(c$,"setColorOrFont",function(a,b){if(null==b){for(var d,e=a.elementColors.entrySet().iterator();e.hasNext()&&((d=e.next())||1);)this.setColorOrFont(a,d.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");b(c$,"getCurrentPlotColor",function(a){return this.currentGraphSet.getPlotColor(a)},"~N");b(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");b(c$,"showDialog",function(a){var b=this.getDialog(a);this.closeAllDialogsExcept(a);if(null!=b&&s(b,JSV.dialog.JSVDialog))return b.reEnable();var d=this.getCurrentSpectrumIndex();if(0>d)return this.jsvp.showMessage("To enable "+a+" first select a spectrum by clicking on it.",
""+a),null;var e=this.getSpectrum(),f=this.viewer.getDialog(a,e);null==b&&a===JSV.common.Annotation.AType.Measurements&&(b=new JSV.common.MeasurementData(JSV.common.Annotation.AType.Measurements,e));null!=b&&f.setData(b);this.addDialog(d,a,f);f.reEnable();return f},"JSV.common.Annotation.AType");b(c$,"printPdf",function(a,b){var d=!b.layout.equals("landscape");this.print(a,d?b.imageableHeight:b.imageableWidth,d?b.imageableWidth:b.imageableHeight,b.imageableX,b.imageableY,b.paperHeight,b.paperWidth,
d,0)},"JSV.api.JSVGraphics,JSV.common.PrintLayout");b(c$,"print",function(a,b,d,e,f,g,h,l,j){this.g2d=this.g2d0;if(0==j)return this.isPrinting=!0,j=!1,s(a,JSV.api.JSVGraphics)&&(this.g2d=a,a=this.gMain),this.printGraphPosition.equals("default")?l?(b=450,d=280):(b=280,d=450):this.printGraphPosition.equals("fit to page")?j=!0:l?(b=450,d=280,e=m(m(h-d)/2),f=m(m(g-b)/2)):(b=280,d=450,f=m(m(h-280)/2),e=m(m(g-450)/2)),this.g2d.translateScale(a,e,f,0.1),this.taintedAll=!0,this.drawGraph(a,a,m(d),m(b),j),
this.isPrinting=!1,0;this.isPrinting=!1;return 1},"~O,~N,~N,~N,~N,~N,~N,~B,~N");e(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 d=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:d=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:d=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!=d&&(this.scaleYBy(d),this.repaint());return e},"~N,~N");e(c$,"keyReleased",function(a){this.isPrinting||this.checkKeyControl(a,!1)},"~N");e(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");e(c$,"mouseAction",function(a,b,d,e,f,g){if(!this.isPrinting)switch(a){case 4:if(!this.checkMod(g,16))break;this.doMousePressed(d,e);break;case 5:this.doMouseReleased(d,e,this.checkMod(g,16));this.repaint();break;case 1:this.doMouseDragged(d,e);
this.repaint();break;case 0:this.jsvp.getFocusNow(!1);if(0!=(g&28)){this.doMouseDragged(d,e);this.repaint();break}this.doMouseMoved(d,e);null!=this.coordStr&&this.repaint();break;case 2:if(this.checkMod(g,4)){this.viewer.showMenu(d,e);break}this.ctrlPressed=!1;this.doMouseClicked(d,e,this.updateControlPressed(g))}},"~N,~N,~N,~N,~N,~N");b(c$,"checkMod",function(a,b){return(a&b)==b},"~N,~N");b(c$,"checkKeyControl",function(a,b){switch(a){case 17:case 157:this.ctrlPressed=b;break;case 16:this.shiftPressed=
b}},"~N,~B");b(c$,"updateControlPressed",function(a){return this.ctrlPressed=(new Boolean(this.ctrlPressed|(this.checkMod(a,2)||this.checkMod(a,20)))).valueOf()},"~N");e(c$,"mouseEnterExit",function(a,b,d,e){e?(this.thisWidget=null,this.isIntegralDrag=!1,this.integralShiftMode=0):this.jsvp.getFocusNow(!1)},"~N,~N,~N,~B");aa();c$=G(JSV.common.PanelData,"LinkMode",Enum);c$.getMode=b(c$,"getMode",function(a){if(a.equals("*"))return JSV.common.PanelData.LinkMode.ALL;for(var b,d=0,e=JSV.common.PanelData.LinkMode.values();d<
e.length&&((b=e[d])||1);d++)if(b.name().equalsIgnoreCase(a))return b;return JSV.common.PanelData.LinkMode.NONE},"~S");r(c$,"ALL",0,[]);r(c$,"NONE",1,[]);r(c$,"AB",2,[]);r(c$,"ABC",3,[]);c$=$();aa();c$=G(JSV.common.PanelData,"Mouse",Enum);r(c$,"UP",0,[]);r(c$,"DOWN",1,[]);c$=$();B(c$,"defaultPrintHeight",450,"defaultPrintWidth",280,"topMargin",40,"bottomMargin",50,"leftMargin",60,"rightMargin",50)});p("JSV.common");q(null,"JSV.common.PanelNode",["JU.SB","JSV.common.Parameters"],function(){c$=u(function(){this.legend=
this.id=this.jsvp=this.fileName=this.source=this.treeNode=null;this.isView=this.isSelected=!1;this.frameTitle=null;t(this,arguments)},JSV.common,"PanelNode");w(c$,function(a,b,d,e){this.id=a;this.source=d;this.fileName=b;this.jsvp=e;null!=e&&(e.getPanelData().getSpectrumAt(0).setId(a),this.frameTitle=e.getTitle())},"~S,~S,JSV.source.JDXSource,JSV.api.JSVPanel");b(c$,"setTreeNode",function(a){this.treeNode=a},"JSV.api.JSVTreeNode");b(c$,"getTreeNode",function(){return this.treeNode});b(c$,"dispose",
function(){this.source.dispose();null!=this.jsvp&&this.jsvp.dispose();this.legend=this.jsvp=this.source=null});b(c$,"getSpectrum",function(){return this.jsvp.getPanelData().getSpectrum()});b(c$,"setLegend",function(a){null!=this.legend&&this.legend.dispose();return this.legend=a},"JSV.dialog.JSVDialog");e(c$,"toString",function(){return(null==this.id?"":this.id+": ")+(null==this.frameTitle?this.fileName:this.frameTitle)});c$.findSourceByNameOrId=b(c$,"findSourceByNameOrId",function(a,b){for(var d=
b.size();0<=--d;){var e=b.get(d);if(a.equals(e.id)||a.equalsIgnoreCase(e.source.getFilePath()))return e.source}for(d=b.size();0<=--d;)if(e=b.get(d),a.equals(e.fileName))return e.source;return null},"~S,JU.List");c$.findNodeById=b(c$,"findNodeById",function(a,b){for(var d=b.size();0<=--d;)if(a.equals(b.get(d).id))return b.get(d);return null},"~S,JU.List");c$.findNode=b(c$,"findNode",function(a,b){for(var d=b.size();0<=--d;)if(b.get(d).jsvp===a)return b.get(d);return null},"JSV.api.JSVPanel,JU.List");
c$.getSpectrumListAsString=b(c$,"getSpectrumListAsString",function(a){for(var b=new JU.SB,d=0;d<a.size();d++){var e=a.get(d).id;b.append(" ").append(e)}return b.toString().trim()},"JU.List");c$.isOpen=b(c$,"isOpen",function(a,b){if(null!=b)for(var d=a.size();0<=--d;)if(b.equals(a.get(d).source.getFilePath())||b.equals(a.get(d).frameTitle))return!0;return!1},"JU.List,~S");b(c$,"setFrameTitle",function(a){this.frameTitle=a},"~S");c$.getLastFileFirstNode=b(c$,"getLastFileFirstNode",function(a){for(var b=
a.size(),d=0==b?null:a.get(b-1),b=b-1;0<=--b&&a.get(b).source===d.source;)d=a.get(b);return null==d?null:d.jsvp},"JU.List");b(c$,"getInfo",function(a){var b=this.jsvp.getPanelData().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")});p("JSV.common");q(null,"JSV.common.Parameters",["java.lang.Boolean","java.util.Hashtable","JSV.common.ScriptToken"],
function(){c$=u(function(){this.name=null;this.integralMinY=0.1;this.integralRange=50;this.integralOffset=30;this.integralDrawAll=!1;this.peakListThreshold=NaN;this.peakListInterpolation="parabolic";this.precision=2;this.htBooleans=null;t(this,arguments)},JSV.common,"Parameters");w(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)});b(c$,"setName",function(a){this.name=a;return this},"~S");b(c$,"getBooleans",function(){return this.htBooleans});b(c$,"setBoolean",function(a,b){this.htBooleans.put(a,Boolean.$valueOf(b));return b},"JSV.common.ScriptToken,~B");b(c$,"getBoolean",
function(a){return Boolean.TRUE===this.htBooleans.get(a)},"JSV.common.ScriptToken");c$.isTrue=b(c$,"isTrue",function(a){return 0==a.length||Boolean.parseBoolean(a)},"~S");c$.getTFToggle=b(c$,"getTFToggle",function(a){return a.equalsIgnoreCase("TOGGLE")?null:JSV.common.Parameters.isTrue(a)?Boolean.TRUE:Boolean.FALSE},"~S");b(c$,"setP",function(a,b,d){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:d=
JSV.common.Parameters.getTFToggle(d);if(null!=d){this.setBoolean(b,d.booleanValue());break}if(null==a)return;d=!a.getBoolean(b);switch(b){case JSV.common.ScriptToken.XSCALEON:this.setBoolean(JSV.common.ScriptToken.XUNITSON,d);a.setBoolean(JSV.common.ScriptToken.XUNITSON,d);break;case JSV.common.ScriptToken.YSCALEON:this.setBoolean(JSV.common.ScriptToken.YUNITSON,d),a.setBoolean(JSV.common.ScriptToken.YUNITSON,d)}this.setBoolean(b,d)}null!=a&&a.setBooleans(this,b)},"JSV.common.PanelData,JSV.common.ScriptToken,~S");
c$.isMatch=b(c$,"isMatch",function(a,b){return null==a||b.equalsIgnoreCase(a)},"~S,~S");c$.putInfo=b(c$,"putInfo",function(a,b,d,e){null!=e&&JSV.common.Parameters.isMatch(a,d)&&b.put(null==a?d:a,e)},"~S,java.util.Map,~S,~O")});p("JSV.common");q(["JSV.common.MeasurementData"],"JSV.common.PeakData",["java.lang.Double","JU.DF","JSV.common.Coordinate","$.PeakPick"],function(){c$=u(function(){this.maxY=this.minY=this.thresh=0;t(this,arguments)},JSV.common,"PeakData",JSV.common.MeasurementData);b(c$,"getThresh",
function(){return this.thresh});e(c$,"getDataHeader",function(){return this.spec.isHNMR()?JSV.common.PeakData.HNMR_HEADER:["peak",this.spec.getXUnits(),this.spec.getYUnits()]});e(c$,"getMeasurementListArray",function(){for(var a=Array(this.size()),b=[-1E100,1E100,1E100],d,e=0,f=this.size();0<=--f;e++)d=this.spec.getPeakListArray(this.get(f),b,this.maxY),a[e]=2==d.length?[""+(e+1),JU.DF.formatDecimalDbl(d[0],2),JU.DF.formatDecimalDbl(d[1],4)]:[""+(e+1),JU.DF.formatDecimalDbl(d[0],4),JU.DF.formatDecimalDbl(d[1],
4),JU.DF.formatDecimalDbl(d[2],2),0==d[3]?"":JU.DF.formatDecimalDbl(d[3],2),0==d[4]?"":JU.DF.formatDecimalDbl(d[4],2),0==d[5]?"":JU.DF.formatDecimalDbl(d[5],2)];return a},"~S");e(c$,"getMeasurementListArrayReal",function(){for(var a=sa(this.size(),0),b=[-1E100,1E100,1E100],d=0,e=this.size();0<=--e;d++)a[d]=this.spec.getPeakListArray(this.get(e),b,this.maxY);return a},"~S");b(c$,"getInfo",function(a){a.put("interpolation",this.myParams.peakListInterpolation);a.put("threshold",Double.$valueOf(this.myParams.peakListThreshold));
na(this,JSV.common.PeakData,"getInfo",[a])},"java.util.Map");b(c$,"setPeakList",function(a,b,d){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 f=this.spec.isInverted();this.minY=d.minYOnScale;this.maxY=d.maxYOnScale;var g=d.minXOnScale;
d=d.maxXOnScale;this.thresh=this.myParams.peakListThreshold;Double.isNaN(this.thresh)&&(this.thresh=this.myParams.peakListThreshold=(this.minY+this.maxY)/2);var h=0,l=[e[0].getYVal(),h=e[1].getYVal(),0],j=0;if(f)for(f=2;f<e.length;f++){var k=l[f%3]=e[f].getYVal();if(h<this.thresh&&(l[(f-2)%3]>h&&h<k)&&(h=a?JSV.common.Coordinate.parabolicInterpolation(e,f-1):e[f-1].getXVal(),h>=g||h<=d))if(h=(new JSV.common.PeakPick).setValue(h,k,this.spec,null,0),this.addLast(h),100==++j)break;h=k}else for(f=2;f<
e.length;f++){k=l[f%3]=e[f].getYVal();if(h>this.thresh&&(l[(f-2)%3]<h&&h>k)&&(h=a?JSV.common.Coordinate.parabolicInterpolation(e,f-1):e[f-1].getXVal(),h>=g&&h<=d&&(h=(new JSV.common.PeakPick).setValue(h,k,this.spec,JU.DF.formatDecimalDbl(h,b),h),this.addLast(h),100==++j)))break;h=k}}},"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(" ")});p("JSV.common");q(null,"JSV.common.PeakInfo",["JU.PT"],function(){c$=
u(function(){this.px1=this.px0=this.yMax=this.yMin=this.xMax=this.xMin=0;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;t(this,arguments)},JSV.common,"PeakInfo");w(c$,function(){});w(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.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");b(c$,"isClearAll",function(){return null==this.spectrum});b(c$,"getType",function(){return this.type});b(c$,"getAtoms",function(){return this.atoms});
b(c$,"getXMax",function(){return this.xMax});b(c$,"getXMin",function(){return this.xMin});b(c$,"getYMin",function(){return this.yMin});b(c$,"getYMax",function(){return this.yMax});b(c$,"getX",function(){return(this.xMax+this.xMin)/2});b(c$,"getMatch",function(){return this._match});c$.fixType=b(c$,"fixType",function(a){return a.equals("HNMR")?"1HNMR":a.equals("CNMR")?"13CNMR":a},"~S");e(c$,"toString",function(){return this.stringInfo});b(c$,"getIndex",function(){return this.index});b(c$,"getTitle",
function(){return this.title});b(c$,"checkFileIndex",function(a,b){return b.equals(this.index)&&(a.equals(this.file)||a.equals(this.filePathForwardSlash))},"~S,~S");b(c$,"checkFileTypeModel",function(a,b,d){return a.equals(this.file)&&this.checkModel(d)&&this.type.endsWith(b)},"~S,~S,~S");b(c$,"checkTypeModel",function(a,b){return this.checkType(a)&&this.checkModel(b)},"~S,~S");b(c$,"checkModel",function(a){return null!=a&&a.equals(this.model)},"~S");b(c$,"checkType",function(a){return a.endsWith(this.type)},
"~S");b(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");b(c$,"checkId",function(a){return null!=this.id&&null!=a&&a.toUpperCase().startsWith("ID=")&&a.substring(3).equals(this.id)},"~S");b(c$,"getModel",function(){return this.model});b(c$,"getFilePath",function(){return this.file});b(c$,"autoSelectOnLoad",function(){return this.type.startsWith("GC")});b(c$,"setPixelRange",
function(a,b){this.px0=a;this.px1=b},"~N,~N");b(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");b(c$,"getXPixel",function(){return m((this.px0+this.px1)/2)});c$.nullPeakInfo=c$.prototype.nullPeakInfo=new JSV.common.PeakInfo});p("JSV.common");q(["JSV.common.Measurement"],"JSV.common.PeakPick",null,function(){c$=G(JSV.common,"PeakPick",JSV.common.Measurement);b(c$,"setValue",function(a,b,d,e,f){null==e?(this.set(a,
b),this.setPt2(d,!1)):(this.setA(a,b,d,e,!1,!1,0,6),this.value=f,this.setPt2(this.getXVal(),this.getYVal()));return this},"~N,~N,JSV.common.JDXSpectrum,~S,~N")});p("JSV.common");q(["java.util.EventObject"],"JSV.common.PeakPickEvent",null,function(){c$=u(function(){this.peakInfo=this.coord=null;t(this,arguments)},JSV.common,"PeakPickEvent",java.util.EventObject);w(c$,function(a,b,d){R(this,JSV.common.PeakPickEvent,[a]);this.coord=b;this.peakInfo=null==d?null:d},"~O,JSV.common.Coordinate,JSV.common.PeakInfo");
b(c$,"getCoord",function(){return this.coord});b(c$,"getPeakInfo",function(){return this.peakInfo});e(c$,"toString",function(){return null==this.peakInfo?null:this.peakInfo.toString()})});p("JSV.common");q(["JSV.common.Coordinate","$.ScriptToken"],"JSV.common.PlotWidget",null,function(){c$=u(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;t(this,arguments)},
JSV.common,"PlotWidget",JSV.common.Coordinate);N(c$,function(){this.color=JSV.common.ScriptToken.PLOTCOLOR});e(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)});w(c$,function(a){R(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");b(c$,"selected",function(a,b){return this.isVisible&&5>Math.abs(a-this.xPixel0)&&5>Math.abs(b-this.yPixel0)},"~N,~N");b(c$,"setX",function(a,b){this.setXVal(a);this.xPixel0=this.xPixel1=b},"~N,~N");b(c$,"setY",function(a,b){this.setYVal(a);this.yPixel0=this.yPixel1=b},"~N,~N");b(c$,"getValue",function(){return this.isXtype?this.getXVal():this.getYVal()});b(c$,"setEnabled",function(a){this.isEnabled=a},"~B")});p("JSV.common");c$=u(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;t(this,arguments)},JSV.common,"PrintLayout");N(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});
p("JSV.common");c$=u(function(){this.repaintPending=!1;this.viewer=null;this.n=0;t(this,arguments)},JSV.common,"RepaintManager");w(c$,function(a){this.viewer=a},"JSV.common.JSViewer");b(c$,"refresh",function(){this.n++;if(this.repaintPending)return System.out.println("Repaint "+this.n+" skipped"),!1;this.repaintPending=!0;this.viewer.selectedPanel.getPanelData().taintedAll=!0;"undefined"!=typeof Jmol&&(Jmol._repaint&&this.viewer.applet)&&Jmol._repaint(this.viewer.applet,!1);this.repaintDone();return!0});
b(c$,"repaintDone",function(){this.repaintPending=!1;this.notify()});p("JSV.common");q(null,"JSV.common.ScaleData",["java.lang.Double","JSV.common.Coordinate"],function(){c$=u(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;t(this,arguments)},JSV.common,"ScaleData");N(c$,function(){this.precision=D(2,0);this.exportPrecision=D(2,0);this.steps=sa(2,0);this.minorTickCounts=D(2,0)});w(c$,function(){});w(c$,function(a,b){this.startDataPointIndex=a;this.endDataPointIndex=b;this.pointCount=this.endDataPointIndex-this.startDataPointIndex+
1},"~N,~N");w(c$,function(a,b,d,e,f){this.minX=JSV.common.Coordinate.getMinX(a,b,d);this.maxX=JSV.common.Coordinate.getMaxX(a,b,d);this.minY=JSV.common.Coordinate.getMinY(a,b,d);0<this.minY&&!e&&(this.minY=0);this.maxY=JSV.common.Coordinate.getMaxY(a,b,d);this.setScale(e,f)},"~A,~N,~N,~B,~B");b(c$,"setScale",function(a,b){this.setXScale();a||(this.maxXOnScale+=this.steps[0]/2);this.setYScale(this.minY,this.maxY,!0,b)},"~B,~B");b(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});b(c$,"isYZeroOnScale",function(){return this.minYOnScale<this.spectrumYRef&&this.maxYOnScale>this.spectrumYRef});b(c$,"setYScale",function(a,b,d,e){0==a&&0==b&&(b=1);this.isShiftZoomedY&&(a=this.minYOnScale,b=this.maxYOnScale);var f=this.setScaleParams(a,b,1),g=e?f/2:f/4;e=e?f/4:f/2;this.isShiftZoomedY||(this.minYOnScale=0==a?0:d?g*Math.floor(a/
g):a,this.maxYOnScale=d?e*Math.ceil(1.05*b/e):b);this.firstY=0==a?0:Math.floor(a/g)*g;if(0>this.minYOnScale&&0<this.maxYOnScale)for(this.firstY=0;this.firstY-f>this.minYOnScale;)this.firstY-=f;else 0!=this.minYOnScale&&1E-4<Math.abs((a-this.firstY)/g)&&(this.firstY+=g);d&&(this.initMinYOnScale=this.minYOnScale,this.initMaxYOnScale=this.maxYOnScale,this.initMinY=a,this.initMaxY=b)},"~N,~N,~B,~B");b(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");b(c$,"setXRange",function(a,b){this.minX=a;this.maxX=b;this.setXScale()},"~N,~N");c$.getXRange=b(c$,"getXRange",function(a,b,d,e,f,g,h,l){for(var j=0,k=0,j=f;j<=g;j++)if(f=b[j].getXVal(),f>=d){h[a]=j;break}for(;j<=g&&!(f=b[j].getXVal(),k++,f>=e);j++);l[a]=j-1;return k},"~N,~A,~N,~N,~N,~N,~A,~A");b(c$,"setScaleParams",function(a,b,d){a=b==a?1:Math.abs(b-a)/14;var e=Math.log10(Math.abs(a));b=m(Math.floor(e));this.exportPrecision[d]=b;this.precision[d]=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[d]=Math.pow(10,b)*JSV.common.ScaleData.NTICKS[a];e=Math.log10(Math.abs(100010*this.steps[d]));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[d]=e;return this.steps[d]},"~N,~N,~N");b(c$,"isInRangeX",function(a){return a>=this.minX&&a<=this.maxX},"~N");b(c$,"addSpecShift",function(a){this.specShift+=
a;this.minX+=a;this.maxX+=a;this.minXOnScale+=a;this.maxXOnScale+=a;this.firstX+=a},"~N");b(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");b(c$,"setMinMax",function(a,b,d,e){this.minX=a;this.maxX=b;this.minY=d;this.maxY=e},"~N,~N,~N,~N");b(c$,"toX",function(a,b,d){return this.toXScaled(a,b,d,this.xFactorForScale)},"~N,~N,~B");b(c$,"toX0",function(a,b,d,e){return this.toXScaled(a,d,e,(this.maxXOnScale-this.minXOnScale)/(d-b))},"~N,~N,~N,~B");b(c$,"toXScaled",function(a,
b,d,e){return d?this.maxXOnScale-(b-a)*e:this.minXOnScale+(b-a)*e},"~N,~N,~B,~N");b(c$,"toPixelX",function(a,b,d,e){return this.toPixelXScaled(a,b,d,e,this.xFactorForScale)},"~N,~N,~N,~B");b(c$,"toPixelX0",function(a,b,d,e){return this.toPixelXScaled(a,b,d,e,(this.maxXOnScale-this.minXOnScale)/(d-b))},"~N,~N,~N,~B");b(c$,"toPixelXScaled",function(a,b,d,e,f){a=m((a-this.minXOnScale)/f);return e?b+a:d-a},"~N,~N,~N,~B,~N");b(c$,"toY",function(a,b){return this.maxYOnScale+(b-a)*this.yFactorForScale},
"~N,~N");b(c$,"toY0",function(a,b,d){return Math.max(this.minYOnScale,Math.min(this.maxYOnScale+(b-a)*((this.maxYOnScale-this.minYOnScale)/(d-b)),this.maxYOnScale))},"~N,~N,~N");b(c$,"toPixelY",function(a,b){return Double.isNaN(a)?-2147483648:b-m(((a-this.spectrumYRef)*this.userYFactor+this.spectrumYRef-this.minYOnScale)/this.yFactorForScale)},"~N,~N");b(c$,"toPixelY0",function(a,b,d){return m(b+(this.maxYOnScale-a)/((this.maxYOnScale-this.minYOnScale)/(d-b)))},"~N,~N,~N");b(c$,"setXYScale",function(a,
b,d){var e=this.spectrumYRef,f=this.spectrumScaleFactor,g=1!=f||this.isShiftZoomedY,h=g?this.initMinYOnScale:this.minY,l=g?this.initMaxYOnScale:this.maxY;g&&e<h&&(e=h);g&&e>l&&(e=l);this.setYScale((h-e)/f+e,(l-e)/f+e,1==f,d);this.xFactorForScale=(this.maxXOnScale-this.minXOnScale)/(a-1);this.yFactorForScale=(this.maxYOnScale-this.minYOnScale)/(b-1)},"~N,~N,~B");c$.copyScaleFactors=b(c$,"copyScaleFactors",function(a,b){for(var d=0;d<a.length;d++)b[d].spectrumScaleFactor=a[d].spectrumScaleFactor,b[d].spectrumYRef=
a[d].spectrumYRef,b[d].userYFactor=a[d].userYFactor,b[d].specShift=a[d].specShift,b[d].isShiftZoomedY=a[d].isShiftZoomedY},"~A,~A");c$.copyYScales=b(c$,"copyYScales",function(a,b){for(var d=0;d<a.length;d++)b[d].initMinYOnScale=a[d].initMinYOnScale,b[d].initMaxYOnScale=a[d].initMaxYOnScale,b[d].minY=a[d].minY,b[d].maxY=a[d].maxY,a[d].isShiftZoomedY&&(b[d].isShiftZoomedY=!0,b[d].minYOnScale=a[d].minYOnScale,b[d].maxYOnScale=a[d].maxYOnScale)},"~A,~A");c$.setDataPointIndices=b(c$,"setDataPointIndices",
function(a,b,d,e,f,g){for(var h=0,l=a.size(),j=0;j<l;j++){var k=a.get(j).getXYCoords();JSV.common.ScaleData.getXRange(j,k,b,d,0,k.length-1,f,g)>=e&&h++}return h==l},"JU.List,~N,~N,~N,~A,~A");c$.fixScale=b(c$,"fixScale",function(a){if(!a.isEmpty())for(;;){for(var b,d=a.entrySet().iterator();d.hasNext()&&((b=d.next())||1);){var e=b.getValue(),f=e.indexOf("E");0<=f&&(e=e.substring(0,f));if(0>e.indexOf(".")||!e.endsWith("0")&&!e.endsWith("."))return}for(d=a.entrySet().iterator();d.hasNext()&&((b=d.next())||
1);)e=b.getValue(),f=e.indexOf("E"),0<=f?b.setValue(e.substring(0,f-1)+e.substring(f)):b.setValue(e.substring(0,e.length-1))}},"java.util.Map");b(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");B(c$,"NTICKS",[2,5,10,10]);c$.LOGTICKS=c$.prototype.LOGTICKS=[Math.log10(2),Math.log10(5),0,1]});p("JSV.common");
q(["java.lang.Enum"],"JSV.common.ScriptToken",["java.util.Hashtable","JU.List","$.SB","JSV.common.ScriptTokenizer"],function(){c$=u(function(){this.tip=null;t(this,arguments)},JSV.common,"ScriptToken",Enum);b(c$,"getTip",function(){return"  "+("T"===this.tip?"TRUE/FALSE/TOGGLE":"TF"===this.tip?"TRUE or FALSE":"C"===this.tip?"<color>":this.tip)});w(c$,function(){});w(c$,function(a){this.tip=a},"~S");c$.getScriptToken=b(c$,"getScriptToken",function(a){if(null==JSV.common.ScriptToken.htParams){JSV.common.ScriptToken.htParams=
new java.util.Hashtable;for(var b,d=0,e=JSV.common.ScriptToken.values();d<e.length&&((b=e[d])||1);d++)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=b(c$,"getScriptTokenList",function(a,b){a=a.toUpperCase();var d=new JU.List,e=JSV.common.ScriptToken.getScriptToken(a);if(b)null!=e&&d.addLast(e);else for(var f,e=JSV.common.ScriptToken.htParams.entrySet().iterator();e.hasNext()&&
((f=e.next())||1);)f.getKey().startsWith(a)&&null!=f.getValue().tip&&d.addLast(f.getValue());return d},"~S,~B");c$.getValue=b(c$,"getValue",function(a,b,d){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(d);
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(d).$replace(","," ").trim()}},"JSV.common.ScriptToken,JSV.common.ScriptTokenizer,~S");c$.removeCommandName=b(c$,"removeCommandName",function(a){var b=a.indexOf(" ");return 0>b?"":a.substring(b).trim()},"~S");c$.getKey=b(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=b(c$,"getTokens",function(a){var b=new JU.List;for(a=new JSV.common.ScriptTokenizer(a,!1);a.hasMoreTokens();){var d=JSV.common.ScriptTokenizer.nextStringToken(a,!1);if(d.startsWith("//")||d.startsWith("#"))break;b.addLast(d)}return b},"~S");c$.getNameList=b(c$,"getNameList",function(a){if(0==a.size())return"";for(var b=new JU.SB,d=0;d<a.size();d++)b.append(",").append(a.get(d).toString());
return b.toString().substring(1)},"JU.List");c$.htParams=null;r(c$,"UNKNOWN",0,[]);r(c$,"APPLETID",1,[]);r(c$,"APPLETREADYCALLBACKFUNCTIONNAME",2,[]);r(c$,"AUTOINTEGRATE",3,["TF"]);r(c$,"BACKGROUNDCOLOR",4,["C"]);r(c$,"CLOSE",5,["spectrumId or fileName or ALL"]);r(c$,"COMPOUNDMENUON",6,["TF"]);r(c$,"COORDCALLBACKFUNCTIONNAME",7,[]);r(c$,"COORDINATESCOLOR",8,["C"]);r(c$,"COORDINATESON",9,["T"]);r(c$,"DEBUG",10,["TF"]);r(c$,"DISPLAYFONTNAME",11,["fontName"]);r(c$,"DISPLAY1D",12,["T"]);r(c$,"DISPLAY2D",
13,["T"]);r(c$,"ENABLEZOOM",14,["T"]);r(c$,"ENDINDEX",15,[]);r(c$,"FINDX",16,["x-value"]);r(c$,"GETPROPERTY",17,["[ALL] [propertyName]"]);r(c$,"GETSOLUTIONCOLOR",18,[]);r(c$,"GRIDCOLOR",19,["C"]);r(c$,"GRIDON",20,["T"]);r(c$,"HIDDEN",21,["TF"]);r(c$,"HIGHLIGHTCOLOR",22,["C"]);r(c$,"INTEGRALOFFSET",23,["percent"]);r(c$,"INTEGRALRANGE",24,["percent"]);r(c$,"INTEGRATE",25,[]);r(c$,"INTEGRATION",26,["ON/OFF/AUTO/TOGGLE/MIN value/MARK ppm1-ppm2:norm,ppm3-ppm4,... (start with 0-0 to clear)"]);r(c$,"INTEGRALPLOTCOLOR",
27,[]);r(c$,"INTEGRATIONRATIOS",28,[]);r(c$,"INTERFACE",29,[]);r(c$,"IRMODE",30,["A or T or TOGGLE"]);r(c$,"JMOL",31,["...Jmol command..."]);r(c$,"JSV",32,[]);r(c$,"LABEL",33,['x y [color and/or "text"]']);r(c$,"LINK",34,["AB or ABC or NONE or ALL"]);r(c$,"LOAD",35,['[APPEND] "fileName" [first] [last]; use "" to reload current file']);r(c$,"LOADFILECALLBACKFUNCTIONNAME",36,[]);r(c$,"LOADIMAGINARY",37,["T/F - default is to NOT load imaginary spectra"]);r(c$,"MENUON",38,[]);r(c$,"OBSCURE",39,[]);r(c$,
"OVERLAY",40,[]);r(c$,"OVERLAYSTACKED",41,["TF"]);r(c$,"PEAK",42,['<type(IR,CNMR,HNMR,MS, etc)> id=xxx or "match" [ALL], for example: PEAK HNMR id=3']);r(c$,"PEAKCALLBACKFUNCTIONNAME",43,[]);r(c$,"PEAKLIST",44,[" Example: PEAKLIST threshold=20 [%, or include=10] skip=0 interpolate=parabolic [or NONE]"]);r(c$,"PEAKTABCOLOR",45,["C"]);r(c$,"PLOTAREACOLOR",46,["C"]);r(c$,"PLOTCOLOR",47,["C"]);r(c$,"PLOTCOLORS",48,["color,color,color,..."]);r(c$,"PRINT",49,[]);r(c$,"REVERSEPLOT",50,["T"]);r(c$,"SCALEBY",
51,["factor"]);r(c$,"SCALECOLOR",52,["C"]);r(c$,"SCRIPT",53,["filename.jsv"]);r(c$,"SELECT",54,["spectrumID, spectrumID,..."]);r(c$,"SETPEAK",55,["x (ppm) or NONE does peak search, unlike SETX -- NMR only"]);r(c$,"SETX",56,["x (ppm) does no peak search, unlike SETPEAK -- NMR only"]);r(c$,"SHIFTX",57,["dx (ppm) or NONE -- NMR only"]);r(c$,"SHOWERRORS",58,[]);r(c$,"SHOWINTEGRATION",59,["T"]);r(c$,"SHOWKEY",60,["T"]);r(c$,"SHOWMEASUREMENTS",61,["T"]);r(c$,"SHOWMENU",62,[]);r(c$,"SHOWPEAKLIST",63,["T"]);
r(c$,"SHOWPROPERTIES",64,[]);r(c$,"SHOWSOURCE",65,[]);r(c$,"SPECTRUM",66,["spectrumID"]);r(c$,"SPECTRUMNUMBER",67,[]);r(c$,"STACKOFFSETY",68,["percent"]);r(c$,"STARTINDEX",69,[]);r(c$,"SYNCCALLBACKFUNCTIONNAME",70,[]);r(c$,"SYNCID",71,[]);r(c$,"TEST",72,[]);r(c$,"TITLEON",73,["T"]);r(c$,"TITLEBOLDON",74,["T"]);r(c$,"TITLECOLOR",75,["C"]);r(c$,"TITLEFONTNAME",76,["fontName"]);r(c$,"UNITSCOLOR",77,["C"]);r(c$,"VERSION",78,[]);r(c$,"VIEW",79,['spectrumID, spectrumID, ... Example: VIEW 3.1, 3.2  or  VIEW "acetophenone"']);
r(c$,"XSCALEON",80,["T"]);r(c$,"XUNITSON",81,["T"]);r(c$,"YSCALE",82,["[ALL] lowValue highValue"]);r(c$,"YSCALEON",83,["T"]);r(c$,"YUNITSON",84,["T"]);r(c$,"WINDOW",85,[]);r(c$,"WRITE",86,['[XY,DIF,DIFDUP,PAC,FIX,SQZ,AML,CML,JPG,PDF,PNG,SVG] "filename"']);r(c$,"ZOOM",87,["OUT or x1,x2 or x1,y1 x2,y2"]);r(c$,"ZOOMBOXCOLOR",88,[]);r(c$,"ZOOMBOXCOLOR2",89,[])});p("JSV.common");q(null,"JSV.common.ScriptTokenizer",["JU.PT"],function(){c$=u(function(){this.str=null;this.pt=-1;this.len=0;this.isCmd=!1;this.doCheck=
!0;t(this,arguments)},JSV.common,"ScriptTokenizer");w(c$,function(a,b){this.str=a;this.len=a.length;this.isCmd=b},"~S,~B");c$.nextStringToken=b(c$,"nextStringToken",function(a,b){var d=a.nextToken();return b&&'"'==d.charAt(0)&&d.endsWith('"')&&1<d.length?JU.PT.trimQuotes(d):d},"JSV.common.ScriptTokenizer,~B");b(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)});b(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})});p("JSV.common");c$=u(function(){this.isub=0;this.title=null;t(this,arguments)},JSV.common,"SubSpecChangeEvent");
w(c$,function(a,b){this.isub=a;this.title=b},"~N,~S");b(c$,"isValid",function(){return null!=this.title});b(c$,"getSubIndex",function(){return this.isub});e(c$,"toString",function(){return this.title});p("JSV.common");q(null,"JSV.common.ViewData",["JSV.common.Coordinate","$.ScaleData"],function(){c$=u(function(){this.thisScale=this.scaleData=null;this.iThisScale=this.nSpectra=0;t(this,arguments)},JSV.common,"ViewData");b(c$,"getScaleData",function(){return this.scaleData});b(c$,"getScale",function(){return this.thisScale});
w(c$,function(a,b,d,e,f,g,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],f[h]);this.init(a,b,d,g)},"JU.List,~N,~N,~A,~A,~B,~B");w(c$,function(a,b,d,e){this.nSpectra=a.size();var f=a.get(0).getXYCoords().length;this.scaleData=Array(1);this.scaleData[0]=new JSV.common.ScaleData(0,f-1);this.init(a,b,d,e)},"JU.List,~N,~N,~B");b(c$,"init",function(a,b,d,e){this.thisScale=this.scaleData[this.iThisScale=0];for(var f=
0;f<this.scaleData.length;f++)this.scaleData[f].userYFactor=a.get(f).getUserYFactor(),this.scaleData[f].spectrumYRef=a.get(f).getYRef();this.resetScaleFactors();var g=JSV.common.Coordinate.getMinX(a,this),h=JSV.common.Coordinate.getMaxX(a,this),l=JSV.common.Coordinate.getMinYUser(a,this),j=JSV.common.Coordinate.getMaxYUser(a,this);b!=d&&(l=b,j=d,l>j&&(f=l,l=j,j=f));a=a.get(0).isInverted();for(f=0;f<this.scaleData.length;f++)this.scaleData[f].setMinMax(g,h,l,j),this.scaleData[f].setScale(e,a)},"JU.List,~N,~N,~B");
b(c$,"newSpectrum",function(a){this.init(a,0,0,!1)},"JU.List");b(c$,"setXRangeForSubSpectrum",function(a){this.setXRange(0,a,this.scaleData[0].minX,this.scaleData[0].maxX,0,a.length-1)},"~A");b(c$,"setXRange",function(a,b,d,e,f,g){for(var h=0,l=0,h=f;h<=g;h++)if(f=b[h].getXVal(),f>=d){this.scaleData[a%this.scaleData.length].startDataPointIndex=h;break}for(;h<=g&&!(f=b[h].getXVal(),l++,f>=e);h++);this.scaleData[a%this.scaleData.length].endDataPointIndex=h-1;return l},"~N,~A,~N,~N,~N,~N");b(c$,"getStartingPointIndex",
function(a){return this.scaleData[a%this.scaleData.length].startDataPointIndex},"~N");b(c$,"getEndingPointIndex",function(a){return this.scaleData[a%this.scaleData.length].endDataPointIndex},"~N");b(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");b(c$,"setScale",function(a,b,d,e){this.iThisScale=a%this.scaleData.length;this.thisScale=
this.scaleData[this.iThisScale];this.thisScale.setXYScale(b,d,e)},"~N,~N,~N,~B");b(c$,"resetScaleFactors",function(){for(var a=0;a<this.scaleData.length;a++)this.scaleData[a].spectrumScaleFactor=1});b(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");b(c$,"getNewScales",function(a,b,d,e){if(b)return this.scaleData;
a%=this.scaleData.length;b=(d-this.thisScale.minYOnScale)/(this.thisScale.maxYOnScale-this.thisScale.minYOnScale);e=(e-this.thisScale.minYOnScale)/(this.thisScale.maxYOnScale-this.thisScale.minYOnScale);d=Array(this.scaleData.length);for(var f=0;f<this.scaleData.length;f++)d[f]=0<=a&&f!=a?this.scaleData[f]:new JSV.common.ScaleData;JSV.common.ScaleData.copyScaleFactors(this.scaleData,d);JSV.common.ScaleData.copyYScales(this.scaleData,d);for(f=0;f<this.scaleData.length;f++)0<=a&&f!=a||(d[f].isShiftZoomedY=
!0,d[f].minYOnScale=this.scaleData[f].minYOnScale*(1-b)+b*this.scaleData[f].maxYOnScale,d[f].maxYOnScale=this.scaleData[f].minYOnScale*(1-e)+e*this.scaleData[f].maxYOnScale);return d},"~N,~B,~N,~N")});p("JSV.common");c$=u(function(){this.y2=this.x2=this.y1=this.x1=0;t(this,arguments)},JSV.common,"ZoomEvent");w(c$,function(a,b,d,e){this.x1=a;this.y1=b;this.x2=d;this.y2=e},"~N,~N,~N,~N");p("JSV.dialog");q(["JSV.api.AnnotationData","JSV.common.Annotation"],"JSV.dialog.JSVDialog",["java.lang.Double",
"JU.DF","$.PT","JSV.common.IntegralData","$.PeakData"],function(){c$=u(function(){this.myParams=this.xyData=this.combo1=this.txt3=this.txt2=this.txt1=this.jsvp=this.dialog=this.manager=this.$spec=this.viewer=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;t(this,arguments)},JSV.dialog,"JSVDialog",JSV.common.Annotation,JSV.api.AnnotationData);b(c$,"setParams",function(a,b,d){this.title=a;this.viewer=b;this.$spec=d;this.manager=b.getDialogManager();this.jsvp=b.selectedPanel;this.myParams=b.getPlatformInterface("Parameters").setName("dialogParams");this.subType=null==d?"!":d.getTypeLabel();this.optionKey=this.type+"_"+this.subType;
this.options=this.manager.getDialogOptions();null!=d&&(a=d.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.JDXSpectrum");b(c$,"initDialog",function(){this.dialog=this.manager.getDialog(this);this.restoreDialogPosition(this.jsvp,this.getPosXY());this.dialog.setTitle(this.title);this.layoutDialog()});b(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)});b(c$,"callbackAD",function(a,b){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 d=this.dialog.getText(this.showHideButton);this.eventShowHide(d.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");b(c$,"addUniqueControls",function(){},"JSV.dialog.DialogManager");
e(c$,"getAType",function(){return this.type});e(c$,"getGraphSetKey",function(){return this.graphSetKey});e(c$,"setGraphSetKey",function(a){this.graphSetKey=a},"~S");e(c$,"getSpectrum",function(){return this.$spec});e(c$,"getState",function(){return this.isON});e(c$,"setState",function(a){this.isON=a},"~B");b(c$,"checkEnables",function(){var a=this.checkVisible();this.dialog.setText(this.showHideButton,a?"Hide":"Show")});b(c$,"createTable",function(a,b,d){this.tableData=a;this.dialog.createTable(a,
b,d)},"~A,~A,~A");b(c$,"setTableSelectionEnabled",function(a){this.dialog.setCellSelectionEnabled(a)},"~B");b(c$,"getParameters",function(){return this.myParams});b(c$,"showMessage",function(a,b,d){this.manager.showMessageDialog(this.dialog,a,b,d)},"~S,~S,~N");b(c$,"setThreshold",function(a){this.dialog.setText(this.txt1,this.getThreasholdText(a))},"~N");b(c$,"setComboSelected",function(a){this.dialog.setSelectedIndex(this.combo1,a)},"~N");b(c$,"applyFromFields",function(){this.apply(null)});b(c$,
"reEnable",function(){this.paramsReEnable();return this});b(c$,"dispose",function(){this.dialog.dispose()});b(c$,"setVisible",function(a){this.dialog.setVisible(a)},"~B");e(c$,"isVisible",function(){return this.dialog.isVisible()});b(c$,"selectTableRow",function(a){this.dialog.selectTableRow(a)},"~N");b(c$,"repaint",function(){this.dialog.repaint()});b(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()}});b(c$,"update",function(a,b,d){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<d&&this.applyFromFields();if(null==this.xyData||null==a||20<d)break;d=0;var e=1E100;a=a.getXVal();var f=this.xyData;
b=Math.abs(b/20);for(var g=f.size();0<=--g;){var h=Math.abs(a-f.get(g).getXVal());h<e&&(e=h,d=g)}e<b&&(this.selectTableRow(f.size()-2-d),this.repaint())}},"JSV.common.Coordinate,~N,~N");b(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});e(c$,"getData",function(){null==this.xyData&&this.createData();return this.xyData});b(c$,"setData",
function(a){this.myParams=a.getParameters();this.xyData=a},"JSV.api.AnnotationData");e(c$,"setSpecShift",function(a){null!=this.xyData&&this.xyData.setSpecShift(a)},"~N");b(c$,"setType",function(a){this.type=a;switch(a){case JSV.common.Annotation.AType.Measurements:this.addUnits=!0}},"JSV.common.Annotation.AType");b(c$,"apply",function(a){try{switch(this.type){case JSV.common.Annotation.AType.Integration:var b=Double.parseDouble(a[0]),d=Double.parseDouble(a[1]);this.myParams.integralOffset=b;this.myParams.integralRange=
d;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}this.loadData();this.checkEnables();this.jsvp.doRepaint(!0)}catch(e){if(!y(e,Exception))throw e;}},"~A");b(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)});b(c$,"restoreDialogPosition",function(a,b){if(null!=a){-2147483648==b[0]&&(b[0]=0,b[1]=-20);var d=this.manager.getLocationOnScreen(a),e=a.getHeight();this.loc=[Math.max(0,d[0]+b[0]),Math.max(0,d[1]+e+b[1])];this.dialog.setIntLocation(this.loc)}},"JSV.api.JSVPanel,~A");b(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(d){if(!y(d,
Exception))throw d;}},"~A");b(c$,"getThreasholdText",function(a){if(Double.isNaN(a)){a=this.jsvp.getPanelData();var b=a.getSpectrum().isInverted()?0.1:0.9,d=a.getClickedCoordinate();a=null==d?(a.getView().minYOnScale*b+a.getView().maxYOnScale)*(1-b):d.getYVal()}return" "+JU.DF.formatDecimalDbl(a,1E3>a?2:-2)},"~N");b(c$,"checkVisible",function(){return this.viewer.selectedPanel.getPanelData().getShowAnnotation(this.type)});b(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()]))});b(c$,"eventApply",function(){switch(this.type){case JSV.common.Annotation.AType.PeakList:this.createData(),this.skipCreate=!0}this.applyFromFields()});b(c$,"eventShowHide",function(a){(this.isON=a)&&this.eventApply();this.jsvp.doRepaint(!0);this.checkEnables()},"~B");b(c$,"clear",function(){this.setState(!0);null!=this.xyData&&(this.xyData.clear(),this.applyFromFields())});b(c$,"paramsReEnable",
function(){switch(this.type){case JSV.common.Annotation.AType.PeakList:this.skipCreate=!0}this.setVisible(!0);this.isON=!0;this.applyFromFields()});b(c$,"tableCellSelect",function(a,b){var d=this.tableData[a][1],e=1E3*this.iRowSelected+this.iColSelected;if(e!=this.iRowColSelected){this.iRowColSelected=e;this.selectTableRow(this.iRowSelected);try{switch(this.type){case JSV.common.Annotation.AType.Integration:for(e=0;e<this.xyData.size();e++)if(JU.DF.formatDecimalDbl(this.xyData.get(e).getXVal(),2).equals(d)){this.iSelected=
e;this.jsvp.getPanelData().setXPointers(this.$spec,this.xyData.get(e).getXVal(),this.$spec,this.xyData.get(e).getXVal2());this.jsvp.doRepaint(!0);break}this.checkEnables();break;case JSV.common.Annotation.AType.PeakList:try{switch(b){case 6:case 5:case 4:var f=Double.parseDouble(d),g=Double.parseDouble(this.tableData[a+3-b][1]);this.jsvp.getPanelData().setXPointers(this.$spec,f,this.$spec,g);break;default:this.jsvp.getPanelData().findX(this.$spec,Double.parseDouble(d))}}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(l){if(!y(l,Exception))throw l;}}},"~N,~N");b(c$,"loadData",function(){var a,b,d;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();d=[40,65,65,50];this.createTable(a,b,d);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();d=[40,65,65,50];this.createTable(a,b,d);break;case JSV.common.Annotation.AType.PeakList:null==this.xyData&&this.createData();a=this.xyData.getMeasurementListArray(null);b=this.xyData.getDataHeader();d=[40,65,50,50,50,50,50];this.createTable(a,b,d);this.setTableSelectionEnabled(!0);break;case JSV.common.Annotation.AType.OverlayLegend:b=["No.","Plot Color","Title"],
a=this.viewer.selectedPanel.getPanelData().getOverlayLegendData(),d=[30,60,250],this.createTable(a,b,d),this.setTableSelectionEnabled(!0)}});b(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(d){if(!y(d,Exception))throw d;}}});b(c$,"setPrecision",function(a){this.precision=this.formatOptions[a]},"~N");b(c$,"tableSelect",function(a){if("true".equals(this.getField(a,"adjusting")))this.iColSelected=this.iRowSelected=-1;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;break;case 4:this.iColSelected=b}0<=this.iColSelected&&0<=this.iRowSelected&&this.tableCellSelect(this.iRowSelected,this.iColSelected)}},"~S");b(c$,"getField",function(a,b){a+="&";var d="&"+b+"=",e=a.indexOf(d);return 0>e?null:a.substring(e+d.length,a.indexOf("&",e+1))},"~S,~S")});p("JSV.exception");q(["JSV.exception.JSpecViewException"],
"JSV.exception.JDXSourceException",null,function(){c$=G(JSV.exception,"JDXSourceException",JSV.exception.JSpecViewException)});p("JSV.exception");q(["java.lang.Exception"],"JSV.exception.JSpecViewException",null,function(){c$=G(JSV.exception,"JSpecViewException",Exception)});p("JSV.js2d");c$=G(JSV.js2d,"Display");c$.getFullScreenDimensions=b(c$,"getFullScreenDimensions",function(a,b){b[0]=a.width;b[1]=a.height},"~O,~A");c$.hasFocus=b(c$,"hasFocus",function(){return!0},"~O");c$.requestFocusInWindow=
b(c$,"requestFocusInWindow",function(){},"~O");c$.repaint=b(c$,"repaint",function(){},"~O");c$.renderScreenImage=b(c$,"renderScreenImage",function(){},"javajs.api.PlatformViewer,~O,~O");c$.setTransparentCursor=b(c$,"setTransparentCursor",function(){},"~O");c$.setCursor=b(c$,"setCursor",function(){},"~N,~O");c$.prompt=b(c$,"prompt",function(a,b){var d=prompt(a,b);return null!=d?d:"null"},"~S,~S,~A,~B");c$.convertPointFromScreen=b(c$,"convertPointFromScreen",function(){},"~O,JU.P3");p("JSV.js2d");c$=
G(JSV.js2d,"Image");c$.getWidth=b(c$,"getWidth",function(a){return a.imageWidth?a.imageWidth:a.width},"~O");c$.getHeight=b(c$,"getHeight",function(a){return a.imageHeight?a.imageHeight:a.height},"~O");c$.grabPixels=b(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=b(c$,"toIntARGB",function(a){for(var b=m(a.length/4),d=D(b,0),e=0,f=0;e<b;f++)d[e++]=a[f++]<<16|a[f++]<<8|a[f++]|4278190080;return d},"~A");c$.fromIntARGB=
b(c$,"fromIntARGB",function(a,b){for(var d=b.length>>2,e=0,f=0;e<d;e++)b[f++]=a[e]>>16&255,b[f++]=a[e]>>8&255,b[f++]=a[e]&255,b[f++]=255},"~A,~A");c$.getTextPixels=b(c$,"getTextPixels",function(a,b,d,e,f,g){d.fillStyle="#000000";d.fillRect(0,0,e,f);d.fillStyle="#FFFFFF";d.font=b.font;d.fillText(a,0,g);return this.grabPixels(d,e,f)},"~S,javajs.awt.Font,~O,~N,~N,~N");c$.allocateRgbImage=b(c$,"allocateRgbImage",function(a,b,d,e,f,g){null==g&&(g={width:a,height:b});g.buf32=d;return g},"~N,~N,~A,~N,~B,~O");
c$.getStaticGraphics=b(c$,"getStaticGraphics",function(a){return this.getGraphics(a)},"~O,~B");c$.getGraphics=b(c$,"getGraphics",function(a){return a.getContext("2d")},"~O");c$.drawImage=b(c$,"drawImage",function(a,b,d,e){this.fromIntARGB(b.buf32,b.buf8);a.putImageData(b.imgdata,d,e)},"~O,~O,~N,~N,~N,~N");p("JSV.js2d");q(["javajs.api.GenericFileInterface"],"JSV.js2d.JsFile",["JU.PT","JSV.common.JSVFileManager"],function(){c$=u(function(){this.fullName=this.name=null;t(this,arguments)},JSV.js2d,"JsFile",
null,javajs.api.GenericFileInterface);c$.newFile=b(c$,"newFile",function(a){return new JSV.js2d.JsFile(a)},"~S");w(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.simpleReplace(this.fullName,"/./","/");a.substring(a.lastIndexOf("/")+1)},"~S");e(c$,"getParentAsFile",function(){var a=this.fullName.lastIndexOf("/");return 0>
a?null:new JSV.js2d.JsFile(this.fullName.substring(0,a))});e(c$,"getFullPath",function(){return this.fullName});e(c$,"getName",function(){return this.name});e(c$,"isDirectory",function(){return this.fullName.endsWith("/")});e(c$,"length",function(){return 0});c$.getBufferedURLInputStream=b(c$,"getBufferedURLInputStream",function(a,b,d){try{var e=a.openConnection();null!=b?e.outputBytes(b):null!=d&&e.outputString(d);return e.getSB()}catch(f){if(y(f,Exception))return f.toString();throw f;}},"java.net.URL,~A,~S")});
p("JSV.js2d");q(["JSV.api.JSVFileHelper"],"JSV.js2d.JsFileHelper",["JSV.js2d.JsFile"],function(){c$=G(JSV.js2d,"JsFileHelper",null,JSV.api.JSVFileHelper);w(c$,function(){});e(c$,"set",function(){return this},"JSV.common.JSViewer");e(c$,"getFile",function(a){var b=null,b=prompt("Enter a file name:",a);return null==b?null:new JSV.js2d.JsFile(b)},"~S,~O,~B");e(c$,"setDirLastExported",function(a){return a},"~S");e(c$,"setFileChooser",function(){},"JSV.common.ExportType")});p("JSV.js2d");c$=G(JSV.js2d,
"JsFont");c$.newFont=b(c$,"newFont",function(a,b,d,e,f){a=a.equals("Monospaced")?"Courier":a.startsWith("Sans")?"Sans-Serif":"Serif";return(b?"bold ":"")+(d?"italic ":"")+e+f+" "+a},"~S,~B,~B,~N,~S");c$.getFontMetrics=b(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=b(c$,"getAscent",function(a){return Math.ceil(a._fontAscent)},"~O");c$.getDescent=
b(c$,"getDescent",function(a){return Math.ceil(a._fontDescent)},"~O");c$.stringWidth=b(c$,"stringWidth",function(a,b){a.fontMetrics.font=a.font;return Math.ceil(a.fontMetrics.measureText(b).width)},"javajs.awt.Font,~S");p("JSV.js2d");q(["JSV.api.JSVGraphics"],"JSV.js2d.JsG2D",["javajs.awt.Color","JU.CU"],function(){c$=u(function(){this.windowHeight=this.windowWidth=0;this.inPath=this.isShifted=!1;t(this,arguments)},JSV.js2d,"JsG2D",null,JSV.api.JSVGraphics);w(c$,function(){});e(c$,"getColor4",function(a,
b,d,e){return javajs.awt.Color.get4(a,b,d,e)},"~N,~N,~N,~N");e(c$,"getColor3",function(a,b,d){return javajs.awt.Color.get3(a,b,d)},"~N,~N,~N");e(c$,"getColor1",function(a){return javajs.awt.Color.get1(a)},"~N");e(c$,"newGrayScaleImage",function(a,b,d,e,f){var g,h;null==b?(g=(""+Math.random()).substring(3),h=document.createElement("canvas"),h.id=g,h.style.width=d+"px",h.style.height=e+"px",h.width=d,h.height=e,g=a.canvas.applet._id,a=document.getElementById(g+"_imagelayer"),b=new Image,b.canvas=h,
b.appId=g,b.id=g+"_image",b.layer=a,b.w=d,b.h=e,b.onload=function(){try{URL.revokeObjectURL(b.src)}catch(a){}},g=document.createElement("div"),b.div=g,g.style.position="relative",a.appendChild(g),g.appendChild(b)):h=b.canvas;a=h.getContext("2d");d=a.getImageData(0,0,d,e);e=d.data;g=f.length;for(var l=0,j=0;j<g;j++)e[l++]=e[l++]=e[l++]=f[j],e[l++]=255;a.putImageData(d,0,0);h.toBlob(function(a){b.src=URL.createObjectURL(a)});return b},"~O,~O,~N,~N,~A");e(c$,"drawGrayScaleImage",function(a,b,d,e,f,g,
h,l,j,k){a=f-d+1;g=g-e+1;j=j-h+1;k=k-l+1;f=b.w*a/j;var m=b.h*g/k;b.width=f;b.height=m;var p=b.div;b=b.layer;b.style.left=d+"px";b.style.top=e+"px";b.style.width=a+"px";b.style.height=g+"px";p.style.left=-h*a/j+"px";p.style.top=-l*g/k+"px";p.style.width=f+"px";p.style.height=m+"px"},"~O,~O,~N,~N,~N,~N,~N,~N,~N,~N");e(c$,"drawLine",function(a,b,d,e,f){this.inPath||a.beginPath();a.moveTo(b,d);a.lineTo(e,f);this.inPath||a.stroke()},"~O,~N,~N,~N,~N");e(c$,"drawCircle",function(a,b,d,e){e/=2;a.beginPath();
a.arc(b+e,d+e,e,0,2*Math.PI,!1);a.stroke()},"~O,~N,~N,~N");e(c$,"drawPolygon",function(a,b,d,e){this.doPoly(a,b,d,e,!1)},"~O,~A,~A,~N");b(c$,"doPoly",function(a,b,d,e,f){a.beginPath();a.moveTo(b[0],d[0]);for(var g=1;g<e;g++)a.lineTo(b[g],d[g]);f?a.fill():a.stroke()},"~O,~A,~A,~N,~B");e(c$,"drawRect",function(a,b,d,e,f){a.beginPath();a.rect(b,d,e,f);a.stroke()},"~O,~N,~N,~N,~N");e(c$,"drawString",function(a,b,d,e){a.fillText(b,d,e)},"~O,~S,~N,~N");e(c$,"drawStringRotated",function(){},"~O,~S,~N,~N,~N");
e(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");e(c$,"fillCircle",function(a,b,d,e){e/=2;a.beginPath();a.arc(b+e,d+e,e,0,2*Math.PI,!1);a.fill()},"~O,~N,~N,~N");e(c$,"fillPolygon",function(a,b,d,e){this.doPoly(a,b,d,e,!0)},"~O,~A,~A,~N");e(c$,"fillRect",function(a,b,d,e,f){a.fillRect(b,
d,e,f)},"~O,~N,~N,~N,~N");e(c$,"setGraphicsColor",function(a,b){var d=JU.CU.toCSSString(b);a.fillStyle=a.strokeStyle=d},"~O,javajs.api.GenericColor");e(c$,"setFont",function(a,b){var d=b.getInfo(),e=d.indexOf(" "),d=d.substring(0,e)+"px"+d.substring(e);a.font=d;return b},"~O,javajs.awt.Font");e(c$,"setStrokeBold",function(a,b){a.lineWidth=b?2:1},"~O,~B");e(c$,"setWindowParameters",function(a,b){this.windowWidth=a;this.windowHeight=b},"~N,~N");e(c$,"translateScale",function(){},"~O,~N,~N,~N");e(c$,
"canDoLineTo",function(){return!0});e(c$,"doStroke",function(a,b){(this.inPath=b)?a.beginPath():a.stroke()},"~O,~B");e(c$,"lineTo",function(a,b,d){a.lineTo(b,d)},"~O,~N,~N")});p("JSV.js2d");q(["JSV.api.JSVPanel"],"JSV.js2d.JsPanel",["javajs.awt.Font","JSV.common.JSViewer","$.PanelData","J.util.Logger"],function(){c$=u(function(){this.name=this.viewer=this.mouse=this.pd=this.apiPlatform=null;t(this,arguments)},JSV.js2d,"JsPanel",null,JSV.api.JSVPanel);e(c$,"finalize",function(){J.util.Logger.info("JSVPanel "+
this+" finalized")});e(c$,"getApiPlatform",function(){return this.apiPlatform});e(c$,"getPanelData",function(){return this.pd});c$.getPanelOne=b(c$,"getPanelOne",function(a,b){var d=new JSV.js2d.JsPanel(a);d.pd.initOne(b);return d},"JSV.common.JSViewer,JSV.common.JDXSpectrum");c$.getPanelMany=b(c$,"getPanelMany",function(a,b,d,e){a=new JSV.js2d.JsPanel(a);a.pd.initMany(b,d,e);return a},"JSV.common.JSViewer,JU.List,~N,~N");w(c$,function(a){this.viewer=a;this.pd=new JSV.common.PanelData(this,a);this.apiPlatform=
a.apiPlatform;this.mouse=this.apiPlatform.getMouseManager(0,this)},"JSV.common.JSViewer");e(c$,"getTitle",function(){return this.pd.getTitle()});e(c$,"dispose",function(){null!=this.pd&&this.pd.dispose();this.pd=null;this.mouse.dispose()});e(c$,"setTitle",function(a){this.name=this.pd.title=a},"~S");b(c$,"setColorOrFont",function(a,b){this.pd.setColorOrFont(a,b)},"JSV.common.ColorParameters,JSV.common.ScriptToken");e(c$,"setBackgroundColor",function(){},"javajs.api.GenericColor");e(c$,"getInput",
function(a,b,d){b=null;b=prompt(a,d);this.getFocusNow(!0);return b},"~S,~S,~S");e(c$,"showMessage",function(a){J.util.Logger.info(a);alert(a);this.getFocusNow(!0)},"~S,~S");e(c$,"getFocusNow",function(){this.pd.dialogsToFront()},"~B");e(c$,"getFontFaceID",function(){return javajs.awt.Font.getFontFaceID("SansSerif")},"~S");e(c$,"doRepaint",function(a){this.pd.taintedAll=(new Boolean(this.pd.taintedAll|a)).valueOf();this.pd.isPrinting||this.viewer.requestRepaint()},"~B");b(c$,"paintComponent",function(a){if(!(null==
this.viewer||null==this.pd||null==this.pd.graphSets||this.pd.isPrinting)){var b=null,b=a.canvas.topLayer.getContext("2d");this.pd.g2d=this.pd.g2d0;this.pd.drawGraph(a,b,this.getWidth(),this.getHeight(),!1);this.viewer.repaintDone()}},"~O");e(c$,"printPanel",function(a,b,d){a.title=d;a.date=this.apiPlatform.getDateFormat(!0);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");e(c$,"saveImage",function(){return null},"~S,javajs.api.GenericFileInterface");e(c$,"hasFocus",function(){return!1});e(c$,"repaint",function(){});e(c$,"setToolTipText",function(){},"~S");e(c$,"getHeight",function(){return this.viewer.getHeight()});e(c$,"getWidth",function(){return this.viewer.getWidth()});e(c$,"isEnabled",function(){return!1});e(c$,"isFocusable",function(){return!1});
e(c$,"isVisible",function(){return!1});e(c$,"setEnabled",function(){},"~B");e(c$,"setFocusable",function(){},"~B");e(c$,"toString",function(){return this.pd.getSpectrumAt(0).toString()});e(c$,"processMouseEvent",function(a,b,d,e,f){return this.mouse.processEvent(a,b,d,e,f)},"~N,~N,~N,~N,~N");e(c$,"processTwoPointGesture",function(a){this.mouse.processTwoPointGesture(a)},"~A")});p("JSV.js2d");q(["JSV.common.ColorParameters"],"JSV.js2d.JsParameters",["javajs.awt.Color"],function(){c$=G(JSV.js2d,"JsParameters",
JSV.common.ColorParameters);w(c$,function(){R(this,JSV.js2d.JsParameters,[])});e(c$,"isValidFontName",function(){return!0},"~S");e(c$,"getColor1",function(a){return javajs.awt.Color.get1(a)},"~N");e(c$,"getColor3",function(a,b,d){return javajs.awt.Color.get3(a,b,d)},"~N,~N,~N");b(c$,"copy",function(a){return(new JSV.js2d.JsParameters).setName(a).setElementColors(this)},"~S")});p("JSV.js2d");q(["javajs.api.GenericPlatform"],"JSV.js2d.JsPlatform","java.net.URL JU.AjaxURLStreamHandlerFactory JSV.js2d.Display $.Image $.JsFile $.JsFont $.Mouse".split(" "),
function(){c$=u(function(){this.context=this.viewer=this.canvas=null;t(this,arguments)},JSV.js2d,"JsPlatform",null,javajs.api.GenericPlatform);e(c$,"setViewer",function(a,b){this.viewer=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");e(c$,"isSingleThreaded",function(){return!0});e(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");e(c$,"isHeadless",function(){return!1});b(c$,"getMouseManager",function(a,b){return new JSV.js2d.Mouse(b)},"~N,~O");e(c$,"convertPointFromScreen",function(a,b){JSV.js2d.Display.convertPointFromScreen(a,b)},"~O,JU.P3");e(c$,"getFullScreenDimensions",function(a,b){JSV.js2d.Display.getFullScreenDimensions(a,b)},"~O,~A");e(c$,"getMenuPopup",function(){return null},"~S,~S");e(c$,"hasFocus",function(a){return JSV.js2d.Display.hasFocus(a)},
"~O");e(c$,"prompt",function(a,b,d,e){return JSV.js2d.Display.prompt(a,b,d,e)},"~S,~S,~A,~B");e(c$,"renderScreenImage",function(a,b){JSV.js2d.Display.renderScreenImage(this.viewer,a,b)},"~O,~O");e(c$,"drawImage",function(a,b,d,e,f,g){JSV.js2d.Image.drawImage(a,b,d,e,f,g)},"~O,~O,~N,~N,~N,~N");e(c$,"requestFocusInWindow",function(a){JSV.js2d.Display.requestFocusInWindow(a)},"~O");e(c$,"repaint",function(a){JSV.js2d.Display.repaint(a)},"~O");e(c$,"setTransparentCursor",function(a){JSV.js2d.Display.setTransparentCursor(a)},
"~O");e(c$,"setCursor",function(a,b){JSV.js2d.Display.setCursor(a,b)},"~N,~O");e(c$,"allocateRgbImage",function(a,b,d,e,f,g){return JSV.js2d.Image.allocateRgbImage(a,b,d,e,f,g?null:this.canvas)},"~N,~N,~A,~N,~B,~B");e(c$,"notifyEndOfRendering",function(){});e(c$,"createImage",function(){return null},"~O");e(c$,"disposeGraphics",function(){},"~O");e(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=JSV.js2d.Image.grabPixels(JSV.js2d.Image.getGraphics(a),
b,d);return a.buf32=b},"~O,~N,~N,~A,~N,~N");e(c$,"drawImageToBuffer",function(a,b,d,e,f){return this.grabPixels(d,e,f,null,0,0)},"~O,~O,~O,~N,~N,~N");e(c$,"getTextPixels",function(a,b,d,e,f,g,h){return JSV.js2d.Image.getTextPixels(a,b,d,f,g,h)},"~S,javajs.awt.Font,~O,~O,~N,~N,~N");e(c$,"flushImage",function(){},"~O");e(c$,"getGraphics",function(a){return JSV.js2d.Image.getGraphics(a)},"~O");e(c$,"getImageHeight",function(a){return null==a?-1:JSV.js2d.Image.getHeight(a)},"~O");e(c$,"getImageWidth",
function(a){return null==a?-1:JSV.js2d.Image.getWidth(a)},"~O");e(c$,"getStaticGraphics",function(a,b){return JSV.js2d.Image.getStaticGraphics(a,b)},"~O,~B");e(c$,"newBufferedImage",function(a,b,d){return"undefined"!=typeof Jmol&&Jmol._getHiddenCanvas?Jmol._getHiddenCanvas(this.viewer.applet,"stereoImage",b,d):null},"~O,~N,~N");e(c$,"newOffScreenImage",function(a,b){return"undefined"!=typeof Jmol&&Jmol._getHiddenCanvas?Jmol._getHiddenCanvas(this.viewer.applet,"textImage",a,b):null},"~N,~N");e(c$,
"waitForDisplay",function(a,b){if("undefined"==typeof Jmol||!Jmol._getHiddenCanvas)return!1;var d=this.viewer,e=d.getEvalContextAndHoldQueue(d.eval),f=a[0];return Jmol._loadImage(this,a,b,function(a,b){d.loadImageData(a,b,f,e)})},"~O,~O");e(c$,"fontStringWidth",function(a,b){return JSV.js2d.JsFont.stringWidth(a,b)},"javajs.awt.Font,~S");e(c$,"getFontAscent",function(a){return JSV.js2d.JsFont.getAscent(a)},"~O");e(c$,"getFontDescent",function(a){return JSV.js2d.JsFont.getDescent(a)},"~O");e(c$,"getFontMetrics",
function(a,b){return JSV.js2d.JsFont.getFontMetrics(a,b)},"javajs.awt.Font,~O");e(c$,"newFont",function(a,b,d,e){return JSV.js2d.JsFont.newFont(a,b,d,e,"px")},"~S,~B,~B,~N");e(c$,"getDateFormat",function(a){if(a){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)+"'"}return(""+new Date).split(" (")[0]},"~B");e(c$,"newFile",function(a){return new JSV.js2d.JsFile(a)},
"~S");e(c$,"getBufferedFileInputStream",function(){return null},"~S");e(c$,"getBufferedURLInputStream",function(a,b,d){return JSV.js2d.JsFile.getBufferedURLInputStream(a,b,d)},"java.net.URL,~A,~S");b(c$,"getMouseManager",function(a){return new JSV.js2d.Mouse(a)},"JSV.api.JSVPanel");e(c$,"getLocalUrl",function(){return null},"~S")});p("JSV.js2d");q(["JSV.api.JSVMainPanel","$.JSVViewPanel"],"JSV.js2d.JsViewPanel",["JSV.common.Annotation"],function(){c$=u(function(){this.selectedPanel=null;this.currentPanelIndex=
0;this.title=null;this.enabled=this.focusable=this.visible=!1;t(this,arguments)},JSV.js2d,"JsViewPanel",null,[JSV.api.JSVViewPanel,JSV.api.JSVMainPanel]);e(c$,"getCurrentPanelIndex",function(){return this.currentPanelIndex});e(c$,"dispose",function(){});e(c$,"getTitle",function(){return this.title});e(c$,"setTitle",function(a){this.title=a},"~S");e(c$,"setSelectedPanel",function(a,b){a!==this.selectedPanel&&(this.selectedPanel=a);for(var d=b.size();0<=--d;){var e=b.get(d).jsvp;e===a?this.currentPanelIndex=
d:(e.setEnabled(!1),e.setFocusable(!1),e.getPanelData().closeAllDialogsExcept(JSV.common.Annotation.AType.NONE))}this.markSelectedPanels(b);this.visible=null!=a},"JSV.api.JSVPanel,JU.List");e(c$,"markSelectedPanels",function(a){for(var b=a.size();0<=--b;)a.get(b).isSelected=this.currentPanelIndex==b},"JU.List");b(c$,"getHeight",function(){return null==this.selectedPanel?0:this.selectedPanel.getHeight()});b(c$,"getWidth",function(){return null==this.selectedPanel?0:this.selectedPanel.getWidth()});
e(c$,"isEnabled",function(){return this.enabled});e(c$,"isFocusable",function(){return this.focusable});e(c$,"isVisible",function(){return this.visible});b(c$,"setEnabled",function(a){this.enabled=a},"~B");b(c$,"setFocusable",function(a){this.focusable=a},"~B")});p("JSV.js2d");q(["javajs.api.GenericMouseInterface","javajs.awt.event.Event"],"JSV.js2d.Mouse",["J.util.Logger"],function(){c$=u(function(){this.pd=null;this.modifiersWhenPressed10=this.yWhenPressed=this.xWhenPressed=0;this.isMouseDown=!1;
t(this,arguments)},JSV.js2d,"Mouse",null,javajs.api.GenericMouseInterface);w(c$,function(a){this.pd=a.getPanelData()},"JSV.api.JSVPanel");e(c$,"clear",function(){});e(c$,"dispose",function(){});e(c$,"processEvent",function(a,b,d,e,f){-1!=a&&(e=JSV.js2d.Mouse.applyLeftMouse(e));switch(a){case -1:this.wheeled(f,b,e|32);break;case 501:this.xWhenPressed=b;this.yWhenPressed=d;this.modifiersWhenPressed10=e;this.pressed(f,b,d,e,!1);break;case 506:this.dragged(f,b,d,e);break;case 504:this.entered(f,b,d);
break;case 505:this.exited(f,b,d);break;case 503:this.moved(f,b,d,e);break;case 502:this.released(f,b,d,e);b==this.xWhenPressed&&(d==this.yWhenPressed&&e==this.modifiersWhenPressed10)&&this.clicked(f,b,d,e,1);break;default:return!1}return!0},"~N,~N,~N,~N,~N");b(c$,"mouseClicked",function(a){this.clicked(a.getWhen(),a.getX(),a.getY(),a.getModifiers(),a.getClickCount())},"java.awt.event.MouseEvent");b(c$,"mouseEntered",function(a){this.entered(a.getWhen(),a.getX(),a.getY())},"java.awt.event.MouseEvent");
b(c$,"mouseExited",function(a){this.exited(a.getWhen(),a.getX(),a.getY())},"java.awt.event.MouseEvent");b(c$,"mousePressed",function(a){this.pressed(a.getWhen(),a.getX(),a.getY(),a.getModifiers(),a.isPopupTrigger())},"java.awt.event.MouseEvent");b(c$,"mouseReleased",function(a){this.released(a.getWhen(),a.getX(),a.getY(),a.getModifiers())},"java.awt.event.MouseEvent");b(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");
b(c$,"mouseMoved",function(a){this.moved(a.getWhen(),a.getX(),a.getY(),a.getModifiers())},"java.awt.event.MouseEvent");b(c$,"mouseWheelMoved",function(a){a.consume();this.wheeled(a.getWhen(),a.getWheelRotation(),a.getModifiers()|32)},"java.awt.event.MouseWheelEvent");b(c$,"keyTyped",function(a){var b=a.getKeyChar(),d=a.getModifiers();J.util.Logger.info("MouseManager keyTyped: "+b+" "+(0+b.charCodeAt(0))+" "+d);this.pd.keyTyped(b.charCodeAt(0),d)&&a.consume()},"java.awt.event.KeyEvent");b(c$,"keyPressed",
function(a){this.pd.keyPressed(a.getKeyCode(),a.getModifiers())&&a.consume()},"java.awt.event.KeyEvent");b(c$,"keyReleased",function(a){this.pd.keyReleased(a.getKeyCode())},"java.awt.event.KeyEvent");b(c$,"entered",function(a,b,d){this.pd.mouseEnterExit(a,b,d,!1)},"~N,~N,~N");b(c$,"exited",function(a,b,d){this.pd.mouseEnterExit(a,b,d,!0)},"~N,~N,~N");b(c$,"clicked",function(a,b,d,e){this.pd.mouseAction(2,a,b,d,1,e)},"~N,~N,~N,~N,~N");b(c$,"moved",function(a,b,d,e){this.isMouseDown?this.pd.mouseAction(1,
a,b,d,0,JSV.js2d.Mouse.applyLeftMouse(e)):this.pd.mouseAction(0,a,b,d,0,e&-29)},"~N,~N,~N,~N");b(c$,"wheeled",function(a,b,d){this.pd.mouseAction(3,a,0,b,0,d)},"~N,~N,~N");b(c$,"pressed",function(a,b,d,e){this.isMouseDown=!0;this.pd.mouseAction(4,a,b,d,0,e)},"~N,~N,~N,~N,~B");b(c$,"released",function(a,b,d,e){this.isMouseDown=!1;this.pd.mouseAction(5,a,b,d,0,e)},"~N,~N,~N,~N");b(c$,"dragged",function(a,b,d,e){20==(e&20)&&(e=e&-5|2);this.pd.mouseAction(1,a,b,d,0,e)},"~N,~N,~N,~N");c$.applyLeftMouse=
b(c$,"applyLeftMouse",function(a){return 0==(a&28)?a|16:a},"~N");e(c$,"processTwoPointGesture",function(){},"~A")});p("JSV.source");q(null,"JSV.source.FileReader","java.io.BufferedReader $.StringReader java.lang.Character $.Double $.Exception $.Float java.util.Arrays $.Hashtable $.StringTokenizer JU.BS $.List $.PT $.SB JSV.api.JSVZipReader JSV.common.Coordinate $.JDXSpectrum $.JSVFileManager $.JSViewer $.PeakInfo JSV.exception.JDXSourceException $.JSpecViewException JSV.source.JDXDecompressor $.JDXSource $.JDXSourceStreamTokenizer JSV.util.JSVEscape J.util.Logger".split(" "),
function(){c$=u(function(){this.errorLog=this.t=this.source=null;this.isZipFile=this.done=this.obscure=!1;this.filePath=null;this.loadImaginary=!0;this.blockID=this.nSpec=this.lastSpec=this.firstSpec=0;this.thisModelID=this.piUnitsY=this.piUnitsX=null;this.peakIndex=0;t(this,arguments)},JSV.source,"FileReader");w(c$,function(a,b,d,e,f){System.out.println("FileReader filePath="+a+"<<");a=JU.PT.trimQuotes(a);this.filePath=null!=a&&a.startsWith("http://SIMULATION/MOL=")?"http://SIMULATION/MOL="+Math.abs(a.hashCode()):
a;this.obscure=b;this.firstSpec=e;this.lastSpec=f;this.loadImaginary=d},"~S,~B,~B,~N,~N");c$.createJDXSourceFromStream=b(c$,"createJDXSourceFromStream",function(a,b,d){return JSV.source.FileReader.createJDXSource(JSV.common.JSVFileManager.getBufferedReaderForInputStream(a),"stream",b,d,-1,-1)},"java.io.InputStream,~B,~B");c$.createJDXSource=b(c$,"createJDXSource",function(a,b,d,e,f,g){try{null==a&&(a=JSV.common.JSVFileManager.getBufferedReaderFromName(b,"##TITLE"));a.mark(400);var h=ra(400,"\x00");
a.read(h,0,400);a.reset();var l=String.instantialize(h),j=l.indexOf("#"),k=l.indexOf("<");if(0>j||0<=k&&k<j){var m=l.toLowerCase();m.contains("404")&&System.out.println(m);var m=m.contains("<animl")||m.contains("<!doctype technique")?"AnIML":m.contains("xml-cml")?"CML":null,p=JSV.common.JSViewer.getInterface("JSV.source."+m+"Reader").getSource(b,a);a.close();if(null==p)throw new JSV.exception.JSpecViewException("File type not recognized");return p}return(new JSV.source.FileReader(b,d,e,f,g)).getJDXSource(a)}catch(q){if(y(q,
JSV.exception.JSpecViewException))throw a.close(),new Exception("Error reading JDX format: "+q);throw q;}},"java.io.BufferedReader,~S,~B,~B,~N,~N");b(c$,"getJDXSource",function(a){this.source=new JSV.source.JDXSource(0,this.filePath);this.isZipFile=s(a,JSV.api.JSVZipReader);this.t=new JSV.source.JDXSourceStreamTokenizer(a);this.errorLog=new JU.SB;for(a=null;!this.done&&"##TITLE".equals(this.t.peakLabel());){null!=a&&!this.isZipFile&&this.errorLog.append("Warning - file is a concatenation without LINK record -- does not conform to IUPAC standards!\n");
for(var b=new JSV.common.JDXSpectrum,d=new JU.List;!this.done&&null!=(a=this.t.getLabel())&&!this.isEnd(a);)if(a.equals("##DATATYPE")&&this.t.getValue().toUpperCase().equals("LINK"))this.getBlockSpectra(d),b=null;else if(a.equals("##NTUPLES")||a.equals("##VARNAME"))this.getNTupleSpectra(d,b,a),b=null;else if(0<java.util.Arrays.binarySearch(JSV.source.FileReader.TABULAR_DATA_LABELS,a)){this.setTabularDataType(b,a);if(!this.processTabularData(b,d))throw new JSV.exception.JDXSourceException("Unable to read JDX file");
this.addSpectrum(b,!1);b=null}else if(null==b&&(b=new JSV.common.JDXSpectrum),!JSV.source.FileReader.readDataLabel(b,a,this.t,this.errorLog,this.obscure)){var e=this.t.getValue();JSV.source.FileReader.addHeader(d,this.t.getRawLabel(),e);this.checkCustomTags(b,a,e)}}this.source.setErrorLog(this.errorLog.toString());return this.source},"~O");b(c$,"isEnd",function(a){if(!a.equals("##END"))return!1;this.t.getValue();return!0},"~S");b(c$,"addSpectrum",function(a,b){if(!this.loadImaginary&&a.isImaginary())return J.util.Logger.info("FileReader skipping imaginary spectrum -- use LOADIMAGINARY TRUE to load this spectrum."),
!0;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.JDXSpectrum,~B");b(c$,"getBlockSpectra",function(a){J.util.Logger.debug("--JDX block start--");for(var b="",d=0==this.source.type,e=!1;null!=(b=this.t.getLabel())&&!b.equals("##TITLE");)d?JSV.source.FileReader.readHeaderLabel(this.source,b,this.t,this.errorLog,this.obscure)||
JSV.source.FileReader.addHeader(a,this.t.getRawLabel(),this.t.getValue()):this.t.getValue(),b.equals("##BLOCKS")&&100<JU.PT.parseInt(this.t.getValue())&&0>=this.firstSpec&&(e=!0);if(!"##TITLE".equals(b))throw new JSV.exception.JSpecViewException("Unable to read block source");d&&this.source.setHeaderTable(a);this.source.type=1;this.source.isCompoundSource=!0;d=new JSV.common.JDXSpectrum;a=new JU.List;JSV.source.FileReader.readDataLabel(d,b,this.t,this.errorLog,this.obscure);try{for(var f;null!=(f=
this.t.getLabel());){if("##END".equals(b)&&this.isEnd(f)){J.util.Logger.debug("##END= "+this.t.getValue());break}b=f;if(0<java.util.Arrays.binarySearch(JSV.source.FileReader.TABULAR_DATA_LABELS,b)){if(this.setTabularDataType(d,b),!this.processTabularData(d,a))throw new JSV.exception.JDXSourceException("Unable to read Block Source");}else{if(b.equals("##DATATYPE")&&this.t.getValue().toUpperCase().equals("LINK"))this.getBlockSpectra(a),b=d=null;else if(b.equals("##NTUPLES")||b.equals("##VARNAME"))this.getNTupleSpectra(a,
d,b),d=null,b="";else if(b.equals("##JCAMPCS")){for(;!(b=this.t.getLabel()).equals("##TITLE");)this.t.getValue();d=null}else this.t.getValue();if(this.done)break;if(null==d){d=new JSV.common.JDXSpectrum;a=new JU.List;if(""===b)continue;if(null==b){b="##END";continue}}if(!JSV.source.FileReader.readDataLabel(d,b,this.t,this.errorLog,this.obscure))if(this.isEnd(b)){if(0<d.getXYCoords().length&&!this.addSpectrum(d,e))return this.source;d=new JSV.common.JDXSpectrum;a=new JU.List;this.t.getValue()}else{var g=
this.t.getValue();JSV.source.FileReader.addHeader(a,this.t.getRawLabel(),g);this.checkCustomTags(d,b,g)}}}}catch(h){if(y(h,java.util.NoSuchElementException))throw new JSV.exception.JSpecViewException("Unable to Read Block Source");y(h,JSV.exception.JSpecViewException);throw h;}this.addErrorLogSeparator();this.source.setErrorLog(this.errorLog.toString());J.util.Logger.debug("--JDX block end--");return this.source},"JU.List");b(c$,"checkCustomTags",function(a,b,d){b="##$MODELS ##$PEAKS  ##$SIGNALS".indexOf(b);
switch(b){default:return!1;case 0:return this.thisModelID=JU.PT.getQuotedAttribute(d,"id"),!0;case 10:case 20:return this.peakIndex=this.source.peakCount,this.source.peakCount+=this.readPeaks(a,d,20==b),!0}},"JSV.common.JDXSpectrum,~S,~S");b(c$,"addErrorLogSeparator",function(){0<this.errorLog.length()&&this.errorLog.lastIndexOf("=====================\n")!=this.errorLog.length()-22&&this.errorLog.append("=====================\n")});b(c$,"getNTupleSpectra",function(a,b,d){var e=[1.7976931348623157E308,
4.9E-324];this.blockID=Math.random();0<this.firstSpec&&(b.numDim=1);var f=d.equals("##VARNAME");f||(d="",this.t.getValue());var g=new java.util.Hashtable,h=Array(2);0==this.source.type&&(this.source.type=2,this.source.isCompoundSource=!0,this.source.setHeaderTable(a));for(;!(d=f?d:this.t.getLabel()).equals("##PAGE");){for(var f=!1,l=new java.util.StringTokenizer(this.t.getValue(),","),j=new JU.List;l.hasMoreTokens();)j.addLast(l.nextToken().trim());g.put(d,j)}f=g.get("##SYMBOL");if(!d.equals("##PAGE"))throw new JSV.exception.JSpecViewException("Error Reading NTuple Source");
for(var l=this.t.getValue(),j=null,k=!0;!this.done;){if((d=this.t.getLabel()).equals("##ENDNTUPLES")){this.t.getValue();break}if(d.equals("##PAGE"))l=this.t.getValue();else{if(null==j&&(j=new JSV.common.JDXSpectrum,b.copyTo(j),j.setTitle(b.getTitle()),!j.is1D())){var m=l.indexOf("=");if(0<=m)try{j.setY2D(Double.parseDouble(l.substring(m+1).trim()));var p=l.substring(0,m).trim(),q=f.indexOf(p);0<=q&&j.setY2DUnits(g.get("##UNITS").get(q))}catch(r){if(!y(r,Exception))throw r;}}m=new JU.List;for(j.setHeaderTable(m);!d.equals("##DATATABLE");)JSV.source.FileReader.addHeader(m,
this.t.getRawLabel(),this.t.getValue()),d=this.t.getLabel();d=!0;q=this.t.flushLine();0<q.trim().indexOf("PEAKS")&&(d=!1);var s=q.indexOf("("),t=q.lastIndexOf(")");if(-1==s||-1==t)throw new JSV.exception.JDXSourceException("Variable List not Found");s=q.substring(s,t+1);for(q=t=0;q<f.size();q++){var u=f.get(q).trim();-1!=s.indexOf(u)&&(h[t++]=u);if(2==t)break}this.setTabularDataType(j,"##"+(d?"XYDATA":"PEAKTABLE"));if(!this.readNTUPLECoords(j,g,h,e))throw new JSV.exception.JDXSourceException("Unable to read Ntuple Source");
j.nucleusX.equals("?")||(b.nucleusX=j.nucleusX);b.nucleusY=j.nucleusY;b.freq2dX=j.freq2dX;b.freq2dY=j.freq2dY;b.y2DUnits=j.y2DUnits;for(q=0;q<a.size();q++)d=a.get(q),s=JSV.source.JDXSourceStreamTokenizer.cleanLabel(d[0]),!s.equals("##TITLE")&&(!s.equals("##DATACLASS")&&!s.equals("##NTUPLES"))&&m.addLast(d);this.addSpectrum(j,!k);k=!1;j=null}}this.addErrorLogSeparator();this.source.setErrorLog(this.errorLog.toString());J.util.Logger.info("NTUPLE MIN/MAX Y = "+e[0]+" "+e[1]);return this.source},"JU.List,JSV.source.JDXDataObject,~S");
b(c$,"readPeaks",function(a,b,d){var e=new JU.List,f=new java.io.BufferedReader(new java.io.StringReader(b));try{b=d?1:0;System.out.println("offset is "+b+" isSignals="+d);var g=d?"Signals":"Peaks";d=d?"<Signal":"<PeakData";var h=this.discardUntil(f,g);0>h.indexOf("<"+g)&&(h=this.discardUntil(f,"<"+g));if(0>h.indexOf("<"+g))return 0;var l=this.getPeakFilePath(),j=this.getQuotedAttribute(h,"model"),j=" model="+this.escape(null==j?this.thisModelID:j),k=this.getQuotedAttribute(h,"type");"HNMR".equals(k)?
k="1HNMR":"CNMR".equals(k)&&(k="13CNMR");k=null==k?"":" type="+this.escape(k);this.piUnitsX=this.getQuotedAttribute(h,"xLabel");this.piUnitsY=this.getQuotedAttribute(h,"yLabel");for(var m=new java.util.Hashtable,p=new JU.List;null!=(h=f.readLine())&&!(h=h.trim()).startsWith("</"+g);)if(h.startsWith(d)){this.info(h);var q=this.getQuotedAttribute(h,"title");null==q?(q="1HNMR"===k?"atom%S%: %ATOMS%; integration: %NATOMS%":"",q=" title="+this.escape(q)):q="";var r="<PeakData "+l+' index="%INDEX%"'+q+
k+(null==this.getQuotedAttribute(h,"model")?j:"")+" "+h.substring(d.length).trim(),s=this.getQuotedAttribute(r,"atoms");null!=s&&(r=this.simpleReplace(r,'atoms="'+s+'"','atoms="%ATOMS%"'));var t=z(100*this.parseFloatStr(this.getQuotedAttribute(h,"xMin")))+"_"+z(100*this.parseFloatStr(this.getQuotedAttribute(h,"xMax"))),u=m.get(t);null==u&&(u=[r,null==s?null:new JU.BS],m.put(t,u),p.addLast(u));var w=u[1];null!=s&&null!=w&&(s=s.$replace(","," "),w.or(this.unescapeBitSet("({"+s+"})")),System.out.println("bs is  "+
w))}for(var h=0,B=p.size(),l=0;l<B;l++){u=p.get(l);r=u[0];r=this.simpleReplace(r,"%INDEX%",""+this.getPeakIndex());w=u[1];if(null!=w){System.out.println("bs "+l+" is "+w);for(var j="",C=w.nextSetBit(0);0<=C;C=w.nextSetBit(C+1))j+=","+(C+b);var D=w.cardinality(),h=h+D,r=this.simpleReplace(r,"%ATOMS%",j.substring(1)),r=this.simpleReplace(r,"%S%",1==D?"":"s"),r=this.simpleReplace(r,"%NATOMS%",""+D)}this.info("JSpecView using "+r);this.add(e,r)}this.setSpectrumPeaks(a,e,h);return B}catch(E){if(y(E,Exception))return 0;
throw E;}},"JSV.common.JDXSpectrum,~S,~B");b(c$,"add",function(a,b){a.addLast(new JSV.common.PeakInfo(b))},"JU.List,~S");b(c$,"info",function(a){J.util.Logger.info(a)},"~S");b(c$,"unescapeBitSet",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 f=
d;Character.isDigit(a.charAt(--f)););if(++f==d)f=0;else try{f=Integer.parseInt(a.substring(f,d))}catch(g){if(y(g,NumberFormatException))return null;throw g;}for(var h=JU.BS.newN(f),l=f=-1,j=-2,e=2;e<=d;e++)switch(b=a.charAt(e)){case "\t":case " ":case "}":if(0>j)break;if(j<f)return null;f=j;0>l&&(l=j);h.setBits(l,j+1);l=-1;j=-2;break;case ":":l=f=j;j=-2;break;default:Character.isDigit(b)&&(0>j&&(j=0),j=10*j+(b.charCodeAt(0)-48))}return 0<=l?null:h},"~S");b(c$,"parseFloatStr",function(a){return JU.PT.parseFloat(a)},
"~S");b(c$,"simpleReplace",function(a,b,d){return JU.PT.simpleReplace(a,b,d)},"~S,~S,~S");b(c$,"escape",function(a){return JSV.util.JSVEscape.eS(a)},"~S");b(c$,"getQuotedAttribute",function(a,b){return JU.PT.getQuotedAttribute(a,b)},"~S,~S");b(c$,"getPeakFilePath",function(){return" file="+JSV.util.JSVEscape.eS(JU.PT.trimQuotes(this.filePath).$replace("\\","/"))});b(c$,"setSpectrumPeaks",function(a,b,d){a.setPeakList(b,this.piUnitsX,this.piUnitsY);a.setNHydrogens(d)},"JSV.common.JDXSpectrum,JU.List,~N");
b(c$,"discardUntil",function(a,b){for(var d;null!=(d=a.readLine())&&0>d.indexOf("<"+b)&&0>d.indexOf("##"););return d},"java.io.BufferedReader,~S");b(c$,"getPeakIndex",function(){return++this.peakIndex});c$.readDataLabel=b(c$,"readDataLabel",function(a,b,d,e,f){if(JSV.source.FileReader.readHeaderLabel(a,b,d,e,f))return!0;if(b.equals("##MINX")||b.equals("##MINY")||b.equals("##MAXX")||b.equals("##MAXY")||b.equals("##FIRSTY")||b.equals("##DELTAX")||b.equals("##DATACLASS"))return d.getValue(),!0;if(b.equals("##FIRSTX"))return a.fileFirstX=
Double.parseDouble(d.getValue()),!0;if(b.equals("##LASTX"))return a.fileLastX=Double.parseDouble(d.getValue()),!0;if(b.equals("##NPOINTS"))return a.nPointsFile=Integer.parseInt(d.getValue()),!0;if(b.equals("##XFACTOR"))return a.xFactor=Double.parseDouble(d.getValue()),!0;if(b.equals("##YFACTOR"))return a.yFactor=Double.parseDouble(d.getValue()),!0;if(b.equals("##XUNITS"))return a.setXUnits(d.getValue()),!0;if(b.equals("##YUNITS"))return a.setYUnits(d.getValue()),!0;if(b.equals("##XLABEL"))return a.setXLabel(d.getValue()),
!1;if(b.equals("##YLABEL"))return a.setYLabel(d.getValue()),!1;if(b.equals("##NUMDIM"))return a.numDim=Integer.parseInt(d.getValue()),!0;if(b.equals("##.OBSERVEFREQUENCY"))return a.observedFreq=Double.parseDouble(d.getValue()),!0;if(b.equals("##.OBSERVENUCLEUS"))return a.setObservedNucleus(d.getValue()),!0;if(b.equals("##$OFFSET")&&0!=a.shiftRefType)return 1.7976931348623157E308==a.offset&&(a.offset=Double.parseDouble(d.getValue())),a.dataPointNum=1,a.shiftRefType=1,!1;if(b.equals("##$REFERENCEPOINT")&&
0!=a.shiftRefType)return a.offset=Double.parseDouble(d.getValue()),a.dataPointNum=1,a.shiftRefType=2,!1;if(b.equals("##.SHIFTREFERENCE")){b=d.getValue();if(!a.dataType.toUpperCase().contains("SPECTRUM"))return!0;b=new java.util.StringTokenizer(b,",");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(g){if(y(g,NumberFormatException)||y(g,java.util.NoSuchElementException))return!0;
throw g;}0>=a.dataPointNum&&(a.dataPointNum=1);a.shiftRefType=0;return!0}return!1},"JSV.source.JDXDataObject,~S,JSV.source.JDXSourceStreamTokenizer,JU.SB,~B");c$.readHeaderLabel=b(c$,"readHeaderLabel",function(a,b,d,e,f){return b.equals("##TITLE")?(b=d.getValue(),a.setTitle(f||null==b||b.equals("")?"Unknown":b),!0):b.equals("##JCAMPDX")?(b=d.getValue(),a.jcampdx=b,a=JU.PT.parseFloat(b),(6<=a||Float.isNaN(a))&&null!=e&&e.append("Warning: JCAMP-DX version may not be fully supported: "+b+"\n"),!0):b.equals("##ORIGIN")?
(b=d.getValue(),a.origin=null!=b&&!b.equals("")?b:"Unknown",!0):b.equals("##OWNER")?(b=d.getValue(),a.owner=null!=b&&!b.equals("")?b:"Unknown",!0):b.equals("##DATATYPE")?(a.dataType=d.getValue(),!0):b.equals("##LONGDATE")?(a.longDate=d.getValue(),!0):b.equals("##DATE")?(a.date=d.getValue(),!0):b.equals("##TIME")?(a.time=d.getValue(),!0):!1},"JSV.source.JDXHeader,~S,JSV.source.JDXSourceStreamTokenizer,JU.SB,~B");b(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");b(c$,"processTabularData",function(a,b){if(a.dataClass.equals("PEAKASSIGNMENTS"))return!0;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(d){if(y(d,java.io.IOException))d.printStackTrace();else throw d;}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.List");b(c$,"readNTUPLECoords",function(a,
b,d,e){var f;if(a.dataClass.equals("XYDATA")){f=b.get("##SYMBOL");var g=f.indexOf(d[0]);d=f.indexOf(d[1]);f=b.get("##VARNAME");a.varName=f.get(d).toUpperCase();f=b.get("##FACTOR");a.xFactor=Double.parseDouble(f.get(g));a.yFactor=Double.parseDouble(f.get(d));f=b.get("##LAST");a.fileLastX=Double.parseDouble(f.get(g));f=b.get("##FIRST");a.fileFirstX=Double.parseDouble(f.get(g));f=b.get("##VARDIM");a.nPointsFile=Integer.parseInt(f.get(g));f=b.get("##UNITS");a.setXUnits(f.get(g));a.setYUnits(f.get(d));
null==a.nucleusX&&null!=(f=b.get("##.NUCLEUS"))?(a.setNucleus(f.get(0),!1),a.setNucleus(f.get(g),!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")),f=b.get("##SYMBOL"),g=f.indexOf(d[0]),d=f.indexOf(d[1]),f=b.get("##UNITS"),a.setXUnits(f.get(g)),a.setYUnits(f.get(d)),a.setXYCoords(JSV.common.Coordinate.parseDSV(this.t.getValue(),a.xFactor,a.yFactor)),!0):!1},
"JSV.source.JDXDataObject,java.util.Map,~A,~A");b(c$,"decompressData",function(a,b){var d=this.errorLog.length(),e=JSV.common.Coordinate.deltaX(a.fileLastX,a.fileFirstX,a.nPointsFile);a.setIncreasing(0<e);a.setContinuous(!0);var f=new JSV.source.JDXDecompressor(this.t,a.fileFirstX,a.xFactor,a.yFactor,e,a.nPointsFile),g=sa(2,0),h=System.currentTimeMillis(),l=f.decompressData(this.errorLog,g);System.out.println("decompression time = "+(System.currentTimeMillis()-h)+" ms");a.setXYCoords(l);h=f.getMinY();
null!=b&&(h<b[0]&&(b[0]=h),h=f.getMaxY(),h>b[1]&&(b[1]=h));f=Double.isNaN(a.freq2dX)?a.observedFreq:a.freq2dX;1.7976931348623157E308!=a.offset&&(1.7976931348623157E308!=f&&a.dataType.toUpperCase().contains("SPECTRUM"))&&JSV.common.Coordinate.applyShiftReference(l,a.dataPointNum,a.fileFirstX,a.fileLastX,a.offset,f,a.shiftRefType);1.7976931348623157E308!=f&&a.getXUnits().toUpperCase().equals("HZ")&&(JSV.common.Coordinate.applyScale(l,1/f,1),a.setXUnits("PPM"),a.setHZtoPPM(!0));this.errorLog.length()!=
d&&(this.errorLog.append(a.getTitle()).append("\n"),this.errorLog.append("firstX: "+a.fileFirstX+" Found "+g[0]+"\n"),this.errorLog.append("lastX from Header "+a.fileLastX+" Found "+g[1]+"\n"),this.errorLog.append("deltaX from Header "+e+"\n"),this.errorLog.append("Number of points in Header "+a.nPointsFile+" Found "+l.length+"\n"));J.util.Logger.debugging&&System.err.println(this.errorLog.toString())},"JSV.source.JDXDataObject,~A");c$.addHeader=b(c$,"addHeader",function(a,b,d){for(var e,f=0;f<a.size();f++)if((e=
a.get(f))[0].equals(b)){e[1]=d;return}a.addLast([b,d,JSV.source.JDXSourceStreamTokenizer.cleanLabel(b)])},"JU.List,~S,~S");B(c$,"VAR_LIST_TABLE",[["PEAKTABLE","XYDATA","XYPOINTS"],["(XY..XY)","(X++(Y..Y))","(XY..XY)"]],"ERROR_SEPARATOR","=====================\n","TABULAR_DATA_LABELS",["##DATATABLE","##PEAKASSIGNMENTS","##PEAKTABLE","##XYDATA","##XYPOINTS"])});p("JSV.source");q(["JSV.source.JDXHeader"],"JSV.source.JDXDataObject","java.lang.Character $.Double JU.DF $.PT JSV.common.Annotation $.Coordinate $.Integral JSV.exception.JSpecViewException J.util.Logger".split(" "),
function(){c$=u(function(){this.filePathForwardSlash=this.filePath=null;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;t(this,arguments)},JSV.source,"JDXDataObject",JSV.source.JDXHeader);b(c$,"setFilePath",function(a){null!=a&&(this.filePath=a.trim(),this.filePathForwardSlash=this.filePath.$replace("\\","/"))},"~S");b(c$,"getFilePath",function(){return this.filePath});b(c$,"getFilePathForwardSlash",function(){return this.filePathForwardSlash});
b(c$,"setBlockID",function(a){this.blockID=a},"~N");b(c$,"isImaginary",function(){return this.varName.contains("IMAG")});b(c$,"setXFactor",function(a){this.xFactor=a},"~N");b(c$,"getXFactor",function(){return this.xFactor});b(c$,"setYFactor",function(a){this.yFactor=a},"~N");b(c$,"getYFactor",function(){return this.yFactor});b(c$,"checkRequiredTokens",function(){if(1.7976931348623157E308==this.fileFirstX)throw new JSV.exception.JSpecViewException("Error Reading Data Set: ##FIRST not found");if(1.7976931348623157E308==
this.fileLastX)throw new JSV.exception.JSpecViewException("Error Reading Data Set: ##LASTX not found");if(-1==this.nPointsFile)throw new JSV.exception.JSpecViewException("Error Reading Data Set: ##NPOINTS not found");if(1.7976931348623157E308==this.xFactor)throw new JSV.exception.JSpecViewException("Error Reading Data Set: ##XFACTOR not found");if(1.7976931348623157E308==this.yFactor)throw new JSV.exception.JSpecViewException("Error Reading Data Set: ##YFACTOR not found");});b(c$,"setXUnits",function(a){this.xUnits=
a},"~S");b(c$,"getXUnits",function(){return this.xUnits});b(c$,"setYUnits",function(a){this.yUnits=a},"~S");b(c$,"getYUnits",function(){return this.yUnits});b(c$,"setXLabel",function(a){this.xLabel=a},"~S");b(c$,"setYLabel",function(a){this.yLabel=a},"~S");b(c$,"setObservedNucleus",function(a){this.observedNucl=a;1==this.numDim&&(this.parent.nucleusX=this.nucleusX=JU.PT.trim(a,"[]^<>"))},"~S");b(c$,"setObservedFreq",function(a){this.observedFreq=a},"~N");b(c$,"getObservedFreq",function(){return this.observedFreq});
b(c$,"is1D",function(){return 1==this.numDim});b(c$,"setY2D",function(a){this.y2D=a},"~N");b(c$,"getY2D",function(){return this.y2D});b(c$,"setY2DUnits",function(a){this.y2DUnits=a},"~S");b(c$,"getY2DPPM",function(){var a=this.y2D;this.y2DUnits.equals("HZ")&&(a/=this.freq2dY);return a});b(c$,"setNucleus",function(a,b){b?this.nucleusX=a:this.nucleusY=a;var d;if(0<=this.observedNucl.indexOf(a))d=this.observedFreq;else{d=JSV.source.JDXDataObject.getGyroMagneticRatio(this.observedNucl);var e=JSV.source.JDXDataObject.getGyroMagneticRatio(a);
d=this.observedFreq*e/d}b?this.freq2dX=d:this.freq2dY=d;J.util.Logger.info("Freq for "+a+" = "+d)},"~S,~B");c$.getGyroMagneticRatio=b(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");b(c$,"isTransmittance",function(){var a=
this.yUnits.toLowerCase();return a.equals("transmittance")||a.contains("trans")||a.equals("t")});b(c$,"isAbsorbance",function(){var a=this.yUnits.toLowerCase();return a.equals("absorbance")||a.contains("abs")||a.equals("a")});b(c$,"canSaveAsJDX",function(){return this.getDataClass().equals("XYDATA")});b(c$,"canIntegrate",function(){return this.continuous&&(this.isHNMR()||this.isGC())&&this.is1D()});b(c$,"isAutoOverlayFromJmolClick",function(){return this.isGC()});b(c$,"isGC",function(){return this.dataType.startsWith("GC")});
b(c$,"isMS",function(){return this.dataType.startsWith("MASS")||this.dataType.startsWith("MS")});b(c$,"isStackable",function(){return!this.isMS()});b(c$,"isScalable",function(){return!0});b(c$,"getYRef",function(){return!this.isTransmittance()?0:2>JSV.common.Coordinate.getMaxY(this.xyCoords,0,this.xyCoords.length)?1:100});b(c$,"isInverted",function(){return this.isTransmittance()});b(c$,"canConvertTransAbs",function(){return this.continuous&&this.yUnits.toLowerCase().contains("abs")||this.yUnits.toLowerCase().contains("trans")});
b(c$,"canShowSolutionColor",function(){return this.canConvertTransAbs()&&(this.xUnits.toLowerCase().contains("nanometer")||this.xUnits.equalsIgnoreCase("nm"))&&401>this.getFirstX()&&699<this.getLastX()});b(c$,"isHZtoPPM",function(){return this.$isHZtoPPM});b(c$,"setHZtoPPM",function(a){this.$isHZtoPPM=a},"~B");b(c$,"setIncreasing",function(a){this.xIncreases=a},"~B");b(c$,"isXIncreasing",function(){return this.xIncreases});b(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});b(c$,"setContinuous",function(a){this.continuous=a},"~B");b(c$,"isContinuous",function(){return this.continuous});b(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 d=this.xIncreases?this.getFirstX():this.getLastX();b[a++]=["##FIRSTX",String.valueOf(this.isHZtoPPM()?d*this.observedFreq:d)];d=this.xIncreases?this.getLastX():this.getFirstX();b[a++]=
["##FIRSTY",String.valueOf(this.xIncreases?this.getFirstY():this.getLastY())];b[a++]=["##LASTX",String.valueOf(this.isHZtoPPM()?d*this.observedFreq:d)];b[a++]=["##XFACTOR",String.valueOf(this.getXFactor())];b[a++]=["##YFACTOR",String.valueOf(this.getYFactor())];b[a++]=["##NPOINTS",String.valueOf(this.getNumberOfPoints())];return b});b(c$,"getDefaultUnitPrecision",function(){return 2});b(c$,"setMeasurementText",function(a){var b=a.getValue();if(Double.isNaN(b))return"";var d=1,e="";if(this.isNMR())if(1==
this.numDim)a=s(a,JSV.common.Integral),this.isHNMR()||a?a||(b*=this.observedFreq,e=" Hz"):(e=" ppm",d=2);else return"";return 0.1>b?"":JU.DF.formatDecimalDbl(b,d)+e},"JSV.common.Measurement");b(c$,"isNMR",function(){return 0<=this.dataType.toUpperCase().indexOf("NMR")});b(c$,"isHNMR",function(){return this.isNMR()&&0<=this.observedNucl.toUpperCase().indexOf("H")});b(c$,"setXYCoords",function(a){this.xyCoords=a},"~A");b(c$,"getFirstX",function(){return this.xyCoords[0].getXVal()});b(c$,"getFirstY",
function(){return this.xyCoords[0].getYVal()});b(c$,"getLastX",function(){return this.xyCoords[this.getNumberOfPoints()-1].getXVal()});b(c$,"getLastY",function(){return this.xyCoords[this.getNumberOfPoints()-1].getYVal()});b(c$,"getNumberOfPoints",function(){return this.xyCoords.length});b(c$,"getMinX",function(){return Double.isNaN(this.minX)?this.minX=JSV.common.Coordinate.getMinX(this.xyCoords,0,this.xyCoords.length):this.minX});b(c$,"getMinY",function(){return Double.isNaN(this.minY)?this.minY=
JSV.common.Coordinate.getMinY(this.xyCoords,0,this.xyCoords.length):this.minY});b(c$,"getMaxX",function(){return Double.isNaN(this.maxX)?this.maxX=JSV.common.Coordinate.getMaxX(this.xyCoords,0,this.xyCoords.length):this.maxX});b(c$,"getMaxY",function(){return Double.isNaN(this.maxY)?this.maxY=JSV.common.Coordinate.getMaxY(this.xyCoords,0,this.xyCoords.length):this.maxY});b(c$,"getDeltaX",function(){return Double.isNaN(this.deltaX)?this.deltaX=JSV.common.Coordinate.deltaX(this.getLastX(),this.getFirstX(),
this.getNumberOfPoints()):this.deltaX});b(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");b(c$,"getTypeLabel",function(){return this.isNMR()?this.nucleusX+"NMR":this.dataType});b(c$,"getDefaultAnnotationInfo",function(a){var b,
d=this.isNMR();switch(a){case JSV.common.Annotation.AType.Integration:return[null,[1],null];case JSV.common.Annotation.AType.Measurements:return a=d?["Hz","ppm"]:[""],b=this.isHNMR()?[1,4]:[1,3],[a,b,Integer.$valueOf(0)];case JSV.common.Annotation.AType.PeakList:return a=d?["Hz","ppm"]:[""],b=this.isHNMR()?[1,2]:[1,1],[a,b,Integer.$valueOf(d?1:0)]}return null},"JSV.common.Annotation.AType");b(c$,"getPeakListArray",function(a,b,d){var e=a.getXVal();a=a.getYVal()/d;d=Math.abs(e-b[0]);b[0]=e;var f=d+
b[1];b[1]=d;var g=f+b[2];b[2]=f;return this.isNMR()?[e,a,e*this.observedFreq,20<d*this.observedFreq?0:d*this.observedFreq,20<f*this.observedFreq?0:f*this.observedFreq,20<g*this.observedFreq?0:g*this.observedFreq]:[e,a]},"JSV.common.Measurement,~A,~N");B(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])});p("JSV.source");q(null,"JSV.source.JDXDecompressor",["java.lang.Double","JSV.common.Coordinate","J.util.Logger"],function(){c$=u(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;t(this,arguments)},JSV.source,"JDXDecompressor");b(c$,"getMinY",function(){return this.minY});b(c$,"getMaxY",function(){return this.maxY});w(c$,function(a,b,
d,e,f,g){this.t=a;this.firstX=b;this.xFactor=d;this.yFactor=e;this.deltaX=f;this.nPoints=g;this.lineNumber=a.getLabelLineNo();this.debugging=J.util.Logger.isActiveLevel(6)},"JSV.source.JDXSourceStreamTokenizer,~N,~N,~N,~N,~N");b(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");b(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 d=Math.abs(0.35*this.deltaX),e=Math.abs(1.4*this.deltaX),f=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 g=-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 l=this.xyCoords[this.ipt-1],j=Math.abs(l.getXVal()-h.getXVal());if(g&&j<d){this.xyCoords[this.ipt-1]=h;var k=
l.getYVal(),m=h.getYVal();m!=k&&this.logError(this.lastLine+"\n"+this.line+"\nY-value Checkpoint Error! Line "+this.lineNumber+" for y1="+m+" y0="+k)}else this.addPoint(h),(j<f||j>e)&&this.logError(this.lastLine+"\n"+this.line+"\nX-sequence Checkpoint Error! Line "+this.lineNumber+" |x1-x0|="+j+" instead of "+Math.abs(this.deltaX)+" for x1="+h.getXVal()+" x0="+l.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),d=Array(this.ipt),System.arraycopy(this.xyCoords,0,d,0,this.ipt),this.xyCoords=d);return 0<this.deltaX?this.xyCoords:JSV.common.Coordinate.reverse(this.xyCoords)},"JU.SB,~A");b(c$,"logError",function(a){this.debugging&&J.util.Logger.debug(a);
this.errorLog.append(a).appendC("\n")},"~S");b(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&&J.util.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()});b(c$,"getDifDup",function(a){var b=this.ich;this.next();var d=a+this.line.substring(b,this.ich);return b==this.ich?a:Integer.$valueOf(d).intValue()},"~N");b(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()});b(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 d=1;switch(b){case "-":d=-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 d*Double.$valueOf(this.line.substring(a,this.ich)).doubleValue()});
b(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)});b(c$,"testAlgorithm",function(){});B(c$,"allDelim","+-%@ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrs? ,\t\n","WHITE_SPACE"," ,\t\n")});p("JSV.source");q(["JU.List"],"JSV.source.JDXHeader",null,function(){c$=u(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;t(this,arguments)},JSV.source,"JDXHeader");N(c$,function(){this.headerTable=new JU.List});b(c$,"setTitle",function(a){this.title=a},"~S");b(c$,"setJcampdx",function(a){this.jcampdx=a},"~S");b(c$,"setDataType",function(a){this.dataType=a},"~S");b(c$,"setDataClass",function(a){this.dataClass=a},"~S");b(c$,"setOrigin",function(a){this.origin=a},"~S");b(c$,"setOwner",function(a){this.owner=
a},"~S");b(c$,"setLongDate",function(a){this.longDate=a},"~S");b(c$,"setDate",function(a){this.date=a},"~S");b(c$,"setTime",function(a){this.time=a},"~S");b(c$,"getTitle",function(){return this.title});c$.getTypeName=b(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");b(c$,"getQualifiedDataType",function(){return null==this.qualifiedType?
this.qualifiedType=JSV.source.JDXHeader.getTypeName(this.dataType):this.qualifiedType});b(c$,"getJcampdx",function(){return this.jcampdx});b(c$,"getDataType",function(){return this.dataType});b(c$,"getOrigin",function(){return this.origin});b(c$,"getOwner",function(){return this.owner});b(c$,"getLongDate",function(){return this.longDate});b(c$,"getDate",function(){return this.date});b(c$,"getTime",function(){return this.time});b(c$,"getDataClass",function(){return this.dataClass});b(c$,"setHeaderTable",
function(a){this.headerTable=a},"JU.List");b(c$,"getHeaderTable",function(){return this.headerTable});b(c$,"getHeaderRowDataAsArray",function(a,b){var d=Array((a?6:5)+this.headerTable.size()+b),e=0;d[e++]=["##TITLE",this.title];d[e++]=["##JCAMP-DX",this.jcampdx];d[e++]=["##DATA TYPE",this.dataType];a&&(d[e++]=["##DATA CLASS",this.dataClass]);d[e++]=["##ORIGIN",this.origin];d[e++]=["##OWNER",this.owner];for(var f=0;f<this.headerTable.size();f++)d[e++]=this.headerTable.get(f);return d},"~B,~N");B(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(";"))});p("JSV.source");q(["JSV.source.JDXHeader"],"JSV.source.JDXSource",["JU.List"],function(){c$=u(function(){this.type=0;this.isCompoundSource=!1;this.jdxSpectra=null;this.errors="";this.filePath=null;this.peakCount=0;this.isView=!1;t(this,arguments)},JSV.source,"JDXSource",JSV.source.JDXHeader);b(c$,"dispose",function(){this.jdxSpectra=
this.headerTable=null});w(c$,function(a,b){R(this,JSV.source.JDXSource,[]);this.type=a;this.setFilePath(b);this.headerTable=new JU.List;this.jdxSpectra=new JU.List;this.isCompoundSource=0!=a},"~N,~S");b(c$,"getJDXSpectrum",function(a){return this.jdxSpectra.size()<=a?null:this.jdxSpectra.get(a)},"~N");b(c$,"addJDXSpectrum",function(a,b,d){null==a&&(a=this.filePath);b.setFilePath(a);a=this.jdxSpectra.size();(0==a||!this.jdxSpectra.get(a-1).addSubSpectrum(b,d))&&this.jdxSpectra.addLast(b)},"~S,JSV.common.JDXSpectrum,~B");
b(c$,"getNumberOfSpectra",function(){return this.jdxSpectra.size()});b(c$,"getSpectra",function(){return this.jdxSpectra});b(c$,"getSpectraAsArray",function(){return null==this.jdxSpectra?null:this.jdxSpectra.toArray()});b(c$,"getErrorLog",function(){return this.errors});b(c$,"setErrorLog",function(a){this.errors=a},"~S");b(c$,"setFilePath",function(a){this.filePath=a},"~S");b(c$,"getFilePath",function(){return this.filePath});c$.createView=b(c$,"createView",function(a){var b=new JSV.source.JDXSource(-2,
"view");b.isView=!0;for(var d=0;d<a.size();d++)b.addJDXSpectrum(a.get(d).getFilePath(),a.get(d),!1);return b},"JU.List");b(c$,"getHeaderRowDataAsArray",function(a,b){null==b&&(b=ia(0,0,null));for(var d=this.getHeaderRowDataAsArray(a,b.length),e=b.length;0<=--e;)d[d.length-b.length+e]=b[e];return d},"~B,~A");B(c$,"TYPE_VIEW",-2,"TYPE_UNKNOWN",-1,"TYPE_SIMPLE",0,"TYPE_BLOCK",1,"TYPE_NTUPLE",2)});p("JSV.source");q(null,"JSV.source.JDXSourceStreamTokenizer",["java.lang.Character","JU.SB","J.util.Logger"],
function(){c$=u(function(){this.value=this.label=this.br=null;this.labelLineNo=0;this.line=null;this.lineNo=0;t(this,arguments)},JSV.source,"JDXSourceStreamTokenizer");w(c$,function(a){this.br=a},"java.io.BufferedReader");b(c$,"peakLabel",function(){return this.nextLabel(!1)});b(c$,"getLabel",function(){return this.nextLabel(!0)});b(c$,"nextLabel",function(a){for(this.value=this.label=null;null==this.line;){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 d=this.line.indexOf("=");0>d?(a&&J.util.Logger.info("BAD JDX LINE -- no '=' (line "+this.lineNo+"): "+this.line),this.label=this.line,a||(this.line="")):(this.label=this.line.substring(0,d).trim(),a&&(this.line=this.line.substring(d+1)));this.labelLineNo=this.lineNo;J.util.Logger.debugging&&J.util.Logger.info(this.label);return JSV.source.JDXSourceStreamTokenizer.cleanLabel(this.label)},"~B");
c$.cleanLabel=b(c$,"cleanLabel",function(a){if(null==a)return null;var b,d=new JU.SB;for(b=0;b<a.length;b++)switch(a.charAt(b)){case "/":case "\\":case " ":case "-":case "_":break;default:d.appendC(a.charAt(b))}return d.toString().toUpperCase()},"~S");b(c$,"getRawLabel",function(){return this.label});b(c$,"getLabelLineNo",function(){return this.labelLineNo});b(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))b.printStackTrace();else throw b;}this.value=JSV.source.JDXSourceStreamTokenizer.trimLines(a);J.util.Logger.debugging&&J.util.Logger.info(this.value);return this.value});b(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)});
b(c$,"flushLine",function(){var a=(new JU.SB).append(this.line);this.line=null;return JSV.source.JDXSourceStreamTokenizer.trimLines(a)});b(c$,"readLine",function(){this.line=this.br.readLine();this.lineNo++;return this.line});c$.trimLines=b(c$,"trimLines",function(a){var b=a.length(),d=b-1,e=JSV.source.JDXSourceStreamTokenizer.ptNonWhite(a,0,b);if(e>=b)return"";if("<"==a.charAt(e))return b=a.lastIndexOf(">")+1,0==b&&(b=a.length()),a.toString().substring(e,b);for(var f=ra(b-e,"\x00"),g=0;e<b;e++){var h;
switch(h=a.charAt(e)){case "\r":if(e<d&&"\n"==a.charAt(e+1))continue;h="\n";break;case "\n":0<g&&"\n"!=f[g-1]&&(g-=e-JSV.source.JDXSourceStreamTokenizer.ptNonSpaceRev(a,e)-1);e=JSV.source.JDXSourceStreamTokenizer.ptNonSpace(a,++e,b)-1;break;case "$":if(e<d&&"$"==a.charAt(e+1)){for(e++;++e<b&&0>"\n\r".indexOf(a.charAt(e)););continue}}"\n"==h&&0<g&&"\n"==f[g-1]||(f[g++]=h)}0<g&&"\n"==f[g-1]&&--g;return String.instantialize(f).substring(0,g).trim()},"JU.SB");c$.ptNonWhite=b(c$,"ptNonWhite",function(a,
b,d){for(;b<d&&Character.isWhitespace(a.charAt(b));)b++;return b},"JU.SB,~N,~N");c$.ptNonSpace=b(c$,"ptNonSpace",function(a,b,d){for(;b<d&&(" "==a.charAt(b)||"\t"==a.charAt(b));)b++;return b},"JU.SB,~N,~N");c$.ptNonSpaceRev=b(c$,"ptNonSpaceRev",function(a,b){for(;0<=--b&&(" "==a.charAt(b)||"\t"==a.charAt(b)););return b},"JU.SB,~N")});p("JSV.tree");q(["JSV.api.JSVTree"],"JSV.tree.SimpleTree",["JSV.common.JSVFileManager","$.PanelNode","JSV.tree.SimpleTreeModel","$.SimpleTreeNode","$.SimpleTreePath"],
function(){c$=u(function(){this.selectedPath=this.viewer=this.spectraTreeModel=this.rootNode=this.si=null;t(this,arguments)},JSV.tree,"SimpleTree",null,JSV.api.JSVTree);e(c$,"getRootNode",function(){return this.rootNode});w(c$,function(a){this.viewer=a;this.rootNode=new JSV.tree.SimpleTreeNode("Spectra",null);this.spectraTreeModel=new JSV.tree.SimpleTreeModel(this.rootNode)},"JSV.common.JSViewer");b(c$,"valueChanged",function(){this.viewer.selectedTreeNode(this.getLastSelectedPathComponent())});b(c$,
"getLastSelectedPathComponent",function(){return null==this.selectedPath?null:this.selectedPath.getLastPathComponent()});e(c$,"setSelectedPanel",function(a,b){if(null!=b){var d=JSV.common.PanelNode.findNode(b,this.viewer.panelNodes).treeNode;this.setSelectionPath(this.viewer.spectraTree.newTreePath(d.getPath()))}},"JSV.api.ScriptInterface,JSV.api.JSVPanel");b(c$,"setSelectionPath",function(a){this.selectedPath=a;this.valueChanged()},"JSV.api.JSVTreePath");e(c$,"createTree",function(a,b,d){var e=this.viewer.spectraTree,
f=e.getRootNode(),g=this.viewer.panelNodes,h=JSV.common.JSVFileManager.getName(b.getFilePath()),l=new JSV.common.PanelNode(null,h,b,null),j=new JSV.tree.SimpleTreeNode(h,l);l.setTreeNode(j);e.spectraTreeModel.insertNodeInto(j,f,f.getChildCount());f=a.siGetFileCount()+1;a.siSetFileCount(f);for(var k=0;k<d.length;k++){var l=a.siGetNewPanelNode(f+"."+(k+1),h,b,d[k]),m=new JSV.tree.SimpleTreeNode(l.toString(),l);l.setTreeNode(m);g.addLast(l);e.spectraTreeModel.insertNodeInto(m,j,j.getChildCount())}this.viewer.selectFrameNode(d[0]);
return j},"JSV.api.ScriptInterface,JSV.source.JDXSource,~A");e(c$,"setPath",function(a){this.setSelectionPath(a)},"JSV.api.JSVTreePath");b(c$,"newTreePath",function(a){return new JSV.tree.SimpleTreePath(a)},"~A");e(c$,"deleteNodes",function(a){for(var b=0;b<a.size();b++)this.spectraTreeModel.removeNodeFromParent(a.get(b))},"JU.List")});p("JSV.tree");q(["java.util.Enumeration"],"JSV.tree.SimpleTreeEnumeration",null,function(){c$=u(function(){this.node=null;this.pt=0;t(this,arguments)},JSV.tree,"SimpleTreeEnumeration",
null,java.util.Enumeration);w(c$,function(a){this.node=a},"JSV.tree.SimpleTreeNode");e(c$,"hasMoreElements",function(){return this.pt<this.node.$children.size()});e(c$,"nextElement",function(){return this.node.$children.get(this.pt++)})});p("JSV.tree");c$=u(function(){this.rootNode=null;t(this,arguments)},JSV.tree,"SimpleTreeModel");w(c$,function(a){this.rootNode=a},"JSV.api.JSVTreeNode");b(c$,"insertNodeInto",function(a,b,d){b.$children.add(d,a);a.prevNode=b},"JSV.api.JSVTreeNode,JSV.api.JSVTreeNode,~N");
b(c$,"removeNodeFromParent",function(a){a.prevNode.$children.removeObj(a)},"JSV.api.JSVTreeNode");p("JSV.tree");q(["JSV.api.JSVTreeNode"],"JSV.tree.SimpleTreeNode",["JU.List","JSV.tree.SimpleTreeEnumeration"],function(){c$=u(function(){this.panelNode=null;this.index=0;this.text=this.$children=this.prevNode=null;t(this,arguments)},JSV.tree,"SimpleTreeNode",null,JSV.api.JSVTreeNode);w(c$,function(a,b){this.text=a;this.panelNode=b;this.$children=new JU.List},"~S,JSV.common.PanelNode");e(c$,"getPanelNode",
function(){return this.panelNode});e(c$,"getIndex",function(){return this.index});e(c$,"setIndex",function(a){this.index=a},"~N");e(c$,"children",function(){return new JSV.tree.SimpleTreeEnumeration(this)});e(c$,"getChildCount",function(){return this.$children.size()});e(c$,"getPath",function(){var a=new JU.List,b=this;for(a.addLast(b);null!=(b=b.prevNode);)a.add(0,b);return a.toArray()});e(c$,"isLeaf",function(){return null!=this.prevNode&&null!=this.prevNode.prevNode});e(c$,"toString",function(){return this.text})});
p("JSV.tree");q(["JSV.api.JSVTreePath"],"JSV.tree.SimpleTreePath",null,function(){c$=u(function(){this.path=null;t(this,arguments)},JSV.tree,"SimpleTreePath",null,JSV.api.JSVTreePath);w(c$,function(a){this.path=a},"~A");e(c$,"getLastPathComponent",function(){return null==this.path||0==this.path.length?null:this.path[this.path.length-1]})});p("JSV.util");q(null,"JSV.util.JSVEscape",["JU.SB"],function(){c$=G(JSV.util,"JSVEscape");c$.eS=b(c$,"eS",function(a){if(null==a)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++),f='\\\\\tt\rr\nn""'.charAt(d++),g=new JU.SB,h=0;0<=(b=a.indexOf(e,b+1));)g.append(a.substring(h,b)).appendC("\\").appendC(f),h=b+1;g.append(a.substring(h,a.length));a=g.toString()}for(d=a.length;0<=--d;)127<a.charCodeAt(d)&&(a=a.substring(0,d)+JSV.util.JSVEscape.unicode(a.charAt(d))+a.substring(d+1));return'"'+a+'"'},"~S");c$.unicode=b(c$,"unicode",function(a){a="0000"+Integer.toHexString(a.charCodeAt(0));
return"\\u"+a.substring(a.length-4)},"~S");B(c$,"escapable",'\\\\\tt\rr\nn""')})}})();Clazz_coreLoaded=!0})(Clazz,Clazz.newArray,Clazz.newBooleanArray,Clazz.newByteArray,Clazz.newCharArray,Clazz.newDoubleArray,Clazz.newFloatArray,Clazz.newIntArray,Clazz.newLongArray,Clazz.newShortArray,Clazz.prepareCallback,Clazz.decorateAsClass,Clazz.isClassDefined,Clazz.defineEnumConstant,Clazz.cloneFinals,Clazz.inheritArgs,Clazz.pu$h,Clazz.declareInterface,Clazz.declarePackage,Clazz.makeConstructor,Clazz.overrideConstructor,
Clazz.load,Clazz.defineMethod,Clazz.innerTypeInstance,Clazz.instanceOf,Clazz.p0p,Clazz.makeFunction,Clazz.superConstructor,Clazz.defineStatics,Clazz.registerSerializableFields,Clazz.declareType,Clazz.superCall,Clazz.overrideMethod,Clazz.declareAnonymous,Clazz.checkPrivateMethod,Clazz.prepareFields,Clazz.instantialize,Clazz.doubleToInt,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.supportsNativeObject,Clazz.extendedObjectMethods,
Clazz.callingStackTraces,Clazz.clone,Clazz.doubleToShort,Clazz.innerFunctions,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);
