Author: bpoussin Date: 2013-01-24 12:34:39 +0100 (Thu, 24 Jan 2013) New Revision: 57 Url: http://forge.codelutin.com/projects/cantharella/repository/revisions/57 Log: fixes #1647: Integrate ChemDoodleWeb for the molecule drawing Added: trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/utils/behaviors/MoleculeEditorBehavior.java trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/utils/behaviors/MoleculeViewBehavior.java trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/ trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/ trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/ChemDoodleWeb.css trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-bg_flat_0_aaaaaa_40x100.png trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-bg_flat_0_eeeeee_40x100.png trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-bg_flat_55_c0402a_40x100.png trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-bg_flat_55_eeeeee_40x100.png trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-bg_glass_100_f8f8f8_1x400.png trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-bg_glass_35_dddddd_1x400.png trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-bg_glass_60_eeeeee_1x400.png trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-bg_inset-hard_75_999999_1x100.png trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-bg_inset-soft_50_c9c9c9_1x100.png trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-icons_3383bb_256x240.png trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-icons_454545_256x240.png trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-icons_70b2e1_256x240.png trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-icons_999999_256x240.png trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-icons_fbc856_256x240.png trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/jquery-ui-1.9.2.custom.css trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/js/ trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/js/ChemDoodleWeb-libs.js trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/js/ChemDoodleWeb-sketcher.js trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/js/ChemDoodleWeb.js trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/js/jquery-ui-1.9.2.custom.min.js trunk/cantharella.web/src/main/webapp/js/jquery-1.9.0.min.js trunk/cantharella.web/src/main/webapp/js/moleditor.js trunk/cantharella.web/src/main/webapp/js/molviewer.js Modified: trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/molecule/ListMoleculesPage.java trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/molecule/ManageMoleculePage.html trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/molecule/ManageMoleculePage.java trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/molecule/ReadMoleculePage.java Modified: trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/molecule/ListMoleculesPage.java =================================================================== --- trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/molecule/ListMoleculesPage.java 2013-01-18 17:07:45 UTC (rev 56) +++ trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/molecule/ListMoleculesPage.java 2013-01-24 11:34:39 UTC (rev 57) @@ -33,6 +33,7 @@ import nc.ird.cantharella.web.pages.domain.campagne.ReadCampagnePage; import nc.ird.cantharella.web.pages.domain.lot.ManageLotPage; import nc.ird.cantharella.web.utils.CallerPage; +import nc.ird.cantharella.web.utils.behaviors.MoleculeViewBehavior; import nc.ird.cantharella.web.utils.columns.BooleanPropertyColumn; import nc.ird.cantharella.web.utils.columns.DecimalPropertyColumn; import nc.ird.cantharella.web.utils.columns.EnumPropertyColumn; @@ -47,6 +48,7 @@ import org.apache.wicket.MarkupContainer; import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable; import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator; +import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn; import org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable; import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn; import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn; @@ -56,6 +58,7 @@ import org.apache.wicket.markup.repeater.Item; import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; +import org.apache.wicket.model.PropertyModel; import org.apache.wicket.spring.injection.annot.SpringBean; /** @@ -109,8 +112,15 @@ setResponsePage(new ReadMoleculePage(model.getObject().getIdMolecule(), currentPage)); } }); - columns.add(new PropertyColumn<Molecule>(new Model<String>(getString("Molecule.formuleDevMol")), "formuleDevMol", - "formuleDevMol")); +// columns.add(new PropertyColumn<Molecule>(new Model<String>(getString("Molecule.formuleDevMol")), "formuleDevMol", +// "formuleDevMol")); + columns.add(new AbstractColumn<Molecule>(new Model<String>(getString("Molecule.formuleDevMol"))) { + public void populateItem(Item<ICellPopulator<Molecule>> cellItem, String componentId, IModel<Molecule> rowModel) { + cellItem.add(new Label(componentId, "-") + .add(new MoleculeViewBehavior(new PropertyModel<String>(rowModel, "formuleDevMol")))); + } + }); + columns.add(new PropertyColumn<Molecule>(new Model<String>(getString("Molecule.nomCommun")), "nomCommun", "nomCommun")); columns.add(new PropertyColumn<Molecule>(new Model<String>(getString("Molecule.familleChimique")), "familleChimique", Modified: trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/molecule/ManageMoleculePage.html =================================================================== --- trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/molecule/ManageMoleculePage.html 2013-01-18 17:07:45 UTC (rev 56) +++ trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/molecule/ManageMoleculePage.html 2013-01-24 11:34:39 UTC (rev 57) @@ -40,7 +40,7 @@ <div class="property"> <label for="Molecule.formuleDevMol"><wicket:message key="Molecule.formuleDevMol" /></label> - <input type="text" id="Molecule.formuleDevMol" wicket:id="Molecule.formuleDevMol" /> + <input type="hidden" id="Molecule.formuleDevMol" wicket:id="Molecule.formuleDevMol" /> </div> <div class="property"> Modified: trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/molecule/ManageMoleculePage.java =================================================================== --- trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/molecule/ManageMoleculePage.java 2013-01-18 17:07:45 UTC (rev 56) +++ trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/molecule/ManageMoleculePage.java 2013-01-24 11:34:39 UTC (rev 57) @@ -55,6 +55,7 @@ import nc.ird.cantharella.web.pages.renderers.ProduitRenderer; import nc.ird.cantharella.web.utils.CallerPage; import nc.ird.cantharella.web.utils.behaviors.JSConfirmationBehavior; +import nc.ird.cantharella.web.utils.behaviors.MoleculeEditorBehavior; import nc.ird.cantharella.web.utils.behaviors.ReplaceEmptyLabelBehavior; import nc.ird.cantharella.web.utils.forms.SubmittableButton; import nc.ird.cantharella.web.utils.forms.SubmittableButtonEvents; @@ -79,6 +80,7 @@ import org.apache.wicket.markup.html.form.CheckBox; import org.apache.wicket.markup.html.form.DropDownChoice; import org.apache.wicket.markup.html.form.Form; +import org.apache.wicket.markup.html.form.HiddenField; import org.apache.wicket.markup.html.form.TextArea; import org.apache.wicket.markup.html.form.TextField; import org.apache.wicket.markup.html.link.Link; @@ -190,7 +192,8 @@ formView.add(new TextField<String>("Molecule.nomCommun", new PropertyModel<String>(moleculeModel, "nomCommun"))); formView.add(new TextField<String>("Molecule.familleChimique", new PropertyModel<String>(moleculeModel, "familleChimique"))); - formView.add(new TextField<String>("Molecule.formuleDevMol", new PropertyModel<String>(moleculeModel, "formuleDevMol"))); + formView.add(new HiddenField<String>("Molecule.formuleDevMol", new PropertyModel<String>(moleculeModel, "formuleDevMol")) + .add(new MoleculeEditorBehavior(new PropertyModel<String>(moleculeModel, "formuleDevMol")))); //moleculeModel.getObject().getFormuleDevMol()))); formView.add(new TextField<String>("Molecule.nomIupca", new PropertyModel<String>(moleculeModel, "nomIupca"))); formView.add(new TextField<String>("Molecule.formuleBrute", new PropertyModel<String>(moleculeModel, "formuleBrute"))); Modified: trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/molecule/ReadMoleculePage.java =================================================================== --- trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/molecule/ReadMoleculePage.java 2013-01-18 17:07:45 UTC (rev 56) +++ trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/pages/domain/molecule/ReadMoleculePage.java 2013-01-24 11:34:39 UTC (rev 57) @@ -46,6 +46,7 @@ import nc.ird.cantharella.web.pages.renderers.ProduitRenderer; import nc.ird.cantharella.web.utils.CallerPage; import nc.ird.cantharella.web.utils.behaviors.JSConfirmationBehavior; +import nc.ird.cantharella.web.utils.behaviors.MoleculeViewBehavior; import nc.ird.cantharella.web.utils.behaviors.ReplaceEmptyLabelBehavior; import nc.ird.cantharella.web.utils.forms.SubmittableButton; import nc.ird.cantharella.web.utils.forms.SubmittableButtonEvents; @@ -111,7 +112,8 @@ add(new Label("Molecule.idMolecule", new PropertyModel<String>(moleculeModel, "idMolecule"))); add(new Label("Molecule.nomCommun", new PropertyModel<String>(moleculeModel, "nomCommun")).add(new ReplaceEmptyLabelBehavior())); add(new Label("Molecule.familleChimique", new PropertyModel<String>(moleculeModel, "familleChimique")).add(new ReplaceEmptyLabelBehavior())); - add(new Label("Molecule.formuleDevMol", new PropertyModel<String>(moleculeModel, "formuleDevMol")).add(new ReplaceEmptyLabelBehavior())); + add(new Label("Molecule.formuleDevMol", new PropertyModel<String>(moleculeModel, "formuleDevMol")).add(new ReplaceEmptyLabelBehavior()) + .add(new MoleculeViewBehavior(new PropertyModel<String>(moleculeModel, "formuleDevMol")))); add(new Label("Molecule.nomIupca", new PropertyModel<String>(moleculeModel, "nomIupca")).add(new ReplaceEmptyLabelBehavior())); add(new Label("Molecule.formuleBrute", new PropertyModel<String>(moleculeModel, "formuleBrute")).add(new ReplaceEmptyLabelBehavior())); add(new Label("Molecule.masseMolaire", new DisplayDecimalPropertyModel(moleculeModel, "masseMolaire", DecimalDisplFormat.SMALL, getLocale())).add(new ReplaceEmptyLabelBehavior())); Added: trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/utils/behaviors/MoleculeEditorBehavior.java =================================================================== --- trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/utils/behaviors/MoleculeEditorBehavior.java (rev 0) +++ trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/utils/behaviors/MoleculeEditorBehavior.java 2013-01-24 11:34:39 UTC (rev 57) @@ -0,0 +1,86 @@ +/* + * #%L + * Cantharella :: Web + * $Id:$ + * $HeadURL:$ + * %% + * Copyright (C) 2009 - 2012 IRD (Institut de Recherche pour le Developpement) and by respective authors (see below) + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package nc.ird.cantharella.web.utils.behaviors; + +import org.apache.wicket.AttributeModifier; +import org.apache.wicket.Component; +import org.apache.wicket.markup.html.IHeaderResponse; +import org.apache.wicket.model.IModel; +import org.apache.wicket.request.Response; +import org.apache.wicket.util.string.JavaScriptUtils; + +/** + * Permet d'ajouter la formule dans un attribut formula. L'attribut est ensuite + * utilise en javascript pour ajouter la visualisation de la formule + * + * @author poussin + * @version $Revision$ + * + * Last update: $Date$ + * by : $Author$ + */ +public class MoleculeEditorBehavior extends AttributeModifier { + + private static final long serialVersionUID = 1L; + + public MoleculeEditorBehavior(IModel<?> replaceModel) { + super("formula", replaceModel); + } + + @Override + protected String newValue(String currentValue, String replacementValue) { + // on ajoute toujours un premier caractere pour oblige l'existance de + // l'attribut car sinon si formula est vide l'attribut n'est pas ajoute + return "." + replacementValue; + } + + @Override + public void renderHead(Component component, IHeaderResponse response) { + response.renderCSSReference("/ChemDoodleWeb/css/ChemDoodleWeb.css"); + response.renderCSSReference("/ChemDoodleWeb/css/jquery-ui-1.9.2.custom.css"); + response.renderJavaScriptReference("/js/jquery-1.9.0.min.js"); + response.renderJavaScriptReference("/ChemDoodleWeb/js/ChemDoodleWeb-libs.js"); + response.renderJavaScriptReference("/ChemDoodleWeb/js/ChemDoodleWeb.js"); + response.renderJavaScriptReference("/ChemDoodleWeb/js/jquery-ui-1.9.2.custom.min.js"); + response.renderJavaScriptReference("/ChemDoodleWeb/js/ChemDoodleWeb-sketcher.js"); + response.renderJavaScriptReference("/js/moleditor.js"); + } + + @Override + public void beforeRender(Component component) { + // il faut que l'element HTML est forcement un identifiant pour pouvoir + // travailler avec + component.setOutputMarkupId(true); + } + + @Override + public void afterRender(Component component) { + Response response = component.getResponse(); + final String id = component.getMarkupId(); + + response.write(JavaScriptUtils.SCRIPT_OPEN_TAG); + + response.write("addEditorMolecule('"+id+"');"); + response.write(JavaScriptUtils.SCRIPT_CLOSE_TAG); + } +} Added: trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/utils/behaviors/MoleculeViewBehavior.java =================================================================== --- trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/utils/behaviors/MoleculeViewBehavior.java (rev 0) +++ trunk/cantharella.web/src/main/java/nc/ird/cantharella/web/utils/behaviors/MoleculeViewBehavior.java 2013-01-24 11:34:39 UTC (rev 57) @@ -0,0 +1,84 @@ +/* + * #%L + * Cantharella :: Web + * $Id:$ + * $HeadURL:$ + * %% + * Copyright (C) 2009 - 2012 IRD (Institut de Recherche pour le Developpement) and by respective authors (see below) + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package nc.ird.cantharella.web.utils.behaviors; + +import org.apache.wicket.AttributeModifier; +import org.apache.wicket.Component; +import org.apache.wicket.markup.html.IHeaderResponse; +import org.apache.wicket.model.IModel; +import org.apache.wicket.request.Response; +import org.apache.wicket.util.string.JavaScriptUtils; + +/** + * Permet d'ajouter la formule dans un attribut formula. L'attribut est ensuite + * utilise en javascript pour ajouter l'editeur de formule + * + * @author poussin + * @version $Revision$ + * + * Last update: $Date$ + * by : $Author$ + */ +public class MoleculeViewBehavior extends AttributeModifier { + + private static final long serialVersionUID = 1L; + + public MoleculeViewBehavior(IModel<?> replaceModel) { + super("formula", replaceModel); + } + + @Override + protected String newValue(String currentValue, String replacementValue) { + // on ajoute toujours un premier caractere pour oblige l'existance de + // l'attribut car sinon si formula est vide le l'attribut n'est pas ajoute + return "." + replacementValue; + } + + @Override + public void renderHead(Component component, IHeaderResponse response) { + response.renderCSSReference("/ChemDoodleWeb/css/ChemDoodleWeb.css"); + response.renderJavaScriptReference("/js/jquery-1.9.0.min.js"); + response.renderJavaScriptReference("/ChemDoodleWeb/js/ChemDoodleWeb-libs.js"); + response.renderJavaScriptReference("/ChemDoodleWeb/js/ChemDoodleWeb.js"); + response.renderJavaScriptReference("/js/molviewer.js"); + } + + @Override + public void beforeRender(Component component) { + // il faut que l'element HTML est forcement un identifiant pour pouvoir + // travailler avec + component.setOutputMarkupId(true); + } + + @Override + public void afterRender(Component component) { + Response response = component.getResponse(); + String id = component.getMarkupId(); + + response.write(JavaScriptUtils.SCRIPT_OPEN_TAG); + + response.write("addViewerMolecule('"+id+"');"); + response.write(JavaScriptUtils.SCRIPT_CLOSE_TAG); + } + +} Added: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/ChemDoodleWeb.css =================================================================== --- trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/ChemDoodleWeb.css (rev 0) +++ trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/ChemDoodleWeb.css 2013-01-24 11:34:39 UTC (rev 57) @@ -0,0 +1,3 @@ +canvas.ChemDoodleWebComponent { + border: 1px solid black; +} \ No newline at end of file Added: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-bg_flat_0_aaaaaa_40x100.png =================================================================== (Binary files differ) Property changes on: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-bg_flat_0_aaaaaa_40x100.png ___________________________________________________________________ Added: svn:mime-type + image/png Added: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-bg_flat_0_eeeeee_40x100.png =================================================================== (Binary files differ) Property changes on: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-bg_flat_0_eeeeee_40x100.png ___________________________________________________________________ Added: svn:mime-type + image/png Added: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-bg_flat_55_c0402a_40x100.png =================================================================== (Binary files differ) Property changes on: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-bg_flat_55_c0402a_40x100.png ___________________________________________________________________ Added: svn:mime-type + image/png Added: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-bg_flat_55_eeeeee_40x100.png =================================================================== (Binary files differ) Property changes on: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-bg_flat_55_eeeeee_40x100.png ___________________________________________________________________ Added: svn:mime-type + image/png Added: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-bg_glass_100_f8f8f8_1x400.png =================================================================== (Binary files differ) Property changes on: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-bg_glass_100_f8f8f8_1x400.png ___________________________________________________________________ Added: svn:mime-type + image/png Added: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-bg_glass_35_dddddd_1x400.png =================================================================== (Binary files differ) Property changes on: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-bg_glass_35_dddddd_1x400.png ___________________________________________________________________ Added: svn:mime-type + image/png Added: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-bg_glass_60_eeeeee_1x400.png =================================================================== (Binary files differ) Property changes on: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-bg_glass_60_eeeeee_1x400.png ___________________________________________________________________ Added: svn:mime-type + image/png Added: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-bg_inset-hard_75_999999_1x100.png =================================================================== (Binary files differ) Property changes on: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-bg_inset-hard_75_999999_1x100.png ___________________________________________________________________ Added: svn:mime-type + image/png Added: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-bg_inset-soft_50_c9c9c9_1x100.png =================================================================== (Binary files differ) Property changes on: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-bg_inset-soft_50_c9c9c9_1x100.png ___________________________________________________________________ Added: svn:mime-type + image/png Added: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-icons_3383bb_256x240.png =================================================================== (Binary files differ) Property changes on: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-icons_3383bb_256x240.png ___________________________________________________________________ Added: svn:mime-type + image/png Added: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-icons_454545_256x240.png =================================================================== (Binary files differ) Property changes on: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-icons_454545_256x240.png ___________________________________________________________________ Added: svn:mime-type + image/png Added: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-icons_70b2e1_256x240.png =================================================================== (Binary files differ) Property changes on: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-icons_70b2e1_256x240.png ___________________________________________________________________ Added: svn:mime-type + image/png Added: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-icons_999999_256x240.png =================================================================== (Binary files differ) Property changes on: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-icons_999999_256x240.png ___________________________________________________________________ Added: svn:mime-type + image/png Added: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-icons_fbc856_256x240.png =================================================================== (Binary files differ) Property changes on: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/images/ui-icons_fbc856_256x240.png ___________________________________________________________________ Added: svn:mime-type + image/png Added: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/jquery-ui-1.9.2.custom.css =================================================================== --- trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/jquery-ui-1.9.2.custom.css (rev 0) +++ trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/css/jquery-ui-1.9.2.custom.css 2013-01-24 11:34:39 UTC (rev 57) @@ -0,0 +1,386 @@ +/*! jQuery UI - v1.9.2 - 2012-11-29 +* http://jqueryui.com +* Includes: jquery.ui.core.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.button.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tooltip.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2CHelvetica%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=dddddd&bgTextureHeader=02_glass.png&bgImgOpacityHeader=35&borderColorHeader=bbbbbb&fcHeader=444444&iconColorHeader=999999&bgColorContent=c9c9c9&bgTextureContent=05_inset_soft.png&bgImgOpacityContent=50&borderColorContent=aaaaaa&fcContent=333333&iconColorContent=999999&bgColorDefault=eeeeee&bgTextureDefault=02_glass.png&bgImgOpacityDefault=60&borderColorDefault=cccccc&fcDefault=3383bb&iconColorDefault=70b2e1&bgColorHover=f8f8f8&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=bbbbbb&fcHover=599fcf&iconColorHover=3383bb&bgColorActive=999999&bgTextureActive=06_inset_hard.png&bgImgOpacityActive=75&borderColorActive=999999&fcActive=ffffff&iconColorActive=454545&bgColorHighlight=eeeeee&bgTextureHighlight=01_flat.png&bgImgOpacityHighlight=55&borderColorHighlight=ffffff&fcHighlight=444444&iconColorHighlight=3383bb&bgColorError=c0402a&bgTextureError=01_flat.png&bgImgOpacityError=55&borderColorError=c0402a&fcError=ffffff&iconColorError=fbc856&bgColorOverlay=eeeeee&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=80&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=60&thicknessShadow=4px&offsetTopShadow=-4px&offsetLeftShadow=-4px&cornerRadiusShadow=0px +* Copyright (c) 2012 jQuery Foundation and other contributors Licensed MIT */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; } +.ui-helper-clearfix:after { clear: both; } +.ui-helper-clearfix { zoom: 1; } +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } +.ui-resizable { position: relative;} +.ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; } +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } +.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } +.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } +.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } +.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } +.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } +.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } +.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } +.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ +.ui-button, .ui-button:link, .ui-button:visited, .ui-button:hover, .ui-button:active { text-decoration: none; } +.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ +button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ +.ui-button-icons-only { width: 3.4em; } +button.ui-button-icons-only { width: 3.7em; } + +/*button text element */ +.ui-button .ui-button-text { display: block; line-height: 1.4; } +/*iChemLabs - changed to "3px" from ".4em 1em;"*/ +.ui-button-text-only .ui-button-text { padding: 3px; } +.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } +.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } +.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } +.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } +/* no icon support for input elements, provide padding by default */ +input.ui-button { padding: .4em 1em; } + +/*button icon element(s) */ +.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } +.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } +.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } +.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } +.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } + +/*button sets*/ +/*iChemLabs - changed to "3px" from "7px"*/ +.ui-buttonset { margin-right: 3px; } +/*iChemLabs - changed to "-1px" from "-.3em"*/ +.ui-buttonset .ui-button { margin-left: 0; margin-right: -1px; } + +/* workarounds */ +button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ +.ui-dialog { position: absolute; top: 0; left: 0; padding: .2em; width: 300px; overflow: hidden; } +.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } +.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } +.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } +.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } +.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } +.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } +.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } +.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } +.ui-draggable .ui-dialog-titlebar { cursor: move; } +.ui-menu { list-style:none; padding: 2px; margin: 0; display:block; outline: none; } +.ui-menu .ui-menu { margin-top: -3px; position: absolute; } +.ui-menu .ui-menu-item { margin: 0; padding: 0; zoom: 1; width: 100%; } +.ui-menu .ui-menu-divider { margin: 5px -2px 5px -2px; height: 0; font-size: 0; line-height: 0; border-width: 1px 0 0 0; } +.ui-menu .ui-menu-item a { text-decoration: none; display: block; padding: 2px .4em; line-height: 1.5; zoom: 1; font-weight: normal; } +.ui-menu .ui-menu-item a.ui-state-focus, +.ui-menu .ui-menu-item a.ui-state-active { font-weight: normal; margin: -1px; } + +.ui-menu .ui-state-disabled { font-weight: normal; margin: .4em 0 .2em; line-height: 1.5; } +.ui-menu .ui-state-disabled a { cursor: default; } + +/* icon support */ +.ui-menu-icons { position: relative; } +.ui-menu-icons .ui-menu-item a { position: relative; padding-left: 2em; } + +/* left-aligned */ +.ui-menu .ui-icon { position: absolute; top: .2em; left: .2em; } + +/* right-aligned */ +.ui-menu .ui-menu-icon { position: static; float: right; } +.ui-progressbar { height:2em; text-align: left; overflow: hidden; } +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }.ui-slider { position: relative; text-align: left; } +.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } +.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } + +.ui-slider-horizontal { height: .8em; } +.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } +.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } +.ui-slider-horizontal .ui-slider-range-min { left: 0; } +.ui-slider-horizontal .ui-slider-range-max { right: 0; } + +.ui-slider-vertical { width: .8em; height: 100px; } +.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } +.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } +.ui-slider-vertical .ui-slider-range-min { bottom: 0; } +.ui-slider-vertical .ui-slider-range-max { top: 0; }.ui-spinner { position:relative; display: inline-block; overflow: hidden; padding: 0; vertical-align: middle; } +.ui-spinner-input { border: none; background: none; padding: 0; margin: .2em 0; vertical-align: middle; margin-left: .4em; margin-right: 22px; } +.ui-spinner-button { width: 16px; height: 50%; font-size: .5em; padding: 0; margin: 0; text-align: center; position: absolute; cursor: default; display: block; overflow: hidden; right: 0; } +.ui-spinner a.ui-spinner-button { border-top: none; border-bottom: none; border-right: none; } /* more specificity required here to overide default borders */ +.ui-spinner .ui-icon { position: absolute; margin-top: -8px; top: 50%; left: 0; } /* vertical centre icon */ +.ui-spinner-up { top: 0; } +.ui-spinner-down { bottom: 0; } + +/* TR overrides */ +.ui-spinner .ui-icon-triangle-1-s { + /* need to fix icons sprite */ + background-position:-65px -16px; +} +.ui-tooltip { + padding: 8px; + position: absolute; + z-index: 9999; + max-width: 300px; + -webkit-box-shadow: 0 0 5px #aaa; + box-shadow: 0 0 5px #aaa; +} +/* Fades and background-images don't work well together in IE6, drop the image */ +* html .ui-tooltip { + background-image: none; +} +body .ui-tooltip { border-width: 2px; } + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Trebuchet MS,Helvetica,Arial,sans-serif; font-size: 1.1em; } +.ui-widget .ui-widget { font-size: 1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS,Helvetica,Arial,sans-serif; font-size: 1em; } +.ui-widget-content { border: 1px solid #aaaaaa; background: #c9c9c9 url(images/ui-bg_inset-soft_50_c9c9c9_1x100.png) 50% bottom repeat-x; color: #333333; } +.ui-widget-content a { color: #333333; } +.ui-widget-header { border: 1px solid #bbbbbb; background: #dddddd url(images/ui-bg_glass_35_dddddd_1x400.png) 50% 50% repeat-x; color: #444444; font-weight: bold; } +.ui-widget-header a { color: #444444; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #eeeeee url(images/ui-bg_glass_60_eeeeee_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #3383bb; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #3383bb; text-decoration: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #bbbbbb; background: #f8f8f8 url(images/ui-bg_glass_100_f8f8f8_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #599fcf; } +.ui-state-hover a, .ui-state-hover a:hover, .ui-state-hover a:link, .ui-state-hover a:visited { color: #599fcf; text-decoration: none; } +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #999999; background: #999999 url(images/ui-bg_inset-hard_75_999999_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #ffffff; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #ffffff; text-decoration: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #ffffff; background: #eeeeee url(images/ui-bg_flat_55_eeeeee_40x100.png) 50% 50% repeat-x; color: #444444; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #444444; } +.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #c0402a; background: #c0402a url(images/ui-bg_flat_55_c0402a_40x100.png) 50% 50% repeat-x; color: #ffffff; } +.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } +.ui-state-disabled .ui-icon { filter:Alpha(Opacity=35); } /* For IE8 - See #6059 */ + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_999999_256x240.png); } +.ui-widget-content .ui-icon {background-image: url(images/ui-icons_999999_256x240.png); } +.ui-widget-header .ui-icon {background-image: url(images/ui-icons_999999_256x240.png); } +.ui-state-default .ui-icon { background-image: url(images/ui-icons_70b2e1_256x240.png); } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_3383bb_256x240.png); } +.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); } +.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_3383bb_256x240.png); } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_fbc856_256x240.png); } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; -khtml-border-top-left-radius: 6px; border-top-left-radius: 6px; } +.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; -khtml-border-top-right-radius: 6px; border-top-right-radius: 6px; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; -khtml-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; -khtml-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; } + +/* Overlays */ +.ui-widget-overlay { background: #eeeeee url(images/ui-bg_flat_0_eeeeee_40x100.png) 50% 50% repeat-x; opacity: .8;filter:Alpha(Opacity=80); } +.ui-widget-shadow { margin: -4px 0 0 -4px; padding: 4px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .6;filter:Alpha(Opacity=60); -moz-border-radius: 0px; -khtml-border-radius: 0px; -webkit-border-radius: 0px; border-radius: 0px; } \ No newline at end of file Added: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/js/ChemDoodleWeb-libs.js =================================================================== --- trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/js/ChemDoodleWeb-libs.js (rev 0) +++ trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/js/ChemDoodleWeb-libs.js 2013-01-24 11:34:39 UTC (rev 57) @@ -0,0 +1,78 @@ +// +// ChemDoodle Web Components uses the following open source software. None +// of these libraries were modified in any way, and are included without +// modification: +// +// - jQuery: Software URL: http://jquery.com/ +// License: MIT License +// License URL: http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt +// - jQuery: Software URL: http://plugins.jquery.com/project/mousewheel +// _mousewheel License: MIT License +// License URL: http://www.opensource.org/licenses/mit-license.php +// - glMatrix: Software URL: http://code.google.com/p/glmatrix/ +// License: BSD License +// License URL: http://www.opensource.org/licenses/bsd-license.php +// +// +// =========================== glMatrix =============================== +// gl-matrix 1.3.7 - https://github.com/toji/gl-matrix/blob/master/LICENSE.md +(function(w,D){"object"===typeof exports?module.exports=D(global):"function"===typeof define&&define.amd?define([],function(){return D(w)}):D(w)})(this,function(w){function D(a){return o=a}function G(){return o="undefined"!==typeof Float32Array?Float32Array:Array}var E={};(function(){if("undefined"!=typeof Float32Array){var a=new Float32Array(1),b=new Int32Array(a.buffer);E.invsqrt=function(c){a[0]=c;b[0]=1597463007-(b[0]>>1);var d=a[0];return d*(1.5-0.5*c*d*d)}}else E.invsqrt=function(a){return 1/ +Math.sqrt(a)}})();var o=null;G();var r={create:function(a){var b=new o(3);a?(b[0]=a[0],b[1]=a[1],b[2]=a[2]):b[0]=b[1]=b[2]=0;return b},createFrom:function(a,b,c){var d=new o(3);d[0]=a;d[1]=b;d[2]=c;return d},set:function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];return b},equal:function(a,b){return a===b||1.0E-6>Math.abs(a[0]-b[0])&&1.0E-6>Math.abs(a[1]-b[1])&&1.0E-6>Math.abs(a[2]-b[2])},add:function(a,b,c){if(!c||a===c)return a[0]+=b[0],a[1]+=b[1],a[2]+=b[2],a;c[0]=a[0]+b[0];c[1]=a[1]+b[1];c[2]=a[2]+b[2]; +return c},subtract:function(a,b,c){if(!c||a===c)return a[0]-=b[0],a[1]-=b[1],a[2]-=b[2],a;c[0]=a[0]-b[0];c[1]=a[1]-b[1];c[2]=a[2]-b[2];return c},multiply:function(a,b,c){if(!c||a===c)return a[0]*=b[0],a[1]*=b[1],a[2]*=b[2],a;c[0]=a[0]*b[0];c[1]=a[1]*b[1];c[2]=a[2]*b[2];return c},negate:function(a,b){b||(b=a);b[0]=-a[0];b[1]=-a[1];b[2]=-a[2];return b},scale:function(a,b,c){if(!c||a===c)return a[0]*=b,a[1]*=b,a[2]*=b,a;c[0]=a[0]*b;c[1]=a[1]*b;c[2]=a[2]*b;return c},normalize:function(a,b){b||(b=a);var c= +a[0],d=a[1],e=a[2],g=Math.sqrt(c*c+d*d+e*e);if(!g)return b[0]=0,b[1]=0,b[2]=0,b;if(1===g)return b[0]=c,b[1]=d,b[2]=e,b;g=1/g;b[0]=c*g;b[1]=d*g;b[2]=e*g;return b},cross:function(a,b,c){c||(c=a);var d=a[0],e=a[1],a=a[2],g=b[0],f=b[1],b=b[2];c[0]=e*b-a*f;c[1]=a*g-d*b;c[2]=d*f-e*g;return c},length:function(a){var b=a[0],c=a[1],a=a[2];return Math.sqrt(b*b+c*c+a*a)},squaredLength:function(a){var b=a[0],c=a[1],a=a[2];return b*b+c*c+a*a},dot:function(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]},direction:function(a, +b,c){c||(c=a);var d=a[0]-b[0],e=a[1]-b[1],a=a[2]-b[2],b=Math.sqrt(d*d+e*e+a*a);if(!b)return c[0]=0,c[1]=0,c[2]=0,c;b=1/b;c[0]=d*b;c[1]=e*b;c[2]=a*b;return c},lerp:function(a,b,c,d){d||(d=a);d[0]=a[0]+c*(b[0]-a[0]);d[1]=a[1]+c*(b[1]-a[1]);d[2]=a[2]+c*(b[2]-a[2]);return d},dist:function(a,b){var c=b[0]-a[0],d=b[1]-a[1],e=b[2]-a[2];return Math.sqrt(c*c+d*d+e*e)}},H=null,y=new o(4);r.unproject=function(a,b,c,d,e){e||(e=a);H||(H=x.create());var g=H;y[0]=2*(a[0]-d[0])/d[2]-1;y[1]=2*(a[1]-d[1])/d[3]-1;y[2]= +2*a[2]-1;y[3]=1;x.multiply(c,b,g);if(!x.inverse(g))return null;x.multiplyVec4(g,y);if(0===y[3])return null;e[0]=y[0]/y[3];e[1]=y[1]/y[3];e[2]=y[2]/y[3];return e};var L=r.createFrom(1,0,0),M=r.createFrom(0,1,0),N=r.createFrom(0,0,1),z=r.create();r.rotationTo=function(a,b,c){c||(c=k.create());var d=r.dot(a,b);if(1<=d)k.set(O,c);else if(-0.999999>d)r.cross(L,a,z),1.0E-6>r.length(z)&&r.cross(M,a,z),1.0E-6>r.length(z)&&r.cross(N,a,z),r.normalize(z),k.fromAngleAxis(Math.PI,z,c);else{var d=Math.sqrt(2*(1+ +d)),e=1/d;r.cross(a,b,z);c[0]=z[0]*e;c[1]=z[1]*e;c[2]=z[2]*e;c[3]=0.5*d;k.normalize(c)}1<c[3]?c[3]=1:-1>c[3]&&(c[3]=-1);return c};r.str=function(a){return"["+a[0]+", "+a[1]+", "+a[2]+"]"};var A={create:function(a){var b=new o(9);a?(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3],b[4]=a[4],b[5]=a[5],b[6]=a[6],b[7]=a[7],b[8]=a[8]):b[0]=b[1]=b[2]=b[3]=b[4]=b[5]=b[6]=b[7]=b[8]=0;return b},createFrom:function(a,b,c,d,e,g,f,h,j){var i=new o(9);i[0]=a;i[1]=b;i[2]=c;i[3]=d;i[4]=e;i[5]=g;i[6]=f;i[7]=h;i[8]=j;return i}, +determinant:function(a){var b=a[3],c=a[4],d=a[5],e=a[6],g=a[7],f=a[8];return a[0]*(f*c-d*g)+a[1]*(-f*b+d*e)+a[2]*(g*b-c*e)},inverse:function(a,b){var c=a[0],d=a[1],e=a[2],g=a[3],f=a[4],h=a[5],j=a[6],i=a[7],m=a[8],l=m*f-h*i,C=-m*g+h*j,q=i*g-f*j,n=c*l+d*C+e*q;if(!n)return null;n=1/n;b||(b=A.create());b[0]=l*n;b[1]=(-m*d+e*i)*n;b[2]=(h*d-e*f)*n;b[3]=C*n;b[4]=(m*c-e*j)*n;b[5]=(-h*c+e*g)*n;b[6]=q*n;b[7]=(-i*c+d*j)*n;b[8]=(f*c-d*g)*n;return b},multiply:function(a,b,c){c||(c=a);var d=a[0],e=a[1],g=a[2], +f=a[3],h=a[4],j=a[5],i=a[6],m=a[7],a=a[8],l=b[0],C=b[1],q=b[2],n=b[3],k=b[4],p=b[5],o=b[6],s=b[7],b=b[8];c[0]=l*d+C*f+q*i;c[1]=l*e+C*h+q*m;c[2]=l*g+C*j+q*a;c[3]=n*d+k*f+p*i;c[4]=n*e+k*h+p*m;c[5]=n*g+k*j+p*a;c[6]=o*d+s*f+b*i;c[7]=o*e+s*h+b*m;c[8]=o*g+s*j+b*a;return c},multiplyVec2:function(a,b,c){c||(c=b);var d=b[0],b=b[1];c[0]=d*a[0]+b*a[3]+a[6];c[1]=d*a[1]+b*a[4]+a[7];return c},multiplyVec3:function(a,b,c){c||(c=b);var d=b[0],e=b[1],b=b[2];c[0]=d*a[0]+e*a[3]+b*a[6];c[1]=d*a[1]+e*a[4]+b*a[7];c[2]= +d*a[2]+e*a[5]+b*a[8];return c},set:function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];return b},equal:function(a,b){return a===b||1.0E-6>Math.abs(a[0]-b[0])&&1.0E-6>Math.abs(a[1]-b[1])&&1.0E-6>Math.abs(a[2]-b[2])&&1.0E-6>Math.abs(a[3]-b[3])&&1.0E-6>Math.abs(a[4]-b[4])&&1.0E-6>Math.abs(a[5]-b[5])&&1.0E-6>Math.abs(a[6]-b[6])&&1.0E-6>Math.abs(a[7]-b[7])&&1.0E-6>Math.abs(a[8]-b[8])},identity:function(a){a||(a=A.create());a[0]=1;a[1]=0;a[2]=0;a[3]=0; +a[4]=1;a[5]=0;a[6]=0;a[7]=0;a[8]=1;return a},transpose:function(a,b){if(!b||a===b){var c=a[1],d=a[2],e=a[5];a[1]=a[3];a[2]=a[6];a[3]=c;a[5]=a[7];a[6]=d;a[7]=e;return a}b[0]=a[0];b[1]=a[3];b[2]=a[6];b[3]=a[1];b[4]=a[4];b[5]=a[7];b[6]=a[2];b[7]=a[5];b[8]=a[8];return b},toMat4:function(a,b){b||(b=x.create());b[15]=1;b[14]=0;b[13]=0;b[12]=0;b[11]=0;b[10]=a[8];b[9]=a[7];b[8]=a[6];b[7]=0;b[6]=a[5];b[5]=a[4];b[4]=a[3];b[3]=0;b[2]=a[2];b[1]=a[1];b[0]=a[0];return b},str:function(a){return"["+a[0]+", "+a[1]+ +", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+", "+a[6]+", "+a[7]+", "+a[8]+"]"}},x={create:function(a){var b=new o(16);a&&(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3],b[4]=a[4],b[5]=a[5],b[6]=a[6],b[7]=a[7],b[8]=a[8],b[9]=a[9],b[10]=a[10],b[11]=a[11],b[12]=a[12],b[13]=a[13],b[14]=a[14],b[15]=a[15]);return b},createFrom:function(a,b,c,d,e,g,f,h,j,i,m,l,C,q,n,k){var p=new o(16);p[0]=a;p[1]=b;p[2]=c;p[3]=d;p[4]=e;p[5]=g;p[6]=f;p[7]=h;p[8]=j;p[9]=i;p[10]=m;p[11]=l;p[12]=C;p[13]=q;p[14]=n;p[15]=k;return p},set:function(a, +b){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=a[11];b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15];return b},equal:function(a,b){return a===b||1.0E-6>Math.abs(a[0]-b[0])&&1.0E-6>Math.abs(a[1]-b[1])&&1.0E-6>Math.abs(a[2]-b[2])&&1.0E-6>Math.abs(a[3]-b[3])&&1.0E-6>Math.abs(a[4]-b[4])&&1.0E-6>Math.abs(a[5]-b[5])&&1.0E-6>Math.abs(a[6]-b[6])&&1.0E-6>Math.abs(a[7]-b[7])&&1.0E-6>Math.abs(a[8]-b[8])&&1.0E-6>Math.abs(a[9]-b[9])&&1.0E-6> +Math.abs(a[10]-b[10])&&1.0E-6>Math.abs(a[11]-b[11])&&1.0E-6>Math.abs(a[12]-b[12])&&1.0E-6>Math.abs(a[13]-b[13])&&1.0E-6>Math.abs(a[14]-b[14])&&1.0E-6>Math.abs(a[15]-b[15])},identity:function(a){a||(a=x.create());a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=1;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=1;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1;return a},transpose:function(a,b){if(!b||a===b){var c=a[1],d=a[2],e=a[3],g=a[6],f=a[7],h=a[11];a[1]=a[4];a[2]=a[8];a[3]=a[12];a[4]=c;a[6]=a[9];a[7]=a[13];a[8]=d;a[9]=g;a[11]= +a[14];a[12]=e;a[13]=f;a[14]=h;return a}b[0]=a[0];b[1]=a[4];b[2]=a[8];b[3]=a[12];b[4]=a[1];b[5]=a[5];b[6]=a[9];b[7]=a[13];b[8]=a[2];b[9]=a[6];b[10]=a[10];b[11]=a[14];b[12]=a[3];b[13]=a[7];b[14]=a[11];b[15]=a[15];return b},determinant:function(a){var b=a[0],c=a[1],d=a[2],e=a[3],g=a[4],f=a[5],h=a[6],j=a[7],i=a[8],m=a[9],l=a[10],C=a[11],q=a[12],n=a[13],k=a[14],a=a[15];return q*m*h*e-i*n*h*e-q*f*l*e+g*n*l*e+i*f*k*e-g*m*k*e-q*m*d*j+i*n*d*j+q*c*l*j-b*n*l*j-i*c*k*j+b*m*k*j+q*f*d*C-g*n*d*C-q*c*h*C+b*n*h*C+ +g*c*k*C-b*f*k*C-i*f*d*a+g*m*d*a+i*c*h*a-b*m*h*a-g*c*l*a+b*f*l*a},inverse:function(a,b){b||(b=a);var c=a[0],d=a[1],e=a[2],g=a[3],f=a[4],h=a[5],j=a[6],i=a[7],m=a[8],l=a[9],k=a[10],q=a[11],n=a[12],o=a[13],p=a[14],r=a[15],s=c*h-d*f,v=c*j-e*f,t=c*i-g*f,u=d*j-e*h,w=d*i-g*h,x=e*i-g*j,y=m*o-l*n,z=m*p-k*n,F=m*r-q*n,A=l*p-k*o,D=l*r-q*o,E=k*r-q*p,B=s*E-v*D+t*A+u*F-w*z+x*y;if(!B)return null;B=1/B;b[0]=(h*E-j*D+i*A)*B;b[1]=(-d*E+e*D-g*A)*B;b[2]=(o*x-p*w+r*u)*B;b[3]=(-l*x+k*w-q*u)*B;b[4]=(-f*E+j*F-i*z)*B;b[5]= +(c*E-e*F+g*z)*B;b[6]=(-n*x+p*t-r*v)*B;b[7]=(m*x-k*t+q*v)*B;b[8]=(f*D-h*F+i*y)*B;b[9]=(-c*D+d*F-g*y)*B;b[10]=(n*w-o*t+r*s)*B;b[11]=(-m*w+l*t-q*s)*B;b[12]=(-f*A+h*z-j*y)*B;b[13]=(c*A-d*z+e*y)*B;b[14]=(-n*u+o*v-p*s)*B;b[15]=(m*u-l*v+k*s)*B;return b},toRotationMat:function(a,b){b||(b=x.create());b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=a[11];b[12]=0;b[13]=0;b[14]=0;b[15]=1;return b},toMat3:function(a,b){b||(b=A.create());b[0]= +a[0];b[1]=a[1];b[2]=a[2];b[3]=a[4];b[4]=a[5];b[5]=a[6];b[6]=a[8];b[7]=a[9];b[8]=a[10];return b},toInverseMat3:function(a,b){var c=a[0],d=a[1],e=a[2],g=a[4],f=a[5],h=a[6],j=a[8],i=a[9],m=a[10],l=m*f-h*i,k=-m*g+h*j,q=i*g-f*j,n=c*l+d*k+e*q;if(!n)return null;n=1/n;b||(b=A.create());b[0]=l*n;b[1]=(-m*d+e*i)*n;b[2]=(h*d-e*f)*n;b[3]=k*n;b[4]=(m*c-e*j)*n;b[5]=(-h*c+e*g)*n;b[6]=q*n;b[7]=(-i*c+d*j)*n;b[8]=(f*c-d*g)*n;return b},multiply:function(a,b,c){c||(c=a);var d=a[0],e=a[1],g=a[2],f=a[3],h=a[4],j=a[5], +i=a[6],m=a[7],l=a[8],k=a[9],q=a[10],n=a[11],o=a[12],p=a[13],r=a[14],a=a[15],s=b[0],v=b[1],t=b[2],u=b[3];c[0]=s*d+v*h+t*l+u*o;c[1]=s*e+v*j+t*k+u*p;c[2]=s*g+v*i+t*q+u*r;c[3]=s*f+v*m+t*n+u*a;s=b[4];v=b[5];t=b[6];u=b[7];c[4]=s*d+v*h+t*l+u*o;c[5]=s*e+v*j+t*k+u*p;c[6]=s*g+v*i+t*q+u*r;c[7]=s*f+v*m+t*n+u*a;s=b[8];v=b[9];t=b[10];u=b[11];c[8]=s*d+v*h+t*l+u*o;c[9]=s*e+v*j+t*k+u*p;c[10]=s*g+v*i+t*q+u*r;c[11]=s*f+v*m+t*n+u*a;s=b[12];v=b[13];t=b[14];u=b[15];c[12]=s*d+v*h+t*l+u*o;c[13]=s*e+v*j+t*k+u*p;c[14]=s*g+ +v*i+t*q+u*r;c[15]=s*f+v*m+t*n+u*a;return c},multiplyVec3:function(a,b,c){c||(c=b);var d=b[0],e=b[1],b=b[2];c[0]=a[0]*d+a[4]*e+a[8]*b+a[12];c[1]=a[1]*d+a[5]*e+a[9]*b+a[13];c[2]=a[2]*d+a[6]*e+a[10]*b+a[14];return c},multiplyVec4:function(a,b,c){c||(c=b);var d=b[0],e=b[1],g=b[2],b=b[3];c[0]=a[0]*d+a[4]*e+a[8]*g+a[12]*b;c[1]=a[1]*d+a[5]*e+a[9]*g+a[13]*b;c[2]=a[2]*d+a[6]*e+a[10]*g+a[14]*b;c[3]=a[3]*d+a[7]*e+a[11]*g+a[15]*b;return c},translate:function(a,b,c){var d=b[0],e=b[1],b=b[2],g,f,h,j,i,m,l,k,q, +n,o,p;if(!c||a===c)return a[12]=a[0]*d+a[4]*e+a[8]*b+a[12],a[13]=a[1]*d+a[5]*e+a[9]*b+a[13],a[14]=a[2]*d+a[6]*e+a[10]*b+a[14],a[15]=a[3]*d+a[7]*e+a[11]*b+a[15],a;g=a[0];f=a[1];h=a[2];j=a[3];i=a[4];m=a[5];l=a[6];k=a[7];q=a[8];n=a[9];o=a[10];p=a[11];c[0]=g;c[1]=f;c[2]=h;c[3]=j;c[4]=i;c[5]=m;c[6]=l;c[7]=k;c[8]=q;c[9]=n;c[10]=o;c[11]=p;c[12]=g*d+i*e+q*b+a[12];c[13]=f*d+m*e+n*b+a[13];c[14]=h*d+l*e+o*b+a[14];c[15]=j*d+k*e+p*b+a[15];return c},scale:function(a,b,c){var d=b[0],e=b[1],b=b[2];if(!c||a===c)return a[0]*= +d,a[1]*=d,a[2]*=d,a[3]*=d,a[4]*=e,a[5]*=e,a[6]*=e,a[7]*=e,a[8]*=b,a[9]*=b,a[10]*=b,a[11]*=b,a;c[0]=a[0]*d;c[1]=a[1]*d;c[2]=a[2]*d;c[3]=a[3]*d;c[4]=a[4]*e;c[5]=a[5]*e;c[6]=a[6]*e;c[7]=a[7]*e;c[8]=a[8]*b;c[9]=a[9]*b;c[10]=a[10]*b;c[11]=a[11]*b;c[12]=a[12];c[13]=a[13];c[14]=a[14];c[15]=a[15];return c},rotate:function(a,b,c,d){var e=c[0],g=c[1],c=c[2],f=Math.sqrt(e*e+g*g+c*c),h,j,i,m,l,k,q,n,o,p,r,s,v,t,u,w,x,y,z,A;if(!f)return null;1!==f&&(f=1/f,e*=f,g*=f,c*=f);h=Math.sin(b);j=Math.cos(b);i=1-j;b=a[0]; +f=a[1];m=a[2];l=a[3];k=a[4];q=a[5];n=a[6];o=a[7];p=a[8];r=a[9];s=a[10];v=a[11];t=e*e*i+j;u=g*e*i+c*h;w=c*e*i-g*h;x=e*g*i-c*h;y=g*g*i+j;z=c*g*i+e*h;A=e*c*i+g*h;e=g*c*i-e*h;g=c*c*i+j;d?a!==d&&(d[12]=a[12],d[13]=a[13],d[14]=a[14],d[15]=a[15]):d=a;d[0]=b*t+k*u+p*w;d[1]=f*t+q*u+r*w;d[2]=m*t+n*u+s*w;d[3]=l*t+o*u+v*w;d[4]=b*x+k*y+p*z;d[5]=f*x+q*y+r*z;d[6]=m*x+n*y+s*z;d[7]=l*x+o*y+v*z;d[8]=b*A+k*e+p*g;d[9]=f*A+q*e+r*g;d[10]=m*A+n*e+s*g;d[11]=l*A+o*e+v*g;return d},rotateX:function(a,b,c){var d=Math.sin(b), +b=Math.cos(b),e=a[4],g=a[5],f=a[6],h=a[7],j=a[8],i=a[9],m=a[10],l=a[11];c?a!==c&&(c[0]=a[0],c[1]=a[1],c[2]=a[2],c[3]=a[3],c[12]=a[12],c[13]=a[13],c[14]=a[14],c[15]=a[15]):c=a;c[4]=e*b+j*d;c[5]=g*b+i*d;c[6]=f*b+m*d;c[7]=h*b+l*d;c[8]=e*-d+j*b;c[9]=g*-d+i*b;c[10]=f*-d+m*b;c[11]=h*-d+l*b;return c},rotateY:function(a,b,c){var d=Math.sin(b),b=Math.cos(b),e=a[0],g=a[1],f=a[2],h=a[3],j=a[8],i=a[9],m=a[10],l=a[11];c?a!==c&&(c[4]=a[4],c[5]=a[5],c[6]=a[6],c[7]=a[7],c[12]=a[12],c[13]=a[13],c[14]=a[14],c[15]= +a[15]):c=a;c[0]=e*b+j*-d;c[1]=g*b+i*-d;c[2]=f*b+m*-d;c[3]=h*b+l*-d;c[8]=e*d+j*b;c[9]=g*d+i*b;c[10]=f*d+m*b;c[11]=h*d+l*b;return c},rotateZ:function(a,b,c){var d=Math.sin(b),b=Math.cos(b),e=a[0],g=a[1],f=a[2],h=a[3],j=a[4],i=a[5],m=a[6],l=a[7];c?a!==c&&(c[8]=a[8],c[9]=a[9],c[10]=a[10],c[11]=a[11],c[12]=a[12],c[13]=a[13],c[14]=a[14],c[15]=a[15]):c=a;c[0]=e*b+j*d;c[1]=g*b+i*d;c[2]=f*b+m*d;c[3]=h*b+l*d;c[4]=e*-d+j*b;c[5]=g*-d+i*b;c[6]=f*-d+m*b;c[7]=h*-d+l*b;return c},frustum:function(a,b,c,d,e,g,f){f|| +(f=x.create());var h=b-a,j=d-c,i=g-e;f[0]=2*e/h;f[1]=0;f[2]=0;f[3]=0;f[4]=0;f[5]=2*e/j;f[6]=0;f[7]=0;f[8]=(b+a)/h;f[9]=(d+c)/j;f[10]=-(g+e)/i;f[11]=-1;f[12]=0;f[13]=0;f[14]=-(2*g*e)/i;f[15]=0;return f},perspective:function(a,b,c,d,e){a=c*Math.tan(a*Math.PI/360);b*=a;return x.frustum(-b,b,-a,a,c,d,e)},ortho:function(a,b,c,d,e,g,f){f||(f=x.create());var h=b-a,j=d-c,i=g-e;f[0]=2/h;f[1]=0;f[2]=0;f[3]=0;f[4]=0;f[5]=2/j;f[6]=0;f[7]=0;f[8]=0;f[9]=0;f[10]=-2/i;f[11]=0;f[12]=-(a+b)/h;f[13]=-(d+c)/j;f[14]= +-(g+e)/i;f[15]=1;return f},lookAt:function(a,b,c,d){d||(d=x.create());var e,g,f,h,j,i,m,l,k=a[0],o=a[1],a=a[2];f=c[0];h=c[1];g=c[2];m=b[0];c=b[1];e=b[2];if(k===m&&o===c&&a===e)return x.identity(d);b=k-m;c=o-c;m=a-e;l=1/Math.sqrt(b*b+c*c+m*m);b*=l;c*=l;m*=l;e=h*m-g*c;g=g*b-f*m;f=f*c-h*b;(l=Math.sqrt(e*e+g*g+f*f))?(l=1/l,e*=l,g*=l,f*=l):f=g=e=0;h=c*f-m*g;j=m*e-b*f;i=b*g-c*e;(l=Math.sqrt(h*h+j*j+i*i))?(l=1/l,h*=l,j*=l,i*=l):i=j=h=0;d[0]=e;d[1]=h;d[2]=b;d[3]=0;d[4]=g;d[5]=j;d[6]=c;d[7]=0;d[8]=f;d[9]= +i;d[10]=m;d[11]=0;d[12]=-(e*k+g*o+f*a);d[13]=-(h*k+j*o+i*a);d[14]=-(b*k+c*o+m*a);d[15]=1;return d},fromRotationTranslation:function(a,b,c){c||(c=x.create());var d=a[0],e=a[1],g=a[2],f=a[3],h=d+d,j=e+e,i=g+g,a=d*h,m=d*j,d=d*i,k=e*j,e=e*i,g=g*i,h=f*h,j=f*j,f=f*i;c[0]=1-(k+g);c[1]=m+f;c[2]=d-j;c[3]=0;c[4]=m-f;c[5]=1-(a+g);c[6]=e+h;c[7]=0;c[8]=d+j;c[9]=e-h;c[10]=1-(a+k);c[11]=0;c[12]=b[0];c[13]=b[1];c[14]=b[2];c[15]=1;return c},str:function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+ +a[5]+", "+a[6]+", "+a[7]+", "+a[8]+", "+a[9]+", "+a[10]+", "+a[11]+", "+a[12]+", "+a[13]+", "+a[14]+", "+a[15]+"]"}},k={create:function(a){var b=new o(4);a?(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3]):b[0]=b[1]=b[2]=b[3]=0;return b},createFrom:function(a,b,c,d){var e=new o(4);e[0]=a;e[1]=b;e[2]=c;e[3]=d;return e},set:function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];return b},equal:function(a,b){return a===b||1.0E-6>Math.abs(a[0]-b[0])&&1.0E-6>Math.abs(a[1]-b[1])&&1.0E-6>Math.abs(a[2]-b[2])&&1.0E-6> +Math.abs(a[3]-b[3])},identity:function(a){a||(a=k.create());a[0]=0;a[1]=0;a[2]=0;a[3]=1;return a}},O=k.identity();k.calculateW=function(a,b){var c=a[0],d=a[1],e=a[2];if(!b||a===b)return a[3]=-Math.sqrt(Math.abs(1-c*c-d*d-e*e)),a;b[0]=c;b[1]=d;b[2]=e;b[3]=-Math.sqrt(Math.abs(1-c*c-d*d-e*e));return b};k.dot=function(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3]};k.inverse=function(a,b){var c=a[0],d=a[1],e=a[2],g=a[3],c=(c=c*c+d*d+e*e+g*g)?1/c:0;if(!b||a===b)return a[0]*=-c,a[1]*=-c,a[2]*=-c,a[3]*= +c,a;b[0]=-a[0]*c;b[1]=-a[1]*c;b[2]=-a[2]*c;b[3]=a[3]*c;return b};k.conjugate=function(a,b){if(!b||a===b)return a[0]*=-1,a[1]*=-1,a[2]*=-1,a;b[0]=-a[0];b[1]=-a[1];b[2]=-a[2];b[3]=a[3];return b};k.length=function(a){var b=a[0],c=a[1],d=a[2],a=a[3];return Math.sqrt(b*b+c*c+d*d+a*a)};k.normalize=function(a,b){b||(b=a);var c=a[0],d=a[1],e=a[2],g=a[3],f=Math.sqrt(c*c+d*d+e*e+g*g);if(0===f)return b[0]=0,b[1]=0,b[2]=0,b[3]=0,b;f=1/f;b[0]=c*f;b[1]=d*f;b[2]=e*f;b[3]=g*f;return b};k.add=function(a,b,c){if(!c|| +a===c)return a[0]+=b[0],a[1]+=b[1],a[2]+=b[2],a[3]+=b[3],a;c[0]=a[0]+b[0];c[1]=a[1]+b[1];c[2]=a[2]+b[2];c[3]=a[3]+b[3];return c};k.multiply=function(a,b,c){c||(c=a);var d=a[0],e=a[1],g=a[2],a=a[3],f=b[0],h=b[1],j=b[2],b=b[3];c[0]=d*b+a*f+e*j-g*h;c[1]=e*b+a*h+g*f-d*j;c[2]=g*b+a*j+d*h-e*f;c[3]=a*b-d*f-e*h-g*j;return c};k.multiplyVec3=function(a,b,c){c||(c=b);var d=b[0],e=b[1],g=b[2],b=a[0],f=a[1],h=a[2],a=a[3],j=a*d+f*g-h*e,i=a*e+h*d-b*g,k=a*g+b*e-f*d,d=-b*d-f*e-h*g;c[0]=j*a+d*-b+i*-h-k*-f;c[1]=i*a+ +d*-f+k*-b-j*-h;c[2]=k*a+d*-h+j*-f-i*-b;return c};k.scale=function(a,b,c){if(!c||a===c)return a[0]*=b,a[1]*=b,a[2]*=b,a[3]*=b,a;c[0]=a[0]*b;c[1]=a[1]*b;c[2]=a[2]*b;c[3]=a[3]*b;return c};k.toMat3=function(a,b){b||(b=A.create());var c=a[0],d=a[1],e=a[2],g=a[3],f=c+c,h=d+d,j=e+e,i=c*f,k=c*h,c=c*j,l=d*h,d=d*j,e=e*j,f=g*f,h=g*h,g=g*j;b[0]=1-(l+e);b[1]=k+g;b[2]=c-h;b[3]=k-g;b[4]=1-(i+e);b[5]=d+f;b[6]=c+h;b[7]=d-f;b[8]=1-(i+l);return b};k.toMat4=function(a,b){b||(b=x.create());var c=a[0],d=a[1],e=a[2],g= +a[3],f=c+c,h=d+d,j=e+e,i=c*f,k=c*h,c=c*j,l=d*h,d=d*j,e=e*j,f=g*f,h=g*h,g=g*j;b[0]=1-(l+e);b[1]=k+g;b[2]=c-h;b[3]=0;b[4]=k-g;b[5]=1-(i+e);b[6]=d+f;b[7]=0;b[8]=c+h;b[9]=d-f;b[10]=1-(i+l);b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return b};k.slerp=function(a,b,c,d){d||(d=a);var e=a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3],g,f;if(1<=Math.abs(e))return d!==a&&(d[0]=a[0],d[1]=a[1],d[2]=a[2],d[3]=a[3]),d;g=Math.acos(e);f=Math.sqrt(1-e*e);if(0.001>Math.abs(f))return d[0]=0.5*a[0]+0.5*b[0],d[1]=0.5*a[1]+0.5*b[1], +d[2]=0.5*a[2]+0.5*b[2],d[3]=0.5*a[3]+0.5*b[3],d;e=Math.sin((1-c)*g)/f;c=Math.sin(c*g)/f;d[0]=a[0]*e+b[0]*c;d[1]=a[1]*e+b[1]*c;d[2]=a[2]*e+b[2]*c;d[3]=a[3]*e+b[3]*c;return d};k.fromRotationMatrix=function(a,b){b||(b=k.create());var c=a[0]+a[4]+a[8],d;if(0<c)d=Math.sqrt(c+1),b[3]=0.5*d,d=0.5/d,b[0]=(a[7]-a[5])*d,b[1]=(a[2]-a[6])*d,b[2]=(a[3]-a[1])*d;else{d=k.fromRotationMatrix.s_iNext=k.fromRotationMatrix.s_iNext||[1,2,0];c=0;a[4]>a[0]&&(c=1);a[8]>a[3*c+c]&&(c=2);var e=d[c],g=d[e];d=Math.sqrt(a[3*c+ +c]-a[3*e+e]-a[3*g+g]+1);b[c]=0.5*d;d=0.5/d;b[3]=(a[3*g+e]-a[3*e+g])*d;b[e]=(a[3*e+c]+a[3*c+e])*d;b[g]=(a[3*g+c]+a[3*c+g])*d}return b};A.toQuat4=k.fromRotationMatrix;(function(){var a=A.create();k.fromAxes=function(b,c,d,e){a[0]=c[0];a[3]=c[1];a[6]=c[2];a[1]=d[0];a[4]=d[1];a[7]=d[2];a[2]=b[0];a[5]=b[1];a[8]=b[2];return k.fromRotationMatrix(a,e)}})();k.identity=function(a){a||(a=k.create());a[0]=0;a[1]=0;a[2]=0;a[3]=1;return a};k.fromAngleAxis=function(a,b,c){c||(c=k.create());var a=0.5*a,d=Math.sin(a); +c[3]=Math.cos(a);c[0]=d*b[0];c[1]=d*b[1];c[2]=d*b[2];return c};k.toAngleAxis=function(a,b){b||(b=a);var c=a[0]*a[0]+a[1]*a[1]+a[2]*a[2];0<c?(b[3]=2*Math.acos(a[3]),c=E.invsqrt(c),b[0]=a[0]*c,b[1]=a[1]*c,b[2]=a[2]*c):(b[3]=0,b[0]=1,b[1]=0,b[2]=0);return b};k.str=function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+"]"};var J={create:function(a){var b=new o(2);a?(b[0]=a[0],b[1]=a[1]):(b[0]=0,b[1]=0);return b},createFrom:function(a,b){var c=new o(2);c[0]=a;c[1]=b;return c},add:function(a,b,c){c|| +(c=b);c[0]=a[0]+b[0];c[1]=a[1]+b[1];return c},subtract:function(a,b,c){c||(c=b);c[0]=a[0]-b[0];c[1]=a[1]-b[1];return c},multiply:function(a,b,c){c||(c=b);c[0]=a[0]*b[0];c[1]=a[1]*b[1];return c},divide:function(a,b,c){c||(c=b);c[0]=a[0]/b[0];c[1]=a[1]/b[1];return c},scale:function(a,b,c){c||(c=a);c[0]=a[0]*b;c[1]=a[1]*b;return c},dist:function(a,b){var c=b[0]-a[0],d=b[1]-a[1];return Math.sqrt(c*c+d*d)},set:function(a,b){b[0]=a[0];b[1]=a[1];return b},equal:function(a,b){return a===b||1.0E-6>Math.abs(a[0]- +b[0])&&1.0E-6>Math.abs(a[1]-b[1])},negate:function(a,b){b||(b=a);b[0]=-a[0];b[1]=-a[1];return b},normalize:function(a,b){b||(b=a);var c=a[0]*a[0]+a[1]*a[1];0<c?(c=Math.sqrt(c),b[0]=a[0]/c,b[1]=a[1]/c):b[0]=b[1]=0;return b},cross:function(a,b,c){a=a[0]*b[1]-a[1]*b[0];if(!c)return a;c[0]=c[1]=0;c[2]=a;return c},length:function(a){var b=a[0],a=a[1];return Math.sqrt(b*b+a*a)},squaredLength:function(a){var b=a[0],a=a[1];return b*b+a*a},dot:function(a,b){return a[0]*b[0]+a[1]*b[1]},direction:function(a, +b,c){c||(c=a);var d=a[0]-b[0],a=a[1]-b[1],b=d*d+a*a;if(!b)return c[0]=0,c[1]=0,c[2]=0,c;b=1/Math.sqrt(b);c[0]=d*b;c[1]=a*b;return c},lerp:function(a,b,c,d){d||(d=a);d[0]=a[0]+c*(b[0]-a[0]);d[1]=a[1]+c*(b[1]-a[1]);return d},str:function(a){return"["+a[0]+", "+a[1]+"]"}},I={create:function(a){var b=new o(4);a?(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3]):b[0]=b[1]=b[2]=b[3]=0;return b},createFrom:function(a,b,c,d){var e=new o(4);e[0]=a;e[1]=b;e[2]=c;e[3]=d;return e},set:function(a,b){b[0]=a[0];b[1]=a[1]; +b[2]=a[2];b[3]=a[3];return b},equal:function(a,b){return a===b||1.0E-6>Math.abs(a[0]-b[0])&&1.0E-6>Math.abs(a[1]-b[1])&&1.0E-6>Math.abs(a[2]-b[2])&&1.0E-6>Math.abs(a[3]-b[3])},identity:function(a){a||(a=I.create());a[0]=1;a[1]=0;a[2]=0;a[3]=1;return a},transpose:function(a,b){if(!b||a===b){var c=a[1];a[1]=a[2];a[2]=c;return a}b[0]=a[0];b[1]=a[2];b[2]=a[1];b[3]=a[3];return b},determinant:function(a){return a[0]*a[3]-a[2]*a[1]},inverse:function(a,b){b||(b=a);var c=a[0],d=a[1],e=a[2],g=a[3],f=c*g-e* +d;if(!f)return null;f=1/f;b[0]=g*f;b[1]=-d*f;b[2]=-e*f;b[3]=c*f;return b},multiply:function(a,b,c){c||(c=a);var d=a[0],e=a[1],g=a[2],a=a[3];c[0]=d*b[0]+e*b[2];c[1]=d*b[1]+e*b[3];c[2]=g*b[0]+a*b[2];c[3]=g*b[1]+a*b[3];return c},rotate:function(a,b,c){c||(c=a);var d=a[0],e=a[1],g=a[2],a=a[3],f=Math.sin(b),b=Math.cos(b);c[0]=d*b+e*f;c[1]=d*-f+e*b;c[2]=g*b+a*f;c[3]=g*-f+a*b;return c},multiplyVec2:function(a,b,c){c||(c=b);var d=b[0],b=b[1];c[0]=d*a[0]+b*a[1];c[1]=d*a[2]+b*a[3];return c},scale:function(a, +b,c){c||(c=a);var d=a[1],e=a[2],g=a[3],f=b[0],b=b[1];c[0]=a[0]*f;c[1]=d*b;c[2]=e*f;c[3]=g*b;return c},str:function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+"]"}},K={create:function(a){var b=new o(4);a?(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3]):(b[0]=0,b[1]=0,b[2]=0,b[3]=0);return b},createFrom:function(a,b,c,d){var e=new o(4);e[0]=a;e[1]=b;e[2]=c;e[3]=d;return e},add:function(a,b,c){c||(c=b);c[0]=a[0]+b[0];c[1]=a[1]+b[1];c[2]=a[2]+b[2];c[3]=a[3]+b[3];return c},subtract:function(a,b,c){c||(c= +b);c[0]=a[0]-b[0];c[1]=a[1]-b[1];c[2]=a[2]-b[2];c[3]=a[3]-b[3];return c},multiply:function(a,b,c){c||(c=b);c[0]=a[0]*b[0];c[1]=a[1]*b[1];c[2]=a[2]*b[2];c[3]=a[3]*b[3];return c},divide:function(a,b,c){c||(c=b);c[0]=a[0]/b[0];c[1]=a[1]/b[1];c[2]=a[2]/b[2];c[3]=a[3]/b[3];return c},scale:function(a,b,c){c||(c=a);c[0]=a[0]*b;c[1]=a[1]*b;c[2]=a[2]*b;c[3]=a[3]*b;return c},set:function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];return b},equal:function(a,b){return a===b||1.0E-6>Math.abs(a[0]-b[0])&&1.0E-6> +Math.abs(a[1]-b[1])&&1.0E-6>Math.abs(a[2]-b[2])&&1.0E-6>Math.abs(a[3]-b[3])},negate:function(a,b){b||(b=a);b[0]=-a[0];b[1]=-a[1];b[2]=-a[2];b[3]=-a[3];return b},length:function(a){var b=a[0],c=a[1],d=a[2],a=a[3];return Math.sqrt(b*b+c*c+d*d+a*a)},squaredLength:function(a){var b=a[0],c=a[1],d=a[2],a=a[3];return b*b+c*c+d*d+a*a},lerp:function(a,b,c,d){d||(d=a);d[0]=a[0]+c*(b[0]-a[0]);d[1]=a[1]+c*(b[1]-a[1]);d[2]=a[2]+c*(b[2]-a[2]);d[3]=a[3]+c*(b[3]-a[3]);return d},str:function(a){return"["+a[0]+", "+ +a[1]+", "+a[2]+", "+a[3]+"]"}};w&&(w.glMatrixArrayType=o,w.MatrixArray=o,w.setMatrixArrayType=D,w.determineMatrixArrayType=G,w.glMath=E,w.vec2=J,w.vec3=r,w.vec4=K,w.mat2=I,w.mat3=A,w.mat4=x,w.quat4=k);return{glMatrixArrayType:o,MatrixArray:o,setMatrixArrayType:D,determineMatrixArrayType:G,glMath:E,vec2:J,vec3:r,vec4:K,mat2:I,mat3:A,mat4:x,quat4:k}});// +// =========================== jQuery =============================== +/*! jQuery v1.8.3 jquery.com | jquery.org/license */ +(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r<i;r++)v.event.add(t,n,u[n][r])}o.data&&(o.data=v.extend({},o.data))}function Ot(e,t){var n;if(t.nodeType!==1)return;t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),n==="object"?(t.parentNode&&(t.outerHTML=e.outerHTML),v.support.html5Clone&&e.innerHTML&&!v.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):n==="input"&&Et.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):n==="option"?t.selected=e.defaultSelected:n==="input"||n==="textarea"?t.defaultValue=e.defaultValue:n==="script"&&t.text!==e.text&&(t.text=e.text),t.removeAttribute(v.expando)}function Mt(e){return typeof e.getElementsByTagName!="undefined"?e.getElementsByTagName("*"):typeof e.querySelectorAll!="undefined"?e.querySelectorAll("*"):[]}function _t(e){Et.test(e.type)&&(e.defaultChecked=e.checked)}function Qt(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Jt.length;while(i--){t=Jt[i]+n;if(t in e)return t}return r}function Gt(e,t){return e=t||e,v.css(e,"display")==="none"||!v.contains(e.ownerDocument,e)}function Yt(e,t){var n,r,i=[],s=0,o=e.length;for(;s<o;s++){n=e[s];if(!n.style)continue;i[s]=v._data(n,"olddisplay"),t?(!i[s]&&n.style.display==="none"&&(n.style.display=""),n.style.display===""&&Gt(n)&&(i[s]=v._data(n,"olddisplay",nn(n.nodeName)))):(r=Dt(n,"display"),!i[s]&&r!=="none"&&v._data(n,"olddisplay",r))}for(s=0;s<o;s++){n=e[s];if(!n.style)continue;if(!t||n.style.display==="none"||n.style.display==="")n.style.display=t?i[s]||"":"none"}return e}function Zt(e,t,n){var r=Rt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function en(e,t,n,r){var i=n===(r?"border":"content")?4:t==="width"?1:0,s=0;for(;i<4;i+=2)n==="margin"&&(s+=v.css(e,n+$t[i],!0)),r?(n==="content"&&(s-=parseFloat(Dt(e,"padding"+$t[i]))||0),n!=="margin"&&(s-=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0)):(s+=parseFloat(Dt(e,"padding"+$t[i]))||0,n!=="padding"&&(s+=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0));return s}function tn(e,t,n){var r=t==="width"?e.offsetWidth:e.offsetHeight,i=!0,s=v.support.boxSizing&&v.css(e,"boxSizing")==="border-box";if(r<=0||r==null){r=Dt(e,t);if(r<0||r==null)r=e.style[t];if(Ut.test(r))return r;i=s&&(v.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+en(e,t,n||(s?"border":"content"),i)+"px"}function nn(e){if(Wt[e])return Wt[e];var t=v("<"+e+">").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write("<!doctype html><html><body>"),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u<a;u++)r=o[u],s=/^\+/.test(r),s&&(r=r.substr(1)||"*"),i=e[r]=e[r]||[],i[s?"unshift":"push"](n)}}function kn(e,n,r,i,s,o){s=s||n.dataTypes[0],o=o||{},o[s]=!0;var u,a=e[s],f=0,l=a?a.length:0,c=e===Sn;for(;f<l&&(c||!u);f++)u=a[f](n,r,i),typeof u=="string"&&(!c||o[u]?u=t:(n.dataTypes.unshift(u),u=kn(e,n,r,i,u,o)));return(c||!u)&&!o["*"]&&(u=kn(e,n,r,i,"*",o)),u}function Ln(e,n){var r,i,s=v.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((s[r]?e:i||(i={}))[r]=n[r]);i&&v.extend(!0,e,i)}function An(e,n,r){var i,s,o,u,a=e.contents,f=e.dataTypes,l=e.responseFields;for(s in l)s in r&&(n[l[s]]=r[s]);while(f[0]==="*")f.shift(),i===t&&(i=e.mimeType||n.getResponseHeader("content-type"));if(i)for(s in a)if(a[s]&&a[s].test(i)){f.unshift(s);break}if(f[0]in r)o=f[0];else{for(s in r){if(!f[0]||e.converters[s+" "+f[0]]){o=s;break}u||(u=s)}o=o||u}if(o)return o!==f[0]&&f.unshift(o),r[o]}function On(e,t){var n,r,i,s,o=e.dataTypes.slice(),u=o[0],a={},f=0;e.dataFilter&&(t=e.dataFilter(t,e.dataType));if(o[1])for(n in e.converters)a[n.toLowerCase()]=e.converters[n];for(;i=o[++f];)if(i!=="*"){if(u!=="*"&&u!==i){n=a[u+" "+i]||a["* "+i];if(!n)for(r in a){s=r.split(" ");if(s[1]===i){n=a[u+" "+s[0]]||a["* "+s[0]];if(n){n===!0?n=a[r]:a[r]!==!0&&(i=s[0],o.splice(f--,0,i));break}}}if(n!==!0)if(n&&e["throws"])t=n(t);else try{t=n(t)}catch(l){return{state:"parsererror",error:n?l:"No conversion from "+u+" to "+i}}}u=i}return{state:"success",data:t}}function Fn(){try{return new e.XMLHttpRequest}catch(t){}}function In(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function $n(){return setTimeout(function(){qn=t},0),qn=v.now()}function Jn(e,t){v.each(t,function(t,n){var r=(Vn[t]||[]).concat(Vn["*"]),i=0,s=r.length;for(;i<s;i++)if(r[i].call(e,t,n))return})}function Kn(e,t,n){var r,i=0,s=0,o=Xn.length,u=v.Deferred().always(function(){delete a.elem}),a=function(){var t=qn||$n(),n=Math.max(0,f.startTime+f.duration-t),r=n/f.duration||0,i=1-r,s=0,o=f.tweens.length;for(;s<o;s++)f.tweens[s].run(i);return u.notifyWith(e,[f,i,n]),i<1&&o?n:(u.resolveWith(e,[f]),!1)},f=u.promise({elem:e,props:v.extend({},t),opts:v.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:qn||$n(),duration:n.duration,tweens:[],createTween:function(t,n,r){var i=v.Tween(e,f.opts,t,n,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(i),i},stop:function(t){var n=0,r=t?f.tweens.length:0;for(;n<r;n++)f.tweens[n].run(1);return t?u.resolveWith(e,[f,t]):u.rejectWith(e,[f,t]),this}}),l=f.props;Qn(l,f.opts.specialEasing);for(;i<o;i++){r=Xn[i].call(f,e,l,f.opts);if(r)return r}return Jn(f,l),v.isFunction(f.opts.start)&&f.opts.start.call(e,f),v.fx.timer(v.extend(a,{anim:f,queue:f.opts.queue,elem:e})),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always)}function Qn(e,t){var n,r,i,s,o;for(n in e){r=v.camelCase(n),i=t[r],s=e[n],v.isArray(s)&&(i=s[1],s=e[n]=s[0]),n!==r&&(e[r]=s,delete e[n]),o=v.cssHooks[r];if(o&&"expand"in o){s=o.expand(s),delete e[r];for(n in s)n in e||(e[n]=s[n],t[n]=i)}else t[r]=i}}function Gn(e,t,n){var r,i,s,o,u,a,f,l,c,h=this,p=e.style,d={},m=[],g=e.nodeType&&Gt(e);n.queue||(l=v._queueHooks(e,"fx"),l.unqueued==null&&(l.unqueued=0,c=l.empty.fire,l.empty.fire=function(){l.unqueued||c()}),l.unqueued++,h.always(function(){h.always(function(){l.unqueued--,v.queue(e,"fx").length||l.empty.fire()})})),e.nodeType===1&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],v.css(e,"display")==="inline"&&v.css(e,"float")==="none"&&(!v.support.inlineBlockNeedsLayout||nn(e.nodeName)==="inline"?p.display="inline-block":p.zoom=1)),n.overflow&&(p.overflow="hidden",v.support.shrinkWrapBlocks||h.done(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t){s=t[r];if(Un.exec(s)){delete t[r],a=a||s==="toggle";if(s===(g?"hide":"show"))continue;m.push(r)}}o=m.length;if(o){u=v._data(e,"fxshow")||v._data(e,"fxshow",{}),"hidden"in u&&(g=u.hidden),a&&(u.hidden=!g),g?v(e).show():h.done(function(){v(e).hide()}),h.done(function(){var t;v.removeData(e,"fxshow",!0);for(t in d)v.style(e,t,d[t])});for(r=0;r<o;r++)i=m[r],f=h.createTween(i,g?u[i]:0),d[i]=u[i]||v.style(e,i),i in u||(u[i]=f.start,g&&(f.end=f.start,f.start=i==="width"||i==="height"?1:0))}}function Yn(e,t,n,r,i){return new Yn.prototype.init(e,t,n,r,i)}function Zn(e,t){var n,r={height:e},i=0;t=t?1:0;for(;i<4;i+=2-t)n=$t[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function tr(e){return v.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}var n,r,i=e.document,s=e.location,o=e.navigator,u=e.jQuery,a=e.$,f=Array.prototype.push,l=Array.prototype.slice,c=Array.prototype.indexOf,h=Object.prototype.toString,p=Object.prototype.hasOwnProperty,d=String.prototype.trim,v=function(e,t){return new v.fn.init(e,t,n)},m=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,g=/\S/,y=/\s+/,b=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,w=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a<f;a++)if((e=arguments[a])!=null)for(n in e){r=u[n],i=e[n];if(u===i)continue;l&&i&&(v.isPlainObject(i)||(s=v.isArray(i)))?(s?(s=!1,o=r&&v.isArray(r)?r:[]):o=r&&v.isPlainObject(r)?r:{},u[n]=v.extend(l,o,i)):i!==t&&(u[n]=i)}return u},v.extend({noConflict:function(t){return e.$===v&&(e.$=a),t&&e.jQuery===v&&(e.jQuery=u),v},isReady:!1,readyWait:1,holdReady:function(e){e?v.readyWait++:v.ready(!0)},ready:function(e){if(e===!0?--v.readyWait:v.isReady)return;if(!i.body)return setTimeout(v.ready,1);v.isReady=!0;if(e!==!0&&--v.readyWait>0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s<o;)if(n.apply(e[s++],r)===!1)break}else if(u){for(i in e)if(n.call(e[i],i,e[i])===!1)break}else for(;s<o;)if(n.call(e[s],s,e[s++])===!1)break;return e},trim:d&&!d.call("\ufeff\u00a0")?function(e){return e==null?"":d.call(e)}:function(e){return e==null?"":(e+"").replace(b,"")},makeArray:function(e,t){var n,r=t||[];return e!=null&&(n=v.type(e),e.length==null||n==="string"||n==="function"||n==="regexp"||v.isWindow(e)?f.call(r,e):v.merge(r,e)),r},inArray:function(e,t,n){var r;if(t){if(c)return c.call(t,e,n);r=t.length,n=n?n<0?Math.max(0,r+n):n:0;for(;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,s=0;if(typeof r=="number")for(;s<r;s++)e[i++]=n[s];else while(n[s]!==t)e[i++]=n[s++];return e.length=i,e},grep:function(e,t,n){var r,i=[],s=0,o=e.length;n=!!n;for(;s<o;s++)r=!!t(e[s],s),n!==r&&i.push(e[s]);return i},map:function(e,n,r){var i,s,o=[],u=0,a=e.length,f=e instanceof v||a!==t&&typeof a=="number"&&(a>0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u<a;u++)i=n(e[u],u,r),i!=null&&(o[o.length]=i);else for(s in e)i=n(e[s],s,r),i!=null&&(o[o.length]=i);return o.concat.apply([],o)},guid:1,proxy:function(e,n){var r,i,s;return typeof n=="string"&&(r=e[n],n=e,e=r),v.isFunction(e)?(i=l.call(arguments,2),s=function(){return e.apply(n,i.concat(l.call(arguments)))},s.guid=e.guid=e.guid||v.guid++,s):t},access:function(e,n,r,i,s,o,u){var a,f=r==null,l=0,c=e.length;if(r&&typeof r=="object"){for(l in r)v.access(e,n,l,r[l],1,o,i);s=1}else if(i!==t){a=u===t&&v.isFunction(i),f&&(a?(a=n,n=function(e,t,n){return a.call(v(e),n)}):(n.call(e,i),n=null));if(n)for(;l<c;l++)n(e[l],r,a?i.call(e[l],l,n(e[l],r)):i,u);s=1}return s?e:f?n.call(e):c?n(e[0],r):o},now:function(){return(new Date).getTime()}}),v.ready.promise=function(t){if(!r){r=v.Deferred();if(i.readyState==="complete")setTimeout(v.ready,1);else if(i.addEventListener)i.addEventListener("DOMContentLoaded",A,!1),e.addEventListener("load",v.ready,!1);else{i.attachEvent("onreadystatechange",A),e.attachEvent("onload",v.ready);var n=!1;try{n=e.frameElement==null&&i.documentElement}catch(s){}n&&n.doScroll&&function o(){if(!v.isReady){try{n.doScroll("left")}catch(e){return setTimeout(o,50)}v.ready()}}()}}return r.promise(t)},v.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,t){O["[object "+t+"]"]=t.toLowerCase()}),n=v(i);var M={};v.Callbacks=function(e){e=typeof e=="string"?M[e]||_(e):v.extend({},e);var n,r,i,s,o,u,a=[],f=!e.once&&[],l=function(t){n=e.memory&&t,r=!0,u=s||0,s=0,o=a.length,i=!0;for(;a&&u<o;u++)if(a[u].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}i=!1,a&&(f?f.length&&l(f.shift()):n?a=[]:c.disable())},c={add:function(){if(a){var t=a.length;(function r(t){v.each(t,function(t,n){var i=v.type(n);i==="function"?(!e.unique||!c.has(n))&&a.push(n):n&&n.length&&i!=="string"&&r(n)})})(arguments),i?o=a.length:n&&(s=t,l(n))}return this},remove:function(){return a&&v.each(arguments,function(e,t){var n;while((n=v.inArray(t,a,n))>-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t<r;t++)n[t]&&v.isFunction(n[t].promise)?n[t].promise().done(o(t,f,n)).fail(s.reject).progress(o(t,a,u)):--i}return i||s.resolveWith(f,n),s.promise()}}),v.support=function(){var t,n,r,s,o,u,a,f,l,c,h,p=i.createElement("div");p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="<table><tr><td></td><td>t</td></tr></table>",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="<div></div>",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i<s;i++)delete r[t[i]];if(!(n?B:v.isEmptyObject)(r))return}}if(!n){delete u[a].data;if(!B(u[a]))return}o?v.cleanData([e],!0):v.support.deleteExpando||u!=u.window?delete u[a]:u[a]=null},_data:function(e,t,n){return v.data(e,t,n,!0)},acceptData:function(e){var t=e.nodeName&&v.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),v.fn.extend({data:function(e,n){var r,i,s,o,u,a=this[0],f=0,l=null;if(e===t){if(this.length){l=v.data(a);if(a.nodeType===1&&!v._data(a,"parsedAttrs")){s=a.attributes;for(u=s.length;f<u;f++)o=s[f].name,o.indexOf("data-")||(o=v.camelCase(o.substring(5)),H(a,o,l[o]));v._data(a,"parsedAttrs",!0)}}return l}return typeof e=="object"?this.each(function(){v.data(this,e)}):(r=e.split(".",2),r[1]=r[1]?"."+r[1]:"",i=r[1]+"!",v.access(this,function(n){if(n===t)return l=this.triggerHandler("getData"+i,[r[0]]),l===t&&a&&(l=v.data(a,e),l=H(a,e,l)),l===t&&r[1]?this.data(r[0]):l;r[1]=n,this.each(function(){var t=v(this);t.triggerHandler("setData"+i,r),v.data(this,e,n),t.triggerHandler("changeData"+i,r)})},null,n,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length<r?v.queue(this[0],e):n===t?this:this.each(function(){var t=v.queue(this,e,n);v._queueHooks(this,e),e==="fx"&&t[0]!=="inprogress"&&v.dequeue(this,e)})},dequeue:function(e){return this.each(function(){v.dequeue(this,e)})},delay:function(e,t){return e=v.fx?v.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,s=v.Deferred(),o=this,u=this.length,a=function(){--i||s.resolveWith(o,[o])};typeof e!="string"&&(n=e,e=t),e=e||"fx";while(u--)r=v._data(o[u],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(a));return a(),s.promise(n)}});var j,F,I,q=/[\t\r\n]/g,R=/\r/g,U=/^(?:button|input)$/i,z=/^(?:button|input|object|select|textarea)$/i,W=/^a(?:rea|)$/i,X=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,V=v.support.getSetAttribute;v.fn.extend({attr:function(e,t){return v.access(this,v.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n<r;n++){i=this[n];if(i.nodeType===1)if(!i.className&&t.length===1)i.className=e;else{s=" "+i.className+" ";for(o=0,u=t.length;o<u;o++)s.indexOf(" "+t[o]+" ")<0&&(s+=t[o]+" ");i.className=v.trim(s)}}}return this},removeClass:function(e){var n,r,i,s,o,u,a;if(v.isFunction(e))return this.each(function(t){v(this).removeClass(e.call(this,t,this.className))});if(e&&typeof e=="string"||e===t){n=(e||"").split(y);for(u=0,a=this.length;u<a;u++){i=this[u];if(i.nodeType===1&&i.className){r=(" "+i.className+" ").replace(q," ");for(s=0,o=n.length;s<o;s++)while(r.indexOf(" "+n[s]+" ")>=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n<r;n++)if(this[n].nodeType===1&&(" "+this[n].className+" ").replace(q," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a<u;a++){n=r[a];if((n.selected||a===i)&&(v.support.optDisabled?!n.disabled:n.getAttribute("disabled")===null)&&(!n.parentNode.disabled||!v.nodeName(n.parentNode,"optgroup"))){t=v(n).val();if(s)return t;o.push(t)}}return o},set:function(e,t){var n=v.makeArray(t);return v(e).find("option").each(function(){this.selected=v.inArray(v(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o<r.length;o++)i=r[o],i&&(n=v.propFix[i]||i,s=X.test(i),s||v.attr(e,i,""),e.removeAttribute(V?i:n),s&&n in e&&(e[n]=!1))}},attrHooks:{type:{set:function(e,t){if(U.test(e.nodeName)&&e.parentNode)v.error("type property can't be changed");else if(!v.support.radioValue&&t==="radio"&&v.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},value:{get:function(e,t){return j&&v.nodeName(e,"button")?j.get(e,t):t in e?e.value:null},set:function(e,t,n){if(j&&v.nodeName(e,"button"))return j.set(e,t,n);e.value=t}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,s,o,u=e.nodeType;if(!e||u===3||u===8||u===2)return;return o=u!==1||!v.isXMLDoc(e),o&&(n=v.propFix[n]||n,s=v.propHooks[n]),r!==t?s&&"set"in s&&(i=s.set(e,r,n))!==t?i:e[n]=r:s&&"get"in s&&(i=s.get(e,n))!==null?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):z.test(e.nodeName)||W.test(e.nodeName)&&e.href?0:t}}}}),F={get:function(e,n){var r,i=v.prop(e,n);return i===!0||typeof i!="boolean"&&(r=e.getAttributeNode(n))&&r.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var r;return t===!1?v.removeAttr(e,n):(r=v.propFix[n]||n,r in e&&(e[r]=!0),e.setAttribute(n,n.toLowerCase())),n}},V||(I={name:!0,id:!0,coords:!0},j=v.valHooks.button={get:function(e,n){var r;return r=e.getAttributeNode(n),r&&(I[n]?r.value!=="":r.specified)?r.value:t},set:function(e,t,n){var r=e.getAttributeNode(n);return r||(r=i.createAttribute(n),e.setAttributeNode(r)),r.value=t+""}},v.each(["width","height"],function(e,t){v.attrHooks[t]=v.extend(v.attrHooks[t],{set:function(e,n){if(n==="")return e.setAttribute(t,"auto"),n}})}),v.attrHooks.contenteditable={get:j.get,set:function(e,t,n){t===""&&(t="false"),j.set(e,t,n)}}),v.support.hrefNormalized||v.each(["href","src","width","height"],function(e,n){v.attrHooks[n]=v.extend(v.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return r===null?t:r}})}),v.support.style||(v.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=t+""}}),v.support.optSelected||(v.propHooks.selected=v.extend(v.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),v.support.enctype||(v.propFix.enctype="encoding"),v.support.checkOn||v.each(["radio","checkbox"],function(){v.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}}),v.each(["radio","checkbox"],function(){v.valHooks[this]=v.extend(v.valHooks[this],{set:function(e,t){if(v.isArray(t))return e.checked=v.inArray(v(e).val(),t)>=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f<n.length;f++){l=J.exec(n[f])||[],c=l[1],h=(l[2]||"").split(".").sort(),g=v.event.special[c]||{},c=(s?g.delegateType:g.bindType)||c,g=v.event.special[c]||{},p=v.extend({type:c,origType:l[1],data:i,handler:r,guid:r.guid,selector:s,needsContext:s&&v.expr.match.needsContext.test(s),namespace:h.join(".")},d),m=a[c];if(!m){m=a[c]=[],m.delegateCount=0;if(!g.setup||g.setup.call(e,i,h,u)===!1)e.addEventListener?e.addEventListener(c,u,!1):e.attachEvent&&e.attachEvent("on"+c,u)}g.add&&(g.add.call(e,p),p.handler.guid||(p.handler.guid=r.guid)),s?m.splice(m.delegateCount++,0,p):m.push(p),v.event.global[c]=!0}e=null},global:{},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,m,g=v.hasData(e)&&v._data(e);if(!g||!(h=g.events))return;t=v.trim(Z(t||"")).split(" ");for(s=0;s<t.length;s++){o=J.exec(t[s])||[],u=a=o[1],f=o[2];if(!u){for(u in h)v.event.remove(e,u+t[s],n,r,!0);continue}p=v.event.special[u]||{},u=(r?p.delegateType:p.bindType)||u,d=h[u]||[],l=d.length,f=f?new RegExp("(^|\\.)"+f.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(c=0;c<d.length;c++)m=d[c],(i||a===m.origType)&&(!n||n.guid===m.guid)&&(!f||f.test(m.namespace))&&(!r||r===m.selector||r==="**"&&m.selector)&&(d.splice(c--,1),m.selector&&d.delegateCount--,p.remove&&p.remove.call(e,m));d.length===0&&l!==d.length&&((!p.teardown||p.teardown.call(e,f,g.handle)===!1)&&v.removeEvent(e,u,g.handle),delete h[u])}v.isEmptyObject(h)&&(delete g.handle,v.removeData(e,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,r,s,o){if(!s||s.nodeType!==3&&s.nodeType!==8){var u,a,f,l,c,h,p,d,m,g,y=n.type||n,b=[];if(Y.test(y+v.event.triggered))return;y.indexOf("!")>=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f<m.length&&!n.isPropagationStopped();f++)l=m[f][0],n.type=m[f][1],d=(v._data(l,"events")||{})[n.type]&&v._data(l,"handle"),d&&d.apply(l,r),d=h&&l[h],d&&v.acceptData(l)&&d.apply&&d.apply(l,r)===!1&&n.preventDefault();return n.type=y,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(s.ownerDocument,r)===!1)&&(y!=="click"||!v.nodeName(s,"a"))&&v.acceptData(s)&&h&&s[y]&&(y!=="focus"&&y!=="blur"||n.target.offsetWidth!==0)&&!v.isWindow(s)&&(c=s[h],c&&(s[h]=null),v.event.triggered=y,s[y](),v.event.triggered=t,c&&(s[h]=c)),n.result}return},dispatch:function(n){n=v.event.fix(n||e.event);var r,i,s,o,u,a,f,c,h,p,d=(v._data(this,"events")||{})[n.type]||[],m=d.delegateCount,g=l.call(arguments),y=!n.exclusive&&!n.namespace,b=v.event.special[n.type]||{},w=[];g[0]=n,n.delegateTarget=this;if(b.preDispatch&&b.preDispatch.call(this,n)===!1)return;if(m&&(!n.button||n.type!=="click"))for(s=n.target;s!=this;s=s.parentNode||this)if(s.disabled!==!0||n.type!=="click"){u={},f=[];for(r=0;r<m;r++)c=d[r],h=c.selector,u[h]===t&&(u[h]=c.needsContext?v(h,this).index(s)>=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r<w.length&&!n.isPropagationStopped();r++){a=w[r],n.currentTarget=a.elem;for(i=0;i<a.matches.length&&!n.isImmediatePropagationStopped();i++){c=a.matches[i];if(y||!n.namespace&&!c.namespace||n.namespace_re&&n.namespace_re.test(c.namespace))n.data=c.data,n.handleObj=c,o=((v.event.special[c.origType]||{}).handle||c.handler).apply(a.elem,g),o!==t&&(n.result=o,o===!1&&(n.preventDefault(),n.stopPropagation()))}}return b.postDispatch&&b.postDispatch.call(this,n),n.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return e.which==null&&(e.which=t.charCode!=null?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,s,o,u=n.button,a=n.fromElement;return e.pageX==null&&n.clientX!=null&&(r=e.target.ownerDocument||i,s=r.documentElement,o=r.body,e.pageX=n.clientX+(s&&s.scrollLeft||o&&o.scrollLeft||0)-(s&&s.clientLeft||o&&o.clientLeft||0),e.pageY=n.clientY+(s&&s.scrollTop||o&&o.scrollTop||0)-(s&&s.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?n.toElement:a),!e.which&&u!==t&&(e.which=u&1?1:u&2?3:u&4?2:0),e}},fix:function(e){if(e[v.expando])return e;var t,n,r=e,s=v.event.fixHooks[e.type]||{},o=s.props?this.props.concat(s.props):this.props;e=v.Event(r);for(t=o.length;t;)n=o[--t],e[n]=r[n];return e.target||(e.target=r.srcElement||i),e.target.nodeType===3&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,r):e},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(e,t,n){v.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,r){var i=v.extend(new v.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?v.event.trigger(i,null,t):v.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},v.event.handle=v.event.dispatch,v.removeEvent=i.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]=="undefined"&&(e[r]=null),e.detachEvent(r,n))},v.Event=function(e,t){if(!(this instanceof v.Event))return new v.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?tt:et):this.type=e,t&&v.extend(this,t),this.timeStamp=e&&e.timeStamp||v.now(),this[v.expando]=!0},v.Event.prototype={preventDefault:function(){this.isDefaultPrevented=tt;var e=this.originalEvent;if(!e)return;e.preventDefault?e.preventDefault():e.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=tt;var e=this.originalEvent;if(!e)return;e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=tt,this.stopPropagation()},isDefaultPrevented:et,isPropagationStopped:et,isImmediatePropagationStopped:et},v.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){v.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj,o=s.selector;if(!i||i!==r&&!v.contains(r,i))e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t;return n}}}),v.support.submitBubbles||(v.event.special.submit={setup:function(){if(v.nodeName(this,"form"))return!1;v.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=v.nodeName(n,"input")||v.nodeName(n,"button")?n.form:t;r&&!v._data(r,"_submit_attached")&&(v.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),v._data(r,"_submit_attached",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&v.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(v.nodeName(this,"form"))return!1;v.event.remove(this,"._submit")}}),v.support.changeBubbles||(v.event.special.change={setup:function(){if($.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")v.event.add(this,"propertychange._change",function(e){e.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),v.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),v.event.simulate("change",this,e,!0)});return!1}v.event.add(this,"beforeactivate._change",function(e){var t=e.target;$.test(t.nodeName)&&!v._data(t,"_change_attached")&&(v.event.add(t,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&v.event.simulate("change",this.parentNode,e,!0)}),v._data(t,"_change_attached",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||t.type!=="radio"&&t.type!=="checkbox")return e.handleObj.handler.apply(this,arguments)},teardown:function(){return v.event.remove(this,"._change"),!$.test(this.nodeName)}}),v.support.focusinBubbles||v.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){v.event.simulate(t,e.target,v.event.fix(e),!0)};v.event.special[t]={setup:function(){n++===0&&i.addEventListener(e,r,!0)},teardown:function(){--n===0&&i.removeEventListener(e,r,!0)}}}),v.fn.extend({on:function(e,n,r,i,s){var o,u;if(typeof e=="object"){typeof n!="string"&&(r=r||n,n=t);for(u in e)this.on(u,n,r,e[u],s);return this}r==null&&i==null?(i=n,r=n=t):i==null&&(typeof n=="string"?(i=r,r=t):(i=r,r=n,n=t));if(i===!1)i=et;else if(!i)return this;return s===1&&(o=i,i=function(e){return v().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=v.guid++)),this.each(function(){v.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,s;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,v(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if(typeof e=="object"){for(s in e)this.off(s,n,e[s]);return this}if(n===!1||typeof n=="function")r=n,n=t;return r===!1&&(r=et),this.each(function(){v.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return v(this.context).on(e,this.selector,t,n),this},die:function(e,t){return v(this.context).off(e,this.selector||"**",t),this},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length===1?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){v.event.trigger(e,t,this)})},triggerHandler:function(e,t){if(this[0])return v.event.trigger(e,t,this[0],!0)},toggle:function(e){var t=arguments,n=e.guid||v.guid++,r=0,i=function(n){var i=(v._data(this,"lastToggle"+e.guid)||0)%r;return v._data(this,"lastToggle"+e.guid,i+1),n.preventDefault(),t[i].apply(this,arguments)||!1};i.guid=n;while(r<t.length)t[r++].guid=n;return this.click(i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),v.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){v.fn[t]=function(e,n){return n==null&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u<a;u++)if(s=e[u])if(!n||n(s,r,i))o.push(s),f&&t.push(u);return o}function ct(e,t,n,r,i,s){return r&&!r[d]&&(r=ct(r)),i&&!i[d]&&(i=ct(i,s)),N(function(s,o,u,a){var f,l,c,h=[],p=[],d=o.length,v=s||dt(t||"*",u.nodeType?[u]:u,[]),m=e&&(s||!t)?lt(v,h,e,u,a):v,g=n?i||(s?e:d||r)?[]:o:m;n&&n(m,g,u,a);if(r){f=lt(g,p),r(f,[],u,a),l=f.length;while(l--)if(c=f[l])g[p[l]]=!(m[p[l]]=c)}if(s){if(i||e){if(i){f=[],l=g.length;while(l--)(c=g[l])&&f.push(m[l]=c);i(null,g=[],f,a)}l=g.length;while(l--)(c=g[l])&&(f=i?T.call(s,c):h[l])>-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a<s;a++)if(n=i.relative[e[a].type])h=[at(ft(h),n)];else{n=i.filter[e[a].type].apply(null,e[a].matches);if(n[d]){r=++a;for(;r<s;r++)if(i.relative[e[r].type])break;return ct(a>1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a<r&&ht(e.slice(a,r)),r<s&&ht(e=e.slice(r)),r<s&&e.join(""))}h.push(n)}return ft(h)}function pt(e,t){var r=t.length>0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r<i;r++)nt(e,t[r],n);return n}function vt(e,t,n,r,s){var o,u,f,l,c,h=ut(e),p=h.length;if(!r&&h.length===1){u=h[0]=h[0].slice(0);if(u.length>2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;t<n;t++)if(this[t]===e)return t;return-1},N=function(e,t){return e[d]=t==null||t,e},C=function(){var e={},t=[];return N(function(n,r){return t.push(n)>i.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="<a name='"+d+"'></a><div name='"+d+"'></div>",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:st(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:st(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},f=y.compareDocumentPosition?function(e,t){return e===t?(l=!0,0):(!e.compareDocumentPosition||!t.compareDocumentPosition?e.compareDocumentPosition:e.compareDocumentPosition(t)&4)?-1:1}:function(e,t){if(e===t)return l=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,r,i=[],s=[],o=e.parentNode,u=t.parentNode,a=o;if(o===u)return ot(e,t);if(!o)return-1;if(!u)return 1;while(a)i.unshift(a),a=a.parentNode;a=u;while(a)s.unshift(a),a=a.parentNode;n=i.length,r=s.length;for(var f=0;f<n&&f<r;f++)if(i[f]!==s[f])return ot(i[f],s[f]);return f===n?ot(e,s[f],-1):ot(i[f],t,1)},[0,0].sort(f),h=!l,nt.uniqueSort=function(e){var t,n=[],r=1,i=0;l=h,e.sort(f);if(l){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e},nt.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},a=nt.compile=function(e,t){var n,r=[],i=[],s=A[d][e+" "];if(!s){t||(t=ut(e)),n=t.length;while(n--)s=ht(t[n]),s[d]?r.push(s):i.push(s);s=A(e,pt(i,r))}return s},g.querySelectorAll&&function(){var e,t=vt,n=/'|\\/g,r=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,i=[":focus"],s=[":active"],u=y.matchesSelector||y.mozMatchesSelector||y.webkitMatchesSelector||y.oMatchesSelector||y.msMatchesSelector;K(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="<p test=''></p>",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="<input type='hidden'/>",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t<n;t++)if(v.contains(u[t],this))return!0});o=this.pushStack("","find",e);for(t=0,n=this.length;t<n;t++){r=o.length,v.find(e,this[t],o);if(t>0)for(i=r;i<o.length;i++)for(s=0;s<r;s++)if(o[s]===o[i]){o.splice(i--,1);break}}return o},has:function(e){var t,n=v(e,this),r=n.length;return this.filter(function(){for(t=0;t<r;t++)if(v.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1),"not",e)},filter:function(e){return this.pushStack(ft(this,e,!0),"filter",e)},is:function(e){return!!e&&(typeof e=="string"?st.test(e)?v(e,this.context).index(this[0])>=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r<i;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&n.nodeType!==11){if(o?o.index(n)>-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/<tbody/i,gt=/<|?\w+;/,yt=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,wt=new RegExp("<(?:"+ct+")[\\s/>]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,Nt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X<div>","</div>"]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1></$2>");try{for(;r<i;r++)n=this[r]||{},n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),n.innerHTML=e);n=0}catch(s){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return ut(this[0])?this.length?this.pushStack(v(v.isFunction(e)?e():e),"replaceWith",e):this:v.isFunction(e)?this.each(function(t){var n=v(this),r=n.html();n.replaceWith(e.call(this,t,r))}):(typeof e!="string"&&(e=v(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;v(this).remove(),t?v(t).before(e):v(n).append(e)}))},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=[].concat.apply([],e);var i,s,o,u,a=0,f=e[0],l=[],c=this.length;if(!v.support.checkClone&&c>1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a<c;a++)r.call(n&&v.nodeName(this[a],"table")?Lt(this[a],"tbody"):this[a],a===u?o:v.clone(o,!0,!0))}o=s=null,l.length&&v.each(l,function(e,t){t.src?v.ajax?v.ajax({url:t.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):v.error("no ajax"):v.globalEval((t.text||t.textContent||t.innerHTML||"").replace(Tt,"")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),v.buildFragment=function(e,n,r){var s,o,u,a=e[0];return n=n||i,n=!n.nodeType&&n[0]||n,n=n.ownerDocument||n,e.length===1&&typeof a=="string"&&a.length<512&&n===i&&a.charAt(0)==="<"&&!bt.test(a)&&(v.support.checkClone||!St.test(a))&&(v.support.html5Clone||!wt.test(a))&&(o=!0,s=v.fragments[a],u=s!==t),s||(s=n.createDocumentFragment(),v.clean(e,n,s,r),o&&(v.fragments[a]=u&&s)),{fragment:s,cacheable:o}},v.fragments={},v.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){v.fn[e]=function(n){var r,i=0,s=[],o=v(n),u=o.length,a=this.length===1&&this[0].parentNode;if((a==null||a&&a.nodeType===11&&a.childNodes.length===1)&&u===1)return o[t](this[0]),this;for(;i<u;i++)r=(i>0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1></$2>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]==="<table>"&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("<div>").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r<i;r++)n=e[r],Vn[n]=Vn[n]||[],Vn[n].unshift(t)},prefilter:function(e,t){t?Xn.unshift(e):Xn.push(e)}}),v.Tween=Yn,Yn.prototype={constructor:Yn,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(v.cssNumber[n]?"":"px")},cur:function(){var e=Yn.propHooks[this.prop];return e&&e.get?e.get(this):Yn.propHooks._default.get(this)},run:function(e){var t,n=Yn.propHooks[this.prop];return this.options.duration?this.pos=t=v.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Yn.propHooks._default.set(this),this}},Yn.prototype.init.prototype=Yn.prototype,Yn.propHooks={_default:{get:function(e){var t;return e.elem[e.prop]==null||!!e.elem.style&&e.elem.style[e.prop]!=null?(t=v.css(e.elem,e.prop,!1,""),!t||t==="auto"?0:t):e.elem[e.prop]},set:function(e){v.fx.step[e.prop]?v.fx.step[e.prop](e):e.elem.style&&(e.elem.style[v.cssProps[e.prop]]!=null||v.cssHooks[e.prop])?v.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Yn.propHooks.scrollTop=Yn.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},v.each(["toggle","show","hide"],function(e,t){var n=v.fn[t];v.fn[t]=function(r,i,s){return r==null||typeof r=="boolean"||!e&&v.isFunction(r)&&v.isFunction(i)?n.apply(this,arguments):this.animate(Zn(t,!0),r,i,s)}}),v.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Gt).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=v.isEmptyObject(e),s=v.speed(t,n,r),o=function(){var t=Kn(this,v.extend({},e),s);i&&t.stop(!0)};return i||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return typeof e!="string"&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=e!=null&&e+"queueHooks",s=v.timers,o=v._data(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(n in o)o[n]&&o[n].stop&&Wn.test(n)&&i(o[n]);for(n=s.length;n--;)s[n].elem===this&&(e==null||s[n].queue===e)&&(s[n].anim.stop(r),t=!1,s.splice(n,1));(t||!r)&&v.dequeue(this,e)})}}),v.each({slideDown:Zn("show"),slideUp:Zn("hide"),slideToggle:Zn("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){v.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),v.speed=function(e,t,n){var r=e&&typeof e=="object"?v.extend({},e):{complete:n||!n&&t||v.isFunction(e)&&e,duration:e,easing:n&&t||t&&!v.isFunction(t)&&t};r.duration=v.fx.off?0:typeof r.duration=="number"?r.duration:r.duration in v.fx.speeds?v.fx.speeds[r.duration]:v.fx.speeds._default;if(r.queue==null||r.queue===!0)r.queue="fx";return r.old=r.complete,r.complete=function(){v.isFunction(r.old)&&r.old.call(this),r.queue&&v.dequeue(this,r.queue)},r},v.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},v.timers=[],v.fx=Yn.prototype.init,v.fx.tick=function(){var e,n=v.timers,r=0;qn=v.now();for(;r<n.length;r++)e=n[r],!e()&&n[r]===e&&n.splice(r--,1);n.length||v.fx.stop(),qn=t},v.fx.timer=function(e){e()&&v.timers.push(e)&&!Rn&&(Rn=setInterval(v.fx.tick,v.fx.interval))},v.fx.interval=13,v.fx.stop=function(){clearInterval(Rn),Rn=null},v.fx.speeds={slow:600,fast:200,_default:400},v.fx.step={},v.expr&&v.expr.filters&&(v.expr.filters.animated=function(e){return v.grep(v.timers,function(t){return e===t.elem}).length});var er=/^(?:body|html)$/i;v.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){v.offset.setOffset(this,e,t)});var n,r,i,s,o,u,a,f={top:0,left:0},l=this[0],c=l&&l.ownerDocument;if(!c)return;return(r=c.body)===l?v.offset.bodyOffset(l):(n=c.documentElement,v.contains(n,l)?(typeof l.getBoundingClientRect!="undefined"&&(f=l.getBoundingClientRect()),i=tr(c),s=n.clientTop||r.clientTop||0,o=n.clientLeft||r.clientLeft||0,u=i.pageYOffset||n.scrollTop,a=i.pageXOffset||n.scrollLeft,{top:f.top+u-s,left:f.left+a-o}):f)},v.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft;return v.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(v.css(e,"marginTop"))||0,n+=parseFloat(v.css(e,"marginLeft"))||0),{top:t,left:n}},setOffset:function(e,t,n){var r=v.css(e,"position");r==="static"&&(e.style.position="relative");var i=v(e),s=i.offset(),o=v.css(e,"top"),u=v.css(e,"left"),a=(r==="absolute"||r==="fixed")&&v.inArray("auto",[o,u])>-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return v})})(window);/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net) + * Licensed under the MIT License (LICENSE.txt). + * + * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. + * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. + * Thanks to: Seamus Leahy for adding deltaX and deltaY + * + * Version: 3.0.6 + * + * Requires: 1.2.2+ + */ +(function(a){function d(b){var c=b||window.event,d=[].slice.call(arguments,1),e=0,f=!0,g=0,h=0;return b=a.event.fix(c),b.type="mousewheel",c.wheelDelta&&(e=c.wheelDelta/120),c.detail&&(e=-c.detail/3),h=e,c.axis!==undefined&&c.axis===c.HORIZONTAL_AXIS&&(h=0,g=-1*e),c.wheelDeltaY!==undefined&&(h=c.wheelDeltaY/120),c.wheelDeltaX!==undefined&&(g=-1*c.wheelDeltaX/120),d.unshift(b,e,g,h),(a.event.dispatch||a.event.handle).apply(this,d)}var b=["DOMMouseScroll","mousewheel"];if(a.event.fixHooks)for(var c=b.length;c;)a.event.fixHooks[b[--c]]=a.event.mouseHooks;a.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=b.length;a;)this.addEventListener(b[--a],d,!1);else this.onmousewheel=d},teardown:function(){if(this.removeEventListener)for(var a=b.length;a;)this.removeEventListener(b[--a],d,!1);else this.onmousewheel=null}},a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery) Added: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/js/ChemDoodleWeb-sketcher.js =================================================================== --- trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/js/ChemDoodleWeb-sketcher.js (rev 0) +++ trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/js/ChemDoodleWeb-sketcher.js 2013-01-24 11:34:39 UTC (rev 57) @@ -0,0 +1,261 @@ +// +// ChemDoodle Web Components 5.0.0 +// +// http://web.chemdoodle.com +// +// Copyright 2009-2012 iChemLabs, LLC. All rights reserved. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// As a special exception to the GPL, any HTML file in a public website +// or any free web service which merely makes function calls to this +// code, and for that purpose includes it by reference, shall be deemed +// a separate work for copyright law purposes. If you modify this code, +// you may extend this exception to your version of the code, but you +// are not obligated to do so. If you do not wish to do so, delete this +// exception statement from your version. +// +// As an additional exception to the GPL, you may distribute this +// packed form of the code without the copy of the GPL license normally +// required, provided you include this license notice and a URL through +// which recipients can access the corresponding unpacked source code. +// +// This program 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 General Public License for more details. +// +// Please contact iChemLabs <http://www.ichemlabs.com/contact> for +// alternate licensing options. +// +ChemDoodle.sketcher=function(){var a={actions:{},gui:{}};a.gui.desktop={};a.gui.mobile={};a.states={};a.tools={};return a}();(function(a){a._Action=function(){this.forward=function(a){this.innerForward();this.checks(a)};this.reverse=function(a){this.innerReverse();this.checks(a)};this.checks=function(a){for(var f=0,c=a.molecules.length;f<c;f++)a.molecules[f].check();a.lasso&&a.lasso.isActive()&&a.lasso.setBounds();a.repaint()};return!0}})(ChemDoodle.sketcher.actions); +(function(a,d,f,c){f.AddAction=function(e,b,a,j){this.sketcher=e;this.a=b;this.as=a;this.bs=j;return!0};f.AddAction.prototype=new f._Action;f.AddAction.prototype.innerForward=function(){var e=this.sketcher.getMoleculeByAtom(this.a);e||(e=new d.Molecule,this.sketcher.molecules.push(e));if(this.as)for(var b=0,a=this.as.length;b<a;b++)e.atoms.push(this.as[b]);if(this.bs){for(var j=[],b=0,a=this.bs.length;b<a;b++){var m=this.bs[b];if(-1===c(m.a1,e.atoms)){var g=this.sketcher.getMoleculeByAtom(m.a1);-1=== +c(g,j)&&j.push(g)}-1===c(m.a2,e.atoms)&&(g=this.sketcher.getMoleculeByAtom(m.a2),-1===c(g,j)&&j.push(g));e.bonds.push(m)}b=0;for(a=j.length;b<a;b++)m=j[b],this.sketcher.removeMolecule(m),e.atoms=e.atoms.concat(m.atoms),e.bonds=e.bonds.concat(m.bonds)}};f.AddAction.prototype.innerReverse=function(){var e=this.sketcher.getMoleculeByAtom(this.a);if(this.as){for(var b=[],d=0,j=e.atoms.length;d<j;d++)-1===c(e.atoms[d],this.as)&&b.push(e.atoms[d]);e.atoms=b}if(this.bs){b=[];d=0;for(j=e.bonds.length;d<j;d++)-1=== +c(e.bonds[d],this.bs)&&b.push(e.bonds[d]);e.bonds=b}if(0===e.atoms.length)this.sketcher.removeMolecule(e);else if(b=(new a.Splitter).split(e),1<b.length){this.sketcher.removeMolecule(e);d=0;for(j=b.length;d<j;d++)this.sketcher.molecules.push(b[d])}}})(ChemDoodle.informatics,ChemDoodle.structures,ChemDoodle.sketcher.actions,jQuery.inArray); +(function(a){a.AddShapeAction=function(a,f){this.sketcher=a;this.s=f;return!0};a.AddShapeAction.prototype=new a._Action;a.AddShapeAction.prototype.innerForward=function(){this.sketcher.shapes.push(this.s)};a.AddShapeAction.prototype.innerReverse=function(){this.sketcher.removeShape(this.s)}})(ChemDoodle.sketcher.actions); +(function(a,d){a.ChangeBondAction=function(a,c,e){this.b=a;this.orderBefore=a.bondOrder;this.stereoBefore=a.stereo;c?(this.orderAfter=c,this.stereoAfter=e):(this.orderAfter=a.bondOrder+1,3<this.orderAfter&&(this.orderAfter=1),this.stereoAfter=d.STEREO_NONE);return!0};a.ChangeBondAction.prototype=new a._Action;a.ChangeBondAction.prototype.innerForward=function(){this.b.bondOrder=this.orderAfter;this.b.stereo=this.stereoAfter};a.ChangeBondAction.prototype.innerReverse=function(){this.b.bondOrder=this.orderBefore; +this.b.stereo=this.stereoBefore}})(ChemDoodle.sketcher.actions,ChemDoodle.structures.Bond);(function(a){a.ChangeChargeAction=function(a,f){this.a=a;this.delta=f;return!0};a.ChangeChargeAction.prototype=new a._Action;a.ChangeChargeAction.prototype.innerForward=function(){this.a.charge+=this.delta};a.ChangeChargeAction.prototype.innerReverse=function(){this.a.charge-=this.delta}})(ChemDoodle.sketcher.actions); +(function(a){a.ChangeCoordinatesAction=function(a,f){this.as=a;this.recs=[];for(var c=0,e=this.as.length;c<e;c++)this.recs[c]={xo:this.as[c].x,yo:this.as[c].y,xn:f[c].x,yn:f[c].y};return!0};a.ChangeCoordinatesAction.prototype=new a._Action;a.ChangeCoordinatesAction.prototype.innerForward=function(){for(var a=0,f=this.as.length;a<f;a++)this.as[a].x=this.recs[a].xn,this.as[a].y=this.recs[a].yn};a.ChangeCoordinatesAction.prototype.innerReverse=function(){for(var a=0,f=this.as.length;a<f;a++)this.as[a].x= +this.recs[a].xo,this.as[a].y=this.recs[a].yo}})(ChemDoodle.sketcher.actions);(function(a){a.ChangeLabelAction=function(a,f){this.a=a;this.before=a.label;this.after=f;return!0};a.ChangeLabelAction.prototype=new a._Action;a.ChangeLabelAction.prototype.innerForward=function(){this.a.label=this.after};a.ChangeLabelAction.prototype.innerReverse=function(){this.a.label=this.before}})(ChemDoodle.sketcher.actions); +(function(a){a.ChangeLonePairAction=function(a,f){this.a=a;this.delta=f;return!0};a.ChangeLonePairAction.prototype=new a._Action;a.ChangeLonePairAction.prototype.innerForward=function(){this.a.numLonePair+=this.delta};a.ChangeLonePairAction.prototype.innerReverse=function(){this.a.numLonePair-=this.delta}})(ChemDoodle.sketcher.actions); +(function(a){a.ChangeRadicalAction=function(a,f){this.a=a;this.delta=f;return!0};a.ChangeRadicalAction.prototype=new a._Action;a.ChangeRadicalAction.prototype.innerForward=function(){this.a.numRadical+=this.delta};a.ChangeRadicalAction.prototype.innerReverse=function(){this.a.numRadical-=this.delta}})(ChemDoodle.sketcher.actions); +(function(a){a.ChangeRgroupAction=function(a,f){this.a=a;this.rbefore=a.rgroup;this.rafter=f;return!0};a.ChangeRgroupAction.prototype=new a._Action;a.ChangeRgroupAction.prototype.innerForward=function(){this.a.rgroup=this.rafter};a.ChangeRgroupAction.prototype.innerReverse=function(){this.a.rgroup=this.rbefore}})(ChemDoodle.sketcher.actions); +(function(a,d){d.ClearAction=function(d){this.sketcher=d;this.beforeMols=this.sketcher.molecules;this.beforeShapes=this.sketcher.shapes;this.sketcher.clear();this.sketcher.oneMolecule&&(this.afterMol=new a.Molecule,this.afterMol.atoms.push(new a.Atom),this.sketcher.molecules.push(this.afterMol),this.sketcher.center(),this.sketcher.repaint());return!0};d.ClearAction.prototype=new d._Action;d.ClearAction.prototype.innerForward=function(){this.sketcher.molecules=[];this.sketcher.shapes=[];this.sketcher.oneMolecule&& +this.sketcher.molecules.push(this.afterMol)};d.ClearAction.prototype.innerReverse=function(){this.sketcher.molecules=this.beforeMols;this.sketcher.shapes=this.beforeShapes}})(ChemDoodle.structures,ChemDoodle.sketcher.actions); +(function(a){a.DeleteAction=function(a,f,c,e){this.sketcher=a;this.a=f;this.as=c;this.bs=e;this.ss=[];return!0};a.DeleteAction.prototype=new a._Action;a.DeleteAction.prototype.innerForwardAReverse=a.AddAction.prototype.innerReverse;a.DeleteAction.prototype.innerReverseAForward=a.AddAction.prototype.innerForward;a.DeleteAction.prototype.innerForward=function(){this.innerForwardAReverse();for(var a=0,f=this.ss.length;a<f;a++)this.sketcher.removeShape(this.ss[a])};a.DeleteAction.prototype.innerReverse= +function(){this.innerReverseAForward();0<this.ss.length&&(this.sketcher.shapes=this.sketcher.shapes.concat(this.ss))}})(ChemDoodle.sketcher.actions); +(function(a,d,f){d.DeleteContentAction=function(a,e,b){this.sketcher=a;this.as=e;this.ss=b;this.bs=[];a=0;for(e=this.sketcher.molecules.length;a<e;a++)for(var b=this.sketcher.molecules[a],d=0,j=b.bonds.length;d<j;d++){var m=b.bonds[d];m.a1.isLassoed&&m.a2.isLassoed&&this.bs.push(m)}return!0};d.DeleteContentAction.prototype=new d._Action;d.DeleteContentAction.prototype.innerForward=function(){for(var c=0,e=this.ss.length;c<e;c++)this.sketcher.removeShape(this.ss[c]);for(var b=[],d=[],c=0,e=this.sketcher.molecules.length;c< +e;c++){for(var j=this.sketcher.molecules[c],m=0,g=j.atoms.length;m<g;m++){var l=j.atoms[m];-1===f(l,this.as)&&b.push(l)}m=0;for(g=j.bonds.length;m<g;m++)l=j.bonds[m],-1===f(l,this.bs)&&d.push(l)}this.sketcher.molecules=(new a.Splitter).split({atoms:b,bonds:d})};d.DeleteContentAction.prototype.innerReverse=function(){this.sketcher.shapes=this.sketcher.shapes.concat(this.ss);for(var c=[],e=[],b=0,d=this.sketcher.molecules.length;b<d;b++)var j=this.sketcher.molecules[b],c=c.concat(j.atoms),e=e.concat(j.bonds); +this.sketcher.molecules=(new a.Splitter).split({atoms:c.concat(this.as),bonds:e.concat(this.bs)})}})(ChemDoodle.informatics,ChemDoodle.sketcher.actions,jQuery.inArray);(function(a){a.DeleteShapeAction=function(a,f){this.sketcher=a;this.s=f;return!0};a.DeleteShapeAction.prototype=new a._Action;a.DeleteShapeAction.prototype.innerForward=a.AddShapeAction.prototype.innerReverse;a.DeleteShapeAction.prototype.innerReverse=a.AddShapeAction.prototype.innerForward})(ChemDoodle.sketcher.actions); +(function(a){a.FlipBondAction=function(a){this.b=a;return!0};a.FlipBondAction.prototype=new a._Action;a.FlipBondAction.prototype.innerForward=function(){var a=this.b.a1;this.b.a1=this.b.a2;this.b.a2=a};a.FlipBondAction.prototype.innerReverse=function(){this.innerForward()}})(ChemDoodle.sketcher.actions); +(function(a){a.MoveAction=function(a,f){this.ps=a;this.dif=f;return!0};a.MoveAction.prototype=new a._Action;a.MoveAction.prototype.innerForward=function(){for(var a=0,f=this.ps.length;a<f;a++)this.ps[a].add(this.dif)};a.MoveAction.prototype.innerReverse=function(){for(var a=0,f=this.ps.length;a<f;a++)this.ps[a].sub(this.dif)}})(ChemDoodle.sketcher.actions); +(function(a,d){d.NewMoleculeAction=function(a,c,e){this.sketcher=a;this.as=c;this.bs=e;return!0};d.NewMoleculeAction.prototype=new d._Action;d.NewMoleculeAction.prototype.innerForward=function(){var d=new a.Molecule;d.atoms=d.atoms.concat(this.as);d.bonds=d.bonds.concat(this.bs);d.check();this.sketcher.addMolecule(d)};d.NewMoleculeAction.prototype.innerReverse=function(){this.sketcher.removeMolecule(this.sketcher.getMoleculeByAtom(this.as[0]))}})(ChemDoodle.structures,ChemDoodle.sketcher.actions); +(function(a,d){a.RotateAction=function(a,c,e){this.ps=a;this.dif=c;this.center=e;return!0};a.RotateAction.prototype=new a._Action;a.RotateAction.prototype.innerForward=function(){for(var a=0,c=this.ps.length;a<c;a++){var e=this.ps[a],b=this.center.distance(e),h=this.center.angle(e)+this.dif;e.x=this.center.x+b*d.cos(h);e.y=this.center.y-b*d.sin(h)}};a.RotateAction.prototype.innerReverse=function(){for(var a=0,c=this.ps.length;a<c;a++){var e=this.ps[a],b=this.center.distance(e),h=this.center.angle(e)- +this.dif;e.x=this.center.x+b*d.cos(h);e.y=this.center.y-b*d.sin(h)}}})(ChemDoodle.sketcher.actions,Math); +(function(a){a.SwitchMoleculeAction=function(a,f){this.sketcher=a;this.beforeMols=this.sketcher.molecules;this.beforeShapes=this.sketcher.shapes;this.molA=f;return!0};a.SwitchMoleculeAction.prototype=new a._Action;a.SwitchMoleculeAction.prototype.innerForward=function(){this.sketcher.loadMolecule(this.molA)};a.SwitchMoleculeAction.prototype.innerReverse=function(){this.sketcher.molecules=this.beforeMols;this.sketcher.shapes=this.beforeShapes}})(ChemDoodle.sketcher.actions); +(function(a){a.ToggleAnyAtomAction=function(a){this.a=a;return!0};a.ToggleAnyAtomAction.prototype=new a._Action;a.ToggleAnyAtomAction.prototype.innerForward=function(){this.a.any=!this.a.any};a.ToggleAnyAtomAction.prototype.innerReverse=a.ToggleAnyAtomAction.prototype.innerForward})(ChemDoodle.sketcher.actions); +(function(a){a.HistoryManager=function(a){this.sketcher=a;this.undoStack=[];this.redoStack=[];return!0};a.HistoryManager.prototype.undo=function(){if(0!==this.undoStack.length){this.sketcher.lasso&&this.sketcher.lasso.isActive()&&this.sketcher.lasso.empty();var a=this.undoStack.pop();a.reverse(this.sketcher);this.redoStack.push(a);0===this.undoStack.length&&this.sketcher.toolbarManager.buttonUndo.disable();this.sketcher.toolbarManager.buttonRedo.enable()}};a.HistoryManager.prototype.redo=function(){if(0!== +this.redoStack.length){this.sketcher.lasso&&this.sketcher.lasso.isActive()&&this.sketcher.lasso.empty();var a=this.redoStack.pop();a.forward(this.sketcher);this.undoStack.push(a);this.sketcher.toolbarManager.buttonUndo.enable();0===this.redoStack.length&&this.sketcher.toolbarManager.buttonRedo.disable()}};a.HistoryManager.prototype.pushUndo=function(a){a.forward(this.sketcher);this.undoStack.push(a);0!==this.redoStack.length&&(this.redoStack=[]);this.sketcher.toolbarManager.buttonUndo.enable();this.sketcher.toolbarManager.buttonRedo.disable()}; +a.HistoryManager.prototype.clear=function(){0!==this.undoStack.length&&(this.undoStack=[],this.sketcher.toolbarManager.buttonUndo.disable());0!==this.redoStack.length&&(this.redoStack=[],this.sketcher.toolbarManager.buttonRedo.disable())}})(ChemDoodle.sketcher.actions); +(function(a,d,f,c,e,b,h,j){c._State=function(){return!0};c._State.prototype.setup=function(a){this.sketcher=a};c._State.prototype.clearHover=function(){this.sketcher.hovering&&(this.sketcher.hovering.isHover=!1,this.sketcher.hovering.isSelected=!1,this.sketcher.hovering=void 0)};c._State.prototype.findHoveredObject=function(a,g,e,b){this.clearHover();var i=Infinity,j,c=this.sketcher.specs.bondLength;this.sketcher.isMobile||(c/=this.sketcher.specs.scale);if(g)for(var g=0,d=this.sketcher.molecules.length;g< +d;g++)for(var h=this.sketcher.molecules[g],f=0,r=h.atoms.length;f<r;f++){var v=h.atoms[f];v.isHover=!1;var t=a.p.distance(v);t<c&&t<i&&(i=t,j=v)}if(e){g=0;for(d=this.sketcher.molecules.length;g<d;g++){h=this.sketcher.molecules[g];f=0;for(r=h.bonds.length;f<r;f++)e=h.bonds[f],e.isHover=!1,t=a.p.distance(e.getCenter()),t<c&&t<i&&(i=t,j=e)}}if(b){g=0;for(d=this.sketcher.shapes.length;g<d;g++){b=this.sketcher.shapes[g];b.isHover=!1;b.hoverPoint=void 0;e=b.getPoints();f=0;for(r=e.length;f<r;f++)h=e[f], +t=a.p.distance(h),t<c&&t<i&&(i=t,j=b,b.hoverPoint=h)}if(!j){g=0;for(d=this.sketcher.shapes.length;g<d;g++)b=this.sketcher.shapes[g],b.isOver(a.p,c)&&(j=b)}}j&&(j.isHover=!0,this.sketcher.hovering=j)};c._State.prototype.getOptimumAngle=function(e){var g=this.sketcher.getMoleculeByAtom(e),e=g.getAngles(e),b=0;if(0===e.length)b=j.PI/6;else if(1===e.length){for(var c,b=0,i=g.bonds.length;b<i;b++)g.bonds[b].contains(this.sketcher.hovering)&&(c=g.bonds[b]);3<=c.bondOrder?b=e[0]+j.PI:(g=2*(e[0]%j.PI),b= +a.isBetween(g,0,j.PI/2)||a.isBetween(g,j.PI,3*j.PI/2)?e[0]+2*j.PI/3:e[0]-2*j.PI/3)}else b=a.angleBetweenLargest(e).angle;return b};c._State.prototype.removeStartAtom=function(){this.sketcher.startAtom&&(this.sketcher.startAtom.x=-10,this.sketcher.startAtom.y=-10,this.sketcher.repaint())};c._State.prototype.enter=function(){this.innerenter&&this.innerenter()};c._State.prototype.exit=function(){this.innerexit&&this.innerexit()};c._State.prototype.click=function(a){this.innerclick&&this.innerclick(a)}; +c._State.prototype.rightclick=function(a){this.innerrightclick&&this.innerrightclick(a)};c._State.prototype.dblclick=function(a){this.innerdblclick&&this.innerdblclick(a);if(!this.sketcher.hovering){var a=new e.Point(this.sketcher.width/2,this.sketcher.height/2),g=this.sketcher.getContentBounds();a.x-=(g.maxX+g.minX)/2;a.y-=(g.maxY+g.minY)/2;this.sketcher.historyManager.pushUndo(new f.MoveAction(this.sketcher.getAllPoints(),a))}};c._State.prototype.mousedown=function(a){this.sketcher.lastPoint=a.p; +this.sketcher.isHelp||this.sketcher.isMobile&&10>a.op.distance(this.sketcher.helpPos)?(this.sketcher.isHelp=!1,this.sketcher.repaint(),window.open("http://web.chemdoodle.com/sketcher")):this.innermousedown&&this.innermousedown(a)};c._State.prototype.rightmousedown=function(a){this.innerrightmousedown&&this.innerrightmousedown(a)};c._State.prototype.mousemove=function(a){this.innermousemove&&this.innermousemove(a);this.sketcher.repaint()};c._State.prototype.mouseout=function(a){this.innermouseout&& +this.innermouseout(a)};c._State.prototype.mouseover=function(a){this.innermouseover&&this.innermouseover(a)};c._State.prototype.mouseup=function(a){this.parentAction=void 0;this.innermouseup&&this.innermouseup(a)};c._State.prototype.rightmouseup=function(a){this.innerrightmouseup&&this.innerrightmouseup(a)};c._State.prototype.mousewheel=function(a,e){this.innermousewheel&&this.innermousewheel(a);this.sketcher.specs.scale+=e/10;this.sketcher.checkScale();this.sketcher.repaint()};c._State.prototype.drag= +function(a){this.innerdrag&&this.innerdrag(a);if(!this.sketcher.hovering&&this!==this.sketcher.stateManager.STATE_LASSO&&this!==this.sketcher.stateManager.STATE_SHAPE&&this!==this.sketcher.stateManager.STATE_PUSHER){if(d.SHIFT)if(this.parentAction){var g=this.parentAction.center,b=g.angle(this.sketcher.lastPoint),c=g.angle(a.p),i=c-b;this.parentAction.dif+=i;b=0;for(c=this.parentAction.ps.length;b<c;b++){var h=this.parentAction.ps[b],k=g.distance(h),p=g.angle(h)+i;h.x=g.x+k*j.cos(p);h.y=g.y-k*j.sin(p)}b= +0;for(c=this.sketcher.molecules.length;b<c;b++)this.sketcher.molecules[b].check()}else g=new e.Point(this.sketcher.width/2,this.sketcher.height/2),b=g.angle(this.sketcher.lastPoint),c=g.angle(a.p),this.parentAction=new f.RotateAction(this.sketcher.getAllPoints(),c-b,g),this.sketcher.historyManager.pushUndo(this.parentAction);else{if(!this.sketcher.lastPoint)return;g=new e.Point(a.p.x,a.p.y);g.sub(this.sketcher.lastPoint);if(this.parentAction){this.parentAction.dif.add(g);b=0;for(c=this.parentAction.ps.length;b< +c;b++)this.parentAction.ps[b].add(g);this.sketcher.lasso&&this.sketcher.lasso.isActive()&&(this.sketcher.lasso.bounds.minX+=g.x,this.sketcher.lasso.bounds.maxX+=g.x,this.sketcher.lasso.bounds.minY+=g.y,this.sketcher.lasso.bounds.maxY+=g.y);b=0;for(c=this.sketcher.molecules.length;b<c;b++)this.sketcher.molecules[b].check()}else this.parentAction=new f.MoveAction(this.sketcher.getAllPoints(),g),this.sketcher.historyManager.pushUndo(this.parentAction)}this.sketcher.repaint()}this.sketcher.lastPoint= +a.p};c._State.prototype.keydown=function(c){if(d.CANVAS_DRAGGING===this.sketcher)this.sketcher.lastPoint&&(c.p=this.sketcher.lastPoint,this.drag(c));else if(d.META)90===c.which?this.sketcher.historyManager.undo():89===c.which?this.sketcher.historyManager.redo():83===c.which?this.sketcher.toolbarManager.buttonSave.getElement().click():79===c.which?this.sketcher.toolbarManager.buttonOpen.getElement().click():78===c.which?this.sketcher.toolbarManager.buttonClear.getElement().click():187===c.which||61=== +c.which?this.sketcher.toolbarManager.buttonScalePlus.getElement().click():189===c.which||109===c.which?this.sketcher.toolbarManager.buttonScaleMinus.getElement().click():65===c.which&&!this.sketcher.oneMolecule&&(this.sketcher.toolbarManager.buttonLasso.getElement().click(),this.sketcher.lasso.select(this.sketcher.getAllAtoms(),this.sketcher.shapes));else if(9===c.which){if(!this.sketcher.oneMolecule)if(this.sketcher.lasso.block=!0,this.sketcher.toolbarManager.buttonLasso.getElement().click(),this.sketcher.lasso.block= +!1,d.SHIFT){if(0<this.sketcher.shapes.length){var g=this.sketcher.shapes.length-1;0<this.sketcher.lasso.shapes.length&&(g=h(this.sketcher.lasso.shapes[0],this.sketcher.shapes)+1);g===this.sketcher.shapes.length&&(g=0);this.sketcher.lasso.empty();this.sketcher.lasso.select([],[this.sketcher.shapes[g]])}}else 0<this.sketcher.molecules.length&&(g=this.sketcher.molecules.length-1,0<this.sketcher.lasso.atoms.length&&(g=this.sketcher.getMoleculeByAtom(this.sketcher.lasso.atoms[0]),g=h(g,this.sketcher.molecules)+ +1),g===this.sketcher.molecules.length&&(g=0),this.sketcher.lasso.select(this.sketcher.molecules[g].atoms,[]))}else if(32===c.which)this.sketcher.lasso&&this.sketcher.lasso.empty(),this.sketcher.toolbarManager.buttonSingle.getElement().click();else if(37<=c.which&&40>=c.which){g=new e.Point;switch(c.which){case 37:g.x=-10;break;case 38:g.y=-10;break;case 39:g.x=10;break;case 40:g.y=10}this.sketcher.historyManager.pushUndo(new f.MoveAction(this.sketcher.lasso&&this.sketcher.lasso.isActive()?this.sketcher.lasso.getAllPoints(): +this.sketcher.getAllPoints(),g))}else if(187===c.which||189===c.which||61===c.which||109===c.which)this.sketcher.hovering&&this.sketcher.hovering instanceof e.Atom&&this.sketcher.historyManager.pushUndo(new f.ChangeChargeAction(this.sketcher.hovering,187===c.which||61===c.which?1:-1));else if(8===c.which||127===c.which)this.sketcher.stateManager.STATE_ERASE.handleDelete();else if(48<=c.which&&57>=c.which){if(this.sketcher.hovering){var l=c.which-48,n=[],i=[];if(this.sketcher.hovering instanceof e.Atom)if(g= +this.sketcher.hovering,d.SHIFT){if(2<l&&9>l){var o=this.sketcher.getMoleculeByAtom(this.sketcher.hovering),k=o.getAngles(this.sketcher.hovering),p=3*j.PI/2;0!==k.length&&(p=a.angleBetweenLargest(k).angle);k=this.sketcher.stateManager.STATE_NEW_RING.getRing(this.sketcher.hovering,l,this.sketcher.specs.bondLength,p,!1);-1===h(k[0],o.atoms)&&n.push(k[0]);this.sketcher.bondExists(this.sketcher.hovering,k[0])||i.push(new e.Bond(this.sketcher.hovering,k[0]));for(var q=1,s=k.length;q<s;q++)-1===h(k[q],o.atoms)&& +n.push(k[q]),this.sketcher.bondExists(k[q-1],k[q])||i.push(new e.Bond(k[q-1],k[q]));this.sketcher.bondExists(k[k.length-1],this.sketcher.hovering)||i.push(new e.Bond(k[k.length-1],this.sketcher.hovering))}}else{0===l&&(l=10);for(var r=new e.Point(this.sketcher.hovering.x,this.sketcher.hovering.y),v=this.getOptimumAngle(this.sketcher.hovering),t=this.sketcher.hovering,w=0;w<l;w++){o=v+(1===w%2?j.PI/3:0);r.x+=this.sketcher.specs.bondLength*j.cos(o);r.y-=this.sketcher.specs.bondLength*j.sin(o);for(var u= +new e.Atom("C",r.x,r.y),x=Infinity,y,q=0,s=this.sketcher.molecules.length;q<s;q++){o=this.sketcher.molecules[q];k=0;for(p=o.atoms.length;k<p;k++){var z=o.atoms[k],A=z.distance(u);A<x&&(x=A,y=z)}}5>x?u=y:n.push(u);this.sketcher.bondExists(t,u)||i.push(new e.Bond(t,u));t=u}}else if(this.sketcher.hovering instanceof e.Bond)if(g=this.sketcher.hovering.a1,d.SHIFT){if(2<l&&9>l){k=this.sketcher.stateManager.STATE_NEW_RING.getOptimalRing(this.sketcher.hovering,l);l=this.sketcher.hovering.a2;p=this.sketcher.hovering.a1; +o=this.sketcher.getMoleculeByAtom(l);k[0]===this.sketcher.hovering.a1&&(l=this.sketcher.hovering.a1,p=this.sketcher.hovering.a2);-1===h(k[1],o.atoms)&&n.push(k[1]);this.sketcher.bondExists(l,k[1])||i.push(new e.Bond(l,k[1]));q=2;for(s=k.length;q<s;q++)-1===h(k[q],o.atoms)&&n.push(k[q]),this.sketcher.bondExists(k[q-1],k[q])||i.push(new e.Bond(k[q-1],k[q]));this.sketcher.bondExists(k[k.length-1],p)||i.push(new e.Bond(k[k.length-1],p))}}else 0<l&&4>l&&this.sketcher.hovering.bondOrder!==l&&this.sketcher.historyManager.pushUndo(new f.ChangeBondAction(this.sketcher.hovering, +l,e.Bond.STEREO_NONE));(0!==n.length||0!==i.length)&&this.sketcher.historyManager.pushUndo(new f.AddAction(this.sketcher,g,n,i))}}else if(65<=c.which&&90>=c.which&&this.sketcher.hovering)if(this.sketcher.hovering instanceof e.Atom){g=String.fromCharCode(c.which);o=!1;k=0;for(p=b.length;k<p;k++)if(this.sketcher.hovering.label.charAt(0)===g)b[k]===this.sketcher.hovering.label?o=!0:b[k].charAt(0)===g&&(o&&!i?i=b[k]:n||(n=b[k]));else if(b[k].charAt(0)===g){n=b[k];break}u="C";i?u=i:n&&(u=n);u!==this.sketcher.hovering.label&& +this.sketcher.historyManager.pushUndo(new f.ChangeLabelAction(this.sketcher.hovering,u))}else this.sketcher.hovering instanceof e.Bond&&70===c.which&&this.sketcher.historyManager.pushUndo(new f.FlipBondAction(this.sketcher.hovering));this.innerkeydown&&this.innerkeydown(c)};c._State.prototype.keypress=function(a){this.innerkeypress&&this.innerkeypress(a)};c._State.prototype.keyup=function(a){d.CANVAS_DRAGGING===this.sketcher&&this.sketcher.lastPoint&&(a.p=this.sketcher.lastPoint,this.sketcher.drag(a)); +this.innerkeyup&&this.innerkeyup(a)}})(ChemDoodle.math,ChemDoodle.monitor,ChemDoodle.sketcher.actions,ChemDoodle.sketcher.states,ChemDoodle.structures,ChemDoodle.SYMBOLS,jQuery.inArray,Math); +(function(a,d,f,c){c.AtomQueryState=function(a){this.setup(a);this.mode=c.LabelState.MODE_ANY;return!0};c.AtomQueryState.prototype=new c._State;c.AtomQueryState.prototype.innermouseup=function(){if(this.mode===c.AtomQueryState.MODE_ANY)this.sketcher.historyManager.pushUndo(new d.ToggleAnyAtomAction(this.sketcher.hovering));else if(this.mode===c.AtomQueryState.MODE_RGROUP){var a=this,b=this.sketcher.hovering;this.sketcher.dialogManager.inputDialog.doneFunction=function(c){c.match(/[0-9]|\-/g)&&a.sketcher.historyManager.pushUndo(new d.ChangeRgroupAction(b, +parseInt(c)))};this.sketcher.dialogManager.inputDialog.getElement().dialog("open")}};c.AtomQueryState.prototype.innermousemove=function(a){this.findHoveredObject(a,!0)};c.AtomQueryState.MODE_ANY=1;c.AtomQueryState.MODE_RGROUP=2})(ChemDoodle.structures,ChemDoodle.sketcher.actions,ChemDoodle.sketcher.gui.DialogManager,ChemDoodle.sketcher.states); +(function(a,d){d.ChargeState=function(a){this.setup(a);this.delta=1;return!0};d.ChargeState.prototype=new d._State;d.ChargeState.prototype.innermouseup=function(){this.sketcher.hovering&&this.sketcher.historyManager.pushUndo(new a.ChangeChargeAction(this.sketcher.hovering,this.delta))};d.ChargeState.prototype.innermousemove=function(a){this.findHoveredObject(a,!0,!1)}})(ChemDoodle.sketcher.actions,ChemDoodle.sketcher.states); +(function(a,d,f,c,e){d.EraseState=function(a){this.setup(a);return!0};d.EraseState.prototype=new d._State;d.EraseState.prototype.handleDelete=function(){if(this.sketcher.lasso&&this.sketcher.lasso.isActive())this.sketcher.historyManager.pushUndo(new a.DeleteContentAction(this.sketcher,this.sketcher.lasso.atoms,this.sketcher.lasso.shapes)),this.sketcher.lasso.empty();else if(this.sketcher.hovering){if(this.sketcher.hovering instanceof f.Atom)if(this.sketcher.oneMolecule){for(var b=this.sketcher.molecules[0], +h=0,j=b.atoms.length;h<j;h++)b.atoms[h].visited=!1;var d=[],g=[];this.sketcher.hovering.visited=!0;h=0;for(j=b.bonds.length;h<j;h++){var l=b.bonds[h];if(l.contains(this.sketcher.hovering)){var n=[],i=[],o=new f.Queue;for(o.enqueue(l.getNeighbor(this.sketcher.hovering));!o.isEmpty();)if(l=o.dequeue(),!l.visited){l.visited=!0;n.push(l);for(var k=0,p=b.bonds.length;k<p;k++){var q=b.bonds[k];q.contains(l)&&!q.getNeighbor(l).visited&&(o.enqueue(q.getNeighbor(l)),i.push(q))}}d.push(n);g.push(i)}}k=l=-1; +h=0;for(j=d.length;h<j;h++)d[h].length>l&&(k=h,l=d[h].length);if(-1<k){for(var h=[],j=[],s,n=0,i=b.atoms.length;n<i;n++)l=b.atoms[n],-1===e(l,d[k])?h.push(l):s||(s=l);n=0;for(i=b.bonds.length;n<i;n++)l=b.bonds[n],-1===e(l,g[k])&&j.push(l);this.sketcher.historyManager.pushUndo(new a.DeleteAction(this.sketcher,s,h,j))}else this.sketcher.historyManager.pushUndo(new a.ClearAction(this.sketcher))}else b=this.sketcher.getMoleculeByAtom(this.sketcher.hovering),this.sketcher.historyManager.pushUndo(new a.DeleteAction(this.sketcher, +b.atoms[0],[this.sketcher.hovering],b.getBonds(this.sketcher.hovering)));else this.sketcher.hovering instanceof f.Bond?(!this.sketcher.oneMolecule||!this.sketcher.hovering.ring)&&this.sketcher.historyManager.pushUndo(new a.DeleteAction(this.sketcher,this.sketcher.hovering.a1,void 0,[this.sketcher.hovering])):this.sketcher.hovering instanceof c._Shape&&this.sketcher.historyManager.pushUndo(new a.DeleteShapeAction(this.sketcher,this.sketcher.hovering));this.sketcher.hovering=void 0;this.sketcher.repaint()}n= +0;for(i=this.sketcher.shapes.length;n<i;n++)if(g=this.sketcher.shapes[n],g instanceof c.Pusher){d=s=!1;h=0;for(j=this.sketcher.molecules.length;h<j;h++){b=this.sketcher.molecules[h];k=0;for(p=b.atoms.length;k<p;k++)l=b.atoms[k],l===g.o1?s=!0:l===g.o2&&(d=!0);k=0;for(p=b.bonds.length;k<p;k++)l=b.bonds[k],l===g.o1?s=!0:l===g.o2&&(d=!0)}if(!s||!d)this.sketcher.historyManager.undoStack[this.sketcher.historyManager.undoStack.length-1].ss.push(g),this.sketcher.removeShape(g)}};d.EraseState.prototype.innermouseup= +function(){this.handleDelete()};d.EraseState.prototype.innermousemove=function(a){this.findHoveredObject(a,!0,!0)}})(ChemDoodle.sketcher.actions,ChemDoodle.sketcher.states,ChemDoodle.structures,ChemDoodle.structures.d2,jQuery.inArray); +(function(a,d,f){f.LabelState=function(a){this.setup(a);this.label="C";return!0};f.LabelState.prototype=new f._State;f.LabelState.prototype.innermousedown=function(){this.newMolAllowed=!0};f.LabelState.prototype.innermouseup=function(c){this.sketcher.hovering?this.label!==this.sketcher.hovering.label&&this.sketcher.historyManager.pushUndo(new d.ChangeLabelAction(this.sketcher.hovering,this.label)):!this.sketcher.oneMolecule&&this.newMolAllowed&&(this.sketcher.historyManager.pushUndo(new d.NewMoleculeAction(this.sketcher, +[new a.Atom(this.label,c.p.x,c.p.y)],[])),this.sketcher.isMobile||this.mousemove(c))};f.LabelState.prototype.innermousemove=function(a){this.findHoveredObject(a,!0,!1)};f.LabelState.prototype.innerdrag=function(){this.newMolAllowed=!1}})(ChemDoodle.structures,ChemDoodle.sketcher.actions,ChemDoodle.sketcher.states); +(function(a,d,f,c,e,b,h,j){b.LassoState=function(a){this.setup(a);return!0};b.LassoState.prototype=new b._State;var m,g=!1;b.LassoState.prototype.innerdrag=function(a){this.inDrag=!0;if(this.sketcher.lasso.isActive()&&m){if(this.sketcher.lastPoint)if(1===m){var b=new f.Point(a.p.x,a.p.y);b.sub(this.sketcher.lastPoint);if(this.parentAction){this.parentAction.dif.add(b);for(var a=0,i=this.parentAction.ps.length;a<i;a++)this.parentAction.ps[a].add(b);a=0;for(i=this.sketcher.molecules.length;a<i;a++)this.sketcher.molecules[a].check(); +this.sketcher.lasso.bounds.minX+=b.x;this.sketcher.lasso.bounds.maxX+=b.x;this.sketcher.lasso.bounds.minY+=b.y;this.sketcher.lasso.bounds.maxY+=b.y;this.sketcher.repaint()}else this.parentAction=new e.MoveAction(this.sketcher.lasso.getAllPoints(),b),this.sketcher.historyManager.pushUndo(this.parentAction)}else if(2===m)if(this.parentAction){var b=this.parentAction.center,i=b.angle(this.sketcher.lastPoint),a=b.angle(a.p),g=a-i;this.parentAction.dif+=g;a=0;for(i=this.parentAction.ps.length;a<i;a++){var h= +this.parentAction.ps[a],p=b.distance(h),q=b.angle(h)+g;h.x=b.x+p*j.cos(q);h.y=b.y-p*j.sin(q)}a=0;for(i=this.sketcher.molecules.length;a<i;a++)this.sketcher.molecules[a].check();this.sketcher.lasso.setBounds();this.sketcher.repaint()}else b=new f.Point((this.sketcher.lasso.bounds.minX+this.sketcher.lasso.bounds.maxX)/2,(this.sketcher.lasso.bounds.minY+this.sketcher.lasso.bounds.maxY)/2),i=b.angle(this.sketcher.lastPoint),a=b.angle(a.p),this.parentAction=new e.RotateAction(this.sketcher.lasso.getAllPoints(), +a-i,b),this.sketcher.historyManager.pushUndo(this.parentAction)}else if(this.sketcher.hovering){if(this.sketcher.lastPoint)if(b=new f.Point(a.p.x,a.p.y),b.sub(this.sketcher.lastPoint),this.parentAction){this.parentAction.dif.add(b);a=0;for(i=this.parentAction.ps.length;a<i;a++)this.parentAction.ps[a].add(b);a=0;for(i=this.sketcher.molecules.length;a<i;a++)this.sketcher.molecules[a].check();this.sketcher.repaint()}else this.sketcher.hovering instanceof f.Atom?i=d.SHIFT?[this.sketcher.hovering]:this.sketcher.getMoleculeByAtom(this.sketcher.hovering).atoms: +this.sketcher.hovering instanceof f.Bond?i=[this.sketcher.hovering.a1,this.sketcher.hovering.a2]:this.sketcher.hovering instanceof c._Shape&&(i=this.sketcher.hovering.hoverPoint?[this.sketcher.hovering.hoverPoint]:this.sketcher.hovering.getPoints()),this.parentAction=new e.MoveAction(i,b),this.sketcher.historyManager.pushUndo(this.parentAction)}else this.sketcher.lasso.addPoint(a.p),this.sketcher.repaint()};b.LassoState.prototype.innermousedown=function(b){this.inDrag=!1;if(this.sketcher.lasso.isActive()&& +!d.SHIFT){m=void 0;var g=25/this.sketcher.specs.scale;a.isBetween(b.p.x,this.sketcher.lasso.bounds.minX,this.sketcher.lasso.bounds.maxX)&&a.isBetween(b.p.y,this.sketcher.lasso.bounds.minY,this.sketcher.lasso.bounds.maxY)?m=1:a.isBetween(b.p.x,this.sketcher.lasso.bounds.minX-g,this.sketcher.lasso.bounds.maxX+g)&&a.isBetween(b.p.y,this.sketcher.lasso.bounds.minY-g,this.sketcher.lasso.bounds.maxY+g)&&(m=2)}else this.sketcher.hovering||(this.sketcher.lastPoint=void 0,this.sketcher.lasso.addPoint(b.p), +this.sketcher.repaint())};b.LassoState.prototype.innermouseup=function(a){m||this.sketcher.hovering||this.sketcher.lasso.select();this.innermousemove(a)};b.LassoState.prototype.innerclick=function(){if(!m&&!this.inDrag)if(this.sketcher.hovering){var a=[],b=[];this.sketcher.hovering instanceof f.Atom?a.push(this.sketcher.hovering):this.sketcher.hovering instanceof f.Bond?(a.push(this.sketcher.hovering.a1),a.push(this.sketcher.hovering.a2)):this.sketcher.hovering instanceof c._Shape&&b.push(this.sketcher.hovering); +this.sketcher.lasso.select(a,b)}else this.sketcher.lasso.isActive()&&this.sketcher.lasso.empty();m=void 0};b.LassoState.prototype.innermousemove=function(b){if(this.sketcher.lasso.isActive()){if(!d.SHIFT){var e=!1,i=25/this.sketcher.specs.scale;if((!a.isBetween(b.p.x,this.sketcher.lasso.bounds.minX,this.sketcher.lasso.bounds.maxX)||!a.isBetween(b.p.y,this.sketcher.lasso.bounds.minY,this.sketcher.lasso.bounds.maxY))&&a.isBetween(b.p.x,this.sketcher.lasso.bounds.minX-i,this.sketcher.lasso.bounds.maxX+ +i)&&a.isBetween(b.p.y,this.sketcher.lasso.bounds.minY-i,this.sketcher.lasso.bounds.maxY+i))e=!0;e!=g&&(g=e,this.sketcher.repaint())}}else e=this.sketcher.lasso.mode!==h.Lasso.MODE_LASSO_SHAPES,this.findHoveredObject(b,e,e,!0)};b.LassoState.prototype.innerdblclick=function(){this.sketcher.lasso.isActive()&&this.sketcher.lasso.empty()};b.LassoState.prototype.draw=function(a){if(g&&this.sketcher.lasso.bounds){a.fillStyle="rgba(0,0,255,.1)";var b=25/this.sketcher.specs.scale,i=this.sketcher.lasso.bounds; +a.beginPath();a.rect(i.minX-b,i.minY-b,i.maxX-i.minX+2*b,b);a.rect(i.minX-b,i.maxY,i.maxX-i.minX+2*b,b);a.rect(i.minX-b,i.minY,b,i.maxY-i.minY);a.rect(i.maxX,i.minY,b,i.maxY-i.minY);a.fill()}}})(ChemDoodle.math,ChemDoodle.monitor,ChemDoodle.structures,ChemDoodle.structures.d2,ChemDoodle.sketcher.actions,ChemDoodle.sketcher.states,ChemDoodle.sketcher.tools,Math); +(function(a,d){d.LonePairState=function(a){this.setup(a);this.delta=1;return!0};d.LonePairState.prototype=new d._State;d.LonePairState.prototype.innermouseup=function(){0>this.delta&&1>this.sketcher.hovering.numLonePair||this.sketcher.hovering&&this.sketcher.historyManager.pushUndo(new a.ChangeLonePairAction(this.sketcher.hovering,this.delta))};d.LonePairState.prototype.innermousemove=function(a){this.findHoveredObject(a,!0,!1)}})(ChemDoodle.sketcher.actions,ChemDoodle.sketcher.states); +(function(a,d,f){d.MoveState=function(a){this.setup(a);this.action=void 0;return!0};d.MoveState.prototype=new d._State;d.MoveState.prototype.innerdrag=function(c){if(this.sketcher.hovering)if(this.action){c=new f.Point(c.p.x,c.p.y);c.sub(this.sketcher.lastPoint);this.action.dif.add(c);for(var e=0,b=this.action.as.length;e<b;e++)this.action.as[e].add(c);e=0;for(b=this.sketcher.molecules.length;e<b;e++)this.sketcher.molecules[e].check();this.sketcher.repaint()}else e=[],c=new f.Point(c.p.x,c.p.y),this.sketcher.hovering instanceof +f.Atom?(c.sub(this.sketcher.hovering),e[0]=this.sketcher.hovering):this.sketcher.hovering instanceof f.Bond&&(c.sub(this.sketcher.lastPoint),e[0]=this.sketcher.hovering.a1,e[1]=this.sketcher.hovering.a2),this.action=new a.MoveAction(e,c),this.sketcher.historyManager.pushUndo(this.action)};d.MoveState.prototype.innermousemove=function(a){this.findHoveredObject(a,!0,!0)};d.MoveState.prototype.innermouseup=function(){this.action=void 0}})(ChemDoodle.sketcher.actions,ChemDoodle.sketcher.states,ChemDoodle.structures); +(function(a,d,f,c,e){f.NewBondState=function(a){this.setup(a);this.bondOrder=1;this.stereo=c.Bond.STEREO_NONE;return!0};f.NewBondState.prototype=new f._State;f.NewBondState.prototype.incrementBondOrder=function(a){this.newMolAllowed=!1;1===this.bondOrder&&this.stereo===c.Bond.STEREO_NONE?this.sketcher.historyManager.pushUndo(new d.ChangeBondAction(a)):a.bondOrder===this.bondOrder&&a.stereo===this.stereo?(1===a.bondOrder&&a.stereo!==c.Bond.STEREO_NONE||2===a.bondOrder&&a.stereo===c.Bond.STEREO_NONE)&& +this.sketcher.historyManager.pushUndo(new d.FlipBondAction(a)):this.sketcher.historyManager.pushUndo(new d.ChangeBondAction(a,this.bondOrder,this.stereo))};f.NewBondState.prototype.innerexit=function(){this.removeStartAtom()};f.NewBondState.prototype.innerdrag=function(b){this.newMolAllowed=!1;this.removeStartAtom();if(this.sketcher.hovering instanceof c.Atom){if(15>b.p.distance(this.sketcher.hovering)){var d=this.getOptimumAngle(this.sketcher.hovering),b=this.sketcher.hovering.x+this.sketcher.specs.bondLength* +e.cos(d),d=this.sketcher.hovering.y-this.sketcher.specs.bondLength*e.sin(d);this.sketcher.tempAtom=new c.Atom("C",b,d,0)}else a.ALT&&a.SHIFT?this.sketcher.tempAtom=new c.Atom("C",b.p.x,b.p.y,0):(d=this.sketcher.hovering.angle(b.p),b=this.sketcher.hovering.distance(b.p),a.SHIFT||(b=this.sketcher.specs.bondLength),a.ALT||(d=e.floor((d+e.PI/12)/(e.PI/6))*e.PI/6),this.sketcher.tempAtom=new c.Atom("C",this.sketcher.hovering.x+b*e.cos(d),this.sketcher.hovering.y-b*e.sin(d),0));d=0;for(b=this.sketcher.molecules.length;d< +b;d++)for(var j=this.sketcher.molecules[d],f=0,g=j.atoms.length;f<g;f++){var l=j.atoms[f];5>l.distance(this.sketcher.tempAtom)&&(this.sketcher.tempAtom.x=l.x,this.sketcher.tempAtom.y=l.y,this.sketcher.tempAtom.isOverlap=!0)}this.sketcher.repaint()}};f.NewBondState.prototype.innerclick=function(a){!this.sketcher.hovering&&!this.sketcher.oneMolecule&&this.newMolAllowed&&(this.sketcher.historyManager.pushUndo(new d.NewMoleculeAction(this.sketcher,[new c.Atom("C",a.p.x,a.p.y)],[])),this.sketcher.isMobile|| +this.mousemove(a))};f.NewBondState.prototype.innermousedown=function(a){this.newMolAllowed=!0;if(this.sketcher.hovering instanceof c.Atom)this.sketcher.hovering.isHover=!1,this.sketcher.hovering.isSelected=!0,this.drag(a);else if(this.sketcher.hovering instanceof c.Bond){this.sketcher.hovering.isHover=!1;this.incrementBondOrder(this.sketcher.hovering);for(var a=0,e=this.sketcher.molecules.length;a<e;a++)this.sketcher.molecules[a].check();this.sketcher.repaint()}};f.NewBondState.prototype.innermouseup= +function(a){if(this.sketcher.tempAtom&&this.sketcher.hovering){var e=[],j=[],f=!0;if(this.sketcher.tempAtom.isOverlap){for(var g=0,l=this.sketcher.molecules.length;g<l;g++)for(var n=this.sketcher.molecules[g],i=0,o=n.atoms.length;i<o;i++){var k=n.atoms[i];5>k.distance(this.sketcher.tempAtom)&&(this.sketcher.tempAtom=k)}if(g=this.sketcher.getBond(this.sketcher.hovering,this.sketcher.tempAtom))this.incrementBondOrder(g),f=!1}else e.push(this.sketcher.tempAtom);f&&(j[0]=new c.Bond(this.sketcher.hovering, +this.sketcher.tempAtom,this.bondOrder),j[0].stereo=this.stereo,this.sketcher.historyManager.pushUndo(new d.AddAction(this.sketcher,j[0].a1,e,j)))}this.sketcher.tempAtom=void 0;this.sketcher.isMobile||this.mousemove(a)};f.NewBondState.prototype.innermousemove=function(a){this.sketcher.tempAtom||(this.findHoveredObject(a,!0,!0),this.sketcher.startAtom&&(this.sketcher.hovering?(this.sketcher.startAtom.x=-10,this.sketcher.startAtom.y=-10):(this.sketcher.startAtom.x=a.p.x,this.sketcher.startAtom.y=a.p.y)))}; +f.NewBondState.prototype.innermouseout=function(){this.removeStartAtom()}})(ChemDoodle.monitor,ChemDoodle.sketcher.actions,ChemDoodle.sketcher.states,ChemDoodle.structures,Math); +(function(a,d,f,c,e,b,h){c.NewRingState=function(a){this.setup(a);this.numSides=6;this.unsaturated=!1;return!0};c.NewRingState.prototype=new c._State;c.NewRingState.prototype.getRing=function(a,b,g,c,d){for(var i=h.PI-2*h.PI/b,c=c+i/2,f=[],k=0;k<b-1;k++){var p=0===k?new e.Atom("C",a.x,a.y):new e.Atom("C",f[f.length-1].x,f[f.length-1].y);p.x+=g*h.cos(c);p.y-=g*h.sin(c);f.push(p);c+=h.PI+i}k=0;for(a=this.sketcher.molecules.length;k<a;k++){b=this.sketcher.molecules[k];g=0;for(c=b.atoms.length;g<c;g++)b.atoms[g].isOverlap= +!1}k=0;for(a=f.length;k<a;k++){for(var i=Infinity,q,p=0,s=this.sketcher.molecules.length;p<s;p++){b=this.sketcher.molecules[p];g=0;for(c=b.atoms.length;g<c;g++){var r=b.atoms[g].distance(f[k]);r<i&&(i=r,q=b.atoms[g])}}5>i&&(f[k]=q,d&&(q.isOverlap=!0))}return f};c.NewRingState.prototype.getOptimalRing=function(a,b){for(var e=h.PI/2-h.PI/b,c=a.a1.distance(a.a2),d=this.getRing(a.a1,b,c,a.a1.angle(a.a2)-e,!1),e=this.getRing(a.a2,b,c,a.a2.angle(a.a1)-e,!1),i=c=0,f=1,k=d.length;f<k;f++)for(var p=0,q=this.sketcher.molecules.length;p< +q;p++)for(var s=this.sketcher.molecules[p],r=0,v=s.atoms.length;r<v;r++)var t=s.atoms[r].distance(d[f]),w=s.atoms[r].distance(e[f]),c=c+h.min(1E8,1/(t*t)),i=i+h.min(1E8,1/(w*w));return c<i?d:e};c.NewRingState.prototype.innerexit=function(){this.removeStartAtom()};c.NewRingState.prototype.innerdrag=function(c){this.newMolAllowed=!1;this.removeStartAtom();if(this.sketcher.hovering instanceof e.Atom){var f=0,g=0;if(15>c.p.distance(this.sketcher.hovering))c=this.sketcher.getMoleculeByAtom(this.sketcher.hovering).getAngles(this.sketcher.hovering), +f=0===c.length?3*h.PI/2:a.angleBetweenLargest(c).angle,g=this.sketcher.specs.bondLength;else if(f=this.sketcher.hovering.angle(c.p),g=this.sketcher.hovering.distance(c.p),!d.ALT||!d.SHIFT)d.SHIFT||(g=this.sketcher.specs.bondLength),d.ALT||(f=h.floor((f+h.PI/12)/(h.PI/6))*h.PI/6);this.sketcher.tempRing=this.getRing(this.sketcher.hovering,this.numSides,g,f,!0);this.sketcher.repaint()}else if(this.sketcher.hovering instanceof e.Bond){f=a.distanceFromPointToLineInclusive(c.p,this.sketcher.hovering.a1, +this.sketcher.hovering.a2);if(-1!==f&&7>=f)c=this.getOptimalRing(this.sketcher.hovering,this.numSides);else{for(var g=h.PI/2-h.PI/this.numSides,l=this.sketcher.hovering.a1.distance(this.sketcher.hovering.a2),f=this.getRing(this.sketcher.hovering.a1,this.numSides,l,this.sketcher.hovering.a1.angle(this.sketcher.hovering.a2)-g,!1),g=this.getRing(this.sketcher.hovering.a2,this.numSides,l,this.sketcher.hovering.a2.angle(this.sketcher.hovering.a1)-g,!1),n=new e.Point,l=new e.Point,i=1,o=f.length;i<o;i++)n.add(f[i]), +l.add(g[i]);n.x/=f.length-1;n.y/=f.length-1;l.x/=g.length-1;l.y/=g.length-1;n=n.distance(c.p);l=l.distance(c.p);c=g;n<l&&(c=f)}f=1;for(g=c.length;f<g;f++)-1!==b(c[f],this.sketcher.getAllAtoms())&&(c[f].isOverlap=!0);this.sketcher.tempRing=c;this.sketcher.repaint()}};c.NewRingState.prototype.innerclick=function(a){!this.sketcher.hovering&&!this.sketcher.oneMolecule&&this.newMolAllowed&&(this.sketcher.historyManager.pushUndo(new f.NewMoleculeAction(this.sketcher,[new e.Atom("C",a.p.x,a.p.y)],[])),this.sketcher.isMobile|| +this.mousemove(a))};c.NewRingState.prototype.innermousedown=function(a){this.newMolAllowed=!0;this.sketcher.hovering&&(this.sketcher.hovering.isHover=!1,this.sketcher.hovering.isSelected=!0,this.drag(a))};c.NewRingState.prototype.innermouseup=function(a){if(this.sketcher.tempRing&&this.sketcher.hovering){var c=[],g=[],d=this.sketcher.getAllAtoms();if(this.sketcher.hovering instanceof e.Atom){-1===b(this.sketcher.tempRing[0],d)&&c.push(this.sketcher.tempRing[0]);this.sketcher.bondExists(this.sketcher.hovering, +this.sketcher.tempRing[0])||g.push(new e.Bond(this.sketcher.hovering,this.sketcher.tempRing[0]));for(var h=1,i=this.sketcher.tempRing.length;h<i;h++)-1===b(this.sketcher.tempRing[h],d)&&c.push(this.sketcher.tempRing[h]),this.sketcher.bondExists(this.sketcher.tempRing[h-1],this.sketcher.tempRing[h])||g.push(new e.Bond(this.sketcher.tempRing[h-1],this.sketcher.tempRing[h],1===h%2&&this.unsaturated?2:1));this.sketcher.bondExists(this.sketcher.tempRing[this.sketcher.tempRing.length-1],this.sketcher.hovering)|| +g.push(new e.Bond(this.sketcher.tempRing[this.sketcher.tempRing.length-1],this.sketcher.hovering,this.unsaturated?2:1))}else if(this.sketcher.hovering instanceof e.Bond){var h=this.sketcher.hovering.a2,o=this.sketcher.hovering.a1;this.sketcher.tempRing[0]===this.sketcher.hovering.a1&&(h=this.sketcher.hovering.a1,o=this.sketcher.hovering.a2);-1===b(this.sketcher.tempRing[1],d)&&c.push(this.sketcher.tempRing[1]);this.sketcher.bondExists(h,this.sketcher.tempRing[1])||g.push(new e.Bond(h,this.sketcher.tempRing[1])); +h=2;for(i=this.sketcher.tempRing.length;h<i;h++)-1===b(this.sketcher.tempRing[h],d)&&c.push(this.sketcher.tempRing[h]),this.sketcher.bondExists(this.sketcher.tempRing[h-1],this.sketcher.tempRing[h])||g.push(new e.Bond(this.sketcher.tempRing[h-1],this.sketcher.tempRing[h],0===h%2&&this.unsaturated?2:1));this.sketcher.bondExists(this.sketcher.tempRing[this.sketcher.tempRing.length-1],o)||g.push(new e.Bond(this.sketcher.tempRing[this.sketcher.tempRing.length-1],o))}(0!==c.length||0!==g.length)&&this.sketcher.historyManager.pushUndo(new f.AddAction(this.sketcher, +g[0].a1,c,g));c=0;for(g=d.length;c<g;c++)d[c].isOverlap=!1}this.sketcher.tempRing=void 0;this.sketcher.isMobile||this.mousemove(a)};c.NewRingState.prototype.innermousemove=function(a){this.sketcher.tempAtom||(this.findHoveredObject(a,!0,!0),this.sketcher.startAtom&&(this.sketcher.hovering?(this.sketcher.startAtom.x=-10,this.sketcher.startAtom.y=-10):(this.sketcher.startAtom.x=a.p.x,this.sketcher.startAtom.y=a.p.y)))};c.NewRingState.prototype.innermouseout=function(){this.removeStartAtom()}})(ChemDoodle.math, +ChemDoodle.monitor,ChemDoodle.sketcher.actions,ChemDoodle.sketcher.states,ChemDoodle.structures,jQuery.inArray,Math); +(function(a,d,f,c,e){e.PusherState=function(a){this.setup(a);this.numElectron=1;return!0};e.PusherState.prototype=new e._State;e.PusherState.prototype.innermousedown=function(){this.sketcher.hovering&&(this.start=this.sketcher.hovering)};e.PusherState.prototype.innerdrag=function(a){this.start&&(this.end=new d.Point(a.p.x,a.p.y),this.findHoveredObject(a,!0,!0),this.sketcher.repaint())};e.PusherState.prototype.innermouseup=function(){if(this.start&&this.sketcher.hovering&&this.sketcher.hovering!== +this.start){for(var a,e=!1,d=0,m=this.sketcher.shapes.length;d<m;d++){var g=this.sketcher.shapes[d];g instanceof f.Pusher&&(g.o1===this.start&&g.o2===this.sketcher.hovering?a=g:g.o2===this.start&&g.o1===this.sketcher.hovering&&(a=g,e=!0))}a?(e&&this.sketcher.historyManager.pushUndo(new c.DeleteShapeAction(this.sketcher,a)),this.end=this.start=void 0,this.sketcher.repaint()):(a=new f.Pusher(this.start,this.sketcher.hovering,this.numElectron),this.end=this.start=void 0,this.sketcher.historyManager.pushUndo(new c.AddShapeAction(this.sketcher, +a)))}else this.end=this.start=void 0,this.sketcher.repaint()};e.PusherState.prototype.innermousemove=function(a){this.findHoveredObject(a,!0,!0);this.sketcher.repaint()};e.PusherState.prototype.draw=function(b){if(this.start&&this.end){b.strokeStyle="#00FF00";b.fillStyle="#00FF00";b.lineWidth=1;var e=this.start instanceof d.Atom?this.start:this.start.getCenter(),c=this.end;this.sketcher.hovering&&this.sketcher.hovering!==this.start&&(c=this.sketcher.hovering instanceof d.Atom?this.sketcher.hovering: +this.sketcher.hovering.getCenter());b.beginPath();b.moveTo(e.x,e.y);a.contextHashTo(b,e.x,e.y,c.x,c.y,2,2);b.stroke()}}})(ChemDoodle.extensions,ChemDoodle.structures,ChemDoodle.structures.d2,ChemDoodle.sketcher.actions,ChemDoodle.sketcher.states); +(function(a,d){d.RadicalState=function(a){this.setup(a);this.delta=1;return!0};d.RadicalState.prototype=new d._State;d.RadicalState.prototype.innermouseup=function(){0>this.delta&&1>this.sketcher.hovering.numRadical||this.sketcher.hovering&&this.sketcher.historyManager.pushUndo(new a.ChangeRadicalAction(this.sketcher.hovering,this.delta))};d.RadicalState.prototype.innermousemove=function(a){this.findHoveredObject(a,!0,!1)}})(ChemDoodle.sketcher.actions,ChemDoodle.sketcher.states); +(function(a,d,f,c,e,b,h){b.ShapeState=function(a){this.setup(a);this.shapeType=b.ShapeState.LINE;return!0};b.ShapeState.prototype=new b._State;b.ShapeState.prototype.innermousedown=function(a){this.end=this.start=new f.Point(a.p.x,a.p.y)};b.ShapeState.prototype.innerdrag=function(a){this.end=new f.Point(a.p.x,a.p.y);if(!d.ALT){var a=this.start.angle(this.end),b=this.start.distance(this.end);d.ALT||(a=h.floor((a+h.PI/12)/(h.PI/6))*h.PI/6);this.end.x=this.start.x+b*h.cos(a);this.end.y=this.start.y- +b*h.sin(a)}this.sketcher.repaint()};b.ShapeState.prototype.innermouseup=function(){if(this.start&&this.end){var a;this.shapeType>=b.ShapeState.LINE&&this.shapeType<=b.ShapeState.ARROW_RETROSYNTHETIC&&(a=new c.Line(this.start,this.end),this.shapeType===b.ShapeState.ARROW_SYNTHETIC?a.arrowType=c.Line.ARROW_SYNTHETIC:this.shapeType===b.ShapeState.ARROW_RETROSYNTHETIC&&(a.arrowType=c.Line.ARROW_RETROSYNTHETIC));this.end=this.start=void 0;a&&this.sketcher.historyManager.pushUndo(new e.AddShapeAction(this.sketcher, +a))}};b.ShapeState.prototype.draw=function(b){this.start&&this.end&&(b.strokeStyle="#00FF00",b.fillStyle="#00FF00",b.lineWidth=1,b.beginPath(),b.moveTo(this.start.x,this.start.y),a.contextHashTo(b,this.start.x,this.start.y,this.end.x,this.end.y,2,2),b.stroke())};b.ShapeState.LINE=1;b.ShapeState.ARROW_SYNTHETIC=2;b.ShapeState.ARROW_RETROSYNTHETIC=3})(ChemDoodle.extensions,ChemDoodle.monitor,ChemDoodle.structures,ChemDoodle.structures.d2,ChemDoodle.sketcher.actions,ChemDoodle.sketcher.states,Math); +(function(a){a.StateManager=function(d){this.STATE_NEW_BOND=new a.NewBondState(d);this.STATE_NEW_RING=new a.NewRingState(d);this.STATE_CHARGE=new a.ChargeState(d);this.STATE_LONE_PAIR=new a.LonePairState(d);this.STATE_RADICAL=new a.RadicalState(d);this.STATE_MOVE=new a.MoveState(d);this.STATE_ERASE=new a.EraseState(d);this.STATE_LABEL=new a.LabelState(d);this.STATE_LASSO=new a.LassoState(d);this.STATE_SHAPE=new a.ShapeState(d);this.STATE_PUSHER=new a.PusherState(d);this.STATE_ATOM_QUERY=new a.AtomQueryState(d); +var f=this.STATE_NEW_BOND;this.setState=function(a){a!==f&&(f.exit(),f=a,f.enter())};this.getCurrentState=function(){return f};return!0}})(ChemDoodle.sketcher.states); +ChemDoodle.sketcher.gui.imageDepot=function(){return{getURI:function(a){return"data:image/png;base64,"+a},ADD_LONE_PAIR:"iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAANElEQVR42mNgGAWjYHACGyB+DMTPgdiFDHkMAFL8H4qfkyFPewNtoApB2IMM+VEwCgYcAADjvBhZpYZJbQAAAABJRU5ErkJggg==",ADD_RADICAL:"iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAL0lEQVR42mNgGAWjYGgAGyB+DMTPgdiFGgaCDPsPxc8HpYE2UINA2GM0BYyCoQAAdQgMLdlWmzIAAAAASUVORK5CYII=",ANY_ELEMENT:"iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABF0lEQVR42u3TsUtCURSA8ZePCJcgqCFwEomGNoWgpCFwaHHIv6CpJYqoxSWScAhqMopQKIjIpsYWoUkahCxahKaGqAjB9qK+C/fB4fBI6L3xHfiBHrgfvqs6TjQ+M4QEmvZ14FnDBYp4wnjQYBzr2MAsYmE88g0WsBvWPQ7859AMfpASuxG7y4rdCjZRx47YT6Alg4d4xZYKfuNO3J0XnEQPo3Z/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zAhHQniQXceDx2vYTCdFVap9QbDAofpjj/y973+aMLafnmx3nkGL7RRMHE9ToiK2sYH78VX8HVlBQSysk19jBDvi1zEafaBjBL69dN3X/rJ7qru7GzaTBVupBH789Rf8JswziXdIlv95frHaZyVrQJb45uKHPvJySjJwmFlawGJkFVJVmiDQOMu/aD0LPPK/T/re8l146bz6yhn3/LmTLd4jyRe8MODh/Q+zf/gKTlsAkwAAAABJRU5ErkJggg==", +FLUORINE:"iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAUElEQVR42mNgGAU0AxPuB26c8CDgPxr+SqmBpyc+DDCG4UkP/AwpNXAvtb08+A38A8SfYbj/ob8LpQae6Hvoqw3DU1+F8oxGygAaOAoGDgAAN7dbSHln+I0AAAAASUVORK5CYII=",HYDROGEN:"iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAANElEQVR42mNgGAW0BBuBeC8W8SIg/jtqINEGngBiTTTcSYmB/4D4Jxr+Mxopw8jAUTBAAADIhCT11Q14ZwAAAABJRU5ErkJggg==",INCREASE_CHARGE:"iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAyklEQVR42mNgGAU4gAAQK0BpsgELEGcA8WUg/g3E/6H4NhCXQOVJMmw/EL8G4gYgdoC60AKIK4D4ORAfB2IeYg07DMT3gVgFKsYDNRhmgAwQn4caykHIwByoy1SQxCSh3pVEEpOBurSEkIGXoa5hIGAgA9T7twnF5m9omPFADQBhA6iBBkhiPNAw/Y8v9hWgChSgrvyPB9ejqaePC6kehjSJZVg6vI4UNjzQMENOh4eJTYfIhlIlpyAbmgN1KXLs3od6k2PAS5vBAQCFSEECjKrjagAAAABJRU5ErkJggg==", +IODINE:"iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAI0lEQVR42mNgGAV0AVMYpmyeyjB196iBowaOGkhXA0cBfQEADcspQU08dAAAAAAASUVORK5CYII=",LASSO:"iVBORw0K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,f){a.Button=function(a,e,b,d){this.id=a;this.icon=e;this.toggle=!1;this.tooltip=b?b:"";this.func=d?d:void 0;return!0};a.Button.prototype.getElement=function(){return f("#"+this.id)};a.Button.prototype.getSource=function(a){var e=[];this.toggle?(e.push('<input type="radio" name="'),e.push(a),e.push('" id="'),e.push(this.id),e.push('" title="'),e.push(this.tooltip),e.push('" /><label for="'),e.push(this.id),e.push('"><img id="'),e.push(this.id),e.push('_icon" title="'),e.push(this.tooltip), +e.push('" width="20" height="20" src="'),e.push(d.getURI(this.icon)),e.push('"></label>')):(e.push('<button id="'),e.push(this.id),e.push('" onclick="return false;" title="'),e.push(this.tooltip),e.push('"><img title="'),e.push(this.tooltip),e.push('" width="20" height="20" src="'),e.push(d.getURI(this.icon)),e.push('"></button>'));return e.join("")};a.Button.prototype.setup=function(a){var e=this.getElement();(!this.toggle||a)&&e.button();e.click(this.func)};a.Button.prototype.disable=function(){var a= +this.getElement();a.mouseout();a.button("disable")};a.Button.prototype.enable=function(){this.getElement().button("enable")};a.Button.prototype.select=function(){var a=this.getElement();a.attr("checked",!0);a.button("refresh")}})(ChemDoodle.sketcher.gui.desktop,ChemDoodle.sketcher.gui.imageDepot,jQuery); +(function(a,d){a.ButtonSet=function(a){this.id=a;this.buttons=[];return this.toggle=!0};a.ButtonSet.prototype.getElement=function(){return d("#"+this.id)};a.ButtonSet.prototype.getSource=function(a){var c=[];c.push('<span id="');c.push(this.id);c.push('">');for(var e=0,b=this.buttons.length;e<b;e++)this.toggle&&(this.buttons[e].toggle=!0),c.push(this.buttons[e].getSource(a));this.dropDown&&c.push(this.dropDown.getButtonSource());c.push("</span>");this.dropDown&&c.push(this.dropDown.getHiddenSource()); +return c.join("")};a.ButtonSet.prototype.setup=function(){this.getElement().buttonset();for(var a=0,c=this.buttons.length;a<c;a++)this.buttons[a].setup(!1);this.dropDown&&this.dropDown.setup()};a.ButtonSet.prototype.addDropDown=function(d){this.dropDown=new a.DropDown(this.id+"_dd",d,this.buttons[this.buttons.length-1])}})(ChemDoodle.sketcher.gui.desktop,jQuery); +(function(a,d,f){a.Dialog=function(a,e,b){this.sketcherid=a;this.id=a+e;this.title=b?b:"Information";this.afterMessage=this.message=this.buttons=void 0;this.includeTextField=this.includeTextArea=!1;return!0};a.Dialog.prototype.getElement=function(){return d("#"+this.id)};a.Dialog.prototype.getTextArea=function(){return d("#"+this.id+"_ta")};a.Dialog.prototype.getTextField=function(){return d("#"+this.id+"_tf")};a.Dialog.prototype.setup=function(){var a=[];a.push('<div style="font-size:12px;" id="'); +a.push(this.id);a.push('" title="');a.push(this.title);a.push('">');this.message&&(a.push("<p>"),a.push(this.message),a.push("</p>"));this.includeTextField&&(a.push('<input type="text" style="font-family:\'Courier New\';" id="'),a.push(this.id),a.push('_tf"></input>'));this.includeTextArea&&(a.push('<textarea style="font-family:\'Courier New\';" id="'),a.push(this.id),a.push('_ta" cols="55" rows="10"></textarea>'));this.afterMessage&&(a.push("<p>"),a.push(this.afterMessage),a.push("</p>"));a.push("</div>"); +f.getElementById(this.sketcherid)?d("#"+this.sketcherid).before(a.join("")):f.writeln(a.join(""));this.getElement().dialog({autoOpen:!1,width:435,buttons:this.buttons})}})(ChemDoodle.sketcher.gui.desktop,jQuery,document); +(function(a,d,f,c){d.MolGrabberDialog=function(a,b){this.sketcherid=a;this.id=a+b;this.title="MolGrabber";return!0};d.MolGrabberDialog.prototype=new d.Dialog;d.MolGrabberDialog.prototype.setup=function(){var a=[];a.push('<div style="font-size:12px;text-align:center;" id="');a.push(this.id);a.push('" title="');a.push(this.title);a.push('">');this.message&&(a.push("<p>"),a.push(this.message),a.push("</p>"));a.push('<canvas class="ChemDoodleWebComponent" id="');a.push(this.id);a.push('_mg"></canvas>'); +this.afterMessage&&(a.push("<p>"),a.push(this.afterMessage),a.push("</p>"));a.push("</div>");c.getElementById(this.sketcherid)?f("#"+this.sketcherid).before(a.join("")):c.writeln(a.join(""));this.canvas=new ChemDoodle.MolGrabberCanvas(this.id+"_mg",200,200);this.getElement().dialog({autoOpen:!1,width:250,buttons:this.buttons})}})(ChemDoodle,ChemDoodle.sketcher.gui.desktop,jQuery,document); +(function(a,d,f,c){d.PeriodicTableDialog=function(a,b){this.sketcherid=a;this.id=a+b;this.title="Periodic Table";return!0};d.PeriodicTableDialog.prototype=new d.Dialog;d.PeriodicTableDialog.prototype.setup=function(){var a=[];a.push('<div style="text-align:center;" id="');a.push(this.id);a.push('" title="');a.push(this.title);a.push('">');a.push('<canvas class="ChemDoodleWebComponents" id="');a.push(this.id);a.push('_pt"></canvas></div>');c.getElementById(this.sketcherid)?f("#"+this.sketcherid).before(a.join("")): +c.writeln(a.join(""));this.canvas=new ChemDoodle.PeriodicTableCanvas(this.id+"_pt",20);this.getElement().dialog({autoOpen:!1,width:400,buttons:this.buttons})}})(ChemDoodle,ChemDoodle.sketcher.gui.desktop,jQuery,document); +(function(a,d,f,c){d.SaveFileDialog=function(a,b){this.id=a;this.sketcher=b;this.title="Save File";return!0};d.SaveFileDialog.prototype=new d.Dialog;d.SaveFileDialog.prototype.clear=function(){f("#"+this.id+"_link").html("The file link will appear here.")};d.SaveFileDialog.prototype.setup=function(){var a=[];a.push('<div style="font-size:12px;" id="');a.push(this.id);a.push('" title="');a.push(this.title);a.push('">');a.push("<p>Select the file format to save your structure to and click on the <strong>Generate File</strong> button.</p>"); +a.push('<select id="');a.push(this.id);a.push('_select">');a.push('<option value="sk2">ACD/ChemSketch Document {sk2}');a.push('<option value="ros">Beilstein ROSDAL {ros}');a.push('<option value="cdx">Cambridgesoft ChemDraw Exchange {cdx}');a.push('<option value="cdxml">Cambridgesoft ChemDraw XML {cdxml}');a.push('<option value="mrv">ChemAxon Marvin Document {mrv}');a.push('<option value="cml">Chemical Markup Language {cml}');a.push('<option value="smiles">Daylight SMILES {smiles}');a.push('<option value="icl" selected>iChemLabs ChemDoodle Document {icl}'); +a.push('<option value="inchi">IUPAC InChI {inchi}');a.push('<option value="jdx">IUPAC JCAMP-DX {jdx}');a.push('<option value="skc">MDL ISIS Sketch {skc}');a.push('<option value="tgf">MDL ISIS Sketch Transportable Graphics File {tgf}');a.push('<option value="mol">MDL MOLFile {mol}');a.push('<option value="sdf">MDL SDFile {sdf}');a.push('<option value="jme">Molinspiration JME String {jme}');a.push('<option value="pdb">RCSB Protein Data Bank {pdb}');a.push('<option value="mmd">Schrödinger Macromodel {mmd}'); +a.push('<option value="mae">Schrödinger Maestro {mae}');a.push('<option value="smd">Standard Molecular Data {smd}');a.push('<option value="mol2">Tripos Mol2 {mol2}');a.push('<option value="sln">Tripos SYBYL SLN {sln}');a.push('<option value="xyz">XYZ {xyz}');a.push("</select>");a.push('<button id="');a.push(this.id);a.push('_button">');a.push("Generate File</button>");a.push("<p>When the file is written, a link will appear in the red-bordered box below, right-click on the link and choose the browser's <strong>Save As...</strong> function to save the file to your computer.</p>"); +a.push('<div style="width:100%;height:30px;border:1px solid #c10000;text-align:center;" id="');a.push(this.id);a.push('_link">The file link will appear here.</div>');a.push('<p><a href="http://www.chemdoodle.com" target="_blank">How do I use these files?</a></p>');a.push("</div>");c.getElementById(this.sketcher.id)?f("#"+this.sketcher.id).before(a.join("")):c.writeln(a.join(""));var b=this;f("#"+this.id+"_button").click(function(){f("#"+b.id+"_link").html("Generating file, please wait...");ChemDoodle.iChemLabs.saveFile(b.sketcher.oneMolecule? +b.sketcher.molecules[0]:b.sketcher.lasso.getFirstMolecule(),{ext:f("#"+b.id+"_select").val()},function(a){f("#"+b.id+"_link").html('<a href="'+a+'"><span style="text-decoration:underline;">File is generated. Right-click on this link and Save As...</span></a>')})});this.getElement().dialog({autoOpen:!1,width:435,buttons:b.buttons})}})(ChemDoodle,ChemDoodle.sketcher.gui.desktop,jQuery,document); +(function(a,d,f,c,e){f.DialogManager=function(b){b.useServices?this.saveDialog=new c.SaveFileDialog(b.id+"_save_dialog",b):(this.saveDialog=new c.Dialog(b.id,"_save_dialog","Save Molecule"),this.saveDialog.message="Copy and paste the content of the textarea into a file and save it with the extension <strong>.mol</strong>.",this.saveDialog.includeTextArea=!0,this.saveDialog.afterMessage='<a href="http://www.chemdoodle.com" target="_blank">How do I use MOLFiles?</a>');this.saveDialog.setup();this.loadDialog= +new c.Dialog(b.id,"_load_dialog","Load Molecule");this.loadDialog.message="Copy and paste the contents of a MOLFile (extension <strong>.mol</strong>) in the textarea below and then press the <strong>Load</strong> button.";this.loadDialog.includeTextArea=!0;this.loadDialog.afterMessage='<a href="http://www.chemdoodle.com" target="_blank">Where do I get MOLFiles?</a>';var f=this;this.loadDialog.buttons={Load:function(){e(this).dialog("close");var c=a.readMOL(f.loadDialog.getTextArea().val());if(c.atoms.length> +0)if(b.oneMolecule)b.historyManager.pushUndo(new d.SwitchMoleculeAction(b,c));else{b.historyManager.pushUndo(new d.NewMoleculeAction(b,c.atoms,c.bonds));b.toolbarManager.buttonLasso.getElement().click();b.lasso.select(c.atoms,[])}else alert("No chemical content was recognized.")}};this.loadDialog.setup();this.searchDialog=new c.MolGrabberDialog(b.id,"_search_dialog");this.searchDialog.buttons={Load:function(){e(this).dialog("close");var a=f.searchDialog.canvas.molecules[0];if(a&&a.atoms.length>0)if(b.oneMolecule)a!== +b.molecule&&b.historyManager.pushUndo(new d.SwitchMoleculeAction(b,a));else{b.historyManager.pushUndo(new d.NewMoleculeAction(b,a.atoms,a.bonds));b.toolbarManager.buttonLasso.getElement().click();b.lasso.select(a.atoms,[])}}};this.searchDialog.setup();this.periodicTableDialog=new c.PeriodicTableDialog(b.id,"_periodicTable_dialog");this.periodicTableDialog.buttons={Close:function(){e(this).dialog("close")}};this.periodicTableDialog.setup();this.periodicTableDialog.canvas.click=function(){if(this.hovered){this.selected= +this.hovered;var a=this.getHoveredElement();b.stateManager.setState(b.stateManager.STATE_LABEL);b.stateManager.STATE_LABEL.label=a.symbol;b.toolbarManager.buttonLabel.select();this.repaint()}};this.calculateDialog=new c.Dialog(b.id,"_calculate_dialog","Calculations");this.calculateDialog.includeTextArea=!0;this.calculateDialog.afterMessage='<a href="http://www.chemdoodle.com" target="_blank">Want more calculations?</a>';this.calculateDialog.setup();this.inputDialog=new c.Dialog(b.id,"_input_dialog", +"Input");this.inputDialog.message='Please input the rgroup number (must be a positive integer). Input "-1" to remove the rgroup.';this.inputDialog.includeTextField=!0;this.inputDialog.buttons={Done:function(){e(this).dialog("close");f.inputDialog.doneFunction&&f.inputDialog.doneFunction(f.inputDialog.getTextField().val())}};this.inputDialog.setup();return!0}})(ChemDoodle,ChemDoodle.sketcher.actions,ChemDoodle.sketcher.gui,ChemDoodle.sketcher.gui.desktop,jQuery); +(function(a,d,f,c){a.DropDown=function(c,b,d){this.id=c;this.tooltip=b;this.dummy=d;this.buttonSet=new a.ButtonSet(c+"_set");this.buttonSet.buttonGroup=b;this.defaultButton=void 0;return!0};a.DropDown.prototype.getButtonSource=function(){var a=[];a.push('<button id="');a.push(this.id);a.push('" onclick="return false;" title="');a.push(this.tooltip);a.push('"><img title="');a.push(this.tooltip);a.push('" src="');a.push(d.getURI(d.ARROW_DOWN));a.push('"></button>');return a.join("")};a.DropDown.prototype.getHiddenSource= +function(){var a=[];a.push('<div style="display:none;position:absolute;z-index:10;border:1px #C1C1C1 solid;background:#F5F5F5;padding:5px;border-bottom-left-radius:5px;-moz-border-radius-bottomleft:5px;border-bottom-right-radius:5px;-moz-border-radius-bottomright:5px;" id="');a.push(this.id);a.push('_hidden">');a.push(this.buttonSet.getSource(this.id+"_popup_set"));a.push("</div>");return a.join("")};a.DropDown.prototype.setup=function(){this.defaultButton||(this.defaultButton=this.buttonSet.buttons[0]); +var a="#"+this.id;f(a).button();f(a+"_hidden").hide();f(a).click(function(){var b=f(a+"_hidden");b.show().position({my:"center top",at:"center bottom",of:this,collision:"fit"});f(c).one("click",function(){b.hide()});return false});this.buttonSet.setup();var b=this;f.each(this.buttonSet.buttons,function(a){b.buttonSet.buttons[a].getElement().click(function(){b.dummy.absorb(b.buttonSet.buttons[a]);b.dummy.select();b.dummy.func()})});b.dummy.absorb(this.defaultButton);this.defaultButton.select()}})(ChemDoodle.sketcher.gui.desktop, +ChemDoodle.sketcher.gui.imageDepot,jQuery,document); +(function(a,d,f){a.DummyButton=function(a,d,b){this.id=a;this.icon=d;this.toggle=!1;this.tooltip=b?b:"";this.func=void 0;return!0};a.DummyButton.prototype=new a.Button;a.DummyButton.prototype.setup=function(){var a=this;this.getElement().click(function(){a.func()})};a.DummyButton.prototype.absorb=function(a){f("#"+this.id+"_icon").attr("src",d.getURI(a.icon));this.func=a.func}})(ChemDoodle.sketcher.gui.desktop,ChemDoodle.sketcher.gui.imageDepot,jQuery); +(function(a,d,f,c,e,b,h,j,m,g,l,n){b.ToolbarManager=function(i){this.sketcher=i;this.buttonOpen=new j.Button(i.id+"_button_open",h.OPEN,"Open",function(){i.dialogManager.loadDialog.getTextArea().val("");i.dialogManager.loadDialog.getElement().dialog("open")});this.buttonSave=new j.Button(i.id+"_button_save",h.SAVE,"Save",function(){i.useServices?i.dialogManager.saveDialog.clear():i.oneMolecule?i.dialogManager.saveDialog.getTextArea().val(a.writeMOL(i.molecules[0])):i.lasso.isActive()&&i.dialogManager.saveDialog.getTextArea().val(a.writeMOL(i.lasso.getFirstMolecule())); +i.dialogManager.saveDialog.getElement().dialog("open")});this.buttonSearch=new j.Button(i.id+"_button_search",h.SEARCH,"Search",function(){i.dialogManager.searchDialog.getElement().dialog("open")});this.buttonCalculate=new j.Button(i.id+"_button_calculate",h.CALCULATE,"Calculate",function(){var a=i.oneMolecule?i.molecules[0]:i.lasso.getFirstMolecule();a&&d.calculate(a,{descriptors:"mf,mw,miw,deg_unsat,hba,hbd,pol_miller,cmr,tpsa,xlogp2".split(",")},function(a){function b(a,i,c){g.push(a);g.push(": "); +for(a=a.length+2;30>a;a++)g.push(" ");g.push(i);g.push(" ");g.push(c);g.push("\n")}var g=[];b("Molecular Formula",a.mf,"");b("Molecular Mass",a.mw,"amu");b("Monoisotopic Mass",a.miw,"amu");b("Degree of Unsaturation",a.deg_unsat,"");b("Hydrogen Bond Acceptors",a.hba,"");b("Hydrogen Bond Donors",a.hbd,"");b("Molecular Polarizability",a.pol_miller,"\u00c5\u00b3");b("Molar Refractivity",a.cmr,"cm\u00b3/mol");b("Polar Surface Area",a.tpsa,"\u00c5\u00b2");b("logP",a.xlogp2,"");i.dialogManager.calculateDialog.getTextArea().val(g.join("")); +i.dialogManager.calculateDialog.getElement().dialog("open")})});this.buttonMove=new j.Button(i.id+"_button_move",h.MOVE,"Move",function(){i.stateManager.setState(i.stateManager.STATE_MOVE)});this.buttonMove.toggle=!0;this.buttonErase=new j.Button(i.id+"_button_erase",h.ERASE,"Erase",function(){i.stateManager.setState(i.stateManager.STATE_ERASE)});this.buttonErase.toggle=!0;this.buttonClear=new j.Button(i.id+"_button_clear",h.CLEAR,"Clear",function(){var a=!0;if(i.oneMolecule){if(1===i.molecules[0].atoms.length){var b= +i.molecules[0].atoms[0];"C"===b.label&&0===b.charge&&-1===b.mass&&(a=!1)}}else 0===i.molecules.length&&0===i.shapes.length&&(a=!1);a&&(i.stateManager.getCurrentState().clearHover(),i.lasso&&i.lasso.isActive()&&i.lasso.empty(),i.historyManager.pushUndo(new e.ClearAction(i)))});this.buttonClean=new j.Button(i.id+"_button_clean",h.OPTIMIZE,"Clean",function(){var a=i.oneMolecule?i.molecules[0]:i.lasso.getFirstMolecule();if(a){var b=new f.JSONInterpreter;d._contactServer("optimize",{mol:b.molTo(a)},{dimension:2}, +function(g){var g=b.molFrom(g.mol),d=g.getCenter(),f=new c.Point(i.width/2,i.height/2);f.sub(d);for(var d=0,h=g.atoms.length;d<h;d++)g.atoms[d].add(f);i.historyManager.pushUndo(new e.ChangeCoordinatesAction(a.atoms,g.atoms))})}});this.makeLassoSet(this);this.makeScaleSet(this);this.makeHistorySet(this);this.makeLabelSet(this);this.makeBondSet(this);this.makeRingSet(this);this.makeAttributeSet(this);this.makeShapeSet(this);return!0};b.ToolbarManager.prototype.write=function(){var a=[],b=this.sketcher.id+ +"_main_group";this.sketcher.oneMolecule?a.push(this.buttonMove.getSource(b)):a.push(this.lassoSet.getSource(b));a.push(this.buttonClear.getSource());a.push(this.buttonErase.getSource(b));this.sketcher.useServices&&a.push(this.buttonClean.getSource());a.push(this.historySet.getSource());a.push(this.scaleSet.getSource());a.push(this.buttonOpen.getSource());a.push(this.buttonSave.getSource());this.sketcher.useServices&&(a.push(this.buttonSearch.getSource()),a.push(this.buttonCalculate.getSource())); +a.push("<br>");a.push(this.labelSet.getSource(b));a.push(this.attributeSet.getSource(b));a.push(this.bondSet.getSource(b));a.push(this.ringSet.getSource(b));this.sketcher.oneMolecule||a.push(this.shapeSet.getSource(b));a.push("<br>");n.getElementById(this.sketcher.id)?l("#"+this.sketcher.id).before(a.join("")):n.write(a.join(""))};b.ToolbarManager.prototype.setup=function(){this.sketcher.oneMolecule?this.buttonMove.setup(!0):this.lassoSet.setup();this.buttonClear.setup();this.buttonErase.setup(!0); +this.sketcher.useServices&&this.buttonClean.setup();this.historySet.setup();this.scaleSet.setup();this.buttonOpen.setup();this.buttonSave.setup();this.sketcher.useServices&&(this.buttonSearch.setup(),this.buttonCalculate.setup());this.labelSet.setup();this.attributeSet.setup();this.bondSet.setup();this.ringSet.setup();this.sketcher.oneMolecule||this.shapeSet.setup();this.buttonSingle.select();this.buttonUndo.disable();this.buttonRedo.disable();!this.sketcher.oneMolecule&&this.sketcher.useServices&& +(this.buttonClean.disable(),this.buttonCalculate.disable(),this.buttonSave.disable())};b.ToolbarManager.prototype.makeScaleSet=function(a){this.scaleSet=new j.ButtonSet(a.sketcher.id+"_buttons_scale");this.scaleSet.toggle=!1;this.buttonScalePlus=new j.Button(a.sketcher.id+"_button_scale_plus",h.ZOOM_IN,"Increase Scale",function(){a.sketcher.specs.scale*=1.5;a.sketcher.checkScale();a.sketcher.repaint()});this.scaleSet.buttons.push(this.buttonScalePlus);this.buttonScaleMinus=new j.Button(a.sketcher.id+ +"_button_scale_minus",h.ZOOM_OUT,"Decrease Scale",function(){a.sketcher.specs.scale/=1.5;a.sketcher.checkScale();a.sketcher.repaint()});this.scaleSet.buttons.push(this.buttonScaleMinus)};b.ToolbarManager.prototype.makeLassoSet=function(a){this.lassoSet=new j.ButtonSet(a.sketcher.id+"_buttons_lasso");this.buttonLasso=new j.DummyButton(a.sketcher.id+"_button_lasso",h.LASSO,"Selection Tool");this.lassoSet.buttons.push(this.buttonLasso);this.lassoSet.addDropDown("More Selection Tools");this.lassoSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+ +"_button_lasso_lasso",h.LASSO,"Lasso Tool",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_LASSO);a.sketcher.lasso.mode=m.Lasso.MODE_LASSO;0<a.sketcher.molecules.length&&!a.sketcher.lasso.isActive()&&a.sketcher.lasso.select(a.sketcher.molecules[a.sketcher.molecules.length-1].atoms,[])}));this.lassoSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+"_button_lasso_shapes",h.LASSO_SHAPES,"Lasso Tool (shapes only)",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_LASSO); +a.sketcher.lasso.mode=m.Lasso.MODE_LASSO_SHAPES;0<a.sketcher.shapes.length&&!a.sketcher.lasso.isActive()&&a.sketcher.lasso.select([],[a.sketcher.shapes[a.sketcher.shapes.length-1]])}));this.lassoSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+"_button_lasso_marquee",h.MARQUEE,"Marquee Tool",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_LASSO);a.sketcher.lasso.mode=m.Lasso.MODE_RECTANGLE_MARQUEE;0<a.sketcher.molecules.length&&!a.sketcher.lasso.isActive()&& +a.sketcher.lasso.select(a.sketcher.molecules[a.sketcher.molecules.length-1].atoms,[])}))};b.ToolbarManager.prototype.makeHistorySet=function(a){this.historySet=new j.ButtonSet(a.sketcher.id+"_buttons_history");this.historySet.toggle=!1;this.buttonUndo=new j.Button(a.sketcher.id+"_button_undo",h.UNDO,"Undo",function(){a.sketcher.historyManager.undo()});this.historySet.buttons.push(this.buttonUndo);this.buttonRedo=new j.Button(a.sketcher.id+"_button_redo",h.REDO,"Redo",function(){a.sketcher.historyManager.redo()}); +this.historySet.buttons.push(this.buttonRedo)};b.ToolbarManager.prototype.makeLabelSet=function(a){this.labelSet=new j.ButtonSet(a.sketcher.id+"_buttons_label");this.buttonLabel=new j.DummyButton(a.sketcher.id+"_button_label",h.CARBON,"Set Label");this.labelSet.buttons.push(this.buttonLabel);this.labelSet.addDropDown("More Labels");this.labelSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+"_button_label_h",h.HYDROGEN,"Hydrogen",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_LABEL); +a.sketcher.stateManager.STATE_LABEL.label="H"}));this.labelSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+"_button_label_c",h.CARBON,"Carbon",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_LABEL);a.sketcher.stateManager.STATE_LABEL.label="C"}));this.labelSet.dropDown.defaultButton=this.labelSet.dropDown.buttonSet.buttons[this.labelSet.dropDown.buttonSet.buttons.length-1];this.labelSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+"_button_label_n", +h.NITROGEN,"Nitrogen",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_LABEL);a.sketcher.stateManager.STATE_LABEL.label="N"}));this.labelSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+"_button_label_o",h.OXYGEN,"Oxygen",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_LABEL);a.sketcher.stateManager.STATE_LABEL.label="O"}));this.labelSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+"_button_label_f",h.FLUORINE,"Fluorine", +function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_LABEL);a.sketcher.stateManager.STATE_LABEL.label="F"}));this.labelSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+"_button_label_cl",h.CHLORINE,"Chlorine",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_LABEL);a.sketcher.stateManager.STATE_LABEL.label="Cl"}));this.labelSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+"_button_label_br",h.BROMINE,"Bromine",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_LABEL); +a.sketcher.stateManager.STATE_LABEL.label="Br"}));this.labelSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+"_button_label_i",h.IODINE,"Iodine",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_LABEL);a.sketcher.stateManager.STATE_LABEL.label="I"}));this.labelSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+"_button_label_p",h.PHOSPHORUS,"Phosphorus",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_LABEL);a.sketcher.stateManager.STATE_LABEL.label= +"P"}));this.labelSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+"_button_label_s",h.SULFUR,"Sulfur",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_LABEL);a.sketcher.stateManager.STATE_LABEL.label="S"}));this.labelSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+"_button_label_pt",h.PERIODIC_TABLE,"Choose Symbol",function(){for(var b=0,g=a.sketcher.dialogManager.periodicTableDialog.canvas.cells.length;b<g;b++){var c=a.sketcher.dialogManager.periodicTableDialog.canvas.cells[b]; +if(c.element.symbol===a.sketcher.stateManager.STATE_LABEL.label){a.sketcher.dialogManager.periodicTableDialog.canvas.selected=c;a.sketcher.dialogManager.periodicTableDialog.canvas.repaint();break}}a.sketcher.dialogManager.periodicTableDialog.getElement().dialog("open")}))};b.ToolbarManager.prototype.makeBondSet=function(a){this.bondSet=new j.ButtonSet(a.sketcher.id+"_buttons_bond");this.buttonSingle=new j.Button(a.sketcher.id+"_button_bond_single",h.BOND_SINGLE,"Single Bond",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_NEW_BOND); +a.sketcher.stateManager.STATE_NEW_BOND.bondOrder=1;a.sketcher.stateManager.STATE_NEW_BOND.stereo=c.Bond.STEREO_NONE});this.bondSet.buttons.push(this.buttonSingle);this.buttonRecessed=new j.Button(a.sketcher.id+"_button_bond_recessed",h.BOND_RECESSED,"Recessed Bond",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_NEW_BOND);a.sketcher.stateManager.STATE_NEW_BOND.bondOrder=1;a.sketcher.stateManager.STATE_NEW_BOND.stereo=c.Bond.STEREO_RECESSED});this.bondSet.buttons.push(this.buttonRecessed); +this.buttonProtruding=new j.Button(a.sketcher.id+"_button_bond_protruding",h.BOND_PROTRUDING,"Protruding Bond",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_NEW_BOND);a.sketcher.stateManager.STATE_NEW_BOND.bondOrder=1;a.sketcher.stateManager.STATE_NEW_BOND.stereo=c.Bond.STEREO_PROTRUDING});this.bondSet.buttons.push(this.buttonProtruding);this.buttonDouble=new j.Button(a.sketcher.id+"_button_bond_double",h.BOND_DOUBLE,"Double Bond",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_NEW_BOND); +a.sketcher.stateManager.STATE_NEW_BOND.bondOrder=2;a.sketcher.stateManager.STATE_NEW_BOND.stereo=c.Bond.STEREO_NONE});this.bondSet.buttons.push(this.buttonDouble);this.buttonBond=new j.DummyButton(a.sketcher.id+"_button_bond",h.BOND_TRIPLE,"Other Bond");this.bondSet.buttons.push(this.buttonBond);this.bondSet.addDropDown("More Bonds");this.bondSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+"_button_bond_triple",h.BOND_TRIPLE,"Triple Bond",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_NEW_BOND); +a.sketcher.stateManager.STATE_NEW_BOND.bondOrder=3;a.sketcher.stateManager.STATE_NEW_BOND.stereo=c.Bond.STEREO_NONE}));this.bondSet.dropDown.defaultButton=this.bondSet.dropDown.buttonSet.buttons[this.bondSet.dropDown.buttonSet.buttons.length-1];this.bondSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+"_button_bond_ambiguous_double",h.BOND_DOUBLE_AMBIGUOUS,"Ambiguous Double Bond",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_NEW_BOND);a.sketcher.stateManager.STATE_NEW_BOND.bondOrder= +2;a.sketcher.stateManager.STATE_NEW_BOND.stereo=c.Bond.STEREO_AMBIGUOUS}))};b.ToolbarManager.prototype.makeRingSet=function(a){this.ringSet=new j.ButtonSet(a.sketcher.id+"_buttons_ring");this.buttonCyclohexane=new j.Button(a.sketcher.id+"_button_ring_cyclohexane",h.CYCLOHEXANE,"Cyclohexane Ring",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_NEW_RING);a.sketcher.stateManager.STATE_NEW_RING.numSides=6;a.sketcher.stateManager.STATE_NEW_RING.unsaturated=!1});this.ringSet.buttons.push(this.buttonCyclohexane); +this.buttonBenzene=new j.Button(a.sketcher.id+"_button_ring_benzene",h.BENZENE,"Benzene Ring",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_NEW_RING);a.sketcher.stateManager.STATE_NEW_RING.numSides=6;a.sketcher.stateManager.STATE_NEW_RING.unsaturated=!0});this.ringSet.buttons.push(this.buttonBenzene);this.buttonRing=new j.DummyButton(a.sketcher.id+"_button_ring",h.CYCLOPENTANE,"Other Ring");this.ringSet.buttons.push(this.buttonRing);this.ringSet.addDropDown("More Rings"); +this.ringSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+"_button_ring_cyclopropane",h.CYCLOPROPANE,"Cyclopropane Ring",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_NEW_RING);a.sketcher.stateManager.STATE_NEW_RING.numSides=3;a.sketcher.stateManager.STATE_NEW_RING.unsaturated=!1}));this.ringSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+"_button_ring_cyclobutane",h.CYCLOBUTANE,"Cyclobutane Ring",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_NEW_RING); +a.sketcher.stateManager.STATE_NEW_RING.numSides=4;a.sketcher.stateManager.STATE_NEW_RING.unsaturated=!1}));this.ringSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+"_button_ring_cyclopentane",h.CYCLOPENTANE,"Cyclopentane Ring",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_NEW_RING);a.sketcher.stateManager.STATE_NEW_RING.numSides=5;a.sketcher.stateManager.STATE_NEW_RING.unsaturated=!1}));this.ringSet.dropDown.defaultButton=this.ringSet.dropDown.buttonSet.buttons[this.ringSet.dropDown.buttonSet.buttons.length- +1];this.ringSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+"_button_ring_cycloheptane",h.CYCLOHEPTANE,"Cycloheptane Ring",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_NEW_RING);a.sketcher.stateManager.STATE_NEW_RING.numSides=7;a.sketcher.stateManager.STATE_NEW_RING.unsaturated=!1}));this.ringSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+"_button_ring_cyclooctane",h.CYCLOOCTANE,"Cyclooctane Ring",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_NEW_RING); +a.sketcher.stateManager.STATE_NEW_RING.numSides=8;a.sketcher.stateManager.STATE_NEW_RING.unsaturated=!1}))};b.ToolbarManager.prototype.makeAttributeSet=function(a){this.attributeSet=new j.ButtonSet(a.sketcher.id+"_buttons_attribute");this.buttonAttribute=new j.DummyButton(a.sketcher.id+"_button_attribute",h.INCREASE_CHARGE,"Attributes");this.attributeSet.buttons.push(this.buttonAttribute);this.attributeSet.addDropDown("More Attributes");this.attributeSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+ +"_button_attribute_charge_increment",h.INCREASE_CHARGE,"Increase Charge",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_CHARGE);a.sketcher.stateManager.STATE_CHARGE.delta=1}));this.attributeSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+"_button_attribute_charge_decrement",h.DECREASE_CHARGE,"Decrease Charge",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_CHARGE);a.sketcher.stateManager.STATE_CHARGE.delta=-1}));this.attributeSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+ +"_button_attribute_lonePair_increment",h.ADD_LONE_PAIR,"Add Lone Pair",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_LONE_PAIR);a.sketcher.stateManager.STATE_LONE_PAIR.delta=1}));this.attributeSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+"_button_attribute_lonePair_decrement",h.REMOVE_LONE_PAIR,"Remove Lone Pair",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_LONE_PAIR);a.sketcher.stateManager.STATE_LONE_PAIR.delta=-1}));this.attributeSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+ +"_button_attribute_radical_increment",h.ADD_RADICAL,"Add Radical",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_RADICAL);a.sketcher.stateManager.STATE_RADICAL.delta=1}));this.attributeSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+"_button_attribute_radical_decrement",h.REMOVE_RADICAL,"Remove Radical",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_RADICAL);a.sketcher.stateManager.STATE_RADICAL.delta=-1}));this.attributeSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+ +"_button_label_any",h.ANY_ELEMENT,"Any Element",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_ATOM_QUERY);a.sketcher.stateManager.STATE_ATOM_QUERY.mode=g.AtomQueryState.MODE_ANY}));this.attributeSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+"_button_label_rgroup",h.RGROUP,"Rgroup",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_ATOM_QUERY);a.sketcher.stateManager.STATE_ATOM_QUERY.mode=g.AtomQueryState.MODE_RGROUP}))};b.ToolbarManager.prototype.makeShapeSet= +function(a){this.shapeSet=new j.ButtonSet(a.sketcher.id+"_buttons_shape");this.buttonShape=new j.DummyButton(a.sketcher.id+"_button_shape",h.ARROW_SYNTHETIC,"Add Shape");this.shapeSet.buttons.push(this.buttonShape);this.shapeSet.addDropDown("More Shapes");this.shapeSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+"_button_lasso_arrow_synthetic",h.ARROW_SYNTHETIC,"Synthetic Arrow",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_SHAPE);a.sketcher.stateManager.STATE_SHAPE.shapeType= +g.ShapeState.ARROW_SYNTHETIC}));this.shapeSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+"_button_lasso_arrow_retrosynthetic",h.ARROW_RETROSYNTHETIC,"Retrosynthetic Arrow",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_SHAPE);a.sketcher.stateManager.STATE_SHAPE.shapeType=g.ShapeState.ARROW_RETROSYNTHETIC}));this.shapeSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+"_button_lasso_pusher_1",h.PUSHER_SINGLE,"Single Electron Pusher",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_PUSHER); +a.sketcher.stateManager.STATE_PUSHER.numElectron=1}));this.shapeSet.dropDown.buttonSet.buttons.push(new j.Button(a.sketcher.id+"_button_lasso_pusher_2",h.PUSHER_DOUBLE,"Electron Pair Pusher",function(){a.sketcher.stateManager.setState(a.sketcher.stateManager.STATE_PUSHER);a.sketcher.stateManager.STATE_PUSHER.numElectron=2}))}})(ChemDoodle,ChemDoodle.iChemLabs,ChemDoodle.io,ChemDoodle.structures,ChemDoodle.sketcher.actions,ChemDoodle.sketcher.gui,ChemDoodle.sketcher.gui.imageDepot,ChemDoodle.sketcher.gui.desktop, +ChemDoodle.sketcher.tools,ChemDoodle.sketcher.states,jQuery,document); +(function(a,d,f,c){f.Lasso=function(e){this.sketcher=e;this.atoms=[];this.shapes=[];this.bounds=void 0;this.mode=f.Lasso.MODE_LASSO;this.points=[];this.select=function(b,e){if(!this.block){d.SHIFT||this.empty();if(b)this.atoms=b.slice(0),this.shapes=e.slice(0);else{if(this.mode!==f.Lasso.MODE_LASSO_SHAPES){for(var j=[],m=0,g=this.sketcher.molecules.length;m<g;m++)for(var l=this.sketcher.molecules[m],n=0,i=l.atoms.length;n<i;n++){var o=l.atoms[n];this.mode===f.Lasso.MODE_RECTANGLE_MARQUEE?2===this.points.length&& +a.isBetween(o.x,this.points[0].x,this.points[1].x)&&a.isBetween(o.y,this.points[0].y,this.points[1].y)&&j.push(o):1<this.points.length&&a.isPointInPoly(this.points,o)&&j.push(o)}if(0===this.atoms.length)this.atoms=j;else{for(var k=[],m=0,g=this.atoms.length;m<g;m++)o=this.atoms[m],-1===c(o,j)?k.push(o):o.isLassoed=!1;m=0;for(g=j.length;m<g;m++)-1===c(j[m],this.atoms)&&k.push(j[m]);this.atoms=k}}j=[];m=0;for(g=this.sketcher.shapes.length;m<g;m++){for(var l=this.sketcher.shapes[m],o=l.getPoints(),p= +0<o.length,n=0,i=o.length;n<i;n++){var q=o[n];if(this.mode===f.Lasso.MODE_RECTANGLE_MARQUEE)if(2===this.points.length){if(!a.isBetween(q.x,this.points[0].x,this.points[1].x)||!a.isBetween(q.y,this.points[0].y,this.points[1].y)){p=!1;break}}else{p=!1;break}else if(1<this.points.length){if(!a.isPointInPoly(this.points,q)){p=!1;break}}else{p=!1;break}}p&&j.push(l)}if(0===this.shapes.length)this.shapes=j;else{n=[];m=0;for(g=this.shapes.length;m<g;m++)l=this.shapes[m],-1===c(l,j)?k.push(l):l.isLassoed= +!1;m=0;for(g=j.length;m<g;m++)-1===c(j[m],this.shapes)&&n.push(j[m]);this.shapes=n}}m=0;for(g=this.atoms.length;m<g;m++)this.atoms[m].isLassoed=!0;m=0;for(g=this.shapes.length;m<g;m++)this.shapes[m].isLassoed=!0;this.setBounds();this.bounds&&Infinity===this.bounds.minX&&this.empty();this.points=[];this.sketcher.stateManager.getCurrentState().clearHover();this.enableButtons();this.sketcher.repaint()}};this.enableButtons=function(){this.sketcher.useServices&&(0<this.atoms.length?(this.sketcher.toolbarManager.buttonClean.enable(), +this.sketcher.toolbarManager.buttonCalculate.enable(),this.sketcher.toolbarManager.buttonSave.enable()):(this.sketcher.toolbarManager.buttonClean.disable(),this.sketcher.toolbarManager.buttonCalculate.disable(),this.sketcher.toolbarManager.buttonSave.disable()))};this.setBounds=function(){if(this.isActive()){this.sketcher.repaint();this.bounds=new a.Bounds;for(var b=0,c=this.atoms.length;b<c;b++)this.bounds.expand(this.atoms[b].getBounds());b=0;for(c=this.shapes.length;b<c;b++)this.bounds.expand(this.shapes[b].getBounds()); +this.bounds.minX-=5;this.bounds.minY-=5;this.bounds.maxX+=5;this.bounds.maxY+=5}else this.bounds=void 0};this.empty=function(){for(var a=0,c=this.atoms.length;a<c;a++)this.atoms[a].isLassoed=!1;a=0;for(c=this.shapes.length;a<c;a++)this.shapes[a].isLassoed=!1;this.atoms=[];this.shapes=[];this.bounds=void 0;this.enableButtons();this.sketcher.repaint()};this.draw=function(a,c){a.strokeStyle="blue";a.lineWidth=0.5/c.scale;if(0<this.points.length)if(this.mode===f.Lasso.MODE_RECTANGLE_MARQUEE){if(2===this.points.length){var d= +this.points[0],e=this.points[1];a.beginPath();a.rect(d.x,d.y,e.x-d.x,e.y-d.y);a.stroke()}}else if(1<this.points.length){a.beginPath();a.moveTo(this.points[0].x,this.points[0].y);d=1;for(e=this.points.length;d<e;d++)a.lineTo(this.points[d].x,this.points[d].y);a.closePath();a.stroke()}this.bounds&&(a.beginPath(),a.rect(this.bounds.minX,this.bounds.minY,this.bounds.maxX-this.bounds.minX,this.bounds.maxY-this.bounds.minY),a.stroke())};this.isActive=function(){return 0<this.atoms.length||0<this.shapes.length}; +this.getFirstMolecule=function(){if(0<this.atoms.length)return this.sketcher.getMoleculeByAtom(this.atoms[0])};this.getAllPoints=function(){for(var a=this.atoms,c=0,d=this.shapes.length;c<d;c++)a=a.concat(this.shapes[c].getPoints());return a};this.addPoint=function(a){if(this.mode===f.Lasso.MODE_RECTANGLE_MARQUEE)if(2>this.points.length)this.points.push(a);else{var c=this.points[1];c.x=a.x;c.y=a.y}else this.points.push(a)};return!0};f.Lasso.MODE_LASSO="lasso";f.Lasso.MODE_LASSO_SHAPES="shapes";f.Lasso.MODE_RECTANGLE_MARQUEE= +"rectangle"})(ChemDoodle.math,ChemDoodle.monitor,ChemDoodle.sketcher.tools,jQuery.inArray); +(function(a,d,f,c,e,b,h,j,m){a.SketcherCanvas=function(a,d,j,i){this.isMobile=void 0===i.isMobile?f.supports_touch():i.isMobile;this.useServices=void 0===i.useServices?!1:i.useServices;this.oneMolecule=void 0===i.oneMolecule?!1:i.oneMolecule;this.includeToolbar=void 0===i.includeToolbar?!0:i.includeToolbar;this.id=a;this.toolbarManager=new c.gui.ToolbarManager(this);if(this.includeToolbar){this.toolbarManager.write();var o=this;document.getElementById(this.id)?h("#"+a+"_button_attribute_lonePair_decrement_icon").load(function(){o.toolbarManager.setup()}): +h(m).load(function(){o.toolbarManager.setup()});this.dialogManager=new c.gui.DialogManager(this)}this.stateManager=new c.states.StateManager(this);this.historyManager=new c.actions.HistoryManager(this);a&&this.create(a,d,j);this.specs.atoms_circleDiameter_2D=7;this.specs.atoms_circleBorderWidth_2D=0;this.isHelp=!1;this.helpPos=new e.Point(this.width-20,20);this.lastPinchScale=1;this.lastGestureRotate=0;this.inGesture=!1;this.oneMolecule?(a=new e.Molecule,a.atoms.push(new e.Atom),this.loadMolecule(a)): +(this.startAtom=new e.Atom("C",-10,-10),this.startAtom.isLone=!0,this.lasso=new b.Lasso(this));return!0};a.SketcherCanvas.prototype=new a._Canvas;a.SketcherCanvas.prototype.drawSketcherDecorations=function(a){a.save();a.translate(this.width/2,this.height/2);a.rotate(this.specs.rotateAngle);a.scale(this.specs.scale,this.specs.scale);a.translate(-this.width/2,-this.height/2);this.hovering&&this.hovering.drawDecorations(a,this.specs);this.startAtom&&-10!=this.startAtom.x&&!this.isMobile&&this.startAtom.draw(a, +this.specs);this.tempAtom&&(a.strokeStyle="#00FF00",a.fillStyle="#00FF00",a.lineWidth=1,a.beginPath(),a.moveTo(this.hovering.x,this.hovering.y),d.contextHashTo(a,this.hovering.x,this.hovering.y,this.tempAtom.x,this.tempAtom.y,2,2),a.stroke(),a.beginPath(),a.arc(this.tempAtom.x,this.tempAtom.y,3,0,2*j.PI,!1),a.fill(),this.tempAtom.isOverlap&&(a.strokeStyle="#C10000",a.lineWidth=1.2,a.beginPath(),a.arc(this.tempAtom.x,this.tempAtom.y,7,0,2*j.PI,!1),a.stroke()));if(this.tempRing){a.strokeStyle="#00FF00"; +a.fillStyle="#00FF00";a.lineWidth=1;a.beginPath();if(this.hovering instanceof e.Atom){a.moveTo(this.hovering.x,this.hovering.y);d.contextHashTo(a,this.hovering.x,this.hovering.y,this.tempRing[0].x,this.tempRing[0].y,2,2);for(var b=1,c=this.tempRing.length;b<c;b++)d.contextHashTo(a,this.tempRing[b-1].x,this.tempRing[b-1].y,this.tempRing[b].x,this.tempRing[b].y,2,2);d.contextHashTo(a,this.tempRing[this.tempRing.length-1].x,this.tempRing[this.tempRing.length-1].y,this.hovering.x,this.hovering.y,2,2)}else if(this.hovering instanceof +e.Bond){var b=this.hovering.a2,f=this.hovering.a1;this.tempRing[0]===this.hovering.a1&&(b=this.hovering.a1,f=this.hovering.a2);a.moveTo(b.x,b.y);d.contextHashTo(a,b.x,b.y,this.tempRing[1].x,this.tempRing[1].y,2,2);b=2;for(c=this.tempRing.length;b<c;b++)d.contextHashTo(a,this.tempRing[b-1].x,this.tempRing[b-1].y,this.tempRing[b].x,this.tempRing[b].y,2,2);d.contextHashTo(a,this.tempRing[this.tempRing.length-1].x,this.tempRing[this.tempRing.length-1].y,f.x,f.y,2,2)}a.stroke()}this.lasso&&this.lasso.draw(a, +this.specs);this.stateManager.getCurrentState().draw&&this.stateManager.getCurrentState().draw(a);a.restore()};a.SketcherCanvas.prototype.drawChildExtras=function(a){this.drawSketcherDecorations(a);if(!this.hideHelp){var b=a.createRadialGradient(this.width-20,20,10,this.width-20,20,2);b.addColorStop(0,"#00680F");b.addColorStop(1,"#FFFFFF");a.fillStyle=b;a.beginPath();a.arc(this.helpPos.x,this.helpPos.y,10,0,2*j.PI,!1);a.fill();this.isHelp&&(a.lineWidth=2,a.strokeStyle="black",a.stroke());a.fillStyle= +this.isHelp?"red":"black";a.textAlign="center";a.textBaseline="middle";a.font="14px sans-serif";a.fillText("?",this.helpPos.x,this.helpPos.y)}this.paidToHideTrademark||(b=a.measureText("ChemDoodle").width,a.textAlign="left",a.textBaseline="bottom",a.font="14px sans-serif",a.fillStyle="rgba(0, 60, 0, 0.5)",a.fillText("ChemDoodle",this.width-b-13,this.height-4),a.font="8px sans-serif",a.fillText("\u00ae",this.width-13,this.height-12))};a.SketcherCanvas.prototype.scaleEvent=function(a){a.op=new e.Point(a.p.x, +a.p.y);1!==this.specs.scale&&(a.p.x=this.width/2+(a.p.x-this.width/2)/this.specs.scale,a.p.y=this.height/2+(a.p.y-this.height/2)/this.specs.scale)};a.SketcherCanvas.prototype.checkScale=function(){0.5>this.specs.scale?this.specs.scale=0.5:10<this.specs.scale&&(this.specs.scale=10)};a.SketcherCanvas.prototype.click=function(a){this.scaleEvent(a);this.stateManager.getCurrentState().click(a)};a.SketcherCanvas.prototype.rightclick=function(a){this.scaleEvent(a);this.stateManager.getCurrentState().rightclick(a)}; +a.SketcherCanvas.prototype.dblclick=function(a){this.scaleEvent(a);this.stateManager.getCurrentState().dblclick(a)};a.SketcherCanvas.prototype.mousedown=function(a){this.scaleEvent(a);this.stateManager.getCurrentState().mousedown(a)};a.SketcherCanvas.prototype.rightmousedown=function(a){this.scaleEvent(a);this.stateManager.getCurrentState().rightmousedown(a)};a.SketcherCanvas.prototype.mousemove=function(a){this.isHelp=!1;10>a.p.distance(this.helpPos)&&(this.isHelp=!0);this.scaleEvent(a);this.stateManager.getCurrentState().mousemove(a)}; +a.SketcherCanvas.prototype.mouseout=function(a){this.scaleEvent(a);this.stateManager.getCurrentState().mouseout(a)};a.SketcherCanvas.prototype.mouseover=function(a){this.scaleEvent(a);this.stateManager.getCurrentState().mouseover(a)};a.SketcherCanvas.prototype.mouseup=function(a){this.scaleEvent(a);this.stateManager.getCurrentState().mouseup(a)};a.SketcherCanvas.prototype.rightmouseup=function(a){this.scaleEvent(a);this.stateManager.getCurrentState().rightmouseup(a)};a.SketcherCanvas.prototype.mousewheel= +function(a,b){this.scaleEvent(a);this.stateManager.getCurrentState().mousewheel(a,b)};a.SketcherCanvas.prototype.drag=function(a){this.scaleEvent(a);this.stateManager.getCurrentState().drag(a)};a.SketcherCanvas.prototype.keydown=function(a){this.scaleEvent(a);this.stateManager.getCurrentState().keydown(a)};a.SketcherCanvas.prototype.keypress=function(a){this.scaleEvent(a);this.stateManager.getCurrentState().keypress(a)};a.SketcherCanvas.prototype.keyup=function(a){this.scaleEvent(a);this.stateManager.getCurrentState().keyup(a)}; +a.SketcherCanvas.prototype.touchstart=function(a){if(a.originalEvent.touches&&1<a.originalEvent.touches.length){if(this.tempAtom||this.tempRing)this.hovering=this.tempRing=this.tempAtom=void 0,this.repaint();this.lastPoint=void 0}else this.scaleEvent(a),this.stateManager.getCurrentState().mousemove(a),this.stateManager.getCurrentState().mousedown(a)};a.SketcherCanvas.prototype.touchmove=function(a){this.scaleEvent(a);this.inGesture||this.stateManager.getCurrentState().drag(a)};a.SketcherCanvas.prototype.touchend= +function(a){this.scaleEvent(a);this.stateManager.getCurrentState().mouseup(a);this.hovering&&(this.stateManager.getCurrentState().clearHover(),this.repaint())};a.SketcherCanvas.prototype.gesturechange=function(a){this.inGesture=!0;if(1!==a.originalEvent.scale-this.lastPinchScale){if(!this.lasso||!this.lasso.isActive())this.specs.scale*=a.originalEvent.scale/this.lastPinchScale,this.checkScale();this.lastPinchScale=a.originalEvent.scale}if(0!==this.lastGestureRotate-a.originalEvent.rotation){var b= +(this.lastGestureRotate-a.originalEvent.rotation)/180*j.PI;if(this.parentAction){this.parentAction.dif+=b;for(var d=0,f=this.parentAction.ps.length;d<f;d++){var h=this.parentAction.ps[d],k=this.parentAction.center.distance(h),m=this.parentAction.center.angle(h)+b;h.x=this.parentAction.center.x+k*j.cos(m);h.y=this.parentAction.center.y-k*j.sin(m)}d=0;for(f=this.molecules.length;d<f;d++)this.molecules[d].check();this.lasso&&this.lasso.isActive()&&this.lasso.setBounds()}else d=this.lasso&&this.lasso.isActive()? +this.lasso.getAllPoints():this.getAllPoints(),f=this.lasso&&this.lasso.isActive()?new e.Point((this.lasso.bounds.minX+this.lasso.bounds.maxX)/2,(this.lasso.bounds.minY+this.lasso.bounds.maxY)/2):new e.Point(this.width/2,this.height/2),this.parentAction=new c.actions.RotateAction(d,b,f),this.historyManager.pushUndo(this.parentAction);this.lastGestureRotate=a.originalEvent.rotation}this.repaint()};a.SketcherCanvas.prototype.gestureend=function(){this.inGesture=!1;this.lastPinchScale=1;this.lastGestureRotate= +0;this.parentAction=void 0}})(ChemDoodle,ChemDoodle.extensions,ChemDoodle.featureDetection,ChemDoodle.sketcher,ChemDoodle.structures,ChemDoodle.sketcher.tools,jQuery,Math,window); Added: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/js/ChemDoodleWeb.js =================================================================== --- trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/js/ChemDoodleWeb.js (rev 0) +++ trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/js/ChemDoodleWeb.js 2013-01-24 11:34:39 UTC (rev 57) @@ -0,0 +1,425 @@ +// +// ChemDoodle Web Components 5.0.0 +// +// http://web.chemdoodle.com +// +// Copyright 2009-2012 iChemLabs, LLC. All rights reserved. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// As a special exception to the GPL, any HTML file in a public website +// or any free web service which merely makes function calls to this +// code, and for that purpose includes it by reference, shall be deemed +// a separate work for copyright law purposes. If you modify this code, +// you may extend this exception to your version of the code, but you +// are not obligated to do so. If you do not wish to do so, delete this +// exception statement from your version. +// +// As an additional exception to the GPL, you may distribute this +// packed form of the code without the copy of the GPL license normally +// required, provided you include this license notice and a URL through +// which recipients can access the corresponding unpacked source code. +// +// This program 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 General Public License for more details. +// +// Please contact iChemLabs <http://www.ichemlabs.com/contact> for +// alternate licensing options. +// +var ChemDoodle=function(){var b={structures:{}};b.structures.d2={};b.structures.d3={};b.iChemLabs={};b.informatics={};b.io={};b.getVersion=function(){return"5.0.0"};return b}(); +ChemDoodle.extensions=function(b,e,a){return{stringStartsWith:function(a,c){return a.slice(0,c.length)===c},vec3AngleFrom:function(b,c){var d=e.length(b),f=e.length(c),d=e.dot(b,c)/d/f;return a.acos(d)},contextHashTo:function(a,c,d,f,q,g,e){for(var m=0,j=(new b.Point(c,d)).distance(new b.Point(f,q)),l=!1,n=c,r=d,c=f-c,d=q-d;m<j;){if(l)if(m+e>j){a.moveTo(f,q);break}else{var k=e/j,n=n+k*c,r=r+k*d;a.moveTo(n,r);m+=e}else if(m+g>j){a.lineTo(f,q);break}else k=g/j,n+=k*c,r+=k*d,a.lineTo(n,r),m+=g;l=!l}}, +contextRoundRect:function(a,c,d,f,q,g){a.beginPath();a.moveTo(c+g,d);a.lineTo(c+f-g,d);a.quadraticCurveTo(c+f,d,c+f,d+g);a.lineTo(c+f,d+q-g);a.quadraticCurveTo(c+f,d+q,c+f-g,d+q);a.lineTo(c+g,d+q);a.quadraticCurveTo(c,d+q,c,d+q-g);a.lineTo(c,d+g);a.quadraticCurveTo(c,d,c+g,d);a.closePath()},contextEllipse:function(a,c,d,f,q){var g=0.5522848*(f/2),b=0.5522848*(q/2),m=c+f,j=d+q,f=c+f/2,q=d+q/2;a.beginPath();a.moveTo(c,q);a.bezierCurveTo(c,q-b,f-g,d,f,d);a.bezierCurveTo(f+g,d,m,q-b,m,q);a.bezierCurveTo(m, +q+b,f+g,j,f,j);a.bezierCurveTo(f-g,j,c,q+b,c,q);a.closePath()}}}(ChemDoodle.structures,vec3,Math); +ChemDoodle.math=function(b,e,a){var h={},c={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b", +darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff", +gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c","indigo ":"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa", +lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080", +oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0", +skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};h.angleBetweenLargest=function(d){if(0===d.length)return{angle:0,largest:2*a.PI};if(1===d.length)return{angle:d[0]+a.PI,largest:2*a.PI};for(var f=0,c=0,g=0,b=d.length-1;g<b;g++){var m=d[g+1]-d[g]; +m>f&&(f=m,c=(d[g+1]+d[g])/2)}g=d[0]+2*a.PI-d[d.length-1];g>f&&(c=d[0]-g/2,f=g,0>c&&(c+=2*a.PI));return{angle:c,largest:f}};h.isBetween=function(a,f,c){if(f>c)var g=f,f=c,c=g;return a>=f&&a<=c};h.getRGB=function(a,f){var q=[0,0,0];c[a.toLowerCase()]&&(a=c[a.toLowerCase()]);if("#"===a.charAt(0))return 4===a.length&&(a="#"+a.charAt(1)+a.charAt(1)+a.charAt(2)+a.charAt(2)+a.charAt(3)+a.charAt(3)),[parseInt(a.substring(1,3),16)/255*f,parseInt(a.substring(3,5),16)/255*f,parseInt(a.substring(5,7),16)/255* +f];if(b.stringStartsWith(a,"rgb")){var g=a.replace(/rgb\(|\)/g,"").split(",");return 3!==g.length?q:[parseInt(g[0])/255*f,parseInt(g[1])/255*f,parseInt(g[2])/255*f]}return q};h.distanceFromPointToLineInclusive=function(d,f,c){var g=f.distance(c),c=f.angle(c),c=a.PI/2-c,c=f.angle(d)+c,d=f.distance(d),d=new e.Point(d*a.cos(c),-d*a.sin(c));return h.isBetween(-d.y,0,g)?a.abs(d.x):-1};h.calculateDistanceInterior=function(d,f,c){if(this.isBetween(f.x,c.x,c.x+c.w)&&this.isBetween(f.y,c.y,c.y+c.w))return d.distance(f); +var g=[];g.push({x1:c.x,y1:c.y,x2:c.x+c.w,y2:c.y});g.push({x1:c.x,y1:c.y+c.h,x2:c.x+c.w,y2:c.y+c.h});g.push({x1:c.x,y1:c.y,x2:c.x,y2:c.y+c.h});g.push({x1:c.x+c.w,y1:c.y,x2:c.x+c.w,y2:c.y+c.h});for(var c=[],b=0;4>b;b++){var m=g[b];(m=this.intersectLines(f.x,f.y,d.x,d.y,m.x1,m.y1,m.x2,m.y2))&&c.push(m)}if(0===c.length)return 0;b=f=0;for(g=c.length;b<g;b++)var m=c[b],j=d.x-m.x,m=d.y-m.y,f=a.max(f,a.sqrt(j*j+m*m));return f};h.intersectLines=function(a,f,c,g,b,m,j,e){var c=c-a,g=g-f,j=j-b,e=e-m,h=g*j- +c*e;if(0===h)return!1;j=(e*(a-b)-j*(f-m))/h;b=(g*(a-b)-c*(f-m))/h;return 0<=b&&1>=b&&0<=j&&1>=j?{x:a+j*c,y:f+j*g}:!1};h.hsl2rgb=function(a,f,c){var g=function(a,d,c){0>c?c+=1:1<c&&(c-=1);return c<1/6?a+6*(d-a)*c:0.5>c?d:c<2/3?a+6*(d-a)*(2/3-c):a};if(0===f)c=f=a=c;else var b=0.5>c?c*(1+f):c+f-c*f,m=2*c-b,c=g(m,b,a+1/3),f=g(m,b,a),a=g(m,b,a-1/3);return[255*c,255*f,255*a]};h.isPointInPoly=function(a,c){for(var b=!1,g=-1,e=a.length,m=e-1;++g<e;m=g)(a[g].y<=c.y&&c.y<a[m].y||a[m].y<=c.y&&c.y<a[g].y)&&c.x< +(a[m].x-a[g].x)*(c.y-a[g].y)/(a[m].y-a[g].y)+a[g].x&&(b=!b);return b};return h}(ChemDoodle.extensions,ChemDoodle.structures,Math); +(function(b,e){b.Bounds=function(){this.minX=this.minY=Infinity;this.maxX=this.maxY=-Infinity;this.expand=function(a,h,c,d){a instanceof b.Bounds?(this.minX=e.min(this.minX,a.minX),this.minY=e.min(this.minY,a.minY),this.maxX=e.max(this.maxX,a.maxX),this.maxY=e.max(this.maxY,a.maxY)):(this.minX=e.min(this.minX,a),this.maxX=e.max(this.maxX,a),this.minY=e.min(this.minY,h),this.maxY=e.max(this.maxY,h),void 0!==c&&void 0!==d&&(this.minX=e.min(this.minX,c),this.maxX=e.max(this.maxX,c),this.minY=e.min(this.minY, +d),this.maxY=e.max(this.maxY,d)))};return!0}})(ChemDoodle.math,Math); +ChemDoodle.featureDetection=function(b,e,a,h){var c={supports_canvas:function(){return!!a.createElement("canvas").getContext},supports_canvas_text:function(){return!c.supports_canvas()?!1:"function"===typeof a.createElement("canvas").getContext("2d").fillText},supports_webgl:function(){var c=a.createElement("canvas");try{if(c.getContext("webgl")||c.getContext("experimental-webgl"))return!0}catch(f){}return!1},supports_xhr2:function(){return e.support.cors},supports_touch:function(){return"ontouchstart"in +h},supports_gesture:function(){return"ongesturestart"in h}};return c}(ChemDoodle.iChemLabs,jQuery,document,window);ChemDoodle.SYMBOLS="H,He,Li,Be,B,C,N,O,F,Ne,Na,Mg,Al,Si,P,S,Cl,Ar,K,Ca,Sc,Ti,V,Cr,Mn,Fe,Co,Ni,Cu,Zn,Ga,Ge,As,Se,Br,Kr,Rb,Sr,Y,Zr,Nb,Mo,Tc,Ru,Rh,Pd,Ag,Cd,In,Sn,Sb,Te,I,Xe,Cs,Ba,La,Ce,Pr,Nd,Pm,Sm,Eu,Gd,Tb,Dy,Ho,Er,Tm,Yb,Lu,Hf,Ta,W,Re,Os,Ir,Pt,Au,Hg,Tl,Pb,Bi,Po,At,Rn,Fr,Ra,Ac,Th,Pa,U,Np,Pu,Am,Cm,Bk,Cf,Es,Fm,Md,No,Lr,Rf,Db,Sg,Bh,Hs,Mt,Ds,Rg,Cn,Uut,Uuq,Uup,Uuh,Uus,Uuo".split(","); +ChemDoodle.ELEMENT=function(b){function e(a,c,b){this.symbol=a;this.name=c;this.atomicNumber=b;return!0}var a=[];a.H=new e("H","Hydrogen",1);a.He=new e("He","Helium",2);a.Li=new e("Li","Lithium",3);a.Be=new e("Be","Beryllium",4);a.B=new e("B","Boron",5);a.C=new e("C","Carbon",6);a.N=new e("N","Nitrogen",7);a.O=new e("O","Oxygen",8);a.F=new e("F","Fluorine",9);a.Ne=new e("Ne","Neon",10);a.Na=new e("Na","Sodium",11);a.Mg=new e("Mg","Magnesium",12);a.Al=new e("Al","Aluminum",13);a.Si=new e("Si","Silicon", +14);a.P=new e("P","Phosphorus",15);a.S=new e("S","Sulfur",16);a.Cl=new e("Cl","Chlorine",17);a.Ar=new e("Ar","Argon",18);a.K=new e("K","Potassium",19);a.Ca=new e("Ca","Calcium",20);a.Sc=new e("Sc","Scandium",21);a.Ti=new e("Ti","Titanium",22);a.V=new e("V","Vanadium",23);a.Cr=new e("Cr","Chromium",24);a.Mn=new e("Mn","Manganese",25);a.Fe=new e("Fe","Iron",26);a.Co=new e("Co","Cobalt",27);a.Ni=new e("Ni","Nickel",28);a.Cu=new e("Cu","Copper",29);a.Zn=new e("Zn","Zinc",30);a.Ga=new e("Ga","Gallium", +31);a.Ge=new e("Ge","Germanium",32);a.As=new e("As","Arsenic",33);a.Se=new e("Se","Selenium",34);a.Br=new e("Br","Bromine",35);a.Kr=new e("Kr","Krypton",36);a.Rb=new e("Rb","Rubidium",37);a.Sr=new e("Sr","Strontium",38);a.Y=new e("Y","Yttrium",39);a.Zr=new e("Zr","Zirconium",40);a.Nb=new e("Nb","Niobium",41);a.Mo=new e("Mo","Molybdenum",42);a.Tc=new e("Tc","Technetium",43);a.Ru=new e("Ru","Ruthenium",44);a.Rh=new e("Rh","Rhodium",45);a.Pd=new e("Pd","Palladium",46);a.Ag=new e("Ag","Silver",47);a.Cd= +new e("Cd","Cadmium",48);a.In=new e("In","Indium",49);a.Sn=new e("Sn","Tin",50);a.Sb=new e("Sb","Antimony",51);a.Te=new e("Te","Tellurium",52);a.I=new e("I","Iodine",53);a.Xe=new e("Xe","Xenon",54);a.Cs=new e("Cs","Cesium",55);a.Ba=new e("Ba","Barium",56);a.La=new e("La","Lanthanum",57);a.Ce=new e("Ce","Cerium",58);a.Pr=new e("Pr","Praseodymium",59);a.Nd=new e("Nd","Neodymium",60);a.Pm=new e("Pm","Promethium",61);a.Sm=new e("Sm","Samarium",62);a.Eu=new e("Eu","Europium",63);a.Gd=new e("Gd","Gadolinium", +64);a.Tb=new e("Tb","Terbium",65);a.Dy=new e("Dy","Dysprosium",66);a.Ho=new e("Ho","Holmium",67);a.Er=new e("Er","Erbium",68);a.Tm=new e("Tm","Thulium",69);a.Yb=new e("Yb","Ytterbium",70);a.Lu=new e("Lu","Lutetium",71);a.Hf=new e("Hf","Hafnium",72);a.Ta=new e("Ta","Tantalum",73);a.W=new e("W","Tungsten",74);a.Re=new e("Re","Rhenium",75);a.Os=new e("Os","Osmium",76);a.Ir=new e("Ir","Iridium",77);a.Pt=new e("Pt","Platinum",78);a.Au=new e("Au","Gold",79);a.Hg=new e("Hg","Mercury",80);a.Tl=new e("Tl", +"Thallium",81);a.Pb=new e("Pb","Lead",82);a.Bi=new e("Bi","Bismuth",83);a.Po=new e("Po","Polonium",84);a.At=new e("At","Astatine",85);a.Rn=new e("Rn","Radon",86);a.Fr=new e("Fr","Francium",87);a.Ra=new e("Ra","Radium",88);a.Ac=new e("Ac","Actinium",89);a.Th=new e("Th","Thorium",90);a.Pa=new e("Pa","Protactinium",91);a.U=new e("U","Uranium",92);a.Np=new e("Np","Neptunium",93);a.Pu=new e("Pu","Plutonium",94);a.Am=new e("Am","Americium",95);a.Cm=new e("Cm","Curium",96);a.Bk=new e("Bk","Berkelium",97); +a.Cf=new e("Cf","Californium",98);a.Es=new e("Es","Einsteinium",99);a.Fm=new e("Fm","Fermium",100);a.Md=new e("Md","Mendelevium",101);a.No=new e("No","Nobelium",102);a.Lr=new e("Lr","Lawrencium",103);a.Rf=new e("Rf","Rutherfordium",104);a.Db=new e("Db","Dubnium",105);a.Sg=new e("Sg","Seaborgium",106);a.Bh=new e("Bh","Bohrium",107);a.Hs=new e("Hs","Hassium",108);a.Mt=new e("Mt","Meitnerium",109);a.Ds=new e("Ds","Darmstadtium",110);a.Rg=new e("Rg","Roentgenium",111);a.Cn=new e("Cn","Copernicium",112); +a.Uut=new e("Uut","Ununtrium",113);a.Uuq=new e("Uuq","Ununquadium",114);a.Uup=new e("Uup","Ununpentium",115);a.Uuh=new e("Uuh","Ununhexium",116);a.Uus=new e("Uus","Ununseptium",117);a.Uuo=new e("Uuo","Ununoctium",118);a.H.jmolColor="#FFFFFF";a.He.jmolColor="#D9FFFF";a.Li.jmolColor="#CC80FF";a.Be.jmolColor="#C2FF00";a.B.jmolColor="#FFB5B5";a.C.jmolColor="#909090";a.N.jmolColor="#3050F8";a.O.jmolColor="#FF0D0D";a.F.jmolColor="#90E050";a.Ne.jmolColor="#B3E3F5";a.Na.jmolColor="#AB5CF2";a.Mg.jmolColor= +"#8AFF00";a.Al.jmolColor="#BFA6A6";a.Si.jmolColor="#F0C8A0";a.P.jmolColor="#FF8000";a.S.jmolColor="#FFFF30";a.Cl.jmolColor="#1FF01F";a.Ar.jmolColor="#80D1E3";a.K.jmolColor="#8F40D4";a.Ca.jmolColor="#3DFF00";a.Sc.jmolColor="#E6E6E6";a.Ti.jmolColor="#BFC2C7";a.V.jmolColor="#A6A6AB";a.Cr.jmolColor="#8A99C7";a.Mn.jmolColor="#9C7AC7";a.Fe.jmolColor="#E06633";a.Co.jmolColor="#F090A0";a.Ni.jmolColor="#50D050";a.Cu.jmolColor="#C88033";a.Zn.jmolColor="#7D80B0";a.Ga.jmolColor="#C28F8F";a.Ge.jmolColor="#668F8F"; +a.As.jmolColor="#BD80E3";a.Se.jmolColor="#FFA100";a.Br.jmolColor="#A62929";a.Kr.jmolColor="#5CB8D1";a.Rb.jmolColor="#702EB0";a.Sr.jmolColor="#00FF00";a.Y.jmolColor="#94FFFF";a.Zr.jmolColor="#94E0E0";a.Nb.jmolColor="#73C2C9";a.Mo.jmolColor="#54B5B5";a.Tc.jmolColor="#3B9E9E";a.Ru.jmolColor="#248F8F";a.Rh.jmolColor="#0A7D8C";a.Pd.jmolColor="#006985";a.Ag.jmolColor="#C0C0C0";a.Cd.jmolColor="#FFD98F";a.In.jmolColor="#A67573";a.Sn.jmolColor="#668080";a.Sb.jmolColor="#9E63B5";a.Te.jmolColor="#D47A00";a.I.jmolColor= +"#940094";a.Xe.jmolColor="#429EB0";a.Cs.jmolColor="#57178F";a.Ba.jmolColor="#00C900";a.La.jmolColor="#70D4FF";a.Ce.jmolColor="#FFFFC7";a.Pr.jmolColor="#D9FFC7";a.Nd.jmolColor="#C7FFC7";a.Pm.jmolColor="#A3FFC7";a.Sm.jmolColor="#8FFFC7";a.Eu.jmolColor="#61FFC7";a.Gd.jmolColor="#45FFC7";a.Tb.jmolColor="#30FFC7";a.Dy.jmolColor="#1FFFC7";a.Ho.jmolColor="#00FF9C";a.Er.jmolColor="#00E675";a.Tm.jmolColor="#00D452";a.Yb.jmolColor="#00BF38";a.Lu.jmolColor="#00AB24";a.Hf.jmolColor="#4DC2FF";a.Ta.jmolColor="#4DA6FF"; +a.W.jmolColor="#2194D6";a.Re.jmolColor="#267DAB";a.Os.jmolColor="#266696";a.Ir.jmolColor="#175487";a.Pt.jmolColor="#D0D0E0";a.Au.jmolColor="#FFD123";a.Hg.jmolColor="#B8B8D0";a.Tl.jmolColor="#A6544D";a.Pb.jmolColor="#575961";a.Bi.jmolColor="#9E4FB5";a.Po.jmolColor="#AB5C00";a.At.jmolColor="#754F45";a.Rn.jmolColor="#428296";a.Fr.jmolColor="#420066";a.Ra.jmolColor="#007D00";a.Ac.jmolColor="#70ABFA";a.Th.jmolColor="#00BAFF";a.Pa.jmolColor="#00A1FF";a.U.jmolColor="#008FFF";a.Np.jmolColor="#0080FF";a.Pu.jmolColor= +"#006BFF";a.Am.jmolColor="#545CF2";a.Cm.jmolColor="#785CE3";a.Bk.jmolColor="#8A4FE3";a.Cf.jmolColor="#A136D4";a.Es.jmolColor="#B31FD4";a.Fm.jmolColor="#B31FBA";a.Md.jmolColor="#B30DA6";a.No.jmolColor="#BD0D87";a.Lr.jmolColor="#C70066";a.Rf.jmolColor="#CC0059";a.Db.jmolColor="#D1004F";a.Sg.jmolColor="#D90045";a.Bh.jmolColor="#E00038";a.Hs.jmolColor="#E6002E";a.Mt.jmolColor="#EB0026";a.Ds.jmolColor="#000000";a.Rg.jmolColor="#000000";a.Cn.jmolColor="#000000";a.Uut.jmolColor="#000000";a.Uuq.jmolColor= +"#000000";a.Uup.jmolColor="#000000";a.Uuh.jmolColor="#000000";a.Uus.jmolColor="#000000";a.Uuo.jmolColor="#000000";for(var h=0,c=b.length;h<c;h++)a[b[h]].pymolColor=a[b[h]].jmolColor;a.H.pymolColor="#E6E6E6";a.C.pymolColor="#33FF33";a.N.pymolColor="#3333FF";a.O.pymolColor="#FF4D4D";a.F.pymolColor="#B3FFFF";a.S.pymolColor="#E6C640";a.H.covalentRadius=0.31;a.He.covalentRadius=0.28;a.Li.covalentRadius=1.28;a.Be.covalentRadius=0.96;a.B.covalentRadius=0.84;a.C.covalentRadius=0.76;a.N.covalentRadius=0.71; +a.O.covalentRadius=0.66;a.F.covalentRadius=0.57;a.Ne.covalentRadius=0.58;a.Na.covalentRadius=1.66;a.Mg.covalentRadius=1.41;a.Al.covalentRadius=1.21;a.Si.covalentRadius=1.11;a.P.covalentRadius=1.07;a.S.covalentRadius=1.05;a.Cl.covalentRadius=1.02;a.Ar.covalentRadius=1.06;a.K.covalentRadius=2.03;a.Ca.covalentRadius=1.76;a.Sc.covalentRadius=1.7;a.Ti.covalentRadius=1.6;a.V.covalentRadius=1.53;a.Cr.covalentRadius=1.39;a.Mn.covalentRadius=1.39;a.Fe.covalentRadius=1.32;a.Co.covalentRadius=1.26;a.Ni.covalentRadius= +1.24;a.Cu.covalentRadius=1.32;a.Zn.covalentRadius=1.22;a.Ga.covalentRadius=1.22;a.Ge.covalentRadius=1.2;a.As.covalentRadius=1.19;a.Se.covalentRadius=1.2;a.Br.covalentRadius=1.2;a.Kr.covalentRadius=1.16;a.Rb.covalentRadius=2.2;a.Sr.covalentRadius=1.95;a.Y.covalentRadius=1.9;a.Zr.covalentRadius=1.75;a.Nb.covalentRadius=1.64;a.Mo.covalentRadius=1.54;a.Tc.covalentRadius=1.47;a.Ru.covalentRadius=1.46;a.Rh.covalentRadius=1.42;a.Pd.covalentRadius=1.39;a.Ag.covalentRadius=1.45;a.Cd.covalentRadius=1.44;a.In.covalentRadius= +1.42;a.Sn.covalentRadius=1.39;a.Sb.covalentRadius=1.39;a.Te.covalentRadius=1.38;a.I.covalentRadius=1.39;a.Xe.covalentRadius=1.4;a.Cs.covalentRadius=2.44;a.Ba.covalentRadius=2.15;a.La.covalentRadius=2.07;a.Ce.covalentRadius=2.04;a.Pr.covalentRadius=2.03;a.Nd.covalentRadius=2.01;a.Pm.covalentRadius=1.99;a.Sm.covalentRadius=1.98;a.Eu.covalentRadius=1.98;a.Gd.covalentRadius=1.96;a.Tb.covalentRadius=1.94;a.Dy.covalentRadius=1.92;a.Ho.covalentRadius=1.92;a.Er.covalentRadius=1.89;a.Tm.covalentRadius=1.9; +a.Yb.covalentRadius=1.87;a.Lu.covalentRadius=1.87;a.Hf.covalentRadius=1.75;a.Ta.covalentRadius=1.7;a.W.covalentRadius=1.62;a.Re.covalentRadius=1.51;a.Os.covalentRadius=1.44;a.Ir.covalentRadius=1.41;a.Pt.covalentRadius=1.36;a.Au.covalentRadius=1.36;a.Hg.covalentRadius=1.32;a.Tl.covalentRadius=1.45;a.Pb.covalentRadius=1.46;a.Bi.covalentRadius=1.48;a.Po.covalentRadius=1.4;a.At.covalentRadius=1.5;a.Rn.covalentRadius=1.5;a.Fr.covalentRadius=2.6;a.Ra.covalentRadius=2.21;a.Ac.covalentRadius=2.15;a.Th.covalentRadius= +2.06;a.Pa.covalentRadius=2;a.U.covalentRadius=1.96;a.Np.covalentRadius=1.9;a.Pu.covalentRadius=1.87;a.Am.covalentRadius=1.8;a.Cm.covalentRadius=1.69;a.Bk.covalentRadius=0;a.Cf.covalentRadius=0;a.Es.covalentRadius=0;a.Fm.covalentRadius=0;a.Md.covalentRadius=0;a.No.covalentRadius=0;a.Lr.covalentRadius=0;a.Rf.covalentRadius=0;a.Db.covalentRadius=0;a.Sg.covalentRadius=0;a.Bh.covalentRadius=0;a.Hs.covalentRadius=0;a.Mt.covalentRadius=0;a.Ds.covalentRadius=0;a.Rg.covalentRadius=0;a.Cn.covalentRadius=0; +a.Uut.covalentRadius=0;a.Uuq.covalentRadius=0;a.Uup.covalentRadius=0;a.Uuh.covalentRadius=0;a.Uus.covalentRadius=0;a.Uuo.covalentRadius=0;a.H.vdWRadius=1.2;a.He.vdWRadius=1.4;a.Li.vdWRadius=1.82;a.Be.vdWRadius=0;a.B.vdWRadius=0;a.C.vdWRadius=1.7;a.N.vdWRadius=1.55;a.O.vdWRadius=1.52;a.F.vdWRadius=1.47;a.Ne.vdWRadius=1.54;a.Na.vdWRadius=2.27;a.Mg.vdWRadius=1.73;a.Al.vdWRadius=0;a.Si.vdWRadius=2.1;a.P.vdWRadius=1.8;a.S.vdWRadius=1.8;a.Cl.vdWRadius=1.75;a.Ar.vdWRadius=1.88;a.K.vdWRadius=2.75;a.Ca.vdWRadius= +0;a.Sc.vdWRadius=0;a.Ti.vdWRadius=0;a.V.vdWRadius=0;a.Cr.vdWRadius=0;a.Mn.vdWRadius=0;a.Fe.vdWRadius=0;a.Co.vdWRadius=0;a.Ni.vdWRadius=1.63;a.Cu.vdWRadius=1.4;a.Zn.vdWRadius=1.39;a.Ga.vdWRadius=1.87;a.Ge.vdWRadius=0;a.As.vdWRadius=1.85;a.Se.vdWRadius=1.9;a.Br.vdWRadius=1.85;a.Kr.vdWRadius=2.02;a.Rb.vdWRadius=0;a.Sr.vdWRadius=0;a.Y.vdWRadius=0;a.Zr.vdWRadius=0;a.Nb.vdWRadius=0;a.Mo.vdWRadius=0;a.Tc.vdWRadius=0;a.Ru.vdWRadius=0;a.Rh.vdWRadius=0;a.Pd.vdWRadius=1.63;a.Ag.vdWRadius=1.72;a.Cd.vdWRadius= +1.58;a.In.vdWRadius=1.93;a.Sn.vdWRadius=2.17;a.Sb.vdWRadius=0;a.Te.vdWRadius=2.06;a.I.vdWRadius=1.98;a.Xe.vdWRadius=2.16;a.Cs.vdWRadius=0;a.Ba.vdWRadius=0;a.La.vdWRadius=0;a.Ce.vdWRadius=0;a.Pr.vdWRadius=0;a.Nd.vdWRadius=0;a.Pm.vdWRadius=0;a.Sm.vdWRadius=0;a.Eu.vdWRadius=0;a.Gd.vdWRadius=0;a.Tb.vdWRadius=0;a.Dy.vdWRadius=0;a.Ho.vdWRadius=0;a.Er.vdWRadius=0;a.Tm.vdWRadius=0;a.Yb.vdWRadius=0;a.Lu.vdWRadius=0;a.Hf.vdWRadius=0;a.Ta.vdWRadius=0;a.W.vdWRadius=0;a.Re.vdWRadius=0;a.Os.vdWRadius=0;a.Ir.vdWRadius= +0;a.Pt.vdWRadius=1.75;a.Au.vdWRadius=1.66;a.Hg.vdWRadius=1.55;a.Tl.vdWRadius=1.96;a.Pb.vdWRadius=2.02;a.Bi.vdWRadius=0;a.Po.vdWRadius=0;a.At.vdWRadius=0;a.Rn.vdWRadius=0;a.Fr.vdWRadius=0;a.Ra.vdWRadius=0;a.Ac.vdWRadius=0;a.Th.vdWRadius=0;a.Pa.vdWRadius=0;a.U.vdWRadius=1.86;a.Np.vdWRadius=0;a.Pu.vdWRadius=0;a.Am.vdWRadius=0;a.Cm.vdWRadius=0;a.Bk.vdWRadius=0;a.Cf.vdWRadius=0;a.Es.vdWRadius=0;a.Fm.vdWRadius=0;a.Md.vdWRadius=0;a.No.vdWRadius=0;a.Lr.vdWRadius=0;a.Rf.vdWRadius=0;a.Db.vdWRadius=0;a.Sg.vdWRadius= +0;a.Bh.vdWRadius=0;a.Hs.vdWRadius=0;a.Mt.vdWRadius=0;a.Ds.vdWRadius=0;a.Rg.vdWRadius=0;a.Cn.vdWRadius=0;a.Uut.vdWRadius=0;a.Uuq.vdWRadius=0;a.Uup.vdWRadius=0;a.Uuh.vdWRadius=0;a.Uus.vdWRadius=0;a.Uuo.vdWRadius=0;a.H.valency=1;a.He.valency=0;a.Li.valency=1;a.Be.valency=2;a.B.valency=3;a.C.valency=4;a.N.valency=3;a.O.valency=2;a.F.valency=1;a.Ne.valency=0;a.Na.valency=1;a.Mg.valency=0;a.Al.valency=0;a.Si.valency=4;a.P.valency=3;a.S.valency=2;a.Cl.valency=1;a.Ar.valency=0;a.K.valency=0;a.Ca.valency= +0;a.Sc.valency=0;a.Ti.valency=1;a.V.valency=1;a.Cr.valency=2;a.Mn.valency=3;a.Fe.valency=2;a.Co.valency=1;a.Ni.valency=1;a.Cu.valency=0;a.Zn.valency=0;a.Ga.valency=0;a.Ge.valency=4;a.As.valency=3;a.Se.valency=2;a.Br.valency=1;a.Kr.valency=0;a.Rb.valency=0;a.Sr.valency=0;a.Y.valency=0;a.Zr.valency=0;a.Nb.valency=1;a.Mo.valency=2;a.Tc.valency=3;a.Ru.valency=2;a.Rh.valency=1;a.Pd.valency=0;a.Ag.valency=0;a.Cd.valency=0;a.In.valency=0;a.Sn.valency=4;a.Sb.valency=3;a.Te.valency=2;a.I.valency=1;a.Xe.valency= +0;a.Cs.valency=0;a.Ba.valency=0;a.La.valency=0;a.Ce.valency=0;a.Pr.valency=0;a.Nd.valency=0;a.Pm.valency=0;a.Sm.valency=0;a.Eu.valency=0;a.Gd.valency=0;a.Tb.valency=0;a.Dy.valency=0;a.Ho.valency=0;a.Er.valency=0;a.Tm.valency=0;a.Yb.valency=0;a.Lu.valency=0;a.Hf.valency=0;a.Ta.valency=1;a.W.valency=2;a.Re.valency=3;a.Os.valency=2;a.Ir.valency=3;a.Pt.valency=0;a.Au.valency=1;a.Hg.valency=0;a.Tl.valency=0;a.Pb.valency=4;a.Bi.valency=3;a.Po.valency=2;a.At.valency=1;a.Rn.valency=0;a.Fr.valency=0;a.Ra.valency= +0;a.Ac.valency=0;a.Th.valency=0;a.Pa.valency=0;a.U.valency=0;a.Np.valency=0;a.Pu.valency=0;a.Am.valency=0;a.Cm.valency=0;a.Bk.valency=0;a.Cf.valency=0;a.Es.valency=0;a.Fm.valency=0;a.Md.valency=0;a.No.valency=0;a.Lr.valency=0;a.Rf.valency=0;a.Db.valency=0;a.Sg.valency=0;a.Bh.valency=0;a.Hs.valency=0;a.Mt.valency=0;a.Ds.valency=0;a.Rg.valency=0;a.Cn.valency=0;a.Uut.valency=0;a.Uuq.valency=0;a.Uup.valency=0;a.Uuh.valency=0;a.Uus.valency=0;a.Uuo.valency=0;a.H.mass=1;a.He.mass=4;a.Li.mass=7;a.Be.mass= +9;a.B.mass=11;a.C.mass=12;a.N.mass=14;a.O.mass=16;a.F.mass=19;a.Ne.mass=20;a.Na.mass=23;a.Mg.mass=24;a.Al.mass=27;a.Si.mass=28;a.P.mass=31;a.S.mass=32;a.Cl.mass=35;a.Ar.mass=40;a.K.mass=39;a.Ca.mass=40;a.Sc.mass=45;a.Ti.mass=48;a.V.mass=51;a.Cr.mass=52;a.Mn.mass=55;a.Fe.mass=56;a.Co.mass=59;a.Ni.mass=58;a.Cu.mass=63;a.Zn.mass=64;a.Ga.mass=69;a.Ge.mass=74;a.As.mass=75;a.Se.mass=80;a.Br.mass=79;a.Kr.mass=84;a.Rb.mass=85;a.Sr.mass=88;a.Y.mass=89;a.Zr.mass=90;a.Nb.mass=93;a.Mo.mass=98;a.Tc.mass=0;a.Ru.mass= +102;a.Rh.mass=103;a.Pd.mass=106;a.Ag.mass=107;a.Cd.mass=114;a.In.mass=115;a.Sn.mass=120;a.Sb.mass=121;a.Te.mass=130;a.I.mass=127;a.Xe.mass=132;a.Cs.mass=133;a.Ba.mass=138;a.La.mass=139;a.Ce.mass=140;a.Pr.mass=141;a.Nd.mass=142;a.Pm.mass=0;a.Sm.mass=152;a.Eu.mass=153;a.Gd.mass=158;a.Tb.mass=159;a.Dy.mass=164;a.Ho.mass=165;a.Er.mass=166;a.Tm.mass=169;a.Yb.mass=174;a.Lu.mass=175;a.Hf.mass=180;a.Ta.mass=181;a.W.mass=184;a.Re.mass=187;a.Os.mass=192;a.Ir.mass=193;a.Pt.mass=195;a.Au.mass=197;a.Hg.mass=202; +a.Tl.mass=205;a.Pb.mass=208;a.Bi.mass=209;a.Po.mass=0;a.At.mass=0;a.Rn.mass=0;a.Fr.mass=0;a.Ra.mass=0;a.Ac.mass=0;a.Th.mass=232;a.Pa.mass=231;a.U.mass=238;a.Np.mass=0;a.Pu.mass=0;a.Am.mass=0;a.Cm.mass=0;a.Bk.mass=0;a.Cf.mass=0;a.Es.mass=0;a.Fm.mass=0;a.Md.mass=0;a.No.mass=0;a.Lr.mass=0;a.Rf.mass=0;a.Db.mass=0;a.Sg.mass=0;a.Bh.mass=0;a.Hs.mass=0;a.Mt.mass=0;a.Ds.mass=0;a.Rg.mass=0;a.Cn.mass=0;a.Uut.mass=0;a.Uuq.mass=0;a.Uup.mass=0;a.Uuh.mass=0;a.Uus.mass=0;a.Uuo.mass=0;return a}(ChemDoodle.SYMBOLS); +ChemDoodle.RESIDUE=function(){function b(a,b){this.symbol=a;this.name=b;return!0}var e=[];e.Ala=new b("Ala","Alanine");e.Arg=new b("Arg","Arginine");e.Asn=new b("Asn","Asparagine");e.Asp=new b("Asp","Aspartic Acid");e.Cys=new b("Cys","Cysteine");e.Gln=new b("Gln","Glutamine");e.Glu=new b("Glu","Glutamic Acid");e.Gly=new b("Gly","Glycine");e.His=new b("His","Histidine");e.Ile=new b("Ile","Isoleucine");e.Leu=new b("Leu","Leucine");e.Lys=new b("Lys","Lysine");e.Met=new b("Met","Methionine");e.Phe=new b("Phe", +"Phenylalanine");e.Pro=new b("Pro","Proline");e.Ser=new b("Ser","Serine");e.Thr=new b("Thr","Threonine");e.Trp=new b("Trp","Tryptophan");e.Tyr=new b("Tyr","Tyrosine");e.Val=new b("Val","Valine");e.Asx=new b("Asx","Asparagine/Aspartic Acid");e.Glx=new b("Glx","Glutamine/Glutamic Acid");e["*"]=new b("*","Other");e.A=new b("A","Adenine");e.G=new b("G","Guanine");e.I=new b("I","");e.C=new b("C","Cytosine");e.T=new b("T","Thymine");e.U=new b("U","Uracil");e.Ala.polar=!1;e.Arg.polar=!0;e.Asn.polar=!0;e.Asp.polar= +!0;e.Cys.polar=!0;e.Gln.polar=!0;e.Glu.polar=!0;e.Gly.polar=!1;e.His.polar=!0;e.Ile.polar=!1;e.Leu.polar=!1;e.Lys.polar=!0;e.Met.polar=!1;e.Phe.polar=!1;e.Pro.polar=!1;e.Ser.polar=!0;e.Thr.polar=!0;e.Trp.polar=!0;e.Tyr.polar=!0;e.Val.polar=!1;e.Asx.polar=!0;e.Glx.polar=!0;e.Ala.aminoColor="#C8C8C8";e.Arg.aminoColor="#145AFF";e.Asn.aminoColor="#00DCDC";e.Asp.aminoColor="#E60A0A";e.Cys.aminoColor="#E6E600";e.Gln.aminoColor="#00DCDC";e.Glu.aminoColor="#E60A0A";e.Gly.aminoColor="#EBEBEB";e.His.aminoColor= +"#8282D2";e.Ile.aminoColor="#0F820F";e.Leu.aminoColor="#0F820F";e.Lys.aminoColor="#145AFF";e.Met.aminoColor="#E6E600";e.Phe.aminoColor="#3232AA";e.Pro.aminoColor="#DC9682";e.Ser.aminoColor="#FA9600";e.Thr.aminoColor="#FA9600";e.Trp.aminoColor="#B45AB4";e.Tyr.aminoColor="#3232AA";e.Val.aminoColor="#0F820F";e.Asx.aminoColor="#FF69B4";e.Glx.aminoColor="#FF69B4";e["*"].aminoColor="#BEA06E";e.A.aminoColor="#BEA06E";e.G.aminoColor="#BEA06E";e.I.aminoColor="#BEA06E";e.C.aminoColor="#BEA06E";e.T.aminoColor= +"#BEA06E";e.U.aminoColor="#BEA06E";e.Ala.shapelyColor="#8CFF8C";e.Arg.shapelyColor="#00007C";e.Asn.shapelyColor="#FF7C70";e.Asp.shapelyColor="#A00042";e.Cys.shapelyColor="#FFFF70";e.Gln.shapelyColor="#FF4C4C";e.Glu.shapelyColor="#660000";e.Gly.shapelyColor="#FFFFFF";e.His.shapelyColor="#7070FF";e.Ile.shapelyColor="#004C00";e.Leu.shapelyColor="#455E45";e.Lys.shapelyColor="#4747B8";e.Met.shapelyColor="#B8A042";e.Phe.shapelyColor="#534C52";e.Pro.shapelyColor="#525252";e.Ser.shapelyColor="#FF7042";e.Thr.shapelyColor= +"#B84C00";e.Trp.shapelyColor="#4F4600";e.Tyr.shapelyColor="#8C704C";e.Val.shapelyColor="#FF8CFF";e.Asx.shapelyColor="#FF00FF";e.Glx.shapelyColor="#FF00FF";e["*"].shapelyColor="#FF00FF";e.A.shapelyColor="#A0A0FF";e.G.shapelyColor="#FF7070";e.I.shapelyColor="#80FFFF";e.C.shapelyColor="#FF8C4B";e.T.shapelyColor="#A0FFA0";e.U.shapelyColor="#FF8080";return e}(); +(function(b){b.Queue=function(){var b=[],a=0;this.getSize=function(){return b.length-a};this.isEmpty=function(){return 0===b.length};this.enqueue=function(a){b.push(a)};this.dequeue=function(){var h;b.length&&(h=b[a],2*++a>=b.length&&(b=b.slice(a),a=0));return h};this.getOldestElement=function(){var h;b.length&&(h=b[a]);return h}}})(ChemDoodle.structures); +(function(b,e){b.Point=function(a,b){this.x=a?a:0;this.y=b?b:0;this.sub=function(a){this.x-=a.x;this.y-=a.y};this.add=function(a){this.x+=a.x;this.y+=a.y};this.distance=function(a){var d=a.x-this.x,a=a.y-this.y;return e.sqrt(d*d+a*a)};this.angleForStupidCanvasArcs=function(a){for(var d=a.x-this.x,a=a.y-this.y,f=0,f=0===d?0===a?0:0<a?e.PI/2:3*e.PI/2:0===a?0<d?0:e.PI:0>d?e.atan(a/d)+e.PI:0>a?e.atan(a/d)+2*e.PI:e.atan(a/d);0>f;)f+=2*e.PI;return f%=2*e.PI};this.angle=function(a){for(var d=a.x-this.x, +a=this.y-a.y,f=0,f=0===d?0===a?0:0<a?e.PI/2:3*e.PI/2:0===a?0<d?0:e.PI:0>d?e.atan(a/d)+e.PI:0>a?e.atan(a/d)+2*e.PI:e.atan(a/d);0>f;)f+=2*e.PI;return f%=2*e.PI};return!0}})(ChemDoodle.structures,Math); +(function(b,e,a,h,c,d){h.Atom=function(f,h,g,o){this.x=h?h:0;this.y=g?g:0;this.z=o?o:0;this.numRadical=this.numLonePair=this.charge=0;this.mass=-1;this.angleOfLeastInterference=this.bondNumber=this.coordinationNumber=0;this.isHidden=!1;this.label=f?f.replace(/\s/g,""):"C";b[this.label]||(this.label="C");this.altLabel=void 0;this.any=!1;this.rgroup=-1;this.isSelected=this.isHover=this.isLone=!1;this.add3D=function(a){this.x=this.x+a.x;this.y=this.y+a.y;this.z=this.z+a.z};this.sub3D=function(a){this.x= +this.x-a.x;this.y=this.y-a.y;this.z=this.z-a.z};this.distance3D=function(a){var d=a.x-this.x,f=a.y-this.y,a=a.z-this.z;return c.sqrt(d*d+f*f+a*a)};this.draw=function(a,d){if(this.isLassoed){var f=a.createRadialGradient(this.x-1,this.y-1,0,this.x,this.y,7);f.addColorStop(0,"rgba(212, 99, 0, 0)");f.addColorStop(0.7,"rgba(212, 99, 0, 0.8)");a.fillStyle=f;a.beginPath();a.arc(this.x,this.y,5,0,c.PI*2,false);a.fill()}this.textBounds=[];if(this.specs)d=this.specs;f=d.getFontString(d.atoms_font_size_2D,d.atoms_font_families_2D, +d.atoms_font_bold_2D,d.atoms_font_italic_2D);a.font=f;a.fillStyle=d.atoms_color;if(!this.any&&this.rgroup===-1)if(d.atoms_useJMOLColors)a.fillStyle=b[this.label].jmolColor;else if(d.atoms_usePYMOLColors)a.fillStyle=b[this.label].pymolColor;if(this.isLone&&!d.atoms_displayAllCarbonLabels_2D||d.atoms_circles_2D){a.beginPath();a.arc(this.x,this.y,d.atoms_circleDiameter_2D/2,0,c.PI*2,false);a.fill();if(d.atoms_circleBorderWidth_2D>0){a.lineWidth=d.atoms_circleBorderWidth_2D;a.strokeStyle="black";a.stroke(this.x, +this.y,0,c.PI*2,d.atoms_circleDiameter_2D/2)}}else if(this.isLabelVisible(d)){a.textAlign="center";a.textBaseline="middle";if(this.altLabel!==void 0){a.fillText(this.altLabel,this.x,this.y);var g=a.measureText(this.altLabel).width;this.textBounds.push({x:this.x-g/2,y:this.y-d.atoms_font_size_2D/2+1,w:g,h:d.atoms_font_size_2D-2})}else if(this.any){a.font=d.getFontString(d.atoms_font_size_2D+5,d.atoms_font_families_2D,true);a.fillText("*",this.x+1,this.y+3);g=a.measureText("*").width;this.textBounds.push({x:this.x- +g/2,y:this.y-d.atoms_font_size_2D/2+1,w:g,h:d.atoms_font_size_2D-2})}else if(this.rgroup!==-1){f="R"+this.rgroup;a.fillText(f,this.x,this.y);g=a.measureText(f).width;this.textBounds.push({x:this.x-g/2,y:this.y-d.atoms_font_size_2D/2+1,w:g,h:d.atoms_font_size_2D-2})}else{a.fillText(this.label,this.x,this.y);g=a.measureText(this.label).width;this.textBounds.push({x:this.x-g/2,y:this.y-d.atoms_font_size_2D/2+1,w:g,h:d.atoms_font_size_2D-2});if(this.mass!==-1){var h=d.getFontString(d.atoms_font_size_2D* +0.7,d.atoms_font_families_2D,d.atoms_font_bold_2D,d.atoms_font_italic_2D),q=a.font;a.font=h;h=a.measureText(this.mass).width;a.fillText(this.mass,this.x-h-0.5,this.y-d.atoms_font_size_2D*0.3);a.font=q}q=this.getImplicitHydrogenCount();if(d.atoms_implicitHydrogens_2D&&q>0){var o=a.measureText("H").width;if(q>1){var x=g/2+o/2,t=0,h=d.getFontString(d.atoms_font_size_2D*0.8,d.atoms_font_families_2D,d.atoms_font_bold_2D,d.atoms_font_italic_2D);a.font=h;var y=a.measureText(q).width;if(this.bondNumber=== +1)this.angleOfLeastInterference>c.PI/2&&this.angleOfLeastInterference<3*c.PI/2&&(x=-g/2-y-o/2);else if(!(this.angleOfLeastInterference<=c.PI/4))if(this.angleOfLeastInterference<3*c.PI/4){x=0;t=-d.atoms_font_size_2D*0.9}else if(this.angleOfLeastInterference<=5*c.PI/4)x=-g/2-y-o/2;else if(this.angleOfLeastInterference<7*c.PI/4){x=0;t=d.atoms_font_size_2D*0.9}a.font=f;a.fillText("H",this.x+x,this.y+t);a.font=h;a.fillText(q,this.x+x+o/2+y/2,this.y+t+d.atoms_font_size_2D*0.3);this.textBounds.push({x:this.x+ +x-o/2,y:this.y+t-d.atoms_font_size_2D/2+1,w:o,h:d.atoms_font_size_2D-2});this.textBounds.push({x:this.x+x+o/2,y:this.y+t+d.atoms_font_size_2D*0.3-d.atoms_font_size_2D/2+1,w:y,h:d.atoms_font_size_2D*0.8-2})}else{x=g/2+o/2;t=0;if(this.bondNumber===1)this.angleOfLeastInterference>c.PI/2&&this.angleOfLeastInterference<3*c.PI/2&&(x=-g/2-o/2);else if(!(this.angleOfLeastInterference<=c.PI/4))if(this.angleOfLeastInterference<3*c.PI/4){x=0;t=-d.atoms_font_size_2D*0.9}else if(this.angleOfLeastInterference<= +5*c.PI/4)x=-g/2-o/2;else if(this.angleOfLeastInterference<7*c.PI/4){x=0;t=d.atoms_font_size_2D*0.9}a.fillText("H",this.x+x,this.y+t);this.textBounds.push({x:this.x+x-o/2,y:this.y+t-d.atoms_font_size_2D/2+1,w:o,h:d.atoms_font_size_2D-2})}}}if(this.charge!==0){f=this.charge.toFixed(0);f=f==="1"?"+":f==="-1"?"\u2013":e.stringStartsWith(f,"-")?f.substring(1)+"\u2013":f+"+";g=this.angleOfLeastInterference;h=d.atoms_font_size_2D;this.isLabelVisible(d)&&q>0&&(g=g+c.PI/4);a.textAlign="center";a.textBaseline= +"middle";a.fillText(f,this.x+h*c.cos(g),this.y-h*c.sin(g))}if(this.numLonePair>0||this.numRadical>0){a.fillStyle="black";if(this.bondNumber===2&&c.abs(this.largestAngle-c.PI)<c.PI/60)if(this.numRadical===0){this.drawElectrons(a,d,c.floor(this.numLonePair/2),0,this.angleOfLeastInterference,this.largestAngle);this.drawElectrons(a,d,c.floor(this.numLonePair/2)+this.numLonePair%2,0,this.angleOfLeastInterference+c.PI,this.largestAngle)}else if(this.numLonePair===0){this.drawElectrons(a,d,0,c.floor(this.numRadical/ +2),this.angleOfLeastInterference,this.largestAngle);this.drawElectrons(a,d,0,c.floor(this.numRadical/2)+this.numRadical%2,this.angleOfLeastInterference+c.PI,this.largestAngle)}else{this.drawElectrons(a,d,this.numLonePair,0,this.angleOfLeastInterference,this.largestAngle);this.drawElectrons(a,d,0,this.numRadical,this.angleOfLeastInterference+c.PI,this.largestAngle)}else this.drawElectrons(a,d,this.numLonePair,this.numRadical,this.angleOfLeastInterference,this.largestAngle)}}};this.drawElectrons=function(a, +d,f,g,b,e){for(var h=e/(f+g+(this.bondNumber===0?0:1)),e=b-e/2+h,q=0;q<f;q++){var b=e+q*h,o=this.x+Math.cos(b)*d.atoms_lonePairDistance_2D,y=this.y-Math.sin(b)*d.atoms_lonePairDistance_2D,w=b+Math.PI/2,b=Math.cos(w)*d.atoms_lonePairSpread_2D/2,w=-Math.sin(w)*d.atoms_lonePairSpread_2D/2;a.beginPath();a.arc(o+b,y+w,d.atoms_lonePairDiameter_2D,0,c.PI*2,false);a.fill();a.beginPath();a.arc(o-b,y-w,d.atoms_lonePairDiameter_2D,0,c.PI*2,false);a.fill()}for(q=0;q<g;q++){b=e+(q+f)*h;o=this.x+Math.cos(b)*d.atoms_lonePairDistance_2D; +y=this.y-Math.sin(b)*d.atoms_lonePairDistance_2D;a.beginPath();a.arc(o,y,d.atoms_lonePairDiameter_2D,0,c.PI*2,false);a.fill()}};this.drawDecorations=function(a){if(this.isHover||this.isSelected){a.strokeStyle=this.isHover?"#885110":"#0060B2";a.lineWidth=1.2;a.beginPath();a.arc(this.x,this.y,this.isHover?7:15,0,c.PI*2,false);a.stroke()}if(this.isOverlap){a.strokeStyle="#C10000";a.lineWidth=1.2;a.beginPath();a.arc(this.x,this.y,7,0,c.PI*2,false);a.stroke()}};this.render=function(a,f){if(this.specs)f= +this.specs;var c=d.translate(a.modelViewMatrix,[this.x,this.y,this.z],[]),g=f.atoms_useVDWDiameters_3D?b[this.label].vdWRadius*f.atoms_vdwMultiplier_3D:f.atoms_sphereDiameter_3D/2;g===0&&(g=1);d.scale(c,[g,g,g]);g=f.atoms_color;if(f.atoms_useJMOLColors)g=b[this.label].jmolColor;else if(f.atoms_usePYMOLColors)g=b[this.label].pymolColor;a.material.setDiffuseColor(g);a.setMatrixUniforms(c);a.drawElements(a.TRIANGLES,(this.renderAsStar?a.starBuffer:a.sphereBuffer).vertexIndexBuffer.numItems,a.UNSIGNED_SHORT, +0)};this.isLabelVisible=function(a){return a.atoms_displayAllCarbonLabels_2D||this.label!=="C"||this.altLabel||this.any||this.rgroup!==-1||this.mass!==-1||this.charge!==0||this.numLonePair!==0||this.isHidden&&a.atoms_showHiddenCarbons_2D||a.atoms_displayTerminalCarbonLabels_2D&&this.bondNumber===1};this.getImplicitHydrogenCount=function(){if(this.label==="H"||!b[this.label])return 0;var a=b[this.label].valency,d=a-this.coordinationNumber;if(this.charge>0){a=4-a;d=this.charge<=a?d+this.charge:4-this.coordinationNumber- +this.charge+a}else d=d+this.charge;return d<0?0:d};this.getBounds=function(){var d=new a.Bounds;d.expand(this.x,this.y);if(this.textBounds)for(var f=0,g=this.textBounds.length;f<g;f++){var c=this.textBounds[f];d.expand(c.x,c.y,c.x+c.w,c.y+c.h)}return d};return!0};h.Atom.prototype=new h.Point(0,0)})(ChemDoodle.ELEMENT,ChemDoodle.extensions,ChemDoodle.math,ChemDoodle.structures,Math,mat4); +(function(b,e,a,h,c,d,f){a.Bond=function(q,g,o){this.a1=q;this.a2=g;this.bondOrder=o?o:1;this.stereo=a.Bond.STEREO_NONE;this.isHover=!1;this.ring=void 0;this.getCenter=function(){return new a.Point((this.a1.x+this.a2.x)/2,(this.a1.y+this.a2.y)/2)};this.getLength=function(){return this.a1.distance(this.a2)};this.getLength3D=function(){return this.a1.distance3D(this.a2)};this.contains=function(a){return a===this.a1||a===this.a2};this.getNeighbor=function(a){if(a===this.a1)return this.a2;if(a===this.a2)return this.a1}; +this.draw=function(d,f){if(!(this.a1.x===this.a2.x&&this.a1.y===this.a2.y)){this.specs&&(f=this.specs);var g=this.a1.x,q=this.a2.x,o=this.a1.y,k=this.a2.y,v=this.a1.distance(this.a2),x=q-g,t=k-o;if(this.a1.isLassoed&&this.a2.isLassoed){var y=d.createLinearGradient(g,o,q,k);y.addColorStop(0,"rgba(212, 99, 0, 0)");y.addColorStop(0.5,"rgba(212, 99, 0, 0.8)");y.addColorStop(1,"rgba(212, 99, 0, 0)");var w=2.5,u=this.a1.angle(this.a2)+c.PI/2,p=c.cos(u),u=c.sin(u),A=g-p*w,B=o+u*w,D=g+p*w,G=o-u*w,F=q+p*w, +C=k-u*w,p=q-p*w,u=k+u*w;d.fillStyle=y;d.beginPath();d.moveTo(A,B);d.lineTo(D,G);d.lineTo(F,C);d.lineTo(p,u);d.closePath();d.fill()}if(f.atoms_display&&!f.atoms_circles_2D&&this.a1.isLabelVisible(f)){w=p=0;for(A=this.a1.textBounds.length;w<A;w++)p=Math.max(p,h.calculateDistanceInterior(this.a1,this.a2,this.a1.textBounds[w]));p+=f.bonds_atomLabelBuffer_2D;p/=v;g+=x*p;o+=t*p}if(f.atoms_display&&!f.atoms_circles_2D&&this.a2.isLabelVisible(f)){w=p=0;for(A=this.a2.textBounds.length;w<A;w++)p=Math.max(p, +h.calculateDistanceInterior(this.a2,this.a1,this.a2.textBounds[w]));p+=f.bonds_atomLabelBuffer_2D;p/=v;q-=x*p;k-=t*p}f.bonds_clearOverlaps_2D&&(p=g+0.15*x,u=o+0.15*t,w=q-0.15*x,v=k-0.15*t,d.strokeStyle=f.backgroundColor,d.lineWidth=f.bonds_width_2D+2*f.bonds_overlapClearWidth_2D,d.lineCap="round",d.beginPath(),d.moveTo(p,u),d.lineTo(w,v),d.closePath(),d.stroke());d.strokeStyle=f.bonds_color;d.fillStyle=f.bonds_color;d.lineWidth=f.bonds_width_2D;d.lineCap=f.bonds_ends_2D;if(f.bonds_useJMOLColors|| +f.bonds_usePYMOLColors)p=d.createLinearGradient(g,o,q,k),u=b[this.a1.label].jmolColor,w=b[this.a2.label].jmolColor,f.atoms_usePYMOLColors&&(u=b[this.a1.label].pymolColor,w=b[this.a2.label].pymolColor),p.addColorStop(0,u),f.bonds_colorGradient||(p.addColorStop(0.5,u),p.addColorStop(0.51,w)),p.addColorStop(1,w),d.strokeStyle=p,d.fillStyle=p;switch(this.bondOrder){case 0.5:d.beginPath();d.moveTo(g,o);e.contextHashTo(d,g,o,q,k,f.bonds_hashSpacing_2D,f.bonds_hashSpacing_2D);d.stroke();break;case 1:if(this.stereo=== +a.Bond.STEREO_PROTRUDING||this.stereo===a.Bond.STEREO_RECESSED)t=f.bonds_width_2D/2,w=this.a1.distance(this.a2)*f.bonds_wedgeThickness_2D/2,u=this.a1.angle(this.a2)+c.PI/2,p=c.cos(u),u=c.sin(u),A=g-p*t,B=o+u*t,D=g+p*t,G=o-u*t,F=q+p*w,C=k-u*w,p=q-p*w,u=k+u*w,d.beginPath(),d.moveTo(A,B),d.lineTo(D,G),d.lineTo(F,C),d.lineTo(p,u),d.closePath(),this.stereo===a.Bond.STEREO_PROTRUDING?d.fill():(d.save(),d.clip(),d.lineWidth=2*w,d.lineCap="butt",d.beginPath(),d.moveTo(g,o),e.contextHashTo(d,g,o,q,k,f.bonds_hashWidth_2D, +f.bonds_hashSpacing_2D),d.stroke(),d.restore());else if(this.stereo===a.Bond.STEREO_AMBIGUOUS){d.beginPath();d.moveTo(g,o);q=c.floor(c.sqrt(x*x+t*t)/f.bonds_wavyLength_2D);k=g;u=this.a1.angle(this.a2)+c.PI/2;p=c.cos(u);u=c.sin(u);g=x/q;t/=q;w=0;for(A=q;w<A;w++)k+=g,o+=t,q=f.bonds_wavyLength_2D*p+k-0.5*g,v=f.bonds_wavyLength_2D*-u+o-0.5*t,x=f.bonds_wavyLength_2D*-p+k-0.5*g,B=f.bonds_wavyLength_2D*u+o-0.5*t,0===w%2?d.quadraticCurveTo(q,v,k,o):d.quadraticCurveTo(x,B,k,o);d.stroke();break}else d.beginPath(), +d.moveTo(g,o),d.lineTo(q,k),d.stroke();break;case 1.5:d.beginPath();d.moveTo(g,o);d.lineTo(q,k);d.stroke();break;case 2:this.stereo===a.Bond.STEREO_AMBIGUOUS?(w=this.a1.distance(this.a2)*f.bonds_saturationWidth_2D/2,u=this.a1.angle(this.a2)+c.PI/2,p=c.cos(u),u=c.sin(u),A=g-p*w,B=o+u*w,D=g+p*w,G=o-u*w,F=q+p*w,C=k-u*w,p=q-p*w,u=k+u*w,d.beginPath(),d.moveTo(A,B),d.lineTo(F,C),d.moveTo(D,G),d.lineTo(p,u),d.stroke()):!f.bonds_symmetrical_2D&&(this.ring||"C"===this.a1.label&&"C"===this.a2.label)?(d.beginPath(), +d.moveTo(g,o),d.lineTo(q,k),x=0,v=this.a1.distance(this.a2),p=this.a1.angle(this.a2),u=p+c.PI/2,w=v*f.bonds_saturationWidth_2D,t=f.bonds_saturationAngle_2D,t<c.PI/2&&(x=-(w/c.tan(t))),c.abs(x)<v/2&&(t=g-c.cos(p)*x,g=q+c.cos(p)*x,q=o+c.sin(p)*x,o=k-c.sin(p)*x,p=c.cos(u),u=c.sin(u),A=t-p*w,B=q+u*w,D=t+p*w,G=q-u*w,F=g-p*w,C=o+u*w,p=g+p*w,u=o-u*w,!this.ring||this.ring.center.angle(this.a1)>this.ring.center.angle(this.a2)&&!(this.ring.center.angle(this.a1)-this.ring.center.angle(this.a2)>c.PI)||this.ring.center.angle(this.a1)- +this.ring.center.angle(this.a2)<-c.PI?(d.moveTo(A,B),d.lineTo(F,C)):(d.moveTo(D,G),d.lineTo(p,u)),d.stroke())):(w=this.a1.distance(this.a2)*f.bonds_saturationWidth_2D/2,u=this.a1.angle(this.a2)+c.PI/2,p=c.cos(u),u=c.sin(u),A=g-p*w,B=o+u*w,D=g+p*w,G=o-u*w,F=q+p*w,C=k-u*w,p=q-p*w,u=k+u*w,d.beginPath(),d.moveTo(A,B),d.lineTo(p,u),d.moveTo(D,G),d.lineTo(F,C),d.stroke());break;case 3:w=this.a1.distance(this.a2)*f.bonds_saturationWidth_2D,u=this.a1.angle(this.a2)+c.PI/2,p=c.cos(u),u=c.sin(u),A=g-p*w,B= +o+u*w,D=g+p*w,G=o-u*w,F=q+p*w,C=k-u*w,p=q-p*w,u=k+u*w,d.beginPath(),d.moveTo(A,B),d.lineTo(p,u),d.moveTo(D,G),d.lineTo(F,C),d.moveTo(g,o),d.lineTo(q,k),d.stroke()}}};this.drawDecorations=function(a){if(this.isHover||this.isSelected){var d=2*c.PI,f=(this.a1.angleForStupidCanvasArcs(this.a2)+c.PI/2)%d;a.strokeStyle=this.isHover?"#885110":"#0060B2";a.lineWidth=1.2;a.beginPath();var g=(f+c.PI)%d,g=g%(2*c.PI);a.arc(this.a1.x,this.a1.y,7,f,g,!1);a.stroke();a.beginPath();f+=c.PI;g=(f+c.PI)%d;a.arc(this.a2.x, +this.a2.y,7,f,g,!1);a.stroke()}};this.render=function(a,g){this.specs&&(g=this.specs);var q=(g.bonds_renderAsLines_3D?1.1:1.001)*this.a1.distance3D(this.a2)/(g.bonds_useJMOLColors||g.bonds_usePYMOLColors?2:1);if(0===q)return!1;var q=[g.bonds_cylinderDiameter_3D/2,q,g.bonds_cylinderDiameter_3D/2],h=d.translate(a.modelViewMatrix,[this.a1.x,this.a1.y,this.a1.z],[]),o,k=[this.a2.x-this.a1.x,this.a2.y-this.a1.y,this.a2.z-this.a1.z];if(g.bonds_useJMOLColors||g.bonds_usePYMOLColors)f.scale(k,0.5),o=d.translate(a.modelViewMatrix, +[this.a2.x,this.a2.y,this.a2.z],[]);var v=[0],x;if(g.bonds_showBondOrders_3D){switch(this.bondOrder){case 2:v=[-g.bonds_cylinderDiameter_3D,g.bonds_cylinderDiameter_3D];break;case 3:v=[-1.2*g.bonds_cylinderDiameter_3D,0,1.2*g.bonds_cylinderDiameter_3D]}if(1<v.length){x=[0,0,1];var t=d.inverse(a.rotationMatrix,[]);d.multiplyVec3(t,x);x=f.cross(k,x,[]);f.normalize(x)}}var y=[0,1,0],t=0;this.a1.x===this.a2.x&&this.a1.z===this.a2.z?(k=[0,0,1],this.a2.y<this.a1.y&&(t=c.PI)):(t=e.vec3AngleFrom(y,k),k=f.cross(y, +k,[]));for(var y=0,w=v.length;y<w;y++){var u=d.set(h,[]);0!==v[y]&&d.translate(u,f.scale(x,v[y],[]));0!==t&&d.rotate(u,t,k);d.scale(u,q);var p=g.bonds_color;g.bonds_useJMOLColors?p=b[this.a1.label].jmolColor:g.bonds_usePYMOLColors&&(p=b[this.a1.label].pymolColor);a.material.setDiffuseColor(p);a.setMatrixUniforms(u);g.bonds_renderAsLines_3D?a.drawArrays(a.LINES,0,a.lineBuffer.vertexPositionBuffer.numItems):a.drawArrays(a.TRIANGLE_STRIP,0,a.cylinderBuffer.vertexPositionBuffer.numItems);if(g.bonds_useJMOLColors|| +g.bonds_usePYMOLColors)d.set(o,u),0!==v[y]&&d.translate(u,f.scale(x,v[y],[])),d.rotate(u,t+c.PI,k),d.scale(u,q),a.material.setDiffuseColor(g.bonds_usePYMOLColors?b[this.a2.label].pymolColor:b[this.a2.label].jmolColor),a.setMatrixUniforms(u),g.bonds_renderAsLines_3D?a.drawArrays(a.LINES,0,a.lineBuffer.vertexPositionBuffer.numItems):a.drawArrays(a.TRIANGLE_STRIP,0,a.cylinderBuffer.vertexPositionBuffer.numItems)}};return!0};a.Bond.STEREO_NONE="none";a.Bond.STEREO_PROTRUDING="protruding";a.Bond.STEREO_RECESSED= +"recessed";a.Bond.STEREO_AMBIGUOUS="ambiguous"})(ChemDoodle.ELEMENT,ChemDoodle.extensions,ChemDoodle.structures,ChemDoodle.math,Math,mat4,vec3); +(function(b,e){b.Ring=function(){this.atoms=[];this.bonds=[];this.center=void 0;this.setupBonds=function(){for(var a=0,b=this.bonds.length;a<b;a++)this.bonds[a].ring=this;this.center=this.getCenter()};this.getCenter=function(){for(var a=Infinity,h=Infinity,c=-Infinity,d=-Infinity,f=0,q=this.atoms.length;f<q;f++)a=e.min(this.atoms[f].x,a),h=e.min(this.atoms[f].y,h),c=e.max(this.atoms[f].x,c),d=e.max(this.atoms[f].y,d);return new b.Point((c+a)/2,(d+h)/2)};return!0}})(ChemDoodle.structures,Math); +(function(b,e,a,h,c){a.Molecule=function(){this.atoms=[];this.bonds=[];this.rings=[];this.findRings=!0;this.draw=function(a,f){this.specs&&(f=this.specs);if(f.atoms_display&&!f.atoms_circles_2D)for(var c=0,g=this.atoms.length;c<g;c++)this.atoms[c].draw(a,f);if(f.bonds_display){c=0;for(g=this.bonds.length;c<g;c++)this.bonds[c].draw(a,f)}if(f.atoms_display&&f.atoms_circles_2D){c=0;for(g=this.atoms.length;c<g;c++)this.atoms[c].draw(a,f)}};this.render=function(d,f){this.specs&&(f=this.specs);var c=0< +this.atoms.length&&void 0!==this.atoms[0].hetatm;if(c){if(f.macro_displayBonds){0<this.bonds.length&&(f.bonds_renderAsLines_3D&&!this.residueSpecs||this.residueSpecs&&this.residueSpecs.bonds_renderAsLines_3D?(d.lineWidth(this.residueSpecs?this.residueSpecs.bonds_width_2D:f.bonds_width_2D),d.lineBuffer.bindBuffers(d)):d.cylinderBuffer.bindBuffers(d),d.material.setTempColors(f.bonds_materialAmbientColor_3D,void 0,f.bonds_materialSpecularColor_3D,f.bonds_materialShininess_3D));for(var g=0,b=this.bonds.length;g< +b;g++){var e=this.bonds[g];if(!e.a1.hetatm&&(-1===f.macro_atomToLigandDistance||void 0!==e.a1.closestDistance&&f.macro_atomToLigandDistance>=e.a1.closestDistance&&f.macro_atomToLigandDistance>=e.a2.closestDistance))e.render(d,this.residueSpecs?this.residueSpecs:f)}}if(f.macro_displayAtoms){0<this.atoms.length&&(d.sphereBuffer.bindBuffers(d),d.material.setTempColors(f.atoms_materialAmbientColor_3D,void 0,f.atoms_materialSpecularColor_3D,f.atoms_materialShininess_3D));g=0;for(b=this.atoms.length;g< +b;g++){var j=this.atoms[g];if(!j.hetatm&&(-1===f.macro_atomToLigandDistance||void 0!==j.closestDistance&&f.macro_atomToLigandDistance>=j.closestDistance))j.render(d,this.residueSpecs?this.residueSpecs:f)}}}if(f.bonds_display){0<this.bonds.length&&(f.bonds_renderAsLines_3D?(d.lineWidth(f.bonds_width_2D),d.lineBuffer.bindBuffers(d)):d.cylinderBuffer.bindBuffers(d),d.material.setTempColors(f.bonds_materialAmbientColor_3D,void 0,f.bonds_materialSpecularColor_3D,f.bonds_materialShininess_3D));g=0;for(b= +this.bonds.length;g<b;g++)e=this.bonds[g],(!c||e.a1.hetatm)&&e.render(d,f)}if(f.atoms_display){g=0;for(b=this.atoms.length;g<b;g++)j=this.atoms[g],j.bondNumber=0,j.renderAsStar=!1;g=0;for(b=this.bonds.length;g<b;g++)e=this.bonds[g],e.a1.bondNumber++,e.a2.bondNumber++;0<this.atoms.length&&(d.sphereBuffer.bindBuffers(d),d.material.setTempColors(f.atoms_materialAmbientColor_3D,void 0,f.atoms_materialSpecularColor_3D,f.atoms_materialShininess_3D));e=[];g=0;for(b=this.atoms.length;g<b;g++)if(j=this.atoms[g], +!c||j.hetatm&&(f.macro_showWater||!j.isWater))f.atoms_nonBondedAsStars_3D&&0===j.bondNumber?(j.renderAsStar=!0,e.push(j)):j.render(d,f);if(0<e.length){d.starBuffer.bindBuffers(d);g=0;for(b=e.length;g<b;g++)e[g].render(d,f)}}if(this.chains){d.setMatrixUniforms(d.modelViewMatrix);if(f.proteins_displayRibbon){d.material.setTempColors(f.proteins_materialAmbientColor_3D,void 0,f.proteins_materialSpecularColor_3D,f.proteins_materialShininess_3D);c=0;for(j=this.ribbons.length;c<j;c++)if(f.proteins_useShapelyColors|| +f.proteins_useAminoColors||f.proteins_usePolarityColors){e=f.proteins_ribbonCartoonize?this.cartoons[c]:this.ribbons[c];e.front.bindBuffers(d);g=0;for(b=e.front.segments.length;g<b;g++)e.front.segments[g].render(d,f);e.back.bindBuffers(d);g=0;for(b=e.back.segments.length;g<b;g++)e.back.segments[g].render(d,f)}else if(f.proteins_ribbonCartoonize){e=this.cartoons[c];e.front.bindBuffers(d);g=0;for(b=e.front.cartoonSegments.length;g<b;g++)e.front.cartoonSegments[g].render(d,f);e.back.bindBuffers(d);g= +0;for(b=e.back.cartoonSegments.length;g<b;g++)e.back.cartoonSegments[g].render(d,f)}else e=this.ribbons[c],e.front.render(d,f),e.back.render(d,f)}if(f.proteins_displayBackbone){if(!this.alphaCarbonTrace){this.alphaCarbonTrace={nodes:[],edges:[]};c=0;for(j=this.chains.length;c<j;c++){var l=this.chains[c];if(!(2<l.length&&h[l[2].name]&&"#BEA06E"===h[l[2].name].aminoColor)&&0<l.length){g=1;for(b=l.length-2;g<b;g++)e=l[g].cp1,e.chainColor=l.chainColor,this.alphaCarbonTrace.nodes.push(e),e=new a.Bond(l[g].cp1, +l[g+1].cp1),e.residueName=l[g].name,e.chainColor=l.chainColor,this.alphaCarbonTrace.edges.push(e),g===l.length-3&&(e=l[g+1].cp1,e.chainColor=l.chainColor,this.alphaCarbonTrace.nodes.push(e))}}}if(0<this.alphaCarbonTrace.nodes.length){c=new a.VisualSpecifications;c.atoms_display=!0;c.bonds_display=!0;c.atoms_sphereDiameter_3D=f.proteins_backboneThickness;c.bonds_cylinderDiameter_3D=f.proteins_backboneThickness;c.bonds_useJMOLColors=!1;c.atoms_color=f.proteins_backboneColor;c.bonds_color=f.proteins_backboneColor; +c.atoms_useVDWDiameters_3D=!1;d.material.setTempColors(f.proteins_materialAmbientColor_3D,void 0,f.proteins_materialSpecularColor_3D,f.proteins_materialShininess_3D);d.material.setDiffuseColor(f.proteins_backboneColor);g=0;for(b=this.alphaCarbonTrace.nodes.length;g<b;g++)e=this.alphaCarbonTrace.nodes[g],f.macro_colorByChain&&(c.atoms_color=e.chainColor),d.sphereBuffer.bindBuffers(d),e.render(d,c);g=0;for(b=this.alphaCarbonTrace.edges.length;g<b;g++){var j=this.alphaCarbonTrace.edges[g],n,e=h[j.residueName]? +h[j.residueName]:h["*"];f.macro_colorByChain?n=j.chainColor:f.proteins_useShapelyColors?n=e.shapelyColor:f.proteins_useAminoColors?n=e.aminoColor:f.proteins_usePolarityColors&&(n=e.polar?"#C10000":"#FFFFFF");n&&(c.bonds_color=n);d.cylinderBuffer.bindBuffers(d);j.render(d,c)}}}if(f.nucleics_display){d.material.setTempColors(f.nucleics_materialAmbientColor_3D,void 0,f.nucleics_materialSpecularColor_3D,f.nucleics_materialShininess_3D);c=0;for(j=this.tubes.length;c<j;c++)d.setMatrixUniforms(d.modelViewMatrix), +e=this.tubes[c],e.render(d,f)}}f.crystals_displayUnitCell&&this.unitCell&&(d.setMatrixUniforms(d.modelViewMatrix),this.unitCell.bindBuffers(d),d.material.setDiffuseColor(f.crystals_unitCellColor),d.lineWidth(f.crystals_unitCellLineWidth),d.drawElements(d.LINES,this.unitCell.vertexIndexBuffer.numItems,d.UNSIGNED_SHORT,0));this.surface&&f.surfaces_display&&(d.setMatrixUniforms(d.modelViewMatrix),this.surface.bindBuffers(d),d.material.setTempColors(f.surfaces_materialAmbientColor_3D,f.surfaces_color, +f.surfaces_materialSpecularColor_3D,f.surfaces_materialShininess_3D),"Dot"===f.surfaces_style?d.drawArrays(d.POINTS,0,this.surface.vertexPositionBuffer.numItems):d.drawElements(d.TRIANGLES,this.surface.vertexIndexBuffer.numItems,d.UNSIGNED_SHORT,0))};this.getCenter3D=function(){if(1===this.atoms.length)return new a.Atom("C",this.atoms[0].x,this.atoms[0].y,this.atoms[0].z);var d=Infinity,f=Infinity,b=Infinity,g=-Infinity,e=-Infinity,h=-Infinity;if(this.chains)for(var j=0,l=this.chains.length;j<l;j++)for(var n= +this.chains[j],r=0,k=n.length;r<k;r++)var v=n[r],d=c.min(v.cp1.x,d),f=c.min(v.cp1.y,f),b=c.min(v.cp1.z,b),g=c.max(v.cp1.x,g),e=c.max(v.cp1.y,e),h=c.max(v.cp1.z,h),d=c.min(v.cp2.x,d),f=c.min(v.cp2.y,f),b=c.min(v.cp2.z,b),g=c.max(v.cp2.x,g),e=c.max(v.cp2.y,e),h=c.max(v.cp2.z,h);j=0;for(l=this.atoms.length;j<l;j++)d=c.min(this.atoms[j].x,d),f=c.min(this.atoms[j].y,f),b=c.min(this.atoms[j].z,b),g=c.max(this.atoms[j].x,g),e=c.max(this.atoms[j].y,e),h=c.max(this.atoms[j].z,h);return new a.Atom("C",(g+d)/ +2,(e+f)/2,(h+b)/2)};this.getCenter=function(){if(1===this.atoms.length)return new a.Point(this.atoms[0].x,this.atoms[0].y);for(var d=Infinity,f=Infinity,b=-Infinity,g=-Infinity,e=0,h=this.atoms.length;e<h;e++)d=c.min(this.atoms[e].x,d),f=c.min(this.atoms[e].y,f),b=c.max(this.atoms[e].x,b),g=c.max(this.atoms[e].y,g);return new a.Point((b+d)/2,(g+f)/2)};this.getDimension=function(){if(1===this.atoms.length)return new a.Point(0,0);var d=Infinity,f=Infinity,b=-Infinity,g=-Infinity;if(this.chains){for(var e= +0,h=this.chains.length;e<h;e++)for(var j=this.chains[e],l=0,n=j.length;l<n;l++)var r=j[l],d=c.min(r.cp1.x,d),f=c.min(r.cp1.y,f),b=c.max(r.cp1.x,b),g=c.max(r.cp1.y,g),d=c.min(r.cp2.x,d),f=c.min(r.cp2.y,f),b=c.max(r.cp2.x,b),g=c.max(r.cp2.y,g);d-=30;f-=30;b+=30;g+=30}e=0;for(h=this.atoms.length;e<h;e++)d=c.min(this.atoms[e].x,d),f=c.min(this.atoms[e].y,f),b=c.max(this.atoms[e].x,b),g=c.max(this.atoms[e].y,g);return new a.Point(b-d,g-f)};this.check=function(a){if(a&&this.doChecks){if(this.findRings)if(this.bonds.length- +this.atoms.length!==this.fjNumCache){this.rings=(new b.informatics.SSSRFinder(this)).rings;for(var f=0,c=this.bonds.length;f<c;f++)this.bonds[f].ring=void 0;f=0;for(c=this.rings.length;f<c;f++)this.rings[f].setupBonds()}else{f=0;for(c=this.rings.length;f<c;f++){var g=this.rings[f];g.center=g.getCenter()}}if(this.atoms.length!==this.atomNumCache&&this.bonds.length!==this.bondNumCache){f=0;for(c=this.atoms.length;f<c;f++)if(this.atoms[f].isLone=!1,"C"===this.atoms[f].label){for(var e=g=0,h=this.bonds.length;e< +h;e++)(this.bonds[e].a1===this.atoms[f]||this.bonds[e].a2===this.atoms[f])&&g++;0===g&&(this.atoms[f].isLone=!0)}}g=!1;f=0;for(c=this.atoms.length;f<c;f++)0!==this.atoms[f].z&&(g=!0);g&&(this.sortAtomsByZ(),this.sortBondsByZ());this.setupMetaData();this.atomNumCache=this.atoms.length;this.bondNumCache=this.bonds.length;this.fjNumCache=this.bonds.length-this.atoms.length}this.doChecks=!a};this.getAngles=function(a){for(var f=[],c=0,g=this.bonds.length;c<g;c++)this.bonds[c].contains(a)&&f.push(a.angle(this.bonds[c].getNeighbor(a))); +f.sort();return f};this.getCoordinationNumber=function(a){for(var f=0,c=0,g=a.length;c<g;c++)f+=a[c].bondOrder;return f};this.getBonds=function(a){for(var f=[],c=0,g=this.bonds.length;c<g;c++)this.bonds[c].contains(a)&&f.push(this.bonds[c]);return f};this.sortAtomsByZ=function(){for(var a=1,f=this.atoms.length;a<f;a++)for(var c=a;0<c&&this.atoms[c].z<this.atoms[c-1].z;){var g=this.atoms[c];this.atoms[c]=this.atoms[c-1];this.atoms[c-1]=g;c--}};this.sortBondsByZ=function(){for(var a=1,c=this.bonds.length;a< +c;a++)for(var b=a;0<b&&this.bonds[b].a1.z+this.bonds[b].a2.z<this.bonds[b-1].a1.z+this.bonds[b-1].a2.z;){var g=this.bonds[b];this.bonds[b]=this.bonds[b-1];this.bonds[b-1]=g;b--}};this.setupMetaData=function(){for(var a=this.getCenter(),f=0,e=this.atoms.length;f<e;f++){var g=this.atoms[f],h=this.getBonds(g),m=this.getAngles(g);g.isHidden=2===h.length&&c.abs(c.abs(m[1]-m[0])-c.PI)<c.PI/30&&h[0].bondOrder===h[1].bondOrder;m=b.math.angleBetweenLargest(m);g.angleOfLeastInterference=m.angle%(2*c.PI);g.largestAngle= +m.largest;g.coordinationNumber=this.getCoordinationNumber(h);g.bondNumber=h.length;g.molCenter=a}f=0;for(e=this.bonds.length;f<e;f++)this.bonds[f].molCenter=a};this.scaleToAverageBondLength=function(a){var c=this.getAverageBondLength();if(0!==c)for(var a=a/c,c=0,b=this.atoms.length;c<b;c++)this.atoms[c].x*=a,this.atoms[c].y*=a};this.getAverageBondLength=function(){if(0===this.bonds.length)return 0;for(var a=0,c=0,b=this.bonds.length;c<b;c++)a+=this.bonds[c].getLength();return a/=this.bonds.length}; +this.getBounds=function(){for(var a=new e.Bounds,c=0,b=this.atoms.length;c<b;c++)a.expand(this.atoms[c].getBounds());if(this.chains){c=0;for(b=this.chains.length;c<b;c++)for(var g=this.chains[c],h=0,m=g.length;h<m;h++){var j=g[h];a.expand(j.cp1.x,j.cp1.y);a.expand(j.cp2.x,j.cp2.y)}a.minX-=30;a.minY-=30;a.maxX+=30;a.maxY+=30}return a};return!0}})(ChemDoodle,ChemDoodle.math,ChemDoodle.structures,ChemDoodle.RESIDUE,Math); +(function(b,e,a,h){var c,d=-1;b.Residue=function(f){this.resSeq=f;this.setup=function(a,d){this.horizontalResolution=d;var c=[a.x-this.cp1.x,a.y-this.cp1.y,a.z-this.cp1.z],f=h.cross(c,[this.cp2.x-this.cp1.x,this.cp2.y-this.cp1.y,this.cp2.z-this.cp1.z],[]);this.D=h.cross(f,c,[]);h.normalize(f);h.normalize(this.D);this.guidePointsSmall=[];this.guidePointsLarge=[];c=[(a.x+this.cp1.x)/2,(a.y+this.cp1.y)/2,(a.z+this.cp1.z)/2];this.helix&&(h.scale(f,1.5),h.add(c,f));this.guidePointsSmall[0]=new b.Atom("", +c[0]-this.D[0]/2,c[1]-this.D[1]/2,c[2]-this.D[2]/2);for(f=1;f<d;f++)this.guidePointsSmall[f]=new b.Atom("",this.guidePointsSmall[0].x+this.D[0]*f/d,this.guidePointsSmall[0].y+this.D[1]*f/d,this.guidePointsSmall[0].z+this.D[2]*f/d);h.scale(this.D,4);this.guidePointsLarge[0]=new b.Atom("",c[0]-this.D[0]/2,c[1]-this.D[1]/2,c[2]-this.D[2]/2);for(f=1;f<d;f++)this.guidePointsLarge[f]=new b.Atom("",this.guidePointsLarge[0].x+this.D[0]*f/d,this.guidePointsLarge[0].y+this.D[1]*f/d,this.guidePointsLarge[0].z+ +this.D[2]*f/d)};this.getGuidePointSet=function(a){if(0===a)return this.helix||this.sheet?this.guidePointsLarge:this.guidePointsSmall;if(1===a)return this.guidePointsSmall;if(2===a)return this.guidePointsLarge};this.computeLineSegments=function(f,g,b,e,h){if(h!==d){var l=h*h,n=h*h*h;c=a.multiply([-1/6,0.5,-0.5,1/6,0.5,-1,0.5,0,-0.5,0,0.5,0,1/6,2/3,1/6,0],[6/n,0,0,0,6/n,2/l,0,0,1/n,1/l,1/h,0,0,0,0,1],[]);d=h}this.split=g.helix!==this.helix||g.sheet!==this.sheet;this.lineSegments=this.innerCompute(0, +f,g,b,!1,h);e&&(this.lineSegmentsCartoon=this.innerCompute(g.helix||g.sheet?2:1,f,g,b,!0,h))};this.innerCompute=function(d,f,o,m,j,l){for(var n=[],r=this.getGuidePointSet(d),f=f.getGuidePointSet(d),o=o.getGuidePointSet(d),k=m.getGuidePointSet(d),v=0,x=this.guidePointsLarge.length;v<x;v++){for(var t=a.multiply([f[v].x,f[v].y,f[v].z,1,r[v].x,r[v].y,r[v].z,1,o[v].x,o[v].y,o[v].z,1,k[v].x,k[v].y,k[v].z,1],c,[]),y=[],w=0;w<l;w++){for(d=3;0<d;d--)for(m=0;4>m;m++)t[4*d+m]+=t[4*(d-1)+m];y[w]=new b.Atom("", +t[12]/t[15],t[13]/t[15],t[14]/t[15])}n[v]=y}if(j&&this.arrow)for(d=0;d<l;d++){j=1.5-1.3*d/l;r=e.floor(this.horizontalResolution/2);f=n[r];m=0;for(o=n.length;m<o;m++)m!==r&&(k=f[d],v=n[m][d],x=[v.x-k.x,v.y-k.y,v.z-k.z],h.scale(x,j),v.x=k.x+x[0],v.y=k.y+x[1],v.z=k.z+x[2])}return n}}})(ChemDoodle.structures,Math,mat4,vec3); +(function(b,e,a,h,c){e.Spectrum=function(){this.data=[];this.metadata=[];this.dataDisplay=[];this.yUnit=this.xUnit=this.title=void 0;this.continuous=!0;this.integrationSensitivity=0.01;this.memory={offsetTop:0,offsetLeft:0,offsetBottom:0,flipXAxis:!1,scale:1,width:0,height:0};this.draw=function(a,f,e,g){this.specs&&(f=this.specs);var o=5,m=0,j=0;a.fillStyle=f.text_color;a.textAlign="center";a.textBaseline="alphabetic";a.font=f.getFontString(f.text_font_size,f.text_font_families);this.xUnit&&(j+=f.text_font_size, +a.fillText(this.xUnit,e/2,g-2));this.yUnit&&f.plots_showYAxis&&(m+=f.text_font_size,a.save(),a.translate(f.text_font_size,g/2),a.rotate(-c.PI/2),a.fillText(this.yUnit,0,0),a.restore());this.title&&(o+=f.text_font_size,a.fillText(this.title,e/2,f.text_font_size));j+=5+f.text_font_size;f.plots_showYAxis&&(m+=5+a.measureText("1000").width);f.plots_showGrid&&(a.strokeStyle=f.plots_gridColor,a.lineWidth=f.plots_gridLineWidth,a.strokeRect(m,o,e-m,g-j-o));a.textAlign="center";a.textBaseline="top";for(var l= +this.maxX-this.minX,n=l/100,r=0.001;r<n||25<l/r;)r*=10;for(var k=0,v=f.plots_flipXAxis?e:0,l=c.round(this.minX/r)*r;l<=this.maxX;l+=r/2){var x=this.getTransformedX(l,f,e,m);if(x>m)if(a.strokeStyle="black",a.lineWidth=1,0===k%2){a.beginPath();a.moveTo(x,g-j);a.lineTo(x,g-j+2);a.stroke();for(n=l.toFixed(5);"0"===n.charAt(n.length-1);)n=n.substring(0,n.length-1);"."===n.charAt(n.length-1)&&(n=n.substring(0,n.length-1));var t=a.measureText(n).width;f.plots_flipXAxis&&(t*=-1);var y=x-t/2;if(f.plots_flipXAxis? +y<v:y>v)a.fillText(n,x,g-j+2),v=x+t/2;f.plots_showGrid&&(a.strokeStyle=f.plots_gridColor,a.lineWidth=f.plots_gridLineWidth,a.beginPath(),a.moveTo(x,g-j),a.lineTo(x,o),a.stroke())}else a.beginPath(),a.moveTo(x,g-j),a.lineTo(x,g-j+2),a.stroke();k++}if(f.plots_showYAxis||f.plots_showGrid){r=1/f.scale;a.textAlign="right";a.textBaseline="middle";for(l=0;10>=l;l++)if(n=r/10*l,k=o+(g-j-o)*(1-n*f.scale),f.plots_showGrid&&(a.strokeStyle=f.plots_gridColor,a.lineWidth=f.plots_gridLineWidth,a.beginPath(),a.moveTo(m, +k),a.lineTo(e,k),a.stroke()),f.plots_showYAxis){a.strokeStyle="black";a.lineWidth=1;a.beginPath();a.moveTo(m,k);a.lineTo(m-3,k);a.stroke();n*=100;v=c.max(0,3-c.floor(n).toString().length);n=n.toFixed(v);if(0<v)for(;"0"===n.charAt(n.length-1);)n=n.substring(0,n.length-1);"."===n.charAt(n.length-1)&&(n=n.substring(0,n.length-1));a.fillText(n,m-3,k)}}a.strokeStyle="black";a.lineWidth=1;a.beginPath();a.moveTo(e,g-j);a.lineTo(m,g-j);f.plots_showYAxis&&a.lineTo(m,o);a.stroke();if(0<this.dataDisplay.length){a.textAlign= +"left";a.textBaseline="top";l=n=0;for(r=this.dataDisplay.length;l<r;l++)if(this.dataDisplay[l].value)a.fillText([this.dataDisplay[l].display,": ",this.dataDisplay[l].value].join(""),m+10,o+10+n*(f.text_font_size+5)),n++;else if(this.dataDisplay[l].tag){k=0;for(v=this.metadata.length;k<v;k++)if(b.stringStartsWith(this.metadata[k],this.dataDisplay[l].tag)){v=this.metadata[k];this.dataDisplay[l].display&&(v=h.inArray("=",this.metadata[k]),v=[this.dataDisplay[l].display,": ",-1<v?this.metadata[k].substring(v+ +2):this.metadata[k]].join(""));a.fillText(v,m+10,o+10+n*(f.text_font_size+5));n++;break}}}this.drawPlot(a,f,e,g,o,m,j);this.memory.offsetTop=o;this.memory.offsetLeft=m;this.memory.offsetBottom=j;this.memory.flipXAxis=f.plots_flipXAxis;this.memory.scale=f.scale;this.memory.width=e;this.memory.height=g};this.drawPlot=function(a,f,b,g,h,m,j){this.specs&&(f=this.specs);a.strokeStyle=f.plots_color;a.lineWidth=f.plots_width;var l=[];a.beginPath();if(this.continuous)for(var n=!1,r=0,k=0,v=this.data.length;k< +v;k++){var x=this.getTransformedX(this.data[k].x,f,b,m);if(x>=m&&x<b){var t=this.getTransformedY(this.data[k].y,f,g,j,h);f.plots_showIntegration&&c.abs(this.data[k].y)>this.integrationSensitivity&&l.push(new e.Point(this.data[k].x,this.data[k].y));n||(a.moveTo(x,t),n=!0);a.lineTo(x,t);r++;0===r%1E3&&(a.stroke(),a.beginPath(),a.moveTo(x,t))}else if(n)break}else{k=0;for(v=this.data.length;k<v;k++)x=this.getTransformedX(this.data[k].x,f,b,m),x>=m&&x<b&&(a.moveTo(x,g-j),a.lineTo(x,this.getTransformedY(this.data[k].y, +f,g,j,h)))}a.stroke();if(f.plots_showIntegration&&1<l.length){a.strokeStyle=f.plots_integrationColor;a.lineWidth=f.plots_integrationLineWidth;a.beginPath();k=l[1].x>l[0].x;if(this.flipXAxis&&!k||!this.flipXAxis&&k){for(k=l.length-2;0<=k;k--)l[k].y+=l[k+1].y;n=l[0].y}else{k=1;for(v=l.length;k<v;k++)l[k].y+=l[k-1].y;n=l[l.length-1].y}k=0;for(v=l.length;k<v;k++)x=this.getTransformedX(l[k].x,f,b,m),t=this.getTransformedY(l[k].y/f.scale/n,f,g,j,h),0===k?a.moveTo(x,t):a.lineTo(x,t);a.stroke()}};this.getTransformedY= +function(a,c,b,g,e){return e+(b-g-e)*(1-a*c.scale)};this.getInverseTransformedY=function(a){return 100*((1-(a-this.memory.offsetTop)/(this.memory.height-this.memory.offsetBottom-this.memory.offsetTop))/this.memory.scale)};this.getTransformedX=function(a,c,b,g){a=g+(a-this.minX)/(this.maxX-this.minX)*(b-g);c.plots_flipXAxis&&(a=b+g-a);return a};this.getInverseTransformedX=function(a){this.memory.flipXAxis&&(a=this.memory.width+this.memory.offsetLeft-a);return(a-this.memory.offsetLeft)*(this.maxX-this.minX)/ +(this.memory.width-this.memory.offsetLeft)+this.minX};this.setup=function(){for(var a=Number.MAX_VALUE,f=Number.MIN_VALUE,b=Number.MIN_VALUE,g=0,e=this.data.length;g<e;g++)a=c.min(a,this.data[g].x),f=c.max(f,this.data[g].x),b=c.max(b,this.data[g].y);this.continuous?(this.minX=a,this.maxX=f):(this.minX=a-1,this.maxX=f+1);g=0;for(e=this.data.length;g<e;g++)this.data[g].y/=b};this.zoom=function(d,f,b,g){d=this.getInverseTransformedX(d);f=this.getInverseTransformedX(f);this.minX=c.min(d,f);this.maxX= +c.max(d,f);if(g){g=Number.MIN_VALUE;f=0;for(d=this.data.length;f<d;f++)a.isBetween(this.data[f].x,this.minX,this.maxX)&&(g=c.max(g,this.data[f].y));return 1/g}};this.translate=function(a,c){var b=a/(c-this.memory.offsetLeft)*(this.maxX-this.minX)*(this.memory.flipXAxis?1:-1);this.minX+=b;this.maxX+=b};this.alertMetadata=function(){alert(this.metadata.join("\n"))};this.getInternalCoordinates=function(a,c){return new ChemDoodle.structures.Point(this.getInverseTransformedX(a),this.getInverseTransformedY(c))}; +this.getClosestPlotInternalCoordinates=function(c){var f=this.getInverseTransformedX(c-1),c=this.getInverseTransformedX(c+1);if(f>c)var b=f,f=c,c=b;for(var b=-1,g=-Infinity,e=!1,h=0,j=this.data.length;h<j;h++){var l=this.data[h];if(a.isBetween(l.x,f,c))l.y>g&&(e=!0,g=l.y,b=h);else if(e)break}if(-1!==b)return l=this.data[b],new ChemDoodle.structures.Point(l.x,100*l.y)};this.getClosestPeakInternalCoordinates=function(a){for(var f=this.getInverseTransformedX(a),a=0,b=Infinity,g=0,e=this.data.length;g< +e;g++){var h=c.abs(this.data[g].x-f);if(h<=b)b=h,a=g;else break}f=highestRight=a;b=maxRight=this.data[a].y;g=a+1;for(e=this.data.length;g<e;g++)if(this.data[g].y+0.05>maxRight)maxRight=this.data[g].y,highestRight=g;else break;for(g=a-1;0<=g;g--)if(this.data[g].y+0.05>b)b=this.data[g].y,f=g;else break;a=this.data[f-a>highestRight-a?highestRight:f];return new ChemDoodle.structures.Point(a.x,100*a.y)};return!0}})(ChemDoodle.extensions,ChemDoodle.structures,ChemDoodle.math,jQuery,Math); +(function(b,e,a){e._Shape=function(){return!0};e._Shape.prototype.drawDecorations=function(a,c){if(this.isHover)for(var b=this.getPoints(),f=0,e=b.length;f<e;f++){var g=b[f];this.drawAnchor(a,c,g,g===this.hoverPoint)}};e._Shape.prototype.getBounds=function(){for(var a=new b.Bounds,c=this.getPoints(),d=0,f=c.length;d<f;d++){var e=c[d];a.expand(e.x,e.y)}return a};e._Shape.prototype.drawAnchor=function(b,c,d,f){b.save();b.translate(d.x,d.y);b.rotate(a.PI/4);b.scale(1/c.scale,1/c.scale);b.beginPath(); +b.moveTo(-4,-4);b.lineTo(4,-4);b.lineTo(4,4);b.lineTo(-4,4);b.closePath();b.fillStyle=f?"#885110":"white";b.fill();b.beginPath();b.moveTo(-4,-2);b.lineTo(-4,-4);b.lineTo(-2,-4);b.moveTo(2,-4);b.lineTo(4,-4);b.lineTo(4,-2);b.moveTo(4,2);b.lineTo(4,4);b.lineTo(2,4);b.moveTo(-2,4);b.lineTo(-4,4);b.lineTo(-4,2);b.moveTo(-4,-2);b.strokeStyle="rgba(0,0,0,.2)";b.lineWidth=5;b.stroke();b.strokeStyle="blue";b.lineWidth=1;b.stroke();b.restore()}})(ChemDoodle.math,ChemDoodle.structures.d2,Math); +(function(b,e,a,h){a.Line=function(c,d){this.p1=c?c:new e.Point;this.p2=d?d:new e.Point;this.arrowType=void 0;this.draw=function(c,b){if(this.isLassoed){var g=c.createLinearGradient(this.p1.x,this.p1.y,this.p2.x,this.p2.y);g.addColorStop(0,"rgba(212, 99, 0, 0)");g.addColorStop(0.5,"rgba(212, 99, 0, 0.8)");g.addColorStop(1,"rgba(212, 99, 0, 0)");var d=2.5,e=this.p1.angle(this.p2)+h.PI/2,j=h.cos(e),e=h.sin(e),l=this.p1.x-j*d,n=this.p1.y+e*d,r=this.p1.x+j*d,k=this.p1.y-e*d,v=this.p2.x+j*d,x=this.p2.y- +e*d,t=this.p2.x-j*d,y=this.p2.y+e*d;c.fillStyle=g;c.beginPath();c.moveTo(l,n);c.lineTo(r,k);c.lineTo(v,x);c.lineTo(t,y);c.closePath();c.fill()}c.strokeStyle=b.shapes_color;c.fillStyle=b.shapes_color;c.lineWidth=b.shapes_lineWidth_2D;c.lineJoin="miter";if(this.arrowType===a.Line.ARROW_RETROSYNTHETIC){var g=2*h.sqrt(2),d=b.shapes_arrowLength_2D/g,j=this.p1.angle(this.p2),e=j+h.PI/2,g=b.shapes_arrowLength_2D/g,w=h.cos(j),u=h.sin(j),j=h.cos(e),e=h.sin(e),l=this.p1.x-j*d,n=this.p1.y+e*d,r=this.p1.x+j* +d,k=this.p1.y-e*d,v=this.p2.x+j*d-w*g,x=this.p2.y-e*d+u*g,t=this.p2.x-j*d-w*g,y=this.p2.y+e*d+u*g,p=this.p2.x+2*j*d-2*w*g,A=this.p2.y-2*e*d+2*u*g,j=this.p2.x-2*j*d-2*w*g,d=this.p2.y+2*e*d+2*u*g;c.beginPath();c.moveTo(r,k);c.lineTo(v,x);c.moveTo(p,A);c.lineTo(this.p2.x,this.p2.y);c.lineTo(j,d);c.moveTo(t,y);c.lineTo(l,n);c.stroke()}else if(this.p1.x!==this.p2.x||this.p1.y!==this.p2.y)this.arrowType===a.Line.ARROW_SYNTHETIC?(j=this.p1.angle(this.p2),e=j+h.PI/2,g=2*b.shapes_arrowLength_2D/h.sqrt(3), +w=h.cos(j),u=h.sin(j),j=h.cos(e),e=h.sin(e),c.beginPath(),c.moveTo(this.p1.x,this.p1.y),c.lineTo(this.p2.x-w*g/2,this.p2.y+u*g/2),c.stroke(),l=this.p2.x-0.8*w*g,n=this.p2.y+0.8*u*g,p=this.p2.x+j*b.shapes_arrowLength_2D/3-w*g,A=this.p2.y-e*b.shapes_arrowLength_2D/3+u*g,j=this.p2.x-j*b.shapes_arrowLength_2D/3-w*g,d=this.p2.y+e*b.shapes_arrowLength_2D/3+u*g,c.beginPath(),c.moveTo(this.p2.x,this.p2.y),c.lineTo(j,d),c.lineTo(l,n),c.lineTo(p,A),c.closePath(),c.fill()):(c.beginPath(),c.moveTo(this.p1.x, +this.p1.y),c.lineTo(this.p2.x,this.p2.y)),c.stroke()};this.getPoints=function(){return[this.p1,this.p2]};this.isOver=function(a,c){var g=b.distanceFromPointToLineInclusive(a,this.p1,this.p2);return-1!==g&&g<c};return!0};a.Line.prototype=new a._Shape;a.Line.ARROW_SYNTHETIC="synthetic";a.Line.ARROW_RETROSYNTHETIC="retrosynthetic"})(ChemDoodle.math,ChemDoodle.structures,ChemDoodle.structures.d2,Math); +(function(b,e,a,h){a.Pusher=function(a,b,f){this.o1=a;this.o2=b;this.numElectron=f?f:1;this.draw=function(a,c){if(this.o1&&this.o2){a.strokeStyle=c.shapes_color;a.fillStyle=c.shapes_color;a.lineWidth=c.shapes_lineWidth_2D;a.lineJoin="miter";var b=this.o1 instanceof e.Atom?new e.Point(this.o1.x,this.o1.y):this.o1.getCenter(),d=this.o2 instanceof e.Atom?new e.Point(this.o2.x,this.o2.y):this.o2.getCenter(),f=h.max(50,b.distance(d)),l;if(this.o1.molCenter)if(this.o1 instanceof e.Atom){var n=this.o1.molCenter.angle(b); +l=new e.Point(b.x+f*h.cos(n),b.y-f*h.sin(n))}else{var n=this.o1.a1.angle(this.o1.a2),r=n+h.PI/2,n=r+h.PI,r=new e.Point(b.x+f*h.cos(r),b.y-f*h.sin(r)),n=new e.Point(b.x+f*h.cos(n),b.y-f*h.sin(n));l=r.distance(this.o1.molCenter)>n.distance(this.o1.molCenter)?r:n}else l=b;this.o2.molCenter?this.o2 instanceof e.Atom?(n=this.o2.molCenter.angle(d),n=new e.Point(d.x+f*h.cos(n),d.y-f*h.sin(n))):(n=this.o2.a1.angle(this.o2.a2),r=n+h.PI/2,n=r+h.PI,r=new e.Point(d.x+f*h.cos(r),d.y-f*h.sin(r)),n=new e.Point(d.x+ +f*h.cos(n),d.y-f*h.sin(n)),n=r.distance(this.o2.molCenter)>n.distance(this.o2.molCenter)?r:n):n=d;for(var r=l.angle(b),k=n.angle(d),v=h.max(r,k)-h.min(r,k);v+0.001>=h.PI;)v-=h.PI;0.001>v&&(r+=h.PI/6,k+=h.PI/6,l.x=b.x+f*h.cos(r+h.PI),l.y=b.y-f*h.sin(r+h.PI),n.x=d.x+f*h.cos(k+h.PI),n.y=d.y-f*h.sin(k+h.PI));v=r+h.PI/2;f=h.cos(r);r=h.sin(r);if(c.pusher_showElectron_2D){var x=5;if(this.o1 instanceof e.Atom&&this.o1.isLabelVisible(c)||1<this.o1.bondOrder)x=8;b.x-=f*x;b.y+=r*x;2===this.numElectron?(x=Math.cos(v)* +c.atoms_lonePairSpread_2D/2,v=-Math.sin(v)*c.atoms_lonePairSpread_2D/2,a.beginPath(),a.arc(b.x+x,b.y+v,c.atoms_lonePairDiameter_2D,0,2*h.PI,!1),a.fill(),a.beginPath(),a.arc(b.x-x,b.y-v,c.atoms_lonePairDiameter_2D,0,2*h.PI,!1)):(a.beginPath(),a.arc(b.x,b.y,c.atoms_lonePairDiameter_2D,0,2*h.PI,!1));a.fill()}b.x-=5*f;b.y+=5*r;var v=k+h.PI/2,t=2*c.shapes_arrowLength_2D/h.sqrt(3),f=h.cos(k),r=h.sin(k),y=h.cos(v),w=h.sin(v);d.x-=5*f;d.y+=5*r;k=new e.Point(d.x,d.y);d.x-=0.8*f*t;d.y+=0.8*r*t;var v=k.x-0.8* +f*t,x=k.y+0.8*r*t,u=new e.Point(k.x+y*c.shapes_arrowLength_2D/3-f*t,k.y-w*c.shapes_arrowLength_2D/3+r*t),f=new e.Point(k.x-y*c.shapes_arrowLength_2D/3-f*t,k.y+w*c.shapes_arrowLength_2D/3+r*t),t=r=!0;1===this.numElectron&&(u.distance(l)>f.distance(l)?t=!1:r=!1);a.beginPath();a.moveTo(k.x,k.y);t&&a.lineTo(f.x,f.y);a.lineTo(v,x);r&&a.lineTo(u.x,u.y);a.closePath();a.fill();a.stroke();a.beginPath();a.moveTo(b.x,b.y);a.bezierCurveTo(l.x,l.y,n.x,n.y,d.x,d.y);a.stroke()}};this.getPoints=function(){return[]}; +this.isOver=function(){return!1};return!0};a.Pusher.prototype=new a._Shape})(ChemDoodle.math,ChemDoodle.structures,ChemDoodle.structures.d2,Math); +(function(b){b._Mesh=function(){return!0};b._Mesh.prototype.storeData=function(b,a,h){this.positionData=b;this.normalData=a;this.indexData=h};b._Mesh.prototype.setupBuffers=function(b){this.vertexPositionBuffer=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,this.vertexPositionBuffer);b.bufferData(b.ARRAY_BUFFER,new Float32Array(this.positionData),b.STATIC_DRAW);this.vertexPositionBuffer.itemSize=3;this.vertexPositionBuffer.numItems=this.positionData.length/3;this.vertexNormalBuffer=b.createBuffer(); +b.bindBuffer(b.ARRAY_BUFFER,this.vertexNormalBuffer);b.bufferData(b.ARRAY_BUFFER,new Float32Array(this.normalData),b.STATIC_DRAW);this.vertexNormalBuffer.itemSize=3;this.vertexNormalBuffer.numItems=this.normalData.length/3;this.indexData&&(this.vertexIndexBuffer=b.createBuffer(),b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.vertexIndexBuffer),b.bufferData(b.ELEMENT_ARRAY_BUFFER,new Uint16Array(this.indexData),b.STATIC_DRAW),this.vertexIndexBuffer.itemSize=1,this.vertexIndexBuffer.numItems=this.indexData.length); +if(this.partitions)for(var a=0,h=this.partitions.length;a<h;a++){var c=this.partitions[a],d=this.generateBuffers(b,c.positionData,c.normalData,c.indexData);c.vertexPositionBuffer=d[0];c.vertexNormalBuffer=d[1];c.vertexIndexBuffer=d[2]}};b._Mesh.prototype.generateBuffers=function(b,a,h,c){var d=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,d);b.bufferData(b.ARRAY_BUFFER,new Float32Array(a),b.STATIC_DRAW);d.itemSize=3;d.numItems=a.length/3;a=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,a);b.bufferData(b.ARRAY_BUFFER, +new Float32Array(h),b.STATIC_DRAW);a.itemSize=3;a.numItems=h.length/3;var f;c&&(f=b.createBuffer(),b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,f),b.bufferData(b.ELEMENT_ARRAY_BUFFER,new Uint16Array(c),b.STATIC_DRAW),f.itemSize=1,f.numItems=c.length);return[d,a,f]};b._Mesh.prototype.bindBuffers=function(b){this.vertexPositionBuffer||this.setupBuffers(b);b.bindBuffer(b.ARRAY_BUFFER,this.vertexPositionBuffer);b.vertexAttribPointer(b.shader.vertexPositionAttribute,this.vertexPositionBuffer.itemSize,b.FLOAT,!1, +0,0);b.bindBuffer(b.ARRAY_BUFFER,this.vertexNormalBuffer);b.vertexAttribPointer(b.shader.vertexNormalAttribute,this.vertexNormalBuffer.itemSize,b.FLOAT,!1,0,0);this.vertexIndexBuffer&&b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.vertexIndexBuffer)}})(ChemDoodle.structures.d3,Math); +(function(b,e){b.Cylinder=function(a,b,c){for(var d=[],f=[],q=0;q<c;q++){var g=2*q*e.PI/c,o=e.cos(g),g=e.sin(g);f.push(o,0,g);d.push(a*o,0,a*g);f.push(o,0,g);d.push(a*o,b,a*g)}f.push(1,0,0);d.push(a,0,0);f.push(1,0,0);d.push(a,b,0);this.storeData(d,f);return!0};b.Cylinder.prototype=new b._Mesh})(ChemDoodle.structures.d3,Math); +(function(b,e){b.Sphere=function(a,b,c){for(var d=[],f=[],q=0;q<=b;q++)for(var g=q*e.PI/b,o=e.sin(g),m=e.cos(g),g=0;g<=c;g++){var j=2*g*e.PI/c,l=e.sin(j),j=e.cos(j)*o,n=m,l=l*o;f.push(j,n,l);d.push(a*j,a*n,a*l)}a=[];c+=1;for(q=0;q<b;q++)for(g=0;g<c;g++)o=q*c+g%c,m=o+c,a.push(o),a.push(m),a.push(o+1),g<c-1&&(a.push(m),a.push(m+1),a.push(o+1));this.storeData(d,f,a);return!0};b.Sphere.prototype=new b._Mesh})(ChemDoodle.structures.d3,Math); +(function(b,e,a,h){function c(a,c,g,e){this.name=c;this.entire=a;this.pi=e;this.getColor=function(c){return c.macro_colorByChain?this.chainColor:this.name?this.getResidueColor(b[this.name]?this.name:"*",c):this.helix?a.front?c.proteins_ribbonCartoonHelixPrimaryColor:c.proteins_ribbonCartoonHelixSecondaryColor:this.sheet?c.proteins_ribbonCartoonSheetColor:a.front?c.proteins_primaryColor:c.proteins_secondaryColor};this.getResidueColor=function(a,c){var d=b[a];return c.proteins_useShapelyColors?d.shapelyColor: +c.proteins_useAminoColors?d.aminoColor:c.proteins_usePolarityColors&&d.polar?"#C10000":"#FFFFFF"};this.render=function(a,c){this.entire.partitions&&this.pi!==this.entire.partitions.lastRender&&(d(a,this.entire.partitions[this.pi]),this.entire.partitions.lastRender=this.pi);this.vertexIndexBuffer||(this.vertexIndexBuffer=a.createBuffer(),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.vertexIndexBuffer),a.bufferData(a.ELEMENT_ARRAY_BUFFER,new Uint16Array(g),a.STATIC_DRAW),this.vertexIndexBuffer.itemSize= +1,this.vertexIndexBuffer.numItems=g.length);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.vertexIndexBuffer);a.material.setDiffuseColor(this.getColor(c));a.drawElements(a.TRIANGLES,this.vertexIndexBuffer.numItems,a.UNSIGNED_SHORT,0)}}var d=function(a,c){a.bindBuffer(a.ARRAY_BUFFER,c.vertexPositionBuffer);a.vertexAttribPointer(a.shader.vertexPositionAttribute,c.vertexPositionBuffer.itemSize,a.FLOAT,!1,0,0);a.bindBuffer(a.ARRAY_BUFFER,c.vertexNormalBuffer);a.vertexAttribPointer(a.shader.vertexNormalAttribute, +c.vertexNormalBuffer.itemSize,a.FLOAT,!1,0,0);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,c.vertexIndexBuffer)};e.Ribbon=function(b,e,g){var o=b[0].lineSegments.length,m=b[0].lineSegments[0].length;this.partitions=[];this.partitions.lastRender=0;var j;this.front=0<e;for(var l=0,n=b.length-1;l<n;l++){if(!j||65E3<j.positionData.length)0<this.partitions.length&&l--,j={count:0,positionData:[],normalData:[],indexData:[]},this.partitions.push(j);var r=b[l];j.count++;for(var k=0;k<o;k++)for(var v=g?r.lineSegmentsCartoon[k]: +r.lineSegments[k],x=0===k,t=!1,y=0;y<m;y++){var w=v[y],u=l,p=y+1;l===b.length-2&&y===m-1?p--:y===m-1&&(u++,p=0);var p=g?b[u].lineSegmentsCartoon[k][p]:b[u].lineSegments[k][p],u=!1,A=k+1;k===o-1&&(A-=2,u=!0);var A=g?r.lineSegmentsCartoon[A][y]:r.lineSegments[A][y],p=[p.x-w.x,p.y-w.y,p.z-w.z],A=[A.x-w.x,A.y-w.y,A.z-w.z],B=h.cross(p,A,[]);0===y&&(h.normalize(p),h.scale(p,-1),j.normalData.push(p[0],p[1],p[2]),j.positionData.push(w.x,w.y,w.z));x||t?(h.normalize(A),h.scale(A,-1),j.normalData.push(A[0], +A[1],A[2]),j.positionData.push(w.x,w.y,w.z),x&&y===m-1&&(x=!1,y=-1)):(h.normalize(B),(u&&!this.front||!u&&this.front)&&h.scale(B,-1),j.normalData.push(B[0],B[1],B[2]),h.scale(B,a.abs(e)),j.positionData.push(w.x+B[0],w.y+B[1],w.z+B[2]),k===o-1&&y===m-1&&(t=!0,y=-1));if(-1===y||y===m-1)h.normalize(p),j.normalData.push(p[0],p[1],p[2]),j.positionData.push(w.x,w.y,w.z)}}o+=2;m+=2;g&&(this.cartoonSegments=[]);this.segments=[];e=0;for(r=this.partitions.length;e<r;e++){j=this.partitions[e];var D;g&&(D=[]); +l=0;for(n=j.count-1;l<n;l++){v=l;for(k=0;k<e;k++)v+=this.partitions[k].count-1;k=b[v];0<l&&g&&k.split&&(y=new c(this,void 0,D,e),k.helix&&(y.helix=!0),k.sheet&&(y.sheet=!0),this.cartoonSegments.push(y),D=[]);x=l*o*m;t=[];k=0;for(w=o-1;k<w;k++){u=x+k*m;for(y=0;y<m;y++){p=1;l===j.count-1?p=0:y===m-1&&(p=o*m-y);p=[u+y,u+m+y,u+m+y+p,u+y,u+y+p,u+m+y+p];if(y!==m-1)for(A=0;6>A;A++)t.push(p[A]);y===m-2&&l<j.count-1&&(A=o*m-y,p[2]+=A,p[4]+=A,p[5]+=A);for(A=0;6>A;A++)j.indexData.push(p[A]);if(g)for(A=0;6>A;A++)D.push(p[A])}}this.segments.push(new c(this, +b[v+1].name,t,e))}if(g){y=new c(this,void 0,D,e);v=j.count-1;for(k=0;k<e;k++)v+=this.partitions[k].count-1;k=b[v];k.helix&&(y.helix=!0);k.sheet&&(y.sheet=!0);this.cartoonSegments.push(y)}}this.storeData(this.partitions[0].positionData,this.partitions[0].normalData,this.partitions[0].indexData);1===this.partitions.length&&(this.partitions=void 0);this.render=function(a,c){this.bindBuffers(a);var b=c.macro_colorByChain?this.chainColor:void 0;b||(b=this.front?c.proteins_primaryColor:c.proteins_secondaryColor); +a.material.setDiffuseColor(b);a.drawElements(a.TRIANGLES,this.vertexIndexBuffer.numItems,a.UNSIGNED_SHORT,0);if(this.partitions)for(var b=1,f=this.partitions.length;b<f;b++){var g=this.partitions[b];d(a,g);a.drawElements(a.TRIANGLES,g.vertexIndexBuffer.numItems,a.UNSIGNED_SHORT,0)}};return!0};e.Ribbon.prototype=new e._Mesh})(ChemDoodle.RESIDUE,ChemDoodle.structures.d3,Math,vec3); +(function(b,e,a){e.Light=function(e,c,d){this.diffuseRGB=b.getRGB(e,1);this.specularRGB=b.getRGB(c,1);this.direction=d;this.lightScene=function(c){c.uniform3f(c.getUniformLocation(c.program,"u_light.diffuse_color"),this.diffuseRGB[0],this.diffuseRGB[1],this.diffuseRGB[2]);c.uniform3f(c.getUniformLocation(c.program,"u_light.specular_color"),this.specularRGB[0],this.specularRGB[1],this.specularRGB[2]);var b=a.create(this.direction);a.normalize(b);a.negate(b);c.uniform3f(c.getUniformLocation(c.program, +"u_light.direction"),b[0],b[1],b[2]);var d=[0,0,0],b=[d[0]+b[0],d[1]+b[1],d[2]+b[2]],d=a.length(b);0===d?b=[0,0,1]:a.scale(1/d);c.uniform3f(c.getUniformLocation(c.program,"u_light.half_vector"),b[0],b[1],b[2])};return!0}})(ChemDoodle.math,ChemDoodle.structures.d3,vec3);(function(b){b.Line=function(){this.storeData([0,0,0,0,1,0],[0,0,0,0,0,0]);return!0};b.Line.prototype=new b._Mesh})(ChemDoodle.structures.d3); +(function(b,e){e.Material=function(a){var e=a.getUniformLocation(a.program,"u_material.ambient_color"),c=a.getUniformLocation(a.program,"u_material.diffuse_color"),d=a.getUniformLocation(a.program,"u_material.specular_color"),f=a.getUniformLocation(a.program,"u_material.shininess"),q=a.getUniformLocation(a.program,"u_material.alpha");this.setTempColors=function(g,o,m,j){if(!this.aCache||this.aCache!==g)this.aCache=g,g=b.getRGB(g,1),a.uniform3f(e,g[0],g[1],g[2]);if(o&&(!this.dCache||this.dCache!== +o))this.dCache=o,g=b.getRGB(o,1),a.uniform3f(c,g[0],g[1],g[2]);if(!this.sCache||this.sCache!==m)this.sCache=m,g=b.getRGB(m,1),a.uniform3f(d,g[0],g[1],g[2]);if(!this.snCache||this.snCache!==j)this.snCache=j,a.uniform1f(f,j);this.alCache=1;a.uniform1f(q,1)};this.setDiffuseColor=function(d){if(!this.dCache||this.dCache!==d)this.dCache=d,d=b.getRGB(d,1),a.uniform3f(c,d[0],d[1],d[2])};this.setAlpha=function(c){if(!this.alCache||this.alCache!==c)this.alCache=c,a.uniform1f(q,c)};return!0}})(ChemDoodle.math, +ChemDoodle.structures.d3); +(function(b,e,a,h){e.MolecularSurface=function(c,d,f,e,g){function o(a,c,b,d){var f=a.index;if(a.contained)for(var f=-1,g=Infinity,e=0,h=c.length;e<h;e++)for(var j=c[e],l=0,q=j.length;l<q;l++){var o=j[l];if(!o.contained&&o.index!==b&&o.index!==d){var m=o.distance3D(a);m<g&&(f=o.index,g=m)}}return f}for(var m=[],j=[],l=[],n=[],r=0;r<=d;r++)for(var k=r*h.PI/d,v=h.sin(k),x=h.cos(k),k=0;k<=f;k++){var t=2*k*h.PI/f;n.push(h.cos(t)*v,x,h.sin(t)*v)}v=[];r=0;for(k=c.atoms.length;r<k;r++){for(var x=[],y=c.atoms[r], +w=a[y.label][g]+e,u=[],t=0,p=c.atoms.length;t<p;t++)if(t!==r){var A=c.atoms[t];A.index=t;y.distance3D(A)<w+a[A.label][g]+e&&u.push(A)}t=0;for(p=n.length;t<p;t+=3){for(var B=new b.Atom("C",y.x+w*n[t],y.y+w*n[t+1],y.z+w*n[t+2]),D=0,G=u.length;D<G;D++)if(A=u[D],B.distance3D(A)<a[A.label][g]+e){B.contained=!0;break}x.push(B)}v.push(x)}c=[];f++;for(r=0;r<d;r++)for(k=0;k<f;k++)g=r*f+k%f,e=g+f,c.push(g),c.push(e),c.push(g+1),k<f-1&&(c.push(e),c.push(e+1),c.push(g+1));r=D=0;for(k=v.length;r<k;r++){x=v[r]; +t=0;for(p=x.length;t<p;t++)B=x[t],B.contained||(B.index=D,D++,m.push(B.x,B.y,B.z),j.push(n[3*t],n[3*t+1],n[3*t+2]));t=0;for(p=c.length;t<p;t+=3)g=x[c[t]],e=x[c[t+1]],B=x[c[t+2]],!g.contained&&!e.contained&&!B.contained&&l.push(g.index,e.index,B.index)}n=[];r=0;for(k=v.length;r<k;r++){x=v[r];t=0;for(p=c.length;t<p;t+=3){g=x[c[t]];e=x[c[t+1]];B=x[c[t+2]];u=[];D=0;for(G=v.length;D<G;D++)D!==r&&u.push(v[D]);if((!g.contained||!e.contained||!B.contained)&&(g.contained||e.contained||B.contained))if(d=o(g, +u,-1,-1),f=o(e,u,d,-1),u=o(B,u,d,f),-1!==d&&-1!==f&&-1!==u){e=!1;D=0;for(G=n.length;D<G;D+=3)if(g=n[D],B=n[D+1],y=n[D+2],w=f===g||f===B||f===y,A=u===g||u===B||u===y,(d===g||d===B||d===y)&&w&&A){e=!0;break}e||n.push(d,f,u)}}}l=l.concat(n);this.storeData(m,j,l);return!0};e.MolecularSurface.prototype=new e._Mesh})(ChemDoodle.structures,ChemDoodle.structures.d3,ChemDoodle.ELEMENT,Math); +(function(b,e){b.Shader=function(){this.init=function(a){var b=this.getShader(a,"vertex-shader");b||(b=this.loadDefaultVertexShader(a));var c=this.getShader(a,"fragment-shader");c||(c=this.loadDefaultFragmentShader(a));a.attachShader(a.program,b);a.attachShader(a.program,c);a.linkProgram(a.program);a.getProgramParameter(a.program,a.LINK_STATUS)||alert("Could not initialize shaders: "+a.getProgramInfoLog(program));a.useProgram(a.program);this.vertexPositionAttribute=a.getAttribLocation(a.program,"a_vertex_position"); +a.enableVertexAttribArray(this.vertexPositionAttribute);this.vertexNormalAttribute=a.getAttribLocation(a.program,"a_vertex_normal");a.enableVertexAttribArray(this.vertexNormalAttribute)};this.getShader=function(a,b){var c=e.getElementById(b);if(c){for(var d=[],f=c.firstChild;f;)3===f.nodeType&&d.push(f.textContent),f=f.nextSibling;if("x-shader/x-fragment"===c.type)f=a.createShader(a.FRAGMENT_SHADER);else if("x-shader/x-vertex"===c.type)f=a.createShader(a.VERTEX_SHADER);else return;a.shaderSource(f, +d.join(""));a.compileShader(f);if(a.getShaderParameter(f,a.COMPILE_STATUS))return f;alert(c.type+" "+a.getShaderInfoLog(f))}};this.loadDefaultVertexShader=function(a){var b=[];b.push("struct Light");b.push("{");b.push("vec3 diffuse_color;");b.push("vec3 specular_color;");b.push("vec3 direction;");b.push("vec3 half_vector;");b.push("};");b.push("struct Material");b.push("{");b.push("vec3 ambient_color;");b.push("vec3 diffuse_color;");b.push("vec3 specular_color;");b.push("float shininess;");b.push("float alpha;"); +b.push("};");b.push("attribute vec3 a_vertex_position;");b.push("attribute vec3 a_vertex_normal;");b.push("uniform Light u_light;");b.push("uniform Material u_material;");b.push("uniform mat4 u_model_view_matrix;");b.push("uniform mat4 u_projection_matrix;");b.push("uniform mat3 u_normal_matrix;");b.push("varying vec4 v_diffuse;");b.push("varying vec4 v_ambient;");b.push("varying vec3 v_normal;");b.push("varying vec3 v_light_direction;");b.push("void main(void)");b.push("{");b.push("if(length(a_vertex_normal)==0.0){"); +b.push("v_normal = a_vertex_normal;");b.push("}else{");b.push("v_normal = normalize(u_normal_matrix * a_vertex_normal);");b.push("}");b.push("vec4 diffuse = vec4(u_light.diffuse_color, 1.0);");b.push("v_light_direction = u_light.direction;");b.push("v_ambient = vec4(u_material.ambient_color, 1.0);");b.push("v_diffuse = vec4(u_material.diffuse_color, 1.0) * diffuse;");b.push("gl_Position = u_projection_matrix * u_model_view_matrix * vec4(a_vertex_position, 1.0);");b.push("}");var c=a.createShader(a.VERTEX_SHADER); +a.shaderSource(c,b.join(""));a.compileShader(c);if(a.getShaderParameter(c,a.COMPILE_STATUS))return c;alert("Vertex shader failed to compile: "+a.getShaderInfoLog(c))};this.loadDefaultFragmentShader=function(a){var b=[];b.push("precision mediump float;\n");b.push("struct Light");b.push("{");b.push("vec3 diffuse_color;");b.push("vec3 specular_color;");b.push("vec3 direction;");b.push("vec3 half_vector;");b.push("};");b.push("struct Material");b.push("{");b.push("vec3 ambient_color;");b.push("vec3 diffuse_color;"); +b.push("vec3 specular_color;");b.push("float shininess;");b.push("float alpha;");b.push("};");b.push("uniform Light u_light;");b.push("uniform Material u_material;");b.push("varying vec4 v_diffuse;");b.push("varying vec4 v_ambient;");b.push("varying vec3 v_normal;");b.push("varying vec3 v_light_direction;");b.push("void main(void)");b.push("{");b.push("if(length(v_normal)==0.0){");b.push("gl_FragColor = vec4(v_diffuse.rgba);");b.push("}else{");b.push("float nDotL = max(dot(v_normal, v_light_direction), 0.0);"); +b.push("vec4 color = vec4(v_diffuse.rgb*nDotL, v_diffuse.a);");b.push("float nDotHV = max(dot(v_normal, u_light.half_vector), 0.0);");b.push("vec4 specular = vec4(u_material.specular_color * u_light.specular_color, 1.0);");b.push("color+=vec4(specular.rgb * pow(nDotHV, u_material.shininess), specular.a);");b.push("gl_FragColor = color+v_ambient;");b.push("gl_FragColor.a*=u_material.alpha;");b.push("}");b.push("}");var c=a.createShader(a.FRAGMENT_SHADER);a.shaderSource(c,b.join(""));a.compileShader(c); +if(a.getShaderParameter(c,a.COMPILE_STATUS))return c;alert("Fragment shader failed to compile: "+a.getShaderInfoLog(c))};return!0}})(ChemDoodle.structures.d3,document); +(function(b,e,a){e.Shape=function(e,c){for(var d=e.length,f=[],q=[],g=new b.Point,o=0,m=d;o<m;o++){var j=o+1;o===m-1&&(j=0);for(var l=e[o],j=e[j],n=a.cross([0,0,1],[j.x-l.x,j.y-l.y,0]),r=0;2>r;r++)f.push(l.x,l.y,c/2),f.push(l.x,l.y,-c/2),f.push(j.x,j.y,c/2),f.push(j.x,j.y,-c/2);for(r=0;4>r;r++)q.push(n[0],n[1],n[2]);q.push(0,0,1);q.push(0,0,-1);q.push(0,0,1);q.push(0,0,-1);g.add(l)}g.x/=d;g.y/=d;q.push(0,0,1);f.push(g.x,g.y,c/2);q.push(0,0,-1);f.push(g.x,g.y,-c/2);g=[];l=8*d;o=0;for(m=d;o<m;o++)d= +8*o,g.push(d),g.push(d+1),g.push(d+3),g.push(d),g.push(d+2),g.push(d+3),g.push(d+4),g.push(d+6),g.push(l),g.push(d+5),g.push(d+7),g.push(l+1);this.storeData(f,q,g);return!0};e.Shape.prototype=new e._Mesh})(ChemDoodle.structures,ChemDoodle.structures.d3,vec3); +(function(b,e,a){b.Star=function(){for(var b=[0.8944,0.4472,0,0.2764,0.4472,0.8506,0.2764,0.4472,-0.8506,-0.7236,0.4472,0.5257,-0.7236,0.4472,-0.5257,-0.3416,0.4472,0,-0.1056,0.4472,0.3249,-0.1056,0.4472,-0.3249,0.2764,0.4472,0.2008,0.2764,0.4472,-0.2008,-0.8944,-0.4472,0,-0.2764,-0.4472,0.8506,-0.2764,-0.4472,-0.8506,0.7236,-0.4472,0.5257,0.7236,-0.4472,-0.5257,0.3416,-0.4472,0,0.1056,-0.4472,0.3249,0.1056,-0.4472,-0.3249,-0.2764,-0.4472,0.2008,-0.2764,-0.4472,-0.2008,-0.5527,0.1058,0,-0.1708,0.1058, +0.5527,-0.1708,0.1058,-0.5527,0.4471,0.1058,0.3249,0.4471,0.1058,-0.3249,0.5527,-0.1058,0,0.1708,-0.1058,0.5527,0.1708,-0.1058,-0.5527,-0.4471,-0.1058,0.3249,-0.4471,-0.1058,-0.3249,0,1,0,0,-1,0],c=[0,9,8,2,7,9,4,5,7,3,6,5,1,8,6,0,8,23,30,6,8,3,21,6,11,26,21,13,23,26,2,9,24,30,8,9,1,23,8,13,25,23,14,24,25,4,7,22,30,9,7,0,24,9,14,27,24,12,22,27,3,5,20,30,7,5,2,22,7,12,29,22,10,20,29,1,6,21,30,5,6,4,20,5,10,28,20,11,21,28,10,19,18,12,17,19,14,15,17,13,16,15,11,18,16,31,19,17,14,17,27,2,27,22,4,22,29, +10,29,19,31,18,19,12,19,29,4,29,20,3,20,28,11,28,18,31,16,18,10,18,28,3,28,21,1,21,26,13,26,16,31,15,16,11,16,26,1,26,23,0,23,25,14,25,15,31,17,15,13,15,25,0,25,24,2,24,27,12,27,17],d=[],f=[],e=[],g=0,o=c.length;g<o;g+=3){var m=3*c[g],j=3*c[g+1],l=3*c[g+2],m=[b[m],b[m+1],b[m+2]],j=[b[j],b[j+1],b[j+2]],l=[b[l],b[l+1],b[l+2]],n=a.cross([l[0]-j[0],l[1]-j[1],l[2]-j[2]],[m[0]-j[0],m[1]-j[1],m[2]-j[2]],[]);a.normalize(n);d.push(m[0],m[1],m[2],j[0],j[1],j[2],l[0],l[1],l[2]);f.push(n[0],n[1],n[2],n[0],n[1], +n[2],n[0],n[1],n[2]);e.push(g,g+1,g+2)}this.storeData(d,f,e);return!0};b.Star.prototype=new b._Mesh})(ChemDoodle.structures.d3,Math,vec3); +(function(b,e,a,h,c,d,f){var q=function(a,b,f){var e=c.sqrt(b[1]*b[1]+b[2]*b[2]),h=[1,0,0,0,0,b[2]/e,-b[1]/e,0,0,b[1]/e,b[2]/e,0,0,0,0,1],q=[1,0,0,0,0,b[2]/e,b[1]/e,0,0,-b[1]/e,b[2]/e,0,0,0,0,1],r=[e,0,-b[0],0,0,1,0,0,b[0],0,e,0,0,0,0,1],b=[e,0,b[0],0,0,1,0,0,-b[0],0,e,0,0,0,0,1],f=[c.cos(f),-c.sin(f),0,0,c.sin(f),c.cos(f),0,0,0,0,1,0,0,0,0,1],k=d.multiply(h,d.multiply(r,d.multiply(f,d.multiply(b,q,[]))));this.rotate=function(){return d.multiplyVec3(k,a)}};h.Tube=function(g,h,m){var j=g[0].lineSegments[0].length; +this.partitions=[];var l;this.ends=[];this.ends.push(g[0].lineSegments[0][0]);this.ends.push(g[g.length-2].lineSegments[0][0]);for(var n=[1,0,0],r=0,k=g.length-1;r<k;r++){if(!l||65E3<l.positionData.length)0<this.partitions.length&&r--,l={count:0,positionData:[],normalData:[],indexData:[]},this.partitions.push(l);var v=g[r];l.count++;for(var x=Infinity,t=new a.Atom("",g[r+1].cp1.x,g[r+1].cp1.y,g[r+1].cp1.z),y=0;y<j;y++){var w=v.lineSegments[0][y],u;u=y===j-1?r===g.length-2?v.lineSegments[0][y-1]:g[r+ +1].lineSegments[0][0]:v.lineSegments[0][y+1];u=[u.x-w.x,u.y-w.y,u.z-w.z];f.normalize(u);r===g.length-2&&y===j-1&&f.scale(u,-1);var p=vec3.cross(u,n,[]);f.normalize(p);f.scale(p,h/2);p=new q(p,u,2*Math.PI/m);u=0;for(var A=m;u<A;u++){var B=p.rotate();u===c.floor(m/4)&&(n=[B[0],B[1],B[2]]);l.normalData.push(B[0],B[1],B[2]);l.positionData.push(w.x+B[0],w.y+B[1],w.z+B[2])}t&&(u=w.distance3D(t),u<x&&(x=u,g[r+1].pPoint=w))}}n=0;for(v=this.partitions.length;n<v;n++){l=this.partitions[n];r=0;for(k=l.count- +1;r<k;r++){x=r*j*m;y=0;for(t=j;y<t;y++){w=x+y*m;for(u=0;u<m;u++)p=w+u,l.indexData.push(p),l.indexData.push(p+m),l.indexData.push(p+m+1),l.indexData.push(p),l.indexData.push(p+1),l.indexData.push(p+m+1)}}}this.storeData(this.partitions[0].positionData,this.partitions[0].normalData,this.partitions[0].indexData);m=[new a.Point(2,0)];for(r=0;60>r;r++)j=r/60*c.PI,m.push(new a.Point(2*c.cos(j),-2*c.sin(j)));m.push(new a.Point(-2,0),new a.Point(-2,4),new a.Point(2,4));var D=new a.d3.Shape(m,1);this.render= +function(j,l){this.bindBuffers(j);j.material.setDiffuseColor(l.macro_colorByChain?this.chainColor:l.nucleics_tubeColor);j.drawElements(j.TRIANGLES,this.vertexIndexBuffer.numItems,j.UNSIGNED_SHORT,0);if(this.partitions)for(var q=1,m=this.partitions.length;q<m;q++){var k=this.partitions[q],n=j,v=k;n.bindBuffer(n.ARRAY_BUFFER,v.vertexPositionBuffer);n.vertexAttribPointer(n.shader.vertexPositionAttribute,v.vertexPositionBuffer.itemSize,n.FLOAT,!1,0,0);n.bindBuffer(n.ARRAY_BUFFER,v.vertexNormalBuffer); +n.vertexAttribPointer(n.shader.vertexNormalAttribute,v.vertexNormalBuffer.itemSize,n.FLOAT,!1,0,0);n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,v.vertexIndexBuffer);j.drawElements(j.TRIANGLES,k.vertexIndexBuffer.numItems,j.UNSIGNED_SHORT,0)}j.sphereBuffer.bindBuffers(j);for(q=0;2>q;q++)k=this.ends[q],k=d.translate(j.modelViewMatrix,[k.x,k.y,k.z],[]),m=h/2,d.scale(k,[m,m,m]),j.setMatrixUniforms(k),j.drawElements(j.TRIANGLES,j.sphereBuffer.vertexIndexBuffer.numItems,j.UNSIGNED_SHORT,0);j.cylinderBuffer.bindBuffers(j); +q=1;for(m=g.length-1;q<m;q++){var v=g[q],r=v.pPoint,p=new a.Atom("",v.cp2.x,v.cp2.y,v.cp2.z),k=1.001*r.distance3D(p),v=[h/4,k,h/4],k=d.translate(j.modelViewMatrix,[r.x,r.y,r.z],[]),t=[0,1,0],u=0,n=[p.x-r.x,p.y-r.y,p.z-r.z];r.x===p.x&&r.z===p.z?(t=[0,0,1],r.y<r.y&&(u=c.PI)):(u=b.vec3AngleFrom(t,n),t=f.cross(t,n,[]));0!==u&&d.rotate(k,u,t);d.scale(k,v);j.setMatrixUniforms(k);j.drawArrays(j.TRIANGLE_STRIP,0,j.cylinderBuffer.vertexPositionBuffer.numItems)}D.bindBuffers(j);!l.nucleics_useShapelyColors&& +!l.macro_colorByChain&&j.material.setDiffuseColor(l.nucleics_baseColor);q=1;for(m=g.length-1;q<m;q++)v=g[q],p=v.cp2,k=d.translate(j.modelViewMatrix,[p.x,p.y,p.z],[]),t=[0,1,0],u=0,r=v.cp3,n=[r.x-p.x,r.y-p.y,r.z-p.z],p.x===r.x&&p.z===r.z?(t=[0,0,1],p.y<p.y&&(u=c.PI)):(u=b.vec3AngleFrom(t,n),t=f.cross(t,n,[])),0!==u&&d.rotate(k,u,t),p=[1,0,0],u=d.rotate(d.identity([]),u,t),d.multiplyVec3(u,p),u=v.cp4,r=v.cp5,u.y===r.y&&u.z===r.z||(u=[r.x-u.x,r.y-u.y,r.z-u.z],r=b.vec3AngleFrom(p,u),0>f.dot(n,f.cross(p, +u))&&(r*=-1),d.rotateY(k,r)),l.nucleics_useShapelyColors&&!l.macro_colorByChain&&(e[v.name]?j.material.setDiffuseColor(e[v.name].shapelyColor):j.material.setDiffuseColor(e["*"].shapelyColor)),j.setMatrixUniforms(k),j.drawElements(j.TRIANGLES,D.vertexIndexBuffer.numItems,j.UNSIGNED_SHORT,0)};return!0};h.Tube.prototype=new h._Mesh})(ChemDoodle.extensions,ChemDoodle.RESIDUE,ChemDoodle.structures,ChemDoodle.structures.d3,Math,mat4,vec3); +(function(b){b.UnitCell=function(b){var a=[],h=[],c=function(b,c,d,e){a.push(b[0],b[1],b[2]);a.push(c[0],c[1],c[2]);a.push(d[0],d[1],d[2]);a.push(e[0],e[1],e[2]);for(b=0;4>b;b++)h.push(0,0,0)};c(b.o,b.x,b.xy,b.y);c(b.o,b.y,b.yz,b.z);c(b.o,b.z,b.xz,b.x);c(b.yz,b.y,b.xy,b.xyz);c(b.xyz,b.xz,b.z,b.yz);c(b.xy,b.x,b.xz,b.xyz);b=[];for(c=0;6>c;c++){var d=4*c;b.push(d,d+1,d+1,d+2,d+2,d+3,d+3,d)}this.storeData(a,h,b);return!0};b.UnitCell.prototype=new b._Mesh})(ChemDoodle.structures.d3,vec3); +(function(b,e,a){b.Plate=function(b){this.lanes=Array(b);i=0;for(ii=b;i<ii;i++)this.lanes[i]=[];this.sort=function(){i=0;for(ii=this.lanes.length;i<ii;i++)this.lanes[i].sort(function(a,b){return a-b})};this.draw=function(b){var d=b.canvas.width,f=b.canvas.height;this.origin=9*f/10;this.front=f/10;this.laneLength=this.origin-this.front;b.strokeStyle="#000000";b.beginPath();b.moveTo(0,this.front);e.contextHashTo(b,0,this.front,d,this.front,3,3);b.closePath();b.stroke();b.beginPath();b.moveTo(0,this.origin); +b.lineTo(d,this.origin);b.closePath();b.stroke();i=0;for(ii=this.lanes.length;i<ii;i++){f=(i+1)*d/(ii+1);b.beginPath();b.moveTo(f,this.origin);b.lineTo(f,this.origin+3);b.closePath();b.stroke();s=0;for(ss=this.lanes[i].length;s<ss;s++){var h=this.origin-this.laneLength*this.lanes[i][s].rf;switch(this.lanes[i][s].type){case "compact":b.beginPath();b.arc(f,h,3,0,2*a.PI,!1);b.closePath();break;case "expanded":b.beginPath();b.arc(f,h,7,0,2*a.PI,!1);b.closePath();break;case "widened":e.contextOval(b,f- +18,h-10,36,10);break;case "cresent":b.beginPath(),b.arc(f,h,9,0,a.PI,!0),b.closePath()}switch(this.lanes[i][s].style){case "solid":b.fillStyle="#000000";b.fill();break;case "transparent":b.stroke()}}}};return!0};b.Plate.Spot=function(a,b,d){this.type=a;this.rf=b;this.style=d?d:"solid"}})(ChemDoodle.structures,ChemDoodle.extensions,Math); +(function(b,e,a){b.default_backgroundColor="#FFFFFF";b.default_scale=1;b.default_rotateAngle=0;b.default_bondLength_2D=20;b.default_angstromsPerBondLength=1.25;b.default_lightDirection_3D=[-0.1,-0.1,-1];b.default_lightDiffuseColor_3D="#FFFFFF";b.default_lightSpecularColor_3D="#FFFFFF";b.default_projectionPerspective_3D=!0;b.default_projectionPerspectiveVerticalFieldOfView_3D=45;b.default_projectionOrthoWidth_3D=40;b.default_projectionWidthHeightRatio_3D=void 0;b.default_projectionFrontCulling_3D= +0.1;b.default_projectionBackCulling_3D=1E4;b.default_atoms_display=!0;b.default_atoms_color="#000000";b.default_atoms_font_size_2D=12;b.default_atoms_font_families_2D=["Helvetica","Arial","Dialog"];b.default_atoms_font_bold_2D=!1;b.default_atoms_font_italic_2D=!1;b.default_atoms_circles_2D=!1;b.default_atoms_circleDiameter_2D=10;b.default_atoms_circleBorderWidth_2D=1;b.default_atoms_lonePairDistance_2D=8;b.default_atoms_lonePairSpread_2D=4;b.default_atoms_lonePairDiameter_2D=1;b.default_atoms_useJMOLColors= +!1;b.default_atoms_usePYMOLColors=!1;b.default_atoms_resolution_3D=60;b.default_atoms_sphereDiameter_3D=0.8;b.default_atoms_useVDWDiameters_3D=!1;b.default_atoms_vdwMultiplier_3D=1;b.default_atoms_materialAmbientColor_3D="#000000";b.default_atoms_materialSpecularColor_3D="#555555";b.default_atoms_materialShininess_3D=32;b.default_atoms_implicitHydrogens_2D=!0;b.default_atoms_displayTerminalCarbonLabels_2D=!1;b.default_atoms_showHiddenCarbons_2D=!0;b.default_atoms_displayAllCarbonLabels_2D=!1;b.default_atoms_nonBondedAsStars_3D= +!1;b.default_bonds_display=!0;b.default_bonds_color="#000000";b.default_bonds_width_2D=1;b.default_bonds_saturationWidth_2D=0.2;b.default_bonds_ends_2D="round";b.default_bonds_useJMOLColors=!1;b.default_bonds_usePYMOLColors=!1;b.default_bonds_colorGradient=!1;b.default_bonds_saturationAngle_2D=a.PI/3;b.default_bonds_symmetrical_2D=!1;b.default_bonds_clearOverlaps_2D=!1;b.default_bonds_overlapClearWidth_2D=0.5;b.default_bonds_atomLabelBuffer_2D=1;b.default_bonds_wedgeThickness_2D=0.22;b.default_bonds_hashWidth_2D= +1;b.default_bonds_hashSpacing_2D=2.5;b.default_bonds_showBondOrders_3D=!1;b.default_bonds_resolution_3D=60;b.default_bonds_renderAsLines_3D=!1;b.default_bonds_cylinderDiameter_3D=0.3;b.default_bonds_materialAmbientColor_3D="#222222";b.default_bonds_materialSpecularColor_3D="#555555";b.default_bonds_materialShininess_3D=32;b.default_proteins_displayRibbon=!0;b.default_proteins_displayBackbone=!1;b.default_proteins_backboneThickness=1.5;b.default_proteins_backboneColor="#CCCCCC";b.default_proteins_ribbonCartoonize= +!1;b.default_proteins_useShapelyColors=!1;b.default_proteins_useAminoColors=!1;b.default_proteins_usePolarityColors=!1;b.default_proteins_primaryColor="#FF0D0D";b.default_proteins_secondaryColor="#FFFF30";b.default_proteins_ribbonCartoonHelixPrimaryColor="#00E740";b.default_proteins_ribbonCartoonHelixSecondaryColor="#9905FF";b.default_proteins_ribbonCartoonSheetColor="#E8BB99";b.default_proteins_ribbonThickness=0.2;b.default_proteins_verticalResolution=10;b.default_proteins_horizontalResolution=9; +b.default_proteins_materialAmbientColor_3D="#222222";b.default_proteins_materialSpecularColor_3D="#555555";b.default_proteins_materialShininess_3D=32;b.default_nucleics_display=!0;b.default_nucleics_tubeColor="#CCCCCC";b.default_nucleics_baseColor="#C10000";b.default_nucleics_useShapelyColors=!0;b.default_nucleics_tubeThickness=1.5;b.default_nucleics_tubeResolution_3D=60;b.default_nucleics_verticalResolution=10;b.default_nucleics_materialAmbientColor_3D="#222222";b.default_nucleics_materialSpecularColor_3D= +"#555555";b.default_nucleics_materialShininess_3D=32;b.default_macro_displayAtoms=!1;b.default_macro_displayBonds=!1;b.default_macro_atomToLigandDistance=-1;b.default_macro_showWater=!1;b.default_macro_colorByChain=!1;b.default_surfaces_display=!0;b.default_surfaces_style="Dot";b.default_surfaces_color="#E9B862";b.default_surfaces_materialAmbientColor_3D="#000000";b.default_surfaces_materialSpecularColor_3D="#000000";b.default_surfaces_materialShininess_3D=32;b.default_crystals_displayUnitCell=!0; +b.default_crystals_unitCellColor="green";b.default_crystals_unitCellLineWidth=1;b.default_plots_color="#000000";b.default_plots_width=1;b.default_plots_showIntegration=!1;b.default_plots_integrationColor="#c10000";b.default_plots_integrationLineWidth=1;b.default_plots_showGrid=!1;b.default_plots_gridColor="gray";b.default_plots_gridLineWidth=0.5;b.default_plots_showYAxis=!0;b.default_plots_flipXAxis=!1;b.default_text_font_size=12;b.default_text_font_families=["Helvetica","Arial","Dialog"];b.default_text_color= +"#000000";b.default_shapes_color="#000000";b.default_shapes_lineWidth_2D=1;b.default_shapes_arrowLength_2D=8;b.default_pusher_showElectron_2D=!0;e.VisualSpecifications=function(){this.backgroundColor=b.default_backgroundColor;this.scale=b.default_scale;this.rotateAngle=b.default_rotateAngle;this.bondLength=b.default_bondLength_2D;this.angstromsPerBondLength=b.default_angstromsPerBondLength;this.lightDirection_3D=b.default_lightDirection_3D;this.lightDiffuseColor_3D=b.default_lightDiffuseColor_3D; +this.lightSpecularColor_3D=b.default_lightSpecularColor_3D;this.projectionPerspective_3D=b.default_projectionPerspective_3D;this.projectionPerspectiveVerticalFieldOfView_3D=b.default_projectionPerspectiveVerticalFieldOfView_3D;this.projectionOrthoWidth_3D=b.default_projectionOrthoWidth_3D;this.projectionWidthHeightRatio_3D=b.default_projectionWidthHeightRatio_3D;this.projectionFrontCulling_3D=b.default_projectionFrontCulling_3D;this.projectionBackCulling_3D=b.default_projectionBackCulling_3D;this.atoms_display= +b.default_atoms_display;this.atoms_color=b.default_atoms_color;this.atoms_font_size_2D=b.default_atoms_font_size_2D;this.atoms_font_families_2D=[];for(var a=0,c=b.default_atoms_font_families_2D.length;a<c;a++)this.atoms_font_families_2D[a]=b.default_atoms_font_families_2D[a];this.atoms_font_bold_2D=b.default_atoms_font_bold_2D;this.atoms_font_italic_2D=b.default_atoms_font_italic_2D;this.atoms_circles_2D=b.default_atoms_circles_2D;this.atoms_circleDiameter_2D=b.default_atoms_circleDiameter_2D;this.atoms_circleBorderWidth_2D= +b.default_atoms_circleBorderWidth_2D;this.atoms_lonePairDistance_2D=b.default_atoms_lonePairDistance_2D;this.atoms_lonePairSpread_2D=b.default_atoms_lonePairSpread_2D;this.atoms_lonePairDiameter_2D=b.default_atoms_lonePairDiameter_2D;this.atoms_useJMOLColors=b.default_atoms_useJMOLColors;this.atoms_usePYMOLColors=b.default_atoms_usePYMOLColors;this.atoms_resolution_3D=b.default_atoms_resolution_3D;this.atoms_sphereDiameter_3D=b.default_atoms_sphereDiameter_3D;this.atoms_useVDWDiameters_3D=b.default_atoms_useVDWDiameters_3D; +this.atoms_vdwMultiplier_3D=b.default_atoms_vdwMultiplier_3D;this.atoms_materialAmbientColor_3D=b.default_atoms_materialAmbientColor_3D;this.atoms_materialSpecularColor_3D=b.default_atoms_materialSpecularColor_3D;this.atoms_materialShininess_3D=b.default_atoms_materialShininess_3D;this.atoms_implicitHydrogens_2D=b.default_atoms_implicitHydrogens_2D;this.atoms_displayTerminalCarbonLabels_2D=b.default_atoms_displayTerminalCarbonLabels_2D;this.atoms_showHiddenCarbons_2D=b.default_atoms_showHiddenCarbons_2D; +this.atoms_displayAllCarbonLabels_2D=b.default_atoms_displayAllCarbonLabels_2D;this.atoms_nonBondedAsStars_3D=b.default_atoms_nonBondedAsStars_3D;this.bonds_display=b.default_bonds_display;this.bonds_color=b.default_bonds_color;this.bonds_width_2D=b.default_bonds_width_2D;this.bonds_saturationWidth_2D=b.default_bonds_saturationWidth_2D;this.bonds_ends_2D=b.default_bonds_ends_2D;this.bonds_useJMOLColors=b.default_bonds_useJMOLColors;this.bonds_usePYMOLColors=b.default_bonds_usePYMOLColors;this.bonds_colorGradient= +b.default_bonds_colorGradient;this.bonds_saturationAngle_2D=b.default_bonds_saturationAngle_2D;this.bonds_symmetrical_2D=b.default_bonds_symmetrical_2D;this.bonds_clearOverlaps_2D=b.default_bonds_clearOverlaps_2D;this.bonds_overlapClearWidth_2D=b.default_bonds_overlapClearWidth_2D;this.bonds_atomLabelBuffer_2D=b.default_bonds_atomLabelBuffer_2D;this.bonds_wedgeThickness_2D=b.default_bonds_wedgeThickness_2D;this.bonds_hashWidth_2D=b.default_bonds_hashWidth_2D;this.bonds_hashSpacing_2D=b.default_bonds_hashSpacing_2D; +this.bonds_showBondOrders_3D=b.default_bonds_showBondOrders_3D;this.bonds_resolution_3D=b.default_bonds_resolution_3D;this.bonds_renderAsLines_3D=b.default_bonds_renderAsLines_3D;this.bonds_cylinderDiameter_3D=b.default_bonds_cylinderDiameter_3D;this.bonds_materialAmbientColor_3D=b.default_bonds_materialAmbientColor_3D;this.bonds_materialSpecularColor_3D=b.default_bonds_materialSpecularColor_3D;this.bonds_materialShininess_3D=b.default_bonds_materialShininess_3D;this.proteins_displayRibbon=b.default_proteins_displayRibbon; +this.proteins_displayBackbone=b.default_proteins_displayBackbone;this.proteins_backboneThickness=b.default_proteins_backboneThickness;this.proteins_backboneColor=b.default_proteins_backboneColor;this.proteins_ribbonCartoonize=b.default_proteins_ribbonCartoonize;this.proteins_useShapelyColors=b.default_proteins_useShapelyColors;this.proteins_useAminoColors=b.default_proteins_useAminoColors;this.proteins_usePolarityColors=b.default_proteins_usePolarityColors;this.proteins_primaryColor=b.default_proteins_primaryColor; +this.proteins_secondaryColor=b.default_proteins_secondaryColor;this.proteins_ribbonCartoonHelixPrimaryColor=b.default_proteins_ribbonCartoonHelixPrimaryColor;this.proteins_ribbonCartoonHelixSecondaryColor=b.default_proteins_ribbonCartoonHelixSecondaryColor;this.proteins_ribbonCartoonSheetColor=b.default_proteins_ribbonCartoonSheetColor;this.proteins_ribbonThickness=b.default_proteins_ribbonThickness;this.proteins_verticalResolution=b.default_proteins_verticalResolution;this.proteins_horizontalResolution= +b.default_proteins_horizontalResolution;this.proteins_materialAmbientColor_3D=b.default_proteins_materialAmbientColor_3D;this.proteins_materialSpecularColor_3D=b.default_proteins_materialSpecularColor_3D;this.proteins_materialShininess_3D=b.default_proteins_materialShininess_3D;this.macro_displayAtoms=b.default_macro_displayAtoms;this.macro_displayBonds=b.default_macro_displayBonds;this.macro_atomToLigandDistance=b.default_macro_atomToLigandDistance;this.nucleics_display=b.default_nucleics_display; +this.nucleics_tubeColor=b.default_nucleics_tubeColor;this.nucleics_baseColor=b.default_nucleics_baseColor;this.nucleics_useShapelyColors=b.default_nucleics_useShapelyColors;this.nucleics_tubeThickness=b.default_nucleics_tubeThickness;this.nucleics_tubeResolution_3D=b.default_nucleics_tubeResolution_3D;this.nucleics_verticalResolution=b.default_nucleics_verticalResolution;this.nucleics_materialAmbientColor_3D=b.default_nucleics_materialAmbientColor_3D;this.nucleics_materialSpecularColor_3D=b.default_nucleics_materialSpecularColor_3D; +this.nucleics_materialShininess_3D=b.default_nucleics_materialShininess_3D;this.macro_showWater=b.default_macro_showWater;this.macro_colorByChain=b.default_macro_colorByChain;this.surfaces_display=b.default_surfaces_display;this.surfaces_style=b.default_surfaces_style;this.surfaces_color=b.default_surfaces_color;this.surfaces_materialAmbientColor_3D=b.default_surfaces_materialAmbientColor_3D;this.surfaces_materialSpecularColor_3D=b.default_surfaces_materialSpecularColor_3D;this.surfaces_materialShininess_3D= +b.default_surfaces_materialShininess_3D;this.crystals_displayUnitCell=b.default_crystals_displayUnitCell;this.crystals_unitCellColor=b.default_crystals_unitCellColor;this.crystals_unitCellLineWidth=b.default_crystals_unitCellLineWidth;this.plots_color=b.default_plots_color;this.plots_width=b.default_plots_width;this.plots_showIntegration=b.default_plots_showIntegration;this.plots_integrationColor=b.default_plots_integrationColor;this.plots_integrationLineWidth=b.default_plots_integrationLineWidth; +this.plots_showGrid=b.default_plots_showGrid;this.plots_gridColor=b.default_plots_gridColor;this.plots_gridLineWidth=b.default_plots_gridLineWidth;this.plots_showYAxis=b.default_plots_showYAxis;this.plots_flipXAxis=b.default_plots_flipXAxis;this.text_font_size=b.default_text_font_size;this.text_font_families=[];a=0;for(c=b.default_text_font_families.length;a<c;a++)this.text_font_families[a]=b.default_text_font_families[a];this.text_color=b.default_text_color;this.shapes_color=b.default_shapes_color; +this.shapes_lineWidth_2D=b.default_shapes_lineWidth_2D;this.shapes_arrowLength_2D=b.default_shapes_arrowLength_2D;this.pusher_showElectron_2D=b.default_pusher_showElectron_2D;this.set3DRepresentation=function(a){this.bonds_display=this.atoms_display=!0;this.bonds_color="#777777";this.bonds_showBondOrders_3D=this.bonds_useJMOLColors=this.atoms_useJMOLColors=this.atoms_useVDWDiameters_3D=!0;this.bonds_renderAsLines_3D=!1;"Ball and Stick"===a?(this.atoms_vdwMultiplier_3D=0.3,this.bonds_useJMOLColors= +!1,this.bonds_cylinderDiameter_3D=0.3,this.bonds_materialAmbientColor_3D=b.default_atoms_materialAmbientColor_3D):"van der Waals Spheres"===a?(this.bonds_display=!1,this.atoms_vdwMultiplier_3D=1):"Stick"===a?(this.bonds_showBondOrders_3D=this.atoms_useVDWDiameters_3D=!1,this.bonds_cylinderDiameter_3D=this.atoms_sphereDiameter_3D=0.8,this.bonds_materialAmbientColor_3D=this.atoms_materialAmbientColor_3D):"Wireframe"===a?(this.atoms_useVDWDiameters_3D=!1,this.bonds_cylinderDiameter_3D=0.05,this.atoms_sphereDiameter_3D= +0.15,this.bonds_materialAmbientColor_3D=b.default_atoms_materialAmbientColor_3D):"Line"===a?(this.atoms_display=!1,this.bonds_renderAsLines_3D=!0,this.bonds_width_2D=1,this.bonds_cylinderDiameter_3D=0.05):alert('"'+a+'" is not recognized. Use one of the following strings:\n\n1. Ball and Stick\n2. van der Waals Spheres\n3. Stick\n4. Wireframe\n5. Line\n')};this.getFontString=function(a,b,c,g){var e=[];c&&e.push("bold ");g&&e.push("italic ");e.push(a+"px ");a=0;for(c=b.length;a<c;a++)g=b[a],-1!==g.indexOf(" ")&& +(g='"'+g+'"'),e.push((0!==a?",":"")+g);return e.join("")}}})(ChemDoodle,ChemDoodle.structures,Math); +(function(b,e,a,h){a.getPointsPerAngstrom=function(){return b.default_bondLength_2D/b.default_angstromsPerBondLength};a.BondDeducer=function(){this.margin=1.1;this.deduceCovalentBonds=function(b,d){var f=a.getPointsPerAngstrom();d&&(f=d);for(var q=0,g=b.atoms.length;q<g;q++)for(var o=q+1;o<g;o++){var m=b.atoms[q],j=b.atoms[o];m.distance3D(j)<(e[m.label].covalentRadius+e[j.label].covalentRadius)*f*this.margin&&b.bonds.push(new h.Bond(m,j,1))}};return!0}})(ChemDoodle,ChemDoodle.ELEMENT,ChemDoodle.informatics, +ChemDoodle.structures);(function(b){b.HydrogenDeducer=function(){this.removeHydrogens=function(b){for(var a=[],h=[],c=0,d=b.bonds.length;c<d;c++)"H"!==b.bonds[c].a1.label&&"H"!==b.bonds[c].a2.label&&h.push(b.bonds[c]);c=0;for(d=b.atoms.length;c<d;c++)"H"!==b.atoms[c].label&&a.push(b.atoms[c]);b.atoms=a;b.bonds=h};return!0}})(ChemDoodle.informatics); +(function(b,e,a){e.MolecularSurfaceGenerator=function(){this.generateSurface=function(b,c,d,f,e){return new a.MolecularSurface(b,c,d,f,e)};return!0}})(ChemDoodle,ChemDoodle.informatics,ChemDoodle.structures.d3); +(function(b,e){b.Splitter=function(){this.split=function(a){for(var b=[],c=0,d=a.atoms.length;c<d;c++)a.atoms[c].visited=!1;c=0;for(d=a.bonds.length;c<d;c++)a.bonds[c].visited=!1;c=0;for(d=a.atoms.length;c<d;c++){var f=a.atoms[c];if(!f.visited){var q=new e.Molecule;q.atoms.push(f);f.visited=!0;var g=new e.Queue;for(g.enqueue(f);!g.isEmpty();)for(var f=g.dequeue(),o=0,m=a.bonds.length;o<m;o++){var j=a.bonds[o];j.contains(f)&&!j.visited&&(j.visited=!0,q.bonds.push(j),j=j.getNeighbor(f),j.visited||(j.visited= +!0,q.atoms.push(j),g.enqueue(j)))}b.push(q)}}return b};return!0}})(ChemDoodle.informatics,ChemDoodle.structures); +(function(b,e){b.StructureBuilder=function(){this.copy=function(a){for(var b=0,c=a.atoms.length;b<c;b++)a.atoms[b].metaID=b;for(var d=new e.Molecule,b=0,c=a.atoms.length;b<c;b++)d.atoms[b]=new e.Atom(a.atoms[b].label,a.atoms[b].x,a.atoms[b].y,a.atoms[b].z);b=0;for(c=a.bonds.length;b<c;b++)d.bonds[b]=new e.Bond(d.atoms[a.bonds[b].a1.metaID],d.atoms[a.bonds[b].a2.metaID],a.bonds[b].bondOrder);return d};return!0}})(ChemDoodle.informatics,ChemDoodle.structures); +(function(b){b._Counter=function(){this.value=0;this.molecule=void 0;this.setMolecule=function(b){this.value=0;this.molecule=b;this.innerCalculate&&this.innerCalculate()};return!0}})(ChemDoodle.informatics);(function(b){b.FrerejacqueNumberCounter=function(b){this.setMolecule(b);return!0};b.FrerejacqueNumberCounter.prototype=new b._Counter;b.FrerejacqueNumberCounter.prototype.innerCalculate=function(){this.value=this.molecule.bonds.length-this.molecule.atoms.length+(new b.NumberOfMoleculesCounter(this.molecule)).value}})(ChemDoodle.informatics); +(function(b,e){e.NumberOfMoleculesCounter=function(a){this.setMolecule(a);return!0};e.NumberOfMoleculesCounter.prototype=new e._Counter;e.NumberOfMoleculesCounter.prototype.innerCalculate=function(){for(var a=0,e=this.molecule.atoms.length;a<e;a++)this.molecule.atoms[a].visited=!1;a=0;for(e=this.molecule.atoms.length;a<e;a++)if(!this.molecule.atoms[a].visited){this.value++;var c=new b.Queue;this.molecule.atoms[a].visited=!0;for(c.enqueue(this.molecule.atoms[a]);!c.isEmpty();)for(var d=c.dequeue(), +f=0,q=this.molecule.bonds.length;f<q;f++){var g=this.molecule.bonds[f];g.contains(d)&&(g=g.getNeighbor(d),g.visited||(g.visited=!0,c.enqueue(g)))}}}})(ChemDoodle.structures,ChemDoodle.informatics); +(function(b,e){b._RingFinder=function(){this.rings=this.bonds=this.atoms=void 0;this.reduce=function(a){for(var b=0,c=a.atoms.length;b<c;b++)a.atoms[b].visited=!1;b=0;for(c=a.bonds.length;b<c;b++)a.bonds[b].visited=!1;for(var d=!0;d;){d=!1;b=0;for(c=a.atoms.length;b<c;b++){for(var f=0,e,g=0,o=a.bonds.length;g<o;g++)if(a.bonds[g].contains(a.atoms[b])&&!a.bonds[g].visited){f++;if(2===f)break;e=a.bonds[g]}1===f&&(d=!0,e.visited=!0,a.atoms[b].visited=!0)}}b=0;for(c=a.atoms.length;b<c;b++)a.atoms[b].visited|| +this.atoms.push(a.atoms[b]);b=0;for(c=a.bonds.length;b<c;b++)a.bonds[b].visited||this.bonds.push(a.bonds[b]);0===this.bonds.length&&0!==this.atoms.length&&(this.atoms=[])};this.setMolecule=function(a){this.atoms=[];this.bonds=[];this.rings=[];this.reduce(a);2<this.atoms.length&&this.innerGetRings&&this.innerGetRings()};this.fuse=function(){for(var a=0,b=this.rings.length;a<b;a++)for(var c=0,d=this.bonds.length;c<d;c++)-1!==e(this.bonds[c].a1,this.rings[a].atoms)&&-1!==e(this.bonds[c].a2,this.rings[a].atoms)&& +this.rings[a].bonds.push(this.bonds[c])};return!0}})(ChemDoodle.informatics,jQuery.inArray); +(function(b,e,a){function h(b,d){this.atoms=[];if(d)for(var f=0,q=d.atoms.length;f<q;f++)this.atoms[f]=d.atoms[f];this.atoms.push(b);this.grow=function(b,c){for(var d=this.atoms[this.atoms.length-1],f=[],e=0,q=b.length;e<q;e++)if(b[e].contains(d)){var r=b[e].getNeighbor(d);-1===a(r,c)&&f.push(r)}d=[];e=0;for(q=f.length;e<q;e++)d.push(new h(f[e],this));return d};this.check=function(b,c,d){for(var f=0,h=c.atoms.length-1;f<h;f++)if(-1!==a(c.atoms[f],this.atoms))return;var q;if(c.atoms[c.atoms.length- +1]===this.atoms[this.atoms.length-1]){q=new e.Ring;q.atoms[0]=d;f=0;for(h=this.atoms.length;f<h;f++)q.atoms.push(this.atoms[f]);for(f=c.atoms.length-2;0<=f;f--)q.atoms.push(c.atoms[f])}else{for(var r=[],f=0,h=b.length;f<h;f++)b[f].contains(c.atoms[c.atoms.length-1])&&r.push(b[f]);f=0;for(h=r.length;f<h;f++)if((1===c.atoms.length||!r[f].contains(c.atoms[c.atoms.length-2]))&&r[f].contains(this.atoms[this.atoms.length-1])){q=new e.Ring;q.atoms[0]=d;b=0;for(d=this.atoms.length;b<d;b++)q.atoms.push(this.atoms[b]); +for(b=c.atoms.length-1;0<=b;b--)q.atoms.push(c.atoms[b]);break}}return q};return!0}b.EulerFacetRingFinder=function(a){this.fingerBreak=5;this.setMolecule(a);return!0};b.EulerFacetRingFinder.prototype=new b._RingFinder;b.EulerFacetRingFinder.prototype.innerGetRings=function(){for(var b=0,d=this.atoms.length;b<d;b++){for(var f=[],e=0,g=this.bonds.length;e<g;e++)this.bonds[e].contains(this.atoms[b])&&f.push(this.bonds[e].getNeighbor(this.atoms[b]));e=0;for(g=f.length;e<g;e++)for(var o=e+1;o<f.length;o++){var m= +[];m[0]=new h(f[e]);m[1]=new h(f[o]);var j=[];j[0]=this.atoms[b];for(var l=0,n=f.length;l<n;l++)l!==e&&l!==o&&j.push(f[l]);var r=[];for((l=m[0].check(this.bonds,m[1],this.atoms[b]))&&(r[0]=l);0===r.length&&0<m.length&&m[0].atoms.length<this.fingerBreak;){for(var k=[],l=0,n=m.length;l<n;l++)for(var v=m[l].grow(this.bonds,j),x=0,t=v.length;x<t;x++)k.push(v[x]);m=k;l=0;for(n=m.length;l<n;l++)for(x=l+1;x<n;x++)(t=m[l].check(this.bonds,m[x],this.atoms[b]))&&r.push(t);if(0===r.length){k=[];l=0;for(n=j.length;l< +n;l++){x=0;for(t=this.bonds.length;x<t;x++)this.bonds[x].contains(j[l])&&(f=this.bonds[x].getNeighbor(j[l]),-1===a(f,j)&&-1===a(f,k)&&k.push(f))}l=0;for(n=k.length;l<n;l++)j.push(k[l])}}if(0<r.length){m=void 0;l=0;for(n=r.length;l<n;l++)if(!m||m.atoms.length>r[l].atoms.length)m=r[l];r=!1;l=0;for(n=this.rings.length;l<n;l++){j=!0;x=0;for(t=m.atoms.length;x<t;x++)if(-1===a(m.atoms[x],this.rings[l].atoms)){j=!1;break}if(j){r=!0;break}}r||this.rings.push(m)}}}this.fuse()}})(ChemDoodle.informatics,ChemDoodle.structures, +jQuery.inArray); +(function(b){b.SSSRFinder=function(e){this.rings=[];if(0<e.atoms.length){var a=(new b.FrerejacqueNumberCounter(e)).value,h=(new b.EulerFacetRingFinder(e)).rings;h.sort(function(a,b){return a.atoms.length-b.atoms.length});for(var c=0,d=e.bonds.length;c<d;c++)e.bonds[c].visited=!1;c=0;for(d=h.length;c<d;c++){for(var e=!1,f=0,q=h[c].bonds.length;f<q;f++)if(!h[c].bonds[f].visited){e=!0;break}if(e){f=0;for(q=h[c].bonds.length;f<q;f++)h[c].bonds[f].visited=!0;this.rings.push(h[c])}if(this.rings.length===a)break}}return!0}})(ChemDoodle.informatics); +(function(b){b._Interpreter=function(){};b._Interpreter.prototype.fit=function(b,a,h){for(var c=b.length,d=[],f=0;f<a-c;f++)d.push(" ");return h?b+d.join(""):d.join("")+b}})(ChemDoodle.io); +(function(b,e,a,h,c,d,f,q){var g=/\s+/g,o=/\(|\)|\s+/g,m=/\'|\s+/g,j=/,|\'|\s+/g,l=/^\s+/,n=/[0-9]/g,r=/[0-9]|\+|\-/g,k=function(a){return 0!==a.length},v={P:[],A:[[0,0.5,0.5]],B:[[0.5,0,0.5]],C:[[0.5,0.5,0]],I:[[0.5,0.5,0.5]],R:[[2/3,1/3,1/3],[1/3,2/3,2/3]],S:[[1/3,1/3,2/3],[2/3,2/3,1/3]],T:[[1/3,2/3,1/3],[2/3,1/3,2/3]],F:[[0,0.5,0.5],[0.5,0,0.5],[0.5,0.5,0]]},x=function(a){var b=0,c=0,d=0,f=0,e=a.indexOf("x"),g=a.indexOf("y"),j=a.indexOf("z");-1!==e&&(c++,0<e&&"+"!==a.charAt(e-1)&&(c*=-1));-1!== +g&&(d++,0<g&&"+"!==a.charAt(g-1)&&(d*=-1));-1!==j&&(f++,0<j&&"+"!==a.charAt(j-1)&&(f*=-1));if(2<a.length){e="+";g=0;for(j=a.length;g<j;g++){var h=a.charAt(g);if(("-"===h||"/"===h)&&(g===a.length-1||a.charAt(g+1).match(n)))e=h;h.match(n)&&("+"===e?b+=parseInt(h):"-"===e?b-=parseInt(h):"/"===e&&(b/=parseInt(h)))}}return[b,c,d,f]};a.CIFInterpreter=function(){this.read=function(a,f,n,p){var f=f?f:1,n=n?n:1,p=p?p:1,t=new h.Molecule;if(!a)return t;for(var B=a.split("\n"),D=0,G=0,F=0,C=a=0,E=0,I="P",L,H, +K,z,N=!0;0<B.length;)if(N?z=B.shift():N=!0,0<z.length)if(e.stringStartsWith(z,"_cell_length_a"))D=parseFloat(z.split(o)[1]);else if(e.stringStartsWith(z,"_cell_length_b"))G=parseFloat(z.split(o)[1]);else if(e.stringStartsWith(z,"_cell_length_c"))F=parseFloat(z.split(o)[1]);else if(e.stringStartsWith(z,"_cell_angle_alpha"))a=c.PI*parseFloat(z.split(o)[1])/180;else if(e.stringStartsWith(z,"_cell_angle_beta"))C=c.PI*parseFloat(z.split(o)[1])/180;else if(e.stringStartsWith(z,"_cell_angle_gamma"))E=c.PI* +parseFloat(z.split(o)[1])/180;else if(e.stringStartsWith(z,"_symmetry_space_group_name_H-M"))I=z.split(m)[1];else if(e.stringStartsWith(z,"loop_")){for(var J={fields:[],lines:[]},P=!1;void 0!==(z=B.shift())&&!e.stringStartsWith(z=z.replace(l,""),"loop_")&&0<z.length;)if(e.stringStartsWith(z,"_")){if(P)break;J.fields=J.fields.concat(z.split(g).filter(k))}else P=!0,J.lines.push(z);if(0!==B.length&&(e.stringStartsWith(z,"loop_")||e.stringStartsWith(z,"_")))N=!1;-1!==q("_symmetry_equiv_pos_as_xyz",J.fields)|| +-1!==q("_space_group_symop_operation_xyz",J.fields)?L=J:-1!==q("_atom_site_label",J.fields)?H=J:-1!==q("_geom_bond_atom_site_label_1",J.fields)&&(K=J)}z=D;a=(c.cos(a)-c.cos(E)*c.cos(C))/c.sin(E);a=[z,0,0,0,G*c.cos(E),G*c.sin(E),0,0,F*c.cos(C),F*a,F*c.sqrt(1-c.pow(c.cos(C),2)-a*a),0,0,0,0,1];if(H){J=N=D=B=F=-1;E=0;for(C=H.fields.length;E<C;E++)z=H.fields[E],"_atom_site_type_symbol"===z?F=E:"_atom_site_label"===z?B=E:"_atom_site_fract_x"===z?D=E:"_atom_site_fract_y"===z?N=E:"_atom_site_fract_z"===z&& +(J=E);E=0;for(C=H.lines.length;E<C;E++)z=H.lines[E],G=z.split(g).filter(k),z=new h.Atom(G[-1===F?B:F].split(r)[0],parseFloat(G[D]),parseFloat(G[N]),parseFloat(G[J])),t.atoms.push(z),-1!==B&&(z.cifId=G[B],z.cifPart=0)}if(L&&!K){E=G=0;for(C=L.fields.length;E<C;E++)if(z=L.fields[E],"_symmetry_equiv_pos_as_xyz"===z||"_space_group_symop_operation_xyz"===z)G=E;N=v[I];B=[];E=0;for(C=L.lines.length;E<C;E++){z=L.lines[E].split(j).filter(k);for(var J=x(z[G]),P=x(z[G+1]),M=x(z[G+2]),I=0,D=t.atoms.length;I<D;I++){z= +t.atoms[I];var Q=z.x*J[1]+z.y*J[2]+z.z*J[3]+J[0],S=z.x*P[1]+z.y*P[2]+z.z*P[3]+P[0],R=z.x*M[1]+z.y*M[2]+z.z*M[3]+M[0];H=new h.Atom(z.label,Q,S,R);B.push(H);void 0!==z.cifId&&(H.cifId=z.cifId,H.cifPart=E+1);if(N){H=0;for(F=N.length;H<F;H++){var O=N[H],O=new h.Atom(z.label,Q+O[0],S+O[1],R+O[2]);B.push(O);void 0!==z.cifId&&(O.cifId=z.cifId,O.cifPart=E+1)}}}}E=0;for(C=B.length;E<C;E++){for(z=B[E];1<=z.x;)z.x--;for(;0>z.x;)z.x++;for(;1<=z.y;)z.y--;for(;0>z.y;)z.y++;for(;1<=z.z;)z.z--;for(;0>z.z;)z.z++}H= +[];E=0;for(C=B.length;E<C;E++){F=!1;z=B[E];I=0;for(D=t.atoms.length;I<D;I++)if(1.0E-4>t.atoms[I].distance3D(z)){F=!0;break}if(!F){I=0;for(D=H.length;I<D;I++)if(1.0E-4>H[I].distance3D(z)){F=!0;break}F||H.push(z)}}t.atoms=t.atoms.concat(H)}C=[];for(E=0;E<f;E++)for(I=0;I<n;I++)for(H=0;H<p;H++)if(!(0===E&&0===I&&0===H)){F=0;for(G=t.atoms.length;F<G;F++)z=t.atoms[F],B=new h.Atom(z.label,z.x+E,z.y+I,z.z+H),C.push(B),void 0!==z.cifId&&(B.cifId=z.cifId,B.cifPart=z.cifPart+(L?L.lines.length:0)+E+10*I+100* +H)}t.atoms=t.atoms.concat(C);E=0;for(C=t.atoms.length;E<C;E++)z=t.atoms[E],L=d.multiplyVec3(a,[z.x,z.y,z.z]),z.x=L[0],z.y=L[1],z.z=L[2];if(K){B=L=-1;E=0;for(C=K.fields.length;E<C;E++)z=K.fields[E],"_geom_bond_atom_site_label_1"===z?L=E:"_geom_bond_atom_site_label_2"===z&&(B=E);H=0;for(F=K.lines.length;H<F;H++){G=K.lines[H].split(g).filter(k);z=G[L];G=G[B];E=0;for(C=t.atoms.length;E<C;E++)for(I=E+1;I<C;I++){D=t.atoms[E];N=t.atoms[I];if(D.cifPart!==N.cifPart)break;(D.cifId===z&&N.cifId===G||D.cifId=== +G&&N.cifId===z)&&t.bonds.push(new h.Bond(D,N))}}}else(new b.informatics.BondDeducer).deduceCovalentBonds(t,1);f=[-f/2,-n/2,-p/2];t.unitCellVectors={o:d.multiplyVec3(a,f,[]),x:d.multiplyVec3(a,[f[0]+1,f[1],f[2]]),y:d.multiplyVec3(a,[f[0],f[1]+1,f[2]]),z:d.multiplyVec3(a,[f[0],f[1],f[2]+1]),xy:d.multiplyVec3(a,[f[0]+1,f[1]+1,f[2]]),xz:d.multiplyVec3(a,[f[0]+1,f[1],f[2]+1]),yz:d.multiplyVec3(a,[f[0],f[1]+1,f[2]+1]),xyz:d.multiplyVec3(a,[f[0]+1,f[1]+1,f[2]+1])};return t}};a.CIFInterpreter.prototype=new a._Interpreter; +var t=new a.CIFInterpreter;b.readCIF=function(a,b,c,d){return t.read(a,b,c,d)}})(ChemDoodle,ChemDoodle.extensions,ChemDoodle.io,ChemDoodle.structures,Math,mat4,vec3,jQuery.inArray); +(function(b,e,a,h,c){a.MOLInterpreter=function(){this.read=function(a,c){c||(c=b.default_bondLength_2D);var d=new h.Molecule;if(!a)return d;for(var o=a.split("\n"),m=o[3],j=parseInt(m.substring(0,3)),m=parseInt(m.substring(3,6)),l=0;l<j;l++){var n=o[4+l];d.atoms[l]=new h.Atom(n.substring(31,34),parseFloat(n.substring(0,10))*c,(1===c?1:-1)*parseFloat(n.substring(10,20))*c,parseFloat(n.substring(20,30))*c);var r=parseInt(n.substring(34,36));0!==r&&e[d.atoms[l].label]&&(d.atoms[l].mass=e[d.atoms[l].label].mass+ +r);switch(parseInt(n.substring(36,39))){case 1:d.atoms[l].charge=3;break;case 2:d.atoms[l].charge=2;break;case 3:d.atoms[l].charge=1;break;case 5:d.atoms[l].charge=-1;break;case 6:d.atoms[l].charge=-2;break;case 7:d.atoms[l].charge=-3}}for(l=0;l<m;l++){var n=o[4+j+l],k=parseInt(n.substring(6,9)),r=parseInt(n.substring(9,12));if(3<k)switch(k){case 4:k=1.5;break;default:k=1}n=new h.Bond(d.atoms[parseInt(n.substring(0,3))-1],d.atoms[parseInt(n.substring(3,6))-1],k);switch(r){case 3:n.stereo=h.Bond.STEREO_AMBIGUOUS; +break;case 1:n.stereo=h.Bond.STEREO_PROTRUDING;break;case 6:n.stereo=h.Bond.STEREO_RECESSED}d.bonds[l]=n}return d};this.write=function(a){var d=[];d.push("Molecule from ChemDoodle Web Components\n\nhttp://www.ichemlabs.com\n");d.push(this.fit(a.atoms.length.toString(),3));d.push(this.fit(a.bonds.length.toString(),3));d.push(" 0 0 0 0 999 v2000\n");for(var g=a.getCenter(),o=0,m=a.atoms.length;o<m;o++){var j=a.atoms[o],l=" 0";if(-1!==j.mass&&e[j.label]){var n=j.mass-e[j.label].mass;5> +n&&-4<n&&(l=(-1<n?" ":"")+n)}n=" 0";if(0!==j.charge)switch(j.charge){case 3:n=" 1";break;case 2:n=" 2";break;case 1:n=" 3";break;case -1:n=" 5";break;case -2:n=" 6";break;case -3:n=" 7"}d.push(this.fit(((j.x-g.x)/b.default_bondLength_2D).toFixed(4),10));d.push(this.fit((-(j.y-g.y)/b.default_bondLength_2D).toFixed(4),10));d.push(this.fit((j.z/b.default_bondLength_2D).toFixed(4),10));d.push(" ");d.push(this.fit(j.label,3,!0));d.push(l);d.push(n);d.push(" 0 0 0 0\n")}o=0;for(m=a.bonds.length;o< +m;o++)g=a.bonds[o],j=0,g.stereo===h.Bond.STEREO_AMBIGUOUS?j=3:g.stereo===h.Bond.STEREO_PROTRUDING?j=1:g.stereo===h.Bond.STEREO_RECESSED&&(j=6),d.push(this.fit((c(g.a1,a.atoms)+1).toString(),3)),d.push(this.fit((c(g.a2,a.atoms)+1).toString(),3)),d.push(this.fit(g.bondOrder.toString(),3)),d.push(" "),d.push(j),d.push(" 0 0\n");d.push("M END");return d.join("")}};a.MOLInterpreter.prototype=new a._Interpreter;var d=new a.MOLInterpreter;b.readMOL=function(a,b){return d.read(a,b)};b.writeMOL=function(a){return d.write(a)}})(ChemDoodle, +ChemDoodle.ELEMENT,ChemDoodle.io,ChemDoodle.structures,jQuery.inArray); +(function(b,e,a,h,c,d,f){a.PDBInterpreter=function(){function a(b,c,d,f,e){for(var g=0,h=c.length;g<h;g++){var q=c[g];if(q.id===d&&f>=q.start&&f<=q.end){e?b.helix=!0:b.sheet=!0;f+1===q.end&&(b.arrow=!0);break}}}this.deduceResidueBonds=this.calculateRibbonDistances=!1;this.read=function(q,m){var j=new h.Molecule;j.chains=[];if(!q)return j;var l=q.split("\n");m||(m=1);for(var n=[],r=[],k,v=[],x=[],t=[],y=0,w=l.length;y<w;y++){var u=l[y];if(e.stringStartsWith(u,"HELIX"))n.push({id:u.substring(19,20), +start:parseInt(u.substring(21,25)),end:parseInt(u.substring(33,37))});else if(e.stringStartsWith(u,"SHEET"))r.push({id:u.substring(21,22),start:parseInt(u.substring(22,26)),end:parseInt(u.substring(33,37))});else if(e.stringStartsWith(u,"ATOM")){var p=u.substring(16,17);if(" "===p||"A"===p){p=d(u.substring(76,78));if(0===p.length){var A=d(u.substring(12,14));"HD"===A?p="H":0<A.length&&(p=1<A.length?A.charAt(0)+A.substring(1).toLowerCase():A)}A=new h.Atom(p,parseFloat(u.substring(30,38))*m,parseFloat(u.substring(38, +46))*m,parseFloat(u.substring(46,54))*m);A.hetatm=!1;x.push(A);var B=parseInt(u.substring(22,26));if(0===v.length)for(p=0;2>p;p++){var D=new h.Residue(-1);D.cp1=A;D.cp2=A;v.push(D)}B!==Number.NaN&&v[v.length-1].resSeq!==B&&(p=new h.Residue(B),p.name=d(u.substring(17,20)),3===p.name.length?p.name=p.name.substring(0,1)+p.name.substring(1).toLowerCase():2===p.name.length&&"D"===p.name.charAt(0)&&(p.name=p.name.substring(1)),v.push(p),D=u.substring(21,22),a(p,n,D,B,!0),a(p,r,D,B,!1));u=d(u.substring(12, +16));p=v[v.length-1];if("CA"===u||"P"===u||"O5'"===u)p.cp1||(p.cp1=A);else if("N3"===u&&("C"===p.name||"U"===p.name||"T"===p.name)||"N1"===u&&("A"===p.name||"G"===p.name))p.cp3=A;else if("C2"===u)p.cp4=A;else if("C4"===u&&("C"===p.name||"U"===p.name||"T"===p.name)||"C6"===u&&("A"===p.name||"G"===p.name))p.cp5=A;else if("O"===u||"C6"===u&&("C"===p.name||"U"===p.name||"T"===p.name)||"N9"===u){if(!v[v.length-1].cp2){if("C6"===u||"N9"===u)k=A;p.cp2=A}}else"C"===u&&(k=A)}}else if(e.stringStartsWith(u, +"HETATM"))p=d(u.substring(76,78)),0===p.length&&(p=d(u.substring(12,16))),1<p.length&&(p=p.substring(0,1)+p.substring(1).toLowerCase()),p=new h.Atom(p,parseFloat(u.substring(30,38))*m,parseFloat(u.substring(38,46))*m,parseFloat(u.substring(46,54))*m),p.hetatm=!0,"HOH"===d(u.substring(17,20))&&(p.isWater=!0),j.atoms.push(p),t[parseInt(d(u.substring(6,11)))]=p;else if(e.stringStartsWith(u,"CONECT")){if(p=parseInt(d(u.substring(6,11))),t[p]){A=t[p];for(B=0;4>B;B++)if(p=d(u.substring(11+5*B,16+5*B)), +0!==p.length&&(p=parseInt(p),t[p])){for(var D=t[p],G=!1,p=0,F=j.bonds.length;p<F;p++){var C=j.bonds[p];if(C.a1===A&&C.a2===D||C.a1===D&&C.a2===A){G=!0;break}}G||j.bonds.push(new h.Bond(A,D))}}}else if(e.stringStartsWith(u,"TER"))this.endChain(j,v,k,x),v=[];else if(e.stringStartsWith(u,"ENDMDL"))break}this.endChain(j,v,k,x);0===j.bonds.size&&(new b.informatics.BondDeducer).deduceCovalentBonds(j,m);if(this.deduceResidueBonds){y=0;for(w=x.length;y<w;y++){l=f.min(w,y+20);for(p=y+1;p<l;p++)n=x[y],r=x[p], +n.distance3D(r)<1.1*(c[n.label].covalentRadius+c[r.label].covalentRadius)&&j.bonds.push(new h.Bond(n,r,1))}}j.atoms=j.atoms.concat(x);this.calculateRibbonDistances&&this.calculateDistances(j,x);return j};this.endChain=function(a,b,c,d){if(0<b.length){var f=b[b.length-1];f.cp1||(f.cp1=d[d.length-2]);f.cp2||(f.cp2=d[d.length-1]);for(d=0;4>d;d++)f=new h.Residue(-1),f.cp1=c,f.cp2=b[b.length-1].cp2,b.push(f);a.chains.push(b)}};this.calculateDistances=function(a,b){for(var c=[],d=0,f=a.atoms.length;d<f;d++){var e= +a.atoms[d];e.hetatm&&(e.isWater||c.push(e))}d=0;for(f=b.length;d<f;d++)if(e=b[d],e.closestDistance=Number.POSITIVE_INFINITY,0===c.length)e.closestDistance=0;else for(var g=0,h=c.length;g<h;g++)e.closestDistance=Math.min(e.closestDistance,e.distance3D(c[g]))}};a.PDBInterpreter.prototype=new a._Interpreter;var q=new a.PDBInterpreter;b.readPDB=function(a,b){return q.read(a,b)}})(ChemDoodle,ChemDoodle.extensions,ChemDoodle.io,ChemDoodle.structures,ChemDoodle.ELEMENT,jQuery.trim,Math); +(function(b,e,a,h,c,d){var f={"@":0,A:1,B:2,C:3,D:4,E:5,F:6,G:7,H:8,I:9,a:-1,b:-2,c:-3,d:-4,e:-5,f:-6,g:-7,h:-8,i:-9},q={"%":0,J:1,K:2,L:3,M:4,N:5,O:6,P:7,Q:8,R:9,j:-1,k:-2,l:-3,m:-4,n:-5,o:-6,p:-7,q:-8,r:-9},g={S:1,T:2,U:3,V:4,W:5,X:6,Y:7,Z:8,s:9};a.JCAMPInterpreter=function(){this.convertHZ2PPM=!1;this.read=function(a){this.isBreak=function(a){return void 0!==f[a]||void 0!==q[a]||void 0!==g[a]||" "===a||"-"===a||"+"===a};this.getValue=function(a,b){var c=a.charAt(0),d=a.substring(1);return void 0!== +f[c]?parseFloat(f[c]+d):void 0!==q[c]?parseFloat(q[c]+d)+b:parseFloat(d)};var b=new h.Spectrum;if(void 0===a||0===a.length)return b;for(var a=a.split("\n"),l=[],n,o,k,v,x=1,t=1,y=1,w=-1,u=-1,p=-1,A=!0,B=!1,D=0,G=a.length;D<G;D++){var F=d(a[D]),C=c.inArray("$$",F);-1!==C&&(F=F.substring(0,C));if(0===l.length||!e.stringStartsWith(a[D],"##"))0!==l.length&&l.push("\n"),l.push(d(F));else if(C=l.join(""),A&&100>C.length&&b.metadata.push(C),l=[F],e.stringStartsWith(C,"##TITLE="))b.title=d(C.substring(8)); +else if(e.stringStartsWith(C,"##XUNITS="))b.xUnit=d(C.substring(9)),this.convertHZ2PPM&&"HZ"===b.xUnit.toUpperCase()&&(b.xUnit="PPM",B=!0);else if(e.stringStartsWith(C,"##YUNITS="))b.yUnit=d(C.substring(9));else if(!e.stringStartsWith(C,"##XYPAIRS="))if(e.stringStartsWith(C,"##FIRSTX="))o=parseFloat(d(C.substring(9)));else if(e.stringStartsWith(C,"##LASTX="))n=parseFloat(d(C.substring(8)));else if(e.stringStartsWith(C,"##FIRSTY="))k=parseFloat(d(C.substring(9)));else if(e.stringStartsWith(C,"##NPOINTS="))v= +parseFloat(d(C.substring(10)));else if(e.stringStartsWith(C,"##XFACTOR="))x=parseFloat(d(C.substring(10)));else if(e.stringStartsWith(C,"##YFACTOR="))t=parseFloat(d(C.substring(10)));else if(e.stringStartsWith(C,"##DELTAX="))w=parseFloat(d(C.substring(9)));else if(e.stringStartsWith(C,"##.OBSERVE FREQUENCY="))this.convertHZ2PPM&&(y=parseFloat(d(C.substring(21))));else if(e.stringStartsWith(C,"##.SHIFT REFERENCE="))this.convertHZ2PPM&&(p=C.substring(19).split(","),u=parseInt(d(p[2])),p=parseFloat(d(p[3]))); +else if(e.stringStartsWith(C,"##XYDATA=")){B||(y=1);var F=A=!1,C=C.split("\n"),E=(n-o)/(v-1);if(-1!==w)for(var I=1,L=C.length;I<L;I++)if("|"===C[I].charAt(0)){E=w;break}for(var H=o-E,K=k,z=0,N,I=1,L=C.length;I<L;I++){for(var J=[],H=d(C[I]),l=[],P=!1,M=0,Q=H.length;M<Q;M++)this.isBreak(H.charAt(M))?(0<l.length&&!(1===l.length&&" "===l[0])&&J.push(l.join("")),l=[H.charAt(M)]):"|"===H.charAt(M)?P=!0:l.push(H.charAt(M));J.push(l.join(""));H=parseFloat(J[0])*x-E;M=1;for(Q=J.length;M<Q;M++)if(K=J[M],void 0!== +g[K.charAt(0)])for(var S=parseInt(g[K.charAt(0)]+K.substring(1))-1,R=0;R<S;R++)H+=E,z=this.getValue(N,z),K=z*t,O++,b.data[b.data.length-1]=new h.Point(H/y,K);else void 0!==f[K.charAt(0)]&&F?(K=this.getValue(K,z)*t,P&&(H+=E,b.data.push(new h.Point(H/y,K)))):(F=void 0!==q[K.charAt(0)],N=K,H+=E,z=this.getValue(K,z),K=z*t,O++,b.data.push(new h.Point(H/y,K)))}if(-1!==u){F=p-b.data[u-1].x;D=0;for(G=b.data.length;D<G;D++)b.data[D].x+=F}}else if(e.stringStartsWith(C,"##PEAK TABLE=")){A=!1;b.continuous=!1; +for(var C=C.split("\n"),O=0,I=1,L=C.length;I<L;I++){F=C[I].split(/[\s,]+/);O+=F.length/2;M=0;for(Q=F.length;M+1<Q;M+=2)b.data.push(new h.Point(parseFloat(d(F[M])),parseFloat(d(F[M+1]))))}}}b.setup();return b}};a.JCAMPInterpreter.prototype=new a._Interpreter;var o=new a.JCAMPInterpreter;o.convertHZ2PPM=!0;b.readJCAMP=function(a){return o.read(a)}})(ChemDoodle,ChemDoodle.extensions,ChemDoodle.io,ChemDoodle.structures,jQuery,jQuery.trim); +(function(b,e,a,h){b.JSONInterpreter=function(){this.contentTo=function(a,b){for(var f=0,e=0,g=0,h=a.length;g<h;g++){for(var m=a[g],j=0,l=m.atoms.length;j<l;j++)m.atoms[j].tmpid="a"+f++;j=0;for(l=m.bonds.length;j<l;j++)m.bonds[j].tmpid="b"+e++}g=f=0;for(h=b.length;g<h;g++)b[g].tmpid="s"+f++;f={};if(a&&0<a.length){f.m=[];g=0;for(h=a.length;g<h;g++)f.m.push(this.molTo(a[g]))}if(b&&0<b.length){f.s=[];g=0;for(h=b.length;g<h;g++)f.s.push(this.shapeTo(b[g]))}g=0;for(h=a.length;g<h;g++){m=a[g];j=0;for(l= +m.atoms.length;j<l;j++)m.atoms[j].tmpid=void 0;j=0;for(l=m.bonds.length;j<l;j++)m.bonds[j].tmpid=void 0}g=0;for(h=b.length;g<h;g++)b[g].tmpid=void 0;return f};this.contentFrom=function(a){var b={molecules:[],shapes:[]};if(a.m)for(var f=0,e=a.m.length;f<e;f++)b.molecules.push(this.molFrom(a.m[f]));if(a.s){f=0;for(e=a.s.length;f<e;f++)b.shapes.push(this.shapeFrom(a.s[f],b.molecules))}f=0;for(e=b.molecules.length;f<e;f++){for(var a=b.molecules[f],g=0,h=a.atoms.length;g<h;g++)a.atoms[g].tmpid=void 0; +g=0;for(h=a.bonds.length;g<h;g++)a.bonds[g].tmpid=void 0}f=0;for(e=b.shapes.length;f<e;f++)b.shapes[f].tmpid=void 0;return b};this.molTo=function(a){for(var b={a:[],b:[]},f=0,q=a.atoms.length;f<q;f++){var g=a.atoms[f],o={x:g.x,y:g.y};g.tmpid&&(o.i=g.tmpid);"C"!==g.label&&(o.l=g.label);0!==g.z&&(o.z=g.z);0!==g.charge&&(o.c=g.charge);-1!==g.mass&&(o.m=g.mass);0!==g.numRadical&&(o.r=g.numRadical);0!==g.numLonePair&&(o.p=g.numLonePair);g.any&&(o.q=!0);-1!==g.rgroup&&(o.rg=g.rgroup);b.a.push(o)}f=0;for(q= +a.bonds.length;f<q;f++)g=a.bonds[f],o={b:h(g.a1,a.atoms),e:h(g.a2,a.atoms)},g.tmpid&&(o.i=g.tmpid),1!==g.bondOrder&&(o.o=g.bondOrder),g.stereo!==e.Bond.STEREO_NONE&&(o.s=g.stereo),b.b.push(o);return b};this.molFrom=function(a){for(var b=new e.Molecule,f=0,h=a.a.length;f<h;f++){var g=a.a[f],o=new e.Atom(g.l?g.l:"C",g.x,g.y);g.i&&(o.tmpid=g.i);g.z&&(o.z=g.z);g.c&&(o.charge=g.c);g.m&&(o.mass=g.m);g.r&&(o.numRadical=g.r);g.p&&(o.numLonePair=g.p);g.q&&(o.any=!0);g.rg&&(o.rgroup=g.rg);void 0!==g.p_h&&(o.hetatm= +g.p_h);void 0!==g.p_w&&(o.isWater=g.p_w);void 0!==g.p_d&&(o.closestDistance=g.p_d);b.atoms.push(o)}f=0;for(h=a.b.length;f<h;f++)g=a.b[f],o=new e.Bond(b.atoms[g.b],b.atoms[g.e],g.o?g.o:1),g.i&&(o.tmpid=g.i),g.s&&(o.stereo=g.s),b.bonds.push(o);return b};this.shapeTo=function(b){var d={};b.tmpid&&(d.i=b.tmpid);b instanceof a.Line?(d.t="Line",d.x1=b.p1.x,d.y1=b.p1.y,d.x2=b.p2.x,d.y2=b.p2.y,d.a=b.arrowType):b instanceof a.Pusher&&(d.t="Pusher",d.o1=b.o1.tmpid,d.o2=b.o2.tmpid,1!==b.numElectron&&(d.e=b.numElectron)); +return d};this.shapeFrom=function(b,d){var f;if("Line"===b.t)f=new a.Line(new e.Point(b.x1,b.y1),new e.Point(b.x2,b.y2)),f.arrowType=b.a;else if("Pusher"===b.t){var h,g;f=0;for(var o=d.length;f<o;f++){for(var m=d[f],j=0,l=m.atoms.length;j<l;j++){var n=m.atoms[j];n.tmpid===b.o1?h=n:n.tmpid===b.o2&&(g=n)}j=0;for(l=m.bonds.length;j<l;j++)n=m.bonds[j],n.tmpid===b.o1?h=n:n.tmpid===b.o2&&(g=n)}f=new a.Pusher(h,g);b.e&&(f.numElectron=b.e)}return f};this.pdbFrom=function(a){var b=this.molFrom(a.mol);b.findRings= +!1;b.fromJSON=!0;b.chains=this.chainsFrom(a.ribbons);return b};this.chainsFrom=function(a){for(var b=[],f=0,h=a.cs.length;f<h;f++){for(var g=a.cs[f],o=[],m=0,j=g.length;m<j;m++){var l=g[m],n=new e.Residue;n.name=l.n;n.cp1=new e.Atom("",l.x1,l.y1,l.z1);n.cp2=new e.Atom("",l.x2,l.y2,l.z2);l.x3&&(n.cp3=new e.Atom("",l.x3,l.y3,l.z3),n.cp4=new e.Atom("",l.x4,l.y4,l.z4),n.cp5=new e.Atom("",l.x5,l.y5,l.z5));n.helix=l.h;n.sheet=l.s;n.arrow=l.a;o.push(n)}b.push(o)}return b}}})(ChemDoodle.io,ChemDoodle.structures, +ChemDoodle.structures.d2,jQuery.inArray); +(function(b,e,a){e.RXNInterpreter=function(){this.read=function(c,d){d||(d=b.default_bondLength_2D);var f=[],e;if(c){e=c.split("$MOL\n");for(var g=e[0].split("\n")[4],h=parseInt(g.substring(0,3)),g=parseInt(g.substring(3,6)),m=1,j=0,l=0,n=h+g;l<n;l++){f[l]=b.readMOL(e[m],d);var r=f[l].getBounds(),r=r.maxX-r.minX,j=j-(r+40);m++}l=0;for(n=h;l<n;l++){var r=f[l].getBounds(),r=r.maxX-r.minX,m=f[l].getCenter(),k=0;for(e=f[l].atoms.length;k<e;k++){var v=f[l].atoms[k];v.x+=j+r/2-m.x;v.y-=m.y}j+=r+40}e=new a.d2.Line(new a.Point(j, +0),new a.Point(j+40,0));j+=80;l=h;for(n=h+g;l<n;l++){r=f[l].getBounds();r=r.maxX-r.minX;m=f[l].getCenter();for(k=0;k<f[l].atoms.length;k++)v=f[l].atoms[k],v.x+=j+r/2-m.x,v.y-=m.y;j+=r+40}}else f.push(new a.Molecule),e=new a.d2.Line(new a.Point(-20,0),new a.Point(20,0));e.arrowType=a.d2.Line.ARROW_SYNTHETIC;return{molecules:f,shapes:[e]}};this.write=function(c,d){var f=[[],[]],e=void 0;if(c&&d){g=0;for(h=d.length;g<h;g++)if(d[g]instanceof a.d2.Line){e=d[g].getPoints();break}if(!e)return"";for(var g= +0,h=c.length;g<h;g++)c[g].getCenter().x<e[0].x?f[0].push(c[g]):f[1].push(c[g]);e=[];e.push("$RXN\nReaction from ChemDoodle Web Components\n\nhttp://www.ichemlabs.com\n");e.push(this.fit(f[0].length.toString(),3));e.push(this.fit(f[1].length.toString(),3));e.push("\n");for(g=0;2>g;g++)for(var h=0,m=f[g].length;h<m;h++)e.push("$MOL\n"),e.push(b.writeMOL(f[g][h])),e.push("\n");return e.join("")}}};e.RXNInterpreter.prototype=new e._Interpreter;var h=new e.RXNInterpreter;b.readRXN=function(a,b){return h.read(a, +b)};b.writeRXN=function(a,b){return h.write(a,b)}})(ChemDoodle,ChemDoodle.io,ChemDoodle.structures); +(function(b,e,a,h,c,d){h.XYZInterpreter=function(){this.deduceCovalentBonds=!0;this.read=function(f){var e=new c.Molecule;if(!f)return e;for(var f=f.split("\n"),h=parseInt(d(f[0])),m=0;m<h;m++){var j=f[m+2].split(/\s+/g);e.atoms[m]=new c.Atom(isNaN(j[0])?j[0]:a[parseInt(j[0])-1],parseFloat(j[1]),parseFloat(j[2]),parseFloat(j[3]))}this.deduceCovalentBonds&&(new b.informatics.BondDeducer).deduceCovalentBonds(e,1);return e}};h.XYZInterpreter.prototype=new h._Interpreter;var f=new h.XYZInterpreter;b.readXYZ= +function(a){return f.read(a)}})(ChemDoodle,ChemDoodle.ELEMENT,ChemDoodle.SYMBOLS,ChemDoodle.io,ChemDoodle.structures,jQuery.trim); +ChemDoodle.monitor=function(b,e,a){var h={CANVAS_DRAGGING:void 0,CANVAS_OVER:void 0,ALT:!1,SHIFT:!1,META:!1};b.supports_touch()||e(a).ready(function(){e(a).mousemove(function(a){h.CANVAS_DRAGGING&&h.CANVAS_DRAGGING.drag&&(h.CANVAS_DRAGGING.prehandleEvent(a),h.CANVAS_DRAGGING.drag(a))});e(a).mouseup(function(a){h.CANVAS_DRAGGING&&h.CANVAS_DRAGGING!==h.CANVAS_OVER&&h.CANVAS_DRAGGING.mouseup&&(h.CANVAS_DRAGGING.prehandleEvent(a),h.CANVAS_DRAGGING.mouseup(a));h.CANVAS_DRAGGING=void 0});e(a).keydown(function(a){h.SHIFT= +a.shiftKey;h.ALT=a.altKey;h.META=a.metaKey;var b=h.CANVAS_OVER;h.CANVAS_DRAGGING&&(b=h.CANVAS_DRAGGING);b&&b.keydown&&(b.prehandleEvent(a),b.keydown(a))});e(a).keypress(function(a){var b=h.CANVAS_OVER;h.CANVAS_DRAGGING&&(b=h.CANVAS_DRAGGING);b&&b.keypress&&(b.prehandleEvent(a),b.keypress(a))});e(a).keyup(function(a){h.SHIFT=a.shiftKey;h.ALT=a.altKey;h.META=a.metaKey;var b=h.CANVAS_OVER;h.CANVAS_DRAGGING&&(b=h.CANVAS_DRAGGING);b&&b.keyup&&(b.prehandleEvent(a),b.keyup(a))})});return h}(ChemDoodle.featureDetection, +jQuery,document); +(function(b,e,a,h,c,d,f,q,g,o,m){b._Canvas=function(){this.image=this.emptyMessage=this.shapes=this.molecules=void 0;return!0};b._Canvas.prototype.repaint=function(){if(!this.test){var a=o.getElementById(this.id);if(a.getContext){var b=a.getContext("2d");1!==this.pixelRatio&&a.width===this.width&&(a.width=this.width*this.pixelRatio,a.height=this.height*this.pixelRatio,b.scale(this.pixelRatio,this.pixelRatio));this.image?b.drawImage(this.image,0,0):(this.specs.backgroundColor&&this.bgCache!==a.style.backgroundColor&& +(a.style.backgroundColor=this.specs.backgroundColor,this.bgCache=a.style.backgroundColor),b.fillStyle=this.specs.backgroundColor,b.fillRect(0,0,this.width,this.height));if(this.innerRepaint)this.innerRepaint(b);else if(0!==this.molecules.length||0!==this.shapes.length){b.save();b.translate(this.width/2,this.height/2);b.rotate(this.specs.rotateAngle);b.scale(this.specs.scale,this.specs.scale);b.translate(-this.width/2,-this.height/2);for(var a=0,c=this.molecules.length;a<c;a++)this.molecules[a].check(!0), +this.molecules[a].draw(b,this.specs);a=0;for(c=this.shapes.length;a<c;a++)this.shapes[a].draw(b,this.specs);b.restore()}else this.emptyMessage&&(b.fillStyle="#737683",b.textAlign="center",b.textBaseline="middle",b.font="18px Helvetica, Verdana, Arial, Sans-serif",b.fillText(this.emptyMessage,this.width/2,this.height/2));this.drawChildExtras&&this.drawChildExtras(b)}}};b._Canvas.prototype.resize=function(a,b){var c=d("#"+this.id);c.attr({width:a,height:b});c.css("width",a);c.css("height",b);this.width= +a;this.height=b;if(this instanceof ChemDoodle._Canvas3D)this.gl.viewport(0,0,a,b),this.setupScene();else if(0<this.molecules.length){this.center();for(var c=0,f=this.molecules.length;c<f;c++)this.molecules[c].check()}this.repaint()};b._Canvas.prototype.setBackgroundImage=function(a){this.image=new Image;var b=this;this.image.onload=function(){b.repaint()};this.image.src=a};b._Canvas.prototype.loadMolecule=function(a){this.clear();this.molecules.push(a);this.center();this instanceof ChemDoodle._Canvas3D|| +a.check();this.afterLoadContent&&this.afterLoadContent();this.repaint()};b._Canvas.prototype.loadContent=function(a,b){this.molecules=a;this.shapes=b;this.center();if(!(this instanceof ChemDoodle._Canvas3D))for(var c=0,d=this.molecules.length;c<d;c++)this.molecules[c].check();this.afterLoadContent&&this.afterLoadContent();this.repaint()};b._Canvas.prototype.addMolecule=function(a){this.molecules.push(a);this instanceof ChemDoodle._Canvas3D||a.check();this.repaint()};b._Canvas.prototype.removeMolecule= +function(a){this.molecules=d.grep(this.molecules,function(b){return b!==a});this.repaint()};b._Canvas.prototype.getMolecule=function(){return 0<this.molecules.length?this.molecules[0]:void 0};b._Canvas.prototype.getMolecules=function(){return this.molecules};b._Canvas.prototype.addShape=function(a){this.shapes.push(a);this.repaint()};b._Canvas.prototype.removeShape=function(a){this.shapes=d.grep(this.shapes,function(b){return b!==a});this.repaint()};b._Canvas.prototype.getShapes=function(){return this.shapes}; +b._Canvas.prototype.clear=function(){this.molecules=[];this.shapes=[];this.specs.scale=1;this.repaint()};b._Canvas.prototype.center=function(){for(var a=this.getContentBounds(),b=new c.Point((this.width-a.minX-a.maxX)/2,(this.height-a.minY-a.maxY)/2),d=0,f=this.molecules.length;d<f;d++)for(var e=this.molecules[d],h=0,m=e.atoms.length;h<m;h++)e.atoms[h].add(b);d=0;for(f=this.shapes.length;d<f;d++){e=this.shapes[d].getPoints();h=0;for(m=e.length;h<m;h++)e[h].add(b)}this.specs.scale=1;b=a.maxX-a.minX; +a=a.maxY-a.minY;if(b>this.width||a>this.height)this.specs.scale=0.85*g.min(this.width/b,this.height/a)};b._Canvas.prototype.bondExists=function(a,b){for(var c=0,d=this.molecules.length;c<d;c++)for(var f=this.molecules[c],e=0,g=f.bonds.length;e<g;e++){var h=f.bonds[e];if(h.contains(a)&&h.contains(b))return!0}return!1};b._Canvas.prototype.getBond=function(a,b){for(var c=0,d=this.molecules.length;c<d;c++)for(var f=this.molecules[c],e=0,g=f.bonds.length;e<g;e++){var h=f.bonds[e];if(h.contains(a)&&h.contains(b))return h}}; +b._Canvas.prototype.getMoleculeByAtom=function(a){for(var b=0,c=this.molecules.length;b<c;b++){var d=this.molecules[b];if(-1!==q(a,d.atoms))return d}};b._Canvas.prototype.getAllAtoms=function(){for(var a=[],b=0,c=this.molecules.length;b<c;b++)a=a.concat(this.molecules[b].atoms);return a};b._Canvas.prototype.getAllPoints=function(){for(var a=[],b=0,c=this.molecules.length;b<c;b++)a=a.concat(this.molecules[b].atoms);b=0;for(c=this.shapes.length;b<c;b++)a=a.concat(this.shapes[b].getPoints());return a}; +b._Canvas.prototype.getContentBounds=function(){for(var b=new a.Bounds,c=0,d=this.molecules.length;c<d;c++)b.expand(this.molecules[c].getBounds());c=0;for(d=this.shapes.length;c<d;c++)b.expand(this.shapes[c].getBounds());return b};b._Canvas.prototype.create=function(a,l,q){this.id=a;this.width=l;this.height=q;this.molecules=[];this.shapes=[];if(o.getElementById(a)){var r=d("#"+a);l?r.attr("width",l):this.width=r.attr("width");q?r.attr("height",q):this.height=r.attr("height");r.attr("class","ChemDoodleWebComponent")}else{if(!b.featureDetection.supports_canvas_text()&& +f.msie&&"6"<=f.version){o.writeln('<div style="border: 1px solid black;" width="'+l+'" height="'+q+'">Please install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a>, then restart Internet Explorer.</div>');return}o.writeln('<canvas class="ChemDoodleWebComponent" id="'+a+'" width="'+l+'" height="'+q+'" alt="ChemDoodle Web Component">This browser does not support HTML5/Canvas.</canvas>')}a=d("#"+a);a.css("width",this.width);a.css("height",this.height);this.pixelRatio=m.devicePixelRatio? +m.devicePixelRatio:1;this.specs=new c.VisualSpecifications;var k=this;e.supports_touch()?(a.bind("touchstart",function(a){var b=(new Date).getTime();if(!e.supports_gesture()&&2===a.originalEvent.touches.length){var d=a.originalEvent.touches,f=new c.Point(d[0].pageX,d[0].pageY),d=new c.Point(d[1].pageX,d[1].pageY);k.implementedGestureDist=f.distance(d);k.implementedGestureAngle=f.angle(d);k.gesturestart&&(k.prehandleEvent(a),k.gesturestart(a))}k.lastTouch&&1===a.originalEvent.touches.length&&500>b- +k.lastTouch?k.dbltap?(k.prehandleEvent(a),k.dbltap(a)):k.dblclick?(k.prehandleEvent(a),k.dblclick(a)):k.touchstart?(k.prehandleEvent(a),k.touchstart(a)):k.mousedown&&(k.prehandleEvent(a),k.mousedown(a)):k.touchstart?(k.prehandleEvent(a),k.touchstart(a),this.hold&&clearTimeout(this.hold),this.touchhold&&(this.hold=setTimeout(function(){k.touchhold(a)},1E3))):k.mousedown&&(k.prehandleEvent(a),k.mousedown(a));k.lastTouch=b}),a.bind("touchmove",function(a){this.hold&&(clearTimeout(this.hold),this.hold= +void 0);if(!e.supports_gesture()&&2===a.originalEvent.touches.length&&k.gesturechange){var b=a.originalEvent.touches,d=new c.Point(b[0].pageX,b[0].pageY),f=new c.Point(b[1].pageX,b[1].pageY),b=d.distance(f),d=d.angle(f);a.originalEvent.scale=b/k.implementedGestureDist;a.originalEvent.rotation=180*(k.implementedGestureAngle-d)/g.PI;k.prehandleEvent(a);k.gesturechange(a)}if(1<a.originalEvent.touches.length&&k.multitouchmove){d=a.originalEvent.touches.length;k.prehandleEvent(a);b=new c.Point(-a.offset.left* +d,-a.offset.top*d);for(f=0;f<d;f++)b.x+=a.originalEvent.changedTouches[f].pageX,b.y+=a.originalEvent.changedTouches[f].pageY;b.x/=d;b.y/=d;a.p=b;k.multitouchmove(a,d)}else k.touchmove?(k.prehandleEvent(a),k.touchmove(a)):k.drag&&(k.prehandleEvent(a),k.drag(a))}),a.bind("touchend",function(a){this.hold&&(clearTimeout(this.hold),this.hold=void 0);!e.supports_gesture()&&k.implementedGestureDist&&(k.implementedGestureDist=void 0,k.implementedGestureAngle=void 0,k.gestureend&&(k.prehandleEvent(a),k.gestureend(a))); +k.touchend?(k.prehandleEvent(a),k.touchend(a)):k.mouseup&&(k.prehandleEvent(a),k.mouseup(a));250>(new Date).getTime()-k.lastTouch&&(k.tap?(k.prehandleEvent(a),k.tap(a)):k.click&&(k.prehandleEvent(a),k.click(a)))}),a.bind("gesturestart",function(a){k.gesturestart&&(k.prehandleEvent(a),k.gesturestart(a))}),a.bind("gesturechange",function(a){k.gesturechange&&(k.prehandleEvent(a),k.gesturechange(a))}),a.bind("gestureend",function(a){k.gestureend&&(k.prehandleEvent(a),k.gestureend(a))})):(a.click(function(a){switch(a.which){case 1:k.click&& +(k.prehandleEvent(a),k.click(a));break;case 2:k.middleclick&&(k.prehandleEvent(a),k.middleclick(a));break;case 3:k.rightclick&&(k.prehandleEvent(a),k.rightclick(a))}}),a.dblclick(function(a){k.dblclick&&(k.prehandleEvent(a),k.dblclick(a))}),a.mousedown(function(a){switch(a.which){case 1:h.CANVAS_DRAGGING=k;k.mousedown&&(k.prehandleEvent(a),k.mousedown(a));break;case 2:k.middlemousedown&&(k.prehandleEvent(a),k.middlemousedown(a));break;case 3:k.rightmousedown&&(k.prehandleEvent(a),k.rightmousedown(a))}}), +a.mousemove(function(a){!h.CANVAS_DRAGGING&&k.mousemove&&(k.prehandleEvent(a),k.mousemove(a))}),a.mouseout(function(a){h.CANVAS_OVER=void 0;k.mouseout&&(k.prehandleEvent(a),k.mouseout(a))}),a.mouseover(function(a){h.CANVAS_OVER=k;k.mouseover&&(k.prehandleEvent(a),k.mouseover(a))}),a.mouseup(function(a){switch(a.which){case 1:k.mouseup&&(k.prehandleEvent(a),k.mouseup(a));break;case 2:k.middlemouseup&&(k.prehandleEvent(a),k.middlemouseup(a));break;case 3:k.rightmouseup&&(k.prehandleEvent(a),k.rightmouseup(a))}}), +a.mousewheel(function(a,b){k.mousewheel&&(k.prehandleEvent(a),k.mousewheel(a,b))}));this.subCreate&&this.subCreate()};b._Canvas.prototype.prehandleEvent=function(a){a.originalEvent.changedTouches&&(a.pageX=a.originalEvent.changedTouches[0].pageX,a.pageY=a.originalEvent.changedTouches[0].pageY);a.preventDefault();a.offset=d("#"+this.id).offset();a.p=new c.Point(a.pageX-a.offset.left,a.pageY-a.offset.top)}})(ChemDoodle,ChemDoodle.featureDetection,ChemDoodle.math,ChemDoodle.monitor,ChemDoodle.structures, +jQuery,jQuery.browser,jQuery.inArray,Math,document,window); +(function(b){b._AnimatorCanvas=function(b,a,h){b&&this.create(b,a,h);this.timeout=33;return!0};b._AnimatorCanvas.prototype=new b._Canvas;b._AnimatorCanvas.prototype.startAnimation=function(){this.stopAnimation();this.lastTime=(new Date).getTime();var b=this;this.nextFrame&&(this.handle=setInterval(function(){var a=(new Date).getTime();b.nextFrame(a-b.lastTime);b.repaint();b.lastTime=a},this.timeout))};b._AnimatorCanvas.prototype.stopAnimation=function(){this.handle&&(clearInterval(this.handle),this.handle= +void 0)};b._AnimatorCanvas.prototype.isRunning=function(){return void 0!==this.handle}})(ChemDoodle); +(function(b,e){b.FileCanvas=function(a,b,c,d){a&&this.create(a,b,c);e.writeln('<br><form name="FileForm" enctype="multipart/form-data" method="POST" action="'+d+'" target="HiddenFileFrame"><input type="file" name="f" /><input type="submit" name="submitbutton" value="Show File" /></form><iframe id="HFF-'+a+'" name="HiddenFileFrame" height="0" width="0" style="display:none;" onLoad="GetMolFromFrame(\'HFF-'+a+"', "+a+')"></iframe>');this.emptyMessage="Click below to load file";this.repaint();return!0}; +b.FileCanvas.prototype=new b._Canvas})(ChemDoodle,document); +(function(b){b.HyperlinkCanvas=function(b,a,h,c,d,f){b&&this.create(b,a,h);this.urlOrFunction=c;this.color=d?d:"blue";this.size=f?f:2;this.openInNewWindow=!0;this.e=this.hoverImage=void 0;return!0};b.HyperlinkCanvas.prototype=new b._Canvas;b.HyperlinkCanvas.prototype.drawChildExtras=function(b){this.e&&(this.hoverImage?b.drawImage(this.hoverImage,0,0):(b.strokeStyle=this.color,b.lineWidth=2*this.size,b.strokeRect(0,0,this.width,this.height)))};b.HyperlinkCanvas.prototype.setHoverImage=function(b){this.hoverImage= +new Image;this.hoverImage.src=b};b.HyperlinkCanvas.prototype.click=function(){this.e=void 0;this.repaint();this.urlOrFunction instanceof Function?this.urlOrFunction():this.openInNewWindow?window.open(this.urlOrFunction):location.href=this.urlOrFunction};b.HyperlinkCanvas.prototype.mouseout=function(){this.e=void 0;this.repaint()};b.HyperlinkCanvas.prototype.mouseover=function(b){this.e=b;this.repaint()}})(ChemDoodle); +(function(b,e,a,h){b.MolGrabberCanvas=function(b,d,f){b&&this.create(b,d,f);d=[];d.push('<br><input type="text" id="');d.push(b);d.push('_query" size="32" value="" />');d.push("<br><nobr>");d.push('<select id="');d.push(b);d.push('_select">');d.push('<option value="chemexper">ChemExper');d.push('<option value="chemspider">ChemSpider');d.push('<option value="pubchem" selected>PubChem');d.push("</select>");d.push('<button id="');d.push(b);d.push('_submit">Show Molecule</button>');d.push("</nobr>"); +h.getElementById(b);a("#"+b).after(d.join(""));var e=this;a("#"+b+"_submit").click(function(){e.search()});a("#"+b+"_query").keypress(function(a){13===a.which&&e.search()});this.emptyMessage="Enter search term below";this.repaint();return!0};b.MolGrabberCanvas.prototype=new b._Canvas;b.MolGrabberCanvas.prototype.setSearchTerm=function(b){a("#"+this.id+"_query").val(b);this.search()};b.MolGrabberCanvas.prototype.search=function(){this.emptyMessage="Searching...";this.clear();var b=this;e.getMoleculeFromDatabase(a("#"+ +this.id+"_query").val(),{database:a("#"+this.id+"_select").val()},function(a){b.loadMolecule(a)})}})(ChemDoodle,ChemDoodle.iChemLabs,jQuery,document); +(function(b,e,a){var h=[],c=[1,0,0],d=[0,1,0],f=[0,0,1];b.RotatorCanvas=function(a,b,c,d){a&&this.create(a,b,c);this.rotate3D=d;this.zIncrement=this.yIncrement=this.xIncrement=a=e.PI/15;return!0};b.RotatorCanvas.prototype=new b._AnimatorCanvas;b.RotatorCanvas.prototype.nextFrame=function(b){if(0===this.molecules.length&&0===this.shapes.length)this.stopAnimation();else if(b/=1E3,this.rotate3D){a.identity(h);a.rotate(h,this.xIncrement*b,c);a.rotate(h,this.yIncrement*b,d);a.rotate(h,this.zIncrement* +b,f);for(var b=0,e=this.molecules.length;b<e;b++){for(var o=this.molecules[b],m=0,j=o.atoms.length;m<j;m++){var l=o.atoms[m],n=[l.x-this.width/2,l.y-this.height/2,l.z];a.multiplyVec3(h,n);l.x=n[0]+this.width/2;l.y=n[1]+this.height/2;l.z=n[2]}m=0;for(j=o.rings.length;m<j;m++)o.rings[m].center=o.rings[m].getCenter();this.specs.atoms_display&&this.specs.atoms_circles_2D&&o.sortAtomsByZ();this.specs.bonds_display&&this.specs.bonds_clearOverlaps_2D&&o.sortBondsByZ()}b=0;for(e=this.shapes.length;b<e;b++){o= +this.shapes[b].getPoints();m=0;for(j=o.length;m<j;m++)l=o[m],n=[l.x-this.width/2,l.y-this.height/2,0],a.multiplyVec3(h,n),l.x=n[0]+this.width/2,l.y=n[1]+this.height/2}}else this.specs.rotateAngle+=this.zIncrement*b};b.RotatorCanvas.prototype.dblclick=function(){this.isRunning()?this.stopAnimation():this.startAnimation()}})(ChemDoodle,Math,mat4); +(function(b,e){b.SlideshowCanvas=function(a,b,c){a&&this.create(a,b,c);this.frames=[];this.curIndex=0;this.timeout=5E3;this.alpha=0;this.innerHandle=void 0;this.phase=0;return!0};b.SlideshowCanvas.prototype=new b._AnimatorCanvas;b.SlideshowCanvas.prototype.drawChildExtras=function(a){var b=e.getRGB(this.specs.backgroundColor,255);a.fillStyle="rgba("+b[0]+", "+b[1]+", "+b[2]+", "+this.alpha+")";a.fillRect(0,0,this.width,this.height)};b.SlideshowCanvas.prototype.nextFrame=function(){if(0===this.frames.length)this.stopAnimation(); +else{this.phase=0;var a=this,b=1;this.innerHandle=setInterval(function(){a.alpha=b/15;a.repaint();15===b&&a.breakInnerHandle();b++},33)}};b.SlideshowCanvas.prototype.breakInnerHandle=function(){this.innerHandle&&(clearInterval(this.innerHandle),this.innerHandle=void 0);if(0===this.phase){this.curIndex++;this.curIndex>this.frames.length-1&&(this.curIndex=0);this.alpha=1;var a=this.frames[this.curIndex];this.loadContent(a.mols,a.shapes);this.phase=1;var b=this,c=1;this.innerHandle=setInterval(function(){b.alpha= +(15-c)/15;b.repaint();c===15&&b.breakInnerHandle();c++},33)}else 1===this.phase&&(this.alpha=0,this.repaint())};b.SlideshowCanvas.prototype.addFrame=function(a,b){0===this.frames.length&&this.loadContent(a,b);this.frames.push({mols:a,shapes:b})}})(ChemDoodle,ChemDoodle.math); +(function(b,e,a,h,c){b.TransformCanvas=function(a,b,c,e){a&&this.create(a,b,c);this.lastPoint=void 0;this.rotate3D=e;this.rotationMultMod=1.3;this.lastPinchScale=1;this.lastGestureRotate=0;return!0};b.TransformCanvas.prototype=new b._Canvas;b.TransformCanvas.prototype.mousedown=function(a){this.lastPoint=a.p};b.TransformCanvas.prototype.dblclick=function(){this.center();this.repaint()};b.TransformCanvas.prototype.drag=function(b){if(!this.lastPoint.multi){if(e.ALT){var f=new a.Point(b.p.x,b.p.y); +f.sub(this.lastPoint);for(var q=0,g=this.molecules.length;q<g;q++){for(var o=this.molecules[q],m=0,j=o.atoms.length;m<j;m++)o.atoms[m].add(f);o.check()}q=0;for(g=this.shapes.length;q<g;q++){o=this.shapes[q].getPoints();m=0;for(j=o.length;m<j;m++)o[m].add(f)}this.lastPoint=b.p}else if(!0===this.rotate3D){j=h.max(this.width/4,this.height/4);m=(b.p.x-this.lastPoint.x)/j*this.rotationMultMod;j=-(b.p.y-this.lastPoint.y)/j*this.rotationMultMod;f=[];c.identity(f);c.rotate(f,j,[1,0,0]);c.rotate(f,m,[0,1, +0]);q=0;for(g=this.molecules.length;q<g;q++){o=this.molecules[q];m=0;for(j=o.atoms.length;m<j;m++)q=o.atoms[m],g=[q.x-this.width/2,q.y-this.height/2,q.z],c.multiplyVec3(f,g),q.x=g[0]+this.width/2,q.y=g[1]+this.height/2,q.z=g[2];q=0;for(g=o.rings.length;q<g;q++)o.rings[q].center=o.rings[q].getCenter();this.lastPoint=b.p;this.specs.atoms_display&&this.specs.atoms_circles_2D&&o.sortAtomsByZ();this.specs.bonds_display&&this.specs.bonds_clearOverlaps_2D&&o.sortBondsByZ()}}else m=new a.Point(this.width/ +2,this.height/2),j=m.angle(this.lastPoint),this.specs.rotateAngle-=m.angle(b.p)-j,this.lastPoint=b.p;this.repaint()}};b.TransformCanvas.prototype.mousewheel=function(a,b){this.specs.scale+=b/10;0.01>this.specs.scale&&(this.specs.scale=0.01);this.repaint()};b.TransformCanvas.prototype.multitouchmove=function(b,c){if(2===c)if(this.lastPoint.multi){var e=new a.Point(b.p.x,b.p.y);e.sub(this.lastPoint);for(var g=0,h=this.molecules.length;g<h;g++){for(var m=this.molecules[g],j=0,l=m.atoms.length;j<l;j++)m.atoms[j].add(e); +m.check()}g=0;for(h=this.shapes.length;g<h;g++){m=this.shapes[g].getPoints();j=0;for(l=m.length;j<l;j++)m[j].add(e)}this.lastPoint=b.p;this.lastPoint.multi=!0;this.repaint()}else this.lastPoint=b.p,this.lastPoint.multi=!0};b.TransformCanvas.prototype.gesturechange=function(b){0!==b.originalEvent.scale-this.lastPinchScale&&(this.specs.scale*=b.originalEvent.scale/this.lastPinchScale,0.01>this.specs.scale&&(this.specs.scale=0.01),this.lastPinchScale=b.originalEvent.scale);if(0!==this.lastGestureRotate- +b.originalEvent.rotation){for(var c=(this.lastGestureRotate-b.originalEvent.rotation)/180*m.PI,e=new a.Point(this.width/2,this.height/2),g=0,h=this.molecules.length;g<h;g++){for(var m=this.molecules[g],j=0,l=m.atoms.length;j<l;j++){var n=m.atoms[j],r=e.distance(n),k=e.angle(n)+c;n.x=e.x+r*m.cos(k);n.y=e.y-r*m.sin(k)}m.check()}this.lastGestureRotate=b.originalEvent.rotation}this.repaint()};b.TransformCanvas.prototype.gestureend=function(){this.lastPinchScale=1;this.lastGestureRotate=0}})(ChemDoodle, +ChemDoodle.monitor,ChemDoodle.structures,Math,mat4);(function(b){b.ViewerCanvas=function(b,a,h){b&&this.create(b,a,h);return!0};b.ViewerCanvas.prototype=new b._Canvas})(ChemDoodle); +(function(b){b._SpectrumCanvas=function(b,a,h){b&&this.create(b,a,h);this.spectrum=void 0;this.emptyMessage="No Spectrum Loaded or Recognized";this.getMolecule=this.loadMolecule=void 0;return!0};b._SpectrumCanvas.prototype=new b._Canvas;b._SpectrumCanvas.prototype.innerRepaint=function(b){this.spectrum&&0<this.spectrum.data.length?this.spectrum.draw(b,this.specs,this.width,this.height):this.emptyMessage&&(b.fillStyle="#737683",b.textAlign="center",b.textBaseline="middle",b.font="18px Helvetica, Verdana, Arial, Sans-serif", +b.fillText(this.emptyMessage,this.width/2,this.height/2))};b._SpectrumCanvas.prototype.loadSpectrum=function(b){this.spectrum=b;this.repaint()};b._SpectrumCanvas.prototype.getSpectrum=function(){return this.spectrum};b._SpectrumCanvas.prototype.getSpectrumCoordinates=function(b,a){return spectrum.getInternalCoordinates(b,a,this.width,this.height)}})(ChemDoodle,document);(function(b){b.ObserverCanvas=function(b,a,h){b&&this.create(b,a,h);return!0};b.ObserverCanvas.prototype=new b._SpectrumCanvas})(ChemDoodle); +(function(b){b.OverlayCanvas=function(b,a,h){b&&this.create(b,a,h);this.overlaySpectra=[];return!0};b.OverlayCanvas.prototype=new b._SpectrumCanvas;b.OverlayCanvas.prototype.superRepaint=b.OverlayCanvas.prototype.innerRepaint;b.OverlayCanvas.prototype.innerRepaint=function(b){this.superRepaint(b);if(this.spectrum&&0<this.spectrum.data.length)for(var a=0,h=this.overlaySpectra.length;a<h;a++){var c=this.overlaySpectra[a];c&&0<c.data.length&&(c.minX=this.spectrum.minX,c.maxX=this.spectrum.maxX,c.drawPlot(b, +this.specs,this.width,this.height,this.spectrum.memory.offsetTop,this.spectrum.memory.offsetLeft,this.spectrum.memory.offsetBottom))}};b.OverlayCanvas.prototype.addSpectrum=function(b){this.spectrum?this.overlaySpectra.push(b):this.spectrum=b}})(ChemDoodle); +(function(b,e,a){b.PerspectiveCanvas=function(a,b,d){a&&this.create(a,b,d);this.dragRange=void 0;this.rescaleYAxisOnZoom=!0;this.lastPinchScale=1;return!0};b.PerspectiveCanvas.prototype=new b._SpectrumCanvas;b.PerspectiveCanvas.prototype.mousedown=function(a){this.dragRange=new b.structures.Point(a.p.x,a.p.x)};b.PerspectiveCanvas.prototype.mouseup=function(a){this.dragRange&&this.dragRange.x!==this.dragRange.y&&(this.dragRange.multi||(a=this.spectrum.zoom(this.dragRange.x,a.p.x,this.width,this.rescaleYAxisOnZoom), +this.rescaleYAxisOnZoom&&(this.specs.scale=a)),this.dragRange=void 0,this.repaint())};b.PerspectiveCanvas.prototype.drag=function(a){this.dragRange&&(this.dragRange.multi?this.dragRange=void 0:(e.SHIFT&&(this.spectrum.translate(a.p.x-this.dragRange.x,this.width),this.dragRange.x=a.p.x),this.dragRange.y=a.p.x),this.repaint())};b.PerspectiveCanvas.prototype.drawChildExtras=function(b){if(this.dragRange){var c=a.min(this.dragRange.x,this.dragRange.y),d=a.max(this.dragRange.x,this.dragRange.y);b.strokeStyle= +"gray";b.lineStyle=1;b.beginPath();for(b.moveTo(c,this.height/2);c<=d;c++)5>c%10?b.lineTo(c,a.round(this.height/2)):b.moveTo(c,a.round(this.height/2));b.stroke()}};b.PerspectiveCanvas.prototype.mousewheel=function(a,b){this.specs.scale+=b/10;0.01>this.specs.scale&&(this.specs.scale=0.01);this.repaint()};b.PerspectiveCanvas.prototype.dblclick=function(){this.spectrum.setup();this.specs.scale=1;this.repaint()};b.PerspectiveCanvas.prototype.multitouchmove=function(a,c){2===c&&(!this.dragRange||!this.dragRange.multi? +(this.dragRange=new b.structures.Point(a.p.x,a.p.x),this.dragRange.multi=!0):(this.spectrum.translate(a.p.x-this.dragRange.x,this.width),this.dragRange.x=a.p.x,this.dragRange.y=a.p.x,this.repaint()))};b.PerspectiveCanvas.prototype.gesturechange=function(a){this.specs.scale*=a.originalEvent.scale/this.lastPinchScale;0.01>this.specs.scale&&(this.specs.scale=0.01);this.lastPinchScale=a.originalEvent.scale;this.repaint()};b.PerspectiveCanvas.prototype.gestureend=function(){this.lastPinchScale=1}})(ChemDoodle, +ChemDoodle.monitor,Math); +(function(b,e){b.SeekerCanvas=function(a,b,c,d){a&&this.create(a,b,c);this.seekType=d;this.p=void 0;return!0};b.SeekerCanvas.prototype=new b._SpectrumCanvas;b.SeekerCanvas.prototype.superRepaint=b.SeekerCanvas.prototype.innerRepaint;b.SeekerCanvas.prototype.innerRepaint=function(a){this.superRepaint(a);if(this.spectrum&&0<this.spectrum.data.length&&this.p){var h,c;if(this.seekType===b.SeekerCanvas.SEEK_POINTER)h=this.p,c=this.spectrum.getInternalCoordinates(h.x,h.y);else if(this.seekType===b.SeekerCanvas.SEEK_PLOT|| +this.seekType===b.SeekerCanvas.SEEK_PEAK){c=this.seekType===b.SeekerCanvas.SEEK_PLOT?this.spectrum.getClosestPlotInternalCoordinates(this.p.x):this.spectrum.getClosestPeakInternalCoordinates(this.p.x);if(!c)return;h={x:this.spectrum.getTransformedX(c.x,this.specs,this.width,this.spectrum.memory.offsetLeft),y:this.spectrum.getTransformedY(c.y/100,this.specs,this.height,this.spectrum.memory.offsetBottom,this.spectrum.memory.offsetTop)}}a.fillStyle="white";a.strokeStyle=this.specs.plots_color;a.lineWidth= +this.specs.plots_width;a.beginPath();a.arc(h.x,h.y,3,0,2*e.PI,!1);a.fill();a.stroke();a.font=this.specs.getFontString(this.specs.text_font_size,this.specs.text_font_families);a.textAlign="left";a.textBaseline="bottom";c="x:"+c.x.toFixed(3)+", y:"+c.y.toFixed(3);var d=h.x+3,f=a.measureText(c).width;d+f>this.width-2&&(d-=6+f);h=h.y;0>h-this.specs.text_font_size-2&&(h+=this.specs.text_font_size);a.fillRect(d,h-this.specs.text_font_size,f,this.specs.text_font_size);a.fillStyle="black";a.fillText(c,d, +h)}};b.SeekerCanvas.prototype.mouseout=function(){this.p=void 0;this.repaint()};b.SeekerCanvas.prototype.mousemove=function(a){this.p={x:a.p.x-2,y:a.p.y-3};this.repaint()};b.SeekerCanvas.prototype.touchstart=function(a){this.mousemove(a)};b.SeekerCanvas.prototype.touchmove=function(a){this.mousemove(a)};b.SeekerCanvas.prototype.touchend=function(a){this.mouseout(a)};b.SeekerCanvas.SEEK_POINTER="pointer";b.SeekerCanvas.SEEK_PLOT="plot";b.SeekerCanvas.SEEK_PEAK="peak"})(ChemDoodle,Math); +(function(b,e,a,h,c,d,f,q,g,o,m){b._Canvas3D=function(a,b,c){a&&this.create(a,b,c);this.rotationMatrix=g.identity([]);this.translationMatrix=g.identity([]);this.lastPoint=void 0;this.emptyMessage="WebGL is Unavailable!";return!0};b._Canvas3D.prototype=new b._Canvas;b._Canvas3D.prototype.afterLoadContent=function(){for(var b=new a.Bounds,c=0,d=this.molecules.length;c<d;c++)b.expand(this.molecules[c].getBounds());this.maxDimension=f.max(b.maxX-b.minX,b.maxY-b.minY);this.translationMatrix=g.translate(g.identity([]), +[0,0,-this.maxDimension-10]);this.setupScene()};b._Canvas3D.prototype.setViewDistance=function(a){this.translationMatrix=g.translate(g.identity([]),[0,0,-a])};b._Canvas3D.prototype.repaint=function(){if(this.gl){this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT);this.gl.modelViewMatrix=g.multiply(this.translationMatrix,this.rotationMatrix,[]);this.gl.rotationMatrix=this.rotationMatrix;for(var a=0,b=this.molecules.length;a<b;a++)this.molecules[a].render(this.gl,this.specs);a=0;for(b= +this.shapes.length;a<b;a++)this.shapes[a].render(this.gl,this.specs);this.gl.flush()}};b._Canvas3D.prototype.center=function(){q.getElementById(this.id);for(var a=new h.Atom,b=0,c=this.molecules.length;b<c;b++){var d=this.molecules[b];a.add3D(d.getCenter3D())}a.x/=this.molecules.length;a.y/=this.molecules.length;b=0;for(c=this.molecules.length;b<c;b++){for(var d=this.molecules[b],f=0,e=d.atoms.length;f<e;f++)d.atoms[f].sub3D(a);if(d.chains&&d.fromJSON){f=0;for(e=d.chains.length;f<e;f++)for(var g= +d.chains[f],m=0,o=g.length;m<o;m++){var w=g[m];w.cp1.sub3D(a);w.cp2.sub3D(a);w.cp3&&(w.cp3.sub3D(a),w.cp4.sub3D(a),w.cp5.sub3D(a))}}}};b._Canvas3D.prototype.subCreate=function(){try{var a=q.getElementById(this.id);this.gl=a.getContext("webgl");this.gl||(this.gl=a.getContext("experimental-webgl"))}catch(b){}this.gl?(this.gl.viewport(0,0,this.width,this.height),this.gl.program=this.gl.createProgram(),this.gl.shader=new c.Shader,this.gl.shader.init(this.gl),this.setupScene()):this.displayMessage()}; +b._Canvas.prototype.displayMessage=function(){var a=q.getElementById(this.id);if(a.getContext&&(a=a.getContext("2d"),this.specs.backgroundColor&&(a.fillStyle=this.specs.backgroundColor,a.fillRect(0,0,this.width,this.height)),this.emptyMessage))a.fillStyle="#737683",a.textAlign="center",a.textBaseline="middle",a.font="18px Helvetica, Verdana, Arial, Sans-serif",a.fillText(this.emptyMessage,this.width/2,this.height/2)};b._Canvas3D.prototype.setupScene=function(){if(this.gl){var b=a.getRGB(this.specs.backgroundColor, +1);this.gl.clearColor(b[0],b[1],b[2],1);this.gl.clearDepth(1);this.gl.enable(this.gl.DEPTH_TEST);this.gl.depthFunc(this.gl.LEQUAL);this.gl.sphereBuffer=new c.Sphere(1,this.specs.atoms_resolution_3D,this.specs.atoms_resolution_3D);this.gl.starBuffer=new c.Star;this.gl.cylinderBuffer=new c.Cylinder(1,1,this.specs.bonds_resolution_3D);this.gl.lineBuffer=new c.Line;for(var b=0,h=this.molecules.length;b<h;b++){var q=this.molecules[b];q.unitCellVectors&&(q.unitCell=new c.UnitCell(q.unitCellVectors));if(q.chains){q.ribbons= +[];q.cartoons=[];q.tubes=[];for(var r=0,k=q.chains.length;r<k;r++){var v=q.chains[r],x=2<v.length&&d[v[2].name]&&"#BEA06E"===d[v[2].name].aminoColor;if(0<v.length&&!v[0].lineSegments){for(var t=0,y=v.length-1;t<y;t++)v[t].setup(v[t+1].cp1,x?1:this.specs.proteins_horizontalResolution);if(!x){t=1;for(y=v.length-1;t<y;t++)e.vec3AngleFrom(v[t-1].D,v[t].D)>f.PI/2&&(v[t].guidePointsSmall.reverse(),v[t].guidePointsLarge.reverse(),m.scale(v[t].D,-1))}t=1;for(y=v.length-3;t<y;t++)v[t].computeLineSegments(v[t- +1],v[t+1],v[t+2],!x,x?this.specs.nucleics_verticalResolution:this.specs.proteins_verticalResolution);v.pop();v.pop();v.pop();v.shift()}var w=a.hsl2rgb(1===k?0.5:r/k,1,0.5),w="rgb("+w[0]+","+w[1]+","+w[2]+")";v.chainColor=w;if(x)v=new c.Tube(v,this.specs.nucleics_tubeThickness,this.specs.nucleics_tubeResolution_3D),v.chainColor=w,q.tubes.push(v);else{x={front:new c.Ribbon(v,this.specs.proteins_ribbonThickness,!1),back:new c.Ribbon(v,-this.specs.proteins_ribbonThickness,!1)};x.front.chainColor=w;x.back.chainColor= +w;t=0;for(y=x.front.segments.length;t<y;t++)x.front.segments[t].chainColor=w;t=0;for(y=x.back.segments.length;t<y;t++)x.back.segments[t].chainColor=w;q.ribbons.push(x);v={front:new c.Ribbon(v,this.specs.proteins_ribbonThickness,!0),back:new c.Ribbon(v,-this.specs.proteins_ribbonThickness,!0)};v.front.chainColor=w;v.back.chainColor=w;t=0;for(y=v.front.segments.length;t<y;t++)v.front.segments[t].chainColor=w;t=0;for(y=v.back.segments.length;t<y;t++)v.back.segments[t].chainColor=w;t=0;for(y=v.front.cartoonSegments.length;t< +y;t++)v.front.cartoonSegments[t].chainColor=w;t=0;for(y=v.back.cartoonSegments.length;t<y;t++)v.back.cartoonSegments[t].chainColor=w;q.cartoons.push(v)}}}}this.gl.lighting=new c.Light(this.specs.lightDiffuseColor_3D,this.specs.lightSpecularColor_3D,this.specs.lightDirection_3D);this.gl.lighting.lightScene(this.gl);this.gl.material=new c.Material(this.gl);b=this.width/this.height;this.specs.projectionWidthHeightRatio_3D&&(b=this.specs.projectionWidthHeightRatio_3D);this.gl.projectionMatrix=this.specs.projectionPerspective_3D? +g.perspective(this.specs.projectionPerspectiveVerticalFieldOfView_3D,b,this.specs.projectionFrontCulling_3D,this.specs.projectionBackCulling_3D):g.ortho(-this.specs.projectionOrthoWidth_3D/2,this.specs.projectionOrthoWidth_3D/2,-this.specs.projectionOrthoWidth_3D/2/b,this.specs.projectionOrthoWidth_3D/2/b,this.specs.projectionFrontCulling_3D,this.specs.projectionBackCulling_3D);this.gl.uniformMatrix4fv(this.gl.getUniformLocation(this.gl.program,"u_projection_matrix"),!1,this.gl.projectionMatrix); +var u=this.gl.getUniformLocation(this.gl.program,"u_model_view_matrix"),p=this.gl.getUniformLocation(this.gl.program,"u_normal_matrix");this.gl.setMatrixUniforms=function(a){this.uniformMatrix4fv(u,false,a);a=o.transpose(g.toInverseMat3(a,[]));this.uniformMatrix3fv(p,false,a)}}};b._Canvas3D.prototype.mousedown=function(a){this.lastPoint=a.p};b._Canvas3D.prototype.rightmousedown=function(a){this.lastPoint=a.p};b._Canvas3D.prototype.drag=function(a){if(b.monitor.ALT){var c=new h.Point(a.p.x,a.p.y); +c.sub(this.lastPoint);g.translate(this.translationMatrix,[c.x/20,-c.y/20,0])}else{var d=a.p.x-this.lastPoint.x,c=a.p.y-this.lastPoint.y,d=g.rotate(g.identity([]),d*f.PI/180,[0,1,0]);g.rotate(d,c*f.PI/180,[1,0,0]);this.rotationMatrix=g.multiply(d,this.rotationMatrix)}this.lastPoint=a.p;this.repaint()};b._Canvas3D.prototype.mousewheel=function(a,b){var c=b*this.maxDimension/8;this.specs.projectionPerspective_3D?g.translate(this.translationMatrix,[0,0,c]):(this.specs.projectionOrthoWidth_3D-=c,this.setupScene()); +this.repaint()}})(ChemDoodle,ChemDoodle.extensions,ChemDoodle.math,ChemDoodle.structures,ChemDoodle.structures.d3,ChemDoodle.RESIDUE,Math,document,mat4,mat3,vec3,window); +(function(b,e,a,h){b.MolGrabberCanvas3D=function(b,d,f){b&&this.create(b,d,f);d=[];d.push('<br><input type="text" id="');d.push(b);d.push('_query" size="32" value="" />');d.push("<br><nobr>");d.push('<select id="');d.push(b);d.push('_select">');d.push('<option value="pubchem" selected>PubChem');d.push("</select>");d.push('<button id="');d.push(b);d.push('_submit">Show Molecule</button>');d.push("</nobr>");h.writeln(d.join(""));var e=this;a("#"+b+"_submit").click(function(){e.search()});a("#"+b+"_query").keypress(function(a){13=== +a.which&&e.search()});return!0};b.MolGrabberCanvas3D.prototype=new b._Canvas3D;b.MolGrabberCanvas3D.prototype.setSearchTerm=function(b){a("#"+this.id+"_query").val(b);this.search()};b.MolGrabberCanvas3D.prototype.search=function(){var b=this;e.getMoleculeFromDatabase(a("#"+this.id+"_query").val(),{database:a("#"+this.id+"_select").val(),dimension:3},function(a){b.loadMolecule(a)})}})(ChemDoodle,ChemDoodle.iChemLabs,jQuery,document); +(function(b,e){b.MovieCanvas3D=function(a,b,c){a&&this.create(a,b,c);this.timeout=50;this.frames=[];this.frameNumber=0;this.playMode=2;this.reverse=!1;return!0};b.MovieCanvas3D.PLAY_ONCE=0;b.MovieCanvas3D.PLAY_LOOP=1;b.MovieCanvas3D.PLAY_SPRING=2;b.MovieCanvas3D.prototype=new b._Canvas3D;b.MovieCanvas3D.prototype.startAnimation=b._AnimatorCanvas.prototype.startAnimation;b.MovieCanvas3D.prototype.stopAnimation=b._AnimatorCanvas.prototype.stopAnimation;b.MovieCanvas3D.prototype.isRunning=b._AnimatorCanvas.prototype.isRunning; +b.MovieCanvas3D.prototype.dblclick=b.RotatorCanvas.prototype.dblclick;b.MovieCanvas3D.prototype.nextFrame=function(){var a=this.frames[this.frameNumber];this.molecules=a.mols;this.shapes=a.shapes;2===this.playMode&&this.reverse?(this.frameNumber--,0>this.frameNumber&&(this.frameNumber=1,this.reverse=!1)):(this.frameNumber++,this.frameNumber>=this.frames.length&&(2===this.playMode?(this.frameNumber-=2,this.reverse=!0):(this.frameNumber=0,0===this.playMode&&this.stopAnimation())))};b.MovieCanvas3D.prototype.center= +function(){for(var a=new e.Atom,b=this.frames[0],c=0,d=b.mols.length;c<d;c++)a.add3D(b.mols[c].getCenter3D());a.x/=b.mols.length;a.y/=b.mols.length;b=new e.Atom;b.sub3D(a);for(var a=0,f=this.frames.length;a<f;a++)for(var q=this.frames[a],c=0,d=q.mols.length;c<d;c++)for(var g=q.mols[c],o=0,m=g.atoms.length;o<m;o++)g.atoms[o].add3D(b)};b.MovieCanvas3D.prototype.addFrame=function(a,b){this.frames.push({mols:a,shapes:b})}})(ChemDoodle,ChemDoodle.structures); +(function(b,e,a){var h=[],c=[1,0,0],d=[0,1,0],f=[0,0,1];b.RotatorCanvas3D=function(a,b,c){a&&this.create(a,b,c);this.timeout=33;this.zIncrement=this.yIncrement=this.xIncrement=a=e.PI/15;return!0};b.RotatorCanvas3D.prototype=new b._Canvas3D;b.RotatorCanvas3D.prototype.startAnimation=b._AnimatorCanvas.prototype.startAnimation;b.RotatorCanvas3D.prototype.stopAnimation=b._AnimatorCanvas.prototype.stopAnimation;b.RotatorCanvas3D.prototype.isRunning=b._AnimatorCanvas.prototype.isRunning;b.RotatorCanvas3D.prototype.dblclick= +b.RotatorCanvas.prototype.dblclick;b.RotatorCanvas3D.prototype.mousedown=void 0;b.RotatorCanvas3D.prototype.rightmousedown=void 0;b.RotatorCanvas3D.prototype.drag=void 0;b.RotatorCanvas3D.prototype.mousewheel=void 0;b.RotatorCanvas3D.prototype.nextFrame=function(b){0===this.molecules.length&&0===this.shapes.length?this.stopAnimation():(a.identity(h),b/=1E3,a.rotate(h,this.xIncrement*b,c),a.rotate(h,this.yIncrement*b,d),a.rotate(h,this.zIncrement*b,f),a.multiply(this.rotationMatrix,h))}})(ChemDoodle, +Math,mat4);(function(b){b.TransformCanvas3D=function(b,a,h){b&&this.create(b,a,h);return!0};b.TransformCanvas3D.prototype=new b._Canvas3D})(ChemDoodle);(function(b){b.ViewerCanvas3D=function(b,a,h){b&&this.create(b,a,h);return!0};b.ViewerCanvas3D.prototype=new b._Canvas3D;b.ViewerCanvas3D.prototype.mousedown=void 0;b.ViewerCanvas3D.prototype.rightmousedown=void 0;b.ViewerCanvas3D.prototype.drag=void 0;b.ViewerCanvas3D.prototype.mousewheel=void 0})(ChemDoodle); +(function(b,e,a){function h(a,b,f,e){this.element=a;this.x=b;this.y=f;this.dimension=e}b.PeriodicTableCanvas=function(a,b){this.padding=5;a&&this.create(a,18*b+2*this.padding,10*b+2*this.padding);this.getMolecule=this.loadMolecule=void 0;this.cellDimension=b?b:20;this.setupTable();this.repaint();return!0};b.PeriodicTableCanvas.prototype=new b._Canvas;b.PeriodicTableCanvas.prototype.getHoveredElement=function(){if(this.hovered)return this.hovered.element};b.PeriodicTableCanvas.prototype.innerRepaint= +function(a){for(var b=0,f=this.cells.length;b<f;b++)this.drawCell(a,this.specs,this.cells[b]);this.hovered&&this.drawCell(a,this.specs,this.hovered);this.selected&&this.drawCell(a,this.specs,this.selected)};b.PeriodicTableCanvas.prototype.setupTable=function(){this.cells=[];for(var a=this.padding,d=this.padding,f=0,e=0,g=b.SYMBOLS.length;e<g;e++){18===f&&(f=0,d+=this.cellDimension,a=this.padding);var o=b.ELEMENT[b.SYMBOLS[e]];if(2===o.atomicNumber)a+=16*this.cellDimension,f+=16;else if(5===o.atomicNumber|| +13===o.atomicNumber)a+=10*this.cellDimension,f+=10;if((58>o.atomicNumber||71<o.atomicNumber&&90>o.atomicNumber||103<o.atomicNumber)&&113>o.atomicNumber)this.cells.push(new h(o,a,d,this.cellDimension)),a+=this.cellDimension,f++}d+=2*this.cellDimension;a=3*this.cellDimension+this.padding;for(e=57;104>e;e++)if(o=b.ELEMENT[b.SYMBOLS[e]],90===o.atomicNumber&&(d+=this.cellDimension,a=3*this.cellDimension+this.padding),58<=o.atomicNumber&&71>=o.atomicNumber||90<=o.atomicNumber&&103>=o.atomicNumber)this.cells.push(new h(o, +a,d,this.cellDimension)),a+=this.cellDimension};b.PeriodicTableCanvas.prototype.drawCell=function(a,b,f){var h=a.createRadialGradient(f.x+f.dimension/3,f.y+f.dimension/3,1.5*f.dimension,f.x+f.dimension/3,f.y+f.dimension/3,f.dimension/10);h.addColorStop(0,"#000000");h.addColorStop(0.7,f.element.jmolColor);h.addColorStop(1,"#FFFFFF");a.fillStyle=h;e.contextRoundRect(a,f.x,f.y,f.dimension,f.dimension,f.dimension/8);if(f===this.hovered||f===this.selected)a.lineWidth=2,a.strokeStyle="#c10000",a.stroke(), +a.fillStyle="white";a.fill();a.font=b.getFontString(b.text_font_size,b.text_font_families);a.fillStyle=b.text_color;a.textAlign="center";a.textBaseline="middle";a.fillText(f.element.symbol,f.x+f.dimension/2,f.y+f.dimension/2)};b.PeriodicTableCanvas.prototype.click=function(){this.hovered&&(this.selected=this.hovered,this.repaint())};b.PeriodicTableCanvas.prototype.mousemove=function(b){var d=b.p.x,b=b.p.y;this.hovered=void 0;for(var f=0,e=this.cells.length;f<e;f++){var g=this.cells[f];if(a.isBetween(d, +g.x,g.x+g.dimension)&&a.isBetween(b,g.y,g.y+g.dimension)){this.hovered=g;break}}this.repaint()};b.PeriodicTableCanvas.prototype.mouseout=function(){this.hovered=void 0;this.repaint()}})(ChemDoodle,ChemDoodle.extensions,ChemDoodle.math,document);(function(b,e){b._Layout=function(){return!0};b._Layout.prototype.layout=function(){this.innerLayout&&this.innerLayout()};b._Layout.prototype.create=function(a){this.name=a;this.specs=new e.VisualSpecifications}})(ChemDoodle,ChemDoodle.structures); +(function(b,e,a){b.SimpleReactionLayout=function(a){this.reactants=[];this.products=[];this.textBelow=this.textAbove=void 0;this.arrow="→";this.plus="+";this.create(a);return!0};b.SimpleReactionLayout.prototype=new b._Layout;b.SimpleReactionLayout.prototype.addReactant=function(a){this.reactants.push(a)};b.SimpleReactionLayout.prototype.addProduct=function(a){this.products.push(a)};b.SimpleReactionLayout.prototype.innerLayout=function(){var b=[];b.push("<table><tr>");for(var c=0,d=this.reactants.length;c< +d;c++){0<c&&(b.push("<td>"),b.push('<span style="font-size:25px;">'),b.push(this.plus),b.push("</span></td>"));b.push("<td>");var f=this.reactants[c].getDimension();b.push('<canvas class="ChemDoodleWebComponent" id="');b.push(this.name);b.push("_reactant");b.push(c);b.push('" width="');b.push(f.x+60);b.push('" height="');b.push(f.y+60);b.push('"></canvas>');b.push("</td>")}b.push("<td>");b.push("<table>");b.push("<tr><td>");this.textAbove?(b.push("<center>"),b.push(this.textAbove),b.push("</center>")): +b.push(" ");b.push("</td></tr>");b.push("<tr><td><center>");b.push('<span style="font-size:25px;">');b.push(this.arrow);b.push("</span></center></td></tr>");b.push("<tr><td>");this.textBelow?(b.push("<center>"),b.push(this.textBelow),b.push("</center>")):b.push(" ");b.push("</td></tr>");b.push("</table>");b.push("</td>");c=0;for(d=this.products.length;c<d;c++)0<c&&(b.push("<td>"),b.push('<span style="font-size:25px;">'),b.push(this.plus),b.push("</td>")),b.push("<td>"),f=this.products[c].getDimension(), +b.push('<canvas class="ChemDoodleWebComponent" id="'),b.push(this.name),b.push("_product"),b.push(c),b.push('" width="'),b.push(f.x+60),b.push('" height="'),b.push(f.y+60),b.push('"></canvas>'),b.push("</td>");b.push("</tr></table>");a.getElementById(this.name)?e("#"+this.name).append(b.join("")):a.writeln(b.join(""));c=0;for(d=this.reactants.length;c<d;c++)b=new ChemDoodle.ViewerCanvas(this.name+"_reactant"+c),this.specs.backgroundColor||e("#"+this.name+"_reactant"+c).css("border","0px"),b.specs= +this.specs,b.loadMolecule(this.reactants[c]);c=0;for(d=this.products.length;c<d;c++)b=new ChemDoodle.ViewerCanvas(this.name+"_product"+c),this.specs.backgroundColor||e("#"+this.name+"_product"+c).css("border","0px"),b.specs=this.specs,b.loadMolecule(this.products[c])}})(ChemDoodle,jQuery,document);(function(b,e,a){b.png={};b.png.create=function(b){a.open(e.getElementById(b.id).toDataURL("image/png"))}})(ChemDoodle.io,document,window); +(function(b,e){b.file={};b.file.content=function(a,b){e.get(a,"",b)}})(ChemDoodle.io,jQuery); +(function(b,e,a,h,c){e.SERVER_URL="http://ichemlabs.cloud.chemdoodle.com/icl_cdc_v050000/WebHQ";e.inRelay=!1;e.asynchronous=!0;e.INFO={userAgent:navigator.userAgent,v_cwc:b.getVersion(),v_jQuery:c.version,v_jQuery_ui:c.ui?c.ui.version:"N/A"};var d=new a.JSONInterpreter;e._contactServer=function(a,b,d,h,m){this.inRelay?alert("Already connecting to the server, please wait for the first request to finish."):(e.inRelay=!0,c.ajax({dataType:"text",type:"POST",data:JSON.stringify({call:a,content:b,options:d, +info:e.INFO}),url:this.SERVER_URL,success:function(a){e.inRelay=!1;a=JSON.parse(a);a.message&&alert(a.message);h&&a.content&&!a.stop&&h(a.content);a.stop&&m&&m()},error:function(){e.inRelay=!1;alert("Call failed. Please try again. If you continue to see this message, please contact iChemLabs customer support.");m&&m()},xhrFields:{withCredentials:!0},async:e.asynchronous}))};e.authenticate=function(a,b,c,d){this._contactServer("authenticate",{credential:a},b,function(a){c(a)},d)};e.calculate=function(a, +b,c,e){this._contactServer("calculate",{mol:d.molTo(a)},b,function(a){c(a)},e)};e.generateImage=function(a,b,c,e){this._contactServer("generateImage",{mol:d.molTo(a)},b,function(a){c(a.link)},e)};e.getAd=function(a,b){this._contactServer("getAd",{},{},function(b){a(b.image_url,b.target_url)},b)};e.getMoleculeFromContent=function(a,b,c,e){this._contactServer("getMoleculeFromContent",{content:a},b,function(a){for(var b=!1,f=0,e=a.mol.a.length;f<e;f++)if(0!==a.mol.a[f].z){b=!0;break}if(b){f=0;for(e= +a.mol.a.length;f<e;f++)a.mol.a[f].x/=20,a.mol.a[f].y/=20,a.mol.a[f].z/=20}c(d.molFrom(a.mol))},e)};e.getMoleculeFromDatabase=function(a,b,c,e){this._contactServer("getMoleculeFromDatabase",{query:a},b,function(a){if(3===b.dimension)for(var f=0,e=a.mol.a.length;f<e;f++)a.mol.a[f].x/=20,a.mol.a[f].y/=-20,a.mol.a[f].z/=20;c(d.molFrom(a.mol))},e)};e.getOptimizedPDBStructure=function(a,b,c,e){this._contactServer("getOptimizedPDBStructure",{id:a},b,function(a){var b;b=a.mol?d.molFrom(a.mol):new h.Molecule; +b.chains=d.chainsFrom(a.ribbons);b.fromJSON=!0;c(b)},e)};e.getZeoliteFromIZA=function(a,b,c,d){this._contactServer("getZeoliteFromIZA",{query:a},b,function(a){c(ChemDoodle.readCIF(a.cif,b.xSuper,b.ySuper,b.zSuper))},d)};e.isGraphIsomorphism=function(a,b,c,e,h){this._contactServer("isGraphIsomorphism",{arrow:d.molTo(a),target:d.molTo(b)},c,function(a){e(a.value)},h)};e.isSubgraphIsomorphism=function(a,b,c,e,h){this._contactServer("isSubgraphIsomorphism",{arrow:d.molTo(a),target:d.molTo(b)},c,function(a){e(a.value)}, +h)};e.kekulize=function(a,b,c,e){this._contactServer("kekulize",{mol:d.molTo(a)},b,function(a){c(d.molFrom(a.mol))},e)};e.optimize=function(a,b,c,e){this._contactServer("optimize",{mol:d.molTo(a)},b,function(e){e=d.molFrom(e.mol);if(2===b.dimension){for(var h=0,l=e.atoms.length;h<l;h++)a.atoms[h].x=e.atoms[h].x,a.atoms[h].y=e.atoms[h].y;c()}else if(3===b.dimension){h=0;for(l=e.atoms.length;h<l;h++)e.atoms[h].x/=20,e.atoms[h].y/=-20,e.atoms[h].z/=20;c(e)}},e)};e.readIUPACName=function(a,b,c,e){this._contactServer("readIUPACName", +{iupac:a},b,function(a){c(d.molFrom(a.mol))},e)};e.readSMILES=function(a,b,c,e){this._contactServer("readSMILES",{smiles:a},b,function(a){c(d.molFrom(a.mol))},e)};e.saveFile=function(a,b,c,e){this._contactServer("saveFile",{mol:d.molTo(a)},b,function(a){c(a.link)},e)};e.simulate13CNMR=function(a,c,e,h){c.nucleus="C";c.isotope=13;this._contactServer("simulateNMR",{mol:d.molTo(a)},c,function(a){e(b.readJCAMP(a.jcamp))},h)};e.simulate1HNMR=function(a,c,e,h){c.nucleus="H";c.isotope=1;this._contactServer("simulateNMR", +{mol:d.molTo(a)},c,function(a){e(b.readJCAMP(a.jcamp))},h)};e.simulateMassParentPeak=function(a,c,e,h){this._contactServer("simulateMassParentPeak",{mol:d.molTo(a)},c,function(a){e(b.readJCAMP(a.jcamp))},h)};e.writeSMILES=function(a,b,c,e){this._contactServer("writeSMILES",{mol:d.molTo(a)},b,function(a){c(a.smiles)},e)}})(ChemDoodle,ChemDoodle.iChemLabs,ChemDoodle.io,ChemDoodle.structures,jQuery); Added: trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/js/jquery-ui-1.9.2.custom.min.js =================================================================== --- trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/js/jquery-ui-1.9.2.custom.min.js (rev 0) +++ trunk/cantharella.web/src/main/webapp/ChemDoodleWeb/js/jquery-ui-1.9.2.custom.min.js 2013-01-24 11:34:39 UTC (rev 57) @@ -0,0 +1,6 @@ +/*! jQuery UI - v1.9.2 - 2012-11-29 +* http://jqueryui.com +* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.button.js, jquery.ui.dialog.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tooltip.js +* Copyright (c) 2012 jQuery Foundation and other contributors Licensed MIT */ + +(function(e,t){function i(t,n){var r,i,o,u=t.nodeName.toLowerCase();return"area"===u?(r=t.parentNode,i=r.name,!t.href||!i||r.nodeName.toLowerCase()!=="map"?!1:(o=e("img[usemap=#"+i+"]")[0],!!o&&s(o))):(/input|select|textarea|button|object/.test(u)?!t.disabled:"a"===u?t.href||n:n)&&s(t)}function s(t){return e.expr.filters.visible(t)&&!e(t).parents().andSelf().filter(function(){return e.css(this,"visibility")==="hidden"}).length}var n=0,r=/^ui-id-\d+$/;e.ui=e.ui||{};if(e.ui.version)return;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(t,n){return typeof t=="number"?this.each(function(){var r=this;setTimeout(function(){e(r).focus(),n&&n.call(r)},t)}):this._focus.apply(this,arguments)},scrollParent:function(){var t;return e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?t=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):t=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"))||!t.length?e(document):t},zIndex:function(n){if(n!==t)return this.css("zIndex",n);if(this.length){var r=e(this[0]),i,s;while(r.length&&r[0]!==document){i=r.css("position");if(i==="absolute"||i==="relative"||i==="fixed"){s=parseInt(r.css("zIndex"),10);if(!isNaN(s)&&s!==0)return s}r=r.parent()}}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)})},removeUniqueId:function(){return this.each(function(){r.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,r){return!!e.data(t,r[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),r=isNaN(n);return(r||n>=0)&&i(t,!r)}}),e(function(){var t=document.body,n=t.appendChild(n=document.createElement("div"));n.offsetHeight,e.extend(n.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),e.support.minHeight=n.offsetHeight===100,e.support.selectstart="onselectstart"in n,t.removeChild(n).style.display="none"}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(n,r){function u(t,n,r,s){return e.each(i,function(){n-=parseFloat(e.css(t,"padding"+this))||0,r&&(n-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(n-=parseFloat(e.css(t,"margin"+this))||0)}),n}var i=r==="Width"?["Left","Right"]:["Top","Bottom"],s=r.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+r]=function(n){return n===t?o["inner"+r].call(this):this.each(function(){e(this).css(s,u(this,n)+"px")})},e.fn["outer"+r]=function(t,n){return typeof t!="number"?o["outer"+r].call(this,t):this.each(function(){e(this).css(s,u(this,t,!0,n)+"px")})}}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(n){return arguments.length?t.call(this,e.camelCase(n)):t.call(this)}}(e.fn.removeData)),function(){var t=/msie ([\w.]+)/.exec(navigator.userAgent.toLowerCase())||[];e.ui.ie=t.length?!0:!1,e.ui.ie6=parseFloat(t[1],10)===6}(),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,n,r){var i,s=e.ui[t].prototype;for(i in r)s.plugins[i]=s.plugins[i]||[],s.plugins[i].push([n,r[i]])},call:function(e,t,n){var r,i=e.plugins[t];if(!i||!e.element[0].parentNode||e.element[0].parentNode.nodeType===11)return;for(r=0;r<i.length;r++)e.options[i[r][0]]&&i[r][1].apply(e.element,n)}},contains:e.contains,hasScroll:function(t,n){if(e(t).css("overflow")==="hidden")return!1;var r=n&&n==="left"?"scrollLeft":"scrollTop",i=!1;return t[r]>0?!0:(t[r]=1,i=t[r]>0,t[r]=0,i)},isOverAxis:function(e,t,n){return e>t&&e<t+n},isOver:function(t,n,r,i,s,o){return e.ui.isOverAxis(t,r,s)&&e.ui.isOverAxis(n,i,o)}})})(jQuery);(function(e,t){var n=0,r=Array.prototype.slice,i=e.cleanData;e.cleanData=function(t){for(var n=0,r;(r=t[n])!=null;n++)try{e(r).triggerHandler("remove")}catch(s){}i(t)},e.widget=function(t,n,r){var i,s,o,u,a=t.split(".")[0];t=t.split(".")[1],i=a+"-"+t,r||(r=n,n=e.Widget),e.expr[":"][i.toLowerCase()]=function(t){return!!e.data(t,i)},e[a]=e[a]||{},s=e[a][t],o=e[a][t]=function(e,t){if(!this._createWidget)return new o(e,t);arguments.length&&this._createWidget(e,t)},e.extend(o,s,{version:r.version,_proto:e.extend({},r),_childConstructors:[]}),u=new n,u.options=e.widget.extend({},u.options),e.each(r,function(t,i){e.isFunction(i)&&(r[t]=function(){var e=function(){return n.prototype[t].apply(this,arguments)},r=function(e){return n.prototype[t].apply(this,e)};return function(){var t=this._super,n=this._superApply,s;return this._super=e,this._superApply=r,s=i.apply(this,arguments),this._super=t,this._superApply=n,s}}())}),o.prototype=e.widget.extend(u,{widgetEventPrefix:s?u.widgetEventPrefix:t},r,{constructor:o,namespace:a,widgetName:t,widgetBaseClass:i,widgetFullName:i}),s?(e.each(s._childConstructors,function(t,n){var r=n.prototype;e.widget(r.namespace+"."+r.widgetName,o,n._proto)}),delete s._childConstructors):n._childConstructors.push(o),e.widget.bridge(t,o)},e.widget.extend=function(n){var i=r.call(arguments,1),s=0,o=i.length,u,a;for(;s<o;s++)for(u in i[s])a=i[s][u],i[s].hasOwnProperty(u)&&a!==t&&(e.isPlainObject(a)?n[u]=e.isPlainObject(n[u])?e.widget.extend({},n[u],a):e.widget.extend({},a):n[u]=a);return n},e.widget.bridge=function(n,i){var s=i.prototype.widgetFullName||n;e.fn[n]=function(o){var u=typeof o=="string",a=r.call(arguments,1),f=this;return o=!u&&a.length?e.widget.extend.apply(null,[o].concat(a)):o,u?this.each(function(){var r,i=e.data(this,s);if(!i)return e.error("cannot call methods on "+n+" prior to initialization; "+"attempted to call method '"+o+"'");if(!e.isFunction(i[o])||o.charAt(0)==="_")return e.error("no such method '"+o+"' for "+n+" widget instance");r=i[o].apply(i,a);if(r!==i&&r!==t)return f=r&&r.jquery?f.pushStack(r.get()):r,!1}):this.each(function(){var t=e.data(this,s);t?t.option(o||{})._init():e.data(this,s,new i(o,this))}),f}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,r){r=e(r||this.defaultElement||this)[0],this.element=e(r),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),r!==this&&(e.data(r,this.widgetName,this),e.data(r,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===r&&this.destroy()}}),this.document=e(r.style?r.ownerDocument:r.document||r),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.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:e.noop,widget:function(){return this.element},option:function(n,r){var i=n,s,o,u;if(arguments.length===0)return e.widget.extend({},this.options);if(typeof n=="string"){i={},s=n.split("."),n=s.shift();if(s.length){o=i[n]=e.widget.extend({},this.options[n]);for(u=0;u<s.length-1;u++)o[s[u]]=o[s[u]]||{},o=o[s[u]];n=s.pop();if(r===t)return o[n]===t?null:o[n];o[n]=r}else{if(r===t)return this.options[n]===t?null:this.options[n];i[n]=r}}return this._setOptions(i),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,e==="disabled"&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),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(t,n,r){var i,s=this;typeof t!="boolean"&&(r=n,n=t,t=!1),r?(n=i=e(n),this.bindings=this.bindings.add(n)):(r=n,n=this.element,i=this.widget()),e.each(r,function(r,o){function u(){if(!t&&(s.options.disabled===!0||e(this).hasClass("ui-state-disabled")))return;return(typeof o=="string"?s[o]:o).apply(s,arguments)}typeof o!="string"&&(u.guid=o.guid=o.guid||u.guid||e.guid++);var a=r.match(/^(\w+)\s*(.*)$/),f=a[1]+s.eventNamespace,l=a[2];l?i.delegate(l,f,u):n.bind(f,u)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function n(){return(typeof e=="string"?r[e]:e).apply(r,arguments)}var r=this;return setTimeout(n,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,n,r){var i,s,o=this.options[t];r=r||{},n=e.Event(n),n.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),n.target=this.element[0],s=n.originalEvent;if(s)for(i in s)i in n||(n[i]=s[i]);return this.element.trigger(n,r),!(e.isFunction(o)&&o.apply(this.element[0],[n].concat(r))===!1||n.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,n){e.Widget.prototype["_"+t]=function(r,i,s){typeof i=="string"&&(i={effect:i});var o,u=i?i===!0||typeof i=="number"?n:i.effect||n:t;i=i||{},typeof i=="number"&&(i={duration:i}),o=!e.isEmptyObject(i),i.complete=s,i.delay&&r.delay(i.delay),o&&e.effects&&(e.effects.effect[u]||e.uiBackCompat!==!1&&e.effects[u])?r[t](i):u!==t&&r[u]?r[u](i.duration,i.easing,s):r.queue(function(n){e(this)[t](),s&&s.call(r[0]),n()})}}),e.uiBackCompat!==!1&&(e.Widget.prototype._getCreateOptions=function(){return e.metadata&&e.metadata.get(this.element[0])[this.widgetName]})})(jQuery);(function(e,t){var n=!1;e(document).mouseup(function(e){n=!1}),e.widget("ui.mouse",{version:"1.9.2",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(n){if(!0===e.data(n.target,t.widgetName+".preventClickEvent"))return e.removeData(n.target,t.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(n)return;this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var r=this,i=t.which===1,s=typeof this.options.cancel=="string"&&t.target.nodeName?e(t.target).closest(this.options.cancel).length:!1;if(!i||s||!this._mouseCapture(t))return!0;this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){r.mouseDelayMet=!0},this.options.delay));if(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)){this._mouseStarted=this._mouseStart(t)!==!1;if(!this._mouseStarted)return t.preventDefault(),!0}return!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return r._mouseMove(e)},this._mouseUpDelegate=function(e){return r._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),n=!0,!0},_mouseMove:function(t){return!e.ui.ie||document.documentMode>=9||!!t.button?this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted):this._mouseUp(t)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(e){return this.mouseDelayMet},_mouseStart:function(e){},_mouseDrag:function(e){},_mouseStop:function(e){},_mouseCapture:function(e){return!0}})})(jQuery);(function(e,t){function h(e,t,n){return[parseInt(e[0],10)*(l.test(e[0])?t/100:1),parseInt(e[1],10)*(l.test(e[1])?n/100:1)]}function p(t,n){return parseInt(e.css(t,n),10)||0}e.ui=e.ui||{};var n,r=Math.max,i=Math.abs,s=Math.round,o=/left|center|right/,u=/top|center|bottom/,a=/[\+\-]\d+%?/,f=/^\w+/,l=/%$/,c=e.fn.position;e.position={scrollbarWidth:function(){if(n!==t)return n;var r,i,s=e("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=s.children()[0];return e("body").append(s),r=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,r===i&&(i=s[0].clientWidth),s.remove(),n=r-i},getScrollInfo:function(t){var n=t.isWindow?"":t.element.css("overflow-x"),r=t.isWindow?"":t.element.css("overflow-y"),i=n==="scroll"||n==="auto"&&t.width<t.element[0].scrollWidth,s=r==="scroll"||r==="auto"&&t.height<t.element[0].scrollHeight;return{width:i?e.position.scrollbarWidth():0,height:s?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var n=e(t||window),r=e.isWindow(n[0]);return{element:n,isWindow:r,offset:n.offset()||{left:0,top:0},scrollLeft:n.scrollLeft(),scrollTop:n.scrollTop(),width:r?n.width():n.outerWidth(),height:r?n.height():n.outerHeight()}}},e.fn.position=function(t){if(!t||!t.of)return c.apply(this,arguments);t=e.extend({},t);var n,l,d,v,m,g=e(t.of),y=e.position.getWithinInfo(t.within),b=e.position.getScrollInfo(y),w=g[0],E=(t.collision||"flip").split(" "),S={};return w.nodeType===9?(l=g.width(),d=g.height(),v={top:0,left:0}):e.isWindow(w)?(l=g.width(),d=g.height(),v={top:g.scrollTop(),left:g.scrollLeft()}):w.preventDefault?(t.at="left top",l=d=0,v={top:w.pageY,left:w.pageX}):(l=g.outerWidth(),d=g.outerHeight(),v=g.offset()),m=e.extend({},v),e.each(["my","at"],function(){var e=(t[this]||"").split(" "),n,r;e.length===1&&(e=o.test(e[0])?e.concat(["center"]):u.test(e[0])?["center"].concat(e):["center","center"]),e[0]=o.test(e[0])?e[0]:"center",e[1]=u.test(e[1])?e[1]:"center",n=a.exec(e[0]),r=a.exec(e[1]),S[this]=[n?n[0]:0,r?r[0]:0],t[this]=[f.exec(e[0])[0],f.exec(e[1])[0]]}),E.length===1&&(E[1]=E[0]),t.at[0]==="right"?m.left+=l:t.at[0]==="center"&&(m.left+=l/2),t.at[1]==="bottom"?m.top+=d:t.at[1]==="center"&&(m.top+=d/2),n=h(S.at,l,d),m.left+=n[0],m.top+=n[1],this.each(function(){var o,u,a=e(this),f=a.outerWidth(),c=a.outerHeight(),w=p(this,"marginLeft"),x=p(this,"marginTop"),T=f+w+p(this,"marginRight")+b.width,N=c+x+p(this,"marginBottom")+b.height,C=e.extend({},m),k=h(S.my,a.outerWidth(),a.outerHeight());t.my[0]==="right"?C.left-=f:t.my[0]==="center"&&(C.left-=f/2),t.my[1]==="bottom"?C.top-=c:t.my[1]==="center"&&(C.top-=c/2),C.left+=k[0],C.top+=k[1],e.support.offsetFractions||(C.left=s(C.left),C.top=s(C.top)),o={marginLeft:w,marginTop:x},e.each(["left","top"],function(r,i){e.ui.position[E[r]]&&e.ui.position[E[r]][i](C,{targetWidth:l,targetHeight:d,elemWidth:f,elemHeight:c,collisionPosition:o,collisionWidth:T,collisionHeight:N,offset:[n[0]+k[0],n[1]+k[1]],my:t.my,at:t.at,within:y,elem:a})}),e.fn.bgiframe&&a.bgiframe(),t.using&&(u=function(e){var n=v.left-C.left,s=n+l-f,o=v.top-C.top,u=o+d-c,h={target:{element:g,left:v.left,top:v.top,width:l,height:d},element:{element:a,left:C.left,top:C.top,width:f,height:c},horizontal:s<0?"left":n>0?"right":"center",vertical:u<0?"top":o>0?"bottom":"middle"};l<f&&i(n+s)<l&&(h.horizontal="center"),d<c&&i(o+u)<d&&(h.vertical="middle"),r(i(n),i(s))>r(i(o),i(u))?h.important="horizontal":h.important="vertical",t.using.call(this,e,h)}),a.offset(e.extend(C,{using:u}))})},e.ui.position={fit:{left:function(e,t){var n=t.within,i=n.isWindow?n.scrollLeft:n.offset.left,s=n.width,o=e.left-t.collisionPosition.marginLeft,u=i-o,a=o+t.collisionWidth-s-i,f;t.collisionWidth>s?u>0&&a<=0?(f=e.left+u+t.collisionWidth-s-i,e.left+=u-f):a>0&&u<=0?e.left=i:u>a?e.left=i+s-t.collisionWidth:e.left=i:u>0?e.left+=u:a>0?e.left-=a:e.left=r(e.left-o,e.left)},top:function(e,t){var n=t.within,i=n.isWindow?n.scrollTop:n.offset.top,s=t.within.height,o=e.top-t.collisionPosition.marginTop,u=i-o,a=o+t.collisionHeight-s-i,f;t.collisionHeight>s?u>0&&a<=0?(f=e.top+u+t.collisionHeight-s-i,e.top+=u-f):a>0&&u<=0?e.top=i:u>a?e.top=i+s-t.collisionHeight:e.top=i:u>0?e.top+=u:a>0?e.top-=a:e.top=r(e.top-o,e.top)}},flip:{left:function(e,t){var n=t.within,r=n.offset.left+n.scrollLeft,s=n.width,o=n.isWindow?n.scrollLeft:n.offset.left,u=e.left-t.collisionPosition.marginLeft,a=u-o,f=u+t.collisionWidth-s-o,l=t.my[0]==="left"?-t.elemWidth:t.my[0]==="right"?t.elemWidth:0,c=t.at[0]==="left"?t.targetWidth:t.at[0]==="right"?-t.targetWidth:0,h=-2*t.offset[0],p,d;if(a<0){p=e.left+l+c+h+t.collisionWidth-s-r;if(p<0||p<i(a))e.left+=l+c+h}else if(f>0){d=e.left-t.collisionPosition.marginLeft+l+c+h-o;if(d>0||i(d)<f)e.left+=l+c+h}},top:function(e,t){var n=t.within,r=n.offset.top+n.scrollTop,s=n.height,o=n.isWindow?n.scrollTop:n.offset.top,u=e.top-t.collisionPosition.marginTop,a=u-o,f=u+t.collisionHeight-s-o,l=t.my[1]==="top",c=l?-t.elemHeight:t.my[1]==="bottom"?t.elemHeight:0,h=t.at[1]==="top"?t.targetHeight:t.at[1]==="bottom"?-t.targetHeight:0,p=-2*t.offset[1],d,v;a<0?(v=e.top+c+h+p+t.collisionHeight-s-r,e.top+c+h+p>a&&(v<0||v<i(a))&&(e.top+=c+h+p)):f>0&&(d=e.top-t.collisionPosition.marginTop+c+h+p-o,e.top+c+h+p>f&&(d>0||i(d)<f)&&(e.top+=c+h+p))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,n,r,i,s,o=document.getElementsByTagName("body")[0],u=document.createElement("div");t=document.createElement(o?"div":"body"),r={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&e.extend(r,{position:"absolute",left:"-1000px",top:"-1000px"});for(s in r)t.style[s]=r[s];t.appendChild(u),n=o||document.documentElement,n.insertBefore(t,n.firstChild),u.style.cssText="position: absolute; left: 10.7432222px;",i=e(u).offset().left,e.support.offsetFractions=i>10&&i<11,t.innerHTML="",n.removeChild(t)}(),e.uiBackCompat!==!1&&function(e){var n=e.fn.position;e.fn.position=function(r){if(!r||!r.offset)return n.call(this,r);var i=r.offset.split(" "),s=r.at.split(" ");return i.length===1&&(i[1]=i[0]),/^\d/.test(i[0])&&(i[0]="+"+i[0]),/^\d/.test(i[1])&&(i[1]="+"+i[1]),s.length===1&&(/left|center|right/.test(s[0])?s[1]="center":(s[1]=s[0],s[0]="center")),n.call(this,e.extend(r,{at:s[0]+i[0]+" "+s[1]+i[1],offset:t}))}}(jQuery)})(jQuery);(function(e,t){e.widget("ui.draggable",e.ui.mouse,{version:"1.9.2",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function(){this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position"))&&(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(t){var n=this.options;return this.helper||n.disabled||e(t.target).is(".ui-resizable-handle")?!1:(this.handle=this._getHandle(t),this.handle?(e(n.iframeFix===!0?"iframe":n.iframeFix).each(function(){e('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(e(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(t){var n=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),n.containment&&this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,n){this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute");if(!n){var r=this._uiHash();if(this._trigger("drag",t,r)===!1)return this._mouseUp({}),!1;this.position=r.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";return e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var n=!1;e.ui.ddmanager&&!this.options.dropBehaviour&&(n=e.ui.ddmanager.drop(this,t)),this.dropped&&(n=this.dropped,this.dropped=!1);var r=this.element[0],i=!1;while(r&&(r=r.parentNode))r==document&&(i=!0);if(!i&&this.options.helper==="original")return!1;if(this.options.revert=="invalid"&&!n||this.options.revert=="valid"&&n||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)){var s=this;e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){s._trigger("stop",t)!==!1&&s._clear()})}else this._trigger("stop",t)!==!1&&this._clear();return!1},_mouseUp:function(t){return e("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){var n=!this.options.handle||!e(this.options.handle,this.element).length?!0:!1;return e(this.options.handle,this.element).find("*").andSelf().each(function(){this==t.target&&(n=!0)}),n},_createHelper:function(t){var n=this.options,r=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t])):n.helper=="clone"?this.element.clone().removeAttr("id"):this.element;return r.parents("body").length||r.appendTo(n.appendTo=="parent"?this.element[0].parentNode:n.appendTo),r[0]!=this.element[0]&&!/(fixed|absolute)/.test(r.css("position"))&&r.css("position","absolute"),r},_adjustOffsetFromHelper:function(t){typeof t=="string"&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&e.ui.ie)t={top:0,left:0};return{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var e=this.element.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t=this.options;t.containment=="parent"&&(t.containment=this.helper[0].parentNode);if(t.containment=="document"||t.containment=="window")this.containment=[t.containment=="document"?0:e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t.containment=="document"?0:e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(t.containment=="document"?0:e(window).scrollLeft())+e(t.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(t.containment=="document"?0:e(window).scrollTop())+(e(t.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(t.containment)&&t.containment.constructor!=Array){var n=e(t.containment),r=n[0];if(!r)return;var i=n.offset(),s=e(r).css("overflow")!="hidden";this.containment=[(parseInt(e(r).css("borderLeftWidth"),10)||0)+(parseInt(e(r).css("paddingLeft"),10)||0),(parseInt(e(r).css("borderTopWidth"),10)||0)+(parseInt(e(r).css("paddingTop"),10)||0),(s?Math.max(r.scrollWidth,r.offsetWidth):r.offsetWidth)-(parseInt(e(r).css("borderLeftWidth"),10)||0)-(parseInt(e(r).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(s?Math.max(r.scrollHeight,r.offsetHeight):r.offsetHeight)-(parseInt(e(r).css("borderTopWidth"),10)||0)-(parseInt(e(r).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=n}else t.containment.constructor==Array&&(this.containment=t.containment)},_convertPositionTo:function(t,n){n||(n=this.position);var r=t=="absolute"?1:-1,i=this.options,s=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(s[0].tagName);return{top:n.top+this.offset.relative.top*r+this.offset.parent.top*r-(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():o?0:s.scrollTop())*r,left:n.left+this.offset.relative.left*r+this.offset.parent.left*r-(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():o?0:s.scrollLeft())*r}},_generatePosition:function(t){var n=this.options,r=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,i=/(html|body)/i.test(r[0].tagName),s=t.pageX,o=t.pageY;if(this.originalPosition){var u;if(this.containment){if(this.relative_container){var a=this.relative_container.offset();u=[this.containment[0]+a.left,this.containment[1]+a.top,this.containment[2]+a.left,this.containment[3]+a.top]}else u=this.containment;t.pageX-this.offset.click.left<u[0]&&(s=u[0]+this.offset.click.left),t.pageY-this.offset.click.top<u[1]&&(o=u[1]+this.offset.click.top),t.pageX-this.offset.click.left>u[2]&&(s=u[2]+this.offset.click.left),t.pageY-this.offset.click.top>u[3]&&(o=u[3]+this.offset.click.top)}if(n.grid){var f=n.grid[1]?this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1]:this.originalPageY;o=u?f-this.offset.click.top<u[1]||f-this.offset.click.top>u[3]?f-this.offset.click.top<u[1]?f+n.grid[1]:f-n.grid[1]:f:f;var l=n.grid[0]?this.originalPageX+Math.round((s-this.originalPageX)/n.grid[0])*n.grid[0]:this.originalPageX;s=u?l-this.offset.click.left<u[0]||l-this.offset.click.left>u[2]?l-this.offset.click.left<u[0]?l+n.grid[0]:l-n.grid[0]:l:l}}return{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():i?0:r.scrollTop()),left:s-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:r.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(t,n,r){return r=r||this._uiHash(),e.ui.plugin.call(this,t,[n,r]),t=="drag"&&(this.positionAbs=this._convertPositionTo("absolute")),e.Widget.prototype._trigger.call(this,t,n,r)},plugins:{},_uiHash:function(e){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,n){var r=e(this).data("draggable"),i=r.options,s=e.extend({},n,{item:r.element});r.sortables=[],e(i.connectToSortable).each(function(){var n=e.data(this,"sortable");n&&!n.options.disabled&&(r.sortables.push({instance:n,shouldRevert:n.options.revert}),n.refreshPositions(),n._trigger("activate",t,s))})},stop:function(t,n){var r=e(this).data("draggable"),i=e.extend({},n,{item:r.element});e.each(r.sortables,function(){this.instance.isOver?(this.instance.isOver=0,r.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=!0),this.instance._mouseStop(t),this.instance.options.helper=this.instance.options._helper,r.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",t,i))})},drag:function(t,n){var r=e(this).data("draggable"),i=this,s=function(t){var n=this.offset.click.top,r=this.offset.click.left,i=this.positionAbs.top,s=this.positionAbs.left,o=t.height,u=t.width,a=t.top,f=t.left;return e.ui.isOver(i+n,s+r,a,f,o,u)};e.each(r.sortables,function(s){var o=!1,u=this;this.instance.positionAbs=r.positionAbs,this.instance.helperProportions=r.helperProportions,this.instance.offset.click=r.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(o=!0,e.each(r.sortables,function(){return this.instance.positionAbs=r.positionAbs,this.instance.helperProportions=r.helperProportions,this.instance.offset.click=r.offset.click,this!=u&&this.instance._intersectsWith(this.instance.containerCache)&&e.ui.contains(u.instance.element[0],this.instance.element[0])&&(o=!1),o})),o?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=e(i).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return n.helper[0]},t.target=this.instance.currentItem[0],this.instance._mouseCapture(t,!0),this.instance._mouseStart(t,!0,!0),this.instance.offset.click.top=r.offset.click.top,this.instance.offset.click.left=r.offset.click.left,this.instance.offset.parent.left-=r.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=r.offset.parent.top-this.instance.offset.parent.top,r._trigger("toSortable",t),r.dropped=this.instance.element,r.currentItem=r.element,this.instance.fromOutside=r),this.instance.currentItem&&this.instance._mouseDrag(t)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",t,this.instance._uiHash(this.instance)),this.instance._mouseStop(t,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),r._trigger("fromSortable",t),r.dropped=!1)})}}),e.ui.plugin.add("draggable","cursor",{start:function(t,n){var r=e("body"),i=e(this).data("draggable").options;r.css("cursor")&&(i._cursor=r.css("cursor")),r.css("cursor",i.cursor)},stop:function(t,n){var r=e(this).data("draggable").options;r._cursor&&e("body").css("cursor",r._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,n){var r=e(n.helper),i=e(this).data("draggable").options;r.css("opacity")&&(i._opacity=r.css("opacity")),r.css("opacity",i.opacity)},stop:function(t,n){var r=e(this).data("draggable").options;r._opacity&&e(n.helper).css("opacity",r._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(t,n){var r=e(this).data("draggable");r.scrollParent[0]!=document&&r.scrollParent[0].tagName!="HTML"&&(r.overflowOffset=r.scrollParent.offset())},drag:function(t,n){var r=e(this).data("draggable"),i=r.options,s=!1;if(r.scrollParent[0]!=document&&r.scrollParent[0].tagName!="HTML"){if(!i.axis||i.axis!="x")r.overflowOffset.top+r.scrollParent[0].offsetHeight-t.pageY<i.scrollSensitivity?r.scrollParent[0].scrollTop=s=r.scrollParent[0].scrollTop+i.scrollSpeed:t.pageY-r.overflowOffset.top<i.scrollSensitivity&&(r.scrollParent[0].scrollTop=s=r.scrollParent[0].scrollTop-i.scrollSpeed);if(!i.axis||i.axis!="y")r.overflowOffset.left+r.scrollParent[0].offsetWidth-t.pageX<i.scrollSensitivity?r.scrollParent[0].scrollLeft=s=r.scrollParent[0].scrollLeft+i.scrollSpeed:t.pageX-r.overflowOffset.left<i.scrollSensitivity&&(r.scrollParent[0].scrollLeft=s=r.scrollParent[0].scrollLeft-i.scrollSpeed)}else{if(!i.axis||i.axis!="x")t.pageY-e(document).scrollTop()<i.scrollSensitivity?s=e(document).scrollTop(e(document).scrollTop()-i.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<i.scrollSensitivity&&(s=e(document).scrollTop(e(document).scrollTop()+i.scrollSpeed));if(!i.axis||i.axis!="y")t.pageX-e(document).scrollLeft()<i.scrollSensitivity?s=e(document).scrollLeft(e(document).scrollLeft()-i.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<i.scrollSensitivity&&(s=e(document).scrollLeft(e(document).scrollLeft()+i.scrollSpeed))}s!==!1&&e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(r,t)}}),e.ui.plugin.add("draggable","snap",{start:function(t,n){var r=e(this).data("draggable"),i=r.options;r.snapElements=[],e(i.snap.constructor!=String?i.snap.items||":data(draggable)":i.snap).each(function(){var t=e(this),n=t.offset();this!=r.element[0]&&r.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:n.top,left:n.left})})},drag:function(t,n){var r=e(this).data("draggable"),i=r.options,s=i.snapTolerance,o=n.offset.left,u=o+r.helperProportions.width,a=n.offset.top,f=a+r.helperProportions.height;for(var l=r.snapElements.length-1;l>=0;l--){var c=r.snapElements[l].left,h=c+r.snapElements[l].width,p=r.snapElements[l].top,d=p+r.snapElements[l].height;if(!(c-s<o&&o<h+s&&p-s<a&&a<d+s||c-s<o&&o<h+s&&p-s<f&&f<d+s||c-s<u&&u<h+s&&p-s<a&&a<d+s||c-s<u&&u<h+s&&p-s<f&&f<d+s)){r.snapElements[l].snapping&&r.options.snap.release&&r.options.snap.release.call(r.element,t,e.extend(r._uiHash(),{snapItem:r.snapElements[l].item})),r.snapElements[l].snapping=!1;continue}if(i.snapMode!="inner"){var v=Math.abs(p-f)<=s,m=Math.abs(d-a)<=s,g=Math.abs(c-u)<=s,y=Math.abs(h-o)<=s;v&&(n.position.top=r._convertPositionTo("relative",{top:p-r.helperProportions.height,left:0}).top-r.margins.top),m&&(n.position.top=r._convertPositionTo("relative",{top:d,left:0}).top-r.margins.top),g&&(n.position.left=r._convertPositionTo("relative",{top:0,left:c-r.helperProportions.width}).left-r.margins.left),y&&(n.position.left=r._convertPositionTo("relative",{top:0,left:h}).left-r.margins.left)}var b=v||m||g||y;if(i.snapMode!="outer"){var v=Math.abs(p-a)<=s,m=Math.abs(d-f)<=s,g=Math.abs(c-o)<=s,y=Math.abs(h-u)<=s;v&&(n.position.top=r._convertPositionTo("relative",{top:p,left:0}).top-r.margins.top),m&&(n.position.top=r._convertPositionTo("relative",{top:d-r.helperProportions.height,left:0}).top-r.margins.top),g&&(n.position.left=r._convertPositionTo("relative",{top:0,left:c}).left-r.margins.left),y&&(n.position.left=r._convertPositionTo("relative",{top:0,left:h-r.helperProportions.width}).left-r.margins.left)}!r.snapElements[l].snapping&&(v||m||g||y||b)&&r.options.snap.snap&&r.options.snap.snap.call(r.element,t,e.extend(r._uiHash(),{snapItem:r.snapElements[l].item})),r.snapElements[l].snapping=v||m||g||y||b}}}),e.ui.plugin.add("draggable","stack",{start:function(t,n){var r=e(this).data("draggable").options,i=e.makeArray(e(r.stack)).sort(function(t,n){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(n).css("zIndex"),10)||0)});if(!i.length)return;var s=parseInt(i[0].style.zIndex)||0;e(i).each(function(e){this.style.zIndex=s+e}),this[0].style.zIndex=s+i.length}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,n){var r=e(n.helper),i=e(this).data("draggable").options;r.css("zIndex")&&(i._zIndex=r.css("zIndex")),r.css("zIndex",i.zIndex)},stop:function(t,n){var r=e(this).data("draggable").options;r._zIndex&&e(n.helper).css("zIndex",r._zIndex)}})})(jQuery);(function(e,t){e.widget("ui.resizable",e.ui.mouse,{version:"1.9.2",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1e3},_create:function(){var t=this,n=this.options;this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!n.aspectRatio,aspectRatio:n.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:n.helper||n.ghost||n.animate?n.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(e('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("resizable",this.element.data("resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=n.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se");if(this.handles.constructor==String){this.handles=="all"&&(this.handles="n,e,s,w,se,sw,ne,nw");var r=this.handles.split(",");this.handles={};for(var i=0;i<r.length;i++){var s=e.trim(r[i]),o="ui-resizable-"+s,u=e('<div class="ui-resizable-handle '+o+'"></div>');u.css({zIndex:n.zIndex}),"se"==s&&u.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(u)}}this._renderAxis=function(t){t=t||this.element;for(var n in this.handles){this.handles[n].constructor==String&&(this.handles[n]=e(this.handles[n],this.element).show());if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var r=e(this.handles[n],this.element),i=0;i=/sw|ne|nw|se|n|s/.test(n)?r.outerHeight():r.outerWidth();var s=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");t.css(s,i),this._proportionallyResize()}if(!e(this.handles[n]).length)continue}},this._renderAxis(this.element),this._handles=e(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){if(!t.resizing){if(this.className)var e=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);t.axis=e&&e[1]?e[1]:"se"}}),n.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){if(n.disabled)return;e(this).removeClass("ui-resizable-autohide"),t._handles.show()}).mouseleave(function(){if(n.disabled)return;t.resizing||(e(this).addClass("ui-resizable-autohide"),t._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){t(this.element);var n=this.element;this.originalElement.css({position:n.css("position"),width:n.outerWidth(),height:n.outerHeight(),top:n.css("top"),left:n.css("left")}).insertAfter(n),n.remove()}return this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_mouseCapture:function(t){var n=!1;for(var r in this.handles)e(this.handles[r])[0]==t.target&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(t){var r=this.options,i=this.element.position(),s=this.element;this.resizing=!0,this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()},(s.is(".ui-draggable")||/absolute/.test(s.css("position")))&&s.css({position:"absolute",top:i.top,left:i.left}),this._renderProxy();var o=n(this.helper.css("left")),u=n(this.helper.css("top"));r.containment&&(o+=e(r.containment).scrollLeft()||0,u+=e(r.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:o,top:u},this.size=this._helper?{width:s.outerWidth(),height:s.outerHeight()}:{width:s.width(),height:s.height()},this.originalSize=this._helper?{width:s.outerWidth(),height:s.outerHeight()}:{width:s.width(),height:s.height()},this.originalPosition={left:o,top:u},this.sizeDiff={width:s.outerWidth()-s.width(),height:s.outerHeight()-s.height()},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio=typeof r.aspectRatio=="number"?r.aspectRatio:this.originalSize.width/this.originalSize.height||1;var a=e(".ui-resizable-"+this.axis).css("cursor");return e("body").css("cursor",a=="auto"?this.axis+"-resize":a),s.addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(e){var t=this.helper,n=this.options,r={},i=this,s=this.originalMousePosition,o=this.axis,u=e.pageX-s.left||0,a=e.pageY-s.top||0,f=this._change[o];if(!f)return!1;var l=f.apply(this,[e,u,a]);this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey)l=this._updateRatio(l,e);return l=this._respectSize(l,e),this._propagate("resize",e),t.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"}),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),this._updateCache(l),this._trigger("resize",e,this.ui()),!1},_mouseStop:function(t){this.resizing=!1;var n=this.options,r=this;if(this._helper){var i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),o=s&&e.ui.hasScroll(i[0],"left")?0:r.sizeDiff.height,u=s?0:r.sizeDiff.width,a={width:r.helper.width()-u,height:r.helper.height()-o},f=parseInt(r.element.css("left"),10)+(r.position.left-r.originalPosition.left)||null,l=parseInt(r.element.css("top"),10)+(r.position.top-r.originalPosition.top)||null;n.animate||this.element.css(e.extend(a,{top:l,left:f})),r.helper.height(r.size.height),r.helper.width(r.size.width),this._helper&&!n.animate&&this._proportionallyResize()}return e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(e){var t=this.options,n,i,s,o,u;u={minWidth:r(t.minWidth)?t.minWidth:0,maxWidth:r(t.maxWidth)?t.maxWidth:Infinity,minHeight:r(t.minHeight)?t.minHeight:0,maxHeight:r(t.maxHeight)?t.maxHeight:Infinity};if(this._aspectRatio||e)n=u.minHeight*this.aspectRatio,s=u.minWidth/this.aspectRatio,i=u.maxHeight*this.aspectRatio,o=u.maxWidth/this.aspectRatio,n>u.minWidth&&(u.minWidth=n),s>u.minHeight&&(u.minHeight=s),i<u.maxWidth&&(u.maxWidth=i),o<u.maxHeight&&(u.maxHeight=o);this._vBoundaries=u},_updateCache:function(e){var t=this.options;this.offset=this.helper.offset(),r(e.left)&&(this.position.left=e.left),r(e.top)&&(this.position.top=e.top),r(e.height)&&(this.size.height=e.height),r(e.width)&&(this.size.width=e.width)},_updateRatio:function(e,t){var n=this.options,i=this.position,s=this.size,o=this.axis;return r(e.height)?e.width=e.height*this.aspectRatio:r(e.width)&&(e.height=e.width/this.aspectRatio),o=="sw"&&(e.left=i.left+(s.width-e.width),e.top=null),o=="nw"&&(e.top=i.top+(s.height-e.height),e.left=i.left+(s.width-e.width)),e},_respectSize:function(e,t){var n=this.helper,i=this._vBoundaries,s=this._aspectRatio||t.shiftKey,o=this.axis,u=r(e.width)&&i.maxWidth&&i.maxWidth<e.width,a=r(e.height)&&i.maxHeight&&i.maxHeight<e.height,f=r(e.width)&&i.minWidth&&i.minWidth>e.width,l=r(e.height)&&i.minHeight&&i.minHeight>e.height;f&&(e.width=i.minWidth),l&&(e.height=i.minHeight),u&&(e.width=i.maxWidth),a&&(e.height=i.maxHeight);var c=this.originalPosition.left+this.originalSize.width,h=this.position.top+this.size.height,p=/sw|nw|w/.test(o),d=/nw|ne|n/.test(o);f&&p&&(e.left=c-i.minWidth),u&&p&&(e.left=c-i.maxWidth),l&&d&&(e.top=h-i.minHeight),a&&d&&(e.top=h-i.maxHeight);var v=!e.width&&!e.height;return v&&!e.left&&e.top?e.top=null:v&&!e.top&&e.left&&(e.left=null),e},_proportionallyResize:function(){var t=this.options;if(!this._proportionallyResizeElements.length)return;var n=this.helper||this.element;for(var r=0;r<this._proportionallyResizeElements.length;r++){var i=this._proportionallyResizeElements[r];if(!this.borderDif){var s=[i.css("borderTopWidth"),i.css("borderRightWidth"),i.css("borderBottomWidth"),i.css("borderLeftWidth")],o=[i.css("paddingTop"),i.css("paddingRight"),i.css("paddingBottom"),i.css("paddingLeft")];this.borderDif=e.map(s,function(e,t){var n=parseInt(e,10)||0,r=parseInt(o[t],10)||0;return n+r})}i.css({height:n.height()-this.borderDif[0]-this.borderDif[2]||0,width:n.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var t=this.element,n=this.options;this.elementOffset=t.offset();if(this._helper){this.helper=this.helper||e('<div style="overflow:hidden;"></div>');var r=e.ui.ie6?1:0,i=e.ui.ie6?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+i,height:this.element.outerHeight()+i,position:"absolute",left:this.elementOffset.left-r+"px",top:this.elementOffset.top-r+"px",zIndex:++n.zIndex}),this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(e,t,n){return{width:this.originalSize.width+t}},w:function(e,t,n){var r=this.options,i=this.originalSize,s=this.originalPosition;return{left:s.left+t,width:i.width-t}},n:function(e,t,n){var r=this.options,i=this.originalSize,s=this.originalPosition;return{top:s.top+n,height:i.height-n}},s:function(e,t,n){return{height:this.originalSize.height+n}},se:function(t,n,r){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,n,r]))},sw:function(t,n,r){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,n,r]))},ne:function(t,n,r){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,n,r]))},nw:function(t,n,r){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,n,r]))}},_propagate:function(t,n){e.ui.plugin.call(this,t,[n,this.ui()]),t!="resize"&&this._trigger(t,n,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","alsoResize",{start:function(t,n){var r=e(this).data("resizable"),i=r.options,s=function(t){e(t).each(function(){var t=e(this);t.data("resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};typeof i.alsoResize=="object"&&!i.alsoResize.parentNode?i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):e.each(i.alsoResize,function(e){s(e)}):s(i.alsoResize)},resize:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.originalSize,o=r.originalPosition,u={height:r.size.height-s.height||0,width:r.size.width-s.width||0,top:r.position.top-o.top||0,left:r.position.left-o.left||0},a=function(t,r){e(t).each(function(){var t=e(this),i=e(this).data("resizable-alsoresize"),s={},o=r&&r.length?r:t.parents(n.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(o,function(e,t){var n=(i[t]||0)+(u[t]||0);n&&n>=0&&(s[t]=n||null)}),t.css(s)})};typeof i.alsoResize=="object"&&!i.alsoResize.nodeType?e.each(i.alsoResize,function(e,t){a(e,t)}):a(i.alsoResize)},stop:function(t,n){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","animate",{stop:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r._proportionallyResizeElements,o=s.length&&/textarea/i.test(s[0].nodeName),u=o&&e.ui.hasScroll(s[0],"left")?0:r.sizeDiff.height,a=o?0:r.sizeDiff.width,f={width:r.size.width-a,height:r.size.height-u},l=parseInt(r.element.css("left"),10)+(r.position.left-r.originalPosition.left)||null,c=parseInt(r.element.css("top"),10)+(r.position.top-r.originalPosition.top)||null;r.element.animate(e.extend(f,c&&l?{top:c,left:l}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var n={width:parseInt(r.element.css("width"),10),height:parseInt(r.element.css("height"),10),top:parseInt(r.element.css("top"),10),left:parseInt(r.element.css("left"),10)};s&&s.length&&e(s[0]).css({width:n.width,height:n.height}),r._updateCache(n),r._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(t,r){var i=e(this).data("resizable"),s=i.options,o=i.element,u=s.containment,a=u instanceof e?u.get(0):/parent/.test(u)?o.parent().get(0):u;if(!a)return;i.containerElement=e(a);if(/document/.test(u)||u==document)i.containerOffset={left:0,top:0},i.containerPosition={left:0,top:0},i.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight};else{var f=e(a),l=[];e(["Top","Right","Left","Bottom"]).each(function(e,t){l[e]=n(f.css("padding"+t))}),i.containerOffset=f.offset(),i.containerPosition=f.position(),i.containerSize={height:f.innerHeight()-l[3],width:f.innerWidth()-l[1]};var c=i.containerOffset,h=i.containerSize.height,p=i.containerSize.width,d=e.ui.hasScroll(a,"left")?a.scrollWidth:p,v=e.ui.hasScroll(a)?a.scrollHeight:h;i.parentData={element:a,left:c.left,top:c.top,width:d,height:v}}},resize:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.containerSize,o=r.containerOffset,u=r.size,a=r.position,f=r._aspectRatio||t.shiftKey,l={top:0,left:0},c=r.containerElement;c[0]!=document&&/static/.test(c.css("position"))&&(l=o),a.left<(r._helper?o.left:0)&&(r.size.width=r.size.width+(r._helper?r.position.left-o.left:r.position.left-l.left),f&&(r.size.height=r.size.width/r.aspectRatio),r.position.left=i.helper?o.left:0),a.top<(r._helper?o.top:0)&&(r.size.height=r.size.height+(r._helper?r.position.top-o.top:r.position.top),f&&(r.size.width=r.size.height*r.aspectRatio),r.position.top=r._helper?o.top:0),r.offset.left=r.parentData.left+r.position.left,r.offset.top=r.parentData.top+r.position.top;var h=Math.abs((r._helper?r.offset.left-l.left:r.offset.left-l.left)+r.sizeDiff.width),p=Math.abs((r._helper?r.offset.top-l.top:r.offset.top-o.top)+r.sizeDiff.height),d=r.containerElement.get(0)==r.element.parent().get(0),v=/relative|absolute/.test(r.containerElement.css("position"));d&&v&&(h-=r.parentData.left),h+r.size.width>=r.parentData.width&&(r.size.width=r.parentData.width-h,f&&(r.size.height=r.size.width/r.aspectRatio)),p+r.size.height>=r.parentData.height&&(r.size.height=r.parentData.height-p,f&&(r.size.width=r.size.height*r.aspectRatio))},stop:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.position,o=r.containerOffset,u=r.containerPosition,a=r.containerElement,f=e(r.helper),l=f.offset(),c=f.outerWidth()-r.sizeDiff.width,h=f.outerHeight()-r.sizeDiff.height;r._helper&&!i.animate&&/relative/.test(a.css("position"))&&e(this).css({left:l.left-u.left-o.left,width:c,height:h}),r._helper&&!i.animate&&/static/.test(a.css("position"))&&e(this).css({left:l.left-u.left-o.left,width:c,height:h})}}),e.ui.plugin.add("resizable","ghost",{start:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.size;r.ghost=r.originalElement.clone(),r.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:""),r.ghost.appendTo(r.helper)},resize:function(t,n){var r=e(this).data("resizable"),i=r.options;r.ghost&&r.ghost.css({position:"relative",height:r.size.height,width:r.size.width})},stop:function(t,n){var r=e(this).data("resizable"),i=r.options;r.ghost&&r.helper&&r.helper.get(0).removeChild(r.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.size,o=r.originalSize,u=r.originalPosition,a=r.axis,f=i._aspectRatio||t.shiftKey;i.grid=typeof i.grid=="number"?[i.grid,i.grid]:i.grid;var l=Math.round((s.width-o.width)/(i.grid[0]||1))*(i.grid[0]||1),c=Math.round((s.height-o.height)/(i.grid[1]||1))*(i.grid[1]||1);/^(se|s|e)$/.test(a)?(r.size.width=o.width+l,r.size.height=o.height+c):/^(ne)$/.test(a)?(r.size.width=o.width+l,r.size.height=o.height+c,r.position.top=u.top-c):/^(sw)$/.test(a)?(r.size.width=o.width+l,r.size.height=o.height+c,r.position.left=u.left-l):(r.size.width=o.width+l,r.size.height=o.height+c,r.position.top=u.top-c,r.position.left=u.left-l)}});var n=function(e){return parseInt(e,10)||0},r=function(e){return!isNaN(parseInt(e,10))}})(jQuery);(function(e,t){e.widget("ui.selectable",e.ui.mouse,{version:"1.9.2",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch"},_create:function(){var t=this;this.element.addClass("ui-selectable"),this.dragged=!1;var n;this.refresh=function(){n=e(t.options.filter,t.element[0]),n.addClass("ui-selectee"),n.each(function(){var t=e(this),n=t.offset();e.data(this,"selectable-item",{element:this,$element:t,left:n.left,top:n.top,right:n.left+t.outerWidth(),bottom:n.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=n.addClass("ui-selectee"),this._mouseInit(),this.helper=e("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(t){var n=this;this.opos=[t.pageX,t.pageY];if(this.options.disabled)return;var r=this.options;this.selectees=e(r.filter,this.element[0]),this._trigger("start",t),e(r.appendTo).append(this.helper),this.helper.css({left:t.clientX,top:t.clientY,width:0,height:0}),r.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var r=e.data(this,"selectable-item");r.startselected=!0,!t.metaKey&&!t.ctrlKey&&(r.$element.removeClass("ui-selected"),r.selected=!1,r.$element.addClass("ui-unselecting"),r.unselecting=!0,n._trigger("unselecting",t,{unselecting:r.element}))}),e(t.target).parents().andSelf().each(function(){var r=e.data(this,"selectable-item");if(r){var i=!t.metaKey&&!t.ctrlKey||!r.$element.hasClass("ui-selected");return r.$element.removeClass(i?"ui-unselecting":"ui-selected").addClass(i?"ui-selecting":"ui-unselecting"),r.unselecting=!i,r.selecting=i,r.selected=i,i?n._trigger("selecting",t,{selecting:r.element}):n._trigger("unselecting",t,{unselecting:r.element}),!1}})},_mouseDrag:function(t){var n=this;this.dragged=!0;if(this.options.disabled)return;var r=this.options,i=this.opos[0],s=this.opos[1],o=t.pageX,u=t.pageY;if(i>o){var a=o;o=i,i=a}if(s>u){var a=u;u=s,s=a}return this.helper.css({left:i,top:s,width:o-i,height:u-s}),this.selectees.each(function(){var a=e.data(this,"selectable-item");if(!a||a.element==n.element[0])return;var f=!1;r.tolerance=="touch"?f=!(a.left>o||a.right<i||a.top>u||a.bottom<s):r.tolerance=="fit"&&(f=a.left>i&&a.right<o&&a.top>s&&a.bottom<u),f?(a.selected&&(a.$element.removeClass("ui-selected"),a.selected=!1),a.unselecting&&(a.$element.removeClass("ui-unselecting"),a.unselecting=!1),a.selecting||(a.$element.addClass("ui-selecting"),a.selecting=!0,n._trigger("selecting",t,{selecting:a.element}))):(a.selecting&&((t.metaKey||t.ctrlKey)&&a.startselected?(a.$element.removeClass("ui-selecting"),a.selecting=!1,a.$element.addClass("ui-selected"),a.selected=!0):(a.$element.removeClass("ui-selecting"),a.selecting=!1,a.startselected&&(a.$element.addClass("ui-unselecting"),a.unselecting=!0),n._trigger("unselecting",t,{unselecting:a.element}))),a.selected&&!t.metaKey&&!t.ctrlKey&&!a.startselected&&(a.$element.removeClass("ui-selected"),a.selected=!1,a.$element.addClass("ui-unselecting"),a.unselecting=!0,n._trigger("unselecting",t,{unselecting:a.element})))}),!1},_mouseStop:function(t){var n=this;this.dragged=!1;var r=this.options;return e(".ui-unselecting",this.element[0]).each(function(){var r=e.data(this,"selectable-item");r.$element.removeClass("ui-unselecting"),r.unselecting=!1,r.startselected=!1,n._trigger("unselected",t,{unselected:r.element})}),e(".ui-selecting",this.element[0]).each(function(){var r=e.data(this,"selectable-item");r.$element.removeClass("ui-selecting").addClass("ui-selected"),r.selecting=!1,r.selected=!0,r.startselected=!0,n._trigger("selected",t,{selected:r.element})}),this._trigger("stop",t),this.helper.remove(),!1}})})(jQuery);(function(e,t){var n,r,i,s,o="ui-button ui-widget ui-state-default ui-corner-all",u="ui-state-hover ui-state-active ",a="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",f=function(){var t=e(this).find(":ui-button");setTimeout(function(){t.button("refresh")},1)},l=function(t){var n=t.name,r=t.form,i=e([]);return n&&(r?i=e(r).find("[name='"+n+"']"):i=e("[name='"+n+"']",t.ownerDocument).filter(function(){return!this.form})),i};e.widget("ui.button",{version:"1.9.2",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,f),typeof this.options.disabled!="boolean"?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var t=this,u=this.options,a=this.type==="checkbox"||this.type==="radio",c=a?"":"ui-state-active",h="ui-state-focus";u.label===null&&(u.label=this.type==="input"?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(o).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){if(u.disabled)return;this===n&&e(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){if(u.disabled)return;e(this).removeClass(c)}).bind("click"+this.eventNamespace,function(e){u.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){t.buttonElement.addClass(h)}).bind("blur"+this.eventNamespace,function(){t.buttonElement.removeClass(h)}),a&&(this.element.bind("change"+this.eventNamespace,function(){if(s)return;t.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(e){if(u.disabled)return;s=!1,r=e.pageX,i=e.pageY}).bind("mouseup"+this.eventNamespace,function(e){if(u.disabled)return;if(r!==e.pageX||i!==e.pageY)s=!0})),this.type==="checkbox"?this.buttonElement.bind("click"+this.eventNamespace,function(){if(u.disabled||s)return!1;e(this).toggleClass("ui-state-active"),t.buttonElement.attr("aria-pressed",t.element[0].checked)}):this.type==="radio"?this.buttonElement.bind("click"+this.eventNamespace,function(){if(u.disabled||s)return!1;e(this).addClass("ui-state-active"),t.buttonElement.attr("aria-pressed","true");var n=t.element[0];l(n).not(n).map(function(){return e(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){if(u.disabled)return!1;e(this).addClass("ui-state-active"),n=this,t.document.one("mouseup",function(){n=null})}).bind("mouseup"+this.eventNamespace,function(){if(u.disabled)return!1;e(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(t){if(u.disabled)return!1;(t.keyCode===e.ui.keyCode.SPACE||t.keyCode===e.ui.keyCode.ENTER)&&e(this).addClass("ui-state-active")}).bind("keyup"+this.eventNamespace,function(){e(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===e.ui.keyCode.SPACE&&e(this).click()})),this._setOption("disabled",u.disabled),this._resetButton()},_determineButtonType:function(){var e,t,n;this.element.is("[type=checkbox]")?this.type="checkbox":this.element.is("[type=radio]")?this.type="radio":this.element.is("input")?this.type="input":this.type="button",this.type==="checkbox"||this.type==="radio"?(e=this.element.parents().last(),t="label[for='"+this.element.attr("id")+"']",this.buttonElement=e.find(t),this.buttonElement.length||(e=e.length?e.siblings():this.element.siblings(),this.buttonElement=e.filter(t),this.buttonElement.length||(this.buttonElement=e.find(t))),this.element.addClass("ui-helper-hidden-accessible"),n=this.element.is(":checked"),n&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",n)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(o+" "+u+" "+a).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(e,t){this._super(e,t);if(e==="disabled"){t?this.element.prop("disabled",!0):this.element.prop("disabled",!1);return}this._resetButton()},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t),this.type==="radio"?l(this.element[0]).each(function(){e(this).is(":checked")?e(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):this.type==="checkbox"&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if(this.type==="input"){this.options.label&&this.element.val(this.options.label);return}var t=this.buttonElement.removeClass(a),n=e("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),r=this.options.icons,i=r.primary&&r.secondary,s=[];r.primary||r.secondary?(this.options.text&&s.push("ui-button-text-icon"+(i?"s":r.primary?"-primary":"-secondary")),r.primary&&t.prepend("<span class='ui-button-icon-primary ui-icon "+r.primary+"'></span>"),r.secondary&&t.append("<span class='ui-button-icon-secondary ui-icon "+r.secondary+"'></span>"),this.options.text||(s.push(i?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||t.attr("title",e.trim(n)))):s.push("ui-button-text-only"),t.addClass(s.join(" "))}}),e.widget("ui.buttonset",{version:"1.9.2",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,t){e==="disabled"&&this.buttons.button("option",e,t),this._super(e,t)},refresh:function(){var t=this.element.css("direction")==="rtl";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})})(jQuery);(function(e,t){var n="ui-dialog ui-widget ui-widget-content ui-corner-all ",r={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};e.widget("ui.dialog",{version:"1.9.2",options:{autoOpen:!0,buttons:{},closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:!1,maxWidth:!1,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var n=e(this).css(t).offset().top;n<0&&e(this).css("top",t.top-n)}},resizable:!0,show:null,stack:!0,title:"",width:300,zIndex:1e3},_create:function(){this.originalTitle=this.element.attr("title"),typeof this.originalTitle!="string"&&(this.originalTitle=""),this.oldPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.options.title=this.options.title||this.originalTitle;var t=this,r=this.options,i=r.title||" ",s,o,u,a,f;s=(this.uiDialog=e("<div>")).addClass(n+r.dialogClass).css({display:"none",outline:0,zIndex:r.zIndex}).attr("tabIndex",-1).keydown(function(n){r.closeOnEscape&&!n.isDefaultPrevented()&&n.keyCode&&n.keyCode===e.ui.keyCode.ESCAPE&&(t.close(n),n.preventDefault())}).mousedown(function(e){t.moveToTop(!1,e)}).appendTo("body"),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(s),o=(this.uiDialogTitlebar=e("<div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").bind("mousedown",function(){s.focus()}).prependTo(s),u=e("<a href='#'></a>").addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").click(function(e){e.preventDefault(),t.close(e)}).appendTo(o),(this.uiDialogTitlebarCloseText=e("<span>")).addClass("ui-icon ui-icon-closethick").text(r.closeText).appendTo(u),a=e("<span>").uniqueId().addClass("ui-dialog-title").html(i).prependTo(o),f=(this.uiDialogButtonPane=e("<div>")).addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),(this.uiButtonSet=e("<div>")).addClass("ui-dialog-buttonset").appendTo(f),s.attr({role:"dialog","aria-labelledby":a.attr("id")}),o.find("*").add(o).disableSelection(),this._hoverable(u),this._focusable(u),r.draggable&&e.fn.draggable&&this._makeDraggable(),r.resizable&&e.fn.resizable&&this._makeResizable(),this._createButtons(r.buttons),this._isOpen=!1,e.fn.bgiframe&&s.bgiframe(),this._on(s,{keydown:function(t){if(!r.modal||t.keyCode!==e.ui.keyCode.TAB)return;var n=e(":tabbable",s),i=n.filter(":first"),o=n.filter(":last");if(t.target===o[0]&&!t.shiftKey)return i.focus(1),!1;if(t.target===i[0]&&t.shiftKey)return o.focus(1),!1}})},_init:function(){this.options.autoOpen&&this.open()},_destroy:function(){var e,t=this.oldPosition;this.overlay&&this.overlay.destroy(),this.uiDialog.hide(),this.element.removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},close:function(t){var n=this,r,i;if(!this._isOpen)return;if(!1===this._trigger("beforeClose",t))return;return this._isOpen=!1,this.overlay&&this.overlay.destroy(),this.options.hide?this._hide(this.uiDialog,this.options.hide,function(){n._trigger("close",t)}):(this.uiDialog.hide(),this._trigger("close",t)),e.ui.dialog.overlay.resize(),this.options.modal&&(r=0,e(".ui-dialog").each(function(){this!==n.uiDialog[0]&&(i=e(this).css("z-index"),isNaN(i)||(r=Math.max(r,i)))}),e.ui.dialog.maxZ=r),this},isOpen:function(){return this._isOpen},moveToTop:function(t,n){var r=this.options,i;return r.modal&&!t||!r.stack&&!r.modal?this._trigger("focus",n):(r.zIndex>e.ui.dialog.maxZ&&(e.ui.dialog.maxZ=r.zIndex),this.overlay&&(e.ui.dialog.maxZ+=1,e.ui.dialog.overlay.maxZ=e.ui.dialog.maxZ,this.overlay.$el.css("z-index",e.ui.dialog.overlay.maxZ)),i={scrollTop:this.element.scrollTop(),scrollLeft:this.element.scrollLeft()},e.ui.dialog.maxZ+=1,this.uiDialog.css("z-index",e.ui.dialog.maxZ),this.element.attr(i),this._trigger("focus",n),this)},open:function(){if(this._isOpen)return;var t,n=this.options,r=this.uiDialog;return this._size(),this._position(n.position),r.show(n.show),this.overlay=n.modal?new e.ui.dialog.overlay(this):null,this.moveToTop(!0),t=this.element.find(":tabbable"),t.length||(t=this.uiDialogButtonPane.find(":tabbable"),t.length||(t=r)),t.eq(0).focus(),this._isOpen=!0,this._trigger("open"),this},_createButtons:function(t){var n=this,r=!1;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),typeof t=="object"&&t!==null&&e.each(t,function(){return!(r=!0)}),r?(e.each(t,function(t,r){var i,s;r=e.isFunction(r)?{click:r,text:t}:r,r=e.extend({type:"button"},r),s=r.click,r.click=function(){s.apply(n.element[0],arguments)},i=e("<button></button>",r).appendTo(n.uiButtonSet),e.fn.button&&i.button()}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog)):this.uiDialog.removeClass("ui-dialog-buttons")},_makeDraggable:function(){function r(e){return{position:e.position,offset:e.offset}}var t=this,n=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(n,i){e(this).addClass("ui-dialog-dragging"),t._trigger("dragStart",n,r(i))},drag:function(e,n){t._trigger("drag",e,r(n))},stop:function(i,s){n.position=[s.position.left-t.document.scrollLeft(),s.position.top-t.document.scrollTop()],e(this).removeClass("ui-dialog-dragging"),t._trigger("dragStop",i,r(s)),e.ui.dialog.overlay.resize()}})},_makeResizable:function(n){function u(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}n=n===t?this.options.resizable:n;var r=this,i=this.options,s=this.uiDialog.css("position"),o=typeof n=="string"?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:i.maxWidth,maxHeight:i.maxHeight,minWidth:i.minWidth,minHeight:this._minHeight(),handles:o,start:function(t,n){e(this).addClass("ui-dialog-resizing"),r._trigger("resizeStart",t,u(n))},resize:function(e,t){r._trigger("resize",e,u(t))},stop:function(t,n){e(this).removeClass("ui-dialog-resizing"),i.height=e(this).height(),i.width=e(this).width(),r._trigger("resizeStop",t,u(n)),e.ui.dialog.overlay.resize()}}).css("position",s).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var e=this.options;return e.height==="auto"?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(t){var n=[],r=[0,0],i;if(t){if(typeof t=="string"||typeof t=="object"&&"0"in t)n=t.split?t.split(" "):[t[0],t[1]],n.length===1&&(n[1]=n[0]),e.each(["left","top"],function(e,t){+n[e]===n[e]&&(r[e]=n[e],n[e]=t)}),t={my:n[0]+(r[0]<0?r[0]:"+"+r[0])+" "+n[1]+(r[1]<0?r[1]:"+"+r[1]),at:n.join(" ")};t=e.extend({},e.ui.dialog.prototype.options.position,t)}else t=e.ui.dialog.prototype.options.position;i=this.uiDialog.is(":visible"),i||this.uiDialog.show(),this.uiDialog.position(t),i||this.uiDialog.hide()},_setOptions:function(t){var n=this,s={},o=!1;e.each(t,function(e,t){n._setOption(e,t),e in r&&(o=!0),e in i&&(s[e]=t)}),o&&this._size(),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",s)},_setOption:function(t,r){var i,s,o=this.uiDialog;switch(t){case"buttons":this._createButtons(r);break;case"closeText":this.uiDialogTitlebarCloseText.text(""+r);break;case"dialogClass":o.removeClass(this.options.dialogClass).addClass(n+r);break;case"disabled":r?o.addClass("ui-dialog-disabled"):o.removeClass("ui-dialog-disabled");break;case"draggable":i=o.is(":data(draggable)"),i&&!r&&o.draggable("destroy"),!i&&r&&this._makeDraggable();break;case"position":this._position(r);break;case"resizable":s=o.is(":data(resizable)"),s&&!r&&o.resizable("destroy"),s&&typeof r=="string"&&o.resizable("option","handles",r),!s&&r!==!1&&this._makeResizable(r);break;case"title":e(".ui-dialog-title",this.uiDialogTitlebar).html(""+(r||" "))}this._super(t,r)},_size:function(){var t,n,r,i=this.options,s=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0}),i.minWidth>i.width&&(i.width=i.minWidth),t=this.uiDialog.css({height:"auto",width:i.width}).outerHeight(),n=Math.max(0,i.minHeight-t),i.height==="auto"?e.support.minHeight?this.element.css({minHeight:n,height:"auto"}):(this.uiDialog.show(),r=this.element.css("height","auto").height(),s||this.uiDialog.hide(),this.element.height(Math.max(r,n))):this.element.height(Math.max(i.height-t,0)),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}}),e.extend(e.ui.dialog,{uuid:0,maxZ:0,getTitleId:function(e){var t=e.attr("id");return t||(this.uuid+=1,t=this.uuid),"ui-dialog-title-"+t},overlay:function(t){this.$el=e.ui.dialog.overlay.create(t)}}),e.extend(e.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:e.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(e){return e+".dialog-overlay"}).join(" "),create:function(t){this.instances.length===0&&(setTimeout(function(){e.ui.dialog.overlay.instances.length&&e(document).bind(e.ui.dialog.overlay.events,function(t){if(e(t.target).zIndex()<e.ui.dialog.overlay.maxZ)return!1})},1),e(window).bind("resize.dialog-overlay",e.ui.dialog.overlay.resize));var n=this.oldInstances.pop()||e("<div>").addClass("ui-widget-overlay");return e(document).bind("keydown.dialog-overlay",function(r){var i=e.ui.dialog.overlay.instances;i.length!==0&&i[i.length-1]===n&&t.options.closeOnEscape&&!r.isDefaultPrevented()&&r.keyCode&&r.keyCode===e.ui.keyCode.ESCAPE&&(t.close(r),r.preventDefault())}),n.appendTo(document.body).css({width:this.width(),height:this.height()}),e.fn.bgiframe&&n.bgiframe(),this.instances.push(n),n},destroy:function(t){var n=e.inArray(t,this.instances),r=0;n!==-1&&this.oldInstances.push(this.instances.splice(n,1)[0]),this.instances.length===0&&e([document,window]).unbind(".dialog-overlay"),t.height(0).width(0).remove(),e.each(this.instances,function(){r=Math.max(r,this.css("z-index"))}),this.maxZ=r},height:function(){var t,n;return e.ui.ie?(t=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),n=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),t<n?e(window).height()+"px":t+"px"):e(document).height()+"px"},width:function(){var t,n;return e.ui.ie?(t=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),n=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth),t<n?e(window).width()+"px":t+"px"):e(document).width()+"px"},resize:function(){var t=e([]);e.each(e.ui.dialog.overlay.instances,function(){t=t.add(this)}),t.css({width:0,height:0}).css({width:e.ui.dialog.overlay.width(),height:e.ui.dialog.overlay.height()})}}),e.extend(e.ui.dialog.overlay.prototype,{destroy:function(){e.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);(function(e,t){var n=!1;e.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,e.proxy(function(e){this.options.disabled&&e.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(e){e.preventDefault()},"click .ui-state-disabled > a":function(e){e.preventDefault()},"click .ui-menu-item:has(a)":function(t){var r=e(t.target).closest(".ui-menu-item");!n&&r.not(".ui-state-disabled").length&&(n=!0,this.select(t),r.has(".ui-menu").length?this.expand(t):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&this.active.parents(".ui-menu").length===1&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){var n=e(t.currentTarget);n.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(t,n)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var n=this.active||this.element.children(".ui-menu-item").eq(0);t||this.focus(e,n)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){e(t.target).closest(".ui-menu").length||this.collapseAll(t),n=!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 t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){function a(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var n,r,i,s,o,u=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:u=!1,r=this.previousFilter||"",i=String.fromCharCode(t.keyCode),s=!1,clearTimeout(this.filterTimer),i===r?s=!0:i=r+i,o=new RegExp("^"+a(i),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return o.test(e(this).children("a").text())}),n=s&&n.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):n,n.length||(i=String.fromCharCode(t.keyCode),o=new RegExp("^"+a(i),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return o.test(e(this).children("a").text())})),n.length?(this.focus(t,n),n.length>1?(this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}u&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var t,n=this.options.icons.submenu,r=this.element.find(this.options.menus);r.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 t=e(this),r=t.prev("a"),i=e("<span>").addClass("ui-menu-icon ui-icon "+n).data("ui-menu-submenu-carat",!0);r.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",r.attr("id"))}),t=r.add(this.element),t.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()}),t.children(":not(.ui-menu-item)").each(function(){var t=e(this);/[^\-—–\s]/.test(t.text())||t.addClass("ui-widget-content ui-menu-divider")}),t.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},focus:function(e,t){var n,r;this.blur(e,e&&e.type==="focus"),this._scrollIntoView(t),this.active=t.first(),r=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",r.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),e&&e.type==="keydown"?this._close():this.timer=this._delay(function(){this._close()},this.delay),n=t.children(".ui-menu"),n.length&&/^mouse/.test(e.type)&&this._startOpening(n),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var n,r,i,s,o,u;this._hasScroll()&&(n=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,r=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,i=t.offset().top-this.activeMenu.offset().top-n-r,s=this.activeMenu.scrollTop(),o=this.activeMenu.height(),u=t.height(),i<0?this.activeMenu.scrollTop(s+i):i+u>o&&this.activeMenu.scrollTop(s+i-o+u))},blur:function(e,t){t||clearTimeout(this.timer);if(!this.active)return;this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active})},_startOpening:function(e){clearTimeout(this.timer);if(e.attr("aria-hidden")!=="true")return;this.timer=this._delay(function(){this._close(),this._open(e)},this.delay)},_open:function(t){var n=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(n)},collapseAll:function(t,n){clearTimeout(this.timer),this.timer=this._delay(function(){var r=n?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));r.length||(r=this.element),this._close(r),this.blur(t),this.activeMenu=r},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},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(e,t,n){var r;this.active&&(e==="first"||e==="last"?r=this.active[e==="first"?"prevAll":"nextAll"](".ui-menu-item").eq(-1):r=this.active[e+"All"](".ui-menu-item").eq(0));if(!r||!r.length||!this.active)r=this.activeMenu.children(".ui-menu-item")[t]();this.focus(n,r)},nextPage:function(t){var n,r,i;if(!this.active){this.next(t);return}if(this.isLastItem())return;this._hasScroll()?(r=this.active.offset().top,i=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return n=e(this),n.offset().top-r-i<0}),this.focus(t,n)):this.focus(t,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())},previousPage:function(t){var n,r,i;if(!this.active){this.next(t);return}if(this.isFirstItem())return;this._hasScroll()?(r=this.active.offset().top,i=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return n=e(this),n.offset().top-r+i>0}),this.focus(t,n)):this.focus(t,this.activeMenu.children(".ui-menu-item").first())},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||e(t.target).closest(".ui-menu-item");var n={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,n)}})})(jQuery);(function(e,t){e.widget("ui.progressbar",{version:"1.9.2",options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()}),this.valueDiv=e("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this.oldValue=this._value(),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(e){return e===t?this._value():(this._setOption("value",e),this)},_setOption:function(e,t){e==="value"&&(this.options.value=t,this._refreshValue(),this._value()===this.options.max&&this._trigger("complete")),this._super(e,t)},_value:function(){var e=this.options.value;return typeof e!="number"&&(e=0),Math.min(this.options.max,Math.max(this.min,e))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var e=this.value(),t=this._percentage();this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),this.valueDiv.toggle(e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(t.toFixed(0)+"%"),this.element.attr("aria-valuenow",e)}})})(jQuery);(function(e,t){var n=5;e.widget("ui.slider",e.ui.mouse,{version:"1.9.2",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var t,r,i=this.options,s=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",u=[];this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"+(i.disabled?" ui-slider-disabled ui-disabled":"")),this.range=e([]),i.range&&(i.range===!0&&(i.values||(i.values=[this._valueMin(),this._valueMin()]),i.values.length&&i.values.length!==2&&(i.values=[i.values[0],i.values[0]])),this.range=e("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(i.range==="min"||i.range==="max"?" ui-slider-range-"+i.range:""))),r=i.values&&i.values.length||1;for(t=s.length;t<r;t++)u.push(o);this.handles=s.add(e(u.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.add(this.range).filter("a").click(function(e){e.preventDefault()}).mouseenter(function(){i.disabled||e(this).addClass("ui-state-hover")}).mouseleave(function(){e(this).removeClass("ui-state-hover")}).focus(function(){i.disabled?e(this).blur():(e(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),e(this).addClass("ui-state-focus"))}).blur(function(){e(this).removeClass("ui-state-focus")}),this.handles.each(function(t){e(this).data("ui-slider-handle-index",t)}),this._on(this.handles,{keydown:function(t){var r,i,s,o,u=e(t.target).data("ui-slider-handle-index");switch(t.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:t.preventDefault();if(!this._keySliding){this._keySliding=!0,e(t.target).addClass("ui-state-active"),r=this._start(t,u);if(r===!1)return}}o=this.options.step,this.options.values&&this.options.values.length?i=s=this.values(u):i=s=this.value();switch(t.keyCode){case e.ui.keyCode.HOME:s=this._valueMin();break;case e.ui.keyCode.END:s=this._valueMax();break;case e.ui.keyCode.PAGE_UP:s=this._trimAlignValue(i+(this._valueMax()-this._valueMin())/n);break;case e.ui.keyCode.PAGE_DOWN:s=this._trimAlignValue(i-(this._valueMax()-this._valueMin())/n);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(i===this._valueMax())return;s=this._trimAlignValue(i+o);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(i===this._valueMin())return;s=this._trimAlignValue(i-o)}this._slide(t,u,s)},keyup:function(t){var n=e(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,n),this._change(t,n),e(t.target).removeClass("ui-state-active"))}}),this._refreshValue(),this._animateOff=!1},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(t){var n,r,i,s,o,u,a,f,l=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),n={x:t.pageX,y:t.pageY},r=this._normValueFromMouse(n),i=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var n=Math.abs(r-l.values(t));i>n&&(i=n,s=e(this),o=t)}),c.range===!0&&this.values(1)===c.min&&(o+=1,s=e(this.handles[o])),u=this._start(t,o),u===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,s.addClass("ui-state-active").focus(),a=s.offset(),f=!e(t.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=f?{left:0,top:0}:{left:t.pageX-a.left-s.width()/2,top:t.pageY-a.top-s.height()/2-(parseInt(s.css("borderTopWidth"),10)||0)-(parseInt(s.css("borderBottomWidth"),10)||0)+(parseInt(s.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,o,r),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,n),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,n,r,i,s;return this.orientation==="horizontal"?(t=this.elementSize.width,n=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,n=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),r=n/t,r>1&&(r=1),r<0&&(r=0),this.orientation==="vertical"&&(r=1-r),i=this._valueMax()-this._valueMin(),s=this._valueMin()+r*i,this._trimAlignValue(s)},_start:function(e,t){var n={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._trigger("start",e,n)},_slide:function(e,t,n){var r,i,s;this.options.values&&this.options.values.length?(r=this.values(t?0:1),this.options.values.length===2&&this.options.range===!0&&(t===0&&n>r||t===1&&n<r)&&(n=r),n!==this.values(t)&&(i=this.values(),i[t]=n,s=this._trigger("slide",e,{handle:this.handles[t],value:n,values:i}),r=this.values(t?0:1),s!==!1&&this.values(t,n,!0))):n!==this.value()&&(s=this._trigger("slide",e,{handle:this.handles[t],value:n}),s!==!1&&this.value(n))},_stop:function(e,t){var n={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._trigger("stop",e,n)},_change:function(e,t){if(!this._keySliding&&!this._mouseSliding){var n={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._trigger("change",e,n)}},value:function(e){if(arguments.length){this.options.value=this._trimAlignValue(e),this._refreshValue(),this._change(null,0);return}return this._value()},values:function(t,n){var r,i,s;if(arguments.length>1){this.options.values[t]=this._trimAlignValue(n),this._refreshValue(),this._change(null,t);return}if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();r=this.options.values,i=arguments[0];for(s=0;s<r.length;s+=1)r[s]=this._trimAlignValue(i[s]),this._change(null,s);this._refreshValue()},_setOption:function(t,n){var r,i=0;e.isArray(this.options.values)&&(i=this.options.values.length),e.Widget.prototype._setOption.apply(this,arguments);switch(t){case"disabled":n?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.prop("disabled",!0),this.element.addClass("ui-disabled")):(this.handles.prop("disabled",!1),this.element.removeClass("ui-disabled"));break;case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":this._animateOff=!0,this._refreshValue();for(r=0;r<i;r+=1)this._change(null,r);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1}},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e),e},_values:function(e){var t,n,r;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t),t;n=this.options.values.slice();for(r=0;r<n.length;r+=1)n[r]=this._trimAlignValue(n[r]);return n},_trimAlignValue:function(e){if(e<=this._valueMin())return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,n=(e-this._valueMin())%t,r=e-n;return Math.abs(n)*2>=t&&(r+=n>0?t:-t),parseFloat(r.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var t,n,r,i,s,o=this.options.range,u=this.options,a=this,f=this._animateOff?!1:u.animate,l={};this.options.values&&this.options.values.length?this.handles.each(function(r){n=(a.values(r)-a._valueMin())/(a._valueMax()-a._valueMin())*100,l[a.orientation==="horizontal"?"left":"bottom"]=n+"%",e(this).stop(1,1)[f?"animate":"css"](l,u.animate),a.options.range===!0&&(a.orientation==="horizontal"?(r===0&&a.range.stop(1,1)[f?"animate":"css"]({left:n+"%"},u.animate),r===1&&a.range[f?"animate":"css"]({width:n-t+"%"},{queue:!1,duration:u.animate})):(r===0&&a.range.stop(1,1)[f?"animate":"css"]({bottom:n+"%"},u.animate),r===1&&a.range[f?"animate":"css"]({height:n-t+"%"},{queue:!1,duration:u.animate}))),t=n}):(r=this.value(),i=this._valueMin(),s=this._valueMax(),n=s!==i?(r-i)/(s-i)*100:0,l[this.orientation==="horizontal"?"left":"bottom"]=n+"%",this.handle.stop(1,1)[f?"animate":"css"](l,u.animate),o==="min"&&this.orientation==="horizontal"&&this.range.stop(1,1)[f?"animate":"css"]({width:n+"%"},u.animate),o==="max"&&this.orientation==="horizontal"&&this.range[f?"animate":"css"]({width:100-n+"%"},{queue:!1,duration:u.animate}),o==="min"&&this.orientation==="vertical"&&this.range.stop(1,1)[f?"animate":"css"]({height:n+"%"},u.animate),o==="max"&&this.orientation==="vertical"&&this.range[f?"animate":"css"]({height:100-n+"%"},{queue:!1,duration:u.animate}))}})})(jQuery);(function(e){function t(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}e.widget("ui.spinner",{version:"1.9.2",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var t={},n=this.element;return e.each(["min","max","step"],function(e,r){var i=n.attr(r);i!==undefined&&i.length&&(t[r]=i)}),t},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(e){if(this.cancelBlur){delete this.cancelBlur;return}this._refresh(),this.previous!==this.element.val()&&this._trigger("change",e)},mousewheel:function(e,t){if(!t)return;if(!this.spinning&&!this._start(e))return!1;this._spin((t>0?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()},"mousedown .ui-spinner-button":function(t){function r(){var e=this.element[0]===this.document[0].activeElement;e||(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n}))}var n;n=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),t.preventDefault(),r.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,r.call(this)});if(this._start(t)===!1)return;this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){if(!e(t.currentTarget).hasClass("ui-state-active"))return;if(this._start(t)===!1)return!1;this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var e=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=e.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(e.height()*.5)&&e.height()>0&&e.height(e.height()),this.options.disabled&&this.disable()},_keydown:function(t){var n=this.options,r=e.ui.keyCode;switch(t.keyCode){case r.UP:return this._repeat(null,1,t),!0;case r.DOWN:return this._repeat(null,-1,t),!0;case r.PAGE_UP:return this._repeat(null,n.page,t),!0;case r.PAGE_DOWN:return this._repeat(null,-n.page,t),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>▲</span>"+"</a>"+"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>"+"<span class='ui-icon "+this.options.icons.down+"'>▼</span>"+"</a>"},_start:function(e){return!this.spinning&&this._trigger("start",e)===!1?!1:(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(e,t,n){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,n)},e),this._spin(t*this.options.step,n)},_spin:function(e,t){var n=this.value()||0;this.counter||(this.counter=1),n=this._adjustValue(n+e*this._increment(this.counter));if(!this.spinning||this._trigger("spin",t,{value:n})!==!1)this._value(n),this.counter++},_increment:function(t){var n=this.options.incremental;return n?e.isFunction(n)?n(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return this.options.min!==null&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),n=t.indexOf(".");return n===-1?0:t.length-n-1},_adjustValue:function(e){var t,n,r=this.options;return t=r.min!==null?r.min:0,n=e-t,n=Math.round(n/r.step)*r.step,e=t+n,e=parseFloat(e.toFixed(this._precision())),r.max!==null&&e>r.max?r.max:r.min!==null&&e<r.min?r.min:e},_stop:function(e){if(!this.spinning)return;clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",e)},_setOption:function(e,t){if(e==="culture"||e==="numberFormat"){var n=this._parse(this.element.val());this.options[e]=t,this.element.val(this._format(n));return}(e==="max"||e==="min"||e==="step")&&typeof t=="string"&&(t=this._parse(t)),this._super(e,t),e==="disabled"&&(t?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:t(function(e){this._super(e),this._value(this.element.val())}),_parse:function(e){return typeof e=="string"&&e!==""&&(e=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(e,10,this.options.culture):+e),e===""||isNaN(e)?null:e},_format:function(e){return e===""?"":window.Globalize&&this.options.numberFormat?Globalize.format(e,this.options.numberFormat,this.options.culture):e},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(e,t){var n;e!==""&&(n=this._parse(e),n!==null&&(t||(n=this._adjustValue(n)),e=this._format(n))),this.element.val(e),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:t(function(e){this._stepUp(e)}),_stepUp:function(e){this._spin((e||1)*this.options.step)},stepDown:t(function(e){this._stepDown(e)}),_stepDown:function(e){this._spin((e||1)*-this.options.step)},pageUp:t(function(e){this._stepUp((e||1)*this.options.page)}),pageDown:t(function(e){this._stepDown((e||1)*this.options.page)}),value:function(e){if(!arguments.length)return this._parse(this.element.val());t(this._value).call(this,e)},widget:function(){return this.uiSpinner}})})(jQuery);(function(e){function n(t,n){var r=(t.attr("aria-describedby")||"").split(/\s+/);r.push(n),t.data("ui-tooltip-id",n).attr("aria-describedby",e.trim(r.join(" ")))}function r(t){var n=t.data("ui-tooltip-id"),r=(t.attr("aria-describedby")||"").split(/\s+/),i=e.inArray(n,r);i!==-1&&r.splice(i,1),t.removeData("ui-tooltip-id"),r=e.trim(r.join(" ")),r?t.attr("aria-describedby",r):t.removeAttr("aria-describedby")}var t=0;e.widget("ui.tooltip",{version:"1.9.2",options:{content:function(){return e(this).attr("title")},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(t,n){var r=this;if(t==="disabled"){this[n?"_disable":"_enable"](),this.options[t]=n;return}this._super(t,n),t==="content"&&e.each(this.tooltips,function(e,t){r._updateContent(t)})},_disable:function(){var t=this;e.each(this.tooltips,function(n,r){var i=e.Event("blur");i.target=i.currentTarget=r[0],t.close(i,!0)}),this.element.find(this.options.items).andSelf().each(function(){var t=e(this);t.is("[title]")&&t.data("ui-tooltip-title",t.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).andSelf().each(function(){var t=e(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})},open:function(t){var n=this,r=e(t?t.target:this.element).closest(this.options.items);if(!r.length||r.data("ui-tooltip-id"))return;r.attr("title")&&r.data("ui-tooltip-title",r.attr("title")),r.data("ui-tooltip-open",!0),t&&t.type==="mouseover"&&r.parents().each(function(){var t=e(this),r;t.data("ui-tooltip-open")&&(r=e.Event("blur"),r.target=r.currentTarget=this,n.close(r,!0)),t.attr("title")&&(t.uniqueId(),n.parents[this.id]={element:this,title:t.attr("title")},t.attr("title",""))}),this._updateContent(r,t)},_updateContent:function(e,t){var n,r=this.options.content,i=this,s=t?t.type:null;if(typeof r=="string")return this._open(t,e,r);n=r.call(e[0],function(n){if(!e.data("ui-tooltip-open"))return;i._delay(function(){t&&(t.type=s),this._open(t,e,n)})}),n&&this._open(t,e,n)},_open:function(t,r,i){function f(e){a.of=e;if(s.is(":hidden"))return;s.position(a)}var s,o,u,a=e.extend({},this.options.position);if(!i)return;s=this._find(r);if(s.length){s.find(".ui-tooltip-content").html(i);return}r.is("[title]")&&(t&&t.type==="mouseover"?r.attr("title",""):r.removeAttr("title")),s=this._tooltip(r),n(r,s.attr("id")),s.find(".ui-tooltip-content").html(i),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:f}),f(t)):s.position(e.extend({of:r},this.options.position)),s.hide(),this._show(s,this.options.show),this.options.show&&this.options.show.delay&&(u=setInterval(function(){s.is(":visible")&&(f(a.of),clearInterval(u))},e.fx.interval)),this._trigger("open",t,{tooltip:s}),o={keyup:function(t){if(t.keyCode===e.ui.keyCode.ESCAPE){var n=e.Event(t);n.currentTarget=r[0],this.close(n,!0)}},remove:function(){this._removeTooltip(s)}};if(!t||t.type==="mouseover")o.mouseleave="close";if(!t||t.type==="focusin")o.focusout="close";this._on(!0,r,o)},close:function(t){var n=this,i=e(t?t.currentTarget:this.element),s=this._find(i);if(this.closing)return;i.data("ui-tooltip-title")&&i.attr("title",i.data("ui-tooltip-title")),r(i),s.stop(!0),this._hide(s,this.options.hide,function(){n._removeTooltip(e(this))}),i.removeData("ui-tooltip-open"),this._off(i,"mouseleave focusout keyup"),i[0]!==this.element[0]&&this._off(i,"remove"),this._off(this.document,"mousemove"),t&&t.type==="mouseleave"&&e.each(this.parents,function(t,r){e(r.element).attr("title",r.title),delete n.parents[t]}),this.closing=!0,this._trigger("close",t,{tooltip:s}),this.closing=!1},_tooltip:function(n){var r="ui-tooltip-"+t++,i=e("<div>").attr({id:r,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return e("<div>").addClass("ui-tooltip-content").appendTo(i),i.appendTo(this.document[0].body),e.fn.bgiframe&&i.bgiframe(),this.tooltips[r]=n,i},_find:function(t){var n=t.data("ui-tooltip-id");return n?e("#"+n):e()},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr("id")]},_destroy:function(){var t=this;e.each(this.tooltips,function(n,r){var i=e.Event("blur");i.target=i.currentTarget=r[0],t.close(i,!0),e("#"+n).remove(),r.data("ui-tooltip-title")&&(r.attr("title",r.data("ui-tooltip-title")),r.removeData("ui-tooltip-title"))})}})})(jQuery); \ No newline at end of file Added: trunk/cantharella.web/src/main/webapp/js/jquery-1.9.0.min.js =================================================================== --- trunk/cantharella.web/src/main/webapp/js/jquery-1.9.0.min.js (rev 0) +++ trunk/cantharella.web/src/main/webapp/js/jquery-1.9.0.min.js 2013-01-24 11:34:39 UTC (rev 57) @@ -0,0 +1,4 @@ +/*! jQuery v1.9.0 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license */(function(e,t){"use strict";function n(e){var t=e.length,n=st.type(e);return st.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e){var t=Tt[e]={};return st.each(e.match(lt)||[],function(e,n){t[n]=!0}),t}function i(e,n,r,i){if(st.acceptData(e)){var o,a,s=st.expando,u="string"==typeof n,l=e.nodeType,c=l?st.cache:e,f=l?e[s]:e[s]&&s;if(f&&c[f]&&(i||c[f].data)||!u||r!==t)return f||(l?e[s]=f=K.pop()||st.guid++:f=s),c[f]||(c[f]={},l||(c[f].toJSON=st.noop)),("object"==typeof n||"function"==typeof n)&&(i?c[f]=st.extend(c[f],n):c[f].data=st.extend(c[f].data,n)),o=c[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[st.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[st.camelCase(n)])):a=o,a}}function o(e,t,n){if(st.acceptData(e)){var r,i,o,a=e.nodeType,u=a?st.cache:e,l=a?e[st.expando]:st.expando;if(u[l]){if(t&&(r=n?u[l]:u[l].data)){st.isArray(t)?t=t.concat(st.map(t,st.camelCase)):t in r?t=[t]:(t=st.camelCase(t),t=t in r?[t]:t.split(" "));for(i=0,o=t.length;o>i;i++)delete r[t[i]];if(!(n?s:st.isEmptyObject)(r))return}(n||(delete u[l].data,s(u[l])))&&(a?st.cleanData([e],!0):st.support.deleteExpando||u!=u.window?delete u[l]:u[l]=null)}}}function a(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(Nt,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:wt.test(r)?st.parseJSON(r):r}catch(o){}st.data(e,n,r)}else r=t}return r}function s(e){var t;for(t in e)if(("data"!==t||!st.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function u(){return!0}function l(){return!1}function c(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function f(e,t,n){if(t=t||0,st.isFunction(t))return st.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return st.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=st.grep(e,function(e){return 1===e.nodeType});if(Wt.test(t))return st.filter(t,r,!n);t=st.filter(t,r)}return st.grep(e,function(e){return st.inArray(e,t)>=0===n})}function p(e){var t=zt.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function d(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function h(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function g(e){var t=nn.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function m(e,t){for(var n,r=0;null!=(n=e[r]);r++)st._data(n,"globalEval",!t||st._data(t[r],"globalEval"))}function y(e,t){if(1===t.nodeType&&st.hasData(e)){var n,r,i,o=st._data(e),a=st._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)st.event.add(t,n,s[n][r])}a.data&&(a.data=st.extend({},a.data))}}function v(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!st.support.noCloneEvent&&t[st.expando]){r=st._data(t);for(i in r.events)st.removeEvent(t,i,r.handle);t.removeAttribute(st.expando)}"script"===n&&t.text!==e.text?(h(t).text=e.text,g(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),st.support.html5Clone&&e.innerHTML&&!st.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Zt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function b(e,n){var r,i,o=0,a=e.getElementsByTagName!==t?e.getElementsByTagName(n||"*"):e.querySelectorAll!==t?e.querySelectorAll(n||"*"):t;if(!a)for(a=[],r=e.childNodes||e;null!=(i=r[o]);o++)!n||st.nodeName(i,n)?a.push(i):st.merge(a,b(i,n));return n===t||n&&st.nodeName(e,n)?st.merge([e],a):a}function x(e){Zt.test(e.type)&&(e.defaultChecked=e.checked)}function T(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Nn.length;i--;)if(t=Nn[i]+n,t in e)return t;return r}function w(e,t){return e=t||e,"none"===st.css(e,"display")||!st.contains(e.ownerDocument,e)}function N(e,t){for(var n,r=[],i=0,o=e.length;o>i;i++)n=e[i],n.style&&(r[i]=st._data(n,"olddisplay"),t?(r[i]||"none"!==n.style.display||(n.style.display=""),""===n.style.display&&w(n)&&(r[i]=st._data(n,"olddisplay",S(n.nodeName)))):r[i]||w(n)||st._data(n,"olddisplay",st.css(n,"display")));for(i=0;o>i;i++)n=e[i],n.style&&(t&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=t?r[i]||"":"none"));return e}function C(e,t,n){var r=mn.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function k(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=st.css(e,n+wn[o],!0,i)),r?("content"===n&&(a-=st.css(e,"padding"+wn[o],!0,i)),"margin"!==n&&(a-=st.css(e,"border"+wn[o]+"Width",!0,i))):(a+=st.css(e,"padding"+wn[o],!0,i),"padding"!==n&&(a+=st.css(e,"border"+wn[o]+"Width",!0,i)));return a}function E(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=ln(e),a=st.support.boxSizing&&"border-box"===st.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=un(e,t,o),(0>i||null==i)&&(i=e.style[t]),yn.test(i))return i;r=a&&(st.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+k(e,t,n||(a?"border":"content"),r,o)+"px"}function S(e){var t=V,n=bn[e];return n||(n=A(e,t),"none"!==n&&n||(cn=(cn||st("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(cn[0].contentWindow||cn[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=A(e,t),cn.detach()),bn[e]=n),n}function A(e,t){var n=st(t.createElement(e)).appendTo(t.body),r=st.css(n[0],"display");return n.remove(),r}function j(e,t,n,r){var i;if(st.isArray(t))st.each(t,function(t,i){n||kn.test(e)?r(e,i):j(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==st.type(t))r(e,t);else for(i in t)j(e+"["+i+"]",t[i],n,r)}function D(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(lt)||[];if(st.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function L(e,n,r,i){function o(u){var l;return a[u]=!0,st.each(e[u]||[],function(e,u){var c=u(n,r,i);return"string"!=typeof c||s||a[c]?s?!(l=c):t:(n.dataTypes.unshift(c),o(c),!1)}),l}var a={},s=e===$n;return o(n.dataTypes[0])||!a["*"]&&o("*")}function H(e,n){var r,i,o=st.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((o[r]?e:i||(i={}))[r]=n[r]);return i&&st.extend(!0,e,i),e}function M(e,n,r){var i,o,a,s,u=e.contents,l=e.dataTypes,c=e.responseFields;for(o in c)o in r&&(n[c[o]]=r[o]);for(;"*"===l[0];)l.shift(),i===t&&(i=e.mimeType||n.getResponseHeader("Content-Type"));if(i)for(o in u)if(u[o]&&u[o].test(i)){l.unshift(o);break}if(l[0]in r)a=l[0];else{for(o in r){if(!l[0]||e.converters[o+" "+l[0]]){a=o;break}s||(s=o)}a=a||s}return a?(a!==l[0]&&l.unshift(a),r[a]):t}function q(e,t){var n,r,i,o,a={},s=0,u=e.dataTypes.slice(),l=u[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u[1])for(n in e.converters)a[n.toLowerCase()]=e.converters[n];for(;i=u[++s];)if("*"!==i){if("*"!==l&&l!==i){if(n=a[l+" "+i]||a["* "+i],!n)for(r in a)if(o=r.split(" "),o[1]===i&&(n=a[l+" "+o[0]]||a["* "+o[0]])){n===!0?n=a[r]:a[r]!==!0&&(i=o[0],u.splice(s--,0,i));break}if(n!==!0)if(n&&e["throws"])t=n(t);else try{t=n(t)}catch(c){return{state:"parsererror",error:n?c:"No conversion from "+l+" to "+i}}}l=i}return{state:"success",data:t}}function _(){try{return new e.XMLHttpRequest}catch(t){}}function F(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function O(){return setTimeout(function(){Qn=t}),Qn=st.now()}function B(e,t){st.each(t,function(t,n){for(var r=(rr[t]||[]).concat(rr["*"]),i=0,o=r.length;o>i;i++)if(r[i].call(e,t,n))return})}function P(e,t,n){var r,i,o=0,a=nr.length,s=st.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=Qn||O(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;u>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:st.extend({},t),opts:st.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Qn||O(),duration:n.duration,tweens:[],createTween:function(t,n){var r=st.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),c=l.props;for(R(c,l.opts.specialEasing);a>o;o++)if(r=nr[o].call(l,e,c,l.opts))return r;return B(l,c),st.isFunction(l.opts.start)&&l.opts.start.call(e,l),st.fx.timer(st.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function R(e,t){var n,r,i,o,a;for(n in e)if(r=st.camelCase(n),i=t[r],o=e[n],st.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=st.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function W(e,t,n){var r,i,o,a,s,u,l,c,f,p=this,d=e.style,h={},g=[],m=e.nodeType&&w(e);n.queue||(c=st._queueHooks(e,"fx"),null==c.unqueued&&(c.unqueued=0,f=c.empty.fire,c.empty.fire=function(){c.unqueued||f()}),c.unqueued++,p.always(function(){p.always(function(){c.unqueued--,st.queue(e,"fx").length||c.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===st.css(e,"display")&&"none"===st.css(e,"float")&&(st.support.inlineBlockNeedsLayout&&"inline"!==S(e.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",st.support.shrinkWrapBlocks||p.done(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(r in t)if(o=t[r],Zn.exec(o)){if(delete t[r],u=u||"toggle"===o,o===(m?"hide":"show"))continue;g.push(r)}if(a=g.length){s=st._data(e,"fxshow")||st._data(e,"fxshow",{}),"hidden"in s&&(m=s.hidden),u&&(s.hidden=!m),m?st(e).show():p.done(function(){st(e).hide()}),p.done(function(){var t;st._removeData(e,"fxshow");for(t in h)st.style(e,t,h[t])});for(r=0;a>r;r++)i=g[r],l=p.createTween(i,m?s[i]:0),h[i]=s[i]||st.style(e,i),i in s||(s[i]=l.start,m&&(l.end=l.start,l.start="width"===i||"height"===i?1:0))}}function $(e,t,n,r,i){return new $.prototype.init(e,t,n,r,i)}function I(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=wn[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function z(e){return st.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var X,U,V=e.document,Y=e.location,J=e.jQuery,G=e.$,Q={},K=[],Z="1.9.0",et=K.concat,tt=K.push,nt=K.slice,rt=K.indexOf,it=Q.toString,ot=Q.hasOwnProperty,at=Z.trim,st=function(e,t){return new st.fn.init(e,t,X)},ut=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,lt=/\S+/g,ct=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ft=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,pt=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,dt=/^[\],:{}\s]*$/,ht=/(?:^|:|,)(?:\s*\[)+/g,gt=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,mt=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,yt=/^-ms-/,vt=/-([\da-z])/gi,bt=function(e,t){return t.toUpperCase()},xt=function(){V.addEventListener?(V.removeEventListener("DOMContentLoaded",xt,!1),st.ready()):"complete"===V.readyState&&(V.detachEvent("onreadystatechange",xt),st.ready())};st.fn=st.prototype={jquery:Z,constructor:st,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:ft.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof st?n[0]:n,st.merge(this,st.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:V,!0)),pt.test(i[1])&&st.isPlainObject(n))for(i in n)st.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=V.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=V,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):st.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),st.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return nt.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=st.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return st.each(this,e,t)},ready:function(e){return st.ready.promise().done(e),this},slice:function(){return this.pushStack(nt.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(st.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:tt,sort:[].sort,splice:[].splice},st.fn.init.prototype=st.fn,st.extend=st.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||st.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(e=arguments[u]))for(n in e)r=s[n],i=e[n],s!==i&&(c&&i&&(st.isPlainObject(i)||(o=st.isArray(i)))?(o?(o=!1,a=r&&st.isArray(r)?r:[]):a=r&&st.isPlainObject(r)?r:{},s[n]=st.extend(c,a,i)):i!==t&&(s[n]=i));return s},st.extend({noConflict:function(t){return e.$===st&&(e.$=G),t&&e.jQuery===st&&(e.jQuery=J),st},isReady:!1,readyWait:1,holdReady:function(e){e?st.readyWait++:st.ready(!0)},ready:function(e){if(e===!0?!--st.readyWait:!st.isReady){if(!V.body)return setTimeout(st.ready);st.isReady=!0,e!==!0&&--st.readyWait>0||(U.resolveWith(V,[st]),st.fn.trigger&&st(V).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===st.type(e)},isArray:Array.isArray||function(e){return"array"===st.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?Q[it.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==st.type(e)||e.nodeType||st.isWindow(e))return!1;try{if(e.constructor&&!ot.call(e,"constructor")&&!ot.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||ot.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||V;var r=pt.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=st.buildFragment([e],t,i),i&&st(i).remove(),st.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=st.trim(n),n&&dt.test(n.replace(gt,"@").replace(mt,"]").replace(ht,"")))?Function("return "+n)():(st.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||st.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&st.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(yt,"ms-").replace(vt,bt)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,r){var i,o=0,a=e.length,s=n(e);if(r){if(s)for(;a>o&&(i=t.apply(e[o],r),i!==!1);o++);else for(o in e)if(i=t.apply(e[o],r),i===!1)break}else if(s)for(;a>o&&(i=t.call(e[o],o,e[o]),i!==!1);o++);else for(o in e)if(i=t.call(e[o],o,e[o]),i===!1)break;return e},trim:at&&!at.call("\ufeff\u00a0")?function(e){return null==e?"":at.call(e)}:function(e){return null==e?"":(e+"").replace(ct,"")},makeArray:function(e,t){var r=t||[];return null!=e&&(n(Object(e))?st.merge(r,"string"==typeof e?[e]:e):tt.call(r,e)),r},inArray:function(e,t,n){var r;if(t){if(rt)return rt.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else for(;n[o]!==t;)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,r){var i,o=0,a=e.length,s=n(e),u=[];if(s)for(;a>o;o++)i=t(e[o],o,r),null!=i&&(u[u.length]=i);else for(o in e)i=t(e[o],o,r),null!=i&&(u[u.length]=i);return et.apply([],u)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(r=e[n],n=e,e=r),st.isFunction(e)?(i=nt.call(arguments,2),o=function(){return e.apply(n||this,i.concat(nt.call(arguments)))},o.guid=e.guid=e.guid||st.guid++,o):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===st.type(r)){o=!0;for(u in r)st.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,st.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(st(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),st.ready.promise=function(t){if(!U)if(U=st.Deferred(),"complete"===V.readyState)setTimeout(st.ready);else if(V.addEventListener)V.addEventListener("DOMContentLoaded",xt,!1),e.addEventListener("load",st.ready,!1);else{V.attachEvent("onreadystatechange",xt),e.attachEvent("onload",st.ready);var n=!1;try{n=null==e.frameElement&&V.documentElement}catch(r){}n&&n.doScroll&&function i(){if(!st.isReady){try{n.doScroll("left")}catch(e){return setTimeout(i,50)}st.ready()}}()}return U.promise(t)},st.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){Q["[object "+t+"]"]=t.toLowerCase()}),X=st(V);var Tt={};st.Callbacks=function(e){e="string"==typeof e?Tt[e]||r(e):st.extend({},e);var n,i,o,a,s,u,l=[],c=!e.once&&[],f=function(t){for(n=e.memory&&t,i=!0,u=a||0,a=0,s=l.length,o=!0;l&&s>u;u++)if(l[u].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}o=!1,l&&(c?c.length&&f(c.shift()):n?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function r(t){st.each(t,function(t,n){var i=st.type(n);"function"===i?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==i&&r(n)})})(arguments),o?s=l.length:n&&(a=t,f(n))}return this},remove:function(){return l&&st.each(arguments,function(e,t){for(var n;(n=st.inArray(t,l,n))>-1;)l.splice(n,1),o&&(s>=n&&s--,u>=n&&u--)}),this},has:function(e){return st.inArray(e,l)>-1},empty:function(){return l=[],this},disable:function(){return l=c=n=t,this},disabled:function(){return!l},lock:function(){return c=t,n||p.disable(),this},locked:function(){return!c},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!l||i&&!c||(o?c.push(t):f(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},st.extend({Deferred:function(e){var t=[["resolve","done",st.Callbacks("once memory"),"resolved"],["reject","fail",st.Callbacks("once memory"),"rejected"],["notify","progress",st.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return st.Deferred(function(n){st.each(t,function(t,o){var a=o[0],s=st.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&st.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?st.extend(e,r):r}},i={};return r.pipe=r.then,st.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=nt.call(arguments),a=o.length,s=1!==a||e&&st.isFunction(e.promise)?a:0,u=1===s?e:st.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?nt.call(arguments):i,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(t=Array(a),n=Array(a),r=Array(a);a>i;i++)o[i]&&st.isFunction(o[i].promise)?o[i].promise().done(l(i,r,o)).fail(u.reject).progress(l(i,n,t)):--s;return s||u.resolveWith(r,o),u.promise()}}),st.support=function(){var n,r,i,o,a,s,u,l,c,f,p=V.createElement("div");if(p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",r=p.getElementsByTagName("*"),i=p.getElementsByTagName("a")[0],!r||!i||!r.length)return{};o=V.createElement("select"),a=o.appendChild(V.createElement("option")),s=p.getElementsByTagName("input")[0],i.style.cssText="top:1px;float:left;opacity:.5",n={getSetAttribute:"t"!==p.className,leadingWhitespace:3===p.firstChild.nodeType,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(i.getAttribute("style")),hrefNormalized:"/a"===i.getAttribute("href"),opacity:/^0.5/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:!!s.value,optSelected:a.selected,enctype:!!V.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==V.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===V.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},s.checked=!0,n.noCloneChecked=s.cloneNode(!0).checked,o.disabled=!0,n.optDisabled=!a.disabled;try{delete p.test}catch(d){n.deleteExpando=!1}s=V.createElement("input"),s.setAttribute("value",""),n.input=""===s.getAttribute("value"),s.value="t",s.setAttribute("type","radio"),n.radioValue="t"===s.value,s.setAttribute("checked","t"),s.setAttribute("name","t"),u=V.createDocumentFragment(),u.appendChild(s),n.appendChecked=s.checked,n.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,p.attachEvent&&(p.attachEvent("onclick",function(){n.noCloneEvent=!1}),p.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})p.setAttribute(l="on"+f,"t"),n[f+"Bubbles"]=l in e||p.attributes[l].expando===!1;return p.style.backgroundClip="content-box",p.cloneNode(!0).style.backgroundClip="",n.clearCloneStyle="content-box"===p.style.backgroundClip,st(function(){var r,i,o,a="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",s=V.getElementsByTagName("body")[0];s&&(r=V.createElement("div"),r.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",s.appendChild(r).appendChild(p),p.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=p.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",c=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",n.reliableHiddenOffsets=c&&0===o[0].offsetHeight,p.innerHTML="",p.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",n.boxSizing=4===p.offsetWidth,n.doesNotIncludeMarginInBodyOffset=1!==s.offsetTop,e.getComputedStyle&&(n.pixelPosition="1%"!==(e.getComputedStyle(p,null)||{}).top,n.boxSizingReliable="4px"===(e.getComputedStyle(p,null)||{width:"4px"}).width,i=p.appendChild(V.createElement("div")),i.style.cssText=p.style.cssText=a,i.style.marginRight=i.style.width="0",p.style.width="1px",n.reliableMarginRight=!parseFloat((e.getComputedStyle(i,null)||{}).marginRight)),p.style.zoom!==t&&(p.innerHTML="",p.style.cssText=a+"width:1px;padding:1px;display:inline;zoom:1",n.inlineBlockNeedsLayout=3===p.offsetWidth,p.style.display="block",p.innerHTML="<div></div>",p.firstChild.style.width="5px",n.shrinkWrapBlocks=3!==p.offsetWidth,s.style.zoom=1),s.removeChild(r),r=p=o=i=null)}),r=o=u=a=i=s=null,n}();var wt=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,Nt=/([A-Z])/g;st.extend({cache:{},expando:"jQuery"+(Z+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?st.cache[e[st.expando]]:e[st.expando],!!e&&!s(e)},data:function(e,t,n){return i(e,t,n,!1)},removeData:function(e,t){return o(e,t,!1)},_data:function(e,t,n){return i(e,t,n,!0)},_removeData:function(e,t){return o(e,t,!0)},acceptData:function(e){var t=e.nodeName&&st.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),st.fn.extend({data:function(e,n){var r,i,o=this[0],s=0,u=null;if(e===t){if(this.length&&(u=st.data(o),1===o.nodeType&&!st._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>s;s++)i=r[s].name,i.indexOf("data-")||(i=st.camelCase(i.substring(5)),a(o,i,u[i]));st._data(o,"parsedAttrs",!0)}return u}return"object"==typeof e?this.each(function(){st.data(this,e)}):st.access(this,function(n){return n===t?o?a(o,e,st.data(o,e)):null:(this.each(function(){st.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){st.removeData(this,e)})}}),st.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=st._data(e,n),r&&(!i||st.isArray(r)?i=st._data(e,n,st.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=st.queue(e,t),r=n.length,i=n.shift(),o=st._queueHooks(e,t),a=function(){st.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return st._data(e,n)||st._data(e,n,{empty:st.Callbacks("once memory").add(function(){st._removeData(e,t+"queue"),st._removeData(e,n)})})}}),st.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?st.queue(this[0],e):n===t?this:this.each(function(){var t=st.queue(this,e,n);st._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&st.dequeue(this,e)})},dequeue:function(e){return this.each(function(){st.dequeue(this,e)})},delay:function(e,t){return e=st.fx?st.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=st.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};for("string"!=typeof e&&(n=e,e=t),e=e||"fx";s--;)r=st._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var Ct,kt,Et=/[\t\r\n]/g,St=/\r/g,At=/^(?:input|select|textarea|button|object)$/i,jt=/^(?:a|area)$/i,Dt=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,Lt=/^(?:checked|selected)$/i,Ht=st.support.getSetAttribute,Mt=st.support.input;st.fn.extend({attr:function(e,t){return st.access(this,st.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){st.removeAttr(this,e)})},prop:function(e,t){return st.access(this,st.prop,e,t,arguments.length>1)},removeProp:function(e){return e=st.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(st.isFunction(e))return this.each(function(t){st(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(lt)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Et," "):" ")){for(o=0;i=t[o++];)0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=st.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(st.isFunction(e))return this.each(function(t){st(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(lt)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Et," "):"")){for(o=0;i=t[o++];)for(;r.indexOf(" "+i+" ")>=0;)r=r.replace(" "+i+" "," ");n.className=e?st.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return st.isFunction(e)?this.each(function(n){st(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var i,o=0,a=st(this),s=t,u=e.match(lt)||[];i=u[o++];)s=r?s:!a.hasClass(i),a[s?"addClass":"removeClass"](i);else("undefined"===n||"boolean"===n)&&(this.className&&st._data(this,"__className__",this.className),this.className=this.className||e===!1?"":st._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(Et," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=st.isFunction(e),this.each(function(r){var o,a=st(this);1===this.nodeType&&(o=i?e.call(this,r,a.val()):e,null==o?o="":"number"==typeof o?o+="":st.isArray(o)&&(o=st.map(o,function(e){return null==e?"":e+""})),n=st.valHooks[this.type]||st.valHooks[this.nodeName.toLowerCase()],n&&"set"in n&&n.set(this,o,"value")!==t||(this.value=o))});if(o)return n=st.valHooks[o.type]||st.valHooks[o.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(o,"value"))!==t?r:(r=o.value,"string"==typeof r?r.replace(St,""):null==r?"":r)}}}),st.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(st.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&st.nodeName(n.parentNode,"optgroup"))){if(t=st(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=st.makeArray(t);return st(e).find("option").each(function(){this.selected=st.inArray(st(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return e.getAttribute===t?st.prop(e,n,r):(a=1!==s||!st.isXMLDoc(e),a&&(n=n.toLowerCase(),o=st.attrHooks[n]||(Dt.test(n)?kt:Ct)),r===t?o&&a&&"get"in o&&null!==(i=o.get(e,n))?i:(e.getAttribute!==t&&(i=e.getAttribute(n)),null==i?t:i):null!==r?o&&a&&"set"in o&&(i=o.set(e,r,n))!==t?i:(e.setAttribute(n,r+""),r):(st.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(lt);if(o&&1===e.nodeType)for(;n=o[i++];)r=st.propFix[n]||n,Dt.test(n)?!Ht&&Lt.test(n)?e[st.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:st.attr(e,n,""),e.removeAttribute(Ht?n:r)},attrHooks:{type:{set:function(e,t){if(!st.support.radioValue&&"radio"===t&&st.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!st.isXMLDoc(e),a&&(n=st.propFix[n]||n,o=st.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):At.test(e.nodeName)||jt.test(e.nodeName)&&e.href?0:t}}}}),kt={get:function(e,n){var r=st.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?Mt&&Ht?null!=i:Lt.test(n)?e[st.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?st.removeAttr(e,n):Mt&&Ht||!Lt.test(n)?e.setAttribute(!Ht&&st.propFix[n]||n,n):e[st.camelCase("default-"+n)]=e[n]=!0,n}},Mt&&Ht||(st.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return st.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t +},set:function(e,n,r){return st.nodeName(e,"input")?(e.defaultValue=n,t):Ct&&Ct.set(e,n,r)}}),Ht||(Ct=st.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},st.attrHooks.contenteditable={get:Ct.get,set:function(e,t,n){Ct.set(e,""===t?!1:t,n)}},st.each(["width","height"],function(e,n){st.attrHooks[n]=st.extend(st.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),st.support.hrefNormalized||(st.each(["href","src","width","height"],function(e,n){st.attrHooks[n]=st.extend(st.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),st.each(["href","src"],function(e,t){st.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),st.support.style||(st.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),st.support.optSelected||(st.propHooks.selected=st.extend(st.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),st.support.enctype||(st.propFix.enctype="encoding"),st.support.checkOn||st.each(["radio","checkbox"],function(){st.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),st.each(["radio","checkbox"],function(){st.valHooks[this]=st.extend(st.valHooks[this],{set:function(e,n){return st.isArray(n)?e.checked=st.inArray(st(e).val(),n)>=0:t}})});var qt=/^(?:input|select|textarea)$/i,_t=/^key/,Ft=/^(?:mouse|contextmenu)|click/,Ot=/^(?:focusinfocus|focusoutblur)$/,Bt=/^([^.]*)(?:\.(.+)|)$/;st.event={global:{},add:function(e,n,r,i,o){var a,s,u,l,c,f,p,d,h,g,m,y=3!==e.nodeType&&8!==e.nodeType&&st._data(e);if(y){for(r.handler&&(a=r,r=a.handler,o=a.selector),r.guid||(r.guid=st.guid++),(l=y.events)||(l=y.events={}),(s=y.handle)||(s=y.handle=function(e){return st===t||e&&st.event.triggered===e.type?t:st.event.dispatch.apply(s.elem,arguments)},s.elem=e),n=(n||"").match(lt)||[""],c=n.length;c--;)u=Bt.exec(n[c])||[],h=m=u[1],g=(u[2]||"").split(".").sort(),p=st.event.special[h]||{},h=(o?p.delegateType:p.bindType)||h,p=st.event.special[h]||{},f=st.extend({type:h,origType:m,data:i,handler:r,guid:r.guid,selector:o,needsContext:o&&st.expr.match.needsContext.test(o),namespace:g.join(".")},a),(d=l[h])||(d=l[h]=[],d.delegateCount=0,p.setup&&p.setup.call(e,i,g,s)!==!1||(e.addEventListener?e.addEventListener(h,s,!1):e.attachEvent&&e.attachEvent("on"+h,s))),p.add&&(p.add.call(e,f),f.handler.guid||(f.handler.guid=r.guid)),o?d.splice(d.delegateCount++,0,f):d.push(f),st.event.global[h]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,m=st.hasData(e)&&st._data(e);if(m&&(u=m.events)){for(t=(t||"").match(lt)||[""],l=t.length;l--;)if(s=Bt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){for(f=st.event.special[d]||{},d=(r?f.delegateType:f.bindType)||d,p=u[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&f.teardown.call(e,h,m.handle)!==!1||st.removeEvent(e,d,m.handle),delete u[d])}else for(d in u)st.event.remove(e,d+t[l],n,r,!0);st.isEmptyObject(u)&&(delete m.handle,st._removeData(e,"events"))}},trigger:function(n,r,i,o){var a,s,u,l,c,f,p,d=[i||V],h=n.type||n,g=n.namespace?n.namespace.split("."):[];if(s=u=i=i||V,3!==i.nodeType&&8!==i.nodeType&&!Ot.test(h+st.event.triggered)&&(h.indexOf(".")>=0&&(g=h.split("."),h=g.shift(),g.sort()),c=0>h.indexOf(":")&&"on"+h,n=n[st.expando]?n:new st.Event(h,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=g.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:st.makeArray(r,[n]),p=st.event.special[h]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!st.isWindow(i)){for(l=p.delegateType||h,Ot.test(l+h)||(s=s.parentNode);s;s=s.parentNode)d.push(s),u=s;u===(i.ownerDocument||V)&&d.push(u.defaultView||u.parentWindow||e)}for(a=0;(s=d[a++])&&!n.isPropagationStopped();)n.type=a>1?l:p.bindType||h,f=(st._data(s,"events")||{})[n.type]&&st._data(s,"handle"),f&&f.apply(s,r),f=c&&s[c],f&&st.acceptData(s)&&f.apply&&f.apply(s,r)===!1&&n.preventDefault();if(n.type=h,!(o||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===h&&st.nodeName(i,"a")||!st.acceptData(i)||!c||!i[h]||st.isWindow(i))){u=i[c],u&&(i[c]=null),st.event.triggered=h;try{i[h]()}catch(m){}st.event.triggered=t,u&&(i[c]=u)}return n.result}},dispatch:function(e){e=st.event.fix(e);var n,r,i,o,a,s=[],u=nt.call(arguments),l=(st._data(this,"events")||{})[e.type]||[],c=st.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){for(s=st.event.handlers.call(this,e,l),n=0;(o=s[n++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,r=0;(a=o.handlers[r++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(a.namespace))&&(e.handleObj=a,e.data=a.data,i=((st.event.special[a.origType]||{}).handle||a.handler).apply(o.elem,u),i!==t&&(e.result=i)===!1&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(l.disabled!==!0||"click"!==e.type){for(i=[],r=0;u>r;r++)a=n[r],o=a.selector+" ",i[o]===t&&(i[o]=a.needsContext?st(o,this).index(l)>=0:st.find(o,this,null,[l]).length),i[o]&&i.push(a);i.length&&s.push({elem:l,handlers:i})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[st.expando])return e;var t,n,r=e,i=st.event.fixHooks[e.type]||{},o=i.props?this.props.concat(i.props):this.props;for(e=new st.Event(r),t=o.length;t--;)n=o[t],e[n]=r[n];return e.target||(e.target=r.srcElement||V),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,i.filter?i.filter(e,r):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,a=n.button,s=n.fromElement;return null==e.pageX&&null!=n.clientX&&(r=e.target.ownerDocument||V,i=r.documentElement,o=r.body,e.pageX=n.clientX+(i&&i.scrollLeft||o&&o.scrollLeft||0)-(i&&i.clientLeft||o&&o.clientLeft||0),e.pageY=n.clientY+(i&&i.scrollTop||o&&o.scrollTop||0)-(i&&i.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&s&&(e.relatedTarget=s===e.target?n.toElement:s),e.which||a===t||(e.which=1&a?1:2&a?3:4&a?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return st.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==V.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===V.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=st.extend(new st.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?st.event.trigger(i,null,t):st.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},st.removeEvent=V.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,n,r){var i="on"+n;e.detachEvent&&(e[i]===t&&(e[i]=null),e.detachEvent(i,r))},st.Event=function(e,n){return this instanceof st.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?u:l):this.type=e,n&&st.extend(this,n),this.timeStamp=e&&e.timeStamp||st.now(),this[st.expando]=!0,t):new st.Event(e,n)},st.Event.prototype={isDefaultPrevented:l,isPropagationStopped:l,isImmediatePropagationStopped:l,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=u,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=u,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u,this.stopPropagation()}},st.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){st.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!st.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),st.support.submitBubbles||(st.event.special.submit={setup:function(){return st.nodeName(this,"form")?!1:(st.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=st.nodeName(n,"input")||st.nodeName(n,"button")?n.form:t;r&&!st._data(r,"submitBubbles")&&(st.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),st._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&st.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return st.nodeName(this,"form")?!1:(st.event.remove(this,"._submit"),t)}}),st.support.changeBubbles||(st.event.special.change={setup:function(){return qt.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(st.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),st.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),st.event.simulate("change",this,e,!0)})),!1):(st.event.add(this,"beforeactivate._change",function(e){var t=e.target;qt.test(t.nodeName)&&!st._data(t,"changeBubbles")&&(st.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||st.event.simulate("change",this.parentNode,e,!0)}),st._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return st.event.remove(this,"._change"),!qt.test(this.nodeName)}}),st.support.focusinBubbles||st.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){st.event.simulate(t,e.target,st.event.fix(e),!0)};st.event.special[t]={setup:function(){0===n++&&V.addEventListener(e,r,!0)},teardown:function(){0===--n&&V.removeEventListener(e,r,!0)}}}),st.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(s in e)this.on(s,n,r,e[s],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=l;else if(!i)return this;return 1===o&&(a=i,i=function(e){return st().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=st.guid++)),this.each(function(){st.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,st(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=l),this.each(function(){st.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){st.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?st.event.trigger(e,n,r,!0):t},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),st.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){st.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)},_t.test(t)&&(st.event.fixHooks[t]=st.event.keyHooks),Ft.test(t)&&(st.event.fixHooks[t]=st.event.mouseHooks)}),function(e,t){function n(e){return ht.test(e+"")}function r(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>C.cacheLength&&delete e[t.shift()],e[n]=r}}function i(e){return e[P]=!0,e}function o(e){var t=L.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function a(e,t,n,r){var i,o,a,s,u,l,c,d,h,g;if((t?t.ownerDocument||t:R)!==L&&D(t),t=t||L,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!M&&!r){if(i=gt.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&O(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return Q.apply(n,K.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&W.getByClassName&&t.getElementsByClassName)return Q.apply(n,K.call(t.getElementsByClassName(a),0)),n}if(W.qsa&&!q.test(e)){if(c=!0,d=P,h=t,g=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(l=f(e),(c=t.getAttribute("id"))?d=c.replace(vt,"\\$&"):t.setAttribute("id",d),d="[id='"+d+"'] ",u=l.length;u--;)l[u]=d+p(l[u]);h=dt.test(e)&&t.parentNode||t,g=l.join(",")}if(g)try{return Q.apply(n,K.call(h.querySelectorAll(g),0)),n}catch(m){}finally{c||t.removeAttribute("id")}}}return x(e.replace(at,"$1"),t,n,r)}function s(e,t){for(var n=e&&t&&e.nextSibling;n;n=n.nextSibling)if(n===t)return-1;return e?1:-1}function u(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return i(function(t){return t=+t,i(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function f(e,t){var n,r,i,o,s,u,l,c=X[e+" "];if(c)return t?0:c.slice(0);for(s=e,u=[],l=C.preFilter;s;){(!n||(r=ut.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(i=[])),n=!1,(r=lt.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(at," ")}),s=s.slice(n.length));for(o in C.filter)!(r=pt[o].exec(s))||l[o]&&!(r=l[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?a.error(e):X(e,u).slice(0)}function p(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function d(e,t,n){var r=t.dir,i=n&&"parentNode"===t.dir,o=I++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,a){var s,u,l,c=$+" "+o;if(a){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||i)if(l=t[P]||(t[P]={}),(u=l[r])&&u[0]===c){if((s=u[1])===!0||s===N)return s===!0}else if(u=l[r]=[c],u[1]=e(t,n,a)||N,u[1]===!0)return!0}}function h(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function g(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function m(e,t,n,r,o,a){return r&&!r[P]&&(r=m(r)),o&&!o[P]&&(o=m(o,a)),i(function(i,a,s,u){var l,c,f,p=[],d=[],h=a.length,m=i||b(t||"*",s.nodeType?[s]:s,[]),y=!e||!i&&t?m:g(m,p,e,s,u),v=n?o||(i?e:h||r)?[]:a:y;if(n&&n(y,v,s,u),r)for(l=g(v,d),r(l,[],s,u),c=l.length;c--;)(f=l[c])&&(v[d[c]]=!(y[d[c]]=f));if(i){if(o||e){if(o){for(l=[],c=v.length;c--;)(f=v[c])&&l.push(y[c]=f);o(null,v=[],l,u)}for(c=v.length;c--;)(f=v[c])&&(l=o?Z.call(i,f):p[c])>-1&&(i[l]=!(a[l]=f))}}else v=g(v===a?v.splice(h,v.length):v),o?o(null,a,v,u):Q.apply(a,v)})}function y(e){for(var t,n,r,i=e.length,o=C.relative[e[0].type],a=o||C.relative[" "],s=o?1:0,u=d(function(e){return e===t},a,!0),l=d(function(e){return Z.call(t,e)>-1},a,!0),c=[function(e,n,r){return!o&&(r||n!==j)||((t=n).nodeType?u(e,n,r):l(e,n,r))}];i>s;s++)if(n=C.relative[e[s].type])c=[d(h(c),n)];else{if(n=C.filter[e[s].type].apply(null,e[s].matches),n[P]){for(r=++s;i>r&&!C.relative[e[r].type];r++);return m(s>1&&h(c),s>1&&p(e.slice(0,s-1)).replace(at,"$1"),n,r>s&&y(e.slice(s,r)),i>r&&y(e=e.slice(r)),i>r&&p(e))}c.push(n)}return h(c)}function v(e,t){var n=0,r=t.length>0,o=e.length>0,s=function(i,s,u,l,c){var f,p,d,h=[],m=0,y="0",v=i&&[],b=null!=c,x=j,T=i||o&&C.find.TAG("*",c&&s.parentNode||s),w=$+=null==x?1:Math.E;for(b&&(j=s!==L&&s,N=n);null!=(f=T[y]);y++){if(o&&f){for(p=0;d=e[p];p++)if(d(f,s,u)){l.push(f);break}b&&($=w,N=++n)}r&&((f=!d&&f)&&m--,i&&v.push(f))}if(m+=y,r&&y!==m){for(p=0;d=t[p];p++)d(v,h,s,u);if(i){if(m>0)for(;y--;)v[y]||h[y]||(h[y]=G.call(l));h=g(h)}Q.apply(l,h),b&&!i&&h.length>0&&m+t.length>1&&a.uniqueSort(l)}return b&&($=w,j=x),v};return r?i(s):s}function b(e,t,n){for(var r=0,i=t.length;i>r;r++)a(e,t[r],n);return n}function x(e,t,n,r){var i,o,a,s,u,l=f(e);if(!r&&1===l.length){if(o=l[0]=l[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&9===t.nodeType&&!M&&C.relative[o[1].type]){if(t=C.find.ID(a.matches[0].replace(xt,Tt),t)[0],!t)return n;e=e.slice(o.shift().value.length)}for(i=pt.needsContext.test(e)?-1:o.length-1;i>=0&&(a=o[i],!C.relative[s=a.type]);i--)if((u=C.find[s])&&(r=u(a.matches[0].replace(xt,Tt),dt.test(o[0].type)&&t.parentNode||t))){if(o.splice(i,1),e=r.length&&p(o),!e)return Q.apply(n,K.call(r,0)),n;break}}return S(e,l)(r,t,M,n,dt.test(e)),n}function T(){}var w,N,C,k,E,S,A,j,D,L,H,M,q,_,F,O,B,P="sizzle"+-new Date,R=e.document,W={},$=0,I=0,z=r(),X=r(),U=r(),V=typeof t,Y=1<<31,J=[],G=J.pop,Q=J.push,K=J.slice,Z=J.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},et="[\\x20\\t\\r\\n\\f]",tt="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",nt=tt.replace("w","w#"),rt="([*^$|!~]?=)",it="\\["+et+"*("+tt+")"+et+"*(?:"+rt+et+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+nt+")|)|)"+et+"*\\]",ot=":("+tt+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+it.replace(3,8)+")*)|.*)\\)|)",at=RegExp("^"+et+"+|((?:^|[^\\\\])(?:\\\\.)*)"+et+"+$","g"),ut=RegExp("^"+et+"*,"+et+"*"),lt=RegExp("^"+et+"*([\\x20\\t\\r\\n\\f>+~])"+et+"*"),ct=RegExp(ot),ft=RegExp("^"+nt+"$"),pt={ID:RegExp("^#("+tt+")"),CLASS:RegExp("^\\.("+tt+")"),NAME:RegExp("^\\[name=['\"]?("+tt+")['\"]?\\]"),TAG:RegExp("^("+tt.replace("w","w*")+")"),ATTR:RegExp("^"+it),PSEUDO:RegExp("^"+ot),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+et+"*(even|odd|(([+-]|)(\\d*)n|)"+et+"*(?:([+-]|)"+et+"*(\\d+)|))"+et+"*\\)|)","i"),needsContext:RegExp("^"+et+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+et+"*((?:-\\d)?\\d*)"+et+"*\\)|)(?=[^-]|$)","i")},dt=/[\x20\t\r\n\f]*[+~]/,ht=/\{\s*\[native code\]\s*\}/,gt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,mt=/^(?:input|select|textarea|button)$/i,yt=/^h\d$/i,vt=/'|\\/g,bt=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,xt=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,Tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{K.call(H.childNodes,0)[0].nodeType}catch(wt){K=function(e){for(var t,n=[];t=this[e];e++)n.push(t);return n}}E=a.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},D=a.setDocument=function(e){var r=e?e.ownerDocument||e:R;return r!==L&&9===r.nodeType&&r.documentElement?(L=r,H=r.documentElement,M=E(r),W.tagNameNoComments=o(function(e){return e.appendChild(r.createComment("")),!e.getElementsByTagName("*").length}),W.attributes=o(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),W.getByClassName=o(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),W.getByName=o(function(e){e.id=P+0,e.innerHTML="<a name='"+P+"'></a><div name='"+P+"'></div>",H.insertBefore(e,H.firstChild);var t=r.getElementsByName&&r.getElementsByName(P).length===2+r.getElementsByName(P+0).length;return W.getIdNotName=!r.getElementById(P),H.removeChild(e),t}),C.attrHandle=o(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==V&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},W.getIdNotName?(C.find.ID=function(e,t){if(typeof t.getElementById!==V&&!M){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},C.filter.ID=function(e){var t=e.replace(xt,Tt);return function(e){return e.getAttribute("id")===t}}):(C.find.ID=function(e,n){if(typeof n.getElementById!==V&&!M){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==V&&r.getAttributeNode("id").value===e?[r]:t:[]}},C.filter.ID=function(e){var t=e.replace(xt,Tt);return function(e){var n=typeof e.getAttributeNode!==V&&e.getAttributeNode("id");return n&&n.value===t}}),C.find.TAG=W.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==V?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i];i++)1===n.nodeType&&r.push(n);return r}return o},C.find.NAME=W.getByName&&function(e,n){return typeof n.getElementsByName!==V?n.getElementsByName(name):t},C.find.CLASS=W.getByClassName&&function(e,n){return typeof n.getElementsByClassName===V||M?t:n.getElementsByClassName(e)},_=[],q=[":focus"],(W.qsa=n(r.querySelectorAll))&&(o(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||q.push("\\["+et+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||q.push(":checked")}),o(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&q.push("[*^$]="+et+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),q.push(",.*:")})),(W.matchesSelector=n(F=H.matchesSelector||H.mozMatchesSelector||H.webkitMatchesSelector||H.oMatchesSelector||H.msMatchesSelector))&&o(function(e){W.disconnectedMatch=F.call(e,"div"),F.call(e,"[s!='']:x"),_.push("!=",ot)}),q=RegExp(q.join("|")),_=RegExp(_.join("|")),O=n(H.contains)||H.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},B=H.compareDocumentPosition?function(e,t){var n;return e===t?(A=!0,0):(n=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&n||e.parentNode&&11===e.parentNode.nodeType?e===r||O(R,e)?-1:t===r||O(R,t)?1:0:4&n?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var n,i=0,o=e.parentNode,a=t.parentNode,u=[e],l=[t];if(e===t)return A=!0,0;if(e.sourceIndex&&t.sourceIndex)return(~t.sourceIndex||Y)-(O(R,e)&&~e.sourceIndex||Y);if(!o||!a)return e===r?-1:t===r?1:o?-1:a?1:0;if(o===a)return s(e,t);for(n=e;n=n.parentNode;)u.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;u[i]===l[i];)i++;return i?s(u[i],l[i]):u[i]===R?-1:l[i]===R?1:0},A=!1,[0,0].sort(B),W.detectDuplicates=A,L):L},a.matches=function(e,t){return a(e,null,null,t)},a.matchesSelector=function(e,t){if((e.ownerDocument||e)!==L&&D(e),t=t.replace(bt,"='$1']"),!(!W.matchesSelector||M||_&&_.test(t)||q.test(t)))try{var n=F.call(e,t);if(n||W.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return a(t,L,null,[e]).length>0},a.contains=function(e,t){return(e.ownerDocument||e)!==L&&D(e),O(e,t)},a.attr=function(e,t){var n;return(e.ownerDocument||e)!==L&&D(e),M||(t=t.toLowerCase()),(n=C.attrHandle[t])?n(e):M||W.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},a.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},a.uniqueSort=function(e){var t,n=[],r=1,i=0;if(A=!W.detectDuplicates,e.sort(B),A){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return e},k=a.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=k(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=k(t);return n},C=a.selectors={cacheLength:50,createPseudo:i,match:pt,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(xt,Tt),e[3]=(e[4]||e[5]||"").replace(xt,Tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||a.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&a.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return pt.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&ct.test(n)&&(t=f(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(xt,Tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=z[e+" "];return t||(t=RegExp("(^|"+et+")"+e+"("+et+"|$)"))&&z(e,function(e){return t.test(e.className||typeof e.getAttribute!==V&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=a.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.substr(i.length-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){for(;g;){for(f=t;f=f[g];)if(s?f.nodeName.toLowerCase()===y:1===f.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){for(c=m[P]||(m[P]={}),l=c[e]||[],d=l[0]===$&&l[1],p=l[0]===$&&l[2],f=d&&m.childNodes[d];f=++d&&f&&f[g]||(p=d=0)||h.pop();)if(1===f.nodeType&&++p&&f===t){c[e]=[$,d,p];break}}else if(v&&(l=(t[P]||(t[P]={}))[e])&&l[0]===$)p=l[1];else for(;(f=++d&&f&&f[g]||(p=d=0)||h.pop())&&((s?f.nodeName.toLowerCase()!==y:1!==f.nodeType)||!++p||(v&&((f[P]||(f[P]={}))[e]=[$,p]),f!==t)););return p-=i,p===r||0===p%r&&p/r>=0}}},PSEUDO:function(e,t){var n,r=C.pseudos[e]||C.setFilters[e.toLowerCase()]||a.error("unsupported pseudo: "+e);return r[P]?r(t):r.length>1?(n=[e,e,"",t],C.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,n){for(var i,o=r(e,t),a=o.length;a--;)i=Z.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:i(function(e){var t=[],n=[],r=S(e.replace(at,"$1"));return r[P]?i(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:i(function(e){return function(t){return a(e,t).length>0}}),contains:i(function(e){return function(t){return(t.textContent||t.innerText||k(t)).indexOf(e)>-1}}),lang:i(function(e){return ft.test(e||"")||a.error("unsupported lang: "+e),e=e.replace(xt,Tt).toLowerCase(),function(t){var n;do if(n=M?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===H},focus:function(e){return e===L.activeElement&&(!L.hasFocus||L.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!C.pseudos.empty(e)},header:function(e){return yt.test(e.nodeName)},input:function(e){return mt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[0>n?n+t:n]}),even:c(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=0>n?n+t:n;t>++r;)e.push(r);return e})}};for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})C.pseudos[w]=u(w);for(w in{submit:!0,reset:!0})C.pseudos[w]=l(w);S=a.compile=function(e,t){var n,r=[],i=[],o=U[e+" "];if(!o){for(t||(t=f(e)),n=t.length;n--;)o=y(t[n]),o[P]?r.push(o):i.push(o);o=U(e,v(i,r))}return o},C.pseudos.nth=C.pseudos.eq,C.filters=T.prototype=C.pseudos,C.setFilters=new T,D(),a.attr=st.attr,st.find=a,st.expr=a.selectors,st.expr[":"]=st.expr.pseudos,st.unique=a.uniqueSort,st.text=a.getText,st.isXMLDoc=a.isXML,st.contains=a.contains}(e);var Pt=/Until$/,Rt=/^(?:parents|prev(?:Until|All))/,Wt=/^.[^:#\[\.,]*$/,$t=st.expr.match.needsContext,It={children:!0,contents:!0,next:!0,prev:!0};st.fn.extend({find:function(e){var t,n,r;if("string"!=typeof e)return r=this,this.pushStack(st(e).filter(function(){for(t=0;r.length>t;t++)if(st.contains(r[t],this))return!0}));for(n=[],t=0;this.length>t;t++)st.find(e,this[t],n);return n=this.pushStack(st.unique(n)),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=st(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(st.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(f(this,e,!1))},filter:function(e){return this.pushStack(f(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?$t.test(e)?st(e,this.context).index(this[0])>=0:st.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){for(var n,r=0,i=this.length,o=[],a=$t.test(e)||"string"!=typeof e?st(e,t||this.context):0;i>r;r++)for(n=this[r];n&&n.ownerDocument&&n!==t&&11!==n.nodeType;){if(a?a.index(n)>-1:st.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}return this.pushStack(o.length>1?st.unique(o):o)},index:function(e){return e?"string"==typeof e?st.inArray(this[0],st(e)):st.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?st(e,t):st.makeArray(e&&e.nodeType?[e]:e),r=st.merge(this.get(),n);return this.pushStack(st.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),st.fn.andSelf=st.fn.addBack,st.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return st.dir(e,"parentNode")},parentsUntil:function(e,t,n){return st.dir(e,"parentNode",n)},next:function(e){return c(e,"nextSibling")},prev:function(e){return c(e,"previousSibling") +},nextAll:function(e){return st.dir(e,"nextSibling")},prevAll:function(e){return st.dir(e,"previousSibling")},nextUntil:function(e,t,n){return st.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return st.dir(e,"previousSibling",n)},siblings:function(e){return st.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return st.sibling(e.firstChild)},contents:function(e){return st.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:st.merge([],e.childNodes)}},function(e,t){st.fn[e]=function(n,r){var i=st.map(this,t,n);return Pt.test(e)||(r=n),r&&"string"==typeof r&&(i=st.filter(r,i)),i=this.length>1&&!It[e]?st.unique(i):i,this.length>1&&Rt.test(e)&&(i=i.reverse()),this.pushStack(i)}}),st.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?st.find.matchesSelector(t[0],e)?[t[0]]:[]:st.find.matches(e,t)},dir:function(e,n,r){for(var i=[],o=e[n];o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!st(o).is(r));)1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});var zt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Xt=/ jQuery\d+="(?:null|\d+)"/g,Ut=RegExp("<(?:"+zt+")[\\s/>]","i"),Vt=/^\s+/,Yt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Jt=/<([\w:]+)/,Gt=/<tbody/i,Qt=/<|?\w+;/,Kt=/<(?:script|style|link)/i,Zt=/^(?:checkbox|radio)$/i,en=/checked\s*(?:[^=]|=\s*.checked.)/i,tn=/^$|\/(?:java|ecma)script/i,nn=/^true\/(.*)/,rn=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,on={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:st.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},an=p(V),sn=an.appendChild(V.createElement("div"));on.optgroup=on.option,on.tbody=on.tfoot=on.colgroup=on.caption=on.thead,on.th=on.td,st.fn.extend({text:function(e){return st.access(this,function(e){return e===t?st.text(this):this.empty().append((this[0]&&this[0].ownerDocument||V).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(st.isFunction(e))return this.each(function(t){st(this).wrapAll(e.call(this,t))});if(this[0]){var t=st(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return st.isFunction(e)?this.each(function(t){st(this).wrapInner(e.call(this,t))}):this.each(function(){var t=st(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=st.isFunction(e);return this.each(function(n){st(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){st.nodeName(this,"body")||st(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,r=0;null!=(n=this[r]);r++)(!e||st.filter(e,[n]).length>0)&&(t||1!==n.nodeType||st.cleanData(b(n)),n.parentNode&&(t&&st.contains(n.ownerDocument,n)&&m(b(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&st.cleanData(b(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&st.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return st.clone(this,e,t)})},html:function(e){return st.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(Xt,""):t;if(!("string"!=typeof e||Kt.test(e)||!st.support.htmlSerialize&&Ut.test(e)||!st.support.leadingWhitespace&&Vt.test(e)||on[(Jt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(Yt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(st.cleanData(b(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=st.isFunction(e);return t||"string"==typeof e||(e=st(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;(n&&1===this.nodeType||11===this.nodeType)&&(st(this).remove(),t?t.parentNode.insertBefore(e,t):n.appendChild(e))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=et.apply([],e);var i,o,a,s,u,l,c=0,f=this.length,p=this,m=f-1,y=e[0],v=st.isFunction(y);if(v||!(1>=f||"string"!=typeof y||st.support.checkClone)&&en.test(y))return this.each(function(i){var o=p.eq(i);v&&(e[0]=y.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(f&&(i=st.buildFragment(e,this[0].ownerDocument,!1,this),o=i.firstChild,1===i.childNodes.length&&(i=o),o)){for(n=n&&st.nodeName(o,"tr"),a=st.map(b(i,"script"),h),s=a.length;f>c;c++)u=i,c!==m&&(u=st.clone(u,!0,!0),s&&st.merge(a,b(u,"script"))),r.call(n&&st.nodeName(this[c],"table")?d(this[c],"tbody"):this[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,st.map(a,g),c=0;s>c;c++)u=a[c],tn.test(u.type||"")&&!st._data(u,"globalEval")&&st.contains(l,u)&&(u.src?st.ajax({url:u.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):st.globalEval((u.text||u.textContent||u.innerHTML||"").replace(rn,"")));i=o=null}return this}}),st.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){st.fn[e]=function(e){for(var n,r=0,i=[],o=st(e),a=o.length-1;a>=r;r++)n=r===a?this:this.clone(!0),st(o[r])[t](n),tt.apply(i,n.get());return this.pushStack(i)}}),st.extend({clone:function(e,t,n){var r,i,o,a,s,u=st.contains(e.ownerDocument,e);if(st.support.html5Clone||st.isXMLDoc(e)||!Ut.test("<"+e.nodeName+">")?s=e.cloneNode(!0):(sn.innerHTML=e.outerHTML,sn.removeChild(s=sn.firstChild)),!(st.support.noCloneEvent&&st.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||st.isXMLDoc(e)))for(r=b(s),i=b(e),a=0;null!=(o=i[a]);++a)r[a]&&v(o,r[a]);if(t)if(n)for(i=i||b(e),r=r||b(s),a=0;null!=(o=i[a]);a++)y(o,r[a]);else y(e,s);return r=b(s,"script"),r.length>0&&m(r,!u&&b(e,"script")),r=i=o=null,s},buildFragment:function(e,t,n,r){for(var i,o,a,s,u,l,c,f=e.length,d=p(t),h=[],g=0;f>g;g++)if(o=e[g],o||0===o)if("object"===st.type(o))st.merge(h,o.nodeType?[o]:o);else if(Qt.test(o)){for(s=s||d.appendChild(t.createElement("div")),a=(Jt.exec(o)||["",""])[1].toLowerCase(),u=on[a]||on._default,s.innerHTML=u[1]+o.replace(Yt,"<$1></$2>")+u[2],c=u[0];c--;)s=s.lastChild;if(!st.support.leadingWhitespace&&Vt.test(o)&&h.push(t.createTextNode(Vt.exec(o)[0])),!st.support.tbody)for(o="table"!==a||Gt.test(o)?"<table>"!==u[1]||Gt.test(o)?0:s:s.firstChild,c=o&&o.childNodes.length;c--;)st.nodeName(l=o.childNodes[c],"tbody")&&!l.childNodes.length&&o.removeChild(l);for(st.merge(h,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=d.lastChild}else h.push(t.createTextNode(o));for(s&&d.removeChild(s),st.support.appendChecked||st.grep(b(h,"input"),x),g=0;o=h[g++];)if((!r||-1===st.inArray(o,r))&&(i=st.contains(o.ownerDocument,o),s=b(d.appendChild(o),"script"),i&&m(s),n))for(c=0;o=s[c++];)tn.test(o.type||"")&&n.push(o);return s=null,d},cleanData:function(e,n){for(var r,i,o,a,s=0,u=st.expando,l=st.cache,c=st.support.deleteExpando,f=st.event.special;null!=(o=e[s]);s++)if((n||st.acceptData(o))&&(i=o[u],r=i&&l[i])){if(r.events)for(a in r.events)f[a]?st.event.remove(o,a):st.removeEvent(o,a,r.handle);l[i]&&(delete l[i],c?delete o[u]:o.removeAttribute!==t?o.removeAttribute(u):o[u]=null,K.push(i))}}});var un,ln,cn,fn=/alpha\([^)]*\)/i,pn=/opacity\s*=\s*([^)]*)/,dn=/^(top|right|bottom|left)$/,hn=/^(none|table(?!-c[ea]).+)/,gn=/^margin/,mn=RegExp("^("+ut+")(.*)$","i"),yn=RegExp("^("+ut+")(?!px)[a-z%]+$","i"),vn=RegExp("^([+-])=("+ut+")","i"),bn={BODY:"block"},xn={position:"absolute",visibility:"hidden",display:"block"},Tn={letterSpacing:0,fontWeight:400},wn=["Top","Right","Bottom","Left"],Nn=["Webkit","O","Moz","ms"];st.fn.extend({css:function(e,n){return st.access(this,function(e,n,r){var i,o,a={},s=0;if(st.isArray(n)){for(i=ln(e),o=n.length;o>s;s++)a[n[s]]=st.css(e,n[s],!1,i);return a}return r!==t?st.style(e,n,r):st.css(e,n)},e,n,arguments.length>1)},show:function(){return N(this,!0)},hide:function(){return N(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:w(this))?st(this).show():st(this).hide()})}}),st.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=un(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":st.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=st.camelCase(n),l=e.style;if(n=st.cssProps[u]||(st.cssProps[u]=T(l,u)),s=st.cssHooks[n]||st.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=vn.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(st.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||st.cssNumber[u]||(r+="px"),st.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=st.camelCase(n);return n=st.cssProps[u]||(st.cssProps[u]=T(e.style,u)),s=st.cssHooks[n]||st.cssHooks[u],s&&"get"in s&&(o=s.get(e,!0,r)),o===t&&(o=un(e,n,i)),"normal"===o&&n in Tn&&(o=Tn[n]),r?(a=parseFloat(o),r===!0||st.isNumeric(a)?a||0:o):o},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(ln=function(t){return e.getComputedStyle(t,null)},un=function(e,n,r){var i,o,a,s=r||ln(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||st.contains(e.ownerDocument,e)||(u=st.style(e,n)),yn.test(u)&&gn.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):V.documentElement.currentStyle&&(ln=function(e){return e.currentStyle},un=function(e,n,r){var i,o,a,s=r||ln(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),yn.test(u)&&!dn.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u}),st.each(["height","width"],function(e,n){st.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&hn.test(st.css(e,"display"))?st.swap(e,xn,function(){return E(e,n,i)}):E(e,n,i):t},set:function(e,t,r){var i=r&&ln(e);return C(e,t,r?k(e,n,r,st.support.boxSizing&&"border-box"===st.css(e,"boxSizing",!1,i),i):0)}}}),st.support.opacity||(st.cssHooks.opacity={get:function(e,t){return pn.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=st.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===st.trim(o.replace(fn,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=fn.test(o)?o.replace(fn,i):o+" "+i)}}),st(function(){st.support.reliableMarginRight||(st.cssHooks.marginRight={get:function(e,n){return n?st.swap(e,{display:"inline-block"},un,[e,"marginRight"]):t}}),!st.support.pixelPosition&&st.fn.position&&st.each(["top","left"],function(e,n){st.cssHooks[n]={get:function(e,r){return r?(r=un(e,n),yn.test(r)?st(e).position()[n]+"px":r):t}}})}),st.expr&&st.expr.filters&&(st.expr.filters.hidden=function(e){return 0===e.offsetWidth&&0===e.offsetHeight||!st.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||st.css(e,"display"))},st.expr.filters.visible=function(e){return!st.expr.filters.hidden(e)}),st.each({margin:"",padding:"",border:"Width"},function(e,t){st.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];4>r;r++)i[e+wn[r]+t]=o[r]||o[r-2]||o[0];return i}},gn.test(e)||(st.cssHooks[e+t].set=C)});var Cn=/%20/g,kn=/\[\]$/,En=/\r?\n/g,Sn=/^(?:submit|button|image|reset)$/i,An=/^(?:input|select|textarea|keygen)/i;st.fn.extend({serialize:function(){return st.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=st.prop(this,"elements");return e?st.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!st(this).is(":disabled")&&An.test(this.nodeName)&&!Sn.test(e)&&(this.checked||!Zt.test(e))}).map(function(e,t){var n=st(this).val();return null==n?null:st.isArray(n)?st.map(n,function(e){return{name:t.name,value:e.replace(En,"\r\n")}}):{name:t.name,value:n.replace(En,"\r\n")}}).get()}}),st.param=function(e,n){var r,i=[],o=function(e,t){t=st.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=st.ajaxSettings&&st.ajaxSettings.traditional),st.isArray(e)||e.jquery&&!st.isPlainObject(e))st.each(e,function(){o(this.name,this.value)});else for(r in e)j(r,e[r],n,o);return i.join("&").replace(Cn,"+")};var jn,Dn,Ln=st.now(),Hn=/\?/,Mn=/#.*$/,qn=/([?&])_=[^&]*/,_n=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Fn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,On=/^(?:GET|HEAD)$/,Bn=/^\/\//,Pn=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Rn=st.fn.load,Wn={},$n={},In="*/".concat("*");try{Dn=Y.href}catch(zn){Dn=V.createElement("a"),Dn.href="",Dn=Dn.href}jn=Pn.exec(Dn.toLowerCase())||[],st.fn.load=function(e,n,r){if("string"!=typeof e&&Rn)return Rn.apply(this,arguments);var i,o,a,s=this,u=e.indexOf(" ");return u>=0&&(i=e.slice(u,e.length),e=e.slice(0,u)),st.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(o="POST"),s.length>0&&st.ajax({url:e,type:o,dataType:"html",data:n}).done(function(e){a=arguments,s.html(i?st("<div>").append(st.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,a||[e.responseText,t,e])}),this},st.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){st.fn[t]=function(e){return this.on(t,e)}}),st.each(["get","post"],function(e,n){st[n]=function(e,r,i,o){return st.isFunction(r)&&(o=o||i,i=r,r=t),st.ajax({url:e,type:n,dataType:o,data:r,success:i})}}),st.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Dn,type:"GET",isLocal:Fn.test(jn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":In,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":st.parseJSON,"text xml":st.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?H(H(e,st.ajaxSettings),t):H(st.ajaxSettings,e)},ajaxPrefilter:D(Wn),ajaxTransport:D($n),ajax:function(e,n){function r(e,n,r,s){var l,f,v,b,T,N=n;2!==x&&(x=2,u&&clearTimeout(u),i=t,a=s||"",w.readyState=e>0?4:0,r&&(b=M(p,w,r)),e>=200&&300>e||304===e?(p.ifModified&&(T=w.getResponseHeader("Last-Modified"),T&&(st.lastModified[o]=T),T=w.getResponseHeader("etag"),T&&(st.etag[o]=T)),304===e?(l=!0,N="notmodified"):(l=q(p,b),N=l.state,f=l.data,v=l.error,l=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),w.status=e,w.statusText=(n||N)+"",l?g.resolveWith(d,[f,N,w]):g.rejectWith(d,[w,N,v]),w.statusCode(y),y=t,c&&h.trigger(l?"ajaxSuccess":"ajaxError",[w,p,l?f:v]),m.fireWith(d,[w,N]),c&&(h.trigger("ajaxComplete",[w,p]),--st.active||st.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=t),n=n||{};var i,o,a,s,u,l,c,f,p=st.ajaxSetup({},n),d=p.context||p,h=p.context&&(d.nodeType||d.jquery)?st(d):st.event,g=st.Deferred(),m=st.Callbacks("once memory"),y=p.statusCode||{},v={},b={},x=0,T="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!s)for(s={};t=_n.exec(a);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=b[n]=b[n]||e,v[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)y[t]=[y[t],e[t]];else w.always(e[w.status]);return this},abort:function(e){var t=e||T;return i&&i.abort(t),r(0,t),this}};if(g.promise(w).complete=m.add,w.success=w.done,w.error=w.fail,p.url=((e||p.url||Dn)+"").replace(Mn,"").replace(Bn,jn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=st.trim(p.dataType||"*").toLowerCase().match(lt)||[""],null==p.crossDomain&&(l=Pn.exec(p.url.toLowerCase()),p.crossDomain=!(!l||l[1]===jn[1]&&l[2]===jn[2]&&(l[3]||("http:"===l[1]?80:443))==(jn[3]||("http:"===jn[1]?80:443)))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=st.param(p.data,p.traditional)),L(Wn,p,n,w),2===x)return w;c=p.global,c&&0===st.active++&&st.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!On.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(Hn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=qn.test(o)?o.replace(qn,"$1_="+Ln++):o+(Hn.test(o)?"&":"?")+"_="+Ln++)),p.ifModified&&(st.lastModified[o]&&w.setRequestHeader("If-Modified-Since",st.lastModified[o]),st.etag[o]&&w.setRequestHeader("If-None-Match",st.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&w.setRequestHeader("Content-Type",p.contentType),w.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+In+"; q=0.01":""):p.accepts["*"]);for(f in p.headers)w.setRequestHeader(f,p.headers[f]);if(p.beforeSend&&(p.beforeSend.call(d,w,p)===!1||2===x))return w.abort();T="abort";for(f in{success:1,error:1,complete:1})w[f](p[f]);if(i=L($n,p,n,w)){w.readyState=1,c&&h.trigger("ajaxSend",[w,p]),p.async&&p.timeout>0&&(u=setTimeout(function(){w.abort("timeout")},p.timeout));try{x=1,i.send(v,r)}catch(N){if(!(2>x))throw N;r(-1,N)}}else r(-1,"No Transport");return w},getScript:function(e,n){return st.get(e,t,n,"script")},getJSON:function(e,t,n){return st.get(e,t,n,"json")}}),st.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return st.globalEval(e),e}}}),st.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),st.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=V.head||st("head")[0]||V.documentElement;return{send:function(t,i){n=V.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Xn=[],Un=/(=)\?(?=&|$)|\?\?/;st.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xn.pop()||st.expando+"_"+Ln++;return this[e]=!0,e}}),st.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,u=n.jsonp!==!1&&(Un.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Un.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=st.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Un,"$1"+o):n.jsonp!==!1&&(n.url+=(Hn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||st.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Xn.push(o)),s&&st.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Vn,Yn,Jn=0,Gn=e.ActiveXObject&&function(){var e;for(e in Vn)Vn[e](t,!0)};st.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&_()||F()}:_,Yn=st.ajaxSettings.xhr(),st.support.cors=!!Yn&&"withCredentials"in Yn,Yn=st.support.ajax=!!Yn,Yn&&st.ajaxTransport(function(n){if(!n.crossDomain||st.support.cors){var r;return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,f,p;try{if(r&&(i||4===u.readyState))if(r=t,a&&(u.onreadystatechange=st.noop,Gn&&delete Vn[a]),i)4!==u.readyState&&u.abort();else{f={},s=u.status,p=u.responseXML,c=u.getAllResponseHeaders(),p&&p.documentElement&&(f.xml=p),"string"==typeof u.responseText&&(f.text=u.responseText);try{l=u.statusText}catch(d){l=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=f.text?200:404}}catch(h){i||o(-1,h)}f&&o(s,l,f,c)},n.async?4===u.readyState?setTimeout(r):(a=++Jn,Gn&&(Vn||(Vn={},st(e).unload(Gn)),Vn[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Qn,Kn,Zn=/^(?:toggle|show|hide)$/,er=RegExp("^(?:([+-])=|)("+ut+")([a-z%]*)$","i"),tr=/queueHooks$/,nr=[W],rr={"*":[function(e,t){var n,r,i=this.createTween(e,t),o=er.exec(t),a=i.cur(),s=+a||0,u=1,l=20;if(o){if(n=+o[2],r=o[3]||(st.cssNumber[e]?"":"px"),"px"!==r&&s){s=st.css(i.elem,e,!0)||n||1;do u=u||".5",s/=u,st.style(i.elem,e,s+r);while(u!==(u=i.cur()/a)&&1!==u&&--l)}i.unit=r,i.start=s,i.end=o[1]?s+(o[1]+1)*n:n}return i}]};st.Animation=st.extend(P,{tweener:function(e,t){st.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;i>r;r++)n=e[r],rr[n]=rr[n]||[],rr[n].unshift(t)},prefilter:function(e,t){t?nr.unshift(e):nr.push(e)}}),st.Tween=$,$.prototype={constructor:$,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(st.cssNumber[n]?"":"px")},cur:function(){var e=$.propHooks[this.prop];return e&&e.get?e.get(this):$.propHooks._default.get(this)},run:function(e){var t,n=$.propHooks[this.prop];return this.pos=t=this.options.duration?st.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):$.propHooks._default.set(this),this}},$.prototype.init.prototype=$.prototype,$.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=st.css(e.elem,e.prop,"auto"),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){st.fx.step[e.prop]?st.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[st.cssProps[e.prop]]||st.cssHooks[e.prop])?st.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},$.propHooks.scrollTop=$.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},st.each(["toggle","show","hide"],function(e,t){var n=st.fn[t];st.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(I(t,!0),e,r,i)}}),st.fn.extend({fadeTo:function(e,t,n,r){return this.filter(w).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=st.isEmptyObject(e),o=st.speed(t,n,r),a=function(){var t=P(this,st.extend({},e),o);a.finish=function(){t.stop(!0)},(i||st._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=st.timers,a=st._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&tr.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&st.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=st._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=st.timers,a=r?r.length:0;for(n.finish=!0,st.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),st.each({slideDown:I("show"),slideUp:I("hide"),slideToggle:I("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){st.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),st.speed=function(e,t,n){var r=e&&"object"==typeof e?st.extend({},e):{complete:n||!n&&t||st.isFunction(e)&&e,duration:e,easing:n&&t||t&&!st.isFunction(t)&&t};return r.duration=st.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in st.fx.speeds?st.fx.speeds[r.duration]:st.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){st.isFunction(r.old)&&r.old.call(this),r.queue&&st.dequeue(this,r.queue)},r},st.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},st.timers=[],st.fx=$.prototype.init,st.fx.tick=function(){var e,n=st.timers,r=0;for(Qn=st.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||st.fx.stop(),Qn=t},st.fx.timer=function(e){e()&&st.timers.push(e)&&st.fx.start()},st.fx.interval=13,st.fx.start=function(){Kn||(Kn=setInterval(st.fx.tick,st.fx.interval))},st.fx.stop=function(){clearInterval(Kn),Kn=null},st.fx.speeds={slow:600,fast:200,_default:400},st.fx.step={},st.expr&&st.expr.filters&&(st.expr.filters.animated=function(e){return st.grep(st.timers,function(t){return e===t.elem}).length}),st.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){st.offset.setOffset(this,e,t)});var n,r,i={top:0,left:0},o=this[0],a=o&&o.ownerDocument;if(a)return n=a.documentElement,st.contains(n,o)?(o.getBoundingClientRect!==t&&(i=o.getBoundingClientRect()),r=z(a),{top:i.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:i.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):i},st.offset={setOffset:function(e,t,n){var r=st.css(e,"position");"static"===r&&(e.style.position="relative");var i,o,a=st(e),s=a.offset(),u=st.css(e,"top"),l=st.css(e,"left"),c=("absolute"===r||"fixed"===r)&&st.inArray("auto",[u,l])>-1,f={},p={};c?(p=a.position(),i=p.top,o=p.left):(i=parseFloat(u)||0,o=parseFloat(l)||0),st.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(f.top=t.top-s.top+i),null!=t.left&&(f.left=t.left-s.left+o),"using"in t?t.using.call(e,f):a.css(f)}},st.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===st.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),st.nodeName(e[0],"html")||(n=e.offset()),n.top+=st.css(e[0],"borderTopWidth",!0),n.left+=st.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-st.css(r,"marginTop",!0),left:t.left-n.left-st.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||V.documentElement;e&&!st.nodeName(e,"html")&&"static"===st.css(e,"position");)e=e.offsetParent;return e||V.documentElement})}}),st.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);st.fn[e]=function(i){return st.access(this,function(e,i,o){var a=z(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?st(a).scrollLeft():o,r?o:st(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}}),st.each({Height:"height",Width:"width"},function(e,n){st.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){st.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return st.access(this,function(n,r,i){var o;return st.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?st.css(n,r,s):st.style(n,r,i,s)},n,a?i:t,a,null)}})}),e.jQuery=e.$=st,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return st})})(window); +//@ sourceMappingURL=jquery.min.map \ No newline at end of file Added: trunk/cantharella.web/src/main/webapp/js/moleditor.js =================================================================== --- trunk/cantharella.web/src/main/webapp/js/moleditor.js (rev 0) +++ trunk/cantharella.web/src/main/webapp/js/moleditor.js 2013-01-24 11:34:39 UTC (rev 57) @@ -0,0 +1,38 @@ +function addEditorMolecule(tagId) { + if (tagId) { + tagId = '#' + tagId.replace( /(:|\.)/g, "\\$1" ); + } else { + tagId = '[formula]'; + } + + $(tagId).each(function(i, formulaTag) { + // il faut faire un substring de 1 car on a ajoute un caractere pour + // forcer l'existance du tag' + var formulaString = $(formulaTag).attr('formula').substring(1); + var id = $(formulaTag).attr('id'); + $(formulaTag).after("<div><canvas id='"+id+"'/><div>"); + + // changes the default JMol color of hydrogen to black so it appears on white backgrounds + ChemDoodle.ELEMENT['H'].jmolColor = 'black'; + // darkens the default JMol color of sulfur so it appears on white backgrounds + ChemDoodle.ELEMENT['S'].jmolColor = '#B9A130'; + var sketcher = new ChemDoodle.SketcherCanvas(id, 500, 300,{oneMolecule:true}); + sketcher.specs.atoms_displayTerminalCarbonLabels_2D = true; + sketcher.specs.atoms_useJMOLColors = true; + sketcher.specs.bonds_clearOverlaps_2D = true; + sketcher.repaint(); + + // on se met listener du submit de la form pour pousser la molecule + // editer dans le champs de sauvegarde + $(formulaTag).parents('form').submit(function() { + var mol = sketcher.getMolecule(); + var molString = ChemDoodle.writeMOL(mol); + $(formulaTag).val(molString); + return true; + }); + + var formula = ChemDoodle.readMOL(formulaString); + sketcher.loadMolecule(formula); + }); + +} Added: trunk/cantharella.web/src/main/webapp/js/molviewer.js =================================================================== --- trunk/cantharella.web/src/main/webapp/js/molviewer.js (rev 0) +++ trunk/cantharella.web/src/main/webapp/js/molviewer.js 2013-01-24 11:34:39 UTC (rev 57) @@ -0,0 +1,28 @@ +function addViewerMolecule(tagId) { + if (tagId) { + tagId = '#' + tagId.replace( /(:|\.)/g, "\\$1" ); + } else { + tagId = '[formula]'; + } + + $(tagId).each(function(i, formulaTag) { + // il faut faire un substring de 1 car on a ajoute un caractere pour + // forcer l'existance du tag' + var formulaString = $(formulaTag).attr('formula').substring(1); + var id = $(formulaTag).attr('id'); + $(formulaTag).replaceWith("<canvas id='"+id+"'/>"); + + //initialize component and set visual specifications + var viewerCanvas = new ChemDoodle.ViewerCanvas(id, 100, 100); + viewerCanvas.specs.bonds_width_2D = .6; + viewerCanvas.specs.bonds_saturationWidth_2D = .18; + viewerCanvas.specs.bonds_hashSpacing_2D = 2.5; + viewerCanvas.specs.atoms_font_size_2D = 10; + viewerCanvas.specs.atoms_font_families_2D = ["Helvetica", "Arial", "sans-serif"]; + viewerCanvas.specs.atoms_displayTerminalCarbonLabels_2D = true; + + var formula = ChemDoodle.readMOL(formulaString); + viewerCanvas.loadMolecule(formula); + }); + +}