(function(r,s,t,u,v,w,f,x,g,l,m,y,z,h,A,n,B,C,k,D,j,E,p,F,G,H,I,a,K,L,q,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,aa,ba,ca,da,ea,fa,ga,ha,ia,c,b){f("J.api");p(J.api,"GenericMenuInterface");f("JSV.js2d");g(["JSV.popup.JSVGenericPopup"],"JSV.js2d.JsPopup",["JSV.popup.JSVPopupResourceBundle","J.awtjs2d.JSPopupHelper"],function(){var a=k(JSV.js2d,"JsPopup",JSV.popup.JSVGenericPopup);h(a,function(){j(this,JSV.js2d.JsPopup,[]);this.helper=new J.awtjs2d.JSPopupHelper(this)});b(a,"jpiInitialize",function(a,e){var d=
new JSV.popup.JSVPopupResourceBundle;this.initialize(a,d,e)},"J.api.PlatformViewer,~S");b(a,"menuShowPopup",function(a,e,d){try{a.show(this.isTainted?this.vwr.getApplet():null,e,d)}catch(b){if(!n(b,Exception))throw b;}},"J.api.SC,~N,~N");b(a,"getImageIcon",function(){return null},"~S");b(a,"menuFocusCallback",function(){},"~S,~S,~B")});f("JSV.popup");g(["J.popup.GenericPopup"],"JSV.popup.JSVGenericPopup",["JU.PT","JSV.common.JSVersion","$.JSViewer","JSV.popup.JSVPopupResourceBundle"],function(){var a=
m(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;l(this,arguments)},JSV.popup,"JSVGenericPopup",J.popup.GenericPopup);h(a,function(){j(this,JSV.popup.JSVGenericPopup,[])});c(a,"initialize",function(a,b,d){this.vwr=a;this.initSwing(d,b,a.getApplet(),JSV.common.JSViewer.isJS,a.isSigned,!1)},"JSV.common.JSViewer,J.popup.PopupResource,~S");c(a,"jpiDispose",function(){this.vwr=
null;q(this,JSV.popup.JSVGenericPopup,"jpiDispose",[])});b(a,"jpiGetMenuAsObject",function(){return this.popupMenu});b(a,"jpiShow",function(a,b){this.show(a,b,!1);this.appRestorePopupMenu();this.menuShowPopup(this.popupMenu,this.thisx,this.thisy)},"~N,~N");b(a,"jpiUpdateComputedMenus",function(){-1!=this.updateMode&&(this.updateMode=0,this.getViewerData(),this.updateFileMenu(),this.updateFileTypeDependentMenus(),this.updateMode=1,this.updateAboutSubmenu())});b(a,"appCheckItem",function(){},"~S,J.api.SC");
b(a,"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");b(a,"getScriptForCallback",function(a,b,d){return d},"J.api.SC,~S,~S");b(a,"appGetMenuAsString",function(a){return(new JSV.popup.JSVPopupResourceBundle).getMenuAsText(a)},"~S");b(a,"appGetBooleanProperty",function(){return!1},"~S");b(a,"appRunSpecialCheckBox",
function(){return!1},"J.api.SC,~S,~S,~B");b(a,"appRestorePopupMenu",function(){this.thisPopup=this.popupMenu});b(a,"appRunScript",function(a){this.vwr.runScript(a)},"~S");b(a,"appUpdateForShow",function(){this.thisJsvp=this.vwr.selectedPanel;this.setEnables(this.thisJsvp);-1!=this.updateMode&&(this.getViewerData(),this.updateMode=2,this.updateSpectraMenu(),this.updateAboutSubmenu())});b(a,"appUpdateSpecialCheckBoxValue",function(){},"J.api.SC,~S,~B");c(a,"getViewerData",function(){});c(a,"updateFileTypeDependentMenus",
function(){});c(a,"updateFileMenu",function(){this.htMenus.get("fileMenu")});c(a,"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 d=this.htMenus.get("spectraMenu");if(null!=d){this.menuRemoveAll(d,0);var c=(new Boolean(this.setSpectraMenu(a,this.hnmrPeaks)|this.setSpectraMenu(b,this.cnmrPeaks))).valueOf();c&&(null!=a&&this.menuAddSubMenu(d,a),null!=b&&this.menuAddSubMenu(d,b));this.menuEnable(d,
c)}});c(a,"setSpectraMenu",function(a,b){if(null==a)return!1;this.menuEnable(a,!1);var d=null==b?0:b.size();if(0==d)return!1;for(var c=0;c<d;c++){var e=b.get(c),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"+c)}this.menuEnable(a,!0);return!0},"J.api.SC,JU.Lst");c(a,"updateAboutSubmenu",function(){var a=this.htMenus.get("aboutComputedMenu");null!=a&&this.menuRemoveAll(a,this.aboutComputedMenuBaseCount)});
c(a,"setEnabled",function(a,b){this.allowMenu=a;this.zoomEnabled=b;this.enableMenus()},"~B,~B");c(a,"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)});c(a,"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(),d=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)",d&&a.canShowSolutionColor());this.setItemEnabled("Predicted_Solution_Colour_(interpolated)",
d&&a.canShowSolutionColor());this.setItemEnabled("Toggle_Trans/Abs",d&&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");c(a,"setItemEnabled",function(a,b){this.menuEnable(this.htMenus.get(a),b)},"~S,~B");c(a,"setSelected",function(a,b){var d=this.htMenus.get(a);
null==d||d.isSelected()==b||(this.menuEnable(d,!1),d.setSelected(b),this.menuEnable(d,!0))},"~S,~B");b(a,"getUnknownCheckBoxScriptToRun",function(){return null},"J.api.SC,~S,~S,~B")});f("JSV.popup");g(["J.popup.PopupResource"],"JSV.popup.JSVPopupResourceBundle",null,function(){var c=k(JSV.popup,"JSVPopupResourceBundle",J.popup.PopupResource);h(c,function(){j(this,JSV.popup.JSVPopupResourceBundle,[null,null])});b(c,"getMenuName",function(){return"appMenu"});b(c,"buildStructure",function(a){this.addItems(JSV.popup.JSVPopupResourceBundle.menuContents);
this.addItems(JSV.popup.JSVPopupResourceBundle.structureContents);null!=a&&this.setStructure(a,null)},"~S");b(c,"getWordContents",function(){return a(-1,[])});b(c,"getMenuAsText",function(a){return this.getStuctureAsText(a,JSV.popup.JSVPopupResourceBundle.menuContents,JSV.popup.JSVPopupResourceBundle.structureContents)},"~S");c.menuContents=a(-1,[a(-1,["appMenu","_SIGNED_FileMenu Spectra... ShowMenu OptionsMenu ZoomMenu - Integration Peaks Measurements - Script... Properties"]),a(-1,["appletMenu",
"_SIGNED_FileMenu Spectra... - OptionsMenu ZoomMenu - Integration Peaks Measurements - Script... - Print... - AboutMenu"]),a(-1,["_SIGNED_FileMenu","Open_File... Open_Simulation... Open_URL... - Add_File... Add_Simulation... Add_URL... - Save_AsMenu Export_AsMenu - Close_Views Close_Simulations Close_All"]),a(-1,["Save_AsMenu","Original... JDXMenu CML XML(AnIML)"]),a(-1,["JDXMenu","XY DIF DIFDUP FIX PAC SQZ"]),a(-1,["Export_AsMenu","PDF - JPG PNG SVG"]),a(-1,["ShowMenu","Show_Header Show_Source Show_Overlay_Key"]),
a(-1,["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)"]),a(-1,["ZoomMenu","Next_Zoom Previous_Zoom Reset_Zoom - Set_X_Scale... Reset_X_Scale"]),a(-1,["AboutMenu","VERSION"])]);c.structureContents=a(-1,[a(-1,["Open_File...","load ?"]),a(-1,["Open_URL...","load http://?"]),a(-1,["Open_Simulation...","load $?"]),a(-1,["Add_File...","load append ?"]),a(-1,["Add_URL...",
"load append http://?"]),a(-1,["Add_Simulation...",'load append $?; view "1HNMR"']),a(-1,["Close_All","close all"]),a(-1,["Close_Views","close views"]),a(-1,["Close Simulations","close simulations"]),a(-1,["Show_Header","showProperties"]),a(-1,["Show_Source","showSource"]),a(-1,["Next_Zoom","zoom next;showMenu"]),a(-1,["Previous_Zoom","zoom prev;showMenu"]),a(-1,["Reset_Zoom","zoom clear"]),a(-1,["Reset_X_Scale","zoom out"]),a(-1,["Set_X_Scale...","zoom"]),a(-1,["Spectra...","view"]),a(-1,["Overlay_Offset...",
"stackOffsetY"]),a(-1,["Script...","script INLINE"]),a(-1,["Properties","showProperties"]),a(-1,["Toggle_X_Axis","XSCALEON toggle;showMenu"]),a(-1,["Toggle_Y_Axis","YSCALEON toggle;showMenu"]),a(-1,["Toggle_Grid","GRIDON toggle;showMenu"]),a(-1,["Toggle_Coordinates","COORDINATESON toggle;showMenu"]),a(-1,["Reverse_Plot","REVERSEPLOT toggle;showMenu"]),a(-1,["Measurements","SHOWMEASUREMENTS"]),a(-1,["Peaks","SHOWPEAKLIST"]),a(-1,["Integration","SHOWINTEGRATION"]),a(-1,["Toggle_Trans/Abs","IRMODE TOGGLE"]),
a(-1,["Predicted_Solution_Colour","GETSOLUTIONCOLOR"]),a(-1,["Fill_Solution_Colour_(all)","GETSOLUTIONCOLOR fillall"]),a(-1,["Fill_Solution_Colour_(none)","GETSOLUTIONCOLOR fillallnone"]),a(-1,["Print...","print"]),a(-1,["Original...","write SOURCE"]),a(-1,["CML","write CML"]),a(-1,["XML(AnIML)","write XML"]),a(-1,["XY","write XY"]),a(-1,["DIF","write DIF"]),a(-1,["DIFDUP","write DIFDUP"]),a(-1,["FIX","write FIX"]),a(-1,["PAC","write PAC"]),a(-1,["SQZ","write SQZ"]),a(-1,["JPG","write JPG"]),a(-1,
["SVG","write SVG"]),a(-1,["PNG","write PNG"]),a(-1,["PDF","write PDF"])])})})(Clazz,Clazz.getClassName,Clazz.newLongArray,Clazz.doubleToByte,Clazz.doubleToInt,Clazz.doubleToLong,Clazz.declarePackage,Clazz.instanceOf,Clazz.load,Clazz.instantialize,Clazz.decorateAsClass,Clazz.floatToInt,Clazz.floatToLong,Clazz.makeConstructor,Clazz.defineEnumConstant,Clazz.exceptionOf,Clazz.newIntArray,Clazz.newFloatArray,Clazz.declareType,Clazz.prepareFields,Clazz.superConstructor,Clazz.newByteArray,Clazz.declareInterface,
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.isAB,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);
