___JmolDate="$Date: 2013-04-28 10:14:59 -0500 (Sun, 28 Apr 2013) $";___fullJmolProperties="src/org/jmol/viewer/Jmol.properties";___JmolVersion="13.1.15_dev_2013.04.28a";
(function(){Clazz.dateToString=Date.prototype.toString;java.lang.Number=Number;if(Clazz.supportsNativeObject)for(var F=0;F<Clazz.extendedObjectMethods.length;F++){var O=Clazz.extendedObjectMethods[F];Number.prototype[O]=JavaObject.prototype[O]}Number.__CLASS_NAME__="Number";Clazz.implementOf(Number,java.io.Serializable);Number.equals=Clazz.innerFunctions.equals;Number.getName=Clazz.innerFunctions.getName;Number.serialVersionUID=Number.prototype.serialVersionUID=-0x79536ae2f46b2000;$_M(Number,"shortValue",
function(){return Math.round(this)&65535});$_M(Number,"byteValue",function(){return Math.round(this)&255});$_M(Number,"intValue",function(){return Math.round(this)&4294967295});$_M(Number,"longValue",function(){return Math.round(this)});$_M(Number,"floatValue",function(){return this.valueOf()});$_M(Number,"doubleValue",function(){return this.valueOf()});$_V(Number,"hashCode",function(){return this.valueOf()});java.lang.Integer=Integer=function(){Clazz.instantialize(this,arguments)};Clazz.decorateAsType(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()};$_k(Integer,function(a){var b=Math.round(a)&4294967295;this.valueOf=function(){return b}});Integer.serialVersionUID=Integer.prototype.serialVersionUID=0x12e2a0a4f7818700;Integer.MIN_VALUE=Integer.prototype.MIN_VALUE=-2147483648;Integer.MAX_VALUE=Integer.prototype.MAX_VALUE=
2147483647;Integer.TYPE=Integer.prototype.TYPE=Integer;$_M(Integer,"bitCount",function(a){a-=a>>>1&1431655765;a=(a&858993459)+(a>>>2&858993459);a=a+(a>>>4)&252645135;a+=a>>>8;return a+(a>>>16)&63},"Number");Integer.bitCount=Integer.prototype.bitCount;$_M(Integer,"numberOfLeadingZeros",function(a){if(0==a)return 32;var b=1;0==a>>>16&&(b+=16,a<<=16);0==a>>>24&&(b+=8,a<<=8);0==a>>>28&&(b+=4,a<<=4);0==a>>>30&&(b+=2,a<<=2);return b-(a>>>31)},"Number");Integer.numberOfLeadingZeros=Integer.prototype.numberOfLeadingZeros;
$_M(Integer,"numberOfTrailingZeros",function(a){if(0==a)return 32;var b=31,c=a<<16;0!=c&&(b-=16,a=c);c=a<<8;0!=c&&(b-=8,a=c);c=a<<4;0!=c&&(b-=4,a=c);c=a<<2;0!=c&&(b-=2,a=c);return b-(a<<1>>>31)},"Number");Integer.numberOfTrailingZeros=Integer.prototype.numberOfTrailingZeros;$_M(Integer,"parseIntRadix",function(a,b){if(null==a)throw new NumberFormatException("null");if(2>b)throw new NumberFormatException("radix "+b+" less than Character.MIN_RADIX");if(36<b)throw new NumberFormatException("radix "+
b+" greater than Character.MAX_RADIX");if(10==b)for(var c=a.length;0<=--c;){var d=a.charCodeAt(c);if(!(48<=d&&57>=d)&&(0<c||43!=d&&45!=d))throw new NumberFormatException("Not a Number : "+a);}c=parseInt(a,b);if(isNaN(c))throw new NumberFormatException("Not a Number : "+a);return c},"String, Number");Integer.parseIntRadix=Integer.prototype.parseIntRadix;$_M(Integer,"parseInt",function(a){return Integer.parseIntRadix(a,10)},"String");Integer.parseInt=Integer.prototype.parseInt;$_V(Integer,"$valueOf",
function(a){return new Integer(a)});Integer.$valueOf=Integer.prototype.$valueOf;$_V(Integer,"equals",function(a){return null==a||!Clazz.instanceOf(a,Integer)?!1:a.valueOf()==this.valueOf()},"Object");Integer.toHexString=Integer.prototype.toHexString=function(a){a.valueOf&&(a=a.valueOf());return a._numberToString(16)};Integer.toOctalString=Integer.prototype.toOctalString=function(a){a.valueOf&&(a=a.valueOf());return a._numberToString(8)};Integer.toBinaryString=Integer.prototype.toBinaryString=function(a){a.valueOf&&
(a=a.valueOf());return a._numberToString(2)};Integer.decode=$_M(Integer,"decode",function(a){var b=10,c=0,d=!1,e;a.startsWith("-")&&(d=!0,c++);a.startsWith("0x",c)||a.startsWith("0X",c)?(c+=2,b=16):a.startsWith("#",c)?(c++,b=16):a.startsWith("0",c)&&a.length>1+c&&(c++,b=8);if(a.startsWith("-",c))throw new NumberFormatException("Negative sign in wrong position");try{e=Integer.$valueOf(a.substring(c),b),e=d?new Integer(-e.intValue()):e}catch(f){if(Clazz.instanceOf(f,NumberFormatException))a=d?String.instantialize("-"+
a.substring(c)):a.substring(c),e=Integer.$valueOf(a,b);else throw f;}return e},"~S");$_V(Integer,"hashCode",function(){return this.valueOf()});java.lang.Long=Long=function(){Clazz.instantialize(this,arguments)};Clazz.decorateAsType(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()};Clazz.makeConstructor(Long,function(){this.valueOf=
function(){return 0}});Clazz.makeConstructor(Long,function(a){var b=Math.round(a);this.valueOf=function(){return b}},"Number");Clazz.makeConstructor(Long,function(a){var b=Long.parseLong(a,10);this.valueOf=function(){return b}},"String");Long.serialVersionUID=Long.prototype.serialVersionUID=0x3b8be490cc8f2400;Long.MIN_VALUE=Long.prototype.MIN_VALUE=-9223372036854775E3;Long.MAX_VALUE=Long.prototype.MAX_VALUE=9223372036854775E3;Long.TYPE=Long.prototype.TYPE=Long;$_M(Long,"parseLong",function(a,b){if(null==
a)throw new NumberFormatException("null");if(2>b)throw new NumberFormatException("radix "+b+" less than Character.MIN_RADIX");if(36<b)throw new NumberFormatException("radix "+b+" greater than Character.MAX_RADIX");var c=parseInt(a,b);if(isNaN(c))throw new NumberFormatException("Not a Number : "+a);return c},"String, Number");$_M(Long,"parseLong",function(a){return Long.parseLong(a,10)},"String");Long.parseLong=Long.prototype.parseLong;$_M(Long,"$valueOf",function(a){return new Long(Long.parseLong(a,
10))},"String");$_M(Long,"$valueOf",function(a){return new Long(a)},"Number");$_M(Long,"$valueOf",function(a,b){return new Long(Long.parseLong(a,b))},"String, Number");Long.$valueOf=Long.prototype.$valueOf;$_V(Long,"equals",function(a){return null==a||!Clazz.instanceOf(a,Long)?!1:a.valueOf()==this.valueOf()},"Object");Long.toHexString=Long.prototype.toHexString=function(a){return a.toString(16)};Long.toOctalString=Long.prototype.toOctalString=function(a){return a.toString(8)};Long.toBinaryString=
Long.prototype.toBinaryString=function(a){return a.toString(2)};Long.decode=$_M(Long,"decode",function(a){var b=10,c=0,d=!1,e;a.startsWith("-")&&(d=!0,c++);a.startsWith("0x",c)||a.startsWith("0X",c)?(c+=2,b=16):a.startsWith("#",c)?(c++,b=16):a.startsWith("0",c)&&a.length>1+c&&(c++,b=8);if(a.startsWith("-",c))throw new NumberFormatException("Negative sign in wrong position");try{e=Long.$valueOf(a.substring(c),b),e=d?new Long(-e.longValue()):e}catch(f){if(Clazz.instanceOf(f,NumberFormatException))a=
d?String.instantialize("-"+a.substring(c)):a.substring(c),e=Long.$valueOf(a,b);else throw f;}return e},"~S");java.lang.Short=Short=function(){Clazz.instantialize(this,arguments)};Clazz.decorateAsType(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()};$_k(Short,function(a){var b=Math.round(a)&4294967295;this.valueOf=
function(){return b}});Short.serialVersionUID=Short.prototype.serialVersionUID=0x684d37133460dc00;Short.MIN_VALUE=Short.prototype.MIN_VALUE=-32768;Short.MAX_VALUE=Short.prototype.MAX_VALUE=32767;Short.TYPE=Short.prototype.TYPE=Short;$_M(Short,"parseShort",function(a,b){if(null==a)throw new NumberFormatException("null");if(2>b)throw new NumberFormatException("radix "+b+" less than Character.MIN_RADIX");if(36<b)throw new NumberFormatException("radix "+b+" greater than Character.MAX_RADIX");var c=parseInt(a,
b);if(isNaN(c))throw new NumberFormatException("Not a Number : "+a);return c},"String, Number");Short.parseShort=Short.prototype.parseShort;$_M(Short,"parseShort",function(a){return Short.parseShort(a,10)},"String");Short.parseShort=Short.prototype.parseShort;$_V(Short,"$valueOf",function(a){return new Short(a)});Short.$valueOf=Short.prototype.$valueOf;$_V(Short,"equals",function(a){return null==a||!Clazz.instanceOf(a,Short)?!1:a.valueOf()==this.valueOf()},"Object");Short.toHexString=Short.prototype.toHexString=
function(a){return a.toString(16)};Short.toOctalString=Short.prototype.toOctalString=function(a){return a.toString(8)};Short.toBinaryString=Short.prototype.toBinaryString=function(a){return a.toString(2)};Short.decode=$_M(Short,"decode",function(a){var b=10,c=0,d=!1,e;a.startsWith("-")&&(d=!0,c++);a.startsWith("0x",c)||a.startsWith("0X",c)?(c+=2,b=16):a.startsWith("#",c)?(c++,b=16):a.startsWith("0",c)&&a.length>1+c&&(c++,b=8);if(a.startsWith("-",c))throw new NumberFormatException("Negative sign in wrong position");
try{e=Short.$valueOf(a.substring(c),b),e=d?new Short(-e.shortValue()):e}catch(f){if(Clazz.instanceOf(f,NumberFormatException))a=d?String.instantialize("-"+a.substring(c)):a.substring(c),e=Short.$valueOf(a,b);else throw f;}return e},"~S");java.lang.Float=Float=function(){Clazz.instantialize(this,arguments)};Clazz.decorateAsType(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()};$_k(Float,function(a){this.valueOf=function(){return a}});Float.serialVersionUID=Float.prototype.serialVersionUID=-0x2512365d24c31000;Float.MIN_VALUE=Float.prototype.MIN_VALUE=3.4028235E38;Float.MAX_VALUE=Float.prototype.MAX_VALUE=1.4E-45;Float.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY;Float.POSITIVE_INFINITY=Number.POSITIVE_INFINITY;Float.NaN=Number.NaN;Float.TYPE=Float.prototype.TYPE=Float;$_M(Float,"parseFloat",function(a){if(null==a)throw new NumberFormatException("null");
var b=parseFloat(a);if(isNaN(b))throw new NumberFormatException("Not a Number : "+a);return b},"String");Float.parseFloat=Float.prototype.parseFloat;$_V(Float,"$valueOf",function(a){return new Float(a)});Float.$valueOf=Float.prototype.$valueOf;$_M(Float,"isNaN",function(a){return isNaN(a)},"Number");Float.isNaN=Float.prototype.isNaN;$_M(Float,"isInfinite",function(a){return!isFinite(a)},"Number");Float.isInfinite=Float.prototype.isInfinite;$_V(Float,"equals",function(a){return null==a||!Clazz.instanceOf(a,
Float)?!1:a.valueOf()==this.valueOf()},"Object");java.lang.Double=Double=function(){Clazz.instantialize(this,arguments)};Clazz.decorateAsType(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()};$_k(Double,function(a){this.valueOf=function(){return a}});Double.serialVersionUID=Double.prototype.serialVersionUID=
-0x7f4c3db5d6940400;Double.MIN_VALUE=Double.prototype.MIN_VALUE=4.9E-324;Double.MAX_VALUE=Double.prototype.MAX_VALUE=1.7976931348623157E308;Double.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY;Double.POSITIVE_INFINITY=Number.POSITIVE_INFINITY;Double.NaN=Number.NaN;Double.TYPE=Double.prototype.TYPE=Double;$_M(Double,"isNaN",function(a){return isNaN(a)},"Number");Double.isNaN=Double.prototype.isNaN;$_M(Double,"isInfinite",function(a){return!isFinite(a)},"Number");Double.isInfinite=Double.prototype.isInfinite;
$_M(Double,"parseDouble",function(a){if(null==a)throw new NumberFormatException("null");var b=parseFloat(a);if(isNaN(b))throw new NumberFormatException("Not a Number : "+a);return b},"String");Double.parseDouble=Double.prototype.parseDouble;$_M(Double,"$valueOf",function(a){return new Double(a)},"Number");Double.$valueOf=Double.prototype.$valueOf;$_V(Double,"equals",function(a){return null==a||!Clazz.instanceOf(a,Double)?!1:a.valueOf()==this.valueOf()},"Object");java.lang.Byte=Byte=function(){Clazz.instantialize(this,
arguments)};Clazz.decorateAsType(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()};Clazz.makeConstructor(Byte,function(){this.valueOf=function(){return 0}});Clazz.makeConstructor(Byte,function(a){var b=Math.round(a)&4294967295;this.valueOf=function(){return b}},"Number");Clazz.makeConstructor(Byte,function(a){var b=Byte.parseByte(a,
10);this.valueOf=function(){return b}},"String");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;$_M(Byte,"parseByte",function(a,b){if(null==a)throw new NumberFormatException("null");if(2>b)throw new NumberFormatException("radix "+b+" less than Character.MIN_RADIX");if(36<b)throw new NumberFormatException("radix "+b+" greater than Character.MAX_RADIX");
var c=parseInt(a,b);if(isNaN(c))throw new NumberFormatException("Not a Number : "+a);return c},"String, Number");Byte.parseByte=Byte.prototype.parseByte;$_M(Byte,"parseByte",function(a){return Byte.parseByte(a,10)},"String");Byte.parseByte=Byte.prototype.parseByte;$_M(Byte,"$valueOf",function(a){return new Byte(Byte.parseByte(a,10))},"String");$_M(Byte,"$valueOf",function(a){return new Byte(a)},"Number");$_M(Byte,"$valueOf",function(a,b){return new Byte(Byte.parseByte(a,b))},"String, Number");Byte.$valueOf=
Byte.prototype.$valueOf;$_V(Byte,"equals",function(a){return null==a||!Clazz.instanceOf(a,Byte)?!1:a.valueOf()==this.valueOf()},"Object");Byte.toHexString=Byte.prototype.toHexString=function(a){return a.toString(16)};Byte.toOctalString=Byte.prototype.toOctalString=function(a){return a.toString(8)};Byte.toBinaryString=Byte.prototype.toBinaryString=function(a){return a.toString(2)};Byte.decode=$_M(Byte,"decode",function(a){var b=10,c=0,d=!1,e;a.startsWith("-")&&(d=!0,c++);a.startsWith("0x",c)||a.startsWith("0X",
c)?(c+=2,b=16):a.startsWith("#",c)?(c++,b=16):a.startsWith("0",c)&&a.length>1+c&&(c++,b=8);if(a.startsWith("-",c))throw new NumberFormatException("Negative sign in wrong position");try{e=Byte.$valueOf(a.substring(c),b),e=d?new Byte(-e.byteValue()):e}catch(f){if(Clazz.instanceOf(f,NumberFormatException))a=d?String.instantialize("-"+a.substring(c)):a.substring(c),e=Byte.$valueOf(a,b);else throw f;}return e},"~S");java.lang.B00lean=Boolean;java.lang.Boolean=Boolean=function(){Clazz.instantialize(this,
arguments)};if(Clazz.supportsNativeObject)for(F=0;F<Clazz.extendedObjectMethods.length;F++)O=Clazz.extendedObjectMethods[F],Boolean.prototype[O]=JavaObject.prototype[O];Boolean.__CLASS_NAME__="Boolean";Clazz.implementOf(Boolean,[java.io.Serializable,java.lang.Comparable]);Boolean.equals=Clazz.innerFunctions.equals;Boolean.getName=Clazz.innerFunctions.getName;Boolean.serialVersionUID=Boolean.prototype.serialVersionUID=-0x32df8d7f2a630600;Clazz.overrideConstructor(Boolean,function(a){var b=("string"==
typeof a?Boolean.toBoolean(a):a)?!0:!1;this.valueOf=function(){return b}},"~O");Boolean.parseBoolean=$_M(Boolean,"parseBoolean",function(a){return Boolean.toBoolean(a)},"~S");$_M(Boolean,"booleanValue",function(){return this.valueOf()});Boolean.$valueOf=$_V(Boolean,"$valueOf",function(a){return a?Boolean.TRUE:Boolean.FALSE});Boolean.toString=$_M(Boolean,"toString",function(a){return a?"true":"false"},"~B");$_V(Boolean,"toString",function(){return this.valueOf()?"true":"false"});$_V(Boolean,"hashCode",
function(){return this.valueOf()?1231:1237});$_V(Boolean,"equals",function(a){return Clazz.instanceOf(a,Boolean)?this.booleanValue()==a.booleanValue():!1},"~O");Boolean.getBoolean=$_M(Boolean,"getBoolean",function(a){var b=!1;try{b=Boolean.toBoolean(System.getProperty(a))}catch(c){if(!Clazz.instanceOf(c,IllegalArgumentException)&&!Clazz.instanceOf(c,NullPointerException))throw c;}return b},"~S");$_V(Boolean,"compareTo",function(a){return a.value==this.value?0:this.value?1:-1},"Boolean");Boolean.toBoolean=
$_M(Boolean,"toBoolean",($fz=function(a){return null!=a&&a.equalsIgnoreCase("true")},$fz.isPrivate=!0,$fz),"~S");Boolean.TRUE=Boolean.prototype.TRUE=new Boolean(!0);Boolean.FALSE=Boolean.prototype.FALSE=new Boolean(!1);Boolean.TYPE=Boolean.prototype.TYPE=Boolean;Encoding={UTF8:"utf-8",UTF16:"utf-16",ASCII:"ascii",guessEncoding:function(a){return 239==a.charCodeAt(0)&&187==a.charCodeAt(1)&&191==a.charCodeAt(2)?Encoding.UTF8:255==a.charCodeAt(0)&&254==a.charCodeAt(1)?Encoding.UTF16:Encoding.ASCII},
readUTF8:function(a){var b=this.guessEncoding(a),c=0;b==Encoding.UTF8?c=3:b==Encoding.UTF16&&(c=2);for(b=[];c<a.length;c++){var d=a.charCodeAt(c);if(128>d)b[b.length]=a.charAt(c);else if(192<d&&224>d){d&=31;c++;var e=a.charCodeAt(c)&63,d=(d<<6)+e;b[b.length]=String.fromCharCode(d)}else if(224<=d){d&=15;c++;e=a.charCodeAt(c)&63;c++;var f=a.charCodeAt(c)&63,d=(d<<12)+(e<<6)+f;b[b.length]=String.fromCharCode(d)}}return b.join("")},convert2UTF8:function(a){var b=this.guessEncoding(a),c=0;if(b==Encoding.UTF8)return a;
b==Encoding.UTF16&&(c=2);for(var b=Array(0+a.length-c),d=c;d<a.length;d++){var e=a.charCodeAt(d);if(128>e)b[0+d-c]=a.charAt(d);else if(2047>=e){var f=192+((e&1984)>>6),g=128+(e&63);b[0+d-c]=String.fromCharCode(f)+String.fromCharCode(g)}else f=224+((e&61440)>>12),g=128+((e&4032)>>6),e=128+(e&63),b[0+d-c]=String.fromCharCode(f)+String.fromCharCode(g)+String.fromCharCode(e)}return b.join("")},base64Chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),encodeBase64:function(a){if(null==
a||0==a.length)return a;for(var b=Encoding.base64Chars,c=a.length,d=0,e=[],f,g;d<c;)f=a.charCodeAt(d++),e[e.length]=b[f>>2],d<c?(g=a.charCodeAt(d++),e[e.length]=b[f<<4&48|g>>4],d<c?(f=a.charCodeAt(d++),e[e.length]=b[g<<2&60|f>>6],e[e.length]=b[f&63]):(e[e.length]=b[g<<2&60],e[e.length]="=")):(e[e.length]=b[f<<4&48],e[e.length]="=",e[e.length]="=");return e.join("")},decodeBase64:function(a){if(null==a||0==a.length)return a;var b=Encoding.base64Chars,c=Encoding.xBase64Chars;if(null==Encoding.xBase64Chars){for(var c=
{},d=0;d<b.length;d++)c[b[d]]=d;Encoding.xBase64Chars=c}for(var b=a.length,d=0,e=[],f,g,h,k,l=0;d<b&&6E4>l++;)f=c[a.charAt(d++)],g=c[a.charAt(d++)],h=c[a.charAt(d++)],k=c[a.charAt(d++)],e[e.length]=String.fromCharCode(f<<2&255|g>>4),null!=h&&(e[e.length]=String.fromCharCode(g<<4&255|h>>2),null!=k&&(e[e.length]=String.fromCharCode(h<<6&255|k)));return e.join("")}};if(null==String.prototype.$replace){java.lang.String=String;if(Clazz.supportsNativeObject)for(F=0;F<Clazz.extendedObjectMethods.length;F++)O=
Clazz.extendedObjectMethods[F],"to$tring"==O||("toString"==O||"equals"==O||"hashCode"==O)||(String.prototype[O]=JavaObject.prototype[O]);Clazz.implementOf(String,[java.io.Serializable,CharSequence,Comparable]);String.getName=Clazz.innerFunctions.getName;String.serialVersionUID=String.prototype.serialVersionUID=-0x5f0f5bc785c44c00;String.prototype.$replace=function(a,b){a=a.replace(/([\\\/\$\.\*\+\{\}\?\^\(\)\[\]])/g,function(a,b){return"\\"+b});return this.replace(RegExp(a,"gm"),b)};String.prototype.$generateExpFunction=
function(a){var b=[],c=[],d=0;b[0]="";for(var e=0;e<a.length;e++){var f=a.charAt(e);e!=a.length-1&&"\\"==f?(e++,f=a.charAt(e),"\\"==f&&(b[d]+="\\"),b[d]+=f):e!=a.length-1&&"$"==f?(e++,c[d]=parseInt(a.charAt(e)),d++,b[d]=""):b[d]="\r"==f?b[d]+"\\r":"\n"==f?b[d]+"\\n":"\t"==f?b[d]+"\\t":'"'==f?b[d]+'\\"':b[d]+f}a="f = function (";d=Math.max.apply({},c);for(e=0;e<=d;e++)a+="$"+e,e!=d&&(a+=", ");a+=") { return ";for(e=0;e<b.length-1;e++)a+='"'+b[e]+'" + $'+c[e]+" + ";a+='"'+b[e]+'"; }';eval(a);return null};
String.prototype.replaceAll=function(a,b){return this.replace(RegExp(a,"gm"),this.$generateExpFunction(b))};String.prototype.replaceFirst=function(a,b){return this.replace(RegExp(a,"m"),this.$generateExpFunction(b))};String.prototype.matches=function(a){null!=a&&(a="^("+a+")$");a=this.match(RegExp(a,"gm"));return null!=a&&0!=a.length};String.prototype.regionMatches=function(a,b,c,d,e){if("number"==typeof a||!0!=a&&!1!=a)e=d,d=c,c=b,b=a,a=!1;if(0>d||0>b||b>this.length-e||d>c.length-e)return!1;b=this.substring(b,
b+e);c=c.substring(d,d+e);a&&(b=b.toLowerCase(),c=c.toLowerCase());return b==c};String.prototype.$plit=function(a,b){if(null!=b&&0<b){if(1==b)return this;var c=RegExp("("+a+")","gm"),d=1,e=this.replace(c,function(a){d++;return d==b?"@@_@@":a}),c=RegExp(a,"gm"),c=this.split(c);c.length>b&&(c[b-1]=e.substring(e.indexOf("@@_@@")+5),c.length=b);return c}c=RegExp(a,"gm");return this.split(c)};String.prototype.trim=function(){for(var a=this.length,b=0;b<a&&" ">=this.charAt(b);)b++;for(;b<a&&" ">=this.charAt(a-
1);)a--;return 0<b?this.substring(b,a):this};String.prototype.trim=function(){return this.replace(/^\s+/g,"").replace(/\s+$/g,"")};String.prototype.startsWith_string_number=function(a,b){var c=b,d=0,e=a.length;if(0>b||b>this.length-e)return!1;for(;0<=--e;)if(this.charAt(c++)!=a.charAt(d++))return!1;return!0};String.prototype.startsWith=function(a){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(a){return this.startsWith(a,this.length-a.length)};String.prototype.equals=function(a){return this.valueOf()==a};String.prototype.equalsIgnoreCase=function(a){return null==a?!1:this==a||this.toLowerCase()==a.toLowerCase()};String.prototype.hash=0;String.prototype.hashCode=function(){var a=this.hash;if(0==a){for(var b=0,c=this.length,d=0;d<c;d++)a=31*a+this.charCodeAt(b++),a&=4294967295;this.hash=a}return a};String.prototype.getBytes=function(){if(4==arguments.length)return this.getChars(arguments[0],
arguments[1],arguments[2],arguments[3]);var a=this;if(1==arguments.length){for(var b=arguments[0].toString().toLowerCase(),c="utf-8 UTF8 us-ascii iso-8859-1 8859_1 gb2312 gb18030 gbk".split(" "),d=!1,e=0;e<c.length;e++)if(c[e]==b){d=!0;break}if(!d)throw new java.io.UnsupportedEncodingException;if("utf-8"==b||"utf8"==b)a=Encoding.convert2UTF8(this)}b=Array(a.length);for(e=d=c=0;e<a.length;e++)c=a.charCodeAt(e),255<c?(b[d]=26,b[d+1]=c&255,b[d+2]=(c&65280)>>8,d+=2):b[d]=c,d++;return b};String.prototype.compareTo=
function(a){if(null==a)throw new java.lang.NullPointerException;for(var b=this.length,c=a.length,d=Math.min(b,c),e=0;e<d;){var f=this.charCodeAt(e),g=a.charCodeAt(e);if(f!=g)return f-g;e++}return b-c};String.prototype.toCharArray=function(){for(var a=Array(this.length),b=0;b<this.length;b++)a[b]=this.charAt(b);return a};String.value0f=String.valueOf;String.valueOf=function(a){if("undefined"==a)return String.value0f();if(a instanceof Array){if(1==arguments.length)return a.join("");for(var b=arguments[1],
c=arguments[2],d=Array(c),e=0;e<c;e++)d[e]=a[b+e];return d.join("")}return""+a};String.prototype.subSequence=function(a,b){return this.substring(a,b)};String.prototype.compareToIgnoreCase=function(a){if(null==a)throw new NullPointerException;var b=this.toUpperCase(),c=a.toUpperCase();if(b==c)return 0;b=this.toLowerCase();c=a.toLowerCase();return b==c?0:b>c?1:-1};String.prototype.contentEquals=function(a){if(this.length!=a.length())return!1;a=a.getValue();for(var b=0,c=0,d=this.length;0!=d--;)if(this.charCodeAt(b++)!=
a[c++])return!1;return!0};String.prototype.getChars=function(a,b,c,d){if(0>a)throw new StringIndexOutOfBoundsException(a);if(b>this.length)throw new StringIndexOutOfBoundsException(b);if(a>b)throw new StringIndexOutOfBoundsException(b-a);if(null==c)throw new NullPointerException;for(var e=0;e<b-a;e++)c[d+e]=this.charAt(a+e)};String.prototype.$concat=String.prototype.concat;String.prototype.concat=function(a){if(null==a)throw new NullPointerException;return this.$concat(a)};String.prototype.$lastIndexOf=
String.prototype.lastIndexOf;String.prototype.lastIndexOf=function(a,b){return null!=b&&0>=b+this.length?-1:null!=b?this.$lastIndexOf(a,b):this.$lastIndexOf(a)};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(a,b,c,d,e,f,g){if(g>=c)return 0==f?c:-1;0>g&&(g=0);if(0==f)return g;var h=d[e];
g=b+g;c=b+(c-f);a:for(;;){for(;g<=c&&a[g]!=h;)g++;if(g>c)return-1;for(var k=g+1,l=k+f-1,m=e+1;k<l;)if(a[k++]!=d[m++]){g++;continue a}return g-b}};String.instantialize=function(){switch(arguments.length){case 0:return new String;case 1:var a=arguments[0];if("string"==typeof a||a instanceof String)return new String(a);if(a instanceof Array||a instanceof Int32Array){if(0<a.length&&"number"==typeof a[0]){for(var b=Array(a.length),c=0;c<a.length;c++)b[c]=String.fromCharCode(a[c]&255);return Encoding.readUTF8(b.join(""))}return a.join("")}if("StringBuffer"==
a.__CLASS_NAME__||"java.lang.StringBuffer"==a.__CLASS_NAME__){for(var b=a.shareValue(),d=a.length(),a=Array(d),c=0;c<d;c++)a[c]=b[c];return a.join("")}return""+a;case 2:return a=arguments[0],d=arguments[1],"string"==typeof d?String.instantialize(a,0,a.length,d):String.instantialize(a,d,0,a.length);case 3:var a=arguments[0],e=arguments[1],d=arguments[2];arguments[2]instanceof Array&&(a=arguments[2],e=arguments[0],d=arguments[1]);b=Array(d);if(0>e||d+e>a.length)throw new IndexOutOfBoundsException;if(0<
d)if(null!=a[e].length)for(c=0;c<d;c++)b[c]=a[e+c];else for(c=0;c<d;c++)b[c]=String.fromCharCode(a[e+c]);return b.join("");case 4:var a=arguments[0],f=arguments[3];if("string"==typeof f||f instanceof String){e=arguments[1];d=arguments[2];b=Array(d);for(c=0;c<d;c++)b[c]=a[e+c],"number"==typeof b[c]&&(b[c]=String.fromCharCode(b[c]&255));c=f.toLowerCase();return"utf-8"==c||"utf8"==c?Encoding.readUTF8(b.join("")):b.join("")}c=arguments[3];e=arguments[2];d=arguments[1];b=Array(c);if(0==d)for(;0<c--;)b[c]=
String.fromCharCode(a[c+e]&255);else for(d<<=8;0<c--;)b[c]=String.fromCharCode(d|a[c+e]&255);return b.join("");default:b="";for(c=0;c<arguments.length;c++)b+=arguments[c];return b}};-1!=navigator.userAgent.toLowerCase().indexOf("chrome")&&(String.prototype.toString=function(){return this})}c$=$_C(function(){this.value=0;$_Z(this,arguments)},java.lang,"Character",null,[java.io.Serializable,Comparable]);$_K(c$,function(a){this.value=a},"~N");$_M(c$,"charValue",function(){return this.value});$_V(c$,
"hashCode",function(){return this.value.charCodeAt(0)});$_V(c$,"equals",function(a){return $_O(a,Character)?this.value.charCodeAt(0)==a.charValue().charCodeAt(0):!1},"~O");$_V(c$,"compareTo",function(a){return this.value.charCodeAt(0)-a.value.charCodeAt(0)},"Character");c$.toLowerCase=$_M(c$,"toLowerCase",function(a){return(""+a).toLowerCase().charAt(0)},"~N");c$.toUpperCase=$_M(c$,"toUpperCase",function(a){return(""+a).toUpperCase().charAt(0)},"~N");c$.isDigit=$_M(c$,"isDigit",function(a){if(48<=
a.charCodeAt(0)&&57>=a.charCodeAt(0))return!0;a.charCodeAt(0);return!1},"~N");c$.isUpperCase=$_M(c$,"isUpperCase",function(a){return 65<=a.charCodeAt(0)&&90>=a.charCodeAt(0)?!0:!1},"~N");c$.isLowerCase=$_M(c$,"isLowerCase",function(a){return 97<=a.charCodeAt(0)&&122>=a.charCodeAt(0)?!0:!1},"~N");c$.isWhitespace=$_M(c$,"isWhitespace",function(a){return 28<=a.charCodeAt(0)&&32>=a.charCodeAt(0)||9<=a.charCodeAt(0)&&13>=a.charCodeAt(0)||5760==a.charCodeAt(0)?!0:8192>a.charCodeAt(0)||8199==a.charCodeAt(0)?
!1:8203>=a.charCodeAt(0)||8232==a.charCodeAt(0)||8233==a.charCodeAt(0)||12288==a.charCodeAt(0)},"~N");c$.isLetter=$_M(c$,"isLetter",function(a){if(65<=a.charCodeAt(0)&&90>=a.charCodeAt(0)||97<=a.charCodeAt(0)&&122>=a.charCodeAt(0))return!0;a.charCodeAt(0);return!1},"~N");c$.isLetterOrDigit=$_M(c$,"isLetterOrDigit",function(a){return Character.isLetter(a)||Character.isDigit(a)},"~N");c$.isSpaceChar=$_M(c$,"isSpaceChar",function(a){return 32==a.charCodeAt(0)||160==a.charCodeAt(0)||5760==a.charCodeAt(0)?
!0:8192>a.charCodeAt(0)?!1:8203>=a.charCodeAt(0)||8232==a.charCodeAt(0)||8233==a.charCodeAt(0)||8239==a.charCodeAt(0)||12288==a.charCodeAt(0)},"~N");c$.digit=$_M(c$,"digit",function(a,b){if(2<=b&&36>=b&&128>a.charCodeAt(0)){var c=-1;48<=a.charCodeAt(0)&&57>=a.charCodeAt(0)?c=a.charCodeAt(0)-48:97<=a.charCodeAt(0)&&122>=a.charCodeAt(0)?c=a.charCodeAt(0)-87:65<=a.charCodeAt(0)&&90>=a.charCodeAt(0)&&(c=a.charCodeAt(0)-55);return c<b?c:-1}return-1},"~N,~N");$_V(c$,"toString",function(){return String.valueOf([this.value])});
c$.toString=$_V(c$,"toString",function(a){return this===Charater?"class java.lang.Charater":String.valueOf(a)},"~N");$_S(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$=$_T(java.lang.reflect,"Array");c$.newInstance=$_M(c$,"newInstance",function(){return $_A(length)},"Class,~N");java.util.Date=Date;Clazz.decorateAsType(java.util.Date,
"java.util.Date",null,[java.io.Serializable,Cloneable,Comparable]);java.util.Date.prototype.toString=Clazz.dateToString;$_M(java.util.Date,"clone",function(){return new Date(this.getTime())});$_M(java.util.Date,"before",function(a){return this.getTime()<a.getTime()},"java.util.Date");$_M(java.util.Date,"after",function(a){return this.getTime()>a.getTime()},"java.util.Date");$_M(java.util.Date,"equals",function(a){return Clazz.instanceOf(a,java.util.Date)&&this.getTime()==a.getTime()},"Object");$_M(java.util.Date,
"compareTo",function(a){var b=this.getTime();a=a.getTime();return b<a?-1:b==a?0:1},"java.util.Date");$_M(java.util.Date,"compareTo",function(a){return this.compareTo(a)},"Object");$_V(java.util.Date,"hashCode",function(){var a=this.getTime();return parseInt(a)^parseInt(a>>32)});c$=$_C(function(){this.source=null;$_Z(this,arguments)},java.util,"EventObject",null,java.io.Serializable);$_K(c$,function(a){if(null!=a)this.source=a;else throw new IllegalArgumentException;},"~O");$_M(c$,"getSource",function(){return this.source});
$_V(c$,"toString",function(){return this.getClass().getName()+"[source="+String.valueOf(this.source)+"]"});$_I(java.util,"EventListener");c$=$_C(function(){this.listener=null;$_Z(this,arguments)},java.util,"EventListenerProxy",null,java.util.EventListener);$_K(c$,function(a){this.listener=a},"java.util.EventListener");$_M(c$,"getListener",function(){return this.listener});$_I(java.util,"Iterator");$_I(java.util,"ListIterator",java.util.Iterator);$_I(java.util,"Enumeration");$_I(java.util,"Collection",
Iterable);$_I(java.util,"Set",java.util.Collection);$_I(java.util,"Map");$_I(java.util.Map,"Entry");$_I(java.util,"List",java.util.Collection);$_I(java.util,"Queue",java.util.Collection);$_I(java.util,"RandomAccess");c$=$_C(function(){this.stackTrace=this.cause=this.detailMessage=null;$_Z(this,arguments)},java.lang,"Throwable",null,java.io.Serializable);$_Y(c$,function(){this.cause=this});$_K(c$,function(){this.fillInStackTrace()});$_K(c$,function(a){this.fillInStackTrace();this.detailMessage=a},
"~S");$_K(c$,function(a,b){this.fillInStackTrace();this.detailMessage=a;this.cause=b},"~S,Throwable");$_K(c$,function(a){this.fillInStackTrace();this.detailMessage=null==a?null:a.toString();this.cause=a},"Throwable");$_M(c$,"getMessage",function(){return"undefined"!=typeof this.message?this.message:this.detailMessage});$_M(c$,"getLocalizedMessage",function(){return this.getMessage()});$_M(c$,"getCause",function(){return this.cause===this?null:this.cause});$_M(c$,"initCause",function(a){if(this.cause!==
this)throw new IllegalStateException("Can't overwrite cause");if(a===this)throw new IllegalArgumentException("Self-causation not permitted");this.cause=a;return this},"Throwable");$_V(c$,"toString",function(){var a=this.getClass().getName(),b=this.getLocalizedMessage();return null!=b?a+": "+b:a});$_M(c$,"printStackTrace",function(){System.err.println(this);for(var a=0;a<this.stackTrace.length;a++){var b=this.stackTrace[a],c=b.methodName.indexOf("(");("construct"!=b.methodName.substring(0,c).replace(/\s+/g,
"")||null==b.nativeClazz||0>Clazz.getInheritedLevel(b.nativeClazz,Throwable))&&System.err.println(b)}});$_M(c$,"printStackTrace",function(){this.printStackTrace()},"java.io.PrintStream");$_M(c$,"printStackTrace",function(){this.printStackTrace()},"java.io.PrintWriter");$_M(c$,"fillInStackTrace",function(){this.stackTrace=[];for(var a=arguments.callee.caller,b=null,c=[],d=Clazz.callingStackTraces.length-1,e=!0;-1<d||null!=a;){var f=null;if(!e||a==Clazz.tryToSearchAndExecute||a==$_U||null==a){if(0>
d)break;e=!0;b=Clazz.callingStackTraces[d].caller;f=Clazz.callingStackTraces[d].owner;d--}else b=a,null!=b.claxxOwner?f=b.claxxOwner:null!=b.exClazz&&(f=b.exClazz);a=new StackTraceElement(null!=f&&0!=f.__CLASS_NAME__.length?f.__CLASS_NAME__:"anonymous",(null==b.exName?"anonymous":b.exName)+" ("+Clazz.getParamsType(b.arguments)+")",null,-1);a.nativeClazz=f;this.stackTrace[this.stackTrace.length]=a;for(f=0;f<c.length;f++)c[f]==b&&(a=new StackTraceElement("lost","missing",null,-3),a.nativeClazz=null,
this.stackTrace[this.stackTrace.length]=a,e=!1);null!=b&&(c[c.length]=b);a=b.arguments.callee.caller}Clazz.initializingException=!1;return this});$_M(c$,"setStackTrace",function(a){a=a.clone();for(var b=0;b<a.length;b++)if(null==a[b])throw new NullPointerException("stackTrace["+b+"]");this.stackTrace=a},"~A");c$=$_C(function(){this.fileName=this.methodName=this.declaringClass=null;this.lineNumber=0;$_Z(this,arguments)},java.lang,"StackTraceElement",null,java.io.Serializable);$_K(c$,function(a,b,c,
d){if(null==a||null==b)throw new NullPointerException;this.declaringClass=a;this.methodName=b;this.fileName=c;this.lineNumber=d},"~S,~S,~S,~N");$_V(c$,"equals",function(a){if(!$_O(a,StackTraceElement)||(null==this.methodName||null==a.methodName)||!this.getMethodName().equals(a.getMethodName())||!this.getClassName().equals(a.getClassName()))return!1;var b=this.getFileName();if(null==b){if(null!=a.getFileName())return!1}else if(!b.equals(a.getFileName()))return!1;return this.getLineNumber()!=a.getLineNumber()?
!1:!0},"~O");$_M(c$,"getClassName",function(){return null==this.declaringClass?"<unknown class>":this.declaringClass});$_M(c$,"getFileName",function(){return this.fileName});$_M(c$,"getLineNumber",function(){return this.lineNumber});$_M(c$,"getMethodName",function(){return null==this.methodName?"<unknown method>":this.methodName});$_V(c$,"hashCode",function(){return null==this.methodName?0:this.methodName.hashCode()^this.declaringClass.hashCode()});$_M(c$,"isNativeMethod",function(){return-2==this.lineNumber});
$_V(c$,"toString",function(){var a=new StringBuilder(80);a.append(this.getClassName());a.append(".");a.append(this.getMethodName());if(this.isNativeMethod())a.append("(Native Method)");else{var b=this.getFileName();if(null==b)a.append("(Unknown Source)");else{var c=this.getLineNumber();a.append("(");a.append(b);0<=c&&(a.append(":"),a.append(c));a.append(")")}}return a.toString()});c$=$_T(java.lang,"Error",Throwable);c$=$_T(java.lang,"LinkageError",Error);c$=$_T(java.lang,"IncompatibleClassChangeError",
LinkageError);c$=$_T(java.lang,"AbstractMethodError",IncompatibleClassChangeError);c$=$_T(java.lang,"AssertionError",Error);$_K(c$,function(a){$_R(this,AssertionError,[String.valueOf(a),$_O(a,Throwable)?a:null])},"~O");$_K(c$,function(a){this.construct(String.valueOf(a))},"~B");$_K(c$,function(a){this.construct(String.valueOf(a))},"~N");$_K(c$,function(a){this.construct(Integer.toString(a))},"~N");$_K(c$,function(a){this.construct(Long.toString(a))},"~N");$_K(c$,function(a){this.construct(Float.toString(a))},
"~N");$_K(c$,function(a){this.construct(Double.toString(a))},"~N");c$=$_T(java.lang,"ClassCircularityError",LinkageError);c$=$_T(java.lang,"ClassFormatError",LinkageError);c$=$_C(function(){this.exception=null;$_Z(this,arguments)},java.lang,"ExceptionInInitializerError",LinkageError);$_K(c$,function(){$_R(this,ExceptionInInitializerError);this.initCause(null)});$_K(c$,function(a){$_R(this,ExceptionInInitializerError,[a]);this.initCause(null)},"~S");$_K(c$,function(a){$_R(this,ExceptionInInitializerError);
this.exception=a;this.initCause(a)},"Throwable");$_M(c$,"getException",function(){return this.exception});$_V(c$,"getCause",function(){return this.exception});c$=$_T(java.lang,"IllegalAccessError",IncompatibleClassChangeError);c$=$_T(java.lang,"InstantiationError",IncompatibleClassChangeError);c$=$_T(java.lang,"VirtualMachineError",Error);c$=$_T(java.lang,"InternalError",VirtualMachineError);c$=$_T(java.lang,"NoClassDefFoundError",LinkageError);c$=$_T(java.lang,"NoSuchFieldError",IncompatibleClassChangeError);
c$=$_T(java.lang,"NoSuchMethodError",IncompatibleClassChangeError);c$=$_T(java.lang,"OutOfMemoryError",VirtualMachineError);c$=$_T(java.lang,"StackOverflowError",VirtualMachineError);c$=$_T(java.lang,"UnknownError",VirtualMachineError);c$=$_T(java.lang,"UnsatisfiedLinkError",LinkageError);c$=$_T(java.lang,"UnsupportedClassVersionError",ClassFormatError);c$=$_T(java.lang,"VerifyError",LinkageError);c$=$_T(java.lang,"ThreadDeath",Error);$_K(c$,function(){$_R(this,ThreadDeath,[])});c$=$_T(java.lang,
"Exception",Throwable);c$=$_T(java.lang,"RuntimeException",Exception);c$=$_T(java.lang,"ArithmeticException",RuntimeException);c$=$_T(java.lang,"IndexOutOfBoundsException",RuntimeException);c$=$_T(java.lang,"ArrayIndexOutOfBoundsException",IndexOutOfBoundsException);$_K(c$,function(a){$_R(this,ArrayIndexOutOfBoundsException,["Array index out of range: "+a])},"~N");c$=$_T(java.lang,"ArrayStoreException",RuntimeException);c$=$_T(java.lang,"ClassCastException",RuntimeException);c$=$_C(function(){this.ex=
null;$_Z(this,arguments)},java.lang,"ClassNotFoundException",Exception);$_K(c$,function(){$_R(this,ClassNotFoundException,[Clazz.castNullAs("Throwable")])});$_K(c$,function(a){$_R(this,ClassNotFoundException,[a,null])},"~S");$_K(c$,function(a,b){$_R(this,ClassNotFoundException,[a]);this.ex=b},"~S,Throwable");$_M(c$,"getException",function(){return this.ex});$_V(c$,"getCause",function(){return this.ex});c$=$_T(java.lang,"CloneNotSupportedException",Exception);c$=$_T(java.lang,"IllegalAccessException",
Exception);c$=$_T(java.lang,"IllegalArgumentException",RuntimeException);$_K(c$,function(a){$_R(this,IllegalArgumentException,[null==a?null:a.toString(),a])},"Throwable");c$=$_T(java.lang,"IllegalMonitorStateException",RuntimeException);c$=$_T(java.lang,"IllegalStateException",RuntimeException);$_K(c$,function(a){$_R(this,IllegalStateException,[null==a?null:a.toString(),a])},"Throwable");c$=$_T(java.lang,"IllegalThreadStateException",IllegalArgumentException);c$=$_T(java.lang,"InstantiationException",
Exception);c$=$_T(java.lang,"InterruptedException",Exception);c$=$_T(java.lang,"NegativeArraySizeException",RuntimeException);c$=$_T(java.lang,"NoSuchFieldException",Exception);c$=$_T(java.lang,"NoSuchMethodException",Exception);c$=$_T(java.lang,"NullPointerException",RuntimeException);c$=$_T(java.lang,"NumberFormatException",IllegalArgumentException);c$=$_T(java.lang,"SecurityException",RuntimeException);$_K(c$,function(a){$_R(this,SecurityException,[null==a?null:a.toString(),a])},"Throwable");c$=
$_T(java.lang,"StringIndexOutOfBoundsException",IndexOutOfBoundsException);$_K(c$,function(a){$_R(this,StringIndexOutOfBoundsException,["String index out of range: "+a])},"~N");c$=$_T(java.lang,"UnsupportedOperationException",RuntimeException);$_K(c$,function(){$_R(this,UnsupportedOperationException,[])});$_K(c$,function(a){$_R(this,UnsupportedOperationException,[null==a?null:a.toString(),a])},"Throwable");c$=$_C(function(){this.target=null;$_Z(this,arguments)},java.lang.reflect,"InvocationTargetException",
Exception);$_K(c$,function(){$_R(this,java.lang.reflect.InvocationTargetException,[Clazz.castNullAs("Throwable")])});$_K(c$,function(a){$_R(this,java.lang.reflect.InvocationTargetException,[null,a]);this.target=a},"Throwable");$_K(c$,function(a,b){$_R(this,java.lang.reflect.InvocationTargetException,[b,a]);this.target=a},"Throwable,~S");$_M(c$,"getTargetException",function(){return this.target});$_V(c$,"getCause",function(){return this.target});c$=$_C(function(){this.undeclaredThrowable=null;$_Z(this,
arguments)},java.lang.reflect,"UndeclaredThrowableException",RuntimeException);$_K(c$,function(a){$_R(this,java.lang.reflect.UndeclaredThrowableException);this.undeclaredThrowable=a;this.initCause(a)},"Throwable");$_K(c$,function(a,b){$_R(this,java.lang.reflect.UndeclaredThrowableException,[b]);this.undeclaredThrowable=a;this.initCause(a)},"Throwable,~S");$_M(c$,"getUndeclaredThrowable",function(){return this.undeclaredThrowable});$_V(c$,"getCause",function(){return this.undeclaredThrowable});c$=
$_T(java.io,"IOException",Exception);c$=$_T(java.io,"CharConversionException",java.io.IOException);c$=$_T(java.io,"EOFException",java.io.IOException);c$=$_T(java.io,"FileNotFoundException",java.io.IOException);c$=$_C(function(){this.bytesTransferred=0;$_Z(this,arguments)},java.io,"InterruptedIOException",java.io.IOException);c$=$_T(java.io,"ObjectStreamException",java.io.IOException);c$=$_C(function(){this.classname=null;$_Z(this,arguments)},java.io,"InvalidClassException",java.io.ObjectStreamException);
$_K(c$,function(a,b){$_R(this,java.io.InvalidClassException,[b]);this.classname=a},"~S,~S");$_M(c$,"getMessage",function(){var a=$_U(this,java.io.InvalidClassException,"getMessage",[]);null!=this.classname&&(a=this.classname+"; "+a);return a});c$=$_T(java.io,"InvalidObjectException",java.io.ObjectStreamException);c$=$_T(java.io,"NotActiveException",java.io.ObjectStreamException);c$=$_T(java.io,"NotSerializableException",java.io.ObjectStreamException);c$=$_C(function(){this.eof=!1;this.length=0;$_Z(this,
arguments)},java.io,"OptionalDataException",java.io.ObjectStreamException);c$=$_T(java.io,"StreamCorruptedException",java.io.ObjectStreamException);c$=$_T(java.io,"SyncFailedException",java.io.IOException);c$=$_T(java.io,"UnsupportedEncodingException",java.io.IOException);c$=$_T(java.io,"UTFDataFormatException",java.io.IOException);c$=$_C(function(){this.detail=null;$_Z(this,arguments)},java.io,"WriteAbortedException",java.io.ObjectStreamException);$_K(c$,function(a,b){$_R(this,java.io.WriteAbortedException,
[a]);this.detail=b;this.initCause(b)},"~S,Exception");$_M(c$,"getMessage",function(){var a=$_U(this,java.io.WriteAbortedException,"getMessage",[]);null!=this.detail&&(a=a+"; "+this.detail.toString());return a});$_V(c$,"getCause",function(){return this.detail});c$=$_T(java.util,"ConcurrentModificationException",RuntimeException);$_K(c$,function(){$_R(this,java.util.ConcurrentModificationException,[])});c$=$_T(java.util,"EmptyStackException",RuntimeException);c$=$_C(function(){this.key=this.className=
null;$_Z(this,arguments)},java.util,"MissingResourceException",RuntimeException);$_K(c$,function(a,b,c){$_R(this,java.util.MissingResourceException,[a]);this.className=b;this.key=c},"~S,~S,~S");$_M(c$,"getClassName",function(){return this.className});$_M(c$,"getKey",function(){return this.key});c$=$_T(java.util,"NoSuchElementException",RuntimeException);c$=$_T(java.util,"TooManyListenersException",Exception);c$=$_T(java.lang,"Void");$_S(c$,"TYPE",null);java.lang.Void.TYPE=java.lang.Void;$_I(java.lang.reflect,
"GenericDeclaration");$_I(java.lang.reflect,"AnnotatedElement");c$=$_T(java.lang.reflect,"AccessibleObject",null,java.lang.reflect.AnnotatedElement);$_K(c$,function(){});$_M(c$,"isAccessible",function(){return!1});c$.setAccessible=$_M(c$,"setAccessible",function(){},"~A,~B");$_M(c$,"setAccessible",function(){},"~B");$_V(c$,"isAnnotationPresent",function(){return!1},"Class");$_V(c$,"getDeclaredAnnotations",function(){return[]});$_V(c$,"getAnnotations",function(){return[]});$_V(c$,"getAnnotation",function(){return null},
"Class");c$.marshallArguments=$_M(c$,"marshallArguments",function(){return null},"~A,~A");$_M(c$,"invokeV",function(){},"~O,~A");$_M(c$,"invokeL",function(){return null},"~O,~A");$_M(c$,"invokeI",function(){return 0},"~O,~A");$_M(c$,"invokeJ",function(){return 0},"~O,~A");$_M(c$,"invokeF",function(){return 0},"~O,~A");$_M(c$,"invokeD",function(){return 0},"~O,~A");c$.emptyArgs=c$.prototype.emptyArgs=[];$_I(java.lang.reflect,"InvocationHandler");c$=$_I(java.lang.reflect,"Member");$_S(c$,"PUBLIC",0,
"DECLARED",1);c$=$_T(java.lang.reflect,"Modifier");$_K(c$,function(){});c$.isAbstract=$_M(c$,"isAbstract",function(a){return 0!=(a&1024)},"~N");c$.isFinal=$_M(c$,"isFinal",function(a){return 0!=(a&16)},"~N");c$.isInterface=$_M(c$,"isInterface",function(a){return 0!=(a&512)},"~N");c$.isNative=$_M(c$,"isNative",function(a){return 0!=(a&256)},"~N");c$.isPrivate=$_M(c$,"isPrivate",function(a){return 0!=(a&2)},"~N");c$.isProtected=$_M(c$,"isProtected",function(a){return 0!=(a&4)},"~N");c$.isPublic=$_M(c$,
"isPublic",function(a){return 0!=(a&1)},"~N");c$.isStatic=$_M(c$,"isStatic",function(a){return 0!=(a&8)},"~N");c$.isStrict=$_M(c$,"isStrict",function(a){return 0!=(a&2048)},"~N");c$.isSynchronized=$_M(c$,"isSynchronized",function(a){return 0!=(a&32)},"~N");c$.isTransient=$_M(c$,"isTransient",function(a){return 0!=(a&128)},"~N");c$.isVolatile=$_M(c$,"isVolatile",function(a){return 0!=(a&64)},"~N");c$.toString=$_M(c$,"toString",function(a){var b=[];java.lang.reflect.Modifier.isPublic(a)&&(b[b.length]=
"public");java.lang.reflect.Modifier.isProtected(a)&&(b[b.length]="protected");java.lang.reflect.Modifier.isPrivate(a)&&(b[b.length]="private");java.lang.reflect.Modifier.isAbstract(a)&&(b[b.length]="abstract");java.lang.reflect.Modifier.isStatic(a)&&(b[b.length]="static");java.lang.reflect.Modifier.isFinal(a)&&(b[b.length]="final");java.lang.reflect.Modifier.isTransient(a)&&(b[b.length]="transient");java.lang.reflect.Modifier.isVolatile(a)&&(b[b.length]="volatile");java.lang.reflect.Modifier.isSynchronized(a)&&
(b[b.length]="synchronized");java.lang.reflect.Modifier.isNative(a)&&(b[b.length]="native");java.lang.reflect.Modifier.isStrict(a)&&(b[b.length]="strictfp");java.lang.reflect.Modifier.isInterface(a)&&(b[b.length]="interface");return 0<b.length?b.join(" "):""},"~N");$_S(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$=$_C(function(){this.exceptionTypes=this.parameterTypes=this.clazz=null;this.modifiers=0;$_Z(this,arguments)},java.lang.reflect,"Constructor",java.lang.reflect.AccessibleObject,[java.lang.reflect.GenericDeclaration,java.lang.reflect.Member]);$_K(c$,function(a,b,c,d){$_R(this,java.lang.reflect.Constructor,[]);this.clazz=a;this.parameterTypes=b;this.exceptionTypes=c;this.modifiers=d},"Class,~A,~A,~N");$_V(c$,"getTypeParameters",function(){return null});$_M(c$,"toGenericString",function(){return null});
$_M(c$,"getGenericParameterTypes",function(){return null});$_M(c$,"getGenericExceptionTypes",function(){return null});$_M(c$,"getParameterAnnotations",function(){return null});$_M(c$,"isVarArgs",function(){return!1});$_V(c$,"isSynthetic",function(){return!1});$_V(c$,"equals",function(a){if(null!=a&&$_O(a,java.lang.reflect.Constructor)&&this.getDeclaringClass()===a.getDeclaringClass()){var b=this.parameterTypes;a=a.parameterTypes;if(b.length==a.length){for(var c=0;c<b.length;c++)if(b[c]!==a[c])return!1;
return!0}}return!1},"~O");$_V(c$,"getDeclaringClass",function(){return this.clazz});$_M(c$,"getExceptionTypes",function(){return this.exceptionTypes});$_V(c$,"getModifiers",function(){return this.modifiers});$_V(c$,"getName",function(){return this.getDeclaringClass().getName()});$_M(c$,"getParameterTypes",function(){return this.parameterTypes});$_V(c$,"hashCode",function(){return this.getDeclaringClass().getName().hashCode()});$_M(c$,"newInstance",function(a){var b=new this.clazz($_G);$_Z(b,a);return b},
"~A");$_V(c$,"toString",function(){return null});c$=$_T(java.lang.reflect,"Field",java.lang.reflect.AccessibleObject,java.lang.reflect.Member);$_V(c$,"isSynthetic",function(){return!1});$_M(c$,"toGenericString",function(){return null});$_M(c$,"isEnumConstant",function(){return!1});$_M(c$,"getGenericType",function(){return null});$_V(c$,"equals",function(){return!1},"~O");$_V(c$,"getDeclaringClass",function(){return null});$_V(c$,"getName",function(){return null});$_M(c$,"getType",function(){return null});
$_V(c$,"hashCode",function(){return 0});$_V(c$,"toString",function(){return null});c$=$_C(function(){this.exceptionTypes=this.parameterTypes=this.returnType=this.name=this.clazz=null;this.modifiers=0;$_Z(this,arguments)},java.lang.reflect,"Method",java.lang.reflect.AccessibleObject,[java.lang.reflect.GenericDeclaration,java.lang.reflect.Member]);$_K(c$,function(a,b,c,d,e,f){$_R(this,java.lang.reflect.Method,[]);this.clazz=a;this.name=b;this.parameterTypes=c;this.returnType=d;this.exceptionTypes=e;
this.modifiers=f},"Class,~S,~A,Class,~A,~N");$_V(c$,"getTypeParameters",function(){return null});$_M(c$,"toGenericString",function(){return null});$_M(c$,"getGenericParameterTypes",function(){return null});$_M(c$,"getGenericExceptionTypes",function(){return null});$_M(c$,"getGenericReturnType",function(){return null});$_M(c$,"getParameterAnnotations",function(){return null});$_M(c$,"isVarArgs",function(){return!1});$_M(c$,"isBridge",function(){return!1});$_V(c$,"isSynthetic",function(){return!1});
$_M(c$,"getDefaultValue",function(){return null});$_V(c$,"equals",function(a){if(null!=a&&$_O(a,java.lang.reflect.Method)&&this.getDeclaringClass()===a.getDeclaringClass()&&this.getName()===a.getName()){var b=this.parameterTypes;a=a.parameterTypes;if(b.length==a.length){for(var c=0;c<b.length;c++)if(b[c]!==a[c])return!1;return!0}}return!1},"~O");$_V(c$,"getDeclaringClass",function(){return this.clazz});$_M(c$,"getExceptionTypes",function(){return this.exceptionTypes});$_V(c$,"getModifiers",function(){return this.modifiers});
$_V(c$,"getName",function(){return this.name});$_M(c$,"getParameterTypes",function(){return this.parameterTypes});$_M(c$,"getReturnType",function(){return this.returnType});$_V(c$,"hashCode",function(){return this.getDeclaringClass().getName().hashCode()^this.getName().hashCode()});$_M(c$,"invoke",function(a,b){var c=this.clazz.prototype[this.getName()];null==c&&(c=this.clazz[this.getName()]);null!=c&&c.apply(a,b)},"~O,~A");$_V(c$,"toString",function(){return null});Jmol.debugCode||(Clazz.declarePackage("java.net"),
Clazz.load(["java.io.IOException"],"java.net.MalformedURLException",null,function(){c$=Clazz.declareType(java.net,"MalformedURLException",java.io.IOException);Clazz.makeConstructor(c$,function(){Clazz.superConstructor(this,java.net.MalformedURLException,[])})}),$_J("java.net"),c$=$_T(java.net,"URLEncoder"),c$.encode=$_M(c$,"encode",function(a){return encodeURIComponent(a)},"~S"),c$.encode=$_M(c$,"encode",function(a){return encodeURIComponent(a)},"~S,~S"),$_S(c$,"digits","0123456789ABCDEF"),$_J("java.net"),
$_L(null,"java.net.URLDecoder",["java.lang.NullPointerException"],function(){c$=$_T(java.net,"URLDecoder");c$.decode=$_M(c$,"decode",function(a){return decodeURIComponent(a)},"~S");c$.decode=$_M(c$,"decode",function(a,b){if(null==b)throw new NullPointerException;return decodeURIComponent(a)},"~S,~S")}),Clazz.declarePackage("java.net"),Clazz.declareInterface(java.net,"URLStreamHandlerFactory"),Clazz.declarePackage("java.net"),Clazz.load(null,"java.net.URLStreamHandler",["java.lang.IllegalArgumentException",
"$.SecurityException","$.UnsupportedOperationException"],function(){c$=Clazz.declareType(java.net,"URLStreamHandler");$_M(c$,"openConnectionProxy",function(){throw new UnsupportedOperationException("Method not implemented.");},"java.net.URL,java.net.Proxy");$_M(c$,"parseURL",function(a,b,c,d){var e=a.getProtocol(),f=a.getAuthority(),g=a.getUserInfo(),h=a.getHost(),k=a.getPort(),l=a.getPath(),m=a.getQuery(),n=a.getRef(),p=!1,q=!1;if(c<d){var r=b.indexOf("?"),q=r==c;-1!=r&&r<d&&(m=b.substring(r+1,d),
d>r&&(d=r),b=b.substring(0,r))}var s=0;if(!(c<=d-4&&"/"==b.charAt(c)&&"/"==b.charAt(c+1)&&"/"==b.charAt(c+2)&&"/"==b.charAt(c+3))&&c<=d-2&&"/"==b.charAt(c)&&"/"==b.charAt(c+1)){c+=2;s=b.indexOf("/",c);0>s&&(s=b.indexOf("?",c),0>s&&(s=d));h=f=b.substring(c,s);r=f.indexOf("@");-1!=r?(g=f.substring(0,r),h=f.substring(r+1)):g=null;if(null!=h){if(0<h.length&&"["==h.charAt(0))throw new IllegalArgumentException("Invalid host: "+h);r=h.indexOf(":");k=-1;0<=r&&(h.length>r+1&&(k=Integer.parseInt(h.substring(r+
1))),h=h.substring(0,r))}else h="";if(-1>k)throw new IllegalArgumentException("Invalid port number :"+k);c=s;0<f.length&&(l="")}null==h&&(h="");c<d?"/"==b.charAt(c)?l=b.substring(c,d):null!=l&&0<l.length?(p=!0,r=l.lastIndexOf("/"),q="",-1==r&&null!=f&&(q="/"),l=l.substring(0,r+1)+q+b.substring(c,d)):l=(null!=f?"/":"")+b.substring(c,d):q&&null!=l&&(r=l.lastIndexOf("/"),0>r&&(r=0),l=l.substring(0,r)+"/");null==l&&(l="");if(p){for(;0<=(s=l.indexOf("/./"));)l=l.substring(0,s)+l.substring(s+2);for(s=0;0<=
(s=l.indexOf("/../",s));)0<s&&0<=(d=l.lastIndexOf("/",s-1))&&0!=l.indexOf("/../",d)?(l=l.substring(0,d)+l.substring(s+3),s=0):s+=3;for(;l.endsWith("/..");)if(s=l.indexOf("/.."),0<=(d=l.lastIndexOf("/",s-1)))l=l.substring(0,d+1);else break;l.startsWith("./")&&2<l.length&&(l=l.substring(2));l.endsWith("/.")&&(l=l.substring(0,l.length-1))}this.setURL(a,e,h,k,f,g,l,m,n)},"java.net.URL,~S,~N,~N");$_M(c$,"getDefaultPort",function(){return-1});$_M(c$,"equals2",function(a,b){var c=a.getRef(),d=b.getRef();
return(c===d||null!=c&&c.equals(d))&&this.sameFile(a,b)},"java.net.URL,java.net.URL");$_M(c$,"hashCode",function(a){var b=0,c=a.getProtocol();null!=c&&(b+=c.hashCode());b+=a.toString().hashCode();c=a.getFile();null!=c&&(b+=c.hashCode());b=-1==a.getPort()?b+this.getDefaultPort():b+a.getPort();a=a.getRef();null!=a&&(b+=a.hashCode());return b},"java.net.URL");$_M(c$,"sameFile",function(a,b){if(!(a.getProtocol()===b.getProtocol()||null!=a.getProtocol()&&a.getProtocol().equalsIgnoreCase(b.getProtocol()))||
!(a.getFile()===b.getFile()||null!=a.getFile()&&a.getFile().equals(b.getFile())))return!1;var c,d;c=-1!=a.getPort()?a.getPort():a.handler.getDefaultPort();d=-1!=b.getPort()?b.getPort():b.handler.getDefaultPort();return c!=d||!this.hostsEqual(a,b)?!1:!0},"java.net.URL,java.net.URL");$_M(c$,"hostsEqual",function(a,b){return null!=a.getHost()&&null!=b.getHost()?a.getHost().equalsIgnoreCase(b.getHost()):null==a.getHost()&&null==b.getHost()},"java.net.URL,java.net.URL");$_M(c$,"toExternalForm",function(){return""},
"java.net.URL");$_M(c$,"setURL",function(a,b,c,d,e,f,g,h,k){if(this!==a.handler)throw new SecurityException("handler for url different from this handler");a.set(a.getProtocol(),c,d,e,f,g,h,k)},"java.net.URL,~S,~S,~N,~S,~S,~S,~S,~S");$_M(c$,"setURLDeprecated",function(a,b,c,d,e,f){var g=null,h=null;if(null!=c&&0!=c.length){var g=-1==d?c:c+":"+d,k=c.lastIndexOf("@");-1!=k&&(h=c.substring(0,k),c=c.substring(k+1))}var l=null,k=null;null!=e&&(l=e.lastIndexOf("?"),-1!=l?(k=e.substring(l+1),l=e.substring(0,
l)):l=e);this.setURL(a,b,c,d,g,h,l,k,f)},"java.net.URL,~S,~S,~N,~S,~S")}),Clazz.declarePackage("java.net"),c$=Clazz.decorateAsClass(function(){this.ref=this.query=this.path=null;Clazz.instantialize(this,arguments)},java.net,"Parts"),Clazz.makeConstructor(c$,function(a){var b=a.indexOf("#");this.ref=0>b?null:a.substring(b+1);a=0>b?a:a.substring(0,b);b=a.lastIndexOf("?");-1!=b?(this.query=a.substring(b+1),this.path=a.substring(0,b)):this.path=a},"~S"),$_M(c$,"getPath",function(){return this.path}),
$_M(c$,"getQuery",function(){return this.query}),$_M(c$,"getRef",function(){return this.ref}),Clazz.declarePackage("java.net"),Clazz.load(["java.util.Hashtable"],"java.net.URL",["java.io.IOException","java.lang.Character","$.Error","java.net.MalformedURLException"],function(){c$=Clazz.decorateAsClass(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;Clazz.instantialize(this,arguments)},java.net,
"URL",null,java.io.Serializable);Clazz.makeConstructor(c$,function(a,b,c){var d,e,f,g=0,h=null,k=!1,l=!1;if(null!=c){var m=System.getSecurityManager();null!=m&&this.checkSpecifyHandler(m)}try{for(e=b.length;0<e&&" ">=b.charAt(e-1);)e--;for(;g<e&&" ">=b.charAt(g);)g++;b.regionMatches(!0,g,"url:",0,4)&&(g+=4);g<b.length&&"#"==b.charAt(g)&&(k=!0);for(d=g;!k&&d<e&&47!=(f=b.charCodeAt(d));d++)if(58==f){var n=b.substring(g,d).toLowerCase();this.isValidProtocol(n)&&(h=n,g=d+1);break}this.protocol=h;if(null!=
a&&(null==h||h.equalsIgnoreCase(a.protocol)))null==c&&(c=a.handler),null!=a.path&&a.path.startsWith("/")&&(h=null),null==h&&(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,l=!0);if(null==this.protocol)throw new java.net.MalformedURLException("no protocol: "+b);if(null==c&&null==(c=java.net.URL.getURLStreamHandler(this.protocol)))throw new java.net.MalformedURLException("unknown protocol: "+this.protocol);
this.handler=c;d=b.indexOf("#",g);0<=d&&(this.ref=b.substring(d+1,e),e=d);l&&g==e&&(this.query=a.query,null==this.ref&&(this.ref=a.ref));c.parseURL(this,b,g,e)}catch(p){if(Clazz.exceptionOf(p,java.net.MalformedURLException))throw p;if(Clazz.exceptionOf(p,Exception))throw a=p,b=new java.net.MalformedURLException(a.getMessage()),b.initCause(a),b;throw p;}},"java.net.URL,~S,java.net.URLStreamHandler");$_M(c$,"isValidProtocol",($fz=function(a){var b=a.length;if(1>b)return!1;var c=a.charAt(0);if(!Character.isLetter(c))return!1;
for(var d=1;d<b;d++)if(c=a.charAt(d),!Character.isLetterOrDigit(c)&&"."!=c&&"+"!=c&&"-"!=c)return!1;return!0},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"checkSpecifyHandler",($fz=function(){},$fz.isPrivate=!0,$fz),"SecurityManager");$_M(c$,"set5",function(a,b,c,d,e){this.protocol=a;this.host=b;this.authority=-1==c?b:b+":"+c;this.port=c;this.file=d;this.ref=e;this.$hashCode=-1;a=d.lastIndexOf("?");-1!=a?(this.query=d.substring(a+1),this.path=d.substring(0,a)):this.path=d},"~S,~S,~N,~S,~S");$_M(c$,"set",function(a,
b,c,d,e,f,g,h){this.protocol=a;this.host=b;this.port=c;this.file=null==g?f:f+"?"+g;this.userInfo=e;this.path=f;this.ref=h;this.$hashCode=-1;this.query=g;this.authority=d},"~S,~S,~N,~S,~S,~S,~S,~S");$_M(c$,"getQuery",function(){return this.query});$_M(c$,"getPath",function(){return this.path});$_M(c$,"getUserInfo",function(){return this.userInfo});$_M(c$,"getAuthority",function(){return this.authority});$_M(c$,"getPort",function(){return this.port});$_M(c$,"getDefaultPort",function(){return this.handler.getDefaultPort()});
$_M(c$,"getProtocol",function(){return this.protocol});$_M(c$,"getHost",function(){return this.host});$_M(c$,"getFile",function(){return this.file});$_M(c$,"getRef",function(){return this.ref});Clazz.overrideMethod(c$,"equals",function(a){return!Clazz.instanceOf(a,java.net.URL)?!1:this.handler.equals2(this,a)},"~O");Clazz.overrideMethod(c$,"hashCode",function(){return-1!=this.$hashCode?this.$hashCode:this.$hashCode=this.handler.hashCode(this)});$_M(c$,"sameFile",function(a){return this.handler.sameFile(this,
a)},"java.net.URL");Clazz.overrideMethod(c$,"toString",function(){return this.toExternalForm()});$_M(c$,"toExternalForm",function(){return this.handler.toExternalForm(this)});$_M(c$,"openConnection",function(){return this.handler.openConnection(this)});$_M(c$,"openStream",function(){return this.openConnection().getInputStream()});$_M(c$,"getContent",function(){return this.openConnection().getInputStream()});c$.setURLStreamHandlerFactory=$_M(c$,"setURLStreamHandlerFactory",function(a){if(null!=java.net.URL.factory)throw Error("factory already defined");
var b=System.getSecurityManager();null!=b&&b.checkSetFactory();java.net.URL.handlers.clear();$t$=java.net.URL.factory=a;java.net.URL.prototype.factory=java.net.URL.factory;$t$},"java.net.URLStreamHandlerFactory");c$.getURLStreamHandler=$_M(c$,"getURLStreamHandler",function(a){var b=java.net.URL.handlers.get(a);null==b&&null!=java.net.URL.factory&&(b=java.net.URL.factory.createURLStreamHandler(a));return b},"~S");Clazz.defineStatics(c$,"factory",null);c$.handlers=c$.prototype.handlers=new java.util.Hashtable;
c$.streamHandlerLock=c$.prototype.streamHandlerLock=new JavaObject}),Clazz.declarePackage("java.net"),Clazz.load(null,"java.net.URLConnection",["java.lang.IllegalStateException","$.NullPointerException","java.net.UnknownServiceException","J.util.JmolList"],function(){c$=Clazz.decorateAsClass(function(){this.url=null;this.doInput=!0;this.connected=this.doOutput=!1;this.requests=null;Clazz.instantialize(this,arguments)},java.net,"URLConnection");$_M(c$,"setDoInput",function(a){if(this.connected)throw new IllegalStateException("Already connected");
this.doInput=a},"~B");$_M(c$,"getDoInput",function(){return this.doInput});$_M(c$,"setDoOutput",function(a){if(this.connected)throw new IllegalStateException("Already connected");this.doOutput=a},"~B");$_M(c$,"getDoOutput",function(){return this.doOutput});Clazz.makeConstructor(c$,function(a){this.url=a},"java.net.URL");$_M(c$,"getURL",function(){return this.url});$_M(c$,"getInputStream",function(){throw new java.net.UnknownServiceException("protocol doesn't support input");});$_M(c$,"getOutputStream",
function(){throw new java.net.UnknownServiceException("protocol doesn't support output");});$_M(c$,"setRequestProperty",function(a,b){if(this.connected)throw new IllegalStateException("Already connected");if(null==a)throw new NullPointerException("key is null");null==this.requests&&(this.requests=new J.util.JmolList);for(var c=this.requests.size();0<=--c;)if(this.requests.get(c)[0].equals(a)){this.requests.get(c)[1]=b;return}this.requests.addLast([a,b])},"~S,~S")}),Clazz.declarePackage("J.awtjs2d"),
Clazz.load(["java.net.URLConnection"],"J.awtjs2d.JmolURLConnection",null,function(){c$=Clazz.decorateAsClass(function(){this.bytesOut=null;this.postOut="";Clazz.instantialize(this,arguments)},J.awtjs2d,"JmolURLConnection",java.net.URLConnection);$_M(c$,"doAjax",($fz=function(){return Jmol._doAjax(this.url,this.postOut,this.bytesOut)},$fz.isPrivate=!0,$fz));Clazz.overrideMethod(c$,"connect",function(){});$_M(c$,"outputBytes",function(a){this.bytesOut=a},"~A");$_M(c$,"outputString",function(a){this.postOut=
a},"~S");$_M(c$,"getStringXBuilder",function(){return this.doAjax()})}),$_L(["java.util.Map"],"java.util.MapEntry",null,function(){c$=$_C(function(){this.value=this.key=null;$_Z(this,arguments)},java.util,"MapEntry",null,[java.util.Map.Entry,Cloneable]);$_K(c$,function(a){this.key=a},"~O");$_K(c$,function(a,b){this.key=a;this.value=b},"~O,~O");$_M(c$,"clone",function(){try{return $_U(this,java.util.MapEntry,"clone",[])}catch(a){if($_O(a,CloneNotSupportedException))return null;throw a;}});$_V(c$,"equals",
function(a){return this===a?!0:$_O(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");$_V(c$,"getKey",function(){return this.key});$_V(c$,"getValue",function(){return this.value});$_V(c$,"hashCode",function(){return(null==this.key?0:this.key.hashCode())^(null==this.value?0:this.value.hashCode())});$_V(c$,"setValue",function(a){var b=this.value;this.value=a;return b},"~O");$_V(c$,"toString",
function(){return this.key+"="+this.value});$_I(java.util.MapEntry,"Type")}),c$=$_T(java.util,"Dictionary"),$_K(c$,function(){}),$_L("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$=
$_C(function(){this.elementCount=0;this.elementData=null;this.firstSlot=this.threshold=this.loadFactor=0;this.lastSlot=-1;this.modCount=0;$_D("java.util.Hashtable.HashIterator")||java.util.Hashtable.$Hashtable$HashIterator$();$_D("java.util.Hashtable.HashEnumerator")||java.util.Hashtable.$Hashtable$HashEnumerator$();$_Z(this,arguments)},java.util,"Hashtable",java.util.Dictionary,[java.util.Map,Cloneable,java.io.Serializable]);c$.newEntry=$_M(c$,"newEntry",($fz=function(a,b){return new java.util.Hashtable.Entry(a,
b)},$fz.isPrivate=!0,$fz),"~O,~O,~N");$_k(c$,function(){this.elementCount=0;this.elementData=this.newElementArray(11);this.firstSlot=this.elementData.length;this.loadFactor=0.75;this.computeMaxSize()});$_M(c$,"newElementArray",($fz=function(a){return Array(a)},$fz.isPrivate=!0,$fz),"~N");$_V(c$,"clear",function(){this.elementCount=0;for(var a=this.elementData.length;0<=--a;)this.elementData[a]=null;this.modCount++});$_M(c$,"clone",function(){try{var a=$_U(this,java.util.Hashtable,"clone",[]);a.elementData=
this.elementData.clone();for(var b,c=this.elementData.length;0<=--c;)if(null!=(b=this.elementData[c]))a.elementData[c]=b.clone();return a}catch(d){if($_O(d,CloneNotSupportedException))return null;throw d;}});$_M(c$,"computeMaxSize",($fz=function(){this.threshold=Math.round(this.elementData.length*this.loadFactor)},$fz.isPrivate=!0,$fz));$_M(c$,"contains",function(a){if(null==a)throw new NullPointerException;for(var b=this.elementData.length;0<=--b;)for(var c=this.elementData[b];null!=c;){if(a.equals(c.value))return!0;
c=c.next}return!1},"~O");$_V(c$,"containsKey",function(a){return null!=this.getEntry(a)},"~O");$_V(c$,"containsValue",function(a){return this.contains(a)},"~O");$_V(c$,"elements",function(){return 0==this.elementCount?java.util.Hashtable.EMPTY_ENUMERATION:$_N(java.util.Hashtable.HashEnumerator,this,null,!1)});$_V(c$,"entrySet",function(){return new java.util.Collections.SynchronizedSet(($_D("java.util.Hashtable$2")?0:java.util.Hashtable.$Hashtable$2$(),$_N(java.util.Hashtable$2,this,null)),this)});
$_V(c$,"equals",function(a){if(this===a)return!0;if($_O(a,java.util.Map)){if(this.size()!=a.size())return!1;var b=this.entrySet(),c;for(a=a.entrySet().iterator();a.hasNext()&&((c=a.next())||1);)if(!b.contains(c))return!1;return!0}return!1},"~O");$_V(c$,"get",function(a){for(var b=a.hashCode(),c=this.elementData[(b&2147483647)%this.elementData.length];null!=c;){if(c.equalsKey(a,b))return c.value;c=c.next}return null},"~O");$_M(c$,"getEntry",function(a){for(var b=a.hashCode(),c=this.elementData[(b&
2147483647)%this.elementData.length];null!=c;){if(c.equalsKey(a,b))return c;c=c.next}return null},"~O");$_V(c$,"hashCode",function(){for(var a=0,b=this.entrySet().iterator();b.hasNext();)var c=b.next(),d=c.getKey(),c=c.getValue(),d=(d!==this?d.hashCode():0)^(c!==this?null!=c?c.hashCode():0:0),a=a+d;return a});$_V(c$,"isEmpty",function(){return 0==this.elementCount});$_V(c$,"keys",function(){return 0==this.elementCount?java.util.Hashtable.EMPTY_ENUMERATION:$_N(java.util.Hashtable.HashEnumerator,this,
null,!0)});$_V(c$,"keySet",function(){return new java.util.Collections.SynchronizedSet(($_D("java.util.Hashtable$3")?0:java.util.Hashtable.$Hashtable$3$(),$_N(java.util.Hashtable$3,this,null)),this)});$_V(c$,"put",function(a,b){if(null!=a&&null!=b){for(var c=a.hashCode(),d=(c&2147483647)%this.elementData.length,e=this.elementData[d];null!=e&&!e.equalsKey(a,c);)e=e.next;if(null==e)return this.modCount++,++this.elementCount>this.threshold&&(this.rehash(),d=(c&2147483647)%this.elementData.length),d<
this.firstSlot&&(this.firstSlot=d),d>this.lastSlot&&(this.lastSlot=d),e=java.util.Hashtable.newEntry(a,b,c),e.next=this.elementData[d],this.elementData[d]=e,null;c=e.value;e.value=b;return c}throw new NullPointerException;},"~O,~O");$_V(c$,"putAll",function(a){var b;for(a=a.entrySet().iterator();a.hasNext()&&((b=a.next())||1);)this.put(b.getKey(),b.getValue())},"java.util.Map");$_M(c$,"rehash",function(){var a=(this.elementData.length<<1)+1;0==a&&(a=1);for(var b=a,c=-1,d=this.newElementArray(a),e=
this.lastSlot+1;--e>=this.firstSlot;)for(var f=this.elementData[e];null!=f;){var g=(f.getKeyHash()&2147483647)%a;g<b&&(b=g);g>c&&(c=g);var h=f.next;f.next=d[g];d[g]=f;f=h}this.firstSlot=b;this.lastSlot=c;this.elementData=d;this.computeMaxSize()});$_V(c$,"remove",function(a){for(var b=a.hashCode(),c=(b&2147483647)%this.elementData.length,d=null,e=this.elementData[c];null!=e&&!e.equalsKey(a,b);)d=e,e=e.next;return null!=e?(this.modCount++,null==d?this.elementData[c]=e.next:d.next=e.next,this.elementCount--,
a=e.value,e.value=null,a):null},"~O");$_V(c$,"size",function(){return this.elementCount});$_V(c$,"toString",function(){if(this.isEmpty())return"{}";var a=new StringBuilder(28*this.size());a.append("{");for(var b=this.lastSlot;b>=this.firstSlot;b--)for(var c=this.elementData[b];null!=c;)c.key!==this?a.append(c.key):a.append("(this Map)"),a.append("="),c.value!==this?a.append(c.value):a.append("(this Map)"),a.append(", "),c=c.next;0<this.elementCount&&a.setLength(a.length()-2);a.append("}");return a.toString()});
$_V(c$,"values",function(){return new java.util.Collections.SynchronizedCollection(($_D("java.util.Hashtable$4")?0:java.util.Hashtable.$Hashtable$4$(),$_N(java.util.Hashtable$4,this,null)),this)});c$.$Hashtable$HashIterator$=function(){$_H();c$=$_C(function(){$_B(this,arguments);this.expectedModCount=this.position=0;this.lastEntry=this.type=null;this.lastPosition=0;this.canRemove=!1;$_Z(this,arguments)},java.util.Hashtable,"HashIterator",null,java.util.Iterator);$_K(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");$_V(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});$_V(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;});$_V(c$,"remove",function(){if(this.expectedModCount==
this.b$["java.util.Hashtable"].modCount)if(this.canRemove){var a=this.canRemove=!1,b=this.b$["java.util.Hashtable"].elementData[this.lastPosition];if(b===this.lastEntry)this.b$["java.util.Hashtable"].elementData[this.lastPosition]=b.next,a=!0;else{for(;null!=b&&b.next!==this.lastEntry;)b=b.next;null!=b&&(b.next=this.lastEntry.next,a=!0)}if(a){this.b$["java.util.Hashtable"].modCount++;this.b$["java.util.Hashtable"].elementCount--;this.expectedModCount++;return}}else throw new IllegalStateException;
throw new java.util.ConcurrentModificationException;});c$=$_P()};c$.$Hashtable$HashEnumerator$=function(){$_H();c$=$_C(function(){$_B(this,arguments);this.key=!1;this.start=0;this.entry=null;$_Z(this,arguments)},java.util.Hashtable,"HashEnumerator",null,java.util.Enumeration);$_K(c$,function(a){this.key=a;this.start=this.b$["java.util.Hashtable"].lastSlot+1},"~B");$_V(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});$_V(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$=$_P()};c$.$Hashtable$2$=function(){$_H();c$=$_W(java.util,"Hashtable$2",java.util.AbstractSet);$_V(c$,"size",function(){return this.b$["java.util.Hashtable"].elementCount});
$_V(c$,"clear",function(){this.b$["java.util.Hashtable"].clear()});$_V(c$,"remove",function(a){return this.contains(a)?(this.b$["java.util.Hashtable"].remove(a.getKey()),!0):!1},"~O");$_M(c$,"contains",function(a){var b=this.b$["java.util.Hashtable"].getEntry(a.getKey());return a.equals(b)},"~O");$_M(c$,"iterator",function(){return $_N(java.util.Hashtable.HashIterator,this,null,($_D("java.util.Hashtable$2$1")?0:java.util.Hashtable.$Hashtable$2$1$(),$_N(java.util.Hashtable$2$1,this,null)))});c$=$_P()};
c$.$Hashtable$2$1$=function(){$_H();c$=$_W(java.util,"Hashtable$2$1",null,java.util.MapEntry.Type);$_V(c$,"get",function(a){return a},"java.util.MapEntry");c$=$_P()};c$.$Hashtable$3$=function(){$_H();c$=$_W(java.util,"Hashtable$3",java.util.AbstractSet);$_V(c$,"contains",function(a){return this.b$["java.util.Hashtable"].containsKey(a)},"~O");$_V(c$,"size",function(){return this.b$["java.util.Hashtable"].elementCount});$_V(c$,"clear",function(){this.b$["java.util.Hashtable"].clear()});$_V(c$,"remove",
function(a){return this.b$["java.util.Hashtable"].containsKey(a)?(this.b$["java.util.Hashtable"].remove(a),!0):!1},"~O");$_V(c$,"iterator",function(){return $_N(java.util.Hashtable.HashIterator,this,null,($_D("java.util.Hashtable$3$1")?0:java.util.Hashtable.$Hashtable$3$1$(),$_N(java.util.Hashtable$3$1,this,null)))});c$=$_P()};c$.$Hashtable$3$1$=function(){$_H();c$=$_W(java.util,"Hashtable$3$1",null,java.util.MapEntry.Type);$_V(c$,"get",function(a){return a.key},"java.util.MapEntry");c$=$_P()};c$.$Hashtable$4$=
function(){$_H();c$=$_W(java.util,"Hashtable$4",java.util.AbstractCollection);$_V(c$,"contains",function(a){return this.b$["java.util.Hashtable"].contains(a)},"~O");$_V(c$,"size",function(){return this.b$["java.util.Hashtable"].elementCount});$_V(c$,"clear",function(){this.b$["java.util.Hashtable"].clear()});$_V(c$,"iterator",function(){return $_N(java.util.Hashtable.HashIterator,this,null,($_D("java.util.Hashtable$4$1")?0:java.util.Hashtable.$Hashtable$4$1$(),$_N(java.util.Hashtable$4$1,this,null)))});
c$=$_P()};c$.$Hashtable$4$1$=function(){$_H();c$=$_W(java.util,"Hashtable$4$1",null,java.util.MapEntry.Type);$_V(c$,"get",function(a){return a.value},"java.util.MapEntry");c$=$_P()};c$.$Hashtable$1$=function(){$_H();c$=$_W(java.util,"Hashtable$1",null,java.util.Enumeration);$_V(c$,"hasMoreElements",function(){return!1});$_V(c$,"nextElement",function(){throw new java.util.NoSuchElementException;});c$=$_P()};$_H();c$=$_C(function(){this.next=null;this.hashcode=0;$_Z(this,arguments)},java.util.Hashtable,
"Entry",java.util.MapEntry);$_k(c$,function(a,b){this.key=a;this.value=b;this.hashcode=a.hashCode()});$_M(c$,"clone",function(){var a=$_U(this,java.util.Hashtable.Entry,"clone",[]);null!=this.next&&(a.next=this.next.clone());return a});$_V(c$,"setValue",function(a){if(null==a)throw new NullPointerException;var b=this.value;this.value=a;return b},"~O");$_M(c$,"getKeyHash",function(){return this.key.hashCode()});$_M(c$,"equalsKey",function(a){return this.hashcode==a.hashCode()&&this.key.equals(a)},
"~O,~N");$_V(c$,"toString",function(){return this.key+"="+this.value});c$=$_P();c$.EMPTY_ENUMERATION=c$.prototype.EMPTY_ENUMERATION=($_D("java.util.Hashtable$1")?0:java.util.Hashtable.$Hashtable$1$(),$_N(java.util.Hashtable$1,this,null))}),Clazz.declarePackage("J.util"),Clazz.declareInterface(J.util,"LoggerInterface"),Clazz.declarePackage("J.util"),Clazz.load(["J.util.LoggerInterface"],"J.util.DefaultLogger",["J.util.Logger"],function(){c$=Clazz.declareType(J.util,"DefaultLogger",null,J.util.LoggerInterface);
$_M(c$,"log",function(a,b,c,d){a===System.err&&System.out.flush();if(null!=a&&(null!=c||null!=d))if(a.println((J.util.Logger.logLevel()?"["+J.util.Logger.getLevel(b)+"] ":"")+(null!=c?c:"")+(null!=d?": "+d.toString():"")),null!=d&&(b=d.getStackTrace(),null!=b))for(c=0;c<b.length;c++)a.println(b[c].getClassName()+" - "+b[c].getLineNumber()+" - "+b[c].getMethodName());a===System.err&&System.err.flush()},"java.io.PrintStream,~N,~S,Throwable");Clazz.overrideMethod(c$,"debug",function(a){this.log(System.out,
5,a,null)},"~S");Clazz.overrideMethod(c$,"info",function(a){this.log(System.out,4,a,null)},"~S");Clazz.overrideMethod(c$,"warn",function(a){this.log(System.out,3,a,null)},"~S");Clazz.overrideMethod(c$,"warnEx",function(a,b){this.log(System.out,3,a,b)},"~S,Throwable");Clazz.overrideMethod(c$,"error",function(a){this.log(System.err,2,a,null)},"~S");Clazz.overrideMethod(c$,"errorEx",function(a,b){this.log(System.err,2,a,b)},"~S,Throwable");Clazz.overrideMethod(c$,"fatal",function(a){this.log(System.err,
1,a,null)},"~S");Clazz.overrideMethod(c$,"fatalEx",function(a,b){this.log(System.err,1,a,b)},"~S,Throwable")}),Clazz.declarePackage("J.util"),Clazz.load(["java.util.Hashtable","J.util.DefaultLogger"],"J.util.Logger",["java.lang.Long"],function(){c$=Clazz.declareType(J.util,"Logger");c$.getProperty=$_M(c$,"getProperty",($fz=function(a,b){try{var c=System.getProperty("jmol.logger."+a,null);if(null!=c)return c.equalsIgnoreCase("true")}catch(d){if(!Clazz.exceptionOf(d,Exception))throw d;}return b},$fz.isPrivate=
!0,$fz),"~S,~B");c$.setLogger=$_M(c$,"setLogger",function(a){$t$=J.util.Logger._logger=a;J.util.Logger.prototype._logger=J.util.Logger._logger;$t$;$t$=J.util.Logger.debugging=J.util.Logger.isActiveLevel(5)||J.util.Logger.isActiveLevel(6);J.util.Logger.prototype.debugging=J.util.Logger.debugging;$t$},"J.util.LoggerInterface");c$.isActiveLevel=$_M(c$,"isActiveLevel",function(a){return null!=J.util.Logger._logger&&0<=a&&7>a&&J.util.Logger._activeLevels[a]},"~N");c$.setActiveLevel=$_M(c$,"setActiveLevel",
function(a,b){0>a&&(a=0);7<=a&&(a=6);J.util.Logger._activeLevels[a]=b;$t$=J.util.Logger.debugging=J.util.Logger.isActiveLevel(5)||J.util.Logger.isActiveLevel(6);J.util.Logger.prototype.debugging=J.util.Logger.debugging;$t$},"~N,~B");c$.setLogLevel=$_M(c$,"setLogLevel",function(a){for(var b=7;0<=--b;)J.util.Logger.setActiveLevel(b,b<=a)},"~N");c$.getLevel=$_M(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=$_M(c$,"logLevel",function(){return J.util.Logger._logLevel});c$.doLogLevel=$_M(c$,"doLogLevel",function(a){$t$=J.util.Logger._logLevel=a;J.util.Logger.prototype._logLevel=J.util.Logger._logLevel;$t$},"~B");c$.debug=$_M(c$,"debug",function(a){if(J.util.Logger.debugging)try{J.util.Logger._logger.debug(a)}catch(b){}},"~S");c$.info=$_M(c$,"info",function(a){try{J.util.Logger.isActiveLevel(4)&&J.util.Logger._logger.info(a)}catch(b){}},"~S");c$.warn=
$_M(c$,"warn",function(a){try{J.util.Logger.isActiveLevel(3)&&J.util.Logger._logger.warn(a)}catch(b){}},"~S");c$.warnEx=$_M(c$,"warnEx",function(a,b){try{J.util.Logger.isActiveLevel(3)&&J.util.Logger._logger.warnEx(a,b)}catch(c){}},"~S,Throwable");c$.error=$_M(c$,"error",function(a){try{J.util.Logger.isActiveLevel(2)&&J.util.Logger._logger.error(a)}catch(b){}},"~S");c$.errorEx=$_M(c$,"errorEx",function(a,b){try{J.util.Logger.isActiveLevel(2)&&J.util.Logger._logger.errorEx(a,b)}catch(c){}},"~S,Throwable");
c$.getLogLevel=$_M(c$,"getLogLevel",function(){for(var a=7;0<=--a;)if(J.util.Logger.isActiveLevel(a))return a;return 0});c$.fatal=$_M(c$,"fatal",function(a){try{J.util.Logger.isActiveLevel(1)&&J.util.Logger._logger.fatal(a)}catch(b){}},"~S");c$.fatalEx=$_M(c$,"fatalEx",function(a,b){try{J.util.Logger.isActiveLevel(1)&&J.util.Logger._logger.fatalEx(a,b)}catch(c){}},"~S,Throwable");c$.startTimer=$_M(c$,"startTimer",function(a){null!=a&&J.util.Logger.htTiming.put(a,Long.$valueOf(System.currentTimeMillis()))},
"~S");c$.checkTimer=$_M(c$,"checkTimer",function(a,b){if(null==a)return-1;var c=J.util.Logger.htTiming.get(a);if(null==c)return-1;c=System.currentTimeMillis()-c.longValue();a.startsWith("(")||J.util.Logger.info("Time for "+a+": "+c+" ms");b&&J.util.Logger.startTimer(a);return c},"~S,~B");c$.checkMemory=$_M(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;Clazz.defineStatics(c$,"LEVEL_FATAL",1,
"LEVEL_ERROR",2,"LEVEL_WARN",3,"LEVEL_INFO",4,"LEVEL_DEBUG",5,"LEVEL_DEBUGHIGH",6,"LEVEL_MAX",7,"_activeLevels",Clazz.newBooleanArray(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);$t$=J.util.Logger._logLevel=J.util.Logger.getProperty("logLevel",!1);J.util.Logger.prototype._logLevel=J.util.Logger._logLevel;$t$;$t$=J.util.Logger.debugging=null!=J.util.Logger._logger&&(J.util.Logger._activeLevels[5]||J.util.Logger._activeLevels[6]);J.util.Logger.prototype.debugging=J.util.Logger.debugging;$t$;$t$=J.util.Logger.debuggingHigh=J.util.Logger.debugging&&J.util.Logger._activeLevels[6];J.util.Logger.prototype.debuggingHigh=
J.util.Logger.debuggingHigh;$t$;c$.htTiming=c$.prototype.htTiming=new java.util.Hashtable}),Clazz.declarePackage("J.i18n"),Clazz.load(null,"J.i18n.Resource",["J.util.TextFormat"],function(){c$=Clazz.decorateAsClass(function(){this.resource=null;Clazz.instantialize(this,arguments)},J.i18n,"Resource");Clazz.makeConstructor(c$,($fz=function(a){this.resource=a},$fz.isPrivate=!0,$fz),"~O");c$.getResource=$_M(c$,"getResource",function(a,b){var c=null,c=ClazzLoader.fastGetJ2SLibBase()+"/trans/"+b+".po",
c=Jmol._doAjax(c,null,null);if(!c)return null;c=c.toString();try{return null==c?null:J.i18n.Resource.getResourceFromPO(c)}catch(d){if(Clazz.exceptionOf(d,Exception))return null;throw d;}},"~S,~S");$_M(c$,"getString",function(a){return this.resource.get(a)},"~S");c$.getLanguage=$_M(c$,"getLanguage",function(){var a=null;return a=Jmol.featureDetection.getDefaultLanguage().replace(/-/g,"_")});c$.getResourceFromPO=$_M(c$,"getResourceFromPO",function(a){if(null==a||0==a.length)return null;var b=null;try{var c=
J.util.TextFormat.split(a,"\n"),b=new java.util.Hashtable;a=0;for(var d="",e="",f=0;f<c.length;f++){var g=c[f];2>=g.length?2==a&&(0!=d.length&&0!=e.length)&&b.put(e,d):0==g.indexOf("msgid")?(a=1,e=J.i18n.Resource.fix(g)):0==g.indexOf("msgstr")?(a=2,d=J.i18n.Resource.fix(g)):1==a?e+=J.i18n.Resource.fix(g):2==a&&(d+=J.i18n.Resource.fix(g))}}catch(h){}return null==b||0==b.size()?null:new J.i18n.Resource(b)},"~S");c$.fix=$_M(c$,"fix",function(a){return J.util.TextFormat.simpleReplace(a.substring(a.indexOf('"')+
1,a.lastIndexOf('"')),"\\n","\n")},"~S")}),Clazz.declarePackage("J.i18n"),Clazz.load(null,"J.i18n.Language",["J.i18n.GT"],function(){c$=Clazz.decorateAsClass(function(){this.nativeLanguage=this.language=this.code=null;this.display=!1;Clazz.instantialize(this,arguments)},J.i18n,"Language");c$.getLanguageList=$_M(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)]});Clazz.makeConstructor(c$,($fz=function(a,b,c,d){this.code=a;this.language=b;this.nativeLanguage=c;this.display=d},$fz.isPrivate=!0,$fz),"~S,~S,~S,~B");c$.getSupported=$_M(c$,"getSupported",
function(a,b){for(var c=a.length;0<=--c;)if(a[c].code.equalsIgnoreCase(b))return a[c].code;for(c=a.length;0<=--c;)if(a[c].code.startsWith(b))return a[c].code;return null},"~A,~S")}),$_J("java.text"),c$=$_C(function(){this.pattern=null;$_Z(this,arguments)},java.text,"MessageFormat"),$_K(c$,function(a){this.pattern=a},"~S"),$_K(c$,function(a){this.pattern=a},"~S,java.util.Locale"),c$.format=$_M(c$,"format",function(a,b){return a.replace(/\{(\d+)\}/g,function(a,d){var e=parseInt(d);return null==b?null:
b[e]})},"~S,~A"),$_M(c$,"format",function(a){return java.text.MessageFormat.format(this.pattern,[a])},"~O"),Clazz.declarePackage("J.i18n"),Clazz.load(["java.util.Hashtable","J.i18n.Language","$.Resource"],"J.i18n.GT",["java.text.MessageFormat","J.util.Logger"],function(){c$=Clazz.decorateAsClass(function(){this.resources=null;this.resourceCount=0;this.doTranslate=!0;this.language=null;Clazz.instantialize(this,arguments)},J.i18n,"GT");Clazz.makeConstructor(c$,function(){});Clazz.makeConstructor(c$,
function(a){this.resources=null;this.resourceCount=0;$t$=J.i18n.GT.$getTextWrapper=this;J.i18n.GT.prototype.$getTextWrapper=J.i18n.GT.$getTextWrapper;$t$;null!=a&&0==a.length&&(a="none");null!=a&&(this.language=a);"none".equals(this.language)&&(this.language=null);null==this.language&&(this.language=J.i18n.Resource.getLanguage());null==this.language&&(this.language="en");a=this.language;var b=null,c=null,d=this.language.indexOf("_");if(0<=d&&(a=a.substring(0,d),b=this.language,0<=(d=b.indexOf("_",
++d))))b=b.substring(0,d),c=this.language;if(null==(this.language=this.getSupported(c))&&null==(this.language=this.getSupported(b))&&null==(this.language=this.getSupported(a)))this.language="en",System.out.println(this.language+" not supported -- using en");else{b=c=null;switch(this.language.length){default:c=this.language;b=this.language.substring(0,5);a=this.language.substring(0,2);break;case 5:b=this.language;a=this.language.substring(0,2);break;case 2:a=this.language}b=this.getSupported(b);a=
this.getSupported(a);if(a===b||"en_US".equals(a))a=null;b===c&&(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:"+a+" country:"+b+" variant:"+c),J.i18n.GT.$ignoreApplicationBundle||this.addBundles("Jmol",c,b,a),this.addBundles("JmolApplet",c,b,a))}},"~S");c$.getLanguageList=$_M(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=$_M(c$,"getLanguage",function(){return J.i18n.GT.getTextWrapper().language});c$.ignoreApplicationBundle=$_M(c$,"ignoreApplicationBundle",function(){$t$=J.i18n.GT.$ignoreApplicationBundle=!0;J.i18n.GT.prototype.$ignoreApplicationBundle=J.i18n.GT.$ignoreApplicationBundle;$t$});c$.setDoTranslate=$_M(c$,"setDoTranslate",function(a){var b=J.i18n.GT.getDoTranslate();J.i18n.GT.getTextWrapper().doTranslate=a;return b},"~B");
c$.getDoTranslate=$_M(c$,"getDoTranslate",function(){return J.i18n.GT.getTextWrapper().doTranslate});c$._=$_M(c$,"_",function(a){return J.i18n.GT.getTextWrapper().getString(a,null)},"~S");c$._=$_M(c$,"_",function(a,b){return J.i18n.GT.getTextWrapper().getString(a,[b])},"~S,~S");c$._=$_M(c$,"_",function(a,b){return J.i18n.GT.getTextWrapper().getString(a,[Integer.$valueOf(b)])},"~S,~N");c$._=$_M(c$,"_",function(a,b){return J.i18n.GT.getTextWrapper().getString(a,b)},"~S,~A");c$.escapeHTML=$_M(c$,"escapeHTML",
function(a){for(var b,c=a.length;0<=--c;)if(127<(b=a.charAt(c)).charCodeAt(0))a=a.substring(0,c)+"&#"+b.charCodeAt(0)+";"+a.substring(c+1);return a},"~S");c$.getTextWrapper=$_M(c$,"getTextWrapper",($fz=function(){return null==J.i18n.GT.$getTextWrapper?($t$=J.i18n.GT.$getTextWrapper=new J.i18n.GT(null),J.i18n.GT.prototype.$getTextWrapper=J.i18n.GT.$getTextWrapper,$t$):J.i18n.GT.$getTextWrapper},$fz.isPrivate=!0,$fz));$_M(c$,"createLanguageList",($fz=function(){var a=this.doTranslate;this.doTranslate=
!1;$t$=J.i18n.GT.languageList=J.i18n.Language.getLanguageList();J.i18n.GT.prototype.languageList=J.i18n.GT.languageList;$t$;this.doTranslate=a},$fz.isPrivate=!0,$fz));$_M(c$,"getSupported",($fz=function(a){if(null==a)return null;var b=J.i18n.GT.htLanguages.get(a);if(null!=b)return 0==b.length?null:b;b=J.i18n.Language.getSupported(J.i18n.GT.getLanguageList(this),a);J.i18n.GT.htLanguages.put(a,null==b?"":b);return b},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"addBundles",($fz=function(a,b,c,d){try{a="J.translation."+
a+".",null!=b&&this.addBundle(a,b),null!=c&&this.addBundle(a,c),null!=d&&this.addBundle(a,d)}catch(e){if(Clazz.exceptionOf(e,Exception))J.i18n.GT.allowDebug&&J.util.Logger.errorEx("Some exception occurred!",e),this.resources=null,this.resourceCount=0;else throw e;}},$fz.isPrivate=!0,$fz),"~S,~S,~S,~S");$_M(c$,"addBundle",($fz=function(a,b){var c=J.i18n.Resource.getResource(a,b);null!=c&&(null==this.resources&&(this.resources=Array(8),this.resourceCount=0),this.resources[this.resourceCount]=c,this.resourceCount++,
J.i18n.GT.allowDebug&&J.util.Logger.debug("GT adding "+a))},$fz.isPrivate=!0,$fz),"~S,~S");$_M(c$,"getString",($fz=function(a,b){var c=null;if(this.doTranslate){for(var d=this.resourceCount;0<=--d;){c=this.resources[d].getString(a);break}null==c?0<this.resourceCount&&(J.i18n.GT.allowDebug&&J.util.Logger.debugging)&&J.util.Logger.debug("No trans, using default: "+a):a=c}null==c&&(a.startsWith("[")?a=a.substring(a.indexOf("]")+1):a.endsWith("]")&&(a=a.substring(0,a.indexOf("["))));return null==b?a:
java.text.MessageFormat.format(a,b)},$fz.isPrivate=!0,$fz),"~S,~A");Clazz.defineStatics(c$,"$ignoreApplicationBundle",!1,"$getTextWrapper",null,"languageList",null,"allowDebug",!1);c$.htLanguages=c$.prototype.htLanguages=new java.util.Hashtable}),$_L(null,"java.lang.AbstractStringBuilder","java.io.InvalidObjectException java.lang.ArrayIndexOutOfBoundsException $.IndexOutOfBoundsException $.NegativeArraySizeException $.NullPointerException $.StringIndexOutOfBoundsException".split(" "),function(){c$=
$_C(function(){this.value=null;this.count=0;this.shared=!1;$_Z(this,arguments)},java.lang,"AbstractStringBuilder");$_M(c$,"getValue",function(){return this.value});$_M(c$,"shareValue",function(){this.shared=!0;return this.value});$_M(c$,"set",function(a,b){null==a&&(a=$_A(0,"\x00"));if(a.length<b)throw new java.io.InvalidObjectException("K0199");this.shared=!1;this.value=a;this.count=b},"~A,~N");$_K(c$,function(){this.value=$_A(16,"\x00")});$_K(c$,function(a){if(0>a)throw new NegativeArraySizeException;
this.value=$_A(a,"\x00")},"~N");$_K(c$,function(a){this.count=a.length;this.shared=!1;this.value=$_A(this.count+16,"\x00");a.getChars(0,this.count,this.value,0)},"~S");$_M(c$,"enlargeBuffer",($fz=function(a){var b=(this.value.length<<1)+2;a=$_A(a>b?a:b,"\x00");System.arraycopy(this.value,0,a,0,this.count);this.value=a;this.shared=!1},$fz.isPrivate=!0,$fz),"~N");$_M(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"});$_M(c$,"append0",function(a){var b=this.count+a.length;b>this.value.length?this.enlargeBuffer(b):this.shared&&(this.value=this.value.clone(),this.shared=!1);System.arraycopy(a,0,this.value,this.count,a.length);this.count=b},"~A");$_M(c$,"append0",function(a,b,c){if(null==a)throw new NullPointerException;if(0<=b&&0<=c&&c<=a.length-b){var d=this.count+c;d>this.value.length?this.enlargeBuffer(d):
this.shared&&(this.value=this.value.clone(),this.shared=!1);System.arraycopy(a,b,this.value,this.count,c);this.count=d}else throw new ArrayIndexOutOfBoundsException;},"~A,~N,~N");$_M(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");$_M(c$,"append0",function(a){if(null==a)this.appendNull();else{var b=a.length,c=this.count+b;c>this.value.length?this.enlargeBuffer(c):
this.shared&&(this.value=this.value.clone(),this.shared=!1);a.getChars(0,b,this.value,this.count);this.count=c}},"~S");$_M(c$,"append0",function(a,b,c){null==a&&(a="null");if(0>b||0>c||b>c||c>a.length())throw new IndexOutOfBoundsException;this.append0(a.subSequence(b,c).toString())},"CharSequence,~N,~N");$_M(c$,"capacity",function(){return this.value.length});$_M(c$,"charAt",function(a){if(0>a||a>=this.count)throw new StringIndexOutOfBoundsException(a);return this.value[a]},"~N");$_M(c$,"delete0",
function(a,b){if(0<=a){b>this.count&&(b=this.count);if(b==a)return;if(b>a){var c=this.count-b;if(0<c)if(this.shared){var d=$_A(this.value.length,"\x00");System.arraycopy(this.value,0,d,0,a);System.arraycopy(this.value,b,d,a,c);this.value=d;this.shared=!1}else System.arraycopy(this.value,b,this.value,a,c);this.count-=b-a;return}}throw new StringIndexOutOfBoundsException;},"~N,~N");$_M(c$,"deleteCharAt0",function(a){if(0>a||a>=this.count)throw new StringIndexOutOfBoundsException(a);var b=this.count-
a-1;if(0<b)if(this.shared){var c=$_A(this.value.length,"\x00");System.arraycopy(this.value,0,c,0,a);System.arraycopy(this.value,a+1,c,a,b);this.value=c;this.shared=!1}else System.arraycopy(this.value,a+1,this.value,a,b);this.count--},"~N");$_M(c$,"ensureCapacity",function(a){a>this.value.length&&this.enlargeBuffer(a)},"~N");$_M(c$,"getChars",function(a,b,c,d){if(a>this.count||b>this.count||a>b)throw new StringIndexOutOfBoundsException;System.arraycopy(this.value,a,c,d,b-a)},"~N,~N,~A,~N");$_M(c$,
"insert0",function(a,b){if(0>a||a>this.count)throw new StringIndexOutOfBoundsException(a);0!=b.length&&(this.move(b.length,a),System.arraycopy(b,0,this.value,a,b.length),this.count+=b.length)},"~N,~A");$_M(c$,"insert0",function(a,b,c,d){if(0<=a&&a<=this.count){if(0<=c&&0<=d&&d<=b.length-c){0!=d&&(this.move(d,a),System.arraycopy(b,c,this.value,a,d),this.count+=d);return}throw new StringIndexOutOfBoundsException("offset "+c+", len "+d+", array.length "+b.length);}throw new StringIndexOutOfBoundsException(a);
},"~N,~A,~N,~N");$_M(c$,"insert0",function(a,b){if(0>a||a>this.count)throw new ArrayIndexOutOfBoundsException(a);this.move(1,a);this.value[a]=b;this.count++},"~N,~N");$_M(c$,"insert0",function(a,b){if(0<=a&&a<=this.count){null==b&&(b="null");var c=b.length;0!=c&&(this.move(c,a),b.getChars(0,c,this.value,a),this.count+=c)}else throw new StringIndexOutOfBoundsException(a);},"~N,~S");$_M(c$,"insert0",function(a,b,c,d){null==b&&(b="null");if(0>a||a>this.count||0>c||0>d||c>d||d>b.length())throw new IndexOutOfBoundsException;
this.insert0(a,b.subSequence(c,d).toString())},"~N,CharSequence,~N,~N");$_M(c$,"length",function(){return this.count});$_M(c$,"move",($fz=function(a,b){var c;if(this.value.length-this.count>=a){if(!this.shared){System.arraycopy(this.value,b,this.value,b+a,this.count-b);return}c=this.value.length}else{c=this.count+a;var d=(this.value.length<<1)+2;c=c>d?c:d}c=$_A(c,"\x00");System.arraycopy(this.value,0,c,0,b);System.arraycopy(this.value,b,c,b+a,this.count-b);this.value=c;this.shared=!1},$fz.isPrivate=
!0,$fz),"~N,~N");$_M(c$,"replace0",function(a,b,c){if(0<=a){b>this.count&&(b=this.count);if(b>a){var d=c.length,e=b-a-d;if(0<e)if(this.shared){var f=$_A(this.value.length,"\x00");System.arraycopy(this.value,0,f,0,a);System.arraycopy(this.value,b,f,a+d,this.count-b);this.value=f;this.shared=!1}else System.arraycopy(this.value,b,this.value,a+d,this.count-b);else 0>e?this.move(-e,b):this.shared&&(this.value=this.value.clone(),this.shared=!1);c.getChars(0,d,this.value,a);this.count-=e;return}if(a==b){if(null==
c)throw new NullPointerException;this.insert0(a,c);return}}throw new StringIndexOutOfBoundsException;},"~N,~N,~S");$_M(c$,"reverse0",function(){if(!(2>this.count))if(this.shared){for(var a=$_A(this.value.length,"\x00"),b=0,c=this.count;b<this.count;b++)a[--c]=this.value[b];this.value=a;this.shared=!1}else for(var b=0,c=this.count,a=Math.floor(this.count/2);b<a;b++){var d=this.value[--c];this.value[c]=this.value[b];this.value[b]=d}});$_M(c$,"setCharAt",function(a,b){if(0>a||a>=this.count)throw new StringIndexOutOfBoundsException(a);
this.shared&&(this.value=this.value.clone(),this.shared=!1);this.value[a]=b},"~N,~N");$_M(c$,"setLength",function(a){if(0>a)throw new StringIndexOutOfBoundsException(a);if(this.count<a)if(a>this.value.length)this.enlargeBuffer(a);else if(this.shared){var b=$_A(this.value.length,"\x00");System.arraycopy(this.value,0,b,0,this.count);this.value=b;this.shared=!1}else for(b=this.count;b<a;b++)this.value[b]=String.fromCharCode(0);this.count=a},"~N");$_M(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");$_M(c$,"substring",function(a,b){if(0<=a&&a<=b&&b<=this.count){if(a==b)return"";this.shared=!0;return String.instantialize(this.value,a,b-a)}throw new StringIndexOutOfBoundsException;},"~N,~N");$_V(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)});$_M(c$,"subSequence",function(a,b){return this.substring(a,b)},"~N,~N");$_M(c$,"indexOf",function(a){return this.indexOf(a,0)},"~S");$_M(c$,"indexOf",function(a,b){0>b&&(b=0);var c=a.length;if(0<c){if(c+b>this.count)return-1;for(var d=a.charAt(0);;){for(var e=b,f=!1;e<this.count;e++)if(this.value[e].charCodeAt(0)==d.charCodeAt(0)){f=!0;break}if(!f||c+e>this.count)return-1;for(var f=e,g=0;++g<c&&this.value[++f].charCodeAt(0)==a.charAt(g).charCodeAt(0););
if(g==c)return e;b=e+1}}return b<this.count||0==b?b:this.count},"~S,~N");$_M(c$,"lastIndexOf",function(a){return this.lastIndexOf(a,this.count)},"~S");$_M(c$,"lastIndexOf",function(a,b){var c=a.length;if(c<=this.count&&0<=b){if(0<c){b>this.count-c&&(b=this.count-c);for(var d=a.charAt(0);;){for(var e=b,f=!1;0<=e;--e)if(this.value[e].charCodeAt(0)==d.charCodeAt(0)){f=!0;break}if(!f)return-1;for(var f=e,g=0;++g<c&&this.value[++f].charCodeAt(0)==a.charAt(g).charCodeAt(0););if(g==c)return e;b=e-1}}return b<
this.count?b:this.count}return-1},"~S,~N");$_M(c$,"trimToSize",function(){if(this.count<this.value.length){var a=$_A(this.count,"\x00");System.arraycopy(this.value,0,a,0,this.count);this.value=a;this.shared=!1}});$_S(c$,"INITIAL_CAPACITY",16)}),$_L(["java.lang.AbstractStringBuilder","$.Appendable"],"java.lang.StringBuffer",["java.lang.Character","$.Double","$.Float","$.Long"],function(){c$=$_T(java.lang,"StringBuffer",AbstractStringBuilder,[Appendable,java.io.Serializable,CharSequence]);$_K(c$,function(a){if(null==
a)throw new NullPointerException;$_R(this,StringBuffer,[a.toString()])},"CharSequence");$_M(c$,"append",function(a){return this.append(a?"true":"false")},"~B");$_M(c$,"append",function(a){this.append0(a);return this},"~N");$_M(c$,"append",function(a){return this.append(Double.toString(a))},"~N");$_M(c$,"append",function(a){null==a?this.appendNull():this.append0(a.toString());return this},"~O");$_M(c$,"append",function(a){this.append0(a);return this},"~S");$_M(c$,"append",function(a){null==a?this.appendNull():
this.append0(a.getValue(),0,a.length());return this},"StringBuffer");$_M(c$,"append",function(a){this.append0(a);return this},"~A");$_M(c$,"append",function(a,b,c){this.append0(a,b,c);return this},"~A,~N,~N");$_M(c$,"append",function(a){null==a?this.appendNull():this.append0(a.toString());return this},"CharSequence");$_M(c$,"append",function(a,b,c){this.append0(a,b,c);return this},"CharSequence,~N,~N");$_M(c$,"appendCodePoint",function(a){return this.append(Character.toChars(a))},"~N");$_M(c$,"$delete",
function(a,b){this.delete0(a,b);return this},"~N,~N");$_M(c$,"deleteCharAt",function(a){this.deleteCharAt0(a);return this},"~N");$_M(c$,"insert",function(a,b){this.insert0(a,b);return this},"~N,~N");$_M(c$,"insert",function(a,b){return this.insert(a,b?"true":"false")},"~N,~B");$_M(c$,"insert",function(a,b){return this.insert(a,Integer.toString(b))},"~N,~N");$_M(c$,"insert",function(a,b){return this.insert(a,Long.toString(b))},"~N,~N");$_M(c$,"insert",function(a,b){return this.insert(a,Double.toString(b))},
"~N,~N");$_M(c$,"insert",function(a,b){return this.insert(a,Float.toString(b))},"~N,~N");$_M(c$,"insert",function(a,b){return this.insert(a,null==b?"null":b.toString())},"~N,~O");$_M(c$,"insert",function(a,b){this.insert0(a,b);return this},"~N,~S");$_M(c$,"insert",function(a,b){this.insert0(a,b);return this},"~N,~A");$_M(c$,"insert",function(a,b,c,d){this.insert0(a,b,c,d);return this},"~N,~A,~N,~N");$_M(c$,"insert",function(a,b){this.insert0(a,null==b?"null":b.toString());return this},"~N,CharSequence");
$_M(c$,"insert",function(a,b,c,d){this.insert0(a,b,c,d);return this},"~N,CharSequence,~N,~N");$_M(c$,"replace",function(a,b,c){this.replace0(a,b,c);return this},"~N,~N,~S");$_M(c$,"reverse",function(){this.reverse0();return this});$_V(c$,"subSequence",function(a,b){return $_U(this,StringBuffer,"substring",[a,b])},"~N,~N")}),$_L(["java.lang.AbstractStringBuilder","$.Appendable"],"java.lang.StringBuilder",["java.lang.Double","$.Float","$.Long"],function(){c$=$_T(java.lang,"StringBuilder",AbstractStringBuilder,
[Appendable,CharSequence,java.io.Serializable]);$_K(c$,function(a){$_R(this,StringBuilder,[a.toString()])},"CharSequence");$_M(c$,"append",function(a){this.append0(a?"true":"false");return this},"~B");$_M(c$,"append",function(a){this.append0(a);return this},"~N");$_M(c$,"append",function(a){this.append0(Integer.toString(a));return this},"~N");$_M(c$,"append",function(a){this.append0(Long.toString(a));return this},"~N");$_M(c$,"append",function(a){this.append0(Float.toString(a));return this},"~N");
$_M(c$,"append",function(a){this.append0(Double.toString(a));return this},"~N");$_M(c$,"append",function(a){null==a?this.appendNull():this.append0(a.toString());return this},"~O");$_M(c$,"append",function(a){this.append0(a);return this},"~S");$_M(c$,"append",function(a){null==a?this.appendNull():this.append0(a.getValue(),0,a.length());return this},"StringBuffer");$_M(c$,"append",function(a){this.append0(a);return this},"~A");$_M(c$,"append",function(a,b,c){this.append0(a,b,c);return this},"~A,~N,~N");
$_M(c$,"append",function(a){null==a?this.appendNull():this.append0(a.toString());return this},"CharSequence");$_M(c$,"append",function(a,b,c){this.append0(a,b,c);return this},"CharSequence,~N,~N");$_M(c$,"$delete",function(a,b){this.delete0(a,b);return this},"~N,~N");$_M(c$,"deleteCharAt",function(a){this.deleteCharAt0(a);return this},"~N");$_M(c$,"insert",function(a,b){this.insert0(a,b?"true":"false");return this},"~N,~B");$_M(c$,"insert",function(a,b){this.insert0(a,b);return this},"~N,~N");$_M(c$,
"insert",function(a,b){this.insert0(a,Integer.toString(b));return this},"~N,~N");$_M(c$,"insert",function(a,b){this.insert0(a,Long.toString(b));return this},"~N,~N");$_M(c$,"insert",function(a,b){this.insert0(a,Float.toString(b));return this},"~N,~N");$_M(c$,"insert",function(a,b){this.insert0(a,Double.toString(b));return this},"~N,~N");$_M(c$,"insert",function(a,b){this.insert0(a,null==b?"null":b.toString());return this},"~N,~O");$_M(c$,"insert",function(a,b){this.insert0(a,b);return this},"~N,~S");
$_M(c$,"insert",function(a,b){this.insert0(a,b);return this},"~N,~A");$_M(c$,"insert",function(a,b,c,d){this.insert0(a,b,c,d);return this},"~N,~A,~N,~N");$_M(c$,"insert",function(a,b){this.insert0(a,null==b?"null":b.toString());return this},"~N,CharSequence");$_M(c$,"insert",function(a,b,c,d){this.insert0(a,b,c,d);return this},"~N,CharSequence,~N,~N");$_M(c$,"replace",function(a,b,c){this.replace0(a,b,c);return this},"~N,~N,~S");$_M(c$,"reverse",function(){this.reverse0();return this})}),$_L(["java.util.Collection"],
"java.util.AbstractCollection",["java.lang.StringBuilder","$.UnsupportedOperationException","java.lang.reflect.Array"],function(){c$=$_T(java.util,"AbstractCollection",null,java.util.Collection);$_K(c$,function(){});$_V(c$,"add",function(){throw new UnsupportedOperationException;},"~O");$_V(c$,"addAll",function(a){var b=!1;for(a=a.iterator();a.hasNext();)this.add(a.next())&&(b=!0);return b},"java.util.Collection");$_V(c$,"clear",function(){for(var a=this.iterator();a.hasNext();)a.next(),a.remove()});
$_V(c$,"contains",function(a){var b=this.iterator();if(null!=a)for(;b.hasNext();){if(a.equals(b.next()))return!0}else for(;b.hasNext();)if(null==b.next())return!0;return!1},"~O");$_V(c$,"containsAll",function(a){for(a=a.iterator();a.hasNext();)if(!this.contains(a.next()))return!1;return!0},"java.util.Collection");$_V(c$,"isEmpty",function(){return 0==this.size()});$_V(c$,"remove",function(a){var b=this.iterator();if(null!=a)for(;b.hasNext();){if(a.equals(b.next()))return b.remove(),!0}else for(;b.hasNext();)if(null==
b.next())return b.remove(),!0;return!1},"~O");$_V(c$,"removeAll",function(a){for(var b=!1,c=this.iterator();c.hasNext();)a.contains(c.next())&&(c.remove(),b=!0);return b},"java.util.Collection");$_V(c$,"retainAll",function(a){for(var b=!1,c=this.iterator();c.hasNext();)a.contains(c.next())||(c.remove(),b=!0);return b},"java.util.Collection");$_M(c$,"toArray",function(){for(var a=this.size(),b=0,c=this.iterator(),d=Array(a);b<a;)d[b++]=c.next();return d});$_M(c$,"toArray",function(a){var b=this.size(),
c=0;b>a.length&&(a=a.getClass().getComponentType(),a=java.lang.reflect.Array.newInstance(a,b));for(var d,b=this.iterator();b.hasNext()&&((d=b.next())||1);)a[c++]=d;c<a.length&&(a[c]=null);return a},"~A");$_V(c$,"toString",function(){if(this.isEmpty())return"[]";var a=new StringBuilder(16*this.size());a.append("[");for(var b=this.iterator();b.hasNext();){var c=b.next();c!==this?a.append(c):a.append("(this Collection)");b.hasNext()&&a.append(", ")}a.append("]");return a.toString()})}),$_L("java.util.AbstractCollection $.Iterator $.List $.ListIterator $.RandomAccess $.NoSuchElementException".split(" "),
"java.util.AbstractList",["java.lang.IllegalArgumentException","$.IllegalStateException","$.IndexOutOfBoundsException","$.UnsupportedOperationException","java.util.ConcurrentModificationException"],function(){c$=$_C(function(){this.modCount=0;$_D("java.util.AbstractList.SimpleListIterator")||java.util.AbstractList.$AbstractList$SimpleListIterator$();$_D("java.util.AbstractList.FullListIterator")||java.util.AbstractList.$AbstractList$FullListIterator$();$_Z(this,arguments)},java.util,"AbstractList",
java.util.AbstractCollection,java.util.List);$_M(c$,"add",function(){throw new UnsupportedOperationException;},"~N,~O");$_M(c$,"add",function(a){this.add(this.size(),a);return!0},"~O");$_M(c$,"addAll",function(a,b){for(var c=b.iterator();c.hasNext();)this.add(a++,c.next());return!b.isEmpty()},"~N,java.util.Collection");$_V(c$,"clear",function(){this.removeRange(0,this.size())});$_V(c$,"equals",function(a){if(this===a)return!0;if($_O(a,java.util.List)){if(a.size()!=this.size())return!1;var b=this.iterator();
for(a=a.iterator();b.hasNext();){var c=b.next(),d=a.next();if(!(null==c?null==d:c.equals(d)))return!1}return!0}return!1},"~O");$_V(c$,"hashCode",function(){for(var a=1,b=this.iterator();b.hasNext();)var c=b.next(),a=31*a+(null==c?0:c.hashCode());return a});$_V(c$,"indexOf",function(a){var b=this.listIterator();if(null!=a)for(;b.hasNext();){if(a.equals(b.next()))return b.previousIndex()}else for(;b.hasNext();)if(null==b.next())return b.previousIndex();return-1},"~O");$_V(c$,"iterator",function(){return $_N(java.util.AbstractList.SimpleListIterator,
this,null)});$_V(c$,"lastIndexOf",function(a){var b=this.listIterator(this.size());if(null!=a)for(;b.hasPrevious();){if(a.equals(b.previous()))return b.nextIndex()}else for(;b.hasPrevious();)if(null==b.previous())return b.nextIndex();return-1},"~O");$_M(c$,"listIterator",function(){return this.listIterator(0)});$_M(c$,"listIterator",function(a){return $_N(java.util.AbstractList.FullListIterator,this,null,a)},"~N");$_M(c$,"remove",function(){throw new UnsupportedOperationException;},"~N");$_M(c$,"removeRange",
function(a,b){for(var c=this.listIterator(a),d=a;d<b;d++)c.next(),c.remove()},"~N,~N");$_V(c$,"set",function(){throw new UnsupportedOperationException;},"~N,~O");$_V(c$,"subList",function(a,b){if(0<=a&&b<=this.size()){if(a<=b)return $_O(this,java.util.RandomAccess)?new java.util.AbstractList.SubAbstractListRandomAccess(this,a,b):new java.util.AbstractList.SubAbstractList(this,a,b);throw new IllegalArgumentException;}throw new IndexOutOfBoundsException;},"~N,~N");c$.$AbstractList$SimpleListIterator$=
function(){$_H();c$=$_C(function(){$_B(this,arguments);this.pos=-1;this.expectedModCount=0;this.lastPosition=-1;$_Z(this,arguments)},java.util.AbstractList,"SimpleListIterator",null,java.util.Iterator);$_K(c$,function(){this.expectedModCount=this.b$["java.util.AbstractList"].modCount});$_V(c$,"hasNext",function(){return this.pos+1<this.b$["java.util.AbstractList"].size()});$_V(c$,"next",function(){if(this.expectedModCount==this.b$["java.util.AbstractList"].modCount)try{var a=this.b$["java.util.AbstractList"].get(this.pos+
1);this.lastPosition=++this.pos;return a}catch(b){if($_O(b,IndexOutOfBoundsException))throw new java.util.NoSuchElementException;throw b;}throw new java.util.ConcurrentModificationException;});$_V(c$,"remove",function(){if(this.expectedModCount==this.b$["java.util.AbstractList"].modCount){try{this.b$["java.util.AbstractList"].remove(this.lastPosition)}catch(a){if($_O(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$=$_P()};c$.$AbstractList$FullListIterator$=function(){$_H();c$=$_C(function(){$_B(this,arguments);$_Z(this,arguments)},java.util.AbstractList,"FullListIterator",java.util.AbstractList.SimpleListIterator,java.util.ListIterator,$_N(java.util.AbstractList.SimpleListIterator,this,null,$_G));$_K(c$,function(a){$_R(this,java.util.AbstractList.FullListIterator);
if(0<=a&&a<=this.b$["java.util.AbstractList"].size())this.pos=a-1;else throw new IndexOutOfBoundsException;},"~N");$_V(c$,"add",function(a){if(this.expectedModCount==this.b$["java.util.AbstractList"].modCount){try{this.b$["java.util.AbstractList"].add(this.pos+1,a)}catch(b){if($_O(b,IndexOutOfBoundsException))throw new java.util.NoSuchElementException;throw b;}this.pos++;this.lastPosition=-1;this.b$["java.util.AbstractList"].modCount!=this.expectedModCount&&this.expectedModCount++}else throw new java.util.ConcurrentModificationException;
},"~O");$_V(c$,"hasPrevious",function(){return 0<=this.pos});$_V(c$,"nextIndex",function(){return this.pos+1});$_V(c$,"previous",function(){if(this.expectedModCount==this.b$["java.util.AbstractList"].modCount)try{var a=this.b$["java.util.AbstractList"].get(this.pos);this.lastPosition=this.pos;this.pos--;return a}catch(b){if($_O(b,IndexOutOfBoundsException))throw new java.util.NoSuchElementException;throw b;}throw new java.util.ConcurrentModificationException;});$_V(c$,"previousIndex",function(){return this.pos});
$_V(c$,"set",function(a){if(this.expectedModCount==this.b$["java.util.AbstractList"].modCount)try{this.b$["java.util.AbstractList"].set(this.lastPosition,a)}catch(b){if($_O(b,IndexOutOfBoundsException))throw new IllegalStateException;throw b;}else throw new java.util.ConcurrentModificationException;},"~O");c$=$_P()};$_H();c$=$_T(java.util.AbstractList,"SubAbstractListRandomAccess",java.util.AbstractList.SubAbstractList,java.util.RandomAccess);c$=$_P();$_H();c$=$_C(function(){this.fullList=null;this.$size=
this.offset=0;$_Z(this,arguments)},java.util.AbstractList,"SubAbstractList",java.util.AbstractList);$_K(c$,function(a,b,c){$_R(this,java.util.AbstractList.SubAbstractList);this.fullList=a;this.modCount=this.fullList.modCount;this.offset=b;this.$size=c-b},"java.util.AbstractList,~N,~N");$_M(c$,"add",function(a,b){if(this.modCount==this.fullList.modCount)if(0<=a&&a<=this.$size)this.fullList.add(a+this.offset,b),this.$size++,this.modCount=this.fullList.modCount;else throw new IndexOutOfBoundsException;
else throw new java.util.ConcurrentModificationException;},"~N,~O");$_M(c$,"addAll",function(a,b){if(this.modCount==this.fullList.modCount){if(0<=a&&a<=this.$size){var c=this.fullList.addAll(a+this.offset,b);c&&(this.$size+=b.size(),this.modCount=this.fullList.modCount);return c}throw new IndexOutOfBoundsException;}throw new java.util.ConcurrentModificationException;},"~N,java.util.Collection");$_M(c$,"addAll",function(a){if(this.modCount==this.fullList.modCount){var b=this.fullList.addAll(this.offset+
this.$size,a);b&&(this.$size+=a.size(),this.modCount=this.fullList.modCount);return b}throw new java.util.ConcurrentModificationException;},"java.util.Collection");$_M(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");$_V(c$,"iterator",function(){return this.listIterator(0)});$_M(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");$_M(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");$_M(c$,"removeRange",function(a,b){if(a!=b)if(this.modCount==this.fullList.modCount)this.fullList.removeRange(a+this.offset,b+this.offset),this.$size-=b-a,this.modCount=this.fullList.modCount;else throw new java.util.ConcurrentModificationException;},"~N,~N");$_M(c$,"set",function(a,b){if(this.modCount==this.fullList.modCount){if(0<=a&&a<this.$size)return this.fullList.set(a+this.offset,b);throw new IndexOutOfBoundsException;}throw new java.util.ConcurrentModificationException;
},"~N,~O");$_V(c$,"size",function(){return this.$size});$_M(c$,"sizeChanged",function(a){a?this.$size++:this.$size--;this.modCount=this.fullList.modCount},"~B");$_H();c$=$_C(function(){this.iterator=this.subList=null;this.end=this.start=0;$_Z(this,arguments)},java.util.AbstractList.SubAbstractList,"SubAbstractListIterator",null,java.util.ListIterator);$_K(c$,function(a,b,c,d){this.iterator=a;this.subList=b;this.start=c;this.end=this.start+d},"java.util.ListIterator,java.util.AbstractList.SubAbstractList,~N,~N");
$_M(c$,"add",function(a){this.iterator.add(a);this.subList.sizeChanged(!0);this.end++},"~O");$_V(c$,"hasNext",function(){return this.iterator.nextIndex()<this.end});$_V(c$,"hasPrevious",function(){return this.iterator.previousIndex()>=this.start});$_M(c$,"next",function(){if(this.iterator.nextIndex()<this.end)return this.iterator.next();throw new java.util.NoSuchElementException;});$_M(c$,"nextIndex",function(){return this.iterator.nextIndex()-this.start});$_M(c$,"previous",function(){if(this.iterator.previousIndex()>=
this.start)return this.iterator.previous();throw new java.util.NoSuchElementException;});$_M(c$,"previousIndex",function(){var a=this.iterator.previousIndex();return a>=this.start?a-this.start:-1});$_M(c$,"remove",function(){this.iterator.remove();this.subList.sizeChanged(!1);this.end--});$_M(c$,"set",function(a){this.iterator.set(a)},"~O");c$=$_P();c$=$_P()}),$_L(["java.util.AbstractList","$.List","$.RandomAccess"],"java.util.ArrayList",["java.lang.IllegalArgumentException","$.IndexOutOfBoundsException",
"java.lang.reflect.Array","java.util.Arrays"],function(){c$=$_C(function(){this.lastIndex=this.firstIndex=0;this.array=null;$_Z(this,arguments)},java.util,"ArrayList",java.util.AbstractList,[java.util.List,Cloneable,java.io.Serializable,java.util.RandomAccess]);$_k(c$,function(){this.setup(0)});$_M(c$,"setup",function(a){$_R(this,java.util.ArrayList,[]);this.firstIndex=this.lastIndex=0;try{this.array=this.newElementArray(a)}catch(b){if($_O(b,NegativeArraySizeException))throw new IllegalArgumentException;
throw b;}},"~N");$_M(c$,"newElementArray",($fz=function(a){return Array(a)},$fz.isPrivate=!0,$fz),"~N");$_V(c$,"add",function(a,b){if(1==arguments.length)return this.add1(a);var c=this.size();if(0<a&&a<c){if(0==this.firstIndex&&this.lastIndex==this.array.length)this.growForInsert(a,1);else if(a<Math.floor(c/2)&&0<this.firstIndex||this.lastIndex==this.array.length)System.arraycopy(this.array,this.firstIndex,this.array,--this.firstIndex,a);else{var d=a+this.firstIndex;System.arraycopy(this.array,d,
this.array,d+1,c-a);this.lastIndex++}this.array[a+this.firstIndex]=b}else if(0==a)0==this.firstIndex&&this.growAtFront(1),this.array[--this.firstIndex]=b;else if(a==c)this.lastIndex==this.array.length&&this.growAtEnd(1),this.array[this.lastIndex++]=b;else throw new IndexOutOfBoundsException;this.modCount++},"~N,~O");$_V(c$,"add1",function(a){this.lastIndex==this.array.length&&this.growAtEnd(1);this.array[this.lastIndex++]=a;this.modCount++;return!0},"~O");$_V(c$,"addAll",function(a){var b=a.size();
if(0<b){this.lastIndex>this.array.length-b&&this.growAtEnd(b);a=a.iterator();for(b=this.lastIndex+b;this.lastIndex<b;)this.array[this.lastIndex++]=a.next();this.modCount++;return!0}return!1},"java.util.Collection");$_V(c$,"clear",function(){this.firstIndex!=this.lastIndex&&(this.fill(this.firstIndex,this.lastIndex),this.firstIndex=this.lastIndex=0,this.modCount++)});$_M(c$,"fill",function(a,b){for(var c=b;--c>=a;)this.array[c]=null},"~N,~N");$_M(c$,"clone",function(){try{var a=$_U(this,java.util.ArrayList,
"clone",[]);a.array=this.array.clone();return a}catch(b){if($_O(b,CloneNotSupportedException))return null;throw b;}});$_V(c$,"contains",function(a){if(null!=a)for(var b=this.firstIndex;b<this.lastIndex;b++){if(a.equals(this.array[b]))return!0}else for(b=this.firstIndex;b<this.lastIndex;b++)if(null==this.array[b])return!0;return!1},"~O");$_M(c$,"ensureCapacity",function(a){this.array.length<a&&(0<this.firstIndex?this.growAtFront(a-this.array.length):this.growAtEnd(a-this.array.length))},"~N");$_V(c$,
"get",function(a){if(0<=a&&a<this.size())return this.array[this.firstIndex+a];throw new IndexOutOfBoundsException;},"~N");$_M(c$,"growAtEnd",($fz=function(a){var b=this.size();if(this.firstIndex>=a-(this.array.length-this.lastIndex))a=this.lastIndex-this.firstIndex,0<b&&(System.arraycopy(this.array,this.firstIndex,this.array,0,b),this.fill(a<this.firstIndex?this.firstIndex:a,this.array.length)),this.firstIndex=0,this.lastIndex=a;else{var c=Math.floor(b/2);a>c&&(c=a);12>c&&(c=12);a=this.newElementArray(b+
c);0<b&&System.arraycopy(this.array,this.firstIndex,a,this.firstIndex,b);this.array=a}},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"growAtFront",($fz=function(a){var b=this.size();if(this.array.length-this.lastIndex>=a)a=this.array.length-b,0<b&&(System.arraycopy(this.array,this.firstIndex,this.array,a,b),this.fill(this.firstIndex,this.firstIndex+b>a?a:this.firstIndex+b)),this.firstIndex=a,this.lastIndex=this.array.length;else{var c=Math.floor(b/2);a>c&&(c=a);12>c&&(c=12);a=this.newElementArray(b+c);0<b&&
System.arraycopy(this.array,this.firstIndex,a,a.length-b,b);this.firstIndex=a.length-b;this.lastIndex=a.length;this.array=a}},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"growForInsert",($fz=function(a,b){var c=this.size(),d=Math.floor(c/2);b>d&&(d=b);12>d&&(d=12);var e=this.newElementArray(c+d);if(a<Math.floor(c/2)){var f=e.length-(c+b);System.arraycopy(this.array,a,e,a+d,c-a);System.arraycopy(this.array,this.firstIndex,e,f,a);this.firstIndex=f;this.lastIndex=e.length}else System.arraycopy(this.array,this.firstIndex,
e,0,a),System.arraycopy(this.array,a,e,a+b,c-a),this.firstIndex=0,this.lastIndex+=b;this.array=e},$fz.isPrivate=!0,$fz),"~N,~N");$_V(c$,"indexOf",function(a){if(null!=a)for(var b=this.firstIndex;b<this.lastIndex;b++){if(a.equals(this.array[b]))return b-this.firstIndex}else for(b=this.firstIndex;b<this.lastIndex;b++)if(null==this.array[b])return b-this.firstIndex;return-1},"~O");$_V(c$,"isEmpty",function(){return this.lastIndex==this.firstIndex});$_V(c$,"lastIndexOf",function(a){if(null!=a)for(var b=
this.lastIndex-1;b>=this.firstIndex;b--){if(a.equals(this.array[b]))return b-this.firstIndex}else for(b=this.lastIndex-1;b>=this.firstIndex;b--)if(null==this.array[b])return b-this.firstIndex;return-1},"~O");$_V(c$,"remove",function(a){var b,c=this.size();if(0<=a&&a<c)if(a==c-1)b=this.array[--this.lastIndex],this.array[this.lastIndex]=null;else if(0==a)b=this.array[this.firstIndex],this.array[this.firstIndex++]=null;else{var d=this.firstIndex+a;b=this.array[d];a<Math.floor(c/2)?(System.arraycopy(this.array,
this.firstIndex,this.array,this.firstIndex+1,a),this.array[this.firstIndex++]=null):(System.arraycopy(this.array,d+1,this.array,d,c-a-1),this.array[--this.lastIndex]=null)}else throw new IndexOutOfBoundsException;this.modCount++;return b},"~N");$_V(c$,"removeRange",function(a,b){if(0<=a&&a<=b&&b<=this.size()){if(a!=b){var c=this.size();b==c?(this.fill(this.firstIndex+a,this.lastIndex),this.lastIndex=this.firstIndex+a):0==a?(this.fill(this.firstIndex,this.firstIndex+b),this.firstIndex+=b):(System.arraycopy(this.array,
this.firstIndex+b,this.array,this.firstIndex+a,c-b),c=this.lastIndex+a-b,this.fill(c,this.lastIndex),this.lastIndex=c);this.modCount++}}else throw new IndexOutOfBoundsException;},"~N,~N");$_V(c$,"set",function(a,b){if(0<=a&&a<this.size()){var c=this.array[this.firstIndex+a];this.array[this.firstIndex+a]=b;return c}throw new IndexOutOfBoundsException;},"~N,~O");$_V(c$,"size",function(){return this.lastIndex-this.firstIndex});$_V(c$,"toArray",function(a){var b=this.size();b>a.length&&(a=a.getClass().getComponentType(),
a=java.lang.reflect.Array.newInstance(a,b));System.arraycopy(this.array,this.firstIndex,a,0,b);b<a.length&&(a[b]=null);return a},"~O");$_M(c$,"trimToSize",function(){var a=this.size(),b=this.newElementArray(a);System.arraycopy(this.array,this.firstIndex,b,0,a);this.array=b;this.firstIndex=0;this.lastIndex=this.array.length})}),$_L(["java.util.AbstractCollection","$.Set"],"java.util.AbstractSet",null,function(){c$=$_T(java.util,"AbstractSet",java.util.AbstractCollection,java.util.Set);$_V(c$,"equals",
function(a){return this===a?!0:$_O(a,java.util.Set)?this.size()==a.size()&&this.containsAll(a):!1},"~O");$_V(c$,"hashCode",function(){for(var a=0,b=this.iterator();b.hasNext();)var c=b.next(),a=a+(null==c?0:c.hashCode());return a});$_V(c$,"removeAll",function(a){var b=!1;if(this.size()<=a.size())for(var c=this.iterator();c.hasNext();)a.contains(c.next())&&(c.remove(),b=!0);else for(c=a.iterator();c.hasNext();)b=this.remove(c.next())||b;return b},"java.util.Collection")}),$_L(["java.util.AbstractList",
"$.RandomAccess"],"java.util.Arrays",["java.lang.ArrayIndexOutOfBoundsException","$.IllegalArgumentException","$.NullPointerException"],function(){c$=$_T(java.util,"Arrays");c$.sort=$_V(c$,"sort",function(a,b,c,d){switch(arguments.length){case 1:for(var e=a.sort(function(a,b){return"string"==typeof a||a instanceof Comparable?a.compareTo(b):a-b}),f=0;f<a.length;f++)a[f]=e[f];break;case 2:e=a.sort(function(a,c){return null!=b?b.compare(a,c):"string"==typeof a||a instanceof Comparable?a.compareTo(c):
a-c});for(f=0;f<a.length;f++)a[f]=e[f];break;case 3:var g=b,h=c;this.rangeCheck(a.length,g,h);e=[];for(f=g;f<h;f++)e[f-g]=a[f];e=e.sort(function(a,b){return"string"==typeof a||a instanceof Comparable?a.compareTo(b):a-b});for(f=g;f<h;f++)a[f]=e[f-g];break;case 4:g=b;h=c;b=d;this.rangeCheck(a.length,g,h);e=[];for(f=g;f<h;f++)e[f-g]=a[f];e=e.sort(function(a,c){return null!=b?b.compare(a,c):"string"==typeof a||a instanceof Comparable?a.compareTo(c):a-c});for(f=g;f<h;f++)a[f]=e[f-g]}});c$.rangeCheck=$_M(c$,
"rangeCheck",($fz=function(a,b,c){if(b>c)throw new IllegalArgumentException("fromIndex("+b+") > toIndex("+c+")");if(0>b)throw new ArrayIndexOutOfBoundsException(b);if(c>a)throw new ArrayIndexOutOfBoundsException(c);},$fz.isPrivate=!0,$fz),"~N,~N,~N");c$.binarySearch=$_M(c$,"binarySearch",function(a,b){for(var c=0,d=a.length-1;c<=d;){var e=c+d>>1,f=a[e];if(f<b)c=e+1;else if(f>b)d=e-1;else return e}return-(c+1)},"~A,~N");c$.binarySearch=$_M(c$,"binarySearch",function(a,b){for(var c=0,d=a.length-1;c<=
d;){var e=c+d>>1,f=a[e].compareTo(b);if(0>f)c=e+1;else if(0<f)d=e-1;else return e}return-(c+1)},"~A,~O");c$.binarySearch=$_M(c$,"binarySearch",function(a,b,c){if(null==c)return java.util.Arrays.binarySearch(a,b);for(var d=0,e=a.length-1;d<=e;){var f=d+e>>1,g=c.compare(a[f],b);if(0>g)d=f+1;else if(0<g)e=f-1;else return f}return-(d+1)},"~A,~O,java.util.Comparator");c$.equals=$_M(c$,"equals",function(a,b){if(a===b)return!0;if(null==a||null==b)return!1;var c=a.length;if(b.length!=c)return!1;for(var d=
0;d<c;d++){var e=a[d],f=b[d];if(!(null==e?null==f:null==e.equals?e==f:e.equals(f)))return!1}return!0},"~A,~A");c$.fill=$_V(c$,"fill",function(a,b,c,d){2==arguments.length&&(d=b,b=0,c=a.length);java.util.Arrays.rangeCheck(a.length,b,c);for(var e=b;e<c;e++)a[e]=d});c$.asList=$_M(c$,"asList",function(a){return new java.util.Arrays.ArrayList(a)},"~A");$_H();c$=$_C(function(){this.a=null;$_Z(this,arguments)},java.util.Arrays,"ArrayList",java.util.AbstractList,[java.util.RandomAccess,java.io.Serializable]);
$_K(c$,function(a){$_R(this,java.util.Arrays.ArrayList,[]);if(null==a)throw new NullPointerException;this.a=a},"~A");$_V(c$,"size",function(){return this.a.length});$_M(c$,"toArray",function(){return this.a.clone()});$_V(c$,"get",function(a){return this.a[a]},"~N");$_V(c$,"set",function(a,b){var c=this.a[a];this.a[a]=b;return c},"~N,~O");$_V(c$,"indexOf",function(a){if(null==a)for(var b=0;b<this.a.length;b++){if(null==this.a[b])return b}else for(b=0;b<this.a.length;b++)if(a.equals(this.a[b]))return b;
return-1},"~O");$_V(c$,"contains",function(a){return-1!=this.indexOf(a)},"~O");c$=$_P();$_S(c$,"INSERTIONSORT_THRESHOLD",7)}),$_L(["java.util.Map"],"java.util.AbstractMap",["java.lang.StringBuilder","$.UnsupportedOperationException","java.util.AbstractCollection","$.AbstractSet","$.Iterator"],function(){c$=$_C(function(){this.valuesCollection=this.$keySet=null;$_Z(this,arguments)},java.util,"AbstractMap",null,java.util.Map);$_K(c$,function(){});$_V(c$,"clear",function(){this.entrySet().clear()});
$_V(c$,"containsKey",function(a){var b=this.entrySet().iterator();if(null!=a)for(;b.hasNext();){if(a.equals(b.next().getKey()))return!0}else for(;b.hasNext();)if(null==b.next().getKey())return!0;return!1},"~O");$_V(c$,"containsValue",function(a){var b=this.entrySet().iterator();if(null!=a)for(;b.hasNext();){if(a.equals(b.next().getValue()))return!0}else for(;b.hasNext();)if(null==b.next().getValue())return!0;return!1},"~O");$_V(c$,"equals",function(a){if(this===a)return!0;if($_O(a,java.util.Map)){if(this.size()!=
a.size())return!1;a=a.entrySet();for(var b=this.entrySet().iterator();b.hasNext();)if(!a.contains(b.next()))return!1;return!0}return!1},"~O");$_V(c$,"get",function(a){var b=this.entrySet().iterator();if(null!=a)for(;b.hasNext();){var c=b.next();if(a.equals(c.getKey()))return c.getValue()}else for(;b.hasNext();)if(c=b.next(),null==c.getKey())return c.getValue();return null},"~O");$_V(c$,"hashCode",function(){for(var a=0,b=this.entrySet().iterator();b.hasNext();)a+=b.next().hashCode();return a});$_V(c$,
"isEmpty",function(){return 0==this.size()});$_V(c$,"keySet",function(){null==this.$keySet&&(this.$keySet=($_D("java.util.AbstractMap$1")?0:java.util.AbstractMap.$AbstractMap$1$(),$_N(java.util.AbstractMap$1,this,null)));return this.$keySet});$_V(c$,"put",function(){throw new UnsupportedOperationException;},"~O,~O");$_V(c$,"putAll",function(a){var b;for(a=a.entrySet().iterator();a.hasNext()&&((b=a.next())||1);)this.put(b.getKey(),b.getValue())},"java.util.Map");$_V(c$,"remove",function(a){var b=this.entrySet().iterator();
if(null!=a)for(;b.hasNext();){var c=b.next();if(a.equals(c.getKey()))return b.remove(),c.getValue()}else for(;b.hasNext();)if(c=b.next(),null==c.getKey())return b.remove(),c.getValue();return null},"~O");$_V(c$,"size",function(){return this.entrySet().size()});$_V(c$,"toString",function(){if(this.isEmpty())return"{}";var a=new StringBuilder(28*this.size());a.append("{");for(var b=this.entrySet().iterator();b.hasNext();){var c=b.next(),d=c.getKey();d!==this?a.append(d):a.append("(this Map)");a.append("=");
c=c.getValue();c!==this?a.append(c):a.append("(this Map)");b.hasNext()&&a.append(", ")}a.append("}");return a.toString()});$_V(c$,"values",function(){null==this.valuesCollection&&(this.valuesCollection=($_D("java.util.AbstractMap$2")?0:java.util.AbstractMap.$AbstractMap$2$(),$_N(java.util.AbstractMap$2,this,null)));return this.valuesCollection});$_M(c$,"clone",function(){var a=$_U(this,java.util.AbstractMap,"clone",[]);a.$keySet=null;a.valuesCollection=null;return a});c$.$AbstractMap$1$=function(){$_H();
c$=$_W(java.util,"AbstractMap$1",java.util.AbstractSet);$_V(c$,"contains",function(a){return this.b$["java.util.AbstractMap"].containsKey(a)},"~O");$_V(c$,"size",function(){return this.b$["java.util.AbstractMap"].size()});$_V(c$,"iterator",function(){return $_D("java.util.AbstractMap$1$1")?0:java.util.AbstractMap.$AbstractMap$1$1$(),$_N(java.util.AbstractMap$1$1,this,null)});c$=$_P()};c$.$AbstractMap$1$1$=function(){$_H();c$=$_C(function(){$_B(this,arguments);this.setIterator=null;$_Z(this,arguments)},
java.util,"AbstractMap$1$1",null,java.util.Iterator);$_Y(c$,function(){this.setIterator=this.b$["java.util.AbstractMap"].entrySet().iterator()});$_V(c$,"hasNext",function(){return this.setIterator.hasNext()});$_V(c$,"next",function(){return this.setIterator.next().getKey()});$_V(c$,"remove",function(){this.setIterator.remove()});c$=$_P()};c$.$AbstractMap$2$=function(){$_H();c$=$_W(java.util,"AbstractMap$2",java.util.AbstractCollection);$_V(c$,"size",function(){return this.b$["java.util.AbstractMap"].size()});
$_V(c$,"contains",function(a){return this.b$["java.util.AbstractMap"].containsValue(a)},"~O");$_V(c$,"iterator",function(){return $_D("java.util.AbstractMap$2$1")?0:java.util.AbstractMap.$AbstractMap$2$1$(),$_N(java.util.AbstractMap$2$1,this,null)});c$=$_P()};c$.$AbstractMap$2$1$=function(){$_H();c$=$_C(function(){$_B(this,arguments);this.setIterator=null;$_Z(this,arguments)},java.util,"AbstractMap$2$1",null,java.util.Iterator);$_Y(c$,function(){this.setIterator=this.b$["java.util.AbstractMap"].entrySet().iterator()});
$_V(c$,"hasNext",function(){return this.setIterator.hasNext()});$_V(c$,"next",function(){return this.setIterator.next().getValue()});$_V(c$,"remove",function(){this.setIterator.remove()});c$=$_P()}}),$_L(["java.util.Map"],"java.util.SortedMap",null,function(){$_I(java.util,"SortedMap",java.util.Map)}),$_L(["java.util.Set"],"java.util.SortedSet",null,function(){$_I(java.util,"SortedSet",java.util.Set)}),$_L("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$=$_T(java.util,"Collections");c$.binarySearch=$_M(c$,"binarySearch",function(a,b){if(null==a)throw new NullPointerException;if(a.isEmpty())return-1;if(!$_O(a,java.util.RandomAccess)){for(var c=a.listIterator();c.hasNext();){var d;
if(0>=(d=b.compareTo(c.next())))return 0==d?c.previousIndex():-c.previousIndex()-1}return-a.size()-1}var c=0,e=a.size(),f=e-1;for(d=-1;c<=f;)if(e=c+f>>1,0<(d=b.compareTo(a.get(e))))c=e+1;else{if(0==d)return e;f=e-1}return-e-(0>d?1:2)},"java.util.List,~O");c$.binarySearch=$_M(c$,"binarySearch",function(a,b,c){if(null==c)return java.util.Collections.binarySearch(a,b);if(!$_O(a,java.util.RandomAccess)){for(var d=a.listIterator();d.hasNext();){var e;if(0>=(e=c.compare(b,d.next())))return 0==e?d.previousIndex():
-d.previousIndex()-1}return-a.size()-1}var d=0,f=a.size(),g=f-1;for(e=-1;d<=g;)if(f=d+g>>1,0<(e=c.compare(b,a.get(f))))d=f+1;else{if(0==e)return f;g=f-1}return-f-(0>e?1:2)},"java.util.List,~O,java.util.Comparator");c$.copy=$_M(c$,"copy",function(a,b){if(a.size()<b.size())throw new ArrayIndexOutOfBoundsException;for(var c=b.iterator(),d=a.listIterator();c.hasNext();){try{d.next()}catch(e){if($_O(e,java.util.NoSuchElementException))throw new ArrayIndexOutOfBoundsException;throw e;}d.set(c.next())}},
"java.util.List,java.util.List");c$.enumeration=$_M(c$,"enumeration",function(a){$_D("java.util.Collections$1")||java.util.Collections.$Collections$1$(a);return $_N(java.util.Collections$1,this,null)},"java.util.Collection");c$.fill=$_M(c$,"fill",function(a,b){for(var c=a.listIterator();c.hasNext();)c.next(),c.set(b)},"java.util.List,~O");c$.max=$_M(c$,"max",function(a){a=a.iterator();for(var b=a.next();a.hasNext();){var c=a.next();0>b.compareTo(c)&&(b=c)}return b},"java.util.Collection");c$.max=
$_M(c$,"max",function(a,b){for(var c=a.iterator(),d=c.next();c.hasNext();){var e=c.next();0>b.compare(d,e)&&(d=e)}return d},"java.util.Collection,java.util.Comparator");c$.min=$_M(c$,"min",function(a){a=a.iterator();for(var b=a.next();a.hasNext();){var c=a.next();0<b.compareTo(c)&&(b=c)}return b},"java.util.Collection");c$.min=$_M(c$,"min",function(a,b){for(var c=a.iterator(),d=c.next();c.hasNext();){var e=c.next();0<b.compare(d,e)&&(d=e)}return d},"java.util.Collection,java.util.Comparator");c$.nCopies=
$_M(c$,"nCopies",function(a,b){return new java.util.Collections.CopiesList(a,b)},"~N,~O");c$.reverse=$_M(c$,"reverse",function(a){var b=a.size(),c=a.listIterator();a=a.listIterator(b);for(var d=0;d<Math.floor(b/2);d++){var e=c.next(),f=a.previous();c.set(f);a.set(e)}},"java.util.List");c$.reverseOrder=$_M(c$,"reverseOrder",function(){return new java.util.Collections.ReverseComparator});c$.reverseOrder=$_M(c$,"reverseOrder",function(a){return null==a?java.util.Collections.reverseOrder():new java.util.Collections.ReverseComparatorWithComparator(a)},
"java.util.Comparator");c$.shuffle=$_M(c$,"shuffle",function(a){java.util.Collections.shuffle(a,new java.util.Random)},"java.util.List");c$.shuffle=$_M(c$,"shuffle",function(a,b){if($_O(a,java.util.RandomAccess))for(d=a.size()-1;0<d;d--)e=b.nextInt()%(d+1),0>e&&(e=-e),a.set(e,a.set(d,a.get(e)));else{for(var c=a.toArray(),d=c.length-1;0<d;d--){var e=b.nextInt()%(d+1);0>e&&(e=-e);var f=c[d];c[d]=c[e];c[e]=f}d=0;for(e=a.listIterator();e.hasNext();)e.next(),e.set(c[d++])}},"java.util.List,java.util.Random");
c$.singleton=$_M(c$,"singleton",function(a){return new java.util.Collections.SingletonSet(a)},"~O");c$.singletonList=$_M(c$,"singletonList",function(a){return new java.util.Collections.SingletonList(a)},"~O");c$.singletonMap=$_M(c$,"singletonMap",function(a,b){return new java.util.Collections.SingletonMap(a,b)},"~O,~O");c$.sort=$_M(c$,"sort",function(a){var b=a.toArray();java.util.Arrays.sort(b);var c=0;for(a=a.listIterator();a.hasNext();)a.next(),a.set(b[c++])},"java.util.List");c$.sort=$_M(c$,"sort",
function(a,b){var c=a.toArray(Array(a.size()));java.util.Arrays.sort(c,b);for(var d=0,e=a.listIterator();e.hasNext();)e.next(),e.set(c[d++])},"java.util.List,java.util.Comparator");c$.swap=$_M(c$,"swap",function(a,b,c){if(null==a)throw new NullPointerException;b!=c&&a.set(c,a.set(b,a.get(c)))},"java.util.List,~N,~N");c$.replaceAll=$_M(c$,"replaceAll",function(a,b,c){for(var d,e=!1;-1<(d=a.indexOf(b));)e=!0,a.set(d,c);return e},"java.util.List,~O,~O");c$.rotate=$_M(c$,"rotate",function(a,b){var c=
a.size();if(0!=c){var d;d=0<b?b%c:c- -1*(b%c);if(!(0==d||d==c))if($_O(a,java.util.RandomAccess))for(var e=a.get(0),f=0,g=0,h=0;h<c;h++)f=(f+d)%c,e=a.set(f,e),f==g&&(f=++g,e=a.get(g));else e=(c-d)%c,d=a.subList(0,e),c=a.subList(e,c),java.util.Collections.reverse(d),java.util.Collections.reverse(c),java.util.Collections.reverse(a)}},"java.util.List,~N");c$.indexOfSubList=$_M(c$,"indexOfSubList",function(a,b){var c=a.size(),d=b.size();if(d>c)return-1;if(0==d)return 0;var e=b.get(0),f=a.indexOf(e);if(-1==
f)return-1;for(;f<c&&c-f>=d;){var g=a.listIterator(f);if(null==e?null==g.next():e.equals(g.next())){for(var h=b.listIterator(1),k=!1;h.hasNext();){var l=h.next();if(!g.hasNext())return-1;if(null==l?null!=g.next():!l.equals(g.next())){k=!0;break}}if(!k)return f}f++}return-1},"java.util.List,java.util.List");c$.lastIndexOfSubList=$_M(c$,"lastIndexOfSubList",function(a,b){var c=b.size(),d=a.size();if(c>d)return-1;if(0==c)return d;for(var d=b.get(c-1),e=a.lastIndexOf(d);-1<e&&e+1>=c;){var f=a.listIterator(e+
1);if(null==d?null==f.previous():d.equals(f.previous())){for(var g=b.listIterator(c-1),h=!1;g.hasPrevious();){var k=g.previous();if(!f.hasPrevious())return-1;if(null==k?null!=f.previous():!k.equals(f.previous())){h=!0;break}}if(!h)return f.nextIndex()}e--}return-1},"java.util.List,java.util.List");c$.list=$_M(c$,"list",function(a){for(var b=new java.util.ArrayList;a.hasMoreElements();)b.add(a.nextElement());return b},"java.util.Enumeration");c$.synchronizedCollection=$_M(c$,"synchronizedCollection",
function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedCollection(a)},"java.util.Collection");c$.synchronizedList=$_M(c$,"synchronizedList",function(a){if(null==a)throw new NullPointerException;return $_O(a,java.util.RandomAccess)?new java.util.Collections.SynchronizedRandomAccessList(a):new java.util.Collections.SynchronizedList(a)},"java.util.List");c$.synchronizedMap=$_M(c$,"synchronizedMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedMap(a)},
"java.util.Map");c$.synchronizedSet=$_M(c$,"synchronizedSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedSet(a)},"java.util.Set");c$.synchronizedSortedMap=$_M(c$,"synchronizedSortedMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedSortedMap(a)},"java.util.SortedMap");c$.synchronizedSortedSet=$_M(c$,"synchronizedSortedSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedSortedSet(a)},
"java.util.SortedSet");c$.unmodifiableCollection=$_M(c$,"unmodifiableCollection",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableCollection(a)},"java.util.Collection");c$.unmodifiableList=$_M(c$,"unmodifiableList",function(a){if(null==a)throw new NullPointerException;return $_O(a,java.util.RandomAccess)?new java.util.Collections.UnmodifiableRandomAccessList(a):new java.util.Collections.UnmodifiableList(a)},"java.util.List");c$.unmodifiableMap=$_M(c$,
"unmodifiableMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableMap(a)},"java.util.Map");c$.unmodifiableSet=$_M(c$,"unmodifiableSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableSet(a)},"java.util.Set");c$.unmodifiableSortedMap=$_M(c$,"unmodifiableSortedMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableSortedMap(a)},"java.util.SortedMap");
c$.unmodifiableSortedSet=$_M(c$,"unmodifiableSortedSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableSortedSet(a)},"java.util.SortedSet");c$.frequency=$_M(c$,"frequency",function(a,b){if(null==a)throw new NullPointerException;if(a.isEmpty())return 0;for(var c=0,d=a.iterator();d.hasNext();){var e=d.next();(null==b?null==e:b.equals(e))&&c++}return c},"java.util.Collection,~O");c$.emptyList=$_M(c$,"emptyList",function(){return java.util.Collections.EMPTY_LIST});
c$.emptySet=$_M(c$,"emptySet",function(){return java.util.Collections.EMPTY_SET});c$.emptyMap=$_M(c$,"emptyMap",function(){return java.util.Collections.EMPTY_MAP});c$.checkedCollection=$_M(c$,"checkedCollection",function(a,b){return new java.util.Collections.CheckedCollection(a,b)},"java.util.Collection,Class");c$.checkedMap=$_M(c$,"checkedMap",function(a,b,c){return new java.util.Collections.CheckedMap(a,b,c)},"java.util.Map,Class,Class");c$.checkedList=$_M(c$,"checkedList",function(a,b){return $_O(a,
java.util.RandomAccess)?new java.util.Collections.CheckedRandomAccessList(a,b):new java.util.Collections.CheckedList(a,b)},"java.util.List,Class");c$.checkedSet=$_M(c$,"checkedSet",function(a,b){return new java.util.Collections.CheckedSet(a,b)},"java.util.Set,Class");c$.checkedSortedMap=$_M(c$,"checkedSortedMap",function(a,b,c){return new java.util.Collections.CheckedSortedMap(a,b,c)},"java.util.SortedMap,Class,Class");c$.checkedSortedSet=$_M(c$,"checkedSortedSet",function(a,b){return new java.util.Collections.CheckedSortedSet(a,
b)},"java.util.SortedSet,Class");c$.addAll=$_M(c$,"addAll",function(a,b){for(var c=!1,d=0;d<b.length;d++)c=(new Boolean(c|a.add(b[d]))).valueOf();return c},"java.util.Collection,~A");c$.disjoint=$_M(c$,"disjoint",function(a,b){if($_O(a,java.util.Set)&&!$_O(b,java.util.Set)||b.size()>a.size()){var c=a;a=b;b=c}for(c=a.iterator();c.hasNext();)if(b.contains(c.next()))return!1;return!0},"java.util.Collection,java.util.Collection");c$.checkType=$_M(c$,"checkType",function(a,b){if(!b.isInstance(a))throw new ClassCastException("Attempt to insert "+
a.getClass()+" element into collection with element type "+b);return a},"~O,Class");c$.$Collections$1$=function(a){$_H();c$=$_C(function(){$_B(this,arguments);this.it=null;$_Z(this,arguments)},java.util,"Collections$1",null,java.util.Enumeration);$_Y(c$,function(){this.it=a.iterator()});$_M(c$,"hasMoreElements",function(){return this.it.hasNext()});$_M(c$,"nextElement",function(){return this.it.next()});c$=$_P()};$_H();c$=$_C(function(){this.n=0;this.element=null;$_Z(this,arguments)},java.util.Collections,
"CopiesList",java.util.AbstractList,java.io.Serializable);$_K(c$,function(a,b){$_R(this,java.util.Collections.CopiesList,[]);if(0>a)throw new IllegalArgumentException;this.n=a;this.element=b},"~N,~O");$_V(c$,"contains",function(a){return null==this.element?null==a:this.element.equals(a)},"~O");$_V(c$,"size",function(){return this.n});$_V(c$,"get",function(a){if(0<=a&&a<this.n)return this.element;throw new IndexOutOfBoundsException;},"~N");c$=$_P();$_H();c$=$_T(java.util.Collections,"EmptyList",java.util.AbstractList,
java.io.Serializable);$_V(c$,"contains",function(){return!1},"~O");$_V(c$,"size",function(){return 0});$_V(c$,"get",function(){throw new IndexOutOfBoundsException;},"~N");c$=$_P();$_H();c$=$_T(java.util.Collections,"EmptySet",java.util.AbstractSet,java.io.Serializable);$_V(c$,"contains",function(){return!1},"~O");$_V(c$,"size",function(){return 0});$_V(c$,"iterator",function(){return $_D("java.util.Collections$EmptySet$1")?0:java.util.Collections.EmptySet.$Collections$EmptySet$1$(),$_N(java.util.Collections$EmptySet$1,
this,null)});c$.$Collections$EmptySet$1$=function(){$_H();c$=$_W(java.util,"Collections$EmptySet$1",null,java.util.Iterator);$_V(c$,"hasNext",function(){return!1});$_V(c$,"next",function(){throw new java.util.NoSuchElementException;});$_V(c$,"remove",function(){throw new UnsupportedOperationException;});c$=$_P()};c$=$_P();$_H();c$=$_T(java.util.Collections,"EmptyMap",java.util.AbstractMap,java.io.Serializable);$_V(c$,"containsKey",function(){return!1},"~O");$_V(c$,"containsValue",function(){return!1},
"~O");$_V(c$,"entrySet",function(){return java.util.Collections.EMPTY_SET});$_V(c$,"get",function(){return null},"~O");$_V(c$,"keySet",function(){return java.util.Collections.EMPTY_SET});$_V(c$,"values",function(){return java.util.Collections.EMPTY_LIST});c$=$_P();$_H();c$=$_T(java.util.Collections,"ReverseComparator",null,[java.util.Comparator,java.io.Serializable]);$_V(c$,"compare",function(a,b){return b.compareTo(a)},"~O,~O");c$=$_P();$_H();c$=$_C(function(){this.comparator=null;$_Z(this,arguments)},
java.util.Collections,"ReverseComparatorWithComparator",null,[java.util.Comparator,java.io.Serializable]);$_K(c$,function(a){this.comparator=a},"java.util.Comparator");$_M(c$,"compare",function(a,b){return this.comparator.compare(b,a)},"~O,~O");c$=$_P();$_H();c$=$_C(function(){this.element=null;$_Z(this,arguments)},java.util.Collections,"SingletonSet",java.util.AbstractSet,java.io.Serializable);$_K(c$,function(a){$_R(this,java.util.Collections.SingletonSet,[]);this.element=a},"~O");$_V(c$,"contains",
function(a){return null==this.element?null==a:this.element.equals(a)},"~O");$_V(c$,"size",function(){return 1});$_V(c$,"iterator",function(){return $_D("java.util.Collections$SingletonSet$1")?0:java.util.Collections.SingletonSet.$Collections$SingletonSet$1$(),$_N(java.util.Collections$SingletonSet$1,this,null)});c$.$Collections$SingletonSet$1$=function(){$_H();c$=$_C(function(){$_B(this,arguments);this.$hasNext=!0;$_Z(this,arguments)},java.util,"Collections$SingletonSet$1",null,java.util.Iterator);
$_V(c$,"hasNext",function(){return this.$hasNext});$_V(c$,"next",function(){if(this.$hasNext)return this.$hasNext=!1,this.b$["java.util.Collections.SingletonSet"].element;throw new java.util.NoSuchElementException;});$_V(c$,"remove",function(){throw new UnsupportedOperationException;});c$=$_P()};c$=$_P();$_H();c$=$_C(function(){this.element=null;$_Z(this,arguments)},java.util.Collections,"SingletonList",java.util.AbstractList,java.io.Serializable);$_K(c$,function(a){$_R(this,java.util.Collections.SingletonList,
[]);this.element=a},"~O");$_V(c$,"contains",function(a){return null==this.element?null==a:this.element.equals(a)},"~O");$_V(c$,"get",function(a){if(0==a)return this.element;throw new IndexOutOfBoundsException;},"~N");$_V(c$,"size",function(){return 1});c$=$_P();$_H();c$=$_C(function(){this.v=this.k=null;$_Z(this,arguments)},java.util.Collections,"SingletonMap",java.util.AbstractMap,java.io.Serializable);$_K(c$,function(a,b){$_R(this,java.util.Collections.SingletonMap,[]);this.k=a;this.v=b},"~O,~O");
$_V(c$,"containsKey",function(a){return null==this.k?null==a:this.k.equals(a)},"~O");$_V(c$,"containsValue",function(a){return null==this.v?null==a:this.v.equals(a)},"~O");$_V(c$,"get",function(a){return this.containsKey(a)?this.v:null},"~O");$_V(c$,"size",function(){return 1});$_V(c$,"entrySet",function(){return $_D("java.util.Collections$SingletonMap$1")?0:java.util.Collections.SingletonMap.$Collections$SingletonMap$1$(),$_N(java.util.Collections$SingletonMap$1,this,null)});c$.$Collections$SingletonMap$1$=
function(){$_H();c$=$_W(java.util,"Collections$SingletonMap$1",java.util.AbstractSet);$_V(c$,"contains",function(a){return $_O(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");$_V(c$,"size",function(){return 1});$_V(c$,"iterator",function(){return $_D("java.util.Collections$SingletonMap$1$1")?0:java.util.Collections.$Collections$SingletonMap$1$1$(),$_N(java.util.Collections$SingletonMap$1$1,
this,null)});c$=$_P()};c$.$Collections$SingletonMap$1$1$=function(){$_H();c$=$_C(function(){$_B(this,arguments);this.$hasNext=!0;$_Z(this,arguments)},java.util,"Collections$SingletonMap$1$1",null,java.util.Iterator);$_V(c$,"hasNext",function(){return this.$hasNext});$_V(c$,"next",function(){if(this.$hasNext)return this.$hasNext=!1,$_D("java.util.Collections$SingletonMap$1$1$1")?0:java.util.Collections.$Collections$SingletonMap$1$1$1$(),$_N(java.util.Collections$SingletonMap$1$1$1,this,null);throw new java.util.NoSuchElementException;
});$_V(c$,"remove",function(){throw new UnsupportedOperationException;});c$=$_P()};c$.$Collections$SingletonMap$1$1$1$=function(){$_H();c$=$_W(java.util,"Collections$SingletonMap$1$1$1",null,java.util.Map.Entry);$_V(c$,"equals",function(a){return this.b$["java.util.Collections$SingletonMap$1"].contains(a)},"~O");$_V(c$,"getKey",function(){return this.b$["java.util.Collections.SingletonMap"].k});$_V(c$,"getValue",function(){return this.b$["java.util.Collections.SingletonMap"].v});$_V(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())});$_V(c$,"setValue",function(){throw new UnsupportedOperationException;},"~O");c$=$_P()};c$=$_P();$_H();c$=$_C(function(){this.mutex=this.c=null;$_Z(this,arguments)},java.util.Collections,"SynchronizedCollection",null,[java.util.Collection,java.io.Serializable]);
$_K(c$,function(a){this.c=a;this.mutex=this},"java.util.Collection");$_K(c$,function(a,b){this.c=a;this.mutex=b},"java.util.Collection,~O");$_M(c$,"add",function(a){return this.c.add(a)},"~O");$_M(c$,"addAll",function(a){return this.c.addAll(a)},"java.util.Collection");$_M(c$,"clear",function(){this.c.clear()});$_M(c$,"contains",function(a){return this.c.contains(a)},"~O");$_M(c$,"containsAll",function(a){return this.c.containsAll(a)},"java.util.Collection");$_M(c$,"isEmpty",function(){return this.c.isEmpty()});
$_M(c$,"iterator",function(){return this.c.iterator()});$_M(c$,"remove",function(a){return this.c.remove(a)},"~O");$_M(c$,"removeAll",function(a){return this.c.removeAll(a)},"java.util.Collection");$_M(c$,"retainAll",function(a){return this.c.retainAll(a)},"java.util.Collection");$_M(c$,"size",function(){return this.c.size()});$_M(c$,"toArray",function(){return this.c.toArray()});$_M(c$,"toString",function(){return this.c.toString()});$_M(c$,"toArray",function(a){return this.c.toArray(a)},"~A");c$=
$_P();$_H();c$=$_T(java.util.Collections,"SynchronizedRandomAccessList",java.util.Collections.SynchronizedList,java.util.RandomAccess);$_V(c$,"subList",function(a,b){return new java.util.Collections.SynchronizedRandomAccessList(this.list.subList(a,b),this.mutex)},"~N,~N");c$=$_P();$_H();c$=$_C(function(){this.list=null;$_Z(this,arguments)},java.util.Collections,"SynchronizedList",java.util.Collections.SynchronizedCollection,java.util.List);$_K(c$,function(a){$_R(this,java.util.Collections.SynchronizedList,
[a]);this.list=a},"java.util.List");$_K(c$,function(a,b){$_R(this,java.util.Collections.SynchronizedList,[a,b]);this.list=a},"java.util.List,~O");$_M(c$,"add",function(a,b){this.list.add(a,b)},"~N,~O");$_M(c$,"addAll",function(a,b){return this.list.addAll(a,b)},"~N,java.util.Collection");$_V(c$,"equals",function(a){return this.list.equals(a)},"~O");$_M(c$,"get",function(a){return this.list.get(a)},"~N");$_V(c$,"hashCode",function(){return this.list.hashCode()});$_M(c$,"indexOf",function(a){return this.list.indexOf(a)},
"~O");$_M(c$,"lastIndexOf",function(a){return this.list.lastIndexOf(a)},"~O");$_M(c$,"listIterator",function(){return this.list.listIterator()});$_M(c$,"listIterator",function(a){return this.list.listIterator(a)},"~N");$_M(c$,"remove",function(a){return this.list.remove(a)},"~N");$_M(c$,"set",function(a,b){return this.list.set(a,b)},"~N,~O");$_M(c$,"subList",function(a,b){return new java.util.Collections.SynchronizedList(this.list.subList(a,b),this.mutex)},"~N,~N");c$=$_P();$_H();c$=$_C(function(){this.mutex=
this.m=null;$_Z(this,arguments)},java.util.Collections,"SynchronizedMap",null,[java.util.Map,java.io.Serializable]);$_K(c$,function(a){this.m=a;this.mutex=this},"java.util.Map");$_K(c$,function(a,b){this.m=a;this.mutex=b},"java.util.Map,~O");$_M(c$,"clear",function(){this.m.clear()});$_M(c$,"containsKey",function(a){return this.m.containsKey(a)},"~O");$_M(c$,"containsValue",function(a){return this.m.containsValue(a)},"~O");$_M(c$,"entrySet",function(){return new java.util.Collections.SynchronizedSet(this.m.entrySet(),
this.mutex)});$_V(c$,"equals",function(a){return this.m.equals(a)},"~O");$_M(c$,"get",function(a){return this.m.get(a)},"~O");$_V(c$,"hashCode",function(){return this.m.hashCode()});$_M(c$,"isEmpty",function(){return this.m.isEmpty()});$_M(c$,"keySet",function(){return new java.util.Collections.SynchronizedSet(this.m.keySet(),this.mutex)});$_M(c$,"put",function(a,b){return this.m.put(a,b)},"~O,~O");$_M(c$,"putAll",function(a){this.m.putAll(a)},"java.util.Map");$_M(c$,"remove",function(a){return this.m.remove(a)},
"~O");$_M(c$,"size",function(){return this.m.size()});$_M(c$,"values",function(){return new java.util.Collections.SynchronizedCollection(this.m.values(),this.mutex)});$_M(c$,"toString",function(){return this.m.toString()});c$=$_P();$_H();c$=$_T(java.util.Collections,"SynchronizedSet",java.util.Collections.SynchronizedCollection,java.util.Set);$_V(c$,"equals",function(a){return this.c.equals(a)},"~O");$_V(c$,"hashCode",function(){return this.c.hashCode()});c$=$_P();$_H();c$=$_C(function(){this.sm=
null;$_Z(this,arguments)},java.util.Collections,"SynchronizedSortedMap",java.util.Collections.SynchronizedMap,java.util.SortedMap);$_K(c$,function(a){$_R(this,java.util.Collections.SynchronizedSortedMap,[a]);this.sm=a},"java.util.SortedMap");$_K(c$,function(a,b){$_R(this,java.util.Collections.SynchronizedSortedMap,[a,b]);this.sm=a},"java.util.SortedMap,~O");$_M(c$,"comparator",function(){return this.sm.comparator()});$_M(c$,"firstKey",function(){return this.sm.firstKey()});$_M(c$,"headMap",function(a){return new java.util.Collections.SynchronizedSortedMap(this.sm.headMap(a),
this.mutex)},"~O");$_M(c$,"lastKey",function(){return this.sm.lastKey()});$_M(c$,"subMap",function(a,b){return new java.util.Collections.SynchronizedSortedMap(this.sm.subMap(a,b),this.mutex)},"~O,~O");$_M(c$,"tailMap",function(a){return new java.util.Collections.SynchronizedSortedMap(this.sm.tailMap(a),this.mutex)},"~O");c$=$_P();$_H();c$=$_C(function(){this.ss=null;$_Z(this,arguments)},java.util.Collections,"SynchronizedSortedSet",java.util.Collections.SynchronizedSet,java.util.SortedSet);$_K(c$,
function(a){$_R(this,java.util.Collections.SynchronizedSortedSet,[a]);this.ss=a},"java.util.SortedSet");$_K(c$,function(a,b){$_R(this,java.util.Collections.SynchronizedSortedSet,[a,b]);this.ss=a},"java.util.SortedSet,~O");$_M(c$,"comparator",function(){return this.ss.comparator()});$_M(c$,"first",function(){return this.ss.first()});$_M(c$,"headSet",function(a){return new java.util.Collections.SynchronizedSortedSet(this.ss.headSet(a),this.mutex)},"~O");$_M(c$,"last",function(){return this.ss.last()});
$_M(c$,"subSet",function(a,b){return new java.util.Collections.SynchronizedSortedSet(this.ss.subSet(a,b),this.mutex)},"~O,~O");$_M(c$,"tailSet",function(a){return new java.util.Collections.SynchronizedSortedSet(this.ss.tailSet(a),this.mutex)},"~O");c$=$_P();$_H();c$=$_C(function(){this.c=null;$_Z(this,arguments)},java.util.Collections,"UnmodifiableCollection",null,[java.util.Collection,java.io.Serializable]);$_K(c$,function(a){this.c=a},"java.util.Collection");$_V(c$,"add",function(){throw new UnsupportedOperationException;
},"~O");$_V(c$,"addAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");$_V(c$,"clear",function(){throw new UnsupportedOperationException;});$_M(c$,"contains",function(a){return this.c.contains(a)},"~O");$_M(c$,"containsAll",function(a){return this.c.containsAll(a)},"java.util.Collection");$_M(c$,"isEmpty",function(){return this.c.isEmpty()});$_M(c$,"iterator",function(){return $_D("java.util.Collections$UnmodifiableCollection$1")?0:java.util.Collections.UnmodifiableCollection.$Collections$UnmodifiableCollection$1$(),
$_N(java.util.Collections$UnmodifiableCollection$1,this,null)});$_V(c$,"remove",function(){throw new UnsupportedOperationException;},"~O");$_V(c$,"removeAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");$_V(c$,"retainAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");$_M(c$,"size",function(){return this.c.size()});$_M(c$,"toArray",function(){return this.c.toArray()});$_M(c$,"toArray",function(a){return this.c.toArray(a)},"~A");$_M(c$,
"toString",function(){return this.c.toString()});c$.$Collections$UnmodifiableCollection$1$=function(){$_H();c$=$_C(function(){$_B(this,arguments);this.iterator=null;$_Z(this,arguments)},java.util,"Collections$UnmodifiableCollection$1",null,java.util.Iterator);$_Y(c$,function(){this.iterator=this.b$["java.util.Collections.UnmodifiableCollection"].c.iterator()});$_M(c$,"hasNext",function(){return this.iterator.hasNext()});$_M(c$,"next",function(){return this.iterator.next()});$_V(c$,"remove",function(){throw new UnsupportedOperationException;
});c$=$_P()};c$=$_P();$_H();c$=$_T(java.util.Collections,"UnmodifiableRandomAccessList",java.util.Collections.UnmodifiableList,java.util.RandomAccess);$_V(c$,"subList",function(a,b){return new java.util.Collections.UnmodifiableRandomAccessList(this.list.subList(a,b))},"~N,~N");c$=$_P();$_H();c$=$_C(function(){this.list=null;$_Z(this,arguments)},java.util.Collections,"UnmodifiableList",java.util.Collections.UnmodifiableCollection,java.util.List);$_K(c$,function(a){$_R(this,java.util.Collections.UnmodifiableList,
[a]);this.list=a},"java.util.List");$_M(c$,"add",function(){throw new UnsupportedOperationException;},"~N,~O");$_M(c$,"addAll",function(){throw new UnsupportedOperationException;},"~N,java.util.Collection");$_V(c$,"equals",function(a){return this.list.equals(a)},"~O");$_M(c$,"get",function(a){return this.list.get(a)},"~N");$_V(c$,"hashcode",function(){return this.list.hashCode()});$_M(c$,"indexOf",function(a){return this.list.indexOf(a)},"~O");$_M(c$,"lastIndexOf",function(a){return this.list.lastIndexOf(a)},
"~O");$_M(c$,"listIterator",function(){return this.listIterator(0)});$_M(c$,"listIterator",function(){return $_D("java.util.Collections$UnmodifiableList$1")?0:java.util.Collections.UnmodifiableList.$Collections$UnmodifiableList$1$(),$_N(java.util.Collections$UnmodifiableList$1,this,null)},"~N");$_M(c$,"remove",function(){throw new UnsupportedOperationException;},"~N");$_V(c$,"set",function(){throw new UnsupportedOperationException;},"~N,~O");$_M(c$,"subList",function(a,b){return new java.util.Collections.UnmodifiableList(this.list.subList(a,
b))},"~N,~N");c$.$Collections$UnmodifiableList$1$=function(){$_H();c$=$_C(function(){$_B(this,arguments);this.iterator=null;$_Z(this,arguments)},java.util,"Collections$UnmodifiableList$1",null,java.util.ListIterator);$_Y(c$,function(){this.iterator=this.b$["java.util.Collections.UnmodifiableList"].list.listIterator(location)});$_V(c$,"add",function(){throw new UnsupportedOperationException;},"~O");$_M(c$,"hasNext",function(){return this.iterator.hasNext()});$_M(c$,"hasPrevious",function(){return this.iterator.hasPrevious()});
$_M(c$,"next",function(){return this.iterator.next()});$_M(c$,"nextIndex",function(){return this.iterator.nextIndex()});$_M(c$,"previous",function(){return this.iterator.previous()});$_M(c$,"previousIndex",function(){return this.iterator.previousIndex()});$_V(c$,"remove",function(){throw new UnsupportedOperationException;});$_V(c$,"set",function(){throw new UnsupportedOperationException;},"~O");c$=$_P()};c$=$_P();$_H();c$=$_C(function(){this.m=null;$_Z(this,arguments)},java.util.Collections,"UnmodifiableMap",
null,[java.util.Map,java.io.Serializable]);$_K(c$,function(a){this.m=a},"java.util.Map");$_V(c$,"clear",function(){throw new UnsupportedOperationException;});$_M(c$,"containsKey",function(a){return this.m.containsKey(a)},"~O");$_M(c$,"containsValue",function(a){return this.m.containsValue(a)},"~O");$_M(c$,"entrySet",function(){return new java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet(this.m.entrySet())});$_V(c$,"equals",function(a){return this.m.equals(a)},"~O");$_M(c$,"get",function(a){return this.m.get(a)},
"~O");$_V(c$,"hashcode",function(){return this.m.hashCode()});$_M(c$,"isEmpty",function(){return this.m.isEmpty()});$_M(c$,"keySet",function(){return new java.util.Collections.UnmodifiableSet(this.m.keySet())});$_V(c$,"put",function(){throw new UnsupportedOperationException;},"~O,~O");$_V(c$,"putAll",function(){throw new UnsupportedOperationException;},"java.util.Map");$_V(c$,"remove",function(){throw new UnsupportedOperationException;},"~O");$_M(c$,"size",function(){return this.m.size()});$_M(c$,
"values",function(){return new java.util.Collections.UnmodifiableCollection(this.m.values())});$_M(c$,"toString",function(){return this.m.toString()});$_H();c$=$_T(java.util.Collections.UnmodifiableMap,"UnmodifiableEntrySet",java.util.Collections.UnmodifiableSet);$_V(c$,"iterator",function(){return $_D("java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1")?0:java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.$Collections$UnmodifiableMap$UnmodifiableEntrySet$1$(),$_N(java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1,
this,null)});$_M(c$,"toArray",function(){for(var a=this.c.size(),b=Array(a),c=this.iterator();0<=--a;)b[a]=c.next();return b});$_M(c$,"toArray",function(a){var b=this.c.size(),c=0,d=this.iterator();b>a.length&&(a=a.getClass().getComponentType(),a=java.lang.reflect.Array.newInstance(a,b));for(;c<b;)a[c++]=d.next();c<a.length&&(a[c]=null);return a},"~A");c$.$Collections$UnmodifiableMap$UnmodifiableEntrySet$1$=function(){$_H();c$=$_C(function(){$_B(this,arguments);this.iterator=null;$_Z(this,arguments)},
java.util,"Collections$UnmodifiableMap$UnmodifiableEntrySet$1",null,java.util.Iterator);$_Y(c$,function(){this.iterator=this.b$["java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet"].c.iterator()});$_M(c$,"hasNext",function(){return this.iterator.hasNext()});$_M(c$,"next",function(){return new java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableMapEntry(this.iterator.next())});$_V(c$,"remove",function(){throw new UnsupportedOperationException;});c$=$_P()};$_H();c$=$_C(function(){this.mapEntry=
null;$_Z(this,arguments)},java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet,"UnmodifiableMapEntry",null,java.util.Map.Entry);$_K(c$,function(a){this.mapEntry=a},"java.util.Map.Entry");$_V(c$,"equals",function(a){return this.mapEntry.equals(a)},"~O");$_M(c$,"getKey",function(){return this.mapEntry.getKey()});$_M(c$,"getValue",function(){return this.mapEntry.getValue()});$_V(c$,"hashcode",function(){return this.mapEntry.hashCode()});$_V(c$,"setValue",function(){throw new UnsupportedOperationException;
},"~O");$_M(c$,"toString",function(){return this.mapEntry.toString()});c$=$_P();c$=$_P();c$=$_P();$_H();c$=$_T(java.util.Collections,"UnmodifiableSet",java.util.Collections.UnmodifiableCollection,java.util.Set);$_V(c$,"equals",function(a){return this.c.equals(a)},"~O");$_V(c$,"hashCode",function(){return this.c.hashCode()});c$=$_P();$_H();c$=$_C(function(){this.sm=null;$_Z(this,arguments)},java.util.Collections,"UnmodifiableSortedMap",java.util.Collections.UnmodifiableMap,java.util.SortedMap);$_K(c$,
function(a){$_R(this,java.util.Collections.UnmodifiableSortedMap,[a]);this.sm=a},"java.util.SortedMap");$_M(c$,"comparator",function(){return this.sm.comparator()});$_M(c$,"firstKey",function(){return this.sm.firstKey()});$_M(c$,"headMap",function(a){return new java.util.Collections.UnmodifiableSortedMap(this.sm.headMap(a))},"~O");$_M(c$,"lastKey",function(){return this.sm.lastKey()});$_M(c$,"subMap",function(a,b){return new java.util.Collections.UnmodifiableSortedMap(this.sm.subMap(a,b))},"~O,~O");
$_M(c$,"tailMap",function(a){return new java.util.Collections.UnmodifiableSortedMap(this.sm.tailMap(a))},"~O");c$=$_P();$_H();c$=$_C(function(){this.ss=null;$_Z(this,arguments)},java.util.Collections,"UnmodifiableSortedSet",java.util.Collections.UnmodifiableSet,java.util.SortedSet);$_K(c$,function(a){$_R(this,java.util.Collections.UnmodifiableSortedSet,[a]);this.ss=a},"java.util.SortedSet");$_M(c$,"comparator",function(){return this.ss.comparator()});$_M(c$,"first",function(){return this.ss.first()});
$_M(c$,"headSet",function(a){return new java.util.Collections.UnmodifiableSortedSet(this.ss.headSet(a))},"~O");$_M(c$,"last",function(){return this.ss.last()});$_M(c$,"subSet",function(a,b){return new java.util.Collections.UnmodifiableSortedSet(this.ss.subSet(a,b))},"~O,~O");$_M(c$,"tailSet",function(a){return new java.util.Collections.UnmodifiableSortedSet(this.ss.tailSet(a))},"~O");c$=$_P();$_H();c$=$_C(function(){this.type=this.c=null;$_Z(this,arguments)},java.util.Collections,"CheckedCollection",
null,[java.util.Collection,java.io.Serializable]);$_K(c$,function(a,b){if(null==a||null==b)throw new NullPointerException;this.c=a;this.type=b},"java.util.Collection,Class");$_M(c$,"size",function(){return this.c.size()});$_M(c$,"isEmpty",function(){return this.c.isEmpty()});$_M(c$,"contains",function(a){return this.c.contains(a)},"~O");$_M(c$,"iterator",function(){var a=this.c.iterator();$_O(a,java.util.ListIterator)&&(a=new java.util.Collections.CheckedListIterator(a,this.type));return a});$_M(c$,
"toArray",function(){return this.c.toArray()});$_M(c$,"toArray",function(a){return this.c.toArray(a)},"~A");$_M(c$,"add",function(a){return this.c.add(java.util.Collections.checkType(a,this.type))},"~O");$_M(c$,"remove",function(a){return this.c.remove(a)},"~O");$_M(c$,"containsAll",function(a){return this.c.containsAll(a)},"java.util.Collection");$_V(c$,"addAll",function(a){var b=a.size();if(0==b)return!1;var c=Array(b);a=a.iterator();for(var d=0;d<b;d++)c[d]=java.util.Collections.checkType(a.next(),
this.type);a=!1;for(d=0;d<b;d++)a=(new Boolean(a|this.c.add(c[d]))).valueOf();return a},"java.util.Collection");$_M(c$,"removeAll",function(a){return this.c.removeAll(a)},"java.util.Collection");$_M(c$,"retainAll",function(a){return this.c.retainAll(a)},"java.util.Collection");$_M(c$,"clear",function(){this.c.clear()});$_M(c$,"toString",function(){return this.c.toString()});c$=$_P();$_H();c$=$_C(function(){this.type=this.i=null;$_Z(this,arguments)},java.util.Collections,"CheckedListIterator",null,
java.util.ListIterator);$_K(c$,function(a,b){this.i=a;this.type=b},"java.util.ListIterator,Class");$_M(c$,"hasNext",function(){return this.i.hasNext()});$_M(c$,"next",function(){return this.i.next()});$_M(c$,"remove",function(){this.i.remove()});$_M(c$,"hasPrevious",function(){return this.i.hasPrevious()});$_M(c$,"previous",function(){return this.i.previous()});$_M(c$,"nextIndex",function(){return this.i.nextIndex()});$_M(c$,"previousIndex",function(){return this.i.previousIndex()});$_M(c$,"set",
function(a){this.i.set(java.util.Collections.checkType(a,this.type))},"~O");$_M(c$,"add",function(a){this.i.add(java.util.Collections.checkType(a,this.type))},"~O");c$=$_P();$_H();c$=$_C(function(){this.l=null;$_Z(this,arguments)},java.util.Collections,"CheckedList",java.util.Collections.CheckedCollection,java.util.List);$_K(c$,function(a,b){$_R(this,java.util.Collections.CheckedList,[a,b]);this.l=a},"java.util.List,Class");$_M(c$,"addAll",function(a,b){var c=b.size();if(0==c)return!1;for(var d=Array(c),
e=b.iterator(),f=0;f<c;f++)d[f]=java.util.Collections.checkType(e.next(),this.type);return this.l.addAll(a,java.util.Arrays.asList(d))},"~N,java.util.Collection");$_M(c$,"get",function(a){return this.l.get(a)},"~N");$_M(c$,"set",function(a,b){return this.l.set(a,java.util.Collections.checkType(b,this.type))},"~N,~O");$_M(c$,"add",function(a,b){this.l.add(a,java.util.Collections.checkType(b,this.type))},"~N,~O");$_M(c$,"remove",function(a){return this.l.remove(a)},"~N");$_M(c$,"indexOf",function(a){return this.l.indexOf(a)},
"~O");$_M(c$,"lastIndexOf",function(a){return this.l.lastIndexOf(a)},"~O");$_M(c$,"listIterator",function(){return new java.util.Collections.CheckedListIterator(this.l.listIterator(),this.type)});$_M(c$,"listIterator",function(a){return new java.util.Collections.CheckedListIterator(this.l.listIterator(a),this.type)},"~N");$_M(c$,"subList",function(a,b){return java.util.Collections.checkedList(this.l.subList(a,b),this.type)},"~N,~N");$_V(c$,"equals",function(a){return this.l.equals(a)},"~O");$_V(c$,
"hashcode",function(){return this.l.hashCode()});c$=$_P();$_H();c$=$_T(java.util.Collections,"CheckedRandomAccessList",java.util.Collections.CheckedList,java.util.RandomAccess);c$=$_P();$_H();c$=$_T(java.util.Collections,"CheckedSet",java.util.Collections.CheckedCollection,java.util.Set);$_V(c$,"equals",function(a){return this.c.equals(a)},"~O");$_V(c$,"hashCode",function(){return this.c.hashCode()});c$=$_P();$_H();c$=$_C(function(){this.valueType=this.keyType=this.m=null;$_Z(this,arguments)},java.util.Collections,
"CheckedMap",null,[java.util.Map,java.io.Serializable]);$_K(c$,($fz=function(a,b,c){if(null==a||null==b||null==c)throw new NullPointerException;this.m=a;this.keyType=b;this.valueType=c},$fz.isPrivate=!0,$fz),"java.util.Map,Class,Class");$_M(c$,"size",function(){return this.m.size()});$_M(c$,"isEmpty",function(){return this.m.isEmpty()});$_M(c$,"containsKey",function(a){return this.m.containsKey(a)},"~O");$_M(c$,"containsValue",function(a){return this.m.containsValue(a)},"~O");$_M(c$,"get",function(a){return this.m.get(a)},
"~O");$_M(c$,"put",function(a,b){return this.m.put(java.util.Collections.checkType(a,this.keyType),java.util.Collections.checkType(b,this.valueType))},"~O,~O");$_M(c$,"remove",function(a){return this.m.remove(a)},"~O");$_V(c$,"putAll",function(a){var b=a.size();if(0!=b){var c=Array(b);a=a.entrySet().iterator();for(var d=0;d<b;d++){var e=a.next();java.util.Collections.checkType(e.getKey(),this.keyType);java.util.Collections.checkType(e.getValue(),this.valueType);c[d]=e}for(e=0;e<b;e++)this.m.put(c[e].getKey(),
c[e].getValue())}},"java.util.Map");$_M(c$,"clear",function(){this.m.clear()});$_M(c$,"keySet",function(){return this.m.keySet()});$_M(c$,"values",function(){return this.m.values()});$_M(c$,"entrySet",function(){return new java.util.Collections.CheckedMap.CheckedEntrySet(this.m.entrySet(),this.valueType)});$_V(c$,"equals",function(a){return this.m.equals(a)},"~O");$_V(c$,"hashcode",function(){return this.m.hashCode()});$_M(c$,"toString",function(){return this.m.toString()});$_H();c$=$_C(function(){this.valueType=
this.e=null;$_Z(this,arguments)},java.util.Collections.CheckedMap,"CheckedEntry",null,java.util.Map.Entry);$_K(c$,function(a,b){if(null==a)throw new NullPointerException;this.e=a;this.valueType=b},"java.util.Map.Entry,Class");$_M(c$,"getKey",function(){return this.e.getKey()});$_M(c$,"getValue",function(){return this.e.getValue()});$_M(c$,"setValue",function(a){return this.e.setValue(java.util.Collections.checkType(a,this.valueType))},"~O");$_V(c$,"equals",function(a){return this.e.equals(a)},"~O");
$_V(c$,"hashcode",function(){return this.e.hashCode()});c$=$_P();$_H();c$=$_C(function(){this.valueType=this.s=null;$_Z(this,arguments)},java.util.Collections.CheckedMap,"CheckedEntrySet",null,java.util.Set);$_K(c$,function(a,b){this.s=a;this.valueType=b},"java.util.Set,Class");$_M(c$,"iterator",function(){return new java.util.Collections.CheckedMap.CheckedEntrySet.CheckedEntryIterator(this.s.iterator(),this.valueType)});$_M(c$,"toArray",function(){for(var a=this.size(),b=Array(a),c=this.iterator(),
d=0;d<a;d++)b[d]=c.next();return b});$_M(c$,"toArray",function(a){var b=this.size();if(a.length<b){var c=a.getClass().getComponentType();a=java.lang.reflect.Array.newInstance(c,b)}for(var c=this.iterator(),d=0;d<b;d++)a[d]=c.next();b<a.length&&(a[b]=null);return a},"~A");$_M(c$,"retainAll",function(a){return this.s.retainAll(a)},"java.util.Collection");$_M(c$,"removeAll",function(a){return this.s.removeAll(a)},"java.util.Collection");$_M(c$,"containsAll",function(a){return this.s.containsAll(a)},
"java.util.Collection");$_V(c$,"addAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");$_M(c$,"remove",function(a){return this.s.remove(a)},"~O");$_M(c$,"contains",function(a){return this.s.contains(a)},"~O");$_V(c$,"add",function(){throw new UnsupportedOperationException;},"java.util.Map.Entry");$_M(c$,"isEmpty",function(){return this.s.isEmpty()});$_M(c$,"clear",function(){this.s.clear()});$_M(c$,"size",function(){return this.s.size()});$_V(c$,"hashcode",function(){return this.s.hashCode()});
$_V(c$,"equals",function(a){return this.s.equals(a)},"~O");$_H();c$=$_C(function(){this.valueType=this.i=null;$_Z(this,arguments)},java.util.Collections.CheckedMap.CheckedEntrySet,"CheckedEntryIterator",null,java.util.Iterator);$_K(c$,function(a,b){this.i=a;this.valueType=b},"java.util.Iterator,Class");$_M(c$,"hasNext",function(){return this.i.hasNext()});$_M(c$,"remove",function(){this.i.remove()});$_M(c$,"next",function(){return new java.util.Collections.CheckedMap.CheckedEntry(this.i.next(),this.valueType)});
c$=$_P();c$=$_P();c$=$_P();$_H();c$=$_C(function(){this.ss=null;$_Z(this,arguments)},java.util.Collections,"CheckedSortedSet",java.util.Collections.CheckedSet,java.util.SortedSet);$_K(c$,function(a,b){$_R(this,java.util.Collections.CheckedSortedSet,[a,b]);this.ss=a},"java.util.SortedSet,Class");$_M(c$,"comparator",function(){return this.ss.comparator()});$_M(c$,"subSet",function(a,b){return new java.util.Collections.CheckedSortedSet(this.ss.subSet(a,b),this.type)},"~O,~O");$_M(c$,"headSet",function(a){return new java.util.Collections.CheckedSortedSet(this.ss.headSet(a),
this.type)},"~O");$_M(c$,"tailSet",function(a){return new java.util.Collections.CheckedSortedSet(this.ss.tailSet(a),this.type)},"~O");$_M(c$,"first",function(){return this.ss.first()});$_M(c$,"last",function(){return this.ss.last()});c$=$_P();$_H();c$=$_C(function(){this.sm=null;$_Z(this,arguments)},java.util.Collections,"CheckedSortedMap",java.util.Collections.CheckedMap,java.util.SortedMap);$_K(c$,function(a,b,c){$_R(this,java.util.Collections.CheckedSortedMap,[a,b,c]);this.sm=a},"java.util.SortedMap,Class,Class");
$_M(c$,"comparator",function(){return this.sm.comparator()});$_M(c$,"subMap",function(a,b){return new java.util.Collections.CheckedSortedMap(this.sm.subMap(a,b),this.keyType,this.valueType)},"~O,~O");$_M(c$,"headMap",function(a){return new java.util.Collections.CheckedSortedMap(this.sm.headMap(a),this.keyType,this.valueType)},"~O");$_M(c$,"tailMap",function(a){return new java.util.Collections.CheckedSortedMap(this.sm.tailMap(a),this.keyType,this.valueType)},"~O");$_M(c$,"firstKey",function(){return this.sm.firstKey()});
$_M(c$,"lastKey",function(){return this.sm.lastKey()});c$=$_P();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}),$_L(null,"java.util.Random",["java.lang.IllegalArgumentException"],function(){c$=$_C(function(){this.haveNextNextGaussian=!1;this.nextNextGaussian=this.seed=0;$_Z(this,arguments)},java.util,"Random",null,java.io.Serializable);
$_K(c$,function(){this.setSeed(System.currentTimeMillis())});$_K(c$,function(a){this.setSeed(a)},"~N");$_M(c$,"next",function(a){this.seed=25214903917*this.seed+11&0xffffffffffff;return this.seed>>>48-a},"~N");$_M(c$,"nextBoolean",function(){return 0.5<Math.random()});$_M(c$,"nextBytes",function(){for(var a=0;a<bytes.length;a++)bytes[a]=Math.round(256*Math.random())},"~A");$_M(c$,"nextDouble",function(){return Math.random()});$_M(c$,"nextFloat",function(){return Math.random()});$_M(c$,"nextGaussian",
function(){if(this.haveNextNextGaussian)return this.haveNextNextGaussian=!1,this.nextNextGaussian;var a,b,c;do a=2*this.nextDouble()-1,b=2*this.nextDouble()-1,c=a*a+b*b;while(1<=c);c=Math.sqrt(-2*Math.log(c)/c);this.nextNextGaussian=b*c;this.haveNextNextGaussian=!0;return a*c});$_M(c$,"nextInt",function(){return Math.ceil(65535*Math.random())-32768});$_M(c$,"nextInt",function(a){if(0<a){if((a&-a)==a)return a*this.next(31)>>31;var b,c;do b=this.next(31),c=b%a;while(0>b-c+(a-1));return c}throw new IllegalArgumentException;
},"~N");$_M(c$,"nextLong",function(){return Math.ceil(4294967295*Math.random())-2147483648});$_M(c$,"setSeed",function(a){this.seed=(a^25214903917)&0xffffffffffff;this.haveNextNextGaussian=!1},"~N");$_S(c$,"multiplier",25214903917)}),Clazz.declarePackage("J.util"),Clazz.load(["java.util.ArrayList"],"J.util.JmolList",null,function(){c$=Clazz.declareType(J.util,"JmolList",java.util.ArrayList);$_M(c$,"addLast",function(a){return this.add1(a)},"~O");$_M(c$,"removeObj",function(a){return this.removeObject(a)},
"~O")}),Clazz.declarePackage("J.awtjs2d"),Clazz.load(["java.net.URLConnection"],"J.awtjs2d.JmolURLConnection",null,function(){c$=Clazz.decorateAsClass(function(){this.bytesOut=null;this.postOut="";Clazz.instantialize(this,arguments)},J.awtjs2d,"JmolURLConnection",java.net.URLConnection);$_M(c$,"doAjax",($fz=function(){return Jmol._doAjax(this.url,this.postOut,this.bytesOut)},$fz.isPrivate=!0,$fz));Clazz.overrideMethod(c$,"connect",function(){});$_M(c$,"outputBytes",function(a){this.bytesOut=a},"~A");
$_M(c$,"outputString",function(a){this.postOut=a},"~S");$_M(c$,"getStringXBuilder",function(){return this.doAjax()})}),Clazz.declarePackage("J.api"),Clazz.declareInterface(J.api,"JmolCallbackListener"),Clazz.declarePackage("J.api"),Clazz.load(["J.api.JmolCallbackListener"],"J.api.JmolStatusListener",null,function(){Clazz.declareInterface(J.api,"JmolStatusListener",J.api.JmolCallbackListener)}),Clazz.declarePackage("J.api"),Clazz.declareInterface(J.api,"JmolSyncInterface"),Clazz.declarePackage("J.appletjs"),
Clazz.load(["J.api.JmolStatusListener","$.JmolSyncInterface","java.util.Hashtable"],"J.appletjs.Jmol","java.lang.Boolean java.net.URL J.appletjs.JmolAppletRegistry J.constant.EnumCallback J.i18n.GT J.util.Dimension $.Escape $.JmolList $.Logger $.Parser $.SB $.TextFormat J.viewer.JC $.Viewer".split(" "),function(){c$=Clazz.decorateAsClass(function(){this.language=null;this.doTranslate=!0;this.loading=this.isStereoSlave=this.haveDocumentAccess=!1;this.mayScript=!0;this.jmol=this.htParams=this.viewerOptions=
this.b$=this.viewer=this.gRight=this.outputBuffer=this.syncId=this.fullName=this.htmlName=null;Clazz.isClassDefined("J.appletjs.Jmol.MyStatusListener")||J.appletjs.Jmol.$Jmol$MyStatusListener$();Clazz.instantialize(this,arguments)},J.appletjs,"Jmol",null,J.api.JmolSyncInterface);Clazz.prepareFields(c$,function(){this.b$=new java.util.Hashtable;this.htParams=new java.util.Hashtable});Clazz.makeConstructor(c$,function(a){null==a&&(a=new java.util.Hashtable);this.viewerOptions=a;var b;for(a=a.entrySet().iterator();a.hasNext()&&
((b=a.next())||1);)this.htParams.put(b.getKey().toLowerCase(),b.getValue());this.init()},"java.util.Map");$_M(c$,"jmolReady",function(){System.out.println("Jmol applet "+this.fullName+" ready");this.viewer.getBooleanProperty("__appletReady")});$_M(c$,"destroy",function(){this.gRight=null;J.appletjs.JmolAppletRegistry.checkOut(this.fullName);this.viewer.setModeMouse(-1);this.viewer.getBooleanProperty("__appletDestroyed");this.viewer=null;System.out.println("Jmol applet "+this.fullName+" destroyed")});
$_M(c$,"setStereoGraphics",function(){return null},"~B");$_M(c$,"init",function(){this.jmol=this;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");this.setLogging();J.i18n.GT.ignoreApplicationBundle();this.viewerOptions.remove("debug");this.viewerOptions.put("fullName",this.fullName);this.haveDocumentAccess="true".equalsIgnoreCase(""+this.getValue("allowjavascript",
"true"));J.appletjs.JmolAppletRegistry.checkIn(this.fullName,this);this.initWindows();this.initApplication()});$_M(c$,"initWindows",($fz=function(){this.viewerOptions.put("applet",Boolean.TRUE);null==this.getParameter("statusListener")&&this.viewerOptions.put("statusListener",Clazz.innerTypeInstance(J.appletjs.Jmol.MyStatusListener,this,null));this.viewer=new J.viewer.Viewer(this.viewerOptions);this.mayScript=!0},$fz.isPrivate=!0,$fz));$_M(c$,"initApplication",($fz=function(){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.loading=!0;for(var b,a=0,c=J.constant.EnumCallback.values();a<c.length&&((b=c[a])||1);a++)this.setValue(b.name()+"Callback",null);this.loading=!1;this.language=this.getParameter("language");null!=this.language&&(System.out.println("requested language="+this.language),new J.i18n.GT(this.language));
this.doTranslate=!"none".equals(this.language)&&this.getBooleanValue("doTranslate",!0);this.language=J.i18n.GT.getLanguage();System.out.println("language="+this.language);null==this.b$.get(J.constant.EnumCallback.SCRIPT)&&null==this.b$.get(J.constant.EnumCallback.ERROR)&&null!=this.b$.get(J.constant.EnumCallback.MESSAGE)&&(this.doTranslate&&null==this.getValue("doTranslate",null)&&(this.doTranslate=!1,J.util.Logger.warn("Note -- Presence of message callback disables 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);b=this.getValue("script","");this.viewer.popHoldRepaint();0<b.length&&this.scriptProcessor(b,null,1);this.jmolReady()},
$fz.isPrivate=!0,$fz));$_M(c$,"setLogging",($fz=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)},$fz.isPrivate=!0,$fz));$_M(c$,"getParameter",($fz=function(a){a=this.htParams.get(a.toLowerCase());return null==a?null:String.instantialize(a.toString())},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"getBooleanValue",($fz=function(a,b){var c=
this.getValue(a,b?"true":"");return c.equalsIgnoreCase("true")||c.equalsIgnoreCase("on")||c.equalsIgnoreCase("yes")},$fz.isPrivate=!0,$fz),"~S,~B");$_M(c$,"getValue",($fz=function(a,b){var c=this.getParameter(a);System.out.println("getValue "+a+" = "+c);return null!=c?c:b},$fz.isPrivate=!0,$fz),"~S,~S");$_M(c$,"getValueLowerCase",($fz=function(a,b){var c=this.getValue(a,b);null!=c&&(c=c.trim().toLowerCase(),0==c.length&&(c=null));return c},$fz.isPrivate=!0,$fz),"~S,~S");$_M(c$,"setValue",($fz=function(a,
b){this.setStringProperty(a,this.getValue(a,b))},$fz.isPrivate=!0,$fz),"~S,~S");$_M(c$,"setStringProperty",($fz=function(a,b){null!=b&&(J.util.Logger.info(a+' = "'+b+'"'),this.viewer.setStringProperty(a,b))},$fz.isPrivate=!0,$fz),"~S,~S");$_M(c$,"sendJsTextStatus",function(a){System.out.println(a)},"~S");$_M(c$,"sendJsTextareaStatus",function(a){System.out.println(a)},"~S");$_M(c$,"handleEvent",function(a){return null==this.viewer?!1:this.viewer.handleOldJvm10Event(a.id,a.x,a.y,a.modifiers,a.when)},
"java.awt.Event");$_M(c$,"scriptProcessor",($fz=function(a,b,c){if(null==a||0==a.length)return"";switch(c){case 0:return a=this.viewer.scriptCheck(a),Clazz.instanceOf(a,String)?a:"";case 1:return null!=b?this.viewer.scriptWaitStatus(a,b).toString():this.viewer.scriptWait(a);default:return this.viewer.script(a)}},$fz.isPrivate=!0,$fz),"~S,~S,~N");$_M(c$,"script",function(a){this.scriptNoWait(a)},"~S");$_M(c$,"scriptNoWait",function(a){return null==a||0==a.length?"":this.scriptProcessor(a,null,2)},
"~S");$_M(c$,"scriptCheck",function(a){return null==a||0==a.length?"":this.scriptProcessor(a,null,0)},"~S");$_M(c$,"scriptWait",function(a){return this.scriptWait(a,null)},"~S");$_M(c$,"scriptWait",function(a,b){if(null==a||0==a.length)return"";this.outputBuffer=null;return this.scriptProcessor(a,b,1)},"~S,~S");$_M(c$,"scriptWaitOutput",function(a){if(null==a||0==a.length)return"";this.outputBuffer=new J.util.SB;this.viewer.scriptWaitStatus(a,"");a=null==this.outputBuffer?"":this.outputBuffer.toString();
this.outputBuffer=null;return a},"~S");$_M(c$,"syncScript",function(a){this.viewer.syncScript(a,"~",0)},"~S");$_M(c$,"getAppletInfo",function(){return 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.getProperty("documentBase"))+"\ncodeBase = "+J.util.Escape.eS(""+
this.getProperty("codeBase"))});Clazz.overrideMethod(c$,"getProperty",function(a,b){return this.viewer.getProperty(null,a,b)},"~S,~S");Clazz.overrideMethod(c$,"getPropertyAsString",function(a,b){return this.viewer.getProperty("readable",a,b).toString()},"~S,~S");Clazz.overrideMethod(c$,"getPropertyAsJSON",function(a,b){return this.viewer.getProperty("JSON",a,b).toString()},"~S,~S");$_M(c$,"loadInlineString",function(a,b,c){a=this.viewer.loadInline(a,c);null==a&&this.script(b);return a},"~S,~S,~B");
$_M(c$,"loadInlineArray",function(a,b,c){if(null==a||0==a.length)return null;a=this.viewer.loadInline(a,c);null==a&&this.script(b);return a},"~A,~S,~B");c$.sendCallback=$_M(c$,"sendCallback",function(a,b,c){if(!(null==b||0==b.length))if(b.equals("alert"))alert(a);else{a=J.util.TextFormat.split(b,".");try{var d=window[a[0]];for(F=1;F<a.length;F++)d=d[a[F]];return d(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7])}catch(e){System.out.println(b+" failed "+e)}}return""},"~S,~S,~A");Clazz.overrideMethod(c$,"register",
function(a,b){J.appletjs.JmolAppletRegistry.checkIn(a,b)},"~S,J.api.JmolSyncInterface");c$.$Jmol$MyStatusListener$=function(){Clazz.pu$h();c$=Clazz.decorateAsClass(function(){Clazz.prepareCallback(this,arguments);this.haveNotifiedError=!1;Clazz.instantialize(this,arguments)},J.appletjs.Jmol,"MyStatusListener",null,J.api.JmolStatusListener);Clazz.overrideMethod(c$,"getRegistryInfo",function(){J.appletjs.JmolAppletRegistry.checkIn(null,null);return J.appletjs.JmolAppletRegistry.htRegistry});Clazz.overrideMethod(c$,
"resizeInnerPanel",function(){return(new J.util.Dimension).set(0,0)},"~S");Clazz.overrideMethod(c$,"notifyEnabled",function(a){switch(a){case J.constant.EnumCallback.ANIMFRAME:case J.constant.EnumCallback.ECHO:case J.constant.EnumCallback.ERROR:case J.constant.EnumCallback.EVAL:case J.constant.EnumCallback.LOADSTRUCT:case J.constant.EnumCallback.MEASURE:case J.constant.EnumCallback.MESSAGE:case J.constant.EnumCallback.PICK:case J.constant.EnumCallback.SYNC:case J.constant.EnumCallback.SCRIPT:return!0}return null!=
this.b$["J.appletjs.Jmol"].b$.get(a)},"J.constant.EnumCallback");$_M(c$,"notifyCallback",function(a,b){var c=this.b$["J.appletjs.Jmol"].b$.get(a),d=null!=c&&(null==b||null==b[0]),e=!1;null!=b&&(b[0]=this.b$["J.appletjs.Jmol"].htmlName);var f=null==b||null==b[1]?null:b[1].toString();switch(a){case J.constant.EnumCallback.APPLETREADY:b[3]=this.b$["J.appletjs.Jmol"].jmol;break;case J.constant.EnumCallback.CLICK:"alert".equals(c)&&(f="x="+b[1]+" y="+b[2]+" action="+b[3]+" clickCount="+b[4]);break;case J.constant.EnumCallback.ANIMFRAME:var g=
b[1],h=g[0],k=g[1],l=g[2],m=g[3],g=g[4],n=-2>=h,p=0>m?-1:1,q=0>g?-1:1;d&&(b=[this.b$["J.appletjs.Jmol"].htmlName,Integer.$valueOf(Math.max(h,-2-h)),Integer.$valueOf(k),Integer.$valueOf(l),Integer.$valueOf(Math.abs(m)),Integer.$valueOf(Math.abs(g)),Integer.$valueOf(n?1:0),Integer.$valueOf(p),Integer.$valueOf(q)]);break;case J.constant.EnumCallback.ECHO:k=(h=2==b.length)||1==b[2].intValue();d||(k&&(e=!0),d=!h&&null!=(c=this.b$["J.appletjs.Jmol"].b$.get(a=J.constant.EnumCallback.MESSAGE)));e||this.output(f);
break;case J.constant.EnumCallback.LOADSTRUCT:h=b[4];if(null!=h){h=(0<=h.indexOf("NOTE:")?"":J.i18n.GT._("File Error:"))+h;this.showStatus(h);this.notifyCallback(J.constant.EnumCallback.MESSAGE,["",h]);return}break;case J.constant.EnumCallback.MEASURE:d||(d=null!=(c=this.b$["J.appletjs.Jmol"].b$.get(a=J.constant.EnumCallback.MESSAGE)));h=b[3];0<=h.indexOf("Picked")||0<=h.indexOf("Sequence")?(this.showStatus(f),e=!0):0<=h.indexOf("Completed")&&(f=h+": "+f,e=!0);break;case J.constant.EnumCallback.MESSAGE:e=
!d;d=(new Boolean(d&null!=f)).valueOf();e||this.output(f);break;case J.constant.EnumCallback.PICK:this.showStatus(f);e=!0;break;case J.constant.EnumCallback.SCRIPT:0<b[3].intValue()?this.notifyScriptTermination():d||(d=null!=(c=this.b$["J.appletjs.Jmol"].b$.get(a=J.constant.EnumCallback.MESSAGE)));this.output(f);this.showStatus(f);break;case J.constant.EnumCallback.SYNC:this.sendScript(f,b[2],!0,d);return}e&&(e=this.b$["J.appletjs.Jmol"].viewer.getProperty("DATA_API","getAppConsole",null),null!=e&&
(e.notifyCallback(a,b),this.output(f),this.b$["J.appletjs.Jmol"].sendJsTextareaStatus(f)));if(d&&this.b$["J.appletjs.Jmol"].mayScript&&!(null==c||!this.b$["J.appletjs.Jmol"].haveDocumentAccess&&!c.startsWith("Jmol.")))try{J.appletjs.Jmol.sendCallback(f,c,b)}catch(r){if(Clazz.exceptionOf(r,Exception))this.haveNotifiedError||J.util.Logger.debugging&&J.util.Logger.debug(a.name()+"Callback call error to "+c+": "+r),this.haveNotifiedError=!0;else throw r;}},"J.constant.EnumCallback,~A");$_M(c$,"output",
($fz=function(a){null!=this.b$["J.appletjs.Jmol"].outputBuffer&&null!=a&&this.b$["J.appletjs.Jmol"].outputBuffer.append(a).appendC("\n")},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"notifyScriptTermination",($fz=function(){},$fz.isPrivate=!0,$fz));$_M(c$,"notifySync",($fz=function(a){var b=this.b$["J.appletjs.Jmol"].b$.get(J.constant.EnumCallback.SYNC);if(!this.b$["J.appletjs.Jmol"].mayScript||null==b||!this.b$["J.appletjs.Jmol"].haveDocumentAccess&&!b.startsWith("Jmol."))return a;try{return eval(syncCallback)(this.htmlName,
info,appletName)}catch(c){if(Clazz.exceptionOf(c,Exception))this.haveNotifiedError||J.util.Logger.debugging&&J.util.Logger.debug("syncCallback call error to "+b+": "+c),this.haveNotifiedError=!0;else throw c;}return a},$fz.isPrivate=!0,$fz),"~S,~S");Clazz.overrideMethod(c$,"setCallbackFunction",function(a,b){if(!a.equalsIgnoreCase("modelkit"))if(a.equalsIgnoreCase("language"))this.consoleMessage(""),this.consoleMessage(null);else{var c=J.constant.EnumCallback.getCallback(a);null!=c&&(this.b$["J.appletjs.Jmol"].loading||
c!==J.constant.EnumCallback.EVAL)?null==b?this.b$["J.appletjs.Jmol"].b$.remove(c):this.b$["J.appletjs.Jmol"].b$.put(c,b):this.consoleMessage("Available callbacks include: "+J.constant.EnumCallback.getNameList().$replace(";"," ").trim())}},"~S,~S");Clazz.overrideMethod(c$,"eval",function(a){var b=a.indexOf("\u0001");if(0<=b)return this.sendScript(a.substring(b+1),a.substring(0,b),!1,!1);if(!this.b$["J.appletjs.Jmol"].haveDocumentAccess)return"NO EVAL ALLOWED";if(null!=this.b$["J.appletjs.Jmol"].b$.get(J.constant.EnumCallback.EVAL))return this.notifyCallback(J.constant.EnumCallback.EVAL,
[null,a]),"";try{return""+eval(a)}catch(c){if(Clazz.exceptionOf(c,Exception))J.util.Logger.error("# error evaluating "+a+":"+c.toString());else throw c;}return""},"~S");Clazz.overrideMethod(c$,"createImage",function(){return null},"~S,~S,~O,~N");Clazz.overrideMethod(c$,"functionXY",function(a,b,c){a=Clazz.newFloatArray(Math.abs(b),Math.abs(c),0);if(!this.b$["J.appletjs.Jmol"].mayScript||!this.b$["J.appletjs.Jmol"].haveDocumentAccess||0==b||0==c)return a;try{if(0<b&&0<c)for(var d=0;d<b;d++)for(var e=
0;e<c;e++)fxy[g][j]=eval(functionName)(this.htmlName,g,j);else if(0<c){data=eval(functionName)(this.htmlName,nX,nY);b=Math.abs(b);e=Clazz.newFloatArray(b*c,0);J.util.Parser.parseStringInfestedFloatArray(d,null,e);for(var f=d=0;d<b;d++)for(var g=0;g<c;g++,f++)a[d][g]=e[f]}else data=eval(functionName)(htmlName,nX,nY,fxy)}catch(h){if(Clazz.exceptionOf(h,Exception))J.util.Logger.error("Exception "+h+" with nX, nY: "+b+" "+c);else throw h;}return a},"~S,~N,~N");Clazz.overrideMethod(c$,"functionXYZ",function(a,
b,c,d){var e=Clazz.newFloatArray(Math.abs(b),Math.abs(c),Math.abs(d),0);if(!this.b$["J.appletjs.Jmol"].mayScript||!this.b$["J.appletjs.Jmol"].haveDocumentAccess||0==b||0==c||0==d)return e;try{eval(functionName)(this.htmlName,nX,nY,nZ,fxyz)}catch(f){if(Clazz.exceptionOf(f,Exception))J.util.Logger.error("Exception "+f+" for "+a+" with nX, nY, nZ: "+b+" "+c+" "+d);else throw f;}return e},"~S,~N,~N,~N");Clazz.overrideMethod(c$,"showUrl",function(a){J.util.Logger.debugging&&J.util.Logger.debug("showUrl("+
a+")");if(null!=a&&0<a.length)try{new java.net.URL(Clazz.castNullAs("java.net.URL"),a,null),window.open(url)}catch(b){if(Clazz.exceptionOf(b,java.net.MalformedURLException))this.consoleMessage("Malformed URL:"+a);else throw b;}},"~S");$_M(c$,"finalize",function(){J.util.Logger.debug("MyStatusListener finalize "+this);Clazz.superCall(this,J.appletjs.Jmol.MyStatusListener,"finalize",[])});$_M(c$,"showStatus",($fz=function(a){try{System.out.println(a)}catch(b){if(!Clazz.exceptionOf(b,Exception))throw b;
}},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"consoleMessage",($fz=function(a){this.notifyCallback(J.constant.EnumCallback.ECHO,["",a])},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"sendScript",($fz=function(a,b,c,d){if(d&&(a=this.notifySync(a,b),null==a||0==a.length||a.equals("0")))return"";var e=new J.util.JmolList;J.appletjs.JmolAppletRegistry.findApplets(b,this.b$["J.appletjs.Jmol"].syncId,this.b$["J.appletjs.Jmol"].fullName,e);var f=e.size();if(0==f)return!d&&!b.equals("*")&&J.util.Logger.error(this.b$["J.appletjs.Jmol"].fullName+
" couldn't find applet "+b),"";b=c?null:new J.util.SB;d=c&&a.equals("GET_GRAPHICS");var g=c&&a.equals("SET_GRAPHICS_OFF");d&&(this.b$["J.appletjs.Jmol"].gRight=null);for(var h=0;h<f;h++){var k=e.get(h),l=J.appletjs.JmolAppletRegistry.htRegistry.get(k),m=Clazz.instanceOf(l,J.api.JmolScriptInterface);J.util.Logger.debugging&&J.util.Logger.debug(this.b$["J.appletjs.Jmol"].fullName+" sending to "+k+": "+a);try{if(m&&(d||g))return this.b$["J.appletjs.Jmol"].gRight=l.setStereoGraphics(d),"";c?l.syncScript(a):
m&&b.append(l.scriptWait(a,"output")).append("\n")}catch(n){if(Clazz.exceptionOf(n,Exception))k=this.b$["J.appletjs.Jmol"].htmlName+" couldn't send to "+k+": "+a+": "+n,J.util.Logger.error(k),c||b.append(k);else throw n;}}return c?"":b.toString()},$fz.isPrivate=!0,$fz),"~S,~S,~B,~B");Clazz.overrideMethod(c$,"getProperty",function(){return null},"~S");c$=Clazz.p0p()};Clazz.defineStatics(c$,"SCRIPT_CHECK",0,"SCRIPT_WAIT",1,"SCRIPT_NOWAIT",2)}),Clazz.declarePackage("J.appletjs"),Clazz.load(["java.util.Hashtable"],
"J.appletjs.JmolAppletRegistry",["J.util.Logger","$.TextFormat"],function(){c$=Clazz.declareType(J.appletjs,"JmolAppletRegistry");c$.checkIn=$_M(c$,"checkIn",function(a,b){J.appletjs.JmolAppletRegistry.cleanRegistry();null!=a&&(J.util.Logger.info("AppletRegistry.checkIn("+a+")"),J.appletjs.JmolAppletRegistry.htRegistry.put(a,b));if(J.util.Logger.debugging)for(var c,d=J.appletjs.JmolAppletRegistry.htRegistry.entrySet().iterator();d.hasNext()&&((c=d.next())||1);){var e=c.getKey();J.util.Logger.debug(e+
" "+c.getValue())}},"~S,J.api.JmolSyncInterface");c$.checkOut=$_M(c$,"checkOut",function(a){J.appletjs.JmolAppletRegistry.htRegistry.remove(a)},"~S");c$.findApplets=$_M(c$,"findApplets",function(a,b,c,d){if(null!=a&&0<=a.indexOf(",")){var e=J.util.TextFormat.split(a,",");for(a=0;a<e.length;a++)J.appletjs.JmolAppletRegistry.findApplets(e[a],b,c,d)}else if(b="__"+b+"__",null==a||a.equals("*")||a.equals(">"))for(a=J.appletjs.JmolAppletRegistry.htRegistry.keySet().iterator();a.hasNext()&&((e=a.next())||
1);)!e.equals(c)&&0<e.indexOf(b)&&d.addLast(e);else 0>a.indexOf("__")&&(a+=b),J.appletjs.JmolAppletRegistry.htRegistry.containsKey(a)||(a="jmolApplet"+a),!a.equals(c)&&J.appletjs.JmolAppletRegistry.htRegistry.containsKey(a)&&d.addLast(a)},"~S,~S,~S,J.util.JmolList");c$.cleanRegistry=$_M(c$,"cleanRegistry",($fz=function(){},$fz.isPrivate=!0,$fz));c$.htRegistry=c$.prototype.htRegistry=new java.util.Hashtable}),$_L(null,"java.lang.Enum",["java.lang.CloneNotSupportedException","$.IllegalArgumentException",
"$.NullPointerException","java.security.AccessController","$.PrivilegedExceptionAction"],function(){c$=$_C(function(){this.$name=null;this.$ordinal=0;$_Z(this,arguments)},java.lang,"Enum",null,[java.io.Serializable,Comparable]);$_K(c$,function(a,b){this.$name=a;this.$ordinal=b},"~S,~N");$_M(c$,"name",function(){return this.$name});$_M(c$,"ordinal",function(){return this.$ordinal});$_V(c$,"toString",function(){return this.$name});$_V(c$,"equals",function(a){return this===a},"~O");$_V(c$,"hashCode",
function(){return this.$ordinal+(null==this.$name?0:this.$name.hashCode())});$_V(c$,"clone",function(){throw new CloneNotSupportedException("KA004");});$_V(c$,"compareTo",function(a){return this.$ordinal-a.$ordinal},"~O");$_M(c$,"getDeclaringClass",function(){var a=this.getClass(),b=a.getSuperclass();return Enum===b?a:b});c$.$valueOf=$_M(c$,"$valueOf",function(a,b){if(null==a||null==b)throw new NullPointerException("KA001");var c=Enum.getValues(a);if(null==c)throw new IllegalArgumentException("KA005");
for(var d,e=0;e<c.length&&((d=c[e])||1);e++)if(d.$name.equals(b))return d;throw new IllegalArgumentException("KA006");},"Class,~S");c$.getValues=$_M(c$,"getValues",function(a){try{return java.security.AccessController.doPrivileged(($_D("Enum$1")?0:java.lang.Enum.$Enum$1$(),$_N(Enum$1,this,$_F("enumType",a)))).invoke(a,Clazz.castNullAs("Array"))}catch(b){if($_O(b,Exception))return null;throw b;}},"Class");c$.$Enum$1$=function(){$_H();c$=$_W(null,"Enum$1",null,java.security.PrivilegedExceptionAction);
$_V(c$,"run",function(){var a=this.f$.enumType.getMethod("values",null);a.setAccessible(!0);return a});c$=$_P()}}),Clazz.declarePackage("J.constant"),Clazz.load(["java.lang.Enum"],"J.constant.EnumCallback",["J.util.SB"],function(){c$=Clazz.declareType(J.constant,"EnumCallback",Enum);c$.getCallback=$_M(c$,"getCallback",function(a){a=a.toUpperCase();a=a.substring(0,Math.max(a.indexOf("CALLBACK"),0));for(var b,c=0,d=J.constant.EnumCallback.values();c<d.length&&((b=d[c])||1);c++)if(b.name().equalsIgnoreCase(a))return b;
return null},"~S");c$.getNameList=$_M(c$,"getNameList",function(){if(null==J.constant.EnumCallback.nameList){for(var a=new J.util.SB,b,c=0,d=J.constant.EnumCallback.values();c<d.length&&((b=d[c])||1);c++)a.append(b.name().toLowerCase()).append("Callback;");$t$=J.constant.EnumCallback.nameList=a.toString();J.constant.EnumCallback.prototype.nameList=J.constant.EnumCallback.nameList;$t$}return J.constant.EnumCallback.nameList});c$.nameList=null;Clazz.defineEnumConstant(c$,"ANIMFRAME",0,[]);Clazz.defineEnumConstant(c$,
"APPLETREADY",1,[]);Clazz.defineEnumConstant(c$,"ATOMMOVED",2,[]);Clazz.defineEnumConstant(c$,"CLICK",3,[]);Clazz.defineEnumConstant(c$,"ECHO",4,[]);Clazz.defineEnumConstant(c$,"ERROR",5,[]);Clazz.defineEnumConstant(c$,"EVAL",6,[]);Clazz.defineEnumConstant(c$,"HOVER",7,[]);Clazz.defineEnumConstant(c$,"LOADSTRUCT",8,[]);Clazz.defineEnumConstant(c$,"MEASURE",9,[]);Clazz.defineEnumConstant(c$,"MESSAGE",10,[]);Clazz.defineEnumConstant(c$,"MINIMIZATION",11,[]);Clazz.defineEnumConstant(c$,"PICK",12,[]);
Clazz.defineEnumConstant(c$,"RESIZE",13,[]);Clazz.defineEnumConstant(c$,"SCRIPT",14,[]);Clazz.defineEnumConstant(c$,"SYNC",15,[])}),Clazz.declarePackage("J.util"),Clazz.load(null,"J.util.Escape","java.lang.Character $.Float J.script.SV J.util.BSUtil $.JmolList $.Matrix3f $.Matrix4f $.P3 $.P4 $.Parser $.SB $.TextFormat".split(" "),function(){c$=Clazz.declareType(J.util,"Escape");c$.escapeColor=$_M(c$,"escapeColor",function(a){return"[x"+J.util.Escape.getHexColorFromRGB(a)+"]"},"~N");c$.getHexColorFromRGB=
$_M(c$,"getHexColorFromRGB",function(a){if(0==a)return null;var b="00"+Integer.toHexString(a>>16&255),b=b.substring(b.length-2),c="00"+Integer.toHexString(a>>8&255),c=c.substring(c.length-2);a="00"+Integer.toHexString(a&255);a=a.substring(a.length-2);return b+c+a},"~N");c$.eP=$_M(c$,"eP",function(a){return null==a?"null":"{"+a.x+" "+a.y+" "+a.z+"}"},"J.util.Tuple3f");c$.matrixToScript=$_M(c$,"matrixToScript",function(a){return J.util.TextFormat.replaceAllCharacters(a.toString(),"\n\r ","").$replace("\t",
" ")},"~O");c$.eP4=$_M(c$,"eP4",function(a){return"{"+a.x+" "+a.y+" "+a.z+" "+a.w+"}"},"J.util.P4");c$.e=$_M(c$,"e",function(a){return null==a?"null":Clazz.instanceOf(a,String)?J.util.Escape.eS(a):Clazz.instanceOf(a,J.util.JmolList)?J.util.Escape.eV(a):Clazz.instanceOf(a,J.util.BS)?J.util.Escape.eBS(a):Clazz.instanceOf(a,J.util.Tuple3f)?J.util.Escape.eP(a):Clazz.instanceOf(a,J.util.P4)?J.util.Escape.eP4(a):J.util.Escape.isAS(a)?J.util.Escape.eAS(a,!0):J.util.Escape.isAI(a)?J.util.Escape.eAI(a):J.util.Escape.isAF(a)?
J.util.Escape.eAF(a):J.util.Escape.isAD(a)?J.util.Escape.eAD(a):J.util.Escape.isAP(a)?J.util.Escape.eAP(a):Clazz.instanceOf(a,J.util.Matrix3f)||Clazz.instanceOf(a,J.util.Matrix4f)?J.util.TextFormat.simpleReplace(a.toString(),"\t",",\t"):Clazz.instanceOf(a,J.util.AxisAngle4f)?"{"+a.x+" "+a.y+" "+a.z+" "+180*a.angle/3.141592653589793+"}":Clazz.instanceOf(a,java.util.Map)?J.util.Escape.escapeMap(a):J.util.Escape.isAII(a)||J.util.Escape.isAFF(a)||J.util.Escape.isAFFF(a)?J.util.Escape.toJSON(null,a):a.toString()},
"~O");c$.isAS=$_M(c$,"isAS",function(a){return Clazz.isAS(a)},"~O");c$.isASS=$_M(c$,"isASS",function(a){return Clazz.isASS(a)},"~O");c$.isAP=$_M(c$,"isAP",function(a){return Clazz.isAP(a)},"~O");c$.isAF=$_M(c$,"isAF",function(a){return Clazz.instanceOf(a,Array)},"~O");c$.isAFloat=$_M(c$,"isAFloat",function(a){return Clazz.instanceOf(a,Array)},"~O");c$.isAV=$_M(c$,"isAV",function(a){return Clazz.instanceOf(a,Array)},"~O");c$.isAD=$_M(c$,"isAD",function(a){return Clazz.instanceOf(a,Array)},"~O");c$.isAB=
$_M(c$,"isAB",function(a){return Clazz.instanceOf(a,Array)},"~O");c$.isAI=$_M(c$,"isAI",function(a){return Clazz.instanceOf(a,Array)},"~O");c$.isAII=$_M(c$,"isAII",function(a){return Clazz.isAII(a)},"~O");c$.isAFF=$_M(c$,"isAFF",function(a){return Clazz.isAFF(a)},"~O");c$.isAFFF=$_M(c$,"isAFFF",function(a){return Clazz.isAFFF(a)},"~O");c$.eS=$_M(c$,"eS",function(a){if(null==a||0==a.length)return'""';for(var b=!1,c=0;10>c;c+=2)if(0<=a.indexOf('\\\\\tt\rr\nn""'.charAt(c))){b=!0;break}if(b)for(;10>c;){for(var b=
-1,d='\\\\\tt\rr\nn""'.charAt(c++),e='\\\\\tt\rr\nn""'.charAt(c++),f=new J.util.SB,g=0;0<=(b=a.indexOf(d,b+1));)f.append(a.substring(g,b)).appendC("\\").appendC(e),g=b+1;f.append(a.substring(g,a.length));a=f.toString()}for(c=a.length;0<=--c;)127<a.charCodeAt(c)&&(a=a.substring(0,c)+J.util.Escape.unicode(a.charAt(c))+a.substring(c+1));return'"'+a+'"'},"~S");c$.unicode=$_M(c$,"unicode",($fz=function(a){a="0000"+Integer.toHexString(a.charCodeAt(0));return"\\u"+a.substring(a.length-4)},$fz.isPrivate=
!0,$fz),"~S");c$.eV=$_M(c$,"eV",function(a){if(null==a)return J.util.Escape.eS("");var b=new J.util.SB;b.append("[");for(var c=0;c<a.size();c++)0<c&&b.append(", "),b.append(J.util.Escape.escapeNice(a.get(c).asString()));b.append("]");return b.toString()},"J.util.JmolList");c$.escapeMap=$_M(c$,"escapeMap",function(a){var b=new J.util.SB;b.append("{ ");var c="",d;for(a=a.entrySet().iterator();a.hasNext()&&((d=a.next())||1);){var e=d.getKey();b.append(c).append(J.util.Escape.eS(e)).appendC(":");c=d.getValue();
Clazz.instanceOf(c,J.script.SV)||(c=J.script.SV.getVariable(c));b.append(c.escape());c=","}b.append(" }");return b.toString()},"java.util.Map");c$.escapeFloatA=$_M(c$,"escapeFloatA",function(a,b){if(b)return J.util.Escape.toJSON(null,a);for(var c=new J.util.SB,d=0;d<a.length;d++)0<d&&c.appendC("\n"),c.appendF(a[d]);return c.toString()},"~A,~B");c$.escapeFloatAA=$_M(c$,"escapeFloatAA",function(a,b){for(var c=new J.util.SB,d=b?";\n":"\n",e=0;e<a.length;e++)if(null!=a[e]){0<e&&c.append(d);for(var f=
0;f<a[e].length;f++)c.appendF(a[e][f]).appendC("\t")}return c.toString()},"~A,~B");c$.escapeFloatAAA=$_M(c$,"escapeFloatAAA",function(a,b){var c=new J.util.SB,d=b?";\n":"\n";if(null==a[0]||null==a[0][0])return"0 0 0"+d;c.appendI(a.length).append(" ").appendI(a[0].length).append(" ").appendI(a[0][0].length);for(var e=0;e<a.length;e++)if(null!=a[e]){c.append(d);for(var f=0;f<a[e].length;f++)if(null!=a[e][f]){c.append(d);for(var g=0;g<a[e][f].length;g++)c.appendF(a[e][f][g]).appendC("\t")}}return c.toString()},
"~A,~B");c$.eAS=$_M(c$,"eAS",function(a,b){if(null==a)return J.util.Escape.eS("");var c=new J.util.SB;c.append("[");for(var d=0;d<a.length;d++)0<d&&c.append(", "),c.append(b?J.util.Escape.escapeNice(a[d]):J.util.Escape.eS(a[d]));c.append("]");return c.toString()},"~A,~B");c$.eAI=$_M(c$,"eAI",function(a){if(null==a)return J.util.Escape.eS("");var b=new J.util.SB;b.append("[");for(var c=0;c<a.length;c++)0<c&&b.append(", "),b.appendI(a[c]);return b.append("]").toString()},"~A");c$.eAD=$_M(c$,"eAD",function(a){if(null==
a)return J.util.Escape.eS("");var b=new J.util.SB;b.append("[");for(var c=0;c<a.length;c++)0<c&&b.append(", "),b.appendD(a[c]);return b.append("]").toString()},"~A");c$.eAF=$_M(c$,"eAF",function(a){if(null==a)return J.util.Escape.eS("");var b=new J.util.SB;b.append("[");for(var c=0;c<a.length;c++)0<c&&b.append(", "),b.appendF(a[c]);return b.append("]").toString()},"~A");c$.eAP=$_M(c$,"eAP",function(a){if(null==a)return J.util.Escape.eS("");var b=new J.util.SB;b.append("[");for(var c=0;c<a.length;c++)0<
c&&b.append(", "),b.append(J.util.Escape.eP(a[c]));return b.append("]").toString()},"~A");c$.escapeNice=$_M(c$,"escapeNice",($fz=function(a){if(null==a)return"null";var b=J.util.Parser.parseFloatStrict(a);return Float.isNaN(b)?J.util.Escape.eS(a):a},$fz.isPrivate=!0,$fz),"~S");c$.unescapePointOrBitsetOrMatrixOrArray=$_M(c$,"unescapePointOrBitsetOrMatrixOrArray",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=$_M(c$,"isStringArray",function(a){return a.startsWith("({")&&0==a.lastIndexOf("({")&&a.indexOf("})")==a.length-2},"~S");c$.uP=$_M(c$,"uP",function(a){if(null==a||0==a.length)return a;var b=a.$replace("\n"," ").trim();if("{"!=b.charAt(0)||"}"!=b.charAt(b.length-1))return a;for(var c=Clazz.newFloatArray(5,0),d=0,b=b.substring(1,b.length-1),e=Clazz.newIntArray(1,
0);5>d;d++)if(c[d]=J.util.Parser.parseFloatNext(b,e),Float.isNaN(c[d])){if(e[0]>=b.length||","!=b.charAt(e[0]))break;e[0]++;d--}return 3==d?J.util.P3.new3(c[0],c[1],c[2]):4==d?J.util.P4.new4(c[0],c[1],c[2],c[3]):a},"~S");c$.uB=$_M(c$,"uB",function(a){var b,c;if(null==a||4>(c=(a=a.trim()).length)||a.equalsIgnoreCase("({null})")||"("!=(b=a.charAt(0))&&"["!=b||a.charAt(c-1)!=("("==b?")":"]")||"{"!=a.charAt(1)||a.indexOf("}")!=c-2)return null;for(var d=c-=2;2<=--d;)if(!Character.isDigit(b=a.charAt(d))&&
" "!=b&&"\t"!=b&&":"!=b)return null;for(var e=c;Character.isDigit(a.charAt(--e)););if(++e==c)e=0;else try{e=Integer.parseInt(a.substring(e,c))}catch(f){if(Clazz.exceptionOf(f,NumberFormatException))return null;throw f;}for(var g=J.util.BSUtil.newBitSet(e),h=e=-1,k=-2,d=2;d<=c;d++)switch(b=a.charAt(d)){case "\t":case " ":case "}":if(0>k)break;if(k<e)return null;e=k;0>h&&(h=k);g.setBits(h,k+1);h=-1;k=-2;break;case ":":h=e=k;k=-2;break;default:Character.isDigit(b)&&(0>k&&(k=0),k=(k<<3)+(k<<1)+(b.charCodeAt(0)-
48))}return 0<=h?null:g},"~S");c$.unescapeMatrix=$_M(c$,"unescapeMatrix",function(a){if(null==a||0==a.length)return a;var b=a.$replace("\n"," ").trim();if(0!=b.lastIndexOf("[[")||b.indexOf("]]")!=b.length-2)return a;for(var c=Clazz.newFloatArray(16,0),b=b.substring(2,b.length-2).$replace("["," ").$replace("]"," ").$replace(","," "),d=Clazz.newIntArray(1,0),e=0;16>e&&!(c[e]=J.util.Parser.parseFloatNext(b,d),Float.isNaN(c[e]));e++);return!Float.isNaN(J.util.Parser.parseFloatNext(b,d))?a:9==e?J.util.Matrix3f.newA(c):
16==e?J.util.Matrix4f.newA(c):a},"~S");c$.eBS=$_M(c$,"eBS",function(a){return J.util.Escape.eB(a,"(",")")},"J.util.BS");c$.eBond=$_M(c$,"eBond",function(a){return J.util.Escape.eB(a,"[","]")},"J.util.BS");c$.eB=$_M(c$,"eB",($fz=function(a,b,c){if(null==a)return b+"{}"+c;var d=new J.util.SB;d.append(b+"{");b=a.length();for(var e=-1,f=-2,g=-1;++g<=b;){var h=a.get(g);if(g==b||0<=e&&!h){0<=e&&f!=e&&d.append((f==e-1?" ":":")+e);if(g==b)break;e=-1}a.get(g)&&(0>e&&(d.append((-2==f?"":" ")+g),f=g),e=g)}d.append("}").appendC(c);
return d.toString()},$fz.isPrivate=!0,$fz),"J.util.BS,~S,~S");c$.packageJSONSb=$_M(c$,"packageJSONSb",($fz=function(a,b){return J.util.Escape.packageJSON(a,b.toString())},$fz.isPrivate=!0,$fz),"~S,J.util.SB");c$.packageJSON=$_M(c$,"packageJSON",($fz=function(a,b){return null==a?b:'"'+a+'": '+b},$fz.isPrivate=!0,$fz),"~S,~S");c$.fixString=$_M(c$,"fixString",($fz=function(a){if(null==a||0==a.indexOf('{"'))return a;a=J.util.TextFormat.simpleReplace(a,'"',"''");a=J.util.TextFormat.simpleReplace(a,"\n",
" | ");return'"'+a+'"'},$fz.isPrivate=!0,$fz),"~S");c$.toJSON=$_M(c$,"toJSON",function(a,b){var c=new J.util.SB,d="";if(null==b)return J.util.Escape.packageJSON(a,Clazz.castNullAs("String"));if(Clazz.instanceOf(b,Integer)||Clazz.instanceOf(b,Float)||Clazz.instanceOf(b,Double))return J.util.Escape.packageJSON(a,b.toString());if(Clazz.instanceOf(b,String))return J.util.Escape.packageJSON(a,J.util.Escape.fixString(b));if(J.util.Escape.isAS(b)){c.append("[");for(var e=b.length,f=0;f<e;f++)c.append(d).append(J.util.Escape.fixString(b[f])),
d=",";c.append("]");return J.util.Escape.packageJSONSb(a,c)}if(J.util.Escape.isAI(b)){c.append("[");e=b.length;for(f=0;f<e;f++)c.append(d).appendI(b[f]),d=",";c.append("]");return J.util.Escape.packageJSONSb(a,c)}if(J.util.Escape.isAF(b)){c.append("[");e=b.length;for(f=0;f<e;f++)c.append(d).appendF(b[f]),d=",";c.append("]");return J.util.Escape.packageJSONSb(a,c)}if(J.util.Escape.isAD(b)){c.append("[");e=b.length;for(f=0;f<e;f++)c.append(d).appendD(b[f]),d=",";c.append("]");return J.util.Escape.packageJSONSb(a,
c)}if(J.util.Escape.isAP(b)){c.append("[");e=b.length;for(f=0;f<e;f++)c.append(d),J.util.Escape.addJsonTuple(c,b[f]),d=",";c.append("]");return J.util.Escape.packageJSONSb(a,c)}if(J.util.Escape.isASS(b)){c.append("[");e=b.length;for(f=0;f<e;f++)c.append(d).append(J.util.Escape.toJSON(null,b[f])),d=",";c.append("]");return J.util.Escape.packageJSONSb(a,c)}if(J.util.Escape.isAII(b)){c.append("[");e=b.length;for(f=0;f<e;f++)c.append(d).append(J.util.Escape.toJSON(null,b[f])),d=",";c.append("]");return J.util.Escape.packageJSONSb(a,
c)}if(J.util.Escape.isAFF(b)){c.append("[");e=b.length;for(f=0;f<e;f++)c.append(d).append(J.util.Escape.toJSON(null,b[f])),d=",";c.append("]");return J.util.Escape.packageJSONSb(a,c)}if(J.util.Escape.isAFFF(b)){c.append("[");e=b.length;for(f=0;f<e;f++)c.append(d).append(J.util.Escape.toJSON(null,b[f])),d=",";c.append("]");return J.util.Escape.packageJSONSb(a,c)}if(Clazz.instanceOf(b,J.util.JmolList)){c.append("[ ");e=b.size();for(f=0;f<e;f++)c.append(d).append(J.util.Escape.toJSON(null,b.get(f))),
d=",";c.append(" ]");return J.util.Escape.packageJSONSb(a,c)}if(Clazz.instanceOf(b,J.util.Matrix4f)){d=Clazz.newFloatArray(4,0);c.appendC("[");for(f=0;4>f;f++)0<f&&c.appendC(","),b.getRow(f,d),c.append(J.util.Escape.toJSON(null,d));c.appendC("]");return J.util.Escape.packageJSONSb(a,c)}if(Clazz.instanceOf(b,J.util.Matrix3f)){d=Clazz.newFloatArray(3,0);c.appendC("[");for(f=0;3>f;f++)0<f&&c.appendC(","),b.getRow(f,d),c.append(J.util.Escape.toJSON(null,d));c.appendC("]");return J.util.Escape.packageJSONSb(a,
c)}if(Clazz.instanceOf(b,J.util.Tuple3f))return J.util.Escape.addJsonTuple(c,b),J.util.Escape.packageJSONSb(a,c);if(Clazz.instanceOf(b,J.util.AxisAngle4f))return c.append("[").appendF(b.x).append(",").appendF(b.y).append(",").appendF(b.z).append(",").appendF(180*b.angle/3.141592653589793).append("]"),J.util.Escape.packageJSONSb(a,c);if(Clazz.instanceOf(b,J.util.P4))return c.append("[").appendF(b.x).append(",").appendF(b.y).append(",").appendF(b.z).append(",").appendF(b.w).append("]"),J.util.Escape.packageJSONSb(a,
c);if(Clazz.instanceOf(b,java.util.Map)){c.append("{ ");for(f=b.keySet().iterator();f.hasNext();)e=f.next(),c.append(d).append(J.util.Escape.packageJSON(e,J.util.Escape.toJSON(null,b.get(e)))),d=",";c.append(" }");return J.util.Escape.packageJSONSb(a,c)}return J.util.Escape.packageJSON(a,J.util.Escape.fixString(b.toString()))},"~S,~O");c$.addJsonTuple=$_M(c$,"addJsonTuple",($fz=function(a,b){a.append("[").appendF(b.x).append(",").appendF(b.y).append(",").appendF(b.z).append("]")},$fz.isPrivate=!0,
$fz),"J.util.SB,J.util.Tuple3f");c$.toReadable=$_M(c$,"toReadable",function(a,b){var c=new J.util.SB,d="";if(null==b)return"null";if(Clazz.instanceOf(b,String))return J.util.Escape.packageReadable(a,null,J.util.Escape.eS(b));if(J.util.Escape.isAS(b)){c.append("[");for(var e=b.length,f=0;f<e;f++)c.append(d).append(J.util.Escape.eS(b[f])),d=",";c.append("]");return J.util.Escape.packageReadableSb(a,"String["+e+"]",c)}if(J.util.Escape.isAI(b)){c.append("[");e=b.length;for(f=0;f<e;f++)c.append(d).appendI(b[f]),
d=",";c.append("]");return J.util.Escape.packageReadableSb(a,"int["+e+"]",c)}if(J.util.Escape.isAF(b)){c.append("[");e=b.length;for(f=0;f<e;f++)c.append(d).appendF(b[f]),d=",";c.append("]");return J.util.Escape.packageReadableSb(a,"float["+e+"]",c)}if(J.util.Escape.isAP(b)){c.append("[");e=b.length;for(f=0;f<e;f++)c.append(d).append(J.util.Escape.eP(b[f])),d=",";c.append("]");return J.util.Escape.packageReadableSb(a,"point3f["+e+"]",c)}if(J.util.Escape.isASS(b)){c.append("[");e=b.length;for(f=0;f<
e;f++)c.append(d).append(J.util.Escape.toReadable(null,b[f])),d=",\n";c.append("]");return J.util.Escape.packageReadableSb(a,"String["+e+"][]",c)}if(J.util.Escape.isAII(b)){c.append("[");e=b.length;for(f=0;f<e;f++)c.append(d).append(J.util.Escape.toReadable(null,b[f])),d=",";c.append("]");return J.util.Escape.packageReadableSb(a,"int["+e+"][]",c)}if(J.util.Escape.isAFF(b)){c.append("[\n");e=b.length;for(f=0;f<e;f++)c.append(d).append(J.util.Escape.toReadable(null,b[f])),d=",\n";c.append("]");return J.util.Escape.packageReadableSb(a,
"float[][]",c)}if(Clazz.instanceOf(b,J.util.JmolList)){e=b.size();for(f=0;f<e;f++)c.append(J.util.Escape.toReadable(a+"["+(f+1)+"]",b.get(f)));return J.util.Escape.packageReadableSb(a,"List["+e+"]",c)}if(Clazz.instanceOf(b,J.util.Matrix3f)||Clazz.instanceOf(b,J.util.Tuple3f)||Clazz.instanceOf(b,J.util.P4)||Clazz.instanceOf(b,J.util.AxisAngle4f))return c.append(J.util.Escape.e(b)),J.util.Escape.packageReadableSb(a,null,c);if(Clazz.instanceOf(b,java.util.Map)){for(d=b.keySet().iterator();d.hasNext();)e=
d.next(),c.append(J.util.Escape.toReadable((null==a?"":a+".")+e,b.get(e)));return c.toString()}return J.util.Escape.packageReadable(a,null,b.toString())},"~S,~O");c$.packageReadableSb=$_M(c$,"packageReadableSb",($fz=function(a,b,c){return J.util.Escape.packageReadable(a,b,c.toString())},$fz.isPrivate=!0,$fz),"~S,~S,J.util.SB");c$.packageReadable=$_M(c$,"packageReadable",($fz=function(a,b,c){return null==a?(null==b?"":b+"\t")+c:"\n"+a+"\t"+(null==b?"":"*"+b+"\t")+c},$fz.isPrivate=!0,$fz),"~S,~S,~S");
c$.escapeModelFileNumber=$_M(c$,"escapeModelFileNumber",function(a){return""+Clazz.doubleToInt(a/1E6)+"."+a%1E6},"~N");c$.encapsulateData=$_M(c$,"encapsulateData",function(a,b,c){return'  DATA "'+a+'"\n'+(2==c?J.util.Escape.escapeFloatAA(b,!0)+";\n":3==c?J.util.Escape.escapeFloatAAA(b,!0)+";\n":b)+'    END "'+a+'";\n'},"~S,~O,~N");c$.unescapeUnicode=$_M(c$,"unescapeUnicode",function(a){for(var b=a.length,c=J.util.SB.newN(b),d=0;d<b;){var e=a.charAt(d++);if("\\"==e&&d<b)switch(e=a.charAt(d++),e){case "u":if(d<
b){for(var e=0,f=4;0<=--f&&d<b;){var g=a.charAt(d),g=J.util.Escape.getHexitValue(g);if(0>g)break;e<<=4;e+=g;++d}e=String.fromCharCode(e)}}c.appendC(e)}return c.toString()},"~S");c$.getHexitValue=$_M(c$,"getHexitValue",function(a){return"0"<=a&&"9">=a?a.charCodeAt(0)-48:"a"<=a&&"f">=a?10+a.charCodeAt(0)-97:"A"<=a&&"F">=a?10+a.charCodeAt(0)-65:-1},"~S");c$.unescapeStringArray=$_M(c$,"unescapeStringArray",function(a){if(null==a||!a.startsWith("[")||!a.endsWith("]"))return null;var b=new J.util.JmolList,
c=Clazz.newIntArray(1,0);for(c[0]=1;c[0]<a.length;){var d=J.util.Parser.getQuotedStringNext(a,c);if(null==d)return null;for(b.addLast(d);c[0]<a.length&&'"'!=a.charAt(c[0]);)c[0]++}return b.toArray(Array(b.size()))},"~S");c$.escapeUrl=$_M(c$,"escapeUrl",function(a){a=J.util.TextFormat.simpleReplace(a,"\n","");a=J.util.TextFormat.simpleReplace(a,"%","%25");a=J.util.TextFormat.simpleReplace(a,"[","%5B");a=J.util.TextFormat.simpleReplace(a,"]","%5D");return a=J.util.TextFormat.simpleReplace(a," ","%20")},
"~S");Clazz.defineStatics(c$,"escapable",'\\\\\tt\rr\nn""')}),Clazz.declarePackage("J.util"),Clazz.load(null,"J.util.Parser",["java.lang.Float","J.util.ArrayUtil","$.Logger","$.TextFormat"],function(){c$=Clazz.declareType(J.util,"Parser");c$.parseStringInfestedFloatArray=$_M(c$,"parseStringInfestedFloatArray",function(a,b,c){return J.util.Parser.parseFloatArrayBsData(J.util.Parser.getTokens(a),b,c)},"~S,J.util.BS,~A");c$.parseFloatArray=$_M(c$,"parseFloatArray",function(a){return J.util.Parser.parseFloatArrayNext(a,
Clazz.newIntArray(1,0),null,null,null)},"~S");c$.parseFloatArrayNext=$_M(c$,"parseFloatArrayNext",function(a,b,c,d,e){var f=0,g=b[0];0<=g&&(null!=d&&(f=a.indexOf(d,g),0<=f&&(b[0]=f+d.length)),a=a.substring(b[0]),g=null==e?-1:a.indexOf(e),0>g?g=a.length:a=a.substring(0,g),b[0]+=g+1,a=J.util.Parser.getTokens(a),null==c&&(c=Clazz.newFloatArray(a.length,0)),f=J.util.Parser.parseFloatArrayBsData(a,null,c));if(null==c)return Clazz.newFloatArray(0,0);for(a=f;a<c.length;a++)c[a]=NaN;return c},"~S,~A,~A,~S,~S");
c$.parseFloatArrayBsData=$_M(c$,"parseFloatArrayBsData",function(a,b,c){for(var d=c.length,e=a.length,f=0,g=0,h=null!=b,k=h?b.nextSetBit(0):0;0<=k&&k<d&&f<e;k=h?b.nextSetBit(k+1):k+1){for(var l;Float.isNaN(l=J.util.Parser.parseFloatStr(a[f++]))&&f<e;);Float.isNaN(l)||(c[g=k]=l);if(f==e)break}return g+1},"~A,J.util.BS,~A");c$.fixDataString=$_M(c$,"fixDataString",($fz=function(a){a=a.$replace(";",0>a.indexOf("\n")?"\n":" ");a=J.util.TextFormat.trim(a,"\n \t");a=J.util.TextFormat.simpleReplace(a,"\n ",
"\n");return a=J.util.TextFormat.simpleReplace(a,"\n\n","\n")},$fz.isPrivate=!0,$fz),"~S");c$.parseFloatArray2d=$_M(c$,"parseFloatArray2d",function(a){a=J.util.Parser.fixDataString(a);for(var b=J.util.Parser.markLines(a,"\n"),c=b.length,d=J.util.ArrayUtil.newFloat2(c),e=0,f=0;e<c;f=b[e++])f=J.util.Parser.getTokens(a.substring(f,b[e])),J.util.Parser.parseFloatArrayData(f,d[e]=Clazz.newFloatArray(f.length,0));return d},"~S");c$.parseFloatArray3d=$_M(c$,"parseFloatArray3d",function(a){a=J.util.Parser.fixDataString(a);
var b=J.util.Parser.markLines(a,"\n"),c=b.length,d=J.util.Parser.getTokens(a.substring(0,b[0]));if(3!=d.length)return Clazz.newFloatArray(0,0,0,0);var e=J.util.Parser.parseInt(d[0]),f=J.util.Parser.parseInt(d[1]),g=J.util.Parser.parseInt(d[2]);if(1>e||1>f||1>g)return Clazz.newFloatArray(1,1,1,0);for(var h=J.util.ArrayUtil.newFloat3(e,f),k=0,l=0,m=1,d=b[0];m<c&&k<e;d=b[m++])d=J.util.Parser.getTokens(a.substring(d,b[m])),d.length<g||(J.util.Parser.parseFloatArrayData(d,h[k][l]=Clazz.newFloatArray(d.length,
0)),++l==f&&(k++,l=0));return k!=e?(J.util.Logger.info("Error reading 3D data -- nX = "+e+", but only "+k+" blocks read"),Clazz.newFloatArray(1,1,1,0)):h},"~S");c$.setSelectedFloats=$_M(c$,"setSelectedFloats",function(a,b,c){for(var d=null==b,e=d?0:b.nextSetBit(0);0<=e&&e<c.length;e=d?e+1:b.nextSetBit(e+1))c[e]=a},"~N,J.util.BS,~A");c$.extractData=$_M(c$,"extractData",function(a,b,c,d){return J.util.Parser.parseFloatArrayFromMatchAndField(a,null,0,0,null,b,c,null,d)},"~S,~N,~N,~N");c$.parseFloatArrayFromMatchAndField=
$_M(c$,"parseFloatArrayFromMatchAndField",function(a,b,c,d,e,f,g,h,k){var l,m=-1,n=null!=e,p=J.util.Parser.markLines(a,0<=a.indexOf("\n")?"\n":";");k=1>=k||k>=p.length?0:k-1;var q=0==k?0:p[k-1],r=p.length;null==h&&(h=Clazz.newFloatArray(r-k,0));for(var s=h.length,t=0>=g?Math.max(f,c):Math.max(f+g,c+d)-1,u=null!=b;k<r;k++){var v=a.substring(q,p[k]).trim(),q=p[k],w=0>=g?J.util.Parser.getTokens(v):null;if(0>=g){if(w.length<t||Float.isNaN(l=J.util.Parser.parseFloatStr(w[f-1])))continue}else if(v.length<
t||Float.isNaN(l=J.util.Parser.parseFloatStr(v.substring(f-1,f+g-1))))continue;if(n){v=J.util.Parser.parseInt(null==w?v.substring(c-1,c+d-1):w[c-1]);if(-2147483648==v||0>v||v>=s||0>(v=e[v]))continue;u&&b.set(v)}else{u?m=b.nextSetBit(m+1):m++;if(0>m||m>=s)break;v=m}h[v]=l}return h},"~S,J.util.BS,~N,~N,~A,~N,~N,~A,~N");c$.parseFloatArrayData=$_M(c$,"parseFloatArrayData",function(a,b){J.util.Parser.parseFloatArrayDataN(a,b,b.length)},"~A,~A");c$.parseFloatArrayDataN=$_M(c$,"parseFloatArrayDataN",function(a,
b,c){for(;0<=--c;)b[c]=c>=a.length?NaN:J.util.Parser.parseFloatStr(a[c])},"~A,~A,~N");c$.parseFloatStr=$_M(c$,"parseFloatStr",function(a){return J.util.Parser.parseFloatNext(a,[0])},"~S");c$.parseFloatStrict=$_M(c$,"parseFloatStrict",function(a){var b=a.length;return 0==b?NaN:J.util.Parser.parseFloatChecked(a,b,[0],!0)},"~S");c$.parseInt=$_M(c$,"parseInt",function(a){return J.util.Parser.parseIntNext(a,[0])},"~S");c$.getTokens=$_M(c$,"getTokens",function(a){return J.util.Parser.getTokensAt(a,0)},
"~S");c$.parseToken=$_M(c$,"parseToken",function(a){return J.util.Parser.parseTokenNext(a,[0])},"~S");c$.parseTrimmed=$_M(c$,"parseTrimmed",function(a){return J.util.Parser.parseTrimmedRange(a,0,a.length)},"~S");c$.parseTrimmedAt=$_M(c$,"parseTrimmedAt",function(a,b){return J.util.Parser.parseTrimmedRange(a,b,a.length)},"~S,~N");c$.parseTrimmedRange=$_M(c$,"parseTrimmedRange",function(a,b,c){var d=a.length;c<d&&(d=c);return d<b?"":J.util.Parser.parseTrimmedChecked(a,b,d)},"~S,~N,~N");c$.markLines=
$_M(c$,"markLines",function(a,b){for(var c=0,d=a.length;0<=--d;)a.charAt(d)==b&&c++;for(var e=Clazz.newIntArray(c+1,0),d=e[c--]=a.length;0<=--d;)a.charAt(d)==b&&(e[c--]=d+1);return e},"~S,~S");c$.parseFloatNext=$_M(c$,"parseFloatNext",function(a,b){var c=a.length;return 0>b[0]||b[0]>=c?NaN:J.util.Parser.parseFloatChecked(a,c,b,!1)},"~S,~A");c$.parseFloatRange=$_M(c$,"parseFloatRange",function(a,b,c){var d=a.length;b>d&&(b=d);return 0>c[0]||c[0]>=b?NaN:J.util.Parser.parseFloatChecked(a,b,c,!1)},"~S,~N,~A");
c$.parseFloatChecked=$_M(c$,"parseFloatChecked",($fz=function(a,b,c,d){var e=!1,f=0,g=c[0];if(d&&a.indexOf("\n")!=a.lastIndexOf("\n"))return NaN;for(;g<b&&J.util.Parser.isWhiteSpace(a,g);)++g;var h=!1;g<b&&"-"==a.charAt(g)&&(++g,h=!0);for(var k=String.fromCharCode(0);g<b&&"0"<=(k=a.charAt(g))&&"9">=k;)f=10*f+(k.charCodeAt(0)-48),++g,e=!0;var l=!1;if("."==k)for(var l=!0,m=0;++g<b&&"0"<=(k=a.charAt(g))&&"9">=k;)m<J.util.Parser.decimalScale.length&&(f+=(k.charCodeAt(0)-48)*J.util.Parser.decimalScale[m]),
++m,e=!0;m=!1;e?h&&(f=-f):f=NaN;if(g<b&&("E"==k||"e"==k||"D"==k)){m=!0;if(++g>=b)return NaN;k=a.charAt(g);if("+"==k&&++g>=b)return NaN;c[0]=g;e=J.util.Parser.parseIntChecked(a,b,c);if(-2147483648==e)return NaN;0<e?f*=e<J.util.Parser.tensScale.length?J.util.Parser.tensScale[e-1]:Math.pow(10,e):0>e&&(f*=-e<J.util.Parser.decimalScale.length?J.util.Parser.decimalScale[-e-1]:Math.pow(10,e))}else c[0]=g;-Infinity==f?f=-3.4028235E38:Infinity==f&&(f=3.4028235E38);return!d||(!m||l)&&J.util.Parser.checkTrailingText(a,
c[0],b)?f:NaN},$fz.isPrivate=!0,$fz),"~S,~N,~A,~B");c$.checkTrailingText=$_M(c$,"checkTrailingText",($fz=function(a,b,c){for(var d;b<c&&(" "==(d=a.charAt(b))||"\t"==d||"\n"==d||";"==d);)++b;return b==c},$fz.isPrivate=!0,$fz),"~S,~N,~N");c$.parseIntNext=$_M(c$,"parseIntNext",function(a,b){var c=a.length;return 0>b[0]||b[0]>=c?-2147483648:J.util.Parser.parseIntChecked(a,c,b)},"~S,~A");c$.parseIntRange=$_M(c$,"parseIntRange",function(a,b,c){var d=a.length;b>d&&(b=d);return 0>c[0]||c[0]>=b?-2147483648:
J.util.Parser.parseIntChecked(a,b,c)},"~S,~N,~A");c$.parseIntChecked=$_M(c$,"parseIntChecked",($fz=function(a,b,c){var d=!1,e=0,f=c[0];if(0>f)return-2147483648;for(var g;f<b&&J.util.Parser.isWhiteSpace(a,f);)++f;var h=!1;f<b&&"-"==a.charAt(f)&&(h=!0,++f);for(;f<b&&"0"<=(g=a.charAt(f))&&"9">=g;)e=10*e+(g.charCodeAt(0)-48),d=!0,++f;d?h&&(e=-e):e=-2147483648;c[0]=f;return e},$fz.isPrivate=!0,$fz),"~S,~N,~A");c$.getTokensAt=$_M(c$,"getTokensAt",function(a,b){if(null==a)return null;var c=a.length;if(0>
b||b>c)return null;var d=J.util.Parser.countTokens(a,b),e=Array(d),f=Clazz.newIntArray(1,0);f[0]=b;for(var g=0;g<d;++g)e[g]=J.util.Parser.parseTokenChecked(a,c,f);return e},"~S,~N");c$.countTokens=$_M(c$,"countTokens",($fz=function(a,b){var c=0;if(null!=a)for(var d=a.length;;){for(;b<d&&J.util.Parser.isWhiteSpace(a,b);)++b;if(b==d)break;++c;do++b;while(b<d&&!J.util.Parser.isWhiteSpace(a,b))}return c},$fz.isPrivate=!0,$fz),"~S,~N");c$.parseTokenNext=$_M(c$,"parseTokenNext",function(a,b){var c=a.length;
return 0>b[0]||b[0]>=c?null:J.util.Parser.parseTokenChecked(a,c,b)},"~S,~A");c$.parseTokenRange=$_M(c$,"parseTokenRange",function(a,b,c){var d=a.length;b>d&&(b=d);return 0>c[0]||c[0]>=b?null:J.util.Parser.parseTokenChecked(a,b,c)},"~S,~N,~A");c$.parseTokenChecked=$_M(c$,"parseTokenChecked",($fz=function(a,b,c){for(var d=c[0];d<b&&J.util.Parser.isWhiteSpace(a,d);)++d;for(var e=d;d<b&&!J.util.Parser.isWhiteSpace(a,d);)++d;c[0]=d;return e==d?null:a.substring(e,d)},$fz.isPrivate=!0,$fz),"~S,~N,~A");c$.parseTrimmedChecked=
$_M(c$,"parseTrimmedChecked",($fz=function(a,b,c){for(;b<c&&J.util.Parser.isWhiteSpace(a,b);)++b;for(c-=1;c>=b&&J.util.Parser.isWhiteSpace(a,c);)--c;return c<b?"":a.substring(b,c+1)},$fz.isPrivate=!0,$fz),"~S,~N,~N");c$.concatTokens=$_M(c$,"concatTokens",function(a,b,c){for(var d="",e="";b<c;b++)b<a.length&&(d+=e+a[b],e=" ");return d},"~A,~N,~N");c$.getQuotedStringAt=$_M(c$,"getQuotedStringAt",function(a,b){return J.util.Parser.getQuotedStringNext(a,[b])},"~S,~N");c$.getQuotedStringNext=$_M(c$,"getQuotedStringNext",
function(a,b){var c=a,d=b[0];if(0>d||0>(d=c.indexOf('"',d)))return"";b[0]=++d;c=c.substring(d);for(d=-1;++d<c.length&&'"'!=c.charAt(d);)"\\"==c.charAt(d)&&d++;b[0]+=d+1;return c.substring(0,d)},"~S,~A");c$.isWhiteSpace=$_M(c$,"isWhiteSpace",($fz=function(a,b){var c;return 0<=b&&(" "==(c=a.charAt(b))||"\t"==c||"\n"==c)},$fz.isPrivate=!0,$fz),"~S,~N");c$.isOneOf=$_M(c$,"isOneOf",function(a,b){return 0>a.indexOf(";")&&0<=(";"+b+";").indexOf(";"+a+";")},"~S,~S");c$.getQuotedAttribute=$_M(c$,"getQuotedAttribute",
function(a,b){var c=a.indexOf(b+"=");return 0>c?null:J.util.Parser.getQuotedStringAt(a,c)},"~S,~S");c$.parseIntRadix=$_M(c$,"parseIntRadix",function(a,b){b=parseInt(a,b);if(isNaN(b))throw new NumberFormatException("Not a Number : "+a);return b},"~S,~N");c$.approx=$_M(c$,"approx",function(a,b){return Math.round(a*b)/b},"~N,~N");c$.dVal=$_M(c$,"dVal",function(a){if(null==a)throw new NumberFormatException("null");var b=parseFloat(a);if(isNaN(b))throw new NumberFormatException("Not a Number : "+a);return b},
"~S");c$.fVal=$_M(c$,"fVal",function(a){return this.dVal(a)},"~S");Clazz.defineStatics(c$,"decimalScale",[0.1,0.01,0.001,1E-4,1E-5,1E-6,1E-7,1E-8],"tensScale",[10,100,1E3,1E4,1E5,1E6])}),Clazz.declarePackage("J.util"),Clazz.load(null,"J.util.TextFormat","java.lang.Boolean $.Character $.Double $.Float J.util.Parser $.SB".split(" "),function(){c$=Clazz.declareType(J.util,"TextFormat");Clazz.prepareFields(c$,function(){J.util.TextFormat.useNumberLocalization[0]=Boolean.TRUE});c$.setUseNumberLocalization=
$_M(c$,"setUseNumberLocalization",function(a){J.util.TextFormat.useNumberLocalization[0]=a?Boolean.TRUE:Boolean.FALSE},"~B");c$.formatDecimal=$_M(c$,"formatDecimal",function(a,b){if(2147483647==b||-Infinity==a||Infinity==a||Float.isNaN(a))return""+a;var c;if(0>b){b=-b;b>J.util.TextFormat.formattingStrings.length&&(b=J.util.TextFormat.formattingStrings.length);if(0==a)return J.util.TextFormat.formattingStrings[b]+"E+0";var d;1>Math.abs(a)?(c=10,d=1E-10*a):(c=-10,d=1E10*a);d=(""+d).toUpperCase();var e=
d.indexOf("E");c=J.util.Parser.parseInt(d.substring(e+1))+c;return 0>e?""+a:J.util.TextFormat.formatDecimal(J.util.Parser.parseFloatStr(d.substring(0,e)),b-1)+"E"+(0<=c?"+":"")+c}b>=J.util.TextFormat.formattingStrings.length&&(b=J.util.TextFormat.formattingStrings.length-1);d=(""+a).toUpperCase();var f=d.startsWith("-");f&&(d=d.substring(1));c=d.indexOf(".");if(0>c)return d+J.util.TextFormat.formattingStrings[b].substring(1);e=d.indexOf("E-");0<e&&(c=J.util.Parser.parseInt(d.substring(e+1)),d="0."+
"0000000000000000000000000000000000000000".substring(0,-c-1)+d.substring(0,1)+d.substring(2,e),c=1);e=d.indexOf("E");0<e&&(c=J.util.Parser.parseInt(d.substring(e+1)),d=d.substring(0,1)+d.substring(2,e)+"0000000000000000000000000000000000000000",d=d.substring(0,c+1)+"."+d.substring(c+1),c=d.indexOf("."));var g=d.length,e=b+c+1;if(e<g&&"5"<=d.charAt(e))return J.util.TextFormat.formatDecimal(a+(f?-1:1)*J.util.TextFormat.formatAdds[b],b);for(var h=J.util.SB.newS(d.substring(0,0==b?c:++c)),e=0;e<b;e++,
c++)c<g?h.appendC(d.charAt(c)):h.appendC("0");d=(f?"-":"")+h;return Boolean.TRUE.equals(J.util.TextFormat.useNumberLocalization[0])?d:d.$replace(",",".")},"~N,~N");c$.formatF=$_M(c$,"formatF",function(a,b,c,d,e){return J.util.TextFormat.formatS(J.util.TextFormat.formatDecimal(a,c),b,0,d,e)},"~N,~N,~N,~B,~B");c$.formatD=$_M(c$,"formatD",function(a,b,c,d,e){return J.util.TextFormat.formatS(J.util.TextFormat.formatDecimal(a,-1-c),b,0,d,e)},"~N,~N,~N,~B,~B,~B");c$.formatS=$_M(c$,"formatS",function(a,
b,c,d,e){if(null==a)return"";var f=a.length;2147483647!=c&&0<c&&c<f?a=a.substring(0,c):0>c&&0<=f+c&&(a=a.substring(f+c+1));c=b-a.length;if(0>=c)return a;b=e&&!d&&"-"==a.charAt(0);e=e?"0":" ";var g=b?"-":e,f=new J.util.SB;d&&f.append(a);for(f.appendC(g);0<--c;)f.appendC(e);d||f.append(b?e+a.substring(1):a);return f.toString()},"~S,~N,~N,~B,~B");c$.formatStringS=$_M(c$,"formatStringS",function(a,b,c){return J.util.TextFormat.formatString(a,b,c,NaN,NaN,!1)},"~S,~S,~S");c$.formatStringF=$_M(c$,"formatStringF",
function(a,b,c){return J.util.TextFormat.formatString(a,b,null,c,NaN,!1)},"~S,~S,~N");c$.formatStringI=$_M(c$,"formatStringI",function(a,b,c){return J.util.TextFormat.formatString(a,b,""+c,NaN,NaN,!1)},"~S,~S,~N");c$.sprintf=$_M(c$,"sprintf",function(a,b,c){if(null==c)return a;var d=b.length;if(d==c.length)try{for(var e=0;e<d;e++)if(null!=c[e])switch(b.charAt(e)){case "s":a=J.util.TextFormat.formatString(a,"s",c[e],NaN,NaN,!0);break;case "f":a=J.util.TextFormat.formatString(a,"f",null,c[e].floatValue(),
NaN,!0);break;case "i":a=J.util.TextFormat.formatString(a,"d",""+c[e],NaN,NaN,!0);a=J.util.TextFormat.formatString(a,"i",""+c[e],NaN,NaN,!0);break;case "d":a=J.util.TextFormat.formatString(a,"e",null,NaN,c[e].doubleValue(),!0);break;case "p":var f=c[e];a=J.util.TextFormat.formatString(a,"p",null,f.x,NaN,!0);a=J.util.TextFormat.formatString(a,"p",null,f.y,NaN,!0);a=J.util.TextFormat.formatString(a,"p",null,f.z,NaN,!0);break;case "q":var g=c[e];a=J.util.TextFormat.formatString(a,"q",null,g.x,NaN,!0);
a=J.util.TextFormat.formatString(a,"q",null,g.y,NaN,!0);a=J.util.TextFormat.formatString(a,"q",null,g.z,NaN,!0);a=J.util.TextFormat.formatString(a,"q",null,g.w,NaN,!0);break;case "S":for(var h=c[e],k=0;k<h.length;k++)a=J.util.TextFormat.formatString(a,"s",h[k],NaN,NaN,!0);break;case "F":for(var l=c[e],k=0;k<l.length;k++)a=J.util.TextFormat.formatString(a,"f",null,l[k],NaN,!0);break;case "I":for(var m=c[e],k=0;k<m.length;k++)a=J.util.TextFormat.formatString(a,"d",""+m[k],NaN,NaN,!0);for(k=0;k<m.length;k++)a=
J.util.TextFormat.formatString(a,"i",""+m[k],NaN,NaN,!0);break;case "D":for(var n=c[e],k=0;k<n.length;k++)a=J.util.TextFormat.formatString(a,"e",null,NaN,n[k],!0)}return J.util.TextFormat.simpleReplace(a,"%%","%")}catch(p){if(!Clazz.exceptionOf(p,Exception))throw p;}System.out.println("TextFormat.sprintf error "+b+" "+a);return J.util.TextFormat.simpleReplace(a,"%","?")},"~S,~S,~A");c$.formatString=$_M(c$,"formatString",($fz=function(a,b,c,d,e,f){if(null==a)return null;if("".equals(a))return"";var g=
b.length;if(0>a.indexOf("%")||0==g||0>a.indexOf(b))return a;var h="",k,l,m;for(k=0;0<=(l=a.indexOf("%",k))&&0<=(m=a.indexOf(b,l+1));)if(k!=l&&(h+=a.substring(k,l)),k=l+1,m>l+6)h+="%";else try{var n=!1;"-"==a.charAt(k)&&(n=!0,++k);var p=!1;"0"==a.charAt(k)&&(p=!0,++k);for(var q,r=0;"0"<=(q=a.charAt(k))&&"9">=q;)r=10*r+(q.charCodeAt(0)-48),++k;var s=2147483647,t=!1;if("."==a.charAt(k)){++k;if("-"==(q=a.charAt(k)))t=!0,++k;if("0"<=(q=a.charAt(k))&&"9">=q)s=q.charCodeAt(0)-48,++k;t&&(s=-s-(null==c?1:
0))}if(a.substring(k,k+g).equals(b)){if(k+=g,Float.isNaN(d)?null!=c?h+=J.util.TextFormat.formatS(c,r,s,n,p):Double.isNaN(e)||(h+=J.util.TextFormat.formatD(e,r,s,n,p,!0)):h+=J.util.TextFormat.formatF(d,r,s,n,p),f)break}else k=l+1,h+="%"}catch(u){if(Clazz.exceptionOf(u,IndexOutOfBoundsException)){k=l;break}else throw u;}return h+=a.substring(k)},$fz.isPrivate=!0,$fz),"~S,~S,~S,~N,~N,~B");c$.formatCheck=$_M(c$,"formatCheck",function(a){if(null==a||0>a.indexOf("p")&&0>a.indexOf("q"))return a;a=J.util.TextFormat.simpleReplace(a,
"%%","\u0001");a=J.util.TextFormat.simpleReplace(a,"%p","%6.2p");a=J.util.TextFormat.simpleReplace(a,"%q","%6.2q");a=J.util.TextFormat.split(a,"%");var b=new J.util.SB;b.append(a[0]);for(var c=1;c<a.length;c++){var d="%"+a[c],e;if(3<=d.length){if(0<=(e=d.indexOf("p")))d=J.util.TextFormat.fdup(d,e,3);if(0<=(e=d.indexOf("q")))d=J.util.TextFormat.fdup(d,e,4)}b.append(d)}return b.toString().$replace("\u0001","%")},"~S");c$.fdup=$_M(c$,"fdup",($fz=function(a,b,c){for(var d,e=0,f=b;1<=--f;)if(!Character.isDigit(d=
a.charAt(f)))switch(d){case ".":if(0!=e++)return a;continue;case "-":if(1!=f)return a;continue;default:return a}d=a.substring(0,b+1);e=new J.util.SB;for(f=0;f<c;f++)e.append(d);e.append(a.substring(b+1));return e.toString()},$fz.isPrivate=!0,$fz),"~S,~N,~N");c$.splitChars=$_M(c$,"splitChars",function(a,b){if(0==a.length)return[];var c=1,d=a.indexOf(b),e,f=b.length;if(0>d||0==f)return e=Array(1),e[0]=a,e;for(var g=a.length-f;0<=d&&d<g;c++)d=a.indexOf(b,d+f);e=Array(c);for(var h=d=0,k=0;0<=(h=a.indexOf(b,
d))&&k+1<c;)e[k++]=a.substring(d,h),d=h+f;a.indexOf(b,g)!=g&&(g+=f);e[k]=a.substring(d,g);return e},"~S,~S");c$.replaceAllCharacters=$_M(c$,"replaceAllCharacters",function(a,b,c){for(var d=b.length;0<=--d;){var e=b.substring(d,d+1);a=J.util.TextFormat.simpleReplace(a,e,c)}return a},"~S,~S,~S");c$.replaceAllCharacter=$_M(c$,"replaceAllCharacter",function(a,b,c){if(null==a)return null;for(var d=b.length;0<=--d;)a=a.$replace(b.charAt(d),c);return a},"~S,~S,~S");c$.simpleReplace=$_M(c$,"simpleReplace",
function(a,b,c){if(null==a||0>a.indexOf(b)||b.equals(c))return a;var d=b.length;if(0==d)return a;for(var e=0<=c.indexOf(b),f;0<=a.indexOf(b);){for(var g=new J.util.SB,h=0;0<=(f=a.indexOf(b,h));)g.append(a.substring(h,f)).append(c),h=f+d;g.append(a.substring(h));a=g.toString();if(e)break}return a},"~S,~S,~S");c$.trim=$_M(c$,"trim",function(a,b){if(0==b.length)return a.trim();for(var c=a.length,d=0;d<c&&0<=b.indexOf(a.charAt(d));)d++;for(c=a.length-1;c>d&&0<=b.indexOf(a.charAt(c));)c--;return a.substring(d,
c+1)},"~S,~S");c$.split=$_M(c$,"split",function(a,b){return J.util.TextFormat.splitChars(a,""+b)},"~S,~S");c$.lFill=$_M(c$,"lFill",function(a,b,c){a.append(c);c=b.length-c.length;0<c&&a.append(b.substring(0,c))},"J.util.SB,~S,~S");c$.rFill=$_M(c$,"rFill",function(a,b,c){var d=b.length-c.length;0<d&&a.append(b.substring(0,d));a.append(c)},"J.util.SB,~S,~S");c$.safeTruncate=$_M(c$,"safeTruncate",function(a,b){-0.001<a&&0.001>a&&(a=0);return(a+"         ").substring(0,b)},"~N,~N");c$.isWild=$_M(c$,"isWild",
function(a){return null!=a&&(0<=a.indexOf("*")||0<=a.indexOf("?"))},"~S");c$.isMatch=$_M(c$,"isMatch",function(a,b,c,d){var e=0,f=b.length,g=a.length;if(0==g||0==f)return g==f||1==f&&"*"==b.charAt(0);if((e=c&&d?"*"==b.charAt(0):!1)&&"*"==b.charAt(f-1))return 3>f||0<=a.indexOf(b.substring(1,f-1));for(var h="????";h.length<a.length;)h+=h;if(c){d&&e&&(b=h+b.substring(1));if("*"==b.charAt(e=b.length-1))b=b.substring(0,e)+h;f=b.length}if(f<g)return!1;for(e=0;f>g;){if(d&&"?"==b.charAt(e))++e;else if("?"!=
b.charAt(e+f-1))return!1;--f}for(c=g;0<=--c;)if(d=b.charAt(e+c),"?"!=d&&d!=a.charAt(c)&&("\u0001"!=d||"?"!=a.charAt(c)))return!1;return!0},"~S,~S,~B,~B");c$.join=$_M(c$,"join",function(a,b,c){if(a.length<c)return null;var d=new J.util.SB;for(d.append(a[c++]);c<a.length;c++)d.appendC(b).append(a[c]);return d.toString()},"~A,~S,~N");c$.replaceQuotedStrings=$_M(c$,"replaceQuotedStrings",function(a,b,c){for(var d=b.size(),e=0;e<d;e++){var f=b.get(e),g=c.get(e);g.equals(f)||(a=J.util.TextFormat.simpleReplace(a,
'"'+f+'"','"'+g+'"'))}return a},"~S,java.util.List,java.util.List");c$.replaceStrings=$_M(c$,"replaceStrings",function(a,b,c){for(var d=b.size(),e=0;e<d;e++){var f=b.get(e),g=c.get(e);g.equals(f)||(a=J.util.TextFormat.simpleReplace(a,f,g))}return a},"~S,java.util.List,java.util.List");c$.ichMathTerminator=$_M(c$,"ichMathTerminator",function(a,b,c){for(var d=1,e="\x00",f="\x00";0<d&&++b<c;){var g=a.charAt(b);if("\x00"!=e)"\\"==f?g="\x00":g==e&&(e="\x00"),f=g;else switch(g){case "'":case '"':e=g;break;
case "{":d++;break;case "}":d--}}return b},"~S,~N,~N");Clazz.defineStatics(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=Array(1)}),Clazz.declarePackage("J.util"),c$=Clazz.decorateAsClass(function(){this.s=this.sb=null;Clazz.instantialize(this,arguments)},J.util,
"SB"),Clazz.makeConstructor(c$,function(){this.s=""}),c$.newN=$_M(c$,"newN",function(){return new J.util.SB},"~N"),c$.newS=$_M(c$,"newS",function(a){var b=new J.util.SB;b.s=a;return b},"~S"),$_M(c$,"append",function(a){this.s+=a;return this},"~S"),$_M(c$,"appendC",function(a){this.s+=a;return this},"~S"),$_M(c$,"appendI",function(a){this.s+=a;return this},"~N"),$_M(c$,"appendB",function(a){this.s+=a;return this},"~B"),$_M(c$,"appendF",function(a){a=""+a;0>a.indexOf(".")&&0>a.indexOf("e")&&(a+=".0");
this.s+=a;return this},"~N"),$_M(c$,"appendD",function(a){a=""+a;0>a.indexOf(".")&&0>a.indexOf("e")&&(a+=".0");this.s+=a;return this},"~N"),$_M(c$,"appendSB",function(a){this.s+=a.s;return this},"J.util.SB"),$_M(c$,"appendO",function(a){this.s+=a.toString();return this},"~O"),$_M(c$,"appendCB",function(a,b,c){for(;0<=--c;)this.s+=a[b++]},"~A,~N,~N"),Clazz.overrideMethod(c$,"toString",function(){return this.s}),$_M(c$,"length",function(){return this.s.length}),$_M(c$,"indexOf",function(a){return this.s.indexOf(a)},
"~S"),$_M(c$,"charAt",function(a){return this.s.charAt(a)},"~N"),$_M(c$,"setLength",function(a){this.s=this.s.substring(0,a)},"~N"),$_M(c$,"lastIndexOf",function(a){return this.s.lastIndexOf(a)},"~S"),$_M(c$,"indexOf2",function(a,b){return this.s.indexOf(a,b)},"~S,~N"),$_M(c$,"substring",function(a){return this.s.substring(a)},"~N"),$_M(c$,"substring2",function(a,b){return this.s.substring(a,b)},"~N,~N"),$_M(c$,"toBytes",function(a,b){0>b&&(b=this.length()-a);for(var c=Clazz.newByteArray(b,0),d=a+
b,e=d-a;--d>=a;)c[--e]=this.charAt(d).charCodeAt(0);return c},"~N,~N"),Clazz.declarePackage("J.script"),Clazz.load(["java.util.Hashtable"],"J.script.T",["java.lang.Boolean","java.util.Arrays","J.util.ArrayUtil","$.JmolList","$.Logger"],function(){c$=Clazz.decorateAsClass(function(){this.tok=0;this.value=null;this.intValue=2147483647;Clazz.instantialize(this,arguments)},J.script,"T");c$.t=$_M(c$,"t",function(a){var b=new J.script.T;b.tok=a;return b},"~N");c$.tv=$_M(c$,"tv",function(a,b,c){a=J.script.T.t(a);
a.intValue=b;a.value=c;return a},"~N,~N,~O");c$.o=$_M(c$,"o",function(a,b){var c=J.script.T.t(a);c.value=b;return c},"~N,~O");c$.n=$_M(c$,"n",function(a,b){var c=J.script.T.t(a);c.intValue=b;return c},"~N,~N");c$.i=$_M(c$,"i",function(a){var b=J.script.T.t(2);b.intValue=a;return b},"~N");c$.tokAttr=$_M(c$,"tokAttr",function(a,b){return(a&b)==(b&b)},"~N,~N");c$.tokAttrOr=$_M(c$,"tokAttrOr",function(a,b,c){return(a&b)==(b&b)||(a&c)==(c&c)},"~N,~N,~N");c$.getPrecedence=$_M(c$,"getPrecedence",function(a){return a>>
4&15},"~N");c$.getMaxMathParams=$_M(c$,"getMaxMathParams",function(a){return a>>9&7},"~N");c$.addToken=$_M(c$,"addToken",function(a,b){J.script.T.tokenMap.put(a,b)},"~S,J.script.T");c$.getTokenFromName=$_M(c$,"getTokenFromName",function(a){return J.script.T.tokenMap.get(a)},"~S");c$.getTokFromName=$_M(c$,"getTokFromName",function(a){a=J.script.T.getTokenFromName(a.toLowerCase());return null==a?0:a.tok},"~S");c$.nameOf=$_M(c$,"nameOf",function(a){for(var b,c=J.script.T.tokenMap.values().iterator();c.hasNext()&&
((b=c.next())||1);)if(b.tok==a)return""+b.value;return"0x"+Integer.toHexString(a)},"~N");Clazz.overrideMethod(c$,"toString",function(){return this.toString2()});$_M(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?"":Clazz.instanceOf(this.value,String)?' value="'+this.value+'"':" value="+
this.value)+"]"});c$.getCommandSet=$_M(c$,"getCommandSet",function(a){var b="",c=new java.util.Hashtable,d=0;a=null==a||0==a.length?null:a.toLowerCase();for(var e=null!=a&&1<a.length,f,p=J.script.T.tokenMap.entrySet().iterator();p.hasNext()&&((f=p.next())||1);){var q=f.getKey(),r=f.getValue();0!=(r.tok&4096)&&((null==a||0==q.indexOf(a))&&(e||r.value.equals(q)))&&c.put(q,Boolean.TRUE)}for(p=c.entrySet().iterator();p.hasNext()&&((f=p.next())||1);)if(q=f.getKey(),"s"!=q.charAt(q.length-1)||!c.containsKey(q.substring(0,
q.length-1)))b+=(0==d++?"":";")+q;return b},"~S");c$.getAtomPropertiesLike=$_M(c$,"getAtomPropertiesLike",function(a){a=a.toLowerCase();for(var b=new J.util.JmolList,c=0==a.length,d,e=J.script.T.tokenMap.entrySet().iterator();e.hasNext()&&((d=e.next())||1);){var f=d.getKey();if("_"!=f.charAt(0)){var p=d.getValue();if(J.script.T.tokAttr(p.tok,1078984704)&&(c||f.toLowerCase().startsWith(a))){if(c||!p.value.toLowerCase().startsWith(a))p=J.script.T.o(p.tok,f);b.addLast(p)}}}return 0==b.size()?null:b},
"~S");c$.getTokensLike=$_M(c$,"getTokensLike",function(a){a=a.equals("setparam")?536870912:a.equals("misc")?1073741824:a.equals("mathfunc")?135266304:4096;for(var b=536870912==a?1610612736:0,c=new J.util.JmolList,d,e=J.script.T.tokenMap.entrySet().iterator();e.hasNext()&&((d=e.next())||1);){var f=d.getKey(),p=d.getValue();J.script.T.tokAttr(p.tok,a)&&(0==b||!J.script.T.tokAttr(p.tok,b))&&c.addLast(f)}d=c.toArray(Array(c.size()));java.util.Arrays.sort(d);return d},"~S");c$.getSettableTokFromString=
$_M(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=$_M(c$,"completeCommand",function(a,b,c,d,e){null==a?a=J.script.T.tokenMap:c=!1;var f=new J.util.JmolList;d=d.toLowerCase();var p;for(a=a.keySet().iterator();a.hasNext()&&((p=a.next())||1);)if(p.startsWith(d)){var q=J.script.T.getTokFromName(p);(c?J.script.T.tokAttr(q,4096):b?J.script.T.tokAttr(q,536870912)&&!J.script.T.tokAttr(q,
1610612736):1)&&f.addLast(p)}return J.util.ArrayUtil.sortedItem(f,e)},"java.util.Map,~B,~B,~S,~N");c$.getParamType=$_M(c$,"getParamType",function(a){return!J.script.T.tokAttr(a,536870912)?0:a&662700032},"~N");c$.getTokensType=$_M(c$,"getTokensType",function(a,b){for(var c,d=J.script.T.tokenMap.entrySet().iterator();d.hasNext()&&((c=d.next())||1);){var e=c.getValue();J.script.T.tokAttr(e.tok,b)&&a.put(c.getKey(),c.getValue())}},"java.util.Map,~N");c$.isIDcmd=$_M(c$,"isIDcmd",function(a){switch(a){case 135180:case 135176:case 135174:case 135188:case 135402505:return!0;
default:return!1}},"~N");Clazz.defineStatics(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,"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,"pop",266278,"process",102439,"push",266280,
"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,"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,"configuration",1095766022,"elemisono",1095761927,"elemno",1095763976,"formalcharge",1632634889,"groupid",1095761930,"groupindex",1095761931,"model",1095766028,"modelindex",1095761933,"molecule",1095761934,"polymer",1095761935,"polymerlength",1095761936,"resno",1095761937,"site",1095761938,"strucno",1095761939,"valence",1095763988,"adpmax",1112539137,"adpmin",
1112539138,"covalent",1112539139,"eta",1112539140,"mass",1112539141,"omega",1112539142,"phi",1112539143,"psi",1112539144,"screenx",1112539145,"screeny",1112539146,"screenz",1112539147,"straightness",1112539148,"surfacedistance",1112539149,"theta",1112539150,"unitx",1112539151,"unity",1112539152,"unitz",1112539153,"atomx",1112541185,"atomy",1112541186,"atomz",1112541187,"fracx",1112541188,"fracy",1112541189,"fracz",1112541190,"fux",1112541191,"fuy",1112541192,"fuz",1112541193,"hydrophobic",1114638346,
"ionic",1112541195,"partialcharge",1112541196,"property",1716520973,"selected",1114638350,"temperature",1112541199,"vanderwaals",1649412112,"vectorscale",1649410065,"vibx",1112541202,"viby",1112541203,"vibz",1112541204,"x",1112541205,"y",1112541206,"z",1112541207,"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",135270410,"label",1826248715,"helix",137363468,"measure",1746538509,"now",135266318,"plane",135266319,"point",135266320,"quaternion",135270417,"sort",1276117010,"count",1276117011,"within",135266324,"write",135270421,"cache",135270422,"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,"split",1276117508,"sub",1276117509,"trim",1276117510,"volume",1313866247,"col",1276117512,"row",1276117513,"cross",135267329,"load",135271426,"random",135267332,"script",135271429,"substructure",1238369286,"search",135267335,"smiles",135267336,"contact",135402505,"add",1276118017,"distance",1276118018,"find",1276118532,
"replace",1276118019,"hkl",135267841,"intersection",135267842,"prompt",135304707,"select",135280132,"bin",1276118529,"symop",1297090050,"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,"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,"nmrurlformat",545259569,"pathforallfiles",545259570,"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",570425356,"ellipsoidaxisdiameter",570425358,"gestureswipefactor",570425359,"hbondsangleminimum",570425360,"hbondsdistancemaximum",570425361,"hoverdelay",570425362,"loadatomdatatolerance",570425363,"minbonddistance",570425364,"minimizationcriterion",570425365,"mousedragfactor",
570425366,"mousewheelfactor",570425367,"multiplebondradiusfactor",570425368,"multiplebondspacing",570425369,"navfps",570425370,"navigationdepth",570425371,"navigationslab",570425372,"navigationspeed",570425374,"navx",570425376,"navy",570425378,"navz",570425380,"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,"ambientpercent",553648130,"animationfps",553648132,"axesmode",553648134,"bondradiusmilliangstroms",553648136,"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",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,"dynamicmeasurements",603979835,"ellipsoidarcs",603979836,"ellipsoidaxes",603979837,"ellipsoidball",603979838,"ellipsoiddots",603979839,"ellipsoidfill",603979840,"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,"logcommands",603979875,"loggestures",603979876,"measureallmodels",603979877,"measurementlabels",603979878,"messagestylechime",603979879,"minimizationrefresh",603979880,"minimizationsilent",603979881,"modelkitmode",603979882,"monitorenergy",603979883,"multiprocessor",603979884,"navigatesurface",603979885,"navigationmode",603979886,"navigationperiodic",603979887,"partialdots",603979888,"pdbaddhydrogens",603979889,"pdbgetheader",603979890,"pdbsequential",603979891,"perspectivedepth",603979892,
"preservestate",603979893,"rangeselected",603979894,"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",603979966,"tracealpha",603979967,"twistedsheets",603979968,"usearcball",603979969,"useminimizationthread",603979970,
"usenumberlocalization",603979972,"vectorsymmetry",603979973,"waitformoveto",603979974,"windowcentered",603979975,"wireframerotation",603979976,"zerobasedxyzrasmol",603979978,"zoomenabled",603979980,"zoomlarge",603979982,"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",1073741860,"barb",1073741861,"backlit",1073741862,"basepair",1073741864,"binary",1073741866,"blockdata",1073741868,"bondset",1073741870,"bottom",1073741871,"brillouin",1073741872,"cancel",1073741874,"cap",1074790451,"cavity",1073741876,"centroid",1073741877,"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",1073741934,"energy",1073741935,"error",1073741936,"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,"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,"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,"translucent",1073742180,"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$.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(135266324),".",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),"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(1095766022),"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(135270410),"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(1095766028),"models",null,"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(135270417),"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(1095761939),"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(135270421),"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(1095761935),"polymers",null,"residue",J.script.T.t(1073742120),"residues",null,"rotation",J.script.T.t(1073742132),"row",J.script.T.t(1276117513),"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,"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(1073741860),"backlit",J.script.T.t(1073741862),"baseModel",J.script.T.t(3145776),"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(135270422),"carbohydrate",J.script.T.t(3145764),"cell",J.script.T.t(1095761925),"chain",J.script.T.t(1087373316),
"chains",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(1112539139),"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(1095763976),"_e",J.script.T.t(1095761927),"error",J.script.T.t(1073741936),"fill",J.script.T.t(1073741938),"find",J.script.T.t(1276118532),"fixedTemperature",J.script.T.t(1073741946),"forcefield",J.script.T.t(545259560),"formalCharge",J.script.T.t(1632634889),
"charge",null,"eta",J.script.T.t(1112539140),"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(1095761930),"_groupID",null,"_g",null,"groupIndex",J.script.T.t(1095761931),"hidden",J.script.T.t(3145770),"highlight",J.script.T.t(536870920),"hkl",J.script.T.t(135267841),"hydrophobic",J.script.T.t(1114638346),"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),"mass",J.script.T.t(1112539141),"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(1095761934),"molecules",null,"modelIndex",J.script.T.t(1095761933),"monomer",J.script.T.t(1073742030),"morph",J.script.T.t(1073742031),"movie",J.script.T.t(1073742032),"mul",J.script.T.t(1276117507),"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),"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(1112539142),"only",J.script.T.t(1073742072),"opaque",J.script.T.t(1073742074),"partialCharge",J.script.T.t(1112541196),"phi",J.script.T.t(1112539143),"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(1095761936),"previous",J.script.T.t(1073742108),"prev",null,"probe",J.script.T.t(1073742109),
"property",J.script.T.t(1716520973),"properties",null,"protein",J.script.T.t(3145744),"psi",J.script.T.t(1112539144),"purine",J.script.T.t(3145746),"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(1095761937),"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),"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(1114638350),"shapely",J.script.T.t(1073742144),"sidechain",J.script.T.t(3145754),"sin",J.script.T.t(135266820),"site",J.script.T.t(1095761938),"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(1276117010),"specialPosition",J.script.T.t(3145772),"sqrt",J.script.T.t(135266822),"split",J.script.T.t(1276117508),"starScale",J.script.T.t(570425403),"stddev",J.script.T.t(192),"straightness",J.script.T.t(1112539148),"structureId",J.script.T.t(1087373324),"supercell",J.script.T.t(1073742163),"sub",J.script.T.t(1276117509),"sum",J.script.T.t(128),"sum2",J.script.T.t(160),"surface",J.script.T.t(3145756),"surfaceDistance",J.script.T.t(1112539149),"symop",J.script.T.t(1297090050),
"sx",J.script.T.t(1112539145),"sy",J.script.T.t(1112539146),"sz",J.script.T.t(1112539147),"sxyz",J.script.T.t(1146095628),"temperature",J.script.T.t(1112541199),"relativeTemperature",null,"theta",J.script.T.t(1112539150),"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(1073742180),"triangles",J.script.T.t(1073742182),"trim",J.script.T.t(1276117510),
"type",J.script.T.t(1141899272),"ux",J.script.T.t(1112539151),"uy",J.script.T.t(1112539152),"uz",J.script.T.t(1112539153),"uxyz",J.script.T.t(1146093582),"user",J.script.T.t(1073742186),"valence",J.script.T.t(1095763988),"vanderWaals",J.script.T.t(1649412112),"vdw",null,"vdwRadius",null,"visible",J.script.T.t(3145774),"volume",J.script.T.t(1313866247),"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(1073741877),"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(1276117512),"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(1276117011),"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(1073741934),"energy",J.script.T.t(1073741935),"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),"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,"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),"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),"nmrUrlFormat",J.script.T.t(545259569),"pathForAllFiles",J.script.T.t(545259570),"picking",J.script.T.t(545259572),"pickingStyle",
J.script.T.t(545259574),"pickLabel",J.script.T.t(545259576),"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(570425356),"ellipsoidAxisDiameter",J.script.T.t(570425358),"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),"mouseDragFactor",J.script.T.t(570425366),"mouseWheelFactor",J.script.T.t(570425367),"navFPS",J.script.T.t(570425370),
"navigationDepth",J.script.T.t(570425371),"navigationSlab",J.script.T.t(570425372),"navigationSpeed",J.script.T.t(570425374),"navX",J.script.T.t(570425376),"navY",J.script.T.t(570425378),"navZ",J.script.T.t(570425380),"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(1649410065),"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(553648158),"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),"dynamicMeasurements",J.script.T.t(603979835),"ellipsoidArcs",J.script.T.t(603979836),"ellipsoidAxes",J.script.T.t(603979837),"ellipsoidBall",J.script.T.t(603979838),"ellipsoidDots",J.script.T.t(603979839),"ellipsoidFill",J.script.T.t(603979840),
"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),"logCommands",J.script.T.t(603979875),
"logGestures",J.script.T.t(603979876),"measureAllModels",J.script.T.t(603979877),"measurementLabels",J.script.T.t(603979878),"measurementNumbers",J.script.T.t(1610612739),"messageStyleChime",J.script.T.t(603979879),"minimizationRefresh",J.script.T.t(603979880),"minimizationSilent",J.script.T.t(603979881),"modelkitMode",J.script.T.t(603979882),"monitorEnergy",J.script.T.t(603979883),"multipleBondRadiusFactor",J.script.T.t(570425368),"multipleBondSpacing",J.script.T.t(570425369),"multiProcessor",J.script.T.t(603979884),
"navigateSurface",J.script.T.t(603979885),"navigationMode",J.script.T.t(603979886),"navigationPeriodic",J.script.T.t(603979887),"partialDots",J.script.T.t(603979888),"pdbAddHydrogens",J.script.T.t(603979889),"pdbGetHeader",J.script.T.t(603979890),"pdbSequential",J.script.T.t(603979891),"perspectiveDepth",J.script.T.t(603979892),"preserveState",J.script.T.t(603979893),"rangeSelected",J.script.T.t(603979894),"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(603979966),"traceAlpha",J.script.T.t(603979967),"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),"zoomLarge",J.script.T.t(603979982),"zShade",J.script.T.t(603979984)],b=null,c,d,e,f=0;f+1<a.length;f+=2)c=a[f],e=c.toLowerCase(),d=a[f+1],null==d&&(d=b),null==d.value&&(d.value=c),null!=J.script.T.tokenMap.get(e)&&J.util.Logger.error("duplicate token definition:"+
e),J.script.T.tokenMap.put(e,d),b=d;a=null}),Clazz.declarePackage("J.util"),Clazz.load(null,"J.util.Tuple3d",["java.lang.Double"],function(){c$=Clazz.decorateAsClass(function(){this.z=this.y=this.x=0;Clazz.instantialize(this,arguments)},J.util,"Tuple3d",null,java.io.Serializable);Clazz.makeConstructor(c$,function(){});$_M(c$,"set",function(a,b,c){this.x=a;this.y=b;this.z=c},"~N,~N,~N");$_M(c$,"setA",function(a){this.x=a[0];this.y=a[1];this.z=a[2]},"~A");$_M(c$,"setT",function(a){this.x=a.x;this.y=
a.y;this.z=a.z},"J.util.Tuple3d");$_M(c$,"add2",function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z},"J.util.Tuple3d,J.util.Tuple3d");$_M(c$,"add",function(a){this.x+=a.x;this.y+=a.y;this.z+=a.z},"J.util.Tuple3d");$_M(c$,"sub2",function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z},"J.util.Tuple3d,J.util.Tuple3d");$_M(c$,"sub",function(a){this.x-=a.x;this.y-=a.y;this.z-=a.z},"J.util.Tuple3d");$_M(c$,"scale",function(a){this.x*=a;this.y*=a;this.z*=a},"~N");$_M(c$,"scaleAdd",function(a,
b,c){this.x=a*b.x+c.x;this.y=a*b.y+c.y;this.z=a*b.z+c.z},"~N,J.util.Tuple3d,J.util.Tuple3d");Clazz.overrideMethod(c$,"hashCode",function(){var a=J.util.Tuple3d.doubleToLongBits0(this.x),b=J.util.Tuple3d.doubleToLongBits0(this.y),c=J.util.Tuple3d.doubleToLongBits0(this.z);return a^a>>32^b^b>>32^c^c>>32});c$.doubleToLongBits0=$_M(c$,"doubleToLongBits0",function(a){return 0==a?0:Double.doubleToLongBits(a)},"~N");Clazz.overrideMethod(c$,"equals",function(a){return!Clazz.instanceOf(a,J.util.Tuple3d)?!1:
this.x==a.x&&this.y==a.y&&this.z==a.z},"~O");Clazz.overrideMethod(c$,"toString",function(){return"("+this.x+", "+this.y+", "+this.z+")"})}),Clazz.declarePackage("J.util"),Clazz.load(["J.util.Tuple3d"],"J.util.Vector3d",null,function(){c$=Clazz.declareType(J.util,"Vector3d",J.util.Tuple3d);$_M(c$,"cross",function(a,b){this.set(a.y*b.z-a.z*b.y,a.z*b.x-a.x*b.z,a.x*b.y-a.y*b.x)},"J.util.Vector3d,J.util.Vector3d");$_M(c$,"normalize",function(){var a=this.length();this.x/=a;this.y/=a;this.z/=a});$_M(c$,
"dot",function(a){return this.x*a.x+this.y*a.y+this.z*a.z},"J.util.Vector3d");$_M(c$,"lengthSquared",function(){return this.x*this.x+this.y*this.y+this.z*this.z});$_M(c$,"length",function(){return Math.sqrt(this.lengthSquared())})}),Clazz.declarePackage("J.util"),Clazz.load(["J.util.Tuple3f"],"J.util.P3",null,function(){c$=Clazz.declareType(J.util,"P3",J.util.Tuple3f);c$.newP=$_M(c$,"newP",function(a){var b=new J.util.P3;b.x=a.x;b.y=a.y;b.z=a.z;return b},"J.util.Tuple3f");c$.new3=$_M(c$,"new3",function(a,
b,c){var d=new J.util.P3;d.x=a;d.y=b;d.z=c;return d},"~N,~N,~N");$_M(c$,"distanceSquared",function(a){var b=this.x-a.x,c=this.y-a.y;a=this.z-a.z;return b*b+c*c+a*a},"J.util.P3");$_M(c$,"distance",function(a){return Math.sqrt(this.distanceSquared(a))},"J.util.P3")}),Clazz.declarePackage("J.script"),Clazz.load(["J.script.T","J.util.P3"],"J.script.SV","java.lang.Boolean $.Float java.util.Arrays $.Collections $.Hashtable J.modelset.Bond J.util.BS $.BSUtil $.Escape $.JmolList $.Measure $.Parser $.SB $.TextFormat".split(" "),
function(){c$=Clazz.decorateAsClass(function(){this.index=2147483647;this.flags=2;this.myName=null;Clazz.isClassDefined("J.script.SV.Sort")||J.script.SV.$SV$Sort$();Clazz.instantialize(this,arguments)},J.script,"SV",J.script.T);c$.newVariable=$_M(c$,"newVariable",function(a,b){var c=new J.script.SV;c.tok=a;c.value=b;return c},"~N,~O");c$.newScriptVariableInt=$_M(c$,"newScriptVariableInt",function(a){var b=new J.script.SV;b.tok=2;b.intValue=a;return b},"~N");c$.newScriptVariableBs=$_M(c$,"newScriptVariableBs",
function(a,b){var c=J.script.SV.newVariable(10,a);0<=b&&(c.index=b);return c},"J.util.BS,~N");c$.newScriptVariableToken=$_M(c$,"newScriptVariableToken",function(a){return J.script.SV.newScriptVariableIntValue(a.tok,a.intValue,a.value)},"J.script.T");c$.newScriptVariableIntValue=$_M(c$,"newScriptVariableIntValue",function(a,b,c){a=J.script.SV.newVariable(a,c);a.intValue=b;return a},"~N,~N,~O");c$.sizeOf=$_M(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));case 6:return a.value.size();default:return 0}},"J.script.T");c$.isVariableType=$_M(c$,"isVariableType",function(a){return Clazz.instanceOf(a,J.script.SV)||Clazz.instanceOf(a,J.util.BS)||Clazz.instanceOf(a,Boolean)||Clazz.instanceOf(a,
Float)||Clazz.instanceOf(a,Integer)||Clazz.instanceOf(a,String)||Clazz.instanceOf(a,J.util.P3)||Clazz.instanceOf(a,J.util.V3)||Clazz.instanceOf(a,J.util.P4)||Clazz.instanceOf(a,J.util.Quaternion)||Clazz.instanceOf(a,java.util.Map)||J.script.SV.isArray(a)},"~O");c$.getVariable=$_M(c$,"getVariable",function(a){return null==a?J.script.SV.newVariable(4,""):Clazz.instanceOf(a,J.script.SV)?a:Clazz.instanceOf(a,Boolean)?J.script.SV.getBoolean(a.booleanValue()):Clazz.instanceOf(a,Integer)?J.script.SV.newScriptVariableInt(a.intValue()):
Clazz.instanceOf(a,Float)?J.script.SV.newVariable(3,a):Clazz.instanceOf(a,String)?(a=J.script.SV.unescapePointOrBitsetAsVariable(a),Clazz.instanceOf(a,J.script.SV)?a:J.script.SV.newVariable(4,a)):Clazz.instanceOf(a,J.util.P3)?J.script.SV.newVariable(8,a):Clazz.instanceOf(a,J.util.V3)?J.script.SV.newVariable(8,J.util.P3.newP(a)):Clazz.instanceOf(a,J.util.BS)?J.script.SV.newVariable(10,a):Clazz.instanceOf(a,J.util.P4)?J.script.SV.newVariable(9,a):Clazz.instanceOf(a,J.util.Quaternion)?J.script.SV.newVariable(9,
a.toPoint4f()):Clazz.instanceOf(a,J.util.Matrix3f)?J.script.SV.newVariable(11,a):Clazz.instanceOf(a,J.util.Matrix4f)?J.script.SV.newVariable(12,a):Clazz.instanceOf(a,java.util.Map)?J.script.SV.getVariableMap(a):Clazz.instanceOf(a,J.util.JmolList)?J.script.SV.getVariableList(a):J.util.Escape.isAV(a)?J.script.SV.getVariableAV(a):J.util.Escape.isAI(a)?J.script.SV.getVariableAI(a):J.util.Escape.isAF(a)?J.script.SV.getVariableAF(a):J.util.Escape.isAD(a)?J.script.SV.getVariableAD(a):J.util.Escape.isAS(a)?
J.script.SV.getVariableAS(a):J.util.Escape.isAP(a)?J.script.SV.getVariableAP(a):J.util.Escape.isAII(a)?J.script.SV.getVariableAII(a):J.util.Escape.isAFF(a)?J.script.SV.getVariableAFF(a):J.util.Escape.isAFloat(a)?J.script.SV.newVariable(13,a):J.script.SV.newVariable(4,J.util.Escape.toReadable(null,a))},"~O");c$.isArray=$_M(c$,"isArray",($fz=function(a){return Clazz.instanceOf(a,Array)},$fz.isPrivate=!0,$fz),"~O");c$.getVariableMap=$_M(c$,"getVariableMap",function(a){for(var b=a,c=b.keySet().iterator();c.hasNext();){if(!Clazz.instanceOf(b.get(c.next()),
J.script.SV)){a=new java.util.Hashtable;for(var d,b=b.entrySet().iterator();b.hasNext()&&((d=b.next())||1);){var c=d.getKey(),e=d.getValue();J.script.SV.isVariableType(e)?a.put(c,J.script.SV.getVariable(e)):a.put(c,J.script.SV.newVariable(4,J.util.Escape.toReadable(null,e)))}}break}return J.script.SV.newVariable(6,a)},"java.util.Map");c$.getVariableList=$_M(c$,"getVariableList",function(a){var b=a.size();if(0<b&&Clazz.instanceOf(a.get(0),J.script.SV))return J.script.SV.newVariable(7,a);for(var c=
new J.util.JmolList,d=0;d<b;d++)c.addLast(J.script.SV.getVariable(a.get(d)));return J.script.SV.newVariable(7,c)},"J.util.JmolList");c$.getVariableAV=$_M(c$,"getVariableAV",function(a){for(var b=new J.util.JmolList,c=0;c<a.length;c++)b.addLast(a[c]);return J.script.SV.newVariable(7,b)},"~A");c$.getVariableAD=$_M(c$,"getVariableAD",function(a){for(var b=new J.util.JmolList,c=0;c<a.length;c++)b.addLast(J.script.SV.newVariable(3,Float.$valueOf(a[c])));return J.script.SV.newVariable(7,b)},"~A");c$.getVariableAS=
$_M(c$,"getVariableAS",function(a){for(var b=new J.util.JmolList,c=0;c<a.length;c++)b.addLast(J.script.SV.newVariable(4,a[c]));return J.script.SV.newVariable(7,b)},"~A");c$.getVariableAP=$_M(c$,"getVariableAP",function(a){for(var b=new J.util.JmolList,c=0;c<a.length;c++)b.addLast(J.script.SV.newVariable(8,a[c]));return J.script.SV.newVariable(7,b)},"~A");c$.getVariableAFF=$_M(c$,"getVariableAFF",function(a){for(var b=new J.util.JmolList,c=0;c<a.length;c++)b.addLast(J.script.SV.getVariableAF(a[c]));
return J.script.SV.newVariable(7,b)},"~A");c$.getVariableAII=$_M(c$,"getVariableAII",function(a){for(var b=new J.util.JmolList,c=0;c<a.length;c++)b.addLast(J.script.SV.getVariableAI(a[c]));return J.script.SV.newVariable(7,b)},"~A");c$.getVariableAF=$_M(c$,"getVariableAF",function(a){for(var b=new J.util.JmolList,c=0;c<a.length;c++)b.addLast(J.script.SV.newVariable(3,Float.$valueOf(a[c])));return J.script.SV.newVariable(7,b)},"~A");c$.getVariableAI=$_M(c$,"getVariableAI",function(a){for(var b=new J.util.JmolList,
c=0;c<a.length;c++)b.addLast(J.script.SV.newVariable(2,Integer.$valueOf(a[c])));return J.script.SV.newVariable(7,b)},"~A");$_M(c$,"setv",function(a,b){this.index=a.index;this.intValue=a.intValue;this.tok=a.tok;this.value=a.value;if(b)switch(this.tok){case 6:this.value=new java.util.Hashtable(a.value);break;case 7:for(var c=new J.util.JmolList,d=a.getList(),e=0;e<d.size();e++)c.addLast(d.get(e));this.value=c}return this},"J.script.SV,~B");$_M(c$,"setName",function(a){this.myName=a;this.flags|=1;return this},
"~S");$_M(c$,"setGlobal",function(){this.flags&=-3;return this});$_M(c$,"canIncrement",function(){return J.script.T.tokAttr(this.flags,1)});$_M(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),Clazz.instanceOf(this.value,Integer)?(this.tok=2,this.intValue=this.value.intValue()):this.tok=3}return!0},"~N");$_M(c$,"asBoolean",function(){return J.script.SV.bValue(this)});
$_M(c$,"asInt",function(){return J.script.SV.iValue(this)});$_M(c$,"asFloat",function(){return J.script.SV.fValue(this)});$_M(c$,"asString",function(){return J.script.SV.sValue(this)});c$.oValue=$_M(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=$_M(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=Clazz.floatToInt(J.script.SV.toFloat(a.value));break;default:a=0}return Integer.$valueOf(a)},"J.script.T");c$.bValue=$_M(c$,"bValue",($fz=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}},$fz.isPrivate=!0,$fz),"J.script.T");c$.iValue=$_M(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 Clazz.floatToInt(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=$_M(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.distance(J.script.SV.pt0);case 9:return J.util.Measure.distanceToPlane(a.value,J.script.SV.pt0);case 11:var b=new J.util.P3;a.value.transform(b);return b.distance(J.script.SV.pt0);case 12:return b=new J.util.P3,a.value.transform(b),b.distance(J.script.SV.pt0);
default:return 0}},"J.script.T");c$.sValue=$_M(c$,"sValue",function(a){if(null==a)return"";var b,c;switch(a.tok){case 1048589:return"true";case 1048588:return"false";case 2:return""+a.intValue;case 10:return b=J.script.SV.bsSelectToken(a),Clazz.instanceOf(a.value,J.modelset.Bond.BondSet)?J.util.Escape.eBond(b):J.util.Escape.eBS(b);case 7:if(c=a.getList(),b=a.intValue,0>=b&&(b=c.size()-b),2147483647!=b)return 1>b||b>c.size()?"":J.script.SV.sValue(c.get(b-1));case 6:return b=new J.util.SB,c=new java.util.Hashtable,
J.script.SV.sValueArray(b,a,c,0,!1),b.toString();case 4:return c=a.value,b=a.intValue,0>=b&&(b=c.length-b),2147483647==b?c:1>b||b>c.length?"":""+c.charAt(b-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=$_M(c$,"sValueArray",($fz=function(a,b,c,d,e){switch(b.tok){case 6:if(c.containsKey(b)){a.append(e?"{}":null==b.myName?"<circular reference>":"<"+b.myName+
">");break}c.put(b,Boolean.TRUE);var f=b.value;b=f.keySet();var g=f.keySet().toArray(Array(b.size()));java.util.Arrays.sort(g);if(e){a.append("{ ");e="";for(b=0;b<g.length;b++){var h=g[b];a.append(e).append(J.util.Escape.eS(h)).appendC(":");J.script.SV.sValueArray(a,f.get(h),c,d+1,!0);e=", "}a.append(" }");break}for(b=0;b<g.length;b++){a.append(g[b]).append("\t:");var h=f.get(g[b]),k=new J.util.SB;J.script.SV.sValueArray(k,h,c,d+1,e);h=k.toString();a.append(0<=h.indexOf("\n")?"\n":"\t");a.append(h).append("\n")}break;
case 7:if(c.containsKey(b)){a.append(e?"[]":null==b.myName?"<circular reference>":"<"+b.myName+">");break}c.put(b,Boolean.TRUE);e&&a.append("[");f=b.getList();for(b=0;b<f.size();b++)e&&0<b&&a.append(","),g=f.get(b),J.script.SV.sValueArray(a,g,c,d+1,e),e||a.append("\n");e&&a.append("]");break;default:if(!e)for(c=0;c<d-1;c++)a.append("\t");a.append(e?b.escape():J.script.SV.sValue(b))}},$fz.isPrivate=!0,$fz),"J.util.SB,J.script.SV,java.util.Map,~N,~B");c$.ptValue=$_M(c$,"ptValue",function(a){switch(a.tok){case 8:return a.value;
case 4:if(a=J.util.Escape.uP(a.value),Clazz.instanceOf(a,J.util.P3))return a}return null},"J.script.SV");c$.pt4Value=$_M(c$,"pt4Value",function(a){switch(a.tok){case 9:return a.value;case 4:a=J.util.Escape.uP(a.value);if(!Clazz.instanceOf(a,J.util.P4))break;return a}return null},"J.script.SV");c$.toFloat=$_M(c$,"toFloat",($fz=function(a){return a.equalsIgnoreCase("true")?1:a.equalsIgnoreCase("false")||0==a.length?0:J.util.Parser.parseFloatStrict(a)},$fz.isPrivate=!0,$fz),"~S");c$.concatList=$_M(c$,
"concatList",function(a,b,c){var d=a.getList(),e=b.getList();if(!c){if(null==e)d.addLast(J.script.SV.newScriptVariableToken(b));else for(c=0;c<e.size();c++)d.addLast(e.get(c));return a}var f=new J.util.JmolList;if(null==d)f.addLast(a);else for(c=0;c<d.size();c++)f.addLast(d.get(c));if(null==e)f.addLast(b);else for(c=0;c<e.size();c++)f.addLast(e.get(c));return J.script.SV.getVariableList(f)},"J.script.SV,J.script.SV,~B");c$.bsSelectToken=$_M(c$,"bsSelectToken",function(a){a=J.script.SV.selectItemTok2(a,
-2147483648);return a.value},"J.script.T");c$.bsSelectVar=$_M(c$,"bsSelectVar",function(a){2147483647==a.index&&(a=J.script.SV.selectItemVar(a));return a.value},"J.script.SV");c$.bsSelectRange=$_M(c$,"bsSelectRange",function(a,b){a=J.script.SV.selectItemTok(a);a=J.script.SV.selectItemTok2(a,0>=b?b:1);a=J.script.SV.selectItemTok2(a,0>=b?2147483646:b);return a.value},"J.script.T,~N");c$.selectItemVar=$_M(c$,"selectItemVar",function(a){return 2147483647!=a.index||7==a.tok&&2147483647==a.intValue?a:J.script.SV.selectItemVar2(a,
-2147483648)},"J.script.SV");c$.selectItemTok=$_M(c$,"selectItemTok",function(a){return J.script.SV.selectItemTok2(a,-2147483648)},"J.script.T");c$.selectItemVar2=$_M(c$,"selectItemVar2",function(a,b){return J.script.SV.selectItemTok2(a,b)},"J.script.SV,~N");c$.selectItemTok2=$_M(c$,"selectItemTok2",function(a,b){switch(a.tok){case 11:case 12:case 10:case 7:case 4:break;default:return a}var c=null,d=null,e=a.intValue;if(2147483647==e)return-2147483648==b&&(b=e),J.script.SV.newScriptVariableIntValue(a.tok,
b,a.value);var f=0,g=Clazz.instanceOf(a,J.script.SV)&&2147483647!=a.index,h=J.script.SV.newScriptVariableIntValue(a.tok,2147483647,null);switch(a.tok){case 10:Clazz.instanceOf(a.value,J.modelset.Bond.BondSet)?(c=new J.modelset.Bond.BondSet(a.value,a.value.getAssociatedAtoms()),f=J.util.BSUtil.cardinalityOf(c)):(c=J.util.BSUtil.copy(a.value),f=g?1:J.util.BSUtil.cardinalityOf(c));break;case 7:f=a.getList().size();break;case 4:d=a.value;f=d.length;break;case 11:f=-3;break;case 12:f=-4}if(0>f){f=-f;if(0<
e&&Math.abs(e)>f)return h=e%10,e=Clazz.doubleToInt((e-h)/10),0<h&&h<=f&&e<=f?J.script.SV.newVariable(3,Float.$valueOf(a.value.getElement(e-1,h-1))):J.script.SV.newVariable(4,"");if(Math.abs(e)>f)return J.script.SV.newVariable(4,"");h=Clazz.newFloatArray(f,0);0>e?a.value.getColumn(-1-e,h):a.value.getRow(e-1,h);return-2147483648==b?J.script.SV.getVariableAF(h):1>b||b>f?J.script.SV.newVariable(4,""):J.script.SV.newVariable(3,Float.$valueOf(h[b-1]))}0>=e&&(e=f+e);1>e&&(e=1);0==b?b=f:0>b&&(b=f+b);b>f?
b=f:b<e&&(b=e);switch(a.tok){case 10:h.value=c;if(g){1<e&&c.clearAll();break}f=0;for(d=c.nextSetBit(0);0<=d;d=c.nextSetBit(d+1))(++f<e||f>b)&&c.clear(d);break;case 4:h.value=1>e||e>f?"":d.substring(e-1,b);break;case 7:if(1>e||e>f||b>f)return J.script.SV.newVariable(4,"");if(b==e)return a.getList().get(e-1);c=new J.util.JmolList;d=a.getList();f=b-e+1;for(g=0;g<f;g++)c.addLast(J.script.SV.newScriptVariableToken(d.get(g+e-1)));h.value=c}return h},"J.script.T,~N");$_M(c$,"setSelectedValue",function(a,
b){if(2147483647==a)return!1;var c;switch(this.tok){case 11:case 12:c=11==this.tok?3:4;if(10<a){var d=a%10,e=Clazz.doubleToInt((a-d)/10);if(0<d&&d<=c&&e<=c)return this.value.setElement(e-1,d-1,J.script.SV.fValue(b)),!0}if(0!=a&&(Math.abs(a)<=c&&7==b.tok)&&(d=b.getList(),d.size()==c)){for(var e=Clazz.newFloatArray(c,0),f=0;f<c;f++)e[f]=J.script.SV.fValue(d.get(f));0<a?11==this.tok?this.value.setRowA(a-1,e):this.value.setRow(a-1,e):11==this.tok?this.value.setColumnA(-1-a,e):this.value.setColumn(-1-
a,e);return!0}break;case 4:c=this.value;d=c.length;0>=a&&(a=d+a);for(0>--a&&(a=0);a>=c.length;)c+=" ";this.value=c.substring(0,a)+J.script.SV.sValue(b)+c.substring(a+1);return!0;case 7:c=this.getList().size();0>=a&&(a=c+a);0>--a&&(a=0);if(c<=a)for(f=c;f<=a;f++)this.getList().addLast(J.script.SV.newVariable(4,""));this.getList().set(a,b);return!0}return!1},"~N,J.script.SV");$_M(c$,"escape",function(){switch(this.tok){case 4:return J.util.Escape.eS(this.value);case 7:case 6:var a=new J.util.SB,b=new java.util.Hashtable;
J.script.SV.sValueArray(a,this,b,0,!0);return a.toString();default:return J.script.SV.sValue(this)}});c$.unescapePointOrBitsetAsVariable=$_M(c$,"unescapePointOrBitsetAsVariable",function(a){if(null==a)return a;var b=null,c=null;if(Clazz.instanceOf(a,J.script.SV))switch(a.tok){case 8:case 9:case 11:case 12:case 10:b=a.value;break;case 4:c=a.value;break;default:c=J.script.SV.sValue(a)}else Clazz.instanceOf(a,String)&&(c=a);if(null!=c&&0==c.length)return c;null==b&&(b=J.util.Escape.unescapePointOrBitsetOrMatrixOrArray(c));
return Clazz.instanceOf(b,J.util.P3)?J.script.SV.newVariable(8,b):Clazz.instanceOf(b,J.util.P4)?J.script.SV.newVariable(9,b):Clazz.instanceOf(b,J.util.BS)?(null!=c&&0==c.indexOf("[{")&&(b=new J.modelset.Bond.BondSet(b)),J.script.SV.newVariable(10,b)):Clazz.instanceOf(b,J.util.Matrix3f)?J.script.SV.newVariable(11,b):Clazz.instanceOf(b,J.util.Matrix4f)?J.script.SV.newVariable(12,b):a},"~O");c$.getBoolean=$_M(c$,"getBoolean",function(a){return J.script.SV.newScriptVariableToken(a?J.script.SV.vT:J.script.SV.vF)},
"~B");c$.sprintf=$_M(c$,"sprintf",function(a,b){if(null==b)return a;var c=0<=a.indexOf("d")||0<=a.indexOf("i")?Clazz.newIntArray(1,0):null,d=0<=a.indexOf("f")?Clazz.newFloatArray(1,0):null,e=0<=a.indexOf("e")?Clazz.newDoubleArray(1,0):null,f=0<=a.indexOf("s"),g=0<=a.indexOf("p")&&8==b.tok,h=0<=a.indexOf("q")&&9==b.tok,k=[c,d,e,null,null,null];if(7!=b.tok)return J.script.SV.sprintf(a,b,k,c,d,e,f,g,h);for(var l=b.getList(),m=Array(l.size()),n=0;n<m.length;n++)m[n]=J.script.SV.sprintf(a,l.get(n),k,c,
d,e,f,g,h);return m},"~S,J.script.SV");c$.sprintf=$_M(c$,"sprintf",($fz=function(a,b,c,d,e,f,g,h,k){null!=d&&(d[0]=J.script.SV.iValue(b));null!=e&&(e[0]=J.script.SV.fValue(b));null!=f&&(f[0]=J.script.SV.fValue(b));g&&(c[3]=J.script.SV.sValue(b));h&&(c[4]=b.value);k&&(c[5]=b.value);return J.util.TextFormat.sprintf(a,"IFDspq",c)},$fz.isPrivate=!0,$fz),"~S,J.script.SV,~A,~A,~A,~A,~B,~B,~B");c$.sprintfArray=$_M(c$,"sprintfArray",function(a){switch(a.length){case 0:return"";case 1:return J.script.SV.sValue(a[0])}var b=
J.util.TextFormat.split(J.util.TextFormat.simpleReplace(J.script.SV.sValue(a[0]),"%%","\u0001"),"%"),c=new J.util.SB;c.append(b[0]);for(var d=1;d<b.length;d++){var e=J.script.SV.sprintf(J.util.TextFormat.formatCheck("%"+b[d]),d<a.length?a[d]:null);if(J.util.Escape.isAS(e))for(var f=0;f<e.length;f++)c.append(e[f]).append("\n");else c.append(e)}return c.toString()},"~A");Clazz.overrideMethod(c$,"toString",function(){return this.toString2()+"["+this.myName+" index ="+this.index+" intValue="+this.intValue+
"]"});c$.getBitSet=$_M(c$,"getBitSet",function(a,b){switch(a.tok){case 10:return J.script.SV.bsSelectVar(a);case 7:for(var c=new J.util.BS,d=a.value,e=0;e<d.size();e++)if(!d.get(e).unEscapeBitSetArray(c)&&b)return null;return c}return b?null:new J.util.BS},"J.script.SV,~B");c$.areEqual=$_M(c$,"areEqual",function(a,b){return null==a||null==b?!1:4==a.tok&&4==b.tok?J.script.SV.sValue(a).equalsIgnoreCase(J.script.SV.sValue(b)):8==a.tok&&8==b.tok||9==a.tok&&9==b.tok?1E-6>a.value.distance(b.value):1E-6>
Math.abs(J.script.SV.fValue(a)-J.script.SV.fValue(b))},"J.script.SV,J.script.SV");$_M(c$,"sortOrReverse",function(a){var b=this.getList();if(null==b||2>b.size())return this;if(-2147483648==a){a=b.size();for(var c=0;c<a;c++){var d=b.get(c);b.set(c,b.get(--a));b.set(a,d)}}else java.util.Collections.sort(this.getList(),Clazz.innerTypeInstance(J.script.SV.Sort,this,null,--a));return this},"~N");$_M(c$,"unEscapeBitSetArray",function(a){switch(this.tok){case 4:var b=J.util.Escape.uB(this.value);if(null==
b)break;a.or(b);return!0;case 10:return a.or(this.value),!0}return!1},"J.util.BS");c$.unEscapeBitSetArray=$_M(c$,"unEscapeBitSetArray",function(a,b){for(var c=new J.util.BS,d=0;d<a.size();d++)if(!a.get(d).unEscapeBitSetArray(c)&&b)return null;return c},"java.util.ArrayList,~B");c$.listValue=$_M(c$,"listValue",function(a){if(7!=a.tok)return[J.script.SV.sValue(a)];a=a.getList();for(var b=Array(a.size()),c=a.size();0<=--c;)b[c]=J.script.SV.sValue(a.get(c));return b},"J.script.T");c$.flistValue=$_M(c$,
"flistValue",function(a,b){if(7!=a.tok)return[J.script.SV.fValue(a)];var c=a.getList(),d;d=Clazz.newFloatArray(Math.max(b,c.size()),0);0==b&&(b=d.length);for(var e=Math.min(c.size(),b);0<=--e;)d[e]=J.script.SV.fValue(c.get(e));return d},"J.script.T,~N");$_M(c$,"toArray",function(){var a,b=null,c=null;switch(this.tok){case 11:b=this.value;a=3;break;case 12:c=this.value;a=4;break;default:return}this.tok=7;for(var d=new J.util.JmolList,e=0;e<a;e++){var f=Clazz.newFloatArray(a,0);null==b?c.getRow(e,f):
b.getRow(e,f);d.set(e,J.script.SV.getVariableAF(f))}this.value=d});$_M(c$,"mapValue",function(a){return 6==this.tok?this.value.get(a):null},"~S");$_M(c$,"getList",function(){return 7==this.tok?this.value:null});c$.$SV$Sort$=function(){Clazz.pu$h();c$=Clazz.decorateAsClass(function(){Clazz.prepareCallback(this,arguments);this.arrayPt=0;Clazz.instantialize(this,arguments)},J.script.SV,"Sort",null,java.util.Comparator);Clazz.makeConstructor(c$,function(a){this.arrayPt=a},"~N");Clazz.overrideMethod(c$,
"compare",function(a,b){if(a.tok!=b.tok){if(3==a.tok||2==a.tok||3==b.tok||2==b.tok){var c=J.script.SV.fValue(a),d=J.script.SV.fValue(b);return c<d?-1:c>d?1:0}if(4==a.tok||4==b.tok)return J.script.SV.sValue(a).compareTo(J.script.SV.sValue(b))}switch(a.tok){case 4:return J.script.SV.sValue(a).compareTo(J.script.SV.sValue(b));case 7:c=a.getList();d=b.getList();if(c.size()!=d.size())return c.size()<d.size()?-1:1;var e=this.arrayPt;0>e&&(e+=c.size());return 0>e||e>=c.size()?0:this.compare(c.get(e),d.get(e));
default:return c=J.script.SV.fValue(a),d=J.script.SV.fValue(b),c<d?-1:c>d?1:0}},"J.script.SV,J.script.SV");c$=Clazz.p0p()};c$.vT=c$.prototype.vT=J.script.SV.newScriptVariableIntValue(1048589,1,"true");c$.vF=c$.prototype.vF=J.script.SV.newScriptVariableIntValue(1048588,0,"false");Clazz.defineStatics(c$,"FLAG_CANINCREMENT",1,"FLAG_LOCALVAR",2);c$.pt0=c$.prototype.pt0=new J.util.P3}),Clazz.declarePackage("J.util"),Clazz.load(null,"J.util.ArrayUtil",["java.util.Arrays"],function(){c$=Clazz.declareType(J.util,
"ArrayUtil");c$.ensureLength=$_M(c$,"ensureLength",function(a,b){return null!=a&&J.util.ArrayUtil.getLength(a)>=b?a:J.util.ArrayUtil.arrayCopyObject(a,b)},"~O,~N");c$.ensureLengthS=$_M(c$,"ensureLengthS",function(a,b){return null!=a&&a.length>=b?a:J.util.ArrayUtil.arrayCopyS(a,b)},"~A,~N");c$.ensureLengthA=$_M(c$,"ensureLengthA",function(a,b){return null!=a&&a.length>=b?a:J.util.ArrayUtil.arrayCopyF(a,b)},"~A,~N");c$.ensureLengthI=$_M(c$,"ensureLengthI",function(a,b){return null!=a&&a.length>=b?a:
J.util.ArrayUtil.arrayCopyI(a,b)},"~A,~N");c$.ensureLengthShort=$_M(c$,"ensureLengthShort",function(a,b){return null!=a&&a.length>=b?a:J.util.ArrayUtil.arrayCopyShort(a,b)},"~A,~N");c$.ensureLengthByte=$_M(c$,"ensureLengthByte",function(a,b){return null!=a&&a.length>=b?a:J.util.ArrayUtil.arrayCopyByte(a,b)},"~A,~N");c$.doubleLength=$_M(c$,"doubleLength",function(a){return J.util.ArrayUtil.arrayCopyObject(a,null==a?16:2*J.util.ArrayUtil.getLength(a))},"~O");c$.doubleLengthS=$_M(c$,"doubleLengthS",
function(a){return J.util.ArrayUtil.arrayCopyS(a,null==a?16:2*a.length)},"~A");c$.doubleLengthF=$_M(c$,"doubleLengthF",function(a){return J.util.ArrayUtil.arrayCopyF(a,null==a?16:2*a.length)},"~A");c$.doubleLengthI=$_M(c$,"doubleLengthI",function(a){return J.util.ArrayUtil.arrayCopyI(a,null==a?16:2*a.length)},"~A");c$.doubleLengthShort=$_M(c$,"doubleLengthShort",function(a){return J.util.ArrayUtil.arrayCopyShort(a,null==a?16:2*a.length)},"~A");c$.doubleLengthByte=$_M(c$,"doubleLengthByte",function(a){return J.util.ArrayUtil.arrayCopyByte(a,
null==a?16:2*a.length)},"~A");c$.doubleLengthBool=$_M(c$,"doubleLengthBool",function(a){return J.util.ArrayUtil.arrayCopyBool(a,null==a?16:2*a.length)},"~A");c$.deleteElements=$_M(c$,"deleteElements",function(a,b,c){if(0==c||null==a)return a;var d=J.util.ArrayUtil.getLength(a);if(b>=d)return a;d-=b+c;0>d&&(d=0);var e=J.util.ArrayUtil.newInstanceO(a,b+d);0<b&&System.arraycopy(a,0,e,0,b);0<d&&System.arraycopy(a,b+c,e,b,d);return e},"~O,~N,~N");c$.arrayCopyObject=$_M(c$,"arrayCopyObject",function(a,
b){if(null==a)return null;var c=J.util.ArrayUtil.getLength(a);if(b==c)return a;var d=J.util.ArrayUtil.newInstanceO(a,b);System.arraycopy(a,0,d,0,c<b?c:b);return d},"~O,~N");c$.newInstanceO=$_M(c$,"newInstanceO",($fz=function(a,b){return Array(b)},$fz.isPrivate=!0,$fz),"~O,~N");c$.getLength=$_M(c$,"getLength",($fz=function(a){return a.length},$fz.isPrivate=!0,$fz),"~O");c$.arrayCopyS=$_M(c$,"arrayCopyS",function(a,b){0>b&&(b=a.length);var c=Array(b);if(null!=a){var d=a.length;System.arraycopy(a,0,
c,0,d<b?d:b)}return c},"~A,~N");c$.arrayCopyII=$_M(c$,"arrayCopyII",function(a,b){var c=J.util.ArrayUtil.newInt2(b);if(null!=a){var d=a.length;System.arraycopy(a,0,c,0,d<b?d:b)}return c},"~A,~N");c$.arrayCopyPt=$_M(c$,"arrayCopyPt",function(a,b){0>b&&(b=a.length);var c=Array(b);if(null!=a){var d=a.length;System.arraycopy(a,0,c,0,d<b?d:b)}return c},"~A,~N");c$.arrayCopyF=$_M(c$,"arrayCopyF",function(a,b){0>b&&(b=a.length);var c=Clazz.newFloatArray(b,0);if(null!=a){var d=a.length;System.arraycopy(a,
0,c,0,d<b?d:b)}return c},"~A,~N");c$.arrayCopyI=$_M(c$,"arrayCopyI",function(a,b){0>b&&(b=a.length);var c=Clazz.newIntArray(b,0);if(null!=a){var d=a.length;System.arraycopy(a,0,c,0,d<b?d:b)}return c},"~A,~N");c$.arrayCopyRangeI=$_M(c$,"arrayCopyRangeI",function(a,b,c){if(null==a)return null;var d=a.length;-1==c&&(c=d);-2==c&&(c=Clazz.doubleToInt(d/2));c-=b;d=Clazz.newIntArray(c,0);System.arraycopy(a,b,d,0,c);return d},"~A,~N,~N");c$.arrayCopyRangeRevI=$_M(c$,"arrayCopyRangeRevI",function(a,b,c){if(null==
a)return null;b=J.util.ArrayUtil.arrayCopyRangeI(a,b,c);0>c&&(c=a.length);for(a=Clazz.doubleToInt(c/2);0<=--a;)J.util.ArrayUtil.swapInt(b,a,c-1-a);return b},"~A,~N,~N");c$.arrayCopyShort=$_M(c$,"arrayCopyShort",function(a,b){0>b&&(b=a.length);var c=Clazz.newShortArray(b,0);if(null!=a){var d=a.length;System.arraycopy(a,0,c,0,d<b?d:b)}return c},"~A,~N");c$.arrayCopyByte=$_M(c$,"arrayCopyByte",function(a,b){0>b&&(b=a.length);var c=Clazz.newByteArray(b,0);if(null!=a){var d=a.length;System.arraycopy(a,
0,c,0,d<b?d:b)}return c},"~A,~N");c$.arrayCopyBool=$_M(c$,"arrayCopyBool",function(a,b){0>b&&(b=a.length);var c=Clazz.newBooleanArray(b,!1);if(null!=a){var d=a.length;System.arraycopy(a,0,c,0,d<b?d:b)}return c},"~A,~N");c$.swapInt=$_M(c$,"swapInt",function(a,b,c){var d=a[b];a[b]=a[c];a[c]=d},"~A,~N,~N");c$.dumpArray=$_M(c$,"dumpArray",function(a,b,c,d,e,f){a="dumpArray: "+a+"\n";for(var g=c;g<=d;g++)a+="\t*"+g+"*";for(;f>=e;f--){a+="\n*"+f+"*";for(g=c;g<=d;g++)a+="\t"+(g<b.length&&f<b[g].length?b[g][f]:
NaN)}return a},"~S,~A,~N,~N,~N,~N");c$.dumpIntArray=$_M(c$,"dumpIntArray",function(a,b){for(var c="",d=0;d<b;d++)c+=" "+a[d];return c},"~A,~N");c$.sortedItem=$_M(c$,"sortedItem",function(a,b){if(0==a.size())return null;if(1==a.size())return a.get(0);var c=a.toArray(Array(a.size()));java.util.Arrays.sort(c);return c[b%c.length]},"J.util.JmolList,~N");c$.createArrayOfArrayList=$_M(c$,"createArrayOfArrayList",function(a){return Array(a)},"~N");c$.createArrayOfHashtable=$_M(c$,"createArrayOfHashtable",
function(a){return Array(a)},"~N");c$.swap=$_M(c$,"swap",function(a,b,c){var d=a[b];a[b]=a[c];a[c]=d},"~A,~N,~N");c$.newFloat2=$_M(c$,"newFloat2",function(a){return Clazz.newArray(a,null)},"~N");c$.newInt2=$_M(c$,"newInt2",function(a){return Clazz.newArray(a,null)},"~N");c$.newInt3=$_M(c$,"newInt3",function(a){return Clazz.newArray(a,null)},"~N,~N");c$.newFloat3=$_M(c$,"newFloat3",function(a){return Clazz.newArray(a,null)},"~N,~N");c$.newInt4=$_M(c$,"newInt4",function(a){return Clazz.newArray(a,null)},
"~N");c$.newShort2=$_M(c$,"newShort2",function(a){return Clazz.newArray(a,null)},"~N");c$.newByte2=$_M(c$,"newByte2",function(a){return Clazz.newArray(a,null)},"~N");c$.newDouble2=$_M(c$,"newDouble2",function(a){return Clazz.newArray(a,null)},"~N")}),Clazz.declarePackage("J.util"),Clazz.load(null,"J.util.BS",["java.lang.IndexOutOfBoundsException","$.NegativeArraySizeException","J.util.SB"],function(){c$=Clazz.decorateAsClass(function(){this.words=null;this.wordsInUse=0;this.sizeIsSticky=!1;Clazz.instantialize(this,
arguments)},J.util,"BS",null,Cloneable);c$.wordIndex=$_M(c$,"wordIndex",($fz=function(a){return a>>5},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"recalculateWordsInUse",($fz=function(){var a;for(a=this.wordsInUse-1;0<=a&&0==this.words[a];a--);this.wordsInUse=a+1},$fz.isPrivate=!0,$fz));Clazz.makeConstructor(c$,function(){this.initWords(32);this.sizeIsSticky=!1});c$.newN=$_M(c$,"newN",function(a){var b=new J.util.BS;b.init(a);return b},"~N");$_M(c$,"init",($fz=function(a){if(0>a)throw new NegativeArraySizeException("nbits < 0: "+
a);this.initWords(a);this.sizeIsSticky=!0},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"initWords",($fz=function(a){this.words=Clazz.newIntArray(J.util.BS.wordIndex(a-1)+1,0)},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"ensureCapacity",($fz=function(a){this.words.length<a&&(a=Math.max(2*this.words.length,a),this.setLength(a),this.sizeIsSticky=!1)},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"expandTo",($fz=function(a){a+=1;this.wordsInUse<a&&(this.ensureCapacity(a),this.wordsInUse=a)},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"set",
function(a){if(0>a)throw new IndexOutOfBoundsException("bitIndex < 0: "+a);var b=J.util.BS.wordIndex(a);this.expandTo(b);this.words[b]|=1<<a},"~N");$_M(c$,"setBitTo",function(a,b){b?this.set(a):this.clear(a)},"~N,~B");$_M(c$,"setBits",function(a,b){if(a!=b){var c=J.util.BS.wordIndex(a),d=J.util.BS.wordIndex(b-1);this.expandTo(d);var e=-1<<a,f=-1>>>-b;if(c==d)this.words[c]|=e&f;else{this.words[c]|=e;for(c+=1;c<d;c++)this.words[c]=-1;this.words[d]|=f}}},"~N,~N");$_M(c$,"clear",function(a){if(0>a)throw new IndexOutOfBoundsException("bitIndex < 0: "+
a);var b=J.util.BS.wordIndex(a);b>=this.wordsInUse||(this.words[b]&=~(1<<a),this.recalculateWordsInUse())},"~N");$_M(c$,"clearBits",function(a,b){if(a!=b){var c=J.util.BS.wordIndex(a);if(!(c>=this.wordsInUse)){var d=J.util.BS.wordIndex(b-1);d>=this.wordsInUse&&(b=this.length(),d=this.wordsInUse-1);var e=-1<<a,f=-1>>>-b;if(c==d)this.words[c]&=~(e&f);else{this.words[c]&=~e;for(c+=1;c<d;c++)this.words[c]=0;this.words[d]&=~f}this.recalculateWordsInUse()}}},"~N,~N");$_M(c$,"clearAll",function(){for(;0<
this.wordsInUse;)this.words[--this.wordsInUse]=0});$_M(c$,"get",function(a){if(0>a)throw new IndexOutOfBoundsException("bitIndex < 0: "+a);var b=J.util.BS.wordIndex(a);return b<this.wordsInUse&&0!=(this.words[b]&1<<a)},"~N");$_M(c$,"nextSetBit",function(a){if(0>a)throw new IndexOutOfBoundsException("fromIndex < 0: "+a);var b=J.util.BS.wordIndex(a);if(b>=this.wordsInUse)return-1;for(a=this.words[b]&-1<<a;;){if(0!=a)return 32*b+Integer.numberOfTrailingZeros(a);if(++b==this.wordsInUse)return-1;a=this.words[b]}},
"~N");$_M(c$,"nextClearBit",function(a){if(0>a)throw new IndexOutOfBoundsException("fromIndex < 0: "+a);var b=J.util.BS.wordIndex(a);if(b>=this.wordsInUse)return a;for(a=~this.words[b]&-1<<a;;){if(0!=a)return 32*b+Integer.numberOfTrailingZeros(a);if(++b==this.wordsInUse)return 32*this.wordsInUse;a=~this.words[b]}},"~N");$_M(c$,"length",function(){return 0==this.wordsInUse?0:32*(this.wordsInUse-1)+(32-Integer.numberOfLeadingZeros(this.words[this.wordsInUse-1]))});$_M(c$,"isEmpty",function(){return 0==
this.wordsInUse});$_M(c$,"intersects",function(a){for(var b=Math.min(this.wordsInUse,a.wordsInUse)-1;0<=b;b--)if(0!=(this.words[b]&a.words[b]))return!0;return!1},"J.util.BS");$_M(c$,"cardinality",function(){for(var a=0,b=0;b<this.wordsInUse;b++)a+=Integer.bitCount(this.words[b]);return a});$_M(c$,"and",function(a){if(this!==a){for(;this.wordsInUse>a.wordsInUse;)this.words[--this.wordsInUse]=0;for(var b=0;b<this.wordsInUse;b++)this.words[b]&=a.words[b];this.recalculateWordsInUse()}},"J.util.BS");$_M(c$,
"or",function(a){if(this!==a){var b=Math.min(this.wordsInUse,a.wordsInUse);this.wordsInUse<a.wordsInUse&&(this.ensureCapacity(a.wordsInUse),this.wordsInUse=a.wordsInUse);for(var c=0;c<b;c++)this.words[c]|=a.words[c];b<a.wordsInUse&&System.arraycopy(a.words,b,this.words,b,this.wordsInUse-b)}},"J.util.BS");$_M(c$,"xor",function(a){var b=Math.min(this.wordsInUse,a.wordsInUse);this.wordsInUse<a.wordsInUse&&(this.ensureCapacity(a.wordsInUse),this.wordsInUse=a.wordsInUse);for(var c=0;c<b;c++)this.words[c]^=
a.words[c];b<a.wordsInUse&&System.arraycopy(a.words,b,this.words,b,a.wordsInUse-b);this.recalculateWordsInUse()},"J.util.BS");$_M(c$,"andNot",function(a){for(var b=Math.min(this.wordsInUse,a.wordsInUse)-1;0<=b;b--)this.words[b]&=~a.words[b];this.recalculateWordsInUse()},"J.util.BS");Clazz.overrideMethod(c$,"hashCode",function(){for(var a=1234,b=this.wordsInUse;0<=--b;)a^=this.words[b]*(b+1);return a>>32^a});$_M(c$,"size",function(){return 32*this.words.length});Clazz.overrideMethod(c$,"equals",function(a){if(!Clazz.instanceOf(a,
J.util.BS))return!1;if(this===a)return!0;if(this.wordsInUse!=a.wordsInUse)return!1;for(var b=0;b<this.wordsInUse;b++)if(this.words[b]!=a.words[b])return!1;return!0},"~O");Clazz.overrideMethod(c$,"clone",function(){!this.sizeIsSticky&&this.wordsInUse!=this.words.length&&this.setLength(this.wordsInUse);return J.util.BS.copy(this)});$_M(c$,"setLength",($fz=function(a){var b=Clazz.newIntArray(a,0);System.arraycopy(this.words,0,b,0,Math.min(this.wordsInUse,a));this.words=b},$fz.isPrivate=!0,$fz),"~N");
Clazz.overrideMethod(c$,"toString",function(){var a=128<this.wordsInUse?this.cardinality():32*this.wordsInUse,a=J.util.SB.newN(6*a+2);a.appendC("{");var b=this.nextSetBit(0);if(-1!=b){a.appendI(b);for(b=this.nextSetBit(b+1);0<=b;b=this.nextSetBit(b+1)){var c=this.nextClearBit(b);do a.append(", ").appendI(b);while(++b<c)}}a.appendC("}");return a.toString()});c$.copy=$_M(c$,"copy",function(a){var b=null,b=Clazz.clone(a),c=a.wordsInUse;0==c?b.words=J.util.BS.emptyBitmap:(b.words=Clazz.newIntArray(c,
0),System.arraycopy(a.words,0,b.words,0,c));return b},"J.util.BS");$_M(c$,"cardinalityN",function(a){for(var b=this.cardinality(),c=this.length();--c>=a;)this.get(c)&&b--;return b},"~N");Clazz.defineStatics(c$,"ADDRESS_BITS_PER_WORD",5,"BITS_PER_WORD",32,"WORD_MASK",4294967295,"emptyBitmap",Clazz.newIntArray(0,0))}),Clazz.declarePackage("J.util"),Clazz.load(["J.util.BS"],"J.util.BSUtil",null,function(){c$=Clazz.declareType(J.util,"BSUtil");c$.newAndSetBit=$_M(c$,"newAndSetBit",function(a){var b=J.util.BSUtil.newBitSet(a+
1);b.set(a);return b},"~N");c$.areEqual=$_M(c$,"areEqual",function(a,b){return null==a||null==b?null==a&&null==b:a.equals(b)},"J.util.BS,J.util.BS");c$.haveCommon=$_M(c$,"haveCommon",function(a,b){return null==a||null==b?!1:a.intersects(b)},"J.util.BS,J.util.BS");c$.cardinalityOf=$_M(c$,"cardinalityOf",function(a){return null==a?0:a.cardinality()},"J.util.BS");c$.newBitSet2=$_M(c$,"newBitSet2",function(a,b){var c=J.util.BSUtil.newBitSet(b);c.setBits(a,b);return c},"~N,~N");c$.setAll=$_M(c$,"setAll",
function(a){var b=J.util.BSUtil.newBitSet(a);b.setBits(0,a);return b},"~N");c$.andNot=$_M(c$,"andNot",function(a,b){null!=b&&null!=a&&a.andNot(b);return a},"J.util.BS,J.util.BS");c$.copy=$_M(c$,"copy",function(a){return null==a?null:a.clone()},"J.util.BS");c$.copy2=$_M(c$,"copy2",function(a,b){if(null==a||null==b)return null;b.clearAll();b.or(a);return b},"J.util.BS,J.util.BS");c$.copyInvert=$_M(c$,"copyInvert",function(a,b){return null==a?null:J.util.BSUtil.andNot(J.util.BSUtil.setAll(b),a)},"J.util.BS,~N");
c$.invertInPlace=$_M(c$,"invertInPlace",function(a,b){return J.util.BSUtil.copy2(J.util.BSUtil.copyInvert(a,b),a)},"J.util.BS,~N");c$.toggleInPlace=$_M(c$,"toggleInPlace",function(a,b){a.equals(b)?a.clearAll():0==J.util.BSUtil.andNot(J.util.BSUtil.copy(b),a).length()?J.util.BSUtil.andNot(a,b):a.or(b);return a},"J.util.BS,J.util.BS");c$.deleteBits=$_M(c$,"deleteBits",function(a,b){if(null==a||null==b)return a;var c=b.nextSetBit(0);if(0>c)return a;var d=a.length(),e=Math.min(d,b.length()),f;for(f=b.nextClearBit(c);f<
e&&0<=f;f=b.nextClearBit(f+1))a.setBitTo(c++,a.get(f));for(f=e;f<d;f++)a.setBitTo(c++,a.get(f));c<d&&a.clearBits(c,d);return a},"J.util.BS,J.util.BS");c$.newBitSet=$_M(c$,"newBitSet",function(a){return J.util.BS.newN(a)},"~N");c$.offset=$_M(c$,"offset",function(a,b,c){if(null!=a){for(var d=J.util.BS.newN(a.length()+c),e=a.nextSetBit(0);e>=b;e=a.nextSetBit(e+1))d.set(e+c);J.util.BSUtil.copy2(d,a)}},"J.util.BS,~N,~N");c$.setMapBitSet=$_M(c$,"setMapBitSet",function(a,b,c,d){var e;a.containsKey(d)?e=
a.get(d):a.put(d,e=new J.util.BS);e.setBits(b,c+1)},"java.util.Map,~N,~N,~S");c$.emptySet=c$.prototype.emptySet=new J.util.BS}),Clazz.declarePackage("J.util"),Clazz.load(null,"J.util.Matrix3f",["java.lang.ArrayIndexOutOfBoundsException","J.util.Tuple3f"],function(){c$=Clazz.decorateAsClass(function(){this.m22=this.m21=this.m20=this.m12=this.m11=this.m10=this.m02=this.m01=this.m00=0;Clazz.instantialize(this,arguments)},J.util,"Matrix3f",null,java.io.Serializable);Clazz.makeConstructor(c$,function(){});
c$.newA=$_M(c$,"newA",function(a){var b=new J.util.Matrix3f;b.setA(a);return b},"~A");c$.newM=$_M(c$,"newM",function(a){var b=new J.util.Matrix3f;b.m00=a.m00;b.m01=a.m01;b.m02=a.m02;b.m10=a.m10;b.m11=a.m11;b.m12=a.m12;b.m20=a.m20;b.m21=a.m21;b.m22=a.m22;return b},"J.util.Matrix3f");Clazz.overrideMethod(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+"] ]"});$_M(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});$_M(c$,"setElement",function(a,b,c){if(0==a)if(0==b)this.m00=c;else if(1==b)this.m01=c;else if(2==b)this.m02=c;else throw new ArrayIndexOutOfBoundsException("column must be 0 to 2 and is "+b);else if(1==a)if(0==b)this.m10=c;else if(1==b)this.m11=c;else if(2==b)this.m12=c;else throw new ArrayIndexOutOfBoundsException("column must be 0 to 2 and is "+b);else if(2==a)if(0==b)this.m20=c;else if(1==b)this.m21=
c;else if(2==b)this.m22=c;else throw new ArrayIndexOutOfBoundsException("column must be 0 to 2 and is "+b);else throw new ArrayIndexOutOfBoundsException("row must be 0 to 2 and is "+a);},"~N,~N,~N");$_M(c$,"getElement",function(a,b){if(0==a){if(0==b)return this.m00;if(1==b)return this.m01;if(2==b)return this.m02;throw new ArrayIndexOutOfBoundsException("column must be 0 to 2 and is "+b);}if(1==a){if(0==b)return this.m10;if(1==b)return this.m11;if(2==b)return this.m12;throw new ArrayIndexOutOfBoundsException("column must be 0 to 2 and is "+
b);}if(2==a){if(0==b)return this.m20;if(1==b)return this.m21;if(2==b)return this.m22;throw new ArrayIndexOutOfBoundsException("column must be 0 to 2 and is "+b);}throw new ArrayIndexOutOfBoundsException("row must be 0 to 2 and is "+a);},"~N,~N");$_M(c$,"setRow",function(a,b,c,d){if(0==a)this.m00=b,this.m01=c,this.m02=d;else if(1==a)this.m10=b,this.m11=c,this.m12=d;else if(2==a)this.m20=b,this.m21=c,this.m22=d;else throw new ArrayIndexOutOfBoundsException("row must be 0 to 2 and is "+a);},"~N,~N,~N,~N");
$_M(c$,"setRowV",function(a,b){if(0==a)this.m00=b.x,this.m01=b.y,this.m02=b.z;else if(1==a)this.m10=b.x,this.m11=b.y,this.m12=b.z;else if(2==a)this.m20=b.x,this.m21=b.y,this.m22=b.z;else throw new ArrayIndexOutOfBoundsException("row must be 0 to 2 and is "+a);},"~N,J.util.V3");$_M(c$,"getRow",function(a,b){if(0==a)b[0]=this.m00,b[1]=this.m01,b[2]=this.m02;else if(1==a)b[0]=this.m10,b[1]=this.m11,b[2]=this.m12;else if(2==a)b[0]=this.m20,b[1]=this.m21,b[2]=this.m22;else throw new ArrayIndexOutOfBoundsException("row must be 0 to 2 and is "+
a);},"~N,~A");$_M(c$,"setRowA",function(a,b){if(0==a)this.m00=b[0],this.m01=b[1],this.m02=b[2];else if(1==a)this.m10=b[0],this.m11=b[1],this.m12=b[2];else if(2==a)this.m20=b[0],this.m21=b[1],this.m22=b[2];else throw new ArrayIndexOutOfBoundsException("row must be 0 to 2 and is "+a);},"~N,~A");$_M(c$,"setColumn",function(a,b,c,d){if(0==a)this.m00=b,this.m10=c,this.m20=d;else if(1==a)this.m01=b,this.m11=c,this.m21=d;else if(2==a)this.m02=b,this.m12=c,this.m22=d;else throw new ArrayIndexOutOfBoundsException("column must be 0 to 2 and is "+
a);},"~N,~N,~N,~N");$_M(c$,"setColumnV",function(a,b){if(0==a)this.m00=b.x,this.m10=b.y,this.m20=b.z;else if(1==a)this.m01=b.x,this.m11=b.y,this.m21=b.z;else if(2==a)this.m02=b.x,this.m12=b.y,this.m22=b.z;else throw new ArrayIndexOutOfBoundsException("column must be 0 to 2 and is "+a);},"~N,J.util.V3");$_M(c$,"setColumnA",function(a,b){if(0==a)this.m00=b[0],this.m10=b[1],this.m20=b[2];else if(1==a)this.m01=b[0],this.m11=b[1],this.m21=b[2];else if(2==a)this.m02=b[0],this.m12=b[1],this.m22=b[2];else throw new ArrayIndexOutOfBoundsException("column must be 0 to 2 and is "+
a);},"~N,~A");$_M(c$,"getColumnV",function(a,b){if(0==a)b.x=this.m00,b.y=this.m10,b.z=this.m20;else if(1==a)b.x=this.m01,b.y=this.m11,b.z=this.m21;else if(2==a)b.x=this.m02,b.y=this.m12,b.z=this.m22;else throw new ArrayIndexOutOfBoundsException("column must be 0 to 2 and is "+a);},"~N,J.util.V3");$_M(c$,"getColumn",function(a,b){if(0==a)b[0]=this.m00,b[1]=this.m10,b[2]=this.m20;else if(1==a)b[0]=this.m01,b[1]=this.m11,b[2]=this.m21;else if(2==a)b[0]=this.m02,b[1]=this.m12,b[2]=this.m22;else throw new ArrayIndexOutOfBoundsException("column must be 0 to 2 and is "+
a);},"~N,~A");$_M(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},"J.util.Matrix3f");$_M(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},"J.util.Matrix3f");$_M(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});$_M(c$,"transposeM",function(a){this.setM(a);this.transpose()},"J.util.Matrix3f");$_M(c$,"setAA",function(a){this.setFromAxisAngle(a.x,a.y,a.z,a.angle)},"J.util.AxisAngle4f");$_M(c$,"setFromAxisAngle",($fz=function(a,b,c,d){var e=Math.sqrt(a*a+b*b+c*c),e=1/e;a*=e;b*=e;c*=e;var f=Math.cos(d);d=Math.sin(d);e=1-f;this.m00=f+a*a*e;this.m11=f+b*b*e;this.m22=f+c*c*e;var f=a*b*e,g=c*d;this.m01=f-g;this.m10=f+g;f=a*c*e;g=b*d;this.m02=f+g;this.m20=f-g;f=b*c*e;g=
a*d;this.m12=f-g;this.m21=f+g},$fz.isPrivate=!0,$fz),"~N,~N,~N,~N");$_M(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},"J.util.Matrix3f");$_M(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");$_M(c$,"invertM",function(a){this.setM(a);this.invert()},"J.util.Matrix3f");$_M(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))});$_M(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)});$_M(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");$_M(c$,"rotX",function(a){var b=Math.cos(a);a=Math.sin(a);this.m00=1;this.m10=this.m02=this.m01=0;this.m11=b;this.m12=-a;this.m20=0;this.m21=a;this.m22=b},"~N");$_M(c$,"rotY",function(a){var b=Math.cos(a);a=Math.sin(a);this.m00=b;this.m01=0;this.m02=a;this.m10=0;this.m11=1;this.m12=0;this.m20=-a;this.m21=0;this.m22=
b},"~N");$_M(c$,"rotZ",function(a){var b=Math.cos(a);a=Math.sin(a);this.m00=b;this.m01=-a;this.m02=0;this.m10=a;this.m11=b;this.m21=this.m20=this.m12=0;this.m22=1},"~N");$_M(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");$_M(c$,"mul",function(a){this.mul2(this,a)},"J.util.Matrix3f");$_M(c$,"mul2",function(a,b){this.set(a.m00*b.m00+a.m01*b.m10+a.m02*b.m20,a.m00*b.m01+a.m01*b.m11+a.m02*b.m21,a.m00*b.m02+a.m01*
b.m12+a.m02*b.m22,a.m10*b.m00+a.m11*b.m10+a.m12*b.m20,a.m10*b.m01+a.m11*b.m11+a.m12*b.m21,a.m10*b.m02+a.m11*b.m12+a.m12*b.m22,a.m20*b.m00+a.m21*b.m10+a.m22*b.m20,a.m20*b.m01+a.m21*b.m11+a.m22*b.m21,a.m20*b.m02+a.m21*b.m12+a.m22*b.m22)},"J.util.Matrix3f,J.util.Matrix3f");Clazz.overrideMethod(c$,"equals",function(a){return!Clazz.instanceOf(a,J.util.Matrix3f)?!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");Clazz.overrideMethod(c$,"hashCode",function(){return J.util.Tuple3f.floatToIntBits0(this.m00)^J.util.Tuple3f.floatToIntBits0(this.m01)^J.util.Tuple3f.floatToIntBits0(this.m02)^J.util.Tuple3f.floatToIntBits0(this.m10)^J.util.Tuple3f.floatToIntBits0(this.m11)^J.util.Tuple3f.floatToIntBits0(this.m12)^J.util.Tuple3f.floatToIntBits0(this.m20)^J.util.Tuple3f.floatToIntBits0(this.m21)^J.util.Tuple3f.floatToIntBits0(this.m22)});$_M(c$,"setZero",function(){this.m22=this.m21=this.m20=this.m12=
this.m11=this.m10=this.m02=this.m01=this.m00=0});$_M(c$,"transform",function(a){this.transform2(a,a)},"J.util.Tuple3f");$_M(c$,"transform2",function(a,b){b.set(this.m00*a.x+this.m01*a.y+this.m02*a.z,this.m10*a.x+this.m11*a.y+this.m12*a.z,this.m20*a.x+this.m21*a.y+this.m22*a.z)},"J.util.Tuple3f,J.util.Tuple3f");$_M(c$,"set",($fz=function(a,b,c,d,e,f,g,h,k){this.m00=a;this.m01=b;this.m02=c;this.m10=d;this.m11=e;this.m12=f;this.m20=g;this.m21=h;this.m22=k},$fz.isPrivate=!0,$fz),"~N,~N,~N,~N,~N,~N,~N,~N,~N")}),
Clazz.declarePackage("J.util"),Clazz.load(null,"J.util.Matrix4f",["java.lang.ArrayIndexOutOfBoundsException","J.util.Tuple3f"],function(){c$=Clazz.decorateAsClass(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;Clazz.instantialize(this,arguments)},J.util,"Matrix4f",null,java.io.Serializable);c$.newA=$_M(c$,"newA",function(a){var b=new J.util.Matrix4f;b.m00=a[0];b.m01=a[1];b.m02=a[2];b.m03=
a[3];b.m10=a[4];b.m11=a[5];b.m12=a[6];b.m13=a[7];b.m20=a[8];b.m21=a[9];b.m22=a[10];b.m23=a[11];b.m30=a[12];b.m31=a[13];b.m32=a[14];b.m33=a[15];return b},"~A");c$.newM=$_M(c$,"newM",function(a){var b=new J.util.Matrix4f;b.m00=a.m00;b.m01=a.m01;b.m02=a.m02;b.m03=a.m03;b.m10=a.m10;b.m11=a.m11;b.m12=a.m12;b.m13=a.m13;b.m20=a.m20;b.m21=a.m21;b.m22=a.m22;b.m23=a.m23;b.m30=a.m30;b.m31=a.m31;b.m32=a.m32;b.m33=a.m33;return b},"J.util.Matrix4f");c$.newMV=$_M(c$,"newMV",function(a,b){var c=new J.util.Matrix4f;
c.setMV(a,b);return c},"J.util.Matrix3f,J.util.V3");$_M(c$,"setMV",function(a,b){this.setM3(a);this.setTranslation(b)},"J.util.Matrix3f,J.util.V3");$_M(c$,"setAA",function(a){this.setFromAxisAngle(a.x,a.y,a.z,a.angle)},"J.util.AxisAngle4f");$_M(c$,"setFromAxisAngle",($fz=function(a,b,c,d){var e=Math.sqrt(a*a+b*b+c*c),e=1/e;a*=e;b*=e;c*=e;var f=Math.cos(d);d=Math.sin(d);e=1-f;this.m00=f+a*a*e;this.m11=f+b*b*e;this.m22=f+c*c*e;var f=a*b*e,g=c*d;this.m01=f-g;this.m10=f+g;f=a*c*e;g=b*d;this.m02=f+g;this.m20=
f-g;f=b*c*e;g=a*d;this.m12=f-g;this.m21=f+g},$fz.isPrivate=!0,$fz),"~N,~N,~N,~N");$_M(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},"J.util.Matrix4f");Clazz.overrideMethod(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+"] ]"});$_M(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});$_M(c$,"setElement",function(a,b,c){if(0==a)if(0==b)this.m00=c;else if(1==b)this.m01=c;else if(2==b)this.m02=c;else if(3==b)this.m03=c;else throw new ArrayIndexOutOfBoundsException("column must be 0 to 3 and is "+
b);else if(1==a)if(0==b)this.m10=c;else if(1==b)this.m11=c;else if(2==b)this.m12=c;else if(3==b)this.m13=c;else throw new ArrayIndexOutOfBoundsException("column must be 0 to 3 and is "+b);else if(2==a)if(0==b)this.m20=c;else if(1==b)this.m21=c;else if(2==b)this.m22=c;else if(3==b)this.m23=c;else throw new ArrayIndexOutOfBoundsException("column must be 0 to 3 and is "+b);else if(3==a)if(0==b)this.m30=c;else if(1==b)this.m31=c;else if(2==b)this.m32=c;else if(3==b)this.m33=c;else throw new ArrayIndexOutOfBoundsException("column must be 0 to 3 and is "+
b);else throw new ArrayIndexOutOfBoundsException("row must be 0 to 2 and is "+a);},"~N,~N,~N");$_M(c$,"getElement",function(a,b){if(0==a){if(0==b)return this.m00;if(1==b)return this.m01;if(2==b)return this.m02;if(3==b)return this.m03;throw new ArrayIndexOutOfBoundsException("column must be 0 to 3 and is "+b);}if(1==a){if(0==b)return this.m10;if(1==b)return this.m11;if(2==b)return this.m12;if(3==b)return this.m13;throw new ArrayIndexOutOfBoundsException("column must be 0 to 3 and is "+b);}if(2==a){if(0==
b)return this.m20;if(1==b)return this.m21;if(2==b)return this.m22;if(3==b)return this.m23;throw new ArrayIndexOutOfBoundsException("column must be 0 to 3 and is "+b);}if(3==a){if(0==b)return this.m30;if(1==b)return this.m31;if(2==b)return this.m32;if(3==b)return this.m33;throw new ArrayIndexOutOfBoundsException("column must be 0 to 3 and is "+b);}throw new ArrayIndexOutOfBoundsException("row must be 0 to 3 and is "+a);},"~N,~N");$_M(c$,"get",function(a){a.x=this.m03;a.y=this.m13;a.z=this.m23},"J.util.V3");
$_M(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},"J.util.Matrix3f");$_M(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},"J.util.Matrix3f");$_M(c$,"setRow",function(a,b){if(0==a)this.m00=b[0],this.m01=b[1],this.m02=b[2],this.m03=b[3];else if(1==a)this.m10=
b[0],this.m11=b[1],this.m12=b[2],this.m13=b[3];else if(2==a)this.m20=b[0],this.m21=b[1],this.m22=b[2],this.m23=b[3];else if(3==a)this.m30=b[0],this.m31=b[1],this.m32=b[2],this.m33=b[3];else throw new ArrayIndexOutOfBoundsException("row must be 0 to 3 and is "+a);},"~N,~A");$_M(c$,"getRow",function(a,b){if(0==a)b[0]=this.m00,b[1]=this.m01,b[2]=this.m02,b[3]=this.m03;else if(1==a)b[0]=this.m10,b[1]=this.m11,b[2]=this.m12,b[3]=this.m13;else if(2==a)b[0]=this.m20,b[1]=this.m21,b[2]=this.m22,b[3]=this.m23;
else if(3==a)b[0]=this.m30,b[1]=this.m31,b[2]=this.m32,b[3]=this.m33;else throw new ArrayIndexOutOfBoundsException("row must be 0 to 3 and is "+a);},"~N,~A");$_M(c$,"setColumn4",function(a,b,c,d,e){if(0==a)this.m00=b,this.m10=c,this.m20=d,this.m30=e;else if(1==a)this.m01=b,this.m11=c,this.m21=d,this.m31=e;else if(2==a)this.m02=b,this.m12=c,this.m22=d,this.m32=e;else if(3==a)this.m03=b,this.m13=c,this.m23=d,this.m33=e;else throw new ArrayIndexOutOfBoundsException("column must be 0 to 3 and is "+a);
},"~N,~N,~N,~N,~N");$_M(c$,"setColumn",function(a,b){if(0==a)this.m00=b[0],this.m10=b[1],this.m20=b[2],this.m30=b[3];else if(1==a)this.m01=b[0],this.m11=b[1],this.m21=b[2],this.m31=b[3];else if(2==a)this.m02=b[0],this.m12=b[1],this.m22=b[2],this.m32=b[3];else if(3==a)this.m03=b[0],this.m13=b[1],this.m23=b[2],this.m33=b[3];else throw new ArrayIndexOutOfBoundsException("column must be 0 to 3 and is "+a);},"~N,~A");$_M(c$,"getColumn",function(a,b){if(0==a)b[0]=this.m00,b[1]=this.m10,b[2]=this.m20,b[3]=
this.m30;else if(1==a)b[0]=this.m01,b[1]=this.m11,b[2]=this.m21,b[3]=this.m31;else if(2==a)b[0]=this.m02,b[1]=this.m12,b[2]=this.m22,b[3]=this.m32;else if(3==a)b[0]=this.m03,b[1]=this.m13,b[2]=this.m23,b[3]=this.m33;else throw new ArrayIndexOutOfBoundsException("column must be 0 to 3 and is "+a);},"~N,~A");$_M(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},"J.util.Matrix4f");$_M(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});$_M(c$,"invertM",function(a){this.setM(a);this.invert()},"J.util.Matrix4f");$_M(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))});$_M(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)});$_M(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},"J.util.Matrix3f");
$_M(c$,"setA",function(a){this.m00=a[0];this.m01=a[1];this.m02=a[2];this.m03=a[3];this.m10=a[4];this.m11=a[5];this.m12=a[6];this.m13=a[7];this.m20=a[8];this.m21=a[9];this.m22=a[10];this.m23=a[11];this.m30=a[12];this.m31=a[13];this.m32=a[14];this.m33=a[15]},"~A");$_M(c$,"setTranslation",function(a){this.m03=a.x;this.m13=a.y;this.m23=a.z},"J.util.V3");$_M(c$,"rotX",function(a){var b=Math.cos(a);a=Math.sin(a);this.m00=1;this.m10=this.m03=this.m02=this.m01=0;this.m11=b;this.m12=-a;this.m20=this.m13=0;
this.m21=a;this.m22=b;this.m32=this.m31=this.m30=this.m23=0;this.m33=1},"~N");$_M(c$,"rotY",function(a){var b=Math.cos(a);a=Math.sin(a);this.m00=b;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=b;this.m32=this.m31=this.m30=this.m23=0;this.m33=1},"~N");$_M(c$,"rotZ",function(a){var b=Math.cos(a);a=Math.sin(a);this.m00=b;this.m01=-a;this.m03=this.m02=0;this.m10=a;this.m11=b;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");$_M(c$,"mul",($fz=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},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"mulM4",function(a){this.mul2(this,a)},"J.util.Matrix4f");$_M(c$,"mul2",function(a,b){this.set(a.m00*b.m00+a.m01*b.m10+a.m02*b.m20+a.m03*b.m30,a.m00*b.m01+a.m01*b.m11+a.m02*b.m21+a.m03*b.m31,a.m00*b.m02+a.m01*b.m12+
a.m02*b.m22+a.m03*b.m32,a.m00*b.m03+a.m01*b.m13+a.m02*b.m23+a.m03*b.m33,a.m10*b.m00+a.m11*b.m10+a.m12*b.m20+a.m13*b.m30,a.m10*b.m01+a.m11*b.m11+a.m12*b.m21+a.m13*b.m31,a.m10*b.m02+a.m11*b.m12+a.m12*b.m22+a.m13*b.m32,a.m10*b.m03+a.m11*b.m13+a.m12*b.m23+a.m13*b.m33,a.m20*b.m00+a.m21*b.m10+a.m22*b.m20+a.m23*b.m30,a.m20*b.m01+a.m21*b.m11+a.m22*b.m21+a.m23*b.m31,a.m20*b.m02+a.m21*b.m12+a.m22*b.m22+a.m23*b.m32,a.m20*b.m03+a.m21*b.m13+a.m22*b.m23+a.m23*b.m33,a.m30*b.m00+a.m31*b.m10+a.m32*b.m20+a.m33*b.m30,
a.m30*b.m01+a.m31*b.m11+a.m32*b.m21+a.m33*b.m31,a.m30*b.m02+a.m31*b.m12+a.m32*b.m22+a.m33*b.m32,a.m30*b.m03+a.m31*b.m13+a.m32*b.m23+a.m33*b.m33)},"J.util.Matrix4f,J.util.Matrix4f");Clazz.overrideMethod(c$,"equals",function(a){return!Clazz.instanceOf(a,J.util.Matrix4f)?!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");Clazz.overrideMethod(c$,"hashCode",function(){return J.util.Tuple3f.floatToIntBits0(this.m00)^J.util.Tuple3f.floatToIntBits0(this.m01)^J.util.Tuple3f.floatToIntBits0(this.m02)^J.util.Tuple3f.floatToIntBits0(this.m03)^J.util.Tuple3f.floatToIntBits0(this.m10)^J.util.Tuple3f.floatToIntBits0(this.m11)^J.util.Tuple3f.floatToIntBits0(this.m12)^J.util.Tuple3f.floatToIntBits0(this.m13)^J.util.Tuple3f.floatToIntBits0(this.m20)^J.util.Tuple3f.floatToIntBits0(this.m21)^
J.util.Tuple3f.floatToIntBits0(this.m22)^J.util.Tuple3f.floatToIntBits0(this.m23)^J.util.Tuple3f.floatToIntBits0(this.m30)^J.util.Tuple3f.floatToIntBits0(this.m31)^J.util.Tuple3f.floatToIntBits0(this.m32)^J.util.Tuple3f.floatToIntBits0(this.m33)});$_M(c$,"transformT2",function(a,b){b.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)},"J.util.Tuple4f,J.util.Tuple4f");
$_M(c$,"transform4",function(a){this.transformT2(a,a)},"J.util.Tuple4f");$_M(c$,"transform2",function(a,b){try{b.set(this.m00*a.x+this.m01*a.y+this.m02*a.z+this.m03,this.m10*a.x+this.m11*a.y+this.m12*a.z+this.m13,this.m20*a.x+this.m21*a.y+this.m22*a.z+this.m23)}catch(c){if(!Clazz.exceptionOf(c,NullPointerException))throw c;}},"J.util.P3,J.util.P3");$_M(c$,"transform",function(a){this.transform2(a,a)},"J.util.P3");$_M(c$,"transformV2",function(a,b){b.set(this.m00*a.x+this.m01*a.y+this.m02*a.z,this.m10*
a.x+this.m11*a.y+this.m12*a.z,this.m20*a.x+this.m21*a.y+this.m22*a.z)},"J.util.V3,J.util.V3");$_M(c$,"transformV",function(a){this.transformV2(a,a)},"J.util.V3");$_M(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});$_M(c$,"set",($fz=function(a,b,c,d,e,f,g,h,k,l,m,n,p,q,r,s){this.m00=a;this.m01=b;this.m02=c;this.m03=d;this.m10=e;this.m11=f;this.m12=g;this.m13=h;this.m20=k;this.m21=
l;this.m22=m;this.m23=n;this.m30=p;this.m31=q;this.m32=r;this.m33=s},$fz.isPrivate=!0,$fz),"~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N")}),Clazz.declarePackage("J.util"),Clazz.load(["java.lang.Enum"],"J.util.JmolEdge",null,function(){c$=Clazz.decorateAsClass(function(){this.index=-1;this.order=0;Clazz.instantialize(this,arguments)},J.util,"JmolEdge");c$.getArgbHbondType=$_M(c$,"getArgbHbondType",function(a){return J.util.JmolEdge.argbsHbondType[(a&30720)>>11]},"~N");c$.getBondOrderNumberFromOrder=
$_M(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=$_M(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=$_M(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=$_M(c$,"getPartialBondDotted",function(a){return a&31},"~N");c$.getPartialBondOrder=$_M(c$,"getPartialBondOrder",function(a){return(a&-131073)>>5},"~N");c$.getCovalentBondOrder=$_M(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=$_M(c$,"getBondOrderFromFloat",function(a){switch(Clazz.floatToInt(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=$_M(c$,"getBondOrderFromString",function(a){return J.util.JmolEdge.EnumBondOrder.getCodeFromName(a)},"~S");Clazz.pu$h();c$=Clazz.decorateAsClass(function(){this.code=
0;this.$$name=this.number=null;Clazz.instantialize(this,arguments)},J.util.JmolEdge,"EnumBondOrder",Enum);Clazz.makeConstructor(c$,($fz=function(a,b,c){this.code=a;this.number=b;this.$$name=c},$fz.isPrivate=!0,$fz),"~N,~S,~S");c$.getCodeFromName=$_M(c$,"getCodeFromName",function(a){for(var b,c=0,d=J.util.JmolEdge.EnumBondOrder.values();c<d.length&&((b=d[c])||1);c++)if(b.$$name.equalsIgnoreCase(a))return b.code;return 131071},"~S");c$.getNameFromCode=$_M(c$,"getNameFromCode",function(a){for(var b,
c=0,d=J.util.JmolEdge.EnumBondOrder.values();c<d.length&&((b=d[c])||1);c++)if(b.code==a)return b.$$name;return"?"},"~N");c$.getNumberFromCode=$_M(c$,"getNumberFromCode",function(a){for(var b,c=0,d=J.util.JmolEdge.EnumBondOrder.values();c<d.length&&((b=d[c])||1);c++)if(b.code==a)return b.number;return"?"},"~N");Clazz.defineEnumConstant(c$,"SINGLE",0,[1,"1","single"]);Clazz.defineEnumConstant(c$,"DOUBLE",1,[2,"2","double"]);Clazz.defineEnumConstant(c$,"TRIPLE",2,[3,"3","triple"]);Clazz.defineEnumConstant(c$,
"QUADRUPLE",3,[4,"4","quadruple"]);Clazz.defineEnumConstant(c$,"AROMATIC",4,[515,"1.5","aromatic"]);Clazz.defineEnumConstant(c$,"STRUT",5,[32768,"1","struts"]);Clazz.defineEnumConstant(c$,"H_REGULAR",6,[2048,"1","hbond"]);Clazz.defineEnumConstant(c$,"PARTIAL01",7,[33,"0.5","partial"]);Clazz.defineEnumConstant(c$,"PARTIAL12",8,[66,"1.5","partialDouble"]);Clazz.defineEnumConstant(c$,"PARTIAL23",9,[97,"2.5","partialTriple"]);Clazz.defineEnumConstant(c$,"PARTIAL32",10,[100,"2.5","partialTriple2"]);Clazz.defineEnumConstant(c$,
"AROMATIC_SINGLE",11,[513,"1","aromaticSingle"]);Clazz.defineEnumConstant(c$,"AROMATIC_DOUBLE",12,[514,"2","aromaticDouble"]);Clazz.defineEnumConstant(c$,"UNSPECIFIED",13,[17,"1","unspecified"]);c$=Clazz.p0p();Clazz.defineStatics(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_NEW",131072,"BOND_STRUT",32768,"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)}),Clazz.declarePackage("J.modelset"),Clazz.load(["J.util.BS","$.JmolEdge","J.viewer.JC"],"J.modelset.Bond",["J.util.BSUtil","$.C"],function(){c$=Clazz.decorateAsClass(function(){this.atom2=this.atom1=null;this.shapeVisibilityFlags=
this.colix=this.mad=0;Clazz.instantialize(this,arguments)},J.modelset,"Bond",J.util.JmolEdge);Clazz.makeConstructor(c$,function(a,b,c,d,e){Clazz.superConstructor(this,J.modelset.Bond,[]);this.atom1=a;this.atom2=b;this.colix=e;this.setOrder(c);this.setMad(d)},"J.modelset.Atom,J.modelset.Atom,~N,~N,~N");$_M(c$,"setMad",function(a){this.mad=a;this.setShapeVisibility(0!=a)},"~N");$_M(c$,"setShapeVisibilityFlags",function(a){this.shapeVisibilityFlags=a},"~N");$_M(c$,"getShapeVisibilityFlags",function(){return this.shapeVisibilityFlags});
$_M(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");$_M(c$,"getIdentity",function(){return this.index+1+" "+this.getOrderNumberAsString()+" "+this.atom1.getInfo()+
" -- "+this.atom2.getInfo()+" "+this.atom1.distance(this.atom2)});Clazz.overrideMethod(c$,"isCovalent",function(){return 0!=(this.order&1023)});Clazz.overrideMethod(c$,"isHydrogen",function(){return J.modelset.Bond.isOrderH(this.order)});c$.isOrderH=$_M(c$,"isOrderH",function(a){return 0!=(a&30720)},"~N");$_M(c$,"isStereo",function(){return 0!=(this.order&1024)});$_M(c$,"isPartial",function(){return 0!=(this.order&224)});$_M(c$,"isAromatic",function(){return 0!=(this.order&512)});$_M(c$,"setPaletteID",
function(){},"~N");$_M(c$,"getEnergy",function(){return 0});$_M(c$,"getValence",function(){return!this.isCovalent()?0:this.isPartial()||this.is(515)?1:this.order&7});$_M(c$,"deleteAtomReferences",function(){null!=this.atom1&&this.atom1.deleteBond(this);null!=this.atom2&&this.atom2.deleteBond(this);this.atom1=this.atom2=null});$_M(c$,"setColix",function(a){this.colix=a},"~N");$_M(c$,"setTranslucent",function(a,b){this.colix=J.util.C.getColixTranslucent3(this.colix,a,b)},"~B,~N");$_M(c$,"isTranslucent",
function(){return J.util.C.isColixTranslucent(this.colix)});$_M(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");$_M(c$,"getAtom1",function(){return this.atom1});$_M(c$,"getAtom2",function(){return this.atom2});Clazz.overrideMethod(c$,"getAtomIndex1",function(){return this.atom1.index});Clazz.overrideMethod(c$,"getAtomIndex2",function(){return this.atom2.index});$_M(c$,"getRadius",function(){return this.mad/
2E3});Clazz.overrideMethod(c$,"getCovalentOrder",function(){return J.util.JmolEdge.getCovalentBondOrder(this.order)});$_M(c$,"getOrderName",function(){return J.util.JmolEdge.getBondOrderNameFromOrder(this.order)});$_M(c$,"getOrderNumberAsString",function(){return J.util.JmolEdge.getBondOrderNumberFromOrder(this.order)});$_M(c$,"getColix1",function(){return J.util.C.getColixInherited(this.colix,this.atom1.colixAtom)});$_M(c$,"getColix2",function(){return J.util.C.getColixInherited(this.colix,this.atom2.colixAtom)});
$_M(c$,"getOtherAtom",function(a){return this.atom1===a?this.atom2:this.atom2===a?this.atom1:null},"J.modelset.Atom");$_M(c$,"setIndex",function(a){this.index=a},"~N");$_M(c$,"is",function(a){return(this.order&-131073)==a},"~N");Clazz.overrideMethod(c$,"getOtherAtomNode",function(a){return this.atom1===a?this.atom2:this.atom2===a?this.atom1:null},"J.util.JmolNode");Clazz.overrideMethod(c$,"toString",function(){return this.atom1+" - "+this.atom2});Clazz.pu$h();c$=Clazz.decorateAsClass(function(){this.associatedAtoms=
null;Clazz.instantialize(this,arguments)},J.modelset.Bond,"BondSet",J.util.BS);Clazz.makeConstructor(c$,function(){Clazz.superConstructor(this,J.modelset.Bond.BondSet,[])});$_M(c$,"getAssociatedAtoms",function(){return this.associatedAtoms});Clazz.makeConstructor(c$,function(a){Clazz.superConstructor(this,J.modelset.Bond.BondSet,[]);J.util.BSUtil.copy2(a,this)},"J.util.BS");Clazz.makeConstructor(c$,function(a,b){this.construct(a);this.associatedAtoms=b},"J.util.BS,~A");c$=Clazz.p0p();c$.myVisibilityFlag=
c$.prototype.myVisibilityFlag=J.viewer.JC.getShapeVisibilityFlag(1)}),Clazz.declarePackage("J.util"),Clazz.load(null,"J.util.Measure","java.lang.Float J.util.Eigen $.Escape $.JmolList $.Logger $.P3 $.P4 $.Quaternion $.V3 J.viewer.JC".split(" "),function(){c$=Clazz.declareType(J.util,"Measure");c$.computeAngle=$_M(c$,"computeAngle",function(a,b,c,d,e,f){d.sub2(a,b);e.sub2(c,b);a=d.angle(e);return f?a/0.017453292:a},"J.util.Tuple3f,J.util.Tuple3f,J.util.Tuple3f,J.util.V3,J.util.V3,~B");c$.computeAngleABC=
$_M(c$,"computeAngleABC",function(a,b,c,d){var e=new J.util.V3,f=new J.util.V3;return J.util.Measure.computeAngle(a,b,c,e,f,d)},"J.util.Tuple3f,J.util.Tuple3f,J.util.Tuple3f,~B");c$.computeTorsion=$_M(c$,"computeTorsion",function(a,b,c,d,e){var f=a.x-b.x,g=a.y-b.y;a=a.z-b.z;var h=c.x-b.x,k=c.y-b.y,l=c.z-b.z,m=c.x-d.x,n=c.y-d.y,p=c.z-d.z;d=g*l-a*k;b=a*h-f*l;var q=f*k-g*h;c=k*p-l*n;l=l*m-h*p;h=h*n-k*m;m=1/(c*c+l*l+h*h);k=Math.sqrt(1/(d*d+b*b+q*q));m=Math.sqrt(m);d=(d*c+b*l+q*h)*k*m;1<d&&(d=1);-1>d&&
(d=-1);d=Math.acos(d);f=f*c+g*l+a*h;g=Math.abs(f);d=0<f/g?d:-d;return e?d/0.017453292:d},"J.util.Tuple3f,J.util.Tuple3f,J.util.Tuple3f,J.util.Tuple3f,~B");c$.computeHelicalAxis=$_M(c$,"computeHelicalAxis",function(a,b,c,d,e){var f=new J.util.V3;f.sub2(d,c);var g=e.getTheta(),h=e.getNormal(),k=f.dot(h);1E-4>Math.abs(k)&&(k=0);if(1073741854==b)return 0!=k&&h.scale(k),h;var l=new J.util.V3;l.cross(f,h);0!=l.dot(l)&&l.normalize();var m=new J.util.V3,n=J.util.V3.newV(h);0==k&&(k=1.4E-45);n.scale(k);m.sub2(n,
f);m.scale(0.5);l.scale(0==g?0:m.length()/Math.tan(3.141592653589793*(g/2/180)));f=J.util.V3.newV(l);0!=g&&f.add(m);if(1666189314==b)return f;m=J.util.P3.newP(c);m.sub(f);if(135266320==b)return m;1.4E-45!=k&&h.scale(k);l=J.util.P3.newP(m);l.add(h);g=J.util.Measure.computeTorsion(c,m,l,d,!0);if(Float.isNaN(g)||1E-4>f.length())g=e.getThetaDirectedV(h);if(135266305==b)return Float.$valueOf(g);if(135176==b)return'draw ID "'+a+'" VECTOR '+J.util.Escape.eP(m)+" "+J.util.Escape.eP(h)+" color "+(0>g?"{255.0 200.0 0.0}":
"{255.0 0.0 128.0}");if(1746538509==b)return"measure "+J.util.Escape.eP(c)+J.util.Escape.eP(m)+J.util.Escape.eP(l)+J.util.Escape.eP(d);a=Math.abs(0==g?0:360/g);k=Math.abs(1.4E-45==k?0:h.length()*(0==g?1:360/g));switch(b){case 135266306:return[m,h,f,J.util.P3.new3(g,k,a)];case 1073742001:return[J.util.Escape.eP(m),J.util.Escape.eP(h),J.util.Escape.eP(f),J.util.Escape.eP(J.util.P3.new3(g,k,a))];default:return null}},"~S,~N,J.util.P3,J.util.P3,J.util.Quaternion");c$.getPlaneThroughPoints=$_M(c$,"getPlaneThroughPoints",
function(a,b,c,d,e,f,g){a=J.util.Measure.getNormalThroughPoints(a,b,c,d,e,f);g.set(d.x,d.y,d.z,a)},"J.util.P3,J.util.P3,J.util.P3,J.util.V3,J.util.V3,J.util.V3,J.util.P4");c$.getPlaneThroughPoint=$_M(c$,"getPlaneThroughPoint",function(a,b,c){c.set(b.x,b.y,b.z,-b.dot(J.util.V3.newV(a)))},"J.util.P3,J.util.V3,J.util.P4");c$.distanceToPlane=$_M(c$,"distanceToPlane",function(a,b){return null==a?NaN:(a.x*b.x+a.y*b.y+a.z*b.z+a.w)/Math.sqrt(a.x*a.x+a.y*a.y+a.z*a.z)},"J.util.P4,J.util.P3");c$.distanceToPlaneD=
$_M(c$,"distanceToPlaneD",function(a,b,c){return null==a?NaN:(a.x*c.x+a.y*c.y+a.z*c.z+a.w)/b},"J.util.P4,~N,J.util.P3");c$.distanceToPlaneV=$_M(c$,"distanceToPlaneV",function(a,b,c){return null==a?NaN:(a.x*c.x+a.y*c.y+a.z*c.z+b)/Math.sqrt(a.x*a.x+a.y*a.y+a.z*a.z)},"J.util.V3,~N,J.util.P3");c$.calcNormalizedNormal=$_M(c$,"calcNormalizedNormal",function(a,b,c,d,e,f){e.sub2(b,a);f.sub2(c,a);d.cross(e,f);d.normalize()},"J.util.P3,J.util.P3,J.util.P3,J.util.V3,J.util.V3,J.util.V3");c$.getDirectedNormalThroughPoints=
$_M(c$,"getDirectedNormalThroughPoints",function(a,b,c,d,e,f,g){b=J.util.Measure.getNormalThroughPoints(a,b,c,e,f,g);null!=d&&(c=J.util.P3.newP(a),c.add(e),f=c.distance(d),c.setT(a),c.sub(e),f>c.distance(d)&&(e.scale(-1),b=-b));return b},"J.util.P3,J.util.P3,J.util.P3,J.util.P3,J.util.V3,J.util.V3,J.util.V3");c$.getNormalThroughPoints=$_M(c$,"getNormalThroughPoints",function(a,b,c,d,e,f){J.util.Measure.calcNormalizedNormal(a,b,c,d,e,f);e.setT(a);return-e.dot(d)},"J.util.P3,J.util.P3,J.util.P3,J.util.V3,J.util.V3,J.util.V3");
c$.getPlaneProjection=$_M(c$,"getPlaneProjection",function(a,b,c,d){var e=J.util.Measure.distanceToPlane(b,a);d.set(b.x,b.y,b.z);d.normalize();d.scale(-e);c.setT(a);c.add(d)},"J.util.P3,J.util.P4,J.util.P3,J.util.V3");c$.getNormalFromCenter=$_M(c$,"getNormalFromCenter",function(a,b,c,d,e,f){var g=new J.util.V3,h=new J.util.V3;b=J.util.Measure.getNormalThroughPoints(b,c,d,f,g,h);a=0<J.util.Measure.distanceToPlaneV(f,b,a);a==e&&f.scale(-1);return!a},"J.util.P3,J.util.P3,J.util.P3,J.util.P3,~B,J.util.V3");
c$.getNormalToLine=$_M(c$,"getNormalToLine",function(a,b,c){c.sub2(a,b);c.cross(c,J.viewer.JC.axisY);c.normalize();Float.isNaN(c.x)&&c.set(1,0,0)},"J.util.P3,J.util.P3,J.util.V3");c$.getBisectingPlane=$_M(c$,"getBisectingPlane",function(a,b,c,d,e){c.scaleAdd2(0.5,b,a);d.setT(b);d.normalize();J.util.Measure.getPlaneThroughPoint(c,d,e)},"J.util.P3,J.util.V3,J.util.P3,J.util.V3,J.util.P4");c$.projectOntoAxis=$_M(c$,"projectOntoAxis",function(a,b,c,d){d.sub2(a,b);var e=d.dot(c);a.setT(c);a.scaleAdd(e,
b);d.sub2(a,b)},"J.util.P3,J.util.P3,J.util.V3,J.util.V3");c$.calcBestAxisThroughPoints=$_M(c$,"calcBestAxisThroughPoints",function(a,b,c,d,e){var f=a.length;b.setT(a[0]);c.sub2(a[f-1],b);c.normalize();J.util.Measure.calcAveragePointN(a,f,b);for(var g=0;g++<e&&0.001<J.util.Measure.findAxis(a,f,b,c,d););a=J.util.P3.newP(a[0]);J.util.Measure.projectOntoAxis(a,b,c,d);b.setT(a)},"~A,J.util.P3,J.util.V3,J.util.V3,~N");c$.findAxis=$_M(c$,"findAxis",function(a,b,c,d,e){for(var f=new J.util.V3,g=new J.util.V3,
h=new J.util.P3,k=new J.util.P3,l=J.util.V3.newV(d),m=0,n=0;0<=--b;)h.setT(a[b]),k.setT(h),J.util.Measure.projectOntoAxis(k,c,d,e),g.sub2(h,k),n+=g.lengthSquared(),g.cross(e,g),f.add(g),m+=e.lengthSquared();a=J.util.V3.newV(f);a.scale(1/m);g.cross(a,d);d.add(g);d.normalize();g.setT(d);g.sub(l);return g.length()},"~A,~N,J.util.P3,J.util.V3,J.util.V3");c$.calcAveragePoint=$_M(c$,"calcAveragePoint",function(a,b,c){c.set((a.x+b.x)/2,(a.y+b.y)/2,(a.z+b.z)/2)},"J.util.P3,J.util.P3,J.util.P3");c$.calcAveragePointN=
$_M(c$,"calcAveragePointN",function(a,b,c){c.setT(a[0]);for(var d=1;d<b;d++)c.add(a[d]);c.scale(1/b)},"~A,~N,J.util.P3");c$.getCenterAndPoints=$_M(c$,"getCenterAndPoints",function(a){var b=a.size(),c=Array(b+1);c[0]=new J.util.P3;if(0<b){for(var d=0;d<b;d++)c[0].add(c[d+1]=a.get(d));c[0].scale(1/b)}return c},"J.util.JmolList");c$.getTransformMatrix4=$_M(c$,"getTransformMatrix4",function(a,b,c,d){a=J.util.Measure.getCenterAndPoints(a);var e=J.util.Measure.getCenterAndPoints(b);b=Clazz.newFloatArray(2,
0);var f=J.util.Measure.calculateQuaternionRotation([a,e],b,!1),e=J.util.V3.newV(e[0]);e.sub(a[0]);c.setMV(f.getMatrix(),e);null!=d&&d.setT(a[0]);return b[1]},"J.util.JmolList,J.util.JmolList,J.util.Matrix4f,J.util.P3");c$.calculateQuaternionRotation=$_M(c$,"calculateQuaternionRotation",function(a,b,c){b[1]=NaN;var d=new J.util.Quaternion;if(1==a[0].length||a[0].length!=a[1].length)return d;var e=a[0].length-1;if(c)for(var f=1;f<=e;f++){var g=a[0][f],h=a[1][f];if(Clazz.instanceOf(g,J.modelset.Atom))J.util.Logger.info(" atom 1 "+
g.getInfo()+"\tatom 2 "+h.getInfo());else break}if(2>e)return d;for(var k=c=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=new J.util.P3,u=new J.util.P3,f=e+1;1<=--f;)g=a[0][f],h=a[1][f],t.setT(g),t.sub(a[0][0]),u.setT(h),u.sub(a[0][1]),c+=t.x*u.x,k+=t.x*u.y,l+=t.x*u.z,m+=t.y*u.x,n+=t.y*u.y,p+=t.y*u.z,q+=t.z*u.x,r+=t.z*u.y,s+=t.z*u.z;b[0]=J.util.Measure.getRmsd(a,d);d=Clazz.newDoubleArray(4,4,0);d[0][0]=c+n+s;d[0][1]=d[1][0]=p-r;d[0][2]=d[2][0]=q-l;d[0][3]=d[3][0]=k-m;d[1][1]=c-n-s;d[1][2]=d[2][1]=k+m;d[1][3]=d[3][1]=
q+l;d[2][2]=-c+n-s;d[2][3]=d[3][2]=p+r;d[3][3]=-c-n+s;d=J.util.Eigen.newM(d).getEigenvectorsFloatTransposed()[3];d=J.util.Quaternion.newP4(J.util.P4.new4(d[1],d[2],d[3],d[0]));b[1]=J.util.Measure.getRmsd(a,d);return d},"~A,~A,~B");c$.getRmsd=$_M(c$,"getRmsd",function(a,b){for(var c=0,d=a[0],e=a[1],f=d[0],g=e[0],h=d.length-1,k=new J.util.P3,l=h+1;1<=--l;)k.setT(d[l]),k.sub(f),b.transformP2(k,k),k.add(g),c+=k.distanceSquared(e[l]);return Math.sqrt(c/h)},"~A,J.util.Quaternion");c$.transformPoints=$_M(c$,
"transformPoints",function(a,b,c){for(var d=new J.util.JmolList,e=0;e<a.size();e++){var f=J.util.P3.newP(a.get(e));f.sub(c);b.transform2(f,f);f.add(c);d.addLast(f)}return d},"J.util.JmolList,J.util.Matrix4f,J.util.P3");c$.isInTetrahedron=$_M(c$,"isInTetrahedron",function(a,b,c,d,e,f,g,h,k,l){J.util.Measure.getPlaneThroughPoints(d,e,b,g,h,k,f);var m=0<=J.util.Measure.distanceToPlane(f,a);J.util.Measure.getPlaneThroughPoints(b,e,c,g,h,k,f);if(m!=0<=J.util.Measure.distanceToPlane(f,a))return!1;J.util.Measure.getPlaneThroughPoints(c,
e,d,g,h,k,f);if(m!=0<=J.util.Measure.distanceToPlane(f,a))return!1;J.util.Measure.getPlaneThroughPoints(b,c,d,g,h,k,f);a=J.util.Measure.distanceToPlane(f,a);if(l)return m==0<=a;e=J.util.Measure.distanceToPlane(f,e);return 0>=e*a||Math.abs(e)>Math.abs(a)},"J.util.P3,J.util.P3,J.util.P3,J.util.P3,J.util.P3,J.util.P4,J.util.V3,J.util.V3,J.util.V3,~B");c$.getIntersectionPP=$_M(c$,"getIntersectionPP",function(a,b){var c=a.x,d=a.y,e=a.z,f=a.w,g=b.x,h=b.y,k=b.z,l=b.w,m=J.util.V3.new3(c,d,e),n=J.util.V3.new3(g,
h,k),p=new J.util.V3;p.cross(m,n);var m=Math.abs(p.x),n=Math.abs(p.y),q=Math.abs(p.z);switch(m>n?m>q?1:3:n>q?2:3){case 1:m=0;n=d*k-h*e;if(0.01>Math.abs(n))return null;e=(e*l-k*f)/n;c=(h*f-l*d)/n;break;case 2:n=c*k-g*e;if(0.01>Math.abs(n))return null;m=(e*l-k*f)/n;e=0;c=(g*f-l*c)/n;break;default:n=c*h-g*d;if(0.01>Math.abs(n))return null;m=(d*l-h*f)/n;e=(g*f-l*c)/n;c=0}d=new J.util.JmolList;d.addLast(J.util.P3.new3(m,e,c));p.normalize();d.addLast(p);return d},"J.util.P4,J.util.P4");c$.getIntersection=
$_M(c$,"getIntersection",function(a,b,c,d,e,f){J.util.Measure.getPlaneProjection(a,c,d,e);e.set(c.x,c.y,c.z);e.normalize();null==b&&(b=J.util.V3.newV(e));c=b.dot(e);if(0.01>Math.abs(c))return null;f.setT(d);f.sub(a);d.scaleAdd2(f.dot(e)/c,b,a);return d},"J.util.P3,J.util.V3,J.util.P4,J.util.P3,J.util.V3,J.util.V3");Clazz.defineStatics(c$,"radiansPerDegree",0.017453292519943295)}),Clazz.declarePackage("J.util"),Clazz.load(null,"J.util.Tuple3f",["java.lang.Float"],function(){c$=Clazz.decorateAsClass(function(){this.z=
this.y=this.x=0;Clazz.instantialize(this,arguments)},J.util,"Tuple3f",null,java.io.Serializable);Clazz.makeConstructor(c$,function(){});$_M(c$,"set",function(a,b,c){this.x=a;this.y=b;this.z=c},"~N,~N,~N");$_M(c$,"setA",function(a){this.x=a[0];this.y=a[1];this.z=a[2]},"~A");$_M(c$,"setT",function(a){this.x=a.x;this.y=a.y;this.z=a.z},"J.util.Tuple3f");$_M(c$,"add2",function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z},"J.util.Tuple3f,J.util.Tuple3f");$_M(c$,"add",function(a){this.x+=a.x;this.y+=
a.y;this.z+=a.z},"J.util.Tuple3f");$_M(c$,"sub2",function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z},"J.util.Tuple3f,J.util.Tuple3f");$_M(c$,"sub",function(a){this.x-=a.x;this.y-=a.y;this.z-=a.z},"J.util.Tuple3f");$_M(c$,"scale",function(a){this.x*=a;this.y*=a;this.z*=a},"~N");$_M(c$,"scaleAdd2",function(a,b,c){this.x=a*b.x+c.x;this.y=a*b.y+c.y;this.z=a*b.z+c.z},"~N,J.util.Tuple3f,J.util.Tuple3f");$_M(c$,"scaleAdd",function(a,b){this.x=a*this.x+b.x;this.y=a*this.y+b.y;this.z=a*this.z+b.z},
"~N,J.util.Tuple3f");Clazz.overrideMethod(c$,"hashCode",function(){var a;a=31+J.util.Tuple3f.floatToIntBits0(this.x);a=31*a+J.util.Tuple3f.floatToIntBits0(this.y);a=31*a+J.util.Tuple3f.floatToIntBits0(this.z);return a^a>>32});c$.floatToIntBits0=$_M(c$,"floatToIntBits0",function(a){return 0==a?0:Float.floatToIntBits(a)},"~N");Clazz.overrideMethod(c$,"equals",function(a){return!Clazz.instanceOf(a,J.util.Tuple3f)?!1:this.x==a.x&&this.y==a.y&&this.z==a.z},"~O");Clazz.overrideMethod(c$,"toString",function(){return"("+
this.x+", "+this.y+", "+this.z+")"})}),Clazz.declarePackage("J.util"),Clazz.load(null,"J.util.Tuple4f",["J.util.Tuple3f"],function(){c$=Clazz.decorateAsClass(function(){this.w=this.z=this.y=this.x=0;Clazz.instantialize(this,arguments)},J.util,"Tuple4f",null,java.io.Serializable);Clazz.makeConstructor(c$,function(){});$_M(c$,"set",function(a,b,c,d){this.x=a;this.y=b;this.z=c;this.w=d},"~N,~N,~N,~N");$_M(c$,"scale",function(a){this.x*=a;this.y*=a;this.z*=a;this.w*=a},"~N");Clazz.overrideMethod(c$,"hashCode",
function(){return J.util.Tuple3f.floatToIntBits0(this.x)^J.util.Tuple3f.floatToIntBits0(this.y)^J.util.Tuple3f.floatToIntBits0(this.z)^J.util.Tuple3f.floatToIntBits0(this.w)});Clazz.overrideMethod(c$,"equals",function(a){return!Clazz.instanceOf(a,J.util.Tuple4f)?!1:this.x==a.x&&this.y==a.y&&this.z==a.z&&this.w==a.w},"~O");Clazz.overrideMethod(c$,"toString",function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"})}),Clazz.declarePackage("J.util"),Clazz.load(["J.util.Tuple4f"],"J.util.P4",
null,function(){c$=Clazz.declareType(J.util,"P4",J.util.Tuple4f);c$.new4=$_M(c$,"new4",function(a,b,c,d){var e=new J.util.P4;e.set(a,b,c,d);return e},"~N,~N,~N,~N");c$.newPt=$_M(c$,"newPt",function(a){var b=new J.util.P4;b.set(a.x,a.y,a.z,a.w);return b},"J.util.P4");$_M(c$,"distance",function(a){var b=this.x-a.x,c=this.y-a.y,d=this.z-a.z;a=this.w-a.w;return Math.sqrt(b*b+c*c+d*d+a*a)},"J.util.P4")}),Clazz.declarePackage("J.io"),Clazz.load(["java.lang.Enum"],"J.io.Encoding",null,function(){c$=Clazz.declareType(J.io,
"Encoding",Enum);Clazz.defineEnumConstant(c$,"NONE",0,[]);Clazz.defineEnumConstant(c$,"UTF8",1,[]);Clazz.defineEnumConstant(c$,"UTF_16BE",2,[]);Clazz.defineEnumConstant(c$,"UTF_16LE",3,[]);Clazz.defineEnumConstant(c$,"UTF_32BE",4,[]);Clazz.defineEnumConstant(c$,"UTF_32LE",5,[])}),Clazz.load(["java.io.InputStream"],"java.io.FilterInputStream",null,function(){c$=Clazz.decorateAsClass(function(){this.$in=null;Clazz.instantialize(this,arguments)},java.io,"FilterInputStream",java.io.InputStream);Clazz.makeConstructor(c$,
function(a){Clazz.superConstructor(this,java.io.FilterInputStream,[]);this.$in=a},"java.io.InputStream");$_M(c$,"readByteAsInt",function(){return this.$in.readByteAsInt()});$_M(c$,"read",function(a,b,c){return this.$in.read(a,b,c)},"~A,~N,~N");$_M(c$,"skip",function(a){return this.$in.skip(a)},"~N");$_M(c$,"available",function(){return this.$in.available()});$_M(c$,"close",function(){this.$in.close()});$_M(c$,"mark",function(a){this.$in.mark(a)},"~N");$_M(c$,"reset",function(){this.$in.reset()});
$_M(c$,"markSupported",function(){return this.$in.markSupported()})}),Clazz.load(["java.io.FilterInputStream"],"java.io.BufferedInputStream",["java.io.IOException","java.lang.IndexOutOfBoundsException"],function(){c$=Clazz.decorateAsClass(function(){this.buf=null;this.pos=this.count=0;this.markpos=-1;this.marklimit=0;Clazz.instantialize(this,arguments)},java.io,"BufferedInputStream",java.io.FilterInputStream);$_M(c$,"getInIfOpen",($fz=function(){var a=this.$in;if(null==a)throw new java.io.IOException("Stream closed");
return a},$fz.isPrivate=!0,$fz));$_M(c$,"getBufIfOpen",($fz=function(){var a=this.buf;if(null==a)throw new java.io.IOException("Stream closed");return a},$fz.isPrivate=!0,$fz));Clazz.makeConstructor(c$,function(a){Clazz.superConstructor(this,java.io.BufferedInputStream,[a]);this.buf=Clazz.newByteArray(java.io.BufferedInputStream.defaultBufferSize,0)},"java.io.InputStream");$_M(c$,"fill",($fz=function(){var a=this.getBufIfOpen();if(0>this.markpos)this.pos=0;else if(this.pos>=a.length)if(0<this.markpos){var b=
this.pos-this.markpos;System.arraycopy(a,this.markpos,a,0,b);this.pos=b;this.markpos=0}else a.length>=this.marklimit?(this.markpos=-1,this.pos=0):(b=2*this.pos,b>this.marklimit&&(b=this.marklimit),b=Clazz.newByteArray(b,0),System.arraycopy(a,0,b,0,this.pos),a=this.buf=b);this.count=this.pos;a=this.getInIfOpen().read(a,this.pos,a.length-this.pos);0<a&&(this.count=a+this.pos)},$fz.isPrivate=!0,$fz));Clazz.overrideMethod(c$,"readByteAsInt",function(){return this.pos>=this.count&&(this.fill(),this.pos>=
this.count)?-1:this.getBufIfOpen()[this.pos++]&255});$_M(c$,"read1",($fz=function(a,b,c){var d=this.count-this.pos;if(0>=d){if(c>=this.getBufIfOpen().length&&0>this.markpos)return this.getInIfOpen().read(a,b,c);this.fill();d=this.count-this.pos;if(0>=d)return-1}c=d<c?d:c;System.arraycopy(this.getBufIfOpen(),this.pos,a,b,c);this.pos+=c;return c},$fz.isPrivate=!0,$fz),"~A,~N,~N");Clazz.overrideMethod(c$,"read",function(a,b,c){this.getBufIfOpen();if(0>(b|c|b+c|a.length-(b+c)))throw new IndexOutOfBoundsException;
if(0==c)return 0;for(var d=0;;){var e=this.read1(a,b+d,c-d);if(0>=e)return 0==d?e:d;d+=e;if(d>=c)return d;e=this.$in;if(null!=e&&0>=e.available())return d}},"~A,~N,~N");Clazz.overrideMethod(c$,"skip",function(a){this.getBufIfOpen();if(0>=a)return 0;var b=this.count-this.pos;if(0>=b){if(0>this.markpos)return this.getInIfOpen().skip(a);this.fill();b=this.count-this.pos;if(0>=b)return 0}a=b<a?b:a;this.pos+=a;return a},"~N");Clazz.overrideMethod(c$,"available",function(){var a=this.count-this.pos,b=this.getInIfOpen().available();
return a>2147483647-b?2147483647:a+b});Clazz.overrideMethod(c$,"mark",function(a){this.marklimit=a;this.markpos=this.pos},"~N");Clazz.overrideMethod(c$,"reset",function(){this.getBufIfOpen();if(0>this.markpos)throw new java.io.IOException("Resetting to invalid mark");this.pos=this.markpos});Clazz.overrideMethod(c$,"markSupported",function(){return!0});Clazz.overrideMethod(c$,"close",function(){var a=this.$in;this.$in=null;null!=a&&a.close()});Clazz.defineStatics(c$,"defaultBufferSize",8192)}),$_L(["java.util.Hashtable"],
"java.util.Properties",["java.lang.NullPointerException","$.StringBuffer"],function(){c$=$_C(function(){this.defaults=this.builder=null;$_Z(this,arguments)},java.util,"Properties",java.util.Hashtable);$_K(c$,function(a){$_R(this,java.util.Properties,[]);this.defaults=a},"java.util.Properties");$_M(c$,"dumpString",($fz=function(a,b,c){var d=0;!c&&(d<b.length&&32==b.charAt(d).charCodeAt(0))&&(a.append("\\ "),d++);for(;d<b.length;d++){var e=b.charAt(d);switch(e){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(e)||c&&32==e.charCodeAt(0))&&a.append("\\");if(!(32<=e.charCodeAt(0)&&126>=e.charCodeAt(0))){e=Integer.toHexString(e.charCodeAt(0));a.append("\\u");for(var f=0;f<4-e.length;f++)a.append("0")}a.append(e)}}},$fz.isPrivate=!0,$fz),"StringBuilder,~S,~B");$_M(c$,"getProperty",function(a){var b=this.get(a),b=$_O(b,String)?b:null;null==b&&null!=this.defaults&&(b=this.defaults.getProperty(a));return b},"~S");
$_M(c$,"getProperty",function(a,b){var c=this.get(a),c=$_O(c,String)?c:null;null==c&&null!=this.defaults&&(c=this.defaults.getProperty(a));return null==c?b:c},"~S,~S");$_M(c$,"list",function(a){if(null==a)throw new NullPointerException;for(var b=new StringBuffer(80),c=this.propertyNames();c.hasMoreElements();){var d=c.nextElement();b.append(d);b.append("=");for(var e=this.get(d),f=this.defaults;null==e;)e=f.get(d),f=f.defaults;40<e.length?(b.append(e.substring(0,37)),b.append("...")):b.append(e);
a.println(b.toString());b.setLength(0)}},"java.io.PrintStream");$_M(c$,"list",function(a){if(null==a)throw new NullPointerException;for(var b=new StringBuffer(80),c=this.propertyNames();c.hasMoreElements();){var d=c.nextElement();b.append(d);b.append("=");for(var e=this.get(d),f=this.defaults;null==e;)e=f.get(d),f=f.defaults;40<e.length?(b.append(e.substring(0,37)),b.append("...")):b.append(e);a.println(b.toString());b.setLength(0)}},"java.io.PrintWriter");$_M(c$,"load",function(){},"java.io.InputStream");
$_M(c$,"propertyNames",function(){if(null==this.defaults)return this.keys();for(var a=new java.util.Hashtable(this.defaults.size()+this.size()),b=this.defaults.propertyNames();b.hasMoreElements();)a.put(b.nextElement(),a);for(b=this.keys();b.hasMoreElements();)a.put(b.nextElement(),a);return a.keys()});$_M(c$,"save",function(a,b){try{this.store(a,b)}catch(c){if(!$_O(c,java.io.IOException))throw c;}},"java.io.OutputStream,~S");$_M(c$,"setProperty",function(a,b){return this.put(a,b)},"~S,~S");$_M(c$,
"store",function(){},"java.io.OutputStream,~S");$_M(c$,"loadFromXML",function(){},"java.io.InputStream");$_M(c$,"storeToXML",function(){},"java.io.OutputStream,~S");$_M(c$,"storeToXML",function(){},"java.io.OutputStream,~S,~S");$_M(c$,"substitutePredefinedEntries",($fz=function(a){return a.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll("'","&apos;").replaceAll('"',"&quot;")},$fz.isPrivate=!0,$fz),"~S");$_S(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)}),Clazz.declarePackage("J.util"),Clazz.load(["J.util.BS"],"J.util.Elements",["java.util.Hashtable","J.util.Logger"],function(){c$=Clazz.declareType(J.util,"Elements");
c$.getAtomicMass=$_M(c$,"getAtomicMass",function(a){return 1>a||a>=J.util.Elements.atomicMass.length?0:J.util.Elements.atomicMass[a]},"~N");c$.elementNumberFromSymbol=$_M(c$,"elementNumberFromSymbol",function(a,c){if(null==J.util.Elements.htElementMap){for(var d=new java.util.Hashtable,e=J.util.Elements.elementNumberMax;0<=--e;){var f=J.util.Elements.elementSymbols[e],g=Integer.$valueOf(e);d.put(f,g);2==f.length&&d.put(f.toUpperCase(),g)}for(e=J.util.Elements.altElementMax;4<=--e;)f=J.util.Elements.altElementSymbols[e],
g=Integer.$valueOf(J.util.Elements.altElementNumbers[e]),d.put(f,g),2==f.length&&d.put(f.toUpperCase(),g);$t$=J.util.Elements.htElementMap=d;J.util.Elements.prototype.htElementMap=J.util.Elements.htElementMap;$t$}if(null==a)return 0;d=J.util.Elements.htElementMap.get(a);if(null!=d)return d.intValue();c||J.util.Logger.error("'"+a+"' is not a recognized symbol");return 0},"~S,~B");c$.elementSymbolFromNumber=$_M(c$,"elementSymbolFromNumber",function(a){if(a>=J.util.Elements.elementNumberMax){for(var c=
J.util.Elements.altElementMax;0<=--c;)if(a==J.util.Elements.altElementNumbers[c])return J.util.Elements.altElementSymbols[c];a%=128}if(0>a||a>=J.util.Elements.elementNumberMax)a=0;return J.util.Elements.elementSymbols[a]},"~N");c$.elementNameFromNumber=$_M(c$,"elementNameFromNumber",function(a){if(a>=J.util.Elements.elementNumberMax){for(var c=J.util.Elements.altElementMax;0<=--c;)if(a==J.util.Elements.altElementNumbers[c])return J.util.Elements.altElementNames[c];a%=128}if(0>a||a>=J.util.Elements.elementNumberMax)a=
0;return J.util.Elements.elementNames[a]},"~N");c$.altElementNameFromIndex=$_M(c$,"altElementNameFromIndex",function(a){return J.util.Elements.altElementNames[a]},"~N");c$.altElementNumberFromIndex=$_M(c$,"altElementNumberFromIndex",function(a){return J.util.Elements.altElementNumbers[a]},"~N");c$.altElementSymbolFromIndex=$_M(c$,"altElementSymbolFromIndex",function(a){return J.util.Elements.altElementSymbols[a]},"~N");c$.altIsotopeSymbolFromIndex=$_M(c$,"altIsotopeSymbolFromIndex",function(a){a=
J.util.Elements.altElementNumbers[a];return(a>>7)+J.util.Elements.elementSymbolFromNumber(a&127)},"~N");c$.altIsotopeSymbolFromIndex2=$_M(c$,"altIsotopeSymbolFromIndex2",function(a){a=J.util.Elements.altElementNumbers[a];return J.util.Elements.elementSymbolFromNumber(a&127)+(a>>7)},"~N");c$.getElementNumber=$_M(c$,"getElementNumber",function(a){return a%128},"~N");c$.getIsotopeNumber=$_M(c$,"getIsotopeNumber",function(a){return a>>7},"~N");c$.getAtomicAndIsotopeNumber=$_M(c$,"getAtomicAndIsotopeNumber",
function(a,c){return(0>a?0:a)+(0>=c?0:c<<7)},"~N,~N");c$.altElementIndexFromNumber=$_M(c$,"altElementIndexFromNumber",function(a){for(var c=0;c<J.util.Elements.altElementMax;c++)if(J.util.Elements.altElementNumbers[c]==a)return c;return 0},"~N");c$.getNaturalIsotope=$_M(c$,"getNaturalIsotope",function(a){for(var c=0;c<J.util.Elements.naturalIsotopeMasses.length;c+=2)if(J.util.Elements.naturalIsotopeMasses[c]==a)return J.util.Elements.naturalIsotopeMasses[++c];return 0},"~N");c$.isNaturalIsotope=$_M(c$,
"isNaturalIsotope",function(a){return 0<="1H,12C,14N,".indexOf(a+",")},"~S");c$.getBondingRadiusFloat=$_M(c$,"getBondingRadiusFloat",function(a,c){var d=J.util.Elements.getElementNumber(a);return 0<c&&J.util.Elements.bsCations.get(d)?J.util.Elements.getBondingRadFromTable(d,c,J.util.Elements.cationLookupTable):0>c&&J.util.Elements.bsAnions.get(d)?J.util.Elements.getBondingRadFromTable(d,c,J.util.Elements.anionLookupTable):J.util.Elements.covalentMars[d]/1E3},"~N,~N");c$.getBondingRadFromTable=$_M(c$,
"getBondingRadFromTable",function(a,c,d){c=(a<<4)+(c+4);for(var e=0,f=0,g=0,h=Clazz.doubleToInt(d.length/2);g!=h;)if(f=Clazz.doubleToInt((g+h)/2),e=d[f<<1],e>c)h=f;else if(e<c)g=f+1;else return d[(f<<1)+1]/1E3;e>c&&f--;e=d[f<<1];a!=e>>4&&f++;return d[(f<<1)+1]/1E3},"~N,~N,~A");c$.getVanderwaalsMar=$_M(c$,"getVanderwaalsMar",function(a,c){return J.util.Elements.vanderwaalsMars[(a<<2)+c.pt%4]},"~N,J.constant.EnumVdw");c$.getHydrophobicity=$_M(c$,"getHydrophobicity",function(a){return 1>a||a>=J.util.Elements.hydrophobicities.length?
0:J.util.Elements.hydrophobicities[a]},"~N");c$.getAllredRochowElectroNeg=$_M(c$,"getAllredRochowElectroNeg",function(a){return 0<a&&a<J.util.Elements.electroNegativities.length?J.util.Elements.electroNegativities[a]:0},"~N");Clazz.defineStatics(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;Clazz.defineStatics(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;Clazz.defineStatics(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 J.util.BS;c$.bsAnions=c$.prototype.bsAnions=new J.util.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);Clazz.defineStatics(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||Clazz.doubleToInt(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);Clazz.defineStatics(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])}),Clazz.declarePackage("J.util"),Clazz.load(["J.util.Tuple3f"],"J.util.V3",null,function(){c$=Clazz.declareType(J.util,"V3",J.util.Tuple3f);c$.newV=$_M(c$,"newV",function(a){var b=new J.util.V3;b.x=a.x;b.y=a.y;b.z=a.z;return b},"J.util.Tuple3f");c$.new3=$_M(c$,"new3",function(a,b,c){var d=new J.util.V3;d.x=a;d.y=b;d.z=c;return d},"~N,~N,~N");$_M(c$,"lengthSquared",function(){return this.x*this.x+
this.y*this.y+this.z*this.z});$_M(c$,"length",function(){return Math.sqrt(this.lengthSquared())});$_M(c$,"cross",function(a,b){this.set(a.y*b.z-a.z*b.y,a.z*b.x-a.x*b.z,a.x*b.y-a.y*b.x)},"J.util.V3,J.util.V3");$_M(c$,"dot",function(a){return this.x*a.x+this.y*a.y+this.z*a.z},"J.util.V3");$_M(c$,"normalize",function(){var a=this.length();this.x/=a;this.y/=a;this.z/=a});$_M(c$,"angle",function(a){var b=this.y*a.z-this.z*a.y,c=this.z*a.x-this.x*a.z,d=this.x*a.y-this.y*a.x,b=Math.sqrt(b*b+c*c+d*d);return Math.abs(Math.atan2(b,
this.dot(a)))},"J.util.V3")}),Clazz.declarePackage("J.viewer"),Clazz.load(["java.io.BufferedInputStream","java.util.Properties","J.util.Elements","$.SB","$.V3"],"J.viewer.JC",["java.lang.NullPointerException","java.util.Hashtable","J.util.Logger","$.Parser"],function(){c$=Clazz.declareType(J.viewer,"JC");c$.embedScript=$_M(c$,"embedScript",function(a){return"\n/****** Jmol Embedded Script **** \n"+a+"\n**/"},"~S");c$.getSpecialAtomName=$_M(c$,"getSpecialAtomName",function(a){return J.viewer.JC.specialAtomNames[a]},
"~N");c$.getSpecialAtomNames=$_M(c$,"getSpecialAtomNames",($fz=function(){$t$=J.viewer.JC.htSpecialAtoms=new java.util.Hashtable;J.viewer.JC.prototype.htSpecialAtoms=J.viewer.JC.htSpecialAtoms;$t$;for(var a=J.viewer.JC.specialAtomNames.length;0<=--a;){var b=J.viewer.JC.specialAtomNames[a];null!=b&&J.viewer.JC.htSpecialAtoms.put(b,Integer.$valueOf(a))}},$fz.isPrivate=!0,$fz));c$.lookupSpecialAtomID=$_M(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=$_M(c$,"getAminoAcidValenceAndCharge",function(a,b,c){if(null==a||0==a.length||3<a.length||b.equals("CA")||b.equals("CB"))return!1;var g=b.charAt(0),h=1==b.length?"\x00":b.charAt(1),k=!1,l=c[3];switch(a.length){case 3:if(1==b.length)switch(g){case "N":if(1<l)return!1;c[1]=1;break;case "O":k=0>"HOH;DOD;WAT".indexOf(a);break;default:k=!0}else a+=g,k=0<="ARGN;ASNN;ASNO;ASPO;GLNN;GLNO;GLUO;HISN;HISC;PHECTRPC;TRPN;TYRC".indexOf(a),
0<="LYSN".indexOf(a)?c[1]=1:"O"==g&&"X"==h&&(c[1]=-1);break;case 1:case 2:if(2<b.length&&"'"==b.charAt(2))return!1;switch(g){case "C":if("7"==h)return!1;break;case "N":switch(h){case "1":case "3":0<="A3;A1;C3;G3;I3".indexOf(""+a.charAt(a.length-1)+h)&&c[0]--;break;case "7":c[0]--}}k=!0}if(k)switch(g){case "N":c[2]=2;break;case "C":c[2]=2;c[0]--;break;case "O":c[0]--}return!0},"~S,~S,~A");c$.getStandardPdbHydrogenCount=$_M(c$,"getStandardPdbHydrogenCount",function(a){return 0>a||a>=J.viewer.JC.pdbHydrogenCount.length?
-1:J.viewer.JC.pdbHydrogenCount[a]},"~N");c$.getPdbBondInfo=$_M(c$,"getPdbBondInfo",function(a){if(0>a||a>J.viewer.JC.pdbBondInfo.length)return null;a=J.viewer.JC.pdbBondInfo[a];for(var b=J.util.Parser.getTokens(a),c=Array(Clazz.doubleToInt(b.length/2)),g=0,h=0;g<c.length;g++){var k=b[h++],l=b[h++];if(1==l.length)switch(l.charAt(0)){case "N":l="H@H2";break;case "B":l="HB3@HB2";break;case "D":l="HD2@HD3";break;case "G":l="HG3@HG2";break;case "2":l="H2''@H2'";break;case "5":l="H5''@H5'"}"H"!=l.charAt(0)&&
0<k.compareTo(l)&&(a=l,l=k,k=a);c[g]=[k,l,l.startsWith("H")?"1":"2"]}return c},"~N");c$.checkCarbohydrate=$_M(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],[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=$_M(c$,"getGroup3List",function(){if(null!=J.viewer.JC.group3List)return J.viewer.JC.group3List;for(var a=new J.util.SB,b=1;42>b;b++)a.append(",[").append((J.viewer.JC.predefinedGroup3Names[b]+"   ").substring(0,3)+"]");a.append(",[AHR],[ALL],[AMU],[ARA],[ARB],[BDF],[BDR],[BGC],[BMA],[FCA],[FCB],[FRU],[FUC],[FUL],[GAL],[GLA],[GLC],[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]");
$t$=J.viewer.JC.group3Count=Clazz.doubleToInt(a.length()/6);J.viewer.JC.prototype.group3Count=J.viewer.JC.group3Count;$t$;return $t$=J.viewer.JC.group3List=a.toString(),J.viewer.JC.prototype.group3List=J.viewer.JC.group3List,$t$});c$.isHetero=$_M(c$,"isHetero",function(a){return 42<=J.viewer.JC.getGroup3Pt(a)},"~S");c$.getGroup3Pt=$_M(c$,"getGroup3Pt",($fz=function(a){J.viewer.JC.getGroup3List();var b=(new J.util.SB).append("[");b.append(a);switch(a.length){case 1:b.append("  ");break;case 2:b.append(" ")}a=
J.viewer.JC.group3List.indexOf(b.toString());return 0>a?2147483647:Clazz.doubleToInt(a/6)+1},$fz.isPrivate=!0,$fz),"~S");c$.getGroup3Count=$_M(c$,"getGroup3Count",function(){if(0<J.viewer.JC.group3Count)return J.viewer.JC.group3Count;J.viewer.JC.getGroup3List();return $t$=J.viewer.JC.group3Count=Clazz.doubleToInt(J.viewer.JC.group3List.length/6),J.viewer.JC.prototype.group3Count=J.viewer.JC.group3Count,$t$});c$.isShapeSecondary=$_M(c$,"isShapeSecondary",function(a){return 9<=a&&16>a},"~N");c$.shapeTokenIndex=
$_M(c$,"shapeTokenIndex",function(a){switch(a){case 1141899265: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=$_M(c$,"getShapeClassName",
function(a,b){return 0>a?J.viewer.JC.shapeClassBases[~a]:"J."+(b?"render":"shape")+(9<=a&&16>a?"bio.":16<=a&&23>a?"special.":24<=a&&29>a?"surface.":23==a?"cgo.":".")+J.viewer.JC.shapeClassBases[a]},"~N,~B");c$.getShapeVisibilityFlag=$_M(c$,"getShapeVisibilityFlag",function(a){return 4<<a},"~N");Clazz.defineStatics(c$,"copyright","(C) 2012 Jmol Development","version",null,"date",null);var a=null,b=null;try{a=___JmolVersion,b=___JmolDate,null!=b&&(b=b.substring(8,24),a=a.substring(1,a.length-1))}catch(c){if(!Clazz.exceptionOf(c,
Exception))throw c;}finally{a=___JmolVersion,b=___JmolDate}$t$=J.viewer.JC.version=null!=a?a:"(Unknown version)";J.viewer.JC.prototype.version=J.viewer.JC.version;$t$;$t$=J.viewer.JC.date=null!=b?b:"(Unknown date)";J.viewer.JC.prototype.date=J.viewer.JC.date;$t$;Clazz.defineStatics(c$,"officialRelease",!1,"CLASSBASE_OPTIONS","J.","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 ##","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=J.util.V3.new3(0,0,0);c$.axisX=c$.prototype.axisX=J.util.V3.new3(1,0,0);c$.axisY=c$.prototype.axisY=J.util.V3.new3(0,1,0);c$.axisZ=
c$.prototype.axisZ=J.util.V3.new3(0,0,1);c$.axisNX=c$.prototype.axisNX=J.util.V3.new3(-1,0,0);c$.axisNY=c$.prototype.axisNY=J.util.V3.new3(0,-1,0);c$.axisNZ=c$.prototype.axisNZ=J.util.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];Clazz.defineStatics(c$,"XY_ZTOP",100,"DEFAULT_PERCENT_VDW_ATOM",23,"DEFAULT_BOND_RADIUS",0.15,"DEFAULT_BOND_MILLIANGSTROM_RADIUS",Clazz.floatToShort(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,"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]);c$.FORMAL_CHARGE_COLIX_RED=
c$.prototype.FORMAL_CHARGE_COLIX_RED=J.util.Elements.elementSymbols.length;c$.FORMAL_CHARGE_COLIX_WHITE=c$.prototype.FORMAL_CHARGE_COLIX_WHITE=J.viewer.JC.FORMAL_CHARGE_COLIX_RED+4;c$.FORMAL_CHARGE_COLIX_BLUE=c$.prototype.FORMAL_CHARGE_COLIX_BLUE=J.viewer.JC.FORMAL_CHARGE_COLIX_WHITE+7;Clazz.defineStatics(c$,"FORMAL_CHARGE_RANGE_SIZE",12,"argbsFormalCharge",[4294901760,4294918208,4294934656,4294951104,4294967295,4292401407,4290032895,4287664383,4285295871,4282927359,4280558847,4278190335],"FORMAL_CHARGE_INDEX_WHITE",
4);c$.FORMAL_CHARGE_INDEX_MAX=c$.prototype.FORMAL_CHARGE_INDEX_MAX=J.viewer.JC.argbsFormalCharge.length;c$.PARTIAL_CHARGE_COLIX_RED=c$.prototype.PARTIAL_CHARGE_COLIX_RED=J.viewer.JC.FORMAL_CHARGE_COLIX_BLUE+1;c$.PARTIAL_CHARGE_COLIX_WHITE=c$.prototype.PARTIAL_CHARGE_COLIX_WHITE=J.viewer.JC.PARTIAL_CHARGE_COLIX_RED+15;c$.PARTIAL_CHARGE_COLIX_BLUE=c$.prototype.PARTIAL_CHARGE_COLIX_BLUE=J.viewer.JC.PARTIAL_CHARGE_COLIX_WHITE+15;Clazz.defineStatics(c$,"PARTIAL_CHARGE_RANGE_SIZE",31,"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],"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;Clazz.defineStatics(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".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;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;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;P OP1 C5' 5 C4' H4' C3' H3' C2' 2 C1' H1' C2 O2 N3 H3 C4 O4 C5 C6 C7 H7? C6 H6;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;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;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;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;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;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;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;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".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],[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<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?smiles= 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","1 0 C 0 0","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,"CURSOR_DEFAULT",
0,"CURSOR_HAND",1,"CURSOR_CROSSHAIR",2,"CURSOR_MOVE",3,"CURSOR_WAIT",4,"CURSOR_ZOOM",5,"binaryExtensions",";pse=PyMOL;","SCRIPT_COMPLETED","Script completed");if(12!=J.viewer.JC.argbsFormalCharge.length)throw J.util.Logger.error("formal charge color table length"),new NullPointerException;if(36!=J.viewer.JC.shapeClassBases.length)throw J.util.Logger.error("shapeClassBases wrong length"),new NullPointerException;if(24!=J.viewer.JC.argbsAmino.length)throw J.util.Logger.error("argbsAmino wrong length"),
new NullPointerException;if(42!=J.viewer.JC.argbsShapely.length)throw J.util.Logger.error("argbsShapely wrong length"),new NullPointerException;if(J.viewer.JC.argbsChainHetero.length!=J.viewer.JC.argbsChainAtom.length)throw J.util.Logger.error("argbsChainHetero wrong length"),new NullPointerException;if(36!=J.viewer.JC.shapeClassBases.length)throw J.util.Logger.error("the shapeClassBases array has the wrong length"),new NullPointerException;}),Clazz.declarePackage("J.util"),c$=Clazz.decorateAsClass(function(){this.entryCount=
0;this.entries=null;Clazz.instantialize(this,arguments)},J.util,"Int2IntHash"),Clazz.makeConstructor(c$,function(a){this.entries=Array(a)},"~N"),$_M(c$,"get",function(a){for(var b=this.entries,b=b[(a&2147483647)%b.length];null!=b;b=b.next)if(b.key==a)return b.value;return-2147483648},"~N"),$_M(c$,"put",function(a,b){for(var c=this.entries,d=(a&2147483647)%c.length,d=c[d];null!=d;d=d.next)if(d.key==a){d.value=b;return}this.entryCount>c.length&&this.rehash();c=this.entries;d=(a&2147483647)%c.length;
c[d]=new J.util.Int2IntHash.Entry(a,b,c[d]);++this.entryCount},"~N,~N"),$_M(c$,"rehash",($fz=function(){for(var a=this.entries,b=a.length,c=2*b+1,d=Array(c);0<=--b;)for(var e=a[b];null!=e;){var f=e,e=e.next,g=(f.key&2147483647)%c;f.next=d[g];d[g]=f}this.entries=d},$fz.isPrivate=!0,$fz)),Clazz.pu$h(),c$=Clazz.decorateAsClass(function(){this.value=this.key=0;this.next=null;Clazz.instantialize(this,arguments)},J.util.Int2IntHash,"Entry"),Clazz.makeConstructor(c$,function(a,b,c){this.key=a;this.value=
b;this.next=c},"~N,~N,J.util.Int2IntHash.Entry"),c$=Clazz.p0p(),Clazz.declarePackage("J.util"),Clazz.load(["J.util.Int2IntHash"],"J.util.C","java.lang.Float J.constant.EnumPalette J.util.ArrayUtil $.ColorUtil $.Escape $.Logger $.Parser $.SB".split(" "),function(){c$=Clazz.declareType(J.util,"C");Clazz.makeConstructor(c$,function(){});c$.getColix=$_M(c$,"getColix",function(a){if(0==a)return 0;var c=0;-16777216!=(a&4278190080)&&(c=J.util.C.getTranslucentFlag(a>>24&255),a|=4278190080);var d=J.util.C.colixHash.get(a);
3==(d&3)&&(c=0);return 0<d?d|c:J.util.C.allocateColix(a)|c},"~N");c$.allocateColix=$_M(c$,"allocateColix",function(a){for(var c=J.util.C.colixMax;4<=--c;)if((a&16777215)==(J.util.C.argbs[c]&16777215))return c;J.util.C.colixMax==J.util.C.argbs.length&&(c=2*J.util.C.colixMax,2048<c&&(c=2048),$t$=J.util.C.argbs=J.util.ArrayUtil.arrayCopyI(J.util.C.argbs,c),J.util.C.prototype.argbs=J.util.C.argbs,$t$,null!=J.util.C.argbsGreyscale&&($t$=J.util.C.argbsGreyscale=J.util.ArrayUtil.arrayCopyI(J.util.C.argbsGreyscale,
c),J.util.C.prototype.argbsGreyscale=J.util.C.argbsGreyscale,$t$));J.util.C.argbs[J.util.C.colixMax]=a;null!=J.util.C.argbsGreyscale&&(J.util.C.argbsGreyscale[J.util.C.colixMax]=J.util.ColorUtil.calcGreyscaleRgbFromRgb(a));J.util.C.colixHash.put(a,J.util.C.colixMax);return 2047>J.util.C.colixMax?($t$=J.util.C.colixMax++,J.util.C.prototype.colixMax=J.util.C.colixMax,$t$):J.util.C.colixMax},"~N");c$.setLastGrey=$_M(c$,"setLastGrey",function(a){J.util.C.calcArgbsGreyscale();J.util.C.argbsGreyscale[2047]=
J.util.ColorUtil.calcGreyscaleRgbFromRgb(a)},"~N");c$.calcArgbsGreyscale=$_M(c$,"calcArgbsGreyscale",function(){if(null==J.util.C.argbsGreyscale){for(var a=Clazz.newIntArray(J.util.C.argbs.length,0),c=J.util.C.argbs.length;4<=--c;)a[c]=J.util.ColorUtil.calcGreyscaleRgbFromRgb(J.util.C.argbs[c]);$t$=J.util.C.argbsGreyscale=a;J.util.C.prototype.argbsGreyscale=J.util.C.argbsGreyscale;$t$}});c$.getArgbGreyscale=$_M(c$,"getArgbGreyscale",function(a){null==J.util.C.argbsGreyscale&&J.util.C.calcArgbsGreyscale();
return J.util.C.argbsGreyscale[a&-30721]},"~N");c$.getColixO=$_M(c$,"getColixO",function(a){if(null==a)return 0;if(Clazz.instanceOf(a,J.constant.EnumPalette))return a===J.constant.EnumPalette.NONE?0:2;if(Clazz.instanceOf(a,Integer))return J.util.C.getColix(a.intValue());if(Clazz.instanceOf(a,String))return J.util.C.getColixS(a);if(Clazz.instanceOf(a,Byte))return 0==a.byteValue()?0:2;J.util.Logger.debugging&&J.util.Logger.debug("?? getColix("+a+")");return 22},"~O");c$.getTranslucentFlag=$_M(c$,"getTranslucentFlag",
($fz=function(a){return 0==a?0:0>a?30720:Float.isNaN(a)||255<=a||1==a?16384:(Clazz.doubleToInt(Math.floor(1>a?256*a:9>=a?Clazz.doubleToInt(Math.floor(a-1))<<5:15>a?256:a))>>5&15)<<11},$fz.isPrivate=!0,$fz),"~N");c$.isColixLastAvailable=$_M(c$,"isColixLastAvailable",function(a){return 0<a&&2047==(a&2047)},"~N");c$.getArgb=$_M(c$,"getArgb",function(a){return J.util.C.argbs[a&-30721]},"~N");c$.isColixColorInherited=$_M(c$,"isColixColorInherited",function(a){switch(a){case 0:case 1:return!0;default:return 1==
(a&-30721)}},"~N");c$.getColixInherited=$_M(c$,"getColixInherited",function(a,c){switch(a){case 0:return c;case 1:return c&-30721;default:return 1==(a&-30721)?c&-30721|a&30720:a}},"~N,~N");c$.isColixTranslucent=$_M(c$,"isColixTranslucent",function(a){return 0!=(a&30720)},"~N");c$.getChangeableColixIndex=$_M(c$,"getChangeableColixIndex",function(a){return 0<=a?-1:a&2047},"~N");c$.getColixTranslucent3=$_M(c$,"getColixTranslucent3",function(a,c,d){0==a&&(a=1);a&=-30721;return c?a|J.util.C.getTranslucentFlag(d):
a},"~N,~B,~N");c$.copyColixTranslucency=$_M(c$,"copyColixTranslucency",function(a,c){return J.util.C.getColixTranslucent3(c,J.util.C.isColixTranslucent(a),J.util.C.getColixTranslucencyLevel(a))},"~N,~N");c$.getColixTranslucencyFractional=$_M(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=$_M(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=$_M(c$,"getColixS",function(a){var c=J.util.ColorUtil.getArgbFromString(a);return 0!=c?J.util.C.getColix(c):"none".equalsIgnoreCase(a)?0:"opaque".equalsIgnoreCase(a)?1:2},"~S");c$.getColixArray=$_M(c$,"getColixArray",function(a){if(null==a||0==a.length)return null;a=J.util.Parser.getTokens(a);for(var c=Clazz.newShortArray(a.length,0),d=0;d<a.length;d++)if(c[d]=J.util.C.getColix(J.util.ColorUtil.getArgbFromString(a[d])),0==c[d])return null;
return c},"~S");c$.getHexCode=$_M(c$,"getHexCode",function(a){return J.util.Escape.escapeColor(J.util.C.getArgb(a))},"~N");c$.getHexCodes=$_M(c$,"getHexCodes",function(a){if(null==a)return null;for(var c=new J.util.SB,d=0;d<a.length;d++)c.append(0==d?"":" ").append(J.util.C.getHexCode(a[d]));return c.toString()},"~A");c$.getColixTranslucent=$_M(c$,"getColixTranslucent",function(a){var c=a>>24&255;return 255==c?J.util.C.getColix(a):J.util.C.getColixTranslucent3(J.util.C.getColix(a),!0,c/255)},"~N");
Clazz.defineStatics(c$,"INHERIT_ALL",0,"INHERIT_COLOR",1,"USE_PALETTE",2,"RAW_RGB",3,"SPECIAL_COLIX_MAX",4,"colixMax",4,"argbs",Clazz.newIntArray(128,0),"argbsGreyscale",null);c$.colixHash=c$.prototype.colixHash=new J.util.Int2IntHash(256);Clazz.defineStatics(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])}),
Clazz.declarePackage("J.util"),Clazz.load(null,"J.util.Eigen","java.lang.Float java.util.Arrays J.util.Escape $.Logger $.Matrix3f $.Quadric $.V3".split(" "),function(){c$=Clazz.decorateAsClass(function(){this.n=0;this.V=this.e=this.d=null;Clazz.instantialize(this,arguments)},J.util,"Eigen");Clazz.makeConstructor(c$,function(a){this.n=a;this.V=Clazz.newDoubleArray(a,a,0);this.d=Clazz.newDoubleArray(a,0);this.e=Clazz.newDoubleArray(a,0)},"~N");c$.newM=$_M(c$,"newM",function(a){var b=new J.util.Eigen(a.length);
b.calc(a);return b},"~A");c$.getUnitVectors=$_M(c$,"getUnitVectors",function(a,b,c){J.util.Eigen.newM(a).set(b,c);J.util.Eigen.sort(b,c)},"~A,~A,~A");$_M(c$,"set",($fz=function(a,b){for(var c=this.getEigenvectorsFloatTransposed(),d=this.getRealEigenvalues(),e=0;e<this.n;e++)null==a[e]&&(a[e]=new J.util.V3),a[e].setA(c[e]),b[e]=Math.sqrt(Math.abs(d[e]))},$fz.isPrivate=!0,$fz),"~A,~A");$_M(c$,"calc",function(a){for(var b=0;b<this.n;b++)for(var c=0;c<this.n;c++)this.V[b][c]=a[b][c];this.tred2();this.tql2()},
"~A");$_M(c$,"getRealEigenvalues",function(){return this.d});$_M(c$,"getImagEigenvalues",function(){return this.e});$_M(c$,"getEigenvalues",function(){return this.d});$_M(c$,"getEigenvectorsFloatTransposed",function(){for(var a=Clazz.newFloatArray(this.n,this.n,0),b=this.n;0<=--b;)for(var c=this.n;0<=--c;)a[c][b]=this.V[b][c];return a});$_M(c$,"getEigenVectors3",function(){for(var a=Array(3),b=0;3>b;b++)a[b]=J.util.V3.new3(this.V[0][b],this.V[1][b],this.V[2][b]);return a});$_M(c$,"tred2",($fz=function(){for(var a=
0;a<this.n;a++)this.d[a]=this.V[this.n-1][a];for(var b=this.n-1;0<b;b--){for(var c=a=0,d=0;d<b;d++)a+=Math.abs(this.d[d]);if(0==a){this.e[b]=this.d[b-1];for(a=0;a<b;a++)this.d[a]=this.V[b-1][a],this.V[b][a]=0,this.V[a][b]=0}else{for(d=0;d<b;d++)this.d[d]/=a,c+=this.d[d]*this.d[d];var e=this.d[b-1],f=Math.sqrt(c);0<e&&(f=-f);this.e[b]=a*f;c-=e*f;this.d[b-1]=e-f;for(a=0;a<b;a++)this.e[a]=0;for(a=0;a<b;a++){e=this.d[a];this.V[a][b]=e;f=this.e[a]+this.V[a][a]*e;for(d=a+1;d<=b-1;d++)f+=this.V[d][a]*this.d[d],
this.e[d]+=this.V[d][a]*e;this.e[a]=f}for(a=e=0;a<b;a++)this.e[a]/=c,e+=this.e[a]*this.d[a];d=e/(c+c);for(a=0;a<b;a++)this.e[a]-=d*this.d[a];for(a=0;a<b;a++){e=this.d[a];f=this.e[a];for(d=a;d<=b-1;d++)this.V[d][a]-=e*this.e[d]+f*this.d[d];this.d[a]=this.V[b-1][a];this.V[b][a]=0}}this.d[b]=c}for(b=0;b<this.n-1;b++){this.V[this.n-1][b]=this.V[b][b];this.V[b][b]=1;c=this.d[b+1];if(0!=c){for(d=0;d<=b;d++)this.d[d]=this.V[d][b+1]/c;for(a=0;a<=b;a++){for(d=f=0;d<=b;d++)f+=this.V[d][b+1]*this.V[d][a];for(d=
0;d<=b;d++)this.V[d][a]-=f*this.d[d]}}for(d=0;d<=b;d++)this.V[d][b+1]=0}for(a=0;a<this.n;a++)this.d[a]=this.V[this.n-1][a],this.V[this.n-1][a]=0;this.V[this.n-1][this.n-1]=1;this.e[0]=0},$fz.isPrivate=!0,$fz));$_M(c$,"tql2",($fz=function(){for(var a=1;a<this.n;a++)this.e[a-1]=this.e[a];for(var b=this.e[this.n-1]=0,c=0,d=Math.pow(2,-52),e=0;e<this.n;e++){for(var c=Math.max(c,Math.abs(this.d[e])+Math.abs(this.e[e])),f=e;f<this.n&&!(Math.abs(this.e[f])<=d*c);)f++;if(f>e){do{var g=this.d[e],h=(this.d[e+
1]-g)/(2*this.e[e]),k=J.util.Eigen.hypot(h,1);0>h&&(k=-k);this.d[e]=this.e[e]/(h+k);this.d[e+1]=this.e[e]*(h+k);for(var l=this.d[e+1],m=g-this.d[e],a=e+2;a<this.n;a++)this.d[a]-=m;for(var b=b+m,h=this.d[f],n=k=1,p=k,q=this.e[e+1],r=0,s=0,a=f-1;a>=e;a--){p=n;n=k;s=r;g=k*this.e[a];m=k*h;k=J.util.Eigen.hypot(h,this.e[a]);this.e[a+1]=r*k;r=this.e[a]/k;k=h/k;h=k*this.d[a]-r*g;this.d[a+1]=m+r*(k*g+r*this.d[a]);for(g=0;g<this.n;g++)m=this.V[g][a+1],this.V[g][a+1]=r*this.V[g][a]+k*m,this.V[g][a]=k*this.V[g][a]-
r*m}h=-r*s*p*q*this.e[e]/l;this.e[e]=r*h;this.d[e]=k*h}while(Math.abs(this.e[e])>d*c)}this.d[e]+=b;this.e[e]=0}for(a=0;a<this.n-1;a++){g=a;h=this.d[a];for(b=a+1;b<this.n;b++)this.d[b]<h&&(g=b,h=this.d[b]);if(g!=a){this.d[g]=this.d[a];this.d[a]=h;for(b=0;b<this.n;b++)h=this.V[b][a],this.V[b][a]=this.V[b][g],this.V[b][g]=h}}},$fz.isPrivate=!0,$fz));c$.hypot=$_M(c$,"hypot",($fz=function(a,b){var c;Math.abs(a)>Math.abs(b)?(c=b/a,c=Math.abs(a)*Math.sqrt(1+c*c)):0!=b?(c=a/b,c=Math.abs(b)*Math.sqrt(1+c*
c)):c=0;return c},$fz.isPrivate=!0,$fz),"~N,~N");c$.getEllipsoidDD=$_M(c$,"getEllipsoidDD",function(a){var b=new J.util.Eigen(3);b.calc(a);for(var c=new J.util.Matrix3f,d=Clazz.newFloatArray(9,0),e=0,f=0;3>e;e++)for(var g=0;3>g;g++)d[f++]=a[e][g];c.setA(d);a=b.getEigenVectors3();d=new J.util.V3;f=new J.util.V3;for(e=0;3>e;e++)d.setT(a[e]),c.transform(d),f.cross(d,a[e]),J.util.Logger.info("v[i], n, n x v[i]"+a[e]+" "+d+" "+f),d.setT(a[e]),d.normalize(),f.cross(a[e],a[(e+1)%3]),J.util.Logger.info("draw id eigv"+
e+" "+J.util.Escape.eP(a[e])+" color "+(0==e?"red":1==e?"green":"blue")+" # "+d+" "+f);J.util.Logger.info("eigVl ("+b.d[0]+" + "+b.e[0]+"I) ("+b.d[1]+" + "+b.e[1]+"I) ("+b.d[2]+" + "+b.e[2]+"I)");c=Array(3);e=Clazz.newFloatArray(3,0);b.set(c,e);J.util.Eigen.sort(c,e);return(new J.util.Quadric).fromVectors(c,e,!1)},"~A");c$.getEllipsoid=$_M(c$,"getEllipsoid",function(a,b,c){for(var d=Array(a.length),e=a.length;0<=--e;)d[e]=J.util.V3.newV(a[e]);J.util.Eigen.sort(d,b);return(new J.util.Quadric).fromVectors(d,
b,c)},"~A,~A,~B");c$.sort=$_M(c$,"sort",($fz=function(a,b){var c=[[a[0],Float.$valueOf(Math.abs(b[0]))],[a[1],Float.$valueOf(Math.abs(b[1]))],[a[2],Float.$valueOf(Math.abs(b[2]))]];java.util.Arrays.sort(c,new J.util.Eigen.EigenSort);for(var d=0;3>d;d++)a[d]=J.util.V3.newV(c[d][0]),a[d].normalize(),b[d]=c[d][1].floatValue()},$fz.isPrivate=!0,$fz),"~A,~A");Clazz.pu$h();c$=Clazz.declareType(J.util.Eigen,"EigenSort",null,java.util.Comparator);Clazz.overrideMethod(c$,"compare",function(a,b){var c=a[1].floatValue(),
d=b[1].floatValue();return c<d?-1:c>d?1:0},"~A,~A");c$=Clazz.p0p()}),Clazz.declarePackage("J.util"),Clazz.load(["J.util.P4"],"J.util.Quaternion","java.lang.Float J.util.AxisAngle4f $.Escape $.Logger $.Matrix3f $.P3 $.TextFormat $.V3".split(" "),function(){c$=Clazz.decorateAsClass(function(){this.q3=this.q2=this.q1=this.q0=0;this.mat=null;Clazz.instantialize(this,arguments)},J.util,"Quaternion");Clazz.makeConstructor(c$,function(){this.q0=1});c$.newQ=$_M(c$,"newQ",function(a){var b=new J.util.Quaternion;
b.set(a);return b},"J.util.Quaternion");c$.newVA=$_M(c$,"newVA",function(a,b){var c=new J.util.Quaternion;c.setTA(a,b);return c},"J.util.Tuple3f,~N");c$.newM=$_M(c$,"newM",function(a){var b=new J.util.Quaternion;b.setM(a);return b},"J.util.Matrix3f");c$.newAA=$_M(c$,"newAA",function(a){var b=new J.util.Quaternion;b.setAA(a);return b},"J.util.AxisAngle4f");c$.newP4=$_M(c$,"newP4",function(a){var b=new J.util.Quaternion;b.setP4(a);return b},"J.util.P4");c$.new4=$_M(c$,"new4",function(a,b,c,d){var e=
new J.util.Quaternion;if(-1>a)return e.q0=-1,e;if(1<a)return e.q0=1,e;e.q0=a;e.q1=b;e.q2=c;e.q3=d;return e},"~N,~N,~N,~N");$_M(c$,"set",function(a){this.q0=a.q0;this.q1=a.q1;this.q2=a.q2;this.q3=a.q3},"J.util.Quaternion");$_M(c$,"setP4",($fz=function(a){var b=null==a?0:a.distance(J.util.Quaternion.qZero);0==b?this.q0=1:(this.q0=a.w/b,this.q1=a.x/b,this.q2=a.y/b,this.q3=a.z/b)},$fz.isPrivate=!0,$fz),"J.util.P4");$_M(c$,"setTA",function(a,b){if(0==a.x&&0==a.y&&0==a.z)this.q0=1;else{var c=Math.sin(3.141592653589793*
(b/2)/180)/Math.sqrt(a.x*a.x+a.y*a.y+a.z*a.z);this.q0=Math.cos(3.141592653589793*(b/2)/180);this.q1=a.x*c;this.q2=a.y*c;this.q3=a.z*c}},"J.util.Tuple3f,~N");$_M(c$,"setAA",function(a){a=J.util.AxisAngle4f.newAA(a);0==a.angle&&(a.y=1);var b=new J.util.Matrix3f;b.setAA(a);this.setM(b)},"J.util.AxisAngle4f");$_M(c$,"setM",function(a){this.mat=a;var b=a.m00+a.m11+a.m22,c,d,e;0.5<=b?(b=Math.sqrt(1+b),c=(a.m21-a.m12)/b,d=(a.m02-a.m20)/b,e=(a.m10-a.m01)/b):0.5<=(c=a.m00+a.m00-b)?(c=Math.sqrt(1+c),b=(a.m21-
a.m12)/c,d=(a.m10+a.m01)/c,e=(a.m20+a.m02)/c):0.5<=(c=a.m11+a.m11-b)||a.m11>a.m22?(d=Math.sqrt(1+c),b=(a.m02-a.m20)/d,c=(a.m10+a.m01)/d,e=(a.m21+a.m12)/d):(e=Math.sqrt(1+a.m22+a.m22-b),b=(a.m10-a.m01)/e,c=(a.m20+a.m02)/e,d=(a.m21+a.m12)/e);this.q0=0.5*b;this.q1=0.5*c;this.q2=0.5*d;this.q3=0.5*e},"J.util.Matrix3f");$_M(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=$_M(c$,"getQuaternionFrame",
function(a,b,c){b=J.util.V3.newV(b);b.sub(a);c=J.util.V3.newV(c);c.sub(a);return J.util.Quaternion.getQuaternionFrameV(b,c,null,!1)},"J.util.P3,J.util.Tuple3f,J.util.Tuple3f");c$.getQuaternionFrameV=$_M(c$,"getQuaternionFrameV",function(a,b,c,d){null==c&&(c=new J.util.V3,c.cross(a,b),d&&a.cross(b,c));b=new J.util.V3;b.cross(c,a);a.normalize();b.normalize();c.normalize();d=new J.util.Matrix3f;d.setColumnV(0,a);d.setColumnV(1,b);d.setColumnV(2,c);return J.util.Quaternion.newM(d)},"J.util.V3,J.util.V3,J.util.V3,~B");
$_M(c$,"getMatrix",function(){null==this.mat&&this.setMatrix();return this.mat});$_M(c$,"setMatrix",($fz=function(){this.mat=new J.util.Matrix3f;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},$fz.isPrivate=!0,$fz));$_M(c$,"add",function(a){return J.util.Quaternion.newVA(this.getNormal(),this.getTheta()+a)},"~N");$_M(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");$_M(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");$_M(c$,"div",function(a){return this.mulQ(a.inv())},"J.util.Quaternion");$_M(c$,"divLeft",function(a){return this.inv().mulQ(a)},"J.util.Quaternion");$_M(c$,"dot",function(a){return this.q0*a.q0+this.q1*a.q1+this.q2*a.q2+this.q3*a.q3},"J.util.Quaternion");$_M(c$,"inv",function(){return J.util.Quaternion.new4(this.q0,
-this.q1,-this.q2,-this.q3)});$_M(c$,"negate",function(){return J.util.Quaternion.new4(-this.q0,-this.q1,-this.q2,-this.q3)});$_M(c$,"getFixFactor",($fz=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},$fz.isPrivate=!0,$fz));$_M(c$,"getVector",function(a){return this.getVectorS(a,1)},"~N");$_M(c$,"getVectorS",($fz=function(a,b){if(-1==a)return b*=this.getFixFactor(),J.util.V3.new3(this.q1*b,this.q2*b,this.q3*b);null==this.mat&&this.setMatrix();
var c=new J.util.V3;this.mat.getColumnV(a,c);1!=b&&c.scale(b);return c},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"getNormal",function(){var a=J.util.Quaternion.getRawNormal(this);a.scale(this.getFixFactor());return a});c$.getRawNormal=$_M(c$,"getRawNormal",($fz=function(a){a=J.util.V3.new3(a.q1,a.q2,a.q3);if(0==a.length())return J.util.V3.new3(0,0,1);a.normalize();return a},$fz.isPrivate=!0,$fz),"J.util.Quaternion");$_M(c$,"getTheta",function(){return 360*Math.acos(Math.abs(this.q0))/3.141592653589793});
$_M(c$,"getThetaRadians",function(){return 2*Math.acos(Math.abs(this.q0))});$_M(c$,"getNormalDirected",function(a){var b=this.getNormal();0>b.x*a.x+b.y*a.y+b.z*a.z&&b.scale(-1);return b},"J.util.V3");$_M(c$,"get3dProjection",function(a){a.set(this.q1,this.q2,this.q3);return a},"J.util.V3");$_M(c$,"getThetaDirected",function(a){var b=this.getTheta(),c=this.getNormal();0>a.x*this.q1+a.y*this.q2+a.z*this.q3&&(c.scale(-1),b=-b);a.set(c.x,c.y,c.z,b);return a},"J.util.P4");$_M(c$,"getThetaDirectedV",function(a){var b=
this.getTheta(),c=this.getNormal();0>a.x*this.q1+a.y*this.q2+a.z*this.q3&&(c.scale(-1),b=-b);return b},"J.util.V3");$_M(c$,"toPoint4f",function(){return J.util.P4.new4(this.q1,this.q2,this.q3,this.q0)});$_M(c$,"toAxisAngle4f",function(){var a=2*Math.acos(Math.abs(this.q0)),b=Math.sin(a/2),c=this.getNormal();0>b&&(c.scale(-1),a=3.141592653589793-a);return J.util.AxisAngle4f.newVA(c,a)});$_M(c$,"transformPt",function(a){null==this.mat&&this.setMatrix();a=J.util.P3.newP(a);this.mat.transform(a);return a},
"J.util.P3");$_M(c$,"transformP2",function(a,b){null==this.mat&&this.setMatrix();this.mat.transform2(a,b)},"J.util.Tuple3f,J.util.Tuple3f");$_M(c$,"transform",function(a){null==this.mat&&this.setMatrix();a=J.util.V3.newV(a);this.mat.transform(a);return a},"J.util.V3");$_M(c$,"leftDifference",function(a){a=0>this.dot(a)?a.negate():a;return this.inv().mulQ(a)},"J.util.Quaternion");$_M(c$,"rightDifference",function(a){a=0>this.dot(a)?a.negate():a;return this.mulQ(a.inv())},"J.util.Quaternion");$_M(c$,
"getInfo",function(){var a=this.toAxisAngle4f();return J.util.TextFormat.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]])});$_M(c$,"draw",function(a,b,c,d){c=" VECTOR "+J.util.Escape.eP(c)+" ";0==d&&(d=1);return"draw "+a+"x"+b+c+J.util.Escape.eP(this.getVectorS(0,d))+" color red\ndraw "+a+"y"+b+c+J.util.Escape.eP(this.getVectorS(1,d))+" color green\ndraw "+a+"z"+b+c+J.util.Escape.eP(this.getVectorS(2,
d))+" color blue\n"},"~S,~S,J.util.P3,~N");Clazz.overrideMethod(c$,"toString",function(){return"{"+this.q1+" "+this.q2+" "+this.q3+" "+this.q0+"}"});c$.div=$_M(c$,"div",function(a,b,c,d){var e;if(null==a||null==b||0==(e=Math.min(a.length,b.length)))return null;0<c&&e>c&&(e=c);c=Array(e);for(var f=0;f<e;f++){if(null==a[f]||null==b[f])return null;c[f]=d?a[f].divLeft(b[f]):a[f].div(b[f])}return c},"~A,~A,~N,~B");c$.sphereMean=$_M(c$,"sphereMean",function(a,b,c){if(null==a||0==a.length)return new J.util.Quaternion;
null==b&&(b=Clazz.newFloatArray(1,0));if(1==a.length)return b[0]=0,J.util.Quaternion.newQ(a[0]);for(var d=3.4028235E38,e=3.4028235E38,f=J.util.Quaternion.simpleAverage(a),g=0;d>c&&0!=e&&100>g;)f=J.util.Quaternion.newMean(a,f),b[0]=J.util.Quaternion.stdDev(a,f),d=Math.abs(b[0]-e),e=b[0],J.util.Logger.info(++g+" sphereMean "+f+" stddev="+e+" diff="+d);return f},"~A,~A,~N");c$.simpleAverage=$_M(c$,"simpleAverage",($fz=function(a){var b=J.util.V3.new3(0,0,1),c=a[0].getNormal();b.add(c);for(var d=a.length;0<=
--d;)b.add(a[d].getNormalDirected(b));b.sub(c);b.normalize();for(var e=0,d=a.length;0<=--d;)e+=Math.abs(a[d].get3dProjection(c).dot(b));0!=e&&b.scale(e/a.length);e=Math.sqrt(1-b.lengthSquared());Float.isNaN(e)&&(e=0);return J.util.Quaternion.newP4(J.util.P4.new4(b.x,b.y,b.z,e))},$fz.isPrivate=!0,$fz),"~A");c$.newMean=$_M(c$,"newMean",($fz=function(a,b){for(var c=new J.util.V3,d,e,f=a.length;0<=--f;)d=a[f],e=d.div(b),d=e.getNormal(),d.scale(e.getTheta()),c.add(d);c.scale(1/a.length);return J.util.Quaternion.newVA(c,
c.length()).mulQ(b)},$fz.isPrivate=!0,$fz),"~A,J.util.Quaternion");c$.stdDev=$_M(c$,"stdDev",($fz=function(a,b){for(var c=0,d=0,e=a.length,f=e;0<=--f;)var g=a[f].div(b).getTheta(),c=c+g,d=d+g*g;d-=c*c/e;0>d&&(d=0);return Math.sqrt(d/(e-1))},$fz.isPrivate=!0,$fz),"~A,J.util.Quaternion");c$.qZero=c$.prototype.qZero=new J.util.P4}),Clazz.declarePackage("J.constant"),Clazz.load(["java.lang.Enum"],"J.constant.EnumPalette",null,function(){c$=Clazz.decorateAsClass(function(){this.$$name=null;this.id=0;Clazz.instantialize(this,
arguments)},J.constant,"EnumPalette",Enum);Clazz.makeConstructor(c$,($fz=function(a,b){this.$$name=a;this.id=b},$fz.isPrivate=!0,$fz),"~S,~N");c$.pidOf=$_M(c$,"pidOf",function(a){return Clazz.instanceOf(a,J.constant.EnumPalette)?a.id:Clazz.instanceOf(a,Byte)?a.byteValue():J.constant.EnumPalette.UNKNOWN.id},"~O");c$.isPaletteVariable=$_M(c$,"isPaletteVariable",function(a){return 0!=(a&64)},"~N");c$.getPalette=$_M(c$,"getPalette",function(a){if(0>a.indexOf("_"))for(var b,c=0,d=J.constant.EnumPalette.values();c<
d.length&&((b=d[c])||1);c++)if(a.equalsIgnoreCase(b.$$name))return b;return 0==a.indexOf("property_")?J.constant.EnumPalette.PROPERTY:J.constant.EnumPalette.UNKNOWN},"~S");c$.getPaletteID=$_M(c$,"getPaletteID",function(a){if(0>a.indexOf("_"))for(var b,c=0,d=J.constant.EnumPalette.values();c<d.length&&((b=d[c])||1);c++)if(a.equalsIgnoreCase(b.$$name))return b.id;return 0==a.indexOf("property_")?J.constant.EnumPalette.PROPERTY.id:J.constant.EnumPalette.UNKNOWN.id},"~S");c$.getPaletteName=$_M(c$,"getPaletteName",
function(a){for(var b,c=0,d=J.constant.EnumPalette.values();c<d.length&&((b=d[c])||1);c++)if(b.id==a)return b.$$name;return null},"~N");c$.argbsCpkRasmol=[16716947,33554431,50315467,62005794,83951360,113821896,126849023,149946368,165324064,184549631,203590434,226525328,249210144,268412160,285198386,285277952,343965840,377520272,411074704,427851920,452961536,480586282,497363498,514140714,598026794,796950672,899686640,956278016,1339729184];c$.argbsCpk=[4294907027,4294967295,4292476927,4291592447,4290969344,
4294948277,4287664272,4281356536,4294905101,4287684688,4289979381,4289420530,4287299328,4290750118,4293970080,4294934528,4294967088,4280283167,4286632419,4287578324,4282253056,4293322470,4290757319,4289111723,4287273415,4288445127,4292896307,4293955744,4283486288,4291330099,4286415024,4290940815,4284911503,4290609379,4294942976,4289079593,4284266705,4285542064,4278255360,4287954943,4287946976,4285776585,4283741621,4282097310,4280586127,4278877580,4278217093,4290822336,4294957455,4289099123,4284907648,
4288570293,4292114944,4287889556,4282556080,4283897743,4278241536,4285584639,4294967239,4292476871,4291297223,4288937927,4287627207,4284612551,4282777543,4281401287,4280287175,4278255516,4278249077,4278244434,4278239032,4278233892,4283286271,4283279103,4280390870,4280712619,4280706710,4279719047,4291875040,4294955299,4290296016,4289090637,4283914593,4288565173,4289420288,4285878085,4282548886,4282515558,4278222080,4285574138,4278237951,4278231551,4278226943,4278223103,4278217727,4283718898,4286078179,
4287254499,4288755412,4289929172,4289929146,4289924518,4290579847,4291231846,4291559513,4291887183,4292411461,4292870200,4293263406,4293591078];Clazz.defineEnumConstant(c$,"UNKNOWN",0,[null,255]);Clazz.defineEnumConstant(c$,"NONE",1,["none",0]);Clazz.defineEnumConstant(c$,"CPK",2,["cpk",1]);Clazz.defineEnumConstant(c$,"PARTIAL_CHARGE",3,["partialcharge",2]);Clazz.defineEnumConstant(c$,"FORMAL_CHARGE",4,["formalcharge",3]);Clazz.defineEnumConstant(c$,"TEMP",5,["temperature",68]);Clazz.defineEnumConstant(c$,
"FIXEDTEMP",6,["fixedtemperature",5]);Clazz.defineEnumConstant(c$,"SURFACE",7,["surfacedistance",70]);Clazz.defineEnumConstant(c$,"STRUCTURE",8,["structure",7]);Clazz.defineEnumConstant(c$,"AMINO",9,["amino",8]);Clazz.defineEnumConstant(c$,"SHAPELY",10,["shapely",9]);Clazz.defineEnumConstant(c$,"CHAIN",11,["chain",10]);Clazz.defineEnumConstant(c$,"GROUP",12,["group",75]);Clazz.defineEnumConstant(c$,"MONOMER",13,["monomer",76]);Clazz.defineEnumConstant(c$,"MOLECULE",14,["molecule",77]);Clazz.defineEnumConstant(c$,
"ALTLOC",15,["altloc",14]);Clazz.defineEnumConstant(c$,"INSERTION",16,["insertion",15]);Clazz.defineEnumConstant(c$,"JMOL",17,["jmol",16]);Clazz.defineEnumConstant(c$,"RASMOL",18,["rasmol",17]);Clazz.defineEnumConstant(c$,"TYPE",19,["type",18]);Clazz.defineEnumConstant(c$,"ENERGY",20,["energy",19]);Clazz.defineEnumConstant(c$,"PROPERTY",21,["property",84]);Clazz.defineEnumConstant(c$,"VARIABLE",22,["variable",85]);Clazz.defineEnumConstant(c$,"STRAIGHTNESS",23,["straightness",86]);Clazz.defineEnumConstant(c$,
"POLYMER",24,["polymer",87])}),Clazz.declarePackage("J.util"),Clazz.load(["java.util.Hashtable"],"J.util.ColorUtil",["J.util.P3","$.Parser","$.TextFormat"],function(){c$=Clazz.declareType(J.util,"ColorUtil");c$.getArgbFromString=$_M(c$,"getArgbFromString",function(a){var c=0;if(null==a||0==(c=a.length))return 0;if("["==a.charAt(0)&&"]"==a.charAt(c-1)){var d;if(0<=a.indexOf(",")){d=J.util.TextFormat.splitChars(a.substring(1,a.length-1),",");if(3!=d.length)return 0;a=J.util.Parser.parseFloatStr(d[0]);
c=J.util.Parser.parseFloatStr(d[1]);d=J.util.Parser.parseFloatStr(d[2]);return J.util.ColorUtil.colorTriadToInt(a,c,d)}switch(c){case 9:d="x";break;case 10:d="0x";break;default:return 0}if(1!=a.indexOf(d))return 0;a="#"+a.substring(c-7,c-1);c=7}if(7==c&&"#"==a.charAt(0))try{return J.util.Parser.parseIntRadix(a.substring(1,7),16)|4278190080}catch(e){if(Clazz.exceptionOf(e,Exception))return 0;throw e;}a=J.util.ColorUtil.mapJavaScriptColors.get(a.toLowerCase());return null==a?0:a.intValue()},"~S");c$.colorTriadToInt=
$_M(c$,"colorTriadToInt",function(a,c,d){1>=a&&(1>=c&&1>=d)&&(0<a&&(a=256*a-1),0<c&&(c=256*c-1),0<d&&(d=256*d-1));return J.util.ColorUtil.rgb(Clazz.floatToInt(a),Clazz.floatToInt(c),Clazz.floatToInt(d))},"~N,~N,~N");c$.rgb=$_M(c$,"rgb",function(a,c,d){return 4278190080|a<<16|c<<8|d},"~N,~N,~N");c$.colorPointFromString=$_M(c$,"colorPointFromString",function(a,c){return J.util.ColorUtil.colorPointFromInt(J.util.ColorUtil.getArgbFromString(a),c)},"~S,J.util.P3");c$.colorPointFromInt2=$_M(c$,"colorPointFromInt2",
function(a){return J.util.P3.new3(a>>16&255,a>>8&255,a&255)},"~N");c$.colorPtToInt=$_M(c$,"colorPtToInt",function(a){return J.util.ColorUtil.colorTriadToInt(a.x,a.y,a.z)},"J.util.Tuple3f");c$.colorPointFromInt=$_M(c$,"colorPointFromInt",function(a,c){c.z=a&255;c.y=a>>8&255;c.x=a>>16&255;return c},"~N,J.util.P3");c$.calcGreyscaleRgbFromRgb=$_M(c$,"calcGreyscaleRgbFromRgb",function(a){a=Clazz.doubleToInt((2989*(a>>16&255)+5870*(a>>8&255)+1140*(a&255)+5E3)/1E4)&16777215;return J.util.ColorUtil.rgb(a,
a,a)},"~N");c$.getBgContrast=$_M(c$,"getBgContrast",function(a){return 128>(J.util.ColorUtil.calcGreyscaleRgbFromRgb(a)&255)?8:4},"~N");Clazz.defineStatics(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=J.util.ColorUtil.colorNames.length;0<=--a;)J.util.ColorUtil.mapJavaScriptColors.put(J.util.ColorUtil.colorNames[a],Integer.$valueOf(J.util.ColorUtil.colorArgbs[a]))}),
Clazz.declarePackage("J.util"),Clazz.load(["J.util.ArrayUtil","$.V3"],"J.util.Shader",["J.util.C","$.ColorUtil"],function(){c$=Clazz.decorateAsClass(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.rgbContrast=0;this.sphereShadingCalculated=!1;this.sphereShadeIndexes=null;this.seed=305419897;this.ellipsoidShades=this.sphereShapeCache=null;this.nIn=this.nOut=0;this.celOn=!1;Clazz.instantialize(this,arguments)},J.util,"Shader");Clazz.prepareFields(c$,function(){this.lightSource=new J.util.V3;this.ambientFraction=this.ambientPercent/100;this.diffuseFactor=this.diffusePercent/100;this.intenseFraction=this.specularPower/100;this.specularFactor=this.specularPercent/100;this.ashades=
J.util.ArrayUtil.newInt2(128);this.sphereShadeIndexes=Clazz.newByteArray(65536,0);this.sphereShapeCache=J.util.ArrayUtil.newInt2(128)});Clazz.makeConstructor(c$,function(){this.setLightSource(-1,-1,2.5)});$_M(c$,"setLightSource",($fz=function(a,b,c){this.lightSource.set(a,b,c);this.lightSource.normalize();this.xLight=this.lightSource.x;this.yLight=this.lightSource.y;this.zLight=this.lightSource.z},$fz.isPrivate=!0,$fz),"~N,~N,~N");$_M(c$,"setCel",function(a,b){b=J.util.C.getArgb(J.util.ColorUtil.getBgContrast(b));
4278190080==b&&(b=4278453252);this.celOn==a&&this.rgbContrast==b||(this.celOn=a,this.rgbContrast=b,this.flushCaches())},"~B,~N");$_M(c$,"flushCaches",function(){this.flushShades();this.flushSphereCache()});$_M(c$,"getCelOn",function(){return this.celOn});$_M(c$,"setLastColix",function(a,b){J.util.C.allocateColix(a);this.checkShades();b&&J.util.C.setLastGrey(a);this.ashades[2047]=this.getShades2(a,!1)},"~N,~B");$_M(c$,"getShades",function(a){this.checkShades();a&=-30721;var b=this.ashades[a];null==
b&&(b=this.ashades[a]=this.getShades2(J.util.C.argbs[a],!1));return b},"~N");$_M(c$,"getShadesG",function(a){this.checkShades();a&=-30721;null==this.ashadesGreyscale&&(this.ashadesGreyscale=J.util.ArrayUtil.newInt2(this.ashades.length));var b=this.ashadesGreyscale[a];null==b&&(b=this.ashadesGreyscale[a]=this.getShades2(J.util.C.argbs[a],!0));return b},"~N");$_M(c$,"checkShades",($fz=function(){null!=this.ashades&&this.ashades.length==J.util.C.colixMax||(this.ashades=J.util.ArrayUtil.arrayCopyII(this.ashades,
J.util.C.colixMax),null!=this.ashadesGreyscale&&(this.ashadesGreyscale=J.util.ArrayUtil.arrayCopyII(this.ashadesGreyscale,J.util.C.colixMax)))},$fz.isPrivate=!0,$fz));$_M(c$,"flushShades",function(){this.checkShades();for(var a=J.util.C.colixMax;0<=--a;)this.ashades[a]=null;this.sphereShadingCalculated=!1});$_M(c$,"getShades2",($fz=function(a,b){var c=Clazz.newIntArray(J.util.Shader.shadeIndexMax,0);if(0==a)return c;for(var d=a>>16&255,e=a>>8&255,f=a&255,g=0,h=0,k=0,l=this.ambientFraction;;)if(g=
d*l+0.5,h=e*l+0.5,k=f*l+0.5,0<l&&4>g&&4>h&&4>k)d++,e++,f++,0.1>l&&(l+=0.1),a=J.util.ColorUtil.rgb(Clazz.doubleToInt(Math.floor(d)),Clazz.doubleToInt(Math.floor(e)),Clazz.doubleToInt(Math.floor(f)));else break;if(this.celOn){for(var m=Clazz.doubleToInt(J.util.Shader.shadeIndexMax/2),l=(1-l)/J.util.Shader.shadeIndexNormal,d=d*l,e=e*l,l=f*l,n=J.util.ColorUtil.rgb(Clazz.doubleToInt(Math.floor(g)),Clazz.doubleToInt(Math.floor(h)),Clazz.doubleToInt(Math.floor(k))),f=0;f<m;++f)c[f]=n;h+=e*m;k+=l*m;for(n=
J.util.ColorUtil.rgb(Clazz.doubleToInt(Math.floor(g+d*m)),Clazz.doubleToInt(Math.floor(h)),Clazz.doubleToInt(Math.floor(k)));f<J.util.Shader.shadeIndexMax;f++)c[f]=n;c[0]=c[1]=this.rgbContrast}else{l=(1-l)/J.util.Shader.shadeIndexNormal;d*=l;e*=l;l*=f;for(f=0;f<J.util.Shader.shadeIndexNormal;++f)c[f]=J.util.ColorUtil.rgb(Clazz.doubleToInt(Math.floor(g)),Clazz.doubleToInt(Math.floor(h)),Clazz.doubleToInt(Math.floor(k))),g+=d,h+=e,k+=l;c[f++]=a;l=this.intenseFraction/(J.util.Shader.shadeIndexMax-f);
d=(255.5-g)*l;e=(255.5-h)*l;for(l*=255.5-k;f<J.util.Shader.shadeIndexMax;f++)g+=d,h+=e,k+=l,c[f]=J.util.ColorUtil.rgb(Clazz.doubleToInt(Math.floor(g)),Clazz.doubleToInt(Math.floor(h)),Clazz.doubleToInt(Math.floor(k)))}if(b)for(;0<=--f;)c[f]=J.util.ColorUtil.calcGreyscaleRgbFromRgb(c[f]);return c},$fz.isPrivate=!0,$fz),"~N,~B");$_M(c$,"getShadeIndex",function(a,b,c){var d=Math.sqrt(a*a+b*b+c*c);return Math.round(this.getShadeF(a/d,b/d,c/d)*J.util.Shader.shadeIndexLast)},"~N,~N,~N");$_M(c$,"getShadeB",
function(a,b,c){return Math.round(this.getShadeF(a,b,c)*J.util.Shader.shadeIndexLast)},"~N,~N,~N");$_M(c$,"getShadeFp8",function(a,b,c){var d=Math.sqrt(a*a+b*b+c*c);return Clazz.doubleToInt(Math.floor(256*this.getShadeF(a/d,b/d,c/d)*J.util.Shader.shadeIndexLast))},"~N,~N,~N");$_M(c$,"getShadeF",($fz=function(a,b,c){b=a*this.xLight+b*this.yLight+c*this.zLight;if(0>=b)return 0;a=b*this.diffuseFactor;if(this.specularOn&&(b=2*b*c-this.zLight,0<b)){if(this.usePhongExponent)b=Math.pow(b,this.phongExponent);
else for(var d=this.specularExponent;0<=--d&&1E-4<b;)b*=b;a+=b*this.specularFactor}return this.celOn&&0.5>c?0:1<a?1:a},$fz.isPrivate=!0,$fz),"~N,~N,~N");$_M(c$,"getShadeN",function(a,b,c,d){b=Clazz.doubleToInt(Math.floor(256*this.getShadeF(a/d,b/d,c/d)*J.util.Shader.shadeIndexLast));a=b>>8;(b&255)>this.nextRandom8Bit()&&++a;b=this.seed&65535;21845>b&&0<a?--a:43690<b&&a<J.util.Shader.shadeIndexLast&&++a;return a},"~N,~N,~N,~N");$_M(c$,"calcSphereShading",function(){for(var a=-127.5,b=0;256>b;++a,++b)for(var c=
-127.5,d=0;256>d;++c,++d){var e=0,f=16900-a*a-c*c;0<f&&(e=Math.sqrt(f),e=this.getShadeN(a,c,e,130));this.sphereShadeIndexes[(d<<8)+b]=e}this.sphereShadingCalculated=!0});$_M(c$,"nextRandom8Bit",function(){var a=this.seed;this.seed=a=(a<<16)+(a<<1)+a&2147483647;return a>>23});$_M(c$,"getEllipsoidShade",function(a,b,c,d,e){var f=e.m00*a+e.m01*b+e.m02*c+e.m03,g=e.m10*a+e.m11*b+e.m12*c+e.m13;a=e.m20*a+e.m21*b+e.m22*c+e.m23;d=Math.min(d/2,45)/Math.sqrt(f*f+g*g+a*a);f=Clazz.floatToInt(-f*d);g=Clazz.floatToInt(-g*
d);d=Clazz.floatToInt(a*d);if(a=-20>f||20<=f||-20>g||20<=g||0>d||40<=d){for(;0==f%2&&0==g%2&&0==d%2&&0<f+g+d;)f>>=1,g>>=1,d>>=1;a=-20>f||20<=f||-20>g||20<=g||0>d||40<=d}a?this.nOut++:this.nIn++;return a?this.getShadeIndex(f,g,d):this.ellipsoidShades[f+20][g+20][d]},"~N,~N,~N,~N,J.util.Matrix4f");$_M(c$,"createEllipsoidShades",function(){this.ellipsoidShades=Clazz.newByteArray(40,40,40,0);for(var a=0;40>a;a++)for(var b=0;40>b;b++)for(var c=0;40>c;c++)this.ellipsoidShades[a][b][c]=this.getShadeIndex(a-
20,b-20,c)});$_M(c$,"flushSphereCache",function(){for(var a=128;0<=--a;)this.sphereShapeCache[a]=null;this.ellipsoidShades=null});Clazz.defineStatics(c$,"shadeIndexMax",64);c$.shadeIndexLast=c$.prototype.shadeIndexLast=J.util.Shader.shadeIndexMax-1;Clazz.defineStatics(c$,"shadeIndexNormal",52,"shadeIndexNoisyLimit",56,"SLIM",20,"SDIM",40,"maxSphereCache",128)}),Clazz.declarePackage("J.util"),Clazz.load(null,"J.util.Quadric",["J.util.Eigen"],function(){c$=Clazz.decorateAsClass(function(){this.vectors=
this.lengths=null;this.isThermalEllipsoid=!0;this.$scale=1;Clazz.instantialize(this,arguments)},J.util,"Quadric");$_M(c$,"scale",function(a){for(var b=0;3>b;b++)this.lengths[b]*=a},"~N");Clazz.overrideMethod(c$,"toString",function(){return null==this.vectors?""+this.lengths[0]:this.vectors[0]+"\t"+this.lengths[0]+"\n"+this.vectors[1]+"\t"+this.lengths[1]+"\n"+this.vectors[2]+"\t"+this.lengths[2]+"\n"});$_M(c$,"fromVectors",function(a,b,c){this.vectors=a;this.lengths=b;this.isThermalEllipsoid=c;return this},
"~A,~A,~B");$_M(c$,"fromBCart",function(a){this.isThermalEllipsoid=!0;this.lengths=Clazz.newFloatArray(3,0);this.vectors=Array(3);J.util.Quadric.getAxesForEllipsoid(a,this.vectors,this.lengths);for(a=0;3>a;a++)this.lengths[a]*=J.util.Quadric.ONE_OVER_ROOT2_PI;return this},"~A");$_M(c$,"rotate",function(a){if(null!=this.vectors)for(var b=0;3>b;b++)a.transformV(this.vectors[b])},"J.util.Matrix4f");$_M(c$,"setSize",function(a){this.$scale=this.isThermalEllipsoid?J.util.Quadric.getRadius(a):1>a?0:a/100},
"~N");c$.getAxesForEllipsoid=$_M(c$,"getAxesForEllipsoid",function(a,b,c){var d=Clazz.newDoubleArray(3,3,0);d[0][0]=a[0];d[1][1]=a[1];d[2][2]=a[2];d[0][1]=d[1][0]=a[3]/2;d[0][2]=d[2][0]=a[4]/2;d[1][2]=d[2][1]=a[5]/2;J.util.Eigen.getUnitVectors(d,b,c)},"~A,~A,~A");c$.setEllipsoidMatrix=$_M(c$,"setEllipsoidMatrix",function(a,b,c,d){for(var e=0;3>e;e++)c.setT(a[e]),c.scale(b[e]),d.setColumnV(e,c);d.invertM(d);return d},"~A,~A,J.util.V3,J.util.Matrix3f");c$.getEquationForQuadricWithCenter=$_M(c$,"getEquationForQuadricWithCenter",
function(a,b,c,d,e,f,g,h){e.set(a,b,c);d.transform(e);a=1-e.dot(e);f.transposeM(d);f.transform(e);f.mul(d);g[0]=f.m00/a;g[1]=f.m11/a;g[2]=f.m22/a;g[3]=2*f.m01/a;g[4]=2*f.m02/a;g[5]=2*f.m12/a;g[6]=-2*e.x/a;g[7]=-2*e.y/a;g[8]=-2*e.z/a;g[9]=-1;null!=h&&(h.setIdentity(),h.m00=2*g[0],h.m11=2*g[1],h.m22=2*g[2],h.m01=h.m10=g[3],h.m02=h.m20=g[4],h.m12=h.m21=g[5],h.m03=g[6],h.m13=g[7],h.m23=g[8])},"~N,~N,~N,J.util.Matrix3f,J.util.V3,J.util.Matrix3f,~A,J.util.Matrix4f");c$.getQuardricZ=$_M(c$,"getQuardricZ",
function(a,b,c,d){var e=(c[4]*a+c[5]*b+c[8])/c[2]/2;a=e*e-(c[0]*a*a+c[1]*b*b+c[3]*a*b+c[6]*a+c[7]*b-1)/c[2];if(0>a)return!1;a=Math.sqrt(a);d[0]=-e-a;d[1]=-e+a;return!0},"~N,~N,~A,~A");c$.getOctant=$_M(c$,"getOctant",function(a){var b=0;0>a.x&&(b+=1);0>a.y&&(b+=2);0>a.z&&(b+=4);return b},"J.util.P3");c$.getRadius=$_M(c$,"getRadius",function(a){return J.util.Quadric.crtval[1>a?0:99<a?98:a-1]},"~N");c$.ONE_OVER_ROOT2_PI=c$.prototype.ONE_OVER_ROOT2_PI=Math.sqrt(0.5)/3.141592653589793;Clazz.defineStatics(c$,
"crtval",[0.3389,0.4299,0.4951,0.5479,0.5932,0.6334,0.6699,0.7035,0.7349,0.7644,0.7924,0.8192,0.8447,0.8694,0.8932,0.9162,0.9386,0.9605,0.9818,1.0026,1.023,1.043,1.0627,1.0821,1.1012,1.12,1.1386,1.157,1.1751,1.1932,1.211,1.2288,1.2464,1.2638,1.2812,1.2985,1.3158,1.333,1.3501,1.3672,1.3842,1.4013,1.4183,1.4354,1.4524,1.4695,1.4866,1.5037,1.5209,1.5382,1.5555,1.5729,1.5904,1.608,1.6257,1.6436,1.6616,1.6797,1.698,1.7164,1.7351,1.754,1.773,1.7924,1.8119,1.8318,1.8519,1.8724,1.8932,1.9144,1.936,1.958,
1.9804,2.0034,2.0269,2.051,2.0757,2.1012,2.1274,2.1544,2.1824,2.2114,2.2416,2.273,2.3059,2.3404,2.3767,2.4153,2.4563,2.5003,2.5478,2.5997,2.6571,2.7216,2.7955,2.8829,2.9912,3.1365,3.3682])}),Clazz.declarePackage("J.util"),Clazz.load(null,"J.util.AxisAngle4f",["J.util.Tuple3f"],function(){c$=Clazz.decorateAsClass(function(){this.angle=this.z=this.y=this.x=0;Clazz.instantialize(this,arguments)},J.util,"AxisAngle4f",null,java.io.Serializable);Clazz.makeConstructor(c$,function(){this.z=1});c$.new4=$_M(c$,
"new4",function(a,b,c,d){var e=new J.util.AxisAngle4f;e.set4(a,b,c,d);return e},"~N,~N,~N,~N");c$.newAA=$_M(c$,"newAA",function(a){var b=new J.util.AxisAngle4f;b.set4(a.x,a.y,a.z,a.angle);return b},"J.util.AxisAngle4f");c$.newVA=$_M(c$,"newVA",function(a,b){var c=new J.util.AxisAngle4f;c.setVA(a,b);return c},"J.util.V3,~N");$_M(c$,"setVA",function(a,b){this.x=a.x;this.y=a.y;this.z=a.z;this.angle=b},"J.util.V3,~N");$_M(c$,"set4",function(a,b,c,d){this.x=a;this.y=b;this.z=c;this.angle=d},"~N,~N,~N,~N");
$_M(c$,"setAA",function(a){this.x=a.x;this.y=a.y;this.z=a.z;this.angle=a.angle},"J.util.AxisAngle4f");$_M(c$,"setM",function(a){this.setFromMat(a.m00,a.m01,a.m02,a.m10,a.m11,a.m12,a.m20,a.m21,a.m22)},"J.util.Matrix3f");$_M(c$,"setFromMat",($fz=function(a,b,c,d,e,f,g,h,k){a=0.5*(a+e+k-1);this.x=h-f;this.y=c-g;this.z=d-b;b=0.5*Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z);this.angle=Math.atan2(b,a)},$fz.isPrivate=!0,$fz),"~N,~N,~N,~N,~N,~N,~N,~N,~N");Clazz.overrideMethod(c$,"toString",function(){return"("+
this.x+", "+this.y+", "+this.z+", "+this.angle+")"});Clazz.overrideMethod(c$,"equals",function(a){return!Clazz.instanceOf(a,J.util.AxisAngle4f)?!1:this.x==a.x&&this.y==a.y&&this.z==a.z&&this.angle==a.angle},"~O");Clazz.overrideMethod(c$,"hashCode",function(){return J.util.Tuple3f.floatToIntBits0(this.x)^J.util.Tuple3f.floatToIntBits0(this.y)^J.util.Tuple3f.floatToIntBits0(this.z)^J.util.Tuple3f.floatToIntBits0(this.angle)})}),Clazz.declarePackage("J.api"),Clazz.load(null,"J.api.JmolViewer",["java.util.Hashtable"],
function(){c$=Clazz.decorateAsClass(function(){this.fileAdapter=this.apiPlatform=this.menuStructure=null;Clazz.instantialize(this,arguments)},J.api,"JmolViewer");c$.allocateViewer=$_M(c$,"allocateViewer",function(a,b,c,d,e,f,g,h){var k=new java.util.Hashtable;null!=a&&k.put("display",a);null!=b&&k.put("adapter",b);null!=g&&k.put("statusListener",g);null!=h&&k.put("platform",h);null!=f&&k.put("options",f);null!=c&&k.put("fullName",c);null!=d&&k.put("documentBase",d);null!=e&&k.put("codeBase",e);return new J.viewer.Viewer(k)},
"~O,J.api.JmolAdapter,~S,java.net.URL,java.net.URL,~S,J.api.JmolStatusListener,J.api.ApiPlatform");c$.allocateViewer=$_M(c$,"allocateViewer",function(a,b){return J.api.JmolViewer.allocateViewer(a,b,null,null,null,null,null,null)},"~O,J.api.JmolAdapter");c$.allocateViewer=$_M(c$,"allocateViewer",function(a,b,c,d,e,f,g){return J.api.JmolViewer.allocateViewer(a,b,c,d,e,f,g,null)},"~O,J.api.JmolAdapter,~S,java.net.URL,java.net.URL,~S,J.api.JmolStatusListener");$_M(c$,"setConsole",function(a){this.getProperty("DATA_API",
"getAppConsole",a)},"J.api.JmolAppConsoleInterface");c$.getJmolVersion=$_M(c$,"getJmolVersion",function(){return J.viewer.Viewer.getJmolVersion()});c$.checkOption=$_M(c$,"checkOption",function(a,b){var c=a.getParameter(b);return Clazz.instanceOf(c,Boolean)&&c.booleanValue()||Clazz.instanceOf(c,Integer)&&0!=c.intValue()},"J.api.JmolViewer,~S");$_M(c$,"openFileAsync",function(a){this.openFileAsyncPDB(a,!1)},"~S");$_M(c$,"mouseEvent",function(a,b,c,d,e){this.handleOldJvm10Event(a,b,c,d,e)},"~N,~N,~N,~N,~N");
$_M(c$,"getFileAdapter",function(){return null==this.fileAdapter?this.fileAdapter=this.apiPlatform.getFileAdapter():this.fileAdapter});$_M(c$,"renderScreenImage",function(a,b){this.apiPlatform.renderScreenImage(this,a,b)},"~O,~O,~O");$_M(c$,"getJsObjectInfo",function(a,b,c){return this.apiPlatform.getJsObjectInfo(a,b,c)},"~A,~S,~A");c$.getJmolValueAsString=$_M(c$,"getJmolValueAsString",function(a,b){return null==a?"":""+a.getParameter(b)},"J.api.JmolViewer,~S")}),Clazz.declarePackage("J.atomdata"),
Clazz.declareInterface(J.atomdata,"AtomDataServer"),Clazz.declarePackage("J.constant"),Clazz.load(["java.lang.Enum"],"J.constant.EnumVdw",null,function(){c$=Clazz.decorateAsClass(function(){this.pt=0;this.type2=this.type=null;Clazz.instantialize(this,arguments)},J.constant,"EnumVdw",Enum);Clazz.makeConstructor(c$,($fz=function(a,b,c){this.pt=a;this.type=b;this.type2=c},$fz.isPrivate=!0,$fz),"~N,~S,~S");$_M(c$,"getVdwLabel",function(){return null==this.type?this.type2:this.type});c$.getVdwType=$_M(c$,
"getVdwType",function(a){if(null!=a)for(var b,c=0,d=J.constant.EnumVdw.values();c<d.length&&((b=d[c])||1);c++)if(a.equalsIgnoreCase(b.type))return b;return null},"~S");c$.getVdwType2=$_M(c$,"getVdwType2",function(a){if(null!=a)for(var b,c=0,d=J.constant.EnumVdw.values();c<d.length&&((b=d[c])||1);c++)if(a.equalsIgnoreCase(b.type2))return b;return null},"~S");Clazz.defineEnumConstant(c$,"JMOL",0,[0,"Jmol",null]);Clazz.defineEnumConstant(c$,"BABEL",1,[1,"Babel",null]);Clazz.defineEnumConstant(c$,"RASMOL",
2,[2,"RasMol",null]);Clazz.defineEnumConstant(c$,"BABEL21",3,[3,"Babel21",null]);Clazz.defineEnumConstant(c$,"AUTO_JMOL",4,[0,null,"Jmol"]);Clazz.defineEnumConstant(c$,"AUTO_BABEL",5,[1,null,"Babel"]);Clazz.defineEnumConstant(c$,"AUTO_RASMOL",6,[2,null,"RasMol"]);Clazz.defineEnumConstant(c$,"AUTO",7,[0,"Auto",null]);Clazz.defineEnumConstant(c$,"USER",8,[-1,"User",null]);Clazz.defineEnumConstant(c$,"ADPMAX",9,[-1,null,"adpmax"]);Clazz.defineEnumConstant(c$,"ADPMIN",10,[-1,null,"adpmin"]);Clazz.defineEnumConstant(c$,
"HYDRO",11,[-1,null,"hydrophobic"]);Clazz.defineEnumConstant(c$,"IONIC",12,[-1,null,"ionic"]);Clazz.defineEnumConstant(c$,"TEMP",13,[-1,null,"temperature"]);Clazz.defineEnumConstant(c$,"NOJMOL",14,[-1,null,null]);Clazz.defineEnumConstant(c$,"NADA",15,[-1,null,null])}),Clazz.declarePackage("J.atomdata"),Clazz.load(["java.lang.Enum","J.constant.EnumVdw"],"J.atomdata.RadiusData",["java.lang.Float","J.util.SB"],function(){c$=Clazz.decorateAsClass(function(){this.vdwType=this.factorType=this.info=null;
this.value=NaN;this.valueExtended=0;this.values=null;Clazz.instantialize(this,arguments)},J.atomdata,"RadiusData");Clazz.prepareFields(c$,function(){this.factorType=J.atomdata.RadiusData.EnumType.ABSOLUTE;this.vdwType=J.constant.EnumVdw.AUTO});Clazz.makeConstructor(c$,function(a,b,c,d){null!=a?(this.values=a,this.value=2147483647):null!=c&&(this.factorType=c,this.value=b,null!=d&&(this.vdwType=d))},"~A,~N,J.atomdata.RadiusData.EnumType,J.constant.EnumVdw");Clazz.overrideMethod(c$,"toString",function(){if(Float.isNaN(this.value))return"";
var a=new J.util.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(Clazz.floatToInt(100*this.value)).append("%");this.vdwType!==J.constant.EnumVdw.AUTO&&a.append(this.vdwType.getVdwLabel());break;case J.atomdata.RadiusData.EnumType.SCREEN:a.appendI(Clazz.floatToInt(this.value))}return a.toString()});
Clazz.pu$h();c$=Clazz.declareType(J.atomdata.RadiusData,"EnumType",Enum);Clazz.defineEnumConstant(c$,"ABSOLUTE",0,[]);Clazz.defineEnumConstant(c$,"OFFSET",1,[]);Clazz.defineEnumConstant(c$,"FACTOR",2,[]);Clazz.defineEnumConstant(c$,"SCREEN",3,[]);c$=Clazz.p0p()}),Clazz.declarePackage("J.util"),Clazz.load(null,"J.util.CommandHistory",["J.util.JmolList"],function(){c$=Clazz.decorateAsClass(function(){this.commandList=null;this.maxSize=100;this.cursorPos=this.nextCommand=0;this.isOn=!0;Clazz.instantialize(this,
arguments)},J.util,"CommandHistory");Clazz.makeConstructor(c$,function(){this.reset(100)});Clazz.makeConstructor(c$,function(a){this.reset(a)},"~N");$_M(c$,"clear",function(){this.reset(this.maxSize)});$_M(c$,"reset",function(a){this.maxSize=a;this.commandList=new J.util.JmolList;this.nextCommand=0;this.commandList.addLast("");this.cursorPos=0},"~N");$_M(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");$_M(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});$_M(c$,"getCommandDown",function(){if(this.cursorPos>=this.nextCommand)return null;this.cursorPos++;return this.getCommand()});$_M(c$,"getCommand",($fz=function(){return this.commandList.get(this.cursorPos)},$fz.isPrivate=
!0,$fz));$_M(c$,"addCommand",function(a){if((this.isOn||a.endsWith("#??"))&&!a.endsWith("#----")){for(var b;0<=(b=a.indexOf("\n"));){var c=a.substring(0,b);0<c.length&&this.addCommandLine(c);a=a.substring(b+1)}0<a.length&&this.addCommandLine(a)}},"~S");$_M(c$,"getSetHistory",function(a){this.isOn=-2==a?this.isOn:!0;switch(a){case 0:return this.isOn=!1,this.clear(),"";case -2147483648:case -2:return this.clear(),"";case -1:return this.getCommandUp();case 1:return this.getCommandDown();default:if(0>
a)return this.setMaxSize(-2-a),"";a=Math.max(this.nextCommand-a,0)}for(var b="";a<this.nextCommand;a++)this.commandList.get(a).toUpperCase().startsWith("WRITE HISTORY")||(b+=this.commandList.get(a)+"\n");return b},"~N");$_M(c$,"removeCommand",function(){return this.removeCommand(this.nextCommand-1)});$_M(c$,"removeCommand",function(a){if(0>a||a>=this.nextCommand)return"";a=this.commandList.remove(a);this.nextCommand--;return a},"~N");$_M(c$,"addCommandLine",($fz=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,"")},$fz.isPrivate=!0,$fz),"~S");Clazz.defineStatics(c$,"ERROR_FLAG","#??","NOHISTORYLINE_FLAG","#--","NOHISTORYATALL_FLAG","#----","DEFAULT_MAX_SIZE",100)}),Clazz.declarePackage("J.util"),c$=Clazz.decorateAsClass(function(){this.width=this.height=0;Clazz.instantialize(this,
arguments)},J.util,"Dimension"),$_M(c$,"set",function(a,b){this.width=a;this.height=b;return this},"~N,~N"),Clazz.declarePackage("J.viewer"),Clazz.load("java.lang.Enum J.api.JmolViewer J.atomdata.AtomDataServer java.util.Hashtable J.atomdata.RadiusData J.i18n.GT J.util.CommandHistory $.Dimension $.JmolList".split(" "),"J.viewer.Viewer","java.io.BufferedReader $.File $.StringReader java.lang.Boolean $.Character $.Double $.Float J.adapter.smarter.SmarterJmolAdapter J.api.Interface J.constant.EnumAxesMode $.EnumFileStatus $.EnumStereoMode $.EnumVdw J.io.CifDataReader $.JmolBinary J.modelset.Group J.script.SV $.T J.thread.ScriptDelayThread $.TimeoutThread J.util.ArrayUtil $.BS $.BSUtil $.C $.ColorUtil $.Elements $.Escape $.GData $.JmolMolecule $.Logger $.Measure $.P3 $.P3i $.Parser $.SB $.TempArray $.TextFormat $.V3 J.viewer.ActionManager $.AnimationManager $.ColorManager $.DataManager $.FileManager $.JC $.ModelManager $.SelectionManager $.ShapeManager $.StateManager $.StatusManager $.TransformManager J.viewer.binding.Binding".split(" "),
function(){c$=Clazz.decorateAsClass(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=null;this.mustRender=this.listCommands=this.isSyntaxCheck=this.isSyntaxAndFileCheck=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.wasInMotion=!1;this.motionEventNumber=0;this.refreshing=!0;this.axesAreTainted=!1;this.dimScreen=null;this.maximumSize=2147483647;this.imageFontScaling=1;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.headlessImage=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=null;this.currentShapeID=-1;this.localFunctions=this.currentShapeState=null;this.privateKey=0;this.logFile=
null;this.$isKiosk=!1;this.executor=this.minimizer=null;this.displayLoadErrors=!0;this.$isParallel=!1;this.actionStatesRedo=this.actionStates=null;this.stateScriptVersionInt=0;this.scriptDelayThread=this.timeouts=this.htPdbBondInfo=this.jsExporter3D=null;Clazz.instantialize(this,arguments)},J.viewer,"Viewer",J.api.JmolViewer,J.atomdata.AtomDataServer);Clazz.prepareFields(c$,function(){this.commandHistory=new J.util.CommandHistory;this.dimScreen=new J.util.Dimension;this.language=J.i18n.GT.getLanguage();
this.rd=new J.atomdata.RadiusData(null,0,null,null);this.localFunctions=new java.util.Hashtable;this.privateKey=Math.random();this.actionStates=new J.util.JmolList;this.actionStatesRedo=new J.util.JmolList});$_M(c$,"finalize",function(){J.util.Logger.debug("viewer finalize "+this);Clazz.superCall(this,J.viewer.Viewer,"finalize",[])});c$.getJmolVersion=Clazz.overrideMethod(c$,"getJmolVersion",function(){return null==J.viewer.Viewer.version_date?($t$=J.viewer.Viewer.version_date=J.viewer.JC.version+
"  "+J.viewer.JC.date,J.viewer.Viewer.prototype.version_date=J.viewer.Viewer.version_date,$t$):J.viewer.Viewer.version_date});c$.allocateViewer=$_M(c$,"allocateViewer",function(a,b,c,d,e,f,g,h){var k=new java.util.Hashtable;k.put("display",a);k.put("adapter",b);k.put("statusListener",g);k.put("platform",h);k.put("options",f);k.put("fullName",c);k.put("documentBase",d);k.put("codeBase",e);return new J.viewer.Viewer(k)},"~O,J.api.JmolAdapter,~S,java.net.URL,java.net.URL,~S,J.api.JmolStatusListener,J.api.ApiPlatform");
Clazz.makeConstructor(c$,function(a){Clazz.superConstructor(this,J.viewer.Viewer,[]);this.setOptions(a)},"java.util.Map");$_M(c$,"getGlobalSettings",function(){return this.global});$_M(c$,"getStatusManager",function(){return this.statusManager});Clazz.overrideMethod(c$,"isApplet",function(){return this.$isApplet});$_M(c$,"isRestricted",function(a){return this.access===a},"J.viewer.Viewer.ACCESS");Clazz.overrideMethod(c$,"getModelAdapter",function(){null==this.modelAdapter&&(this.modelAdapter=new J.adapter.smarter.SmarterJmolAdapter);
return this.modelAdapter});$_M(c$,"getSymmetry",function(){null==this.symmetry&&(this.symmetry=J.api.Interface.getOptionInterface("symmetry.Symmetry"));return this.symmetry});$_M(c$,"getSymmetryInfo",function(a,b,c,d,e,f,g){return this.getPropertyManager().getSymmetryInfo(a,b,c,d,e,f,g)},"J.util.BS,~S,~N,J.util.P3,J.util.P3,~S,~N");$_M(c$,"getSmilesMatcher",function(){null==this.smilesMatcher&&(this.smilesMatcher=J.api.Interface.getOptionInterface("smiles.SmilesMatcher"));return this.smilesMatcher});
Clazz.overrideMethod(c$,"getSmartsMatch",function(a,b){null==b&&(b=this.getSelectionSet(!1));return this.getSmilesMatcher().getSubstructureSet(a,this.modelSet.atoms,this.getAtomCount(),b,!0,!1)},"~S,J.util.BS");$_M(c$,"getViewerOptions",function(){return this.viewerOptions});$_M(c$,"setOptions",($fz=function(a){this.viewerOptions=a;J.util.Logger.debugging&&J.util.Logger.debug("Viewer constructor "+this);this.modelAdapter=a.get("adapter");var b=a.get("statusListener");this.fullName=a.get("fullName");
null==this.fullName&&(this.fullName="");var c=a.get("codeBase");this.appletCodeBase=null==c?"":c.toString();c=a.get("documentBase");this.appletDocumentBase=null==c?"":c.toString();c=a.get("options");this.commandOptions=null==c?"":c.toString();(a.containsKey("debug")||0<=this.commandOptions.indexOf("-debug"))&&J.util.Logger.setLogLevel(5);this.$isApplet=(this.$isSignedApplet=this.checkOption2("signedApplet","-signed"))||this.checkOption2("applet","-applet");this.allowScripting=!this.checkOption2("noscripting",
"-noscripting");c=this.fullName.indexOf("__");this.htmlName=0>c?this.fullName:this.fullName.substring(0,c);this.syncId=0>c?"":this.fullName.substring(c+2,this.fullName.length-2);this.$isApplet&&("undefined"!=typeof Jmol&&(this.applet=Jmol._applets[this.htmlName.split("_object")[0]]),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 c=a.get("platform"),d="unknown";null==c&&(c=this.commandOptions.contains("platform=")?this.commandOptions.substring(this.commandOptions.indexOf("platform=")+9):"J.awt.Platform");Clazz.instanceOf(c,String)&&(d=c,this.isJS=(this.isWebGL=0<=d.indexOf(".awtjs."))||0<=d.indexOf(".awtjs2d."),c=J.api.Interface.getInterface(d));this.apiPlatform=c;
this.display=a.get("display");this.isSingleThreaded=this.apiPlatform.isSingleThreaded();this.$noGraphicsAllowed=null==this.display&&this.checkOption2("noGraphics","-n");(this.haveDisplay=!this.$noGraphicsAllowed&&!this.isHeadless()&&!this.checkOption2("isDataOnly","\x00"))?(this.mustRender=!0,this.multiTouch=this.checkOption2("multiTouch","-multitouch"),this.isWebGL||(this.display=document.getElementById(this.display))):this.display=null;this.apiPlatform.setViewer(this,this.display);c=a.get("graphicsAdapter");
null==c&&!this.isWebGL&&(c=J.api.Interface.getInterface("J.g3d.Graphics3D"));this.gdata=null==c?new J.util.GData:c;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,this.actionManager),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.dataManager=new J.viewer.DataManager(this);this.animationManager=new J.viewer.AnimationManager(this);c=a.get("repaintManager");null==c&&(c=J.api.Interface.getOptionInterface("render.RepaintManager"));null!=c&&!c.equals("")&&(this.repaintManager=c).set(this,this.shapeManager);this.initialize(!0);this.fileManager=new J.viewer.FileManager(this);this.definedAtomSets=new java.util.Hashtable;this.setJmolStatusListener(b);this.$isApplet?(J.util.Logger.info("viewerOptions: \n"+J.util.Escape.escapeMap(this.viewerOptions)),
$t$=J.viewer.Viewer.jsDocumentBase=this.appletDocumentBase,J.viewer.Viewer.prototype.jsDocumentBase=J.viewer.Viewer.jsDocumentBase,$t$,c=J.viewer.Viewer.jsDocumentBase.indexOf("#"),0<=c&&($t$=J.viewer.Viewer.jsDocumentBase=J.viewer.Viewer.jsDocumentBase.substring(0,c),J.viewer.Viewer.prototype.jsDocumentBase=J.viewer.Viewer.jsDocumentBase,$t$),c=J.viewer.Viewer.jsDocumentBase.lastIndexOf("?"),0<=c&&($t$=J.viewer.Viewer.jsDocumentBase=J.viewer.Viewer.jsDocumentBase.substring(0,c),J.viewer.Viewer.prototype.jsDocumentBase=
J.viewer.Viewer.jsDocumentBase,$t$),c=J.viewer.Viewer.jsDocumentBase.lastIndexOf("/"),0<=c&&($t$=J.viewer.Viewer.jsDocumentBase=J.viewer.Viewer.jsDocumentBase.substring(0,c),J.viewer.Viewer.prototype.jsDocumentBase=J.viewer.Viewer.jsDocumentBase,$t$),this.fileManager.setAppletContext(this.appletDocumentBase),b=a.get("appletProxy"),null!=b&&this.setStringProperty("appletProxy",b),this.$isSignedApplet?(this.logFilePath=J.util.TextFormat.simpleReplace(this.appletCodeBase,"file://",""),this.logFilePath=
J.util.TextFormat.simpleReplace(this.logFilePath,"file:/",""),0<=this.logFilePath.indexOf("//")?this.logFilePath=null:this.isSignedAppletLocal=!0):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.headlessImage=a.get("headlessImage"),c=a.get("headlistMaxTimeMs"),null==c&&(c=Integer.$valueOf(6E4)),this.setTimeout(""+Math.random(),c.intValue(),"exitJmol")));this.useCommandThread=!this.isHeadless()&&this.checkOption2("useCommandThread","-threaded");this.setStartupBooleans();this.setIntProperty("_nProcessors",J.viewer.Viewer.nProcessors);c=a.get("menuFile");null!=c&&this.getProperty("DATA_API","setMenu",this.getFileAsString(c));
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()},$fz.isPrivate=!0,$fz),"java.util.Map");$_M(c$,"setDisplay",function(a){this.display=a;this.apiPlatform.setViewer(this,a)},"~O");$_M(c$,"getScriptManager",($fz=function(){this.allowScripting&&null==this.scriptManager&&(this.scriptManager=J.api.Interface.getOptionInterface("viewer.ScriptManager"),this.scriptManager.setViewer(this),this.eval=this.scriptManager.getEval(),this.useCommandThread&&
this.scriptManager.startCommandWatcher(!0));return this.scriptManager},$fz.isPrivate=!0,$fz));$_M(c$,"checkOption2",($fz=function(a,b){return this.viewerOptions.containsKey(a)||0<=this.commandOptions.indexOf(b)},$fz.isPrivate=!0,$fz),"~S,~S");$_M(c$,"isPreviewOnly",function(){return this.$isPreviewOnly});$_M(c$,"isHeadless",function(){return this.apiPlatform.isHeadless()});$_M(c$,"setStartupBooleans",($fz=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)},$fz.isPrivate=!0,$fz));$_M(c$,"noGraphicsAllowed",function(){return this.$noGraphicsAllowed});$_M(c$,"getExportDriverList",function(){return this.isRestricted(J.viewer.Viewer.ACCESS.ALL)?this.global.getParameter("exportDrivers"):""});$_M(c$,"getHtmlName",
function(){return this.htmlName});Clazz.overrideMethod(c$,"getDisplay",function(){return this.display});$_M(c$,"clearMouse",function(){this.mouse.clear()});$_M(c$,"disposeMouse",function(){this.mouse.dispose();this.mouse=null});Clazz.overrideMethod(c$,"handleOldJvm10Event",function(a,b,c,d,e){return this.mouse.handleOldJvm10Event(a,b,c,d,e)},"~N,~N,~N,~N,~N");$_M(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");Clazz.overrideMethod(c$,"homePosition",function(){this.evalString("reset spin")});$_M(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});$_M(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.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");$_M(c$,"listSavedStates",function(){return this.stateManager.listSavedStates()});$_M(c$,"saveOrientation",function(a){this.stateManager.saveOrientation(a)},"~S");$_M(c$,"restoreOrientation",function(a,b){return this.stateManager.restoreOrientation(a,b,!0)},"~S,~N");$_M(c$,"restoreRotation",function(a,b){this.stateManager.restoreOrientation(a,b,!1)},"~S,~N");$_M(c$,"saveModelOrientation",
function(){this.modelSet.saveModelOrientation(this.animationManager.currentModelIndex,this.stateManager.getOrientation())});$_M(c$,"getOrientation",function(){return this.stateManager.getOrientation()});$_M(c$,"getSavedOrienationText",function(a){return this.stateManager.getSavedOrientationText(a)},"~S");$_M(c$,"restoreModelOrientation",function(a){a=this.modelSet.getModelOrientation(a);null!=a&&a.restore(-1,!0)},"~N");$_M(c$,"restoreModelRotation",function(a){a=this.modelSet.getModelOrientation(a);
null!=a&&a.restore(-1,!1)},"~N");$_M(c$,"saveBonds",function(a){this.stateManager.saveBonds(a)},"~S");$_M(c$,"restoreBonds",function(a){this.clearModelDependentObjects();return this.stateManager.restoreBonds(a)},"~S");$_M(c$,"saveState",function(a){this.stateManager.saveState(a)},"~S");$_M(c$,"deleteSavedState",function(a){this.stateManager.deleteSaved("State_"+a)},"~S");$_M(c$,"getSavedState",function(a){return this.stateManager.getSavedState(a)},"~S");$_M(c$,"saveStructure",function(a){this.stateManager.saveStructure(a)},
"~S");$_M(c$,"getSavedStructure",function(a){return this.stateManager.getSavedStructure(a)},"~S");$_M(c$,"saveCoordinates",function(a,b){this.stateManager.saveCoordinates(a,b)},"~S,J.util.BS");$_M(c$,"getSavedCoordinates",function(a){return this.stateManager.getSavedCoordinates(a)},"~S");$_M(c$,"saveSelection",function(a){this.stateManager.saveSelection(a,this.getSelectionSet(!1));this.stateManager.restoreSelection(a)},"~S");$_M(c$,"restoreSelection",function(a){return this.stateManager.restoreSelection(a)},
"~S");$_M(c$,"getMatrixtransform",function(){return this.transformManager.getMatrixtransform()});$_M(c$,"getRotationQuaternion",function(){return this.transformManager.getRotationQuaternion()});$_M(c$,"setRotationRadius",function(a,b){b&&(a=this.transformManager.setRotationRadius(a,!1));this.modelSet.setRotationRadius(this.animationManager.currentModelIndex,a)&&this.global.setF("rotationRadius",a)},"~N,~B");$_M(c$,"getRotationCenter",function(){return this.transformManager.getRotationCenter()});$_M(c$,
"setCenterAt",function(a,b){this.isJmolDataFrame()||this.transformManager.setCenterAt(a,b)},"~S,J.util.P3");$_M(c$,"setCenterBitSet",function(a,b){var c=0<J.util.BSUtil.cardinalityOf(a)?this.getAtomSetCenter(a):null;this.isJmolDataFrame()||this.transformManager.setNewRotationCenter(c,b)},"J.util.BS,~B");$_M(c$,"setNewRotationCenter",function(a){this.isJmolDataFrame()||this.transformManager.setNewRotationCenter(a,!0)},"J.util.P3");$_M(c$,"getNavigationCenter",function(){return this.transformManager.getNavigationCenter()});
$_M(c$,"getNavigationDepthPercent",function(){return this.transformManager.getNavigationDepthPercent()});$_M(c$,"navigate",function(a,b){this.isJmolDataFrame()||(this.transformManager.navigateKey(a,b),!this.transformManager.vibrationOn&&0!=a&&this.refresh(1,"Viewer:navigate()"))},"~N,~N");$_M(c$,"getNavigationOffset",function(){return this.transformManager.getNavigationOffset()});$_M(c$,"getNavigationOffsetPercent",function(a){return this.transformManager.getNavigationOffsetPercent(a)},"~S");$_M(c$,
"isNavigating",function(){return this.transformManager.isNavigating()});$_M(c$,"isInPosition",function(a,b){return this.transformManager.isInPosition(a,b)},"J.util.V3,~N");$_M(c$,"move",function(a,b,c,d,e,f,g){this.transformManager.move(a,b,c,d,e,f,g);this.moveUpdate(f)},"J.api.JmolScriptEvaluator,J.util.V3,~N,J.util.V3,~N,~N,~N");$_M(c$,"stopMotion",function(){this.transformManager.stopMotion()});$_M(c$,"setRotationMatrix",function(a){this.transformManager.setRotation(a)},"J.util.Matrix3f");$_M(c$,
"moveTo",function(a,b,c,d,e,f,g,h,k,l,m,n,p,q){this.haveDisplay||(b=0);this.setTainted(!0);this.transformManager.moveTo(a,b,c,d,e,f,g,h,k,l,m,n,p,q)},"J.api.JmolScriptEvaluator,~N,J.util.P3,J.util.V3,~N,J.util.Matrix3f,~N,~N,~N,~N,J.util.P3,~N,~N,~N");$_M(c$,"moveUpdate",function(a){0<a?this.requestRepaintAndWait():0==a&&this.setSync()},"~N");$_M(c$,"getMoveToText",function(a){return this.transformManager.getMoveToText(a,!1)},"~N");$_M(c$,"navigateList",function(a,b){this.isJmolDataFrame()||this.transformManager.navigateList(a,
b)},"J.api.JmolScriptEvaluator,J.util.JmolList");$_M(c$,"navigatePt",function(a){this.transformManager.setNavigatePt(a);this.setSync()},"J.util.P3");$_M(c$,"navigateAxis",function(a,b){this.transformManager.navigateAxis(a,b);this.setSync()},"J.util.V3,~N");$_M(c$,"navTranslatePercent",function(a,b){this.isJmolDataFrame()||(this.transformManager.navTranslatePercentOrTo(0,a,b),this.setSync())},"~N,~N");$_M(c$,"setMouseEnabled",function(a){this.mouseEnabled=a},"~B");Clazz.overrideMethod(c$,"processEvent",
function(a,b,c,d,e,f){this.actionManager.processEvent(a,b,c,d,e,f)},"~N,~N,~N,~N,J.util.P3,~N");$_M(c$,"zoomBy",function(a){this.mouseEnabled&&this.transformManager.zoomBy(a);this.refresh(2,this.statusManager.syncingMouse?"Mouse: zoomBy "+a:"")},"~N");$_M(c$,"zoomByFactor",function(a,b,c){this.mouseEnabled&&this.transformManager.zoomByFactor(a,b,c);this.refresh(2,!this.statusManager.syncingMouse?"":"Mouse: zoomByFactor "+a+(2147483647==b?"":" "+b+" "+c))},"~N,~N,~N");$_M(c$,"rotateXYBy",function(a,
b){this.mouseEnabled&&this.transformManager.rotateXYBy(a,b,null);this.refresh(2,this.statusManager.syncingMouse?"Mouse: rotateXYBy "+a+" "+b:"")},"~N,~N");$_M(c$,"spinXYBy",function(a,b,c){this.mouseEnabled&&this.transformManager.spinXYBy(a,b,c);0==a&&0==b||this.refresh(2,this.statusManager.syncingMouse?"Mouse: spinXYBy "+a+" "+b+" "+c:"")},"~N,~N,~N");$_M(c$,"rotateZBy",function(a,b,c){this.mouseEnabled&&this.transformManager.rotateZBy(a,b,c);this.refresh(2,this.statusManager.syncingMouse?"Mouse: rotateZBy "+
a+(2147483647==b?"":" "+b+" "+c):"")},"~N,~N,~N");$_M(c$,"rotateSelected",function(a,b,c){this.isJmolDataFrame()||(this.mouseEnabled&&(this.transformManager.rotateXYBy(a,b,this.setMovableBitSet(c,!1)),this.refreshMeasures(!0)),this.refresh(2,this.statusManager.syncingMouse?"Mouse: rotateMolecule "+a+" "+b:""))},"~N,~N,J.util.BS");$_M(c$,"setMovableBitSet",($fz=function(a,b){null==a&&(a=this.getSelectionSet(!1));a=J.util.BSUtil.copy(a);J.util.BSUtil.andNot(a,this.getMotionFixedAtoms());b&&!this.global.allowMoveAtoms&&
(a=this.modelSet.getMoleculeBitSet(a));return a},$fz.isPrivate=!0,$fz),"J.util.BS,~B");$_M(c$,"translateXYBy",function(a,b){this.mouseEnabled&&this.transformManager.translateXYBy(a,b);this.refresh(2,this.statusManager.syncingMouse?"Mouse: translateXYBy "+a+" "+b:"")},"~N,~N");$_M(c$,"centerAt",function(a,b,c){this.mouseEnabled&&this.transformManager.centerAt(a,b,c);this.refresh(2,this.statusManager.syncingMouse?"Mouse: centerAt "+a+" "+b+" "+c.x+" "+c.y+" "+c.z:"")},"~N,~N,J.util.P3");Clazz.overrideMethod(c$,
"rotateFront",function(){this.transformManager.rotateFront();this.refresh(1,"Viewer:rotateFront()")});Clazz.overrideMethod(c$,"rotateX",function(a){this.transformManager.rotateX(a);this.refresh(1,"Viewer:rotateX()")},"~N");Clazz.overrideMethod(c$,"rotateY",function(a){this.transformManager.rotateY(a);this.refresh(1,"Viewer:rotateY()")},"~N");Clazz.overrideMethod(c$,"rotateZ",function(a){this.transformManager.rotateZ(a);this.refresh(1,"Viewer:rotateZ()")},"~N");Clazz.overrideMethod(c$,"rotateXDeg",
function(a){this.rotateX(0.017453292*a)},"~N");Clazz.overrideMethod(c$,"rotateYDeg",function(a){this.rotateY(0.017453292*a)},"~N");$_M(c$,"translate",function(a,b,c,d){var e="\x00"==c?Clazz.floatToInt(b):"%"==c?this.transformManager.percentToPixels(a,b):this.transformManager.angstromsToPixels(b*("n"==c?10:1));if(null!=d){if(0==e)return;this.transformManager.setSelectedTranslation(d,a,e)}else switch(a){case "X":case "x":"\x00"==c?this.transformManager.translateToPercent("x",b):this.transformManager.translateXYBy(e,
0);break;case "Y":case "y":"\x00"==c?this.transformManager.translateToPercent("y",b):this.transformManager.translateXYBy(0,e);break;case "Z":case "z":"\x00"==c?this.transformManager.translateToPercent("z",b):this.transformManager.translateZBy(e)}this.refresh(1,"Viewer:translate()")},"~S,~N,~S,J.util.BS");$_M(c$,"getTranslationXPercent",function(){return this.transformManager.getTranslationXPercent()});$_M(c$,"getTranslationYPercent",function(){return this.transformManager.getTranslationYPercent()});
$_M(c$,"getTranslationZPercent",function(){return this.transformManager.getTranslationZPercent()});$_M(c$,"getTranslationScript",function(){return this.transformManager.getTranslationScript()});$_M(c$,"getZShadeStart",function(){return this.transformManager.getZShadeStart()});$_M(c$,"isWindowCentered",function(){return this.transformManager.isWindowCentered()});Clazz.overrideMethod(c$,"getZoomPercent",function(){return Clazz.floatToInt(this.getZoomSetting())});$_M(c$,"getZoomSetting",function(){return this.transformManager.getZoomSetting()});
Clazz.overrideMethod(c$,"getZoomPercentFloat",function(){return this.transformManager.getZoomPercentFloat()});$_M(c$,"getMaxZoomPercent",function(){return 2E5});$_M(c$,"slabReset",function(){this.transformManager.slabReset()});$_M(c$,"getZoomEnabled",function(){return this.transformManager.zoomEnabled});$_M(c$,"getSlabEnabled",function(){return this.transformManager.slabEnabled});$_M(c$,"slabByPixels",function(a){this.transformManager.slabByPercentagePoints(a);this.refresh(3,"slabByPixels")},"~N");
$_M(c$,"depthByPixels",function(a){this.transformManager.depthByPercentagePoints(a);this.refresh(3,"depthByPixels")},"~N");$_M(c$,"slabDepthByPixels",function(a){this.transformManager.slabDepthByPercentagePoints(a);this.refresh(3,"slabDepthByPixels")},"~N");$_M(c$,"slabInternal",function(a,b){this.transformManager.slabInternal(a,b)},"J.util.P4,~B");$_M(c$,"slabToPercent",function(a){this.transformManager.slabToPercent(a)},"~N");$_M(c$,"depthToPercent",function(a){this.transformManager.depthToPercent(a)},
"~N");$_M(c$,"setSlabDepthInternal",function(a){this.transformManager.setSlabDepthInternal(a)},"~B");$_M(c$,"zValueFromPercent",function(a){return this.transformManager.zValueFromPercent(a)},"~N");Clazz.overrideMethod(c$,"getUnscaledTransformMatrix",function(){return this.transformManager.getUnscaledTransformMatrix()});$_M(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)});$_M(c$,"rotatePoint",function(a,b){this.transformManager.rotatePoint(a,b)},"J.util.P3,J.util.P3");$_M(c$,"transformPt",function(a){return this.transformManager.transformPoint(a)},"J.util.P3");$_M(c$,"transformPtVib",function(a,b){return this.transformManager.transformPointVib(a,b)},"J.util.P3,J.util.V3");$_M(c$,"transformPtScr",function(a,b){this.transformManager.transformPointScr(a,
b)},"J.util.P3,J.util.P3i");$_M(c$,"transformPtNoClip",function(a,b){this.transformManager.transformPointNoClip2(a,b)},"J.util.P3,J.util.P3");$_M(c$,"transformPt3f",function(a,b){this.transformManager.transformPoint2(a,b)},"J.util.P3,J.util.P3");$_M(c$,"transformPoints",function(a,b){this.transformManager.transformPoints(a.length,a,b)},"~A,~A");$_M(c$,"transformVector",function(a,b){this.transformManager.transformVector(a,b)},"J.util.V3,J.util.V3");$_M(c$,"unTransformPoint",function(a,b){this.transformManager.unTransformPoint(a,
b)},"J.util.P3,J.util.P3");$_M(c$,"getScalePixelsPerAngstrom",function(a){return this.transformManager.scalePixelsPerAngstrom*(a||!this.antialiasDisplay?1:0.5)},"~B");$_M(c$,"scaleToScreen",function(a,b){return this.transformManager.scaleToScreen(a,b)},"~N,~N");$_M(c$,"unscaleToScreen",function(a,b){return this.transformManager.unscaleToScreen(a,b)},"~N,~N");$_M(c$,"scaleToPerspective",function(a,b){return this.transformManager.scaleToPerspective(a,b)},"~N,~N");$_M(c$,"setSpin",function(a,b){if(J.util.Parser.isOneOf(a,
"x;y;z;fps;X;Y;Z;FPS")){var c="x;y;z;fps;X;Y;Z;FPS".indexOf(a);switch(c){case 0:this.transformManager.setSpinXYZ(b,NaN,NaN);break;case 2:this.transformManager.setSpinXYZ(NaN,b,NaN);break;case 4:this.transformManager.setSpinXYZ(NaN,NaN,b);break;default:this.transformManager.setSpinFps(b);break;case 10:this.transformManager.setNavXYZ(b,NaN,NaN);break;case 12:this.transformManager.setNavXYZ(NaN,b,NaN);break;case 14:this.transformManager.setNavXYZ(NaN,NaN,b);break;case 16:this.transformManager.setNavFps(b)}this.global.setI((10>
c?"spin":"nav")+a,b)}},"~S,~N");$_M(c$,"getSpinState",function(){return this.getStateCreator().getSpinState(!1)});$_M(c$,"setSpinOn",function(a){a?this.transformManager.setSpinOn():this.transformManager.setSpinOff()},"~B");$_M(c$,"getSpinOn",function(){return this.transformManager.getSpinOn()});$_M(c$,"setNavOn",function(a){this.transformManager.setNavOn(a)},"~B");$_M(c$,"getNavOn",function(){return this.transformManager.getNavOn()});$_M(c$,"setNavXYZ",function(a,b,c){this.transformManager.setNavXYZ(Clazz.floatToInt(a),
Clazz.floatToInt(b),Clazz.floatToInt(c))},"~N,~N,~N");$_M(c$,"getOrientationText",function(a,b){return null==b?this.transformManager.getOrientationText(a):this.stateManager.getSavedOrientationText(b)},"~N,~S");$_M(c$,"getOrientationInfo",function(){return this.transformManager.getOrientationInfo()});$_M(c$,"getMatrixRotate",function(){return this.transformManager.getMatrixRotate()});$_M(c$,"getAxisAngle",function(a){this.transformManager.getAxisAngle(a)},"J.util.AxisAngle4f");$_M(c$,"getTransformText",
function(){return this.transformManager.getTransformText()});$_M(c$,"getRotation",function(a){this.transformManager.getRotation(a)},"J.util.Matrix3f");$_M(c$,"getCurrentColorRange",function(){return this.colorManager.getPropertyColorRange()});$_M(c$,"setDefaultColors",($fz=function(a){this.colorManager.setDefaultColors(a);this.global.setB("colorRasmol",a);this.global.setS("defaultColorScheme",a?"rasmol":"jmol")},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"getColorArgbOrGray",function(a){return this.gdata.getColorArgbOrGray(a)},
"~N");$_M(c$,"setRubberbandArgb",function(a){this.colorManager.setRubberbandArgb(a)},"~N");$_M(c$,"getColixRubberband",function(){return this.colorManager.colixRubberband});$_M(c$,"setElementArgb",function(a,b){this.global.setS("=color "+J.util.Elements.elementNameFromNumber(a),J.util.Escape.escapeColor(b));this.colorManager.setElementArgb(a,b)},"~N,~N");Clazz.overrideMethod(c$,"setVectorScale",function(a){this.global.setF("vectorScale",a);this.global.vectorScale=a},"~N");$_M(c$,"isVibrationOn",function(){return this.transformManager.vibrationOn});
Clazz.overrideMethod(c$,"setVibrationScale",function(a){this.transformManager.setVibrationScale(a);this.global.vibrationScale=a;this.global.setF("vibrationScale",a)},"~N");$_M(c$,"setVibrationOff",function(){this.transformManager.setVibrationPeriod(0)});Clazz.overrideMethod(c$,"setVibrationPeriod",function(a){this.transformManager.setVibrationPeriod(a);a=Math.abs(a);this.global.vibrationPeriod=a;this.global.setF("vibrationPeriod",a)},"~N");$_M(c$,"setObjectColor",function(a,b){null==b||0==b.length||
this.setObjectArgb(a,J.util.ColorUtil.getArgbFromString(b))},"~S,~S");$_M(c$,"setObjectArgb",function(a,b){var c=J.viewer.StateManager.getObjectIdFromName(a);if(0>c)a.equalsIgnoreCase("axes")&&(this.setObjectArgb("axis1",b),this.setObjectArgb("axis2",b),this.setObjectArgb("axis3",b));else{this.global.objColors[c]=b;switch(c){case 0:this.gdata.setBackgroundArgb(b),this.colorManager.setColixBackgroundContrast(b)}this.global.setS(a+"Color",J.util.Escape.escapeColor(b))}},"~S,~N");$_M(c$,"setBackgroundImage",
function(a,b){this.global.backgroundImageFileName=a;this.gdata.setBackgroundImage(b)},"~S,~O");$_M(c$,"getObjectArgb",function(a){return this.global.objColors[a]},"~N");$_M(c$,"getObjectColix",function(a){a=this.getObjectArgb(a);return 0==a?this.getColixBackgroundContrast():J.util.C.getColix(a)},"~N");$_M(c$,"getFontState",function(a,b){return this.getStateCreator().getFontState(a,b)},"~S,J.util.JmolFont");Clazz.overrideMethod(c$,"setColorBackground",function(a){this.setObjectColor("background",a)},
"~S");Clazz.overrideMethod(c$,"getBackgroundArgb",function(){return this.getObjectArgb(0)});$_M(c$,"setObjectMad",function(a,b,c){var d=J.viewer.StateManager.getObjectIdFromName(b.equalsIgnoreCase("axes")?"axis":b);if(!(0>d)){if(-2==c||-4==c){var e=c+3;c=this.getObjectMad(d);0==c&&(c=e)}this.global.setB("show"+b,0!=c);this.global.objStateOn[d]=0!=c;0!=c&&(this.global.objMad[d]=c,this.setShapeSize(a,c,null))}},"~N,~S,~N");$_M(c$,"getObjectMad",function(a){return this.global.objStateOn[a]?this.global.objMad[a]:
0},"~N");$_M(c$,"setPropertyColorScheme",function(a,b,c){this.global.propertyColorScheme=a;a.startsWith("translucent ")&&(b=!0,a=a.substring(12).trim());this.colorManager.setPropertyColorScheme(a,b,c)},"~S,~B,~B");$_M(c$,"getPropertyColorScheme",function(){return this.global.propertyColorScheme});$_M(c$,"getColixBackgroundContrast",function(){return this.colorManager.colixBackgroundContrast});$_M(c$,"getSpecularState",function(){return this.getStateCreator().getSpecularState()});$_M(c$,"getColixAtomPalette",
function(a,b){return this.colorManager.getColixAtomPalette(a,b)},"J.modelset.Atom,~N");$_M(c$,"getColixBondPalette",function(a,b){return this.colorManager.getColixBondPalette(a,b)},"J.modelset.Bond,~N");$_M(c$,"getColorSchemeList",function(a){return this.colorManager.getColorSchemeList(a)},"~S");$_M(c$,"setUserScale",function(a){this.colorManager.setUserScale(a)},"~A");$_M(c$,"getColixForPropertyValue",function(a){return this.colorManager.getColixForPropertyValue(a)},"~N");$_M(c$,"getColorPointForPropertyValue",
function(a){return J.util.ColorUtil.colorPointFromInt2(this.gdata.getColorArgbOrGray(this.colorManager.getColixForPropertyValue(a)))},"~N");$_M(c$,"select",function(a,b,c,d){b&&(a=this.getUndeletedGroupAtomBits(a));this.selectionManager.select(a,c,d);this.shapeManager.setShapeSizeBs(1,2147483647,null,null)},"J.util.BS,~B,Boolean,~B");Clazz.overrideMethod(c$,"setSelectionSet",function(a){this.select(a,!1,null,!0)},"J.util.BS");$_M(c$,"selectBonds",function(a){this.shapeManager.setShapeSizeBs(1,2147483647,
null,a)},"J.util.BS");$_M(c$,"displayAtoms",function(a,b,c,d,e){c&&(a=this.getUndeletedGroupAtomBits(a));b?this.selectionManager.display(this.modelSet,a,d,e):this.selectionManager.hide(this.modelSet,a,d,e)},"J.util.BS,~B,~B,Boolean,~B");$_M(c$,"getUndeletedGroupAtomBits",($fz=function(a){a=this.getAtomBits(1087373318,a);J.util.BSUtil.andNot(a,this.selectionManager.getDeletedAtoms());return a},$fz.isPrivate=!0,$fz),"J.util.BS");$_M(c$,"getHiddenSet",function(){return this.selectionManager.getHiddenSet()});
$_M(c$,"isSelected",function(a){return this.selectionManager.isSelected(a)},"~N");$_M(c$,"isInSelectionSubset",function(a){return this.selectionManager.isInSelectionSubset(a)},"~N");$_M(c$,"reportSelection",function(a){this.modelSet.getSelectionHaloEnabled()&&this.setTainted(!0);(this.isScriptQueued()||this.global.debugScript)&&this.scriptStatus(a)},"~S");$_M(c$,"getAtomSetCenter",function(a){return this.modelSet.getAtomSetCenter(a)},"J.util.BS");$_M(c$,"clearAtomSets",($fz=function(){this.setSelectionSubset(null);
this.definedAtomSets.clear()},$fz.isPrivate=!0,$fz));Clazz.overrideMethod(c$,"selectAll",function(){this.selectionManager.selectAll(!1)});$_M(c$,"setNoneSelected",function(a){this.noneSelected=a},"~B");$_M(c$,"getNoneSelected",function(){return this.noneSelected?Boolean.TRUE:Boolean.FALSE});Clazz.overrideMethod(c$,"clearSelection",function(){this.selectionManager.clearSelection(!0);this.global.setB("hideNotSelected",!1)});$_M(c$,"setSelectionSubset",function(a){this.selectionManager.setSelectionSubset(a)},
"J.util.BS");$_M(c$,"getSelectionSubset",function(){return this.selectionManager.getSelectionSubset()});$_M(c$,"invertSelection",function(){this.selectionManager.invertSelection()});$_M(c$,"getSelectionSet",function(a){return this.selectionManager.getSelectionSet(a)},"~B");$_M(c$,"setSelectedAtom",function(a,b){this.selectionManager.setSelectedAtom(a,b)},"~N,~B");$_M(c$,"isAtomSelected",function(a){return this.selectionManager.isAtomSelected(a)},"~N");Clazz.overrideMethod(c$,"getSelectionCount",function(){return this.selectionManager.getSelectionCount()});
$_M(c$,"setFormalCharges",function(a){this.modelSet.setFormalCharges(this.getSelectionSet(!1),a)},"~N");Clazz.overrideMethod(c$,"addSelectionListener",function(a){this.selectionManager.addListener(a)},"J.api.JmolSelectionListener");Clazz.overrideMethod(c$,"removeSelectionListener",function(a){this.selectionManager.addListener(a)},"J.api.JmolSelectionListener");$_M(c$,"getAtomBitSetEval",function(a,b){return!this.allowScripting?(System.out.println("viewer.getAtomBitSetEval not allowed"),new J.util.BS):
this.getScriptManager().getAtomBitSetEval(a,b)},"J.api.JmolScriptEvaluator,~O");Clazz.overrideMethod(c$,"setModeMouse",function(a){if(-1==a){null!=this.mouse&&(this.mouse.dispose(),this.mouse=null);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(b){if(!Clazz.exceptionOf(b,Exception))throw b;}}},"~N");$_M(c$,"getRubberBandSelection",function(){return this.haveDisplay?this.actionManager.getRubberBand():null});$_M(c$,"isBound",function(a,b){return this.haveDisplay&&this.actionManager.isBound(a,b)},"~N,~N");$_M(c$,"getCursorX",function(){return this.haveDisplay?this.actionManager.getCurrentX():0});$_M(c$,"getCursorY",function(){return this.haveDisplay?
this.actionManager.getCurrentY():0});$_M(c$,"getDefaultDirectory",function(){return this.global.defaultDirectory});Clazz.overrideMethod(c$,"getBufferedInputStream",function(a){return this.fileManager.getBufferedInputStream(a)},"~S");$_M(c$,"getBufferedReaderOrErrorMessageFromName",function(a,b,c){return this.fileManager.getBufferedReaderOrErrorMessageFromName(a,b,c,!0)},"~S,~A,~B");$_M(c$,"setLoadParameters",($fz=function(a,b){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.getDefaultLattice());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 c=this.getDefaultLoadFilter();0<c.length&&a.put("filter",c)}b&&(!this.global.appendNew&&
0<this.getAtomCount())&&a.put("merging",Boolean.TRUE);return a},$fz.isPrivate=!0,$fz),"java.util.Map,~B");Clazz.overrideMethod(c$,"openFileAsyncPDB",function(a,b){this.getStateCreator().openFileAsync(a,b)},"~S,~B");Clazz.overrideMethod(c$,"openFile",function(a){this.zap(!0,!0,!1);return this.loadModelFromFile(null,a,null,null,!1,null,null,0)},"~S");Clazz.overrideMethod(c$,"openFiles",function(a){this.zap(!0,!0,!1);return this.loadModelFromFile(null,null,a,null,!1,null,null,0)},"~A");Clazz.overrideMethod(c$,
"openReader",function(a,b,c){this.zap(!0,!0,!1);return this.loadModelFromFile(a,b,null,c,!1,null,null,0)},"~S,~S,java.io.Reader");Clazz.overrideMethod(c$,"openDOM",function(a){this.zap(!0,!0,!1);return this.loadModelFromFile("?","?",null,a,!1,null,null,0)},"~O");$_M(c$,"loadModelFromFile",function(a,b,c,d,e,f,g,h){null==f&&(f=this.setLoadParameters(null,e));var k=this.fileManager.getFileInfo();if(null!=c){if(null==g){g=(new J.util.SB).append("load files");for(b=0;b<c.length;b++)g.append(" /*file*/$FILENAME"+
(b+1)+"$")}b=System.currentTimeMillis();a=this.fileManager.createAtomSetCollectionFromFiles(c,this.setLoadParameters(f,e),e);d=System.currentTimeMillis()-b;for(b=0;b<c.length;b++);J.util.Logger.info("openFiles("+c.length+") "+d+" ms");c=f.get("fullPathNames");d=f.get("fileTypes");g=g.toString();for(b=0;b<c.length;b++){var l=c[b];null!=d&&null!=d[b]&&(l=d[b]+"::"+l);g=J.util.TextFormat.simpleReplace(g,"$FILENAME"+(b+1)+"$",J.util.Escape.eS(l.$replace("\\","/")))}g=(new J.util.SB).append(g)}else null==
d?(null==g&&(g=(new J.util.SB).append("load /*file*/$FILENAME$")),a=this.openFileFull(b,e,f,g)):a=Clazz.instanceOf(d,java.io.Reader)?this.fileManager.createAtomSetCollectionFromReader(a,b,d,f):this.fileManager.createAtomSetCollectionFromDOM(d,f);if(0!=h)return this.fileManager.setFileInfo(k),this.loadAtomDataAndReturnError(a,h);if(f.containsKey("isData"))return a;null!=g&&(l=f.get("fullPathName"),null==l&&(l=""),f.containsKey("loadScript")&&(g=f.get("loadScript")),f.put("loadScript",g=(new J.util.SB).append(J.util.TextFormat.simpleReplace(g.toString(),
"$FILENAME$",J.util.Escape.eS(l.$replace("\\","/"))))));return this.createModelSetAndReturnError(a,e,g,f)},"~S,~S,~A,~O,~B,java.util.Map,J.util.SB,~N");$_M(c$,"setLigandModel",function(a,b){a=a.toUpperCase();null==this.ligandModels&&(this.ligandModels=new java.util.Hashtable);this.ligandModels.put(a+"_data",b)},"~S,~S");$_M(c$,"getLigandModel",function(a){if(null==a){if(null!=this.ligandModelSet)for(a=this.ligandModels.entrySet().iterator();a.hasNext();){var b=a.next();Clazz.instanceOf(b.getValue(),
Boolean)&&a.remove()}return null}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 c=this.ligandModels.get(a),d=null;if(Clazz.instanceOf(c,Boolean))return null;null==c&&(c=this.ligandModels.get(a+"_data"));var e=!1;if(null==c){d=this.setLoadFormat("#"+a,"#",!1);if(0==d.length)return null;this.scriptEcho("fetching "+d);c=this.getFileAsString(d);(e=
0==c.indexOf("java."))||this.ligandModels.put(a+"_data",c)}!e&&Clazz.instanceOf(c,String)&&(b=c,0!=b.length&&(c=new java.util.Hashtable,c.put("modelOnly",Boolean.TRUE),c=this.getModelAdapter().getAtomSetCollectionReader("ligand",null,J.io.JmolBinary.getBufferedReaderForString(b),c),e=Clazz.instanceOf(c,String),e||(c=this.getModelAdapter().getAtomSetCollection(c),e=Clazz.instanceOf(c,String),null!=d&&!e&&this.scriptEcho(this.getModelAdapter().getAtomSetCollectionAuxiliaryInfo(c).get("modelLoadNote")))));
return e?(this.scriptEcho(c.toString()),this.ligandModels.put(a,Boolean.FALSE),null):c},"~S");$_M(c$,"openFileFull",($fz=function(a,b,c,d){if(null==a||0<=a.indexOf("[]"))return null;var e="openFile("+a+")";J.util.Logger.startTimer(e);c=this.setLoadParameters(c,b);var f=a.startsWith("@"),g=c.containsKey("fileData");0==a.indexOf("$")&&c.put("smilesString",a.substring(1));var h=a.equalsIgnoreCase("string")||a.equals("Jmol Model Kit"),k=null;if(g){if(k=c.get("fileData"),c.containsKey("isData"))return this.loadInlineScript(k,
"\x00",b,c)}else if(h){k=this.modelSet.getInlineData(-1);if(null==k)if(this.global.modelKitMode)k="1 0 C 0 0";else return"cannot find string data";null!=d&&c.put("loadScript",d=(new J.util.SB).append(J.util.TextFormat.simpleReplace(d.toString(),"$FILENAME$",'data "model inline"\n'+k+'end "model inline"')))}null!=k?(b||this.zap(!0,!1,!1),a=this.fileManager.createAtomSetCollectionFromString(k,d,c,b,f||g&&!h)):a=this.fileManager.createAtomSetCollectionFromFile(a,c,b);J.util.Logger.checkTimer(e,!1);return a},
$fz.isPrivate=!0,$fz),"~S,~B,java.util.Map,J.util.SB");Clazz.overrideMethod(c$,"openStringInline",function(a){return this.openStringInlineParams(a,null,!1)},"~S");$_M(c$,"loadInline",function(a){return this.loadInlineScript(a,this.global.inlineNewlineChar,!1,null)},"~S");$_M(c$,"loadInline",function(a,b){return this.loadInlineScript(a,b,!1,null)},"~S,~S");$_M(c$,"loadInline",function(a,b){return this.loadInlineScript(a,"\x00",b,null)},"~S,~B");$_M(c$,"loadInline",function(a){return this.loadInline(a,
!1)},"~A");$_M(c$,"loadInline",function(a,b){return null==a||0==a.length?null:this.openStringsInline(a,null,b)},"~A,~B");$_M(c$,"loadInline",function(a,b){if(null==a||0==a.size())return null;b||this.zap(!0,!1,!1);var c=this.fileManager.createAtomSeCollectionFromArrayData(a,this.setLoadParameters(null,b),b);return this.createModelSetAndReturnError(c,b,null,null)},"java.util.List,~B");$_M(c$,"loadInlineScript",function(a,b,c,d){if(null==a||0==a.length)return null;a=J.viewer.Viewer.fixInlineString(a,
b);0!=b.charCodeAt(0)&&J.util.Logger.info("loading model inline, "+a.length+" bytes, with newLine character "+b.charCodeAt(0)+" isAppend="+c);J.util.Logger.debug(a);b=this.getDataSeparator();var e;if(null!=b&&""!==b&&0<=(e=a.indexOf(b))&&0>a.indexOf("# Jmol state")){for(var f=2;0<=(e=a.indexOf(b,e+1));)f++;var g=Array(f),h=0,k=0;for(e=0;e<f;e++)h=a.indexOf(b,k),0>h&&(h=a.length),g[e]=a.substring(k,h),k=h+b.length;return this.openStringsInline(g,d,c)}return this.openStringInlineParams(a,d,c)},"~S,~S,~B,java.util.Map");
c$.fixInlineString=$_M(c$,"fixInlineString",function(a,b){var c;0<=a.indexOf("\\/n")&&(a=J.util.TextFormat.simpleReplace(a,"\n",""),a=J.util.TextFormat.simpleReplace(a,"\\/n","\n"),b=String.fromCharCode(0));if(0!=b.charCodeAt(0)&&"\n"!=b){var d=0<=a.indexOf("\n"),e=a.length;for(c=0;c<e&&" "==a.charAt(c);++c);c<e&&a.charAt(c)==b&&(a=a.substring(c+1));a=d?J.util.TextFormat.simpleReplace(a,""+b,""):a.$replace(b,"\n")}return a},"~S,~S");$_M(c$,"openStringInlineParams",($fz=function(a,b,c){var d=new java.io.BufferedReader(new java.io.StringReader(a)),
d=this.getModelAdapter().getFileTypeName(d);if(null==d)return"unknown file type";if(d.equals("spt"))return"cannot open script inline";b=this.setLoadParameters(b,c);var d=b.get("loadScript"),e=b.containsKey("isData");null==d&&(d=new J.util.SB);c||this.zap(!0,!1,!1);a=this.fileManager.createAtomSetCollectionFromString(a,d,b,c,e);return this.createModelSetAndReturnError(a,c,d,null)},$fz.isPrivate=!0,$fz),"~S,java.util.Map,~B");$_M(c$,"openStringsInline",($fz=function(a,b,c){var d=new J.util.SB;c||this.zap(!0,
!1,!1);a=this.fileManager.createAtomSeCollectionFromStrings(a,d,this.setLoadParameters(b,c),c);return this.createModelSetAndReturnError(a,c,d,null)},$fz.isPrivate=!0,$fz),"~A,java.util.Map,~B");$_M(c$,"getInlineChar",function(){return this.global.inlineNewlineChar});$_M(c$,"getDataSeparator",function(){return this.global.getParameter("dataseparator")});$_M(c$,"createModelSetAndReturnError",($fz=function(a,b,c,d){var e=this.fileManager.getFullPathName(),f=this.fileManager.getFileName();null==c&&(this.setBooleanProperty("preserveState",
!1),c=(new J.util.SB).append('load "???"'));if(Clazz.instanceOf(a,String))return this.setFileLoadStatus(J.constant.EnumFileStatus.NOT_LOADED,e,null,null,a,null),this.displayLoadErrors&&(!b&&!a.equals("#CANCELED#"))&&this.zapMsg(a),a;b?this.clearAtomSets():this.global.modelKitMode&&!f.equals("Jmol Model Kit")&&this.setModelKitMode(!1);this.setFileLoadStatus(J.constant.EnumFileStatus.CREATING_MODELSET,e,f,null,null,null);this.pushHoldRepaintWhy("createModelSet");this.setErrorMessage(null,null);try{var g=
new J.util.BS;this.modelSet=this.modelManager.createModelSet(e,f,c,a,g,b);if(0<g.cardinality()){var h=this.modelSet.getModelSetAuxiliaryInfoValue("jmolscript");this.modelSet.getModelSetAuxiliaryInfoBoolean("doMinimize")?this.minimize(2147483647,0,g,null,0,!0,!0,!0):this.addHydrogens(g,!1,!0);null!=h&&this.modelSet.getModelSetAuxiliaryInfo().put("jmolscript",h)}this.initializeModel(b)}catch(k){if(Clazz.exceptionOf(k,Error))this.handleError(k,!0),a=this.getShapeErrorState(),a="ERROR creating model: "+
k+(0==a.length?"":"|"+a),this.zapMsg(a),this.setErrorMessage(a,null);else throw k;}this.popHoldRepaintWhy("createModelSet");a=this.getErrorMessage();this.setFileLoadStatus(J.constant.EnumFileStatus.CREATED,e,f,this.getModelSetName(),a,null==d?null:d.get("async"));b&&(this.selectAll(),this.setTainted(!0),this.axesAreTainted=!0);System.gc();return a},$fz.isPrivate=!0,$fz),"~O,~B,J.util.SB,java.util.Map");$_M(c$,"loadAtomDataAndReturnError",($fz=function(a,b){if(Clazz.instanceOf(a,String))return a;this.setErrorMessage(null,
null);try{switch(this.modelManager.createAtomDataSet(a,b),b){case 4166:this.setStatusFrameChanged(!0);break;case 1649412112:this.shapeManager.deleteVdwDependentShapes(null)}}catch(c){if(Clazz.exceptionOf(c,Error)){this.handleError(c,!0);var d=this.getShapeErrorState(),d="ERROR adding atom data: "+c+(0==d.length?"":"|"+d);this.zapMsg(d);this.setErrorMessage(d,null);this.setParallel(!1)}else throw c;}return this.getErrorMessage()},$fz.isPrivate=!0,$fz),"~O,~N");Clazz.overrideMethod(c$,"getEmbeddedFileState",
function(a){return this.fileManager.getEmbeddedFileState(a)},"~S");Clazz.overrideMethod(c$,"getFileAsBytes",function(a,b){return this.fileManager.getFileAsBytes(a,b,!0)},"~S,java.io.OutputStream");$_M(c$,"getCurrentFileAsString",function(){var a=this.getFullPathName();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,2147483647,!0,!1)});$_M(c$,"getFullPathName",function(){return this.fileManager.getFullPathName()});$_M(c$,"getFileName",function(){return this.fileManager.getFileName()});$_M(c$,"getFullPathNameOrError",function(a){return this.fileManager.getFullPathNameOrError(a)},"~S");Clazz.overrideMethod(c$,"getFileAsString",function(a){return this.getFileAsString4(a,2147483647,!1,!1)},"~S");$_M(c$,"getFileAsString4",function(a,b,c,d){if(null==a)return this.getCurrentFileAsString();
var e=Array(2);e[0]=a;this.getFileAsStringFM(e,b,c,d);return e[1]},"~S,~N,~B,~B");Clazz.overrideMethod(c$,"getFileAsStringBin",function(a,b,c){return this.getFileAsStringFM(a,b,c,!0)},"~A,~N,~B");$_M(c$,"getFileAsStringFM",($fz=function(a,b,c,d){return this.fileManager.getFileDataOrErrorAsString(a,b,c,d)},$fz.isPrivate=!0,$fz),"~A,~N,~B,~B");$_M(c$,"getFilePath",function(a,b){return this.fileManager.getFilePath(a,!1,b)},"~S,~B");$_M(c$,"getFileInfo",function(){return this.fileManager.getFileInfo()});
$_M(c$,"setFileInfo",function(a){this.fileManager.setFileInfo(a)},"~A");$_M(c$,"autoCalculate",function(a){switch(a){case 1112539149:this.modelSet.getSurfaceDistanceMax();break;case 1112539148:this.modelSet.calculateStraightness()}},"~N");$_M(c$,"getSurfaceDistanceMax",function(){return this.modelSet.getSurfaceDistanceMax()});$_M(c$,"calculateStraightness",function(){this.modelSet.setHaveStraightness(!1);this.modelSet.calculateStraightness()});$_M(c$,"calculateSurface",function(a,b){null==a&&(a=this.getSelectionSet(!1));
if(3.4028235E38==b||-1==b)this.addStateScriptRet("calculate surfaceDistance "+(3.4028235E38==b?"FROM":"WITHIN"),null,a,null,"",!1,!0);return this.modelSet.calculateSurface(a,b)},"J.util.BS,~N");$_M(c$,"getStructureList",function(){return this.global.getStructureList()});$_M(c$,"setStructureList",function(a,b){this.global.setStructureList(a,b);this.modelSet.setStructureList(this.getStructureList())},"~A,J.constant.EnumStructure");$_M(c$,"getDefaultStructure",function(a,b){null==a&&(a=this.getSelectionSet(!1));
return this.modelSet.getDefaultStructure(a,b)},"J.util.BS,J.util.BS");$_M(c$,"calculateStructures",function(a,b,c){null==a&&(a=this.getSelectionSet(!1));return this.modelSet.calculateStructures(a,b,this.global.dsspCalcHydrogen,c)},"J.util.BS,~B,~B");Clazz.overrideMethod(c$,"getSelectedAtomIterator",function(a,b,c,d){return this.modelSet.getSelectedAtomIterator(a,b,c,!1,d)},"J.util.BS,~B,~B,~B");Clazz.overrideMethod(c$,"setIteratorForAtom",function(a,b,c){this.modelSet.setIteratorForAtom(a,-1,b,c,
null)},"J.api.AtomIndexIterator,~N,~N");Clazz.overrideMethod(c$,"setIteratorForPoint",function(a,b,c,d){this.modelSet.setIteratorForPoint(a,b,c,d)},"J.api.AtomIndexIterator,~N,J.util.P3,~N");Clazz.overrideMethod(c$,"fillAtomData",function(a,b){a.programInfo="Jmol Version "+J.viewer.Viewer.getJmolVersion();a.fileName=this.getFileName();this.modelSet.fillAtomData(a,b)},"J.atomdata.AtomData,~N");$_M(c$,"addStateScript",function(a,b,c){return this.addStateScriptRet(a,null,null,null,null,b,c)},"~S,~B,~B");
$_M(c$,"addStateScriptRet",function(a,b,c,d,e,f,g){return this.modelSet.addStateScript(a,b,c,d,e,f,g)},"~S,J.util.BS,J.util.BS,J.util.BS,~S,~B,~B");$_M(c$,"getEchoStateActive",function(){return this.modelSet.getEchoStateActive()});$_M(c$,"setEchoStateActive",function(a){this.modelSet.setEchoStateActive(a)},"~B");$_M(c$,"clearModelDependentObjects",($fz=function(){this.setFrameOffsets(null);this.stopMinimization();this.minimizer=null;null!=this.smilesMatcher&&(this.smilesMatcher=null);null!=this.symmetry&&
(this.symmetry=null)},$fz.isPrivate=!0,$fz));$_M(c$,"zap",function(a,b,c){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.modelSet=this.modelManager.zap(),null!=this.scriptManager&&this.scriptManager.clear(!1),this.haveDisplay&&
(this.mouse.clear(),this.clearTimeouts(),this.actionManager.clear()),this.stateManager.clear(this.global),this.tempArray.clear(),this.colorManager.clear(),this.definedAtomSets.clear(),this.dataManager.clear(),b&&(c&&this.global.modelKitMode&&(this.loadInline("1 0 C 0 0"),this.setRotationRadius(5,!0),this.setStringProperty("picking","assignAtom_C"),this.setStringProperty("picking","assignBond_p")),this.undoClear()),System.gc()):this.modelSet=this.modelManager.zap();this.initializeModel(!1);a&&this.setFileLoadStatus(J.constant.EnumFileStatus.ZAPPED,
null,b?"resetUndo":this.getZapName(),null,null,null);J.util.Logger.debugging&&J.util.Logger.checkMemory()},"~B,~B,~B");$_M(c$,"zapMsg",($fz=function(a){this.zap(!0,!0,!1);this.echoMessage(a)},$fz.isPrivate=!0,$fz),"~S");$_M(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");$_M(c$,"initializeModel",($fz=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())},$fz.isPrivate=!0,$fz),"~B");
$_M(c$,"startHoverWatcher",function(a){this.haveDisplay&&this.hoverEnabled&&this.actionManager.startHoverWatcher(a)},"~B");Clazz.overrideMethod(c$,"getModelSetName",function(){return null==this.modelSet?null:this.modelSet.modelSetName});Clazz.overrideMethod(c$,"getModelSetFileName",function(){return this.modelManager.getModelSetFileName()});$_M(c$,"getUnitCellInfoText",function(){return this.modelSet.getUnitCellInfoText()});$_M(c$,"getUnitCellInfo",function(a){var b=this.getCurrentUnitCell();return null==
b?NaN:b.getUnitCellInfoType(a)},"~N");$_M(c$,"getSpaceGroupInfo",function(a){return this.modelSet.getSymTemp(!0).getSpaceGroupInfo(this.modelSet,-1,a,0,null,null,null)},"~S");$_M(c$,"getPolymerPointsAndVectors",function(a,b){this.modelSet.getPolymerPointsAndVectors(a,b,this.global.traceAlpha,this.global.sheetSmoothing)},"J.util.BS,J.util.JmolList");$_M(c$,"getModelSetProperty",function(a){return this.modelSet.getModelSetProperty(a)},"~S");$_M(c$,"getModelSetAuxiliaryInfoValue",function(a){return this.modelSet.getModelSetAuxiliaryInfoValue(a)},
"~S");Clazz.overrideMethod(c$,"getModelSetPathName",function(){return this.modelManager.getModelSetPathName()});$_M(c$,"getModelSetTypeName",function(){return this.modelSet.getModelSetTypeName()});Clazz.overrideMethod(c$,"haveFrame",function(){return this.haveModelSet()});$_M(c$,"haveModelSet",function(){return null!=this.modelSet});$_M(c$,"clearBfactorRange",function(){this.modelSet.clearBfactorRange()});$_M(c$,"getHybridizationAndAxes",function(a,b,c,d){return this.modelSet.getHybridizationAndAxes(a,
0,b,c,d,!0,!0)},"~N,J.util.V3,J.util.V3,~S");$_M(c$,"getMoleculeBitSet",function(a){return this.modelSet.getMoleculeBitSetForAtom(a)},"~N");$_M(c$,"getModelUndeletedAtomsBitSet",function(a){a=this.modelSet.getModelAtomBitSetIncludingDeleted(a,!0);this.excludeAtoms(a,!1);return a},"~N");$_M(c$,"getModelBitSet",function(a,b){return this.modelSet.getModelBitSet(a,b)},"J.util.BS,~B");$_M(c$,"getModelUndeletedAtomsBitSetBs",function(a){a=this.modelSet.getModelAtomBitSetIncludingDeletedBs(a);this.excludeAtoms(a,
!1);return a},"J.util.BS");$_M(c$,"excludeAtoms",function(a,b){this.selectionManager.excludeAtoms(a,b)},"J.util.BS,~B");$_M(c$,"getModelSet",function(){return this.modelSet});$_M(c$,"getBoundBoxCommand",function(a){return this.modelSet.getBoundBoxCommand(a)},"~B");$_M(c$,"setBoundBox",function(a,b,c,d){this.modelSet.setBoundBox(a,b,c,d)},"J.util.P3,J.util.P3,~B,~N");Clazz.overrideMethod(c$,"getBoundBoxCenter",function(){return this.modelSet.getBoundBoxCenter(this.animationManager.currentModelIndex)});
$_M(c$,"getAverageAtomPoint",function(){return this.modelSet.getAverageAtomPoint()});$_M(c$,"calcBoundBoxDimensions",function(a,b){this.modelSet.calcBoundBoxDimensions(a,b);this.axesAreTainted=!0},"J.util.BS,~N");$_M(c$,"getBoxInfo",function(a,b){return this.modelSet.getBoxInfo(a,b)},"J.util.BS,~N");$_M(c$,"calcRotationRadius",function(a){return this.modelSet.calcRotationRadius(this.animationManager.currentModelIndex,a)},"J.util.P3");$_M(c$,"calcRotationRadiusBs",function(a){return this.modelSet.calcRotationRadiusBs(a)},
"J.util.BS");Clazz.overrideMethod(c$,"getBoundBoxCornerVector",function(){return this.modelSet.getBoundBoxCornerVector()});$_M(c$,"getBoundBoxVertices",function(){return this.modelSet.getBboxVertices()});$_M(c$,"getBoundBoxInfo",function(){return this.modelSet.getBoundBoxInfo()});$_M(c$,"getBoundBoxModels",function(){return this.modelSet.getBoundBoxModels()});$_M(c$,"getBoundBoxCenterX",function(){return Clazz.doubleToInt(this.dimScreen.width/2)});$_M(c$,"getBoundBoxCenterY",function(){return Clazz.doubleToInt(this.dimScreen.height/
2)});Clazz.overrideMethod(c$,"getModelCount",function(){return this.modelSet.modelCount});$_M(c$,"getModelInfoAsString",function(){return this.modelSet.getModelInfoAsString()});$_M(c$,"getSymmetryInfoAsString",function(){return this.modelSet.getSymmetryInfoAsString()});$_M(c$,"getSymmetryOperation",function(a,b,c,d,e){return this.modelSet.getSymmetryOperation(this.animationManager.currentModelIndex,a,b,c,d,null,e)},"~S,~N,J.util.P3,J.util.P3,~B");Clazz.overrideMethod(c$,"getModelSetProperties",function(){return this.modelSet.getModelSetProperties()});
Clazz.overrideMethod(c$,"getModelSetAuxiliaryInfo",function(){return this.modelSet.getModelSetAuxiliaryInfo()});Clazz.overrideMethod(c$,"getModelNumber",function(a){return 0>a?a:this.modelSet.getModelNumber(a)},"~N");$_M(c$,"getModelFileNumber",function(a){return 0>a?0:this.modelSet.getModelFileNumber(a)},"~N");Clazz.overrideMethod(c$,"getModelNumberDotted",function(a){return 0>a?"0":null==this.modelSet?null:this.modelSet.getModelNumberDotted(a)},"~N");Clazz.overrideMethod(c$,"getModelName",function(a){return null==
this.modelSet?null:this.modelSet.getModelName(a)},"~N");Clazz.overrideMethod(c$,"getModelProperties",function(a){return this.modelSet.getModelProperties(a)},"~N");Clazz.overrideMethod(c$,"getModelProperty",function(a,b){return this.modelSet.getModelProperty(a,b)},"~N,~S");$_M(c$,"getModelFileInfo",function(){return this.getPropertyManager().getModelFileInfo(this.getVisibleFramesBitSet())});$_M(c$,"getModelFileInfoAll",function(){return this.getPropertyManager().getModelFileInfo(null)});Clazz.overrideMethod(c$,
"getModelAuxiliaryInfo",function(a){return this.modelSet.getModelAuxiliaryInfo(a)},"~N");Clazz.overrideMethod(c$,"getModelAuxiliaryInfoValue",function(a,b){return this.modelSet.getModelAuxiliaryInfoValue(a,b)},"~N,~S");$_M(c$,"getModelNumberIndex",function(a,b,c){return this.modelSet.getModelNumberIndex(a,b,c)},"~N,~B,~B");$_M(c$,"modelSetHasVibrationVectors",function(){return this.modelSet.modelSetHasVibrationVectors()});Clazz.overrideMethod(c$,"modelHasVibrationVectors",function(a){return this.modelSet.modelHasVibrationVectors(a)},
"~N");Clazz.overrideMethod(c$,"getChainCount",function(){return this.modelSet.getChainCount(!0)});Clazz.overrideMethod(c$,"getChainCountInModel",function(a){return this.modelSet.getChainCountInModel(a,!1)},"~N");$_M(c$,"getChainCountInModelWater",function(a,b){return this.modelSet.getChainCountInModel(a,b)},"~N,~B");Clazz.overrideMethod(c$,"getGroupCount",function(){return this.modelSet.getGroupCount()});Clazz.overrideMethod(c$,"getGroupCountInModel",function(a){return this.modelSet.getGroupCountInModel(a)},
"~N");Clazz.overrideMethod(c$,"getPolymerCount",function(){return this.modelSet.getBioPolymerCount()});Clazz.overrideMethod(c$,"getPolymerCountInModel",function(a){return this.modelSet.getBioPolymerCountInModel(a)},"~N");Clazz.overrideMethod(c$,"getAtomCount",function(){return this.modelSet.getAtomCount()});Clazz.overrideMethod(c$,"getAtomCountInModel",function(a){return this.modelSet.getAtomCountInModel(a)},"~N");Clazz.overrideMethod(c$,"getBondCount",function(){return this.modelSet.bondCount});
Clazz.overrideMethod(c$,"getBondCountInModel",function(a){return this.modelSet.getBondCountInModel(a)},"~N");$_M(c$,"getBondsForSelectedAtoms",function(a){return this.modelSet.getBondsForSelectedAtoms(a,this.global.bondModeOr||1==J.util.BSUtil.cardinalityOf(a))},"J.util.BS");$_M(c$,"frankClicked",function(a,b){return!this.global.disablePopupMenu&&this.getShowFrank()&&this.shapeManager.checkFrankclicked(a,b)},"~N,~N");$_M(c$,"frankClickedModelKit",function(a,b){return!this.global.disablePopupMenu&&
this.global.modelKitMode&&0<=a&&0<=b&&40>a&&80>b},"~N,~N");Clazz.overrideMethod(c$,"findNearestAtomIndex",function(a,b){return this.findNearestAtomIndexMovable(a,b,!1)},"~N,~N");$_M(c$,"findNearestAtomIndexMovable",function(a,b,c){return null==this.modelSet||!this.global.atomPicking?-1:this.modelSet.findNearestAtomIndex(a,b,c?this.selectionManager.getMotionFixedAtoms():null,this.global.minPixelSelRadius)},"~N,~N,~B");$_M(c$,"findAtomsInRectangle",function(a){return this.modelSet.findAtomsInRectangle(a,
this.getVisibleFramesBitSet())},"J.util.Rectangle");$_M(c$,"toCartesian",function(a,b){var c=this.getCurrentUnitCell();null!=c&&c.toCartesian(a,b)},"J.util.P3,~B");$_M(c$,"toFractional",function(a,b){var c=this.getCurrentUnitCell();null!=c&&c.toFractional(a,b)},"J.util.P3,~B");$_M(c$,"toUnitCell",function(a,b){var c=this.getCurrentUnitCell();null!=c&&c.toUnitCell(a,b)},"J.util.P3,J.util.P3");$_M(c$,"setCurrentCage",function(a){a=[a,null];this.shapeManager.getShapePropertyData(24,"unitCell",a);this.modelSet.setModelCage(this.getCurrentModelIndex(),
a[1])},"~S");$_M(c$,"setCurrentCagePts",function(a){this.modelSet.setModelCage(this.getCurrentModelIndex(),this.getSymmetry().getUnitCell(a))},"~A");$_M(c$,"setCurrentUnitCellOffset",function(a){this.modelSet.setUnitCellOffset(this.animationManager.currentModelIndex,null,a)},"~N");$_M(c$,"setCurrentUnitCellOffsetPt",function(a){this.modelSet.setUnitCellOffset(this.animationManager.currentModelIndex,a,0)},"J.util.P3");$_M(c$,"addUnitCellOffset",function(a){var b=this.getCurrentUnitCell();null!=b&&
a.add(b.getCartesianOffset())},"J.util.P3");$_M(c$,"setAtomData",function(a,b,c,d){this.modelSet.setAtomData(a,b,c,d);this.refreshMeasures(!0)},"~N,~S,~S,~B");Clazz.overrideMethod(c$,"setCenterSelected",function(){this.setCenterBitSet(this.getSelectionSet(!1),!0)});$_M(c$,"setApplySymmetryToBonds",function(a){this.global.applySymmetryToBonds=a},"~B");Clazz.overrideMethod(c$,"setBondTolerance",function(a){this.global.setF("bondTolerance",a);this.global.bondTolerance=a},"~N");Clazz.overrideMethod(c$,
"setMinBondDistance",function(a){this.global.setF("minBondDistance",a);this.global.minBondDistance=a},"~N");$_M(c$,"getAtomIndices",function(a){return this.modelSet.getAtomIndices(a)},"J.util.BS");$_M(c$,"getAtomBits",function(a,b){return this.modelSet.getAtomBits(a,b)},"~N,~O");$_M(c$,"getSequenceBits",function(a,b){return this.modelSet.getSequenceBits(a,b)},"~S,J.util.BS");$_M(c$,"getAtomsNearPt",function(a,b){var c=new J.util.BS;this.modelSet.getAtomsWithin(a,b,c,-1);return c},"~N,J.util.P3");
$_M(c$,"getAtomsNearPts",function(a,b,c){return this.modelSet.getAtomsWithinBs(a,b,c)},"~N,~A,J.util.BS");$_M(c$,"getAtomsNearPlane",function(a,b){return this.modelSet.getAtomsWithin(a,b)},"~N,J.util.P4");$_M(c$,"getAtomsWithinRadius",function(a,b,c,d){return this.modelSet.getAtomsWithinRD(a,b,c,d)},"~N,J.util.BS,~B,J.atomdata.RadiusData");$_M(c$,"getAtomsConnected",function(a,b,c,d){return this.modelSet.getAtomsConnected(a,b,c,d)},"~N,~N,~N,J.util.BS");$_M(c$,"getBranchBitSet",function(a,b){return 0>
a||a>=this.getAtomCount()?new J.util.BS:J.util.JmolMolecule.getBranchBitSet(this.modelSet.atoms,a,this.getModelUndeletedAtomsBitSet(this.modelSet.atoms[a].modelIndex),null,b,!0,!0)},"~N,~N");$_M(c$,"getAtomIndexFromAtomNumber",function(a){return this.modelSet.getAtomIndexFromAtomNumber(a,this.getVisibleFramesBitSet())},"~N");Clazz.overrideMethod(c$,"getElementsPresentBitSet",function(a){return this.modelSet.getElementsPresentBitSet(a)},"~N");Clazz.overrideMethod(c$,"getHeteroList",function(a){return this.modelSet.getHeteroList(a)},
"~N");$_M(c$,"getVisibleSet",function(){return this.modelSet.getVisibleSet()});$_M(c$,"getClickableSet",function(){return this.modelSet.getClickableSet()});$_M(c$,"calcSelectedGroupsCount",function(){this.modelSet.calcSelectedGroupsCount(this.getSelectionSet(!1))});$_M(c$,"calcSelectedMonomersCount",function(){this.modelSet.calcSelectedMonomersCount(this.getSelectionSet(!1))});$_M(c$,"calcSelectedMoleculesCount",function(){this.modelSet.calcSelectedMoleculesCount(this.getSelectionSet(!1))});$_M(c$,
"getFileHeader",function(){return this.modelSet.getFileHeader(this.animationManager.currentModelIndex)});$_M(c$,"getFileData",function(){return this.modelSet.getFileData(this.animationManager.currentModelIndex)});$_M(c$,"getCifData",function(a){a=this.getModelFileName(a);a=this.getFileAsString(a);return null==a?null:J.io.CifDataReader.readCifData(new java.io.BufferedReader(new java.io.StringReader(a)))},"~N");$_M(c$,"getPDBHeader",function(){return this.modelSet.getPDBHeader(this.animationManager.currentModelIndex)});
$_M(c$,"getModelInfo",function(a){return this.getPropertyManager().getModelInfo(a)},"~O");$_M(c$,"getLigandInfo",function(a){return this.getPropertyManager().getLigandInfo(a)},"~O");$_M(c$,"getAuxiliaryInfo",function(a){return this.modelSet.getAuxiliaryInfo(this.getModelBitSet(this.getAtomBitSet(a),!1))},"~O");$_M(c$,"getAllAtomInfo",function(a){return this.getPropertyManager().getAllAtomInfo(this.getAtomBitSet(a))},"~O");$_M(c$,"getAllBondInfo",function(a){return this.getPropertyManager().getAllBondInfo(this.getAtomBitSet(a))},
"~O");$_M(c$,"getMoleculeInfo",function(a){return this.getPropertyManager().getMoleculeInfo(this.modelSet,a)},"~O");$_M(c$,"getChimeInfo",function(a){return this.getPropertyManager().getChimeInfo(a,this.getSelectionSet(!0))},"~N");$_M(c$,"getAllChainInfo",function(a){return this.getPropertyManager().getAllChainInfo(this.getAtomBitSet(a))},"~O");$_M(c$,"getAllPolymerInfo",function(a){return this.getPropertyManager().getAllChainInfo(this.getAtomBitSet(a))},"~O");$_M(c$,"getStateCreator",function(){null==
this.sc&&(this.sc=J.api.Interface.getOptionInterface("viewer.StateCreator")).setViewer(this);return this.sc});$_M(c$,"getWrappedState",function(a,b,c,d,e,f){return this.getStateCreator().getWrappedState(a,b,c,d,e,f)},"~S,~A,~B,~B,~N,~N");Clazz.overrideMethod(c$,"getStateInfo",function(){return this.getStateInfo3(null,0,0)});$_M(c$,"getStateInfo3",function(a,b,c){return this.global.preserveState?this.getStateCreator().getStateScript(a,b,c):""},"~S,~N,~N");$_M(c$,"getStructureState",function(){return this.getStateCreator().getModelState(null,
!1,!0)});$_M(c$,"getProteinStructureState",function(){return this.modelSet.getProteinStructureState(this.getSelectionSet(!1),!1,!1,3)});$_M(c$,"getCoordinateState",function(a){return this.getStateCreator().getAtomicPropertyState(2,a)},"J.util.BS");$_M(c$,"setCurrentColorRange",function(a){var b=this.getDataFloat(a);a=null==b?null:this.dataManager.getData(a)[2];null!=a&&this.getBoolean(603979894)&&a.and(this.getSelectionSet(!1));this.setCurrentColorRangeData(b,a)},"~S");$_M(c$,"setCurrentColorRangeData",
function(a,b){this.colorManager.setPropertyColorRangeData(a,b,this.global.propertyColorScheme)},"~A,J.util.BS");$_M(c$,"setCurrentColorRange",function(a,b){this.colorManager.setPropertyColorRange(a,b)},"~N,~N");$_M(c$,"setData",function(a,b,c,d,e,f,g){this.dataManager.setData(a,b,c,this.getAtomCount(),d,e,f,g)},"~S,~A,~N,~N,~N,~N,~N");$_M(c$,"getData",function(a){return this.dataManager.getData(a)},"~S");$_M(c$,"getDataFloat",function(a){return this.dataManager.getDataFloatA(a)},"~S");$_M(c$,"getDataFloat2D",
function(a){return this.dataManager.getDataFloat2D(a)},"~S");$_M(c$,"getDataFloat3D",function(a){return this.dataManager.getDataFloat3D(a)},"~S");$_M(c$,"getDataFloatAt",function(a,b){return this.dataManager.getDataFloat(a,b)},"~S,~N");Clazz.overrideMethod(c$,"getAltLocListInModel",function(a){return this.modelSet.getAltLocListInModel(a)},"~N");$_M(c$,"setConformation",function(){return this.modelSet.setConformation(this.getSelectionSet(!1))});$_M(c$,"getConformation",function(a,b,c){return this.modelSet.getConformation(a,
b,c)},"~N,~N,~B");$_M(c$,"autoHbond",function(a,b,c){null==a&&(a=b=this.getSelectionSet(!1));return this.modelSet.autoHbond(a,b,c)},"J.util.BS,J.util.BS,~B");Clazz.overrideMethod(c$,"havePartialCharges",function(){return null!=this.modelSet.getPartialCharges()});$_M(c$,"getCurrentUnitCell",function(){return this.modelSet.getUnitCell(this.animationManager.currentModelIndex)});$_M(c$,"getModelUnitCell",function(a){return this.modelSet.getUnitCell(a)},"~N");$_M(c$,"getDefaultMeasurementLabel",function(a){switch(a){case 2:return this.global.defaultDistanceLabel;
case 3:return this.global.defaultAngleLabel;default:return this.global.defaultTorsionLabel}},"~N");Clazz.overrideMethod(c$,"getMeasurementCount",function(){var a=this.getShapePropertyAsInt(6,"count");return 0>=a?0:a});Clazz.overrideMethod(c$,"getMeasurementStringValue",function(a){return""+this.getShapePropertyIndex(6,"stringValue",a)},"~N");$_M(c$,"getMeasurementInfo",function(){return this.getShapeProperty(6,"info")});$_M(c$,"getMeasurementInfoAsString",function(){return this.getShapeProperty(6,
"infostring")});Clazz.overrideMethod(c$,"getMeasurementCountPlusIndices",function(a){return this.getShapePropertyIndex(6,"countPlusIndices",a)},"~N");$_M(c$,"setPendingMeasurement",function(a){this.setShapeProperty(6,"pending",a)},"J.modelset.MeasurementPending");$_M(c$,"getPendingMeasurement",function(){return this.getShapeProperty(6,"pending")});$_M(c$,"clearAllMeasurements",function(){this.setShapeProperty(6,"clear",null)});Clazz.overrideMethod(c$,"clearMeasurements",function(){this.evalString("measures delete")});
$_M(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");$_M(c$,"setAnimationDirection",function(a){this.animationManager.setAnimationDirection(a)},"~N");$_M(c$,"getAnimationDirection",function(){return this.animationManager.animationDirection});$_M(c$,"getAnimationInfo",function(){return this.getStateCreator().getInfo(this.animationManager)});Clazz.overrideMethod(c$,"setAnimationFps",function(a){1>a&&(a=1);50<a&&(a=50);this.global.setI("animationFps",a);this.animationManager.setAnimationFps(a)},
"~N");$_M(c$,"setAnimationReplayMode",function(a,b,c){this.animationManager.setAnimationReplayMode(a,b,c)},"J.constant.EnumAnimationMode,~N,~N");$_M(c$,"getAnimationReplayMode",function(){return this.animationManager.animationReplayMode});$_M(c$,"setAnimationOn",function(a){a!=this.animationManager.animationOn&&this.animationManager.setAnimationOn(a)},"~B");$_M(c$,"setAnimationRange",function(a,b){this.animationManager.setAnimationRange(a,b)},"~N,~N");Clazz.overrideMethod(c$,"getVisibleFramesBitSet",
function(){return this.modelSet.selectDisplayedTrajectories(J.util.BSUtil.copy(this.animationManager.bsVisibleFrames))});$_M(c$,"isAnimationOn",function(){return this.animationManager.animationOn});$_M(c$,"setMovie",function(a){this.animationManager.setMovie(a)},"java.util.Map");$_M(c$,"setAnimMorphCount",function(a){this.animationManager.morphCount=a},"~N");$_M(c$,"isMovie",function(){return this.animationManager.isMovie()});$_M(c$,"getFrameCount",function(){return this.animationManager.getFrameCount()});
$_M(c$,"defineAtomSets",function(a){this.definedAtomSets.putAll(a)},"java.util.Map");$_M(c$,"morph",function(a){this.animationManager.morph(a)},"~N");$_M(c$,"setAnimDisplay",function(a){this.animationManager.setDisplay(a);this.isAnimationOn()||this.animationManager.morph(this.animationManager.currentMorphFrame+1)},"J.util.BS");$_M(c$,"setCurrentModelIndex",function(a){-2147483648==a?(this.prevFrame=-2147483648,this.setCurrentModelIndexClear(this.animationManager.currentModelIndex,!0)):this.animationManager.setCurrentModelIndex(a,
!0)},"~N");$_M(c$,"setTrajectory",function(a){this.modelSet.setTrajectory(a)},"~N");$_M(c$,"setTrajectoryBs",function(a){this.modelSet.setTrajectoryBs(a)},"J.util.BS");$_M(c$,"isTrajectory",function(a){return this.modelSet.isTrajectory(a)},"~N");$_M(c$,"getBitSetTrajectories",function(){return this.modelSet.getBitSetTrajectories()});$_M(c$,"getTrajectoryState",function(){return this.getStateCreator().getTrajectoryState()});$_M(c$,"setFrameOffset",function(a){this.transformManager.setFrameOffset(a)},
"~N");$_M(c$,"setFrameOffsets",function(a){this.bsFrameOffsets=a;this.transformManager.setFrameOffsets(this.frameOffsets=this.modelSet.getFrameOffsets(this.bsFrameOffsets))},"J.util.BS");$_M(c$,"getFrameOffsets",function(){return this.bsFrameOffsets});$_M(c$,"setCurrentModelIndexClear",function(a,b){this.animationManager.setCurrentModelIndex(a,b)},"~N,~B");$_M(c$,"getCurrentModelIndex",function(){return this.animationManager.currentModelIndex});Clazz.overrideMethod(c$,"getDisplayModelIndex",function(){return this.animationManager.currentModelIndex});
$_M(c$,"haveFileSet",function(){return 1<this.getModelCount()&&2E6<this.getModelNumber(2147483647)});$_M(c$,"setBackgroundModelIndex",function(a){this.animationManager.setBackgroundModelIndex(a);this.global.setS("backgroundModel",this.modelSet.getModelNumberDotted(a))},"~N");$_M(c$,"setFrameVariables",function(){this.global.setS("_firstFrame",this.animationManager.getModelNumber(-1));this.global.setS("_lastFrame",this.animationManager.getModelNumber(1));this.global.setF("_animTimeSec",this.animationManager.getAnimRunTimeSeconds())});
Clazz.overrideMethod(c$,"getMotionEventNumber",function(){return this.motionEventNumber});Clazz.overrideMethod(c$,"setInMotion",function(a){(new Boolean(this.wasInMotion^a)).valueOf()&&((this.animationManager.inMotion=a)?(this.startHoverWatcher(!1),++this.motionEventNumber):(this.startHoverWatcher(!0),this.refresh(3,"viewer stInMotion "+a)),this.wasInMotion=a)},"~B");$_M(c$,"getInMotion",function(){return this.animationManager.inMotion||this.animationManager.animationOn});$_M(c$,"setRefreshing",($fz=
function(a){this.refreshing=a},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"getRefreshing",function(){return this.refreshing});Clazz.overrideMethod(c$,"pushHoldRepaint",function(){this.pushHoldRepaintWhy(null)});$_M(c$,"pushHoldRepaintWhy",function(){null!=this.repaintManager&&this.repaintManager.pushHoldRepaint()},"~S");Clazz.overrideMethod(c$,"popHoldRepaint",function(){null!=this.repaintManager&&this.repaintManager.popHoldRepaint(!0)});$_M(c$,"popHoldRepaintWhy",function(a){null!=this.repaintManager&&this.repaintManager.popHoldRepaint(!a.equals("pause"))},
"~S");Clazz.overrideMethod(c$,"refresh",function(a,b){if(null!=this.repaintManager&&this.refreshing&&!(6==a&&this.getInMotion())&&"undefined"!=typeof Jmol){if(this.isWebGL){if(2==a||7==a)if(this.transformManager.finalizeTransformParameters(),Jmol._refresh&&Jmol._refresh(this.applet,a,b,[this.transformManager.fixedRotationCenter,this.transformManager.getRotationQuaternion(),this.transformManager.xTranslationFraction,this.transformManager.yTranslationFraction,this.transformManager.modelRadius,this.transformManager.scalePixelsPerAngstrom,
this.transformManager.zoomPercent]),7==a)return}else{if(7==a)return;0<a&&this.repaintManager.repaintIfReady()}0!=a%3&&this.statusManager.doSync()&&this.statusManager.setSync(2==a?b:null)}},"~N,~S");$_M(c$,"requestRepaintAndWait",function(){this.haveDisplay&&null!=this.repaintManager&&(this.repaintManager.requestRepaintAndWait(),this.setSync())});$_M(c$,"clearShapeRenderers",function(){this.clearRepaintManager(-1)});$_M(c$,"isRepaintPending",function(){return null==this.repaintManager?!1:this.repaintManager.isRepaintPending()});
Clazz.overrideMethod(c$,"notifyViewerRepaintDone",function(){null!=this.repaintManager&&this.repaintManager.repaintDone();this.animationManager.repaintDone()});$_M(c$,"areAxesTainted",function(){var a=this.axesAreTainted;this.axesAreTainted=!1;return a});$_M(c$,"setMaximumSize",($fz=function(a){this.maximumSize=Math.max(a,100)},$fz.isPrivate=!0,$fz),"~N");Clazz.overrideMethod(c$,"setScreenDimension",function(a,b){b=Math.min(b,this.maximumSize);a=Math.min(a,this.maximumSize);this.isStereoDouble()&&
(a=Clazz.doubleToInt((a+1)/2));this.dimScreen.width==a&&this.dimScreen.height==b||this.resizeImage(a,b,!1,!1,!0)},"~N,~N");$_M(c$,"getImageFontScaling",function(){return this.imageFontScaling});$_M(c$,"resizeImage",function(a,b,c,d,e){if(c||!this.creatingImage)!d&&!c&&this.setShapeProperty(5,"clearBoxes",null),this.antialiasDisplay=e?this.global.antialiasDisplay:c&&!d?this.global.antialiasImages:!1,this.imageFontScaling=(e||0>=a?1:Clazz.doubleToInt((this.global.zoomLarge==b>a?b:a)/this.getScreenDim()))*
(this.antialiasDisplay?2:1),0<a?(this.dimScreen.width=a,this.dimScreen.height=b,c||(this.global.setI("_width",a),this.global.setI("_height",b),this.setStatusResized(a,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.transformManager.setScreenParameters(a,b,c||e?this.global.zoomLarge:!1,this.antialiasDisplay,!1,!1),this.gdata.setWindowParameters(a,b,this.antialiasDisplay)},"~N,~N,~B,~B,~B");
Clazz.overrideMethod(c$,"getScreenWidth",function(){return this.dimScreen.width});Clazz.overrideMethod(c$,"getScreenHeight",function(){return this.dimScreen.height});$_M(c$,"getScreenDim",function(){return this.global.zoomLarge==this.dimScreen.height>this.dimScreen.width?this.dimScreen.height:this.dimScreen.width});Clazz.overrideMethod(c$,"generateOutputForExport",function(a,b,c,d){return this.$noGraphicsAllowed||null==this.repaintManager?null:this.getStateCreator().generateOutputForExport(a,b,c,
d)},"~S,~A,~N,~N");$_M(c$,"clearRepaintManager",($fz=function(a){null!=this.repaintManager&&this.repaintManager.clear(a)},$fz.isPrivate=!0,$fz),"~N");Clazz.overrideMethod(c$,"renderScreenImageStereo",function(a,b,c,d){this.updateWindow(c,d)&&(null==b?this.getScreenImageBuffer(a,!1):(this.render1(b,this.getImage(!0,!1),0,0),this.render1(a,this.getImage(!1,!1),0,0)));this.notifyViewerRepaintDone()},"~O,~O,~N,~N");$_M(c$,"updateJS",function(a,b){this.isWebGL?(this.updateWindow(a,b)&&this.render(),this.notifyViewerRepaintDone()):
this.renderScreenImageStereo(this.apiPlatform.context,null,a,b)},"~N,~N");$_M(c$,"updateWindow",($fz=function(a,b){if(!this.refreshing||this.creatingImage)return!1;(this.isTainted||this.getSlabEnabled())&&this.setModelVisibility();this.isTainted=!1;null!=this.repaintManager&&0!=a&&this.setScreenDimension(a,b);return!0},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"renderScreenImage",function(a,b,c){this.renderScreenImageStereo(a,null,b,c)},"~O,~N,~N");$_M(c$,"getImage",($fz=function(a,b){if(this.isWebGL)return null;
var c=null;try{this.gdata.beginRendering(this.transformManager.getStereoRotationMatrix(a),b),this.render(),this.gdata.endRendering(),c=this.gdata.getScreenImage(b)}catch(d){if(Clazz.exceptionOf(d,Error))this.gdata.getScreenImage(b),this.handleError(d,!1),this.setErrorMessage("Error during rendering: "+d,null);else throw d;}return c},$fz.isPrivate=!0,$fz),"~B,~B");$_M(c$,"isAntialiased",function(){return this.antialiasDisplay});$_M(c$,"render",($fz=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 b=this.shapeManager.transformAtoms();this.transformManager.bsSelectedAtoms=null;this.isWebGL?(this.repaintManager.renderExport("JS",this.gdata,this.modelSet,null),this.notifyViewerRepaintDone()):(this.repaintManager.render(this.gdata,
this.modelSet,!0,b),this.gdata.setPass2(a)&&(this.transformManager.setAntialias(a),this.repaintManager.render(this.gdata,this.modelSet,!1,null),this.transformManager.setAntialias(this.antialiasDisplay)))}},$fz.isPrivate=!0,$fz));$_M(c$,"render1",($fz=function(a,b,c,d){null!=a&&null!=b&&this.apiPlatform.drawImage(a,b,c,d,this.dimScreen.width,this.dimScreen.height);this.gdata.releaseScreenImage()},$fz.isPrivate=!0,$fz),"~O,~O,~N,~N");Clazz.overrideMethod(c$,"getScreenImageBuffer",function(a,b){if(this.isWebGL)return null;
var c=null==a&&this.isStereoDouble(),d;this.transformManager.stereoMode.isBiColor()?(this.gdata.beginRendering(this.transformManager.getStereoRotationMatrix(!0),b),this.render(),this.gdata.endRendering(),this.gdata.snapshotAnaglyphChannelBytes(),this.gdata.beginRendering(this.transformManager.getStereoRotationMatrix(!1),b),this.render(),this.gdata.endRendering(),this.gdata.applyAnaglygh(this.transformManager.stereoMode,this.transformManager.stereoColors),d=this.gdata.getScreenImage(b)):d=this.getImage(this.isStereoDouble(),
b);var e=null;c&&(e=this.apiPlatform.newBufferedImage(d,this.dimScreen.width<<1,this.dimScreen.height),a=this.apiPlatform.getGraphics(e));null!=a&&(this.isStereoDouble()&&(this.render1(a,d,this.dimScreen.width,0),d=this.getImage(!1,!1)),this.render1(a,d,0,0));return c?e:d},"~O,~B");Clazz.overrideMethod(c$,"getImageAs",function(a,b,c,d,e,f){return this.isWebGL?null:this.getImageAsWithComment(a,b,c,d,e,null,f,"")},"~S,~N,~N,~N,~S,java.io.OutputStream");$_M(c$,"getImageAsWithComment",function(a,b,c,
d,e,f,g,h){return this.isWebGL?null:this.getStateCreator().getImageAsWithComment(a,b,c,d,e,f,g,h)},"~S,~N,~N,~N,~S,~A,java.io.OutputStream,~S");Clazz.overrideMethod(c$,"releaseScreenImage",function(){this.gdata.releaseScreenImage()});Clazz.overrideMethod(c$,"evalFile",function(a){if(!this.allowScripting)return null;var b=a.indexOf(" -noqueue");return 0<=b?this.evalStringWaitStatusQueued("String",a.substring(0,b),"",!0,!1,!1):this.getScriptManager().addScript(a,!0,!1)},"~S");$_M(c$,"getInsertedCommand",
function(){var a=this.insertedCommand;this.insertedCommand="";J.util.Logger.debugging&&""!==a&&J.util.Logger.debug("inserting: "+a);return a});Clazz.overrideMethod(c$,"script",function(a){return this.evalStringQuietSync(a,!1,!0)},"~S");Clazz.overrideMethod(c$,"evalString",function(a){return this.evalStringQuietSync(a,!1,!0)},"~S");Clazz.overrideMethod(c$,"evalStringQuiet",function(a){return this.evalStringQuietSync(a,!0,!0)},"~S");$_M(c$,"evalStringQuietSync",function(a,b,c){return null==this.getScriptManager()?
null:this.scriptManager.evalStringQuietSync(a,b,c)},"~S,~B,~B");$_M(c$,"clearScriptQueue",function(){null!=this.scriptManager&&this.scriptManager.clearQueue()});$_M(c$,"setScriptQueue",($fz=function(a){(this.global.useScriptQueue=a)||this.clearScriptQueue()},$fz.isPrivate=!0,$fz),"~B");Clazz.overrideMethod(c$,"checkHalt",function(a,b){return null!=this.scriptManager&&this.scriptManager.checkHalt(a,b)},"~S,~B");Clazz.overrideMethod(c$,"scriptWait",function(a){return this.evalWait("JSON",a,"+scriptStarted,+scriptStatus,+scriptEcho,+scriptTerminated")},
"~S");Clazz.overrideMethod(c$,"scriptWaitStatus",function(a,b){return this.evalWait("object",a,b)},"~S,~S");$_M(c$,"evalWait",($fz=function(a,b,c){if(null==this.getScriptManager())return null;this.scriptManager.waitForQueue();var d=J.i18n.GT.setDoTranslate(!1);a=this.evalStringWaitStatusQueued(a,b,c,!1,!1,!1);J.i18n.GT.setDoTranslate(d);return a},$fz.isPrivate=!0,$fz),"~S,~S,~S");$_M(c$,"evalStringWaitStatusQueued",function(a,b,c,d,e,f){return null==this.getScriptManager()?null:this.scriptManager.evalStringWaitStatusQueued(a,
b,c,d,e,f)},"~S,~S,~S,~B,~B,~B");$_M(c$,"exitJmol",function(){if(!this.$isApplet){if(null!=this.headlessImage)try{var a=this.headlessImage;this.isHeadless()&&this.createImage(a[0],a[1],null,a[2].intValue(),a[3].intValue(),a[4].intValue())}catch(b){if(!Clazz.exceptionOf(b,Exception))throw b;}J.util.Logger.debug("exitJmol -- exiting");System.out.flush();System.exit(0)}});$_M(c$,"scriptCheckRet",($fz=function(a,b){return null==this.getScriptManager()?null:this.scriptManager.scriptCheckRet(a,b)},$fz.isPrivate=
!0,$fz),"~S,~B");Clazz.overrideMethod(c$,"scriptCheck",function(a){return null==this.getScriptManager()?null:this.scriptCheckRet(a,!1)},"~S");Clazz.overrideMethod(c$,"isScriptExecuting",function(){return null!=this.eval&&this.eval.isExecuting()});Clazz.overrideMethod(c$,"haltScriptExecution",function(){null!=this.eval&&this.eval.haltExecution();this.stopScriptDelayThread();this.setStringPropertyTok("pathForAllFiles",545259570,"");this.clearTimeouts()});$_M(c$,"pauseScriptExecution",function(){null!=
this.eval&&this.eval.pauseExecution(!0)});$_M(c$,"getDefaultLoadFilter",function(){return this.global.defaultLoadFilter});$_M(c$,"getDefaultLoadScript",function(){return this.global.defaultLoadScript});$_M(c$,"resolveDatabaseFormat",function(a){J.viewer.Viewer.hasDatabasePrefix(a)&&(a=this.setLoadFormat(a,a.charAt(0),!1));return a},"~S");c$.isDatabaseCode=$_M(c$,"isDatabaseCode",function(a){return"$"==a||"="==a||":"==a},"~S");c$.hasDatabasePrefix=$_M(c$,"hasDatabasePrefix",function(a){return 0!=a.length&&
J.viewer.Viewer.isDatabaseCode(a.charAt(0))},"~S");$_M(c$,"setLoadFormat",function(a,b,c){var d=a.substring(1);switch(b){case "=":if(a.startsWith("=="))d=d.substring(1),b="#";else if(0<d.indexOf("/"))try{var e=d.indexOf("/"),f=d.substring(0,e),d=this.global.resolveDataBase(f,d.substring(e+1));return null==d?a:d}catch(g){if(Clazz.exceptionOf(g,Exception))return a;throw g;}case "#":return c="="==b?this.global.loadFormat:this.global.loadLigandFormat,0<d.indexOf(".")&&0<=c.indexOf("%FILE.")&&(c=c.substring(0,
c.indexOf("%FILE")+5)),J.util.TextFormat.formatStringS(c,"FILE",d);case ":":return a=this.global.pubChemFormat,c=d.toLowerCase(),b=J.util.Parser.parseInt(d),-2147483648!=b?d="cid/"+b:c.startsWith("smiles:")?(a+="?POST?smiles="+d.substring(7),d="smiles"):c.startsWith("cid:")?d="cid/"+d.substring(4):(c.startsWith("name:")&&(d=d.substring(5)),c.startsWith("cas:")&&(d=d.substring(4)),d="name/"+J.util.Escape.escapeUrl(d)),J.util.TextFormat.formatStringS(a,"FILE",d);case "$":if(a.startsWith("$$"))return d=
d.substring(1),a=J.util.TextFormat.simpleReplace(this.global.smilesUrlFormat,"&get3d=True",""),J.util.TextFormat.formatStringS(a,"FILE",J.util.Escape.escapeUrl(d));case "N":case "2":case "I":case "K":case "/":d=J.util.Escape.escapeUrl(d);switch(b){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(c?"MOL3D::":"")+J.util.TextFormat.formatStringS(a,"FILE",d);case "_":return c=J.viewer.FileManager.fixFileNameVariables(this.global.edsUrlFormat,d),d=J.viewer.FileManager.fixFileNameVariables(this.global.edsUrlCutoff,d),[c,d]}return d},"~S,~S,~B");$_M(c$,"getElectronDensityLoadInfo",function(){return[this.global.edsUrlFormat,this.global.edsUrlCutoff,this.global.edsUrlOptions]});$_M(c$,"getStandardLabelFormat",function(a){switch(a){default:case 0:return"%[identify]";
case 1:return this.global.defaultLabelXYZ;case 2:return this.global.defaultLabelPDB}},"~N");$_M(c$,"getAdditionalHydrogens",function(a,b,c,d){null==a&&(a=this.getSelectionSet(!1));var e=Clazz.newIntArray(1,0);a=this.modelSet.calculateHydrogens(a,e,b,c,d);e=Array(e[0]);for(c=b=0;b<a.length;b++)if(null!=a[b])for(d=0;d<a[b].length;d++)e[c++]=a[b][d];return e},"J.util.BS,~B,~B,J.util.JmolList");Clazz.overrideMethod(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");$_M(c$,"setHoverLabel",function(a){this.loadShape(34);this.setShapeProperty(34,"label",a);this.hoverEnabled=null!=a},"~S");$_M(c$,"hoverOn",function(a,b){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),this.isBound(b,30)&&(2==this.getPickingMode()&&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,~N");$_M(c$,"hoverOnPt",function(a,b,c,d,e){this.hoverEnabled&&
!(null!=this.eval&&this.isScriptExecuting())&&(this.loadShape(34),this.setShapeProperty(34,"xy",J.util.P3i.new3(a,b,0)),this.setShapeProperty(34,"target",null),this.setShapeProperty(34,"specialLabel",null),this.setShapeProperty(34,"text",c),this.hoverAtomIndex=-1,this.hoverText=c,null!=d&&null!=e&&this.setStatusObjectHovered(d,c,e),this.refresh(3,"hover on point"))},"~N,~N,~S,~S,J.util.P3");$_M(c$,"hoverOff",function(){this.global.modelKitMode&&this.highlight(null);if(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")}});$_M(c$,"getBfactor100Hi",function(){return this.modelSet.getBfactor100Hi()});$_M(c$,"getColix",function(a){return J.util.C.getColixO(a)},"~O");Clazz.overrideMethod(c$,"setDebugScript",function(a){this.global.debugScript=
a;this.global.setB("debugScript",a);null!=this.eval&&this.eval.setDebugging()},"~B");$_M(c$,"clearClickCount",function(){this.setTainted(!0)});$_M(c$,"getCursor",function(){return this.currentCursor});$_M(c$,"setCursor",function(a){if(!this.$isKiosk&&!(this.currentCursor==a||this.multiTouch||!this.haveDisplay))this.apiPlatform.setCursor(this.currentCursor=a,this.display)},"~N");$_M(c$,"setPickingMode",function(a,b){if(this.haveDisplay){this.showSelected=!1;var c=null;if(null!=a){var d=a.indexOf("_");
0<=d&&(c=a.substring(d+1),a=a.substring(0,d));b=J.viewer.ActionManager.getPickingMode(a)}0>b&&(b=1);this.actionManager.setPickingMode(b);this.global.setS("picking",J.viewer.ActionManager.getPickingModeName(this.actionManager.getAtomPickingMode()));if(!(null==c||0==c.length))switch(c=Character.toUpperCase(c.charAt(0))+(1==c.length?"":c.substring(1,2)),b){case 32:this.setAtomPickingOption(c);break;case 33:this.setBondPickingOption(c);break;default:J.util.Logger.error("Bad picking mode: "+a+"_"+c)}}},
"~S,~N");$_M(c$,"getPickingMode",function(){return this.haveDisplay?this.actionManager.getAtomPickingMode():0});$_M(c$,"setPickingStyle",function(a,b){this.haveDisplay&&(null!=a&&(b=J.viewer.ActionManager.getPickingStyleIndex(a)),0>b&&(b=0),this.actionManager.setPickingStyle(b),this.global.setS("pickingStyle",J.viewer.ActionManager.getPickingStyleName(this.actionManager.getPickingStyle())))},"~S,~N");$_M(c$,"getDrawHover",function(){return this.haveDisplay&&this.global.drawHover});Clazz.overrideMethod(c$,
"getAtomInfo",function(a){return 0<=a?this.modelSet.getAtomInfo(a,null):this.shapeManager.getShapePropertyIndex(6,"pointInfo",-a)},"~N");$_M(c$,"getAtomInfoXYZ",function(a,b){return this.modelSet.getAtomInfoXYZ(a,b)},"~N,~B");$_M(c$,"setSync",($fz=function(){this.statusManager.doSync()&&this.statusManager.setSync(null)},$fz.isPrivate=!0,$fz));Clazz.overrideMethod(c$,"setJmolCallbackListener",function(a){this.statusManager.setJmolCallbackListener(a)},"J.api.JmolCallbackListener");Clazz.overrideMethod(c$,
"setJmolStatusListener",function(a){this.statusManager.setJmolStatusListener(a,null)},"J.api.JmolStatusListener");$_M(c$,"getMessageQueue",function(){return this.statusManager.getMessageQueue()});$_M(c$,"getStatusChanged",function(a){return null==a?null:this.statusManager.getStatusChanged(a)},"~S");$_M(c$,"menuEnabled",function(){return!this.global.disablePopupMenu&&null!=this.getPopupMenu()});$_M(c$,"popupMenu",function(a,b,c){if(this.haveDisplay&&this.refreshing&&!this.$isPreviewOnly&&!this.global.disablePopupMenu)switch(c){case "j":try{this.getPopupMenu(),
this.jmolpopup.jpiShow(a,b)}catch(d){this.global.disablePopupMenu=!0}break;case "a":case "b":case "m":this.modelkitPopup=this.apiPlatform.getMenuPopup(this,null,c),null!=this.modelkitPopup&&this.modelkitPopup.jpiShow(a,b)}},"~N,~N,~S");$_M(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");$_M(c$,
"getPopupMenu",($fz=function(){return null==this.jmolpopup&&(this.jmolpopup=this.allowScripting?this.apiPlatform.getMenuPopup(this,this.menuStructure,"j"):null,null==this.jmolpopup)?(this.global.disablePopupMenu=!0,null):this.jmolpopup.jpiGetMenuAsObject()},$fz.isPrivate=!0,$fz));$_M(c$,"setMenu",function(a,b){b&&J.util.Logger.info("Setting menu "+(0==a.length?"to Jmol defaults":"from file "+a));0==a.length?a=null:b&&(a=this.getFileAsString(a));this.getProperty("DATA_API","setMenu",a);this.statusManager.setCallbackFunction("menu",
a)},"~S,~B");$_M(c$,"setStatusFrameChanged",function(a){a&&(this.prevFrame=-2147483648);a=this.animationManager.getCurrentFrame();this.transformManager.setVibrationPeriod(NaN);var b=this.animationManager.firstFrameIndex,c=this.animationManager.lastFrameIndex,d=this.isMovie(),e=this.animationManager.currentModelIndex;b==c&&!d&&(e=b);var f=this.getModelFileNumber(e),g=this.animationManager.getCurrentFrame(),h=f,k=f%1E6,l=d?b:this.getModelFileNumber(b),m=d?c:this.getModelFileNumber(c),n;d?n=""+(a+1):
0==h?(n=this.getModelNumberDotted(b),b!=c&&(n+=" - "+this.getModelNumberDotted(c)),Clazz.doubleToInt(l/1E6)==Clazz.doubleToInt(m/1E6)&&(h=l)):n=this.getModelNumberDotted(e);0!=h&&(h=1E6>h?1:Clazz.doubleToInt(h/1E6));d||(this.global.setI("_currentFileNumber",h),this.global.setI("_currentModelNumberInFile",k));this.global.setI("_currentFrame",g);this.global.setI("_morphCount",this.animationManager.morphCount);this.global.setF("_currentMorphFrame",this.animationManager.currentMorphFrame);this.global.setI("_frameID",
f);this.global.setS("_modelNumber",n);this.global.setS("_modelName",0>e?"":this.getModelName(e));this.global.setS("_modelTitle",0>e?"":this.getModelTitle(e));this.global.setS("_modelFile",0>e?"":this.getModelFileName(e));g!=this.prevFrame&&(this.prevFrame=g,d?b=""+(this.animationManager.getCurrentFrame()+1):(b=this.getModelName(a),c=""+this.getModelNumberDotted(a),b.equals(c)||(b=c+": "+b),50<b.length&&(b=b.substring(0,45)+"...")),this.statusManager.setStatusFrameChanged(a,h,k,0>this.animationManager.animationDirection?
-l:l,0>this.animationManager.currentDirection?-m:m,g,b),this.doHaveJDX()&&this.getJSV().setModel(e))},"~B");$_M(c$,"doHaveJDX",($fz=function(){return this.haveJDX||(this.haveJDX=this.getBooleanProperty("_jspecview"))},$fz.isPrivate=!0,$fz));$_M(c$,"getJSV",($fz=function(){null==this.jsv&&(this.jsv=J.api.Interface.getOptionInterface("viewer.JSpecView"),this.jsv.setViewer(this));return this.jsv},$fz.isPrivate=!0,$fz));$_M(c$,"getJDXBaseModelIndex",function(a){return!this.doHaveJDX()?a:this.getJSV().getBaseModelIndex(a)},
"~N");$_M(c$,"getJspecViewProperties",function(a){a=this.statusManager.getJspecViewProperties(""+a);null!=a&&(this.haveJDX=!0);return a},"~O");$_M(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");$_M(c$,"isScriptQueued",($fz=function(){return null!=this.scriptManager&&this.scriptManager.isScriptQueued()},$fz.isPrivate=!0,$fz));
$_M(c$,"notifyError",function(a,b,c){this.global.setS("_errormessage",c);this.statusManager.notifyError(a,b,c)},"~S,~S,~S");$_M(c$,"jsEval",function(a){return this.statusManager.jsEval(a)},"~S");$_M(c$,"setStatusAtomHovered",function(a,b){this.global.setI("_atomhovered",a);this.statusManager.setStatusAtomHovered(a,b)},"~N,~S");$_M(c$,"setStatusObjectHovered",function(a,b,c){this.global.setS("_objecthovered",a);this.statusManager.setStatusObjectHovered(a,b,c)},"~S,~S,J.util.P3");$_M(c$,"setFileLoadStatus",
($fz=function(a,b,c,d,e,f){this.setErrorMessage(e,null);this.global.setI("_loadPoint",a.getCode());var g=a!==J.constant.EnumFileStatus.CREATING_MODELSET;this.statusManager.setFileLoadStatus(b,c,d,e,a.getCode(),g,f);g&&this.doHaveJDX()&&this.getJSV().setModel(this.getCurrentModelIndex())},$fz.isPrivate=!0,$fz),"J.constant.EnumFileStatus,~S,~S,~S,~S,Boolean");$_M(c$,"getZapName",function(){return this.global.modelKitMode?"Jmol Model Kit":"zapped"});$_M(c$,"setStatusMeasuring",function(a,b,c,d){this.statusManager.setStatusMeasuring(a,
b,c,d)},"~S,~N,~S,~N");$_M(c$,"notifyMinimizationStatus",function(){var a=this.getParameter("_minimizationStep"),b=this.getParameter("_minimizationForceField");this.statusManager.notifyMinimizationStatus(this.getParameter("_minimizationStatus"),Clazz.instanceOf(a,String)?Integer.$valueOf(0):a,this.getParameter("_minimizationEnergy"),a.toString().equals("0")?Float.$valueOf(0):this.getParameter("_minimizationEnergyDiff"),b)});$_M(c$,"setStatusAtomPicked",function(a,b){null==b&&(b=this.global.pickLabel,
b=0==b.length?this.getAtomInfoXYZ(a,this.global.messageStyleChime):this.modelSet.getAtomInfo(a,b));this.global.setPicked(a);this.global.setS("_pickinfo",b);this.statusManager.setStatusAtomPicked(a,b);1==this.statusManager.getSyncMode()&&this.doHaveJDX()&&this.getJSV().atomPicked(a)},"~N,~S");$_M(c$,"setStatusResized",function(a,b){this.statusManager.setStatusResized(a,b)},"~N,~N");$_M(c$,"scriptStatus",function(a){this.setScriptStatus(a,"",0,null)},"~S");$_M(c$,"scriptStatusMsg",function(a,b){this.setScriptStatus(a,
b,0,null)},"~S,~S");$_M(c$,"setScriptStatus",function(a,b,c,d){this.statusManager.setScriptStatus(a,b,c,d)},"~S,~S,~N,~S");$_M(c$,"getModelTitle",($fz=function(a){return null==this.modelSet?null:this.modelSet.getModelTitle(a)},$fz.isPrivate=!0,$fz),"~N");Clazz.overrideMethod(c$,"getModelFileName",function(a){return null==this.modelSet?null:this.modelSet.getModelFileName(a)},"~N");$_M(c$,"dialogAsk",function(a,b){return prompt(a,b)},"~S,~S");Clazz.overrideMethod(c$,"showUrl",function(a){if(null!=a){if(0>
a.indexOf(":")){var b=this.fileManager.getAppletDocumentBase();""===b&&(b=this.fileManager.getFullPathName());0<=b.indexOf("/")?b=b.substring(0,b.lastIndexOf("/")+1):0<=b.indexOf("\\")&&(b=b.substring(0,b.lastIndexOf("\\")+1));a=b+a}J.util.Logger.info("showUrl:"+a);this.statusManager.showUrl(a)}},"~S");$_M(c$,"setMeshCreator",function(a){this.loadShape(24);this.setShapeProperty(24,"meshCreator",a)},"~O");$_M(c$,"showConsole",function(a){if(this.haveDisplay)try{null==this.appConsole&&a&&this.getProperty("DATA_API",
"getAppConsole",Boolean.TRUE),this.appConsole.setVisible(!0)}catch(b){}},"~B");$_M(c$,"clearConsole",function(){this.statusManager.clearConsole()});$_M(c$,"getParameterEscaped",function(a){return this.global.getParameterEscaped(a,0)},"~S");Clazz.overrideMethod(c$,"getParameter",function(a){return this.global.getParameter(a)},"~S");$_M(c$,"getOrSetNewVariable",function(a,b){return this.global.getOrSetNewVariable(a,b)},"~S,~B");$_M(c$,"setUserVariable",function(a,b){return this.global.setUserVariable(a,
b)},"~S,J.script.SV");$_M(c$,"unsetProperty",function(a){a=a.toLowerCase();(a.equals("all")||a.equals("variables"))&&this.fileManager.setPathForAllFiles("");this.global.unsetUserVariable(a)},"~S");$_M(c$,"getVariableList",function(){return this.global.getVariableList()});Clazz.overrideMethod(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 b=this.actionManager.getPickingState().toLowerCase();a=a.substring(0,a.length-2)+";";return 0<=b.indexOf(a)}if(a.equalsIgnoreCase("__appletReady"))return this.statusManager.setStatusAppletReady(this.fullName,!0),!0;if(a.equalsIgnoreCase("__appletDestroyed"))return this.statusManager.setStatusAppletReady(this.htmlName,!1),!0;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)){b=this.global.getUserVariable(a);
if(1048589==b.tok)return!0;if(1048588==b.tok)return!1}J.util.Logger.error("viewer.getBooleanProperty("+a+") - unrecognized");return!1},"~S");Clazz.overrideMethod(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 553648158:return this.global.pickingSpinRate;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");$_M(c$,"getDelayMaximumMs",function(){return this.haveDisplay?this.global.delayMaximumMs:1});$_M(c$,"getHermiteLevel",function(){return this.getSpinOn()?0:this.global.hermiteLevel});
$_M(c$,"getHoverDelay",function(){return this.global.modelKitMode?20:this.global.hoverDelayMs});Clazz.overrideMethod(c$,"getBoolean",function(a){switch(a){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;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 603979835:return this.global.dynamicMeasurements;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 603979876:return this.global.logGestures;
case 603979877:return this.global.measureAllModels;case 603979878:return this.global.measurementLabels;case 603979879:return this.global.messageStyleChime;case 603979882:return this.global.modelKitMode;case 603979886:return this.global.navigationMode;case 603979887:return this.global.navigationPeriodic;case 603979888:return this.global.partialDots;case 603979891:return this.global.pdbSequential;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 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 603979967:return this.global.traceAlpha;
case 603979968:return this.global.twistedSheets;case 603979973:return this.global.vectorSymmetry;case 603979974:return this.global.waitForMoveTo;case 603979976:return this.global.wireframeRotation;case 603979978:return this.global.zeroBasedXyzRasmol}J.util.Logger.error("viewer.getBoolean("+J.script.T.nameOf(a)+") - not listed");return!1},"~N");$_M(c$,"allowEmbeddedScripts",function(){return this.global.allowEmbeddedScripts&&!this.$isPreviewOnly});$_M(c$,"getDragSelected",function(){return this.global.dragSelected&&
!this.global.modelKitMode});$_M(c$,"getBondPicking",function(){return this.global.bondPicking||this.global.modelKitMode});$_M(c$,"useMinimizationThread",function(){return this.global.useMinimizationThread&&!this.autoExit});Clazz.overrideMethod(c$,"getFloat",function(a){switch(a){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 570425356:return this.global.dipoleScale;
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 570425369:return this.global.multipleBondSpacing;case 570425368: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 1649410065: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");Clazz.overrideMethod(c$,"setStringProperty",function(a,b){if(null!=
b)if("_"==a.charAt(0))this.global.setS(a,b);else{var c=J.script.T.getTokFromName(a);switch(J.script.T.getParamType(c)){case 603979776:this.setBooleanPropertyTok(a,c,J.script.SV.newVariable(4,b).asBoolean());break;case 553648128:this.setIntPropertyTok(a,c,J.script.SV.newVariable(4,b).asInt());break;case 570425344:this.setFloatPropertyTok(a,c,J.util.Parser.parseFloatStr(b));break;default:this.setStringPropertyTok(a,c,b)}}},"~S,~S");$_M(c$,"setStringPropertyTok",($fz=function(a,b,c){switch(b){case 545259548:this.global.defaultDropScript=
c;break;case 545259570:c=this.fileManager.setPathForAllFiles(c);break;case 545259558:this.setUnits(c,!1);return;case 545259560:this.global.forceField=c;this.minimizer=null;break;case 545259569:this.global.nmrUrlFormat=c;break;case 545259568:this.setUnits(c,!0);return;case 545259566:this.global.loadLigandFormat=c;break;case 545259543:this.global.defaultLabelPDB=c;break;case 545259544:this.global.defaultLabelXYZ=c;break;case 545259549:this.global.defaultLoadFilter=c;break;case 545259567:c=this.setLogFile(c);
if(null==c)return;break;case 545259559:break;case 545259524:this.global.atomTypes=c;break;case 545259538:break;case 545259576:this.global.pickLabel=c;break;case 545259580:this.global.quaternionFrame=2==c.length&&c.startsWith("R")?c.substring(0,2):""+(c.toLowerCase()+"p").charAt(0);J.util.Parser.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.setDefaultVdw(c);return;case 545259564:new J.i18n.GT(c);
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);c=J.i18n.GT.getLanguage();break;case 545259565:this.global.loadFormat=c;break;case 545259534:this.setObjectColor("background",c);return;case 545259528:this.setObjectColor("axis1",c);return;case 545259530:this.setObjectColor("axis2",c);return;case 545259532:this.setObjectColor("axis3",
c);return;case 545259536:this.setObjectColor("boundbox",c);return;case 545259586:this.setObjectColor("unitcell",c);return;case 545259578:this.setPropertyColorScheme(c,!1,!1);break;case 545259562:this.setShapeProperty(34,"atomLabel",c);break;case 545259547:this.global.defaultDistanceLabel=c;break;case 545259542:this.global.defaultAngleLabel=c;break;case 545259554:this.global.defaultTorsionLabel=c;break;case 545259550:this.global.defaultLoadScript=c;break;case 545259522:this.fileManager.setAppletProxy(c);
break;case 545259546:null==c&&(c="");c=c.$replace("\\","/");this.global.defaultDirectory=c;break;case 545259561:this.global.helpPath=c;break;case 545259552:c.equalsIgnoreCase("RasMol")||(c="Jmol");this.setDefaultsType(c);break;case 545259545:this.setDefaultColors(c.equalsIgnoreCase("rasmol"));return;case 545259572:this.setPickingMode(c,0);return;case 545259574:this.setPickingStyle(c,0);return;case 545259540:break;default:if(a.toLowerCase().endsWith("callback")){this.statusManager.setCallbackFunction(a,
0==c.length||c.equalsIgnoreCase("none")?null:c);break}if(!this.global.htNonbooleanParameterValues.containsKey(a.toLowerCase())){this.global.setUserVariable(a,J.script.SV.newVariable(4,c));return}}this.global.setS(a,c)},$fz.isPrivate=!0,$fz),"~S,~N,~S");Clazz.overrideMethod(c$,"setFloatProperty",function(a,b){if(!Float.isNaN(b))if("_"==a.charAt(0))this.global.setF(a,b);else{var c=J.script.T.getTokFromName(a);switch(J.script.T.getParamType(c)){case 545259520:this.setStringPropertyTok(a,c,""+b);break;
case 603979776:this.setBooleanPropertyTok(a,c,0!=b);break;case 553648128:this.setIntPropertyTok(a,c,Clazz.floatToInt(b));break;default:this.setFloatPropertyTok(a,c,b)}}},"~S,~N");$_M(c$,"setFloatPropertyTok",($fz=function(a,b,c){switch(b){case 570425403:this.global.starScale=c;break;case 570425368:this.global.multipleBondRadiusFactor=c;break;case 570425369:this.global.multipleBondSpacing=c;break;case 570425393:this.transformManager.setSlabRange(c);break;case 570425365:this.global.minimizationCriterion=
c;break;case 570425359:this.haveDisplay&&this.actionManager.setGestureSwipeFactor(c);break;case 570425366:this.haveDisplay&&this.actionManager.setMouseDragFactor(c);break;case 570425367:this.haveDisplay&&this.actionManager.setMouseWheelFactor(c);break;case 570425408:this.global.strutLengthMaximum=c;break;case 570425406:this.global.strutDefaultRadius=c;break;case 570425376:this.setSpin("X",Clazz.floatToInt(c));break;case 570425378:this.setSpin("Y",Clazz.floatToInt(c));break;case 570425380:this.setSpin("Z",
Clazz.floatToInt(c));break;case 570425370:if(Float.isNaN(c))return;this.setSpin("FPS",Clazz.floatToInt(c));break;case 570425363:this.global.loadAtomDataTolerance=c;break;case 570425360:this.global.hbondsAngleMinimum=c;break;case 570425361:this.global.hbondsDistanceMaximum=c;break;case 570425382:this.global.pointGroupDistanceTolerance=c;break;case 570425384:this.global.pointGroupLinearTolerance=c;break;case 570425358:this.global.ellipsoidAxisDiameter=c;break;case 570425398:this.setSpin("x",Clazz.floatToInt(c));
break;case 570425400:this.setSpin("y",Clazz.floatToInt(c));break;case 570425402:this.setSpin("z",Clazz.floatToInt(c));break;case 570425396:this.setSpin("fps",Clazz.floatToInt(c));break;case 570425352:this.global.defaultDrawArrowScale=c;break;case 570425354:this.global.defaultTranslucent=c;break;case 570425346:this.setAxesScale(c);break;case 570425416:this.transformManager.setVisualRange(c);this.refresh(1,"set visualRange");break;case 570425371:this.setNavigationDepthPercent(c);break;case 570425374:this.global.navigationSpeed=
c;break;case 570425372:this.transformManager.setNavigationSlabOffsetPercent(c);break;case 570425350:this.transformManager.setCameraDepthPercent(c);this.refresh(1,"set cameraDepth");break;case 570425388:this.setRotationRadius(c,!0);return;case 570425362:this.global.hoverDelayMs=Clazz.floatToInt(1E3*c);break;case 570425392:this.global.sheetSmoothing=c;break;case 570425356:c=J.viewer.Viewer.checkFloatRange(c,-10,10);this.global.dipoleScale=c;break;case 570425404:this.transformManager.setStereoDegrees(c);
break;case 1649410065:this.setVectorScale(c);return;case 570425412:this.setVibrationPeriod(c);return;case 570425414:this.setVibrationScale(c);return;case 570425348:this.setBondTolerance(c);return;case 570425364:this.setMinBondDistance(c);return;case 570425390:this.transformManager.setScaleAngstromsPerInch(c);break;case 570425394:c=J.viewer.Viewer.checkFloatRange(c,0,10);this.global.solventProbeRadius=c;break;default:if(!this.global.htNonbooleanParameterValues.containsKey(a.toLowerCase())){this.global.setUserVariable(a,
J.script.SV.newVariable(3,Float.$valueOf(c)));return}}this.global.setF(a,c)},$fz.isPrivate=!0,$fz),"~S,~N,~N");Clazz.overrideMethod(c$,"setIntProperty",function(a,b){if(-2147483648!=b)if("_"==a.charAt(0))this.global.setI(a,b);else{var c=J.script.T.getTokFromName(a);switch(J.script.T.getParamType(c)){case 545259520:this.setStringPropertyTok(a,c,""+b);break;case 603979776:this.setBooleanPropertyTok(a,c,0!=b);break;case 570425344:this.setFloatPropertyTok(a,c,b);break;default:this.setIntPropertyTok(a,
c,b)}}},"~S,~N");$_M(c$,"setIntPropertyTok",($fz=function(a,b,c){switch(b){case 553648151:this.global.meshScale=c;break;case 553648153:this.global.minPixelSelRadius=c;break;case 553648149:this.global.isosurfacePropertySmoothingPower=c;break;case 553648165:this.global.repaintWaitMs=c;break;case 553648170:this.global.smallMoleculeMaxAtoms=c;break;case 553648152:this.global.minimizationSteps=c;break;case 553648184:this.global.strutSpacing=c;break;case 553648156:c=J.viewer.Viewer.checkIntRange(c,0,1E3);
this.gdata.setPhongExponent(c);break;case 553648146:this.global.helixStep=c;this.modelSet.setHaveStraightness(!1);break;case 553648144:this.global.dotScale=c;break;case 553648143:this.global.dotDensity=c;break;case 553648138:this.global.delayMaximumMs=c;break;case 553648150:J.util.Logger.setLogLevel(c);J.util.Logger.info("logging level set to "+c);this.global.setI("logLevel",c);null!=this.eval&&this.eval.setDebugging();return;case 553648134:switch(J.constant.EnumAxesMode.getAxesMode(c)){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,c);return;case 553648182:this.setStrandCount(12,c);return;case 553648180:this.setStrandCount(13,c);return;case 553648155:return;case 536870922:this.global.scriptDelay=c;break;case 553648176:c=0>c?J.viewer.Viewer.checkIntRange(c,-10,-1):J.viewer.Viewer.checkIntRange(c,0,100);this.gdata.setSpecularPower(c);break;
case 553648172:c=J.viewer.Viewer.checkIntRange(-c,-10,-1);this.gdata.setSpecularPower(c);break;case 553648136:this.setMarBond(c);return;case 536870924:this.setBooleanPropertyTok(a,b,1==c);return;case 553648174:c=J.viewer.Viewer.checkIntRange(c,0,100);this.gdata.setSpecularPercent(c);break;case 553648142:c=J.viewer.Viewer.checkIntRange(c,0,100);this.gdata.setDiffusePercent(c);break;case 553648130:c=J.viewer.Viewer.checkIntRange(c,0,100);this.gdata.setAmbientPercent(c);break;case 553648186:this.transformManager.zDepthToPercent(c);
break;case 553648188:this.transformManager.zSlabToPercent(c);break;case 554176526:this.transformManager.depthToPercent(c);break;case 554176565:this.transformManager.slabToPercent(c);break;case 553648190:this.global.zShadePower=Math.max(c,1);break;case 553648166:this.global.ribbonAspectRatio=c;break;case 553648158:this.global.pickingSpinRate=1>c?1:c;break;case 553648132:this.setAnimationFps(c);break;case 553648154:this.setPercentVdwAtom(c);break;case 553648147:this.global.hermiteLevel=c;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.newScriptVariableInt(c));return}}this.global.setI(a,c)},$fz.isPrivate=!0,$fz),"~S,~N,~N");c$.checkIntRange=$_M(c$,"checkIntRange",($fz=function(a,b,c){return a<b?b:a>c?c:a},$fz.isPrivate=!0,$fz),"~N,~N,~N");c$.checkFloatRange=$_M(c$,"checkFloatRange",($fz=function(a,b,c){return a<b?b:a>c?c:a},$fz.isPrivate=!0,$fz),"~N,~N,~N");Clazz.overrideMethod(c$,"setBooleanProperty",function(a,b){if("_"==
a.charAt(0))this.global.setB(a,b);else{var c=J.script.T.getTokFromName(a);switch(J.script.T.getParamType(c)){case 545259520:this.setStringPropertyTok(a,c,""+b);break;case 553648128:this.setIntPropertyTok(a,c,b?1:0);break;case 570425344:this.setFloatPropertyTok(a,c,b?1:0);break;default:this.setBooleanPropertyTok(a,c,b)}}},"~S,~B");$_M(c$,"setBooleanPropertyTok",($fz=function(a,b,c){var d=!0;switch(b){case 603979820:this.global.cartoonLadders=c;break;case 603979968:b=this.global.twistedSheets;this.global.twistedSheets=
c;b!=c&&this.checkCoordinatesChanged();break;case 603979821:this.global.celShading=c;this.gdata.setCel(c);break;case 603979819:this.global.cartoonFancy=c;break;case 603979934:this.global.showTiming=c;break;case 603979973:this.global.vectorSymmetry=c;break;case 603979870:this.global.isosurfaceKey=c;break;case 603979888:this.global.partialDots=c;break;case 603979874:this.global.legacyAutoBonding=c;break;case 603979825:this.global.defaultStructureDSSP=c;break;case 603979834:this.global.dsspCalcHydrogen=
c;break;case 603979782:(this.global.allowModelkit=c)||this.setModelKitMode(!1);break;case 603979882:this.setModelKitMode(c);break;case 603979884:this.global.multiProcessor=c&&1<J.viewer.Viewer.nProcessors;break;case 603979883:this.global.monitorEnergy=c;break;case 603979853:this.global.hbondsRasmol=c;break;case 603979880:this.global.minimizationRefresh=c;break;case 603979881:this.global.minimizationSilent=c;break;case 603979969:this.global.useArcBall=c;break;case 603979869:c&&(this.$isKiosk=!0,this.global.disablePopupMenu=
!0,null!=this.display&&this.apiPlatform.setTransparentCursor(this.display));break;case 603979974:this.global.waitForMoveTo=c;break;case 603979875:this.global.logCommands=!0;break;case 603979876:this.global.logGestures=!0;break;case 603979784:this.global.allowMultiTouch=c;break;case 603979893:this.global.preserveState=c;this.modelSet.setPreserveState(c);this.undoClear();break;case 603979955:this.global.strutsMultiple=c;break;case 603979842:break;case 603979938:this.global.slabByAtom=c;break;case 603979940:this.global.slabByMolecule=
c;break;case 603979902:this.global.saveProteinStructureState=c;break;case 603979780:this.global.allowGestures=c;break;case 603979868:this.global.imageState=c;break;case 603979970:this.global.useMinimizationThread=c;break;case 603979781:this.global.disablePopupMenu&&(c=!1);this.global.allowKeyStrokes=c;break;case 603979831:this.global.dragSelected=c;this.showSelected=!1;break;case 603979924:this.global.showKeyStrokes=c;break;case 603979844:this.global.fontCaching=c;break;case 603979796:this.global.atomPicking=
c;break;case 603979814:this.highlight(null);this.global.bondPicking=c;break;case 603979906:this.global.selectAllModels=c;break;case 603979879:this.global.messageStyleChime=c;break;case 603979891:this.global.pdbSequential=c;break;case 603979889:this.global.pdbAddHydrogens=c;break;case 603979890:this.global.pdbGetHeader=c;break;case 603979837:this.global.ellipsoidAxes=c;break;case 603979836:this.global.ellipsoidArcs=c;break;case 603979838:this.global.ellipsoidBall=c;break;case 603979839:this.global.ellipsoidDots=
c;break;case 603979840:this.global.ellipsoidFill=c;break;case 603979845:this.global.fontScaling=c;break;case 603979956:this.setSyncTarget(0,c);break;case 603979958:this.setSyncTarget(1,c);break;case 603979976:this.global.wireframeRotation=c;break;case 603979871:this.global.isosurfacePropertySmoothing=c;break;case 603979833:this.global.drawPicking=c;break;case 603979786:this.setAntialias(0,c);break;case 603979790:this.setAntialias(1,c);break;case 603979788:this.setAntialias(2,c);break;case 603979944:this.global.smartAromatic=
c;break;case 603979794:this.setApplySymmetryToBonds(c);break;case 603979792:this.setAppendNew(c);break;case 603979800:this.global.autoFps=c;break;case 603979972:J.util.TextFormat.setUseNumberLocalization(this.global.useNumberLocalization=c);break;case 1611272202:a="showFrank";this.setFrankOn(c);break;case 603979918:this.setFrankOn(c);break;case 1613758488:a="solventProbe";this.global.solventOn=c;break;case 603979948:this.global.solventOn=c;break;case 603979835:this.setDynamicMeasurements(c);break;
case 603979785:this.global.allowRotateSelected=c;break;case 603979783:this.global.allowMoveAtoms=c;this.global.allowRotateSelected=c;this.global.dragSelected=c;this.showSelected=!1;break;case 536870922:this.setIntPropertyTok("showScript",b,c?1:0);return;case 603979778:this.global.allowEmbeddedScripts=c;break;case 603979887:this.global.navigationPeriodic=c;break;case 603979984:this.transformManager.setZShadeEnabled(c);return;case 603979832:this.haveDisplay&&(this.global.drawHover=c);break;case 603979886:this.setNavigationMode(c);
break;case 603979885:return;case 603979860:this.global.hideNavigationPoint=c;break;case 603979930:this.global.showNavigationPointAlways=c;break;case 603979896:this.setRefreshing(c);break;case 603979872:this.global.justifyMeasurements=c;break;case 603979952:this.global.ssbondsBackbone=c;break;case 603979852:this.global.hbondsBackbone=c;break;case 603979854:this.global.hbondsSolid=c;break;case 536870924:this.gdata.setSpecular(c);break;case 603979942:this.transformManager.setSlabEnabled(c);return;case 603979980:this.transformManager.setZoomEnabled(c);
return;case 603979864:this.global.highResolutionFlag=c;break;case 603979967:this.global.traceAlpha=c;break;case 603979982:this.global.zoomLarge=c;this.transformManager.scaleFitToScreen(!1,c,!1,!0);break;case 603979873:J.i18n.GT.setDoTranslate(c);break;case 603979862:this.selectionManager.setHideNotSelected(c);break;case 603979904:this.setScriptQueue(c);break;case 603979830:this.global.dotSurface=c;break;case 603979829:this.global.dotsSelectedOnly=c;break;case 1611141171:this.setSelectionHalos(c);
break;case 603979910:this.global.rasmolHydrogenSetting=c;break;case 603979908:this.global.rasmolHeteroSetting=c;break;case 603979928:this.global.showMultipleBonds=c;break;case 603979920:this.global.showHiddenSelectionHalos=c;break;case 603979975:this.transformManager.setWindowCentered(c);break;case 603979828:this.global.displayCellParameters=c;break;case 603979960:this.global.testFlag1=c;break;case 603979962:this.global.testFlag2=c;break;case 603979964:this.global.testFlag3=c;break;case 603979966:this.jmolTest();
this.global.testFlag4=c;break;case 603979898:this.global.ribbonBorder=c;break;case 603979817:this.global.cartoonBaseEdges=c;break;case 603979818:this.global.cartoonRockets=c;break;case 603979900:this.global.rocketBarrels=c;break;case 603979850:this.gdata.setGreyscaleMode(this.global.greyscaleRendering=c);break;case 603979878:this.global.measurementLabels=c;break;case 603979810:this.setAxesModeMolecular(!c);return;case 603979804:this.setAxesModeMolecular(c);return;case 603979808:this.setAxesModeUnitCell(c);
return;case 603979806:this.setAxesOrientationRasmol(c);return;case 603979823:this.setStringPropertyTok("defaultcolorscheme",545259545,c?"rasmol":"jmol");return;case 603979824:this.setDebugScript(c);return;case 603979892:this.setPerspectiveDepth(c);return;case 603979798:this.setAutoBond(c);return;case 603979914:this.setShowAxes(c);return;case 603979916:this.setShowBbcage(c);return;case 603979922:this.setShowHydrogens(c);return;case 603979926:this.setShowMeasurements(c);return;case 603979936:this.setShowUnitCell(c);
return;case 603979812:d=!1;this.global.bondModeOr=c;break;case 603979978:d=!1;this.global.zeroBasedXyzRasmol=c;this.reset(!0);break;case 603979894:d=!1;this.global.rangeSelected=c;break;case 603979877:d=!1;this.global.measureAllModels=c;break;case 603979954:d=!1;this.statusManager.setAllowStatusReporting(c);break;case 603979822:d=!1;this.global.chainCaseSensitive=c;break;case 603979858:d=!1;this.global.hideNameInPopup=c;break;case 603979826:d=!1;this.global.disablePopupMenu=c;break;case 603979846:d=
!1;this.global.forceAutoBond=c;break;case 603979848:d=!1;this.global.fractionalRelative=c;break;default:if(!this.global.htBooleanParameterFlags.containsKey(a.toLowerCase())){this.global.setUserVariable(a,J.script.SV.getBoolean(c));return}}this.global.setB(a,c);d&&this.setTainted(!0)},$fz.isPrivate=!0,$fz),"~S,~N,~B");$_M(c$,"setModelKitMode",($fz=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 b=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"),b&&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),b&&this.statusManager.setCallbackFunction("modelkit",
"OFF"))}},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"getLanguage",function(){return this.language});$_M(c$,"setSmilesString",function(a){null==a?this.global.removeParam("_smilesString"):this.global.setS("_smilesString",a)},"~S");$_M(c$,"removeUserVariable",function(a){this.global.removeUserVariable(a);a.endsWith("callback")&&this.statusManager.setCallbackFunction(a,null)},"~S");$_M(c$,"isJmolVariable",function(a){return this.global.isJmolVariable(a)},"~S");$_M(c$,"jmolTest",($fz=function(){},$fz.isPrivate=
!0,$fz));$_M(c$,"showParameter",function(a,b,c){c=""+this.global.getParameterEscaped(a,c);(b||0>c.indexOf("<not defined>"))&&this.showString(a+" = "+c,!1)},"~S,~B,~N");$_M(c$,"showString",function(a,b){this.isScriptQueued()&&((!this.isSilent||b)&&!this.isJS)&&J.util.Logger.warn(a);this.scriptEcho(a)},"~S,~B");$_M(c$,"getAllSettings",function(a){return this.getStateCreator().getAllSettings(a)},"~S");$_M(c$,"getBindingInfo",function(a){return this.haveDisplay?this.actionManager.getBindingInfo(a):""},
"~S");$_M(c$,"getIsosurfacePropertySmoothing",function(a){return a?this.global.isosurfacePropertySmoothingPower:this.global.isosurfacePropertySmoothing?1:0},"~B");$_M(c$,"setNavigationDepthPercent",function(a){this.transformManager.setNavigationDepthPercent(a);this.refresh(1,"set navigationDepth")},"~N");$_M(c$,"getShowNavigationPoint",function(){return!this.global.navigationMode||!this.transformManager.canNavigate()?!1:this.isNavigating()&&!this.global.hideNavigationPoint||this.global.showNavigationPointAlways||
this.getInMotion()});$_M(c$,"getCurrentSolventProbeRadius",function(){return this.global.solventOn?this.global.solventProbeRadius:0});$_M(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");Clazz.overrideMethod(c$,"setPerspectiveDepth",function(a){this.global.setB("perspectiveDepth",a);this.transformManager.setPerspectiveDepth(a)},"~B");Clazz.overrideMethod(c$,
"setAxesOrientationRasmol",function(a){this.global.setB("axesOrientationRasmol",a);this.global.axesOrientationRasmol=a;this.reset(!0)},"~B");$_M(c$,"setAxesScale",function(a){a=J.viewer.Viewer.checkFloatRange(a,-100,100);this.global.axesScale=a;this.axesAreTainted=!0},"~N");$_M(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")});$_M(c$,"resetError",function(){this.global.removeParam("_errormessage")});$_M(c$,"setAxesModeMolecular",($fz=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)},$fz.isPrivate=!0,$fz),"~B");$_M(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");$_M(c$,"getAxesMode",function(){return this.global.axesMode});Clazz.overrideMethod(c$,"getPerspectiveDepth",function(){return this.transformManager.getPerspectiveDepth()});
Clazz.overrideMethod(c$,"setSelectionHalos",function(a){null==this.modelSet||a==this.modelSet.getSelectionHaloEnabled()||(this.global.setB("selectionHalos",a),this.loadShape(8),this.modelSet.setSelectionHaloEnabled(a))},"~B");$_M(c$,"getSelectionHaloEnabled",function(a){var b=this.modelSet.getSelectionHaloEnabled()||a&&this.showSelected;a&&(this.showSelected=!1);return b},"~B");$_M(c$,"setStrandCount",($fz=function(a,b){b=J.viewer.Viewer.checkIntRange(b,0,20);switch(a){case 12:this.global.strandCountForStrands=
b;break;case 13:this.global.strandCountForMeshRibbon=b;break;default:this.global.strandCountForStrands=b,this.global.strandCountForMeshRibbon=b}this.global.setI("strandCount",b);this.global.setI("strandCountForStrands",this.global.strandCountForStrands);this.global.setI("strandCountForMeshRibbon",this.global.strandCountForMeshRibbon)},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"getStrandCount",function(a){return 12==a?this.global.strandCountForStrands:this.global.strandCountForMeshRibbon},"~N");$_M(c$,
"setNavigationMode",($fz=function(a){this.global.navigationMode=a;this.transformManager.setNavigationMode(a)},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"setTransformManagerDefaults",($fz=function(){this.transformManager.setCameraDepthPercent(this.global.cameraDepth);this.transformManager.setPerspectiveDepth(this.global.perspectiveDepth);this.transformManager.setStereoDegrees(-5);this.transformManager.setVisualRange(this.global.visualRange);this.transformManager.setSpinOff();this.transformManager.setVibrationPeriod(0);
this.transformManager.setFrameOffsets(this.frameOffsets)},$fz.isPrivate=!0,$fz));$_M(c$,"getCameraFactors",function(){return this.transformManager.getCameraFactors()});$_M(c$,"getLoadState",function(a){return this.getStateCreator().getLoadState(a)},"java.util.Map");Clazz.overrideMethod(c$,"setAutoBond",function(a){this.global.setB("autobond",a);this.global.autoBond=a},"~B");$_M(c$,"makeConnections",function(a,b,c,d,e,f,g,h,k,l){this.clearModelDependentObjects();this.clearMinimization();return this.modelSet.makeConnections(a,
b,c,d,e,f,g,h,k,l)},"~N,~N,~N,~N,J.util.BS,J.util.BS,J.util.BS,~B,~B,~N");Clazz.overrideMethod(c$,"rebond",function(){this.rebondState(!1)});$_M(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");$_M(c$,"setPdbConectBonding",function(a,b){this.clearModelDependentObjects();
this.modelSet.deleteAllBonds();var c=new J.util.BS;this.modelSet.setPdbConectBonding(0,0,c);if(a){var d=b&&this.global.legacyAutoBonding;this.modelSet.autoBondBs4(null,null,c,null,this.getMadBond(),d);this.addStateScript(d?"set legacyAutoBonding TRUE;connect PDB AUTO;set legacyAutoBonding FALSE;":"connect PDB auto;",!1,!0)}else this.addStateScript("connect PDB;",!1,!0)},"~B,~B");Clazz.overrideMethod(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");$_M(c$,"getDefaultRadiusData",function(){return this.rd});Clazz.overrideMethod(c$,"getMadBond",function(){return 2*this.global.bondRadiusMilliAngstroms});$_M(c$,"getMarBond",function(){return this.global.bondRadiusMilliAngstroms});$_M(c$,"getModeMultipleBond",function(){return this.global.modeMultipleBond});Clazz.overrideMethod(c$,"setShowHydrogens",
function(a){this.global.setB("showHydrogens",a);this.global.showHydrogens=a},"~B");Clazz.overrideMethod(c$,"setShowBbcage",function(a){this.setObjectMad(32,"boundbox",a?-4:0);this.global.setB("showBoundBox",a)},"~B");Clazz.overrideMethod(c$,"getShowBbcage",function(){return 0!=this.getObjectMad(4)});$_M(c$,"setShowUnitCell",function(a){this.setObjectMad(33,"unitcell",a?-2:0);this.global.setB("showUnitCell",a)},"~B");$_M(c$,"getShowUnitCell",function(){return 0!=this.getObjectMad(5)});Clazz.overrideMethod(c$,
"setShowAxes",function(a){this.setObjectMad(31,"axes",a?-2:0);this.global.setB("showAxes",a)},"~B");Clazz.overrideMethod(c$,"getShowAxes",function(){return 0!=this.getObjectMad(1)});Clazz.overrideMethod(c$,"setFrankOn",function(a){this.$isPreviewOnly&&(a=!1);this.frankOn=a;this.setObjectMad(35,"frank",a?1:0)},"~B");$_M(c$,"getShowFrank",function(){return this.$isPreviewOnly||this.$isApplet&&this.creatingImage?!1:!this.isJS&&this.$isSignedApplet&&!this.isSignedAppletLocal||this.frankOn});$_M(c$,"isSignedApplet",
function(){return this.$isSignedApplet});Clazz.overrideMethod(c$,"setShowMeasurements",function(a){this.global.setB("showMeasurements",a);this.global.showMeasurements=a},"~B");$_M(c$,"setUnits",function(a,b){this.global.setUnits(a);b&&(this.global.setUnits(a),this.setShapeProperty(6,"reformatDistances",null))},"~S,~B");$_M(c$,"getMeasureDistanceUnits",function(){return this.global.measureDistanceUnits});$_M(c$,"getEnergyUnits",function(){return this.global.energyUnits});$_M(c$,"setAppendNew",function(a){this.global.appendNew=
a},"~B");Clazz.overrideMethod(c$,"setRasmolDefaults",function(){this.setDefaultsType("RasMol")});Clazz.overrideMethod(c$,"setJmolDefaults",function(){this.setDefaults()});$_M(c$,"setDefaultsType",($fz=function(a){a.equalsIgnoreCase("RasMol")?this.stateManager.setRasMolDefaults():this.setDefaults()},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"setDefaults",($fz=function(){this.setShapeSizeRD(0,this.rd,this.getModelUndeletedAtomsBitSet(-1))},$fz.isPrivate=!0,$fz));$_M(c$,"setAntialias",($fz=function(a,b){switch(a){case 0:this.global.antialiasDisplay=
b;break;case 1:this.global.antialiasTranslucent=b;break;case 2:this.global.antialiasImages=b;return}this.resizeImage(0,0,!1,!1,!0)},$fz.isPrivate=!0,$fz),"~N,~B");$_M(c$,"allocTempPoints",function(a){return this.tempArray.allocTempPoints(a)},"~N");$_M(c$,"freeTempPoints",function(a){this.tempArray.freeTempPoints(a)},"~A");$_M(c$,"allocTempScreens",function(a){return this.tempArray.allocTempScreens(a)},"~N");$_M(c$,"freeTempScreens",function(a){this.tempArray.freeTempScreens(a)},"~A");$_M(c$,"allocTempEnum",
function(a){return this.tempArray.allocTempEnum(a)},"~N");$_M(c$,"freeTempEnum",function(a){this.tempArray.freeTempEnum(a)},"~A");$_M(c$,"getFont3D",function(a,b,c){return this.gdata.getFont3DFSS(a,b,c)},"~S,~S,~N");$_M(c$,"formatText",function(a){if(0>a.indexOf("@{")&&0>a.indexOf("%{"))return a;var b=a,c=0<=b.indexOf("\\");c&&(b=J.util.TextFormat.simpleReplace(b,"\\%","\u0001"),b=J.util.TextFormat.simpleReplace(b,"\\@","\u0002"),c=!b.equals(a));for(var b=J.util.TextFormat.simpleReplace(b,"%{","@{"),
d;0<=(a=b.indexOf("@{"));){a++;var e=a+1;d=b.length;a=J.util.TextFormat.ichMathTerminator(b,a,d);if(a>=d)return b;d=b.substring(e,a);if(0==d.length)return b;d=this.evaluateExpression(d);Clazz.instanceOf(d,J.util.P3)&&(d=J.util.Escape.eP(d));b=b.substring(0,e-2)+d.toString()+b.substring(a+1)}c&&(b=J.util.TextFormat.simpleReplace(b,"\u0002","@"),b=J.util.TextFormat.simpleReplace(b,"\u0001","%"));return b},"~S");$_M(c$,"getElementSymbol",function(a){return this.modelSet.getElementSymbol(a)},"~N");$_M(c$,
"getElementNumber",function(a){return this.modelSet.getElementNumber(a)},"~N");Clazz.overrideMethod(c$,"getAtomName",function(a){return this.modelSet.getAtomName(a)},"~N");Clazz.overrideMethod(c$,"getAtomNumber",function(a){return this.modelSet.getAtomNumber(a)},"~N");$_M(c$,"getAtomGroupQuaternions",function(a,b){return this.modelSet.getAtomGroupQuaternions(a,b,this.getQuaternionFrame())},"J.util.BS,~N");$_M(c$,"getAtomQuaternion",function(a){return this.modelSet.getQuaternion(a,this.getQuaternionFrame())},
"~N");Clazz.overrideMethod(c$,"getAtomPoint3f",function(a){return this.modelSet.atoms[a]},"~N");$_M(c$,"getAtomPointVector",function(a){return this.modelSet.getAtomPointVector(a)},"J.util.BS");Clazz.overrideMethod(c$,"getAtomRadius",function(a){return this.modelSet.getAtomRadius(a)},"~N");Clazz.overrideMethod(c$,"getAtomArgb",function(a){return this.gdata.getColorArgbOrGray(this.modelSet.getAtomColix(a))},"~N");$_M(c$,"getAtomChain",function(a){return this.modelSet.getAtomChain(a)},"~N");Clazz.overrideMethod(c$,
"getAtomModelIndex",function(a){return this.modelSet.atoms[a].modelIndex},"~N");$_M(c$,"getAtomSequenceCode",function(a){return this.modelSet.atoms[a].getSeqcodeString()},"~N");Clazz.overrideMethod(c$,"getBondRadius",function(a){return this.modelSet.getBondRadius(a)},"~N");Clazz.overrideMethod(c$,"getBondOrder",function(a){return this.modelSet.getBondOrder(a)},"~N");$_M(c$,"assignAromaticBonds",function(){this.modelSet.assignAromaticBonds()});$_M(c$,"resetAromatic",function(){this.modelSet.resetAromatic()});
Clazz.overrideMethod(c$,"getBondArgb1",function(a){return this.gdata.getColorArgbOrGray(this.modelSet.getBondColix1(a))},"~N");Clazz.overrideMethod(c$,"getBondModelIndex",function(a){return this.modelSet.getBondModelIndex(a)},"~N");Clazz.overrideMethod(c$,"getBondArgb2",function(a){return this.gdata.getColorArgbOrGray(this.modelSet.getBondColix2(a))},"~N");Clazz.overrideMethod(c$,"getPolymerLeadMidPoints",function(a,b){return this.modelSet.getPolymerLeadMidPoints(a,b)},"~N,~N");$_M(c$,"setStereoMode",
function(a,b,c){this.setFloatProperty("stereoDegrees",c);this.setBooleanProperty("greyscaleRendering",b.isBiColor());null!=a?this.transformManager.setStereoMode2(a):this.transformManager.setStereoMode(b)},"~A,J.constant.EnumStereoMode,~N");$_M(c$,"isStereoDouble",function(){return this.transformManager.stereoMode===J.constant.EnumStereoMode.DOUBLE});Clazz.overrideMethod(c$,"getOperatingSystemName",function(){return J.viewer.Viewer.strOSName+(!this.isJS?"":this.isWebGL?"(WebGL)":"(HTML5)")});Clazz.overrideMethod(c$,
"getJavaVendor",function(){return J.viewer.Viewer.strJavaVendor});Clazz.overrideMethod(c$,"getJavaVersion",function(){return J.viewer.Viewer.strJavaVersion});$_M(c$,"getGraphicsData",function(){return this.gdata});Clazz.overrideMethod(c$,"getProperty",function(a,b,c){if(!"DATA_API".equals(a))return this.getPropertyManager().getProperty(a,b,c);switch("scriptCheck.........consoleText.........scriptEditor........scriptEditorState...getAppConsole.......getScriptEditor.....setMenu.............spaceGroupInfo......disablePopupMenu....defaultDirectory....getPopupMenu........shapeManager........".indexOf(b)){case 0:return this.scriptCheckRet(c,
!0);case 20:return null==this.appConsole?"":this.appConsole.getText();case 40:return this.getStateCreator().showEditor(c),null;case 60:return this.scriptEditorVisible=c.booleanValue(),null;case 80:if(this.$isKiosk)this.appConsole=null;else if(Clazz.instanceOf(c,J.api.JmolAppConsoleInterface))this.appConsole=c;else if(null!=c&&!c.booleanValue())this.appConsole=null;else if(null==this.appConsole&&null!=c&&c.booleanValue()){this.appConsole=J.api.Interface.getOptionInterface("consolejs.AppletConsole");
if(null!=this.appConsole)return this.appConsole.start(this),this.appConsole;null!=this.appConsole&&this.appConsole.start(this)}this.scriptEditor=null==this.appConsole?null:this.appConsole.getScriptEditor();return this.appConsole;case 100:return null==this.appConsole&&(null!=c&&c.booleanValue())&&(this.getProperty("DATA_API","getAppConsole",Boolean.TRUE),this.scriptEditor=null==this.appConsole?null:this.appConsole.getScriptEditor()),this.scriptEditor;case 120:return null!=this.jmolpopup&&this.jmolpopup.jpiDispose(),
this.jmolpopup=null,this.menuStructure=c;case 140:return this.getSpaceGroupInfo(null);case 160:return this.global.disablePopupMenu=!0,null;case 180:return this.global.defaultDirectory;case 200:return Clazz.instanceOf(c,String)?this.getMenu(c):this.getPopupMenu();case 220:return this.shapeManager.getProperty(c)}J.util.Logger.error("ERROR in getProperty DATA_API: "+b);return null},"~S,~S,~O");$_M(c$,"getPropertyManager",($fz=function(){null==this.pm&&(this.pm=J.api.Interface.getOptionInterface("viewer.PropertyManager")).setViewer(this);
return this.pm},$fz.isPrivate=!0,$fz));$_M(c$,"getModelExtract",function(a,b,c,d){return this.getPropertyManager().getModelExtract(this.getAtomBitSet(a),b,c,d)},"~O,~B,~B,~S");$_M(c$,"setTainted",function(a){this.isTainted=this.axesAreTainted=a&&(this.refreshing||this.creatingImage)},"~B");$_M(c$,"notifyMouseClicked",function(a,b,c,d){var e=J.viewer.binding.Binding.getModifiers(c),f=J.viewer.binding.Binding.getClickCount(c);this.global.setI("_mouseX",a);this.global.setI("_mouseY",this.dimScreen.height-
b);this.global.setI("_mouseAction",c);this.global.setI("_mouseModifiers",e);this.global.setI("_clickCount",f);return this.statusManager.setStatusClicked(a,this.dimScreen.height-b,c,f,d)},"~N,~N,~N,~N");$_M(c$,"checkObjectClicked",function(a,b,c){return this.shapeManager.checkObjectClicked(a,b,c,this.getVisibleFramesBitSet(),this.global.drawPicking)},"~N,~N,~N");$_M(c$,"checkObjectHovered",function(a,b){return 0<=a&&null!=this.shapeManager&&this.shapeManager.checkObjectHovered(a,b,this.getVisibleFramesBitSet(),
this.getBondPicking())},"~N,~N");$_M(c$,"checkObjectDragged",function(a,b,c,d,e){var f=0;switch(this.getPickingMode()){case 2:f=5;break;case 4:f=22}this.shapeManager.checkObjectDragged(a,b,c,d,e,this.getVisibleFramesBitSet(),f)&&(this.refresh(1,"checkObjectDragged"),22==f&&this.scriptEcho(this.getShapeProperty(22,"command")))},"~N,~N,~N,~N,~N");$_M(c$,"rotateAxisAngleAtCenter",function(a,b,c,d,e,f,g){(a=this.transformManager.rotateAxisAngleAtCenter(a,b,c,d,e,f,g))&&this.refresh(-1,"rotateAxisAngleAtCenter");
return a},"J.api.JmolScriptEvaluator,J.util.P3,J.util.V3,~N,~N,~B,J.util.BS");$_M(c$,"rotateAboutPointsInternal",function(a,b,c,d,e,f,g,h,k){(a=this.transformManager.rotateAboutPointsInternal(a,b,c,d,e,!1,f,g,!1,h,k))&&this.refresh(-1,"rotateAxisAboutPointsInternal");return a},"J.api.JmolScriptEvaluator,J.util.P3,J.util.P3,~N,~N,~B,J.util.BS,J.util.V3,J.util.JmolList");$_M(c$,"startSpinningAxis",function(a,b,c){this.getSpinOn()||this.getNavOn()?(this.setSpinOn(!1),this.setNavOn(!1)):this.transformManager.rotateAboutPointsInternal(null,
a,b,this.global.pickingSpinRate,3.4028235E38,c,!0,null,!1,null,null)},"J.util.P3,J.util.P3,~B");$_M(c$,"getModelDipole",function(){return this.modelSet.getModelDipole(this.animationManager.currentModelIndex)});$_M(c$,"calculateMolecularDipole",function(){return this.modelSet.calculateMolecularDipole(this.animationManager.currentModelIndex)});$_M(c$,"getAtomIdentityInfo",function(a,b){this.getPropertyManager().getAtomIdentityInfo(a,b)},"~N,java.util.Map");$_M(c$,"setDefaultLattice",function(a){this.global.setDefaultLattice(a);
this.global.setS("defaultLattice",J.util.Escape.eP(a))},"J.util.P3");$_M(c$,"getDefaultLattice",function(){return this.global.getDefaultLattice()});$_M(c$,"getTaintedAtoms",function(a){return this.modelSet.getTaintedAtoms(a)},"~N");$_M(c$,"setTaintedAtoms",function(a,b){this.modelSet.setTaintedAtoms(a,b)},"J.util.BS,~N");$_M(c$,"getData",function(a,b){var c="";if(b.equalsIgnoreCase("MOL")||b.equalsIgnoreCase("SDF")||b.equalsIgnoreCase("V2000")||b.equalsIgnoreCase("V3000")||b.equalsIgnoreCase("XYZVIB")||
b.equalsIgnoreCase("CD"))return this.getModelExtract(a,!1,!1,b);if(0==b.toLowerCase().indexOf("property_"))c='{selected}.label("%{'+b+'}")';else{if(b.equalsIgnoreCase("CML"))return this.getModelCml(this.getAtomBitSet(a),2147483647,!0);c=b.equalsIgnoreCase("PDB")?'{selected and not hetero}.label("ATOM  %5i %-4a%1A%3.3n %1c%4R%1E   %8.3x%8.3y%8.3z%6.2Q%6.2b          %2e  ").lines+{selected and hetero}.label("HETATM%5i %-4a%1A%3.3n %1c%4R%1E   %8.3x%8.3y%8.3z%6.2Q%6.2b          %2e  ").lines':b.equalsIgnoreCase("XYZRN")?
'"" + {selected}.size + "\n\n"+{selected}.label("%-2e %8.3x %8.3y %8.3z %4.2[vdw] 1 [%n]%r.%a#%i").lines':b.startsWith("USER:")?'{selected}.label("'+b.substring(5)+'").lines':'"" + {selected}.size + "\n\n"+{selected}.label("%-2e %10.5x %10.5y %10.5z").lines'}a.equals("selected")||(c=J.util.TextFormat.simpleReplace(c,"selected",a));return this.evaluateExpression(c)},"~S,~S");$_M(c$,"getModelCml",function(a,b,c){return this.modelSet.getModelCml(a,b,c)},"J.util.BS,~N,~B");$_M(c$,"getHelixData",function(a,
b){return this.modelSet.getHelixData(a,b)},"J.util.BS,~N");$_M(c$,"getPdbData",function(a,b){null==a&&(a=this.getSelectionSet(!0));return this.modelSet.getPdbAtomData(a,b)},"J.util.BS,J.io.OutputStringBuilder");$_M(c$,"isJmolDataFrameForModel",function(a){return this.modelSet.isJmolDataFrameForModel(a)},"~N");$_M(c$,"isJmolDataFrame",function(){return this.modelSet.isJmolDataFrameForModel(this.animationManager.currentModelIndex)});$_M(c$,"getJmolDataFrameIndex",function(a,b){return this.modelSet.getJmolDataFrameIndex(a,
b)},"~N,~S");$_M(c$,"setJmolDataFrame",function(a,b,c){this.modelSet.setJmolDataFrame(a,b,c)},"~S,~N,~N");$_M(c$,"setFrameTitle",function(a,b){this.modelSet.setFrameTitle(J.util.BSUtil.newAndSetBit(a),b)},"~N,~S");$_M(c$,"setFrameTitleObj",function(a){this.loadShape(30);this.modelSet.setFrameTitle(this.getVisibleFramesBitSet(),a)},"~O");$_M(c$,"getFrameTitle",function(){return this.modelSet.getFrameTitle(this.animationManager.currentModelIndex)});$_M(c$,"getJmolFrameType",function(a){return this.modelSet.getJmolFrameType(a)},
"~N");$_M(c$,"getJmolDataSourceFrame",function(a){return this.modelSet.getJmolDataSourceFrame(a)},"~N");$_M(c$,"setAtomProperty",function(a,b,c,d,e,f,g){1649412112==b&&this.shapeManager.deleteVdwDependentShapes(a);this.clearMinimization();this.modelSet.setAtomProperty(a,b,c,d,e,f,g);switch(b){case 1112541185:case 1112541186:case 1112541187:case 1112541188:case 1112541189:case 1112541190:case 1112539151:case 1112539152:case 1112539153:case 1087375365:this.refreshMeasures(!0)}},"J.util.BS,~N,~N,~N,~S,~A,~A");
$_M(c$,"checkCoordinatesChanged",function(){this.modelSet.recalculatePositionDependentQuantities(null,null);this.refreshMeasures(!0)});$_M(c$,"setAtomCoord",function(a,b,c,d){this.modelSet.setAtomCoord(a,b,c,d)},"~N,~N,~N,~N");$_M(c$,"setAtomCoordRelative",function(a,b,c,d){this.modelSet.setAtomCoordRelative(a,b,c,d)},"~N,~N,~N,~N");$_M(c$,"setAtomCoords",function(a,b,c){0!=a.cardinality()&&(this.modelSet.setAtomCoords(a,b,c),this.checkMinimization(),this.statusManager.setStatusAtomMoved(a))},"J.util.BS,~N,~O");
$_M(c$,"setAtomCoordsRelative",function(a,b){null==b&&(b=this.getSelectionSet(!1));0!=b.cardinality()&&(this.modelSet.setAtomCoordsRelative(a,b),this.checkMinimization(),this.statusManager.setStatusAtomMoved(b))},"J.util.Tuple3f,J.util.BS");$_M(c$,"invertAtomCoordPt",function(a,b){this.modelSet.invertSelected(a,null,-1,null,b);this.checkMinimization();this.statusManager.setStatusAtomMoved(b)},"J.util.P3,J.util.BS");$_M(c$,"invertAtomCoordPlane",function(a,b){this.modelSet.invertSelected(null,a,-1,
null,b);this.checkMinimization();this.statusManager.setStatusAtomMoved(b)},"J.util.P4,J.util.BS");$_M(c$,"invertSelected",function(a,b,c,d){var e=this.getSelectionSet(!1);0!=e.cardinality()&&(this.modelSet.invertSelected(a,b,c,d,e),this.checkMinimization(),this.statusManager.setStatusAtomMoved(e))},"J.util.P3,J.util.P4,~N,J.util.BS");$_M(c$,"moveAtoms",function(a,b,c,d,e,f){0!=f.cardinality()&&(this.modelSet.moveAtoms(a,b,c,f,d,e),this.checkMinimization(),this.statusManager.setStatusAtomMoved(f))},
"J.util.Matrix3f,J.util.Matrix3f,J.util.V3,J.util.P3,~B,J.util.BS");$_M(c$,"moveSelected",function(a,b,c,d,e,f,g,h){0!=c&&(-2147483648==d&&(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!=d?this.actionRotateBond(a,b,d,
e):(f=this.setMovableBitSet(f,!h),0!=f.cardinality()&&(g?(d=this.getAtomSetCenter(f),this.transformManager.finalizeTransformParameters(),e=this.global.antialiasDisplay?2:1,g=this.transformPt(d),a=-2147483648!=c?J.util.P3.new3(g.x,g.y,g.z+c+0.5):J.util.P3.new3(g.x+a*e+0.5,g.y+b*e+0.5,g.z),b=new J.util.P3,this.unTransformPoint(a,b),b.sub(d),this.setAtomCoordsRelative(b,f)):this.transformManager.rotateXYBy(a,b,f))),this.refresh(2,""),this.movingSelected=!1)))},"~N,~N,~N,~N,~N,J.util.BS,~B,~B");$_M(c$,
"highlightBond",function(a,b){if(!b||this.hoverEnabled){var c=null;if(0<=a){var d=this.modelSet.bonds[a],c=d.getAtomIndex2();if(!this.isAtomAssignable(c))return;c=J.util.BSUtil.newAndSetBit(c);c.set(d.getAtomIndex1())}this.highlight(c);this.refresh(3,"highlightBond")}},"~N,~B");$_M(c$,"highlight",function(a){null!=a&&this.loadShape(8);this.setShapeProperty(8,"highlight",a)},"J.util.BS");$_M(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");$_M(c$,"getRotateBondIndex",function(){return this.rotateBondIndex});$_M(c$,"actionRotateBond",function(a,b,c,d){if(!(0>this.rotateBondIndex)){var e=this.bsRotateBranch,f,g;if(null==e){g=this.modelSet.bonds[this.rotateBondIndex];f=g.getAtom1();g=g.getAtom2();this.undoMoveActionClear(f.index,2,!0);c=J.util.P3.new3(c,d,Clazz.doubleToInt((f.screenZ+g.screenZ)/2));this.transformManager.unTransformPoint(c,c);if(1==g.getCovalentBondCount()||
c.distance(f)<c.distance(g)&&1!=f.getCovalentBondCount())d=f,f=g,g=d;if(90<J.util.Measure.computeAngleABC(c,f,g,!0)||90<J.util.Measure.computeAngleABC(c,g,f,!0))e=this.getBranchBitSet(g.index,f.index);if(null!=e){c=0;for(d=f.getBonds().length;0<=--d;)if(e.get(f.getBondedAtomIndex(d))&&2==++c){e=null;break}}null==e&&(e=this.getMoleculeBitSet(f.index));this.bsRotateBranch=e;this.rotatePrev1=f.index;this.rotatePrev2=g.index}else f=this.modelSet.atoms[this.rotatePrev1],g=this.modelSet.atoms[this.rotatePrev2];
c=J.util.V3.new3(g.screenX-f.screenX,g.screenY-f.screenY,0);a=J.util.V3.new3(a,b,0);c.cross(c,a);a=(0<c.z?1:-1)*a.length();e=J.util.BSUtil.copy(e);e.andNot(this.selectionManager.getMotionFixedAtoms());this.rotateAboutPointsInternal(this.eval,f,g,0,a,!1,e,null,null)}},"~N,~N,~N,~N");$_M(c$,"refreshMeasures",function(a){this.setShapeProperty(6,"refresh",null);a&&this.stopMinimization()},"~B");$_M(c$,"setDynamicMeasurements",function(a){this.global.dynamicMeasurements=a},"~B");$_M(c$,"functionXY",function(a,
b,c){var d=null;if(0==a.indexOf("file:"))d=this.getFileAsString(a.substring(5));else if(0!=a.indexOf("data2d_"))return this.statusManager.functionXY(a,b,c);b=Math.abs(b);c=Math.abs(c);if(null==d){a=this.getDataFloat2D(a);if(null!=a)return a;d=""}a=Clazz.newFloatArray(b,c,0);var e=Clazz.newFloatArray(b*c,0);J.util.Parser.parseStringInfestedFloatArray(d,null,e);for(var f=d=0;d<b;d++)for(var g=0;g<c;g++)a[d][g]=e[f++];return a},"~S,~N,~N");$_M(c$,"functionXYZ",function(a,b,c,d){var e=null;if(0==a.indexOf("file:"))e=
this.getFileAsString(a.substring(5));else if(0!=a.indexOf("data3d_"))return this.statusManager.functionXYZ(a,b,c,d);b=Math.abs(b);c=Math.abs(c);d=Math.abs(d);if(null==e){a=this.getDataFloat3D(a);if(null!=a)return a;e=""}a=Clazz.newFloatArray(b,c,d,0);var f=Clazz.newFloatArray(b*c*d,0);J.util.Parser.parseStringInfestedFloatArray(e,null,f);for(var g=e=0;e<b;e++)for(var h=0;h<c;h++)for(var k=0;k<d;k++)a[e][h][k]=f[g++];return a},"~S,~N,~N,~N");$_M(c$,"showNMR",function(a){this.showUrl(this.global.nmrUrlFormat+
J.util.Escape.escapeUrl(this.getChemicalInfo(a,"/","smiles")))},"~S");$_M(c$,"getHelp",function(a){0>this.global.helpPath.indexOf("?")?(0<a.length&&0!=a.indexOf("?")&&(a="?search="+J.util.TextFormat.simpleReplace(a," ","%20")),a+=(0==a.length?"?ver=":"&ver=")+J.viewer.JC.version):a="&"+a;this.showUrl(this.global.helpPath+a)},"~S");$_M(c$,"show2D",function(a){this.showUrl(this.setLoadFormat("_"+a,"2",!1))},"~S");$_M(c$,"getChemicalInfo",function(a,b,c){a=this.setLoadFormat("_"+a,b,!1);"/"==b&&(a+=
J.util.TextFormat.simpleReplace(c," ","%20"));return this.getFileAsString4(a,2147483647,!1,!1)},"~S,~S,~S");$_M(c$,"addCommand",function(a){!this.autoExit&&(this.haveDisplay&&this.getPreserveState())&&this.commandHistory.addCommand(J.util.TextFormat.replaceAllCharacters(a,"\r\n\t"," "))},"~S");$_M(c$,"removeCommand",function(){return this.commandHistory.removeCommand()});Clazz.overrideMethod(c$,"getSetHistory",function(a){return this.commandHistory.getSetHistory(a)},"~N");$_M(c$,"getOutputStream",
function(a,b){return this.getStateCreator().getOutputStream(a,b)},"~S,~A");Clazz.overrideMethod(c$,"writeTextFile",function(a,b){this.createImage(a,"txt",b,-2147483648,0,0)},"~S,~S");Clazz.overrideMethod(c$,"clipImage",function(a){if(!this.isRestricted(J.viewer.Viewer.ACCESS.ALL))return"no";var b;try{return b=this.getImageCreator(),b.clipImage(this,a)}catch(c){if(Clazz.exceptionOf(c,Error))return J.i18n.GT._("clipboard is not accessible -- use signed applet");throw c;}},"~S");$_M(c$,"createImageSet",
function(a,b,c,d,e,f,g,h,k,l,m){return this.getStateCreator().createImageSet(a,b,c,d,e,f,g,h,k,l,m)},"~S,~S,~S,~A,~A,~N,~N,~N,J.util.BS,~N,~A");$_M(c$,"createZip",function(a,b,c,d){return this.getStateCreator().createImagePathCheck(a,b,c,null,d,null,-2147483648,-1,-1,null,!0)},"~S,~S,~S,~A");$_M(c$,"createImage",function(a,b,c,d,e,f){var g=Clazz.instanceOf(c,String)?c:null;c=Clazz.instanceOf(c,Array)?c:null;return this.getStateCreator().createImagePathCheck(a,b,g,c,null,null,d,e,f,null,!0)},"~S,~S,~O,~N,~N,~N");
$_M(c$,"createImage",function(a,b,c,d,e,f,g){return this.getStateCreator().createImagePathCheck(a,b,c,d,null,null,e,f,g,null,!0)},"~S,~S,~S,~A,~N,~N,~N");$_M(c$,"getImageCreator",function(){return J.api.Interface.getOptionInterface(this.isJS&&!this.isWebGL?"exportjs.JSImageCreator":"export.image.AwtImageCreator").setViewer(this,this.privateKey)});$_M(c$,"setSyncTarget",($fz=function(a,b){switch(a){case 0:this.statusManager.syncingMouse=b;break;case 1:this.statusManager.syncingScripts=b;break;case 2:this.statusManager.syncSend(b?
"GET_GRAPHICS":"SET_GRAPHICS_OFF","*",0);Float.isNaN(this.transformManager.stereoDegrees)&&this.setFloatProperty("stereoDegrees",-5);b&&(this.setBooleanProperty("_syncMouse",!1),this.setBooleanProperty("_syncScript",!1));return}!this.statusManager.syncingScripts&&!this.statusManager.syncingMouse&&this.refresh(-1,"set sync")},$fz.isPrivate=!0,$fz),"~N,~B");Clazz.overrideMethod(c$,"syncScript",function(a,b,c){this.getStateCreator().syncScript(a,b,c)},"~S,~S,~N");$_M(c$,"getModelIndexFromId",function(a){return this.modelSet.getModelIndexFromId(a)},
"~S");$_M(c$,"setSyncDriver",function(a){this.statusManager.setSyncDriver(a)},"~N");$_M(c$,"getPartialCharges",function(){return this.modelSet.getPartialCharges()});$_M(c$,"getAtomicPotentials",function(a,b,c,d){a=Clazz.newFloatArray(this.getAtomCount(),0);var e=J.api.Interface.getOptionInterface("quantum.MlpCalculation");d=null==d?null:this.getFileAsString(d);e.assignPotentials(this.modelSet.atoms,a,this.getSmartsMatch("a",b),this.getSmartsMatch("/noAromatic/[$(C=O),$(O=C),$(NC=O)]",b),c,d);return a},
"~B,J.util.BS,J.util.BS,~S");$_M(c$,"setProteinType",function(a,b){this.modelSet.setProteinType(null==b?this.getSelectionSet(!1):b,a)},"J.constant.EnumStructure,J.util.BS");Clazz.overrideMethod(c$,"getBondPoint3f1",function(a){return this.modelSet.getBondAtom1(a)},"~N");Clazz.overrideMethod(c$,"getBondPoint3f2",function(a){return this.modelSet.getBondAtom2(a)},"~N");$_M(c$,"getVibrationVector",function(a){return this.modelSet.getVibrationVector(a,!1)},"~N");$_M(c$,"getVanderwaalsMar",function(a){return this.dataManager.defaultVdw===
J.constant.EnumVdw.USER?this.dataManager.userVdwMars[a]:J.util.Elements.getVanderwaalsMar(a,this.dataManager.defaultVdw)},"~N");$_M(c$,"getVanderwaalsMarType",function(a,b){if(null==b)b=this.dataManager.defaultVdw;else switch(b){case J.constant.EnumVdw.USER:if(null==this.dataManager.bsUserVdws)b=this.dataManager.defaultVdw;else return this.dataManager.userVdwMars[a];break;case J.constant.EnumVdw.AUTO:case J.constant.EnumVdw.JMOL:case J.constant.EnumVdw.BABEL:case J.constant.EnumVdw.RASMOL:this.dataManager.defaultVdw!==
J.constant.EnumVdw.AUTO&&(b=this.dataManager.defaultVdw)}return J.util.Elements.getVanderwaalsMar(a,b)},"~N,J.constant.EnumVdw");$_M(c$,"setDefaultVdw",function(a){a=J.constant.EnumVdw.getVdwType(a);null==a&&(a=J.constant.EnumVdw.AUTO);this.dataManager.setDefaultVdw(a);this.global.setS("defaultVDW",this.getDefaultVdwTypeNameOrData(-2147483648,null))},"~S");$_M(c$,"getDefaultVdwTypeNameOrData",function(a,b){return this.dataManager.getDefaultVdwNameOrData(a,b,null)},"~N,J.constant.EnumVdw");$_M(c$,
"deleteAtoms",function(a,b){this.clearModelDependentObjects();if(!b){this.modelSet.deleteAtoms(a);var c=this.selectionManager.deleteAtoms(a);this.setTainted(!0);return c}if(0==a.cardinality())return 0;this.setCurrentModelIndexClear(0,!1);this.animationManager.setAnimationOn(!1);var c=J.util.BSUtil.copy(this.getDeletedAtoms()),d=this.modelSet.deleteModels(a);this.selectionManager.processDeletedModelAtoms(d);this.setAnimationRange(0,0);null!=this.eval&&this.eval.deleteAtomsInVariables(d);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!=c&&d.andNot(c);return J.util.BSUtil.cardinalityOf(d)},"J.util.BS,~B");$_M(c$,"deleteBonds",function(a){this.modelSet.deleteBonds(a,!1)},"J.util.BS");$_M(c$,"deleteModelAtoms",function(a,b,c){this.selectionManager.deleteModelAtoms(c);
J.util.BSUtil.deleteBits(this.getFrameOffsets(),c);this.setFrameOffsets(this.getFrameOffsets());this.dataManager.deleteModelAtoms(a,b,c)},"~N,~N,J.util.BS");$_M(c$,"getDeletedAtoms",function(){return this.selectionManager.getDeletedAtoms()});$_M(c$,"getQuaternionFrame",function(){return this.global.quaternionFrame.charAt(2==this.global.quaternionFrame.length?1:0)});$_M(c$,"calculatePointGroup",function(){return this.modelSet.calculatePointGroup(this.getSelectionSet(!1))});$_M(c$,"getPointGroupInfo",
function(a){return this.modelSet.getPointGroupInfo(this.getAtomBitSet(a))},"~O");$_M(c$,"getPointGroupAsString",function(a,b,c,d){return this.modelSet.getPointGroupAsString(this.getSelectionSet(!1),a,b,c,d)},"~B,~S,~N,~N");$_M(c$,"loadImage",function(a,b){this.fileManager.loadImage(a,b)},"~S,~S");$_M(c$,"loadImageData",function(a,b,c,d){null==a&&J.util.Logger.info(b);null==c?this.setBackgroundImage(null==a?null:b,a):(this.setShapeProperty(30,"text",b),null!=a&&this.setShapeProperty(30,"image",a));
null!=d&&(d.mustResumeEval=!0,this.eval.resumeEval(d))},"~O,~S,~S,J.script.ScriptContext");$_M(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");$_M(c$,"setErrorMessage",function(a,
b){this.errorMessageUntranslated=b;return this.errorMessage=a},"~S,~S");Clazz.overrideMethod(c$,"getErrorMessage",function(){return this.errorMessage});Clazz.overrideMethod(c$,"getErrorMessageUn",function(){return null==this.errorMessageUntranslated?this.errorMessage:this.errorMessageUntranslated});$_M(c$,"setShapeErrorState",function(a,b){this.currentShapeID=a;this.currentShapeState=b},"~N,~S");$_M(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});$_M(c$,"handleError",function(a,b){try{b&&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.notifyError("Error","doClear="+b+"; "+a,""+a)}catch(c){try{J.util.Logger.error("Could not notify error "+
a+": due to "+c)}catch(d){}}},"Error,~B");$_M(c$,"getAtomicCharges",function(){return this.modelSet.getAtomicCharges()});$_M(c$,"getFunctions",function(a){return a?J.viewer.Viewer.staticFunctions:this.localFunctions},"~B");$_M(c$,"removeFunction",function(a){null!=this.getFunction(a)&&(J.viewer.Viewer.staticFunctions.remove(a),this.localFunctions.remove(a))},"~S");$_M(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=$_M(c$,"isStaticFunction",($fz=function(a){return a.startsWith("static_")},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"isFunction",function(a){return(J.viewer.Viewer.isStaticFunction(a)?J.viewer.Viewer.staticFunctions:this.localFunctions).containsKey(a)},"~S");$_M(c$,"clearFunctions",function(){J.viewer.Viewer.staticFunctions.clear();this.localFunctions.clear()});$_M(c$,"addFunction",function(a){var b=a.getName();(J.viewer.Viewer.isStaticFunction(b)?
J.viewer.Viewer.staticFunctions:this.localFunctions).put(b,a)},"J.api.JmolScriptFunction");$_M(c$,"getFunctionCalls",function(a){return this.getStateCreator().getFunctionCalls(a)},"~S");$_M(c$,"showMessage",function(a){this.isPrintOnly||J.util.Logger.warn(a)},"~S");$_M(c$,"getMoInfo",function(a){return this.modelSet.getMoInfo(a)},"~N");Clazz.overrideMethod(c$,"checkPrivateKey",function(a){return a==this.privateKey},"~N");$_M(c$,"bindAction",function(a,b,c,d){this.haveDisplay&&this.actionManager.bindAction(a,
b,c,d)},"~S,~S,J.util.P3,J.util.P3");$_M(c$,"unBindAction",function(a,b){this.haveDisplay&&this.actionManager.unbindAction(a,b)},"~S,~S");$_M(c$,"getMouseInfo",function(){return this.haveDisplay?this.actionManager.getMouseInfo():null});$_M(c$,"getFrontPlane",function(){return this.transformManager.getFrontPlane()});$_M(c$,"getPlaneIntersection",function(a,b,c,d){return this.modelSet.getPlaneIntersection(a,b,c,d,this.animationManager.currentModelIndex)},"~N,J.util.P4,~N,~N");$_M(c$,"calculateStruts",
function(a,b){return this.modelSet.calculateStruts(null==a?this.getSelectionSet(!1):a,null==b?this.getSelectionSet(!1):b)},"J.util.BS,J.util.BS");$_M(c$,"getPreserveState",function(){return this.global.preserveState&&null!=this.scriptManager});$_M(c$,"getLogFile",function(){return null==this.logFile?"":this.logFile});$_M(c$,"setLogFile",($fz=function(a){var b=null;if(null==this.logFilePath||0<=a.indexOf("\\")||0<=a.indexOf("/"))a=null;else if(0<a.length){a.startsWith("JmolLog_")||(a="JmolLog_"+a);
try{b=this.$isApplet?this.logFilePath+a:(new java.io.File(this.logFilePath+a)).getAbsolutePath()}catch(c){if(Clazz.exceptionOf(c,Exception))a=null;else throw c;}}null==a||!this.isRestricted(J.viewer.Viewer.ACCESS.ALL)?(J.util.Logger.info(J.i18n.GT._("Cannot set log file path.")),a=null):(null!=b&&J.util.Logger.info(J.i18n.GT._("Setting log file to {0}",b)),this.logFile=b);return a},$fz.isPrivate=!0,$fz),"~S");Clazz.overrideMethod(c$,"log",function(a){null!=a&&this.getStateCreator().logToFile(a)},
"~S");$_M(c$,"isKiosk",function(){return this.$isKiosk});$_M(c$,"hasFocus",function(){return this.haveDisplay&&(this.$isKiosk||this.apiPlatform.hasFocus(this.display))});$_M(c$,"setFocus",function(){this.haveDisplay&&!this.apiPlatform.hasFocus(this.display)&&this.apiPlatform.requestFocusInWindow(this.display)});$_M(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");$_M(c$,"stopMinimization",function(){null!=this.minimizer&&this.minimizer.setProperty("stop",null)});$_M(c$,"clearMinimization",function(){null!=this.minimizer&&this.minimizer.setProperty("clear",null)});$_M(c$,"getMinimizationInfo",function(){return null==this.minimizer?"":this.minimizer.getProperty("log",0)});$_M(c$,"checkMinimization",($fz=function(){this.refreshMeasures(!0);this.global.monitorEnergy&&(this.minimize(0,0,this.getModelUndeletedAtomsBitSet(-1),null,0,!1,!0,!1),this.echoMessage(this.getParameter("_minimizationForceField")+
" Energy = "+this.getParameter("_minimizationEnergy")))},$fz.isPrivate=!0,$fz));$_M(c$,"minimize",function(a,b,c,d,e,f,g,h){var k=this.global.forceField,l=this.getModelUndeletedAtomsBitSetBs(this.getVisibleFramesBitSet());null==c?c=this.getModelUndeletedAtomsBitSet(this.getVisibleFramesBitSet().length()-1):c.and(l);0>=e&&(e=5);d=J.util.BSUtil.copy(null==d?this.selectionManager.getMotionFixedAtoms():d);var m=0<d.cardinality();m&&c.andNot(d);e=this.getAtomsWithinRadius(e,c,!0,null);e.andNot(c);m?d.and(e):
d=e;d.and(l);f&&c.or(this.addHydrogens(c,h,g));if(200<c.cardinality())J.util.Logger.error("Too many atoms for minimization (>200)");else try{g||J.util.Logger.info("Minimizing "+c.cardinality()+" atoms"),this.getMinimizer(!0).minimize(a,b,c,d,m,g,k)}catch(n){if(Clazz.exceptionOf(n,Exception))J.util.Logger.error("Minimization error: "+n.toString());else throw n;}},"~N,~N,J.util.BS,J.util.BS,~N,~B,~B,~B");$_M(c$,"setMotionFixedAtoms",function(a){this.selectionManager.setMotionFixedAtoms(a)},"J.util.BS");
$_M(c$,"getMotionFixedAtoms",function(){return this.selectionManager.getMotionFixedAtoms()});$_M(c$,"rotateArcBall",function(a,b,c){this.transformManager.rotateArcBall(a,b,c);this.refresh(2,this.statusManager.syncingMouse?"Mouse: rotateArcBall "+a+" "+b+" "+c:"")},"~N,~N,~N");$_M(c$,"getAtomicPropertyState",function(a,b,c,d,e){this.getStateCreator().getAtomicPropertyStateBuffer(a,b,c,d,e)},"J.util.SB,~N,J.util.BS,~S,~A");$_M(c$,"getCenterAndPoints",function(a,b){return this.modelSet.getCenterAndPoints(a,
b)},"J.util.JmolList,~B");$_M(c$,"streamFileData",function(a,b,c,d,e){return this.getStateCreator().streamFileData(a,b,c,d,e)},"~S,~S,~S,~N,~A");$_M(c$,"getPdbData",function(a,b,c){return this.modelSet.getPdbData(a,b,this.getSelectionSet(!1),c,null)},"~N,~S,~A");$_M(c$,"getGroupsWithin",function(a,b){return this.modelSet.getGroupsWithin(a,b)},"~N,J.util.BS");$_M(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(Clazz.exceptionOf(a,
Exception))this.executor=null;else if(Clazz.exceptionOf(a,Error))this.executor=null;else throw a;}null==this.executor&&J.util.Logger.error("parallel processing is not available");return this.executor});$_M(c$,"getShapeInfo",function(){return this.shapeManager.getShapeInfo()});$_M(c$,"togglePickingLabel",function(a){null==a&&(a=this.getSelectionSet(!1));this.loadShape(5);this.shapeManager.setShapePropertyBs(5,"toggleLabel",null,a)},"J.util.BS");$_M(c$,"loadShape",function(a){this.shapeManager.loadShape(a)},
"~N");$_M(c$,"setShapeSize",function(a,b,c){null==c&&(c=this.getSelectionSet(!1));this.shapeManager.setShapeSizeBs(a,b,null,c)},"~N,~N,J.util.BS");$_M(c$,"setShapeSizeRD",function(a,b,c){this.shapeManager.setShapeSizeBs(a,0,b,c)},"~N,J.atomdata.RadiusData,J.util.BS");$_M(c$,"setShapeProperty",function(a,b,c){0>a||this.shapeManager.setShapePropertyBs(a,b,c,null)},"~N,~S,~O");$_M(c$,"getShapeProperty",function(a,b){return this.shapeManager.getShapePropertyIndex(a,b,-2147483648)},"~N,~S");$_M(c$,"getShapePropertyData",
function(a,b,c){return this.shapeManager.getShapePropertyData(a,b,c)},"~N,~S,~A");$_M(c$,"getShapePropertyIndex",function(a,b,c){return this.shapeManager.getShapePropertyIndex(a,b,c)},"~N,~S,~N");$_M(c$,"getShapePropertyAsInt",($fz=function(a,b){var c=this.getShapeProperty(a,b);return null==c||!Clazz.instanceOf(c,Integer)?-2147483648:c.intValue()},$fz.isPrivate=!0,$fz),"~N,~S");$_M(c$,"setModelVisibility",function(){null!=this.shapeManager&&this.shapeManager.setModelVisibility()});$_M(c$,"resetShapes",
function(a){this.shapeManager.resetShapes();a&&(this.shapeManager.loadDefaultShapes(this.modelSet),this.clearRepaintManager(-1))},"~B");$_M(c$,"setAtomLabel",function(a,b){this.shapeManager.setAtomLabel(a,b)},"~S,~N");$_M(c$,"deleteShapeAtoms",function(a,b){this.shapeManager.deleteShapeAtoms(a,b)},"~A,J.util.BS");$_M(c$,"resetBioshapes",function(a){this.shapeManager.resetBioshapes(a)},"J.util.BS");$_M(c$,"getAtomShapeValue",function(a,b,c){return this.shapeManager.getAtomShapeValue(a,b,c)},"~N,J.modelset.Group,~N");
$_M(c$,"mergeShapes",function(a){this.shapeManager.mergeShapes(a)},"~A");$_M(c$,"getShapeManager",function(){return this.shapeManager});$_M(c$,"setParallel",function(a){return this.$isParallel=this.global.multiProcessor&&a},"~B");$_M(c$,"isParallel",function(){return this.global.multiProcessor&&this.$isParallel});$_M(c$,"getRenderableBitSet",function(){return this.shapeManager.getRenderableBitSet()});$_M(c$,"setAtomPickingOption",($fz=function(a){this.haveDisplay&&this.actionManager.setAtomPickingOption(a)},
$fz.isPrivate=!0,$fz),"~S");$_M(c$,"setBondPickingOption",($fz=function(a){this.haveDisplay&&this.actionManager.setBondPickingOption(a)},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"undoClear",function(){this.actionStates.clear();this.actionStatesRedo.clear()});$_M(c$,"undoMoveAction",function(a,b){this.getStateCreator().undoMoveAction(a,b)},"~N,~N");$_M(c$,"undoMoveActionClear",function(a,b,c){this.global.preserveState&&this.getStateCreator().undoMoveActionClear(a,b,c)},"~N,~N,~B");$_M(c$,"assignBond",function(a,
b){try{var c=this.modelSet.setBondOrder(a,b);null==c||"0"==b?this.refresh(3,"setBondOrder"):this.addHydrogens(c,!1,!0)}catch(d){if(Clazz.exceptionOf(d,Exception))J.util.Logger.error("assignBond failed");else throw d;}},"~N,~S");$_M(c$,"assignAtom",function(a,b,c){c.equals("X")&&this.setRotateBondIndex(-1);if(this.modelSet.atoms[a].modelIndex==this.modelSet.modelCount-1)if(this.clearModelDependentObjects(),null==b)this.modelSet.assignAtom(a,c,!0),this.modelSet.setAtomNamesAndNumbers(a,-1,null),this.refresh(3,
"assignAtom");else{var d=this.modelSet.atoms[a],e=J.util.BSUtil.newAndSetBit(a);b=[b];var f=new J.util.JmolList;f.addLast(d);try{e=this.addHydrogensInline(e,f,b),a=e.nextSetBit(0),this.modelSet.assignAtom(a,c,!1)}catch(g){if(!Clazz.exceptionOf(g,Exception))throw g;}this.modelSet.setAtomNamesAndNumbers(a,-1,null)}},"~N,J.util.P3,~S");$_M(c$,"assignConnect",function(a,b){this.clearModelDependentObjects();var c=J.util.ArrayUtil.newFloat2(1);c[0]=[a,b];this.modelSet.connect(c);this.modelSet.assignAtom(a,
".",!0);this.modelSet.assignAtom(b,".",!0);this.refresh(3,"assignConnect")},"~N,~N");$_M(c$,"moveAtomWithHydrogens",function(a,b,c,d,e){this.stopMinimization();if(null==e){var f=this.modelSet.atoms[a];e=J.util.BSUtil.newAndSetBit(a);a=f.getBonds();if(null!=a)for(var g=0;g<a.length;g++){var h=a[g].getOtherAtom(f);1==h.getElementNumber()&&e.set(h.index)}}this.moveSelected(b,c,d,-2147483648,-2147483648,e,!0,!0)},"~N,~N,~N,~N,J.util.BS");c$.getInlineData=$_M(c$,"getInlineData",function(a,b,c){J.viewer.DataManager.getInlineData(a,
b,c,null)},"J.util.SB,~S,~B");$_M(c$,"isAtomPDB",function(a){return this.modelSet.isAtomPDB(a)},"~N");$_M(c$,"isModelPDB",function(a){return this.modelSet.models[a].isBioModel},"~N");$_M(c$,"isAtomAssignable",function(a){return this.modelSet.isAtomAssignable(a)},"~N");Clazz.overrideMethod(c$,"deleteMeasurement",function(a){this.setShapeProperty(6,"delete",Integer.$valueOf(a))},"~N");$_M(c$,"haveModelKit",function(){return this.modelSet.haveModelKit()});$_M(c$,"getModelKitStateBitSet",function(a,b){return this.modelSet.getModelKitStateBitset(a,
b)},"J.util.BS,J.util.BS");$_M(c$,"getSmiles",function(a,b,c,d,e,f,g){var h=this.modelSet.atoms;null==c&&(0>a||0>b?c=this.getSelectionSet(!0):(d&&(a>b&&(c=a,a=b,b=c),a=h[a].getGroup().firstAtomIndex,b=h[b].getGroup().lastAtomIndex),c=new J.util.BS,c.setBits(a,b+1)));a=g?J.viewer.Viewer.getJmolVersion()+" "+this.getModelName(this.getCurrentModelIndex()):null;return this.getSmilesMatcher().getSmiles(h,this.getAtomCount(),c,d,e,f,a)},"~N,~N,J.util.BS,~B,~B,~B,~B");$_M(c$,"connect",function(a){this.modelSet.connect(a)},
"~A");$_M(c$,"prompt",function(a,b,c,d){return this.$isKiosk?"null":this.apiPlatform.prompt(a,b,c,d)},"~S,~S,~A,~B");$_M(c$,"getColorEncoder",function(a){return this.colorManager.getColorEncoder(a)},"~S");$_M(c$,"displayBonds",function(a,b){this.modelSet.displayBonds(a,b)},"J.modelset.Bond.BondSet,~B");$_M(c$,"getModelAtomProperty",function(a,b){return this.modelSet.getModelAtomProperty(a,b)},"J.modelset.Atom,~S");$_M(c$,"setStateScriptVersion",function(a){if(null!=a){a=J.util.Parser.getTokens(a.$replace(".",
" ").$replace("_"," "));try{var b=J.util.Parser.parseInt(a[0]),c=J.util.Parser.parseInt(a[1]),d=J.util.Parser.parseInt(a[2]);-2147483648==d&&(d=0);if(-2147483648!=b&&-2147483648!=c){this.stateScriptVersionInt=1E4*b+100*c+d;this.global.legacyAutoBonding=110924>this.stateScriptVersionInt;return}}catch(e){if(!Clazz.exceptionOf(e,Exception))throw e;}}this.setBooleanProperty("legacyautobonding",!1);this.stateScriptVersionInt=2147483647},"~S");$_M(c$,"initializeExporter",function(a,b){if(null!=this.jsExporter3D)return this.jsExporter3D.initializeOutput(a,
this,this.privateKey,this.gdata,null),this.jsExporter3D;var c=a.equals("JS"),d=null==b?new J.util.SB:b,e=null;try{e=Class.forName(c?"J.exportjs.Export3D":"J.export.Export3D").newInstance()}catch(f){if(Clazz.exceptionOf(f,Exception))return null;throw f;}d=e.initializeExporter(a,this,this.privateKey,this.gdata,d);c&&null!=d&&(this.jsExporter3D=e);return null==d?null:e},"~S,~S");$_M(c$,"setPrivateKeyForShape",function(a){this.setShapeProperty(a,"privateKey",Double.$valueOf(this.privateKey))},"~N");$_M(c$,
"getMouseEnabled",function(){return this.refreshing&&!this.creatingImage});$_M(c$,"setZslabPoint",function(a){this.transformManager.setZslabPoint(a)},"J.util.P3");Clazz.overrideMethod(c$,"calcAtomsMinMax",function(a,b){this.modelSet.calcAtomsMinMax(a,b)},"J.util.BS,J.util.BoxInfo");$_M(c$,"getObjectMap",function(a,b){switch(b){case "{":if(null!=this.getScriptManager()){var c=this.eval.getDefinedAtomSets();null!=c&&a.putAll(c);J.script.T.getTokensType(a,3145728)}break;case "$":case "0":this.shapeManager.getObjectMap(a,
"$"==b)}},"java.util.Map,~S");$_M(c$,"getPdbBondInfo",function(a){null==this.htPdbBondInfo&&(this.htPdbBondInfo=new java.util.Hashtable);var b=this.htPdbBondInfo.get(a);if(null!=b)return b;b=J.viewer.JC.getPdbBondInfo(J.modelset.Group.lookupGroupID(a));this.htPdbBondInfo.put(a,b);return b},"~S");$_M(c$,"setPicked",function(a){this.global.setPicked(a)},"~N");Clazz.overrideMethod(c$,"runScript",function(a){var b=new J.util.SB;try{if(null==this.getScriptManager())return null;this.eval.runScriptBuffer(a,
b)}catch(c){if(Clazz.exceptionOf(c,Exception))return this.eval.getErrorMessage();throw c;}return b.toString()},"~S");$_M(c$,"allowSpecAtom",function(){return this.modelSet.allowSpecAtom()});$_M(c$,"setFrameDelayMs",function(a){this.modelSet.setFrameDelayMs(a,this.getVisibleFramesBitSet())},"~N");$_M(c$,"getFrameDelayMs",function(a){return this.modelSet.getFrameDelayMs(a)},"~N");$_M(c$,"getBaseModelBitSet",function(){return this.modelSet.getModelAtomBitSetIncludingDeleted(this.getJDXBaseModelIndex(this.getCurrentModelIndex()),
!0)});$_M(c$,"getTimeouts",function(){return this.timeouts});$_M(c$,"clearTimeouts",function(){null!=this.timeouts&&J.thread.TimeoutThread.clear(this.timeouts)});$_M(c$,"setTimeout",function(a,b,c){this.haveDisplay&&(!this.isHeadless()&&!this.autoExit)&&(null==a?this.clearTimeouts():(null==this.timeouts&&(this.timeouts=new java.util.Hashtable),J.thread.TimeoutThread.setTimeout(this,this.timeouts,a,b,c)))},"~S,~N,~S");$_M(c$,"triggerTimeout",function(a){this.haveDisplay&&null!=this.timeouts&&J.thread.TimeoutThread.trigger(this.timeouts,
a)},"~S");$_M(c$,"clearTimeout",function(a){this.setTimeout(a,0,null)},"~S");$_M(c$,"showTimeout",function(a){return this.haveDisplay?J.thread.TimeoutThread.showTimeout(this.timeouts,a):""},"~S");$_M(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)},"J.util.BS");$_M(c$,"cachePut",function(a,b){this.fileManager.cachePut(a,
b)},"~S,~O");$_M(c$,"cacheGet",function(a){return this.fileManager.cacheGet(a,!1)},"~S");$_M(c$,"cacheClear",function(){this.fileManager.cacheClear();this.fileManager.clearPngjCache(null)});$_M(c$,"setCurrentModelID",function(a){var b=this.getCurrentModelIndex();0<=b&&this.modelSet.setModelAuxiliaryInfo(b,"modelID",a)},"~S");$_M(c$,"setCentroid",function(a,b,c){this.modelSet.setCentroid(a,b,c)},"~N,~N,~A");$_M(c$,"getPathForAllFiles",function(){return this.fileManager.getPathForAllFiles()});Clazz.overrideMethod(c$,
"cacheFile",function(a,b){this.fileManager.cachePut(a,b)},"~S,~A");$_M(c$,"cacheFileByName",function(a,b){return this.fileManager.cacheFileByNameAdd(a,b)},"~S,~B");$_M(c$,"cacheList",function(){return this.fileManager.cacheList()});$_M(c$,"stopScriptDelayThread",($fz=function(){null!=this.scriptDelayThread&&(this.scriptDelayThread.interrupt(),this.scriptDelayThread=null)},$fz.isPrivate=!0,$fz));$_M(c$,"delayScript",function(a,b){this.autoExit||(this.stopScriptDelayThread(),this.scriptDelayThread=
new J.thread.ScriptDelayThread(a,this,b),this.scriptDelayThread.run())},"J.api.JmolScriptEvaluator,~N");$_M(c$,"clearThreads",function(){this.stopScriptDelayThread();this.stopMinimization();this.setVibrationOff();this.setSpinOn(!1);this.setNavOn(!1);this.setAnimationOn(!1)});$_M(c$,"getEvalContextAndHoldQueue",function(a){if(null==a||!this.isJS)return null;a.pushContextDown();for(var b=a=a.getThisContext();null!=b;)b.mustResumeEval=!0,b=b.parentContext;this.queueOnHold=a.isJSThread=!0;return a},"J.api.JmolScriptEvaluator");
$_M(c$,"checkInheritedShapes",function(){this.shapeManager.checkInheritedShapes()});Clazz.overrideMethod(c$,"resizeInnerPanel",function(a,b){return this.autoExit||!this.haveDisplay?(this.setScreenDimension(a,b),this.dimScreen):this.statusManager.resizeInnerPanel(a,b)},"~N,~N");$_M(c$,"getFontLineShapeState",function(a,b,c){return this.getStateCreator().getFontLineShapeState(a,b,c)},"~S,~S,~A");$_M(c$,"getShapeSetState",function(a,b,c,d,e,f,g){this.getStateCreator().getShapeSetState(a,b,c,d,e,f,g)},
"J.shape.AtomShape,J.shape.Shape,~N,~A,J.util.BS,java.util.Map,java.util.Map");$_M(c$,"getMeasurementState",function(a,b,c,d,e){return this.getStateCreator().getMeasurementState(a,b,c,d,e)},"J.shape.AtomShape,J.util.JmolList,~N,J.util.JmolFont,J.modelset.TickInfo");$_M(c$,"getBondState",function(a,b,c){return this.getStateCreator().getBondState(a,b,c)},"J.shape.Shape,J.util.BS,~B");$_M(c$,"getAtomShapeSetState",function(a,b){return this.getStateCreator().getAtomShapeSetState(a,b)},"J.shape.Shape,~A");
$_M(c$,"getShapeState",function(a){return this.getStateCreator().getShapeState(a)},"J.shape.Shape");$_M(c$,"getAtomShapeState",function(a){return this.getStateCreator().getAtomShapeState(a)},"J.shape.AtomShape");$_M(c$,"getDefaultPropertyParam",function(a){return this.getPropertyManager().getDefaultPropertyParam(a)},"~N");$_M(c$,"getPropertyNumber",function(a){return this.getPropertyManager().getPropertyNumber(a)},"~S");$_M(c$,"checkPropertyParameter",function(a){return this.getPropertyManager().checkPropertyParameter(a)},
"~S");$_M(c$,"extractProperty",function(a,b,c){return this.getPropertyManager().extractProperty(a,b,c)},"~O,~A,~N");$_M(c$,"addHydrogens",function(a,b,c){var d=null==a;null==a&&(a=this.getModelUndeletedAtomsBitSet(this.getVisibleFramesBitSet().length()-1));var e=new J.util.BS;if(0==a.cardinality()||this.modelSet.atoms[a.nextSetBit(0)].modelIndex!=this.modelSet.modelCount-1)return e;var f=new J.util.JmolList,d=this.getAdditionalHydrogens(a,d,!1,f),g=!1,g=this.global.appendNew;if(0<d.length){this.clearModelDependentObjects();
try{e=b?this.modelSet.addHydrogens(f,d):this.addHydrogensInline(a,f,d)}catch(h){if(Clazz.exceptionOf(h,Exception))System.out.println(h.toString());else throw h;}g&&this.setAppendNew(!0)}c||this.scriptStatus(J.i18n.GT._("{0} hydrogens added",d.length));return e},"J.util.BS,~B,~B");$_M(c$,"addHydrogensInline",($fz=function(a,b,c){return null==this.getScriptManager()?null:this.eval.addHydrogensInline(a,b,c)},$fz.isPrivate=!0,$fz),"J.util.BS,J.util.JmolList,~A");Clazz.overrideMethod(c$,"evalFunctionFloat",
function(a,b,c){return null==this.getScriptManager()?0:this.eval.evalFunctionFloat(a,b,c)},"~O,~O,~A");$_M(c$,"evalParallel",function(a,b){this.displayLoadErrors=!1;var c=null!=this.getScriptManager()&&this.eval.evaluateParallel(a,null==b?this.shapeManager:b);this.displayLoadErrors=!0;return c},"J.script.ScriptContext,J.viewer.ShapeManager");Clazz.overrideMethod(c$,"evaluateExpression",function(a){return null==this.getScriptManager()?null:this.eval.evaluateExpression(a,!1)},"~O");$_M(c$,"evaluateExpressionAsVariable",
function(a){return null==this.getScriptManager()?null:this.eval.evaluateExpression(a,!0)},"~O");$_M(c$,"getAtomBitSet",function(a){if(Clazz.instanceOf(a,J.util.BS))return a;this.getScriptManager();return this.getAtomBitSetEval(this.eval,a)},"~O");$_M(c$,"getAtomBitSetVector",function(a){return null==this.getScriptManager()?null:this.eval.getAtomBitSetVector(this.getAtomCount(),a)},"~O");$_M(c$,"getContextVariables",function(){return null==this.getScriptManager()?null:this.eval.getContextVariables()});
$_M(c$,"getScriptContext",function(){return null==this.getScriptManager()?null:this.eval.getScriptContext()});Clazz.overrideMethod(c$,"getAtomDefs",function(a){return this.getStateCreator().getAtomDefs(a)},"java.util.Map");$_M(c$,"createModels",function(a){this.modelSet.createModels(a)},"~N");$_M(c$,"setCGO",function(a){this.shapeManager.loadShape(23);this.shapeManager.setShapePropertyBs(23,"setCGO",a,null)},"J.util.JmolList");Clazz.pu$h();c$=Clazz.declareType(J.viewer.Viewer,"ACCESS",Enum);Clazz.defineEnumConstant(c$,
"NONE",0,[]);Clazz.defineEnumConstant(c$,"READSPT",1,[]);Clazz.defineEnumConstant(c$,"ALL",2,[]);c$=Clazz.p0p();Clazz.defineStatics(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");Clazz.defineStatics(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;Clazz.defineStatics(c$,"nProcessors",1)}),Clazz.load(null,"java.io.InputStream",["java.io.IOException","java.lang.IndexOutOfBoundsException","$.NullPointerException"],function(){c$=Clazz.declareType(java.io,"InputStream");$_M(c$,"read",function(a,b,c){if(null==a)throw new NullPointerException;if(0>b||0>c||c>a.length-b)throw new IndexOutOfBoundsException;if(0==c)return 0;var d=this.readByteAsInt();if(-1==d)return-1;
a[b]=d;var e=1;try{for(;e<c;e++){d=this.readByteAsInt();if(-1==d)break;a[b+e]=d}}catch(f){if(!Clazz.exceptionOf(f,java.io.IOException))throw f;}return e},"~A,~N,~N");$_M(c$,"skip",function(a){var b=a,c;null==java.io.InputStream.skipBuffer&&($t$=java.io.InputStream.skipBuffer=Clazz.newByteArray(2048,0),java.io.InputStream.prototype.skipBuffer=java.io.InputStream.skipBuffer,$t$);var d=java.io.InputStream.skipBuffer;if(0>=a)return 0;for(;0<b;){c=this.read(d,0,Math.min(2048,b));if(0>c)break;b-=c}return a-
b},"~N");$_M(c$,"available",function(){return 0});$_M(c$,"close",function(){});$_M(c$,"mark",function(){},"~N");$_M(c$,"reset",function(){throw new java.io.IOException("mark/reset not supported");});$_M(c$,"markSupported",function(){return!1});Clazz.defineStatics(c$,"SKIP_BUFFER_SIZE",2048,"skipBuffer",null)}),Clazz.load(["java.io.Closeable","$.Flushable"],"java.io.OutputStream",["java.lang.IndexOutOfBoundsException","$.NullPointerException"],function(){c$=Clazz.declareType(java.io,"OutputStream",
null,[java.io.Closeable,java.io.Flushable]);$_M(c$,"write",function(a,b,c){if(null==a)throw new NullPointerException;if(0>b||b>a.length||0>c||b+c>a.length||0>b+c)throw new IndexOutOfBoundsException;if(0!=c)for(var d=0;d<c;d++)this.writeByteAsInt(a[b+d])},"~A,~N,~N");Clazz.overrideMethod(c$,"flush",function(){});Clazz.overrideMethod(c$,"close",function(){})}),Clazz.load(["java.io.OutputStream"],"java.io.FilterOutputStream",["java.lang.IndexOutOfBoundsException"],function(){c$=Clazz.decorateAsClass(function(){this.out=
null;Clazz.instantialize(this,arguments)},java.io,"FilterOutputStream",java.io.OutputStream);Clazz.makeConstructor(c$,function(a){Clazz.superConstructor(this,java.io.FilterOutputStream,[]);this.out=a},"java.io.OutputStream");$_M(c$,"writeByteAsInt",function(a){this.out.writeByteAsInt(a)},"~N");$_M(c$,"write",function(a,b,c){if(0>(b|c|a.length-(c+b)|b+c))throw new IndexOutOfBoundsException;for(var d=0;d<c;d++)this.writeByteAsInt(a[b+d])},"~A,~N,~N");$_M(c$,"flush",function(){this.out.flush()});$_M(c$,
"close",function(){try{this.flush()}catch(a){if(!Clazz.exceptionOf(a,java.io.IOException))throw a;}this.out.close()})}),$_L(["java.io.FilterOutputStream"],"java.io.BufferedOutputStream",["java.lang.ArrayIndexOutOfBoundsException","$.IllegalArgumentException","$.NullPointerException"],function(){c$=$_C(function(){this.buf=null;this.count=0;$_Z(this,arguments)},java.io,"BufferedOutputStream",java.io.FilterOutputStream);$_K(c$,function(a){$_R(this,java.io.BufferedOutputStream,[a]);this.buf=$_A(8192,
0)},"java.io.OutputStream");$_K(c$,function(a,b){$_R(this,java.io.BufferedOutputStream,[a]);if(0>=b)throw new IllegalArgumentException("K0058");this.buf=$_A(b,0)},"java.io.OutputStream,~N");$_V(c$,"flush",function(){0<this.count&&this.out.write(this.buf,0,this.count);this.count=0;this.out.flush()});$_M(c$,"write",function(a,b,c){if(null==a)throw new NullPointerException("K0047");if(0>b||b>a.length-c||0>c)throw new ArrayIndexOutOfBoundsException("K002f");if(0==this.count&&c>=this.buf.length)this.out.write(a,
b,c);else{var d=this.buf.length-this.count;c<d&&(d=c);0<d&&(System.arraycopy(a,b,this.buf,this.count,d),this.count+=d);this.count==this.buf.length&&(this.out.write(this.buf,0,this.buf.length),this.count=0,c>d&&(b+=d,d=c-d,d>=this.buf.length?this.out.write(a,b,d):(System.arraycopy(a,b,this.buf,this.count,d),this.count+=d)))}},"~A,~N,~N");$_M(c$,"write",function(a){this.count==this.buf.length&&(this.out.write(this.buf,0,this.count),this.count=0);this.buf[this.count++]=a},"~N")}),Clazz.load(["java.io.Closeable"],
"java.io.Reader",["java.io.IOException","java.lang.IllegalArgumentException","$.NullPointerException"],function(){c$=Clazz.decorateAsClass(function(){this.skipBuffer=this.lock=null;Clazz.instantialize(this,arguments)},java.io,"Reader",null,java.io.Closeable);Clazz.makeConstructor(c$,function(a){if(null==a)throw new NullPointerException;this.lock=a},"~O");$_M(c$,"skip",function(a){if(0>a)throw new IllegalArgumentException("skip value is negative");var b=Math.min(a,8192);if(null==this.skipBuffer||this.skipBuffer.length<
b)this.skipBuffer=Clazz.newCharArray(b,"\x00");for(var c=a;0<c;){var d=this.read(this.skipBuffer,0,Math.min(c,b));if(-1==d)break;c-=d}return a-c},"~N");$_M(c$,"ready",function(){return!1});$_M(c$,"markSupported",function(){return!1});$_M(c$,"mark",function(){throw new java.io.IOException("mark() not supported");},"~N");$_M(c$,"reset",function(){throw new java.io.IOException("reset() not supported");});Clazz.defineStatics(c$,"maxSkipBufferSize",8192)}),Clazz.load(["java.io.Reader"],"java.io.BufferedReader",
["java.io.IOException","java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","J.util.SB"],function(){c$=Clazz.decorateAsClass(function(){this.cb=this.$in=null;this.nextChar=this.nChars=0;this.markedChar=-1;this.readAheadLimit=0;this.markedSkipLF=this.skipLF=!1;Clazz.instantialize(this,arguments)},java.io,"BufferedReader",java.io.Reader);$_M(c$,"setSize",($fz=function(a){if(0>=a)throw new IllegalArgumentException("Buffer size <= 0");this.cb=Clazz.newCharArray(a,"\x00");this.nextChar=this.nChars=
0},$fz.isPrivate=!0,$fz),"~N");Clazz.makeConstructor(c$,function(a){Clazz.superConstructor(this,java.io.BufferedReader,[a]);this.$in=a;this.setSize(java.io.BufferedReader.defaultCharBufferSize)},"java.io.Reader");$_M(c$,"ensureOpen",($fz=function(){if(null==this.$in)throw new java.io.IOException("Stream closed");},$fz.isPrivate=!0,$fz));$_M(c$,"fill",($fz=function(){var a;if(-1>=this.markedChar)a=0;else{var b=this.nextChar-this.markedChar;b>=this.readAheadLimit?(this.markedChar=-2,a=this.readAheadLimit=
0):(this.readAheadLimit<=this.cb.length?System.arraycopy(this.cb,this.markedChar,this.cb,0,b):(a=Clazz.newCharArray(this.readAheadLimit,"\x00"),System.arraycopy(this.cb,this.markedChar,a,0,b),this.cb=a),this.markedChar=0,this.nextChar=this.nChars=a=b)}do b=this.$in.read(this.cb,a,this.cb.length-a);while(0==b);0<b&&(this.nChars=a+b,this.nextChar=a)},$fz.isPrivate=!0,$fz));$_M(c$,"read1",($fz=function(a,b,c){if(this.nextChar>=this.nChars){if(c>=this.cb.length&&-1>=this.markedChar&&!this.skipLF)return this.$in.read(a,
b,c);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;c=Math.min(c,this.nChars-this.nextChar);System.arraycopy(this.cb,this.nextChar,a,b,c);this.nextChar+=c;return c},$fz.isPrivate=!0,$fz),"~A,~N,~N");$_M(c$,"read",function(a,b,c){this.ensureOpen();if(0>b||b>a.length||0>c||b+c>a.length||0>b+c)throw new IndexOutOfBoundsException;if(0==c)return 0;var d=
this.read1(a,b,c);if(0>=d)return d;for(;d<c&&this.$in.ready();){var e=this.read1(a,b+d,c-d);if(0>=e)break;d+=e}return d},"~A,~N,~N");$_M(c$,"readLine1",($fz=function(a){var b=null,c;this.ensureOpen();for(var d=a||this.skipLF;;){this.nextChar>=this.nChars&&this.fill();if(this.nextChar>=this.nChars)return null!=b&&0<b.length()?b.toString():null;var e=!1;a=String.fromCharCode(0);var f;d&&"\n"==this.cb[this.nextChar]&&this.nextChar++;d=this.skipLF=!1;f=this.nextChar;a:for(;f<this.nChars;f++)if(a=this.cb[f],
"\n"==a||"\r"==a){e=!0;break a}c=this.nextChar;this.nextChar=f;if(e)return null==b?b=String.instantialize(this.cb,c,f-c):(b.appendCB(this.cb,c,f-c),b=b.toString()),this.nextChar++,"\r"==a&&(this.skipLF=!0),b;null==b&&(b=J.util.SB.newN(java.io.BufferedReader.defaultExpectedLineLength));b.appendCB(this.cb,c,f-c)}},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"readLine",function(){return this.readLine1(!1)});Clazz.overrideMethod(c$,"skip",function(a){if(0>a)throw new IllegalArgumentException("skip value is negative");
this.ensureOpen();for(var b=a;0<b;){this.nextChar>=this.nChars&&this.fill();if(this.nextChar>=this.nChars)break;this.skipLF&&(this.skipLF=!1,"\n"==this.cb[this.nextChar]&&this.nextChar++);var c=this.nChars-this.nextChar;if(b<=c){this.nextChar+=b;b=0;break}b-=c;this.nextChar=this.nChars}return a-b},"~N");$_M(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()});Clazz.overrideMethod(c$,"markSupported",function(){return!0});Clazz.overrideMethod(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");Clazz.overrideMethod(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});$_M(c$,"close",function(){null!=this.$in&&(this.$in.close(),this.cb=this.$in=null)});Clazz.defineStatics(c$,"INVALIDATED",-2,"UNMARKED",-1,"defaultCharBufferSize",8192,"defaultExpectedLineLength",80)}),$_L(["java.io.Closeable","$.Flushable","java.lang.Appendable"],"java.io.Writer",["java.lang.NullPointerException","$.StringIndexOutOfBoundsException"],function(){c$=$_C(function(){this.lock=null;$_Z(this,arguments)},java.io,"Writer",null,
[Appendable,java.io.Closeable,java.io.Flushable]);$_K(c$,function(){this.lock=this});$_K(c$,function(a){if(null!=a)this.lock=a;else throw new NullPointerException;},"~O");$_M(c$,"write",function(a){this.write(a,0,a.length)},"~A");$_M(c$,"write",function(a){var b=$_A(1,"\x00");b[0]=String.fromCharCode(a);this.write(b)},"~N");$_M(c$,"write",function(a){var b=$_A(a.length,"\x00");a.getChars(0,b.length,b,0);this.write(b)},"~S");$_M(c$,"write",function(a,b,c){if(0<=c){var d=$_A(c,"\x00");a.getChars(b,
b+c,d,0);this.write(d)}else throw new StringIndexOutOfBoundsException;},"~S,~N,~N");$_M(c$,"append",function(a){this.write(a.charCodeAt(0));return this},"~N");$_M(c$,"append",function(a){null==a?this.write("null"):this.write(a.toString());return this},"CharSequence");$_M(c$,"append",function(a,b,c){null==a?this.write("null".substring(b,c)):this.write(a.subSequence(b,c).toString());return this},"CharSequence,~N,~N");$_S(c$,"TOKEN_NULL","null")}),$_L(["java.io.Writer"],"java.io.BufferedWriter",["java.io.IOException",
"java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","$.StringIndexOutOfBoundsException"],function(){c$=$_C(function(){this.buf=this.out=null;this.pos=0;this.lineSeparator="\r\n";$_Z(this,arguments)},java.io,"BufferedWriter",java.io.Writer);$_K(c$,function(a){$_R(this,java.io.BufferedWriter,[a]);this.out=a;this.buf=$_A(8192,"\x00")},"java.io.Writer");$_K(c$,function(a,b){$_R(this,java.io.BufferedWriter,[a]);if(0<b)this.out=a,this.buf=$_A(b,"\x00");else throw new IllegalArgumentException("K0058");
},"java.io.Writer,~N");$_M(c$,"close",function(){this.isOpen()&&(this.flush(),this.out.close(),this.out=this.buf=null)});$_M(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");});$_M(c$,"isOpen",($fz=function(){return null!=this.out},$fz.isPrivate=!0,$fz));$_M(c$,"newLine",function(){this.write("\r\n",0,2)});$_M(c$,"write",function(a,b,c){if(!this.isOpen())throw new java.io.IOException("K005d");
if(0>b||b>a.length-c||0>c)throw new IndexOutOfBoundsException;if(0==this.pos&&c>=this.buf.length)this.out.write(a,b,c);else{var d=this.buf.length-this.pos;c<d&&(d=c);0<d&&(System.arraycopy(a,b,this.buf,this.pos,d),this.pos+=d);this.pos==this.buf.length&&(this.out.write(this.buf,0,this.buf.length),this.pos=0,c>d&&(b+=d,d=c-d,d>=this.buf.length?this.out.write(a,b,d):(System.arraycopy(a,b,this.buf,this.pos,d),this.pos+=d)))}},"~A,~N,~N");$_M(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");$_M(c$,"write",function(a,b,c){if(!this.isOpen())throw new java.io.IOException("K005d");if(!(0>=c)){if(b>a.length-c||0>b)throw new StringIndexOutOfBoundsException;if(0==this.pos&&c>=this.buf.length){var d=$_A(c,"\x00");a.getChars(b,b+c,d,0);this.out.write(d,0,c)}else{var e=this.buf.length-this.pos;c<e&&(e=c);0<e&&(a.getChars(b,b+e,this.buf,this.pos),
this.pos+=e);this.pos==this.buf.length&&(this.out.write(this.buf,0,this.buf.length),this.pos=0,c>e&&(b+=e,e=c-e,e>=this.buf.length?(d=$_A(c,"\x00"),a.getChars(b,b+e,d,0),this.out.write(d,0,e)):(a.getChars(b,b+e,this.buf,this.pos),this.pos+=e)))}}},"~S,~N,~N")}),Clazz.load(["java.io.Reader"],"java.io.StringReader",["java.io.IOException","java.lang.IllegalArgumentException","$.IndexOutOfBoundsException"],function(){c$=Clazz.decorateAsClass(function(){this.str=null;this.$mark=this.next=this.length=0;
Clazz.instantialize(this,arguments)},java.io,"StringReader",java.io.Reader);Clazz.makeConstructor(c$,function(a){Clazz.superConstructor(this,java.io.StringReader,[a]);this.str=a;this.length=a.length},"~S");$_M(c$,"ensureOpen",($fz=function(){if(null==this.str)throw new java.io.IOException("Stream closed");},$fz.isPrivate=!0,$fz));Clazz.overrideMethod(c$,"read",function(a,b,c){this.ensureOpen();if(0>b||b>a.length||0>c||b+c>a.length||0>b+c)throw new IndexOutOfBoundsException;if(0==c)return 0;if(this.next>=
this.length)return-1;c=Math.min(this.length-this.next,c);this.str.getChars(this.next,this.next+c,a,b);this.next+=c;return c},"~A,~N,~N");Clazz.overrideMethod(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");Clazz.overrideMethod(c$,"ready",function(){this.ensureOpen();return!0});Clazz.overrideMethod(c$,"markSupported",function(){return!0});Clazz.overrideMethod(c$,"mark",function(a){if(0>
a)throw new IllegalArgumentException("Read-ahead limit < 0");this.ensureOpen();this.$mark=this.next},"~N");Clazz.overrideMethod(c$,"reset",function(){this.ensureOpen();this.next=this.$mark});Clazz.overrideMethod(c$,"close",function(){this.str=null})}),$_L(null,"java.lang.Thread",["java.lang.IllegalArgumentException","$.ThreadGroup","java.util.Date"],function(){c$=$_C(function(){this.name=this.group=this.target=null;this.priority=0;$_Z(this,arguments)},java.lang,"Thread",null,Runnable);c$.currentThread=
$_M(c$,"currentThread",function(){null==Thread.J2S_THREAD&&($t$=Thread.J2S_THREAD=new Thread,Thread.prototype.J2S_THREAD=Thread.J2S_THREAD,$t$);return Thread.J2S_THREAD});c$.sleep=$_M(c$,"sleep",function(){Clazz.alert("Thread.sleep is not implemented in Java2Script!")},"~N");$_K(c$,function(){});$_K(c$,function(a){this.init(null,a,"Thread-"+(new java.util.Date).getTime()+Math.random(),0)},"Runnable");$_K(c$,function(a,b){this.init(a,b,"Thread-"+(new java.util.Date).getTime()+Math.random(),0)},"ThreadGroup,Runnable");
$_K(c$,function(a){this.init(null,null,a,0)},"~S");$_K(c$,function(a,b){this.init(a,null,b,0)},"ThreadGroup,~S");$_K(c$,function(a,b){this.init(null,a,b,0)},"Runnable,~S");$_K(c$,function(a,b,c){this.init(a,b,c,0)},"ThreadGroup,Runnable,~S");$_K(c$,function(a,b,c,d){this.init(a,b,c,d)},"ThreadGroup,Runnable,~S,~N");$_M(c$,"init",($fz=function(a,b,c){null==a&&(a=new ThreadGroup);this.group=a;this.target=b;this.name=c;this.priority=5},$fz.isPrivate=!0,$fz),"ThreadGroup,Runnable,~S,~N");$_M(c$,"start",
function(){window.setTimeout(function(a){return function(){a.run()}}(this),0)});$_M(c$,"run",function(){null!=this.target&&this.target.run()});$_M(c$,"setPriority",function(a){if(10<a||1>a)throw new IllegalArgumentException;this.priority=a},"~N");$_M(c$,"getPriority",function(){return this.priority});$_M(c$,"interrupt",function(){});$_M(c$,"setName",function(a){this.name=a},"~S");$_M(c$,"getName",function(){return String.valueOf(this.name)});$_M(c$,"getThreadGroup",function(){return this.group});
$_V(c$,"toString",function(){var a=this.getThreadGroup();return null!=a?"Thread["+this.getName()+","+this.getPriority()+","+a.getName()+"]":"Thread["+this.getName()+","+this.getPriority()+",]"});$_S(c$,"MIN_PRIORITY",1,"NORM_PRIORITY",5,"MAX_PRIORITY",10,"J2S_THREAD",null)}),Clazz.declarePackage("J.constant"),Clazz.load(["java.lang.Enum"],"J.constant.EnumQuantumShell",["J.util.SB"],function(){c$=Clazz.decorateAsClass(function(){this.tag2=this.tag=null;this.idSpherical=this.id=0;Clazz.instantialize(this,
arguments)},J.constant,"EnumQuantumShell",Enum);Clazz.makeConstructor(c$,($fz=function(a,b,c,d){this.tag=a;this.tag2=b;this.id=c;this.idSpherical=d},$fz.isPrivate=!0,$fz),"~S,~S,~N,~N");c$.getNewDfCoefMap=$_M(c$,"getNewDfCoefMap",function(){return[Clazz.newIntArray(1,0),Clazz.newIntArray(3,0),Clazz.newIntArray(4,0),Clazz.newIntArray(5,0),Clazz.newIntArray(6,0),Clazz.newIntArray(7,0),Clazz.newIntArray(10,0)]});c$.getQuantumShellTagID=$_M(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=$_M(c$,"getQuantumShell",($fz=function(a){for(var b,c=0,d=J.constant.EnumQuantumShell.values();c<d.length&&((b=d[c])||1);c++)if(b.tag.equals(a)||b.tag2.equals(a))return b;return null},$fz.isPrivate=!0,$fz),"~S");c$.getQuantumShellTagIDSpherical=$_M(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=$_M(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}return null},"~N");c$.getQuantumShellTag=$_M(c$,"getQuantumShellTag",function(a){for(var b,c=0,d=J.constant.EnumQuantumShell.values();c<d.length&&((b=d[c])||1);c++)if(b.id==a)return b.tag;return""+a},"~N");c$.getMOString=$_M(c$,"getMOString",function(a){var b=new J.util.SB;if(2==a.length)return""+Clazz.floatToInt(0>a[0]?-a[1]:a[1]);b.appendC("[");for(var c=0;c<a.length;c+=2)0<c&&b.append(", "),
b.appendF(a[c]).append(" ").appendI(Clazz.floatToInt(a[c+1]));b.appendC("]");return b.toString()},"~A");c$.SUPPORTED_BASIS_FUNCTIONS="SPLDF";Clazz.defineEnumConstant(c$,"S",0,["S","S",0,0]);Clazz.defineEnumConstant(c$,"P",1,["P","X",1,1]);Clazz.defineEnumConstant(c$,"SP",2,["SP","SP",2,2]);Clazz.defineEnumConstant(c$,"D_SPHERICAL",3,["5D","5D",3,3]);Clazz.defineEnumConstant(c$,"D_CARTESIAN",4,["D","XX",4,3]);Clazz.defineEnumConstant(c$,"F_SPHERICAL",5,["7F","7F",5,5]);Clazz.defineEnumConstant(c$,
"F_CARTESIAN",6,["F","XXX",6,5]);Clazz.defineEnumConstant(c$,"G_SPHERICAL",7,["9G","9G",7,7]);Clazz.defineEnumConstant(c$,"G_CARTESIAN",8,["G","XXXX",8,7]);Clazz.defineEnumConstant(c$,"H_SPHERICAL",9,["10H","10H",9,9]);Clazz.defineEnumConstant(c$,"H_CARTESIAN",10,["H","XXXXX",10,9])}),Clazz.declarePackage("J.api"),Clazz.load(["J.constant.EnumQuantumShell"],"J.api.JmolAdapter",["java.util.Hashtable","J.api.JmolViewer","J.modelset.Group","J.util.Elements","J.viewer.JC"],function(){c$=Clazz.decorateAsClass(function(){this.adapterName=
null;Clazz.instantialize(this,arguments)},J.api,"JmolAdapter");c$.getShellEnumeration=$_M(c$,"getShellEnumeration",function(a){return J.constant.EnumQuantumShell.getItem(a)},"~N");c$.getNewDfCoefMap=$_M(c$,"getNewDfCoefMap",function(){return J.constant.EnumQuantumShell.getNewDfCoefMap()});c$.getElementSymbol=$_M(c$,"getElementSymbol",function(a){return J.util.Elements.elementSymbolFromNumber(a)},"~N");c$.getElementNumber=$_M(c$,"getElementNumber",function(a){return J.util.Elements.elementNumberFromSymbol(a,
!1)},"~S");c$.getNaturalIsotope=$_M(c$,"getNaturalIsotope",function(a){return J.util.Elements.getNaturalIsotope(a)},"~N");c$.isHetero=$_M(c$,"isHetero",function(a){return J.viewer.JC.isHetero(a)},"~S");c$.getQuantumShellTagID=$_M(c$,"getQuantumShellTagID",function(a){return J.constant.EnumQuantumShell.getQuantumShellTagID(a)},"~S");c$.getQuantumShellTagIDSpherical=$_M(c$,"getQuantumShellTagIDSpherical",function(a){return J.constant.EnumQuantumShell.getQuantumShellTagIDSpherical(a)},"~S");c$.lookupGroupID=
$_M(c$,"lookupGroupID",function(a){return J.modelset.Group.lookupGroupID(a)},"~S");c$.getBondingRadiusFloat=$_M(c$,"getBondingRadiusFloat",function(a,b){return J.util.Elements.getBondingRadiusFloat(a,b)},"~N,~N");Clazz.makeConstructor(c$,function(a){this.adapterName=a},"~S");$_M(c$,"getAdapterName",function(){return this.adapterName});$_M(c$,"getAtomSetCollectionFromReader",function(a,b,c,d){null==d&&(d=new java.util.Hashtable);d.containsKey("viewer")||d.put("viewer",J.api.JmolViewer.allocateViewer(null,
this));a=this.getAtomSetCollectionReader(a,b,c,d);return Clazz.instanceOf(a,String)?a:this.getAtomSetCollection(a)},"~S,~S,~O,java.util.Map");$_M(c$,"openBufferedReader",function(a,b){return this.getAtomSetCollectionFromReader(a,null,b,null)},"~S,java.io.BufferedReader");$_M(c$,"openBufferedReader",function(a,b,c){return this.getAtomSetCollectionFromReader(a,null,b,c)},"~S,java.io.BufferedReader,java.util.Map");$_M(c$,"openBufferedReader",function(a,b,c){return this.getAtomSetCollectionFromReader(a,
b,c,null)},"~S,~S,java.io.BufferedReader");c$.canonizeAlphaDigit=$_M(c$,"canonizeAlphaDigit",function(a){return"A"<=a&&"Z">=a||"a"<=a&&"z">=a||"0"<=a&&"9">=a?a:"\x00"},"~S");c$.canonizeChainID=$_M(c$,"canonizeChainID",function(a){return J.api.JmolAdapter.canonizeAlphaDigit(a)},"~S");c$.canonizeInsertionCode=$_M(c$,"canonizeInsertionCode",function(a){return J.api.JmolAdapter.canonizeAlphaDigit(a)},"~S");c$.canonizeAlternateLocationID=$_M(c$,"canonizeAlternateLocationID",function(a){return J.api.JmolAdapter.canonizeAlphaDigit(a)},
"~S");Clazz.defineStatics(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);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$.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: ";Clazz.defineStatics(c$,"cellParamNames","_cell_length_a _cell_length_b _cell_length_c _cell_angle_alpha _cell_angle_beta _cell_angle_gamma".split(" "))}),Clazz.declarePackage("J.adapter.smarter"),Clazz.load(["J.api.JmolAdapter"],"J.adapter.smarter.SmarterJmolAdapter","J.adapter.smarter.AtomIterator $.AtomSetCollection $.BondIterator $.Resolver $.StructureIterator J.util.Logger".split(" "),
function(){c$=Clazz.declareType(J.adapter.smarter,"SmarterJmolAdapter",J.api.JmolAdapter);Clazz.makeConstructor(c$,function(){Clazz.superConstructor(this,J.adapter.smarter.SmarterJmolAdapter,["SmarterJmolAdapter"])});Clazz.overrideMethod(c$,"getFileTypeName",function(a){return Clazz.instanceOf(a,J.adapter.smarter.AtomSetCollection)?a.getFileTypeName():Clazz.instanceOf(a,java.io.BufferedReader)?J.adapter.smarter.Resolver.getFileType(a):null},"~O");Clazz.overrideMethod(c$,"getAtomSetCollectionReader",
function(a,b,c,d){return J.adapter.smarter.SmarterJmolAdapter.staticGetAtomSetCollectionReader(a,b,c,d)},"~S,~S,~O,java.util.Map");c$.staticGetAtomSetCollectionReader=$_M(c$,"staticGetAtomSetCollectionReader",function(a,b,c,d){try{var e=J.adapter.smarter.Resolver.getAtomCollectionReader(a,b,c,d,-1);if(Clazz.instanceOf(e,String))try{J.adapter.smarter.SmarterJmolAdapter.close(c)}catch(f){if(!Clazz.exceptionOf(f,Exception))throw f;}else e.setup(a,d,c);return e}catch(g){try{J.adapter.smarter.SmarterJmolAdapter.close(c)}catch(h){if(!Clazz.exceptionOf(h,
Exception))throw h;}J.util.Logger.error(""+g);return""+g}},"~S,~S,~O,java.util.Map");$_M(c$,"getAtomSetCollectionFromReader",function(a,b,c){var d=J.adapter.smarter.Resolver.getAtomCollectionReader(a,null,b,c,-1);return Clazz.instanceOf(d,J.adapter.smarter.AtomSetCollectionReader)?(d.setup(a,c,b),d.readData()):""+d},"~S,~O,java.util.Map");Clazz.overrideMethod(c$,"getAtomSetCollection",function(a){return J.adapter.smarter.SmarterJmolAdapter.staticGetAtomSetCollection(a)},"~O");c$.staticGetAtomSetCollection=
$_M(c$,"staticGetAtomSetCollection",function(a){var b=null;try{var b=a.reader,c=a.readData();return!Clazz.instanceOf(c,J.adapter.smarter.AtomSetCollection)?c:null!=c.errorMessage?c.errorMessage:c}catch(d){try{System.out.println(d.toString())}catch(e){if(Clazz.exceptionOf(e,Exception))J.util.Logger.error(d.toString());else throw e;}try{b.close()}catch(f){if(!Clazz.exceptionOf(f,Exception))throw f;}J.util.Logger.error(""+d);return""+d}},"J.adapter.smarter.AtomSetCollectionReader");Clazz.overrideMethod(c$,
"getAtomSetCollectionReaders",function(a,b,c,d,e){for(var f=b.length,g=e?Array(f):null,h=e?null:Array(f),k=0;k<f;k++)try{var l=a.getBufferedReaderOrBinaryDocument(k,!1);if(!Clazz.instanceOf(l,java.io.BufferedReader)&&!Clazz.instanceOf(l,J.api.JmolDocument))return l;var m=J.adapter.smarter.Resolver.getAtomCollectionReader(b[k],null==c?null:c[k],l,d,k);if(!Clazz.instanceOf(m,J.adapter.smarter.AtomSetCollectionReader))return m;var n=m;n.isBinary?n.setup(b[k],d,a.getBufferedReaderOrBinaryDocument(k,!0)):
n.setup(b[k],d,l);if(e)g[k]=n;else{m=n.readData();if(!Clazz.instanceOf(m,J.adapter.smarter.AtomSetCollection))return m;h[k]=m;if(null!=h[k].errorMessage)return h[k].errorMessage}}catch(p){return J.util.Logger.error(""+p),""+p}return e?g:this.getAtomSetCollectionFromSet(g,h,d)},"J.api.JmolFilesReaderInterface,~A,~A,java.util.Map,~B");Clazz.overrideMethod(c$,"getAtomSetCollectionFromSet",function(a,b,c){var d=null==b?Array(a.length):b;if(null==b)for(b=0;b<a.length;b++)try{var e=a[b].readData();if(!Clazz.instanceOf(e,
J.adapter.smarter.AtomSetCollection))return e;d[b]=e;if(null!=d[b].errorMessage)return d[b].errorMessage}catch(f){return J.util.Logger.error(""+f),""+f}if(c.containsKey("trajectorySteps")){a=d[0];try{a.finalizeTrajectoryAs(c.get("trajectorySteps"),c.get("vibrationSteps"))}catch(g){if(Clazz.exceptionOf(g,Exception))null==a.errorMessage&&(a.errorMessage=""+g);else throw g;}}else if(d[0].isTrajectory){a=d[0];for(b=1;b<d.length;b++)d[0].mergeTrajectories(d[b])}else a=new J.adapter.smarter.AtomSetCollection("Array",
null,d,null);return null==a.errorMessage?a:a.errorMessage},"~O,~O,java.util.Map");Clazz.overrideMethod(c$,"getAtomSetCollectionFromDOM",function(a,b){try{var c=J.adapter.smarter.Resolver.DOMResolve(a,b);if(!Clazz.instanceOf(c,J.adapter.smarter.AtomSetCollectionReader))return c;var d=c;d.setup("DOM node",b,null);c=d.readDataObject(a);return!Clazz.instanceOf(c,J.adapter.smarter.AtomSetCollection)?c:null!=c.errorMessage?c.errorMessage:c}catch(e){return J.util.Logger.error(""+e),""+e}},"~O,java.util.Map");
Clazz.overrideMethod(c$,"finish",function(a,b,c,d){a.finish(b,c,d)},"~O,J.modelset.ModelSet,~N,~N");Clazz.overrideMethod(c$,"getAtomSetCollectionName",function(a){return a.getCollectionName()},"~O");Clazz.overrideMethod(c$,"getAtomSetCollectionAuxiliaryInfo",function(a){return a.getAtomSetCollectionAuxiliaryInfoMap()},"~O");Clazz.overrideMethod(c$,"getAtomSetCount",function(a){return a.getAtomSetCount()},"~O");Clazz.overrideMethod(c$,"getAtomSetNumber",function(a,b){return a.getAtomSetNumber(b)},
"~O,~N");Clazz.overrideMethod(c$,"getAtomSetName",function(a,b){return a.getAtomSetName(b)},"~O,~N");Clazz.overrideMethod(c$,"getAtomSetAuxiliaryInfo",function(a,b){return a.getAtomSetAuxiliaryInfo(b)},"~O,~N");Clazz.overrideMethod(c$,"getHydrogenAtomCount",function(a){return a.getHydrogenAtomCount()},"~O");Clazz.overrideMethod(c$,"getBondList",function(a){return a.getBondList()},"~O");Clazz.overrideMethod(c$,"getAtomCount",function(a){return null==a.bsAtoms?a.getAtomCount():a.bsAtoms.cardinality()},
"~O");Clazz.overrideMethod(c$,"coordinatesAreFractional",function(a){return a.coordinatesAreFractional},"~O");Clazz.overrideMethod(c$,"getNotionalUnitcell",function(a){return a.notionalUnitCell},"~O");Clazz.overrideMethod(c$,"getPdbScaleMatrix",function(a){a=a.notionalUnitCell;if(22>a.length)return null;for(var b=Clazz.newFloatArray(16,0),c=0;16>c;c++)b[c]=a[6+c];return b},"~O");Clazz.overrideMethod(c$,"getPdbScaleTranslate",function(a){a=a.notionalUnitCell;if(22>a.length)return null;var b=Clazz.newFloatArray(3,
0);b[0]=a[9];b[1]=a[13];b[2]=a[17];return b},"~O");Clazz.overrideMethod(c$,"getAtomIterator",function(a){return new J.adapter.smarter.AtomIterator(a)},"~O");Clazz.overrideMethod(c$,"getBondIterator",function(a){return new J.adapter.smarter.BondIterator(a)},"~O");Clazz.overrideMethod(c$,"getStructureIterator",function(a){return 0==a.getStructureCount()?null:new J.adapter.smarter.StructureIterator(a)},"~O");c$.close=$_M(c$,"close",function(a){Clazz.instanceOf(a,java.io.BufferedReader);a.close()},"~O");
Clazz.defineStatics(c$,"PATH_KEY",".PATH");c$.PATH_SEPARATOR=c$.prototype.PATH_SEPARATOR=System.getProperty("path.separator","/")}),Clazz.declarePackage("J.api"),Clazz.load(null,"J.api.Interface",["J.util.Logger"],function(){c$=Clazz.declareType(J.api,"Interface");c$.getOptionInterface=$_M(c$,"getOptionInterface",function(a){return J.api.Interface.getInterface("J."+a)},"~S");c$.getApplicationInterface=$_M(c$,"getApplicationInterface",function(a){return J.api.Interface.getInterface("org.openscience.jmol.app."+
a)},"~S");c$.getInterface=$_M(c$,"getInterface",function(a){try{var b=Class.forName(a);return null==b?null:b.newInstance()}catch(c){if(Clazz.exceptionOf(c,Exception))return J.util.Logger.error("Interface.java Error creating instance for "+a+": \n"+c),null;throw c;}},"~S")}),$_L(null,"java.lang.ThreadGroup",["java.lang.NullPointerException","$.Thread"],function(){c$=$_C(function(){this.name=this.parent=null;this.maxPriority=0;$_Z(this,arguments)},java.lang,"ThreadGroup");$_K(c$,function(){this.name=
"system";this.maxPriority=10});$_K(c$,function(a){this.construct(Thread.currentThread().getThreadGroup(),a)},"~S");$_K(c$,function(a,b){if(null==a)throw new NullPointerException;this.name=b;this.parent=a;this.maxPriority=10},"ThreadGroup,~S");$_M(c$,"getName",function(){return this.name});$_M(c$,"getParent",function(){return this.parent});$_M(c$,"getMaxPriority",function(){return this.maxPriority})}),Clazz.declarePackage("J.constant"),Clazz.load(["java.lang.Enum"],"J.constant.EnumAxesMode",null,function(){c$=
Clazz.decorateAsClass(function(){this.code=0;Clazz.instantialize(this,arguments)},J.constant,"EnumAxesMode",Enum);Clazz.makeConstructor(c$,($fz=function(a){this.code=a},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"getCode",function(){return this.code});c$.getAxesMode=$_M(c$,"getAxesMode",function(a){for(var b,c=0,d=J.constant.EnumAxesMode.values();c<d.length&&((b=d[c])||1);c++)if(b.getCode()==a)return b;return null},"~N");Clazz.defineEnumConstant(c$,"BOUNDBOX",0,[0]);Clazz.defineEnumConstant(c$,"MOLECULAR",
1,[1]);Clazz.defineEnumConstant(c$,"UNITCELL",2,[2])}),Clazz.declarePackage("J.constant"),Clazz.load(["java.lang.Enum"],"J.constant.EnumFileStatus",null,function(){c$=Clazz.decorateAsClass(function(){this.code=0;Clazz.instantialize(this,arguments)},J.constant,"EnumFileStatus",Enum);$_M(c$,"getCode",function(){return this.code});Clazz.makeConstructor(c$,($fz=function(a){this.code=a},$fz.isPrivate=!0,$fz),"~N");Clazz.defineEnumConstant(c$,"DELETED",0,[5]);Clazz.defineEnumConstant(c$,"CREATED",1,[3]);
Clazz.defineEnumConstant(c$,"CREATING_MODELSET",2,[2]);Clazz.defineEnumConstant(c$,"ZAPPED",3,[0]);Clazz.defineEnumConstant(c$,"NOT_LOADED",4,[-1])}),Clazz.declarePackage("J.api"),c$=Clazz.declareType(J.api,"JmolAdapterAtomIterator"),$_M(c$,"getAtomSetIndex",function(){return 0}),$_M(c$,"getAtomSymmetry",function(){return null}),$_M(c$,"getAtomSite",function(){return-2147483648}),$_M(c$,"getElementNumber",function(){return-1}),$_M(c$,"getAtomName",function(){return null}),$_M(c$,"getFormalCharge",
function(){return 0}),$_M(c$,"getPartialCharge",function(){return NaN}),$_M(c$,"getEllipsoid",function(){return null}),$_M(c$,"getRadius",function(){return NaN}),$_M(c$,"getVectorX",function(){return NaN}),$_M(c$,"getVectorY",function(){return NaN}),$_M(c$,"getVectorZ",function(){return NaN}),$_M(c$,"getBfactor",function(){return NaN}),$_M(c$,"getOccupancy",function(){return 100}),$_M(c$,"getIsHetero",function(){return!1}),$_M(c$,"getAtomSerial",function(){return-2147483648}),$_M(c$,"getChainID",
function(){return"\x00"}),$_M(c$,"getAlternateLocationID",function(){return"\x00"}),$_M(c$,"getGroup3",function(){return null}),$_M(c$,"getSequenceNumber",function(){return-2147483648}),$_M(c$,"getInsertionCode",function(){return"\x00"}),Clazz.declarePackage("J.adapter.smarter"),Clazz.load(["J.api.JmolAdapterAtomIterator"],"J.adapter.smarter.AtomIterator",["java.lang.Float","J.api.JmolAdapter"],function(){c$=Clazz.decorateAsClass(function(){this.iatom=0;this.atom=null;this.atomCount=0;this.bsAtoms=
this.atoms=null;Clazz.instantialize(this,arguments)},J.adapter.smarter,"AtomIterator",J.api.JmolAdapterAtomIterator);Clazz.makeConstructor(c$,function(a){Clazz.superConstructor(this,J.adapter.smarter.AtomIterator,[]);this.atomCount=a.getAtomCount();this.atoms=a.getAtoms();this.bsAtoms=a.bsAtoms;this.iatom=0},"J.adapter.smarter.AtomSetCollection");Clazz.overrideMethod(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.atomIndex);)if(this.iatom==this.atomCount)return!1;this.atoms[this.iatom-1]=null;return!0});Clazz.overrideMethod(c$,"getAtomSetIndex",function(){return this.atom.atomSetIndex});Clazz.overrideMethod(c$,"getAtomSymmetry",function(){return this.atom.bsSymmetry});Clazz.overrideMethod(c$,"getAtomSite",function(){return this.atom.atomSite+1});Clazz.overrideMethod(c$,"getUniqueID",function(){return Integer.$valueOf(this.atom.atomIndex)});Clazz.overrideMethod(c$,"getElementNumber",
function(){return 0<this.atom.elementNumber?this.atom.elementNumber:J.api.JmolAdapter.getElementNumber(this.atom.getElementSymbol())});Clazz.overrideMethod(c$,"getAtomName",function(){return this.atom.atomName});Clazz.overrideMethod(c$,"getFormalCharge",function(){return this.atom.formalCharge});Clazz.overrideMethod(c$,"getPartialCharge",function(){return this.atom.partialCharge});Clazz.overrideMethod(c$,"getEllipsoid",function(){return this.atom.ellipsoid});Clazz.overrideMethod(c$,"getRadius",function(){return this.atom.radius});
Clazz.overrideMethod(c$,"getX",function(){return this.atom.x});Clazz.overrideMethod(c$,"getY",function(){return this.atom.y});Clazz.overrideMethod(c$,"getZ",function(){return this.atom.z});Clazz.overrideMethod(c$,"getVectorX",function(){return this.atom.vectorX});Clazz.overrideMethod(c$,"getVectorY",function(){return this.atom.vectorY});Clazz.overrideMethod(c$,"getVectorZ",function(){return this.atom.vectorZ});Clazz.overrideMethod(c$,"getBfactor",function(){return Float.isNaN(this.atom.bfactor)&&
null!=this.atom.anisoBorU?100*this.atom.anisoBorU[7]:this.atom.bfactor});Clazz.overrideMethod(c$,"getOccupancy",function(){return this.atom.occupancy});Clazz.overrideMethod(c$,"getIsHetero",function(){return this.atom.isHetero});Clazz.overrideMethod(c$,"getAtomSerial",function(){return this.atom.atomSerial});Clazz.overrideMethod(c$,"getChainID",function(){return J.api.JmolAdapter.canonizeChainID(this.atom.chainID)});Clazz.overrideMethod(c$,"getAlternateLocationID",function(){return J.api.JmolAdapter.canonizeAlternateLocationID(this.atom.alternateLocationID)});
Clazz.overrideMethod(c$,"getGroup3",function(){return this.atom.group3});Clazz.overrideMethod(c$,"getSequenceNumber",function(){return this.atom.sequenceNumber});Clazz.overrideMethod(c$,"getInsertionCode",function(){return J.api.JmolAdapter.canonizeInsertionCode(this.atom.insertionCode)});Clazz.overrideMethod(c$,"getXYZ",function(){return this.atom})}),Clazz.declarePackage("J.adapter.smarter"),Clazz.load(["java.util.Hashtable","J.util.P3"],"J.adapter.smarter.AtomSetCollection","java.lang.Boolean $.Float java.util.Collections $.Properties J.adapter.smarter.Atom $.Bond $.SmarterJmolAdapter J.api.Interface J.util.ArrayUtil $.BS $.BSUtil $.Escape $.JmolList $.Logger $.Matrix4f $.P3i $.Parser $.Quadric $.SB $.TextFormat $.V3".split(" "),
function(){c$=Clazz.decorateAsClass(function(){this.bsAtoms=this.atomSetCollectionAuxiliaryInfo=this.collectionName=this.fileTypeName=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.reader=null;this.connectNextAtomSet=this.connectNextAtomIndex=0;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.cartesians=null;this.bondIndex0=this.bondCount0=0;this.applySymmetryToBonds=!1;this.checkSpecial=!0;this.atomSymbolicMap=this.ptTemp2=this.ptTemp1=this.ptTemp=null;this.haveMappedSerials=!1;this.bsStructuredModels=null;Clazz.instantialize(this,arguments)},J.adapter.smarter,"AtomSetCollection");
Clazz.prepareFields(c$,function(){this.atomSetCollectionAuxiliaryInfo=new java.util.Hashtable;this.atoms=Array(256);this.bonds=Array(256);this.structures=Array(16);this.atomSetNumbers=Clazz.newIntArray(16,0);this.atomSetAtomIndexes=Clazz.newIntArray(16,0);this.atomSetAtomCounts=Clazz.newIntArray(16,0);this.atomSetBondCounts=Clazz.newIntArray(16,0);this.atomSetAuxiliaryInfo=Array(16);this.notionalUnitCell=Clazz.newFloatArray(6,0);this.ptOffset=new J.util.P3;this.ptTemp=new J.util.P3;this.ptTemp1=new J.util.P3;
this.ptTemp2=new J.util.P3;this.atomSymbolicMap=new java.util.Hashtable});$_M(c$,"getFileTypeName",function(){return this.fileTypeName});$_M(c$,"getCollectionName",function(){return this.collectionName});$_M(c$,"setCollectionName",function(a){null!=a&&(a=a.trim(),0!=a.length&&(this.collectionName=a))},"~S");$_M(c$,"getAtomSetCollectionAuxiliaryInfoMap",function(){return this.atomSetCollectionAuxiliaryInfo});$_M(c$,"clearGlobalBoolean",function(a){this.atomSetCollectionAuxiliaryInfo.remove(J.adapter.smarter.AtomSetCollection.globalBooleans[a])},
"~N");$_M(c$,"setGlobalBoolean",function(a){this.setAtomSetCollectionAuxiliaryInfo(J.adapter.smarter.AtomSetCollection.globalBooleans[a],Boolean.TRUE)},"~N");$_M(c$,"getGlobalBoolean",function(a){return this.getAtomSetCollectionAuxiliaryInfo(J.adapter.smarter.AtomSetCollection.globalBooleans[a])===Boolean.TRUE},"~N");$_M(c$,"getAtomCount",function(){return this.atomCount});$_M(c$,"getHydrogenAtomCount",function(){for(var a=0,b=0;b<this.atomCount;b++)(1==this.atoms[b].elementNumber||this.atoms[b].elementSymbol.equals("H"))&&
a++;return a});$_M(c$,"getAtoms",function(){return this.atoms});$_M(c$,"getAtom",function(a){return this.atoms[a]},"~N");$_M(c$,"getBondCount",function(){return this.bondCount});$_M(c$,"getBonds",function(){return this.bonds});$_M(c$,"getBond",function(a){return this.bonds[a]},"~N");$_M(c$,"getStructureCount",function(){return this.structureCount});$_M(c$,"getStructures",function(){return this.structures});$_M(c$,"getAtomSetCount",function(){return this.atomSetCount});$_M(c$,"getCurrentAtomSetIndex",
function(){return this.currentAtomSetIndex});$_M(c$,"setCurrentAtomSetIndex",function(a){this.currentAtomSetIndex=a},"~N");$_M(c$,"setDoFixPeriodic",function(){this.doFixPeriodic=!0});Clazz.makeConstructor(c$,function(a,b,c,d){this.fileTypeName=a;this.reader=b;this.allowMultiple=null==b||0>b.desiredVibrationNumber;a=new java.util.Properties;a.put("PATH_KEY",".PATH");a.put("PATH_SEPARATOR",J.adapter.smarter.SmarterJmolAdapter.PATH_SEPARATOR);this.setAtomSetCollectionAuxiliaryInfo("properties",a);if(null!=
c){for(a=d=0;a<c.length;a++)0<c[a].atomCount&&this.appendAtomSetCollection(d++,c[a]);1<d&&this.setAtomSetCollectionAuxiliaryInfo("isMultiFile",Boolean.TRUE)}else null!=d&&(this.setAtomSetCollectionAuxiliaryInfo("isMultiFile",Boolean.TRUE),this.appendAtomSetCollectionList(d))},"~S,J.adapter.smarter.AtomSetCollectionReader,~A,J.util.JmolList");$_M(c$,"appendAtomSetCollectionList",($fz=function(a){var b=a.size();if(0==b)this.errorMessage="No file found!";else for(var c=0;c<b;c++){var d=a.get(c);Clazz.instanceOf(d,
J.util.JmolList)?this.appendAtomSetCollectionList(d):this.appendAtomSetCollection(c,d)}},$fz.isPrivate=!0,$fz),"J.util.JmolList");$_M(c$,"setTrajectory",function(){this.isTrajectory||(this.trajectorySteps=new J.util.JmolList);this.isTrajectory=!0;this.addTrajectoryStep()});$_M(c$,"appendAtomSetCollection",function(a,b){var c=this.atomCount;this.setAtomSetCollectionAuxiliaryInfo("loadState",b.getAtomSetCollectionAuxiliaryInfo("loadState"));if(null!=b.bsAtoms){null==this.bsAtoms&&(this.bsAtoms=new J.util.BS);
for(var d=b.bsAtoms.nextSetBit(0);0<=d;d=b.bsAtoms.nextSetBit(d+1))this.bsAtoms.set(c+d)}for(var e=0,f=0;f<b.atomSetCount;f++){this.newAtomSet();d=(this.atomSetAuxiliaryInfo[this.currentAtomSetIndex]=b.atomSetAuxiliaryInfo[f]).get("PDB_CONECT_firstAtom_count_max");null!=d&&(d[0]+=c);this.setAtomSetAuxiliaryInfo("title",b.collectionName);this.setAtomSetName(b.getAtomSetName(f));for(d=0;d<b.atomSetAtomCounts[f];d++){try{null!=this.bsAtoms&&this.bsAtoms.set(this.atomCount),this.newCloneAtom(b.atoms[e])}catch(g){if(Clazz.exceptionOf(g,
Exception))this.errorMessage="appendAtomCollection error: "+g;else throw g;}e++}for(d=0;d<b.structureCount;d++)null!=b.structures[d]&&(b.structures[d].atomSetIndex==f||-1==b.structures[d].atomSetIndex)&&this.addStructure(b.structures[d]);this.atomSetNumbers[this.currentAtomSetIndex]=0>a?this.currentAtomSetIndex+1:1E6*(a+1)+b.atomSetNumbers[f]}for(e=0;e<b.bondCount;e++)f=b.bonds[e],this.addNewBondWithOrder(f.atomIndex1+c,f.atomIndex2+c,f.order);for(d=J.adapter.smarter.AtomSetCollection.globalBooleans.length;0<=
--d;)b.getGlobalBoolean(d)&&this.setGlobalBoolean(d)},"~N,J.adapter.smarter.AtomSetCollection");$_M(c$,"setNoAutoBond",function(){this.setAtomSetCollectionAuxiliaryInfo("noAutoBond",Boolean.TRUE)});$_M(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");$_M(c$,"reverseAtomSets",($fz=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++)0<=this.structures[a].atomSetIndex&&(this.structures[a].atomSetIndex=this.atomSetCount-1-this.structures[a].atomSetIndex);for(a=0;a<this.bondCount;a++)this.bonds[a].atomSetIndex=this.atomSetCount-1-this.atoms[this.bonds[a].atomIndex1].atomSetIndex;
this.reverseSets(this.structures,this.structureCount);this.reverseSets(this.bonds,this.bondCount);for(var b=J.util.ArrayUtil.createArrayOfArrayList(this.atomSetCount),a=0;a<this.atomSetCount;a++)b[a]=new J.util.JmolList;for(a=0;a<this.atomCount;a++)b[this.atoms[a].atomSetIndex].addLast(this.atoms[a]);for(var c=Clazz.newIntArray(this.atomCount,0),d=this.atomCount,a=this.atomSetCount;0<=--a;)for(var e=b[a].size();0<=--e;){var f=this.atoms[--d]=b[a].get(e);c[f.atomIndex]=d;f.atomIndex=d}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++)b=this.getAtomSetAuxiliaryInfoValue(a,"PDB_CONECT_firstAtom_count_max"),null!=b&&(b[0]=c[b[0]],b[1]=this.atomSetAtomCounts[a])},$fz.isPrivate=!0,$fz));$_M(c$,"reverseSets",($fz=function(a,b){for(var c=J.util.ArrayUtil.createArrayOfArrayList(this.atomSetCount),d=0;d<this.atomSetCount;d++)c[d]=new J.util.JmolList;for(d=0;d<b;d++){if(0>a[d].atomSetIndex)return;c[a[d].atomSetIndex].addLast(a[d])}for(d=
this.atomSetCount;0<=--d;)for(var e=c[d].size();0<=--e;)a[--b]=c[d].get(e)},$fz.isPrivate=!0,$fz),"~A,~N");$_M(c$,"reverseObject",($fz=function(a){for(var b=this.atomSetCount,c=Clazz.doubleToInt(b/2);0<=--c;)J.util.ArrayUtil.swap(a,c,b-1-c)},$fz.isPrivate=!0,$fz),"~A");c$.reverseList=$_M(c$,"reverseList",($fz=function(a){null!=a&&java.util.Collections.reverse(a)},$fz.isPrivate=!0,$fz),"J.util.JmolList");$_M(c$,"reverseArray",($fz=function(a){for(var b=this.atomSetCount,c=Clazz.doubleToInt(b/2);0<=
--c;)J.util.ArrayUtil.swapInt(a,c,b-1-c)},$fz.isPrivate=!0,$fz),"~A");$_M(c$,"getList",($fz=function(a){var b;for(b=this.atomCount;0<=--b&&!(null!=this.atoms[b]&&"\x00"!=(a?this.atoms[b].alternateLocationID:this.atoms[b].insertionCode)););if(!(0>b)){var c=Array(this.atomSetCount);for(b=0;b<this.atomSetCount;b++)c[b]="";var d;for(b=0;b<this.atomCount;b++)if(null!=this.atoms[b]){var e=a?this.atoms[b].alternateLocationID:this.atoms[b].insertionCode;if("\x00"!=e&&0>c[d=this.atoms[b].atomSetIndex].indexOf(e))c[d]+=
e}a=a?"altLocs":"insertionCodes";for(b=0;b<this.atomSetCount;b++)0<c[b].length&&this.setAtomSetAuxiliaryInfoForSet(a,c[b],b)}},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"finish",function(a,b,c){null!=this.reader&&this.reader.finalizeModelSet(a,b,c);this.atoms=null;this.atomSetAtomCounts=Clazz.newIntArray(16,0);this.atomSetAuxiliaryInfo=Array(16);this.atomSetCollectionAuxiliaryInfo=new java.util.Hashtable;this.atomSetCount=0;this.atomSetNumbers=Clazz.newIntArray(16,0);this.atomSymbolicMap=new java.util.Hashtable;
this.connectLast=this.cartesians=this.bonds=null;this.currentAtomSetIndex=-1;this.symmetry=this.notionalUnitCell=this.latticeCells=null;this.structures=Array(16);this.structureCount=0;this.vConnect=this.vibrationSteps=this.trajectorySteps=null},"J.modelset.ModelSet,~N,~N");$_M(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});$_M(c$,"removeAtomSet",function(a){null==this.bsAtoms&&(this.bsAtoms=new J.util.BS,this.bsAtoms.setBits(0,this.atomCount));var b=this.atomSetAtomIndexes[a],c=b+this.atomSetAtomCounts[a];this.bsAtoms.clearBits(b,c);for(b=c;b<this.atomCount;b++)this.atoms[b].atomSetIndex--;for(b=a+1;b<this.atomSetCount;b++)this.atomSetAuxiliaryInfo[b-1]=this.atomSetAuxiliaryInfo[b],this.atomSetAtomIndexes[b-1]=this.atomSetAtomIndexes[b],this.atomSetBondCounts[b-
1]=this.atomSetBondCounts[b],this.atomSetAtomCounts[b-1]=this.atomSetAtomCounts[b],this.atomSetNumbers[b-1]=this.atomSetNumbers[b];for(b=0;b<this.structureCount;b++)null!=this.structures[b]&&(this.structures[b].atomSetIndex>a?this.structures[b].atomSetIndex--:this.structures[b].atomSetIndex==a&&(this.structures[b]=null));for(b=0;b<this.bondCount;b++)this.bonds[b].atomSetIndex=this.atoms[this.bonds[b].atomIndex1].atomSetIndex;this.atomSetAuxiliaryInfo[--this.atomSetCount]=null},"~N");$_M(c$,"removeCurrentAtomSet",
function(){0>this.currentAtomSetIndex||(this.currentAtomSetIndex--,this.atomSetCount--)});$_M(c$,"newCloneAtom",function(a){a=a.getClone();this.addAtom(a);return a},"J.adapter.smarter.Atom");$_M(c$,"cloneFirstAtomSet",function(a){if(this.allowMultiple){this.newAtomSet();0==a&&(a=this.atomSetAtomCounts[0]);for(var b=0;b<a;++b)this.newCloneAtom(this.atoms[b])}},"~N");$_M(c$,"cloneFirstAtomSetWithBonds",function(a){if(this.allowMultiple){this.cloneFirstAtomSet(0);for(var b=this.atomSetAtomCounts[0],
c=0;c<a;c++){var d=this.bonds[this.bondCount-a];this.addNewBondWithOrder(d.atomIndex1+b,d.atomIndex2+b,d.order)}}},"~N");$_M(c$,"cloneLastAtomSet",function(){this.cloneLastAtomSetFromPoints(0,null)});$_M(c$,"cloneLastAtomSetFromPoints",function(a,b){if(this.allowMultiple){var c=0<a?a:this.getLastAtomSetAtomCount(),d=this.getLastAtomSetAtomIndex();this.newAtomSet();for(var e=0;e<c;++e){var f=this.newCloneAtom(this.atoms[d++]);null!=b&&f.setT(b[e])}}},"~N,~A");$_M(c$,"getFirstAtomSetAtomCount",function(){return this.atomSetAtomCounts[0]});
$_M(c$,"getLastAtomSetAtomCount",function(){return this.atomSetAtomCounts[this.currentAtomSetIndex]});$_M(c$,"getLastAtomSetAtomIndex",function(){return this.atomCount-this.atomSetAtomCounts[this.currentAtomSetIndex]});$_M(c$,"addNewAtom",function(){var a=new J.adapter.smarter.Atom;this.addAtom(a);return a});$_M(c$,"addAtom",function(a){this.atomCount==this.atoms.length&&(this.atoms=2E5<this.atomCount?J.util.ArrayUtil.ensureLength(this.atoms,this.atomCount+5E4):J.util.ArrayUtil.doubleLength(this.atoms));
0==this.atomSetCount&&this.newAtomSet();a.atomIndex=this.atomCount;this.atoms[this.atomCount++]=a;a.atomSetIndex=this.currentAtomSetIndex;a.atomSite=this.atomSetAtomCounts[this.currentAtomSetIndex]++},"J.adapter.smarter.Atom");$_M(c$,"addAtomWithMappedName",function(a){this.addAtom(a);this.mapMostRecentAtomName()},"J.adapter.smarter.Atom");$_M(c$,"addAtomWithMappedSerialNumber",function(a){this.addAtom(a);this.mapMostRecentAtomSerialNumber()},"J.adapter.smarter.Atom");$_M(c$,"addNewBond",function(a,
b){return this.addNewBondWithOrder(a,b,1)},"~N,~N");$_M(c$,"addNewSingleBondFromNames",function(a,b){return this.addNewBondFromNames(a,b,1)},"~S,~S");$_M(c$,"addNewBondWithOrder",function(a,b,c){if(0>a||a>=this.atomCount||0>b||b>=this.atomCount)return null;a=new J.adapter.smarter.Bond(a,b,c);this.addBond(a);return a},"~N,~N,~N");$_M(c$,"addNewBondFromNames",function(a,b,c){return this.addNewBondWithOrder(this.getAtomIndexFromName(a),this.getAtomIndexFromName(b),c)},"~S,~S,~N");$_M(c$,"addNewBondWithMappedSerialNumbers",
function(a,b,c){return this.addNewBondWithOrder(this.getAtomIndexFromSerial(a),this.getAtomIndexFromSerial(b),c)},"~N,~N,~N");$_M(c$,"addConnection",function(a){null==this.vConnect&&(this.connectLast=null,this.vConnect=new J.util.JmolList);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");$_M(c$,"connectAllBad",($fz=function(a){for(var b=this.connectNextAtomIndex,c=this.connectNextAtomSet;c<
this.atomSetCount;c++)this.setAtomSetAuxiliaryInfoForSet("PDB_CONECT_firstAtom_count_max",[b,this.atomSetAtomCounts[c],a],c),null!=this.vConnect&&(this.setAtomSetAuxiliaryInfoForSet("PDB_CONECT_bonds",this.vConnect,c),this.setGlobalBoolean(3)),b+=this.atomSetAtomCounts[c];this.vConnect=null;this.connectNextAtomSet=this.currentAtomSetIndex+1;this.connectNextAtomIndex=b},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"connectAll",function(a,b){if(!(0>this.currentAtomSetIndex))if(b)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 c=this.connectNextAtomIndex,d=this.connectNextAtomSet;d<this.atomSetCount;d++)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");$_M(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=J.util.ArrayUtil.arrayCopyObject(this.bonds,this.bondCount+1024)),this.bonds[this.bondCount++]=a,this.atomSetBondCounts[this.currentAtomSetIndex]++))},"J.adapter.smarter.Bond");$_M(c$,"addStructure",function(a){this.structureCount==
this.structures.length&&(this.structures=J.util.ArrayUtil.arrayCopyObject(this.structures,this.structureCount+32));a.atomSetIndex=this.currentAtomSetIndex;this.structures[this.structureCount++]=a;null==this.bsStructuredModels&&(this.bsStructuredModels=new J.util.BS);this.bsStructuredModels.set(Math.max(a.atomSetIndex,0));if(1<=a.strandCount){for(var b=this.structureCount,b=this.structureCount;0<=--b&&this.structures[b].atomSetIndex==this.currentAtomSetIndex&&this.structures[b].structureID.equals(a.structureID););
b++;for(a=this.structureCount-b;b<this.structureCount;b++)this.structures[b].strandCount=a}},"J.adapter.smarter.Structure");$_M(c$,"addVibrationVectorWithSymmetry",function(a,b,c,d,e){if(e){e=this.atoms[a].atomSite;for(var f=this.atoms[a].atomSetIndex;a<this.atomCount&&this.atoms[a].atomSetIndex==f;a++)this.atoms[a].atomSite==e&&this.addVibrationVector(a,b,c,d)}else this.addVibrationVector(a,b,c,d)},"~N,~N,~N,~N,~B");$_M(c$,"addVibrationVector",function(a,b,c,d){this.allowMultiple||(a%=this.atomCount);
a=this.atoms[a];a.vectorX=b;a.vectorY=c;a.vectorZ=d},"~N,~N,~N,~N");$_M(c$,"setAtomSetSpaceGroupName",function(a){this.setAtomSetAuxiliaryInfo("spaceGroup",a+"")},"~S");$_M(c$,"setCoordinatesAreFractional",function(a){this.coordinatesAreFractional=a;this.setAtomSetAuxiliaryInfo("coordinatesAreFractional",Boolean.$valueOf(a));a&&this.setGlobalBoolean(0)},"~B");$_M(c$,"setSymmetryRange",function(a){this.symmetryRange=a;this.setAtomSetCollectionAuxiliaryInfo("symmetryRange",Float.$valueOf(a))},"~N");
$_M(c$,"setLatticeCells",function(a,b,c,d,e,f,g){this.latticeCells=a;var h=555>=a[0]&&555<=a[1]&&(0==a[2]||1==a[2]||-1==a[2]);this.doNormalize=0!=a[0]&&(!h||1==a[2]);this.applySymmetryToBonds=b;this.doPackUnitCell=c;this.doCentroidUnitCell=d;this.centroidPacked=e;null!=f?this.setSuperCell(f):this.ptSupercell=g},"~A,~B,~B,~B,~B,~S,J.util.P3");$_M(c$,"setSupercellFromPoint",function(a){this.ptSupercell=a;J.util.Logger.info("Using supercell "+J.util.Escape.eP(a))},"J.util.P3");$_M(c$,"setSuperCell",
($fz=function(a){null==this.fmatSupercell&&(this.fmatSupercell=Clazz.newFloatArray(16,0),null==this.getSymmetry().getMatrixFromString(a,this.fmatSupercell,!0)?this.fmatSupercell=null:J.util.Logger.info("Using supercell \n"+J.util.Matrix4f.newA(this.fmatSupercell)))},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"getSymmetry",function(){null==this.symmetry&&(this.symmetry=J.api.Interface.getOptionInterface("symmetry.Symmetry"));return this.symmetry});$_M(c$,"setNotionalUnitCell",function(a,b,c){this.notionalUnitCell=
Clazz.newFloatArray(a.length,0);this.unitCellOffset=c;for(var d=0;d<a.length;d++)this.notionalUnitCell[d]=a[d];this.haveUnitCell=!0;this.setAtomSetAuxiliaryInfo("notionalUnitcell",this.notionalUnitCell);this.setGlobalBoolean(2);this.getSymmetry().setUnitCell(this.notionalUnitCell);null!=c&&(this.symmetry.setOffsetPt(c),this.setAtomSetAuxiliaryInfo("unitCellOffset",c));null!=b&&(this.symmetry.setUnitCellOrientation(b),this.setAtomSetAuxiliaryInfo("matUnitCellOrientation",b))},"~A,J.util.Matrix3f,J.util.P3");
$_M(c$,"addSpaceGroupOperation",function(a){this.getSymmetry().setSpaceGroup(this.doNormalize);return 0<=this.symmetry.addSpaceGroupOperation(a,0)},"~S");$_M(c$,"setLatticeParameter",function(a){this.getSymmetry().setSpaceGroup(this.doNormalize);this.symmetry.setLattice(a)},"~N");$_M(c$,"applySymmetry",function(){this.applySymmetryLattice(this.latticeCells[0],this.latticeCells[1],Math.abs(this.latticeCells[2]))});$_M(c$,"applySymmetryUsing",function(a){this.getSymmetry().setSpaceGroupS(a);this.applySymmetryLattice(this.latticeCells[0],
this.latticeCells[1],Math.abs(this.latticeCells[2]))},"J.api.SymmetryInterface");$_M(c$,"applySymmetryLattice",($fz=function(a,b,c){if(this.coordinatesAreFractional&&this.getSymmetry().haveSpaceGroup()){if(null!=this.fmatSupercell){this.rminz=this.rminy=this.rminx=3.4028235E38;this.rmaxz=this.rmaxy=this.rmaxx=-3.4028235E38;var d=this.setSym(0,1,2),e=this.setSym(4,5,6),f=this.setSym(8,9,10);this.minXYZ=J.util.P3i.new3(Clazz.floatToInt(this.rminx),Clazz.floatToInt(this.rminy),Clazz.floatToInt(this.rminz));
this.maxXYZ=J.util.P3i.new3(Clazz.floatToInt(this.rmaxx),Clazz.floatToInt(this.rmaxy),Clazz.floatToInt(this.rmaxz));this.applyAllSymmetry();for(var g=this.getLastAtomSetAtomIndex(),h=g;h<this.atomCount;h++)this.symmetry.toCartesian(this.atoms[h],!0);this.symmetry=null;this.setNotionalUnitCell([0,0,0,0,0,0,d.x,d.y,d.z,e.x,e.y,e.z,f.x,f.y,f.z],null,this.getAtomSetAuxiliaryInfoValue(this.currentAtomSetIndex,"unitCellOffset"));this.setAtomSetSpaceGroupName("P1");this.getSymmetry().setSpaceGroup(this.doNormalize);
this.symmetry.addSpaceGroupOperation("x,y,z",0);for(h=g;h<this.atomCount;h++)this.symmetry.toFractional(this.atoms[h],!0);this.haveAnisou=!1;this.atomSetAuxiliaryInfo[this.currentAtomSetIndex].remove("matUnitCellOrientation");this.doPackUnitCell=!1}this.minXYZ=new J.util.P3i;this.maxXYZ=J.util.P3i.new3(a,b,c);this.applyAllSymmetry();this.fmatSupercell=null}},$fz.isPrivate=!0,$fz),"~N,~N,~N");$_M(c$,"setSym",($fz=function(a,b,c){var d=new J.util.P3;d.set(this.fmatSupercell[a],this.fmatSupercell[b],
this.fmatSupercell[c]);this.setSymmetryMinMax(d);this.symmetry.toCartesian(d,!1);return d},$fz.isPrivate=!0,$fz),"~N,~N,~N");$_M(c$,"setSymmetryMinMax",($fz=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)},$fz.isPrivate=!0,$fz),"J.util.P3");$_M(c$,"isInSymmetryRange",($fz=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},$fz.isPrivate=!0,$fz),"J.util.P3");c$.isWithinCell=$_M(c$,"isWithinCell",($fz=function(a,b,c,d,e,f,g,h){return b.x>c-0.02&&b.x<d+0.02&&(2>a||b.y>e-0.02&&b.y<f+0.02)&&(3>a||b.z>g-0.02&&b.z<h+0.02)},$fz.isPrivate=!0,$fz),"~N,J.util.P3,~N,~N,~N,~N,~N,~N");$_M(c$,"setAnisoBorU",function(a,b,c){this.haveAnisou=!0;a.anisoBorU=b;b[6]=c},"J.adapter.smarter.Atom,~A,~N");$_M(c$,"getAnisoBorU",function(a){return a.anisoBorU},"J.adapter.smarter.Atom");$_M(c$,
"setEllipsoids",function(){if(this.haveAnisou)for(var a=this.getLastAtomSetAtomIndex();a<this.atomCount;a++)this.atoms[a].setEllipsoid(this.symmetry.getEllipsoid(this.atoms[a].anisoBorU))});$_M(c$,"setBaseSymmetryAtomCount",function(a){this.baseSymmetryAtomCount=a},"~N");$_M(c$,"applyAllSymmetry",($fz=function(){var a=0==this.baseSymmetryAtomCount?this.getLastAtomSetAtomCount():this.baseSymmetryAtomCount,b=this.getLastAtomSetAtomIndex();this.setEllipsoids();this.bondCount0=this.bondCount;this.finalizeSymmetry(b,
a);var c=this.symmetry.getSpaceGroupOperationCount();this.getSymmetry().setMinMaxLatticeParameters(this.minXYZ,this.maxXYZ);this.dtype=Clazz.floatToInt(this.getSymmetry().getUnitCellInfoType(6));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*=
Clazz.floatToInt(Math.abs(this.ptSupercell.z)),this.maxXYZ.z*=Clazz.floatToInt(Math.abs(this.ptSupercell.z));case 2:this.minXYZ.y*=Clazz.floatToInt(Math.abs(this.ptSupercell.y)),this.maxXYZ.y*=Clazz.floatToInt(Math.abs(this.ptSupercell.y));case 1:this.minXYZ.x*=Clazz.floatToInt(Math.abs(this.ptSupercell.x)),this.maxXYZ.x*=Clazz.floatToInt(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=J.util.P3i.new3(this.minXYZ.x,this.minXYZ.y,this.minXYZ.z),this.maxXYZ0=J.util.P3i.new3(this.maxXYZ.x,this.maxXYZ.y,this.maxXYZ.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++}var d=(this.maxXYZ.x-this.minXYZ.x)*(this.maxXYZ.y-this.minXYZ.y)*(this.maxXYZ.z-this.minXYZ.z),e=this.checkSpecial?a*c*d:0<this.symmetryRange?a*c:1;this.cartesians=Array(e);for(var f=0;f<a;f++)this.atoms[f+
b].bsSymmetry=J.util.BSUtil.newBitSet(c*(d+1));var f=0,g=Clazz.newIntArray(d,0);this.unitCellTranslations=Array(d);var h=d=0,k=Math.abs(this.symmetryRange),l=0!=this.symmetryRange,m=0>this.symmetryRange,n=0<this.symmetryRange;l&&(this.rminz=this.rminy=this.rminx=3.4028235E38,this.rmaxz=this.rmaxy=this.rmaxx=-3.4028235E38);var p=this.symmetry.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 s=
this.minXYZ.z;s<this.maxXYZ.z;s++)if(this.unitCellTranslations[d]=J.util.V3.new3(q,r,s),g[d++]=555+100*q+10*r+s,!(0!=q||0!=r||0!=s||0==this.cartesians.length)){for(f=0;f<a;f++){var h=this.atoms[b+f],t=J.util.P3.newP(h);p.transform(t);this.symmetry.toCartesian(t,!1);this.doPackUnitCell&&(this.symmetry.toUnitCell(t,this.ptOffset),h.setT(t),this.symmetry.toFractional(h,!1));h.bsSymmetry.set(d*c);h.bsSymmetry.set(0);l&&this.setSymmetryMinMax(t);f<e&&(this.cartesians[f]=t)}m&&(this.rminx-=k,this.rminy-=
k,this.rminz-=k,this.rmaxx+=k,this.rmaxy+=k,this.rmaxz+=k);h=f=this.symmetryAddAtoms(b,a,0,0,0,0,f,d*c)}n&&(this.rminx-=k,this.rminy-=k,this.rminz-=k,this.rmaxx+=k,this.rmaxy+=k,this.rmaxz+=k);d=0;for(q=this.minXYZ.x;q<this.maxXYZ.x;q++)for(r=this.minXYZ.y;r<this.maxXYZ.y;r++)for(s=this.minXYZ.z;s<this.maxXYZ.z;s++)if(d++,0!=q||0!=r||0!=s)f=this.symmetryAddAtoms(b,a,q,r,s,h,f,d*c);d*a==this.atomCount-b&&this.appendAtomProperties(d);this.setSymmetryOps();this.setAtomSetAuxiliaryInfo("presymmetryAtomIndex",
Integer.$valueOf(b));this.setAtomSetAuxiliaryInfo("presymmetryAtomCount",Integer.$valueOf(a));this.setAtomSetAuxiliaryInfo("latticeDesignation",this.symmetry.getLatticeDesignation());this.setAtomSetAuxiliaryInfo("unitCellRange",g);this.setAtomSetAuxiliaryInfo("unitCellTranslations",this.unitCellTranslations);this.symmetry.setSpaceGroupS(null);this.notionalUnitCell=Clazz.newFloatArray(6,0);this.coordinatesAreFractional=!1;this.setAtomSetAuxiliaryInfo("hasSymmetry",Boolean.TRUE);this.setGlobalBoolean(1)},
$fz.isPrivate=!0,$fz));$_M(c$,"finalizeSymmetry",($fz=function(a,b){this.symmetry.setFinalOperations(this.atoms,a,b,this.doNormalize);var c=this.getAtomSetAuxiliaryInfoValue(this.currentAtomSetIndex,"spaceGroup");(null==c||c.equals("unspecified!"))&&this.setAtomSetSpaceGroupName(this.symmetry.getSpaceGroupName())},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"setSymmetryOps",($fz=function(){var a=this.symmetry.getSpaceGroupOperationCount();if(0<a){for(var b=Array(a),c=0;c<a;c++)b[c]=""+this.symmetry.getSpaceGroupXyz(c,
this.doNormalize);this.setAtomSetAuxiliaryInfo("symmetryOperations",b)}this.setAtomSetAuxiliaryInfo("symmetryCount",Integer.$valueOf(a))},$fz.isPrivate=!0,$fz));$_M(c$,"setCheckSpecial",function(a){this.checkSpecial=a},"~B");$_M(c$,"symmetryAddAtoms",($fz=function(a,b,c,d,e,f,g,h){var k=0==f,l=this.bondCount0>this.bondIndex0&&this.applySymmetryToBonds,m=l?Clazz.newIntArray(b,0):null;this.doPackUnitCell&&this.ptOffset.set(c,d,e);var n=this.symmetryRange*this.symmetryRange,p=0>this.symmetryRange,q=
0<this.symmetryRange,r=k&&q,q=(new Boolean(q&!k)).valueOf(),s=this.symmetry.getSpaceGroupOperationCount();1==s&&(this.checkSpecial=!1);var t=p||q,u=this.checkSpecial||t,v=this.checkSpecial||r;p&&(f=b);b=a+b;for(var p=new J.util.P3,w=0;w<s;w++)if(!k||!this.symmetry.getSpaceGroupXyz(w,!0).equals("x,y,z")){for(var z=this.checkSpecial?g:q?f:0,B=a;B<b;B++)if(!this.atoms[B].ignoreSymmetry&&(null==this.bsAtoms||this.bsAtoms.get(B))){this.symmetry.newSpaceGroupPoint(w,this.atoms[B],p,c,d,e);var x=null,y=
J.util.P3.newP(p);this.symmetry.toCartesian(y,!1);if(this.doPackUnitCell&&(this.symmetry.toUnitCell(y,this.ptOffset),p.setT(y),this.symmetry.toFractional(p,!1),!J.adapter.smarter.AtomSetCollection.isWithinCell(this.dtype,p,this.minXYZ0.x,this.maxXYZ0.x,this.minXYZ0.y,this.maxXYZ0.y,this.minXYZ0.z,this.maxXYZ0.z)))continue;r&&this.setSymmetryMinMax(y);if(u){var A=3.4028235E38;if(t&&!this.isInSymmetryRange(y))continue;for(var C=z;0<=--C;){var D=y.distanceSquared(this.cartesians[C]);if(this.checkSpecial&&
1E-4>D){x=this.atoms[a+C];break}q&&(C<f&&D<A)&&(A=D)}if(q&&A>n)continue}C=this.atoms[B].atomSite;if(null!=x)l&&(m[C]=x.atomIndex),x.bsSymmetry.set(h+w),x.bsSymmetry.set(w);else if(l&&(m[C]=this.atomCount),x=this.newCloneAtom(this.atoms[B]),x.setT(p),x.atomSite=C,x.bsSymmetry=J.util.BSUtil.newAndSetBit(h+w),x.bsSymmetry.set(w),v&&(this.cartesians[g++]=y),null!=this.atoms[B].ellipsoid)for(C=0;C<this.atoms[B].ellipsoid.length;C++)y=this.atoms[B].ellipsoid[C],null!=y&&(A=y.vectors,D=y.lengths,null!=A&&
(v?this.ptTemp.setT(this.cartesians[B-a]):(this.ptTemp.setT(this.atoms[B]),this.symmetry.toCartesian(this.ptTemp,!1)),A=this.symmetry.rotateEllipsoid(w,this.ptTemp,A,this.ptTemp1,this.ptTemp2)),x.ellipsoid[C]=(new J.util.Quadric).fromVectors(A,D,y.isThermalEllipsoid))}if(l)for(z=this.bondIndex0;z<this.bondCount0;z++)B=this.bonds[z],x=this.atoms[B.atomIndex1],C=this.atoms[B.atomIndex2],null==x||null==C||(x=m[x.atomSite],C=m[C.atomSite],(x>=b||C>=b)&&this.addNewBondWithOrder(x,C,B.order))}return g},
$fz.isPrivate=!0,$fz),"~N,~N,~N,~N,~N,~N,~N,~N");$_M(c$,"applySymmetryBio",function(a,b,c,d){if(null!=this.latticeCells&&0!=this.latticeCells[0])J.util.Logger.error("Cannot apply biomolecule when lattice cells are indicated");else{this.doNormalize=!1;this.symmetry=null;this.getSymmetry();this.setNotionalUnitCell(b,null,this.unitCellOffset);this.getSymmetry().setSpaceGroup(this.doNormalize);this.addSpaceGroupOperation("x,y,z");this.setAtomSetSpaceGroupName("biomolecule");var e=a.size();this.applySymmetryToBonds=
c;this.bondCount0=this.bondCount;var f=this.bondCount0>this.bondIndex0&&c,g=f?Clazz.newIntArray(this.atomCount,0):null;c=this.getLastAtomSetAtomIndex();var h=this.atomCount;0<=d.indexOf("#<")&&(e=Math.min(e,J.util.Parser.parseInt(d.substring(d.indexOf("#<")+2))-1),d=J.util.TextFormat.simpleReplace(d,"#<","_<"));for(var k=c;k<h;k++)this.atoms[k].bsSymmetry=J.util.BSUtil.newAndSetBit(0);for(var l=1;l<e;l++){if(0<=d.indexOf("!#")){if(0<=d.indexOf("!#"+(l+1)+";"))continue}else if(0<=d.indexOf("#")&&0>
d.indexOf("#"+(l+1)+";"))continue;for(var m=a.get(l),k=c;k<h;k++)if(null==this.bsAtoms||this.bsAtoms.get(k))try{var n=this.atoms[k].atomSite,p;f&&(g[n]=this.atomCount);p=this.newCloneAtom(this.atoms[k]);null!=this.bsAtoms&&this.bsAtoms.set(p.atomIndex);p.atomSite=n;m.transform(p);p.bsSymmetry=J.util.BSUtil.newAndSetBit(l);if(f)for(var q=this.bondIndex0;q<this.bondCount0;q++){var r=this.bonds[q],s=g[this.atoms[r.atomIndex1].atomSite],t=g[this.atoms[r.atomIndex2].atomSite];(s>=h||t>=h)&&this.addNewBondWithOrder(s,
t,r.order)}}catch(u){if(Clazz.exceptionOf(u,Exception))this.errorMessage="appendAtomCollection error: "+u;else throw u;}m.m03/=b[0];m.m13/=b[1];m.m23/=b[2];null!=this.symmetry&&0<l&&this.symmetry.addSpaceGroupOperationM(m)}a=h-c;this.setAtomSetAuxiliaryInfo("presymmetryAtomIndex",Integer.$valueOf(c));this.setAtomSetAuxiliaryInfo("presymmetryAtomCount",Integer.$valueOf(a));this.setAtomSetAuxiliaryInfo("biosymmetryCount",Integer.$valueOf(e));null!=this.symmetry&&(this.finalizeSymmetry(c,a),this.setSymmetryOps());
this.symmetry=null;this.coordinatesAreFractional=!1;this.setAtomSetAuxiliaryInfo("hasSymmetry",Boolean.TRUE);this.setGlobalBoolean(1)}},"J.util.JmolList,~A,~B,~S");$_M(c$,"mapMostRecentAtomName",($fz=function(){if(0<this.atomCount){var a=this.atomCount-1,b=this.atoms[a].atomName;null!=b&&this.atomSymbolicMap.put(b,Integer.$valueOf(a))}},$fz.isPrivate=!0,$fz));$_M(c$,"clearSymbolicMap",function(){this.atomSymbolicMap.clear();this.haveMappedSerials=!1});$_M(c$,"mapMostRecentAtomSerialNumber",function(){if(0!=
this.atomCount){var a=this.atomCount-1,b=this.atoms[a].atomSerial;-2147483648!=b&&this.atomSymbolicMap.put(Integer.$valueOf(b),Integer.$valueOf(a));this.haveMappedSerials=!0}});$_M(c$,"createAtomSerialMap",function(){if(!(this.haveMappedSerials||0>this.currentAtomSetIndex)){for(var a=this.getLastAtomSetAtomCount();a<this.atomCount;a++){var b=this.atoms[a].atomSerial;-2147483648!=b&&this.atomSymbolicMap.put(Integer.$valueOf(b),Integer.$valueOf(a))}this.haveMappedSerials=!0}});$_M(c$,"mapAtomName",
function(a,b){this.atomSymbolicMap.put(a,Integer.$valueOf(b))},"~S,~N");$_M(c$,"getAtomIndexFromName",function(a){var b=-1;a=this.atomSymbolicMap.get(a);null!=a&&(b=a.intValue());return b},"~S");$_M(c$,"getAtomIndexFromSerial",function(a){var b=-1;a=this.atomSymbolicMap.get(Integer.$valueOf(a));null!=a&&(b=a.intValue());return b},"~N");$_M(c$,"setAtomSetCollectionAuxiliaryInfo",function(a,b){null==b?this.atomSetCollectionAuxiliaryInfo.remove(a):this.atomSetCollectionAuxiliaryInfo.put(a,b)},"~S,~O");
$_M(c$,"setAtomSetCollectionPartialCharges",function(a){if(!this.atomSetCollectionAuxiliaryInfo.containsKey(a))return!1;for(var b=this.atomSetCollectionAuxiliaryInfo.get(a),c=b.size();0<=--c;)this.atoms[c].partialCharge=b.get(c).floatValue();J.util.Logger.info("Setting partial charges type "+a);return!0},"~S");$_M(c$,"mapPartialCharge",function(a,b){this.atoms[this.getAtomIndexFromName(a)].partialCharge=b},"~S,~N");$_M(c$,"getAtomSetCollectionAuxiliaryInfo",function(a){return this.atomSetCollectionAuxiliaryInfo.get(a)},
"~S");$_M(c$,"addTrajectoryStep",($fz=function(){for(var a=Array(this.atomCount),b=0<this.atomCount&&!Float.isNaN(this.atoms[0].vectorX),c=b?Array(this.atomCount):null,d=0==this.trajectoryStepCount?null:this.trajectorySteps.get(this.trajectoryStepCount-1),e=0;e<this.atomCount;e++){var f=J.util.P3.newP(this.atoms[e]);this.doFixPeriodic&&null!=d&&(f=J.adapter.smarter.AtomSetCollection.fixPeriodic(f,d[e]));a[e]=f;b&&(c[e]=J.util.V3.new3(this.atoms[e].vectorX,this.atoms[e].vectorY,this.atoms[e].vectorZ))}if(b){if(null==
this.vibrationSteps){this.vibrationSteps=new J.util.JmolList;for(e=0;e<this.trajectoryStepCount;e++)this.vibrationSteps.addLast(null)}this.vibrationSteps.addLast(c)}this.trajectorySteps.addLast(a);this.trajectoryStepCount++},$fz.isPrivate=!0,$fz));c$.fixPeriodic=$_M(c$,"fixPeriodic",($fz=function(a,b){a.x=J.adapter.smarter.AtomSetCollection.fixPoint(a.x,b.x);a.y=J.adapter.smarter.AtomSetCollection.fixPoint(a.y,b.y);a.z=J.adapter.smarter.AtomSetCollection.fixPoint(a.z,b.z);return a},$fz.isPrivate=
!0,$fz),"J.util.P3,J.util.P3");c$.fixPoint=$_M(c$,"fixPoint",($fz=function(a,b){for(;0.9<a-b;)a-=1;for(;-0.9>a-b;)a+=1;return a},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"finalizeTrajectoryAs",function(a,b){this.trajectorySteps=a;this.vibrationSteps=b;this.trajectoryStepCount=a.size();this.finalizeTrajectory()},"J.util.JmolList,J.util.JmolList");$_M(c$,"finalizeTrajectory",($fz=function(){if(0!=this.trajectoryStepCount){var a=this.trajectorySteps.get(0),b=null==this.vibrationSteps?null:this.vibrationSteps.get(0),
c=new J.util.V3;if(null!=this.vibrationSteps&&null!=b&&b.length<this.atomCount||a.length<this.atomCount)this.errorMessage="File cannot be loaded as a trajectory";else{for(var d=0;d<this.atomCount;d++)null!=this.vibrationSteps&&(null!=b&&(c=b[d]),this.atoms[d].vectorX=c.x,this.atoms[d].vectorY=c.y,this.atoms[d].vectorZ=c.z),null!=a[d]&&this.atoms[d].setT(a[d]);this.setAtomSetCollectionAuxiliaryInfo("trajectorySteps",this.trajectorySteps);null!=this.vibrationSteps&&this.setAtomSetCollectionAuxiliaryInfo("vibrationSteps",
this.vibrationSteps)}}},$fz.isPrivate=!0,$fz));$_M(c$,"newAtomSet",function(){!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=J.util.ArrayUtil.doubleLengthI(this.atomSetAtomIndexes),this.atomSetAtomCounts=J.util.ArrayUtil.doubleLengthI(this.atomSetAtomCounts),this.atomSetBondCounts=
J.util.ArrayUtil.doubleLengthI(this.atomSetBondCounts),this.atomSetAuxiliaryInfo=J.util.ArrayUtil.doubleLength(this.atomSetAuxiliaryInfo));this.atomSetAtomIndexes[this.currentAtomSetIndex]=this.atomCount;this.atomSetCount+this.trajectoryStepCount>this.atomSetNumbers.length&&(this.atomSetNumbers=J.util.ArrayUtil.doubleLengthI(this.atomSetNumbers));this.isTrajectory?this.atomSetNumbers[this.currentAtomSetIndex+this.trajectoryStepCount]=this.atomSetCount+this.trajectoryStepCount:this.atomSetNumbers[this.currentAtomSetIndex]=
this.atomSetCount;this.atomSymbolicMap.clear();this.setAtomSetAuxiliaryInfo("title",this.collectionName)});$_M(c$,"getAtomSetAtomIndex",function(a){return this.atomSetAtomIndexes[a]},"~N");$_M(c$,"getAtomSetAtomCount",function(a){return this.atomSetAtomCounts[a]},"~N");$_M(c$,"getAtomSetBondCount",function(a){return this.atomSetBondCounts[a]},"~N");$_M(c$,"setAtomSetName",function(a){this.isTrajectory?this.setTrajectoryName(a):(this.setAtomSetAuxiliaryInfoForSet("name",a,this.currentAtomSetIndex),
this.allowMultiple||this.setCollectionName(a))},"~S");$_M(c$,"setTrajectoryName",($fz=function(a){if(0!=this.trajectoryStepCount){null==this.trajectoryNames&&(this.trajectoryNames=new J.util.JmolList);for(var b=this.trajectoryNames.size();b<this.trajectoryStepCount;b++)this.trajectoryNames.addLast(null);this.trajectoryNames.set(this.trajectoryStepCount-1,a)}},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"setAtomSetNames",function(a,b){for(var c=this.currentAtomSetIndex;0<=--b&&0<=c;--c)this.setAtomSetAuxiliaryInfoForSet("name",
a,c)},"~S,~N");$_M(c$,"setCurrentAtomSetNumber",function(a){this.setAtomSetNumber(this.currentAtomSetIndex+(this.isTrajectory?this.trajectoryStepCount:0),a)},"~N");$_M(c$,"setAtomSetNumber",function(a,b){this.atomSetNumbers[a]=b},"~N,~N");$_M(c$,"setAtomSetModelProperty",function(a,b){this.setAtomSetModelPropertyForSet(a,b,this.currentAtomSetIndex)},"~S,~S");$_M(c$,"setAtomSetModelPropertyForSet",function(a,b,c){var d=this.getAtomSetAuxiliaryInfoValue(c,"modelProperties");null==d&&this.setAtomSetAuxiliaryInfoForSet("modelProperties",
d=new java.util.Properties,c);d.put(a,b)},"~S,~S,~N");$_M(c$,"setAtomSetAtomProperty",function(a,b,c){b.endsWith("\n")||(b+="\n");0>c&&(c=this.currentAtomSetIndex);var d=this.getAtomSetAuxiliaryInfoValue(c,"atomProperties");null==d&&this.setAtomSetAuxiliaryInfoForSet("atomProperties",d=new java.util.Hashtable,c);d.put(a,b)},"~S,~S,~N");$_M(c$,"appendAtomProperties",($fz=function(a){var b=this.getAtomSetAuxiliaryInfoValue(this.currentAtomSetIndex,"atomProperties");if(null!=b)for(var c,d=b.entrySet().iterator();d.hasNext()&&
((c=d.next())||1);){for(var e=c.getKey(),f=c.getValue(),g=new J.util.SB,h=a;0<=--h;)g.append(f);b.put(e,g.toString())}},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"setAtomSetPartialCharges",function(a){if(!this.atomSetAuxiliaryInfo[this.currentAtomSetIndex].containsKey(a))return!1;a=this.getAtomSetAuxiliaryInfoValue(this.currentAtomSetIndex,a);for(var b=a.size();0<=--b;)this.atoms[b].partialCharge=a.get(b).floatValue();return!0},"~S");$_M(c$,"getAtomSetAuxiliaryInfoValue",function(a,b){return this.atomSetAuxiliaryInfo[a].get(b)},
"~N,~S");$_M(c$,"setAtomSetAuxiliaryInfo",function(a,b){this.setAtomSetAuxiliaryInfoForSet(a,b,this.currentAtomSetIndex)},"~S,~O");$_M(c$,"setAtomSetAuxiliaryInfoForSet",function(a,b,c){0>c||(null==this.atomSetAuxiliaryInfo[c]&&(this.atomSetAuxiliaryInfo[c]=new java.util.Hashtable),null==b?this.atomSetAuxiliaryInfo[c].remove(a):this.atomSetAuxiliaryInfo[c].put(a,b))},"~S,~O,~N");$_M(c$,"setAtomSetPropertyForSets",function(a,b,c){for(var d=this.currentAtomSetIndex;0<=--c&&0<=d;--d)this.setAtomSetModelPropertyForSet(a,
b,d)},"~S,~S,~N");$_M(c$,"cloneLastAtomSetProperties",function(){this.cloneAtomSetProperties(this.currentAtomSetIndex-1)});$_M(c$,"cloneAtomSetProperties",function(a){a=this.getAtomSetAuxiliaryInfoValue(a,"modelProperties");null!=a&&this.setAtomSetAuxiliaryInfoForSet("modelProperties",a.clone(),this.currentAtomSetIndex)},"~N");$_M(c$,"getAtomSetNumber",function(a){return this.atomSetNumbers[a>=this.atomSetCount?0:a]},"~N");$_M(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");$_M(c$,"getAtomSetAuxiliaryInfo",function(a){return this.atomSetAuxiliaryInfo[a>=this.atomSetCount?this.atomSetCount-1:a]},"~N");$_M(c$,"setAtomNames",function(a){if(null==a)return null;for(var b,c=0;c<this.atomCount;c++)if(null!=(b=a.getProperty(this.atoms[c].atomName)))this.atoms[c].atomName=b;return null},"java.util.Properties");$_M(c$,"setAtomSetEnergy",function(a,b){0>this.currentAtomSetIndex||
(this.setAtomSetAuxiliaryInfo("EnergyString",a),this.setAtomSetAuxiliaryInfo("Energy",Float.$valueOf(b)),this.setAtomSetModelProperty("Energy",""+b))},"~S,~N");$_M(c$,"setAtomSetFrequency",function(a,b,c,d){c+=" "+(null==d?"cm^-1":d);this.setAtomSetName((null==b?"":b+" ")+c);this.setAtomSetModelProperty("Frequency",c);null!=b&&this.setAtomSetModelProperty("FrequencyLabel",b);this.setAtomSetModelProperty(".PATH",(null==a?"":a+J.adapter.smarter.SmarterJmolAdapter.PATH_SEPARATOR+"Frequencies")+"Frequencies")},
"~S,~S,~S,~S");$_M(c$,"toCartesian",function(a){for(var b=this.getLastAtomSetAtomIndex();b<this.atomCount;b++)a.toCartesian(this.atoms[b],!0)},"J.api.SymmetryInterface");$_M(c$,"getBondList",function(){for(var a=Array(this.bondCount),b=0;b<this.bondCount;b++)a[b]=[this.atoms[this.bonds[b].atomIndex1].atomName,this.atoms[this.bonds[b].atomIndex2].atomName,""+this.bonds[b].order];return a});$_M(c$,"centralize",function(){for(var a=new J.util.P3,b=0;b<this.atomSetCount;b++){var c=this.atomSetAtomCounts[b],
d=this.atomSetAtomIndexes[b];a.set(0,0,0);for(var e=d+c;--e>=d;)a.x+=this.atoms[e].x,a.y+=this.atoms[e].y,a.z+=this.atoms[e].z;a.scale(1/c);for(e=d+c;--e>=d;)this.atoms[e].x-=a.x,this.atoms[e].y-=a.y,this.atoms[e].z-=a.z}});$_M(c$,"mergeTrajectories",function(a){if(this.isTrajectory&&a.isTrajectory&&null==this.vibrationSteps){for(var b=0;b<a.trajectoryStepCount;b++)this.trajectorySteps.add(this.trajectoryStepCount++,a.trajectorySteps.get(b));this.setAtomSetCollectionAuxiliaryInfo("trajectorySteps",
this.trajectorySteps)}},"J.adapter.smarter.AtomSetCollection");Clazz.defineStatics(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(" "))}),Clazz.declarePackage("J.api"),c$=Clazz.declareType(J.api,"JmolAdapterBondIterator"),Clazz.declarePackage("J.adapter.smarter"),
Clazz.load(["J.api.JmolAdapterBondIterator"],"J.adapter.smarter.BondIterator",null,function(){c$=Clazz.decorateAsClass(function(){this.bonds=this.bsAtoms=null;this.ibond=0;this.bond=null;this.bondCount=0;Clazz.instantialize(this,arguments)},J.adapter.smarter,"BondIterator",J.api.JmolAdapterBondIterator);Clazz.makeConstructor(c$,function(a){Clazz.superConstructor(this,J.adapter.smarter.BondIterator,[]);this.bsAtoms=a.bsAtoms;this.bonds=a.getBonds();this.bondCount=a.getBondCount();this.ibond=0},"J.adapter.smarter.AtomSetCollection");
Clazz.overrideMethod(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});Clazz.overrideMethod(c$,"getAtomUniqueID1",function(){return Integer.$valueOf(this.bond.atomIndex1)});Clazz.overrideMethod(c$,"getAtomUniqueID2",function(){return Integer.$valueOf(this.bond.atomIndex2)});Clazz.overrideMethod(c$,
"getEncodedOrder",function(){return this.bond.order});Clazz.overrideMethod(c$,"getRadius",function(){return this.bond.radius});Clazz.overrideMethod(c$,"getColix",function(){return this.bond.colix})}),Clazz.declarePackage("J.adapter.smarter"),Clazz.load(null,"J.adapter.smarter.Resolver","java.lang.Character $.Float java.util.StringTokenizer J.adapter.smarter.AtomSetCollectionReader $.SmarterJmolAdapter J.io.LimitedLineReader J.util.Logger $.Parser".split(" "),function(){c$=Clazz.declareType(J.adapter.smarter,
"Resolver");c$.getReaderClassBase=$_M(c$,"getReaderClassBase",function(a){var b=a+"Reader";if(a.startsWith("Xml"))return"J.adapter.readers.xml."+b;a=";"+a+";";for(var c=1;c<J.adapter.smarter.Resolver.readerSets.length;c+=2)if(0<=J.adapter.smarter.Resolver.readerSets[c].indexOf(a))return"J.adapter.readers."+J.adapter.smarter.Resolver.readerSets[c-1]+b;return"J.adapter.readers.???."+b},"~S");c$.getFileType=$_M(c$,"getFileType",function(a){try{return J.adapter.smarter.Resolver.determineAtomSetCollectionReader(a,
!1)}catch(b){if(Clazz.exceptionOf(b,Exception))return null;throw b;}},"java.io.BufferedReader");c$.getAtomCollectionReader=$_M(c$,"getAtomCollectionReader",function(a,b,c,d,e){var f=null,g;a=a.$replace("\\","/");var h=null;null!=b?(g=J.adapter.smarter.Resolver.getReaderFromType(b),null==g?h="unrecognized file format type "+b:J.util.Logger.info("The Resolver assumes "+g)):(g=J.adapter.smarter.Resolver.determineAtomSetCollectionReader(c,!0),"\n"==g.charAt(0)&&(b=d.get("defaultType"),null!=b&&(b=J.adapter.smarter.Resolver.getReaderFromType(b),
null!=b&&(g=b))),"\n"==g.charAt(0)?h="unrecognized file format for file "+a+"\n"+g:g.equals("spt")?h="NOTE: file recognized as a script file: "+a+"\n":a.equals("ligand")||J.util.Logger.info("The Resolver thinks "+g));if(null!=h)return J.adapter.smarter.SmarterJmolAdapter.close(c),h;d.put("ptFile",Integer.$valueOf(e));0>=e&&d.put("readerName",g);0==g.indexOf("Xml")&&(g="Xml");a=null;var k;b=null;try{try{a=J.adapter.smarter.Resolver.getReaderClassBase(g),k=Class.forName(a),f=k.newInstance()}catch(l){if(Clazz.exceptionOf(l,
Exception))return b="File reader was not found:"+a,J.util.Logger.error(b),b;throw l;}return f}catch(m){if(Clazz.exceptionOf(m,Exception))return b="uncaught error in file loading for "+a,J.util.Logger.error(b),System.out.println(m.getMessage()),b;throw m;}},"~S,~S,~O,java.util.Map,~N");c$.DOMResolve=$_M(c$,"DOMResolve",function(a,b){var c=null,d,e,f=J.adapter.smarter.Resolver.getXmlType(b.get("nameSpaceInfo"));J.util.Logger.debugging&&J.util.Logger.debug("The Resolver thinks "+f);b.put("readerName",
f);try{return c="J.adapter.readers.xml.XmlReader",d=Class.forName(c),e=d.newInstance()}catch(g){if(Clazz.exceptionOf(g,Exception))return c="File reader was not found:"+c,J.util.Logger.errorEx(c,g),c;throw g;}},"~O,java.util.Map");c$.determineAtomSetCollectionReader=$_M(c$,"determineAtomSetCollectionReader",($fz=function(a,b){for(var c=new J.io.LimitedLineReader(a,16384),d=c.getHeader(64).trim(),e=0;e<J.adapter.smarter.Resolver.fileStartsWithRecords.length;++e)for(var f=J.adapter.smarter.Resolver.fileStartsWithRecords[e],
g=1;g<f.length;++g)if(d.startsWith(f[g]))return f[0];if(1==d.indexOf("PNG")&&0<=d.indexOf("PNGJ"))return"pngj";if(1==d.indexOf("PNG")||1==d.indexOf("JPG")||6==d.indexOf("JFIF"))return"spt";if(d.startsWith("##TITLE"))return"Jcampdx";d=Array(16);for(e=f=0;e<d.length;++e)d[e]=c.readLineWithNewline(),0<d[e].length&&f++;var h;return null!=(h=J.adapter.smarter.Resolver.checkSpecial(f,d,!1))||null!=(h=J.adapter.smarter.Resolver.checkLineStarts(d))||null!=(h=J.adapter.smarter.Resolver.checkHeaderContains(c.getHeader(0)))||
null!=(h=J.adapter.smarter.Resolver.checkSpecial(f,d,!0))?h:b?"\n"+d[0]+"\n"+d[1]+"\n"+d[2]+"\n":null},$fz.isPrivate=!0,$fz),"java.io.BufferedReader,~B");c$.checkHeaderContains=$_M(c$,"checkHeaderContains",($fz=function(a){for(var b=0;b<J.adapter.smarter.Resolver.headerContainsRecords.length;++b)for(var c=J.adapter.smarter.Resolver.headerContainsRecords[b],d=1;d<c.length;++d)if(!(0>a.indexOf(c[d])))return b=c[0],!b.equals("Xml")?b:0>a.indexOf("<!DOCTYPE HTML PUBLIC")&&0>a.indexOf("XHTML")&&(0>a.indexOf("xhtml")||
0<=a.indexOf("<cml"))?J.adapter.smarter.Resolver.getXmlType(a):null;return null},$fz.isPrivate=!0,$fz),"~S");c$.checkLineStarts=$_M(c$,"checkLineStarts",($fz=function(a){for(var b=0;b<J.adapter.smarter.Resolver.lineStartsWithRecords.length;++b)for(var c=J.adapter.smarter.Resolver.lineStartsWithRecords[b],d=1;d<c.length;++d)for(var e=c[d],f=0;f<a.length;++f)if(a[f].startsWith(e))return c[0];return null},$fz.isPrivate=!0,$fz),"~A");c$.getXmlType=$_M(c$,"getXmlType",($fz=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)"},$fz.isPrivate=!0,$fz),"~S");c$.getReaderFromType=$_M(c$,"getReaderFromType",($fz=function(a){a=a.toLowerCase();var b=null;return null!=(b=J.adapter.smarter.Resolver.checkType(J.adapter.smarter.Resolver.specialTags,a))||null!=(b=J.adapter.smarter.Resolver.checkType(J.adapter.smarter.Resolver.fileStartsWithRecords,a))||null!=(b=J.adapter.smarter.Resolver.checkType(J.adapter.smarter.Resolver.lineStartsWithRecords,
a))?b:J.adapter.smarter.Resolver.checkType(J.adapter.smarter.Resolver.headerContainsRecords,a)},$fz.isPrivate=!0,$fz),"~S");c$.checkType=$_M(c$,"checkType",($fz=function(a,b){for(var c=0;c<a.length;++c)if(a[c][0].toLowerCase().equals(b))return a[c][0];return null},$fz.isPrivate=!0,$fz),"~A,~S");c$.checkSpecial=$_M(c$,"checkSpecial",($fz=function(a,b,c){if(c){if(J.adapter.smarter.Resolver.checkGromacs(b))return J.adapter.smarter.Resolver.specialTags[14][0];if(J.adapter.smarter.Resolver.checkCrystal(b))return J.adapter.smarter.Resolver.specialTags[12][0];
if(J.adapter.smarter.Resolver.checkCastep(b))return J.adapter.smarter.Resolver.specialTags[10][0];if(J.adapter.smarter.Resolver.checkVaspposcar(b))return J.adapter.smarter.Resolver.specialTags[13][0]}else{if(1==a&&0<b[0].length&&Character.isDigit(b[0].charAt(0)))return J.adapter.smarter.Resolver.specialTags[0][0];if(J.adapter.smarter.Resolver.checkMopacGraphf(b))return J.adapter.smarter.Resolver.specialTags[1][0];if(J.adapter.smarter.Resolver.checkOdyssey(b))return J.adapter.smarter.Resolver.specialTags[3][0];
if(J.adapter.smarter.Resolver.checkMol(b))return J.adapter.smarter.Resolver.specialTags[4][0];if(J.adapter.smarter.Resolver.checkXyz(b))return J.adapter.smarter.Resolver.specialTags[5][0];if(J.adapter.smarter.Resolver.checkAlchemy(b[0]))return J.adapter.smarter.Resolver.specialTags[8][0];if(J.adapter.smarter.Resolver.checkFoldingXyz(b))return J.adapter.smarter.Resolver.specialTags[6][0];if(J.adapter.smarter.Resolver.checkCube(b))return J.adapter.smarter.Resolver.specialTags[7][0];if(J.adapter.smarter.Resolver.checkWien2k(b))return J.adapter.smarter.Resolver.specialTags[9][0];
if(J.adapter.smarter.Resolver.checkAims(b))return J.adapter.smarter.Resolver.specialTags[11][0];if(J.adapter.smarter.Resolver.checkGenNBO(b))return J.adapter.smarter.Resolver.specialTags[15][0]}return null},$fz.isPrivate=!0,$fz),"~N,~A,~B");c$.checkAims=$_M(c$,"checkAims",($fz=function(a){for(var b=0;b<a.length&&!a[b].startsWith("mol 1");b++){var c=J.util.Parser.getTokens(a[b]);if(0!=c.length&&(c[0].startsWith("atom")&&5<=c.length||c[0].startsWith("multipole")&&6<=c.length||c[0].startsWith("lattice_vector")&&
4<=c.length))return!0}return!1},$fz.isPrivate=!0,$fz),"~A");c$.checkAlchemy=$_M(c$,"checkAlchemy",($fz=function(a){var b;if(0<=(b=a.indexOf("ATOMS"))&&a.indexOf("BONDS")>b)try{return 0<Integer.parseInt(a.substring(0,b).trim())}catch(c){if(!Clazz.exceptionOf(c,NumberFormatException))throw c;}return!1},$fz.isPrivate=!0,$fz),"~S");c$.checkCastep=$_M(c$,"checkCastep",($fz=function(a){for(var b=0;b<a.length;b++)if(1==a[b].indexOf("Frequencies in         cm-1")||a[b].contains("CASTEP")||a[b].toUpperCase().startsWith("%BLOCK LATTICE_ABC")||
a[b].toUpperCase().startsWith("%BLOCK LATTICE_CART")||a[b].toUpperCase().startsWith("%BLOCK POSITIONS_FRAC")||a[b].toUpperCase().startsWith("%BLOCK POSITIONS_ABS")||a[b].contains("<-- E"))return!0;return!1},$fz.isPrivate=!0,$fz),"~A");c$.checkVaspposcar=$_M(c$,"checkVaspposcar",($fz=function(a){var b=a[8].trim().toLowerCase();if(b.contains("direct")||b.contains("cartesian")||b.contains("selective"))return!0;a=a[7].trim().toLowerCase();return a.contains("direct")||a.contains("cartesian")?!0:!1},$fz.isPrivate=
!0,$fz),"~A");c$.checkCrystal=$_M(c$,"checkCrystal",($fz=function(a){var b=a[1].trim();if(b.equals("SLAB")||b.equals("MOLECULE")||b.equals("CRYSTAL")||b.equals("POLYMER")||(b=a[3]).equals("SLAB")||b.equals("MOLECULE")||b.equals("POLYMER"))return!0;for(b=0;b<a.length;b++)if(a[b].trim().equals("OPTGEOM"))return!0;return!1},$fz.isPrivate=!0,$fz),"~A");c$.checkCube=$_M(c$,"checkCube",($fz=function(a){try{var b=new java.util.StringTokenizer(a[2]);if(4!=b.countTokens())return!1;Integer.parseInt(b.nextToken());
for(var c=3;0<=--c;)J.util.Parser.fVal(b.nextToken());var d=new java.util.StringTokenizer(a[3]);if(4!=d.countTokens())return!1;Integer.parseInt(d.nextToken());for(c=3;0<=--c;)if(0>J.util.Parser.fVal(d.nextToken()))return!1;return!0}catch(e){if(!Clazz.exceptionOf(e,NumberFormatException))throw e;}return!1},$fz.isPrivate=!0,$fz),"~A");c$.checkFoldingXyz=$_M(c$,"checkFoldingXyz",($fz=function(a){var b=new java.util.StringTokenizer(a[0].trim()," \t");if(2>b.countTokens())return!1;try{Integer.parseInt(b.nextToken().trim())}catch(c){if(Clazz.exceptionOf(c,
NumberFormatException))return!1;throw c;}b=a[1].trim();0==b.length&&(b=a[2].trim());b=new java.util.StringTokenizer(b," \t");if(0==b.countTokens())return!1;try{Integer.parseInt(b.nextToken().trim())}catch(d){if(Clazz.exceptionOf(d,NumberFormatException))return!1;throw d;}return!0},$fz.isPrivate=!0,$fz),"~A");c$.checkGenNBO=$_M(c$,"checkGenNBO",($fz=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")},
$fz.isPrivate=!0,$fz),"~A");c$.checkGromacs=$_M(c$,"checkGromacs",($fz=function(a){if(-2147483648==J.util.Parser.parseInt(a[1]))return!1;for(var b=-1,c=2;16>c&&0!=b;c++)if(69!=(b=a[c].length)&&45!=b&&0!=b)return!1;return!0},$fz.isPrivate=!0,$fz),"~A");c$.checkMol=$_M(c$,"checkMol",($fz=function(a){var b=("X"+a[3]).trim().toUpperCase();if(7>b.length||0<=b.indexOf("."))return!1;if(b.endsWith("V2000")||b.endsWith("V3000"))return!0;try{var c=Integer.parseInt(a[3].substring(0,3).trim()),d=Integer.parseInt(a[3].substring(3,
6).trim());return 0<c&&0<=d&&0!=a[0].indexOf("@<TRIPOS>")&&0!=a[1].indexOf("@<TRIPOS>")&&0!=a[2].indexOf("@<TRIPOS>")}catch(e){if(!Clazz.exceptionOf(e,NumberFormatException))throw e;}return!1},$fz.isPrivate=!0,$fz),"~A");c$.checkMopacGraphf=$_M(c$,"checkMopacGraphf",($fz=function(a){return 2<a[0].indexOf("MOPAC-Graphical data")},$fz.isPrivate=!0,$fz),"~A");c$.checkOdyssey=$_M(c$,"checkOdyssey",($fz=function(a){var b;for(b=0;b<a.length&&(a[b].startsWith("C ")||0==a[b].length);b++);if(b>=a.length||
" "!=a[b].charAt(0)||(b+=2)+1>=a.length)return!1;try{var c=Integer.parseInt(a[b].substring(2).trim()),d=Integer.parseInt(a[b].substring(0,2).trim()),e=Integer.parseInt(a[++b].substring(0,2).trim());if(0>c||5<c||0>=e||5<d)return!1;var f=J.adapter.smarter.AtomSetCollectionReader.getTokensFloat(a[b],null,5);return!Float.isNaN(f[1])&&!Float.isNaN(f[2])&&!Float.isNaN(f[3])&&Float.isNaN(f[4])}catch(g){if(!Clazz.exceptionOf(g,Exception))throw g;}return!1},$fz.isPrivate=!0,$fz),"~A");c$.checkWien2k=$_M(c$,
"checkWien2k",($fz=function(a){return a[2].startsWith("MODE OF CALC=")||a[2].startsWith("             RELA")||a[2].startsWith("             NREL")},$fz.isPrivate=!0,$fz),"~A");c$.checkXyz=$_M(c$,"checkXyz",($fz=function(a){try{return Integer.parseInt(a[0].trim()),!0}catch(b){if(!Clazz.exceptionOf(b,NumberFormatException))throw b;}return!1},$fz.isPrivate=!0,$fz),"~A");Clazz.defineStatics(c$,"classBase","J.adapter.readers.");c$.readerSets=c$.prototype.readerSets="cifpdb. ;Cif;Pdb; 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; pymol. ;PyMOL; simple. ;Alchemy;Ampac;Cube;FoldingXyz;GhemicalMM;HyperChem;Jme;Mopac;MopacArchive;ZMatrix; xtal. ;Aims;Castep;Crystal;Dmol;Espresso;Gulp;MagRes;Shelx;Siesta;VaspOutcar;VaspPoscar;Wien2k;Xcrysden;".split(" ");
Clazz.defineStatics(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"],"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"],"pymolStartRecords",["PyMOL","}q"]);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];Clazz.defineStatics(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];Clazz.defineStatics(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"],"mopacArchiveContainsRecords",["MopacArchive","SUMMARY OF PM"]);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]}),Clazz.declarePackage("J.api"),
c$=Clazz.declareType(J.api,"JmolAdapterStructureIterator"),Clazz.declarePackage("J.adapter.smarter"),Clazz.load(["J.api.JmolAdapterStructureIterator"],"J.adapter.smarter.StructureIterator",["J.api.JmolAdapter"],function(){c$=Clazz.decorateAsClass(function(){this.structureCount=0;this.structure=this.structures=null;this.istructure=0;this.bsModelsDefined=null;Clazz.instantialize(this,arguments)},J.adapter.smarter,"StructureIterator",J.api.JmolAdapterStructureIterator);Clazz.makeConstructor(c$,function(a){Clazz.superConstructor(this,
J.adapter.smarter.StructureIterator,[]);this.structureCount=a.getStructureCount();this.structures=a.getStructures();this.istructure=0;this.bsModelsDefined=a.bsStructuredModels},"J.adapter.smarter.AtomSetCollection");Clazz.overrideMethod(c$,"hasNext",function(){if(this.istructure==this.structureCount)return!1;this.structure=this.structures[this.istructure++];return!0});Clazz.overrideMethod(c$,"getModelIndex",function(){return this.structure.atomSetIndex});Clazz.overrideMethod(c$,"getStructureType",
function(){return this.structure.structureType});Clazz.overrideMethod(c$,"getSubstructureType",function(){return this.structure.substructureType});Clazz.overrideMethod(c$,"getStructureID",function(){return this.structure.structureID});Clazz.overrideMethod(c$,"getSerialID",function(){return this.structure.serialID});Clazz.overrideMethod(c$,"getStartChainID",function(){return J.api.JmolAdapter.canonizeChainID(this.structure.startChainID)});Clazz.overrideMethod(c$,"getStartSequenceNumber",function(){return this.structure.startSequenceNumber});
Clazz.overrideMethod(c$,"getStartInsertionCode",function(){return J.api.JmolAdapter.canonizeInsertionCode(this.structure.startInsertionCode)});Clazz.overrideMethod(c$,"getEndChainID",function(){return J.api.JmolAdapter.canonizeChainID(this.structure.endChainID)});Clazz.overrideMethod(c$,"getEndSequenceNumber",function(){return this.structure.endSequenceNumber});Clazz.overrideMethod(c$,"getEndInsertionCode",function(){return this.structure.endInsertionCode});Clazz.overrideMethod(c$,"getStrandCount",
function(){return this.structure.strandCount});Clazz.overrideMethod(c$,"getStructuredModels",function(){return this.bsModelsDefined});Clazz.overrideMethod(c$,"getStartIndex",function(){return this.structure.istart});Clazz.overrideMethod(c$,"getEndIndex",function(){return this.structure.iend})}),Clazz.declarePackage("J.modelset"),Clazz.load(["java.lang.Short","java.util.Hashtable","J.viewer.JC"],"J.modelset.Group","java.lang.Float J.constant.EnumStructure J.util.ArrayUtil $.BS $.BSUtil $.Logger $.P3 $.Quaternion $.V3".split(" "),
function(){c$=Clazz.decorateAsClass(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;Clazz.instantialize(this,arguments)},J.modelset,"Group");$_M(c$,"getGroupIndex",function(){return this.groupIndex});$_M(c$,"setGroupIndex",function(a){this.groupIndex=a},"~N");Clazz.makeConstructor(c$,
function(){});$_M(c$,"setGroup",function(a,c,d,e,f){this.chain=a;this.seqcode=d;null==c&&(c="");this.groupID=J.modelset.Group.getGroupIdFor(c);this.$isProtein=1<=this.groupID&&24>this.groupID;this.firstAtomIndex=e;this.lastAtomIndex=f;return this},"J.modelset.Chain,~S,~N,~N,~N");$_M(c$,"calcBioParameters",function(){return!1});$_M(c$,"haveParameters",function(){return!0});$_M(c$,"setGroupParameter",function(a,c){switch(a){case 1112539143:this.phi=c;break;case 1112539144:this.psi=c;break;case 1112539142:this.omega=
c;break;case 1112539140:this.mu=c;break;case 1112539150:this.theta=c;break;case 1112539148:this.straightness=c}},"~N,~N");$_M(c$,"getGroupParameter",function(a){this.haveParameters()||this.calcBioParameters();switch(a){case 1112539142:return this.omega;case 1112539143:return this.phi;case 1112539144:return this.psi;case 1112539140:return this.mu;case 1112539150:return this.theta;case 1112539148:return this.straightness}return NaN},"~N");$_M(c$,"setModelSet",function(a){this.chain.model.modelSet=a},
"J.modelset.ModelSet");$_M(c$,"setShapeVisibility",function(a,c){this.shapeVisibilityFlags=c?this.shapeVisibilityFlags|a:this.shapeVisibilityFlags&~a},"~N,~B");$_M(c$,"getGroup3",function(){return J.modelset.Group.group3Names[this.groupID]});c$.getGroup3For=$_M(c$,"getGroup3For",function(a){return J.modelset.Group.group3Names[a]},"~N");$_M(c$,"getGroup1",function(){return this.groupID>=J.viewer.JC.predefinedGroup1Names.length?"?":J.viewer.JC.predefinedGroup1Names[this.groupID]});$_M(c$,"getGroupID",
function(){return this.groupID});$_M(c$,"getChainID",function(){return this.chain.chainID});$_M(c$,"getBioPolymerLength",function(){return 0});$_M(c$,"getMonomerIndex",function(){return-1});$_M(c$,"getGroups",function(){return null});$_M(c$,"getStructure",function(){return null});$_M(c$,"getStrucNo",function(){return 0});$_M(c$,"getProteinStructureType",function(){return J.constant.EnumStructure.NOT});$_M(c$,"getProteinStructureSubType",function(){return this.getProteinStructureType()});$_M(c$,"setProteinStructureType",
function(){return-1},"J.constant.EnumStructure,~N");$_M(c$,"isProtein",function(){return this.$isProtein});$_M(c$,"isNucleic",function(){return 24<=this.groupID&&42>this.groupID});$_M(c$,"isDna",function(){return!1});$_M(c$,"isRna",function(){return!1});$_M(c$,"isPurine",function(){return!1});$_M(c$,"isPyrimidine",function(){return!1});$_M(c$,"isCarbohydrate",function(){return!1});c$.addGroup3Name=$_M(c$,"addGroup3Name",function(a){J.modelset.Group.group3NameCount==J.modelset.Group.group3Names.length&&
($t$=J.modelset.Group.group3Names=J.util.ArrayUtil.doubleLengthS(J.modelset.Group.group3Names),J.modelset.Group.prototype.group3Names=J.modelset.Group.group3Names,$t$);var c=($t$=J.modelset.Group.group3NameCount++,J.modelset.Group.prototype.group3NameCount=J.modelset.Group.group3NameCount,$t$);J.modelset.Group.group3Names[c]=a;J.modelset.Group.htGroup.put(a,Short.$valueOf(c));return c},"~S");c$.getGroupIdFor=$_M(c$,"getGroupIdFor",function(a){if(null==a)return-1;var c=J.modelset.Group.lookupGroupID(a);
return-1!=c?c:J.modelset.Group.addGroup3Name(a)},"~S");c$.lookupGroupID=$_M(c$,"lookupGroupID",function(a){return null!=a&&(a=J.modelset.Group.htGroup.get(a),null!=a)?a.shortValue():-1},"~S");$_M(c$,"getResno",function(){return-2147483648==this.seqcode?0:this.seqcode>>8});$_M(c$,"getSeqcode",function(){return this.seqcode});$_M(c$,"getSeqNumber",function(){return this.seqcode>>8});c$.getSeqNumberFor=$_M(c$,"getSeqNumberFor",function(a){return J.modelset.Group.haveSequenceNumber(a)?a>>8:2147483647},
"~N");c$.haveSequenceNumber=$_M(c$,"haveSequenceNumber",function(a){return 0!=(a&128)},"~N");$_M(c$,"getSeqcodeString",function(){return J.modelset.Group.getSeqcodeStringFor(this.seqcode)});c$.getSeqcodeFor=$_M(c$,"getSeqcodeFor",function(a,c){if(-2147483648==a)return a;"A"<=c&&"Z">=c||("a"<=c&&"z">=c||"0"<=c&&"9">=c||"?"==c||"*"==c)||(" "!=c&&"\x00"!=c&&J.util.Logger.warn("unrecognized insertionCode:"+c),c="\x00");return(2147483647==a?0:a<<8|128)+c.charCodeAt(0)},"~N,~S");c$.getSeqcodeStringFor=
$_M(c$,"getSeqcodeStringFor",function(a){return-2147483648==a?null:0==(a&127)?""+(a>>8):""+(a>>8)+"^"+String.fromCharCode(a&127)},"~N");$_M(c$,"getInsertionCode",function(){return-2147483648==this.seqcode?"\x00":String.fromCharCode(this.seqcode&127)});c$.getInsertionCodeFor=$_M(c$,"getInsertionCodeFor",function(a){return a&127},"~N");c$.getInsertionCodeChar=$_M(c$,"getInsertionCodeChar",function(a){return-2147483648==a?"\x00":String.fromCharCode(a&127)},"~N");$_M(c$,"isAdded",function(a){return null!=
this.bsAdded&&this.bsAdded.get(a)},"~N");$_M(c$,"addAtoms",function(a){null==this.bsAdded&&(this.bsAdded=new J.util.BS);this.bsAdded.set(a)},"~N");$_M(c$,"selectAtoms",function(a){a.setBits(this.firstAtomIndex,this.lastAtomIndex+1);null!=this.bsAdded&&a.or(this.bsAdded);return this.lastAtomIndex},"J.util.BS");$_M(c$,"isSelected",function(a){var c=a.nextSetBit(this.firstAtomIndex);return 0<=c&&c<=this.lastAtomIndex||null!=this.bsAdded&&this.bsAdded.intersects(a)},"J.util.BS");$_M(c$,"isHetero",function(){return this.chain.getAtom(this.firstAtomIndex).isHetero()});
Clazz.overrideMethod(c$,"toString",function(){return"["+this.getGroup3()+"-"+this.getSeqcodeString()+"]"});$_M(c$,"scaleToScreen",function(a,c){return this.chain.model.modelSet.viewer.scaleToScreen(a,c)},"~N,~N");$_M(c$,"isCursorOnTopOf",function(a,c,d,e,f){return this.chain.model.modelSet.isCursorOnTopOf(a,c,d,e,f)},"J.modelset.Atom,~N,~N,~N,J.modelset.Atom");$_M(c$,"isAtomHidden",function(a){return this.chain.model.modelSet.isAtomHidden(a)},"~N");$_M(c$,"getModel",function(){return this.chain.model});
$_M(c$,"getModelIndex",function(){return this.chain.model.modelIndex});$_M(c$,"getSelectedMonomerCount",function(){return 0});$_M(c$,"getSelectedMonomerIndex",function(){return-1});$_M(c$,"getSelectedGroupIndex",function(){return this.selectedIndex});$_M(c$,"isLeadAtom",function(){return!1},"~N");$_M(c$,"getLeadAtomOr",function(a){var c=this.getLeadAtom();return null==c?a:c},"J.modelset.Atom");$_M(c$,"getLeadAtom",function(){return null});$_M(c$,"getQuaternion",function(){return null},"~S");$_M(c$,
"getQuaternionFrame",function(a){if(3>this.lastAtomIndex-this.firstAtomIndex)return null;var c=this.firstAtomIndex;return J.util.Quaternion.getQuaternionFrame(a[c],a[++c],a[++c])},"~A");$_M(c$,"setStrucNo",function(){},"~N");$_M(c$,"getHelixData",function(a){switch(a){case 135266320:return new J.util.P3;case 1073741854:case 1666189314:return new J.util.V3;case 135266305:return Float.$valueOf(NaN);case 135266306:case 1073742001:return[]}return""},"~N,~S,~N");$_M(c$,"isWithinStructure",function(){return!1},
"J.constant.EnumStructure");$_M(c$,"getProteinStructureTag",function(){return null});$_M(c$,"getStructureId",function(){return""});$_M(c$,"getBioPolymerIndexInModel",function(){return-1});$_M(c$,"isCrossLinked",function(){return!1},"J.modelset.Group");$_M(c$,"getCrossLinkLead",function(){return!1},"J.util.JmolList");$_M(c$,"isConnectedPrevious",function(){return!1});$_M(c$,"getNitrogenAtom",function(){return null});$_M(c$,"getCarbonylOxygenAtom",function(){return null});$_M(c$,"fixIndices",function(a,
c){this.firstAtomIndex-=a;this.leadAtomIndex-=a;this.lastAtomIndex-=a;null!=this.bsAdded&&J.util.BSUtil.deleteBits(this.bsAdded,c)},"~N,J.util.BS");$_M(c$,"getGroupInfo",function(a){var c=new java.util.Hashtable;c.put("groupIndex",Integer.$valueOf(a));c.put("groupID",Short.$valueOf(this.groupID));a=this.getSeqcodeString();null!=a&&c.put("seqCode",a);c.put("_apt1",Integer.$valueOf(this.firstAtomIndex));c.put("_apt2",Integer.$valueOf(this.lastAtomIndex));null!=this.bsAdded&&c.put("addedAtoms",this.bsAdded);
c.put("atomInfo1",this.chain.model.modelSet.getAtomInfo(this.firstAtomIndex,null));c.put("atomInfo2",this.chain.model.modelSet.getAtomInfo(this.lastAtomIndex,null));c.put("visibilityFlags",Integer.$valueOf(this.shapeVisibilityFlags));return c},"~N");$_M(c$,"getMinZ",function(a,c){c[0]=2147483647;for(var d=this.firstAtomIndex;d<=this.lastAtomIndex;d++)this.checkMinZ(a[d],c);if(null!=this.bsAdded)for(d=this.bsAdded.nextSetBit(0);0<=d;d=this.bsAdded.nextSetBit(d+1))this.checkMinZ(a[d],c)},"~A,~A");$_M(c$,
"checkMinZ",($fz=function(a,c){var d=a.screenZ-Clazz.doubleToInt(a.screenDiameter/2)-2;d<c[0]&&(c[0]=Math.max(1,d))},$fz.isPrivate=!0,$fz),"J.modelset.Atom,~A");Clazz.defineStatics(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);Clazz.defineStatics(c$,"group3NameCount",0);for(var a=0;a<J.viewer.JC.predefinedGroup3Names.length;++a)J.modelset.Group.addGroup3Name(J.viewer.JC.predefinedGroup3Names[a])}),
Clazz.declarePackage("J.adapter.smarter"),Clazz.load(["J.util.P3"],"J.adapter.smarter.Atom",["java.lang.Float"],function(){c$=Clazz.decorateAsClass(function(){this.atomIndex=this.atomSetIndex=0;this.bsSymmetry=null;this.atomSite=0;this.elementSymbol=null;this.elementNumber=-1;this.atomName=null;this.formalCharge=-2147483648;this.bfactor=this.vectorZ=this.vectorY=this.vectorX=this.partialCharge=NaN;this.occupancy=100;this.radius=NaN;this.isHetero=!1;this.atomSerial=-2147483648;this.alternateLocationID=
this.chainID="\x00";this.group3=null;this.sequenceNumber=-2147483648;this.insertionCode="\x00";this.ellipsoid=this.anisoBorU=null;this.ignoreSymmetry=!1;Clazz.instantialize(this,arguments)},J.adapter.smarter,"Atom",J.util.P3,Cloneable);$_M(c$,"setEllipsoid",function(a){null!=a&&(null!=this.ellipsoid&&3==this.ellipsoid.length?this.ellipsoid[0]=a:this.ellipsoid=[a])},"J.util.Quadric");Clazz.overrideConstructor(c$,function(){this.set(NaN,NaN,NaN)});$_M(c$,"getClone",function(){return this.clone()});
$_M(c$,"getElementSymbol",function(){if(null==this.elementSymbol&&null!=this.atomName){for(var a=this.atomName.length,b=0,c=String.fromCharCode(0);b<a&&!J.adapter.smarter.Atom.isValidFirstSymbolChar(c=this.atomName.charAt(b));)++b;switch(a-b){case 0:break;default:if(a=this.atomName.charAt(b+1),J.adapter.smarter.Atom.isValidElementSymbolNoCaseSecondChar2(c,a)){this.elementSymbol=""+c+a;break}case 1:J.adapter.smarter.Atom.isValidElementSymbol(c)&&(this.elementSymbol=""+c)}}return this.elementSymbol});
c$.isValidElementSymbol=$_M(c$,"isValidElementSymbol",function(a){return"A"<=a&&"Z">=a&&0>J.adapter.smarter.Atom.elementCharMasks[a.charCodeAt(0)-65]},"~S");c$.isValidElementSymbol2=$_M(c$,"isValidElementSymbol2",function(a,b){return"A">a||"Z"<a||"a">b||"z"<b?!1:0!=(J.adapter.smarter.Atom.elementCharMasks[a.charCodeAt(0)-65]>>b.charCodeAt(0)-97&1)},"~S,~S");c$.isValidElementSymbolNoCaseSecondChar2=$_M(c$,"isValidElementSymbolNoCaseSecondChar2",function(a,b){"A"<=b&&"Z">=b&&(b=String.fromCharCode(b.charCodeAt(0)+
32));return"A">a||"Z"<a||"a">b||"z"<b?!1:0!=(J.adapter.smarter.Atom.elementCharMasks[a.charCodeAt(0)-65]>>b.charCodeAt(0)-97&1)},"~S,~S");c$.isValidFirstSymbolChar=$_M(c$,"isValidFirstSymbolChar",function(a){return"A"<=a&&"Z">=a&&0!=J.adapter.smarter.Atom.elementCharMasks[a.charCodeAt(0)-65]},"~S");c$.isValidElementSymbolNoCaseSecondChar=$_M(c$,"isValidElementSymbolNoCaseSecondChar",function(a){if(null==a)return!1;var b=a.length;if(0==b)return!1;var c=a.charAt(0);if(1==b)return J.adapter.smarter.Atom.isValidElementSymbol(c);
if(2<b)return!1;a=a.charAt(1);return J.adapter.smarter.Atom.isValidElementSymbolNoCaseSecondChar2(c,a)},"~S");$_M(c$,"scaleVector",function(a){Float.isNaN(this.vectorX)||(this.vectorX*=a,this.vectorY*=a,this.vectorZ*=a)},"~N");Clazz.defineStatics(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])}),Clazz.declarePackage("J.adapter.smarter"),c$=Clazz.decorateAsClass(function(){this.atomSetIndex=0;Clazz.instantialize(this,arguments)},J.adapter.smarter,"AtomSetObject"),Clazz.declarePackage("J.adapter.smarter"),Clazz.load(["J.adapter.smarter.AtomSetObject"],"J.adapter.smarter.Bond",null,function(){c$=Clazz.decorateAsClass(function(){this.order=this.atomIndex2=this.atomIndex1=0;this.colix=this.radius=-1;Clazz.instantialize(this,arguments)},J.adapter.smarter,"Bond",J.adapter.smarter.AtomSetObject);
Clazz.makeConstructor(c$,function(a,b,c){Clazz.superConstructor(this,J.adapter.smarter.Bond,[]);this.atomIndex1=a;this.atomIndex2=b;this.order=c},"~N,~N,~N")}),Clazz.declarePackage("J.util"),c$=Clazz.decorateAsClass(function(){this.z=this.y=this.x=0;Clazz.instantialize(this,arguments)},J.util,"Tuple3i",null,java.io.Serializable),Clazz.makeConstructor(c$,function(){}),$_M(c$,"set",function(a,b,c){this.x=a;this.y=b;this.z=c},"~N,~N,~N"),$_M(c$,"setT",function(a){this.x=a.x;this.y=a.y;this.z=a.z},"J.util.Tuple3i"),
$_M(c$,"add",function(a){this.x+=a.x;this.y+=a.y;this.z+=a.z},"J.util.Tuple3i"),$_M(c$,"scaleAdd",function(a,b,c){this.x=a*b.x+c.x;this.y=a*b.y+c.y;this.z=a*b.z+c.z},"~N,J.util.Tuple3i,J.util.Tuple3i"),Clazz.overrideMethod(c$,"hashCode",function(){return this.x^this.y^this.z}),Clazz.overrideMethod(c$,"equals",function(a){return!Clazz.instanceOf(a,J.util.Tuple3i)?!1:this.x==a.x&&this.y==a.y&&this.z==a.z},"~O"),Clazz.overrideMethod(c$,"toString",function(){return"("+this.x+", "+this.y+", "+this.z+")"}),
Clazz.declarePackage("J.util"),Clazz.load(["J.util.Tuple3i"],"J.util.P3i",null,function(){c$=Clazz.declareType(J.util,"P3i",J.util.Tuple3i);c$.new3=$_M(c$,"new3",function(a,b,c){var d=new J.util.P3i;d.x=a;d.y=b;d.z=c;return d},"~N,~N,~N")}),Clazz.declarePackage("J.constant"),Clazz.load(["java.lang.Enum"],"J.constant.EnumStructure",null,function(){c$=Clazz.decorateAsClass(function(){this.color=this.id=0;Clazz.instantialize(this,arguments)},J.constant,"EnumStructure",Enum);Clazz.makeConstructor(c$,
($fz=function(a,b){this.id=a;this.color=b},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"getId",function(){return this.id});$_M(c$,"getColor",function(){return this.color});c$.getProteinStructureType=$_M(c$,"getProteinStructureType",function(a){for(var b,c=0,d=J.constant.EnumStructure.values();c<d.length&&((b=d[c])||1);c++)if(a.equalsIgnoreCase(b.name()))return b.isProtein()?b:J.constant.EnumStructure.NOT;return J.constant.EnumStructure.NOT},"~S");$_M(c$,"getBioStructureTypeName",function(a){return 0>this.id?
"":a&&this.isProtein()?"protein":this.name()},"~B");$_M(c$,"isProtein",($fz=function(){return 0<=this.id&&3>=this.id||7<=this.id},$fz.isPrivate=!0,$fz));Clazz.defineEnumConstant(c$,"NOT",0,[-1,4286611584]);Clazz.defineEnumConstant(c$,"NONE",1,[0,4294967295]);Clazz.defineEnumConstant(c$,"TURN",2,[1,4284514559]);Clazz.defineEnumConstant(c$,"SHEET",3,[2,4294952960]);Clazz.defineEnumConstant(c$,"HELIX",4,[3,4294901888]);Clazz.defineEnumConstant(c$,"DNA",5,[4,4289593598]);Clazz.defineEnumConstant(c$,"RNA",
6,[5,4294771042]);Clazz.defineEnumConstant(c$,"CARBOHYDRATE",7,[6,4289111802]);Clazz.defineEnumConstant(c$,"HELIX310",8,[7,4288675968]);Clazz.defineEnumConstant(c$,"HELIXALPHA",9,[8,4294901888]);Clazz.defineEnumConstant(c$,"HELIXPI",10,[9,4284481664])}),$_L(["java.util.Enumeration"],"java.util.StringTokenizer",["java.lang.NullPointerException","java.util.NoSuchElementException"],function(){c$=$_C(function(){this.delimiters=this.string=null;this.returnDelimiters=!1;this.position=0;$_Z(this,arguments)},
java.util,"StringTokenizer",null,java.util.Enumeration);$_K(c$,function(a){this.construct(a," \t\n\r\f",!1)},"~S");$_K(c$,function(a,b){this.construct(a,b,!1)},"~S,~S");$_K(c$,function(a,b,c){if(null!=a)this.string=a,this.delimiters=b,this.returnDelimiters=c,this.position=0;else throw new NullPointerException;},"~S,~S,~B");$_M(c$,"countTokens",function(){for(var a=0,b=!1,c=this.position,d=this.string.length;c<d;c++)0<=this.delimiters.indexOf(this.string.charAt(c),0)?(this.returnDelimiters&&a++,b&&
(a++,b=!1)):b=!0;b&&a++;return a});$_V(c$,"hasMoreElements",function(){return this.hasMoreTokens()});$_M(c$,"hasMoreTokens",function(){var a=this.string.length;if(this.position<a){if(this.returnDelimiters)return!0;for(var b=this.position;b<a;b++)if(-1==this.delimiters.indexOf(this.string.charAt(b),0))return!0}return!1});$_V(c$,"nextElement",function(){return this.nextToken()});$_M(c$,"nextToken",function(){var a=this.position,b=this.string.length;if(a<b){if(this.returnDelimiters){if(0<=this.delimiters.indexOf(this.string.charAt(this.position),
0))return String.valueOf(this.string.charAt(this.position++));for(this.position++;this.position<b;this.position++)if(0<=this.delimiters.indexOf(this.string.charAt(this.position),0))return this.string.substring(a,this.position);return this.string.substring(a)}for(;a<b&&0<=this.delimiters.indexOf(this.string.charAt(a),0);)a++;this.position=a;if(a<b){for(this.position++;this.position<b;this.position++)if(0<=this.delimiters.indexOf(this.string.charAt(this.position),0))return this.string.substring(a,this.position);
return this.string.substring(a)}}throw new java.util.NoSuchElementException;});$_M(c$,"nextToken",function(a){this.delimiters=a;return this.nextToken()},"~S")}),Clazz.declarePackage("J.adapter.smarter"),Clazz.load(["J.util.SB"],"J.adapter.smarter.AtomSetCollectionReader","java.lang.Boolean $.Character $.Float J.adapter.smarter.Atom $.AtomSetCollection J.api.Interface $.JmolAdapter J.util.BS $.BSUtil $.JmolList $.Logger $.Matrix3f $.P3 $.Parser $.Quaternion $.TextFormat $.V3".split(" "),function(){c$=
Clazz.decorateAsClass(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.os=this.symmetry=null;this.doPackUnitCell=this.iHaveFractionalCoordinates=!1;this.loadNote=this.ptSupercell=this.strSupercell=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.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.matrixRotate=this.filter2=this.filter1=null;Clazz.instantialize(this,arguments)},J.adapter.smarter,
"AtomSetCollectionReader");Clazz.prepareFields(c$,function(){this.next=Clazz.newIntArray(1,0);this.loadNote=new J.util.SB});$_M(c$,"setup",function(a,b,c){this.htParams=b;this.filePath=a.$replace("\\","/");a=this.filePath.lastIndexOf("/");this.fileName=this.filePath.substring(a+1);Clazz.instanceOf(c,java.io.BufferedReader)?this.reader=c:Clazz.instanceOf(c,J.api.JmolDocument)&&(this.doc=c)},"~S,java.util.Map,~O");$_M(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.processBinaryDocument(this.doc);this.finalizeReader()}catch(a){System.out.println(a),this.setError(a)}null!=this.reader&&this.reader.close();null!=this.doc&&this.doc.close();return this.finish()});$_M(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");$_M(c$,"processDOM",function(){},"~O");$_M(c$,"processBinaryDocument",function(){},"J.api.JmolDocument");$_M(c$,"initializeReader",function(){});$_M(c$,"checkLine",function(){return!0});$_M(c$,"checkLastModel",function(){if(this.isLastModel(this.modelNumber)&&this.doProcessLines)return this.continuing=!1;this.doProcessLines=!1;return!0});$_M(c$,"isLastModel",function(a){return 0<this.desiredModelNumber||a>=this.lastModelNumber},
"~N");$_M(c$,"appendLoadNote",function(a){this.loadNote.append(a).append("\n");J.util.Logger.info(a);return a},"~S");$_M(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 J.util.JmolList)});$_M(c$,"finalizeReader",function(){this.applySymmetryAndSetTrajectory();0<this.loadNote.length()&&this.atomSetCollection.setAtomSetCollectionAuxiliaryInfo("modelLoadNote",
this.loadNote.toString());this.doCentralize&&this.atomSetCollection.centralize()});$_M(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"))});$_M(c$,"setPdb",function(){});$_M(c$,"finish",($fz=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 b=a=this.atomSetCollection.getFileTypeName();0<=b.indexOf("(")&&(b=b.substring(0,b.indexOf("(")));for(var c=this.atomSetCollection.getAtomSetCount();0<=--c;)this.atomSetCollection.setAtomSetAuxiliaryInfoForSet("fileName",this.filePath,c),this.atomSetCollection.setAtomSetAuxiliaryInfoForSet("fileType",b,c);this.atomSetCollection.freeze(this.reverseModels);return null!=this.atomSetCollection.errorMessage?this.atomSetCollection.errorMessage+"\nfor file "+this.filePath+"\ntype "+
a:0==(null==this.atomSetCollection.bsAtoms?this.atomSetCollection.getAtomCount():this.atomSetCollection.bsAtoms.cardinality())&&0>b.indexOf("DataOnly")&&null==this.atomSetCollection.getAtomSetCollectionAuxiliaryInfo("dataOnly")?"No atoms found\nfor file "+this.filePath+"\ntype "+a:this.atomSetCollection},$fz.isPrivate=!0,$fz));$_M(c$,"setError",($fz=function(a){a=a.getMessage?a.getMessage():a.toString();this.atomSetCollection.errorMessage=null==this.line?"Error reading file at end of file \n"+a:"Error reading file at line "+
this.ptLine+":\n"+this.line+"\n"+a},$fz.isPrivate=!0,$fz),"Throwable");$_M(c$,"initialize",($fz=function(){var a=this.htParams.get("supercell");Clazz.instanceOf(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("OutputStream")&&(this.os=this.htParams.get("OutputStream"));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),Clazz.instanceOf(a,J.util.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.latticeCells=Clazz.newIntArray(3,0);if(this.htParams.containsKey("lattice")){a=
this.htParams.get("lattice");this.latticeCells[0]=Clazz.floatToInt(a.x);this.latticeCells[1]=Clazz.floatToInt(a.y);this.latticeCells[2]=Clazz.floatToInt(a.z);if((this.doCentroidUnitCell=this.htParams.containsKey("centroid"))&&(-1==this.latticeCells[2]||0==this.latticeCells[2]))this.latticeCells[2]=1;this.centroidPacked=this.doCentroidUnitCell&&this.htParams.containsKey("packed");this.doPackUnitCell=!this.doCentroidUnitCell&&(this.htParams.containsKey("packed")||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);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=J.util.P3.new3(1,1,1),this.fileOffset=this.htParams.get("unitCellOffset"),this.fileOffsetFractional=J.util.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))},$fz.isPrivate=!0,$fz));$_M(c$,"doGetModel",function(a,b){if(null!=b&&null!=this.nameRequired&&0<this.nameRequired.length&&0>b.toUpperCase().indexOf(this.nameRequired))return!1;var c=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]);c&&0==this.desiredModelNumber&&this.atomSetCollection.discardPreviousAtoms();this.haveModel=(new Boolean(this.haveModel|c)).valueOf();c&&(this.doProcessLines=!0);return c},"~N,~S");$_M(c$,"initializeSymmetry",function(){this.previousSpaceGroup=this.spaceGroup;this.previousUnitCell=this.notionalUnitCell;this.iHaveUnitCell=this.ignoreFileUnitCell;if(!this.ignoreFileUnitCell){this.notionalUnitCell=
Clazz.newFloatArray(25,0);for(var a=25;0<=--a;)this.notionalUnitCell[a]=NaN;null!=this.ptSupercell&&(this.notionalUnitCell[22]=Math.max(1,Clazz.floatToInt(this.ptSupercell.x)),this.notionalUnitCell[23]=Math.max(1,Clazz.floatToInt(this.ptSupercell.y)),this.notionalUnitCell[24]=Math.max(1,Clazz.floatToInt(this.ptSupercell.z)));this.symmetry=null}this.ignoreFileSpaceGroupName||(this.spaceGroup="unspecified!");this.doCheckUnitCell=!1});$_M(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");$_M(c$,"cloneLastAtomSet",function(a,b){var c=this.atomSetCollection.getLastAtomSetAtomCount();this.atomSetCollection.cloneLastAtomSetFromPoints(a,b);this.atomSetCollection.haveUnitCell&&
(this.doCheckUnitCell=this.iHaveUnitCell=!0,this.spaceGroup=this.previousSpaceGroup,this.notionalUnitCell=this.previousUnitCell);return c},"~N,~A");$_M(c$,"setSpaceGroupName",function(a){this.ignoreFileSpaceGroupName||(this.spaceGroup=a.trim(),J.util.Logger.info("Setting space group name to "+this.spaceGroup))},"~S");$_M(c$,"setSymmetryOperator",function(a){this.ignoreFileSymmetryOperators||(this.atomSetCollection.setLatticeCells(this.latticeCells,this.applySymmetryToBonds,this.doPackUnitCell,this.doCentroidUnitCell,
this.centroidPacked,this.strSupercell,this.ptSupercell),this.atomSetCollection.addSpaceGroupOperation(a)||J.util.Logger.warn("Skipping symmetry operation "+a),this.iHaveSymmetryOperators=!0)},"~S");$_M(c$,"initializeCartesianToFractional",($fz=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},$fz.isPrivate=!0,$fz));$_M(c$,"clearUnitCell",function(){if(!this.ignoreFileUnitCell){for(var a=
6;22>a;a++)this.notionalUnitCell[a]=NaN;this.checkUnitCell(6)}});$_M(c$,"setUnitCellItem",function(a,b){if(!this.ignoreFileUnitCell&&!(0==a&&1==b||3==a&&0==b))!Float.isNaN(b)&&(6<=a&&Float.isNaN(this.notionalUnitCell[6]))&&this.initializeCartesianToFractional(),this.notionalUnitCell[a]=b,J.util.Logger.debugging&&J.util.Logger.debug("setunitcellitem "+a+" "+b),6>a||Float.isNaN(b)?this.iHaveUnitCell=this.checkUnitCell(6):12==++this.nMatrixElements&&this.checkUnitCell(22)},"~N,~N");$_M(c$,"setUnitCell",
function(a,b,c,d,e,f){this.ignoreFileUnitCell||(this.clearUnitCell(),this.notionalUnitCell[0]=a,this.notionalUnitCell[1]=b,this.notionalUnitCell[2]=c,0!=d&&(this.notionalUnitCell[3]=d),0!=e&&(this.notionalUnitCell[4]=e),0!=f&&(this.notionalUnitCell[5]=f),this.iHaveUnitCell=this.checkUnitCell(6))},"~N,~N,~N,~N,~N,~N");$_M(c$,"addPrimitiveLatticeVector",function(a,b,c){if(!this.ignoreFileUnitCell){if(0==a)for(var d=0;6>d;d++)this.notionalUnitCell[d]=0;a=6+3*a;this.notionalUnitCell[a++]=b[c++];this.notionalUnitCell[a++]=
b[c++];this.notionalUnitCell[a]=b[c];if(Float.isNaN(this.notionalUnitCell[0]))for(a=0;6>a;a++)this.notionalUnitCell[a]=-1;this.iHaveUnitCell=this.checkUnitCell(15)}},"~N,~A,~N");$_M(c$,"checkUnitCell",($fz=function(a){for(var b=0;b<a;b++)if(Float.isNaN(this.notionalUnitCell[b]))return!1;this.getSymmetry().setUnitCell(this.notionalUnitCell);this.doApplySymmetry&&(this.doConvertToFractional=!this.fileCoordinatesAreFractional);this.checkUnitCellOffset();return!0},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"checkUnitCellOffset",
($fz=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)))},$fz.isPrivate=!0,$fz));$_M(c$,"getSymmetry",function(){return this.symmetry=J.api.Interface.getOptionInterface("symmetry.Symmetry")});$_M(c$,"setFractionalCoordinates",function(a){this.iHaveFractionalCoordinates=
this.fileCoordinatesAreFractional=a;this.checkUnitCellOffset()},"~B");$_M(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=J.util.TextFormat.splitChars(this.nameRequired,"'")[1]:this.nameRequired.startsWith('"')&&(this.nameRequired=J.util.TextFormat.splitChars(this.nameRequired,'"')[1]),this.filter=J.util.TextFormat.simpleReplace(this.filter,this.nameRequired,""),this.filter=J.util.TextFormat.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 J.util.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");$_M(c$,"checkFilterKey",function(a){return null!=this.filter&&0<=this.filter.indexOf(a)},"~S");$_M(c$,"filterAtom",function(a,b){if(!this.haveAtomFilter)return!0;var c=this.checkFilter(a,this.filter1);null!=this.filter2&&(c=(new Boolean(c|this.checkFilter(a,this.filter2))).valueOf());c&&this.filterEveryNth&&(c=0==this.nFiltered++%this.filterN);this.bsFilter.setBitTo(0<=b?b:this.atomSetCollection.getAtomCount(),
c);return c},"J.adapter.smarter.Atom,~N");$_M(c$,"checkFilter",($fz=function(a,b){return(!this.filterGroup3||null==a.group3||!this.filterReject(b,"[",a.group3.toUpperCase()+"]"))&&(!this.filterAtomName||null==a.atomName||!this.filterReject(b,".",a.atomName.toUpperCase()+(null==this.filterAtomTypeStr?";":"\x00")))&&(null==this.filterAtomTypeStr||null==a.atomName||0<=a.atomName.toUpperCase().indexOf("\x00"+this.filterAtomTypeStr))&&(!this.filterElement||null==a.elementSymbol||!this.filterReject(b,"_",
a.elementSymbol.toUpperCase()+";"))&&(!this.filterChain||"\x00"==a.chainID||!this.filterReject(b,":",""+a.chainID))&&(!this.filterAltLoc||"\x00"==a.alternateLocationID||!this.filterReject(b,"%",""+a.alternateLocationID))&&(!this.filterHetero||!this.filterReject(b,"HETATM",a.isHetero?"HETATM":"ATOM"))},$fz.isPrivate=!0,$fz),"J.adapter.smarter.Atom,~S");$_M(c$,"filterReject",function(a,b,c){return 0<=a.indexOf(b)&&(0<=a.indexOf("!"+b)?0<=a.indexOf(b+c):0>a.indexOf(b+c))},"~S,~S,~S");$_M(c$,"set2D",
function(){this.atomSetCollection.setAtomSetCollectionAuxiliaryInfo("is2D",Boolean.TRUE);this.checkFilterKey("NOMIN")||this.atomSetCollection.setAtomSetCollectionAuxiliaryInfo("doMinimize",Boolean.TRUE)});$_M(c$,"doGetVibration",function(a){return this.addVibrations&&(0>=this.desiredVibrationNumber||a==this.desiredVibrationNumber)},"~N");$_M(c$,"setTransform",function(a,b,c,d,e,f,g,h,k){if(null==this.matrixRotate&&this.doSetOrientation){this.matrixRotate=new J.util.Matrix3f;var l=new J.util.V3;l.set(a,
b,c);l.normalize();this.matrixRotate.setColumnV(0,l);l.set(d,e,f);l.normalize();this.matrixRotate.setColumnV(1,l);l.set(g,h,k);l.normalize();this.matrixRotate.setColumnV(2,l);this.atomSetCollection.setAtomSetCollectionAuxiliaryInfo("defaultOrientationMatrix",J.util.Matrix3f.newM(this.matrixRotate));a=J.util.Quaternion.newM(this.matrixRotate);this.atomSetCollection.setAtomSetCollectionAuxiliaryInfo("defaultOrientationQuaternion",a);J.util.Logger.info("defaultOrientationMatrix = "+this.matrixRotate)}},
"~N,~N,~N,~N,~N,~N,~N,~N,~N");$_M(c$,"setAtomCoordXYZ",function(a,b,c,d){a.set(b,c,d);this.setAtomCoord(a)},"J.adapter.smarter.Atom,~N,~N,~N");$_M(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");$_M(c$,"addSites",function(a){this.atomSetCollection.setAtomSetAuxiliaryInfo("pdbSites",a);var b="",c;for(a=a.entrySet().iterator();a.hasNext()&&((c=a.next())||1);){for(var d=c.getKey(),e=c.getValue(),f,g=d.length;0<=--g;)if(!Character.isLetterOrDigit(f=d.charAt(g))&&"'"!=f)d=d.substring(0,g)+"_"+d.substring(g+1);e=e.get("groups");0!=e.length&&(this.addSiteScript("@site_"+d+" "+
e),this.addSiteScript("site_"+d+' = "'+e+'".split(",")'),b+=(""===b?"":",")+"site_"+d)}this.addSiteScript('site_list = "'+b+'".split(",")')},"java.util.Map");$_M(c$,"applySymmetryAndSetTrajectory",function(){if(this.iHaveUnitCell&&this.doCheckUnitCell){this.atomSetCollection.setCoordinatesAreFractional(this.iHaveFractionalCoordinates);this.atomSetCollection.setNotionalUnitCell(this.notionalUnitCell,this.matUnitCellOrientation,this.unitCellOffset);this.atomSetCollection.setAtomSetSpaceGroupName(this.spaceGroup);
this.atomSetCollection.setSymmetryRange(this.symmetryRange);if(this.doConvertToFractional||this.fileCoordinatesAreFractional)if(this.atomSetCollection.setLatticeCells(this.latticeCells,this.applySymmetryToBonds,this.doPackUnitCell,this.doCentroidUnitCell,this.centroidPacked,this.strSupercell,this.ptSupercell),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.setAtomSetSpaceGroupName(this.symmetry.getSpaceGroupName()),this.atomSetCollection.applySymmetryUsing(this.symmetry)}else this.atomSetCollection.applySymmetry();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()});
$_M(c$,"setMOData",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=$_M(c$,"getElementSymbol",function(a){return J.api.JmolAdapter.getElementSymbol(a)},"~N");$_M(c$,"fillDataBlockFixed",function(a,b,c,d){if(0==c)this.fillDataBlock(a,d);else{d=a.length;for(var e=0;e<d;e++){this.discardLinesUntilNonBlank();
var f=Clazz.doubleToInt((this.line.length-b+1)/c);a[e]=Array(f);for(var g=0,h=b;g<f;g++,h+=c)a[e][g]=this.line.substring(h,Math.min(this.line.length,h+c))}}},"~A,~N,~N,~N");$_M(c$,"fillDataBlock",function(a,b){for(var c=a.length,d=0;d<c;d++)a[d]=J.adapter.smarter.AtomSetCollectionReader.getTokensStr(this.discardLinesUntilNonBlank()),a[d].length<b&&--d},"~A,~N");$_M(c$,"fillFloatArray",function(a,b,c){for(var d=[],e=0,f=0;f<c.length;f++){for(;null!=d&&e>=d.length;){null==a&&(a=this.readLine());if(0==
b)d=J.adapter.smarter.AtomSetCollectionReader.getTokensStr(a);else{d=Array(Clazz.doubleToInt(a.length/b));for(e=0;e<d.length;e++)d[e]=a.substring(e*b,(e+1)*b)}a=null;e=0}if(null==d)break;c[f]=this.parseFloatStr(d[e++])}return c},"~S,~N,~A");$_M(c$,"fillFrequencyData",function(a,b,c,d,e,f,g,h,k){var l=c!=b;null!=h&&(b=h.length);b=e?b:3*b;var m=d.length,n=Array(b);this.fillDataBlockFixed(n,f,g,k);for(g=f=0;f<b;f++,g++){k=n[f];for(var p=e?null:n[++f],q=e?null:n[++f],r=k.length-(e?3*m:m)-1,s=0,t=0;t<
m;t++){++r;var u=k[r];")"==u.charAt(0)&&(u=u.substring(1));var u=this.parseFloatStr(u),v=this.parseFloatStr(e?k[++r]:p[r]),w=this.parseFloatStr(e?k[++r]:q[r]);if(!d[t]){var z=null==h?g:h[g];0>z||(J.util.Logger.debugging&&J.util.Logger.debug("atom "+z+" vib"+s+": "+u+" "+v+" "+w),this.atomSetCollection.addVibrationVectorWithSymmetry(a+c*s++ +z,u,v,w,l))}}}},"~N,~N,~N,~A,~B,~N,~N,~A,~N");$_M(c$,"readLines",function(a){for(;0<=--a;)this.readLine();return this.line},"~N");$_M(c$,"discardLinesUntilStartsWith",
function(a){for(;null!=this.readLine()&&!this.line.startsWith(a););return this.line},"~S");$_M(c$,"discardLinesUntilContains",function(a){for(;null!=this.readLine()&&0>this.line.indexOf(a););return this.line},"~S");$_M(c$,"discardLinesUntilContains2",function(a,b){for(;null!=this.readLine()&&0>this.line.indexOf(a)&&0>this.line.indexOf(b););return this.line},"~S,~S");$_M(c$,"discardLinesUntilBlank",function(){for(;null!=this.readLine()&&0!=this.line.trim().length;);});$_M(c$,"discardLinesUntilNonBlank",
function(){for(;null!=this.readLine()&&0==this.line.trim().length;);return this.line});$_M(c$,"checkLineForScript",function(a){this.line=a;this.checkCurrentLineForScript()},"~S");$_M(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=Clazz.newFloatArray(15,0);this.parseStringInfestedFloatArray(this.line.substring(10).$replace("="," ").$replace("{"," ").$replace("}"," "),a);var b=J.util.P3.new3(a[0],a[1],a[2]),c=J.util.P3.new3(a[3],a[4],a[5]);this.fileScaling=J.util.P3.new3(a[6],a[7],a[8]);this.fileOffset=J.util.P3.new3(a[9],a[10],a[11]);a=J.util.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=Clazz.newIntArray(3,0);this.atomSetCollection.setLatticeCells(this.latticeCells,!0,!1,!1,!1,null,null);this.setUnitCell(2*a.x/(c.x-b.x),2*a.y/(c.y-b.y),2*a.z/(c.z==b.z?1:c.z-b.z),90,90,90);this.unitCellOffset=J.util.P3.newP(a);this.unitCellOffset.scale(-1);this.symmetry.toFractional(this.unitCellOffset,!1);this.unitCellOffset.scaleAdd2(-1,b,this.unitCellOffset);this.symmetry.setOffsetPt(this.unitCellOffset);this.atomSetCollection.setAtomSetCollectionAuxiliaryInfo("jmolDataScaling",
[b,c,a])}this.line.endsWith("#noautobond")&&(this.line=this.line.substring(0,this.line.lastIndexOf("#")).trim(),this.atomSetCollection.setNoAutoBond());b=this.line.indexOf("jmolscript:");0<=b&&(c=this.line.substring(b+11,this.line.length),0<=c.indexOf("#")&&(c=c.substring(0,c.indexOf("#"))),this.addJmolScript(c),this.line=this.line.substring(0,b).trim())});$_M(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");$_M(c$,"addSiteScript",function(a){null==this.siteScript?this.siteScript="":this.siteScript.endsWith(";")||(this.siteScript+=";");this.siteScript+=a;this.atomSetCollection.setAtomSetCollectionAuxiliaryInfo("sitescript",this.siteScript)},"~S");$_M(c$,"readLine",function(){this.prevline=this.line;this.line=this.reader.readLine();if(null!=this.os&&null!=
this.line){var a=this.line.getBytes();this.os.write(a,0,a.length);this.os.writeByteAsInt(10)}this.ptLine++;J.util.Logger.debugging&&J.util.Logger.debug(this.line);return this.line});c$.getStrings=$_M(c$,"getStrings",function(a,b,c){for(var d=Array(b),e=0,f=0;e<b;e++,f+=c)d[e]=a.substring(f,f+c);return d},"~S,~N,~N");$_M(c$,"getTokens",function(){return J.util.Parser.getTokens(this.line)});$_M(c$,"parseStringInfestedFloatArray",function(a,b){J.util.Parser.parseStringInfestedFloatArray(a,null,b)},"~S,~A");
c$.getTokensFloat=$_M(c$,"getTokensFloat",function(a,b,c){null==b&&(b=Clazz.newFloatArray(c,0));J.util.Parser.parseFloatArrayDataN(J.adapter.smarter.AtomSetCollectionReader.getTokensStr(a),b,c);return b},"~S,~A,~N");c$.getTokensStr=$_M(c$,"getTokensStr",function(a){return J.util.Parser.getTokens(a)},"~S");c$.getTokensAt=$_M(c$,"getTokensAt",function(a,b){return J.util.Parser.getTokensAt(a,b)},"~S,~N");$_M(c$,"parseFloat",function(){return J.util.Parser.parseFloatNext(this.line,this.next)});$_M(c$,
"parseFloatStr",function(a){this.next[0]=0;return J.util.Parser.parseFloatNext(a,this.next)},"~S");$_M(c$,"parseFloatRange",function(a,b,c){this.next[0]=b;return J.util.Parser.parseFloatRange(a,c,this.next)},"~S,~N,~N");$_M(c$,"parseInt",function(){return J.util.Parser.parseIntNext(this.line,this.next)});$_M(c$,"parseIntStr",function(a){this.next[0]=0;return J.util.Parser.parseIntNext(a,this.next)},"~S");$_M(c$,"parseIntAt",function(a,b){this.next[0]=b;return J.util.Parser.parseIntNext(a,this.next)},
"~S,~N");$_M(c$,"parseIntRange",function(a,b,c){this.next[0]=b;return J.util.Parser.parseIntRange(a,c,this.next)},"~S,~N,~N");$_M(c$,"parseToken",function(){return J.util.Parser.parseTokenNext(this.line,this.next)});$_M(c$,"parseTokenStr",function(a){this.next[0]=0;return J.util.Parser.parseTokenNext(a,this.next)},"~S");$_M(c$,"parseTokenNext",function(a){return J.util.Parser.parseTokenNext(a,this.next)},"~S");$_M(c$,"parseTokenRange",function(a,b,c){this.next[0]=b;return J.util.Parser.parseTokenRange(a,
c,this.next)},"~S,~N,~N");c$.parseTrimmedAt=$_M(c$,"parseTrimmedAt",function(a,b){return J.util.Parser.parseTrimmedAt(a,b)},"~S,~N");c$.parseTrimmedRange=$_M(c$,"parseTrimmedRange",function(a,b,c){return J.util.Parser.parseTrimmedRange(a,b,c)},"~S,~N,~N");c$.getFortranFormatLengths=$_M(c$,"getFortranFormatLengths",function(a){var b=new J.util.JmolList,c=0,d=0,e=1,f=!1,g=!0;a+=",";for(var h=0;h<a.length;h++){var k=a.charAt(h);switch(k){case ".":f=!1;continue;case ",":for(f=0;f<d;f++)b.addLast(Integer.$valueOf(c*
e));f=!1;g=!0;d=0;continue;case "X":c=d;d=1;e=-1;continue}Character.isDigit(k)?f?c=10*c+k.charCodeAt(0)-48:g&&(d=10*d+k.charCodeAt(0)-48):Character.isLetter(k)?(c=0,f=!0,g=!1,e=1):f=!1}return b},"~S");$_M(c$,"read3Vectors",function(a){for(var b=Array(3),c=Clazz.newFloatArray(3,0),d=0;3>d;d++){if(0<d||Float.isNaN(this.parseFloatStr(this.line)))if(this.readLine(),0==d&&null!=this.line){d=-1;continue}this.fillFloatArray(this.line,0,c);b[d]=new J.util.V3;b[d].setA(c);a&&b[d].scale(0.5291772)}return b},
"~B");$_M(c$,"setElementAndIsotope",function(a,b){var c=this.parseIntStr(b);-2147483648==c?a.elementSymbol=b:(b=b.substring((""+c).length),a.elementNumber=0==b.length?c:(c<<7)+J.api.JmolAdapter.getElementNumber(b))},"J.adapter.smarter.Atom,~S");$_M(c$,"finalizeModelSet",function(){},"J.modelset.ModelSet,~N,~N");Clazz.defineStatics(c$,"ANGSTROMS_PER_BOHR",0.5291772)}),Clazz.declarePackage("J.thread"),Clazz.load(["java.lang.Thread"],"J.thread.JmolThread",["J.util.Logger"],function(){c$=Clazz.decorateAsClass(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;Clazz.instantialize(this,arguments)},J.thread,"JmolThread",Thread);$_M(c$,"setViewer",function(a,b){this.setName(b);this.$name=b+"_"+($t$=++J.thread.JmolThread.threadIndex,J.thread.JmolThread.prototype.threadIndex=J.thread.JmolThread.threadIndex,$t$);this.viewer=a;this.isJS=a.isSingleThreaded},
"J.viewer.Viewer,~S");$_M(c$,"setEval",function(a){this.eval=a;this.sc=this.viewer.getEvalContextAndHoldQueue(a);null!=this.sc&&(this.useTimeout=a.getAllowJSThreads())},"J.api.JmolScriptEvaluator");$_M(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)});$_M(c$,"start",function(){this.isJS?(J.util.Logger.info("starting "+this.$name),this.run()):Clazz.superCall(this,J.thread.JmolThread,
"start",[])});Clazz.overrideMethod(c$,"run",function(){this.startTime=System.currentTimeMillis();try{this.run1(-1)}catch(a){if(Clazz.exceptionOf(a,InterruptedException))J.util.Logger.debugging&&this.oops(a);else if(Clazz.exceptionOf(a,Exception))this.oops(a);else throw a;}});$_M(c$,"oops",function(a){System.out.println(this.$name+" exception "+a);a.printStackTrace();this.viewer.queueOnHold=!1},"Exception");$_M(c$,"runSleep",function(a,b){if(this.isJS&&!this.useTimeout)return!0;var c=this;setTimeout(function(){c.run1(b)},
Math.max(a,0));return!1},"~N,~N");$_M(c$,"interrupt",function(){this.stopped=!0;this.viewer.startHoverWatcher(!0);this.isJS||Clazz.superCall(this,J.thread.JmolThread,"interrupt",[])});$_M(c$,"checkInterrupted",function(){return this.stopped});$_M(c$,"reset",function(){this.isReset=!0;this.interrupt()});Clazz.defineStatics(c$,"threadIndex",0,"INIT",-1,"MAIN",0,"FINISH",-2,"CHECK1",1,"CHECK2",2,"CHECK3",3)}),Clazz.declarePackage("J.thread"),Clazz.load(["J.thread.JmolThread"],"J.thread.ScriptDelayThread",
null,function(){c$=Clazz.decorateAsClass(function(){this.seconds=this.millis=0;this.isPauseDelay=this.doPopPush=!1;Clazz.instantialize(this,arguments)},J.thread,"ScriptDelayThread",J.thread.JmolThread);Clazz.makeConstructor(c$,function(a,b,c){Clazz.superConstructor(this,J.thread.ScriptDelayThread);this.setViewer(b,"ScriptDelayThread");this.millis=c;this.setEval(a)},"J.api.JmolScriptEvaluator,J.viewer.Viewer,~N");Clazz.overrideMethod(c$,"run1",function(a){for(;;)switch(a){case -1:var b;this.doPopPush=
0<this.millis;this.isPauseDelay=-100==this.millis;if(this.doPopPush){if(0<(b=this.viewer.getDelayMaximumMs())&&this.millis>b)this.millis=b}else this.millis=-this.millis;this.millis-=System.currentTimeMillis()-this.startTime;this.isJS?this.seconds=0:(this.seconds=Clazz.doubleToInt(this.millis/1E3),this.millis-=1E3*this.seconds,0>=this.millis&&(this.millis=1));this.doPopPush&&this.viewer.popHoldRepaintWhy("delay INIT");a=0;break;case 0:if(this.stopped||this.eval.isStopped()){a=-2;break}if(!this.runSleep(0<
this.seconds--?1E3:this.millis,-2))return;0>this.seconds&&(this.millis=0);a=0<this.seconds||0<this.millis?0:-2;break;case -2:this.doPopPush&&this.viewer.pushHoldRepaintWhy("delay FINISH");this.isPauseDelay&&this.eval.notifyResumeStatus();this.resumeEval();return}},"~N");Clazz.defineStatics(c$,"PAUSE_DELAY",-100)}),Clazz.declarePackage("J.io"),c$=Clazz.decorateAsClass(function(){this.buf=null;this.ichCurrent=this.cchBuf=0;Clazz.instantialize(this,arguments)},J.io,"LimitedLineReader"),Clazz.makeConstructor(c$,
function(a,b){a.mark(b);this.buf=Clazz.newCharArray(b,"\x00");this.cchBuf=Math.max(a.read(this.buf,0,b),0);this.ichCurrent=0;a.reset()},"java.io.BufferedReader,~N"),$_M(c$,"getHeader",function(a){return 0==a?String.instantialize(this.buf):String.instantialize(this.buf,0,Math.min(this.cchBuf,a))},"~N"),$_M(c$,"readLineWithNewline",function(){for(;this.ichCurrent<this.cchBuf;){for(var a=this.ichCurrent,b=String.fromCharCode(0);this.ichCurrent<this.cchBuf&&"\r"!=(b=this.buf[this.ichCurrent++])&&"\n"!=
b;);"\r"==b&&(this.ichCurrent<this.cchBuf&&"\n"==this.buf[this.ichCurrent])&&++this.ichCurrent;b=this.ichCurrent-a;if("#"!=this.buf[a])return String.instantialize(this.buf,a,b)}return""}),Clazz.declarePackage("J.constant"),Clazz.load(["java.lang.Enum"],"J.constant.EnumStereoMode",null,function(){c$=Clazz.decorateAsClass(function(){this.$$name=null;this.$isBiColor=!1;Clazz.instantialize(this,arguments)},J.constant,"EnumStereoMode",Enum);Clazz.makeConstructor(c$,($fz=function(a,b){this.$$name=a;this.$isBiColor=
b},$fz.isPrivate=!0,$fz),"~S,~B");$_M(c$,"getName",function(){return this.$$name});$_M(c$,"isBiColor",function(){return this.$isBiColor});c$.getStereoMode=$_M(c$,"getStereoMode",function(a){for(var b,c=0,d=J.constant.EnumStereoMode.values();c<d.length&&((b=d[c])||1);c++)if(b.$$name.equalsIgnoreCase(a))return b;return null},"~S");c$.DEFAULT_STEREO_DEGREES=-5;Clazz.defineEnumConstant(c$,"NONE",0,["OFF",!1]);Clazz.defineEnumConstant(c$,"DOUBLE",1,["",!1]);Clazz.defineEnumConstant(c$,"REDCYAN",2,["REDCYAN",
!0]);Clazz.defineEnumConstant(c$,"REDBLUE",3,["REDBLUE",!0]);Clazz.defineEnumConstant(c$,"REDGREEN",4,["REDGREEN",!0]);Clazz.defineEnumConstant(c$,"CUSTOM",5,["",!0])}),Clazz.declarePackage("J.io"),Clazz.load(null,"J.io.Base64",["J.util.SB"],function(){c$=Clazz.declareType(J.io,"Base64");c$.write=$_M(c$,"write",function(a,b){for(var c=J.io.Base64.getBase64(a),d=c.length(),e=Clazz.newByteArray(1,0),f=0;f<d;f++)e[0]=c.charAt(f).charCodeAt(0),b.write(e,0,1)},"~A,java.io.OutputStream");c$.getBytes64=
$_M(c$,"getBytes64",function(a){return J.io.Base64.getBase64(a).toBytes(0,-1)},"~A");c$.getBase64=$_M(c$,"getBase64",function(a){var b=a.length,c=new J.util.SB;if(0==b)return c;for(var d=0,e=0;d<b&&0==e;){0==d%75&&0!=d&&c.append("\r\n");var e=d+2==b?1:d+1==b?2:0,f=a[d++]<<16&16711680|(2==e?0:a[d++]<<8)&65280|(1<=e?0:a[d++])&255;c.appendC(J.io.Base64.base64.charAt(f>>18&63));c.appendC(J.io.Base64.base64.charAt(f>>12&63));c.appendC(2==e?"=":J.io.Base64.base64.charAt(f>>6&63));c.appendC(1<=e?"=":J.io.Base64.base64.charAt(f&
63))}return c},"~A");c$.decodeBase64=$_M(c$,"decodeBase64",function(a){var b=0,c;a=a.toCharArray();var d=a.length;if(0==d)return Clazz.newByteArray(0,0);for(var e=d;0<=--e;)b+=65==(c=a[e].charCodeAt(0)&127)||0<J.io.Base64.decode64[c]?3:0;for(var b=b>>2,f=Clazz.newByteArray(b,0),g=18,h=e=0,k=0;e<d;e++)if(0<J.io.Base64.decode64[c=a[e].charCodeAt(0)&127]||65==c||61==c)k|=J.io.Base64.decode64[c]<<g,g-=6,0>g&&(f[h++]=(k&16711680)>>16,h<b&&(f[h++]=(k&65280)>>8),h<b&&(f[h++]=k&255),g=18,k=0);return f},"~S");
Clazz.defineStatics(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])}),Clazz.declarePackage("J.io"),Clazz.load(["J.util.SB"],"J.io.CifDataReader",
["java.util.Hashtable","J.util.JmolList","$.Logger"],function(){c$=Clazz.decorateAsClass(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;Clazz.instantialize(this,arguments)},J.io,"CifDataReader");Clazz.prepareFields(c$,function(){this.fileHeader=new J.util.SB});Clazz.makeConstructor(c$,function(a){this.reader=a},"J.api.JmolLineReader");
Clazz.makeConstructor(c$,function(a){this.br=a},"java.io.BufferedReader");$_M(c$,"getFileHeader",function(){return this.fileHeader.toString()});c$.readCifData=$_M(c$,"readCifData",function(a){return(new J.io.CifDataReader(a)).getAllCifData()},"java.io.BufferedReader");$_M(c$,"getAllCifData",($fz=function(){this.line="";var a;this.allData=new java.util.Hashtable;var b=new J.util.JmolList;this.allData.put("models",b);try{for(;null!=(a=this.getNextToken());)if(a.startsWith("global_")||a.startsWith("data_"))b.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 c=this.getNextToken();null==c?J.util.Logger.warn("CIF ERROR ? end of file; data missing: "+a):this.data.put(a,c)}}catch(d){if(!Clazz.exceptionOf(d,Exception))throw d;}try{null!=this.br&&this.br.close()}catch(e){if(!Clazz.exceptionOf(e,Exception))throw e;}return this.allData},$fz.isPrivate=!0,$fz));$_M(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(Clazz.exceptionOf(a,Exception))return null;throw a;}});$_M(c$,"getData",function(){for(var a=0;a<this.fieldCount;++a)if(null==(this.loopData[a]=this.getNextDataToken()))return!1;return!0});$_M(c$,"getNextToken",function(){for(;!this.hasMoreTokens();)if(null==
this.setStringNextLine())return null;return this.nextToken()});$_M(c$,"setString",($fz=function(a){this.str=this.line=a;this.cch=null==a?0:a.length;this.ich=0},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"setStringNextLine",($fz=function(){this.setString(this.readLine());if(null==this.line||0==this.line.length||";"!=this.line.charAt(0))return 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},$fz.isPrivate=!0,$fz));$_M(c$,"hasMoreTokens",($fz=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},$fz.isPrivate=!0,$fz));$_M(c$,"nextToken",($fz=function(){if(this.ich==this.cch)return null;var a=this.ich,b=this.str.charAt(a);if("'"!=b&&'"'!=b&&"\u0001"!=b){for(this.wasUnQuoted=!0;this.ich<this.cch&&" "!=(b=this.str.charAt(this.ich))&&
"\t"!=b;)++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 c=b,d=!1;++this.ich<this.cch;){b=this.str.charAt(this.ich);if(d&&(" "==b||"\t"==b))break;d=b==c}if(this.ich==this.cch)return d?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)},$fz.isPrivate=!0,$fz));$_M(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()});$_M(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});$_M(c$,"getTokenPeeked",function(){this.ich=this.ichPeeked;return this.strPeeked});$_M(c$,"fullTrim",function(a){for(var b=0,c=a.length;b<
c&&!(0>"\n\t ".indexOf(a.charAt(b)));b++);for(;b<c&&!(0>"\n\t ".indexOf(a.charAt(c-1)));c--);return a.substring(b,c)},"~S");$_M(c$,"getCifLoopData",($fz=function(){for(var a,b=new J.util.JmolList;null!=(a=this.peekToken())&&"_"==a.charAt(0);)a=this.getTokenPeeked(),b.addLast(a),this.data.put(a,new J.util.JmolList);this.fieldCount=b.size();if(0!=this.fieldCount)for(this.loopData=Array(this.fieldCount);this.getData();)for(a=0;a<this.fieldCount;a++)this.data.get(b.get(a)).addLast(this.loopData[a])},
$fz.isPrivate=!0,$fz))}),Clazz.declarePackage("J.io"),Clazz.load(null,"J.io.JmolBinary","java.io.BufferedInputStream $.BufferedReader $.ByteArrayInputStream $.InputStreamReader $.StringReader J.api.Interface J.io.Base64 $.Encoding $.LimitedLineReader J.util.ArrayUtil $.Logger $.Parser $.TextFormat J.viewer.FileManager".split(" "),function(){c$=Clazz.declareType(J.io,"JmolBinary");c$.determineSurfaceTypeIs=$_M(c$,"determineSurfaceTypeIs",function(a){var b;try{b=J.io.JmolBinary.getBufferedReader(new java.io.BufferedInputStream(a),
"ISO-8859-1")}catch(c){if(Clazz.exceptionOf(c,java.io.IOException))return null;throw c;}return J.io.JmolBinary.determineSurfaceFileType(b)},"java.io.InputStream");c$.determineSurfaceFileType=$_M(c$,"determineSurfaceFileType",function(a){var b=null,c=null;try{c=new J.io.LimitedLineReader(a,16E3),b=c.getHeader(0)}catch(d){if(!Clazz.exceptionOf(d,Exception))throw d;}if(null==c||null==b||0==b.length)return null;switch(b.charAt(0)){case "@":if(0==b.indexOf("@text"))return"Kinemage";break;case "#":if(0<=
b.indexOf(".obj"))return"Obj";if(0<=b.indexOf("MSMS"))return"Msms";break;case "&":if(0==b.indexOf("&plot"))return"Jaguar";break;case "\r":case "\n":if(0<=b.indexOf("ZYX"))return"Xplor"}if(0<=b.indexOf("Here is your gzipped map"))return"UPPSALA"+b;if(0<=b.indexOf("! nspins"))return"CastepDensity";if(0<=b.indexOf("<jvxl")&&0<=b.indexOf("<?xml"))return"JvxlXml";if(0<=b.indexOf("#JVXL+"))return"Jvxl+";if(0<=b.indexOf("#JVXL"))return"Jvxl";if(0<=b.indexOf("<efvet "))return"Efvet";if(0<=b.indexOf("usemtl"))return"Obj";
if(0==b.indexOf("# object with"))return"Nff";if(0<=b.indexOf("BEGIN_DATAGRID_3D")||0<=b.indexOf("BEGIN_BANDGRID_3D"))return"Xsf";if(0<=b.indexOf("\x00")){if(0==b.indexOf("PM\u0001\x00"))return"Pmesh";if(0==b.indexOf("\u0014\x00\x00\x00"))return"DelPhi";if(208==b.indexOf("MAP "))return"Mrc";if(37<b.length&&(0==b.charCodeAt(36)&&100==b.charCodeAt(37)||0==b.charCodeAt(36)&&100==b.charCodeAt(37)))return"Dsn6"}if(0<=b.indexOf(" 0.00000e+00 0.00000e+00      0      0\n"))return"Uhbd";b=c.readLineWithNewline();
if(0==b.indexOf("object 1 class gridpositions counts"))return"Apbs";var e=J.util.Parser.getTokens(b);a=c.readLineWithNewline();if(2==e.length&&(3==J.util.Parser.parseInt(e[0])&&-2147483648!=J.util.Parser.parseInt(e[1]))&&(e=J.util.Parser.getTokens(a),3==e.length&&-2147483648!=J.util.Parser.parseInt(e[0])&&-2147483648!=J.util.Parser.parseInt(e[1])&&-2147483648!=J.util.Parser.parseInt(e[2])))return"PltFormatted";e=c.readLineWithNewline();if(b.startsWith("v ")&&a.startsWith("v ")&&e.startsWith("v "))return"Obj";
a=J.util.Parser.parseInt(e);if(-2147483648==a)return 0==e.indexOf("+")?"Jvxl+":null;if(0<=a)return"Cube";for(a=4+-a;0<=--a;)if(null==(b=c.readLineWithNewline()))return null;b=J.util.Parser.parseInt(b);return-2147483648==b?null:0>b?"Jvxl":"Cube"},"java.io.BufferedReader");c$.getUTFEncodingForStream=$_M(c$,"getUTFEncodingForStream",($fz=function(a){var b=Clazz.newByteArray(4,0);b[3]=1;try{a.mark(5)}catch(c){if(Clazz.exceptionOf(c,Exception))return J.io.Encoding.NONE;throw c;}a.read(b,0,4);a.reset();
return J.io.JmolBinary.getUTFEncoding(b)},$fz.isPrivate=!0,$fz),"java.io.BufferedInputStream");c$.fixUTF=$_M(c$,"fixUTF",function(a){var b=J.io.JmolBinary.getUTFEncoding(a);if(b!==J.io.Encoding.NONE)try{var c=String.instantialize(a,b.name().$replace("_","-"));switch(b){case J.io.Encoding.UTF8:case J.io.Encoding.UTF_16BE:case J.io.Encoding.UTF_16LE:c=c.substring(1)}return c}catch(d){if(Clazz.exceptionOf(d,java.io.UnsupportedEncodingException))System.out.println(d);else throw d;}return String.instantialize(a)},
"~A");c$.getUTFEncoding=$_M(c$,"getUTFEncoding",($fz=function(a){return 3<=a.length&&239==a[0]&&187==a[1]&&191==a[2]?J.io.Encoding.UTF8:4<=a.length&&0==a[0]&&0==a[1]&&254==a[2]&&255==a[3]?J.io.Encoding.UTF_32BE:4<=a.length&&255==a[0]&&254==a[1]&&0==a[2]&&0==a[3]?J.io.Encoding.UTF_32LE:2<=a.length&&255==a[0]&&254==a[1]?J.io.Encoding.UTF_16LE:2<=a.length&&254==a[0]&&255==a[1]?J.io.Encoding.UTF_16BE:J.io.Encoding.NONE},$fz.isPrivate=!0,$fz),"~A");c$.isCompoundDocumentStream=$_M(c$,"isCompoundDocumentStream",
function(a){var b=Clazz.newByteArray(8,0);a.mark(9);var c=a.read(b,0,8);a.reset();return 8==c&&208==b[0]&&207==b[1]&&17==b[2]&&224==b[3]&&161==b[4]&&177==b[5]&&26==b[6]&&225==b[7]},"java.io.InputStream");c$.isCompoundDocumentArray=$_M(c$,"isCompoundDocumentArray",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$.isGzipB=$_M(c$,"isGzipB",function(a){return null!=a&&2<a.length&&31==a[0]&&139==a[1]},"~A");c$.isGzipS=$_M(c$,
"isGzipS",function(a){var b=Clazz.newByteArray(4,0);try{a.mark(5),a.read(b,0,4),a.reset()}catch(c){if(!Clazz.exceptionOf(c,java.io.IOException))throw c;}return J.io.JmolBinary.isGzipB(b)},"java.io.InputStream");c$.isZipStream=$_M(c$,"isZipStream",function(a){var b=Clazz.newByteArray(4,0);try{a.mark(5),a.read(b,0,4),a.reset()}catch(c){if(!Clazz.exceptionOf(c,Exception))throw c;}return J.io.JmolBinary.isZipFile(b)},"java.io.InputStream");c$.isZipFile=$_M(c$,"isZipFile",function(a){return 4<=a.length&&
80==a[0]&&75==a[1]&&3==a[2]&&4==a[3]},"~A");c$.isPngZipStream=$_M(c$,"isPngZipStream",function(a){if(J.io.JmolBinary.isZipStream(a))return!1;try{a.mark(56);var b=J.io.JmolBinary.getStreamBytes(a,55);a.reset();return 80==b[51]&&78==b[52]&&71==b[53]&&74==b[54]}catch(c){if(!Clazz.exceptionOf(c,Exception))throw c;}return!1},"java.io.InputStream");c$.getZipRoot=$_M(c$,"getZipRoot",function(a){var b=a.indexOf("|");return 0>b?a:a.substring(0,b)},"~S");c$.getStreamBytes=$_M(c$,"getStreamBytes",function(a,
b){for(var c=0<b&&1024>b?b:1024,d=Clazz.newByteArray(c,0),e=Clazz.newByteArray(0>b?4096:b,0),f=0,g=0;(0>b||g<b)&&0<(f=a.read(d,0,c));)g+=f,g>e.length&&(e=J.util.ArrayUtil.ensureLengthByte(e,2*g)),System.arraycopy(d,0,e,g-f,f);if(g==e.length)return e;d=Clazz.newByteArray(g,0);System.arraycopy(e,0,d,0,g);return d},"java.io.InputStream,~N");c$.getEmbeddedScript=$_M(c$,"getEmbeddedScript",function(a){if(null==a)return a;var b=a.indexOf("**** Jmol Embedded Script ****");if(0>b)return a;var c=a.lastIndexOf("/*",
b),d=a.indexOf(("*"==a.charAt(c+2)?"*":"")+"*/",b);for(0<=c&&d>=b&&(a=a.substring(b+30,d)+"\n");0<=(c=a.indexOf(" #Jmol...\x00"));)a=a.substring(0,c)+a.substring(c+10+4);J.util.Logger.debugging&&J.util.Logger.info(a);return a},"~S");c$.getJzu=$_M(c$,"getJzu",($fz=function(){return null==J.io.JmolBinary.jzu?($t$=J.io.JmolBinary.jzu=J.api.Interface.getOptionInterface("io2.ZipUtil"),J.io.JmolBinary.prototype.jzu=J.io.JmolBinary.jzu,$t$):J.io.JmolBinary.jzu},$fz.isPrivate=!0,$fz));c$.getZipDirectoryAsStringAndClose=
$_M(c$,"getZipDirectoryAsStringAndClose",function(a){return J.io.JmolBinary.getJzu().getZipDirectoryAsStringAndClose(a)},"java.io.BufferedInputStream");c$.newGZIPInputStream=$_M(c$,"newGZIPInputStream",function(a){return J.io.JmolBinary.getJzu().newGZIPInputStream(a)},"java.io.BufferedInputStream");c$.getGzippedBytesAsString=$_M(c$,"getGzippedBytesAsString",function(a){return J.io.JmolBinary.getJzu().getGzippedBytesAsString(a)},"~A");c$.newZipInputStream=$_M(c$,"newZipInputStream",function(a){return J.io.JmolBinary.getJzu().newZipInputStream(a)},
"java.io.InputStream");c$.getZipFileContents=$_M(c$,"getZipFileContents",function(a,b,c,d){return J.io.JmolBinary.getJzu().getZipFileContents(a,b,c,d)},"java.io.BufferedInputStream,~A,~N,~B");c$.getZipDirectoryAndClose=$_M(c$,"getZipDirectoryAndClose",function(a,b){return J.io.JmolBinary.getJzu().getZipDirectoryAndClose(a,b)},"java.io.BufferedInputStream,~B");c$.getAllZipData=$_M(c$,"getAllZipData",function(a,b,c,d,e){J.io.JmolBinary.getJzu().getAllZipData(a,b,c,d,e)},"java.io.BufferedInputStream,~A,~S,~S,java.util.Map");
c$.getZipFileContentsAsBytes=$_M(c$,"getZipFileContentsAsBytes",function(a,b,c){return J.io.JmolBinary.getJzu().getZipFileContentsAsBytes(a,b,c)},"java.io.BufferedInputStream,~A,~N");c$.createZipSet=$_M(c$,"createZipSet",function(a,b,c,d,e,f){return J.io.JmolBinary.getJzu().createZipSet(a,b,c,d,e,f)},"J.viewer.FileManager,J.viewer.Viewer,~S,~S,~A,~B");c$.getStreamAsBytes=$_M(c$,"getStreamAsBytes",function(a,b){for(var c=Clazz.newByteArray(1024,0),d=null==b?Clazz.newByteArray(4096,0):null,e=0,f=0;0<
(e=a.read(c,0,1024));)f+=e,null==b?(f>=d.length&&(d=J.util.ArrayUtil.ensureLengthByte(d,2*f)),System.arraycopy(c,0,d,f-e,e)):b.write(c,0,e);a.close();return null==b?J.util.ArrayUtil.arrayCopyByte(d,f):f+" bytes"},"java.io.BufferedInputStream,java.io.OutputStream");c$.writeZipFile=$_M(c$,"writeZipFile",function(a,b,c,d,e){return J.io.JmolBinary.getJzu().writeZipFile(a,b,c,d,e)},"J.viewer.FileManager,J.viewer.Viewer,~S,J.util.JmolList,~S");c$.postByteArray=$_M(c$,"postByteArray",function(a,b,c){a=a.getBufferedInputStreamOrErrorMessageFromName(b,
null,!1,!1,c,!1);if(Clazz.instanceOf(a,String))return a;try{a=J.io.JmolBinary.getStreamAsBytes(a,null)}catch(d){if(Clazz.exceptionOf(d,java.io.IOException))try{a.close()}catch(e){if(!Clazz.exceptionOf(e,java.io.IOException))throw e;}else throw d;}return J.io.JmolBinary.fixUTF(a)},"J.viewer.FileManager,~S,~A");c$.isBase64=$_M(c$,"isBase64",function(a){return 0==a.indexOf(";base64,")},"J.util.SB");c$.getBytesFromSB=$_M(c$,"getBytesFromSB",function(a){return J.io.JmolBinary.isBase64(a)?J.io.Base64.decodeBase64(a.substring(8)):
a.toBytes(0,-1)},"J.util.SB");c$.getBISForStringXBuilder=$_M(c$,"getBISForStringXBuilder",function(a){return new java.io.BufferedInputStream(new java.io.ByteArrayInputStream(J.io.JmolBinary.getBytesFromSB(a)))},"J.util.SB");c$.getBufferedReaderForString=$_M(c$,"getBufferedReaderForString",function(a){return new java.io.BufferedReader(new java.io.StringReader(a))},"~S");c$.getSceneScript=$_M(c$,"getSceneScript",function(a,b,c){return J.io.JmolBinary.getJzu().getSceneScript(a,b,c)},"~A,java.util.Map,J.util.JmolList");
c$.getCachedPngjBytes=$_M(c$,"getCachedPngjBytes",function(a,b){return 0>b.indexOf(".png")?null:J.io.JmolBinary.getJzu().getCachedPngjBytes(a,b)},"J.viewer.FileManager,~S");c$.cachePngjFile=$_M(c$,"cachePngjFile",function(a,b){return J.io.JmolBinary.getJzu().cachePngjFile(a,b)},"J.viewer.FileManager,~A");c$.getAtomSetCollectionOrBufferedReaderFromZip=$_M(c$,"getAtomSetCollectionOrBufferedReaderFromZip",function(a,b,c,d,e,f,g){return J.io.JmolBinary.getJzu().getAtomSetCollectionOrBufferedReaderFromZip(a,
b,c,d,e,1,f,g)},"J.api.JmolAdapter,java.io.InputStream,~S,~A,java.util.Map,~B,~B");c$.spartanFileList=$_M(c$,"spartanFileList",function(a,b){return J.io.JmolBinary.getJzu().spartanFileList(a,b)},"~S,~S");c$.getFileReferences=$_M(c$,"getFileReferences",function(a,b){for(var c=0;c<J.viewer.FileManager.scriptFilePrefixes.length;c++)for(var d=J.viewer.FileManager.scriptFilePrefixes[c],e=-1;0<=(e=a.indexOf(d,e+1));){var f=J.util.Parser.getQuotedStringAt(a,e);0<=f.indexOf("::")&&(f=J.util.TextFormat.splitChars(f,
"::")[1]);Clazz.instanceOf(b,J.util.JmolList)?b.addLast(f):b.add(f)}},"~S,java.util.List");c$.checkPngZipStream=$_M(c$,"checkPngZipStream",function(a){if(!J.io.JmolBinary.isPngZipStream(a))return a;var b=null;a.mark(75);try{b=J.io.JmolBinary.getStreamBytes(a,74);a.reset();for(var c=0,d=64,e=1;54<--d;e*=10)c+=(b[d]-48)*e;for(var f=0,d=74,e=1;64<--d;e*=10)f+=(b[d]-48)*e;for(;0<c;)c-=a.skip(c);b=J.io.JmolBinary.getStreamBytes(a,f);a.close()}catch(g){b=Clazz.newByteArray(0,0)}return new java.io.BufferedInputStream(new java.io.ByteArrayInputStream(b))},
"java.io.BufferedInputStream");c$.getBufferedReader=$_M(c$,"getBufferedReader",function(a,b){if(J.io.JmolBinary.getUTFEncodingForStream(a)===J.io.Encoding.NONE)return new java.io.BufferedReader(new java.io.InputStreamReader(a,null==b?"UTF-8":b));var c=J.io.JmolBinary.getStreamBytes(a,-1);a.close();return J.io.JmolBinary.getBufferedReaderForString(null==b?J.io.JmolBinary.fixUTF(c):String.instantialize(c,b))},"java.io.BufferedInputStream,~S");c$.getManifestScriptPath=$_M(c$,"getManifestScriptPath",
function(a){if(0<=a.indexOf("$SCRIPT_PATH$"))return"";var b=0<=a.indexOf("\n")?"\n":"\r";if(0<=a.indexOf(".spt")){a=J.util.TextFormat.split(a,b);for(b=a.length;0<=--b;)if(0<=a[b].indexOf(".spt"))return"|"+J.util.TextFormat.trim(a[b],"\r\n \t")}return null},"~S");c$.getBinaryType=$_M(c$,"getBinaryType",function(a){if(null==a)return null;var b=a.lastIndexOf(".");if(0>b||0>(b=";pse=PyMOL;".indexOf(";"+a.substring(b+1)+"=")))return null;b=";pse=PyMOL;".indexOf("=",b);a=";pse=PyMOL;".substring(b+1);return a.substring(0,
a.indexOf(";"))},"~S");c$.checkBinaryType=$_M(c$,"checkBinaryType",function(a){return 0<=";pse=PyMOL;".indexOf("="+a+";")},"~S");Clazz.defineStatics(c$,"JPEG_CONTINUE_STRING"," #Jmol...\x00","PMESH_BINARY_MAGIC_NUMBER","PM\u0001\x00","DELPHI_BINARY_MAGIC_NUMBER","\u0014\x00\x00\x00","jzu",null)}),Clazz.declarePackage("J.io"),Clazz.load(null,"J.io.OutputStringBuilder",["java.io.BufferedWriter","$.OutputStreamWriter","J.util.SB"],function(){c$=Clazz.decorateAsClass(function(){this.bw=this.sb=this.type=
null;this.nBytes=0;Clazz.instantialize(this,arguments)},J.io,"OutputStringBuilder");Clazz.makeConstructor(c$,function(a){null==a?this.sb=new J.util.SB:(a=new java.io.OutputStreamWriter(a),this.bw=new java.io.BufferedWriter(a,8192))},"java.io.BufferedOutputStream");$_M(c$,"append",function(a){if(null==this.bw)this.sb.append(a);else{this.nBytes+=a.length;try{this.bw.write(a)}catch(b){if(!Clazz.exceptionOf(b,java.io.IOException))throw b;}}return this},"~S");$_M(c$,"length",function(){return null==this.bw?
this.sb.length():this.nBytes});Clazz.overrideMethod(c$,"toString",function(){if(null!=this.bw)try{this.bw.flush()}catch(a){if(!Clazz.exceptionOf(a,java.io.IOException))throw a;}return null==this.bw?this.sb.toString():this.nBytes+" bytes"})}),Clazz.declarePackage("J.shape"),Clazz.load(null,"J.shape.Shape",["J.constant.EnumPalette","J.util.C","$.Logger","J.viewer.JC"],function(){c$=Clazz.decorateAsClass(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;Clazz.instantialize(this,arguments)},J.shape,"Shape");$_M(c$,"getViewer",function(){return this.viewer});$_M(c$,"initializeShape",function(a,b,c,d){this.viewer=a;this.gdata=b;this.shapeID=d;this.myVisibilityFlag=J.viewer.JC.getShapeVisibilityFlag(d);this.setModelSet(c);this.initShape()},"J.viewer.Viewer,J.util.GData,J.modelset.ModelSet,~N");$_M(c$,"getSize",function(){return 0},"~N");$_M(c$,"getSizeG",
function(){return 0},"J.modelset.Group");$_M(c$,"setModelSet",function(a){this.modelSet=a;this.initModelSet()},"J.modelset.ModelSet");$_M(c$,"initModelSet",function(){});$_M(c$,"initShape",function(){});$_M(c$,"merge",function(){},"J.shape.Shape");$_M(c$,"setShapeSizeRD",function(a,b,c){null==b?this.setSize(a,c):this.setSizeRD(b,c)},"~N,J.atomdata.RadiusData,J.util.BS");$_M(c$,"setSize",function(){},"~N,J.util.BS");$_M(c$,"setSizeRD",function(){},"J.atomdata.RadiusData,J.util.BS");$_M(c$,"getPropertyData",
function(){return!1},"~S,~A");$_M(c$,"setPropS",function(a,b,c){if("setProperties"===a)for(null==c&&(c=this.viewer.getSelectionSet(!1));0<b.size();)a=b.remove(0),this.setProperty(a[0].intern(),a[1],c);else"translucentLevel"===a?this.translucentLevel=b.floatValue():"refreshTrajectories"!==a&&J.util.Logger.warn("unassigned "+J.viewer.JC.shapeClassBases[this.shapeID]+" + shape setProperty:"+a+":"+b)},"~S,~O,J.util.BS");$_M(c$,"getProperty",function(){return null},"~S,~N");$_M(c$,"getIndexFromName",function(){return-1},
"~S");$_M(c$,"wasClicked",function(){return!1},"~N,~N");$_M(c$,"findNearestAtomIndex",function(){},"~N,~N,~A,J.util.BS");$_M(c$,"checkBoundsMinMax",function(){},"J.util.P3,J.util.P3");$_M(c$,"setModelClickability",function(){});$_M(c$,"checkObjectClicked",function(){return null},"~N,~N,~N,J.util.BS,~B");$_M(c$,"checkObjectHovered",function(){return!1},"~N,~N,J.util.BS");$_M(c$,"checkObjectDragged",function(){return!1},"~N,~N,~N,~N,~N,J.util.BS");$_M(c$,"coordinateInRange",function(a,b,c,d,e){this.viewer.transformPtScr(c,
e);a=(a-e.x)*(a-e.x)+(b-e.y)*(b-e.y);return a<d?a:-1},"~N,~N,J.util.P3,~N,J.util.P3i");$_M(c$,"getColixI",function(a,b,c){return this.getColixA(a,b,this.modelSet.atoms[c])},"~N,~N,~N");$_M(c$,"getColixA",function(a,b,c){return 2==a?this.viewer.getColixAtomPalette(c,b):a},"~N,~N,J.modelset.Atom");$_M(c$,"getColixB",function(a,b,c){return 2==a?this.viewer.getColixBondPalette(c,b):a},"~N,~N,J.modelset.Bond");$_M(c$,"getShapeDetail",function(){return null});$_M(c$,"setVisibilityFlags",function(){},"J.util.BS");
c$.getColix=$_M(c$,"getColix",function(a,b,c){return J.util.C.getColixInherited(null==a||b>=a.length?0:a[b],c.getColix())},"~A,~N,J.modelset.Atom");c$.getFontCommand=$_M(c$,"getFontCommand",function(a,b){return null==b?"":"font "+a+" "+b.fontSizeNominal+" "+b.fontFace+" "+b.fontStyle},"~S,J.util.JmolFont");c$.getColorCommandUnk=$_M(c$,"getColorCommandUnk",function(a,b,c){return J.shape.Shape.getColorCommand(a,J.constant.EnumPalette.UNKNOWN.id,b,c)},"~S,~N,~B");c$.getColorCommand=$_M(c$,"getColorCommand",
function(a,b,c,d){if(b==J.constant.EnumPalette.UNKNOWN.id&&0==c)return"";b=b==J.constant.EnumPalette.UNKNOWN.id&&0==c?"":(d?J.shape.Shape.getTranslucentLabel(c)+" ":"")+(b!=J.constant.EnumPalette.UNKNOWN.id&&!J.constant.EnumPalette.isPaletteVariable(b)?J.constant.EnumPalette.getPaletteName(b):J.shape.Shape.encodeColor(c));return"color "+a+" "+b},"~S,~N,~N,~B");c$.encodeColor=$_M(c$,"encodeColor",function(a){return J.util.C.isColixColorInherited(a)?"none":J.util.C.getHexCode(a)},"~N");c$.getTranslucentLabel=
$_M(c$,"getTranslucentLabel",function(a){return J.util.C.isColixTranslucent(a)?"translucent "+J.util.C.getColixTranslucencyFractional(a):"opaque"},"~N");c$.appendCmd=$_M(c$,"appendCmd",function(a,b){0!=b.length&&a.append("  ").append(b).append(";\n")},"J.util.SB,~S");Clazz.defineStatics(c$,"RADIUS_MAX",4)}),Clazz.load(["java.io.InputStream"],"java.io.ByteArrayInputStream",["java.lang.IndexOutOfBoundsException","$.NullPointerException"],function(){c$=Clazz.decorateAsClass(function(){this.buf=null;
this.count=this.$mark=this.pos=0;Clazz.instantialize(this,arguments)},java.io,"ByteArrayInputStream",java.io.InputStream);Clazz.makeConstructor(c$,function(a){Clazz.superConstructor(this,java.io.ByteArrayInputStream,[]);this.buf=a;this.pos=0;this.count=a.length},"~A");Clazz.overrideMethod(c$,"readByteAsInt",function(){return this.pos<this.count?this.buf[this.pos++]&255:-1});Clazz.overrideMethod(c$,"read",function(a,b,c){if(null==a)throw new NullPointerException;if(0>b||0>c||c>a.length-b)throw new IndexOutOfBoundsException;
if(this.pos>=this.count)return-1;var d=this.count-this.pos;c>d&&(c=d);if(0>=c)return 0;System.arraycopy(this.buf,this.pos,a,b,c);this.pos+=c;return c},"~A,~N,~N");Clazz.overrideMethod(c$,"skip",function(a){var b=this.count-this.pos;a<b&&(b=0>a?0:a);this.pos+=b;return b},"~N");Clazz.overrideMethod(c$,"available",function(){return this.count-this.pos});Clazz.overrideMethod(c$,"markSupported",function(){return!0});Clazz.overrideMethod(c$,"mark",function(){this.$mark=this.pos},"~N");Clazz.overrideMethod(c$,
"reset",function(){this.pos=this.$mark});Clazz.overrideMethod(c$,"close",function(){})}),Clazz.load(["java.io.Reader"],"java.io.InputStreamReader",["java.lang.NullPointerException"],function(){c$=Clazz.decorateAsClass(function(){this.$in=null;this.isOpen=!0;this.charsetName=null;this.isUTF8=!1;this.bytearr=null;this.pos=0;Clazz.instantialize(this,arguments)},java.io,"InputStreamReader",java.io.Reader);Clazz.makeConstructor(c$,function(a,b){Clazz.superConstructor(this,java.io.InputStreamReader,[a]);
this.$in=a;this.charsetName=b;if(!(this.isUTF8="UTF-8".equals(b))&&!"ISO-8859-1".equals(b))throw new NullPointerException("charsetName");},"java.io.InputStream,~S");$_M(c$,"getEncoding",function(){return this.charsetName});Clazz.overrideMethod(c$,"read",function(a,b,c){if(null==this.bytearr||this.bytearr.length<c)this.bytearr=Clazz.newByteArray(c,0);var d,e,f,g=b=0;c=this.$in.read(this.bytearr,this.pos,c-this.pos);if(0>c)return-1;for(this.pos=0;b<c;){d=this.bytearr[b]&255;if(this.isUTF8)switch(d>>
4){case 12:case 13:if(b>c-2)continue;b+=2;e=this.bytearr[b-1];if(128!=(e&192)){b-=2;break}a[g++]=String.fromCharCode((d&31)<<6|e&63);continue;case 14:if(b>c-3)continue;b+=3;e=this.bytearr[b-2];f=this.bytearr[b-1];if(128!=(e&192)||128!=(f&192)){b-=3;break}a[g++]=String.fromCharCode((d&15)<<12|(e&63)<<6|(f&63)<<0);continue}b++;a[g++]=String.fromCharCode(d)}this.pos=c-b;for(a=0;a<this.pos;a++)this.bytearr[a]=this.bytearr[b++];return c-this.pos},"~A,~N,~N");Clazz.overrideMethod(c$,"ready",function(){return this.isOpen});
Clazz.overrideMethod(c$,"close",function(){this.$in.close();this.isOpen=!1})}),Clazz.declarePackage("J.viewer"),Clazz.load(["java.util.Hashtable"],"J.viewer.FileManager","java.io.BufferedInputStream $.ByteArrayInputStream java.net.URL $.URLEncoder J.api.Interface J.io.Base64 $.FileReader $.JmolBinary J.util.Escape $.JmolList $.Logger $.SB $.TextFormat J.viewer.DataManager $.Viewer".split(" "),function(){c$=Clazz.decorateAsClass(function(){this.viewer=null;this.pathForAllFiles="";this.nameAsGiven=
"zapped";this.cache=this.spardirCache=this.pngjCache=this.appletProxy=this.appletDocumentBaseURL=this.fileName=this.fullPathName=null;Clazz.instantialize(this,arguments)},J.viewer,"FileManager");Clazz.prepareFields(c$,function(){this.cache=new java.util.Hashtable});Clazz.makeConstructor(c$,function(a){this.viewer=a;this.clear()},"J.viewer.Viewer");$_M(c$,"clear",function(){this.fullPathName=this.fileName=this.nameAsGiven=this.viewer.getZapName();this.spardirCache=null});$_M(c$,"setLoadState",($fz=
function(a){this.viewer.getPreserveState()&&a.put("loadState",this.viewer.getLoadState(a))},$fz.isPrivate=!0,$fz),"java.util.Map");$_M(c$,"getPathForAllFiles",function(){return this.pathForAllFiles});$_M(c$,"setPathForAllFiles",function(a){0<a.length&&(!a.endsWith("/")&&!a.endsWith("|"))&&(a+="/");return this.pathForAllFiles=a},"~S");$_M(c$,"setFileInfo",function(a){this.fullPathName=a[0];this.fileName=a[1];this.nameAsGiven=a[2]},"~A");$_M(c$,"getFileInfo",function(){return[this.fullPathName,this.fileName,
this.nameAsGiven]});$_M(c$,"getFullPathName",function(){return null!=this.fullPathName?this.fullPathName:this.nameAsGiven});$_M(c$,"getFileName",function(){return null!=this.fileName?this.fileName:this.nameAsGiven});$_M(c$,"getAppletDocumentBase",function(){return null==this.appletDocumentBaseURL?"":this.appletDocumentBaseURL.toString()});$_M(c$,"setAppletContext",function(a){try{this.appletDocumentBaseURL=0==a.length?null:new java.net.URL(Clazz.castNullAs("java.net.URL"),a,null)}catch(b){if(!Clazz.exceptionOf(b,
java.net.MalformedURLException))throw b;}},"~S");$_M(c$,"setAppletProxy",function(a){this.appletProxy=null==a||0==a.length?null:a},"~S");$_M(c$,"getFileTypeName",function(a){var b=a.indexOf("::");if(0<=b)return a.substring(0,b);if(a.startsWith("="))return"pdb";b=this.getUnzippedBufferedReaderOrErrorMessageFromName(a,null,!0,!1,!0,!0);return Clazz.instanceOf(b,java.io.BufferedReader)?this.viewer.getModelAdapter().getFileTypeName(b):Clazz.instanceOf(b,J.api.ZInputStream)?(a=this.getZipDirectoryAsString(a),
0<=a.indexOf("JmolManifest")?"Jmol":this.viewer.getModelAdapter().getFileTypeName(J.io.JmolBinary.getBufferedReaderForString(a))):J.util.Escape.isAS(b)?b[0]:null},"~S");$_M(c$,"getZipDirectoryAsString",($fz=function(a){a=this.getBufferedInputStreamOrErrorMessageFromName(a,a,!1,!1,null,!1);return J.io.JmolBinary.getZipDirectoryAsStringAndClose(a)},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"createAtomSetCollectionFromFile",function(a,b,c){null==b.get("atomDataOnly")&&this.setLoadState(b);a=this.viewer.resolveDatabaseFormat(a);
var d=a.indexOf("::"),e=0<=d?a.substring(d+2):a,d=0<=d?a.substring(0,d):null;J.util.Logger.info("\nFileManager.getAtomSetCollectionFromFile("+e+")"+(a.equals(e)?"":" //"+a));var f=this.classifyName(e,!0);if(1==f.length)return f[0];a=f[0];f=f[1];b.put("fullPathName",(null==d?"":d+"::")+a.$replace("\\","/"));this.viewer.getBoolean(603979879)&&this.viewer.getBoolean(603979824)&&this.viewer.scriptStatus("Requesting "+a);b=new J.io.FileReader(this,this.viewer,f,a,e,d,null,b,c);b.run();return b.getAtomSetCollection()},
"~S,java.util.Map,~B");$_M(c$,"createAtomSetCollectionFromFiles",function(a,b,c){this.setLoadState(b);for(var d=Array(a.length),e=Array(a.length),f=Array(a.length),g=0;g<a.length;g++){var h=a[g].indexOf("::"),k=0<=h?a[g].substring(h+2):a[g],h=0<=h?a[g].substring(0,h):null,l=this.classifyName(k,!0);if(1==l.length)return l[0];d[g]=l[0];a[g]=l[0].$replace("\\","/");f[g]=h;e[g]=k}b.put("fullPathNames",d);b.put("fileTypes",f);a=this.newFilesReader(d,e,f,null,b,c);a.run();return a.getAtomSetCollection()},
"~A,java.util.Map,~B");$_M(c$,"createAtomSetCollectionFromString",function(a,b,c,d,e){e||J.viewer.DataManager.getInlineData(b,a,d,this.viewer.getDefaultLoadFilter());this.setLoadState(c);b=0<=a.indexOf("Viewer.AddHydrogens")?this.getFileInfo():null;c=new J.io.FileReader(this,this.viewer,"string","string","string",null,J.io.JmolBinary.getBufferedReaderForString(a),c,d);c.run();null!=b&&this.setFileInfo(b);!d&&!Clazz.instanceOf(c.getAtomSetCollection(),String)&&(this.viewer.zap(!1,!0,!1),this.fullPathName=
this.fileName="1 0 C 0 0"===a?"Jmol Model Kit":"string");return c.getAtomSetCollection()},"~S,J.util.SB,java.util.Map,~B,~B");$_M(c$,"createAtomSeCollectionFromStrings",function(a,b,c,d){if(!c.containsKey("isData")){var e='"'+this.viewer.getDataSeparator()+'"',f='"'+(d?"append":"model")+' inline"',g=new J.util.SB;g.append('set dataSeparator "~~~next file~~~";\ndata ').append(f);for(var h=0;h<a.length;h++)0<h&&g.append("~~~next file~~~"),g.append(a[h]);g.append("end ").append(f).append(";set dataSeparator ").append(e);
b.appendSB(g)}this.setLoadState(c);J.util.Logger.info("FileManager.getAtomSetCollectionFromStrings(string[])");b=Array(a.length);e=Array(a.length);for(h=0;h<a.length;h++)b[h]="string["+h+"]",e[h]=this.newDataReader(a[h]);a=this.newFilesReader(b,b,null,e,c,d);a.run();return a.getAtomSetCollection()},"~A,J.util.SB,java.util.Map,~B");$_M(c$,"createAtomSeCollectionFromArrayData",function(a,b,c){J.util.Logger.info("FileManager.getAtomSetCollectionFromArrayData(Vector)");for(var d=a.size(),e=Array(d),f=
Array(d),g=0;g<d;g++)e[g]="String["+g+"]",f[g]=this.newDataReader(a.get(g));a=this.newFilesReader(e,e,null,f,b,c);a.run();return a.getAtomSetCollection()},"java.util.List,java.util.Map,~B");$_M(c$,"newFilesReader",($fz=function(a,b,c,d,e,f){var g=J.api.Interface.getOptionInterface("io2.FilesReader");g.set(this,this.viewer,a,b,c,d,e,f);return g},$fz.isPrivate=!0,$fz),"~A,~A,~A,~A,java.util.Map,~B");$_M(c$,"newDataReader",($fz=function(a){var b=Clazz.instanceOf(a,String)?"String":J.util.Escape.isAS(a)?
"Array":Clazz.instanceOf(a,J.util.JmolList)?"List":null;return null==b?null:J.api.Interface.getOptionInterface("io2."+b+"DataReader").setData(a)},$fz.isPrivate=!0,$fz),"~O");$_M(c$,"createAtomSetCollectionFromDOM",function(a,b){var c=J.api.Interface.getOptionInterface("io2.DOMReadaer");c.set(this,this.viewer,a,b);c.run();return c.getAtomSetCollection()},"~O,java.util.Map");$_M(c$,"createAtomSetCollectionFromReader",function(a,b,c,d){a=new J.io.FileReader(this,this.viewer,b,a,b,null,c,d,!1);a.run();
return a.getAtomSetCollection()},"~S,~S,~O,java.util.Map");$_M(c$,"getBufferedInputStream",function(a){a=this.getBufferedReaderOrErrorMessageFromName(a,Array(2),!0,!0);return Clazz.instanceOf(a,java.io.BufferedInputStream)?a:null},"~S");$_M(c$,"getBufferedInputStreamOrErrorMessageFromName",function(a,b,c,d,e,f){b=null==b||null==this.pngjCache?null:J.io.JmolBinary.getCachedPngjBytes(this,b);null==b&&(b=this.cacheGet(a,!0));var g=null,h=null;try{if(null==b){var k=0<=a.indexOf("?POST?_PNGJBIN_"),l=k||
0<=a.indexOf("?POST?_PNGJ_");if(0<a.indexOf("?POST?_PNG_")||l){var m=this.viewer.getImageAs(l?"PNGJ":"PNG",-1,0,0,null,null);if(!J.util.Escape.isAB(m))return m;k?(e=m,a=J.util.TextFormat.simpleReplace(a,"?_","=_")):a=(new J.util.SB).append(a).append("=").appendSB(J.io.Base64.getBase64(m)).toString()}var n=J.viewer.FileManager.urlTypeIndex(a),k=0<=n,l=null;if(k&&0<=(n=a.indexOf("?POST?")))l=a.substring(n+6),a=a.substring(0,n);var p=null!=this.appletDocumentBaseURL,q=this.viewer.getFileAdapter();if(p||
k){p&&(k&&null!=this.appletProxy)&&(a=this.appletProxy+"?url="+this.urlEncode(a));var r=p?new java.net.URL(this.appletDocumentBaseURL,a,null):new java.net.URL(Clazz.castNullAs("java.net.URL"),a,null);if(d)return null;a=r.toString();c&&0>a.toLowerCase().indexOf("password")&&J.util.Logger.info("FileManager opening "+a);h=q.getBufferedURLInputStream(r,e,l);if(Clazz.instanceOf(h,J.util.SB)){a=h;if(f&&!J.io.JmolBinary.isBase64(a))return J.io.JmolBinary.getBufferedReaderForString(a.toString());h=J.io.JmolBinary.getBISForStringXBuilder(a)}else J.util.Escape.isAB(h)&&
(h=new java.io.BufferedInputStream(new java.io.ByteArrayInputStream(h)))}else if(null==(b=this.cacheGet(a,!0)))c&&J.util.Logger.info("FileManager opening "+a),h=q.getBufferedFileInputStream(a);if(Clazz.instanceOf(h,String))return h}g=null==b?h:new java.io.BufferedInputStream(new java.io.ByteArrayInputStream(b));d&&(g.close(),g=null);return g}catch(s){if(Clazz.exceptionOf(s,Exception))try{null!=g&&g.close()}catch(t){if(!Clazz.exceptionOf(t,java.io.IOException))throw t;}else throw s;}return""+s},"~S,~S,~B,~B,~A,~B");
$_M(c$,"urlEncode",($fz=function(a){try{return java.net.URLEncoder.encode(a,"utf-8")}catch(b){if(Clazz.exceptionOf(b,java.io.UnsupportedEncodingException))return a;throw b;}},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"getFullPathNameOrError",function(a){var b=this.classifyName(a,!0);if(null==b||null==b[0]||2>b.length)return[null,"cannot read file name: "+a];a=b[0];b=b[0].$replace("\\","/");a=J.io.JmolBinary.getZipRoot(a);a=this.getBufferedInputStreamOrErrorMessageFromName(a,b,!1,!0,null,!1);return[b,Clazz.instanceOf(a,
String)?a:null]},"~S");$_M(c$,"getBufferedReaderOrErrorMessageFromName",function(a,b,c,d){var e=this.cacheGet(a,!1),f=J.util.Escape.isAB(e),g=f?e:null;if(a.startsWith("cache://")){if(null==e)return"cannot read "+a;if(f)g=e;else return J.io.JmolBinary.getBufferedReaderForString(e)}e=this.classifyName(a,!0);if(null==e)return"cannot read file name: "+a;null!=b&&(b[0]=e[0].$replace("\\","/"));return this.getUnzippedBufferedReaderOrErrorMessageFromName(e[0],g,!1,c,!1,d)},"~S,~A,~B,~B");$_M(c$,"getEmbeddedFileState",
function(a){var b=null,b=this.getZipDirectory(a,!1);if(0==b.length)return a=this.viewer.getFileAsString4(a,2147483647,!1,!0),0>a.indexOf("**** Jmol Embedded Script ****")?"":J.io.JmolBinary.getEmbeddedScript(a);for(var c=0;c<b.length;c++)if(0<=b[c].indexOf(".spt"))return a=[a+"|"+b[c],null],this.getFileDataOrErrorAsString(a,2147483647,!1,!1),a[1];return""},"~S");$_M(c$,"getUnzippedBufferedReaderOrErrorMessageFromName",function(a,b,c,d,e,f){var g=null;f=null==b&&f?this.getSpartanFileList(a):null;var h=
a;if(null!=f){if(e)return f;if(null!=f[2]){c=f[1];d=new java.util.Hashtable;if(3==f.length){var k=this.getObjectAsSections(f[2],c,d);d.put("OUTPUT",k);f=J.io.JmolBinary.spartanFileList(a,d.get(k));3==f.length&&(k=this.getObjectAsSections(f[2],c,d),d.put("OUTPUT",k),f=J.io.JmolBinary.spartanFileList(f[1],d.get(k)))}g=new J.util.SB;null!=d.get("OUTPUT")&&g.append(d.get(d.get("OUTPUT")));for(var l=2;l<f.length;l++)a=f[l],a=this.getObjectAsSections(a,c,d),J.util.Logger.info("reading "+a),k=d.get(a),g.append(k);
k=g.toString();null==this.spardirCache&&(this.spardirCache=new java.util.Hashtable);this.spardirCache.put(h.$replace("\\","/"),k.getBytes());return J.io.JmolBinary.getBufferedReaderForString(k)}}null==b&&null!=this.pngjCache&&(b=J.io.JmolBinary.getCachedPngjBytes(this,a));f=a;0<=a.indexOf("|")&&(g=J.util.TextFormat.splitChars(a,"|"),null==b&&J.util.Logger.info("FileManager opening "+a),a=g[0]);a=null==b?this.getBufferedInputStreamOrErrorMessageFromName(a,f,!0,!1,null,!d):new java.io.BufferedInputStream(new java.io.ByteArrayInputStream(b));
try{if(Clazz.instanceOf(a,String)||Clazz.instanceOf(a,java.io.BufferedReader))return a;if(J.io.JmolBinary.isGzipS(a)){do a=new java.io.BufferedInputStream(J.io.JmolBinary.newGZIPInputStream(a));while(J.io.JmolBinary.isGzipS(a))}if(J.io.JmolBinary.isCompoundDocumentStream(a))return l=J.api.Interface.getOptionInterface("io2.CompoundDocument"),l.setStream(a,!0),J.io.JmolBinary.getBufferedReaderForString(l.getAllDataFiles("Molecule","Input").toString());a=J.io.JmolBinary.checkPngZipStream(a);if(J.io.JmolBinary.isZipStream(a)){if(c)return J.io.JmolBinary.newZipInputStream(a);
if(d)return J.io.JmolBinary.getZipFileContents(a,g,1,!0);k=J.io.JmolBinary.getZipFileContents(a,g,1,!1);a.close();return J.io.JmolBinary.getBufferedReaderForString(k)}return d?a:J.io.JmolBinary.getBufferedReader(a,null)}catch(m){if(Clazz.exceptionOf(m,Exception))return m.toString();throw m;}},"~S,~A,~B,~B,~B,~B");$_M(c$,"getSpartanFileList",($fz=function(a){if(a.endsWith(".spt"))return[null,null,null];if(a.endsWith(".spardir.zip"))return["SpartanSmol","Directory Entry ",a+"|output"];a=a.$replace("\\",
"/");if(!a.endsWith(".spardir")&&0>a.indexOf(".spardir/"))return null;var b=a.lastIndexOf(".spardir");return 0>b?null:a.lastIndexOf("/")>b?["SpartanSmol","Directory Entry ",a+"/input",a+"/archive",a+"/Molecule:asBinaryString",a+"/proparc"]:["SpartanSmol","Directory Entry ",a+"/output"]},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"getObjectAsSections",($fz=function(a,b,c){if(null==a)return null;var d=null,e=!1,f=a.$replace("\\","/");0<=a.indexOf(":asBinaryString")&&(e=!0,a=a.substring(0,a.indexOf(":asBinaryString")));
var g=null;if(c.containsKey(f))return f;if(0<=a.indexOf("#JMOL_MODEL "))return c.put(f,f+"\n"),f;var h=a;0<=a.indexOf("|")&&(d=J.util.TextFormat.splitChars(a,"|"),a=d[0]);var k=null;try{var l=this.getBufferedInputStreamOrErrorMessageFromName(a,h,!1,!1,null,!1);if(Clazz.instanceOf(l,String))return c.put(f,l+"\n"),f;k=l;if(J.io.JmolBinary.isCompoundDocumentStream(k)){var m=J.api.Interface.getOptionInterface("io2.CompoundDocument");m.setStream(k,!0);m.getAllDataMapped(a.$replace("\\","/"),"Molecule",
c)}else if(J.io.JmolBinary.isZipStream(k))J.io.JmolBinary.getAllZipData(k,d,a.$replace("\\","/"),"Molecule",c);else{if(e){var n=J.api.Interface.getOptionInterface("io2.BinaryDocument");n.setStream(k,!1);g=new J.util.SB;null!=b&&g.append("BEGIN Directory Entry "+f+"\n");try{for(;;)g.append(Integer.toHexString(n.readByte()&255)).appendC(" ")}catch(p){if(Clazz.exceptionOf(p,Exception))g.appendC("\n");else throw p;}}else{var q=J.io.JmolBinary.getBufferedReader(J.io.JmolBinary.isGzipS(k)?new java.io.BufferedInputStream(J.io.JmolBinary.newGZIPInputStream(k)):
k,null),r,g=new J.util.SB;for(null!=b&&g.append("BEGIN Directory Entry "+f+"\n");null!=(r=q.readLine());)g.append(r),g.appendC("\n");q.close()}null!=b&&g.append("\nEND Directory Entry "+f+"\n");c.put(f,g.toString())}}catch(s){if(Clazz.exceptionOf(s,Exception))c.put(f,s.toString());else throw s;}if(null!=k)try{k.close()}catch(t){if(!Clazz.exceptionOf(t,Exception))throw t;}c.containsKey(f)||c.put(f,"FILE NOT FOUND: "+f+"\n");return f},$fz.isPrivate=!0,$fz),"~S,~S,java.util.Map");$_M(c$,"getZipDirectory",
function(a,b){var c=this.getBufferedInputStreamOrErrorMessageFromName(a,a,!1,!1,null,!1);return J.io.JmolBinary.getZipDirectoryAndClose(c,b)},"~S,~B");$_M(c$,"getFileAsBytes",function(a,b,c){if(null==a)return null;var d=a,e=null;0<=a.indexOf("|")&&(e=J.util.TextFormat.splitChars(a,"|"),a=e[0],c=!0);a=this.getBufferedInputStreamOrErrorMessageFromName(a,d,!1,!1,null,!1);if(Clazz.instanceOf(a,String))return"Error:"+a;try{var f=null!=b||null==e||1>=e.length||!c||!J.io.JmolBinary.isZipStream(a)&&!J.io.JmolBinary.isPngZipStream(a)?
J.io.JmolBinary.getStreamAsBytes(a,b):J.io.JmolBinary.getZipFileContentsAsBytes(a,e,1);a.close();return f}catch(g){if(Clazz.exceptionOf(g,Exception))return g.toString();throw g;}},"~S,java.io.OutputStream,~B");$_M(c$,"getFileDataOrErrorAsString",function(a,b,c,d){a[1]="";var e=a[0];if(null==e)return!1;c=this.getBufferedReaderOrErrorMessageFromName(e,a,!1,c);if(Clazz.instanceOf(c,String))return a[1]=c,!1;try{var f=J.util.SB.newN(8192),g;if(2147483647==b){if(g=c.readLine(),d||null!=g&&0>g.indexOf("\x00")&&
(4!=g.length||65533!=g.charCodeAt(0)||1!=g.indexOf("PNG")))for(f.append(g).appendC("\n");null!=(g=c.readLine());)f.append(g).appendC("\n")}else{d=0;for(var h;d<b&&null!=(g=c.readLine());){if(b-d<(h=g.length)+1)g=g.substring(0,b-d-1);f.append(g).appendC("\n");d+=h+1}}c.close();a[1]=f.toString();return!0}catch(k){if(Clazz.exceptionOf(k,Exception))return a[1]=k.toString(),!1;throw k;}},"~A,~N,~B,~B");$_M(c$,"loadImage",function(a,b){for(var c=null,d=null,e="";null!=a;){e=this.classifyName(a,!0);if(null==
e){e="cannot read file name: "+a;break}var f=this.viewer.apiPlatform,e=e[0].$replace("\\","/");if(0<e.indexOf("|")){d=this.getFileAsBytes(e,null,!0);if(!J.util.Escape.isAB(d)){e=""+d;break}c=this.viewer.isJS?d:f.createImage(d)}else if(!this.viewer.isJS)if(0<=J.viewer.FileManager.urlTypeIndex(e))try{c=f.createImage(new java.net.URL(Clazz.castNullAs("java.net.URL"),e,null))}catch(g){if(Clazz.exceptionOf(g,Exception)){e="bad URL: "+e;break}else throw g;}else c=f.createImage(e);d=[b,e];try{if(!f.waitForDisplay(d,
c)){c=null;break}return}catch(h){if(Clazz.exceptionOf(h,Exception)){System.out.println(h.toString());e=h.toString()+" opening "+e;c=null;break}else throw h;}}this.viewer.loadImageData(c,e,b,null)},"~S,~S");c$.urlTypeIndex=$_M(c$,"urlTypeIndex",function(a){for(var b=0;b<J.viewer.FileManager.urlPrefixes.length;++b)if(a.startsWith(J.viewer.FileManager.urlPrefixes[b]))return b;return-1},"~S");c$.isLocal=$_M(c$,"isLocal",function(a){if(null==a)return!1;a=J.viewer.FileManager.urlTypeIndex(a);return 0>a||
3==a},"~S");$_M(c$,"classifyName",function(a,b){if(null==a)return[null];var c=0<this.pathForAllFiles.length;if(a.startsWith("?")){if(null==(a=this.viewer.dialogAsk("load",a.substring(1))))return[b?"#CANCELED#":null];c=!1}var d=null,e=null,f=null;if(a.startsWith("cache://"))return f=Array(3),f[0]=f[2]=a,f[1]=J.viewer.FileManager.stripPath(f[0]),f;a=this.viewer.resolveDatabaseFormat(a);0>a.indexOf(":")&&0!=a.indexOf("/")&&(a=J.viewer.FileManager.addDirectory(this.viewer.getDefaultDirectory(),a));if(null!=
this.appletDocumentBaseURL)try{if(1==a.indexOf(":\\")||1==a.indexOf(":/"))a="file:/"+a;e=new java.net.URL(this.appletDocumentBaseURL,a,null)}catch(g){if(Clazz.exceptionOf(g,java.net.MalformedURLException))return[b?g.toString():null];throw g;}else if(0<=J.viewer.FileManager.urlTypeIndex(a)||this.viewer.isRestricted(J.viewer.Viewer.ACCESS.NONE)||this.viewer.isRestricted(J.viewer.Viewer.ACCESS.READSPT)&&!a.endsWith(".spt")&&!a.endsWith("/"))try{e=new java.net.URL(Clazz.castNullAs("java.net.URL"),a,null)}catch(h){if(Clazz.exceptionOf(h,
java.net.MalformedURLException))return[b?h.toString():null];throw h;}else d=this.viewer.apiPlatform.newFile(a),f=[d.getAbsolutePath(),d.getName(),"file:/"+d.getAbsolutePath().$replace("\\","/")];null!=e&&(f=Array(3),f[0]=f[2]=e.toString(),f[1]=J.viewer.FileManager.stripPath(f[0]));c&&(c=f[0],f[0]=this.pathForAllFiles+f[1],J.util.Logger.info("FileManager substituting "+c+" --\x3e "+f[0]));if(b&&(null!=d||3==J.viewer.FileManager.urlTypeIndex(f[0])))d=null==d?J.util.TextFormat.trim(f[0].substring(5),
"/"):f[0],c=d.length-f[1].length-1,0<c&&(d=d.substring(0,c),J.viewer.FileManager.setLocalPath(this.viewer,d,!0));return f},"~S,~B");c$.addDirectory=$_M(c$,"addDirectory",($fz=function(a,b){if(0==a.length)return b;var c=0<b.length?b.charAt(0):" ",d=a.toLowerCase();if((d.endsWith(".zip")||d.endsWith(".tar"))&&"|"!=c&&"/"!=c)a+="|";return a+("/"==c||"/"==c||"|"==(c=a.charAt(a.length-1))||"/"==c?"":"/")+b},$fz.isPrivate=!0,$fz),"~S,~S");$_M(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=$_M(c$,"fixPath",($fz=function(a){a=a.$replace("\\","/");a=J.util.TextFormat.simpleReplace(a,"/./","/");var b=a.lastIndexOf("//")+1;1>b&&(b=a.indexOf(":/")+1);1>b&&(b=a.indexOf("/"));if(0>b)return null;var c=a.substring(0,b);for(a=a.substring(b);0<=(b=a.lastIndexOf("/../"));){var d=a.substring(0,b).lastIndexOf("/");if(0>d)return J.util.TextFormat.simpleReplace(c+a,"/../",
"/");a=a.substring(0,d)+a.substring(b+3)}0==a.length&&(a="/");return c+a},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"getFilePath",function(a,b,c){a=this.classifyName(a,!1);return null==a||1==a.length?"":c?a[1]:b?a[2]:null==a[0]?"":a[0].$replace("\\","/")},"~S,~B,~B");c$.getLocalUrl=$_M(c$,"getLocalUrl",function(a){if(a.getName().startsWith("="))return a.getName();a=a.getAbsolutePath().$replace("\\","/");for(var b=0;b<J.viewer.FileManager.urlPrefixPairs.length;b++)if(0==a.indexOf(J.viewer.FileManager.urlPrefixPairs[b]))return null;
for(b=0;b<J.viewer.FileManager.urlPrefixPairs.length;b+=2)if(0<a.indexOf(J.viewer.FileManager.urlPrefixPairs[b]))return J.viewer.FileManager.urlPrefixPairs[b+1]+J.util.TextFormat.trim(a.substring(a.indexOf(J.viewer.FileManager.urlPrefixPairs[b])+J.viewer.FileManager.urlPrefixPairs[b].length),"/");return null},"J.api.JmolFileInterface");c$.getLocalDirectory=$_M(c$,"getLocalDirectory",function(a,b){var c=a.getParameter(b?"currentLocalPath":"defaultDirectoryLocal");b&&0==c.length&&(c=a.getParameter("defaultDirectoryLocal"));
if(0==c.length)return a.isApplet()?null:a.apiPlatform.newFile(System.getProperty("user.dir","."));a.isApplet()&&0==c.indexOf("file:/")&&(c=c.substring(6));c=a.apiPlatform.newFile(c);return c.isDirectory()?c:c.getParentAsFile()},"J.api.JmolViewer,~B");c$.setLocalPath=$_M(c$,"setLocalPath",function(a,b,c){for(;b.endsWith("/")||b.endsWith("\\");)b=b.substring(0,b.length-1);a.setStringProperty("currentLocalPath",b);c||a.setStringProperty("defaultDirectoryLocal",b)},"J.api.JmolViewer,~S,~B");c$.getLocalPathForWritingFile=
$_M(c$,"getLocalPathForWritingFile",function(a,b){if(0==b.indexOf("file:/"))return b.substring(6);if(0==b.indexOf("/")||0<=b.indexOf(":"))return b;var c=J.viewer.FileManager.getLocalDirectory(a,!1);return null==c?b:J.viewer.FileManager.fixPath(c.toString()+"/"+b)},"J.api.JmolViewer,~S");c$.setScriptFileReferences=$_M(c$,"setScriptFileReferences",function(a,b,c,d){null!=b&&(a=J.viewer.FileManager.setScriptFileRefs(a,b,!0));null!=c&&(a=J.viewer.FileManager.setScriptFileRefs(a,c,!1));a=J.util.TextFormat.simpleReplace(a,
'\u0001"','"');if(null!=d){for(;d.endsWith("/");)d=d.substring(0,d.length-1);for(b=0;b<J.viewer.FileManager.scriptFilePrefixes.length;b++)c=J.viewer.FileManager.scriptFilePrefixes[b],a=J.util.TextFormat.simpleReplace(a,c+".",c+d)}return a},"~S,~S,~S,~S");c$.setScriptFileRefs=$_M(c$,"setScriptFileRefs",($fz=function(a,b,c){if(null==b)return a;var d=0==b.length,e=new J.util.JmolList;J.io.JmolBinary.getFileReferences(a,e);for(var f=new J.util.JmolList,g=new J.util.JmolList,h=e.size(),k=0;k<h;k++){var l=
e.get(k),m=l;if(c==J.viewer.FileManager.isLocal(m)){var n=d?-1:m.indexOf("/"+b+"/");0<=n?m=m.substring(n+1):(n=m.lastIndexOf("/"),0>n&&!d&&(m="/"+m),(0>n||d)&&n++,m=b+m.substring(n))}J.util.Logger.info("FileManager substituting "+l+" --\x3e "+m);f.addLast('"'+l+'"');g.addLast('\u0001"'+m+'"')}return J.util.TextFormat.replaceStrings(a,f,g)},$fz.isPrivate=!0,$fz),"~S,~S,~B");c$.stripPath=$_M(c$,"stripPath",function(a){var b=Math.max(a.lastIndexOf("|"),a.lastIndexOf("/"));return a.substring(b+1)},"~S");
c$.fixFileNameVariables=$_M(c$,"fixFileNameVariables",function(a,b){var c=J.util.TextFormat.simpleReplace(a,"%FILE",b);if(0>c.indexOf("%LC"))return c;b=b.toLowerCase();c=J.util.TextFormat.simpleReplace(c,"%LCFILE",b);4==b.length&&(c=J.util.TextFormat.simpleReplace(c,"%LC13",b.substring(1,3)));return c},"~S,~S");$_M(c$,"clearPngjCache",function(a){if(null==a||null!=this.pngjCache&&this.pngjCache.containsKey(this.getCanonicalName(J.io.JmolBinary.getZipRoot(a))))this.pngjCache=null},"~S");$_M(c$,"cachePut",
function(a,b){a=a.$replace("\\","/");J.util.Logger.debugging&&J.util.Logger.info("cachePut "+a);null==b||b.equals("")?this.cache.remove(a):this.cache.put(a,b)},"~S,~O");$_M(c$,"cacheGet",function(a,b){a=a.$replace("\\","/");J.util.Logger.debugging&&this.cache.containsKey(a)&&J.util.Logger.info("cacheGet "+a);var c=this.cache.get(a);return b&&Clazz.instanceOf(c,String)?null:c},"~S,~B");$_M(c$,"cacheClear",function(){this.cache.clear()});$_M(c$,"cacheFileByNameAdd",function(a,b){if(null==a||!b&&a.equalsIgnoreCase(""))return this.cacheClear(),
-1;var c;if(b){a=this.viewer.resolveDatabaseFormat(a);c=this.getFileAsBytes(a,null,!0);if(Clazz.instanceOf(c,String))return 0;this.cachePut(a,c)}else c=this.cache.remove(a.$replace("\\","/"));return null==c?0:(Clazz.instanceOf(c,String),c.length)},"~S,~B");$_M(c$,"cacheList",function(){for(var a=new java.util.Hashtable,b,c=this.cache.entrySet().iterator();c.hasNext()&&((b=c.next())||1);)a.put(b.getKey(),Integer.$valueOf(J.util.Escape.isAB(b.getValue())?b.getValue().length:b.getValue().toString().length));
return a});$_M(c$,"getCanonicalName",function(a){var b=this.classifyName(a,!0);return null==b?a:b[2]},"~S");Clazz.defineStatics(c$,"URL_LOCAL",3,"urlPrefixes",["http:","https:","ftp:","file:"],"urlPrefixPairs","http: http:// www. http://www. https: https:// ftp: ftp:// file: file:///".split(" "));c$.scriptFilePrefixes=c$.prototype.scriptFilePrefixes=['/*file*/"','FILE0="','FILE1="']}),Clazz.declarePackage("J.script"),Clazz.load(["J.script.T"],"J.script.ContextToken",["java.util.Hashtable","J.script.SV"],
function(){c$=Clazz.decorateAsClass(function(){this.name0=this.contextVariables=null;Clazz.instantialize(this,arguments)},J.script,"ContextToken",J.script.T);c$.newContext=$_M(c$,"newContext",function(a){a=a?J.script.ContextToken.newCmd(266280,"{"):J.script.ContextToken.newCmd(266278,"}");a.intValue=0;return a},"~B");c$.newCmd=$_M(c$,"newCmd",function(a,b){var c=new J.script.ContextToken;c.tok=a;c.value=b;return c},"~N,~O");$_M(c$,"addName",function(a){null==this.contextVariables&&(this.contextVariables=
new java.util.Hashtable);this.contextVariables.put(a,J.script.SV.newVariable(4,"").setName(a))},"~S")}),Clazz.declarePackage("J.script"),c$=Clazz.decorateAsClass(function(){this.fullpath="";this.statement=this.aatoken=this.lineIndices=this.lineNumbers=this.script=this.functionName=this.parallelProcessor=this.scriptFileName=null;this.pc=this.statementLength=0;this.lineEnd=this.pcEnd=2147483647;this.iToken=0;this.contextVariables=this.outputBuffer=null;this.isTryCatch=this.isStateScript=this.isFunction=
!1;this.errorMessageUntranslated=this.errorMessage=null;this.iCommandError=-1;this.errorType=null;this.scriptLevel=0;this.executionPaused=this.executionStepping=this.chk=!1;this.scriptExtensions=null;this.contextPath=" >> ";this.token=this.parentContext=null;this.displayLoadErrorsSave=this.allowJSThreads=this.isJSThread=this.mustResumeEval=!1;this.tryPt=0;this.isComplete=!0;Clazz.instantialize(this,arguments)},J.script,"ScriptContext"),Clazz.declarePackage("J.constant"),Clazz.load(["java.lang.Enum"],
"J.constant.EnumAnimationMode",null,function(){c$=Clazz.declareType(J.constant,"EnumAnimationMode",Enum);Clazz.defineEnumConstant(c$,"ONCE",0,[]);Clazz.defineEnumConstant(c$,"LOOP",1,[]);Clazz.defineEnumConstant(c$,"PALINDROME",2,[])}),Clazz.declarePackage("J.io"),Clazz.load(null,"J.io.FileReader","java.io.BufferedReader J.api.Interface J.io.JmolBinary J.util.Escape $.Logger $.TextFormat".split(" "),function(){c$=Clazz.decorateAsClass(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;Clazz.instantialize(this,arguments)},J.io,"FileReader");Clazz.makeConstructor(c$,function(a,b,c,d,e,f,g,h,k){this.fm=a;this.viewer=b;this.fileNameIn=c;this.fullPathNameIn=d;this.nameAsGivenIn=e;this.fileTypeIn=f;this.reader=Clazz.instanceOf(g,java.io.BufferedReader)?g:Clazz.instanceOf(g,java.io.Reader)?new java.io.BufferedReader(g):null;this.bytes=J.util.Escape.isAB(g)?g:null;this.htParams=
h;this.isAppend=k},"J.viewer.FileManager,J.viewer.Viewer,~S,~S,~S,~S,~O,java.util.Map,~B");$_M(c$,"run",function(){!this.isAppend&&this.viewer.displayLoadErrors&&this.viewer.zap(!1,!0,!1);var a=null,a=null;if(null==this.reader){null==this.fileTypeIn&&(this.fileTypeIn=J.io.JmolBinary.getBinaryType(this.fullPathNameIn));var b=J.io.JmolBinary.checkBinaryType(this.fileTypeIn),a=this.fm.getUnzippedBufferedReaderOrErrorMessageFromName(this.fullPathNameIn,this.bytes,!0,b,!1,!0);if(null==a||Clazz.instanceOf(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(Clazz.instanceOf(a,java.io.BufferedReader))this.reader=a;else if(Clazz.instanceOf(a,J.api.ZInputStream)){var c=this.fullPathNameIn,b=null!=J.io.JmolBinary.getBinaryType(c),d=null;0<=c.indexOf("|")&&!c.endsWith(".zip")&&(d=J.util.TextFormat.splitChars(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,b);try{d.close()}catch(e){if(!Clazz.exceptionOf(e,Exception))throw e;}}}Clazz.instanceOf(a,java.io.BufferedInputStream)&&(b=J.api.Interface.getOptionInterface("io2.BinaryDocument"),b.setStream(a,!0),this.reader=b);if(null!=this.reader){this.atomSetCollection=this.viewer.getModelAdapter().getAtomSetCollectionReader(this.fullPathNameIn,this.fileTypeIn,this.reader,
this.htParams);Clazz.instanceOf(this.atomSetCollection,String)||(this.atomSetCollection=this.viewer.getModelAdapter().getAtomSetCollection(this.atomSetCollection));try{Clazz.instanceOf(this.reader,java.io.BufferedReader)?this.reader.close():Clazz.instanceOf(this.reader,J.api.JmolDocument)&&this.reader.close()}catch(f){if(!Clazz.exceptionOf(f,java.io.IOException))throw f;}}Clazz.instanceOf(this.atomSetCollection,String)||(!this.isAppend&&!this.viewer.displayLoadErrors&&this.viewer.zap(!1,!0,!1),this.fm.fullPathName=
this.fullPathNameIn,this.fm.nameAsGiven=this.nameAsGivenIn,this.fm.fileName=this.fileNameIn)});$_M(c$,"getAtomSetCollection",function(){return this.atomSetCollection})}),Clazz.declarePackage("J.viewer"),Clazz.load(["java.util.Hashtable","J.constant.EnumVdw"],"J.viewer.DataManager","J.script.T J.util.ArrayUtil $.BS $.BSUtil $.Elements $.Escape $.Logger $.Parser $.SB".split(" "),function(){c$=Clazz.decorateAsClass(function(){this.bsUserVdws=this.defaultVdw=this.userVdwMars=this.userVdws=this.viewer=
this.dataValues=null;Clazz.instantialize(this,arguments)},J.viewer,"DataManager");Clazz.prepareFields(c$,function(){this.dataValues=new java.util.Hashtable;this.defaultVdw=J.constant.EnumVdw.JMOL});Clazz.makeConstructor(c$,function(a){this.viewer=a},"J.viewer.Viewer");$_M(c$,"clear",function(){this.dataValues.clear()});$_M(c$,"setData",function(a,b,c,d,e,f,g,h){if(null==a)this.clear();else if(a=a.toLowerCase(),a.equals("element_vdw")){var k=b[1].trim();if(0==k.length)this.bsUserVdws=this.userVdws=
this.userVdwMars=null;else{null==this.bsUserVdws&&this.setUserVdw(this.defaultVdw);J.util.Parser.parseFloatArrayFromMatchAndField(k,this.bsUserVdws,1,0,b[2],2,0,this.userVdws,1);for(g=this.userVdws.length;0<=--g;)this.userVdwMars[g]=Clazz.doubleToInt(Math.floor(1E3*this.userVdws[g]))}}else{if(null!=b[2]&&0<c){c=0!=e||-2147483648!=g&&2147483647!=g;var l=this.dataValues.get(a);d=null==l||c?Clazz.newFloatArray(d,0):J.util.ArrayUtil.ensureLengthA(l[1],d);var m=b[3].intValue(),k=0==m?b[1]:null,m=1==m?
b[1]:null,n=null;if(-2147483648==g&&1<(n=J.util.Parser.getTokens(k)).length)g=0;if(-2147483648==g)e=b[2],J.util.Parser.setSelectedFloats(J.util.Parser.parseFloatStr(k),e,d);else if(0==g||2147483647==g)if(e=b[2],null!=m)if(m.length==e.cardinality()){g=e.nextSetBit(0);for(h=0;0<=g;g=e.nextSetBit(g+1),h++)d[g]=m[h]}else for(g=e.nextSetBit(0);0<=g;g=e.nextSetBit(g+1))d[g]=m[g];else J.util.Parser.parseFloatArrayBsData(null==n?J.util.Parser.getTokens(k):n,e,d);else if(0>=e)e=b[2],J.util.Parser.parseFloatArrayFromMatchAndField(k,
e,0,0,null,g,h,d,1);else{m=b[2];J.util.Parser.parseFloatArrayFromMatchAndField(k,null,e,f,m,g,h,d,1);e=new J.util.BS;for(g=m.length;0<=--g;)0<=m[g]&&e.set(m[g])}null!=l&&(Clazz.instanceOf(l[2],J.util.BS)&&!c)&&e.or(l[2]);b[3]=Integer.$valueOf(1);b[2]=e;b[1]=d;if(0==a.indexOf("property_atom.")){b=J.script.T.getSettableTokFromString(a=a.substring(14));if(0==b){J.util.Logger.error("Unknown atom property: "+a);return}a=e.cardinality();c=Clazz.newFloatArray(a,0);l=0;for(g=e.nextSetBit(0);l<a;g=e.nextSetBit(g+
1))c[l++]=d[g];this.viewer.setAtomProperty(e,b,0,0,null,c,null);return}}this.dataValues.put(a,b)}},"~S,~A,~N,~N,~N,~N,~N,~N");$_M(c$,"getData",function(a){if(null==this.dataValues||null==a)return null;if(a.equalsIgnoreCase("types")){a=Array(2);a[0]="types";a[1]="";for(var b=0,c=this.dataValues.keySet().iterator();c.hasNext();)a[1]+=(0<b++?"\n":"")+c.next();return a}return this.dataValues.get(a)},"~S");$_M(c$,"getDataFloatA",function(a){if(null==this.dataValues)return null;a=this.getData(a);return null==
a||1!=a[3].intValue()?null:a[1]},"~S");$_M(c$,"getDataFloat",function(a,b){if(null!=this.dataValues){var c=this.getData(a);if(null!=c&&1==c[3].intValue()&&(c=c[1],b<c.length))return c[b]}return NaN},"~S,~N");$_M(c$,"getDataFloat2D",function(a){if(null==this.dataValues)return null;a=this.getData(a);return null==a||2!=a[3].intValue()?null:a[1]},"~S");$_M(c$,"getDataFloat3D",function(a){if(null==this.dataValues)return null;a=this.getData(a);return null==a||3!=a[3].intValue()?null:a[1]},"~S");$_M(c$,
"deleteModelAtoms",function(a,b,c){if(null!=this.dataValues)for(var d=this.dataValues.keySet().iterator();d.hasNext();){var e=d.next();if(0==e.indexOf("property_"))switch(e=this.dataValues.get(e),J.util.BSUtil.deleteBits(e[2],c),e[3].intValue()){case 1:e[1]=J.util.ArrayUtil.deleteElements(e[1],a,b);break;case 2:e[1]=J.util.ArrayUtil.deleteElements(e[1],a,b)}}},"~N,~N,J.util.BS");$_M(c$,"setUserVdw",($fz=function(a){this.userVdwMars=Clazz.newIntArray(J.util.Elements.elementNumberMax,0);this.userVdws=
Clazz.newFloatArray(J.util.Elements.elementNumberMax,0);this.bsUserVdws=new J.util.BS;a===J.constant.EnumVdw.USER&&(a=J.constant.EnumVdw.JMOL);for(var b=1;b<J.util.Elements.elementNumberMax;b++)this.userVdwMars[b]=J.util.Elements.getVanderwaalsMar(b,a),this.userVdws[b]=this.userVdwMars[b]/1E3},$fz.isPrivate=!0,$fz),"J.constant.EnumVdw");$_M(c$,"setDefaultVdw",function(a){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},"J.constant.EnumVdw");$_M(c$,"getDefaultVdwNameOrData",function(a,b,c){switch(a){case -2147483648:return this.defaultVdw.getVdwLabel();case 2147483647:if(null==(c=this.bsUserVdws))return"";b=J.constant.EnumVdw.USER}if(null==b||b===J.constant.EnumVdw.AUTO)b=this.defaultVdw;b===J.constant.EnumVdw.USER&&null==this.bsUserVdws&&this.setUserVdw(this.defaultVdw);
a=new J.util.SB;a.append(b.getVdwLabel()).append("\n");for(var d=null==c,e=d?1:c.nextSetBit(0),f=d?J.util.Elements.elementNumberMax:c.length();e<f&&0<=e;e=d?e+1:c.nextSetBit(e+1))a.appendI(e).appendC("\t").appendF(b===J.constant.EnumVdw.USER?this.userVdws[e]:J.util.Elements.getVanderwaalsMar(e,b)/1E3).appendC("\t").append(J.util.Elements.elementSymbolFromNumber(e)).appendC("\n");return null==c?a.toString():'\n  DATA "element_vdw"\n'+a.append('  end "element_vdw";\n\n').toString()},"~N,J.constant.EnumVdw,J.util.BS");
c$.getInlineData=$_M(c$,"getInlineData",function(a,b,c,d){c=(c?"append":"model")+" inline";a.append('load /*data*/ data "').append(c).append('"\n').append(b).append('end "').append(c).append(null==d||0==d.length?"":" filter"+J.util.Escape.eS(d)).append('";')},"J.util.SB,~S,~B,~S")}),Clazz.declarePackage("J.util"),Clazz.declareInterface(J.util,"JmolNode"),Clazz.declarePackage("J.util"),Clazz.load(["J.util.P3"],"J.util.Point3fi",null,function(){c$=Clazz.decorateAsClass(function(){this.screenZ=this.screenY=
this.screenX=this.index=0;this.modelIndex=this.screenDiameter=-1;Clazz.instantialize(this,arguments)},J.util,"Point3fi",J.util.P3);c$.set2=$_M(c$,"set2",function(a,b){a.x=b.x;a.y=b.y;a.z=b.z},"J.util.P3,J.util.P3i")}),Clazz.declarePackage("J.modelset"),Clazz.load(["J.util.JmolNode","$.Point3fi","J.constant.EnumPalette","J.viewer.JC"],"J.modelset.Atom","java.lang.Float J.atomdata.RadiusData J.constant.EnumVdw J.util.C $.ColorUtil $.Elements $.P3 $.SB $.V3".split(" "),function(){c$=Clazz.decorateAsClass(function(){this.alternateLocationID=
"\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;Clazz.instantialize(this,arguments)},J.modelset,"Atom",J.util.Point3fi,J.util.JmolNode);Clazz.prepareFields(c$,function(){this.paletteID=J.constant.EnumPalette.CPK.id});
$_M(c$,"getAtomID",function(){return this.atomID});$_M(c$,"getBonds",function(){return this.bonds});$_M(c$,"setBonds",function(a){this.bonds=a},"~A");$_M(c$,"getNBackbonesDisplayed",function(){return this.nBackbonesDisplayed});Clazz.overrideConstructor(c$,function(a,b,c,d,e,f,g,h,k,l,m){this.modelIndex=a;this.atomSymmetry=g;this.atomSite=h;this.index=b;this.atomicAndIsotopeNumber=k;m&&(this.formalChargeAndFlags=2);this.setFormalCharge(l);this.userDefinedVanDerWaalRadius=f;this.set(c,d,e)},"~N,~N,~N,~N,~N,~N,J.util.BS,~N,~N,~N,~B");
$_M(c$,"setAltLoc",function(a){this.alternateLocationID=a},"~S");$_M(c$,"setShapeVisibilityFlags",function(a){this.shapeVisibilityFlags=a},"~N");$_M(c$,"setShapeVisibility",function(a,b){this.shapeVisibilityFlags=b?this.shapeVisibilityFlags|a:this.shapeVisibilityFlags&~a},"~N,~B");$_M(c$,"isCovalentlyBonded",function(a){if(null!=this.bonds)for(var b=this.bonds.length;0<=--b;)if(this.bonds[b].isCovalent()&&this.bonds[b].getOtherAtom(this)===a)return!0;return!1},"J.modelset.Atom");$_M(c$,"isBonded",
function(a){if(null!=this.bonds)for(var b=this.bonds.length;0<=--b;)if(this.bonds[b].getOtherAtom(this)===a)return!0;return!1},"J.modelset.Atom");$_M(c$,"getBond",function(a){if(null!=this.bonds)for(var b=this.bonds.length;0<=--b;)if(null!=this.bonds[b].getOtherAtom(a))return this.bonds[b];return null},"J.modelset.Atom");$_M(c$,"addDisplayedBond",function(a,b){this.nBondsDisplayed+=b?1:-1;this.setShapeVisibility(a,0<this.nBondsDisplayed)},"~N,~B");$_M(c$,"addDisplayedBackbone",function(a,b){this.nBackbonesDisplayed+=
b?1:-1;this.setShapeVisibility(a,b)},"~N,~B");$_M(c$,"deleteBond",function(a){if(null!=this.bonds)for(var b=this.bonds.length;0<=--b;)if(this.bonds[b]===a){this.deleteBondAt(b);break}},"J.modelset.Bond");$_M(c$,"deleteBondAt",($fz=function(a){var b=this.bonds.length-1;if(0==b)this.bonds=null;else{for(var c=Array(b),d=0;d<a;++d)c[d]=this.bonds[d];for(;d<b;++d)c[d]=this.bonds[d+1];this.bonds=c}},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"clearBonds",function(){this.bonds=null});Clazz.overrideMethod(c$,"getBondedAtomIndex",
function(a){return this.bonds[a].getOtherAtom(this).index},"~N");$_M(c$,"setMadAtom",function(a,b){this.madAtom=this.calculateMad(a,b)},"J.viewer.Viewer,J.atomdata.RadiusData");$_M(c$,"calculateMad",function(a,b){if(null==b)return 0;var c=b.value;if(0==c)return 0;switch(b.factorType){case J.atomdata.RadiusData.EnumType.SCREEN:return Clazz.floatToShort(c);case J.atomdata.RadiusData.EnumType.FACTOR:case J.atomdata.RadiusData.EnumType.OFFSET:var d=0;switch(b.vdwType){case J.constant.EnumVdw.TEMP:d=a.getBfactor100Hi();
d=0<d?this.getBfactor100()/d:0;break;case J.constant.EnumVdw.HYDRO:d=Math.abs(this.getHydrophobicity());break;case J.constant.EnumVdw.IONIC:d=this.getBondingRadiusFloat();break;case J.constant.EnumVdw.ADPMIN:case J.constant.EnumVdw.ADPMAX:d=this.getADPMinMax(b.vdwType===J.constant.EnumVdw.ADPMAX);break;default:d=this.getVanderwaalsRadiusFloat(a,b.vdwType)}c=b.factorType===J.atomdata.RadiusData.EnumType.FACTOR?c*d:c+d}d=Clazz.floatToShort(0>c?c:2E3*c);0>d&&0<c&&(d=0);return d},"J.viewer.Viewer,J.atomdata.RadiusData");
$_M(c$,"getADPMinMax",function(a){var b=this.getEllipsoid();return null==b?0:null==b[0]?b[1].lengths[a?2:0]*b[1].$scale:b[0].lengths[a?2:0]*b[0].$scale},"~B");$_M(c$,"getRasMolRadius",function(){return Math.abs(Clazz.doubleToInt(this.madAtom/8))});Clazz.overrideMethod(c$,"getCovalentBondCount",function(){if(null==this.bonds)return 0;for(var a=0,b,c=this.bonds.length;0<=--c;)0!=((b=this.bonds[c]).order&1023)&&!b.getOtherAtom(this).isDeleted()&&++a;return a});Clazz.overrideMethod(c$,"getCovalentHydrogenCount",
function(){if(null==this.bonds)return 0;for(var a=0,b=this.bonds.length;0<=--b;)if(0!=(this.bonds[b].order&1023)){var c=this.bonds[b].getOtherAtom(this);0<=c.valence&&1==c.getElementNumber()&&++a}return a});Clazz.overrideMethod(c$,"getEdges",function(){return this.bonds});$_M(c$,"setColixAtom",function(a){this.colixAtom=a},"~N");$_M(c$,"setPaletteID",function(a){this.paletteID=a},"~N");$_M(c$,"setTranslucent",function(a,b){this.colixAtom=J.util.C.getColixTranslucent3(this.colixAtom,a,b)},"~B,~N");
$_M(c$,"isTranslucent",function(){return J.util.C.isColixTranslucent(this.colixAtom)});Clazz.overrideMethod(c$,"getElementNumber",function(){return J.util.Elements.getElementNumber(this.atomicAndIsotopeNumber)});Clazz.overrideMethod(c$,"getIsotopeNumber",function(){return J.util.Elements.getIsotopeNumber(this.atomicAndIsotopeNumber)});Clazz.overrideMethod(c$,"getAtomicAndIsotopeNumber",function(){return this.atomicAndIsotopeNumber});$_M(c$,"setAtomicAndIsotopeNumber",function(a){if(0>a||a%128>=J.util.Elements.elementNumberMax||
32767<a)a=0;this.atomicAndIsotopeNumber=a},"~N");$_M(c$,"getElementSymbolIso",function(a){return J.util.Elements.elementSymbolFromNumber(a?this.atomicAndIsotopeNumber:this.atomicAndIsotopeNumber%128)},"~B");$_M(c$,"getElementSymbol",function(){return this.getElementSymbolIso(!0)});$_M(c$,"getAlternateLocationID",function(){return this.alternateLocationID});$_M(c$,"isAlternateLocationMatch",function(a){if(null==a)return"\x00"==this.alternateLocationID;if(1!=a.length)return!1;a=a.charAt(0);return"*"==
a||"?"==a&&"\x00"!=this.alternateLocationID||this.alternateLocationID==a},"~S");$_M(c$,"isHetero",function(){return 0!=(this.formalChargeAndFlags&2)});$_M(c$,"hasVibration",function(){return 0!=(this.formalChargeAndFlags&1)});$_M(c$,"setFormalCharge",function(a){this.formalChargeAndFlags=this.formalChargeAndFlags&3|(-2147483648==a?0:7<a?7:-3>a?-3:a)<<2},"~N");$_M(c$,"setVibrationVector",function(){this.formalChargeAndFlags|=1});Clazz.overrideMethod(c$,"getFormalCharge",function(){return this.formalChargeAndFlags>>
2});$_M(c$,"getOccupancy100",function(){var a=this.group.chain.model.modelSet.occupancies;return null==a?100:a[this.index]});$_M(c$,"getBfactor100",function(){var a=this.group.chain.model.modelSet.bfactor100s;return null==a?0:a[this.index]});$_M(c$,"getHydrophobicity",($fz=function(){var a=this.group.chain.model.modelSet.hydrophobicities;return null==a?J.util.Elements.getHydrophobicity(this.group.getGroupID()):a[this.index]},$fz.isPrivate=!0,$fz));$_M(c$,"setRadius",function(a){return!Float.isNaN(this.userDefinedVanDerWaalRadius=
0<a?a:NaN)},"~N");$_M(c$,"$delete",function(a){this.valence=-1;if(null!=this.bonds)for(var b=this.bonds.length;0<=--b;){var c=this.bonds[b];c.getOtherAtom(this).deleteBond(c);a.set(c.index)}this.bonds=null},"J.util.BS");Clazz.overrideMethod(c$,"isDeleted",function(){return 0>this.valence});$_M(c$,"setValence",function(a){this.isDeleted()||(this.valence=0>a?0:239>a?a:239)},"~N");Clazz.overrideMethod(c$,"getValence",function(){if(this.isDeleted())return-1;var a=this.valence;if(0==a&&null!=this.bonds)for(var b=
this.bonds.length;0<=--b;)a+=this.bonds[b].getValence();return a});Clazz.overrideMethod(c$,"getImplicitHydrogenCount",function(){return this.group.chain.model.modelSet.getImplicitHydrogenCount(this)});$_M(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 9:case 17:case 35:case 53:return 1}return-1});$_M(c$,"getDimensionValue",function(a){return 0==a?this.x:1==a?this.y:this.z},"~N");$_M(c$,"getVanderwaalsRadiusFloat",
function(a,b){return Float.isNaN(this.userDefinedVanDerWaalRadius)?a.getVanderwaalsMarType(this.atomicAndIsotopeNumber%128,this.getVdwType(b))/1E3:this.userDefinedVanDerWaalRadius},"J.viewer.Viewer,J.constant.EnumVdw");$_M(c$,"getVdwType",($fz=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},$fz.isPrivate=!0,$fz),"J.constant.EnumVdw");$_M(c$,"getCovalentRadiusFloat",($fz=function(){return J.util.Elements.getBondingRadiusFloat(this.atomicAndIsotopeNumber,0)},$fz.isPrivate=!0,$fz));$_M(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});$_M(c$,"getVolume",function(a,b){var c=null==
b?this.userDefinedVanDerWaalRadius:NaN;Float.isNaN(c)&&(c=a.getVanderwaalsMarType(this.getElementNumber(),this.getVdwType(b))/1E3);var d=0;if(null!=this.bonds)for(var e=0;e<this.bonds.length;e++)if(this.bonds[e].isCovalent()){var f=this.bonds[e].getOtherAtom(this),g=null==b?f.userDefinedVanDerWaalRadius:NaN;Float.isNaN(g)&&(g=a.getVanderwaalsMarType(f.getElementNumber(),f.getVdwType(b))/1E3);f=this.distance(f);if(!(f>c+g)){if(f+c<=g)return 0;g=c-(c*c+f*f-g*g)/(2*f);d-=1.0471975511965976*g*g*(3*c-
g)}}return d+4.1887902047863905*c*c*c},"J.viewer.Viewer,J.constant.EnumVdw");$_M(c$,"getCurrentBondCount",function(){return null==this.bonds?0:this.bonds.length});$_M(c$,"getColix",function(){return this.colixAtom});$_M(c$,"getPaletteID",function(){return this.paletteID});$_M(c$,"getRadius",function(){return Math.abs(this.madAtom/2E3)});Clazz.overrideMethod(c$,"getIndex",function(){return this.index});Clazz.overrideMethod(c$,"getAtomSite",function(){return this.atomSite});$_M(c$,"setAtomSymmetry",
function(a){this.atomSymmetry=a},"J.util.BS");$_M(c$,"getAtomSymmetry",function(){return this.atomSymmetry});$_M(c$,"setGroup",function(a){this.group=a},"J.modelset.Group");$_M(c$,"getGroup",function(){return this.group});Clazz.overrideMethod(c$,"getGroupBits",function(a){this.group.selectAtoms(a)},"J.util.BS");Clazz.overrideMethod(c$,"getAtomName",function(){return 0<this.atomID?J.viewer.JC.getSpecialAtomName(this.atomID):this.group.chain.model.modelSet.atomNames[this.index]});Clazz.overrideMethod(c$,
"getAtomType",function(){var a=this.group.chain.model.modelSet.atomTypes,a=null==a?null:a[this.index];return null==a?this.getAtomName():a});$_M(c$,"getAtomNumber",function(){var a=this.group.chain.model.modelSet.atomSerials;return null!=a?a[this.index]:this.index});$_M(c$,"isInFrame",function(){return 0!=(this.shapeVisibilityFlags&1)});$_M(c$,"getShapeVisibilityFlags",function(){return this.shapeVisibilityFlags});$_M(c$,"isShapeVisible",function(a){return 0!=(this.shapeVisibilityFlags&a)},"~N");$_M(c$,
"getPartialCharge",function(){var a=this.group.chain.model.modelSet.partialCharges;return null==a?0:a[this.index]});$_M(c$,"getEllipsoid",function(){return this.group.chain.model.modelSet.getEllipsoid(this.index)});$_M(c$,"scaleEllipsoid",function(a,b){var c=this.getEllipsoid();null==c||(b>=c.length||null==c[b])||c[b].setSize(a)},"~N,~N");$_M(c$,"getSymmetryTranslation",function(a,b,c){for(var d=0;d<b.length;d++)if(this.atomSymmetry.get(a+=c))return b[d];return 0},"~N,~A,~N");$_M(c$,"getCellTranslation",
function(a,b,c){for(var d=c,e=0;e<b.length;e++)for(var f=0;f<c;f++,d++)if(this.atomSymmetry.get(d)&&b[e]==a)return b[e];return 0},"~N,~A,~N");$_M(c$,"getSymmetryOperatorList",function(){var a="",b=this.group.chain.model.modelSet,c=b.getModelSymmetryCount(this.modelIndex);if(0==c||null==this.atomSymmetry)return"";for(var b=b.getModelCellRange(this.modelIndex),d=c,e=null==b?1:b.length,f=0;f<e;f++)for(var g=0;g<c;g++)this.atomSymmetry.get(d++)&&(a+=","+(g+1)+""+b[f]);return a.substring(1)});Clazz.overrideMethod(c$,
"getModelIndex",function(){return this.modelIndex});$_M(c$,"getMoleculeNumber",function(a){return this.group.chain.model.modelSet.getMoleculeIndex(this.index,a)+1},"~B");$_M(c$,"getFractionalCoord",($fz=function(a,b){var c=this.getFractionalCoordPt(b);return"X"==a?c.x:"Y"==a?c.y:c.z},$fz.isPrivate=!0,$fz),"~S,~B");$_M(c$,"getFractionalCoordPt",($fz=function(a){var b=this.group.chain.model.modelSet.getUnitCell(this.modelIndex);if(null==b)return this;var c=J.util.P3.newP(this);b.toFractional(c,a);return c},
$fz.isPrivate=!0,$fz),"~B");$_M(c$,"getFractionalUnitCoord",($fz=function(a){var b=this.getFractionalUnitCoordPt(!1);return"X"==a?b.x:"Y"==a?b.y:b.z},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"getFractionalUnitCoordPt",function(a){var b=this.group.chain.model.modelSet.getUnitCell(this.modelIndex);if(null==b)return this;var c=J.util.P3.newP(this);this.group.chain.model.isJmolDataFrame?(b.toFractional(c,!1),a&&b.toCartesian(c,!1)):(b.toUnitCell(c,null),a||b.toFractional(c,!1));return c},"~B");$_M(c$,"getFractionalUnitDistance",
function(a,b,c){var d=this.group.chain.model.modelSet.getUnitCell(this.modelIndex);if(null==d)return this.distance(a);b.setT(this);c.setT(a);this.group.chain.model.isJmolDataFrame?(d.toFractional(b,!0),d.toFractional(c,!0)):(d.toUnitCell(b,null),d.toUnitCell(c,null));return b.distance(c)},"J.util.P3,J.util.P3,J.util.P3");$_M(c$,"setFractionalCoord",function(a,b,c){var d=this.group.chain.model.modelSet.getUnitCell(this.modelIndex);null!=d&&d.toFractional(this,c);switch(a){case 1112541191:case 1112541188:this.x=
b;break;case 1112541192:case 1112541189:this.y=b;break;case 1112541193:case 1112541190:this.z=b}null!=d&&d.toCartesian(this,c)},"~N,~N,~B");$_M(c$,"setFractionalCoordTo",function(a,b){this.setFractionalCoordPt(this,a,b)},"J.util.P3,~B");$_M(c$,"setFractionalCoordPt",function(a,b,c){a.setT(b);b=this.group.chain.model.modelSet.getUnitCell(this.modelIndex);null!=b&&b.toCartesian(a,c&&!this.group.chain.model.isJmolDataFrame)},"J.util.P3,J.util.P3,~B");$_M(c$,"isCursorOnTopOf",function(a,b,c,d){var e=
Clazz.doubleToInt(this.screenDiameter/2);e<c&&(e=c);c=e*e;e=this.screenX-a;e*=e;if(e>c)return!1;var f=this.screenY-b;c-=e+f*f;if(0>c)return!1;if(null==d)return!0;var e=this.screenZ,f=d.screenZ,g=Clazz.doubleToInt(d.screenDiameter/2);if(e<f-g)return!0;a=d.screenX-a;b=d.screenY-b;b=g*g-(a*a+b*b);return e-Math.sqrt(c)<f-Math.sqrt(b)},"~N,~N,~N,J.modelset.Atom");$_M(c$,"getInfo",function(){return this.getIdentity(!0)});$_M(c$,"getInfoXYZ",function(a){if(a){a=this.getGroup3(!0);var b=this.getChainID(),
c=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!=b.charCodeAt(0)&&" "!=b?" Chain: "+b:""):"")+" Model: "+this.getModelNumber()+" Coordinates: "+this.x+" "+this.y+" "+this.z+(null==c?"":" Fractional: "+c.x+" "+c.y+" "+c.z)}return this.getIdentityXYZ(!0)},"~B");$_M(c$,"getIdentityXYZ",function(a){var b=this.group.chain.model.isJmolDataFrame?
this.getFractionalCoordPt(!1):this;return this.getIdentity(a)+" "+b.x+" "+b.y+" "+b.z},"~B");$_M(c$,"getIdentity",function(a){var b=new J.util.SB,c=this.getGroup3(!0);if(null!=c&&0<c.length){b.append("[");b.append(c);b.append("]");c=this.getSeqcodeString();null!=c&&b.append(c);c=this.getChainID();0!=c.charCodeAt(0)&&" "!=c&&(b.append(":"),b.appendC(c));if(!a)return b.toString();b.append(".")}b.append(this.getAtomName());0==b.length()&&(b.append(this.getElementSymbolIso(!1)),b.append(" "),b.appendI(this.getAtomNumber()));
0!=this.alternateLocationID.charCodeAt(0)&&(b.append("%"),b.appendC(this.alternateLocationID));1<this.group.chain.model.modelSet.modelCount&&(b.append("/"),b.append(this.getModelNumberForLabel()));b.append(" #");b.appendI(this.getAtomNumber());return b.toString()},"~B");Clazz.overrideMethod(c$,"getGroup3",function(a){var b=this.group.getGroup3();return a||null!=b&&0<b.length?b:"UNK"},"~B");Clazz.overrideMethod(c$,"getGroup1",function(a){var b=this.group.getGroup1();return"\x00"!=b?""+b:"\x00"!=a?
""+a:""},"~S");Clazz.overrideMethod(c$,"isProtein",function(){return this.group.isProtein()});$_M(c$,"isCarbohydrate",function(){return this.group.isCarbohydrate()});Clazz.overrideMethod(c$,"isNucleic",function(){return this.group.isNucleic()});Clazz.overrideMethod(c$,"isDna",function(){return this.group.isDna()});Clazz.overrideMethod(c$,"isRna",function(){return this.group.isRna()});Clazz.overrideMethod(c$,"isPurine",function(){return this.group.isPurine()});Clazz.overrideMethod(c$,"isPyrimidine",
function(){return this.group.isPyrimidine()});$_M(c$,"getSeqcode",function(){return this.group.getSeqcode()});Clazz.overrideMethod(c$,"getResno",function(){return this.group.getResno()});$_M(c$,"isClickable",function(){return!this.isVisible(0)?!1:0!=((this.shapeVisibilityFlags|this.group.shapeVisibilityFlags)&this.clickabilityFlags)});$_M(c$,"getClickabilityFlags",function(){return this.clickabilityFlags});$_M(c$,"setClickable",function(a){this.clickabilityFlags=0==a?0:this.clickabilityFlags|a},"~N");
$_M(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");Clazz.overrideMethod(c$,"isLeadAtom",function(){return this.group.isLeadAtom(this.index)});$_M(c$,"getGroupParameter",function(a){return this.group.getGroupParameter(a)},
"~N");Clazz.overrideMethod(c$,"getChainID",function(){return this.group.chain.chainID});$_M(c$,"getSurfaceDistance100",function(){return this.group.chain.model.modelSet.getSurfaceDistance100(this.index)});$_M(c$,"getVibrationVector",function(){return this.group.chain.model.modelSet.getVibrationVector(this.index,!1)});$_M(c$,"getVibrationCoord",function(a){return this.group.chain.model.modelSet.getVibrationCoord(this.index,a)},"~S");$_M(c$,"getPolymerLength",function(){return this.group.getBioPolymerLength()});
$_M(c$,"getPolymerIndexInModel",function(){return this.group.getBioPolymerIndexInModel()});$_M(c$,"getMonomerIndex",function(){return this.group.getMonomerIndex()});$_M(c$,"getSelectedGroupCountWithinChain",function(){return this.group.chain.selectedGroupCount});$_M(c$,"getSelectedGroupIndexWithinChain",function(){return this.group.getSelectedGroupIndex()});$_M(c$,"getSelectedMonomerCountWithinPolymer",function(){return this.group.getSelectedMonomerCount()});$_M(c$,"getSelectedMonomerIndexWithinPolymer",
function(){return this.group.getSelectedMonomerIndex()});$_M(c$,"getChain",function(){return this.group.chain});$_M(c$,"getModelNumberForLabel",function(){return this.group.chain.model.modelSet.getModelNumberForAtomLabel(this.modelIndex)});$_M(c$,"getModelNumber",function(){return this.group.chain.model.modelSet.getModelNumber(this.modelIndex)%1E6});$_M(c$,"getModelFileIndex",function(){return this.group.chain.model.fileIndex});$_M(c$,"getModelFileNumber",function(){return this.group.chain.model.modelSet.getModelFileNumber(this.modelIndex)});
Clazz.overrideMethod(c$,"getBioStructureTypeName",function(){return this.getProteinStructureType().getBioStructureTypeName(!0)});$_M(c$,"getProteinStructureType",function(){return this.group.getProteinStructureType()});$_M(c$,"getProteinStructureSubType",function(){return this.group.getProteinStructureSubType()});$_M(c$,"getStrucNo",function(){return this.group.getStrucNo()});$_M(c$,"getStructureId",function(){return this.group.getStructureId()});$_M(c$,"getProteinStructureTag",function(){return this.group.getProteinStructureTag()});
$_M(c$,"getGroupID",function(){return this.group.groupID});$_M(c$,"getSeqcodeString",function(){return this.group.getSeqcodeString()});$_M(c$,"getSeqNumber",function(){return this.group.getSeqNumber()});$_M(c$,"getInsertionCode",function(){return this.group.getInsertionCode()});Clazz.overrideMethod(c$,"equals",function(a){return this===a},"~O");Clazz.overrideMethod(c$,"hashCode",function(){return this.index});$_M(c$,"findAromaticNeighbor",function(a){if(null==this.bonds)return null;for(var b=this.bonds.length;0<=
--b;){var c=this.bonds[b],d=c.getOtherAtom(this);if(c.isAromatic()&&d.index!=a)return d}return null},"~N");c$.atomPropertyInt=$_M(c$,"atomPropertyInt",function(a,b){switch(b){case 1095763969:return a.getAtomNumber();case 1095761922:return a.atomID;case 1095761923:return a.getIndex();case 1095761924:return a.getCovalentBondCount();case 1766856708:return a.group.chain.model.modelSet.viewer.getColorArgbOrGray(a.getColix());case 1087375365:case 1095763976:return a.getElementNumber();case 1095761927:return a.atomicAndIsotopeNumber;
case 1229984263:return a.getModelFileIndex()+1;case 1632634889:return a.getFormalCharge();case 1095761930:return a.getGroupID();case 1095761931:return a.group.getGroupIndex();case 1095766028:return a.getModelNumber();case -1095766028:return a.getModelFileNumber();case 1095761933:return a.modelIndex;case 1095761934:return a.getMoleculeNumber(!0);case 1129318401:return a.getOccupancy100();case 1095761935:return a.getGroup().getBioPolymerIndexInModel()+1;case 1095761936:return a.getPolymerLength();case 1666189314:return a.getRasMolRadius();
case 1095761937:return a.getResno();case 1095761938:return a.getAtomSite();case 1641025539:return a.getProteinStructureType().getId();case 1238369286:return a.getProteinStructureSubType().getId();case 1095761939:return a.getStrucNo();case 1095763988:return a.getValence()}return 0},"J.modelset.Atom,~N");c$.atomPropertyFloat=$_M(c$,"atomPropertyFloat",function(a,b,c){switch(c){case 1666189314:return b.getRadius();case 1114638350:return a.isAtomSelected(b.index)?1:0;case 1112539149:return b.group.chain.model.modelSet.getSurfaceDistanceMax(),
b.getSurfaceDistance100()/100;case 1112541199:return b.getBfactor100()/100;case 1114638346:return b.getHydrophobicity();case 1313866247:return b.getVolume(a,J.constant.EnumVdw.AUTO);case 1112539137:return b.getADPMinMax(!0);case 1112539138:return b.getADPMinMax(!1);case 1112541185:case 1112541205:return b.x;case 1112541186:case 1112541206:return b.y;case 1112541187:case 1112541207:return b.z;case 1112539139:return b.getCovalentRadiusFloat();case 1112541188:return b.getFractionalCoord("X",!0);case 1112541189:return b.getFractionalCoord("Y",
!0);case 1112541190:return b.getFractionalCoord("Z",!0);case 1112541191:return b.getFractionalCoord("X",!1);case 1112541192:return b.getFractionalCoord("Y",!1);case 1112541193:return b.getFractionalCoord("Z",!1);case 1112539145:return b.screenX;case 1112539146:return b.group.chain.model.modelSet.viewer.getScreenHeight()-b.screenY;case 1112539147:return b.screenZ;case 1112541195:return b.getBondingRadiusFloat();case 1112539141:return b.getMass();case 1129318401:return b.getOccupancy100()/100;case 1112541196:return b.getPartialCharge();
case 1112539143:case 1112539144:case 1112539142:if(b.group.chain.model.isJmolDataFrame&&b.group.chain.model.jmolFrameType.startsWith("plot ramachandran"))switch(c){case 1112539143:return b.getFractionalCoord("X",!1);case 1112539144:return b.getFractionalCoord("Y",!1);case 1112539142:if(b.group.chain.model.isJmolDataFrame&&b.group.chain.model.jmolFrameType.equals("plot ramachandran"))return a=b.getFractionalCoord("Z",!1)-180,-180>a?360+a:a}return b.getGroupParameter(c);case 1112539140:case 1112539150:case 1112539148:return b.getGroupParameter(c);
case 1113200651:return b.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(c,b.group,b.index);case 1112539151:return b.getFractionalUnitCoord("X");case 1112539152:return b.getFractionalUnitCoord("Y");case 1112539153:return b.getFractionalUnitCoord("Z");case 1649412112:return b.getVanderwaalsRadiusFloat(a,J.constant.EnumVdw.AUTO);
case 1112541202:return b.getVibrationCoord("X");case 1112541203:return b.getVibrationCoord("Y");case 1112541204:return b.getVibrationCoord("Z");case 1649410065:return b=b.getVibrationVector(),null==b?0:b.length()*a.getFloat(1649410065)}return J.modelset.Atom.atomPropertyInt(b,c)},"J.viewer.Viewer,J.modelset.Atom,~N");$_M(c$,"getMass",($fz=function(){var a=this.getIsotopeNumber();return 0<a?a:J.util.Elements.getAtomicMass(this.getElementNumber())},$fz.isPrivate=!0,$fz));c$.atomPropertyString=$_M(c$,
"atomPropertyString",function(a,b,c){switch(c){case 1087373315:return a=b.getAlternateLocationID(),"\x00"==a?"":""+a;case 1087375362:return b.getAtomName();case 1087375361:return b.getAtomType();case 1087373316:return a=b.getChainID(),"\x00"==a?"":""+a;case 1087373320:return b.getGroup1("?");case 1087373319:return b.getGroup1("\x00");case 1087373318:return b.getGroup3(!1);case 1087375365:return b.getElementSymbolIso(!0);case 1087373321:return b.getIdentity(!0);case 1087373322:return a=b.getInsertionCode(),
"\x00"==a?"":""+a;case 1826248715:case 1288701960:return a=b.group.chain.model.modelSet.getAtomLabel(b.getIndex()),null==a&&(a=""),a;case 1641025539:return b.getProteinStructureType().getBioStructureTypeName(!1);case 1238369286:return b.getProteinStructureSubType().getBioStructureTypeName(!1);case 1087373324:return b.getStructureId();case 1087373323:return a.getHybridizationAndAxes(b.index,null,null,"d");case 1087375373:return b.getElementSymbolIso(!1);case 1089470478:return b.getSymmetryOperatorList()}return""},
"J.viewer.Viewer,J.modelset.Atom,~N");c$.atomPropertyTuple=$_M(c$,"atomPropertyTuple",function(a,b){switch(b){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 J.util.P3.new3(a.screenX,a.group.chain.model.modelSet.viewer.getScreenHeight()-a.screenY,a.screenZ);case 1146095631:var c=
a.getVibrationVector();null==c&&(c=new J.util.V3);return c;case 1146095626:return a;case 1766856708:return J.util.ColorUtil.colorPointFromInt2(a.group.chain.model.modelSet.viewer.getColorArgbOrGray(a.getColix()))}return null},"J.modelset.Atom,~N");$_M(c$,"isWithinStructure",function(a){return this.group.isWithinStructure(a)},"J.constant.EnumStructure");Clazz.overrideMethod(c$,"getOffsetResidueAtom",function(a,b){return this.group.chain.model.modelSet.getGroupAtom(this,b,a)},"~S,~N");Clazz.overrideMethod(c$,
"isCrossLinked",function(a){return this.group.isCrossLinked(a.getGroup())},"J.util.JmolNode");Clazz.overrideMethod(c$,"getCrossLinkLeadAtomIndexes",function(a){return this.group.getCrossLinkLead(a)},"J.util.JmolList");Clazz.overrideMethod(c$,"toString",function(){return this.getInfo()});$_M(c$,"isWithinFourBonds",function(a){if(this.modelIndex!=a.modelIndex)return!1;if(this.isCovalentlyBonded(a))return!0;for(var b=a.bonds,c=0;c<b.length;c++){var d=b[c].getOtherAtom(a);if(this.isCovalentlyBonded(d))return!0;
for(var e=0;e<this.bonds.length;e++)if(this.bonds[e].getOtherAtom(this).isCovalentlyBonded(d))return!0}return!1},"J.modelset.Atom");Clazz.overrideMethod(c$,"findAtomsLike",function(a){return this.group.chain.model.modelSet.viewer.getAtomBitSet(a)},"~S");Clazz.defineStatics(c$,"VIBRATION_VECTOR_FLAG",1,"IS_HETERO_FLAG",2,"FLAG_MASK",3,"RADIUS_MAX",16);c$.BACKBONE_VISIBILITY_FLAG=c$.prototype.BACKBONE_VISIBILITY_FLAG=J.viewer.JC.getShapeVisibilityFlag(9)}),Clazz.declarePackage("J.modelset"),Clazz.load(["java.lang.Float",
"J.util.BS","$.V3"],"J.modelset.AtomCollection","java.lang.Character java.util.Arrays J.atomdata.RadiusData J.constant.EnumPalette $.EnumStructure $.EnumVdw J.geodesic.EnvelopeCalculation J.modelset.Group $.LabelToken J.script.T J.util.ArrayUtil $.AxisAngle4f $.BSUtil $.Elements $.Escape $.JmolList $.Logger $.Matrix3f $.Measure $.P3 $.Parser $.TextFormat J.viewer.JC".split(" "),function(){c$=Clazz.decorateAsClass(function(){this.atoms=this.g3d=this.viewer=null;this.atomCount=0;this.surfaceDistance100s=
this.ellipsoids=this.hydrophobicities=this.ionicRadii=this.partialCharges=this.bfactor100s=this.occupancies=this.vibrationVectors=this.atomSerials=this.atomTypes=this.atomNames=null;this.haveStraightness=!1;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;Clazz.isClassDefined("J.modelset.AtomCollection.AtomSorter")||J.modelset.AtomCollection.$AtomCollection$AtomSorter$();Clazz.instantialize(this,arguments)},J.modelset,"AtomCollection");Clazz.prepareFields(c$,function(){this.bsHidden=new J.util.BS;this.bsEmpty=new J.util.BS;this.bsFoundRectangle=new J.util.BS});$_M(c$,"releaseModelSet",function(){this.ellipsoids=this.ionicRadii=this.partialCharges=this.bfactor100s=this.occupancies=this.vibrationVectors=this.atomSerials=this.atomTypes=
this.atomNames=this.tainted=this.bsSurface=this.surfaceDistance100s=this.bspf=this.g3d=this.viewer=this.atoms=null});$_M(c$,"mergeAtomArrays",function(a){this.tainted=a.tainted;this.atomNames=a.atomNames;this.atomTypes=a.atomTypes;this.atomSerials=a.atomSerials;this.vibrationVectors=a.vibrationVectors;this.occupancies=a.occupancies;this.bfactor100s=a.bfactor100s;this.ionicRadii=a.ionicRadii;this.partialCharges=a.partialCharges;this.ellipsoids=a.ellipsoids;this.setHaveStraightness(!1);this.surfaceDistance100s=
null},"J.modelset.AtomCollection");$_M(c$,"setHaveStraightness",function(a){this.haveStraightness=a},"~B");$_M(c$,"getHaveStraightness",function(){return this.haveStraightness});$_M(c$,"getAtomPointVector",function(a){var b=new J.util.JmolList;if(null!=a)for(var c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))b.addLast(this.atoms[c]);return b},"J.util.BS");$_M(c$,"getAtomCount",function(){return this.atomCount});$_M(c$,"modelSetHasVibrationVectors",function(){return null!=this.vibrationVectors});$_M(c$,
"getAtomTypes",function(){return this.atomTypes});$_M(c$,"getPartialCharges",function(){return this.partialCharges});$_M(c$,"getIonicRadii",function(){return this.ionicRadii});$_M(c$,"getBFactors",function(){return this.bfactor100s});$_M(c$,"getHydrophobicity",function(){return this.hydrophobicities});$_M(c$,"setBsHidden",function(a){this.bsHidden=a},"J.util.BS");$_M(c$,"isAtomHidden",function(a){return this.bsHidden.get(a)},"~N");$_M(c$,"getAtomInfo",function(a,b){return null==b?this.atoms[a].getInfo():
J.modelset.LabelToken.formatLabel(this.viewer,this.atoms[a],b)},"~N,~S");$_M(c$,"getAtomInfoXYZ",function(a,b){return this.atoms[a].getInfoXYZ(b)},"~N,~B");$_M(c$,"getElementSymbol",function(a){return this.atoms[a].getElementSymbol()},"~N");$_M(c$,"getElementNumber",function(a){return this.atoms[a].getElementNumber()},"~N");$_M(c$,"getElementName",function(a){return J.util.Elements.elementNameFromNumber(this.atoms[a].getAtomicAndIsotopeNumber())},"~N");$_M(c$,"getAtomName",function(a){return this.atoms[a].getAtomName()},
"~N");$_M(c$,"getAtomNumber",function(a){return this.atoms[a].getAtomNumber()},"~N");$_M(c$,"getAtomPoint3f",function(a){return this.atoms[a]},"~N");$_M(c$,"getAtomRadius",function(a){return this.atoms[a].getRadius()},"~N");$_M(c$,"getAtomVdwRadius",function(a,b){return this.atoms[a].getVanderwaalsRadiusFloat(this.viewer,b)},"~N,J.constant.EnumVdw");$_M(c$,"getAtomColix",function(a){return this.atoms[a].getColix()},"~N");$_M(c$,"getAtomChain",function(a){return""+this.atoms[a].getChainID()},"~N");
$_M(c$,"getEllipsoid",function(a){return 0>a||null==this.ellipsoids||a>=this.ellipsoids.length?null:this.ellipsoids[a]},"~N");$_M(c$,"getQuaternion",function(a,b){return 0>a?null:this.atoms[a].group.getQuaternion(b)},"~N,~S");$_M(c$,"getHelixData",function(a,b){var c=a.nextSetBit(0);return 0>c?"null":this.atoms[c].group.getHelixData(b,this.viewer.getQuaternionFrame(),this.viewer.getInt(553648146))},"J.util.BS,~N");$_M(c$,"getAtomIndexFromAtomNumber",function(a,b){for(var c=0;c<this.atomCount;c++){var d=
this.atoms[c];if(d.getAtomNumber()==a&&b.get(d.modelIndex))return c}return-1},"~N,J.util.BS");$_M(c$,"setFormalCharges",function(a,b){if(null!=a)for(var c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))this.atoms[c].setFormalCharge(b),this.taintAtom(c,4)},"J.util.BS,~N");$_M(c$,"getAtomicCharges",function(){for(var a=Clazz.newFloatArray(this.atomCount,0),b=this.atomCount;0<=--b;)a[b]=this.atoms[b].getElementNumber();return a});$_M(c$,"getRadiusVdwJmol",function(a){return J.util.Elements.getVanderwaalsMar(a.getElementNumber(),
J.constant.EnumVdw.JMOL)/1E3},"J.modelset.Atom");$_M(c$,"getMaxVanderwaalsRadius",function(){1.4E-45==this.maxVanderwaalsRadius&&this.findMaxRadii();return this.maxVanderwaalsRadius});$_M(c$,"findMaxRadii",function(){for(var a=this.atomCount;0<=--a;){var b=this.atoms[a],c=b.getBondingRadiusFloat();c>this.maxBondingRadius&&(this.maxBondingRadius=c);b=b.getVanderwaalsRadiusFloat(this.viewer,J.constant.EnumVdw.AUTO);b>this.maxVanderwaalsRadius&&(this.maxVanderwaalsRadius=b)}});$_M(c$,"clearBfactorRange",
function(){this.hasBfactorRange=!1});$_M(c$,"calcBfactorRange",($fz=function(a){if(!this.hasBfactorRange){this.bfactor100Lo=2147483647;this.bfactor100Hi=-2147483648;if(null==a)for(var b=0;b<this.atomCount;b++)this.setBf(b);else for(b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1))this.setBf(b);this.hasBfactorRange=!0}},$fz.isPrivate=!0,$fz),"J.util.BS");$_M(c$,"setBf",($fz=function(a){a=this.atoms[a].getBfactor100();a<this.bfactor100Lo?this.bfactor100Lo=a:a>this.bfactor100Hi&&(this.bfactor100Hi=a)},$fz.isPrivate=
!0,$fz),"~N");$_M(c$,"getBfactor100Lo",function(){this.hasBfactorRange||(this.viewer.global.rangeSelected?this.calcBfactorRange(this.viewer.getSelectionSet(!1)):this.calcBfactorRange(null));return this.bfactor100Lo});$_M(c$,"getBfactor100Hi",function(){this.getBfactor100Lo();return this.bfactor100Hi});$_M(c$,"getSurfaceDistanceMax",function(){null==this.surfaceDistance100s&&this.calcSurfaceDistances();return this.surfaceDistanceMax});$_M(c$,"calculateVolume",function(a,b){var c=0;if(null!=a)for(var d=
a.nextSetBit(0);0<=d;d=a.nextSetBit(d+1))c+=this.atoms[d].getVolume(this.viewer,b);return c},"J.util.BS,J.constant.EnumVdw");$_M(c$,"getSurfaceDistance100",function(a){if(0==this.nSurfaceAtoms)return-1;null==this.surfaceDistance100s&&this.calcSurfaceDistances();return this.surfaceDistance100s[a]},"~N");$_M(c$,"calcSurfaceDistances",($fz=function(){this.calculateSurface(null,-1)},$fz.isPrivate=!0,$fz));$_M(c$,"calculateSurface",function(a,b){0>b&&(b=3);var c=new J.geodesic.EnvelopeCalculation(this.viewer,
this.atomCount,null);c.calculate(new J.atomdata.RadiusData(null,b,J.atomdata.RadiusData.EnumType.ABSOLUTE,null),3.4028235E38,a,J.util.BSUtil.copyInvert(a,this.atomCount),!1,!1,!1,!0);var d=c.getPoints();this.surfaceDistanceMax=0;this.bsSurface=c.getBsSurfaceClone();this.surfaceDistance100s=Clazz.newIntArray(this.atomCount,0);this.nSurfaceAtoms=J.util.BSUtil.cardinalityOf(this.bsSurface);if(0==this.nSurfaceAtoms||null==d||0==d.length)return d;for(var c=3.4028235E38==b?0:b,e=0;e<this.atomCount;e++)if(this.bsSurface.get(e))this.surfaceDistance100s[e]=
0;else{for(var f=3.4028235E38,g=this.atoms[e],h=d.length;0<=--h;){var k=Math.abs(d[h].distance(g)-c);0>k&&J.util.Logger.debugging&&J.util.Logger.debug("draw d"+h+" "+J.util.Escape.eP(d[h])+' "'+k+" ? "+g.getInfo()+'"');f=Math.min(k,f)}k=this.surfaceDistance100s[e]=Clazz.doubleToInt(Math.floor(100*f));this.surfaceDistanceMax=Math.max(this.surfaceDistanceMax,k)}return d},"J.util.BS,~N");$_M(c$,"setAtomCoord2",function(a,b,c){var d=null,e=null,f=null,g=0,h=1;if(Clazz.instanceOf(c,J.util.P3))d=c;else if(Clazz.instanceOf(c,
J.util.JmolList)){f=c;if(0==(h=f.size()))return;g=1}else if(J.util.Escape.isAP(c)){e=c;if(0==(h=e.length))return;g=2}else return;c=0;if(null!=a)for(var k=a.nextSetBit(0);0<=k;k=a.nextSetBit(k+1)){switch(g){case 1:if(c>=h)return;d=f.get(c++);break;case 2:if(c>=h)return;d=e[c++]}switch(b){case 1146095626:this.setAtomCoord(k,d.x,d.y,d.z);break;case 1146095627:this.atoms[k].setFractionalCoordTo(d,!0);this.taintAtom(k,2);break;case 1146095629:this.atoms[k].setFractionalCoordTo(d,!1);this.taintAtom(k,2);
break;case 1146095631:this.setAtomVibrationVector(k,d.x,d.y,d.z)}}},"J.util.BS,~N,~O");$_M(c$,"setAtomVibrationVector",($fz=function(a,b,c,d){this.setVibrationVector(a,b,c,d);this.taintAtom(a,12)},$fz.isPrivate=!0,$fz),"~N,~N,~N,~N");$_M(c$,"setAtomCoord",function(a,b,c,d){0>a||a>=this.atomCount||(this.atoms[a].x=b,this.atoms[a].y=c,this.atoms[a].z=d,this.taintAtom(a,2))},"~N,~N,~N,~N");$_M(c$,"setAtomCoordRelative",function(a,b,c,d){0>a||a>=this.atomCount||(this.atoms[a].x+=b,this.atoms[a].y+=c,
this.atoms[a].z+=d,this.taintAtom(a,2))},"~N,~N,~N,~N");$_M(c$,"setAtomsCoordRelative",function(a,b,c,d){if(null!=a)for(var e=a.nextSetBit(0);0<=e;e=a.nextSetBit(e+1))this.setAtomCoordRelative(e,b,c,d)},"J.util.BS,~N,~N,~N");$_M(c$,"setAPa",function(a,b,c,d,e,f,g){var h=0;if(!(null!=f&&0==f.length||null==a)){for(var k=null!=f&&f.length==this.atomCount||null!=g&&g.length==this.atomCount,l=a.nextSetBit(0);0<=l;l=a.nextSetBit(l+1)){k&&(h=l);if(null!=f){if(h>=f.length)return;d=f[h++];c=Clazz.floatToInt(d)}else if(null!=
g){if(h>=g.length)return;e=g[h++]}var m=this.atoms[l];switch(b){case 1087375362:this.taintAtom(l,0);this.setAtomName(l,e);break;case 1095763969:this.taintAtom(l,13);this.setAtomNumber(l,c);break;case 1087375361:this.taintAtom(l,1);this.setAtomType(l,e);break;case 1112541185:case 1112541205:this.setAtomCoord(l,d,m.y,m.z);break;case 1112541186:case 1112541206:this.setAtomCoord(l,m.x,d,m.z);break;case 1112541187:case 1112541207:this.setAtomCoord(l,m.x,m.y,d);break;case 1112541202:case 1112541203:case 1112541204:this.setVibrationVector2(l,
b,d);break;case 1112541188:case 1112541189:case 1112541190:m.setFractionalCoord(b,d,!0);this.taintAtom(l,2);break;case 1112541191:case 1112541192:case 1112541193:m.setFractionalCoord(b,d,!1);this.taintAtom(l,2);break;case 1095763976:case 1087375365:this.setElement(m,c);break;case 1632634889:m.setFormalCharge(c);this.taintAtom(l,4);break;case 1114638346:this.setHydrophobicity(l,d)&&this.taintAtom(l,5);break;case 1826248715:case 1288701960:this.viewer.setAtomLabel(e,l);break;case 1129318401:2>c&&(c=
Clazz.doubleToInt(Math.floor(100*d)));this.setOccupancy(l,c)&&this.taintAtom(l,7);break;case 1112541196:this.setPartialCharge(l,d)&&this.taintAtom(l,8);break;case 1112541195:this.setIonicRadius(l,d)&&this.taintAtom(l,6);break;case 1666189314:case 1113200651:0>d?d=0:16<d&&(d=16);m.madAtom=Clazz.floatToShort(2E3*d);break;case 1114638350:this.viewer.setSelectedAtom(m.index,0!=d);break;case 1112541199:this.setBFactor(l,d)&&this.taintAtom(l,9);break;case 1095763988:m.setValence(c);this.taintAtom(l,10);
break;case 1649412112:m.setRadius(d)?this.taintAtom(l,11):this.untaint(l,11);break;default:J.util.Logger.error("unsettable atom property: "+J.script.T.nameOf(b))}}1114638350==b&&this.viewer.setSelectedAtom(-1,!1)}},"J.util.BS,~N,~N,~N,~S,~A,~A");$_M(c$,"setElement",function(a,b){this.taintAtom(a.index,3);a.setAtomicAndIsotopeNumber(b);a.setPaletteID(J.constant.EnumPalette.CPK.id);a.setColixAtom(this.viewer.getColixAtomPalette(a,J.constant.EnumPalette.CPK.id))},"J.modelset.Atom,~N");$_M(c$,"getVibrationCoord",
function(a,b){if(null==this.vibrationVectors||null==this.vibrationVectors[a])return 0;switch(b){case "X":return this.vibrationVectors[a].x;case "Y":return this.vibrationVectors[a].y;default:return this.vibrationVectors[a].z}},"~N,~S");$_M(c$,"getVibrationVector",function(a,b){var c=null==this.vibrationVectors?null:this.vibrationVectors[a];return null==c&&b?new J.util.V3:c},"~N,~B");$_M(c$,"setVibrationVector",function(a,b,c,d){if(!Float.isNaN(b)&&!Float.isNaN(c)&&!Float.isNaN(d)){if(null==this.vibrationVectors||
this.vibrationVectors.length<a)this.vibrationVectors=Array(this.atoms.length);null==this.vibrationVectors[a]?this.vibrationVectors[a]=J.util.V3.new3(b,c,d):this.vibrationVectors[a].set(b,c,d);this.atoms[a].setVibrationVector()}},"~N,~N,~N,~N");$_M(c$,"setVibrationVector2",($fz=function(a,b,c){var d=this.getVibrationVector(a,!0);null==d&&(d=new J.util.V3);switch(b){case 1112541202:d.x=c;break;case 1112541203:d.y=c;break;case 1112541204:d.z=c}this.setAtomVibrationVector(a,d.x,d.y,d.z)},$fz.isPrivate=
!0,$fz),"~N,~N,~N");$_M(c$,"setAtomName",function(a,b){var c=J.viewer.JC.lookupSpecialAtomID(b);this.atoms[a].atomID=c;0<c&&this.models[this.atoms[a].modelIndex].isBioModel||(null==this.atomNames&&(this.atomNames=Array(this.atoms.length)),this.atomNames[a]=b)},"~N,~S");$_M(c$,"setAtomType",function(a,b){null==this.atomTypes&&(this.atomTypes=Array(this.atoms.length));this.atomTypes[a]=b},"~N,~S");$_M(c$,"setAtomNumber",function(a,b){null==this.atomSerials&&(this.atomSerials=Clazz.newIntArray(this.atoms.length,
0));this.atomSerials[a]=b;return!0},"~N,~N");$_M(c$,"setOccupancy",function(a,b){if(null==this.occupancies){if(100==b)return!1;this.occupancies=Clazz.newByteArray(this.atoms.length,0);for(var c=this.atoms.length;0<=--c;)this.occupancies[c]=100}this.occupancies[a]=255<b?255:0>b?0:b;return!0},"~N,~N");$_M(c$,"setPartialCharge",function(a,b){if(Float.isNaN(b))return!1;if(null==this.partialCharges){if(0==b&&!Float.$valueOf(b).equals(J.modelset.AtomCollection.MINUSZERO))return!1;this.partialCharges=Clazz.newFloatArray(this.atoms.length,
0)}this.partialCharges[a]=b;return!0},"~N,~N");$_M(c$,"setIonicRadius",function(a,b){if(Float.isNaN(b))return!1;null==this.ionicRadii&&(this.ionicRadii=Clazz.newFloatArray(this.atoms.length,0));this.ionicRadii[a]=b;return!0},"~N,~N");$_M(c$,"setBFactor",function(a,b){if(Float.isNaN(b))return!1;if(null==this.bfactor100s){if(0==b&&null==this.bfactor100s)return!1;this.bfactor100s=Clazz.newShortArray(this.atoms.length,0)}this.bfactor100s[a]=Clazz.doubleToShort(100*(-327.68>b?-327.68:327.67<b?327.67:b)+
(0>b?-0.5:0.5));return!0},"~N,~N");$_M(c$,"setHydrophobicity",function(a,b){if(Float.isNaN(b))return!1;if(null==this.hydrophobicities){this.hydrophobicities=Clazz.newFloatArray(this.atoms.length,0);for(var c=0;c<this.atoms.length;c++)this.hydrophobicities[c]=J.util.Elements.getHydrophobicity(this.atoms[c].getGroupID())}this.hydrophobicities[a]=b;return!0},"~N,~N");$_M(c$,"setEllipsoid",function(a,b){null!=b&&(null==this.ellipsoids&&(this.ellipsoids=Array(this.atoms.length)),this.ellipsoids[a]=b)},
"~N,~A");$_M(c$,"setAtomData",function(a,b,c,d){var e=null,f=null;switch(a){case 2:this.loadCoordinates(c,!1,!d);return;case 12:this.loadCoordinates(c,!0,!0);return;case 14:e=Clazz.newFloatArray(this.atomCount,0),f=J.util.BSUtil.newBitSet(this.atomCount)}d=J.util.Parser.markLines(c,";");var g=0;try{for(var h=J.util.Parser.parseInt(c.substring(0,d[0]-1)),k=1;k<=h;k++){var l=J.util.Parser.getTokens(J.util.Parser.parseTrimmed(c.substring(d[k],d[k+1]-1))),m=J.util.Parser.parseInt(l[0])-1;if(!(0>m||m>=
this.atomCount)){var n=this.atoms[m];g++;var p=l.length-1,q=J.util.Parser.parseFloatStr(l[p]);switch(a){case 14:e[m]=q;f.set(m);continue;case 13:this.setAtomNumber(m,Clazz.floatToInt(q));break;case 0:this.setAtomName(m,l[p]);break;case 1:this.setAtomType(m,l[p]);break;case 3:n.setAtomicAndIsotopeNumber(Clazz.floatToInt(q));n.setPaletteID(J.constant.EnumPalette.CPK.id);n.setColixAtom(this.viewer.getColixAtomPalette(n,J.constant.EnumPalette.CPK.id));break;case 4:n.setFormalCharge(Clazz.floatToInt(q));
break;case 5:this.setHydrophobicity(m,q);break;case 6:this.setIonicRadius(m,q);break;case 8:this.setPartialCharge(m,q);break;case 9:this.setBFactor(m,q);break;case 10:n.setValence(Clazz.floatToInt(q));break;case 11:n.setRadius(q)}this.taintAtom(m,a)}}14==a&&0<g&&this.viewer.setData(b,[b,e,f,Integer.$valueOf(1)],0,0,0,0,0)}catch(r){if(Clazz.exceptionOf(r,Exception))J.util.Logger.error("AtomCollection.loadData error: "+r);else throw r;}},"~N,~S,~S,~B");$_M(c$,"loadCoordinates",($fz=function(a,b,c){var d=
J.util.Parser.markLines(a,";");try{for(var e=J.util.Parser.parseInt(a.substring(0,d[0]-1)),f=1;f<=e;f++){var g=J.util.Parser.getTokens(J.util.Parser.parseTrimmed(a.substring(d[f],d[f+1]))),h=J.util.Parser.parseInt(g[0])-1,k=J.util.Parser.parseFloatStr(g[3]),l=J.util.Parser.parseFloatStr(g[4]),m=J.util.Parser.parseFloatStr(g[5]);b?this.setAtomVibrationVector(h,k,l,m):(this.setAtomCoord(h,k,l,m),c||this.untaint(h,2))}}catch(n){if(Clazz.exceptionOf(n,Exception))J.util.Logger.error("Frame.loadCoordinate error: "+
n);else throw n;}},$fz.isPrivate=!0,$fz),"~S,~B,~B");$_M(c$,"validateBspf",function(a){null!=this.bspf&&this.bspf.validate(a)},"~B");$_M(c$,"validateBspfForModel",function(a,b){null!=this.bspf&&this.bspf.validateModel(a,b)},"~N,~B");$_M(c$,"setPreserveState",function(a){this.preserveState=a},"~B");c$.getUserSettableType=$_M(c$,"getUserSettableType",function(a){var b=0==a.indexOf("property_");a=b?a.substring(9):a;for(var c=0;14>c;c++)if(J.modelset.AtomCollection.userSettableValues[c].equalsIgnoreCase(a))return c;
return b?14:-1},"~S");$_M(c$,"getTaintedAtoms",function(a){return null==this.tainted?null:this.tainted[a]},"~N");$_M(c$,"taintAtoms",function(a,b){this.canSkipLoad=!1;if(this.preserveState)for(var c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))this.taintAtom(c,b)},"J.util.BS,~N");$_M(c$,"taintAtom",function(a,b){this.preserveState&&(null==this.tainted&&(this.tainted=Array(14)),null==this.tainted[b]&&(this.tainted[b]=J.util.BSUtil.newBitSet(this.atomCount)),this.tainted[b].set(a),2==b&&this.validateBspfForModel(this.atoms[a].modelIndex,
!1))},"~N,~N");$_M(c$,"untaint",($fz=function(a,b){this.preserveState&&(null==this.tainted||null==this.tainted[b]||this.tainted[b].clear(a))},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"setTaintedAtoms",function(a,b){this.preserveState&&(null==a?null!=this.tainted&&(this.tainted[b]=null):(null==this.tainted&&(this.tainted=Array(14)),null==this.tainted[b]&&(this.tainted[b]=J.util.BSUtil.newBitSet(this.atomCount)),J.util.BSUtil.copy2(a,this.tainted[b])))},"J.util.BS,~N");$_M(c$,"unTaintAtoms",function(a,
b){if(!(null==this.tainted||null==this.tainted[b])){for(var c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))this.tainted[b].clear(c);0>this.tainted[b].nextSetBit(0)&&(this.tainted[b]=null)}},"J.util.BS,~N");$_M(c$,"findNearest2",function(a,b,c,d,e){for(var f=null,g=this.atomCount;0<=--g;)if(!(null!=d&&d.get(g))){var h=this.atoms[g];h.isClickable()&&this.isCursorOnTopOf(h,a,b,e,f)&&(f=h)}c[0]=f},"~N,~N,~A,J.util.BS,~N");$_M(c$,"isCursorOnTopOf",function(a,b,c,d,e){return 1<a.screenZ&&!this.g3d.isClippedZ(a.screenZ)&&
this.g3d.isInDisplayRange(a.screenX,a.screenY)&&a.isCursorOnTopOf(b,c,d,e)},"J.modelset.Atom,~N,~N,~N,J.modelset.Atom");$_M(c$,"findAtomsInRectangle",function(a,b){this.bsFoundRectangle.and(this.bsEmpty);for(var c=this.atomCount;0<=--c;){var d=this.atoms[c];b.get(d.modelIndex)&&(d.isVisible(0)&&a.contains(d.screenX,d.screenY))&&this.bsFoundRectangle.set(c)}return this.bsFoundRectangle},"J.util.Rectangle,J.util.BS");$_M(c$,"fillADa",function(a,b){a.atomXyz=this.atoms;a.atomCount=this.atomCount;a.atomicNumber=
Clazz.newIntArray(this.atomCount,0);var c=0!=(b&2);c&&(a.atomRadius=Clazz.newFloatArray(this.atomCount,0));for(var d=0!=(b&16),e=0;e<this.atomCount;e++){var f=this.atoms[e];f.isDeleted()||!d&&0<=a.modelIndex&&f.modelIndex!=a.firstModelIndex?(null==a.bsIgnored&&(a.bsIgnored=new J.util.BS),a.bsIgnored.set(e)):(a.atomicNumber[e]=f.getElementNumber(),a.lastModelIndex=f.modelIndex,c&&(a.atomRadius[e]=this.getWorkingRadius(f,a)))}},"J.atomdata.AtomData,~N");$_M(c$,"getWorkingRadius",($fz=function(a,b){var c=
0,d=b.radiusData;switch(d.factorType){case J.atomdata.RadiusData.EnumType.ABSOLUTE:c=d.value;break;case J.atomdata.RadiusData.EnumType.FACTOR:case J.atomdata.RadiusData.EnumType.OFFSET:switch(d.vdwType){case J.constant.EnumVdw.IONIC:c=a.getBondingRadiusFloat();break;case J.constant.EnumVdw.ADPMAX:c=a.getADPMinMax(!0);break;case J.constant.EnumVdw.ADPMIN:c=a.getADPMinMax(!1);break;default:c=a.getVanderwaalsRadiusFloat(this.viewer,b.radiusData.vdwType)}c=d.factorType===J.atomdata.RadiusData.EnumType.FACTOR?
c*d.value:c+d.value}return c+d.valueExtended},$fz.isPrivate=!0,$fz),"J.modelset.Atom,J.atomdata.AtomData");$_M(c$,"calculateHydrogens",function(a,b,c,d,e){var f=new J.util.V3,g=new J.util.V3,h=Array(this.atomCount),k=this.viewer.getDeletedAtoms(),l,m=0;if(null!=a)for(var n=a.nextSetBit(0);0<=n;n=a.nextSetBit(n+1))if(!(null!=k&&k.get(n))){var p=this.atoms[n],q=p.getElementNumber();if(!(d&&6!=q)){var r=6>=q?1.1:10>=q?1:1.3;switch(q){case 7:case 8:r=1}if(!(c&&0<p.getCovalentHydrogenCount())&&(l=this.getImplicitHydrogenCount(p),
0!=l)){var s=this.aaRet[0],t=this.aaRet[2],u=this.aaRet[3];h[n]=Array(l);var v=0;if(0==u)switch(l){case 4:f.set(0.635,0.635,0.635),l=J.util.P3.newP(f),l.add(p),h[n][v++]=l,null!=e&&e.addLast(p);case 3:f.set(-0.635,-0.635,0.635),l=J.util.P3.newP(f),l.add(p),h[n][v++]=l,null!=e&&e.addLast(p);case 2:f.set(-0.635,0.635,-0.635),l=J.util.P3.newP(f),l.add(p),h[n][v++]=l,null!=e&&e.addLast(p);case 1:f.set(0.635,-0.635,-0.635),l=J.util.P3.newP(f),l.add(p),h[n][v++]=l,null!=e&&e.addLast(p)}else switch(l){case 3:this.getHybridizationAndAxes(n,
q,f,g,"sp3b",!1,!0);l=new J.util.P3;l.scaleAdd2(r,f,p);h[n][v++]=l;null!=e&&e.addLast(p);this.getHybridizationAndAxes(n,q,f,g,"sp3c",!1,!0);l=new J.util.P3;l.scaleAdd2(r,f,p);h[n][v++]=l;null!=e&&e.addLast(p);this.getHybridizationAndAxes(n,q,f,g,"sp3d",!1,!0);l=new J.util.P3;l.scaleAdd2(r,f,p);h[n][v++]=l;null!=e&&e.addLast(p);break;case 2:t=2==t||5==q||1==u&&4==s||7==q&&this.isAdjacentSp2(p);this.getHybridizationAndAxes(n,q,f,g,t?"sp2b":3==s?"sp3c":"lpa",!1,!0);l=J.util.P3.newP(f);l.scaleAdd2(r,
f,p);h[n][v++]=l;null!=e&&e.addLast(p);this.getHybridizationAndAxes(n,q,f,g,t?"sp2c":3==s?"sp3d":"lpb",!1,!0);l=J.util.P3.newP(f);l.scaleAdd2(r,f,p);h[n][v++]=l;null!=e&&e.addLast(p);break;case 1:switch(s-u){case 1:if(8==q&&p===p.getGroup().getCarbonylOxygenAtom()){h[n]=null;continue}null!=this.getHybridizationAndAxes(n,q,f,g,2==t||5==q||7==q&&this.isAdjacentSp2(p)?"sp2c":"sp3d",!0,!1)?(l=J.util.P3.newP(f),l.scaleAdd2(r,f,p),h[n][v++]=l,null!=e&&e.addLast(p)):h[n]=[];break;case 2:this.getHybridizationAndAxes(n,
q,f,g,4==s?"sp2c":"sp2b",!1,!1);l=J.util.P3.newP(f);l.scaleAdd2(r,f,p);h[n][v++]=l;null!=e&&e.addLast(p);break;case 3:this.getHybridizationAndAxes(n,q,f,g,"spb",!1,!0),l=J.util.P3.newP(f),l.scaleAdd2(r,f,p),h[n][v++]=l,null!=e&&e.addLast(p)}}m+=v}}}b[0]=m;return h},"J.util.BS,~A,~B,~B,J.util.JmolList");$_M(c$,"isAdjacentSp2",($fz=function(a){for(var b=a.bonds,c=0;c<b.length;c++)for(var d=b[c].getOtherAtom(a).bonds,e=0;e<d.length;e++)switch(d[e].order){case 515:case 514:case 2:case 3:return!0}return!1},
$fz.isPrivate=!0,$fz),"J.modelset.Atom");$_M(c$,"getImplicitHydrogenCount",function(a){var b=a.getTargetValence(),c=a.getFormalCharge();null==this.aaRet&&(this.aaRet=Clazz.newIntArray(4,0));this.aaRet[0]=b;this.aaRet[1]=c;this.aaRet[2]=0;this.aaRet[3]=a.getCovalentBondCount();var d=this.models[a.modelIndex],d=d.isBioModel&&!d.isPdbWithMultipleBonds?a.group.getGroup3():null;null!=d&&0==c&&J.viewer.JC.getAminoAcidValenceAndCharge(d,a.getAtomName(),this.aaRet)&&(b=this.aaRet[0],c=this.aaRet[1]);0!=c&&
(b+=4==b?-Math.abs(c):c,this.aaRet[0]=b);a=b-a.getValence();return 0>a?0:a},"J.modelset.Atom");$_M(c$,"getHybridizationAndAxes",function(a,b,c,d,e,f,g){var h=0<e.length&&"-"==e.charAt(0)?e.substring(1):e;if(0<=e.indexOf("d")&&!e.endsWith("sp3d"))return this.getHybridizationAndAxesD(a,c,d,h);var k=this.atoms[a];0==b&&(b=k.getElementNumber());var l=this.getAttached(k,4,f),m=l.length,n=h.charCodeAt(h.length-1)-97;if(0>n||6<n)n=0;a=new J.util.V3;c.set(0,0,0);d.set(0,0,0);for(var p=Array(4),q=0;q<m;q++)p[q]=
J.util.V3.newV(k),p[q].sub(l[q]),p[q].normalize(),c.add(p[q]);0<m&&d.setT(p[0]);q=!1;3<=m&&(2.984513>d.angle(p[1])?a.cross(d,p[1]):a.cross(d,p[2]),a.normalize(),e=new J.util.V3,2.984513>p[1].angle(p[2])?e.cross(p[1],p[2]):e.cross(d,p[2]),e.normalize(),q=0.95<=Math.abs(e.dot(a)));var r=0==h.indexOf("sp3"),s=!r&&0==h.indexOf("sp2"),t=!r&&!s&&0==h.indexOf("sp"),u=0==h.indexOf("p"),v=0==h.indexOf("lp");e=null;if(f){if(0==m)return null;if(r){if(3<n||4<m)return null}else if(s){if(2<n||3<m)return null}else if(t&&
(1<n||2<m))return null;switch(m){case 1:if(1==b&&!r)return null;if(r){e="sp3";break}switch(l[0].getCovalentBondCount()){case 1:if(2!=l[0].getValence()){e="sp";break}case 2:e=t?"sp":"sp2";break;case 3:if(!s&&!u)return null;e="sp2"}break;case 2:if(0.1>c.length()){if(0<=h.indexOf("2")||0<=h.indexOf("3"))return null;e="sp";break}e=r?"sp3":"sp2";if(0==h.indexOf("sp"))break;if(v){e="lp";break}e=h;break;default:if(q)e="sp2";else{if(v&&3==m){e="lp";break}e="sp3"}}if(null==e)return null;if(0==h.indexOf("p")){if("sp3"===
e)return null}else if(0>h.indexOf(e))return null}if(n<m&&!h.startsWith("p")&&!h.startsWith("l"))return c.sub2(l[n],k),c.normalize(),e;switch(m){case 0:h.equals("sp3c")||h.equals("sp2d")||h.equals("lpa")?c.set(-0.5,-0.7,1):h.equals("sp3b")||h.equals("lpb")?c.set(0.5,-0.7,-1):h.equals("sp3a")?c.set(0,1,0):c.set(0,0,1);d.set(1,0,0);break;case 1:a.setT(J.modelset.AtomCollection.vRef);d.cross(a,c);if(r){for(q=0;q<l[0].bonds.length;q++)if(l[0].bonds[q].isCovalent()&&l[0].getBondedAtomIndex(q)!=k.index&&
(d.sub2(l[0],l[0].bonds[q].getOtherAtom(l[0])),d.cross(c,d),0!=d.length())){d.cross(d,c);break}d.normalize();Float.isNaN(d.x)&&(d.setT(J.modelset.AtomCollection.vRef),d.cross(d,c));a.cross(c,d);a.normalize();c.normalize();d.scaleAdd2(2.828,d,c);3!=n&&(d.normalize(),b=J.util.AxisAngle4f.new4(c.x,c.y,c.z,2.09439507*(2==n?1:-1)),g=new J.util.Matrix3f,g.setIdentity(),g.setAA(b),g.transform(d));c.setT(d);d.cross(a,c);break}a.cross(d,c);switch(l[0].getCovalentBondCount()){case 1:if(2!=l[0].getValence())break;
case 2:g=l[0];d.setT(c);for(a.setT(J.modelset.AtomCollection.vRef);null!=g&&2==g.getCovalentBondCount();){h=g.bonds;b=null;for(q=0;q<h.length;q++)if(h[q].isCovalent()&&(b=h[q].getOtherAtom(g),b!==k)){a.sub2(b,g);break}a.cross(a,d);if(0.1<a.length()||2!=b.getCovalentBondCount())break;k=g;g=b}0.1<a.length()?(c.cross(a,d),c.normalize(),1==n&&c.scale(-1),c.scale(J.modelset.AtomCollection.sqrt3_2),c.scaleAdd2(0.5,d,c),u&&(a.cross(c,d),c.setT(a),a.setT(d)),d.cross(a,c)):(c.setT(d),d.cross(J.modelset.AtomCollection.vRef,
d));break;case 3:this.getHybridizationAndAxes(l[0].index,0,d,a,"pz",!1,g),a.setT(d),s?(d.cross(d,c),1==n&&d.scale(-1),d.scale(J.modelset.AtomCollection.sqrt3_2),c.scaleAdd2(0.5,c,d)):(a.setT(c),c.setT(d)),d.cross(a,c)}break;case 2:if(0.1>c.length()){if(!h.equals("pz")){b=l[0];(k=3==b.getCovalentBondCount())||(k=3==(b=l[1]).getCovalentBondCount());if(k){this.getHybridizationAndAxes(b.index,0,d,c,"pz",!1,g);h.equals("px")&&d.scale(-1);c.setT(p[0]);break}a.setT(J.modelset.AtomCollection.vRef);c.cross(a,
d);a.cross(c,d)}c.setT(d);d.cross(a,c);break}a.cross(c,d);if(s){d.cross(c,a);break}if(r||v){a.normalize();c.normalize();h.equals("lp")||(0==n||2==n?c.scaleAdd2(-1.2,a,c):c.scaleAdd2(1.2,a,c));d.cross(c,a);break}d.cross(c,a);c.setT(a);0>c.z&&(c.scale(-1),d.scale(-1));break;default:if(r)break;if(!q){d.cross(c,d);break}c.setT(a);0>c.z&&g&&(c.scale(-1),d.scale(-1))}d.normalize();c.normalize();return e},"~N,~N,J.util.V3,J.util.V3,~S,~B,~B");$_M(c$,"getHybridizationAndAxesD",($fz=function(a,b,c,d){d.startsWith("sp3d2")&&
(d="d2sp3"+(5==d.length?"a":d.substring(5)));d.startsWith("sp3d")&&(d="dsp3"+(4==d.length?"a":d.substring(4)));if(d.equals("d2sp3")||d.equals("dsp3"))d+="a";var e=d.startsWith("dsp3"),f=d.charCodeAt(d.length-1)-97;if(null!=b&&(!e&&(5<f||!d.startsWith("d2sp3"))||e&&4<f))return null;a=this.atoms[a];d=this.getAttached(a,6,!0);if(null==d)return null==b?null:"?";var g=d.length;if(3>g&&null!=b)return null;for(var h=f>=g,k=Clazz.doubleToInt(g*(g-1)/2),l=J.util.ArrayUtil.newInt2(k),m=Clazz.newIntArray(3,
0),k=Clazz.newIntArray(3,k,0),n=0,p=0,q=0;q<g-1;q++)for(var r=q+1;r<g;r++){var s=J.util.Measure.computeAngleABC(d[q],a,d[r],!0),s=105>s?0:150<=s?2:1;k[s][m[s]]=n;m[s]++;l[n++]=[q,r];0==q&&1==s&&p++}n=100*m[0]+10*m[1]+m[2];if(null==b)switch(n){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(d[0],a,d[1],d[2],!0))?"trigonal planar":"trigonal pyramidal";
case 330:return 1==p%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(n){default:return null;case 201:break;case 210:case 330:case 411:case 631:if(!e)return null;break;case 300:case 402:case 501:case 802:case 1203:if(e)return null}if(h)if(e)switch(m[1]){case 0:b.sub2(d[l[k[0][0]][0]],
a);c.sub2(d[l[k[0][0]][1]],a);b.cross(b,c);b.normalize();4==f&&b.scale(-1);m=this.findNotAttached(g,l,k[2],m[2]);q=m.nextSetBit(0);c.sub2(d[q],a);c.normalize();c.scale(0.5);b.scaleAdd2(J.modelset.AtomCollection.sqrt3_2,b,c);f=-1;break;case 1:4==f?(c=l[k[1][0]],b.add2(d[c[0]],d[c[1]]),b.scaleAdd2(-2,a,b),f=-1):(m=this.findNotAttached(g,l,k[1],m[1]),f=m.nextSetBit(0));break;default:m=this.findNotAttached(g,l,k[1],m[1]),f=m.nextSetBit(0)}else{n=!1;if(4==g)switch(m[2]){case 1:m=this.findNotAttached(g,
l,k[2],m[2]);q=m.nextSetBit(0);f=4==f?q:m.nextSetBit(q+1);break;default:n=!0}else{m=this.findNotAttached(g,l,k[2],m[2]);q=m.nextSetBit(0);for(r=g;r<f&&0<=q;r++)q=m.nextSetBit(q+1);-1==q?n=!0:f=q}n&&(b.sub2(d[l[k[0][0]][0]],a),c.sub2(d[l[k[0][0]][1]],a),b.cross(b,c),4==f&&b.scale(-1),f=-1)}0<=f&&b.sub2(d[f],a);h&&b.scale(-1);b.normalize();return e?"dsp3":"d2sp3"},$fz.isPrivate=!0,$fz),"~N,J.util.V3,J.util.V3,~S");$_M(c$,"getAttached",($fz=function(a,b,c){var d=a.getCovalentBondCount();if(d>b)return null;
b=Array(d);if(0<d){for(var d=a.bonds,e=0,f=0;f<d.length;f++)d[f].isCovalent()&&(b[e++]=d[f].getOtherAtom(a));c&&java.util.Arrays.sort(b,Clazz.innerTypeInstance(J.modelset.AtomCollection.AtomSorter,this,null))}return b},$fz.isPrivate=!0,$fz),"J.modelset.Atom,~N,~B");$_M(c$,"findNotAttached",($fz=function(a,b,c,d){var e=J.util.BSUtil.newBitSet(a);e.setBits(0,a);for(var f=0;f<a;f++)for(var g=0;g<d;g++){var h=b[c[g]];(h[0]==f||h[1]==f)&&e.clear(f)}return e},$fz.isPrivate=!0,$fz),"~N,~A,~A,~N");$_M(c$,
"getAtomBitsMDa",function(a,b){var c=new J.util.BS,d,e,f=0;switch(a){case 1095763969:d=b.intValue();for(f=this.atomCount;0<=--f;)this.atoms[f].getAtomNumber()==d&&c.set(f);break;case 1087375362:d=","+b+",";for(f=this.atomCount;0<=--f;)e=this.atoms[f].getAtomName(),0<=d.indexOf(e)&&0<=d.indexOf(","+e+",")&&c.set(f);break;case 1087375361:d=","+b+",";for(f=this.atomCount;0<=--f;)e=this.atoms[f].getAtomType(),0<=d.indexOf(e)&&0<=d.indexOf(","+e+",")&&c.set(f);break;case 1048613:d=b.intValue();for(f=this.atomCount;0<=
--f;)this.atoms[f].getGroupID()==d&&c.set(f);break;case 1048609:return J.util.BSUtil.copy(this.getChainBits(String.fromCharCode(b.intValue())));case 1048614:return J.util.BSUtil.copy(this.getSeqcodeBits(b.intValue(),!0));case 1613758470:for(f=this.atomCount;0<=--f;)this.atoms[f].isHetero()&&c.set(f);break;case 1613758476:for(f=this.atomCount;0<=--f;)1==this.atoms[f].getElementNumber()&&c.set(f);break;case 3145744:for(f=this.atomCount;0<=--f;)this.atoms[f].isProtein()&&c.set(f);break;case 3145764:for(f=
this.atomCount;0<=--f;)this.atoms[f].isCarbohydrate()&&c.set(f);break;case 137363468:case 3145760:e=137363468==a?J.constant.EnumStructure.HELIX:J.constant.EnumStructure.SHEET;for(f=this.atomCount;0<=--f;)this.atoms[f].isWithinStructure(e)&&c.set(f);break;case 3145742:for(f=this.atomCount;0<=--f;)this.atoms[f].isNucleic()&&c.set(f);break;case 3145732:for(f=this.atomCount;0<=--f;)this.atoms[f].isDna()&&c.set(f);break;case 3145750:for(f=this.atomCount;0<=--f;)this.atoms[f].isRna()&&c.set(f);break;case 3145746:for(f=
this.atomCount;0<=--f;)this.atoms[f].isPurine()&&c.set(f);break;case 3145748:for(f=this.atomCount;0<=--f;)this.atoms[f].isPyrimidine()&&c.set(f);break;case 1087375365:d=b;e=new J.util.BS;for(f=d.nextSetBit(0);0<=f;f=d.nextSetBit(f+1))e.set(this.getElementNumber(f));for(f=this.atomCount;0<=--f;)e.get(this.getElementNumber(f))&&c.set(f);break;case 1095761938:d=b;e=new J.util.BS;for(f=d.nextSetBit(0);0<=f;f=d.nextSetBit(f+1))e.set(this.atoms[f].atomSite);for(f=this.atomCount;0<=--f;)e.get(this.atoms[f].atomSite)&&
c.set(f);break;case 1073741824:return this.getIdentifierOrNull(b);case 1048608:d=b.toUpperCase();0<=d.indexOf("\\?")&&(d=J.util.TextFormat.simpleReplace(d,"\\?","\u0001"));for(f=this.atomCount;0<=--f;)this.isAtomNameMatch(this.atoms[f],d,!1)&&c.set(f);break;case 1048607:for(f=this.atomCount;0<=--f;)this.atoms[f].isAlternateLocationMatch(b)&&c.set(f);break;case 1048612:return this.getSpecName(b)}if(0>f)return c;d=b;var g;e=d.nextSetBit(0);if(0>e)return c;f=0;switch(a){case 1087373318:for(f=e;0<=f;f=
d.nextSetBit(f+1))e=this.atoms[f].getGroup().selectAtoms(c),e>f&&(f=e);break;case 1095766028:for(f=e;0<=f;f=d.nextSetBit(f+1))if(!c.get(f)){g=this.atoms[f].modelIndex;c.set(f);for(e=f;0<=--e;)if(this.atoms[e].modelIndex==g)c.set(e);else break;for(;++f<this.atomCount;)if(this.atoms[f].modelIndex==g)c.set(f);else break}break;case 1087373316:d=J.util.BSUtil.copy(b);for(f=d.nextSetBit(0);0<=f;f=d.nextSetBit(f+1))this.atoms[f].getChain().setAtomBitSet(c),d.andNot(c);break;case 1095761935:for(f=e;0<=f;f=
d.nextSetBit(f+1))if(!c.get(f)){g=this.atoms[f].getPolymerIndexInModel();c.set(f);for(e=f;0<=--e;)if(this.atoms[e].getPolymerIndexInModel()==g)c.set(e);else break;for(;++f<this.atomCount;)if(this.atoms[f].getPolymerIndexInModel()==g)c.set(f);else break}break;case 1641025539:for(f=e;0<=f;f=d.nextSetBit(f+1))if(!c.get(f)){g=this.atoms[f].getGroup().getStructure();c.set(f);for(e=f;0<=--e;)if(this.atoms[e].getGroup().getStructure()===g)c.set(e);else break;for(;++f<this.atomCount;)if(this.atoms[f].getGroup().getStructure()===
g)c.set(f);else break}}0==f&&J.util.Logger.error("MISSING getAtomBits entry for "+J.script.T.nameOf(a));return c},"~N,~O");$_M(c$,"getIdentifierOrNull",($fz=function(a){var b=this.getSpecNameOrNull(a,!1);0<=a.indexOf("\\?")&&(a=J.util.TextFormat.simpleReplace(a,"\\?","\u0001"));if(null!=b||0<a.indexOf("?"))return b;if(0<a.indexOf("*"))return this.getSpecNameOrNull(a,!0);for(var c=a.length,d=0;d<c&&Character.isLetter(a.charAt(d));)++d;b=this.getSpecNameOrNull(a.substring(0,d),!1);if(d==c)return b;
null==b&&(b=new J.util.BS);for(var e=d;d<c&&Character.isDigit(a.charAt(d));)++d;var f=0;try{f=Integer.parseInt(a.substring(e,d))}catch(g){if(Clazz.exceptionOf(g,NumberFormatException))return null;throw g;}e=" ";d<c&&"^"==a.charAt(d)&&++d<c&&(e=a.charAt(d));f=J.modelset.Group.getSeqcodeFor(f,e);f=this.getSeqcodeBits(f,!1);if(null==f){" "!=e&&(f=this.getSeqcodeBits(Character.toUpperCase(a.charAt(d)).charCodeAt(0),!1));if(null==f)return null;d++}b.and(f);if(d>=c)return b;a=a.charAt(d++);b.and(this.getChainBits(a));
return d==c?b:null},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"getSpecName",($fz=function(a){var b=this.getSpecNameOrNull(a,!1);if(null!=b)return b;0<a.indexOf("*")&&(b=this.getSpecNameOrNull(a,!0));return null==b?new J.util.BS:b},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"getSpecNameOrNull",($fz=function(a,b){var c=null;a=a.toUpperCase();0<=a.indexOf("\\?")&&(a=J.util.TextFormat.simpleReplace(a,"\\?","\u0001"));for(var d=this.atomCount;0<=--d;){var e=this.atoms[d].getGroup3(!0);if(null!=e&&0<e.length){if(J.util.TextFormat.isMatch(e,
a,b,!0)){null==c&&(c=J.util.BSUtil.newBitSet(d+1));for(c.set(d);0<=--d&&this.atoms[d].getGroup3(!0).equals(e);)c.set(d);d++}}else this.isAtomNameMatch(this.atoms[d],a,b)&&(null==c&&(c=J.util.BSUtil.newBitSet(d+1)),c.set(d))}return c},$fz.isPrivate=!0,$fz),"~S,~B");$_M(c$,"isAtomNameMatch",($fz=function(a,b,c){return J.util.TextFormat.isMatch(a.getAtomName().toUpperCase(),b,c,!1)},$fz.isPrivate=!0,$fz),"J.modelset.Atom,~S,~B");$_M(c$,"getSeqcodeBits",function(a,b){var c=new J.util.BS,d=J.modelset.Group.getSeqNumberFor(a),
e=2147483647!=d,f=!0,g=J.modelset.Group.getInsertionCodeChar(a);switch(g){case "?":for(var h=this.atomCount;0<=--h;){var k=this.atoms[h].getSeqcode();if(!e||d==J.modelset.Group.getSeqNumberFor(k)&&0!=J.modelset.Group.getInsertionCodeFor(k))c.set(h),f=!1}break;default:for(h=this.atomCount;0<=--h;)if(k=this.atoms[h].getSeqcode(),a==k||!e&&a==J.modelset.Group.getInsertionCodeFor(k)||"*"==g&&d==J.modelset.Group.getSeqNumberFor(k))c.set(h),f=!1}return!f||b?c:null},"~N,~B");$_M(c$,"getChainBits",function(a){var b=
this.viewer.getBoolean(603979822);b||(a=Character.toUpperCase(a));for(var c=new J.util.BS,d=J.util.BSUtil.newBitSet(this.atomCount),e=d.nextClearBit(0);e<this.atomCount;e=d.nextClearBit(e+1)){var f=this.atoms[e].getChain();a==(b?f.chainID:Character.toUpperCase(f.chainID))?(f.setAtomBitSet(c),d.or(c)):f.setAtomBitSet(d)}return c},"~S");$_M(c$,"getAtomIndices",function(a){for(var b=0,c=Clazz.newIntArray(this.atomCount,0),d=a.nextSetBit(0);0<=d&&d<this.atomCount;d=a.nextSetBit(d+1))c[d]=++b;return c},
"J.util.BS");$_M(c$,"getAtomsWithin",function(a,b){for(var c=new J.util.BS,d=this.atomCount;0<=--d;){var e=this.atoms[d],f=J.util.Measure.distanceToPlane(b,e);(0<a&&-0.1<=f&&f<=a||0>a&&0.1>=f&&f>=a||0==a&&0.01>Math.abs(f))&&c.set(e.index)}return c},"~N,J.util.P4");$_M(c$,"getAtomsWithinBs",function(a,b,c){var d=new J.util.BS;if(0==b.length||null!=c&&0==c.cardinality())return d;null==c&&(c=J.util.BSUtil.setAll(b.length));for(var e=this.atomCount;0<=--e;)for(var f=this.atoms[e],g=c.nextSetBit(0);0<=
g;g=c.nextSetBit(g+1))if(f.distance(b[g])<a){d.set(e);break}return d},"~N,~A,J.util.BS");$_M(c$,"getVisibleSet",function(){for(var a=new J.util.BS,b=this.atomCount;0<=--b;)this.atoms[b].isVisible(0)&&a.set(b);return a});$_M(c$,"getClickableSet",function(){for(var a=new J.util.BS,b=this.atomCount;0<=--b;)this.atoms[b].isClickable()&&a.set(b);return a});$_M(c$,"deleteModelAtoms",function(a,b,c){this.atoms=J.util.ArrayUtil.deleteElements(this.atoms,a,b);this.atomCount=this.atoms.length;for(var d=a;d<
this.atomCount;d++)this.atoms[d].index=d,this.atoms[d].modelIndex--;this.atomNames=J.util.ArrayUtil.deleteElements(this.atomNames,a,b);this.atomTypes=J.util.ArrayUtil.deleteElements(this.atomTypes,a,b);this.atomSerials=J.util.ArrayUtil.deleteElements(this.atomSerials,a,b);this.bfactor100s=J.util.ArrayUtil.deleteElements(this.bfactor100s,a,b);this.hasBfactorRange=!1;this.occupancies=J.util.ArrayUtil.deleteElements(this.occupancies,a,b);this.partialCharges=J.util.ArrayUtil.deleteElements(this.partialCharges,
a,b);this.ellipsoids=J.util.ArrayUtil.deleteElements(this.ellipsoids,a,b);this.vibrationVectors=J.util.ArrayUtil.deleteElements(this.vibrationVectors,a,b);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],c)},"~N,~N,J.util.BS");c$.$AtomCollection$AtomSorter$=function(){Clazz.pu$h();c$=Clazz.decorateAsClass(function(){Clazz.prepareCallback(this,arguments);Clazz.instantialize(this,arguments)},J.modelset.AtomCollection,
"AtomSorter",null,java.util.Comparator);Clazz.overrideMethod(c$,"compare",function(a,b){return a.index>b.index?1:a.index<b.index?-1:0},"J.modelset.Atom,J.modelset.Atom");c$=Clazz.p0p()};c$.MINUSZERO=c$.prototype.MINUSZERO=Float.$valueOf(-0);Clazz.defineStatics(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=J.util.V3.new3(3.14159,2.71828,1.41421);Clazz.defineStatics(c$,
"almost180",2.984513)}),Clazz.declarePackage("J.modelset"),Clazz.load(null,"J.modelset.LabelToken","java.lang.Character $.Float java.util.Hashtable J.modelset.Atom J.script.T J.util.Escape $.SB $.TextFormat".split(" "),function(){c$=Clazz.decorateAsClass(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;Clazz.instantialize(this,arguments)},J.modelset,"LabelToken");c$.isLabelPropertyTok=
$_M(c$,"isLabelPropertyTok",($fz=function(a){for(var b=J.modelset.LabelToken.labelTokenIds.length;0<=--b;)if(J.modelset.LabelToken.labelTokenIds[b]==a)return!0;return!1},$fz.isPrivate=!0,$fz),"~N");Clazz.makeConstructor(c$,($fz=function(a,b){this.text=a;this.pt=b},$fz.isPrivate=!0,$fz),"~S,~N");c$.compile=$_M(c$,"compile",function(a,b,c,d){if(null==b||0==b.length)return null;if(0>b.indexOf("%")||2>b.length)return[new J.modelset.LabelToken(b,-1)];for(var e=0,f=-1,g=b.length;++f<g&&0<=(f=b.indexOf("%",
f));)e++;for(var e=Array(2*e+1),h,k=0,f=0;0<=(h=b.indexOf("%",f));)f!=h&&(e[k++]=new J.modelset.LabelToken(b.substring(f,h),-1)),f=e[k++]=new J.modelset.LabelToken(null,h),a.autoCalculate(f.tok),f=J.modelset.LabelToken.setToken(a,b,f,g,c.charCodeAt(0),d);f<g&&(e[k++]=new J.modelset.LabelToken(b.substring(f),-1));return e},"J.viewer.Viewer,~S,~S,java.util.Map");c$.formatLabel=$_M(c$,"formatLabel",function(a,b,c){if(null==c||0==c.length)return null;c=J.modelset.LabelToken.compile(a,c,"\x00",null);return J.modelset.LabelToken.formatLabelAtomArray(a,
b,c,"\x00",null)},"J.viewer.Viewer,J.modelset.Atom,~S");c$.formatLabelAtomArray=$_M(c$,"formatLabelAtomArray",function(a,b,c,d,e){if(null==b)return null;var f="0"<d?null:new J.util.SB;if(null!=c)for(var g=0;g<c.length;g++){var h=c[g];if(null==h)break;"0"<d&&h.ch1!=d||(0>=h.tok||null!=h.key?null!=f&&(f.append(h.text),"\x00"!=h.ch1&&f.appendC(h.ch1)):J.modelset.LabelToken.appendAtomTokenValue(a,b,h,f,e))}return null==f?null:f.toString().intern()},"J.viewer.Viewer,J.modelset.Atom,~A,~S,~A");c$.getBondLabelValues=
$_M(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=$_M(c$,"formatLabelBond",function(a,b,c,d,e){d.put("#",""+(b.index+1));d.put("ORDER",""+b.getOrderNumberAsString());d.put("TYPE",b.getOrderName());d.put("LENGTH",Float.$valueOf(b.atom1.distance(b.atom2)));d.put("ENERGY",Float.$valueOf(b.getEnergy()));J.modelset.LabelToken.setValues(c,
d);J.modelset.LabelToken.formatLabelAtomArray(a,b.atom1,c,"1",e);J.modelset.LabelToken.formatLabelAtomArray(a,b.atom2,c,"2",e);return J.modelset.LabelToken.getLabel(c)},"J.viewer.Viewer,J.modelset.Bond,~A,java.util.Map,~A");c$.formatLabelMeasure=$_M(c$,"formatLabelMeasure",function(a,b,c,d,e){var f=new java.util.Hashtable;f.put("#",""+(b.index+1));f.put("VALUE",Float.$valueOf(d));f.put("UNITS",e);c=J.modelset.LabelToken.compile(a,c,"\u0001",f);J.modelset.LabelToken.setValues(c,f);f=b.modelSet.atoms;
b=b.getCountPlusIndices();for(d=b[0];1<=d;--d)0<=b[d]&&J.modelset.LabelToken.formatLabelAtomArray(a,f[b[d]],c,String.fromCharCode(48+d),null);c=J.modelset.LabelToken.getLabel(c);return null==c?"":c},"J.viewer.Viewer,J.modelset.Measurement,~S,~N,~S");c$.setValues=$_M(c$,"setValues",function(a,b){for(var c=0;c<a.length;c++){var d=a[c];if(null==d)break;if(null!=d.key){var e=b.get(d.key);d.text=Clazz.instanceOf(e,Float)?d.format(e.floatValue(),null,null):d.format(NaN,e,null)}}},"~A,java.util.Map");c$.getLabel=
$_M(c$,"getLabel",function(a){for(var b=new J.util.SB,c=0;c<a.length;c++){var d=a[c];if(null==d)break;b.append(d.text)}return b.toString()},"~A");c$.setToken=$_M(c$,"setToken",($fz=function(a,b,c,d,e,f){var g=c.pt+1,h;"-"==b.charAt(g)&&(c.alignLeft=!0,++g);g<d&&"0"==b.charAt(g)&&(c.zeroPad=!0,++g);for(;g<d&&Character.isDigit(h=b.charAt(g));)c.width=10*c.width+(h.charCodeAt(0)-48),++g;c.precision=2147483647;var k=!1;if(g<d&&"."==b.charAt(g)){++g;if(g<d&&"-"==(h=b.charAt(g)))k=!0,++g;if(g<d&&Character.isDigit(h=
b.charAt(g)))c.precision=h.charCodeAt(0)-48,k&&(c.precision=-1-c.precision),++g}if(g<d&&null!=f)for(f=f.keySet().iterator();f.hasNext();)if(k=f.next(),b.indexOf(k)==g)return c.key=k,g+k.length;if(g<d)switch(h=b.charAt(g++)){case "%":return c.text="%",g;case "[":var l=b.indexOf("]",g);if(l<g){g=d;break}g=b.substring(g,l).toLowerCase();g.startsWith("property_")?(c.text=g,c.tok=135270407,c.data=a.getDataFloat(c.text)):(a=J.script.T.getTokenFromName(g),null!=a&&J.modelset.LabelToken.isLabelPropertyTok(a.tok)&&
(c.tok=a.tok));g=l+1;break;case "{":l=b.indexOf("}",g);if(l<g){g=d;break}c.text=b.substring(g,l);c.data=a.getDataFloat(c.text);null==c.data?(c.data=a.getData(c.text),Clazz.instanceOf(c.data,Array)&&(c.data=c.data[1],Clazz.instanceOf(c.data,String)&&(c.data=J.util.TextFormat.split(c.data,"\n")),J.util.Escape.isAS(c.data)||(c.data=null)),c.tok=null==c.data?4:135266306):c.tok=135270407;g=l+1;break;default:var m;if(g<d&&0<=(l="fuv".indexOf(h))&&0<=(m="xyz".indexOf(b.charAt(g))))c.tok=J.modelset.LabelToken.twoCharLabelTokenIds[3*
l+m],g++;else if(0<=(l="AaBbCcDEefGgIiLlMmNnoPpQqRrSsTtUuVvWXxYyZz%%%gqW".indexOf(h)))c.tok=J.modelset.LabelToken.labelTokenIds[l]}c.text=b.substring(c.pt,g);if(g<d&&0!=e&&Character.isDigit(h=b.charAt(g)))g++,c.ch1=h,h.charCodeAt(0)!=e&&1!=e&&(c.tok=0);return g},$fz.isPrivate=!0,$fz),"J.viewer.Viewer,~S,J.modelset.LabelToken,~N,~N,java.util.Map");c$.appendAtomTokenValue=$_M(c$,"appendAtomTokenValue",($fz=function(a,b,c,d,e){var f=null,g=NaN,h=null;try{switch(c.tok){case 1095761923:f=""+(null==e?b.index:
e[b.index]);break;case 1766856708:h=J.modelset.Atom.atomPropertyTuple(b,c.tok);break;case 135270407:null!=c.data&&(g=c.data[b.index]);break;case 135266306:if(null!=c.data)var k=c.data,f=b.index<k.length?k[b.index]:"";break;case 1632634889:var l=b.getFormalCharge(),f=0<l?""+l+"+":0>l?""+-l+"-":"";break;case "g":f=""+b.getSelectedGroupIndexWithinChain();break;case 1095766028:f=b.getModelNumberForLabel();break;case 1129318401:f=""+J.modelset.Atom.atomPropertyInt(b,c.tok);break;case "Q":g=b.getOccupancy100()/
100;break;case 1666189314:g=J.modelset.Atom.atomPropertyFloat(a,b,c.tok);break;case "r":f=b.getSeqcodeString();break;case 1087373324:f=b.getStructureId();break;case 1095761939:var m=b.getStrucNo(),f=0>=m?"":""+m;break;case 1112539148:g=b.getGroupParameter(1112539148);Float.isNaN(g)&&(f="null");break;case 4:f=a.getModelAtomProperty(b,c.text.substring(2,c.text.length-1));break;case 1641025539:case 1238369286:f=J.modelset.Atom.atomPropertyString(a,b,c.tok);break;case "W":f=b.getIdentityXYZ(!1);break;
default:switch(c.tok&1137704960){case 1095761920:c.intAsFloat?g=J.modelset.Atom.atomPropertyInt(b,c.tok):f=""+J.modelset.Atom.atomPropertyInt(b,c.tok);break;case 1112539136:g=J.modelset.Atom.atomPropertyFloat(a,b,c.tok);break;case 1087373312:f=J.modelset.Atom.atomPropertyString(a,b,c.tok);break;case 1078984704:h=J.modelset.Atom.atomPropertyTuple(b,c.tok)}}}catch(n){if(Clazz.exceptionOf(n,IndexOutOfBoundsException))g=NaN,h=f=null;else throw n;}f=c.format(g,f,h);null==d?c.text=f:d.append(f)},$fz.isPrivate=
!0,$fz),"J.viewer.Viewer,J.modelset.Atom,J.modelset.LabelToken,J.util.SB,~A");$_M(c$,"format",($fz=function(a,b,c){return Float.isNaN(a)?null!=b?J.util.TextFormat.formatS(b,this.width,this.precision,this.alignLeft,this.zeroPad):null!=c?(0==this.width&&2147483647==this.precision&&(this.width=6,this.precision=2),J.util.TextFormat.formatF(c.x,this.width,this.precision,!1,!1)+J.util.TextFormat.formatF(c.y,this.width,this.precision,!1,!1)+J.util.TextFormat.formatF(c.z,this.width,this.precision,!1,!1)):
this.text:J.util.TextFormat.formatF(a,this.width,this.precision,this.alignLeft,this.zeroPad)},$fz.isPrivate=!0,$fz),"~N,~S,J.util.Tuple3f");Clazz.defineStatics(c$,"labelTokenParams","AaBbCcDEefGgIiLlMmNnoPpQqRrSsTtUuVvWXxYyZz%%%gqW","labelTokenIds",[1087373315,1087375362,1087375361,1112541199,1632634889,1087373316,1095761923,1087373322,1087375365,1112539143,1095761931,"g",1112541195,1095763969,1095761936,1095763976,1095766028,1087373319,1095761934,1087373318,1089470478,1112541196,1112539144,"Q",1129318401,
1095761937,"r",1095761938,1087373316,1112539148,1112541199,1087373321,1112539149,1649412112,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,1095761930,1112539139,1229984263,1288701960,1826248715,1112539141,1095761933,1112539140,1112539142,1095761935,1716520973,1666189314,1114638350,
1087373323,1087373320,1113200651,1641025539,1238369286,1095761939,1087373324,1087375373,1112539150,1112539151,1112539152,1112539153,1095763988,1649410065,1112541202,1112541203,1112541204,1313866247,1146093582,1146095627,1146095626,1146095629,1112541191,1112541192,1112541193,1114638346,1112539145,1112539146,1112539147,1146095628],"STANDARD_LABEL","%[identify]","twoCharLabelTokenParams","fuv","twoCharLabelTokenIds",[1112541188,1112541189,1112541190,1112539151,1112539152,1112539153,1112541202,1112541203,
1112541204])}),Clazz.declarePackage("J.api"),Clazz.declareInterface(J.api,"JmolMeasurementClient"),Clazz.declarePackage("J.modelset"),Clazz.load(["J.api.JmolMeasurementClient"],"J.modelset.MeasurementData",["J.modelset.Measurement","J.util.BSUtil","$.JmolList"],function(){c$=Clazz.decorateAsClass(function(){this.points=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.viewer=this.modelSet=this.minArray=this.units=this.atoms=this.intramolecular=null;this.iFirstAtom=0;this.justOneModel=!0;Clazz.instantialize(this,arguments)},J.modelset,"MeasurementData",null,J.api.JmolMeasurementClient);Clazz.makeConstructor(c$,function(a,b){this.viewer=a;this.points=b},"J.viewer.Viewer,J.util.JmolList");$_M(c$,"setModelSet",function(a){this.modelSet=a;return this},"J.modelset.ModelSet");$_M(c$,"set",function(a,b,c,d,e,f,g,h,k){this.modelSet=this.viewer.getModelSet();
this.tokAction=a;2<=this.points.size()&&(Clazz.instanceOf(this.points.get(0),J.util.BS)&&Clazz.instanceOf(this.points.get(1),J.util.BS))&&(this.justOneModel=J.util.BSUtil.haveCommon(this.viewer.getModelBitSet(this.points.get(0),!1),this.viewer.getModelBitSet(this.points.get(1),!1)));this.radiusData=b;this.strFormat=c;this.units=d;this.tickInfo=e;this.mustBeConnected=f;this.mustNotBeConnected=g;this.intramolecular=h;this.isAll=k;return this},"~N,J.atomdata.RadiusData,~S,~S,J.modelset.TickInfo,~B,~B,Boolean,~B");
$_M(c$,"processNextMeasure",function(a){var b=a.getMeasurement();if(null==this.radiusData||a.isInRange(this.radiusData,b))if(null==this.measurementStrings){var c=this.minArray[this.iFirstAtom];a.value=b;b=a.fixValue(this.units,!1);this.minArray[this.iFirstAtom]=-Infinity==1/c?b:Math.min(c,b)}else this.measurementStrings.addLast(a.getStringUsing(this.viewer,this.strFormat,this.units))},"J.modelset.Measurement");$_M(c$,"getMeasurements",function(a){if(a){this.minArray=Clazz.newFloatArray(this.points.get(0).cardinality(),
0);for(a=0;a<this.minArray.length;a++)this.minArray[a]=-0;this.define(null,this.modelSet);return this.minArray}this.measurementStrings=new J.util.JmolList;this.define(null,this.modelSet);return this.measurementStrings},"~B");$_M(c$,"define",function(a,b){this.client=null==a?this:a;this.atoms=b.atoms;var c=this.points.size();if(!(2>c)){var d=-1,e=Array(4),f=Clazz.newIntArray(5,0),g=(new J.modelset.Measurement).setPoints(b,f,e,null);g.setCount(c);for(var h=-1,k=0;k<c;k++){var l=this.points.get(k);if(Clazz.instanceOf(l,
J.util.BS)){h=l.cardinality();if(0==h)return;1<h&&(d=0);h=k;0==k&&(this.iFirstAtom=0);f[k+1]=l.nextSetBit(0)}else e[k]=l,f[k+1]=-2-k}this.nextMeasure(0,h,g,d)}},"J.api.JmolMeasurementClient,J.modelset.ModelSet");$_M(c$,"nextMeasure",($fz=function(a,b,c,d){if(a>b)c.isValid()&&((!this.mustBeConnected||c.isConnected(this.atoms,a))&&(!this.mustNotBeConnected||!c.isConnected(this.atoms,a))&&(null==this.intramolecular||c.isIntramolecular(this.atoms,a)==this.intramolecular.booleanValue()))&&this.client.processNextMeasure(c);
else{var e=this.points.get(a),f=c.getCountPlusIndices(),g=0==a?2147483647:f[a];if(0>g)this.nextMeasure(a+1,b,c,d);else{for(var h=!1,k=e.nextSetBit(0),l=0;0<=k;k=e.nextSetBit(k+1),l++)if(k!=g){var m=this.atoms[k].getModelIndex();if(0<=d&&this.justOneModel)if(0==a)d=m;else if(d!=m)continue;f[a+1]=k;0==a&&(this.iFirstAtom=l);h=!0;this.nextMeasure(a+1,b,c,d)}h||this.nextMeasure(a+1,b,c,d)}}},$fz.isPrivate=!0,$fz),"~N,~N,J.modelset.Measurement,~N")}),Clazz.declarePackage("J.util"),Clazz.load(["J.util.P3",
"$.P3i","$.V3"],"J.util.BoxInfo","java.util.Hashtable J.util.JmolList $.Measure $.P4 $.Point3fi $.TriangleData".split(" "),function(){c$=Clazz.decorateAsClass(function(){this.bbVertices=this.bbVector=this.bbCenter=this.bbCorner1=this.bbCorner0=null;this.isScaleSet=!1;Clazz.instantialize(this,arguments)},J.util,"BoxInfo");Clazz.prepareFields(c$,function(){this.bbCorner0=new J.util.P3;this.bbCorner1=new J.util.P3;this.bbCenter=new J.util.P3;this.bbVector=new J.util.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]=J.util.P3.new3(-1,-1,-1),J.util.BoxInfo.unitBboxPoints[a].scaleAdd2(2,J.util.BoxInfo.unitCubePoints[a],J.util.BoxInfo.unitBboxPoints[a])});Clazz.makeConstructor(c$,function(){this.reset()});$_M(c$,"intersectPlane",function(a,b,c){var d=new J.util.JmolList;d.addLast(this.getCanonicalCopy(b));return J.util.TriangleData.intersectPlane(a,d,c)},"J.util.P4,~N,~N");$_M(c$,"getCanonicalCopy",function(a){return J.util.BoxInfo.getCanonicalCopy(this.bbVertices,
a)},"~N");c$.getCanonicalCopy=$_M(c$,"getCanonicalCopy",function(a,b){for(var c=Array(8),d=0;8>d;d++)c[J.util.BoxInfo.toCanonical[d]]=J.util.P3.newP(a[d]);J.util.BoxInfo.scaleBox(c,b);return c},"~A,~N");c$.scaleBox=$_M(c$,"scaleBox",function(a,b){if(!(0==b||1==b)){for(var c=new J.util.P3,d=new J.util.V3,e=0;8>e;e++)c.add(a[e]);c.scale(0.125);for(e=0;8>e;e++)d.sub2(a[e],c),d.scale(b),a[e].add2(c,d)}},"~A,~N");c$.getFacesFromCriticalPoints=$_M(c$,"getFacesFromCriticalPoints",function(a){for(var b=Array(6),
c=new J.util.V3,d=new J.util.V3,e=new J.util.V3,f=new J.util.P3,g=new J.util.P3,h=new J.util.P3,k=Array(8),l=0;8>l;l++)k[l]=J.util.P3.newP(a[0]),1==(l&1)&&k[l].add(a[1]),2==(l&2)&&k[l].add(a[2]),4==(l&4)&&k[l].add(a[3]);for(l=0;6>l;l++)f.setT(k[J.util.BoxInfo.facePoints[l].x]),g.setT(k[J.util.BoxInfo.facePoints[l].y]),h.setT(k[J.util.BoxInfo.facePoints[l].z]),J.util.Measure.getPlaneThroughPoints(f,g,h,c,d,e,b[l]=new J.util.P4);return b},"~A");c$.getCriticalPoints=$_M(c$,"getCriticalPoints",function(a,
b){var c=J.util.P3.newP(a[0]),d=J.util.P3.newP(a[1]),e=J.util.P3.newP(a[2]),f=J.util.P3.newP(a[4]);d.sub(c);e.sub(c);f.sub(c);null!=b&&c.add(b);return[c,d,e,f]},"~A,J.util.Tuple3f");$_M(c$,"getBoundBoxCenter",function(){this.isScaleSet||this.setBbcage(1);return this.bbCenter});$_M(c$,"getBoundBoxCornerVector",function(){this.isScaleSet||this.setBbcage(1);return this.bbVector});$_M(c$,"getBoundBoxPoints",function(a){this.isScaleSet||this.setBbcage(1);return a?[this.bbCenter,J.util.P3.newP(this.bbVector),
this.bbCorner0,this.bbCorner1]:[this.bbCorner0,this.bbCorner1]},"~B");$_M(c$,"getBboxVertices",function(){this.isScaleSet||this.setBbcage(1);return this.bbVertices});$_M(c$,"getBoundBoxInfo",function(){this.isScaleSet||this.setBbcage(1);var a=new java.util.Hashtable;a.put("center",J.util.P3.newP(this.bbCenter));a.put("vector",J.util.V3.newV(this.bbVector));a.put("corner0",J.util.P3.newP(this.bbCorner0));a.put("corner1",J.util.P3.newP(this.bbCorner1));return a});$_M(c$,"setBoundBox",function(a,b,c,
d){if(null!=a){if(0==d)return;if(c){if(0==a.distance(b))return;this.bbCorner0.set(Math.min(a.x,b.x),Math.min(a.y,b.y),Math.min(a.z,b.z));this.bbCorner1.set(Math.max(a.x,b.x),Math.max(a.y,b.y),Math.max(a.z,b.z))}else{if(0==b.x||0==b.y&&0==b.z)return;this.bbCorner0.set(a.x-b.x,a.y-b.y,a.z-b.z);this.bbCorner1.set(a.x+b.x,a.y+b.y,a.z+b.z)}}this.setBbcage(d)},"J.util.P3,J.util.P3,~B,~N");$_M(c$,"reset",function(){this.isScaleSet=!1;this.bbCorner0.set(3.4028235E38,3.4028235E38,3.4028235E38);this.bbCorner1.set(-3.4028235E38,
-3.4028235E38,-3.4028235E38)});$_M(c$,"addBoundBoxPoint",function(a){this.isScaleSet=!1;J.util.BoxInfo.addPoint(a,this.bbCorner0,this.bbCorner1,0)},"J.util.P3");c$.addPoint=$_M(c$,"addPoint",function(a,b,c,d){a.x-d<b.x&&(b.x=a.x-d);a.x+d>c.x&&(c.x=a.x+d);a.y-d<b.y&&(b.y=a.y-d);a.y+d>c.y&&(c.y=a.y+d);a.z-d<b.z&&(b.z=a.z-d);a.z+d>c.z&&(c.z=a.z+d)},"J.util.P3,J.util.P3,J.util.P3,~N");c$.addPointXYZ=$_M(c$,"addPointXYZ",function(a,b,c,d,e,f){a-f<d.x&&(d.x=a-f);a+f>e.x&&(e.x=a+f);b-f<d.y&&(d.y=b-f);b+
f>e.y&&(e.y=b+f);c-f<d.z&&(d.z=c-f);c+f>e.z&&(e.z=c+f)},"~N,~N,~N,J.util.P3,J.util.P3,~N");$_M(c$,"setBbcage",function(a){this.isScaleSet=!0;this.bbCenter.add2(this.bbCorner0,this.bbCorner1);this.bbCenter.scale(0.5);this.bbVector.sub2(this.bbCorner1,this.bbCenter);0<a?this.bbVector.scale(a):(this.bbVector.x-=a/2,this.bbVector.y-=a/2,this.bbVector.z-=a/2);for(a=8;0<=--a;){var b=this.bbVertices[a];b.setT(J.util.BoxInfo.unitBboxPoints[a]);b.x*=this.bbVector.x;b.y*=this.bbVector.y;b.z*=this.bbVector.z;
b.add(this.bbCenter)}this.bbCorner0.setT(this.bbVertices[0]);this.bbCorner1.setT(this.bbVertices[7])},"~N");$_M(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},"J.util.P3");Clazz.defineStatics(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=[J.util.P3.new3(0,0,0),J.util.P3.new3(0,0,1),J.util.P3.new3(0,1,0),J.util.P3.new3(0,1,1),J.util.P3.new3(1,0,0),J.util.P3.new3(1,0,1),J.util.P3.new3(1,1,0),J.util.P3.new3(1,1,1)];c$.facePoints=c$.prototype.facePoints=[J.util.P3i.new3(4,0,6),J.util.P3i.new3(4,6,5),J.util.P3i.new3(5,7,1),J.util.P3i.new3(1,3,0),J.util.P3i.new3(6,2,7),J.util.P3i.new3(1,0,5)];Clazz.defineStatics(c$,"toCanonical",[0,3,4,7,1,
2,5,6]);c$.cubeVertexOffsets=c$.prototype.cubeVertexOffsets=[J.util.P3i.new3(0,0,0),J.util.P3i.new3(1,0,0),J.util.P3i.new3(1,0,1),J.util.P3i.new3(0,0,1),J.util.P3i.new3(0,1,0),J.util.P3i.new3(1,1,0),J.util.P3i.new3(1,1,1),J.util.P3i.new3(0,1,1)];c$.unitBboxPoints=c$.prototype.unitBboxPoints=Array(8)}),Clazz.declarePackage("J.modelset"),Clazz.load(["J.modelset.AtomCollection","J.util.BS"],"J.modelset.BondCollection","J.modelset.Bond $.BondIteratorSelected $.HBond J.util.ArrayUtil $.BSUtil $.JmolEdge $.Logger".split(" "),
function(){c$=Clazz.decorateAsClass(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;Clazz.instantialize(this,arguments)},J.modelset,"BondCollection",J.modelset.AtomCollection);Clazz.prepareFields(c$,function(){this.numCached=Clazz.newIntArray(5,0);this.freeBonds=Array(5);for(var a=5;0<--a;)this.freeBonds[a]=
Array(200);this.bsAromatic=new J.util.BS});$_M(c$,"releaseModelSet",function(){this.freeBonds=this.bonds=null;Clazz.superCall(this,J.modelset.BondCollection,"releaseModelSet",[])});$_M(c$,"resetMolecules",function(){this.molecules=null;this.moleculeCount=0});$_M(c$,"getBondAt",function(a){return this.bonds[a]},"~N");$_M(c$,"getBondIteratorForType",function(a,b){return new J.modelset.BondIteratorSelected(this.bonds,this.bondCount,a,b,this.viewer.getBoolean(603979812))},"~N,J.util.BS");$_M(c$,"getBondIterator",
function(a){return new J.modelset.BondIteratorSelected(this.bonds,this.bondCount,131071,a,!1)},"J.util.BS");$_M(c$,"getBondAtom1",function(a){return this.bonds[a].atom1},"~N");$_M(c$,"getBondAtom2",function(a){return this.bonds[a].atom2},"~N");$_M(c$,"getBondRadius",function(a){return this.bonds[a].getRadius()},"~N");$_M(c$,"getBondOrder",function(a){return this.bonds[a].order},"~N");$_M(c$,"getBondColix1",function(a){return this.bonds[a].getColix1()},"~N");$_M(c$,"getBondColix2",function(a){return this.bonds[a].getColix2()},
"~N");$_M(c$,"getBondModelIndex",function(a){return this.bonds[a].atom1.modelIndex},"~N");$_M(c$,"getBondCountInModel",function(a){for(var b=0,c=this.bondCount;0<=--c;)this.bonds[c].atom1.modelIndex==a&&b++;return b},"~N");$_M(c$,"getBondsForSelectedAtoms",function(a,b){for(var c=new J.util.BS,d=0;d<this.bondCount;++d){var e=this.bonds[d],f=a.get(e.atom1.index),e=a.get(e.atom2.index);((new Boolean(!b&f&e)).valueOf()||(new Boolean(b&(new Boolean(f|e)).valueOf())).valueOf())&&c.set(d)}return c},"J.util.BS,~B");
$_M(c$,"bondAtoms",function(a,b,c,d,e,f,g,h){c=this.getOrAddBond(a,b,c,d,e,f,!0);h&&(c.order|=131072,g&&(a.group=b.group,a.group.addAtoms(a.index)));return c},"J.modelset.Atom,J.modelset.Atom,~N,~N,J.util.BS,~N,~B,~B");$_M(c$,"getOrAddBond",($fz=function(a,b,c,d,e,f,g){if(131071==c||65535==c)c=1;a.isBonded(b)?(a=a.getBond(b).index,g&&(this.bonds[a].setOrder(c),this.bonds[a].setMad(d),Clazz.instanceOf(this.bonds[a],J.modelset.HBond)&&(this.bonds[a].energy=f))):(this.bondCount==this.bonds.length&&(this.bonds=
J.util.ArrayUtil.arrayCopyObject(this.bonds,this.bondCount+250)),a=this.setBond(this.bondCount++,this.bondMutually(a,b,c,d,f)).index);null!=e&&e.set(a);return this.bonds[a]},$fz.isPrivate=!0,$fz),"J.modelset.Atom,J.modelset.Atom,~N,~N,J.util.BS,~N,~B");$_M(c$,"setBond",function(a,b){return this.bonds[b.index=a]=b},"~N,J.modelset.Bond");$_M(c$,"bondMutually",function(a,b,c,d,e){c=J.modelset.Bond.isOrderH(c)?new J.modelset.HBond(a,b,c,d,0,e):new J.modelset.Bond(a,b,c,d,0);this.addBondToAtom(a,c);this.addBondToAtom(b,
c);return c},"J.modelset.Atom,J.modelset.Atom,~N,~N,~N");$_M(c$,"addBondToAtom",($fz=function(a,b){null==a.bonds?(a.bonds=Array(1),a.bonds[0]=b):a.bonds=this.addToBonds(b,a.bonds)},$fz.isPrivate=!0,$fz),"J.modelset.Atom,J.modelset.Bond");$_M(c$,"addToBonds",($fz=function(a,b){var c;if(null==b)c=0<this.numCached[1]?this.freeBonds[1][--this.numCached[1]]:Array(1),c[0]=a;else{var d=b.length;c=d+1;c=5>c&&0<this.numCached[c]?this.freeBonds[c][--this.numCached[c]]:Array(c);c[d]=a;for(var e=d;0<=--e;)c[e]=
b[e];5>d&&200>this.numCached[d]&&(this.freeBonds[d][this.numCached[d]++]=b)}return c},$fz.isPrivate=!0,$fz),"J.modelset.Bond,~A");$_M(c$,"addHBond",function(a,b,c,d){this.bondCount==this.bonds.length&&(this.bonds=J.util.ArrayUtil.arrayCopyObject(this.bonds,this.bondCount+250));return this.setBond(this.bondCount++,this.bondMutually(a,b,c,1,d)).index},"J.modelset.Atom,J.modelset.Atom,~N,~N");c$.getBondOrderFull=$_M(c$,"getBondOrderFull",function(a,b,c,d,e){if(0==a||0==b||c<d)return 0;a=a+b+e;return c>
a*a?0:1},"~N,~N,~N,~N,~N");$_M(c$,"checkValencesAndBond",function(a,b,c,d,e){if(20<a.getCurrentBondCount()||20<b.getCurrentBondCount())return this.haveWarned||J.util.Logger.warn("maximum auto bond count reached"),this.haveWarned=!0,!1;var f=a.getFormalCharge();if(0!=f){var g=b.getFormalCharge();if(0>f&&0>g||0<f&&0<g)return!1}if(a.alternateLocationID!=b.alternateLocationID&&"\x00"!=a.alternateLocationID&&"\x00"!=b.alternateLocationID)return!1;this.getOrAddBond(a,b,c,d,e,0,!1);return!0},"J.modelset.Atom,J.modelset.Atom,~N,~N,J.util.BS");
$_M(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});$_M(c$,"getDefaultMadFromOrder",function(a){return J.modelset.Bond.isOrderH(a)?1:0!=(a&32768)?Clazz.doubleToInt(Math.floor(2E3*this.viewer.getFloat(570425406))):this.defaultCovalentMad},"~N");$_M(c$,"deleteConnections",function(a,b,c,d,e,f,g,h,k){var l=0>a,m=0>b,n=0,p=0;l&&(a=-a);m&&(b=-b);var q=new J.util.BS,r=
0,s=c|=131072;!g&&J.modelset.Bond.isOrderH(c)&&(c=30720);if(f)f=d;else{f=new J.util.BS;for(var t=d.nextSetBit(0);0<=t;t=d.nextSetBit(t+1)){var u=this.atoms[t];if(null!=u.bonds)for(var v=u.bonds.length;0<=--v;)e.get(u.getBondedAtomIndex(v))&&f.set(u.bonds[v].index)}}for(t=f.nextSetBit(0);t<this.bondCount&&0<=t;t=f.nextSetBit(t+1)){d=this.bonds[t];e=d.atom1;u=d.atom2;v=e.distanceSquared(u);if(l||m)n=e.distance(u),p=e.getBondingRadiusFloat()+u.getBondingRadiusFloat();if(!(l?n<p*a:v<h)&&!(m?n>p*b:v>k))if(g||
s==(d.order&-257|131072)||0!=(c&d.order&30720))q.set(t),r++}0<r&&this.dBb(q,!1);return[0,r]},"~N,~N,~N,J.util.BS,J.util.BS,~B,~B,~N,~N");$_M(c$,"dBb",function(a,b){var c=a.nextSetBit(0);if(!(0>c)){this.resetMolecules();for(var d=-1,e=a.cardinality(),f=c;f<this.bondCount;++f){var g=this.bonds[f];if(0<e&&a.get(f)){e--;if(!b){var h=g.atom1.modelIndex;h!=d&&this.models[d=h].resetBoundCount()}g.deleteAtomReferences()}else this.setBond(c++,g)}for(d=this.bondCount;--d>=c;)this.bonds[d]=null;this.bondCount=
c;c=this.viewer.getShapeProperty(1,"sets");if(null!=c)for(d=0;d<c.length;d++)J.util.BSUtil.deleteBits(c[d],a);J.util.BSUtil.deleteBits(this.bsAromatic,a)}},"J.util.BS,~B");$_M(c$,"resetAromatic",function(){for(var a=this.bondCount;0<=--a;){var b=this.bonds[a];b.isAromatic()&&b.setOrder(515)}});$_M(c$,"assignAromaticBonds",function(){this.assignAromaticBondsBs(!0,null)});$_M(c$,"assignAromaticBondsBs",function(a,b){a||(this.bsAromatic=new J.util.BS);this.bsAromaticSingle=new J.util.BS;this.bsAromaticDouble=
new J.util.BS;for(var c=null==b,d=c?this.bondCount-1:b.nextSetBit(0),e=d;0<=e;e=c?e-1:b.nextSetBit(e+1)){var f=this.bonds[e];this.bsAromatic.get(e)&&f.setOrder(515);switch(f.order&-131073){case 515:this.bsAromatic.set(e);break;case 513:this.bsAromaticSingle.set(e);break;case 514:this.bsAromaticDouble.set(e)}}for(e=d=(c=null==b)?this.bondCount-1:b.nextSetBit(0);0<=e;e=c?e-1:b.nextSetBit(e+1))f=this.bonds[e],f.is(515)&&(!this.bsAromaticDouble.get(e)&&!this.bsAromaticSingle.get(e))&&(this.assignAromaticDouble(f)||
this.assignAromaticSingle(f));for(e=d;0<=e;e=c?e-1:b.nextSetBit(e+1))if(f=this.bonds[e],this.bsAromaticDouble.get(e))f.is(514)||(this.bsAromatic.set(e),f.setOrder(514));else if((this.bsAromaticSingle.get(e)||f.isAromatic())&&!f.is(513))this.bsAromatic.set(e),f.setOrder(513);this.assignAromaticNandO(b);this.bsAromaticDouble=this.bsAromaticSingle=null},"~B,J.util.BS");$_M(c$,"assignAromaticDouble",($fz=function(a){var b=a.index;if(this.bsAromaticSingle.get(b))return!1;if(this.bsAromaticDouble.get(b))return!0;
this.bsAromaticDouble.set(b);return!this.assignAromaticSingleForAtom(a.atom1,b)||!this.assignAromaticSingleForAtom(a.atom2,b)?(this.bsAromaticDouble.clear(b),!1):!0},$fz.isPrivate=!0,$fz),"J.modelset.Bond");$_M(c$,"assignAromaticSingle",($fz=function(a){var b=a.index;if(this.bsAromaticDouble.get(b))return!1;if(this.bsAromaticSingle.get(b))return!0;this.bsAromaticSingle.set(b);return!this.assignAromaticDoubleForAtom(a.atom1)||!this.assignAromaticDoubleForAtom(a.atom2)?(this.bsAromaticSingle.clear(b),
!1):!0},$fz.isPrivate=!0,$fz),"J.modelset.Bond");$_M(c$,"assignAromaticSingleForAtom",($fz=function(a,b){var c=a.bonds;if(null==c||this.assignAromaticSingleHetero(a))return!1;for(var d=c.length;0<=--d;){var e=c[d],f=e.index;if(!(f==b||!e.isAromatic()||this.bsAromaticSingle.get(f)))if(this.bsAromaticDouble.get(f)||!this.assignAromaticSingle(e))return!1}return!0},$fz.isPrivate=!0,$fz),"J.modelset.Atom,~N");$_M(c$,"assignAromaticDoubleForAtom",($fz=function(a){var b=a.bonds;if(null==b)return!1;a=this.assignAromaticSingleHetero(a);
for(var c=-1,d=b.length;0<=--d;)this.bsAromaticDouble.get(b[d].index)&&(a=!0),b[d].isAromatic()&&(c=d);for(d=b.length;0<=--d;){var e=b[d],f=e.index;if(e.isAromatic()&&!this.bsAromaticDouble.get(f)&&!this.bsAromaticSingle.get(f))if(!a&&this.assignAromaticDouble(e))a=!0;else if((a||d<c)&&!this.assignAromaticSingle(e))return!1}return a},$fz.isPrivate=!0,$fz),"J.modelset.Atom");$_M(c$,"assignAromaticSingleHetero",($fz=function(a){var b=a.getElementNumber();switch(b){case 6:case 7:case 8:case 16:break;
default:return!0}var c=a.getValence();switch(b){case 6:return 4==c;case 7:case 8:return c==10-b&&1>a.getFormalCharge();case 16:return c==18-b&&1>a.getFormalCharge()}return!1},$fz.isPrivate=!0,$fz),"J.modelset.Atom");$_M(c$,"assignAromaticNandO",($fz=function(a){for(var b,c=null==a,d=c?this.bondCount-1:a.nextSetBit(0);0<=d;d=c?d-1:a.nextSetBit(d+1))if(b=this.bonds[d],b.is(513)){var e,f=b.atom2,g,h=f.getElementNumber();7==h||8==h?(g=h,e=f,f=b.atom1,h=f.getElementNumber()):(e=b.atom1,g=e.getElementNumber());
if(!(7!=g&&8!=g)){var k=e.getValence();if(!(0>k)){var l=e.getCovalentBondCount();e=e.getFormalCharge();switch(g){case 7:3==k&&(3==l&&1>e&&6==h&&3==f.getValence())&&b.setOrder(514);break;case 8:1==k&&(0==e&&(14==h||16==h))&&b.setOrder(514)}}}}},$fz.isPrivate=!0,$fz),"J.util.BS");$_M(c$,"getAtomBitsMDb",function(a,b){var c;switch(a){default:return this.getAtomBitsMDa(a,b);case 1678770178:c=new J.util.BS;for(var d=b.nextSetBit(0);0<=d;d=b.nextSetBit(d+1))c.set(this.bonds[d].atom1.index),c.set(this.bonds[d].atom2.index);
return c;case 1048585:c=new J.util.BS;for(d=this.bondCount;0<=--d;)this.bonds[d].isAromatic()&&(c.set(this.bonds[d].atom1.index),c.set(this.bonds[d].atom2.index));return c}},"~N,~O");$_M(c$,"setBondOrder",function(a,b){var c=b.charCodeAt(0)-48,d=this.bonds[a];switch(b){case "0":case "1":case "2":case "3":break;case "p":case "m":c=J.util.JmolEdge.getBondOrderNumberFromOrder(d.getCovalentOrder()).charCodeAt(0)-48+("p"==b?1:-1);3<c?c=1:0>c&&(c=3);break;default:return null}var e=new J.util.BS;try{if(0==
c){var f=new J.util.BS;f.set(d.index);e.set(d.getAtomIndex1());e.set(d.getAtomIndex2());this.dBb(f,!1);return e}d.setOrder(c|131072);this.removeUnnecessaryBonds(d.atom1,!1);this.removeUnnecessaryBonds(d.atom2,!1);e.set(d.getAtomIndex1());e.set(d.getAtomIndex2())}catch(g){if(Clazz.exceptionOf(g,Exception))J.util.Logger.error("Exception in seBondOrder: "+g.toString());else throw g;}return e},"~N,~S");$_M(c$,"removeUnnecessaryBonds",function(a,b){var c=new J.util.BS,d=new J.util.BS,e=a.bonds;if(null!=
e){for(var f=0;f<e.length;f++)e[f].isCovalent()?1==e[f].getOtherAtom(a).getElementNumber()&&c.set(e[f].getOtherAtom(a).index):d.set(e[f].index);0<=d.nextSetBit(0)&&this.dBb(d,!1);b&&c.set(a.index);0<=c.nextSetBit(0)&&this.viewer.deleteAtoms(c,!1)}},"J.modelset.Atom,~B");$_M(c$,"displayBonds",function(a,b){b||(this.haveHiddenBonds=!0);for(var c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))c<this.bondCount&&0!=this.bonds[c].mad&&this.bonds[c].setShapeVisibility(b)},"J.modelset.Bond.BondSet,~B");Clazz.defineStatics(c$,
"BOND_GROWTH_INCREMENT",250,"MAX_BONDS_LENGTH_TO_CACHE",5,"MAX_NUM_TO_CACHE",200)}),Clazz.declarePackage("J.modelset"),Clazz.load(["J.modelset.BondCollection","J.util.BS","$.BoxInfo","$.JmolList","$.P3"],"J.modelset.ModelCollection","java.lang.Character $.Float java.util.Date $.Hashtable J.api.Interface J.bspt.Bspf J.constant.EnumPalette $.EnumVdw J.io.OutputStringBuilder $.XmlUtil J.modelset.Atom $.AtomIteratorWithinModel $.AtomIteratorWithinModelSet $.Bond $.HBond $.LabelToken $.Model J.util.ArrayUtil $.BSUtil $.Elements $.Escape $.JmolEdge $.JmolMolecule $.Logger $.Parser $.SB $.TextFormat $.TriangleData $.V3 J.viewer.Viewer".split(" "),
function(){c$=Clazz.decorateAsClass(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.selectedMoleculeCount=0;this.showRebondTimes=!0;this.shapeManager=this.bsAll=null;this.proteinStructureTainted=!1;this.htPeaks=this.symTemp=null;Clazz.instantialize(this,arguments)},J.modelset,"ModelCollection",J.modelset.BondCollection);Clazz.prepareFields(c$,function(){this.models=Array(1);this.modelNumbers=
Clazz.newIntArray(1,0);this.modelFileNumbers=Clazz.newIntArray(1,0);this.modelNumbersForAtomLabel=Array(1);this.modelNames=Array(1);this.frameTitles=Array(1);this.ptTemp=new J.util.P3;this.averageAtomPoint=new J.util.P3;this.boxInfo=new J.util.BoxInfo;this.boxInfo.addBoundBoxPoint(J.util.P3.new3(-10,-10,-10));this.boxInfo.addBoundBoxPoint(J.util.P3.new3(10,10,10));this.stateScripts=new J.util.JmolList;this.selectedMolecules=new J.util.BS});$_M(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");$_M(c$,"releaseModelSet",function(){this.unitCells=this.bsAll=this.bsSymmetry=this.models=null;Clazz.superCall(this,
J.modelset.ModelCollection,"releaseModelSet",[])});$_M(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");$_M(c$,"setModelCage",function(a,b){0>a||a>=this.modelCount||(this.models[a].simpleCage=b,this.haveUnitCells=!0)},"~N,J.api.SymmetryInterface");$_M(c$,"getPlaneIntersection",function(a,b,c,d,
e){var f=null;switch(a){case 1614417948:f=this.getUnitCell(e);if(null==f)return null;f=f.getCanonicalCopy(c);break;case 1679429641:f=this.boxInfo.getCanonicalCopy(c)}c=new J.util.JmolList;c.addLast(f);return J.util.TriangleData.intersectPlane(b,c,d)},"~N,J.util.P4,~N,~N,~N");$_M(c$,"getModelName",function(a){return 1>this.modelCount?"":0<=a?this.modelNames[a]:this.modelNumbersForAtomLabel[-1-a]},"~N");$_M(c$,"getModelTitle",function(a){return this.getModelAuxiliaryInfoValue(a,"title")},"~N");$_M(c$,
"getModelFileName",function(a){return this.getModelAuxiliaryInfoValue(a,"fileName")},"~N");$_M(c$,"setFrameTitle",function(a,b){if(Clazz.instanceOf(b,String))for(var c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))this.frameTitles[c]=b;else for(var c=a.nextSetBit(0),d=0;0<=c;c=a.nextSetBit(c+1))d<b.length&&(this.frameTitles[c]=b[d++])},"J.util.BS,~O");$_M(c$,"getFrameTitle",function(a){return 0<=a&&a<this.modelCount?this.frameTitles[a]:""},"~N");$_M(c$,"getModelNumberForAtomLabel",function(a){return this.modelNumbersForAtomLabel[a]},
"~N");$_M(c$,"calculatePolymers",function(a,b,c,d){if(this.isPDB)for(var e=!this.viewer.getBoolean(603979891),f=0;f<this.modelCount;f++)if((null==d||!d.get(f))&&this.models[f].isBioModel){this.models[f].calculatePolymers(a,b,c,d,e);break}},"~A,~N,~N,J.util.BS");$_M(c$,"getGroups",function(){for(var a=0,b=0;b<this.modelCount;b++)a+=this.models[b].getGroupCount();for(var a=Array(a),c=b=0;b<this.modelCount;b++)for(var d=0;d<this.models[b].chainCount;d++)for(var e=0;e<this.models[b].chains[d].groupCount;e++)a[c]=
this.models[b].chains[d].groups[e],a[c].groupIndex=c,c++;return a});$_M(c$,"getNotionalUnitcell",function(){var a=this.getUnitCell(0);return null==a?null:a.getNotionalUnitCell()});$_M(c$,"setCrystallographicDefaults",function(){return!this.isPDB&&this.someModelsHaveSymmetry&&this.someModelsHaveFractionalCoordinates});$_M(c$,"getAverageAtomPoint",function(){return this.averageAtomPoint});$_M(c$,"getBoundBoxCenter",function(a){return this.isJmolDataFrameForModel(a)?new J.util.P3:this.boxInfo.getBoundBoxCenter()},
"~N");$_M(c$,"getBoundBoxCornerVector",function(){return this.boxInfo.getBoundBoxCornerVector()});$_M(c$,"getBboxVertices",function(){return this.boxInfo.getBboxVertices()});$_M(c$,"getBoundBoxInfo",function(){return this.boxInfo.getBoundBoxInfo()});$_M(c$,"getBoundBoxModels",function(){return this.bboxModels});$_M(c$,"setBoundBox",function(a,b,c,d){this.isBbcageDefault=!1;this.bboxAtoms=this.bboxModels=null;this.boxInfo.setBoundBox(a,b,c,d)},"J.util.P3,J.util.P3,~B,~N");$_M(c$,"getBoundBoxCommand",
function(a){if(!a&&null!=this.bboxAtoms)return"boundbox "+J.util.Escape.eBS(this.bboxAtoms);this.ptTemp.setT(this.boxInfo.getBoundBoxCenter());var b=this.boxInfo.getBoundBoxCornerVector();a=a?"boundbox "+J.util.Escape.eP(this.ptTemp)+" "+J.util.Escape.eP(b)+"\n#or\n":"";this.ptTemp.sub(b);a+="boundbox corners "+J.util.Escape.eP(this.ptTemp)+" ";this.ptTemp.scaleAdd2(2,b,this.ptTemp);b=Math.abs(8*b.x*b.y*b.z);return a+=J.util.Escape.eP(this.ptTemp)+" # volume = "+b},"~B");$_M(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");$_M(c$,"setRotationRadius",function(a,b){return this.isJmolDataFrameForModel(a)?(this.models[a].defaultRotationRadius=b,!1):!0},"~N,~N");$_M(c$,"calcRotationRadius",function(a,b){if(this.isJmolDataFrameForModel(a)){var c=this.models[a].defaultRotationRadius;return 0==c?10:c}for(var c=0,d=this.atomCount;0<=--d;)if(this.isJmolDataFrameForAtom(this.atoms[d]))for(a=
this.atoms[d].modelIndex;0<=d&&this.atoms[d].modelIndex==a;)d--;else{var e=this.atoms[d],e=b.distance(e)+this.getRadiusVdwJmol(e);e>c&&(c=e)}return 0==c?10:c},"~N,J.util.P3");$_M(c$,"calcBoundBoxDimensions",function(a,b){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(b))},"J.util.BS,~N");$_M(c$,"getBoxInfo",function(a,b){if(null==a)return this.boxInfo;var c=new J.util.BoxInfo;this.calcAtomsMinMax(a,c);c.setBbcage(b);return c},"J.util.BS,~N");$_M(c$,"calcAtomsMinMax",function(a,b){b.reset();for(var c=0,d=null==a,e=d?this.atomCount-1:a.nextSetBit(0);0<=e;e=d?e-1:a.nextSetBit(e+1))c++,this.isJmolDataFrameForAtom(this.atoms[e])||b.addBoundBoxPoint(this.atoms[e]);return c},"J.util.BS,J.util.BoxInfo");
$_M(c$,"calcUnitCellMinMax",($fz=function(){for(var a=0;a<this.modelCount;a++)if(this.unitCells[a].getCoordinatesAreFractional())for(var b=this.unitCells[a].getUnitCellVertices(),c=0;8>c;c++)this.boxInfo.addBoundBoxPoint(b[c])},$fz.isPrivate=!0,$fz));$_M(c$,"calcRotationRadiusBs",function(a){for(var b=this.getAtomSetCenter(a),c=0,d=a.nextSetBit(0);0<=d;d=a.nextSetBit(d+1)){var e=this.atoms[d],e=b.distance(e)+this.getRadiusVdwJmol(e);e>c&&(c=e)}return 0==c?10:c},"J.util.BS");$_M(c$,"getCenterAndPoints",
function(a,b){for(var c,d,e=b?1:0,f=a.size();0<=--f;)d=a.get(f),c=d[0],d=d[1],e+=Math.min(c.cardinality(),d.cardinality());var g=Clazz.newArray(2,e,null);b&&(g[0][0]=new J.util.P3,g[1][0]=new J.util.P3);for(f=a.size();0<=--f;){d=a.get(f);c=d[0];d=d[1];for(var h=c.nextSetBit(0),k=d.nextSetBit(0);0<=h&&0<=k;h=c.nextSetBit(h+1),k=d.nextSetBit(k+1))g[0][--e]=this.atoms[h],g[1][e]=this.atoms[k],b&&(g[0][0].add(this.atoms[h]),g[1][0].add(this.atoms[k]))}b&&(g[0][0].scale(1/(g[0].length-1)),g[1][0].scale(1/
(g[1].length-1)));return g},"J.util.JmolList,~B");$_M(c$,"getAtomSetCenter",function(a){var b=J.util.P3.new3(0,0,0),c=0;if(null!=a)for(var d=a.nextSetBit(0);0<=d;d=a.nextSetBit(d+1))this.isJmolDataFrameForAtom(this.atoms[d])||(c++,b.add(this.atoms[d]));0<c&&b.scale(1/c);return b},"J.util.BS");$_M(c$,"setAPm",function(a,b,c,d,e,f,g){this.setAPa(a,b,c,d,e,f,g);switch(b){case 1095763988:case 1632634889:this.viewer.getBoolean(603979944)&&this.assignAromaticBonds()}},"J.util.BS,~N,~N,~N,~S,~A,~A");$_M(c$,
"addStateScript",function(a,b,c,d,e,f,g){var h=this.viewer.getCurrentModelIndex();f?(this.thisStateModel!=h&&(a="frame "+(0>h?"all #"+h:this.getModelNumberDotted(h))+";\n  "+a),this.thisStateModel=h):this.thisStateModel=-1;a=new J.modelset.ModelCollection.StateScript(this.thisStateModel,a,b,c,d,e,g);a.isValid()&&this.stateScripts.addLast(a);return a},"~S,J.util.BS,J.util.BS,J.util.BS,~S,~B,~B");$_M(c$,"calculateStructuresAllExcept",function(a,b,c,d,e,f){this.freezeModels();var g="";a=J.util.BSUtil.copyInvert(a,
this.modelCount);e&&this.setDefaultStructure(a);for(var h=a.nextSetBit(0);0<=h;h=a.nextSetBit(h+1))g+=this.models[h].calculateStructures(b,c,d,e,f);e&&this.setStructureIndexes();return g},"J.util.BS,~B,~B,~B,~B,~B");$_M(c$,"setDefaultStructure",function(a){for(var b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1))this.models[b].isBioModel&&null==this.models[b].defaultStructure&&(this.models[b].defaultStructure=this.getProteinStructureState(this.models[b].bsAtoms,!1,!1,0))},"J.util.BS");$_M(c$,"setProteinType",
function(a,b){var c=-1,d=-1,e=this.getModelBitSet(a,!1);this.setDefaultStructure(e);for(var f=a.nextSetBit(0);0<=f;f=a.nextSetBit(f+1)){d!=f-1&&(c=-1);var c=this.atoms[f].group.setProteinStructureType(b,c),g=this.atoms[f].modelIndex;this.proteinStructureTainted=this.models[g].structureTainted=!0;d=f=this.atoms[f].group.lastAtomIndex}c=Clazz.newIntArray(this.modelCount,0);for(f=0;f<this.atomCount;)g=this.atoms[f].modelIndex,e.get(g)?(d=this.atoms[f].getStrucNo(),1E3>d&&d>c[g]&&(c[g]=d),f=this.atoms[f].group.lastAtomIndex+
1):f=this.models[g].firstAtomIndex+this.models[g].atomCount;for(f=0;f<this.atomCount;)g=this.atoms[f].modelIndex,e.get(g)?(1E3<this.atoms[f].getStrucNo()&&this.atoms[f].group.setStrucNo(++c[g]),f=this.atoms[f].group.lastAtomIndex+1):f=this.models[g].firstAtomIndex+this.models[g].atomCount},"J.util.BS,J.constant.EnumStructure");$_M(c$,"freezeModels",function(){for(var a=this.modelCount;0<=--a;)this.models[a].freeze()});$_M(c$,"getStructureList",function(){return this.viewer.getStructureList()});$_M(c$,
"setStructureList",function(a){for(var b=this.modelCount;0<=--b;)this.models[b].setStructureList(a)},"java.util.Map");$_M(c$,"setConformation",function(a){for(var b=this.getModelBitSet(a,!1),c=b.nextSetBit(0);0<=c;c=b.nextSetBit(c+1))this.models[c].setConformation(a);return a},"J.util.BS");$_M(c$,"getConformation",function(a,b,c){for(var d=new J.util.BS,e=this.modelCount;0<=--e;)if(e==a||0>a){var f=this.getAltLocListInModel(e),g=this.getAltLocCountInModel(e);if(!(0<b&&b>=g)){var h=this.viewer.getModelUndeletedAtomsBitSet(e);
if(0<=b&&!this.models[e].getPdbConformation(h,b))for(;0<=--g;)g!=b&&h.andNot(this.getAtomBitsMDa(1048607,f.substring(g,g+1)));0<=h.nextSetBit(0)&&(d.or(h),c&&this.models[e].setConformation(h))}}return d},"~N,~N,~B");$_M(c$,"getHeteroList",function(a){for(var b=new java.util.Hashtable,c=!1,d=this.modelCount;0<=--d;)if(0>a||d==a){var e=this.getModelAuxiliaryInfoValue(d,"hetNames");if(null!=e)for(var c=!0,f,e=e.entrySet().iterator();e.hasNext()&&((f=e.next())||1);){var g=f.getKey();b.put(g,f.getValue())}}return c?
b:this.getModelSetAuxiliaryInfoValue("hetNames")},"~N");$_M(c$,"getModelSetProperties",function(){return this.modelSetProperties});$_M(c$,"getModelSetAuxiliaryInfo",function(){return this.modelSetAuxiliaryInfo});$_M(c$,"getModelSetProperty",function(a){return null==this.modelSetProperties?null:this.modelSetProperties.getProperty(a)},"~S");$_M(c$,"getModelSetAuxiliaryInfoValue",function(a){return null==this.modelSetAuxiliaryInfo?null:this.modelSetAuxiliaryInfo.get(a)},"~S");$_M(c$,"getModelSetAuxiliaryInfoBoolean",
function(a){a=this.getModelSetAuxiliaryInfoValue(a);return Clazz.instanceOf(a,Boolean)&&a.booleanValue()},"~S");$_M(c$,"mergeTrajectories",function(a){if(null==this.trajectorySteps){if(!a)return 0;this.trajectorySteps=new J.util.JmolList}for(a=this.trajectorySteps.size();a<this.modelCount;a++)this.trajectorySteps.addLast(null);return this.modelCount},"~B");$_M(c$,"getTrajectoryIndex",function(a){return this.models[a].trajectoryBaseIndex},"~N");$_M(c$,"isTrajectory",function(a){return this.models[a].isTrajectory},
"~N");$_M(c$,"isTrajectoryMeasurement",function(a){if(null==a)return!1;for(var b=a[0],c,d=1;d<=b;d++)if(0<=(c=a[d])&&this.models[this.atoms[c].modelIndex].isTrajectory)return!0;return!1},"~A");$_M(c$,"getModelBitSet",function(a,b){for(var c=new J.util.BS,d=0,e=null==a,d=e?0:a.nextSetBit(0);0<=d&&d<this.atomCount;d=e?d+1:a.nextSetBit(d+1)){c.set(d=this.atoms[d].modelIndex);if(b)for(var f=this.models[d].trajectoryBaseIndex,g=0;g<this.modelCount;g++)this.models[g].trajectoryBaseIndex==f&&c.set(g);d=
this.models[d].firstAtomIndex+this.models[d].atomCount-1}return c},"J.util.BS,~B");$_M(c$,"getIterativeModels",function(a){for(var b=new J.util.BS,c=0;c<this.modelCount;c++)(a||!this.isJmolDataFrameForModel(c))&&this.models[c].trajectoryBaseIndex==c&&b.set(c);return b},"~B");$_M(c$,"isTrajectorySubFrame",function(a){return this.models[a].isTrajectory&&this.models[a].trajectoryBaseIndex!=a},"~N");$_M(c$,"selectDisplayedTrajectories",function(a){for(var b=0;b<this.modelCount;b++)this.models[b].isTrajectory&&
this.atoms[this.models[b].firstAtomIndex].modelIndex!=b&&a.clear(b);return a},"J.util.BS");$_M(c$,"fillAtomData",function(a,b){if(0!=(b&4)){this.getMolecules();a.bsMolecules=Array(this.molecules.length);a.atomMolecule=Clazz.newIntArray(this.atomCount,0);for(var c,d=0;d<this.molecules.length;d++){c=a.bsMolecules[d]=this.molecules[d].atomList;for(var e=c.nextSetBit(0);0<=e;e=c.nextSetBit(e+1))a.atomMolecule[e]=d}}0!=(b&8)?(c=Clazz.newIntArray(1,0),a.hAtomRadius=this.viewer.getVanderwaalsMar(1)/1E3,
a.hAtoms=this.calculateHydrogens(a.bsSelected,c,!1,!0,null),a.hydrogenAtomCount=c[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,b))},"J.atomdata.AtomData,~N");$_M(c$,"getModelNumberDotted",function(a){return 1>this.modelCount||a>=this.modelCount||
0>a?"":J.util.Escape.escapeModelFileNumber(this.modelFileNumbers[a])},"~N");$_M(c$,"getModelNumber",function(a){2147483647==a&&(a=this.modelCount-1);return this.modelNumbers[a]},"~N");$_M(c$,"getModelFileNumber",function(a){return this.modelFileNumbers[a]},"~N");$_M(c$,"getModelProperties",function(a){return this.models[a].properties},"~N");$_M(c$,"getModelProperty",function(a,b){var c=this.models[a].properties;return null==c?null:c.getProperty(b)},"~N,~S");$_M(c$,"getModelAuxiliaryInfo",function(a){return 0>
a?null:this.models[a].auxiliaryInfo},"~N");$_M(c$,"setModelAuxiliaryInfo",function(a,b,c){this.models[a].auxiliaryInfo.put(b,c)},"~N,~O,~O");$_M(c$,"getModelAuxiliaryInfoValue",function(a,b){return 0>a?null:this.models[a].auxiliaryInfo.get(b)},"~N,~S");$_M(c$,"getModelAuxiliaryInfoBoolean",function(a,b){var c=this.models[a].auxiliaryInfo;return null!=c&&c.containsKey(b)&&c.get(b).booleanValue()},"~N,~S");$_M(c$,"getModelAuxiliaryInfoInt",function(a,b){var c=this.models[a].auxiliaryInfo;return null!=
c&&c.containsKey(b)?c.get(b).intValue():-2147483648},"~N,~S");$_M(c$,"getModelAtomProperty",function(a,b){var c=this.getModelAuxiliaryInfoValue(a.modelIndex,b);if(!Clazz.instanceOf(c,Array))return"";var d=a.index-this.models[a.modelIndex].firstAtomIndex;return d<c.length?c[d].toString():""},"J.modelset.Atom,~S");$_M(c$,"getInsertionCountInModel",function(a){return this.models[a].nInsertions},"~N");$_M(c$,"getModelFileType",function(a){return this.getModelAuxiliaryInfoValue(a,"fileType")},"~N");c$.modelFileNumberFromFloat=
$_M(c$,"modelFileNumberFromFloat",function(a){var b=Clazz.doubleToInt(Math.floor(a));for(a=Clazz.doubleToInt(Math.floor(1E4*(a-b+1E-5)));0!=a&&0==a%10;)a/=10;return 1E6*b+a},"~N");$_M(c$,"getAltLocCountInModel",function(a){return this.models[a].nAltLocs},"~N");$_M(c$,"getChainCount",function(a){for(var b=0,c=this.modelCount;0<=--c;)b+=this.models[c].getChainCount(a);return b},"~B");$_M(c$,"getBioPolymerCount",function(){for(var a=0,b=this.modelCount;0<=--b;)this.isTrajectorySubFrame(b)||(a+=this.models[b].getBioPolymerCount());
return a});$_M(c$,"getBioPolymerCountInModel",function(a){return 0>a?this.getBioPolymerCount():this.isTrajectorySubFrame(a)?0:this.models[a].getBioPolymerCount()},"~N");$_M(c$,"getPolymerPointsAndVectors",function(a,b,c,d){for(var e=0;e<this.modelCount;++e)this.models[e].getPolymerPointsAndVectors(a,b,c,d)},"J.util.BS,J.util.JmolList,~B,~N");$_M(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");$_M(c$,"getPolymerLeadMidPoints",function(a,b){return this.models[a].getPolymerLeadMidPoints(b)},"~N,~N");$_M(c$,"getChainCountInModel",function(a,b){return 0>a?this.getChainCount(b):this.models[a].getChainCount(b)},"~N,~B");$_M(c$,"getGroupCount",function(){for(var a=0,b=this.modelCount;0<=--b;)a+=this.models[b].getGroupCount();return a});$_M(c$,"getGroupCountInModel",function(a){return 0>a?this.getGroupCount():this.models[a].getGroupCount()},
"~N");$_M(c$,"calcSelectedGroupsCount",function(a){for(var b=this.modelCount;0<=--b;)this.models[b].calcSelectedGroupsCount(a)},"J.util.BS");$_M(c$,"calcSelectedMonomersCount",function(a){for(var b=this.modelCount;0<=--b;)this.models[b].calcSelectedMonomersCount(a)},"J.util.BS");$_M(c$,"calcRasmolHydrogenBonds",function(a,b,c,d,e,f,g){for(var h=null==b||a.equals(b),k=this.modelCount;0<=--k;)this.models[k].isBioModel&&this.models[k].trajectoryBaseIndex==k&&(null==c&&(this.models[k].clearRasmolHydrogenBonds(a),
h||this.models[k].clearRasmolHydrogenBonds(b)),this.models[k].getRasmolHydrogenBonds(a,b,c,d,e,f,g))},"J.util.BS,J.util.BS,J.util.JmolList,~B,~N,~B,J.util.BS");$_M(c$,"calculateStraightness",function(){if(!this.getHaveStraightness()){for(var a=this.viewer.getQuaternionFrame(),b=this.viewer.getInt(553648146),c=this.modelCount;0<=--c;)this.models[c].calculateStraightness(this.viewer,"S",a,b);this.setHaveStraightness(!0)}});$_M(c$,"getAtomGroupQuaternions",function(a,b,c){for(var d=0,e=new J.util.JmolList,
f=a.nextSetBit(0);0<=f&&d<b;f=a.nextSetBit(f+1)){var g=this.atoms[f].group,h=g.getQuaternion(c);if(null==h&&(-2147483648==g.seqcode&&(h=g.getQuaternionFrame(this.atoms)),null==h))continue;d++;e.addLast(h);f=g.lastAtomIndex}return e.toArray(Array(e.size()))},"J.util.BS,~N,~S");$_M(c$,"getPdbAtomData",function(a,b){if(0==this.atomCount||0>a.nextSetBit(0))return"";null==b&&(b=new J.io.OutputStringBuilder(null));var c=this.atoms[a.nextSetBit(0)].modelIndex,d=-1,e="%6.2Q%6.2b          ";if("PQR".equals(b.type)){for(var e=
"%8.4P%7.4V       ",f=0,g=a.nextSetBit(0);0<=g;g=a.nextSetBit(g+1))f+=this.atoms[g].getPartialCharge();b.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: "+f+" e\nREMARK   6\n")}for(var g=a.length()-1,h=(f=c!=this.atoms[g].modelIndex)?null:new J.util.SB,c=this.models[c].isPdbWithMultipleBonds,
k,g=a.nextSetBit(0);0<=g;g=a.nextSetBit(g+1)){var l=this.atoms[g];f&&l.modelIndex!=d&&(-1!=d&&b.append("ENDMDL\n"),d=l.modelIndex,b.append("MODEL     "+(d+1)+"\n"));var m=l.getAtomName();k=2==l.getElementSymbol().length||4<=m.length||Character.isDigit(m.charAt(0));var n=this.models[l.modelIndex].isBioModel,m=l.isHetero();k=n?m?k?J.modelset.LabelToken.compile(this.viewer,"HETATM%5.-5i %-4.4a%1A%3.-3n %1c%4.-4R%1E   %8.3x%8.3y%8.3z"+e,"\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"+
e,"\x00",null):k?J.modelset.LabelToken.compile(this.viewer,"ATOM  %5.-5i %-4.4a%1A%3.-3n %1c%4.-4R%1E   %8.3x%8.3y%8.3z"+e,"\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"+e,"\x00",null):k?J.modelset.LabelToken.compile(this.viewer,"HETATM%5.-5i %-4.4a%1AUNK %1c   1%1E   %8.3x%8.3y%8.3z"+e,"\x00",null):J.modelset.LabelToken.compile(this.viewer,"HETATM%5.-5i  %-3.3a%1AUNK %1c   1%1E   %8.3x%8.3y%8.3z"+e,"\x00",null);var p=l.getElementSymbolIso(!1).toUpperCase();
b.append(J.modelset.LabelToken.formatLabelAtomArray(this.viewer,l,k,"\x00",null)).append(1==p.length?" "+p:p.substring(0,2)).append("  \n");if(!f&&(!n||m||c))if(n=l.getBonds(),null!=n)for(k=0;k<n.length;k++){var q=l.getAtomNumber(),r=n[k].getOtherAtom(l);if(a.get(r.index)&&(p=n[k].getCovalentOrder(),!(1==p&&c&&!m)))switch(r=r.getAtomNumber(),p){case 2:case 3:if(r<q)continue;case 1:h.append("CONECT").append(J.util.TextFormat.formatStringI("%5i","i",q));for(q=0;q<p;q++)h.append(J.util.TextFormat.formatStringI("%5i",
"i",r));h.appendC("\n")}}}f?b.append("ENDMDL\n"):b.append(h.toString());return b.toString()},"J.util.BS,J.io.OutputStringBuilder");$_M(c$,"getPdbData",function(a,b,c,d,e){this.isJmolDataFrameForModel(a)&&(a=this.getJmolDataSourceFrame(a));if(0>a)return"";var f=this.models[a].isBioModel;if(null==d&&!f)return null;var g=this.models[a];null==e&&(e=new J.io.OutputStringBuilder(null));var h=new J.util.SB,k=0<=b.indexOf("draw"),l=null,m=new J.util.BS,n="\x00",p=J.modelset.LabelToken.compile(this.viewer,
"ATOM  %-6i%4a%1A%3n %1c%4R%1E   ","\x00",null);if(null==d)n=11<b.length&&0<=b.indexOf("quaternion ")?b.charAt(11):"R",g.getPdbData(this.viewer,b,n,k,c,e,p,h,m),l=this.viewer.getModelUndeletedAtomsBitSet(a);else{l=d[0];a=d[1];var g=d[2],q=d[3],r=null!=q,s=d[4],t=d[5],u=d[6];d=d[7];e.append("REMARK   6 Jmol PDB-encoded data: ").append(b).append(";\n");e.append("REMARK   6 Jmol data").append(" min = ").append(J.util.Escape.eP(s)).append(" max = ").append(J.util.Escape.eP(t)).append(" unScaledXyz = xyz * ").append(J.util.Escape.eP(u)).append(" + ").append(J.util.Escape.eP(d)).append(";\n");
b=null;d=l.nextSetBit(0);for(s=0;0<=d;d=l.nextSetBit(d+1),s++){var t=a[s],u=g[s],v=r?q[s]:0;if(!Float.isNaN(t)&&!Float.isNaN(u)&&!Float.isNaN(v)){var w=this.atoms[d];e.append(J.modelset.LabelToken.formatLabelAtomArray(this.viewer,w,p,"\x00",null));f&&m.set(d);e.append(J.util.TextFormat.sprintf("%-8.2f%-8.2f%-10.2f    %6.3f          %2s    %s\n","ssF",[w.getElementSymbolIso(!1).toUpperCase(),"",[t,u,v,0]]));null!=b&&b.getPolymerIndexInModel()==w.getPolymerIndexInModel()&&h.append("CONECT").append(J.util.TextFormat.formatStringI("%5i",
"i",b.getAtomNumber())).append(J.util.TextFormat.formatStringI("%5i","i",w.getAtomNumber())).appendC("\n");b=w}}}e.append(h.toString());if(k)return e.toString();c.and(l);f&&e.append("\n\n"+this.getProteinStructureState(m,!1,"R"==n,1));return e.toString()},"~N,~S,J.util.BS,~A,J.io.OutputStringBuilder");$_M(c$,"isJmolDataFrameForModel",function(a){return 0<=a&&a<this.modelCount&&this.models[a].isJmolDataFrame},"~N");$_M(c$,"isJmolDataFrameForAtom",($fz=function(a){return this.models[a.modelIndex].isJmolDataFrame},
$fz.isPrivate=!0,$fz),"J.modelset.Atom");$_M(c$,"setJmolDataFrame",function(a,b,c){var d=this.models[null==a?this.models[c].dataSourceFrame:b];null==a&&(a=this.models[c].jmolFrameType);0<=b&&(null==d.dataFrames&&(d.dataFrames=new java.util.Hashtable),this.models[c].dataSourceFrame=b,this.models[c].jmolFrameType=a,d.dataFrames.put(a,Integer.$valueOf(c)));a.startsWith("quaternion")&&0>a.indexOf("deriv")&&(a=a.substring(0,a.indexOf(" ")),d.dataFrames.put(a,Integer.$valueOf(c)))},"~S,~N,~N");$_M(c$,"getJmolDataFrameIndex",
function(a,b){if(null==this.models[a].dataFrames)return-1;var c=this.models[a].dataFrames.get(b);return null==c?-1:c.intValue()},"~N,~S");$_M(c$,"clearDataFrameReference",function(a){for(var b=0;b<this.modelCount;b++){var c=this.models[b].dataFrames;if(null!=c)for(c=c.values().iterator();c.hasNext();)c.next().intValue()==a&&c.remove()}},"~N");$_M(c$,"getJmolFrameType",function(a){return 0<=a&&a<this.modelCount?this.models[a].jmolFrameType:"modelSet"},"~N");$_M(c$,"getJmolDataSourceFrame",function(a){return 0<=
a&&a<this.modelCount?this.models[a].dataSourceFrame:-1},"~N");$_M(c$,"saveModelOrientation",function(a,b){this.models[a].orientation=b},"~N,J.viewer.StateManager.Orientation");$_M(c$,"getModelOrientation",function(a){return this.models[a].orientation},"~N");$_M(c$,"getPDBHeader",function(a){return this.models[a].isBioModel?this.models[a].getFullPDBHeader():this.getFileHeader(a)},"~N");$_M(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");$_M(c$,"getAltLocIndexInModel",function(a,b){if("\x00"==b)return 0;var c=this.getAltLocListInModel(a);return 0==c.length?0:c.indexOf(b)+1},"~N,~S");$_M(c$,"getInsertionCodeIndexInModel",function(a,b){if("\x00"==b)return 0;var c=this.getInsertionListInModel(a);return 0==c.length?0:c.indexOf(b)+1},"~N,~S");$_M(c$,"getAltLocListInModel",function(a){if(0>a)return"";a=
this.getModelAuxiliaryInfoValue(a,"altLocs");return null==a?"":a},"~N");$_M(c$,"getInsertionListInModel",($fz=function(a){a=this.getModelAuxiliaryInfoValue(a,"insertionCodes");return null==a?"":a},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"getModelSymmetryCount",function(a){var b;return 0<this.models[a].biosymmetryCount||null==this.unitCells||null==this.unitCells[a]||null==(b=this.unitCells[a].getSymmetryOperations())?this.models[a].biosymmetryCount:b.length},"~N");$_M(c$,"getSymmetryOperation",function(a,
b,c,d,e,f,g){a=this.getSymTemp(!0).getSpaceGroupInfo(this,a,b,c,d,e,f);return null==a?"":this.symTemp.getSymmetryOperationInfo(a,c,f,g)},"~N,~S,~N,J.util.P3,J.util.P3,~S,~B");$_M(c$,"getModelCellRange",function(a){return null==this.unitCells?null:this.unitCells[a].getCellRange()},"~N");$_M(c$,"modelHasVibrationVectors",function(a){if(null!=this.vibrationVectors)for(var b=this.atomCount;0<=--b;)if((0>a||this.atoms[b].modelIndex==a)&&null!=this.vibrationVectors[b]&&0<this.vibrationVectors[b].length())return!0;
return!1},"~N");$_M(c$,"getElementsPresentBitSet",function(a){if(0<=a)return this.elementsPresent[a];a=new J.util.BS;for(var b=0;b<this.modelCount;b++)a.or(this.elementsPresent[b]);return a},"~N");$_M(c$,"getSymmetryInfoAsStringForModel",($fz=function(a){a=this.getUnitCell(a);return null==a?"no symmetry information":a.getSymmetryInfoString()},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"getMoleculeIndex",function(a,b){0==this.moleculeCount&&this.getMolecules();for(var c=0;c<this.moleculeCount;c++)if(this.molecules[c].atomList.get(a))return b?
this.molecules[c].indexInModel:c;return 0},"~N,~B");$_M(c$,"getMoleculeBitSet",function(a){0==this.moleculeCount&&this.getMolecules();var b=J.util.BSUtil.copy(a);a=J.util.BSUtil.copy(a);for(var c=0,d=new J.util.BS;0<=(c=a.length()-1);)d=this.getMoleculeBitSetForAtom(c),null==d?(a.clear(c),b.clear(c)):(a.andNot(d),b.or(d));return b},"J.util.BS");$_M(c$,"getMoleculeBitSetForAtom",function(a){0==this.moleculeCount&&this.getMolecules();for(var b=0;b<this.moleculeCount;b++)if(this.molecules[b].atomList.get(a))return this.molecules[b].atomList;
return null},"~N");$_M(c$,"getModelDipole",function(a){if(0>a)return null;var b=this.getModelAuxiliaryInfoValue(a,"dipole");null==b&&(b=this.getModelAuxiliaryInfoValue(a,"DIPOLE_VEC"));return b},"~N");$_M(c$,"calculateMolecularDipole",function(a){if(null==this.partialCharges||0>a)return null;for(var b=0,c=0,d=0,e=0,f=new J.util.V3,g=new J.util.V3,h=0;h<this.atomCount;h++)if(this.atoms[h].modelIndex==a){var k=this.partialCharges[h];0>k?(c++,e+=k,g.scaleAdd2(k,this.atoms[h],g)):0<k&&(b++,d+=k,f.scaleAdd2(k,
this.atoms[h],f))}if(0==c||0==b)return null;f.scale(1/d);g.scale(1/e);f.sub(g);J.util.Logger.warn("CalculateMolecularDipole: this is an approximate result -- needs checking");f.scale(4.8*d);return f},"~N");$_M(c$,"getMoleculeCountInModel",function(a){var b=0;0==this.moleculeCount&&this.getMolecules();if(0>a)return this.moleculeCount;for(var c=0;c<this.modelCount;c++)a==c&&(b+=this.models[c].moleculeCount);return b},"~N");$_M(c$,"calcSelectedMoleculesCount",function(a){0==this.moleculeCount&&this.getMolecules();
this.selectedMolecules.xor(this.selectedMolecules);this.selectedMoleculeCount=0;for(var b=new J.util.BS,c=0;c<this.moleculeCount;c++)J.util.BSUtil.copy2(a,b),b.and(this.molecules[c].atomList),0<b.length()&&(this.selectedMolecules.set(c),this.selectedMoleculeCount++)},"J.util.BS");$_M(c$,"setCentroid",function(a,b,c){var d=this.getUnitCell(this.atoms[a].modelIndex);null!=d&&d.setCentroid(this,a,b,c)},"~N,~N,~A");$_M(c$,"getMolecules",function(){if(0<this.moleculeCount)return this.molecules;null==this.molecules&&
(this.molecules=Array(4));this.moleculeCount=0;for(var a=null,b=Array(this.modelCount),c=null,d=0;d<this.modelCount;d++)b[d]=this.viewer.getModelUndeletedAtomsBitSet(d),a=this.models[d],a.moleculeCount=0,c=a.getBioBranches(c);this.molecules=J.util.JmolMolecule.getMolecules(this.atoms,b,c,null);for(d=this.moleculeCount=this.molecules.length;0<=--d;)a=this.models[this.molecules[d].modelIndex],a.firstMoleculeIndex=d,a.moleculeCount++;return this.molecules});$_M(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 b=J.util.BSUtil.newBitSet(this.modelCount),c=this.atomCount;0<=--c;){var d=this.atoms[c];!d.isDeleted()&&!this.isTrajectorySubFrame(d.modelIndex)&&(a.addTuple(this.models[d.modelIndex].trajectoryBaseIndex,d),b.set(d.modelIndex))}this.showRebondTimes&&(J.util.Logger.checkTimer("build bspf",!1),a.stats());
for(c=b.nextSetBit(0);0<=c;c=b.nextSetBit(c+1))a.validateModel(c,!0);a.validate(!0);this.bspf=a}});$_M(c$,"initializeBspt",function(a){this.initializeBspf();this.bspf.isInitializedIndex(a)||this.bspf.initialize(a,this.atoms,this.viewer.getModelUndeletedAtomsBitSet(a))},"~N");$_M(c$,"setIteratorForPoint",function(a,b,c,d){0>b?a.setCenter(c,d):(this.initializeBspt(b),a.setModel(this,b,this.models[b].firstAtomIndex,2147483647,c,d,null))},"J.api.AtomIndexIterator,~N,J.util.P3,~N");$_M(c$,"setIteratorForAtom",
function(a,b,c,d,e){0>b&&(b=this.atoms[c].modelIndex);b=this.models[b].trajectoryBaseIndex;this.initializeBspt(b);a.setModel(this,b,this.models[b].firstAtomIndex,c,this.atoms[c],d,e)},"J.api.AtomIndexIterator,~N,~N,~N,J.atomdata.RadiusData");$_M(c$,"getSelectedAtomIterator",function(a,b,c,d,e){this.initializeBspf();if(e){e=this.getModelBitSet(a,!1);for(var f=e.nextSetBit(0);0<=f;f=e.nextSetBit(f+1))this.initializeBspt(f);e=new J.modelset.AtomIteratorWithinModelSet(e)}else e=new J.modelset.AtomIteratorWithinModel;
e.initialize(this.bspf,a,b,c,d,this.viewer.isParallel());return e},"J.util.BS,~B,~B,~B,~B");Clazz.overrideMethod(c$,"getBondCountInModel",function(a){return 0>a?this.bondCount:this.models[a].getBondCount()},"~N");$_M(c$,"calculateStruts",function(a,b){this.makeConnections2(0,3.4028235E38,32768,12291,a,b,null,!1,!1,0);var c=a.nextSetBit(0);if(0>c)return 0;c=this.models[this.atoms[c].modelIndex];return c.isBioModel?c.calculateStruts(this,a,b):0},"J.util.BS,J.util.BS");$_M(c$,"getAtomCountInModel",function(a){return 0>
a?this.atomCount:this.models[a].atomCount},"~N");$_M(c$,"getModelAtomBitSetIncludingDeletedBs",function(a){var b=new J.util.BS;null==a&&null==this.bsAll&&(this.bsAll=J.util.BSUtil.setAll(this.atomCount));if(null==a)b.or(this.bsAll);else for(var c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))b.or(this.getModelAtomBitSetIncludingDeleted(c,!1));return b},"J.util.BS");$_M(c$,"getModelAtomBitSetIncludingDeleted",function(a,b){var c=0>a?this.bsAll:this.models[a].bsAtoms;null==c&&(c=this.bsAll=J.util.BSUtil.setAll(this.atomCount));
return b?J.util.BSUtil.copy(c):c},"~N,~B");$_M(c$,"getAtomBitsMaybeDeleted",function(a,b){var c,d,e;switch(a){default:return this.getAtomBitsMDa(a,b);case 1678770178:case 1048585:return this.getAtomBitsMDb(a,b);case 1073741864:return this.getBasePairBits(b);case 1679429641:e=this.getBoxInfo(b,1);d=this.getAtomsWithin(e.getBoundBoxCornerVector().length()+1E-4,e.getBoundBoxCenter(),null,-1);for(c=d.nextSetBit(0);0<=c;c=d.nextSetBit(c+1))e.isWithin(this.atoms[c])||d.clear(c);return d;case 1095761925:d=
new J.util.BS;c=b;var f=J.util.P3.new3(c[0]/1E3,c[1]/1E3,c[2]/1E3);e=new J.util.P3;var g=!this.viewer.getBoolean(603979848);for(c=this.atomCount;0<=--c;)this.isInLatticeCell(c,f,e,g)&&d.set(c);return d;case 1095761934:return this.getMoleculeBitSet(b);case 1087373320:return this.getSequenceBits(b,null);case 1048615:c=b;e=c[0];f=c[1];g=String.fromCharCode(c[2]);d=new J.util.BS;var h=this.viewer.getBoolean(603979822);h||(g=Character.toUpperCase(g));for(c=this.modelCount;0<=--c;)this.models[c].isBioModel&&
this.models[c].selectSeqcodeRange(e,f,g,d,h);return d;case 3145772:d=J.util.BSUtil.newBitSet(this.atomCount);e=-1;f=0;for(c=this.atomCount;0<=--c;)if(h=this.atoms[c],g=h.getAtomSymmetry(),null!=g){if(h.modelIndex!=e){e=h.modelIndex;if(null==this.getModelCellRange(e))continue;f=this.getModelSymmetryCount(e)}for(var h=0,k=f;0<=--k;)if(g.get(k)&&1<++h){d.set(c);break}}return d;case 1089470478:return J.util.BSUtil.copy(null==this.bsSymmetry?this.bsSymmetry=J.util.BSUtil.newBitSet(this.atomCount):this.bsSymmetry);
case 1614417948:d=new J.util.BS;if(null==this.viewer.getCurrentUnitCell())return d;f=J.util.P3.new3(1,1,1);e=new J.util.P3;for(c=this.atomCount;0<=--c;)this.isInLatticeCell(c,f,e,!1)&&d.set(c);return d}},"~N,~O");$_M(c$,"isInLatticeCell",($fz=function(a,b,c,d){var e=this.getUnitCell(this.atoms[a].modelIndex);if(null==e)return!1;c.setT(this.atoms[a]);e.toFractional(c,d);return c.x<b.x-1-0.02||c.x>b.x+0.02||c.y<b.y-1-0.02||c.y>b.y+0.02||c.z<b.z-1-0.02||c.z>b.z+0.02?!1:!0},$fz.isPrivate=!0,$fz),"~N,J.util.P3,J.util.P3,~B");
$_M(c$,"getAtomsWithinRD",function(a,b,c,d){var e=new J.util.BS,f=this.getIterativeModels(!1);b=J.util.BSUtil.andNot(b,this.viewer.getDeletedAtoms());var g=this.getSelectedAtomIterator(null,!1,!1,!1,!1);if(c)for(c=b.nextSetBit(0);0<=c;c=b.nextSetBit(c+1))for(var h=this.modelCount;0<=--h;)f.get(h)&&(0>a?this.getAtomsWithin(a,this.atoms[c].getFractionalUnitCoordPt(!0),e,-1):(this.setIteratorForAtom(g,h,c,a,d),g.addAtoms(e)));else{e.or(b);for(c=b.nextSetBit(0);0<=c;c=b.nextSetBit(c+1))0>a?this.getAtomsWithin(a,
this.atoms[c],e,this.atoms[c].modelIndex):(this.setIteratorForAtom(g,-1,c,a,d),g.addAtoms(e))}g.release();return e},"~N,J.util.BS,~B,J.atomdata.RadiusData");$_M(c$,"getGroupsWithin",function(a,b){for(var c=this.getIterativeModels(!1),d=new J.util.BS,e=this.modelCount;0<=--e;)c.get(e)&&this.models[e].isBioModel&&this.models[e].getGroupsWithin(a,b,d);return d},"~N,J.util.BS");$_M(c$,"getAtomsWithin",function(a,b,c,d){null==c&&(c=new J.util.BS);if(0>a){a=-a;for(var e=new J.util.P3,f=new J.util.P3,g=
this.atomCount;0<=--g;){var h=this.atoms[g];0<=d&&this.atoms[g].modelIndex!=d||!c.get(g)&&h.getFractionalUnitDistance(b,e,f)<=a&&c.set(h.index)}return c}d=this.getIterativeModels(!0);e=this.getSelectedAtomIterator(null,!1,!1,!1,!1);for(f=this.modelCount;0<=--f;)d.get(f)&&(this.setIteratorForAtom(e,-1,this.models[f].firstAtomIndex,-1,null),e.setCenter(b,a),e.addAtoms(c));e.release();return c},"~N,J.util.P3,J.util.BS,~N");$_M(c$,"getBasePairBits",($fz=function(a){var b=new J.util.BS;if(0!=a.length%
2)return b;var c=null,d=null,b=new J.util.JmolList;if(0==a.length)c=d=this.viewer.getModelUndeletedAtomsBitSet(-1),this.calcRasmolHydrogenBonds(c,d,b,!0,1,!1,null);else for(var e=0;e<a.length;)c=this.getSequenceBits(a.substring(e,++e),null),0!=c.cardinality()&&(d=this.getSequenceBits(a.substring(e,++e),null),0!=d.cardinality()&&this.calcRasmolHydrogenBonds(c,d,b,!0,1,!1,null));a=new J.util.BS;for(e=b.size();0<=--e;)c=b.get(e),a.set(c.atom1.index),a.set(c.atom2.index);return this.getAtomBitsMDb(1087373318,
a)},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"getSequenceBits",function(a,b){null==b&&(b=this.viewer.getModelUndeletedAtomsBitSet(-1));var c=new J.util.BS;if(0<a.length)for(var d=0;d<this.modelCount;++d)this.models[d].isBioModel&&this.models[d].getSequenceBits(a,b,c);return c},"~S,J.util.BS");$_M(c$,"deleteBonds",function(a,b){if(!b)for(var c=new J.util.BS,d=new J.util.BS,e=a.nextSetBit(0);0<=e;e=a.nextSetBit(e+1)){var f=this.bonds[e].atom1;this.models[f.modelIndex].isModelKit||(c.clearAll(),d.clearAll(),
c.set(f.index),d.set(this.bonds[e].getAtomIndex2()),this.addStateScript("connect ",null,c,d,"delete",!1,!0))}this.dBb(a,b)},"J.util.BS,~B");$_M(c$,"makeConnections2",function(a,b,c,d,e,f,g,h,k,l){null==g&&(g=new J.util.BS);var m=65535==c,n=131071==c;n&&(c=1);var p=J.modelset.Bond.isOrderH(c),q=!1,r=!1,s=!1,t=!1,u=a*a,v=b*b;switch(d){case 12291:return this.deleteConnections(a,b,c,e,f,h,n,u,v);case 603979874:case 1073741852:if(515!=c)return this.autoBond(e,f,g,h,p,603979874==d);t=r=!0;break;case 1087373321:q=
!0;break;case 1073742025:r=!0;break;case 1073741904:s=!0}this.defaultCovalentMad=this.viewer.getMadBond();d=0>a;n=0>b;d&&(a=-a);n&&(b=-b);for(var w=this.getDefaultMadFromOrder(c),z=0,B=0,x=null,y=h?1:this.atomCount,A=null,C=null,D=0,E=0,R=c|131072,H=e.nextSetBit(0);0<=H;H=e.nextSetBit(H+1)){if(h)x=this.bonds[H],A=x.atom1,C=x.atom2;else if(A=this.atoms[H],A.isDeleted())continue;for(var L=h?y:f.nextSetBit(0);0<=L;L=h?L-1:f.nextSetBit(L+1)){if(!h){if(L==H)continue;C=this.atoms[L];if(A.modelIndex!=C.modelIndex||
C.isDeleted())continue;if(A.alternateLocationID!=C.alternateLocationID&&"\x00"!=A.alternateLocationID&&"\x00"!=C.alternateLocationID)continue;x=A.getBond(C)}if(!(null==x&&(q||r)||null!=x&&s)){var F=A.distanceSquared(C);if(d||n)D=A.distance(C),E=A.getBondingRadiusFloat()+C.getBondingRadiusFloat();if(!(d?D<E*a:F<u)&&!(n?D>E*b:F>v))if(null!=x){if(!q&&!m&&(x.setOrder(c),this.bsAromatic.clear(x.index)),!q||m||c==x.order||R==x.order||p&&x.isHydrogen())g.set(x.index),B++}else g.set(this.bondAtoms(A,C,c,
w,g,l,k,!0).index),z++}}}t&&this.assignAromaticBondsBs(!0,g);q||this.shapeManager.setShapeSizeBs(1,-2147483648,null,g);return[z,B]},"~N,~N,~N,~N,J.util.BS,J.util.BS,J.util.BS,~B,~B,~N");$_M(c$,"autoBondBs4",function(a,b,c,d,e,f){if(f)return this.autoBond_Pre_11_9_24(a,b,c,d,e);if(0==this.atomCount)return 0;0==e&&(e=1);1.4E-45==this.maxBondingRadius&&this.findMaxRadii();f=this.viewer.getFloat(570425348);var g=this.viewer.getFloat(570425364),g=g*g,h=0;this.showRebondTimes&&J.util.Logger.startTimer("autobond");
var k=-1,l=null==a,m,n;l?(n=0,m=null):(a.equals(b)?m=a:(m=J.util.BSUtil.copy(a),m.or(b)),n=m.nextSetBit(0));for(var p=this.getSelectedAtomIterator(null,!1,!1,!0,!1);0<=n&&n<this.atomCount;n=l?n+1:m.nextSetBit(n+1)){var q=l||a.get(n),r=l||b.get(n),s=this.atoms[n];if(!s.isDeleted()){var t=s.modelIndex;if(t!=k&&(k=t,this.isJmolDataFrameForModel(t))){n=this.models[t].firstAtomIndex+this.models[t].atomCount-1;continue}t=s.getBondingRadiusFloat();if(0!=t){var u=null!=c&&c.get(n);for(this.setIteratorForAtom(p,
-1,n,t+this.maxBondingRadius+f,null);p.hasNext();){var v=this.atoms[p.next()];if(!v.isDeleted()){var w=v.index,z=l||a.get(w),B=l||b.get(w);!z&&!B||(!(q&&B||r&&z)||u&&c.get(w))||(w=J.modelset.BondCollection.getBondOrderFull(t,v.getBondingRadiusFloat(),p.foundDistance2(),g,f),0<w&&this.checkValencesAndBond(s,v,w,e,d)&&h++)}}p.release()}}}this.showRebondTimes&&J.util.Logger.checkTimer("autoBond",!1);return h},"J.util.BS,J.util.BS,J.util.BS,J.util.BS,~N,~B");$_M(c$,"autoBond_Pre_11_9_24",($fz=function(a,
b,c,d,e){if(0==this.atomCount)return 0;0==e&&(e=1);1.4E-45==this.maxBondingRadius&&this.findMaxRadii();var f=this.viewer.getFloat(570425348),g=this.viewer.getFloat(570425364),g=g*g,h=0;this.initializeBspf();for(var k=-1,l=this.atomCount;0<=--l;){var m=null==a||a.get(l),n=null==b||b.get(l);if(m||n){var p=this.atoms[l];if(!p.isDeleted()){var q=p.modelIndex;if(q!=k&&(k=q,this.isJmolDataFrameForModel(q))){for(;0<=--l&&this.atoms[l].modelIndex==q;);l++;continue}var r=p.getBondingRadiusFloat();if(0!=r){var s=
r+this.maxBondingRadius+f;this.initializeBspt(q);q=this.bspf.getCubeIterator(q);for(q.initialize(p,s,!0);q.hasMoreElements();)if(s=q.nextElement(),!(s===p||s.isDeleted())){var t=s.index,u=null==a||a.get(t),v=null==b||b.get(t);if(!(!u&&!v||null!=c&&c.get(t)&&c.get(l)))if(m&&v||n&&u)t=J.modelset.BondCollection.getBondOrderFull(r,s.getBondingRadiusFloat(),q.foundDistance2(),g,f),0<t&&this.checkValencesAndBond(p,s,t,e,d)&&h++}q.release()}}}}return h},$fz.isPrivate=!0,$fz),"J.util.BS,J.util.BS,J.util.BS,J.util.BS,~N");
$_M(c$,"autoBond",($fz=function(a,b,c,d,e,f){if(d){d=a;a=new J.util.BS;b=new J.util.BS;for(var g=d.nextSetBit(0);0<=g;g=d.nextSetBit(g+1))a.set(this.bonds[g].atom1.index),b.set(this.bonds[g].atom2.index)}return[e?this.autoHbond(a,b,!1):this.autoBondBs4(a,b,null,c,this.viewer.getMadBond(),f),0]},$fz.isPrivate=!0,$fz),"J.util.BS,J.util.BS,J.util.BS,~B,~B,~B");$_M(c$,"autoHbond",function(a,b,c){if(c){for(var d=this.getModelBitSet(a,!1),e=d.nextSetBit(0);0<=e&&c;e=d.nextSetBit(e+1))c=!this.models[e].hasRasmolHBonds;
if(c)return 0}c=!1;for(e=a.nextSetBit(0);0<=e;e=a.nextSetBit(e+1))if(1==this.atoms[e].getElementNumber()){c=!0;break}d=new J.util.BS;e=this.viewer.getBoolean(603979853);if(null==b||e&&!c)return J.util.Logger.info((null==b?"DSSP ":"RasMol")+" pseudo-hbond calculation"),this.calcRasmolHydrogenBonds(a,b,null,!1,2147483647,!1,d),-J.util.BSUtil.cardinalityOf(d);J.util.Logger.info(c?"Standard Hbond calculation":"Jmol pseudo-hbond calculation");var f=null;if(!c){f=new J.util.BS;for(e=a.nextSetBit(0);0<=
e;e=a.nextSetBit(e+1))switch(this.atoms[e].atomID){case 64:case 4:case 14:case 15:case 16:case 17:f.set(e)}}var g=this.viewer.getFloat(570425361),h=3.141592653589793*this.viewer.getFloat(570425360)/180,k=g*g,l=J.modelset.ModelCollection.hbondMin*J.modelset.ModelCollection.hbondMin,m=g>J.modelset.ModelCollection.hbondMin?l:k,n=g>J.modelset.ModelCollection.hbondMin?J.modelset.ModelCollection.hbondMin:g,p=0,q=0,r=new J.util.V3,s=new J.util.V3;this.showRebondTimes&&J.util.Logger.debugging&&J.util.Logger.startTimer("hbond");
var t=null,u=null;b=this.getSelectedAtomIterator(b,!1,!1,!1,!1);for(e=a.nextSetBit(0);0<=e;e=a.nextSetBit(e+1)){var v=this.atoms[e],w=v.getElementNumber(),z=1==w;if(!(!z&&(c||7!=w&&8!=w)||z&&!c)){var B,x,y;if(z){w=v.bonds;if(null==w)continue;y=!1;for(B=0;B<w.length&&!y;B++)y=w[B].getOtherAtom(v).getElementNumber(),y=7==y||8==y;if(!y)continue;x=n;w=1;B=m;y=!1}else x=g,w=l,B=k,y=f.get(e);for(this.setIteratorForAtom(b,-1,v.index,x,null);b.hasNext();){x=this.atoms[b.next()];var A=x.getElementNumber();
if(!(x===v||!z&&7!=A&&8!=A||z&&1==A||(q=b.foundDistance2())<w||q>B||y&&f.get(x.index)||v.isBonded(x))){if(0<h){r.sub2(v,x);if(null==(u=J.modelset.ModelCollection.checkMinAttachedAngle(v,h,r,s,c)))continue;r.scale(-1);if(null==(t=J.modelset.ModelCollection.checkMinAttachedAngle(x,h,r,s,c)))continue}var A=0,C;z&&!Float.isNaN(t.x)&&!Float.isNaN(u.x)?(C=4096,A=J.modelset.HBond.getEnergy(Math.sqrt(q),t.distance(v),t.distance(u),x.distance(u))/1E3):C=2048;d.set(this.addHBond(v,x,C,A));p++}}}}b.release();
this.shapeManager.setShapeSizeBs(1,-2147483648,null,d);this.showRebondTimes&&J.util.Logger.checkTimer("hbond",!1);return c?p:-p},"J.util.BS,J.util.BS,~B");c$.checkMinAttachedAngle=$_M(c$,"checkMinAttachedAngle",($fz=function(a,b,c,d,e){var f=a.bonds;if(null==f||0==f.length)return J.util.P3.new3(NaN,0,0);for(var g=null,h=3.4028235E38,k=f.length;0<=--k;)if(f[k].isCovalent()){var l=f[k].getOtherAtom(a);if(e||1!=l.getElementNumber()){d.sub2(a,l);var m=d.angle(c);if(m<b)return null;m<h&&(g=l,h=m)}}return g},
$fz.isPrivate=!0,$fz),"J.modelset.Atom,~N,J.util.V3,J.util.V3,~B");$_M(c$,"setStructureIndexes",function(){for(var a,b=0,c=-1,d=-1,e=-1,f=0;f<this.atomCount;f++){if((d=this.atoms[f].modelIndex)!=e)b=0,e=d,c=-1;if((a=this.atoms[f].getStrucNo())!=c&&0!=a)this.atoms[f].getGroup().setStrucNo(++b),c=b}});$_M(c$,"getProteinStructureState",function(a,b,c,d){if(!this.isPDB)return"";for(var e=0;e<this.modelCount;e++)if(this.models[e].isBioModel)return this.models[e].getProteinStructureState(a,b,c,d);return""},
"J.util.BS,~B,~B,~N");$_M(c$,"getModelInfoAsString",function(){var a=(new J.util.SB).append('<models count="');a.appendI(this.modelCount).append('" modelSetHasVibrationVectors="').append(this.modelSetHasVibrationVectors()+'">\n<properties>');if(null!=this.modelSetProperties){for(var b=this.modelSetProperties.propertyNames();b.hasMoreElements();){var c=b.nextElement();a.append('\n <property name="').append(c).append('" value=').append(J.util.Escape.eS(this.modelSetProperties.getProperty(c))).append(" />")}a.append("\n</properties>")}for(b=
0;b<this.modelCount;++b)a.append('\n<model index="').appendI(b).append('" n="').append(this.getModelNumberDotted(b)).append('" id=').append(J.util.Escape.eS(""+this.getModelAuxiliaryInfoValue(b,"modelID"))),c=this.viewer.getJDXBaseModelIndex(b),c!=b&&a.append(" baseModelId=").append(J.util.Escape.eS(this.getModelAuxiliaryInfoValue(c,"jdxModelID"))),a.append(" name=").append(J.util.Escape.eS(this.getModelName(b))).append(" title=").append(J.util.Escape.eS(this.getModelTitle(b))).append(' hasVibrationVectors="').appendB(this.modelHasVibrationVectors(b)).append('" />');
a.append("\n</models>");return a.toString()});$_M(c$,"getSymmetryInfoAsString",function(){for(var a=(new J.util.SB).append("Symmetry Information:"),b=0;b<this.modelCount;++b)a.append("\nmodel #").append(this.getModelNumberDotted(b)).append("; name=").append(this.getModelName(b)).append("\n").append(this.getSymmetryInfoAsStringForModel(b));return a.toString()});$_M(c$,"getAtomsConnected",function(a,b,c,d){for(var e=new J.util.BS,f=Clazz.newIntArray(this.atomCount,0),g,h=30720==c,k=65535==c,l=0;l<this.bondCount;l++){var m=
this.bonds[l];if(k||m.is(c)||h&&m.isHydrogen())d.get(m.atom1.index)&&(f[g=m.atom2.index]++,e.set(g)),d.get(m.atom2.index)&&(f[g=m.atom1.index]++,e.set(g))}c=0==a;for(g=this.atomCount;0<=--g;)d=f[g],d<a||d>b?e.clear(g):c&&0==d&&e.set(g);return e},"~N,~N,~N,J.util.BS");$_M(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()});$_M(c$,"getSymTemp",function(a){if(null==
this.symTemp||a)this.symTemp=J.api.Interface.getOptionInterface("symmetry.Symmetry");return this.symTemp},"~B");$_M(c$,"createModels",function(a){a=this.modelCount+a;var b=J.util.ArrayUtil.arrayCopyObject(this.models,a);this.validateBspf(!1);this.modelNumbers=J.util.ArrayUtil.arrayCopyI(this.modelNumbers,a);this.modelFileNumbers=J.util.ArrayUtil.arrayCopyI(this.modelFileNumbers,a);this.modelNumbersForAtomLabel=J.util.ArrayUtil.arrayCopyS(this.modelNumbersForAtomLabel,a);this.modelNames=J.util.ArrayUtil.arrayCopyS(this.modelNames,
a);this.frameTitles=J.util.ArrayUtil.arrayCopyS(this.frameTitles,a);for(var c=Clazz.doubleToInt(this.getModelFileNumber(this.modelCount-1)/1E6)+1,d=this.modelCount,e=0;d<a;d++)this.modelNumbers[d]=d+this.modelCount,this.modelFileNumbers[d]=1E6*c+ ++e,this.modelNumbersForAtomLabel[d]=this.modelNames[d]=c+"."+e;this.thisStateModel=-1;c=this.getModelSetAuxiliaryInfoValue("group3Lists");null!=c&&(d=this.getModelSetAuxiliaryInfoValue("group3Counts"),c=J.util.ArrayUtil.arrayCopyS(c,a),d=J.util.ArrayUtil.arrayCopyII(d,
a),this.modelSetAuxiliaryInfo.put("group3Lists",c),this.modelSetAuxiliaryInfo.put("group3Counts",d));this.unitCells=J.util.ArrayUtil.arrayCopyObject(this.unitCells,a);for(d=this.modelCount;d<a;d++)b[d]=new J.modelset.Model(this,d,-1,null,null,null),b[d].loadState=" model create #"+d+";";this.models=b;this.modelCount=a},"~N");$_M(c$,"deleteModel",function(a,b,c,d,e){if(0>a)this.validateBspf(!1),this.bsAll=null,this.resetMolecules(),this.isBbcageDefault=!1,this.calcBoundBoxDimensions(null,1);else{this.modelNumbers=
J.util.ArrayUtil.deleteElements(this.modelNumbers,a,1);this.modelFileNumbers=J.util.ArrayUtil.deleteElements(this.modelFileNumbers,a,1);this.modelNumbersForAtomLabel=J.util.ArrayUtil.deleteElements(this.modelNumbersForAtomLabel,a,1);this.modelNames=J.util.ArrayUtil.deleteElements(this.modelNames,a,1);this.frameTitles=J.util.ArrayUtil.deleteElements(this.frameTitles,a,1);this.thisStateModel=-1;var f=this.getModelSetAuxiliaryInfoValue("group3Lists"),g=this.getModelSetAuxiliaryInfoValue("group3Counts"),
h=a+1;if(null!=f&&null!=f[h])for(var k=Clazz.doubleToInt(f[h].length/6);0<=--k;)0<g[h][k]&&(g[0][k]-=g[h][k],0==g[0][k]&&(f[0]=f[0].substring(0,6*k)+",["+f[0].substring(6*k+2)));null!=f&&(this.modelSetAuxiliaryInfo.put("group3Lists",J.util.ArrayUtil.deleteElements(f,a,1)),this.modelSetAuxiliaryInfo.put("group3Counts",J.util.ArrayUtil.deleteElements(g,a,1)));null!=this.unitCells&&(this.unitCells=J.util.ArrayUtil.deleteElements(this.unitCells,a,1));for(k=this.stateScripts.size();0<=--k;)this.stateScripts.get(k).deleteAtoms(a,
e,d)||this.stateScripts.remove(k);this.deleteModelAtoms(b,c,d);this.viewer.deleteModelAtoms(b,c,d)}},"~N,~N,~N,J.util.BS,J.util.BS");$_M(c$,"getMoInfo",function(a){for(var b=new J.util.SB,c=0;c<this.modelCount;c++)if(!(0<=a&&c!=a)){var d=this.viewer.getModelAuxiliaryInfoValue(c,"moData");if(null!=d){var d=d.get("mos"),e=null==d?0:d.size();if(0!=e)for(;0<=--e;){var f=d.get(e),g=f.get("type");null==g&&(g="");var h=f.get("energyUnits");null==h&&(h="");var k=f.get("occupancy");null!=k&&(g="occupancy "+
k.floatValue()+" "+g);k=f.get("symmetry");null!=k&&(g+=k);k=""+f.get("energy");Float.isNaN(J.util.Parser.parseFloatStr(k))?b.append(J.util.TextFormat.sprintf("model %-2s;  mo %-2i # %s\n","sis",[this.getModelNumberDotted(c),Integer.$valueOf(e+1),g])):b.append(J.util.TextFormat.sprintf("model %-2s;  mo %-2i # energy %-8.3f %s %s\n","sifss",[this.getModelNumberDotted(c),Integer.$valueOf(e+1),f.get("energy"),h,g]))}}}return b.toString()},"~N");$_M(c$,"assignAtom",function(a,b,c){null==b&&(b="C");var d=
this.atoms[a],e=new J.util.BS,f=1==d.getElementNumber(),e=J.util.Elements.elementNumberFromSymbol(b,!0),g=!1;if(0<e)this.setElement(d,e),this.viewer.setShapeSizeRD(0,this.viewer.getDefaultRadiusData(),J.util.BSUtil.newAndSetBit(a)),this.setAtomName(a,b+d.getAtomNumber()),this.models[d.modelIndex].isModelKit||this.taintAtom(a,0);else if(b.equals("Pl"))d.setFormalCharge(d.getFormalCharge()+1);else if(b.equals("Mi"))d.setFormalCharge(d.getFormalCharge()-1);else if(b.equals("X"))g=!0;else if(!b.equals("."))return;
this.removeUnnecessaryBonds(d,g);b=0;1==d.getCovalentBondCount()&&(f?b=1.5:!f&&1==e&&(b=1));0!=b&&(f=J.util.V3.newV(d),f.sub(this.atoms[d.getBondedAtomIndex(0)]),g=f.length(),f.normalize(),f.scale(b-g),this.setAtomCoordRelative(a,f.x,f.y,f.z));a=J.util.BSUtil.newAndSetBit(a);1!=e&&c&&(this.validateBspf(!1),e=this.getAtomsWithinRD(1,a,!1,null),e.andNot(a),0<=e.nextSetBit(0)&&this.viewer.deleteAtoms(e,!1),e=this.viewer.getModelUndeletedAtomsBitSet(d.modelIndex),e.andNot(this.getAtomBitsMDa(1613758476,
null)),this.makeConnections2(0.1,1.8,1,1073741904,a,e,null,!1,!1,0));this.viewer.addHydrogens(a,!1,!0)},"~N,~S,~B");$_M(c$,"deleteAtoms",function(a){if(null!=a){for(var b=new J.util.BS,c=a.nextSetBit(0);0<=c&&c<this.atomCount;c=a.nextSetBit(c+1))this.atoms[c].$delete(b);for(c=0;c<this.modelCount;c++)this.models[c].bsAtomsDeleted.or(a),this.models[c].bsAtomsDeleted.and(this.models[c].bsAtoms);this.deleteBonds(b,!1)}},"J.util.BS");$_M(c$,"getModelCml",function(a,b,c){var d=new J.util.SB;if(0==J.util.BSUtil.cardinalityOf(a))return"";
J.io.XmlUtil.openTag(d,"molecule");J.io.XmlUtil.openTag(d,"atomArray");for(var e=new J.util.BS,f=a.nextSetBit(0);0<=f&&!(0>--b);f=a.nextSetBit(f+1)){var g=this.atoms[f],h=g.getAtomName();J.util.TextFormat.simpleReplace(h,'"',"''");e.set(g.index);J.io.XmlUtil.appendTag(d,"atom/",["id","a"+(g.index+1),"title",g.getAtomName(),"elementType",g.getElementSymbol(),"x3",""+g.x,"y3",""+g.y,"z3",""+g.z])}J.io.XmlUtil.closeTag(d,"atomArray");if(c){J.io.XmlUtil.openTag(d,"bondArray");for(f=0;f<this.bondCount;f++)a=
this.bonds[f],b=a.atom2,e.get(a.atom1.index)&&e.get(b.index)&&(b=J.util.JmolEdge.getCmlBondOrder(a.order),null!=b&&J.io.XmlUtil.appendTag(d,"bond/",["atomRefs2","a"+(a.atom1.index+1)+" a"+(a.atom2.index+1),"order",b]));J.io.XmlUtil.closeTag(d,"bondArray")}J.io.XmlUtil.closeTag(d,"molecule");return d.toString()},"J.util.BS,~N,~B");$_M(c$,"adjustAtomArrays",function(a,b,c){this.atomCount=c;for(var d=b;d<c;d++){this.atoms[d]=this.atoms[a[d]];this.atoms[d].index=d;var e=this.models[this.atoms[d].modelIndex];
e.firstAtomIndex==a[d]&&(e.firstAtomIndex=d);e.bsAtoms.set(d)}if(null!=this.vibrationVectors)for(d=b;d<c;d++)this.vibrationVectors[d]=this.vibrationVectors[a[d]];if(null!=this.occupancies)for(d=b;d<c;d++)this.occupancies[d]=this.occupancies[a[d]];if(null!=this.bfactor100s)for(d=b;d<c;d++)this.bfactor100s[d]=this.bfactor100s[a[d]];if(null!=this.partialCharges)for(d=b;d<c;d++)this.partialCharges[d]=this.partialCharges[a[d]];if(null!=this.ellipsoids)for(d=b;d<c;d++)this.ellipsoids[d]=this.ellipsoids[a[d]];
if(null!=this.atomNames)for(d=b;d<c;d++)this.atomNames[d]=this.atomNames[a[d]];if(null!=this.atomTypes)for(d=b;d<c;d++)this.atomTypes[d]=this.atomTypes[a[d]];if(null!=this.atomSerials)for(d=b;d<c;d++)this.atomSerials[d]=this.atomSerials[a[d]]},"~A,~N,~N");$_M(c$,"growAtomArrays",function(a){this.atoms=J.util.ArrayUtil.arrayCopyObject(this.atoms,a);null!=this.vibrationVectors&&(this.vibrationVectors=J.util.ArrayUtil.arrayCopyObject(this.vibrationVectors,a));null!=this.occupancies&&(this.occupancies=
J.util.ArrayUtil.arrayCopyByte(this.occupancies,a));null!=this.bfactor100s&&(this.bfactor100s=J.util.ArrayUtil.arrayCopyShort(this.bfactor100s,a));null!=this.partialCharges&&(this.partialCharges=J.util.ArrayUtil.arrayCopyF(this.partialCharges,a));null!=this.ellipsoids&&(this.ellipsoids=J.util.ArrayUtil.arrayCopyObject(this.ellipsoids,a));null!=this.atomNames&&(this.atomNames=J.util.ArrayUtil.arrayCopyS(this.atomNames,a));null!=this.atomTypes&&(this.atomTypes=J.util.ArrayUtil.arrayCopyS(this.atomTypes,
a));null!=this.atomSerials&&(this.atomSerials=J.util.ArrayUtil.arrayCopyI(this.atomSerials,a))},"~N");$_M(c$,"addAtom",function(a,b,c,d,e,f,g,h,k,l,m,n,p,q,r,s,t,u,v,w,z){f=new J.modelset.Atom(a,this.atomCount,g,h,k,l,z,f,c,q,v);this.models[a].atomCount++;this.models[a].bsAtoms.set(this.atomCount);1==c%128&&this.models[a].hydrogenCount++;this.atomCount>=this.atoms.length&&this.growAtomArrays(this.atomCount+100);this.atoms[this.atomCount]=f;this.setBFactor(this.atomCount,t);this.setOccupancy(this.atomCount,
s);this.setPartialCharge(this.atomCount,r);null!=u&&this.setEllipsoid(this.atomCount,u);f.group=b;f.colixAtom=this.viewer.getColixAtomPalette(f,J.constant.EnumPalette.CPK.id);if(null!=d){if(0<=(a=d.indexOf("\x00")))null==this.atomTypes&&(this.atomTypes=Array(this.atoms.length)),this.atomTypes[this.atomCount]=d.substring(a+1),d=d.substring(0,a);f.atomID=w;0==w&&(null==this.atomNames&&(this.atomNames=Array(this.atoms.length)),this.atomNames[this.atomCount]=d.intern())}-2147483648!=e&&(null==this.atomSerials&&
(this.atomSerials=Clazz.newIntArray(this.atoms.length,0)),this.atomSerials[this.atomCount]=e);Float.isNaN(m)||this.setVibrationVector(this.atomCount,m,n,p);this.atomCount++;return f},"~N,J.modelset.Group,~N,~S,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~A,~B,~N,J.util.BS");$_M(c$,"getInlineData",function(a){var b=null;if(0<=a)b=this.models[a].loadScript;else for(a=this.modelCount;0<=--a&&!(0<(b=this.models[a].loadScript).length()););a=b.lastIndexOf('data "');if(0>a)return null;a=b.indexOf2('"',a+7);var c=
b.lastIndexOf('end "');return c<a||0>a?null:b.substring2(a+2,c)},"~N");$_M(c$,"isAtomPDB",function(a){return 0<=a&&this.models[this.atoms[a].modelIndex].isBioModel},"~N");$_M(c$,"isAtomAssignable",function(a){return 0<=a&&this.atoms[a].modelIndex==this.modelCount-1},"~N");$_M(c$,"getGroupAtom",function(a,b,c){var d=a.group;a=d.getMonomerIndex();if(0>a)return-1;d=d.getGroups();a+=b;if(0<=a&&a<d.length){a=d[a];if(1==b&&!a.isConnectedPrevious())return-1;if("0".equals(c))return a.leadAtomIndex;for(b=
a.firstAtomIndex;b<=a.lastAtomIndex;b++)if(null==c||c.equalsIgnoreCase(this.atoms[b].getAtomName()))return b}return-1},"J.modelset.Atom,~N,~S");$_M(c$,"haveModelKit",function(){for(var a=0;a<this.modelCount;a++)if(this.models[a].isModelKit)return!0;return!1});$_M(c$,"getModelKitStateBitset",function(a,b){for(var c=J.util.BSUtil.copy(b),d=0;d<this.modelCount;d++)this.models[d].isModelKit||c.andNot(this.models[d].bsAtoms);return J.util.BSUtil.deleteBits(a,c)},"J.util.BS,J.util.BS");$_M(c$,"setAtomNamesAndNumbers",
function(a,b,c){0>b&&(a=this.models[this.atoms[a].modelIndex].firstAtomIndex);null==this.atomSerials&&(this.atomSerials=Clazz.newIntArray(this.atomCount,0));null==this.atomNames&&(this.atomNames=Array(this.atomCount));for(var d=this.isXYZ&&this.viewer.getBoolean(603979978),e=2147483647,f=1;a<this.atomCount;++a){var g=this.atoms[a];g.modelIndex!=e&&(e=g.modelIndex,f=d?0:1);if(0==this.atomSerials[a]||0>b)this.atomSerials[a]=a<b?c.atomSerials[a]:f;if(null==this.atomNames[a]||0>b)this.atomNames[a]=(g.getElementSymbol()+
this.atomSerials[a]).intern();(!this.models[e].isModelKit||0<g.getElementNumber()&&!g.isDeleted())&&f++}},"~N,~N,J.modelset.AtomCollection");$_M(c$,"setUnitCellOffset",function(a,b,c){for(var d=a;d<this.modelCount;d++)if(!(0>d||0<=a&&d!=a&&this.models[d].trajectoryBaseIndex!=a)){var e=this.getUnitCell(d);null!=e&&(null==b?e.setOffset(c):e.setOffsetPt(b))}},"~N,J.util.P3,~N");$_M(c$,"connect",function(a){this.resetMolecules();for(var b=new J.util.BS,c=0;c<a.length;c++){var d=a[c];if(!(null==d||2>d.length)){var e=
Clazz.floatToInt(d[0]),f=0>e;f&&(e=-1-e);var g=Clazz.floatToInt(d[1]);if(!(0>g||e>=this.atomCount||g>=this.atomCount)){var h=2<d.length?Clazz.floatToInt(d[2]):1;0>h&&(h&=65535);var k=3<d.length?Clazz.floatToShort(1E3*a[c][3]):this.getDefaultMadFromOrder(h);0==h||0==k&&32768!=h&&!J.modelset.Bond.isOrderH(h)?(d=this.atoms[e].getBond(this.atoms[g]),null!=d&&b.set(d.index)):this.bondAtoms(this.atoms[e],this.atoms[g],h,k,null,4<d.length?d[4]:0,f,!0)}}}0<=b.nextSetBit(0)&&this.deleteBonds(b,!1)},"~A");
$_M(c$,"allowSpecAtom",function(){return 1!=this.modelCount||this.models[0].isBioModel});$_M(c$,"setFrameDelayMs",function(a,b){for(var c=b.nextSetBit(0);0<=c;c=b.nextSetBit(c+1))this.models[this.models[c].trajectoryBaseIndex].frameDelay=a},"~N,J.util.BS");$_M(c$,"getFrameDelayMs",function(a){return a<this.models.length&&0<=a?this.models[this.models[a].trajectoryBaseIndex].frameDelay:0},"~N");$_M(c$,"getModelIndexFromId",function(a){var b=0<=a.indexOf("#"),c=a.toLowerCase().endsWith(".basemodel");
c&&(a=a.substring(0,a.length-10));for(var d=-1,e=null,f=0;f<this.modelCount;f++){var g=this.getModelAuxiliaryInfoValue(f,"modelID");if(!(null==g&&null==(g=this.getModelTitle(f)))){b&&(e=this.getModelFileName(f)+"#",g=e+g);if(a.equalsIgnoreCase(g))return c?this.viewer.getJDXBaseModelIndex(f):f;null!=e&&a.startsWith(e)&&(d=-2)}}return null==e&&!b?-2:d},"~S");$_M(c$,"getAuxiliaryInfo",function(a){var b=this.modelSetAuxiliaryInfo;if(null==b)return null;for(var c=new J.util.JmolList,d=0;d<this.modelCount;++d)if(null==
a||a.get(d)){var e=this.getModelAuxiliaryInfo(d);c.addLast(e)}b.put("models",c);return b},"J.util.BS");Clazz.pu$h();c$=Clazz.decorateAsClass(function(){this.modelIndex=0;this.script2=this.script1=this.bsAtoms2=this.bsAtoms1=this.bsBonds=null;this.inDefinedStateBlock=!1;Clazz.instantialize(this,arguments)},J.modelset.ModelCollection,"StateScript");Clazz.makeConstructor(c$,function(a,b,c,d,e,f,g){this.modelIndex=a;this.script1=b;this.bsBonds=J.util.BSUtil.copy(c);this.bsAtoms1=J.util.BSUtil.copy(d);
this.bsAtoms2=J.util.BSUtil.copy(e);this.script2=f;this.inDefinedStateBlock=g},"~N,~S,J.util.BS,J.util.BS,J.util.BS,~S,~B");$_M(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))});Clazz.overrideMethod(c$,"toString",function(){if(!this.isValid())return"";var a=J.util.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});$_M(c$,"isConnect",function(){return 0<=this.script1.indexOf("connect")});$_M(c$,"deleteAtoms",function(a,b,c){if(a==this.modelIndex)return!1;if(a>this.modelIndex)return!0;J.util.BSUtil.deleteBits(this.bsBonds,b);J.util.BSUtil.deleteBits(this.bsAtoms1,
c);J.util.BSUtil.deleteBits(this.bsAtoms2,c);return this.isValid()},"~N,J.util.BS,J.util.BS");$_M(c$,"setModelIndex",function(a){this.modelIndex=a},"~N");c$=Clazz.p0p();Clazz.defineStatics(c$,"hbondMin",2.5)}),Clazz.declarePackage("J.atomdata"),c$=Clazz.decorateAsClass(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;Clazz.instantialize(this,arguments)},J.atomdata,"AtomData"),Clazz.makeConstructor(c$,function(){}),Clazz.defineStatics(c$,"MODE_FILL_COORDS",1,"MODE_FILL_RADII",2,"MODE_FILL_MOLECULES",4,"MODE_GET_ATTACHED_HYDROGENS",8,"MODE_FILL_MULTIMODEL",16),Clazz.declarePackage("J.geodesic"),Clazz.load(["J.atomdata.AtomData","J.util.P3"],"J.geodesic.EnvelopeCalculation","J.atomdata.RadiusData J.util.ArrayUtil $.BS $.BSUtil $.Geodesic $.Normix $.V3".split(" "),
function(){c$=Clazz.decorateAsClass(function(){this.viewer=this.atomData=this.mads=this.mapT=this.geodesicMap=null;this.maxRadius=this.atomCount=0;this.disregardNeighbors=this.modelZeroBased=!1;this.dotsConvexMaps=this.bsMySelected=null;this.geodesicCount=this.dotsConvexMax=0;this.bsSurface=null;this.diameterP=this.radiusP=0;this.bsIgnore=this.bsTemp=null;this.multiModel=this.isSurface=this.onlySelectedDots=!1;this.currentPoints=null;this.indexI=0;this.centerI=null;this.radiiIP2=this.radiusI=0;this.vertexTest=
this.centerT=this.pointT=null;this.neighborCount=0;this.neighborRadii2=this.neighborPlusProbeRadii2=this.neighborCenters=this.neighborIndices=null;Clazz.instantialize(this,arguments)},J.geodesic,"EnvelopeCalculation");Clazz.prepareFields(c$,function(){this.atomData=new J.atomdata.AtomData;this.pointT=new J.util.P3;this.vertexTest=Array(12);for(var a=0;12>a;a++)this.vertexTest[a]=new J.util.P3;this.neighborIndices=Clazz.newIntArray(16,0);this.neighborCenters=Array(16);this.neighborPlusProbeRadii2=
Clazz.newFloatArray(16,0);this.neighborRadii2=Clazz.newFloatArray(16,0)});Clazz.makeConstructor(c$,function(a,b,c){this.viewer=a;this.atomCount=b;this.mads=c;this.geodesicCount=J.util.Geodesic.getVertexCount(3);this.geodesicMap=J.util.BSUtil.newBitSet(this.geodesicCount);this.mapT=J.util.BSUtil.newBitSet(this.geodesicCount);$t$=J.geodesic.EnvelopeCalculation.EMPTY_SET=J.util.BSUtil.emptySet;J.geodesic.EnvelopeCalculation.prototype.EMPTY_SET=J.geodesic.EnvelopeCalculation.EMPTY_SET;$t$},"J.atomdata.AtomDataServer,~N,~A");
$_M(c$,"getDotsConvexMaps",function(){return this.dotsConvexMaps});$_M(c$,"getDotsConvexMax",function(){return this.dotsConvexMax});$_M(c$,"allocDotsConvexMaps",function(a){this.dotsConvexMax>=a||(this.dotsConvexMax=a,this.dotsConvexMaps=Array(a))},"~N");$_M(c$,"getBsSurfaceClone",function(){return J.util.BSUtil.copy(this.bsSurface)});$_M(c$,"setMads",function(a){this.mads=a},"~A");$_M(c$,"setFromBits",function(a,b){this.geodesicMap.setBits(0,this.geodesicCount);for(var c=this.geodesicCount;0<=--c;)b.get(c)||
this.geodesicMap.clear(c);null==this.dotsConvexMaps&&(this.dotsConvexMaps=Array(this.atomCount));c=this.geodesicMap.isEmpty()?J.geodesic.EnvelopeCalculation.EMPTY_SET:J.util.BSUtil.copy(this.geodesicMap);a>=this.dotsConvexMaps.length||(this.dotsConvexMaps[a]=c,this.dotsConvexMax=Math.max(this.dotsConvexMax,a))},"~N,J.util.BS");$_M(c$,"newSet",function(){this.dotsConvexMax=0;this.dotsConvexMaps=null;this.radiusP=this.diameterP=0;this.mads=null});$_M(c$,"reCalculate",function(a,b){if(null!=this.atomData.radiusData)this.calculate(null,
this.maxRadius,a,this.bsIgnore,this.disregardNeighbors,this.onlySelectedDots,this.isSurface,this.multiModel);else if(!(null==this.dotsConvexMaps||0==this.dotsConvexMax)){var c=new J.util.V3;null==this.bsTemp&&(this.bsTemp=J.util.Normix.newVertexBitSet());for(var d=a.nextSetBit(0);0<=d&&!(d>=this.dotsConvexMax);d=a.nextSetBit(d+1)){var e=this.dotsConvexMaps[d];if(!(null==e||e.isEmpty())){for(var f=new J.util.BS,g=e.nextSetBit(0);0<=g;g=e.nextSetBit(g+1))c.setT(J.util.Geodesic.getVertexVector(g)),b.transform(c),
f.set(J.util.Normix.getNormixV(c,this.bsTemp));this.dotsConvexMaps[d]=f}}}},"J.util.BS,J.util.Matrix3f");$_M(c$,"calculate",function(a,b,c,d,e,f,g,h){if(null==a){if(a=this.atomData.radiusData,null==a)return}else this.atomData.radiusData=a,this.bsIgnore=d,this.onlySelectedDots=f,this.multiModel=h,this.isSurface=g;3.4028235E38==a.value&&(a.value=3);this.atomData.modelIndex=h?-1:0;this.modelZeroBased=!h;this.viewer.fillAtomData(this.atomData,1|(null==this.mads?2:0));this.atomCount=this.atomData.atomCount;
if(null!=this.mads)for(a=0;a<this.atomCount;a++)this.atomData.atomRadius[a]=this.mads[a]/1E3;this.bsMySelected=f&&null!=c?J.util.BSUtil.copy(c):null!=d?J.util.BSUtil.setAll(this.atomCount):null;J.util.BSUtil.andNot(this.bsMySelected,d);this.disregardNeighbors=e;this.maxRadius=b;this.bsSurface=new J.util.BS;b=null==c;e=this.viewer.getSelectedAtomIterator(this.bsMySelected,!1,this.modelZeroBased,!1);for(a=b?this.atomCount-1:c.nextSetBit(0);0<=a;a=b?a-1:c.nextSetBit(a+1))if(null==d||!d.get(a))this.setAtomI(a),
this.getNeighbors(e),this.calcConvexMap(g);e.release();this.currentPoints=null;this.setDotsConvexMax()},"J.atomdata.RadiusData,~N,J.util.BS,J.util.BS,~B,~B,~B,~B");$_M(c$,"getRadius",function(a){return this.atomData.atomRadius[a]},"~N");$_M(c$,"getPoints",function(){null==this.dotsConvexMaps&&this.calculate(new J.atomdata.RadiusData(null,3,J.atomdata.RadiusData.EnumType.ABSOLUTE,null),3.4028235E38,this.bsMySelected,null,!1,!1,!1,!1);if(null!=this.currentPoints)return this.currentPoints;for(var a=
0,b=this.dotsConvexMax;0<=--b;)null!=this.dotsConvexMaps[b]&&(a+=this.dotsConvexMaps[b].cardinalityN(42));var c=Array(a);if(0==a)return c;a=0;for(b=this.dotsConvexMax;0<=--b;)if(null!=this.dotsConvexMaps[b]){var d=this.dotsConvexMaps[b].size();for(42<d&&(d=42);0<=--d;)if(this.dotsConvexMaps[b].get(d)){var e=new J.util.P3;e.scaleAdd2(this.atomData.atomRadius[b],J.util.Geodesic.getVertexVector(d),this.atomData.atomXyz[b]);c[a++]=e}}return this.currentPoints=c});$_M(c$,"setDotsConvexMax",($fz=function(){if(null==
this.dotsConvexMaps)this.dotsConvexMax=0;else{var a;for(a=this.atomCount;0<=--a&&null==this.dotsConvexMaps[a];);this.dotsConvexMax=a+1}},$fz.isPrivate=!0,$fz));$_M(c$,"getAppropriateRadius",function(a){return null!=this.mads?a>=this.mads.length?0:this.mads[a]/1E3:this.atomData.atomRadius[a]},"~N");$_M(c$,"setAtomI",($fz=function(a){this.indexI=a;this.centerI=this.atomData.atomXyz[a];this.radiusI=this.atomData.atomRadius[a];this.radiiIP2=this.radiusI+this.radiusP;this.radiiIP2*=this.radiiIP2},$fz.isPrivate=
!0,$fz),"~N");$_M(c$,"calcConvexMap",($fz=function(a){null==this.dotsConvexMaps&&(this.dotsConvexMaps=Array(this.atomCount));this.calcConvexBits();this.geodesicMap.isEmpty()?a=J.geodesic.EnvelopeCalculation.EMPTY_SET:(this.bsSurface.set(this.indexI),a&&(this.addIncompleteFaces(this.geodesicMap),this.addIncompleteFaces(this.geodesicMap)),a=J.util.BSUtil.copy(this.geodesicMap));this.dotsConvexMaps[this.indexI]=a},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"addIncompleteFaces",($fz=function(a){this.mapT.clearAll();
for(var b=J.util.Geodesic.getFaceVertexes(3),c=b.length,d=-1,e=0;e<c;){var f=b[e++],g=b[e++],h=b[e++],k=a.get(f),l=a.get(g),m=a.get(h);!k&&!l&&!m||k&&l&&m||(k||(this.mapT.set(f),d<f&&(d=f)),l||(this.mapT.set(g),d<g&&(d=g)),m||(this.mapT.set(h),d<h&&(d=h)))}for(b=0;b<=d;b++)this.mapT.get(b)&&a.set(b)},$fz.isPrivate=!0,$fz),"J.util.BS");$_M(c$,"calcConvexBits",($fz=function(){this.geodesicMap.setBits(0,this.geodesicCount);var a=this.radiusI+this.radiusP;if(0!=this.neighborCount){var b,c,d,e,f=J.util.Geodesic.getFaceVertexes(3),
g=J.geodesic.EnvelopeCalculation.power4[2],h,k,l;this.mapT.clearAll();for(b=0;12>b;b++)this.vertexTest[b].setT(J.util.Geodesic.getVertexVector(b)),this.vertexTest[b].scaleAdd(a,this.centerI);for(var m=0;20>m;m++){b=0;c=f[3*g*(4*m+0)];d=f[3*g*(4*m+1)];e=f[3*g*(4*m+2)];for(var n=0;n<this.neighborCount;n++)if(l=this.neighborPlusProbeRadii2[n],this.centerT=this.neighborCenters[n],h=this.vertexTest[c].distanceSquared(this.centerT)>=l,k=this.vertexTest[d].distanceSquared(this.centerT)>=l,l=this.vertexTest[e].distanceSquared(this.centerT)>=
l,h||this.geodesicMap.clear(c),k||this.geodesicMap.clear(d),l||this.geodesicMap.clear(e),!h&&!k&&!l){b=-1;break}n=12*m*g;c=n+12*g;for(d=n;d<c;d++)if(e=f[d],!this.mapT.get(e)&&this.geodesicMap.get(e)){switch(b){case -1:this.geodesicMap.clear(e);break;case 0:for(n=0;n<this.neighborCount;n++)l=this.neighborPlusProbeRadii2[n],this.centerT=this.neighborCenters[n],this.pointT.setT(J.util.Geodesic.getVertexVector(e)),this.pointT.scaleAdd(a,this.centerI),this.pointT.distanceSquared(this.centerT)<l&&this.geodesicMap.clear(e)}this.mapT.set(e)}}}},
$fz.isPrivate=!0,$fz));$_M(c$,"getNeighbors",($fz=function(a){this.neighborCount=0;if(this.disregardNeighbors)return null;for(this.viewer.setIteratorForAtom(a,this.indexI,this.radiusI+this.diameterP+this.maxRadius);a.hasNext();){var b=a.next(),c=this.atomData.atomRadius[b];this.centerI.distance(this.atomData.atomXyz[b])>this.radiusI+this.radiusP+this.radiusP+c||(this.neighborCount==this.neighborIndices.length&&(this.neighborIndices=J.util.ArrayUtil.doubleLengthI(this.neighborIndices),this.neighborCenters=
J.util.ArrayUtil.doubleLength(this.neighborCenters),this.neighborPlusProbeRadii2=J.util.ArrayUtil.doubleLengthF(this.neighborPlusProbeRadii2),this.neighborRadii2=J.util.ArrayUtil.doubleLengthF(this.neighborRadii2)),this.neighborCenters[this.neighborCount]=this.atomData.atomXyz[b],this.neighborIndices[this.neighborCount]=b,b=c+this.radiusP,this.neighborPlusProbeRadii2[this.neighborCount]=b*b,this.neighborRadii2[this.neighborCount]=c*c,++this.neighborCount)}return a},$fz.isPrivate=!0,$fz),"J.api.AtomIndexIterator");
$_M(c$,"deleteAtoms",function(a,b){this.dotsConvexMaps=J.util.ArrayUtil.deleteElements(this.dotsConvexMaps,a,b);this.dotsConvexMax=this.dotsConvexMaps.length;null!=this.mads&&(this.mads=J.util.ArrayUtil.deleteElements(this.mads,a,b));this.atomData.atomRadius=J.util.ArrayUtil.deleteElements(this.atomData.atomRadius,a,b);this.atomData.atomXyz=J.util.ArrayUtil.deleteElements(this.atomData.atomXyz,a,b);this.atomData.atomCount-=b;this.atomCount=this.atomData.atomCount},"~N,~N");Clazz.defineStatics(c$,
"EMPTY_SET",null,"SURFACE_DISTANCE_FOR_CALCULATION",3,"MAX_LEVEL",3);Clazz.defineStatics(c$,"power4",[1,4,16,64,256])}),Clazz.declarePackage("J.modelset"),Clazz.load(null,"J.modelset.Measurement","java.lang.Float J.atomdata.RadiusData J.constant.EnumVdw J.modelset.LabelToken J.util.AxisAngle4f $.Escape $.JmolList $.Measure $.P3 $.SB $.V3".split(" "),function(){c$=Clazz.decorateAsClass(function(){this.modelSet=null;this.index=0;this.isVisible=!0;this.isTrajectory=this.isDynamic=this.isHidden=!1;this.colix=
0;this.tickInfo=null;this.traceX=-2147483648;this.count=this.traceY=0;this.pts=this.countPlusIndices=null;this.value=0;this.pointArc=this.aa=this.strMeasurement=this.strFormat=this.viewer=null;Clazz.instantialize(this,arguments)},J.modelset,"Measurement");Clazz.prepareFields(c$,function(){this.countPlusIndices=Clazz.newIntArray(5,0)});$_M(c$,"setM",function(a,b,c,d,e,f){this.modelSet=a;this.index=f;this.viewer=a.viewer;this.colix=d;this.strFormat=e;null!=b&&(this.tickInfo=b.tickInfo,this.pts=b.pts);
null==this.pts&&(this.pts=Array(4));b=null==b?null:b.countPlusIndices;this.count=null==b?0:b[0];0<this.count&&(System.arraycopy(b,0,this.countPlusIndices,0,this.count+1),this.isTrajectory=a.isTrajectoryMeasurement(this.countPlusIndices));this.value=Float.isNaN(c)||this.isTrajectory?this.getMeasurement():c;this.formatMeasurement(null);return this},"J.modelset.ModelSet,J.modelset.Measurement,~N,~N,~S,~N");$_M(c$,"setPoints",function(a,b,c,d){this.modelSet=a;this.countPlusIndices=b;this.count=b[0];this.pts=
null==c?Array(4):c;this.viewer=a.viewer;this.tickInfo=d;return this},"J.modelset.ModelSet,~A,~A,J.modelset.TickInfo");$_M(c$,"getCount",function(){return this.count});$_M(c$,"setCount",function(a){this.count=this.countPlusIndices[0]=a},"~N");$_M(c$,"getCountPlusIndices",function(){return this.countPlusIndices});$_M(c$,"getPoints",function(){return this.pts});$_M(c$,"getAtomIndex",function(a){return 0<a&&a<=this.count?this.countPlusIndices[a]:-1},"~N");$_M(c$,"getAtom",function(a){a=this.countPlusIndices[a];
return-1>a?this.pts[-2-a]:this.modelSet.atoms[a]},"~N");$_M(c$,"getLastIndex",function(){return 0<this.count?this.countPlusIndices[this.count]:-1});$_M(c$,"getString",function(){return this.strMeasurement});$_M(c$,"getStringUsing",function(a,b,c){this.viewer=a;this.value=this.getMeasurement();this.formatMeasurementAs(b,c,!0);return null==b?this.getInfoAsString(c):this.strMeasurement},"J.viewer.Viewer,~S,~S");$_M(c$,"getStringDetail",function(){return(2==this.count?"Distance":3==this.count?"Angle":
"Torsion")+this.getMeasurementScript(" - ",!1)+" : "+this.value});$_M(c$,"getStrFormat",function(){return this.strFormat});$_M(c$,"getValue",function(){return this.value});$_M(c$,"getAxisAngle",function(){return this.aa});$_M(c$,"getPointArc",function(){return this.pointArc});$_M(c$,"refresh",function(){this.value=this.getMeasurement();this.isTrajectory=this.modelSet.isTrajectoryMeasurement(this.countPlusIndices);this.formatMeasurement(null)});$_M(c$,"getMeasurementScript",function(a,b){for(var c=
"",d=a.equals(" "),e=1;e<=this.count;e++)c+=(1<e?a:" ")+this.getLabel(e,d,b);return c},"~S,~B");$_M(c$,"formatMeasurementAs",function(a,b,c){null!=a&&0==a.length&&(a=null);if(c||!(null!=a&&0!=a.indexOf(this.countPlusIndices[0]+":")))this.strFormat=a,this.formatMeasurement(b)},"~S,~S,~B");$_M(c$,"formatMeasurement",function(a){this.strMeasurement=null;if(!(Float.isNaN(this.value)||0==this.count))switch(this.count){case 2:this.strMeasurement=this.formatDistance(a);break;case 3:if(180==this.value)this.pointArc=
this.aa=null;else{a=new J.util.V3;var b=new J.util.V3,c=J.util.Measure.computeAngle(this.getAtom(1),this.getAtom(2),this.getAtom(3),a,b,!1),d=new J.util.V3;d.cross(a,b);this.aa=J.util.AxisAngle4f.new4(d.x,d.y,d.z,c);a.normalize();a.scale(0.5);this.pointArc=J.util.P3.newP(a)}case 4:this.strMeasurement=this.formatAngle(this.value)}},"~S");$_M(c$,"reformatDistanceIfSelected",function(){2==this.count&&this.viewer.isSelected(this.countPlusIndices[1])&&this.viewer.isSelected(this.countPlusIndices[2])&&
this.formatMeasurement(null)});$_M(c$,"formatDistance",($fz=function(a){var b=this.getLabelString();if(null==b)return"";if(null==a){var c=this.strFormat.indexOf("//");0<=c?a=this.strFormat.substring(c+2):(a=this.viewer.getMeasureDistanceUnits(),this.strFormat+="//"+a)}a=J.modelset.Measurement.fixUnits(a);c=b.indexOf("//");0<=c&&(b=b.substring(0,c));c=this.fixValue(a,0<=b.indexOf("%V"));return this.formatString(c,a,b)},$fz.isPrivate=!0,$fz),"~S");c$.fixUnits=$_M(c$,"fixUnits",($fz=function(a){return a.equals("nanometers")?
"nm":a.equals("picometers")?"pm":a.equals("angstroms")?"\u00c5":a.equals("vanderwaals")||a.equals("vdw")?"%":a},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"fixValue",function(a,b){if(2!=this.count)return this.value;var c=this.value;if(null!=a){if(a.equals("%")){var d=this.getAtomIndex(1),e=this.getAtomIndex(2);if(0<=d&&0<=e)return d=this.getAtom(1).getVanderwaalsRadiusFloat(this.viewer,J.constant.EnumVdw.AUTO)+this.getAtom(2).getVanderwaalsRadiusFloat(this.viewer,J.constant.EnumVdw.AUTO),c/=d,b?Math.round(1E3*
c)/10:100*c;a="ang"}if(a.equals("nm"))return b?Math.round(100*c)/1E3:c/10;if(a.equals("pm"))return b?Math.round(1E3*c)/10:100*c;if(a.equals("au"))return b?Math.round(1E3*(c/0.5291772))/1E3:c/0.5291772}return b?Math.round(100*c)/100:c},"~S,~B");$_M(c$,"formatAngle",($fz=function(a){var b=this.getLabelString();0<=b.indexOf("%V")&&(a=Math.round(10*a)/10);return this.formatString(a,"\u00b0",b)},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"getLabelString",($fz=function(){var a=this.countPlusIndices[0]+":",b=null;
if(null!=this.strFormat){if(0==this.strFormat.length)return null;b=2<this.strFormat.length&&0==this.strFormat.indexOf(a)?this.strFormat:null}null==b&&(this.strFormat=null,b=this.viewer.getDefaultMeasurementLabel(this.countPlusIndices[0]));0==b.indexOf(a)&&(b=b.substring(2));null==this.strFormat&&(this.strFormat=a+b);return b},$fz.isPrivate=!0,$fz));$_M(c$,"formatString",($fz=function(a,b,c){return J.modelset.LabelToken.formatLabelMeasure(this.viewer,this,c,a,b)},$fz.isPrivate=!0,$fz),"~N,~S,~S");
$_M(c$,"sameAsPoints",function(a,b){if(this.count!=a[0])return!1;for(var c=!0,d=1;d<=this.count&&c;d++)c=this.countPlusIndices[d]==a[d];if(c)for(d=0;d<this.count&&c;d++)null!=b[d]&&(c=0.01>this.pts[d].distance(b[d]));if(c)return!0;switch(this.count){default:return!0;case 2:return this.sameAsIJ(a,b,1,2)&&this.sameAsIJ(a,b,2,1);case 3:return this.sameAsIJ(a,b,1,3)&&this.sameAsIJ(a,b,2,2)&&this.sameAsIJ(a,b,3,1);case 4:return this.sameAsIJ(a,b,1,4)&&this.sameAsIJ(a,b,2,3)&&this.sameAsIJ(a,b,3,2)&&this.sameAsIJ(a,
b,4,1)}},"~A,~A");$_M(c$,"sameAsIJ",($fz=function(a,b,c,d){c=this.countPlusIndices[c];a=a[d];return 0<=c||0<=a?c==a:0.01>this.pts[-2-c].distance(b[-2-a])},$fz.isPrivate=!0,$fz),"~A,~A,~N,~N");$_M(c$,"sameAs",function(a,b){return this.sameAsIJ(this.countPlusIndices,this.pts,a,b)},"~N,~N");$_M(c$,"toVector",function(a){for(var b=new J.util.JmolList,c=1;c<=this.count;c++)b.addLast(this.getLabel(c,a,!1));b.addLast(this.strMeasurement);return b},"~B");$_M(c$,"getMeasurement",function(){if(null==this.countPlusIndices||
2>this.count)return NaN;for(var a=this.count;0<=--a;)if(-1==this.countPlusIndices[a+1])return NaN;var a=this.getAtom(1),b=this.getAtom(2),c,d;switch(this.count){case 2:return a.distance(b);case 3:return c=this.getAtom(3),J.util.Measure.computeAngleABC(a,b,c,!0);case 4:return c=this.getAtom(3),d=this.getAtom(4),J.util.Measure.computeTorsion(a,b,c,d,!0);default:return NaN}});$_M(c$,"getLabel",function(a,b,c){var d=this.countPlusIndices[a];return 0>d?(c?"modelIndex "+this.getAtom(a).modelIndex+" ":"")+
J.util.Escape.eP(this.getAtom(a)):b?"(({"+d+"}))":this.viewer.getAtomInfo(d)},"~N,~B,~B");$_M(c$,"setModelIndex",function(a){if(null!=this.pts)for(var b=0;b<this.count;b++)null!=this.pts[b]&&(this.pts[b].modelIndex=a)},"~N");$_M(c$,"isValid",function(){return!(this.sameAs(1,2)||2<this.count&&this.sameAs(1,3)||4==this.count&&this.sameAs(2,4))});c$.find=$_M(c$,"find",function(a,b){for(var c=b.getCountPlusIndices(),d=b.getPoints(),e=a.size();0<=--e;)if(a.get(e).sameAsPoints(c,d))return e;return-1},"J.util.JmolList,J.modelset.Measurement");
$_M(c$,"isConnected",function(a,b){for(var c=-1,d=1;d<=b;d++){var e=this.getAtomIndex(d);if(!(0>e)){if(0<=c&&!a[e].isBonded(a[c]))return!1;c=e}}return!0},"~A,~N");$_M(c$,"getInfoAsString",function(a){var b=this.fixValue(a,!0);a=new J.util.SB;a.append(2==this.count?"distance":3==this.count?"angle":"dihedral");a.append(" \t").appendF(b);a.append(" \t").append(this.getString());for(b=1;b<=this.count;b++)a.append(" \t").append(this.getLabel(b,!1,!1));return a.toString()},"~S");$_M(c$,"isInRange",function(a,
b){if(a.factorType===J.atomdata.RadiusData.EnumType.FACTOR){var c=this.getAtom(1),d=this.getAtom(2),c=(c.getVanderwaalsRadiusFloat(this.viewer,a.vdwType)+d.getVanderwaalsRadiusFloat(this.viewer,a.vdwType))*a.value;return b<=c}return 3.4028235E38==a.values[0]||b>=a.values[0]&&b<=a.values[1]},"J.atomdata.RadiusData,~N");$_M(c$,"isIntramolecular",function(a,b){for(var c=-1,d=1;d<=b;d++){var e=this.getAtomIndex(d);if(!(0>e))if(e=a[e].getMoleculeNumber(!1),0>c)c=e;else if(e!=c)return!1}return!0},"~A,~N")}),
Clazz.declarePackage("J.util"),Clazz.load(null,"J.util.Geodesic",["java.lang.NullPointerException","$.Short","java.util.Hashtable","J.util.ArrayUtil","$.V3"],function(){c$=Clazz.declareType(J.util,"Geodesic");c$.getNeighborVertexesArrays=$_M(c$,"getNeighborVertexesArrays",function(){null==J.util.Geodesic.vertexCounts&&J.util.Geodesic.createGeodesic(3);return J.util.Geodesic.neighborVertexesArrays});c$.getVertexCount=$_M(c$,"getVertexCount",function(a){null==J.util.Geodesic.vertexCounts&&J.util.Geodesic.createGeodesic(3);
return J.util.Geodesic.vertexCounts[a]},"~N");c$.getVertexVectors=$_M(c$,"getVertexVectors",function(){null==J.util.Geodesic.vertexCounts&&J.util.Geodesic.createGeodesic(3);return J.util.Geodesic.vertexVectors});c$.getVertexVector=$_M(c$,"getVertexVector",function(a){return J.util.Geodesic.vertexVectors[a]},"~N");c$.getFaceVertexes=$_M(c$,"getFaceVertexes",function(a){return J.util.Geodesic.faceVertexesArrays[a]},"~N");c$.createGeodesic=$_M(c$,"createGeodesic",function(a){if(!(a<J.util.Geodesic.currentLevel)){$t$=
J.util.Geodesic.currentLevel=a;J.util.Geodesic.prototype.currentLevel=J.util.Geodesic.currentLevel;$t$;var b=Clazz.newShortArray(a+1,0);$t$=J.util.Geodesic.neighborVertexesArrays=J.util.ArrayUtil.newShort2(a+1);J.util.Geodesic.prototype.neighborVertexesArrays=J.util.Geodesic.neighborVertexesArrays;$t$;$t$=J.util.Geodesic.faceVertexesArrays=J.util.ArrayUtil.newShort2(a+1);J.util.Geodesic.prototype.faceVertexesArrays=J.util.Geodesic.faceVertexesArrays;$t$;$t$=J.util.Geodesic.vertexVectors=Array(12);
J.util.Geodesic.prototype.vertexVectors=J.util.Geodesic.vertexVectors;$t$;J.util.Geodesic.vertexVectors[0]=J.util.V3.new3(0,0,J.util.Geodesic.halfRoot5);for(var c=0;5>c;++c)J.util.Geodesic.vertexVectors[c+1]=J.util.V3.new3(Math.cos(1.2566371*c),Math.sin(1.2566371*c),0.5),J.util.Geodesic.vertexVectors[c+6]=J.util.V3.new3(Math.cos(1.2566371*c+0.62831855),Math.sin(1.2566371*c+0.62831855),-0.5);J.util.Geodesic.vertexVectors[11]=J.util.V3.new3(0,0,($t$=-J.util.Geodesic.halfRoot5,J.util.Geodesic.prototype.halfRoot5=
J.util.Geodesic.halfRoot5,$t$));for(c=12;0<=--c;)J.util.Geodesic.vertexVectors[c].normalize();J.util.Geodesic.faceVertexesArrays[0]=J.util.Geodesic.faceVertexesIcosahedron;J.util.Geodesic.neighborVertexesArrays[0]=J.util.Geodesic.neighborVertexesIcosahedron;b[0]=12;for(c=0;c<a;++c)J.util.Geodesic.quadruple(c,b);$t$=J.util.Geodesic.vertexCounts=b;J.util.Geodesic.prototype.vertexCounts=J.util.Geodesic.vertexCounts;$t$}},"~N");c$.quadruple=$_M(c$,"quadruple",($fz=function(a,b){$t$=J.util.Geodesic.htVertex=
new java.util.Hashtable;J.util.Geodesic.prototype.htVertex=J.util.Geodesic.htVertex;$t$;var c=J.util.Geodesic.vertexVectors.length,d=J.util.Geodesic.faceVertexesArrays[a],e=d.length,f=Clazz.doubleToInt(e/3),g=c+(c+f-2),f=4*f;$t$=J.util.Geodesic.vertexVectors=J.util.ArrayUtil.arrayCopyObject(J.util.Geodesic.vertexVectors,g);J.util.Geodesic.prototype.vertexVectors=J.util.Geodesic.vertexVectors;$t$;f=Clazz.newShortArray(3*f,0);J.util.Geodesic.faceVertexesArrays[a+1]=f;var h=Clazz.newShortArray(6*g,0);
J.util.Geodesic.neighborVertexesArrays[a+1]=h;for(var k=h.length;0<=--k;)h[k]=-1;b[a+1]=g;$t$=J.util.Geodesic.vertexNext=c;J.util.Geodesic.prototype.vertexNext=J.util.Geodesic.vertexNext;$t$;for(k=c=0;k<e;){var l=d[k++],m=d[k++],n=d[k++],p=J.util.Geodesic.getVertex(l,m),q=J.util.Geodesic.getVertex(m,n),r=J.util.Geodesic.getVertex(n,l);f[c++]=l;f[c++]=p;f[c++]=r;f[c++]=m;f[c++]=q;f[c++]=p;f[c++]=n;f[c++]=r;f[c++]=q;f[c++]=r;f[c++]=p;f[c++]=q;J.util.Geodesic.addNeighboringVertexes(h,p,l);J.util.Geodesic.addNeighboringVertexes(h,
p,r);J.util.Geodesic.addNeighboringVertexes(h,p,q);J.util.Geodesic.addNeighboringVertexes(h,p,m);J.util.Geodesic.addNeighboringVertexes(h,q,m);J.util.Geodesic.addNeighboringVertexes(h,q,r);J.util.Geodesic.addNeighboringVertexes(h,q,n);J.util.Geodesic.addNeighboringVertexes(h,r,n);J.util.Geodesic.addNeighboringVertexes(h,r,l)}e=J.util.Geodesic.vertexVectors.length;if(c!=f.length)throw new NullPointerException;if(J.util.Geodesic.vertexNext!=g)throw new NullPointerException;for(k=0;12>k;++k)for(d=0;5>
d;++d){c=h[6*k+d];if(0>c)throw new NullPointerException;if(c>=e)throw new NullPointerException;if(-1!=h[6*k+5])throw new NullPointerException;}for(k=72;k<h.length;++k){c=h[k];if(0>c)throw new NullPointerException;if(c>=e)throw new NullPointerException;}for(k=0;k<g;++k){e=0;for(d=h.length;0<=--d;)h[d]==k&&++e;if(12>k&&5!=e||12<=k&&6!=e)throw new NullPointerException;e=0;for(d=f.length;0<=--d;)f[d]==k&&++e;if(12>k&&5!=e||12<=k&&6!=e)throw new NullPointerException;}$t$=J.util.Geodesic.htVertex=null;
J.util.Geodesic.prototype.htVertex=J.util.Geodesic.htVertex;$t$},$fz.isPrivate=!0,$fz),"~N,~A");c$.addNeighboringVertexes=$_M(c$,"addNeighboringVertexes",($fz=function(a,b,c){for(var d=6*b,e=d+6;d<e;++d){if(a[d]==c)return;if(0>a[d]){a[d]=c;for(var f=6*c,g=f+6;f<g;++f){if(a[f]==b)return;if(0>a[f]){a[f]=b;return}}}}throw new NullPointerException;},$fz.isPrivate=!0,$fz),"~A,~N,~N");c$.getVertex=$_M(c$,"getVertex",($fz=function(a,b){if(a>b){var c=a;a=b;b=c}var c=Integer.$valueOf((a<<16)+b),d=J.util.Geodesic.htVertex.get(c);
if(null!=d)return d.shortValue();d=J.util.V3.newV(J.util.Geodesic.vertexVectors[a]);J.util.Geodesic.vertexVectors[J.util.Geodesic.vertexNext]=d;d.add(J.util.Geodesic.vertexVectors[b]);d.scale(0.5);d.normalize();J.util.Geodesic.htVertex.put(c,Short.$valueOf(J.util.Geodesic.vertexNext));return $t$=J.util.Geodesic.vertexNext++,J.util.Geodesic.prototype.vertexNext=J.util.Geodesic.vertexNext,$t$},$fz.isPrivate=!0,$fz),"~N,~N");c$.halfRoot5=c$.prototype.halfRoot5=0.5*Math.sqrt(5);Clazz.defineStatics(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)}),Clazz.declarePackage("J.util"),Clazz.load(["J.util.Geodesic"],"J.util.Normix",["J.util.BS"],function(){c$=Clazz.declareType(J.util,"Normix");c$.getNormixCount=$_M(c$,"getNormixCount",function(){0==J.util.Normix.normixCount&&($t$=J.util.Normix.normixCount=J.util.Geodesic.getVertexCount(3),J.util.Normix.prototype.normixCount=J.util.Normix.normixCount,$t$);return J.util.Normix.normixCount});c$.newVertexBitSet=$_M(c$,"newVertexBitSet",
function(){return J.util.BS.newN(J.util.Normix.getNormixCount())});c$.getVertexVectors=$_M(c$,"getVertexVectors",function(){null==J.util.Normix.vertexVectors&&($t$=J.util.Normix.vertexVectors=J.util.Geodesic.getVertexVectors(),J.util.Normix.prototype.vertexVectors=J.util.Normix.vertexVectors,$t$);return J.util.Normix.vertexVectors});c$.setInverseNormixes=$_M(c$,"setInverseNormixes",function(){if(null==J.util.Normix.inverseNormixes){J.util.Normix.getNormixCount();J.util.Normix.getVertexVectors();$t$=
J.util.Normix.inverseNormixes=Clazz.newShortArray(J.util.Normix.normixCount,0);J.util.Normix.prototype.inverseNormixes=J.util.Normix.inverseNormixes;$t$;for(var a=new J.util.BS,b=J.util.Normix.normixCount;0<=--b;){var c=J.util.Normix.vertexVectors[b];J.util.Normix.inverseNormixes[b]=J.util.Normix.getNormix(-c.x,-c.y,-c.z,3,a)}}});c$.getInverseNormix=$_M(c$,"getInverseNormix",function(a){return J.util.Normix.inverseNormixes[a]},"~N");c$.getNeighborVertexArrays=$_M(c$,"getNeighborVertexArrays",($fz=
function(){null==J.util.Normix.neighborVertexesArrays&&($t$=J.util.Normix.neighborVertexesArrays=J.util.Geodesic.getNeighborVertexesArrays(),J.util.Normix.prototype.neighborVertexesArrays=J.util.Normix.neighborVertexesArrays,$t$);return J.util.Normix.neighborVertexesArrays},$fz.isPrivate=!0,$fz));c$.getNormixV=$_M(c$,"getNormixV",function(a,b){return J.util.Normix.getNormix(a.x,a.y,a.z,3,b)},"J.util.V3,J.util.BS");c$.get2SidedNormix=$_M(c$,"get2SidedNormix",function(a,b){return~J.util.Normix.getNormix(a.x,
a.y,a.z,3,b)},"J.util.V3,J.util.BS");c$.getNormix=$_M(c$,"getNormix",($fz=function(a,b,c,d,e){var f,g;0<=c?(f=0,g=c-1):(f=11,g=c- -1);e.clearAll();e.set(f);J.util.Normix.getVertexVectors();J.util.Normix.getNeighborVertexArrays();g=a*a+b*b+g*g;for(var h=0;h<=d;++h)for(var k=J.util.Normix.neighborVertexesArrays[h],l=6*f,m=l+(12>f?5:6);--m>=l;){var n=k[m];if(!e.get(n)){e.set(n);var p=J.util.Normix.vertexVectors[n],q;q=p.x-a;var r=q*q;r>=g||(q=p.y-b,r+=q*q,r>=g||(q=p.z-c,r+=q*q,r>=g||(f=n,g=r)))}}return f},
$fz.isPrivate=!0,$fz),"~N,~N,~N,~N,J.util.BS");Clazz.defineStatics(c$,"NORMIX_GEODESIC_LEVEL",3,"normixCount",0,"vertexVectors",null,"inverseNormixes",null,"neighborVertexesArrays",null,"NORMIX_NULL",9999)}),Clazz.declarePackage("J.modelset"),Clazz.declareInterface(J.modelset,"BondIterator"),Clazz.declarePackage("J.modelset"),Clazz.load(["J.modelset.BondIterator"],"J.modelset.BondIteratorSelected",null,function(){c$=Clazz.decorateAsClass(function(){this.bonds=null;this.iBond=this.bondType=this.bondCount=
0;this.bsSelected=null;this.bondSelectionModeOr=!1;Clazz.instantialize(this,arguments)},J.modelset,"BondIteratorSelected",null,J.modelset.BondIterator);Clazz.makeConstructor(c$,function(a,b,c,d,e){this.bonds=a;this.bondCount=b;this.bondType=c;this.bsSelected=d;this.bondSelectionModeOr=e},"~A,~N,~N,J.util.BS,~B");Clazz.overrideMethod(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 b=this.bsSelected.get(a.atom1.index),a=this.bsSelected.get(a.atom2.index);if(!this.bondSelectionModeOr&&b&&a||this.bondSelectionModeOr&&(b||a))return!0}}return!1});Clazz.overrideMethod(c$,"nextIndex",function(){return this.iBond});Clazz.overrideMethod(c$,"next",function(){return this.bonds[this.iBond++]})}),Clazz.declarePackage("J.modelset"),Clazz.load(["J.modelset.Bond"],
"J.modelset.HBond",["J.util.Logger"],function(){c$=Clazz.decorateAsClass(function(){this.paletteID=this.energy=0;Clazz.instantialize(this,arguments)},J.modelset,"HBond",J.modelset.Bond);Clazz.makeConstructor(c$,function(a,b,c,d,e,f){Clazz.superConstructor(this,J.modelset.HBond,[a,b,c,d,e]);this.energy=f;J.util.Logger.debugging&&J.util.Logger.info("HBond energy = "+f+" #"+this.getIdentity())},"J.modelset.Atom,J.modelset.Atom,~N,~N,~N,~N");$_M(c$,"getEnergy",function(){return this.energy});$_M(c$,"getPaletteId",
function(){return this.paletteID});Clazz.overrideMethod(c$,"setPaletteID",function(a){this.paletteID=a},"~N");c$.getEnergy=$_M(c$,"getEnergy",function(a,b,c,d){return Math.round(-27888/a- -27888/d+-27888/c- -27888/b)},"~N,~N,~N,~N");Clazz.defineStatics(c$,"QConst",-27888)}),Clazz.declarePackage("J.util"),Clazz.load(["J.util.P3i"],"J.util.TriangleData",["J.util.ArrayUtil","$.BS","$.BSUtil","$.P3"],function(){c$=Clazz.declareType(J.util,"TriangleData");c$.intersectPlane=$_M(c$,"intersectPlane",function(a,
b,c){if(null==a)return b.addLast(J.util.TriangleData.fullCubePolygon),b;var d=b.get(0);0!=c&&b.clear();for(var e=Clazz.newFloatArray(8,0),f=Array(12),g=0,h=0;8>h;h++)e[h]=a.x*d[h].x+a.y*d[h].y+a.z*d[h].z+a.w,0>e[h]&&(g|=J.util.TriangleData.Pwr2[h]);a=J.util.TriangleData.triangleTable2[g];if(null==a)return null;for(h=0;24>h;h+=2){var g=J.util.TriangleData.edgeVertexes[h],k=J.util.TriangleData.edgeVertexes[h+1],l=J.util.P3.newP(d[k]);l.sub(d[g]);l.scale(e[g]/(e[g]-e[k]));l.add(d[g]);f[h>>1]=l}if(0==
c){c=new J.util.BS;b.clear();for(h=0;h<a.length;h++)c.set(a[h]),2==h%4&&h++;h=J.util.BSUtil.cardinalityOf(c);e=Array(h);b.addLast(e);d=Clazz.newIntArray(12,0);for(h=g=0;h<a.length;h++)k=a[h],c.get(k)&&(c.clear(k),e[g]=f[k],d[k]=g++),2==h%4&&h++;f=J.util.ArrayUtil.newInt2(a.length>>2);b.addLast(f);for(h=0;h<a.length;h++)f[h>>2]=[d[a[h++]],d[a[h++]],d[a[h++]],a[h]];return b}for(h=0;h<a.length;h++)d=f[a[h++]],e=f[a[h++]],g=f[a[h++]],1==(c&1)&&b.addLast([d,e,g]),2==(c&2)&&(k=a[h],1==(k&1)&&b.addLast([d,
e]),2==(k&2)&&b.addLast([e,g]),4==(k&4)&&b.addLast([d,g]));return b},"J.util.P4,J.util.JmolList,~N");Clazz.defineStatics(c$,"Pwr2",[1,2,4,8,16,32,64,128,256,512,1024,2048],"fullCubePolygon",[[0,4,5,3],[5,1,0,3],[1,5,6,2],[6,2,1,3],[2,6,7,2],[7,3,2,3],[3,7,4,2],[4,0,3,2],[6,5,4,0],[4,7,6,0],[0,1,2,0],[2,3,0,0]]);c$.cubeVertexOffsets=c$.prototype.cubeVertexOffsets=[J.util.P3i.new3(0,0,0),J.util.P3i.new3(1,0,0),J.util.P3i.new3(1,0,1),J.util.P3i.new3(0,0,1),J.util.P3i.new3(0,1,0),J.util.P3i.new3(1,1,
0),J.util.P3i.new3(1,1,1),J.util.P3i.new3(0,1,1)];Clazz.defineStatics(c$,"edgeVertexes",[0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7],"triangleTable2",[null,[0,8,3,7],[0,1,9,7],[1,8,3,6,9,8,1,5],[1,2,10,7],[0,8,3,7,1,2,10,7],[9,2,10,6,0,2,9,5],[2,8,3,6,2,10,8,1,10,9,8,3],[3,11,2,7],[0,11,2,6,8,11,0,5],[1,9,0,7,2,3,11,7],[1,11,2,6,1,9,11,1,9,8,11,3],[3,10,1,6,11,10,3,5],[0,10,1,6,0,8,10,1,8,11,10,3],[3,9,0,6,3,11,9,1,11,10,9,3],[9,8,10,5,10,8,11,6],[4,7,8,7],[4,3,0,6,7,3,4,5],[0,1,9,7,8,4,7,7],
[4,1,9,6,4,7,1,1,7,3,1,3],[1,2,10,7,8,4,7,7],[3,4,7,6,3,0,4,3,1,2,10,7],[9,2,10,6,9,0,2,3,8,4,7,7],[2,10,9,3,2,9,7,0,2,7,3,6,7,9,4,6],[8,4,7,7,3,11,2,7],[11,4,7,6,11,2,4,1,2,0,4,3],[9,0,1,7,8,4,7,7,2,3,11,7],[4,7,11,3,9,4,11,1,9,11,2,2,9,2,1,6],[3,10,1,6,3,11,10,3,7,8,4,7],[1,11,10,6,1,4,11,0,1,0,4,3,7,11,4,5],[4,7,8,7,9,0,11,1,9,11,10,6,11,0,3,6],[4,7,11,3,4,11,9,4,9,11,10,6],[9,5,4,7],[9,5,4,7,0,8,3,7],[0,5,4,6,1,5,0,5],[8,5,4,6,8,3,5,1,3,1,5,3],[1,2,10,7,9,5,4,7],[3,0,8,7,1,2,10,7,4,9,5,7],[5,
2,10,6,5,4,2,1,4,0,2,3],[2,10,5,3,3,2,5,1,3,5,4,2,3,4,8,6],[9,5,4,7,2,3,11,7],[0,11,2,6,0,8,11,3,4,9,5,7],[0,5,4,6,0,1,5,3,2,3,11,7],[2,1,5,3,2,5,8,0,2,8,11,6,4,8,5,5],[10,3,11,6,10,1,3,3,9,5,4,7],[4,9,5,7,0,8,1,5,8,10,1,2,8,11,10,3],[5,4,0,3,5,0,11,0,5,11,10,6,11,0,3,6],[5,4,8,3,5,8,10,4,10,8,11,6],[9,7,8,6,5,7,9,5],[9,3,0,6,9,5,3,1,5,7,3,3],[0,7,8,6,0,1,7,1,1,5,7,3],[1,5,3,5,3,5,7,6],[9,7,8,6,9,5,7,3,10,1,2,7],[10,1,2,7,9,5,0,5,5,3,0,2,5,7,3,3],[8,0,2,3,8,2,5,0,8,5,7,6,10,5,2,5],[2,10,5,3,2,5,3,
4,3,5,7,6],[7,9,5,6,7,8,9,3,3,11,2,7],[9,5,7,3,9,7,2,0,9,2,0,6,2,7,11,6],[2,3,11,7,0,1,8,5,1,7,8,2,1,5,7,3],[11,2,1,3,11,1,7,4,7,1,5,6],[9,5,8,5,8,5,7,6,10,1,3,3,10,3,11,6],[5,7,0,1,5,0,9,6,7,11,0,1,1,0,10,5,11,10,0,1],[11,10,0,1,11,0,3,6,10,5,0,1,8,0,7,5,5,7,0,1],[11,10,5,3,7,11,5,5],[10,6,5,7],[0,8,3,7,5,10,6,7],[9,0,1,7,5,10,6,7],[1,8,3,6,1,9,8,3,5,10,6,7],[1,6,5,6,2,6,1,5],[1,6,5,6,1,2,6,3,3,0,8,7],[9,6,5,6,9,0,6,1,0,2,6,3],[5,9,8,3,5,8,2,0,5,2,6,6,3,2,8,5],[2,3,11,7,10,6,5,7],[11,0,8,6,11,2,
0,3,10,6,5,7],[0,1,9,7,2,3,11,7,5,10,6,7],[5,10,6,7,1,9,2,5,9,11,2,2,9,8,11,3],[6,3,11,6,6,5,3,1,5,1,3,3],[0,8,11,3,0,11,5,0,0,5,1,6,5,11,6,6],[3,11,6,3,0,3,6,1,0,6,5,2,0,5,9,6],[6,5,9,3,6,9,11,4,11,9,8,6],[5,10,6,7,4,7,8,7],[4,3,0,6,4,7,3,3,6,5,10,7],[1,9,0,7,5,10,6,7,8,4,7,7],[10,6,5,7,1,9,7,1,1,7,3,6,7,9,4,6],[6,1,2,6,6,5,1,3,4,7,8,7],[1,2,5,5,5,2,6,6,3,0,4,3,3,4,7,6],[8,4,7,7,9,0,5,5,0,6,5,2,0,2,6,3],[7,3,9,1,7,9,4,6,3,2,9,1,5,9,6,5,2,6,9,1],[3,11,2,7,7,8,4,7,10,6,5,7],[5,10,6,7,4,7,2,1,4,2,0,
6,2,7,11,6],[0,1,9,7,4,7,8,7,2,3,11,7,5,10,6,7],[9,2,1,6,9,11,2,2,9,4,11,1,7,11,4,5,5,10,6,7],[8,4,7,7,3,11,5,1,3,5,1,6,5,11,6,6],[5,1,11,1,5,11,6,6,1,0,11,1,7,11,4,5,0,4,11,1],[0,5,9,6,0,6,5,2,0,3,6,1,11,6,3,5,8,4,7,7],[6,5,9,3,6,9,11,4,4,7,9,5,7,11,9,1],[10,4,9,6,6,4,10,5],[4,10,6,6,4,9,10,3,0,8,3,7],[10,0,1,6,10,6,0,1,6,4,0,3],[8,3,1,3,8,1,6,0,8,6,4,6,6,1,10,6],[1,4,9,6,1,2,4,1,2,6,4,3],[3,0,8,7,1,2,9,5,2,4,9,2,2,6,4,3],[0,2,4,5,4,2,6,6],[8,3,2,3,8,2,4,4,4,2,6,6],[10,4,9,6,10,6,4,3,11,2,3,7],[0,
8,2,5,2,8,11,6,4,9,10,3,4,10,6,6],[3,11,2,7,0,1,6,1,0,6,4,6,6,1,10,6],[6,4,1,1,6,1,10,6,4,8,1,1,2,1,11,5,8,11,1,1],[9,6,4,6,9,3,6,0,9,1,3,3,11,6,3,5],[8,11,1,1,8,1,0,6,11,6,1,1,9,1,4,5,6,4,1,1],[3,11,6,3,3,6,0,4,0,6,4,6],[6,4,8,3,11,6,8,5],[7,10,6,6,7,8,10,1,8,9,10,3],[0,7,3,6,0,10,7,0,0,9,10,3,6,7,10,5],[10,6,7,3,1,10,7,1,1,7,8,2,1,8,0,6],[10,6,7,3,10,7,1,4,1,7,3,6],[1,2,6,3,1,6,8,0,1,8,9,6,8,6,7,6],[2,6,9,1,2,9,1,6,6,7,9,1,0,9,3,5,7,3,9,1],[7,8,0,3,7,0,6,4,6,0,2,6],[7,3,2,3,6,7,2,5],[2,3,11,7,10,
6,8,1,10,8,9,6,8,6,7,6],[2,0,7,1,2,7,11,6,0,9,7,1,6,7,10,5,9,10,7,1],[1,8,0,6,1,7,8,2,1,10,7,1,6,7,10,5,2,3,11,7],[11,2,1,3,11,1,7,4,10,6,1,5,6,7,1,1],[8,9,6,1,8,6,7,6,9,1,6,1,11,6,3,5,1,3,6,1],[0,9,1,7,11,6,7,7],[7,8,0,3,7,0,6,4,3,11,0,5,11,6,0,1],[7,11,6,7],[7,6,11,7],[3,0,8,7,11,7,6,7],[0,1,9,7,11,7,6,7],[8,1,9,6,8,3,1,3,11,7,6,7],[10,1,2,7,6,11,7,7],[1,2,10,7,3,0,8,7,6,11,7,7],[2,9,0,6,2,10,9,3,6,11,7,7],[6,11,7,7,2,10,3,5,10,8,3,2,10,9,8,3],[7,2,3,6,6,2,7,5],[7,0,8,6,7,6,0,1,6,2,0,3],[2,7,6,
6,2,3,7,3,0,1,9,7],[1,6,2,6,1,8,6,0,1,9,8,3,8,7,6,3],[10,7,6,6,10,1,7,1,1,3,7,3],[10,7,6,6,1,7,10,4,1,8,7,2,1,0,8,3],[0,3,7,3,0,7,10,0,0,10,9,6,6,10,7,5],[7,6,10,3,7,10,8,4,8,10,9,6],[6,8,4,6,11,8,6,5],[3,6,11,6,3,0,6,1,0,4,6,3],[8,6,11,6,8,4,6,3,9,0,1,7],[9,4,6,3,9,6,3,0,9,3,1,6,11,3,6,5],[6,8,4,6,6,11,8,3,2,10,1,7],[1,2,10,7,3,0,11,5,0,6,11,2,0,4,6,3],[4,11,8,6,4,6,11,3,0,2,9,5,2,10,9,3],[10,9,3,1,10,3,2,6,9,4,3,1,11,3,6,5,4,6,3,1],[8,2,3,6,8,4,2,1,4,6,2,3],[0,4,2,5,4,6,2,3],[1,9,0,7,2,3,4,1,2,
4,6,6,4,3,8,6],[1,9,4,3,1,4,2,4,2,4,6,6],[8,1,3,6,8,6,1,0,8,4,6,3,6,10,1,3],[10,1,0,3,10,0,6,4,6,0,4,6],[4,6,3,1,4,3,8,6,6,10,3,1,0,3,9,5,10,9,3,1],[10,9,4,3,6,10,4,5],[4,9,5,7,7,6,11,7],[0,8,3,7,4,9,5,7,11,7,6,7],[5,0,1,6,5,4,0,3,7,6,11,7],[11,7,6,7,8,3,4,5,3,5,4,2,3,1,5,3],[9,5,4,7,10,1,2,7,7,6,11,7],[6,11,7,7,1,2,10,7,0,8,3,7,4,9,5,7],[7,6,11,7,5,4,10,5,4,2,10,2,4,0,2,3],[3,4,8,6,3,5,4,2,3,2,5,1,10,5,2,5,11,7,6,7],[7,2,3,6,7,6,2,3,5,4,9,7],[9,5,4,7,0,8,6,1,0,6,2,6,6,8,7,6],[3,6,2,6,3,7,6,3,1,5,
0,5,5,4,0,3],[6,2,8,1,6,8,7,6,2,1,8,1,4,8,5,5,1,5,8,1],[9,5,4,7,10,1,6,5,1,7,6,2,1,3,7,3],[1,6,10,6,1,7,6,2,1,0,7,1,8,7,0,5,9,5,4,7],[4,0,10,1,4,10,5,6,0,3,10,1,6,10,7,5,3,7,10,1],[7,6,10,3,7,10,8,4,5,4,10,5,4,8,10,1],[6,9,5,6,6,11,9,1,11,8,9,3],[3,6,11,6,0,6,3,4,0,5,6,2,0,9,5,3],[0,11,8,6,0,5,11,0,0,1,5,3,5,6,11,3],[6,11,3,3,6,3,5,4,5,3,1,6],[1,2,10,7,9,5,11,1,9,11,8,6,11,5,6,6],[0,11,3,6,0,6,11,2,0,9,6,1,5,6,9,5,1,2,10,7],[11,8,5,1,11,5,6,6,8,0,5,1,10,5,2,5,0,2,5,1],[6,11,3,3,6,3,5,4,2,10,3,5,10,
5,3,1],[5,8,9,6,5,2,8,0,5,6,2,3,3,8,2,5],[9,5,6,3,9,6,0,4,0,6,2,6],[1,5,8,1,1,8,0,6,5,6,8,1,3,8,2,5,6,2,8,1],[1,5,6,3,2,1,6,5],[1,3,6,1,1,6,10,6,3,8,6,1,5,6,9,5,8,9,6,1],[10,1,0,3,10,0,6,4,9,5,0,5,5,6,0,1],[0,3,8,7,5,6,10,7],[10,5,6,7],[11,5,10,6,7,5,11,5],[11,5,10,6,11,7,5,3,8,3,0,7],[5,11,7,6,5,10,11,3,1,9,0,7],[10,7,5,6,10,11,7,3,9,8,1,5,8,3,1,3],[11,1,2,6,11,7,1,1,7,5,1,3],[0,8,3,7,1,2,7,1,1,7,5,6,7,2,11,6],[9,7,5,6,9,2,7,0,9,0,2,3,2,11,7,3],[7,5,2,1,7,2,11,6,5,9,2,1,3,2,8,5,9,8,2,1],[2,5,10,
6,2,3,5,1,3,7,5,3],[8,2,0,6,8,5,2,0,8,7,5,3,10,2,5,5],[9,0,1,7,5,10,3,1,5,3,7,6,3,10,2,6],[9,8,2,1,9,2,1,6,8,7,2,1,10,2,5,5,7,5,2,1],[1,3,5,5,3,7,5,3],[0,8,7,3,0,7,1,4,1,7,5,6],[9,0,3,3,9,3,5,4,5,3,7,6],[9,8,7,3,5,9,7,5],[5,8,4,6,5,10,8,1,10,11,8,3],[5,0,4,6,5,11,0,0,5,10,11,3,11,3,0,3],[0,1,9,7,8,4,10,1,8,10,11,6,10,4,5,6],[10,11,4,1,10,4,5,6,11,3,4,1,9,4,1,5,3,1,4,1],[2,5,1,6,2,8,5,0,2,11,8,3,4,5,8,5],[0,4,11,1,0,11,3,6,4,5,11,1,2,11,1,5,5,1,11,1],[0,2,5,1,0,5,9,6,2,11,5,1,4,5,8,5,11,8,5,1],[9,
4,5,7,2,11,3,7],[2,5,10,6,3,5,2,4,3,4,5,2,3,8,4,3],[5,10,2,3,5,2,4,4,4,2,0,6],[3,10,2,6,3,5,10,2,3,8,5,1,4,5,8,5,0,1,9,7],[5,10,2,3,5,2,4,4,1,9,2,5,9,4,2,1],[8,4,5,3,8,5,3,4,3,5,1,6],[0,4,5,3,1,0,5,5],[8,4,5,3,8,5,3,4,9,0,5,5,0,3,5,1],[9,4,5,7],[4,11,7,6,4,9,11,1,9,10,11,3],[0,8,3,7,4,9,7,5,9,11,7,2,9,10,11,3],[1,10,11,3,1,11,4,0,1,4,0,6,7,4,11,5],[3,1,4,1,3,4,8,6,1,10,4,1,7,4,11,5,10,11,4,1],[4,11,7,6,9,11,4,4,9,2,11,2,9,1,2,3],[9,7,4,6,9,11,7,2,9,1,11,1,2,11,1,5,0,8,3,7],[11,7,4,3,11,4,2,4,2,4,
0,6],[11,7,4,3,11,4,2,4,8,3,4,5,3,2,4,1],[2,9,10,6,2,7,9,0,2,3,7,3,7,4,9,3],[9,10,7,1,9,7,4,6,10,2,7,1,8,7,0,5,2,0,7,1],[3,7,10,1,3,10,2,6,7,4,10,1,1,10,0,5,4,0,10,1],[1,10,2,7,8,7,4,7],[4,9,1,3,4,1,7,4,7,1,3,6],[4,9,1,3,4,1,7,4,0,8,1,5,8,7,1,1],[4,0,3,3,7,4,3,5],[4,8,7,7],[9,10,8,5,10,11,8,3],[3,0,9,3,3,9,11,4,11,9,10,6],[0,1,10,3,0,10,8,4,8,10,11,6],[3,1,10,3,11,3,10,5],[1,2,11,3,1,11,9,4,9,11,8,6],[3,0,9,3,3,9,11,4,1,2,9,5,2,11,9,1],[0,2,11,3,8,0,11,5],[3,2,11,7],[2,3,8,3,2,8,10,4,10,8,9,6],[9,
10,2,3,0,9,2,5],[2,3,8,3,2,8,10,4,0,1,8,5,1,10,8,1],[1,10,2,7],[1,3,8,3,9,1,8,5],[0,9,1,7],[0,3,8,7],null])}),Clazz.declarePackage("J.bspt"),Clazz.load(null,"J.bspt.Bspf",["J.bspt.Bspt","J.util.ArrayUtil","$.Logger"],function(){c$=Clazz.decorateAsClass(function(){this.dimMax=0;this.bspts=null;this.isValid=!1;this.cubeIterators=this.bsptsValid=null;Clazz.instantialize(this,arguments)},J.bspt,"Bspf");$_M(c$,"validate",function(a){this.isValid=a},"~B");$_M(c$,"validateModel",function(a,b){this.bsptsValid[a]=
b},"~N,~B");$_M(c$,"isInitialized",function(){return this.isValid});$_M(c$,"isInitializedIndex",function(a){return this.bspts.length>a&&null!=this.bspts[a]&&this.bsptsValid[a]},"~N");Clazz.makeConstructor(c$,function(a){this.dimMax=a;this.bspts=[];this.bsptsValid=Clazz.newBooleanArray(0,!1);this.cubeIterators=[]},"~N");$_M(c$,"getBsptCount",function(){return this.bspts.length});$_M(c$,"addTuple",function(a,b){a>=this.bspts.length&&(this.bspts=J.util.ArrayUtil.arrayCopyObject(this.bspts,a+1),this.bsptsValid=
J.util.ArrayUtil.arrayCopyBool(this.bsptsValid,a+1));var c=this.bspts[a];null==c&&(c=this.bspts[a]=new J.bspt.Bspt(this.dimMax,a));c.addTuple(b)},"~N,J.util.P3");$_M(c$,"stats",function(){for(var a=0;a<this.bspts.length;++a)null!=this.bspts[a]&&this.bspts[a].stats()});$_M(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("<<<<")});$_M(c$,"getCubeIterator",function(a){if(0>a)return this.getNewCubeIterator(-1-
a);a>=this.cubeIterators.length&&(this.cubeIterators=J.util.ArrayUtil.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");$_M(c$,"getNewCubeIterator",function(a){return this.bspts[a].allocateCubeIterator()},"~N");$_M(c$,"initialize",function(a,b,c){null!=this.bspts[a]&&this.bspts[a].reset();for(var d=c.nextSetBit(0);0<=d;d=c.nextSetBit(d+
1))this.addTuple(a,b[d]);this.bsptsValid[a]=!0},"~N,~A,J.util.BS")}),Clazz.declarePackage("J.io"),Clazz.load(null,"J.io.XmlUtil",["J.util.TextFormat"],function(){c$=Clazz.declareType(J.io,"XmlUtil");c$.openDocument=$_M(c$,"openDocument",function(a){a.append('<?xml version="1.0"?>\n')},"J.util.SB");c$.openTag=$_M(c$,"openTag",function(a,b){a.append("<").append(b).append(">\n")},"J.util.SB,~S");c$.openTagAttr=$_M(c$,"openTagAttr",function(a,b,c){J.io.XmlUtil.appendTagAll(a,b,c,null,!1,!1);a.append("\n")},
"J.util.SB,~S,~A");c$.closeTag=$_M(c$,"closeTag",function(a,b){a.append("</").append(b).append(">\n")},"J.util.SB,~S");c$.appendTagAll=$_M(c$,"appendTagAll",function(a,b,c,d,e,f){var g=">";b.endsWith("/")&&(b=b.substring(0,b.length-1),null==d&&(g="/>\n",f=!1));a.append("<").append(b);if(null!=c)for(var h=0;h<c.length;h++){var k=c[h];if(null!=k)if(Clazz.instanceOf(k,Array))for(var l=0;l<k.length;l+=2)J.io.XmlUtil.appendAttrib(a,k[l],k[l+1]);else J.io.XmlUtil.appendAttrib(a,k,c[++h])}a.append(g);null!=
d&&(e&&(d=J.io.XmlUtil.wrapCdata(d)),a.appendO(d));f&&J.io.XmlUtil.closeTag(a,b)},"J.util.SB,~S,~A,~O,~B,~B");c$.wrapCdata=$_M(c$,"wrapCdata",function(a){a=""+a;return 0>a.indexOf("&")&&0>a.indexOf("<")?(a.startsWith("\n")?"":"\n")+a:"<![CDATA["+J.util.TextFormat.simpleReplace(a,"]]\x3e","]]]]\x3e<![CDATA[>")+"]]\x3e"},"~O");c$.unwrapCdata=$_M(c$,"unwrapCdata",function(a){return a.startsWith("<![CDATA[")&&a.endsWith("]]\x3e")?a.substring(9,a.length-3).$replace("]]]]\x3e<![CDATA[>","]]\x3e"):a},"~S");
c$.appendTagObj=$_M(c$,"appendTagObj",function(a,b,c,d){J.io.XmlUtil.appendTagAll(a,b,c,d,!1,!0)},"J.util.SB,~S,~A,~O");c$.appendTag=$_M(c$,"appendTag",function(a,b,c){Clazz.instanceOf(c,Array)?J.io.XmlUtil.appendTagAll(a,b,c,null,!1,!0):J.io.XmlUtil.appendTagAll(a,b,null,c,!1,!0)},"J.util.SB,~S,~O");c$.appendCdata=$_M(c$,"appendCdata",function(a,b,c,d){J.io.XmlUtil.appendTagAll(a,b,c,d,!0,!0)},"J.util.SB,~S,~A,~S");c$.appendAttrib=$_M(c$,"appendAttrib",function(a,b,c){null!=c&&a.append(" ").appendO(b).append('="').appendO(c).append('"')},
"J.util.SB,~O,~O")}),Clazz.declarePackage("J.api"),Clazz.declareInterface(J.api,"AtomIndexIterator"),Clazz.declarePackage("J.modelset"),Clazz.load(["J.api.AtomIndexIterator"],"J.modelset.AtomIteratorWithinModel",["J.atomdata.RadiusData"],function(){c$=Clazz.decorateAsClass(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;Clazz.instantialize(this,arguments)},J.modelset,"AtomIteratorWithinModel",null,J.api.AtomIndexIterator);Clazz.makeConstructor(c$,function(){});$_M(c$,"initialize",function(a,b,c,d,e,f){this.bspf=a;this.bsSelected=b;this.isGreaterOnly=c;this.isZeroBased=d;this.hemisphereOnly=e;this.threadSafe=f;this.cubeIterator=null},"J.bspt.Bspf,J.util.BS,~B,~B,~B,~B");Clazz.overrideMethod(c$,"setModel",function(a,b,c,d,e,
f,g){this.threadSafe&&(b=-1-b);if(b!=this.modelIndex||null==this.cubeIterator)this.cubeIterator=this.bspf.getCubeIterator(b),this.modelIndex=b;this.zeroBase=this.isZeroBased?c:0;if(-2147483648!=f){this.atomIndex=0>f?-1:d;if(this.isVdw=null!=g)this.radiusData=g,this.atoms=a.atoms,this.viewer=a.viewer,f=g.factorType===J.atomdata.RadiusData.EnumType.OFFSET?5+g.value:5*g.value,this.vdw1=this.atoms[d].getVanderwaalsRadiusFloat(this.viewer,g.vdwType);this.checkGreater=this.isGreaterOnly&&2147483647!=d;
this.setCenter(e,f)}},"J.modelset.ModelCollection,~N,~N,~N,J.util.P3,~N,J.atomdata.RadiusData");Clazz.overrideMethod(c$,"setCenter",function(a,b){this.setCenter2(a,b)},"J.util.P3,~N");$_M(c$,"setCenter2",function(a,b){null!=this.cubeIterator&&(this.cubeIterator.initialize(a,b,this.hemisphereOnly),this.distanceSquared=b*b)},"J.util.P3,~N");Clazz.overrideMethod(c$,"hasNext",function(){return this.hasNext2()});$_M(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});Clazz.overrideMethod(c$,"next",function(){return this.iNext-this.zeroBase});Clazz.overrideMethod(c$,"foundDistance2",function(){return null==this.cubeIterator?-1:this.cubeIterator.foundDistance2()});
Clazz.overrideMethod(c$,"addAtoms",function(a){for(var b;this.hasNext();)if(0<=(b=this.next())){var c;if(this.isVdw){c=this.atoms[b].getVanderwaalsRadiusFloat(this.viewer,this.radiusData.vdwType)+this.vdw1;switch(this.radiusData.factorType){case J.atomdata.RadiusData.EnumType.OFFSET:c+=2*this.radiusData.value;break;case J.atomdata.RadiusData.EnumType.FACTOR:c*=this.radiusData.value}c*=c}else c=this.distanceSquared;this.foundDistance2()<=c&&a.set(b)}},"J.util.BS");Clazz.overrideMethod(c$,"release",
function(){null!=this.cubeIterator&&(this.cubeIterator.release(),this.cubeIterator=null)})}),Clazz.declarePackage("J.modelset"),Clazz.load(["J.modelset.AtomIteratorWithinModel"],"J.modelset.AtomIteratorWithinModelSet",null,function(){c$=Clazz.decorateAsClass(function(){this.center=this.bsModels=null;this.distance=0;Clazz.instantialize(this,arguments)},J.modelset,"AtomIteratorWithinModelSet",J.modelset.AtomIteratorWithinModel);Clazz.makeConstructor(c$,function(a){Clazz.superConstructor(this,J.modelset.AtomIteratorWithinModelSet,
[]);this.bsModels=a},"J.util.BS");Clazz.overrideMethod(c$,"setCenter",function(a,b){this.center=a;this.distance=b;this.set(0)},"J.util.P3,~N");$_M(c$,"set",($fz=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},$fz.isPrivate=!0,$fz),"~N");Clazz.overrideMethod(c$,"hasNext",function(){return this.hasNext2()?!0:!this.set(this.modelIndex+1)?!1:this.hasNext()})}),
Clazz.declarePackage("J.bspt"),Clazz.load(null,"J.bspt.Bspt",["J.bspt.CubeIterator","$.Leaf","J.util.Logger","$.SB"],function(){c$=Clazz.decorateAsClass(function(){this.index=this.dimMax=this.treeDepth=0;this.eleRoot=null;Clazz.instantialize(this,arguments)},J.bspt,"Bspt");Clazz.makeConstructor(c$,function(a,b){this.dimMax=a;this.index=b;this.reset()},"~N,~N");$_M(c$,"reset",function(){this.eleRoot=new J.bspt.Leaf(this,null,0);this.treeDepth=1});$_M(c$,"addTuple",function(a){this.eleRoot=this.eleRoot.addTuple(0,
a)},"J.util.P3");$_M(c$,"stats",function(){});$_M(c$,"dump",function(){var a=new J.util.SB;this.eleRoot.dump(0,a);J.util.Logger.info(a.toString())});$_M(c$,"allocateCubeIterator",function(){return new J.bspt.CubeIterator(this)});Clazz.defineStatics(c$,"leafCountMax",2,"MAX_TREE_DEPTH",100)}),Clazz.declarePackage("J.util"),Clazz.load(["J.util.Elements"],"J.util.JmolMolecule",["J.util.ArrayUtil","$.BS","$.BSUtil"],function(){c$=Clazz.decorateAsClass(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;Clazz.instantialize(this,arguments)},J.util,"JmolMolecule");Clazz.prepareFields(c$,function(){this.elementCounts=Clazz.newIntArray(J.util.Elements.elementNumberMax,0);this.altElementCounts=Clazz.newIntArray(J.util.Elements.altElementMax,0)});Clazz.makeConstructor(c$,function(){});c$.getMolecules=$_M(c$,"getMolecules",
function(a,b,c,d){var e=null,f=new J.util.BS,g=-1,h=0,k=0,l=Array(4);null==d&&(d=new J.util.BS);for(var m=0;m<a.length;m++)if(!d.get(m)&&!f.get(m))if(a[m].isDeleted())d.set(m);else{var n=a[m].getModelIndex();n!=g&&(g=n,h=0,e=b[n]);f=J.util.JmolMolecule.getBranchBitSet(a,m,e,c,-1,!0,!0);0<=f.nextSetBit(0)&&(l=J.util.JmolMolecule.addMolecule(l,k++,a,m,f,n,h++,d))}return J.util.JmolMolecule.allocateArray(l,k)},"~A,~A,J.util.JmolList,J.util.BS");c$.getBranchBitSet=$_M(c$,"getBranchBitSet",function(a,
b,c,d,e,f,g){var h=J.util.BSUtil.newBitSet(a.length);if(0>b)return h;0<=e&&c.clear(e);return J.util.JmolMolecule.getCovalentlyConnectedBitSet(a,a[b],c,f,g,d,h)?h:new J.util.BS},"~A,~N,J.util.BS,J.util.JmolList,~N,~B,~B");c$.addMolecule=$_M(c$,"addMolecule",function(a,b,c,d,e,f,g,h){h.or(e);b==a.length&&(a=J.util.JmolMolecule.allocateArray(a,2*b+1));a[b]=J.util.JmolMolecule.initialize(c,b,d,e,f,g);return a},"~A,~N,~A,~N,J.util.BS,~N,~N,J.util.BS");c$.getMolecularFormula=$_M(c$,"getMolecularFormula",
function(a,b,c){var d=new J.util.JmolMolecule;d.nodes=a;d.atomList=b;return d.getMolecularFormula(c)},"~A,J.util.BS,~B");$_M(c$,"getMolecularFormula",function(a){if(null!=this.mf)return this.mf;this.getElementAndAtomCount(a);for(var b=a="",c,d=1;d<=this.elementNumberMax;d++)c=this.elementCounts[d],0!=c&&(a+=b+J.util.Elements.elementSymbolFromNumber(d)+" "+c,b=" ");for(d=1;d<=this.altElementMax;d++)c=this.altElementCounts[d],0!=c&&(a+=b+J.util.Elements.elementSymbolFromNumber(J.util.Elements.altElementNumberFromIndex(d))+
" "+c,b=" ");return a},"~B");c$.initialize=$_M(c$,"initialize",($fz=function(a,b,c,d,e,f){var g=new J.util.JmolMolecule;g.nodes=a;g.firstAtomIndex=c;g.atomList=d;g.atomCount=d.cardinality();g.moleculeIndex=b;g.modelIndex=e;g.indexInModel=f;return g},$fz.isPrivate=!0,$fz),"~A,~N,~N,J.util.BS,~N,~N");$_M(c$,"getElementAndAtomCount",($fz=function(a){null==this.atomList&&(this.atomList=new J.util.BS,this.atomList.setBits(0,this.nodes.length));this.elementCounts=Clazz.newIntArray(J.util.Elements.elementNumberMax,
0);this.altElementCounts=Clazz.newIntArray(J.util.Elements.altElementMax,0);this.atomCount=this.atomList.cardinality();for(var b=this.atomList.nextSetBit(0);0<=b;b=this.atomList.nextSetBit(b+1)){var c=this.nodes[b].getAtomicAndIsotopeNumber();c<J.util.Elements.elementNumberMax?(this.elementCounts[c]++,1==this.elementCounts[c]&&this.nElements++,this.elementNumberMax=Math.max(this.elementNumberMax,c),a&&(c=this.nodes[b].getImplicitHydrogenCount(),0<c&&(0==this.elementCounts[1]&&this.nElements++,this.elementCounts[1]+=
c))):(c=J.util.Elements.altElementIndexFromNumber(c),this.altElementCounts[c]++,1==this.altElementCounts[c]&&this.nElements++,this.altElementMax=Math.max(this.altElementMax,c))}},$fz.isPrivate=!0,$fz),"~B");c$.getCovalentlyConnectedBitSet=$_M(c$,"getCovalentlyConnectedBitSet",($fz=function(a,b,c,d,e,f,g){var h=b.getIndex();if(!c.get(h)||!e&&0<b.getBioStructureTypeName().length)return d;c.clear(h);if(null!=f&&!g.get(h))for(var k=f.size();0<=--k;){var l=f.get(k);if(l.get(h)){g.or(l);c.andNot(l);for(k=
l.nextSetBit(0);0<=k;k=l.nextSetBit(k+1)){var m=a[k];c.set(k);J.util.JmolMolecule.getCovalentlyConnectedBitSet(a,m,c,d,e,f,g);c.clear(k)}break}}g.set(h);h=b.getEdges();if(null==h)return!0;for(k=h.length;0<=--k;)if(l=h[k],l.isCovalent()&&!J.util.JmolMolecule.getCovalentlyConnectedBitSet(a,l.getOtherAtomNode(b),c,d,e,f,g))return!1;return!0},$fz.isPrivate=!0,$fz),"~A,J.util.JmolNode,J.util.BS,~B,~B,J.util.JmolList,J.util.BS");c$.allocateArray=$_M(c$,"allocateArray",($fz=function(a,b){return b==a.length?
a:J.util.ArrayUtil.arrayCopyObject(a,b)},$fz.isPrivate=!0,$fz),"~A,~N")}),Clazz.declarePackage("J.modelset"),c$=Clazz.decorateAsClass(function(){this.id="";this.type=" ";this.scale=this.tickLabelFormats=this.ticks=null;this.first=0;this.signFactor=1;this.reference=null;Clazz.instantialize(this,arguments)},J.modelset,"TickInfo"),Clazz.makeConstructor(c$,function(a){this.ticks=a},"J.util.P3"),Clazz.declarePackage("J.script"),Clazz.load(["java.lang.Exception"],"J.script.ScriptException",null,function(){c$=
Clazz.decorateAsClass(function(){this.untranslated=this.message=this.eval=null;Clazz.instantialize(this,arguments)},J.script,"ScriptException",Exception);Clazz.makeConstructor(c$,function(a,b,c,d){Clazz.superConstructor(this,J.script.ScriptException,[]);this.eval=a;this.message=b;d&&this.eval.setException(this,b,c)},"J.api.JmolScriptEvaluator,~S,~S,~B");$_M(c$,"getErrorMessageUntranslated",function(){return this.untranslated});Clazz.overrideMethod(c$,"toString",function(){return this.message})}),
Clazz.declarePackage("J.bspt"),c$=Clazz.decorateAsClass(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;Clazz.instantialize(this,arguments)},J.bspt,"CubeIterator"),Clazz.makeConstructor(c$,function(a){this.set(a)},"J.bspt.Bspt"),$_M(c$,"set",function(a){this.bspt=a;this.stack=Array(a.treeDepth)},"J.bspt.Bspt"),$_M(c$,"initialize",function(a,b,c){this.radius=b;this.tHemisphere=!1;this.cx=
a.x;this.cy=a.y;this.cz=a.z;this.leaf=null;this.stack[0]=this.bspt.eleRoot;this.sp=1;this.findLeftLeaf();this.tHemisphere=c},"J.util.P3,~N,~B"),$_M(c$,"release",function(){this.set(this.bspt)}),$_M(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}),$_M(c$,"nextElement",function(){return this.leaf.tuples[this.leafIndex++]}),$_M(c$,"foundDistance2",
function(){return this.dx*this.dx+this.dy*this.dy+this.dz*this.dz}),$_M(c$,"findLeftLeaf",($fz=function(){this.leaf=null;if(0!=this.sp){for(var a=this.stack[--this.sp];Clazz.instanceOf(a,J.bspt.Node);){var b;switch(a.dim){case 0:b=this.cx;break;case 1:b=this.cy;break;default:b=this.cz}var c=b+this.radius;if(!this.tHemisphere||0!=a.dim)b-=this.radius;if(b<=a.maxLeft&&c>=a.minLeft)c>=a.minRight&&b<=a.maxRight&&(this.stack[this.sp++]=a.eleRight),a=a.eleLeft;else if(c>=a.minRight&&b<=a.maxRight)a=a.eleRight;
else{if(0==this.sp)return;a=this.stack[--this.sp]}}this.leaf=a;this.leafIndex=0}},$fz.isPrivate=!0,$fz)),$_M(c$,"isWithinRadius",($fz=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},$fz.isPrivate=!0,$fz),"J.util.P3"),Clazz.declarePackage("J.bspt"),c$=Clazz.decorateAsClass(function(){this.bspt=null;this.count=0;Clazz.instantialize(this,arguments)},
J.bspt,"Element"),Clazz.declarePackage("J.bspt"),Clazz.load(["J.bspt.Element"],"J.bspt.Leaf",["J.bspt.Node","J.util.Escape"],function(){c$=Clazz.decorateAsClass(function(){this.tuples=null;Clazz.instantialize(this,arguments)},J.bspt,"Leaf",J.bspt.Element);Clazz.makeConstructor(c$,function(a,b,c){Clazz.superConstructor(this,J.bspt.Leaf,[]);this.bspt=a;this.count=0;this.tuples=Array(2);if(null!=b){for(a=c;2>a;++a)this.tuples[this.count++]=b.tuples[a],b.tuples[a]=null;b.count=c}},"J.bspt.Bspt,J.bspt.Leaf,~N");
$_M(c$,"sort",function(a){for(var b=this.count;0<--b;)for(var c=this.tuples[b],d=J.bspt.Node.getDimensionValue(c,a),e=b;0<=--e;){var f=this.tuples[e],g=J.bspt.Node.getDimensionValue(f,a);g>d&&(this.tuples[b]=f,this.tuples[e]=c,c=f,d=g)}},"~N");Clazz.overrideMethod(c$,"addTuple",function(a,b){return 2>this.count?(this.tuples[this.count++]=b,this):(new J.bspt.Node(this.bspt,a,this)).addTuple(a,b)},"~N,J.util.P3");Clazz.overrideMethod(c$,"dump",function(a,b){for(var c=0;c<this.count;++c){for(var d=this.tuples[c],
e=0;e<a;++e)b.append(".");b.append(J.util.Escape.eP(d)).append("Leaf ").appendI(c).append(": ").append(d.getInfo())}},"~N,J.util.SB");Clazz.overrideMethod(c$,"toString",function(){return"leaf:"+this.count+"\n"})}),Clazz.declarePackage("J.shape"),Clazz.load(null,"J.shape.Object2d",["java.lang.Float","J.util.C"],function(){c$=Clazz.decorateAsClass(function(){this.isLabelOrHover=!1;this.script=this.target=this.xyz=this.gdata=this.viewer=null;this.movableZ=this.movableY=this.movableX=this.valign=this.align=
this.pointer=this.bgcolix=this.colix=0;this.movableZPercent=this.movableYPercent=this.movableXPercent=2147483647;this.offsetY=this.offsetX=0;this.z=1;this.zSlab=-2147483648;this.pymolOffset=null;this.windowHeight=this.windowWidth=0;this.adjustForWindow=!1;this.boxY=this.boxX=this.boxHeight=this.boxWidth=0;this.modelIndex=-1;this.visible=!0;this.hidden=!1;this.boxXY=null;this.scalePixelsPerMicron=0;Clazz.instantialize(this,arguments)},J.shape,"Object2d");Clazz.prepareFields(c$,function(){this.boxXY=
Clazz.newFloatArray(5,0)});$_M(c$,"getScalePixelsPerMicron",function(){return this.scalePixelsPerMicron});$_M(c$,"setScalePixelsPerMicron",function(a){this.scalePixelsPerMicron=a},"~N");$_M(c$,"setModel",function(a){this.modelIndex=a},"~N");$_M(c$,"setVisibility",function(a){this.visible=a},"~B");$_M(c$,"setXYZ",function(a){this.valign=null==a?0:4;this.xyz=a;this.setAdjustForWindow(null==a)},"J.util.P3");$_M(c$,"setAdjustForWindow",function(a){this.adjustForWindow=a},"~B");$_M(c$,"setColix",function(a){this.colix=
a},"~N");$_M(c$,"setColixO",function(a){this.colix=J.util.C.getColixO(a)},"~O");$_M(c$,"setTranslucent",function(a,b){b?0!=this.bgcolix&&(this.bgcolix=J.util.C.getColixTranslucent3(this.bgcolix,!Float.isNaN(a),a)):this.colix=J.util.C.getColixTranslucent3(this.colix,!Float.isNaN(a),a)},"~N,~B");$_M(c$,"setBgColix",function(a){this.bgcolix=a},"~N");$_M(c$,"setBgColixO",function(a){this.bgcolix=null==a?0:J.util.C.getColixO(a)},"~O");$_M(c$,"setMovableX",($fz=function(a){this.valign=4==this.valign?4:
0;this.movableX=a;this.movableXPercent=2147483647},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"setMovableY",($fz=function(a){this.valign=4==this.valign?4:0;this.movableY=a;this.movableYPercent=2147483647},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"setMovableXPercent",function(a){this.valign=4==this.valign?4:0;this.movableX=2147483647;this.movableXPercent=a},"~N");$_M(c$,"setMovableYPercent",function(a){this.valign=4==this.valign?4:0;this.movableY=2147483647;this.movableYPercent=a},"~N");$_M(c$,"setMovableZPercent",
function(a){4!=this.valign&&(this.valign=0);this.movableZ=2147483647;this.movableZPercent=a},"~N");$_M(c$,"setZs",function(a,b){this.z=a;this.zSlab=b},"~N,~N");$_M(c$,"setXYZs",function(a,b,c,d){this.setMovableX(a);this.setMovableY(b);this.setZs(c,d)},"~N,~N,~N,~N");$_M(c$,"setScript",function(a){this.script=null==a||0==a.length?null:a},"~S");$_M(c$,"getScript",function(){return this.script});$_M(c$,"setOffset",function(a){this.offsetX=J.shape.Object2d.getXOffset(a);this.offsetY=J.shape.Object2d.getYOffset(a);
this.valign=0},"~N");c$.getXOffset=$_M(c$,"getXOffset",function(a){switch(a){case 0:return 4;case 32767:return 0;default:return a<<48>>56}},"~N");c$.getYOffset=$_M(c$,"getYOffset",function(a){switch(a){case 0:return-4;case 32767:return 0;default:return-(a<<56>>56)}},"~N");$_M(c$,"setAlignmentLCR",function(a){return"left".equals(a)?this.setAlignment(1):"center".equals(a)?this.setAlignment(2):"right".equals(a)?this.setAlignment(3):!1},"~S");$_M(c$,"setAlignment",function(a){this.align!=a&&(this.align=
a,this.recalc());return!0},"~N");c$.getAlignmentName=$_M(c$,"getAlignmentName",function(a){return J.shape.Object2d.hAlignNames[a&3]},"~N");$_M(c$,"setPointer",function(a){this.pointer=a},"~N");c$.getPointer=$_M(c$,"getPointer",function(a){return 0==(a&1)?"":0<(a&2)?"background":"on"},"~N");$_M(c$,"setBoxOffsetsInWindow",function(a,b,c){var d=this.boxWidth+a,e=this.boxX;e+d>this.windowWidth&&(e=this.windowWidth-d);e<a&&(e=a);this.boxX=e;a=this.boxHeight;c+a>this.windowHeight&&(c=this.windowHeight-
a);c<b&&(c=b);this.boxY=c},"~N,~N,~N");$_M(c$,"setWindow",function(a,b,c){this.windowWidth=a;this.windowHeight=b;null==this.pymolOffset&&(0>this.scalePixelsPerMicron&&0!=c)&&(this.scalePixelsPerMicron=c)},"~N,~N,~N");$_M(c$,"checkObjectClicked",function(a,b,c){if(0<=this.modelIndex&&!c.get(this.modelIndex)||this.hidden)return!1;this.gdata.isAntialiased()&&(a<<=1,b<<=1);return null!=this.script&&a>=this.boxX&&a<=this.boxX+this.boxWidth&&b>=this.boxY&&b<=this.boxY+this.boxHeight},"~N,~N,J.util.BS");
c$.setProperty=$_M(c$,"setProperty",function(a,b,c){if("script"===a)return null!=c&&c.setScript(b),!0;if("xpos"===a)return null!=c&&c.setMovableX(b.intValue()),!0;if("ypos"===a)return null!=c&&c.setMovableY(b.intValue()),!0;if("%xpos"===a)return null!=c&&c.setMovableXPercent(b.intValue()),!0;if("%ypos"===a)return null!=c&&c.setMovableYPercent(b.intValue()),!0;if("%zpos"===a)return null!=c&&c.setMovableZPercent(b.intValue()),!0;if("xypos"===a){if(null==c)return!0;c.setXYZ(null);3.4028235E38==b.z?(c.setMovableX(Clazz.floatToInt(b.x)),
c.setMovableY(Clazz.floatToInt(b.y))):(c.setMovableXPercent(Clazz.floatToInt(b.x)),c.setMovableYPercent(Clazz.floatToInt(b.y)));return!0}return"xyz"===a?(null!=c&&c.setXYZ(b),!0):!1},"~S,~O,J.shape.Object2d");c$.getOffset=$_M(c$,"getOffset",function(a,b){a=Math.min(Math.max(a,-127),127);b=Math.min(Math.max(b,-127),127);return(a&255)<<8|b&255},"~N,~N");Clazz.defineStatics(c$,"POINTER_NONE",0,"POINTER_ON",1,"POINTER_BACKGROUND",2,"hAlignNames",["","left","center","right",""],"ALIGN_NONE",0,"ALIGN_LEFT",
1,"ALIGN_CENTER",2,"ALIGN_RIGHT",3,"vAlignNames",["xy","top","bottom","middle"],"VALIGN_XY",0,"VALIGN_TOP",1,"VALIGN_BOTTOM",2,"VALIGN_MIDDLE",3,"VALIGN_XYZ",4)}),Clazz.declarePackage("J.util"),Clazz.load(null,"J.util.ColorEncoder","java.lang.Boolean $.Float java.util.Hashtable J.constant.EnumPalette J.util.ArrayUtil $.C $.ColorUtil $.Escape $.JmolList $.Logger $.TextFormat J.viewer.JC".split(" "),function(){c$=Clazz.decorateAsClass(function(){this.argbsAmino=this.argbsShapely=this.argbsRwb=this.argbsRoygb=
this.argbsCpk=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;Clazz.instantialize(this,arguments)},J.util,"ColorEncoder");Clazz.prepareFields(c$,function(){this.userScale=[-8355712];this.thisScale=[-8355712]});Clazz.makeConstructor(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=Clazz.doubleToInt(J.viewer.JC.argbsRoygbScale.length/3),this.propertyColorEncoder=this):(this.propertyColorEncoder=a,this.schemes=a.schemes)},"J.util.ColorEncoder");c$.getSchemeIndex=$_M(c$,"getSchemeIndex",($fz=function(a){for(var b=0;b<J.util.ColorEncoder.colorSchemes.length;b++)if(J.util.ColorEncoder.colorSchemes[b].equalsIgnoreCase(a))return 15<=
b?b-15:12>b?b:-b;return-1},$fz.isPrivate=!0,$fz),"~S");c$.fixName=$_M(c$,"fixName",($fz=function(a){if(a.equalsIgnoreCase("byelement"))return"byelement_jmol";var b=J.util.ColorEncoder.getSchemeIndex(a);return 0<=b?J.util.ColorEncoder.colorSchemes[b]:a.toLowerCase()},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"makeColorScheme",($fz=function(a,b,c){a=J.util.ColorEncoder.fixName(a);if(null==b){this.schemes.remove(a);a=this.createColorScheme(a,!1,c);if(c)switch(a){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,b);this.setThisScheme(a,b);a=this.createColorScheme(a,!1,c);if(c)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=Clazz.doubleToInt(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},$fz.isPrivate=!0,$fz),"~S,~A,~B");$_M(c$,"createColorScheme",function(a,b,c){a=a.toLowerCase();if(a.equals("inherit"))return 14;var d=Math.max(a.indexOf("="),
a.indexOf("["));if(0<=d){b=J.util.TextFormat.replaceAllCharacters(a.substring(0,d)," =","");0<b.length&&(c=!0);var e=0;a.length>d+1&&!a.contains("[")&&(a="["+a.substring(d+1).trim()+"]",a=J.util.TextFormat.simpleReplace(a.$replace("\n"," "),"  "," "),a=J.util.TextFormat.simpleReplace(a,", ",",").$replace(" ",","),a=J.util.TextFormat.simpleReplace(a,",","]["));for(d=-1;0<=(d=a.indexOf("[",d+1));)e++;if(0==e)return this.makeColorScheme(b,null,c);for(var f=Clazz.newIntArray(e,0),e=0;0<=(d=a.indexOf("[",
d+1));){var g=a.indexOf("]",d);0>g&&(g=a.length-1);var h=J.util.ColorUtil.getArgbFromString(a.substring(d,g+1));0==h&&(h=J.util.ColorUtil.getArgbFromString(a.substring(d+1,g).trim()));if(0==h)return J.util.Logger.error("error in color value: "+a.substring(d,g+1)),0;f[e++]=h}return b.equals("user")?(this.setUserScale(f),-12):this.makeColorScheme(b,f,c)}a=J.util.ColorEncoder.fixName(a);c=J.util.ColorEncoder.getSchemeIndex(a);return this.schemes.containsKey(a)?(this.setThisScheme(a,this.schemes.get(a)),
c):-1!=c?c:b?0:2147483647},"~S,~B,~B");$_M(c$,"setUserScale",function(a){this.propertyColorEncoder.userScale=a;this.makeColorScheme("user",a,!1)},"~A");$_M(c$,"getColorSchemeArray",function(a){switch(a){case -1:return this.thisScale;case 0:return this.propertyColorEncoder.argbsRoygb;case 1:return J.util.ArrayUtil.arrayCopyRangeRevI(this.propertyColorEncoder.argbsRoygb,0,-1);case 8:return J.util.ArrayUtil.arrayCopyRangeI(this.propertyColorEncoder.argbsRoygb,0,this.propertyColorEncoder.ihalf);case 9:var b=
J.util.ArrayUtil.arrayCopyRangeI(this.propertyColorEncoder.argbsRoygb,this.propertyColorEncoder.argbsRoygb.length-2*this.propertyColorEncoder.ihalf,-1);a=Clazz.newIntArray(this.propertyColorEncoder.ihalf,0);for(var c=a.length,d=b.length;0<=--c&&0<=--d;)a[c]=b[d--];return a;case 10:return this.getPaletteBW();case 11:return this.getPaletteWB();case 6:return this.propertyColorEncoder.argbsRwb;case 7:return J.util.ArrayUtil.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 -12:return this.propertyColorEncoder.userScale;case -13:return J.util.ArrayUtil.arrayCopyRangeRevI(this.propertyColorEncoder.userScale,0,-1);default:return null}},"~N");$_M(c$,"getColorIndexFromPalette",function(a,b,c,d,e){d=J.util.C.getColix(this.getArgbFromPalette(a,b,c,d));e&&(a=(c-a)/(c-b),1<a?a=1:0.125>a&&(a=0.125),d=J.util.C.getColixTranslucent3(d,
!0,a));return d},"~N,~N,~N,~N,~B");$_M(c$,"getPaletteColorCount",function(a){switch(a){case -1:return this.thisScale.length;case 10:case 11:return this.getPaletteBW(),this.propertyColorEncoder.paletteBW.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 -12:case -13: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;default:return 0}},"~N");$_M(c$,"getArgbFromPalette",function(a,b,c,d){if(Float.isNaN(a))return-8355712;var e=this.getPaletteColorCount(d);switch(d){case -1:return this.isColorIndex&&(b=0,c=this.thisScale.length),this.thisScale[J.util.ColorEncoder.quantize(a,b,c,e)];case 10:return this.getPaletteBW()[J.util.ColorEncoder.quantize(a,b,c,e)];case 11:return this.getPaletteWB()[J.util.ColorEncoder.quantize(a,
b,c,e)];case 0:return this.propertyColorEncoder.argbsRoygb[J.util.ColorEncoder.quantize(a,b,c,e)];case 1:return this.propertyColorEncoder.argbsRoygb[J.util.ColorEncoder.quantize(-a,-c,-b,e)];case 8:return this.propertyColorEncoder.argbsRoygb[J.util.ColorEncoder.quantize(a,b,c,e)];case 9:return this.propertyColorEncoder.argbsRoygb[this.propertyColorEncoder.ihalf+2*J.util.ColorEncoder.quantize(a,b,c,e)];case 6:return this.propertyColorEncoder.argbsRwb[J.util.ColorEncoder.quantize(a,b,c,e)];case 7:return this.propertyColorEncoder.argbsRwb[J.util.ColorEncoder.quantize(-a,
-c,-b,e)];case -12:return 0==this.propertyColorEncoder.userScale.length?-8355712:this.propertyColorEncoder.userScale[J.util.ColorEncoder.quantize(a,b,c,e)];case -13:return 0==this.propertyColorEncoder.userScale.length?-8355712:this.propertyColorEncoder.userScale[J.util.ColorEncoder.quantize(-a,-c,-b,e)];case 2:return this.propertyColorEncoder.argbsCpk[J.util.ColorEncoder.colorIndex(a,e)];case 3:return J.util.ColorEncoder.getRasmolScale()[J.util.ColorEncoder.colorIndex(a,e)];case 4:return this.propertyColorEncoder.argbsShapely[J.util.ColorEncoder.colorIndex(a,
e)];case 5:return this.propertyColorEncoder.argbsAmino[J.util.ColorEncoder.colorIndex(a,e)];default:return-8355712}},"~N,~N,~N,~N");$_M(c$,"setThisScheme",($fz=function(a,b){this.thisName=a;this.thisScale=b;a.equals("user")&&(this.userScale=b);this.isColorIndex=0==a.indexOf("byelement")||0==a.indexOf("byresidue")},$fz.isPrivate=!0,$fz),"~S,~A");$_M(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");$_M(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");$_M(c$,"getColorKey",function(){for(var a=new java.util.Hashtable,b=this.getPaletteColorCount(this.currentPalette),c=new J.util.JmolList,d=Clazz.newFloatArray(b+1,0),e=(this.hi-this.lo)/b,f=e*(this.isReversed?-0.5:0.5),g=0;g<b;g++)d[g]=
this.isReversed?this.hi-g*e:this.lo+g*e,c.addLast(J.util.ColorUtil.colorPointFromInt2(this.getArgb(d[g]+f)));d[b]=this.isReversed?this.lo:this.hi;a.put("values",d);a.put("colors",c);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});$_M(c$,"setColorScheme",function(a,b){this.isTranslucent=b;null!=a&&(this.currentPalette=this.createColorScheme(a,!0,!1))},"~S,~B");$_M(c$,
"setRange",function(a,b,c){3.4028235E38==b&&(a=1,b=this.getPaletteColorCount(this.currentPalette)+1);this.lo=Math.min(a,b);this.hi=Math.max(a,b);this.isReversed=c},"~N,~N,~B");$_M(c$,"getCurrentColorSchemeName",function(){return this.getColorSchemeName(this.currentPalette)});$_M(c$,"getColorSchemeName",function(a){var b=Math.abs(a);return-1==a?this.thisName:b<J.util.ColorEncoder.colorSchemes.length&&0<=b?J.util.ColorEncoder.colorSchemes[b]:null},"~N");c$.getColorSchemeList=$_M(c$,"getColorSchemeList",
function(a){if(null==a)return"";for(var b="",c=0;c<a.length;c++)b+=(0==c?"":" ")+J.util.Escape.escapeColor(a[c]);return b},"~A");c$.getRasmolScale=$_M(c$,"getRasmolScale",function(){if(null!=J.util.ColorEncoder.rasmolScale)return J.util.ColorEncoder.rasmolScale;$t$=J.util.ColorEncoder.rasmolScale=Clazz.newIntArray(J.constant.EnumPalette.argbsCpk.length,0);J.util.ColorEncoder.prototype.rasmolScale=J.util.ColorEncoder.rasmolScale;$t$;for(var a=J.constant.EnumPalette.argbsCpkRasmol[0]|4278190080,b=J.util.ColorEncoder.rasmolScale.length;0<=
--b;)J.util.ColorEncoder.rasmolScale[b]=a;for(b=J.constant.EnumPalette.argbsCpkRasmol.length;0<=--b;)a=J.constant.EnumPalette.argbsCpkRasmol[b],J.util.ColorEncoder.rasmolScale[a>>24]=a|4278190080;return J.util.ColorEncoder.rasmolScale});$_M(c$,"getPaletteWB",($fz=function(){if(null!=this.propertyColorEncoder.paletteWB)return this.propertyColorEncoder.paletteWB;for(var a=Clazz.newIntArray(J.viewer.JC.argbsRoygbScale.length,0),b=0;b<a.length;b++){var c=1/a.length*(a.length-b);a[b]=J.util.ColorUtil.colorTriadToInt(c,
c,c)}return this.propertyColorEncoder.paletteWB=a},$fz.isPrivate=!0,$fz));c$.getPaletteAtoB=$_M(c$,"getPaletteAtoB",function(a,b,c){2>c&&(c=J.viewer.JC.argbsRoygbScale.length);var d=Clazz.newIntArray(c,0),e=((a&16711680)>>16&255)/255,f=((a&65280)>>8&255)/255;a=(a&255)/255;var g=(((b&16711680)>>16&255)/255-e)/(c-1),h=(((b&65280)>>8&255)/255-f)/(c-1);b=((b&255)/255-a)/(c-1);for(var k=0;k<c;k++)d[k]=J.util.ColorUtil.colorTriadToInt(e+g*k,f+h*k,a+b*k);return d},"~N,~N,~N");$_M(c$,"getPaletteBW",($fz=
function(){if(null!=this.propertyColorEncoder.paletteBW)return this.propertyColorEncoder.paletteBW;for(var a=Clazz.newIntArray(J.viewer.JC.argbsRoygbScale.length,0),b=0;b<a.length;b++){var c=1/a.length*b;a[b]=J.util.ColorUtil.colorTriadToInt(c,c,c)}return this.propertyColorEncoder.paletteBW=a},$fz.isPrivate=!0,$fz));$_M(c$,"quantize",function(a,b){var c=this.getPaletteColorCount(this.currentPalette);a=(Clazz.floatToInt(a*c)+(b?0:1))/c;return 0>=a?this.lo:1<=a?this.hi:this.lo+(this.hi-this.lo)*a},
"~N,~B");c$.quantize=$_M(c$,"quantize",function(a,b,c,d){c-=b;if(0>=c||Float.isNaN(a))return Clazz.doubleToInt(d/2);a-=b;if(0>=a)return 0;a=Clazz.floatToInt(a/(c/d)+1E-4);a>=d&&(a=d-1);return a},"~N,~N,~N,~N");c$.colorIndex=$_M(c$,"colorIndex",($fz=function(a,b){return Clazz.doubleToInt(Math.floor((new Boolean(0>=a|a>=b)).valueOf()?0:a))},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"getColorScheme",function(){return(this.isTranslucent?"translucent ":"")+(0>this.currentPalette?J.util.ColorEncoder.getColorSchemeList(this.getColorSchemeArray(this.currentPalette)):
this.getColorSchemeName(this.currentPalette))});c$.RGBtoHSL=$_M(c$,"RGBtoHSL",function(a,b,c,d){a/=255;b/=255;c/=255;1<a&&(a=1);1<b&&(b=1);1<c&&(c=1);var e=Math.min(a,Math.min(b,c)),f=Math.max(a,Math.max(b,c)),g=0;f==e?g=0:f==a?g=(60*(b-c)/(f-e)+360)%360:f==b?g=60*(c-a)/(f-e)+120:f==c&&(g=60*(a-b)/(f-e)+240);a=(f+e)/2;d[0]=g/360;d[1]=f==e?0:0.5>=a?(f-e)/(f+e):(f-e)/(2-f-e);d[2]=a},"~N,~N,~N,~A");Clazz.defineStatics(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";Clazz.defineStatics(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,"USER",-12,"RESU",-13,"INHERIT",14,"ALT",15);c$.colorSchemes=c$.prototype.colorSchemes=
"roygb bgyor byelement_jmol byelement_rasmol byresidue_shapely byresidue_amino rwb bwr low high bw wb user resu inherit rgb bgr jmol rasmol byresidue".split(" ");Clazz.defineStatics(c$,"rasmolScale",null)}),Clazz.declarePackage("J.api"),Clazz.declareInterface(J.api,"JmolGraphicsInterface"),Clazz.declarePackage("J.util"),Clazz.load(["J.api.JmolGraphicsInterface"],"J.util.GData",["J.util.ArrayUtil","$.C","$.JmolFont","$.Shader"],function(){c$=Clazz.decorateAsClass(function(){this.apiPlatform=null;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;Clazz.instantialize(this,arguments)},J.util,"GData",null,J.api.JmolGraphicsInterface);Clazz.prepareFields(c$,function(){this.changeableColixMap=Clazz.newShortArray(16,0)});Clazz.makeConstructor(c$,function(){this.shader=new J.util.Shader});$_M(c$,"initialize",function(a){this.apiPlatform=a},"J.api.ApiPlatform");Clazz.overrideMethod(c$,"setDepth",function(a){this.depth=0>a?0:a},"~N");Clazz.overrideMethod(c$,"setSlab",function(a){this.slab=0>a?0:a},"~N");
$_M(c$,"setZShade",function(a,b,c,d){a&&this.setZShade2(b,c,d)},"~B,~N,~N,~N");$_M(c$,"setZShade2",function(a,b,c){this.zShadeR=this.bgcolor&255;this.zShadeG=(this.bgcolor&65280)>>8;this.zShadeB=(this.bgcolor&16711680)>>16;this.zSlab=0>a?0:a;this.zDepth=0>b?0:b;this.zShadePower=c},"~N,~N,~N");Clazz.overrideMethod(c$,"getRenderWidth",function(){return this.width});Clazz.overrideMethod(c$,"getRenderHeight",function(){return this.height});Clazz.overrideMethod(c$,"getSlab",function(){return this.slab});
Clazz.overrideMethod(c$,"getDepth",function(){return this.depth});$_M(c$,"isDisplayAntialiased",function(){return this.antialiasEnabled});Clazz.overrideMethod(c$,"isAntialiased",function(){return this.antialiasThisFrame});$_M(c$,"getChangeableColix",function(a,b){a>=this.changeableColixMap.length&&(this.changeableColixMap=J.util.ArrayUtil.arrayCopyShort(this.changeableColixMap,a+16));0==this.changeableColixMap[a]&&(this.changeableColixMap[a]=J.util.C.getColix(b));return a|-32768},"~N,~N");$_M(c$,
"changeColixArgb",function(a,b){a<this.changeableColixMap.length&&0!=this.changeableColixMap[a]&&(this.changeableColixMap[a]=J.util.C.getColix(b))},"~N,~N");$_M(c$,"getBgColixes",function(a){return a},"~A");Clazz.overrideMethod(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");$_M(c$,"getShades",function(a){0>a&&(a=this.changeableColixMap[a&2047]);return this.inGreyscaleMode?this.shader.getShadesG(a):
this.shader.getShades(a)},"~N");$_M(c$,"setGreyscaleMode",function(a){this.inGreyscaleMode=a},"~B");$_M(c$,"getSpecularPower",function(){return this.shader.specularPower});$_M(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");$_M(c$,"getSpecularPercent",function(){return this.shader.specularPercent});$_M(c$,"setSpecularPercent",function(a){this.shader.specularPercent!=
a&&(this.shader.specularPercent=a,this.shader.specularFactor=a/100,this.shader.flushCaches())},"~N");$_M(c$,"getSpecularExponent",function(){return this.shader.specularExponent});$_M(c$,"setSpecularExponent",function(a){this.shader.specularExponent!=a&&(this.shader.specularExponent=a,this.shader.phongExponent=Clazz.doubleToInt(Math.pow(2,a)),this.shader.usePhongExponent=!1,this.shader.flushCaches())},"~N");$_M(c$,"getPhongExponent",function(){return this.shader.phongExponent});$_M(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!=Clazz.floatToInt(a),this.shader.usePhongExponent||(this.shader.specularExponent=Clazz.floatToInt(a)),this.shader.flushCaches())},"~N");$_M(c$,"getDiffusePercent",function(){return this.shader.diffusePercent});$_M(c$,"setDiffusePercent",function(a){this.shader.diffusePercent!=a&&(this.shader.diffusePercent=a,this.shader.diffuseFactor=a/100,this.shader.flushCaches())},
"~N");$_M(c$,"getAmbientPercent",function(){return this.shader.ambientPercent});$_M(c$,"setAmbientPercent",function(a){this.shader.ambientPercent!=a&&(this.shader.ambientPercent=a,this.shader.ambientFraction=a/100,this.shader.flushCaches())},"~N");$_M(c$,"getSpecular",function(){return this.shader.specularOn});$_M(c$,"setSpecular",function(a){this.shader.specularOn!=a&&(this.shader.specularOn=a,this.shader.flushCaches())},"~B");$_M(c$,"setCel",function(a){this.shader.setCel(a,this.bgcolor)},"~B");
$_M(c$,"getCel",function(){return this.shader.getCelOn()});$_M(c$,"getLightSource",function(){return this.shader.lightSource});$_M(c$,"isClipped3",function(a,b,c){return 0>a||a>=this.width||0>b||b>=this.height||c<this.slab||c>this.depth},"~N,~N,~N");$_M(c$,"isClipped",function(a,b){return 0>a||a>=this.width||0>b||b>=this.height},"~N,~N");Clazz.overrideMethod(c$,"isInDisplayRange",function(a,b){return a>=this.displayMinX&&a<this.displayMaxX&&b>=this.displayMinY&&b<this.displayMaxY},"~N,~N");Clazz.overrideMethod(c$,
"isClippedXY",function(a,b,c){a=a+1>>1;return b<-a||b>=this.width+a||c<-a||c>=this.height+a},"~N,~N,~N");Clazz.overrideMethod(c$,"isClippedZ",function(a){return-2147483648!=a&&(a<this.slab||a>this.depth)},"~N");$_M(c$,"clipCode3",function(a,b,c){var d=0;0>a?d|=8:a>=this.width&&(d|=4);0>b?d|=2:b>=this.height&&(d|=1);c<this.slab?d|=32:c>this.depth&&(d|=16);return d},"~N,~N,~N");$_M(c$,"clipCode",function(a){var b=0;a<this.slab?b|=32:a>this.depth&&(b|=16);return b},"~N");$_M(c$,"getFont3D",function(a){return J.util.JmolFont.createFont3D(0,
0,a,a,this.apiPlatform,this.graphicsForMetrics)},"~N");$_M(c$,"getFont3DFS",function(a,b){return J.util.JmolFont.createFont3D(J.util.JmolFont.getFontFaceID(a),0,b,b,this.apiPlatform,this.graphicsForMetrics)},"~S,~N");$_M(c$,"getFontFidFS",function(a,b){return this.getFont3DFSS(a,"Bold",b).fid},"~S,~N");$_M(c$,"getFont3DFSS",function(a,b,c){b=J.util.JmolFont.getFontStyleID(b);0>b&&(b=0);return J.util.JmolFont.createFont3D(J.util.JmolFont.getFontFaceID(a),b,c,c,this.apiPlatform,this.graphicsForMetrics)},
"~S,~S,~N");Clazz.overrideMethod(c$,"getFont3DScaled",function(a,b){var c=a.fontSizeNominal*b;return c==a.fontSize?a:J.util.JmolFont.createFont3D(a.idFontFace,a.idFontStyle,c,a.fontSizeNominal,this.apiPlatform,this.graphicsForMetrics)},"J.util.JmolFont,~N");Clazz.overrideMethod(c$,"getFontFid",function(a){return this.getFont3D(a).fid},"~N");c$.getFontStyleID=$_M(c$,"getFontStyleID",function(a){return J.util.JmolFont.getFontStyleID(a)},"~S");$_M(c$,"setBackgroundTransparent",function(){},"~B");$_M(c$,
"setBackgroundArgb",function(a){this.bgcolor=a;this.setCel(this.getCel())},"~N");$_M(c$,"setBackgroundImage",function(a){this.backgroundImage=a},"~O");$_M(c$,"setWindowParameters",function(a,b,c){this.setWinParams(a,b,c)},"~N,~N,~B");$_M(c$,"setWinParams",function(a,b,c){this.newWindowWidth=a;this.newWindowHeight=b;this.newAntialiasing=c},"~N,~N,~B");$_M(c$,"setNewWindowParametersForExport",function(){this.windowWidth=this.newWindowWidth;this.windowHeight=this.newWindowHeight;this.setWidthHeight(!1)});
$_M(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");$_M(c$,"beginRendering",function(){},"J.util.Matrix3f,~B");$_M(c$,"endRendering",function(){});$_M(c$,"snapshotAnaglyphChannelBytes",
function(){});$_M(c$,"getScreenImage",function(){return null},"~B");$_M(c$,"releaseScreenImage",function(){});$_M(c$,"applyAnaglygh",function(){},"J.constant.EnumStereoMode,~A");$_M(c$,"setPass2",function(){return!1},"~B");$_M(c$,"destroy",function(){});$_M(c$,"clearFontCache",function(){});$_M(c$,"plotImage",function(){},"~N,~N,~N,java.awt.Image,J.api.JmolRendererInterface,~N,~N,~N");$_M(c$,"plotText",function(){},"~N,~N,~N,~N,~N,~S,J.util.JmolFont,J.api.JmolRendererInterface");$_M(c$,"renderBackground",
function(){},"J.api.JmolRendererInterface");$_M(c$,"getFont3DCurrent",function(){return null});$_M(c$,"setFont",function(){},"J.util.JmolFont");$_M(c$,"setFontFid",function(){},"~N");$_M(c$,"setColor",function(a){this.argbCurrent=a},"~N");$_M(c$,"isPass2",function(){return this.$isPass2});$_M(c$,"setColix",function(){return!0},"~N");$_M(c$,"isDirectedTowardsCamera",function(){return!0},"~N");$_M(c$,"getTransformedVertexVectors",function(){return null});$_M(c$,"setNoisySurfaceShade",function(){},"J.util.P3i,J.util.P3i,J.util.P3i");
c$.roundInt=$_M(c$,"roundInt",function(a){return a},"~N");$_M(c$,"clear",function(){});Clazz.overrideMethod(c$,"renderAllStrings",function(){},"~O");Clazz.defineStatics(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)}),Clazz.declarePackage("J.bspt"),Clazz.load(["J.bspt.Element"],"J.bspt.Node",["java.lang.NullPointerException","J.bspt.Leaf","J.util.Logger"],
function(){c$=Clazz.decorateAsClass(function(){this.maxLeft=this.minLeft=this.dim=0;this.eleLeft=null;this.maxRight=this.minRight=0;this.eleRight=null;Clazz.instantialize(this,arguments)},J.bspt,"Node",J.bspt.Element);Clazz.makeConstructor(c$,function(a,b,c){Clazz.superConstructor(this,J.bspt.Node,[]);this.bspt=a;b==a.treeDepth&&(a.treeDepth=b+1,100<=a.treeDepth&&J.util.Logger.error("BSPT tree depth too great:"+a.treeDepth));if(2!=c.count)throw new NullPointerException;this.dim=b%a.dimMax;c.sort(this.dim);
a=new J.bspt.Leaf(a,c,1);this.minLeft=J.bspt.Node.getDimensionValue(c.tuples[0],this.dim);this.maxLeft=J.bspt.Node.getDimensionValue(c.tuples[c.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=c;this.eleRight=a;this.count=2},"J.bspt.Bspt,~N,J.bspt.Leaf");$_M(c$,"addTuple",function(a,b){var c=J.bspt.Node.getDimensionValue(b,this.dim);++this.count;c<this.maxLeft||(c>this.minRight?
0:c==this.maxLeft?c==this.minRight?this.eleLeft.count<this.eleRight.count:1:c==this.minRight?0:this.eleLeft.count<this.eleRight.count)?(c<this.minLeft?this.minLeft=c:c>this.maxLeft&&(this.maxLeft=c),this.eleLeft=this.eleLeft.addTuple(a+1,b)):(c<this.minRight?this.minRight=c:c>this.maxRight&&(this.maxRight=c),this.eleRight=this.eleRight.addTuple(a+1,b));return this},"~N,J.util.P3");$_M(c$,"dump",function(a,b){b.append("\nnode LEFT"+a);this.eleLeft.dump(a+1,b);for(var c=0;c<a;++c)b.append("->");b.append(" RIGHT"+
a);this.eleRight.dump(a+1,b)},"~N,J.util.SB");$_M(c$,"toString",function(){return this.eleLeft.toString()+this.dim+":\n"+this.eleRight.toString()});c$.getDimensionValue=$_M(c$,"getDimensionValue",function(a,b){return 0==b?a.x:1==b?a.y:a.z},"J.util.P3,~N")}),Clazz.declarePackage("J.util"),Clazz.load(null,"J.util.JmolFont",["J.util.ArrayUtil"],function(){c$=Clazz.decorateAsClass(function(){this.fid=0;this.fontStyle=this.fontFace=null;this.fontSize=this.idFontStyle=this.idFontFace=this.fontSizeNominal=
0;this.apiPlatform=this.fontMetrics=this.font=null;this.descent=this.ascent=0;this.isItalic=this.isBold=!1;Clazz.instantialize(this,arguments)},J.util,"JmolFont");Clazz.makeConstructor(c$,($fz=function(a,b,c,d,e,f,g){this.apiPlatform=a;this.fid=b;this.fontFace=J.util.JmolFont.fontFaces[c];this.fontStyle=J.util.JmolFont.fontStyles[d];this.idFontFace=c;this.idFontStyle=d;this.fontSize=e;this.isBold=1==(d&1);this.isItalic=2==(d&2);this.fontSizeNominal=f;this.font=a.newFont(J.util.JmolFont.fontFaces[c],
this.isBold,this.isItalic,e);this.fontMetrics=a.getFontMetrics(this,g);this.descent=a.getFontDescent(this.fontMetrics);this.ascent=a.getFontAscent(this.fontMetrics)},$fz.isPrivate=!0,$fz),"J.api.ApiPlatform,~N,~N,~N,~N,~N,~O");c$.getFont3D=$_M(c$,"getFont3D",function(a){return J.util.JmolFont.font3ds[a&255]},"~N");c$.createFont3D=$_M(c$,"createFont3D",function(a,b,c,d,e,f){255<c&&(c=255);for(var g=Clazz.floatToInt(c)<<4,g=a&3|(b&3)<<2|g<<4,h=J.util.JmolFont.fontkeyCount;0<--h;)if(g==J.util.JmolFont.fontkeys[h]&&
J.util.JmolFont.font3ds[h].fontSizeNominal==d)return J.util.JmolFont.font3ds[h];h=($t$=J.util.JmolFont.fontkeyCount++,J.util.JmolFont.prototype.fontkeyCount=J.util.JmolFont.fontkeyCount,$t$);h==J.util.JmolFont.fontkeys.length&&($t$=J.util.JmolFont.fontkeys=J.util.ArrayUtil.arrayCopyI(J.util.JmolFont.fontkeys,h+8),J.util.JmolFont.prototype.fontkeys=J.util.JmolFont.fontkeys,$t$);$t$=J.util.JmolFont.font3ds=J.util.ArrayUtil.arrayCopyObject(J.util.JmolFont.font3ds,h+8);J.util.JmolFont.prototype.font3ds=
J.util.JmolFont.font3ds;$t$;a=new J.util.JmolFont(e,h,a,b,c,d,f);J.util.JmolFont.font3ds[h]=a;J.util.JmolFont.fontkeys[h]=g;return a},"~N,~N,~N,~N,J.api.ApiPlatform,~O");c$.getFontFaceID=$_M(c$,"getFontFaceID",function(a){return"Monospaced".equalsIgnoreCase(a)?2:"Serif".equalsIgnoreCase(a)?1:0},"~S");c$.getFontStyleID=$_M(c$,"getFontStyleID",function(a){for(var b=4;0<=--b;)if(J.util.JmolFont.fontStyles[b].equalsIgnoreCase(a))return b;return-1},"~S");$_M(c$,"getAscent",function(){return this.ascent});
$_M(c$,"getDescent",function(){return this.descent});$_M(c$,"getHeight",function(){return this.getAscent()+this.getDescent()});$_M(c$,"stringWidth",function(a){return this.apiPlatform.fontStringWidth(this,this.fontMetrics,a)},"~S");Clazz.defineStatics(c$,"FONT_ALLOCATION_UNIT",8,"fontkeyCount",1,"fontkeys",Clazz.newIntArray(8,0));c$.font3ds=c$.prototype.font3ds=Array(8);Clazz.defineStatics(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"])}),Clazz.declarePackage("J.util"),Clazz.load(null,"J.util.MeshSurface","java.lang.Boolean $.Float java.util.Hashtable J.util.ArrayUtil $.BS $.BSUtil $.BoxInfo $.C $.Escape $.Geodesic $.JmolList $.Measure $.P3 $.SB $.TextFormat".split(" "),function(){c$=Clazz.decorateAsClass(function(){this.meshType=this.spanningVectors=null;this.vertexCount=0;this.vertexSource=
this.vertexValues=this.vertices=null;this.polygonCount=0;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.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;Clazz.instantialize(this,arguments)},J.util,"MeshSurface");Clazz.makeConstructor(c$,function(){});c$.newMesh=$_M(c$,"newMesh",function(a,b,c,d,e,f){var g=new J.util.MeshSurface;g.polygonIndexes=d;a?g.altVertices=b:g.vertices=b;g.vertexCount=0==c?b.length:c;g.normals=e;g.normalCount=
0==f&&null!=e?e.length:f;return g},"~B,~A,~N,~A,~A,~N");c$.newSlab=$_M(c$,"newSlab",function(a,b,c,d,e,f){var g=new J.util.MeshSurface;g.vertices=a;g.vertexValues=c;g.vertexCount=b;g.polygonIndexes=d;g.polygonCount=e;g.checkCount=f;return g},"~A,~N,~A,~A,~N,~N");$_M(c$,"getVertices",function(){return null==this.altVertices?this.vertices:this.altVertices});$_M(c$,"getFaces",function(){return this.polygonIndexes});$_M(c$,"setColix",function(a){this.colix=a},"~N");$_M(c$,"setColixBack",function(a){this.colixBack=
a},"~N");$_M(c$,"addV",function(a){0==this.vertexCount?this.vertices=Array(25):this.vertexCount==this.vertices.length&&(this.vertices=J.util.ArrayUtil.doubleLength(this.vertices));this.vertices[this.vertexCount]=J.util.P3.newP(a);return this.vertexCount++},"J.util.P3");$_M(c$,"addTriangle",function(a,b,c){this.addPolygon([a,b,c],null)},"~N,~N,~N");$_M(c$,"addQuad",function(a,b,c,d){this.haveQuads=!0;this.addPolygon([a,b,c,d],null)},"~N,~N,~N,~N");$_M(c$,"setPolygonCount",function(a){this.polygonCount=
a;if(!(0>a)&&(null==this.polygonIndexes||a>this.polygonIndexes.length))this.polygonIndexes=J.util.ArrayUtil.newInt2(a)},"~N");$_M(c$,"addVCVal",function(a,b){0==this.vertexCount?this.vertexValues=Clazz.newFloatArray(25,0):this.vertexCount>=this.vertexValues.length&&(this.vertexValues=J.util.ArrayUtil.doubleLengthF(this.vertexValues));this.vertexValues[this.vertexCount]=b;return this.addV(a)},"J.util.P3,~N");$_M(c$,"addTriangleCheck",function(a,b,c,d,e,f){return null==this.vertices||null!=this.vertexValues&&
(Float.isNaN(this.vertexValues[a])||Float.isNaN(this.vertexValues[b])||Float.isNaN(this.vertexValues[c]))||Float.isNaN(this.vertices[a].x)||Float.isNaN(this.vertices[b].x)||Float.isNaN(this.vertices[c].x)?-1:this.addPolygonV3(a,b,c,d,e,f,null)},"~N,~N,~N,~N,~N,~N");$_M(c$,"addPolygonV3",($fz=function(a,b,c,d,e,f,g){return 2==this.checkCount?this.addPolygonC([a,b,c,d,e],f,g):this.addPolygon([a,b,c,d],g)},$fz.isPrivate=!0,$fz),"~N,~N,~N,~N,~N,~N,J.util.BS");$_M(c$,"addPolygonC",function(a,b,c){if(0!=
b){if(null==this.polygonColixes||0==this.polygonCount)this.lastColor=0;b=b==this.lastColor?this.lastColix:this.lastColix=J.util.C.getColix(this.lastColor=b);this.setPolygonColix(this.polygonCount,b)}return this.addPolygon(a,c)},"~A,~N,J.util.BS");$_M(c$,"addPolygon",($fz=function(a,b){var c=this.polygonCount;0==this.polygonCount?this.polygonIndexes=J.util.ArrayUtil.newInt2(25):this.polygonCount==this.polygonIndexes.length&&(this.polygonIndexes=J.util.ArrayUtil.doubleLength(this.polygonIndexes));null!=
b&&b.set(this.polygonCount);this.polygonIndexes[this.polygonCount++]=a;return c},$fz.isPrivate=!0,$fz),"~A,J.util.BS");$_M(c$,"setPolygonColix",($fz=function(a,b){null==this.polygonColixes?this.polygonColixes=Clazz.newShortArray(25,0):a>=this.polygonColixes.length&&(this.polygonColixes=J.util.ArrayUtil.doubleLengthShort(this.polygonColixes));this.polygonColixes[a]=b},$fz.isPrivate=!0,$fz),"~N,~N");$_M(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});$_M(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");$_M(c$,
"setSlab",function(a,b,c,d,e){this.bsSlabDisplay=a;this.bsSlabGhost=b;this.slabMeshType=c.equalsIgnoreCase("mesh")?1073742018:1073741938;this.slabColix=J.util.C.getColixTranslucent3(J.util.C.getColixS(d),!0,e)},"J.util.BS,J.util.BS,~S,~S,~N");$_M(c$,"getSlabColor",function(){return null==this.bsSlabGhost?null:J.util.C.getHexCode(this.slabColix)});$_M(c$,"getSlabTranslucency",function(){return null==this.bsSlabGhost?null:""+J.util.C.getColixTranslucencyFractional(this.slabColix)});$_M(c$,"getSlabType",
function(){return null!=this.bsSlabGhost&&1073742018==this.slabMeshType?"mesh":null});c$.getSlabWithinRange=$_M(c$,"getSlabWithinRange",function(a,b){return[Integer.$valueOf(1073742114),[Float.$valueOf(a),Float.$valueOf(b)],Boolean.FALSE,null]},"~N,~N");$_M(c$,"resetSlab",function(){this.slabPolygons(J.util.MeshSurface.getSlabObject(1048587,null,!1,null),!1)});c$.getSlabObject=$_M(c$,"getSlabObject",function(a,b,c,d){return[Integer.$valueOf(a),b,Boolean.$valueOf(c),d]},"~N,~O,~B,~O");c$.getCapSlabObject=
$_M(c$,"getCapSlabObject",function(a,b){try{if(0==a.indexOf("array")){var c=J.util.TextFormat.splitChars(a.substring(6,a.length-1),",");return J.util.MeshSurface.getSlabObject(1679429641,[J.util.Escape.uP(c[0]),J.util.Escape.uP(c[1]),J.util.Escape.uP(c[2]),J.util.Escape.uP(c[3])],b,null)}var d=J.util.Escape.uP(a);if(Clazz.instanceOf(d,J.util.P4))return J.util.MeshSurface.getSlabObject(135266319,d,b,null)}catch(e){if(!Clazz.exceptionOf(e,Exception))throw e;}return null},"~S,~B");$_M(c$,"slabPolygonsList",
function(a,b){for(var c=0;c<a.size()&&this.slabPolygons(a.get(c),b);c++);},"J.util.JmolList,~B");$_M(c$,"slabPolygons",function(a,b){if(0>this.polygonCount0)return!1;var c=a[0].intValue();if(1048587==c||1073741872==c){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 J.util.SB).append(this.meshType+" slab none"),this.bsSlabGhost=null,this.slabMeshType=1048587;if(1048587==c)return!1}var d=a[1],e=a[2].booleanValue()&&1073741872!=c;if(e&&!b)return!1;var f=a[3],g=null!=f;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));g&&(null==this.bsSlabGhost&&(this.bsSlabGhost=new J.util.BS),this.slabMeshType=f[0].intValue(),this.slabColix=f[1].shortValue(),J.util.C.isColixColorInherited(this.slabColix)&&(this.slabColix=J.util.C.copyColixTranslucency(this.slabColix,
this.colix)),e=!1,this.colix=J.util.C.getColixTranslucent3(this.colix,!1,0));f=new J.util.SB;f.append(e?" cap ":" slab ");g&&(f.append("translucent ").appendF(J.util.C.getColixTranslucencyFractional(this.slabColix)).append(" ").append(J.util.C.getHexCode(this.slabColix)).append(" "),1073742018==this.slabMeshType&&f.append("mesh "));switch(c){case 1073741872:f.append("brillouin");this.slabBrillouin(d);break;case 3:this.getIntersection(0,null,null,null,null,d,null,e,!1,3,g);break;case 135266319:f.append(J.util.Escape.eP4(d));
this.getIntersection(0,d,null,null,null,null,null,e,!1,135266319,g);break;case 1614417948:case 1679429641:f.append("within ").append(J.util.Escape.eAP(d));for(var h=J.util.BoxInfo.getFacesFromCriticalPoints(d),d=0;d<h.length;d++)this.getIntersection(0,h[d],null,null,null,null,null,e,!1,135266319,g);break;case 135270407:this.getIntersection(0,null,null,null,d,null,null,!1,!1,32,g);break;case 135266324:case 1073742114:case 1073742018:switch(h=d[0].floatValue(),c){case 135266324:c=d[1];d=d[2];f.append("within ").appendF(h).append(null==
d?J.util.Escape.e(c):J.util.Escape.e(d));this.getIntersection(h,null,c,null,null,null,null,e,!1,0<h?1276118018:1073742154,g);break;case 1073742114:if(null==this.vertexValues)return!1;c=d[1].floatValue();f.append("within range ").appendF(h).append(" ").appendF(c);d=c<h?J.util.BSUtil.copy(this.bsSlabDisplay):null;this.getIntersection(h,null,null,null,null,null,null,e,!1,32,g);h=null==d?null:J.util.BSUtil.copy(this.bsSlabDisplay);J.util.BSUtil.copy2(d,this.bsSlabDisplay);this.getIntersection(c,null,
null,null,null,null,null,e,!1,64,g);null!=h&&this.bsSlabDisplay.or(h);break;case 1073742018:this.getIntersection(0,null,null,null,null,null,d[1],e,!1,0>h?32:64,g)}}e=f.toString();null==this.slabOptions&&(this.slabOptions=new J.util.SB);0>this.slabOptions.indexOf(e)&&this.slabOptions.append(0<this.slabOptions.length()?"; ":"").append(this.meshType).append(e);return!0},"~A,~B");$_M(c$,"slabBrillouin",function(){},"~A");$_M(c$,"addIntersectionVertex",function(a,b,c,d,e,f,g){g=f>g?g+"_"+f:f+"_"+g;if(0<=
f&&(f=e.get(g),null!=f))return f.intValue();null!=this.vertexSource&&(this.vertexCount>=this.vertexSource.length&&(this.vertexSource=J.util.ArrayUtil.doubleLengthI(this.vertexSource)),this.vertexSource[this.vertexCount]=c);null!=this.vertexSets&&(this.vertexCount>=this.vertexSets.length&&(this.vertexSets=J.util.ArrayUtil.doubleLengthI(this.vertexSets)),this.vertexSets[this.vertexCount]=d);a=this.addVCVal(a,b);e.put(g,Integer.$valueOf(a));return a},"J.util.P3,~N,~N,~N,java.util.Map,~N,~N");$_M(c$,
"getIntersection",function(a,b,c,d,e,f,g,h,k,l,m){var n=null==d,p=null;null==e&&(e=this.vertexValues);var q=new java.util.Hashtable;if(null!=c||m)h=!1;var r=Clazz.newFloatArray(2,0),s=Clazz.newFloatArray(2,0),t=Math.abs(a),u,v,w,z,B,x,y=0,A=0,C=0,D=0,E=h?new J.util.JmolList:null;if(0==this.polygonCount)for(g=this.mergeVertexCount0;g<this.vertexCount;g++)(Float.isNaN(e[g])||0<J.util.MeshSurface.checkSlab(l,this.vertices[g],e[g],a,b,c,f))&&this.bsSlabDisplay.clear(g);else{var R=this.polygonCount;for(g=
this.mergePolygonCount0;g<R;g++)if(this.setABC(g)){var H=null!=this.bsSlabGhost&&this.bsSlabGhost.get(g)?this.bsSlabGhost:this.bsSlabDisplay,L=this.polygonIndexes[g][3],F=2==this.checkCount?this.polygonIndexes[g][4]:0,K=this.vertices[this.iA],M=this.vertices[this.iB],N=this.vertices[this.iC];z=e[this.iA];B=e[this.iB];x=e[this.iC];null!=this.vertexSource&&(y=this.vertexSource[this.iA],A=this.vertexSource[this.iB],C=this.vertexSource[this.iC]);null!=this.vertexSets&&(D=this.vertexSets[this.iA]);u=J.util.MeshSurface.checkSlab(l,
K,z,null==f?a:y,b,c,f);v=J.util.MeshSurface.checkSlab(l,M,B,null==f?a:A,b,c,f);w=J.util.MeshSurface.checkSlab(l,N,x,null==f?a:C,b,c,f);var G=(0!=u&&0>u?1:0)+(0!=v&&0>v?2:0)+(0!=w&&0>w?4:0);switch(G){case 1:case 6:p=null==c?[J.util.MeshSurface.interpolatePoint(K,M,-u,v,z,B,r,s,0),J.util.MeshSurface.interpolatePoint(K,N,-u,w,z,x,r,s,1)]:[this.interpolateSphere(K,M,-u,-v,t,z,B,r,s,0),this.interpolateSphere(K,N,-u,-w,t,z,x,r,s,1)];break;case 2:case 5:p=null==c?[J.util.MeshSurface.interpolatePoint(M,K,
-v,u,B,z,r,s,1),J.util.MeshSurface.interpolatePoint(M,N,-v,w,B,x,r,s,0)]:[this.interpolateSphere(M,K,-v,-u,t,B,z,r,s,1),this.interpolateSphere(M,N,-v,-w,t,B,x,r,s,0)];break;case 3:case 4:p=null==c?[J.util.MeshSurface.interpolatePoint(N,K,-w,u,x,z,r,s,0),J.util.MeshSurface.interpolatePoint(N,M,-w,v,x,B,r,s,1)]:[this.interpolateSphere(N,K,-w,-u,t,x,z,r,s,0),this.interpolateSphere(N,M,-w,-v,t,x,B,r,s,1)]}this.doClear=!0;this.doGhost=m;this.doCap=h;if(n){switch(G){case 0:this.doCap=!1;break;case 7:continue;
case 1:case 6:if((v=1==G)||m){if(!this.getDE(s,0,this.iA,this.iB,this.iC,v))break;0>this.iD&&(this.iD=this.addIntersectionVertex(p[0],r[0],y,D,q,this.iA,this.iB));0>this.iE&&(this.iE=this.addIntersectionVertex(p[1],r[1],y,D,q,this.iA,this.iC));u=v?H:this.bsSlabGhost;this.addPolygonV3(this.iA,this.iD,this.iE,L&5|2,F,0,u);if(!m)break}if(!this.getDE(s,1,this.iA,this.iC,this.iB,v))break;u=v?this.bsSlabGhost:H;0>this.iE&&(this.iE=this.addIntersectionVertex(p[0],r[0],A,D,q,this.iA,this.iB),this.addPolygonV3(this.iE,
this.iB,this.iC,L&3,F,0,u));0>this.iD&&(this.iD=this.addIntersectionVertex(p[1],r[1],C,D,q,this.iA,this.iC),this.addPolygonV3(this.iD,this.iE,this.iC,L&4|1,F,0,u));break;case 5:case 2:if((v=2==G)||m){if(!this.getDE(s,0,this.iB,this.iC,this.iA,v))break;u=v?H:this.bsSlabGhost;0>this.iE&&(this.iE=this.addIntersectionVertex(p[0],r[0],A,D,q,this.iB,this.iA));0>this.iD&&(this.iD=this.addIntersectionVertex(p[1],r[1],A,D,q,this.iB,this.iC));this.addPolygonV3(this.iE,this.iB,this.iD,L&3|4,F,0,u);if(!m)break}if(!this.getDE(s,
1,this.iB,this.iA,this.iC,v))break;u=v?this.bsSlabGhost:H;0>this.iD&&(this.iD=this.addIntersectionVertex(p[0],r[0],y,D,q,this.iB,this.iA),this.addPolygonV3(this.iA,this.iD,this.iC,L&5,F,0,u));0>this.iE&&(this.iE=this.addIntersectionVertex(p[1],r[1],C,D,q,this.iB,this.iC),this.addPolygonV3(this.iD,this.iE,this.iC,L&2|1,F,0,u));break;case 4:case 3:if((v=4==G)||m){if(!this.getDE(s,0,this.iC,this.iA,this.iB,v))break;0>this.iD&&(this.iD=this.addIntersectionVertex(p[0],r[0],C,D,q,this.iA,this.iC));0>this.iE&&
(this.iE=this.addIntersectionVertex(p[1],r[1],C,D,q,this.iB,this.iC));u=v?H:this.bsSlabGhost;this.addPolygonV3(this.iD,this.iE,this.iC,L&6|1,F,0,u);if(!m)break}if(!this.getDE(s,1,this.iC,this.iB,this.iA,v))break;u=v?this.bsSlabGhost:H;0>this.iE&&(this.iE=this.addIntersectionVertex(p[0],r[0],y,D,q,this.iA,this.iC),this.addPolygonV3(this.iA,this.iB,this.iE,L&5,F,0,u));0>this.iD&&(this.iD=this.addIntersectionVertex(p[1],r[1],A,D,q,this.iB,this.iC),this.addPolygonV3(this.iE,this.iB,this.iD,L&2|4,F,0,
u))}this.doClear&&(H.clear(g),this.doGhost&&this.bsSlabGhost.set(g));this.doCap&&E.addLast([this.iD,this.iE])}else null!=p&&d.addLast(p)}if(h&&0<E.size()){b=new J.util.P3;for(g=E.size();0<=--g;)a=E.get(g),b.add(this.vertices[a[0]]),b.add(this.vertices[a[1]]);b.scale(0.5/E.size());q=this.addIntersectionVertex(b,0,-1,D,q,-1,-1);for(g=E.size();0<=--g;)a=E.get(g),this.addPolygonV3(a[0],q,a[1],0,0,0,this.bsSlabDisplay)}if(k){q=new J.util.BS;D=new J.util.BS;for(g=0;g<this.polygonCount;g++)if(null!=this.polygonIndexes[g]){D.set(g);
for(k=0;3>k;k++)q.set(this.polygonIndexes[g][k])}E=0;D=D.cardinality();if(D!=this.polygonCount){a=Clazz.newIntArray(this.vertexCount,0);for(g=0;g<this.vertexCount;g++)q.get(g)&&(a[g]=E++);b=Array(E);for(g=E=0;g<this.vertexCount;g++)q.get(g)&&(b[E++]=this.vertices[g]);q=J.util.ArrayUtil.newInt2(D);for(g=D=0;g<this.polygonCount;g++)if(null!=this.polygonIndexes[g]){for(k=0;3>k;k++)this.polygonIndexes[g][k]=a[this.polygonIndexes[g][k]];q[D++]=this.polygonIndexes[g]}this.vertices=b;this.vertexCount=E;
this.polygonIndexes=q;this.polygonCount=D}}}},"~N,J.util.P4,~A,J.util.JmolList,~A,J.util.BS,J.util.MeshSurface,~B,~B,~N,~B");c$.setPoint=$_M(c$,"setPoint",($fz=function(a,b,c,d){return 0==a[b]?c:1==a[b]?d:-1},$fz.isPrivate=!0,$fz),"~A,~N,~N,~N");$_M(c$,"getDE",($fz=function(a,b,c,d,e,f){this.iD=J.util.MeshSurface.setPoint(a,b,c,d);this.iE=J.util.MeshSurface.setPoint(a,1-b,c,e);if(this.iD==c&&this.iE==c)return this.doClear=f,this.doCap=!1;if(this.iD==d&&this.iE==e)return this.doClear=!f,!1;if(this.iD==
c||this.iE==c)return this.doClear=f,0>this.iD?this.iD=f?d:e:0>this.iE&&(this.iE=f?e:d),this.doCap;this.doGhost=!1;return!0},$fz.isPrivate=!0,$fz),"~A,~N,~N,~N,~N,~B");c$.checkSlab=$_M(c$,"checkSlab",($fz=function(a,b,c,d,e,f,g){switch(a){case 3:return g.get(Clazz.floatToInt(c))?1:-1;case 32:a=d-c;break;case 64:a=c-d;break;case 135266319:a=J.util.Measure.distanceToPlane(e,b);break;case 1276118018:a=J.util.MeshSurface.minDist(b,f)-d;break;default:a=-J.util.MeshSurface.minDist(b,f)-d}return 1E-4>Math.abs(a)?
0:a},$fz.isPrivate=!0,$fz),"~N,J.util.P3,~N,~N,J.util.P4,~A,J.util.BS");c$.minDist=$_M(c$,"minDist",($fz=function(a,b){for(var c=2147483647,d=b.length;0<=--d;){var e=b[d].distance(a);e<c&&(c=e)}return c},$fz.isPrivate=!0,$fz),"J.util.P3,~A");$_M(c$,"interpolateSphere",($fz=function(a,b,c,d,e,f,g,h,k,l){return J.util.MeshSurface.interpolateFraction(a,b,J.util.MeshSurface.getSphericalInterpolationFraction(e,c,d,a.distance(b)),f,g,h,k,l)},$fz.isPrivate=!0,$fz),"J.util.P3,J.util.P3,~N,~N,~N,~N,~N,~A,~A,~N");
c$.interpolatePoint=$_M(c$,"interpolatePoint",($fz=function(a,b,c,d,e,f,g,h,k){return J.util.MeshSurface.interpolateFraction(a,b,c/(c+d),e,f,g,h,k)},$fz.isPrivate=!0,$fz),"J.util.P3,J.util.P3,~N,~N,~N,~N,~A,~A,~N");c$.interpolateFraction=$_M(c$,"interpolateFraction",($fz=function(a,b,c,d,e,f,g,h){1E-4>c?c=0:0.9999<c&&(c=1);g[h]=c;f[h]=(e-d)*c+d;return J.util.P3.new3(a.x+(b.x-a.x)*c,a.y+(b.y-a.y)*c,a.z+(b.z-a.z)*c)},$fz.isPrivate=!0,$fz),"J.util.P3,J.util.P3,~N,~N,~N,~A,~A,~N");c$.getSphericalInterpolationFraction=
$_M(c$,"getSphericalInterpolationFraction",function(a,b,c,d){b=Math.abs(a+b)/d;c=Math.abs(a+c)/d;a/=d;d=b*b;var e=d-c*c+1;return(e+(b<c?1:-1)*Math.sqrt(e*e+4*(a*a-d)))/2},"~N,~N,~N,~N");c$.getSphereData=$_M(c$,"getSphereData",function(a){J.util.Geodesic.createGeodesic(a);var b=J.util.Geodesic.getVertexCount(a),c=J.util.Geodesic.getFaceVertexes(a),d=Clazz.doubleToInt(c.length/3);a=J.util.ArrayUtil.newInt2(d);for(var e=0,f=0;e<d;e++)a[e]=[c[f++],c[f++],c[f++]];c=Array(b);for(e=0;e<b;e++)c[e]=J.util.Geodesic.getVertexVector(e);
return J.util.MeshSurface.newMesh(!0,c,0,a,c,0)},"~N");Clazz.defineStatics(c$,"SEED_COUNT",25)}),Clazz.declarePackage("J.util"),c$=Clazz.decorateAsClass(function(){this.height=this.width=this.y=this.x=0;Clazz.instantialize(this,arguments)},J.util,"Rectangle"),$_M(c$,"contains",function(a,b){return a>=this.x&&b>=this.y&&a-this.x<this.width&&b-this.y<this.height},"~N,~N"),Clazz.declarePackage("J.viewer"),c$=Clazz.decorateAsClass(function(){this.y=this.x=-1E3;this.modifiers=0;this.time=-1;Clazz.instantialize(this,
arguments)},J.viewer,"MouseState"),Clazz.makeConstructor(c$,function(){}),$_M(c$,"set",function(a,b,c,d){this.time=a;this.x=b;this.y=c;this.modifiers=d},"~N,~N,~N,~N"),$_M(c$,"setCurrent",function(a){this.time=a.time;this.x=a.x;this.y=a.y;this.modifiers=a.modifiers},"J.viewer.MouseState,~N"),$_M(c$,"inRange",function(a,b,c){return Math.abs(this.x-b)<=a&&Math.abs(this.y-c)<=a},"~N,~N,~N"),$_M(c$,"check",function(a,b,c,d,e,f){return this.modifiers==d&&(2147483647<=f?this.inRange(a,b,c):e-this.time<
f)},"~N,~N,~N,~N,~N,~N"),$_M(c$,"is",function(a){return a.x==this.x&&a.y==this.y&&a.time==this.time},"J.viewer.MouseState"),Clazz.declarePackage("J.viewer"),Clazz.load(["J.util.Rectangle","J.viewer.MouseState"],"J.viewer.ActionManager","java.lang.Character $.Float java.util.Hashtable J.i18n.GT J.modelset.MeasurementPending J.thread.HoverWatcherThread J.util.BSUtil $.Escape $.JmolList $.Logger $.P3 $.Point3fi $.TextFormat J.viewer.binding.Binding $.JmolBinding".split(" "),function(){c$=Clazz.decorateAsClass(function(){this.hoverWatcherThread=
this.predragBinding=this.rasmolBinding=this.dragBinding=this.pfaatBinding=this.jmolBinding=this.binding=this.viewer=null;this.haveMultiTouchInput=!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.pressedAtomIndex=this.pressedCount=0;this.dragSelectedMode=this.labelMode=this.drawMode=!1;this.measuresEnabled=!0;this.hoverActive=!1;this.measurementPending=null;this.dragAtomIndex=
-1;this.rubberbandSelectionMode=!1;this.rectRubber=null;this.isAltKeyReleased=!0;this.haveSelection=this.isMultiTouchServer=this.isMultiTouchClient=this.keyProcessing=!1;this.measurementQueued=null;this.pickingStyle=0;this.atomPickingMode=1;this.pickingStyleSelect=0;this.pickingStyleMeasure=5;this.rootPickingStyle=0;this.pickAtomAssignType="C";this.pickBondAssignType="p";this.bondPickingMode=0;this.isPickAtomAssignCharge=!1;Clazz.isClassDefined("J.viewer.ActionManager.MotionPoint")||J.viewer.ActionManager.$ActionManager$MotionPoint$();
this.dragGesture=null;Clazz.isClassDefined("J.viewer.ActionManager.Gesture")||J.viewer.ActionManager.$ActionManager$Gesture$();this.selectionWorking=!1;Clazz.instantialize(this,arguments)},J.viewer,"ActionManager");Clazz.prepareFields(c$,function(){this.current=new J.viewer.MouseState;this.moved=new J.viewer.MouseState;this.clicked=new J.viewer.MouseState;this.pressed=new J.viewer.MouseState;this.dragged=new J.viewer.MouseState;this.rectRubber=new J.util.Rectangle;this.dragGesture=Clazz.innerTypeInstance(J.viewer.ActionManager.Gesture,
this,null,20)});c$.newAction=$_M(c$,"newAction",function(a,b,c){J.viewer.ActionManager.actionInfo[a]=c;J.viewer.ActionManager.actionNames[a]=b},"~N,~S,~S");c$.getActionName=$_M(c$,"getActionName",function(a){return a<J.viewer.ActionManager.actionNames.length?J.viewer.ActionManager.actionNames[a]:null},"~N");c$.getActionFromName=$_M(c$,"getActionFromName",function(a){for(var b=0;b<J.viewer.ActionManager.actionNames.length;b++)if(J.viewer.ActionManager.actionNames[b].equalsIgnoreCase(a))return b;return-1},
"~S");$_M(c$,"getBindingInfo",function(a){return this.binding.getBindingInfo(J.viewer.ActionManager.actionInfo,a)},"~S");c$.getPickingModeName=$_M(c$,"getPickingModeName",function(a){return 0>a||a>=J.viewer.ActionManager.pickingModeNames.length?"off":J.viewer.ActionManager.pickingModeNames[a]},"~N");c$.getPickingMode=$_M(c$,"getPickingMode",function(a){for(var b=J.viewer.ActionManager.pickingModeNames.length;0<=--b;)if(a.equalsIgnoreCase(J.viewer.ActionManager.pickingModeNames[b]))return b;return-1},
"~S");c$.getPickingStyleName=$_M(c$,"getPickingStyleName",function(a){return 0>a||a>=J.viewer.ActionManager.pickingStyleNames.length?"toggle":J.viewer.ActionManager.pickingStyleNames[a]},"~N");c$.getPickingStyleIndex=$_M(c$,"getPickingStyleIndex",function(a){for(var b=J.viewer.ActionManager.pickingStyleNames.length;0<=--b;)if(a.equalsIgnoreCase(J.viewer.ActionManager.pickingStyleNames[b]))return b;return-1},"~S");$_M(c$,"getMouseInfo",function(){for(var a=new java.util.Hashtable,b=new J.util.JmolList,
c=this.binding.getBindings().values().iterator();c.hasNext();){var d=c.next();Clazz.instanceOf(d,Boolean)||(J.util.Escape.isAI(d)&&(d=[J.viewer.binding.Binding.getMouseActionName(d[0],!1),J.viewer.ActionManager.getActionName(d[1])]),b.addLast(d))}a.put("bindings",b);a.put("bindingName",this.binding.getName());a.put("actionNames",J.viewer.ActionManager.actionNames);a.put("actionInfo",J.viewer.ActionManager.actionInfo);a.put("bindingInfo",J.util.TextFormat.split(this.getBindingInfo(null),"\n"));return a});
$_M(c$,"setViewer",function(a){this.viewer=a;this.setBinding(this.jmolBinding=new J.viewer.binding.JmolBinding("toggle"))},"J.viewer.Viewer,~S");$_M(c$,"processEvent",function(){},"~N,~N,~N,~N,J.util.P3,~N");$_M(c$,"isBound",function(a,b){return this.binding.isBound(a,b)},"~N,~N");$_M(c$,"bindAction",function(a,b){var c=J.viewer.ActionManager.getActionFromName(b),d=J.viewer.binding.Binding.getMouseActionStr(a);0!=d&&(0<=c?this.binding.bindAction(d,c):this.binding.bindName(d,b))},"~S,~S,J.util.P3,J.util.P3");
$_M(c$,"clearBindings",function(){this.setBinding(this.jmolBinding=new J.viewer.binding.JmolBinding("toggle"));this.rasmolBinding=this.dragBinding=this.pfaatBinding=null});$_M(c$,"unbindAction",function(a,b){if(null==a&&null==b)this.clearBindings();else{var c=J.viewer.ActionManager.getActionFromName(b),d=J.viewer.binding.Binding.getMouseActionStr(a);0<=c?this.binding.unbindAction(d,c):0!=d&&this.binding.unbindName(d,b);null==b&&this.binding.unbindUserAction(a)}},"~S,~S");$_M(c$,"setGestureSwipeFactor",
function(a){this.gestureSwipeFactor=a},"~N");$_M(c$,"setMouseDragFactor",function(a){this.mouseDragFactor=a},"~N");$_M(c$,"setMouseWheelFactor",function(a){this.mouseWheelFactor=a},"~N");$_M(c$,"setCurrent",function(a,b,c,d){this.hoverOff();this.current.set(a,b,c,d)},"~N,~N,~N,~N");$_M(c$,"getCurrentX",function(){return this.current.x});$_M(c$,"getCurrentY",function(){return this.current.y});$_M(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()});$_M(c$,"clearMouseInfo",function(){this.pressedCount=this.clickedCount=0;this.dragGesture.setAction(0,
0);this.exitMeasurementMode()});$_M(c$,"isMTClient",function(){return this.isMultiTouchClient});$_M(c$,"isMTServer",function(){return this.isMultiTouchServer});$_M(c$,"dispose",function(){this.clear()});$_M(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});$_M(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(b){if(!Clazz.exceptionOf(b,Exception))throw b;}},"~B");$_M(c$,"setModeMouse",function(a){-1==a&&this.startHoverWatcher(!1)},"~N");$_M(c$,"keyPressed",function(a,b){if(!this.keyProcessing){this.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}var c=272+this.moved.modifiers;!this.labelMode&&(!this.binding.isUserAction(c)&&!this.isSelectAction(c))&&this.checkMotionRotateZoom(c,this.current.x,0,0,!1);if(this.viewer.getBoolean(603979886))switch(a){case 38:case 40:case 37:case 39:case 32:case 46:this.viewer.navigate(a,
b)}this.keyProcessing=!1}},"~N,~N");$_M(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(603979886))switch(a){case 38:case 40:case 37:case 39:this.viewer.navigate(0,0)}},"~N");$_M(c$,"mouseEntered",
function(a,b,c){this.setCurrent(a,b,c,0)},"~N,~N,~N");$_M(c$,"mouseExited",function(a,b,c){this.setCurrent(a,b,c,0);null!=this.measurementPending&&(this.exitMeasurementMode(),this.viewer.refresh(3,"mouseExit"))},"~N,~N,~N");$_M(c$,"minimize",($fz=function(a){this.viewer.stopMinimization();var b=this.dragAtomIndex;a&&(this.dragAtomIndex=-1);a=0==this.viewer.getMotionFixedAtoms().cardinality()?this.viewer.getAtomBits(this.viewer.isAtomPDB(b)?1087373318:1095761934,J.util.BSUtil.newAndSetBit(b)):J.util.BSUtil.setAll(this.viewer.getAtomCount());
this.viewer.minimize(2147483647,0,a,null,0,!1,!1,!1)},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"getExitRate",function(){return 5<this.dragGesture.getTimeDifference(2)?0:this.dragGesture.getSpeedPixelsPerMillisecond(4,2)});$_M(c$,"isRubberBandSelect",($fz=function(a){return this.rubberbandSelectionMode&&(this.isBound(a,18)||this.isBound(a,20)||this.isBound(a,19))},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"getRubberBand",function(){return!this.rubberbandSelectionMode||2147483647==this.rectRubber.x?null:this.rectRubber});
$_M(c$,"calcRectRubberBand",($fz=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)},$fz.isPrivate=!0,$fz));$_M(c$,"checkAction",($fz=function(a,b,c,d,e,f,g){var h=J.viewer.binding.Binding.getModifiers(a);if(0!=h){h=this.viewer.notifyMouseClicked(b,c,J.viewer.binding.Binding.getMouseAction(-this.pressedCount,h),g);if(0==h)return;0<h&&(a=h)}if(this.isRubberBandSelect(a))this.calcRectRubberBand(),this.viewer.refresh(3,"rubberBand selection");else if(!this.checkUserAction(a,b,c,d,e,f,g)){if(0<=this.viewer.getRotateBondIndex()){if(this.isBound(a,26)){this.viewer.moveSelected(d,e,
-2147483648,b,c,null,!1,!1);return}this.isBound(a,2)||this.viewer.setRotateBondIndex(-1)}if(0<=this.dragAtomIndex)switch(this.atomPickingMode){case 26:this.checkMotion(3);this.isBound(a,25)&&this.viewer.getBoolean(603979785)?this.viewer.rotateSelected(this.getDegrees(d,0),this.getDegrees(e,1),null):this.viewer.moveSelected(d,e,this.isBound(a,24)?-e:-2147483648,-2147483648,-2147483648,null,!0,!1);return;case 27:case 28:case 29:case 30:1==this.dragGesture.getPointCount()&&this.viewer.undoMoveActionClear(this.dragAtomIndex,
2,!0);this.checkMotion(3);if(this.isBound(a,25))b=this.viewer.getAtomBits(1095761934,J.util.BSUtil.newAndSetBit(this.dragAtomIndex)),this.viewer.rotateSelected(this.getDegrees(d,0),this.getDegrees(e,1),b);else{b=null;switch(this.atomPickingMode){case 27:case 30:b=this.viewer.getAtomBits(1095761934,J.util.BSUtil.newAndSetBit(this.dragAtomIndex)),this.viewer.select(b,!1,null,!0)}this.viewer.moveAtomWithHydrogens(this.dragAtomIndex,d,e,this.isBound(a,24)?-e:-2147483648,b)}return}if(0<=this.dragAtomIndex&&
this.isBound(a,43)&&32==this.atomPickingMode)e=this.viewer.findNearestAtomIndexMovable(b,c,!1),0<=e?(null!=this.measurementPending?this.measurementPending.setCount(1):this.measuresEnabled&&this.enterMeasurementMode(e),this.addToMeasurement(e,null,!0),this.measurementPending.colix=20):null!=this.measurementPending&&(this.measurementPending.setCount(1),this.measurementPending.colix=23),null!=this.measurementPending&&(this.measurementPending.traceX=b,this.measurementPending.traceY=c,this.viewer.refresh(3,
"assignNew"));else{if(!this.drawMode&&!this.labelMode){if(this.isBound(a,1)){this.viewer.translateXYBy(d,e);return}if(this.isBound(a,0)){2147483647==this.pressedAtomIndex&&(this.pressedAtomIndex=this.viewer.findNearestAtomIndex(this.pressed.x,this.pressed.y));a=0>this.pressedAtomIndex?null:this.viewer.getAtomPoint3f(this.pressedAtomIndex);null==a?this.viewer.translateXYBy(d,e):this.viewer.centerAt(b,c,a);return}}this.dragSelectedMode&&this.haveSelection&&(this.isBound(a,22)||this.isBound(a,25))?(b=
this.viewer.getSelectionSet(!1).nextSetBit(0),0>b||(1==this.dragGesture.getPointCount()?this.viewer.undoMoveActionClear(b,2,!0):this.viewer.moveSelected(2147483647,0,-2147483648,-2147483648,-2147483648,null,!1,!1),this.checkMotion(3),this.isBound(a,25)&&this.viewer.getBoolean(603979785)?this.viewer.rotateSelected(this.getDegrees(d,0),this.getDegrees(e,1),null):this.viewer.moveSelected(d,e,-2147483648,-2147483648,-2147483648,null,!0,!1))):this.drawMode&&(this.isBound(a,32)||this.isBound(a,31))||this.labelMode&&
this.isBound(a,30)?(this.checkMotion(3),this.viewer.checkObjectDragged(this.dragged.x,this.dragged.y,b,c,a)):this.checkMotionRotateZoom(a,b,d,e,!0)?this.viewer.getSlabEnabled()&&this.checkSlideZoom(a)?this.viewer.slabDepthByPixels(e):this.viewer.zoomBy(e):this.isBound(a,2)?(d=this.getDegrees(d,0),e=this.getDegrees(e,1),this.viewer.global.useArcBall?this.viewer.rotateArcBall(b,c,this.mouseDragFactor):this.viewer.rotateXYBy(d,e)):this.isBound(a,4)?Math.abs(e)>5*Math.abs(d)?(this.checkMotion(5),this.viewer.zoomBy(e)):
Math.abs(d)>5*Math.abs(e)&&(this.checkMotion(3),this.viewer.rotateZBy(-d,2147483647,2147483647)):this.isBound(a,5)?this.zoomByFactor(e,2147483647,2147483647):this.isBound(a,3)?(this.checkMotion(3),this.viewer.rotateZBy(-d,2147483647,2147483647)):this.viewer.getSlabEnabled()&&(this.isBound(a,12)?this.viewer.depthByPixels(e):this.isBound(a,11)?this.viewer.slabByPixels(e):this.isBound(a,13)&&this.viewer.slabDepthByPixels(e))}}},$fz.isPrivate=!0,$fz),"~N,~N,~N,~N,~N,~N,~N");$_M(c$,"getDegrees",function(a,
b){var c=0==b?this.viewer.getScreenWidth():this.viewer.getScreenHeight();500<c&&(c=500);return 180*(a/c)*this.mouseDragFactor},"~N,~N");$_M(c$,"zoomByFactor",function(a,b,c){0!=a&&(this.checkMotion(5),this.viewer.zoomByFactor(Math.pow(this.mouseWheelFactor,a),b,c),this.viewer.setInMotion(!1))},"~N,~N,~N");$_M(c$,"checkUserAction",($fz=function(a,b,c,d,e,f,g){if(!this.binding.isUserAction(a))return!1;for(var h=this.binding.getBindings(),k=h.keySet().iterator(),l=!1,m;k.hasNext();){var n=k.next();if(0==
n.indexOf(a+"\t")&&J.util.Escape.isAS(m=h.get(n))){l=m[1];n=null;if(0<=l.indexOf("_ATOM")){var p=this.findNearestAtom(b,c,null,!0),l=J.util.TextFormat.simpleReplace(l,"_ATOM","({"+(0<=p?""+p:"")+"})");0<=p&&(l=J.util.TextFormat.simpleReplace(l,"_POINT",J.util.Escape.eP(this.viewer.getModelSet().atoms[p])))}if(!this.drawMode&&(0<=l.indexOf("_POINT")||0<=l.indexOf("_OBJECT")||0<=l.indexOf("_BOND"))){p=this.viewer.checkObjectClicked(b,c,a);if(null!=p&&null!=(n=p.get("pt")))p.get("type").equals("bond")&&
(l=J.util.TextFormat.simpleReplace(l,"_BOND","[{"+p.get("index")+"}]")),l=J.util.TextFormat.simpleReplace(l,"_POINT",J.util.Escape.eP(n)),l=J.util.TextFormat.simpleReplace(l,"_OBJECT",J.util.Escape.escapeMap(p));l=J.util.TextFormat.simpleReplace(l,"_BOND","[{}]");l=J.util.TextFormat.simpleReplace(l,"_OBJECT","{}")}l=J.util.TextFormat.simpleReplace(l,"_POINT","{}");l=J.util.TextFormat.simpleReplace(l,"_ACTION",""+a);l=J.util.TextFormat.simpleReplace(l,"_X",""+b);l=J.util.TextFormat.simpleReplace(l,
"_Y",""+(this.viewer.getScreenHeight()-c));l=J.util.TextFormat.simpleReplace(l,"_DELTAX",""+d);l=J.util.TextFormat.simpleReplace(l,"_DELTAY",""+e);l=J.util.TextFormat.simpleReplace(l,"_TIME",""+f);l=J.util.TextFormat.simpleReplace(l,"_MODE",""+g);this.viewer.evalStringQuiet(l);l=!0}}return l},$fz.isPrivate=!0,$fz),"~N,~N,~N,~N,~N,~N,~N");$_M(c$,"checkMotionRotateZoom",($fz=function(a,b,c,d,e){b=this.checkSlideZoom(a);var f=this.isBound(a,2),g=this.isBound(a,4);if(!b&&!f&&!g)return!1;a=(c=g&&(0==c||
Math.abs(d)>5*Math.abs(c)))||this.isZoomArea(this.moved.x)||this.isBound(a,5)?5:f||g?3:0;4!=this.viewer.getCursor()&&this.viewer.setCursor(a);e&&this.viewer.setInMotion(!0);return c||b},$fz.isPrivate=!0,$fz),"~N,~N,~N,~N,~B");$_M(c$,"checkSlideZoom",($fz=function(a){return this.isBound(a,6)&&this.isZoomArea(this.pressed.x)},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"isZoomArea",($fz=function(a){return a>98*this.viewer.getScreenWidth()*(this.viewer.isStereoDouble()?2:1)/100},$fz.isPrivate=!0,$fz),"~N");$_M(c$,
"getPoint",($fz=function(a){var b=new J.util.Point3fi;b.setT(a.get("pt"));b.modelIndex=a.get("modelIndex").intValue();return b},$fz.isPrivate=!0,$fz),"java.util.Map");$_M(c$,"findNearestAtom",($fz=function(a,b,c,d){a=this.drawMode||null!=c?-1:this.viewer.findNearestAtomIndexMovable(a,b,!1);return 0<=a&&(d||null==this.measurementPending)&&!this.viewer.isInSelectionSubset(a)?-1:a},$fz.isPrivate=!0,$fz),"~N,~N,J.util.Point3fi,~B");$_M(c$,"isSelectAction",($fz=function(a){return this.isBound(a,33)||this.isBound(a,
34)||this.isBound(a,18)||this.isBound(a,19)||this.isBound(a,20)||this.isBound(a,21)||this.isBound(a,16)},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"checkMotion",function(a){4!=this.viewer.getCursor()&&this.viewer.setCursor(a);this.viewer.setInMotion(!0)},"~N");$_M(c$,"addToMeasurement",($fz=function(a,b,c){if(-1==a&&null==b||null==this.measurementPending)return this.exitMeasurementMode(),0;var d=this.measurementPending.getCount();-2147483648!=this.measurementPending.traceX&&2==d&&this.measurementPending.setCount(d=
1);return 4==d&&!c?d:this.measurementPending.addPoint(a,b,!0)},$fz.isPrivate=!0,$fz),"~N,J.util.Point3fi,~B");$_M(c$,"enterMeasurementMode",($fz=function(a){this.viewer.setPicked(-1);this.viewer.setPicked(a);this.viewer.setCursor(2);this.viewer.setPendingMeasurement(this.measurementPending=J.modelset.MeasurementPending.getMP(this.viewer.getModelSet()));this.measurementQueued=this.measurementPending},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"exitMeasurementMode",($fz=function(){null!=this.measurementPending&&
(this.viewer.setPendingMeasurement(this.measurementPending=null),this.viewer.setCursor(0))},$fz.isPrivate=!0,$fz));$_M(c$,"checkHover",function(){if(!this.viewer.getInMotion()&&!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);0<=a&&this.viewer.hoverOn(a,J.viewer.binding.Binding.getMouseAction(this.clickedCount,this.moved.modifiers))}});$_M(c$,"hoverOff",function(){try{this.viewer.hoverOff()}catch(a){if(!Clazz.exceptionOf(a,
Exception))throw a;}});$_M(c$,"resetMeasurement",($fz=function(){this.exitMeasurementMode();this.measurementQueued=J.modelset.MeasurementPending.getMP(this.viewer.getModelSet())},$fz.isPrivate=!0,$fz));$_M(c$,"getPickingState",function(){var a=";set modelkitMode "+this.viewer.getBoolean(603979882)+";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+";"});$_M(c$,"getAtomPickingMode",function(){return this.atomPickingMode});$_M(c$,"setPickingMode",function(a){var b=!1;switch(a){case -1:b=!0;this.bondPickingMode=35;a=1;break;case 35:case 34:case 33:this.viewer.setBooleanProperty("bondPicking",!0);this.bondPickingMode=a;return;case 8:this.bondPickingMode=a;if(this.viewer.getBondPicking())return;b=!0}b=(new Boolean(b|this.atomPickingMode!=a)).valueOf();this.atomPickingMode=a;b&&
this.resetMeasurement()},"~N");$_M(c$,"setAtomPickingOption",function(a){switch(this.atomPickingMode){case 32:this.pickAtomAssignType=a,this.isPickAtomAssignCharge=this.pickAtomAssignType.equals("Pl")||this.pickAtomAssignType.equals("Mi")}},"~S");$_M(c$,"setBondPickingOption",function(a){switch(this.bondPickingMode){case 33:this.pickBondAssignType=Character.toLowerCase(a.charAt(0))}},"~S");$_M(c$,"getPickingStyle",function(){return this.pickingStyle});$_M(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.getName().equals("extendedSelect")||this.setBinding(null==this.pfaatBinding?this.pfaatBinding=J.viewer.binding.Binding.newBinding("Pfaat"):this.pfaatBinding);break;case 3:this.binding.getName().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.getName().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.getName().equals("drag")||(this.predragBinding=this.binding)},"~N");$_M(c$,"setBinding",function(a){this.binding=a},"J.viewer.binding.Binding");$_M(c$,"getSequence",($fz=
function(){var a=this.measurementQueued.getAtomIndex(1),b=this.measurementQueued.getAtomIndex(2);0>a||0>b||(a=this.viewer.getSmiles(a,b,null,!0,!1,!1,!1),this.viewer.setStatusMeasuring("measureSequence",-2,a,0))},$fz.isPrivate=!0,$fz));$_M(c$,"queueAtom",($fz=function(a,b){var c=this.measurementQueued.addPoint(a,b,!0);0<=a&&this.viewer.setStatusAtomPicked(a,"Atom #"+c+":"+this.viewer.getAtomInfo(a));return c},$fz.isPrivate=!0,$fz),"~N,J.util.Point3fi");$_M(c$,"mouseAction",function(a,b,c,d,e,f){if(this.viewer.getMouseEnabled())switch(a){case 0:this.setCurrent(b,
c,d,f);this.moved.setCurrent(this.current,0);null!=this.measurementPending||this.hoverActive?this.checkPointOrAtomClicked(c,d,0,0,b,!1,0):this.isZoomArea(c)?this.checkMotionRotateZoom(J.viewer.binding.Binding.getMouseAction(1,16),0,0,0,!1):5==this.viewer.getCursor()&&this.viewer.setCursor(0);break;case 3:if(this.viewer.isApplet()&&!this.viewer.hasFocus())break;this.setCurrent(b,this.current.x,this.current.y,f);this.checkAction(J.viewer.binding.Binding.getMouseAction(0,f),this.current.x,this.current.y,
0,d,b,3);break;case 2:this.setMouseMode();this.clickedCount=1<e?e:this.clicked.check(0,0,0,f,b,700)?this.clickedCount+1:1;1==this.clickedCount&&this.setCurrent(b,c,d,f);this.clicked.setCurrent(this.current,2);this.viewer.setFocus();if(9!=this.atomPickingMode&&this.isBound(J.viewer.binding.Binding.getMouseAction(-2147483648,f),23))break;this.checkPointOrAtomClicked(c,d,f,this.clickedCount,b,!1,2);break;case 1:this.setMouseMode();e=c-this.dragged.x;var g=d-this.dragged.y;this.setCurrent(b,c,d,f);this.dragged.setCurrent(this.current,
1);32!=this.atomPickingMode&&this.exitMeasurementMode();a=J.viewer.binding.Binding.getMouseAction(this.pressedCount,f);this.dragGesture.add(a,c,d,b);this.checkAction(a,c,d,e,g,b,1);break;case 4:this.setMouseMode();this.pressedCount=this.pressed.check(0,0,0,f,b,700)?this.pressedCount+1:1;1==this.pressedCount&&this.setCurrent(b,c,d,f);this.pressed.setCurrent(this.current,4);this.dragged.setCurrent(this.current,4);this.viewer.setFocus();e=this.isBound(J.viewer.binding.Binding.getMouseAction(-2147483648,
f),23);a=J.viewer.binding.Binding.getMouseAction(this.pressedCount,f);this.dragGesture.setAction(a,b);if(0!=J.viewer.binding.Binding.getModifiers(a)&&(a=this.viewer.notifyMouseClicked(c,d,a,4),0==a))break;this.pressedAtomIndex=2147483647;if(this.drawMode&&(this.isBound(a,32)||this.isBound(a,31))||this.labelMode&&this.isBound(a,30)){this.viewer.checkObjectDragged(-2147483648,0,c,d,a);break}this.checkUserAction(a,c,d,0,0,b,4);b=!1;switch(this.atomPickingMode){case 32:b=this.isBound(a,43);break;case 28:b=
this.isBound(a,27)||this.isBound(a,24);break;case 26:case 27:b=this.isBound(a,27)||this.isBound(a,25)||this.isBound(a,24);break;case 29:b=this.isBound(a,28)||this.isBound(a,24);break;case 30:b=this.isBound(a,29)||this.isBound(a,25)||this.isBound(a,24)}if(b){this.dragAtomIndex=this.viewer.findNearestAtomIndexMovable(c,d,!0);if(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);break}if(this.isBound(a,14)){a="j";this.viewer.getBoolean(603979882)&&(a=this.viewer.checkObjectClicked(c,d,J.viewer.binding.Binding.getMouseAction(1,16)),a=null!=a&&"bond".equals(a.get("type"))?"b":0<=this.viewer.findNearestAtomIndex(c,d)?"a":"m");this.viewer.popupMenu(c,d,a);break}if(this.dragSelectedMode){this.haveSelection=!0;e&&(this.haveSelection=0<=this.viewer.findNearestAtomIndexMovable(c,d,!0));if(!this.haveSelection)break;(this.isBound(a,22)||this.isBound(a,24))&&this.viewer.moveSelected(-2147483648,
0,-2147483648,-2147483648,-2147483648,null,!1,!1);break}this.viewer.global.useArcBall&&this.viewer.rotateArcBall(c,d,0);this.checkMotionRotateZoom(a,c,0,0,!0);break;case 5:this.setCurrent(b,c,d,f);this.viewer.spinXYBy(0,0,0);e=!this.pressed.check(this.xyRange,c,d,f,b,9223372036854775E3);this.viewer.setInMotion(!1);this.viewer.setCursor(0);a=J.viewer.binding.Binding.getMouseAction(this.pressedCount,f);this.dragGesture.add(a,c,d,b);e&&this.viewer.setRotateBondIndex(-2147483648);0<=this.dragAtomIndex&&
(29==this.atomPickingMode||30==this.atomPickingMode)&&this.minimize(!0);if(32==this.atomPickingMode&&this.isBound(a,43)){if(null==this.measurementPending||0>this.dragAtomIndex)break;this.assignNew(c,d);break}this.dragAtomIndex=-1;this.isRubberBandSelect(a)&&this.selectRb(a);this.rubberbandSelectionMode=this.binding.getName().equals("drag");this.rectRubber.x=2147483647;e&&this.viewer.notifyMouseClicked(c,d,J.viewer.binding.Binding.getMouseAction(this.pressedCount,0),5);if(this.drawMode&&(this.isBound(a,
32)||this.isBound(a,31))||this.labelMode&&this.isBound(a,30)){this.viewer.checkObjectDragged(2147483647,0,c,d,a);break}this.dragSelectedMode&&(this.isBound(a,22)&&this.haveSelection)&&this.viewer.moveSelected(2147483647,0,-2147483648,-2147483648,-2147483648,null,!1,!1);if(e&&this.checkUserAction(a,c,d,0,0,b,5))break;this.viewer.getBoolean(603979780)&&this.isBound(a,8)&&(c=this.getExitRate(),0<c&&this.viewer.spinXYBy(this.dragGesture.getDX(4,2),this.dragGesture.getDY(4,2),30*c*this.gestureSwipeFactor),
this.viewer.global.logGestures&&this.viewer.log("$NOW$ swipe "+this.dragGesture+" "+c))}},"~N,~N,~N,~N,~N,~N");$_M(c$,"runScript",($fz=function(a){this.viewer.script(a)},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"getSelectionSet",($fz=function(a){try{return this.viewer.getAtomBitSetEval(null,a)}catch(b){if(!Clazz.exceptionOf(b,Exception))throw b;}return null},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"selectRb",($fz=function(a){var b=this.viewer.findAtomsInRectangle(this.rectRubber);0<b.length()&&(b=J.util.Escape.eBS(b),
this.isBound(a,20)?this.runScript("selectionHalos on;select selected or "+b):this.isBound(a,19)?this.runScript("selectionHalos on;select selected and not "+b):this.runScript("selectionHalos on;select selected tog "+b));this.viewer.refresh(3,"mouseReleased")},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"assignNew",($fz=function(a,b){if(2==this.measurementPending.getCount())this.viewer.undoMoveActionClear(-1,4146,!0),this.runScript("assign connect "+this.measurementPending.getMeasurementScript(" ",!1));else if(this.pickAtomAssignType.equals("Xx"))this.exitMeasurementMode(),
this.viewer.refresh(3,"bond dropped");else if(this.pressed.inRange(this.xyRange,this.dragged.x,this.dragged.y)){var c="assign atom ({"+this.dragAtomIndex+'}) "'+this.pickAtomAssignType+'"';this.isPickAtomAssignCharge?(c+=";{atomindex="+this.dragAtomIndex+"}.label='%C'; ",this.viewer.undoMoveActionClear(this.dragAtomIndex,4,!0)):this.viewer.undoMoveActionClear(-1,4146,!0);this.runScript(c)}else this.isPickAtomAssignCharge||(this.viewer.undoMoveActionClear(-1,4146,!0),c=this.viewer.getModelSet().atoms[this.dragAtomIndex],
1==c.getElementNumber()?this.runScript("assign atom ({"+this.dragAtomIndex+'}) "X"'):(c=J.util.P3.new3(a,b,c.screenZ),this.viewer.unTransformPoint(c,c),this.runScript("assign atom ({"+this.dragAtomIndex+'}) "'+this.pickAtomAssignType+'" '+J.util.Escape.eP(c))));this.exitMeasurementMode()},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"checkPointOrAtomClicked",($fz=function(a,b,c,d,e,f,g){if(!this.viewer.haveModelSet())return!1;c=J.viewer.binding.Binding.getMouseAction(d,c);if(0!=c&&(this.checkUserAction(c,
a,b,0,0,e,g),c=this.viewer.notifyMouseClicked(a,b,c,g),0==c))return!1;if(this.isBound(c,15)&&this.viewer.frankClicked(a,b))return this.viewer.popupMenu(-a,b,"j"),!1;if(this.isBound(c,15)&&this.viewer.frankClickedModelKit(a,b))return this.viewer.popupMenu(0,0,"m"),!1;e=null;var h=!1;g=!1;var k=null;!this.drawMode&&!f&&(k=this.viewer.checkObjectClicked(a,b,c),null!=k&&(h="bond".equals(k.get("type")),g="isosurface".equals(k.get("type")),e=this.getPoint(k)));h&&(d=1);if(null!=e&&Float.isNaN(e.x))return!1;
f=this.findNearestAtom(a,b,e,0<d);if(0==d&&32!=this.atomPickingMode){if(null==this.measurementPending)return 0<=f;(null!=e||0==this.measurementPending.getIndexOf(f))&&this.measurementPending.addPoint(f,e,!1);this.measurementPending.haveModified()&&this.viewer.setPendingMeasurement(this.measurementPending);this.viewer.refresh(3,"measurementPending");return 0<=f}this.setMouseMode();this.isBound(c,45)&&this.viewer.stopMotion();if(this.viewer.getBoolean(603979886)&&23==this.atomPickingMode&&this.isBound(c,
39))return this.viewer.navTranslatePercent(100*a/this.viewer.getScreenWidth()-50,100*b/this.viewer.getScreenHeight()-50),!1;if(h){if(this.isBound(c,34==this.bondPickingMode||33==this.bondPickingMode?43:41)){33==this.bondPickingMode&&this.viewer.undoMoveActionClear(-1,4146,!0);a=k.get("index").intValue();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))}return!1}}else{if(g)return!1;
if(32!=this.atomPickingMode&&null!=this.measurementPending&&this.isBound(c,36))return this.atomOrPointPicked(f,e,c),4==this.addToMeasurement(f,e,!1)&&this.toggleMeasurement(),!1;if(this.isBound(c,37))return null!=this.measurementPending?(this.addToMeasurement(f,e,!0),this.toggleMeasurement()):!this.drawMode&&(!this.labelMode&&!this.dragSelectedMode&&this.measuresEnabled)&&(this.enterMeasurementMode(f),this.addToMeasurement(f,e,!0)),this.atomOrPointPicked(f,e,c),!1}return(a=this.dragSelectedMode&&
(this.isBound(c,25)||this.isBound(c,22)))||this.isSelectAction(c)?(g||this.atomOrPointPicked(f,e,a?0:c),0<=f):this.isBound(c,44)?(0>f&&this.runScript("!reset"),!1):0<=f},$fz.isPrivate=!0,$fz),"~N,~N,~N,~N,~N,~B,~N");$_M(c$,"toggleMeasurement",($fz=function(){if(null!=this.measurementPending){var a=this.measurementPending.getCount();2<=a&&4>=a&&this.runScript("!measure "+this.measurementPending.getMeasurementScript(" ",!0));this.exitMeasurementMode()}},$fz.isPrivate=!0,$fz));$_M(c$,"atomOrPointPicked",
($fz=function(a,b,c){if(0>a){this.resetMeasurement();if(this.isBound(c,17)){this.runScript("select none");return}if(5!=this.atomPickingMode&&6!=this.atomPickingMode)return}var d=2;switch(this.atomPickingMode){case 28:case 29:return;case 0:return;case 25:case 24:case 8:var d=8==this.atomPickingMode,e=25==this.atomPickingMode;if(!this.isBound(c,d?41:42))return;if(null==this.measurementQueued||0==this.measurementQueued.getCount()||2<this.measurementQueued.getCount())this.resetMeasurement(),this.enterMeasurementMode(a);
this.addToMeasurement(a,b,!0);if(2!=this.queueAtom(a,b))return;a=d||this.measurementQueued.isConnected(this.viewer.getModelSet().atoms,2)?" DELETE":e?"STRUTS":"";this.runScript("connect "+this.measurementQueued.getMeasurementScript(" ",!0)+a);this.resetMeasurement();return;case 21:d++;case 20:d++;case 18:case 19:case 22:if(!this.isBound(c,36))return;if(null==this.measurementQueued||0==this.measurementQueued.getCount()||this.measurementQueued.getCount()>d)this.resetMeasurement(),this.enterMeasurementMode(a);
this.addToMeasurement(a,b,!0);this.queueAtom(a,b);c=this.measurementQueued.getCount();1==c&&(this.viewer.setPicked(-1),this.viewer.setPicked(a));if(c<d)return;22==this.atomPickingMode?this.getSequence():(this.viewer.setStatusMeasuring("measurePicked",d,this.measurementQueued.getStringDetail(),this.measurementQueued.getValue()),(18==this.atomPickingMode||4==this.pickingStyleMeasure)&&this.runScript("measure "+this.measurementQueued.getMeasurementScript(" ",!0)));this.resetMeasurement();return}d=null!=
this.measurementPending&&1!=this.atomPickingMode?1:this.atomPickingMode;switch(d){case 3:if(!this.isBound(c,33))return;null==b?(this.runScript("zoomTo (atomindex="+a+")"),this.viewer.setStatusAtomPicked(a,null)):this.runScript("zoomTo "+J.util.Escape.eP(b));return;case 5:case 6:this.checkTwoAtomAction(c,b,a)}if(null==b){switch(d){case 1:this.isBound(c,33)&&this.viewer.setStatusAtomPicked(a,null);return;case 2:this.isBound(c,35)&&(this.runScript("set labeltoggle {atomindex="+a+"}"),this.viewer.setStatusAtomPicked(a,
null));return;case 31:if(this.isBound(c,43)){b=this.viewer.getAtomBitSet("connected(atomIndex="+a+") and !within(SMARTS,'[r50,R]')");d=b.cardinality();switch(d){case 0:case 1:return;case 3:case 4:var e=Clazz.newIntArray(d,0),f=Clazz.newIntArray(d,0),g=0;for(c=b.nextSetBit(0);0<=c;c=b.nextSetBit(c+1),g++)e[g]=this.viewer.getBranchBitSet(c,a).cardinality(),f[g]=c;for(g=0;g<d-2;g++){var h=-2147483648,k=0;for(c=0;c<d;c++)e[c]>=h&&b.get(f[c])&&(k=f[c],h=e[c]);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(c,40)&&(b=J.util.BSUtil.newAndSetBit(a),this.viewer.deleteAtoms(b,!1),this.viewer.setStatusAtomPicked(a,"deleted: "+J.util.Escape.eBS(b)));return}b="atomindex="+a;switch(this.atomPickingMode){default:return;case 9:this.applySelectStyle(b,c);break;case 10:this.applySelectStyle("within(group, "+b+")",c);break;case 11:this.applySelectStyle("within(chain, "+b+
")",c);break;case 13:this.applySelectStyle("within(polymer, "+b+")",c);break;case 14:this.applySelectStyle("within(structure, "+b+")",c);break;case 12:this.applySelectStyle("within(molecule, "+b+")",c);break;case 16:this.applySelectStyle("within(model, "+b+")",c);break;case 17:this.applySelectStyle("visible and within(element, "+b+")",c);break;case 15:this.applySelectStyle("visible and within(site, "+b+")",c)}this.viewer.clearClickCount();this.viewer.setStatusAtomPicked(a,null)}},$fz.isPrivate=!0,
$fz),"~N,J.util.Point3fi,~N");$_M(c$,"checkTwoAtomAction",($fz=function(a,b,c){if(this.isBound(a,33))if(a=5==this.atomPickingMode,this.viewer.getSpinOn()||this.viewer.getNavOn()||null!=this.viewer.getPendingMeasurement())this.resetMeasurement(),this.viewer.getSpinOn()&&this.runScript("spin off");else{2<=this.measurementQueued.getCount()&&this.resetMeasurement();var d=this.measurementQueued.getCount();if(1==d)if(null==b){if(this.measurementQueued.getAtomIndex(1)==c)return}else if(0==this.measurementQueued.getAtom(1).distance(b))return;
if(0<=c||null!=b)d=this.queueAtom(c,b);2>d?a?this.viewer.scriptStatus(1==d?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==d?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")):(b=this.measurementQueued.getMeasurementScript(" ",!1),a?this.runScript("spin"+
b+" "+this.viewer.getInt(553648158)):this.runScript("draw symop"+b+";show symop"+b))}},$fz.isPrivate=!0,$fz),"~N,J.util.Point3fi,~N");$_M(c$,"applySelectStyle",($fz=function(a,b){if(!(null!=this.measurementPending||this.selectionWorking)){this.selectionWorking=!0;var c=this.rubberbandSelectionMode||this.isBound(b,18)?"selected and not ("+a+") or (not selected) and ":this.isBound(b,19)?"selected and not ":this.isBound(b,20)?"selected or ":0==b||this.isBound(b,21)?"selected tog ":this.isBound(b,16)?
"":null;null!=c&&(c+="("+a+")",J.util.Logger.debugging&&J.util.Logger.debug(c),c=this.getSelectionSet(c),null!=c&&(this.viewer.select(c,!1,null,!1),this.viewer.refresh(3,"selections set")));this.selectionWorking=!1}},$fz.isPrivate=!0,$fz),"~S,~N");c$.$ActionManager$MotionPoint$=function(){Clazz.pu$h();c$=Clazz.decorateAsClass(function(){Clazz.prepareCallback(this,arguments);this.time=this.y=this.x=this.index=0;Clazz.instantialize(this,arguments)},J.viewer.ActionManager,"MotionPoint");$_M(c$,"set",
function(a,b,c,d){this.index=a;this.x=b;this.y=c;this.time=d},"~N,~N,~N,~N");Clazz.overrideMethod(c$,"toString",function(){return"[x = "+this.x+" y = "+this.y+" time = "+this.time+" ]"});c$=Clazz.p0p()};c$.$ActionManager$Gesture$=function(){Clazz.pu$h();c$=Clazz.decorateAsClass(function(){Clazz.prepareCallback(this,arguments);this.action=0;this.nodes=null;this.time0=this.ptNext=0;Clazz.instantialize(this,arguments)},J.viewer.ActionManager,"Gesture");Clazz.makeConstructor(c$,function(a){this.nodes=
Array(a);for(var b=0;b<a;b++)this.nodes[b]=Clazz.innerTypeInstance(J.viewer.ActionManager.MotionPoint,this,null)},"~N");$_M(c$,"setAction",function(a,b){this.action=a;this.ptNext=0;this.time0=b;for(var c=0;c<this.nodes.length;c++)this.nodes[c].index=-1},"~N,~N");$_M(c$,"getAction",function(){return this.action});$_M(c$,"add",function(a,b,c,d){this.action=a;this.getNode(this.ptNext).set(this.ptNext,b,c,d-this.time0);this.ptNext++;return this.ptNext},"~N,~N,~N,~N");$_M(c$,"getTimeDifference",function(a){a=
this.getPointCount2(a,0);if(2>a)return 0;var b=this.getNode(this.ptNext-1);a=this.getNode(this.ptNext-a);return b.time-a.time},"~N");$_M(c$,"getSpeedPixelsPerMillisecond",function(a,b){a=this.getPointCount2(a,b);if(2>a)return 0;var c=this.getNode(this.ptNext-1-b),d=this.getNode(this.ptNext-a-b),e=360*((c.x-d.x)/this.b$["J.viewer.ActionManager"].viewer.getScreenWidth()),f=360*((c.y-d.y)/this.b$["J.viewer.ActionManager"].viewer.getScreenHeight());return Math.sqrt(e*e+f*f)/(c.time-d.time)},"~N,~N");
$_M(c$,"getDX",function(a,b){a=this.getPointCount2(a,b);if(2>a)return 0;var c=this.getNode(this.ptNext-1-b),d=this.getNode(this.ptNext-a-b);return c.x-d.x},"~N,~N");$_M(c$,"getDY",function(a,b){a=this.getPointCount2(a,b);if(2>a)return 0;var c=this.getNode(this.ptNext-1-b),d=this.getNode(this.ptNext-a-b);return c.y-d.y},"~N,~N");$_M(c$,"getPointCount",function(){return this.ptNext});$_M(c$,"getPointCount2",function(a,b){a>this.nodes.length-b&&(a=this.nodes.length-b);for(var c=a+1;0<=--c&&!(0<=this.getNode(this.ptNext-
c-b).index););return c},"~N,~N");$_M(c$,"getNode",function(a){return this.nodes[(a+this.nodes.length+this.nodes.length)%this.nodes.length]},"~N");Clazz.overrideMethod(c$,"toString",function(){return 0==this.nodes.length?""+this:J.viewer.binding.Binding.getMouseActionName(this.action,!1)+" nPoints = "+this.ptNext+" "+this.nodes[0]});c$=Clazz.p0p()};Clazz.defineStatics(c$,"ACTION_center",0,"ACTION_translate",1,"ACTION_rotate",2,"ACTION_rotateZ",3,"ACTION_rotateZorZoom",4,"ACTION_wheelZoom",5,"ACTION_slideZoom",
6,"ACTION_navTranslate",7,"ACTION_swipe",8,"ACTION_spinDrawObjectCW",9,"ACTION_spinDrawObjectCCW",10,"ACTION_slab",11,"ACTION_depth",12,"ACTION_slabAndDepth",13,"ACTION_popupMenu",14,"ACTION_clickFrank",15,"ACTION_select",16,"ACTION_selectNone",17,"ACTION_selectToggle",18,"ACTION_selectAndNot",19,"ACTION_selectOr",20,"ACTION_selectToggleExtended",21,"ACTION_dragSelected",22,"ACTION_selectAndDrag",23,"ACTION_dragZ",24,"ACTION_rotateSelected",25,"ACTION_rotateBranch",26,"ACTION_dragAtom",27,"ACTION_dragMinimize",
28,"ACTION_dragMinimizeMolecule",29,"ACTION_dragLabel",30,"ACTION_dragDrawPoint",31,"ACTION_dragDrawObject",32,"ACTION_pickAtom",33,"ACTION_pickPoint",34,"ACTION_pickLabel",35,"ACTION_pickMeasure",36,"ACTION_setMeasure",37,"ACTION_pickIsosurface",38,"ACTION_pickNavigate",39,"ACTION_deleteAtom",40,"ACTION_deleteBond",41,"ACTION_connectAtoms",42,"ACTION_assignNew",43,"ACTION_reset",44,"ACTION_stopMotion",45,"ACTION_multiTouchSimulation",46,"ACTION_count",47);c$.actionInfo=c$.prototype.actionInfo=Array(47);
c$.actionNames=c$.prototype.actionNames=Array(47);J.viewer.ActionManager.newAction(0,"_center",J.i18n.GT._("center"));J.viewer.ActionManager.newAction(1,"_translate",J.i18n.GT._("translate"));J.viewer.ActionManager.newAction(2,"_rotate",J.i18n.GT._("rotate"));J.viewer.ActionManager.newAction(3,"_rotateZ",J.i18n.GT._("rotate Z"));J.viewer.ActionManager.newAction(4,"_rotateZorZoom",J.i18n.GT._("rotate Z (horizontal motion of mouse) or zoom (vertical motion of mouse)"));J.viewer.ActionManager.newAction(5,
"_wheelZoom",J.i18n.GT._("zoom"));J.viewer.ActionManager.newAction(6,"_slideZoom",J.i18n.GT._("zoom (along right edge of window)"));J.viewer.ActionManager.newAction(7,"_navTranslate",J.i18n.GT._("translate navigation point (requires {0} and {1})",["set NAVIGATIONMODE","set picking NAVIGATE"]));J.viewer.ActionManager.newAction(8,"_swipe",J.i18n.GT._("spin model (swipe and release button and stop motion simultaneously)"));J.viewer.ActionManager.newAction(9,"_spinDrawObjectCW",J.i18n.GT._("click on two points to spin around axis clockwise (requires {0})",
"set picking SPIN"));J.viewer.ActionManager.newAction(10,"_spinDrawObjectCCW",J.i18n.GT._("click on two points to spin around axis counterclockwise (requires {0})","set picking SPIN"));J.viewer.ActionManager.newAction(11,"_slab",J.i18n.GT._("adjust slab (front plane; requires {0})","SLAB ON"));J.viewer.ActionManager.newAction(12,"_depth",J.i18n.GT._("adjust depth (back plane; requires {0})","SLAB ON"));J.viewer.ActionManager.newAction(13,"_slabAndDepth",J.i18n.GT._("move slab/depth window (both planes; requires {0})",
"SLAB ON"));J.viewer.ActionManager.newAction(14,"_popupMenu",J.i18n.GT._("pop up the full context menu"));J.viewer.ActionManager.newAction(15,"_clickFrank",J.i18n.GT._("pop up recent context menu (click on Jmol frank)"));J.viewer.ActionManager.newAction(16,"_select",J.i18n.GT._("select an atom (requires {0})","set pickingStyle EXTENDEDSELECT"));J.viewer.ActionManager.newAction(17,"_selectNone",J.i18n.GT._("select NONE (requires {0})","set pickingStyle EXTENDEDSELECT"));J.viewer.ActionManager.newAction(18,
"_selectToggle",J.i18n.GT._("toggle selection (requires {0})","set pickingStyle DRAG/EXTENDEDSELECT/RASMOL"));J.viewer.ActionManager.newAction(19,"_selectAndNot",J.i18n.GT._("unselect this group of atoms (requires {0})","set pickingStyle DRAG/EXTENDEDSELECT"));J.viewer.ActionManager.newAction(20,"_selectOr",J.i18n.GT._("add this group of atoms to the set of selected atoms (requires {0})","set pickingStyle DRAG/EXTENDEDSELECT"));J.viewer.ActionManager.newAction(21,"_selectToggleOr",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(22,"_dragSelected",J.i18n.GT._("move selected atoms (requires {0})","set DRAGSELECTED"));J.viewer.ActionManager.newAction(23,"_selectAndDrag",J.i18n.GT._("select and drag atoms (requires {0})","set DRAGSELECTED"));J.viewer.ActionManager.newAction(24,"_dragZ",J.i18n.GT._("drag atoms in Z direction (requires {0})","set DRAGSELECTED"));J.viewer.ActionManager.newAction(25,"_rotateSelected",J.i18n.GT._("rotate selected atoms (requires {0})","set DRAGSELECTED"));
J.viewer.ActionManager.newAction(26,"_rotateBranch",J.i18n.GT._("rotate branch around bond (requires {0})","set picking ROTATEBOND"));J.viewer.ActionManager.newAction(27,"_dragAtom",J.i18n.GT._("move atom (requires {0})","set picking DRAGATOM"));J.viewer.ActionManager.newAction(28,"_dragMinimize",J.i18n.GT._("move atom and minimize molecule (requires {0})","set picking DRAGMINIMIZE"));J.viewer.ActionManager.newAction(29,"_dragMinimizeMolecule",J.i18n.GT._("move and minimize molecule (requires {0})",
"set picking DRAGMINIMIZEMOLECULE"));J.viewer.ActionManager.newAction(30,"_dragLabel",J.i18n.GT._("move label (requires {0})","set picking LABEL"));J.viewer.ActionManager.newAction(31,"_dragDrawPoint",J.i18n.GT._("move specific DRAW point (requires {0})","set picking DRAW"));J.viewer.ActionManager.newAction(32,"_dragDrawObject",J.i18n.GT._("move whole DRAW object (requires {0})","set picking DRAW"));J.viewer.ActionManager.newAction(33,"_pickAtom",J.i18n.GT._("pick an atom"));J.viewer.ActionManager.newAction(34,
"_pickPoint",J.i18n.GT._("pick a DRAW point (for measurements) (requires {0}","set DRAWPICKING"));J.viewer.ActionManager.newAction(35,"_pickLabel",J.i18n.GT._("pick a label to toggle it hidden/displayed (requires {0})","set picking LABEL"));J.viewer.ActionManager.newAction(36,"_pickMeasure",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(37,"_setMeasure",J.i18n.GT._("pick an atom to initiate or conclude a measurement"));
J.viewer.ActionManager.newAction(38,"_pickIsosurface",J.i18n.GT._("pick an ISOSURFACE point (requires {0}","set DRAWPICKING"));J.viewer.ActionManager.newAction(39,"_pickNavigate",J.i18n.GT._("pick a point or atom to navigate to (requires {0})","set NAVIGATIONMODE"));J.viewer.ActionManager.newAction(40,"_deleteAtom",J.i18n.GT._("delete atom (requires {0})","set picking DELETE ATOM"));J.viewer.ActionManager.newAction(41,"_deleteBond",J.i18n.GT._("delete bond (requires {0})","set picking DELETE BOND"));
J.viewer.ActionManager.newAction(42,"_pickConnect",J.i18n.GT._("connect atoms (requires {0})","set picking CONNECT"));J.viewer.ActionManager.newAction(43,"_assignNew",J.i18n.GT._("assign/new atom or bond (requires {0})","set picking assignAtom_??/assignBond_?"));J.viewer.ActionManager.newAction(44,"_reset",J.i18n.GT._("reset (when clicked off the model)"));J.viewer.ActionManager.newAction(45,"_stopMotion",J.i18n.GT._("stop motion (requires {0})","set waitForMoveTo FALSE"));J.viewer.ActionManager.newAction(46,
"_multiTouchSimulation",J.i18n.GT._("simulate multi-touch using the mouse)"));Clazz.defineStatics(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,"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".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",5,"SLIDE_ZOOM_X_PERCENT",98,"DEFAULT_MOUSE_DRAG_FACTOR",1,"DEFAULT_MOUSE_WHEEL_FACTOR",1.15,"DEFAULT_GESTURE_SWIPE_FACTOR",1)}),Clazz.declarePackage("J.viewer"),
Clazz.load(["java.util.Hashtable","J.constant.EnumAxesMode","$.EnumCallback","J.util.Matrix3f","$.P3"],"J.viewer.StateManager","java.lang.Boolean $.Float java.util.Arrays J.constant.EnumStructure J.script.SV J.util.BS $.BSUtil $.Escape $.Logger $.SB $.TextFormat J.viewer.JC $.Viewer".split(" "),function(){c$=Clazz.decorateAsClass(function(){this.saved=this.viewer=null;this.lastCoordinates=this.lastShape=this.lastState=this.lastSelected=this.lastConnections=this.lastOrientation="";Clazz.isClassDefined("J.viewer.StateManager.Orientation")||
J.viewer.StateManager.$StateManager$Orientation$();Clazz.isClassDefined("J.viewer.StateManager.Connections")||J.viewer.StateManager.$StateManager$Connections$();Clazz.isClassDefined("J.viewer.StateManager.GlobalSettings")||J.viewer.StateManager.$StateManager$GlobalSettings$();Clazz.instantialize(this,arguments)},J.viewer,"StateManager");Clazz.prepareFields(c$,function(){this.saved=new java.util.Hashtable});c$.getVariableList=$_M(c$,"getVariableList",function(a,b,c,d){var e=new J.util.SB,f=0,g=Array(a.size()),
h;for(a=a.entrySet().iterator();a.hasNext()&&((h=a.next())||1);){var k=h.getKey(),l=h.getValue();if((c||!k.startsWith("site_"))&&(!d||"@"==k.charAt(0)))g[f++]=k+("@"==k.charAt(0)?" "+l.asString():" = "+J.viewer.StateManager.varClip(k,l.escape(),b))}java.util.Arrays.sort(g,0,f);for(b=0;b<f;b++)null!=g[b]&&e.append("  ").append(g[b]).append(";\n");0==f&&!d&&e.append("# --no global user variables defined--;\n");return e.toString()},"java.util.Map,~N,~B,~B");c$.getObjectIdFromName=$_M(c$,"getObjectIdFromName",
function(a){if(null==a)return-1;a="background axis1      axis2      axis3      boundbox   unitcell   frank      ".indexOf(a.toLowerCase());return 0>a?a:Clazz.doubleToInt(a/11)},"~S");c$.getObjectNameFromId=$_M(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");Clazz.makeConstructor(c$,function(a){this.viewer=a},"J.viewer.Viewer");$_M(c$,"getGlobalSettings",function(a,b){return Clazz.innerTypeInstance(J.viewer.StateManager.GlobalSettings,
this,null,a,b)},"J.viewer.StateManager.GlobalSettings,~B");$_M(c$,"clear",function(a){this.viewer.setShowAxes(!1);this.viewer.setShowBbcage(!1);this.viewer.setShowUnitCell(!1);a.clear()},"J.viewer.StateManager.GlobalSettings");$_M(c$,"setCrystallographicDefaults",function(){this.viewer.setAxesModeUnitCell(!0);this.viewer.setShowAxes(!0);this.viewer.setShowUnitCell(!0);this.viewer.setBooleanProperty("perspectiveDepth",!1)});$_M(c$,"setCommonDefaults",($fz=function(){this.viewer.setBooleanProperty("perspectiveDepth",
!0);this.viewer.setFloatProperty("bondTolerance",0.45);this.viewer.setFloatProperty("minBondDistance",0.4)},$fz.isPrivate=!0,$fz));$_M(c$,"setJmolDefaults",function(){this.setCommonDefaults();this.viewer.setStringProperty("defaultColorScheme","Jmol");this.viewer.setBooleanProperty("axesOrientationRasmol",!1);this.viewer.setBooleanProperty("zeroBasedXyzRasmol",!1);this.viewer.setIntProperty("percentVdwAtom",23);this.viewer.setIntProperty("bondRadiusMilliAngstroms",150);this.viewer.setDefaultVdw("auto")});
$_M(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.setDefaultVdw("Rasmol")});$_M(c$,"listSavedStates",function(){for(var a="",b=this.saved.keySet().iterator();b.hasNext();)a+="\n"+b.next();return a});
$_M(c$,"deleteSavedType",($fz=function(a){for(var b=this.saved.keySet().iterator();b.hasNext();){var c=b.next();c.startsWith(a)&&(b.remove(),J.util.Logger.debug("deleted "+c))}},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"deleteSaved",function(a){this.saved.remove(a)},"~S");$_M(c$,"saveSelection",function(a,b){a.equalsIgnoreCase("DELETE")?this.deleteSavedType("Selected_"):(a=this.lastSelected="Selected_"+a,this.saved.put(a,J.util.BSUtil.copy(b)))},"~S,J.util.BS");$_M(c$,"restoreSelection",function(a){a=this.saved.get(0<
a.length?"Selected_"+a:this.lastSelected);if(null==a)return this.viewer.select(new J.util.BS,!1,null,!1),!1;this.viewer.select(a,!1,null,!1);return!0},"~S");$_M(c$,"saveState",function(a){a.equalsIgnoreCase("DELETE")?this.deleteSavedType("State_"):(a=this.lastState="State_"+a,this.saved.put(a,this.viewer.getStateInfo()))},"~S");$_M(c$,"getSavedState",function(a){a=this.saved.get(0<a.length?"State_"+a:this.lastState);return null==a?"":a},"~S");$_M(c$,"saveStructure",function(a){a.equalsIgnoreCase("DELETE")?
this.deleteSavedType("Shape_"):(a=this.lastShape="Shape_"+a,this.saved.put(a,this.viewer.getStructureState()))},"~S");$_M(c$,"getSavedStructure",function(a){a=this.saved.get(0<a.length?"Shape_"+a:this.lastShape);return null==a?"":a},"~S");$_M(c$,"saveCoordinates",function(a,b){a.equalsIgnoreCase("DELETE")?this.deleteSavedType("Coordinates_"):(a=this.lastCoordinates="Coordinates_"+a,this.saved.put(a,this.viewer.getCoordinateState(b)))},"~S,J.util.BS");$_M(c$,"getSavedCoordinates",function(a){a=this.saved.get(0<
a.length?"Coordinates_"+a:this.lastCoordinates);return null==a?"":a},"~S");$_M(c$,"getOrientation",function(){return Clazz.innerTypeInstance(J.viewer.StateManager.Orientation,this,null,!1)});$_M(c$,"getSavedOrientationText",function(a){if(null!=a)return a=this.getOrientationFor(a),null==a?"":a.getMoveToText(!0);a=new J.util.SB;for(var b=this.saved.keySet().iterator();b.hasNext();){var c=b.next();c.startsWith("Orientation_")&&a.append(this.saved.get(c).getMoveToText(!0))}return a.toString()},"~S");
$_M(c$,"saveOrientation",function(a){if(a.equalsIgnoreCase("DELETE"))this.deleteSavedType("Orientation_");else{var b=Clazz.innerTypeInstance(J.viewer.StateManager.Orientation,this,null,a.equals("default"));b.saveName=this.lastOrientation="Orientation_"+a;this.saved.put(b.saveName,b)}},"~S");$_M(c$,"restoreOrientation",function(a,b,c){a=this.getOrientationFor(a);if(null==a)return!1;a.restore(b,c);return!0},"~S,~N,~B");$_M(c$,"getOrientationFor",($fz=function(a){return this.saved.get(0<a.length?"Orientation_"+
a:this.lastOrientation)},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"saveBonds",function(a){if(a.equalsIgnoreCase("DELETE"))this.deleteSavedType("Bonds_");else{var b=Clazz.innerTypeInstance(J.viewer.StateManager.Connections,this,null);b.saveName=this.lastConnections="Bonds_"+a;this.saved.put(b.saveName,b)}},"~S");$_M(c$,"restoreBonds",function(a){a=this.saved.get(0<a.length?"Bonds_"+a:this.lastConnections);if(null==a)return!1;a.restore();return!0},"~S");c$.doReportProperty=$_M(c$,"doReportProperty",function(a){return"_"!=
a.charAt(0)&&0>J.viewer.StateManager.unreportedProperties.indexOf(";"+a+";")},"~S");c$.getJmolVersionInt=$_M(c$,"getJmolVersionInt",function(){var a=J.viewer.JC.version,b=-1;try{var c=a.indexOf(".");if(0>c)return b=1E5*Integer.parseInt(a);b=1E5*Integer.parseInt(a.substring(0,c));a=a.substring(c+1);c=a.indexOf(".");if(0>c)return b+=1E3*Integer.parseInt(a);b+=1E3*Integer.parseInt(a.substring(0,c));a=a.substring(c+1);c=a.indexOf("_");0<=c&&(a=a.substring(0,c));c=a.indexOf(" ");0<=c&&(a=a.substring(0,
c));b+=Integer.parseInt(a)}catch(d){if(!Clazz.exceptionOf(d,NumberFormatException))throw d;}return b});c$.varClip=$_M(c$,"varClip",function(a,b,c){0<c&&b.length>c&&(b=b.substring(0,c)+" #...more ("+b.length+" bytes -- use SHOW "+a+" or MESSAGE @"+a+" to view)");return b},"~S,~S,~N");c$.$StateManager$Orientation$=function(){Clazz.pu$h();c$=Clazz.decorateAsClass(function(){Clazz.prepareCallback(this,arguments);this.rotationMatrix=this.saveName=null;this.rotationRadius=this.zoom=this.yTrans=this.xTrans=
0;this.navCenter=this.center=null;this.navDepth=this.yNav=this.xNav=NaN;this.navigationMode=this.windowCenteredFlag=!1;this.moveToText=null;Clazz.instantialize(this,arguments)},J.viewer.StateManager,"Orientation");Clazz.prepareFields(c$,function(){this.rotationMatrix=new J.util.Matrix3f;this.center=new J.util.P3;this.navCenter=new J.util.P3});Clazz.makeConstructor(c$,function(a){a?(a=this.b$["J.viewer.StateManager"].viewer.getModelSetAuxiliaryInfoValue("defaultOrientationMatrix"),null==a?this.rotationMatrix.setIdentity():
this.rotationMatrix.setM(a)):this.b$["J.viewer.StateManager"].viewer.getRotation(this.rotationMatrix);this.xTrans=this.b$["J.viewer.StateManager"].viewer.getTranslationXPercent();this.yTrans=this.b$["J.viewer.StateManager"].viewer.getTranslationYPercent();this.zoom=this.b$["J.viewer.StateManager"].viewer.getZoomSetting();this.center.setT(this.b$["J.viewer.StateManager"].viewer.getRotationCenter());this.windowCenteredFlag=this.b$["J.viewer.StateManager"].viewer.isWindowCentered();this.rotationRadius=
this.b$["J.viewer.StateManager"].viewer.getFloat(570425388);this.navigationMode=this.b$["J.viewer.StateManager"].viewer.getBoolean(603979886);this.moveToText=this.b$["J.viewer.StateManager"].viewer.getMoveToText(-1);this.navigationMode&&(this.xNav=this.b$["J.viewer.StateManager"].viewer.getNavigationOffsetPercent("X"),this.yNav=this.b$["J.viewer.StateManager"].viewer.getNavigationOffsetPercent("Y"),this.navDepth=this.b$["J.viewer.StateManager"].viewer.getNavigationDepthPercent(),this.navCenter=J.util.P3.newP(this.b$["J.viewer.StateManager"].viewer.getNavigationCenter()))},
"~B");$_M(c$,"getMoveToText",function(a){return a?"  "+this.moveToText+'\n  save orientation "'+this.saveName.substring(12)+'";\n':this.moveToText},"~B");$_M(c$,"restore",function(a,b){b?(this.b$["J.viewer.StateManager"].viewer.setBooleanProperty("windowCentered",this.windowCenteredFlag),this.b$["J.viewer.StateManager"].viewer.setBooleanProperty("navigationMode",this.navigationMode),this.b$["J.viewer.StateManager"].viewer.moveTo(this.b$["J.viewer.StateManager"].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.b$["J.viewer.StateManager"].viewer.setRotationMatrix(this.rotationMatrix)},"~N,~B");c$=Clazz.p0p()};c$.$StateManager$Connections$=function(){Clazz.pu$h();c$=Clazz.decorateAsClass(function(){Clazz.prepareCallback(this,arguments);this.saveName=null;this.bondCount=0;this.connections=null;Clazz.instantialize(this,arguments)},J.viewer.StateManager,"Connections");Clazz.makeConstructor(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,b=this.bondCount;0<=--b;){var c=a[b];this.connections[b]=new J.viewer.StateManager.Connection(c.getAtomIndex1(),c.getAtomIndex2(),c.mad,c.colix,c.order,c.getEnergy(),c.getShapeVisibilityFlags())}}});$_M(c$,"restore",function(){var a=this.b$["J.viewer.StateManager"].viewer.getModelSet();if(null!=a){a.deleteAllBonds();for(var b=this.bondCount;0<=
--b;){var c=this.connections[b],d=a.getAtomCount();c.atomIndex1>=d||c.atomIndex2>=d||(d=a.bondAtoms(a.atoms[c.atomIndex1],a.atoms[c.atomIndex2],c.order,c.mad,null,c.energy,!1,!0),d.setColix(c.colix),d.setShapeVisibilityFlags(c.shapeVisibilityFlags))}for(c=this.bondCount;0<=--c;)a.getBondAt(c).setIndex(c);this.b$["J.viewer.StateManager"].viewer.setShapeProperty(1,"reportAll",null)}});c$=Clazz.p0p()};c$.$StateManager$GlobalSettings$=function(){Clazz.pu$h();c$=Clazz.decorateAsClass(function(){Clazz.prepareCallback(this,
arguments);this.databases=this.htUserVariables=this.htPropertyFlagsRemoved=this.htBooleanParameterFlags=this.htNonbooleanParameterValues=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.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.legacyAutoBonding=this.zeroBasedXyzRasmol=!1;this.perspectiveDepth=!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=this.dynamicMeasurements=!1;this.isosurfacePropertySmoothing=!0;this.isosurfacePropertySmoothingPower=7;this.repaintWaitMs=1E3;this.showHiddenSelectionHalos=!1;this.showMeasurements=this.showKeyStrokes=!0;this.showTiming=!1;this.zoomLarge=!0;
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.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.cameraDepth=3;this.celShading=!1;this.dataSeparator="~~~";this.debugScript=!1;this.defaultDrawArrowScale=
0.5;this.defaultLabelXYZ="%a";this.defaultLabelPDB="%m%r";this.defaultTranslucent=0.5;this.delayMaximumMs=0;this.dipoleScale=1;this.drawPicking=this.drawHover=this.dragSelected=this.disablePopupMenu=!1;this.dsspCalcHydrogen=!0;this.energyUnits="kJ";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.multiProcessor=!0;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.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;Clazz.instantialize(this,arguments)},J.viewer.StateManager,"GlobalSettings");Clazz.prepareFields(c$,function(){this.htUserVariables=new java.util.Hashtable;this.ptDefaultLattice=
new J.util.P3;this.axesMode=J.constant.EnumAxesMode.BOUNDBOX;this.objColors=Clazz.newIntArray(8,0);this.objStateOn=Clazz.newBooleanArray(8,!1);this.objMad=Clazz.newIntArray(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])});Clazz.makeConstructor(c$,function(a,
b){this.registerAllValues(a,b)},"J.viewer.StateManager.GlobalSettings,~B");$_M(c$,"clear",function(){for(var a=this.htUserVariables.keySet().iterator();a.hasNext();){var b=a.next();("@"==b.charAt(0)||b.startsWith("site_"))&&a.remove()}this.setPicked(-1);this.setI("_atomhovered",-1);this.setS("_pickinfo","");this.setB("selectionhalos",!1);this.setB("hidenotselected",!1);this.setB("measurementlabels",this.measurementLabels=!0);this.setB("drawHover",this.drawHover=!1)});$_M(c$,"registerAllValues",function(a,
b){this.htNonbooleanParameterValues=new java.util.Hashtable;this.htBooleanParameterFlags=new java.util.Hashtable;this.htPropertyFlagsRemoved=new java.util.Hashtable;null!=a&&(b||(this.htUserVariables=a.htUserVariables),this.debugScript=a.debugScript,this.disablePopupMenu=a.disablePopupMenu,this.messageStyleChime=a.messageStyleChime,this.defaultDirectory=a.defaultDirectory,this.allowGestures=a.allowGestures,this.allowModelkit=a.allowModelkit,this.allowMultiTouch=a.allowMultiTouch,this.allowKeyStrokes=
a.allowKeyStrokes,this.legacyAutoBonding=a.legacyAutoBonding,this.useScriptQueue=a.useScriptQueue,this.useArcBall=a.useArcBall,this.databases=a.databases);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.smilesUrlFormat=this.databases.get("nci")+"/file?format=sdf&get3d=True";
this.nihResolverFormat=this.databases.get("nci");this.pubChemFormat=this.databases.get("pubchem");for(var c,d=0,e=J.constant.EnumCallback.values();d<e.length&&((c=e[d])||1);d++)this.resetValue(c.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.b$["J.viewer.StateManager"].viewer.isKiosk());this.setS("logFile",this.b$["J.viewer.StateManager"].viewer.getLogFile());
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.b$["J.viewer.StateManager"].viewer.getStatusManager().syncingScripts);this.setB("syncMouse",this.b$["J.viewer.StateManager"].viewer.getStatusManager().syncingMouse);
this.setB("syncStereo",this.b$["J.viewer.StateManager"].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.StateManager.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.cameraDepth);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.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.setB("drawPicking",this.drawPicking);this.setB("dsspCalculateHydrogenAlways",this.dsspCalcHydrogen);this.setB("dynamicMeasurements",this.dynamicMeasurements);this.setS("edsUrlFormat",this.edsUrlFormat);this.setS("edsUrlCutoff",this.edsUrlCutoff);this.setB("ellipsoidArcs",this.ellipsoidArcs);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.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.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.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.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("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.perspectiveDepth);this.setI("percentVdwAtom",this.percentVdwAtom);this.setI("phongExponent",
this.phongExponent);this.setI("pickingSpinRate",this.pickingSpinRate);this.setS("pickLabel",this.pickLabel);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("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("zoomLarge",this.zoomLarge);this.setI("zShadePower",this.zShadePower);this.setI("zSlab",this.zSlab)},"J.viewer.StateManager.GlobalSettings,~B");$_M(c$,"setDefaultLattice",function(a){this.ptDefaultLattice.setT(a)},
"J.util.P3");$_M(c$,"getDefaultLattice",function(){return this.ptDefaultLattice});$_M(c$,"setUnits",function(a){var b=this.measureDistanceUnits,c=this.energyUnits;a.equalsIgnoreCase("angstroms")?this.measureDistanceUnits="angstroms":a.equalsIgnoreCase("nanometers")||a.equalsIgnoreCase("nm")?this.measureDistanceUnits="nanometers":a.equalsIgnoreCase("picometers")||a.equalsIgnoreCase("pm")?this.measureDistanceUnits="picometers":a.equalsIgnoreCase("bohr")||a.equalsIgnoreCase("au")?this.measureDistanceUnits=
"au":a.equalsIgnoreCase("vanderwaals")||a.equalsIgnoreCase("vdw")?this.measureDistanceUnits="vdw":a.equalsIgnoreCase("kj")?this.energyUnits="kJ":a.equalsIgnoreCase("kcal")&&(this.energyUnits="kcal");b.equalsIgnoreCase(this.measureDistanceUnits)?c.equalsIgnoreCase(this.energyUnits)||this.setS("energyUnits",this.energyUnits):this.setS("measurementUnits",this.measureDistanceUnits)},"~S");$_M(c$,"isJmolVariable",function(a){return"_"==a.charAt(0)||this.htNonbooleanParameterValues.containsKey(a=a.toLowerCase())||
this.htBooleanParameterFlags.containsKey(a)||0<=J.viewer.StateManager.unreportedProperties.indexOf(";"+a+";")},"~S");$_M(c$,"resetValue",($fz=function(a,b){this.setS(a,null==b?"":b.getParameter(a))},$fz.isPrivate=!0,$fz),"~S,J.viewer.StateManager.GlobalSettings");$_M(c$,"setB",function(a,b){a=a.toLowerCase();this.htNonbooleanParameterValues.containsKey(a)||this.htBooleanParameterFlags.put(a,b?Boolean.TRUE:Boolean.FALSE)},"~S,~B");$_M(c$,"setI",function(a,b){a=a.toLowerCase();this.htBooleanParameterFlags.containsKey(a)||
this.htNonbooleanParameterValues.put(a,Integer.$valueOf(b))},"~S,~N");$_M(c$,"setF",function(a,b){Float.isNaN(b)||(a=a.toLowerCase(),this.htBooleanParameterFlags.containsKey(a)||this.htNonbooleanParameterValues.put(a,Float.$valueOf(b)))},"~S,~N");$_M(c$,"setS",function(a,b){a=a.toLowerCase();null==b||this.htBooleanParameterFlags.containsKey(a)||this.htNonbooleanParameterValues.put(a,b)},"~S,~S");$_M(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");$_M(c$,"setUserVariable",function(a,b){if(null==b)return null;a=a.toLowerCase();this.htUserVariables.put(a,b.setName(a).setGlobal());return b},"~S,J.script.SV");$_M(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");$_M(c$,"removeUserVariable",function(a){this.htUserVariables.remove(a)},"~S");$_M(c$,"getUserVariable",function(a){if(null==a)return null;a=a.toLowerCase();return this.htUserVariables.get(a)},"~S");$_M(c$,"getParameterEscaped",function(a,b){a=a.toLowerCase();if(this.htNonbooleanParameterValues.containsKey(a)){var c=this.htNonbooleanParameterValues.get(a);return J.viewer.StateManager.varClip(a,
J.util.Escape.e(c),b)}return this.htBooleanParameterFlags.containsKey(a)?this.htBooleanParameterFlags.get(a).toString():this.htUserVariables.containsKey(a)?this.htUserVariables.get(a).escape():this.htPropertyFlagsRemoved.containsKey(a)?"false":"<not defined>"},"~S,~N");$_M(c$,"getParameter",function(a){a=this.getParam(a,!1);return null==a?"":a},"~S");$_M(c$,"getOrSetNewVariable",function(a,b){if(null==a||0==a.length)a="x";var c=this.getParam(a,!0);return null==c&&b&&"_"!=a.charAt(0)?this.setUserVariable(a,
J.script.SV.newVariable(4,"")):J.script.SV.getVariable(c)},"~S,~B");$_M(c$,"getParam",function(a,b){a=a.toLowerCase();if(a.equals("_memory")){var c=0,c=J.util.TextFormat.formatDecimal(c-0,1)+"/"+J.util.TextFormat.formatDecimal(c,1);this.htNonbooleanParameterValues.put("_memory",c)}return this.htNonbooleanParameterValues.containsKey(a)?this.htNonbooleanParameterValues.get(a):this.htBooleanParameterFlags.containsKey(a)?this.htBooleanParameterFlags.get(a):this.htPropertyFlagsRemoved.containsKey(a)?Boolean.FALSE:
this.htUserVariables.containsKey(a)?(c=this.htUserVariables.get(a),b?c:J.script.SV.oValue(c)):null},"~S,~B");$_M(c$,"getVariableList",function(){return J.viewer.StateManager.getVariableList(this.htUserVariables,0,!0,!1)});$_M(c$,"setStructureList",function(a,b){this.haveSetStructureList=!0;this.structureList.put(b,a)},"~A,J.constant.EnumStructure");$_M(c$,"getStructureList",function(){return this.structureList});$_M(c$,"setPicked",function(a){var b=null;0<=a&&(this.setI("_atompicked",a),b=this.getParam("picked",
!0));if(null==b||10!=b.tok)b=J.script.SV.newVariable(10,new J.util.BS),this.setUserVariable("picked",b);0<=a&&J.script.SV.getBitSet(b,!1).set(a)},"~N");$_M(c$,"resolveDataBase",function(a,b){var c=this.databases.get(a.toLowerCase());if(null==c)return null;0>b.indexOf("/")&&(a.equals("pubchem")?b="name/"+b:a.equals("nci")&&(b+="/file?format=sdf&get3d=True"));return 0>c.indexOf("%FILE")?c+b:J.util.TextFormat.formatStringS(c,"FILE",b)},"~S,~S");$_M(c$,"getDataBaseList",($fz=function(a){if(null!=a)for(var b=
0;b<a.length;b+=2)this.databases.put(a[b].toLowerCase(),a[b+1])},$fz.isPrivate=!0,$fz),"~A");c$=Clazz.p0p()};Clazz.pu$h();c$=Clazz.decorateAsClass(function(){this.shapeVisibilityFlags=this.energy=this.order=this.colix=this.mad=this.atomIndex2=this.atomIndex1=0;Clazz.instantialize(this,arguments)},J.viewer.StateManager,"Connection");Clazz.makeConstructor(c$,function(a,b,c,d,e,f,g){this.atomIndex1=a;this.atomIndex2=b;this.mad=c;this.colix=d;this.order=e;this.energy=f;this.shapeVisibilityFlags=g},"~N,~N,~N,~N,~N,~N,~N");
c$=Clazz.p0p();Clazz.defineStatics(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      ");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;_filecaching;_filecache;fontcaching;fontscaling;forcefield;language;legacyautobonding;loglevel;logfile;loggestures;logcommands;measurestylechime;loadformat;loadligandformat;smilesurlformat;pubchemformat;nihresolverformat;edsurlformat;edsurlcutoff;multiprocessor;navigationmode;;pathforallfiles;perspectivedepth;phongexponent;perspectivemodel;preservestate;refreshing;repaintwaitms;rotationradius;showaxes;showaxis1;showaxis2;showaxis3;showboundbox;showfrank;showtiming;showunitcell;slabenabled;slab;slabrange;depth;zshade;zshadepower;specular;specularexponent;specularpercent;celshading;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()}),Clazz.declarePackage("J.modelset"),Clazz.load(["J.modelset.Measurement"],"J.modelset.MeasurementPending",null,function(){c$=Clazz.decorateAsClass(function(){this.$haveModified=this.$haveTarget=!1;this.numSet=0;this.lastIndex=-1;Clazz.instantialize(this,arguments)},J.modelset,"MeasurementPending",J.modelset.Measurement);$_M(c$,"haveTarget",function(){return this.$haveTarget});
$_M(c$,"haveModified",function(){return this.$haveModified});$_M(c$,"getNumSet",function(){return this.numSet});c$.getMP=$_M(c$,"getMP",function(a){return(new J.modelset.MeasurementPending).setM(a,null,NaN,0,null,0)},"J.modelset.ModelSet");$_M(c$,"checkPoint",($fz=function(a){for(var b=1;b<=this.numSet;b++)if(this.countPlusIndices[b]==-1-b&&0.01>this.pts[b-1].distance(a))return!1;return!0},$fz.isPrivate=!0,$fz),"J.util.Point3fi");$_M(c$,"getIndexOf",function(a){for(var b=1;b<=this.numSet;b++)if(this.countPlusIndices[b]==
a)return b;return 0},"~N");$_M(c$,"setCount",function(a){Clazz.superCall(this,J.modelset.MeasurementPending,"setCount",[a]);this.numSet=a},"~N");$_M(c$,"addPoint",function(a,b,c){this.$haveModified=a!=this.lastIndex;this.lastIndex=a;if(null==b){if(0<this.getIndexOf(a))return c&&(this.numSet=this.count),this.count;this.$haveTarget=0<=a;if(!this.$haveTarget)return this.count=this.numSet;this.count=this.numSet+1;this.countPlusIndices[this.count]=a}else{if(!this.checkPoint(b))return c&&(this.numSet=this.count),
this.count;a=this.numSet;this.$haveModified=this.$haveTarget=!0;this.count=this.numSet+1;this.pts[a]=b;this.countPlusIndices[this.count]=-2-a}this.countPlusIndices[0]=this.count;c&&(this.numSet=this.count);this.value=this.getMeasurement();this.formatMeasurement(null);return this.count},"~N,J.util.Point3fi,~B")}),Clazz.declarePackage("J.thread"),Clazz.load(["J.thread.JmolThread"],"J.thread.HoverWatcherThread",["java.lang.Thread"],function(){c$=Clazz.decorateAsClass(function(){this.moved=this.current=
this.actionManager=null;this.hoverDelay=0;Clazz.instantialize(this,arguments)},J.thread,"HoverWatcherThread",J.thread.JmolThread);Clazz.makeConstructor(c$,function(a,b,c,d){Clazz.superConstructor(this,J.thread.HoverWatcherThread);this.setViewer(d,"HoverWatcher");this.actionManager=a;this.current=b;this.moved=c;this.start()},"J.viewer.ActionManager,J.viewer.MouseState,J.viewer.MouseState,J.viewer.Viewer");Clazz.overrideMethod(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")}),Clazz.declarePackage("J.viewer.binding"),Clazz.load(["java.util.Hashtable"],"J.viewer.binding.Binding","java.lang.Boolean java.util.Arrays J.api.Interface J.util.Escape $.JmolList $.Logger $.SB".split(" "),
function(){c$=Clazz.decorateAsClass(function(){this.bindings=this.name=null;Clazz.instantialize(this,arguments)},J.viewer.binding,"Binding");Clazz.prepareFields(c$,function(){this.bindings=new java.util.Hashtable});$_M(c$,"getBindings",function(){return this.bindings});Clazz.makeConstructor(c$,function(a){this.name=a},"~S");$_M(c$,"getName",function(){return this.name});$_M(c$,"bindAction",function(a,b){this.addBinding(a+"\t"+b,[a,b])},"~N,~N");$_M(c$,"bindName",function(a,b){this.addBinding(a+"\t",
Boolean.TRUE);this.addBinding(a+"\t"+b,[J.viewer.binding.Binding.getMouseActionName(a,!1),b])},"~N,~S");$_M(c$,"unbindAction",function(a,b){0==a?this.unbindJmolAction(b):this.removeBinding(null,a+"\t"+b)},"~N,~N");$_M(c$,"unbindName",function(a,b){null==b?this.unbindMouseAction(a):this.removeBinding(null,a+"\t"+b)},"~N,~S");$_M(c$,"unbindJmolAction",function(a){var b=this.bindings.keySet().iterator();for(a="\t"+a;b.hasNext();){var c=b.next();c.endsWith(a)&&this.removeBinding(b,c)}},"~N");$_M(c$,"addBinding",
($fz=function(a,b){J.util.Logger.debugging&&J.util.Logger.debug("adding binding "+a+"\t==\t"+J.util.Escape.e(b));this.bindings.put(a,b)},$fz.isPrivate=!0,$fz),"~S,~O");$_M(c$,"removeBinding",($fz=function(a,b){J.util.Logger.debugging&&J.util.Logger.debug("removing binding "+b);null==a?this.bindings.remove(b):a.remove()},$fz.isPrivate=!0,$fz),"java.util.Iterator,~S");$_M(c$,"unbindUserAction",function(a){var b=this.bindings.keySet().iterator();for(a="\t"+a;b.hasNext();){var c=b.next();c.endsWith(a)&&
this.removeBinding(b,c)}},"~S");$_M(c$,"unbindMouseAction",function(a){var b=this.bindings.keySet().iterator();for(a+="\t";b.hasNext();){var c=b.next();c.startsWith(a)&&this.removeBinding(b,c)}},"~N");$_M(c$,"isBound",function(a,b){return this.bindings.containsKey(a+"\t"+b)},"~N,~N");$_M(c$,"isUserAction",function(a){return this.bindings.containsKey(a+"\t")},"~N");c$.getMouseAction=$_M(c$,"getMouseAction",function(a,b){2<a&&(a=2);return b&63|(-2147483648==a?1024:a<<8)},"~N,~N");c$.getMouseActionStr=
$_M(c$,"getMouseActionStr",function(a){if(null==a)return 0;var b=0;a=a.toUpperCase();0<=a.indexOf("MIDDLE")?b|=8:0<=a.indexOf("RIGHT")?b|=4:0<=a.indexOf("WHEEL")?b|=32:0<=a.indexOf("LEFT")&&(b|=16);var c=0==b;0<=a.indexOf("DOUBLE")?b|=512:0<b&&0==(b&32)||0<=a.indexOf("SINGLE")?b|=256:0<=a.indexOf("DOWN")&&(b|=1024);0<=a.indexOf("CTRL")&&(b|=2);0<=a.indexOf("ALT")&&(b|=8);0<=a.indexOf("SHIFT")&&(b|=1);c&&0!=b&&(b|=16);return b},"~S");c$.getModifiers=$_M(c$,"getModifiers",function(a){return a&63},"~N");
c$.getClickCount=$_M(c$,"getClickCount",function(a){return a>>8},"~N");$_M(c$,"getBindingInfo",function(a,b){for(var c=new J.util.SB,d=null==b||b.equalsIgnoreCase("all")?null:b.toLowerCase(),e=Array(a.length),f=0;f<a.length;f++)e[f]=null==d||0<=a[f].toLowerCase().indexOf(d)?new J.util.JmolList:null;for(d=this.bindings.keySet().iterator();d.hasNext();)if(f=this.bindings.get(d.next()),J.util.Escape.isAI(f)){var g=f,f=g[1];null!=e[f]&&e[f].addLast(J.viewer.binding.Binding.getMouseActionName(g[0],!0))}for(f=
0;f<a.length;f++){var h;if(!(null==e[f]||0==(h=e[f].size()))){d=e[f].toArray(Array(h));java.util.Arrays.sort(d);c.append(a[f]).append("\t");for(var g="",k=0;k<h;k++)c.append(g),c.append(d[k].substring(7)),g=", ";c.appendC("\n")}}return c.toString()},"~A,~S");c$.includes=$_M(c$,"includes",($fz=function(a,b){return(a&b)==b},$fz.isPrivate=!0,$fz),"~N,~N");c$.getMouseActionName=$_M(c$,"getMouseActionName",function(a,b){var c=new J.util.SB;if(0==a)return"";var d=J.viewer.binding.Binding.includes(a,8)&&
!J.viewer.binding.Binding.includes(a,16)&&!J.viewer.binding.Binding.includes(a,4),e="      ".toCharArray();J.viewer.binding.Binding.includes(a,2)&&(c.append("CTRL+"),e[4]="C");!d&&J.viewer.binding.Binding.includes(a,8)&&(c.append("ALT+"),e[3]="A");J.viewer.binding.Binding.includes(a,1)&&(c.append("SHIFT+"),e[2]="S");J.viewer.binding.Binding.includes(a,16)?(e[1]="L",c.append("LEFT")):J.viewer.binding.Binding.includes(a,4)?(e[1]="R",c.append("RIGHT")):d?(e[1]="W",c.append("MIDDLE")):J.viewer.binding.Binding.includes(a,
32)&&(e[1]="W",c.append("WHEEL"));J.viewer.binding.Binding.includes(a,512)?(c.append("+double-click"),e[0]="2"):J.viewer.binding.Binding.includes(a,1024)&&(c.append("+down"),e[0]="4");return b?String.instantialize(e)+":"+c.toString():c.toString()},"~N,~B");c$.newBinding=$_M(c$,"newBinding",function(a){return J.api.Interface.getOptionInterface("viewer.binding."+a+"Binding")},"~S");Clazz.defineStatics(c$,"WHEEL",32,"LEFT",16,"MIDDLE",8,"RIGHT",4,"ALT",8,"CTRL",2,"SHIFT",1,"CTRL_ALT",10,"CTRL_SHIFT",
3,"LEFT_MIDDLE_RIGHT",28,"MAC_COMMAND",20,"DOUBLE_CLICK",512,"SINGLE_CLICK",256,"DOWN",1024,"MOVED",0,"DRAGGED",1,"CLICKED",2,"WHEELED",3,"PRESSED",4,"RELEASED",5,"DRAGGED2",6,"BUTTON_MODIFIER_MASK",63)}),Clazz.declarePackage("J.viewer.binding"),Clazz.load(["J.viewer.binding.JmolBinding"],"J.viewer.binding.DragBinding",null,function(){c$=Clazz.declareType(J.viewer.binding,"DragBinding",J.viewer.binding.JmolBinding);Clazz.makeConstructor(c$,function(){Clazz.superConstructor(this,J.viewer.binding.DragBinding,
["drag"])});Clazz.overrideMethod(c$,"setSelectBindings",function(){this.bindAction(272,16);this.bindAction(273,18);this.bindAction(280,20);this.bindAction(281,19);this.bindAction(1040,23);this.bindAction(272,22);this.bindAction(272,33)})}),Clazz.declarePackage("J.viewer.binding"),Clazz.load(["J.viewer.binding.Binding"],"J.viewer.binding.JmolBinding",null,function(){c$=Clazz.declareType(J.viewer.binding,"JmolBinding",J.viewer.binding.Binding);Clazz.makeConstructor(c$,function(a){Clazz.superConstructor(this,
J.viewer.binding.JmolBinding,[a]);this.setGeneralBindings();this.setSelectBindings()},"~S");$_M(c$,"setSelectBindings",function(){this.bindAction(528,16);this.bindAction(272,21)});$_M(c$,"setGeneralBindings",($fz=function(){this.bindAction(528,0);this.bindAction(282,1);this.bindAction(262,1);this.bindAction(529,1);this.bindAction(520,1);this.bindAction(272,2);this.bindAction(280,3);this.bindAction(261,3);this.bindAction(273,4);this.bindAction(264,4);this.bindAction(32,5);this.bindAction(272,6);this.bindAction(272,
7);this.bindAction(274,14);this.bindAction(260,14);this.bindAction(272,15);this.bindAction(275,11);this.bindAction(531,12);this.bindAction(283,13);this.bindAction(272,8);this.bindAction(272,10);this.bindAction(273,9);this.bindAction(281,22);this.bindAction(273,24);this.bindAction(280,25);this.bindAction(273,26);this.bindAction(273,30);this.bindAction(280,31);this.bindAction(273,32);this.bindAction(529,44);this.bindAction(520,44);this.bindAction(528,45);this.bindAction(272,27);this.bindAction(272,
28);this.bindAction(272,29);this.bindAction(272,33);this.bindAction(272,34);this.bindAction(272,35);this.bindAction(272,36);this.bindAction(528,37);this.bindAction(272,38);this.bindAction(275,39);this.bindAction(272,40);this.bindAction(272,41);this.bindAction(272,42);this.bindAction(272,43)},$fz.isPrivate=!0,$fz))}),Clazz.declarePackage("J.thread"),Clazz.load(["J.thread.JmolThread"],"J.thread.TimeoutThread",["java.lang.Thread","J.util.SB"],function(){c$=Clazz.decorateAsClass(function(){this.script=
null;this.status=0;this.triggered=!0;this.timeouts=null;Clazz.instantialize(this,arguments)},J.thread,"TimeoutThread",J.thread.JmolThread);Clazz.makeConstructor(c$,function(a,b,c,d){Clazz.superConstructor(this,J.thread.TimeoutThread);this.setViewer(a,b);this.$name=b;this.set(c,d)},"J.viewer.Viewer,~S,~N,~S");$_M(c$,"set",($fz=function(a,b){this.sleepTime=a;null!=b&&(this.script=b)},$fz.isPrivate=!0,$fz),"~N,~S");Clazz.overrideMethod(c$,"toString",function(){return"timeout name="+this.$name+" executions="+
this.status+" mSec="+this.sleepTime+" secRemaining="+(this.targetTime-System.currentTimeMillis())/1E3+" script="+this.script});Clazz.overrideMethod(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);a||this.timeouts.remove(this.$name);this.triggered&&(this.triggered=!1,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=$_M(c$,"clear",function(a){for(var b=
a.values().iterator();b.hasNext();){var c=b.next();c.script.equals("exitJmol")||c.interrupt()}a.clear()},"java.util.Map");c$.setTimeout=$_M(c$,"setTimeout",function(a,b,c,d,e){var f=b.get(c);0==d?null!=f&&(f.interrupt(),b.remove(c)):null!=f?f.set(d,e):(f=new J.thread.TimeoutThread(a,c,d,e),b.put(c,f),f.start())},"J.viewer.Viewer,java.util.Map,~S,~N,~S");c$.trigger=$_M(c$,"trigger",function(a,b){var c=a.get(b);null!=c&&(c.triggered=0>c.sleepTime)},"java.util.Map,~S");c$.showTimeout=$_M(c$,"showTimeout",
function(a,b){var c=new J.util.SB;if(null!=a)for(var d=a.values().iterator();d.hasNext();){var e=d.next();(null==b||e.$name.equalsIgnoreCase(b))&&c.append(e.toString()).append("\n")}return 0<c.length()?c.toString():"<no timeouts set>"},"java.util.Map,~S")}),Clazz.declarePackage("J.util"),Clazz.load(null,"J.util.TempArray",["J.util.P3","$.P3i"],function(){c$=Clazz.decorateAsClass(function(){this.freeEnum=this.lengthsFreeEnum=this.freeScreens=this.lengthsFreeScreens=this.freePoints=this.lengthsFreePoints=
null;Clazz.instantialize(this,arguments)},J.util,"TempArray");Clazz.prepareFields(c$,function(){this.lengthsFreePoints=Clazz.newIntArray(6,0);this.freePoints=Array(6);this.lengthsFreeScreens=Clazz.newIntArray(6,0);this.freeScreens=Array(6);this.lengthsFreeEnum=Clazz.newIntArray(2,0);this.freeEnum=Array(2)});Clazz.makeConstructor(c$,function(){});$_M(c$,"clear",function(){this.clearTempPoints();this.clearTempScreens()});c$.findBestFit=$_M(c$,"findBestFit",($fz=function(a,b){for(var c=-1,d=2147483647,
e=b.length;0<=--e;){var f=b[e];f>=a&&f<d&&(d=f,c=e)}0<=c&&(b[c]=0);return c},$fz.isPrivate=!0,$fz),"~N,~A");c$.findShorter=$_M(c$,"findShorter",($fz=function(a,b){for(var c=b.length;0<=--c;)if(0==b[c])return b[c]=a,c;for(var d=0,e=b[0],c=b.length;0<--c;)b[c]<e&&(e=b[c],d=c);return e<a?(b[d]=a,d):-1},$fz.isPrivate=!0,$fz),"~N,~A");$_M(c$,"clearTempPoints",($fz=function(){for(var a=0;6>a;a++)this.lengthsFreePoints[a]=0,this.freePoints[a]=null},$fz.isPrivate=!0,$fz));$_M(c$,"allocTempPoints",function(a){var b;
b=J.util.TempArray.findBestFit(a,this.lengthsFreePoints);if(0<b)b=this.freePoints[b];else for(b=Array(a);0<=--a;)b[a]=new J.util.P3;return b},"~N");$_M(c$,"freeTempPoints",function(a){for(var b=0;b<this.freePoints.length;b++)if(this.freePoints[b]===a){this.lengthsFreePoints[b]=a.length;return}b=J.util.TempArray.findShorter(a.length,this.lengthsFreePoints);0<=b&&(this.freePoints[b]=a)},"~A");$_M(c$,"clearTempScreens",($fz=function(){for(var a=0;6>a;a++)this.lengthsFreeScreens[a]=0,this.freeScreens[a]=
null},$fz.isPrivate=!0,$fz));$_M(c$,"allocTempScreens",function(a){var b;b=J.util.TempArray.findBestFit(a,this.lengthsFreeScreens);if(0<b)b=this.freeScreens[b];else for(b=Array(a);0<=--a;)b[a]=new J.util.P3i;return b},"~N");$_M(c$,"freeTempScreens",function(a){for(var b=0;b<this.freeScreens.length;b++)if(this.freeScreens[b]===a){this.lengthsFreeScreens[b]=a.length;return}b=J.util.TempArray.findShorter(a.length,this.lengthsFreeScreens);0<=b&&(this.freeScreens[b]=a)},"~A");$_M(c$,"allocTempEnum",function(a){var b=
J.util.TempArray.findBestFit(a,this.lengthsFreeEnum);return 0<b?this.freeEnum[b]:Array(a)},"~N");$_M(c$,"freeTempEnum",function(a){for(var b=0;b<this.freeEnum.length;b++)if(this.freeEnum[b]===a){this.lengthsFreeEnum[b]=a.length;return}b=J.util.TempArray.findShorter(a.length,this.lengthsFreeEnum);0<=b&&(this.freeEnum[b]=a)},"~A");Clazz.defineStatics(c$,"freePointsSize",6,"freeScreensSize",6,"freeEnumSize",2)}),Clazz.declarePackage("J.viewer"),Clazz.load(["J.constant.EnumAnimationMode","J.util.BS"],
"J.viewer.AnimationManager",["J.thread.AnimationThread","J.util.BSUtil"],function(){c$=Clazz.decorateAsClass(function(){this.animationReplayMode=this.viewer=null;this.inMotion=this.animationPaused=this.animationOn=!1;this.animationFps=0;this.currentDirection=this.animationDirection=1;this.lastFramePainted=this.lastFrameDelayMs=this.firstFrameDelayMs=this.morphCount=this.currentMorphFrame=this.frameStep=this.lastFrameIndex=this.firstFrameIndex=this.currentFrameIndex=this.currentModelIndex=0;this.animationThread=
null;this.backgroundModelIndex=-1;this.bsDisplay=this.bsVisibleFrames=null;this.intAnimThread=this.firstFrameDelay=0;this.lastFrameDelay=1;this.movie=null;Clazz.instantialize(this,arguments)},J.viewer,"AnimationManager");Clazz.prepareFields(c$,function(){this.animationReplayMode=J.constant.EnumAnimationMode.ONCE;this.bsVisibleFrames=new J.util.BS});Clazz.makeConstructor(c$,function(a){this.viewer=a},"J.viewer.Viewer");$_M(c$,"clear",function(){this.setMovie(null);this.initializePointers(0);this.setAnimationOn(!1);
this.setCurrentModelIndex(0,!0);this.currentDirection=1;this.setAnimationDirection(1);this.setAnimationFps(10);this.setAnimationReplayMode(J.constant.EnumAnimationMode.ONCE,0,0);this.initializePointers(0)});$_M(c$,"setFrame",($fz=function(a){this.setCurrentFrame(a,!0)},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"setCurrentFrame",($fz=function(a){if(null==this.movie)this.setCurrentModelIndex(a,!0);else if(-1==a&&(a=this.movie.get("currentFrame").intValue()),this.currentFrameIndex=a,a=this.getMovieState(a),
!(0>a)){this.setModelIndex(a,!0);var b=this.movie.get("states");null==b||(0>a||a>=b.size())||(a=b.get(a),null!=this.bsDisplay&&(a=J.util.BSUtil.copy(a),a.and(this.bsDisplay)),this.viewer.displayAtoms(a,!0,!1,null,!0))}},$fz.isPrivate=!0,$fz),"~N,~B");$_M(c$,"getMovieState",($fz=function(a){var b=this.movie.get("frames");return null==b||a>=b.size()?-1:b.get(a).intValue()},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"morph",function(a){System.out.println("morph "+a);var b=Clazz.floatToInt(a);0.001>Math.abs(b-
a)?a=b:0.999<Math.abs(b-a)&&(a=b+=1);a-=b;b-=1;if(0==a)this.currentMorphFrame=b,this.setFrame(b);else{var c;null==this.movie?(this.setCurrentModelIndex(b,!0),c=b+1,this.currentMorphFrame=b+a):(this.setCurrentFrame(b,!1),this.currentMorphFrame=b+a,b=this.getMovieState(b),c=this.getMovieState(this.getFrameStep(this.animationDirection)+this.getCurrentFrame()));c==b||(0>c||0>b)||this.viewer.modelSet.morphTrajectories(b,c,a)}},"~N");$_M(c$,"setCurrentModelIndex",function(a,b){null!=this.movie?this.setFrame(a):
(this.currentFrameIndex=0,this.setModelIndex(a,b))},"~N,~B");$_M(c$,"setModelIndex",($fz=function(a,b){0>a&&this.stopThread(!1);var c=this.currentModelIndex,d=this.viewer.getModelSet(),e=null==d?0:d.modelCount;if(1==e)this.currentModelIndex=a=0;else if(0>a||a>=e)a=-1;var d=null,f=!1;if(this.currentModelIndex!=a){if(0<e){var e=this.isJmolDataFrameForModel(a),g=this.isJmolDataFrameForModel(this.currentModelIndex);g&&this.viewer.setJmolDataFrame(null,-1,this.currentModelIndex);-1!=this.currentModelIndex&&
this.viewer.saveModelOrientation();if(g||e)d=this.viewer.getJmolFrameType(a)+" "+a+" <--  "+this.currentModelIndex+" "+this.viewer.getJmolFrameType(this.currentModelIndex),f=this.viewer.getJmolDataSourceFrame(a)==this.viewer.getJmolDataSourceFrame(this.currentModelIndex)}this.currentModelIndex=a;null!=d&&(0<=a&&this.viewer.restoreModelOrientation(a),f&&(0<=d.indexOf("quaternion")&&0>d.indexOf("plot")&&0>d.indexOf("ramachandran")&&0>d.indexOf(" property "))&&this.viewer.restoreModelRotation(c))}this.setViewer(b)},
$fz.isPrivate=!0,$fz),"~N,~B");$_M(c$,"setViewer",($fz=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);null!=this.viewer.modelSet&&!this.viewer.global.selectAllModels&&this.viewer.setSelectionSubset(this.viewer.getModelUndeletedAtomsBitSet(this.currentModelIndex))},$fz.isPrivate=
!0,$fz),"~B");$_M(c$,"isJmolDataFrameForModel",($fz=function(a){return null==this.movie&&this.viewer.isJmolDataFrameForModel(a)},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"setBackgroundModelIndex",function(a){var b=this.viewer.getModelSet();if(null==b||0>a||a>=b.modelCount)a=-1;this.backgroundModelIndex=a;0<=a&&this.viewer.setTrajectory(a);this.viewer.setTainted(!0);this.setFrameRangeVisible()},"~N");$_M(c$,"setFrameRangeVisible",($fz=function(){this.bsVisibleFrames.clearAll();if(null!=this.movie)this.bsVisibleFrames.setBits(0,
this.viewer.getModelCount());else if(0<=this.backgroundModelIndex&&this.bsVisibleFrames.set(this.backgroundModelIndex),0<=this.currentModelIndex)this.bsVisibleFrames.set(this.currentModelIndex);else if(0!=this.frameStep){for(var a=0,b=0,c=this.firstFrameIndex;c!=this.lastFrameIndex;c+=this.frameStep)this.isJmolDataFrameForModel(c)||(this.bsVisibleFrames.set(c),a++,b=c);if(this.firstFrameIndex==this.lastFrameIndex||!this.isJmolDataFrameForModel(this.lastFrameIndex)||0==a)this.bsVisibleFrames.set(this.lastFrameIndex),
0==a&&(this.firstFrameIndex=this.lastFrameIndex),a=0;1==a&&0>this.currentModelIndex&&this.setFrame(b)}},$fz.isPrivate=!0,$fz));$_M(c$,"initializePointers",function(a){this.firstFrameIndex=0;this.lastFrameIndex=(0==a?0:this.getFrameCount())-1;this.frameStep=a;this.viewer.setFrameVariables()},"~N");$_M(c$,"getFrameCount",function(){return null==this.movie?this.viewer.getModelCount():this.movie.get("frameCount").intValue()});$_M(c$,"setAnimationDirection",function(a){this.animationDirection=a},"~N");
$_M(c$,"setAnimationFps",function(a){this.animationFps=a},"~N");$_M(c$,"setAnimationReplayMode",function(a,b,c){this.firstFrameDelay=0<b?b:0;this.firstFrameDelayMs=Clazz.floatToInt(1E3*this.firstFrameDelay);this.lastFrameDelay=0<c?c:0;this.lastFrameDelayMs=Clazz.floatToInt(1E3*this.lastFrameDelay);this.animationReplayMode=a;this.viewer.setFrameVariables()},"J.constant.EnumAnimationMode,~N,~N");$_M(c$,"setAnimationRange",function(a,b){var c=this.getFrameCount();0>a&&(a=0);0>b&&(b=c);a>=c&&(a=c-1);
b>=c&&(b=c-1);this.firstFrameIndex=a;this.lastFrameIndex=b;this.frameStep=b<a?-1:1;this.rewindAnimation()},"~N,~N");$_M(c$,"animation",($fz=function(a){this.animationOn=a;this.viewer.setBooleanProperty("_animating",a)},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"setAnimationOn",function(a){!a||!this.viewer.haveModelSet()||this.viewer.isHeadless()?this.stopThread(!1):(this.viewer.getSpinOn()||this.viewer.refresh(3,"Viewer:setAnimationOn"),this.setAnimationRange(-1,-1),this.resumeAnimation())},"~B");$_M(c$,
"stopThread",function(a){null!=this.animationThread&&(this.animationThread.interrupt(),this.animationThread=null);this.animationPaused=a;this.viewer.getSpinOn()||this.viewer.refresh(3,"Viewer:setAnimationOff");this.animation(!1);this.viewer.setStatusFrameChanged(!1)},"~B");$_M(c$,"pauseAnimation",function(){this.stopThread(!0)});$_M(c$,"reverseAnimation",function(){this.currentDirection=-this.currentDirection;this.animationOn||this.resumeAnimation()});$_M(c$,"repaintDone",function(){this.lastFramePainted=
this.getCurrentFrame()});$_M(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=new J.thread.AnimationThread(this,this.viewer,this.firstFrameIndex,this.lastFrameIndex,this.intAnimThread),this.animationThread.start()))});$_M(c$,"setAnimationNext",function(){return this.setAnimationRelative(this.animationDirection)});
$_M(c$,"setAnimationLast",function(){this.setFrame(0<this.animationDirection?this.lastFrameIndex:this.firstFrameIndex)});$_M(c$,"rewindAnimation",function(){this.setFrame(0<this.animationDirection?this.firstFrameIndex:this.lastFrameIndex);this.currentDirection=1;this.viewer.setFrameVariables()});$_M(c$,"setAnimationPrevious",function(){return this.setAnimationRelative(-this.animationDirection)});$_M(c$,"setAnimationRelative",($fz=function(a){a=this.getFrameStep(a);var b=this.getCurrentFrame()+a,c=
0,d=0,e;0<this.morphCount?(c=1/(this.morphCount+1),d=this.currentMorphFrame+a*c,e=this.isNotInRange(d)):e=this.isNotInRange(b);if(e)switch(this.animationReplayMode){case J.constant.EnumAnimationMode.ONCE:return!1;case J.constant.EnumAnimationMode.LOOP:d=b=this.animationDirection==this.currentDirection?this.firstFrameIndex:this.lastFrameIndex;break;case J.constant.EnumAnimationMode.PALINDROME:this.currentDirection=-this.currentDirection,b-=2*a,d-=2*a*c}if(1>this.morphCount){if(0>b||b>=this.getFrameCount())return!1;
this.setFrame(b);return!0}this.morph(d+1);return!0},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"isNotInRange",($fz=function(a){var b=a-0.001;return b>this.firstFrameIndex&&b>this.lastFrameIndex||(b=a+0.001)<this.firstFrameIndex&&b<this.lastFrameIndex},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"getFrameStep",($fz=function(a){return this.frameStep*a*this.currentDirection},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"getAnimRunTimeSeconds",function(){var a=this.getFrameCount();if(this.firstFrameIndex==this.lastFrameIndex||
0>this.lastFrameIndex||0>this.firstFrameIndex||this.lastFrameIndex>=a||this.firstFrameIndex>=a)return 0;for(var b=Math.min(this.firstFrameIndex,this.lastFrameIndex),a=Math.max(this.firstFrameIndex,this.lastFrameIndex),c=1*(a-b)/this.animationFps+this.firstFrameDelay+this.lastFrameDelay;b<=a;b++)c+=this.viewer.getFrameDelayMs(b)/1E3;return c});$_M(c$,"setMovie",function(a){this.movie=a;this.viewer.setBooleanProperty("_ismovie",null!=this.movie);null==this.movie?(this.bsDisplay=null,this.currentMorphFrame=
this.morphCount=0):this.setFrame(-1)},"java.util.Map");$_M(c$,"getCurrentFrame",function(){return null==this.movie?this.currentModelIndex:this.currentFrameIndex});$_M(c$,"isMovie",function(){return null!=this.movie});$_M(c$,"currentIsLast",function(){return this.lastFramePainted==this.getCurrentFrame()});$_M(c$,"getModelNumber",function(a){switch(a){case -1:a=this.firstFrameIndex;break;case 0:if(0<this.morphCount)return"-"+(1+this.currentMorphFrame);a=this.getCurrentFrame();break;case 1:a=this.lastFrameIndex}return null==
this.movie?this.viewer.getModelNumberDotted(a):""+(a+1)},"~N");$_M(c$,"setDisplay",function(a){this.bsDisplay=null==a||0==a.cardinality()?null:J.util.BSUtil.copy(a)},"J.util.BS");$_M(c$,"currentFrameIs",function(a){var b=this.getCurrentFrame();return 0==this.morphCount?b==a:0.001>Math.abs(this.currentMorphFrame-a)},"~N")}),Clazz.declarePackage("J.viewer"),Clazz.load(["J.util.ColorEncoder"],"J.viewer.ColorManager","java.lang.Float J.constant.EnumPalette J.util.ArrayUtil $.C $.ColorUtil $.Elements $.Logger J.viewer.JC".split(" "),
function(){c$=Clazz.decorateAsClass(function(){this.colorData=this.altArgbsCpk=this.argbsCpk=this.g3d=this.viewer=this.propertyColorEncoder=null;this.isDefaultColorRasmol=!1;this.colixRubberband=22;this.colixBackgroundContrast=0;Clazz.instantialize(this,arguments)},J.viewer,"ColorManager");Clazz.prepareFields(c$,function(){this.propertyColorEncoder=new J.util.ColorEncoder(null)});Clazz.makeConstructor(c$,function(a,b){this.viewer=a;this.g3d=b;this.argbsCpk=J.constant.EnumPalette.argbsCpk;this.altArgbsCpk=
J.util.ArrayUtil.arrayCopyRangeI(J.viewer.JC.altArgbsCpk,0,-1)},"J.viewer.Viewer,J.util.GData");$_M(c$,"clear",function(){});$_M(c$,"getDefaultColorRasmol",function(){return this.isDefaultColorRasmol});$_M(c$,"resetElementColors",function(){this.setDefaultColors(!1)});$_M(c$,"setDefaultColors",function(a){a?(this.isDefaultColorRasmol=!0,this.argbsCpk=J.util.ArrayUtil.arrayCopyI(J.util.ColorEncoder.getRasmolScale(),-1)):(this.isDefaultColorRasmol=!1,this.argbsCpk=J.constant.EnumPalette.argbsCpk);this.altArgbsCpk=
J.util.ArrayUtil.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");$_M(c$,"setRubberbandArgb",function(a){this.colixRubberband=0==a?0:J.util.C.getColix(a)},"~N");$_M(c$,"setColixBackgroundContrast",function(a){this.colixBackgroundContrast=
J.util.ColorUtil.getBgContrast(a)},"~N");$_M(c$,"getColixBondPalette",function(a,b){switch(b){case 19:return this.propertyColorEncoder.getColorIndexFromPalette(a.getEnergy(),-2.5,-0.5,7,!1)}return 10},"J.modelset.Bond,~N");$_M(c$,"getColixAtomPalette",function(a,b){var c=0,d;switch(b){case 84:return null==this.colorData||a.index>=this.colorData.length?12:this.getColixForPropertyValue(this.colorData[a.index]);case 0:case 1:c=a.getAtomicAndIsotopeNumber();if(c<J.util.Elements.elementNumberMax)return this.g3d.getChangeableColix(c,
this.argbsCpk[c]);c=J.util.Elements.altElementIndexFromNumber(c);return this.g3d.getChangeableColix(J.util.Elements.elementNumberMax+c,this.altArgbsCpk[c]);case 2:return c=J.util.ColorEncoder.quantize(a.getPartialCharge(),-1,1,31),this.g3d.getChangeableColix(J.viewer.JC.PARTIAL_CHARGE_COLIX_RED+c,J.viewer.JC.argbsRwbScale[c]);case 3:return c=a.getFormalCharge()- -4,this.g3d.getChangeableColix(J.viewer.JC.FORMAL_CHARGE_COLIX_RED+c,J.viewer.JC.argbsFormalCharge[c]);case 68:case 5:return 68==b?(c=this.viewer.getModelSet(),
d=c.getBfactor100Lo(),c=c.getBfactor100Hi()):(d=0,c=1E4),this.propertyColorEncoder.getColorIndexFromPalette(a.getBfactor100(),d,c,7,!1);case 86:return this.propertyColorEncoder.getColorIndexFromPalette(a.getGroupParameter(1112539148),-1,1,7,!1);case 70:return c=this.viewer.getSurfaceDistanceMax(),this.propertyColorEncoder.getColorIndexFromPalette(a.getSurfaceDistance100(),0,c,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 c=this.viewer.getModelSet().models[a.modelIndex],this.propertyColorEncoder.getColorIndexFromPalette(a.getPolymerIndexInModel(),0,c.getBioPolymerCount()-1,1,!1);case 76:return this.propertyColorEncoder.getColorIndexFromPalette(a.getSelectedMonomerIndexWithinPolymer(),0,a.getSelectedMonomerCountWithinPolymer()-1,1,!1);case 77:return c=
this.viewer.getModelSet(),this.propertyColorEncoder.getColorIndexFromPalette(c.getMoleculeIndex(a.getIndex(),!0),0,c.getMoleculeCountInModel(a.getModelIndex())-1,0,!1);case 14:return c=this.viewer.getModelSet(),d=a.getModelIndex(),this.propertyColorEncoder.getColorIndexFromPalette(c.getAltLocIndexInModel(d,a.getAlternateLocationID()),0,c.getAltLocCountInModel(d),0,!1);case 15:return c=this.viewer.getModelSet(),d=a.getModelIndex(),this.propertyColorEncoder.getColorIndexFromPalette(c.getInsertionCodeIndexInModel(d,
a.getInsertionCode()),0,c.getInsertionCountInModel(d),0,!1);case 16:c=a.getAtomicAndIsotopeNumber();c=this.getJmolOrRasmolArgb(c,1073741992);break;case 17:c=a.getAtomicAndIsotopeNumber();c=this.getJmolOrRasmolArgb(c,1073742116);break;case 7:c=a.getProteinStructureSubType().getColor();break;case 10:c=a.getChainID().charCodeAt(0)&31,0>c&&(c=0),c>=J.viewer.JC.argbsChainAtom.length&&(c%=J.viewer.JC.argbsChainAtom.length),c=(a.isHetero()?J.viewer.JC.argbsChainHetero:J.viewer.JC.argbsChainAtom)[c]}return 0==
c?22:J.util.C.getColix(c)},"J.modelset.Atom,~N");$_M(c$,"getJmolOrRasmolArgb",($fz=function(a,b){switch(b){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 b}return J.viewer.JC.altArgbsCpk[J.util.Elements.altElementIndexFromNumber(a)]},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"setElementArgb",
function(a,b){1073741992==b&&this.argbsCpk===J.constant.EnumPalette.argbsCpk||(b=this.getJmolOrRasmolArgb(a,b),this.argbsCpk===J.constant.EnumPalette.argbsCpk&&(this.argbsCpk=J.util.ArrayUtil.arrayCopyRangeI(J.constant.EnumPalette.argbsCpk,0,-1),this.altArgbsCpk=J.util.ArrayUtil.arrayCopyRangeI(J.viewer.JC.altArgbsCpk,0,-1)),a<J.util.Elements.elementNumberMax?(this.argbsCpk[a]=b,this.g3d.changeColixArgb(a,b)):(a=J.util.Elements.altElementIndexFromNumber(a),this.altArgbsCpk[a]=b,this.g3d.changeColixArgb(J.util.Elements.elementNumberMax+
a,b)))},"~N,~N");$_M(c$,"getPropertyColorRange",function(){return this.propertyColorEncoder.isReversed?[this.propertyColorEncoder.hi,this.propertyColorEncoder.lo]:[this.propertyColorEncoder.lo,this.propertyColorEncoder.hi]});$_M(c$,"setPropertyColorRangeData",function(a,b,c){this.colorData=a;this.propertyColorEncoder.currentPalette=this.propertyColorEncoder.createColorScheme(c,!0,!1);this.propertyColorEncoder.hi=1.4E-45;this.propertyColorEncoder.lo=3.4028235E38;if(null!=a){c=null==b;for(var d,e=c?
a.length-1:b.nextSetBit(0);0<=e;e=c?e-1:b.nextSetBit(e+1))if(!Float.isNaN(d=a[e]))this.propertyColorEncoder.hi=Math.max(this.propertyColorEncoder.hi,d),this.propertyColorEncoder.lo=Math.min(this.propertyColorEncoder.lo,d);this.setPropertyColorRange(this.propertyColorEncoder.lo,this.propertyColorEncoder.hi)}},"~A,J.util.BS,~S");$_M(c$,"setPropertyColorRange",function(a,b){this.propertyColorEncoder.setRange(a,b,a>b);J.util.Logger.info('ColorManager: color "'+this.propertyColorEncoder.getCurrentColorSchemeName()+
'" range '+a+" "+b)},"~N,~N");$_M(c$,"setPropertyColorScheme",function(a,b,c){var d=0==a.length;d&&(a="=");var e=this.getPropertyColorRange();this.propertyColorEncoder.currentPalette=this.propertyColorEncoder.createColorScheme(a,!0,c);d||this.setPropertyColorRange(e[0],e[1]);this.propertyColorEncoder.isTranslucent=b},"~S,~B,~B");$_M(c$,"setUserScale",function(a){this.propertyColorEncoder.setUserScale(a)},"~A");$_M(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");$_M(c$,"getColixForPropertyValue",function(a){return this.propertyColorEncoder.getColorIndex(a)},"~N");$_M(c$,"getColorEncoder",function(a){if(null==a||0==a.length)return this.propertyColorEncoder;var b=new J.util.ColorEncoder(this.propertyColorEncoder);b.currentPalette=b.createColorScheme(a,!1,!0);return 2147483647==b.currentPalette?null:b},"~S")}),
Clazz.declarePackage("J.viewer"),Clazz.load(["J.util.BS"],"J.viewer.ShapeManager","java.lang.Boolean java.util.Hashtable J.constant.EnumPalette $.EnumVdw J.util.Logger $.P3 $.SB J.viewer.JC".split(" "),function(){c$=Clazz.decorateAsClass(function(){this.navigationCrossHairMinMax=this.bsRenderableAtoms=this.viewer=this.shapes=this.modelSet=this.gdata=null;Clazz.instantialize(this,arguments)},J.viewer,"ShapeManager");Clazz.prepareFields(c$,function(){this.bsRenderableAtoms=new J.util.BS;this.navigationCrossHairMinMax=
Clazz.newIntArray(4,0)});Clazz.makeConstructor(c$,function(a){this.viewer=a;this.gdata=a.getGraphicsData()},"J.viewer.Viewer");$_M(c$,"findNearestShapeAtomIndex",function(a,b,c,d){if(null!=this.shapes)for(var e=0;e<this.shapes.length&&null==c[0];++e)null!=this.shapes[e]&&this.shapes[e].findNearestAtomIndex(a,b,c,d)},"~N,~N,~A,J.util.BS");$_M(c$,"getShapes",function(){return this.shapes});$_M(c$,"getShapePropertyIndex",function(a,b,c){if(null==this.shapes||null==this.shapes[a])return null;this.viewer.setShapeErrorState(a,
"get "+b);a=this.shapes[a].getProperty(b,c);this.viewer.setShapeErrorState(-1,null);return a},"~N,~S,~N");$_M(c$,"getShapePropertyData",function(a,b,c){if(null==this.shapes||null==this.shapes[a])return!1;this.viewer.setShapeErrorState(a,"get "+b);a=this.shapes[a].getPropertyData(b,c);this.viewer.setShapeErrorState(-1,null);return a},"~N,~S,~A");$_M(c$,"getShapeIdFromObjectName",function(a){if(null!=this.shapes)for(var b=16;29>b;++b)if(null!=this.shapes[b]&&0<=this.shapes[b].getIndexFromName(a))return b;
return-1},"~S");$_M(c$,"loadDefaultShapes",function(a){this.modelSet=a;if(null!=this.shapes)for(var b=0;b<this.shapes.length;++b)null!=this.shapes[b]&&this.shapes[b].setModelSet(a);this.loadShape(0);this.loadShape(1);this.loadShape(6);this.loadShape(32);this.loadShape(33)},"J.modelset.ModelSet");$_M(c$,"loadShape",function(a){if(null==this.shapes)return null;if(null!=this.shapes[a])return this.shapes[a];if(2==a||3==a||4==a)return null;var b=J.viewer.JC.getShapeClassName(a,!1);try{var c=Class.forName(b).newInstance();
this.viewer.setShapeErrorState(a,"allocate");c.initializeShape(this.viewer,this.gdata,this.modelSet,a);this.viewer.setShapeErrorState(-1,null);return this.shapes[a]=c}catch(d){if(Clazz.exceptionOf(d,Exception))return J.util.Logger.errorEx("Could not instantiate shape:"+b,d),null;throw d;}},"~N");$_M(c$,"refreshShapeTrajectories",function(a,b,c){var d=Integer.$valueOf(a);a=this.viewer.getModelUndeletedAtomsBitSet(a);for(var e=0;36>e;e++)null!=this.shapes[e]&&this.setShapePropertyBs(e,"refreshTrajectories",
[d,b,c],a)},"~N,J.util.BS,J.util.Matrix4f");$_M(c$,"releaseShape",function(a){null!=this.shapes&&(this.shapes[a]=null)},"~N");$_M(c$,"resetShapes",function(){this.viewer.noGraphicsAllowed()||(this.shapes=Array(36))});$_M(c$,"setShapeSizeBs",function(a,b,c,d){if(null!=this.shapes){if(null==d&&(1!=a||2147483647!=b))d=this.viewer.getSelectionSet(!1);null!=c&&(0!=c.value&&c.vdwType===J.constant.EnumVdw.TEMP)&&this.modelSet.getBfactor100Lo();this.viewer.setShapeErrorState(a,"set size");(null==c?0!=b:0!=
c.value)&&this.loadShape(a);null!=this.shapes[a]&&this.shapes[a].setShapeSizeRD(b,c,d);this.viewer.setShapeErrorState(-1,null)}},"~N,~N,J.atomdata.RadiusData,J.util.BS");$_M(c$,"setLabel",function(a,b){if(null==a){if(null==this.shapes[5])return}else this.loadShape(5),this.setShapeSizeBs(5,0,null,b);this.setShapePropertyBs(5,"label",a,b)},"~S,J.util.BS");$_M(c$,"setShapePropertyBs",function(a,b,c,d){null==this.shapes||null==this.shapes[a]||(null==d&&(d=this.viewer.getSelectionSet(!1)),this.viewer.setShapeErrorState(a,
"set "+b),this.shapes[a].setProperty(b.intern(),c,d),this.viewer.setShapeErrorState(-1,null))},"~N,~S,~O,J.util.BS");$_M(c$,"checkFrankclicked",function(a,b){var c=this.shapes[35];return null!=c&&c.wasClicked(a,b)},"~N,~N");$_M(c$,"checkObjectClicked",function(a,b,c,d,e){var f,g=null;if(0!=c&&this.viewer.getBondPicking()&&null!=(g=this.shapes[1].checkObjectClicked(a,b,c,d,e)))return g;for(var h=0;h<J.viewer.ShapeManager.clickableMax;h++)if(null!=(f=this.shapes[J.viewer.ShapeManager.hoverable[h]])&&
null!=(g=f.checkObjectClicked(a,b,c,d,e)))return g;return null},"~N,~N,~N,J.util.BS,~B");$_M(c$,"checkObjectDragged",function(a,b,c,d,e,f,g){for(var h=!1,k=0<g?g+1:36;!h&&g<k;++g)null!=this.shapes[g]&&(h=this.shapes[g].checkObjectDragged(a,b,c,d,e,f));return h},"~N,~N,~N,~N,~N,J.util.BS,~N");$_M(c$,"checkObjectHovered",function(a,b,c,d){var e=this.shapes[1];if(d&&null!=e&&e.checkObjectHovered(a,b,c))return!0;for(d=0;d<J.viewer.ShapeManager.hoverable.length;d++)if(e=this.shapes[J.viewer.ShapeManager.hoverable[d]],
null!=e&&e.checkObjectHovered(a,b,c))return!0;return!1},"~N,~N,J.util.BS,~B");$_M(c$,"deleteShapeAtoms",function(a,b){if(null!=this.shapes)for(var c=0;36>c;c++)null!=this.shapes[c]&&this.setShapePropertyBs(c,"deleteModelAtoms",a,b)},"~A,J.util.BS");$_M(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)},"J.util.BS");$_M(c$,
"getAtomShapeValue",function(a,b,c){a=J.viewer.JC.shapeTokenIndex(a);if(0>a||null==this.shapes[a])return 0;c=this.shapes[a].getSize(c);if(0==c){if(0==(b.shapeVisibilityFlags&this.shapes[a].myVisibilityFlag))return 0;c=this.shapes[a].getSizeG(b)}return c/2E3},"~N,J.modelset.Group,~N");$_M(c$,"getObjectMap",function(a,b){if(null!=this.shapes)for(var c=Boolean.$valueOf(b),d=16;29>d;++d)this.getShapePropertyData(d,"getNames",[a,c])},"java.util.Map,~B");$_M(c$,"getProperty",function(a){return a.equals("getShapes")?
this.shapes:null},"~O");$_M(c$,"getRenderableBitSet",function(){return this.bsRenderableAtoms});$_M(c$,"getShape",function(a){return null==this.shapes?null:this.shapes[a]},"~N");$_M(c$,"getShapeInfo",function(){var a=new java.util.Hashtable,b=new J.util.SB;if(null!=this.shapes)for(var c=0;36>c;++c){var d=this.shapes[c];if(null!=d){var e=J.viewer.JC.shapeClassBases[c],d=d.getShapeDetail();null!=d&&a.put(e,d)}}0<b.length()&&a.put("shapeCommands",b.toString());return a});$_M(c$,"mergeShapes",function(a){if(null!=
a)if(null==this.shapes)this.shapes=a;else for(var b=0;b<a.length;++b)null!=a[b]&&(null==this.shapes[b]&&this.loadShape(b),this.shapes[b].merge(a[b]))},"~A");$_M(c$,"resetBioshapes",function(a){if(null!=this.shapes)for(var b=0;b<this.shapes.length;++b)null!=this.shapes[b]&&this.shapes[b].isBioShape&&(this.shapes[b].setModelSet(this.modelSet),this.shapes[b].setShapeSizeRD(0,null,a),this.shapes[b].setProperty("color",J.constant.EnumPalette.NONE,a))},"J.util.BS");$_M(c$,"setAtomLabel",function(a,b){null!=
this.shapes&&(this.loadShape(5),this.shapes[5].setProperty("label:"+a,Integer.$valueOf(b),null))},"~S,~N");$_M(c$,"setModelVisibility",function(){if(!(null==this.shapes||null==this.shapes[0])){for(var a=this.viewer.getVisibleFramesBitSet(),b=1;36>b;b++)null!=this.shapes[b]&&this.shapes[b].setVisibilityFlags(a);this.shapes[0].setVisibilityFlags(a);for(b=0;36>b;++b)a=this.shapes[b],null!=a&&a.setModelClickability()}});$_M(c$,"finalizeAtoms",function(a,b){if(null!=a){var c=this.viewer.getAtomSetCenter(a),
d=new J.util.P3;this.viewer.transformPt3f(c,d);d.add(b);this.viewer.unTransformPoint(d,d);d.sub(c);this.viewer.setAtomCoordsRelative(d,a);b.set(0,0,0)}this.bsRenderableAtoms.clearAll();c=this.modelSet.atoms;for(d=this.modelSet.getAtomCount();0<=--d;)0!=(c[d].getShapeVisibilityFlags()&1)&&this.bsRenderableAtoms.set(d)},"J.util.BS,J.util.P3");$_M(c$,"transformAtoms",function(){for(var a=this.modelSet.vibrationVectors,b=this.modelSet.atoms,c=this.bsRenderableAtoms.nextSetBit(0);0<=c;c=this.bsRenderableAtoms.nextSetBit(c+
1)){var d=b[c],e=null!=a&&d.hasVibration()?this.viewer.transformPtVib(d,a[c]):this.viewer.transformPt(d);d.screenX=e.x;d.screenY=e.y;d.screenZ=e.z;d.screenDiameter=Clazz.floatToShort(this.viewer.scaleToScreen(e.z,Math.abs(d.madAtom)))}if(this.viewer.getSlabEnabled()){var c=this.viewer.getBoolean(603979940),a=this.viewer.getBoolean(603979938),e=this.gdata.getSlab(),f=this.gdata.getDepth();if(c)for(var d=this.modelSet.getMolecules(),g=this.modelSet.getMoleculeCountInModel(-1),c=0;c<g;c++){var h=d[c],
k=0,l=h.firstAtomIndex;if(this.bsRenderableAtoms.get(l)){for(;k<h.atomCount&&!this.gdata.isClippedZ(b[l].screenZ-(b[l].screenDiameter>>1));k++,l++);if(k!=h.atomCount){l=h.firstAtomIndex;for(k=0;k<h.atomCount;k++)this.bsRenderableAtoms.clear(l),b[l++].screenZ=0}}}for(c=this.bsRenderableAtoms.nextSetBit(0);0<=c;c=this.bsRenderableAtoms.nextSetBit(c+1))if(d=b[c],this.gdata.isClippedZ(d.screenZ-(a?b[c].screenDiameter>>1:0)))d.setClickable(0),g=Clazz.doubleToInt((a?-1:1)*d.screenDiameter/2),(d.screenZ+
g<e||d.screenZ-g>f||!this.gdata.isInDisplayRange(d.screenX,d.screenY))&&this.bsRenderableAtoms.clear(c)}if(0==this.modelSet.getAtomCount()||!this.viewer.getShowNavigationPoint())return null;a=2147483647;e=-2147483648;f=2147483647;g=-2147483648;for(c=this.bsRenderableAtoms.nextSetBit(0);0<=c;c=this.bsRenderableAtoms.nextSetBit(c+1))d=b[c],d.screenX<a&&(a=d.screenX),d.screenX>e&&(e=d.screenX),d.screenY<f&&(f=d.screenY),d.screenY>g&&(g=d.screenY);this.navigationCrossHairMinMax[0]=a;this.navigationCrossHairMinMax[1]=
e;this.navigationCrossHairMinMax[2]=f;this.navigationCrossHairMinMax[3]=g;return this.navigationCrossHairMinMax});$_M(c$,"setModelSet",function(a){this.modelSet=this.viewer.modelSet=a},"J.modelset.ModelSet");$_M(c$,"checkInheritedShapes",function(){null!=this.shapes[24]&&this.setShapePropertyBs(24,"remapInherited",null,null)});Clazz.defineStatics(c$,"hoverable",[30,25,24,22,35]);c$.clickableMax=c$.prototype.clickableMax=J.viewer.ShapeManager.hoverable.length-1}),Clazz.declarePackage("J.thread"),Clazz.load(["J.thread.JmolThread"],
"J.thread.AnimationThread",["J.util.Logger"],function(){c$=Clazz.decorateAsClass(function(){this.animationManager=null;this.intThread=this.framePointer2=this.framePointer=0;this.isFirst=!1;Clazz.instantialize(this,arguments)},J.thread,"AnimationThread",J.thread.JmolThread);Clazz.makeConstructor(c$,function(a,b,c,d,e){Clazz.superConstructor(this,J.thread.AnimationThread);this.setViewer(b,"AnimationThread");this.animationManager=a;this.framePointer=c;this.framePointer2=d;this.intThread=e;b.startHoverWatcher(!1)},
"J.viewer.AnimationManager,J.viewer.Viewer,~N,~N,~N");$_M(c$,"interrupt",function(){if(!this.stopped){this.stopped=!0;J.util.Logger.debug("animation thread interrupted!");try{this.animationManager.setAnimationOn(!1)}catch(a){if(!Clazz.exceptionOf(a,Exception))throw a;}Clazz.superCall(this,J.thread.AnimationThread,"interrupt",[])}});Clazz.overrideMethod(c$,"run1",function(a){for(;;)switch(a){case -1:J.util.Logger.debugging&&J.util.Logger.debug("animation thread "+this.intThread+" running");this.viewer.requestRepaintAndWait();
this.viewer.startHoverWatcher(!1);this.isFirst=!0;a=0;break;case 0:if(this.checkInterrupted()||!this.animationManager.animationOn){a=-2;break}if(this.animationManager.currentFrameIs(this.framePointer)&&(this.targetTime+=this.animationManager.firstFrameDelayMs,this.sleepTime=this.targetTime-(System.currentTimeMillis()-this.startTime),!this.runSleep(this.sleepTime,1)))return;a=1;break;case 1:if(this.animationManager.currentFrameIs(this.framePointer2)&&(this.targetTime+=this.animationManager.lastFrameDelayMs,
this.sleepTime=this.targetTime-(System.currentTimeMillis()-this.startTime),!this.runSleep(this.sleepTime,2)))return;a=2;break;case 2:if(!this.isFirst&&this.animationManager.currentIsLast()&&!this.animationManager.setAnimationNext()){a=-2;break}this.isFirst=!1;this.targetTime+=Clazz.floatToInt(1E3/this.animationManager.animationFps+this.viewer.getFrameDelayMs(this.animationManager.getCurrentFrame()));a=3;break;case 3:for(;this.animationManager.animationOn&&!this.checkInterrupted()&&!this.viewer.getRefreshing();)if(!this.runSleep(10,
3))return;this.viewer.getSpinOn()||this.viewer.refresh(1,"animationThread");this.sleepTime=this.targetTime-(System.currentTimeMillis()-this.startTime);if(!this.runSleep(this.sleepTime,0))return;a=0;break;case -2:J.util.Logger.debug("animation thread "+this.intThread+" exiting");this.animationManager.stopThread(!1);return}},"~N")}),Clazz.declarePackage("J.viewer"),Clazz.load(null,"J.viewer.ModelManager",["J.modelset.ModelLoader"],function(){c$=Clazz.decorateAsClass(function(){this.fileName=this.modelSetPathName=
this.modelSet=this.viewer=null;Clazz.instantialize(this,arguments)},J.viewer,"ModelManager");Clazz.makeConstructor(c$,function(a){this.viewer=a},"J.viewer.Viewer");$_M(c$,"zap",function(){this.modelSetPathName=this.fileName=null;return this.modelSet=(new J.modelset.ModelLoader(this.viewer,this.viewer.getZapName(),null,null,null,null)).getModelSet()});$_M(c$,"getModelSetFileName",function(){return null!=this.fileName?this.fileName:this.viewer.getZapName()});$_M(c$,"getModelSetPathName",function(){return this.modelSetPathName});
$_M(c$,"createModelSet",function(a,b,c,d,e,f){var g=null;if(f)g=this.modelSet.modelSetName,g.equals("zapped")?g=null:0>g.indexOf(" (modified)")&&(g+=" (modified)");else{if(null==d)return this.zap();this.modelSetPathName=a;this.fileName=b}null!=d&&(null==g&&(g=this.viewer.getModelAdapter().getAtomSetCollectionName(d),null!=g&&(g=g.trim(),0==g.length&&(g=null)),null==g&&(g=J.viewer.ModelManager.reduceFilename(b))),this.modelSet=(new J.modelset.ModelLoader(this.viewer,g,c,d,f?this.modelSet:null,e)).getModelSet());
0==this.modelSet.getAtomCount()&&!this.modelSet.getModelSetAuxiliaryInfoBoolean("isPyMOL")&&this.zap();return this.modelSet},"~S,~S,J.util.SB,~O,J.util.BS,~B");c$.reduceFilename=$_M(c$,"reduceFilename",($fz=function(a){if(null==a)return null;var b=a.indexOf(".");0<b&&(a=a.substring(0,b));24<a.length&&(a=a.substring(0,20)+" ...");return a},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"createAtomDataSet",function(a,b){J.modelset.ModelLoader.createAtomDataSet(this.viewer,this.modelSet,b,a,this.viewer.getSelectionSet(!1))},
"~O,~N")}),Clazz.declarePackage("J.viewer"),Clazz.load(["J.util.BS"],"J.viewer.SelectionManager",["J.i18n.GT","J.util.ArrayUtil","$.BSUtil"],function(){c$=Clazz.decorateAsClass(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;Clazz.instantialize(this,arguments)},J.viewer,"SelectionManager");Clazz.prepareFields(c$,function(){this.listeners=[];this.bsHidden=new J.util.BS;this.bsSelection=
new J.util.BS;this.bsFixed=new J.util.BS;this.bsTemp=new J.util.BS});Clazz.makeConstructor(c$,function(a){this.viewer=a},"J.viewer.Viewer");$_M(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)},"J.util.BS");$_M(c$,"clear",function(){this.clearSelection(!0);this.hide(null,null,null,!0);this.setSelectionSubset(null);
this.bsDeleted=null;this.setMotionFixedAtoms(null)});$_M(c$,"hide",function(a,b,c,d){null==b?this.bsHidden.clearAll():null==c?(this.bsHidden.clearAll(),this.bsHidden.or(b)):c.booleanValue()?this.bsHidden.or(b):this.bsHidden.andNot(b);null!=a&&a.setBsHidden(this.bsHidden);d||this.viewer.reportSelection(J.i18n.GT._("{0} atoms hidden",""+this.bsHidden.cardinality()))},"J.modelset.ModelSet,J.util.BS,Boolean,~B");$_M(c$,"display",function(a,b,c,d){var e=a.getModelAtomBitSetIncludingDeleted(-1,!1);null==
b?this.bsHidden.clearAll():null==c?(this.bsHidden.or(e),this.bsHidden.andNot(b)):c.booleanValue()?this.bsHidden.andNot(b):this.bsHidden.or(b);J.util.BSUtil.andNot(this.bsHidden,this.bsDeleted);a.setBsHidden(this.bsHidden);d||this.viewer.reportSelection(J.i18n.GT._("{0} atoms hidden",""+this.bsHidden.cardinality()))},"J.modelset.ModelSet,J.util.BS,Boolean,~B");$_M(c$,"getHiddenSet",function(){return this.bsHidden});$_M(c$,"getHideNotSelected",function(){return this.hideNotSelected});$_M(c$,"setHideNotSelected",
function(a){(this.hideNotSelected=a)&&this.selectionChanged(!1)},"~B");$_M(c$,"isSelected",function(a){return 0<=a&&this.bsSelection.get(a)},"~N");$_M(c$,"select",function(a,b,c){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,b);if((a=this.viewer.getBoolean(603979879))||
!c)b=this.getSelectionCount(),a?this.viewer.reportSelection((0==b?"No atoms":1==b?"1 atom":b+" atoms")+" selected!"):c||this.viewer.reportSelection(J.i18n.GT._("{0} atoms selected",b))},"J.util.BS,Boolean,~B");$_M(c$,"selectAll",function(a){var b=this.viewer.getAtomCount();for(this.empty=0==b?1:0;0<=--b;)this.bsSelection.set(b);J.util.BSUtil.andNot(this.bsSelection,this.bsDeleted);this.selectionChanged(a)},"~B");$_M(c$,"clearSelection",function(a){this.setHideNotSelected(!1);this.bsSelection.clearAll();
this.empty=1;this.selectionChanged(a)},"~B");$_M(c$,"isAtomSelected",function(a){return((null==this.bsSubset||this.bsSubset.get(a))&&null==this.bsDeleted||!this.bsDeleted.get(a))&&this.bsSelection.get(a)},"~N");$_M(c$,"setSelectedAtom",function(a,b){0>a?this.selectionChanged(!0):null!=this.bsSubset&&!this.bsSubset.get(a)||null!=this.bsDeleted&&this.bsDeleted.get(a)||(this.bsSelection.setBitTo(a,b),this.empty=b?0:-1)},"~N,~B");$_M(c$,"setSelectionSet",function(a,b){null==a?this.bsSelection.clearAll():
null==b?(this.bsSelection.clearAll(),this.bsSelection.or(a)):b.booleanValue()?this.bsSelection.or(a):this.bsSelection.andNot(a);this.empty=-1;this.selectionChanged(!1)},"J.util.BS,Boolean");$_M(c$,"setSelectionSubset",function(a){this.bsSubset=a},"J.util.BS");$_M(c$,"isInSelectionSubset",function(a){return 0>a||null==this.bsSubset||this.bsSubset.get(a)},"~N");$_M(c$,"invertSelection",function(){J.util.BSUtil.invertInPlace(this.bsSelection,this.viewer.getAtomCount());this.empty=0<this.bsSelection.length()?
0:1;this.selectionChanged(!1)});$_M(c$,"excludeSelectionSet",($fz=function(a){null==a||1==this.empty||(this.bsSelection.andNot(a),this.empty=-1)},$fz.isPrivate=!0,$fz),"J.util.BS");$_M(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});$_M(c$,"addListener",function(a){for(var b=this.listeners.length;0<=
--b;)if(this.listeners[b]===a){this.listeners[b]=null;break}for(var c=this.listeners.length,b=c;0<=--b;)if(null==this.listeners[b]){this.listeners[b]=a;return}this.listeners=0==this.listeners.length?Array(1):J.util.ArrayUtil.doubleLength(this.listeners);this.listeners[c]=a},"J.api.JmolSelectionListener");$_M(c$,"selectionChanged",($fz=function(a){this.hideNotSelected&&this.hide(this.viewer.getModelSet(),J.util.BSUtil.copyInvert(this.bsSelection,this.viewer.getAtomCount()),null,a);if(!(a||0==this.listeners.length))for(a=
this.listeners.length;0<=--a;)null!=this.listeners[a]&&this.listeners[a].selectionChanged(this.bsSelection)},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"deleteAtoms",function(a){var b=J.util.BSUtil.copy(a);null==this.bsDeleted?this.bsDeleted=b:(b.andNot(this.bsDeleted),this.bsDeleted.or(a));this.bsHidden.andNot(this.bsDeleted);this.bsSelection.andNot(this.bsDeleted);return b.cardinality()},"J.util.BS");$_M(c$,"getDeletedAtoms",function(){return this.bsDeleted});$_M(c$,"getSelectionSet",function(a){if(a||
null==this.bsDeleted&&null==this.bsSubset)return this.bsSelection;a=new J.util.BS;a.or(this.bsSelection);this.excludeAtoms(a,!1);return a},"~B");$_M(c$,"getSelectionSubset",function(){return this.bsSubset});$_M(c$,"excludeAtoms",function(a,b){null!=this.bsDeleted&&a.andNot(this.bsDeleted);!b&&null!=this.bsSubset&&a.and(this.bsSubset)},"J.util.BS,~B");$_M(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 b=J.util.BSUtil.copy(this.bsSelection);J.util.BSUtil.deleteBits(b,a);this.setSelectionSet(b,null)},"J.util.BS");$_M(c$,"setMotionFixedAtoms",function(a){this.bsFixed.clearAll();null!=a&&this.bsFixed.or(a)},"J.util.BS");$_M(c$,"getMotionFixedAtoms",function(){return this.bsFixed});Clazz.defineStatics(c$,"TRUE",1,"FALSE",0,"UNKNOWN",-1)}),Clazz.declarePackage("J.viewer"),Clazz.load(["java.util.Hashtable"],"J.viewer.StatusManager",
"java.lang.Boolean $.Float J.api.Interface J.constant.EnumCallback J.util.Dimension $.JmolList $.Logger $.TextFormat".split(" "),function(){c$=Clazz.decorateAsClass(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;Clazz.instantialize(this,arguments)},J.viewer,"StatusManager");Clazz.prepareFields(c$,function(){this.messageQueue=new java.util.Hashtable;this.jmolScriptCallbacks=new java.util.Hashtable});Clazz.makeConstructor(c$,function(a){this.viewer=a},"J.viewer.Viewer");$_M(c$,"setAllowStatusReporting",function(a){this.allowStatusReporting=a},"~B");$_M(c$,"getStatusList",function(){return this.statusList});$_M(c$,"getMessageQueue",function(){return this.messageQueue});
$_M(c$,"recordStatus",($fz=function(a){return this.allowStatusReporting&&0<this.statusList.length&&(this.statusList.equals("all")||0<=this.statusList.indexOf(a))},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"setStatusChanged",($fz=function(a,b,c,d){if(this.recordStatus(a)){var e=new J.util.JmolList;e.addLast(Integer.$valueOf(++this.statusPtr));e.addLast(a);e.addLast(Integer.$valueOf(b));e.addLast(c);b=d?null:this.messageQueue.get(a);null==b?this.messageQueue.put(a,b=new J.util.JmolList):b.size()==J.viewer.StatusManager.MAXIMUM_QUEUE_LENGTH&&
b.remove(0);b.addLast(e)}},$fz.isPrivate=!0,$fz),"~S,~N,~O,~B");$_M(c$,"getStatusChanged",function(a){var b=0<a.length&&"-"==a.charAt(0),c=0<a.length&&"+"==a.charAt(0),d=!1;b?this.statusList=J.util.TextFormat.simpleReplace(this.statusList,a.substring(1,a.length),""):(a=J.util.TextFormat.simpleReplace(a,"+",""),this.statusList.equals(a)||c&&0<=this.statusList.indexOf(a)?d=!0:(c||(this.statusList=""),this.statusList+=a,J.util.Logger.debugging&&J.util.Logger.debug("StatusManager messageQueue = "+this.statusList)));
a=new J.util.JmolList;if(d)for(var e,d=this.messageQueue.entrySet().iterator();d.hasNext()&&((e=d.next())||1);)a.addLast(e.getValue());this.messageQueue.clear();this.statusPtr=0;return a},"~S");$_M(c$,"setJmolStatusListener",function(a,b){this.jmolStatusListener=a;this.jmolCallbackListener=null==b?a:b},"J.api.JmolStatusListener,J.api.JmolCallbackListener");$_M(c$,"setJmolCallbackListener",function(a){this.jmolCallbackListener=a},"J.api.JmolCallbackListener");$_M(c$,"jmolScriptCallback",($fz=function(a){a=
this.jmolScriptCallbacks.get(a);null!=a&&this.viewer.evalStringQuietSync(a,!0,!1);return a},$fz.isPrivate=!0,$fz),"J.constant.EnumCallback");$_M(c$,"setCallbackFunction",function(a,b){var c=J.constant.EnumCallback.getCallback(a);if(null!=c){var d=null==b?0:7<b.length&&0==b.toLowerCase().indexOf("script:")?7:11<b.length&&0==b.toLowerCase().indexOf("jmolscript:")?11:0;0==d?this.jmolScriptCallbacks.remove(c):this.jmolScriptCallbacks.put(c,b.substring(d).trim())}null!=this.jmolCallbackListener&&this.jmolCallbackListener.setCallbackFunction(a,
b)},"~S,~S");$_M(c$,"notifyEnabled",($fz=function(a){return null!=this.jmolCallbackListener&&this.jmolCallbackListener.notifyEnabled(a)},$fz.isPrivate=!0,$fz),"J.constant.EnumCallback");$_M(c$,"setStatusAppletReady",function(a,b){var c=b?this.jmolScriptCallback(J.constant.EnumCallback.APPLETREADY):null;this.notifyEnabled(J.constant.EnumCallback.APPLETREADY)&&this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.APPLETREADY,[c,a,Boolean.$valueOf(b),null])},"~S,~B");$_M(c$,"setStatusAtomMoved",
function(a){var b=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,[b,a])},"J.util.BS");$_M(c$,"setStatusAtomPicked",function(a,b){var c=this.jmolScriptCallback(J.constant.EnumCallback.PICK);J.util.Logger.info("setStatusAtomPicked("+a+","+b+")");this.setStatusChanged("atomPicked",a,b,!1);this.notifyEnabled(J.constant.EnumCallback.PICK)&&
this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.PICK,[c,b,Integer.$valueOf(a)])},"~N,~S");$_M(c$,"setStatusClicked",function(a,b,c,d,e){var f=this.jmolScriptCallback(J.constant.EnumCallback.CLICK);if(!this.notifyEnabled(J.constant.EnumCallback.CLICK))return c;e=[c,e];this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.CLICK,[f,Integer.$valueOf(a),Integer.$valueOf(b),Integer.$valueOf(c),Integer.$valueOf(d),e]);return e[0]},"~N,~N,~N,~N,~N");$_M(c$,"setStatusResized",function(a,
b){var c=this.jmolScriptCallback(J.constant.EnumCallback.RESIZE);this.notifyEnabled(J.constant.EnumCallback.RESIZE)&&this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.RESIZE,[c,Integer.$valueOf(a),Integer.$valueOf(b)])},"~N,~N");$_M(c$,"setStatusAtomHovered",function(a,b){var c=this.jmolScriptCallback(J.constant.EnumCallback.HOVER);this.notifyEnabled(J.constant.EnumCallback.HOVER)&&this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.HOVER,[c,b,Integer.$valueOf(a)])},"~N,~S");
$_M(c$,"setStatusObjectHovered",function(a,b,c){var d=this.jmolScriptCallback(J.constant.EnumCallback.HOVER);this.notifyEnabled(J.constant.EnumCallback.HOVER)&&this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.HOVER,[d,b,Integer.$valueOf(-1),a,Float.$valueOf(c.x),Float.$valueOf(c.y),Float.$valueOf(c.z)])},"~S,~S,J.util.P3");$_M(c$,"setFileLoadStatus",function(a,b,c,d,e,f,g){null==a&&"resetUndo".equals(b)&&(b=this.viewer.getProperty("DATA_API","getAppConsole",null),null!=b&&b.zap(),
b=this.viewer.getZapName());this.setStatusChanged("fileLoaded",e,a,!1);null!=d&&this.setStatusChanged("fileLoadError",e,d,!1);var h=this.jmolScriptCallback(J.constant.EnumCallback.LOADSTRUCT);f&&this.notifyEnabled(J.constant.EnumCallback.LOADSTRUCT)&&(f=this.viewer.getParameter("_smilesString"),0!=f.length&&(b=f),this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.LOADSTRUCT,[h,a,b,c,d,Integer.$valueOf(e),this.viewer.getParameter("_modelNumber"),this.viewer.getModelNumberDotted(this.viewer.getModelCount()-
1),g]))},"~S,~S,~S,~S,~N,~B,Boolean");$_M(c$,"setStatusFrameChanged",function(a,b,c,d,e,f,g){if(null!=this.viewer.getModelSet()){var h=this.viewer.isAnimationOn();this.setStatusChanged("frameChanged",a,0<=a?this.viewer.getModelNumberDotted(a):"",!1);var k=this.jmolScriptCallback(J.constant.EnumCallback.ANIMFRAME);h&&(a=-2-a);this.notifyEnabled(J.constant.EnumCallback.ANIMFRAME)&&this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.ANIMFRAME,[k,[a,b,c,d,e,f],g]);null!=this.viewer.jmolpopup&&
!h&&this.viewer.jmolpopup.jpiUpdateComputedMenus()}},"~N,~N,~N,~N,~N,~N,~S");$_M(c$,"setScriptEcho",function(a,b){if(null!=a){this.setStatusChanged("scriptEcho",0,a,!1);var c=this.jmolScriptCallback(J.constant.EnumCallback.ECHO);this.notifyEnabled(J.constant.EnumCallback.ECHO)&&this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.ECHO,[c,a,Integer.$valueOf(b?1:0)])}},"~S,~B");$_M(c$,"setStatusMeasuring",function(a,b,c,d){this.setStatusChanged(a,b,c,!1);var e=null;a.equals("measureCompleted")?
(J.util.Logger.info("measurement["+b+"] = "+c),e=this.jmolScriptCallback(J.constant.EnumCallback.MEASURE)):a.equals("measurePicked")&&(this.setStatusChanged("measurePicked",b,c,!1),J.util.Logger.info("measurePicked "+b+" "+c));this.notifyEnabled(J.constant.EnumCallback.MEASURE)&&this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.MEASURE,[e,c,Integer.$valueOf(b),a,Float.$valueOf(d)])},"~S,~N,~S,~N");$_M(c$,"notifyError",function(a,b,c){var d=this.jmolScriptCallback(J.constant.EnumCallback.ERROR);
this.notifyEnabled(J.constant.EnumCallback.ERROR)&&this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.ERROR,[d,a,b,this.viewer.getShapeErrorState(),c])},"~S,~S,~S");$_M(c$,"notifyMinimizationStatus",function(a,b,c,d,e){var f=this.jmolScriptCallback(J.constant.EnumCallback.MINIMIZATION);this.notifyEnabled(J.constant.EnumCallback.MINIMIZATION)&&this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.MINIMIZATION,[f,a,b,c,d,e])},"~S,Integer,Float,Float,~S");$_M(c$,"setScriptStatus",
function(a,b,c,d){if(-1>c){var e=-2-c;this.setStatusChanged("scriptStarted",e,b,!1);a="script "+e+" started"}else if(null==a)return;var e=0==c?this.jmolScriptCallback(J.constant.EnumCallback.SCRIPT):null,f="Script completed"===a;if(this.recordStatus("script")){var g=null!=d;this.setStatusChanged(g?"scriptError":"scriptStatus",0,a,!1);if(g||f)this.setStatusChanged("scriptTerminated",1,"Jmol script terminated"+(g?" unsuccessfully: "+a:" successfully"),!1)}f&&(this.viewer.getBoolean(603979879)&&this.viewer.getBoolean(603979824))&&
(a=[null,"script <exiting>",b,Integer.$valueOf(-1),d],this.notifyEnabled(J.constant.EnumCallback.SCRIPT)&&this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.SCRIPT,a),this.processScript(a),a="Jmol script completed.");a=[e,a,b,Integer.$valueOf(f?-1:c),d];this.notifyEnabled(J.constant.EnumCallback.SCRIPT)&&this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.SCRIPT,a);this.processScript(a)},"~S,~S,~N,~S");$_M(c$,"processScript",($fz=function(a){var b=a[3].intValue();null!=
this.viewer.scriptEditor&&(0<b?this.viewer.scriptEditor.notifyScriptTermination():0>b?-2==b&&this.viewer.scriptEditor.notifyScriptStart():this.viewer.scriptEditor.isVisible()&&0<a[2].length&&this.viewer.scriptEditor.notifyContext(this.viewer.getScriptContext(),a));null!=this.viewer.appConsole&&0==b&&this.viewer.appConsole.sendConsoleMessage(null==a[1]?null:a[1].toString())},$fz.isPrivate=!0,$fz),"~A");$_M(c$,"doSync",function(){return this.isSynced&&this.drivingSync&&!this.syncDisabled});$_M(c$,"setSync",
function(a){this.syncingMouse?null!=a&&this.syncSend(a,"*",0):this.syncingScripts||this.syncSend("!"+this.viewer.getMoveToText(this.minSyncRepeatMs/1E3),"*",0)},"~S");$_M(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");$_M(c$,"syncSend",function(a,b,c){(0!=c||this.notifyEnabled(J.constant.EnumCallback.SYNC))&&this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.SYNC,[null,a,b,Integer.$valueOf(c)])},"~S,~S,~N");$_M(c$,"getSyncMode",
function(){return!this.isSynced?0:this.drivingSync?1:2});$_M(c$,"showUrl",function(a){null!=this.jmolStatusListener&&this.jmolStatusListener.showUrl(a)},"~S");$_M(c$,"clearConsole",function(){null!=this.viewer.appConsole&&this.viewer.appConsole.sendConsoleMessage(null);null!=this.jmolStatusListener&&this.jmolCallbackListener.notifyCallback(J.constant.EnumCallback.MESSAGE,null)});$_M(c$,"functionXY",function(a,b,c){return null==this.jmolStatusListener?Clazz.newFloatArray(Math.abs(b),Math.abs(c),0):
this.jmolStatusListener.functionXY(a,b,c)},"~S,~N,~N");$_M(c$,"functionXYZ",function(a,b,c,d){return null==this.jmolStatusListener?Clazz.newFloatArray(Math.abs(b),Math.abs(c),Math.abs(c),0):this.jmolStatusListener.functionXYZ(a,b,c,d)},"~S,~N,~N,~N");$_M(c$,"jsEval",function(a){return null==this.jmolStatusListener?"":this.jmolStatusListener.eval(a)},"~S");$_M(c$,"createImage",function(a,b,c,d,e){return null==this.jmolStatusListener?null:this.jmolStatusListener.createImage(a,b,null==c?d:c,e)},"~S,~S,~S,~A,~N");
$_M(c$,"getRegistryInfo",function(){return null==this.jmolStatusListener?null:this.jmolStatusListener.getRegistryInfo()});$_M(c$,"dialogAsk",function(a,b){var c=a.startsWith("saveImage"),d=J.api.Interface.getOptionInterface("export.dialog.Dialog");if(null==d)return null;d.setupUI(!1);c&&d.setImageInfo(this.qualityJPG,this.qualityPNG,this.imageType);var e=d.getFileNameFromDialog(this.viewer,a,b);c&&null!=e&&(this.qualityJPG=d.getQuality("JPG"),this.qualityPNG=d.getQuality("PNG"),c=d.getType(),null!=
c&&(this.imageType=c));return e},"~S,~S");$_M(c$,"getJspecViewProperties",function(a){return null==this.jmolStatusListener?null:this.jmolStatusListener.getProperty("JSpecView"+(null==a||0==a.length?"":":"+a))},"~S");$_M(c$,"resizeInnerPanel",function(a,b){return null==this.jmolStatusListener?(new J.util.Dimension).set(a,b):this.jmolStatusListener.resizeInnerPanel("preferredWidthHeight "+a+" "+b+";")},"~N,~N");Clazz.defineStatics(c$,"MAXIMUM_QUEUE_LENGTH",16,"SYNC_OFF",0,"SYNC_DRIVER",1,"SYNC_SLAVE",
2,"SYNC_DISABLE",3,"SYNC_ENABLE",4,"SYNC_STEREO",5)}),Clazz.declarePackage("J.viewer"),Clazz.load("J.constant.EnumStereoMode J.util.AxisAngle4f $.Matrix3f $.Matrix4f $.P3 $.P3i $.V3".split(" "),"J.viewer.TransformManager","java.lang.Float java.util.Hashtable J.api.Interface J.thread.MoveThread $.MoveToThread $.SpinThread $.VibrationThread J.util.Escape $.Logger $.P4 $.Quaternion $.SB".split(" "),function(){c$=Clazz.decorateAsClass(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.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.cameraDepth=NaN;this.cameraDepthSetting=3;this.visualRange=0;this.cameraDistance=1E3;this.scale3DAngstromsPerInch=this.scaleDefaultPixelsPerAngstrom=this.scalePixelsPerAngstrom=this.screenPixelCount=this.height=this.width=0;this.useZoomLarge=this.antialias=!1;this.screenHeight=this.screenWidth=0;this.point3fVibrationTemp=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=!1;this.vibrationScale=this.vibrationRadians=this.vibrationAmplitude=this.vibrationPeriodMs=this.vibrationPeriod=0;this.stereoColors=this.stereoMode=this.vibrationThread=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;Clazz.instantialize(this,arguments)},J.viewer,"TransformManager");Clazz.prepareFields(c$,function(){this.navigationCenter=new J.util.P3;this.navigationOffset=new J.util.P3;this.navigationShiftXY=new J.util.P3;this.matrixTemp=new J.util.Matrix4f;this.vectorTemp=new J.util.V3;this.fixedRotationOffset=new J.util.P3;this.fixedRotationCenter=new J.util.P3;this.perspectiveOffset=new J.util.P3;this.perspectiveShiftXY=
new J.util.P3;this.rotationCenterDefault=new J.util.P3;this.fixedRotationAxis=new J.util.AxisAngle4f;this.internalRotationAxis=new J.util.AxisAngle4f;this.internalRotationCenter=J.util.P3.new3(0,0,0);this.matrixRotate=new J.util.Matrix3f;this.matrixTemp3=new J.util.Matrix3f;this.matrixTemp4=new J.util.Matrix4f;this.axisangleT=new J.util.AxisAngle4f;this.vectorT=new J.util.V3;this.vectorT2=new J.util.V3;this.pointT2=new J.util.P3;this.rotationAxis=new J.util.V3;this.arcBall0=new J.util.V3;this.arcBall1=
new J.util.V3;this.arcBallAxis=new J.util.V3;this.arcBall0Rotation=new J.util.Matrix3f;this.fixedTranslation=new J.util.P3;this.matrixTransform=new J.util.Matrix4f;this.matrixTransformInv=new J.util.Matrix4f;this.point3fScreenTemp=new J.util.P3;this.point3iScreenTemp=new J.util.P3i;this.point3fVibrationTemp=new J.util.P3;this.pointTsp=new J.util.P3;this.untransformedPoint=new J.util.P3;this.ptTest1=new J.util.P3;this.ptTest2=new J.util.P3;this.ptTest3=new J.util.P3;this.aaTest1=new J.util.AxisAngle4f;
this.matrixTest=new J.util.Matrix3f;this.stereoMode=J.constant.EnumStereoMode.NONE;this.matrixStereo=new J.util.Matrix3f;this.frameOffset=new J.util.P3;this.ptOffset=new J.util.P3});Clazz.makeConstructor(c$,function(a,b,c){this.setViewer(a,b,c)},"J.viewer.Viewer,~N,~N");$_M(c$,"setViewer",($fz=function(a,b,c){this.viewer=a;this.setScreenParameters(b,c,!0,!1,!0,!0)},$fz.isPrivate=!0,$fz),"J.viewer.Viewer,~N,~N");$_M(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");1==this.mode&&this.setNavigationMode(!0)},"~B");$_M(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)});
$_M(c$,"setFixedRotationCenter",($fz=function(a){null!=a&&this.fixedRotationCenter.setT(a)},$fz.isPrivate=!0,$fz),"J.util.P3");$_M(c$,"setRotationPointXY",function(a){a=this.transformPoint(a);this.fixedTranslation.set(a.x,a.y,0)},"J.util.P3");$_M(c$,"spinXYBy",function(a,b,c){if(0==a&&0==b)null!=this.spinThread&&this.spinThread.isGesture()&&this.clearSpin();else{this.clearSpin();var d=J.util.P3.newP(this.fixedRotationCenter),e=new J.util.P3;this.transformPoint2(d,e);a=J.util.P3.new3(-b,a,0);a.add(e);
this.unTransformPoint(a,a);this.viewer.setInMotion(!1);this.rotateAboutPointsInternal(null,a,d,10*c,NaN,!1,!0,null,!0,null,null)}},"~N,~N,~N");$_M(c$,"rotateArcBall",function(a,b,c){var d=(this.screenPixelCount>>2)*this.screenPixelCount;a-=this.fixedTranslation.x;b-=this.fixedTranslation.y;d=d-a*a-b*b;d=(0>d?-1:1)*Math.sqrt(Math.abs(d));0==c?(this.arcBall0Rotation.setM(this.matrixRotate),this.arcBall0.set(a,-b,d),Float.isNaN(d)||this.arcBall0.normalize()):!Float.isNaN(this.arcBall0.z)&&!Float.isNaN(d)&&
(this.arcBall1.set(a,-b,d),this.arcBall1.normalize(),this.arcBallAxis.cross(this.arcBall0,this.arcBall1),this.axisangleT.setVA(this.arcBallAxis,c*Math.acos(this.arcBall0.dot(this.arcBall1))),this.matrixRotate.setM(this.arcBall0Rotation),this.rotateAxisAngle2(this.axisangleT,null))},"~N,~N,~N");$_M(c$,"rotateXYBy",function(a,b,c){this.rotateXRadians(0.017453292*b,c);this.rotateYRadians(0.017453292*a,c)},"~N,~N,J.util.BS");$_M(c$,"rotateZBy",function(a,b,c){2147483647!=b&&2147483647!=c&&this.resetXYCenter(b,
c);this.rotateZRadians(a/57.29577951308232)},"~N,~N,~N");$_M(c$,"rotateFront",function(){this.matrixRotate.setIdentity()});$_M(c$,"rotateX",function(a){this.matrixRotate.rotX(a)},"~N");$_M(c$,"rotateY",function(a){this.matrixRotate.rotY(a)},"~N");$_M(c$,"rotateZ",function(a){this.matrixRotate.rotZ(a)},"~N");$_M(c$,"applyRotation",($fz=function(a,b,c,d){null==c?this.matrixRotate.mul2(a,this.matrixRotate):(this.viewer.moveAtoms(a,this.matrixRotate,d,this.internalRotationCenter,b,c),null!=d&&this.internalRotationCenter.add(d))},
$fz.isPrivate=!0,$fz),"J.util.Matrix3f,~B,J.util.BS,J.util.V3");$_M(c$,"rotateXRadians",function(a,b){this.matrixTemp3.rotX(a);this.applyRotation(this.matrixTemp3,!1,b,null)},"~N,J.util.BS");$_M(c$,"rotateYRadians",function(a,b){this.matrixTemp3.rotY(a);this.applyRotation(this.matrixTemp3,!1,b,null)},"~N,J.util.BS");$_M(c$,"rotateZRadians",function(a){this.matrixTemp3.rotZ(a);this.applyRotation(this.matrixTemp3,!1,null,null)},"~N");$_M(c$,"rotateAxisAngle",function(a,b){this.axisangleT.setVA(a,b);
this.rotateAxisAngle2(this.axisangleT,null)},"J.util.V3,~N");$_M(c$,"rotateAxisAngle2",($fz=function(a,b){this.matrixTemp3.setAA(a);this.applyRotation(this.matrixTemp3,!1,b,null)},$fz.isPrivate=!0,$fz),"J.util.AxisAngle4f,J.util.BS");$_M(c$,"rotateAxisAngleAtCenter",function(a,b,c,d,e,f,g){null!=b&&this.moveRotationCenter(b,!0);this.setSpinOff();this.setNavOn(!1);if(this.viewer.isHeadless()){if(f&&3.4028235E38==e)return!1;f=!1}if(Float.isNaN(d)||0==d||0==e)return!1;null!=b&&this.setRotationPointXY(b);
this.setFixedRotationCenter(b);this.rotationAxis.setT(c);this.rotationRate=d;if(f)return this.fixedRotationAxis.setVA(c,0.017453292*d),this.isSpinInternal=!1,this.isSpinFixed=!0,this.isSpinSelected=null!=g,this.setSpin(a,!0,e,null,g,!1),!1;a=0.017453292*e;this.fixedRotationAxis.setVA(c,e);this.rotateAxisAngleRadiansFixed(a,g);return!0},"J.api.JmolScriptEvaluator,J.util.P3,J.util.V3,~N,~N,~B,J.util.BS");$_M(c$,"rotateAxisAngleRadiansFixed",function(a,b){this.axisangleT.setAA(this.fixedRotationAxis);
this.axisangleT.angle=a;this.rotateAxisAngle2(this.axisangleT,b)},"~N,J.util.BS");$_M(c$,"rotateAboutPointsInternal",function(a,b,c,d,e,f,g,h,k,l,m){this.setSpinOff();this.setNavOn(!1);if(this.viewer.isHeadless()){if(g&&3.4028235E38==e)return!1;g=!1}if((null==l||0.001>l.length())&&(!g||0==e||Float.isNaN(d)||0==d)&&(g||0==e))return!1;c=J.util.V3.newV(c);c.sub(b);f&&c.scale(-1);this.internalRotationCenter.setT(b);this.rotationAxis.setT(c);this.internalTranslation=null==l?null:J.util.V3.newV(l);b=null!=
h;if(g)return g=Clazz.doubleToInt(Math.abs(e)/Math.abs(d)*this.spinFps+0.5),Float.isNaN(e)?this.rotationRate=d:(this.rotationRate=e/g*this.spinFps,null!=l&&this.internalTranslation.scale(1/g)),this.internalRotationAxis.setVA(c,0.017453292*this.rotationRate),this.isSpinInternal=!0,this.isSpinFixed=!1,this.isSpinSelected=b,this.setSpin(a,!0,e,m,h,k),!1;a=0.017453292*e;this.internalRotationAxis.setVA(c,a);this.rotateAxisAngleRadiansInternal(a,h);return!0},"J.api.JmolScriptEvaluator,J.util.P3,J.util.P3,~N,~N,~B,~B,J.util.BS,~B,J.util.V3,J.util.JmolList");
$_M(c$,"rotateAxisAngleRadiansInternal",function(a,b){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,b,this.internalTranslation);null==b&&this.getNewFixedRotationCenter()},"~N,J.util.BS");$_M(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.setT(this.fixedRotationCenter);this.pointT2.sub(this.vectorT);var a=new J.util.P3;this.matrixTemp4.transform2(this.pointT2,a);a.add(this.vectorT);this.setRotationCenterAndRadiusXYZ(a,!1)});$_M(c$,"setTranslationFractions",function(){this.xTranslationFraction=this.fixedTranslation.x/this.width;this.yTranslationFraction=this.fixedTranslation.y/this.height});
$_M(c$,"centerAt",function(a,b,c){null==c?this.translateXYBy(a,b):(this.windowCentered&&this.viewer.setBooleanProperty("windowCentered",!1),this.fixedTranslation.x=a,this.fixedTranslation.y=b,this.setFixedRotationCenter(c))},"~N,~N,J.util.P3");$_M(c$,"percentToPixels",function(a,b){switch(a){case "x":return Clazz.doubleToInt(Math.floor(b/100*this.width));case "y":return Clazz.doubleToInt(Math.floor(b/100*this.height));case "z":return Clazz.doubleToInt(Math.floor(b/100*this.screenPixelCount))}return 0},
"~S,~N");$_M(c$,"angstromsToPixels",function(a){return Clazz.doubleToInt(Math.floor(this.scalePixelsPerAngstrom*a))},"~N");$_M(c$,"translateXYBy",function(a,b){this.fixedTranslation.x+=a;this.fixedTranslation.y+=b;this.setTranslationFractions()},"~N,~N");$_M(c$,"translateToPercent",function(a,b){switch(a){case "x":this.xTranslationFraction=0.5+b/100;this.fixedTranslation.x=this.width*this.xTranslationFraction;break;case "y":this.yTranslationFraction=0.5+b/100;this.fixedTranslation.y=this.height*this.yTranslationFraction;
break;case "z":1==this.mode&&this.setNavigationDepthPercent(b)}},"~S,~N");$_M(c$,"getTranslationXPercent",function(){return 0==this.width?0:100*(this.fixedTranslation.x-this.width/2)/this.width});$_M(c$,"getTranslationYPercent",function(){return 0==this.height?0:100*(this.fixedTranslation.y-this.height/2)/this.height});$_M(c$,"getTranslationZPercent",function(){return 0});$_M(c$,"getTranslationScript",function(){var a="",b=this.getTranslationXPercent();0!=b&&(a+="translate x "+b+";");b=this.getTranslationYPercent();
0!=b&&(a+="translate y "+b+";");return a});$_M(c$,"getOrientationText",function(a){switch(a){case 4130:return this.getMoveToText(1,!1);case 1073742132:return this.getRotationQuaternion().toString();case 1073742178:return a=new J.util.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");$_M(c$,"getOrientationInfo",function(){var a=
new java.util.Hashtable;a.put("moveTo",this.getMoveToText(1,!1));a.put("center","center "+this.getCenterText());a.put("centerPt",this.fixedRotationCenter);var b=new J.util.AxisAngle4f;this.getAxisAngle(b);a.put("axisAngle",b);a.put("quaternion",J.util.Quaternion.newAA(b).toPoint4f());a.put("rotationMatrix",this.matrixRotate);a.put("rotateZYZ",this.getRotateZyzText(!1));a.put("rotateXYZ",this.getRotateXyzText());a.put("transXPercent",Float.$valueOf(this.getTranslationXPercent()));a.put("transYPercent",
Float.$valueOf(this.getTranslationYPercent()));a.put("zoom",Float.$valueOf(this.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});$_M(c$,"getAxisAngle",function(a){a.setM(this.matrixRotate)},"J.util.AxisAngle4f");$_M(c$,"getTransformText",function(){return this.matrixRotate.toString()});$_M(c$,"getMatrixRotate",function(){return this.matrixRotate});$_M(c$,"setRotation",function(a){Float.isNaN(a.m00)||this.matrixRotate.setM(a)},"J.util.Matrix3f");$_M(c$,"getRotation",function(a){a.setM(this.matrixRotate)},"J.util.Matrix3f");$_M(c$,"zoomBy",function(a){20<a?a=20:-20>a&&(a=-20);var b=a*this.zoomPercentSetting/50;0==
b&&(b=0<a?1:0>b?-1:0);this.zoomRatio=(b+this.zoomPercentSetting)/this.zoomPercentSetting;this.zoomPercentSetting+=b},"~N");$_M(c$,"getZoomPercentFloat",function(){return this.zoomPercent});$_M(c$,"zoomToPercent",function(a){this.zoomPercentSetting=a;this.zoomRatio=0},"~N");$_M(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");$_M(c$,"zoomByFactor0",function(a,b,c){!(0>=a)&&this.zoomEnabled&&(this.zoomRatio=a,this.zoomPercentSetting*=a,this.resetXYCenter(b,c))},"~N,~N,~N");$_M(c$,"resetXYCenter",($fz=function(a,b){if(!(2147483647==a||2147483647==b)){this.windowCentered&&this.viewer.setBooleanProperty("windowCentered",!1);var c=new J.util.P3;this.transformPoint2(this.fixedRotationCenter,c);c.set(a,b,c.z);this.unTransformPoint(c,c);this.fixedTranslation.set(a,b,0);this.setFixedRotationCenter(c)}},
$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"zoomByPercent",function(a){var b=a*this.zoomPercentSetting/100;0==b&&(b=0>a?-1:1);this.zoomRatio=(b+this.zoomPercentSetting)/this.zoomPercentSetting;this.zoomPercentSetting+=b},"~N");$_M(c$,"setScaleAngstromsPerInch",function(a){if(this.scale3D=0<a)this.scale3DAngstromsPerInch=a;this.perspectiveDepth=!this.scale3D},"~N");$_M(c$,"setZslabPoint",function(a){this.zSlabPoint=null==a?null:J.util.P3.newP(a)},"J.util.P3");$_M(c$,"getZShadeStart",function(){return this.zShadeEnabled?
this.zDepthValue:0});$_M(c$,"setSlabRange",function(a){this.slabRange=a},"~N");$_M(c$,"setSlabEnabled",function(a){this.slabEnabled=a;this.viewer.getGlobalSettings().setB("slabEnabled",a)},"~B");$_M(c$,"setZShadeEnabled",function(a){this.zShadeEnabled=a;this.viewer.getGlobalSettings().setB("zShade",a)},"~B");$_M(c$,"setZoomEnabled",function(a){this.zoomEnabled=a;this.viewer.getGlobalSettings().setB("zoomEnabled",a)},"~B");$_M(c$,"slabReset",function(){this.slabToPercent(100);this.depthToPercent(0);
this.slabPlane=this.depthPlane=null;this.setSlabEnabled(!1);this.setZShadeEnabled(!1)});$_M(c$,"getSlabPercentSetting",function(){return this.slabPercentSetting});$_M(c$,"slabByPercentagePoints",function(a){this.slabPlane=null;this.slabPercentSetting+=a;this.slabDepthChanged();this.depthPercentSetting>=this.slabPercentSetting&&(this.depthPercentSetting=this.slabPercentSetting-1)},"~N");$_M(c$,"slabDepthChanged",($fz=function(){this.viewer.getGlobalSettings().setI("slab",this.slabPercentSetting);this.viewer.getGlobalSettings().setI("depth",
this.depthPercentSetting)},$fz.isPrivate=!0,$fz));$_M(c$,"depthByPercentagePoints",function(a){this.depthPlane=null;this.depthPercentSetting+=a;this.slabPercentSetting<=this.depthPercentSetting&&(this.slabPercentSetting=this.depthPercentSetting+1);this.slabDepthChanged()},"~N");$_M(c$,"slabDepthByPercentagePoints",function(a){this.depthPlane=this.slabPlane=null;this.slabPercentSetting+=a;this.depthPercentSetting+=a;this.slabDepthChanged()},"~N");$_M(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");$_M(c$,"depthToPercent",function(a){this.viewer.getGlobalSettings().setI("depth",a);this.depthPercentSetting=a;this.slabPercentSetting<=this.depthPercentSetting&&(this.slabPercentSetting=this.depthPercentSetting+1);this.slabDepthChanged()},"~N");$_M(c$,"zSlabToPercent",function(a){this.zSlabPercentSetting=a;this.zDepthPercentSetting>
this.zSlabPercentSetting&&(this.zDepthPercentSetting=a)},"~N");$_M(c$,"zDepthToPercent",function(a){this.zDepthPercentSetting=a;this.zDepthPercentSetting>this.zSlabPercentSetting&&(this.zSlabPercentSetting=a)},"~N");$_M(c$,"slabInternal",function(a,b){b?(this.depthPlane=a,this.depthPercentSetting=0):(this.slabPlane=a,this.slabPercentSetting=100)},"J.util.P4,~B");$_M(c$,"setSlabDepthInternal",function(a){this.finalizeTransformParameters();a?this.depthPlane=null:this.slabPlane=null;this.slabInternal(this.getSlabDepthPlane(a),
a)},"~B");$_M(c$,"getSlabDepthPlane",function(a){if(a){if(null!=this.depthPlane)return this.depthPlane}else if(null!=this.slabPlane)return this.slabPlane;var b=this.matrixTransform;return J.util.P4.new4(-b.m20,-b.m21,-b.m22,-b.m23+(a?this.depthValue:this.slabValue))},"~B");$_M(c$,"checkInternalSlab",function(a){return null!=this.slabPlane&&0<a.x*this.slabPlane.x+a.y*this.slabPlane.y+a.z*this.slabPlane.z+this.slabPlane.w||null!=this.depthPlane&&0>a.x*this.depthPlane.x+a.y*this.depthPlane.y+a.z*this.depthPlane.z+
this.depthPlane.w},"J.util.P3");$_M(c$,"getCameraFactors",function(){this.aperatureAngle=360*Math.atan2(this.screenPixelCount/2,this.referencePlaneOffset)/3.141592653589793;this.cameraDistanceFromCenter=this.referencePlaneOffset/this.scalePixelsPerAngstrom;var a=J.util.P3.new3(Clazz.doubleToInt(this.screenWidth/2),Clazz.doubleToInt(this.screenHeight/2),this.referencePlaneOffset);this.unTransformPoint(a,a);var b=J.util.P3.new3(Clazz.doubleToInt(this.screenWidth/2),Clazz.doubleToInt(this.screenHeight/
2),0);this.viewer.unTransformPoint(b,b);b.sub(this.fixedRotationCenter);var c=J.util.P3.new3(Clazz.doubleToInt(this.screenWidth/2),Clazz.doubleToInt(this.screenHeight/2),this.cameraDistanceFromCenter*this.scalePixelsPerAngstrom);this.viewer.unTransformPoint(c,c);c.sub(this.fixedRotationCenter);b.add(c);return[a,b,this.fixedRotationCenter,J.util.P3.new3(this.cameraDistanceFromCenter,this.aperatureAngle,this.scalePixelsPerAngstrom)]});$_M(c$,"getFrontPlane",function(){return Clazz.floatToInt(this.cameraDistance)});
$_M(c$,"setPerspectiveDepth",function(a){this.perspectiveDepth!=a&&(this.perspectiveDepth=a,this.resetFitToScreen(!1))},"~B");$_M(c$,"getPerspectiveDepth",function(){return this.perspectiveDepth});$_M(c$,"setCameraDepthPercent",function(a){this.resetNavigationPoint(!0);a=0>a?-a/100:a;0!=a&&(this.cameraDepthSetting=a,this.cameraDepth=NaN)},"~N");$_M(c$,"setVisualRange",function(a){this.visualRange=a},"~N");$_M(c$,"getUnscaledTransformMatrix",function(){var a=new J.util.Matrix4f;a.setIdentity();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});$_M(c$,"setScreenParameters0",($fz=function(a,b,c,d,e,f){2147483647!=a&&(this.screenWidth=a,this.screenHeight=b,this.useZoomLarge=c,this.width=(this.antialias=d)?2*a:a,this.height=d?2*b:b,this.scaleFitToScreen(!1,c,e,f),this.finalizeTransformParameters())},$fz.isPrivate=!0,$fz),"~N,~N,~B,~B,~B,~B");$_M(c$,"setAntialias",function(a){var b=
this.antialias!=a;this.width=(this.antialias=a)?2*this.screenWidth:this.screenWidth;this.height=this.antialias?2*this.screenHeight:this.screenHeight;b&&this.scaleFitToScreen(!1,this.useZoomLarge,!1,!1)},"~B");$_M(c$,"defaultScaleToScreen",function(a){return this.screenPixelCount/2/a},"~N");$_M(c$,"resetFitToScreen",($fz=function(a){this.scaleFitToScreen(a,this.viewer.global.zoomLarge,!0,!0)},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"scaleFitToScreen",function(a,b,c,d){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(),d&&this.resetNavigationPoint(c),this.screenPixelCount=b==this.height>this.width?this.height:this.width);2<this.screenPixelCount&&(this.screenPixelCount-=2);this.scaleDefaultPixelsPerAngstrom=this.defaultScaleToScreen(this.modelRadius)},"~B,~B,~B,~B");$_M(c$,"scaleToScreen",function(a,b){if(0==b||2>a)return 0;var c=this.scaleToPerspective(a,b*this.scalePixelsPerAngstrom/
1E3);return 0<c?c:1},"~N,~N");$_M(c$,"unscaleToScreen",function(a,b){var c=b/this.scalePixelsPerAngstrom;return this.perspectiveDepth?c/this.getPerspectiveFactor(a):c},"~N,~N");$_M(c$,"scaleToPerspective",function(a,b){return this.perspectiveDepth?b*this.getPerspectiveFactor(a):b},"~N,~N");$_M(c$,"getMatrixtransform",function(){return this.matrixTransform});$_M(c$,"setNavigationMode",function(a){this.mode=a&&this.canNavigate()?1:this.defaultMode;this.resetNavigationPoint(!0)},"~B");$_M(c$,"isNavigating",
function(){return this.navigating||this.navOn});$_M(c$,"finalizeTransformParameters",function(){this.haveNotifiedNaN=!1;this.fixedRotationOffset.setT(this.fixedTranslation);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()});
$_M(c$,"getZoomSetting",function(){5>this.zoomPercentSetting&&(this.zoomPercentSetting=5);2E5<this.zoomPercentSetting&&(this.zoomPercentSetting=2E5);return this.zoomEnabled||1==this.mode?this.zoomPercentSetting:100});$_M(c$,"calcSlabAndDepthValues",function(){this.slabValue=1>this.slabRange?this.zValueFromPercent(this.slabPercentSetting):Clazz.doubleToInt(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=Clazz.floatToInt(this.pointT2.z)}catch(a){if(!Clazz.exceptionOf(a,Exception))throw a;}this.viewer.getGlobalSettings().setS("_slabPlane",J.util.Escape.eP4(this.getSlabDepthPlane(!1)));
this.viewer.getGlobalSettings().setS("_depthPlane",J.util.Escape.eP4(this.getSlabDepthPlane(!0)));this.slabEnabled||(this.slabValue=0,this.depthValue=2147483647)});$_M(c$,"zValueFromPercent",function(a){return Clazz.doubleToInt(Math.floor((1-a/50)*this.modelRadiusPixels+this.modelCenterOffset))},"~N");$_M(c$,"calcTransformMatrix",function(){this.matrixTransform.setIdentity();this.vectorTemp.setT(this.fixedRotationCenter);this.vectorTemp.sub(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(Clazz.exceptionOf(a,
Exception))System.out.println("ERROR INVERTING matrixTransform!");else throw a;}});$_M(c$,"rotatePoint",function(a,b){this.matrixRotate.transform2(a,b);b.y=-b.y},"J.util.P3,J.util.P3");$_M(c$,"transformPoints",function(a,b,c){for(;0<=--a;)c[a].setT(this.transformPoint(b[a]))},"~N,~A,~A");$_M(c$,"transformPointScr",function(a,b){b.setT(this.transformPoint(a))},"J.util.P3,J.util.P3i");$_M(c$,"transformPointNoClip2",function(a,b){b.setT(this.transformPointNoClip(a))},"J.util.P3,J.util.P3");$_M(c$,"transformPoint",
function(a){if(3.4028235E38==a.z||-3.4028235E38==a.z)return this.transformScreenPoint(a);this.matrixTransform.transform2(a,this.point3fScreenTemp);this.adjustTemporaryScreenPoint();this.internalSlab&&this.checkInternalSlab(a)&&(this.point3iScreenTemp.z=1);return this.point3iScreenTemp},"J.util.P3");$_M(c$,"transformScreenPoint",($fz=function(a){-3.4028235E38==a.z?(this.point3iScreenTemp.x=Clazz.doubleToInt(Math.floor(a.x/100*this.screenWidth)),this.point3iScreenTemp.y=Clazz.doubleToInt(Math.floor((1-
a.y/100)*this.screenHeight))):(this.point3iScreenTemp.x=Clazz.floatToInt(a.x),this.point3iScreenTemp.y=this.screenHeight-Clazz.floatToInt(a.y));this.antialias&&(this.point3iScreenTemp.x<<=1,this.point3iScreenTemp.y<<=1);this.matrixTransform.transform2(this.fixedRotationCenter,this.pointTsp);this.point3iScreenTemp.z=Clazz.floatToInt(this.pointTsp.z);return this.point3iScreenTemp},$fz.isPrivate=!0,$fz),"J.util.P3");$_M(c$,"transformPointNoClip",function(a){this.matrixTransform.transform2(a,this.point3fScreenTemp);
this.adjustTemporaryScreenPoint();return this.point3fScreenTemp},"J.util.P3");$_M(c$,"transformPointVib",function(a,b){this.point3fVibrationTemp.setT(a);this.vibrationOn&&null!=b&&this.point3fVibrationTemp.scaleAdd2(this.vibrationAmplitude,b,a);this.matrixTransform.transform2(this.point3fVibrationTemp,this.point3fScreenTemp);this.adjustTemporaryScreenPoint();this.internalSlab&&this.checkInternalSlab(a)&&(this.point3iScreenTemp.z=1);return this.point3iScreenTemp},"J.util.P3,J.util.V3");$_M(c$,"transformPoint2",
function(a,b){this.matrixTransform.transform2(a,this.point3fScreenTemp);this.adjustTemporaryScreenPoint();this.internalSlab&&this.checkInternalSlab(a)&&(this.point3fScreenTemp.z=1);b.setT(this.point3fScreenTemp)},"J.util.P3,J.util.P3");$_M(c$,"transformVector",function(a,b){this.matrixTransform.transformV2(a,b)},"J.util.V3,J.util.V3");$_M(c$,"unTransformPoint",function(a,b){this.untransformedPoint.setT(a);switch(this.mode){case 1:this.untransformedPoint.x-=this.navigationOffset.x;this.untransformedPoint.y-=
this.navigationOffset.y;break;case 2:this.untransformedPoint.x-=this.perspectiveOffset.x;this.untransformedPoint.y-=this.perspectiveOffset.y;break;case 0:this.untransformedPoint.x-=this.fixedRotationOffset.x,this.untransformedPoint.y-=this.fixedRotationOffset.y}if(this.perspectiveDepth){var c=this.getPerspectiveFactor(this.untransformedPoint.z);this.untransformedPoint.x/=c;this.untransformedPoint.y/=c}switch(this.mode){case 1:this.untransformedPoint.x+=this.navigationShiftXY.x;this.untransformedPoint.y+=
this.navigationShiftXY.y;break;case 2:this.untransformedPoint.x+=this.perspectiveShiftXY.x,this.untransformedPoint.y+=this.perspectiveShiftXY.y}this.matrixTransformInv.transform2(this.untransformedPoint,b)},"J.util.P3,J.util.P3");$_M(c$,"move",function(a,b,c,d,e,f,g){var h=new J.thread.MoveThread(this,this.viewer);h.set(b,c,d,e,f,g);0<f&&h.setEval(a);h.run()},"J.api.JmolScriptEvaluator,J.util.V3,~N,J.util.V3,~N,~N,~N");$_M(c$,"isInPosition",function(a,b){if(Float.isNaN(b))return!0;this.aaTest1.setVA(a,
b/57.29577951308232);this.ptTest1.set(4.321,1.23456,3.14159);this.getRotation(this.matrixTest);this.matrixTest.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)},"J.util.V3,~N");$_M(c$,"moveTo",function(a,b,c,d,e,f,g,h,k,l,m,n,p,q){if(null==f)if(f=new J.util.Matrix3f,d=J.util.V3.newV(d),Float.isNaN(e))f.m00=NaN;else if(0.01>e&&-0.01<e)f.setIdentity();else{if(0==d.x&&0==d.y&&
0==d.z)return;var r=new J.util.AxisAngle4f;r.setVA(d,e/57.29577951308232);f.setAA(r)}try{null==this.motion&&(this.motion=new J.thread.MoveToThread(this,this.viewer));var s=this.motion.set(b,c,f,g,h,k,l,m,n,p,q);0>=s||this.viewer.global.waitForMoveTo?(0<s&&this.motion.setEval(a),this.motion.run(),this.viewer.isSingleThreaded||(this.motion=null)):this.motion.start()}catch(t){if(!Clazz.exceptionOf(t,Exception))throw t;}},"J.api.JmolScriptEvaluator,~N,J.util.P3,J.util.Tuple3f,~N,J.util.Matrix3f,~N,~N,~N,~N,J.util.P3,~N,~N,~N");
$_M(c$,"stopMotion",function(){this.motion=null});$_M(c$,"getRotationQuaternion",function(){return J.util.Quaternion.newM(this.matrixRotate)});$_M(c$,"getRotationText",function(){this.axisangleT.setM(this.matrixRotate);var a=57.29577951308232*this.axisangleT.angle,b=new J.util.SB;this.vectorT.set(this.axisangleT.x,this.axisangleT.y,this.axisangleT.z);if(0.01>a)return"{0 0 1 0}";this.vectorT.normalize();this.vectorT.scale(1E3);b.append("{");J.viewer.TransformManager.truncate0(b,this.vectorT.x);J.viewer.TransformManager.truncate0(b,
this.vectorT.y);J.viewer.TransformManager.truncate0(b,this.vectorT.z);J.viewer.TransformManager.truncate2(b,a);b.append("}");return b.toString()});$_M(c$,"getMoveToText",function(a,b){var c=new J.util.SB;c.append("moveto ");b&&c.append("/* time, axisAngle */ ");c.appendF(a);c.append(" ").append(this.getRotationText());b&&c.append(" /* zoom, translation */ ");J.viewer.TransformManager.truncate2(c,this.zoomPercentSetting);J.viewer.TransformManager.truncate2(c,this.getTranslationXPercent());J.viewer.TransformManager.truncate2(c,
this.getTranslationYPercent());c.append(" ");b&&c.append(" /* center, rotationRadius */ ");c.append(this.getCenterText());c.append(" ").appendF(this.modelRadius);c.append(this.getNavigationText(b));c.append(";");return c.toString()},"~N,~B");$_M(c$,"getCenterText",($fz=function(){return J.util.Escape.eP(this.fixedRotationCenter)},$fz.isPrivate=!0,$fz));$_M(c$,"getRotateXyzText",($fz=function(){var a=new J.util.SB,b=this.matrixRotate.m20,c=-(57.29577951308232*Math.asin(b)),d;0.999<b||-0.999>b?(b=-(57.29577951308232*
Math.atan2(this.matrixRotate.m12,this.matrixRotate.m11)),d=0):(b=57.29577951308232*Math.atan2(this.matrixRotate.m21,this.matrixRotate.m22),d=57.29577951308232*Math.atan2(this.matrixRotate.m10,this.matrixRotate.m00));a.append("reset");a.append(";center ").append(this.getCenterText());0!=b&&(a.append("; rotate x"),J.viewer.TransformManager.truncate2(a,b));0!=c&&(a.append("; rotate y"),J.viewer.TransformManager.truncate2(a,c));0!=d&&(a.append("; rotate z"),J.viewer.TransformManager.truncate2(a,d));a.append(";");
this.addZoomTranslationNavigationText(a);return a.toString()},$fz.isPrivate=!0,$fz));$_M(c$,"addZoomTranslationNavigationText",($fz=function(a){100!=this.zoomPercent&&(a.append(" zoom"),J.viewer.TransformManager.truncate2(a,this.zoomPercent),a.append(";"));var b=this.getTranslationXPercent();0!=b&&(a.append(" translate x"),J.viewer.TransformManager.truncate2(a,b),a.append(";"));b=this.getTranslationYPercent();0!=b&&(a.append(" translate y"),J.viewer.TransformManager.truncate2(a,b),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(";"))},$fz.isPrivate=!0,$fz),"J.util.SB");$_M(c$,"getRotateZyzText",($fz=function(a){var b=new J.util.SB,c=this.viewer.getModelSetAuxiliaryInfoValue("defaultOrientationMatrix");null==c?c=this.matrixRotate:(c=J.util.Matrix3f.newM(c),c.invert(),c.mul2(this.matrixRotate,c));var d=c.m22,e=57.29577951308232*Math.acos(d);0.999<d||-0.999>d?(d=57.29577951308232*Math.atan2(c.m10,c.m11),c=0):(d=57.29577951308232*Math.atan2(c.m21,-c.m20),c=57.29577951308232*Math.atan2(c.m12,
c.m02));0!=d&&(0!=e&&0!=c&&a)&&b.append("#Follows Z-Y-Z convention for Euler angles\n");b.append("reset");b.append(";center ").append(this.getCenterText());0!=d&&(b.append("; rotate z"),J.viewer.TransformManager.truncate2(b,d));0!=e&&(b.append("; rotate y"),J.viewer.TransformManager.truncate2(b,e));0!=c&&(b.append("; rotate z"),J.viewer.TransformManager.truncate2(b,c));b.append(";");this.addZoomTranslationNavigationText(b);return b.toString()},$fz.isPrivate=!0,$fz),"~B");c$.truncate0=$_M(c$,"truncate0",
($fz=function(a,b){a.appendC(" ");a.appendI(Math.round(b))},$fz.isPrivate=!0,$fz),"J.util.SB,~N");c$.truncate2=$_M(c$,"truncate2",($fz=function(a,b){a.appendC(" ");a.appendF(Math.round(100*b)/100)},$fz.isPrivate=!0,$fz),"J.util.SB,~N");$_M(c$,"setSpinXYZ",function(a,b,c){Float.isNaN(a)||(this.spinX=a);Float.isNaN(b)||(this.spinY=b);Float.isNaN(c)||(this.spinZ=c);(this.isSpinInternal||this.isSpinFixed)&&this.clearSpin()},"~N,~N,~N");$_M(c$,"setSpinFps",function(a){0>=a?a=1:50<a&&(a=50);this.spinFps=
a},"~N");$_M(c$,"setNavXYZ",function(a,b,c){Float.isNaN(a)||(this.navX=a);Float.isNaN(b)||(this.navY=b);Float.isNaN(c)||(this.navZ=c)},"~N,~N,~N");$_M(c$,"clearSpin",($fz=function(){this.setSpinOff();this.setNavOn(!1);this.isSpinFixed=this.isSpinInternal=!1},$fz.isPrivate=!0,$fz));$_M(c$,"getSpinOn",function(){return this.spinOn});$_M(c$,"getNavOn",function(){return this.navOn});$_M(c$,"setSpinOn",function(){this.setSpin(null,!0,3.4028235E38,null,null,!1)});$_M(c$,"setSpinOff",function(){this.setSpin(null,
!1,3.4028235E38,null,null,!1)});$_M(c$,"setSpin",($fz=function(a,b,c,d,e,f){this.navOn&&b&&this.setNavOn(!1);this.spinOn=b;this.viewer.getGlobalSettings().setB("_spinning",b);b?null==this.spinThread&&(this.spinThread=new J.thread.SpinThread(this,this.viewer,c,d,e,!1,f),this.spinThread.setEval(a),null==e?this.spinThread.start():this.spinThread.run()):null!=this.spinThread&&(this.spinThread.reset(),this.spinThread=null)},$fz.isPrivate=!0,$fz),"J.api.JmolScriptEvaluator,~B,~N,J.util.JmolList,J.util.BS,~B");
$_M(c$,"setNavOn",function(a){if(!Float.isNaN(this.navFps)){var b=this.navOn;a&&this.spinOn&&this.setSpin(null,!1,0,null,null,!1);this.navOn=a;this.viewer.getGlobalSettings().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=new J.thread.SpinThread(this,this.viewer,0,null,null,!0,!1),this.spinThread.start())):b&&null!=this.spinThread&&(this.spinThread.interrupt(),this.spinThread=
null)}},"~B");$_M(c$,"setVibrationScale",function(a){this.vibrationScale=a},"~N");$_M(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=Clazz.floatToInt(1E3*this.vibrationPeriod);if(0<a)return;a=-a}this.setVibrationOn(0<a&&this.viewer.modelHasVibrationVectors(this.viewer.getCurrentModelIndex()))},"~N");$_M(c$,"setVibrationT",function(a){this.vibrationRadians=
6.283185307179586*a;0==this.vibrationScale&&(this.vibrationScale=this.viewer.global.vibrationScale);this.vibrationAmplitude=Math.cos(this.vibrationRadians)*this.vibrationScale},"~N");$_M(c$,"isVibrationOn",function(){return this.vibrationOn});$_M(c$,"setVibrationOn",($fz=function(a){a?1>this.viewer.getModelCount()?this.vibrationOn=!1:(null==this.vibrationThread&&(this.vibrationThread=new J.thread.VibrationThread(this,this.viewer),this.vibrationThread.start()),this.vibrationOn=!0):(null!=this.vibrationThread&&
(this.vibrationThread.interrupt(),this.vibrationThread=null),this.vibrationOn=!1)},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"clearVibration",($fz=function(){this.setVibrationOn(!1);this.vibrationScale=0},$fz.isPrivate=!0,$fz));$_M(c$,"setStereoMode2",function(a){this.stereoMode=J.constant.EnumStereoMode.CUSTOM;this.stereoColors=a},"~A");$_M(c$,"setStereoMode",function(a){this.stereoColors=null;this.stereoMode=a},"J.constant.EnumStereoMode");$_M(c$,"setStereoDegrees",function(a){this.stereoDegrees=a;this.stereoRadians=
0.017453292*a},"~N");$_M(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");$_M(c$,"isWindowCentered",function(){return this.windowCentered});$_M(c$,"setWindowCentered",function(a){this.windowCentered=a;this.resetNavigationPoint(!0)},"~B");$_M(c$,"getRotationCenter",function(){return this.fixedRotationCenter});$_M(c$,"getRotationRadius",
function(){return this.modelRadius});$_M(c$,"setRotationRadius",function(a,b){a=this.modelRadius=0>=a?this.viewer.calcRotationRadius(this.fixedRotationCenter):a;b&&this.viewer.setRotationRadius(a,!1);return a},"~N,~B");$_M(c$,"setRotationCenterAndRadiusXYZ",($fz=function(a,b){this.resetNavigationPoint(!1);null==a?(this.setFixedRotationCenter(this.rotationCenterDefault),this.modelRadius=this.rotationRadiusDefault):(this.setFixedRotationCenter(a),b&&this.windowCentered&&(this.modelRadius=this.viewer.calcRotationRadius(this.fixedRotationCenter)))},
$fz.isPrivate=!0,$fz),"J.util.P3,~B");$_M(c$,"setRotCenterRel",($fz=function(a,b){var c=J.util.P3.newP(b);"average"===a?c.add(this.viewer.getAverageAtomPoint()):"boundbox"===a?c.add(this.viewer.getBoundBoxCenter()):"absolute"!==a&&c.setT(this.rotationCenterDefault);this.setRotationCenterAndRadiusXYZ(c,!0)},$fz.isPrivate=!0,$fz),"~S,J.util.P3");$_M(c$,"setNewRotationCenter",function(a,b){null==a&&(a=this.rotationCenterDefault);this.windowCentered?(this.translateToPercent("x",0),this.translateToPercent("y",
0),this.setRotationCenterAndRadiusXYZ(a,!0),b&&this.resetFitToScreen(!0)):this.moveRotationCenter(a,!0)},"J.util.P3,~B");$_M(c$,"moveRotationCenter",function(a,b){this.setRotationCenterAndRadiusXYZ(a,!1);b&&this.setRotationPointXY(this.fixedRotationCenter)},"J.util.P3,~B");$_M(c$,"setCenter",function(){this.setRotationCenterAndRadiusXYZ(this.fixedRotationCenter,!0)});$_M(c$,"setCenterAt",function(a,b){this.setRotCenterRel(a,b);this.resetFitToScreen(!0)},"~S,J.util.P3");$_M(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");$_M(c$,"setFrameOffsets",function(a){this.frameOffsets=a},"~A");$_M(c$,"setSelectedTranslation",function(a,b,c){this.bsSelectedAtoms=a;switch(b){case "X":case "x":this.ptOffset.x+=c;break;case "Y":case "y":this.ptOffset.y+=c;break;case "Z":case "z":this.ptOffset.z+=c}},"J.util.BS,~S,~N");$_M(c$,"setNavFps",function(a){this.navFps=a},"~N");$_M(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;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}});$_M(c$,"calcNavCameraFactors",($fz=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)},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"getPerspectiveFactor",function(a){return 0>=a?this.referencePlaneOffset:this.referencePlaneOffset/a},
"~N");$_M(c$,"adjustTemporaryScreenPoint",function(){var a=this.point3fScreenTemp.z;Float.isNaN(a)?(this.haveNotifiedNaN||J.util.Logger.debug("NaN seen in TransformPoint"),this.haveNotifiedNaN=!0,a=1):0>=a&&(a=1);this.point3fScreenTemp.z=a;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&&
(a=this.getPerspectiveFactor(a),this.point3fScreenTemp.x*=a,this.point3fScreenTemp.y*=a);switch(this.mode){case 1:this.point3fScreenTemp.x+=this.navigationOffset.x;this.point3fScreenTemp.y+=this.navigationOffset.y;break;case 2:this.point3fScreenTemp.x+=this.perspectiveOffset.x;this.point3fScreenTemp.y+=this.perspectiveOffset.y;break;case 0:this.point3fScreenTemp.x+=this.fixedRotationOffset.x,this.point3fScreenTemp.y+=this.fixedRotationOffset.y}Float.isNaN(this.point3fScreenTemp.x)&&!this.haveNotifiedNaN&&
(J.util.Logger.debug("NaN found in transformPoint "),this.haveNotifiedNaN=!0);this.point3iScreenTemp.set(Clazz.floatToInt(this.point3fScreenTemp.x),Clazz.floatToInt(this.point3fScreenTemp.y),Clazz.floatToInt(this.point3fScreenTemp.z))});$_M(c$,"canNavigate",function(){return!0});$_M(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.slabEnabled=1==this.mode),this.zoomFactor=3.4028235E38,this.zoomPercentSetting=this.zoomPercent)},"~B");$_M(c$,"setNavigatePt",function(a){this.navigationCenter.setT(a);this.navMode=3;this.navigating=!0;this.finalizeTransformParameters();this.navigating=!1},"J.util.P3");$_M(c$,"getNavigationCenter",function(){return this.navigationCenter});$_M(c$,"getNavigationDepthPercent",function(){return this.navigationDepth});$_M(c$,"setNavigationSlabOffsetPercent",
function(a){this.viewer.getGlobalSettings().setF("navigationSlab",a);this.calcCameraFactors();this.navigationSlabOffset=a/50*this.modelRadiusPixels},"~N");$_M(c$,"getNavigationOffset",function(){this.transformPoint2(this.navigationCenter,this.navigationOffset);return this.navigationOffset});$_M(c$,"getNavPtHeight",function(){return this.height/2});$_M(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");$_M(c$,"getNavigationText",function(a){this.getNavigationOffset();return(a?" /* navigation center, translation, depth */ ":" ")+J.util.Escape.eP(this.navigationCenter)+" "+this.getNavigationOffsetPercent("X")+" "+this.getNavigationOffsetPercent("Y")+" "+this.getNavigationDepthPercent()},"~B");$_M(c$,"setScreenParameters",function(a,b,c,d,e,f){var g=1==this.mode?J.util.P3.newP(this.navigationCenter):null,h=J.util.P3.newP(this.navigationOffset);
h.x/=this.width;h.y/=this.height;this.setScreenParameters0(a,b,c,d,e,f);null!=g&&(this.navigationCenter.setT(g),this.navTranslatePercentOrTo(-1,h.x*this.width,h.y*this.height),this.setNavigatePt(g))},"~N,~N,~B,~B,~B,~B");$_M(c$,"navInterrupt",($fz=function(){null!=this.nav&&this.nav.interrupt()},$fz.isPrivate=!0,$fz));$_M(c$,"getNav",($fz=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},$fz.isPrivate=!0,$fz));$_M(c$,"navigateList",function(a,b){this.getNav()&&this.nav.navigateList(a,b)},"J.api.JmolScriptEvaluator,J.util.JmolList");$_M(c$,"navigateAxis",function(a,b){this.getNav()&&this.nav.navigateAxis(a,b)},"J.util.V3,~N");$_M(c$,"zoomByFactor",function(a,b,c){1!=this.mode||!this.zoomEnabled||0>=a?this.zoomByFactor0(a,b,c):this.getNav()&&this.nav.zoomByFactor(a,b,c)},"~N,~N,~N");$_M(c$,"setNavigationOffsetRelative",function(){this.getNav()&&this.nav.setNavigationOffsetRelative()});
$_M(c$,"navigateKey",function(a,b){this.getNav()&&this.nav.navigateKey(a,b)},"~N,~N");$_M(c$,"setNavigationDepthPercent",function(a){this.getNav()&&this.nav.setNavigationDepthPercent(a)},"~N");$_M(c$,"navTranslatePercentOrTo",function(a,b,c){this.getNav()&&this.nav.navTranslatePercentOrTo(a,b,c)},"~N,~N,~N");$_M(c$,"calcNavigationPoint",function(){this.getNav()&&this.nav.calcNavigationPoint()});$_M(c$,"getNavigationState",function(){return 1==this.mode&&this.getNav()?this.nav.getNavigationState():
""});Clazz.defineStatics(c$,"twoPI",6.283185307179586,"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_CENTER",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)}),Clazz.declarePackage("J.modelset"),Clazz.load(null,
"J.modelset.ModelSettings",["java.lang.Boolean","$.Float","J.util.BSUtil","$.Escape"],function(){c$=Clazz.decorateAsClass(function(){this.id=0;this.info=this.bsAtoms=null;this.size=-1;this.colors=this.colixes=null;this.translucency=this.argb=0;this.rd=null;Clazz.instantialize(this,arguments)},J.modelset,"ModelSettings");Clazz.makeConstructor(c$,function(a,b,c){this.id=a;this.bsAtoms=b;this.info=c},"~N,J.util.BS,~O");$_M(c$,"offset",function(a,b){if(!(0>=b))if(1073742032==this.id){var c=this.info;
c.put("baseModel",Integer.$valueOf(a));for(var d=c.get("states"),c=d.size();0<=--c;)J.util.BSUtil.offset(d.get(c),0,b)}else if(1060866==this.id){d=this.info;for(c=d.size();0<=--c;)J.util.BSUtil.offset(d.get(c),0,b)}else null!=this.bsAtoms&&J.util.BSUtil.offset(this.bsAtoms,0,b),null!=this.colixes&&(c=Clazz.newShortArray(this.colixes.length+b,0),System.arraycopy(this.colixes,0,c,b,this.colixes.length),this.colixes=c)},"~N,~N");$_M(c$,"createShape",function(a){var b=a.shapeManager,c=this.getModelIndex(a);
switch(this.id){case 1073742032:b.viewer.setMovie(this.info);return;case 4115:var d=this.info.intValue();0<d?b.viewer.setCurrentModelIndex(d+c-1):(b.viewer.setAnimationRange(-1,-1),b.viewer.setCurrentModelIndex(-1));return;case 3145770:b.viewer.displayAtoms(this.bsAtoms,!1,!1,Boolean.TRUE,!0);return;case 1060866:b.viewer.defineAtomSets(this.info);return;case 24:if(0>c)return;b.setShapePropertyBs(0,"colors",this.colors,this.bsAtoms);d=this.info.toString().$replace("'","_").$replace('"',"_");d="script('isosurface ID \""+
d+'"  model '+a.models[c].getModelNumberDotted()+" select ("+J.util.Escape.eBS(this.bsAtoms)+" and not solvent) only solvent "+this.size/1E3+" map property color')";0<this.translucency&&(d+=" translucent "+this.translucency);System.out.println("shapeSettings: "+d);b.viewer.evaluateExpression(d);return;case 5:b.loadShape(this.id);b.setShapePropertyBs(this.id,"labels",this.info,this.bsAtoms);return;case 16:b.loadShape(this.id);b.setShapePropertyBs(this.id,"ignore",J.util.BSUtil.copyInvert(this.bsAtoms,
b.viewer.getAtomCount()),null);break;case 6:if(0>c)return;b.loadShape(this.id);d=this.info;d.setModelSet(a);a=d.points;for(var e=a.size();0<=--e;)a.get(e).modelIndex=c;b.setShapePropertyBs(this.id,"measure",d,this.bsAtoms);-1!=this.size&&b.setShapeSizeBs(this.id,this.size,null,null);return}(-1!=this.size||null!=this.rd)&&b.setShapeSizeBs(this.id,this.size,this.rd,this.bsAtoms);0!=this.argb?b.setShapePropertyBs(this.id,"color",Integer.$valueOf(this.argb),this.bsAtoms):null!=this.colors&&b.setShapePropertyBs(this.id,
"colors",this.colors,this.bsAtoms)},"J.modelset.ModelSet");$_M(c$,"getModelIndex",($fz=function(a){if(null==this.bsAtoms)return-1;var b=this.bsAtoms.nextSetBit(0);return 0>b?-1:a.atoms[b].modelIndex},$fz.isPrivate=!0,$fz),"J.modelset.ModelSet");$_M(c$,"setColors",function(a,b){this.colixes=a;this.colors=[a,Float.$valueOf(b)]},"~A,~N");$_M(c$,"setSize",function(a){this.size=Clazz.floatToInt(1E3*a)},"~N")}),Clazz.declarePackage("J.modelset"),Clazz.load(["java.util.Hashtable","J.util.BS","J.viewer.JC"],
"J.modelset.ModelLoader","java.lang.Boolean $.Float $.NullPointerException java.util.Arrays J.api.Interface J.constant.EnumStructure J.modelset.Chain $.Group $.Model $.ModelSet J.util.ArrayUtil $.BSUtil $.Elements $.JmolList $.JmolMolecule $.Logger $.P3 $.SB $.TextFormat $.V3".split(" "),function(){c$=Clazz.decorateAsClass(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.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="\x00";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.noAutoBond=!1;this.structuresDefinedInFile=this.bsAssigned=this.vStereo=this.$mergeGroups=null;Clazz.instantialize(this,arguments)},J.modelset,"ModelLoader");Clazz.prepareFields(c$,function(){this.specialAtomIndexes=Clazz.newIntArray(J.viewer.JC.ATOMID_MAX,0);this.htAtomMap=new java.util.Hashtable;this.structuresDefinedInFile=new J.util.BS});Clazz.makeConstructor(c$,
function(a,b,c,d,e,f){this.viewer=a;this.modelSet=new J.modelset.ModelSet(a,b);var g=a.getModelAdapter();this.mergeModelSet=e;(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.global.showTiming;null==f?(this.initializeInfo(b,null),this.createModelSet(null,null,null),a.setStringProperty("_fileType","")):(this.modelSet.preserveState||(this.modelSet.canSkipLoad=
!1),a=g.getAtomSetCollectionAuxiliaryInfo(d),a.put("loadScript",c),this.initializeInfo(g.getFileTypeName(d).toLowerCase().intern(),a),this.createModelSet(g,d,f))},"J.viewer.Viewer,~S,J.util.SB,~O,J.modelset.ModelSet,J.util.BS");$_M(c$,"initializeInfo",($fz=function(a,b){this.modelSet.g3d=this.viewer.getGraphicsData();this.modelSet.modelSetTypeName=a;this.modelSet.isXYZ="xyz"===a;this.modelSet.modelSetAuxiliaryInfo=b;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.modelSet)}catch(c){if(Clazz.exceptionOf(c,Exception))J.util.Logger.error("developer error: J.modelsetbio.Resolver could not be found");else throw c;}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.viewer.getBooleanProperty("pdbAddHydrogens");null!=b&&(b.remove("pdbNoHydrogens"),b.remove("trajectorySteps"),this.isTrajectory&&(this.modelSet.vibrationSteps=
b.remove("vibrationSteps")));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.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)))},$fz.isPrivate=!0,$fz),"~S,java.util.Map");$_M(c$,"getGroup3",function(a){return a>=this.group3Of.length?null:this.group3Of[a]},"~N");$_M(c$,"getFirstAtomIndex",function(a){return this.firstAtomIndexes[a]},
"~N");$_M(c$,"getModelSet",function(){return this.modelSet});$_M(c$,"getAtomCount",function(){return this.modelSet.atomCount});$_M(c$,"createModelSet",($fz=function(a,b,c){var d=null==a?0:a.getAtomCount(b);0<d&&J.util.Logger.info("reading "+d+" atoms");this.adapterModelCount=null==a?1:a.getAtomSetCount(b);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=
Clazz.newIntArray(32,0);this.firstAtomIndexes=Clazz.newIntArray(32,0);this.currentChainID="\uffff";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 J.util.JmolList;for(var e=this.mergeModelSet.trajectorySteps.size();0<=--e;)this.mergeModelSet.vibrationSteps.addLast(null)}for(e=0;e<this.modelSet.trajectorySteps.size();e++)this.mergeModelSet.trajectorySteps.addLast(this.modelSet.trajectorySteps.get(e)),this.mergeModelSet.vibrationSteps.addLast(null==this.modelSet.vibrationSteps?null:this.modelSet.vibrationSteps.get(e))}this.modelSet.trajectorySteps=this.mergeModelSet.trajectorySteps;this.modelSet.vibrationSteps=this.mergeModelSet.vibrationSteps}this.initializeAtomBondModelCounts(d);
null!=c&&(this.doMinimize||this.is2D)&&c.setBits(this.baseAtomIndex,this.baseAtomIndex+d);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.')),
e=this.modelSet.getModelSetAuxiliaryInfoValue("defaultOrientationQuaternion"),null!=e&&(J.util.Logger.info("defaultOrientationQuaternion = "+e),J.util.Logger.info('Use "set autoLoadOrientation TRUE" before loading or "restore orientation DEFAULT" after loading to view this orientation.')),this.iterateOverAllNewModels(a,b),this.iterateOverAllNewAtoms(a,b),this.iterateOverAllNewBonds(a,b),this.merging&&!this.appendNew&&(e=a.getAtomSetAuxiliaryInfo(b,0),this.modelSet.setModelAuxiliaryInfo(this.baseModelIndex,
"initialAtomCount",e.get("initialAtomCount")),this.modelSet.setModelAuxiliaryInfo(this.baseModelIndex,"initialBondCount",e.get("initialBondCount"))),this.initializeUnitCellAndSymmetry(),this.initializeBonding());this.finalizeGroupBuild();this.is2D&&this.applyStereochemistry();this.doAddHydrogens&&this.jbr.finalizeHydrogens();null!=a&&(this.modelSet.calculatePolymers(this.groups,this.groupCount,this.baseGroupIndex,null),this.iterateOverAllNewStructures(a,b));this.setDefaultRendering(this.viewer.getInt(553648170));
var f=this.viewer.getDefaultRadiusData();c=this.modelSet.atomCount;d=this.modelSet.atoms;for(e=this.baseAtomIndex;e<c;e++)d[e].setMadAtom(this.viewer,f);f=this.modelSet.models;for(e=f[this.baseModelIndex].firstAtomIndex;e<c;e++)f[d[e].modelIndex].bsAtoms.set(e);this.setAtomProperties();this.freeze();this.finalizeShapes();null!=a&&a.finish(b,this.modelSet,this.baseModelIndex,this.baseAtomIndex);null!=this.mergeModelSet&&this.mergeModelSet.releaseModelSet();this.mergeModelSet=null},$fz.isPrivate=!0,
$fz),"J.api.JmolAdapter,~O,J.util.BS");$_M(c$,"setDefaultRendering",($fz=function(a){if(!this.isPyMOLsession){for(var b=new J.util.SB,c=this.modelSet.modelCount,d=this.modelSet.models,e=this.baseModelIndex;e<c;e++)d[e].isBioModel&&d[e].getDefaultLargePDBRendering(b,a);0!=b.length()&&(b.append("select *;"),a=this.modelSet.getModelSetAuxiliaryInfoValue("jmolscript"),null==a&&(a=""),b.append(a),this.modelSet.modelSetAuxiliaryInfo.put("jmolscript",b.toString()))}},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"setAtomProperties",
($fz=function(){for(var a=this.modelSet.modelCount,b=this.modelSet.models,c=this.baseModelIndex;c<a;c++){b[c].bsAtoms.cardinality();var d=this.modelSet.getModelAuxiliaryInfoValue(c,"atomProperties");if(null!=d)for(var e,d=d.entrySet().iterator();d.hasNext()&&((e=d.next())||1);){var f=e.getKey(),g=e.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)],this.modelSet.atomCount,0,0,2147483647,0)}}},$fz.isPrivate=!0,$fz));$_M(c$,"initializeAtomBondModelCounts",($fz=function(a){var b=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(this,this.modelSet.bondCount);1<b&&(this.modelSet.modelCount+=b-1);this.modelSet.models=J.util.ArrayUtil.arrayCopyObject(this.modelSet.models,this.modelSet.modelCount);this.modelSet.modelFileNumbers=J.util.ArrayUtil.arrayCopyI(this.modelSet.modelFileNumbers,this.modelSet.modelCount);this.modelSet.modelNumbers=J.util.ArrayUtil.arrayCopyI(this.modelSet.modelNumbers,this.modelSet.modelCount);this.modelSet.modelNumbersForAtomLabel=
J.util.ArrayUtil.arrayCopyS(this.modelSet.modelNumbersForAtomLabel,this.modelSet.modelCount);this.modelSet.modelNames=J.util.ArrayUtil.arrayCopyS(this.modelSet.modelNames,this.modelSet.modelCount);this.modelSet.frameTitles=J.util.ArrayUtil.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},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"mergeGroups",($fz=function(){var a=
this.mergeModelSet.getAuxiliaryInfo(null),b=a.get("group3Lists"),a=a.get("group3Counts");if(null!=b){for(var c=0;c<this.baseModelCount;c++)this.group3Lists[c+1]=b[c+1],this.group3Counts[c+1]=a[c+1],this.structuresDefinedInFile.set(c);this.group3Lists[0]=b[0];this.group3Counts[0]=a[0]}!this.appendNew&&this.isPDB&&this.structuresDefinedInFile.clear(this.baseModelIndex)},$fz.isPrivate=!0,$fz));$_M(c$,"iterateOverAllNewModels",($fz=function(a,b){this.group3Lists=Array(this.modelSet.modelCount+1);this.group3Counts=
J.util.ArrayUtil.newInt2(this.modelSet.modelCount+1);this.structuresDefinedInFile=new J.util.BS;this.merging&&this.mergeGroups();for(var c=this.isTrajectory?this.baseTrajectoryCount:-1,d=this.baseModelIndex,e=0;e<this.adapterModelCount;++e,++d){var f=a.getAtomSetNumber(b,e),g=a.getAtomSetName(b,e),h=a.getAtomSetAuxiliaryInfo(b,e);h.containsKey("modelID")&&h.put("modelID0",h.get("modelID"));var k=h.get("modelProperties");this.viewer.setStringProperty("_fileType",h.get("fileType"));null==g&&(g=null!=
this.jmolData&&2<this.jmolData.indexOf(";")?this.jmolData.substring(this.jmolData.indexOf(":")+2,this.jmolData.indexOf(";")):this.appendNew?""+f%1E6:"");this.setModelNameNumberProperties(d,c,g,f,k,h,this.jmolData)&&(this.group3Lists[d+1]=J.viewer.JC.getGroup3List(),this.group3Counts[d+1]=Clazz.newIntArray(J.viewer.JC.getGroup3Count()+10,0),null==this.group3Lists[0]&&(this.group3Lists[0]=J.viewer.JC.getGroup3List(),this.group3Counts[0]=Clazz.newIntArray(J.viewer.JC.getGroup3Count()+10,0)));null!=this.modelSet.getModelAuxiliaryInfoValue(d,
"periodicOriginXyz")&&(this.modelSet.someModelsHaveSymmetry=!0)}c=this.modelSet.models[this.baseModelIndex];this.viewer.setSmilesString(this.modelSet.modelSetAuxiliaryInfo.get("smilesString"));e=this.modelSet.modelSetAuxiliaryInfo.remove("loadState");f=this.modelSet.modelSetAuxiliaryInfo.remove("loadScript");if(0>f.indexOf("Viewer.AddHydrogens")||!c.isModelKit){g=J.util.TextFormat.split(e,"\n");h=new J.util.SB;for(e=0;e<g.length;e++)k=c.loadState.indexOf(g[e]),(0>k||k!=c.loadState.lastIndexOf(g[e]))&&
h.append(g[e]).appendC("\n");c.loadState+=c.loadScript.toString()+h.toString();c.loadScript=new J.util.SB;c.loadScript.append("  ").appendSB(f).append(";\n")}if(this.isTrajectory){e=this.modelSet.modelCount-d+1;J.util.Logger.info(e+" trajectory steps read");this.modelSet.setModelAuxiliaryInfo(this.baseModelCount,"trajectoryStepCount",Integer.$valueOf(e));c=this.adapterModelCount;for(e=d;e<this.modelSet.modelCount;e++,c++)this.modelSet.models[e]=this.modelSet.models[this.baseModelCount],this.modelSet.modelNumbers[e]=
a.getAtomSetNumber(b,c),this.modelSet.modelNames[e]=a.getAtomSetName(b,c),this.structuresDefinedInFile.set(e)}this.finalizeModels(this.baseModelCount)},$fz.isPrivate=!0,$fz),"J.api.JmolAdapter,~O");$_M(c$,"setModelNameNumberProperties",($fz=function(a,b,c,d,e,f,g){var h=null!=f&&Boolean.TRUE===f.get("isPDB");this.appendNew?(this.modelSet.models[a]=h?this.jbr.getBioModel(this.modelSet,a,b,g,e,f):new J.modelset.Model(this.modelSet,a,b,g,e,f),this.modelSet.modelNumbers[a]=d,this.modelSet.modelNames[a]=
c):(b=f.get("PDB_CONECT_firstAtom_count_max"),null!=b&&this.modelSet.setModelAuxiliaryInfo(a,"PDB_CONECT_firstAtom_count_max",b));b=this.modelSet.models;d=this.modelSet.atoms;b[a].bsAtoms.set(d.length+1);b[a].bsAtoms.clear(d.length+1);d=this.modelSet.getModelAuxiliaryInfoValue(a,"altLocs");b[a].setNAltLocs(null==d?0:d.length);null!=d&&(d=d.toCharArray(),java.util.Arrays.sort(d),d=String.valueOf(d),this.modelSet.setModelAuxiliaryInfo(a,"altLocs",d));d=this.modelSet.getModelAuxiliaryInfoValue(a,"insertionCodes");
b[a].setNInsertions(null==d?0:d.length);c=null!=this.modelSet.modelSetName&&this.modelSet.modelSetName.startsWith("Jmol Model Kit")||c.startsWith("Jmol Model Kit")||"Jme".equals(this.modelSet.getModelAuxiliaryInfoValue(a,"fileType"));b[a].isModelKit=c;return h},$fz.isPrivate=!0,$fz),"~N,~N,~S,~N,java.util.Properties,java.util.Map,~S");$_M(c$,"finalizeModels",($fz=function(a){var b=this.modelSet.modelCount;if(b!=a){var c,d=0,e=-1,f=this.modelSet.modelNumbers,g=this.modelSet.modelNames;if(this.isTrajectory)for(var h=
a;++h<this.modelSet.modelCount;)f[h]=f[h-1]+1;if(0<a){if(1E6>f[0])for(h=0;h<a;h++)0==g[h].length&&(g[h]=""+f[h]),f[h]+=1E6,this.modelSet.modelNumbersForAtomLabel[h]="1."+(h+1);var k=f[a-1],k=k-k%1E6;1E6>f[a]&&(k+=1E6);for(h=a;h<b;h++)f[h]+=k}for(var l=this.modelSet.models,h=a;h<b;++h)if(null!=this.fileHeader&&this.modelSet.setModelAuxiliaryInfo(h,"fileHeader",this.fileHeader),k=Clazz.doubleToInt(f[h]/1E6),k!=e&&(d=0,e=k),d++,0==k?(c=""+this.modelSet.getModelNumber(h),k=1):c=k+"."+d,this.modelSet.modelNumbersForAtomLabel[h]=
c,l[h].fileIndex=k-1,this.modelSet.modelFileNumbers[h]=1E6*k+d,null==g[h]||0==g[h].length)g[h]=c;if(this.merging)for(h=0;h<a;h++)l[h].modelSet=this.modelSet;for(h=0;h<b;h++)this.modelSet.setModelAuxiliaryInfo(h,"modelName",g[h]),this.modelSet.setModelAuxiliaryInfo(h,"modelNumber",Integer.$valueOf(f[h]%1E6)),this.modelSet.setModelAuxiliaryInfo(h,"modelFileNumber",Integer.$valueOf(this.modelSet.modelFileNumbers[h])),this.modelSet.setModelAuxiliaryInfo(h,"modelNumberDotted",this.modelSet.getModelNumberDotted(h)),
a=this.modelSet.getModelAuxiliaryInfoValue(h,"altLocs"),null!=a&&J.util.Logger.info("model "+this.modelSet.getModelNumberDotted(h)+" alternative locations: "+a)}},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"iterateOverAllNewAtoms",($fz=function(a,b){var c=-1,d=!1,e=!1,f=a.getAtomIterator(b),g=0,h=this.modelSet.models;0<this.modelSet.modelCount&&(this.nullGroup=(new J.modelset.Group).setGroup(new J.modelset.Chain(this.modelSet.models[this.baseModelIndex]," "),"",0,-1,-1));for(;f.hasNext();){g++;var k=f.getAtomSetIndex()+
this.baseModelIndex;k!=c&&(this.currentModelIndex=k,this.currentModel=h[k],this.currentChainID="\uffff",h[k].bsAtoms.clearAll(),d=h[k].isBioModel,c=k,e=d&&this.doAddHydrogens,null!=this.jbr&&this.jbr.setHaveHsAlready(!1));k=f.getGroup3();this.checkNewGroup(a,f.getChainID(),k,f.getSequenceNumber(),f.getInsertionCode(),e);var l=f.getElementNumber();e&&1==J.util.Elements.getElementNumber(l)&&this.jbr.setHaveHsAlready(!0);var m=f.getAtomName(),n=e?this.getPdbCharge(k,m):f.getFormalCharge();this.addAtom(d,
f.getAtomSymmetry(),f.getAtomSite(),f.getUniqueID(),l,m,n,f.getPartialCharge(),f.getEllipsoid(),f.getOccupancy(),f.getBfactor(),f.getX(),f.getY(),f.getZ(),f.getIsHetero(),f.getAtomSerial(),k,f.getVectorX(),f.getVectorY(),f.getVectorZ(),f.getAlternateLocationID(),f.getRadius())}0<this.groupCount&&e&&this.jbr.addImplicitHydrogenAtoms(a,this.groupCount-1);c=-1;d=null;e=this.modelSet.atoms;for(f=0;f<this.modelSet.atomCount;f++)e[f].modelIndex!=c&&(c=e[f].modelIndex,h[c].firstAtomIndex=f,k=this.modelSet.getDefaultVdwType(c),
k!==d&&(J.util.Logger.info("Default Van der Waals type for model set to "+k.getVdwLabel()),d=k));J.util.Logger.info(g+" atoms created")},$fz.isPrivate=!0,$fz),"J.api.JmolAdapter,~O");$_M(c$,"getPdbCharge",($fz=function(a,b){return a.equals("ARG")&&b.equals("NH1")||a.equals("LYS")&&b.equals("NZ")||a.equals("HIS")&&b.equals("ND1")?1:0},$fz.isPrivate=!0,$fz),"~S,~S");$_M(c$,"addAtom",($fz=function(a,b,c,d,e,f,g,h,k,l,m,n,p,q,r,s,t,u,v,w,z,B){var x=0;null!=f&&(a&&0<=f.indexOf("*")&&(f=f.$replace("*",
"'")),x=J.viewer.JC.lookupSpecialAtomID(f),a&&(2==x&&"CA".equalsIgnoreCase(t))&&(x=0));a=this.modelSet.addAtom(this.currentModelIndex,this.nullGroup,e,f,s,c,n,p,q,B,u,v,w,g,h,l,m,k,r,x,b);a.setAltLoc(z);this.htAtomMap.put(d,a)},$fz.isPrivate=!0,$fz),"~B,J.util.BS,~N,~O,~N,~S,~N,~N,~A,~N,~N,~N,~N,~N,~B,~N,~S,~N,~N,~N,~S,~N");$_M(c$,"checkNewGroup",($fz=function(a,b,c,d,e,f){var g=null==c?null:c.intern();b!=this.currentChainID&&(this.currentChainID=b,this.currentChain=this.getOrAllocateChain(this.currentModel,
b),this.currentGroupInsertionCode="\uffff",this.currentGroupSequenceNumber=-1,this.currentGroup3="xxxx");if(d!=this.currentGroupSequenceNumber||e!=this.currentGroupInsertionCode||g!==this.currentGroup3){0<this.groupCount&&f&&(this.jbr.addImplicitHydrogenAtoms(a,this.groupCount-1),this.jbr.setHaveHsAlready(!1));this.currentGroupSequenceNumber=d;this.currentGroupInsertionCode=e;for(this.currentGroup3=g;this.groupCount>=this.group3Of.length;)this.chainOf=J.util.ArrayUtil.doubleLength(this.chainOf),this.group3Of=
J.util.ArrayUtil.doubleLengthS(this.group3Of),this.seqcodes=J.util.ArrayUtil.doubleLengthI(this.seqcodes),this.firstAtomIndexes=J.util.ArrayUtil.doubleLengthI(this.firstAtomIndexes);this.firstAtomIndexes[this.groupCount]=this.modelSet.atomCount;this.chainOf[this.groupCount]=this.currentChain;this.group3Of[this.groupCount]=c;this.seqcodes[this.groupCount]=J.modelset.Group.getSeqcodeFor(d,e);++this.groupCount}},$fz.isPrivate=!0,$fz),"J.api.JmolAdapter,~S,~S,~N,~S,~B");$_M(c$,"getOrAllocateChain",($fz=
function(a,b){var c=a.getChain(b);if(null!=c)return c;a.chainCount==a.chains.length&&(a.chains=J.util.ArrayUtil.doubleLength(a.chains));return a.chains[a.chainCount++]=new J.modelset.Chain(a,b)},$fz.isPrivate=!0,$fz),"J.modelset.Model,~S");$_M(c$,"iterateOverAllNewBonds",($fz=function(a,b){var c=a.getBondIterator(b);if(null!=c){var d=this.viewer.getMadBond(),e;this.modelSet.defaultCovalentMad=null==this.jmolData?d:0;for(var f=!1;c.hasNext();){e=c.getEncodedOrder();var g=this.bondAtoms(c.getAtomUniqueID1(),
c.getAtomUniqueID2(),e);null!=g&&(1<e&&(1025!=e&&1041!=e)&&(f=!0),e=c.getRadius(),0<e&&g.setMad(Clazz.floatToShort(2E3*e)),e=c.getColix(),0<=e&&g.setColix(e))}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=d}},$fz.isPrivate=!0,$fz),"J.api.JmolAdapter,~O");$_M(c$,"bondAtoms",($fz=function(a,b,c){var d=
this.htAtomMap.get(a);if(null==d)return J.util.Logger.error("bondAtoms cannot find atomUid1?:"+a),null;a=this.htAtomMap.get(b);if(null==a)return J.util.Logger.error("bondAtoms cannot find atomUid2?:"+b),null;if(d.isBonded(a))return null;1025==c||1041==c?(b=this.modelSet.bondMutually(d,a,this.is2D?c:1,this.modelSet.getDefaultMadFromOrder(1),0),null==this.vStereo&&(this.vStereo=new J.util.JmolList),this.vStereo.addLast(b)):(b=this.modelSet.bondMutually(d,a,c,this.modelSet.getDefaultMadFromOrder(c),
0),b.isAromatic()&&(this.modelSet.someModelsHaveAromaticBonds=!0));this.modelSet.bondCount==this.modelSet.bonds.length&&(this.modelSet.bonds=J.util.ArrayUtil.arrayCopyObject(this.modelSet.bonds,this.modelSet.bondCount+250));this.modelSet.setBond(this.modelSet.bondCount++,b);return b},$fz.isPrivate=!0,$fz),"~O,~O,~N");$_M(c$,"iterateOverAllNewStructures",($fz=function(a,b){var c=a.getStructureIterator(b);if(null!=c){var d=c.getStructuredModels();if(null!=d)for(var e=d.nextSetBit(0);0<=e;e=d.nextSetBit(e+
1))this.structuresDefinedInFile.set(this.baseModelIndex+e);for(;c.hasNext();)c.getStructureType()!==J.constant.EnumStructure.TURN&&this.setStructure(c);for(c=a.getStructureIterator(b);c.hasNext();)c.getStructureType()===J.constant.EnumStructure.TURN&&this.setStructure(c)}},$fz.isPrivate=!0,$fz),"J.api.JmolAdapter,~O");$_M(c$,"setStructure",($fz=function(a){var b=a.getModelIndex(),c=a.getSubstructureType(),d=a.getStructureID(),e=a.getSerialID(),f=a.getStrandCount(),g=a.getStartIndex()+this.baseAtomIndex,
h=a.getEndIndex()+this.baseAtomIndex;null==this.bsAssigned&&(this.bsAssigned=new J.util.BS);a.getSerialID();this.defineStructure(b,c,d,e,f,a.getStartChainID(),a.getStartSequenceNumber(),a.getStartInsertionCode(),a.getEndChainID(),a.getEndSequenceNumber(),a.getEndInsertionCode(),g,h,this.bsAssigned)},$fz.isPrivate=!0,$fz),"J.api.JmolAdapterStructureIterator");$_M(c$,"defineStructure",($fz=function(a,b,c,d,e,f,g,h,k,l,m,n,p,q){b=b===J.constant.EnumStructure.NOT?J.constant.EnumStructure.NONE:b;g=J.modelset.Group.getSeqcodeFor(g,
h);l=J.modelset.Group.getSeqcodeFor(l,m);m=this.modelSet.models;if(0<=a||this.isTrajectory)this.isTrajectory&&(a=0),a+=this.baseModelIndex,this.structuresDefinedInFile.set(a),m[a].addSecondaryStructure(b,c,d,e,f,g,k,l,n,p,q);else for(a=this.baseModelIndex;a<this.modelSet.modelCount;a++)this.structuresDefinedInFile.set(a),m[a].addSecondaryStructure(b,c,d,e,f,g,k,l,n,p,q)},$fz.isPrivate=!0,$fz),"~N,J.constant.EnumStructure,~S,~N,~N,~S,~N,~S,~S,~N,~S,~N,~N,J.util.BS");$_M(c$,"initializeUnitCellAndSymmetry",
($fz=function(){if(this.someModelsHaveUnitcells){this.modelSet.unitCells=Array(this.modelSet.modelCount);this.modelSet.haveUnitCells=!0;for(var a=null!=this.mergeModelSet&&null!=this.mergeModelSet.unitCells,b=0;b<this.modelSet.modelCount;b++)a&&b<this.baseModelCount?this.modelSet.unitCells[b]=this.mergeModelSet.unitCells[b]:(this.modelSet.unitCells[b]=J.api.Interface.getOptionInterface("symmetry.Symmetry"),this.modelSet.unitCells[b].setSymmetryInfo(b,this.modelSet.getModelAuxiliaryInfo(b)))}if(this.appendNew&&
this.modelSet.someModelsHaveSymmetry){this.modelSet.getAtomBits(1089470478,null);for(var a=this.modelSet.atoms,b=this.baseAtomIndex,c=-1,d=0;b<this.modelSet.atomCount;b++)a[b].modelIndex!=c&&(c=a[b].modelIndex,d=this.baseAtomIndex+this.modelSet.getModelAuxiliaryInfoInt(c,"presymmetryAtomIndex")+this.modelSet.getModelAuxiliaryInfoInt(c,"presymmetryAtomCount")),b>=d&&this.modelSet.bsSymmetry.set(b)}if(this.appendNew&&this.modelSet.someModelsHaveFractionalCoordinates){a=this.modelSet.atoms;d=-1;c=null;
for(b=this.baseAtomIndex;b<this.modelSet.atomCount;b++)a[b].modelIndex!=d&&(d=a[b].modelIndex,c=this.modelSet.getUnitCell(d)),null!=c&&c.getCoordinatesAreFractional()&&c.toCartesian(c.toSupercell(a[b]),!1);for(a=this.baseModelIndex;a<this.modelSet.modelCount;a++)if(this.modelSet.isTrajectory(a)&&(c=this.modelSet.getUnitCell(a),null!=c&&c.getCoordinatesAreFractional()&&c.isSupercell())){d=this.modelSet.trajectorySteps.get(a);for(b=d.length;0<=--b;)null!=d[b]&&c.toSupercell(d[b])}}},$fz.isPrivate=!0,
$fz));$_M(c$,"initializeBonding",($fz=function(){var a=null==this.modelSet.getModelSetAuxiliaryInfoValue("someModelsHaveCONECT")?null:new J.util.BS;null!=a&&this.modelSet.setPdbConectBonding(this.baseAtomIndex,this.baseModelIndex,a);var b=0,c=this.viewer.getBoolean(603979794),d=this.viewer.getBoolean(603979798),e=this.viewer.getBoolean(603979846),f=null,g=!1,h=this.modelSet.modelCount,k=this.modelSet.models;if(!this.noAutoBond)for(var l=this.baseModelIndex;l<h;l++){var b=k[l].bsAtoms.cardinality(),
m=this.modelSet.getModelAuxiliaryInfoInt(l,"initialBondCount"),n=k[l].isBioModel;0>m&&(m=this.modelSet.bondCount);var p=this.modelSet.getModelAuxiliaryInfoBoolean(l,"hasSymmetry");if(e||d&&(0==m||n&&null==this.jmolData&&(this.modelSet.getModelSetAuxiliaryInfoBoolean("havePDBHeaderName")||m<Clazz.doubleToInt(b/2))||p&&!c&&!this.modelSet.getModelAuxiliaryInfoBoolean(l,"hasBonds")))if(g=!0,this.merging||1<h)null==f&&(f=J.util.BSUtil.newBitSet(this.modelSet.atomCount)),(l==this.baseModelIndex||!this.isTrajectory)&&
f.or(k[l].bsAtoms)}g?(this.modelSet.autoBondBs4(f,f,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"))},$fz.isPrivate=!0,$fz));$_M(c$,"finalizeGroupBuild",($fz=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]=Clazz.newIntArray(0,0))}},$fz.isPrivate=!0,$fz));$_M(c$,"distinguishAndPropagateGroup",($fz=function(a,b,c,d,e,f){var g=f-1;if(g<e)throw new NullPointerException;var h=this.modelSet.atoms[e].modelIndex,k=null;null!=c&&null!=this.jbr&&(k=this.jbr.distinguishAndPropagateGroup(b,c,d,e,f,h,this.specialAtomIndexes,this.modelSet.atoms));null==k?(k=(new J.modelset.Group).setGroup(b,c,d,e,g),d="o>"):
d=k.isProtein()?"p>":k.isNucleic()?"n>":k.isCarbohydrate()?"c>":"o>";null!=c&&this.countGroup(h,d,c);this.addGroup(b,k);this.groups[a]=k;k.setGroupIndex(a);for(a=f;--a>=e;)this.modelSet.atoms[a].setGroup(k)},$fz.isPrivate=!0,$fz),"~N,J.modelset.Chain,~S,~N,~N,~N");$_M(c$,"addGroup",($fz=function(a,b){a.groupCount==a.groups.length&&(a.groups=J.util.ArrayUtil.doubleLength(a.groups));a.groups[a.groupCount++]=b},$fz.isPrivate=!0,$fz),"J.modelset.Chain,J.modelset.Group");$_M(c$,"countGroup",($fz=function(a,
b,c){var d=a+1;if(!(null==this.group3Lists||null==this.group3Lists[d])){var e=(c+"   ").substring(0,3),f=this.group3Lists[d].indexOf(e);0>f&&(this.group3Lists[d]+=",["+e+"]",f=this.group3Lists[d].indexOf(e),this.group3Counts[d]=J.util.ArrayUtil.arrayCopyI(this.group3Counts[d],this.group3Counts[d].length+10));this.group3Counts[d][Clazz.doubleToInt(f/6)]++;f=this.group3Lists[d].indexOf(",["+e);0<=f&&(this.group3Lists[d]=this.group3Lists[d].substring(0,f)+b+this.group3Lists[d].substring(f+2));0<=a&&
this.countGroup(-1,b,c)}},$fz.isPrivate=!0,$fz),"~N,~S,~S");$_M(c$,"freeze",($fz=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=J.util.ArrayUtil.arrayCopyObject(this.modelSet.bonds,this.modelSet.bondCount));for(var a=5;0<--a;){this.modelSet.numCached[a]=0;for(var b=this.modelSet.freeBonds[a],c=b.length;0<=--c;)b[c]=null}this.modelSet.setAtomNamesAndNumbers(0,
this.baseAtomIndex,this.mergeModelSet);this.findElementsPresent();this.modelSet.resetMolecules();this.currentChain=this.currentModel=null;this.isPDB?(a=this.viewer.getBoolean(603979825),a=this.modelSet.calculateStructuresAllExcept(this.structuresDefinedInFile,a,!1,!0,!0,a),0<a.length&&J.util.Logger.info(a)):this.modelSet.freezeModels()},$fz.isPrivate=!0,$fz));$_M(c$,"findElementsPresent",($fz=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 b=this.modelSet.atoms[a].getAtomicAndIsotopeNumber();b>=J.util.Elements.elementNumberMax&&(b=J.util.Elements.elementNumberMax+J.util.Elements.altElementIndexFromNumber(b));this.modelSet.elementsPresent[this.modelSet.atoms[a].modelIndex].set(b)}},$fz.isPrivate=!0,$fz));$_M(c$,"applyStereochemistry",($fz=function(){this.set2dZ(this.baseAtomIndex,this.modelSet.atomCount);if(null!=this.vStereo){var a=new J.util.BS;a.setBits(this.baseAtomIndex,
this.modelSet.atomCount);for(var b=this.vStereo.size();0<=--b;){var c=this.vStereo.get(b),d=1025==c.order?3:-3;c.order=1;c.atom2.z!=c.atom1.z&&0>d==c.atom2.z<c.atom1.z&&(d/=3);var e=J.util.JmolMolecule.getBranchBitSet(this.modelSet.atoms,c.atom2.index,a,null,c.atom1.index,!1,!0);e.set(c.atom2.index);for(var f=e.nextSetBit(0);0<=f;f=e.nextSetBit(f+1))this.modelSet.atoms[f].z+=d;c.atom2.x=(c.atom1.x+c.atom2.x)/2;c.atom2.y=(c.atom1.y+c.atom2.y)/2}this.vStereo=null}this.is2D=!1},$fz.isPrivate=!0,$fz));
$_M(c$,"set2dZ",($fz=function(a,b){var c=J.util.BSUtil.newBitSet(b),d=new J.util.BS,e=new J.util.V3,f=J.util.V3.new3(0,1,0),g=new J.util.V3,h=new J.util.BS;h.setBits(a,b);for(var k=a;k<b;k++)!c.get(k)&&!d.get(k)&&(d=this.getBranch2dZ(k,-1,h,d,e,f,g),c.or(d))},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"getBranch2dZ",($fz=function(a,b,c,d,e,f,g){d=J.util.BSUtil.newBitSet(this.modelSet.atomCount);if(0>a)return d;var h=new J.util.BS;h.or(c);0<=b&&h.clear(b);J.modelset.ModelLoader.setBranch2dZ(this.modelSet.atoms[a],
d,h,e,f,g);return d},$fz.isPrivate=!0,$fz),"~N,~N,J.util.BS,J.util.BS,J.util.V3,J.util.V3,J.util.V3");c$.setBranch2dZ=$_M(c$,"setBranch2dZ",($fz=function(a,b,c,d,e,f){var g=a.index;if(c.get(g)&&(c.clear(g),b.set(g),null!=a.bonds))for(g=a.bonds.length;0<=--g;){var h=a.bonds[g];h.isHydrogen()||(h=h.getOtherAtom(a),J.modelset.ModelLoader.setAtom2dZ(a,h,d,e,f),J.modelset.ModelLoader.setBranch2dZ(h,b,c,d,e,f))}},$fz.isPrivate=!0,$fz),"J.modelset.Atom,J.util.BS,J.util.BS,J.util.V3,J.util.V3,J.util.V3");
c$.setAtom2dZ=$_M(c$,"setAtom2dZ",($fz=function(a,b,c,d,e){c.setT(b);c.sub(a);c.z=0;c.normalize();e.cross(d,c);c=Math.acos(c.dot(d));b.z=a.z+0.8*Math.sin(4*c)},$fz.isPrivate=!0,$fz),"J.modelset.Atom,J.modelset.Atom,J.util.V3,J.util.V3,J.util.V3");$_M(c$,"finalizeShapes",($fz=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)},$fz.isPrivate=!0,$fz));$_M(c$,"undeleteAtom",function(a){this.modelSet.atoms[a].valence=0},"~N");$_M(c$,"deleteAtoms",function(a){this.doRemoveAddedHydrogens=!0;for(var b=Clazz.newIntArray(this.modelSet.atomCount,
0),c=Clazz.newIntArray(this.modelSet.atomCount-a.cardinality(),0),d=this.baseAtomIndex,e=this.modelSet.models,f=this.modelSet.atoms,g=this.baseAtomIndex;g<this.modelSet.atomCount;g++)e[f[g].modelIndex].bsAtoms.clear(g),e[f[g].modelIndex].bsAtomsDeleted.clear(g),a.get(g)?(b[g]=d-1,e[f[g].modelIndex].atomCount--):(c[d]=g,b[g]=d++);this.modelSet.modelSetAuxiliaryInfo.put("bsDeletedAtoms",a);for(g=this.baseGroupIndex;g<this.groups.length;g++)a=this.groups[g],a.firstAtomIndex>=this.baseAtomIndex&&(a.firstAtomIndex=
b[a.firstAtomIndex],a.lastAtomIndex=b[a.lastAtomIndex],0<=a.leadAtomIndex&&(a.leadAtomIndex=b[a.leadAtomIndex]));this.modelSet.adjustAtomArrays(c,this.baseAtomIndex,d);this.modelSet.calcBoundBoxDimensions(null,1);this.modelSet.resetMolecules();this.modelSet.validateBspf(!1)},"J.util.BS");c$.createAtomDataSet=$_M(c$,"createAtomDataSet",function(a,b,c,d,e){if(null!=d){var f=a.getModelAdapter(),g=new J.util.P3,h=new J.util.P3,k=b.atoms,l=a.getFloat(570425363);if(null!=b.unitCells)for(var m=e.nextSetBit(0);0<=
m;m=e.nextSetBit(m+1))if(null!=k[m].getAtomSymmetry()){l=-l;break}for(var m=-1,n=0,p=J.util.BSUtil.cardinalityOf(e)==a.getAtomCount(),q=f.getAtomIterator(d);q.hasNext();){var r=q.getX(),s=q.getY(),t=q.getZ();if(!Float.isNaN(r+s+t))if(1146095626==c){m=e.nextSetBit(m+1);if(0>m)break;n++;J.util.Logger.debugging&&J.util.Logger.debug("atomIndex = "+m+": "+k[m]+" --\x3e ("+r+","+s+","+t);b.setAtomCoord(m,r,s,t)}else{g.set(r,s,t);r=J.util.BSUtil.newBitSet(b.atomCount);b.getAtomsWithin(l,g,r,-1);r.and(e);
if(p)if(n=J.util.BSUtil.cardinalityOf(r),0==n){J.util.Logger.warn("createAtomDataSet: no atom found at position "+g);continue}else 1<n&&J.util.Logger.debugging&&J.util.Logger.debug("createAtomDataSet: "+n+" atoms found at position "+g);switch(c){case 1146095631:var s=q.getVectorX(),t=q.getVectorY(),u=q.getVectorZ();if(Float.isNaN(s+t+u))continue;h.set(s,t,u);J.util.Logger.debugging&&J.util.Logger.info("xyz: "+g+" vib: "+h);b.setAtomCoords(r,1146095631,h);break;case 1129318401:b.setAtomProperty(r,
c,q.getOccupancy(),0,null,null,null);break;case 1112541196:b.setAtomProperty(r,c,0,q.getPartialCharge(),null,null,null);break;case 1112541199:b.setAtomProperty(r,c,0,q.getBfactor(),null,null,null)}}}switch(c){case 1146095631:b=f.getAtomSetName(d,0);J.util.Logger.info("_vibrationName = "+b);a.setStringProperty("_vibrationName",b);break;case 1146095626:J.util.Logger.info(n+" atom positions read"),b.recalculateLeadMidpointsAndWingVectors(-1)}}},"J.viewer.Viewer,J.modelset.ModelSet,~N,~O,J.util.BS");
Clazz.defineStatics(c$,"defaultGroupCount",32)}),Clazz.declarePackage("J.viewer"),c$=Clazz.declareType(J.viewer,"TransformManager11"),Clazz.declarePackage("J.modelset"),c$=Clazz.decorateAsClass(function(){this.model=null;this.chainID="\x00";this.isRna=this.isDna=!1;this.groupCount=0;this.groups=null;this.selectedGroupCount=0;Clazz.instantialize(this,arguments)},J.modelset,"Chain"),Clazz.prepareFields(c$,function(){this.groups=Array(16)}),$_M(c$,"getAtom",function(a){return this.model.modelSet.atoms[a]},
"~N"),Clazz.makeConstructor(c$,function(a,b){this.model=a;this.chainID=b},"J.modelset.Model,~S"),$_M(c$,"getGroup",function(a){return this.groups[a]},"~N"),$_M(c$,"getGroupCount",function(){return this.groupCount}),$_M(c$,"calcSelectedGroupsCount",function(a){for(var b=this.selectedGroupCount=0;b<this.groupCount;b++)this.groups[b].selectedIndex=this.groups[b].isSelected(a)?this.selectedGroupCount++:-1},"J.util.BS"),$_M(c$,"selectSeqcodeRange",function(a,b,c,d){var e,f,g,h=!1;for(f=a;f<this.groupCount&&
this.groups[f].seqcode!=b;f++);if(f==this.groupCount){if(0<a)return-1;h=!0;g=2147483647;for(var k=this.groupCount;0<=--k;)if((e=this.groups[k].seqcode)>b&&e-b<g)f=k,g=e-b;if(2147483647==g)return-1}if(2147483647==c)b=this.groupCount-1,h=!0;else{for(b=f;b<this.groupCount&&this.groups[b].seqcode!=c;b++);if(b==this.groupCount){if(0<a)return-1;h=!0;g=2147483647;for(k=f;k<this.groupCount;k++)if((e=this.groups[k].seqcode)<c&&c-e<g)b=k,g=c-e;if(2147483647==g)return-1}}for(k=f;k<=b;++k)this.groups[k].selectAtoms(d);
return h?-1:b+1},"~N,~N,~N,J.util.BS"),$_M(c$,"fixIndices",function(a,b){for(var c=0;c<this.groupCount;c++)this.groups[c].fixIndices(a,b)},"~N,J.util.BS"),$_M(c$,"setAtomBitSet",function(a){for(var b=0;b<this.groupCount;b++)this.groups[b].selectAtoms(a)},"J.util.BS"),Clazz.declarePackage("J.modelset"),Clazz.load(["J.util.BS","$.SB"],"J.modelset.Model",["java.util.Hashtable","J.util.ArrayUtil","$.BSUtil"],function(){c$=Clazz.decorateAsClass(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.defaultStructure=null;this.isJmolDataFrame=this.structureTainted=!1;this.frameDelay=0;this.simpleCage=null;Clazz.instantialize(this,arguments)},J.modelset,"Model");Clazz.prepareFields(c$,function(){this.loadScript=new J.util.SB;this.bsAtoms=new J.util.BS;this.bsAtomsDeleted=new J.util.BS;this.chains=Array(8)});$_M(c$,"getModelSet",function(){return this.modelSet});
$_M(c$,"isModelkit",function(){return this.isModelKit});$_M(c$,"getTrueAtomCount",function(){return this.bsAtoms.cardinality()-this.bsAtomsDeleted.cardinality()});$_M(c$,"setSelectedTrajectory",function(a){this.selectedTrajectory=a},"~N");$_M(c$,"getSelectedTrajectory",function(){return this.selectedTrajectory});$_M(c$,"resetBoundCount",function(){this.bondCount=-1});$_M(c$,"getBondCount",function(){if(0<=this.bondCount)return this.bondCount;var a=this.modelSet.bonds;this.bondCount=0;for(var b=this.modelSet.bondCount;0<=
--b;)a[b].atom1.modelIndex==this.modelIndex&&this.bondCount++;return this.bondCount});Clazz.makeConstructor(c$,function(a,b,c,d,e,f){this.modelSet=a;this.dataSourceFrame=this.modelIndex=b;this.trajectoryBaseIndex=(this.isTrajectory=0<=c)?c:b;null==f&&(f=new java.util.Hashtable);this.auxiliaryInfo=f;f.containsKey("biosymmetryCount")&&(this.biosymmetryCount=f.get("biosymmetryCount").intValue());this.properties=e;null==d?this.jmolFrameType="modelSet":(this.jmolData=d,this.isJmolDataFrame=!0,f.put("jmolData",
d),f.put("title",d),this.jmolFrameType=0<=d.indexOf("ramachandran")?"ramachandran":0<=d.indexOf("quaternion")?"quaternion":"data")},"J.modelset.ModelSet,~N,~N,~S,java.util.Properties,java.util.Map");$_M(c$,"setNAltLocs",function(a){this.nAltLocs=a},"~N");$_M(c$,"setNInsertions",function(a){this.nInsertions=a},"~N");$_M(c$,"getModelNumberDotted",function(){return this.modelSet.getModelNumberDotted(this.modelIndex)});$_M(c$,"getModelTitle",function(){return this.modelSet.getModelTitle(this.modelIndex)});
$_M(c$,"isStructureTainted",function(){return this.structureTainted});$_M(c$,"getChains",function(){return this.chains});$_M(c$,"getChainCount",function(a){if(1<this.chainCount&&!a)for(a=0;a<this.chainCount;a++)if("\x00"==this.chains[a].chainID)return this.chainCount-1;return this.chainCount},"~B");$_M(c$,"getGroupCountHetero",function(a){for(var b=0,c=this.chainCount;0<=--c;)for(var d=this.chains[c].groupCount;0<=--d;)this.chains[c].groups[d].isHetero()==a&&b++;return b},"~B");$_M(c$,"calcSelectedGroupsCount",
function(a){for(var b=this.chainCount;0<=--b;)this.chains[b].calcSelectedGroupsCount(a)},"J.util.BS");$_M(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});$_M(c$,"getChainAt",function(a){return a<this.chainCount?this.chains[a]:null},"~N");$_M(c$,"getChain",function(a){for(var b=this.chainCount;0<=--b;){var c=this.chains[b];if(c.chainID==a)return c}return null},"~S");$_M(c$,
"fixIndices",function(a,b,c){this.dataSourceFrame>a&&this.dataSourceFrame--;this.trajectoryBaseIndex>a&&this.trajectoryBaseIndex--;this.firstAtomIndex-=b;for(a=0;a<this.chainCount;a++)this.chains[a].fixIndices(b,c);J.util.BSUtil.deleteBits(this.bsAtoms,c);J.util.BSUtil.deleteBits(this.bsAtomsDeleted,c)},"~N,~N,J.util.BS");$_M(c$,"freeze",function(){this.chains=J.util.ArrayUtil.arrayCopyObject(this.chains,this.chainCount);this.groupCount=-1;this.getGroupCount();for(var a=0;a<this.chainCount;++a)this.chains[a].groups=
J.util.ArrayUtil.arrayCopyObject(this.chains[a].groups,this.chains[a].groupCount)});$_M(c$,"getPdbData",function(){},"J.viewer.Viewer,~S,~S,~B,J.util.BS,J.io.OutputStringBuilder,~A,J.util.SB,J.util.BS");$_M(c$,"getDefaultLargePDBRendering",function(){},"J.util.SB,~N");$_M(c$,"getBioBranches",function(a){return a},"J.util.JmolList");$_M(c$,"getGroupsWithin",function(){},"~N,J.util.BS,J.util.BS");$_M(c$,"getSequenceBits",function(){},"~S,J.util.BS,J.util.BS");$_M(c$,"getRasmolHydrogenBonds",function(){},
"J.util.BS,J.util.BS,J.util.JmolList,~B,~N,~B,J.util.BS");$_M(c$,"clearRasmolHydrogenBonds",function(){},"J.util.BS");$_M(c$,"clearBioPolymers",function(){});$_M(c$,"calcSelectedMonomersCount",function(){},"J.util.BS");$_M(c$,"calculatePolymers",function(){},"~A,~N,~N,J.util.BS,~B");$_M(c$,"getAllPolymerInfo",function(){},"J.util.BS,java.util.Map,J.util.JmolList");$_M(c$,"getBioPolymerCount",function(){return 0});$_M(c$,"getPolymerPointsAndVectors",function(){},"J.util.BS,J.util.JmolList,~B,~N");
$_M(c$,"getPolymerLeadMidPoints",function(){return null},"~N");$_M(c$,"recalculateLeadMidpointsAndWingVectors",function(){});$_M(c$,"addSecondaryStructure",function(){},"J.constant.EnumStructure,~S,~N,~N,~S,~N,~S,~N,~N,~N,J.util.BS");$_M(c$,"calculateStructures",function(){return""},"~B,~B,~B,~B,~B");$_M(c$,"setStructureList",function(){},"java.util.Map");$_M(c$,"getChimeInfo",function(a,b){a.append("\nNumber of Atoms ..... "+(this.modelSet.atomCount-b));0<b&&a.append(" ("+b+")");a.append("\nNumber of Bonds ..... "+
this.modelSet.bondCount);a.append("\nNumber of Models ...... "+this.modelSet.modelCount)},"J.util.SB,~N");$_M(c$,"calculateStruts",function(){return 0},"J.modelset.ModelSet,J.util.BS,J.util.BS");$_M(c$,"calculateStraightness",function(){},"J.viewer.Viewer,~S,~S,~N");$_M(c$,"selectSeqcodeRange",function(){},"~N,~N,~S,J.util.BS,~B");$_M(c$,"setConformation",function(){},"J.util.BS");$_M(c$,"getPdbConformation",function(){return!1},"J.util.BS,~N");$_M(c$,"getProteinStructureState",function(){return null},
"J.util.BS,~B,~B,~N");$_M(c$,"getFullPDBHeader",function(){return null})}),Clazz.declarePackage("J.modelset"),Clazz.load(["J.modelset.ModelCollection","J.util.Matrix3f","$.Matrix4f","$.V3"],"J.modelset.ModelSet","J.api.Interface J.atomdata.RadiusData J.util.BS $.BSUtil $.JmolList $.JmolMolecule $.Measure $.P3 $.Quaternion $.SB J.viewer.JC".split(" "),function(){c$=Clazz.decorateAsClass(function(){this.echoShapeActive=this.selectionHaloEnabled=!1;this.vTemp=this.mat4t=this.mat4=this.matInv=this.matTemp=
this.pointGroup=this.closest=this.modelSetTypeName=null;Clazz.instantialize(this,arguments)},J.modelset,"ModelSet",J.modelset.ModelCollection);Clazz.prepareFields(c$,function(){this.closest=Array(1);this.matTemp=new J.util.Matrix3f;this.matInv=new J.util.Matrix3f;this.mat4=new J.util.Matrix4f;this.mat4t=new J.util.Matrix4f;this.vTemp=new J.util.V3});Clazz.makeConstructor(c$,function(a,b){Clazz.superConstructor(this,J.modelset.ModelSet,[]);this.viewer=a;this.modelSetName=b},"J.viewer.Viewer,~S");$_M(c$,
"releaseModelSet",function(){this.models=null;this.closest[0]=null;Clazz.superCall(this,J.modelset.ModelSet,"releaseModelSet",[])});$_M(c$,"setSelectionHaloEnabled",function(a){this.selectionHaloEnabled=a},"~B");$_M(c$,"getSelectionHaloEnabled",function(){return this.selectionHaloEnabled});$_M(c$,"getEchoStateActive",function(){return this.echoShapeActive});$_M(c$,"setEchoStateActive",function(a){this.echoShapeActive=a},"~B");$_M(c$,"getModelSetTypeName",function(){return this.modelSetTypeName});
$_M(c$,"getModelNumberIndex",function(a,b,c){if(b){for(b=0;b<this.modelCount;b++)if(this.modelNumbers[b]==a||1E6>a&&this.modelNumbers[b]==1E6+a)return b;return-1}for(b=0;b<this.modelCount;b++)if(this.modelFileNumbers[b]==a)return c&&this.isTrajectory(b)&&this.setTrajectory(b),b;return-1},"~N,~B,~B");$_M(c$,"getBitSetTrajectories",function(){if(null==this.trajectorySteps)return null;for(var a=new J.util.BS,b=this.modelCount;0<=--b;){var c=this.models[b].getSelectedTrajectory();0<=c&&(a.set(c),b=this.models[b].trajectoryBaseIndex)}return a});
$_M(c$,"setTrajectoryBs",function(a){for(var b=0;b<this.modelCount;b++)a.get(b)&&this.setTrajectory(b)},"J.util.BS");$_M(c$,"setTrajectory",function(a){if(!(0>a)&&this.isTrajectory(a)&&this.atoms[this.models[a].firstAtomIndex].modelIndex!=a){var b=this.models[a].trajectoryBaseIndex;this.models[b].setSelectedTrajectory(a);this.setAtomPositions(b,a,this.trajectorySteps.get(a),null,0,null==this.vibrationSteps?null:this.vibrationSteps.get(a),!0);b=this.viewer.getCurrentModelIndex();0<=b&&(b!=a&&this.models[b].fileIndex==
this.models[a].fileIndex)&&this.viewer.setCurrentModelIndexClear(a,!1)}},"~N");$_M(c$,"morphTrajectories",function(a,b,c){if(!(0>a||0>b||!this.isTrajectory(a)||!this.isTrajectory(b)))if(0==c)this.setTrajectory(a);else if(1==c)this.setTrajectory(b);else{var d=this.models[a].trajectoryBaseIndex;this.models[d].setSelectedTrajectory(a);this.setAtomPositions(d,a,this.trajectorySteps.get(a),this.trajectorySteps.get(b),c,null==this.vibrationSteps?null:this.vibrationSteps.get(a),!0);b=this.viewer.getCurrentModelIndex();
0<=b&&(b!=a&&this.models[b].fileIndex==this.models[a].fileIndex)&&this.viewer.setCurrentModelIndexClear(a,!1)}},"~N,~N,~N");$_M(c$,"setAtomPositions",($fz=function(a,b,c,d,e,f,g){var h=new J.util.BS,k=new J.util.V3,l=this.models[a].firstAtomIndex,m=l+this.getAtomCountInModel(a);if(0==e)for(var n=0;l<m&&n<c.length;l++,n++)this.atoms[l].modelIndex=b,null!=c[n]&&(g?this.atoms[l].setFractionalCoordTo(c[n],!0):this.atoms[l].setT(c[n]),null!=this.vibrationSteps&&(null!=f&&null!=f[n]&&(k=f[n]),this.setVibrationVector(l,
k.x,k.y,k.z)),h.set(l));else{f=new J.util.P3;k=Math.min(c.length,d.length);for(n=0;l<m&&n<k;l++,n++)this.atoms[l].modelIndex=b,null==c[n]||null==d[n]||(f.sub2(d[n],c[n]),f.scaleAdd2(e,f,c[n]),g?this.atoms[l].setFractionalCoordTo(f,!0):this.atoms[l].setT(f),h.set(l))}this.initializeBspf();this.validateBspfForModel(a,!1);this.recalculateLeadMidpointsAndWingVectors(a);this.shapeManager.refreshShapeTrajectories(a,h,null);this.models[a].hasRasmolHBonds&&(this.models[a].clearRasmolHydrogenBonds(null),this.models[a].getRasmolHydrogenBonds(h,
h,null,!1,2147483647,!1,null))},$fz.isPrivate=!0,$fz),"~N,~N,~A,~A,~N,~A,~B");$_M(c$,"getFrameOffsets",function(a){if(null==a)return null;for(var b=Array(this.modelCount),c=0;c<this.modelCount;c++)b[c]=new J.util.P3;for(var d=0,e=0,f=b[0],g=null!=this.trajectorySteps&&this.trajectorySteps.size()==this.modelCount,h=g?this.modelCount:1,k=0;k<h;k++){g&&this.setTrajectory(k);for(c=0;c<=this.atomCount;c++){if(c==this.atomCount||this.atoms[c].modelIndex!=d){0<e&&(f.scale(-1/e),0!=d&&f.sub(b[0]),e=0);if(c==
this.atomCount)break;d=this.atoms[c].modelIndex;f=b[d]}a.get(c)&&(f.add(this.atoms[c]),e++)}}b[0].set(0,0,0);return b},"J.util.BS");$_M(c$,"getAtomBits",function(a,b){switch(a){case 1048610:var c=b.intValue(),d=this.getModelNumberIndex(c,!0,!0);return 0>d&&0<c?new J.util.BS:this.viewer.getModelUndeletedAtomsBitSet(d)}return J.util.BSUtil.andNot(this.getAtomBitsMaybeDeleted(a,b),this.viewer.getDeletedAtoms())},"~N,~O");$_M(c$,"getAtomLabel",function(a){return this.viewer.getShapePropertyIndex(5,"label",
a)},"~N");$_M(c$,"findNearestAtomIndex",function(a,b,c,d){if(0==this.atomCount)return-1;this.closest[0]=null;this.g3d.isAntialiased()&&(a<<=1,b<<=1);this.findNearest2(a,b,this.closest,c,d);this.shapeManager.findNearestShapeAtomIndex(a,b,this.closest,c);a=null==this.closest[0]?-1:this.closest[0].index;this.closest[0]=null;return a},"~N,~N,J.util.BS,~N");$_M(c$,"calculateStructures",function(a,b,c,d){var e=new J.util.BS;a=J.util.BSUtil.copyInvert(this.modelsOf(a,e),this.modelCount);if(!d)return this.calculateStructuresAllExcept(a,
b,!0,c,!1,!1);for(d=0;d<this.modelCount;d++)a.get(d)||this.models[d].clearBioPolymers();this.calculatePolymers(null,0,0,a);b=this.calculateStructuresAllExcept(a,b,!0,c,!0,!1);this.viewer.resetBioshapes(e);this.setStructureIndexes();return b},"J.util.BS,~B,~B,~B");$_M(c$,"calculatePointGroup",function(a){return this.calculatePointGroupForFirstModel(a,!1,!1,!1,null,0,0)},"J.util.BS");$_M(c$,"getPointGroupInfo",function(a){return this.calculatePointGroupForFirstModel(a,!1,!1,!0,null,0,0)},"J.util.BS");
$_M(c$,"getPointGroupAsString",function(a,b,c,d,e){return this.calculatePointGroupForFirstModel(a,!0,b,!1,c,d,e)},"J.util.BS,~B,~S,~N,~N");$_M(c$,"calculatePointGroupForFirstModel",($fz=function(a,b,c,d,e,f,g){var h=this.viewer.getCurrentModelIndex(),k=null==a?-1:a.nextSetBit(0);0>h&&0<=k&&(h=this.atoms[k].getModelIndex());0>h&&(h=this.viewer.getVisibleFramesBitSet().nextSetBit(0),a=null);var l=this.viewer.getModelUndeletedAtomsBitSet(h);null!=a&&l.and(a);k=l.nextSetBit(0);0>k&&(l=this.viewer.getModelUndeletedAtomsBitSet(h),
k=l.nextSetBit(0));a=this.viewer.getShapePropertyIndex(18,"mad",k);a=null!=a&&0!=a.intValue()||this.viewer.isVibrationOn();this.pointGroup=J.api.Interface.getOptionInterface("symmetry.Symmetry").setPointGroup(this.pointGroup,this.atoms,l,a,this.viewer.getFloat(570425382),this.viewer.getFloat(570425384));if(!b&&!d)return this.pointGroup.getPointGroupName();b=this.pointGroup.getPointGroupInfo(h,c,d,e,f,g);return d?b:(1<this.modelCount?"frame "+this.getModelNumberDotted(h)+"; ":"")+b},$fz.isPrivate=
!0,$fz),"J.util.BS,~B,~B,~B,~S,~N,~N");$_M(c$,"modelsOf",($fz=function(a,b){for(var c=J.util.BSUtil.newBitSet(this.modelCount),d=null==a,e=d?this.atomCount-1:a.nextSetBit(0);0<=e;e=d?e-1:a.nextSetBit(e+1)){var f=this.models[this.atoms[e].modelIndex].trajectoryBaseIndex;this.isJmolDataFrameForModel(f)||(c.set(f),b.set(e))}return c},$fz.isPrivate=!0,$fz),"J.util.BS,J.util.BS");$_M(c$,"getDefaultStructure",function(a,b){for(var c=this.modelsOf(a,b),d=new J.util.SB,e=c.nextSetBit(0);0<=e;e=c.nextSetBit(e+
1))this.models[e].isBioModel&&null!=this.models[e].defaultStructure&&d.append(this.models[e].defaultStructure);return d.toString()},"J.util.BS,J.util.BS");$_M(c$,"makeConnections",function(a,b,c,d,e,f,g,h,k,l){if(1073741852==d&&2048!=c){var m="connect ";0.1!=a&&(m+=a+" ");1E8!=b&&(m+=b+" ");this.addStateScript(m,h?e:null,h?null:e,h?null:f," auto",!1,!0)}this.moleculeCount=0;return this.makeConnections2(a,b,c,d,e,f,g,h,k,l)},"~N,~N,~N,~N,J.util.BS,J.util.BS,J.util.BS,~B,~B,~N");$_M(c$,"setPdbConectBonding",
function(a,b,c){for(var d=this.viewer.getMadBond();b<this.modelCount;b++){var e=this.getModelAuxiliaryInfoValue(b,"PDB_CONECT_bonds");if(null!=e){var f=e.size();this.setModelAuxiliaryInfo(b,"initialBondCount",Integer.$valueOf(f));for(var g=this.getModelAuxiliaryInfoValue(b,"PDB_CONECT_firstAtom_count_max"),h=g[0]+a,k=h+g[1],g=g[2],l=Clazz.newIntArray(g+1,0),m=h;m<k;m++)if(0<(h=this.atomSerials[m]))l[h]=m+1;for(k=0;k<f;k++){var m=e.get(k),n=m[0],h=m[1],m=m[2];0>n||(0>h||n>g||h>g)||(n=l[n]-1,h=l[h]-
1,0>n||0>h||(null!=c&&(this.atoms[n].isHetero()&&c.set(n),this.atoms[h].isHetero()&&c.set(h)),this.checkValencesAndBond(this.atoms[n],this.atoms[h],m,2048==m?1:d,null)))}}}},"~N,~N,J.util.BS");$_M(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()});$_M(c$,"includeAllRelatedFrames",($fz=function(a){for(var b,c=0;c<this.modelCount;c++)if(a.get(c)){if(this.isTrajectory(c)&&
!a.get(b=this.models[c].trajectoryBaseIndex)){a.set(b);this.includeAllRelatedFrames(a);break}}else(this.isTrajectory(c)&&a.get(this.models[c].trajectoryBaseIndex)||this.isJmolDataFrameForModel(c)&&a.get(this.models[c].dataSourceFrame))&&a.set(c)},$fz.isPrivate=!0,$fz),"J.util.BS");$_M(c$,"deleteModels",function(a){this.moleculeCount=0;a=this.getModelBitSet(a,!1);this.includeAllRelatedFrames(a);var b=J.util.BSUtil.cardinalityOf(a);if(0==b)return null;for(var c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+
1))this.clearDataFrameReference(c);if(b==this.modelCount)return b=this.getModelAtomBitSetIncludingDeleted(-1,!0),this.viewer.zap(!0,!1,!1),b;this.validateBspf(!1);for(var d=Array(this.modelCount-b),e=this.models,b=new J.util.BS,f=c=0;c<this.modelCount;c++)a.get(c)?(this.getAtomCountInModel(c),b.or(this.getModelAtomBitSetIncludingDeleted(c,!1))):(this.models[c].modelIndex=f,d[f++]=this.models[c]);this.models=d;var g=this.modelCount,h=this.getBondsForSelectedAtoms(b,!0);this.deleteBonds(h,!0);for(f=
c=0;c<g;c++)if(a.get(c)){var k=e[c].atomCount;if(0!=k){var l=e[c].bsAtoms,m=e[c].firstAtomIndex;J.util.BSUtil.deleteBits(this.bsSymmetry,l);this.deleteModel(f,m,k,l,h);for(var n=g;--n>c;)e[n].fixIndices(f,k,l);this.viewer.deleteShapeAtoms([d,this.atoms,[f,m,k]],l);this.modelCount--}}else f++;this.deleteModel(-1,0,0,null,null);return b},"J.util.BS");$_M(c$,"setAtomProperty",function(a,b,c,d,e,f,g){switch(b){case 1115297793:case 1113200642:case 1113200647:case 1113200649:case 1113200650:case 1650071565:case 1113200654:if(4<
d&&(d=4),null!=f){c=Clazz.newFloatArray(this.atomCount,0);e=a.nextSetBit(0);for(g=0;0<=e;e=a.nextSetBit(e+1))c[e]=f[g++];f=c}case 1113200646:case 1113200652:c=null;e=0;null==f?(16<d&&(d=16),0>d&&(d=0),e=Clazz.doubleToInt(Math.floor(2E3*d))):c=new J.atomdata.RadiusData(f,0,null,null);this.shapeManager.setShapeSizeBs(J.viewer.JC.shapeTokenIndex(b),e,c,a);return}this.setAPm(a,b,c,d,e,f,g)},"J.util.BS,~N,~N,~N,~S,~A,~A");$_M(c$,"getFileData",function(a){if(0>a)return"";var b=this.getModelAuxiliaryInfoValue(a,
"fileData");if(null!=b)return b;if(!this.getModelAuxiliaryInfoBoolean(a,"isCIF"))return this.getPDBHeader(a);b=this.viewer.getCifData(a);this.setModelAuxiliaryInfo(a,"fileData",b);return b},"~N");$_M(c$,"calculateStruts",function(a,b){this.viewer.setModelVisibility();return Clazz.superCall(this,J.modelset.ModelSet,"calculateStruts",[a,b])},"J.util.BS,J.util.BS");$_M(c$,"addHydrogens",function(a,b){var c=this.modelCount-1,d=new J.util.BS;if(this.isTrajectory(c)||1<this.models[c].getGroupCount())return d;
this.growAtomArrays(this.atomCount+b.length);for(var e=this.viewer.getDefaultRadiusData(),f=this.getDefaultMadFromOrder(1),g=0,h=this.models[c].atomCount+1;g<a.size();g++,h++){var k=a.get(g),l=this.addAtom(c,k.group,1,"H"+h,h,h,b[g].x,b[g].y,b[g].z,NaN,NaN,NaN,NaN,0,0,100,NaN,null,!1,0,null);l.setMadAtom(this.viewer,e);d.set(l.index);this.bondAtoms(k,l,1,f,null,0,!1,!1)}this.shapeManager.loadDefaultShapes(this);return d},"J.util.JmolList,~A");$_M(c$,"setAtomCoordsRelative",function(a,b){this.setAtomsCoordRelative(b,
a.x,a.y,a.z);this.mat4.setIdentity();this.vTemp.setT(a);this.mat4.setTranslation(this.vTemp);this.recalculatePositionDependentQuantities(b,this.mat4)},"J.util.Tuple3f,J.util.BS");$_M(c$,"setAtomCoords",function(a,b,c){this.setAtomCoord2(a,b,c);switch(b){case 1112541202:case 1112541203:case 1112541204:case 1146095631:break;default:this.recalculatePositionDependentQuantities(a,null)}},"J.util.BS,~N,~O");$_M(c$,"invertSelected",function(a,b,c,d,e){if(null!=a)for(var f=e.nextSetBit(0);0<=f;f=e.nextSetBit(f+
1)){c=2*(a.x-this.atoms[f].x);d=2*(a.y-this.atoms[f].y);var g=2*(a.z-this.atoms[f].z);this.setAtomCoordRelative(f,c,d,g)}else if(null!=b){a=J.util.V3.new3(b.x,b.y,b.z);a.normalize();for(var h=Math.sqrt(b.x*b.x+b.y*b.y+b.z*b.z),f=e.nextSetBit(0);0<=f;f=e.nextSetBit(f+1))g=2*-J.util.Measure.distanceToPlaneD(b,h,this.atoms[f]),c=a.x*g,d=a.y*g,g*=a.z,this.setAtomCoordRelative(f,c,d,g)}else if(0<=c&&(b=this.atoms[c],a=b.bonds,null!=a)){e=new J.util.BS;g=new J.util.JmolList;h=this.viewer.getModelUndeletedAtomsBitSet(b.modelIndex);
for(f=0;f<a.length;f++){var k=a[f].getOtherAtom(b);d.get(k.index)?e.or(J.util.JmolMolecule.getBranchBitSet(this.atoms,k.index,h,null,c,!0,!0)):g.addLast(k)}0!=g.size()&&(a=J.util.Measure.getCenterAndPoints(g)[0],f=J.util.V3.newV(b),f.sub(a),f=J.util.Quaternion.newVA(f,180),this.moveAtoms(null,f.getMatrix(),null,e,b,!0))}},"J.util.P3,J.util.P4,~N,J.util.BS,J.util.BS");$_M(c$,"moveAtoms",function(a,b,c,d,e,f){null==a?this.matTemp.setM(b):(this.matInv.setM(b),this.matInv.invert(),this.ptTemp.set(0,0,
0),this.matTemp.mul2(a,b),this.matTemp.mul2(this.matInv,this.matTemp));f?(this.vTemp.setT(e),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=d.nextSetBit(0);0<=a;a=d.nextSetBit(a+1))f?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);f||(this.ptTemp.scale(1/d.cardinality()),null==c&&(c=new J.util.V3),c.add(this.ptTemp));if(null!=c){for(a=d.nextSetBit(0);0<=a;a=d.nextSetBit(a+1))this.atoms[a].add(c);this.mat4t.setIdentity();this.mat4t.setTranslation(c);this.mat4.mul2(this.mat4t,this.mat4)}this.recalculatePositionDependentQuantities(d,this.mat4)},"J.util.Matrix3f,J.util.Matrix3f,J.util.V3,J.util.BS,J.util.P3,~B");$_M(c$,"recalculatePositionDependentQuantities",function(a,b){this.getHaveStraightness()&&
this.calculateStraightness();this.recalculateLeadMidpointsAndWingVectors(-1);for(var c=this.getModelBitSet(a,!1),d=c.nextSetBit(0);0<=d;d=c.nextSetBit(d+1))this.shapeManager.refreshShapeTrajectories(d,a,b)},"J.util.BS,J.util.Matrix4f")}),Clazz.declarePackage("J.util"),Clazz.load(null,"J.util.Hermite",["J.util.P3","$.V3"],function(){c$=Clazz.declareType(J.util,"Hermite");c$.getHermiteList=$_M(c$,"getHermiteList",function(a,b,c,d,e,f,g,h,k,l){var m=k+1;k-=1;var n=c.x,p=c.y,q=c.z,r=d.x,s=d.y;d=d.z;var t=
(r-b.x)*a/8,u=(s-b.y)*a/8;b=(d-b.z)*a/8;var v=(e.x-n)*a/8,w=(e.y-p)*a/8,z=(e.z-q)*a/8,B=(f.x-r)*a/8,x=(f.y-s)*a/8;a=(f.z-d)*a/8;g[h]=c;for(c=0;c<m;c++){var y=c/k;c==m-1&&(n=r,p=s,q=d,r=e.x,s=e.y,d=e.z,t=v,u=w,b=z,v=B,w=x,z=a,y-=1);var A=y*y,C=A*y;f=2*C-3*A+1;var D=-2*C+3*A,y=C-2*A+y,E=C-A,A=f*n+D*r+y*t+E*v,C=f*p+D*s+y*u+E*w;f=f*q+D*d+y*b+E*z;g[h+c]=l?J.util.P3.new3(A,C,f):J.util.V3.new3(A,C,f)}},"~N,J.util.Tuple3f,J.util.Tuple3f,J.util.Tuple3f,J.util.Tuple3f,J.util.Tuple3f,~A,~N,~N,~B")}),Clazz.declarePackage("J.thread"),
Clazz.load(["J.thread.JmolThread"],"J.thread.MoveThread",null,function(){c$=Clazz.decorateAsClass(function(){this.transformManager=null;this.radiansZStep=this.radiansYStep=this.radiansXStep=this.totalSteps=this.timePerStep=this.iStep=this.floatSecondsTotal=0;this.dTrans=this.dRot=null;this.transZ=this.transY=this.transX=this.slab=this.zoomPercent0=this.dSlab=this.dZoom=0;Clazz.instantialize(this,arguments)},J.thread,"MoveThread",J.thread.JmolThread);Clazz.makeConstructor(c$,function(a,b){Clazz.superConstructor(this,
J.thread.MoveThread);this.setViewer(b,"MoveThread");this.transformManager=a},"J.viewer.TransformManager,J.viewer.Viewer");$_M(c$,"set",function(a,b,c,d,e,f){this.dRot=a;this.dTrans=c;this.dZoom=b;this.dSlab=d;this.floatSecondsTotal=e;this.slab=this.transformManager.getSlabPercentSetting();this.transX=this.transformManager.getTranslationXPercent();this.transY=this.transformManager.getTranslationYPercent();this.transZ=this.transformManager.getTranslationZPercent();this.timePerStep=Clazz.doubleToInt(1E3/
f);this.totalSteps=Clazz.floatToInt(f*e);0>=this.totalSteps&&(this.totalSteps=1);b=0.017453292519943295/this.totalSteps;this.radiansXStep=b*a.x;this.radiansYStep=b*a.y;this.radiansZStep=b*a.z;this.zoomPercent0=this.transformManager.zoomPercent;this.iStep=0},"J.util.V3,~N,J.util.V3,~N,~N,~N");Clazz.overrideMethod(c$,"run1",function(a){for(;;)switch(a){case -1:0<this.floatSecondsTotal&&this.viewer.setInMotion(!0);a=0;break;case 0:if(this.stopped||++this.iStep>=this.totalSteps){a=-2;break}0!=this.dRot.x&&
this.transformManager.rotateXRadians(this.radiansXStep,null);0!=this.dRot.y&&this.transformManager.rotateYRadians(this.radiansYStep,null);0!=this.dRot.z&&this.transformManager.rotateZRadians(this.radiansZStep);0!=this.dZoom&&this.transformManager.zoomToPercent(this.zoomPercent0+this.dZoom*this.iStep/this.totalSteps);0!=this.dTrans.x&&this.transformManager.translateToPercent("x",this.transX+this.dTrans.x*this.iStep/this.totalSteps);0!=this.dTrans.y&&this.transformManager.translateToPercent("y",this.transY+
this.dTrans.y*this.iStep/this.totalSteps);0!=this.dTrans.z&&this.transformManager.translateToPercent("z",this.transZ+this.dTrans.z*this.iStep/this.totalSteps);0!=this.dSlab&&this.transformManager.slabToPercent(Clazz.doubleToInt(Math.floor(this.slab+this.dSlab*this.iStep/this.totalSteps)));var b=System.currentTimeMillis()-this.startTime,c=this.iStep*this.timePerStep;if(b<c){this.viewer.requestRepaintAndWait();if(!this.isJS&&!this.viewer.isScriptExecuting()){a=-2;break}b=System.currentTimeMillis()-
this.startTime;this.sleepTime=c-b;if(!this.runSleep(this.sleepTime,0))return}break;case -2:0<this.floatSecondsTotal&&this.viewer.setInMotion(!1);this.resumeEval();return}},"~N")}),Clazz.declarePackage("J.thread"),Clazz.load(["J.thread.JmolThread","J.util.AxisAngle4f","$.Matrix3f","$.V3"],"J.thread.MoveToThread",["java.lang.Float","J.util.Logger","$.P3"],function(){c$=Clazz.decorateAsClass(function(){this.center=this.matrixEnd=this.matrixStep=this.matrixStartInv=this.matrixStart=this.aaTotal=this.aaStep=
this.aaStepNavCenter=this.aaStepCenter=this.transformManager=null;this.yTrans=this.xTrans=this.zoom=0;this.navCenter=null;this.navDepth=this.yNav=this.xNav=0;this.ptMoveToCenter=null;this.iStep=this.frameTimeMillis=this.navDepthDelta=this.navDepthStart=this.yNavTransStart=this.yNavTransDelta=this.xNavTransDelta=this.xNavTransStart=this.yTransDelta=this.yTransStart=this.xTransDelta=this.xTransStart=this.zoomDelta=this.zoomStart=this.pixelScaleDelta=this.rotationRadiusDelta=this.fps=this.targetRotationRadius=
this.startPixelScale=this.totalSteps=this.targetPixelScale=this.startRotationRadius=0;this.doEndMove=!1;this.floatSecondsTotal=0;Clazz.instantialize(this,arguments)},J.thread,"MoveToThread",J.thread.JmolThread);Clazz.prepareFields(c$,function(){this.aaStepCenter=new J.util.V3;this.aaStepNavCenter=new J.util.V3;this.aaStep=new J.util.AxisAngle4f;this.aaTotal=new J.util.AxisAngle4f;this.matrixStart=new J.util.Matrix3f;this.matrixStartInv=new J.util.Matrix3f;this.matrixStep=new J.util.Matrix3f;this.matrixEnd=
new J.util.Matrix3f});Clazz.makeConstructor(c$,function(a,b){Clazz.superConstructor(this,J.thread.MoveToThread);this.setViewer(b,"MoveToThread");this.transformManager=a},"J.viewer.TransformManager,J.viewer.Viewer");$_M(c$,"set",function(a,b,c,d,e,f,g,h,k,l,m){this.center=b;this.matrixEnd.setM(c);this.zoom=d;this.xTrans=e;this.yTrans=f;this.navCenter=h;this.xNav=k;this.yNav=l;this.navDepth=m;this.ptMoveToCenter=null==b?this.transformManager.fixedRotationCenter:b;this.startRotationRadius=this.transformManager.modelRadius;
this.targetRotationRadius=null==b||Float.isNaN(g)?this.transformManager.modelRadius:0>=g?this.viewer.calcRotationRadius(b):g;this.startPixelScale=this.transformManager.scaleDefaultPixelsPerAngstrom;this.targetPixelScale=null==b?this.startPixelScale:this.transformManager.defaultScaleToScreen(this.targetRotationRadius);Float.isNaN(d)&&(d=this.transformManager.zoomPercent);this.transformManager.getRotation(this.matrixStart);this.matrixStartInv.invertM(this.matrixStart);this.matrixStep.mul2(this.matrixEnd,
this.matrixStartInv);this.aaTotal.setM(this.matrixStep);this.fps=30;this.floatSecondsTotal=a;this.totalSteps=Clazz.floatToInt(a*this.fps);if(0==this.totalSteps)return 0;this.frameTimeMillis=Clazz.doubleToInt(1E3/this.fps);this.targetTime=System.currentTimeMillis();this.zoomStart=this.transformManager.zoomPercent;this.zoomDelta=d-this.zoomStart;this.xTransStart=this.transformManager.getTranslationXPercent();this.xTransDelta=e-this.xTransStart;this.yTransStart=this.transformManager.getTranslationYPercent();
this.yTransDelta=f-this.yTransStart;this.aaStepCenter.setT(this.ptMoveToCenter);this.aaStepCenter.sub(this.transformManager.fixedRotationCenter);this.aaStepCenter.scale(1/this.totalSteps);this.pixelScaleDelta=this.targetPixelScale-this.startPixelScale;this.rotationRadiusDelta=this.targetRotationRadius-this.startRotationRadius;null!=h&&1==this.transformManager.mode&&(this.aaStepNavCenter.setT(h),this.aaStepNavCenter.sub(this.transformManager.navigationCenter),this.aaStepNavCenter.scale(1/this.totalSteps));
a=this.transformManager.getNavigationOffsetPercent("X");this.xNavTransDelta=k-a;this.yNavTransStart=this.transformManager.getNavigationOffsetPercent("Y");this.yNavTransDelta=l-this.yNavTransStart;k=this.transformManager.getNavigationDepthPercent();this.navDepthDelta=m-k;return this.totalSteps},"~N,J.util.P3,J.util.Matrix3f,~N,~N,~N,~N,J.util.P3,~N,~N,~N");Clazz.overrideMethod(c$,"run1",function(a){for(;;)switch(a){case -1:0<this.totalSteps&&this.viewer.setInMotion(!0);a=0;break;case 0:if(this.stopped||
++this.iStep>=this.totalSteps){a=-2;break}this.doStepTransform();this.doEndMove=!0;this.targetTime+=this.frameTimeMillis;this.currentTime=System.currentTimeMillis();var b=this.currentTime<this.targetTime;!b&&this.isJS&&(this.targetTime=this.currentTime,b=!0);b&&this.viewer.requestRepaintAndWait();if(null==this.transformManager.motion||!this.isJS&&null!=this.eval&&!this.viewer.isScriptExecuting()){this.stopped=!0;break}this.currentTime=System.currentTimeMillis();if(!this.runSleep(this.targetTime-this.currentTime,
0))return;a=0;break;case -2:(0>=this.totalSteps||this.doEndMove&&!this.stopped)&&this.doFinalTransform();0<this.totalSteps&&this.viewer.setInMotion(!1);this.viewer.moveUpdate(this.floatSecondsTotal);null!=this.transformManager.motion&&!this.stopped&&(this.transformManager.motion=null,this.viewer.finalizeTransformParameters());this.resumeEval();return}},"~N");$_M(c$,"doStepTransform",($fz=function(){Float.isNaN(this.matrixEnd.m00)||(this.transformManager.getRotation(this.matrixStart),this.matrixStartInv.invertM(this.matrixStart),
this.matrixStep.mul2(this.matrixEnd,this.matrixStartInv),this.aaTotal.setM(this.matrixStep),this.aaStep.setAA(this.aaTotal),this.aaStep.angle/=this.totalSteps-this.iStep,0==this.aaStep.angle?this.matrixStep.setIdentity():this.matrixStep.setAA(this.aaStep),this.matrixStep.mul(this.matrixStart));var a=this.iStep/(this.totalSteps-1);this.transformManager.modelRadius=this.startRotationRadius+this.rotationRadiusDelta*a;this.transformManager.scaleDefaultPixelsPerAngstrom=this.startPixelScale+this.pixelScaleDelta*
a;Float.isNaN(this.xTrans)||(this.transformManager.zoomToPercent(this.zoomStart+this.zoomDelta*a),this.transformManager.translateToPercent("x",this.xTransStart+this.xTransDelta*a),this.transformManager.translateToPercent("y",this.yTransStart+this.yTransDelta*a));this.transformManager.setRotation(this.matrixStep);null!=this.center&&this.transformManager.fixedRotationCenter.add(this.aaStepCenter);if(null!=this.navCenter&&1==this.transformManager.mode){var b=J.util.P3.newP(this.transformManager.navigationCenter);
b.add(this.aaStepNavCenter);this.transformManager.setNavigatePt(b);!Float.isNaN(this.xNav)&&!Float.isNaN(this.yNav)&&this.transformManager.navTranslatePercentOrTo(0,this.xNavTransStart+this.xNavTransDelta*a,this.yNavTransStart+this.yNavTransDelta*a);Float.isNaN(this.navDepth)||this.transformManager.setNavigationDepthPercent(this.navDepthStart+this.navDepthDelta*a)}},$fz.isPrivate=!0,$fz));$_M(c$,"doFinalTransform",($fz=function(){this.transformManager.setRotationRadius(this.targetRotationRadius,!0);
this.transformManager.scaleDefaultPixelsPerAngstrom=this.targetPixelScale;null!=this.center&&this.transformManager.moveRotationCenter(this.center,!this.transformManager.windowCentered);Float.isNaN(this.xTrans)||(this.transformManager.zoomToPercent(this.zoom),this.transformManager.translateToPercent("x",this.xTrans),this.transformManager.translateToPercent("y",this.yTrans));this.transformManager.setRotation(this.matrixEnd);null!=this.navCenter&&1==this.transformManager.mode&&(this.transformManager.navigationCenter.setT(this.navCenter),
!Float.isNaN(this.xNav)&&!Float.isNaN(this.yNav)&&this.transformManager.navTranslatePercentOrTo(0,this.xNav,this.yNav),Float.isNaN(this.navDepth)||this.transformManager.setNavigationDepthPercent(this.navDepth))},$fz.isPrivate=!0,$fz));$_M(c$,"interrupt",function(){J.util.Logger.debug("moveto thread interrupted!");this.doEndMove=!1;Clazz.superCall(this,J.thread.MoveToThread,"interrupt",[])})}),Clazz.declarePackage("J.thread"),Clazz.load(["J.thread.JmolThread"],"J.thread.SpinThread",["J.util.Logger"],
function(){c$=Clazz.decorateAsClass(function(){this.transformManager=null;this.endDegrees=0;this.endPositions=null;this.nDegrees=0;this.bsAtoms=null;this.$isGesture=this.isNav=!1;this.angle=this.myFps=0;this.haveNotified=!1;this.index=0;Clazz.instantialize(this,arguments)},J.thread,"SpinThread",J.thread.JmolThread);$_M(c$,"isGesture",function(){return this.$isGesture});Clazz.makeConstructor(c$,function(a,b,c,d,e,f,g){Clazz.superConstructor(this,J.thread.SpinThread);this.setViewer(b,"SpinThread");
this.transformManager=a;this.endDegrees=Math.abs(c);this.endPositions=d;this.bsAtoms=e;this.isNav=f;this.$isGesture=g},"J.viewer.TransformManager,J.viewer.Viewer,~N,J.util.JmolList,J.util.BS,~B,~B");Clazz.overrideMethod(c$,"run1",function(a){for(;;)switch(a){case -1:this.myFps=this.isNav?this.transformManager.navFps:this.transformManager.spinFps;this.viewer.getGlobalSettings().setB(this.isNav?"_navigating":"_spinning",!0);this.viewer.startHoverWatcher(!1);a=0;break;case 0:if(this.isReset||this.checkInterrupted()){a=
-2;break}this.isNav&&this.myFps!=this.transformManager.navFps?(this.myFps=this.transformManager.navFps,this.index=0,this.startTime=System.currentTimeMillis()):!this.isNav&&(this.myFps!=this.transformManager.spinFps&&null==this.bsAtoms)&&(this.myFps=this.transformManager.spinFps,this.index=0,this.startTime=System.currentTimeMillis());if(0==this.myFps||!(this.isNav?this.transformManager.navOn:this.transformManager.spinOn)){a=-2;break}a=this.isNav?0!=this.transformManager.navX||0!=this.transformManager.navY||
0!=this.transformManager.navZ:this.transformManager.isSpinInternal&&0!=this.transformManager.internalRotationAxis.angle||this.transformManager.isSpinFixed&&0!=this.transformManager.fixedRotationAxis.angle||!this.transformManager.isSpinFixed&&!this.transformManager.isSpinInternal&&(0!=this.transformManager.spinX||0!=this.transformManager.spinY||0!=this.transformManager.spinZ);this.targetTime=Clazz.floatToLong(1E3*++this.index/this.myFps);this.currentTime=System.currentTimeMillis()-this.startTime;this.sleepTime=
this.targetTime-this.currentTime;0>this.sleepTime&&(this.haveNotified||J.util.Logger.info("spinFPS is set too fast ("+this.myFps+") -- can't keep up!"),this.haveNotified=!0,this.startTime-=this.sleepTime,this.sleepTime=0);var b=null==this.bsAtoms&&this.viewer.getInMotion();if(b){if(this.$isGesture){a=-2;break}this.sleepTime+=1E3}a&&(!b&&(this.transformManager.spinOn||this.transformManager.navOn))&&this.doTransform();a=1;break;case 1:for(;!this.checkInterrupted()&&!this.viewer.getRefreshing();)if(!this.runSleep(10,
1))return;null==this.bsAtoms?this.viewer.refresh(1,"SpinThread:run()"):this.viewer.requestRepaintAndWait();!this.isNav&&this.nDegrees>=this.endDegrees-0.001&&this.transformManager.setSpinOff();if(!this.runSleep(this.sleepTime,0))return;a=0;break;case -2:null!=this.bsAtoms&&null!=this.endPositions&&(this.viewer.setAtomCoords(this.bsAtoms,1146095626,this.endPositions),this.endPositions=this.bsAtoms=null);this.isReset||(this.transformManager.setSpinOff(),this.viewer.startHoverWatcher(!0));this.resumeEval();
return}},"~N");$_M(c$,"doTransform",($fz=function(){this.isNav?this.transformManager.setNavigationOffsetRelative():this.transformManager.isSpinInternal||this.transformManager.isSpinFixed?(this.angle=(this.transformManager.isSpinInternal?this.transformManager.internalRotationAxis:this.transformManager.fixedRotationAxis).angle/this.myFps,this.transformManager.isSpinInternal?this.transformManager.rotateAxisAngleRadiansInternal(this.angle,this.bsAtoms):this.transformManager.rotateAxisAngleRadiansFixed(this.angle,
this.bsAtoms),this.nDegrees+=Math.abs(57.29577951308232*this.angle)):(0!=this.transformManager.spinX&&this.transformManager.rotateXRadians(0.017453292*this.transformManager.spinX/this.myFps,null),0!=this.transformManager.spinY&&this.transformManager.rotateYRadians(0.017453292*this.transformManager.spinY/this.myFps,null),0!=this.transformManager.spinZ&&this.transformManager.rotateZRadians(0.017453292*this.transformManager.spinZ/this.myFps))},$fz.isPrivate=!0,$fz))}),Clazz.declarePackage("J.thread"),
Clazz.load(["J.thread.JmolThread"],"J.thread.VibrationThread",null,function(){c$=Clazz.decorateAsClass(function(){this.transformManager=null;Clazz.instantialize(this,arguments)},J.thread,"VibrationThread",J.thread.JmolThread);Clazz.makeConstructor(c$,function(a,b){Clazz.superConstructor(this,J.thread.VibrationThread);this.setViewer(b,"VibrationThread");this.transformManager=a},"J.viewer.TransformManager,J.viewer.Viewer");Clazz.overrideMethod(c$,"run1",function(a){for(;;)switch(a){case -1:this.lastRepaintTime=
this.startTime=System.currentTimeMillis();this.viewer.startHoverWatcher(!1);a=0;break;case 0:a=System.currentTimeMillis()-this.lastRepaintTime;this.sleepTime=33-a;if(!this.runSleep(this.sleepTime,1))return;a=1;break;case 1:this.lastRepaintTime=System.currentTimeMillis();a=this.lastRepaintTime-this.startTime;this.transformManager.setVibrationT(a%this.transformManager.vibrationPeriodMs/this.transformManager.vibrationPeriodMs);this.viewer.refresh(3,"VibrationThread:run()");a=this.checkInterrupted()?
-2:0;break;case -2:this.viewer.startHoverWatcher(!0);return}},"~N")}),Clazz.declarePackage("J.api"),Clazz.declareInterface(J.api,"ApiPlatform"),Clazz.declarePackage("J.awtjs2d"),Clazz.load(["J.api.ApiPlatform"],"J.awtjs2d.Platform","java.net.URL J.api.Interface J.awtjs2d.AjaxURLStreamHandlerFactory $.Display $.Font $.Image $.JmolFile $.JmolFileAdapter $.Mouse".split(" "),function(){c$=Clazz.decorateAsClass(function(){this.fileAdapter=this.context=this.viewer=this.canvas=null;Clazz.instantialize(this,
arguments)},J.awtjs2d,"Platform",null,J.api.ApiPlatform);Clazz.overrideMethod(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 J.awtjs2d.AjaxURLStreamHandlerFactory)}catch(c){}},"J.api.JmolViewer,~O");Clazz.overrideMethod(c$,"isSingleThreaded",function(){return!0});Clazz.overrideMethod(c$,"getJsObjectInfo",function(a,b,c){return"localName"==
b?a[0].nodeName:null==c?a[0][b]:a[0][b](c[0])},"~A,~S,~A");Clazz.overrideMethod(c$,"isHeadless",function(){return!1});Clazz.overrideMethod(c$,"getFileAdapter",function(){return null==this.fileAdapter?this.fileAdapter=new J.awtjs2d.JmolFileAdapter:this.fileAdapter});Clazz.overrideMethod(c$,"newFile",function(a){return new J.awtjs2d.JmolFile(a)},"~S");Clazz.overrideMethod(c$,"getMouseManager",function(a,b){return new J.awtjs2d.Mouse(a,b)},"J.viewer.Viewer,J.viewer.ActionManager");Clazz.overrideMethod(c$,
"convertPointFromScreen",function(a,b){J.awtjs2d.Display.convertPointFromScreen(a,b)},"~O,J.util.P3");Clazz.overrideMethod(c$,"getFullScreenDimensions",function(a,b){J.awtjs2d.Display.getFullScreenDimensions(a,b)},"~O,~A");Clazz.overrideMethod(c$,"getMenuPopup",function(a,b,c){c="j"==c?"awtjs2d.JSmolPopup":"awtjs2d.JSModelKitPopup";var d=J.api.Interface.getOptionInterface(c);try{null!=d&&d.jpiInitialize(a,b)}catch(e){if(Clazz.exceptionOf(e,Exception))return System.out.println("Exception creating "+
c+":"+e),null;throw e;}return d},"J.viewer.Viewer,~S,~S");Clazz.overrideMethod(c$,"hasFocus",function(a){return J.awtjs2d.Display.hasFocus(a)},"~O");Clazz.overrideMethod(c$,"prompt",function(a,b,c,d){return J.awtjs2d.Display.prompt(a,b,c,d)},"~S,~S,~A,~B");Clazz.overrideMethod(c$,"renderScreenImage",function(a,b,c){J.awtjs2d.Display.renderScreenImage(a,b,c)},"J.api.JmolViewer,~O,~O");Clazz.overrideMethod(c$,"drawImage",function(a,b,c,d,e,f){J.awtjs2d.Image.drawImage(a,b,c,d,e,f)},"~O,~O,~N,~N,~N,~N");
Clazz.overrideMethod(c$,"requestFocusInWindow",function(a){J.awtjs2d.Display.requestFocusInWindow(a)},"~O");Clazz.overrideMethod(c$,"repaint",function(a){J.awtjs2d.Display.repaint(a)},"~O");Clazz.overrideMethod(c$,"setTransparentCursor",function(a){J.awtjs2d.Display.setTransparentCursor(a)},"~O");Clazz.overrideMethod(c$,"setCursor",function(a,b){J.awtjs2d.Display.setCursor(a,b)},"~N,~O");Clazz.overrideMethod(c$,"allocateRgbImage",function(a,b,c,d,e,f){return J.awtjs2d.Image.allocateRgbImage(a,b,c,
d,e,f?null:this.canvas)},"~N,~N,~A,~N,~B,~B");Clazz.overrideMethod(c$,"notifyEndOfRendering",function(){});Clazz.overrideMethod(c$,"createImage",function(){return null},"~O");Clazz.overrideMethod(c$,"disposeGraphics",function(){},"~O");Clazz.overrideMethod(c$,"grabPixels",function(a,b,c){a.image&&(b!=a.width||c!=a.height)&&Jmol._setCanvasImage(a,b,c);if(a.buf32)return a.buf32;b=J.awtjs2d.Image.grabPixels(J.awtjs2d.Image.getGraphics(a),b,c);return a.buf32=b},"~O,~N,~N,~A,~N,~N");Clazz.overrideMethod(c$,
"drawImageToBuffer",function(a,b,c,d,e){return this.grabPixels(c,d,e,null,0,0)},"~O,~O,~O,~N,~N,~N");Clazz.overrideMethod(c$,"getTextPixels",function(a,b,c,d,e,f,g){return J.awtjs2d.Image.getTextPixels(a,b,c,e,f,g)},"~S,J.util.JmolFont,~O,~O,~N,~N,~N");Clazz.overrideMethod(c$,"flushImage",function(){},"~O");Clazz.overrideMethod(c$,"getGraphics",function(a){return J.awtjs2d.Image.getGraphics(a)},"~O");Clazz.overrideMethod(c$,"getImageHeight",function(a){return J.awtjs2d.Image.getHeight(a)},"~O");Clazz.overrideMethod(c$,
"getImageWidth",function(a){return J.awtjs2d.Image.getWidth(a)},"~O");Clazz.overrideMethod(c$,"getJpgImage",function(a,b,c){return J.awtjs2d.Image.getJpgImage(this,a,b,c)},"J.viewer.Viewer,~N,~S");Clazz.overrideMethod(c$,"getStaticGraphics",function(a,b){return J.awtjs2d.Image.getStaticGraphics(a,b)},"~O,~B");Clazz.overrideMethod(c$,"newBufferedImage",function(a,b,c){return"undefined"!=typeof Jmol&&Jmol._getHiddenCanvas?Jmol._getHiddenCanvas(this.viewer.applet,"stereoImage",b,c):null},"~O,~N,~N");
Clazz.overrideMethod(c$,"newOffScreenImage",function(a,b){return"undefined"!=typeof Jmol&&Jmol._getHiddenCanvas?Jmol._getHiddenCanvas(this.viewer.applet,"textImage",a,b):null},"~N,~N");Clazz.overrideMethod(c$,"waitForDisplay",function(a,b){if("undefined"==typeof Jmol||!Jmol._getHiddenCanvas)return!1;var c=this.viewer,d=c.getEvalContextAndHoldQueue(c.eval),e=a[0];return Jmol._loadImage(this,a,b,function(a,b){c.loadImageData(a,b,e,d)})},"~O,~O");Clazz.overrideMethod(c$,"fontStringWidth",function(a,
b,c){return J.awtjs2d.Font.stringWidth(a,b,c)},"J.util.JmolFont,~O,~S");Clazz.overrideMethod(c$,"getFontAscent",function(a){return J.awtjs2d.Font.getAscent(a)},"~O");Clazz.overrideMethod(c$,"getFontDescent",function(a){return J.awtjs2d.Font.getDescent(a)},"~O");Clazz.overrideMethod(c$,"getFontMetrics",function(a,b){return J.awtjs2d.Font.getFontMetrics(a,b)},"J.util.JmolFont,~O");Clazz.overrideMethod(c$,"newFont",function(a,b,c,d){return J.awtjs2d.Font.newFont(a,b,c,d,"px")},"~S,~B,~B,~N");Clazz.overrideMethod(c$,
"getDateFormat",function(){return null})}),Clazz.declarePackage("J.awtjs2d"),Clazz.load(["java.net.URLStreamHandlerFactory","java.util.Hashtable"],"J.awtjs2d.AjaxURLStreamHandlerFactory",["J.awtjs2d.AjaxURLStreamHandler"],function(){c$=Clazz.decorateAsClass(function(){this.htFactories=null;Clazz.instantialize(this,arguments)},J.awtjs2d,"AjaxURLStreamHandlerFactory",null,java.net.URLStreamHandlerFactory);Clazz.prepareFields(c$,function(){this.htFactories=new java.util.Hashtable});Clazz.overrideMethod(c$,
"createURLStreamHandler",function(a){var b=this.htFactories.get(a);null==b&&this.htFactories.put(a,b=new J.awtjs2d.AjaxURLStreamHandler(a));return null==b.protocol?null:b},"~S")}),Clazz.declarePackage("J.awtjs2d"),Clazz.load(["java.net.URLStreamHandler"],"J.awtjs2d.AjaxURLStreamHandler",["J.awtjs2d.JmolURLConnection","J.util.SB"],function(){c$=Clazz.decorateAsClass(function(){this.protocol=null;Clazz.instantialize(this,arguments)},J.awtjs2d,"AjaxURLStreamHandler",java.net.URLStreamHandler);Clazz.makeConstructor(c$,
function(a){Clazz.superConstructor(this,J.awtjs2d.AjaxURLStreamHandler,[]);this.protocol=a},"~S");Clazz.overrideMethod(c$,"openConnection",function(a){return new J.awtjs2d.JmolURLConnection(a)},"java.net.URL");Clazz.overrideMethod(c$,"toExternalForm",function(a){var b=new J.util.SB;b.append(a.getProtocol());b.append(":");null!=a.getAuthority()&&0<a.getAuthority().length&&(b.append("//"),b.append(a.getAuthority()));null!=a.getPath()&&b.append(a.getPath());null!=a.getQuery()&&(b.append("?"),b.append(a.getQuery()));
null!=a.getRef()&&(b.append("#"),b.append(a.getRef()));return b.toString()},"java.net.URL")}),Clazz.declarePackage("J.awtjs2d"),c$=Clazz.declareType(J.awtjs2d,"Display"),c$.getFullScreenDimensions=$_M(c$,"getFullScreenDimensions",function(a,b){b[0]=a.width;b[1]=a.height},"~O,~A"),c$.hasFocus=$_M(c$,"hasFocus",function(){return!0},"~O"),c$.requestFocusInWindow=$_M(c$,"requestFocusInWindow",function(){},"~O"),c$.repaint=$_M(c$,"repaint",function(){},"~O"),c$.renderScreenImage=$_M(c$,"renderScreenImage",
function(){},"J.api.JmolViewer,~O,~O"),c$.setTransparentCursor=$_M(c$,"setTransparentCursor",function(){},"~O"),c$.setCursor=$_M(c$,"setCursor",function(){},"~N,~O"),c$.prompt=$_M(c$,"prompt",function(a,b){var c=prompt(a,b);return null!=c?c:"null"},"~S,~S,~A,~B"),c$.convertPointFromScreen=$_M(c$,"convertPointFromScreen",function(){},"~O,J.util.P3"),Clazz.declarePackage("J.awtjs2d"),c$=Clazz.declareType(J.awtjs2d,"Font"),c$.newFont=$_M(c$,"newFont",function(a,b,c,d,e){a=a.equals("Monospaced")?"Courier":
a.startsWith("Sans")?"Sans-Serif":"Serif";return(b?"bold ":"")+(c?"italic ":"")+d+e+" "+a},"~S,~B,~B,~N,~S"),c$.getFontMetrics=$_M(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},"J.util.JmolFont,~O"),c$.getAscent=$_M(c$,"getAscent",function(a){return Math.ceil(a._fontAscent)},"~O"),c$.getDescent=$_M(c$,"getDescent",function(a){return Math.ceil(a._fontDescent)},"~O"),c$.stringWidth=
$_M(c$,"stringWidth",function(a,b,c){b.font=a.font;return Math.ceil(b.measureText(c).width)},"J.util.JmolFont,~O,~S"),Clazz.declarePackage("J.awtjs2d"),c$=Clazz.declareType(J.awtjs2d,"Image"),c$.getWidth=$_M(c$,"getWidth",function(a){return a.imageWidth?a.imageWidth:a.width},"~O"),c$.getHeight=$_M(c$,"getHeight",function(a){return a.imageHeight?a.imageHeight:a.height},"~O"),c$.getJpgImage=$_M(c$,"getJpgImage",function(){return null},"J.api.ApiPlatform,J.viewer.Viewer,~N,~S"),c$.grabPixels=$_M(c$,
"grabPixels",function(a,b,c){if(a._buf32)return a._buf32;a=a.getImageData(0,0,b,c).data;return this.toIntARGB(a)},"~O,~N,~N"),c$.toIntARGB=$_M(c$,"toIntARGB",function(a){for(var b=Clazz.doubleToInt(a.length/4),c=Clazz.newIntArray(b,0),d=0,e=0;d<b;e++)c[d++]=a[e++]<<16|a[e++]<<8|a[e++]|4278190080;return c},"~A"),c$.fromIntARGB=$_M(c$,"fromIntARGB",function(a,b){for(var c=b.length>>2,d=0,e=0;d<c;d++)b[e++]=a[d]>>16&255,b[e++]=a[d]>>8&255,b[e++]=a[d]&255,b[e++]=255},"~A,~A"),c$.getTextPixels=$_M(c$,
"getTextPixels",function(a,b,c,d,e,f){c.fillStyle="#000000";c.fillRect(0,0,d,e);c.fillStyle="#FFFFFF";c.font=b.font;c.fillText(a,0,f);return this.grabPixels(c,d,e)},"~S,J.util.JmolFont,~O,~N,~N,~N"),c$.allocateRgbImage=$_M(c$,"allocateRgbImage",function(a,b,c,d,e,f){null==f&&(f={width:a,height:b});f.buf32=c;return f},"~N,~N,~A,~N,~B,~O"),c$.getStaticGraphics=$_M(c$,"getStaticGraphics",function(a){return this.getGraphics(a)},"~O,~B"),c$.getGraphics=$_M(c$,"getGraphics",function(a){return a.getContext("2d")},
"~O"),c$.drawImage=$_M(c$,"drawImage",function(a,b,c,d){this.fromIntARGB(b.buf32,b.buf8);a.putImageData(b.imgdata,c,d)},"~O,~O,~N,~N,~N,~N"),Clazz.declarePackage("J.api"),Clazz.declareInterface(J.api,"JmolFileInterface"),Clazz.declarePackage("J.awtjs2d"),Clazz.load(["J.api.JmolFileInterface"],"J.awtjs2d.JmolFile",["J.util.TextFormat","J.viewer.FileManager","$.Viewer"],function(){c$=Clazz.decorateAsClass(function(){this.fullName=this.name=null;Clazz.instantialize(this,arguments)},J.awtjs2d,"JmolFile",
null,J.api.JmolFileInterface);Clazz.makeConstructor(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=J.util.TextFormat.simpleReplace(this.fullName,"/./","/");a.substring(a.lastIndexOf("/")+1)},"~S");Clazz.overrideMethod(c$,"getParentAsFile",function(){var a=this.fullName.lastIndexOf("/");return 0>a?null:new J.awtjs2d.JmolFile(this.fullName.substring(0,
a))});Clazz.overrideMethod(c$,"getAbsolutePath",function(){return this.fullName});Clazz.overrideMethod(c$,"getName",function(){return this.name});Clazz.overrideMethod(c$,"isDirectory",function(){return this.fullName.endsWith("/")});Clazz.overrideMethod(c$,"length",function(){return 0})}),Clazz.declarePackage("J.api"),Clazz.declareInterface(J.api,"JmolFileAdapterInterface"),Clazz.declarePackage("J.awtjs2d"),Clazz.load(["J.api.JmolFileAdapterInterface"],"J.awtjs2d.JmolFileAdapter",["java.net.UnknownServiceException"],
function(){c$=Clazz.declareType(J.awtjs2d,"JmolFileAdapter",null,J.api.JmolFileAdapterInterface);Clazz.overrideMethod(c$,"getBufferedFileInputStream",function(){try{throw new java.net.UnknownServiceException("No local file reading in JavaScript version of Jmol");}catch(a){if(Clazz.exceptionOf(a,java.io.IOException))return a.toString();throw a;}},"~S");Clazz.overrideMethod(c$,"getBufferedURLInputStream",function(a,b,c){try{var d=a.openConnection();null!=b?d.outputBytes(b):null!=c&&d.outputString(c);
return d.getStringXBuilder()}catch(e){if(Clazz.exceptionOf(e,java.io.IOException))return e.toString();throw e;}},"java.net.URL,~A,~S")}),Clazz.declarePackage("J.api"),Clazz.declareInterface(J.api,"JmolMouseInterface"),Clazz.declarePackage("J.api"),c$=Clazz.declareType(J.api,"Event"),Clazz.defineStatics(c$,"MOUSE_LEFT",16,"MOUSE_MIDDLE",8,"MOUSE_RIGHT",4,"MOUSE_WHEEL",32,"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,"META_MASK",4,"VK_SHIFT",16,"VK_ALT",18,"VK_CONTROL",17,"VK_LEFT",37,"VK_RIGHT",39,"VK_PERIOD",46,"VK_SPACE",32,"VK_DOWN",40,"VK_UP",38),Clazz.declarePackage("J.awtjs2d"),Clazz.load(["J.api.JmolMouseInterface","$.Event"],"J.awtjs2d.Mouse",["java.lang.Character","J.util.Escape","$.Logger","$.V3"],function(){c$=Clazz.decorateAsClass(function(){this.actionManager=this.viewer=null;this.keyBuffer="";this.isMouseDown=!1;this.modifiersWhenPressed10=this.yWhenPressed=this.xWhenPressed=0;Clazz.instantialize(this,
arguments)},J.awtjs2d,"Mouse",null,J.api.JmolMouseInterface);Clazz.makeConstructor(c$,function(a,b){this.viewer=a;this.actionManager=b},"J.viewer.Viewer,J.viewer.ActionManager");Clazz.overrideMethod(c$,"clear",function(){});Clazz.overrideMethod(c$,"dispose",function(){this.actionManager.dispose()});Clazz.overrideMethod(c$,"handleOldJvm10Event",function(a,b,c,d,e){-1!=a&&(d=J.awtjs2d.Mouse.applyLeftMouse(d));switch(a){case -1:this.wheeled(e,b,d|32);break;case 501:this.xWhenPressed=b;this.yWhenPressed=
c;this.modifiersWhenPressed10=d;this.pressed(e,b,c,d,!1);break;case 506:this.dragged(e,b,c,d);break;case 504:this.entered(e,b,c);break;case 505:this.exited(e,b,c);break;case 503:this.moved(e,b,c,d);break;case 502:this.released(e,b,c,d);b==this.xWhenPressed&&(c==this.yWhenPressed&&d==this.modifiersWhenPressed10)&&this.clicked(e,b,c,d,1);break;default:return!1}return!0},"~N,~N,~N,~N,~N");$_M(c$,"processTwoPointGesture",function(a){if(!(2>a[0].length)){var b=a[0],c=a[1],d=b[0],e=b[c.length-1];a=d[0];
var f=e[0],d=d[1],e=e[1],g=J.util.V3.new3(f-a,e-d,0),h=g.length(),k=c[0],l=c[c.length-1],c=k[0],m=l[0],k=k[1],l=l[1],n=J.util.V3.new3(m-c,l-k,0),p=n.length();3>h||3>p||(g.normalize(),n.normalize(),g=g.dot(n),0.8<g?(a=Clazz.floatToInt(f-b[b.length-2][0]),b=Clazz.floatToInt(e-b[b.length-2][1]),this.viewer.translateXYBy(a,b)):-0.8>g&&(g=J.util.V3.new3(c-a,k-d,0),n=J.util.V3.new3(m-f,l-e,0),b=n.length()-g.length(),this.wheeled(System.currentTimeMillis(),0>b?-1:1,32)))}},"~A");$_M(c$,"mouseClicked",function(a){this.clicked(a.getWhen(),
a.getX(),a.getY(),a.getModifiers(),a.getClickCount())},"java.awt.event.MouseEvent");$_M(c$,"mouseEntered",function(a){this.entered(a.getWhen(),a.getX(),a.getY())},"java.awt.event.MouseEvent");$_M(c$,"mouseExited",function(a){this.exited(a.getWhen(),a.getX(),a.getY())},"java.awt.event.MouseEvent");$_M(c$,"mousePressed",function(a){this.pressed(a.getWhen(),a.getX(),a.getY(),a.getModifiers(),a.isPopupTrigger())},"java.awt.event.MouseEvent");$_M(c$,"mouseReleased",function(a){this.released(a.getWhen(),
a.getX(),a.getY(),a.getModifiers())},"java.awt.event.MouseEvent");$_M(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");$_M(c$,"mouseMoved",function(a){this.moved(a.getWhen(),a.getX(),a.getY(),a.getModifiers())},"java.awt.event.MouseEvent");$_M(c$,"mouseWheelMoved",function(a){a.consume();this.wheeled(a.getWhen(),a.getWheelRotation(),a.getModifiers()|32)},"java.awt.event.MouseWheelEvent");$_M(c$,"keyTyped",
function(a){a.consume();if(this.viewer.menuEnabled()){var b=a.getKeyChar(),c=a.getModifiers();J.util.Logger.debuggingHigh&&J.util.Logger.debug("MouseManager keyTyped: "+b+" "+(0+b.charCodeAt(0))+" "+c);if(0!=c&&1!=c)switch(b){case String.fromCharCode(11):case "k":a=!this.viewer.getBooleanProperty("allowKeyStrokes");switch(c){case 2:this.viewer.setBooleanProperty("allowKeyStrokes",a);this.viewer.setBooleanProperty("showKeyStrokes",!0);break;case 10:case 8:this.viewer.setBooleanProperty("allowKeyStrokes",
a),this.viewer.setBooleanProperty("showKeyStrokes",!1)}this.clearKeyBuffer();this.viewer.refresh(3,"showkey");break;case 26:case "z":switch(c){case 2:this.viewer.undoMoveAction(4165,1);break;case 3:this.viewer.undoMoveAction(4139,1)}break;case 25:case "y":switch(c){case 2:this.viewer.undoMoveAction(4139,1)}}else this.viewer.getBooleanProperty("allowKeyStrokes")&&this.addKeyBuffer(1==a.getModifiers()?Character.toUpperCase(b):b)}},"java.awt.event.KeyEvent");$_M(c$,"keyPressed",function(a){this.viewer.isApplet()&&
a.consume();this.actionManager.keyPressed(a.getKeyCode(),a.getModifiers())},"java.awt.event.KeyEvent");$_M(c$,"keyReleased",function(a){a.consume();this.actionManager.keyReleased(a.getKeyCode())},"java.awt.event.KeyEvent");$_M(c$,"clearKeyBuffer",($fz=function(){0!=this.keyBuffer.length&&(this.keyBuffer="",this.viewer.getBooleanProperty("showKeyStrokes")&&this.viewer.evalStringQuiet('!set echo _KEYSTROKES; set echo bottom left;echo ""'))},$fz.isPrivate=!0,$fz));$_M(c$,"addKeyBuffer",($fz=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.evalStringQuiet("!set echo _KEYSTROKES; set echo bottom left;echo "+J.util.Escape.eS("\u0001"+this.keyBuffer)))},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"sendKeyBuffer",($fz=function(){var a=this.keyBuffer;this.viewer.getBooleanProperty("showKeyStrokes")&&this.viewer.evalStringQuiet("!set echo _KEYSTROKES; set echo bottom left;echo "+
J.util.Escape.eS(this.keyBuffer));this.clearKeyBuffer();this.viewer.script(a)},$fz.isPrivate=!0,$fz));$_M(c$,"entered",($fz=function(a,b,c){this.actionManager.mouseEntered(a,b,c)},$fz.isPrivate=!0,$fz),"~N,~N,~N");$_M(c$,"exited",($fz=function(a,b,c){this.actionManager.mouseExited(a,b,c)},$fz.isPrivate=!0,$fz),"~N,~N,~N");$_M(c$,"clicked",($fz=function(a,b,c,d){this.clearKeyBuffer();this.actionManager.mouseAction(2,a,b,c,1,d)},$fz.isPrivate=!0,$fz),"~N,~N,~N,~N,~N");$_M(c$,"moved",($fz=function(a,
b,c,d){this.clearKeyBuffer();this.isMouseDown?this.actionManager.mouseAction(1,a,b,c,0,J.awtjs2d.Mouse.applyLeftMouse(d)):this.actionManager.mouseAction(0,a,b,c,0,d)},$fz.isPrivate=!0,$fz),"~N,~N,~N,~N");$_M(c$,"wheeled",($fz=function(a,b,c){this.clearKeyBuffer();this.actionManager.mouseAction(3,a,0,b,0,c)},$fz.isPrivate=!0,$fz),"~N,~N,~N");$_M(c$,"pressed",($fz=function(a,b,c,d){this.clearKeyBuffer();this.isMouseDown=!0;this.actionManager.mouseAction(4,a,b,c,0,d)},$fz.isPrivate=!0,$fz),"~N,~N,~N,~N,~B");
$_M(c$,"released",($fz=function(a,b,c,d){this.isMouseDown=!1;this.actionManager.mouseAction(5,a,b,c,0,d)},$fz.isPrivate=!0,$fz),"~N,~N,~N,~N");$_M(c$,"dragged",($fz=function(a,b,c,d){20==(d&20)&&(d=d&-5|2);this.actionManager.mouseAction(1,a,b,c,0,d)},$fz.isPrivate=!0,$fz),"~N,~N,~N,~N");c$.applyLeftMouse=$_M(c$,"applyLeftMouse",($fz=function(a){return 0==(a&28)?a|16:a},$fz.isPrivate=!0,$fz),"~N")}),Clazz.declarePackage("J.api"),Clazz.load(["J.api.JmolGraphicsInterface"],"J.api.JmolRendererInterface",
null,function(){Clazz.declareInterface(J.api,"JmolRendererInterface",J.api.JmolGraphicsInterface)}),Clazz.declarePackage("J.g3d"),Clazz.load(["J.api.JmolRendererInterface","J.util.GData","$.Normix","$.V3"],"J.g3d.Graphics3D","java.lang.NullPointerException java.util.Arrays J.constant.EnumStereoMode J.g3d.CircleRenderer $.CylinderRenderer $.HermiteRenderer $.ImageRenderer $.LineRenderer $.Pixelator $.PixelatorShaded $.Platform3D $.SphereRenderer $.TextRenderer $.TextSorter $.TextString $.TriangleRenderer J.util.ArrayUtil $.C $.JmolFont $.Shader".split(" "),
function(){c$=Clazz.decorateAsClass(function(){this.hermite3d=this.cylinder3d=this.triangle3d=this.sphere3d=this.circle3d=this.line3d=this.platform=null;this.antialias2=this.isFullSceneAntialiasingEnabled=!1;this.strings=null;this.stringCount=0;this.anaglyphChannelBytes=null;this.translucentCoverOnly=this.$haveTranslucentObjects=this.addAllPixels=this.twoPass=!1;this.zbufT=this.zbuf=this.pbufT=this.pbuf=null;this.translucencyMask=0;this.shadesCurrent=null;this.anaglyphLength=0;this.isScreened=!1;
this.argbNoisyDn=this.argbNoisyUp=0;this.pixel=this.currentFont=null;this.saveDiffuse=this.saveAmbient=this.translucencyLog=this.lastRawColor=this.currentShadeIndex=this.zMargin=0;this.$currentlyRendering=!1;this.shadeIndexes2Sided=this.shadeIndexes=this.transformedVectors=this.vectorNormal=this.vectorAC=this.vectorAB=null;Clazz.instantialize(this,arguments)},J.g3d,"Graphics3D",J.util.GData,J.api.JmolRendererInterface);Clazz.prepareFields(c$,function(){this.vectorAB=new J.util.V3;this.vectorAC=new J.util.V3;
this.vectorNormal=new J.util.V3;this.transformedVectors=Array(J.g3d.Graphics3D.normixCount);for(var a=J.g3d.Graphics3D.normixCount;0<=--a;)this.transformedVectors[a]=new J.util.V3;this.shadeIndexes=Clazz.newByteArray(J.g3d.Graphics3D.normixCount,0);this.shadeIndexes2Sided=Clazz.newByteArray(J.g3d.Graphics3D.normixCount,0)});Clazz.overrideMethod(c$,"clear",function(){this.stringCount=0;this.strings=null;J.g3d.TextRenderer.clearFontCache()});Clazz.overrideMethod(c$,"destroy",function(){this.releaseBuffers();
this.graphicsForMetrics=this.platform=null});Clazz.overrideMethod(c$,"getGData",function(){return this});Clazz.overrideMethod(c$,"setTranslucentCoverOnly",function(a){this.translucentCoverOnly=a},"~B");$_M(c$,"setZMargin",function(a){this.zMargin=a},"~N");Clazz.makeConstructor(c$,function(){Clazz.superConstructor(this,J.g3d.Graphics3D,[])});Clazz.overrideMethod(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.circle3d=new J.g3d.CircleRenderer(this);this.sphere3d=new J.g3d.SphereRenderer(this);this.triangle3d=new J.g3d.TriangleRenderer(this);this.cylinder3d=new J.g3d.CylinderRenderer(this);this.hermite3d=new J.g3d.HermiteRenderer(this)},"J.api.ApiPlatform");Clazz.overrideMethod(c$,"currentlyRendering",function(){return this.$currentlyRendering});Clazz.overrideMethod(c$,"setWindowParameters",function(a,b,c){this.setWinParams(a,b,c);this.$currentlyRendering&&
this.endRendering()},"~N,~N,~B");Clazz.overrideMethod(c$,"checkTranslucent",function(a){a&&(this.$haveTranslucentObjects=!0);return!this.twoPass||this.twoPass&&this.$isPass2==a},"~B");Clazz.overrideMethod(c$,"beginRendering",function(a,b){this.$currentlyRendering&&this.endRendering();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(var c=Math.min(this.strings.length,this.stringCount);0<=--c;)this.strings[c]=null;this.stringCount=0;this.twoPass=!0;this.$isPass2=!1;this.colixCurrent=0;this.$haveTranslucentObjects=!1;this.addAllPixels=!0;null==this.pbuf&&(this.platform.allocateBuffers(this.windowWidth,this.windowHeight,
this.antialiasThisFrame,b),this.pbuf=this.platform.pBuffer,this.zbuf=this.platform.zBuffer);this.setWidthHeight(this.antialiasThisFrame);this.platform.clearBuffer();null!=this.backgroundImage&&this.plotImage(-2147483648,0,-2147483648,this.backgroundImage,null,0,0,0)},"J.util.Matrix3f,~B");Clazz.overrideMethod(c$,"setBackgroundTransparent",function(a){null!=this.platform&&this.platform.setBackgroundTransparent(a)},"~B");$_M(c$,"releaseBuffers",($fz=function(){this.zbufT=this.pbufT=this.zbuf=this.pbuf=
null;this.platform.releaseBuffers()},$fz.isPrivate=!0,$fz));Clazz.overrideMethod(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");Clazz.overrideMethod(c$,"endRendering",function(){this.$currentlyRendering&&(null!=this.pbuf&&(this.$isPass2&&this.mergeOpaqueAndTranslucentBuffers(),this.antialiasThisFrame&&this.downsampleFullSceneAntialiasing(!1)),this.platform.setBackgroundColor(this.bgcolor),this.platform.notifyEndOfRendering(),this.$currentlyRendering=!1)});Clazz.overrideMethod(c$,"getScreenImage",function(a){var b=this.platform.bufferedImage;a&&this.releaseBuffers();return b},"~B");Clazz.overrideMethod(c$,"applyAnaglygh",
function(a,b){switch(a){case J.constant.EnumStereoMode.REDCYAN:this.applyCyanAnaglyph();break;case J.constant.EnumStereoMode.CUSTOM:this.applyCustomAnaglyph(b);break;case J.constant.EnumStereoMode.REDBLUE:this.applyBlueAnaglyph();break;case J.constant.EnumStereoMode.REDGREEN:this.applyGreenAnaglyph()}},"J.constant.EnumStereoMode,~A");Clazz.overrideMethod(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=Clazz.newByteArray(this.anaglyphLength,0);for(var a=this.anaglyphLength;0<=--a;)this.anaglyphChannelBytes[a]=this.pbuf[a]});$_M(c$,"applyCustomAnaglyph",function(a){var b=a[0];a=a[1]&16777215;for(var c=this.anaglyphLength;0<=--c;){var d=this.anaglyphChannelBytes[c]&255,d=(d|(d|d<<8)<<8)&a;this.pbuf[c]=this.pbuf[c]&b|d}},"~A");$_M(c$,"applyGreenAnaglyph",function(){for(var a=this.anaglyphLength;0<=
--a;)this.pbuf[a]=this.pbuf[a]&4294901760|(this.anaglyphChannelBytes[a]&255)<<8});$_M(c$,"applyBlueAnaglyph",function(){for(var a=this.anaglyphLength;0<=--a;)this.pbuf[a]=this.pbuf[a]&4294901760|this.anaglyphChannelBytes[a]&255});$_M(c$,"applyCyanAnaglyph",function(){for(var a=this.anaglyphLength;0<=--a;){var b=this.anaglyphChannelBytes[a]&255;this.pbuf[a]=this.pbuf[a]&4294901760|b<<8|b}});Clazz.overrideMethod(c$,"releaseScreenImage",function(){this.platform.clearScreenBufferThreaded()});Clazz.overrideMethod(c$,
"haveTranslucentObjects",function(){return this.$haveTranslucentObjects});$_M(c$,"setTempZSlab",function(a){this.zSlab=a},"~N");Clazz.overrideMethod(c$,"setZShade",function(a,b,c,d){a?(this.setZShade2(b,c,d),this.pixel=new J.g3d.PixelatorShaded(this)):this.pixel=new J.g3d.Pixelator(this)},"~B,~N,~N,~N");$_M(c$,"downsampleFullSceneAntialiasing",($fz=function(a){var b=this.width,c=0,d=0,e=this.bgcolor;a&&(e+=255==(e&255)?-1:1);for(var f=0;f<this.pbuf.length;f++)0==this.pbuf[f]&&(this.pbuf[f]=e);e&=
16777215;for(f=this.windowHeight;0<=--f;d+=b)for(var g=this.windowWidth;0<=--g;++c){var h=(this.pbuf[d]>>2&1061109567)+(this.pbuf[d++ +b]>>2&1061109567)+(this.pbuf[d]>>2&1061109567)+(this.pbuf[d++ +b]>>2&1061109567),h=h+((h&3233857728)>>6);this.pbuf[c]=h&16777215|4278190080}if(a){c=d=0;for(f=this.windowHeight;0<=--f;d+=b)for(g=this.windowWidth;0<=--g;++c,++d)a=Math.min(this.zbuf[d],this.zbuf[d+b]),a=Math.min(a,this.zbuf[++d]),a=Math.min(a,this.zbuf[d+b]),2147483647!=a&&(a>>=1),this.zbuf[c]=this.pbuf[c]==
e?2147483647:a;this.antialiasThisFrame=!1;this.setWidthHeight(!1)}},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"mergeOpaqueAndTranslucentBuffers",function(){if(null!=this.pbufT)for(var a=0;a<this.bufferSize;a++)J.g3d.Graphics3D.mergeBufferPixel(this.pbuf,a,this.pbufT[a],this.bgcolor)});c$.mergeBufferPixel=$_M(c$,"mergeBufferPixel",function(a,b,c,d){if(0!=c){var e=a[b];if(e!=c){0==e&&(e=d);d=e&16711935;var e=e&65280,f=c&16711935,g=c&65280;switch(c>>24&15){case 0:d=f;e=g;break;case 1:d=(f<<2)+(f<<1)+f+d>>3&
16711935;e=(g<<2)+ +(g<<1)+g+e>>3&65280;break;case 2:d=(f<<1)+f+d>>2&16711935;e=(g<<1)+g+e>>2&65280;break;case 3:d=(f<<2)+f+(d<<1)+d>>3&16711935;e=(g<<2)+g+(e<<1)+e>>3&65280;break;case 4:d=d+f>>1&16711935;e=e+g>>1&65280;break;case 5:d=(f<<1)+f+(d<<2)+d>>3&16711935;e=(g<<1)+g+(e<<2)+e>>3&65280;break;case 6:d=(d<<1)+d+f>>2&16711935;e=(e<<1)+e+g>>2&65280;break;case 7:d=(d<<2)+(d<<1)+d+f>>3&16711935,e=(e<<2)+(e<<1)+e+g>>3&65280}a[b]=4278190080|d|e}}},"~A,~N,~N,~N");$_M(c$,"hasContent",function(){return this.platform.hasContent()});
Clazz.overrideMethod(c$,"setColor",function(a){this.argbCurrent=this.argbNoisyUp=this.argbNoisyDn=a},"~N");Clazz.overrideMethod(c$,"setColix",function(a){var b=J.util.C.isColixLastAvailable(a);if(!b&&a==this.colixCurrent&&-1==this.currentShadeIndex)return!0;var c=a&30720;if(16384==c)return!1;var d=0!=c;this.isScreened=d&&30720==c;if(!this.checkTranslucent(d&&!this.isScreened))return!1;this.addAllPixels=this.$isPass2||!d;this.$isPass2?(this.translucencyMask=c<<13|16777215,this.translucencyLog=c>>11):
this.translucencyLog=0;this.colixCurrent=a;b&&this.argbCurrent!=this.lastRawColor&&(0==this.argbCurrent&&(this.argbCurrent=4294967295),this.lastRawColor=this.argbCurrent,this.shader.setLastColix(this.argbCurrent,this.inGreyscaleMode));this.shadesCurrent=this.getShades(a);this.currentShadeIndex=-1;this.setColor(this.getColorArgbOrGray(a));return!0},"~N");$_M(c$,"addPixel",function(a,b,c){this.pixel.addPixel(a,b,c)},"~N,~N,~N");$_M(c$,"clearPixel",function(a,b){this.pixel.clearPixel(a,b)},"~N,~N");
Clazz.overrideMethod(c$,"drawFilledCircle",function(a,b,c,d,e,f){if(!this.isClippedZ(f)){var g=Clazz.doubleToInt((c+1)/2),g=d<g||d+g>=this.width||e<g||e+g>=this.height;if(!g||!this.isClippedXY(c,d,e))0!=a&&this.setColix(a)&&(g?this.circle3d.plotCircleCenteredClipped(d,e,f,c):this.circle3d.plotCircleCenteredUnclipped(d,e,f,c)),0!=b&&this.setColix(b)&&(g?this.circle3d.plotFilledCircleCenteredClipped(d,e,f,c):this.circle3d.plotFilledCircleCenteredUnclipped(d,e,f,c))}},"~N,~N,~N,~N,~N,~N");Clazz.overrideMethod(c$,
"volumeRender4",function(a,b,c,d){if(1==a)this.plotPixelClippedXYZ(b,c,d);else if(!this.isClippedZ(d)){var e=Clazz.doubleToInt((a+1)/2),e=b<e||b+e>=this.width||c<e||c+e>=this.height;if(!e||!this.isClippedXY(a,b,c))e?this.circle3d.plotFilledCircleCenteredClipped(b,c,d,a):this.circle3d.plotFilledCircleCenteredUnclipped(b,c,d,a)}},"~N,~N,~N,~N");Clazz.overrideMethod(c$,"fillSphereXYZ",function(a,b,c,d){switch(a){case 1:this.plotPixelClippedArgb(this.argbCurrent,b,c,d);return;case 0:return}a<=(this.antialiasThisFrame?
2E3:1E3)&&this.sphere3d.render(this.shadesCurrent,!this.addAllPixels,a,b,c,d,null,null,null,-1,null,this.addAllPixels)},"~N,~N,~N,~N");Clazz.overrideMethod(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");Clazz.overrideMethod(c$,"fillSphereI",function(a,b){this.fillSphereXYZ(a,b.x,b.y,
b.z)},"~N,J.util.P3i");Clazz.overrideMethod(c$,"fillSphere",function(a,b){this.fillSphereXYZ(a,Math.round(b.x),Math.round(b.y),Math.round(b.z))},"~N,J.util.P3");Clazz.overrideMethod(c$,"fillEllipsoid",function(a,b,c,d,e,f,g,h,k,l,m){switch(f){case 1:this.plotPixelClippedArgb(this.argbCurrent,c,d,e);return;case 0:return}f<=(this.antialiasThisFrame?2E3:1E3)&&this.sphere3d.render(this.shadesCurrent,!this.addAllPixels,f,c,d,e,g,h,k,l,m,this.addAllPixels)},"J.util.P3,~A,~N,~N,~N,~N,J.util.Matrix3f,~A,J.util.Matrix4f,~N,~A");
Clazz.overrideMethod(c$,"drawRect",function(a,b,c,d,e,f){if(!(0!=d&&this.isClippedZ(d))){d=e-1;f-=1;e=a+d;var g=b+f;0<=b&&b<this.height&&this.drawHLine(a,b,c,d);0<=g&&g<this.height&&this.drawHLine(a,g,c,d);0<=a&&a<this.width&&this.drawVLine(a,b,c,f);0<=e&&e<this.width&&this.drawVLine(e,b,c,f)}},"~N,~N,~N,~N,~N,~N");$_M(c$,"drawHLine",($fz=function(a,b,c,d){0>d&&(a+=d,d=-d);0>a&&(d+=a,a=0);a+d>=this.width&&(d=this.width-1-a);var e=a+this.width*b;if(this.addAllPixels)for(a=0;a<=d;a++)c<this.zbuf[e]&&
this.addPixel(e,c,this.argbCurrent),e++;else{b=0!=((a^b)&1);for(a=0;a<=d;a++)(b=!b)&&c<this.zbuf[e]&&this.addPixel(e,c,this.argbCurrent),e++}},$fz.isPrivate=!0,$fz),"~N,~N,~N,~N");$_M(c$,"drawVLine",($fz=function(a,b,c,d){0>d&&(b+=d,d=-d);0>b&&(d+=b,b=0);b+d>=this.height&&(d=this.height-1-b);var e=a+this.width*b;if(this.addAllPixels)for(a=0;a<=d;a++)c<this.zbuf[e]&&this.addPixel(e,c,this.argbCurrent),e+=this.width;else{b=0!=((a^b)&1);for(a=0;a<=d;a++)(b=!b)&&c<this.zbuf[e]&&this.addPixel(e,c,this.argbCurrent),
e+=this.width}},$fz.isPrivate=!0,$fz),"~N,~N,~N,~N");Clazz.overrideMethod(c$,"fillRect",function(a,b,c,d,e,f){if(!this.isClippedZ(d)){if(0>a){e+=a;if(0>=e)return;a=0}if(a+e>this.width&&(e=this.width-a,0>=e))return;if(0>b){f+=b;if(0>=f)return;b=0}for(b+f>this.height&&(f=this.height-b);0<=--f;)this.plotPixelsUnclippedCount(e,a,b++,c)}},"~N,~N,~N,~N,~N,~N");Clazz.overrideMethod(c$,"drawString",function(a,b,c,d,e,f,g){this.currentShadeIndex=0;null!=a&&(this.isClippedZ(f)||this.drawStringNoSlab(a,b,c,
d,e,g))},"~S,J.util.JmolFont,~N,~N,~N,~N,~N");Clazz.overrideMethod(c$,"drawStringNoSlab",function(a,b,c,d,e,f){if(null!=a){null==this.strings&&(this.strings=Array(10));this.stringCount==this.strings.length&&(this.strings=J.util.ArrayUtil.doubleLength(this.strings));var g=new J.g3d.TextString;g.setText(a,null==b?this.currentFont:this.currentFont=b,this.argbCurrent,J.util.C.isColixTranslucent(f)?this.getColorArgbOrGray(f)&16777215|(f&30720)<<13:0,c,d,e);this.strings[this.stringCount++]=g}},"~S,J.util.JmolFont,~N,~N,~N,~N");
Clazz.overrideMethod(c$,"renderAllStrings",function(a){if(null!=this.strings){2<=this.stringCount&&(null==J.g3d.Graphics3D.sort&&($t$=J.g3d.Graphics3D.sort=new J.g3d.TextSorter,J.g3d.Graphics3D.prototype.sort=J.g3d.Graphics3D.sort,$t$),java.util.Arrays.sort(this.strings,J.g3d.Graphics3D.sort));for(var b=0;b<this.stringCount;b++){var c=this.strings[b];this.plotText(c.x,c.y,c.z,c.argb,c.bgargb,c.text,c.font,a)}this.strings=null;this.stringCount=0}},"~O");Clazz.overrideMethod(c$,"plotText",function(a,
b,c,d,e,f,g,h){J.g3d.TextRenderer.plot(a,b,c,d,e,f,g,this,h,this.antialiasThisFrame)},"~N,~N,~N,~N,~N,~S,J.util.JmolFont,J.api.JmolRendererInterface");Clazz.overrideMethod(c$,"drawImage",function(a,b,c,d,e,f,g,h){null==a||(0==g||0==h||this.isClippedZ(e))||this.plotImage(b,c,d,a,null,f,g,h)},"~O,~N,~N,~N,~N,~N,~N,~N");$_M(c$,"plotImage",function(a,b,c,d,e,f,g,h){this.setColix(f);this.$isPass2||(this.translucencyMask=-1);0==f&&(this.argbCurrent=0);J.g3d.ImageRenderer.plotImage(a,b,c,d,this,e,this.antialiasThisFrame,
this.argbCurrent,g,h)},"~N,~N,~N,~O,J.api.JmolRendererInterface,~N,~N,~N");Clazz.overrideMethod(c$,"setFontFid",function(a){this.currentFont=J.util.JmolFont.getFont3D(a)},"~N");Clazz.overrideMethod(c$,"setFont",function(a){this.currentFont=a},"J.util.JmolFont");Clazz.overrideMethod(c$,"getFont3DCurrent",function(){return this.currentFont});Clazz.overrideMethod(c$,"drawPixel",function(a,b,c){this.plotPixelClippedXYZ(a,b,c)},"~N,~N,~N");Clazz.overrideMethod(c$,"drawPoints",function(a,b,c){if(1<c)for(var d=
0.8*c*c,e=-c;e<c;e++)for(var f=-c;f<c;f++)e*e+f*f>d||(this.plotPoints(a,b,e,f),this.plotPoints(a,b,e,f));else this.plotPoints(a,b,0,0)},"~N,~A,~N");Clazz.overrideMethod(c$,"drawDashedLine",function(a,b,c,d){this.line3d.plotDashedLine(this.argbCurrent,!this.addAllPixels,a,b,c.x,c.y,c.z,d.x,d.y,d.z,!0)},"~N,~N,J.util.P3i,J.util.P3i");Clazz.overrideMethod(c$,"drawDottedLine",function(a,b){this.line3d.plotDashedLine(this.argbCurrent,!this.addAllPixels,2,1,a.x,a.y,a.z,b.x,b.y,b.z,!0)},"J.util.P3i,J.util.P3i");
Clazz.overrideMethod(c$,"drawLineXYZ",function(a,b,c,d,e,f){this.line3d.plotLine(this.argbCurrent,!this.addAllPixels,this.argbCurrent,!this.addAllPixels,a,b,c,d,e,f,!0)},"~N,~N,~N,~N,~N,~N");Clazz.overrideMethod(c$,"drawLine",function(a,b,c,d,e,f,g,h){this.setColix(a)||(a=0);var k=!this.addAllPixels,l=this.argbCurrent;this.setColix(b)||(b=0);0==a&&0==b||this.line3d.plotLine(l,k,this.argbCurrent,!this.addAllPixels,c,d,e,f,g,h,!0)},"~N,~N,~N,~N,~N,~N,~N,~N");Clazz.overrideMethod(c$,"drawLineAB",function(a,
b){this.line3d.plotLine(this.argbCurrent,!this.addAllPixels,this.argbCurrent,!this.addAllPixels,a.x,a.y,a.z,b.x,b.y,b.z,!0)},"J.util.P3i,J.util.P3i");Clazz.overrideMethod(c$,"fillCylinderXYZ",function(a,b,c,d,e,f,g,h,k,l){this.setColix(a)||(a=0);var m=!this.addAllPixels;this.setColix(b)||(b=0);0==a&&0==b||this.cylinder3d.render(a,b,m,!this.addAllPixels,c,d,e,f,g,h,k,l)},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");Clazz.overrideMethod(c$,"fillCylinderScreen",function(a,b,c,d,e,f,g,h){this.cylinder3d.render(this.colixCurrent,
this.colixCurrent,!this.addAllPixels,!this.addAllPixels,a,b,c,d,e,f,g,h)},"~N,~N,~N,~N,~N,~N,~N,~N");Clazz.overrideMethod(c$,"fillCylinderScreen3I",function(a,b,c,d){this.cylinder3d.render(this.colixCurrent,this.colixCurrent,!this.addAllPixels,!this.addAllPixels,a,b,c.x,c.y,c.z,d.x,d.y,d.z)},"~N,~N,J.util.P3i,J.util.P3i,J.util.P3,J.util.P3,~N");Clazz.overrideMethod(c$,"fillCylinder",function(a,b,c,d){this.cylinder3d.render(this.colixCurrent,this.colixCurrent,!this.addAllPixels,!this.addAllPixels,
a,b,c.x,c.y,c.z,d.x,d.y,d.z)},"~N,~N,J.util.P3i,J.util.P3i");Clazz.overrideMethod(c$,"fillCylinderBits",function(a,b,c,d){this.cylinder3d.renderBits(this.colixCurrent,this.colixCurrent,!this.addAllPixels,!this.addAllPixels,a,b,c.x,c.y,c.z,d.x,d.y,d.z)},"~N,~N,J.util.P3,J.util.P3");Clazz.overrideMethod(c$,"fillConeScreen",function(a,b,c,d,e){this.cylinder3d.renderCone(this.colixCurrent,!this.addAllPixels,a,b,c.x,c.y,c.z,d.x,d.y,d.z,!1,e)},"~N,~N,J.util.P3i,J.util.P3i,~B");Clazz.overrideMethod(c$,"fillConeSceen3f",
function(a,b,c,d){this.cylinder3d.renderCone(this.colixCurrent,!this.addAllPixels,a,b,c.x,c.y,c.z,d.x,d.y,d.z,!0,!1)},"~N,~N,J.util.P3,J.util.P3");Clazz.overrideMethod(c$,"drawHermite4",function(a,b,c,d,e){this.hermite3d.renderHermiteRope(!1,a,0,0,0,b,c,d,e)},"~N,J.util.P3i,J.util.P3i,J.util.P3i,J.util.P3i");Clazz.overrideMethod(c$,"drawHermite7",function(a,b,c,d,e,f,g,h,k,l,m,n,p){if(0==p)this.hermite3d.renderHermiteRibbon(a,b,c,d,e,f,g,h,k,l,m,n,0);else{this.hermite3d.renderHermiteRibbon(a,b,c,
d,e,f,g,h,k,l,m,n,1);var q=this.colixCurrent;this.setColix(p);this.hermite3d.renderHermiteRibbon(a,b,c,d,e,f,g,h,k,l,m,n,-1);this.setColix(q)}},"~B,~B,~N,J.util.P3i,J.util.P3i,J.util.P3i,J.util.P3i,J.util.P3i,J.util.P3i,J.util.P3i,J.util.P3i,~N,~N");Clazz.overrideMethod(c$,"fillHermite",function(a,b,c,d,e,f,g,h){this.hermite3d.renderHermiteRope(!0,a,b,c,d,e,f,g,h)},"~N,~N,~N,~N,J.util.P3i,J.util.P3i,J.util.P3i,J.util.P3i");Clazz.overrideMethod(c$,"drawTriangle3C",function(a,b,c,d,e,f,g){1==(g&1)&&
this.drawLine(b,d,a.x,a.y,a.z,c.x,c.y,c.z);2==(g&2)&&this.drawLine(d,f,c.x,c.y,c.z,e.x,e.y,e.z);4==(g&4)&&this.drawLine(b,f,a.x,a.y,a.z,e.x,e.y,e.z)},"J.util.P3i,~N,J.util.P3i,~N,J.util.P3i,~N,~N");Clazz.overrideMethod(c$,"drawTriangle3I",function(a,b,c,d){1==(d&1)&&this.line3d.plotLine(this.argbCurrent,!this.addAllPixels,this.argbCurrent,!this.addAllPixels,a.x,a.y,a.z,b.x,b.y,b.z,!0);2==(d&2)&&this.line3d.plotLine(this.argbCurrent,!this.addAllPixels,this.argbCurrent,!this.addAllPixels,b.x,b.y,b.z,
c.x,c.y,c.z,!0);4==(d&4)&&this.line3d.plotLine(this.argbCurrent,!this.addAllPixels,this.argbCurrent,!this.addAllPixels,a.x,a.y,a.z,c.x,c.y,c.z,!0)},"J.util.P3i,J.util.P3i,J.util.P3i,~N");Clazz.overrideMethod(c$,"fillTriangleTwoSided",function(a,b,c,d,e,f,g,h,k,l){this.setColorNoisy(this.getShadeIndex(a));this.triangle3d.fillTriangleXYZ(b,c,d,e,f,g,h,k,l,!1)},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");Clazz.overrideMethod(c$,"fillTriangle3f",function(a,b,c,d){var e=this.getShadeIndexP3(a,b,c);d?this.setColorNoisy(e):
this.setColor(this.shadesCurrent[e]);this.triangle3d.fillTriangleP3f(a,b,c,!1)},"J.util.P3,J.util.P3,J.util.P3,~B");Clazz.overrideMethod(c$,"fillTriangle3i",function(a,b,c){this.triangle3d.fillTriangleP3i(a,b,c,!1)},"J.util.P3i,J.util.P3i,J.util.P3i,J.util.P3,J.util.P3,J.util.P3");Clazz.overrideMethod(c$,"fillTriangle",function(a,b,c,d,e,f,g,h,k,l){if(!this.$isPass2&&c==f&&c==k&&b==e&&b==h)this.setTriangleColixAndShadeIndex(b,this.getShadeIndex(c)),b=!1;else{if(!this.setTriangleTranslucency(b,e,h))return;
this.triangle3d.setGouraud(this.getShades(b)[this.getShadeIndex(c)],this.getShades(e)[this.getShadeIndex(f)],this.getShades(h)[this.getShadeIndex(k)]);b=!0}this.triangle3d.fillTriangleP3if(a,d,g,l,b)},"J.util.P3i,~N,~N,J.util.P3i,~N,~N,J.util.P3i,~N,~N,~N");Clazz.overrideMethod(c$,"fillTriangle3CN",function(a,b,c,d,e,f,g,h,k){if(!this.$isPass2&&c==f&&c==k&&b==e&&b==h)this.setTriangleColixAndShadeIndex(b,this.getShadeIndex(c)),b=!1;else{if(!this.setTriangleTranslucency(b,e,h))return;this.triangle3d.setGouraud(this.getShades(b)[this.getShadeIndex(c)],
this.getShades(e)[this.getShadeIndex(f)],this.getShades(h)[this.getShadeIndex(k)]);b=!0}this.triangle3d.fillTriangleP3i(a,d,g,b)},"J.util.P3i,~N,~N,J.util.P3i,~N,~N,J.util.P3i,~N,~N");$_M(c$,"setTriangleColixAndShadeIndex",($fz=function(a,b){a==this.colixCurrent&&this.currentShadeIndex==b||(this.currentShadeIndex=-1,this.setColix(a),this.setColorNoisy(b))},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"setTriangleTranslucency",($fz=function(a,b,c){if(!this.$isPass2)return!0;a&=14336;b&=14336;c&=14336;this.translucencyMask=
(J.util.GData.roundInt(Clazz.doubleToInt((a+b+c)/3))&30720)<<13|16777215;return!0},$fz.isPrivate=!0,$fz),"~N,~N,~N");Clazz.overrideMethod(c$,"drawQuadrilateral",function(a,b,c,d,e){this.setColix(a);this.drawLineAB(b,c);this.drawLineAB(c,d);this.drawLineAB(d,e);this.drawLineAB(e,b)},"~N,J.util.P3i,J.util.P3i,J.util.P3i,J.util.P3i");Clazz.overrideMethod(c$,"fillQuadrilateral",function(a,b,c,d){this.setColorNoisy(this.getShadeIndexP3(a,b,c));this.triangle3d.fillTriangleP3f(a,b,c,!1);this.triangle3d.fillTriangleP3f(a,
c,d,!1)},"J.util.P3,J.util.P3,J.util.P3,J.util.P3");Clazz.overrideMethod(c$,"fillQuadrilateral3i",function(a,b,c,d,e,f,g,h,k,l,m,n){this.fillTriangle3CN(a,b,c,d,e,f,g,h,k);this.fillTriangle3CN(a,b,c,g,h,k,l,m,n)},"J.util.P3i,~N,~N,J.util.P3i,~N,~N,J.util.P3i,~N,~N,J.util.P3i,~N,~N");Clazz.overrideMethod(c$,"drawSurface",function(){},"J.util.MeshSurface,~N");$_M(c$,"plotPixelClippedXYZ",function(a,b,c){this.isClipped3(a,b,c)||(a=b*this.width+a,c<this.zbuf[a]&&this.addPixel(a,c,this.argbCurrent))},
"~N,~N,~N");Clazz.overrideMethod(c$,"plotPixelClippedP3i",function(a){this.plotPixelClippedXYZ(a.x,a.y,a.z)},"J.util.P3i");$_M(c$,"plotPixelClippedArgb",function(a,b,c,d){this.isClipped3(b,c,d)||(b=c*this.width+b,d<this.zbuf[b]&&this.addPixel(b,d,a))},"~N,~N,~N,~N");Clazz.overrideMethod(c$,"plotImagePixel",function(a,b,c,d,e,f){this.isClipped(b,c)||(b=c*this.width+b,d<this.zbuf[b]&&this.shadeTextPixel(b,d,a,f,e))},"~N,~N,~N,~N,~N,~N");$_M(c$,"plotPixelClippedScreened",function(a,b,c,d,e){!this.isClipped3(c,
d,e)&&!(b&&0!=((c^d)&1))&&(b=d*this.width+c,e<this.zbuf[b]&&this.addPixel(b,e,a))},"~N,~B,~N,~N,~N");$_M(c$,"plotPixelUnclipped",function(a,b,c){a=b*this.width+a;c<this.zbuf[a]&&this.addPixel(a,c,this.argbCurrent)},"~N,~N,~N");$_M(c$,"plotPixelUnclippedArgb",function(a,b,c,d){b=c*this.width+b;d<this.zbuf[b]&&this.addPixel(b,d,a)},"~N,~N,~N,~N");$_M(c$,"plotPixelsClipped",function(a,b,c,d){if(!(0>c||c>=this.height||b>=this.width))if(0>b&&(a+=b,b=0),a+b>this.width&&(a=this.width-b),!(0>=a)){var e=c*
this.width+b;a=e+a;var f=1;this.addAllPixels||(f=2,0!=((b^c)&1)&&++e);for(;e<a;)d<this.zbuf[e]&&this.addPixel(e,d,this.argbCurrent),e+=f}},"~N,~N,~N,~N");$_M(c$,"plotPixelsClippedRaster",function(a,b,c,d,e,f,g){if(!(0>=a||0>c||c>=this.height||b>=this.width||d<this.slab&&e<this.slab||d>this.depth&&e>this.depth)){var h=(b<<16)+(c<<1)^858993459,k=(d<<10)+512;d=e-d;e=Clazz.doubleToInt(a/2);d=J.util.GData.roundInt(Clazz.doubleToInt(((d<<10)+(0<=d?e:-e))/a));if(0>b){b=-b;k+=d*b;a-=b;if(0>=a)return;b=0}a+
b>this.width&&(a=this.width-b);e=0!=((b^c)&1);b=c*this.width+b;if(null==f)for(;0<=--a;){if(this.addAllPixels||!0==(e=!e))g=k>>10,g>=this.slab&&(g<=this.depth&&g<this.zbuf[b])&&(h=(h<<16)+(h<<1)+h&2147483647,f=h>>16&7,this.addPixel(b,g,0==f?this.argbNoisyDn:1==f?this.argbNoisyUp:this.argbCurrent));++b;k+=d}else{h=f.rScaled<<8;c=Clazz.doubleToInt((g.rScaled-f.rScaled<<8)/a);var l=f.gScaled,m=Clazz.doubleToInt((g.gScaled-l)/a);f=f.bScaled;for(var n=Clazz.doubleToInt((g.bScaled-f)/a);0<=--a;){if(this.addAllPixels||
(e=!e))g=k>>10,g>=this.slab&&(g<=this.depth&&g<this.zbuf[b])&&this.addPixel(b,g,4278190080|h&16711680|l&65280|f>>8&255);++b;k+=d;h+=c;l+=m;f+=n}}}},"~N,~N,~N,~N,~N,J.util.Rgb16,J.util.Rgb16");$_M(c$,"plotPixelsUnclippedRaster",function(a,b,c,d,e,f,g){if(!(0>=a)){var h=((b<<16)+(c<<1)^858993459)&2147483647,k=0!=((b^c)&1),l=(d<<10)+512;d=e-d;e=Clazz.doubleToInt(a/2);d=J.util.GData.roundInt(Clazz.doubleToInt(((d<<10)+(0<=d?e:-e))/a));b=c*this.width+b;if(null==f)for(;0<=--a;){if(this.addAllPixels||(k=
!k))g=l>>10,g<this.zbuf[b]&&(h=(h<<16)+(h<<1)+h&2147483647,f=h>>16&7,this.addPixel(b,g,0==f?this.argbNoisyDn:1==f?this.argbNoisyUp:this.argbCurrent));++b;l+=d}else{h=f.rScaled<<8;c=J.util.GData.roundInt(Clazz.doubleToInt((g.rScaled-f.rScaled<<8)/a));e=f.gScaled;var m=J.util.GData.roundInt(Clazz.doubleToInt((g.gScaled-e)/a));f=f.bScaled;for(var n=J.util.GData.roundInt(Clazz.doubleToInt((g.bScaled-f)/a));0<=--a;){if(this.addAllPixels||(k=!k))g=l>>10,g<this.zbuf[b]&&this.addPixel(b,g,4278190080|h&16711680|
e&65280|f>>8&255);++b;l+=d;h+=c;e+=m;f+=n}}}},"~N,~N,~N,~N,~N,J.util.Rgb16,J.util.Rgb16");$_M(c$,"plotPixelsUnclippedCount",function(a,b,c,d){var e=c*this.width+b;if(this.addAllPixels)for(;0<=--a;)d<this.zbuf[e]&&this.addPixel(e,d,this.argbCurrent),++e;else if(a=e+a,!(0!=((b^c)&1)&&++e==a)){do d<this.zbuf[e]&&this.addPixel(e,d,this.argbCurrent),e+=2;while(e<a)}},"~N,~N,~N,~N");$_M(c$,"plotPoints",($fz=function(a,b,c,d){for(a*=3;0<a;){var e=b[--a],f=b[--a]+d,g=b[--a]+c;if(!this.isClipped3(g,f,e)){var h=
f*this.width+g++;e<this.zbuf[h]&&this.addPixel(h,e,this.argbCurrent);this.antialiasThisFrame&&(h=f*this.width+g,!this.isClipped3(g,f,e)&&e<this.zbuf[h]&&this.addPixel(h,e,this.argbCurrent),h=++f*this.width+g,!this.isClipped3(g,f,e)&&e<this.zbuf[h]&&this.addPixel(h,e,this.argbCurrent),h=f*this.width+--g,!this.isClipped3(g,f,e)&&e<this.zbuf[h]&&this.addPixel(h,e,this.argbCurrent))}}},$fz.isPrivate=!0,$fz),"~N,~A,~N,~N");$_M(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");Clazz.overrideMethod(c$,"setNoisySurfaceShade",function(a,b,c){this.vectorAB.set(b.x-a.x,b.y-a.y,b.z-a.z);null==c?a=this.shader.getShadeIndex(-this.vectorAB.x,-this.vectorAB.y,this.vectorAB.z):(this.vectorAC.set(c.x-a.x,c.y-a.y,c.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)},"J.util.P3i,J.util.P3i,J.util.P3i");$_M(c$,"getShadeIndexP3",($fz=function(a,b,c){this.vectorAB.sub2(b,a);this.vectorAC.sub2(c,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)},$fz.isPrivate=!0,$fz),"J.util.P3,J.util.P3,J.util.P3");Clazz.overrideMethod(c$,"renderBackground",function(a){null!=this.backgroundImage&&this.plotImage(-2147483648,0,-2147483648,this.backgroundImage,a,0,0,0)},"J.api.JmolRendererInterface");Clazz.overrideMethod(c$,"drawAtom",function(a){this.fillSphereXYZ(a.screenDiameter,a.screenX,a.screenY,a.screenZ)},"J.modelset.Atom");Clazz.overrideMethod(c$,"getExportType",
function(){return 0});Clazz.overrideMethod(c$,"getExportName",function(){return null});$_M(c$,"canDoTriangles",function(){return!0});$_M(c$,"isCartesianExport",function(){return!1});Clazz.overrideMethod(c$,"initializeExporter",function(){return null},"~S,J.viewer.Viewer,~N,J.util.GData,~O");Clazz.overrideMethod(c$,"finalizeOutput",function(){return null});Clazz.overrideMethod(c$,"drawBond",function(){},"J.util.P3,J.util.P3,~N,~N,~N,~N,~N");Clazz.overrideMethod(c$,"drawEllipse",function(){return!1},
"J.util.P3,J.util.P3,J.util.P3,~B,~B");$_M(c$,"getPrivateKey",function(){return 0});Clazz.overrideMethod(c$,"clearFontCache",function(){J.g3d.TextRenderer.clearFontCache()});Clazz.overrideMethod(c$,"getTransformedVertexVectors",function(){return this.transformedVectors});Clazz.overrideMethod(c$,"isDirectedTowardsCamera",function(a){return 0>a||0<this.transformedVectors[a].z},"~N");$_M(c$,"setRotationMatrix",function(a){for(var b=J.util.Normix.getVertexVectors(),c=J.g3d.Graphics3D.normixCount;0<=--c;){var d=
this.transformedVectors[c];a.transform2(b[c],d);this.shadeIndexes[c]=this.shader.getShadeB(d.x,-d.y,d.z);this.shadeIndexes2Sided[c]=0<=d.z?this.shadeIndexes[c]:this.shader.getShadeB(-d.x,d.y,-d.z)}},"J.util.Matrix3f");$_M(c$,"getShadeIndex",function(a){return-1E4==a||9999==a?J.g3d.Graphics3D.nullShadeIndex:0>a?this.shadeIndexes2Sided[~a]:this.shadeIndexes[a]},"~N");Clazz.overrideMethod(c$,"renderCrossHairs",function(a,b,c,d,e){b=this.isAntialiased();this.setColix(0>e?10:100<e?11:23);e=Math.max(Math.min(this.width,
Math.round(d.x)),0);c=Math.max(Math.min(this.height,Math.round(d.y)),0);var f=Math.round(d.z)+1,g=b?8:4,h=b?20:10;b=b?2:1;this.drawRect(e-g,c,f,0,h,b);this.drawRect(e,c-g,f,0,b,h);this.drawRect(e-g,c-g,f,0,h,h);g=h;h>>=1;this.setColix(a[1]<d.x?21:11);this.drawRect(e-g,c,f,0,h,b);this.setColix(a[0]>d.x?21:11);this.drawRect(e+h,c,f,0,h,b);this.setColix(a[3]<d.y?21:11);this.drawRect(e,c-g,f,0,b,h);this.setColix(a[2]>d.y?21:11);this.drawRect(e,c+h,f,0,b,h)},"~A,~N,~N,J.util.P3,~N");Clazz.overrideMethod(c$,
"initializeOutput",function(){return!1},"~S,J.viewer.Viewer,~N,J.util.GData,~O");$_M(c$,"shadeTextPixel",function(a,b,c,d,e){switch(e){case 8:this.addPixel(a,b,c);return}0!=d&&J.g3d.Graphics3D.mergeBufferPixel(this.pbuf,a,d,this.bgcolor);e+=this.translucencyLog;7<e||(J.g3d.Graphics3D.mergeBufferPixel(this.pbuf,a,c&16777215|e<<24,this.bgcolor),this.zbuf[a]=b)},"~N,~N,~N,~N,~N");Clazz.defineStatics(c$,"sort",null);c$.normixCount=c$.prototype.normixCount=J.util.Normix.getNormixCount();Clazz.defineStatics(c$,
"nullShadeIndex",50)}),Clazz.declarePackage("J.g3d"),c$=Clazz.decorateAsClass(function(){this.g3d=null;this.sizeCorrection=this.zCenter=this.yCenter=this.xCenter=0;Clazz.instantialize(this,arguments)},J.g3d,"CircleRenderer"),Clazz.makeConstructor(c$,function(a){this.g3d=a},"J.g3d.Graphics3D"),$_M(c$,"plotCircleCenteredClipped",function(a,b,c,d){if(!this.g3d.isClippedXY(d,a,b)){var e=Clazz.doubleToInt(d/2);this.sizeCorrection=1-(d&1);this.xCenter=a;this.yCenter=b;this.zCenter=c;a=e;b=0;e=1-2*e;c=1;
for(d=0;a>=b;)this.plot8CircleCenteredClipped(a,b),++b,d+=c,c+=2,0<2*d+e&&(--a,d+=e,e+=2)}},"~N,~N,~N,~N"),$_M(c$,"plotCircleCenteredUnclipped",function(a,b,c,d){var e=Clazz.doubleToInt(d/2);this.sizeCorrection=1-(d&1);this.xCenter=a;this.yCenter=b;this.zCenter=c;a=e;b=0;e=1-2*e;c=1;for(d=0;a>=b;)this.plot8CircleCenteredUnclipped(a,b),++b,d+=c,c+=2,0<2*d+e&&(--a,d+=e,e+=2)},"~N,~N,~N,~N"),$_M(c$,"plotFilledCircleCenteredClipped",function(a,b,c,d){var e=Clazz.doubleToInt(d/2);this.sizeCorrection=1-
(d&1);this.xCenter=a;this.yCenter=b;this.zCenter=c;a=e;b=0;e=1-2*e;c=1;for(d=0;a>=b;)this.plot8FilledCircleCenteredClipped(a,b),++b,d+=c,c+=2,0<2*d+e&&(--a,d+=e,e+=2)},"~N,~N,~N,~N"),$_M(c$,"plotFilledCircleCenteredUnclipped",function(a,b,c,d){d=Clazz.doubleToInt(d/2);this.xCenter=a;this.yCenter=b;this.zCenter=c;a=d;b=0;d=1-2*d;c=1;for(var e=0;a>=b;)this.plot8FilledCircleCenteredUnclipped(a,b),++b,e+=c,c+=2,0<2*e+d&&(--a,e+=d,d+=2)},"~N,~N,~N,~N"),$_M(c$,"plot8CircleCenteredClipped",($fz=function(a,
b){this.g3d.plotPixelClippedXYZ(this.xCenter+a-this.sizeCorrection,this.yCenter+b-this.sizeCorrection,this.zCenter);this.g3d.plotPixelClippedXYZ(this.xCenter+a-this.sizeCorrection,this.yCenter-b,this.zCenter);this.g3d.plotPixelClippedXYZ(this.xCenter-a,this.yCenter+b-this.sizeCorrection,this.zCenter);this.g3d.plotPixelClippedXYZ(this.xCenter-a,this.yCenter-b,this.zCenter);this.g3d.plotPixelClippedXYZ(this.xCenter+b-this.sizeCorrection,this.yCenter+a-this.sizeCorrection,this.zCenter);this.g3d.plotPixelClippedXYZ(this.xCenter+
b-this.sizeCorrection,this.yCenter-a,this.zCenter);this.g3d.plotPixelClippedXYZ(this.xCenter-b,this.yCenter+a-this.sizeCorrection,this.zCenter);this.g3d.plotPixelClippedXYZ(this.xCenter-b,this.yCenter-a,this.zCenter)},$fz.isPrivate=!0,$fz),"~N,~N"),$_M(c$,"plot8CircleCenteredUnclipped",($fz=function(a,b){this.g3d.plotPixelUnclipped(this.xCenter+a-this.sizeCorrection,this.yCenter+b-this.sizeCorrection,this.zCenter);this.g3d.plotPixelUnclipped(this.xCenter+a-this.sizeCorrection,this.yCenter-b,this.zCenter);
this.g3d.plotPixelUnclipped(this.xCenter-a,this.yCenter+b-this.sizeCorrection,this.zCenter);this.g3d.plotPixelUnclipped(this.xCenter-a,this.yCenter-b,this.zCenter);this.g3d.plotPixelUnclipped(this.xCenter+b-this.sizeCorrection,this.yCenter+a-this.sizeCorrection,this.zCenter);this.g3d.plotPixelUnclipped(this.xCenter+b-this.sizeCorrection,this.yCenter-a,this.zCenter);this.g3d.plotPixelUnclipped(this.xCenter-b,this.yCenter+a-this.sizeCorrection,this.zCenter);this.g3d.plotPixelUnclipped(this.xCenter-
b,this.yCenter-a,this.zCenter)},$fz.isPrivate=!0,$fz),"~N,~N"),$_M(c$,"plot8FilledCircleCenteredClipped",($fz=function(a,b){this.g3d.plotPixelsClipped(2*a+1-this.sizeCorrection,this.xCenter-a,this.yCenter+b-this.sizeCorrection,this.zCenter);this.g3d.plotPixelsClipped(2*a+1-this.sizeCorrection,this.xCenter-a,this.yCenter-b,this.zCenter);this.g3d.plotPixelsClipped(2*b+1-this.sizeCorrection,this.xCenter-b,this.yCenter+a-this.sizeCorrection,this.zCenter);this.g3d.plotPixelsClipped(2*b+1-this.sizeCorrection,
this.xCenter-b,this.yCenter-a,this.zCenter)},$fz.isPrivate=!0,$fz),"~N,~N"),$_M(c$,"plot8FilledCircleCenteredUnclipped",($fz=function(a,b){this.g3d.plotPixelsUnclippedCount(2*a+1-this.sizeCorrection,this.xCenter-a,this.yCenter+b-this.sizeCorrection,this.zCenter);this.g3d.plotPixelsUnclippedCount(2*a+1-this.sizeCorrection,this.xCenter-a,this.yCenter-b,this.zCenter);this.g3d.plotPixelsUnclippedCount(2*b+1-this.sizeCorrection,this.xCenter-b,this.yCenter+a-this.sizeCorrection,this.zCenter);this.g3d.plotPixelsUnclippedCount(2*
b+1-this.sizeCorrection,this.xCenter-b,this.yCenter-a,this.zCenter)},$fz.isPrivate=!0,$fz),"~N,~N"),Clazz.declarePackage("J.g3d"),Clazz.load(null,"J.g3d.CylinderRenderer",["J.util.ArrayUtil","$.Shader"],function(){c$=Clazz.decorateAsClass(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;Clazz.instantialize(this,
arguments)},J.g3d,"CylinderRenderer");Clazz.prepareFields(c$,function(){this.tRaster=Clazz.newFloatArray(32,0);this.txRaster=Clazz.newFloatArray(32,0);this.tyRaster=Clazz.newFloatArray(32,0);this.tzRaster=Clazz.newFloatArray(32,0);this.xRaster=Clazz.newIntArray(32,0);this.yRaster=Clazz.newIntArray(32,0);this.zRaster=Clazz.newIntArray(32,0);this.fp8ShadeIndexUp=Clazz.newIntArray(32,0)});Clazz.makeConstructor(c$,function(a){this.g3d=a;this.line3d=a.line3d;this.shader=a.shader},"J.g3d.Graphics3D");$_M(c$,
"render",function(a,b,c,d,e,f,g,h,k,l,m,n){if(!(f>3*this.g3d.getRenderHeight())){this.isScreenedA=c;this.isScreenedB=d;var p=Clazz.doubleToInt(f/2)+1,q=this.g3d.clipCode3(g-p,h-p,k-p),r=this.g3d.clipCode3(g+p,h+p,k+p),s=this.g3d.clipCode3(l-p,m-p,n-p),p=this.g3d.clipCode3(l+p,m+p,n+p);this.clipped=0!=(q|r|s|p);if(0==(q&p&r&s))if(this.dxB=l-g,this.dyB=m-h,this.dzB=n-k,1>=f)this.line3d.plotLineDelta(this.g3d.getColorArgbOrGray(a),c,this.g3d.getColorArgbOrGray(b),d,g,h,k,this.dxB,this.dyB,this.dzB,this.clipped);
else{this.drawBackside=this.clipped||2==e||0==e;this.diameter=f;this.xA=g;this.yA=h;this.zA=k;this.endcaps=e;this.shadesA=this.g3d.getShades(this.colixA=a);this.shadesB=this.g3d.getShades(this.colixB=b);this.calcArgbEndcap(!0,!1);this.generateBaseEllipse();(2==e||4==e)&&this.renderFlatEndcap(!0);this.g3d.setZMargin(5);for(a=this.rasterCount;0<=--a;)this.plotRaster(a);this.g3d.setZMargin(0);3==e&&this.renderSphericalEndcaps()}}},"~N,~N,~B,~B,~N,~N,~N,~N,~N,~N,~N,~N");$_M(c$,"renderBits",function(a,
b,c,d,e,f,g,h,k,l,m,n){if(!(f>3*this.g3d.getRenderHeight())){this.isScreenedA=c;this.isScreenedB=d;var p=Clazz.doubleToInt(f/2)+1,q=Math.round(g),r=Math.round(h),s=Math.round(k),t=Math.round(l),u=Math.round(m),v=Math.round(n),w=this.g3d.clipCode3(q-p,r-p,s-p),q=this.g3d.clipCode3(q+p,r+p,s+p),r=this.g3d.clipCode3(t-p,u-p,v-p),p=this.g3d.clipCode3(t+p,u+p,v+p);this.clipped=0!=(w|q|r|p);if(0==(w&p&q&r))if(this.dxBf=l-g,this.dyBf=m-h,this.dzBf=n-k,0==f||1==f)this.line3d.plotLineDelta(this.g3d.getColorArgbOrGray(a),
c,this.g3d.getColorArgbOrGray(b),d,Clazz.floatToInt(g),Clazz.floatToInt(h),Clazz.floatToInt(k),Clazz.floatToInt(this.dxBf),Clazz.floatToInt(this.dyBf),Clazz.floatToInt(this.dzBf),this.clipped);else{0<f&&(this.diameter=f,this.xAf=g,this.yAf=h,this.zAf=k);this.drawBackside=!c&&!d&&(this.clipped||2==e||0==e);this.xA=Clazz.floatToInt(this.xAf);this.yA=Clazz.floatToInt(this.yAf);this.zA=Clazz.floatToInt(this.zAf);this.dxB=Clazz.floatToInt(this.dxBf);this.dyB=Clazz.floatToInt(this.dyBf);this.dzB=Clazz.floatToInt(this.dzBf);
this.shadesA=this.g3d.getShades(this.colixA=a);this.shadesB=this.g3d.getShades(this.colixB=b);this.endcaps=e;this.calcArgbEndcap(!0,!0);0<f&&this.generateBaseEllipsePrecisely(!1);2==e&&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==e&&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");
$_M(c$,"plotRasterBits",($fz=function(a){var b=this.fp8ShadeIndexUp[a]>>8,c=b>>1,d=this.xRaster[a],e=this.yRaster[a];a=this.zRaster[a];this.tEndcapOpen&&0!=this.argbEndcap&&(this.clipped?(this.g3d.plotPixelClippedArgb(this.argbEndcap,this.xEndcap+d,this.yEndcap+e,this.zEndcap-a-1),this.g3d.plotPixelClippedArgb(this.argbEndcap,this.xEndcap-d,this.yEndcap-e,this.zEndcap+a-1)):(this.g3d.plotPixelUnclippedArgb(this.argbEndcap,this.xEndcap+d,this.yEndcap+e,this.zEndcap-a-1),this.g3d.plotPixelUnclippedArgb(this.argbEndcap,
this.xEndcap-d,this.yEndcap-e,this.zEndcap+a-1)));this.line3d.plotLineDeltaBits(this.shadesA,this.isScreenedA,this.shadesB,this.isScreenedB,b,this.xA+d,this.yA+e,this.zA-a,this.dxB,this.dyB,this.dzB,this.clipped);this.drawBackside&&this.line3d.plotLineDelta(this.shadesA[c],this.isScreenedA,this.shadesB[c],this.isScreenedB,this.xA-d,this.yA-e,this.zA+a,this.dxB,this.dyB,this.dzB,this.clipped)},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"renderCone",function(a,b,c,d,e,f,g,h,k,l,m,n){if(!(d>3*this.g3d.getRenderHeight()))if(this.dxBf=
h-(this.xAf=e),this.dyBf=k-(this.yAf=f),this.dzBf=l-(this.zAf=g),this.xA=Clazz.doubleToInt(Math.floor(this.xAf)),this.yA=Clazz.doubleToInt(Math.floor(this.yAf)),this.zA=Clazz.doubleToInt(Math.floor(this.zAf)),this.dxB=Clazz.doubleToInt(Math.floor(this.dxBf)),this.dyB=Clazz.doubleToInt(Math.floor(this.dyBf)),this.dzB=Clazz.doubleToInt(Math.floor(this.dzBf)),this.xTip=h,this.yTip=k,this.zTip=l,this.colixA=a,this.isScreenedA=b,this.shadesA=this.g3d.getShades(a),a=this.shader.getShadeIndex(this.dxB,this.dyB,
-this.dzB),this.g3d.plotPixelClippedScreened(this.shadesA[a],this.isScreenedA,Clazz.floatToInt(h),Clazz.floatToInt(k),Clazz.floatToInt(l)),this.diameter=d,1>=d)1==d&&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=c;this.calcArgbEndcap(!1,!0);this.generateBaseEllipsePrecisely(n);!n&&2==this.endcaps&&this.renderFlatEndcapPrecisely(!1);this.g3d.setZMargin(5);for(c=this.rasterCount;0<=
--c;)this.plotRasterCone(c,m,n);this.g3d.setZMargin(0)}},"~N,~B,~N,~N,~N,~N,~N,~N,~N,~N,~B,~B");$_M(c$,"generateBaseEllipse",($fz=function(){this.tEvenDiameter=0==(this.diameter&1);this.radius=this.diameter/2;this.radius2=this.radius*this.radius;var a=this.dxB*this.dxB+this.dyB*this.dyB;if(0==a)this.cosPhi=this.cosTheta=1,this.sinPhi=0;else{var b=Math.sqrt(a),a=Math.sqrt(a+this.dzB*this.dzB);this.cosTheta=this.dzB/a;this.cosPhi=this.dxB/b;this.sinPhi=this.dyB/b}this.calcRotatedPoint(0,0,!1);this.calcRotatedPoint(0.5,
1,!1);this.calcRotatedPoint(1,2,!1);this.rasterCount=3;this.interpolate(0,1);this.interpolate(1,2)},$fz.isPrivate=!0,$fz));$_M(c$,"generateBaseEllipsePrecisely",($fz=function(a){this.tEvenDiameter=0==(this.diameter&1);this.radius=this.diameter/2;this.radius2=this.radius*this.radius;var b=this.dxBf*this.dxBf+this.dyBf*this.dyBf;if(0==b)this.cosPhi=this.cosTheta=1,this.sinPhi=0;else{var c=Math.sqrt(b),b=Math.sqrt(b+this.dzBf*this.dzBf);this.cosTheta=this.dzBf/b;this.cosPhi=this.dxBf/c;this.sinPhi=this.dyBf/
c}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]=Clazz.doubleToInt(Math.floor(this.txRaster[a])),this.yRaster[a]=Clazz.doubleToInt(Math.floor(this.tyRaster[a])),this.zRaster[a]=Clazz.doubleToInt(Math.floor(this.tzRaster[a]))},
$fz.isPrivate=!0,$fz),"~B");$_M(c$,"calcRotatedPoint",($fz=function(a,b,c){this.tRaster[b]=a;a*=3.141592653589793;var d=Math.sin(a)*this.cosTheta,e=Math.cos(a);a=this.radius*(d*this.cosPhi-e*this.sinPhi);d=this.radius*(d*this.sinPhi+e*this.cosPhi);e=this.radius2-(a*a+d*d);e=0<e?Math.sqrt(e):0;c?(this.txRaster[b]=a,this.tyRaster[b]=d,this.tzRaster[b]=e):(this.tEvenDiameter?(this.xRaster[b]=Clazz.doubleToInt(a-0.5),this.yRaster[b]=Clazz.doubleToInt(d-0.5)):(this.xRaster[b]=Clazz.doubleToInt(a),this.yRaster[b]=
Clazz.doubleToInt(d)),this.zRaster[b]=Clazz.doubleToInt(e+0.5));this.fp8ShadeIndexUp[b]=this.shader.getShadeFp8(a,d,e)},$fz.isPrivate=!0,$fz),"~N,~N,~B");$_M(c$,"interpolate",($fz=function(a,b){var c=this.xRaster[b]-this.xRaster[a];0>c&&(c=-c);var d=this.yRaster[b]-this.yRaster[a];0>d&&(d=-d);if(!(1>=c+d)){for(var c=this.tRaster[a],d=this.tRaster[b],e=this.allocRaster(!1),f=4;0<=--f;){var g=(c+d)/2;this.calcRotatedPoint(g,e,!1);if(this.xRaster[e]==this.xRaster[a]&&this.yRaster[e]==this.yRaster[a])this.fp8ShadeIndexUp[a]=
this.fp8ShadeIndexUp[a]+this.fp8ShadeIndexUp[e]>>>1,c=g;else if(this.xRaster[e]==this.xRaster[b]&&this.yRaster[e]==this.yRaster[b])this.fp8ShadeIndexUp[b]=this.fp8ShadeIndexUp[b]+this.fp8ShadeIndexUp[e]>>>1,d=g;else{this.interpolate(a,e);this.interpolate(e,b);return}}this.xRaster[e]=this.xRaster[a];this.yRaster[e]=this.yRaster[b]}},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"interpolatePrecisely",($fz=function(a,b){var c=Clazz.doubleToInt(Math.floor(this.txRaster[b]))-Clazz.doubleToInt(Math.floor(this.txRaster[a]));
0>c&&(c=-c);var d=Clazz.doubleToInt(Math.floor(this.tyRaster[b]))-Clazz.doubleToInt(Math.floor(this.tyRaster[a]));0>d&&(d=-d);if(!(1>=c+d)){for(var c=this.tRaster[a],d=this.tRaster[b],e=this.allocRaster(!0),f=4;0<=--f;){var g=(c+d)/2;this.calcRotatedPoint(g,e,!0);if(Clazz.doubleToInt(Math.floor(this.txRaster[e]))==Clazz.doubleToInt(Math.floor(this.txRaster[a]))&&Clazz.doubleToInt(Math.floor(this.tyRaster[e]))==Clazz.doubleToInt(Math.floor(this.tyRaster[a])))this.fp8ShadeIndexUp[a]=this.fp8ShadeIndexUp[a]+
this.fp8ShadeIndexUp[e]>>>1,c=g;else if(Clazz.doubleToInt(Math.floor(this.txRaster[e]))==Clazz.doubleToInt(Math.floor(this.txRaster[b]))&&Clazz.doubleToInt(Math.floor(this.tyRaster[e]))==Clazz.doubleToInt(Math.floor(this.tyRaster[b])))this.fp8ShadeIndexUp[b]=this.fp8ShadeIndexUp[b]+this.fp8ShadeIndexUp[e]>>>1,d=g;else{this.interpolatePrecisely(a,e);this.interpolatePrecisely(e,b);return}}this.txRaster[e]=this.txRaster[a];this.tyRaster[e]=this.tyRaster[b]}},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"plotRaster",
($fz=function(a){var b=this.fp8ShadeIndexUp[a]>>8,c=b>>1,d=this.xRaster[a],e=this.yRaster[a];a=this.zRaster[a];this.tEndcapOpen&&0!=this.argbEndcap&&(this.clipped?(this.g3d.plotPixelClippedArgb(this.argbEndcap,this.xEndcap+d,this.yEndcap+e,this.zEndcap-a-1),this.g3d.plotPixelClippedArgb(this.argbEndcap,this.xEndcap-d,this.yEndcap-e,this.zEndcap+a-1)):(this.g3d.plotPixelUnclippedArgb(this.argbEndcap,this.xEndcap+d,this.yEndcap+e,this.zEndcap-a-1),this.g3d.plotPixelUnclippedArgb(this.argbEndcap,this.xEndcap-
d,this.yEndcap-e,this.zEndcap+a-1)));this.line3d.plotLineDeltaA(this.shadesA,this.isScreenedA,this.shadesB,this.isScreenedB,b,this.xA+d,this.yA+e,this.zA-a,this.dxB,this.dyB,this.dzB,this.clipped);this.drawBackside&&this.line3d.plotLineDelta(this.shadesA[c],this.isScreenedA,this.shadesB[c],this.isScreenedB,this.xA-d,this.yA-e,this.zA+a,this.dxB,this.dyB,this.dzB,this.clipped)},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"allocRaster",($fz=function(a){for(;this.rasterCount>=this.xRaster.length;)this.xRaster=
J.util.ArrayUtil.doubleLengthI(this.xRaster),this.yRaster=J.util.ArrayUtil.doubleLengthI(this.yRaster),this.zRaster=J.util.ArrayUtil.doubleLengthI(this.zRaster),this.tRaster=J.util.ArrayUtil.doubleLengthF(this.tRaster);for(;this.rasterCount>=this.fp8ShadeIndexUp.length;)this.fp8ShadeIndexUp=J.util.ArrayUtil.doubleLengthI(this.fp8ShadeIndexUp);if(a)for(;this.rasterCount>=this.txRaster.length;)this.txRaster=J.util.ArrayUtil.doubleLengthF(this.txRaster),this.tyRaster=J.util.ArrayUtil.doubleLengthF(this.tyRaster),
this.tzRaster=J.util.ArrayUtil.doubleLengthF(this.tzRaster);return this.rasterCount++},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"findMinMaxY",($fz=function(){this.yMin=this.yMax=this.yRaster[0];for(var a=this.rasterCount;0<--a;){var b=this.yRaster[a];b<this.yMin?this.yMin=b:b>this.yMax?this.yMax=b:(b=-b,b<this.yMin?this.yMin=b:b>this.yMax&&(this.yMax=b))}},$fz.isPrivate=!0,$fz));$_M(c$,"findMinMaxX",($fz=function(a){this.xMin=2147483647;this.xMax=-2147483648;for(var b=this.rasterCount;0<=--b;){if(this.yRaster[b]==
a){var c=this.xRaster[b];c<this.xMin&&(this.xMin=c,this.zXMin=this.zRaster[b]);c>this.xMax&&(this.xMax=c,this.zXMax=this.zRaster[b])}this.yRaster[b]==-a&&(c=-this.xRaster[b],c<this.xMin&&(this.xMin=c,this.zXMin=-this.zRaster[b]),c>this.xMax&&(this.xMax=c,this.zXMax=-this.zRaster[b]))}},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"renderFlatEndcap",($fz=function(a){if(0!=this.dzB&&this.g3d.setColix(this.colixEndcap)){var b=this.xA,c=this.yA,d=this.zA;if(a&&0>this.dzB){if(4==this.endcaps)return;b+=this.dxB;
c+=this.dyB;d+=this.dzB}this.findMinMaxY();for(a=this.yMin;a<=this.yMax;++a){this.findMinMaxX(a);var e=this.xMax-this.xMin+1;this.g3d.setColorNoisy(this.endcapShadeIndex);this.g3d.plotPixelsClippedRaster(e,b+this.xMin,c+a,d-this.zXMin-1,d-this.zXMax-1,null,null)}}},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"renderFlatEndcapPrecisely",($fz=function(a){if(0!=this.dzBf&&this.g3d.setColix(this.colixEndcap)){var b=this.xAf,c=this.yAf,d=this.zAf;a&&0>this.dzBf&&(b+=this.dxBf,c+=this.dyBf,d+=this.dzBf);a=Clazz.floatToInt(b);
c=Clazz.floatToInt(c);d=Clazz.floatToInt(d);this.findMinMaxY();for(b=this.yMin;b<=this.yMax;++b){this.findMinMaxX(b);var e=this.xMax-this.xMin+1;this.g3d.setColorNoisy(this.endcapShadeIndex);this.g3d.plotPixelsClippedRaster(e,a+this.xMin,c+b,d-this.zXMin-1,d-this.zXMax-1,null,null)}}},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"renderSphericalEndcaps",($fz=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)},$fz.isPrivate=!0,$fz));$_M(c$,"plotRasterCone",($fz=function(a,b,c){var d=this.txRaster[a],e=this.tyRaster[a],f=this.tzRaster[a],g=this.xAf+d,h=this.yAf+e,k=this.zAf-f,d=this.xAf-d,e=this.yAf-e,f=this.zAf+f,l=this.shadesA[0];this.tEndcapOpen&&0!=this.argbEndcap&&(this.g3d.plotPixelClippedScreened(this.argbEndcap,this.isScreenedA,Clazz.floatToInt(g),Clazz.floatToInt(h),Clazz.floatToInt(k)),this.g3d.plotPixelClippedScreened(this.argbEndcap,
this.isScreenedA,Clazz.floatToInt(d),Clazz.floatToInt(e),Clazz.floatToInt(f)));a=this.fp8ShadeIndexUp[a]>>8;0!=l&&(this.line3d.plotLineDeltaA(this.shadesA,this.isScreenedA,this.shadesA,this.isScreenedA,a,Clazz.floatToInt(g),Clazz.floatToInt(h),Clazz.floatToInt(k),Clazz.doubleToInt(Math.ceil(this.xTip-g)),Clazz.doubleToInt(Math.ceil(this.yTip-h)),Clazz.doubleToInt(Math.ceil(this.zTip-k)),!0),b&&(this.line3d.plotLineDeltaA(this.shadesA,this.isScreenedA,this.shadesA,this.isScreenedA,a,Clazz.floatToInt(g),
Clazz.floatToInt(h)+1,Clazz.floatToInt(k),Clazz.doubleToInt(Math.ceil(this.xTip-g)),Clazz.doubleToInt(Math.ceil(this.yTip-h))+1,Clazz.doubleToInt(Math.ceil(this.zTip-k)),!0),this.line3d.plotLineDeltaA(this.shadesA,this.isScreenedA,this.shadesA,this.isScreenedA,a,Clazz.floatToInt(g)+1,Clazz.floatToInt(h),Clazz.floatToInt(k),Clazz.doubleToInt(Math.ceil(this.xTip-g))+1,Clazz.doubleToInt(Math.ceil(this.yTip-h)),Clazz.doubleToInt(Math.ceil(this.zTip-k)),!0)),!c&&!(2!=this.endcaps&&0<this.dzB)&&this.line3d.plotLineDelta(l,
this.isScreenedA,l,this.isScreenedA,Clazz.floatToInt(d),Clazz.floatToInt(e),Clazz.floatToInt(f),Clazz.doubleToInt(Math.ceil(this.xTip-d)),Clazz.doubleToInt(Math.ceil(this.yTip-e)),Clazz.doubleToInt(Math.ceil(this.zTip-f)),!0))},$fz.isPrivate=!0,$fz),"~N,~B,~B");$_M(c$,"calcArgbEndcap",($fz=function(a,b){this.tEndcapOpen=!1;var c=b?this.dzBf:this.dzB;if(!(3==this.endcaps||0==c)){this.xEndcap=this.xA;this.yEndcap=this.yA;this.zEndcap=this.zA;var d=b?this.dxBf:this.dxB,e=b?this.dyBf:this.dyB;0<=c||!a?
(this.endcapShadeIndex=this.shader.getShadeIndex(-d,-e,c),this.colixEndcap=this.colixA,c=this.shadesA):(this.endcapShadeIndex=this.shader.getShadeIndex(d,e,-c),this.colixEndcap=this.colixB,c=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=c[this.endcapShadeIndex];this.tEndcapOpen=1==this.endcaps}},$fz.isPrivate=!0,$fz),"~B,~B")}),Clazz.declarePackage("J.g3d"),
Clazz.load(["J.util.P3","$.V3"],"J.g3d.HermiteRenderer",["J.util.JmolList","$.P3i","$.Point3fi"],function(){c$=Clazz.decorateAsClass(function(){this.T2=this.T1=this.needToFill=this.depth1=this.d2=this.d1=this.c2=this.c1=this.b2=this.b1=this.a2=this.a1=this.pBotRight=this.pBotLeft=this.pTopRight=this.pTopLeft=this.sRight=this.sLeft=this.pRight=this.pLeft=this.g3d=null;Clazz.instantialize(this,arguments)},J.g3d,"HermiteRenderer");Clazz.prepareFields(c$,function(){this.pLeft=Array(16);this.pRight=Array(16);
this.sLeft=Clazz.newFloatArray(16,0);this.sRight=Clazz.newFloatArray(16,0);this.pTopLeft=Array(16);this.pTopRight=Array(16);this.pBotLeft=Array(16);this.pBotRight=Array(16);for(var a=16;0<=--a;)this.pLeft[a]=new J.util.P3i,this.pRight[a]=new J.util.P3i,this.pTopLeft[a]=new J.util.P3,this.pTopRight[a]=new J.util.P3,this.pBotLeft[a]=new J.util.P3,this.pBotRight[a]=new J.util.P3;this.a1=new J.util.P3;this.a2=new J.util.P3;this.b1=new J.util.P3;this.b2=new J.util.P3;this.c1=new J.util.P3;this.c2=new J.util.P3;
this.d1=new J.util.P3;this.d2=new J.util.P3;this.depth1=new J.util.V3;this.needToFill=Clazz.newBooleanArray(16,!1);this.T1=new J.util.V3;this.T2=new J.util.V3});Clazz.makeConstructor(c$,function(a){this.g3d=a},"J.api.JmolRendererInterface");$_M(c$,"renderHermiteRope",function(a,b,c,d,e,f,g,h,k){if(!(1==f.z||1==g.z||1==h.z||1==k.z)&&!this.g3d.isClippedZ(g.z)&&!this.g3d.isClippedZ(h.z)){var l=g.x,m=g.y,n=g.z,p=h.x,q=h.y,r=h.z,s=Clazz.doubleToInt((p-f.x)*b/8),t=Clazz.doubleToInt((q-f.y)*b/8);f=Clazz.doubleToInt((r-
f.z)*b/8);var u=Clazz.doubleToInt((k.x-l)*b/8),v=Clazz.doubleToInt((k.y-m)*b/8);b=Clazz.doubleToInt((k.z-n)*b/8);this.sLeft[0]=0;this.pLeft[0].setT(g);this.sRight[0]=1;this.pRight[0].setT(h);var w=k=h=g=0;a&&(k=2*(d-c),w=2*(e-d));do{var z=this.pLeft[g];e=this.pRight[g];var B=e.x-z.x;if(-1<=B&&1>=B&&(e=e.y-z.y,-1<=e&&1>=e)){h++;e=this.sLeft[g];a?(e=0.5>e?c+Clazz.floatToInt(k*e):d+Clazz.floatToInt(w*(e-0.5)),this.g3d.fillSphereI(e,z)):this.g3d.plotPixelClippedP3i(z);--g;continue}e=(this.sLeft[g]+this.sRight[g])/
2;var x=e*e,y=x*e,z=2*y-3*x+1,B=-2*y+3*x,A=y-2*x+e,x=y-x;if(15<=g)break;y=this.pRight[g+1];y.x=Clazz.doubleToInt(z*l+B*p+A*s+x*u);y.y=Clazz.doubleToInt(z*m+B*q+A*t+x*v);y.z=Clazz.doubleToInt(z*n+B*r+A*f+x*b);this.pRight[g+1]=this.pRight[g];this.sRight[g+1]=this.sRight[g];this.pRight[g]=y;this.sRight[g]=e;++g;this.pLeft[g].setT(y);this.sLeft[g]=e}while(0<=g)}},"~B,~N,~N,~N,~N,J.util.P3i,J.util.P3i,J.util.P3i,J.util.P3i");$_M(c$,"renderHermiteRibbon",function(a,b,c,d,e,f,g,h,k,l,m,n,p){if(!(1==d.z||
1==e.z||1==f.z||1==g.z||1==h.z||1==k.z||1==l.z||1==m.z))if(a){(a=0>c)&&(c=-c);var q=1/n,r=e.x,s=e.y,t=e.z,u=f.x,v=f.y,w=f.z,z=Clazz.doubleToInt((u-d.x)*c/8),B=Clazz.doubleToInt((v-d.y)*c/8);d=Clazz.doubleToInt((w-d.z)*c/8);var x=Clazz.doubleToInt((g.x-r)*c/8),y=Clazz.doubleToInt((g.y-s)*c/8);g=Clazz.doubleToInt((g.z-t)*c/8);J.util.Point3fi.set2(this.pTopLeft[0],e);J.util.Point3fi.set2(this.pTopRight[0],f);e=k.x;f=k.y;var A=k.z,C=l.x,D=l.y,E=l.z,F=Clazz.doubleToInt((C-h.x)*c/8),H=Clazz.doubleToInt((D-
h.y)*c/8);h=Clazz.doubleToInt((E-h.z)*c/8);var L=Clazz.doubleToInt((m.x-e)*c/8),O=Clazz.doubleToInt((m.y-f)*c/8);c=Clazz.doubleToInt((m.z-A)*c/8);J.util.Point3fi.set2(this.pBotLeft[0],k);J.util.Point3fi.set2(this.pBotRight[0],l);this.sLeft[0]=0;this.sRight[0]=1;this.needToFill[0]=!0;k=0;l=!1;do{m=this.pTopLeft[k];var K=this.pTopRight[k],M=K.x-m.x,M=M*M;if(10>M){var N=K.y-m.y,N=N*N;if(10>N){var G=this.pBotLeft[k],I=this.pBotRight[k],P=I.x-G.x,P=P*P;if(8>P){var Q=I.y-G.y,Q=Q*Q;if(8>Q&&(b&&(this.g3d.fillSphere(3,
m),this.g3d.fillSphere(3,G)),this.needToFill[k]&&(0<n?(this.setDepth(this.depth1,G,m,K,q),J.g3d.HermiteRenderer.setPoint(this.a1,m,this.depth1,1),J.g3d.HermiteRenderer.setPoint(this.a2,m,this.depth1,-1),J.g3d.HermiteRenderer.setPoint(this.b1,K,this.depth1,1),J.g3d.HermiteRenderer.setPoint(this.b2,K,this.depth1,-1),J.g3d.HermiteRenderer.setPoint(this.c1,G,this.depth1,1),J.g3d.HermiteRenderer.setPoint(this.c2,G,this.depth1,-1),J.g3d.HermiteRenderer.setPoint(this.d1,I,this.depth1,1),J.g3d.HermiteRenderer.setPoint(this.d2,
I,this.depth1,-1),this.g3d.fillQuadrilateral(this.a1,this.b1,this.d1,this.c1),this.g3d.fillQuadrilateral(this.a2,this.b2,this.d2,this.c2),this.g3d.fillQuadrilateral(this.a1,this.b1,this.b2,this.a2),this.g3d.fillQuadrilateral(this.c1,this.d1,this.d2,this.c2),l=!0):0==p?a?this.g3d.fillQuadrilateral(G,I,K,m):this.g3d.fillQuadrilateral(m,K,I,G):a?(p!=J.g3d.HermiteRenderer.isFront(m,K,I)&&this.g3d.fillTriangle3f(m,K,I,!1),p!=J.g3d.HermiteRenderer.isFront(m,I,G)&&this.g3d.fillTriangle3f(m,I,G,!1)):(p==
J.g3d.HermiteRenderer.isFront(m,K,I)&&this.g3d.fillTriangle3f(m,K,I,!1),p==J.g3d.HermiteRenderer.isFront(m,I,G)&&this.g3d.fillTriangle3f(m,I,G,!1)),this.needToFill[k]=!1),2>M+N&&2>P+Q)){--k;continue}}}}m=(this.sLeft[k]+this.sRight[k])/2;G=m*m;I=G*m;K=2*I-3*G+1;M=-2*I+3*G;N=I-2*G+m;G=I-G;if(15<=k)break;I=k+1;P=this.pTopRight[I];P.x=K*r+M*u+N*z+G*x;P.y=K*s+M*v+N*B+G*y;P.z=K*t+M*w+N*d+G*g;Q=this.pBotRight[I];Q.x=K*e+M*C+N*F+G*L;Q.y=K*f+M*D+N*H+G*O;Q.z=K*A+M*E+N*h+G*c;this.pTopRight[I]=this.pTopRight[k];
this.pTopRight[k]=P;this.pBotRight[I]=this.pBotRight[k];this.pBotRight[k]=Q;this.sRight[I]=this.sRight[k];this.sRight[k]=m;this.needToFill[I]=this.needToFill[k];this.pTopLeft[I].setT(P);this.pBotLeft[I].setT(Q);this.sLeft[I]=m;++k}while(0<=k);l&&(this.a1.z+=1,this.c1.z+=1,this.c2.z+=1,this.a2.z+=1,this.g3d.fillQuadrilateral(this.a1,this.c1,this.c2,this.a2))}else c=Math.abs(c),this.renderParallelPair(a,c,d,e,f,g,h,k,l,m)},"~B,~B,~N,J.util.P3i,J.util.P3i,J.util.P3i,J.util.P3i,J.util.P3i,J.util.P3i,J.util.P3i,J.util.P3i,~N,~N");
c$.isFront=$_M(c$,"isFront",($fz=function(a,b,c){J.g3d.HermiteRenderer.vAB.sub2(b,a);J.g3d.HermiteRenderer.vAC.sub2(c,a);J.g3d.HermiteRenderer.vAB.cross(J.g3d.HermiteRenderer.vAB,J.g3d.HermiteRenderer.vAC);return 0>J.g3d.HermiteRenderer.vAB.z?-1:1},$fz.isPrivate=!0,$fz),"J.util.P3,J.util.P3,J.util.P3");$_M(c$,"renderParallelPair",($fz=function(a,b,c,d,e,f,g,h,k,l){var m=[e,d,k,h];a=new J.util.JmolList;var n=0,p=2,q=0,r=d.x,s=d.y,t=d.z,u=e.x,v=e.y,w=e.z,z=Clazz.doubleToInt((u-c.x)*b/8),B=Clazz.doubleToInt((v-
c.y)*b/8);c=Clazz.doubleToInt((w-c.z)*b/8);var x=Clazz.doubleToInt((f.x-r)*b/8),y=Clazz.doubleToInt((f.y-s)*b/8);f=Clazz.doubleToInt((f.z-t)*b/8);this.sLeft[0]=0;this.pLeft[0].setT(d);this.sRight[0]=1;this.pRight[0].setT(e);d=0;for(e=2;0<e;e--){1==e&&(r=h.x,s=h.y,t=h.z,u=k.x,v=k.y,w=k.z,z=Clazz.doubleToInt((u-g.x)*b/8),B=Clazz.doubleToInt((v-g.y)*b/8),c=Clazz.doubleToInt((w-g.z)*b/8),x=Clazz.doubleToInt((l.x-r)*b/8),y=Clazz.doubleToInt((l.y-s)*b/8),f=Clazz.doubleToInt((l.z-t)*b/8),this.sLeft[0]=0,
this.pLeft[0].setT(h),this.sRight[0]=1,this.pRight[0].setT(k),d=0);a.addLast(m[n++]);q=0.2;do{var A=this.pLeft[d],C=this.pRight[d],D=C.x-A.x,C=C.y-A.y;if(2>=D*D+C*C)D=this.sLeft[d],this.g3d.fillSphereI(3,A),D<1-q&&(D=new J.util.P3i,D.setT(A),a.addLast(D),q+=0.2,2==e&&p++),--d;else{var D=(this.sLeft[d]+this.sRight[d])/2,E=D*D,F=E*D,A=2*F-3*E+1,C=-2*F+3*E,H=F-2*E+D,E=F-E;if(15<=d)break;F=this.pRight[d+1];F.x=Clazz.doubleToInt(A*r+C*u+H*z+E*x);F.y=Clazz.doubleToInt(A*s+C*v+H*B+E*y);F.z=Clazz.doubleToInt(A*
t+C*w+H*c+E*f);this.pRight[d+1]=this.pRight[d];this.sRight[d+1]=this.sRight[d];this.pRight[d]=F;this.sRight[d]=D;++d;this.pLeft[d].setT(F);this.sLeft[d]=D}}while(0<=d);a.addLast(m[n++])}b=a.size();for(g=0;g<p&&g+p<b;g++)this.g3d.drawLineAB(a.get(g),a.get(g+p))},$fz.isPrivate=!0,$fz),"~B,~N,J.util.P3i,J.util.P3i,J.util.P3i,J.util.P3i,J.util.P3i,J.util.P3i,J.util.P3i,J.util.P3i");$_M(c$,"setDepth",($fz=function(a,b,c,d,e){this.T1.sub2(c,b);this.T1.scale(e);this.T2.sub2(c,d);a.cross(this.T1,this.T2);
a.scale(this.T1.length()/a.length())},$fz.isPrivate=!0,$fz),"J.util.V3,J.util.P3,J.util.P3,J.util.P3,~N");c$.setPoint=$_M(c$,"setPoint",($fz=function(a,b,c,d){a.setT(b);1==d?a.add(c):a.sub(c)},$fz.isPrivate=!0,$fz),"J.util.P3,J.util.P3,J.util.V3,~N");c$.vAB=c$.prototype.vAB=new J.util.V3;c$.vAC=c$.prototype.vAC=new J.util.V3}),Clazz.declarePackage("J.g3d"),c$=Clazz.declareType(J.g3d,"ImageRenderer"),c$.plotImage=$_M(c$,"plotImage",function(a,b,c,d,e,f,g,h,k,l){h=(g=-2147483648==a)?e.bgcolor:h;g&&
(a=0,c=2147483646,k=e.width,l=e.height);0>=a+k||(a>=e.width||0>=b+l||b>=e.height)||(d=e.apiPlatform.drawImageToBuffer(null,e.platform.offscreenImage,d,k,l,g?h:0),null!=d&&(null!=f||0>a||a+k>e.width||0>b||b+l>e.height?J.g3d.ImageRenderer.plotImageClipped(a,b,c,e,f,k,l,d,h):J.g3d.ImageRenderer.plotImageUnClipped(a,b,c,e,k,l,d,h)))},"~N,~N,~N,~O,J.g3d.Graphics3D,J.api.JmolRendererInterface,~B,~N,~N,~N"),c$.plotImageClipped=$_M(c$,"plotImageClipped",($fz=function(a,b,c,d,e,f,g,h,k){null==e&&(e=d);for(var l=
d=0;d<g;d++)for(var m=0;m<f;m++){var n=h[l++];e.plotImagePixel(n,a+m,b+d,c,8,k)}},$fz.isPrivate=!0,$fz),"~N,~N,~N,J.g3d.Graphics3D,J.api.JmolRendererInterface,~N,~N,~A,~N"),c$.plotImageUnClipped=$_M(c$,"plotImageUnClipped",($fz=function(a,b,c,d,e,f,g){var h=d.zbuf,k=d.width;a=b*k+a;for(var l=b=0,m=0;b<f;){for(;l<e;)c<h[a]&&d.addPixel(a,c,g[m]),++m,++l,++a;++b;l-=e;a+=k-e}},$fz.isPrivate=!0,$fz),"~N,~N,~N,J.g3d.Graphics3D,~N,~N,~A,~N"),Clazz.declarePackage("J.g3d"),Clazz.load(["java.util.Hashtable"],
"J.g3d.LineRenderer",["java.lang.Float","J.util.BSUtil","$.Logger","$.Shader"],function(){c$=Clazz.decorateAsClass(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;Clazz.instantialize(this,arguments)},J.g3d,"LineRenderer");Clazz.prepareFields(c$,function(){this.lineCache=new java.util.Hashtable});Clazz.makeConstructor(c$,
function(a){this.g3d=a;this.shader=a.shader},"J.g3d.Graphics3D");$_M(c$,"setLineBits",function(a,b){this.slope=0!=a?b/a:0<=b?3.4028235E38:-3.4028235E38;this.lineTypeX=1>=this.slope&&-1<=this.slope;if(!this.getCachedLine()){this.nBits=this.lineTypeX?this.g3d.getRenderWidth():this.g3d.getRenderHeight();this.lineBits=J.util.BSUtil.newBitSet(this.nBits);b=Math.abs(b);a=Math.abs(a);if(b>a){var c=a;a=b;b=c}for(var c=0,d=a+a,e=b+b,f=0;f<this.nBits;f++)c+=e,c>a&&(this.lineBits.set(f),c-=d);this.lineCache.put(this.slopeKey,
this.lineBits);this.nCached++}},"~N,~N");$_M(c$,"plotLine",function(a,b,c,d,e,f,g,h,k,l,m){this.x1t=e;this.x2t=h;this.y1t=f;this.y2t=k;this.z1t=g;this.z2t=l;if(m)switch(this.getTrimmedLine()){case 0:m=!1;break;case 2:return}this.plotLineClipped(a,b,c,d,e,f,g,h-e,k-f,l-g,m,0,0)},"~N,~B,~N,~B,~N,~N,~N,~N,~N,~N,~B");$_M(c$,"plotLineDelta",function(a,b,c,d,e,f,g,h,k,l,m){this.x1t=e;this.x2t=e+h;this.y1t=f;this.y2t=f+k;this.z1t=g;this.z2t=g+l;if(m)switch(this.getTrimmedLine()){case 2:return;case 0:m=!1}this.plotLineClipped(a,
b,c,d,e,f,g,h,k,l,m,0,0)},"~N,~B,~N,~B,~N,~N,~N,~N,~N,~N,~B");$_M(c$,"plotLineDeltaA",function(a,b,c,d,e,f,g,h,k,l,m,n){this.x1t=f;this.x2t=f+k;this.y1t=g;this.y2t=g+l;this.z1t=h;this.z2t=h+m;if(n)switch(this.getTrimmedLine()){case 2:return;case 0:n=!1}this.plotLineClippedA(a,b,c,d,e,f,g,h,k,l,m,n,0,0)},"~A,~B,~A,~B,~N,~N,~N,~N,~N,~N,~N,~B");$_M(c$,"plotLineDeltaBits",function(a,b,c,d,e,f,g,h,k,l,m,n){this.x1t=f;this.x2t=f+k;this.y1t=g;this.y2t=g+l;this.z1t=h;this.z2t=h+m;n&&2==this.getTrimmedLine()||
this.plotLineClippedBits(a,b,c,d,e,f,g,h,k,l,m,0,0)},"~A,~B,~A,~B,~N,~N,~N,~N,~N,~N,~N,~B");$_M(c$,"plotDashedLine",function(a,b,c,d,e,f,g,h,k,l,m){this.x1t=e;this.x2t=h;this.y1t=f;this.y2t=k;this.z1t=g;this.z2t=l;if(m)switch(this.getTrimmedLine()){case 2:return;case 0:m=!1}this.plotLineClipped(a,b,a,b,e,f,g,h-e,k-f,l-g,m,c,d)},"~N,~B,~N,~N,~N,~N,~N,~N,~N,~N,~B");$_M(c$,"getCachedLine",($fz=function(){this.slopeKey=Float.$valueOf(this.slope);if(!this.lineCache.containsKey(this.slopeKey))return!1;
this.lineBits=this.lineCache.get(this.slopeKey);this.nFound++;1E6==this.nFound&&J.util.Logger.debugging&&J.util.Logger.debug("nCached/nFound lines: "+this.nCached+" "+this.nFound);return!0},$fz.isPrivate=!0,$fz));$_M(c$,"getTrimmedLine",($fz=function(){this.cc1=this.g3d.clipCode3(this.x1t,this.y1t,this.z1t);this.cc2=this.g3d.clipCode3(this.x2t,this.y2t,this.z2t);if(0==(this.cc1|this.cc2))return 0;var a=this.g3d.xLast,b=this.g3d.yLast,c=this.g3d.slab,d=this.g3d.depth;do{if(0!=(this.cc1&this.cc2))return 2;
var e=this.x2t-this.x1t,f=this.y2t-this.y1t,g=this.z2t-this.z1t;0!=this.cc1?(0!=(this.cc1&8)?(this.y1t+=-this.x1t*f/e,this.z1t+=-this.x1t*g/e,this.x1t=0):0!=(this.cc1&4)?(this.y1t+=(a-this.x1t)*f/e,this.z1t+=(a-this.x1t)*g/e,this.x1t=a):0!=(this.cc1&2)?(this.x1t+=-this.y1t*e/f,this.z1t+=-this.y1t*g/f,this.y1t=0):0!=(this.cc1&1)?(this.x1t+=(b-this.y1t)*e/f,this.z1t+=(b-this.y1t)*g/f,this.y1t=b):0!=(this.cc1&32)?(this.x1t+=(c-this.z1t)*e/g,this.y1t+=(c-this.z1t)*f/g,this.z1t=c):(this.x1t+=(d-this.z1t)*
e/g,this.y1t+=(d-this.z1t)*f/g,this.z1t=d),this.cc1=this.g3d.clipCode3(this.x1t,this.y1t,this.z1t)):(0!=(this.cc2&8)?(this.y2t+=-this.x2t*f/e,this.z2t+=-this.x2t*g/e,this.x2t=0):0!=(this.cc2&4)?(this.y2t+=(a-this.x2t)*f/e,this.z2t+=(a-this.x2t)*g/e,this.x2t=a):0!=(this.cc2&2)?(this.x2t+=-this.y2t*e/f,this.z2t+=-this.y2t*g/f,this.y2t=0):0!=(this.cc2&1)?(this.x2t+=(b-this.y2t)*e/f,this.z2t+=(b-this.y2t)*g/f,this.y2t=b):0!=(this.cc2&32)?(this.x2t+=(c-this.z2t)*e/g,this.y2t+=(c-this.z2t)*f/g,this.z2t=
c):(this.x2t+=(d-this.z2t)*e/g,this.y2t+=(d-this.z2t)*f/g,this.z2t=d),this.cc2=this.g3d.clipCode3(this.x2t,this.y2t,this.z2t))}while(0!=(this.cc1|this.cc2));return 1},$fz.isPrivate=!0,$fz));$_M(c$,"plotLineClipped",($fz=function(a,b,c,d,e,f,g,h,k,l,m,n,p){var q=this.g3d.zbuf,r=this.g3d.getRenderWidth(),s=0;0==n&&(p=2147483647,n=1);var t=f*r+e,u=this.g3d.bufferSize,v=0!=((e^f)&1);0!=a&&(!m&&0<=t&&t<u&&g<q[t]&&(!b||(v=!v)))&&this.g3d.addPixel(t,g,a);if(!(0==h&&0==k)){m=1;var w=r;e+=h;var z=f+k;0>h&&
(h=-h,m=-1);0>k&&(k=-k,w=-r);r=h+h;f=k+k;g<<=10;if(k<=h){var B=h-1;0>l&&(B=-B);l=Clazz.doubleToInt(((l<<10)+B)/h);k=0;B=Math.abs(e-this.x2t)-1;e=Math.abs(e-this.x1t)-1;for(var z=h-1,x=Clazz.doubleToInt(z/2);--z>=B&&!(z==x&&(b=d,a=c,0==a));){t+=m;g+=l;k+=f;k>h&&(t+=w,k-=r,v=!v);if(0!=a&&z<e&&0<=t&&t<u&&s<p&&(!b||(v=!v))){var y=g>>10;y<q[t]&&this.g3d.addPixel(t,y,a)}s=(s+1)%n}}else{B=k-1;0>l&&(B=-B);l=Clazz.doubleToInt(((l<<10)+B)/k);h=0;B=Math.abs(z-this.y2t)-1;e=Math.abs(z-this.y1t)-1;z=k-1;for(x=
Clazz.doubleToInt(z/2);--z>=B&&!(z==x&&(b=d,a=c,0==a));){t+=w;g+=l;h+=r;h>k&&(t+=m,h-=f,v=!v);if(0!=a&&z<e&&0<=t&&t<u&&s<p&&(!b||(v=!v)))y=g>>10,y<q[t]&&this.g3d.addPixel(t,y,a);s=(s+1)%n}}}},$fz.isPrivate=!0,$fz),"~N,~B,~N,~B,~N,~N,~N,~N,~N,~N,~B,~N,~N");$_M(c$,"plotLineClippedA",($fz=function(a,b,c,d,e,f,g,h,k,l,m,n,p,q){var r=this.g3d.zbuf,s=this.g3d.getRenderWidth(),t=0;0==p&&(q=2147483647,p=1);var u=g*s+f,v=this.g3d.bufferSize,w=e<J.util.Shader.shadeIndexLast?e+1:e,z=0<e?e-1:e,B=a[w],x=a[z],
y=c[e],w=c[w];c=c[z];a=a[e];e=b;var A=0!=((f^g)&1);0!=a&&(!n&&0<=u&&u<v&&h<r[u]&&(!e||(A=!A)))&&this.g3d.addPixel(u,h,a);if(!(0==k&&0==l)){n=1;var z=s,C=f+k,D=g+l;0>k&&(k=-k,n=-1);0>l&&(l=-l,z=-s);g=k+k;f=l+l;h<<=10;if(l<=k){var E=k-1;0>m&&(E=-E);m=Clazz.doubleToInt(((m<<10)+E)/k);l=0;for(var E=Math.abs(C-this.x2t)-1,C=Math.abs(C-this.x1t)-1,D=k-1,F=Clazz.doubleToInt(D/2);--D>=E;){if(D==F){a=y;if(0==a)break;B=w;x=c;if((e=d)&&!b)var A=Clazz.doubleToInt(u/s),H=u%s,A=0==((H^A)&1)}u+=n;h+=m;l+=f;l>k&&
(u+=z,l-=g,A=!A);if(0!=a&&D<C&&0<=u&&u<v&&t<q&&(!e||(A=!A)))if(H=h>>10,H<r[u]){var L=this.shader.nextRandom8Bit();this.g3d.addPixel(u,H,85>L?x:170<L?B:a)}t=(t+1)%p}}else{E=l-1;0>m&&(E=-E);m=Clazz.doubleToInt(((m<<10)+E)/l);k=0;E=Math.abs(D-this.y2t)-1;C=Math.abs(D-this.y1t)-1;D=l-1;for(F=Clazz.doubleToInt(D/2);--D>=E;){if(D==F){a=y;if(0==a)break;B=w;x=c;if((e=d)&&!b)A=Clazz.doubleToInt(u/s),H=u%s,A=0==((H^A)&1)}u+=z;h+=m;k+=g;k>l&&(u+=n,k-=f,A=!A);if(0!=a&&D<C&&0<=u&&u<v&&t<q&&(!e||(A=!A)))H=h>>10,
H<r[u]&&(L=this.g3d.shader.nextRandom8Bit(),this.g3d.addPixel(u,H,85>L?x:170<L?B:a));t=(t+1)%p}}}},$fz.isPrivate=!0,$fz),"~A,~B,~A,~B,~N,~N,~N,~N,~N,~N,~N,~B,~N,~N");$_M(c$,"plotLineClippedBits",($fz=function(a,b,c,d,e,f,g,h,k,l,m,n,p){var q=this.g3d.zbuf,r=this.g3d.width,s=0;0==n&&(p=2147483647,n=1);var t=e<J.util.Shader.shadeIndexLast?e+1:e,u=0<e?e-1:e,v=a[e],w=a[t],z=a[u];e=c[e];t=c[t];c=c[u];var u=b,B=0!=((f^g)&1);a=g*r+f;var x=this.g3d.bufferSize,y,A,C,D,E;this.lineTypeX?(y=f,A=this.x1t,C=this.x2t,
f+=Clazz.doubleToInt(k/2),D=g=0<=k?1:-1,E=0<=l?r:-r,k=m/Math.abs(k)):(y=g,A=this.y1t,C=this.y2t,f=g+Clazz.doubleToInt(l/2),g=0<=l?1:-1,D=0<=l?r:-r,E=0<=k?1:-1,k=m/Math.abs(l));l=!1;for(m=y;;m+=g,y+=g){m==A&&(l=!0);if(m==f){v=e;if(0==v)break;w=t;z=c;if((u=d)&&!b)B=Clazz.doubleToInt(a/r),B=0==((a%r^B)&1)}if(0!=v&&(l&&0<=a&&a<x&&s<p&&(!u||(B=!B)))&&h<q[a]){var F=this.shader.nextRandom8Bit();this.g3d.addPixel(a,Clazz.floatToInt(h),85>F?z:170<F?w:v)}if(m==C)break;s=(s+1)%n;for(a+=D;0>y;)y+=this.nBits;
this.lineBits.get(y%this.nBits)&&(a+=E);h+=k}},$fz.isPrivate=!0,$fz),"~A,~B,~A,~B,~N,~N,~N,~N,~N,~N,~N,~N,~N");Clazz.defineStatics(c$,"VISIBILITY_UNCLIPPED",0,"VISIBILITY_CLIPPED",1,"VISIBILITY_OFFSCREEN",2)}),Clazz.declarePackage("J.g3d"),Clazz.load(null,"J.g3d.Pixelator",["J.g3d.Graphics3D"],function(){c$=Clazz.decorateAsClass(function(){this.g=null;Clazz.instantialize(this,arguments)},J.g3d,"Pixelator");Clazz.makeConstructor(c$,function(a){this.g=a},"J.g3d.Graphics3D");$_M(c$,"clearPixel",function(a,
b){!this.g.$isPass2&&this.g.zbuf[a]>b&&(this.g.zbuf[a]=2147483647)},"~N,~N");$_M(c$,"addPixel",function(a,b,c){this.addPixel1(a,b,c)},"~N,~N,~N");$_M(c$,"addPixel1",function(a,b,c){if(this.g.$isPass2){var d=this.g.zbufT[a];if(b<d){var e=this.g.pbufT[a];!this.g.translucentCoverOnly&&(0!=e&&d-b>this.g.zMargin)&&J.g3d.Graphics3D.mergeBufferPixel(this.g.pbuf,a,e,this.g.bgcolor);this.g.zbufT[a]=b;this.g.pbufT[a]=c&this.g.translucencyMask}else b!=d&&!this.g.translucentCoverOnly&&b-d>this.g.zMargin&&J.g3d.Graphics3D.mergeBufferPixel(this.g.pbuf,
a,c&this.g.translucencyMask,this.g.bgcolor)}else this.g.zbuf[a]=b,this.g.pbuf[a]=c},"~N,~N,~N")}),Clazz.declarePackage("J.g3d"),Clazz.load(["J.g3d.Pixelator"],"J.g3d.PixelatorShaded",null,function(){c$=Clazz.declareType(J.g3d,"PixelatorShaded",J.g3d.Pixelator);Clazz.overrideMethod(c$,"addPixel",function(a,b,c){if(!(b>this.g.zDepth)){if(b<=this.g.zDepth&&b>=this.g.zSlab){var d=(c&65280)>>8,e=(c&16711680)>>16,f=c&4278190080,g=(this.g.zDepth-b)/(this.g.zDepth-this.g.zSlab);if(1<this.g.zShadePower)for(var h=
0;h<this.g.zShadePower;h++)g*=g;c=this.g.zShadeR+Clazz.floatToInt(g*((c&255)-this.g.zShadeR));d=this.g.zShadeG+Clazz.floatToInt(g*(d-this.g.zShadeG));e=this.g.zShadeB+Clazz.floatToInt(g*(e-this.g.zShadeB));c=e<<16|d<<8|c|f}this.addPixel1(a,b,c)}},"~N,~N,~N")}),Clazz.declarePackage("J.g3d"),Clazz.load(["java.lang.Thread"],"J.g3d.Platform3D",null,function(){c$=Clazz.decorateAsClass(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.graphicsForTextOrImage=this.offscreenImage=null;this.useClearingThread=!1;this.apiPlatform=this.clearingThread=null;Clazz.isClassDefined("J.g3d.Platform3D.ClearingThread")||J.g3d.Platform3D.$Platform3D$ClearingThread$();Clazz.instantialize(this,arguments)},J.g3d,"Platform3D");Clazz.makeConstructor(c$,function(a){this.initialize(!1);this.apiPlatform=a},"J.api.ApiPlatform");
$_M(c$,"getGraphicsForMetrics",function(){return this.apiPlatform.getGraphics(this.allocateOffscreenImage(1,1))});$_M(c$,"initialize",function(a){if(this.useClearingThread=a)this.clearingThread=Clazz.innerTypeInstance(J.g3d.Platform3D.ClearingThread,this,null),this.clearingThread.start()},"~B");$_M(c$,"allocateTBuffers",function(a){this.bufferSizeT=a?this.bufferSize:this.windowSize;this.zBufferT=Clazz.newIntArray(this.bufferSizeT,0);this.pBufferT=Clazz.newIntArray(this.bufferSizeT,0)},"~B");$_M(c$,
"allocateBuffers",function(a,b,c,d){this.windowWidth=a;this.windowHeight=b;this.windowSize=a*b;c&&(a*=2,b*=2);this.bufferWidth=a;this.bufferHeight=b;this.bufferSize=this.bufferWidth*this.bufferHeight;this.zBuffer=Clazz.newIntArray(this.bufferSize,0);this.pBuffer=Clazz.newIntArray(this.bufferSize,0);this.bufferedImage=this.apiPlatform.allocateRgbImage(this.windowWidth,this.windowHeight,this.pBuffer,this.windowSize,J.g3d.Platform3D.backgroundTransparent,d)},"~N,~N,~B,~B");$_M(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});$_M(c$,"hasContent",function(){for(var a=this.bufferSize;0<=--a;)if(2147483647!=this.zBuffer[a])return!0;return!1});$_M(c$,"clearScreenBuffer",function(){for(var a=this.bufferSize;0<=--a;)this.zBuffer[a]=2147483647,this.pBuffer[a]=0});$_M(c$,"setBackgroundColor",function(a){if(null!=
this.pBuffer)for(var b=this.bufferSize;0<=--b;)0==this.pBuffer[b]&&(this.pBuffer[b]=a)},"~N");$_M(c$,"clearTBuffer",function(){for(var a=this.bufferSizeT;0<=--a;)this.zBufferT[a]=2147483647,this.pBufferT[a]=0});$_M(c$,"clearBuffer",function(){this.useClearingThread?this.clearingThread.clearClientBuffer():this.clearScreenBuffer()});$_M(c$,"clearScreenBufferThreaded",function(){this.useClearingThread&&this.clearingThread.releaseBufferForClearing()});$_M(c$,"notifyEndOfRendering",function(){this.apiPlatform.notifyEndOfRendering()});
$_M(c$,"getGraphicsForTextOrImage",function(a,b){if(a>this.widthOffscreen||b>this.heightOffscreen)null!=this.offscreenImage&&(this.apiPlatform.disposeGraphics(this.graphicsForTextOrImage),this.apiPlatform.flushImage(this.offscreenImage)),a>this.widthOffscreen&&(this.widthOffscreen=a),b>this.heightOffscreen&&(this.heightOffscreen=b),this.offscreenImage=this.allocateOffscreenImage(this.widthOffscreen,this.heightOffscreen),this.graphicsForTextOrImage=this.apiPlatform.getStaticGraphics(this.offscreenImage,
J.g3d.Platform3D.backgroundTransparent);return this.graphicsForTextOrImage},"~N,~N");$_M(c$,"allocateOffscreenImage",($fz=function(a,b){return this.apiPlatform.newOffScreenImage(a,b)},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"setBackgroundTransparent",function(a){$t$=J.g3d.Platform3D.backgroundTransparent=a;J.g3d.Platform3D.prototype.backgroundTransparent=J.g3d.Platform3D.backgroundTransparent;$t$},"~B");c$.$Platform3D$ClearingThread$=function(){Clazz.pu$h();c$=Clazz.decorateAsClass(function(){Clazz.prepareCallback(this,
arguments);this.clientHasBuffer=this.bufferHasBeenCleared=!1;Clazz.instantialize(this,arguments)},J.g3d.Platform3D,"ClearingThread",Thread);$_M(c$,"notifyBackgroundChange",function(){this.bufferHasBeenCleared=!1;this.notify()},"~N");$_M(c$,"clearClientBuffer",function(){for(;!this.bufferHasBeenCleared;)try{this.wait()}catch(a){if(!Clazz.exceptionOf(a,InterruptedException))throw a;}this.clientHasBuffer=!0});$_M(c$,"releaseBufferForClearing",function(){this.bufferHasBeenCleared=this.clientHasBuffer=
!1;this.notify()});$_M(c$,"waitForClientRelease",function(){for(;this.clientHasBuffer||this.bufferHasBeenCleared;)try{this.wait()}catch(a){if(!Clazz.exceptionOf(a,InterruptedException))throw a;}});$_M(c$,"notifyBufferReady",function(){this.bufferHasBeenCleared=!0;this.notify()});Clazz.overrideMethod(c$,"run",function(){for(;;)this.waitForClientRelease(),this.b$["J.g3d.Platform3D"].clearScreenBuffer(),this.notifyBufferReady()});c$=Clazz.p0p()};Clazz.defineStatics(c$,"desireClearingThread",!1,"backgroundTransparent",
!1)}),Clazz.declarePackage("J.g3d"),Clazz.load(["J.util.P3","$.Shader"],"J.g3d.SphereRenderer",["J.util.Quadric"],function(){c$=Clazz.decorateAsClass(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;Clazz.instantialize(this,arguments)},J.g3d,"SphereRenderer");Clazz.prepareFields(c$,function(){this.zroot=Clazz.newDoubleArray(2,0);this.ptTemp=new J.util.P3;this.planeShades=Clazz.newIntArray(3,0);this.dxyz=Clazz.newFloatArray(3,3,0)});Clazz.makeConstructor(c$,function(a){this.g3d=a;this.shader=a.shader},"J.g3d.Graphics3D");$_M(c$,"render",function(a,b,c,d,e,f,g,h,k,l,m,n){if(1!=f&&(this.width=this.g3d.width,this.height=
this.g3d.height,49<c&&(c&=-2),!this.g3d.isClippedXY(c,d,e))){var p=c+1>>1;this.minX=d-p;this.maxX=d+p;this.minY=e-p;this.maxY=e+p;this.slab=this.g3d.slab;this.depth=this.g3d.depth;this.minZ=f-p;this.maxZ=f+p;this.maxZ<this.slab||this.minZ>this.depth||(this.shader.nOut=this.shader.nIn=0,this.zbuf=this.g3d.zbuf,this.addAllPixels=n,this.offsetPbufBeginLine=this.width*e+d,this.x=d,this.y=e,this.z=f,this.diameter=c,this.tScreened=b,this.shades=a,this.mat=g,null!=g&&(this.coef=h,this.mDeriv=k,this.selectedOctant=
l,this.octantPoints=m),null!=g||128<c?(this.renderLarge(),null!=g&&(this.octantPoints=this.mDeriv=this.coef=this.mat=null)):(a=this.getSphereShape(c),0>this.minX||this.maxX>=this.width||0>this.minY||this.maxY>=this.height||this.minZ<this.slab||f>this.depth?this.renderShapeClipped(a):this.renderShapeUnclipped(a)),this.zbuf=this.shades=null)}},"~A,~B,~N,~N,~N,~N,J.util.Matrix3f,~A,J.util.Matrix4f,~N,~A,~B");$_M(c$,"getSphereShape",($fz=function(a){var b;return null==(b=this.shader.sphereShapeCache[a-
1])?this.createSphereShape(a):b},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"createSphereShape",($fz=function(a){for(var b=0,c=0!=(a&1),d=a/2,e=d*d,f=Clazz.doubleToInt((a+1)/2),g=c?0:0.5,h=0;h<f;++h,++g)for(var k=g*g,l=c?0:0.5,m=0;m<f;++m,++l){var n=l*l,n=e-k-n;0<=n&&++b}for(var b=Clazz.newIntArray(b,0),p=0,g=c?0:0.5,h=0;h<f;++h,++g){k=g*g;l=c?0:0.5;for(m=0;m<f;++m,++l)if(n=l*l,n=e-k-n,0<=n){var q=Math.sqrt(n),n=Clazz.floatToInt(q),r=this.shader.getShadeN(l,g,q,d),s=this.shader.getShadeN(-l,g,q,d),t=this.shader.getShadeN(l,
-g,q,d),q=this.shader.getShadeN(-l,-g,q,d),n=n|r<<7|s<<13|t<<19|q<<25;b[p++]=n}b[p-1]|=2147483648}return this.shader.sphereShapeCache[a-1]=b},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"renderShapeUnclipped",($fz=function(a){var b=0,c=1-(this.diameter&1),d=this.offsetPbufBeginLine,e=d-c*this.width,f=Clazz.doubleToInt((this.diameter+1)/2);if(this.tScreened){var g=(this.x^this.y)&1,h=g^c,g=g|(g^c)<<1|h<<2|(h^c)<<3;do{k=d;l=d-c;m=e;n=e-c;h=g=~g;do p=a[b++],q=this.z-(p&127),0!=(h&1)&&q<this.zbuf[k]&&this.g3d.addPixel(k,
q,this.shades[p>>7&63]),0!=(h&2)&&q<this.zbuf[l]&&this.g3d.addPixel(l,q,this.shades[p>>13&63]),0!=(h&4)&&q<this.zbuf[m]&&this.g3d.addPixel(m,q,this.shades[p>>19&63]),0!=(h&8)&&q<this.zbuf[n]&&this.g3d.addPixel(n,q,this.shades[p>>25&63]),++k,--l,++m,--n,h=~h;while(0<=p);d+=this.width;e-=this.width}while(0<--f)}else{do{var k=d,l=d-c,m=e,n=e-c,p;do{p=a[b++];var q=this.z-(p&127);q<this.zbuf[k]&&this.g3d.addPixel(k,q,this.shades[p>>7&63]);q<this.zbuf[l]&&this.g3d.addPixel(l,q,this.shades[p>>13&63]);q<
this.zbuf[m]&&this.g3d.addPixel(m,q,this.shades[p>>19&63]);q<this.zbuf[n]&&this.g3d.addPixel(n,q,this.shades[p>>25&63]);++k;--l;++m;--n}while(0<=p);d+=this.width;e-=this.width}while(0<--f)}},$fz.isPrivate=!0,$fz),"~A");$_M(c$,"renderShapeClipped",($fz=function(a){var b=0,c=1-(this.diameter&1),d=this.offsetPbufBeginLine,e=d-c*this.width,f=Clazz.doubleToInt((this.diameter+1)/2),g=this.y,h=this.y-c,k=(this.x<<16)+(this.y<<1)^858993459,l=(this.x^this.y)&1,m=l^c,l=l|(l^c)<<1|m<<2|(m^c)<<3;do{var m=0<=
g&&g<this.height,n=0<=h&&h<this.height,p=d,q=d-c,r=e,s=e-c,t,u=l=~l,v=this.x,w=this.x-c;do{var z=0<=w&&w<this.width,B=0<=v&&v<this.width;t=a[b++];var x;x=t&127;var y;this.z<this.slab?(y=this.z+x,x=y>=this.slab):(y=this.z-x,x=y<this.slab);x&&(y=this.slab);if(y>=this.slab&&y<=this.depth){if(m){if(B&&(this.addAllPixels||0!=(u&1))&&y<this.zbuf[p]){var A=x?J.g3d.SphereRenderer.SHADE_SLAB_CLIPPED-3+(k>>7&7):t>>7&63;this.g3d.addPixel(p,y,this.shades[A])}if(z&&(this.addAllPixels||0!=(u&2))&&y<this.zbuf[q])A=
x?J.g3d.SphereRenderer.SHADE_SLAB_CLIPPED-3+(k>>13&7):t>>13&63,this.g3d.addPixel(q,y,this.shades[A])}if(n){if(B&&(!this.tScreened||0!=(u&4))&&y<this.zbuf[r])A=x?J.g3d.SphereRenderer.SHADE_SLAB_CLIPPED-3+(k>>19&7):t>>19&63,this.g3d.addPixel(r,y,this.shades[A]);if(z&&(!this.tScreened||0!=(u&8))&&y<this.zbuf[s])A=x?J.g3d.SphereRenderer.SHADE_SLAB_CLIPPED-3+(k>>25&7):t>>25&63,this.g3d.addPixel(s,y,this.shades[A])}}++p;--q;++r;--s;++v;--w;u=~u;x&&(k=(k<<16)+(k<<1)+k&2147483647)}while(0<=t);d+=this.width;
e-=this.width;++g;--h}while(0<--f)},$fz.isPrivate=!0,$fz),"~A");$_M(c$,"renderLarge",($fz=function(){null!=this.mat?(null==this.shader.ellipsoidShades&&this.shader.createEllipsoidShades(),null!=this.octantPoints&&this.setPlaneDerivatives()):this.shader.sphereShadingCalculated||this.shader.calcSphereShading();this.renderQuadrant(-1,-1);this.renderQuadrant(-1,1);this.renderQuadrant(1,-1);this.renderQuadrant(1,1)},$fz.isPrivate=!0,$fz));$_M(c$,"renderQuadrant",($fz=function(a,b){var c=Clazz.doubleToInt(this.diameter/
2),d=this.x+c*a,e=(0>this.x?-1:this.x<this.width?0:1)+(0>d?-2:d<this.width?0:2);-3==e||3==e||(d=this.y+c*b,d=(0>this.y?-1:this.y<this.height?0:1)+(0>d?-2:d<this.height?0:2),-3==d||3==d||(null==this.mat&&0==e&&0==d&&this.z-c>=this.slab&&this.z<=this.depth?this.renderQuadrantUnclipped(c,a,b):this.renderQuadrantClipped(c,a,b)))},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"renderQuadrantUnclipped",($fz=function(a,b,c){for(var d=a*a,e=2*a+1,f=0==((this.x^this.y)&1),g=0>c?-this.width:this.width,h=this.offsetPbufBeginLine,
k=0,l=0;l<=d;l+=k+ ++k,h+=g)for(var m=h,n=f=!f,p=d-l,q=this.z-a,r=Clazz.doubleToInt((k*c+a<<8)/e),s=0,t=0;t<=p;t+=s+ ++s,m+=b)if((this.addAllPixels||(n=!n))&&!(this.zbuf[m]<=q))if(q=Clazz.doubleToInt(Math.sqrt(p-t)),q=this.z-q,!(this.zbuf[m]<=q)){var u=Clazz.doubleToInt((s*b+a<<8)/e);this.g3d.addPixel(m,q,this.shades[this.shader.sphereShadeIndexes[(r<<8)+u]])}},$fz.isPrivate=!0,$fz),"~N,~N,~N");$_M(c$,"renderQuadrantClipped",($fz=function(a,b,c){for(var d=null!=this.mat,e=0<=this.selectedOctant,f=
a*a,g=2*a+1,h=0>c?-this.width:this.width,k=this.offsetPbufBeginLine,l=(this.x<<16)+(this.y<<1)^858993459,m=this.y,n=0,p=0,q=0,r=0;r<=f;r+=q+ ++q,k+=h,m+=c)if(0>m){if(0>c)break}else if(m>=this.height){if(0<c)break}else{var s=f-(d?0:r),t=this.x;d||(n=Clazz.doubleToInt((q*c+a<<8)/g));for(var l=(l<<16)+(l<<1)+l&2147483647,u=-1,v=1,w=k,z=0,B=0;B<=s;B+=z+ ++z,w+=b,t+=b)if(0>t){if(0>b)break}else if(t>=this.width){if(0<b)break}else if(!(this.tScreened&&0!=((t^m)&1))){var x;if(d){if(!J.util.Quadric.getQuardricZ(t,
m,this.coef,this.zroot)){if(0<=u)break;continue}u=this.z<this.slab?1:0;x=Clazz.doubleToInt(this.zroot[u]);0==x&&(x=this.z);v=2;if(e){this.ptTemp.set(t-this.x,m-this.y,x-this.z);this.mat.transform(this.ptTemp);var y=J.util.Quadric.getOctant(this.ptTemp);this.z0=x;y==this.selectedOctant&&(p=this.getPlaneShade(t,m,this.zroot),x=Clazz.doubleToInt(this.zroot[0]),v=3);if(y=this.z<this.slab?x>=this.slab:x<this.slab)this.z0=x=this.slab,v=0;if(x<this.slab||x>this.depth||this.zbuf[w]<=this.z0)continue}}else{x=
Clazz.doubleToInt(Math.sqrt(s-B));x=this.z+(this.z<this.slab?x:-x);if(y=this.z<this.slab?x>=this.slab:x<this.slab)x=this.slab,v=0;if(x<this.slab||x>this.depth||this.zbuf[w]<=x)continue}switch(v){case 0:p=J.g3d.SphereRenderer.SHADE_SLAB_CLIPPED-3+(l>>8&7);l=(l<<16)+(l<<1)+l&2147483647;v=1;break;case 2:p=this.shader.getEllipsoidShade(t,m,this.zroot[u],a,this.mDeriv);break;case 3:this.g3d.clearPixel(w,this.z0);break;default:p=Clazz.doubleToInt((z*b+a<<8)/g),p=this.shader.sphereShadeIndexes[(n<<8)+p]}this.g3d.addPixel(w,
x,this.shades[p])}l=(l+t+m|1)&2147483647}},$fz.isPrivate=!0,$fz),"~N,~N,~N");$_M(c$,"setPlaneDerivatives",($fz=function(){this.planeShade=-1;for(var a=0;3>a;a++){var b=this.dxyz[a][0]=this.octantPoints[a].x-this.x,c=this.dxyz[a][1]=this.octantPoints[a].y-this.y,d=this.dxyz[a][2]=this.octantPoints[a].z-this.z;this.planeShades[a]=this.shader.getShadeIndex(b,c,-d);if(0==b&&0==c){this.planeShade=this.planeShades[a];break}}},$fz.isPrivate=!0,$fz));$_M(c$,"getPlaneShade",($fz=function(a,b,c){if(0<=this.planeShade)return this.planeShade;
for(var d=3,e,f=3.4028235E38,g=0;3>g;g++)if(0!=(e=this.dxyz[g][2]))e=this.z+(-this.dxyz[g][0]*(a-this.x)-this.dxyz[g][1]*(b-this.y))/e,e<f&&(f=e,d=g);3==d&&(d=0,f=this.z);c[0]=f;return this.planeShades[d]},$fz.isPrivate=!0,$fz),"~N,~N,~A");Clazz.defineStatics(c$,"maxOddSizeSphere",49,"maxSphereDiameter",1E3,"maxSphereDiameter2",2E3);c$.SHADE_SLAB_CLIPPED=c$.prototype.SHADE_SLAB_CLIPPED=J.util.Shader.shadeIndexNormal-5}),Clazz.declarePackage("J.g3d"),Clazz.load(["java.util.Hashtable"],"J.g3d.TextRenderer",
null,function(){c$=Clazz.decorateAsClass(function(){this.size=this.mapWidth=this.width=this.ascent=this.height=0;this.tmap=null;this.isInvalid=!1;Clazz.instantialize(this,arguments)},J.g3d,"TextRenderer");c$.clearFontCache=$_M(c$,"clearFontCache",function(){J.g3d.TextRenderer.working||(J.g3d.TextRenderer.htFont3d.clear(),J.g3d.TextRenderer.htFont3dAntialias.clear())});c$.plot=$_M(c$,"plot",function(a,b,c,d,e,f,g,h,k,l){if(0==f.length)return 0;if(0<=f.indexOf("<su"))return J.g3d.TextRenderer.plotByCharacter(a,
b,c,d,e,f,g,h,k,l);var m=g.getAscent();b-=m;f=J.g3d.TextRenderer.getPlotText3D(a,b,h,f,g,l);if(f.isInvalid)return f.width;l&&0==(d&12632256)&&(d|=263172);null!=k||0>a||a+f.width>h.width||0>b||b+f.height>h.height?J.g3d.TextRenderer.plotClipped(a,b,c,d,e,h,k,f.mapWidth,f.height,f.tmap):J.g3d.TextRenderer.plotUnclipped(a,b,c,d,e,h,f.mapWidth,f.height,f.tmap);return f.width},"~N,~N,~N,~N,~N,~S,J.util.JmolFont,J.g3d.Graphics3D,J.api.JmolRendererInterface,~B");c$.plotByCharacter=$_M(c$,"plotByCharacter",
($fz=function(a,b,c,d,e,f,g,h,k,l){for(var m=0,n=f.length,p=Math.round(0.25*g.getHeight()),q=-Math.round(0.3*g.getHeight()),r=0;r<n;r++){if("<"==f.charAt(r)){if(r+4<n&&f.substring(r,r+5).equals("<sub>")){r+=4;b+=p;continue}if(r+4<n&&f.substring(r,r+5).equals("<sup>")){r+=4;b+=q;continue}if(r+5<n&&f.substring(r,r+6).equals("</sub>")){r+=5;b-=p;continue}if(r+5<n&&f.substring(r,r+6).equals("</sup>")){r+=5;b-=q;continue}}var s=J.g3d.TextRenderer.plot(a+m,b,c,d,e,f.substring(r,r+1),g,h,k,l),m=m+s}return m},
$fz.isPrivate=!0,$fz),"~N,~N,~N,~N,~N,~S,J.util.JmolFont,J.g3d.Graphics3D,J.api.JmolRendererInterface,~B");c$.plotUnclipped=$_M(c$,"plotUnclipped",($fz=function(a,b,c,d,e,f,g,h,k){var l=0,m=f.zbuf,n=f.width;a=b*n+a;for(b=0;b<h;b++){for(var p=0;p<g;p++){var q=k[l++];0!=q&&c<m[a]&&f.shadeTextPixel(a,c,d,e,q);a++}a+=n-g}},$fz.isPrivate=!0,$fz),"~N,~N,~N,~N,~N,J.g3d.Graphics3D,~N,~N,~A");c$.plotClipped=$_M(c$,"plotClipped",($fz=function(a,b,c,d,e,f,g,h,k,l){null==g&&(g=f);for(var m=f=0;m<k;m++)for(var n=
0;n<h;n++){var p=l[f++];0!=p&&g.plotImagePixel(d,a+n,b+m,c,p,e)}},$fz.isPrivate=!0,$fz),"~N,~N,~N,~N,~N,J.g3d.Graphics3D,J.api.JmolRendererInterface,~N,~N,~A");Clazz.makeConstructor(c$,($fz=function(a,b){this.ascent=b.getAscent();this.height=b.getHeight();this.width=b.stringWidth(a);0!=this.width&&(this.mapWidth=this.width,this.size=this.mapWidth*this.height)},$fz.isPrivate=!0,$fz),"~S,J.util.JmolFont");c$.getPlotText3D=$_M(c$,"getPlotText3D",($fz=function(a,b,c,d,e,f){$t$=J.g3d.TextRenderer.working=
!0;J.g3d.TextRenderer.prototype.working=J.g3d.TextRenderer.working;$t$;f=f?J.g3d.TextRenderer.htFont3dAntialias:J.g3d.TextRenderer.htFont3d;var g=f.get(e),h=null,k=!1,l=!1;null!=g?h=g.get(d):(g=new java.util.Hashtable,k=!0);null==h&&(h=new J.g3d.TextRenderer(d,e),l=!0);h.isInvalid=0==h.width||0>=a+h.width||a>=c.width||0>=b+h.height||b>=c.height;if(h.isInvalid)return h;k&&f.put(e,g);l&&(h.setTranslucency(d,e,c),g.put(d,h));$t$=J.g3d.TextRenderer.working=!1;J.g3d.TextRenderer.prototype.working=J.g3d.TextRenderer.working;
$t$;return h},$fz.isPrivate=!0,$fz),"~N,~N,J.g3d.Graphics3D,~S,J.util.JmolFont,~B");$_M(c$,"setTranslucency",($fz=function(a,b,c){a=c.apiPlatform.getTextPixels(a,b,c.platform.getGraphicsForTextOrImage(this.mapWidth,this.height),c.platform.offscreenImage,this.mapWidth,this.height,this.ascent);if(null!=a){this.tmap=Clazz.newByteArray(this.size,0);for(b=a.length;0<=--b;)c=a[b]&255,0!=c&&(this.tmap[b]=J.g3d.TextRenderer.translucency[c>>5])}},$fz.isPrivate=!0,$fz),"~S,J.util.JmolFont,J.g3d.Graphics3D");
Clazz.defineStatics(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}),Clazz.declarePackage("J.g3d"),c$=Clazz.declareType(J.g3d,"TextSorter",null,java.util.Comparator),Clazz.overrideMethod(c$,"compare",function(a,b){return null==a||null==b?0:a.z>b.z?-1:a.z<b.z?1:0},"J.g3d.TextString,J.g3d.TextString"),Clazz.declarePackage("J.g3d"),Clazz.load(["J.util.P3i"],"J.g3d.TextString",
null,function(){c$=Clazz.decorateAsClass(function(){this.font=this.text=null;this.bgargb=this.argb=0;Clazz.instantialize(this,arguments)},J.g3d,"TextString",J.util.P3i);$_M(c$,"setText",function(a,b,c,d,e,f,g){this.text=a;this.font=b;this.argb=c;this.bgargb=d;this.x=e;this.y=f;this.z=g},"~S,J.util.JmolFont,~N,~N,~N,~N,~N");$_M(c$,"toString",function(){return Clazz.superCall(this,J.g3d.TextString,"toString",[])+" "+this.text})}),Clazz.declarePackage("J.util"),Clazz.load(null,"J.util.Rgb16",["J.util.SB"],
function(){c$=Clazz.decorateAsClass(function(){this.bScaled=this.gScaled=this.rScaled=0;Clazz.instantialize(this,arguments)},J.util,"Rgb16");Clazz.makeConstructor(c$,function(){});c$.newI=$_M(c$,"newI",function(a){var b=new J.util.Rgb16;b.setInt(a);return b},"~N");$_M(c$,"setInt",function(a){this.rScaled=a>>8&65280|128;this.gScaled=a&65280|128;this.bScaled=a<<8&65280|128},"~N");$_M(c$,"setRgb",function(a){this.rScaled=a.rScaled;this.gScaled=a.gScaled;this.bScaled=a.bScaled},"J.util.Rgb16");$_M(c$,
"diffDiv",function(a,b,c){this.rScaled=Clazz.doubleToInt((a.rScaled-b.rScaled)/c);this.gScaled=Clazz.doubleToInt((a.gScaled-b.gScaled)/c);this.bScaled=Clazz.doubleToInt((a.bScaled-b.bScaled)/c)},"J.util.Rgb16,J.util.Rgb16,~N");$_M(c$,"setAndIncrement",function(a,b){this.rScaled=a.rScaled;a.rScaled+=b.rScaled;this.gScaled=a.gScaled;a.gScaled+=b.gScaled;this.bScaled=a.bScaled;a.bScaled+=b.bScaled},"J.util.Rgb16,J.util.Rgb16");$_M(c$,"getArgb",function(){return 4278190080|this.rScaled<<8&16711680|this.gScaled&
65280|this.bScaled>>8});Clazz.overrideMethod(c$,"toString",function(){return(new J.util.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()})}),Clazz.declarePackage("J.g3d"),Clazz.load(["J.util.Rgb16"],"J.g3d.TriangleRenderer",["J.util.GData"],function(){c$=Clazz.decorateAsClass(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.line3d=this.g3d=null;Clazz.instantialize(this,arguments)},J.g3d,"TriangleRenderer");Clazz.prepareFields(c$,function(){this.ax=Clazz.newIntArray(3,0);this.ay=Clazz.newIntArray(3,0);this.az=Clazz.newIntArray(3,0);this.axW=Clazz.newIntArray(64,0);this.azW=Clazz.newIntArray(64,0);this.axE=Clazz.newIntArray(64,0);this.azE=Clazz.newIntArray(64,0);this.rgb16t1=new J.util.Rgb16;this.rgb16t2=
new J.util.Rgb16});Clazz.makeConstructor(c$,function(a){this.rgb16sW=Array(64);this.rgb16sE=Array(64);for(var b=64;0<=--b;)this.rgb16sW[b]=new J.util.Rgb16,this.rgb16sE[b]=new J.util.Rgb16;this.g3d=a;this.line3d=a.line3d;this.rgb16sGouraud=Array(3);for(b=3;0<=--b;)this.rgb16sGouraud[b]=new J.util.Rgb16},"J.g3d.Graphics3D");$_M(c$,"reallocRgb16s",function(a,b){var c=Array(b);System.arraycopy(a,0,c,0,a.length);for(var d=a.length;d<b;++d)c[d]=new J.util.Rgb16;return c},"~A,~N");$_M(c$,"setGouraud",function(a,
b,c){this.rgb16sGouraud[0].setInt(a);this.rgb16sGouraud[1].setInt(b);this.rgb16sGouraud[2].setInt(c)},"~N,~N,~N");$_M(c$,"drawfillTriangle",function(a,b,c,d,e,f,g,h,k,l){this.ax[0]=a;this.ax[1]=d;this.ax[2]=g;this.ay[0]=b;this.ay[1]=e;this.ay[2]=h;this.az[0]=c;this.az[1]=f;this.az[2]=k;this.fillTriangleB(l)},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~B");$_M(c$,"fillTriangleXYZ",function(a,b,c,d,e,f,g,h,k,l){this.ax[0]=a;this.ax[1]=d;this.ax[2]=g;this.ay[0]=b;this.ay[1]=e;this.ay[2]=h;this.az[0]=c;this.az[1]=f;
this.az[2]=k;this.fillTriangleB(l)},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~B");$_M(c$,"fillTriangleP3i",function(a,b,c,d){this.ax[0]=a.x;this.ax[1]=b.x;this.ax[2]=c.x;this.ay[0]=a.y;this.ay[1]=b.y;this.ay[2]=c.y;this.az[0]=a.z;this.az[1]=b.z;this.az[2]=c.z;this.fillTriangleB(d)},"J.util.P3i,J.util.P3i,J.util.P3i,~B");$_M(c$,"fillTriangleP3f",function(a,b,c,d){this.ax[0]=Math.round(a.x);this.ax[1]=Math.round(b.x);this.ax[2]=Math.round(c.x);this.ay[0]=Math.round(a.y);this.ay[1]=Math.round(b.y);this.ay[2]=Math.round(c.y);
this.az[0]=Math.round(a.z);this.az[1]=Math.round(b.z);this.az[2]=Math.round(c.z);this.fillTriangleB(d)},"J.util.P3,J.util.P3,J.util.P3,~B");$_M(c$,"fillTriangleP3if",function(a,b,c,d,e){this.ax[0]=a.x;this.ax[1]=b.x;this.ax[2]=c.x;this.ay[0]=a.y;this.ay[1]=b.y;this.ay[2]=c.y;this.az[0]=a.z;this.az[1]=b.z;this.az[2]=c.z;J.g3d.TriangleRenderer.adjustVertex(this.ax,d);J.g3d.TriangleRenderer.adjustVertex(this.ay,d);J.g3d.TriangleRenderer.adjustVertex(this.az,d);this.fillTriangleB(e)},"J.util.P3i,J.util.P3i,J.util.P3i,~N,~B");
c$.adjustVertex=$_M(c$,"adjustVertex",($fz=function(a,b){for(var c=(a[0]+a[1]+a[2])/3,d=0;3>d;d++)a[d]+=b*(c-a[d])},$fz.isPrivate=!0,$fz),"~A,~N");$_M(c$,"fillTriangleB",($fz=function(a){if(!(1>=this.az[0]||1>=this.az[1]||1>=this.az[2])){var b=this.g3d.clipCode3(this.ax[0],this.ay[0],this.az[0]),c=this.g3d.clipCode3(this.ax[1],this.ay[1],this.az[1]),d=this.g3d.clipCode3(this.ax[2],this.ay[2],this.az[2]),e=0!=(b|c|d);if(!(e&&0!=(b&c&d))){b=0;this.ay[1]<this.ay[b]&&(b=1);this.ay[2]<this.ay[b]&&(b=2);
c=(b+1)%3;d=(b+2)%3;if(this.ay[c]>this.ay[d])var f=c,c=d,d=f;var g=this.ay[b],h=this.ay[c],k=this.ay[d],l=k-g+1;if(!(l>3*this.g3d.height)){l>this.axW.length&&this.reallocRasterArrays(l);var m,n;a?(m=this.rgb16sW,n=this.rgb16sE):m=n=null;f=h-g;0==f?(this.ax[c]<this.ax[b]&&(f=c,c=b,b=f),this.generateRaster(l,b,d,this.axW,this.azW,0,m),this.generateRaster(l,c,d,this.axE,this.azE,0,n)):h==k?(this.ax[d]<this.ax[c]&&(f=c,c=d,d=f),this.generateRaster(l,b,c,this.axW,this.azW,0,m),this.generateRaster(l,b,
d,this.axE,this.azE,0,n)):(h=this.ax[d]-this.ax[b],k=J.util.GData.roundInt(Clazz.doubleToInt(l/2)),0>h&&(k=-k),this.ax[b]+Clazz.doubleToInt((h*f+k)/l)<this.ax[c]?(this.generateRaster(l,b,d,this.axW,this.azW,0,m),this.generateRaster(f+1,b,c,this.axE,this.azE,0,n),this.generateRaster(l-f,c,d,this.axE,this.azE,f,n)):(this.generateRaster(f+1,b,c,this.axW,this.azW,0,m),this.generateRaster(l-f,c,d,this.axW,this.azW,f,m),this.generateRaster(l,b,d,this.axE,this.azE,0,n)));this.g3d.setZMargin(5);a?this.fillRasterG(g,
l,e,this.g3d.$isPass2?1:0):this.fillRaster(g,l,e,this.g3d.$isPass2?1:0);this.g3d.setZMargin(0)}}}},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"reallocRasterArrays",($fz=function(a){a=a+31&-32;this.axW=Clazz.newIntArray(a,0);this.azW=Clazz.newIntArray(a,0);this.axE=Clazz.newIntArray(a,0);this.azE=Clazz.newIntArray(a,0);this.rgb16sW=this.reallocRgb16s(this.rgb16sW,a);this.rgb16sE=this.reallocRgb16s(this.rgb16sE,a)},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"generateRaster",($fz=function(a,b,c,d,e,f,g){var h=this.ax[b],
k=this.az[b],l=this.ax[c]-h,m=this.az[c]-k,n,p,q;0<=l?(n=1,p=l,q=0):(n=-1,p=-l,q=1-a);var k=(k<<10)+512,r=J.util.GData.roundInt(Clazz.doubleToInt(a/2));0>m&&(r=-r);m=Clazz.doubleToInt(((m<<10)+r)/a);p<=a?r=0:(r=J.util.GData.roundInt(Clazz.doubleToInt(l/a)),p%=a);for(var s=0,l=f;s<a;k+=m,++l,++s)d[l]=h,e[l]=k>>10,h+=r,q+=p,0<q&&(h+=n,q-=a);if(null!=g){d=this.rgb16t1;d.setRgb(this.rgb16sGouraud[b]);b=this.rgb16t2;b.diffDiv(this.rgb16sGouraud[c],d,a);l=f;for(a=f+a;l<a;++l)g[l].setAndIncrement(d,b)}},
$fz.isPrivate=!0,$fz),"~N,~N,~N,~A,~A,~N,~A");$_M(c$,"fillRaster",($fz=function(a,b,c,d){var e=0;0>a&&(b+=a,e-=a,a=0);a+b>this.g3d.height&&(b=this.g3d.height-a);if(c)for(;--b>=d;++a,++e){c=this.axW[e];var f=this.axE[e]-c+1-d;0<f&&this.g3d.plotPixelsClippedRaster(f,c,a,this.azW[e],this.azE[e],null,null)}else for(;--b>=d;++a,++e)f=this.axE[e]-(c=this.axW[e])+1-d,1==d&&0>f&&(f=1,c--),0<f&&this.g3d.plotPixelsUnclippedRaster(f,c,a,this.azW[e],this.azE[e],null,null)},$fz.isPrivate=!0,$fz),"~N,~N,~B,~N");
$_M(c$,"fillRasterG",($fz=function(a,b,c,d){var e=0;0>a&&(b+=a,e-=a,a=0);a+b>this.g3d.height&&(b=this.g3d.height-a);if(c)for(;--b>=d;++a,++e){c=this.axW[e];var f=this.axE[e]-c+1-d;0<f&&this.g3d.plotPixelsClippedRaster(f,c,a,this.azW[e],this.azE[e],this.rgb16sW[e],this.rgb16sE[e])}else for(;--b>=d;++a,++e)f=this.axE[e]-(c=this.axW[e])+1-d,1==d&&0>f&&(f=1,c--),0<f&&this.g3d.plotPixelsUnclippedRaster(f,c,a,this.azW[e],this.azE[e],this.rgb16sW[e],this.rgb16sE[e])},$fz.isPrivate=!0,$fz),"~N,~N,~B,~N");
Clazz.defineStatics(c$,"DEFAULT",64)}),Clazz.declarePackage("J.api"),Clazz.declareInterface(J.api,"JmolRepaintManager"),Clazz.declarePackage("J.render"),Clazz.load(["J.api.JmolRepaintManager","J.util.BS"],"J.render.RepaintManager",["J.util.Logger","J.viewer.JC"],function(){c$=Clazz.decorateAsClass(function(){this.bsTranslucent=this.renderers=this.shapeManager=this.viewer=null;this.holdRepaint=0;this.repaintPending=!1;Clazz.instantialize(this,arguments)},J.render,"RepaintManager",null,J.api.JmolRepaintManager);
Clazz.prepareFields(c$,function(){this.bsTranslucent=J.util.BS.newN(36)});Clazz.makeConstructor(c$,function(){});Clazz.overrideMethod(c$,"set",function(a,b){this.viewer=a;this.shapeManager=b},"J.viewer.Viewer,J.viewer.ShapeManager");Clazz.overrideMethod(c$,"isRepaintPending",function(){return this.repaintPending});Clazz.overrideMethod(c$,"pushHoldRepaint",function(){++this.holdRepaint});Clazz.overrideMethod(c$,"popHoldRepaint",function(a){--this.holdRepaint;0>=this.holdRepaint&&(this.holdRepaint=
0,a&&(this.repaintPending=!0,this.repaintNow()))},"~B");Clazz.overrideMethod(c$,"requestRepaintAndWait",function(){"undefined"!=typeof Jmol&&Jmol._repaint&&Jmol._repaint(this.viewer.applet,!1);this.repaintDone()});Clazz.overrideMethod(c$,"repaintIfReady",function(){if(this.repaintPending)return!1;this.repaintPending=!0;0==this.holdRepaint&&this.repaintNow();return!0});$_M(c$,"repaintNow",($fz=function(){this.viewer.haveDisplay&&"undefined"!=typeof Jmol&&Jmol._repaint&&Jmol._repaint(this.viewer.applet,
!0)},$fz.isPrivate=!0,$fz));Clazz.overrideMethod(c$,"repaintDone",function(){this.repaintPending=!1});Clazz.overrideMethod(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");$_M(c$,"getRenderer",($fz=function(a){if(null!=this.renderers[a])return this.renderers[a];var b=J.viewer.JC.getShapeClassName(a,!0)+"Renderer";try{var c=Class.forName(b).newInstance();c.setViewerG3dShapeID(this.viewer,a);return this.renderers[a]=c}catch(d){if(Clazz.exceptionOf(d,
Exception))return J.util.Logger.errorEx("Could not instantiate renderer:"+b,d),null;throw d;}},$fz.isPrivate=!0,$fz),"~N");Clazz.overrideMethod(c$,"render",function(a,b,c,d){var e=this.viewer.global.showTiming;try{a.renderBackground(null);if(c){this.bsTranslucent.clearAll();null!=d&&a.renderCrossHairs(d,this.viewer.getScreenWidth(),this.viewer.getScreenHeight(),this.viewer.getNavigationOffset(),this.viewer.getNavigationDepthPercent());var f=this.viewer.getRubberBandSelection();null!=f&&a.setColix(this.viewer.getColixRubberband())&&
a.drawRect(f.x,f.y,0,0,f.width,f.height)}null==this.renderers&&(this.renderers=Array(36));d=null;for(f=0;36>f&&a.currentlyRendering();++f){var g=this.shapeManager.getShape(f);null!=g&&(e&&(d="rendering "+J.viewer.JC.getShapeClassName(f,!1),J.util.Logger.startTimer(d)),(c||this.bsTranslucent.get(f))&&this.getRenderer(f).renderShape(a,b,g)&&this.bsTranslucent.set(f),e&&J.util.Logger.checkTimer(d,!1))}a.renderAllStrings(null)}catch(h){if(Clazz.exceptionOf(h,Exception))h.printStackTrace(),J.util.Logger.error("rendering error? ");
else throw h;}},"J.util.GData,J.modelset.ModelSet,~B,~A");Clazz.overrideMethod(c$,"renderExport",function(a,b,c,d){b=this.viewer.global.showTiming;this.viewer.finalizeTransformParameters();this.shapeManager.finalizeAtoms(null,null);this.shapeManager.transformAtoms();d=this.viewer.initializeExporter(a,d);if(null==d)return J.util.Logger.error("Cannot export "+a),null;d.renderBackground(d);null==this.renderers&&(this.renderers=Array(36));a=null;for(var e=0;36>e;++e){var f=this.shapeManager.getShape(e);
null!=f&&(b&&(a="rendering "+J.viewer.JC.getShapeClassName(e,!1),J.util.Logger.startTimer(a)),this.getRenderer(e).renderShape(d,c,f),b&&J.util.Logger.checkTimer(a,!1))}d.renderAllStrings(d);return d.finalizeOutput()},"~S,J.util.GData,J.modelset.ModelSet,~S")}),Clazz.declarePackage("J.shape"),Clazz.load(["J.shape.Shape"],"J.shape.AtomShape","J.atomdata.RadiusData J.constant.EnumPalette J.util.ArrayUtil $.BS $.BSUtil $.C".split(" "),function(){c$=Clazz.decorateAsClass(function(){this.mad=-1;this.paletteIDs=
this.colixes=this.mads=null;this.atomCount=0;this.atoms=null;this.isActive=!1;this.monomerCount=0;this.bsSizeDefault=null;Clazz.instantialize(this,arguments)},J.shape,"AtomShape",J.shape.Shape);$_M(c$,"getMonomers",function(){return null});Clazz.overrideMethod(c$,"initModelSet",function(){this.atoms=this.modelSet.atoms;this.atomCount=this.modelSet.getAtomCount();null!=this.mads&&(this.mads=J.util.ArrayUtil.arrayCopyShort(this.mads,this.atomCount));null!=this.colixes&&(this.colixes=J.util.ArrayUtil.arrayCopyShort(this.colixes,
this.atomCount));null!=this.paletteIDs&&(this.paletteIDs=J.util.ArrayUtil.arrayCopyByte(this.paletteIDs,this.atomCount))});Clazz.overrideMethod(c$,"getSize",function(a){return null==this.mads?0:this.mads[a]},"~N");Clazz.overrideMethod(c$,"setSize",function(a,b){this.setSize2(a,b)},"~N,J.util.BS");$_M(c$,"setSize2",function(a,b){this.setSizeRD(0==a?null:new J.atomdata.RadiusData(null,a,J.atomdata.RadiusData.EnumType.SCREEN,null),b)},"~N,J.util.BS");Clazz.overrideMethod(c$,"setSizeRD",function(a,b){if(null!=
this.atoms){this.isActive=!0;null==this.bsSizeSet&&(this.bsSizeSet=new J.util.BS);var c=null!=a&&0!=a.value,d=null==b,e=d?this.atomCount-1:b.nextSetBit(0);null==this.mads&&0<=e&&(this.mads=Clazz.newShortArray(this.atomCount,0));for(;0<=e;e=d?e-1:b.nextSetBit(e+1)){var f=this.atoms[e];this.mads[e]=f.calculateMad(this.viewer,a);this.bsSizeSet.setBitTo(e,c);f.setShapeVisibility(this.myVisibilityFlag,c)}}},"J.atomdata.RadiusData,J.util.BS");$_M(c$,"setPropAS",function(a,b,c){if("color"===a){this.isActive=
!0;a=J.util.C.getColixO(b);var d=J.constant.EnumPalette.pidOf(b);null==this.bsColixSet&&(this.bsColixSet=new J.util.BS);for(b=c.nextSetBit(0);0<=b;b=c.nextSetBit(b+1))this.setColixAndPalette(a,d,b)}else if("colors"===a){this.isActive=!0;var d=b[0],e=b[1].floatValue();null==this.bsColixSet&&(this.bsColixSet=new J.util.BS);for(b=c.nextSetBit(0);0<=b;b=c.nextSetBit(b+1))b>=d.length||(a=d[b],0.01<e&&(a=J.util.C.getColixTranslucent3(a,!0,e)),this.setColixAndPalette(a,J.constant.EnumPalette.UNKNOWN.id,
b))}else if("translucency"===a){this.isActive=!0;a=b.equals("translucent");null==this.bsColixSet&&(this.bsColixSet=new J.util.BS);for(b=c.nextSetBit(0);0<=b;b=c.nextSetBit(b+1))null==this.colixes&&(this.colixes=Clazz.newShortArray(this.atomCount,0),this.paletteIDs=Clazz.newByteArray(this.atomCount,0)),this.colixes[b]=J.util.C.getColixTranslucent3(this.colixes[b],a,this.translucentLevel),a&&this.bsColixSet.set(b)}else"deleteModelAtoms"===a?(this.atoms=b[1],b=b[2],this.atomCount=this.modelSet.getAtomCount(),
a=b[1],b=b[2],this.mads=J.util.ArrayUtil.deleteElements(this.mads,a,b),this.colixes=J.util.ArrayUtil.deleteElements(this.colixes,a,b),this.paletteIDs=J.util.ArrayUtil.deleteElements(this.paletteIDs,a,b),J.util.BSUtil.deleteBits(this.bsSizeSet,c),J.util.BSUtil.deleteBits(this.bsColixSet,c)):this.setPropS(a,b,c)},"~S,~O,J.util.BS");$_M(c$,"setColixAndPalette",function(a,b,c){if(null==this.colixes||c>=this.colixes.length){if(0==a)return;this.colixes=J.util.ArrayUtil.ensureLengthShort(this.colixes,c+
1);this.paletteIDs=J.util.ArrayUtil.ensureLengthByte(this.paletteIDs,c+1)}null==this.bsColixSet&&(this.bsColixSet=J.util.BS.newN(this.atomCount));this.colixes[c]=a=this.getColixI(a,b,c);this.bsColixSet.setBitTo(c,0!=a);this.paletteIDs[c]=b},"~N,~N,~N");Clazz.overrideMethod(c$,"setModelClickability",function(){if(this.isActive)for(var a=this.atomCount;0<=--a;){var b=this.atoms[a];0==(b.getShapeVisibilityFlags()&this.myVisibilityFlag)||this.modelSet.isAtomHidden(a)||b.setClickable(this.myVisibilityFlag)}});
Clazz.overrideMethod(c$,"getShapeState",function(){return this.isActive?this.viewer.getAtomShapeState(this):""});$_M(c$,"getInfoAsString",function(){return null},"~N")}),Clazz.declarePackage("J.shape"),Clazz.load(["J.shape.AtomShape"],"J.shape.Balls",["J.constant.EnumPalette","J.util.BS","$.C"],function(){c$=Clazz.declareType(J.shape,"Balls",J.shape.AtomShape);Clazz.overrideMethod(c$,"setSizeRD",function(a,b){this.isActive=!0;null==this.bsSizeSet&&(this.bsSizeSet=new J.util.BS);for(var c=Math.min(this.atoms.length,
b.length()),d=b.nextSetBit(0);0<=d&&d<c;d=b.nextSetBit(d+1))this.atoms[d].setMadAtom(this.viewer,a),this.bsSizeSet.set(d)},"J.atomdata.RadiusData,J.util.BS");Clazz.overrideMethod(c$,"setProperty",function(a,b,c){if("color"===a){var d=J.util.C.getColixO(b);0==d&&(d=2);null==this.bsColixSet&&(this.bsColixSet=new J.util.BS);var e=J.constant.EnumPalette.pidOf(b);for(a=c.nextSetBit(0);0<=a;a=c.nextSetBit(a+1)){var f=this.atoms[a];f.setColixAtom(this.getColixA(d,e,f));this.bsColixSet.setBitTo(a,2!=d||e!=
J.constant.EnumPalette.NONE.id);f.setPaletteID(e)}}else if("colorValues"===a){if(0!=b.length){null==this.bsColixSet&&(this.bsColixSet=new J.util.BS);var g=0,e=null;for(a=c.nextSetBit(0);0<=a&&!(g>=b.length);a=c.nextSetBit(a+1))e=Integer.$valueOf(b[g++]),d=J.util.C.getColixO(e),0==d&&(d=2),e=J.constant.EnumPalette.pidOf(e),f=this.atoms[a],f.setColixAtom(this.getColixA(d,e,f)),this.bsColixSet.setBitTo(a,2!=d||e!=J.constant.EnumPalette.NONE.id),f.setPaletteID(e)}}else if("colors"===a){b=b[0];null==this.bsColixSet&&
(this.bsColixSet=new J.util.BS);for(a=c.nextSetBit(0);0<=a;a=c.nextSetBit(a+1))a>=b.length||(this.atoms[a].setColixAtom(b[a]),this.atoms[a].setPaletteID(J.constant.EnumPalette.UNKNOWN.id),this.bsColixSet.set(a))}else if("translucency"===a){b=b.equals("translucent");null==this.bsColixSet&&(this.bsColixSet=new J.util.BS);for(a=c.nextSetBit(0);0<=a;a=c.nextSetBit(a+1))this.atoms[a].setTranslucent(b,this.translucentLevel),b&&this.bsColixSet.set(a)}else this.setPropAS(a,b,c)},"~S,~O,J.util.BS");Clazz.overrideMethod(c$,
"setModelClickability",function(){for(var a=this.viewer.getDeletedAtoms(),b=this.atomCount;0<=--b;){var c=this.atoms[b];c.setClickable(0);null!=a&&a.get(b)||(0==(c.getShapeVisibilityFlags()&this.myVisibilityFlag)||this.modelSet.isAtomHidden(b))||c.setClickable(this.myVisibilityFlag)}});Clazz.overrideMethod(c$,"setVisibilityFlags",function(a){for(var b=this.viewer.getBoolean(603979922),c=this.viewer.getDeletedAtoms(),d=this.atomCount;0<=--d;){var e=this.atoms[d],f=e.getShapeVisibilityFlags(),f=f&-2&
~this.myVisibilityFlag;e.setShapeVisibilityFlags(f);null!=c&&c.get(d)||!b&&1==e.getElementNumber()||(f=e.getModelIndex(),a.get(f)&&(e.setShapeVisibility(1,!0),0!=e.madAtom&&!this.modelSet.isAtomHidden(d)&&e.setShapeVisibility(this.myVisibilityFlag,!0)))}},"J.util.BS");Clazz.overrideMethod(c$,"getShapeState",function(){return this.viewer.getShapeState(this)})}),Clazz.declarePackage("J.shape"),Clazz.load(["J.shape.Shape","J.util.P3i"],"J.shape.Sticks","java.util.Hashtable J.constant.EnumPalette J.util.BS $.BSUtil $.C $.Escape $.JmolEdge $.P3".split(" "),
function(){c$=Clazz.decorateAsClass(function(){this.myMask=0;this.reportAll=!1;this.ptXY=this.selectedBonds=this.bsOrderSet=null;Clazz.instantialize(this,arguments)},J.shape,"Sticks",J.shape.Shape);Clazz.prepareFields(c$,function(){this.ptXY=new J.util.P3i});$_M(c$,"initShape",function(){Clazz.superCall(this,J.shape.Sticks,"initShape",[]);this.myMask=1023;this.reportAll=!1});Clazz.overrideMethod(c$,"setSize",function(a,b){if(2147483647==a)this.selectedBonds=J.util.BSUtil.copy(b);else if(-2147483648==
a)null==this.bsOrderSet&&(this.bsOrderSet=new J.util.BS),this.bsOrderSet.or(b);else{null==this.bsSizeSet&&(this.bsSizeSet=new J.util.BS);for(var c=null!=this.selectedBonds?this.modelSet.getBondIterator(this.selectedBonds):this.modelSet.getBondIteratorForType(this.myMask,b);c.hasNext();)this.bsSizeSet.set(c.nextIndex()),c.next().setMad(a)}},"~N,J.util.BS");Clazz.overrideMethod(c$,"setProperty",function(a,b,c){if("type"===a)this.myMask=b.intValue();else if("reportAll"===a)this.reportAll=!0;else if("reset"===
a)this.selectedBonds=this.bsColixSet=this.bsSizeSet=this.bsOrderSet=null;else if("bondOrder"===a){null==this.bsOrderSet&&(this.bsOrderSet=new J.util.BS);a=b.shortValue();for(c=null!=this.selectedBonds?this.modelSet.getBondIterator(this.selectedBonds):this.modelSet.getBondIteratorForType(65535,c);c.hasNext();)this.bsOrderSet.set(c.nextIndex()),c.next().setOrder(a)}else if("color"===a)if(null==this.bsColixSet&&(this.bsColixSet=new J.util.BS),a=J.util.C.getColixO(b),b=Clazz.instanceOf(b,J.constant.EnumPalette)?
b:null,b===J.constant.EnumPalette.TYPE||b===J.constant.EnumPalette.ENERGY){var d=b===J.constant.EnumPalette.ENERGY;for(c=null!=this.selectedBonds?this.modelSet.getBondIterator(this.selectedBonds):this.modelSet.getBondIteratorForType(this.myMask,c);c.hasNext();){this.bsColixSet.set(c.nextIndex());var e=c.next();d?(e.setColix(this.getColixB(a,b.id,e)),e.setPaletteID(b.id)):e.setColix(J.util.C.getColix(J.util.JmolEdge.getArgbHbondType(e.order)))}}else{if(!(2==a&&b!==J.constant.EnumPalette.CPK))for(c=
null!=this.selectedBonds?this.modelSet.getBondIterator(this.selectedBonds):this.modelSet.getBondIteratorForType(this.myMask,c);c.hasNext();)b=c.nextIndex(),e=c.next(),e.setColix(a),this.bsColixSet.setBitTo(b,0!=a&&2!=a)}else if("translucency"===a){null==this.bsColixSet&&(this.bsColixSet=new J.util.BS);a=b.equals("translucent");for(c=null!=this.selectedBonds?this.modelSet.getBondIterator(this.selectedBonds):this.modelSet.getBondIteratorForType(this.myMask,c);c.hasNext();)this.bsColixSet.set(c.nextIndex()),
c.next().setTranslucent(a,this.translucentLevel)}else"deleteModelAtoms"!==a&&this.setPropS(a,b,c)},"~S,~O,J.util.BS");Clazz.overrideMethod(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");Clazz.overrideMethod(c$,"setModelClickability",function(){for(var a=this.modelSet.bonds,b=this.modelSet.bondCount;0<=--b;){var c=a[b];
0==(c.getShapeVisibilityFlags()&this.myVisibilityFlag)||(this.modelSet.isAtomHidden(c.getAtomIndex1())||this.modelSet.isAtomHidden(c.getAtomIndex2()))||(c.getAtom1().setClickable(this.myVisibilityFlag),c.getAtom2().setClickable(this.myVisibilityFlag))}});Clazz.overrideMethod(c$,"getShapeState",function(){return this.viewer.getBondState(this,this.bsOrderSet,this.reportAll)});Clazz.overrideMethod(c$,"checkObjectHovered",function(a,b,c){var d=new J.util.P3;a=this.findPickedBond(a,b,c,d);if(null==a)return!1;
this.viewer.highlightBond(a.index,!0);return!0},"~N,~N,J.util.BS");Clazz.overrideMethod(c$,"checkObjectClicked",function(a,b,c,d){c=new J.util.P3;a=this.findPickedBond(a,b,d,c);if(null==a)return null;b=a.getAtom1().modelIndex;d=a.getIdentity();var e=new java.util.Hashtable;e.put("pt",c);e.put("index",Integer.$valueOf(a.index));e.put("modelIndex",Integer.$valueOf(b));e.put("model",this.viewer.getModelNumberDotted(b));e.put("type","bond");e.put("info",d);this.viewer.setStatusAtomPicked(-3,'["bond","'+
a.getIdentity()+'",'+c.x+","+c.y+","+c.z+"]");return e},"~N,~N,~N,J.util.BS,~B");$_M(c$,"findPickedBond",($fz=function(a,b,c,d){c=100;this.gdata.isAntialiased()&&(a<<=1,b<<=1,c<<=1);for(var e=null,f=new J.util.P3,g=this.modelSet.bonds,h=this.modelSet.bondCount;0<=--h;){var k=g[h];if(0!=k.getShapeVisibilityFlags()){var l=k.getAtom1(),m=k.getAtom2();if(l.isVisible(0)&&m.isVisible(0)){f.setT(l);f.add(m);f.scale(0.5);var n=this.coordinateInRange(a,b,f,c,this.ptXY);0<=n&&(l=1*(this.ptXY.x-l.screenX)/(m.screenX-
l.screenX),0.4>l||0.6<l||(c=n,e=k,d.setT(f)))}}}return e},$fz.isPrivate=!0,$fz),"~N,~N,J.util.BS,J.util.P3");Clazz.defineStatics(c$,"MAX_BOND_CLICK_DISTANCE_SQUARED",100)}),Clazz.declarePackage("J.shape"),Clazz.load(["J.api.JmolMeasurementClient","J.shape.AtomShape","J.util.JmolList"],"J.shape.Measures","java.lang.Float java.util.Hashtable J.modelset.Measurement $.MeasurementData J.util.BS $.BSUtil $.C $.Escape".split(" "),function(){c$=Clazz.decorateAsClass(function(){this.strFormat=this.bsSelected=
null;this.mustNotBeConnected=this.mustBeConnected=!1;this.intramolecular=this.radiusData=null;this.measureAllModels=!1;this.measurementCount=0;this.measurementPending=this.measurements=null;this.colix=0;this.defaultTickInfo=this.tickInfo=this.font3d=null;this.tokAction=0;Clazz.instantialize(this,arguments)},J.shape,"Measures",J.shape.AtomShape,J.api.JmolMeasurementClient);Clazz.prepareFields(c$,function(){this.measurements=new J.util.JmolList});Clazz.overrideMethod(c$,"initModelSet",function(){for(var a=
this.measurements.size();0<=--a;){var b=this.measurements.get(a);null!=b&&(b.modelSet=this.modelSet)}this.atoms=this.modelSet.atoms});Clazz.overrideMethod(c$,"initShape",function(){this.font3d=this.gdata.getFont3D(15)});Clazz.overrideMethod(c$,"setSize",function(a){this.mad=a},"~N,J.util.BS");Clazz.overrideMethod(c$,"setProperty",function(a,b){var c;if("clearModelIndex"===a)for(var d=0;d<this.measurementCount;d++)this.measurements.get(d).setModelIndex(0);else if("color"===a)this.setColor(null==b?
0:J.util.C.getColixO(b));else if("font"===a)this.font3d=b;else if("hideAll"===a)this.showHide(b.booleanValue());else if("pending"===a)this.measurementPending=b,null!=this.measurementPending&&1<this.measurementPending.getCount()&&this.viewer.setStatusMeasuring("measurePending",this.measurementPending.getCount(),this.measurementPending.toVector(!1).toString(),this.measurementPending.getValue());else{var e;if((e="refresh"===a)||"refreshTrajectories"===a)for(d=this.measurements.size();0<=--d;)null!=(c=
this.measurements.get(d))&&(e||c.isTrajectory)&&c.refresh();else if("select"===a)null==b||0==J.util.BSUtil.cardinalityOf(b)?this.bsSelected=null:(this.bsSelected=new J.util.BS,this.bsSelected.or(b));else if("setFormats"===a)this.setFormats(b);else if(this.measureAllModels=this.viewer.getBoolean(603979877),"delete"===a)this.deleteO(b),this.setIndices();else{this.bsSelected=null;if("maps"===a)for(d=0;d<b.length;d++)c=b[d].length,2>c||4<c||(e=Clazz.newIntArray(c+1,0),e[0]=c,System.arraycopy(b[d],0,e,
1,c),this.toggleOn(e));else if("measure"===a){this.tickInfo=b.tickInfo;if(null!=b.tickInfo&&b.tickInfo.id.equals("default")){this.defaultTickInfo=b.tickInfo;return}this.radiusData=b.radiusData;this.mustBeConnected=b.mustBeConnected;this.mustNotBeConnected=b.mustNotBeConnected;this.intramolecular=b.intramolecular;this.strFormat=b.strFormat;if(b.isAll){null!=this.tickInfo&&this.define(b,12291);this.define(b,b.tokAction);this.setIndices();return}var f=this.setSingleItem(b.points);switch(b.tokAction){case 12291:this.defineAll(-2147483648,
f,!0,!1,!1);this.setIndices();break;case 1048589:this.showHideM(f,!1);break;case 1048588:this.showHideM(f,!0);break;case 1060866:this.deleteM(f);0!=b.colix&&(f.colix=b.colix);this.toggle(f);break;case 269484114:this.toggle(f)}return}if("clear"===a)this.clear();else if("deleteModelAtoms"===a){this.atoms=b[1];e=b[2][0];for(var g=b[2][1],h=b[2][2],k=g+h,d=this.measurementCount;0<=--d;){c=this.measurements.get(d);for(var l=c.getCountPlusIndices(),m=1;m<=l[0];m++)if(f=l[m],f>=g){if(f<k){this.deleteI(d);
break}l[m]-=h}else if(0>f)if(f=c.getAtom(m),f.modelIndex>e)f.modelIndex--;else if(f.modelIndex==e){this.deleteI(d);break}}}else"hide"===a?this.showHideM((new J.modelset.Measurement).setPoints(this.modelSet,b,null,null),!0):"reformatDistances"===a?this.reformatDistances():"show"===a?this.showHideM((new J.modelset.Measurement).setPoints(this.modelSet,b,null,null),!1):"toggle"===a?this.toggle((new J.modelset.Measurement).setPoints(this.modelSet,b,null,null)):"toggleOn"===a&&this.toggleOn(b)}}},"~S,~O,J.util.BS");
$_M(c$,"setSingleItem",($fz=function(a){var b=Array(4),c=Clazz.newIntArray(5,0);c[0]=a.size();for(var d=a.size();0<=--d;){var e=a.get(d);if(Clazz.instanceOf(e,J.util.BS)){e=e.nextSetBit(0);if(0>e)return null;c[d+1]=e}else b[d]=e,c[d+1]=-2-d}return(new J.modelset.Measurement).setPoints(this.modelSet,c,b,null==this.tickInfo?this.defaultTickInfo:this.tickInfo)},$fz.isPrivate=!0,$fz),"J.util.JmolList");Clazz.overrideMethod(c$,"getProperty",function(a,b){return"pending".equals(a)?this.measurementPending:
"count".equals(a)?Integer.$valueOf(this.measurementCount):"countPlusIndices".equals(a)?b<this.measurementCount?this.measurements.get(b).getCountPlusIndices():null:"stringValue".equals(a)?b<this.measurementCount?this.measurements.get(b).getString():null:"pointInfo".equals(a)?this.measurements.get(Clazz.doubleToInt(b/10)).getLabel(b%10,!1,!1):"info".equals(a)?this.getAllInfo():"infostring".equals(a)?this.getAllInfoAsString():null},"~S,~N");$_M(c$,"clear",($fz=function(){0!=this.measurementCount&&(this.measurementCount=
0,this.measurements.clear(),this.viewer.setStatusMeasuring("measureDeleted",-1,"all",0))},$fz.isPrivate=!0,$fz));$_M(c$,"setColor",($fz=function(a){null==this.bsColixSet&&(this.bsColixSet=new J.util.BS);null==this.bsSelected&&(this.colix=a);for(var b,c=this.measurements.size();0<=--c;)if(null!=(b=this.measurements.get(c))&&(null!=this.bsSelected&&this.bsSelected.get(c)||null==this.bsSelected&&(0==a||0==b.colix)))b.colix=a,this.bsColixSet.set(c)},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"setFormats",($fz=
function(a){null!=a&&0==a.length&&(a=null);for(var b=this.measurements.size();0<=--b;)(null==this.bsSelected||this.bsSelected.get(b))&&this.measurements.get(b).formatMeasurementAs(a,null,!1)},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"showHide",($fz=function(a){for(var b=this.measurements.size();0<=--b;)if(null==this.bsSelected||this.bsSelected.get(b))this.measurements.get(b).isHidden=a},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"showHideM",($fz=function(a,b){var c=this.find(a);0<=c&&(this.measurements.get(c).isHidden=
b)},$fz.isPrivate=!0,$fz),"J.modelset.Measurement,~B");$_M(c$,"toggle",($fz=function(a){this.radiusData=null;var b=this.find(a),c;0<=b&&!(c=this.measurements.get(b)).isHidden?this.defineAll(b,c,!0,!1,!1):this.defineAll(-1,a,!1,!0,!1);this.setIndices()},$fz.isPrivate=!0,$fz),"J.modelset.Measurement");$_M(c$,"toggleOn",($fz=function(a){this.radiusData=null;this.bsSelected=new J.util.BS;this.defineAll(-2147483648,(new J.modelset.Measurement).setPoints(this.modelSet,a,null,this.defaultTickInfo),!1,!0,
!0);this.setIndices();this.reformatDistances()},$fz.isPrivate=!0,$fz),"~A");$_M(c$,"deleteM",($fz=function(a){this.radiusData=null;a=this.find(a);0<=a&&this.defineAll(a,this.measurements.get(a),!0,!1,!1);this.setIndices()},$fz.isPrivate=!0,$fz),"J.modelset.Measurement");$_M(c$,"deleteO",($fz=function(a){Clazz.instanceOf(a,Integer)?this.deleteI(a.intValue()):J.util.Escape.isAI(a)&&this.defineAll(-2147483648,(new J.modelset.Measurement).setPoints(this.modelSet,a,null,null),!0,!1,!1)},$fz.isPrivate=
!0,$fz),"~O");$_M(c$,"defineAll",($fz=function(a,b,c,d,e){if(this.measureAllModels){if(d&&(this.defineAll(a,b,!0,!1,!1),c))return;a=new J.util.JmolList;d=b.getCount();for(e=1;e<=d;e++){var f=b.getAtomIndex(e);a.addLast(0<=f?this.viewer.getAtomBits(1095763969,Integer.$valueOf(this.atoms[f].getAtomNumber())):b.getAtom(e))}this.define((new J.modelset.MeasurementData(this.viewer,a)).set(this.tokAction,this.radiusData,this.strFormat,null,this.tickInfo,this.mustBeConnected,this.mustNotBeConnected,this.intramolecular,
!0),c?12291:1060866)}else c?(-2147483648==a&&(a=this.find(b)),0<=a&&this.deleteI(a)):this.defineMeasurement(a,b,e)},$fz.isPrivate=!0,$fz),"~N,J.modelset.Measurement,~B,~B,~B");$_M(c$,"find",($fz=function(a){return J.modelset.Measurement.find(this.measurements,a)},$fz.isPrivate=!0,$fz),"J.modelset.Measurement");$_M(c$,"setIndices",($fz=function(){for(var a=0;a<this.measurementCount;a++)this.measurements.get(a).index=a},$fz.isPrivate=!0,$fz));$_M(c$,"define",($fz=function(a,b){this.tokAction=b;a.define(this,
this.modelSet)},$fz.isPrivate=!0,$fz),"J.modelset.MeasurementData,~N");Clazz.overrideMethod(c$,"processNextMeasure",function(a){var b=this.find(a);if(0<=b)12291==this.tokAction?this.deleteI(b):null!=this.strFormat?this.measurements.get(b).formatMeasurementAs(this.strFormat,null,!0):this.measurements.get(b).isHidden=1048588==this.tokAction;else if(1060866==this.tokAction||269484114==this.tokAction)a.tickInfo=null==this.tickInfo?this.defaultTickInfo:this.tickInfo,this.defineMeasurement(-1,a,!0)},"J.modelset.Measurement");
$_M(c$,"defineMeasurement",($fz=function(a,b,c){var d=b.getMeasurement();if(null==this.radiusData||b.isInRange(this.radiusData,d))-2147483648==a&&(a=this.find(b)),0<=a?(this.measurements.get(a).isHidden=!1,c&&this.bsSelected.set(a)):(a=(new J.modelset.Measurement).setM(this.modelSet,b,d,0==b.colix?this.colix:b.colix,this.strFormat,this.measurementCount),this.measurements.addLast(a),this.viewer.setStatusMeasuring("measureCompleted",this.measurementCount++,a.toVector(!1).toString(),a.getValue()))},
$fz.isPrivate=!0,$fz),"~N,J.modelset.Measurement,~B");$_M(c$,"deleteI",($fz=function(a){var b=this.measurements.get(a).toVector(!0).toString();this.measurements.remove(a);this.measurementCount--;this.viewer.setStatusMeasuring("measureDeleted",a,b,0)},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"reformatDistances",($fz=function(){for(var a=this.measurementCount;0<=--a;)this.measurements.get(a).reformatDistanceIfSelected()},$fz.isPrivate=!0,$fz));$_M(c$,"getAllInfo",($fz=function(){for(var a=new J.util.JmolList,
b=0;b<this.measurementCount;b++)a.addLast(this.getInfo(b));return a},$fz.isPrivate=!0,$fz));$_M(c$,"getAllInfoAsString",($fz=function(){for(var a="Measurement Information",b=0;b<this.measurementCount;b++)a+="\n"+this.getInfoAsString(b);return a},$fz.isPrivate=!0,$fz));$_M(c$,"getInfo",($fz=function(a){var b=this.measurements.get(a),c=b.getCount(),d=new java.util.Hashtable;d.put("index",Integer.$valueOf(a));d.put("type",2==c?"distance":3==c?"angle":"dihedral");d.put("strMeasurement",b.getString());
d.put("count",Integer.$valueOf(c));d.put("value",Float.$valueOf(b.getValue()));a=b.tickInfo;null!=a&&(d.put("ticks",a.ticks),null!=a.scale&&d.put("tickScale",a.scale),null!=a.tickLabelFormats&&d.put("tickLabelFormats",a.tickLabelFormats),Float.isNaN(a.first)||d.put("tickStart",Float.$valueOf(a.first)));a=new J.util.JmolList;for(var e=1;e<=c;e++){var f=new java.util.Hashtable,g=b.getAtomIndex(e);f.put("_ipt",Integer.$valueOf(g));f.put("coord",J.util.Escape.eP(b.getAtom(e)));f.put("atomno",Integer.$valueOf(0>
g?-1:this.atoms[g].getAtomNumber()));f.put("info",0>g?"<point>":this.atoms[g].getInfo());a.addLast(f)}d.put("atoms",a);return d},$fz.isPrivate=!0,$fz),"~N");Clazz.overrideMethod(c$,"getInfoAsString",function(a){return this.measurements.get(a).getInfoAsString(null)},"~N");$_M(c$,"setVisibilityInfo",function(){var a=this.viewer.getVisibleFramesBitSet(),b=this.measurementCount;a:for(;0<=--b;){var c=this.measurements.get(b);c.isVisible=!1;if(!(0==this.mad||c.isHidden)){for(var d=c.getCount();0<d;d--){var e=
c.getAtomIndex(d);if(0<=e){if(!this.modelSet.atoms[e].isClickable())continue a}else if(e=c.getAtom(d).modelIndex,0<=e&&!a.get(e))continue a}c.isVisible=!0}}});Clazz.overrideMethod(c$,"getShapeState",function(){return this.viewer.getMeasurementState(this,this.measurements,this.measurementCount,this.font3d,this.defaultTickInfo)})}),Clazz.declarePackage("J.shape"),Clazz.load(["J.shape.Shape"],"J.shape.FontShape",null,function(){c$=Clazz.decorateAsClass(function(){this.myType=this.font3d=null;Clazz.instantialize(this,
arguments)},J.shape,"FontShape",J.shape.Shape);Clazz.overrideMethod(c$,"initShape",function(){this.translucentAllowed=!1});$_M(c$,"setPropFS",function(a,b){"font"===a&&(this.font3d=b)},"~S,~O")}),Clazz.declarePackage("J.shape"),Clazz.load(["J.shape.FontShape"],"J.shape.FontLineShape",null,function(){c$=Clazz.decorateAsClass(function(){this.tickInfos=null;Clazz.instantialize(this,arguments)},J.shape,"FontLineShape",J.shape.FontShape);Clazz.prepareFields(c$,function(){this.tickInfos=Array(4)});$_M(c$,
"setPropFLS",function(a,b){"tickInfo"===a?null==b.ticks?b.type.equals(" ")?this.tickInfos[0]=this.tickInfos[1]=this.tickInfos[2]=this.tickInfos[3]=null:this.tickInfos["xyz".indexOf(b.type)+1]=null:this.tickInfos["xyz".indexOf(b.type)+1]=b:this.setPropFS(a,b)},"~S,~O");Clazz.overrideMethod(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)})}),Clazz.declarePackage("J.shape"),
Clazz.load(["J.shape.FontLineShape"],"J.shape.Bbcage",null,function(){c$=Clazz.decorateAsClass(function(){this.isVisible=!1;this.mad=0;Clazz.instantialize(this,arguments)},J.shape,"Bbcage",J.shape.FontLineShape);Clazz.overrideMethod(c$,"setProperty",function(a,b){this.setPropFLS(a,b)},"~S,~O,J.util.BS");$_M(c$,"initShape",function(){Clazz.superCall(this,J.shape.Bbcage,"initShape",[]);this.font3d=this.gdata.getFont3D(14);this.myType="boundBox"});Clazz.overrideMethod(c$,"setVisibilityFlags",function(a){if(this.isVisible=
0!=(this.mad=this.viewer.getObjectMad(4))){var b=this.viewer.getBoundBoxModels();if(null!=b){for(var c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))if(b.get(c))return;this.isVisible=!1}}},"J.util.BS")}),Clazz.declarePackage("J.shape"),Clazz.load(["J.shape.FontLineShape"],"J.shape.Uccage",null,function(){c$=Clazz.declareType(J.shape,"Uccage",J.shape.FontLineShape);Clazz.overrideMethod(c$,"setProperty",function(a,b){this.setPropFLS(a,b)},"~S,~O,J.util.BS");$_M(c$,"getShapeState",function(){return this.modelSet.haveUnitCells?
Clazz.superCall(this,J.shape.Uccage,"getShapeState",[]):""});$_M(c$,"initShape",function(){Clazz.superCall(this,J.shape.Uccage,"initShape",[]);this.font3d=this.gdata.getFont3D(14);this.myType="unitcell"})}),Clazz.declarePackage("J.shape"),Clazz.load(["J.shape.FontShape"],"J.shape.Frank",["J.i18n.GT"],function(){c$=Clazz.decorateAsClass(function(){this.frankString="Jmol";this.baseFont3d=this.currentMetricsFont3d=null;this.dy=this.dx=this.y=this.x=this.frankDescent=this.frankAscent=this.frankWidth=
0;Clazz.instantialize(this,arguments)},J.shape,"Frank",J.shape.FontShape);$_M(c$,"initShape",function(){Clazz.superCall(this,J.shape.Frank,"initShape",[]);this.myType="frank";this.baseFont3d=this.font3d=this.gdata.getFont3DFSS("SansSerif","Plain",16);this.calcMetrics()});Clazz.overrideMethod(c$,"setProperty",function(a,b){this.setPropFS(a,b)},"~S,~O,J.util.BS");Clazz.overrideMethod(c$,"wasClicked",function(a,b){var c=this.viewer.getScreenWidth(),d=this.viewer.getScreenHeight();return 0<c&&0<d&&a>
c-this.frankWidth-4&&b>d-this.frankAscent-4},"~N,~N");Clazz.overrideMethod(c$,"checkObjectHovered",function(a,b){if(!this.viewer.getShowFrank()||!this.wasClicked(a,b)||!this.viewer.menuEnabled())return!1;this.gdata.isDisplayAntialiased()&&!this.viewer.isSingleThreaded&&(a<<=1,b<<=1);this.viewer.hoverOnPt(a,b,J.i18n.GT._("Click for menu..."),null,null);return!0},"~N,~N,J.util.BS");$_M(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())});$_M(c$,"getFont",function(a){this.font3d=this.gdata.getFont3DScaled(this.baseFont3d,a);this.calcMetrics()},"~N");Clazz.overrideMethod(c$,"getShapeState",function(){return this.viewer.getFontState(this.myType,this.font3d)});Clazz.defineStatics(c$,"defaultFontName","SansSerif",
"defaultFontStyle","Plain","defaultFontSize",16,"frankMargin",4)}),Clazz.declarePackage("J.render"),Clazz.load(null,"J.render.ShapeRenderer",["J.viewer.JC"],function(){c$=Clazz.decorateAsClass(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;Clazz.instantialize(this,arguments)},J.render,"ShapeRenderer");$_M(c$,"initRenderer",function(){});$_M(c$,"setViewerG3dShapeID",
function(a,b){this.viewer=a;this.shapeID=b;this.myVisibilityFlag=J.viewer.JC.getShapeVisibilityFlag(b);this.initRenderer()},"J.viewer.Viewer,~N");$_M(c$,"renderShape",function(a,b,c){this.g3d=a;this.modelSet=b;this.shape=c;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")}),Clazz.declarePackage("J.render"),Clazz.load(["J.render.ShapeRenderer"],"J.render.BallsRenderer",
null,function(){c$=Clazz.declareType(J.render,"BallsRenderer",J.render.ShapeRenderer);Clazz.overrideMethod(c$,"render",function(){var a=!1;if(!this.viewer.getBoolean(603979976)||!this.viewer.getInMotion())for(var b=this.modelSet.atoms,c=this.viewer.getRenderableBitSet(),d=c.nextSetBit(0);0<=d;d=c.nextSetBit(d+1)){var e=b[d];0<e.screenDiameter&&0!=(e.getShapeVisibilityFlags()&this.myVisibilityFlag)&&(this.g3d.setColix(e.getColix())?this.g3d.drawAtom(e):a=!0)}return a})}),Clazz.declarePackage("J.render"),
Clazz.load(["J.render.ShapeRenderer","J.util.BS","$.P3","$.P3i","$.V3"],"J.render.SticksRenderer",["java.lang.Float","J.constant.EnumPalette","J.modelset.Bond","J.util.C","$.JmolEdge"],function(){c$=Clazz.decorateAsClass(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.atomB=this.atomA=null;this.width=
this.colixB=this.colixA=this.mag2d=this.dy=this.dx=this.zB=this.yB=this.xB=this.zA=this.yA=this.xA=0;this.lineBond=!1;this.bondOrder=0;this.slabByAtom=this.slabbing=this.isAntialiased=this.renderWireframe=!1;this.bsForPass2=this.s2=this.s1=this.p2=this.p1=this.z=this.y=this.x=this.dashDots=null;this.isPass2=!1;this.atomB0=this.atomA0=null;this.dyStep=this.dxStep=this.yAxis2=this.xAxis2=this.yAxis1=this.xAxis1=0;Clazz.instantialize(this,arguments)},J.render,"SticksRenderer",J.render.ShapeRenderer);
Clazz.prepareFields(c$,function(){this.x=new J.util.V3;this.y=new J.util.V3;this.z=new J.util.V3;this.p1=new J.util.P3;this.p2=new J.util.P3;this.s1=new J.util.P3i;this.s2=new J.util.P3i;this.bsForPass2=J.util.BS.newN(64)});Clazz.overrideMethod(c$,"render",function(){(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(603979888)?J.render.SticksRenderer.sixdots:
J.render.SticksRenderer.dashes;this.multipleBondSpacing=this.viewer.getFloat(570425369);this.isCartesianExport=1==this.exportType;0==this.multipleBondSpacing&&this.isCartesianExport&&(this.multipleBondSpacing=0.2);this.multipleBondRadiusFactor=this.viewer.getFloat(570425368);this.showMultipleBonds=0!=this.multipleBondSpacing&&this.viewer.getBoolean(603979928);this.modeMultipleBond=this.viewer.getModeMultipleBond();this.renderWireframe=this.viewer.getInMotion()&&this.viewer.getBoolean(603979976);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 a=this.modelSet.bonds,b=!1;if(!this.isExport&&this.isPass2)for(var c=this.bsForPass2.nextSetBit(0);0<=c;c=this.bsForPass2.nextSetBit(c+1))this.bond=a[c],this.renderBond();else for(c=this.modelSet.bondCount;0<=--c;)this.bond=a[c],
0!=(this.bond.getShapeVisibilityFlags()&this.myVisibilityFlag)&&this.renderBond()&&(b=!0,this.bsForPass2.set(c));return b});$_M(c$,"renderBond",($fz=function(){this.atomA=this.atomA0=this.bond.getAtom1();this.atomB=this.atomB0=this.bond.getAtom2();var a=this.bond.order&-131073;this.bondsBackbone&&(this.ssbondsBackbone&&0!=(a&256)?(this.atomA=this.atomA.getGroup().getLeadAtomOr(this.atomA),this.atomB=this.atomB.getGroup().getLeadAtomOr(this.atomB)):this.hbondsBackbone&&J.modelset.Bond.isOrderH(a)&&
(this.atomA=this.atomA.getGroup().getLeadAtomOr(this.atomA),this.atomB=this.atomB.getGroup().getLeadAtomOr(this.atomB)));if(!this.isPass2&&(!this.atomA.isInFrame()||!this.atomB.isInFrame()||!this.g3d.isInDisplayRange(this.atomA.screenX,this.atomA.screenY)||!this.g3d.isInDisplayRange(this.atomB.screenX,this.atomB.screenY)||this.modelSet.isAtomHidden(this.atomA.getIndex())||this.modelSet.isAtomHidden(this.atomB.getIndex()))||this.slabbing&&(this.g3d.isClippedZ(this.atomA.screenZ)&&this.g3d.isClippedZ(this.atomB.screenZ)||
this.slabByAtom&&(this.g3d.isClippedZ(this.atomA.screenZ)||this.g3d.isClippedZ(this.atomB.screenZ))))return!1;this.zA=this.atomA.screenZ;this.zB=this.atomB.screenZ;if(1==this.zA||1==this.zB)return!1;this.colixA=this.atomA0.getColix();this.colixB=this.atomB0.getColix();2==((this.colix=this.bond.colix)&-30721)?(this.colix&=30720,this.colixA=J.util.C.getColixInherited(this.colix|this.viewer.getColixAtomPalette(this.atomA0,J.constant.EnumPalette.CPK.id),this.colixA),this.colixB=J.util.C.getColixInherited(this.colix|
this.viewer.getColixAtomPalette(this.atomB0,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));var b=!1;if(!this.isExport&&!this.isPass2){var c=!J.util.C.isColixTranslucent(this.colixA),d=!J.util.C.isColixTranslucent(this.colixB);if(!c||!d){if(!c&&!d&&!b)return this.g3d.setColix(!c?this.colixA:this.colixB),!0;b=!0}}this.bondOrder=a&-131073;if(0==(this.bondOrder&224)&&(0!=(this.bondOrder&
256)&&(this.bondOrder&=-257),0!=(this.bondOrder&1023)&&(!this.showMultipleBonds||0==this.modeMultipleBond||2==this.modeMultipleBond&&500<this.mad)))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==a?0:1;break;case 515:case 514:this.bondOrder=2;c=515==a?this.getAromaticDottedBondMask():0;break;default:0!=(this.bondOrder&224)?(this.bondOrder=J.util.JmolEdge.getPartialBondOrder(a),c=J.util.JmolEdge.getPartialBondDotted(a)):J.modelset.Bond.isOrderH(this.bondOrder)?
(this.bondOrder=1,this.hbondsSolid||(c=-1)):32768==this.bondOrder&&(this.bondOrder=1)}this.xA=this.atomA.screenX;this.yA=this.atomA.screenY;this.xB=this.atomB.screenX;this.yB=this.atomB.screenY;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=Clazz.floatToInt(this.viewer.scaleToScreen(Clazz.doubleToInt((this.zA+this.zB)/2),this.mad));this.renderWireframe&&0<this.width&&(this.width=
1);if(!this.isCartesianExport&&(this.lineBond=1>=this.width)&&this.isAntialiased)this.width=3,this.lineBond=!1;switch(c){case -1:this.drawDashed(this.xA,this.yA,this.zA,this.xB,this.yB,this.zB,J.render.SticksRenderer.hDashes);break;default:this.drawBond(c)}return b},$fz.isPrivate=!0,$fz));$_M(c$,"drawBond",($fz=function(a){if(this.isCartesianExport&&1==this.bondOrder)this.g3d.drawBond(this.atomA,this.atomB,this.colixA,this.colixB,this.endcaps,this.mad,-1);else{var b=0==this.dx&&0==this.dy;if(!b||
!this.lineBond){var c=1<this.bondOrder&&0<this.multipleBondSpacing,d=c&&(null!=this.viewer.getHybridizationAndAxes(this.atomA.index,this.z,this.x,"pz")||null!=this.viewer.getHybridizationAndAxes(this.atomB.index,this.z,this.x,"pz"))&&!Float.isNaN(this.x.x);if(b&&!c){a=Clazz.doubleToInt(this.width/8)+3;a=this.width+a;c=this.yA-Clazz.doubleToInt((this.bondOrder-1)*a/2);do this.fillCylinder(this.colixA,this.colixA,this.endcaps,this.width,this.xA,c,this.zA,this.xA,c,this.zA),c+=a;while(0<--this.bondOrder)}else if(b=
0!=(a&1),1==this.bondOrder)b?this.drawDashed(this.xA,this.yA,this.zA,this.xB,this.yB,this.zB,this.dashDots):this.fillCylinder(this.colixA,this.colixB,this.endcaps,this.width,this.xA,this.yA,this.zA,this.xB,this.yB,this.zB);else if(c){d||this.z.set(3.141592653589793,2.718281828459045,8.539734222673566);this.x.sub2(this.atomB,this.atomA);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.atomA,this.x);for(this.p2.sub2(this.atomB,this.x);;){this.isCartesianExport&&!b?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),b?this.drawDashed(this.s1.x,this.s1.y,this.s1.z,this.s2.x,this.s2.y,this.s2.z,this.dashDots):
this.fillCylinder(this.colixA,this.colixB,this.endcaps,this.width,this.s1.x,this.s1.y,this.s1.z,this.s2.x,this.s2.y,this.s2.z),a>>=1,b=0!=(a&1));if(0>=--this.bondOrder)break;this.p1.add(this.y);this.p2.add(this.y);this.stepAxisCoordinates()}}else{this.mag2d=Math.round(Math.sqrt(this.dx*this.dx+this.dy*this.dy));for(this.resetAxisCoordinates();;){0!=(a&1)?this.drawDashed(this.xAxis1,this.yAxis1,this.zA,this.xAxis2,this.yAxis2,this.zB,this.dashDots):this.fillCylinder(this.colixA,this.colixB,this.endcaps,
this.width,this.xAxis1,this.yAxis1,this.zA,this.xAxis2,this.yAxis2,this.zB);a>>=1;if(0>=--this.bondOrder)break;this.stepAxisCoordinates()}}}}},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"resetAxisCoordinates",($fz=function(){var a=this.mag2d>>3;-1!=this.multipleBondSpacing&&0>this.multipleBondSpacing&&(a*=-this.multipleBondSpacing);a=this.width+a;this.dxStep=Clazz.doubleToInt(a*this.dy/this.mag2d);this.dyStep=Clazz.doubleToInt(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-=Clazz.doubleToInt(this.dxStep*a/2);this.yAxis1-=Clazz.doubleToInt(this.dyStep*a/2);this.xAxis2-=Clazz.doubleToInt(this.dxStep*a/2);this.yAxis2-=Clazz.doubleToInt(this.dyStep*a/2)},$fz.isPrivate=!0,$fz));$_M(c$,"stepAxisCoordinates",($fz=function(){this.xAxis1+=this.dxStep;this.yAxis1+=this.dyStep;this.xAxis2+=this.dxStep;this.yAxis2+=this.dyStep},$fz.isPrivate=!0,$fz));$_M(c$,"getAromaticDottedBondMask",($fz=function(){var a=this.atomB.findAromaticNeighbor(this.atomA.getIndex());
return null==a?1:0>this.dx*(a.screenY-this.yA)-this.dy*(a.screenX-this.xA)?2:1},$fz.isPrivate=!0,$fz));$_M(c$,"drawDashed",($fz=function(a,b,c,d,e,f,g){d-=a;e-=b;f-=c;var h=g===J.render.SticksRenderer.sixdots;h&&(1500<4*this.mad?g=J.render.SticksRenderer.twodots:1500<6*this.mad&&(g=J.render.SticksRenderer.fourdots));for(var k=g[0],l=g[1],m=g[2],n=this.colixA,p=0==m?this.colixB:this.colixA,q=3;q<g.length;q++){var r=g[q],s=Clazz.doubleToInt(Math.floor(a+d*r/k)),t=Clazz.doubleToInt(Math.floor(b+e*r/
k)),u=Clazz.doubleToInt(Math.floor(c+f*r/k));if(h)this.s1.set(s,t,u),q==l?this.g3d.setColix(this.colixA):q==m&&this.g3d.setColix(this.colixB),this.g3d.fillSphereI(this.width,this.s1);else{q==l&&(n=this.colixB);r=g[++q];q==m&&(p=this.colixB);var v=Clazz.doubleToInt(Math.floor(a+d*r/k)),w=Clazz.doubleToInt(Math.floor(b+e*r/k)),r=Clazz.doubleToInt(Math.floor(c+f*r/k));this.fillCylinder(n,p,2,this.width,s,t,u,v,w,r)}}},$fz.isPrivate=!0,$fz),"~N,~N,~N,~N,~N,~N,~A");$_M(c$,"fillCylinder",($fz=function(a,
b,c,d,e,f,g,h,k,l){this.lineBond?this.g3d.drawLine(a,b,e,f,g,h,k,l):this.g3d.fillCylinderXYZ(a,b,c,!this.isExport||1==this.mad?d:this.mad,e,f,g,h,k,l)},$fz.isPrivate=!0,$fz),"~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");Clazz.defineStatics(c$,"dashes",[12,0,0,2,5,7,10],"hDashes",[10,7,6,1,3,4,6,7,9],"sixdots",[12,3,6,1,3,5,7,9,11],"fourdots",[13,3,5,2,5,8,11],"twodots",[12,3,4,3,9])}),Clazz.declarePackage("J.render"),Clazz.load(["J.render.ShapeRenderer","J.util.P3","$.P3i","$.V3"],"J.render.FontLineShapeRenderer",
["java.lang.Float","J.constant.EnumAxesMode","J.util.TextFormat"],function(){c$=Clazz.decorateAsClass(function(){this.imageFontScaling=0;this.tickInfo=this.vectorT3=this.vectorT2=this.vectorT=this.pointT3=this.pointT2=this.pointT=this.pt2=this.pt1=this.pt0=this.font3d=this.atomD=this.atomC=this.atomB=this.atomA=null;this.draw000=!0;this.endcap=3;Clazz.instantialize(this,arguments)},J.render,"FontLineShapeRenderer",J.render.ShapeRenderer);Clazz.prepareFields(c$,function(){this.pt0=new J.util.P3i;this.pt1=
new J.util.P3i;this.pt2=new J.util.P3i;this.pointT=new J.util.P3;this.pointT2=new J.util.P3;this.pointT3=new J.util.P3;this.vectorT=new J.util.V3;this.vectorT2=new J.util.V3;this.vectorT3=new J.util.V3});$_M(c$,"getDiameter",function(a,b){var c;c=20<b;switch(this.exportType){case 1:c=c?b:Clazz.doubleToInt(Math.floor(1E3*this.viewer.unscaleToScreen(a,2*b)));break;default:c?c=Clazz.floatToInt(this.viewer.scaleToScreen(a,b)):(this.g3d.isAntialiased()&&(b+=b),c=b)}return c},"~N,~N");$_M(c$,"renderLine",
function(a,b,c,d,e,f){d.set(Clazz.doubleToInt(Math.floor(a.x)),Clazz.doubleToInt(Math.floor(a.y)),Clazz.doubleToInt(Math.floor(a.z)));e.set(Clazz.doubleToInt(Math.floor(b.x)),Clazz.doubleToInt(Math.floor(b.y)),Clazz.doubleToInt(Math.floor(b.z)));0>c?this.g3d.drawDottedLine(d,e):this.g3d.fillCylinder(this.endcap,c,d,e);f&&null!=this.tickInfo&&(this.atomA.screenX=d.x,this.atomA.screenY=d.y,this.atomA.screenZ=d.z,this.atomB.screenX=e.x,this.atomB.screenY=e.y,this.atomB.screenZ=e.z,this.drawTicks(this.atomA,
this.atomB,c,!0))},"J.util.P3,J.util.P3,~N,J.util.P3i,J.util.P3i,~B");$_M(c$,"drawTicks",function(a,b,c,d){Float.isNaN(this.tickInfo.first)&&(this.tickInfo.first=0);this.drawTicks2(a,b,this.tickInfo.ticks.x,8,c,!d?null:null==this.tickInfo.tickLabelFormats?["%0.2f"]:this.tickInfo.tickLabelFormats);this.drawTicks2(a,b,this.tickInfo.ticks.y,4,c,null);this.drawTicks2(a,b,this.tickInfo.ticks.z,2,c,null)},"J.util.Point3fi,J.util.Point3fi,~N,~B");$_M(c$,"drawTicks2",($fz=function(a,b,c,d,e,f){if(0!=c&&(this.g3d.isAntialiased()&&
(d*=2),this.vectorT2.set(b.screenX,b.screenY,0),this.vectorT.set(a.screenX,a.screenY,0),this.vectorT2.sub(this.vectorT),!(50>this.vectorT2.length()))){var g=this.tickInfo.signFactor;this.vectorT.setT(b);this.vectorT.sub(a);var h=this.vectorT.length();if(null!=this.tickInfo.scale)if(Float.isNaN(this.tickInfo.scale.x)){var k=this.viewer.getUnitCellInfo(0);Float.isNaN(k)||this.vectorT.set(this.vectorT.x/k,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);k=this.vectorT.length()+1E-4*c;if(!(k<c)){this.vectorT.scale(c/k*h/k);b=(b.screenZ-a.screenZ)/(k/c);k+=this.tickInfo.first;h=Clazz.doubleToInt(Math.floor(this.tickInfo.first/c))*c-this.tickInfo.first;this.pointT.scaleAdd2(h/c,this.vectorT,a);h+=this.tickInfo.first;a=a.screenZ;0>e&&(e=1);this.vectorT2.set(-this.vectorT2.y,this.vectorT2.x,0);this.vectorT2.scale(d/this.vectorT2.length());d=this.tickInfo.reference;
null==d?(this.pointT3.setT(this.viewer.getBoundBoxCenter()),this.viewer.getAxesMode()===J.constant.EnumAxesMode.BOUNDBOX&&(this.pointT3.x+=1,this.pointT3.y+=1,this.pointT3.z+=1)):this.pointT3.setT(d);this.viewer.transformPtScr(this.pointT3,this.pt2);d=0.2>Math.abs(this.vectorT2.x/this.vectorT2.y);for(var l=!d,m=!d&&0>this.vectorT2.x,n=null!=f&&0<f.length,p,q,r=Array(1),s=this.draw000?0:-1;h<k;){if(h>=this.tickInfo.first&&(this.pointT2.setT(this.pointT),this.viewer.transformPt3f(this.pointT2,this.pointT2),
this.drawLine(Clazz.doubleToInt(Math.floor(this.pointT2.x)),Clazz.doubleToInt(Math.floor(this.pointT2.y)),Clazz.floatToInt(a),p=Clazz.doubleToInt(Math.floor(this.pointT2.x+this.vectorT2.x)),q=Clazz.doubleToInt(Math.floor(this.pointT2.y+this.vectorT2.y)),Clazz.floatToInt(a),e),n&&(this.draw000||0!=h))){r[0]=Float.$valueOf(0==h?0:h*g);var t=J.util.TextFormat.sprintf(f[s%f.length],"f",r);this.drawString(p,q,Clazz.floatToInt(a),4,m,d,l,Clazz.doubleToInt(Math.floor(this.pointT2.y)),t)}this.pointT.add(this.vectorT);
h+=c;a+=b;s++}}}},$fz.isPrivate=!0,$fz),"J.util.Point3fi,J.util.Point3fi,~N,~N,~N,~A");$_M(c$,"drawLine",function(a,b,c,d,e,f,g){return this.drawLine2(a,b,c,d,e,f,g)},"~N,~N,~N,~N,~N,~N,~N");$_M(c$,"drawLine2",function(a,b,c,d,e,f,g){this.pt0.set(a,b,c);this.pt1.set(d,e,f);if(0>g)return this.g3d.drawDashedLine(4,2,this.pt0,this.pt1),1;this.g3d.fillCylinder(2,g,this.pt0,this.pt1);return Clazz.doubleToInt((g+1)/2)},"~N,~N,~N,~N,~N,~N,~N");$_M(c$,"drawString",function(a,b,c,d,e,f,g,h,k){if(null!=k){var l=
this.font3d.stringWidth(k),m=this.font3d.getAscent();a=e?a-(Clazz.doubleToInt(d/2)+2+l):f?a-(Clazz.doubleToInt(d/2)+2+Clazz.doubleToInt(l/2)):a+(Clazz.doubleToInt(d/2)+2);e=b;e=g?e+Clazz.doubleToInt(m/2):0==h||h<b?e+m:e-Clazz.doubleToInt(d/2);b=c-d-2;1>b&&(b=1);this.g3d.drawString(k,this.font3d,a,e,b,b,0)}},"~N,~N,~N,~N,~B,~B,~B,~N,~S")}),Clazz.declarePackage("J.render"),Clazz.load(["J.render.FontLineShapeRenderer","J.util.AxisAngle4f","$.Matrix3f"],"J.render.MeasuresRenderer",null,function(){c$=
Clazz.decorateAsClass(function(){this.measurement=null;this.doJustify=!1;this.matrixT=this.aaT=null;Clazz.instantialize(this,arguments)},J.render,"MeasuresRenderer",J.render.FontLineShapeRenderer);Clazz.prepareFields(c$,function(){this.aaT=new J.util.AxisAngle4f;this.matrixT=new J.util.Matrix3f});Clazz.overrideMethod(c$,"render",function(){if(!this.g3d.checkTranslucent(!1))return!1;var a=this.shape;this.doJustify=this.viewer.getBoolean(603979872);this.mad=a.mad;this.imageFontScaling=this.viewer.getImageFontScaling();
this.font3d=this.g3d.getFont3DScaled(a.font3d,this.imageFontScaling);this.renderPendingMeasurement(a.measurementPending);if(!this.viewer.getBoolean(603979926))return!1;var b=this.viewer.getBoolean(603979878),c=this.viewer.getBoolean(603979835);a.setVisibilityInfo();for(var d=a.measurementCount;0<=--d;){var e=a.measurements.get(d);(c||e.isDynamic)&&e.refresh();e.isVisible&&(this.colix=e.colix,0==this.colix&&(this.colix=a.colix),0==this.colix&&(this.colix=this.viewer.getColixBackgroundContrast()),this.g3d.setColix(this.colix),
this.renderMeasurement(e.getCount(),e,b))}return!1});$_M(c$,"getAtom",($fz=function(a){a=this.measurement.getAtom(a);0>a.screenDiameter&&(this.viewer.transformPtScr(a,this.pt0),a.screenX=this.pt0.x,a.screenY=this.pt0.y,a.screenZ=this.pt0.z);return a},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"renderMeasurement",($fz=function(a,b,c){this.measurement=b;switch(a){case 1:-2147483648!=b.traceX&&(this.atomA=this.getAtom(1),this.drawLine(this.atomA.screenX,this.atomA.screenY,this.atomA.screenZ,b.traceX,b.traceY,
this.atomA.screenZ,this.mad));break;case 2:this.atomA=this.getAtom(1);this.atomB=this.getAtom(2);this.renderDistance(c);break;case 3:this.atomA=this.getAtom(1);this.atomB=this.getAtom(2);this.atomC=this.getAtom(3);this.renderAngle(c);break;case 4:this.atomA=this.getAtom(1),this.atomB=this.getAtom(2),this.atomC=this.getAtom(3),this.atomD=this.getAtom(4),this.renderTorsion(c)}this.atomA=this.atomB=this.atomC=this.atomD=null},$fz.isPrivate=!0,$fz),"~N,J.modelset.Measurement,~B");$_M(c$,"renderDistance",
function(a){this.tickInfo=this.measurement.tickInfo;if(null!=this.tickInfo)this.drawLine(this.atomA.screenX,this.atomA.screenY,this.atomA.screenZ,this.atomB.screenX,this.atomB.screenY,this.atomB.screenZ,this.mad),this.drawTicks(this.atomA,this.atomB,this.mad,a);else{var b=this.atomA.screenZ-this.atomA.screenDiameter-10,c=this.atomB.screenZ-this.atomB.screenDiameter-10,d=this.drawLine(this.atomA.screenX,this.atomA.screenY,b,this.atomB.screenX,this.atomB.screenY,c,this.mad);if(a&&(a=this.measurement.getString(),
!(null==a||0==a.length))){0<this.mad&&(d<<=1);b=Clazz.doubleToInt((b+c)/2);1>b&&(b=1);var c=Clazz.doubleToInt((this.atomA.screenX+this.atomB.screenX)/2),e=Clazz.doubleToInt((this.atomA.screenY+this.atomB.screenY)/2);this.drawString(c,e,b,d,this.doJustify&&0<(c-this.atomA.screenX)*(e-this.atomA.screenY),!1,!1,this.doJustify?0:2147483647,a)}}},"~B");$_M(c$,"renderAngle",($fz=function(a){var b=this.atomB.screenDiameter+10,c=this.atomB.screenZ-b,d=this.atomC.screenZ-this.atomC.screenDiameter-10,e=this.drawLine(this.atomA.screenX,
this.atomA.screenY,this.atomA.screenZ-this.atomA.screenDiameter-10,this.atomB.screenX,this.atomB.screenY,c,this.mad),e=e+this.drawLine(this.atomB.screenX,this.atomB.screenY,c,this.atomC.screenX,this.atomC.screenY,d,this.mad);if(a)if(e=Clazz.doubleToInt((e+1)/2),a=this.measurement.getAxisAngle(),null==a)b=Clazz.doubleToInt(Math.floor(5*this.imageFontScaling)),this.drawString(this.atomB.screenX+b,this.atomB.screenY-b,c,e,!1,!1,!1,this.doJustify?0:2147483647,this.measurement.getString());else{var f=
Clazz.doubleToInt(Math.floor(64*(a.angle/6.283185307179586))),c=a.angle/f;this.aaT.setAA(a);a=Clazz.doubleToInt(f/2);for(d=this.measurement.getPointArc();0<=--f;){this.aaT.angle=f*c;this.matrixT.setAA(this.aaT);this.pointT.setT(d);this.matrixT.transform(this.pointT);this.pointT.add(this.atomB);var g=this.viewer.transformPt(this.pointT),h=g.z-b;0>h&&(h=0);this.g3d.drawPixel(g.x,g.y,h);f==a&&(this.pointT.setT(d),this.pointT.scale(1.1),this.matrixT.transform(this.pointT),this.pointT.add(this.atomB),
this.viewer.transformPt(this.pointT),this.drawString(g.x,g.y,g.z-b,e,g.x<this.atomB.screenX,!1,!1,this.doJustify?this.atomB.screenY:2147483647,this.measurement.getString()))}}},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"renderTorsion",($fz=function(a){var b=this.atomA.screenZ-this.atomA.screenDiameter-10,c=this.atomB.screenZ-this.atomB.screenDiameter-10,d=this.atomC.screenZ-this.atomC.screenDiameter-10,e=this.atomD.screenZ-this.atomD.screenDiameter-10,f=this.drawLine(this.atomA.screenX,this.atomA.screenY,
b,this.atomB.screenX,this.atomB.screenY,c,this.mad),f=f+this.drawLine(this.atomB.screenX,this.atomB.screenY,c,this.atomC.screenX,this.atomC.screenY,d,this.mad),f=f+this.drawLine(this.atomC.screenX,this.atomC.screenY,d,this.atomD.screenX,this.atomD.screenY,e,this.mad);a&&this.drawString(Clazz.doubleToInt((this.atomA.screenX+this.atomB.screenX+this.atomC.screenX+this.atomD.screenX)/4),Clazz.doubleToInt((this.atomA.screenY+this.atomB.screenY+this.atomC.screenY+this.atomD.screenY)/4),Clazz.doubleToInt((b+
c+d+e)/4),f/3,!1,!1,!1,this.doJustify?0:2147483647,this.measurement.getString())},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"renderPendingMeasurement",($fz=function(a){if(!(this.isExport||null==a)){var b=a.getCount();0!=b&&(this.g3d.setColix(-2147483648==a.traceX?this.viewer.getColixRubberband():2==b?20:23),a.refresh(),a.haveTarget()?this.renderMeasurement(b,a,-2147483648==a.traceX):this.renderPendingWithCursor(b,a))}},$fz.isPrivate=!0,$fz),"J.modelset.MeasurementPending");$_M(c$,"renderPendingWithCursor",
($fz=function(a,b){1<a&&this.renderMeasurement(a,b,!1);this.measurement=b;var c=this.getAtom(a),d=c.screenZ-c.screenDiameter-10,e=this.viewer.getCursorX(),f=this.viewer.getCursorY();this.g3d.isAntialiased()&&(e<<=1,f<<=1);this.drawLine(c.screenX,c.screenY,d,e,f,0,this.mad)},$fz.isPrivate=!0,$fz),"~N,J.modelset.MeasurementPending");Clazz.overrideMethod(c$,"drawLine",function(a,b,c,d,e,f,g){g=Clazz.floatToInt(20<=g&&1!=this.exportType?this.viewer.scaleToScreen(Clazz.doubleToInt((c+f)/2),g):g);return this.drawLine2(a,
b,c,d,e,f,g)},"~N,~N,~N,~N,~N,~N,~N")}),Clazz.declarePackage("J.util"),Clazz.load(null,"J.util.SimpleUnitCell",["java.lang.Float","J.util.ArrayUtil","$.Matrix4f","$.V3"],function(){c$=Clazz.decorateAsClass(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;Clazz.instantialize(this,arguments)},J.util,"SimpleUnitCell");$_M(c$,"isSupercell",function(){return 1<this.na||1<this.nb||1<this.nc});c$.isValid=$_M(c$,"isValid",function(a){return null!=a&&(0<a[0]||14<a.length&&!Float.isNaN(a[14]))},"~A");Clazz.makeConstructor(c$,function(){});c$.newA=$_M(c$,"newA",function(a){var b=new J.util.SimpleUnitCell;b.set(a);return b},"~A");$_M(c$,"set",function(a){if(J.util.SimpleUnitCell.isValid(a)){this.notionalUnitcell=
J.util.ArrayUtil.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])?Clazz.floatToInt(a[22]):1);this.nb=Math.max(1,25<=a.length&&!Float.isNaN(a[23])?Clazz.floatToInt(a[23]):1);this.nc=Math.max(1,25<=a.length&&!Float.isNaN(a[24])?Clazz.floatToInt(a[24]):1);if(0>=this.a){var b=J.util.V3.new3(a[6],a[7],a[8]),c=J.util.V3.new3(a[9],a[10],a[11]),d=J.util.V3.new3(a[12],a[13],a[14]);this.a=b.length();
this.b=c.length();this.c=d.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:c.angle(d)/0.017453292;this.beta=0>this.c?90:b.angle(d)/0.017453292;this.gamma=0>this.b?90:b.angle(c)/0.017453292;0>this.c&&(a=J.util.ArrayUtil.arrayCopyF(a,-1),0>this.b&&(c.set(0,0,1),c.cross(c,b),0.001>c.length()&&c.set(0,1,0),c.normalize(),a[9]=c.x,a[10]=c.y,a[11]=c.z),0>this.c&&(d.cross(b,c),d.normalize(),a[12]=d.x,a[13]=d.y,a[14]=d.z))}this.a*=this.na;0>=
this.b?this.dimension=this.b=this.c=1:0>=this.c?(this.c=1,this.b*=this.nb,this.dimension=2):(this.b*=this.nb,this.c*=this.nc,this.dimension=3);this.cosAlpha=Math.cos(0.017453292*this.alpha);this.sinAlpha=Math.sin(0.017453292*this.alpha);this.cosBeta=Math.cos(0.017453292*this.beta);this.sinBeta=Math.sin(0.017453292*this.beta);this.cosGamma=Math.cos(0.017453292*this.gamma);this.sinGamma=Math.sin(0.017453292*this.gamma);b=Math.sqrt(this.sinAlpha*this.sinAlpha+this.sinBeta*this.sinBeta+this.sinGamma*
this.sinGamma+2*this.cosAlpha*this.cosBeta*this.cosGamma-2);this.volume=this.a*this.b*this.c*b;this.cA_=(this.cosAlpha-this.cosBeta*this.cosGamma)/this.sinGamma;this.cB_=b/this.sinGamma;this.a_=this.b*this.c*this.sinAlpha/this.volume;this.b_=this.a*this.c*this.sinBeta/this.volume;this.c_=this.a*this.b*this.sinGamma/this.volume;if(21<a.length&&!Float.isNaN(a[21])){b=Clazz.newFloatArray(16,0);for(c=0;16>c;c++){switch(c%4){case 0:d=this.na;break;case 1:d=this.nb;break;case 2:d=this.nc;break;default:d=
1}b[c]=a[6+c]*d}this.matrixCartesianToFractional=J.util.Matrix4f.newA(b);this.matrixFractionalToCartesian=new J.util.Matrix4f;this.matrixFractionalToCartesian.invertM(this.matrixCartesianToFractional)}else 14<a.length&&!Float.isNaN(a[14])?(b=this.matrixFractionalToCartesian=new J.util.Matrix4f,b.setColumn4(0,a[6]*this.na,a[7]*this.na,a[8]*this.na,0),b.setColumn4(1,a[9]*this.nb,a[10]*this.nb,a[11]*this.nb,0),b.setColumn4(2,a[12]*this.nc,a[13]*this.nc,a[14]*this.nc,0)):(b=this.matrixFractionalToCartesian=
new J.util.Matrix4f,b.setColumn4(0,this.a,0,0,0),b.setColumn4(1,this.b*this.cosGamma,this.b*this.sinGamma,0,0),b.setColumn4(2,this.c*this.cosBeta,this.c*(this.cosAlpha-this.cosBeta*this.cosGamma)/this.sinGamma,this.volume/(this.a*this.b*this.sinGamma),0)),b.setColumn4(3,0,0,0,1),this.matrixCartesianToFractional=new J.util.Matrix4f,this.matrixCartesianToFractional.invertM(this.matrixFractionalToCartesian);this.matrixCtoFAbsolute=this.matrixCartesianToFractional;this.matrixFtoCAbsolute=this.matrixFractionalToCartesian}},
"~A");$_M(c$,"toSupercell",function(a){a.x/=this.na;a.y/=this.nb;a.z/=this.nc;return a},"J.util.P3");$_M(c$,"toCartesian",function(a,b){null!=this.matrixFractionalToCartesian&&(b?this.matrixFtoCAbsolute:this.matrixFractionalToCartesian).transform(a)},"J.util.P3,~B");$_M(c$,"toFractional",function(a,b){null!=this.matrixCartesianToFractional&&(b?this.matrixCtoFAbsolute:this.matrixCartesianToFractional).transform(a)},"J.util.P3,~B");$_M(c$,"isPolymer",function(){return 1==this.dimension});$_M(c$,"isSlab",
function(){return 2==this.dimension});$_M(c$,"getNotionalUnitCell",function(){return this.notionalUnitcell});$_M(c$,"getUnitCellAsArray",function(a){var b=this.matrixFractionalToCartesian;return a?[b.m00,b.m10,b.m20,b.m01,b.m11,b.m21,b.m02,b.m12,b.m22]:[this.a,this.b,this.c,this.alpha,this.beta,this.gamma,b.m00,b.m10,b.m20,b.m01,b.m11,b.m21,b.m02,b.m12,b.m22,this.dimension,this.volume]},"~B");$_M(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=$_M(c$,"ijkToPoint3f",function(a,b,c){c-=5;b.x=Clazz.doubleToInt(a/100)+c;b.y=Clazz.doubleToInt(a%100/10)+c;b.z=a%10+c},"~N,J.util.P3,~N");Clazz.defineStatics(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)}),Clazz.declarePackage("J.render"),Clazz.load(["J.render.FontLineShapeRenderer","J.util.P3"],"J.render.CageRenderer",
["J.util.BoxInfo","$.Point3fi"],function(){c$=Clazz.decorateAsClass(function(){this.tickEdges=this.screens=null;this.isPolymer=this.isSlab=!1;this.pt=null;Clazz.instantialize(this,arguments)},J.render,"CageRenderer",J.render.FontLineShapeRenderer);Clazz.prepareFields(c$,function(){this.screens=Array(8);for(var a=8;0<=--a;)this.screens[a]=new J.util.P3;this.pt=new J.util.P3});$_M(c$,"renderCage",function(a,b,c,d,e,f,g){this.g3d.setColix(this.colix);var h=this.shape;this.imageFontScaling=this.viewer.getImageFontScaling();
this.font3d=this.g3d.getFont3DScaled(h.font3d,this.imageFontScaling);for(var k=0,l=8;0<=--l;)this.pt.setT(b[l]),1!=g&&(this.pt.sub(b[0]),this.pt.scaleAdd2(g,this.pt,b[0])),this.viewer.transformPtNoClip(this.pt,this.screens[l]),k+=this.screens[l].z;a=this.getDiameter(Clazz.doubleToInt(Math.floor(k/8)),a);g=2;k=String.fromCharCode(0);e&=this.isPolymer?1:this.isSlab?85:255;f&=this.isPolymer?16:this.isSlab?85:255;for(l=2*d;24>l;l+=2){d=J.util.BoxInfo.edges[l];var m=J.util.BoxInfo.edges[l+1];null!=c&&
0==d&&this.viewer.transformPtNoClip(c[g--],this.screens[0]);if(!(0==(e&1<<d)||0==(f&1<<m))){var n=null!=h.tickInfos&&0!=(k=this.tickEdges[l>>1]).charCodeAt(0);if(n){null==this.atomA&&(this.atomA=new J.util.Point3fi,this.atomB=new J.util.Point3fi);this.atomA.setT(b[d]);this.atomB.setT(b[m]);var p=0;if(Clazz.instanceOf(this.shape,J.shape.Bbcage))switch(k){case "x":p=this.atomA.x;break;case "y":p=this.atomA.y;break;case "z":p=this.atomA.z}this.tickInfo=h.tickInfos["xyz".indexOf(k)+1];null==this.tickInfo&&
(this.tickInfo=h.tickInfos[0]);null==this.tickInfo?n=!1:this.tickInfo.first=p}this.renderLine(this.screens[d],this.screens[m],a,this.pt0,this.pt1,n)}}},"~N,~A,~A,~N,~N,~N,~N")}),Clazz.declarePackage("J.render"),Clazz.load(["J.render.CageRenderer"],"J.render.BbcageRenderer",["J.util.BoxInfo"],function(){c$=Clazz.declareType(J.render,"BbcageRenderer",J.render.CageRenderer);Clazz.overrideMethod(c$,"initRenderer",function(){this.tickEdges=J.util.BoxInfo.bbcageTickEdges});Clazz.overrideMethod(c$,"render",
function(){var a=this.shape;if(a.isVisible&&(this.isExport||this.g3d.checkTranslucent(!1))&&!this.viewer.isJmolDataFrame())this.colix=this.viewer.getObjectColix(4),this.renderCage(a.mad,this.modelSet.getBboxVertices(),null,0,255,255,1);return!1})}),Clazz.declarePackage("J.render"),Clazz.load(["J.render.CageRenderer","J.util.P3"],"J.render.UccageRenderer",["J.util.BoxInfo","$.C","$.SimpleUnitCell","$.TextFormat"],function(){c$=Clazz.decorateAsClass(function(){this.fid=0;this.offsetT=this.offset=this.cell1=
this.cell0=this.fset0=this.verticesT=null;Clazz.instantialize(this,arguments)},J.render,"UccageRenderer",J.render.CageRenderer);Clazz.prepareFields(c$,function(){this.verticesT=Array(8);for(var a=8;0<=--a;)this.verticesT[a]=new J.util.P3;this.fset0=J.util.P3.new3(555,555,1);this.cell0=new J.util.P3;this.cell1=new J.util.P3;this.offset=new J.util.P3;this.offsetT=new J.util.P3});Clazz.overrideMethod(c$,"initRenderer",function(){this.tickEdges=J.util.BoxInfo.uccageTickEdges;this.draw000=!1});Clazz.overrideMethod(c$,
"render",function(){this.imageFontScaling=this.viewer.getImageFontScaling();this.font3d=this.g3d.getFont3DScaled(this.shape.font3d,this.imageFontScaling);var a=this.viewer.getObjectMad(5);if(0==a||this.viewer.isJmolDataFrame()||this.viewer.isNavigating()&&this.viewer.getBoolean(603979887))return!1;this.colix=this.viewer.getObjectColix(5);var b=J.util.C.isColixTranslucent(this.colix);if(!this.isExport&&b!=this.g3d.isPass2())return b;this.render1(a);return!1});$_M(c$,"render1",($fz=function(a){this.g3d.setColix(this.colix);
var b=this.viewer.getCurrentUnitCell();if(null!=b){this.isPolymer=b.isPolymer();this.isSlab=b.isSlab();var c=b.getUnitCellVertices();this.offset.setT(b.getCartesianOffset());var d=b.getUnitCellMultiplier(),e=null!=d;e||(d=this.fset0);J.util.SimpleUnitCell.ijkToPoint3f(Clazz.floatToInt(d.x),this.cell0,0);J.util.SimpleUnitCell.ijkToPoint3f(Clazz.floatToInt(d.y),this.cell1,1);var f;0>d.z&&(this.cell0.scale(-1/d.z),this.cell1.scale(-1/d.z));for(var g=this.viewer.getAxisPoints(),h=0==this.viewer.getObjectMad(1)||
2>this.viewer.getFloat(570425346)||null==g,k=g,l=Clazz.floatToInt(this.cell0.x);l<this.cell1.x;l++)for(var m=Clazz.floatToInt(this.cell0.y);m<this.cell1.y;m++)for(var n=Clazz.floatToInt(this.cell0.z);n<this.cell1.z;n++){e?(this.offsetT.set(l,m,n),this.offsetT.scale(Math.abs(d.z)),b.toCartesian(this.offsetT,!0),this.offsetT.add(this.offset),k=0==l&&0==m&&0==n?g:null,f=h||null==k?0:3):(this.offsetT.setT(this.offset),f=h?0:3);for(var p=8;0<=--p;)this.verticesT[p].add2(c[p],this.offsetT);this.renderCage(a,
this.verticesT,k,f,255,255,Math.abs(d.z))}this.viewer.getBoolean(603979828)&&(!this.viewer.isPreviewOnly()&&!b.isPeriodic())&&this.renderInfo(b)}},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"nfformat",($fz=function(a){return J.util.TextFormat.formatDecimal(a,3)},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"renderInfo",($fz=function(a){if(!this.isExport&&this.g3d.setColix(this.viewer.getColixBackgroundContrast())){this.fid=this.g3d.getFontFidFS("Monospaced",14*this.imageFontScaling);this.g3d.setFontFid(this.fid);var b=
Clazz.doubleToInt(Math.floor(15*this.imageFontScaling)),c=Clazz.doubleToInt(Math.floor(5*this.imageFontScaling)),d=b,e=a.getSpaceGroupName();this.isPolymer?e="polymer":this.isSlab&&(e="slab");(new Boolean(null!=e&!e.equals("-- [--]"))).valueOf()&&(d+=b,this.g3d.drawStringNoSlab(e,null,c,d,0,0));d+=b;this.g3d.drawStringNoSlab("a="+this.nfformat(a.getUnitCellInfoType(0))+"\u00c5",null,c,d,0,0);this.isPolymer||(d+=b,this.g3d.drawStringNoSlab("b="+this.nfformat(a.getUnitCellInfoType(1))+"\u00c5",null,
c,d,0,0));!this.isPolymer&&!this.isSlab&&(d+=b,this.g3d.drawStringNoSlab("c="+this.nfformat(a.getUnitCellInfoType(2))+"\u00c5",null,c,d,0,0));this.isPolymer||(this.isSlab||(d+=b,this.g3d.drawStringNoSlab("\u03b1="+this.nfformat(a.getUnitCellInfoType(3))+"\u00b0",null,c,d,0,0),d+=b,this.g3d.drawStringNoSlab("\u03b2="+this.nfformat(a.getUnitCellInfoType(4))+"\u00b0",null,c,d,0,0)),this.g3d.drawStringNoSlab("\u03b3="+this.nfformat(a.getUnitCellInfoType(5))+"\u00b0",null,c,d+b,0,0))}},$fz.isPrivate=!0,
$fz),"J.api.SymmetryInterface")}),Clazz.declarePackage("J.render"),Clazz.load(["J.render.ShapeRenderer"],"J.render.FrankRenderer",["J.util.C"],function(){c$=Clazz.declareType(J.render,"FrankRenderer",J.render.ShapeRenderer);Clazz.overrideMethod(c$,"render",function(){var a=this.shape,b=this.viewer.getBooleanProperty("allowKeyStrokes"),c=this.viewer.getBoolean(603979882);this.colix=c?20:this.viewer.isSignedApplet()?b||this.viewer.isJS&&!this.viewer.isWebGL?5:10:b?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;b=this.viewer.getImageFontScaling();a.getFont(b);var b=Clazz.floatToInt(a.frankWidth+4*b),d=a.frankDescent;this.g3d.drawStringNoSlab(a.frankString,a.font3d,this.g3d.getRenderWidth()-b,this.g3d.getRenderHeight()-d,0,0);c&&this.g3d.fillRect(0,0,0,0,2*d,Clazz.doubleToInt(3*b/2));return!1})}),Clazz.declarePackage("J.adapter.readers.molxyz"),Clazz.load(["J.adapter.smarter.AtomSetCollectionReader"],
"J.adapter.readers.molxyz.MolReader",["java.lang.Exception","$.Float","J.adapter.smarter.Bond","J.api.JmolAdapter","J.util.Logger"],function(){c$=Clazz.decorateAsClass(function(){this.isV3000=this.is2D=!1;this.dimension=null;this.allow2D=!0;Clazz.instantialize(this,arguments)},J.adapter.readers.molxyz,"MolReader",J.adapter.smarter.AtomSetCollectionReader);Clazz.overrideMethod(c$,"initializeReader",function(){this.is2D=this.checkFilterKey("2D")});Clazz.overrideMethod(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.isLastModel(this.modelNumber)?this.continuing=!1:!0;this.discardLinesUntilStartsWith("$$$$");return!0});$_M(c$,"readUserData",($fz=function(a){if(!this.isV3000)for(;null!=this.readLine()&&0!=this.line.indexOf("$$$$");)if(this.line.toUpperCase().contains("_PARTIAL_CHARGES"))try{for(var b=
this.atomSetCollection.getAtoms(),c=this.parseIntStr(this.readLine());0<=--c;){var d=J.adapter.smarter.AtomSetCollectionReader.getTokensStr(this.readLine()),e=this.parseIntStr(d[0])+a-1,f=this.parseFloatStr(d[1]);Float.isNaN(f)||(b[e].partialCharge=f)}}catch(g){if(Clazz.exceptionOf(g,Exception))break;else throw g;}},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"finalizeReader",function(){this.is2D&&this.set2D();this.isTrajectory=!1;Clazz.superCall(this,J.adapter.readers.molxyz.MolReader,"finalizeReader",[])});
$_M(c$,"processMolSdHeader",function(){var a,b=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(b))}});$_M(c$,"processCtab",function(a){var b=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"),b=this.getTokens();if(null!=this.line){a=this.isV3000?this.parseIntStr(b[3]):this.parseIntRange(this.line,0,3);var b=this.isV3000?this.parseIntStr(b[4]):this.parseIntRange(this.line,
3,6),c=this.atomSetCollection.getAtomCount();this.readAtoms(a);this.readBonds(c,b);this.readUserData(c);this.applySymmetryAndSetTrajectory()}},"~B");$_M(c$,"readAtoms",function(a){this.isV3000&&this.discardLinesUntilContains("BEGIN ATOM");for(var b=0;b<a;++b){this.readLine();var c,d,e,f,g=0,h=0;if(this.isV3000){this.checkLineContinuation();var k=this.getTokens();c=k[3];d=this.parseFloatStr(k[4]);e=this.parseFloatStr(k[5]);f=this.parseFloatStr(k[6]);for(var l=7;l<k.length;l++){var m=k[l].toUpperCase();
m.startsWith("CHG=")?g=this.parseIntStr(k[l].substring(4)):m.startsWith("MASS=")&&(h=this.parseIntStr(k[l].substring(5)))}1<h&&c.equals("H")&&(h=1-h)}else if(c=34<this.line.length?this.line.substring(31,34).trim():this.line.substring(31).trim(),d=this.parseFloatRange(this.line,0,10),e=this.parseFloatRange(this.line,10,20),f=this.parseFloatRange(this.line,20,30),39<=this.line.length&&(k=this.parseIntRange(this.line,36,39),1<=k&&7>=k&&(g=4-k),k=this.parseIntRange(this.line,34,36),0!=k&&-3<=k&&4>=k))switch(h=
J.api.JmolAdapter.getNaturalIsotope(J.api.JmolAdapter.getElementNumber(c)),h){case 0:break;case 1:h=-k;break;default:h+=k}switch(h){case 0:break;case -1:c="D";break;case -2:c="T";break;default:c=h+c}this.is2D&&0!=f&&(this.is2D=!1);h=this.atomSetCollection.addNewAtom();h.elementSymbol=c;h.formalCharge=g;this.setAtomCoordXYZ(h,d,e,f)}},"~N");$_M(c$,"checkLineContinuation",($fz=function(){for(;this.line.endsWith("-");){var a=this.line;this.readLine();this.line=a+this.line}},$fz.isPrivate=!0,$fz));$_M(c$,
"readBonds",function(a,b){this.isV3000&&this.discardLinesUntilContains("BEGIN BOND");for(var c=0;c<b;++c){this.readLine();var d,e,f,g=0;if(this.isV3000){this.checkLineContinuation();var h=this.getTokens();f=this.parseIntStr(h[3]);d=this.parseIntStr(h[4]);e=this.parseIntStr(h[5]);for(var k=6;k<h.length;k++)if(h[k].toUpperCase().startsWith("CFG=")){g=this.parseIntStr(h[k].substring(4));break}}else d=this.parseIntRange(this.line,0,3),e=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));switch(f){case 0:case -10:f=1;break;case 1:switch(g){case 1:f=1025;break;case 3:case 6:f=1041}break;case 4:f=515;break;case 5:f=66;break;case 6:f=513;break;case 7:f=514;break;case 8:f=33}this.atomSetCollection.addBond(new J.adapter.smarter.Bond(a+d-1,a+e-1,f))}},"~N,~N")}),Clazz.declarePackage("J.adapter.readers.molxyz"),Clazz.load(["J.adapter.smarter.AtomSetCollectionReader"],"J.adapter.readers.molxyz.XyzReader",
["java.lang.Float","J.util.Logger"],function(){c$=Clazz.declareType(J.adapter.readers.molxyz,"XyzReader",J.adapter.smarter.AtomSetCollectionReader);Clazz.overrideMethod(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 b=this.line;this.readAtoms(a);this.applySymmetryAndSetTrajectory();this.atomSetCollection.setAtomSetName(b);if(this.isLastModel(this.modelNumber))return this.continuing=!1}else this.skipAtomSet(a);this.discardLinesUntilNonBlank();return!1});$_M(c$,"finalizeReader",function(){this.isTrajectory=!1;Clazz.superCall(this,J.adapter.readers.molxyz.XyzReader,"finalizeReader",[])});$_M(c$,"skipAtomSet",($fz=function(a){for(this.readLine();0<=--a;)this.readLine()},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"readAtoms",
($fz=function(a){for(var b=0;b<a;++b){this.readLine();var c=this.getTokens();if(4>c.length)J.util.Logger.warn("line cannot be read for XYZ atom data: "+this.line);else{var d=this.atomSetCollection.addNewAtom();this.setElementAndIsotope(d,c[0]);d.x=this.parseFloatStr(c[1]);d.y=this.parseFloatStr(c[2]);d.z=this.parseFloatStr(c[3]);if(Float.isNaN(d.x)||Float.isNaN(d.y)||Float.isNaN(d.z))J.util.Logger.warn("line cannot be read for XYZ atom data: "+this.line),d.set(0,0,0);var e=4;this.setAtomCoord(d);
switch(c.length){case 4:continue;case 5:case 6:case 8:case 9:if(0<=c[4].indexOf("."))d.partialCharge=this.parseFloatStr(c[4]);else{var f=this.parseIntStr(c[4]);-2147483648!=f&&(d.formalCharge=f)}switch(c.length){case 5:continue;case 6:d.radius=this.parseFloatStr(c[5]);continue;case 9:d.atomSerial=this.parseIntStr(c[8])}e++;default:var f=this.parseFloatStr(c[e++]),g=this.parseFloatStr(c[e++]),c=this.parseFloatStr(c[e++]);if(Float.isNaN(f)||Float.isNaN(g)||Float.isNaN(c))continue;this.atomSetCollection.addVibrationVector(d.atomIndex,
f,g,c)}}}},$fz.isPrivate=!0,$fz),"~N")}),Clazz.declarePackage("J.shape"),Clazz.load(["J.shape.Shape","java.util.Hashtable"],"J.shape.Object2dShape",["J.util.Logger","$.P3","$.TextFormat"],function(){c$=Clazz.decorateAsClass(function(){this.currentBgColor=this.currentColor=this.currentFont=this.currentObject=this.objects=null;this.currentBgTranslucentLevel=this.currentTranslucentLevel=0;this.thisID=null;this.isAll=this.isHover=!1;Clazz.instantialize(this,arguments)},J.shape,"Object2dShape",J.shape.Shape);
Clazz.prepareFields(c$,function(){this.objects=new java.util.Hashtable});$_M(c$,"setPropOS",function(a,b,c){if("allOff"===a)this.currentObject=null,this.isAll=!0,this.objects=new java.util.Hashtable;else if("delete"===a)if(null==this.currentObject){if(this.isAll||null!=this.thisID)for(a=this.objects.values().iterator();a.hasNext();){var d=a.next();(this.isAll||J.util.TextFormat.isMatch(d.target.toUpperCase(),this.thisID,!0,!0))&&a.remove()}}else this.objects.remove(this.currentObject.target),this.currentObject=
null;else if("off"===a)this.isAll&&(this.objects=new java.util.Hashtable,this.isAll=!1,this.currentObject=null),null!=this.currentObject&&(this.objects.remove(this.currentObject.target),this.currentObject=null);else if("model"===a)if(b=b.intValue(),null==this.currentObject){if(this.isAll)for(a=this.objects.values().iterator();a.hasNext();)a.next().setModel(b)}else this.currentObject.setModel(b);else if("align"===a)if(null==this.currentObject){if(this.isAll)for(a=this.objects.values().iterator();a.hasNext();)a.next().setAlignmentLCR(b)}else this.currentObject.setAlignmentLCR(b)||
J.util.Logger.error("unrecognized align:"+b);else if("bgcolor"===a)if(this.currentBgColor=b,null==this.currentObject){if(this.isAll)for(a=this.objects.values().iterator();a.hasNext();)a.next().setBgColixO(b)}else this.currentObject.setBgColixO(b);else if("color"===a)if(this.currentColor=b,null==this.currentObject){if(this.isAll||null!=this.thisID)for(a=this.objects.values().iterator();a.hasNext();)d=a.next(),(this.isAll||J.util.TextFormat.isMatch(d.target.toUpperCase(),this.thisID,!0,!0))&&d.setColixO(b)}else this.currentObject.setColixO(b);
else if("target"===a){if((this.isAll=b.equals("all"))||b.equals("none"))this.currentObject=null}else if((d="bgtranslucency"===a)||"translucency"===a)if(b="translucent"===b,d?this.currentBgTranslucentLevel=b?this.translucentLevel:0:this.currentTranslucentLevel=b?this.translucentLevel:0,null==this.currentObject){if(this.isAll)for(a=this.objects.values().iterator();a.hasNext();)a.next().setTranslucent(this.translucentLevel,d)}else this.currentObject.setTranslucent(this.translucentLevel,d);else if("deleteModelAtoms"===
a){b=b[2][0];for(a=this.objects.values().iterator();a.hasNext();)d=a.next(),d.modelIndex==b?a.remove():d.modelIndex>b&&d.modelIndex--}else this.setPropS(a,b,c)},"~S,~O,J.util.BS");Clazz.overrideMethod(c$,"initModelSet",function(){this.currentObject=null;this.isAll=!1});Clazz.overrideMethod(c$,"setVisibilityFlags",function(a){if(!this.isHover)for(var b=this.objects.values().iterator();b.hasNext();){var c=b.next();c.setVisibility(0>c.modelIndex||a.get(c.modelIndex))}},"J.util.BS");Clazz.overrideMethod(c$,
"checkObjectClicked",function(a,b,c,d){if(this.isHover||0==c)return null;for(var e=this.objects.values().iterator();e.hasNext();)if(c=e.next(),c.checkObjectClicked(a,b,d))return a=c.getScript(),null!=a&&this.viewer.evalStringQuiet(a),a=new java.util.Hashtable,a.put("pt",null==c.xyz?new J.util.P3:c.xyz),b=c.modelIndex,0>b&&(b=0),a.put("modelIndex",Integer.$valueOf(b)),a.put("model",this.viewer.getModelNumberDotted(b)),a.put("id",c.target),a.put("type","echo"),a;return null},"~N,~N,~N,J.util.BS,~B");
Clazz.overrideMethod(c$,"checkObjectHovered",function(a,b,c){if(this.isHover)return!1;for(var d=this.objects.values().iterator(),e=!1;d.hasNext();){var f=d.next();if(null!=f.getScript()&&(e=!0,f.checkObjectClicked(a,b,c)))return this.viewer.setCursor(1),!0}e&&this.viewer.setCursor(0);return!1},"~N,~N,J.util.BS")}),Clazz.declarePackage("J.shape"),Clazz.load(["J.shape.Object2dShape"],"J.shape.TextShape",null,function(){c$=Clazz.declareType(J.shape,"TextShape",J.shape.Object2dShape);Clazz.overrideMethod(c$,
"setProperty",function(a,b,c){this.setPropTS(a,b,c)},"~S,~O,J.util.BS");$_M(c$,"setPropTS",function(a,b,c){if("text"===a)if(null==this.currentObject){if(this.isAll)for(a=this.objects.values().iterator();a.hasNext();)a.next().setText(b)}else this.currentObject.setText(b);else if("font"===a)if(this.currentFont=b,null==this.currentObject){if(this.isAll)for(a=this.objects.values().iterator();a.hasNext();)a.next().setFont(this.currentFont,!0)}else this.currentObject.setFont(this.currentFont,!0),this.currentObject.setFontScale(0);
else this.setPropOS(a,b,c)},"~S,~O,J.util.BS")}),Clazz.declarePackage("J.shape"),Clazz.load(["J.shape.FontLineShape","J.util.P3","$.V3"],"J.shape.Axes",["java.lang.Boolean","J.constant.EnumAxesMode","J.util.Escape","$.SB","J.viewer.JC"],function(){c$=Clazz.decorateAsClass(function(){this.axisXY=null;this.scale=0;this.corner=this.ptTemp=this.labels=this.axisPoints=this.originPoint=this.fixedOrigin=null;Clazz.instantialize(this,arguments)},J.shape,"Axes",J.shape.FontLineShape);Clazz.prepareFields(c$,
function(){this.axisXY=new J.util.P3;this.originPoint=new J.util.P3;this.axisPoints=Array(6);for(var a=6;0<=--a;)this.axisPoints[a]=new J.util.P3;this.ptTemp=new J.util.P3;this.corner=new J.util.V3});$_M(c$,"getOriginPoint",function(a){return a?J.shape.Axes.pt0:this.originPoint},"~B");$_M(c$,"getAxisPoint",function(a,b){if(!b&&0==this.axisXY.z)return this.axisPoints[a];this.ptTemp.setT(this.axisPoints[a]);this.ptTemp.sub(this.originPoint);this.ptTemp.scale(0.5);return this.ptTemp},"~N,~B");Clazz.overrideMethod(c$,
"setProperty",function(a,b){"position"===a?this.axisXY=b:"origin"===a?(null==b?this.fixedOrigin=null:(null==this.fixedOrigin&&(this.fixedOrigin=new J.util.P3),this.fixedOrigin.setT(b)),this.initShape()):"labels"===a?this.labels=b:"labelsOn"===a?this.labels=null:"labelsOff"===a?this.labels=["","",""]:this.setPropFLS(a,b)},"~S,~O,J.util.BS");$_M(c$,"initShape",function(){Clazz.superCall(this,J.shape.Axes,"initShape",[]);this.myType="axes";this.font3d=this.gdata.getFont3D(14);var a=this.viewer.getAxesMode();
null==this.fixedOrigin?this.originPoint.set(0,0,0):this.originPoint.setT(this.fixedOrigin);if(a===J.constant.EnumAxesMode.UNITCELL&&null!=this.modelSet.unitCells){var b=this.viewer.getCurrentUnitCell();if(null!=b){a=b.getUnitCellVertices();b=b.getCartesianOffset();null==this.fixedOrigin?this.originPoint.setT(b):b=this.fixedOrigin;this.scale=this.viewer.getFloat(570425346)/2;this.axisPoints[0].scaleAdd2(this.scale,a[4],b);this.axisPoints[1].scaleAdd2(this.scale,a[2],b);this.axisPoints[2].scaleAdd2(this.scale,
a[1],b);return}}else a===J.constant.EnumAxesMode.BOUNDBOX&&null==this.fixedOrigin&&this.originPoint.setT(this.viewer.getBoundBoxCenter());this.setScale(this.viewer.getFloat(570425346)/2)});Clazz.overrideMethod(c$,"getProperty",function(a){return"axisPoints"===a?this.axisPoints:"origin"===a?this.fixedOrigin:"axesTypeXY"===a?0==this.axisXY.z?Boolean.FALSE:Boolean.TRUE:null},"~S,~N");$_M(c$,"setScale",function(a){this.scale=a;this.corner.setT(this.viewer.getBoundBoxCornerVector());for(var b=6;0<=--b;){var c=
this.axisPoints[b];c.setT(J.viewer.JC.unitAxisVectors[b]);1.5>this.corner.x&&(this.corner.x=1.5);1.5>this.corner.y&&(this.corner.y=1.5);1.5>this.corner.z&&(this.corner.z=1.5);0==this.axisXY.z&&(c.x*=this.corner.x*a,c.y*=this.corner.y*a,c.z*=this.corner.z*a);c.add(this.originPoint)}},"~N");$_M(c$,"getShapeState",function(){var a=new J.util.SB;a.append("  axes scale ").appendF(this.viewer.getFloat(570425346)).append(";\n");null!=this.fixedOrigin&&a.append("  axes center ").append(J.util.Escape.eP(this.fixedOrigin)).append(";\n");
0!=this.axisXY.z&&a.append("  axes position [").appendI(Clazz.floatToInt(this.axisXY.x)).append(" ").appendI(Clazz.floatToInt(this.axisXY.y)).append(" ").append(0>this.axisXY.z?" %":"").append("];\n");if(null!=this.labels){a.append("  axes labels ");for(var b=0;b<this.labels.length;b++)null!=this.labels[b]&&a.append(J.util.Escape.eS(this.labels[b])).append(" ");a.append(";\n")}return Clazz.superCall(this,J.shape.Axes,"getShapeState",[])+a});c$.pt0=c$.prototype.pt0=new J.util.P3;Clazz.defineStatics(c$,
"MIN_AXIS_LEN",1.5)}),Clazz.declarePackage("J.shape"),Clazz.load(["J.shape.TextShape"],"J.shape.Echo",["J.shape.Object2d","$.Text","J.util.TextFormat"],function(){c$=Clazz.declareType(J.shape,"Echo",J.shape.TextShape);$_M(c$,"initShape",function(){Clazz.superCall(this,J.shape.Echo,"initShape",[]);this.setProperty("target","top",null)});Clazz.overrideMethod(c$,"setProperty",function(a,b){if("scalereference"===a){if(null!=this.currentObject){var c=b.floatValue();this.currentObject.setScalePixelsPerMicron(0==
c?0:1E4/c)}}else if("xyz"===a&&null!=this.currentObject&&this.viewer.getBoolean(603979845)&&this.currentObject.setScalePixelsPerMicron(1E4*this.viewer.getScalePixelsPerAngstrom(!1)),"scale"===a)if(null==this.currentObject){if(this.isAll)for(c=this.objects.values().iterator();c.hasNext();)c.next().setScale(b.floatValue())}else this.currentObject.setScale(b.floatValue());else if("image"===a)if(null==this.currentObject){if(this.isAll)for(c=this.objects.values().iterator();c.hasNext();)c.next().setImage(b)}else this.currentObject.setImage(b);
else if("thisID"===a)c=b,this.currentObject=this.objects.get(c),null==this.currentObject&&J.util.TextFormat.isWild(c)&&(this.thisID=c.toUpperCase());else if("hidden"===a){var d=b.booleanValue();if(null==this.currentObject){if(this.isAll||null!=this.thisID)for(c=this.objects.values().iterator();c.hasNext();){var e=c.next();if(this.isAll||J.util.TextFormat.isMatch(e.target.toUpperCase(),this.thisID,!0,!0))e.hidden=d}}else this.currentObject.hidden=d}else if(!J.shape.Object2d.setProperty(a,b,this.currentObject)){if("target"===
a&&(this.thisID=null,c=b.intern().toLowerCase(),!("none"===c||"all"===c))){this.isAll=!1;e=this.objects.get(c);null==e&&(e=0,d=1,"top"===c?(e=1,d=2):"middle"===c?(e=3,d=2):"bottom"===c&&(e=2),e=J.shape.Text.newEcho(this.viewer,this.gdata,this.gdata.getFont3DFS("Serif",20),c,10,e,d,0),e.setAdjustForWindow(!0),this.objects.put(c,e),null!=this.currentFont&&e.setFont(this.currentFont,!0),null!=this.currentColor&&e.setColixO(this.currentColor),null!=this.currentBgColor&&e.setBgColixO(this.currentBgColor),
0!=this.currentTranslucentLevel&&e.setTranslucent(this.currentTranslucentLevel,!1),0!=this.currentBgTranslucentLevel&&e.setTranslucent(this.currentBgTranslucentLevel,!0));this.currentObject=e;return}this.setPropTS(a,b,null)}},"~S,~O,J.util.BS");Clazz.overrideMethod(c$,"getPropertyData",function(a,b){if("currentTarget"===a)return null!=this.currentObject&&null!=(b[0]=this.currentObject.target);if("checkID"===a)for(var c=b[0].toUpperCase(),d=J.util.TextFormat.isWild(c),e=this.objects.values().iterator();e.hasNext();){var f=
e.next().target;if(f.equalsIgnoreCase(c)||d&&J.util.TextFormat.isMatch(f.toUpperCase(),c,!0,!0))return b[1]=f,!0}return!1},"~S,~A");Clazz.overrideMethod(c$,"getShapeState",function(){return this.viewer.getShapeState(this)});Clazz.defineStatics(c$,"FONTFACE","Serif","FONTSIZE",20,"COLOR",10)}),Clazz.declarePackage("J.shape"),Clazz.load(["J.shape.Object2d"],"J.shape.Text","J.shape.Shape J.util.C $.Escape $.JmolFont $.SB $.TextFormat".split(" "),function(){c$=Clazz.decorateAsClass(function(){this.fontScale=
0;this.textUnformatted=this.text=null;this.doFormatText=!1;this.font=this.lines=null;this.textHeight=this.textWidth=this.lineHeight=this.descent=this.ascent=this.fid=0;this.image=this.widths=null;this.imageScale=1;this.yAdj=this.xAdj=0;Clazz.instantialize(this,arguments)},J.shape,"Text",J.shape.Object2d);Clazz.overrideMethod(c$,"setScalePixelsPerMicron",function(a){this.fontScale=0;this.scalePixelsPerMicron=a},"~N");$_M(c$,"getText",function(){return this.text});Clazz.makeConstructor(c$,function(){Clazz.superConstructor(this,
J.shape.Text,[])});c$.newLabel=$_M(c$,"newLabel",function(a,b,c,d,e,f,g,h){var k=new J.shape.Text;k.set(a,b,d,f,!0,g,h);k.setText(c);k.bgcolix=e;return k},"J.util.GData,J.util.JmolFont,~S,~N,~N,~N,~N,~A");c$.newEcho=$_M(c$,"newEcho",function(a,b,c,d,e,f,g,h){var k=new J.shape.Text;k.set(b,c,e,g,!1,h,null);k.viewer=a;k.target=d;d.equals("error")&&(f=1);k.valign=f;k.z=2;k.zSlab=-2147483648;return k},"J.viewer.Viewer,J.util.GData,J.util.JmolFont,~S,~N,~N,~N,~N");$_M(c$,"set",($fz=function(a,b,c,d,e,
f,g){this.scalePixelsPerMicron=f;this.gdata=a;this.isLabelOrHover=e;this.colix=c;this.align=d;this.pymolOffset=g;this.setFont(b,e)},$fz.isPrivate=!0,$fz),"J.util.GData,J.util.JmolFont,~N,~N,~B,~N,~A");$_M(c$,"getFontMetrics",($fz=function(){this.descent=this.font.getDescent();this.ascent=this.font.getAscent();this.lineHeight=this.ascent+this.descent},$fz.isPrivate=!0,$fz));$_M(c$,"setFontFromFid",function(a){this.fid!=a&&(this.fontScale=0,this.setFont(J.util.JmolFont.getFont3D(a),!0))},"~N");$_M(c$,
"setText",function(a){null!=this.image&&this.getFontMetrics();this.image=null;a=this.fixText(a);null!=this.text&&this.text.equals(a)||(this.textUnformatted=this.text=a,(this.doFormatText=null!=this.viewer&&null!=a&&(0<=a.indexOf("%{")||0<=a.indexOf("@{")))||this.recalc())},"~S");$_M(c$,"setImage",function(a){this.image=a;this.recalc()},"~O");$_M(c$,"setScale",function(a){this.imageScale=a;this.recalc()},"~N");$_M(c$,"setFont",function(a,b){this.font=a;null!=this.font&&(this.getFontMetrics(),b&&(this.fid=
this.font.fid,this.recalc()))},"J.util.JmolFont,~B");$_M(c$,"setFontScale",function(a){this.fontScale!=a&&(this.fontScale=a,0!=this.fontScale&&this.setFont(this.gdata.getFont3DScaled(this.font,a),!0))},"~N");$_M(c$,"fixText",function(a){if(null==a||0==a.length)return null;for(var b;0<=(b=a.indexOf("\n"));)a=a.substring(0,b)+"|"+a.substring(b+1);return a},"~S");Clazz.overrideMethod(c$,"recalc",function(){if(null!=this.image)this.textWidth=this.textHeight=0,this.boxWidth=this.viewer.apiPlatform.getImageWidth(this.image)*
this.fontScale*this.imageScale,this.boxHeight=this.viewer.apiPlatform.getImageHeight(this.image)*this.fontScale*this.imageScale,this.ascent=0;else if(null==this.text)this.widths=this.lines=this.text=null;else if(null!=this.font){this.lines=J.util.TextFormat.split(this.text,"|");this.textWidth=0;this.widths=Clazz.newIntArray(this.lines.length,0);for(var a=this.lines.length;0<=--a;)this.textWidth=Math.max(this.textWidth,this.widths[a]=this.stringWidth(this.lines[a]));this.textHeight=this.lines.length*
this.lineHeight;this.boxWidth=this.textWidth+(2<=this.fontScale?16:8);this.boxHeight=this.textHeight+(2<=this.fontScale?16:8)}});$_M(c$,"formatText",function(){this.text=null==this.viewer?this.textUnformatted:this.viewer.formatText(this.textUnformatted);this.recalc()});$_M(c$,"setPosition",function(a,b,c,d,e,f){var g=b.getRenderWidth();b=b.getRenderHeight();null==f?f=this.boxXY:this.boxXY=f;this.setWindow(g,b,c);0!=c&&0!=this.scalePixelsPerMicron?this.setFontScale(c/this.scalePixelsPerMicron):this.fontScale!=
d&&this.setFontScale(d);this.doFormatText&&this.formatText();c=this.offsetX*d;d*=this.offsetY;this.xAdj=2<=this.fontScale?8:4;this.yAdj=this.ascent-this.lineHeight+this.xAdj;this.isLabelOrHover?(f[0]=this.movableX,f[1]=this.movableY,null!=this.pymolOffset&&(e=a.scaleToScreen(this.z,1E3),this.z-=Clazz.floatToInt(this.pymolOffset[3]*e),e=a.scaleToScreen(this.z,1E3),-1<=this.pymolOffset[1]&&1>=this.pymolOffset[1]&&-1<=this.pymolOffset[2]&&1>=this.pymolOffset[2]?(c=this.textWidth*(this.pymolOffset[1]-
1)/2,d=-this.textHeight*((this.pymolOffset[2]-1)/2),d+=this.descent):(c=this.pymolOffset[1]*e,d=-this.pymolOffset[2]*e,d=1.05*d+0.66*this.textHeight),this.xAdj=2<=this.fontScale?8:4,this.yAdj=0,f[0]=this.movableX-this.xAdj,f[1]=this.movableY-this.yAdj,e=!0),J.shape.Text.setBoxXY(this.boxWidth,this.boxHeight,c,d,f,e)):this.setPos(this.fontScale);this.boxX=f[0];this.boxY=f[1];this.adjustForWindow&&this.setBoxOffsetsInWindow(0,this.isLabelOrHover?16*this.fontScale+this.lineHeight:0,this.boxY-this.textHeight)},
"J.viewer.Viewer,J.api.JmolRendererInterface,~N,~N,~B,~A");$_M(c$,"setPos",($fz=function(a){var b,c,d,e=null!=this.xyz;0==this.valign||4==this.valign?b=d=c=(2147483647!=this.movableXPercent?Clazz.doubleToInt(this.movableXPercent*this.windowWidth/100):e?this.movableX:this.movableX*a)+this.offsetX*a:(b=5*a,c=Clazz.doubleToInt(this.windowWidth/2),d=this.windowWidth-b);this.boxXY[0]=b;switch(this.align){case 2:this.boxXY[0]=c-this.boxWidth/2;break;case 3:this.boxXY[0]=d-this.boxWidth}this.boxXY[1]=0;
switch(this.valign){case 1:break;case 3:this.boxXY[1]=Clazz.doubleToInt(this.windowHeight/2);break;case 2:this.boxXY[1]=this.windowHeight;break;default:b=2147483647!=this.movableYPercent?Clazz.doubleToInt(this.movableYPercent*this.windowHeight/100):e?this.movableY:this.movableY*a,this.boxXY[1]=(e?b:this.windowHeight-b)+this.offsetY*a}2==this.align?this.boxXY[1]-=(null!=this.image?this.boxHeight:null!=this.xyz?this.boxHeight:this.ascent-this.boxHeight)/2:null!=this.image?this.boxXY[1]-=0:null!=this.xyz&&
(this.boxXY[1]-=Clazz.doubleToInt(this.ascent/2))},$fz.isPrivate=!0,$fz),"~N");c$.setBoxXY=$_M(c$,"setBoxXY",function(a,b,c,d,e,f){var g;0<c||f?g=c:(g=-a,g=0==c?g/2:g+c);e[0]+=g;e[1]+=f?-b+d:0>d?-b+d:0==d?-b/2:d;e[2]=a;e[3]=b},"~N,~N,~N,~N,~A,~B");$_M(c$,"getState",function(){var a=new J.util.SB;if(null==this.text||this.isLabelOrHover||this.target.equals("error"))return"";var b=null!=this.image,c=null,d="set echo ID "+J.util.Escape.eS(this.target);switch(this.valign){case 0:c=2147483647==this.movableXPercent||
2147483647==this.movableYPercent?(2147483647==this.movableXPercent?this.movableX+" ":this.movableXPercent+"% ")+(2147483647==this.movableYPercent?this.movableY+"":this.movableYPercent+"%"):"["+this.movableXPercent+" "+this.movableYPercent+"%]";case 4:null==c&&(c=J.util.Escape.eP(this.xyz));a.append("  ").append(d).append(" ").append(c);1!=this.align&&a.append(";  ").append(d).append(" ").append(J.shape.Object2d.hAlignNames[this.align]);break;default:a.append("  set echo ").append(J.shape.Object2d.vAlignNames[this.valign]).append(" ").append(J.shape.Object2d.hAlignNames[this.align])}0==
this.valign&&2147483647!=this.movableZPercent&&a.append(";  ").append(d).append(" depth ").appendI(this.movableZPercent);b?a.append("; ").append(d).append(" IMAGE /*file*/"):a.append("; echo ");a.append(J.util.Escape.eS(this.text));a.append(";\n");b&&1!=this.imageScale&&a.append("  ").append(d).append(" scale ").appendF(this.imageScale).append(";\n");null!=this.script&&a.append("  ").append(d).append(" script ").append(J.util.Escape.eS(this.script)).append(";\n");0<=this.modelIndex&&a.append("  ").append(d).append(" model ").append(this.viewer.getModelNumberDotted(this.modelIndex)).append(";\n");
a.append("  "+J.shape.Shape.getFontCommand("echo",this.font));0<this.scalePixelsPerMicron&&a.append(" "+1E4/this.scalePixelsPerMicron);a.append("; color echo");J.util.C.isColixTranslucent(this.colix)&&a.append(" translucent "+J.util.C.getColixTranslucencyFractional(this.colix));a.append(" ").append(J.util.C.getHexCode(this.colix));0!=this.bgcolix&&(a.append("; color echo background"),J.util.C.isColixTranslucent(this.bgcolix)&&a.append(" translucent "+J.util.C.getColixTranslucencyFractional(this.bgcolix)),
a.append(" ").append(J.util.C.getHexCode(this.bgcolix)));a.append(";\n");return a.toString()});$_M(c$,"stringWidth",($fz=function(a){var b=0,c=1;if(null==a)return 0;if(0>a.indexOf("<su"))return this.font.stringWidth(a);for(var d=a.length,e,f=0;f<d;f++){if("<"==a.charAt(f)){if(f+4<d&&((e=a.substring(f,f+5)).equals("<sub>")||e.equals("<sup>"))){f+=4;c=1;continue}if(f+5<d&&((e=a.substring(f,f+6)).equals("</sub>")||e.equals("</sup>"))){f+=5;c=1;continue}}b+=this.font.stringWidth(a.substring(f,f+1))*c}return b},
$fz.isPrivate=!0,$fz),"~S");$_M(c$,"setXYA",function(a,b){if(0==b){a[2]=this.boxX;switch(this.align){case 2:a[2]+=this.boxWidth/2;break;case 3:a[2]+=this.boxWidth-this.xAdj;break;default:a[2]+=this.xAdj}a[0]=a[2];a[1]=this.boxY+this.yAdj}switch(this.align){case 2:a[0]=a[2]-Clazz.doubleToInt(this.widths[b]/2);break;case 3:a[0]=a[2]-this.widths[b]}a[1]+=this.lineHeight},"~A,~N");$_M(c$,"getCommand",function(){var a=new J.util.SB;a.append("label ").append(J.util.Escape.eS(this.textUnformatted));if(null==
this.pymolOffset)return a.toString();a.append(";set labelOffset ").append(J.util.Escape.eAF(this.pymolOffset));return a.toString()})}),Clazz.declarePackage("J.shape"),Clazz.load(["J.shape.AtomShape"],"J.shape.Halos",["J.util.BSUtil","$.C","$.Logger"],function(){c$=Clazz.decorateAsClass(function(){this.colixSelection=2;this.bsHighlight=null;this.colixHighlight=10;Clazz.instantialize(this,arguments)},J.shape,"Halos",J.shape.AtomShape);$_M(c$,"initState",function(){J.util.Logger.debug("init halos");
this.translucentAllowed=!1});Clazz.overrideMethod(c$,"setProperty",function(a,b,c){"translucency"!==a&&("argbSelection"===a?this.colixSelection=J.util.C.getColix(b.intValue()):"argbHighlight"===a?this.colixHighlight=J.util.C.getColix(b.intValue()):"highlight"===a?this.bsHighlight=b:("deleteModelAtoms"===a&&J.util.BSUtil.deleteBits(this.bsHighlight,c),this.setPropAS(a,b,c)))},"~S,~O,J.util.BS");Clazz.overrideMethod(c$,"setVisibilityFlags",function(){for(var a=this.viewer.getSelectionHaloEnabled(!1)?
this.viewer.getSelectionSet(!1):null,b=this.atomCount;0<=--b;){var c=null!=a&&a.get(b)||null!=this.mads&&0!=this.mads[b];this.atoms[b].setShapeVisibility(this.myVisibilityFlag,c)}},"J.util.BS");Clazz.overrideMethod(c$,"getShapeState",function(){return this.viewer.getShapeState(this)})}),Clazz.declarePackage("J.shape"),Clazz.load(["J.shape.AtomShape","java.util.Hashtable"],"J.shape.Labels","J.constant.EnumPalette J.modelset.LabelToken J.shape.Object2d $.Text J.util.ArrayUtil $.BS $.BSUtil $.C $.JmolFont".split(" "),
function(){c$=Clazz.decorateAsClass(function(){this.bsBgColixSet=this.bsFontSet=this.labelBoxes=this.text=this.atomLabels=this.offsets=this.fids=this.bgcolixes=this.formats=this.strings=null;this.zeroFontId=this.defaultPointer=this.defaultPaletteID=this.defaultBgcolix=this.defaultColix=this.defaultFontId=this.defaultZPos=this.defaultAlignment=this.defaultOffset=0;this.defaultsOnlyForNone=!0;this.isScaled=this.setDefaults=!1;this.scalePixelsPerMicron=0;this.pickedAtom=-1;this.pickedY=this.pickedX=
this.pickedOffset=0;Clazz.instantialize(this,arguments)},J.shape,"Labels",J.shape.AtomShape);Clazz.prepareFields(c$,function(){this.atomLabels=new java.util.Hashtable});$_M(c$,"initShape",function(){Clazz.superCall(this,J.shape.Labels,"initShape",[]);this.defaultFontId=this.zeroFontId=this.gdata.getFont3DFSS("SansSerif","Plain",13).fid;this.defaultBgcolix=this.defaultColix=0;this.defaultOffset=J.shape.Labels.zeroOffset;this.defaultZPos=0;this.translucentAllowed=!1});Clazz.overrideMethod(c$,"setProperty",
function(a,b,c){this.isActive=!0;if("setDefaults"===a)this.setDefaults=b.booleanValue();else if("color"===a){var d=J.constant.EnumPalette.pidOf(b);b=J.util.C.getColixO(b);if(!this.setDefaults)for(a=c.nextSetBit(0);0<=a&&a<this.atomCount;a=c.nextSetBit(a+1))this.setLabelColix(a,b,d);if(this.setDefaults||!this.defaultsOnlyForNone)this.defaultColix=b,this.defaultPaletteID=d}else if("scalereference"===a){if(null!=this.strings){a=b.floatValue();b=0==a?0:1E4/a;for(a=c.nextSetBit(0);0<=a&&a<this.atomCount;a=
c.nextSetBit(a+1))this.strings.length<=a||(this.text=this.getLabel(a),null==this.text?(this.text=J.shape.Text.newLabel(this.gdata,null,this.strings[a],0,0,0,b,null),this.putLabel(a,this.text)):this.text.setScalePixelsPerMicron(b))}}else if("label"===a){this.setScaling();d=null==b||0==b.length?J.shape.Labels.nullToken:[null];for(a=c.nextSetBit(0);0<=a&&a<this.atomCount;a=c.nextSetBit(a+1))this.setLabel(d,b,a)}else if("labels"===a){this.setScaling();var e=b;a=c.nextSetBit(0);for(var f=0;0<=a&&a<this.atomCount;a=
c.nextSetBit(a+1))b=e.get(f++),d=null==b||0==b.length?J.shape.Labels.nullToken:[null],this.setLabel(d,b,a)}else if("clearBoxes"===a)this.labelBoxes=null;else if(!("translucency"===a||"bgtranslucency"===a))if("bgcolor"===a){this.isActive=!0;null==this.bsBgColixSet&&(this.bsBgColixSet=new J.util.BS);b=J.util.C.getColixO(b);if(!this.setDefaults)for(a=c.nextSetBit(0);0<=a&&a<this.atomCount;a=c.nextSetBit(a+1))this.setBgcolix(a,b);if(this.setDefaults||!this.defaultsOnlyForNone)this.defaultBgcolix=b}else if(null==
this.bsFontSet&&(this.bsFontSet=new J.util.BS),"textLabels"===a){this.setScaling();e=b;a=c.nextSetBit(0);for(f=0;0<=a&&a<this.atomCount;a=c.nextSetBit(a+1))this.setTextLabel(a,e.get(f++))}else if("fontsize"===a)if(a=b.intValue(),0>a)this.fids=null;else{b=this.gdata.getFontFid(a);if(!this.setDefaults)for(a=c.nextSetBit(0);0<=a&&a<this.atomCount;a=c.nextSetBit(a+1))this.setFont(a,b);if(this.setDefaults||!this.defaultsOnlyForNone)this.defaultFontId=b}else if("font"===a){b=b.fid;if(!this.setDefaults)for(a=
c.nextSetBit(0);0<=a&&a<this.atomCount;a=c.nextSetBit(a+1))this.setFont(a,b);if(this.setDefaults||!this.defaultsOnlyForNone)this.defaultFontId=b}else if("offset"===a||"offsetexact"===a)if(Clazz.instanceOf(b,Integer)){b=b.intValue();d="offsetexact"===a;0==b?b=32767:b==J.shape.Labels.zeroOffset&&(b=0);if(!this.setDefaults)for(a=c.nextSetBit(0);0<=a&&a<this.atomCount;a=c.nextSetBit(a+1))this.setOffsets(a,b,d);if(this.setDefaults||!this.defaultsOnlyForNone)this.defaultOffset=b}else{if(!this.setDefaults)for(a=
c.nextSetBit(0);0<=a&&a<this.atomCount;a=c.nextSetBit(a+1))this.setPymolOffset(a,b)}else if("align"===a){d=1;b.equalsIgnoreCase("right")?d=3:b.equalsIgnoreCase("center")&&(d=2);for(a=c.nextSetBit(0);0<=a&&a<this.atomCount;a=c.nextSetBit(a+1))this.setAlignment(a,d);if(this.setDefaults||!this.defaultsOnlyForNone)this.defaultAlignment=d}else if("pointer"===a){b=b.intValue();if(!this.setDefaults)for(a=c.nextSetBit(0);0<=a&&a<this.atomCount;a=c.nextSetBit(a+1))this.setPointer(a,b);if(this.setDefaults||
!this.defaultsOnlyForNone)this.defaultPointer=b}else if("front"===a){b=b.booleanValue();if(!this.setDefaults)for(a=c.nextSetBit(0);0<=a&&a<this.atomCount;a=c.nextSetBit(a+1))this.setFront(a,b);if(this.setDefaults||!this.defaultsOnlyForNone)this.defaultZPos=b?32:0}else if("group"===a){b=b.booleanValue();if(!this.setDefaults)for(a=c.nextSetBit(0);0<=a&&a<this.atomCount;a=c.nextSetBit(a+1))this.setGroup(a,b);if(this.setDefaults||!this.defaultsOnlyForNone)this.defaultZPos=b?16:0}else if("display"===a||
"toggleLabel"===a){e="toggleLabel"===a?0:b.booleanValue()?1:-1;null==this.mads&&(this.mads=Clazz.newShortArray(this.atomCount,0));var g=f=null,h=null,k=null;for(a=c.nextSetBit(0);0<=a&&a<this.atomCount;a=c.nextSetBit(a+1)){var l=this.atoms[a];if(null==this.formats||a>=this.formats.length)this.formats=J.util.ArrayUtil.ensureLengthS(this.formats,a+1);null!=this.strings&&this.strings.length>a&&null!=this.strings[a]?this.mads[a]=0==e&&0>this.mads[a]||1==e?1:-1:(null==this.bsSizeSet&&(this.bsSizeSet=new J.util.BS),
this.strings=J.util.ArrayUtil.ensureLengthS(this.strings,a+1),l.getGroup3(!1).equals("UNK")?(null==h&&(h=this.viewer.getStandardLabelFormat(1),k=J.modelset.LabelToken.compile(this.viewer,h,"\x00",null)),b=h,d=k):(null==f&&(f=this.viewer.getStandardLabelFormat(2),g=J.modelset.LabelToken.compile(this.viewer,f,"\x00",null)),b=f,d=g),this.strings[a]=J.modelset.LabelToken.formatLabelAtomArray(this.viewer,l,d,"\x00",null),this.formats[a]=b,this.bsSizeSet.set(a),(null==this.bsBgColixSet||!this.bsBgColixSet.get(a))&&
0!=this.defaultBgcolix&&this.setBgcolix(a,this.defaultBgcolix),this.mads[a]=0<=e?1:-1);l.setShapeVisibility(this.myVisibilityFlag,null!=this.strings&&a<this.strings.length&&null!=this.strings[a]&&0<=this.mads[a])}}else a.startsWith("label:")?(this.setScaling(),this.setLabel(Array(1),a.substring(6),b.intValue())):("deleteModelAtoms"===a&&(this.labelBoxes=null,d=b[2][1],e=b[2][2],this.fids=J.util.ArrayUtil.deleteElements(this.fids,d,e),this.bgcolixes=J.util.ArrayUtil.deleteElements(this.bgcolixes,d,
e),this.offsets=J.util.ArrayUtil.deleteElements(this.offsets,d,e),this.formats=J.util.ArrayUtil.deleteElements(this.formats,d,e),this.strings=J.util.ArrayUtil.deleteElements(this.strings,d,e),J.util.BSUtil.deleteBits(this.bsFontSet,c),J.util.BSUtil.deleteBits(this.bsBgColixSet,c)),this.setPropAS(a,b,c))},"~S,~O,J.util.BS");$_M(c$,"setPymolOffset",($fz=function(a,b){var c=this.getLabel(a);if(null==c){c=null!=this.bsFontSet&&this.bsFontSet.get(a)?this.fids[a]:-1;0>c&&this.setFont(a,c=this.defaultFontId);
var c=J.util.JmolFont.getFont3D(c),d=this.getColix2(a,this.atoms[a],!1),c=J.shape.Text.newLabel(this.gdata,c,this.formats[a],d,this.getColix2(a,this.atoms[a],!0),0,this.scalePixelsPerMicron,b);this.setTextLabel(a,c)}else c.pymolOffset=b},$fz.isPrivate=!0,$fz),"~N,~A");$_M(c$,"setScaling",($fz=function(){this.isActive=!0;null==this.bsSizeSet&&(this.bsSizeSet=new J.util.BS);this.scalePixelsPerMicron=(this.isScaled=this.viewer.getBoolean(603979845))?1E4*this.viewer.getScalePixelsPerAngstrom(!1):0},$fz.isPrivate=
!0,$fz));$_M(c$,"setTextLabel",($fz=function(a,b){var c=b.getText(),d=this.atoms[a];this.addString(d,a,c,c);d.setShapeVisibility(this.myVisibilityFlag,!0);this.setLabelColix(a,b.colix,J.constant.EnumPalette.UNKNOWN.id);this.setFont(a,b.font.fid);this.putLabel(a,b)},$fz.isPrivate=!0,$fz),"~N,J.shape.Text");$_M(c$,"setLabel",($fz=function(a,b,c){var d=this.atoms[c],e=a[0];null==e&&(e=a[0]=J.modelset.LabelToken.compile(this.viewer,b,"\x00",null));a=null==e?null:J.modelset.LabelToken.formatLabelAtomArray(this.viewer,
d,e,"\x00",null);this.addString(d,c,a,b);this.text=this.getLabel(c);this.isScaled?(this.text=J.shape.Text.newLabel(this.gdata,null,a,0,0,0,this.scalePixelsPerMicron,null),this.putLabel(c,this.text)):null!=this.text&&this.text.setText(a);this.defaultOffset!=J.shape.Labels.zeroOffset&&this.setOffsets(c,this.defaultOffset,!1);1!=this.defaultAlignment&&this.setAlignment(c,this.defaultAlignment);0!=(this.defaultZPos&32)?this.setFront(c,!0):0!=(this.defaultZPos&16)&&this.setGroup(c,!0);0!=this.defaultPointer&&
this.setPointer(c,this.defaultPointer);(0!=this.defaultColix||0!=this.defaultPaletteID)&&this.setLabelColix(c,this.defaultColix,this.defaultPaletteID);0!=this.defaultBgcolix&&this.setBgcolix(c,this.defaultBgcolix);this.defaultFontId!=this.zeroFontId&&this.setFont(c,this.defaultFontId)},$fz.isPrivate=!0,$fz),"~A,~S,~N");$_M(c$,"addString",($fz=function(a,b,c,d){a.setShapeVisibility(this.myVisibilityFlag,null!=c);if(null==this.strings||b>=this.strings.length)this.strings=J.util.ArrayUtil.ensureLengthS(this.strings,
b+1);if(null==this.formats||b>=this.formats.length)this.formats=J.util.ArrayUtil.ensureLengthS(this.formats,b+1);this.strings[b]=c;this.formats[b]=null!=d&&0<=d.indexOf("%{")?c:d;this.bsSizeSet.setBitTo(b,null!=d)},$fz.isPrivate=!0,$fz),"J.modelset.Atom,~N,~S,~S");Clazz.overrideMethod(c$,"getProperty",function(a,b){return a.equals("offsets")?this.offsets:a.equals("label")?null!=this.strings&&b<this.strings.length&&null!=this.strings[b]?this.strings[b]:"":null},"~S,~N");$_M(c$,"putLabel",function(a,
b){null==b?this.atomLabels.remove(Integer.$valueOf(a)):this.atomLabels.put(Integer.$valueOf(a),b)},"~N,J.shape.Text");$_M(c$,"getLabel",function(a){return this.atomLabels.get(Integer.$valueOf(a))},"~N");$_M(c$,"putBox",function(a,b){null==this.labelBoxes&&(this.labelBoxes=new java.util.Hashtable);this.labelBoxes.put(Integer.$valueOf(a),b)},"~N,~A");$_M(c$,"getBox",function(a){return null==this.labelBoxes?null:this.labelBoxes.get(Integer.$valueOf(a))},"~N");$_M(c$,"setLabelColix",($fz=function(a,b,
c){this.setColixAndPalette(b,c,a);null!=this.colixes&&null!=(this.text=this.getLabel(a))&&this.text.setColix(this.colixes[a])},$fz.isPrivate=!0,$fz),"~N,~N,~N");$_M(c$,"setBgcolix",($fz=function(a,b){if(null==this.bgcolixes||a>=this.bgcolixes.length){if(0==b)return;this.bgcolixes=J.util.ArrayUtil.ensureLengthShort(this.bgcolixes,a+1)}this.bgcolixes[a]=b;this.bsBgColixSet.setBitTo(a,0!=b);this.text=this.getLabel(a);null!=this.text&&this.text.setBgColix(b)},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"setOffsets",
($fz=function(a,b,c){if(null==this.offsets||a>=this.offsets.length){if(0==b)return;this.offsets=J.util.ArrayUtil.ensureLengthI(this.offsets,a+1)}this.offsets[a]=this.offsets[a]&255|b<<8;c&&(this.offsets[a]|=128);this.text=this.getLabel(a);null!=this.text&&this.text.setOffset(b)},$fz.isPrivate=!0,$fz),"~N,~N,~B");$_M(c$,"setAlignment",($fz=function(a,b){if(null==this.offsets||a>=this.offsets.length){if(1==b)return;this.offsets=J.util.ArrayUtil.ensureLengthI(this.offsets,a+1)}this.offsets[a]=this.offsets[a]&
-13|b<<2;this.text=this.getLabel(a);null!=this.text&&this.text.setAlignment(b)},$fz.isPrivate=!0,$fz),"~N,~N");c$.getAlignment=$_M(c$,"getAlignment",function(a){return(a&12)>>2},"~N");$_M(c$,"setPointer",($fz=function(a,b){if(null==this.offsets||a>=this.offsets.length){if(0==b)return;this.offsets=J.util.ArrayUtil.ensureLengthI(this.offsets,a+1)}this.offsets[a]=(this.offsets[a]&-4)+b;this.text=this.getLabel(a);null!=this.text&&this.text.setPointer(b)},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"setFront",
($fz=function(a,b){if(null==this.offsets||a>=this.offsets.length){if(!b)return;this.offsets=J.util.ArrayUtil.ensureLengthI(this.offsets,a+1)}this.offsets[a]=(this.offsets[a]&-49)+(b?32:0)},$fz.isPrivate=!0,$fz),"~N,~B");$_M(c$,"setGroup",($fz=function(a,b){if(null==this.offsets||a>=this.offsets.length){if(!b)return;this.offsets=J.util.ArrayUtil.ensureLengthI(this.offsets,a+1)}this.offsets[a]=(this.offsets[a]&-49)+(b?16:0)},$fz.isPrivate=!0,$fz),"~N,~B");$_M(c$,"setFont",($fz=function(a,b){if(null==
this.fids||a>=this.fids.length){if(b==this.zeroFontId)return;this.fids=J.util.ArrayUtil.ensureLengthByte(this.fids,a+1)}this.fids[a]=b;this.bsFontSet.set(a);this.text=this.getLabel(a);null!=this.text&&this.text.setFontFromFid(b)},$fz.isPrivate=!0,$fz),"~N,~N");Clazz.overrideMethod(c$,"setModelClickability",function(){if(null!=this.strings)for(var a=this.strings.length;0<=--a;)null!=this.strings[a]&&(this.modelSet.atoms.length>a&&!this.modelSet.isAtomHidden(a))&&this.modelSet.atoms[a].setClickable(this.myVisibilityFlag)});
Clazz.overrideMethod(c$,"getShapeState",function(){return!this.isActive||null==this.bsSizeSet?"":this.viewer.getShapeState(this)});Clazz.overrideMethod(c$,"checkObjectDragged",function(a,b,c,d){if(2!=this.viewer.getPickingMode()||null==this.labelBoxes)return!1;if(-2147483648==a)return a=this.findNearestLabel(c,d),0<=a?(this.pickedAtom=a,this.pickedX=c,this.pickedY=d,this.pickedOffset=(null==this.offsets||this.pickedAtom>=this.offsets.length?0:this.offsets[this.pickedAtom])>>8,!0):!1;if(2147483647==
a)return this.pickedAtom=-1,!1;if(0>this.pickedAtom)return!1;this.move2D(this.pickedAtom,c,d);return!0},"~N,~N,~N,~N,~N,J.util.BS");$_M(c$,"findNearestLabel",($fz=function(a,b){if(null==this.labelBoxes)return-1;for(var c=3.4028235E38,d=-1,e=3.4028235E38,f,g=this.labelBoxes.entrySet().iterator();g.hasNext()&&((f=g.next())||1);)if(this.atoms[f.getKey().intValue()].isVisible(this.myVisibilityFlag)){var h=f.getValue(),k=a-h[0],l=b-h[1];0>=k||(0>=l||k>=h[2]||l>=h[3]||h[4]>e)||(e=h[4],h=Math.min(Math.abs(k-
h[2]/2),Math.abs(l-h[3]/2)),h<=c&&(c=h,d=f.getKey().intValue()))}return d},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"move2D",($fz=function(a,b,c){var d=J.shape.Object2d.getXOffset(this.pickedOffset),e=-J.shape.Object2d.getYOffset(this.pickedOffset),d=d+(b-this.pickedX),e=e+(this.pickedY-c);b=J.shape.Object2d.getOffset(d,e);0==b?b=32767:b==J.shape.Labels.zeroOffset&&(b=0);this.setOffsets(a,b,!0)},$fz.isPrivate=!0,$fz),"~N,~N,~N");$_M(c$,"getColix2",function(a,b,c){c?a=null==this.bgcolixes||a>=this.bgcolixes.length?
0:this.bgcolixes[a]:(a=null==this.colixes||a>=this.colixes.length?0:this.colixes[a],a=J.util.C.getColixInherited(a,b.getColix()),J.util.C.isColixTranslucent(a)&&(a=J.util.C.getColixTranslucent3(a,!1,0)));return a},"~N,J.modelset.Atom,~B");Clazz.defineStatics(c$,"zeroOffset",1028);c$.nullToken=c$.prototype.nullToken=[null];Clazz.defineStatics(c$,"POINTER_FLAGS",3,"ALIGN_FLAGS",12,"ZPOS_FLAGS",48,"GROUP_FLAG",16,"FRONT_FLAG",32,"SCALE_FLAG",64,"EXACT_OFFSET_FLAG",128,"FLAGS",255,"FLAG_OFFSET",8)}),
Clazz.declarePackage("J.shape"),Clazz.load(["J.shape.TextShape"],"J.shape.Hover",["J.shape.Text","J.util.ArrayUtil","$.C"],function(){c$=Clazz.decorateAsClass(function(){this.hoverText=null;this.atomIndex=-1;this.text=this.xy=null;this.labelFormat="%U";this.specialLabel=this.atomFormats=null;Clazz.instantialize(this,arguments)},J.shape,"Hover",J.shape.TextShape);$_M(c$,"initShape",function(){Clazz.superCall(this,J.shape.Hover,"initShape",[]);this.isHover=!0;var a=this.gdata.getFont3DFSS("SansSerif",
"Plain",12),b=J.util.C.getColixS("#FFFFC3");this.currentObject=this.hoverText=J.shape.Text.newLabel(this.gdata,a,null,4,b,1,0,null);this.hoverText.setAdjustForWindow(!0)});Clazz.overrideMethod(c$,"setProperty",function(a,b,c){if("target"===a)this.atomIndex=null==b?-1:b.intValue();else if("text"===a)this.text=b,null!=this.text&&0==this.text.length&&(this.text=null);else if("specialLabel"===a)this.specialLabel=b;else if("atomLabel"===a){a=b;null!=a&&0==a.length&&(a=null);b=this.viewer.getAtomCount();
if(null==this.atomFormats||this.atomFormats.length<b)this.atomFormats=Array(b);for(b=c.nextSetBit(0);0<=b;b=c.nextSetBit(b+1))this.atomFormats[b]=a}else"xy"===a?this.xy=b:"label"===a?(this.labelFormat=b,null!=this.labelFormat&&0==this.labelFormat.length&&(this.labelFormat=null)):"deleteModelAtoms"===a?(null!=this.atomFormats&&(this.atomFormats=J.util.ArrayUtil.deleteElements(this.atomFormats,b[2][1],b[2][2])),this.atomIndex=-1):this.setPropTS(a,b,null)},"~S,~O,J.util.BS");Clazz.overrideMethod(c$,
"getShapeState",function(){return this.viewer.getShapeState(this)});Clazz.defineStatics(c$,"FONTFACE","SansSerif","FONTSTYLE","Plain","FONTSIZE",12)}),Clazz.declarePackage("J.shape"),Clazz.load(["J.util.MeshSurface","$.P3","$.V3"],"J.shape.Mesh","java.lang.Boolean $.Float java.util.Hashtable J.script.T J.util.ArrayUtil $.BS $.BSUtil $.C $.Escape $.Matrix3f $.Matrix4f $.Measure $.Normix $.SB".split(" "),function(){c$=Clazz.decorateAsClass(function(){this.title=null;this.meshColix=0;this.thisID=this.lineData=
this.normixes=null;this.isValid=!0;this.lattice=this.colorCommand=this.scriptCommand=null;this.visible=!0;this.lighting=1073741958;this.scale=1;this.haveXyPoints=!1;this.width=this.diameter=0;this.vertexColorMap=this.linkedMesh=this.ptCenter=null;this.color=0;this.unitCell=null;this.index=this.scale3d=0;this.modelIndex=this.atomIndex=-1;this.visibilityFlags=0;this.insideOut=!1;this.checkByteCount=0;this.drawTriangles=this.showPoints=this.showContourLines=!1;this.fillTriangles=!0;this.frontOnly=this.showTriangles=
!1;this.isTwoSided=!0;this.havePlanarContours=!1;this.vTemp=this.vAC=this.vAB=this.bsTemp=null;this.colorDensity=!1;this.connections=this.slabbingObject=this.cappingObject=null;this.recalcAltVertices=!1;Clazz.instantialize(this,arguments)},J.shape,"Mesh",J.util.MeshSurface);Clazz.prepareFields(c$,function(){this.ptCenter=J.util.P3.new3(0,0,0);this.vAB=new J.util.V3;this.vAC=new J.util.V3;this.vTemp=new J.util.V3});$_M(c$,"setVisibilityFlags",function(a){this.visibilityFlags=a},"~N");Clazz.makeConstructor(c$,
function(){Clazz.superConstructor(this,J.shape.Mesh,[])});$_M(c$,"mesh1",function(a,b,c){"+PREVIOUS_MESH+".equals(a)&&(a=null);this.thisID=a;this.colix=b;this.index=c;return this},"~S,~N,~N");$_M(c$,"clear",function(a){this.cappingObject=this.bsSlabGhost=this.bsSlabDisplay=this.bsDisplay=this.altVertices=null;this.colix=23;this.colorDensity=!1;this.connections=null;this.diameter=0;this.drawTriangles=!1;this.fillTriangles=!0;this.isTwoSided=this.isTriangleSet=this.haveXyPoints=this.havePlanarContours=
this.frontOnly=!1;this.normixes=this.mat4=this.lattice=null;this.scale3d=0;this.polygonIndexes=null;this.scale=1;this.showTriangles=this.showPoints=this.showContourLines=!1;this.unitCell=this.title=this.slabOptions=this.slabbingObject=null;this.vertexCount0=this.polygonCount0=this.vertexCount=this.polygonCount=0;this.spanningVectors=this.vertices=null;this.meshType=a},"~S");$_M(c$,"initialize",function(a,b,c){null==b&&(b=this.vertices);b=this.getNormals(b,c);this.setNormixes(b);this.lighting=1073741958;
this.insideOut&&this.invertNormixes();this.setLighting(a)},"~N,~A,J.util.P4");$_M(c$,"setNormixes",function(a){this.normixes=Clazz.newShortArray(this.normixCount,0);null==this.bsTemp&&(this.bsTemp=J.util.Normix.newVertexBitSet());if(this.haveXyPoints)for(var b=this.normixCount;0<=--b;)this.normixes[b]=9999;else for(b=this.normixCount;0<=--b;)this.normixes[b]=J.util.Normix.getNormixV(a[b],this.bsTemp)},"~A");$_M(c$,"getNormals",function(a,b){this.normixCount=this.isTriangleSet?this.polygonCount:this.vertexCount;
for(var c=Array(this.normixCount),d=this.normixCount;0<=--d;)c[d]=new J.util.V3;if(null==b)this.sumVertexNormals(a,c);else for(var e=J.util.V3.new3(b.x,b.y,b.z),d=this.normixCount;0<=--d;)c[d]=e;if(!this.isTriangleSet)for(d=this.normixCount;0<=--d;)c[d].normalize();return c},"~A,J.util.P4");$_M(c$,"setLighting",function(a){this.isTwoSided=1073741964==a;a!=this.lighting&&(this.flipLighting(this.lighting),this.flipLighting(this.lighting=a))},"~N");$_M(c$,"flipLighting",($fz=function(a){if(1073741964==
a)for(a=this.normixCount;0<=--a;)this.normixes[a]=~this.normixes[a];else 1073741958==a==this.insideOut&&this.invertNormixes()},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"invertNormixes",($fz=function(){J.util.Normix.setInverseNormixes();for(var a=this.normixCount;0<=--a;)this.normixes[a]=J.util.Normix.getInverseNormix(this.normixes[a])},$fz.isPrivate=!0,$fz));$_M(c$,"setTranslucent",function(a,b){this.colix=J.util.C.getColixTranslucent3(this.colix,a,b)},"~B,~N");$_M(c$,"sumVertexNormals",function(a,b){this.sumVertexNormals2(a,
b)},"~A,~A");$_M(c$,"sumVertexNormals2",function(a,b){for(var c=this.checkByteCount,d=this.getMinDistance2ForVertexGrouping(),e=this.polygonCount;0<=--e;)try{if(this.setABC(e)){var f=a[this.iA],g=a[this.iB],h=a[this.iC];if(!(f.distanceSquared(g)<d||g.distanceSquared(h)<d||f.distanceSquared(h)<d))if(J.util.Measure.calcNormalizedNormal(f,g,h,this.vTemp,this.vAB,this.vAC),this.isTriangleSet)b[e].setT(this.vTemp);else{var k=this.vTemp.length();if(0.9<k&&1.1>k)for(var l=this.polygonIndexes[e].length-c;0<=
--l;)b[this.polygonIndexes[e][l]].add(this.vTemp)}}}catch(m){if(Clazz.exceptionOf(m,Exception))System.out.println(m);else throw m;}},"~A,~A");$_M(c$,"getMinDistance2ForVertexGrouping",function(){return 1E-8});$_M(c$,"getState",function(a){var b=new J.util.SB;b.append(a);a.equals("mo")||b.append(" ID ").append(J.util.Escape.eS(this.thisID));null!=this.lattice&&b.append(" lattice ").append(J.util.Escape.eP(this.lattice));0!=this.meshColix&&b.append(" color mesh ").append(J.util.C.getHexCode(this.meshColix));
b.append(this.getRendering());this.visible||b.append(" hidden");null!=this.bsDisplay&&(b.append(";\n  ").append(a),a.equals("mo")||b.append(" ID ").append(J.util.Escape.eS(this.thisID)),b.append(" display "+J.util.Escape.eBS(this.bsDisplay)));return b.toString()},"~S");$_M(c$,"getRendering",function(){var a=new J.util.SB;a.append(this.fillTriangles?" fill":" noFill");a.append(this.drawTriangles?" mesh":" noMesh");a.append(this.showPoints?" dots":" noDots");a.append(this.frontOnly?" frontOnly":" notFrontOnly");
this.showContourLines&&a.append(" contourlines");this.showTriangles&&a.append(" triangles");a.append(" ").append(J.script.T.nameOf(this.lighting));return a.toString()});$_M(c$,"getOffsetVertices",function(a){if(null!=this.altVertices&&!this.recalcAltVertices)return this.altVertices;this.altVertices=Array(this.vertexCount);for(var b=0;b<this.vertexCount;b++)this.altVertices[b]=J.util.P3.newP(this.vertices[b]);var c=null,d=0;0!=this.scale3d&&(null!=this.vertexValues&&null!=a)&&(c=J.util.V3.new3(a.x,
a.y,a.z),c.normalize(),c.scale(this.scale3d),null!=this.mat4&&(b=new J.util.Matrix3f,this.mat4.getRotationScale(b),b.transform(c)));for(b=0;b<this.vertexCount;b++)if(!(null!=this.vertexValues&&Float.isNaN(d=this.vertexValues[b])))null!=this.mat4&&this.mat4.transform(this.altVertices[b]),a=this.altVertices[b],null!=c&&0!=d&&a.scaleAdd2(d,c,a);this.initialize(this.lighting,this.altVertices,null);this.recalcAltVertices=!1;return this.altVertices},"J.util.P4");$_M(c$,"setShowWithin",function(a,b,c){if(0==
a.size())this.bsDisplay=c?J.util.BSUtil.newBitSet2(0,this.vertexCount):null;else{this.bsDisplay=new J.util.BS;for(var d=0;d<this.vertexCount;d++)J.shape.Mesh.checkWithin(this.vertices[d],a,b,c)&&this.bsDisplay.set(d)}},"J.util.JmolList,~N,~B");c$.checkWithin=$_M(c$,"checkWithin",function(a,b,c,d){if(0!=b.size())for(var e=b.size();0<=--e;)if(a.distanceSquared(b.get(e))<=c)return!d;return d},"J.util.P3,J.util.JmolList,~N,~B");$_M(c$,"getVertexIndexFromNumber",function(a){0>--a&&(a=this.vertexCount+
a);return this.vertexCount<=a?this.vertexCount-1:0>a?0:a},"~N");$_M(c$,"getVisibleVertexBitSet",function(){return this.getVisibleVBS()});$_M(c$,"getVisibleVBS",function(){var a=new J.util.BS;if(0==this.polygonCount&&null!=this.bsSlabDisplay)J.util.BSUtil.copy2(this.bsSlabDisplay,a);else for(var b=this.polygonCount;0<=--b;)if(null==this.bsSlabDisplay||this.bsSlabDisplay.get(b)){var c=this.polygonIndexes[b];null!=c&&(a.set(c[0]),a.set(c[1]),a.set(c[2]))}return a});$_M(c$,"getVisibleGhostBitSet",function(){var a=
new J.util.BS;if(0==this.polygonCount&&null!=this.bsSlabGhost)J.util.BSUtil.copy2(this.bsSlabGhost,a);else for(var b=this.polygonCount;0<=--b;)if(null==this.bsSlabGhost||this.bsSlabGhost.get(b)){var c=this.polygonIndexes[b];null!=c&&(a.set(c[0]),a.set(c[1]),a.set(c[2]))}return a});$_M(c$,"setTokenProperty",function(a,b){switch(a){case 1073742058:case 1073741960:this.frontOnly=1073741960==a?b:!b;break;case 1073741958:case 1073741862:case 1073741964:this.setLighting(a);break;case 1073742042:case 1113198595:this.showPoints=
1113198595==a?b:!b;break;case 1073742052:case 1073742018:this.drawTriangles=1073742018==a?b:!b;break;case 1073742046:case 1073741938:this.fillTriangles=1073741938==a?b:!b;break;case 1073742060:case 1073742182:this.showTriangles=1073742182==a?b:!b;break;case 1073742039:case 1073741898:this.showContourLines=1073741898==a?b:!b}},"~N,~B");$_M(c$,"getInfo",function(a){var b=new java.util.Hashtable;b.put("id",this.thisID);b.put("vertexCount",Integer.$valueOf(this.vertexCount));b.put("polygonCount",Integer.$valueOf(this.polygonCount));
b.put("haveQuads",Boolean.$valueOf(this.haveQuads));b.put("haveValues",Boolean.$valueOf(null!=this.vertexValues));0<this.vertexCount&&a&&b.put("vertices",J.util.ArrayUtil.arrayCopyPt(this.vertices,this.vertexCount));null!=this.vertexValues&&a&&b.put("vertexValues",J.util.ArrayUtil.arrayCopyF(this.vertexValues,this.vertexCount));0<this.polygonCount&&a&&b.put("polygons",J.util.ArrayUtil.arrayCopyII(this.polygonIndexes,this.polygonCount));return b},"~B");$_M(c$,"getBoundingBox",function(){return null});
$_M(c$,"getUnitCell",function(){return null});$_M(c$,"rotateTranslate",function(a,b,c){if(null==a&&null==b)this.mat4=null;else{var d=new J.util.Matrix3f,e=new J.util.V3;null==this.mat4&&(this.mat4=new J.util.Matrix4f,this.mat4.setIdentity());this.mat4.getRotationScale(d);this.mat4.get(e);null==a?c?e.setT(b):e.add(b):d.mul(a.getMatrix());this.mat4=J.util.Matrix4f.newMV(d,e);this.recalcAltVertices=!0}},"J.util.Quaternion,J.util.Tuple3f,~B");$_M(c$,"getNormalsTemp",function(){return null==this.normalsTemp?
this.normalsTemp=this.getNormals(this.vertices,null):this.normalsTemp});Clazz.defineStatics(c$,"PREVIOUS_MESH_ID","+PREVIOUS_MESH+")}),Clazz.declarePackage("J.shape"),Clazz.load(["J.shape.Shape"],"J.shape.MeshCollection","java.util.Hashtable J.script.T J.shape.Mesh J.util.ArrayUtil $.C $.Escape $.Logger $.P3 $.SB $.TextFormat J.viewer.StateManager".split(" "),function(){c$=Clazz.decorateAsClass(function(){this.meshCount=0;this.currentMesh=this.meshes=null;this.isFixed=!1;this.colix=this.nUnnamed=
0;this.myType=null;this.explicitID=!1;this.linkedMesh=this.previousMeshID=null;this.displayWithinDistance2=this.modelIndex=0;this.isDisplayWithinNot=!1;this.pickedMesh=this.title=this.bsDisplay=this.displayWithinPoints=null;this.pickedVertex=this.pickedModel=0;this.htObjects=this.connections=this.pickedPt=null;this.color=0;Clazz.instantialize(this,arguments)},J.shape,"MeshCollection",J.shape.Shape);Clazz.prepareFields(c$,function(){this.meshes=Array(4)});$_M(c$,"setMesh",($fz=function(a){this.linkedMesh=
null;if(null==a||J.util.TextFormat.isWild(a))return null!=a&&(this.previousMeshID=a),this.currentMesh=null;this.currentMesh=this.getMesh(a);null==this.currentMesh?this.allocMesh(a,null):a.equals("+PREVIOUS_MESH+")&&(this.linkedMesh=this.currentMesh.linkedMesh);null==this.currentMesh.thisID&&((0==this.nUnnamed||null!=this.getMesh(this.myType+this.nUnnamed))&&this.nUnnamed++,this.currentMesh.thisID=this.myType+this.nUnnamed,null!=this.htObjects&&this.htObjects.put(this.currentMesh.thisID.toUpperCase(),
this.currentMesh));this.previousMeshID=this.currentMesh.thisID;return this.currentMesh},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"allocMesh",function(a,b){var c=this.meshCount++;this.meshes=J.util.ArrayUtil.ensureLength(this.meshes,2*this.meshCount);this.currentMesh=this.meshes[c]=null==b?(new J.shape.Mesh).mesh1(a,this.colix,c):b;this.currentMesh.color=this.color;this.currentMesh.index=c;null!=a&&null!=this.htObjects&&this.htObjects.put(a.toUpperCase(),this.currentMesh);this.previousMeshID=null},"~S,J.shape.Mesh");
Clazz.overrideMethod(c$,"merge",function(a){for(var b=0;b<a.meshCount;b++)if(null!=a.meshes[b]){var c=a.meshes[b],d=this.getMesh(c.thisID);null==d?this.allocMesh(c.thisID,c):(this.meshes[d.index]=c,c.index=d.index)}this.currentMesh=this.previousMeshID=null},"J.shape.Shape");$_M(c$,"initShape",function(){Clazz.superCall(this,J.shape.MeshCollection,"initShape",[]);this.colix=5;this.color=4294967295});$_M(c$,"setPropMC",function(a,b,c){if("init"===a)this.title=null;else if("link"===a)2<=this.meshCount&&
null!=this.currentMesh&&(this.currentMesh.linkedMesh=this.meshes[this.meshCount-2]);else if("lattice"===a)null!=this.currentMesh&&(this.currentMesh.lattice=b);else if("variables"===a)null!=this.currentMesh&&(null!=this.currentMesh.scriptCommand&&!this.currentMesh.scriptCommand.startsWith("{"))&&(this.currentMesh.scriptCommand="{\n"+J.viewer.StateManager.getVariableList(b,0,!1,!1)+"\n"+this.currentMesh.scriptCommand);else if("thisID"===a)a=b,this.setMesh(a),this.checkExplicit(a);else if("title"===
a)if(null==b)this.title=null;else if(Clazz.instanceOf(b,String)){a=1;for(c=b.length;0<=--c;)"|"==b.charAt(c)&&a++;this.title=Array(a);a=0;var d=-1;for(c=0;c<b.length;c++)"|"==b.charAt(c)&&(this.title[a++]=b.substring(d+1,c),d=c);this.title[a]=b.substring(d+1)}else this.title=b;else if("delete"===a)this.deleteMesh();else if("reset"===a)a=b,null!=this.setMesh(a)&&this.setMesh(a);else if("color"===a)null!=b&&(this.colix=J.util.C.getColixO(b),this.color=b.intValue(),null!=this.currentMesh&&(this.currentMesh.color=
this.color),this.setTokenProperty(1766856708,!1,!1));else if("translucency"===a)this.setTokenProperty(1073742180,b.equals("translucent"),!1);else if("hidden"===a&&(b=Integer.$valueOf(b.booleanValue()?1048588:1048589),a="token"),"token"===a){a=b.intValue();b=0;c=!0;switch(a){case 1610625028:case 1048589:case 1073741958:case 1073741862:case 1073741964:case 1113198595:case 1073741938:case 1073742182:case 1073741960:break;case 1048588:c=!1;a=1048589;break;case 1073741898:b=1073742018;break;case 1073742039:c=
!1;a=1073741898;b=1073742018;break;case 1073742018:b=1073741898;break;case 1073742052:c=!1;a=1073742018;b=1073741898;break;case 1073742042:c=!1;a=1113198595;break;case 1073742046:c=!1;a=1073741938;break;case 1073742060:c=!1;a=1073742182;break;case 1073742058:c=!1;a=1073741960;break;default:J.util.Logger.error("PROBLEM IN MESHCOLLECTION: token? "+J.script.T.nameOf(a))}this.setTokenProperty(a,c,!1);0!=b&&this.setTokenProperty(b,c,!0)}else this.setPropS(a,b,c)},"~S,~O,J.util.BS");$_M(c$,"checkExplicit",
function(a){if(!this.explicitID&&(this.explicitID=null!=a&&!a.equals("+PREVIOUS_MESH+")))this.previousMeshID=a},"~S");$_M(c$,"setTokenProperty",($fz=function(a,b,c){if(null==this.currentMesh){var d=this.explicitID&&null!=this.previousMeshID&&J.util.TextFormat.isWild(this.previousMeshID)?this.previousMeshID.toUpperCase():null;null!=d&&0==d.length&&(d=null);for(var e=0;e<this.meshCount;e++)(null==d||J.util.TextFormat.isMatch(this.meshes[e].thisID.toUpperCase(),d,!0,!0))&&this.setMeshTokenProperty(this.meshes[e],
a,b,c)}else this.setMeshTokenProperty(this.currentMesh,a,b,c),null!=this.linkedMesh&&this.setMeshTokenProperty(this.linkedMesh,a,b,c)},$fz.isPrivate=!0,$fz),"~N,~B,~B");$_M(c$,"setMeshTokenProperty",($fz=function(a,b,c,d){if(!d||a.havePlanarContours&&a.drawTriangles!=a.showContourLines)switch(b){case 1610625028:a.bsDisplay=this.bsDisplay;null==this.bsDisplay&&null!=this.displayWithinPoints&&a.setShowWithin(this.displayWithinPoints,this.displayWithinDistance2,this.isDisplayWithinNot);break;case 1048589:a.visible=
c;break;case 1766856708:a.colix=this.colix;break;case 1073742180:a.setTranslucent(c,this.translucentLevel);c&&null!=a.bsSlabGhost&&a.resetSlab();break;default:a.setTokenProperty(b,c)}},$fz.isPrivate=!0,$fz),"J.shape.Mesh,~N,~B,~B");$_M(c$,"getPropDataMC",function(a,b){if("getNames"===a){for(var c=b[0],d=b[1].booleanValue(),e=this.meshCount;0<=--e;)null!=this.meshes[e]&&0!=this.meshes[e].vertexCount&&c.put((d?"$":"")+this.meshes[e].thisID,J.script.T.tokenOr);return!0}if("getVertices"===a){e=this.getMesh(b[0]);
if(null==e)return!1;b[1]=e.vertices;b[2]=e.getVisibleVertexBitSet();return!0}if("checkID"===a){for(var d=b[0].toUpperCase(),f=J.util.TextFormat.isWild(d),e=this.meshCount;0<=--e;)if(c=this.meshes[e].thisID,c.equalsIgnoreCase(d)||f&&J.util.TextFormat.isMatch(c.toUpperCase(),d,!0,!0))return b[1]=c,!0;return!1}if("getCenter"===a){c=b[0];d=b[1].intValue();if(null==(e=this.getMesh(c))||null==e.vertices)return!1;b[2]=2147483647==d?J.util.P3.new3(e.index+1,this.meshCount,e.vertexCount):e.vertices[e.getVertexIndexFromNumber(d)];
return!0}return!1},"~S,~A");$_M(c$,"getPropMC",function(a){var b;if("count"===a){var c=0;for(a=0;a<this.meshCount;a++)null!=(b=this.meshes[a])&&0<b.vertexCount&&c++;return Integer.$valueOf(c)}if("ID"===a)return null==this.currentMesh?null:this.currentMesh.thisID;if(a.startsWith("list")){this.clean();var c=new J.util.SB,d=0,e=a.equals("list")?null:a.substring(5);for(a=0;a<this.meshCount;a++)if(b=this.meshes[a],null==e||e.equalsIgnoreCase(b.thisID)){c.appendI(++d).append(" id:"+b.thisID).append("; model:"+
this.viewer.getModelNumberDotted(b.modelIndex)).append("; vertices:"+b.vertexCount).append("; polygons:"+b.polygonCount).append("; visible:"+b.visible);var f=this.getProperty("dataRange",0);null!=f&&c.append("; dataRange:").append(J.util.Escape.eAF(f));if(null!=b.title){for(var f="",g=0;g<b.title.length;g++)f+=(0==g?"; title:":" | ")+b.title[g];1E4<f.length&&(f=f.substring(0,1E4)+"...");c.append(f)}c.appendC("\n");null!=e&&(b=this.getProperty("jvxlFileInfo",0),null!=b&&c.append(b).appendC("\n"))}return c.toString()}return"vertices"===
a?this.getVertices(this.currentMesh):"getInfo"===a?null==this.currentMesh?null:this.currentMesh.getInfo(!1):"getData"===a?null==this.currentMesh?null:this.currentMesh.getInfo(!0):null},"~S");$_M(c$,"getVertices",($fz=function(a){return null==a?null:a.vertices},$fz.isPrivate=!0,$fz),"J.shape.Mesh");$_M(c$,"clean",function(){for(var a=this.meshCount;0<=--a;)(null==this.meshes[a]||0==this.meshes[a].vertexCount)&&this.deleteMeshI(a)});$_M(c$,"deleteMesh",($fz=function(){this.explicitID&&null!=this.currentMesh?
this.deleteMeshI(this.currentMesh.index):this.deleteMeshKey(this.explicitID&&null!=this.previousMeshID&&J.util.TextFormat.isWild(this.previousMeshID)?this.previousMeshID:null);this.currentMesh=null},$fz.isPrivate=!0,$fz));$_M(c$,"deleteMeshKey",function(a){if(null==a||0==a.length){for(var b=this.meshCount;0<=--b;)this.meshes[b]=null;this.nUnnamed=this.meshCount=0;null!=this.htObjects&&this.htObjects.clear()}else{a=a.toLowerCase();for(b=this.meshCount;0<=--b;)J.util.TextFormat.isMatch(this.meshes[b].thisID.toLowerCase(),
a,!0,!0)&&this.deleteMeshI(b)}},"~S");$_M(c$,"deleteMeshI",function(a){null!=this.htObjects&&this.htObjects.remove(this.meshes[a].thisID.toUpperCase());for(a+=1;a<this.meshCount;++a)this.meshes[--this.meshes[a].index]=this.meshes[a];this.meshes[--this.meshCount]=null},"~N");$_M(c$,"getMesh",function(a){a=this.getIndexFromName(a);return 0>a?null:this.meshes[a]},"~S");Clazz.overrideMethod(c$,"getIndexFromName",function(a){if("+PREVIOUS_MESH+".equals(a))return null==this.previousMeshID?this.meshCount-
1:this.getIndexFromName(this.previousMeshID);if(J.util.TextFormat.isWild(a)){a=a.toLowerCase();for(var b=this.meshCount;0<=--b;)if(null!=this.meshes[b]&&J.util.TextFormat.isMatch(this.meshes[b].thisID,a,!0,!0))return b}else{if(null!=this.htObjects)return a=this.htObjects.get(a.toUpperCase()),null==a?-1:a.index;for(b=this.meshCount;0<=--b;)if(null!=this.meshes[b]&&0!=this.meshes[b].vertexCount&&a.equalsIgnoreCase(this.meshes[b].thisID))return b}return-1},"~S");Clazz.overrideMethod(c$,"setVisibilityFlags",
function(a){for(var b=this.viewer.getDeletedAtoms(),c=this.meshCount;0<=--c;){var d=this.meshes[c];d.visibilityFlags=d.visible&&d.isValid&&(0>d.modelIndex||a.get(d.modelIndex)&&(0>d.atomIndex||!this.modelSet.isAtomHidden(d.atomIndex)&&!(null!=b&&b.get(d.atomIndex))))?this.myVisibilityFlag:0}},"J.util.BS");$_M(c$,"setStatusPicked",function(a,b){this.viewer.setStatusAtomPicked(a,'["'+this.myType+'",'+J.util.Escape.eS(this.pickedMesh.thisID)+","+ +this.pickedModel+","+this.pickedVertex+","+b.x+","+b.y+
","+b.z+","+(null==this.pickedMesh.title?'""':J.util.Escape.eS(this.pickedMesh.title[0]))+"]")},"~N,J.util.P3");$_M(c$,"getPickedPoint",function(a,b){var c=new java.util.Hashtable;null!=a&&(c.put("pt",a),c.put("modelIndex",Integer.$valueOf(b)),c.put("model",this.viewer.getModelNumberDotted(b)),c.put("id",this.pickedMesh.thisID),c.put("vertex",Integer.$valueOf(this.pickedVertex+1)),c.put("type",this.myType));return c},"J.util.P3,~N");Clazz.defineStatics(c$,"PREVIOUS_MESH_ID","+PREVIOUS_MESH+")}),Clazz.declarePackage("J.render"),
Clazz.load(["J.render.FontLineShapeRenderer","J.util.P3"],"J.render.AxesRenderer",["J.constant.EnumAxesMode","J.util.Point3fi"],function(){c$=Clazz.decorateAsClass(function(){this.colixes=this.originScreen=this.screens=null;Clazz.instantialize(this,arguments)},J.render,"AxesRenderer",J.render.FontLineShapeRenderer);Clazz.prepareFields(c$,function(){this.screens=Array(6);for(var a=6;0<=--a;)this.screens[a]=new J.util.P3;this.originScreen=new J.util.P3;this.colixes=Clazz.newShortArray(3,0)});Clazz.overrideMethod(c$,
"initRenderer",function(){this.endcap=2;this.draw000=!1});Clazz.overrideMethod(c$,"render",function(){var a=this.shape,b=this.viewer.getObjectMad(1);if(0==b||!this.g3d.checkTranslucent(!1))return!1;var c=0!=a.axisXY.z;if(!c&&this.viewer.isNavigating()&&this.viewer.getBoolean(603979887))return!1;var d=this.viewer.getAxesMode();this.imageFontScaling=this.viewer.getImageFontScaling();if(this.viewer.areAxesTainted()){var e=a.font3d;a.initShape();null!=e&&(a.font3d=e)}this.font3d=this.g3d.getFont3DScaled(a.font3d,
this.imageFontScaling);var f=this.modelSet.unitCells,e=this.viewer.getCurrentModelIndex(),g=d===J.constant.EnumAxesMode.UNITCELL;if(this.viewer.isJmolDataFrameForModel(e)&&!this.viewer.getModelSet().getJmolFrameType(e).equals("plot data")||g&&0>e)return!1;var e=6,h=0;g&&null!=f?(e=3,h=6):c?(e=3,h=9):d===J.constant.EnumAxesMode.BOUNDBOX&&(e=6,h=this.viewer.getBoolean(603979806)?15:9);null!=a.labels&&(3!=e&&(e=6>a.labels.length?3:6),h=-1);var f=this.viewer.isJmolDataFrame(),d=this.g3d.getSlab(),g=b,
k=!1;if(c){if(1==this.exportType)return!1;20<=b?(g=500<b?5:Clazz.doubleToInt(b/100),0==g&&(g=2)):this.g3d.isAntialiased()&&(g+=g);this.g3d.setSlab(0);this.pt0.setT(this.viewer.transformPt(a.axisXY));this.originScreen.set(this.pt0.x,this.pt0.y,this.pt0.z);var l=this.viewer.getScreenDim()/10*a.scale;this.g3d.isAntialiased()&&(l*=2);for(b=0;3>b;b++)this.viewer.rotatePoint(a.getAxisPoint(b,!1),this.screens[b]),this.screens[b].z*=-1,this.screens[b].scaleAdd2(l,this.screens[b],this.originScreen)}else{if(k=
null!=a.tickInfos)null==this.atomA&&(this.atomA=new J.util.Point3fi,this.atomB=new J.util.Point3fi),this.atomA.setT(a.getOriginPoint(f));this.viewer.transformPtNoClip(a.getOriginPoint(f),this.originScreen);g=this.getDiameter(Clazz.floatToInt(this.originScreen.z),b);for(b=e;0<=--b;)this.viewer.transformPtNoClip(a.getAxisPoint(b,f),this.screens[b])}var l=this.originScreen.x,m=this.originScreen.y;this.colixes[0]=this.viewer.getObjectColix(1);this.colixes[1]=this.viewer.getObjectColix(2);this.colixes[2]=
this.viewer.getObjectColix(3);for(b=e;0<=--b;){this.colix=this.colixes[b%3];this.g3d.setColix(this.colix);var n=null==a.labels?J.render.AxesRenderer.axisLabels[b+h]:b<a.labels.length?a.labels[b]:null;null!=n&&0<n.length&&this.renderLabel(n,this.screens[b].x,this.screens[b].y,this.screens[b].z,l,m);k&&(this.tickInfo=a.tickInfos[b%3+1],null==this.tickInfo&&(this.tickInfo=a.tickInfos[0]),this.atomB.setT(a.getAxisPoint(b,f)),null!=this.tickInfo&&(this.tickInfo.first=0,this.tickInfo.signFactor=3<=b%6?
-1:1));this.renderLine(this.originScreen,this.screens[b],g,this.pt0,this.pt1,k&&null!=this.tickInfo)}3==e&&!c&&(a=null==a.labels||3==a.labels.length||null==a.labels[3]?"0":a.labels[3],null!=a&&0!=a.length&&(this.colix=this.viewer.getColixBackgroundContrast(),this.g3d.setColix(this.colix),this.renderLabel(a,this.originScreen.x,this.originScreen.y,this.originScreen.z,l,m)));c&&this.g3d.setSlab(d);return!1});$_M(c$,"renderLabel",($fz=function(a,b,c,d,e,f){var g=this.font3d.getAscent(),h=this.font3d.stringWidth(a);
e=b-e;f=c-f;if(0!=e||0!=f){var k=Math.sqrt(e*e+f*f);b+=0.75*h*e/k;c+=0.75*g*f/k}c=Math.floor(c+g/2);this.g3d.drawString(a,this.font3d,Clazz.doubleToInt(Math.floor(b-h/2)),Clazz.doubleToInt(c),Clazz.floatToInt(d),Clazz.floatToInt(d),0)},$fz.isPrivate=!0,$fz),"~S,~N,~N,~N,~N,~N");Clazz.defineStatics(c$,"axisLabels",["+X","+Y","+Z",null,null,null,"a","b","c","X","Y","Z",null,null,null,"X",null,"Z",null,"(Y)",null])}),Clazz.declarePackage("J.render"),Clazz.load(["J.render.LabelsRenderer","J.util.P3i"],
"J.render.EchoRenderer",["J.render.TextRenderer","J.util.C"],function(){c$=Clazz.decorateAsClass(function(){this.imageFontScaling=0;this.pt=this.ptAtom=null;Clazz.instantialize(this,arguments)},J.render,"EchoRenderer",J.render.LabelsRenderer);Clazz.prepareFields(c$,function(){this.pt=new J.util.P3i});Clazz.overrideMethod(c$,"render",function(){if(this.viewer.isPreviewOnly())return!1;var a=this.shape.objects.values().iterator(),b=this.viewer.getBoolean(603979845)?1E4*this.viewer.getScalePixelsPerAngstrom(!0):
0;this.imageFontScaling=this.viewer.getImageFontScaling();for(var c=!1;a.hasNext();){var d=a.next();if(d.visible&&!d.hidden){if(4==d.valign)this.viewer.transformPtScr(d.xyz,this.pt),d.setXYZs(this.pt.x,this.pt.y,this.pt.z,this.pt.z);else if(2147483647!=d.movableZPercent){var e=this.viewer.zValueFromPercent(d.movableZPercent);d.setZs(e,e)}J.render.TextRenderer.render(d,this.viewer,this.g3d,b,this.imageFontScaling,!1,null,this.xy);if(J.util.C.isColixTranslucent(d.bgcolix)||J.util.C.isColixTranslucent(d.colix))c=
!0}}if(!this.isExport&&(a=this.viewer.getFrameTitle(),null!=a&&0<a.length&&this.g3d.setColix(this.viewer.getColixBackgroundContrast()))){if(0<=a.indexOf("%{")||0<=a.indexOf("@{"))a=this.viewer.formatText(a);this.renderFrameTitle(a)}return c});$_M(c$,"renderFrameTitle",($fz=function(a){var b=this.g3d.getFontFidFS("Serif",14*this.imageFontScaling);this.g3d.setFontFid(b);var b=Clazz.doubleToInt(Math.floor(this.viewer.getScreenHeight()*(this.g3d.isAntialiased()?2:1)-10*this.imageFontScaling)),c=Clazz.doubleToInt(Math.floor(5*
this.imageFontScaling));this.g3d.drawStringNoSlab(a,null,c,b,0,0)},$fz.isPrivate=!0,$fz),"~S")}),Clazz.declarePackage("J.render"),Clazz.load(null,"J.render.TextRenderer",["J.shape.Text"],function(){c$=Clazz.declareType(J.render,"TextRenderer");c$.render=$_M(c$,"render",function(a,b,c,d,e,f,g,h){if(!(null==a||null==a.image&&null==a.lines)){var k=c.setColix(a.colix);if(k||!(null==a.image&&(0==a.bgcolix||!c.setColix(a.bgcolix)))){a.setPosition(b,c,d,e,f,g);if(null==a.image&&0!=a.bgcolix&&(k&&c.setColix(a.bgcolix),
J.render.TextRenderer.showBox(c,a.colix,Clazz.floatToInt(a.boxX),Clazz.floatToInt(a.boxY),a.z+2,a.zSlab,Clazz.floatToInt(a.boxWidth),Clazz.floatToInt(a.boxHeight),a.fontScale,a.isLabelOrHover),!k))return;if(null==a.image)for(b=0;b<a.lines.length;b++)a.setXYA(h,b),c.drawString(a.lines[b],a.font,Clazz.floatToInt(h[0]),Clazz.floatToInt(h[1]),a.z,a.zSlab,a.bgcolix);else c.drawImage(a.image,Clazz.floatToInt(a.boxX),Clazz.floatToInt(a.boxY),a.z,a.zSlab,a.bgcolix,Clazz.floatToInt(a.boxWidth),Clazz.floatToInt(a.boxHeight));
J.render.TextRenderer.drawPointer(a,c)}}},"J.shape.Text,J.viewer.Viewer,J.api.JmolRendererInterface,~N,~N,~B,~A,~A");c$.drawPointer=$_M(c$,"drawPointer",function(a,b){if(0!=(a.pointer&1)&&b.setColix(0!=(a.pointer&2)&&0!=a.bgcolix?a.bgcolix:a.colix))a.boxX>a.movableX?b.drawLineXYZ(a.movableX,a.movableY,a.zSlab,Clazz.floatToInt(a.boxX),Clazz.floatToInt(a.boxY+a.boxHeight/2),a.zSlab):a.boxX+a.boxWidth<a.movableX&&b.drawLineXYZ(a.movableX,a.movableY,a.zSlab,Clazz.floatToInt(a.boxX+a.boxWidth),Clazz.floatToInt(a.boxY+
a.boxHeight/2),a.zSlab)},"J.shape.Text,J.api.JmolRendererInterface");c$.showBox=$_M(c$,"showBox",($fz=function(a,b,c,d,e,f,g,h,k,l){a.fillRect(c,d,e,f,g,h);a.setColix(b);l&&(2<=k?a.drawRect(c+3,d+3,e-1,f,g-6,h-6):a.drawRect(c+1,d+1,e-1,f,g-2,h-2))},$fz.isPrivate=!0,$fz),"J.api.JmolRendererInterface,~N,~N,~N,~N,~N,~N,~N,~N,~B");c$.renderSimpleLabel=$_M(c$,"renderSimpleLabel",function(a,b,c,d,e,f,g,h,k,l,m,n,p,q,r){var s=b.stringWidth(c)+8;n=m+n+8;var t=Clazz.floatToInt(f[0]),u=Clazz.floatToInt(f[1]);
J.shape.Text.setBoxXY(s,n,k,l,f,r);l=f[0];f=f[1];0!=e&&a.setColix(e)?J.render.TextRenderer.showBox(a,d,Clazz.floatToInt(l),Clazz.floatToInt(f),g,h,Clazz.floatToInt(s),Clazz.floatToInt(n),1,!0):a.setColix(d);a.drawString(c,b,Clazz.floatToInt(l+4),Clazz.floatToInt(f+4+m),g-1,h,e);p&&(a.setColix(q),0<k?a.drawLineXYZ(t,u,h,Clazz.floatToInt(l),Clazz.floatToInt(f+n/2),h):0>k&&a.drawLineXYZ(t,u,h,Clazz.floatToInt(l+s),Clazz.floatToInt(f+n/2),h))},"J.api.JmolRendererInterface,J.util.JmolFont,~S,~N,~N,~A,~N,~N,~N,~N,~N,~N,~B,~N,~B")}),
Clazz.declarePackage("J.render"),Clazz.load(["J.render.ShapeRenderer"],"J.render.HalosRenderer",["J.util.C"],function(){c$=Clazz.decorateAsClass(function(){this.isAntialiased=!1;Clazz.instantialize(this,arguments)},J.render,"HalosRenderer",J.render.ShapeRenderer);Clazz.overrideMethod(c$,"render",function(){var a=this.shape,b=this.viewer.getSelectionHaloEnabled(!0),c=b&&this.viewer.getBoolean(603979920);if(null==a.mads&&null==a.bsHighlight&&!b)return!1;this.isAntialiased=this.g3d.isAntialiased();for(var d=
this.modelSet.atoms,e=b?this.viewer.getSelectionSet(!1):null,f=!1,g=this.modelSet.getAtomCount();0<=--g;){var h=d[g];if(0!=(h.getShapeVisibilityFlags()&1)){var k=this.modelSet.isAtomHidden(g);this.mad=null==a.mads?0:a.mads[g];this.colix=null==a.colixes||g>=a.colixes.length?0:a.colixes[g];if(b&&e.get(g)){if(k&&!c)continue;0==this.mad&&(this.mad=-1);0==this.colix&&(this.colix=a.colixSelection);2==this.colix?this.colix=23:0==this.colix&&(this.colix=J.util.C.getColixInherited(this.colix,h.getColix()))}else if(k)continue;
else this.colix=J.util.C.getColixInherited(this.colix,h.getColix());0!=this.mad&&this.render1(h)&&(f=!0);!k&&(null!=a.bsHighlight&&a.bsHighlight.get(g))&&(this.mad=-2,this.colix=a.colixHighlight,this.render1(h)&&(f=!0))}}return f});$_M(c$,"render1",function(a){var b=-2==this.mad?0:J.util.C.getColixTranslucent3(this.colix,!0,0.5),c=-2!=this.mad;if(!this.g3d.setColix(this.colix)&&(c=!0,this.colix=0,0==b||!this.g3d.setColix(b)))return c;var d=a.screenZ,e=this.mad;if(0>e){if(e=a.screenDiameter,0==e){var f=
a.getADPMinMax(!0);0<f&&(e=this.viewer.scaleToScreen(d,Clazz.doubleToInt(Math.floor(2E3*f))));0==e&&(e=Clazz.floatToInt(this.viewer.scaleToScreen(d,-2==this.mad?250:500)))}}else e=this.viewer.scaleToScreen(d,this.mad);this.isAntialiased&&(e/=2);d=e/2;-2==this.mad&&(d/=2);8>d&&(d=8);20<d&&(d=20);e+=d;this.isAntialiased&&(e*=2);if(1>e)return!1;this.g3d.drawFilledCircle(this.colix,b,Clazz.doubleToInt(Math.floor(e)),a.screenX,a.screenY,a.screenZ);return c},"J.modelset.Atom")}),Clazz.declarePackage("J.render"),
Clazz.load(["J.render.ShapeRenderer","J.util.P3","$.P3i"],"J.render.LabelsRenderer",["J.render.TextRenderer","J.shape.Labels","$.Object2d","$.Text"],function(){c$=Clazz.decorateAsClass(function(){this.fidPrevious=0;this.font3d=null;this.descent=this.ascent=0;this.minZ=null;this.zCutoff=0;this.screen=this.pTemp=this.xy=null;Clazz.instantialize(this,arguments)},J.render,"LabelsRenderer",J.render.ShapeRenderer);Clazz.prepareFields(c$,function(){this.minZ=Clazz.newIntArray(1,0);this.xy=Clazz.newFloatArray(3,
0);this.pTemp=new J.util.P3;this.screen=new J.util.P3i});Clazz.overrideMethod(c$,"render",function(){this.fidPrevious=0;this.zCutoff=this.viewer.getZShadeStart();var a=this.shape,b=a.strings,c=a.bgcolixes;this.isExport&&this.g3d.getBgColixes(c);var c=a.fids,d=a.offsets;if(null==b)return!1;var e=this.modelSet.atoms,f=this.viewer.getColixBackgroundContrast(),g=this.viewer.getBackgroundArgb(),h=this.viewer.getScalePixelsPerAngstrom(!0),k=this.viewer.getBoolean(603979845)?1E4*h:0,l=this.viewer.getImageFontScaling(),
m=-1;this.minZ[0]=2147483647;for(var n=this.g3d.isAntialiased(),p=b.length;0<=--p;){var q=e[p];if(q.isVisible(this.myVisibilityFlag)){var r=b[p];if(!(null==r||0==r.length||null!=a.mads&&0>a.mads[p])){var s=a.getColix2(p,q,!1),t=a.getColix2(p,q,!0);0==t&&this.g3d.getColorArgbOrGray(s)==g&&(s=f);var u=null==c||p>=c.length||0==c[p]?a.zeroFontId:c[p],v=null==d||p>=d.length?0:d[p],w=0!=(v&32),z=0!=(v&16),B=0!=(v&128),x=v>>8,y=J.shape.Labels.getAlignment(v),v=v&3,A=q.screenZ-Clazz.doubleToInt(q.screenDiameter/
2)-3;if(!(0<this.zCutoff&&A>this.zCutoff)){1>A&&(A=1);var C=A;z?(C=q.getGroup(),w=C.getGroupIndex(),w!=m&&(C.getMinZ(e,this.minZ),m=w),C=this.minZ[0]):w&&(C=1);1>C&&(C=1);w=a.getLabel(p);z=!this.isExport||this.viewer.creatingImage?a.getBox(p):Clazz.newFloatArray(5,0);null==z&&a.putBox(p,z=Clazz.newFloatArray(5,0));if(null!=w)null==w.font&&w.setFontFromFid(u),null==w.pymolOffset?w.setXYZs(q.screenX,q.screenY,C,A):(1==w.pymolOffset[0]?this.pTemp.setT(q):this.pTemp.set(0,0,0),this.pTemp.x+=w.pymolOffset[4],
this.pTemp.y+=w.pymolOffset[5],this.pTemp.z+=w.pymolOffset[6],this.viewer.transformPtScr(this.pTemp,this.screen),w.setXYZs(this.screen.x,this.screen.y,this.screen.z,A)),null==w.pymolOffset?(w.setColix(s),w.setBgColix(t)):w.setScalePixelsPerMicron(h);else{var D=1==y||0==y;if(u!=this.fidPrevious||0==this.ascent)this.g3d.setFontFid(u),this.fidPrevious=u,this.font3d=this.g3d.getFont3DCurrent(),D&&(this.ascent=this.font3d.getAscent(),this.descent=this.font3d.getDescent());D&&1==l&&0==k&&0>r.indexOf("|")&&
0>r.indexOf("<su")?(u=0!=(v&1),D=0!=(v&2)&&0!=t?t:s,z[0]=q.screenX,z[1]=q.screenY,J.render.TextRenderer.renderSimpleLabel(this.g3d,this.font3d,r,s,t,z,C,A,J.shape.Object2d.getXOffset(x),J.shape.Object2d.getYOffset(x),this.ascent,this.descent,u,D,B),q=null):(w=J.shape.Text.newLabel(this.g3d.getGData(),this.font3d,r,s,t,y,0,null),w.setXYZs(q.screenX,q.screenY,C,A),a.putLabel(p,w))}null!=q&&(w.setOffset(x),0!=y&&null==w.pymolOffset&&w.setAlignment(y),w.setPointer(v),J.render.TextRenderer.render(w,this.viewer,
this.g3d,k,l,B,z,this.xy));n&&(z[0]/=2,z[1]/=2);z[4]=C}}}}return!1})}),Clazz.declarePackage("J.render"),Clazz.load(["J.render.LabelsRenderer"],"J.render.HoverRenderer",["J.modelset.LabelToken","J.render.TextRenderer"],function(){c$=Clazz.declareType(J.render,"HoverRenderer",J.render.LabelsRenderer);Clazz.overrideMethod(c$,"render",function(){if(this.viewer.isNavigating())return!1;var a=this.shape,b=this.g3d.isAntialiased(),c=a.hoverText;if(0<=a.atomIndex){var d=this.modelSet.atoms[a.atomIndex],a=
null!=a.specialLabel?a.specialLabel:null!=a.atomFormats&&null!=a.atomFormats[a.atomIndex]?J.modelset.LabelToken.formatLabel(this.viewer,d,a.atomFormats[a.atomIndex]):null!=a.labelFormat?J.modelset.LabelToken.formatLabel(this.viewer,d,this.fixLabel(d,a.labelFormat)):null;if(null==a)return!1;c.setText(a);c.setXYZs(d.screenX,d.screenY,1,-2147483648)}else if(null!=a.text)c.setText(a.text),c.setXYZs(a.xy.x,a.xy.y,1,-2147483648);else return!0;J.render.TextRenderer.render(c,this.viewer,this.g3d,0,b?2:1,
!1,null,this.xy);return!0});$_M(c$,"fixLabel",function(a,b){return null==b?null:this.viewer.isJmolDataFrameForModel(a.getModelIndex())&&b.equals("%U")?"%W":b},"J.modelset.Atom,~S")}),Clazz.declarePackage("J.render"),Clazz.load(["J.render.ShapeRenderer","J.util.BS","$.P3","$.P3i"],"J.render.MeshRenderer",["J.util.BSUtil","$.C"],function(){c$=Clazz.decorateAsClass(function(){this.transformedVectors=this.screens=this.normixes=this.vertices=this.mesh=null;this.width=this.diameter=this.scalePixelsPerMicron=
this.imageFontScaling=this.vertexCount=0;this.haveBsSlabGhost=this.haveBsSlabDisplay=this.haveBsDisplay=this.antialias=this.frontOnly=this.isTranslucent=!1;this.pt3i=this.pt2i=this.pt1i=this.pt2f=this.pt1f=this.latticeOffset=this.thePlane=null;this.exportPass=0;this.volumeRender=this.doRender=this.needTranslucent=!1;this.bsPolygons=this.bsSlab=null;Clazz.instantialize(this,arguments)},J.render,"MeshRenderer",J.render.ShapeRenderer);Clazz.prepareFields(c$,function(){this.latticeOffset=new J.util.P3;
this.pt1f=new J.util.P3;this.pt2f=new J.util.P3;this.pt1i=new J.util.P3i;this.pt2i=new J.util.P3i;this.pt3i=new J.util.P3i;this.bsPolygons=new J.util.BS});Clazz.overrideMethod(c$,"render",function(){this.needTranslucent=!1;this.antialias=this.g3d.isAntialiased();for(var a=this.shape,b=a.meshCount;0<=--b;)this.renderMesh(a.meshes[b]);return this.needTranslucent});$_M(c$,"renderMesh",function(a){return this.renderMesh2(a)},"J.shape.Mesh");$_M(c$,"renderMesh2",function(a){this.mesh=a;if(!this.setVariables())return!1;
if(!this.doRender)return null!=a.title;this.latticeOffset.set(0,0,0);for(var b=this.vertexCount;0<=--b;)null!=this.vertices[b]&&this.viewer.transformPtScr(this.vertices[b],this.screens[b]);if(null==a.lattice||0>a.modelIndex)this.render2(this.isExport);else{var c=a.unitCell;null==c&&(c=this.viewer.getModelUnitCell(a.modelIndex));null==c&&(c=a.getUnitCell());if(null!=c){var d=new J.util.P3,e=new J.util.P3i;a=J.util.P3i.new3(Clazz.floatToInt(a.lattice.x),Clazz.floatToInt(a.lattice.y),Clazz.floatToInt(a.lattice.z));
c.setMinMaxLatticeParameters(e,a);for(var f=e.x;f<a.x;f++)for(var g=e.y;g<a.y;g++)for(var h=e.z;h<a.z;h++){this.latticeOffset.set(f,g,h);c.toCartesian(this.latticeOffset,!1);for(b=this.vertexCount;0<=--b;)d.setT(this.vertices[b]),d.add(this.latticeOffset),this.viewer.transformPtScr(d,this.screens[b]);this.render2(this.isExport)}}}null!=this.screens&&this.viewer.freeTempScreens(this.screens);return!0},"J.shape.Mesh");$_M(c$,"setVariables",($fz=function(){if(0==this.mesh.visibilityFlags)return!1;null!=
this.mesh.bsSlabGhost&&this.g3d.setColix(this.mesh.slabColix);if((this.isTranslucent=(this.haveBsSlabGhost=null!=this.mesh.bsSlabGhost&&(this.isExport?2==this.exportPass:this.g3d.isPass2()))||J.util.C.isColixTranslucent(this.mesh.colix))||this.volumeRender||null!=this.mesh.bsSlabGhost)this.needTranslucent=!0;this.doRender=this.setColix(this.mesh.colix)||this.mesh.showContourLines;if(!this.doRender||this.haveBsSlabGhost&&!(this.doRender=this.g3d.setColix(this.mesh.slabColix)))return this.vertices=
this.mesh.vertices,!0;this.vertices=0==this.mesh.scale3d&&null==this.mesh.mat4?this.mesh.vertices:this.mesh.getOffsetVertices(this.thePlane);if(null==this.mesh.lineData){if(0==(this.vertexCount=this.mesh.vertexCount))return!1;this.normixes=this.mesh.normixes;if(null==this.normixes||null==this.vertices)return!1;this.haveBsDisplay=null!=this.mesh.bsDisplay;this.haveBsSlabDisplay=this.haveBsSlabGhost||null!=this.mesh.bsSlabDisplay;this.bsSlab=this.haveBsSlabGhost?this.mesh.bsSlabGhost:this.haveBsSlabDisplay?
this.mesh.bsSlabDisplay:null;this.frontOnly=!this.viewer.getSlabEnabled()&&this.mesh.frontOnly&&!this.mesh.isTwoSided&&!this.haveBsSlabDisplay;this.screens=this.viewer.allocTempScreens(this.vertexCount);this.frontOnly&&(this.transformedVectors=this.g3d.getTransformedVertexVectors());null==this.transformedVectors&&(this.frontOnly=!1)}return!0},$fz.isPrivate=!0,$fz));$_M(c$,"setColix",function(a){if(this.haveBsSlabGhost)return!0;this.volumeRender&&!this.isTranslucent&&(a=J.util.C.getColixTranslucent3(a,
!0,0.8));this.colix=a;J.util.C.isColixLastAvailable(a)&&this.g3d.setColor(this.mesh.color);return this.g3d.setColix(a)},"~N");$_M(c$,"isPolygonDisplayable",function(){return!0},"~N");$_M(c$,"render2",function(a){this.render2b(a)},"~B");$_M(c$,"render2b",function(a){if(this.g3d.setColix(this.haveBsSlabGhost?this.mesh.slabColix:this.colix))(this.mesh.showPoints||0==this.mesh.polygonCount)&&this.renderPoints(),(this.haveBsSlabGhost?1073742018==this.mesh.slabMeshType:this.mesh.drawTriangles)&&this.renderTriangles(!1,
this.mesh.showTriangles,!1),(this.haveBsSlabGhost?1073741938==this.mesh.slabMeshType:this.mesh.fillTriangles)&&this.renderTriangles(!0,this.mesh.showTriangles,a)},"~B");$_M(c$,"renderPoints",function(){if(this.mesh.isTriangleSet){var a=this.mesh.polygonIndexes,b=J.util.BSUtil.newBitSet(this.mesh.vertexCount);this.haveBsDisplay&&(b.setBits(0,this.mesh.vertexCount),b.andNot(this.mesh.bsDisplay));for(var c=this.mesh.polygonCount;0<=--c;)if(this.isPolygonDisplayable(c)){var d=a[c];if(!(this.frontOnly&&
0>this.transformedVectors[this.normixes[c]].z))for(var e=d.length-1;0<=--e;){var f=d[e];b.get(f)||(b.set(f),this.g3d.fillSphereI(4,this.screens[f]))}}}else for(c=this.vertexCount;0<=--c;)(!this.frontOnly||0<=this.transformedVectors[this.normixes[c]].z)&&this.g3d.fillSphereI(4,this.screens[c])});$_M(c$,"renderTriangles",function(a,b,c){var d=this.mesh.polygonIndexes;this.colix=this.haveBsSlabGhost?this.mesh.slabColix:this.mesh.colix;this.g3d.setColix(this.colix);c&&(this.frontOnly&&a&&(this.frontOnly=
!1),this.bsPolygons.clearAll());for(var e=this.mesh.polygonCount;0<=--e;)if(this.isPolygonDisplayable(e)){var f=d[e],g=f[0],h=f[1],k=f[2];if(!this.haveBsDisplay||this.mesh.bsDisplay.get(g)&&this.mesh.bsDisplay.get(h)&&this.mesh.bsDisplay.get(k))if(h==k)this.drawLine(g,h,a,this.vertices[g],this.vertices[h],this.screens[g],this.screens[h]);else{var l;if(this.mesh.isTriangleSet)l=this.normixes[e],this.g3d.isDirectedTowardsCamera(l)&&(a?this.isExport?this.g3d.fillTriangle3CN(this.screens[k],this.colix,
l,this.screens[h],this.colix,l,this.screens[g],this.colix,l):b?this.g3d.fillTriangle(this.screens[g],this.colix,l,this.screens[h],this.colix,l,this.screens[k],this.colix,l,0.1):this.g3d.fillTriangle3CN(this.screens[g],this.colix,l,this.screens[h],this.colix,l,this.screens[k],this.colix,l):(l=f[3],b&&(l=7),1==(l&1)&&this.drawLine(g,h,!0,this.vertices[g],this.vertices[h],this.screens[g],this.screens[h]),2==(l&2)&&this.drawLine(h,k,!0,this.vertices[h],this.vertices[k],this.screens[h],this.screens[k]),
4==(l&4)&&this.drawLine(g,k,!0,this.vertices[g],this.vertices[k],this.screens[g],this.screens[k])));else{var m=this.normixes[g],n=this.normixes[h],p=this.normixes[k];l=this.checkNormals(m,n,p);if(!(a&&7!=l))switch(f.length){case 3:if(a){if(c){this.bsPolygons.set(e);continue}if(b){this.g3d.fillTriangle(this.screens[g],this.colix,m,this.screens[h],this.colix,n,this.screens[k],this.colix,p,0.1);continue}this.g3d.fillTriangle3CN(this.screens[g],this.colix,m,this.screens[h],this.colix,n,this.screens[k],
this.colix,p);continue}this.drawTriangle(this.screens[g],this.colix,this.screens[h],this.colix,this.screens[k],this.colix,l,1);continue;case 4:var f=f[3],q=this.normixes[f];if(this.frontOnly&&(7!=l||0>this.transformedVectors[q].z))continue;if(a){if(c){this.bsPolygons.set(e);continue}this.g3d.fillQuadrilateral3i(this.screens[g],this.colix,m,this.screens[h],this.colix,n,this.screens[k],this.colix,p,this.screens[f],this.colix,q);continue}this.g3d.drawQuadrilateral(this.colix,this.screens[g],this.screens[h],
this.screens[k],this.screens[f])}}}}c&&this.exportSurface(this.colix)},"~B,~B,~B");$_M(c$,"drawTriangle",function(a,b,c,d,e,f,g,h){this.antialias||1!=h?(this.antialias&&(h<<=1),1==(g&1)&&this.g3d.fillCylinderXYZ(b,d,1,h,a.x,a.y,a.z,c.x,c.y,c.z),2==(g&2)&&this.g3d.fillCylinderXYZ(d,f,1,h,c.x,c.y,c.z,e.x,e.y,e.z),4==(g&4)&&this.g3d.fillCylinderXYZ(b,f,1,h,a.x,a.y,a.z,e.x,e.y,e.z)):this.g3d.drawTriangle3C(a,b,c,d,e,f,g)},"J.util.P3i,~N,J.util.P3i,~N,J.util.P3i,~N,~N,~N");$_M(c$,"checkNormals",function(a,
b,c){var d=7;this.frontOnly&&(0>this.transformedVectors[a].z&&(d^=1),0>this.transformedVectors[b].z&&(d^=2),0>this.transformedVectors[c].z&&(d^=4));return d},"~N,~N,~N");$_M(c$,"drawLine",function(a,b,c,d,e,f,g){c=a!=b&&!c?0:0>this.width||-0==this.width||a!=b&&this.isTranslucent?2:3;0==this.width?(0==this.diameter&&(this.diameter=0<this.mesh.diameter?this.mesh.diameter:a==b?7:3),1==this.exportType&&(this.pt1f.setT(d),this.pt1f.add(e),this.pt1f.scale(0.5),this.viewer.transformPtScr(this.pt1f,this.pt1i),
this.diameter=Clazz.doubleToInt(Math.floor(1E3*this.viewer.unscaleToScreen(this.pt1i.z,this.diameter)))),a==b?this.g3d.fillSphereI(this.diameter,f):this.g3d.fillCylinder(c,this.diameter,f,g)):(this.pt1f.setT(d),this.pt1f.add(e),this.pt1f.scale(0.5),this.viewer.transformPtScr(this.pt1f,this.pt1i),a=Clazz.doubleToInt(Math.floor(1E3*Math.abs(this.width))),this.diameter=Clazz.floatToInt(1==this.exportType?a:this.viewer.scaleToScreen(this.pt1i.z,a)),0==this.diameter&&(this.diameter=1),this.viewer.transformPt3f(d,
this.pt1f),this.viewer.transformPt3f(e,this.pt2f),this.g3d.fillCylinderBits(c,this.diameter,this.pt1f,this.pt2f))},"~N,~N,~B,J.util.P3,J.util.P3,J.util.P3i,J.util.P3i");$_M(c$,"exportSurface",function(a){this.mesh.normals=this.mesh.getNormals(this.vertices,null);this.mesh.bsPolygons=this.bsPolygons;this.mesh.offset=this.latticeOffset;this.g3d.drawSurface(this.mesh,a);this.mesh.normals=null;this.mesh.bsPolygons=null},"~N")}),Clazz.declarePackage("J.exportjs"),Clazz.load(["J.api.JmolRendererInterface",
"J.util.P3","$.P3i"],"J.exportjs.Export3D",["J.g3d.HermiteRenderer"],function(){c$=Clazz.decorateAsClass(function(){this.exporter=null;this.privateKey=0;this.g3d=null;this.colix=0;this.hermite3d=null;this.slab=this.height=this.width=0;this.ptBi=this.ptAi=this.ptD=this.ptC=this.ptB=this.ptA=this.exportName=null;Clazz.instantialize(this,arguments)},J.exportjs,"Export3D",null,J.api.JmolRendererInterface);Clazz.prepareFields(c$,function(){this.ptA=new J.util.P3;this.ptB=new J.util.P3;this.ptC=new J.util.P3;
this.ptD=new J.util.P3;this.ptAi=new J.util.P3i;this.ptBi=new J.util.P3i});Clazz.makeConstructor(c$,function(){this.hermite3d=new J.g3d.HermiteRenderer(this)});Clazz.overrideMethod(c$,"getExportType",function(){return this.exporter.exportType});Clazz.overrideMethod(c$,"getExportName",function(){return this.exportName});Clazz.overrideMethod(c$,"initializeExporter",function(a,b,c,d,e){this.exportName=a;try{this.exporter=Class.forName("J.exportjs."+a+"Exporter").newInstance()}catch(f){if(Clazz.exceptionOf(f,
Exception))return null;throw f;}this.g3d=d;this.exporter.setRenderer(this);this.g3d.setNewWindowParametersForExport();this.slab=this.g3d.getSlab();this.width=this.g3d.getRenderWidth();this.height=this.g3d.getRenderHeight();this.privateKey=c;return this.exporter.initializeOutput(b,c,this.g3d,e)?this.exporter:null},"~S,J.viewer.Viewer,~N,J.util.GData,~O");Clazz.overrideMethod(c$,"initializeOutput",function(a,b,c,d,e){return this.exporter.initializeOutput(b,c,this.g3d,e)},"~S,J.viewer.Viewer,~N,J.util.GData,~O");
Clazz.overrideMethod(c$,"finalizeOutput",function(){return this.exporter.finalizeOutput()});Clazz.overrideMethod(c$,"setSlab",function(a){this.slab=a;this.g3d.setSlab(a)},"~N");Clazz.overrideMethod(c$,"setDepth",function(a){this.g3d.setDepth(a)},"~N");Clazz.overrideMethod(c$,"renderBackground",function(a){2==this.exporter.exportType&&this.g3d.renderBackground(a)},"J.api.JmolRendererInterface");Clazz.overrideMethod(c$,"drawAtom",function(a){this.exporter.drawAtom(a)},"J.modelset.Atom");Clazz.overrideMethod(c$,
"drawFilledCircle",function(a,b,c,d,e,f){this.isClippedZ(f)||this.exporter.drawFilledCircle(a,b,c,d,e,f)},"~N,~N,~N,~N,~N,~N");$_M(c$,"drawCircle",function(a,b,c,d,e,f){this.isClippedZ(e)||this.exporter.drawCircle(c,d,e,b,a,f)},"~N,~N,~N,~N,~N,~B");Clazz.overrideMethod(c$,"fillSphereXYZ",function(a,b,c,d){this.ptA.set(b,c,d);this.fillSphere(a,this.ptA)},"~N,~N,~N,~N");Clazz.overrideMethod(c$,"fillSphereI",function(a,b){this.ptA.set(b.x,b.y,b.z);this.fillSphere(a,this.ptA)},"~N,J.util.P3i");Clazz.overrideMethod(c$,
"fillSphere",function(a,b){0!=a&&this.exporter.fillSphere(this.colix,a,b)},"~N,J.util.P3");Clazz.overrideMethod(c$,"drawRect",function(a,b,c,d,e,f){if(!(0!=d&&this.isClippedZ(d))){d=e-1;f-=1;e=a+d;var g=b+f;0<=b&&b<this.height&&this.drawHLine(a,b,c,d);0<=g&&g<this.height&&this.drawHLine(a,g,c,d);0<=a&&a<this.width&&this.drawVLine(a,b,c,f);0<=e&&e<this.width&&this.drawVLine(e,b,c,f)}},"~N,~N,~N,~N,~N,~N");$_M(c$,"drawHLine",($fz=function(){},$fz.isPrivate=!0,$fz),"~N,~N,~N,~N");$_M(c$,"drawVLine",
($fz=function(){},$fz.isPrivate=!0,$fz),"~N,~N,~N,~N");Clazz.overrideMethod(c$,"fillRect",function(a,b,c,d,e,f){this.isClippedZ(d)||(this.ptA.set(a,b,c),this.ptB.set(a+e,b,c),this.ptC.set(a+e,b+f,c),this.ptD.set(a,b+f,c),this.fillQuadrilateral(this.ptA,this.ptB,this.ptC,this.ptD))},"~N,~N,~N,~N,~N,~N");Clazz.overrideMethod(c$,"drawString",function(a,b,c,d,e,f,g){null!=a&&(this.isClippedZ(f)||this.drawStringNoSlab(a,b,c,d,e,g))},"~S,J.util.JmolFont,~N,~N,~N,~N,~N");Clazz.overrideMethod(c$,"drawStringNoSlab",
function(a,b,c,d,e){null!=a&&(e=Math.max(this.slab,e),null==b?b=this.g3d.getFont3DCurrent():this.g3d.setFont(b),this.exporter.plotText(c,d,e,this.colix,a,b))},"~S,J.util.JmolFont,~N,~N,~N,~N");Clazz.overrideMethod(c$,"drawImage",function(a,b,c,d,e,f,g,h){if(!(null==a||0==g||0==h)&&!this.isClippedZ(e))d=Math.max(this.slab,d),this.exporter.plotImage(b,c,d,a,f,g,h)},"~O,~N,~N,~N,~N,~N,~N,~N");Clazz.overrideMethod(c$,"drawPixel",function(a,b,c){this.plotPixelClipped(a,b,c)},"~N,~N,~N");$_M(c$,"plotPixelClipped",
function(a,b,c){this.isClipped(a,b,c)||this.exporter.drawPixel(this.colix,a,b,c,1)},"~N,~N,~N");Clazz.overrideMethod(c$,"plotImagePixel",function(){},"~N,~N,~N,~N,~N,~N");Clazz.overrideMethod(c$,"plotPixelClippedP3i",function(a){this.isClipped(a.x,a.y,a.z)||this.exporter.drawPixel(this.colix,a.x,a.y,a.z,1)},"J.util.P3i");Clazz.overrideMethod(c$,"drawPoints",function(a,b,c){for(a*=3;0<a;){var d=b[--a],e=b[--a],f=b[--a];this.isClipped(f,e,d)||this.exporter.drawPixel(this.colix,f,e,d,c)}},"~N,~A,~N");
Clazz.overrideMethod(c$,"drawDashedLine",function(a,b,c,d){this.drawLineAB(c,d)},"~N,~N,J.util.P3i,J.util.P3i");Clazz.overrideMethod(c$,"drawDottedLine",function(a,b){this.drawLineAB(a,b)},"J.util.P3i,J.util.P3i");Clazz.overrideMethod(c$,"drawLineXYZ",function(a,b,c,d,e,f){this.ptAi.set(a,b,c);this.ptBi.set(d,e,f);this.drawLineAB(this.ptAi,this.ptBi)},"~N,~N,~N,~N,~N,~N");Clazz.overrideMethod(c$,"drawLine",function(a,b,c,d,e,f,g,h){this.fillCylinderXYZ(a,b,2,this.exporter.lineWidthMad,c,d,e,f,g,h)},
"~N,~N,~N,~N,~N,~N,~N,~N");Clazz.overrideMethod(c$,"drawLineAB",function(a,b){this.ptA.set(a.x,a.y,a.z);this.ptB.set(b.x,b.y,b.z);this.exporter.fillCylinderScreenMad(this.colix,2,this.exporter.lineWidthMad,this.ptA,this.ptB)},"J.util.P3i,J.util.P3i");Clazz.overrideMethod(c$,"drawBond",function(a,b,c,d,e,f,g){1==f&&(f=this.exporter.lineWidthMad);this.exporter.drawCylinder(a,b,c,d,e,f,g)},"J.util.P3,J.util.P3,~N,~N,~N,~N,~N");Clazz.overrideMethod(c$,"fillCylinderXYZ",function(a,b,c,d,e,f,g,h,k,l){this.ptA.set(e,
f,g);this.ptB.set(h,k,l);this.exporter.drawCylinder(this.ptA,this.ptB,a,b,c,d,1)},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");Clazz.overrideMethod(c$,"fillCylinderScreen",function(a,b,c,d,e,f,g,h){this.ptA.set(c,d,e);this.ptB.set(f,g,h);this.exporter.fillCylinderScreen(this.colix,a,b,this.ptA,this.ptB,null,null,0)},"~N,~N,~N,~N,~N,~N,~N,~N");Clazz.overrideMethod(c$,"fillCylinderScreen3I",function(a,b,c,d,e,f,g){0>=b||(this.ptA.set(c.x,c.y,c.z),this.ptB.set(d.x,d.y,d.z),this.exporter.fillCylinderScreen(this.colix,
a,b,this.ptA,this.ptB,e,f,g))},"~N,~N,J.util.P3i,J.util.P3i,J.util.P3,J.util.P3,~N");Clazz.overrideMethod(c$,"fillCylinder",function(a,b,c,d){0>=b||(this.ptA.set(c.x,c.y,c.z),this.ptB.set(d.x,d.y,d.z),this.exporter.fillCylinderScreenMad(this.colix,a,b,this.ptA,this.ptB))},"~N,~N,J.util.P3i,J.util.P3i");Clazz.overrideMethod(c$,"fillCylinderBits",function(a,b,c,d){0>=b||this.exporter.fillCylinderScreenMad(this.colix,a,b,c,d)},"~N,~N,J.util.P3,J.util.P3");Clazz.overrideMethod(c$,"fillConeScreen",function(a,
b,c,d,e){this.ptA.set(c.x,c.y,c.z);this.ptB.set(d.x,d.y,d.z);this.exporter.fillConeScreen(this.colix,a,b,this.ptA,this.ptB,e)},"~N,~N,J.util.P3i,J.util.P3i,~B");Clazz.overrideMethod(c$,"fillConeSceen3f",function(a,b,c,d){this.exporter.fillConeScreen(this.colix,a,b,c,d,!1)},"~N,~N,J.util.P3,J.util.P3");Clazz.overrideMethod(c$,"drawHermite4",function(a,b,c,d,e){this.hermite3d.renderHermiteRope(!1,a,0,0,0,b,c,d,e)},"~N,J.util.P3i,J.util.P3i,J.util.P3i,J.util.P3i");Clazz.overrideMethod(c$,"fillHermite",
function(a,b,c,d,e,f,g,h){this.hermite3d.renderHermiteRope(!0,a,b,c,d,e,f,g,h)},"~N,~N,~N,~N,J.util.P3i,J.util.P3i,J.util.P3i,J.util.P3i");Clazz.overrideMethod(c$,"drawHermite7",function(a,b,c,d,e,f,g,h,k,l,m,n){this.hermite3d.renderHermiteRibbon(a,b,c,d,e,f,g,h,k,l,m,n,0)},"~B,~B,~N,J.util.P3i,J.util.P3i,J.util.P3i,J.util.P3i,J.util.P3i,J.util.P3i,J.util.P3i,J.util.P3i,~N,~N");Clazz.overrideMethod(c$,"drawTriangle3C",function(a,b,c,d,e,f,g){1==(g&1)&&this.drawLine(b,d,a.x,a.y,a.z,c.x,c.y,c.z);2==
(g&2)&&this.drawLine(d,f,c.x,c.y,c.z,e.x,e.y,e.z);4==(g&4)&&this.drawLine(b,f,a.x,a.y,a.z,e.x,e.y,e.z)},"J.util.P3i,~N,J.util.P3i,~N,J.util.P3i,~N,~N");Clazz.overrideMethod(c$,"drawTriangle3I",function(a,b,c,d){1==(d&1)&&this.drawLine(this.colix,this.colix,a.x,a.y,a.z,b.x,b.y,b.z);2==(d&2)&&this.drawLine(this.colix,this.colix,b.x,b.y,b.z,c.x,c.y,c.z);4==(d&4)&&this.drawLine(this.colix,this.colix,a.x,a.y,a.z,c.x,c.y,c.z)},"J.util.P3i,J.util.P3i,J.util.P3i,~N");Clazz.overrideMethod(c$,"fillTriangle3CN",
function(a,b,c,d,e,f,g,h){b!=e||e!=h||(this.ptA.set(a.x,a.y,a.z),this.ptB.set(d.x,d.y,d.z),this.ptC.set(g.x,g.y,g.z),this.exporter.fillTriangle(b,this.ptA,this.ptB,this.ptC,!1,!1))},"J.util.P3i,~N,~N,J.util.P3i,~N,~N,J.util.P3i,~N,~N");Clazz.overrideMethod(c$,"fillTriangleTwoSided",function(a,b,c,d,e,f,g,h,k,l){this.ptA.set(b,c,d);this.ptB.set(e,f,g);this.ptC.set(h,k,l);this.exporter.fillTriangle(this.colix,this.ptA,this.ptB,this.ptC,!0,!1)},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");Clazz.overrideMethod(c$,
"fillTriangle3f",function(a,b,c){this.exporter.fillTriangle(this.colix,a,b,c,!1,!1)},"J.util.P3,J.util.P3,J.util.P3,~B");Clazz.overrideMethod(c$,"fillTriangle3i",function(a,b,c,d,e,f){this.exporter.fillTriangle(this.colix,d,e,f,!0,!0)},"J.util.P3i,J.util.P3i,J.util.P3i,J.util.P3,J.util.P3,J.util.P3");Clazz.overrideMethod(c$,"fillTriangle",function(a,b,c,d,e,f,g,h,k){this.fillTriangle3CN(a,b,c,d,e,f,g,h,k)},"J.util.P3i,~N,~N,J.util.P3i,~N,~N,J.util.P3i,~N,~N,~N");Clazz.overrideMethod(c$,"drawQuadrilateral",
function(a,b,c,d,e){this.setColix(a);this.drawLineAB(b,c);this.drawLineAB(c,d);this.drawLineAB(d,e);this.drawLineAB(e,b)},"~N,J.util.P3i,J.util.P3i,J.util.P3i,J.util.P3i");Clazz.overrideMethod(c$,"fillQuadrilateral",function(a,b,c,d){this.exporter.fillTriangle(this.colix,a,b,c,!1,!1);this.exporter.fillTriangle(this.colix,a,c,d,!1,!1)},"J.util.P3,J.util.P3,J.util.P3,J.util.P3");Clazz.overrideMethod(c$,"fillQuadrilateral3i",function(a,b,c,d,e,f,g,h,k,l,m,n){this.fillTriangle3CN(a,b,c,d,e,f,g,h,k);this.fillTriangle3CN(a,
b,c,g,h,k,l,m,n)},"J.util.P3i,~N,~N,J.util.P3i,~N,~N,J.util.P3i,~N,~N,J.util.P3i,~N,~N");Clazz.overrideMethod(c$,"drawSurface",function(a,b){this.exporter.drawSurface(a,b)},"J.util.MeshSurface,~N");Clazz.overrideMethod(c$,"getBgColixes",function(a){return 1==this.exporter.exportType?null:a},"~A");Clazz.overrideMethod(c$,"fillEllipsoid",function(a,b,c,d,e,f,g,h,k,l,m){this.exporter.fillEllipsoid(a,b,this.colix,c,d,e,f,g,h,k,m)},"J.util.P3,~A,~N,~N,~N,~N,J.util.Matrix3f,~A,J.util.Matrix4f,~N,~A");Clazz.overrideMethod(c$,
"drawEllipse",function(a,b,c,d){return this.exporter.drawEllipse(a,b,c,this.colix,d)},"J.util.P3,J.util.P3,J.util.P3,~B,~B");Clazz.overrideMethod(c$,"getGData",function(){return this.g3d});Clazz.overrideMethod(c$,"isAntialiased",function(){return!1});Clazz.overrideMethod(c$,"checkTranslucent",function(){return!0},"~B");Clazz.overrideMethod(c$,"haveTranslucentObjects",function(){return!0});Clazz.overrideMethod(c$,"setColor",function(a){this.g3d.setColor(a)},"~N");Clazz.overrideMethod(c$,"getRenderWidth",
function(){return this.g3d.getRenderWidth()});Clazz.overrideMethod(c$,"getRenderHeight",function(){return this.g3d.getRenderHeight()});Clazz.overrideMethod(c$,"isPass2",function(){return this.g3d.isPass2()});Clazz.overrideMethod(c$,"getSlab",function(){return this.g3d.getSlab()});Clazz.overrideMethod(c$,"getDepth",function(){return this.g3d.getDepth()});Clazz.overrideMethod(c$,"setColix",function(a){this.colix=a;this.g3d.setColix(a);return!0},"~N");Clazz.overrideMethod(c$,"setFontFid",function(a){this.g3d.setFontFid(a)},
"~N");Clazz.overrideMethod(c$,"getFont3DCurrent",function(){return this.g3d.getFont3DCurrent()});Clazz.overrideMethod(c$,"isInDisplayRange",function(a,b){return 1==this.exporter.exportType?!0:this.g3d.isInDisplayRange(a,b)},"~N,~N");Clazz.overrideMethod(c$,"isClippedZ",function(a){return this.g3d.isClippedZ(a)},"~N");$_M(c$,"clipCode",function(a,b,c){return 1==this.exporter.exportType?this.g3d.clipCode(c):this.g3d.clipCode3(a,b,c)},"~N,~N,~N");Clazz.overrideMethod(c$,"isClippedXY",function(a,b,c){return 1==
this.exporter.exportType?!1:this.g3d.isClippedXY(a,b,c)},"~N,~N,~N");$_M(c$,"isClipped",function(a,b,c){return this.g3d.isClippedZ(c)||this.isClipped(a,b)},"~N,~N,~N");$_M(c$,"isClipped",function(a,b){return 1==this.exporter.exportType?!1:this.g3d.isClipped(a,b)},"~N,~N");Clazz.overrideMethod(c$,"getColorArgbOrGray",function(a){return this.g3d.getColorArgbOrGray(a)},"~N");Clazz.overrideMethod(c$,"setNoisySurfaceShade",function(a,b,c){this.g3d.setNoisySurfaceShade(a,b,c)},"J.util.P3i,J.util.P3i,J.util.P3i");
Clazz.overrideMethod(c$,"getFontFidFS",function(a,b){return this.g3d.getFontFidFS(a,b)},"~S,~N");Clazz.overrideMethod(c$,"isDirectedTowardsCamera",function(a){return this.g3d.isDirectedTowardsCamera(a)},"~N");Clazz.overrideMethod(c$,"getTransformedVertexVectors",function(){return this.g3d.getTransformedVertexVectors()});Clazz.overrideMethod(c$,"getFont3DScaled",function(a,b){return this.g3d.getFont3DScaled(a,b)},"J.util.JmolFont,~N");Clazz.overrideMethod(c$,"getFontFid",function(a){return this.g3d.getFontFid(a)},
"~N");Clazz.overrideMethod(c$,"setTranslucentCoverOnly",function(){},"~B");$_M(c$,"getPrivateKey",function(){return this.privateKey});Clazz.overrideMethod(c$,"volumeRender4",function(a,b,c,d){this.fillSphereXYZ(a,b,c,d)},"~N,~N,~N,~N");Clazz.overrideMethod(c$,"currentlyRendering",function(){return!1});Clazz.overrideMethod(c$,"renderCrossHairs",function(){},"~A,~N,~N,J.util.P3,~N");Clazz.overrideMethod(c$,"volumeRender",function(){},"~B");Clazz.overrideMethod(c$,"renderAllStrings",function(){},"~O")}),
Clazz.declarePackage("J.exportjs"),Clazz.load(["J.util.AxisAngle4f","$.P3","$.V3"],"J.exportjs.Exporter","java.io.BufferedWriter $.File $.FileOutputStream $.OutputStreamWriter java.lang.Float J.util.TextFormat".split(" "),function(){c$=Clazz.decorateAsClass(function(){this.viewer=null;this.privateKey=0;this.commandLineOptions=this.fileName=this.os=this.bw=this.$output=this.jmolRenderer=null;this.isToFile=!1;this.g3d=null;this.depthZ=this.slabZ=this.screenHeight=this.screenWidth=this.backgroundColix=
0;this.cameraPosition=this.referenceCenter=this.fixedRotationCenter=null;this.exportType=this.scalePixelsPerAngstrom=this.aperatureAngle=this.cameraDistance=0;this.appletName=this.tempA=this.tempV3=this.tempV2=this.tempV1=this.center=this.tempP3=this.tempP2=this.tempP1=null;this.lineWidthMad=this.nBytes=0;Clazz.instantialize(this,arguments)},J.exportjs,"Exporter");Clazz.prepareFields(c$,function(){this.tempP1=new J.util.P3;this.tempP2=new J.util.P3;this.tempP3=new J.util.P3;this.center=new J.util.P3;
this.tempV1=new J.util.V3;this.tempV2=new J.util.V3;this.tempV3=new J.util.V3;this.tempA=new J.util.AxisAngle4f});Clazz.makeConstructor(c$,function(){});$_M(c$,"setRenderer",function(a){this.jmolRenderer=a},"J.api.JmolRendererInterface");$_M(c$,"initializeOutput",function(a,b,c,d){this.viewer=a;this.appletName=J.util.TextFormat.split(a.getHtmlName(),"_")[0];this.g3d=c;this.privateKey=b;this.backgroundColix=a.getObjectColix(0);this.center.setT(a.getRotationCenter());if(0>=this.screenWidth||0>=this.screenHeight)this.screenWidth=
a.getScreenWidth(),this.screenHeight=a.getScreenHeight();this.slabZ=c.getSlab();this.depthZ=c.getDepth();a=a.getCameraFactors();this.referenceCenter=a[0];this.cameraPosition=a[1];this.fixedRotationCenter=a[2];this.cameraDistance=a[3].x;this.aperatureAngle=a[3].y;this.scalePixelsPerAngstrom=a[3].z;if(this.isToFile=Clazz.instanceOf(d,String)){this.fileName=d;d=this.fileName.indexOf(":::");0<d&&(this.commandLineOptions=this.fileName.substring(d+3),this.fileName=this.fileName.substring(0,d));try{var e=
new java.io.File(this.fileName);System.out.println("__Exporter writing to "+e.getAbsolutePath());this.os=new java.io.FileOutputStream(this.fileName);this.bw=new java.io.BufferedWriter(new java.io.OutputStreamWriter(this.os))}catch(f){if(Clazz.exceptionOf(f,java.io.FileNotFoundException))return!1;throw f;}}else this.$output=d;this.outputHeader();return!0},"J.viewer.Viewer,~N,J.util.GData,~O");$_M(c$,"output",function(a){this.nBytes+=a.length;try{null==this.bw?this.$output.append(a):this.bw.write(a)}catch(b){if(!Clazz.exceptionOf(b,
java.io.IOException))throw b;}},"~S");c$.setTempVertex=$_M(c$,"setTempVertex",function(a,b,c){c.setT(a);null!=b&&c.add(b)},"J.util.P3,J.util.P3,J.util.P3");$_M(c$,"outputVertices",function(a,b,c){for(var d=0;d<b;d++)Float.isNaN(a[d].x)||(this.outputVertex(a[d],c),this.output("\n"))},"~A,~N,J.util.P3");$_M(c$,"outputVertex",function(a,b){J.exportjs.Exporter.setTempVertex(a,b,this.tempP1);this.output(this.tempP1)},"J.util.P3,J.util.P3");$_M(c$,"outputFooter",function(){});$_M(c$,"finalizeOutput",function(){this.outputFooter();
if(!this.isToFile)return null==this.$output?"":this.$output.toString();try{this.bw.flush(),this.bw.close(),this.os=null}catch(a){if(Clazz.exceptionOf(a,java.io.IOException))return System.out.println(a.toString()),"ERROR EXPORTING FILE";throw a;}return"OK "+this.nBytes+" "+this.jmolRenderer.getExportName()+" "+this.fileName});$_M(c$,"getTriad",function(a){return J.exportjs.Exporter.round(a.x)+" "+J.exportjs.Exporter.round(a.y)+" "+J.exportjs.Exporter.round(a.z)},"J.util.Tuple3f");c$.round=$_M(c$,"round",
function(a){var b;return 0==a?"0":1==a?"1":(b=""+Math.round(1E3*a)/1E3).startsWith("0.")?b.substring(1):b.startsWith("-0.")?"-"+b.substring(2):b.endsWith(".0")?b.substring(0,b.length-2):b},"~N");c$.round=$_M(c$,"round",function(a){return J.exportjs.Exporter.round(a.x)+" "+J.exportjs.Exporter.round(a.y)+" "+J.exportjs.Exporter.round(a.z)},"J.util.Tuple3f");$_M(c$,"drawSurface",function(a,b){var c=a.vertexCount;if(0!=c){var d=0,e=a.polygonCount,f=a.bsPolygons,g=a.haveQuads?4:3,h=a.polygonIndexes;if(null==
f)for(var k=e;0<=--k;)d+=4==g&&4==h[k].length?2:1;else for(k=f.nextSetBit(0);0<=k;k=f.nextSetBit(k+1))d+=4==g&&4==h[k].length?2:1;if(0!=d){var k=a.getVertices(),l=0!=b;this.outputSurface(k,a.normals,l?null:a.vertexColixes,h,l?a.polygonColixes:null,c,e,d,f,g,b,a.offset)}}},"J.util.MeshSurface,~N");$_M(c$,"outputSurface",function(){},"~A,~A,~A,~A,~A,~N,~N,~N,J.util.BS,~N,~N,J.util.P3");$_M(c$,"drawFilledCircle",function(a,b,c,d,e,f){0!=a&&this.drawCircle(d,e,f,c,a,!1);0!=b&&this.drawCircle(d,e,f,c,
b,!0)},"~N,~N,~N,~N,~N,~N");$_M(c$,"plotImage",function(){},"~N,~N,~N,java.awt.Image,~N,~N,~N");$_M(c$,"plotText",function(){},"~N,~N,~N,~N,~S,J.util.JmolFont");Clazz.defineStatics(c$,"degreesPerRadian",57.29577951308232)}),Clazz.declarePackage("J.exportjs"),Clazz.load(["J.exportjs.Exporter","J.util.AxisAngle4f"],"J.exportjs.CartesianExporter",["java.lang.Float","java.util.Hashtable","J.util.C","$.P3"],function(){c$=Clazz.decorateAsClass(function(){this.viewpoint=null;Clazz.instantialize(this,arguments)},
J.exportjs,"CartesianExporter",J.exportjs.Exporter);Clazz.prepareFields(c$,function(){this.viewpoint=new J.util.AxisAngle4f});Clazz.makeConstructor(c$,function(){Clazz.superConstructor(this,J.exportjs.CartesianExporter,[]);this.exportType=1;this.lineWidthMad=100});$_M(c$,"getModelCenter",function(){return this.referenceCenter});$_M(c$,"getCameraPosition",function(){var a=new J.util.P3,b=J.util.P3.new3(Clazz.doubleToInt(this.screenWidth/2),Clazz.doubleToInt(this.screenHeight/2),0);this.viewer.unTransformPoint(b,
a);a.sub(this.center);this.tempP3.set(Clazz.doubleToInt(this.screenWidth/2),Clazz.doubleToInt(this.screenHeight/2),this.cameraDistance*this.scalePixelsPerAngstrom);this.viewer.unTransformPoint(this.tempP3,this.tempP3);this.tempP3.sub(this.center);a.add(this.tempP3);return this.cameraPosition});$_M(c$,"setTempPoints",($fz=function(a,b,c){c?(this.tempP1.setT(a),this.tempP2.setT(b)):(this.viewer.unTransformPoint(a,this.tempP1),this.viewer.unTransformPoint(b,this.tempP2))},$fz.isPrivate=!0,$fz),"J.util.P3,J.util.P3,~B");
$_M(c$,"getCoordinateMap",function(a,b,c){for(var d=0,e=0;e<b.length;e++)null!=c&&!c.get(e)||Float.isNaN(a[e].x)?null!=c&&c.clear(e):b[e]=d++;return d},"~A,~A,J.util.BS");$_M(c$,"getNormalMap",function(a,b,c,d){for(var e=new java.util.Hashtable,f=Clazz.newIntArray(b,0),g=0;g<b;g++){var h;null!=c&&!c.get(g)||Float.isNaN(a[g].x)?null!=c&&c.clear(g):(h=this.getTriad(a[g])+"\n",e.containsKey(h)?f[g]=e.get(h).intValue():(f[g]=d.size(),d.addLast(h),e.put(h,Integer.$valueOf(f[g]))))}return f},"~A,~N,J.util.BS,J.util.JmolList");
$_M(c$,"outputIndices",function(a,b,c,d,e){var f=null==d;for(c=f?c-1:d.nextSetBit(0);0<=c;c=f?c-1:d.nextSetBit(c+1))this.outputFace(a[c],b,e)},"~A,~A,~N,J.util.BS,~N");$_M(c$,"outputFace",function(){},"~A,~A,~N");Clazz.overrideMethod(c$,"drawAtom",function(a){var b=a.getColix();this.outputSphere(a,a.madAtom/2E3,b,J.util.C.isColixTranslucent(b))},"J.modelset.Atom");Clazz.overrideMethod(c$,"drawCircle",function(a,b,c,d,e,f){this.tempP3.set(a,b,c);this.viewer.unTransformPoint(this.tempP3,this.tempP1);
d=this.viewer.unscaleToScreen(c,d)/2;this.tempP3.set(a,b,c+1);this.viewer.unTransformPoint(this.tempP3,this.tempP3);this.outputCircle(this.tempP1,this.tempP3,d,e,f)},"~N,~N,~N,~N,~N,~B");Clazz.overrideMethod(c$,"drawEllipse",function(a,b,c,d,e){this.tempV1.setT(b);this.tempV1.sub(a);this.tempV2.setT(c);this.tempV2.sub(a);this.tempV2.cross(this.tempV1,this.tempV2);this.tempV2.normalize();this.tempV2.scale(e?0.002:0.005);this.tempP1.setT(a);this.tempP1.sub(this.tempV2);this.tempP2.setT(a);this.tempP2.add(this.tempV2);
return this.outputCylinder(a,this.tempP1,this.tempP2,d,e?2:0,1.01,b,c,!0)},"J.util.P3,J.util.P3,J.util.P3,~N,~B");Clazz.overrideMethod(c$,"drawPixel",function(a,b,c,d,e){this.tempP3.set(b,c,d);this.viewer.unTransformPoint(this.tempP3,this.tempP1);this.outputSphere(this.tempP1,0.02*e,a,!0)},"~N,~N,~N,~N,~N");Clazz.overrideMethod(c$,"fillConeScreen",function(a,b,c,d,e){this.viewer.unTransformPoint(d,this.tempP1);this.viewer.unTransformPoint(e,this.tempP2);b=this.viewer.unscaleToScreen(d.z,c)/2;0.05>
b&&(b=0.05);this.outputCone(this.tempP1,this.tempP2,b,a)},"~N,~N,~N,J.util.P3,J.util.P3,~B");Clazz.overrideMethod(c$,"drawCylinder",function(a,b,c,d,e,f,g){this.setTempPoints(a,b,0>g);a=f/2E3;c==d?this.outputCylinder(null,this.tempP1,this.tempP2,c,e,a,null,null,-1!=g):(this.tempV2.setT(this.tempP2),this.tempV2.add(this.tempP1),this.tempV2.scale(0.5),this.tempP3.setT(this.tempV2),this.outputCylinder(null,this.tempP1,this.tempP3,c,3==e?0:e,a,null,null,!0),this.outputCylinder(null,this.tempP3,this.tempP2,
d,3==e?0:e,a,null,null,!0),3==e&&(this.outputSphere(this.tempP1,1.01*a,c,-2!=g),this.outputSphere(this.tempP2,1.01*a,d,-2!=g)))},"J.util.P3,J.util.P3,~N,~N,~N,~N,~N");Clazz.overrideMethod(c$,"fillCylinderScreenMad",function(a,b,c,d,e){c/=2E3;this.setTempPoints(d,e,!1);this.outputCylinder(null,this.tempP1,this.tempP2,a,b,c,null,null,!0)},"~N,~N,~N,J.util.P3,J.util.P3");Clazz.overrideMethod(c$,"fillCylinderScreen",function(a,b,c,d,e,f,g,h){null!=f?this.drawCylinder(f,g,a,a,b,Math.round(2E3*h),-1):(c=
Math.round(1E3*this.viewer.unscaleToScreen((d.z+e.z)/2,c)),this.fillCylinderScreenMad(a,b,c,d,e))},"~N,~N,~N,J.util.P3,J.util.P3,J.util.P3,J.util.P3,~N");Clazz.overrideMethod(c$,"fillEllipsoid",function(a,b,c){this.outputEllipsoid(a,b,c)},"J.util.P3,~A,~N,~N,~N,~N,~N,J.util.Matrix3f,~A,J.util.Matrix4f,~A");Clazz.overrideMethod(c$,"fillSphere",function(a,b,c){this.viewer.unTransformPoint(c,this.tempP1);this.outputSphere(this.tempP1,this.viewer.unscaleToScreen(c.z,b)/2,a,!0)},"~N,~N,J.util.P3");Clazz.overrideMethod(c$,
"fillTriangle",function(a,b,c,d,e,f){f?(this.tempP1.setT(b),this.tempP2.setT(c),this.tempP3.setT(d)):(this.viewer.unTransformPoint(b,this.tempP1),this.viewer.unTransformPoint(c,this.tempP2),this.viewer.unTransformPoint(d,this.tempP3));this.outputTriangle(this.tempP1,this.tempP2,this.tempP3,a);e&&this.outputTriangle(this.tempP1,this.tempP3,this.tempP2,a)},"~N,J.util.P3,J.util.P3,J.util.P3,~B,~B")}),Clazz.declarePackage("J.exportjs"),Clazz.load(["J.exportjs.CartesianExporter","java.util.Hashtable",
"J.exportjs.Export3D","$.Exporter"],"J.exportjs.JSExporter",["java.lang.Boolean","$.Float","J.exportjs.UseTable"],function(){c$=Clazz.decorateAsClass(function(){this.ret=this.applet=this.htObjects=this.htSpheresRendered=this.useTable=null;Clazz.instantialize(this,arguments)},J.exportjs,"JSExporter",J.exportjs.CartesianExporter);Clazz.prepareFields(c$,function(){this.htSpheresRendered=new java.util.Hashtable;this.htObjects=new java.util.Hashtable;this.ret=Array(1)});Clazz.makeConstructor(c$,function(){Clazz.superConstructor(this,
J.exportjs.JSExporter,[])});Clazz.overrideMethod(c$,"outputHeader",function(){this.applet=this.viewer.applet;this.useTable=new J.exportjs.UseTable;this.htSpheresRendered.clear();this.htObjects.clear();this.jsInitExport(this.applet)});Clazz.overrideMethod(c$,"outputFooter",function(){this.jsEndExport(this.applet);this.htSpheresRendered.clear();this.htObjects.clear();this.useTable=null});$_M(c$,"jsSphere",($fz=function(a,b,c,d,e){System.out.println(a+" "+b+" "+c+" "+d+" "+e)},$fz.isPrivate=!0,$fz),
"~O,~S,~B,J.util.P3,~A");$_M(c$,"jsCylinder",($fz=function(a,b,c,d,e,f){System.out.println(a+" "+b+" "+c+" "+d+" "+e+" "+f)},$fz.isPrivate=!0,$fz),"~O,~S,~B,J.util.P3,J.util.P3,~A");$_M(c$,"jsTriangle",function(){System.out.println("jsTriangle ")},"~O,~N,J.util.P3,J.util.P3,J.util.P3");Clazz.overrideMethod(c$,"outputSphere",function(a,b,c,d){var e=Math.round(100*b);d=J.exportjs.Exporter.round(a)+(d?" "+e:"");if(null==this.htSpheresRendered.get(d)){this.htSpheresRendered.put(d,Boolean.TRUE);var e=
this.useTable.getDef("S"+c+"_"+e,this.ret),f;e?f=this.htObjects.get(this.ret[0]):this.htObjects.put(this.ret[0],f=[this.getColor(c),Float.$valueOf(b)]);this.jsSphere(this.applet,this.ret[0],!e,a,f)}},"J.util.P3,~N,~N,~B");Clazz.overrideMethod(c$,"outputCylinder",function(a,b,c,d,e,f,g){if(null!=g)return!1;a=b.distance(c);e=this.useTable.getDef("C"+d+"_"+Math.round(100*a)+"_"+f+"_"+e,this.ret);var h;e?h=this.htObjects.get(this.ret[0]):this.htObjects.put(this.ret[0],h=[this.getColor(d),Float.$valueOf(a),
Float.$valueOf(f)]);this.jsCylinder(this.applet,this.ret[0],!e,b,c,h);return!0},"J.util.P3,J.util.P3,J.util.P3,~N,~N,~N,J.util.P3,J.util.P3,~B");Clazz.overrideMethod(c$,"outputCircle",function(){},"J.util.P3,J.util.P3,~N,~N,~B");Clazz.overrideMethod(c$,"outputCone",function(a,b,c,d){this.outputCylinder(null,a,b,d,0,c,null,null,!1)},"J.util.P3,J.util.P3,~N,~N");Clazz.overrideMethod(c$,"outputEllipsoid",function(){},"J.util.P3,~A,~N");$_M(c$,"getColor",($fz=function(a){return Integer.$valueOf(this.g3d.getColorArgbOrGray(a))},
$fz.isPrivate=!0,$fz),"~N");Clazz.overrideMethod(c$,"outputSurface",function(a,b,c,d,e,f,g,h,k,l,m){c=this.getColors(c);e=this.getColors(e);this.jsSurface(this.applet,a,b,d,f,g,h,k,l,this.g3d.getColorArgbOrGray(m),c,e)},"~A,~A,~A,~A,~A,~N,~N,~N,J.util.BS,~N,~N,J.util.P3");$_M(c$,"jsSurface",function(a,b,c,d,e,f,g,h,k){System.out.println("jsSurface -- nV="+e+" nPoly="+f+" nFaces="+g+" faceVertexMax="+k)},"~O,~A,~A,~A,~N,~N,~N,J.util.BS,~N,~N,~A,~A");$_M(c$,"getColors",($fz=function(a){if(null==a)return null;
for(var b=Clazz.newIntArray(a.length,0),c=b.length;0<=--c;)b[c]=this.g3d.getColorArgbOrGray(a[c]);return b},$fz.isPrivate=!0,$fz),"~A");Clazz.overrideMethod(c$,"outputTriangle",function(a,b,c,d){this.jsTriangle(this.applet,this.g3d.getColorArgbOrGray(d),a,b,c)},"J.util.P3,J.util.P3,J.util.P3,~N");$_M(c$,"output",function(){},"J.util.Tuple3f");Clazz.overrideMethod(c$,"plotText",function(){},"~N,~N,~N,~N,~S,J.util.JmolFont")}),Clazz.declarePackage("J.exportjs"),Clazz.load(["java.util.Hashtable"],"J.exportjs.UseTable",
null,function(){c$=Clazz.decorateAsClass(function(){this.iObj=0;Clazz.instantialize(this,arguments)},J.exportjs,"UseTable",java.util.Hashtable);Clazz.makeConstructor(c$,function(){Clazz.superConstructor(this,J.exportjs.UseTable,[])});$_M(c$,"getDef",function(a,b){if(this.containsKey(a))return b[0]=this.get(a),!0;var c="_"+a.charAt(0)+this.iObj++;this.put(a,c);b[0]=c;return!1},"~S,~A")}),$_L(["java.io.Closeable","$.OutputStream"],"java.io.FileOutputStream",["java.lang.IndexOutOfBoundsException","$.NullPointerException"],
function(){c$=$_C(function(){this.fd=null;this.innerFD=!1;$_Z(this,arguments)},java.io,"FileOutputStream",java.io.OutputStream,java.io.Closeable);$_K(c$,function(a){this.construct(a,!1)},"java.io.File");$_K(c$,function(){$_R(this,java.io.FileOutputStream)},"java.io.File,~B");$_K(c$,function(a){$_R(this,java.io.FileOutputStream);if(null==a)throw new NullPointerException("K006c");},"java.io.FileDescriptor");$_K(c$,function(a){this.construct(a,!1)},"~S");$_K(c$,function(a,b){this.construct(Clazz.castNullAs("java.io.File"),
b)},"~S,~B");$_V(c$,"close",function(){});$_V(c$,"finalize",function(){this.close()});$_M(c$,"getFD",function(){return this.fd});$_M(c$,"write",function(a){this.write(a,0,a.length)},"~A");$_M(c$,"write",function(a,b,c){if(null==a)throw new NullPointerException;if(0>c||0>b||b>a.length||c>a.length-b)throw new IndexOutOfBoundsException;},"~A,~N,~N");$_M(c$,"write",function(){},"~N")}),Clazz.declarePackage("J.awtjs"),Clazz.load(["J.awtjs2d.Platform"],"J.awtjs.Platform",["J.awtjs.Font","$.Image"],function(){c$=
Clazz.declareType(J.awtjs,"Platform",J.awtjs2d.Platform);Clazz.overrideMethod(c$,"allocateRgbImage",function(a,b,c,d,e){return J.awtjs.Image.allocateRgbImage(a,b,c,d,e)},"~N,~N,~A,~N,~B,~B");Clazz.overrideMethod(c$,"disposeGraphics",function(a){J.awtjs.Image.disposeGraphics(a)},"~O");Clazz.overrideMethod(c$,"drawImage",function(a,b,c,d,e,f){J.awtjs.Image.drawImage(a,b,c,d,e,f)},"~O,~O,~N,~N,~N,~N");Clazz.overrideMethod(c$,"grabPixels",function(){return null},"~O,~N,~N,~A,~N,~N");Clazz.overrideMethod(c$,
"drawImageToBuffer",function(a,b,c,d,e,f){return J.awtjs.Image.drawImageToBuffer(a,b,c,d,e,f)},"~O,~O,~O,~N,~N,~N");Clazz.overrideMethod(c$,"getTextPixels",function(a,b,c,d,e,f,g){return J.awtjs.Image.getTextPixels(a,b,c,d,e,f,g)},"~S,J.util.JmolFont,~O,~O,~N,~N,~N");Clazz.overrideMethod(c$,"flushImage",function(a){J.awtjs.Image.flush(a)},"~O");Clazz.overrideMethod(c$,"getGraphics",function(a){return J.awtjs.Image.getGraphics(a)},"~O");Clazz.overrideMethod(c$,"getStaticGraphics",function(a,b){return J.awtjs.Image.getStaticGraphics(a,
b)},"~O,~B");Clazz.overrideMethod(c$,"newBufferedImage",function(a,b,c){return J.awtjs.Image.newBufferedImage(a,b,c)},"~O,~N,~N");Clazz.overrideMethod(c$,"newOffScreenImage",function(a,b){return J.awtjs.Image.newBufferedImage(a,b)},"~N,~N");Clazz.overrideMethod(c$,"fontStringWidth",function(a,b,c){return J.awtjs.Font.stringWidth(a,b,c)},"J.util.JmolFont,~O,~S");Clazz.overrideMethod(c$,"getFontAscent",function(a){return J.awtjs.Font.getAscent(a)},"~O");Clazz.overrideMethod(c$,"getFontDescent",function(a){return J.awtjs.Font.getDescent(a)},
"~O");Clazz.overrideMethod(c$,"getFontMetrics",function(a,b){return J.awtjs.Font.getFontMetrics(b,a)},"J.util.JmolFont,~O");Clazz.overrideMethod(c$,"newFont",function(a,b,c,d){return J.awtjs.Font.newFont(a,b,c,d)},"~S,~B,~B,~N")}),Clazz.declarePackage("J.awtjs"),c$=Clazz.declareType(J.awtjs,"Font"),c$.newFont=$_M(c$,"newFont",function(){return null},"~S,~B,~B,~N"),c$.getFontMetrics=$_M(c$,"getFontMetrics",function(){return null},"~O,~O"),c$.getAscent=$_M(c$,"getAscent",function(){return 0},"~O"),
c$.getDescent=$_M(c$,"getDescent",function(){return 0},"~O"),c$.stringWidth=$_M(c$,"stringWidth",function(){return 0},"J.util.JmolFont,~O,~S"),Clazz.declarePackage("J.awtjs"),c$=Clazz.declareType(J.awtjs,"Image"),c$.grabPixels=$_M(c$,"grabPixels",function(){return null},"~O,~N,~N"),c$.drawImageToBuffer=$_M(c$,"drawImageToBuffer",function(){return null},"~O,~O,~O,~N,~N,~N"),c$.getTextPixels=$_M(c$,"getTextPixels",function(){return null},"~S,J.util.JmolFont,~O,~O,~N,~N,~N"),c$.newBufferedImage=$_M(c$,
"newBufferedImage",function(){return null},"~O,~N,~N"),c$.newBufferedImage=$_M(c$,"newBufferedImage",function(){return null},"~N,~N"),c$.allocateRgbImage=$_M(c$,"allocateRgbImage",function(){return null},"~N,~N,~A,~N,~B"),c$.getStaticGraphics=$_M(c$,"getStaticGraphics",function(){return null},"~O,~B"),c$.getGraphics=$_M(c$,"getGraphics",function(){return null},"~O"),c$.drawImage=$_M(c$,"drawImage",function(){},"~O,~O,~N,~N,~N,~N"),c$.flush=$_M(c$,"flush",function(){},"~O"),c$.disposeGraphics=$_M(c$,
"disposeGraphics",function(){},"~O"))})();Clazz.coreLoaded=!0;
