UNPKG

biojs-vis-pdbviewer

Version:

A BioJS 2.0 component to view protein structures

85 lines (84 loc) 45.4 kB
(function(ka,la,ma,na,oa,u,pa,x,ca,da,qa,B,ra,ea,sa,M,ta,N,ua,C,va,O,wa,xa,ya,za,Aa,Ba,Ca,Da,Ea,Fa,Ga,Ha,Ia,Ja,Ka,La,Ma,Na,Oa,Pa,Qa,Ra,Sa,Ta,Ua,Va,Wa,Xa,Ya,Za,$a,ab,bb,n,l){if(!jQuery.ui)try{var e=jQuery,Q=function(a,b){var c,d,j,g=a.nodeName.toLowerCase();return"area"===g?(c=a.parentNode,d=c.name,!a.href||!d||"map"!==c.nodeName.toLowerCase()?!1:(j=e("img[usemap=#"+d+"]")[0],!!j&&P(j))):(/input|select|textarea|button|object/.test(g)?!a.disabled:"a"===g?a.href||b:b)&&P(a)},P=function(a){return e.expr.filters.visible(a)&& !e(a).parents().andSelf().filter(function(){return"hidden"===e.css(this,"visibility")}).length},fa=0,ga=/^ui-id-\d+$/;e.ui=e.ui||{};if(!e.ui.version){e.extend(e.ui,{version:"1.9.2",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}});e.fn.extend({_focus:e.fn.focus,focus:function(a,b){return"number"== typeof a?this.each(function(){var c=this;setTimeout(function(){e(c).focus();b&&b.call(c)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;return e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?a=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):a=this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this, "overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!a.length?e(document):a},zIndex:function(a){if(void 0!==a)return this.css("zIndex",a);if(this.length){a=e(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if("absolute"===b||"relative"===b||"fixed"===b)if(b=parseInt(a.css("zIndex"),10),!isNaN(b)&&0!==b)return b;a=a.parent()}}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++fa)})},removeUniqueId:function(){return this.each(function(){ga.test(this.id)&& e(this).removeAttr("id")})}});e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(a){return function(b){return!!e.data(b,a)}}):function(a,b,c){return!!e.data(a,c[3])},focusable:function(a){return Q(a,!isNaN(e.attr(a,"tabindex")))},tabbable:function(a){var b=e.attr(a,"tabindex"),c=isNaN(b);return(c||0<=b)&&Q(a,!c)}});e(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));b.offsetHeight;e.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}); e.support.minHeight=100===b.offsetHeight;e.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(a,b){function c(a,b,c,g){return e.each(d,function(){b-=parseFloat(e.css(a,"padding"+this))||0;c&&(b-=parseFloat(e.css(a,"border"+this+"Width"))||0);g&&(b-=parseFloat(e.css(a,"margin"+this))||0)}),b}var d="Width"===b?["Left","Right"]:["Top","Bottom"],j=b.toLowerCase(),g={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight, outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+b]=function(a){return void 0===a?g["inner"+b].call(this):this.each(function(){e(this).css(j,c(this,a)+"px")})};e.fn["outer"+b]=function(a,d){return"number"!=typeof a?g["outer"+b].call(this,a):this.each(function(){e(this).css(j,c(this,a,!0,d)+"px")})}});if(e("<a>").data("a-b","a").removeData("a-b").data("a-b")){var S=e.fn.removeData;e.fn.removeData=function(a){return arguments.length?S.call(this,e.camelCase(a)):S.call(this)}}var T= /msie ([\w.]+)/.exec(navigator.userAgent.toLowerCase())||[];e.ui.ie=T.length?!0:!1;e.ui.ie6=6===parseFloat(T[1],10);e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});e.extend(e.ui,{plugin:{add:function(a,b,c){var d;a=e.ui[a].prototype;for(d in c)a.plugins[d]=a.plugins[d]||[],a.plugins[d].push([b,c[d]])},call:function(a, b,c){var d=a.plugins[b];if(d&&a.element[0].parentNode&&11!==a.element[0].parentNode.nodeType)for(b=0;b<d.length;b++)a.options[d[b][0]]&&d[b][1].apply(a.element,c)}},contains:e.contains,hasScroll:function(a,b){if("hidden"===e(a).css("overflow"))return!1;var c=b&&"left"===b?"scrollLeft":"scrollTop";return 0<a[c]?!0:(a[c]=1,a[c]=0,!1)},isOverAxis:function(a,b,c){return a>b&&a<b+c},isOver:function(a,b,c,d,j,g){return e.ui.isOverAxis(a,c,j)&&e.ui.isOverAxis(b,d,g)}})}}catch(cb){System.out.println("coremenu failed to load jQuery.ui.core -- jQuery version conflict?")}if(!jQuery.ui.widget)try{var f= jQuery,ha=0,U=Array.prototype.slice,ia=f.cleanData;f.cleanData=function(a){for(var b=0,c;null!=(c=a[b]);b++)try{f(c).triggerHandler("remove")}catch(d){}ia(a)};f.widget=function(a,b,c){var d,j,g,z,e=a.split(".")[0];a=a.split(".")[1];d=e+"-"+a;c||(c=b,b=f.Widget);f.expr[":"][d.toLowerCase()]=function(a){return!!f.data(a,d)};f[e]=f[e]||{};j=f[e][a];g=f[e][a]=function(a,b){if(!this._createWidget)return new g(a,b);arguments.length&&this._createWidget(a,b)};f.extend(g,j,{version:c.version,_proto:f.extend({}, c),_childConstructors:[]});z=new b;z.options=f.widget.extend({},z.options);f.each(c,function(a,d){if(f.isFunction(d)){var g=function(){return b.prototype[a].apply(this,arguments)},j=function(c){return b.prototype[a].apply(this,c)};c[a]=function(){var a=this._super,b=this._superApply,c;return this._super=g,this._superApply=j,c=d.apply(this,arguments),this._super=a,this._superApply=b,c}}});g.prototype=f.widget.extend(z,{widgetEventPrefix:j?z.widgetEventPrefix:a},c,{constructor:g,namespace:e,widgetName:a, widgetBaseClass:d,widgetFullName:d});j?(f.each(j._childConstructors,function(a,b){var c=b.prototype;f.widget(c.namespace+"."+c.widgetName,g,b._proto)}),delete j._childConstructors):b._childConstructors.push(g);f.widget.bridge(a,g)};f.widget.extend=function(a){for(var b=U.call(arguments,1),c=0,d=b.length,j,g;c<d;c++)for(j in b[c])g=b[c][j],b[c].hasOwnProperty(j)&&void 0!==g&&(f.isPlainObject(g)?a[j]=f.isPlainObject(a[j])?f.widget.extend({},a[j],g):f.widget.extend({},g):a[j]=g);return a};f.widget.bridge= function(a,b){var c=b.prototype.widgetFullName||a;f.fn[a]=function(d){var j="string"==typeof d,g=U.call(arguments,1),e=this;return d=!j&&g.length?f.widget.extend.apply(null,[d].concat(g)):d,j?this.each(function(){var b,j=f.data(this,c);if(!j)return f.error("cannot call methods on "+a+" prior to initialization; attempted to call method '"+d+"'");if(!f.isFunction(j[d])||"_"===d.charAt(0))return f.error("no such method '"+d+"' for "+a+" widget instance");b=j[d].apply(j,g);if(b!==j&&void 0!==b)return e= b&&b.jquery?e.pushStack(b.get()):b,!1}):this.each(function(){var a=f.data(this,c);a?a.option(d||{})._init():f.data(this,c,new b(d,this))}),e}};f.Widget=function(){};f.Widget._childConstructors=[];f.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(a,b){b=f(b||this.defaultElement||this)[0];this.element=f(b);this.uuid=ha++;this.eventNamespace="."+this.widgetName+this.uuid;this.options=f.widget.extend({},this.options, this._getCreateOptions(),a);this.bindings=f();this.hoverable=f();this.focusable=f();b!==this&&(f.data(b,this.widgetName,this),f.data(b,this.widgetFullName,this),this._on(!0,this.element,{remove:function(a){a.target===b&&this.destroy()}}),this.document=f(b.style?b.ownerDocument:b.document||b),this.window=f(this.document[0].defaultView||this.document[0].parentWindow));this._create();this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:f.noop,_getCreateEventData:f.noop, _create:f.noop,_init:f.noop,destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(f.camelCase(this.widgetFullName));this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled");this.bindings.unbind(this.eventNamespace);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")},_destroy:f.noop,widget:function(){return this.element}, option:function(a,b){var c=a,d,j,g;if(0===arguments.length)return f.widget.extend({},this.options);if("string"==typeof a)if(c={},d=a.split("."),a=d.shift(),d.length){j=c[a]=f.widget.extend({},this.options[a]);for(g=0;g<d.length-1;g++)j[d[g]]=j[d[g]]||{},j=j[d[g]];a=d.pop();if(void 0===b)return void 0===j[a]?null:j[a];j[a]=b}else{if(void 0===b)return void 0===this.options[a]?null:this.options[a];c[a]=b}return this._setOptions(c),this},_setOptions:function(a){for(var b in a)this._setOption(b,a[b]); return this},_setOption:function(a,b){return this.options[a]=b,"disabled"===a&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!b).attr("aria-disabled",b),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(a,b,c){var d,j=this;"boolean"!=typeof a&&(c=b,b=a,a=!1);c?(b=d=f(b),this.bindings=this.bindings.add(b)): (c=b,b=this.element,d=this.widget());f.each(c,function(c,e){function h(){if(a||!(!0===j.options.disabled||f(this).hasClass("ui-state-disabled")))return("string"==typeof e?j[e]:e).apply(j,arguments)}"string"!=typeof e&&(h.guid=e.guid=e.guid||h.guid||f.guid++);var k=c.match(/^(\w+)\s*(.*)$/),l=k[1]+j.eventNamespace;(k=k[2])?d.delegate(k,l,h):b.bind(l,h)})},_off:function(a,b){b=(b||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;a.unbind(b).undelegate(b)},_delay:function(a,b){var c= this;return setTimeout(function(){return("string"==typeof a?c[a]:a).apply(c,arguments)},b||0)},_hoverable:function(a){this.hoverable=this.hoverable.add(a);this._on(a,{mouseenter:function(a){f(a.currentTarget).addClass("ui-state-hover")},mouseleave:function(a){f(a.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(a){this.focusable=this.focusable.add(a);this._on(a,{focusin:function(a){f(a.currentTarget).addClass("ui-state-focus")},focusout:function(a){f(a.currentTarget).removeClass("ui-state-focus")}})}, _trigger:function(a,b,c){var d,j=this.options[a];c=c||{};b=f.Event(b);b.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();b.target=this.element[0];if(a=b.originalEvent)for(d in a)d in b||(b[d]=a[d]);return this.element.trigger(b,c),!(f.isFunction(j)&&!1===j.apply(this.element[0],[b].concat(c))||b.isDefaultPrevented())}};f.each({show:"fadeIn",hide:"fadeOut"},function(a,b){f.Widget.prototype["_"+a]=function(c,d,j){"string"==typeof d&&(d={effect:d});var g,e=d?!0===d||"number"== typeof d?b:d.effect||b:a;d=d||{};"number"==typeof d&&(d={duration:d});g=!f.isEmptyObject(d);d.complete=j;d.delay&&c.delay(d.delay);g&&f.effects&&(f.effects.effect[e]||!1!==f.uiBackCompat&&f.effects[e])?c[a](d):e!==a&&c[e]?c[e](d.duration,d.easing,j):c.queue(function(b){f(this)[a]();j&&j.call(c[0]);b()})}});!1!==f.uiBackCompat&&(f.Widget.prototype._getCreateOptions=function(){return f.metadata&&f.metadata.get(this.element[0])[this.widgetName]})}catch(db){System.out.println("coremenu failed to load jQuery.ui.widget -- jQuery version conflict?")}if(!jQuery.ui.mouse)try{var q= jQuery,D=!1;q(document).mouseup(function(){D=!1});q.widget("ui.mouse",{version:"1.9.2",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(b){return a._mouseDown(b)}).bind("click."+this.widgetName,function(b){if(!0===q.data(b.target,a.widgetName+".preventClickEvent"))return q.removeData(b.target,a.widgetName+".preventClickEvent"),b.stopImmediatePropagation(),!1});this.started=!1},_mouseDestroy:function(){this.element.unbind("."+ this.widgetName);this._mouseMoveDelegate&&q(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(a){if(!D){this._mouseStarted&&this._mouseUp(a);this._mouseDownEvent=a;var b=this,c=1===a.which,d="string"==typeof this.options.cancel&&a.target.nodeName?q(a.target).closest(this.options.cancel).length:!1;if(!c||d||!this._mouseCapture(a))return!0;(this.mouseDelayMet=!this.options.delay)||(this._mouseDelayTimer= setTimeout(function(){b.mouseDelayMet=!0},this.options.delay));return this._mouseDistanceMet(a)&&this._mouseDelayMet(a)&&(this._mouseStarted=!1!==this._mouseStart(a),!this._mouseStarted)?(a.preventDefault(),!0):(!0===q.data(a.target,this.widgetName+".preventClickEvent")&&q.removeData(a.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(a){return b._mouseMove(a)},this._mouseUpDelegate=function(a){return b._mouseUp(a)},q(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+ this.widgetName,this._mouseUpDelegate),a.preventDefault(),D=!0,!0)}},_mouseMove:function(a){return!q.ui.ie||9<=document.documentMode||a.button?this._mouseStarted?(this._mouseDrag(a),a.preventDefault()):(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,a),this._mouseStarted?this._mouseDrag(a):this._mouseUp(a)),!this._mouseStarted):this._mouseUp(a)},_mouseUp:function(a){return q(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+ this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,a.target===this._mouseDownEvent.target&&q.data(a.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(a)),!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}catch(eb){System.out.println("coremenu failed to load jQuery.ui.mouse -- jQuery version conflict?")}if(!jQuery.ui.position)try{var h= jQuery,W=function(a,b,c){return[parseInt(a[0],10)*(V.test(a[0])?b/100:1),parseInt(a[1],10)*(V.test(a[1])?c/100:1)]};h.ui=h.ui||{};var E,A=Math.max,r=Math.abs,X=Math.round,Y=/left|center|right/,Z=/top|center|bottom/,$=/[\+\-]\d+%?/,aa=/^\w+/,V=/%$/,ja=h.fn.position;h.position={scrollbarWidth:function(){if(void 0!==E)return E;var a,b,c=h("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),d=c.children()[0];return h("body").append(c), a=d.offsetWidth,c.css("overflow","scroll"),b=d.offsetWidth,a===b&&(b=c[0].clientWidth),c.remove(),E=a-b},getScrollInfo:function(a){var b=a.isWindow?"":a.element.css("overflow-x"),c=a.isWindow?"":a.element.css("overflow-y"),c="scroll"===c||"auto"===c&&a.height<a.element[0].scrollHeight;return{width:"scroll"===b||"auto"===b&&a.width<a.element[0].scrollWidth?h.position.scrollbarWidth():0,height:c?h.position.scrollbarWidth():0}},getWithinInfo:function(a){a=h(a||window);var b=h.isWindow(a[0]);return{element:a, isWindow:b,offset:a.offset()||{left:0,top:0},scrollLeft:a.scrollLeft(),scrollTop:a.scrollTop(),width:b?a.width():a.outerWidth(),height:b?a.height():a.outerHeight()}}};h.fn.position=function(a){if(!a||!a.of)return ja.apply(this,arguments);a=h.extend({},a);var b,c,d,j,g,e=h(a.of),f=h.position.getWithinInfo(a.within),k=h.position.getScrollInfo(f),l=e[0],m=(a.collision||"flip").split(" "),q={};return 9===l.nodeType?(c=e.width(),d=e.height(),j={top:0,left:0}):h.isWindow(l)?(c=e.width(),d=e.height(),j= {top:e.scrollTop(),left:e.scrollLeft()}):l.preventDefault?(a.at="left top",c=d=0,j={top:l.pageY,left:l.pageX}):(c=e.outerWidth(),d=e.outerHeight(),j=e.offset()),g=h.extend({},j),h.each(["my","at"],function(){var b=(a[this]||"").split(" "),c,d;1===b.length&&(b=Y.test(b[0])?b.concat(["center"]):Z.test(b[0])?["center"].concat(b):["center","center"]);b[0]=Y.test(b[0])?b[0]:"center";b[1]=Z.test(b[1])?b[1]:"center";c=$.exec(b[0]);d=$.exec(b[1]);q[this]=[c?c[0]:0,d?d[0]:0];a[this]=[aa.exec(b[0])[0],aa.exec(b[1])[0]]}), 1===m.length&&(m[1]=m[0]),"right"===a.at[0]?g.left+=c:"center"===a.at[0]&&(g.left+=c/2),"bottom"===a.at[1]?g.top+=d:"center"===a.at[1]&&(g.top+=d/2),b=W(q.at,c,d),g.left+=b[0],g.top+=b[1],this.each(function(){var l,R,n=h(this),v=n.outerWidth(),w=n.outerHeight(),s=parseInt(h.css(this,"marginLeft"),10)||0,u=parseInt(h.css(this,"marginTop"),10)||0,x=v+s+(parseInt(h.css(this,"marginRight"),10)||0)+k.width,y=w+u+(parseInt(h.css(this,"marginBottom"),10)||0)+k.height,p=h.extend({},g),t=W(q.my,n.outerWidth(), n.outerHeight());"right"===a.my[0]?p.left-=v:"center"===a.my[0]&&(p.left-=v/2);"bottom"===a.my[1]?p.top-=w:"center"===a.my[1]&&(p.top-=w/2);p.left+=t[0];p.top+=t[1];h.support.offsetFractions||(p.left=X(p.left),p.top=X(p.top));l={marginLeft:s,marginTop:u};h.each(["left","top"],function(e,j){h.ui.position[m[e]]&&h.ui.position[m[e]][j](p,{targetWidth:c,targetHeight:d,elemWidth:v,elemHeight:w,collisionPosition:l,collisionWidth:x,collisionHeight:y,offset:[b[0]+t[0],b[1]+t[1]],my:a.my,at:a.at,within:f, elem:n})});h.fn.bgiframe&&n.bgiframe();a.using&&(R=function(b){var g=j.left-p.left,f=g+c-v,h=j.top-p.top,l=h+d-w,k={target:{element:e,left:j.left,top:j.top,width:c,height:d},element:{element:n,left:p.left,top:p.top,width:v,height:w},horizontal:0>f?"left":0<g?"right":"center",vertical:0>l?"top":0<h?"bottom":"middle"};c<v&&r(g+f)<c&&(k.horizontal="center");d<w&&r(h+l)<d&&(k.vertical="middle");A(r(g),r(f))>A(r(h),r(l))?k.important="horizontal":k.important="vertical";a.using.call(this,b,k)});n.offset(h.extend(p, {using:R}))})};h.ui.position={fit:{left:function(a,b){var c=b.within,d=c.isWindow?c.scrollLeft:c.offset.left,c=c.width,e=a.left-b.collisionPosition.marginLeft,g=d-e,f=e+b.collisionWidth-c-d,h;b.collisionWidth>c?0<g&&0>=f?(h=a.left+g+b.collisionWidth-c-d,a.left+=g-h):0<f&&0>=g?a.left=d:g>f?a.left=d+c-b.collisionWidth:a.left=d:0<g?a.left+=g:0<f?a.left-=f:a.left=A(a.left-e,a.left)},top:function(a,b){var c=b.within,c=c.isWindow?c.scrollTop:c.offset.top,d=b.within.height,e=a.top-b.collisionPosition.marginTop, g=c-e,f=e+b.collisionHeight-d-c,h;b.collisionHeight>d?0<g&&0>=f?(h=a.top+g+b.collisionHeight-d-c,a.top+=g-h):0<f&&0>=g?a.top=c:g>f?a.top=c+d-b.collisionHeight:a.top=c:0<g?a.top+=g:0<f?a.top-=f:a.top=A(a.top-e,a.top)}},flip:{left:function(a,b){var c=b.within,d=c.offset.left+c.scrollLeft,e=c.width,g=c.isWindow?c.scrollLeft:c.offset.left,f=a.left-b.collisionPosition.marginLeft,c=f-g,h=f+b.collisionWidth-e-g,f="left"===b.my[0]?-b.elemWidth:"right"===b.my[0]?b.elemWidth:0,k="left"===b.at[0]?b.targetWidth: "right"===b.at[0]?-b.targetWidth:0,l=-2*b.offset[0];if(0>c){if(d=a.left+f+k+l+b.collisionWidth-e-d,0>d||d<r(c))a.left+=f+k+l}else if(0<h&&(d=a.left-b.collisionPosition.marginLeft+f+k+l-g,0<d||r(d)<h))a.left+=f+k+l},top:function(a,b){var c=b.within,d=c.offset.top+c.scrollTop,e=c.height,c=c.isWindow?c.scrollTop:c.offset.top,f=a.top-b.collisionPosition.marginTop,h=f-c,f=f+b.collisionHeight-e-c,k="top"===b.my[1]?-b.elemHeight:"bottom"===b.my[1]?b.elemHeight:0,l="top"===b.at[1]?b.targetHeight:"bottom"=== b.at[1]?-b.targetHeight:0,m=-2*b.offset[1],n,q;0>h?(q=a.top+k+l+m+b.collisionHeight-e-d,a.top+k+l+m>h&&(0>q||q<r(h))&&(a.top+=k+l+m)):0<f&&(n=a.top-b.collisionPosition.marginTop+k+l+m-c,a.top+k+l+m>f&&(0<n||r(n)<f)&&(a.top+=k+l+m))}},flipfit:{left:function(){h.ui.position.flip.left.apply(this,arguments);h.ui.position.fit.left.apply(this,arguments)},top:function(){h.ui.position.flip.top.apply(this,arguments);h.ui.position.fit.top.apply(this,arguments)}}};var s,y,t,F,G,H=document.getElementsByTagName("body")[0], I=document.createElement("div");s=document.createElement(H?"div":"body");t={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};H&&h.extend(t,{position:"absolute",left:"-1000px",top:"-1000px"});for(G in t)s.style[G]=t[G];s.appendChild(I);y=H||document.documentElement;y.insertBefore(s,y.firstChild);I.style.cssText="position: absolute; left: 10.7432222px;";F=h(I).offset().left;h.support.offsetFractions=10<F&&11>F;s.innerHTML="";y.removeChild(s);if(!1!==h.uiBackCompat){var K=jQuery, ba=K.fn.position;K.fn.position=function(a){if(!a||!a.offset)return ba.call(this,a);var b=a.offset.split(" "),c=a.at.split(" ");return 1===b.length&&(b[1]=b[0]),/^\d/.test(b[0])&&(b[0]="+"+b[0]),/^\d/.test(b[1])&&(b[1]="+"+b[1]),1===c.length&&(/left|center|right/.test(c[0])?c[1]="center":(c[1]=c[0],c[0]="center")),ba.call(this,K.extend(a,{at:c[0]+b[0]+" "+c[1]+b[1],offset:void 0}))}}}catch(fb){System.out.println("coremenu failed to load jQuery.ui.position -- jQuery version conflict?")}if(!jQuery.ui.menu)try{var k= jQuery,L=!1;k.widget("ui.menu",{version:"1.9.2",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element;this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,k.proxy(function(a){this.options.disabled&& a.preventDefault()},this));this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true");this._on({"mousedown .ui-menu-item > a":function(a){a.preventDefault()},"click .ui-state-disabled > a":function(a){a.preventDefault()},"click .ui-menu-item:has(a)":function(a){var b=k(a.target).closest(".ui-menu-item");!L&&b.not(".ui-state-disabled").length&&(L=!0,this.select(a),b.has(".ui-menu").length?this.expand(a):this.element.is(":focus")||(this.element.trigger("focus",[!0]), this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(a){var b=k(a.currentTarget);b.siblings().children(".ui-state-active").removeClass("ui-state-active");this.focus(a,b)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(a,b){var c=this.active||this.element.children(".ui-menu-item").eq(0);b||this.focus(a,c)},blur:function(a){this._delay(function(){k.contains(this.element[0],this.document[0].activeElement)|| this.collapseAll(a)})},keydown:"_keydown"});this.refresh();this._on(this.document,{click:function(a){k(a.target).closest(".ui-menu").length||this.collapseAll(a);L=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").andSelf().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(); this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var a=k(this);a.data("ui-menu-submenu-carat")&&a.remove()});this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(a){function b(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&")}var c,d,e,f,h=!0;switch(a.keyCode){case k.ui.keyCode.PAGE_UP:this.previousPage(a);break;case k.ui.keyCode.PAGE_DOWN:this.nextPage(a);break;case k.ui.keyCode.HOME:this._move("first","first",a);break;case k.ui.keyCode.END:this._move("last","last",a);break;case k.ui.keyCode.UP:this.previous(a);break;case k.ui.keyCode.DOWN:this.next(a);break;case k.ui.keyCode.LEFT:this.collapse(a);break;case k.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(a);break;case k.ui.keyCode.ENTER:case k.ui.keyCode.SPACE:this._activate(a); break;case k.ui.keyCode.ESCAPE:this.collapse(a);break;default:h=!1,c=this.previousFilter||"",d=String.fromCharCode(a.keyCode),e=!1,clearTimeout(this.filterTimer),d===c?e=!0:d=c+d,f=RegExp("^"+b(d),"i"),c=this.activeMenu.children(".ui-menu-item").filter(function(){return f.test(k(this).children("a").text())}),c=e&&-1!==c.index(this.active.next())?this.active.nextAll(".ui-menu-item"):c,c.length||(d=String.fromCharCode(a.keyCode),f=RegExp("^"+b(d),"i"),c=this.activeMenu.children(".ui-menu-item").filter(function(){return f.test(k(this).children("a").text())})), c.length?(this.focus(a,c),1<c.length?(this.previousFilter=d,this.filterTimer=this._delay(function(){delete this.previousFilter},1E3)):delete this.previousFilter):delete this.previousFilter}h&&a.preventDefault()},_activate:function(a){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(a):this.select(a))},refresh:function(){var a,b=this.options.icons.submenu;a=this.element.find(this.options.menus);a.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role, "aria-hidden":"true","aria-expanded":"false"}).each(function(){var a=k(this),d=a.prev("a"),e=k("<span>").addClass("ui-menu-icon ui-icon "+b).data("ui-menu-submenu-carat",!0);d.attr("aria-haspopup","true").prepend(e);a.attr("aria-labelledby",d.attr("id"))});a=a.add(this.element);a.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()});a.children(":not(.ui-menu-item)").each(function(){var a= k(this);/[^\-\u00e2\u20ac\u201d\u00e2\u20ac\u201c\s]/.test(a.text())||a.addClass("ui-widget-content ui-menu-divider")});a.children(".ui-state-disabled").attr("aria-disabled","true");this.active&&!k.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},focus:function(a,b){var c;this.blur(a,a&&"focus"===a.type);this._scrollIntoView(b);this.active=b.first();c=this.active.children("a").addClass("ui-state-focus");this.options.role&& this.element.attr("aria-activedescendant",c.attr("id"));this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active");a&&"keydown"===a.type?this._close():this.timer=this._delay(function(){this._close()},this.delay);c=b.children(".ui-menu");c.length&&/^mouse/.test(a.type)&&this._startOpening(c);this.activeMenu=b.parent();this._trigger("focus",a,{item:b})},_scrollIntoView:function(a){var b,c,d,e,f,h;this._hasScroll()&&(b=parseFloat(k.css(this.activeMenu[0],"borderTopWidth"))|| 0,c=parseFloat(k.css(this.activeMenu[0],"paddingTop"))||0,d=a.offset().top-this.activeMenu.offset().top-b-c,e=this.activeMenu.scrollTop(),f=this.activeMenu.height(),h=a.height(),0>d?this.activeMenu.scrollTop(e+d):d+h>f&&this.activeMenu.scrollTop(e+d-f+h))},blur:function(a,b){b||clearTimeout(this.timer);this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",a,{item:this.active}))},_startOpening:function(a){clearTimeout(this.timer);"true"===a.attr("aria-hidden")&& (this.timer=this._delay(function(){this._close();this._open(a)},this.delay))},_open:function(a){var b=k.extend({of:this.active},this.options.position);clearTimeout(this.timer);this.element.find(".ui-menu").not(a.parents(".ui-menu")).hide().attr("aria-hidden","true");a.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(b)},collapseAll:function(a,b){clearTimeout(this.timer);this.timer=this._delay(function(){var c=b?this.element:k(a&&a.target).closest(this.element.find(".ui-menu")); c.length||(c=this.element);this._close(c);this.blur(a);this.activeMenu=c},this.delay)},_close:function(a){a||(a=this.active?this.active.parent():this.element);a.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(a){var b=this.active&&this.active.parent().closest(".ui-menu-item",this.element);b&&b.length&&(this._close(),this.focus(a,b))},expand:function(a){var b=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first(); b&&b.length&&(this._open(b.parent()),this._delay(function(){this.focus(a,b)}))},next:function(a){this._move("next","first",a)},previous:function(a){this._move("prev","last",a)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(a,b,c){var d;this.active&&("first"===a||"last"===a?d=this.active["first"===a?"prevAll":"nextAll"](".ui-menu-item").eq(-1):d=this.active[a+ "All"](".ui-menu-item").eq(0));if(!d||!d.length||!this.active)d=this.activeMenu.children(".ui-menu-item")[b]();this.focus(c,d)},nextPage:function(a){var b,c,d;this.active?this.isLastItem()||(this._hasScroll()?(c=this.active.offset().top,d=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return b=k(this),0>b.offset().top-c-d}),this.focus(a,b)):this.focus(a,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())):this.next(a)},previousPage:function(a){var b, c,d;this.active?this.isFirstItem()||(this._hasScroll()?(c=this.active.offset().top,d=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return b=k(this),0<b.offset().top-c+d}),this.focus(a,b)):this.focus(a,this.activeMenu.children(".ui-menu-item").first())):this.next(a)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(a){this.active=this.active||k(a.target).closest(".ui-menu-item");var b={item:this.active};this.active.has(".ui-menu").length|| this.collapseAll(a,!0);this._trigger("select",a,b)}})}catch(gb){System.out.println("JSmolMenu failed to load jQuery.ui.menu -- jQuery version conflict?")}var m=Jmol.Swing;m.menuInitialized||(m.menuCounter=0,m.menuInitialized=1,m.__getMenuStyle=function(a){return"\t.jmolPopupMenu{font-family:Arial,sans-serif;font-size:11px;position:absolute;z-index:"+Jmol._getZ(a,"menu")+'}\t.jmolPopupMenu,.jmolPopupMenu .ui-corner-all{border-radius:5px}\t.jmolPopupMenu,.jmolPopupMenu .ui-widget-content{border:1px solid #a6c9e2;background-color:#fcfdfd;color:#222}\t.jmolPopupMenu a{color:#222;font-size:10px;}\t.jmolPopupMenu input[type="checkbox"]{vertical-align:middle;}\t.jmolPopupMenu,.jmolPopupMenu .ui-menu{list-style:none;padding:2px;margin:0;display:block;outline:none;box-shadow:1px 1px 5px rgba(50,50,50,0.75)}\t.jmolPopupMenu .ui-menu{margin-top:-3px;position:absolute}\t.jmolPopupMenu .ui-menu-item{cursor:pointer;margin:0 2ex 0 0;padding:0;width:100%}\t.jmolPopupMenu .ui-menu-divider{margin:3px 1px;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}\t.jmolPopupMenu .ui-menu-item a{text-decoration:none;display:block;padding:0.05em 0.4em;white-space:nowrap;border:1px solid transparent}\t.jmolPopupMenu .ui-menu-icons{position:relative}\t.jmolPopupMenu .ui-menu-icons .ui-menu-item a{position:relative;padding-left:2em}\t.jmolPopupMenu .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat;position:absolute;top:.2em;left:.2em}\t.jmolPopupMenu .ui-menu-icon{position:static;float:right}\t.jmolPopupMenu .ui-icon-carat-1-e{min-width:2ex;text-align:right;background-image:none;background-position:0 0}\t.jmolPopupMenu .ui-icon-carat-1-e:after{content:"\\25B8"}\t.jmolPopupMenu .ui-state-default{border:1px solid #c5dbec;background:#dfeffc;color:#2e6e9e}\t.jmolPopupMenu .ui-state-default a{color:#2e6e9e;text-decoration:none}\t.jmolPopupMenu .ui-state-hover,.jmolPopupMenu .ui-state-focus{border:1px solid #79b7e7;background:#d0e5f5;color:#1d5987}\t.jmolPopupMenu .ui-state-hover a{color:#1d5987;text-decoration:none}\t.jmolPopupMenu .ui-state-active{border:1px solid #79b7e7;background:#f5f8f9;color:#e17009}\t.jmolPopupMenu .ui-state-active a{color:#e17009;text-decoration:none}\t.jmolPopupMenu .ui-state-highlight{border:1px solid #fad42e;background:#fbec88;color:#363636}\t.jmolPopupMenu .ui-state-highlight a{color:#363636}\t.jmolPopupMenu .ui-state-disabled *{color:#d6d6d6!important;font-weight:normal;cursor:default}\t.jmolPopupMenu .ui-state-disabled a:hover{background-color:transparent!important;border-color:transparent!important}\t.jmolPopupMenu .ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}'}, m.setMenu=function(a){m.__getMenuStyle&&Jmol.$after("head","<style>"+m.__getMenuStyle(a.applet)+"</style>");m.__getStyle=null;a.tainted=!0;a.popupMenu=a;a.id="top";a.id=m.getMenuID(a);a.applet._menus||(a.applet._menus={});a.applet._menus[a.name]=a;Jmol.$after("body",'<ul id="'+a.id+'" class="jmolPopupMenu"></ul>');a.setContainer(Jmol.$("#"+a.id))},m.showMenu=function(a,b,c){Jmol._showMenuCallback&&Jmol._showMenuCallback(a,b,c);a.tainted&&(a.container.html(a.toHTML()),a.tainted=!1,m.bindMenuActionCommands(a, !0));a.setPosition();a.container.hide().menu().menu("refresh").show();a.visible=!0;a.timestamp=System.currentTimeMillis();a.dragBind(!0);a.container.unbind("clickoutjsmol");a.container.bind("clickoutjsmol mousemoveoutjsmol",function(){1E3<System.currentTimeMillis()-a.timestamp&&m.hideMenu(a)});a.container.bind("contextmenu",function(){return!1})},m.disposeMenu=function(a){m.hideMenu(a);m.bindMenuActionCommands(a,!1);delete a.applet._menus[a.name]},m.initMenuItem=function(a){a.applet=a.popupMenu.applet; a.id=m.getMenuID(a);a.icon&&(a.icon='<img src="'+a.applet._j2sPath+"/"+a.icon+'" style="max-height: 20px;" />')},m.getMenuID=function(a){var b=a.popupMenu;return b.applet._id+"_"+b.name+"_"+a.id+"_"+ ++m.menuCounter},m.hideMenu=function(a){a.visible&&(a.dragBind(!1),a.container.hide(),a.visible=a.isDragging=!1)},m.bindMenuActionCommands=function(a,b){for(var c=a.getComponentCount(),d=0;d<c;d++)m.bindMenuActionCommands(a.getComponent(d),b);Jmol.$documentOff("click",a.id);b&&Jmol.$documentOn("click", a.id,function(){a.itemListener?(a.selected=a.btnType==javajs.swing.JMenuItem.TYPE_CHECKBOX?Jmol.$prop(a.id+"-cb","checked"):!0,m.hideMenus(a.applet),a.itemListener.itemStateChanged({getSource:function(){return a}})):a.actionListener&&(m.hideMenus(a.applet),a.actionListener.actionPerformed({getSource:function(){return a},getActionCommand:function(){return a.actionCommand}}))})});u("javajs.api");O(javajs.api,"GenericMenuInterface");u("JSV.api");x(["javajs.api.GenericMenuInterface"],"JSV.api.JSVPopupMenu", null,function(){O(JSV.api,"JSVPopupMenu",javajs.api.GenericMenuInterface)});u("JSV.js2d");x(["JSV.popup.JSVGenericPopup"],"JSV.js2d.JsPopup",["JSV.popup.JSVPopupResourceBundle","J.popup.JSSwingPopupHelper"],function(){c$=N(JSV.js2d,"JsPopup",JSV.popup.JSVGenericPopup);B(c$,function(){C(this,JSV.js2d.JsPopup,[]);this.helper=new J.popup.JSSwingPopupHelper(this)});l(c$,"jpiInitialize",function(a,b){var c=new JSV.popup.JSVPopupResourceBundle;this.initialize(a,c,b)},"javajs.api.PlatformViewer,~S");l(c$, "menuShowPopup",function(a,b,c){try{a.show(this.isTainted?this.vwr.getApplet():null,b,c)}catch(d){if(!ea(d,Exception))throw d;}},"javajs.api.SC,~N,~N");l(c$,"getImageIcon",function(){return null},"~S");l(c$,"menuFocusCallback",function(){},"~S,~S,~B")});u("JSV.popup");x(["JSV.api.JSVPopupMenu","J.popup.GenericSwingPopup"],"JSV.popup.JSVGenericPopup",["JU.PT","JSV.common.JSVersion","JSV.popup.JSVPopupResourceBundle"],function(){c$=da(function(){this.vwr=null;this.updateMode=0;this.hnmrPeaks=this.cnmrPeaks= null;this.aboutComputedMenuBaseCount=0;this.zoomEnabled=this.allowMenu=!1;this.thisJsvp=this.pd=null;ca(this,arguments)},JSV.popup,"JSVGenericPopup",J.popup.GenericSwingPopup,JSV.api.JSVPopupMenu);B(c$,function(){C(this,JSV.popup.JSVGenericPopup,[])});n(c$,"initialize",function(a,b,c){this.vwr=a;this.initSwing(c,b,a.getApplet(),a.isJS,a.isSigned,!1)},"JSV.common.JSViewer,J.popup.PopupResource,~S");l(c$,"jpiDispose",function(){this.helper.menuClearListeners(this.popupMenu);this.popupMenu=this.thisPopup= null});l(c$,"jpiGetMenuAsObject",function(){return this.popupMenu});l(c$,"jpiShow",function(a,b){this.show(a,b,!1);this.appRestorePopupMenu();this.menuShowPopup(this.popupMenu,this.thisx,this.thisy)},"~N,~N");l(c$,"jpiUpdateComputedMenus",function(){-1!=this.updateMode&&(this.updateMode=0,this.getViewerData(),this.updateFileMenu(),this.updateFileTypeDependentMenus(),this.updateMode=1,this.updateAboutSubmenu())});l(c$,"appCheckItem",function(){},"~S,javajs.api.SC");l(c$,"appCheckSpecialMenu",function(){}, "~S,javajs.api.SC,~S");l(c$,"appFixLabel",function(a){a.startsWith("_")?a=a.substring(a.indexOf("_",2)+1):a.equals("VERSION")&&(a=JSV.common.JSVersion.VERSION);a=JU.PT.rep(a,"JAVA","");a=JU.PT.rep(a,"CB","");a=JU.PT.rep(a,"Menu","");return a=JU.PT.rep(a,"_"," ")},"~S");l(c$,"appFixScript",function(a,b){return b},"~S,~S");l(c$,"appGetMenuAsString",function(a){return(new JSV.popup.JSVPopupResourceBundle).getMenuAsText(a)},"~S");l(c$,"appGetBooleanProperty",function(){return!1},"~S");l(c$,"appIsSpecialCheckBox", function(){return!1},"javajs.api.SC,~S,~S,~B");l(c$,"appRestorePopupMenu",function(){this.thisPopup=this.popupMenu});l(c$,"appRunScript",function(a){this.vwr.runScript(a)},"~S");l(c$,"appUpdateForShow",function(){this.thisJsvp=this.vwr.selectedPanel;this.setEnables(this.thisJsvp);-1!=this.updateMode&&(this.getViewerData(),this.updateMode=2,this.updateSpectraMenu(),this.updateAboutSubmenu())});l(c$,"appUpdateSpecialCheckBoxValue",function(){},"javajs.api.SC,~S,~B");n(c$,"getViewerData",function(){}); n(c$,"updateFileTypeDependentMenus",function(){});n(c$,"updateFileMenu",function(){this.htMenus.get("fileMenu")});n(c$,"updateSpectraMenu",function(){var a=this.htMenus.get("hnmrMenu"),b=this.htMenus.get("cnmrMenu");null!=a&&this.menuRemoveAll(a,0);null!=b&&this.menuRemoveAll(b,0);var c=this.htMenus.get("spectraMenu");if(null!=c){this.menuRemoveAll(c,0);var d=(new Boolean(this.setSpectraMenu(a,this.hnmrPeaks)|this.setSpectraMenu(b,this.cnmrPeaks))).valueOf();d&&(null!=a&&this.menuAddSubMenu(c,a), null!=b&&this.menuAddSubMenu(c,b));this.menuEnable(c,d)}});n(c$,"setSpectraMenu",function(a,b){if(null==a)return!1;this.menuEnable(a,!1);var c=null==b?0:b.size();if(0==c)return!1;for(var d=0;d<c;d++){var e=b.get(d),f=JU.PT.getQuotedAttribute(e,"title"),e=JU.PT.getQuotedAttribute(e,"atoms");null!=e&&this.menuCreateItem(a,f,"select visible & (@"+JU.PT.rep(e,","," or @")+")","Focus"+d)}this.menuEnable(a,!0);return!0},"javajs.api.SC,JU.Lst");n(c$,"updateAboutSubmenu",function(){var a=this.htMenus.get("aboutComputedMenu"); null!=a&&this.menuRemoveAll(a,this.aboutComputedMenuBaseCount)});l(c$,"getSelected",function(){return!1},"~S");l(c$,"setCompoundMenu",function(){},"JU.Lst,~B");l(c$,"setEnabled",function(a,b){this.allowMenu=a;this.zoomEnabled=b;this.enableMenus()},"~B,~B");n(c$,"enableMenus",function(){this.setItemEnabled("_SIGNED_FileMenu",this.allowMenu);this.setItemEnabled("ViewMenu",null!=this.pd&&this.allowMenu);this.setItemEnabled("Open_File...",this.allowMenu);this.setItemEnabled("Open_Simulation...",this.allowMenu); this.setItemEnabled("Open_URL...",this.allowMenu);this.setItemEnabled("Save_AsMenu",null!=this.pd&&this.allowMenu);this.setItemEnabled("Export_AsMenu",null!=this.pd&&this.allowMenu);this.setItemEnabled("Append_File...",null!=this.pd&&this.allowMenu);this.setItemEnabled("Append_Simulation...",null!=this.pd&&this.allowMenu);this.setItemEnabled("Append_URL...",null!=this.pd&&this.allowMenu);this.setItemEnabled("Views...",null!=this.pd&&this.allowMenu);this.setItemEnabled("Script",this.allowMenu);this.setItemEnabled("Print...", null!=this.pd&&this.allowMenu);this.setItemEnabled("ZoomMenu",null!=this.pd&&this.zoomEnabled)});n(c$,"setEnables",function(a){this.pd=null==a?null:a.getPanelData();a=null==this.pd?null:this.pd.getSpectrum();var b=null!=this.pd&&this.pd.isShowAllStacked(),c=null!=this.pd&&this.pd.haveSelectedSpectrum();this.setItemEnabled("Integration",null!=this.pd&&this.pd.getSpectrum().canIntegrate());this.setItemEnabled("Measurements",!0);this.setItemEnabled("Peaks",null!=this.pd&&this.pd.getSpectrum().is1D()); this.setItemEnabled("Predicted_Solution_Colour_(fitted)",c&&a.canShowSolutionColor());this.setItemEnabled("Predicted_Solution_Colour_(interpolated)",c&&a.canShowSolutionColor());this.setItemEnabled("Toggle_Trans/Abs",c&&a.canConvertTransAbs());this.setItemEnabled("Show_Overlay_Key",b&&1==this.pd.getNumberOfGraphSets());this.setItemEnabled("Overlay_Offset...",b);this.setItemEnabled("JDXMenu",null!=this.pd&&a.canSaveAsJDX());this.setItemEnabled("Export_AsMenu",null!=this.pd);this.enableMenus()},"JSV.api.JSVPanel"); n(c$,"setItemEnabled",function(a,b){this.menuEnable(this.htMenus.get(a),b)},"~S,~B");l(c$,"setSelected",function(a,b){var c=this.htMenus.get(a);null==c||c.isSelected()==b||(this.menuEnable(c,!1),c.setSelected(b),this.menuEnable(c,!0))},"~S,~B");l(c$,"menuSetCheckBoxOption",function(){return null},"javajs.api.SC,~S,~S");M(c$,"dumpList",!1,"UPDATE_NEVER",-1,"UPDATE_ALL",0,"UPDATE_CONFIG",1,"UPDATE_SHOW",2)});u("JSV.popup");x(["J.popup.PopupResource"],"JSV.popup.JSVPopupResourceBundle",null,function(){c$= N(JSV.popup,"JSVPopupResourceBundle",J.popup.PopupResource);l(c$,"getMenuName",function(){return"appMenu"});B(c$,function(){C(this,JSV.popup.JSVPopupResourceBundle,[null,null])});l(c$,"buildStructure",function(a){this.addItems(JSV.popup.JSVPopupResourceBundle.menuContents);this.addItems(JSV.popup.JSVPopupResourceBundle.structureContents);null!=a&&this.setStructure(a,null)},"~S");l(c$,"getWordContents",function(){return[]});l(c$,"getMenuAsText",function(a){return this.getStuctureAsText(a,JSV.popup.JSVPopupResourceBundle.menuContents, JSV.popup.JSVPopupResourceBundle.structureContents)},"~S");M(c$,"menuContents",[["appMenu","_SIGNED_FileMenu Spectra... ShowMenu OptionsMenu ZoomMenu - Integration Peaks Measurements - Script... Properties"],["appletMenu","_SIGNED_FileMenu Spectra... - OptionsMenu ZoomMenu - Integration Peaks Measurements - Script... - Print... - AboutMenu"],["_SIGNED_FileMenu","Open_File... Open_Simulation... Open_URL... - Add_File... Add_Simulation... Add_URL... - Save_AsMenu Export_AsMenu - Close_Views Close_Simulations Close_All"], ["Save_AsMenu","Original... JDXMenu CML XML(AnIML)"],["JDXMenu","XY DIF DIFDUP FIX PAC SQZ"],["Export_AsMenu","PDF - JAVAJPG PNG"],["ShowMenu","Show_Header Show_Source Show_Overlay_Key"],["OptionsMenu","Toggle_Grid Toggle_X_Axis Toggle_Y_Axis Toggle_Coordinates Toggle_Trans/Abs Reverse_Plot - Predicted_Solution_Colour Fill_Solution_Colour_(all) Fill_Solution_Colour_(none)"],["ZoomMenu","Next_Zoom Previous_Zoom Reset_Zoom - Set_X_Scale... Reset_X_Scale"],["AboutMenu","VERSION"]],"structureContents", [["Open_File...","load ?"],["Open_URL...","load http://?"],["Open_Simulation...","load $?"],["Add_File...","load append ?"],["Add_URL...","load append http://?"],["Add_Simulation...",'load append $?; view "1HNMR"'],["Close_All","close all"],["Close_Views","close views"],["Close Simulations","close simulations"],["Show_Header","showProperties"],["Show_Source","showSource"],["Show_Overlay_Key...","showKey"],["Next_Zoom","zoom next;showMenu"],["Previous_Zoom","zoom prev;showMenu"],["Reset_Zoom","zoom clear"], ["Reset_X_Scale","zoom out"],["Set_X_Scale...","zoom"],["Spectra...","view"],["Overlay_Offset...","stackOffsetY"],["Script...","script INLINE"],["Properties","showProperties"],["Toggle_X_Axis","XSCALEON toggle;showMenu"],["Toggle_Y_Axis","YSCALEON toggle;showMenu"],["Toggle_Grid","GRIDON toggle;showMenu"],["Toggle_Coordinates","COORDINATESON toggle;showMenu"],["Reverse_Plot","REVERSEPLOT toggle;showMenu"],["Measurements","SHOWMEASUREMENTS"],["Peaks","SHOWPEAKLIST"],["Integration","SHOWINTEGRATION"], ["Toggle_Trans/Abs","IRMODE TOGGLE"],["Predicted_Solution_Colour","GETSOLUTIONCOLOR"],["Fill_Solution_Colour_(all)","GETSOLUTIONCOLOR fillall"],["Fill_Solution_Colour_(none)","GETSOLUTIONCOLOR fillallnone"],["Print...","print"],["Original...","write SOURCE"],["CML","write CML"],["XML(AnIML)","write XML"],["XY","write XY"],["DIF","write DIF"],["DIFDUP","write DIFDUP"],["FIX","write FIX"],["PAC","write PAC"],["SQZ","write SQZ"],["JPG","write JPG"],["SVG","write SVG"],["PNG","write PNG"],["PDF","write PDF"]])})})(Clazz, Clazz.newLongArray,Clazz.doubleToByte,Clazz.doubleToInt,Clazz.doubleToLong,Clazz.declarePackage,Clazz.instanceOf,Clazz.load,Clazz.instantialize,Clazz.decorateAsClass,Clazz.floatToInt,Clazz.makeConstructor,Clazz.defineEnumConstant,Clazz.exceptionOf,Clazz.newIntArray,Clazz.defineStatics,Clazz.newFloatArray,Clazz.declareType,Clazz.prepareFields,Clazz.superConstructor,Clazz.newByteArray,Clazz.declareInterface,Clazz.p0p,Clazz.pu$h,Clazz.newShortArray,Clazz.innerTypeInstance,Clazz.isClassDefined,Clazz.prepareCallback, Clazz.newArray,Clazz.castNullAs,Clazz.floatToShort,Clazz.superCall,Clazz.decorateAsType,Clazz.newBooleanArray,Clazz.newCharArray,Clazz.implementOf,Clazz.newDoubleArray,Clazz.overrideConstructor,Clazz.clone,Clazz.doubleToShort,Clazz.getInheritedLevel,Clazz.getParamsType,Clazz.isAF,Clazz.isAI,Clazz.isAS,Clazz.isASS,Clazz.isAP,Clazz.isAFloat,Clazz.isAII,Clazz.isAFF,Clazz.isAFFF,Clazz.tryToSearchAndExecute,Clazz.getStackTrace,Clazz.inheritArgs,Clazz.alert,Clazz.defineMethod,Clazz.overrideMethod,Clazz.declareAnonymous, Clazz.cloneFinals);