From 42d31ef3fe77f0f85d068fee8f54435f1ab4b49f Mon Sep 17 00:00:00 2001 From: gmungoc Date: Mon, 7 Sep 2015 21:20:48 +0100 Subject: [PATCH] JAL-1859 Jmol linked applet updated to use Jmol2.js --- examples/embeddedWJmol.html | 13 +- examples/javascript/jalview.js | 3 +- examples/jmol/Jmol.js | 1705 ---------------------------------------- examples/jmol/Jmol2.js | 443 ++++++++++- 4 files changed, 447 insertions(+), 1717 deletions(-) delete mode 100644 examples/jmol/Jmol.js diff --git a/examples/embeddedWJmol.html b/examples/embeddedWJmol.html index 31a627d..eef45b4 100644 --- a/examples/embeddedWJmol.html +++ b/examples/embeddedWJmol.html @@ -213,14 +213,11 @@ jmolInitialize("","JmolApplet-14.2.14_2015.06.11.jar"); var jvstructassoc; var modeltofiles = new Array(); - //function lJvA() { - //jvfollower = document.getElementById("jvA"); - //setConsole(document.getElementById("stdout")); - - // sep = jvfollower.getSeparator(); - //jvapp.setSeparator(""+jvapp.getSeparator()); -// linkJvJmol(jvfollower, "jmolView", modeltofiles); -// }; + function lJvA() { + jvfollower = document.getElementById("jvA"); + setConsole(document.getElementById("stdout")); + linkJvJmol(jvfollower, "jmolView", modeltofiles); + }; var _jvA=new Object(); _jvA.attributes = { diff --git a/examples/javascript/jalview.js b/examples/javascript/jalview.js index fa08a4d..26d87dc 100644 --- a/examples/javascript/jalview.js +++ b/examples/javascript/jalview.js @@ -153,8 +153,7 @@ function linkJvJmol(applet, jmolView, modeltofiles) { var sep = applet.getSeparator(); var oldjm=jmolView; // recover full id of Jmol applet -// jmolView=_jmolGetApplet(jmolView).id; // Jmol 12.4 - jmolView=jmolFindTarget(jmolView).id; // Jmol 14.2.14 + jmolView=jmolFindTarget(jmolView); // Jmol 14.2.14 var jmbinding=_jvjmols.get(jmolView); if (!jmbinding) { diff --git a/examples/jmol/Jmol.js b/examples/jmol/Jmol.js deleted file mode 100644 index fbc3638..0000000 --- a/examples/jmol/Jmol.js +++ /dev/null @@ -1,1705 +0,0 @@ -/* Jmol 12.0 script library Jmol.js 9:48 PM 1/31/2011 Bob Hanson - - checkbox heirarchy -- see http://chemapps.stolaf.edu/jmol/docs/examples-11/check.htm - - based on: - * - * Copyright (C) 2004-2005 Miguel, Jmol Development, www.jmol.org - * - * Contact: hansonr@stolaf.edu - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - * 02111-1307 USA. - */ - -// for documentation see www.jmol.org/jslibrary - -try{if(typeof(_jmol)!="undefined")exit() - -// place "?NOAPPLET" on your command line to check applet control action with a textarea -// place "?JMOLJAR=xxxxx" to use a specific jar file - -// bob hanson -- jmolResize(w,h) -- resizes absolutely or by percent (w or h 0.5 means 50%) -// angel herraez -- update of jmolResize(w,h,targetSuffix) so it is not tied to first applet -// bob hanson -- jmolEvaluate -- evaluates molecular math 8:37 AM 2/23/2007 -// bob hanson -- jmolScriptMessage -- returns all "scriptStatus" messages 8:37 AM 2/23/2007 -// bob hanson -- jmolScriptEcho -- returns all "scriptEcho" messages 8:37 AM 2/23/2007 -// bob hanson -- jmolScriptWait -- 11:31 AM 5/2/2006 -// bob hanson -- remove trailing separatorHTML in radio groups -- 12:18 PM 5/6/2006 -// bob hanson -- adds support for dynamic DOM script nodes 7:04 AM 5/19/2006 -// bob hanson -- adds try/catch for wiki - multiple code passes 7:05 AM 5/19/2006 -// bob hanson -- auto-initiates to defaultdir/defaultjar -- change as desired. -// bob hanson -- adding save/restore orientation w/ and w/o delay 11:49 AM 5/25/2006 -// bob hanson -- adding AjaxJS service 11:16 AM 6/3/2006 -// bob hanson -- fix for iframes not available for finding applet -// bob hanson -- added applet fake ?NOAPPLET URL flag -// bob hanson -- added jmolSetCallback(calbackName, funcName) 3:32 PM 6/13/2006 -// used PRIOR to jmolApplet() or jmolAppletInline() -// added 4th array element in jmolRadioGroup -- title -// added and id around link, checkbox, radio, menu -// fixing AJAX loads for MSIE/Opera-Mozilla incompatibility -// -- renamed Jmol-11.js from Jmol-new.js; JmolApplet.jar from JmolAppletProto.jar -// renamed Jmol.js for Jmol 11 distribution -// -- modified jmolRestoreOrientation() to be immediate, no 1-second delay -// bob hanson -- jmolScriptWait always returns a string -- 11:23 AM 9/16/2006 -// bh -- jmolCommandInput() -// bh -- jmolSetTranslation(TF) -- forces translation even if there might be message callback issues -// bh -- minor fixes suggested by Angel -// bh -- adds jmolSetSyncId() and jmolGetSyncId() -// bh 3/2008 -- adds jmolAppendInlineScript() and jmolAppendInlineArray() -// bh 3/2008 -- fixes IE7 bug in relation to jmolLoadInlineArray() -// bh 6/2008 -- adds jmolSetAppletWindow() -// Angel H. 6/2008 -- added html " - var t = "" - if (labelHtml.toLowerCase().indexOf("")>=0) { - t += eospan - eospan = ""; - } - t += "" +eospan; - if (_jmol.debugAlert) - alert(t); - return _jmolDocumentWrite(t); -} - -function jmolStartNewRadioGroup() { - ++_jmol.radioGroupCount; -} - -function jmolRadioGroup(arrayOfRadioButtons, separatorHtml, groupName, id, title) { - /* - - array: [radio1,radio2,radio3...] - where radioN = ["script","label",isSelected,"id","title"] - - */ - - _jmolInitCheck(); - var type = typeof arrayOfRadioButtons; - if (type != "object" || type == null || ! arrayOfRadioButtons.length) { - alert("invalid arrayOfRadioButtons"); - return; - } - separatorHtml != undefined && separatorHtml != null || (separatorHtml = "  "); - var len = arrayOfRadioButtons.length; - jmolStartNewRadioGroup(); - groupName || (groupName = "jmolRadioGroup" + (_jmol.radioGroupCount - 1)); - var t = ""; - for (var i = 0; i < len; ++i) { - if (i == len - 1) - separatorHtml = ""; - var radio = arrayOfRadioButtons[i]; - type = typeof radio; - if (type == "object") { - t += _jmolRadio(radio[0], radio[1], radio[2], separatorHtml, groupName, (radio.length > 3 ? radio[3]: (id ? id : groupName)+"_"+i), (radio.length > 4 ? radio[4] : 0), title); - } else { - t += _jmolRadio(radio, null, null, separatorHtml, groupName, (id ? id : groupName)+"_"+i, title); - } - } - t+="" - if (_jmol.debugAlert) - alert(t); - return _jmolDocumentWrite(t); -} - - -function jmolRadio(script, labelHtml, isChecked, separatorHtml, groupName, id, title) { - _jmolInitCheck(); - if (_jmol.radioGroupCount == 0) - ++_jmol.radioGroupCount; - var t = _jmolRadio(script, labelHtml, isChecked, separatorHtml, groupName, (id ? id : groupName + "_" + _jmol.radioCount), title ? title : 0); - if (_jmol.debugAlert) - alert(t); - return _jmolDocumentWrite(t); -} - -function jmolLink(script, label, id, title) { - _jmolInitCheck(); - id != undefined && id != null || (id = "jmolLink" + _jmol.linkCount); - label != undefined && label != null || (label = script.substring(0, 32)); - ++_jmol.linkCount; - var scriptIndex = _jmolAddScript(script); - var t = "" + label + ""; - if (_jmol.debugAlert) - alert(t); - return _jmolDocumentWrite(t); -} - -function jmolCommandInput(label, size, id, title) { - _jmolInitCheck(); - id != undefined && id != null || (id = "jmolCmd" + _jmol.cmdCount); - label != undefined && label != null || (label = "Execute"); - size != undefined && !isNaN(size) || (size = 60); - ++_jmol.cmdCount; - var t = ""; - if (_jmol.debugAlert) - alert(t); - return _jmolDocumentWrite(t); -} - -function _jmolCommandKeyPress(e, id, target) { - var keycode = (window.event ? window.event.keyCode : e ? e.which : 0); - if (keycode == 13) { - var inputBox = document.getElementById(id) - _jmolScriptExecute(inputBox, inputBox.value, target) - } -} - -function _jmolScriptExecute(element,script,target) { - if (typeof(script) == "object") - script[0](element, script, target) - else - jmolScript(script, target) -} - -function jmolMenu(arrayOfMenuItems, size, id, title) { - _jmolInitCheck(); - id != undefined && id != null || (id = "jmolMenu" + _jmol.menuCount); - ++_jmol.menuCount; - var type = typeof arrayOfMenuItems; - if (type != null && type == "object" && arrayOfMenuItems.length) { - var len = arrayOfMenuItems.length; - if (typeof size != "number" || size == 1) - size = null; - else if (size < 0) - size = len; - var sizeText = size ? " size='" + size + "' " : ""; - var t = "" - if (labelHtml.toLowerCase().indexOf("")>=0) { - t += eospan - eospan = ""; - } - t += "" +eospan + separatorHtml; - - return t; -} - -function _jmolFindApplet(target) { - // first look for the target in the current window - var applet = _jmolFindAppletInWindow(_jmol.appletWindow != null ? _jmol.appletWindow : window, target); - // THEN look for the target in child frames - if (applet == undefined) - applet = _jmolSearchFrames(window, target); - // FINALLY look for the target in sibling frames - if (applet == undefined) - applet = _jmolSearchFrames(top, target); // look starting in top frame - return applet; -} - -function _jmolGetApplet(targetSuffix){ - var target = "jmolApplet" + (targetSuffix ? targetSuffix : "0"); - var applet = _jmolFindApplet(target); - if (applet) return applet - _jmol.alerted || alert("could not find applet " + target); - _jmol.alerted = true; - return null -} - -function _jmolSearchFrames(win, target) { - var applet; - var frames = win.frames; - if (frames && frames.length) { // look in all the frames below this window - try{ - for (var i = 0; i < frames.length; ++i) { - applet = _jmolSearchFrames(frames[i], target); - if (applet) - return applet; - } - }catch(e) { - if (_jmol.debugAlert) - alert("Jmol.js _jmolSearchFrames cannot access " + win.name + ".frame[" + i + "] consider using jmolSetAppletWindow()") - } - } - return applet = _jmolFindAppletInWindow(win, target) -} - -function _jmolFindAppletInWindow(win, target) { - var doc = win.document; - if (doc.getElementById(target)) - return doc.getElementById(target); - else if (doc.applets) - return doc.applets[target]; - else - return doc[target]; -} - -function _jmolAddScript(script) { - if (!script) - return 0; - var index = _jmol.scripts.length; - _jmol.scripts[index] = script; - return index; -} - -function _jmolClick(elementClicked, scriptIndex, targetSuffix) { - _jmol.element = elementClicked; - _jmolScriptExecute(elementClicked, _jmol.scripts[scriptIndex], targetSuffix); -} - -function _jmolMenuSelected(menuObject, targetSuffix) { - var scriptIndex = menuObject.value; - if (scriptIndex != undefined) { - _jmolScriptExecute(menuObject, _jmol.scripts[scriptIndex], targetSuffix); - return; - } - var len = menuObject.length; - if (typeof len == "number") { - for (var i = 0; i < len; ++i) { - if (menuObject[i].selected) { - _jmolClick(menuObject[i], menuObject[i].value, targetSuffix); - return; - } - } - } - alert("?Que? menu selected bug #8734"); -} - - -_jmol.checkboxMasters = {}; -_jmol.checkboxItems = {}; - -function jmolSetCheckboxGroup(chkMaster,chkBox) { - var id = chkMaster; - if(typeof(id)=="number")id = "jmolCheckbox" + id; - chkMaster = document.getElementById(id); - if (!chkMaster)alert("jmolSetCheckboxGroup: master checkbox not found: " + id); - var m = _jmol.checkboxMasters[id] = {}; - m.chkMaster = chkMaster; - m.chkGroup = {}; - for (var i = 1; i < arguments.length; i++){ - var id = arguments[i]; - if(typeof(id)=="number")id = "jmolCheckbox" + id; - checkboxItem = document.getElementById(id); - if (!checkboxItem)alert("jmolSetCheckboxGroup: group checkbox not found: " + id); - m.chkGroup[id] = checkboxItem; - _jmol.checkboxItems[id] = m; - } -} - -function _jmolNotifyMaster(m){ - //called when a group item is checked - var allOn = true; - var allOff = true; - for (var chkBox in m.chkGroup){ - if(m.chkGroup[chkBox].checked) - allOff = false; - else - allOn = false; - } - if (allOn)m.chkMaster.checked = true; - if (allOff)m.chkMaster.checked = false; - if ((allOn || allOff) && _jmol.checkboxItems[m.chkMaster.id]) - _jmolNotifyMaster(_jmol.checkboxItems[m.chkMaster.id]) -} - -function _jmolNotifyGroup(m, isOn){ - //called when a master item is checked - for (var chkBox in m.chkGroup){ - var item = m.chkGroup[chkBox] - item.checked = isOn; - if (_jmol.checkboxMasters[item.id]) - _jmolNotifyGroup(_jmol.checkboxMasters[item.id], isOn) - } -} - -function _jmolCbClick(ckbox, whenChecked, whenUnchecked, targetSuffix) { - _jmol.control = ckbox - _jmolClick(ckbox, ckbox.checked ? whenChecked : whenUnchecked, targetSuffix); - if(_jmol.checkboxMasters[ckbox.id]) - _jmolNotifyGroup(_jmol.checkboxMasters[ckbox.id], ckbox.checked) - if(_jmol.checkboxItems[ckbox.id]) - _jmolNotifyMaster(_jmol.checkboxItems[ckbox.id]) -} - -function _jmolCbOver(ckbox, whenChecked, whenUnchecked) { - window.status = _jmol.scripts[ckbox.checked ? whenUnchecked : whenChecked]; -} - -function _jmolMouseOver(scriptIndex) { - window.status = _jmol.scripts[scriptIndex]; -} - -function _jmolMouseOut() { - window.status = " "; - return true; -} - -function _jmolSetCodebase(codebase) { - _jmol.codebase = codebase ? codebase : "."; - if (_jmol.debugAlert) - alert("jmolCodebase=" + _jmol.codebase); -} - -function _jmolOnloadResetForms() { - // must be evaluated ONLY once - _jmol.previousOnloadHandler = window.onload; - window.onload = - function() { - with (_jmol) { - if (buttonCount+checkboxCount+menuCount+radioCount+radioGroupCount > 0) { - var forms = document.forms; - for (var i = forms.length; --i >= 0; ) - forms[i].reset(); - } - if (previousOnloadHandler) - previousOnloadHandler(); - } - } -} - -//////////////////////////////////// -/////extensions for getProperty///// -//////////////////////////////////// - - -function _jmolEvalJSON(s,key){ - s=s+"" - if(!s)return [] - if(s.charAt(0)!="{"){ - if(s.indexOf(" | ")>=0)s=s.replace(/\ \|\ /g, "\n") - return s - } - var A = eval("("+s+")") - if(!A)return - if(key && A[key])A=A[key] - return A -} - -function _jmolEnumerateObject(A,key){ - var sout="" - if(typeof(A) == "string" && A!="null"){ - sout+="\n"+key+"=\""+A+"\"" - }else if(!isNaN(A)||A==null){ - sout+="\n"+key+"="+(A+""==""?"null":A) - }else if(A.length){ - sout+=key+"=[]" - for(var i=0;ib[0]?-1:0) -} - -function _jmolSortMessages(A){ - if(!A || typeof(A)!="object")return [] - var B = [] - for(var i=A.length-1;i>=0;i--)for(var j=0;j=0;) - for(var j=0;j< Ret[i].length;j++) - s+=Ret[i][j]+"\n" - return s -} - -function jmolScriptWaitOutput(script, targetSuffix) { - targetSuffix == undefined && (targetSuffix="0") - var ret = "" - try{ - if (script) { - _jmolCheckBrowser(); - var applet=_jmolGetApplet(targetSuffix); - if (applet) ret += applet.scriptWaitOutput(script); - } - }catch(e){ - } - return ret; -} - -function jmolEvaluate(molecularMath, targetSuffix) { - - //carries out molecular math on a model - - targetSuffix == undefined && (targetSuffix="0") - var result = "" + jmolGetPropertyAsJavaObject("evaluate", molecularMath, targetSuffix); - var s = result.replace(/\-*\d+/,"") - if (s == "" && !isNaN(parseInt(result)))return parseInt(result); - var s = result.replace(/\-*\d*\.\d*/,"") - if (s == "" && !isNaN(parseFloat(result)))return parseFloat(result); - return result; -} - -function jmolScriptEcho(script, targetSuffix) { - // returns a newline-separated list of all echos from a script - targetSuffix == undefined && (targetSuffix="0") - var Ret=jmolScriptWaitAsArray(script, targetSuffix) - var s = "" - for(var i=Ret.length;--i>=0;) - for(var j=Ret[i].length;--j>=0;) - if (Ret[i][j][1] == "scriptEcho")s+=Ret[i][j][3]+"\n" - return s.replace(/ \| /g, "\n") -} - - -function jmolScriptMessage(script, targetSuffix) { - // returns a newline-separated list of all messages from a script, ending with "script completed\n" - targetSuffix == undefined && (targetSuffix="0") - var Ret=jmolScriptWaitAsArray(script, targetSuffix) - var s = "" - for(var i=Ret.length;--i>=0;) - for(var j=Ret[i].length;--j>=0;) - if (Ret[i][j][1] == "scriptStatus")s+=Ret[i][j][3]+"\n" - return s.replace(/ \| /g, "\n") -} - - -function jmolScriptWaitAsArray(script, targetSuffix) { - var ret = "" - try{ - jmolGetStatus("scriptEcho,scriptMessage,scriptStatus,scriptError",targetSuffix) - if (script) { - _jmolCheckBrowser(); - var applet=_jmolGetApplet(targetSuffix); - if (applet) ret += applet.scriptWait(script); - ret = _jmolEvalJSON(ret,"jmolStatus") - if(typeof ret == "object") - return ret - } - }catch(e){ - } - return [[ret]] -} - - - -//////////// save/restore orientation ///////////// - -function jmolSaveOrientation(id, targetSuffix) { - targetSuffix == undefined && (targetSuffix="0") - return _jmol["savedOrientation"+id] = jmolGetPropertyAsArray("orientationInfo","info",targetSuffix).moveTo -} - -function jmolRestoreOrientation(id, targetSuffix) { - targetSuffix == undefined && (targetSuffix="0") - var s=_jmol["savedOrientation"+id] - if (!s || s == "")return - s=s.replace(/1\.0/,"0") - return jmolScriptWait(s,targetSuffix) -} - -function jmolRestoreOrientationDelayed(id, delay, targetSuffix) { - arguments.length < 2 && (delay=1) - targetSuffix == undefined && (targetSuffix="0") - var s=_jmol["savedOrientation"+id] - if (!s || s == "")return - s=s.replace(/1\.0/,delay) - return jmolScriptWait(s,targetSuffix) -} - -//////////// add parameter ///////////// -/* - * for adding callbacks or other parameters. Use: - - jmolSetDocument(0) - var s= jmolApplet(....) - s = jmolAppletAddParam(s,"messageCallback", "myFunctionName") - document.write(s) - jmolSetDocument(document) // if you want to then write buttons and such normally - - */ - -function jmolAppletAddParam(appletCode,name,value){ - return (value == "" ? appletCode : appletCode.replace(/\\n" - +"" - +"Applet would be here" - +"

