window.getClientRects=function(){return[]};
(function(a){function h(a){try{return a?new window.ActiveXObject("Microsoft.XMLHTTP"):new window.XMLHttpRequest}catch(d){}}a.ajaxSettings.xhr=void 0===window.ActiveXObject?h:function(){return(this.url==document.location||0==this.url.indexOf("http")||!this.isLocal)&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&h()||h(1)};a.ajaxTransport("+script",function(a){var d,b=document.head||jQuery("head")[0]||document.documentElement;return{send:function(f,k){d=document.createElement("script");a.scriptCharset&&
(d.charset=a.scriptCharset);d.src=a.url;d.onload=d.onreadystatechange=function(a,b){if(b||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,d.parentNode&&d.parentNode.removeChild(d),d=null,b||k(200,"success")};b.insertBefore(d,b.firstChild)},abort:function(){if(d)d.onload(void 0,!0)}}});a.extend(a.support,{iecors:!!window.XDomainRequest});a.support.iecors?a.ajaxTransport(function(a){return{send:function(d,b){var f=new window.XDomainRequest;f.onload=function(){b(200,
"OK",{text:f.responseText},{"Content-Type":f.contentType})};a.xhrFields&&(f.onerror=a.xhrFields.error,f.ontimeout=a.xhrFields.timeout);f.open(a.type,a.url);f.send(a.hasContent&&a.data||null)},abort:function(){xdr.abort()}}}):(a.ajaxSetup({accepts:{binary:"text/plain; charset=x-user-defined"},responseFields:{binary:"response"}}),a.ajaxTransport("binary",function(a){var d;return{send:function(b,f){var k=a.xhr();console.log("xhr.open binary async="+a.async+" url="+a.url);k.open(a.type,a.url,a.async);
var h=!1;try{k.hasOwnProperty("responseType")&&(k.responseType="arraybuffer",h=!0)}catch(m){}try{!h&&k.overrideMimeType&&k.overrideMimeType("text/plain; charset=x-user-defined")}catch(c){}!a.crossDomain&&!b["X-Requested-With"]&&(b["X-Requested-With"]="XMLHttpRequest");try{for(var e in b)k.setRequestHeader(e,b[e])}catch(j){}k.send(a.hasContent&&a.data||null);d=function(){var c=k.status,e="",j=k.getAllResponseHeaders(),b={};try{if(d&&4===k.readyState){d=void 0;try{b.text="string"===typeof k.responseText?
k.responseText:null}catch(h){}try{b.binary=k.response}catch(l){}try{e=k.statusText}catch(m){e=""}!c&&a.isLocal&&!a.crossDomain?c=b.text?200:404:1223===c&&(c=204);f(c,e,b,j)}}catch(t){alert(t),f(-1,t)}};a.async?4===k.readyState?setTimeout(d):k.onreadystatechange=d:d()},abort:function(){}}}))})(jQuery);
(function(a,h,g,d){function b(b,g){function l(c){a(m).each(function(){self.Jmol&&(0<=g.indexOf("mouseup")||0<=g.indexOf("touchend"))&&Jmol._setMouseOwner(null);var j=a(this);this!==c.target&&!j.has(c.target).length&&j.triggerHandler(g,[c.target,c])})}g=g||b+d;var m=a(),c=b+"."+g+"-special-event";a.event.special[g]={setup:function(){m=m.add(this);1===m.length&&a(h).bind(c,l)},teardown:function(){self.Jmol&&Jmol._setMouseOwner(null);m=m.not(this);0===m.length&&a(h).unbind(c)},add:function(a){var c=
a.handler;a.handler=function(a,e){a.target=e;c.apply(this,arguments)}}}}a.map(g.split(" "),function(a){b(a)});b("focusin","focus"+d);b("focusout","blur"+d)})(jQuery,document,"click mousemove mouseup touchmove touchend","outjsmol");"undefined"==typeof jQuery&&alert("Note -- JSmoljQuery is required for JSmol, but it's not defined.");self.Jmol||(Jmol={});
Jmol._version||(Jmol=function(a){var h=function(a){return{rear:a++,header:a++,main:a++,image:a++,front:a++,fileOpener:a++,coverImage:a++,dialog:a++,menu:a+9E4,console:a+91E3,consoleImage:a+91001,monitorZIndex:a+99999}},h={_version:"$Date: 2022-06-24 05:54:49 -0500 (Fri, 24 Jun 2022) $",_alertNoBinary:!0,_allowedJmolSize:[25,2048,300],_allowKeyboardFocus:!0,_appletCssClass:"",_appletCssText:"",_fileCache:null,_jarFile:null,_j2sPath:null,_use:null,_j2sLoadMonitorOpacity:90,_applets:{},_asynchronous:!0,
_ajaxQueue:[],_persistentMenu:!1,_getZOrders:h,_z:h(Jmol.z||9E3),_debugCode:!0,_debugCore:!1,db:{_databasePrefixes:"$=:",_fileLoadScript:";if (_loadScript = '' && defaultLoadScript == '' && _filetype == 'Pdb') { select protein or nucleic;cartoons Only;color structure; select * };",_nciLoadScript:";n = ({molecule=1}.length < {molecule=2}.length ? 2 : 1); select molecule=n;display selected;center selected;",_pubChemLoadScript:"",_DirectDatabaseCalls:{"cactus.nci.nih.gov":null,".x3dna.org":null,"rruff.geo.arizona.edu":null,
".rcsb.org":null,"chemapps.stolaf.edu/jmol/jsmol/":null,"zakodium.com":null,"ftp.wwpdb.org":null,"pdbe.org":null,"materialsproject.org":null,".ebi.ac.uk":null,"pubchem.ncbi.nlm.nih.gov":null,"www.nmrdb.org/tools/jmol/predict.php":null,$:"https://cactus.nci.nih.gov/chemical/structure/%FILENCI/file?format=sdf&get3d=True",$$:"https://cactus.nci.nih.gov/chemical/structure/%FILENCI/file?format=sdf","=":"https://files.rcsb.org/download/%FILE.pdb","*":"https://www.ebi.ac.uk/pdbe/entry-files/download/%FILE.cif",
"==":"https://files.rcsb.org/ligands/download/%FILE.cif",":":"https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/%FILE/SDF?record_type=3d"},_restQueryUrl:"http://www.rcsb.org/pdb/rest/search",_restQueryXml:"<orgPdbQuery><queryType>org.pdb.query.simple.AdvancedKeywordQuery</queryType><description>Text Search</description><keywords>QUERY</keywords></orgPdbQuery>",_restReportUrl:"http://www.pdb.org/pdb/rest/customReport?pdbids=IDLIST&customReportColumns=structureId,structureTitle"},_debugAlert:!1,_document:a,
_isXHTML:!1,_lastAppletID:null,_mousePageX:null,_mouseOwner:null,_serverUrl:"https://your.server.here/jsmol.php",_syncId:(""+Math.random()).substring(3),_touching:!1,_XhtmlElement:null,_XhtmlAppendChild:!1};a=a.location.href.toLowerCase();h._debugCore=0<=a.indexOf("j2sdebugcore");h._httpProto=0==a.indexOf("https")?"https://":"http://";h._isFile=0==a.indexOf("file:");h._isFile&&$.ajaxSetup({mimeType:"text/plain"});h._ajaxTestSite=h._httpProto+"google.com";a=h._isFile||0==a.indexOf("http://localhost")||
0==a.indexOf("http://127.");h._tracker=!a&&"https://chemapps.stolaf.edu/jmol/JmolTracker.php?id=UA-45940799-1";h._isChrome=0<=navigator.userAgent.toLowerCase().indexOf("chrome");h._isSafari=!h._isChrome&&0<=navigator.userAgent.toLowerCase().indexOf("safari");h._isMsie=void 0!==window.ActiveXObject;h._isEdge=0<=navigator.userAgent.indexOf("Edge/");h._useDataURI=!h._isMsie&&!h._isEdge;window.requestAnimationFrame||(window.requestAnimationFrame=window.setTimeout);for(var g in Jmol)h[g]=Jmol[g];return h}(document,
Jmol));
(function(a,h){a.clazzAlert=function(){};a.__$=h;h(document).ready(function(){a._document=null});a.$=function(a,e){null==a&&alert(e+arguments.callee.caller.toString());return h(e?"#"+a._id+"_"+e:a)};a._$=function(a){return"string"==typeof a?h("#"+a):a};a.$ajax=function(c){a._ajaxCall=c.url;c.cache="NO"!=c.cache;c.url=a._fixProtocol(c.url);return h.ajax(c)};a._fixProtocol=function(c){0<=c.indexOf("get3d=True")&&(c=c.replace(/get3d\=True/,"get3d=true"));return 0==c.indexOf("http://www.rcsb.org/pdb/files/")&&0>
c.indexOf("/ligand/")?"http://files.rcsb.org/view/"+c.substring(30).replace(/\.gz/,""):0==c.indexOf("http://")&&("https://"==a._httpProto||0<c.indexOf(".gov/")||0==c.indexOf("http://www.materialsproject"))?"https"+c.substring(4):c};a._getNCIInfo=function(c,e){return a._getFileData("https://cactus.nci.nih.gov/chemical/structure/"+c+"/"+("name"==e?"names":e))};a.$appEvent=function(c,e,j,b){c=a.$(c,e);c.off(j)&&b&&c.on(j,b)};a.$resize=function(a){return h(window).resize(a)};a.$after=function(a,e){return h(a).after(e)};
a.$append=function(a,e){return h(a).append(e)};a.$bind=function(a,e,j){return j?h(a).bind(e,j):h(a).unbind(e)};a.$closest=function(a,e){return h(a).closest(e)};a.$get=function(a,e){return h(a).get(e)};a.$documentOff=function(a,e){return h(document).off(a,"#"+e)};a.$documentOn=function(a,e,j){return h(document).on(a,"#"+e,j)};a.$getAncestorDiv=function(a,e){return h("div."+e+":has(#"+a+")")[0]};a.$supportsIECrossDomainScripting=function(){return h.support.iecors};a.$attr=function(c,e,j){return a._$(c).attr(e,
j)};a.$css=function(c,e){return a._$(c).css(e)};a.$find=function(c,e){return a._$(c).find(e)};a.$focus=function(c){return a._$(c).focus()};a.$html=function(c,e){return a._$(c).html(e)};a.$offset=function(c){return a._$(c).offset()};a.$windowOn=function(a,e){return h(window).on(a,e)};a.$prop=function(c,e,j){var b=a._$(c);return 3==arguments.length?b.prop(e,j):b.prop(e)};a.$remove=function(c){return a._$(c).remove()};a.$scrollTo=function(c,e){var j=a._$(c);return j.scrollTop(0>e?j[0].scrollHeight:e)};
a.$setEnabled=function(c,e){return a._$(c).attr("disabled",e?null:"disabled")};a.$getSize=function(c){c=a._$(c);return[c.width(),c.height()]};a.$setSize=function(c,e,j){return a._$(c).width(e).height(j)};a.$is=function(c,e){return a._$(c).is(e)};a.$setVisible=function(c,e){var j=a._$(c);return e?j.show():j.hide()};a.$submit=function(c){return a._$(c).submit()};a.$val=function(c,e){var j=a._$(c);return 1==arguments.length?j.val():j.val(e)};a._clearVars=function(){delete jQuery;delete h;delete a;delete SwingController;
delete J;delete JM;delete JS;delete JSV;delete JU;delete JV;delete java;delete javajs;delete Clazz;delete c$};var g=document,d=window,b={};b.ua=navigator.userAgent.toLowerCase();var f;a:{f=["linux","unix","mac","win"];for(var k=f.length;k--;)if(-1!=b.ua.indexOf(f[k])){f=f[k];break a}f="unknown"}b.os=f;b.browser=function(){for(var a=b.ua,e="konqueror webkit omniweb opera webtv icab msie mozilla".split(" "),j=0;j<e.length;j++)if(0<=a.indexOf(e[j]))return e[j];return"unknown"};b.browserName=b.browser();
b.browserVersion=parseFloat(b.ua.substring(b.ua.indexOf(b.browserName)+b.browserName.length+1));b.supportsXhr2=function(){return h.support.cors||h.support.iecors};b.allowDestroy="msie"!=b.browserName;b.allowHTML5="msie"!=b.browserName||0>navigator.appVersion.indexOf("MSIE 8");b.getDefaultLanguage=function(){return navigator.language||navigator.userLanguage||"en-US"};b._webGLtest=0;b.supportsWebGL=function(){if(!a.featureDetection._webGLtest){var c;a.featureDetection._webGLtest=d.WebGLRenderingContext&&
((c=g.createElement("canvas")).getContext("webgl")||c.getContext("experimental-webgl"))?1:-1}return 0<a.featureDetection._webGLtest};b.supportsLocalization=function(){for(var a=g.getElementsByTagName("meta"),e=a.length;0<=--e;)if(0<=a[e].outerHTML.toLowerCase().indexOf("utf-8"))return!0;return!1};b.supportsJava=function(){a.featureDetection._javaEnabled||(a.featureDetection._javaEnabled=a._isMsie?navigator.javaEnabled()?1:-1:navigator.javaEnabled()&&(!navigator.mimeTypes||navigator.mimeTypes["application/x-java-applet"])?
1:-1);return 0<a.featureDetection._javaEnabled};b.compliantBrowser=function(){var a=!!g.getElementById,e=b.os;if("opera"==b.browserName&&7.54>=b.browserVersion&&"mac"==e||"webkit"==b.browserName&&125.12>b.browserVersion||"msie"==b.browserName&&"mac"==e||"konqueror"==b.browserName&&3.3>=b.browserVersion)a=!1;return a};b.isFullyCompliant=function(){return b.compliantBrowser()&&b.supportsJava()};b.useIEObject="win"==b.os&&"msie"==b.browserName&&5.5<=b.browserVersion;b.useHtml4Object="mozilla"==b.browserName&&
5<=b.browserVersion||"opera"==b.browserName&&8<=b.browserVersion||"webkit"==b.browserName;b.hasFileReader=d.File&&d.FileReader;a.featureDetection=b;a._ajax=function(c){if(!c.async)return a.$ajax(c).responseText;a._ajaxQueue.push(c);1==a._ajaxQueue.length&&a._ajaxDone()};a._ajaxDone=function(){var c=a._ajaxQueue.shift();c&&a.$ajax(c)};a._grabberOptions=[["$","NCI(small molecules)"],[":","PubChem(small molecules)"],["=","RCSB(macromolecules)"],["*","PDBe(macromolecules)"]];a._getGrabberOptions=function(c){if(0==
a._grabberOptions.length)return"";var e='<input type="text" id="ID_query" onfocus="jQuery(this).select()" onkeypress="if(13==event.which){Jmol._applets[\'ID\']._search();return false}" size="32" value="" />',j='<button id="ID_submit" onclick="Jmol._applets[\'ID\']._search()">Search</button></nobr>';1==a._grabberOptions.length?(e="<nobr>"+e+'<span style="display:none">',j="</span>"+j):e+="<br /><nobr>";for(var e=e+'<select id="ID_select">',b=0;b<a._grabberOptions.length;b++)var d=a._grabberOptions[b],
e=e+('<option value="'+d[0]+'" '+(0==b?"selected":"")+">"+d[1]+"</option>");e=(e+"</select>"+j).replace(/ID/g,c._id);return"<br />"+e};a._getScriptForDatabase=function(c){return"$"==c?a.db._nciLoadScript:":"==c?a.db._pubChemLoadScript:a.db._fileLoadScript};a._setInfo=function(a,e,j){var b=[],d="";if(0==j.indexOf("ERROR"))d=j;else switch(e){case "=":e=j.split("<dimStructure.structureId>");b=["<table>"];for(j=1;j<e.length;j++)b.push('<tr><td valign=top><a href="javascript:Jmol.search('+a._id+",'="+
e[j].substring(0,4)+"')\">"+e[j].substring(0,4)+"</a></td>"),b.push("<td>"+e[j].split("Title>")[1].split("</")[0]+"</td></tr>");b.push("</table>");d=e.length-1+" matches";break;case "$":case ":":break;default:return}a._infoHeader=d;a._info=b.join("");a._showInfo(!0)};a._loadSuccess=function(c,e){e&&(a._ajaxDone(),e(c))};a._loadError=function(c){a._ajaxDone();a.say("Error connecting to server: "+a._ajaxCall);null!=c&&c()};a._isDatabaseCall=function(c){return 0<=a.db._databasePrefixes.indexOf(c.substring(0,
1))};a._getDirectDatabaseCall=function(c,e){if(e&&!a.featureDetection.supportsXhr2())return c;var j=2,b=c.substring(0,j),d=a.db._DirectDatabaseCalls[b]||a.db._DirectDatabaseCalls[b=c.substring(0,--j)];d&&(":"==b?(b=c.toLowerCase(),isNaN(parseInt(c.substring(1)))?0==b.indexOf(":smiles:")?(d+="?POST?smiles="+c.substring(8),c="smiles"):0==b.indexOf(":cid:")?c="cid/"+c.substring(5):(0==b.indexOf(":name:")?c=c.substring(5):0==b.indexOf(":cas:")&&(c=c.substring(4)),c="name/"+encodeURIComponent(c.substring(j))):
c="cid/"+c.substring(1)):c=encodeURIComponent(c.substring(j)),0<=c.indexOf(".mmtf")?c="https://mmtf.rcsb.org/v1.0/full/"+c.replace(/\.mmtf/,""):0<=d.indexOf("FILENCI")?(c=c.replace(/\%2F/g,"/"),c=d.replace(/\%FILENCI/,c)):c=d.replace(/\%FILE/,c));return c};a._getRawDataFromServer=function(c,e,j,b,d,f){c="?call=getRawDataFromDatabase&database="+c+(0<=e.indexOf("?POST?")?"?POST?":"")+"&query="+encodeURIComponent(e)+(d?"&encoding=base64":"")+(f?"":"&script="+encodeURIComponent(a._getScriptForDatabase(c)));
return a._contactServer(c,j,b)};a._checkFileName=function(c,e,j){a._isDatabaseCall(e)&&(j&&a._setQueryTerm(c,e),e=a._getDirectDatabaseCall(e,!0),a._isDatabaseCall(e)&&(e=a._getDirectDatabaseCall(e,!1),j&&(j[0]=!0)));return e};a._checkCache=function(c,e,j){if(c._cacheFiles&&a._fileCache&&!e.endsWith(".js")){if(c=a._fileCache[e])return System.out.println("using "+c.length+" bytes of cached data for "+e),j(c),null;j=function(c,e){j(a._fileCache[c]=e)}}return j};a.playAudio=function(c){a.playAudio(null,
c)};a.playAudio=function(a,e){var j=e.get?function(a){return e.get(a)}:null,b=e.put?function(a,c){return e.put(a,c)}:null,d=j?j("audioFile"):e,f=j&&j("audioPlayer"),g=document.createElement("audio");b&&b("audioElement",g);var k=null;f&&(k=function(a){f.processUpdate(a)},f.myClip={open:function(){k("open")},start:function(){g.play();k("start")},loop:function(a){g.loop=0!=a},stop:function(){g.pause()},close:function(){k("close")},setMicrosecondPosition:function(a){g.currentTime=a/1E6}});g.controls=
"true";g.src=d;j&&j("loop")&&(g.loop="true");k&&(g.addEventListener("pause",function(){k("pause")}),g.addEventListener("play",function(){k("play")}),g.addEventListener("playing",function(){k("playing")}),g.addEventListener("ended",function(){k("ended")}),k("open"))};a._loadFileData=function(c,e,j,b){var d=[];e=a._checkFileName(c,e,d);j=a._checkCache(c,e,j);d[0]?a._getRawDataFromServer("_",e,j,b):(c={type:"GET",dataType:"text",url:e,async:a._asynchronous,success:function(c){a._loadSuccess(c,j)},error:function(){a._loadError(b)}},
a._checkAjaxPost(c),a._ajax(c))};a._getInfoFromDatabase=function(c,e,j){if("===="==e){var b=a.db._restQueryXml.replace(/QUERY/,j),b={dataType:"text",type:"POST",contentType:"application/x-www-form-urlencoded",url:a.db._restQueryUrl,data:encodeURIComponent(b)+"&req=browser",success:function(b){a._ajaxDone();a._extractInfoFromRCSB(c,e,j,b)},error:function(){a._loadError(null)},async:a._asynchronous};return a._ajax(b)}j="?call=getInfoFromDatabase&database="+e+"&query="+encodeURIComponent(j);return a._contactServer(j,
function(j){a._setInfo(c,e,j)})};a._extractInfoFromRCSB=function(c,e,j,b){var d=b.length/5;if(0!=d&&4==j.length&&1!=d){j=j.toUpperCase();var f=b.indexOf(j);0<f&&0<="123456789".indexOf(j.substring(0,1))&&(b=j+","+b.substring(0,f)+b.substring(f+5));50<d&&(b=b.substring(0,250));b=b.replace(/\n/g,",");b=a._restReportUrl.replace(/IDLIST/,b);a._loadFileData(c,b,function(j){a._setInfo(c,e,j)})}};a._checkAjaxPost=function(a){var e=a.url.indexOf("?POST?");0<e&&(a.data=a.url.substring(e+6),a.url=a.url.substring(0,
e),a.type="POST",a.contentType="application/x-www-form-urlencoded")};a._contactServer=function(c,e,j){c={dataType:"text",type:"GET",url:a._serverUrl+c,success:function(c){a._loadSuccess(c,e)},error:function(){a._loadError(j)},async:e?a._asynchronous:!1};a._checkAjaxPost(c);return a._ajax(c)};a._setQueryTerm=function(c,e){if(e&&c._hasOptions&&"http://"!=e.substring(0,7)){if(a._isDatabaseCall(e)){var j=e.substring(0,1);e=e.substring(1);e.substring(0,1)==j&&0<="=$".indexOf(j)&&(e=e.substring(1));var b=
a._getElement(c,"select");if(b&&b.options)for(var d=0;d<b.options.length;d++)b[d].value==j&&(b[d].selected=!0)}a.$val(a.$(c,"query"),e)}};a._search=function(c,e,j){1<arguments.length||(e=null);a._setQueryTerm(c,e);e||(e=a.$val(a.$(c,"query")));0==e.indexOf("!")?c._script(e.substring(1)):(e&&(e=e.replace(/\"/g,"")),c._showInfo(!1),a._searchMol(c,e,j,!0))};a._searchMol=function(c,e,j,b){var d;a._isDatabaseCall(e)?(d=e.substring(0,1),e=e.substring(1)):d=c._hasOptions?a.$val(a.$(c,"select")):"$";"="==
d&&3==e.length&&(e="="+e);var f=d+e;if(e&&!(0>f.indexOf("?")&&f==c._thisJmolModel)){c._thisJmolModel=f;var g;b&&null!=c._viewSet&&null!=(g=a.View.__findView(c._viewSet,{chemID:f}))?a.View.__setView(g,c,!1):("$"==d||":"==d?c._jmolFileType="MOL":"="==d&&(c._jmolFileType="PDB"),c._searchDatabase(e,d,j))}};a._searchDatabase=function(c,e,j,b){c._showInfo(!1);return 0<=e.indexOf("?")?(a._getInfoFromDatabase(c,j,e.split("?")[0]),!0):a.db._DirectDatabaseCalls[j]?(c._loadFile(j+e,b),!0):!1};a._syncBinaryOK=
"?";a._canSyncBinary=function(c){if(a._isAsync)return!0;if(self.VBArray)return a._syncBinaryOK=!1;if("?"!=a._syncBinaryOK)return a._syncBinaryOK;a._syncBinaryOK=!0;try{var e=new window.XMLHttpRequest;e.open("text",a._ajaxTestSite,!1);e.hasOwnProperty("responseType")?e.responseType="arraybuffer":e.overrideMimeType&&e.overrideMimeType("text/plain; charset=x-user-defined")}catch(j){return System.out.println("JSmolCore.js: synchronous binary file transfer is requested but not available"),a._alertNoBinary&&
!c&&alert("JSmolCore.js: synchronous binary file transfer is requested but not available"),a._syncBinaryOK=!1}return!0};a._binaryTypes=".cdx mmtf .bcif .gz .bz2 .jpg .gif .png .zip .jmol .bin .smol .spartan .pmb .mrc .map .ccp4 .dn6 .delphi .omap .pse .dcd .lut .uk/pdbe/densities/ .uk/pdbe/volume-server/".split(" ");a.isBinaryUrl=function(c){for(var e=a._binaryTypes.length;0<=--e;)if(0<=c.indexOf(a._binaryTypes[e]))return!0;return!1};a._getFileData=function(c,e,j){var b=a.isBinaryUrl(c),d=0<=c.indexOf(".gz")&&
0<=c.indexOf("rcsb.org");d&&(c=c.replace(/\.gz/,""),b=!1);var d=b&&!e&&!a._canSyncBinary(d),f=0<=c.indexOf("?POST?");0==c.indexOf("file:/")&&0!=c.indexOf("file:///")&&(c="file://"+c.substring(5));var g=0>c.indexOf("://")||0==c.indexOf(document.location.protocol)&&0<=c.indexOf(document.location.host),k="https://"==a._httpProto&&0==c.indexOf("http://"),h=a._isDirectCall(c);0<=c.indexOf("?ALLOWSORIGIN?")&&(c=c.replace(/\?ALLOWSORIGIN\?/,""));var l=!g&&a.$supportsIECrossDomainScripting(),m=null;if(k||
d||!g&&!h||!e&&l)m=a._getRawDataFromServer("_",c,e,e,d,!0);else{c=c.replace(/file:\/\/\/\//,"file://");var r={dataType:b?"binary":"text",async:!!e};f?(r.type="POST",r.url=c.split("?POST?")[0],r.data=c.split("?POST?")[1],r.data.startsWith('{"')&&(r.contentType="application/json",r.data=r.data.replaceAll("\n","\\\\n"))):(r.type="GET",r.url=c);e&&(r.success=function(){e(a._xhrReturn(r.xhr))},r.error=function(){e(r.xhr.statusText)});r.xhr=a.$ajax(r);e||(m=a._xhrReturn(r.xhr))}if(!j)return m;null==m&&
(m="",b=!1);b&&(b=a._canSyncBinary(!0));return b?a._strToBytes(m):JU.SB.newS(m)};a._xhrReturn=function(a){return!a.responseText&&""!==a.responseText||self.Clazz&&Clazz.instanceOf(a.response,self.ArrayBuffer)?a.response||a.statusText:a.responseText};a._isDirectCall=function(c){if(0<=c.indexOf("?ALLOWSORIGIN?"))return!0;for(var e in a.db._DirectDatabaseCalls)if(0<=e.indexOf(".")&&0<=c.indexOf(e))return!0;return!1};a._cleanFileData=function(a){return 0<=a.indexOf("\r")&&0<=a.indexOf("\n")?a.replace(/\r\n/g,
"\n"):0<=a.indexOf("\r")?a.replace(/\r/g,"\n"):a};a._getFileType=function(a){var e=a.substring(0,1);if("$"==e||":"==e)return"MOL";if("="==e)return"="==a.substring(1,2)?"LCIF":"PDB";a=a.split(".").pop().toUpperCase();return a.substring(0,Math.min(a.length,3))};a._getZ=function(c,e){return c&&c._z&&c._z[e]||a._z[e]};a._incrZ=function(c,e){return c&&c._z&&++c._z[e]||++a._z[e]};a._hideLocalFileReader=function(c){c._localReader&&a.$setVisible(c._localReader,!1);c._readingLocal=!1;a.setCursor(c,0)};a.loadFileFromDialog=
function(c){a.loadFileAsynchronously(null,c,null,null)};a.loadFileAsynchronously=function(c,e,j,b){if(j&&0!=j.indexOf("?")){var d=j;j=a._checkFileName(e,j);var f=function(f){a._setData(c,j,d,f,b,e)},f=a._checkCache(e,j,f);0<=j.indexOf("|")&&(j=j.split("|")[0]);return null==f?null:a._getFileData(j,f)}if(!a.featureDetection.hasFileReader)return c?c.setData("Local file reading is not enabled in your browser",null,null,b,e):alert("Local file reading is not enabled in your browser");e._localReader||(f=
'<div id="ID" style="z-index:'+a._getZ(e,"fileOpener")+';position:absolute;background:#E0E0E0;left:10px;top:10px"><div style="margin:5px 5px 5px 5px;"><button id="ID_loadurl">URL</button><input type="file" id="ID_files" /><button id="ID_loadfile">load</button><button id="ID_cancel">cancel</button></div><div>',a.$after("#"+e._id+"_appletdiv",f.replace(/ID/g,e._id+"_localReader")),e._localReader=a.$(e,"localReader"));a.$appEvent(e,"localReader_loadurl","click");a.$appEvent(e,"localReader_loadurl","click",
function(){var c=prompt("Enter a URL");c&&(a._hideLocalFileReader(e,0),a._setData(null,c,c,null,b,e))});a.$appEvent(e,"localReader_loadfile","click");a.$appEvent(e,"localReader_loadfile","click",function(){var j=a.$(e,"localReader_files")[0].files[0],d=new FileReader;d.onloadend=function(d){d.target.readyState==FileReader.DONE&&(a._hideLocalFileReader(e,0),a._setData(c,j.name,j.name,d.target.result,b,e))};try{d.readAsArrayBuffer(j)}catch(f){alert("You must select a file first.")}});a.$appEvent(e,
"localReader_cancel","click");a.$appEvent(e,"localReader_cancel","click",function(){a._hideLocalFileReader(e);c&&c.setData("#CANCELED#",null,null,b,e)});a.$setVisible(e._localReader,!0);e._readingLocal=!0};a._setData=function(c,e,j,b,d,f){b&&(b=a._strToBytes(b));null!=b&&(null==c||0<=e.indexOf(".jdx"))&&a.Cache.put("cache://"+e,b);null==c?f._applet.openFileAsyncSpecial(null==b?e:"cache://"+e,1):c.setData(e,j,b,d)};a.doAjax=function(c,e,j){c=c.toString();if(j){if(0!=c.indexOf("http://")&&0!=c.indexOf("https://"))return a._saveFile(c,
j);c={async:!1,url:c,type:"POST",data:"string"==typeof data?j:";base64,"+(JU||J.util).Base64.getBase64(j).toString(),processData:!1};return a.$ajax(c).responseText}e&&(c+="?POST?"+e);return a._getFileData(c,null,!0)};a._saveFile=function(c,e,j,b){if(a._localFileSaveFunction&&a._localFileSaveFunction(c,e))return"OK";c=c.substring(c.lastIndexOf("/")+1);j||(j=0<=c.indexOf(".pdf")?"application/pdf":0<=c.indexOf(".png")?"image/png":0<=c.indexOf(".gif")?"image/gif":0<=c.indexOf(".jpg")?"image/jpg":"");
var d="string"==typeof e;e=d&&0<=e.indexOf(";base64,")?e.split(";base64,")[1]:(JU||J.util).Base64.getBase64(d?e.getBytes("UTF-8"):e).toString();b||(b="base64");(d=a._serverUrl)&&0<=d.indexOf("your.server")&&(d="");a._useDataURI||!d?(b=document.createElement("a"),b.href="data:"+j+";base64,"+e,b.type=j||"text/plain;charset=utf-8",b.download=c,b.target="_blank",h("body").append(b),b.click(),b.remove()):(a._formdiv||(a.$after("body",'<div id="__jsmolformdiv__" style="display:none">\t\t\t\t\t\t<form id="__jsmolform__" method="post" target="_blank" action="">\t\t\t\t\t\t<input name="call" value="saveFile"/>\t\t\t\t\t\t<input id="__jsmolmimetype__" name="mimetype" value=""/>\t\t\t\t\t\t<input id="__jsmolencoding__" name="encoding" value=""/>\t\t\t\t\t\t<input id="__jsmolfilename__" name="filename" value=""/>\t\t\t\t\t\t<textarea id="__jsmoldata__" name="data"></textarea>\t\t\t\t\t\t</form>\t\t\t\t\t\t</div>'),
a._formdiv="__jsmolform__"),a.$attr(a._formdiv,"action",d+"?"+(new Date).getMilliseconds()),a.$val("__jsmoldata__",e),a.$val("__jsmolfilename__",c),a.$val("__jsmolmimetype__",j),a.$val("__jsmolencoding__",b),a.$submit("__jsmolform__"),a.$val("__jsmoldata__",""),a.$val("__jsmolfilename__",""));return"OK"};a._strToBytes=function(a){if(Clazz.instanceOf(a,self.ArrayBuffer))return Clazz.newByteArray(-1,a);for(var e=Clazz.newByteArray(a.length,0),j=a.length;0<=--j;)e[j]=a.charCodeAt(j)&255;return e};a._setConsoleDiv=
function(a){self.Clazz&&Clazz.setConsoleDiv(a)};a._registerApplet=function(c,e){return window[c]=a._applets[c]=a._applets.master=a._applets[c+"__"+a._syncId+"__"]=e};a._readyCallback=function(c,e,j,b,d){c=c.split("_object")[0];var f=a._applets[c];if(j=j.booleanValue?j.booleanValue():j)f._appletPanel=d||b,f._applet=b;a._track(f)._readyCallback(c,e,j)};a._getWrapper=function(c,e){var j;if(e){var b="";if(c._coverImage)var b=' onclick="Jmol.coverApplet(ID, false)" title="'+c._coverTitle+'"',d='<image id="ID_coverclickgo" src="'+
c._makeLiveImage+'" style="width:25px;height:25px;position:absolute;bottom:10px;left:10px;z-index:'+a._getZ(c,"coverImage")+';opacity:0.5;"'+b+" />",b='<div id="ID_coverdiv" style="background-color:red;z-index:'+a._getZ(c,"coverImage")+';width:100%;height:100%;display:inline;position:absolute;top:0px;left:0px"><image id="ID_coverimage" src="'+c._coverImage+'" style="width:100%;height:100%"'+b+"/>"+d+"</div>";d=c._isJava?"":'<image id="ID_waitimage" src="'+c._j2sPath+'/img/cursor_wait.gif" style="display:none;position:absolute;bottom:10px;left:10px;z-index:'+
a._getZ(c,"coverImage")+';" />';j=a._appletCssText.replace(/\'/g,'"');var f=c._getSpinner&&c._getSpinner();c._spinner=f=!f||"none"==f?"":"background-image:url("+f+"); background-repeat:no-repeat; background-position:center;";j=f+(0<=j.indexOf('style="')?j.split('style="')[1]:'" '+j);j='...<div id="ID_appletinfotablediv" style="width:Wpx;height:Hpx;position:relative;font-size:14px;text-align:left">IMG WAIT......<div id="ID_appletdiv" style="z-index:'+a._getZ(c,"header")+";width:100%;height:100%;position:absolute;top:0px;left:0px;"+
j+">";var f=c._height,g=c._width;if("string"!==typeof f||0>f.indexOf("%"))f+="px";if("string"!==typeof g||0>g.indexOf("%"))g+="px";j=j.replace(/IMG/,b).replace(/WAIT/,d).replace(/Hpx/g,f).replace(/Wpx/g,g)}else j='......</div>......<div id="ID_2dappletdiv" style="position:absolute;width:100%;height:100%;overflow:hidden;display:none"></div>......<div id="ID_infotablediv" style="width:100%;height:100%;position:absolute;top:0px;left:0px">.........<div id="ID_infoheaderdiv" style="height:20px;width:100%;background:yellow;display:none"><span id="ID_infoheaderspan"></span><span id="ID_infocheckboxspan" style="position:absolute;text-align:right;right:1px;"><a href="javascript:Jmol.showInfo(ID,false)">[x]</a></span></div>.........<div id="ID_infodiv" style="position:absolute;top:20px;bottom:0px;width:100%;height:100%;overflow:auto"></div>......</div>...</div>';
return j.replace(/\.\.\./g,"").replace(/[\n\r]/g,"").replace(/ID/g,c._id)};a._hideLoadingSpinner=function(c){c._spinner&&a.$css(a.$(c,"appletdiv"),{"background-image":""})};a._documentWrite=function(c){if(a._document){if(a._isXHTML&&!a._XhtmlElement){var e=document.getElementsByTagName("script");a._XhtmlElement=e.item(e.length-1);a._XhtmlAppendChild=!1}a._XhtmlElement?a._domWrite(c):a._document.write(c)}return c};a._domWrite=function(c){for(var e=[0];e[0]<c.length;){var j=a._getDomElement(c,e);if(!j)break;
a._XhtmlAppendChild?a._XhtmlElement.appendChild(j):a._XhtmlElement.parentNode.insertBefore(j,_jmol.XhtmlElement)}};a._getDomElement=function(a,e){var j=document.createElement("span");j.innerHTML=a;e[0]=a.length;return j};a._setObject=function(c,e,j){c._id=e;c.__Info={};j.z&&j.zIndexBase&&(a._z=a._getZOrders(j.zIndexBase));for(var b in j)c.__Info[b]=j[b];(c._z=j.z)||j.zIndexBase&&(c._z=c.__Info.z=a._getZOrders(j.zIndexBase));c._width=j.width;c._height=j.height;c._noscript=!c._isJava&&j.noscript;c._console=
j.console;c._cacheFiles=!!j.cacheFiles;c._viewSet=null==j.viewSet||c._isJava?null:"Set"+j.viewSet;null!=c._viewSet&&(a.View.__init(c),c._currentView=null);!a._fileCache&&c._cacheFiles&&(a._fileCache={});c._console||(c._console=c._id+"_infodiv");"none"==c._console&&(c._console=null);c._color=j.color?j.color.replace(/0x/,"#"):"#FFFFFF";c._disableInitialConsole=j.disableInitialConsole;c._noMonitor=j.disableJ2SLoadMonitor;a._j2sPath&&(j.j2sPath=a._j2sPath);c._j2sPath=j.j2sPath;c._coverImage=j.coverImage;
c._makeLiveImage=j.makeLiveImage||j.j2sPath+"/img/play_make_live.jpg";c._isCovered=!!c._coverImage;c._deferApplet=j.deferApplet||c._isCovered&&c._isJava;c._deferUncover=j.deferUncover&&!c._isJava;c._coverScript=j.coverScript;c._coverTitle=j.coverTitle;c._coverTitle||(c._coverTitle=c._deferApplet?"activate 3D model":"3D model is loading...");c._containerWidth=c._width+(c._width==parseFloat(c._width)?"px":"");c._containerHeight=c._height+(c._height==parseFloat(c._height)?"px":"");c._info="";c._infoHeader=
c._jmolType+' "'+c._id+'"';c._hasOptions=j.addSelectionOptions;c._defaultModel=j.defaultModel;c._readyScript=j.script?j.script:"";c._readyFunction=j.readyFunction;c._coverImage&&!c._deferApplet&&(c._readyScript+=";javascript "+e+"._displayCoverImage(false)");c._src=j.src};a._addDefaultInfo=function(c,e){for(var b in e)"undefined"==typeof c[b]&&(c[b]=e[b]);a._use&&(c.use=a._use);0<=c.use.indexOf("SIGNED")&&(0>c.jarFile.indexOf("Signed")&&(c.jarFile=c.jarFile.replace(/Applet/,"AppletSigned")),c.use=
c.use.replace(/SIGNED/,"JAVA"),c.isSigned=!0)};a._syncedApplets=[];a._syncedCommands=[];a._syncedReady=[];a._syncReady=!1;a._isJmolJSVSync=!1;a._setReady=function(c){a._syncedReady[c]=1;for(var e=0,b=0;b<a._syncedApplets.length;b++){if(a._syncedApplets[b]==c._id)a._syncedApplets[b]=c,a._syncedReady[b]=1;else if(!a._syncedReady[b])continue;e++}e==a._syncedApplets.length&&a._setSyncReady()};a._setDestroy=function(c){a.featureDetection.allowDestroy&&a.$windowOn("beforeunload",function(){a._destroy(c)})};
a._destroy=function(c){try{c._appletPanel&&c._appletPanel.destroy();c._applet=null;a._unsetMouse(c._canvas);c._canvas=null;for(var e=0,b=0;b<a._syncedApplets.length;b++)a._syncedApplets[b]==c&&(a._syncedApplets[b]=null),a._syncedApplets[b]&&e++;0<e||a._clearVars()}catch(d){}};a._setSyncReady=function(){a._syncReady=!0;if(a._isJmolJSVSync)for(var c=a._syncedApplets,e=0;e<c.length-1;e+=2)c[e]._linkedApplet=c[e+1],c[e+1]._linkedApplet=c[e];c="";for(e=0;e<a._syncedApplets.length;e++)a._syncedCommands[e]&&
(c+="Jmol.script(Jmol._syncedApplets["+e+"], Jmol._syncedCommands["+e+"]);");setTimeout(c,50)};a._mySyncCallback=function(c,e){app=a._applets[c];if(app._viewSet)a.View.updateFromSync(app,e);else{if(!a._syncReady||!a._isJmolJSVSync)return 1;app._linkedApplet&&0<=e.indexOf(app._linkedApplet._syncKeyword)&&app._linkedApplet._syncScript(e);return 0}};a._getElement=function(a,e){return document.getElementById(a._id+"_"+e)||{}};a._evalJSON=function(a,e){a+="";if(!a)return[];if("{"!=a.charAt(0))return 0<=
a.indexOf(" | ")&&(a=a.replace(/\ \|\ /g,"\n")),a;var b=(new Function("return "+a))();return!b?null:e&&void 0!=b[e]?b[e]:b};a._sortMessages=function(a){function e(a,c){return a[0]<c[0]?1:a[0]>c[0]?-1:0}if(!a||"object"!=typeof a)return[];for(var b=[],d=a.length-1;0<=d;d--)for(var f=0,g=a[d].length;f<g;f++)b[b.length]=a[d][f];if(0!=b.length)return b=b.sort(e)};a._setMouseOwner=function(c,e){null==c||e?(a._mouseOwner=c)&&c._applet&&(a._lastAppletID=c._applet._id):a._mouseOwner==c&&(a._mouseOwner=null)};
a._jsGetMouseModifiers=function(a){var e=0;switch(a.button){case 0:e=16;break;case 1:e=8;break;case 2:e=4}a.shiftKey&&(e+=1);a.altKey&&(e+=8);a.ctrlKey&&(e+=2);return e};a._jsGetXY=function(c,e){if(!c.applet._ready||a._touching&&0>e.type.indexOf("touch"))return!1;var b=a.$offset(c.id),d,f=e.originalEvent;e.pageX||(e.pageX=f.pageX);e.pageY||(e.pageY=f.pageY);a._mousePageX=e.pageX;a._mousePageY=e.pageY;f.targetTouches&&f.targetTouches[0]?(d=f.targetTouches[0].pageX-b.left,b=f.targetTouches[0].pageY-
b.top):f.changedTouches?(d=f.changedTouches[0].pageX-b.left,b=f.changedTouches[0].pageY-b.top):(d=e.pageX-b.left,b=e.pageY-b.top);return void 0==d?null:[Math.round(d),Math.round(b),a._jsGetMouseModifiers(e)]};a.setCursor=function(c,e){if(!c._isJava&&!c._readingLocal){var b;switch(e){case 1:b="crosshair";break;case 3:b="wait";a.$setVisible(a.$(c,"waitimage"),!0);break;case 8:b="ns-resize";break;case 12:b="grab";break;case 13:b="move";break;default:a.$setVisible(a.$(c,"waitimage"),!1),b="default"}c._canvas.style.cursor=
b}};a._gestureUpdate=function(c,e){e.stopPropagation();e.preventDefault();var b=e.originalEvent;switch(e.type){case "touchstart":a._touching=!0;break;case "touchend":a._touching=!1}if(!b.touches||2!=b.touches.length)return!1;switch(e.type){case "touchstart":c._touches=[[],[]];break;case "touchmove":var d=a.$offset(c.id),f=c._touches[0],g=c._touches[1];f.push([b.touches[0].pageX-d.left,b.touches[0].pageY-d.top]);g.push([b.touches[1].pageX-d.left,b.touches[1].pageY-d.top]);b=f.length;3<b&&(f.shift(),
g.shift());2<=b&&c.applet._processGesture(c._touches)}return!0};a._jsSetMouse=function(c){var e=function(a){return!a.target||0<=(""+a.target.className).indexOf("swingjs-ui")};a.$bind(c,"mousedown touchstart",function(b){if(e(b))return!0;a._allowKeyboardFocus&&c.focus();a._setMouseOwner(c,!0);b.stopPropagation();var d=b.target["data-UI"];(!d||!d.handleJSEvent(c,501,b))&&b.preventDefault();c.isDragging=!0;if("touchstart"==b.type&&a._gestureUpdate(c,b))return!!d;a._setConsoleDiv(c.applet._console);var f=
a._jsGetXY(c,b);f&&(2!=b.button&&a.Swing.hideMenus(c.applet),c.applet._processEvent(501,f));return!!d});a.$bind(c,"mouseup touchend",function(b){if(e(b))return!0;a._setMouseOwner(null);b.stopPropagation();var d=b.target["data-UI"];(!d||!d.handleJSEvent(c,502,b))&&b.preventDefault();c.isDragging=!1;if("touchend"==b.type&&a._gestureUpdate(c,b))return!!d;(b=a._jsGetXY(c,b))&&c.applet._processEvent(502,b);return!!d});a.$bind(c,"mousemove touchmove",function(b){if(e(b))return!0;a._allowKeyboardFocus&&
c.focus();if(a._mouseOwner&&a._mouseOwner!=c&&a._mouseOwner.isDragging){if(!a._mouseOwner.mouseMove)return!0;a._mouseOwner.mouseMove(b);return!1}return a._drag(c,b)});a.$bind(c,"keydown keyup",function(b){if(e(b))return!0;b.stopPropagation();b.preventDefault();var d=a._jsGetXY(c,b),f="keydown"==b.type?401:402;c.applet._processKeyEvent&&c.applet._processKeyEvent(f,d,b);return!0});a._drag=function(c,b){b.stopPropagation();b.preventDefault();if("touchmove"==b.type&&a._gestureUpdate(c,b))return!1;var e=
a._jsGetXY(c,b);if(!e)return!1;c.isDragging||(e[2]=0);var d=b.target["data-UI"];c.isdragging&&(!d||d.handleJSEvent(c,506,b));c.applet._processEvent(c.isDragging?506:503,e);return!!d};a.$bind(c,"DOMMouseScroll mousewheel",function(b){if(e(b))return!0;b.stopPropagation();b.preventDefault();c.isDragging=!1;var d=b.originalEvent,d=d.detail?d.detail:("mac"==a.featureDetection.os?1:-1)*d.wheelDelta;b=a._jsGetMouseModifiers(b);c.applet._processEvent(507,[0>d?-1:1,0,b]);return!1});a.$bind(c,"contextmenu",
function(){return!1});a.$bind(c,"mouseout",function(b){if(e(b))return!0;a._mouseOwner&&(!a._mouseOwner.mouseMove&&!a._mouseOwner.isDragging)&&a._setMouseOwner(null);c.applet._appletPanel&&c.applet._appletPanel.startHoverWatcher(!1);a._jsGetXY(c,b);return!1});a.$bind(c,"mouseenter",function(b){if(e(b))return!0;c.applet._appletPanel&&c.applet._appletPanel.startHoverWatcher(!0);if(0===b.buttons||0===b.which){c.isDragging=!1;b=a._jsGetXY(c,b);if(!b)return!1;c.applet._processEvent(504,b);c.applet._processEvent(502,
b);return!1}});a.$bind(c,"mousemoveoutjsmol",function(b,d,f){if(e(f))return!0;if(c==a._mouseOwner&&c.isDragging)return a._drag(c,f)});c.applet._is2D&&a.$resize(function(){c.applet&&c.applet._resize()});a.$bind("body","mouseup touchend",function(b){if(e(b))return!0;c.applet&&(c.isDragging=!1);a._setMouseOwner(null)})};a._jsUnsetMouse=function(c){c.applet=null;a.$bind(c,"mousedown touchstart mousemove touchmove mouseup touchend DOMMouseScroll mousewheel contextmenu mouseout mouseenter",null);a._setMouseOwner(null)};
a.Swing={count:0,menuInitialized:0,menuCounter:0,htDialogs:{}};var l=a.Swing;SwingController=l;l.setDraggable=function(c){c=c.prototype;c.setContainer||(c.setContainer=function(c){this.container=c;c.obj=this;this.ignoreMouse=this.isDragging=!1;var b=this;c.bind("mousedown touchstart",function(c){if(b.ignoreMouse)return b.ignoreMouse=!1,!0;a._setMouseOwner(b,!0);b.isDragging=!0;b.pageX=c.pageX;b.pageY=c.pageY;return!1});c.bind("mousemove touchmove",function(c){if(b.isDragging&&a._mouseOwner==b)return b.mouseMove(c),
!1});c.bind("mouseup touchend",function(c){b.mouseUp(c);a._setMouseOwner(null)})},c.mouseUp=function(c){if(this.isDragging&&a._mouseOwner==this)return this.pageX0+=c.pageX-this.pageX,this.pageY0+=c.pageY-this.pageY,this.isDragging=!1;a._setMouseOwner(null)},c.setPosition=function(){if(null===a._mousePageX){var c=a.$offset(this.applet._id+"_"+(this.applet._is2D?"canvas2d":"canvas"));a._mousePageX=c.left;a._mousePageY=c.top}this.pageX0=a._mousePageX;this.pageY0=a._mousePageY;this.container.css({top:a._mousePageY+
"px",left:a._mousePageX+"px"})},c.mouseMove=function(c){if(this.isDragging&&a._mouseOwner==this){this.timestamp=System.currentTimeMillis();var b=this.pageX0+(c.pageX-this.pageX);c=this.pageY0+(c.pageY-this.pageY);a._mousePageX=b;a._mousePageY=c;this.container.css({top:c+"px",left:b+"px"})}},c.dragBind=function(c){this.applet._ignoreMouse=!c;this.container.unbind("mousemoveoutjsmol");this.container.unbind("touchmoveoutjsmol");this.container.unbind("mouseupoutjsmol");this.container.unbind("touchendoutjsmol");
a._setMouseOwner(null);if(c){var b=this;this.container.bind("mousemoveoutjsmol touchmoveoutjsmol",function(a,c,e){b.mouseMove(e)});this.container.bind("mouseupoutjsmol touchendoutjsmol",function(a,c,e){b.mouseUp(e)})}})};l.JSDialog=function(){};l.setDraggable(l.JSDialog);l.getScreenDimensions=function(a){a.width=h(window).width();a.height=h(window).height()};l.dispose=function(c){a.$remove(c.id+"_mover");delete l.htDialogs[c.id];c.container.obj.dragBind(!1)};l.register=function(a,b){a.id=b+ ++l.count;
l.htDialogs[a.id]=a};l.setDialog=function(c){a._setMouseOwner(null);a.$remove(c.id);var b=c.id+"_mover",d=a._$(b),f;d[0]?(d.html(c.html),f=d[0].jd):(a.$after("body","<div id='"+b+"' style='position:absolute;left:0px;top:0px;'>"+c.html+"</div>"),f=new l.JSDialog,d=a._$(b),c.container=d,f.applet=c.manager.vwr.html5Applet,f.setContainer(d),f.dialog=c,f.setPosition(),f.dragBind(!0),d[0].jd=f);a.$bind("#"+c.id+" .JButton","mousedown touchstart",function(){f.ignoreMouse=!0});a.$bind("#"+c.id+" .JComboBox",
"mousedown touchstart",function(){f.ignoreMouse=!0});a.$bind("#"+c.id+" .JCheckBox","mousedown touchstart",function(){f.ignoreMouse=!0});a.$bind("#"+c.id+" .JTextField","mousedown touchstart",function(){f.ignoreMouse=!0});a.$bind("#"+c.id+" .JTable","mousedown touchstart",function(){f.ignoreMouse=!0});a.$bind("#"+c.id+" .JScrollPane","mousedown touchstart",function(){f.ignoreMouse=!0});a.$bind("#"+c.id+" .JEditorPane","mousedown touchstart",function(){f.ignoreMouse=!0})};l.setSelected=function(c){a.$prop(c.id,
"checked",!!c.selected)};l.setSelectedIndex=function(c){a.$prop(c.id,"selectedIndex",c.selectedIndex)};l.setText=function(c){a.$prop(c.id,"value",c.text)};l.setVisible=function(c){a.$setVisible(c.id,c._visible)};l.setEnabled=function(c){a.$setEnabled(c.id,c.enabled)};l.click=function(c,b){var d=l.htDialogs[c.id];if(d){var f=d.toString();if(0<=f.indexOf("JCheck"))d.selected=c.checked;else if(0<=f.indexOf("JCombo"))d.selectedIndex=c.selectedIndex;else if(null!=d.text&&(d.text=c.value,b&&13!=(b.charCode||
b.keyCode)))return}f=l.htDialogs[a.$getAncestorDiv(c.id,"JDialog").id];f.manager.actionPerformed(d?d.name:f.registryKey+"/"+c.id)};l.setFront=function(b){var e=b.manager.vwr.html5Applet;b.zIndex!=a._getZ(e,"dialog")&&(b.zIndex=a._incrZ(e,"dialog"));b.container&&((b.container[0]||b.container).style.zIndex=b.zIndex)};l.hideMenus=function(a){if(a=a._menus)for(var b in a)a[b]._visible&&l.hideMenu(a[b])};l.windowClosing=function(b){b=l.htDialogs[a.$getAncestorDiv(b.id,"JDialog").id];b.registryKey?b.manager.processWindowClosing(b.registryKey):
b.dispose()};a._track=function(b){if(a._tracker){try{var e='<iframe style="display:none" width="0" height="0" frameborder="0" tabindex="-1" src="'+(a._tracker+"&applet="+b._jmolType+"&version="+a._version+"&appver="+a.___JmolVersion+"&url="+encodeURIComponent(document.location.href))+'"></iframe>';a.$after("body",e)}catch(d){}delete a._tracker}return b};var m;a.getProfile=function(a){if(self.Clazz&&self.JSON)return m||Clazz._startProfiling(m=0==arguments.length||a),Clazz.getProfile()};a._getInChIKey=
function(a,b){0<=b.indexOf("MOL=")&&b.split("MOL=")[1].split('"')};a._getAttr=function(a,b){var d=a.indexOf(b+"=");return 0<=d&&0<=(d=a.indexOf('"',d))?a.substring(d+1,a.indexOf('"',d+1)):null};a.User={viewUpdatedCallback:null};a.View={count:0,applets:{},sets:{}};(function(b){b.resetView=function(b,c){debugger;if(c){if(c._viewSet){var d=a.View.applets[c._viewSet];for(b in d)b!=c&&a.View.resetView(b)}}else b&&(b._reset(),a.View.updateView(b))};b.updateView=function(e,d){if(null!=e._viewSet){d||(d=
{});d.chemID||(e._searchQuery=null);d.data||(d.data="N/A");d.type=e._viewType;if(null==(e._currentView=b.__findView(e._viewSet,d)))e._currentView=b.__createViewSet(e._viewSet,d.chemID,d.viewID||d.chemID);e._currentView[d.type].data=d.data;e._currentView[d.type].smiles=e._getSmiles();a.User.viewUpdatedCallback&&a.User.viewUpdatedCallback(e,"updateView");b.__setView(e._currentView,e,!1)}};b.updateFromSync=function(e,d){e._updateMsg=d;var f=a._getAttr(d,"sourceID")||a._getAttr(d,"file");if(f){var g=
b.__findView(e._viewSet,{viewID:f});if(null==g)return a.updateView(e,d);g!=e._currentView&&b.__setView(g,e,!0);var k=(f=a._getAttr(d,"atoms"))&&0<=d.indexOf("selectionhalos ON")?eval("["+f+"]"):[];setTimeout(function(){e._currentView==g&&b.updateAtomPick(e,k)},10);a.User.viewUpdatedCallback&&a.User.viewUpdatedCallback(e,"updateFromSync")}};b.updateAtomPick=function(b,c){var d=b._currentView;if(null!=d){for(var f in d)"info"!=f&&d[f].applet!=b&&d[f].applet._updateAtomPick(c);a.User.viewUpdatedCallback&&
a.User.viewUpdatedCallback(b,"updateAtomPick")}};b.dumpViews=function(a){var d=b.sets[a];if(d){var f="View set "+a+":\n";a=b.applets[a];for(var g in a)f+="\napplet "+a[g]._id+" currentView="+(a[g]._currentView?a[g]._currentView.info.viewID:null);for(g=d.length;0<=--g;){a=d[g];var f=f+("\n\n<b>view="+g+" viewID="+a.info.viewID+" chemID="+a.info.chemID+"</b>\n"),k,h;for(h in a)"info"!=h&&(f+="\nview="+g+" type="+h+" applet="+((k=a[h]).applet?k.applet._id:null)+" SMILES="+k.smiles+"\n atomMap="+JSON.stringify(k.atomMap)+
"\n data=\n"+k.data+"\n")}return f}};b.__init=function(a){var d=a._viewSet,f=b.applets;f[d]||(f[d]={});f[d][a._viewType]=a};b.__findView=function(a,d){var f=b.sets[a];null==f&&(f=b.sets[a]=[]);for(var g=f.length;0<=--g;){var k=f[g];if(d.viewID){if(k.info.viewID==d.viewID)return k}else{if(null!=d.chemID&&d.chemID==k.info.chemID)return k;for(var h in k)if("info"!=h&&(null!=d.data&&null!=k[h].data?d.data==k[h].data:d.type==h))return k}}return null};b.__createViewSet=function(e,d,f){b.count++;d={info:{chemID:d,
viewID:f||"model_"+b.count}};for(var g in a._applets)f=a._applets[g],f._viewSet==e&&(d[f._viewType]={applet:f,data:null});b.sets[e].push(d);return d};b.__setView=function(a,b,c){for(var d in a)if("info"!=d){var f=a[d],g=f.applet,k=c||null!=g&&"<modified>"==g._molData;if(!(null==g||g==b&&!k)){var h=null==f.data,l=null!=g._currentView;g._currentView=a;if(!l||!(a[d].data==f.data&&!h&!k))if(g._loadModelFromView(a),h)break}}}})(a.View);a.Cache={fileCache:{}};a.Cache.get=function(b){return a.Cache.fileCache[b]};
a.Cache.put=function(b,e){a.Cache.fileCache[b]=e};a.Cache.setDragDrop=function(b,e){a.$appEvent(b,e,"dragover",function(a){a=a.originalEvent;a.stopPropagation();a.preventDefault();a.dataTransfer.dropEffect="copy"});a.$appEvent(b,e,"drop",function(d){var f=d.originalEvent;f.stopPropagation();f.preventDefault();var g=f.dataTransfer.files[0];if(null==g)try{g=""+f.dataTransfer.getData("text"),(0==g.indexOf("file:/")||0==g.indexOf("http:/")||0==g.indexOf("https:/"))&&b._scriptLoad(g)}catch(k){}else f=
new FileReader,f.onloadend=function(f){if(f.target.readyState==FileReader.DONE){var k="cache://DROP_"+g.name;f=Clazz.newByteArray(-1,f.target.result);if("console_input"==e)k=String.instantialize(f),a.$(b,e).val(0>k.indexOf("\x00")?k:f.length+" bytes");else{k.endsWith(".spt")||b._appletPanel.cacheFileByName("cache://DROP_*",!1);"JSV"==b._viewType||k.endsWith(".jdx")?a.Cache.put(k,f):b._appletPanel.cachePut(k,f);f=a._jsGetXY(b._canvas,d);var h=[null];f&&(!b._appletPanel.setStatusDragDropped||b._appletPanel.setStatusDragDropped(0,
f[0],f[1],k,h))&&b._appletPanel.openFileAsyncSpecialType(k,1,h[0])}}},f.readAsArrayBuffer(g)})}})(Jmol,jQuery);Jmol._debugCode=document&&document.location&&0<=document.location.href.indexOf("j2sdebugcode");
(function(a){a._isAsync=!1;a._asyncCallbacks={};a._coreFiles=[];var h=!1,g=[],d=[],b=0,f=[],k=[],l=function(c){arguments.length||(c=!0);delete b;for(var f;0<d.length&&"done"==(f=d[0])[4];)d.shift();if(0!=d.length)if(!a._isAsync&&!c)setTimeout(l,10);else{f.push("done");var k="JSmol exec "+f[0]._id+" "+f[3]+" "+f[2];self.System&&System.out.println(k);self.console&&console.log(k+" -- OK");g.push(k);f[1](f[0],f[2])}},m=function(b){h?l():(h=!0,LoadClazz(),b._noMonitor&&(Clazz._LoaderProgressMonitor.showStatus=
function(){}),LoadClazz=null,b.__Info.uncompressed&&Clazz.loadClass(),Clazz._Loader.onGlobalLoaded=function(){Clazz._LoaderProgressMonitor.showStatus("Application loaded.",!0);if(!a._debugCode||!a.haveCore)a.haveCore=!0,l()},Clazz._Loader.loadPackageClasspath("java",null,!0,l))},c=function(a,b){Clazz._Loader.loadClass(b,function(){l()})};a.showExecLog=function(){return g.join("\n")};a._addExec=function(a){a[1]||(a[1]=c);var b="JSmol load "+a[0]._id+" "+a[3];self.console&&console.log(b+"...");g.push(b);
d.push(a)};a._addCoreFile=function(b,c,d){b=b.toLowerCase().split(".")[0];if(!(0<=f.join("").indexOf(b))){f.push(b);f.sort();a._coreFiles=[c+"/core/core"+f.join("")+".z.js"];if(d&&(d=d.split(" ")))for(b=0;b<d.length;b++)0>k.join("").indexOf(d[b])&&k.push(c+"/core/core"+d[b]+".z.js");for(b=0;b<k.length;b++)a._coreFiles.push(k[b])}};a._Canvas2D=function(b,c,d,f){this._uniqueId=(""+Math.random()).substring(3);this._id=b;this._is2D=!0;this._isJava=!1;this._jmolType="Jmol._Canvas2D ("+d+")";this._isLayered=
c._isLayered||!1;this._isSwing=c._isSwing||!1;this._isJSV=c._isJSV||!1;this._isAstex=c._isAstex||!1;this._platform=c._platform||"";if(f)return this;window[b]=this;this._createCanvas(b,c);if(!a._document||this._deferApplet)return this;this._init();return this};a._setAppletParams=function(b,c,d,f){for(var g in d)if(!b||0<=b.indexOf(";"+g.toLowerCase()+";"))null==d[g]||"language"==g&&!a.featureDetection.supportsLocalization()||(f?c.put(g,!0===d[g]?Boolean.TRUE:!1===d[g]?Boolean.FALSE:d[g]):c[g]=d[g])};
a._jsSetPrototype=function(c){c._init=function(){this._setupJS();this._showInfo(!0);this._disableInitialConsole&&this._showInfo(!1)};c._createCanvas=function(b,c,d){a._setObject(this,b,c);d&&(this._GLmol=d,this._GLmol.applet=this,this._GLmol.id=this._id);d=a._getWrapper(this,!0);this._deferApplet||(a._document?(a._documentWrite(d),this._newCanvas(!1),d=""):(this._deferApplet=!0,d+="<img width=0 height=0 src=. onerror="+b+"._cover(false) >"));d+=a._getWrapper(this,!1);c.addSelectionOptions&&(d+=a._getGrabberOptions(this));
a._debugAlert&&!a._document&&alert(d);this._code=a._documentWrite(d)};c._newCanvas=function(a){this._is2D?this._createCanvas2d(a):this._GLmol.create()};c._getHtml5Canvas=function(){return this._canvas};c._getWidth=function(){return this._canvas.width};c._getHeight=function(){return this._canvas.height};c._getContentLayer=function(){return a.$(this,"contentLayer")[0]};c._repaintNow=function(){a.repaint(this,!1)};c._createCanvas2d=function(){var b=a.$(this,"appletdiv");try{b[0].removeChild(this._canvas),
this._canvas.frontLayer&&b[0].removeChild(this._canvas.frontLayer),this._canvas.rearLayer&&b[0].removeChild(this._canvas.rearLayer),this._canvas.contentLayer&&b[0].removeChild(this._canvas.contentLayer),a._jsUnsetMouse(this._mouseInterface)}catch(c){}var d=Math.round(b.width())||100,e=Math.round(b.height())||100,f=document.createElement("canvas");f.tabIndex=1;f.outline="none";f.applet=this;this._canvas=f;f.style.width="100%";f.style.height="100%";f.width=d;f.height=e;f.id=this._id+"_canvas2d";b.append(f);
a._$(f.id).css({"z-index":a._getZ(this,"main")});if(this._isLayered){var g=document.createElement("div");f.contentLayer=g;g.id=this._id+"_contentLayer";b.append(g);a._$(g.id).css({zIndex:a._getZ(this,"image"),position:"absolute",left:"0px",top:"0px",width:(this._isSwing?d:0)+"px",height:(this._isSwing?e:0)+"px",overflow:"hidden"});this._isSwing?(b=document.createElement("div"),b.id=this._id+"_swingdiv",a._$(this._id+"_appletinfotablediv").append(b),a._$(b.id).css({zIndex:a._getZ(this,"rear"),position:"absolute",
left:"0px",top:"0px",width:d+"px",height:e+"px",overflow:"hidden"}),this._mouseInterface=f.contentLayer,f.contentLayer.applet=this):this._mouseInterface=this._getLayer("front",b,d,e,!1)}else this._mouseInterface=f;a._jsSetMouse(this._mouseInterface)};c._getLayer=function(b,c,d,e,f){var g=document.createElement("canvas");this._canvas[b+"Layer"]=g;g.style.width="100%";g.style.height="100%";g.id=this._id+"_"+b+"Layer";g.width=d;g.height=e;c.append(g);g.applet=this;a._$(g.id).css({background:f?"rgb(0,0,0,1)":
"rgb(0,0,0,0.001)","z-index":a._getZ(this,b),position:"absolute",left:"0px",top:"0px",overflow:"hidden"});return g};c._setupJS=function(){window["j2s.lib"]={base:this._j2sPath+"/",alias:".",console:this._console,monitorZIndex:a._getZ(this,"monitorZIndex")};0==d.length&&a._addExec([this,m,null,"loadClazz"]);this._addCoreFiles();a._addExec([this,this.__startAppletJS,null,"start applet"]);this._isSigned=!0;this._ready=!1;this._applet=null;this._canScript=function(){return!0};this._savedOrientations=
[];b&&clearTimeout(b);b=setTimeout(l,100)};c.__startAppletJS=function(b){0==a._version.indexOf("$Date: ")&&(a._version=(a._version.substring(7)+" -").split(" -")[0]+" (JSmol/j2s)");var c=Clazz._4Name("java.util.Hashtable").newInstance();a._setAppletParams(b._availableParams,c,b.__Info,Boolean.TRUE);c.put("appletReadyCallback","Jmol._readyCallback");c.put("applet",Boolean.TRUE);c.put("name",b._id);c.put("syncId",a._syncId);a._isAsync&&c.put("async",Boolean.TRUE);b._color&&c.put("bgcolor",b._color);
b._startupScript&&c.put("script",b._startupScript);a._syncedApplets.length&&c.put("synccallback","Jmol._mySyncCallback");c.put("signedApplet","true");c.put("platform",b._platform);b._is2D&&c.put("display",b._id+"_canvas2d");c.put("documentBase",document.location.href);var d=b._j2sPath+"/";if(0>d.indexOf("://")){var e=document.location.href.split("#")[0].split("?")[0].split("/");0==d.indexOf("/")?e=[e[0],d.substring(1)]:e[e.length-1]=d;d=e.join("/")}b._j2sFullPath=d.substring(0,d.length-1);c.put("codePath",
d);a._registerApplet(b._id,b);try{b._newApplet(c)}catch(f){b=(a._isAsync?"normal async abort? from ":"")+f;a._debugCode&&alert(b);System.out.println(b);return}b._jsSetScreenDimensions();l()};c._restoreState||(c._restoreState=function(){});c._jsSetScreenDimensions=function(){if(this._appletPanel){var b=a._getElement(this,this._is2D?"canvas2d":"canvas");this._appletPanel.setScreenDimension(b.width,b.height)}};c._show=function(b){a.$setVisible(a.$(this,"appletdiv"),b);b&&a.repaint(this,!0)};c._canScript=
function(){return!0};c.equals=function(a){return this==a};c.clone=function(){return this};c.hashCode=function(){return parseInt(this._uniqueId)};c._processGesture=function(a){return this._appletPanel.processTwoPointGesture(a)};c._processEvent=function(a,b){this._appletPanel.processMouseEvent(a,b[0],b[1],b[2],System.currentTimeMillis())};c._processKeyEvent=function(a,b,c){this._appletPanel.processKeyEvent({getID:function(){return a},getKeyCode:function(){return c.keyCode},getModifiers:function(){return b[2]},
consume:function(){}})};c._resize=function(){var b="__resizeTimeout_"+this._id;a[b]&&clearTimeout(a[b]);var c=this;a[b]=setTimeout(function(){a.repaint(c,!0);a[b]=null},100)};return c};a.repaint=function(b,c){if(b&&b._appletPanel){var d=a.$(b,"appletdiv"),f=Math.round(d.width()),d=Math.round(d.height());if(b._is2D&&(b._canvas.width!=f||b._canvas.height!=d))b._newCanvas(!0),b._appletPanel.setDisplay(b._canvas);b._appletPanel.setScreenDimension(f,d);f=function(){b._appletPanel.paint?b._appletPanel.paint(null):
b._appletPanel.update(null)};c?requestAnimationFrame(f):f()}};a.loadImage=function(b,c,d,f,g,k){var h="echo_"+c+d+(f?"_"+f.length:""),l=a.getHiddenCanvas(b.vwr.html5Applet,h,0,0,!1,!0);if(null==l){if(null==k){k=new Image;if(null==f)return k.onload=function(){a.loadImage(b,c,d,null,g,k)},k.src=d,null;System.out.println("Jsmol.js Jmol.loadImage using data URI for "+h);k.src="string"==typeof f?f:"data:"+JU.Rdr.guessMimeTypeForBytes(f)+";base64,"+JU.Base64.getBase64(f)}var m=k.width,t=k.height;"webgl"==
c&&(m/=2,t/=2);l=a.getHiddenCanvas(b.vwr.html5Applet,h,m,t,!0,!1);l.imageWidth=m;l.imageHeight=t;l.id=h;l.image=k;a.setCanvasImage(l,m,t)}else System.out.println("Jsmol.js Jmol.loadImage reading cached image for "+h);return null==f?g(l,d):l};a._canvasCache={};a.getHiddenCanvas=function(b,c,d,f,g,k){c=b._id+"_"+c;b=a._canvasCache[c];if(k)return b;if(g||!b||b.width!=d||b.height!=f)b=document.createElement("canvas"),b.width=b.style.width=d,b.height=b.style.height=f,b.id=c,a._canvasCache[c]=b;return b};
a.setCanvasImage=function(a,b,c){a.buf32=null;a.width=b;a.height=c;a.getContext("2d").drawImage(a.image,0,0,a.image.width,a.image.height,0,0,b,c)};a.applyFunc=function(a,b){return a(b)}})(Jmol);
(function(a,h){a._Applet=function(b,d,g){window[b]=this;this._jmolType="Jmol._Applet"+(d.isSigned?" (signed)":"");this._viewType="Jmol";this._isJava=!0;this._syncKeyword="Select:";this._availableParams=";progressbar;progresscolor;boxbgcolor;boxfgcolor;allowjavascript;boxmessage;\t\t\t;animframecallback;appletreadycallback;atommovedcallback;audiocallback;\t\t\t;clickcallback;dragdropcallback;echocallback;errorcallback;evalcallback;hovercallback;\t\t\t;imagecallback;loadstructcallback;measurecallback;messagecallback;minimizationcallback;modelkitcallback;pickcallback;\t\t\t;resizecallback;scriptcallback;selectcallback;servicecallback;structuremodifiedcallback;synccallback;\t\t\t;statusform;statustext;statustextarea;usecommandthread;syncid;appletid;startupscript;language;menufile;";if(g)return this;
this._isSigned=d.isSigned;this._readyFunction=d.readyFunction;this._ready=!1;this._isJava=!0;this._isInfoVisible=!1;this._applet=null;this._memoryLimit=d.memoryLimit||512;this._canScript=function(){return!0};this._savedOrientations=[];this._initialize=function(b,g){var c=!1;a._jarFile&&(g=a._jarFile);if(this._jarFile){var e=this._jarFile;0<=e.indexOf("/")?(alert("This web page URL is requesting that the applet used be "+e+". This is a possible security risk, particularly if the applet is signed, because signed applets can read and write files on your local machine or network."),
"yes"==prompt("Do you want to use applet "+e+"? ","yes or no")?(b=e.substring(0,e.lastIndexOf("/")),g=e.substring(e.lastIndexOf("/")+1)):c=!0):g=e;this_isSigned=d.isSigned=0<=g.indexOf("Signed")}this._jarPath=d.jarPath=b||".";this._jarFile=d.jarFile="string"==typeof g?g:(g?"JmolAppletSigned":"JmolApplet")+"0.jar";c&&alert("The web page URL was ignored. Continuing using "+this._jarFile+' in directory "'+this._jarPath+'"');void 0==a.controls||a.controls._onloadResetForms()};this._create(b,d);return this};
var g=a._Applet,d=a._Applet.prototype;g._get=function(b,d,k){k||(k=!1);d||(d={});a._addDefaultInfo(d,{color:"#FFFFFF",width:300,height:300,addSelectionOptions:!1,serverURL:"http://your.server.here/jsmol.php",defaultModel:"",script:null,src:null,readyFunction:null,use:"HTML5",jarPath:"java",jarFile:"JmolApplet0.jar",isSigned:!1,j2sPath:"j2s",coverImage:null,makeLiveImage:null,coverTitle:"",coverCommand:"",deferApplet:!1,deferUncover:!1,disableJ2SLoadMonitor:!1,disableInitialConsole:!0,debug:!1});a._debugAlert=
d.debug;d.serverURL&&(a._serverUrl=d.serverURL);for(var h=!1,m=null,c=d.use.toUpperCase().split("#")[0].split(" "),e=0;e<c.length;e++){switch(c[e]){case "JAVA":h=!0;a.featureDetection.supportsJava()&&(m=new g(b,d,k));break;case "WEBGL":m=g._getCanvas(b,d,k,!0);break;case "HTML5":a.featureDetection.allowHTML5?m=g._getCanvas(b,d,k,!1):c.push("JAVA")}if(null!=m)break}null==m&&(k||!h?m={_jmolType:"none"}:h&&(m=new g(b,d)));return k?m:a._registerApplet(b,m)};g._getCanvas=function(b,d,k,h){d._isLayered=
!1;d._platform="J.awtjs2d.Platform";return h&&a.featureDetection.supportsWebGL()?(a._Canvas3D.prototype=a.GLmol.extendApplet(a._jsSetPrototype(new g(b,d,!0))),new a._Canvas3D(b,d,"Jmol",k)):!h?(a._Canvas2D.prototype=a._jsSetPrototype(new g(b,d,!0)),new a._Canvas2D(b,d,"Jmol",k)):null};g._noJavaMsg="Either you do not have Java applets enabled in your web<br />browser or your browser is blocking this applet.<br />\t\t\tCheck the warning message from your browser and/or enable Java applets in<br />\t\t\tyour web browser preferences, or install the Java Runtime Environment from <a href='http://www.java.com'>www.java.com</a>";
g._setCommonMethods=function(a){a._showInfo=d._showInfo;a._search=d._search;a._getName=d._getName;a._readyCallback=d._readyCallback};g._createApplet=function(b,d,k){b._initialize(d.jarPath,d.jarFile);var l=b._jarFile;a._isFile&&(l=l.replace(/0\.jar/,".jar"));var m=0<=b._containerWidth.indexOf("px")?b._containerWidth:"100%",c=0<=b._containerHeight.indexOf("px")?b._containerHeight:"100%",m=' style="width:'+m+";height:"+c+'" ',c="name='"+b._id+"_object' id='"+b._id+"_object' \n"+m+"\n";k.codebase=b._jarPath;
k.codePath=k.codebase+"/";if(0>k.codePath.indexOf("://")){var e=h.location.href.split("#")[0].split("?")[0].split("/");e[e.length-1]=k.codePath;k.codePath=e.join("/")}k.archive=l;k.mayscript="true";k.java_arguments="-Xmx"+Math.round(d.memoryLimit||b._memoryLimit)+"m";k.permissions=b._isSigned?"all-permissions":"sandbox";k.documentLocation=h.location.href;k.documentBase=h.location.href.split("#")[0].split("?")[0];k.jarPath=d.jarPath;a._syncedApplets.length&&(k.synccallback="Jmol._mySyncCallback");
b._startupScript&&(k.script=b._startupScript);var e="\n",j;for(j in k)k[j]&&(e+="  <param name='"+j+"' value='"+k[j]+"' />\n");e=a.featureDetection.useIEObject||a.featureDetection.useHtml4Object?"<object "+c+(a.featureDetection.useIEObject?" classid='clsid:8AD9C840-044E-11D1-B3E9-00805F499D93' codebase='http://java.sun.com/update/1.6.0/jinstall-6u22-windows-i586.cab'>":" type='application/x-java-applet'>")+e+"<p style='background-color:yellow;"+m.split('"')[1]+";text-align:center;vertical-align:middle;'>\n"+
g._noJavaMsg+"</p></object>\n":"<applet "+c+" code='"+k.code+"' codebase='"+b._jarPath+"' archive='"+l+"' mayscript='true'>\n"+e+"<table bgcolor='yellow'><tr><td align='center' valign='middle' "+m+">\n"+g._noJavaMsg+"</td></tr></table></applet>\n";b._deferApplet&&(b._javaCode=e,e="");e=a._getWrapper(b,!0)+e+a._getWrapper(b,!1)+(d.addSelectionOptions?a._getGrabberOptions(b):"");a._debugAlert&&alert(e);b._code=a._documentWrite(e)};d._newApplet=function(a){this._is2D||a.put("script",(a.get("script")||
"")+";set multipleBondSpacing 0.35;");this._viewerOptions=a;return new J.appletjs.Jmol(a)};d._addCoreFiles=function(){a._addCoreFile("jmol"+(a._debugCode?"debug":""),this._j2sPath,this.__Info.preloadCore);a._debugCode&&a._addCoreFile("jmoldebug",this._j2sPath,this.__Info.preloadCore);this._is2D||a._addExec([this,null,"J.export.JSExporter","load JSExporter"]);a._debugCode&&a._addExec([this,null,"J.appletjs.Jmol","load Jmol"])};d._create=function(b,d){a._setObject(this,b,d);var k={syncId:a._syncId,
progressbar:"true",progresscolor:"blue",boxbgcolor:this._color||"black",boxfgcolor:"white",boxmessage:"Downloading JmolApplet ...",script:this._color?'background "'+this._color+'"':"",code:"JmolApplet.class"};a._setAppletParams(this._availableParams,k,d);var h;d.inlineModel?(h=d.inlineModel,h=h.replace(/\r|\n|\r\n/g,0<=h.indexOf("|")?"\\/n":"|").replace(/'/g,"&#39;"),a._debugAlert&&alert("inline model:\n"+h)):h="";k.loadInline=h;k.appletReadyCallback="Jmol._readyCallback";a._syncedApplets.length&&
(k.synccallback="Jmol._mySyncCallback");k.java_arguments="-Xmx"+Math.round(d.memoryLimit||this._memoryLimit)+"m";this._initialize(d.jarPath,d.jarFile);g._createApplet(this,d,k)};d._restoreState=function(b,d){System.out.println("\n\nasynchronous restore state for "+b+" "+d);var g=this,h=g._applet&&g._applet.viewer;switch(d){case "setOptions":return function(){g.__startAppletJS(g)};case "render":return function(){setTimeout(function(){h.refresh(2)},10)};default:switch(b){case "J.shape.Balls":case "J.shape.Sticks":case "J.shape.Frank":return null}if(h&&
h.isScriptExecuting&&h.isScriptExecuting()){if(a._asyncCallbacks[b])return System.out.println("...ignored"),1;var m=h.getEvalContextAndHoldQueue(h.eval),c=m.pc-1;m.asyncID=b;a._asyncCallbacks[b]=function(a){m.pc=a;System.out.println("sc.asyncID="+m.asyncID+" sc.pc = "+m.pc);h.eval.resumeEval(m)};h.eval.pc=h.eval.pcEnd;System.out.println("setting resume for pc="+m.pc+" "+b+" to "+a._asyncCallbacks[b]+"//");return function(){System.out.println("resuming "+b+" "+a._asyncCallbacks[b]);a._asyncCallbacks[b](c)}}System.out.println(b+
"?????????????????????"+d);return function(){setTimeout(function(){h.refresh(2)},10)}}};d._notifyAudioEnded=function(a){this._applet.notifyAudioEnded(a)};d._readyCallback=function(b,d,g){if(g){a._setDestroy(this);this._ready=!0;b=this._readyScript;this._defaultModel?a._search(this,this._defaultModel,b?";"+b:""):b?this._script(b):this._src&&this._script('load "'+this._src+'"');this._showInfo(!0);this._showInfo(!1);a.Cache.setDragDrop(this,"appletdiv");this._readyFunction&&this._readyFunction(this);
a._setReady(this);if((b=this._2dapplet)&&b._isEmbedded&&b._ready&&b.__Info.visible)this._show2d(!0),this._show2d(!1),this._show2d(!0);a._hideLoadingSpinner(this)}};d._showInfo=function(b){b&&this._2dapplet&&this._2dapplet._show(!1);a.$html(a.$(this,"infoheaderspan"),this._infoHeader);this._info&&a.$html(a.$(this,"infodiv"),this._info);if(!this._isInfoVisible!=!b){this._isInfoVisible=b;if(this._isJava){var d=b?2:"100%";a.$setSize(a.$(this,"appletdiv"),d,d)}a.$setVisible(a.$(this,"infotablediv"),b);
a.$setVisible(a.$(this,"infoheaderdiv"),b);this._show(!b)}};d._show2d=function(a){this._2dapplet._show2d(a);this._2dapplet._isEmbedded&&(this._showInfo(!1),this._show(!a),this._2dapplet.__showContainer(!0,!0))};d._getSpinner=function(){return this.__Info.appletLoadingImage||this._j2sPath+"/img/JSmol_spinner.gif"};d._getAtomCorrelation=function(a,d){var g=this._evaluate("{*}.count");if(0!=g){this._loadMolData(a,"atommap = compare({1.1} {2.1} 'MAP' "+(d?"":"'H'")+"); zap 2.1",!0);for(var h=this._evaluate("atommap"),
m=[],c=[],e=0;e<h.length;e++){var j=h[e];m[j[0]+1]=j[1]-g+1;c[j[1]-g+1]=j[0]+1}return{fromJmol:m,toJmol:c}}};d._show=function(b){var d=!b?2:"100%";a.$setSize(a.$(this,"object"),d,d);this._isJava||a.$setVisible(a.$(this,"appletdiv"),b)};d._clearConsole=function(){this._console==this._id+"_infodiv"&&(this.info="");self.Clazz&&(a._setConsoleDiv(this._console),Clazz.Console.clear())};d._addScript=function(a){this._readyScript||(this.readyScript="");this._readyScript&&(this._readyScript+=";");this._readyScript+=
a;return!0};d._setCallback=function(a,d){this._applet.setCallback(a,d)};d._script=function(b){if(!this._ready)return this._addScript(b);a._setConsoleDiv(this._console);a._hideLocalFileReader(this);this._applet.script(b)};d._syncScript=function(a){this._applet.syncScript(a)};d._scriptCheck=function(a){return this._ready&&this._applet.scriptCheck(a)};d._scriptWait=function(a,d){var g=this._scriptWaitAsArray(a),h="";if(!d)for(var m=g.length;0<=--m;)for(var c=0,e=g[m].length;c<e;c++)h+=g[m][c]+"\n";return h};
d._scriptEcho=function(a){a=this._scriptWaitAsArray(a);for(var d="",g=a.length;0<=--g;)for(var h=a[g].length;0<=--h;)"scriptEcho"==a[g][h][1]&&(d+=a[g][h][3]+"\n");return d.replace(/ \| /g,"\n")};d._scriptMessage=function(a){a=this._scriptWaitAsArray(a);for(var d="",g=a.length;0<=--g;)for(var h=a[g].length;0<=--h;)"scriptStatus"==a[g][h][1]&&(d+=a[g][h][3]+"\n");return d.replace(/ \| /g,"\n")};d._scriptWaitOutput=function(a){var d="";try{a&&(d+=this._applet.scriptWaitOutput(a))}catch(g){}return d};
d._scriptWaitAsArray=function(b){var d="";try{if(this._getStatus("scriptEcho,scriptMessage,scriptStatus,scriptError"),b&&(d+=this._applet.scriptWait(b),d=a._evalJSON(d,"jmolStatus"),"object"==typeof d))return d}catch(g){}return[[d]]};d._getStatus=function(b){return a._sortMessages(this._getPropertyAsArray("jmolStatus",b))};d._getPropertyAsArray=function(b,d){return a._evalJSON(this._getPropertyAsJSON(b,d),b)};d._getPropertyAsString=function(a,d){void 0==d&&(d="");return this._applet.getPropertyAsString(a,
d)+""};d._getPropertyAsJSON=function(a,d){void 0==d&&(d="");try{return this._applet.getPropertyAsJSON(a,d)+""}catch(g){return""}};d._getPropertyAsJavaObject=function(a,d){void 0==d&&(d="");return this._applet.getProperty(a,d)};d._evaluate=function(a){null!=a||(a="");return this._getPropertyAsArray("variableInfo",a)};d._evaluateDEPRECATED=function(a){a=""+this._getPropertyAsJavaObject("evaluate",a);var d=a.replace(/\-*\d+/,"");if(""==d&&!isNaN(parseInt(a)))return parseInt(a);d=a.replace(/\-*\d*\.\d*/,
"");return""==d&&!isNaN(parseFloat(a))?parseFloat(a):a};d._saveOrientation=function(a){return this._savedOrientations[a]=this._getPropertyAsArray("orientationInfo","info").moveTo};d._restoreOrientation=function(a){a=this._savedOrientations[a];return!a||""==a?a.replace(/1\.0/,"0"):this._scriptWait(a)};d._restoreOrientationDelayed=function(a,d){1>arguments.length&&(d=1);var g=this._savedOrientations[a];return!g||""==g?g.replace(/1\.0/,d):this._scriptWait(g)};d._resizeApplet=function(b){function d(b,
g){var c=""+b;return 0==c.length?g?"":a._allowedJmolSize[2]:c.indexOf("%")==c.length-1?c:1>=(b=parseFloat(b))&&0<b?100*b+"%":(isNaN(b=Math.floor(b))?a._allowedJmolSize[2]:b<a._allowedJmolSize[0]?a._allowedJmolSize[0]:b>a._allowedJmolSize[1]?a._allowedJmolSize[1]:b)+(g?g:"")}var g;"object"==typeof b&&null!=b?(g=b[0]||b.width,b=b[1]||b.height):g=b;g=[d(g,"px"),d(b,"px")];b=a._getElement(this,"appletinfotablediv");b.style.width=g[0];b.style.height=g[1];this._containerWidth=g[0];this._containerHeight=
g[1];this._is2D&&a.repaint(this,!0)};d._search=function(b,d){a._search(this,b,d)};d._searchDatabase=function(b,d,g){if(this._2dapplet&&this._2dapplet._isEmbedded&&!a.$(this,"appletdiv:visible")[0])return this._2dapplet._searchDatabase(b,d,g);this._showInfo(!1);0<=b.indexOf("?")?a._getInfoFromDatabase(this,d,b.split("?")[0]):(g||(g=a._getScriptForDatabase(d)),b=d+b,this._currentView=null,this._searchQuery=b,this._loadFile(b,g,b))};d._loadFile=function(b,d,g){this._showInfo(!1);d||(d="");this._thisJmolModel=
""+Math.random();this._fileName=b;if(!this._scriptLoad(b,d)){var h=this;a._loadFileData(this,b,function(a){h.__loadModel(a,d,g)},function(){h.__loadModel(null)})}};d._scriptLoad=function(a,d){d||(d="");var g=this._isJava||!this._noscript;g&&this._script("zap;set echo middle center;echo Retrieving data...");if(!this._isSigned||null!=this._viewSet)return!1;g?this._script('load async "'+a+'";'+d):this._applet.openFile(a);this._checkDeferred("");return!0};d.__loadModel=function(b,d,g){null!=b&&(null!=
this._viewSet&&(d||(d=""),d+=";if ({*}.molecule.max > 1 || {*}.modelindex.max > 0){ delete molecule > 1 or modelindex > 0;x = getProperty('extractModel',{*});load inline @x};"),!d&&this._noscript?this._applet.loadInlineString(b,"",!1):this._loadMolData(b,d,!1),null!=this._viewSet&&a.View.updateView(this,{chemID:g,data:b}))};d._loadMolData=function(a,d,g){d||(d="");g=g?"append":"model";this._applet.scriptWait('load DATA "'+g+'"'+a+'\nEND "'+g+'" ;'+d)};d._loadModelFromView=function(b){this._currentView=
b;var d=b.Jmol;null!=d.data?this.__loadModel(d.data,null,b.info.chemID):null!=b.info.chemID?a._searchMol(this,b.info.chemID,null,!1):(d=b.JME)&&d.applet._show2d(!1,this)};d._reset=function(){this._scriptWait("zap",!0)};d._updateView=function(){null!=this._viewSet&&this._applet&&(chemID=""+this._getPropertyAsJavaObject("variableInfo","script('show chemical inchiKey')"),chemID=36>chemID.length?null:chemID.substring(36).split("\n")[0],a.View.updateView(this,{chemID:chemID,data:""+this._getPropertyAsJavaObject("evaluate",
"extractModel","{visible}")}))};d._atomPickedCallback=function(b,d){if(!(0>d)){var g=[d+1];a.View.updateAtomPick(this,g);this._updateAtomPick(g)}};d._updateAtomPick=function(a){this._script(0==a.length?"select none":"select on visible and (@"+a.join(",@")+")")};d._isDeferred=function(){return!this._canvas&&this._cover&&this._isCovered&&this._deferApplet};d._checkDeferred=function(a){return this._isDeferred()?(this._coverScript=a,this._cover(!1),!0):!1};d._cover=function(b){b||!this._deferApplet?this._displayCoverImage(b):
(b=this._coverScript?this._coverScript:"",this._coverScript="",this._deferUncover&&(b+=";refresh;javascript "+this._id+"._displayCoverImage(false)"),this._script(b,!0),this._deferUncover&&"activate 3D model"==this._coverTitle&&(a._getElement(this,"coverimage").title="3D model is loading..."),this._isJava||this._newCanvas(!1),this._defaultModel&&a._search(this,this._defaultModel),this._showInfo(!1),this._deferUncover||this._displayCoverImage(!1),this._isJava&&a.$html(a.$(this,"appletdiv"),this._javaCode),
this._init&&this._init())};d._displayCoverImage=function(b){this._coverImage&&this._isCovered!=b&&(this._isCovered=b,a._getElement(this,"coverdiv").style.display=b?"block":"none")};d._getSmiles=function(){return this._evaluate("{visible}.find('SMILES')")};d._getMol=function(){return this._evaluate("getProperty('ExtractModel',{visible})")};d._getMol2D=function(){return this._evaluate("script('select visible;show chemical sdf')")};a.jmolSmiles=function(a){return a._getSmiles()}})(Jmol,document);
(function(a){var h=a.controls={_hasResetForms:!1,_scripts:[""],_checkboxMasters:{},_checkboxItems:{},_actions:{},_buttonCount:0,_checkboxCount:0,_radioGroupCount:0,_radioCount:0,_linkCount:0,_cmdCount:0,_menuCount:0,_previousOnloadHandler:null,_control:null,_element:null,_appletCssClass:null,_appletCssText:"",_buttonCssClass:null,_buttonCssText:"",_checkboxCssClass:null,_checkboxCssText:"",_radioCssClass:null,_radioCssText:"",_linkCssClass:null,_linkCssText:"",_menuCssClass:null,_menuCssText:""};
h._addScript=function(a,d){var b=h._scripts.length;h._scripts[b]=[a,d];return b};h._getIdForControl=function(a,d){return"string"==typeof a?a:!d||!a._canScript||a._canScript(d)?a._id:null};h._radio=function(a,d,b,f,k,l,m,c){var e=h._getIdForControl(a,d);if(null==e)return null;++h._radioCount;void 0!=l&&null!=l||(l="jmolRadioGroup"+(h._radioGroupCount-1));if(!d)return"";void 0!=m&&null!=m||(m="jmolRadio"+(h._radioCount-1));void 0!=b&&null!=b||(b=d.substring(0,32));k||(k="");a="</span>";h._actions[m]=
h._addScript(e,d);d='<span id="span_'+m+'"'+(c?' title="'+c+'"':"")+"><input name='"+l+"' id='"+m+"' type='radio' onclick='Jmol.controls._click(this);return true;' onmouseover='Jmol.controls._mouseOver(this);return true;' onmouseout='Jmol.controls._mouseOut()' "+(f?"checked='true' ":"")+h._radioCssText+" />";0<=b.toLowerCase().indexOf("<td>")&&(d+=a,a="");return d+('<label for="'+m+'">'+b+"</label>"+a+k)};h._scriptExecute=function(g,d){var b=a._applets[d[0]],f=d[1];if("object"==typeof f)f[0](g,f,
b);else"function"==typeof f?f(b):a.script(b,f)};h.__checkScript=function(a,d){var b=0<=d.value.indexOf("JSCONSOLE ")||""===a._scriptCheck(d.value);d.style.color=b?"black":"red";return b};h.__getCmd=function(a,d){if(d._cmds&&d._cmds.length){var b=d._cmds[d._cmdpt=(d._cmdpt+d._cmds.length+a)%d._cmds.length];setTimeout(function(){d.value=b},10);d._cmdadd=1;d._cmddir=a}};h._commandKeyPress=function(g,d,b){g=13==g?13:window.event?window.event.keyCode:g?g.keyCode||g.which:0;var f=document.getElementById(d),
k=a._applets[b];switch(g){case 13:return d=f.value,h._scriptExecute(f,[b,d]),f._cmds||(f._cmds=[],f._cmddir=0,f._cmdpt=-1,f._cmdadd=0),d&&0==f._cmdadd?(++f._cmdpt,f._cmds.splice(f._cmdpt,0,d),f._cmdadd=0,f._cmddir=0):f._cmdadd=0,f.value="",!1;case 27:return setTimeout(function(){f.value=""},20),!1;case 38:h.__getCmd(-1,f);break;case 40:h.__getCmd(1,f);break;default:f._cmdadd=0}setTimeout(function(){h.__checkScript(k,f)},20);return!0};h._click=function(a,d){h._element=a;1==arguments.length&&(d=h._actions[a.id]);
h._scriptExecute(a,h._scripts[d])};h._menuSelected=function(a){var d=a.value;if(void 0!=d)h._scriptExecute(a,h._scripts[d]);else{d=a.length;if("number"==typeof d)for(var b=0;b<d;++b)if(a[b].selected){h._click(a[b],a[b].value);return}alert("?Que? menu selected bug #8734")}};h._cbNotifyMaster=function(a){var d=!0,b=!0,f=!1,k,l;for(l in a.chkGroup)k=a.chkGroup[l],k.checked?b=!1:d=!1,k.indeterminate&&(f=!0);k=a.chkMaster;d?k.checked=!0:b?k.checked=!1:f=!0;k.indeterminate=f;(a=h._checkboxItems[k.id])&&
(k=a.chkMaster)&&h._cbNotifyMaster(h._checkboxMasters[k.id])};h._cbNotifyGroup=function(a,d){for(var b in a.chkGroup){var f=a.chkGroup[b];f.checked!=d&&(f.checked=d,h._cbClick(f));h._checkboxMasters[f.id]&&h._cbNotifyGroup(h._checkboxMasters[f.id],d)}};h._cbSetCheckboxGroup=function(a,d,b){var f=a;"number"==typeof f&&(f="jmolCheckbox"+f);(a=document.getElementById(f))||alert("jmolSetCheckboxGroup: master checkbox not found: "+f);var k=h._checkboxMasters[f]={};k.chkMaster=a;k.chkGroup={};"string"==
typeof d?(d=b,f=1):f=0;for(a=f;a<d.length;a++)f=d[a],"number"==typeof f&&(f="jmolCheckbox"+f),(b=document.getElementById(f))||alert("jmolSetCheckboxGroup: group checkbox not found: "+f),k.chkGroup[f]=b,h._checkboxItems[f]=k};h._cbClick=function(a){h._control=a;var d=h._actions[a.id][0],b=h._actions[a.id][1];h._click(a,a.checked?d:b);h._checkboxMasters[a.id]&&h._cbNotifyGroup(h._checkboxMasters[a.id],a.checked);h._checkboxItems[a.id]&&h._cbNotifyMaster(h._checkboxItems[a.id])};h._cbOver=function(a){var d=
h._actions[a.id][0],b=h._actions[a.id][1];window.status=h._scripts[a.checked?b:d]};h._mouseOver=function(a,d){1==arguments.length&&(d=h._actions[a.id]);window.status=h._scripts[d]};h._mouseOut=function(){window.status=" ";return!0};h._onloadResetForms=function(){h._hasResetForms||(h._hasResetForms=!0,h._previousOnloadHandler=window.onload,window.onload=function(){if(0<h._buttonCount+h._checkboxCount+h._menuCount+h._radioCount+h._radioGroupCount)for(var a=document.forms,d=a.length;0<=--d;)a[d].reset();
h._previousOnloadHandler&&h._previousOnloadHandler()})};h._getButton=function(g,d,b,f,k){g=h._getIdForControl(g,d);if(null==g)return"";void 0!=f&&null!=f||(f="jmolButton"+h._buttonCount);void 0!=b&&null!=b||(b=d.substring(0,32));++h._buttonCount;h._actions[f]=h._addScript(g,d);d='<span id="span_'+f+'"'+(k?' title="'+k+'"':"")+"><input type='button' name='"+f+"' id='"+f+"' value='"+b+"' onclick='Jmol.controls._click(this)' onmouseover='Jmol.controls._mouseOver(this);return true' onmouseout='Jmol.controls._mouseOut()' "+
h._buttonCssText+" /></span>";a._debugAlert&&alert(d);return a._documentWrite(d)};h._getCheckbox=function(g,d,b,f,k,l,m){var c=h._getIdForControl(g,d);null!=c&&(c=h._getIdForControl(g,b));if(null==c)return"";void 0!=l&&null!=l||(l="jmolCheckbox"+h._checkboxCount);++h._checkboxCount;if(void 0==d||null==d||void 0==b||null==b)alert("jmolCheckbox requires two scripts");else if(void 0==f||null==f)alert("jmolCheckbox requires a label");else return h._actions[l]=[h._addScript(c,d),h._addScript(c,b)],g="</span>",
k='<span id="span_'+l+'"'+(m?' title="'+m+'"':"")+"><input type='checkbox' name='"+l+"' id='"+l+"' onclick='Jmol.controls._cbClick(this)' onmouseover='Jmol.controls._cbOver(this);return true' onmouseout='Jmol.controls._mouseOut()' "+(k?"checked='true' ":"")+h._checkboxCssText+" />",0<=f.toLowerCase().indexOf("<td>")&&(k+=g,g=""),k+='<label for="'+l+'">'+f+"</label>"+g,a._debugAlert&&alert(k),a._documentWrite(k)};h._getCommandInput=function(g,d,b,f,k,l){g=h._getIdForControl(g,"x");if(null==g)return"";
void 0!=f&&null!=f||(f="jmolCmd"+h._cmdCount);void 0!=d&&null!=d||(d="Execute");void 0!=b&&!isNaN(b)||(b=60);void 0!=l||(l="help");++h._cmdCount;d='<span id="span_'+f+'"'+(k?' title="'+k+'"':"")+"><input name='"+f+"' id='"+f+"' size='"+b+"' onkeydown='return Jmol.controls._commandKeyPress(event,\""+f+'","'+g+"\")' value='"+l+"'/><input  type='button' name='"+f+"Btn' id='"+f+"Btn' value = '"+d+"' onclick='Jmol.controls._commandKeyPress(13,\""+f+'","'+g+"\")' /></span>";a._debugAlert&&alert(d);return a._documentWrite(d)};
h._getLink=function(g,d,b,f,k){g=h._getIdForControl(g,d);if(null==g)return"";void 0!=f&&null!=f||(f="jmolLink"+h._linkCount);void 0!=b&&null!=b||(b=d.substring(0,32));++h._linkCount;d=h._addScript(g,d);b='<span id="span_'+f+'"'+(k?' title="'+k+'"':"")+"><a name='"+f+"' id='"+f+"' href='javascript:Jmol.controls._click(null,"+d+");' onmouseover='Jmol.controls._mouseOver(null,"+d+");return true;' onmouseout='Jmol.controls._mouseOut()' "+h._linkCssText+">"+b+"</a></span>";a._debugAlert&&alert(b);return a._documentWrite(b)};
h._getMenu=function(g,d,b,f,k){var l=h._getIdForControl(g,null);void 0!=f&&null!=f||(f="jmolMenu"+h._menuCount);++h._menuCount;l=typeof d;if(null!=l&&"object"==l&&d.length){var m=d.length;"number"!=typeof b||1==b?b=null:0>b&&(b=m);b='<span id="span_'+f+'"'+(k?' title="'+k+'"':"")+"><select name='"+f+"' id='"+f+"' onChange='Jmol.controls._menuSelected(this)'"+(b?" size='"+b+"' ":"")+h._menuCssText+">";for(f=0;f<m;++f){var c=d[f],l=typeof c,e=null,j=k=null;"object"==l&&null!=c?(e=c[0],k=c[1],j=c[2]):
e=k=c;l=h._getIdForControl(g,e);if(null==l)return"";null==k&&(k=e);"#optgroup"==e?b+="<optgroup label='"+k+"'>":"#optgroupEnd"==e?b+="</optgroup>":(l=h._addScript(l,e),b+="<option value='"+l+(j?"' selected='true'>":"'>")+k+"</option>")}b+="</select></span>";a._debugAlert&&alert(b);return a._documentWrite(b)}};h._getRadio=function(g,d,b,f,k,l,m,c){0==h._radioGroupCount&&++h._radioGroupCount;l||(l="jmolRadioGroup"+(h._radioGroupCount-1));g=h._radio(g,d,b,f,k,l,m?m:l+"_"+h._radioCount,c?c:0);if(null==
g)return"";a._debugAlert&&alert(g);return a._documentWrite(g)};h._getRadioGroup=function(g,d,b,f,k,l){var m=typeof d;if("object"!=m||null==m||!d.length)alert("invalid arrayOfRadioButtons");else{void 0!=b&&null!=b||(b="&#xa0; ");var c=d.length;++h._radioGroupCount;f||(f="jmolRadioGroup"+(h._radioGroupCount-1));for(var e="<span id='"+(k?k:f)+"'>",j=0;j<c;++j){j==c-1&&(b="");var s=d[j],m=typeof s,H=null,e="object"==m?e+(H=h._radio(g,s[0],s[1],s[2],b,f,3<s.length?s[3]:(k?k:f)+"_"+j,4<s.length?s[4]:0,
l)):e+(H=h._radio(g,s,null,null,b,f,(k?k:f)+"_"+j,l));if(null==H)return""}e+="</span>";a._debugAlert&&alert(e);return a._documentWrite(e)}}})(Jmol);
(function(a){var h=function(a){a="&"+a+"=";return decodeURI(("&"+document.location.search.substring(1)+a).split(a)[1].split("&")[0])};a._j2sPath=h("_J2S");a._jarFile=h("_JAR");a._use=h("_USE");a.getVersion=function(){return a._jmolInfo.version};a.getApplet=function(g,d,b){return a._Applet._get(g,d,b)};a.getJMEApplet=function(g,d,b,f){return a._JMEApplet._get(g,d,b,f)};a.getJSVApplet=function(g,d,b){return a._JSVApplet._get(g,d,b)};a.setCallback=function(a,d,b){a._setCallback(d,b)};a.loadFile=function(a,
d,b){a._loadFile(d,b)};a.script=function(a,d){a._checkDeferred(d)||a._script(d)};a.scriptCheck=function(a,d){return a&&a._scriptCheck&&a._ready&&a._scriptCheck(d)};a.scriptWait=function(a,d){return a._scriptWait(d)};a.scriptEcho=function(a,d){return a._scriptEcho(d)};a.scriptMessage=function(a,d){return a._scriptMessage(d)};a.scriptWaitOutput=function(a,d){return a._scriptWait(d)};a.scriptWaitAsArray=function(a,d){return a._scriptWaitAsArray(d)};a.search=function(a,d,b){a._search(d,b)};a.evaluateVar=
function(a,d){return a._evaluate(d)};a.evaluate=function(a,d){return a._evaluateDEPRECATED(d)};a.getAppletHtml=function(g,d){if(d){var b=a._document;a._document=null;g=a.getApplet(g,d);a._document=b}return g._code};a.getPropertyAsArray=function(a,d,b){return a._getPropertyAsArray(d,b)};a.getPropertyAsJavaObject=function(a,d,b){return a._getPropertyAsJavaObject(d,b)};a.getPropertyAsJSON=function(a,d,b){return a._getPropertyAsJSON(d,b)};a.getPropertyAsString=function(a,d,b){return a._getPropertyAsString(d,
b)};a.getStatus=function(a,d){return a._getStatus(d)};a.resizeApplet=function(a,d){return a._resizeApplet(d)};a.restoreOrientation=function(a,d){return a._restoreOrientation(d)};a.restoreOrientationDelayed=function(a,d,b){return a._restoreOrientationDelayed(d,b)};a.saveOrientation=function(a,d){return a._saveOrientation(d)};a.say=function(a){alert(a)};a.clearConsole=function(a){a._clearConsole()};a.getInfo=function(a){return a._info};a.setInfo=function(a,d,b){a._info=d;2<arguments.length&&a._showInfo(b)};
a.showInfo=function(a,d){a._showInfo(d)};a.show2d=function(a,d){a._show2d(d)};a.jmolBr=function(){return a._documentWrite("<br>")};a.jmolButton=function(g,d,b,f,h){return a.controls._getButton(g,d,b,f,h)};a.jmolCheckbox=function(g,d,b,f,h,l,m){return a.controls._getCheckbox(g,d,b,f,h,l,m)};a.jmolCommandInput=function(g,d,b,f,h,l){return a.controls._getCommandInput(g,d,b,f,h,l)};a.jmolHtml=function(g){return a._documentWrite(g)};a.jmolLink=function(g,d,b,f,h){return a.controls._getLink(g,d,b,f,h)};
a.jmolMenu=function(g,d,b,f,h){return a.controls._getMenu(g,d,b,f,h)};a.jmolRadio=function(g,d,b,f,h,l,m,c){return a.controls._getRadio(g,d,b,f,h,l,m,c)};a.jmolRadioGroup=function(g,d,b,f,h,l){return a.controls._getRadioGroup(g,d,b,f,h,l)};a.setCheckboxGroup=function(g,d){a.controls._cbSetCheckboxGroup(g,d,arguments)};a.setDocument=function(g){a._document=g};a.setXHTML=function(g){a._isXHTML=!0;a._XhtmlElement=null;a._XhtmlAppendChild=!1;g&&(a._XhtmlElement=document.getElementById(g),a._XhtmlAppendChild=
!0)};a.setAppletCss=function(g,d){null!=g&&(a._appletCssClass=g);a._appletCssText=d?d+" ":g?'class="'+g+'" ':""};a.setButtonCss=function(g,d){null!=g&&(a.controls._buttonCssClass=g);a.controls._buttonCssText=d?d+" ":g?'class="'+g+'" ':""};a.setCheckboxCss=function(g,d){null!=g&&(a.controls._checkboxCssClass=g);a.controls._checkboxCssText=d?d+" ":g?'class="'+g+'" ':""};a.setRadioCss=function(g,d){null!=g&&(a.controls._radioCssClass=g);a.controls._radioCssText=d?d+" ":g?'class="'+g+'" ':""};a.setLinkCss=
function(g,d){null!=g&&(a.controls._linkCssClass=g);a.controls._linkCssText=d?d+" ":g?'class="'+g+'" ':""};a.setMenuCss=function(g,d){null!=g&&(a.controls._menuCssClass=g);a.controls._menuCssText=d?d+" ":g?'class="'+g+'" ':""};a.setAppletSync=function(g,d,b){a._syncedApplets=g;a._syncedCommands=d;a._syncedReady={};a._isJmolJSVSync=b};a.setGrabberOptions=function(g){a._grabberOptions=g};a.setAppletHtml=function(g,d){g._code&&(a.$html(d,g._code),g._init&&!g._deferApplet&&g._init())};a.coverApplet=function(a,
d){a._cover&&a._cover(d)};a.setFileCaching=function(g,d){g?g._cacheFiles=d:a.fileCache=d?{}:null};a.resetView=function(g,d){a.View.resetView(g,d)};a.updateView=function(a,d,b){a._updateView(d,b)};a.getChemicalInfo=function(g,d,b){d||(d="name");"string"!=typeof g&&(g=g._getSmiles());return a._getNCIInfo(g,d,b)};a.saveImage=function(g,d,b){d=(d||"png").toLowerCase();b||(b=g.id+"."+d.toLowerCase());0>b.indexOf(".")&&(b+="."+d);switch(g._viewType){case "Jmol":return g._script('write PNGJ "'+b+'"');case "JSV":if("PDF"==
d)return g._script("write PDF");break;case "JME":return g._script("print")}a._saveFile(b,g._canvas.toDataURL("image/png"))}})(Jmol);
LoadClazz=function(){TypeError.prototype.printStackTrace=ReferenceError.prototype.printStackTrace=function(){console.log(this)};window["j2s.clazzloaded"]||(window["j2s.clazzloaded"]=!1);window["j2s.clazzloaded"]||(window["j2s.clazzloaded"]=!0,window["j2s.object.native"]=!0,Clazz={_isQuiet:!1,_debugging:!1},function(a,h){try{a._debugging=0<=document.location.href.indexOf("j2sdebug")}catch(g){}var d=["j2s.clazzloaded","j2s.object.native"];a.setGlobal=function(a,b){d.push(a);window[a]=b};a.getGlobals=
function(){return d.sort().join("\n")};a.setConsoleDiv=function(a){window["j2s.lib"]&&(window["j2s.lib"].console=a)};var b=null;a._startProfiling=function(a){b=a&&self.JSON?{}:null};NullObject=function(){};a._supportsNativeObject=window["j2s.object.native"];a._supportsNativeObject?(a._O=function(){},a._O.__CLASS_NAME__="Object",a._O.getClass=function(){return a._O}):a._O=Object;a.Console={};a.dateToString=Date.prototype.toString;a._hashCode=0;var f=a._O.prototype;f.equals=function(a){return this==
a};f.hashCode=function(){return this._$hashcode||(this._$hashcode=++a._hashCode)};f.getClass=function(){return a.getClass(this)};f.clone=function(){return a.clone(this)};a.clone=function(a){var b=a instanceof Array?Array(a.length):new a.constructor,c;for(c in a)b[c]=a[c];return b};f.finalize=function(){};f.notify=function(){};f.notifyAll=function(){};f.wait=function(){};f.to$tring=Object.prototype.toString;f.toString=function(){return this.__CLASS_NAME__?"["+this.__CLASS_NAME__+" object]":this.to$tring.apply(this,
arguments)};a._extendedObjectMethods="equals hashCode getClass clone finalize notify notifyAll wait to$tring toString".split(" ");a.extendJO=function(b,c){c&&(b.__CLASS_NAME__=b.prototype.__CLASS_NAME__=c,a._setDeclared(c,b));if(a._supportsNativeObject)for(var d=0;d<a._extendedObjectMethods.length;d++){var e=a._extendedObjectMethods[d];b.prototype[e]=a._O.prototype[e]}};a.extractClassName=function(a){a=a.substring(1,a.length-1);return 0<=a.indexOf("Array")?"Array":0<=a.indexOf("object ")?a.substring(7):
a};a.getClassName=function(b,c){if(null==b)return"NullObject";if(b instanceof a.CastedNull)return b.clazzName;switch(typeof b){case "number":return"n";case "boolean":return"b";case "string":return"String";case "function":if(b.__CLASS_NAME__)return c?b.__CLASS_NAME__:"Class";var d=b.toString(),e=d.indexOf("function");if(0>e)return"["==d.charAt(0)?a.extractClassName(d):d.replace(/[^a-zA-Z0-9]/g,"");var e=e+8,f=d.indexOf("(",e);if(0>f)break;d=d.substring(e,f);if(0<=d.indexOf("Array"))return"Array";d=
d.replace(/^\s+/,"").replace(/\s+$/,"");return"anonymous"==d||""==d?"Function":d;case "object":if(b.__CLASS_NAME__)return b.__CLASS_NAME__;if(!b.constructor)break;if(!b.constructor.__CLASS_NAME__){if(b instanceof Number)return"Number";if(b instanceof Boolean)return"Boolean";if(b instanceof Array||b.BYTES_PER_ELEMENT)return"Array";d=b.toString();if("["==d.charAt(0))return a.extractClassName(d)}return a.getClassName(b.constructor,!0)}return"Object"};a.getClass=function(b){if(!b)return a._O;if("function"==
typeof b)return b;if(b instanceof a.CastedNull)b=b.clazzName;else switch(typeof b){case "string":return String;case "object":if(!b.__CLASS_NAME__)return b.constructor||a._O;b=b.__CLASS_NAME__;break;default:return b.constructor}return a.evalType(b,!0)};var k=function(b,c){for(var d=0;d<a.innerFunctionNames.length;d++)if(c==a.innerFunctionNames[d]&&a._innerFunctions[c]===b[c])return!0;return!1},l=function(){};a.inheritArgs=new l;a.inheritClass=function(b,c,d){for(var e in c)"b$"!=e&&("prototype"!=e&&
"superClazz"!=e&&"__CLASS_NAME__"!=e&&"implementz"!=e&&!k(c,e))&&(b[e]=c[e]);a.unloadedClasses[a.getClassName(b,!0)]||(b.prototype=d?d:c!==Number?new c(a.inheritArgs):new Number);b.superClazz=c;b.prototype.__CLASS_NAME__=b.__CLASS_NAME__};a.implementOf=function(a,b){if(2<=arguments.length){a.implementz||(a.implementz=[]);var c=a.implementz;if(2==arguments.length)if("function"==typeof b)c.push(b),m(a,b);else{if(b instanceof Array)for(var d=0;d<b.length;d++)c.push(b[d]),m(a,b[d])}else for(d=1;d<arguments.length;d++)c.push(arguments[d]),
m(a,arguments[d])}};var m=function(a,b){for(var c in b)if("b$"!=c&&"prototype"!=c&&"superClazz"!=c&&"__CLASS_NAME__"!=c&&"implementz"!=c&&("function"!=typeof b[c]||!k(b,c)))a[c]=a.prototype[c]=b[c]};a.extendInterface=a.implementOf;a.equalsOrExtendsLevel=function(b,c){if(b===c)return 0;if(b.implementz)for(var d=b.implementz,e=0;e<d.length;e++){var f=a.equalsOrExtendsLevel(d[e],c);if(0<=f)return f+1}return-1};a.getInheritedLevel=function(b,c){if(b===c)return 0;var d="string"==typeof b;if(d&&("void"==
b||"unknown"==b))return-1;var e="string"==typeof c;if(e&&("void"==c||"unknown"==c))return-1;if(b===(d?"NullObject":NullObject))switch(c){case "n":case "b":return-1;case Number:case Boolean:case NullObject:break;default:return 0}d&&(b=a.evalType(b));e&&(c=a.evalType(c));if(!c||!b)return-1;d=0;for(e=b;e!==c&&10>d;){if(e.implementz)for(var f=e.implementz,g=0;g<f.length;g++){var h=a.equalsOrExtendsLevel(f[g],c);if(0<=h)return d+h+1}e=e.superClazz;if(!e)return c===Object||c===a._O?d+1.5:-1;d++}return d};
a.allClasses={};a.isClassDefined=a.isDefinedClass=function(b){return b&&a._getDeclared(b)};a._setDeclared=function(b,c){0>b.indexOf(".")&&(b="java.lang."+b);a.allClasses[b]=c};a._getDeclared=function(b){0>b.indexOf(".")&&(b="java.lang."+b);return a.allClasses[b]};a.instanceOf=function(b,c){if(null==b)return!1;"string"==typeof c&&(c=a._getDeclared(c));return!c?!1:c==String?"string"==typeof b:null!=b&&c&&(b==c||b instanceof c||0<=a.getInheritedLevel(a.getClassName(b),c))};a.exceptionOf=function(b,c){if(b.__CLASS_NAME__){if("string"==
typeof c){var d=a._getDeclared(c);if(!d)return!1;c=d}return a.instanceOf(b,c)}b.getMessage||(b.getMessage=function(){return""+b+(b.stack?"\n"+b.stack:"")});b.printStackTrace||(b.printStackTrace=function(){System.err.println(""+b)});if(c==Error){if(0>(""+b).indexOf("Error"))return!1;System.out.println(a.getStackTrace());return!0}return c==Exception||c==Throwable||c==NullPointerException&&e(b)};a.superCall=function(b,c,d,e){var f=null,g=-1,h=b[d];if(h)if(h.claxxOwner)h.claxxOwner!==c&&(f=h);else if(!h.stacks&&
(!h.lastClaxxRef||!h.lastClaxxRef.prototype[d]||!h.lastClaxxRef.prototype[d].stacks))f=h;else{var j=h.stacks;j||(j=h.lastClaxxRef.prototype[d].stacks);for(g=j.length;0<=--g;)if(c===j[g]){f=0<g?j[--g].prototype[d]:j[0].prototype[d]["\\unknown"];break}else if(0<a.getInheritedLevel(c,j[g])){f=j[g].prototype[d];break}}if(f)return 0==g&&"construct"==d&&(c=h.stacks)&&(!c[0].superClazz&&c[0].con$truct)&&c[0].con$truct.apply(b,[]),f.apply(b,e||[]);"construct"!=d&&(a.alert(["j2slib","no class found",e.typeString]),
V(b,c,d,a.getParamsType(e).typeString))};a.superConstructor=function(b,c,d){a.superCall(b,c,"construct",d);c.con$truct&&c.con$truct.apply(b,[])};a.CastedNull=function(b){this.clazzName=b?b instanceof String?b:b instanceof Function?a.getClassName(b,!0):""+b:"Object";this.toString=function(){return null};this.valueOf=function(){return null}};a.castNullAs=function(b){return new a.CastedNull(b)};a._initializingException=!1;a._callingStackTraces=[];var c=function(){this.toString=function(){return"J2S MethodException"}},
e;try{null.hello()}catch(j){if(f=function(a,b,c){c||(c="[^\\s]+");var d=a.indexOf(b);a=a.substring(0,d)+c+a.substring(d+b.length);return RegExp("^"+a+"$")},/Opera[\/\s](\d+\.\d+)/.test(navigator.userAgent)){var f=j.message.indexOf(":"),s=j.message.indexOf(":",f+2),H=j.message.substr(f+1,s-f-20);e=function(a){return-1!=a.message.indexOf(H)}}else if(-1!=navigator.userAgent.toLowerCase().indexOf("webkit")){var O=f(j.message,"hello");e=function(a){return O.test(a.message)}}else O=f(j.message,"$$o$$"),
e=function(a){return O.test(a.message)}}a.getStackTrace=function(a){a||(a=25);var b="\n",c=arguments.callee,d=0>a;d&&(a=-a);try{for(var e=0;e<a&&(c=c.caller);e++){var f=c.toString?c.toString().substring(0,c.toString().indexOf("{")):"<native method>",b=b+(e+" "+(c.exName?(c.claxxOwner?c.claxxOwner.__CLASS_NAME__+".":"")+c.exName+f.replace(/function /,""):f)+"\n");if(c==c.caller){b+="<recursing>\n";break}if(d)for(var g=c.arguments,h=0;h<g.length;h++){var j=""+g[h];60<j.length&&(j=j.substring(0,60)+
"...");b+=" args["+h+"]="+j.replace(/\s+/g," ")+"\n"}}}catch(k){}return b};a.makeConstructor=function(b,c,d){a.defineMethod(b,"construct",c,d);b.con$truct&&(b.con$truct.index=b.con$truct.stacks.length)};a.overrideConstructor=function(b,c,d){a.overrideMethod(b,"construct",c,d);b.con$truct&&(b.con$truct.index=b.con$truct.stacks.length)};a.defineMethod=function(d,e,f,g){f.exName=e;g=U(g);var h=d.prototype,j=h[e];a._Loader._checkLoad&&S(d,e,g);if(!j||j.claxxOwner===d&&j.funParams==g)return f.funParams=
g,f.claxxOwner=d,f.exClazz=d,h[e]=f;var k=null,l=j.stacks;l||(l=[],k=j,j.claxxOwner&&(l[0]=k.claxxOwner));if(!j.stacks||j.claxxReference!==d){++r;j=function(){var d;a:{var e=arguments.callee.claxxReference,A=arguments.callee.methodName;d=arguments;fx=this[A];var f=a.getParamsType(d);if(!fx)try{System.out.println(a.getStackTrace(5))}catch(g){}if(b){var E=e.__CLASS_NAME__+" "+A+" ";0>t.indexOf(E)&&(t+=E+"\n");b[E]||(b[E]=0);b[E]++}if(fx.lastParams==f.typeString&&fx.lastClaxxRef===e){if(f.hasCastedNull){e=
[];for(A=0;A<d.length;A++)e[A]=d[A]instanceof a.CastedNull?null:d[A]}else e=d;d=fx.lastMethod?fx.lastMethod.apply(this,e):null}else{fx.lastParams=f.typeString;fx.lastClaxxRef=e;E=fx.stacks;E||(E=e.prototype[A].stacks);for(var h=!1,v=E.length;0<=--v;)if(h||E[v]===e){var j=E[v].prototype[A],k=f,h=d,ua=fx,l=[],I=!0,m=void 0;for(m in j)if(92==m.charCodeAt(0)){var B=m.substring(1).split("\\");B.length==k.length&&l.push(B);I=!1}else if(I&&"funParams"==m&&j.funParams){m=j.funParams;B=m.substring(1).split("\\");
B.length==k.length&&(l[0]=B);break}if(!(m=0==l.length)){for(var m=k,B=[],n=l.length,F=0;F<n;F++){for(var p=[],sa=!0,s=l[F].length,r=0;r<s;r++)if(p[r]=a.getInheritedLevel(m[r],l[F][r]),0>p[r]){sa=!1;break}sa&&(p[m.length]=F,B.push(p))}if(0==B.length)l=null;else{n=B[0];for(F=1;F<B.length;F++){p=!0;for(r=0;r<m.length;r++)if(n[r]<B[F][r]){p=!1;break}p&&(n=B[F])}l=l[n[m.length]].join("\\")}m=!l}if(m)h=new c;else{j=I?j:j["\\"+l];I=null;if(k.hasCastedNull){I=[];for(k=0;k<h.length;k++)I[k]=h[k]instanceof
a.CastedNull?null:h[k]}else I=h;ua.lastMethod=j;h=j.apply(this,I)}if(!(h instanceof c)){d=h;break a}h=!0}"construct"!=A&&V(this,e,A,f.typeString);d=void 0}}return d};j.methodName=e;j.claxxReference=d;j=h[e]=j;e=[];for(h=0;h<l.length;h++)e[h]=l[h];j.stacks=e}l=j.stacks;0>T(l,d)&&l.push(d);k&&(k.claxxOwner===d?(j[k.funParams]=k,k.claxxOwner=null,k.funParams=null):k.claxxOwner||(j["\\unknown"]=k));f.exClazz=d;j[g]=f;return j};duplicatedMethods={};var S=function(b,c,d){var e=b.prototype[c];if(e&&(e.claxxOwner||
e.claxxReference)===b)key=b.__CLASS_NAME__+"."+c+d,(b=duplicatedMethods[key])?(c="Warning! Duplicate method found for "+key,System.out.println(c),a.alert(c),duplicatedMethods[key]=b+1):duplicatedMethods[key]=1};a.showDuplicates=function(a){var b="",c=duplicatedMethods,d=0,e;for(e in c)1<c[e]&&(b+=c[e]+"\t"+e+"\n",d++);b="Duplicates: "+d+"\n\n"+b;System.out.println(b);a||alert(b)};var T=function(a,b){if(a&&b)for(var c=a.length;0<=--c;)if(a[c]===b)return c;return-1},ka=function(a,b){var c=T(a,b);if(0<=
c){for(var d=a.length-1;c<d;c++)a[c]=a[c+1];a.length--;return!0}},U=function(a){return a?a.replace(/~([NABSO])/g,function(a,b){switch(b){case "N":return"n";case "B":return"b";case "S":return"String";case "O":return"Object";case "A":return"Array"}return"Unknown"}).replace(/\s+/g,"").replace(/^|,/g,"\\").replace(/\$/g,"org.eclipse.s"):"\\void"};a.overrideMethod=function(b,c,d,e){d.exName=c;e=U(e);a._Loader._checkLoad&&S(b,c,e);d.funParams=e;d.claxxOwner=b;return b.prototype[c]=d};var t="";a.getProfile=
function(){var a="";if(b){var a=[],c;for(c in b){var d=""+b[c];a.push("        ".substring(d.length)+d+"\t"+c)}a=a.sort().reverse().join("\r\n");b={}}return a};a.getParamsType=function(b){var c=b.length;switch(c){case 0:var d=["void"];d.typeString="\\void";return d;case 1:switch(typeof obj){case "number":return d=["n"],d.typeString="\\n",d;case "boolean":return d=["b"],d.typeString="\\b",d}}d=[];d.hasCastedNull=!1;if(b)for(var e=0;e<c;e++)d[e]=a.getClassName(b[e]),b[e]instanceof a.CastedNull&&(d.hasCastedNull=
!0);d.typeString="\\"+d.join("\\");return d};var r=0;a.allPackage={};a.lastPackageName=null;a.lastPackage=null;a.unloadedClasses=[];a.declarePackage=function(b){if(a.lastPackageName==b)return a.lastPackage;if(b&&b.length){for(var c=b.split(/\./),d=a.allPackage,e=0;e<c.length;e++)d[c[e]]||(d[c[e]]={__PKG_NAME__:d.__PKG_NAME__?d.__PKG_NAME__+"."+c[e]:c[e]},0==e&&a.setGlobal(c[e],d[c[e]])),d=d[c[e]];a.lastPackageName=b;return a.lastPackage=d}};a.evalType=function(b,c){var d=b.lastIndexOf(".");if(-1!=
d){var e=b.substring(0,d),e=a.declarePackage(e),d=b.substring(d+1);return e[d]}if(c)return window[b];switch(b){case "string":return String;case "number":return Number;case "object":return a._O;case "boolean":return Boolean;case "function":return Function;case "void":case "undefined":case "unknown":return b;case "NullObject":return NullObject;default:return window[b]}};a.defineType=function(b,c,d,e){var f=a.unloadedClasses[b];f&&(c=f);f=b.lastIndexOf(".");if(-1!=f){var g=b.substring(0,f),g=a.declarePackage(g),
f=b.substring(f+1);if(g[f])return g[f];g[f]=c}else{if(window[b])return window[b];a.setGlobal(b,c)}a.decorateAsType(c,b,d,e);b=a._innerFunctions;c.defineMethod=b.defineMethod;c.defineStaticMethod=b.defineStaticMethod;c.makeConstructor=b.makeConstructor;return c};var X=!1;-1!=navigator.userAgent.indexOf("Safari")&&(f=navigator.userAgent,s=f.indexOf("Version/"),-1!=s&&(f=f.substring(s+8),X=4<=parseFloat(f)));a.instantialize=function(a,b){if(!b||!(1==b.length&&b[0]&&b[0]instanceof l)){a instanceof Number&&
(a.valueOf=function(){return this});if(X){for(var c=[],d=0;d<b.length;d++)c[d]=b[d];b=c}(c=a.construct)?a.con$truct?a.getClass().superClazz?c.claxxOwner&&c.claxxOwner===a.getClass()||c.stacks&&c.stacks[c.stacks.length-1]==a.getClass()?c.apply(a,b):(c.claxxOwner&&!c.claxxOwner.superClazz&&c.claxxOwner.con$truct?c.claxxOwner.con$truct.apply(a,[]):c.stacks&&(1==c.stacks.length&&!c.stacks[0].superClazz)&&c.stacks[0].con$truct.apply(a,[]),c.apply(a,b),a.con$truct.apply(a,[])):(a.con$truct.apply(a,[]),
c.apply(a,b)):c.apply(a,b):a.con$truct&&a.con$truct.apply(a,[])}};a.innerFunctionNames="isInstance equals hashCode getName getCanonicalName getClassLoader getResource getResourceAsStream defineMethod defineStaticMethod makeConstructor".split(" ");a._innerFunctions={isInstance:function(b){return a.instanceOf(b,this)},equals:function(a){return this===a},hashCode:function(){return this.getName().hashCode()},toString:function(){return"class "+this.getName()},getName:function(){return a.getClassName(this,
!0)},getCanonicalName:function(){return this.__CLASS_NAME__},getClassLoader:function(){var b=this.__CLASS_NAME__,c=a._Loader.getClasspathFor(b),d=c.lastIndexOf(b.replace(/\./g,"/")),c=-1!=d?c.substring(0,d):a._Loader.getClasspathFor(b,!0),b=a._Loader.requireLoaderByBase(c);b.getResourceAsStream=a._innerFunctions.getResourceAsStream;b.getResource=a._innerFunctions.getResource;return b},getResource:function(a){return(a=this.getResourceAsStream(a))?a.url:null},getResourceAsStream:function(b){if(!b)return null;
b=b.replace(/\\/g,"/");var c=null,d=b,d=this.__CLASS_NAME__;2==arguments.length&&0!=b.indexOf("/")&&(b="/"+b);if(0==b.indexOf("/"))if(2==arguments.length?(c=arguments[1])||(c=a.binaryFolders[0]):a._Loader&&(c=a._Loader.getClasspathFor(d,!0)),c){var c=c.replace(/\\/g,"/"),e=c.length,e=c.charAt(e-1);"/"!=e&&(c+="/");d=c+b.substring(1)}else d=b.substring(1);else{if(this.base)c=this.base;else if(a._Loader)if(c=a._Loader.getClasspathFor(d),e=c.lastIndexOf(d.replace(/\./g,"/")),-1!=e)c=c.substring(0,e);
else if(e=-1,c.indexOf(".z.js")==c.length-5&&-1!=(e=c.lastIndexOf("/")))for(var c=c.substring(0,e+1),e=d.split(/\./),f=1;f<e.length;f++){for(var g="/",j=0;j<f;j++)g+=e[j]+"/";if(g.length>c.length)break;if(c.indexOf(g)==c.length-g.length){c=c.substring(0,c.length-g.length+1);break}}else c=a._Loader.getClasspathFor(d,!0);else(e=a.binaryFolders)&&e.length&&(c=e[0]);c||(c="j2s/");c=c.replace(/\\/g,"/");e=c.length;e=c.charAt(e-1);"/"!=e&&(c+="/");this.base?d=c+b:(e=d.lastIndexOf("."),d=-1==e||this.base?
c+b:c+d.substring(0,e).replace(/\./g,"/")+"/"+b)}c=null;try{if(0>d.indexOf(":/")){var k=document.location.href.split("?")[0].split("/");k[k.length-1]=d;d=k.join("/")}c=new java.net.URL(d)}catch(l){}k=null==c?null:h._getFileData(d.toString());if(!k||"error"==k||0==k.indexOf("[Exception"))return null;k=(new java.lang.String(k)).getBytes();k=new java.io.BufferedInputStream(new java.io.ByteArrayInputStream(k));k.url=c;return k},defineMethod:function(b,c,d){a.defineMethod(this,b,c,d)},defineStaticMethod:function(b,
c,d){a.defineMethod(this,b,c,d);this[b]=this.prototype[b]},makeConstructor:function(b,c){a.makeConstructor(this,b,c)}};var Y=[];a.pu$h=function(a){a||(a=self.c$);a&&Y.push(a)};a.p0p=function(){return Y.pop()};a.decorateAsClass=function(b,c,d,e,f,g){var h=null;c&&(h=c.__PKG_NAME__,h||(h=c.__CLASS_NAME__));var j=(h?h+".":"")+d;a._Loader._classPending[j]&&(delete a._Loader._classPending[j],a._Loader._classCountOK++,a._Loader._classCountPending--);a._Loader&&a._Loader._checkLoad&&System.out.println("decorating class "+
h+"."+d);(h=a.unloadedClasses[j])&&(b=h);Z(b,c,d);g?a.inheritClass(b,e,g):e&&a.inheritClass(b,e);f&&a.implementOf(b,f);return b};var Z=function(b,c,d,e){var f;c?c.__PKG_NAME__?(f=c.__PKG_NAME__+"."+d,c[d]=b,c===java.lang&&a.setGlobal(d,b)):(f=c.__CLASS_NAME__+"."+d,c[d]=b):(f=d,a.setGlobal(d,b));a.extendJO(b,f);c=a.innerFunctionNames;for(d=0;d<c.length;d++)b[c[d]]=a._innerFunctions[c[d]];e&&a.implementOf(b,e);a._Loader&&a._Loader.updateNodeForFunctionDecoration(f);return b};a.declareInterface=function(a,
b,c){return Z(function(){},a,b,c)};a.declareType=function(b,c,d,e,f){return a.decorateAsClass(function(){a.instantialize(this,arguments)},b,c,d,e,f)};a.declareAnonymous=function(b,c,d,e,f){return a.decorateAsClass(function(){a.prepareCallback(this,arguments);a.instantialize(this,arguments)},b,c,d,e,f)};a.decorateAsType=function(b,c,d,e,f,g){a.extendJO(b,c);b.equals=a._innerFunctions.equals;b.getName=a._innerFunctions.getName;if(g)for(c=0;c<a.innerFunctionNames.length;c++)g=a.innerFunctionNames[c],
b[g]=a._innerFunctions[g];f?a.inheritClass(b,d,f):d&&a.inheritClass(b,d);e&&a.implementOf(b,e);return b};Number.prototype._numberToString=Number.prototype.toString;a.declarePackage("java.io");a.declarePackage("java.lang.reflect");a.declarePackage("java.lang.ref");java.lang.ref.reflect=java.lang.reflect;a.declarePackage("java.util");a.declarePackage("java.security");a.declareInterface(java.io,"Closeable");a.declareInterface(java.io,"DataInput");a.declareInterface(java.io,"DataOutput");a.declareInterface(java.io,
"Externalizable");a.declareInterface(java.io,"Flushable");a.declareInterface(java.io,"Serializable");a.declareInterface(java.lang,"Appendable");a.declareInterface(java.lang,"AutoCloseable");a.declareInterface(java.lang,"CharSequence");a.declareInterface(java.lang,"Cloneable");a.declareInterface(java.lang,"Comparable");a.declareInterface(java.lang,"Iterable");a.declareInterface(java.lang,"Runnable");a.declareInterface(java.util,"Comparator");java.lang.ClassLoader={__CLASS_NAME__:"ClassLoader"};var V=
function(b,c,d,e){b="";e&&(b=e.substring(1).replace(/\\/g,","));c=(d&&"construct"!=d?"Method":"Constructor")+" "+a.getClassName(c,!0)+"."+d+"("+b+") is not found!";throw new java.lang.NoSuchMethodException(c);};a.prepareCallback=function(b,c){var d=c[0];if(b&&d&&d!==window){var e=a.getClassName(d,!0),f={};if(b.b$)for(var g in b.b$)f[g]=b.b$[g];b.b$=f;f[e]=d;for(e=a.getClass(d);e.superClazz;)e=e.superClazz,f[a.getClassName(e,!0)]=d;if(d=d.b$)for(g in d)f[g]=d[g]}for(f=0;f<c.length-1;f++)c[f]=c[f+1];
0<c.length&&c.length--};a.innerTypeInstance=function(b,c,d){b||(b=arguments.callee.caller);var e;if(d||c.$finals)if(e=new b(c,a.inheritArgs),d)if(c.f$){var f={},g;for(g in c.f$)f[g]=c.f$[g];for(g in d)f[g]=d[g];e.f$=f}else e.f$=d;else c.f$&&(e.f$=c.f$);else switch(arguments.length){case 3:return new b(c);case 4:return c.__CLASS_NAME__==b.__CLASS_NAME__&&arguments[3]===a.inheritArgs?c:new b(c,arguments[3]);case 5:return new b(c,arguments[3],arguments[4]);case 6:return new b(c,arguments[3],arguments[4],
arguments[5]);case 7:return new b(c,arguments[3],arguments[4],arguments[5],arguments[6]);case 8:return new b(c,arguments[3],arguments[4],arguments[5],arguments[6],arguments[7]);case 9:return new b(c,arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8]);case 10:return new b(c,arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9]);default:e=new b(c,a.inheritArgs)}g=arguments.length-3;for(f=Array(g);0<=--g;)f[g]=arguments[g+3];a.instantialize(e,
f);return e};a.cloneFinals=function(){for(var a={},b=arguments.length/2;0<=--b;)a[arguments[b+b]]=arguments[b+b+1];return a};a.defineEnumConstant=function(a,b,c,d,e){e=e?new e:new a;d&&d.length&&e.constructor.apply(e,d);e.$name=b;e.$ordinal=c;a[b]=e;a.prototype[b]=e;a["$ values"]||(a["$ values"]=[],a.values=function(){return this["$ values"]});a["$ values"].push(e);return e};a.floatToInt=function(a){return isNaN(a)?0:0>a?Math.ceil(a):Math.floor(a)};a.floatToByte=a.floatToShort=a.floatToLong=a.floatToInt;
a.doubleToByte=a.doubleToShort=a.doubleToLong=a.doubleToInt=a.floatToInt;a.floatToChar=function(a){return String.fromCharCode(0>a?Math.ceil(a):Math.floor(a))};a.doubleToChar=a.floatToChar;var aa=function(a,b){a||(a=0);if("object"==typeof a)var c=a;else for(var c=Array(a),d=0;d<a;d++)c[d]=0;c.BYTES_PER_ELEMENT=b>>3;c._fake=!0;return c},P=function(a,b){a||(a=0);b||(b=this.length);if(this._fake){var c=new this.constructor(b-a);System.arraycopy(this,a,c,0,b-a);return c}return new this.constructor(this.buffer.slice(a*
this.BYTES_PER_ELEMENT,b*this.BYTES_PER_ELEMENT))};!0==(a.haveInt32=!!(self.Int32Array&&self.Int32Array!=Array))?Int32Array.prototype.sort||(Int32Array.prototype.sort=Array.prototype.sort):(Int32Array=function(a){return aa(a,32)},Int32Array.prototype.sort=Array.prototype.sort,Int32Array.prototype.toString=function(){return"[object Int32Array]"});Int32Array.prototype.slice||(Int32Array.prototype.slice=function(){return P.apply(this,arguments)});Int32Array.prototype.clone=function(){var a=this.slice();
a.BYTES_PER_ELEMENT=4;return a};!0==(a.haveFloat64=!!(self.Float64Array&&self.Float64Array!=Array))?Float64Array.prototype.sort||(Float64Array.prototype.sort=Array.prototype.sort):(Float64Array=function(a){return aa(a,64)},Float64Array.prototype.sort=Array.prototype.sort,Float64Array.prototype.toString=function(){return"[object Float64Array]"});Float64Array.prototype.slice||(Float64Array.prototype.slice=function(){return P.apply(this,arguments)});Float64Array.prototype.clone=function(){return this.slice()};
a.newArray=function(a,b,c,d){if(-1!=a||2==arguments.length)return G(arguments,0);a=b.slice(c,d);a.BYTES_PER_ELEMENT=b.BYTES_PER_ELEMENT;return a};var G=function(a,b){var c=a[0];"string"==typeof c&&(c=c.charCodeAt(0));var d=a.length-1,e=a[d];if(1<d){for(var e=Array(d),f=0;f<d;f++)e[f]=a[f+1];d=Array(c);for(f=0;f<c;f++)d[f]=G(e,b);return d}0<b&&0>c&&(c=e);switch(b){case 8:return d=new Int8Array(c),d.BYTES_PER_ELEMENT=1,d;case 32:return d=new Int32Array(c),d.BYTES_PER_ELEMENT=4,d;case 64:return d=new Float64Array(c),
d.BYTES_PER_ELEMENT=8,d;default:d=0>c?e:Array(c);d.BYTES_PER_ELEMENT=0;if(0<c&&null!=e)for(f=c;0<=--f;)d[f]=e;return d}};a.newByteArray=function(){return G(arguments,8)};a.newIntArray=function(){return G(arguments,32)};a.newFloatArray=function(){return G(arguments,64)};a.newDoubleArray=a.newFloatArray;a.newLongArray=a.newShortArray=a.newIntArray;a.newCharArray=a.newBooleanArray=a.newArray;!0==(a.haveInt8=!!self.Int8Array)?(Int8Array.prototype.sort||(Int8Array.prototype.sort=Array.prototype.sort),
Int8Array.prototype.slice||(Int8Array.prototype.slice=function(){return P.apply(this,arguments)})):a.newByteArray=a.newIntArray;Int8Array.prototype.clone=function(){var a=this.slice();a.BYTES_PER_ELEMENT=1;return a};a.isAB=function(a){return a&&"object"==typeof a&&1==a.BYTES_PER_ELEMENT};a.isAI=function(a){return a&&"object"==typeof a&&4==a.BYTES_PER_ELEMENT};a.isAF=function(a){return a&&"object"==typeof a&&8==a.BYTES_PER_ELEMENT};a.isAS=function(a){return a&&"object"==typeof a&&a.constructor==Array&&
("string"==typeof a[0]||"undefined"==typeof a[0])};a.isAII=function(b){return b&&"object"==typeof b&&a.isAI(b[0])};a.isAFF=function(b){return b&&"object"==typeof b&&a.isAF(b[0])};a.isAFFF=function(b){return b&&"object"==typeof b&&a.isAFF(b[0])};a.isASS=function(b){return b&&"object"==typeof b&&a.isAS(b[0])};a.isAFloat=function(b){return b&&"object"==typeof b&&b.constructor==Array&&a.instanceOf(b[0],Float)};a.isAP=function(b){return b&&"JU.P3"==a.getClassName(b[0])};a.prepareFields=function(a,b){var c=
[];if(a.con$truct)for(var d=a.con$truct.stacks,e=0;e<d.length;e++)c[e]=d[e];d=a.con$truct=function(){var a=arguments.callee.stacks;if(a)for(var b=0;b<a.length;b++)a[b].apply(this,[])};a.prototype.con$truct=d;c.push(b);a.con$truct.stacks=c;a.con$truct.index=0};a.checkPrivateMethod=function(){me=arguments.callee.caller;caller=arguments.callee.caller.caller;var b="\\"+a.getParamsType(arguments[0]).join("\\");me.privateNote||(me.privateNote="You are seeing this note because the method "+me.exName+b+" in class "+
me.exClazz.__CLASS_NAME__+" has a superclass method by the same name (possibly with the same parameters) that is private and  therefore might be called improperly from this class. If your  code does not run properly, or you want to make it run faster, change the name of this method to something else.",System.out.println(me.privateNote),alert(me.privateNote));return null};java.lang.Object=a._O;a._O.getName=a._innerFunctions.getName;java.lang.System=System={props:null,$props:{},arraycopy:function(a,
b,c,d,e){if(a!==c||b>d)for(;0<=--e;)c[d++]=a[b++];else{d+=e;for(b+=e;0<=--e;)a[--d]=a[--b]}},currentTimeMillis:function(){return(new Date).getTime()},gc:function(){},getProperties:function(){return System.props},getProperty:function(a,b){if(System.props)return System.props.getProperty(a,b);var c=System.$props[a];if("undefined"!=typeof c)return c;if(0<a.indexOf(".")){c=null;switch(a){case "java.version":case "file.separator":case "path.separator":c="/";break;case "line.separator":c=0<=navigator.userAgent.indexOf("Windows")?
"\r\n":"\n";break;case "os.name":case "os.version":c=navigator.userAgent}if(c)return System.$props[a]=c}return 1==arguments.length?null:null==b?a:b},getSecurityManager:function(){return null},setProperties:function(a){System.props=a},lineSeparator:function(){return"\n"},setProperty:function(a,b){if(!System.props)return System.$props[a]=b;System.props.setProperty(a,b)}};System.identityHashCode=function(b){return null==b?0:b._$hashcode||(b._$hashcode=++a._hashCode)};System.out=new a._O;System.out.__CLASS_NAME__=
"java.io.PrintStream";System.out.print=function(){};System.out.printf=function(){};System.out.println=function(){};System.out.write=function(){};System.out.flush=function(){};System.err=new a._O;System.err.__CLASS_NAME__="java.io.PrintStream";System.err.print=function(){};System.err.printf=function(){};System.err.println=function(){};System.err.write=function(){};System.err.flush=function(){};a.popup=a.assert=a.log=a.error=window.alert;Thread=function(){};Thread.J2S_THREAD=Thread.prototype.J2S_THREAD=
new Thread;Thread.currentThread=Thread.prototype.currentThread=function(){return this.J2S_THREAD};a.innerFunctionNames=a.innerFunctionNames.concat("getSuperclass isAssignableFrom getConstructor getDeclaredMethod getDeclaredMethods getMethod getMethods getModifiers newInstance".split(" "));a._innerFunctions.getSuperclass=function(){return this.superClazz};a._innerFunctions.isAssignableFrom=function(b){return 0<=a.getInheritedLevel(b,this)};a._innerFunctions.getConstructor=function(){return new java.lang.reflect.Constructor(this,
[],[],java.lang.reflect.Modifier.PUBLIC)};a._innerFunctions.getDeclaredMethods=a._innerFunctions.getMethods=function(){var a=[],b=this.prototype,c;for(c in b)"function"==typeof b[c]&&!b[c].__CLASS_NAME__&&a.push(new java.lang.reflect.Method(this,c,[],java.lang.Void,[],java.lang.reflect.Modifier.PUBLIC));b=this;for(c in b)"function"==typeof b[c]&&!b[c].__CLASS_NAME__&&a.push(new java.lang.reflect.Method(this,c,[],java.lang.Void,[],java.lang.reflect.Modifier.PUBLIC|java.lang.reflect.Modifier.STATIC));
return a};a._innerFunctions.getDeclaredMethod=a._innerFunctions.getMethod=function(a){var b=this.prototype,c;for(c in b)if(a==c&&"function"==typeof b[c]&&!b[c].__CLASS_NAME__)return new java.lang.reflect.Method(this,c,[],java.lang.Void,[],java.lang.reflect.Modifier.PUBLIC);b=this;for(c in b)if(a==c&&"function"==typeof b[c]&&!b[c].__CLASS_NAME__)return new java.lang.reflect.Method(this,c,[],java.lang.Void,[],java.lang.reflect.Modifier.PUBLIC|java.lang.reflect.Modifier.STATIC);return null};a._innerFunctions.getModifiers=
function(){return java.lang.reflect.Modifier.PUBLIC};a._innerFunctions.newInstance=function(a){switch(null==a?0:a.length){case 0:return new this;case 1:return new this(a[0]);case 2:return new this(a[0],a[1]);case 3:return new this(a[0],a[1],a[2]);case 4:return new this(a[0],a[1],a[2],a[3]);default:for(var b="new "+this.__CLASS_NAME__+"(",c=0;c<a.length;c++)b+=(0==c?"":",")+"a["+c+"]";return eval(b+")")}};f=a.innerFunctionNames;for(s=0;s<f.length;s++)a._O[f[s]]=a._innerFunctions[f[s]],Array[f[s]]=
a._innerFunctions[f[s]];a._Loader=a.ClazzLoader=function(){};var n=function(){this.parents=[];this.musts=[];this.optionals=[];this.onLoaded=this.path=this.name=this.declaration=null;this.status=0;this.random=0.13412};(function(a,b){b._checkLoad=h._checkLoad;b.updateNodeForFunctionDecoration=function(a){(a=D(a))&&a.status==n.STATUS_KNOWN&&window.setTimeout(function(a){return function(){updateNode(a)}}(a),1)};n.prototype.toString=function(){return this.name||this.path||"ClazzNode"};n.STATUS_UNKNOWN=
0;n.STATUS_KNOWN=1;n.STATUS_CONTENT_LOADED=2;n.STATUS_MUSTS_LOADED=3;n.STATUS_DECLARED=4;n.STATUS_LOAD_COMPLETE=5;var c=[];b.requireLoaderByBase=function(a){for(var d=0;d<c.length;d++)if(c[d].base==a)return c[d];d=new b;d.base=a;c.push(d);return d};var d=new n,e={},f=0,g=6,j=navigator.userAgent.toLowerCase(),k=-1!=j.indexOf("opera"),l=-1!=j.indexOf("msie")&&!k,m=-1!=j.indexOf("gecko");if(k&&(g=1,k=j.indexOf("opera/"),-1!=k)){var p=9;try{p=parseFloat(j.subString(k+6))}catch(s){}9.6<=p&&(g=6)}var t;
self.Clazz&&a.isClassDefined?isClassDefined=a.isClassDefined:(t={},isClassDefined=function(a){return!0==t[a]});var u=function(a){if(!a||0==a.length)return[];for(var b=null,c=0;c<a.length;c++)if(a[c]){if("$"==a[c].charAt(0))if("."==a[c].charAt(1)){if(!b)continue;var d=b.lastIndexOf(".");-1!=d&&(b=b.substring(0,d),a[c]=b+a[c].substring(1))}else a[c]="org.eclipse.s"+a[c].substring(1);b=a[c]}return a},w=[],C={},y=0;b.loadPackageClasspath=function(a,c,d,e,f,g){f||(f=0);e||(e=null);g||(g=0);var h=d&&C["@"+
a];if(0==f&&(d&&!C["@java"]&&0!=a.indexOf("java")&&null!=window["java.registered"]&&!C["@java"])&&(b.loadPackage("java",e?function(){b.loadPackageClasspath(a,c,d,e,1)}:null),e))return;if(a instanceof Array)if(u(a),e)g<a.length?b.loadPackageClasspath(a[g],c,d,function(){b.loadPackageClasspath(a,c,d,e,1,g+1)},1):e();else for(f=0;f<a.length;f++)b.loadPackageClasspath(a[f],c,d,null);else{switch(a){case "java.*":a="java";case "java":break;default:a.lastIndexOf(".*")==a.length-2&&(a=a.substring(0,a.length-
2))}c&&(C["@"+a]=c);d&&!h&&!window[a+".registered"]?(y++,"java"==a&&(a="core"),b.loadClass(a+".package",function(){0==--y&&ea()},!0,!0,1)):e&&e()}};a.loadClass=function(c,d,e){self.Class||(Class=a,Class.forName=a._4Name,JavaObject=a._O);return c&&b.loadClass(c,d,!0,e,1)};b.loadClass=function(c,f,g,h,j){j||(j=0);null==h&&(h=!1);if("boolean"==typeof f)return a.evalType(c);null!=window["java.registered"]&&!C["@java"]&&b.loadPackage("java");b.keepOnLoading=!0;if(!g&&(y&&c.lastIndexOf(".package")!=c.length-
8||0!=c.indexOf("java.")&&!isClassDefined(la)))ma.push([c,f]);else if((j=isClassDefined(c))||z["@"+c]){if(j&&f&&(g=D(c),!g||g.status>=n.STATUS_LOAD_COMPLETE))h?window.setTimeout(f,25):f()}else{var k=b.getClasspathFor(c);j=e[k];if(!j)for(h=w.length;0<=--h;)if(w[h].path==k||w[h].name==c){j=!0;break}if(j){if(f&&(j=D(c)))if(j.onLoaded){if(f!=j.onLoaded){var l=j.onLoaded,m=f;j.onLoaded=function(){l();m()}}}else j.onLoaded=f}else{j=a.unloadedClasses[c]&&D(c)||new n;j.name=c;j.path=k;j.isPackage=k.lastIndexOf("package.js")==
k.length-10;fa(k,c,j);j.onLoaded=f;j.status=n.STATUS_KNOWN;c=!1;for(h=w.length;0<=--h;)if(w[h].status!=n.STATUS_LOAD_COMPLETE){c=!0;break}if(j.isPackage){for(h=w.length;0<=--h&&!w[h].isPackage;)w[h+1]=w[h];w[++h]=j}else c&&w.push(j);if(!c){var v=!1;f&&(v=K,K=!0);g&&(f=null);ba(d,j,!0);G(j,j.path,j.requiredBy,!1,f?function(){K=v;f()}:null)}}}};b.loadPackage=function(a,c){c||(c=null);window[a+".registered"]=!1;b.loadPackageClasspath(a,b.J2SLibBase||(b.J2SLibBase=b.getJ2SLibBase()||"j2s/"),!0,c)};b.jarClasspath=
function(a,b){b instanceof Array||(b=[b]);u(b);h._debugCore&&(a=a.replace(/\.z\./,"."));for(var c=b.length;0<=--c;)C["#"+b[c]]=a;C["$"+a]=b};b.registerPackages=function(c,d){for(var e=b.getClasspathFor(c+".*",!0),f=0;f<d.length;f++)window.Clazz&&a.declarePackage(c+"."+d[f]),b.loadPackageClasspath(c+"."+d[f],e)};b.getClasspathFor=function(c,d,e){var f=C["#"+c];if(!f||d||e){var g,h;if(f){if(c=c.replace(/\./g,"/"),0<=(h=f.lastIndexOf(c))||0<=(h=c.lastIndexOf("/"))&&0<=(h=f.lastIndexOf(c.substring(0,
h))))g=f.substring(0,h)}else{for(h=c.length+2;0<=(h=c.lastIndexOf(".",h-2))&&!(g=C["@"+c.substring(0,h)]););d||(c=c.replace(/\./g,"/"))}null==g&&(g=window.Clazz&&a.binaryFolders&&a.binaryFolders.length?a.binaryFolders[0]:b.binaryFolders&&b.binaryFolders.length?b.binaryFolders[0]:"j2s");f=(g.lastIndexOf("/")==g.length-1?g:g+"/")+(d?"":c.lastIndexOf("/*")==c.length-2?c.substring(0,h+1):c+(!e?".js":"."!=e.charAt(0)?"."+e:e))}return f};b.ignore=function(){var a=1==arguments.length&&arguments[0]instanceof
Array?a=arguments[0]:null,b=a?a.length:arguments.length;if(!a)for(var a=Array(b),c=0;c<b;c++)a[c]=arguments[c];u(a);for(c=0;c<b;c++)z["@"+a[c]]=1};b.onScriptLoading=function(){};b.onScriptLoaded=function(){};b.onScriptInitialized=function(){};b.onScriptCompleted=function(){};b.onClassUnloaded=function(){};b.onGlobalLoaded=function(){};b.keepOnLoading=!0;var x={},z={},M=function(c,d,e,f){if(!f)try{eval(e+";//# sourceURL="+c)}catch(g){if(a._isQuiet)return;c="[Java2Script] The required class file \n\n"+
c+(0==e.indexOf("[Exception")&&e.indexOf("data: no")?"\nwas not found.\n":"\ncould not be loaded. Script error: "+g.message+" \n\ndata:\n\n"+e)+"\n\n"+a.getStackTrace();alert(c);a.alert(c);throw g;}b.onScriptLoaded(c,!1);W(d)},H=function(a){window["j2s.script.debugging"]||window.setTimeout(generateRemovingfunction(a),1)};a._4Name=function(c,d,e){if(a.isClassDefined(c))return a.evalType(c);d=h._isAsync&&d?d._restoreState(c,e):null;if(1==d)return null;if(b.setLoadingMode(d?b.MODE_SCRIPT:"xhr.sync"))return b.loadClass(c,
d,!1,!0,1),null;b.loadClass(c);return a.evalType(c)};a.currentPath="";var G=function(c,d,g,j,k){a.currentPath=d;j&&alert("WHY>>");j=e[d];e[d]=!0;ka(w,d);ga=!0;ha=!1;b._checkLoad&&System.out.println("\t"+d+(g?"\n -- required by "+g:"")+"  ajax="+ga+" async="+ha);g=d;a._debugging&&(d=d.replace(/\.z\.js/,".js"));j||System.out.println("loadScript "+d);b.onScriptLoading(d);if(ga&&!ha){var l=h._getFileData(d);try{M(d,g,l,j)}catch(m){alert(m+" loading file "+d+" "+c.name+" "+a.getStackTrace())}k&&k()}else c=
{dataType:"script",async:!0,type:"GET",url:d,success:L(d,!1,k),error:L(d,!0,k)},f++,j?setTimeout(c.success,0):h.$ajax(c)},L=function(c,d,e){a.getStackTrace();return function(){m&&this.timeoutHandle&&(window.clearTimeout(this.timeoutHandle),this.timeoutHandle=null);0<f&&f--;this.onerror=this.onload=null;d&&alert("There was a problem loading "+c);b.onScriptLoaded(c,!0);var a=this,g;g=e?function(){H(a);W(c,e)}:function(){H(a);W(c)};0<=na?window.setTimeout(function(){W(c,g)},na):W(c,g)}},K=!0,N=!1,W=
function(c,h){var j=x["@"+c];if(j){var k,m=C["$"+c];if(m)for(var q=0;q<m.length;q++){var v=m[q];if(v!=j.name&&(k=D(v)))k.status<n.STATUS_CONTENT_LOADED&&(k.status=n.STATUS_CONTENT_LOADED,updateNode(k));else{k=new n;k.name=v;var p=C["#"+v];p||(alert(v+" J2S error in tryToLoadNext"),error("Java2Script implementation error! Please report this bug!"));k.path=p;fa(k.path,v,k);k.status=n.STATUS_CONTENT_LOADED;ba(d,k,!1);updateNode(k)}}if(j instanceof Array)for(q=0;q<j.length;q++)j[q].status<n.STATUS_CONTENT_LOADED&&
(j[q].status=n.STATUS_CONTENT_LOADED,updateNode(j[q]));else if(j.status<n.STATUS_CONTENT_LOADED){k=!1;m=document.getElementsByTagName("SCRIPT");for(q=0;q<m.length;q++)if(l){if(m[q].onreadystatechange&&m[q].onreadystatechange.path==j.path&&"interactive"==m[q].readyState){k=!0;break}}else if(m[q].onload&&m[q].onload.path==j.path){k=!0;break}k||(j.status=n.STATUS_CONTENT_LOADED,updateNode(j))}if(b.keepOnLoading){q=!0;if(k=oa(n.STATUS_KNOWN))for(ia(k);f<g&&(k=oa(n.STATUS_KNOWN));)ia(k);else if(0!=w.length)k=
w.shift(),!e[k.path]||0!=w.length||!K||k.musts.length||k.optionals.length?(ba(d,k,!0),G(k,k.path,k.requiredBy,!1)):K&&(K=!1);else if(k=pa(n.STATUS_KNOWN))for(ia(k);f<g&&(k=pa(n.STATUS_KNOWN));)ia(k);else q=!1;if(!(q||0<f)){j=[oa,pa];m=null;for(q=0;2>q;q++)for(;k=j[q](n.STATUS_CONTENT_LOADED);)1==q&&m===k&&(k.status=n.STATUS_LOAD_COMPLETE),updateNode(k),m=k;for(;!(O=[],!P(d,c)););for(q=0;2>q;q++)for(m=null;(k=j[q](n.STATUS_DECLARED))&&m!==k;)updateNode(m=k);m=[];for(q=0;2>q;q++)for(;k=j[q](n.STATUS_DECLARED);)m.push(k),
k.status=n.STATUS_LOAD_COMPLETE;if(m.length){for(q=0;q<m.length;q++)Q(m[q]);for(q=0;q<m.length;q++)if(j=m[q].onLoaded)m[q].onLoaded=null,j()}if(h)h();else if(b._classCountPending)for(v in b._classPending){if(k=D(v),System.out.println("class left pending "+v+" "+k),k){updateNode(k);break}}else b._checkLoad&&(System.out.println("I think I'm done: SAEM call count: "+r),a.showDuplicates(!0));b.onGlobalLoaded()}}}},O=[],P=function(a,c){var d=O,e=d.length;d.push(a);for(var f=e;0<=--f&&!(d[f]===a&&d[f].status>=
n.STATUS_DECLARED););if(0<=f){if(b._checkLoad){var g;System.out.println("cycle found loading "+c+" for "+a)}for(;f<e;f++){var h=d[f];h.status=n.STATUS_LOAD_COMPLETE;Q(h);for(g=0;g<h.parents.length;g++)updateNode(h.parents[g]);h.parents=[];var j=h.onLoaded;b._checkLoad&&(g="cycle setting status to LOAD_COMPLETE for "+h.name+(j?" firing "+j.toString():""),System.out.println(g));j&&(h.onLoaded=null,j())}d.length=0;return!0}h=[a.musts,a.optionals];for(g=0;2>g;g++){j=h[g];for(f=j.length;0<=--f;)if(j[f].status==
n.STATUS_DECLARED&&P(j[f],c))return!0}d.length=e;return!1};b._classCountPending=0;b._classCountOK=0;b._classPending={};b.showPending=function(){var a=[],c;for(c in b._classPending){var d=D(c);d?(a.push(d),System.out.println(R("","",d,"",0))):alert("No node for "+c)}return a};var R=function(a,b,c,d,e){b+="--"+c.name;a+=b+"\n";if(5<e)return a+(d+" ...\n");d+="\t";a+=d+"status: "+c.status+"\n";if(c.parents&&c.parents.length&&c.parents[0]&&c.parents[0].name){a+=d+"parents: "+c.parents.length+"\n";for(var f=
0;f<c.parents.length;f++)a=R(a,b,c.parents[f],d+"\t",e+1);a+="\n"}return a};updateNode=function(a){if(!a.name||a.status>=n.STATUS_LOAD_COMPLETE)Q(a);else{var c=!0;if(a.musts.length&&a.declaration)for(var d=a.musts.length,e=d;0<=--e;){var f=a.musts[e];f.requiredBy=a;if(f.status<n.STATUS_DECLARED&&isClassDefined(f.name)){var g=[];f.status=n.STATUS_LOAD_COMPLETE;Q(f);if(f.declaration&&f.declaration.clazzList){for(var h=0,j=f.declaration.clazzList,k=j.length;h<k;h++){var l=D(j[h]);l&&(l.status!=n.STATUS_LOAD_COMPLETE&&
l!==f)&&(l.status=f.status,l.declaration=null,Q(l),l.onLoaded&&g.push(l))}f.declaration=null}f.onLoaded&&g.push(f);for(h=0;h<g.length;h++)if(j=g[h].onLoaded)g[h].onLoaded=null,j()}else f.status==n.STATUS_CONTENT_LOADED&&updateNode(f),f.status<n.STATUS_DECLARED&&(c=!1);a.musts.length!=d&&(e=d=a.musts.length,c=!0)}if(c){if(a.status<n.STATUS_DECLARED){if(e=a.declaration)e(),e.executed=!0;b._checkLoad&&b._classPending[a.name]&&(delete b._classPending[a.name],b._classCountOK,b._classCountPending--);a.status=
n.STATUS_DECLARED;t&&(t[a.name]=!0);b.onScriptInitialized(a.path);if(a.declaration&&a.declaration.clazzList){h=0;j=a.declaration.clazzList;for(k=j.length;h<k;h++)if((l=D(j[h]))&&l.status!=n.STATUS_DECLARED&&l!==a)l.status=n.STATUS_DECLARED,t&&(t[l.name]=!0),b.onScriptInitialized(l.path)}}c=n.STATUS_DECLARED;if(0==a.optionals.length&&0==a.musts.length||a.status>n.STATUS_KNOWN&&!a.declaration||S(a.musts,n.STATUS_LOAD_COMPLETE)&&S(a.optionals,n.STATUS_LOAD_COMPLETE)){c=n.STATUS_LOAD_COMPLETE;if(!T(a,
c))return!1;if(a.declaration&&a.declaration.clazzList){h=0;j=a.declaration.clazzList;for(k=j.length;h<k;h++)if((l=D(j[h]))&&l.status!=c&&l!==a)if(l.declaration=null,!T(l,c))return!1}}if(a.parents&&a.parents.length){for(e=0;e<a.parents.length;e++)h=a.parents[e],h.status<c&&updateNode(h,h.name);c==n.STATUS_LOAD_COMPLETE&&(a.parents=[])}}}};var S=function(a,b){for(var c=a.length;0<=--c;)if(a[c].status<b)return!1;return!0},T=function(a,c){a.status=c;b.onScriptCompleted(a.path);var d=a.onLoaded;if(d&&
(a.onLoaded=null,d(),!b.keepOnLoading))return!1;Q(a);return!0},U={"r0.13412":1},V=function(){for(;;){var a=Math.random(),b="r"+a;if(!U[b])return U[b]=1,d.random=a}},D=function(a){V();return X(a,d)},pa=function(a){V();return aa(d,a)},oa=function(a){return Z(d,a)},X=function(a,b){var c;return b.name==a?b:(c=Y(a,b.musts))||(c=Y(a,b.optionals))?c:null},Y=function(a,b){for(var c=d.random,e=b.length;0<=--e;){var f=b[e];if(f.name==a||f.random!=c&&(f.random=c,f=X(a,f)))return f}return null},ja=function(a,
b){return a.status==b&&(b!=n.STATUS_KNOWN||!e[a.path])&&(b==n.STATUS_DECLARED||!isClassDefined(a.name))},Z=function(a,b){for(var c=a.musts.length;0<=--c;){var d=a.musts[c];if(ja(d,b)||(d=Z(d,b)))return d}return ja(a,b)?a:null},aa=function(a,b){var c;return(c=ca(a.musts,b))||(c=ca(a.optionals,b))||ja(c=a,b)?c:null},ca=function(a,b){if(a)for(var c=d.random,e=0;e<a.length;e++){var f=a[e];if(ja(f,b)||f.random!=c&&(f.random=c,f=aa(f,b)))return f}return null},qa=function(a,c,e,f){if(c instanceof Array){u(c);
for(var g=0;g<c.length;g++)qa(a,c[g],e,f,c)}else{b._checkLoad&&!b._classPending[c]&&(b._classPending[c]=1,0==b._classCountPending++&&(b._classCountOK=0),System.out.println("Loading class "+c));g=x["#"+c];g||(g=(g=D(c))?g:new n,g.name=c,g.path=C["#"+c]||"unknown",fa(g.path,c,g),g.status=n.STATUS_KNOWN,ba(d,g,!1));da(g,a,!0);5==arguments.length&&f&&(f.status=g.status,f.clazzList=arguments[4]);if(g.declaration=f)g.status=n.STATUS_CONTENT_LOADED;da(g,e,!1)}},da=function(a,b,c){if(b&&b.length){u(b);for(var d=
0;d<b.length;d++){var e=b[d];if(e&&!isClassDefined(e)&&!z["@"+e]){var f=D(e);f||(f=new n,f.name=e,f.status=n.STATUS_KNOWN);f.requiredBy=a;ba(a,f,c)}}}};window.Clazz?a.load=qa:b.load=qa;var fa=function(a,b,c){var d="@"+a;if(a=x[d])if(a instanceof Array){for(var d=!1,e=0;e<a.length;e++)if(a[e].name==b){d=!0;break}d||a.push(c)}else x[d]=[a,c];else x[d]=c;x["#"+b]=c},ia=function(a){var c=a.name;if(!isClassDefined(c)&&!z["@"+c]){var d=b.getClasspathFor(c);a.path=d;fa(d,c,a);if(!e[d])return G(a,d,a.requiredBy,
!1),!0}return!1},la=b.runtimeKeyClass="java.lang.String",ma=[];b.getJ2SLibBase=function(){var a=window["j2s.lib"];return a?a.base+("."==a.alias?"":(a.alias?a.alias:a.version?a.version:"1.0.0")+"/"):null};var ha=!0,ga=!1,na=-1;b.MODE_SCRIPT=4;b.MODE_XHR=2;b.MODE_SYNC=1;b.setLoadingMode=function(a,c){var d=!0,e=!0;"string"==typeof a?(a=a.toLowerCase(),0<=a.indexOf("script")?e=!1:a.indexOf("async"),d=!1):a&b.MODE_SCRIPT?e=!1:d=!(a&b.MODE_SYNC);ga=e;na=(ha=d)&&0<=c?c:-1;return d};var ea=function(){if(!y&&
isClassDefined(la)){for(var a=ma,c=0;c<a.length;c++)b.loadClass(a[c][0],a[c][1]);ma=[]}};b.loadZJar=function(a,c){var d=null,e=c instanceof Array;e?c=c[c.length-1]:d=c==la?ea:null;b.jarClasspath(a,e?c:[c]);b.loadClass(c,d,!0)};var ta={},ra=[],ba=function(a,b,c){var e=!1;c?(c=a.musts,b.requiredBy||(b.requiredBy=a)):c=a.optionals;ta[b.name]||(ra.push(b),ta[b.name]=b);for(var f=0;f<c.length;f++)if(c[f].name==b.name){e=!0;break}e||(c.push(b),K&&(0!=b.name.indexOf("java")&&0!=b.name.indexOf("net.sf.j2s.ajax"))&&
(N&&(K=!1),N=!0));a:{if(a.name&&a!=d&&a!=b)for(e=0;e<b.parents.length;e++)if(b.parents[e].name==a.name)break a;b.parents.push(a)}},Q=function(a){var b=a.parents;if(b)for(var c=b.length;0<=--c;)ka(b[c].musts,a)||ka(b[c].optionals,a)};a.binaryFolders=b.binaryFolders=[b.getJ2SLibBase()]})(a,a._Loader);a._LoaderProgressMonitor={};var x=a._LoaderProgressMonitor,L=null,M=0,u=null,R=0;x.DEFAULT_OPACITY=h&&h._j2sLoadMonitorOpacity?h._j2sLoadMonitorOpacity:55;x.hideMonitor=function(){u.style.display="none"};
x.showStatus=function(a,b){if(!u){var c=document.createElement("DIV");c.id="_Loader-status";c.style.cssText="position:absolute;bottom:4px;left:4px;padding:2px 8px;z-index:"+(window["j2s.lib"].monitorZIndex||1E4)+";background-color:#8e0000;color:yellow;font-family:Arial, sans-serif;font-size:10pt;white-space:nowrap;";c.onmouseover=ra;u=c;document.body.appendChild(c);ca||(ca=!0)}da(u);if(null==a)b?N():x.hideMonitor();else{u.appendChild(document.createTextNode(""+a));"none"==u.style.display&&(u.style.display=
"");ea(x.DEFAULT_OPACITY);var d,c=navigator.userAgent;d=document.body;var e=d.parentNode,f=e.clientHeight;d=d.scrollTop+d.offsetTop;var g=e.scrollTop+e.offsetTop,c=0>c.indexOf("Opera")&&document.all?0==f?d:g:0>c.indexOf("Gecko")?f==e.offsetHeight&&f==e.scrollHeight?d:g:d;R!=c&&(R=c,u.style.bottom=R+4+"px");b&&N()}};var da=function(a){if(a)for(var b=a.childNodes.length;0<=--b;){var c=a.childNodes[b];if(c){c.childNodes&&c.childNodes.length&&da(c);try{a.removeChild(c)}catch(d){}}}},ea=function(a){L&&
a==x.DEFAULT_OPACITY&&(window.clearTimeout(L),L=null);M=a;navigator.userAgent.toLowerCase();u.style.filter="Alpha(Opacity="+a+")";u.style.opacity=a/100},ra=function(){x.hideMonitor()},ca=!1,N=function(){"none"!=u.style.display&&(M==x.DEFAULT_OPACITY?(L=window.setTimeout(function(){N()},750),M-=5):0<=M-10?(ea(M-10),L=window.setTimeout(function(){N()},40)):u.style.display="none")},p=a.Console,y=System;p.maxTotalLines=1E4;p.setMaxTotalLines=function(a){p.maxTotalLines=0<a?a:999999};p.maxLatency=40;p.setMaxLatency=
function(a){p.maxLatency=0<a?a:40};p.pinning=!1;p.enablePinning=function(a){p.pinning=a};p.linesCount=0;p.metLineBreak=!1;p.createConsoleWindow=function(){var a=document.createElement("DIV");a.style.cssText="font-family:monospace, Arial, sans-serif;";document.body.appendChild(a);return a};var z=String.fromCharCode(160),z=z+(z+z+z);p.consoleOutput=function(a,b){var c=window["j2s.lib"];(c=c&&c.console)&&"string"==typeof c&&(c=document.getElementById(c));if(!c)return!1;if(p.linesCount>p.maxTotalLines){for(var d=
0;d<p.linesCount-p.maxTotalLines;d++)c&&0<c.childNodes.length&&c.removeChild(c.childNodes[0]);p.linesCount=p.maxTotalLines}var e=!1;a=("undefined"==typeof a?"":null==a?"null":""+a).replace(/\t/g,z);if(0<a.length)switch(a.charAt(a.length-1)){case "\n":case "\r":a=1<a.length?a.substring(0,a.length-("\r"==a.charAt(a.length-2)?2:1)):"",e=!0}var f=null;a=a.replace(/\t/g,z);for(var f=a.split(/\r\n|\r|\n/g),d=0,g=f.length-1;d<=g;d++){var h=null;if(p.metLineBreak||0==p.linesCount||1>c.childNodes.length)h=
document.createElement("DIV"),c.appendChild(h),h.style.whiteSpace="nowrap",p.linesCount++;else try{h=c.childNodes[c.childNodes.length-1]}catch(j){h=document.createElement("DIV"),c.appendChild(h),h.style.whiteSpace="nowrap",p.linesCount++}var k=document.createElement("SPAN");h.appendChild(k);k.style.whiteSpace="nowrap";b&&(k.style.color=b);h=f[d];0==h.length&&(h=z);k.appendChild(document.createTextNode(h));p.pinning||(c.scrollTop+=100);p.metLineBreak=d!=g||e}d=c.parentNode.className;!p.pinning&&(d&&
-1!=d.indexOf("composite"))&&(c.parentNode.scrollTop=c.parentNode.scrollHeight);p.lastOutputTime=(new Date).getTime()};p.clear=function(){try{p.metLineBreak=!0;var a=window["j2s.lib"],b=a&&a.console;if(b&&(b=document.getElementById(b))){for(var c=b.childNodes,d=c.length;0<=--d;)b.removeChild(c[d]);p.linesCount=0}}catch(e){}};a.alert=function(a){p.consoleOutput(a+"\r\n");h.clazzAlert(a)};y.out.print=function(a){p.consoleOutput(a)};y.out.println=function(a){p.consoleOutput("undefined"==typeof a?"\r\n":
null==a?"null\r\n":a+"\r\n")};y.out.write=function(a,b,c){y.out.print(String.instantialize(a).substring(b,b+c))};y.err.__CLASS_NAME__="java.io.PrintStream";y.err.print=function(a){p.consoleOutput(a,"red")};y.err.println=function(a){p.consoleOutput("undefined"==typeof a?"\r\n":null==a?"null\r\n":a+"\r\n","red")};y.err.write=function(a,b,c){y.err.print(String.instantialize(a).substring(b,b+c))}}(Clazz,Jmol))};Jmol.___JmolDate="$Date: 2026-01-31 18:34:16 -0600 (Sat, 31 Jan 2026) $";
Jmol.___fullJmolProperties="src/org/jmol/viewer/Jmol.properties";Jmol.___JmolVersion="16.3.49";