" - +"" - return _jmolDocumentWrite(s) - } - - _jmolFindApplet = function(){return jmolApplet0} - - jmolApplet0 = { - script: function(script){document.getElementById("fakeApplet").value="\njmolScript:\n"+script} - ,scriptWait: function(script){document.getElementById("fakeApplet").value="\njmolScriptWait:\n"+script} - ,loadInline: function(data,script){document.getElementById("fakeApplet").value="\njmolLoadInline data:\n"+data+"\n\nscript:\n"+script} - } -} - - -/////////////////////////////////////////// - - // This should no longer be needed, jmolResizeApplet() is better; kept for backwards compatibility - /* - Resizes absolutely (pixels) or by percent of window (w or h 0.5 means 50%). - targetSuffix is optional and defaults to zero (first applet in page). - Both w and h are optional, but needed if you want to use targetSuffix. - h defaults to w - w defaults to 100% of window - If either w or h is between 0 and 1, then it is taken as percent/100. - If either w or h is greater than 1, then it is taken as a size (pixels). - */ -function jmolResize(w,h,targetSuffix) { - _jmol.alerted = true; - var percentW = (!w ? 100 : w <= 1 && w > 0 ? w * 100 : 0); - var percentH = (!h ? percentW : h <= 1 && h > 0 ? h * 100 : 0); - if (_jmol.browser=="msie") { - var width=document.body.clientWidth; - var height=document.body.clientHeight; - } else { - var netscapeScrollWidth=15; - var width=window.innerWidth - netscapeScrollWidth; - var height=window.innerHeight-netscapeScrollWidth; - } - var applet = _jmolGetApplet(targetSuffix); - if(!applet)return; - applet.style.width = (percentW ? width * percentW/100 : w)+"px"; - applet.style.height = (percentH ? height * percentH/100 : (h ? h : w))+"px"; - //title=width + " " + height + " " + (new Date()); -} - -// 13 Jun 09 -- makes jmolResize() obsolete (kept for backwards compatibility) -function jmolResizeApplet(size,targetSuffix) { - // See _jmolGetAppletSize() for the formats accepted as size [same used by jmolApplet()] - // Special case: an empty value for width or height is accepted, meaning no change in that dimension. - _jmol.alerted = true; - var applet = _jmolGetApplet(targetSuffix); - if(!applet)return; - var sz = _jmolGetAppletSize(size, "px"); - sz[0] && (applet.style.width = sz[0]); - sz[1] && (applet.style.height = sz[1]); -} - -function _jmolGetAppletSize(size, units) { - /* Accepts single number or 2-value array, each one can be one of: - percent (text string ending %), decimal 0 to 1 (percent/100), number, or text string (interpreted as nr.) - [width, height] array of strings is returned, with units added if specified. - Percent is relative to container div or element (which should have explicitly set size). - */ - var width, height; - if ( (typeof size) == "object" && size != null ) { - width = size[0]; height = size[1]; - } else { - width = height = size; - } - return [_jmolFixDim(width, units), _jmolFixDim(height, units)]; -} - -function _jmolFixDim(x, units) { - var sx = "" + x; - return (sx.length == 0 ? (units ? "" : _jmol.allowedJmolSize[2]) - : sx.indexOf("%") == sx.length-1 ? sx - : (x = parseFloat(x)) <= 1 && x > 0 ? x * 100 + "%" - : (isNaN(x = Math.floor(x)) ? _jmol.allowedJmolSize[2] - : x < _jmol.allowedJmolSize[0] ? _jmol.allowedJmolSize[0] - : x > _jmol.allowedJmolSize[1] ? _jmol.allowedJmolSize[1] - : x) + (units ? units : "")); -} - - - - diff --git a/examples/jmol/Jmol2.js b/examples/jmol/Jmol2.js index 6312657..e0dcb92 100644 --- a/examples/jmol/Jmol2.js +++ b/examples/jmol/Jmol2.js @@ -68,15 +68,454 @@ Note that: -- MSIE and Safari cannot work with local pages */ +(function(a,l){"object"===typeof module&&"object"===typeof module.exports?module.exports=a.document?l(a,!0):function(a){if(!a.document)throw Error("jQuery requires a window with a document");return l(a)}:l(a)})("undefined"!==typeof window?window:this,function(a,l){function k(f){var w=f.length,a=g.type(f);return"function"===a||g.isWindow(f)?!1:1===f.nodeType&&w?!0:"array"===a||0===w||"number"===typeof w&&0")).appendTo(a.documentElement),a=(fb[0].contentWindow||fb[0].contentDocument).document,a.write(),a.close(),p=za(f,a),fb.detach();nc[f]=p}return p}function pa(f, +a){return{get:function(){var p=f();if(null!=p)if(p)delete this.get;else return(this.get=a).apply(this,arguments)}}}function gb(f,a){if(a in f)return a;for(var p=a.charAt(0).toUpperCase()+a.slice(1),x=a,g=oc.length;g--;)if(a=oc[g]+p,a in f)return a;return x}function A(f,a){for(var p,x,b,j=[],c=0,e=f.length;ca;a+=2)"margin"===p&&(j+=g.css(f,p+Ma[a],!0,b)),x?("content"===p&&(j-=g.css(f,"padding"+Ma[a],!0,b)),"margin"!==p&&(j-=g.css(f,"border"+ +Ma[a]+"Width",!0,b))):(j+=g.css(f,"padding"+Ma[a],!0,b),"padding"!==p&&(j+=g.css(f,"border"+Ma[a]+"Width",!0,b)));return j}function fa(f,a,p){var x=!0,b="width"===a?f.offsetWidth:f.offsetHeight,j=Na(f),c=v.boxSizing()&&"border-box"===g.css(f,"boxSizing",!1,j);if(0>=b||null==b){b=Oa(f,a,j);if(0>b||null==b)b=f.style[a];if(sb.test(b))return b;x=c&&(v.boxSizingReliable()||b===f.style[a]);b=parseFloat(b)||0}return b+aa(f,a,p||(c?"border":"content"),x,j)+"px"}function C(f,a,p,x,b){return new C.prototype.init(f, +a,p,x,b)}function ua(){setTimeout(function(){Xa=void 0});return Xa=g.now()}function qa(f,a){var p,x={height:f},b=0;for(a=a?1:0;4>b;b+=2-a)p=Ma[b],x["margin"+p]=x["padding"+p]=f;a&&(x.opacity=x.width=f);return x}function ib(f,a,p){for(var b,g=(jb[a]||[]).concat(jb["*"]),j=0,c=g.length;jw&&b)return a;d.resolveWith(f,[m]);return!1},m=d.promise({elem:f,props:g.extend({},a),opts:g.extend(!0,{specialEasing:{}},p),originalProperties:a,originalOptions:p,startTime:Xa||ua(),duration:p.duration,tweens:[],createTween:function(a,w){var p=g.Tween(f,m.opts,a,w,m.opts.specialEasing[a]||m.opts.easing);m.tweens.push(p);return p},stop:function(a){var w=0,p=a?m.tweens.length:0;if(j)return this;for(j= +!0;wf?this[f+this.length]:this[f]:y.call(this)},pushStack:function(f){f=g.merge(this.constructor(),f);f.prevObject=this;f.context=this.context;return f},each:function(f,a){return g.each(this,f,a)},map:function(f){return this.pushStack(g.map(this,function(a,p){return f.call(a,p,a)}))},slice:function(){return this.pushStack(y.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(f){var a= +this.length;f=+f+(0>f?a:0);return this.pushStack(0<=f&&fp?Math.max(0,b+p):p:0;pG.cacheLength&&delete f[a.shift()];return f[p+" "]=b}var a=[];return f},la=function(f){f[L]=!0;return f},ma=function(f){var a=R.createElement("div");try{return!!f(a)}catch(p){return!1}finally{a.parentNode&&a.parentNode.removeChild(a)}},Ub=function(f,a){for(var p=f.split("|"),b=f.length;b--;)G.attrHandle[p[b]]= +a},pc=function(f,a){var p=a&&f,b=p&&1===f.nodeType&&1===a.nodeType&&(~a.sourceIndex||ba)-(~f.sourceIndex||ba);if(b)return b;if(p)for(;p=p.nextSibling;)if(p===a)return-1;return f?1:-1},hd=function(f){return function(a){return"input"===a.nodeName.toLowerCase()&&a.type===f}},id=function(f){return function(a){var p=a.nodeName.toLowerCase();return("input"===p||"button"===p)&&a.type===f}},U=function(f){return la(function(a){a=+a;return la(function(p,b){for(var g,j=f([],p.length,a),c=j.length;c--;)if(p[g= +j[c]])p[g]=!(b[g]=p[g])})})},Sb=function(f){return f&&typeof f.getElementsByTagName!==ga&&f},qc=function(){},vb=function(f,a){var p,b,g,j,c,e,d;if(c=Ea[f+" "])return a?0:c.slice(0);c=f;e=[];for(d=G.preFilter;c;){if(!p||(b=jd.exec(c)))b&&(c=c.slice(b[0].length)||c),e.push(g=[]);p=!1;if(b=kd.exec(c))p=b.shift(),g.push({value:p,type:b[0].replace(xb," ")}),c=c.slice(p.length);for(j in G.filter)if((b=yb[j].exec(c))&&(!d[j]||(b=d[j](b))))p=b.shift(),g.push({value:p,type:j,matches:b}),c=c.slice(p.length); +if(!p)break}return a?c.length:c?H.error(f):Ea(f,e).slice(0)},wb=function(f){for(var a=0,p=f.length,b="";a+~]|[\x20\t\r\n\f])[\x20\t\r\n\f]*/,nd=RegExp("=[\\x20\\t\\r\\n\\f]*([^\\]'\"]*?)[\\x20\\t\\r\\n\\f]*\\]","g"),od=RegExp(Xb),pd=RegExp("^"+uc+"$"),yb={ID:/^#((?:\\.|[\w-]|[^\x00-\xa0])+)/,CLASS:/^\.((?:\\.|[\w-]|[^\x00-\xa0])+)/, +TAG:RegExp("^("+"(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+".replace("w","w*")+")"),ATTR:RegExp("^"+vc),PSEUDO:RegExp("^"+Xb),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)", +"i")},qd=/^(?:input|select|textarea|button)$/i,rd=/^h\d$/i,lb=/^[^{]+\{\s*\[native \w/,fd=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Rb=/[+~]/,gd=/'|\\/g,Ba=RegExp("\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\f])|.)","ig"),Ca=function(f,a,p){f="0x"+a-65536;return f!==f||p?a:0>f?String.fromCharCode(f+65536):String.fromCharCode(f>>10|55296,f&1023|56320)};try{Aa.apply(N=tc.call(Y.childNodes),Y.childNodes),N[Y.childNodes.length].nodeType}catch(Yd){Aa={apply:N.length?function(f,a){md.apply(f,tc.call(a))}: +function(f,a){for(var p=f.length,b=0;f[p++]=a[b++];);f.length=p-1}}}I=H.support={};rc=H.isXML=function(f){return(f=f&&(f.ownerDocument||f).documentElement)?"HTML"!==f.nodeName:!1};ka=H.setDocument=function(f){var a=f?f.ownerDocument||f:Y;f=a.defaultView;if(a===R||9!==a.nodeType||!a.documentElement)return R;R=a;ha=a.documentElement;Z=!rc(a);f&&f!==f.top&&(f.addEventListener?f.addEventListener("unload",function(){ka()},!1):f.attachEvent&&f.attachEvent("onunload",function(){ka()}));I.attributes=ma(function(f){f.className= +"i";return!f.getAttribute("className")});I.getElementsByTagName=ma(function(f){f.appendChild(a.createComment(""));return!f.getElementsByTagName("*").length});I.getElementsByClassName=lb.test(a.getElementsByClassName)&&ma(function(f){f.innerHTML="

";f.firstChild.className="i";return 2===f.getElementsByClassName("i").length});I.getById=ma(function(f){ha.appendChild(f).id=L;return!a.getElementsByName||!a.getElementsByName(L).length});I.getById?(G.find.ID=function(f, +a){if(typeof a.getElementById!==ga&&Z){var b=a.getElementById(f);return b&&b.parentNode?[b]:[]}},G.filter.ID=function(f){var a=f.replace(Ba,Ca);return function(f){return f.getAttribute("id")===a}}):(delete G.find.ID,G.filter.ID=function(f){var a=f.replace(Ba,Ca);return function(f){return(f=typeof f.getAttributeNode!==ga&&f.getAttributeNode("id"))&&f.value===a}});G.find.TAG=I.getElementsByTagName?function(f,a){if(typeof a.getElementsByTagName!==ga)return a.getElementsByTagName(f)}:function(f,a){var b, +w=[],g=0,j=a.getElementsByTagName(f);if("*"===f){for(;b=j[g++];)1===b.nodeType&&w.push(b);return w}return j};G.find.CLASS=I.getElementsByClassName&&function(f,a){if(typeof a.getElementsByClassName!==ga&&Z)return a.getElementsByClassName(f)};ea=[];S=[];if(I.qsa=lb.test(a.querySelectorAll))ma(function(f){f.innerHTML="";f.querySelectorAll("[t^='']").length&&S.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")");f.querySelectorAll("[selected]").length||S.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)"); +f.querySelectorAll(":checked").length||S.push(":checked")}),ma(function(f){var b=a.createElement("input");b.setAttribute("type","hidden");f.appendChild(b).setAttribute("name","D");f.querySelectorAll("[name=d]").length&&S.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?=");f.querySelectorAll(":enabled").length||S.push(":enabled",":disabled");f.querySelectorAll("*,:x");S.push(",.*:")});(I.matchesSelector=lb.test(Fa=ha.webkitMatchesSelector||ha.mozMatchesSelector||ha.oMatchesSelector||ha.msMatchesSelector))&& +ma(function(f){I.disconnectedMatch=Fa.call(f,"div");Fa.call(f,"[s!='']:x");ea.push("!=",Xb)});S=S.length&&RegExp(S.join("|"));ea=ea.length&&RegExp(ea.join("|"));ta=(f=lb.test(ha.compareDocumentPosition))||lb.test(ha.contains)?function(f,a){var b=9===f.nodeType?f.documentElement:f,w=a&&a.parentNode;return f===w||!(!w||!(1===w.nodeType&&(b.contains?b.contains(w):f.compareDocumentPosition&&f.compareDocumentPosition(w)&16)))}:function(f,a){if(a)for(;a=a.parentNode;)if(a===f)return!0;return!1};u=f?function(f, +b){if(f===b)return wa=!0,0;var g=!f.compareDocumentPosition-!b.compareDocumentPosition;if(g)return g;g=(f.ownerDocument||f)===(b.ownerDocument||b)?f.compareDocumentPosition(b):1;return g&1||!I.sortDetached&&b.compareDocumentPosition(f)===g?f===a||f.ownerDocument===Y&&ta(Y,f)?-1:b===a||b.ownerDocument===Y&&ta(Y,b)?1:na?Qa.call(na,f)-Qa.call(na,b):0:g&4?-1:1}:function(f,b){if(f===b)return wa=!0,0;var g,j=0;g=f.parentNode;var c=b.parentNode,e=[f],d=[b];if(!g||!c)return f===a?-1:b===a?1:g?-1:c?1:na?Qa.call(na, +f)-Qa.call(na,b):0;if(g===c)return pc(f,b);for(g=f;g=g.parentNode;)e.unshift(g);for(g=b;g=g.parentNode;)d.unshift(g);for(;e[j]===d[j];)j++;return j?pc(e[j],d[j]):e[j]===Y?-1:d[j]===Y?1:0};return a};H.matches=function(f,a){return H(f,null,null,a)};H.matchesSelector=function(f,a){(f.ownerDocument||f)!==R&&ka(f);a=a.replace(nd,"='$1']");if(I.matchesSelector&&Z&&(!ea||!ea.test(a))&&(!S||!S.test(a)))try{var p=Fa.call(f,a);if(p||I.disconnectedMatch||f.document&&11!==f.document.nodeType)return p}catch(b){}return 0< +H(a,R,null,[f]).length};H.contains=function(f,a){(f.ownerDocument||f)!==R&&ka(f);return ta(f,a)};H.attr=function(f,a){(f.ownerDocument||f)!==R&&ka(f);var p=G.attrHandle[a.toLowerCase()],p=p&&oa.call(G.attrHandle,a.toLowerCase())?p(f,a,!Z):void 0;return void 0!==p?p:I.attributes||!Z?f.getAttribute(a):(p=f.getAttributeNode(a))&&p.specified?p.value:null};H.error=function(f){throw Error("Syntax error, unrecognized expression: "+f);};H.uniqueSort=function(f){var a,p=[],b=0,g=0;wa=!I.detectDuplicates;na= +!I.sortStable&&f.slice(0);f.sort(u);if(wa){for(;a=f[g++];)a===f[g]&&(b=p.push(g));for(;b--;)f.splice(p[b],1)}na=null;return f};Sa=H.getText=function(f){var a,b="",g=0;if(a=f.nodeType)if(1===a||9===a||11===a){if("string"===typeof f.textContent)return f.textContent;for(f=f.firstChild;f;f=f.nextSibling)b+=Sa(f)}else{if(3===a||4===a)return f.nodeValue}else for(;a=f[g++];)b+=Sa(a);return b};G=H.selectors={cacheLength:50,createPseudo:la,match:yb,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}, +" ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(f){f[1]=f[1].replace(Ba,Ca);f[3]=(f[4]||f[5]||"").replace(Ba,Ca);"~="===f[2]&&(f[3]=" "+f[3]+" ");return f.slice(0,4)},CHILD:function(f){f[1]=f[1].toLowerCase();"nth"===f[1].slice(0,3)?(f[3]||H.error(f[0]),f[4]=+(f[4]?f[5]+(f[6]||1):2*("even"===f[3]||"odd"===f[3])),f[5]=+(f[7]+f[8]||"odd"===f[3])):f[3]&&H.error(f[0]);return f},PSEUDO:function(f){var a,b=!f[5]&&f[2];if(yb.CHILD.test(f[0]))return null; +if(f[3]&&void 0!==f[4])f[2]=f[4];else if(b&&od.test(b)&&(a=vb(b,!0))&&(a=b.indexOf(")",b.length-a)-b.length))f[0]=f[0].slice(0,a),f[2]=b.slice(0,a);return f.slice(0,3)}},filter:{TAG:function(f){var a=f.replace(Ba,Ca).toLowerCase();return"*"===f?function(){return!0}:function(f){return f.nodeName&&f.nodeName.toLowerCase()===a}},CLASS:function(f){var a=sc[f+" "];return a||(a=RegExp("(^|[\\x20\\t\\r\\n\\f])"+f+"([\\x20\\t\\r\\n\\f]|$)"))&&sc(f,function(f){return a.test("string"===typeof f.className&& +f.className||typeof f.getAttribute!==ga&&f.getAttribute("class")||"")})},ATTR:function(f,a,b){return function(g){g=H.attr(g,f);if(null==g)return"!="===a;if(!a)return!0;g+="";return"="===a?g===b:"!="===a?g!==b:"^="===a?b&&0===g.indexOf(b):"*="===a?b&&-1f.nodeType)return!1;return!0},parent:function(f){return!G.pseudos.empty(f)},header:function(f){return rd.test(f.nodeName)},input:function(f){return qd.test(f.nodeName)},button:function(f){var a=f.nodeName.toLowerCase();return"input"=== +a&&"button"===f.type||"button"===a},text:function(f){var a;return"input"===f.nodeName.toLowerCase()&&"text"===f.type&&(null==(a=f.getAttribute("type"))||"text"===a.toLowerCase())},first:U(function(){return[0]}),last:U(function(f,a){return[a-1]}),eq:U(function(f,a,b){return[0>b?b+a:b]}),even:U(function(f,a){for(var b=0;bb?b+a:b;0<=--a;)f.push(a);return f}),gt:U(function(f,a,b){for(b= +0>b?b+a:b;++b";f.firstChild.setAttribute("value","");return""===f.firstChild.getAttribute("value")}))&&Ub("value",function(f,a,b){if(!b&&"input"===f.nodeName.toLowerCase())return f.defaultValue}); +ma(function(f){return null==f.getAttribute("disabled")})||Ub("checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",function(f,a,b){var g;if(!b)return!0===f[a]?a.toLowerCase():(g=f.getAttributeNode(a))&&g.specified?g.value:null});g.find=H;g.expr=H.selectors;g.expr[":"]=g.expr.pseudos;g.unique=H.uniqueSort;g.text=H.getText;g.isXMLDoc=H.isXML;g.contains=H.contains;var wc=g.expr.match.needsContext,xc=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,Vc= +/^.[^:#\[\.,]*$/;g.filter=function(f,a,b){var j=a[0];b&&(f=":not("+f+")");return 1===a.length&&1===j.nodeType?g.find.matchesSelector(j,f)?[j]:[]:g.find.matches(f,g.grep(a,function(f){return 1===f.nodeType}))};g.fn.extend({find:function(f){var a,b=[],j=this,c=j.length;if("string"!==typeof f)return this.pushStack(g(f).filter(function(){for(a=0;a)[^>]*|#([\w-]*))$/;(g.fn.init=function(f,a){var b,j;if(!f)return this;if("string"===typeof f){if((b="<"===f.charAt(0)&&">"===f.charAt(f.length-1)&&3<=f.length?[null,f,null]:sd.exec(f))&&(b[1]||!a)){if(b[1]){if(a=a instanceof g?a[0]:a,g.merge(this, +g.parseHTML(b[1],a&&a.nodeType?a.ownerDocument||a:z,!0)),xc.test(b[1])&&g.isPlainObject(a))for(b in a)if(g.isFunction(this[b]))this[b](a[b]);else this.attr(b,a[b])}else{if((j=z.getElementById(b[2]))&&j.parentNode){if(j.id!==b[2])return mb.find(f);this.length=1;this[0]=j}this.context=z;this.selector=f}return this}return!a||a.jquery?(a||mb).find(f):this.constructor(a).find(f)}if(f.nodeType)return this.context=this[0]=f,this.length=1,this;if(g.isFunction(f))return"undefined"!==typeof mb.ready?mb.ready(f): +f(g);void 0!==f.selector&&(this.selector=f.selector,this.context=f.context);return g.makeArray(f,this)}).prototype=g.fn;mb=g(z);var td=/^(?:parents|prev(?:Until|All))/,ud={children:!0,contents:!0,next:!0,prev:!0};g.extend({dir:function(f,a,b){var j=[];for(f=f[a];f&&9!==f.nodeType&&(void 0===b||1!==f.nodeType||!g(f).is(b));)1===f.nodeType&&j.push(f),f=f[a];return j},sibling:function(f,a){for(var b=[];f;f=f.nextSibling)1===f.nodeType&&f!==a&&b.push(f);return b}});g.fn.extend({has:function(f){var a, +b=g(f,this),j=b.length;return this.filter(function(){for(a=0;ab.nodeType&&(d?-1
a";v.leadingWhitespace=3===$.firstChild.nodeType;v.tbody=!$.getElementsByTagName("tbody").length;v.htmlSerialize=!!$.getElementsByTagName("link").length;v.html5Clone="<:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML;nb.type="checkbox";nb.checked= +!0;Yb.appendChild(nb);v.appendChecked=nb.checked;$.innerHTML="";v.noCloneChecked=!!$.cloneNode(!0).lastChild.defaultValue;Yb.appendChild($);$.innerHTML="";v.checkClone=$.cloneNode(!0).cloneNode(!0).lastChild.checked;v.noCloneEvent=!0;$.attachEvent&&($.attachEvent("onclick",function(){v.noCloneEvent=!1}),$.cloneNode(!0).click());if(null==v.deleteExpando){v.deleteExpando=!0;try{delete $.test}catch($d){v.deleteExpando=!1}}var Yb=$= +nb=null,Bb,Cb,Ac=z.createElement("div");for(Bb in{submit:!0,change:!0,focusin:!0})if(Cb="on"+Bb,!(v[Bb+"Bubbles"]=Cb in a))Ac.setAttribute(Cb,"t"),v[Bb+"Bubbles"]=!1===Ac.attributes[Cb].expando;var Zb=/^(?:input|select|textarea)$/i,wd=/^key/,xd=/^(?:mouse|contextmenu)|click/,Bc=/^(?:focusinfocus|focusoutblur)$/,Cc=/^([^.]*)(?:\.(.+)|)$/;g.event={global:{},add:function(a,b,j,c,e){var d,m,t,q,h,k,u,n,y;if(t=g._data(a)){j.handler&&(q=j,j=q.handler,e=q.selector);j.guid||(j.guid=g.guid++);if(!(m=t.events))m= +t.events={};if(!(h=t.handle))h=t.handle=function(a){return typeof g!==ja&&(!a||g.event.triggered!==a.type)?g.event.dispatch.apply(h.elem,arguments):void 0},h.elem=a;b=(b||"").match(va)||[""];for(t=b.length;t--;)if(d=Cc.exec(b[t])||[],n=k=d[1],y=(d[2]||"").split(".").sort(),n){d=g.event.special[n]||{};n=(e?d.delegateType:d.bindType)||n;d=g.event.special[n]||{};k=g.extend({type:n,origType:k,data:c,handler:j,guid:j.guid,selector:e,needsContext:e&&g.expr.match.needsContext.test(e),namespace:y.join(".")}, +q);if(!(u=m[n]))if(u=m[n]=[],u.delegateCount=0,!d.setup||!1===d.setup.call(a,c,y,h))a.addEventListener?a.addEventListener(n,h,!1):a.attachEvent&&a.attachEvent("on"+n,h);d.add&&(d.add.call(a,k),k.handler.guid||(k.handler.guid=j.guid));e?u.splice(u.delegateCount++,0,k):u.push(k);g.event.global[n]=!0}a=null}},remove:function(a,b,j,c,e){var d,m,t,q,h,k,u,n,y,B,ga,s=g.hasData(a)&&g._data(a);if(s&&(k=s.events)){b=(b||"").match(va)||[""];for(h=b.length;h--;)if(t=Cc.exec(b[h])||[],y=ga=t[1],B=(t[2]||"").split(".").sort(), +y){u=g.event.special[y]||{};y=(c?u.delegateType:u.bindType)||y;n=k[y]||[];t=t[2]&&RegExp("(^|\\.)"+B.join("\\.(?:.*\\.|)")+"(\\.|$)");for(q=d=n.length;d--;)if(m=n[d],(e||ga===m.origType)&&(!j||j.guid===m.guid)&&(!t||t.test(m.namespace))&&(!c||c===m.selector||"**"===c&&m.selector))n.splice(d,1),m.selector&&n.delegateCount--,u.remove&&u.remove.call(a,m);q&&!n.length&&((!u.teardown||!1===u.teardown.call(a,B,s.handle))&&g.removeEvent(a,y,s.handle),delete k[y])}else for(y in k)g.event.remove(a,y+b[h], +j,c,!0);g.isEmptyObject(k)&&(delete s.handle,g._removeData(a,"events"))}},trigger:function(f,b,j,c){var e,d,m,t,q,h,k=[j||z],u=Za.call(f,"type")?f.type:f;q=Za.call(f,"namespace")?f.namespace.split("."):[];m=e=j=j||z;if(!(3===j.nodeType||8===j.nodeType)&&!Bc.test(u+g.event.triggered))if(0<=u.indexOf(".")&&(q=u.split("."),u=q.shift(),q.sort()),d=0>u.indexOf(":")&&"on"+u,f=f[g.expando]?f:new g.Event(u,"object"===typeof f&&f),f.isTrigger=c?2:3,f.namespace=q.join("."),f.namespace_re=f.namespace?RegExp("(^|\\.)"+ +q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,f.result=void 0,f.target||(f.target=j),b=null==b?[f]:g.makeArray(b,[f]),q=g.event.special[u]||{},c||!(q.trigger&&!1===q.trigger.apply(j,b))){if(!c&&!q.noBubble&&!g.isWindow(j)){t=q.delegateType||u;Bc.test(t+u)||(m=m.parentNode);for(;m;m=m.parentNode)k.push(m),e=m;if(e===(j.ownerDocument||z))k.push(e.defaultView||e.parentWindow||a)}for(h=0;(m=k[h++])&&!f.isPropagationStopped();)if(f.type=1]","i"),$b=/^\s+/,Ec=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Fc=/<([\w:]+)/,Gc=/\s*$/g,ia={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:v.htmlSerialize?[0,"",""]:[1,"X
","
"]},ac= +T(z).appendChild(z.createElement("div"));ia.optgroup=ia.option;ia.tbody=ia.tfoot=ia.colgroup=ia.caption=ia.thead;ia.th=ia.td;g.extend({clone:function(a,b,j){var c,e,d,m,t,q=g.contains(a.ownerDocument,a);v.html5Clone||g.isXMLDoc(a)||!Dc.test("<"+a.nodeName+">")?d=a.cloneNode(!0):(ac.innerHTML=a.outerHTML,ac.removeChild(d=ac.firstChild));if((!v.noCloneEvent||!v.noCloneChecked)&&(1===a.nodeType||11===a.nodeType)&&!g.isXMLDoc(a)){c=M(d);t=M(a);for(m=0;null!=(e=t[m]);++m)if(c[m]){var h=c[m],u=void 0,k= +void 0,n=void 0;if(1===h.nodeType){u=h.nodeName.toLowerCase();if(!v.noCloneEvent&&h[g.expando]){n=g._data(h);for(k in n.events)g.removeEvent(h,k,n.handle);h.removeAttribute(g.expando)}if("script"===u&&h.text!==e.text)K(h).text=e.text,da(h);else if("object"===u)h.parentNode&&(h.outerHTML=e.outerHTML),v.html5Clone&&(e.innerHTML&&!g.trim(h.innerHTML))&&(h.innerHTML=e.innerHTML);else if("input"===u&&Nb.test(e.type))h.defaultChecked=h.checked=e.checked,h.value!==e.value&&(h.value=e.value);else if("option"=== +u)h.defaultSelected=h.selected=e.defaultSelected;else if("input"===u||"textarea"===u)h.defaultValue=e.defaultValue}}}if(b)if(j){t=t||M(a);c=c||M(d);for(m=0;null!=(e=t[m]);m++)ya(e,c[m])}else ya(a,d);c=M(d,"script");0")+h[2];for(e=h[0];e--;)m=m.lastChild;!v.leadingWhitespace&&$b.test(d)&&n.push(b.createTextNode($b.exec(d)[0]));if(!v.tbody)for(e=(d="table"===t&&!Gc.test(d)?m.firstChild:""===h[1]&&!Gc.test(d)?m:0)&&d.childNodes.length;e--;)g.nodeName(q=d.childNodes[e],"tbody")&&!q.childNodes.length&&d.removeChild(q);g.merge(n,m.childNodes);for(m.textContent="";m.firstChild;)m.removeChild(m.firstChild);m=k.lastChild}else n.push(b.createTextNode(d)); +m&&k.removeChild(m);v.appendChecked||g.grep(M(n,"input"),rb);for(y=0;d=n[y++];)if(!(c&&-1!==g.inArray(d,c))&&(a=g.contains(d.ownerDocument,d),m=M(k.appendChild(d),"script"),a&&Wa(m),j))for(e=0;d=m[e++];)Hc.test(d.type||"")&&j.push(d);return k},cleanData:function(a,b){for(var j,c,e,d,t=0,q=g.expando,h=g.cache,u=v.deleteExpando,k=g.event.special;null!=(j=a[t]);t++)if(b||g.acceptData(j))if(d=(e=j[q])&&h[e]){if(d.events)for(c in d.events)k[c]?g.event.remove(j,c):g.removeEvent(j,c,d.handle);h[e]&&(delete h[e], +u?delete j[q]:typeof j.removeAttribute!==ja?j.removeAttribute(q):j[q]=null,m.push(e))}}});g.fn.extend({text:function(a){return Ta(this,function(a){return void 0===a?g.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&Ka(this,a).appendChild(a)})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType|| +11===this.nodeType||9===this.nodeType){var b=Ka(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var j,c=a?g.filter(a,this):this,e=0;null!=(j=c[e]);e++)!b&&1===j.nodeType&&g.cleanData(M(j)),j.parentNode&&(b&&g.contains(j.ownerDocument, +j)&&Wa(M(j,"script")),j.parentNode.removeChild(j));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){for(1===a.nodeType&&g.cleanData(M(a,!1));a.firstChild;)a.removeChild(a.firstChild);a.options&&g.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){a=null==a?!1:a;b=null==b?a:b;return this.map(function(){return g.clone(this,a,b)})},html:function(a){return Ta(this,function(a){var f=this[0]||{},b=0,j=this.length;if(void 0===a)return 1===f.nodeType?f.innerHTML.replace(yd, +""):void 0;if("string"===typeof a&&!Ad.test(a)&&(v.htmlSerialize||!Dc.test(a))&&(v.leadingWhitespace||!$b.test(a))&&!ia[(Fc.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ec,"<$1>");try{for(;b
a";ob=cb.getElementsByTagName("a")[0];ob.style.cssText="float:left;opacity:.5";v.opacity=/^0.5/.test(ob.style.opacity);v.cssFloat=!!ob.style.cssFloat;cb.style.backgroundClip="content-box";cb.cloneNode(!0).style.backgroundClip="";v.clearCloneStyle="content-box"=== +cb.style.backgroundClip;ob=cb=null;v.shrinkWrapBlocks=function(){var a,b,j;if(null==Db){a=z.getElementsByTagName("body")[0];if(!a)return;b=z.createElement("div");j=z.createElement("div");a.appendChild(b).appendChild(j);Db=!1;typeof j.style.zoom!==ja&&(j.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0;width:1px;padding:1px;zoom:1",j.innerHTML="
",j.firstChild.style.width="5px",Db=3!==j.offsetWidth); +a.removeChild(b)}return Db};var Ic=/^margin/,sb=RegExp("^("+Ab+")(?!px)[a-z%]+$","i"),Na,Oa,Dd=/^(top|right|bottom|left)$/;a.getComputedStyle?(Na=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Oa=function(a,b,j){var c,e,d=a.style;e=(j=j||Na(a))?j.getPropertyValue(b)||j[b]:void 0;j&&(""===e&&!g.contains(a.ownerDocument,a)&&(e=g.style(a,b)),sb.test(e)&&Ic.test(b)&&(a=d.width,b=d.minWidth,c=d.maxWidth,d.minWidth=d.maxWidth=d.width=e,e=j.width,d.width=a,d.minWidth=b,d.maxWidth= +c));return void 0===e?e:e+""}):z.documentElement.currentStyle&&(Na=function(a){return a.currentStyle},Oa=function(a,b,j){var g,c,e,d=a.style;e=(j=j||Na(a))?j[b]:void 0;null==e&&(d&&d[b])&&(e=d[b]);if(sb.test(e)&&!Dd.test(b)){j=d.left;if(c=(g=a.runtimeStyle)&&g.left)g.left=a.currentStyle.left;d.left="fontSize"===b?"1em":e;e=d.pixelLeft+"px";d.left=j;c&&(g.left=c)}return void 0===e?e:e+""||"auto"});var dc=function(){var f,b,j=z.getElementsByTagName("body")[0];j&&(f=z.createElement("div"),b=z.createElement("div"), +f.style.cssText=bc,j.appendChild(f).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",g.swap(j,null!=j.style.zoom?{zoom:1}:{},function(){cc=4===b.offsetWidth}),Eb=!0,Fb=!1,Gb=!0,a.getComputedStyle&&(Fb="1%"!==(a.getComputedStyle(b,null)||{}).top,Eb="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width),j.removeChild(f),b=j=null)},pb,Hb,cc,Eb,Fb,Gb, +db=z.createElement("div"),bc="border:0;width:0;height:0;position:absolute;top:0;left:-9999px";db.innerHTML="
a";pb=db.getElementsByTagName("a")[0];pb.style.cssText="float:left;opacity:.5";v.opacity=/^0.5/.test(pb.style.opacity);v.cssFloat=!!pb.style.cssFloat;db.style.backgroundClip="content-box";db.cloneNode(!0).style.backgroundClip="";v.clearCloneStyle="content-box"===db.style.backgroundClip;pb=db=null;g.extend(v,{reliableHiddenOffsets:function(){if(null!= +Hb)return Hb;var a,b,j;b=z.createElement("div");var g=z.getElementsByTagName("body")[0];if(g)return b.setAttribute("className","t"),b.innerHTML="
a",a=z.createElement("div"),a.style.cssText=bc,g.appendChild(a).appendChild(b),b.innerHTML="
t
",b=b.getElementsByTagName("td"),b[0].style.cssText="padding:0;margin:0;border:0;display:none",j=0===b[0].offsetHeight,b[0].style.display="",b[1].style.display= +"none",Hb=j&&0===b[0].offsetHeight,g.removeChild(a),Hb},boxSizing:function(){null==cc&&dc();return cc},boxSizingReliable:function(){null==Eb&&dc();return Eb},pixelPosition:function(){null==Fb&&dc();return Fb},reliableMarginRight:function(){var f,b,j,g;if(null==Gb&&a.getComputedStyle){f=z.getElementsByTagName("body")[0];if(!f)return;b=z.createElement("div");j=z.createElement("div");b.style.cssText=bc;f.appendChild(b).appendChild(j);g=j.appendChild(z.createElement("div"));g.style.cssText=j.style.cssText= +"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";g.style.marginRight=g.style.width="0";j.style.width="1px";Gb=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight);f.removeChild(b)}return Gb}});g.swap=function(a,b,j,g){var c,e={};for(c in b)e[c]=a.style[c],a.style[c]=b[c];j=j.apply(a,g||[]);for(c in b)a.style[c]=e[c];return j};var ec=/alpha\([^)]*\)/i,Ed=/opacity\s*=\s*([^)]*)/,Fd=/^(none|table(?!-c[ea]).+)/,Zc=RegExp("^("+ +Ab+")(.*)$","i"),Gd=RegExp("^([+-])=("+Ab+")","i"),Hd={position:"absolute",visibility:"hidden",display:"block"},Jc={letterSpacing:0,fontWeight:400},oc=["Webkit","O","Moz","ms"];g.extend({cssHooks:{opacity:{get:function(a,b){if(b){var j=Oa(a,"opacity");return""===j?"1":j}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,j,c){if(a&&!(3===a.nodeType|| +8===a.nodeType||!a.style)){var e,d,m,t=g.camelCase(b),q=a.style;b=g.cssProps[t]||(g.cssProps[t]=gb(q,t));m=g.cssHooks[b]||g.cssHooks[t];if(void 0!==j){d=typeof j;if("string"===d&&(e=Gd.exec(j)))j=(e[1]+1)*e[2]+parseFloat(g.css(a,b)),d="number";if(!(null==j||j!==j))if("number"===d&&!g.cssNumber[t]&&(j+="px"),!v.clearCloneStyle&&(""===j&&0===b.indexOf("background"))&&(q[b]="inherit"),!m||!("set"in m)||void 0!==(j=m.set(a,j,c)))try{q[b]="",q[b]=j}catch(h){}}else return m&&"get"in m&&void 0!==(e=m.get(a, +!1,c))?e:q[b]}},css:function(a,b,j,c){var e,d;d=g.camelCase(b);b=g.cssProps[d]||(g.cssProps[d]=gb(a.style,d));(d=g.cssHooks[b]||g.cssHooks[d])&&"get"in d&&(e=d.get(a,!0,j));void 0===e&&(e=Oa(a,b,c));"normal"===e&&b in Jc&&(e=Jc[b]);return""===j||j?(a=parseFloat(e),!0===j||g.isNumeric(a)?a||0:e):e}});g.each(["height","width"],function(a,b){g.cssHooks[b]={get:function(a,f,j){if(f)return 0===a.offsetWidth&&Fd.test(g.css(a,"display"))?g.swap(a,Hd,function(){return fa(a,b,j)}):fa(a,b,j)},set:function(a, +f,j){var c=j&&Na(a);return V(a,f,j?aa(a,b,j,v.boxSizing()&&"border-box"===g.css(a,"boxSizing",!1,c),c):0)}}});v.opacity||(g.cssHooks.opacity={get:function(a,b){return Ed.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?0.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var j=a.style,c=a.currentStyle,e=g.isNumeric(b)?"alpha(opacity="+100*b+")":"",d=c&&c.filter||j.filter||"";j.zoom=1;if((1<=b||""===b)&&""===g.trim(d.replace(ec,""))&&j.removeAttribute)if(j.removeAttribute("filter"), +""===b||c&&!c.filter)return;j.filter=ec.test(d)?d.replace(ec,e):d+" "+e}});g.cssHooks.marginRight=pa(v.reliableMarginRight,function(a,b){if(b)return g.swap(a,{display:"inline-block"},Oa,[a,"marginRight"])});g.each({margin:"",padding:"",border:"Width"},function(a,b){g.cssHooks[a+b]={expand:function(j){var g=0,c={};for(j="string"===typeof j?j.split(" "):[j];4>g;g++)c[a+Ma[g]+b]=j[g]||j[g-2]||j[0];return c}};Ic.test(a)||(g.cssHooks[a+b].set=V)});g.fn.extend({css:function(a,b){return Ta(this,function(a, +f,b){var j,c={},e=0;if(g.isArray(f)){b=Na(a);for(j=f.length;e
a";Jb=qb.getElementsByTagName("a")[0];fc=z.createElement("select");gc=fc.appendChild(z.createElement("option"));Ga=qb.getElementsByTagName("input")[0];Jb.style.cssText="top:1px";v.getSetAttribute= +"t"!==qb.className;v.style=/top/.test(Jb.getAttribute("style"));v.hrefNormalized="/a"===Jb.getAttribute("href");v.checkOn=!!Ga.value;v.optSelected=gc.selected;v.enctype=!!z.createElement("form").enctype;fc.disabled=!0;v.optDisabled=!gc.disabled;Ga=z.createElement("input");Ga.setAttribute("value","");v.input=""===Ga.getAttribute("value");Ga.value="t";Ga.setAttribute("type","radio");v.radioValue="t"===Ga.value;var Kd=/\r/g;g.fn.extend({val:function(a){var b,j,c,e=this[0];if(arguments.length)return c= +g.isFunction(a),this.each(function(j){if(1===this.nodeType&&(j=c?a.call(this,j,g(this).val()):a,null==j?j="":"number"===typeof j?j+="":g.isArray(j)&&(j=g.map(j,function(a){return null==a?"":a+""})),b=g.valHooks[this.type]||g.valHooks[this.nodeName.toLowerCase()],!b||!("set"in b)||void 0===b.set(this,j,"value")))this.value=j});if(e){if((b=g.valHooks[e.type]||g.valHooks[e.nodeName.toLowerCase()])&&"get"in b&&void 0!==(j=b.get(e,"value")))return j;j=e.value;return"string"===typeof j?j.replace(Kd,""): +null==j?"":j}}});g.extend({valHooks:{option:{get:function(a){var b=g.find.attr(a,"value");return null!=b?b:g.text(a)}},select:{get:function(a){for(var b,j=a.options,c=a.selectedIndex,e=(a="select-one"===a.type||0>c)?null:[],d=a?c+1:j.length,m=0>c?d:a?c:0;mc.indexOf(" "+e+" ")&&(c+=e+" ");c=g.trim(c);j.className!==c&&(j.className=c)}return this},removeClass:function(a){var b,j,c,e,d,m=0,t=this.length;b=0===arguments.length||"string"===typeof a&&a;if(g.isFunction(a))return this.each(function(b){g(this).removeClass(a.call(this, +b,this.className))});if(b)for(b=(a||"").match(va)||[];ma||304===a;if(f){p=k;for(var w=E,N,oa,r,F,O=p.contents,x=p.dataTypes;"*"===x[0];)x.shift(),void 0===oa&&(oa=p.mimeType||w.getResponseHeader("Content-Type"));if(oa)for(F in O)if(O[F]&&O[F].test(oa)){x.unshift(F);break}if(x[0]in f)r=x[0];else{for(F in f){if(!x[0]||p.converters[F+ +" "+x[0]]){r=F;break}N||(N=F)}r=r||N}r?(r!==x[0]&&x.unshift(r),p=f[r]):p=void 0}a:{f=k;N=p;oa=E;r=c;var bb,v,T,w={},O=f.dataTypes.slice();if(O[1])for(v in f.converters)w[v.toLowerCase()]=f.converters[v];for(F=O.shift();F;)if(f.responseFields[F]&&(oa[f.responseFields[F]]=N),!T&&(r&&f.dataFilter)&&(N=f.dataFilter(N,f.dataType)),T=F,F=O.shift())if("*"===F)F=T;else if("*"!==T&&T!==F){v=w[T+" "+F]||w["* "+F];if(!v)for(bb in w)if(p=bb.split(" "),p[1]===F&&(v=w[T+" "+p[0]]||w["* "+p[0]])){!0===v?v=w[bb]: +!0!==w[bb]&&(F=p[0],O.unshift(p[1]));break}if(!0!==v)if(v&&f["throws"])N=v(N);else try{N=v(N)}catch(sa){p={state:"parsererror",error:v?sa:"No conversion from "+T+" to "+F};break a}}p={state:"success",data:N}}if(c)k.ifModified&&((l=E.getResponseHeader("Last-Modified"))&&(g.lastModified[d]=l),(l=E.getResponseHeader("etag"))&&(g.etag[d]=l)),204===a||"HEAD"===k.type?l="nocontent":304===a?l="notmodified":(l=p.state,e=p.data,u=p.error,c=!u);else if(u=l,a||!l)l="error",0>a&&(a=0);E.status=a;E.statusText= +(b||l)+"";c?B.resolveWith(n,[e,l,E]):B.rejectWith(n,[E,l,u]);E.statusCode(s);s=void 0;q&&y.trigger(c?"ajaxSuccess":"ajaxError",[E,k,c?e:u]);ga.fireWith(n,[E,l]);q&&(y.trigger("ajaxComplete",[E,k]),--g.active||g.event.trigger("ajaxStop"))}}"object"===typeof a&&(b=a,a=void 0);b=b||{};var c,e,d,m,t,q,h,u,k=g.ajaxSetup({},b),n=k.context||k,y=k.context&&(n.nodeType||n.jquery)?g(n):g.event,B=g.Deferred(),ga=g.Callbacks("once memory"),s=k.statusCode||{},l={},N={},ba=0,oa="canceled",E={readyState:0,getResponseHeader:function(a){var b; +if(2===ba){if(!u)for(u={};b=Pd.exec(m);)u[b[1].toLowerCase()]=b[2];b=u[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===ba?m:null},setRequestHeader:function(a,b){var f=a.toLowerCase();ba||(a=N[f]=N[f]||a,l[a]=b);return this},overrideMimeType:function(a){ba||(k.mimeType=a);return this},statusCode:function(a){var b;if(a)if(2>ba)for(b in a)s[b]=[s[b],a[b]];else E.always(a[E.status]);return this},abort:function(a){a=a||oa;h&&h.abort(a);j(0,a);return this}};B.promise(E).complete= +ga.add;E.success=E.done;E.error=E.fail;k.url=((a||k.url||Ia)+"").replace(Od,"").replace(Rd,Va[1]+"//");k.type=b.method||b.type||k.method||k.type;k.dataTypes=g.trim(k.dataType||"*").toLowerCase().match(va)||[""];null==k.crossDomain&&(c=Nc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||!(c[1]!==Va[1]||c[2]!==Va[2]||(c[3]||("http:"===c[1]?"80":"443"))!==(Va[3]||("http:"===Va[1]?"80":"443")))));k.data&&(k.processData&&"string"!==typeof k.data)&&(k.data=g.param(k.data,k.traditional));ra(Oc,k,b,E);if(2=== +ba)return E;(q=k.global)&&0===g.active++&&g.event.trigger("ajaxStart");k.type=k.type.toUpperCase();k.hasContent=!Qd.test(k.type);d=k.url;k.hasContent||(k.data&&(d=k.url+=(kc.test(d)?"&":"?")+k.data,delete k.data),!1===k.cache&&(k.url=Mc.test(d)?d.replace(Mc,"$1_="+jc++):d+(kc.test(d)?"&":"?")+"_="+jc++));k.ifModified&&(g.lastModified[d]&&E.setRequestHeader("If-Modified-Since",g.lastModified[d]),g.etag[d]&&E.setRequestHeader("If-None-Match",g.etag[d]));(k.data&&k.hasContent&&!1!==k.contentType||b.contentType)&& +E.setRequestHeader("Content-Type",k.contentType);E.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Pc+"; q=0.01":""):k.accepts["*"]);for(e in k.headers)E.setRequestHeader(e,k.headers[e]);if(k.beforeSend&&(!1===k.beforeSend.call(n,E,k)||2===ba))return E.abort();oa="abort";for(e in{success:1,error:1,complete:1})E[e](k[e]);if(h=ra(Ob,k,b,E)){E.readyState=1;q&&y.trigger("ajaxSend",[E,k]);k.async&&0ba)j(-1,r);else throw r;}}else j(-1,"No Transport");return E},getJSON:function(a,b,j){return g.get(a,b,j,"json")},getScript:function(a,b){return g.get(a,void 0,b,"script")}});g.each(["get","post"],function(a,b){g[b]=function(a,f,j,c){g.isFunction(f)&&(c=c||j,j=f,f=void 0);return g.ajax({url:a,type:b,dataType:c,data:f,success:j})}});g.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){g.fn[b]=function(a){return this.on(b, +a)}});g._evalUrl=function(a){return g.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})};g.fn.extend({wrapAll:function(a){if(g.isFunction(a))return this.each(function(b){g(this).wrapAll(a.call(this,b))});if(this[0]){var b=g(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var a=this;a.firstChild&&1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return g.isFunction(a)? +this.each(function(b){g(this).wrapInner(a.call(this,b))}):this.each(function(){var b=g(this),j=b.contents();j.length?j.wrapAll(a):b.append(a)})},wrap:function(a){var b=g.isFunction(a);return this.each(function(j){g(this).wrapAll(b?a.call(this,j):a)})},unwrap:function(){return this.parent().each(function(){g.nodeName(this,"body")||g(this).replaceWith(this.childNodes)}).end()}});g.expr.filters.hidden=function(a){return 0>=a.offsetWidth&&0>=a.offsetHeight||!v.reliableHiddenOffsets()&&"none"===(a.style&& +a.style.display||g.css(a,"display"))};g.expr.filters.visible=function(a){return!g.expr.filters.hidden(a)};var Sd=/%20/g,ad=/\[\]$/,Qc=/\r?\n/g,Td=/^(?:submit|button|image|reset|file)$/i,Ud=/^(?:input|select|textarea|keygen)/i;g.param=function(a,b){var j,c=[],e=function(a,b){b=g.isFunction(b)?b():null==b?"":b;c[c.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};void 0===b&&(b=g.ajaxSettings&&g.ajaxSettings.traditional);if(g.isArray(a)||a.jquery&&!g.isPlainObject(a))g.each(a,function(){e(this.name, +this.value)});else for(j in a)W(j,a[j],b,e);return c.join("&").replace(Sd,"+")};g.fn.extend({serialize:function(){return g.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=g.prop(this,"elements");return a?g.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!g(this).is(":disabled")&&Ud.test(this.nodeName)&&!Td.test(a)&&(this.checked||!Nb.test(a))}).map(function(a,b){var j=g(this).val();return null==j?null:g.isArray(j)?g.map(j,function(a){return{name:b.name, +value:a.replace(Qc,"\r\n")}}):{name:b.name,value:j.replace(Qc,"\r\n")}}).get()}});g.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){var b;if(!(b=!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&j()))a:{try{b=new a.ActiveXObject("Microsoft.XMLHTTP");break a}catch(c){}b=void 0}return b}:j;g.ajaxSettings.xhr=void 0===a.ActiveXObject?X:function(){return(this.url==z.location||0==this.url.indexOf("http")||!this.isLocal)&&/^(get|post|head|put|delete|options)$/i.test(this.type)&& +X()||X(1)};var Vd=0,Lb={},Mb=g.ajaxSettings.xhr();if(a.ActiveXObject)g(a).on("unload",function(){for(var a in Lb)Lb[a](void 0,!0)});v.cors=!!Mb&&"withCredentials"in Mb;(Mb=v.ajax=!!Mb)&&g.ajaxTransport(function(a){if(!a.crossDomain||v.cors){var b;return{send:function(j,c){var e,d=a.xhr(),m=++Vd;console.log("xhr.open async="+a.async+" url="+a.url);d.open(a.type,a.url,a.async,a.username,a.password);if(a.xhrFields)for(e in a.xhrFields)d[e]=a.xhrFields[e];a.mimeType&&d.overrideMimeType&&d.overrideMimeType(a.mimeType); +!a.crossDomain&&!j["X-Requested-With"]&&(j["X-Requested-With"]="XMLHttpRequest");for(e in j)void 0!==j[e]&&d.setRequestHeader(e,j[e]+"");d.send(a.hasContent&&a.data||null);b=function(j,e){var t,k,q;if(b&&(e||4===d.readyState))if(delete Lb[m],b=void 0,d.onreadystatechange=g.noop,e)4!==d.readyState&&d.abort();else{q={};t=d.status;"string"===typeof d.responseText&&(q.text=d.responseText);try{k=d.statusText}catch(h){k=""}!t&&a.isLocal&&!a.crossDomain?t=q.text?200:404:1223===t&&(t=204)}q&&c(t,k,q,d.getAllResponseHeaders())}; +a.async?4===d.readyState?setTimeout(b):d.onreadystatechange=Lb[m]=b:b()},abort:function(){b&&b(void 0,!0)}}}});g.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){g.globalEval(a);return a}}});g.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1);a.crossDomain&&(a.type="GET",a.global=!1)});g.ajaxTransport("script",function(a){if(a.crossDomain){var b, +j=z.head||g("head")[0]||z.documentElement;return{send:function(c,g){b=z.createElement("script");b.async=!0;a.scriptCharset&&(b.charset=a.scriptCharset);b.src=a.url;b.onload=b.onreadystatechange=function(a,j){if(j||!b.readyState||/loaded|complete/.test(b.readyState))b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,j||g(200,"success")};j.insertBefore(b,j.firstChild)},abort:function(){if(b)b.onload(void 0,!0)}}}});var Rc=[],lc=/(=)\?(?=&|$)|\?\?/;g.ajaxSetup({jsonp:"callback", +jsonpCallback:function(){var a=Rc.pop()||g.expando+"_"+jc++;this[a]=!0;return a}});g.ajaxPrefilter("json jsonp",function(b,j,c){var e,d,m,t=!1!==b.jsonp&&(lc.test(b.url)?"url":"string"===typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&lc.test(b.data)&&"data");if(t||"jsonp"===b.dataTypes[0])return e=b.jsonpCallback=g.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,t?b[t]=b[t].replace(lc,"$1"+e):!1!==b.jsonp&&(b.url+=(kc.test(b.url)?"&":"?")+b.jsonp+"="+ +e),b.converters["script json"]=function(){m||g.error(e+" was not called");return m[0]},b.dataTypes[0]="json",d=a[e],a[e]=function(){m=arguments},c.always(function(){a[e]=d;b[e]&&(b.jsonpCallback=j.jsonpCallback,Rc.push(e));m&&g.isFunction(d)&&d(m[0]);m=d=void 0}),"script"});g.parseHTML=function(a,b,j){if(!a||"string"!==typeof a)return null;"boolean"===typeof b&&(j=b,b=!1);b=b||z;var c=xc.exec(a);j=!j&&[];if(c)return[b.createElement(c[1])];c=g.buildFragment([a],b,j);j&&j.length&&g(j).remove();return g.merge([], +c.childNodes)};var Sc=g.fn.load;g.fn.load=function(a,b,j){if("string"!==typeof a&&Sc)return Sc.apply(this,arguments);var c,e,d,m=this,t=a.indexOf(" ");0<=t&&(c=a.slice(t,a.length),a=a.slice(0,t));g.isFunction(b)?(j=b,b=void 0):b&&"object"===typeof b&&(d="POST");0").append(g.parseHTML(a)).find(c):a)}).complete(j&&function(a,b){m.each(j,e||[a.responseText,b,a])});return this};g.expr.filters.animated= +function(a){return g.grep(g.timers,function(b){return a===b.elem}).length};var Tc=a.document.documentElement;g.offset={setOffset:function(a,b,j){var c,e,d,m=g.css(a,"position"),t=g(a),k={};"static"===m&&(a.style.position="relative");d=t.offset();e=g.css(a,"top");c=g.css(a,"left");("absolute"===m||"fixed"===m)&&-1org.pdb.query.simple.AdvancedKeywordQueryText SearchQUERY",_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:"http://your.server.here/jsmol.php",_syncId:(""+Math.random()).substring(3),_touching:!1,_XhtmlElement:null, +_XhtmlAppendChild:!1};a=a.location.href.toLowerCase();l._httpProto=0==a.indexOf("https")?"https://":"http://";l._isFile=0==a.indexOf("file:");l._ajaxTestSite=l._httpProto+"google.com";a=l._isFile||0==a.indexOf("http://localhost")||0==a.indexOf("http://127.");l._tracker="http://"==l._httpProto&&!a&&"http://chemapps.stolaf.edu/jmol/JmolTracker.htm?id=UA-45940799-1";l._isChrome=0<=navigator.userAgent.toLowerCase().indexOf("chrome");l._isSafari=!l._isChrome&&0<=navigator.userAgent.toLowerCase().indexOf("safari"); +l._isMsie=void 0!==window.ActiveXObject;l._useDataURI=!l._isSafari&&!l._isMsie;for(var k in Jmol)l[k]=Jmol[k];return l}(document,Jmol)); +(function(a,l){l(document).ready(function(){a._document=null});a.$=function(a,e){null==a&&alert(e+arguments.callee.caller.toString());return l(e?"#"+a._id+"_"+e:a)};a._$=function(a){return"string"==typeof a?l("#"+a):a};a.$ajax=function(b){a._ajaxCall=b.url;b.cache="NO"!=b.cache;0==b.url.indexOf("http://pubchem.ncbi.nlm.nih")&&(b.url="https://"+b.url.substring(7));return l.ajax(b)};a._getNCIInfo=function(b,e){return a._getFileData("http://cactus.nci.nih.gov/chemical/structure/"+b+"/"+("name"==e?"names": +e))};a.$appEvent=function(b,e,c,d){b=a.$(b,e);b.off(c)&&d&&b.on(c,d)};a.$resize=function(a){return l(window).resize(a)};a.$after=function(a,e){return l(a).after(e)};a.$append=function(a,e){return l(a).append(e)};a.$bind=function(a,e,c){return c?l(a).bind(e,c):l(a).unbind(e)};a.$closest=function(a,e){return l(a).closest(e)};a.$get=function(a,e){return l(a).get(e)};a.$documentOff=function(a,e){return l(document).off(a,"#"+e)};a.$documentOn=function(a,e,c){return l(document).on(a,"#"+e,c)};a.$getAncestorDiv= +function(a,e){return l("div."+e+":has(#"+a+")")[0]};a.$supportsIECrossDomainScripting=function(){return l.support.iecors};a.$attr=function(b,e,c){return a._$(b).attr(e,c)};a.$css=function(b,e){return a._$(b).css(e)};a.$find=function(b,e){return a._$(b).find(e)};a.$focus=function(b){return a._$(b).focus()};a.$html=function(b,e){return a._$(b).html(e)};a.$offset=function(b){return a._$(b).offset()};a.$windowOn=function(a,e){return l(window).on(a,e)};a.$prop=function(b,e,c){var d=a._$(b);return 3==arguments.length? +d.prop(e,c):d.prop(e)};a.$remove=function(b){return a._$(b).remove()};a.$scrollTo=function(b,e){var c=a._$(b);return c.scrollTop(0>e?c[0].scrollHeight:e)};a.$setEnabled=function(b,e){return a._$(b).attr("disabled",e?null:"disabled")};a.$setSize=function(b,e,c){return a._$(b).width(e).height(c)};a.$setVisible=function(b,e){var c=a._$(b);return e?c.show():c.hide()};a.$submit=function(b){return a._$(b).submit()};a.$val=function(b,e){var c=a._$(b);return 1==arguments.length?c.val():c.val(e)};a._clearVars= +function(){delete jQuery;delete l;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 k=document,h=window,d={};d.ua=navigator.userAgent.toLowerCase();var n;a:{n=["linux","unix","mac","win"];for(var s=n.length;s--;)if(-1!=d.ua.indexOf(n[s])){n=n[s];break a}n="unknown"}d.os=n;d.browser=function(){for(var a=d.ua,e="konqueror webkit omniweb opera webtv icab msie mozilla".split(" "),c=0;cnavigator.appVersion.indexOf("MSIE 8");d.getDefaultLanguage=function(){return navigator.language||navigator.userLanguage||"en-US"};d._webGLtest=0;d.supportsWebGL=function(){if(!a.featureDetection._webGLtest){var b;a.featureDetection._webGLtest= +h.WebGLRenderingContext&&((b=k.createElement("canvas")).getContext("webgl")||b.getContext("experimental-webgl"))?1:-1}return 0=d.browserVersion&&"mac"==e||"webkit"==d.browserName&&125.12>d.browserVersion||"msie"==d.browserName&&"mac"==e||"konqueror"==d.browserName&&3.3>=d.browserVersion)a=!1;return a};d.isFullyCompliant=function(){return d.compliantBrowser()&&d.supportsJava()};d.useIEObject="win"==d.os&&"msie"==d.browserName&&5.5<= +d.browserVersion;d.useHtml4Object="mozilla"==d.browserName&&5<=d.browserVersion||"opera"==d.browserName&&8<=d.browserVersion||"webkit"==d.browserName;d.hasFileReader=h.File&&h.FileReader;a.featureDetection=d;a._ajax=function(b){if(!b.async)return a.$ajax(b).responseText;a._ajaxQueue.push(b);1==a._ajaxQueue.length&&a._ajaxDone()};a._ajaxDone=function(){var b=a._ajaxQueue.shift();b&&a.$ajax(b)};a._grabberOptions=[["$","NCI(small molecules)"],[":","PubChem(small molecules)"],["=","RCSB(macromolecules)"], +["*","PDBe(macromolecules)"]];a._getGrabberOptions=function(b){if(0==a._grabberOptions.length)return"";var e='',c='';1==a._grabberOptions.length?(e=""+e+'',c=""+c):e+="
";for(var e=e+'"+c).replace(/ID/g,b._id);return"
"+e};a._getScriptForDatabase=function(b){return"$"==b?a.db._nciLoadScript:":"==b?a.db._pubChemLoadScript:a.db._fileLoadScript};a._setInfo=function(a,e,c){var d=[],k="";if(0==c.indexOf("ERROR"))k=c;else switch(e){case "=":e=c.split("");d=[""];for(c=1;c"),d.push("");d.push("
"+e[c].substring(0,4)+""+e[c].split("Title>")[1].split("
");k=e.length-1+" matches";break;case "$":case ":":break;default:return}a._infoHeader=k;a._info=d.join("");a._showInfo(!0)};a._loadSuccess=function(b,e){e&&(a._ajaxDone(),e(b))};a._loadError=function(b){a._ajaxDone();a.say("Error connecting to server: "+a._ajaxCall);null!=b&&b()};a._isDatabaseCall=function(b){return 0<=a.db._databasePrefixes.indexOf(b.substring(0, +1))};a._getDirectDatabaseCall=function(b,e){if(e&&!a.featureDetection.supportsXhr2())return b;var c=2,d,k=a.db._DirectDatabaseCalls[b.substring(0,c)];k||(k=a.db._DirectDatabaseCalls[d=b.substring(0,--c)]);k&&(":"==d?(d=b.toLowerCase(),isNaN(parseInt(b.substring(1)))?0==d.indexOf(":smiles:")?(k+="?POST?smiles="+b.substring(8),b="smiles"):0==d.indexOf(":cid:")?b="cid/"+b.substring(5):(0==d.indexOf(":name:")?b=b.substring(5):0==d.indexOf(":cas:")&&(b=b.substring(4)),b="name/"+encodeURIComponent(b.substring(c))): +b="cid/"+b.substring(1)):b=encodeURIComponent(b.substring(c)),0<=k.indexOf("FILENCI")?(b=b.replace(/\%2F/g,"/"),b=k.replace(/\%FILENCI/,b)):b=k.replace(/\%FILE/,b));return b};a._getRawDataFromServer=function(b,e,c,d,k,h){b="?call=getRawDataFromDatabase&database="+b+(0<=e.indexOf("?POST?")?"?POST?":"")+"&query="+encodeURIComponent(e)+(k?"&encoding=base64":"")+(h?"":"&script="+encodeURIComponent(a._getScriptForDatabase(b)));return a._contactServer(b,c,d)};a._checkFileName=function(b,e,c){a._isDatabaseCall(e)&& +(c&&a._setQueryTerm(b,e),e=a._getDirectDatabaseCall(e,!0),a._isDatabaseCall(e)&&(e=a._getDirectDatabaseCall(e,!1),c&&(c[0]=!0)));return e};a._checkCache=function(b,e,c){if(b._cacheFiles&&a._fileCache&&!e.endsWith(".js")){if(b=a._fileCache[e])return System.out.println("using "+b.length+" bytes of cached data for "+e),c(b),null;c=function(b,e){c(a._fileCache[b]=e)}}return c};a._loadFileData=function(b,e,c,d){var k=[];e=a._checkFileName(b,e,k);c=a._checkCache(b,e,c);k[0]?a._getRawDataFromServer("_", +e,c,d):(b={type:"GET",dataType:"text",url:e,async:a._asynchronous,success:function(b){a._loadSuccess(b,c)},error:function(){a._loadError(d)}},a._checkAjaxPost(b),a._ajax(b))};a._getInfoFromDatabase=function(b,e,c){if("===="==e){var d=a.db._restQueryXml.replace(/QUERY/,c),d={dataType:"text",type:"POST",contentType:"application/x-www-form-urlencoded",url:a.db._restQueryUrl,data:encodeURIComponent(d)+"&req=browser",success:function(d){a._ajaxDone();a._extractInfoFromRCSB(b,e,c,d)},error:function(){a._loadError(null)}, +async:a._asynchronous};return a._ajax(d)}c="?call=getInfoFromDatabase&database="+e+"&query="+encodeURIComponent(c);return a._contactServer(c,function(c){a._setInfo(b,e,c)})};a._extractInfoFromRCSB=function(b,e,c,d){var k=d.length/5;if(0!=k&&4==c.length&&1!=k){c=c.toUpperCase();var h=d.indexOf(c);0h.indexOf("?")&&h==b._thisJmolModel)){b._thisJmolModel=h;var n;d&&null!=b._viewSet&&null!=(n=a.View.__findView(b._viewSet,{chemID:h}))?a.View.__setView(n,b,!1):("$"==k||":"==k?b._jmolFileType="MOL":"="==k&&(b._jmolFileType="PDB"),b._searchDatabase(e,k,c))}};a._searchDatabase=function(b,e,c,d){b._showInfo(!1);return 0<=e.indexOf("?")?(a._getInfoFromDatabase(b,c,e.split("?")[0]), +!0):a.db._DirectDatabaseCalls[c]?(b._loadFile(c+e,d),!0):!1};a._syncBinaryOK="?";a._canSyncBinary=function(b){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(c){return System.out.println("JSmolCore.js: synchronous binary file transfer is requested but not available"), +a._alertNoBinary&&!b&&alert("JSmolCore.js: synchronous binary file transfer is requested but not available"),a._syncBinaryOK=!1}return!0};a._binaryTypes=".gz .jpg .gif .png .zip .jmol .bin .smol .spartan .mrc .pse .map .omap".split(" ");a._isBinaryUrl=function(b){for(var e=a._binaryTypes.length;0<=--e;)if(0<=b.indexOf(a._binaryTypes[e]))return!0;return!1};a._getFileData=function(b,e,c){var d=a._isBinaryUrl(b),k=0<=b.indexOf("pdb.gz")&&0==b.indexOf("http://www.rcsb.org/pdb/files/"),h=d&&!a._canSyncBinary(k); +h&&k&&(b=b.replace(/pdb\.gz/,"pdb"),h=d=!1);k=0<=b.indexOf("?POST?");0==b.indexOf("file:/")&&0!=b.indexOf("file:///")&&(b="file://"+b.substring(5));var n=0>b.indexOf("://")||0==b.indexOf(document.location.protocol)&&0<=b.indexOf(document.location.host),s=a._isDirectCall(b),l=!n&&a.$supportsIECrossDomainScripting(),r=null;if((!e||h)&&(l||h||!n&&!s))r=a._getRawDataFromServer("_",b,e,e,h,!0);else{b=b.replace(/file:\/\/\/\//,"file://");var K={dataType:d?"binary":"text",async:!!e};k?(K.type="POST",K.url= +b.split("?POST?")[0],K.data=b.split("?POST?")[1]):(K.type="GET",K.url=b);e&&(K.success=function(){e(a._xhrReturn(K.xhr))},K.error=function(){e(K.xhr.statusText)});K.xhr=a.$ajax(K);e||(r=a._xhrReturn(K.xhr))}if(!c)return r;null==r&&(r="",d=!1);d&&(d=a._canSyncBinary(!0));return d?a._strToBytes(r):JU.SB.newS(r)};a._xhrReturn=function(a){return!a.responseText||self.Clazz&&Clazz.instanceOf(a.response,self.ArrayBuffer)?a.response||a.statusText:a.responseText};a._isDirectCall=function(b){for(var e in a.db._DirectDatabaseCalls)if(0<= +e.indexOf(".")&&0<=b.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(b,e){return b&&b._z&&b._z[e]||a._z[e]};a._incrZ=function(b,e){return b&&b._z&&++b._z[e]|| +++a._z[e]};a._loadFileAsynchronously=function(b,e,c,d){if(0!=c.indexOf("?")){var k=c;c=a._checkFileName(e,c);var h=function(e){a._setData(b,c,k,e,d)},h=a._checkCache(e,c,h);0<=c.indexOf("|")&&(c=c.split("|")[0]);return null==h?null:a._getFileData(c,h)}if(!a.featureDetection.hasFileReader)return b.setData("Local file reading is not enabled in your browser",null,null,d);e._localReader||(h='
', +a.$after("#"+e._id+"_appletdiv",h.replace(/ID/g,e._id+"_localReader")),e._localReader=a.$(e,"localReader"));a.$appEvent(e,"localReader_loadfile","click");a.$appEvent(e,"localReader_loadfile","click",function(){var c=a.$(e,"localReader_files")[0].files[0],k=new FileReader;k.onloadend=function(k){k.target.readyState==FileReader.DONE&&(a.$css(a.$(e,"localReader"),{display:"none"}),a._setData(b,c.name,c.name,k.target.result,d))};k.readAsArrayBuffer(c)});a.$appEvent(e,"localReader_cancel","click");a.$appEvent(e, +"localReader_cancel","click",function(){a.$css(a.$(e,"localReader"),{display:"none"});b.setData(null,null,null,d)});a.$css(a.$(e,"localReader"),{display:"block"})};a._setData=function(b,e,c,d,k){d=a._strToBytes(d);0<=e.indexOf(".jdx")&&a.Cache.put("cache://"+e,d);b.setData(e,c,d,k)};a._toBytes=function(a){if("string"==typeof a)return a.getBytes();a=new Uint8Array(a);for(var e=Clazz.newByteArray(a.length,0),c=a.length;0<=--c;)e[c]=a[c];return e};a._doAjax=function(b,e,c){b=b.toString();if(null!=c)return a._saveFile(b, +c);e&&(b+="?POST?"+e);return a._getFileData(b,null,!0)};a._saveFile=function(b,e,c,d){if(a._localFileSaveFunction&&a._localFileSaveFunction(b,e))return"OK";b=b.substring(b.lastIndexOf("/")+1);c||(c=0<=b.indexOf(".pdf")?"application/pdf":0<=b.indexOf(".png")?"image/png":0<=b.indexOf(".gif")?"image/gif":0<=b.indexOf(".jpg")?"image/jpg":"");var k="string"==typeof e;k||(e=(JU?JU:J.util).Base64.getBase64(e).toString());d||(d=k?"":"base64");(k=a._serverUrl)&&0<=k.indexOf("your.server")&&(k="");a._useDataURI|| +!k?(d||(e=btoa(e)),d=document.createElement("a"),d.href="data:"+c+";base64,"+e,d.type=c||"text/plain",d.download=b,d.target="_blank",l("body").append(d),d.click(),d.remove()):(a._formdiv||(a.$after("body",''), +a._formdiv="__jsmolform__"),a.$attr(a._formdiv,"action",k+"?"+(new Date).getMilliseconds()),a.$val("__jsmoldata__",e),a.$val("__jsmolfilename__",b),a.$val("__jsmolmimetype__",c),a.$val("__jsmolencoding__",d),a.$submit("__jsmolform__"),a.$val("__jsmoldata__",""),a.$val("__jsmolfilename__",""));return"OK"};a._strToBytes=function(b){if(Clazz.instanceOf(b,self.ArrayBuffer))return a._toBytes(b);for(var e=Clazz.newByteArray(b.length,0),c=b.length;0<=--c;)e[c]=b.charCodeAt(c)&255;return e};a._setConsoleDiv= +function(a){self.Clazz&&Clazz.setConsoleDiv(a)};a._registerApplet=function(b,e){return window[b]=a._applets[b]=a._applets[e]=a._applets[b+"__"+a._syncId+"__"]=e};a._readyCallback=function(b,e,c,d,k){b=b.split("_object")[0];k||(k=d);c=c.booleanValue?c.booleanValue():c;var h=a._applets[b];h._appletPanel=k;h._applet=d;a._track(h._readyCallback(b,e,c))};a._getWrapper=function(b,e){var c;if(e){var d="";b._coverImage&&(d=' onclick="Jmol.coverApplet(ID, false)" title="'+b._coverTitle+'"',c='",d='
"+c+"
");c=a._appletCssText.replace(/\'/g,'"');c=0<=c.indexOf('style="')?c.split('style="')[1]: +'" '+c;c='...
IMG......
";var k=b._height,h=b._width;if("string"!==typeof k||0>k.indexOf("%"))k+="px";if("string"!==typeof h||0>h.indexOf("%"))h+="px";c=c.replace(/IMG/,d).replace(/Hpx/g,k).replace(/Wpx/g,h)}else c='......
............
..................
......
...
'; +return c.replace(/\.\.\./g,"").replace(/[\n\r]/g,"").replace(/ID/g,b._id)};a._documentWrite=function(b){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(b):a._document.write(b)}return b};a._domWrite=function(b){for(var e=[0];e[0]b.jarFile.indexOf("Signed")&&(b.jarFile=b.jarFile.replace(/Applet/,"AppletSigned")),b.use=b.use.replace(/SIGNED/,"JAVA"),b.isSigned=!0)};a._syncedApplets=[];a._syncedCommands=[];a._syncedReady=[];a._syncReady=!1;a._isJmolJSVSync=!1;a._setReady=function(b){a._syncedReady[b]= +1;for(var e=0,c=0;cb[0]?-1:0}if(!a||"object"!=typeof a)return[];for(var c=[],d=a.length-1;0<=d;d--)for(var k=0,h=a[d].length;ke.type.indexOf("touch"))return!1;var c=a.$offset(b.id),d,k=e.originalEvent;e.pageX||(e.pageX=k.pageX);e.pageY||(e.pageY=k.pageY); +a._mousePageX=e.pageX;a._mousePageY=e.pageY;k.targetTouches&&k.targetTouches[0]?(d=k.targetTouches[0].pageX-c.left,c=k.targetTouches[0].pageY-c.top):k.changedTouches?(d=k.changedTouches[0].pageX-c.left,c=k.changedTouches[0].pageY-c.top):(d=e.pageX-c.left,c=e.pageY-c.top);return void 0==d?null:[Math.round(d),Math.round(c),a._jsGetMouseModifiers(e)]};a._gestureUpdate=function(b,e){e.stopPropagation();e.preventDefault();var c=e.originalEvent;switch(e.type){case "touchstart":a._touching=!0;break;case "touchend":a._touching= +!1}if(!c.touches||2!=c.touches.length)return!1;switch(e.type){case "touchstart":b._touches=[[],[]];break;case "touchmove":var d=a.$offset(b.id),k=b._touches[0],h=b._touches[1];k.push([c.touches[0].pageX-d.left,c.touches[0].pageY-d.top]);h.push([c.touches[1].pageX-d.left,c.touches[1].pageY-d.top]);c=k.length;3d?-1:1,0,c]);return!1});a.$bind(b, +"contextmenu",function(){return!1});a.$bind(b,"mouseout",function(c){if(e(c))return!0;a._mouseOwner&&!a._mouseOwner.mouseMove&&a._setMouseOwner(null);b.applet._appletPanel&&b.applet._appletPanel.startHoverWatcher(!1);a._jsGetXY(b,c);return!1});a.$bind(b,"mouseenter",function(c){if(e(c))return!0;b.applet._appletPanel&&b.applet._appletPanel.startHoverWatcher(!0);if(0===c.buttons||0===c.which){b.isDragging=!1;c=a._jsGetXY(b,c);if(!c)return!1;b.applet._processEvent(504,c);b.applet._processEvent(502,c); +return!1}});a.$bind(b,"mousemoveoutjsmol",function(c,d,k){if(e(k))return!0;if(b==a._mouseOwner&&b.isDragging)return a._drag(b,k)});b.applet._is2D&&a.$resize(function(){b.applet&&b.applet._resize()});a.$bind("body","mouseup touchend",function(c){if(e(c))return!0;b.applet&&(b.isDragging=!1);a._setMouseOwner(null)})};a._jsUnsetMouse=function(b){b.applet=null;a.$bind(b,"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 r=a.Swing;SwingController=r;r.setDraggable=function(b){b=b.prototype;b.setContainer||(b.setContainer=function(b){this.container=b;b.obj=this;this.ignoreMouse=this.isDragging=!1;var c=this;b.bind("mousedown touchstart",function(b){if(c.ignoreMouse)return c.ignoreMouse=!1,!0;a._setMouseOwner(c,!0);c.isDragging=!0;c.pageX=b.pageX;c.pageY=b.pageY;return!1});b.bind("mousemove touchmove",function(b){if(c.isDragging&&a._mouseOwner==c)return c.mouseMove(b), +!1});b.bind("mouseup touchend",function(b){c.mouseUp(b);a._setMouseOwner(null)})},b.mouseUp=function(b){if(this.isDragging&&a._mouseOwner==this)return this.pageX0+=b.pageX-this.pageX,this.pageY0+=b.pageY-this.pageY,this.isDragging=!1;a._setMouseOwner(null)},b.setPosition=function(){if(null===a._mousePageX){var b=a.$offset(this.applet._id+"_"+(this.applet._is2D?"canvas2d":"canvas"));a._mousePageX=b.left;a._mousePageY=b.top}this.pageX0=a._mousePageX;this.pageY0=a._mousePageY;this.container.css({top:a._mousePageY+ +"px",left:a._mousePageX+"px"})},b.mouseMove=function(b){if(this.isDragging&&a._mouseOwner==this){this.timestamp=System.currentTimeMillis();var c=this.pageX0+(b.pageX-this.pageX);b=this.pageY0+(b.pageY-this.pageY);a._mousePageX=c;a._mousePageY=b;this.container.css({top:b+"px",left:c+"px"})}},b.dragBind=function(b){this.applet._ignoreMouse=!b;this.container.unbind("mousemoveoutjsmol");this.container.unbind("touchmoveoutjsmol");this.container.unbind("mouseupoutjsmol");this.container.unbind("touchendoutjsmol"); +a._setMouseOwner(null);if(b){var c=this;this.container.bind("mousemoveoutjsmol touchmoveoutjsmol",function(a,b,d){c.mouseMove(d)});this.container.bind("mouseupoutjsmol touchendoutjsmol",function(a,b,d){c.mouseUp(d)})}})};r.JSDialog=function(){};r.setDraggable(r.JSDialog);r.getScreenDimensions=function(a){a.width=l(window).width();a.height=l(window).height()};r.dispose=function(b){a.$remove(b.id+"_mover");delete r.htDialogs[b.id];b.container.obj.dragBind(!1)};r.register=function(a,d){a.id=d+ ++r.count; +r.htDialogs[a.id]=a};r.setDialog=function(b){a._setMouseOwner(null);a.$remove(b.id);var d=b.id+"_mover",c=a._$(d),k;c[0]?(c.html(b.html),k=c[0].jd):(a.$after("body","
"+b.html+"
"),k=new r.JSDialog,c=a._$(d),b.container=c,k.applet=b.manager.vwr.html5Applet,k.setContainer(c),k.dialog=b,k.setPosition(),k.dragBind(!0),c[0].jd=k);a.$bind("#"+b.id+" .JButton","mousedown touchstart",function(){k.ignoreMouse=!0});a.$bind("#"+b.id+" .JComboBox", +"mousedown touchstart",function(){k.ignoreMouse=!0});a.$bind("#"+b.id+" .JCheckBox","mousedown touchstart",function(){k.ignoreMouse=!0});a.$bind("#"+b.id+" .JTextField","mousedown touchstart",function(){k.ignoreMouse=!0});a.$bind("#"+b.id+" .JTable","mousedown touchstart",function(){k.ignoreMouse=!0});a.$bind("#"+b.id+" .JScrollPane","mousedown touchstart",function(){k.ignoreMouse=!0});a.$bind("#"+b.id+" .JEditorPane","mousedown touchstart",function(){k.ignoreMouse=!0})};r.setSelected=function(b){a.$prop(b.id, +"checked",!!b.selected)};r.setSelectedIndex=function(b){a.$prop(b.id,"selectedIndex",b.selectedIndex)};r.setText=function(b){a.$prop(b.id,"value",b.text)};r.setVisible=function(b){a.$setVisible(b.id,b.visible)};r.setEnabled=function(b){a.$setEnabled(b.id,b.enabled)};r.click=function(b,d){var c=r.htDialogs[b.id];if(c){var k=c.toString();if(0<=k.indexOf("JCheck"))c.selected=b.checked;else if(0<=k.indexOf("JCombo"))c.selectedIndex=b.selectedIndex;else if(null!=c.text&&(c.text=b.value,d&&13!=(d.charCode|| +d.keyCode)))return}k=r.htDialogs[a.$getAncestorDiv(b.id,"JDialog").id];k.manager.actionPerformed(c?c.name:k.registryKey+"/"+b.id)};r.setFront=function(b){var d=b.manager.vwr.html5Applet;b.zIndex!=a._getZ(d,"dialog")&&(b.zIndex=a._incrZ(d,"dialog"));b.container&&((b.container[0]||b.container).style.zIndex=b.zIndex)};r.hideMenus=function(a){if(a=a._menus)for(var d in a)a[d].visible&&r.hideMenu(a[d])};r.windowClosing=function(b){b=r.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 d='';a.$after("body",d)}catch(c){}delete a._tracker}return b};a.getProfile=function(){window["j2s.doProfile"]=!0;if(self.Clazz&&self.JSON)return Clazz._profile||(Clazz._profile={}),Clazz.getProfile()};a._getInChIKey= +function(a,d){0<=d.indexOf("MOL=")&&d.split("MOL=")[1].split('"')};a._getAttr=function(a,d){var c=a.indexOf(d+"=");return 0<=c&&0<=(c=a.indexOf('"',c))?a.substring(c+1,a.indexOf('"',c+1)):null};a.User={viewUpdatedCallback:null};a.View={count:0,applets:{},sets:{}};(function(b){b.updateView=function(d,c){if(null!=d._viewSet){c.chemID||(d._searchQuery=null);c.data||(c.data="N/A");c.type=d._viewType;if(null==(d._currentView=b.__findView(d._viewSet,c)))d._currentView=b.__createViewSet(d._viewSet,c.chemID, +c.viewID||c.chemID);d._currentView[c.type].data=c.data;d._currentView[c.type].smiles=d._getSmiles();a.User.viewUpdatedCallback&&a.User.viewUpdatedCallback(d,"updateView");b.__setView(d._currentView,d,!1)}};b.updateFromSync=function(d,c){d._updateMsg=c;var k=a._getAttr(c,"sourceID")||a._getAttr(c,"file");if(k){var h=b.__findView(d._viewSet,{viewID:k});if(null==h)return a.updateView(d,c);h!=d._currentView&&b.__setView(h,d,!0);var n=(k=a._getAttr(c,"atoms"))&&0<=c.indexOf("selectionhalos ON")?eval("["+ +k+"]"):[];setTimeout(function(){d._currentView==h&&b.updateAtomPick(d,n)},10);a.User.viewUpdatedCallback&&a.User.viewUpdatedCallback(d,"updateFromSync")}};b.updateAtomPick=function(b,c){var d=b._currentView;if(null!=d){for(var k in d)"info"!=k&&d[k].applet!=b&&d[k].applet._updateAtomPick(c);a.User.viewUpdatedCallback&&a.User.viewUpdatedCallback(b,"updateAtomPick")}};b.dumpViews=function(a){var c=b.sets[a];if(c){var d="View set "+a+":\n";a=b.applets[a];for(var k in a)d+="\napplet "+a[k]._id+" currentView="+ +(a[k]._currentView?a[k]._currentView.info.viewID:null);for(k=c.length;0<=--k;){a=c[k];var d=d+("\n\nview="+k+" viewID="+a.info.viewID+" chemID="+a.info.chemID+"\n"),h,n;for(n in a)"info"!=n&&(d+="\nview="+k+" type="+n+" applet="+((h=a[n]).applet?h.applet._id:null)+" SMILES="+h.smiles+"\n atomMap="+JSON.stringify(h.atomMap)+"\n data=\n"+h.data+"\n")}return d}};b.__init=function(a){var c=a._viewSet,d=b.applets;d[c]||(d[c]={});d[c][a._viewType]=a};b.__findView=function(a,c){var d=b.sets[a];null== +d&&(d=b.sets[a]=[]);for(var k=d.length;0<=--k;){var h=d[k];if(c.viewID){if(h.info.viewID==c.viewID)return h}else{if(null!=c.chemID&&c.chemID==h.info.chemID)return h;for(var n in h)if("info"!=n&&(null!=c.data&&null!=h[n].data?c.data==h[n].data:c.type==n))return h}}return null};b.__createViewSet=function(d,c,k){b.count++;c={info:{chemID:c,viewID:k||"model_"+b.count}};for(var h in a._applets)k=a._applets[h],k._viewSet==d&&(c[k._viewType]={applet:k,data:null});b.sets[d].push(c);return c};b.__setView= +function(a,b,d){for(var k in a)if("info"!=k){var h=a[k],n=h.applet,s=d||null!=n&&""==n._molData;if(!(null==n||n==b&&!s)){var l=null==h.data,r=null!=n._currentView;n._currentView=a;if(!r||!(a[k].data==h.data&&!l&!s))if(n._loadModelFromView(a),l)break}}}})(a.View);a.Cache={fileCache:{}};a.Cache.get=function(b){return a.Cache.fileCache[b]};a.Cache.put=function(b,d){a.Cache.fileCache[b]=d};a.Cache.setDragDrop=function(b){a.$appEvent(b,"appletdiv","dragover",function(a){a=a.originalEvent;a.stopPropagation(); +a.preventDefault();a.dataTransfer.dropEffect="copy"});a.$appEvent(b,"appletdiv","drop",function(d){var c=d.originalEvent;c.stopPropagation();c.preventDefault();var k=c.dataTransfer.files[0];if(null==k)try{k=""+c.dataTransfer.getData("text"),(0==k.indexOf("file:/")||0==k.indexOf("http:/"))&&b._scriptLoad(k)}catch(h){}else c=new FileReader,c.onloadend=function(c){if(c.target.readyState==FileReader.DONE){var h="cache://DROP_"+k.name;c=a._toBytes(c.target.result);h.endsWith(".spt")||b._appletPanel.cacheFileByName("cache://DROP_*", +!1);"JSV"==b._viewType||h.endsWith(".jdx")?a.Cache.put(h,c):b._appletPanel.cachePut(h,c);(c=a._jsGetXY(b._canvas,d))&&(!b._appletPanel.setStatusDragDropped||b._appletPanel.setStatusDragDropped(0,c[0],c[1],h))&&b._appletPanel.openFileAsyncSpecial(h,1)}},c.readAsArrayBuffer(k)})}})(Jmol,jQuery);Jmol._debugCode=!1; +(function(a){a._isAsync=!1;a._asyncCallbacks={};a._coreFiles=[];var l=!1,k=[],h=[],d=0,n=[],s=[],r=function(b){arguments.length||(b=!0);delete d;for(var e;0s.join("").indexOf(e[b])&&s.push(d+"/core/core"+e[b]+".z.js");for(b=0;b'+b+"._cover(false)\x3c/script>"));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()),e=Math.round(b.height()),k=document.createElement("canvas");k.applet=this;this._canvas=k;k.style.width="100%";k.style.height="100%";k.width=d;k.height=e;k.id=this._id+"_canvas2d";b.append(k); +a._$(k.id).css({"z-index":a._getZ(this,"main")});if(this._isLayered){var h=document.createElement("div");k.contentLayer=h;h.id=this._id+"_contentLayer";b.append(h);a._$(h.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=k.contentLayer,k.contentLayer.applet=this):this._mouseInterface=this._getLayer("front",b,d,e,!1)}else this._mouseInterface=k;a._jsSetMouse(this._mouseInterface)};c._getLayer=function(b,c,d,e,k){var h=document.createElement("canvas");this._canvas[b+"Layer"]=h;h.style.width="100%";h.style.height="100%";h.id=this._id+"_"+b+"Layer";h.width=d;h.height=e;c.append(h);h.applet=this;a._$(h.id).css({background:k?"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 h};c._setupJS=function(){window["j2s.lib"]={base:this._j2sPath+"/",alias:".",console:this._console,monitorZIndex:a._getZ(this,"monitorZIndex")};0==h.length&&a._addExec([this,b,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= +[];d&&clearTimeout(d);d=setTimeout(r,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,!0);c.put("appletReadyCallback","Jmol._readyCallback");c.put("applet",!0);c.put("name",b._id);c.put("syncId",a._syncId);a._isAsync&&c.put("async",!0);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("/")}c.put("codePath",d);a._registerApplet(b._id,b);try{b._newApplet(c)}catch(k){System.out.println((a._isAsync? +"normal async abort from ":"")+k);return}b._jsSetScreenDimensions();r()};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._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,d){if(b&&b._appletPanel){var e=a.$(b,"appletdiv"),k=Math.round(e.width()),e=Math.round(e.height());if(b._is2D&&(b._canvas.width!= +k||b._canvas.height!=e))b._newCanvas(!0),b._appletPanel.setDisplay(b._canvas);b._appletPanel.setScreenDimension(k,e);k=function(){b._appletPanel.paint?b._appletPanel.paint(null):b._appletPanel.update(null)};d?setTimeout(k):k()}};a._getHiddenCanvas=function(a,b,d,e){b=a._id+"_"+b;a=document.createElement("canvas");a.width=a.style.width=d;a.height=a.style.height=e;a.id=b;return a};a._loadImage=function(b,d,e,k,h){var n=d[1];if(null==h&&(h=new Image,null==e?h.onload=function(){a._loadImage(b,d,null, +k,h)}:(e=JU.Base64.getBase64(e).toString(),n=n.substring(n.lastIndexOf("/")+1),n="data:"+(0<=n.indexOf(".png")?"image/png":0<=n.indexOf(".jpg")?"image/jpg":"")+";base64,"+e),h.src=n,null==e))return;e=h.width;var s=h.height,l="echo_"+d[0],r=a._getHiddenCanvas(b.vwr.html5Applet,l,e,s,!0);r.imageWidth=e;r.imageHeight=s;r.id=l;r.image=h;a._setCanvasImage(r,e,s);k(r,n)};a._setCanvasImage=function(a,b,d){a.buf32=null;a.width=b;a.height=d;a.getContext("2d").drawImage(a.image,0,0,b,d)}})(Jmol); +(function(a,l){a._Applet=function(d,k,h){window[d]=this;this._jmolType="Jmol._Applet"+(k.isSigned?" (signed)":"");this._viewType="Jmol";this._isJava=!0;this._syncKeyword="Select:";this._availableParams=";progressbar;progresscolor;boxbgcolor;boxfgcolor;allowjavascript;boxmessage;\t\t\t\t\t\t\t\t\t;messagecallback;pickcallback;animframecallback;appletreadycallback;atommovedcallback;\t\t\t\t\t\t\t\t\t;echocallback;evalcallback;hovercallback;language;loadstructcallback;measurecallback;\t\t\t\t\t\t\t\t\t;minimizationcallback;resizecallback;scriptcallback;statusform;statustext;statustextarea;\t\t\t\t\t\t\t\t\t;synccallback;usecommandthread;syncid;appletid;startupscript;menufile;"; +if(h)return this;this._isSigned=k.isSigned;this._readyFunction=k.readyFunction;this._ready=!1;this._isJava=!0;this._isInfoVisible=!1;this._applet=null;this._memoryLimit=k.memoryLimit||512;this._canScript=function(){return!0};this._savedOrientations=[];this._initialize=function(d,b){var e=!1;a._jarFile&&(b=a._jarFile);if(this._jarFile){var c=this._jarFile;0<=c.indexOf("/")?(alert("This web page URL is requesting that the applet used be "+c+". 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 "+c+"? ","yes or no")?(d=c.substring(0,c.lastIndexOf("/")),b=c.substring(c.lastIndexOf("/")+1)):e=!0):b=c;this_isSigned=k.isSigned=0<=b.indexOf("Signed")}this._jarPath=k.jarPath=d||".";this._jarFile=k.jarFile="string"==typeof b?b:(b?"JmolAppletSigned":"JmolApplet")+"0.jar";e&&alert("The web page URL was ignored. Continuing using "+this._jarFile+' in directory "'+this._jarPath+'"');void 0==a.controls||a.controls._onloadResetForms()};this._create(d,k);return this}; +var k=a._Applet,h=a._Applet.prototype;k._get=function(d,h,l){l||(l=!1);h||(h={});a._addDefaultInfo(h,{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,coverTitle:"",coverCommand:"",deferApplet:!1,deferUncover:!1,disableJ2SLoadMonitor:!1,disableInitialConsole:!1,debug:!1});a._debugAlert=h.debug; +h.serverURL&&(a._serverUrl=h.serverURL);for(var r=!1,b=null,e=h.use.toUpperCase().split("#")[0].split(" "),c=0;cs.codePath.indexOf("://")){var c=l.location.href.split("#")[0].split("?")[0].split("/");c[c.length-1]=s.codePath;s.codePath=c.join("/")}s.archive=r;s.mayscript="true";s.java_arguments="-Xmx"+Math.round(h.memoryLimit||d._memoryLimit)+"m";s.permissions=d._isSigned?"all-permissions":"sandbox";s.documentLocation=l.location.href;s.documentBase=l.location.href.split("#")[0].split("?")[0];s.jarPath=h.jarPath;a._syncedApplets.length&&(s.synccallback="Jmol._mySyncCallback"); +d._startupScript&&(s.script=d._startupScript);var c="\n",q;for(q in s)s[q]&&(c+=" \n");c=a.featureDetection.useIEObject||a.featureDetection.useHtml4Object?"":" type='application/x-java-applet'>")+c+"

\n"+ +k._noJavaMsg+"

\n":"\n"+c+"
\n"+k._noJavaMsg+"
\n";d._deferApplet&&(d._javaCode=c,c="");c=a._getWrapper(d,!0)+c+a._getWrapper(d,!1)+(h.addSelectionOptions?a._getGrabberOptions(d):"");a._debugAlert&&alert(c);d._code=a._documentWrite(c)};h._newApplet=function(a){this._is2D||a.put("script",(a.get("script")|| +"")+";set multipleBondSpacing 0.35;");this._viewerOptions=a;return new J.appletjs.Jmol(a)};h._addCoreFiles=function(){a._addCoreFile("jmol",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"])};h._create=function(d,h){a._setObject(this,d,h);var l={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,l,h);var r;h.inlineModel?(r=h.inlineModel,r=r.replace(/\r|\n|\r\n/g,0<=r.indexOf("|")?"\\/n":"|").replace(/'/g,"'"),a._debugAlert&&alert("inline model:\n"+r)):r="";l.loadInline=r;l.appletReadyCallback="Jmol._readyCallback";a._syncedApplets.length&&(l.synccallback="Jmol._mySyncCallback");l.java_arguments="-Xmx"+Math.round(h.memoryLimit||this._memoryLimit)+"m";this._initialize(h.jarPath, +h.jarFile);k._createApplet(this,h,l)};h._restoreState=function(d,k){System.out.println("\n\nasynchronous restore state for "+d+" "+k);var h=this,l=h._applet&&h._applet.viewer;switch(k){case "setOptions":return function(){h.__startAppletJS(h)};case "render":return function(){setTimeout(function(){l.refresh(2)},10)};default:switch(d){case "J.shape.Balls":case "J.shape.Sticks":case "J.shape.Frank":return null}if(l&&l.isScriptExecuting&&l.isScriptExecuting()){if(a._asyncCallbacks[d])return System.out.println("...ignored"), +1;var b=l.getEvalContextAndHoldQueue(l.eval),e=b.pc-1;b.asyncID=d;a._asyncCallbacks[d]=function(a){b.pc=a;System.out.println("sc.asyncID="+b.asyncID+" sc.pc = "+b.pc);l.eval.resumeEval(b)};l.eval.pc=l.eval.pcEnd;System.out.println("setting resume for pc="+b.pc+" "+d+" to "+a._asyncCallbacks[d]+"//");return function(){System.out.println("resuming "+d+" "+a._asyncCallbacks[d]);a._asyncCallbacks[d](e)}}System.out.println(d+"?????????????????????"+k);return function(){setTimeout(function(){l.refresh(2)}, +10)}}};h._readyCallback=function(d,k,h){h&&(a._setDestroy(this),this._ready=!0,d=this._readyScript,this._defaultModel?a._search(this,this._defaultModel,d?";"+d:""):d?this._script(d):this._src&&this._script('load "'+this._src+'"'),this._showInfo(!0),this._showInfo(!1),a.Cache.setDragDrop(this),this._readyFunction&&this._readyFunction(this),a._setReady(this),(d=this._2dapplet)&&(d._isEmbedded&&d._ready&&d.__Info.visible)&&this._show2d(!0))};h._showInfo=function(d){d&&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!=!d){this._isInfoVisible=d;if(this._isJava){var k=d?2:"100%";a.$setSize(a.$(this,"appletdiv"),k,k)}a.$setVisible(a.$(this,"infotablediv"),d);a.$setVisible(a.$(this,"infoheaderdiv"),d);this._show(!d)}};h._show2d=function(a){this._2dapplet._show2d(a);this._2dapplet._isEmbedded&&(this._showInfo(!1),this._show(!a),this._2dapplet.__showContainer(!0,!0))};h._getAtomCorrelation= +function(a){this._loadMolData(a,"atommap = compare({1.1} {2.1} 'MAP' 'H'); zap 2.1",!0);a=jmol._evaluate("atommap");for(var k=jmol._evaluate("{*}.count"),h=[],l=[],b=0;barguments.length&&(k=1);var h=this._savedOrientations[a];return!h||""==h?h.replace(/1\.0/, +k):this._scriptWait(h)};h._resizeApplet=function(d){function k(d,b){var e=""+d;return 0==e.length?b?"":a._allowedJmolSize[2]:e.indexOf("%")==e.length-1?e:1>=(d=parseFloat(d))&&0a._allowedJmolSize[1]?a._allowedJmolSize[1]:d)+(b?b:"")}var h;"object"==typeof d&&null!=d?(h=d[0]||d.width,d=d[1]||d.height):h=d;h=[k(h,"px"),k(d,"px")];d=a._getElement(this,"appletinfotablediv");d.style.width=h[0];d.style.height= +h[1];this._containerWidth=h[0];this._containerHeight=h[1];this._is2D&&a._repaint(this,!0)};h._search=function(d,k){a._search(this,d,k)};h._searchDatabase=function(d,k,h){if(this._2dapplet&&this._2dapplet._isEmbedded&&!a.$(this,"appletdiv:visible")[0])return this._2dapplet._searchDatabase(d,k,h);this._showInfo(!1);0<=d.indexOf("?")?a._getInfoFromDatabase(this,k,d.split("?")[0]):(h||(h=a._getScriptForDatabase(k)),d=k+d,this._currentView=null,this._searchQuery=d,this._loadFile(d,h,d))};h._loadFile=function(d, +k,h){this._showInfo(!1);k||(k="");this._thisJmolModel=""+Math.random();this._fileName=d;if(!this._scriptLoad(d,k)){var l=this;a._loadFileData(this,d,function(a){l.__loadModel(a,k,h)},function(){l.__loadModel(null)})}};h._scriptLoad=function(a,k){k||(k="");var h=this._isJava||!this._noscript;h&&this._script("zap;set echo middle center;echo Retrieving data...");if(!this._isSigned||null!=this._viewSet)return!1;h?this._script('load async "'+a+'";'+k):this._applet.openFile(a);this._checkDeferred("");return!0}; +h.__loadModel=function(d,k,h){null!=d&&(null!=this._viewSet&&(k||(k=""),k+=";if ({*}.molecule.max > 1 || {*}.modelindex.max > 0){ delete molecule > 1 or modelindex > 0;x = getProperty('extractModel',{*});load inline @x};"),!k&&this._noscript?this._applet.loadInlineString(d,"",!1):this._loadMolData(d,k,!1),null!=this._viewSet&&a.View.updateView(this,{chemID:h,data:d}))};h._loadMolData=function(a,k,h){k||(k="");h=h?"append":"model";this._applet.scriptWait('load DATA "'+h+'"'+a+'\nEND "'+h+'" ;'+k)}; +h._loadModelFromView=function(d){this._currentView=d;var k=d.Jmol;null!=k.data?this.__loadModel(k.data,null,d.info.chemID):null!=d.info.chemID?a._searchMol(this,d.info.chemID,null,!1):(k=d.JME)&&k.applet._show2d(!1,this)};h._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}")}))};h._atomPickedCallback=function(d,k){if(!(0>k)){var h=[k+1];a.View.updateAtomPick(this,h);this._updateAtomPick(h)}};h._updateAtomPick=function(a){this._script(0==a.length?"select none":"select on visible and (@"+a.join(",@")+")")};h._isDeferred=function(){return!this._canvas&&this._cover&&this._isCovered&&this._deferApplet};h._checkDeferred=function(a){return this._isDeferred()?(this._coverScript=a,this._cover(!1),!0):!1};h._cover=function(d){d||!this._deferApplet?this._displayCoverImage(d): +(d=this._coverScript?this._coverScript:"",this._coverScript="",this._deferUncover&&(d+=";refresh;javascript "+this._id+"._displayCoverImage(false)"),this._script(d,!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())};h._displayCoverImage=function(d){this._coverImage&&this._isCovered!=d&&(this._isCovered=d,a._getElement(this,"coverdiv").style.display=d?"block":"none")};h._getSmiles=function(){return this._evaluate("{visible}.find('SMILES')")};h._getMol=function(){return this._evaluate("getProperty('ExtractModel',{visible})")};h._getMol2D=function(){return jmol._evaluate("script('select visible;show chemical sdf')")};a.jmolSmiles=function(a){return a._getSmiles()}})(Jmol,document); +(function(a){var l=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:""}; +l._addScript=function(a,h){var d=l._scripts.length;l._scripts[d]=[a,h];return d};l._getIdForControl=function(a,h){return"string"==typeof a?a:!h||!a._canScript||a._canScript(h)?a._id:null};l._radio=function(a,h,d,n,s,r,b,e){var c=l._getIdForControl(a,h);if(null==c)return null;++l._radioCount;void 0!=r&&null!=r||(r="jmolRadioGroup"+(l._radioGroupCount-1));if(!h)return"";void 0!=b&&null!=b||(b="jmolRadio"+(l._radioCount-1));void 0!=d&&null!=d||(d=h.substring(0,32));s||(s="");a="";l._actions[b]= +l._addScript(c,h);h='";0<=d.toLowerCase().indexOf("")&&(h+=a,a="");return h+('"+a+s)};l._scriptExecute=function(k,h){var d=a._applets[h[0]],l=h[1];if("object"==typeof l)l[0](k,l, +d);else"function"==typeof l?l(d):a.script(d,l)};l.__checkScript=function(a,h){var d=0<=h.value.indexOf("JSCONSOLE ")||""===a._scriptCheck(h.value);h.style.color=d?"black":"red";return d};l.__getCmd=function(a,h){if(h._cmds&&h._cmds.length){var d=h._cmds[h._cmdpt=(h._cmdpt+h._cmds.length+a)%h._cmds.length];setTimeout(function(){h.value=d},10);h._cmdadd=1;h._cmddir=a}};l._commandKeyPress=function(k,h,d){k=13==k?13:window.event?window.event.keyCode:k?k.keyCode||k.which:0;var n=document.getElementById(h), +s=a._applets[d];switch(k){case 13:return h=n.value,l._scriptExecute(n,[d,h]),n._cmds||(n._cmds=[],n._cmddir=0,n._cmdpt=-1,n._cmdadd=0),h&&0==n._cmdadd?(++n._cmdpt,n._cmds.splice(n._cmdpt,0,h),n._cmdadd=0,n._cmddir=0):n._cmdadd=0,n.value="",!1;case 27:return setTimeout(function(){n.value=""},20),!1;case 38:l.__getCmd(-1,n);break;case 40:l.__getCmd(1,n);break;default:n._cmdadd=0}setTimeout(function(){l.__checkScript(s,n)},20);return!0};l._click=function(a,h){l._element=a;1==arguments.length&&(h=l._actions[a.id]); +l._scriptExecute(a,l._scripts[h])};l._menuSelected=function(a){var h=a.value;if(void 0!=h)l._scriptExecute(a,l._scripts[h]);else{h=a.length;if("number"==typeof h)for(var d=0;d";a._debugAlert&& +alert(h);return a._documentWrite(h)};l._getCheckbox=function(k,h,d,n,s,r,b){var e=l._getIdForControl(k,h);null!=e&&(e=l._getIdForControl(k,d));if(null==e)return"";void 0!=r&&null!=r||(r="jmolCheckbox"+l._checkboxCount);++l._checkboxCount;if(void 0==h||null==h||void 0==d||null==d)alert("jmolCheckbox requires two scripts");else if(void 0==n||null==n)alert("jmolCheckbox requires a label");else return l._actions[r]=[l._addScript(e,h),l._addScript(e,d)],k="",s='",0<=n.toLowerCase().indexOf("")&&(s+=k,k=""),s+='"+k,a._debugAlert&&alert(s),a._documentWrite(s)};l._getCommandInput=function(k,h,d,n,s,r){k=l._getIdForControl(k,"x");if(null==k)return"";void 0!=n&&null!=n||(n="jmolCmd"+l._cmdCount); +void 0!=h&&null!=h||(h="Execute");void 0!=d&&!isNaN(d)||(d=60);void 0!=r||(r="help");++l._cmdCount;h='";a._debugAlert&&alert(h);return a._documentWrite(h)};l._getLink=function(k, +h,d,n,s){k=l._getIdForControl(k,h);if(null==k)return"";void 0!=n&&null!=n||(n="jmolLink"+l._linkCount);void 0!=d&&null!=d||(d=h.substring(0,32));++l._linkCount;h=l._addScript(k,h);d='"+d+"";a._debugAlert&&alert(d);return a._documentWrite(d)}; +l._getMenu=function(k,h,d,n,s){var r=l._getIdForControl(k,null);void 0!=n&&null!=n||(n="jmolMenu"+l._menuCount);++l._menuCount;r=typeof h;if(null!=r&&"object"==r&&h.length){var b=h.length;"number"!=typeof d||1==d?d=null:0>d&&(d=b);d='";a._debugAlert&&alert(d);return a._documentWrite(d)}};l._getRadio=function(k,h,d,n,s,r,b,e){0==l._radioGroupCount&&++l._radioGroupCount;r||(r="jmolRadioGroup"+(l._radioGroupCount-1));k=l._radio(k,h,d,n,s,r,b?b:r+"_"+l._radioCount,e?e:0);if(null== +k)return"";a._debugAlert&&alert(k);return a._documentWrite(k)};l._getRadioGroup=function(k,h,d,n,s,r){var b=typeof h;if("object"!=b||null==b||!h.length)alert("invalid arrayOfRadioButtons");else{void 0!=d&&null!=d||(d="  ");var e=h.length;++l._radioGroupCount;n||(n="jmolRadioGroup"+(l._radioGroupCount-1));for(var c="",q=0;q";a._debugAlert&&alert(c);return a._documentWrite(c)}}})(Jmol); +(function(a){var l=function(a){a="&"+a+"=";return decodeURI(("&"+document.location.search.substring(1)+a).split(a)[1].split("&")[0])};a._j2sPath=l("_J2S");a._jarFile=l("_JAR");a._use=l("_USE");a.getVersion=function(){return a._jmolInfo.version};a.getApplet=function(k,h,d){return a._Applet._get(k,h,d)};a.getJMEApplet=function(k,h,d,l){return a._JMEApplet._get(k,h,d,l)};a.getJSVApplet=function(k,h,d){return a._JSVApplet._get(k,h,d)};a.loadFile=function(a,h,d){a._loadFile(h,d)};a.script=function(a,h){a._checkDeferred(h)|| +a._script(h)};a.scriptCheck=function(a,h){return a&&a._scriptCheck&&a._ready&&a._scriptCheck(h)};a.scriptWait=function(a,h){return a._scriptWait(h)};a.scriptEcho=function(a,h){return a._scriptEcho(h)};a.scriptMessage=function(a,h){return a._scriptMessage(h)};a.scriptWaitOutput=function(a,h){return a._scriptWait(h)};a.scriptWaitAsArray=function(a,h){return a._scriptWaitAsArray(h)};a.search=function(a,h,d){a._search(h,d)};a.evaluateVar=function(a,h){return a._evaluate(h)};a.evaluate=function(a,h){return a._evaluateDEPRECATED(h)}; +a.getAppletHtml=function(k,h){if(h){var d=a._document;a._document=null;k=a.getApplet(k,h);a._document=d}return k._code};a.getPropertyAsArray=function(a,h,d){return a._getPropertyAsArray(h,d)};a.getPropertyAsJavaObject=function(a,h,d){return a._getPropertyAsJavaObject(h,d)};a.getPropertyAsJSON=function(a,h,d){return a._getPropertyAsJSON(h,d)};a.getPropertyAsString=function(a,h,d){return a._getPropertyAsString(h,d)};a.getStatus=function(a,h){return a._getStatus(h)};a.resizeApplet=function(a,h){return a._resizeApplet(h)}; +a.restoreOrientation=function(a,h){return a._restoreOrientation(h)};a.restoreOrientationDelayed=function(a,h,d){return a._restoreOrientationDelayed(h,d)};a.saveOrientation=function(a,h){return a._saveOrientation(h)};a.say=function(a){alert(a)};a.clearConsole=function(a){a._clearConsole()};a.getInfo=function(a){return a._info};a.setInfo=function(a,h,d){a._info=h;2")}; +a.jmolButton=function(k,h,d,l,s){return a.controls._getButton(k,h,d,l,s)};a.jmolCheckbox=function(k,h,d,l,s,r,b){return a.controls._getCheckbox(k,h,d,l,s,r,b)};a.jmolCommandInput=function(k,h,d,l,s,r){return a.controls._getCommandInput(k,h,d,l,s,r)};a.jmolHtml=function(k){return a._documentWrite(k)};a.jmolLink=function(k,h,d,l,s){return a.controls._getLink(k,h,d,l,s)};a.jmolMenu=function(k,h,d,l,s){return a.controls._getMenu(k,h,d,l,s)};a.jmolRadio=function(k,h,d,l,s,r,b,e){return a.controls._getRadio(k, +h,d,l,s,r,b,e)};a.jmolRadioGroup=function(k,h,d,l,s,r){return a.controls._getRadioGroup(k,h,d,l,s,r)};a.setCheckboxGroup=function(k,h){a.controls._cbSetCheckboxGroup(k,h,arguments)};a.setDocument=function(k){a._document=k};a.setXHTML=function(k){a._isXHTML=!0;a._XhtmlElement=null;a._XhtmlAppendChild=!1;k&&(a._XhtmlElement=document.getElementById(k),a._XhtmlAppendChild=!0)};a.setAppletCss=function(k,h){null!=k&&(a._appletCssClass=k);a._appletCssText=h?h+" ":k?'class="'+k+'" ':""};a.setButtonCss=function(k, +h){null!=k&&(a.controls._buttonCssClass=k);a.controls._buttonCssText=h?h+" ":k?'class="'+k+'" ':""};a.setCheckboxCss=function(k,h){null!=k&&(a.controls._checkboxCssClass=k);a.controls._checkboxCssText=h?h+" ":k?'class="'+k+'" ':""};a.setRadioCss=function(k,h){null!=k&&(a.controls._radioCssClass=k);a.controls._radioCssText=h?h+" ":k?'class="'+k+'" ':""};a.setLinkCss=function(k,h){null!=k&&(a.controls._linkCssClass=k);a.controls._linkCssText=h?h+" ":k?'class="'+k+'" ':""};a.setMenuCss=function(k,h){null!= +k&&(a.controls._menuCssClass=k);a.controls._menuCssText=h?h+" ":k?'class="'+k+'" ':""};a.setAppletSync=function(k,h,d){a._syncedApplets=k;a._syncedCommands=h;a._syncedReady={};a._isJmolJSVSync=d};a.setGrabberOptions=function(k){a._grabberOptions=k};a.setAppletHtml=function(k,h){k._code&&(a.$html(h,k._code),k._init&&!k._deferApplet&&k._init())};a.coverApplet=function(a,h){a._cover&&a._cover(h)};a.setFileCaching=function(k,h){k?k._cacheFiles=h:a.fileCache=h?{}:null};a.updateView=function(a,h,d){a._updateView(h, +d)};a.getChemicalInfo=function(k,h,d){h||(h="name");"string"!=typeof applet_or_Identifier&&(k=k._getSmiles());return a._getNCIInfo(k,h,d)};a.saveImage=function(a){switch(a._viewType){case "Jmol":a._script('write PNGJ "'+a._id+'.png"');break;case "JSV":a._script("write PDF");break;case "JME":a._script("print")}}})(Jmol); +LoadClazz=function(){c$=null;window["j2s.clazzloaded"]||(window["j2s.clazzloaded"]=!1);window["j2s.clazzloaded"]||(window["j2s.clazzloaded"]=!0,window["j2s.object.native"]=!0,Clazz={_isQuiet:!1},function(a,l){var k=["j2s.clazzloaded","j2s.object.native"];a.setGlobal=function(a,b){k.push(a);window[a]=b};a.getGlobals=function(){return k.sort().join("\n")};a.setConsoleDiv=function(a){window["j2s.lib"]&&(window["j2s.lib"].console=a)};var h=window["j2s.doProfile"]&&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 d=a._O.prototype;d.equals=function(a){return this==a};d.hashCode=function(){return this._$hashcode||(this._$hashcode=++a._hashCode)};d.getClass=function(){return a.getClass(this)};d.clone=function(){return a.clone(this)};a.clone=function(a){var b=new a.constructor, +c;for(c in a)b[c]=a[c];return b};d.finalize=function(){};d.notify=function(){};d.notifyAll=function(){};d.wait=function(){};d.to$tring=Object.prototype.toString;d.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);if(a._supportsNativeObject)for(var d= +0;de)return"["==d.charAt(0)?a.extractClassName(d):d.replace(/[^a-zA-Z0-9]/g,"");var e=e+8,h=d.indexOf("(",e);if(0>h)break;d=d.substring(e,h);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)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 n=function(b,c){for(var d=0;d +d;){if(e.implementz)for(var h=e.implementz,k=0;ka;d&&(a=-a);for(var e=0;e",b=b+(e+" "+(c.exName?(c.claxxOwner? +c.claxxOwner.__CLASS_NAME__+".":"")+c.exName+h.replace(/function /,""):h)+"\n");if(c==c.caller){b+="\n";break}if(d)for(var h=c.arguments,k=0;kda.indexOf(m)&&(da+=m+"\n");h[m]||(h[m]=0);h[m]++}if(fx.lastParams==g.typeString&&fx.lastClaxxRef===j){if(g.hasCastedNull){j=[];for(d=0;dB[C]){D=!1;break}D&& +(B[y.length]=F,r.push(B))}if(0==r.length)r=null;else{sa=r[0];for(F=1;Frb(r,c)&&r.push(c);s&&(s.claxxOwner===c?(q[s.funParams]=s,s.claxxOwner=null,s.funParams=null):s.claxxOwner||(q["\\unknown"]=s));k.exClazz=c;q[l]=k;return q};duplicatedMethods={};var M=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 +d.length)break;if(d.indexOf(l)==d.length-l.length){d=d.substring(0,d.length-l.length+1);break}}else d=a._Loader.getClasspathFor(e,!0);else(h=a.binaryFolders)&&h.length&&(d=h[0]);d||(d="j2s/");d=d.replace(/\\/g,"/");h=d.length;h=d.charAt(h-1);"/"!=h&&(d+="/");this.base?c.url=d+b:(h=e.lastIndexOf("."),c.url=-1==h||this.base?d+b:d+e.substring(0,h).replace(/\./g,"/")+"/"+b)}return c},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 za=[];a.pu$h=function(a){a||(a=self.c$);a&&za.push(a)};a.p0p=function(){return za.pop()};a.decorateAsClass=function(b,c,d,e,h,k){var l=null;c&&(l=c.__PKG_NAME__,l||(l=c.__CLASS_NAME__));var n=(l?l+".":"")+d;a._Loader._classPending[n]&&(delete a._Loader._classPending[n],a._Loader._classCountOK++,a._Loader._classCountPending--);a._Loader&&a._Loader._checkLoad&&System.out.println("decorating class "+l+"."+d);(l= +a.unloadedClasses[n])&&(b=l);La(b,c,d);k?a.inheritClass(b,e,k):e&&a.inheritClass(b,e);h&&a.implementOf(b,h);return b};var La=function(b,c,d){var e;c?c.__PKG_NAME__?(e=c.__PKG_NAME__+"."+d,c[d]=b,c===java.lang&&a.setGlobal(d,b)):(e=c.__CLASS_NAME__+"."+d,c[d]=b):(e=d,a.setGlobal(d,b));a.extendJO(b,e);c=a.innerFunctionNames;for(d=0;da?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;d=function(a){return function(){for(var b= +this.length,c=32==a?new Int32Array(b):new Float64Array(b);0<=--b;)c[b]=this[b];return c}};self.Int32Array&&self.Int32Array!=Array?(a.haveInt32=!0,Int32Array.prototype.sort||(Int32Array.prototype.sort=Array.prototype.sort),Int32Array.prototype.clone||(Int32Array.prototype.clone=d(32))):(Int32Array=function(a){a||(a=0);var b=Array(a);b.toString=function(){return"[object Int32Array]"};for(var c=0;cd?h:Array(d),k=d;0<=--k;)b[k]=h;return b; +default:for(var l=Array(e),k=0;kd)d=h.length;var k=0>h?Array(d):c?new Int32Array(d):new Float64Array(d);if(e)for(e=d;0<=--e;)k[e]=h[e];return k}for(h=Array(e);0<=--e;)h[e]=b[e+1];k=Array(d);for(e= +0;e=A.STATUS_LOAD_COMPLETE))k?window.setTimeout(g,25):g()}else{var m=b.getClasspathFor(c);l=e[m];if(!l)for(k= +C.length;0<=--k;)if(C[k].path==m||C[k].name==c){l=!0;break}if(l){if(g&&(l=Q(c)))if(l.onLoaded){if(g!=l.onLoaded){var n=l.onLoaded,q=g;l.onLoaded=function(){n();q()}}}else l.onLoaded=g}else{l=a.unloadedClasses[c]&&Q(c)||new A;l.name=c;l.path=m;l.isPackage=m.lastIndexOf("package.js")==m.length-10;Z(m,c,l);l.onLoaded=g;l.status=A.STATUS_KNOWN;c=!1;for(k=C.length;0<=--k;)if(C[k].status!=A.STATUS_LOAD_COMPLETE){c=!0;break}if(l.isPackage){for(k=C.length;0<=--k&&!C[k].isPackage;)C[k+1]=C[k];C[++k]=l}else c&& +C.push(l);if(!c){var r=!1;g&&(r=U,U=!0);h&&(g=null);Ea(d,l,!0);V(l,l.path,l.requiredBy,!1,g?function(){U=r;g()}:null)}}}};var H=function(a){return null!=window[a+".registered"]&&!P["@"+a]};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=[classes]);D(b);for(var c=b.length;0<=--c;)P["#"+b[c]]=a;P["$"+a]=b};b.registerPackages=function(c,d){for(var e= +b.getClasspathFor(c+".*",!0),g=0;g>");e[d]=!0;Ka(C,d);L=!0;ta=!1;b._checkLoad&&System.out.println("\t"+d+(g?"\n -- required by "+g:"")+" ajax="+L+" async="+ta);b.onScriptLoading(d);if(L&&!ta){g=l._getFileData(d);try{T(d,g)}catch(n){alert(n+" loading file "+d+" "+c.name+" "+a.getStackTrace())}m&&m()}else System.out.println("for file "+d+" fSuccess = "+(m?m.toString():"")),c={dataType:"script",async:!0,type:"GET",url:d,success:da(d,!1,m),error:da(d,!0,m)},h++,l.$ajax(c)},da=function(c,d,e){a.getStackTrace();return function(){s&& +this.timeoutHandle&&(window.clearTimeout(this.timeoutHandle),this.timeoutHandle=null);0q;q++)for(;m=l[q](A.STATUS_CONTENT_LOADED);)1==q&&n===m&&(m.status=A.STATUS_LOAD_COMPLETE),updateNode(m),n=m;for(;!(pa=[],!qa(d,c)););for(q=0;2>q;q++)for(n=null;(m=l[q](A.STATUS_DECLARED))&&n!==m;)updateNode(n=m);n=[];for(q=0;2>q;q++)for(;m=l[q](A.STATUS_DECLARED);)n.push(m),m.status=A.STATUS_LOAD_COMPLETE;if(n.length){for(q=0;q=A.STATUS_DECLARED););if(0<=g){if(b._checkLoad){var j;System.out.println("cycle found loading "+c+" for "+a)}for(;gj;j++){k=h[j];for(g=k.length;0<=--g;)if(k[g].status==A.STATUS_DECLARED&&qa(k[g],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=Q(c);d?(a.push(d),System.out.println(ra("", +"",d,"",0))):alert("No node for "+c)}return a};var ra=function(a,b,c,d,e){b+="--"+c.name;a+=b+"\n";if(5=A.STATUS_LOAD_COMPLETE)xa(a);else{var c=!0;if(a.musts.length&&a.declaration)for(var d=a.musts.length, +e=d;0<=--e;){var g=a.musts[e];g.requiredBy=a;if(g.statusA.STATUS_KNOWN&&!a.declaration||ua(a.musts,A.STATUS_LOAD_COMPLETE)&&ua(a.optionals,A.STATUS_LOAD_COMPLETE)){c=A.STATUS_LOAD_COMPLETE;if(!Pa(a,c))return!1;if(a.declaration&&a.declaration.clazzList){h=0;k=a.declaration.clazzList;for(m=k.length;hc.indexOf("Opera")&&document.all?0==h?d:k:0>c.indexOf("Gecko")?h==e.offsetHeight&&h==e.scrollHeight?d:k:d;ua!=c&&(ua=c,C.style.bottom=ua+4+"px");b&&ra()}};var qa=function(a){if(a)for(var b=a.childNodes.length;0<=--b;){var c=a.childNodes[b];if(c){c.childNodes&&c.childNodes.length&&qa(c);try{a.removeChild(c)}catch(d){}}}}, +ib=function(a){aa&&a==V.DEFAULT_OPACITY&&(window.clearTimeout(aa),aa=null);fa=a;navigator.userAgent.toLowerCase();C.style.filter="Alpha(Opacity="+a+")";C.style.opacity=a/100},tb=function(){V.hideMonitor()},kb=!1,ra=function(){"none"!=C.style.display&&(fa==V.DEFAULT_OPACITY?(aa=window.setTimeout(function(){ra()},750),fa-=5):0<=fa-10?(ib(fa-10),aa=window.setTimeout(function(){ra()},40)):C.style.display="none")},D=a.Console,W=System;D.maxTotalLines=1E4;D.setMaxTotalLines=function(a){D.maxTotalLines= +0D.maxTotalLines){for(var d=0;dc.childNodes.length)l=document.createElement("DIV"),c.appendChild(l),l.style.whiteSpace="nowrap",D.linesCount++;else try{l=c.childNodes[c.childNodes.length-1]}catch(n){l=document.createElement("DIV"),c.appendChild(l),l.style.whiteSpace="nowrap",D.linesCount++}var q=document.createElement("SPAN");l.appendChild(q);q.style.whiteSpace="nowrap";b&&(q.style.color=b);l=h[d];0==l.length&&(l=X);q.appendChild(document.createTextNode(l));D.pinning||(c.scrollTop+=100);D.metLineBreak=d!=k|| +e}d=c.parentNode.className;!D.pinning&&(d&&-1!=d.indexOf("composite"))&&(c.parentNode.scrollTop=c.parentNode.scrollHeight);D.lastOutputTime=(new Date).getTime()};D.clear=function(){try{D.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]);D.linesCount=0}}catch(e){}};a.alert=function(a){D.consoleOutput(a+"\r\n")};W.out.print=function(a){D.consoleOutput(a)};W.out.println=function(a){D.consoleOutput("undefined"== +typeof a?"\r\n":null==a?"null\r\n":a+"\r\n")};W.out.write=function(a,b,c){W.out.print(String.instantialize(a).substring(b,b+c))};W.err.__CLASS_NAME__="java.io.PrintStream";W.err.print=function(a){D.consoleOutput(a,"red")};W.err.println=function(a){D.consoleOutput("undefined"==typeof a?"\r\n":null==a?"null\r\n":a+"\r\n","red")};W.err.write=function(a,b,c){W.err.print(String.instantialize(a).substring(b,b+c))}}(Clazz,Jmol))};Jmol.___JmolDate="$Date: 2015-06-10 23:34:03 -0500 (Wed, 10 Jun 2015) $"; +Jmol.___fullJmolProperties="src/org/jmol/viewer/Jmol.properties";Jmol.___JmolVersion="14.2.14_2015.06.11"; Jmol.Info = { // uncomment one or more of these next lines only if you want to override jmolInitialize() //jarPath: "java", //jarFile: "JmolAppletSigned0.jar", //j2sPath: "j2s", - use: "HTML5", // could be JAVA or HTML5 + use: "JAVA", // could be JAVA or HTML5 // the serverURL path is only used to load binary files in Safari, Chrome, and MSIE - serverURL: "http://your.server.here/jsmol.php", // required for binary file loading (Spartan, .gz, .map, etc.) + serverURL: "http://www.jalview.org/jsmol.php", // required for binary file loading (Spartan, .gz, .map, etc.) disableJ2SLoadMonitor: false, disableInitialConsole: true -- 1.7.10.2