From: iberezovskiy Date: Wed, 25 Feb 2015 14:15:36 +0000 (+0300) Subject: Build Openstack Dashboard for Ubuntu 14.04 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F74%2F3974%2F4;p=openstack-build%2Fhorizon-build.git Build Openstack Dashboard for Ubuntu 14.04 * Add specs to build horizon 2014.2.2 for Trusty * Fix requirements Change-Id: Ic485c926b82c2c7445681f85259c987a378f7458 --- diff --git a/trusty/debian/README.compression b/trusty/debian/README.compression new file mode 100644 index 0000000..a74700f --- /dev/null +++ b/trusty/debian/README.compression @@ -0,0 +1,6 @@ +Until this can be scripted and integrated into package build, updating the +pre-compressed static CSS and JS requires a some manual steps: + + sudo apt-get install python-lesscpy python-openstack-auth python-compressor + quilt pop top + ./debian/rules refresh-static-assets diff --git a/trusty/debian/changelog b/trusty/debian/changelog new file mode 100644 index 0000000..3e50544 --- /dev/null +++ b/trusty/debian/changelog @@ -0,0 +1,5 @@ +horizon (1:2014.2.2-fuel6.1-14.04-1) trusty; urgency=medium + + * Build horizon 2014.2.2 for Ubuntu 14.04 + + -- Ivan Berezovskiy Wed, 25 Feb 2015 17:07:55 +0300 diff --git a/trusty/debian/compat b/trusty/debian/compat new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/trusty/debian/compat @@ -0,0 +1 @@ +8 diff --git a/trusty/debian/control b/trusty/debian/control new file mode 100644 index 0000000..772d03d --- /dev/null +++ b/trusty/debian/control @@ -0,0 +1,95 @@ +Source: horizon +Section: net +Priority: extra +Maintainer: MOS Horizon Team +Build-Depends: + debhelper (>= 8.0.0), + pylint, + python-all (>= 2.7.1), + python-django-nose, + python-lesscpy, + python-mox, + python-netaddr, + python-nose, + python-pbr, + python-setuptools, + python-sphinx +Standards-Version: 3.9.3 +Homepage: http://launchpad.net/horizon + +Package: python-django-horizon +Section: python +Architecture: all +Depends: + python-ceilometerclient (>= 1.0.6), + python-cinderclient (>= 1.1.0), + python-cloudfiles, + python-compressor (>= 1.4), + python-django (>= 1.4.2), python-django (<< 1.7), + python-django-pyscss (>= 1.0.3), + python-eventlet (>= 0.15.1), + python-glanceclient (>= 0.14.0), + python-heatclient (>= 0.2.9), + python-httplib2 (>= 0.7.5), + python-iso8601 (>= 0.1.9), + python-keystoneclient (>= 1:0.10.0), + python-kombu (>= 3.0.7), + python-lesscpy, + python-lockfile (>= 0.8), + python-memcache, + python-netaddr (>= 0.7.12), + python-neutronclient (>= 1:2.3.6), python-neutronclient (<< 1:3.0), + python-novaclient (>= 2.18.0), + python-openstack-auth (>= 1.1.7), + python-oslo.serialization (>= 1.0.0), + python-pbr (>= 0.10), + python-pyscss (>= 1.2.1), + python-saharaclient (>= 0.7.3), + python-six (>= 1.7.0), + python-swiftclient (>= 2.2.0), + python-troveclient (>= 1.0.4), + python-tz, + python-xstatic-angular-cookies (>= 1.2.1.1), + python-xstatic-angular-mock (>= 1.2.1.1), + python-xstatic-angular (>= 1.2.1.1), + python-xstatic-bootstrap-scss (>= 3), + python-xstatic-d3 (>= 3.1.6.2), + python-xstatic-bootstrap-datepicker (>= 1.3.1.0), + python-xstatic-font-awesome (>= 4.1.0), + python-xstatic-hogan (>= 2.0.0.2), + python-xstatic-jasmine (>= 1.3.1.1), + python-xstatic-jquery-migrate (>= 1.2.1.1), + python-xstatic-jquery.quicksearch (>= 2.0.3.1), + python-xstatic-jquery.tablesorter (>= 2.0.5b.0), + python-xstatic-jquery-ui (>= 1.10.1), + python-xstatic-jquery (>= 1.7.2), + python-xstatic-jsencrypt (>= 2.0.0.2), + python-xstatic-qunit (>= 1.14.0.2), + python-xstatic-rickshaw (>= 1.5.0), + python-xstatic-spin (>= 1.2.5.2), + python-xstatic (>= 1.0.0), + ${misc:Depends}, + ${python:Depends} +Recommends: memcached +Suggests: python-lesscpy +Description: Django module providing web based interaction with OpenStack + The Django-Nova project is a Django module that is used to provide web based + interactions with the OpenStack Nova cloud controller. + +Package: openstack-dashboard +Provides: sahara-dashboard +Replaces: sahara-dashboard +Architecture: all +Pre-Depends: dpkg (>= 1.15.7.2) +Depends: + adduser, + apache2 | httpd, + libapache2-mod-wsgi (>= 2.3), + python-django-horizon (= ${source:Version}), + ${misc:Depends}, + ${python:Depends} +Description: django web interface to Openstack + The OpenStack Dashboard is a reference implementation of a Django site that + uses the Django-Nova project to provide web based interactions with the + OpenStack Nova cloud controller. + diff --git a/trusty/debian/copyright b/trusty/debian/copyright new file mode 100644 index 0000000..b71f4aa --- /dev/null +++ b/trusty/debian/copyright @@ -0,0 +1,55 @@ +Format: http://dep.debian.net/deps/dep5 +Upstream-Name: horizon +Source: http://github.com/openstack/horizon + +Files: * +Copyright: 2010 United States Government as represented by the Administrator of the National Aeronautics and Space Administration. + 2011 Nebula, Inc. + 2011 OpenStack LLC + 2011 Midokura KK +License: Apache-2 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + http://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. + +Files: tools/rfc.sh +Copyright: Copyright (c) 2010-2011 Gluster, Inc +License: GPL-v3 + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + . + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/GPL-3' + +Files: debian/* +Copyright: (c) 2012 Chuck Short +License: Apache-2 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + http://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. diff --git a/trusty/debian/openstack-dashboard.conf b/trusty/debian/openstack-dashboard.conf new file mode 100755 index 0000000..1dfc262 --- /dev/null +++ b/trusty/debian/openstack-dashboard.conf @@ -0,0 +1,8 @@ +WSGIScriptAlias /horizon /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi +WSGIDaemonProcess horizon user=horizon group=horizon processes=3 threads=10 +WSGIProcessGroup horizon +Alias /static /usr/share/openstack-dashboard/openstack_dashboard/static/ + + Order allow,deny + Allow from all + diff --git a/trusty/debian/openstack-dashboard.dirs b/trusty/debian/openstack-dashboard.dirs new file mode 100644 index 0000000..b8f6a27 --- /dev/null +++ b/trusty/debian/openstack-dashboard.dirs @@ -0,0 +1,6 @@ +/etc/openstack-dashboard +/usr/share/openstack-dashboard +/usr/share/openstack-dashboard/bin/less/ +/usr/share/openstack-dashboard/openstack_dashboard/static/dashboard/js +/usr/share/openstack-dashboard/openstack_dashboard/static/dashboard/css +/var/lib/openstack-dashboard diff --git a/trusty/debian/openstack-dashboard.install b/trusty/debian/openstack-dashboard.install new file mode 100644 index 0000000..b343328 --- /dev/null +++ b/trusty/debian/openstack-dashboard.install @@ -0,0 +1,6 @@ +debian/openstack-dashboard.conf etc/apache2/conf-available +debian/static/openstack-dashboard/css/* usr/share/openstack-dashboard/openstack_dashboard/static/dashboard/css +debian/static/openstack-dashboard/js/* usr/share/openstack-dashboard/openstack_dashboard/static/dashboard/js +debian/static/openstack-dashboard/manifest.json usr/share/openstack-dashboard/openstack_dashboard/static/dashboard +etc/openstack-dashboard +usr/share/openstack-dashboard diff --git a/trusty/debian/openstack-dashboard.links b/trusty/debian/openstack-dashboard.links new file mode 100644 index 0000000..7f7eb04 --- /dev/null +++ b/trusty/debian/openstack-dashboard.links @@ -0,0 +1,2 @@ +/usr/share/openstack-dashboard/openstack_dashboard/static /usr/share/openstack-dashboard/static +/usr/bin/lessc /usr/share/openstack-dashboard/bin/less/lessc diff --git a/trusty/debian/openstack-dashboard.postinst b/trusty/debian/openstack-dashboard.postinst new file mode 100644 index 0000000..7e75670 --- /dev/null +++ b/trusty/debian/openstack-dashboard.postinst @@ -0,0 +1,63 @@ +#!/bin/sh +# vim: set ts=2 et: + +set -e + +CONF="openstack-dashboard.conf" + +if [ "$1" = "configure" ]; then + # /etc/apache2/conf.d/dashboard.conf -> /etc/apache2/conf-available/openstack-dashboard.conf + dpkg-maintscript-helper mv_conffile \ + /etc/apache2/conf.d/dashboard.conf /etc/apache2/conf-available/$CONF \ + 2012.1~rc1-0ubuntu1 -- "$@" + + # Transition config to apache 2.4 compatable location. + dpkg-maintscript-helper mv_conffile \ + /etc/apache2/conf.d/$CONF \ + /etc/apache2/conf-available/$CONF \ + 1:2013.2~b2-0ubuntu3 -- "$@" + + if ! getent group horizon > /dev/null 2>&1 + then + addgroup --system horizon >/dev/null + fi + if ! getent passwd horizon > /dev/null 2>&1 + then + adduser --system --home /usr/share/openstack-dashboard/ --ingroup horizon \ + --no-create-home --shell /bin/false horizon + fi + + if [ -e /usr/share/openstack-dashboard/openstack_dashboard/static ] ; then + chown -R horizon:horizon \ + /usr/share/openstack-dashboard/openstack_dashboard/static + fi + + if [ -d /etc/openstack-dashboard/ ] ; then + chown horizon:horizon /etc/openstack-dashboard/ + fi + + A22_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true) + + if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then + # apache 2.4 + . /usr/share/apache2/apache2-maintscript-helper + apache2_invoke enconf $CONF || exit $? + elif [ "$A22_STATE" = "installed" ] || [ "$A22_STATE" = "unpacked" ] ; then + # apache 2.2 + [ -d /etc/apache2/conf.d/ ] && [ ! -L /etc/apache2/conf.d/$CONF ] && + ln -s ../conf-available/$CONF /etc/apache2/conf.d/$CONF + [ -x /etc/init.d/apache2 ] && invoke-rc.d --quiet apache2 reload + fi + + if [ -d /var/lib/openstack-dashboard ] ; then + # Generated secret storage for single node use - see local_settings.py + # for more details of SECRET_KEY + chmod 0700 /var/lib/openstack-dashboard + if [ -f /etc/openstack-dashboard/secret_key ]; then + mv /etc/openstack-dashboard/secret_key /var/lib/openstack-dashboard + fi + chown -R horizon:horizon /var/lib/openstack-dashboard + fi +fi + +#DEBHELPER# diff --git a/trusty/debian/openstack-dashboard.postrm b/trusty/debian/openstack-dashboard.postrm new file mode 100644 index 0000000..407ec1b --- /dev/null +++ b/trusty/debian/openstack-dashboard.postrm @@ -0,0 +1,44 @@ +#!/bin/sh +# vim: set ts=2 et: + +set -e + +CONF="openstack-dashboard.conf" + +# /etc/apache2/conf.d/dashboard.conf -> /etc/apache2/conf-available/openstack-dashboard.conf +dpkg-maintscript-helper mv_conffile \ + /etc/apache2/conf.d/dashboard.conf /etc/apache2/conf-available/$CONF \ + 2012.1~rc1-0ubuntu1 -- "$@" + +# Transition config to apache 2.4 compatable location. +dpkg-maintscript-helper mv_conffile \ + /etc/apache2/conf.d/openstack-dashboard.conf \ + /etc/apache2/conf-available/openstack-dashboard.conf \ + 1:2013.2~b2-0ubuntu3 -- "$@" + +if [ "$1" = "remove" ] || [ "$1" = "purge" ] ; then + A22_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true) + + if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then + # apache 2.4 + . /usr/share/apache2/apache2-maintscript-helper + apache2_invoke disconf $CONF || exit $? + elif [ "$A22_STATE" = "installed" ] || [ "$A22_STATE" = "unpacked" ] ; then + # apache 2.2 + [ -d /etc/apache2/conf.d/ ] && [ -L /etc/apache2/conf.d/$CONF ] && + rm /etc/apache2/conf.d/$CONF + [ -x /etc/init.d/apache2 ] && invoke-rc.d --quiet apache2 reload + fi + +fi + +if [ "$1" = "purge" ] ; then + if (which deluser && getent passwd horizon) > /dev/null 2>&1; then + deluser --system --quiet --backup-to /var/lib horizon + fi + if (which delgroup && getent group horizon) > /dev/null 2>&1; then + delgroup --system --quiet horizon + fi +fi + +#DEBHELPER# diff --git a/trusty/debian/openstack-dashboard.preinst b/trusty/debian/openstack-dashboard.preinst new file mode 100644 index 0000000..4979072 --- /dev/null +++ b/trusty/debian/openstack-dashboard.preinst @@ -0,0 +1,17 @@ +#!/bin/sh +# vim: set ts=2 et: + +set -e + +# /etc/apache2/conf.d/dashboard.conf -> /etc/apache2/conf.d/openstack-dashboard.conf +dpkg-maintscript-helper mv_conffile \ + /etc/apache2/conf.d/dashboard.conf /etc/apache2/conf.d/openstack-dashboard.conf \ + 2012.1~rc1-0ubuntu1 -- "$@" + +# Transition config to apache 2.4 compatable location. +dpkg-maintscript-helper mv_conffile \ + /etc/apache2/conf.d/openstack-dashboard.conf \ + /etc/apache2/conf-available/openstack-dashboard.conf \ + 1:2013.2~b2-0ubuntu3 -- "$@" + +#DEBHELPER# diff --git a/trusty/debian/patches/add_juju_settings_panel.patch b/trusty/debian/patches/add_juju_settings_panel.patch new file mode 100644 index 0000000..35ccd7e --- /dev/null +++ b/trusty/debian/patches/add_juju_settings_panel.patch @@ -0,0 +1,309 @@ +Index: horizon-2012.2/horizon/dashboards/settings/dashboard.py +=================================================================== +--- horizon-2012.2.orig/horizon/dashboards/settings/dashboard.py 2012-10-09 11:54:50.986004892 -0700 ++++ horizon-2012.2/horizon/dashboards/settings/dashboard.py 2012-10-09 11:54:57.058004668 -0700 +@@ -16,6 +16,7 @@ + # under the License. + + from django.utils.translation import ugettext_lazy as _ ++from django.conf import settings + + import horizon + +@@ -23,7 +24,15 @@ + class Settings(horizon.Dashboard): + name = _("Settings") + slug = "settings" +- panels = ('user', 'project', 'ec2') ++ try: ++ juju_panel = getattr(settings, 'ENABLE_JUJU_PANEL') ++ if juju_panel == True: ++ panels = ('user', 'project', 'ec2', 'juju') ++ else: ++ panels = ('user', 'project', 'ec2') ++ except AttributeError: ++ panels = ('user', 'project', 'ec2') ++ + default_panel = 'user' + nav = False + +Index: horizon-2012.2/horizon/dashboards/settings/juju/forms.py +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ horizon-2012.2/horizon/dashboards/settings/juju/forms.py 2012-10-09 11:58:55.169995921 -0700 +@@ -0,0 +1,100 @@ ++# vim: tabstop=4 shiftwidth=4 softtabstop=4 ++ ++# Copyright 2012 Openstack, LLC ++# Copyright 2012 Canonical Ltd. ++# ++# Licensed under the Apache License, Version 2.0 (the "License"); you may ++# not use this file except in compliance with the License. You may obtain ++# a copy of the License at ++# ++# http://www.apache.org/licenses/LICENSE-2.0 ++# ++# Unless required by applicable law or agreed to in writing, software ++# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT ++# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the ++# License for the specific language governing permissions and limitations ++# under the License. ++ ++import logging ++import tempfile ++import zipfile ++from contextlib import closing ++ ++from django import http, shortcuts ++from django.template.loader import render_to_string ++from django.utils.translation import ugettext_lazy as _ ++ ++from horizon import api ++from horizon import exceptions ++from horizon import forms ++from horizon import messages ++ ++import boto ++import uuid ++ ++LOG = logging.getLogger(__name__) ++ ++ ++class DownloadJujuEnvironment(forms.SelfHandlingForm): ++ # This is heavily based off the ec2 credentials form ++ tenant = forms.ChoiceField(label=_("Select a Project")) ++ @classmethod ++ def _instantiate(cls, request, *args, **kwargs): ++ return cls(request, *args, **kwargs) ++ ++ def __init__(self, request, *args, **kwargs): ++ super(DownloadJujuEnvironment, self).__init__(request, *args, **kwargs) ++ tenant_choices = [] ++ try: ++ tenant_list = api.keystone.tenant_list(request) ++ except: ++ tenant_list = [] ++ exceptions.handle(request, _("Unable to retrieve tenant list.")) ++ ++ for tenant in tenant_list: ++ if tenant.enabled: ++ tenant_choices.append((tenant.id, tenant.name)) ++ if not tenant_choices: ++ self.fields['tenant'].choices = ('', 'No Available Tenants') ++ else: ++ self.fields['tenant'].choices = tenant_choices ++ ++ def handle(self, request, data): ++ def find_or_create_access_keys(request, tenant_id): ++ keys = api.keystone.list_ec2_credentials(request, request.user.id) ++ if keys: ++ return keys[0] ++ else: ++ return api.keystone.create_ec2_credentials(request, ++ request.user.id, ++ tenant_id) ++ try: ++ api.keystone.token_create_scoped(request, ++ data.get('tenant'), ++ request.user.token.id) ++ keys = find_or_create_access_keys(request, data.get('tenant')) ++ tenant_id = data['tenant'] ++ tenant_name = dict(self.fields['tenant'].choices)[tenant_id] ++ control_bucket = "juju-openstack-%s-%s" % (tenant_name, str(uuid.uuid4())[19:]) ++ context = {'ec2_access_key': keys.access, ++ 'ec2_secret_key': keys.secret, ++ 'ec2_url': api.url_for(request, 'ec2'), ++ 's3_url': api.url_for(request, 's3'), ++ 'juju_admin_secret': uuid.uuid4().hex, ++ 'control_bucket': control_bucket ++ } ++ except Exception, e: ++ # This will fail if there is not an S3 endpoint configured in the ++ # service catalog. ++ msg = "Could not generate Juju environment config: %s" % e ++ messages.error(request, msg) ++ redirect = request.build_absolute_uri() ++ raise exceptions.Http302(redirect) ++ ++ response = shortcuts.render(request, ++ 'settings/juju/environments.yaml.template', ++ context, ++ content_type='text/plain') ++ response['Content-Disposition'] = 'attachment; filename=environments.yaml' ++ response['Content-Length'] = str(len(response.content)) ++ return response +Index: horizon-2012.2/horizon/dashboards/settings/juju/__init__.py +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ horizon-2012.2/horizon/dashboards/settings/juju/__init__.py 2012-10-09 11:54:57.058004668 -0700 +@@ -0,0 +1 @@ ++# Horizon Juju settings panel +Index: horizon-2012.2/horizon/dashboards/settings/juju/panel.py +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ horizon-2012.2/horizon/dashboards/settings/juju/panel.py 2012-10-09 11:54:57.058004668 -0700 +@@ -0,0 +1,28 @@ ++# vim: tabstop=4 shiftwidth=4 softtabstop=4 ++# Copyright 2012 Openstack, LLC ++# Copyright 2012 Canonical Ltd. ++# ++# Licensed under the Apache License, Version 2.0 (the "License"); you may ++# not use this file except in compliance with the License. You may obtain ++# a copy of the License at ++# ++# http://www.apache.org/licenses/LICENSE-2.0 ++# ++# Unless required by applicable law or agreed to in writing, software ++# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT ++# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the ++# License for the specific language governing permissions and limitations ++# under the License. ++ ++from django.utils.translation import ugettext_lazy as _ ++ ++import horizon ++from horizon.dashboards.settings import dashboard ++ ++ ++class JujuPanel(horizon.Panel): ++ name = _("Juju Environment Config") ++ slug = 'juju' ++ ++ ++dashboard.Settings.register(JujuPanel) +Index: horizon-2012.2/horizon/dashboards/settings/juju/urls.py +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ horizon-2012.2/horizon/dashboards/settings/juju/urls.py 2012-10-09 11:54:57.058004668 -0700 +@@ -0,0 +1,24 @@ ++# vim: tabstop=4 shiftwidth=4 softtabstop=4 ++ ++# Copyright 2012 Openstack, LLC ++# Copyright 2012 Canonical Ltd. ++# ++# Licensed under the Apache License, Version 2.0 (the "License"); you may ++# not use this file except in compliance with the License. You may obtain ++# a copy of the License at ++# ++# http://www.apache.org/licenses/LICENSE-2.0 ++# ++# Unless required by applicable law or agreed to in writing, software ++# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT ++# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the ++# License for the specific language governing permissions and limitations ++# under the License. ++ ++from django.conf.urls.defaults import patterns, url ++ ++from .views import IndexView ++ ++urlpatterns = patterns('horizon.dashboards.settings.juju.views', ++ url(r'^$', IndexView.as_view(), name='index'), ++) +Index: horizon-2012.2/horizon/dashboards/settings/juju/views.py +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ horizon-2012.2/horizon/dashboards/settings/juju/views.py 2012-10-09 11:57:05.949999981 -0700 +@@ -0,0 +1,35 @@ ++# vim: tabstop=4 shiftwidth=4 softtabstop=4 ++ ++# Copyright 2012 Openstack, LLC ++# ++# Licensed under the Apache License, Version 2.0 (the "License"); you may ++# not use this file except in compliance with the License. You may obtain ++# a copy of the License at ++# ++# http://www.apache.org/licenses/LICENSE-2.0 ++# ++# Unless required by applicable law or agreed to in writing, software ++# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT ++# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the ++# License for the specific language governing permissions and limitations ++# under the License. ++ ++import logging ++ ++from django.core.urlresolvers import reverse_lazy ++ ++from horizon import forms ++from horizon.dashboards.settings.juju.forms import DownloadJujuEnvironment ++ ++ ++LOG = logging.getLogger(__name__) ++ ++ ++class IndexView(forms.ModalFormView): ++ form_class = DownloadJujuEnvironment ++ template_name = 'settings/juju/index.html' ++ success_url = reverse_lazy('horizon:settings:juju') ++ ++ def form_valid(self, form): ++ return form.handle(self.request, form.cleaned_data) ++ +Index: horizon-2012.2/horizon/dashboards/settings/templates/settings/juju/download_form.html +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ horizon-2012.2/horizon/dashboards/settings/templates/settings/juju/download_form.html 2012-10-09 11:54:57.058004668 -0700 +@@ -0,0 +1,20 @@ ++{% extends "horizon/common/_modal_form.html" %} ++{% load i18n %} ++ ++ ++{% block modal-body %} ++
++
++ {% include "horizon/common/_form_fields.html" %} ++
++
++
++

{% trans "Description:" %}

++

{% trans 'Clicking "Download Juju Environment Config" will download a file which includes a Juju environment configured for your cloud.


To find out more about Juju visit http://juju.ubuntu.com' %}

++
++{% endblock %} ++ ++{% block modal-footer %} ++ ++ {% if hide %}{% trans "Cancel" %}{% endif %} ++{% endblock %} +Index: horizon-2012.2/horizon/dashboards/settings/templates/settings/juju/environments.yaml.template +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ horizon-2012.2/horizon/dashboards/settings/templates/settings/juju/environments.yaml.template 2012-10-09 11:54:57.058004668 -0700 +@@ -0,0 +1,21 @@ ++# To use Juju with your Openstack cloud: ++# 1. Run: apt-get install juju ++# 2. Copy this file to $HOME/.juju/environments.yaml ++# 3. Modify the 'default-image-id' to match an Ubuntu cloud image ++# AMI that has been published to your cloud. ++# 4. Run 'juju bootstrap' and deploy services! ++# ++# To find out more about juju visit http://juju.ubuntu.com ++ ++juju: environments ++environments: ++ openstack: ++ type: ec2 ++ control-bucket: {{ control_bucket }} ++ admin-secret: {{ juju_admin_secret }} ++ access-key: {{ ec2_access_key }} ++ secret-key: {{ ec2_secret_key }} ++ ec2-uri: {{ ec2_url }} ++ s3-uri: {{ s3_url }} ++ default-series: precise ++ default-image-id: ami-00000001 +Index: horizon-2012.2/horizon/dashboards/settings/templates/settings/juju/index.html +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ horizon-2012.2/horizon/dashboards/settings/templates/settings/juju/index.html 2012-10-09 11:54:57.058004668 -0700 +@@ -0,0 +1,11 @@ ++{% extends 'base.html' %} ++{% load i18n %} ++{% block title %}{% trans "Download Juju Environment Config" %}{% endblock %} ++ ++{% block page_header %} ++ {% include "horizon/common/_page_header.html" with title=_("Download Juju Environment Config") %} ++{% endblock page_header %} ++ ++{% block main %} ++ {% include "settings/juju/download_form.html" %} ++{% endblock %} diff --git a/trusty/debian/patches/fix-dashboard-django-wsgi.patch b/trusty/debian/patches/fix-dashboard-django-wsgi.patch new file mode 100644 index 0000000..028d302 --- /dev/null +++ b/trusty/debian/patches/fix-dashboard-django-wsgi.patch @@ -0,0 +1,25 @@ +From a0e71f08e46805a076d4f5cde7cb39ab64d82be3 Mon Sep 17 00:00:00 2001 +From: Maksym Yatsenko +Date: Fri, 30 Jan 2015 18:19:22 +0200 +Subject: [PATCH] fix-dashboard-django-wsgi + +--- + openstack_dashboard/wsgi/django.wsgi | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/openstack_dashboard/wsgi/django.wsgi b/openstack_dashboard/wsgi/django.wsgi +index 1be0e06..05c8631 100644 +--- a/openstack_dashboard/wsgi/django.wsgi ++++ b/openstack_dashboard/wsgi/django.wsgi +@@ -9,6 +9,8 @@ sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), '.. + os.environ['DJANGO_SETTINGS_MODULE'] = 'openstack_dashboard.settings' + sys.stdout = sys.stderr + ++sys.path.append("/usr/share/openstack-dashboard/") ++ + DEBUG = False + + application = get_wsgi_application() +-- +1.9.1 + diff --git a/trusty/debian/patches/fix-dashboard-manage.patch b/trusty/debian/patches/fix-dashboard-manage.patch new file mode 100644 index 0000000..134712c --- /dev/null +++ b/trusty/debian/patches/fix-dashboard-manage.patch @@ -0,0 +1,12 @@ +diff -Naurp horizon-2014.2.b2.orig/manage.py horizon-2014.2.b2/manage.py +--- horizon-2014.2.b2.orig/manage.py 2014-07-23 15:25:01.000000000 -0400 ++++ horizon-2014.2.b2/manage.py 2014-07-25 11:20:09.989608740 -0400 +@@ -17,6 +17,8 @@ import sys + + from django.core.management import execute_from_command_line # noqa + ++sys.path.append("/usr/share/openstack-dashboard") ++ + if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", + "openstack_dashboard.settings") diff --git a/trusty/debian/patches/fix-ubuntu-tests.patch b/trusty/debian/patches/fix-ubuntu-tests.patch new file mode 100644 index 0000000..585ff02 --- /dev/null +++ b/trusty/debian/patches/fix-ubuntu-tests.patch @@ -0,0 +1,40 @@ +--- a/run_tests.sh ++++ b/run_tests.sh +@@ -298,25 +298,25 @@ function run_tests_all { + if [ "$NOSE_WITH_HTML_OUTPUT" = '1' ]; then + export NOSE_HTML_OUT_FILE='horizon_nose_results.html' + fi +- ${command_wrapper} coverage erase +- ${command_wrapper} coverage run -p $root/manage.py test horizon --settings=horizon.test.settings $testopts ++ ${command_wrapper} python-coverage erase ++ ${command_wrapper} python-coverage run -p $root/manage.py test horizon --settings=horizon.test.settings $testopts + # get results of the Horizon tests + HORIZON_RESULT=$? + +- echo "Running openstack_dashboard tests" +- export NOSE_XUNIT_FILE=openstack_dashboard/nosetests.xml +- if [ "$NOSE_WITH_HTML_OUTPUT" = '1' ]; then +- export NOSE_HTML_OUT_FILE='dashboard_nose_results.html' +- fi +- ${command_wrapper} coverage run -p $root/manage.py test openstack_dashboard --settings=openstack_dashboard.test.settings $testopts ++ #echo "Running openstack_dashboard tests" ++ #export NOSE_XUNIT_FILE=openstack_dashboard/nosetests.xml ++ #if [ "$NOSE_WITH_HTML_OUTPUT" = '1' ]; then ++ # export NOSE_HTML_OUT_FILE='dashboard_nose_results.html' ++ #fi ++ #${command_wrapper} coverage run -p $root/manage.py test openstack_dashboard --settings=openstack_dashboard.test.settings $testopts + # get results of the openstack_dashboard tests +- DASHBOARD_RESULT=$? ++ #DASHBOARD_RESULT=$? + + if [ $with_coverage -eq 1 ]; then + echo "Generating coverage reports" +- ${command_wrapper} coverage combine +- ${command_wrapper} coverage xml -i --omit='/usr*,setup.py,*egg*,.venv/*' +- ${command_wrapper} coverage html -i --omit='/usr*,setup.py,*egg*,.venv/*' -d reports ++ ${command_wrapper} python-coverage combine ++ ${command_wrapper} python-coverage xml -i --omit='/usr*,setup.py,*egg*,.venv/*' ++ ${command_wrapper} python-coverage html -i --omit='/usr*,setup.py,*egg*,.venv/*' -d reports + fi + # Remove the leftover coverage files from the -p flag earlier. + rm -f .coverage.* diff --git a/trusty/debian/patches/series b/trusty/debian/patches/series new file mode 100644 index 0000000..42b36b8 --- /dev/null +++ b/trusty/debian/patches/series @@ -0,0 +1,8 @@ +fix-dashboard-django-wsgi.patch +fix-dashboard-manage.patch + +# Disabled during Grizzly dev. cycle +#add_juju_settings_panel.patch + +#fix-ubuntu-tests.patch +ubuntu_settings.patch diff --git a/trusty/debian/patches/ubuntu_settings.patch b/trusty/debian/patches/ubuntu_settings.patch new file mode 100644 index 0000000..f7881d0 --- /dev/null +++ b/trusty/debian/patches/ubuntu_settings.patch @@ -0,0 +1,54 @@ +diff -Naurp horizon-2014.2.b2.orig/openstack_dashboard/local/local_settings.py.example horizon-2014.2.b2/openstack_dashboard/local/local_settings.py.example +--- horizon-2014.2.b2.orig/openstack_dashboard/local/local_settings.py.example 2014-07-23 15:25:01.000000000 -0400 ++++ horizon-2014.2.b2/openstack_dashboard/local/local_settings.py.example 2014-07-25 11:22:46.361608816 -0400 +@@ -4,7 +4,7 @@ from django.utils.translation import uge + + from openstack_dashboard import exceptions + +-DEBUG = True ++DEBUG = False + TEMPLATE_DEBUG = DEBUG + + # Required for Django 1.5. +@@ -100,19 +100,19 @@ SECRET_KEY = secret_key.generate_or_read + # We recommend you use memcached for development; otherwise after every reload + # of the django development server, you will have to login again. To use + # memcached set CACHES to something like +-# CACHES = { ++CACHES = { ++ 'default': { ++ 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', ++ 'LOCATION': '127.0.0.1:11211', ++ } ++} ++ ++#CACHES = { + # 'default': { +-# 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', +-# 'LOCATION': '127.0.0.1:11211', ++# 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache' + # } + #} + +-CACHES = { +- 'default': { +- 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache' +- } +-} +- + # Send email to the console by default + EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' + # Or send them to /dev/null +diff -Naurp horizon-2014.2.b2.orig/openstack_dashboard/settings.py horizon-2014.2.b2/openstack_dashboard/settings.py +--- horizon-2014.2.b2.orig/openstack_dashboard/settings.py 2014-07-23 15:25:01.000000000 -0400 ++++ horizon-2014.2.b2/openstack_dashboard/settings.py 2014-07-25 11:23:50.129608847 -0400 +@@ -272,8 +272,7 @@ if not SECRET_KEY: + 'local') + + from horizon.utils import secret_key +- SECRET_KEY = secret_key.generate_or_read_from_file(os.path.join(LOCAL_PATH, +- '.secret_key_store')) ++ SECRET_KEY = secret_key.generate_or_read_from_file('/var/lib/openstack-dashboard/secret_key') + + from openstack_dashboard import policy + POLICY_CHECK_FUNCTION = policy.check diff --git a/trusty/debian/pydist-overrides b/trusty/debian/pydist-overrides new file mode 100644 index 0000000..f8c9076 --- /dev/null +++ b/trusty/debian/pydist-overrides @@ -0,0 +1,2 @@ +python_quantumclient +django_nose_selenium diff --git a/trusty/debian/python-django-horizon.install b/trusty/debian/python-django-horizon.install new file mode 100644 index 0000000..d9462f9 --- /dev/null +++ b/trusty/debian/python-django-horizon.install @@ -0,0 +1 @@ +usr/lib/python*/dist-packages/horizon diff --git a/trusty/debian/python-django-horizon.lintian-overrides b/trusty/debian/python-django-horizon.lintian-overrides new file mode 100644 index 0000000..37c101b --- /dev/null +++ b/trusty/debian/python-django-horizon.lintian-overrides @@ -0,0 +1,2 @@ +# Templates are not intended to be executed directly: +python-django-horizon binary: script-not-executable usr/share/pyshared/horizon/dashboards/settings/templates/settings/tenant/openrc.sh.template diff --git a/trusty/debian/rules b/trusty/debian/rules new file mode 100755 index 0000000..69e7b95 --- /dev/null +++ b/trusty/debian/rules @@ -0,0 +1,47 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +%: + dh $@ --with python2 + +PYVER=$(shell pyversions -d) + +override_dh_auto_install: + # install horizon and dashboard + python setup.py install --root=$(CURDIR)/debian/tmp --no-compile -O0 --install-layout=deb + install -d -m 755 $(CURDIR)/debian/tmp/usr/share/openstack-dashboard + install -d -m 755 $(CURDIR)/debian/tmp/etc/openstack-dashboard + install -d -m 755 $(CURDIR)/debian/tmp/etc/apache2/conf-available + + cp -a $(CURDIR)/openstack_dashboard/ $(CURDIR)/debian/tmp/usr/share/openstack-dashboard/ + install -d -m 755 $(CURDIR)/debian/tmp/etc/openstack-dashboard + cp -a $(CURDIR)/openstack_dashboard/settings.py $(CURDIR)/debian/tmp/usr/share/openstack-dashboard/ + + cp $(CURDIR)/openstack_dashboard/local/local_settings.py.example \ + $(CURDIR)/debian/tmp/etc/openstack-dashboard/local_settings.py + cp $(CURDIR)/manage.py \ + $(CURDIR)/debian/tmp/usr/share/openstack-dashboard/manage.py + ln -fs /etc/openstack-dashboard/local_settings.py \ + $(CURDIR)/debian/tmp/usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.py + cp $(CURDIR)/debian/theme/img/juju.png \ + $(CURDIR)/debian/tmp/usr/share/openstack-dashboard/openstack_dashboard/static/dashboard/img/juju.png + ln -fs /usr/lib/$(PYVER)/dist-packages/horizon/static/horizon \ + $(CURDIR)/debian/tmp/usr/share/openstack-dashboard/openstack_dashboard/static/horizon + +ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) +override_dh_auto_test: + # Skip tests + : +endif + +get-orig-source: + uscan --verbose --force-download --rename --destdir=../build-area + +refresh-static-assets: + (cd openstack_dashboard/local; ln -sf local_settings.py.example local_settings.py) + python ./manage.py compress --force + rm -rf debian/static/openstack-dashboard/* + cp -r static/dashboard/* debian/static/openstack-dashboard/ + rm -f openstack_dashboard/local/local_settings.py diff --git a/trusty/debian/source/format b/trusty/debian/source/format new file mode 100755 index 0000000..163aaf8 --- /dev/null +++ b/trusty/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/trusty/debian/source/include-binaries b/trusty/debian/source/include-binaries new file mode 100755 index 0000000..4343feb --- /dev/null +++ b/trusty/debian/source/include-binaries @@ -0,0 +1,5 @@ +debian/theme/img/dots.png +debian/theme/img/favicon-ubuntu.ico +debian/theme/img/header_stripes.png +debian/theme/img/juju.png +debian/theme/img/ubuntu.png diff --git a/trusty/debian/static/openstack-dashboard/css/6bd71a04f0c0.css b/trusty/debian/static/openstack-dashboard/css/6bd71a04f0c0.css new file mode 100644 index 0000000..8031e2e --- /dev/null +++ b/trusty/debian/static/openstack-dashboard/css/6bd71a04f0c0.css @@ -0,0 +1,6567 @@ +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +nav, +section { + display: block; +} +audio, canvas, video { + display: inline-block; + *display: inline; + *zoom: 1; +} +audio:not([controls]) { + display: none; +} +html { + font-size: 100%; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} +a:focus { + outline: thin dotted #333333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +a:hover, a:active { + outline: 0; +} +sub, sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} +sup { + top: -0.5em; +} +sub { + bottom: -0.25em; +} +img { + max-width: 100%; + height: auto; + border: 0; + -ms-interpolation-mode: bicubic; +} +button, input, select, textarea { + margin: 0; + font-size: 100%; + vertical-align: middle; +} +button, input { + *overflow: visible; + line-height: normal; +} +button::-moz-focus-inner, input::-moz-focus-inner { + padding: 0; + border: 0; +} +button, input[type="button"], input[type="reset"], input[type="submit"] { + cursor: pointer; + -webkit-appearance: button; +} +input[type="search"] { + -webkit-appearance: textfield; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} +input[type="search"]::-webkit-search-decoration, +input[type="search"]::-webkit-search-cancel-button { + -webkit-appearance: none; +} +textarea { + overflow: auto; + vertical-align: top; +} +.clearfix { + *zoom: 1; +} +.clearfix:before, .clearfix:after { + display: table; + content: ""; +} +.clearfix:after { + clear: both; +} +body { + margin: 0; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 13px; + line-height: 18px; + color: #333333; + background-color: #ffffff; +} +a { + color: #0088cc; + text-decoration: none; +} +a:hover { + color: #005580; + text-decoration: underline; +} +.row { + margin-left: -20px; + *zoom: 1; +} +.row:before, .row:after { + display: table; + content: ""; +} +.row:after { + clear: both; +} +[class*="span"] { + float: left; + margin-left: 20px; +} +.span1 { + width: 60px; +} +.span2 { + width: 140px; +} +.span3 { + width: 220px; +} +.span4 { + width: 300px; +} +.span5 { + width: 380px; +} +.span6 { + width: 460px; +} +.span7 { + width: 540px; +} +.span8 { + width: 620px; +} +.span9 { + width: 700px; +} +.span10 { + width: 780px; +} +.span11 { + width: 860px; +} +.span12, .container { + width: 940px; +} +.offset1 { + margin-left: 100px; +} +.offset2 { + margin-left: 180px; +} +.offset3 { + margin-left: 260px; +} +.offset4 { + margin-left: 340px; +} +.offset5 { + margin-left: 420px; +} +.offset6 { + margin-left: 500px; +} +.offset7 { + margin-left: 580px; +} +.offset8 { + margin-left: 660px; +} +.offset9 { + margin-left: 740px; +} +.offset10 { + margin-left: 820px; +} +.offset11 { + margin-left: 900px; +} +.row-fluid { + width: 100%; + *zoom: 1; +} +.row-fluid:before, .row-fluid:after { + display: table; + content: ""; +} +.row-fluid:after { + clear: both; +} +.row-fluid > [class*="span"] { + float: left; + margin-left: 2.127659574%; +} +.row-fluid > [class*="span"]:first-child { + margin-left: 0; +} +.row-fluid > .span1 { + width: 6.382978723%; +} +.row-fluid > .span2 { + width: 14.89361702%; +} +.row-fluid > .span3 { + width: 23.404255317%; +} +.row-fluid > .span4 { + width: 31.914893614%; +} +.row-fluid > .span5 { + width: 40.425531911%; +} +.row-fluid > .span6 { + width: 48.936170208%; +} +.row-fluid > .span7 { + width: 57.446808505%; +} +.row-fluid > .span8 { + width: 65.957446802%; +} +.row-fluid > .span9 { + width: 74.468085099%; +} +.row-fluid > .span10 { + width: 82.978723396%; +} +.row-fluid > .span11 { + width: 91.489361693%; +} +.row-fluid > .span12 { + width: 99.99999999%; +} +.container { + width: 940px; + margin-left: auto; + margin-right: auto; + *zoom: 1; +} +.container:before, .container:after { + display: table; + content: ""; +} +.container:after { + clear: both; +} +.container-fluid { + padding-left: 20px; + padding-right: 20px; + *zoom: 1; +} +.container-fluid:before, .container-fluid:after { + display: table; + content: ""; +} +.container-fluid:after { + clear: both; +} +p { + margin: 0 0 9px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 13px; + line-height: 18px; +} +p small { + font-size: 11px; + color: #999999; +} +.lead { + margin-bottom: 18px; + font-size: 20px; + font-weight: 200; + line-height: 27px; +} +h1, h2, h3, h4, h5, h6 { + margin: 0; + font-weight: bold; + color: #333333; + text-rendering: optimizelegibility; +} +h1 small, h2 small, h3 small, h4 small, h5 small, h6 small { + font-weight: normal; + color: #999999; +} +h1 { + font-size: 30px; + line-height: 36px; +} +h1 small { + font-size: 18px; +} +h2 { + font-size: 24px; + line-height: 36px; +} +h2 small { + font-size: 18px; +} +h3 { + line-height: 27px; + font-size: 18px; +} +h3 small { + font-size: 14px; +} +h4, h5, h6 { + line-height: 18px; +} +h4 { + font-size: 14px; +} +h4 small { + font-size: 12px; +} +h5 { + font-size: 12px; +} +h6 { + font-size: 11px; + color: #999999; + text-transform: uppercase; +} +.page-header { + padding-bottom: 17px; + margin: 18px 0; + border-bottom: 1px solid #eeeeee; +} +.page-header h1 { + line-height: 1; +} +ul, ol { + padding: 0; + margin: 0 0 9px 25px; +} +ul ul, ul ol, ol ol, ol ul { + margin-bottom: 0; +} +ul { + list-style: disc; +} +ol { + list-style: decimal; +} +li { + line-height: 18px; +} +ul.unstyled, ol.unstyled { + margin-left: 0; + list-style: none; +} +table ul { + margin: 0; + list-style-type: none; +} +dl { + margin-bottom: 18px; +} +dt, dd { + line-height: 18px; +} +dt { + font-weight: bold; +} +dd { + margin-left: 9px; +} +hr { + margin: 18px 0; + border: 0; + border-top: 1px solid #eeeeee; + border-bottom: 1px solid #ffffff; +} +strong { + font-weight: bold; +} +em { + font-style: italic; +} +.muted { + color: #999999; +} +abbr { + font-size: 90%; + text-transform: uppercase; + border-bottom: 1px dotted #dddddd; + cursor: help; +} +blockquote { + padding: 0 0 0 15px; + margin: 0 0 18px; + border-left: 5px solid #eeeeee; +} +blockquote p { + margin-bottom: 0; + font-size: 16px; + font-weight: 300; + line-height: 22.5px; +} +blockquote small { + display: block; + line-height: 18px; + color: #999999; +} +blockquote small:before { + content: '\2014 \00A0'; +} +blockquote.pull-right { + float: right; + padding-left: 0; + padding-right: 15px; + border-left: 0; + border-right: 5px solid #eeeeee; +} +blockquote.pull-right p, blockquote.pull-right small { + text-align: right; +} +q:before, q:after, blockquote:before, blockquote:after { + content: ""; +} +address { + display: block; + margin-bottom: 18px; + line-height: 18px; + font-style: normal; +} +small { + font-size: 100%; +} +cite { + font-style: normal; +} +code, pre { + padding: 0 3px 2px; + font-family: Menlo, Monaco, "Courier New", monospace; + font-size: 12px; + color: #333333; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +code { + padding: 3px 4px; + color: #dd1144; + background-color: #f7f7f9; + border: 1px solid #e1e1e8; +} +pre { + display: block; + padding: 8.5px; + margin: 0 0 9px; + font-size: 12px; + line-height: 18px; + background-color: #f5f5f5; + border: 1px solid #cccccc; + border: 1px solid rgba(0,0,0,.15); + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + white-space: pre; + white-space: pre-wrap; + word-break: break-all; + word-wrap: break-word; +} +pre.prettyprint { + margin-bottom: 18px; +} +pre code { + padding: 0; + color: inherit; + background-color: transparent; + border: 0; +} +.pre-scrollable { + max-height: 340px; + overflow-y: scroll; +} +form { + margin: 0 0 18px; +} +fieldset { + padding: 0; + margin: 0; + border: 0; +} +legend { + display: block; + width: 100%; + padding: 0; + margin-bottom: 27px; + font-size: 19.5px; + line-height: 36px; + color: #333333; + border: 0; + border-bottom: 1px solid #eeeeee; +} +legend small { + font-size: 13.5px; + color: #999999; +} +label, input, button, select, textarea { + font-size: 13px; + font-weight: normal; + line-height: 18px; +} +input, button, select, textarea { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +} +label { + display: block; + margin-bottom: 5px; + color: #333333; +} +input, textarea, select, .uneditable-input { + display: inline-block; + width: 210px; + height: 18px; + padding: 4px; + margin-bottom: 9px; + font-size: 13px; + line-height: 18px; + color: #555555; + border: 1px solid #cccccc; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.uneditable-textarea { + width: auto; + height: auto; +} +label input, label textarea, label select { + display: block; +} +input[type="image"], input[type="checkbox"], input[type="radio"] { + width: auto; + height: auto; + padding: 0; + margin: 3px 0; + *margin-top: 0; + line-height: normal; + cursor: pointer; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + border: 0 \9; +} +input[type="image"] { + border: 0; +} +input[type="file"] { + width: auto; + padding: initial; + line-height: initial; + border: initial; + background-color: #ffffff; + background-color: initial; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +input[type="button"], input[type="reset"], input[type="submit"] { + width: auto; + height: auto; +} +select, input[type="file"] { + height: 28px; + *margin-top: 4px; + line-height: 28px; +} +input[type="file"] { + line-height: 18px \9; +} +select { + width: 220px; + background-color: #ffffff; +} +select[multiple], select[size] { + height: auto; +} +input[type="image"] { + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +textarea { + height: auto; +} +input[type="hidden"] { + display: none; +} +.radio, .checkbox { + padding-left: 18px; +} +.radio input[type="radio"], .checkbox input[type="checkbox"] { + float: left; + margin-left: -18px; +} +.controls > .radio:first-child, .controls > .checkbox:first-child { + padding-top: 5px; +} +.radio.inline, .checkbox.inline { + display: inline-block; + padding-top: 5px; + margin-bottom: 0; + vertical-align: middle; +} +.radio.inline + .radio.inline, .checkbox.inline + .checkbox.inline { + margin-left: 10px; +} +input, textarea { + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075); + -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075); + -webkit-transition: border linear .2s, box-shadow linear .2s; + -moz-transition: border linear .2s, box-shadow linear .2s; + -ms-transition: border linear .2s, box-shadow linear .2s; + -o-transition: border linear .2s, box-shadow linear .2s; + transition: border linear .2s, box-shadow linear .2s; +} +input:focus, textarea:focus { + border-color: rgba(82,168,236,.8); + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); + -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); + outline: 0; + outline: thin dotted \9; +} +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus, +select:focus { + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + outline: thin dotted #333333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.input-mini { + width: 60px; +} +.input-small { + width: 90px; +} +.input-medium { + width: 150px; +} +.input-large { + width: 210px; +} +.input-xlarge { + width: 270px; +} +.input-xxlarge { + width: 530px; +} +input[class*="span"], +select[class*="span"], +textarea[class*="span"], +.uneditable-input { + float: none; + margin-left: 0; +} +input.span1, textarea.span1, .uneditable-input.span1 { + width: 50px; +} +input.span2, textarea.span2, .uneditable-input.span2 { + width: 130px; +} +input.span3, textarea.span3, .uneditable-input.span3 { + width: 210px; +} +input.span4, textarea.span4, .uneditable-input.span4 { + width: 290px; +} +input.span5, textarea.span5, .uneditable-input.span5 { + width: 370px; +} +input.span6, textarea.span6, .uneditable-input.span6 { + width: 450px; +} +input.span7, textarea.span7, .uneditable-input.span7 { + width: 530px; +} +input.span8, textarea.span8, .uneditable-input.span8 { + width: 610px; +} +input.span9, textarea.span9, .uneditable-input.span9 { + width: 690px; +} +input.span10, textarea.span10, .uneditable-input.span10 { + width: 770px; +} +input.span11, textarea.span11, .uneditable-input.span11 { + width: 850px; +} +input.span12, textarea.span12, .uneditable-input.span12 { + width: 930px; +} +input[disabled], +select[disabled], +textarea[disabled], +input[readonly], +select[readonly], +textarea[readonly] { + background-color: #f5f5f5; + border-color: #dddddd; + cursor: not-allowed; +} +.control-group.warning > label, +.control-group.warning .help-block, +.control-group.warning .help-inline { + color: #333333; +} +.control-group.warning input, +.control-group.warning select, +.control-group.warning textarea { + color: #333333; + border-color: #c09853; +} +.control-group.warning input:focus, +.control-group.warning select:focus, +.control-group.warning textarea:focus { + border-color: #a47e3c; + -webkit-box-shadow: 0 0 6px #dbc59e; + -moz-box-shadow: 0 0 6px #dbc59e; + box-shadow: 0 0 6px #dbc59e; +} +.control-group.warning .input-prepend .add-on, +.control-group.warning .input-append .add-on { + color: #333333; + background-color: #fcf8e3; + border-color: #333333; +} +.control-group.error > label, +.control-group.error .help-block, +.control-group.error .help-inline { + color: #333333; +} +.control-group.error input, +.control-group.error select, +.control-group.error textarea { + color: #333333; + border-color: #b94a48; +} +.control-group.error input:focus, +.control-group.error select:focus, +.control-group.error textarea:focus { + border-color: #953b39; + -webkit-box-shadow: 0 0 6px #d59392; + -moz-box-shadow: 0 0 6px #d59392; + box-shadow: 0 0 6px #d59392; +} +.control-group.error .input-prepend .add-on, +.control-group.error .input-append .add-on { + color: #333333; + background-color: #f2dede; + border-color: #333333; +} +.control-group.success > label, +.control-group.success .help-block, +.control-group.success .help-inline { + color: #333333; +} +.control-group.success input, +.control-group.success select, +.control-group.success textarea { + color: #333333; + border-color: #468847; +} +.control-group.success input:focus, +.control-group.success select:focus, +.control-group.success textarea:focus { + border-color: #356635; + -webkit-box-shadow: 0 0 6px #7aba7b; + -moz-box-shadow: 0 0 6px #7aba7b; + box-shadow: 0 0 6px #7aba7b; +} +.control-group.success .input-prepend .add-on, +.control-group.success .input-append .add-on { + color: #333333; + background-color: #dff0d8; + border-color: #333333; +} +input:focus:required:invalid, +textarea:focus:required:invalid, +select:focus:required:invalid { + color: #b94a48; + border-color: #ee5f5b; +} +input:focus:required:invalid:focus, +textarea:focus:required:invalid:focus, +select:focus:required:invalid:focus { + border-color: #e9322d; + -webkit-box-shadow: 0 0 6px #f8b9b7; + -moz-box-shadow: 0 0 6px #f8b9b7; + box-shadow: 0 0 6px #f8b9b7; +} +.form-actions { + padding: 17px 20px 18px; + margin-top: 18px; + margin-bottom: 18px; + background-color: #f5f5f5; + border-top: 1px solid #dddddd; +} +.uneditable-input { + display: block; + background-color: #ffffff; + border-color: #eeeeee; + -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.025); + -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,.025); + box-shadow: inset 0 1px 2px rgba(0,0,0,.025); + cursor: not-allowed; +} +:-moz-placeholder { + color: #999999; +} +::-webkit-input-placeholder { + color: #999999; +} +.help-block { + display: block; + margin-top: 5px; + margin-bottom: 0; + color: #999999; +} +.help-inline { + display: inline-block; + *display: inline; + *zoom: 1; + margin-bottom: 9px; + vertical-align: middle; + padding-left: 5px; +} +.input-prepend, .input-append { + margin-bottom: 5px; + *zoom: 1; +} +.input-prepend:before, +.input-prepend:after, +.input-append:before, +.input-append:after { + display: table; + content: ""; +} +.input-prepend:after, .input-append:after { + clear: both; +} +.input-prepend input, +.input-prepend .uneditable-input, +.input-append input, +.input-append .uneditable-input { + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.input-prepend input:focus, +.input-prepend .uneditable-input:focus, +.input-append input:focus, +.input-append .uneditable-input:focus { + position: relative; + z-index: 2; +} +.input-prepend .uneditable-input, .input-append .uneditable-input { + border-left-color: #cccccc; +} +.input-prepend .add-on, .input-append .add-on { + float: left; + display: block; + width: auto; + min-width: 16px; + height: 18px; + margin-right: -1px; + padding: 4px 5px; + font-weight: normal; + line-height: 18px; + color: #999999; + text-align: center; + text-shadow: 0 1px 0 #ffffff; + background-color: #f5f5f5; + border: 1px solid #cccccc; + -webkit-border-radius: 3px 0 0 3px; + -moz-border-radius: 3px 0 0 3px; + border-radius: 3px 0 0 3px; +} +.input-prepend .active, .input-append .active { + background-color: #a9dba9; + border-color: #46a546; +} +.input-prepend .add-on { + *margin-top: 1px; +} +.input-append input, .input-append .uneditable-input { + float: left; + -webkit-border-radius: 3px 0 0 3px; + -moz-border-radius: 3px 0 0 3px; + border-radius: 3px 0 0 3px; +} +.input-append .uneditable-input { + border-left-color: #eeeeee; + border-right-color: #cccccc; +} +.input-append .add-on { + margin-right: 0; + margin-left: -1px; + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.input-append input:first-child { + *margin-left: -160px; +} +.input-append input:first-child + .add-on { + *margin-left: -21px; +} +.search-query { + padding-left: 14px; + padding-right: 14px; + margin-bottom: 0; + -webkit-border-radius: 14px; + -moz-border-radius: 14px; + border-radius: 14px; +} +.form-search input, +.form-search textarea, +.form-search select, +.form-search .help-inline, +.form-search .uneditable-input, +.form-inline input, +.form-inline textarea, +.form-inline select, +.form-inline .help-inline, +.form-inline .uneditable-input, +.form-horizontal input, +.form-horizontal textarea, +.form-horizontal select, +.form-horizontal .help-inline, +.form-horizontal .uneditable-input { + display: inline-block; + margin-bottom: 0; +} +.form-search .hide, .form-inline .hide, .form-horizontal .hide { + display: none; +} +.form-search label, +.form-inline label, +.form-search .input-append, +.form-inline .input-append, +.form-search .input-prepend, +.form-inline .input-prepend { + display: inline-block; +} +.form-search .input-append .add-on, +.form-inline .input-prepend .add-on, +.form-search .input-append .add-on, +.form-inline .input-prepend .add-on { + vertical-align: middle; +} +.form-search .radio, +.form-inline .radio, +.form-search .checkbox, +.form-inline .checkbox { + margin-bottom: 0; + vertical-align: middle; +} +.control-group { + margin-bottom: 9px; +} +legend + .control-group { + margin-top: 18px; + -webkit-margin-top-collapse: separate; +} +.form-horizontal .control-group { + margin-bottom: 18px; + *zoom: 1; +} +.form-horizontal .control-group:before, .form-horizontal .control-group:after { + display: table; + content: ""; +} +.form-horizontal .control-group:after { + clear: both; +} +.form-horizontal .control-label { + float: left; + width: 140px; + padding-top: 5px; + text-align: right; +} +.form-horizontal .controls { + margin-left: 160px; +} +.form-horizontal .form-actions { + padding-left: 160px; +} +table { + max-width: 100%; + border-collapse: collapse; + border-spacing: 0; +} +.table { + width: 100%; + margin-bottom: 18px; +} +.table th, .table td { + padding: 8px; + line-height: 18px; + text-align: left; + vertical-align: top; + border-top: 1px solid #dddddd; +} +.table th { + font-weight: bold; +} +.table thead th { + vertical-align: bottom; +} +.table thead:first-child tr th, .table thead:first-child tr td { + border-top: 0; +} +.table tbody + tbody { + border-top: 2px solid #dddddd; +} +.table-condensed th, .table-condensed td { + padding: 4px 5px; +} +.table-bordered { + border: 1px solid #dddddd; + border-collapse: separate; + *border-collapse: collapsed; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.table-bordered th + th, +.table-bordered td + td, +.table-bordered th + td, +.table-bordered td + th { + border-left: 1px solid #dddddd; +} +.table-bordered thead:first-child tr:first-child th, +.table-bordered tbody:first-child tr:first-child th, +.table-bordered tbody:first-child tr:first-child td { + border-top: 0; +} +.table-bordered thead:first-child tr:first-child th:first-child, +.table-bordered tbody:first-child tr:first-child td:first-child { + -webkit-border-radius: 4px 0 0 0; + -moz-border-radius: 4px 0 0 0; + border-radius: 4px 0 0 0; +} +.table-bordered thead:first-child tr:first-child th:last-child, +.table-bordered tbody:first-child tr:first-child td:last-child { + -webkit-border-radius: 0 4px 0 0; + -moz-border-radius: 0 4px 0 0; + border-radius: 0 4px 0 0; +} +.table-bordered thead:last-child tr:last-child th:first-child, +.table-bordered tbody:last-child tr:last-child td:first-child { + -webkit-border-radius: 0 0 0 4px; + -moz-border-radius: 0 0 0 4px; + border-radius: 0 0 0 4px; +} +.table-bordered thead:last-child tr:last-child th:last-child, +.table-bordered tbody:last-child tr:last-child td:last-child { + -webkit-border-radius: 0 0 4px 0; + -moz-border-radius: 0 0 4px 0; + border-radius: 0 0 4px 0; +} +.table-striped tbody tr:nth-child(odd)td, .table-striped tbody tr:nth-child(odd)th { + background-color: #f9f9f9; +} +.table tbody tr:hover td, .table tbody tr:hover th { + background-color: #f5f5f5; +} +table .span1 { + float: none; + width: 44px; + margin-left: 0; +} +table .span2 { + float: none; + width: 124px; + margin-left: 0; +} +table .span3 { + float: none; + width: 204px; + margin-left: 0; +} +table .span4 { + float: none; + width: 284px; + margin-left: 0; +} +table .span5 { + float: none; + width: 364px; + margin-left: 0; +} +table .span6 { + float: none; + width: 444px; + margin-left: 0; +} +table .span7 { + float: none; + width: 524px; + margin-left: 0; +} +table .span8 { + float: none; + width: 604px; + margin-left: 0; +} +table .span9 { + float: none; + width: 684px; + margin-left: 0; +} +table .span10 { + float: none; + width: 764px; + margin-left: 0; +} +table .span11 { + float: none; + width: 844px; + margin-left: 0; +} +table .span12 { + float: none; + width: 924px; + margin-left: 0; +} +[class^="icon-"], [class*=" icon-"] { + display: inline-block; + width: 14px; + height: 14px; + line-height: 14px; + vertical-align: text-top; + background-image: url('/static/bootstrap/img/glyphicons-halflings.png'); + background-position: 14px 14px; + background-repeat: no-repeat; + *margin-right: .3em; +} +[class^="icon-"]:last-child, [class*=" icon-"]:last-child { + *margin-left: 0; +} +.icon-white { + background-image: url('/static/bootstrap/img/glyphicons-halflings-white.png'); +} +.icon-glass { + background-position: 0 0; +} +.icon-music { + background-position: -24px 0; +} +.icon-search { + background-position: -48px 0; +} +.icon-envelope { + background-position: -72px 0; +} +.icon-heart { + background-position: -96px 0; +} +.icon-star { + background-position: -120px 0; +} +.icon-star-empty { + background-position: -144px 0; +} +.icon-user { + background-position: -168px 0; +} +.icon-film { + background-position: -192px 0; +} +.icon-th-large { + background-position: -216px 0; +} +.icon-th { + background-position: -240px 0; +} +.icon-th-list { + background-position: -264px 0; +} +.icon-ok { + background-position: -288px 0; +} +.icon-remove { + background-position: -312px 0; +} +.icon-zoom-in { + background-position: -336px 0; +} +.icon-zoom-out { + background-position: -360px 0; +} +.icon-off { + background-position: -384px 0; +} +.icon-signal { + background-position: -408px 0; +} +.icon-cog { + background-position: -432px 0; +} +.icon-trash { + background-position: -456px 0; +} +.icon-home { + background-position: 0 -24px; +} +.icon-file { + background-position: -24px -24px; +} +.icon-time { + background-position: -48px -24px; +} +.icon-road { + background-position: -72px -24px; +} +.icon-download-alt { + background-position: -96px -24px; +} +.icon-download { + background-position: -120px -24px; +} +.icon-upload { + background-position: -144px -24px; +} +.icon-inbox { + background-position: -168px -24px; +} +.icon-play-circle { + background-position: -192px -24px; +} +.icon-repeat { + background-position: -216px -24px; +} +.icon-refresh { + background-position: -240px -24px; +} +.icon-list-alt { + background-position: -264px -24px; +} +.icon-lock { + background-position: -287px -24px; +} +.icon-flag { + background-position: -312px -24px; +} +.icon-headphones { + background-position: -336px -24px; +} +.icon-volume-off { + background-position: -360px -24px; +} +.icon-volume-down { + background-position: -384px -24px; +} +.icon-volume-up { + background-position: -408px -24px; +} +.icon-qrcode { + background-position: -432px -24px; +} +.icon-barcode { + background-position: -456px -24px; +} +.icon-tag { + background-position: 0 -48px; +} +.icon-tags { + background-position: -25px -48px; +} +.icon-book { + background-position: -48px -48px; +} +.icon-bookmark { + background-position: -72px -48px; +} +.icon-print { + background-position: -96px -48px; +} +.icon-camera { + background-position: -120px -48px; +} +.icon-font { + background-position: -144px -48px; +} +.icon-bold { + background-position: -167px -48px; +} +.icon-italic { + background-position: -192px -48px; +} +.icon-text-height { + background-position: -216px -48px; +} +.icon-text-width { + background-position: -240px -48px; +} +.icon-align-left { + background-position: -264px -48px; +} +.icon-align-center { + background-position: -288px -48px; +} +.icon-align-right { + background-position: -312px -48px; +} +.icon-align-justify { + background-position: -336px -48px; +} +.icon-list { + background-position: -360px -48px; +} +.icon-indent-left { + background-position: -384px -48px; +} +.icon-indent-right { + background-position: -408px -48px; +} +.icon-facetime-video { + background-position: -432px -48px; +} +.icon-picture { + background-position: -456px -48px; +} +.icon-pencil { + background-position: 0 -72px; +} +.icon-map-marker { + background-position: -24px -72px; +} +.icon-adjust { + background-position: -48px -72px; +} +.icon-tint { + background-position: -72px -72px; +} +.icon-edit { + background-position: -96px -72px; +} +.icon-share { + background-position: -120px -72px; +} +.icon-check { + background-position: -144px -72px; +} +.icon-move { + background-position: -168px -72px; +} +.icon-step-backward { + background-position: -192px -72px; +} +.icon-fast-backward { + background-position: -216px -72px; +} +.icon-backward { + background-position: -240px -72px; +} +.icon-play { + background-position: -264px -72px; +} +.icon-pause { + background-position: -288px -72px; +} +.icon-stop { + background-position: -312px -72px; +} +.icon-forward { + background-position: -336px -72px; +} +.icon-fast-forward { + background-position: -360px -72px; +} +.icon-step-forward { + background-position: -384px -72px; +} +.icon-eject { + background-position: -408px -72px; +} +.icon-chevron-left { + background-position: -432px -72px; +} +.icon-chevron-right { + background-position: -456px -72px; +} +.icon-plus-sign { + background-position: 0 -96px; +} +.icon-minus-sign { + background-position: -24px -96px; +} +.icon-remove-sign { + background-position: -48px -96px; +} +.icon-ok-sign { + background-position: -72px -96px; +} +.icon-question-sign { + background-position: -96px -96px; +} +.icon-info-sign { + background-position: -120px -96px; +} +.icon-screenshot { + background-position: -144px -96px; +} +.icon-remove-circle { + background-position: -168px -96px; +} +.icon-ok-circle { + background-position: -192px -96px; +} +.icon-ban-circle { + background-position: -216px -96px; +} +.icon-arrow-left { + background-position: -240px -96px; +} +.icon-arrow-right { + background-position: -264px -96px; +} +.icon-arrow-up { + background-position: -289px -96px; +} +.icon-arrow-down { + background-position: -312px -96px; +} +.icon-share-alt { + background-position: -336px -96px; +} +.icon-resize-full { + background-position: -360px -96px; +} +.icon-resize-small { + background-position: -384px -96px; +} +.icon-plus { + background-position: -408px -96px; +} +.icon-minus { + background-position: -433px -96px; +} +.icon-asterisk { + background-position: -456px -96px; +} +.icon-exclamation-sign { + background-position: 0 -120px; +} +.icon-gift { + background-position: -24px -120px; +} +.icon-leaf { + background-position: -48px -120px; +} +.icon-fire { + background-position: -72px -120px; +} +.icon-eye-open { + background-position: -96px -120px; +} +.icon-eye-close { + background-position: -120px -120px; +} +.icon-warning-sign { + background-position: -144px -120px; +} +.icon-plane { + background-position: -168px -120px; +} +.icon-calendar { + background-position: -192px -120px; +} +.icon-random { + background-position: -216px -120px; +} +.icon-comment { + background-position: -240px -120px; +} +.icon-magnet { + background-position: -264px -120px; +} +.icon-chevron-up { + background-position: -288px -120px; +} +.icon-chevron-down { + background-position: -313px -119px; +} +.icon-retweet { + background-position: -336px -120px; +} +.icon-shopping-cart { + background-position: -360px -120px; +} +.icon-folder-close { + background-position: -384px -120px; +} +.icon-folder-open { + background-position: -408px -120px; +} +.icon-resize-vertical { + background-position: -432px -119px; +} +.icon-resize-horizontal { + background-position: -456px -118px; +} +.dropdown { + position: relative; +} +.dropdown-toggle { + *margin-bottom: -3px; +} +.dropdown-toggle:active, .open .dropdown-toggle { + outline: 0; +} +.caret { + display: inline-block; + width: 0; + height: 0; + text-indent: -99999px; + *text-indent: 0; + vertical-align: top; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 4px solid #000000; + opacity: 0.3; + filter: alpha(opacity=30); + content: "\2193"; +} +.dropdown .caret { + margin-top: 8px; + margin-left: 2px; +} +.dropdown:hover .caret, .open.dropdown .caret { + opacity: 1; + filter: alpha(opacity=100); +} +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + float: left; + display: none; + min-width: 160px; + _width: 160px; + padding: 4px 0; + margin: 0; + list-style: none; + background-color: #ffffff; + border-color: #cccccc; + border-color: rgba(0,0,0,.2); + border-style: solid; + border-width: 1px; + -webkit-border-radius: 0 0 5px 5px; + -moz-border-radius: 0 0 5px 5px; + border-radius: 0 0 5px 5px; + -webkit-box-shadow: 0 5px 10px rgba(0,0,0,.2); + -moz-box-shadow: 0 5px 10px rgba(0,0,0,.2); + box-shadow: 0 5px 10px rgba(0,0,0,.2); + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; + *border-right-width: 2px; + *border-bottom-width: 2px; +} +.dropdown-menu.bottom-up { + top: auto; + bottom: 100%; + margin-bottom: 2px; +} +.dropdown-menu .divider { + height: 1px; + margin: 5px 1px; + overflow: hidden; + background-color: #e5e5e5; + border-bottom: 1px solid #ffffff; + *width: 100%; + *margin: -5px 0 5px; +} +.dropdown-menu a { + display: block; + padding: 3px 15px; + clear: both; + font-weight: normal; + line-height: 18px; + color: #555555; + word-wrap: break-word; +} +.dropdown-menu li > a:hover, +.dropdown-menu .active > a, +.dropdown-menu .active > a:hover { + color: #ffffff; + text-decoration: none; + background-color: #0088cc; +} +.dropdown.open { + *z-index: 1000; +} +.dropdown.open .dropdown-toggle { + color: #ffffff; + background: #cccccc; + background: rgba(0,0,0,.3); +} +.dropdown.open .dropdown-menu { + display: block; +} +.typeahead { + margin-top: 2px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.well { + min-height: 20px; + padding: 19px; + margin-bottom: 20px; + background-color: #f5f5f5; + border: 1px solid #eeeeee; + border: 1px solid rgba(0,0,0,.05); + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.05); + box-shadow: inset 0 1px 1px rgba(0,0,0,.05); +} +.well blockquote { + border-color: #dddddd; + border-color: rgba(0,0,0,.15); +} +.fade { + -webkit-transition: opacity .15s linear; + -moz-transition: opacity .15s linear; + -ms-transition: opacity .15s linear; + -o-transition: opacity .15s linear; + transition: opacity .15s linear; + opacity: 0; +} +.fade.in { + opacity: 1; +} +.collapse { + -webkit-transition: height .35s ease; + -moz-transition: height .35s ease; + -ms-transition: height .35s ease; + -o-transition: height .35s ease; + transition: height .35s ease; + position: relative; + overflow: hidden; + height: 0; +} +.collapse.in { + height: auto; +} +.close { + float: right; + font-size: 20px; + font-weight: bold; + line-height: 18px; + color: #000000; + text-shadow: 0 1px 0 #ffffff01; + opacity: 0.2; + filter: alpha(opacity=20); +} +.close:hover { + color: #000000; + text-decoration: none; + opacity: 0.4; + filter: alpha(opacity=40); + cursor: pointer; +} +.btn { + display: inline-block; + padding: 4px 10px 4px; + margin-bottom: 0; + font-size: 13px; + line-height: 18px; + color: #333333; + text-align: center; + text-shadow: 0 1px 1px rgba(255,255,255,.75); + vertical-align: middle; + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top,#ffffff,#e6e6e6 ); + background-image: -ms-linear-gradient(top,#ffffff,#e6e6e6 ); + background-image: -webkit-gradient(linear,0 0,0 100%,from(#ffffff),to(#e6e6e6 )); + background-image: -webkit-linear-gradient(top,#ffffff,#e6e6e6 ); + background-image: -o-linear-gradient(top,#ffffff,#e6e6e6 ); + background-image: linear-gradient(top,#ffffff,#e6e6e6 ); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6 ', GradientType=0); + border-color: #e6e6e6 #e6e6e6 #c0c0c0; + border-color: rgba(0,0,0,.1)rgba(0,0,0,.1)fadein(rgba(0,0,0,.1),15%); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: 1px solid #cccccc; + border-bottom-color: #bbbbbb; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + cursor: pointer; + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + *margin-left: .3em; +} +.btn:hover, .btn:active, .btn.active, .btn.disabled, .btn[disabled] { + background-color: #e6e6e6; +} +.btn:active, .btn.active { + background-color: #cdcdcd \9; +} +.btn:first-child { + *margin-left: 0; +} +.btn:hover { + color: #333333; + text-decoration: none; + background-color: #e6e6e6; + background-position: 0 -15px; + -webkit-transition: background-position .1s linear; + -moz-transition: background-position .1s linear; + -ms-transition: background-position .1s linear; + -o-transition: background-position .1s linear; + transition: background-position .1s linear; +} +.btn:focus { + outline: thin dotted #333333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.btn.active, .btn:active { + background-image: none; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + background-color: #e6e6e6; + background-color: #d9d9d9 \9; + outline: 0; +} +.btn.disabled, .btn[disabled] { + cursor: default; + background-image: none; + background-color: #e6e6e6; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn-large { + padding: 9px 14px; + font-size: 15px; + line-height: normal; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} +.btn-large [class^="icon-"] { + margin-top: 1px; +} +.btn-small { + padding: 5px 9px; + font-size: 11px; + line-height: 16px; +} +.btn-small [class^="icon-"] { + margin-top: -1px; +} +.btn-mini { + padding: 2px 6px; + font-size: 11px; + line-height: 14px; +} +.btn-primary, +.btn-primary:hover, +.btn-warning, +.btn-warning:hover, +.btn-danger, +.btn-danger:hover, +.btn-success, +.btn-success:hover, +.btn-info, +.btn-info:hover, +.btn-inverse, +.btn-inverse:hover { + text-shadow: 0 -1px 0 rgba(0,0,0,.25); + color: #ffffff; +} +.btn-primary.active, +.btn-warning.active, +.btn-danger.active, +.btn-success.active, +.btn-info.active, +.btn-dark.active { + color: rgba(255,255,255,.75); +} +.btn-primary { + background-color: #006ccc; + background-image: -moz-linear-gradient(top,#0088cc,#0044cc ); + background-image: -ms-linear-gradient(top,#0088cc,#0044cc ); + background-image: -webkit-gradient(linear,0 0,0 100%,from(#0088cc),to(#0044cc )); + background-image: -webkit-linear-gradient(top,#0088cc,#0044cc ); + background-image: -o-linear-gradient(top,#0088cc,#0044cc ); + background-image: linear-gradient(top,#0088cc,#0044cc ); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc ', GradientType=0); + border-color: #0044cc #0044cc #002a80; + border-color: rgba(0,0,0,.1)rgba(0,0,0,.1)fadein(rgba(0,0,0,.1),15%); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-primary:hover, +.btn-primary:active, +.btn-primary.active, +.btn-primary.disabled, +.btn-primary[disabled] { + background-color: #0044cc; +} +.btn-primary:active, .btn-primary.active { + background-color: #003399 \9; +} +.btn-warning { + background-color: #f9a732; + background-image: -moz-linear-gradient(top,#fbb450 ,#f89406); + background-image: -ms-linear-gradient(top,#fbb450 ,#f89406); + background-image: -webkit-gradient(linear,0 0,0 100%,from(#fbb450 ),to(#f89406)); + background-image: -webkit-linear-gradient(top,#fbb450 ,#f89406); + background-image: -o-linear-gradient(top,#fbb450 ,#f89406); + background-image: linear-gradient(top,#fbb450 ,#f89406); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450 ', endColorstr='#f89406', GradientType=0); + border-color: #f89406 #f89406 #ad6704; + border-color: rgba(0,0,0,.1)rgba(0,0,0,.1)fadein(rgba(0,0,0,.1),15%); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-warning:hover, +.btn-warning:active, +.btn-warning.active, +.btn-warning.disabled, +.btn-warning[disabled] { + background-color: #f89406; +} +.btn-warning:active, .btn-warning.active { + background-color: #c67605 \9; +} +.btn-danger { + background-color: #da4e49; + background-image: -moz-linear-gradient(top,#ee5f5b,#bd362f); + background-image: -ms-linear-gradient(top,#ee5f5b,#bd362f); + background-image: -webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f)); + background-image: -webkit-linear-gradient(top,#ee5f5b,#bd362f); + background-image: -o-linear-gradient(top,#ee5f5b,#bd362f); + background-image: linear-gradient(top,#ee5f5b,#bd362f); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#bd362f', GradientType=0); + border-color: #bd362f #bd362f #802420; + border-color: rgba(0,0,0,.1)rgba(0,0,0,.1)fadein(rgba(0,0,0,.1),15%); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-danger:hover, +.btn-danger:active, +.btn-danger.active, +.btn-danger.disabled, +.btn-danger[disabled] { + background-color: #bd362f; +} +.btn-danger:active, .btn-danger.active { + background-color: #942a25 \9; +} +.btn-success { + background-color: #5bb65b; + background-image: -moz-linear-gradient(top,#62c462,#51a351); + background-image: -ms-linear-gradient(top,#62c462,#51a351); + background-image: -webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351)); + background-image: -webkit-linear-gradient(top,#62c462,#51a351); + background-image: -o-linear-gradient(top,#62c462,#51a351); + background-image: linear-gradient(top,#62c462,#51a351); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#51a351', GradientType=0); + border-color: #51a351 #51a351 #387038; + border-color: rgba(0,0,0,.1)rgba(0,0,0,.1)fadein(rgba(0,0,0,.1),15%); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-success:hover, +.btn-success:active, +.btn-success.active, +.btn-success.disabled, +.btn-success[disabled] { + background-color: #51a351; +} +.btn-success:active, .btn-success.active { + background-color: #408140 \9; +} +.btn-info { + background-color: #49afcd; + background-image: -moz-linear-gradient(top,#5bc0de,#2f96b4); + background-image: -ms-linear-gradient(top,#5bc0de,#2f96b4); + background-image: -webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4)); + background-image: -webkit-linear-gradient(top,#5bc0de,#2f96b4); + background-image: -o-linear-gradient(top,#5bc0de,#2f96b4); + background-image: linear-gradient(top,#5bc0de,#2f96b4); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#2f96b4', GradientType=0); + border-color: #2f96b4 #2f96b4 #1f6377; + border-color: rgba(0,0,0,.1)rgba(0,0,0,.1)fadein(rgba(0,0,0,.1),15%); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-info:hover, +.btn-info:active, +.btn-info.active, +.btn-info.disabled, +.btn-info[disabled] { + background-color: #2f96b4; +} +.btn-info:active, .btn-info.active { + background-color: #24748c \9; +} +.btn-inverse { + background-color: #383838; + background-image: -moz-linear-gradient(top,#454545,#262626); + background-image: -ms-linear-gradient(top,#454545,#262626); + background-image: -webkit-gradient(linear,0 0,0 100%,from(#454545),to(#262626)); + background-image: -webkit-linear-gradient(top,#454545,#262626); + background-image: -o-linear-gradient(top,#454545,#262626); + background-image: linear-gradient(top,#454545,#262626); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#454545', endColorstr='#262626', GradientType=0); + border-color: #262626 #262626 #000000; + border-color: rgba(0,0,0,.1)rgba(0,0,0,.1)fadein(rgba(0,0,0,.1),15%); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-inverse:hover, +.btn-inverse:active, +.btn-inverse.active, +.btn-inverse.disabled, +.btn-inverse[disabled] { + background-color: #262626; +} +.btn-inverse:active, .btn-inverse.active { + background-color: #0c0c0c \9; +} +button.btn, input[type="submit"].btn { + *padding-top: 2px; + *padding-bottom: 2px; +} +button.btn::-moz-focus-inner, input[type="submit"].btn::-moz-focus-inner { + padding: 0; + border: 0; +} +button.btn.large, input[type="submit"].btn.large { + *padding-top: 7px; + *padding-bottom: 7px; +} +button.btn.small, input[type="submit"].btn.small { + *padding-top: 3px; + *padding-bottom: 3px; +} +.btn-group { + position: relative; + *zoom: 1; + *margin-left: .3em; +} +.btn-group:before, .btn-group:after { + display: table; + content: ""; +} +.btn-group:after { + clear: both; +} +.btn-group:first-child { + *margin-left: 0; +} +.btn-group + .btn-group { + margin-left: 5px; +} +.btn-toolbar { + margin-top: 9px; + margin-bottom: 9px; +} +.btn-toolbar .btn-group { + display: inline-block; + *display: inline; + *zoom: 1; +} +.btn-group .btn { + position: relative; + float: left; + margin-left: -1px; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.btn-group .btn:first-child { + margin-left: 0; + -webkit-border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; + border-top-left-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + border-bottom-left-radius: 4px; +} +.btn-group .btn:last-child, .btn-group .dropdown-toggle { + -webkit-border-top-right-radius: 4px; + -moz-border-radius-topright: 4px; + border-top-right-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -moz-border-radius-bottomright: 4px; + border-bottom-right-radius: 4px; +} +.btn-group .btn.large:first-child { + margin-left: 0; + -webkit-border-top-left-radius: 6px; + -moz-border-radius-topleft: 6px; + border-top-left-radius: 6px; + -webkit-border-bottom-left-radius: 6px; + -moz-border-radius-bottomleft: 6px; + border-bottom-left-radius: 6px; +} +.btn-group .btn.large:last-child, .btn-group .large.dropdown-toggle { + -webkit-border-top-right-radius: 6px; + -moz-border-radius-topright: 6px; + border-top-right-radius: 6px; + -webkit-border-bottom-right-radius: 6px; + -moz-border-radius-bottomright: 6px; + border-bottom-right-radius: 6px; +} +.btn-group .btn:hover, +.btn-group .btn:focus, +.btn-group .btn:active, +.btn-group .btn.active { + z-index: 2; +} +.btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle { + outline: 0; +} +.btn-group .dropdown-toggle { + padding-left: 8px; + padding-right: 8px; + -webkit-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + *padding-top: 5px; + *padding-bottom: 5px; +} +.btn-group.open { + *z-index: 1000; +} +.btn-group.open .dropdown-menu { + display: block; + margin-top: 1px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} +.btn-group.open .dropdown-toggle { + background-image: none; + -webkit-box-shadow: inset 0 1px 6px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 1px 6px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 1px 6px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn .caret { + margin-top: 7px; + margin-left: 0; +} +.btn:hover .caret, .open.btn-group .caret { + opacity: 1; + filter: alpha(opacity=100); +} +.btn-primary .caret, +.btn-danger .caret, +.btn-info .caret, +.btn-success .caret, +.btn-inverse .caret { + border-top-color: #ffffff; + opacity: 0.75; + filter: alpha(opacity=75); +} +.btn-small .caret { + margin-top: 4px; +} +.alert { + padding: 8px 35px 8px 14px; + margin-bottom: 18px; + text-shadow: 0 1px 0 rgba(255,255,255,.5); + background-color: #fcf8e3; + border: 1px solid #fbefd5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.alert, .alert-heading { + color: #c09853; +} +.alert .close { + position: relative; + top: -2px; + right: -21px; + line-height: 18px; +} +.alert-success { + background-color: #dff0d8; + border-color: #d6e9c6; +} +.alert-success, .alert-success .alert-heading { + color: #468847; +} +.alert-danger, .alert-error { + background-color: #f2dede; + border-color: #eed3d7; +} +.alert-danger, +.alert-error, +.alert-danger .alert-heading, +.alert-error .alert-heading { + color: #b94a48; +} +.alert-info { + background-color: #d9edf7; + border-color: #bce8f1; +} +.alert-info, .alert-info .alert-heading { + color: #3a87ad; +} +.alert-block { + padding-top: 14px; + padding-bottom: 14px; +} +.alert-block > p, .alert-block > ul { + margin-bottom: 0; +} +.alert-block p + p { + margin-top: 5px; +} +.nav { + margin-left: 0; + margin-bottom: 18px; + list-style: none; +} +.nav > li > a { + display: block; +} +.nav > li > a:hover { + text-decoration: none; + background-color: #eeeeee; +} +.nav .nav-header { + display: block; + padding: 3px 15px; + font-size: 11px; + font-weight: bold; + line-height: 18px; + color: #999999; + text-shadow: 0 1px 0 rgba(255,255,255,.5); + text-transform: uppercase; +} +.nav li + .nav-header { + margin-top: 9px; +} +.nav-list { + padding-left: 14px; + padding-right: 14px; + margin-bottom: 0; +} +.nav-list > li > a, .nav-list .nav-header { + margin-left: -15px; + margin-right: -15px; + text-shadow: 0 1px 0 rgba(255,255,255,.5); +} +.nav-list > li > a { + padding: 3px 15px; +} +.nav-list .active > a, .nav-list .active > a:hover { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0,0,0,.2); + background-color: #0088cc; +} +.nav-list [class^="icon-"] { + margin-right: 2px; +} +.nav-tabs, .nav-pills { + *zoom: 1; +} +.nav-tabs:before, .nav-tabs:after, .nav-pills:before, .nav-pills:after { + display: table; + content: ""; +} +.nav-tabs:after, .nav-pills:after { + clear: both; +} +.nav-tabs > li, .nav-pills > li { + float: left; +} +.nav-tabs > li > a, .nav-pills > li > a { + padding-right: 12px; + padding-left: 12px; + margin-right: 2px; + line-height: 14px; +} +.nav-tabs { + border-bottom: 1px solid #dddddd; +} +.nav-tabs > li { + margin-bottom: -1px; +} +.nav-tabs > li > a { + padding-top: 9px; + padding-bottom: 9px; + border: 1px solid transparent; + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} +.nav-tabs > li > a:hover { + border-color: #eeeeee #eeeeee #dddddd; +} +.nav-tabs > .active > a, .nav-tabs > .active > a:hover { + color: #555555; + background-color: #ffffff; + border: 1px solid #dddddd; + border-bottom-color: transparent; + cursor: default; +} +.nav-pills > li > a { + padding-top: 8px; + padding-bottom: 8px; + margin-top: 2px; + margin-bottom: 2px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} +.nav-pills .active > a, .nav-pills .active > a:hover { + color: #ffffff; + background-color: #0088cc; +} +.nav-stacked > li { + float: none; +} +.nav-stacked > li > a { + margin-right: 0; +} +.nav-tabs.nav-stacked { + border-bottom: 0; +} +.nav-tabs.nav-stacked > li > a { + border: 1px solid #dddddd; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.nav-tabs.nav-stacked > li:first-child > a { + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} +.nav-tabs.nav-stacked > li:last-child > a { + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} +.nav-tabs.nav-stacked > li > a:hover { + border-color: #dddddd; + z-index: 2; +} +.nav-pills.nav-stacked > li > a { + margin-bottom: 3px; +} +.nav-pills.nav-stacked > li:last-child > a { + margin-bottom: 1px; +} +.nav-tabs .dropdown-menu, .nav-pills .dropdown-menu { + margin-top: 1px; + border-width: 1px; +} +.nav-pills .dropdown-menu { + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.nav-tabs .dropdown-toggle .caret, .nav-pills .dropdown-toggle .caret { + border-top-color: #0088cc; + margin-top: 6px; +} +.nav-tabs .dropdown-toggle:hover .caret, .nav-pills .dropdown-toggle:hover .caret { + border-top-color: #005580; +} +.nav-tabs .active .dropdown-toggle .caret, +.nav-pills .active .dropdown-toggle .caret { + border-top-color: #333333; +} +.nav > .dropdown.active > a:hover { + color: #000000; + cursor: pointer; +} +.nav-tabs .open .dropdown-toggle, +.nav-pills .open .dropdown-toggle, +.nav > .open.active > a:hover { + color: #ffffff; + background-color: #999999; + border-color: #999999; +} +.nav .open .caret, .nav .open.active .caret, .nav .open a:hover .caret { + border-top-color: #ffffff; + opacity: 1; + filter: alpha(opacity=100); +} +.tabs-stacked .open > a:hover { + border-color: #999999; +} +.tabbable { + *zoom: 1; +} +.tabbable:before, .tabbable:after { + display: table; + content: ""; +} +.tabbable:after { + clear: both; +} +.tab-content { + overflow: hidden; +} +.tabs-below .nav-tabs, .tabs-right .nav-tabs, .tabs-left .nav-tabs { + border-bottom: 0; +} +.tab-content > .tab-pane, .pill-content > .pill-pane { + display: none; +} +.tab-content > .active, .pill-content > .active { + display: block; +} +.tabs-below .nav-tabs { + border-top: 1px solid #dddddd; +} +.tabs-below .nav-tabs > li { + margin-top: -1px; + margin-bottom: 0; +} +.tabs-below .nav-tabs > li > a { + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} +.tabs-below .nav-tabs > li > a:hover { + border-bottom-color: transparent; + border-top-color: #dddddd; +} +.tabs-below .nav-tabs .active > a, .tabs-below .nav-tabs .active > a:hover { + border-color: transparent #dddddd #dddddd #dddddd; +} +.tabs-left .nav-tabs > li, .tabs-right .nav-tabs > li { + float: none; +} +.tabs-left .nav-tabs > li > a, .tabs-right .nav-tabs > li > a { + min-width: 74px; + margin-right: 0; + margin-bottom: 3px; +} +.tabs-left .nav-tabs { + float: left; + margin-right: 19px; + border-right: 1px solid #dddddd; +} +.tabs-left .nav-tabs > li > a { + margin-right: -1px; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} +.tabs-left .nav-tabs > li > a:hover { + border-color: #eeeeee #dddddd #eeeeee #eeeeee; +} +.tabs-left .nav-tabs .active > a, .tabs-left .nav-tabs .active > a:hover { + border-color: #dddddd transparent #dddddd #dddddd; + *border-right-color: #ffffff; +} +.tabs-right .nav-tabs { + float: right; + margin-left: 19px; + border-left: 1px solid #dddddd; +} +.tabs-right .nav-tabs > li > a { + margin-left: -1px; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} +.tabs-right .nav-tabs > li > a:hover { + border-color: #eeeeee #eeeeee #eeeeee #dddddd; +} +.tabs-right .nav-tabs .active > a, .tabs-right .nav-tabs .active > a:hover { + border-color: #dddddd #dddddd #dddddd transparent; + *border-left-color: #ffffff; +} +.navbar { + overflow: visible; + margin-bottom: 18px; +} +.navbar-inner { + padding-left: 20px; + padding-right: 20px; + background-color: #2c2c2c; + background-image: -moz-linear-gradient(top,#333333,#222222); + background-image: -ms-linear-gradient(top,#333333,#222222); + background-image: -webkit-gradient(linear,0 0,0 100%,from(#333333),to(#222222)); + background-image: -webkit-linear-gradient(top,#333333,#222222); + background-image: -o-linear-gradient(top,#333333,#222222); + background-image: linear-gradient(top,#333333,#222222); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0); + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1); + -moz-box-shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1); + box-shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1); +} +.btn-navbar { + display: none; + float: right; + padding: 7px 10px; + margin-left: 5px; + margin-right: 5px; + background-color: #2c2c2c; + background-image: -moz-linear-gradient(top,#333333,#222222); + background-image: -ms-linear-gradient(top,#333333,#222222); + background-image: -webkit-gradient(linear,0 0,0 100%,from(#333333),to(#222222)); + background-image: -webkit-linear-gradient(top,#333333,#222222); + background-image: -o-linear-gradient(top,#333333,#222222); + background-image: linear-gradient(top,#333333,#222222); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0); + border-color: #222222 #222222 #000000; + border-color: rgba(0,0,0,.1)rgba(0,0,0,.1)fadein(rgba(0,0,0,.1),15%); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); + box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); +} +.btn-navbar:hover, +.btn-navbar:active, +.btn-navbar.active, +.btn-navbar.disabled, +.btn-navbar[disabled] { + background-color: #222222; +} +.btn-navbar:active, .btn-navbar.active { + background-color: #080808 \9; +} +.btn-navbar .icon-bar { + display: block; + width: 18px; + height: 2px; + background-color: #f5f5f5; + -webkit-border-radius: 1px; + -moz-border-radius: 1px; + border-radius: 1px; + -webkit-box-shadow: 0 1px 0 rgba(0,0,0,.25); + -moz-box-shadow: 0 1px 0 rgba(0,0,0,.25); + box-shadow: 0 1px 0 rgba(0,0,0,.25); +} +.btn-navbar .icon-bar + .icon-bar { + margin-top: 3px; +} +.nav-collapse.collapse { + height: auto; +} +.navbar .brand:hover { + text-decoration: none; +} +.navbar .brand { + float: left; + display: block; + padding: 8px 20px 12px; + margin-left: -20px; + font-size: 20px; + font-weight: 200; + line-height: 1; + color: #ffffff; +} +.navbar .navbar-text { + margin-bottom: 0; + line-height: 40px; + color: #999999; +} +.navbar .navbar-text a:hover { + color: #ffffff; + background-color: transparent; +} +.navbar .btn, .navbar .btn-group { + margin-top: 5px; +} +.navbar .btn-group .btn { + margin-top: 0; +} +.navbar-form { + margin-bottom: 0; + *zoom: 1; +} +.navbar-form:before, .navbar-form:after { + display: table; + content: ""; +} +.navbar-form:after { + clear: both; +} +.navbar-form input, .navbar-form select { + display: inline-block; + margin-top: 5px; + margin-bottom: 0; +} +.navbar-form .radio, .navbar-form .checkbox { + margin-top: 5px; +} +.navbar-form input[type="image"], +.navbar-form input[type="checkbox"], +.navbar-form input[type="radio"] { + margin-top: 3px; +} +.navbar-form .input-append, .navbar-form .input-prepend { + margin-top: 6px; + white-space: nowrap; +} +.navbar-form .input-append input, .navbar-form .input-prepend input { + margin-top: 0; +} +.navbar-search { + position: relative; + float: left; + margin-top: 6px; + margin-bottom: 0; +} +.navbar-search .search-query { + padding: 4px 9px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 13px; + font-weight: normal; + line-height: 1; + color: #ffffff; + color: rgba(255,255,255,.75); + background: #666666; + background: rgba(255,255,255,.3); + border: 1px solid #111111; + -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); + -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); + box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); + -webkit-transition: none; + -moz-transition: none; + -ms-transition: none; + -o-transition: none; + transition: none; +} +.navbar-search .search-query :-moz-placeholder { + color: #eeeeee; +} +.navbar-search .search-query ::-webkit-input-placeholder { + color: #eeeeee; +} +.navbar-search .search-query:hover { + color: #ffffff; + background-color: #999999; + background-color: rgba(255,255,255,.5); +} +.navbar-search .search-query:focus, .navbar-search .search-query.focused { + padding: 5px 10px; + color: #333333; + text-shadow: 0 1px 0 #ffffff; + background-color: #ffffff; + border: 0; + -webkit-box-shadow: 0 0 3px rgba(0,0,0,.15); + -moz-box-shadow: 0 0 3px rgba(0,0,0,.15); + box-shadow: 0 0 3px rgba(0,0,0,.15); + outline: 0; +} +.navbar-fixed-top { + position: fixed; + top: 0; + right: 0; + left: 0; + z-index: 1030; +} +.navbar-fixed-top .navbar-inner { + padding-left: 0; + padding-right: 0; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.navbar .nav { + position: relative; + left: 0; + display: block; + float: left; + margin: 0 10px 0 0; +} +.navbar .nav.pull-right { + float: right; +} +.navbar .nav > li { + display: block; + float: left; +} +.navbar .nav > li > a { + float: none; + padding: 10px 10px 11px; + line-height: 19px; + color: #999999; + text-decoration: none; + text-shadow: 0 -1px 0 rgba(0,0,0,.25); +} +.navbar .nav > li > a:hover { + background-color: transparent; + color: #ffffff; + text-decoration: none; +} +.navbar .nav .active > a, .navbar .nav .active > a:hover { + color: #ffffff; + text-decoration: none; + background-color: #222222; +} +.navbar .divider-vertical { + height: 40px; + width: 1px; + margin: 0 9px; + overflow: hidden; + background-color: #222222; + border-right: 1px solid #333333; +} +.navbar .nav.pull-right { + margin-left: 10px; + margin-right: 0; +} +.navbar .dropdown-menu { + margin-top: 1px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.navbar .dropdown-menu:before { + content: ''; + display: inline-block; + border-left: 7px solid transparent; + border-right: 7px solid transparent; + border-bottom: 7px solid #cccccc; + border-bottom-color: rgba(0,0,0,.2); + position: absolute; + top: -7px; + left: 9px; +} +.navbar .dropdown-menu:after { + content: ''; + display: inline-block; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #ffffff; + position: absolute; + top: -6px; + left: 10px; +} +.navbar .nav .dropdown-toggle .caret, .navbar .nav .open.dropdown .caret { + border-top-color: #ffffff; +} +.navbar .nav .active .caret { + opacity: 1; + filter: alpha(opacity=100); +} +.navbar .nav .open > .dropdown-toggle, +.navbar .nav .active > .dropdown-toggle, +.navbar .nav .open.active > .dropdown-toggle { + background-color: transparent; +} +.navbar .nav .active > .dropdown-toggle:hover { + color: #ffffff; +} +.navbar .nav.pull-right .dropdown-menu { + left: auto; + right: 0; +} +.navbar .nav.pull-right .dropdown-menu:before { + left: auto; + right: 12px; +} +.navbar .nav.pull-right .dropdown-menu:after { + left: auto; + right: 13px; +} +.breadcrumb { + padding: 7px 14px; + margin: 0 0 18px; + background-color: #fbfbfb; + background-image: -moz-linear-gradient(top,#ffffff,#f5f5f5); + background-image: -ms-linear-gradient(top,#ffffff,#f5f5f5); + background-image: -webkit-gradient(linear,0 0,0 100%,from(#ffffff),to(#f5f5f5)); + background-image: -webkit-linear-gradient(top,#ffffff,#f5f5f5); + background-image: -o-linear-gradient(top,#ffffff,#f5f5f5); + background-image: linear-gradient(top,#ffffff,#f5f5f5); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0); + border: 1px solid #dddddd; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: inset 0 1px 0 #ffffff; + -moz-box-shadow: inset 0 1px 0 #ffffff; + box-shadow: inset 0 1px 0 #ffffff; +} +.breadcrumb li { + display: inline-block; + text-shadow: 0 1px 0 #ffffff; +} +.breadcrumb .divider { + padding: 0 5px; + color: #999999; +} +.breadcrumb .active a { + color: #333333; +} +.pagination { + height: 36px; + margin: 18px 0; +} +.pagination ul { + display: inline-block; + *display: inline; + *zoom: 1; + margin-left: 0; + margin-bottom: 0; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: 0 1px 2px rgba(0,0,0,.05); + box-shadow: 0 1px 2px rgba(0,0,0,.05); +} +.pagination li { + display: inline; +} +.pagination a { + float: left; + padding: 0 14px; + line-height: 34px; + text-decoration: none; + border: 1px solid #dddddd; + border-left-width: 0; +} +.pagination a:hover, .pagination .active a { + background-color: #f5f5f5; +} +.pagination .active a { + color: #999999; + cursor: default; +} +.pagination .disabled a, .pagination .disabled a:hover { + color: #999999; + background-color: transparent; + cursor: default; +} +.pagination li:first-child a { + border-left-width: 1px; + -webkit-border-radius: 3px 0 0 3px; + -moz-border-radius: 3px 0 0 3px; + border-radius: 3px 0 0 3px; +} +.pagination li:last-child a { + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.pagination-centered { + text-align: center; +} +.pagination-right { + text-align: right; +} +.pager { + margin: 18px 0; + list-style: none; + text-align: center; + *zoom: 1; +} +.pager:before, .pager:after { + display: table; + content: ""; +} +.pager:after { + clear: both; +} +.pager li { + display: inline; +} +.pager li > a, .pager li > span { + display: inline-block; + padding: 5px 14px; + background-color: #ffffff; + border: 1px solid #dddddd; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} +.pager li > a:hover, .pager li > a:focus { + text-decoration: none; + background-color: #f5f5f5; +} +.pager .next > a, .pager .next > span { + float: right; +} +.pager .previous > a, .pager .previous > span { + float: left; +} +.pager .disabled > a, +.pager .disabled > a:hover, +.pager .disabled > a:focus, +.pager .disabled > span { + color: #999999; + background-color: #ffffff; + cursor: default; +} +.modal-open .dropdown-menu { + z-index: 2050; +} +.modal-open .dropdown.open { + *z-index: 2050; +} +.modal-open .popover { + z-index: 2060; +} +.modal-open .tooltip { + z-index: 2070; +} +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1040; + background-color: #000000; +} +.modal-backdrop.fade { + opacity: 0; +} +.modal-backdrop, .modal-backdrop.fade.in { + opacity: 0.8; + filter: alpha(opacity=80); +} +.modal { + position: fixed; + top: 50%; + left: 50%; + z-index: 1050; + max-height: 500px; + overflow: auto; + width: 560px; + margin: -250px 0 0 -280px; + background-color: #ffffff; + border: 1px solid #999999; + border: 1px solid rgba(0,0,0,.3); + *border: 1px solid #999999; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 3px 7px rgba(0,0,0,0.3); + -moz-box-shadow: 0 3px 7px rgba(0,0,0,0.3); + box-shadow: 0 3px 7px rgba(0,0,0,0.3); + -webkit-background-clip: padding-box; + -moz-background-clip: padding-box; + background-clip: padding-box; +} +.modal.fade { + -webkit-transition: opacity .3s linear, top .3s ease-out; + -moz-transition: opacity .3s linear, top .3s ease-out; + -ms-transition: opacity .3s linear, top .3s ease-out; + -o-transition: opacity .3s linear, top .3s ease-out; + transition: opacity .3s linear, top .3s ease-out; + top: -25%; +} +.modal.fade.in { + top: 50%; +} +.modal-header { + padding: 9px 15px; + border-bottom: 1px solid #eeeeee; +} +.modal-header .close { + margin-top: 2px; +} +.modal-body { + padding: 15px; +} +.modal-body .modal-form { + margin-bottom: 0; +} +.modal-footer { + padding: 14px 15px 15px; + margin-bottom: 0; + background-color: #f5f5f5; + border-top: 1px solid #dddddd; + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; + -webkit-box-shadow: inset 0 1px 0 #ffffff; + -moz-box-shadow: inset 0 1px 0 #ffffff; + box-shadow: inset 0 1px 0 #ffffff; + *zoom: 1; +} +.modal-footer:before, .modal-footer:after { + display: table; + content: ""; +} +.modal-footer:after { + clear: both; +} +.modal-footer .btn { + float: right; + margin-left: 5px; + margin-bottom: 0; +} +.tooltip { + position: absolute; + z-index: 1020; + display: block; + visibility: visible; + padding: 5px; + font-size: 11px; + opacity: 0; + filter: alpha(opacity=0); +} +.tooltip.in { + opacity: 0.8; + filter: alpha(opacity=80); +} +.tooltip.top { + margin-top: -2px; +} +.tooltip.right { + margin-left: 2px; +} +.tooltip.bottom { + margin-top: 2px; +} +.tooltip.left { + margin-left: -2px; +} +.tooltip.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-left: 5px solid transparent; + border-right: 5px solid transparent; + border-top: 5px solid #000000; +} +.tooltip.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-top: 5px solid transparent; + border-bottom: 5px solid transparent; + border-left: 5px solid #000000; +} +.tooltip.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-left: 5px solid transparent; + border-right: 5px solid transparent; + border-bottom: 5px solid #000000; +} +.tooltip.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-top: 5px solid transparent; + border-bottom: 5px solid transparent; + border-right: 5px solid #000000; +} +.tooltip-inner { + max-width: 200px; + padding: 3px 8px; + color: #ffffff; + text-align: center; + text-decoration: none; + background-color: #000000; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; +} +.popover { + position: absolute; + top: 0; + left: 0; + z-index: 1010; + display: none; + padding: 5px; +} +.popover.top { + margin-top: -5px; +} +.popover.right { + margin-left: 5px; +} +.popover.bottom { + margin-top: 5px; +} +.popover.left { + margin-left: -5px; +} +.popover.top .arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-left: 5px solid transparent; + border-right: 5px solid transparent; + border-top: 5px solid #000000; +} +.popover.right .arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-top: 5px solid transparent; + border-bottom: 5px solid transparent; + border-right: 5px solid #000000; +} +.popover.bottom .arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-left: 5px solid transparent; + border-right: 5px solid transparent; + border-bottom: 5px solid #000000; +} +.popover.left .arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-top: 5px solid transparent; + border-bottom: 5px solid transparent; + border-left: 5px solid #000000; +} +.popover .arrow { + position: absolute; + width: 0; + height: 0; +} +.popover-inner { + padding: 3px; + width: 280px; + overflow: hidden; + background: #000000; + background: rgba(0,0,0,.8); + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 3px 7px rgba(0,0,0,0.3); + -moz-box-shadow: 0 3px 7px rgba(0,0,0,0.3); + box-shadow: 0 3px 7px rgba(0,0,0,0.3); +} +.popover-title { + padding: 9px 15px; + line-height: 1; + background-color: #f5f5f5; + border-bottom: 1px solid #eeeeee; + -webkit-border-radius: 3px 3px 0 0; + -moz-border-radius: 3px 3px 0 0; + border-radius: 3px 3px 0 0; +} +.popover-content { + padding: 14px; + background-color: #ffffff; + -webkit-border-radius: 0 0 3px 3px; + -moz-border-radius: 0 0 3px 3px; + border-radius: 0 0 3px 3px; + -webkit-background-clip: padding-box; + -moz-background-clip: padding-box; + background-clip: padding-box; +} +.popover-content p, .popover-content ul, .popover-content ol { + margin-bottom: 0; +} +.thumbnails { + margin-left: -20px; + list-style: none; + *zoom: 1; +} +.thumbnails:before, .thumbnails:after { + display: table; + content: ""; +} +.thumbnails:after { + clear: both; +} +.thumbnails > li { + float: left; + margin: 0 0 18px 20px; +} +.thumbnail { + display: block; + padding: 4px; + line-height: 1; + border: 1px solid #dddddd; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: 0 1px 1px rgba(0,0,0,.075); + -moz-box-shadow: 0 1px 1px rgba(0,0,0,.075); + box-shadow: 0 1px 1px rgba(0,0,0,.075); +} +a.thumbnail:hover { + border-color: #0088cc; + -webkit-box-shadow: 0 1px 4px rgba(0,105,214,.25); + -moz-box-shadow: 0 1px 4px rgba(0,105,214,.25); + box-shadow: 0 1px 4px rgba(0,105,214,.25); +} +.thumbnail > img { + display: block; + max-width: 100%; + margin-left: auto; + margin-right: auto; +} +.thumbnail .caption { + padding: 9px; +} +.label { + padding: 2px 4px 3px; + font-size: 11.05px; + font-weight: bold; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0,0,0,.25); + background-color: #999999; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.label:hover { + color: #ffffff; + text-decoration: none; +} +.label-important { + background-color: #b94a48; +} +.label-important:hover { + background-color: #953b39; +} +.label-warning { + background-color: #f89406; +} +.label-warning:hover { + background-color: #c67605; +} +.label-success { + background-color: #468847; +} +.label-success:hover { + background-color: #356635; +} +.label-info { + background-color: #3a87ad; +} +.label-info:hover { + background-color: #2d6987; +} +@-webkit-keyframes progress-bar-stripes { + from { + background-position: 0 0; + } + to { + background-position: 40px 0; + } +} +@-moz-keyframes progress-bar-stripes { + from { + background-position: 0 0; + } + to { + background-position: 40px 0; + } +} +@keyframes progress-bar-stripes { + from { + background-position: 0 0; + } + to { + background-position: 40px 0; + } +} +.progress { + overflow: hidden; + height: 18px; + margin-bottom: 18px; + background-color: #f6f6f6; + background-image: -moz-linear-gradient(top,#f5f5f5,#f9f9f9); + background-image: -ms-linear-gradient(top,#f5f5f5,#f9f9f9); + background-image: -webkit-gradient(linear,0 0,0 100%,from(#f5f5f5),to(#f9f9f9)); + background-image: -webkit-linear-gradient(top,#f5f5f5,#f9f9f9); + background-image: -o-linear-gradient(top,#f5f5f5,#f9f9f9); + background-image: linear-gradient(top,#f5f5f5,#f9f9f9); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#f9f9f9', GradientType=0); + -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1); + -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,.1); + box-shadow: inset 0 1px 2px rgba(0,0,0,.1); + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.progress .bar { + width: 0%; + height: 18px; + color: #ffffff; + font-size: 12px; + text-align: center; + text-shadow: 0 -1px 0 rgba(0,0,0,.25); + background-color: #0d90d1; + background-image: -moz-linear-gradient(top,#149bdf,#0480be); + background-image: -ms-linear-gradient(top,#149bdf,#0480be); + background-image: -webkit-gradient(linear,0 0,0 100%,from(#149bdf),to(#0480be)); + background-image: -webkit-linear-gradient(top,#149bdf,#0480be); + background-image: -o-linear-gradient(top,#149bdf,#0480be); + background-image: linear-gradient(top,#149bdf,#0480be); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#149bdf', endColorstr='#0480be', GradientType=0); + -webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,.15); + -moz-box-shadow: inset 0 -1px 0 rgba(0,0,0,.15); + box-shadow: inset 0 -1px 0 rgba(0,0,0,.15); + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-transition: width .6s ease; + -moz-transition: width .6s ease; + -ms-transition: width .6s ease; + -o-transition: width .6s ease; + transition: width .6s ease; +} +.progress-striped .bar { + background-color: #62c462; + background-image: -webkit-gradient(linear,0 100%,100% 0,color-stop(.25,rgba(255,255,255,.15)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.15)),color-stop(.75,rgba(255,255,255,.15)),color-stop(.75,transparent),to(transparent)); + background-image: -webkit-linear-gradient(-45deg,rgba(255,255,255,.15)25%,transparent 25%,transparent 50%,rgba(255,255,255,.15)50%,rgba(255,255,255,.15)75%,transparent 75%,transparent); + background-image: -moz-linear-gradient(-45deg,rgba(255,255,255,.15)25%,transparent 25%,transparent 50%,rgba(255,255,255,.15)50%,rgba(255,255,255,.15)75%,transparent 75%,transparent); + background-image: -ms-linear-gradient(-45deg,rgba(255,255,255,.15)25%,transparent 25%,transparent 50%,rgba(255,255,255,.15)50%,rgba(255,255,255,.15)75%,transparent 75%,transparent); + background-image: -o-linear-gradient(-45deg,rgba(255,255,255,.15)25%,transparent 25%,transparent 50%,rgba(255,255,255,.15)50%,rgba(255,255,255,.15)75%,transparent 75%,transparent); + background-image: linear-gradient(-45deg,rgba(255,255,255,.15)25%,transparent 25%,transparent 50%,rgba(255,255,255,.15)50%,rgba(255,255,255,.15)75%,transparent 75%,transparent); + -webkit-background-size: 40px 40px; + -moz-background-size: 40px 40px; + -o-background-size: 40px 40px; + background-size: 40px 40px; +} +.progress.active .bar { + -webkit-animation: progress-bar-stripes 2s linear infinite; + -moz-animation: progress-bar-stripes 2s linear infinite; + animation: progress-bar-stripes 2s linear infinite; +} +.progress-danger .bar { + background-color: #dd514b; + background-image: -moz-linear-gradient(top,#ee5f5b,#c43c35); + background-image: -ms-linear-gradient(top,#ee5f5b,#c43c35); + background-image: -webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#c43c35)); + background-image: -webkit-linear-gradient(top,#ee5f5b,#c43c35); + background-image: -o-linear-gradient(top,#ee5f5b,#c43c35); + background-image: linear-gradient(top,#ee5f5b,#c43c35); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0); +} +.progress-danger.progress-striped .bar { + background-color: #ee5f5b; + background-image: -webkit-gradient(linear,0 100%,100% 0,color-stop(.25,rgba(255,255,255,.15)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.15)),color-stop(.75,rgba(255,255,255,.15)),color-stop(.75,transparent),to(transparent)); + background-image: -webkit-linear-gradient(-45deg,rgba(255,255,255,.15)25%,transparent 25%,transparent 50%,rgba(255,255,255,.15)50%,rgba(255,255,255,.15)75%,transparent 75%,transparent); + background-image: -moz-linear-gradient(-45deg,rgba(255,255,255,.15)25%,transparent 25%,transparent 50%,rgba(255,255,255,.15)50%,rgba(255,255,255,.15)75%,transparent 75%,transparent); + background-image: -ms-linear-gradient(-45deg,rgba(255,255,255,.15)25%,transparent 25%,transparent 50%,rgba(255,255,255,.15)50%,rgba(255,255,255,.15)75%,transparent 75%,transparent); + background-image: -o-linear-gradient(-45deg,rgba(255,255,255,.15)25%,transparent 25%,transparent 50%,rgba(255,255,255,.15)50%,rgba(255,255,255,.15)75%,transparent 75%,transparent); + background-image: linear-gradient(-45deg,rgba(255,255,255,.15)25%,transparent 25%,transparent 50%,rgba(255,255,255,.15)50%,rgba(255,255,255,.15)75%,transparent 75%,transparent); +} +.progress-success .bar { + background-color: #5db95d; + background-image: -moz-linear-gradient(top,#62c462,#57a957); + background-image: -ms-linear-gradient(top,#62c462,#57a957); + background-image: -webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#57a957)); + background-image: -webkit-linear-gradient(top,#62c462,#57a957); + background-image: -o-linear-gradient(top,#62c462,#57a957); + background-image: linear-gradient(top,#62c462,#57a957); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0); +} +.progress-success.progress-striped .bar { + background-color: #62c462; + background-image: -webkit-gradient(linear,0 100%,100% 0,color-stop(.25,rgba(255,255,255,.15)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.15)),color-stop(.75,rgba(255,255,255,.15)),color-stop(.75,transparent),to(transparent)); + background-image: -webkit-linear-gradient(-45deg,rgba(255,255,255,.15)25%,transparent 25%,transparent 50%,rgba(255,255,255,.15)50%,rgba(255,255,255,.15)75%,transparent 75%,transparent); + background-image: -moz-linear-gradient(-45deg,rgba(255,255,255,.15)25%,transparent 25%,transparent 50%,rgba(255,255,255,.15)50%,rgba(255,255,255,.15)75%,transparent 75%,transparent); + background-image: -ms-linear-gradient(-45deg,rgba(255,255,255,.15)25%,transparent 25%,transparent 50%,rgba(255,255,255,.15)50%,rgba(255,255,255,.15)75%,transparent 75%,transparent); + background-image: -o-linear-gradient(-45deg,rgba(255,255,255,.15)25%,transparent 25%,transparent 50%,rgba(255,255,255,.15)50%,rgba(255,255,255,.15)75%,transparent 75%,transparent); + background-image: linear-gradient(-45deg,rgba(255,255,255,.15)25%,transparent 25%,transparent 50%,rgba(255,255,255,.15)50%,rgba(255,255,255,.15)75%,transparent 75%,transparent); +} +.progress-info .bar { + background-color: #4bb1cf; + background-image: -moz-linear-gradient(top,#5bc0de,#339bb9); + background-image: -ms-linear-gradient(top,#5bc0de,#339bb9); + background-image: -webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#339bb9)); + background-image: -webkit-linear-gradient(top,#5bc0de,#339bb9); + background-image: -o-linear-gradient(top,#5bc0de,#339bb9); + background-image: linear-gradient(top,#5bc0de,#339bb9); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0); +} +.progress-info.progress-striped .bar { + background-color: #5bc0de; + background-image: -webkit-gradient(linear,0 100%,100% 0,color-stop(.25,rgba(255,255,255,.15)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.15)),color-stop(.75,rgba(255,255,255,.15)),color-stop(.75,transparent),to(transparent)); + background-image: -webkit-linear-gradient(-45deg,rgba(255,255,255,.15)25%,transparent 25%,transparent 50%,rgba(255,255,255,.15)50%,rgba(255,255,255,.15)75%,transparent 75%,transparent); + background-image: -moz-linear-gradient(-45deg,rgba(255,255,255,.15)25%,transparent 25%,transparent 50%,rgba(255,255,255,.15)50%,rgba(255,255,255,.15)75%,transparent 75%,transparent); + background-image: -ms-linear-gradient(-45deg,rgba(255,255,255,.15)25%,transparent 25%,transparent 50%,rgba(255,255,255,.15)50%,rgba(255,255,255,.15)75%,transparent 75%,transparent); + background-image: -o-linear-gradient(-45deg,rgba(255,255,255,.15)25%,transparent 25%,transparent 50%,rgba(255,255,255,.15)50%,rgba(255,255,255,.15)75%,transparent 75%,transparent); + background-image: linear-gradient(-45deg,rgba(255,255,255,.15)25%,transparent 25%,transparent 50%,rgba(255,255,255,.15)50%,rgba(255,255,255,.15)75%,transparent 75%,transparent); +} +.accordion { + margin-bottom: 18px; +} +.accordion-group { + margin-bottom: 2px; + border: 1px solid #e5e5e5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.accordion-heading { + border-bottom: 0; +} +.accordion-heading .accordion-toggle { + display: block; + padding: 8px 15px; +} +.accordion-inner { + padding: 9px 15px; + border-top: 1px solid #e5e5e5; +} +.carousel { + position: relative; + margin-bottom: 18px; + line-height: 1; +} +.carousel-inner { + overflow: hidden; + width: 100%; + position: relative; +} +.carousel .item { + display: none; + position: relative; + -webkit-transition: .6s ease-in-out left; + -moz-transition: .6s ease-in-out left; + -ms-transition: .6s ease-in-out left; + -o-transition: .6s ease-in-out left; + transition: .6s ease-in-out left; +} +.carousel .item > img { + display: block; + line-height: 1; +} +.carousel .active, .carousel .next, .carousel .prev { + display: block; +} +.carousel .active { + left: 0; +} +.carousel .next, .carousel .prev { + position: absolute; + top: 0; + width: 100%; +} +.carousel .next { + left: 100%; +} +.carousel .prev { + left: -100%; +} +.carousel .next.left, .carousel .prev.right { + left: 0; +} +.carousel .active.left { + left: -100%; +} +.carousel .active.right { + left: 100%; +} +.carousel-control { + position: absolute; + top: 40%; + left: 15px; + width: 40px; + height: 40px; + margin-top: -20px; + font-size: 60px; + font-weight: 100; + line-height: 30px; + color: #ffffff; + text-align: center; + background: #222222; + border: 3px solid #ffffff; + -webkit-border-radius: 23px; + -moz-border-radius: 23px; + border-radius: 23px; + opacity: 0.5; + filter: alpha(opacity=50); +} +.carousel-control.right { + left: auto; + right: 15px; +} +.carousel-control:hover { + color: #ffffff; + text-decoration: none; + opacity: 0.9; + filter: alpha(opacity=90); +} +.carousel-caption { + position: absolute; + left: 0; + right: 0; + bottom: 0; + padding: 10px 15px 5px; + background: #333333; + background: rgba(0,0,0,.75); +} +.carousel-caption h4, .carousel-caption p { + color: #ffffff; +} +.hero-unit { + padding: 60px; + margin-bottom: 30px; + background-color: #f5f5f5; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.hero-unit h1 { + margin-bottom: 0; + font-size: 60px; + line-height: 1; + letter-spacing: -1px; +} +.hero-unit p { + font-size: 18px; + font-weight: 200; + line-height: 27px; +} +.pull-right { + float: right; +} +.pull-left { + float: left; +} +.hide { + display: none; +} +.show { + display: block; +} +.invisible { + visibility: hidden; +} +.datepicker { + top: 0; + left: 0; + padding: 4px; + margin-top: 1px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.datepicker:before { + content: ''; + display: inline-block; + border-left: 7px solid transparent; + border-right: 7px solid transparent; + border-bottom: 7px solid #cccccc; + border-bottom-color: rgba(0,0,0,0.2); + position: absolute; + top: -7px; + left: 6px; +} +.datepicker:after { + content: ''; + display: inline-block; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #ffffff; + position: absolute; + top: -6px; + left: 7px; +} +.datepicker > div { + display: none; +} +.datepicker table { + width: 100%; + margin: 0; +} +.datepicker td, .datepicker th { + text-align: center; + width: 20px; + height: 20px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.datepicker td.day:hover { + background: #eeeeee; + cursor: pointer; +} +.datepicker td.day.disabled { + color: #eeeeee; +} +.datepicker td.old, .datepicker td.new { + color: #999999; +} +.datepicker td.active, .datepicker td.active:hover { + color: #ffffff; + background-color: #006dcc; + background-image: -moz-linear-gradient(top,#0088cc,#0044cc); + background-image: -webkit-gradient(linear,0 0,0 100%,from(#0088cc),to(#0044cc)); + background-image: -webkit-linear-gradient(top,#0088cc,#0044cc); + background-image: -o-linear-gradient(top,#0088cc,#0044cc); + background-image: linear-gradient(to bottom,#0088cc,#0044cc); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0); + border-color: #0044cc #0044cc #002a80; + border-color: rgba(0,0,0,0.1)rgba(0,0,0,0.1)rgba(0,0,0,0.25); + *background-color: #0044cc; + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0,0,0,0.25); +} +.datepicker td.active:hover, +.datepicker td.active:hover:hover, +.datepicker td.active:focus, +.datepicker td.active:hover:focus, +.datepicker td.active:active, +.datepicker td.active:hover:active, +.datepicker td.active.active, +.datepicker td.active:hover.active, +.datepicker td.active.disabled, +.datepicker td.active:hover.disabled, +.datepicker td.active[disabled], +.datepicker td.active:hover[disabled] { + color: #ffffff; + background-color: #0044cc; + *background-color: #003bb3; +} +.datepicker td.active:active, +.datepicker td.active:hover:active, +.datepicker td.active.active, +.datepicker td.active:hover.active { + background-color: #003399 \9; +} +.datepicker td span { + display: block; + width: 47px; + height: 54px; + line-height: 54px; + float: left; + margin: 2px; + cursor: pointer; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.datepicker td span:hover { + background: #eeeeee; +} +.datepicker td span.active { + color: #ffffff; + background-color: #006dcc; + background-image: -moz-linear-gradient(top,#0088cc,#0044cc); + background-image: -webkit-gradient(linear,0 0,0 100%,from(#0088cc),to(#0044cc)); + background-image: -webkit-linear-gradient(top,#0088cc,#0044cc); + background-image: -o-linear-gradient(top,#0088cc,#0044cc); + background-image: linear-gradient(to bottom,#0088cc,#0044cc); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0); + border-color: #0044cc #0044cc #002a80; + border-color: rgba(0,0,0,0.1)rgba(0,0,0,0.1)rgba(0,0,0,0.25); + *background-color: #0044cc; + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0,0,0,0.25); +} +.datepicker td span.active:hover, +.datepicker td span.active:focus, +.datepicker td span.active:active, +.datepicker td span.active.active, +.datepicker td span.active.disabled, +.datepicker td span.active[disabled] { + color: #ffffff; + background-color: #0044cc; + *background-color: #003bb3; +} +.datepicker td span.active:active, .datepicker td span.active.active { + background-color: #003399 \9; +} +.datepicker td span.old { + color: #999999; +} +.datepicker th.switch { + width: 145px; +} +.datepicker th.next, .datepicker th.prev { + font-size: 21px; +} +.datepicker thead tr:first-child th { + cursor: pointer; +} +.datepicker thead tr:first-child th:hover { + background: #eeeeee; +} +.input-append.date .add-on i, .input-prepend.date .add-on i { + display: block; + cursor: pointer; + width: 16px; + height: 16px; +} +.nav_accordion { + background-color: #f9f9f9; + color: #6e6e6e; + margin: 0px 0px; +} +.nav_accordion dt, .nav_accordion dd { + padding: 10px 0 10px 0; + line-height: 18px; +} +.nav_accordion dt h4, .nav_accordion dd h4 { + border: 1px solid #bbbbbb; + border-right: 0; + border-bottom: 0; + background-color: #f0f0f0; + background-repeat: no-repeat; + background-position: 96% center; + background-image: url('/static/dashboard/img/right_droparrow.png'); + padding: 10px 0 10px 0; + line-height: 16px; + margin-top: 0; + color: #6e6e6e; + font-weight: bold; + text-rendering: optimizelegibility; + max-width: 193px; + padding-right: 16px; + cursor: pointer; +} +.nav_accordion dt h4 div, .nav_accordion dd h4 div { + color: #6e6e6e; + font-size: 14px; + margin: 0 0 0 14px; + display: block; + font-weight: bold; + outline: none; + -moz-outline-style: none; + overflow: hidden; + text-overflow: ellipsis; + max-width: 177px; +} +.nav_accordion dt h4.active, .nav_accordion dd h4.active { + border-bottom: 1px solid #bbbbbb; + background-image: url('/static/dashboard/img/drop_arrow.png'); +} +.nav_accordion dt a, .nav_accordion dd a { + color: #6e6e6e; + font-size: 16px; + margin: 0 0 0 14px; + padding: 0; + display: block; + font-weight: bold; + outline: none; + -moz-outline-style: none; + text-decoration: none; +} +.nav_accordion dt ul, .nav_accordion dd ul { + list-style: none outside none; + margin: 10px 0 0; + width: 222px; +} +.nav_accordion dt li a, .nav_accordion dd li a { + width: 185px; + padding: 10px; + display: block; + line-height: 18px; + margin-left: 20px; + font-weight: normal; + font-size: 13px; +} +.nav_accordion dt li a.active, .nav_accordion dd li a.active { + background: #ffffff; + border-top: 2px solid #e5e5e5; + border-left: 4px solid #d93c27; + border-bottom: 2px solid #e5e5e5; + margin-left: 18px; + -webkit-border-radius: 5px 0 0 5px; + -moz-border-radius: 5px 0 0 5px; + border-radius: 5px 0 0 5px; +} +.nav_accordion dt li a:last-child, .nav_accordion dd li a:last-child { + margin-bottom: 8px; +} +.nav_accordion dd { + padding: 0; + font-size: 12px; +} +.nav_accordion dt { + border-top: 1px solid #bbbbbb; + background-color: #e5e5e5; + background-repeat: no-repeat; + background-position: 96% center; + background-image: url('/static/dashboard/img/right_droparrow.png'); + padding-right: 16px; + max-width: 217px; + cursor: pointer; +} +.nav_accordion dt div { + color: #6e6e6e; + font-size: 14px; + margin: 0 0 0 14px; + padding: 0; + font-weight: bold; + outline: none; + -moz-outline-style: none; + overflow: hidden; + text-overflow: ellipsis; + max-width: 201px; +} +.nav_accordion dt.active { + background-image: url('/static/dashboard/img/drop_arrow.png'); +} +.nav_accordion dt:first-child { + border-top: 0; +} +.nav_accordion dt a { + text-decoration: none; +} +.clearfix:after { + visibility: hidden; + display: block; + font-size: 0; + content: " "; + clear: both; + height: 0; +} +* html .clearfix { + zoom: 1; +} +* :first-child + html .clearfix { + zoom: 1; +} +@font-face { + font-family: 'anivers'; + src: url('/static/dashboard/fonts/Anivers_Regular-webfont.eot'); + src: url('/static/dashboard/fonts/Anivers_Regular-webfont.eot?iefix')format('eot'), url('/static/dashboard/fonts/Anivers_Regular-webfont.woff')format('woff'), url('/static/dashboard/fonts/Anivers_Regular-webfont.ttf')format('truetype'), url('/static/dashboard/fonts/Anivers_Regular-webfont.svg#webfont3JLVF59W') format('svg'); + font-weight: normal; + font-style: normal; +} +a { + color: #43a1d6; +} +ul { + list-style: none; + margin: 0; +} +dt { + font-weight: bold; +} +.topbar { + background: #f2f2f2; + background-color: #efefef; + background-image: -moz-linear-gradient(top,#ffffff,#d8d8d8); + background-image: -ms-linear-gradient(top,#ffffff,#d8d8d8); + background-image: -webkit-gradient(linear,0 0,0 100%,from(#ffffff),to(#d8d8d8)); + background-image: -webkit-linear-gradient(top,#ffffff,#d8d8d8); + background-image: -o-linear-gradient(top,#ffffff,#d8d8d8); + background-image: linear-gradient(top,#ffffff,#d8d8d8); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#d8d8d8', GradientType=0); + border-bottom: 1px solid #cccccc; + padding: 10px 0px 15px 0px; +} +.topbar .switcher_bar { + display: inline-block; + height: auto; + width: 160px; + background-position: 140px center; + margin-bottom: 0; + margin-right: 10px; + padding: 0; + background-image: url('/static/dashboard/img/drop_arrow.png'); + background-color: #eeeeee; + background-repeat: no-repeat; + border: 1px solid #cccccc; + border-bottom-color: #bbbbbb; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); +} +.topbar .switcher_bar a { + margin-left: 0; + display: block; +} +.topbar .switcher_bar ul { + width: 130px; +} +.topbar .switcher_bar h3 { + padding: 2px 10px 1px; + font-size: 13px !important; + line-height: 20px; + color: #6e6e6e; + text-decoration: none; +} +.topbar .switcher_bar div { + padding: 2px 10px 1px; + font-size: 11px !important; + line-height: 20px; + color: #6e6e6e; + text-decoration: none; + overflow: hidden; + padding-right: 32px; + text-overflow: ellipsis; +} +.topbar .context-box { + display: inline; +} +#profile_editor_switcher { + width: auto; + max-width: 200px; + vertical-align: top; + white-space: nowrap; + background-image: url('/static/dashboard/img/profile_drop.png'); + background-repeat: no-repeat; + background-position: right center; +} +#user_info { + color: #888888; + margin: auto 10px; + padding-bottom: 15px; + padding-right: 25px; +} +#user_info > a { + color: #6e6e6e; + margin-left: 15px; + line-height: 20px; + font-size: 13px !important; +} +.page-header { + margin: 0 0 5px 0; + padding: 0 0 5px 0; + border-bottom: 2px solid #e5e5e5; + font-family: anivers; + height: auto; + width: 100%; +} +h2 { + color: #6a6a6a; + font-size: 30px; + font-weight: normal; +} +body { + background-color: #ffffff; + min-width: 890px; +} +#splash { + background: #fafafa; +} +#splash .login { + background: #ffffff url('/static/dashboard/img/logo-splash.png') no-repeat center 35px; + position: absolute; + top: 80px; + left: 50%; + margin: 0 0 0 -195px; + padding-top: 170px; + width: 390px; + border: 1px solid #e1e1e1; + max-height: none; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 3px 7px rgba(0,0,0,0.3); + -moz-box-shadow: 0 3px 7px rgba(0,0,0,0.3); + box-shadow: 0 3px 7px rgba(0,0,0,0.3); + -webkit-background-clip: padding-box; + -moz-background-clip: padding-box; + background-clip: padding-box; +} +#splash .login form .error { + width: 100%; +} +#splash .login form input { + width: 350px; +} +#splash .login form select { + width: 360px; +} +#splash .help-block { + display: none; +} +#create_container_form .modal-footer { + margin-top: 190px; +} +.nav li a { + color: #8eacb7; + text-shadow: none; +} +.container-fluid { + padding-left: 0; +} +.sidebar { + background-color: #f9f9f9; + border-right: 5px solid #e5e5e5; + border-bottom: 5px solid #e5e5e5; + -webkit-border-radius: 0 0 5px 0; + -moz-border-radius: 0 0 5px 0; + border-radius: 0 0 5px 0; + float: left; + min-width: 231px; +} +.sidebar h4 { + margin-left: 14px; + color: #999999; +} +.sidebar .nav-tabs { + margin-top: -34px; +} +.sidebar .nav-tabs li.active a { + background-color: #edf9ff; +} +h1.brand { + width: 100%; + margin: 0; +} +h1.brand a { + background: url('/static/dashboard/img/logo.png') top left no-repeat; + display: block; + float: left; + width: 216px; + height: 35px; + text-indent: -9999px; + margin-left: 16px; +} +a.current_item { + width: 163px; + float: left; +} +a.current_item:hover { + text-decoration: none; +} +a.current_item:hover h3, a.current_item:hover h4 { + color: #39738c; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.sidebar .switcher_bar { + width: 190px; + height: 38px; + padding: 5px 0; + margin-left: 14px; + margin-bottom: 15px; +} +.sidebar .switcher_bar a.dropdown-toggle { + display: block; + padding: 5px 0; + background-image: url('/static/dashboard/img/drop_arrow.png'); + border: 1px solid #c0d9e4; + background-color: #e9f5fa; + background-repeat: no-repeat; + background-position: 167px 23px; +} +.sidebar .switcher_bar a.dropdown-toggle:hover { + text-decoration: none; + background-color: #cde8f4; +} +.sidebar .switcher_bar:focus { + outline: none; +} +.sidebar .switcher_bar h3 { + color: #4790ae; + font-size: 16px; + margin: -6px 0 0 14px; + padding: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.sidebar .switcher_bar h3:hover { + white-space: normal; + overflow: visible; + text-overflow: none; + padding-right: 1em; + word-wrap: break-word; +} +.sidebar .switcher_bar h4 { + color: #6fabc4; + font-size: 10px; + text-transform: uppercase; + font-weight: normal; + padding: 0; +} +.sidebar .switcher_bar ul { + border: 1px solid #c0d9e4; + margin-left: -1px; + width: 190px; +} +.sidebar .switcher_bar li a:hover { + background: #92d6f1; +} +#usage { + margin-bottom: 25px; + height: 125px; +} +.usage_block { + background: #e8f8ff; + color: #84b6c5; + border: 1px solid #afe3fb; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + float: left; + width: 29%; + margin-right: 5%; + min-height: 125px; +} +.usage_block.last { + margin-right: 0; +} +.usage_block h3 { + background: #cef0ff; + color: #4fa5bf; + font-weight: normal; + padding: 0 0 0 10px; + border-bottom: 1px solid #c6e7f5; + -webkit-border-top-left-radius: 5px; + -webkit-border-top-right-radius: 5px; + -moz-border-radius-topleft: 5px; + -moz-border-radius-topright: 5px; + border-top-left-radius: 5px; + border-top-right-radius: 5px; +} +.usage_block ul { + margin: 10px; +} +.usage_block .quantity { + font-size: 25px; +} +.usage_block li { + font-size: 11px; + margin: 0 0 15px 0; +} +.usage_block .unit { + font-size: 11px; + text-transform: uppercase; + padding: 0 0 0 1px; +} +.table-bordered { + border: none; +} +.table_header { + min-height: 35px; + padding: 5px 0; +} +.table_caption th { + background-color: transparent; + border: none; +} +.table-bordered tr.table_caption + tr th { + border-top: 1px solid #dddddd; +} +.table-bordered tr.table_caption + tr th:first-child, +.table-bordered tr.table_caption + tr th.hide + th { + -moz-border-radius-topleft: 4px; + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + border-left: 1px solid #dddddd; +} +.table-bordered tr.table_caption + tr th:last-child { + -moz-border-radius-topright: 4px; + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + border-right: 1px solid #dddddd; +} +.table-bordered tbody tr td:first-child, .table-bordered tfoot tr td:first-child { + border-left: 1px solid #dddddd; +} +.table-bordered tbody tr td:last-child, .table-bordered tfoot tr td:last-child { + border-right: 1px solid #dddddd; +} +.table-bordered tfoot tr td:first-child { + border-bottom: 1px solid #dddddd; + -moz-border-radius-bottomleft: 4px; + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; +} +.table-bordered tfoot tr td:last-child { + border-bottom: 1px solid #dddddd; + -moz-border-radius-bottomright: 4px; + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; +} +.table_title h3, .table_header h3 { + font-family: anivers; + font-weight: normal; + font-size: 24px; + margin-bottom: 5px; + float: left; +} +.table th.header { + cursor: pointer; +} +.table th.header:hover { + background-color: #e8e8e8; + text-decoration: underline; +} +.table tbody td.anchor a { + display: block; + padding: 8px; +} +.table tr.table_caption th.header:hover { + background-color: transparent; + cursor: default; +} +.table th.headerSortUp:hover, .table th.headerSortDown:hover { + background-color: #dfdfdf; +} +.table th.headerSortUp, .table th.headerSortDown { + background-color: #dfdfdf; + background-repeat: no-repeat; + background-position: 98% center; +} +.table th.headerSortDown { + background-image: url('/static/dashboard/img/drop_arrow.png'); +} +.table th.headerSortUp { + background-image: url('/static/dashboard/img/up_arrow.png'); +} +.table tr.summation td:first-child, .table tr.summation td:last-child { + border-radius: 0; + border-bottom: 0 none; +} +th { + background: #f1f1f1; +} +td.anchor { + padding: 0; +} +small { + font-size: 11px; +} +.main_nav { + list-style: none; + width: 222px; + margin: 10px 0 20px 0; +} +.main_nav a { + color: #999999; + width: 185px; + padding: 10px; + display: block; + margin-left: 20px; +} +.main_nav a.active { + background: #ffffff; + border: 2px solid #d8d8d8; + border-right: 0; + border-bottom-color: #cccccc; +} +table form { + margin-bottom: 0; + width: 1px; +} +.messages { + position: fixed; + z-index: 9999; + top: 20px; + right: 20px; + width: 300px; +} +.messages .alert-block { + -webkit-box-shadow: 0 3px 7px rgba(0,0,0,0.3); + -moz-box-shadow: 0 3px 7px rgba(0,0,0,0.3); + box-shadow: 0 3px 7px rgba(0,0,0,0.3); +} +.messages .alert-block.alert-error { + border: 1px solid #9d261d; +} +.messages .alert-block.alert-success { + border: 1px solid #46a546; +} +.alert-block .alert-actions { + margin-top: -23px; + margin-right: -23px; +} +.modal > form, .login > form, .alert-actions > form { + margin-bottom: 0; +} +.alert-block p { + overflow: hidden; + word-wrap: break-word; +} +.alert-block p:last-child { + margin-bottom: 0; +} +#actions.single { + width: 90px; +} +.table-striped tr td { + transition: background 0.2s; + -webkit-transition: background 0.2s; + -moz-transition: background 0.2s; + -o-transition: background 0.2s; +} +.inspect { + float: left; + display: block; + margin-top: 5px; + margin-right: 25px; +} +.table { + margin-bottom: 25px; +} +.table tr td { + vertical-align: middle; +} +.table tr.empty td { + text-align: center; +} +.table tfoot tr td { + border-top: 1px solid #dddddd; + background-color: #f1f1f1; + font-size: 11px; + line-height: 14px; +} +.table_actions { + float: right; + min-width: 400px; +} +.table_actions .table_search, .table_actions .table_filter { + display: inline-block; +} +.table_search input { + background: url('/static/dashboard/img/search.png') no-repeat 195px 5px; + display: inline-block; + margin-bottom: 0; +} +.table_actions a, .table_actions button { + float: right; + margin-left: 10px; +} +.table_actions button.filter { + margin-left: 0; +} +.table_actions a.btn-create, +.table_actions button.btn-create, +.table_actions a.btn-launch { + padding-left: 23px; + position: relative; +} +.table_actions a.btn-create:before, +.table_actions button.btn-create:before, +.table_actions a.btn-launch:before { + display: inline-block; + content: ""; + width: 18px; + height: 20px; + margin-top: 1px; + *margin-right: .3em; + line-height: 14px; + background-image: url('/static/bootstrap/img/glyphicons-halflings.png'); + background-position: -403px -92px; + background-repeat: no-repeat; + position: absolute; + top: 0px; + left: 0px; +} +.table_actions a.btn-download, .table_actions button.btn-download { + padding-left: 23px; + position: relative; +} +.table_actions a.btn-download:before, .table_actions button.btn-download:before { + display: inline-block; + content: ""; + width: 18px; + height: 20px; + margin-top: 1px; + *margin-right: .3em; + line-height: 14px; + background-image: url('/static/bootstrap/img/glyphicons-halflings.png'); + background-position: -91px -19px; + background-repeat: no-repeat; + position: absolute; + top: 0px; + left: 0px; +} +.table_actions a.btn-upload, .table_actions button.btn-upload { + padding-left: 23px; + position: relative; +} +.table_actions a.btn-upload:before, .table_actions button.btn-upload:before { + display: inline-block; + content: ""; + width: 18px; + height: 20px; + margin-top: 1px; + *margin-right: .3em; + line-height: 14px; + background-image: url('/static/bootstrap/img/glyphicons-halflings.png'); + background-position: -283px -92px; + background-repeat: no-repeat; + position: absolute; + top: 0px; + left: 0px; +} +.table_actions button.btn-delete, .table_actions button.btn-terminate { + padding-left: 23px; + position: relative; +} +.table_actions button.btn-delete:before, .table_actions button.btn-terminate:before { + display: inline-block; + content: ""; + width: 18px; + height: 20px; + margin-top: 1px; + *margin-right: .3em; + line-height: 14px; + background-image: url('/static/bootstrap/img/glyphicons-halflings-white.png'); + background-position: -451px 5px; + background-repeat: no-repeat; + position: absolute; + top: 0px; + left: 0px; +} +td.no-transition { + -webkit-transition: none !important; + -moz-transition: none !important; + -o-transition: none !important; + -ms-transition: none !important; + transition: none !important; +} +td.success { + background-color: #dff0d8 !important; +} +td.loading { + background-color: #e6e6e6 !important; +} +td.inline_edit_available div.table_cell_wrapper .table_cell_action button.ajax-inline-edit { + padding: 9px 12px 9px 12px; + position: relative; + border-radius: 0px; + padding: 10px 10px 10px 10px; + position: relative; + display: block; + background: none; + border: 0 none; +} +td.inline_edit_available div.table_cell_wrapper .table_cell_action button.ajax-inline-edit:before { + display: inline-block; + content: ""; + width: 18px; + height: 20px; + margin-top: 0px; + *margin-right: .3em; + line-height: 14px; + background-image: url('/static/bootstrap/img/glyphicons-halflings.png'); + background-position: 0 -72px; + background-repeat: no-repeat; + position: absolute; + top: 2px; + left: 4px; +} +div.table_cell_wrapper { + min-height: 18px; + position: relative; +} +div.table_cell_wrapper .inline-edit-label { + display: inline; +} +div.table_cell_wrapper .inline-edit-form { + float: left; +} +div.table_cell_wrapper .inline-edit-actions, +div.table_cell_wrapper .table_cell_action { + float: right; + width: 20px; + margin: 0; +} +div.table_cell_wrapper .inline-edit-actions button.inline-edit-cancel, +div.table_cell_wrapper .table_cell_action button.inline-edit-cancel { + float: right; + padding: 9px 12px 9px 12px; + position: relative; + border-radius: 0px; +} +div.table_cell_wrapper .inline-edit-actions button.inline-edit-cancel:before, +div.table_cell_wrapper .table_cell_action button.inline-edit-cancel:before { + display: inline-block; + content: ""; + width: 18px; + height: 20px; + margin-top: 0px; + *margin-right: .3em; + line-height: 14px; + background-image: url('/static/bootstrap/img/glyphicons-halflings.png'); + background-position: -312px 0; + background-repeat: no-repeat; + position: absolute; + top: 1px; + left: 5px; +} +div.table_cell_wrapper .inline-edit-actions button.inline-edit-submit, +div.table_cell_wrapper .table_cell_action button.inline-edit-submit { + padding: 9px 12px 9px 12px; + position: relative; + border-radius: 0px; +} +div.table_cell_wrapper .inline-edit-actions button.inline-edit-submit:before, +div.table_cell_wrapper .table_cell_action button.inline-edit-submit:before { + display: inline-block; + content: ""; + width: 18px; + height: 20px; + margin-top: 0px; + *margin-right: .3em; + line-height: 14px; + background-image: url('/static/bootstrap/img/glyphicons-halflings-white.png'); + background-position: -288px 0; + background-repeat: no-repeat; + position: absolute; + top: 1px; + left: 5px; +} +div.table_cell_wrapper .inline-edit-actions button.ajax-inline-edit, +div.table_cell_wrapper .table_cell_action button.ajax-inline-edit { + padding: 9px 12px 9px 12px; + position: relative; + border-radius: 0px; + padding: 10px 10px 10px 10px; + position: relative; + display: none; + background: none; + border: 0 none; +} +div.table_cell_wrapper .inline-edit-actions button.ajax-inline-edit:before, +div.table_cell_wrapper .table_cell_action button.ajax-inline-edit:before { + display: inline-block; + content: ""; + width: 18px; + height: 20px; + margin-top: 0px; + *margin-right: .3em; + line-height: 14px; + background-image: url('/static/bootstrap/img/glyphicons-halflings.png'); + background-position: 0 -72px; + background-repeat: no-repeat; + position: absolute; + top: 2px; + left: 4px; +} +div.table_cell_wrapper .table_cell_action { + width: auto; + margin: auto 0px 0px 0px; + display: none; + position: absolute; + top: -3px; + right: 0px; + z-index: 99; +} +div.table_cell_wrapper .table_cell_action.hovered { + background-image: -webkit-linear-gradient(top,#ffffff,#e6e6e6); + border-color: rgba(0,0,0,0.1)rgba(0,0,0,0.1)rgba(0,0,0,0.25); + border: 1px solid #cccccc; + border-bottom-color: #bbbbbb; + border-radius: 4px; +} +div.table_cell_wrapper .inline-edit-error .error { + padding: 9px 12px 9px 12px; + position: relative; + border-radius: 0px; + position: absolute; + width: 18px; + height: 20px; + top: 20px; + left: 2px; + padding: 0; +} +div.table_cell_wrapper .inline-edit-error .error:before { + display: inline-block; + content: ""; + width: 20px; + height: 20px; + margin-top: 0px; + *margin-right: .3em; + line-height: 14px; + background-image: url('/static/bootstrap/img/glyphicons-halflings.png'); + background-position: -144px -120px; + background-repeat: no-repeat; + position: absolute; + top: 0px; + left: 0px; +} +div.table_cell_wrapper .inline-edit-status .success { + padding: 9px 12px 9px 12px; + position: relative; + border-radius: 0px; + padding: 0; + position: absolute; + top: 2px; + right: 18px; + width: 18px; + height: 20px; + z-index: 100; +} +div.table_cell_wrapper .inline-edit-status .success:before { + display: inline-block; + content: ""; + width: 20px; + height: 20px; + margin-top: 0px; + *margin-right: .3em; + line-height: 14px; + background-image: url('/static/bootstrap/img/glyphicons-halflings.png'); + background-position: -288px 0px; + background-repeat: no-repeat; + position: absolute; + top: 0px; + left: 0px; +} +div.table_cell_wrapper .inline-edit-status .loading { + padding: 9px 12px 9px 12px; + position: relative; + border-radius: 0px; + padding: 0; + position: absolute; + top: 0px; + right: 24px; + width: 18px; + height: 20px; + z-index: 100; +} +div.table_cell_wrapper .inline-edit-status .loading:before { + display: inline-block; + content: ""; + width: 20px; + height: 20px; + margin-top: 0px; + *margin-right: .3em; + line-height: 14px; + background-image: url('/static/dashboard/img/spinner.gif'); + background-position: 0px 0px; + background-repeat: no-repeat; + position: absolute; + top: 0px; + left: 0px; +} +div.table_cell_wrapper .inline-edit-status.inline-edit-mod .loading { + top: 15px; + right: 34px; +} +.table_header .table_actions { + min-width: 0; +} +.table_header .table_actions a, +.table_header .table_actions > button, +.table_header .table_actions .table_search button { + display: inline-block; + float: none; +} +.table_header .table_actions .table_search select { + margin-bottom: 0; + line-height: 22px; +} +.table_header .table_filter { + vertical-align: bottom; + margin-right: 20px; +} +.table_header .table_filter i { + vertical-align: middle; +} +.table_actions form { + float: right; + margin-left: 10px; +} +.hidden { + display: none; +} +.table-striped.datatable tbody tr.odd td { + background-color: #f9f9f9; +} +.table-striped.datatable tbody tr.even td { + background-color: inherit; +} +.table-striped.datatable tbody tr.odd:hover td, +.table-striped.datatable tbody tr.even:hover td, +.table-striped.datatable tbody tr:hover th { + background-color: #f5f5f5; +} +.table-striped tbody tr.status_unknown:nth-child(odd)td { + background-color: #ffffb5; +} +.table-striped tbody tr.status_unknown:nth-child(even)td { + background-color: #ffffc6; +} +.nowrap-col { + white-space: nowrap; +} +.overview { + font-size: 24px; +} +#monitoring { + background: #f8f8f8; + font-size: 14px; + height: 20px; + margin: -18px 0 25px; + padding: 10px; + border: 1px solid #e1e1e1; + font-family: "anivers"; +} +#monitoring h3 { + font-size: 14px; + font-weight: normal; + float: left; + line-height: 18px; +} +#external_links, #external_links li { + float: left; +} +#external_links li { + margin: 0 0 0 15px; +} +.datatable th.narrow { + width: 1em; +} +.datatable input { + padding: 2px 5px; + margin: 0; +} +.datatable th span.required:after { + content: "*"; + font-weight: bold; + line-height: 0; + padding-left: 4px; + color: #3290c0; +} +form label { + text-align: left; + color: #555555; + font-weight: bold; +} +.modal { + width: 700px; + max-height: none; + top: 80px; + margin-top: 0; + position: absolute; +} +.modal.fullscreen { + width: 90%; + margin: auto; + left: 5%; +} +.modal.loading { + width: 150px; + height: 150px; + margin: 0 auto; + overflow: hidden; +} +.modal.loading p { + text-align: center; + position: absolute; + bottom: 0; + width: 150px; +} +.datepicker { + margin-top: 10px; +} +.datepicker input { + width: 65px; + margin-right: 10px; +} +.datepicker .btn { + margin-right: 10px; +} +form.horizontal .form-field { + float: left; +} +form.horizontal.split_half .form-field { + width: 334px; +} +form.horizontal.split_quarter .form-field { + width: 167px; +} +form.horizontal.split_five .form-field { + width: 133px; +} +form.horizontal fieldset { + width: 100%; +} +.modal-body { + overflow-y: visible; + max-height: none; +} +.modal-body table { + margin-bottom: 30px; +} +.modal-body ~ hr { + margin-bottom: 0; +} +.static_page { + float: left; + width: 700px; + background-color: #ffffff; + border: 1px solid #dddddd; +} +.static_page > form { + margin-bottom: 0; +} +.left { + float: left; + width: 347px; + margin-right: 15px; +} +.left form { + margin: 0; +} +.right { + float: left; + width: 308px; +} +.clear { + clear: both; + width: 0; + height: 0; + padding: 0; + margin: 0; +} +.modal-body fieldset { + margin: 0; + padding: 0; +} +.modal-body fieldset ul { + width: 90%; +} +.modal-body fieldset .form-field input, .modal-body fieldset .form-field textarea { + width: 298px; +} +.modal-body fieldset .form-field select { + width: 308px; +} +.modal-body fieldset .form-field textarea { + height: 36px; +} +.modal-body-fixed-width { + max-width: 298px; +} +.modal-footer input { + width: auto; +} +.modal-body .modal-footer { + width: 670px; + margin-left: -25px; + margin-right: -15px; +} +.modal-footer a.close { + margin-top: 0; + margin-right: 5px; + font-size: 12px; + color: #666666; + font-weight: normal; + filter: alpha(opacity=100); + -khtml-opacity: 1; + -moz-opacity: 1; + opacity: 1; +} +.modal-footer a.close:hover { + color: #333333; + text-decoration: underline; +} +.modal-body .help-block { + text-align: left; + float: left; + width: 100%; + margin-bottom: 10px; +} +#create_keypair_modal .clearfix { + margin-bottom: 115px; +} +#actions { + width: 90px; +} +#actions .btn { + margin-bottom: 5px; +} +#actions a.btn { + width: 70px; +} +#actions input.btn { + text-align: left; +} +#images #actions { + width: 100px; +} +.details-modal .modal-body { + padding-bottom: 20px; +} +.form-inline { + display: inline; +} +.form-inline input, .form-inline button, .form-inline a.btn { + margin-left: 5px; +} +td.select { + width: 10px; +} +td.actions_column { + white-space: nowrap; + padding: 10px; + position: relative; + width: 200px; +} +td.actions_column .btn-group { + display: inline-block; +} +td.actions_column .row_actions a, +td.actions_column .row_actions input, +td.actions_column .row_actions button { + background: none; + float: none; + display: block; + padding: 5px 10px; + color: black; + text-align: left; + border-radius: 0; + border: 0 none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +td.actions_column .row_actions .hide { + display: none; +} +td.actions_column .btn-action-required { + font-weight: bold; +} +.tab-content { + overflow: visible; +} +.btn.hide, .btn-group .hide { + display: none; +} +.btn-group .dropdown-toggle:focus { + outline: none; +} +.dropdown-menu button { + line-height: 18px; + width: 100%; +} +.btn-group .dropdown-menu .btn { + border-radius: 0; +} +.dropdown-menu .btn.btn-danger, +.dropdown-menu .btn.btn-danger:hover, +.dropdown-menu .btn.btn-success, +.dropdown-menu .btn.btn-success:hover, +.dropdown-menu .btn.btn-info, +.dropdown-menu .btn.btn-info:hover { + text-shadow: none; +} +.dropdown-menu li:hover { + background: none; +} +.dropdown-menu li.divider:hover { + background-color: #e5e5e5; +} +td.actions_column .dropdown-menu a:hover, +td.actions_column .dropdown-menu button:hover { + background-color: #cdcdcd; +} +.dropdown-menu .btn.btn-danger { + color: #c43c35; +} +.dropdown-menu .btn.btn-danger:hover { + background-color: #f6e0df; +} +tr td.actions_column ul.row_actions.single, +tr:hover td.actions_column ul.row_actions.single, +td.actions_column ul.row_actions.single, +td.actions_column ul.row_actions.single:hover { + border: none; +} +td.actions_column ul.row_actions.single li.action { + display: block; +} +td.actions_column ul.row_actions.single li.action:hover { + background-color: transparent; +} +td.actions_column ul.row_actions.single a, +td.actions_column ul.row_actions.single input, +td.actions_column ul.row_actions.single button { + color: #43a1d6; +} +td.actions_column ul.row_actions.single a:hover, +td.actions_column ul.row_actions.single input:hover, +td.actions_column ul.row_actions.single button:hover { + color: black; +} +th.multi_select_column, td.multi_select_column { + width: 25px; +} +th.multi_select_column, td.multi_select_column { + text-align: center; +} +.table-fixed { + table-layout: fixed; +} +.table input[type="checkbox"] { + display: inline; +} +div.input input[type="checkbox"] { + float: left; + width: 25px; +} +.table_title a { + font-size: 11px; + float: right; + margin-left: 10px; + margin-top: 10px; +} +tr.terminated { + color: #999999; +} +#instance_tabs { + float: left; + width: 100%; + border-bottom: 1px solid #e1e1e1; +} +#instance_tabs li a { + background: #f2f2f2; + display: block; + font-size: 14px; + float: left; + padding: 5px 10px; + margin-right: 10px; + border: 1px solid #e1e1e1; + border-bottom: none; +} +#instance_tabs li.active a { + background: #ffffff; + padding-bottom: 8px; + margin-bottom: -5px; +} +#main_content .nav-tabs { + margin-bottom: 0; +} +#main_content .tab-content { + border: 1px solid #dddddd; + border-top: 0 none; + padding: 10px; +} +#main_content .workflow .modal-body { + padding-left: 0; + padding-right: 0; +} +#main_content .workflow .modal-body .tab-content { + border-left: 0 none; + border-right: 0 none; + border-bottom: 0 none; +} +#content_body { + padding-left: 255px; + padding-right: 25px; +} +.tab_wrapper { + padding-top: 50px; +} +.tooltip { + z-index: 12000; +} +.volume_boot_disclosure { + font-weight: bold; + color: #555555; + cursor: pointer; + background-image: url('/static/dashboard/img/right_droparrow.png'); + background-repeat: no-repeat; + background-position: 130px center; +} +.volume_boot_disclosure.on { + width: 334px; + margin-bottom: 10px; + border-bottom: solid 1px #e1e1e1; + background-image: url('/static/dashboard/img/drop_arrow.png'); +} +form div.clearfix.error { + width: 308px; +} +.nav-tabs a { + cursor: pointer; +} +.nav-tabs li.error a { + color: #b94a48; +} +.nav-tabs li.error a:after { + content: "*"; +} +.nav-tabs li.required a:after, form .form-field.required > label:after { + content: "*"; + font-weight: bold; + line-height: 0; + padding-left: 4px; + color: #3290c0; +} +#region_selector { + position: absolute; + z-index: 9999; + right: 0; + top: 24px; +} +#region_selector a { + margin-left: 0; +} +#region_selector ul { + float: left; + margin-left: 5px; + padding-right: 21px; + width: 125px; +} +#region_selector ul:hover a { + display: block; +} +#region_selector li a { + padding: 3px 3px 3px 5px; + display: none; + background: #e1e1e1; + margin-top: -10px; +} +#region_selector li:first-child p { + background: #ededed url('/static/dashboard/img/drop_arrow.png') no-repeat 106px 9px !important; + display: block; + border: 1px solid #e1e1e1; + padding: 5px; +} +iframe { + border: none; +} +.item_detail ul li label { + color: #000000; + font-weight: bold; + display: block; + margin-top: 5px; +} +.progress_bar { + height: 100%; + width: 100%; + border: 1px solid #cccccc; + background-color: #cccccc; +} +.progress_bar_fill, .progress_bar_selected { + height: 100%; + float: left; +} +.progress_bar_fill { + background-color: #666666; +} +.progress_bar_selected { + background-color: #4790ae; + width: 0; +} +.progress_bar_over { + background-color: red; +} +.d3_quota_bar { + width: 20%; + margin-bottom: 8px; + margin-top: 10px; + float: left; + text-align: center; +} +.quota-dynamic { + overflow: hidden; + margin-bottom: 8px; +} +.quota_title { + color: #999999; + padding-bottom: 0; + margin-bottom: 8px; +} +.quota_title strong { + color: #000000; +} +.quota_title strong span { + font-weight: normal; +} +.quota_title p { + float: right; + margin-bottom: 0; +} +.quota_bar { + height: 15px; + margin: -8px 0 8px; +} +div .flavor_table { + border: 1px solid #aaaaaa; + width: 100%; + margin-bottom: 14px; +} +.flavor_table .flavor_name { + white-space: nowrap; + font-weight: bold; + text-align: left; + padding: 7px 12px 7px 7px; + width: 160px; +} +#main_content .row-fluid { + margin: 10px 0 20px; +} +#main_content .row-fluid:last-child { + margin-bottom: 0; +} +.header_rule { + margin: 0 0 10px; +} +.item_detail .detail_section { + margin-bottom: 25px; + float: left; + margin-right: 50px; +} +.error .help-inline, .dynamic-error { + background: #efdfdf; + border: 1px solid #ead5d8; + padding: 10px; + display: block; +} +.dynamic-error { + color: #b94a48; + margin-bottom: 0.5em; +} +label.log-length { + line-height: 28px; + margin-right: 10px; +} +.progress-success.bar { + background-color: #5eb95e; + background-image: -moz-linear-gradient(top,#62c462,#57a957); + background-image: -ms-linear-gradient(top,#62c462,#57a957); + background-image: -webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#57a957)); + background-image: -webkit-linear-gradient(top,#62c462,#57a957); + background-image: -o-linear-gradient(top,#62c462,#57a957); + background-image: linear-gradient(top,#62c462,#57a957); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0); +} +.progress_bar_fill.progress-warning.bar { + background-color: #898989; + background-image: -moz-linear-gradient(top,#999999,#333333); + background-image: -ms-linear-gradient(top,#999999,#333333); + background-image: -webkit-gradient(linear,0 0,0 100%,from(#999999),to(#333333)); + background-image: -webkit-linear-gradient(top,#999999,#333333); + background-image: -o-linear-gradient(top,#999999,#333333); + background-image: linear-gradient(top,#999999,#333333); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#999999', endColorstr='#333333', GradientType=0); +} +.progress_bar_over.bar { + background-color: #dd514c; + background-image: -moz-linear-gradient(top,#ee5f5b,#c43c35); + background-image: -ms-linear-gradient(top,#ee5f5b,#c43c35); + background-image: -webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#c43c35)); + background-image: -webkit-linear-gradient(top,#ee5f5b,#c43c35); + background-image: -o-linear-gradient(top,#ee5f5b,#c43c35); + background-image: linear-gradient(top,#ee5f5b,#c43c35); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0); +} +.split_five div.control-group input[type="text"], +.split_five div.control-group select { + width: 120px; +} +.warning { + background-color: #f2dede; + border-bottom: 1px solid #9d261d; + padding: 5px 10px; +} +.warning .warning-text { + text-align: center; +} +.warning .warning-text h3, .warning .warning-text a { + display: inline-block; +} +.warning .warning-text h3 { + vertical-align: bottom; +} +#admin_warning_detail ul { + list-style: circle; + padding-left: 20px; + margin-bottom: 10px; +} +.no_split { + margin-top: -60px; +} +.membership { + min-height: 200px; +} +.membership .btn-group { + margin-left: 0px; + padding: 2px 10px 0 0; + margin-bottom: 0px; + border: 1px solid #dddddd; + border-bottom: none; +} +.membership .btn-group .active { + float: right; +} +.membership a.btn-primary:hover { + background-color: #0044cc; +} +.membership .help_text { + margin-left: 15px; + margin-bottom: 15px; +} +.membership .members_title { + color: #555555; + font-weight: bold; + padding-left: 10px; + float: left; +} +.membership input { + background: url('/static/dashboard/img/search.png') no-repeat 105px 5px whiteSmoke; +} +.membership .fake_table_header { + background-color: #f1f1f1; + width: 306px; + height: 38px; + padding-top: 15px; + border: 1px solid #dddddd; + border-bottom: none; +} +.membership .fake_table { + margin-left: 5px; + width: 315px; +} +.membership .fake_table ul.no_results { + width: 298px; +} +.membership .fake_table ul.btn-group:hover { + background-color: #dddddd; +} +.membership .left .fake_table_header { + width: 318px; +} +.membership .right .fake_table_header { + width: 318px; + margin-left: -15px; +} +.membership .right .fake_table ul.no_results { + margin-left: -20px; +} +.membership .member { + padding: 10px; + text-align: left; +} +.membership .members { + margin-left: -20px; +} +.membership .members ul.btn-group, .membership .available_members ul.btn-group { + width: 308px; +} +.membership .dark_stripe { + background-color: #f9f9f9; +} +.membership .light_stripe { + background-color: white; +} +.membership .last_stripe { + border-bottom: 1px solid #dddddd; +} +.membership .filter { + width: 120px; + margin: -5px 13px 15px 0px; + float: right; +} +.membership .no_results { + border: 1px solid #dddddd; + padding: 10px; + opacity: 0.5; +} +.membership .role_dropdown li { + cursor: pointer; + background: none; + float: none; + display: block; + padding: 5px 10px; + color: black; + text-align: left; + border-radius: 0; + border: 0 none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + z-index: 99999; +} +.membership .role_dropdown li i { + opacity: 0; +} +.membership .role_dropdown li:hover { + background-color: #cdcdcd; +} +.membership .role_dropdown li.selected i { + opacity: 1; +} +.membership .dropdown-menu.role_dropdown { + right: 0; + left: auto; +} +.membership .nav .role_options { + float: right; + padding-right: 5px; +} +.add_member_btn { + display: inline; +} +#add_member { + clear: both; +} +.add_member { + float: right; + margin-top: 10px; + margin-right: 15px; +} +.dropdown_fix { + overflow: visible; +} +.loading_gif { + width: 35px; + height: 13px; + padding-top: 2px; + padding-right: 5px; + float: left; +} +.action_required_img { + width: 35px; + height: 13px; + padding-top: 2px; + padding-right: 5px; + float: left; +} +#browser_wrapper { + width: 100%; + min-width: 1000px; + background-color: #eeeeee; + border: 1px solid #dddddd; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +#browser_wrapper .tfoot { + clear: both; + padding: 8px; + border-top: 1px solid #dddddd; + background-color: #f1f1f1; + font-size: 11px; + line-height: 14px; +} +#browser_wrapper .tfoot span { + display: inline-block; +} +#browser_wrapper .tfoot span.navigation_table_count { + width: 30%; +} +#browser_wrapper form, #browser_wrapper table { + margin-bottom: 0; +} +#browser_wrapper .navigation_wrapper, #browser_wrapper .content_wrapper { + position: relative; + float: left; +} +#browser_wrapper div.navigation_wrapper { + z-index: 10; + width: 30%; +} +#browser_wrapper div.navigation_wrapper div.table_wrapper, +#browser_wrapper div.navigation_wrapper thead th.table_header { + border-right: 0 none; + border-top-right-radius: 0; +} +#browser_wrapper div.navigation_wrapper td:first-child { + border-left: 0 none; +} +#browser_wrapper div.navigation_wrapper td.breadcrumb_td { + padding-right: 0px; + max-width: 200px; +} +#browser_wrapper div.navigation_wrapper tr.current_selected td { + background-color: #e9f5fa; +} +#browser_wrapper div.navigation_wrapper tfoot td { + border-right: 0 none; + border-bottom-right-radius: 0; +} +#browser_wrapper div.navigation_wrapper ul.breadcrumb { + padding-right: 0px; + border-top-right-radius: 0px; + border-bottom-right-radius: 0px; + border-right: none; + white-space: nowrap; +} +#browser_wrapper div.navigation_wrapper tbody td { + border-right: 1px solid #dddddd; + background-color: #ffffff; +} +#browser_wrapper div.content_wrapper { + width: 70%; +} +#browser_wrapper div.content_wrapper div.table_wrapper, +#browser_wrapper div.content_wrapper thead th.table_header { + border-left: 0 none; + border-top-left-radius: 0; +} +#browser_wrapper div.content_wrapper td { + border-bottom: 1px solid #dddddd; +} +#browser_wrapper div.content_wrapper td:last-child { + border-right: 0 none; +} +#browser_wrapper div.content_wrapper td.breadcrumb_td { + padding-left: 0px; +} +#browser_wrapper div.content_wrapper tfoot td { + border-left: 0 none; + border-bottom-left-radius: 0; +} +#browser_wrapper div.content_wrapper ul.breadcrumb { + padding-left: 0px; + border-top-left-radius: 0px; + border-bottom-left-radius: 0px; + border-left: none; +} +#browser_wrapper div.content_wrapper ul.breadcrumb li { + visibility: hidden; +} +#browser_wrapper table { + border-collapse: collapse; +} +#browser_wrapper table thead tr th { + border-bottom: none; + background-color: #eeeeee; +} +#browser_wrapper table tbody tr:last-child td { + border-bottom: 1px solid #dddddd; + border-radius: 0; +} +#browser_wrapper table tbody tr.empty td { + height: 28px; + padding: 10px; +} +#browser_wrapper table tbody td.actions_column { + position: static; +} +#browser_wrapper .breadcrumb { + padding: 6px; + margin: 0 0 1px 0; +} +.btn-inline { + margin-bottom: 9px; +} +.modal-body fieldset .form-field select[data-add-item-url] { + width: 275px; + margin-right: 2px; +} +#networkListSortContainer { + display: none; +} +.networklist { + padding: 6px; + background: #eeeeee; + border: 1px solid #cccccc; + min-height: 2em; + width: auto !important; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.networklist li { + width: 226px; + list-style-type: none; + margin: 6px auto; + padding: 3px; + background: #ffffff; + border: 1px solid #aaaaaa; + line-height: 18px; + border-radius: 3px; + cursor: move; + padding-left: 23px; + background: white url('/static/dashboard/img/drag.png') no-repeat 11px 50%; +} +.networklist li em { + font-size: 0.5em; + line-height: 1em; + color: #999999; + font-style: normal; + margin-left: 0.8em; +} +.networklist li i { + margin-right: 5px; + vertical-align: middle; +} +.networklist li a.btn { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + font-size: 11px; + line-height: 12px; + padding: 2px 5px 3px; + margin-right: 1px; + width: 18px; + text-align: center; + right: 5px; + vertical-align: middle; + float: right; +} +.networklist li a.btn:before { + content: "+"; +} +.networklist li.ui-sortable-helper { + background-color: #ddeeff; +} +.networklist li.ui-state-highlight { + border: 1px dotted #cccccc; + background: #efefef; + height: 0.5em; +} +.networklist li:after { + visibility: hidden; + display: block; + font-size: 0; + content: " "; + clear: both; + height: 0; +} +#selected_network { + margin-bottom: 1.5em; + counter-reset: v1 0; + background: #edf9ff; + border: 1px solid #c0d9e4; +} +#selected_network li { + position: relative; +} +#selected_network li a.btn:before { + content: "-"; +} +#selected_network li:before { + content: "nic:"counter(v1); + counter-increment: v1; + display: inline-block; + margin-right: 5px; + background: #666666; + color: #ffffff; + font-size: 90%; + padding: 0px 4px; + vertical-align: middle; + border-radius: 2px; + position: absolute; + left: -2em; +} +#selected_network.dragging li:before { + content: "nic:"; + background-color: rgba(102,102,102,0.5); + padding-right: 10px; +} +#selected_network.dragging li.ui-state-highlight:before { + content: ""; + background: transparent; +} +#topologyCanvasContainer { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + width: 100%; + height: auto; + padding: 25px; + padding-left: 50px; + background: #efefef; + min-height: 400px; +} +#topologyCanvasContainer div.nodata { + font-size: 150%; + text-align: center; + padding-top: 150px; + display: none; +} +#topologyCanvasContainer.noinfo div.nodata { + display: block; +} +#topologyCanvasContainer.noinfo #topology_canvas { + display: none; +} +.topologyNavi { + overflow: hidden; + margin: 10px 0 20px; +} +.topologyNavi i { + margin-right: 3px; +} +.topologyNavi .toggleView { + float: left; +} +.topologyNavi .launchButtons { + float: right; + text-align: right; +} +.topologyNavi .launchButtons a.btn { + margin-left: 10px; +} +.topologyBalloon { + display: none; + background: #ffffff; + position: absolute; + left: 100px; + top: 20px; + z-index: 600; + border-radius: 5px; + color: #333333; + min-width: 200px; + line-height: 1.2; + font-size: 11px; + -webkit-box-shadow: 0px 1px 6px #777777; + -moz-box-shadow: 0px 1px 6px #777777; + box-shadow: 0px 1px 6px #777777; +} +.topologyBalloon.on { + display: block; +} +.topologyBalloon .vnc_window { + margin-left: 10px; +} +.topologyBalloon .closeTopologyBalloon { + font-size: 16px; + line-height: 1; + display: block; + position: absolute; + font-weight: bold; + right: 6px; + top: 0px; + cursor: pointer; + padding: 3px; + color: #aaaaaa; +} +.topologyBalloon .closeTopologyBalloon:hover { + color: #777777; + text-decoration: none; +} +.topologyBalloon .contentBody { + padding: 8px 8px 0; +} +.topologyBalloon span.active:before, .topologyBalloon span.down:before { + content: ""; + width: 9px; + height: 9px; + display: inline-block; + background: #0d925b; + margin-right: 3px; + border-radius: 10px; + vertical-align: middle; +} +.topologyBalloon span.down:before { + background: #e64b41; +} +.topologyBalloon .footer { + background: #efefef; + border-top: 1px solid #d9d9d9; + padding: 8px; + border-radius: 0px 0px 7px 7px; +} +.topologyBalloon .footer .footerInner { + display: table; + width: 100%; +} +.topologyBalloon .footer .cell { + display: table-cell; + padding-right: 10px; +} +.topologyBalloon .footer .link { + font-size: 12px; +} +.topologyBalloon .footer .delete { + padding-right: 0; + text-align: right; +} +.topologyBalloon .footer .delete .btn:before { + content: "Delete "; +} +.topologyBalloon .footer .delete .btn.deleting:before { + content: "Deleting "; +} +.topologyBalloon .footer .delete .btn.instance:before { + content: "Terminate "; +} +.topologyBalloon .footer .delete .btn.instance.deleting:before { + content: "Terminating "; +} +.topologyBalloon table.detailInfoTable { + margin-bottom: 5px; +} +.topologyBalloon table.detailInfoTable caption { + text-align: left; + font-size: 12px; + font-weight: bold; + margin-bottom: 0px; +} +.topologyBalloon table.detailInfoTable th, .topologyBalloon table.detailInfoTable td { + text-align: left; + vertical-align: middle; + padding-bottom: 3px; + background: transparent; +} +.topologyBalloon table.detailInfoTable th { + color: #999999; + padding-right: 8px; + width: 80px; +} +.topologyBalloon table.detailInfoTable th span { + vertical-align: middle; + width: 80px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + display: inline-block; +} +.topologyBalloon table.detailInfoTable th.device { + text-align: right; +} +.topologyBalloon table.detailInfoTable td { + padding-right: 5px; + white-space: nowrap; +} +.topologyBalloon table.detailInfoTable td.delete { + padding-right: 0; + text-align: right; +} +.topologyBalloon table.detailInfoTable .btn { + line-height: 1.4; +} +.topologyBalloon table.detailInfoTable .btn:before { + content: "Delete "; +} +.topologyBalloon table.detailInfoTable .btn.deleting:before { + content: "Deleting "; +} +.topologyBalloon:before { + border-top: 7px solid transparent; + border-bottom: 7px solid transparent; + border-right: 9px solid #bbbbbb; + display: block; + position: absolute; + top: 30px; + left: -9px; + width: 0; + height: 0; + content: ""; +} +.topologyBalloon:after { + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 8px solid #ffffff; + display: block; + position: absolute; + top: 31px; + left: -8px; + width: 0; + height: 0; + content: ""; +} +.topologyBalloon.leftPosition:before { + border-right: none; + border-left: 9px solid #bbbbbb; + right: -9px; + top: 30px; + left: auto; +} +.topologyBalloon.leftPosition:after { + border-right: none; + border-left: 8px solid #ffffff; + right: -8px; + top: 31px; + left: auto; +} +#topologyMessages { + width: 1px; + height: 1px; + visibility: hidden; + position: absolute; + top: -100px; +} +.quota-heading { + font-family: anivers; + font-weight: normal; + font-size: 24px; + margin-bottom: 10px; +} +.link { + stroke: #999999; + stroke-width: 1.5px; +} +.node { + cursor: pointer; +} +.node text { + font: 12px sans-serif; +} +#resource_container { + position: relative; +} +#stack_box { + position: absolute; + width: 300px; + top: 10px; + left: 10px; +} +#stack_box h3 { + font-size: 11pt; + line-height: 20px; +} +#stack_box p { + margin: 0; + font-size: 9pt; + line-height: 14px; +} +#stack_box a { + margin: 0; + font-size: 9pt; + line-height: 14px; +} +#stack_box img { + float: left; +} +#stack_box #stack_info { + float: left; + white-space: normal; + width: 200px; +} +#info_box { + position: absolute; + width: 300px; + top: 100px; + left: 10px; +} +#info_box h3 { + font-size: 9pt; + line-height: 20px; +} +#info_box p { + margin: 0; + font-size: 9pt; + line-height: 14px; +} +#info_box a { + margin: 0; + font-size: 9pt; + line-height: 14px; +} +#info_box .error { + color: darkred; +} +#ceilometer-stats .form-horizontal .control-label { + width: auto; +} +#ceilometer-stats .form-horizontal .controls { + float: left; + margin-left: 0; +} +#ceilometer-stats .form-horizontal .control-group { + float: left; + margin-right: 20px; +} +#ceilometer-stats .form-horizontal .btn { + float: left; + margin-right: 20px; + margin-bottom: 18px; +} +#ruleListSortContainer { + display: none; +} +.rulelist { + padding: 6px; + background: #eeeeee; + border: 1px solid #cccccc; + min-height: 2em; + width: auto !important; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.rulelist li { + width: 226px; + list-style-type: none; + margin: 6px auto; + padding: 3px; + background: #ffffff; + border: 1px solid #aaaaaa; + line-height: 18px; + border-radius: 3px; + cursor: move; + padding-left: 23px; + background: white url('/static/dashboard/img/drag.png') no-repeat 11px 50%; +} +.rulelist li em { + font-size: 0.5em; + line-height: 1em; + color: #999999; + font-style: normal; + margin-left: 0.8em; +} +.rulelist li i { + margin-right: 5px; + vertical-align: middle; +} +.rulelist li a.btn { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + font-size: 11px; + line-height: 12px; + padding: 2px 5px 3px; + margin-right: 1px; + width: 18px; + text-align: center; + right: 5px; + vertical-align: middle; + float: right; +} +.rulelist li a.btn:before { + content: "+"; +} +.rulelist li.ui-sortable-helper { + background-color: #ddeeff; +} +.rulelist li.ui-state-highlight { + border: 1px dotted #cccccc; + background: #efefef; + height: 0.5em; +} +.rulelist li:after { + visibility: hidden; + display: block; + font-size: 0; + content: " "; + clear: both; + height: 0; +} +#selected_rule { + margin-bottom: 1.5em; + counter-reset: v1 0; + background: #edf9ff; + border: 1px solid #c0d9e4; +} +#selected_rule li { + position: relative; +} +#selected_rule li a.btn:before { + content: "-"; +} +#selected_rule li:before { + content: "rule:"counter(v1); + counter-increment: v1; + display: inline-block; + margin-right: 5px; + background: #666666; + color: #ffffff; + font-size: 90%; + padding: 0px 4px; + vertical-align: middle; + border-radius: 2px; + position: absolute; + left: -2em; +} +#selected_rule.dragging li:before { + content: "rule:"; + background-color: rgba(102,102,102,0.5); + padding-right: 10px; +} +#selected_rule.dragging li.ui-state-highlight:before { + content: ""; + background: transparent; +} + +.rickshaw_graph .detail { + pointer-events: none; + position: absolute; + top: 0; + z-index: 2; + background: rgba(0, 0, 0, 0.1); + bottom: 0; + width: 1px; + transition: opacity 0.25s linear; + -moz-transition: opacity 0.25s linear; + -o-transition: opacity 0.25s linear; + -webkit-transition: opacity 0.25s linear; +} +.rickshaw_graph .detail.inactive { + opacity: 0; +} +.rickshaw_graph .detail .item.active { + opacity: 1; +} +.rickshaw_graph .detail .x_label { + font-family: Arial, sans-serif; + border-radius: 3px; + padding: 6px; + opacity: 0.5; + border: 1px solid #e0e0e0; + font-size: 12px; + position: absolute; + background: white; + white-space: nowrap; +} +.rickshaw_graph .detail .item { + position: absolute; + z-index: 2; + border-radius: 3px; + padding: 0.25em; + font-size: 12px; + font-family: Arial, sans-serif; + opacity: 0; + background: rgba(0, 0, 0, 0.4); + color: white; + border: 1px solid rgba(0, 0, 0, 0.4); + margin-left: 1em; + margin-top: -1em; + white-space: nowrap; +} +.rickshaw_graph .detail .item.active { + opacity: 1; + background: rgba(0, 0, 0, 0.8); +} +.rickshaw_graph .detail .item:before { + content: "\25c2"; + position: absolute; + left: -0.5em; + color: rgba(0, 0, 0, 0.7); + width: 0; +} +.rickshaw_graph .detail .dot { + width: 4px; + height: 4px; + margin-left: -4px; + margin-top: -3px; + border-radius: 5px; + position: absolute; + box-shadow: 0 0 2px rgba(0, 0, 0, 0.6); + background: white; + border-width: 2px; + border-style: solid; + display: none; + background-clip: padding-box; +} +.rickshaw_graph .detail .dot.active { + display: block; +} +/* graph */ + +.rickshaw_graph { + position: relative; +} +.rickshaw_graph svg { + display: block; + overflow: hidden; +} + +/* ticks */ + +.rickshaw_graph .x_tick { + position: absolute; + top: 0; + bottom: 0; + width: 0px; + border-left: 1px dotted rgba(0, 0, 0, 0.2); + pointer-events: none; +} +.rickshaw_graph .x_tick .title { + position: absolute; + font-size: 12px; + font-family: Arial, sans-serif; + opacity: 0.5; + white-space: nowrap; + margin-left: 3px; + bottom: 1px; +} + +/* annotations */ + +.rickshaw_annotation_timeline { + height: 1px; + border-top: 1px solid #e0e0e0; + margin-top: 10px; + position: relative; +} +.rickshaw_annotation_timeline .annotation { + position: absolute; + height: 6px; + width: 6px; + margin-left: -2px; + top: -3px; + border-radius: 5px; + background-color: rgba(0, 0, 0, 0.25); +} +.rickshaw_graph .annotation_line { + position: absolute; + top: 0; + bottom: -6px; + width: 0px; + border-left: 2px solid rgba(0, 0, 0, 0.3); + display: none; +} +.rickshaw_graph .annotation_line.active { + display: block; +} + +.rickshaw_graph .annotation_range { + background: rgba(0, 0, 0, 0.1); + display: none; + position: absolute; + top: 0; + bottom: -6px; +} +.rickshaw_graph .annotation_range.active { + display: block; +} +.rickshaw_graph .annotation_range.active.offscreen { + display: none; +} + +.rickshaw_annotation_timeline .annotation .content { + background: white; + color: black; + opacity: 0.9; + padding: 5px 5px; + box-shadow: 0 0 2px rgba(0, 0, 0, 0.8); + border-radius: 3px; + position: relative; + z-index: 20; + font-size: 12px; + padding: 6px 8px 8px; + top: 18px; + left: -11px; + width: 160px; + display: none; + cursor: pointer; +} +.rickshaw_annotation_timeline .annotation .content:before { + content: "\25b2"; + position: absolute; + top: -11px; + color: white; + text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.8); +} +.rickshaw_annotation_timeline .annotation.active, +.rickshaw_annotation_timeline .annotation:hover { + background-color: rgba(0, 0, 0, 0.8); + cursor: none; +} +.rickshaw_annotation_timeline .annotation .content:hover { + z-index: 50; +} +.rickshaw_annotation_timeline .annotation.active .content { + display: block; +} +.rickshaw_annotation_timeline .annotation:hover .content { + display: block; + z-index: 50; +} +.rickshaw_graph .y_axis, +.rickshaw_graph .x_axis_d3 { + fill: none; +} +.rickshaw_graph .y_ticks .tick, +.rickshaw_graph .x_ticks_d3 .tick { + stroke: rgba(0, 0, 0, 0.16); + stroke-width: 2px; + shape-rendering: crisp-edges; + pointer-events: none; +} +.rickshaw_graph .y_grid .tick, +.rickshaw_graph .x_grid_d3 .tick { + z-index: -1; + stroke: rgba(0, 0, 0, 0.20); + stroke-width: 1px; + stroke-dasharray: 1 1; +} +.rickshaw_graph .y_grid path, +.rickshaw_graph .x_grid_d3 path { + fill: none; + stroke: none; +} +.rickshaw_graph .y_ticks path, +.rickshaw_graph .x_ticks_d3 path { + fill: none; + stroke: #808080; +} +.rickshaw_graph .y_ticks text, +.rickshaw_graph .x_ticks_d3 text { + opacity: 0.5; + font-size: 12px; + pointer-events: none; +} +.rickshaw_graph .x_tick.glow .title, +.rickshaw_graph .y_ticks.glow text { + fill: black; + color: black; + text-shadow: + -1px 1px 0 rgba(255, 255, 255, 0.1), + 1px -1px 0 rgba(255, 255, 255, 0.1), + 1px 1px 0 rgba(255, 255, 255, 0.1), + 0px 1px 0 rgba(255, 255, 255, 0.1), + 0px -1px 0 rgba(255, 255, 255, 0.1), + 1px 0px 0 rgba(255, 255, 255, 0.1), + -1px 0px 0 rgba(255, 255, 255, 0.1), + -1px -1px 0 rgba(255, 255, 255, 0.1); +} +.rickshaw_graph .x_tick.inverse .title, +.rickshaw_graph .y_ticks.inverse text { + fill: white; + color: white; + text-shadow: + -1px 1px 0 rgba(0, 0, 0, 0.8), + 1px -1px 0 rgba(0, 0, 0, 0.8), + 1px 1px 0 rgba(0, 0, 0, 0.8), + 0px 1px 0 rgba(0, 0, 0, 0.8), + 0px -1px 0 rgba(0, 0, 0, 0.8), + 1px 0px 0 rgba(0, 0, 0, 0.8), + -1px 0px 0 rgba(0, 0, 0, 0.8), + -1px -1px 0 rgba(0, 0, 0, 0.8); +} +.rickshaw_legend { + font-family: Arial; + font-size: 12px; + color: white; + background: #404040; + display: inline-block; + padding: 12px 5px; + border-radius: 2px; + position: relative; +} +.rickshaw_legend:hover { + z-index: 10; +} +.rickshaw_legend .swatch { + width: 10px; + height: 10px; + border: 1px solid rgba(0, 0, 0, 0.2); +} +.rickshaw_legend .line { + clear: both; + line-height: 140%; + padding-right: 15px; +} +.rickshaw_legend .line .swatch { + display: inline-block; + margin-right: 3px; + border-radius: 2px; +} +.rickshaw_legend .label { + margin: 0; + white-space: nowrap; + display: inline; + font-size: inherit; + background-color: transparent; + color: inherit; + font-weight: normal; + line-height: normal; + padding: 0px; + text-shadow: none; +} +.rickshaw_legend .action:hover { + opacity: 0.6; +} +.rickshaw_legend .action { + margin-right: 0.2em; + font-size: 10px; + opacity: 0.2; + cursor: pointer; + font-size: 14px; +} +.rickshaw_legend .line.disabled { + opacity: 0.4; +} +.rickshaw_legend ul { + list-style-type: none; + margin: 0; + padding: 0; + margin: 2px; + cursor: pointer; +} +.rickshaw_legend li { + padding: 0 0 0 2px; + min-width: 80px; + white-space: nowrap; +} +.rickshaw_legend li:hover { + background: rgba(255, 255, 255, 0.08); + border-radius: 3px; +} +.rickshaw_legend li:active { + background: rgba(255, 255, 255, 0.2); + border-radius: 3px; +} + +.chart { + height: inherit; + width: inherit; + min-height: inherit; + min-width: inherit; +} +.chart .tooltip_detail { + position: absolute; + z-index: 2; + border-radius: 3px; + padding: 0.25em; + font-size: 12px; + font-family: Arial, sans-serif; + color: white; + border: 1px solid rgba(0,0,0,0.4); + margin-left: 1em; + margin-top: -1em; + white-space: nowrap; + background: rgba(0,0,0,0.8); +} +.chart .tooltip_detail:before { + content: "\25c2"; + position: absolute; + left: -0.5em; + color: rgba(0,0,0,0.7); + width: 0; + top: 12px; +} +.overview_chart { + width: 214px; + height: 81px; + border: 1px ridge black; + padding: 8px 8px 8px 8px !important; +} +.overview_chart .chart_container { + width: 140px; + min-width: 140px; +} +.overview_chart .chart_container .chart svg { + padding-right: 4px !important; +} +.overview_chart .bar_chart_container { + width: 74px; + min-width: 74px; +} +.overview_chart .bar_chart_container, .overview_chart .chart_container { + float: left; + min-height: 81px; + height: 81px; +} +.overview_chart .bar_chart_container .chart, .overview_chart .chart_container .chart { + height: inherit; + width: inherit; + min-height: inherit; + min-width: inherit; +} +.overview_chart .bar_chart_container .chart .modal-backdrop, +.overview_chart .chart_container .chart .modal-backdrop { + min-height: inherit; + min-width: inherit; +} +.overview_chart .tooltip_detail { + position: absolute; + z-index: 2; + border-radius: 3px; + padding: 0.25em; + font-size: 12px; + font-family: Arial, sans-serif; + color: white; + border: 1px solid rgba(0,0,0,0.4); + margin-left: 1em; + margin-top: -1em; + white-space: nowrap; + background: rgba(0,0,0,0.8); +} +.overview_chart .tooltip_detail:before { + content: "\25c2"; + position: absolute; + left: -0.5em; + color: rgba(0,0,0,0.7); + width: 0; + top: 12px; +} +.chart_container { + position: relative; + min-height: 300px; + min-width: 400px; +} +.chart_container .chart { + position: relative; + min-height: 300px; + min-width: 400px; +} +.chart_container .chart .detail .x_label { + display: none; +} +.chart_container .chart .detail .item { + line-height: 1.4; + padding: 0.5em; +} +.chart_container .chart .detail .date { + color: #a0a0a0; +} +.chart_container .chart .modal-backdrop { + position: absolute; + opacity: 0.5; + top: 0; + left: 0; + min-height: 300px; + min-width: 400px; +} +.chart_container .chart svg { + padding: 0 0 5px 0; +} +.chart_container .detail_swatch { + float: right; + display: inline-block; + width: 10px; + height: 10px; + margin: 0 4px 0 0; +} +.legend_container { + min-width: 90px; + margin-left: 20px; +} +.legend_container .swatch { + float: right; + display: inline-block; + width: 10px; + height: 10px; + margin: 0 4px 0 0; +} +.legend_container .modal-backdrop { + position: absolute; + opacity: 0.5; + top: 0; + left: 0; + min-width: 90px; +} +.legend_container .rickshaw_legend.disabled { + padding: 0; +} +.spinner_wrapper { + position: absolute; + top: 40%; + left: 40%; +} +.rickshaw_legend { + background: white; + color: #404040; +} +.rickshaw_legend .action { + text-decoration: none; + color: #000000; +} + +.workflow ul.nav-tabs { + padding: 0 10px; +} +.workflow td.actions { + vertical-align: top; + width: 308px; + padding-right: 10px; +} +.workflow td.help_text { + vertical-align: top; + width: 340px; + padding-left: 10px; + border-left: 1px solid #dddddd; +} +.workflow fieldset > table { + margin-bottom: 0; +} +.workflow.wizard .row-fluid .btn { + float: none; + margin: 0; +} +.workflow.wizard .row-fluid .next { + text-align: right; +} +.workflow.wizard .nav-tabs.wizard-tabs { + border-bottom: none; + background: #efefef; + padding: 0; +} +.workflow.wizard .nav-tabs.wizard-tabs li { + margin-bottom: 0; + position: relative; +} +.workflow.wizard .nav-tabs.wizard-tabs li:before { + position: absolute; + top: 0; + right: -20px; + z-index: 2; + display: block; + border: 20px solid transparent; + border-right: 0; + border-left: 20px solid #dddddd; + content: ""; +} +.workflow.wizard .nav-tabs.wizard-tabs li:after { + position: absolute; + top: -2px; + right: -22px; + z-index: 1; + display: block; + border: 22px solid transparent; + border-right: 0; + border-left: 22px solid #ffffff; + content: ""; +} +.workflow.wizard .nav-tabs.wizard-tabs li.active:before, +.workflow.wizard .nav-tabs.wizard-tabs li.done:before { + border-left: 20px solid #007acc; +} +.workflow.wizard .nav-tabs.wizard-tabs li a { + border: none; + border-radius: 0; + background: #dddddd; + color: #43a4d7; + padding: 0 15px; + padding-left: 35px; + line-height: 40px; + position: relative; + margin: 0; +} +.workflow.wizard .nav-tabs.wizard-tabs li:first-child a { + padding-left: 15px; +} +.workflow.wizard .nav-tabs.wizard-tabs li.active a { + background: #007acc; + color: #ffffff; +} +.workflow.wizard .nav-tabs.wizard-tabs li.done a { + background: #007acc; +} +.workflow.wizard label.error { + color: #ff0000; +} diff --git a/trusty/debian/static/openstack-dashboard/js/0272dc9e5c21.js b/trusty/debian/static/openstack-dashboard/js/0272dc9e5c21.js new file mode 100644 index 0000000..4537278 --- /dev/null +++ b/trusty/debian/static/openstack-dashboard/js/0272dc9e5c21.js @@ -0,0 +1,1325 @@ +(function(window,undefined){var document=window.document,navigator=window.navigator,location=window.location;var jQuery=(function(){var jQuery=function(selector,context){return new jQuery.fn.init(selector,context,rootjQuery);},_jQuery=window.jQuery,_$=window.$,rootjQuery,quickExpr=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,rnotwhite=/\S/,trimLeft=/^\s+/,trimRight=/\s+$/,rsingleTag=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,rvalidchars=/^[\],:{}\s]*$/,rvalidescape=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rvalidtokens=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rvalidbraces=/(?:^|:|,)(?:\s*\[)+/g,rwebkit=/(webkit)[ \/]([\w.]+)/,ropera=/(opera)(?:.*version)?[ \/]([\w.]+)/,rmsie=/(msie) ([\w.]+)/,rmozilla=/(mozilla)(?:.*? rv:([\w.]+))?/,rdashAlpha=/-([a-z]|[0-9])/ig,rmsPrefix=/^-ms-/,fcamelCase=function(all,letter){return(letter+"").toUpperCase();},userAgent=navigator.userAgent,browserMatch,readyList,DOMContentLoaded,toString=Object.prototype.toString,hasOwn=Object.prototype.hasOwnProperty,push=Array.prototype.push,slice=Array.prototype.slice,trim=String.prototype.trim,indexOf=Array.prototype.indexOf,class2type={};jQuery.fn=jQuery.prototype={constructor:jQuery,init:function(selector,context,rootjQuery){var match,elem,ret,doc;if(!selector){return this;} +if(selector.nodeType){this.context=this[0]=selector;this.length=1;return this;} +if(selector==="body"&&!context&&document.body){this.context=document;this[0]=document.body;this.selector=selector;this.length=1;return this;} +if(typeof selector==="string"){if(selector.charAt(0)==="<"&&selector.charAt(selector.length-1)===">"&&selector.length>=3){match=[null,selector,null];}else{match=quickExpr.exec(selector);} +if(match&&(match[1]||!context)){if(match[1]){context=context instanceof jQuery?context[0]:context;doc=(context?context.ownerDocument||context:document);ret=rsingleTag.exec(selector);if(ret){if(jQuery.isPlainObject(context)){selector=[document.createElement(ret[1])];jQuery.fn.attr.call(selector,context,true);}else{selector=[doc.createElement(ret[1])];}}else{ret=jQuery.buildFragment([match[1]],[doc]);selector=(ret.cacheable?jQuery.clone(ret.fragment):ret.fragment).childNodes;} +return jQuery.merge(this,selector);}else{elem=document.getElementById(match[2]);if(elem&&elem.parentNode){if(elem.id!==match[2]){return rootjQuery.find(selector);} +this.length=1;this[0]=elem;} +this.context=document;this.selector=selector;return this;}}else if(!context||context.jquery){return(context||rootjQuery).find(selector);}else{return this.constructor(context).find(selector);}}else if(jQuery.isFunction(selector)){return rootjQuery.ready(selector);} +if(selector.selector!==undefined){this.selector=selector.selector;this.context=selector.context;} +return jQuery.makeArray(selector,this);},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length;},toArray:function(){return slice.call(this,0);},get:function(num){return num==null?this.toArray():(num<0?this[this.length+num]:this[num]);},pushStack:function(elems,name,selector){var ret=this.constructor();if(jQuery.isArray(elems)){push.apply(ret,elems);}else{jQuery.merge(ret,elems);} +ret.prevObject=this;ret.context=this.context;if(name==="find"){ret.selector=this.selector+(this.selector?" ":"")+selector;}else if(name){ret.selector=this.selector+"."+name+"("+selector+")";} +return ret;},each:function(callback,args){return jQuery.each(this,callback,args);},ready:function(fn){jQuery.bindReady();readyList.add(fn);return this;},eq:function(i){i=+i;return i===-1?this.slice(i):this.slice(i,i+1);},first:function(){return this.eq(0);},last:function(){return this.eq(-1);},slice:function(){return this.pushStack(slice.apply(this,arguments),"slice",slice.call(arguments).join(","));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},end:function(){return this.prevObject||this.constructor(null);},push:push,sort:[].sort,splice:[].splice};jQuery.fn.init.prototype=jQuery.fn;jQuery.extend=jQuery.fn.extend=function(){var options,name,src,copy,copyIsArray,clone,target=arguments[0]||{},i=1,length=arguments.length,deep=false;if(typeof target==="boolean"){deep=target;target=arguments[1]||{};i=2;} +if(typeof target!=="object"&&!jQuery.isFunction(target)){target={};} +if(length===i){target=this;--i;} +for(;i0){return;} +readyList.fireWith(document,[jQuery]);if(jQuery.fn.trigger){jQuery(document).trigger("ready").off("ready");}}},bindReady:function(){if(readyList){return;} +readyList=jQuery.Callbacks("once memory");if(document.readyState==="complete"){return setTimeout(jQuery.ready,1);} +if(document.addEventListener){document.addEventListener("DOMContentLoaded",DOMContentLoaded,false);window.addEventListener("load",jQuery.ready,false);}else if(document.attachEvent){document.attachEvent("onreadystatechange",DOMContentLoaded);window.attachEvent("onload",jQuery.ready);var toplevel=false;try{toplevel=window.frameElement==null;}catch(e){} +if(document.documentElement.doScroll&&toplevel){doScrollCheck();}}},isFunction:function(obj){return jQuery.type(obj)==="function";},isArray:Array.isArray||function(obj){return jQuery.type(obj)==="array";},isWindow:function(obj){return obj!=null&&obj==obj.window;},isNumeric:function(obj){return!isNaN(parseFloat(obj))&&isFinite(obj);},type:function(obj){return obj==null?String(obj):class2type[toString.call(obj)]||"object";},isPlainObject:function(obj){if(!obj||jQuery.type(obj)!=="object"||obj.nodeType||jQuery.isWindow(obj)){return false;} +try{if(obj.constructor&&!hasOwn.call(obj,"constructor")&&!hasOwn.call(obj.constructor.prototype,"isPrototypeOf")){return false;}}catch(e){return false;} +var key;for(key in obj){} +return key===undefined||hasOwn.call(obj,key);},isEmptyObject:function(obj){for(var name in obj){return false;} +return true;},error:function(msg){throw new Error(msg);},parseJSON:function(data){if(typeof data!=="string"||!data){return null;} +data=jQuery.trim(data);if(window.JSON&&window.JSON.parse){return window.JSON.parse(data);} +if(rvalidchars.test(data.replace(rvalidescape,"@").replace(rvalidtokens,"]").replace(rvalidbraces,""))){return(new Function("return "+data))();} +jQuery.error("Invalid JSON: "+data);},parseXML:function(data){if(typeof data!=="string"||!data){return null;} +var xml,tmp;try{if(window.DOMParser){tmp=new DOMParser();xml=tmp.parseFromString(data,"text/xml");}else{xml=new ActiveXObject("Microsoft.XMLDOM");xml.async="false";xml.loadXML(data);}}catch(e){xml=undefined;} +if(!xml||!xml.documentElement||xml.getElementsByTagName("parsererror").length){jQuery.error("Invalid XML: "+data);} +return xml;},noop:function(){},globalEval:function(data){if(data&&rnotwhite.test(data)){(window.execScript||function(data){window["eval"].call(window,data);})(data);}},camelCase:function(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase);},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()===name.toUpperCase();},each:function(object,callback,args){var name,i=0,length=object.length,isObj=length===undefined||jQuery.isFunction(object);if(args){if(isObj){for(name in object){if(callback.apply(object[name],args)===false){break;}}}else{for(;i0&&elems[0]&&elems[length-1])||length===0||jQuery.isArray(elems));if(isArray){for(;i1?sliceDeferred.call(arguments,0):value;if(!(--count)){deferred.resolveWith(deferred,args);}};} +function progressFunc(i){return function(value){pValues[i]=arguments.length>1?sliceDeferred.call(arguments,0):value;deferred.notifyWith(promise,pValues);};} +if(length>1){for(;i
a";all=div.getElementsByTagName("*");a=div.getElementsByTagName("a")[0];if(!all||!all.length||!a){return{};} +select=document.createElement("select");opt=select.appendChild(document.createElement("option"));input=div.getElementsByTagName("input")[0];support={leadingWhitespace:(div.firstChild.nodeType===3),tbody:!div.getElementsByTagName("tbody").length,htmlSerialize:!!div.getElementsByTagName("link").length,style:/top/.test(a.getAttribute("style")),hrefNormalized:(a.getAttribute("href")==="/a"),opacity:/^0.55/.test(a.style.opacity),cssFloat:!!a.style.cssFloat,checkOn:(input.value==="on"),optSelected:opt.selected,getSetAttribute:div.className!=="t",enctype:!!document.createElement("form").enctype,html5Clone:document.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true,pixelMargin:true};jQuery.boxModel=support.boxModel=(document.compatMode==="CSS1Compat");input.checked=true;support.noCloneChecked=input.cloneNode(true).checked;select.disabled=true;support.optDisabled=!opt.disabled;try{delete div.test;}catch(e){support.deleteExpando=false;} +if(!div.addEventListener&&div.attachEvent&&div.fireEvent){div.attachEvent("onclick",function(){support.noCloneEvent=false;});div.cloneNode(true).fireEvent("onclick");} +input=document.createElement("input");input.value="t";input.setAttribute("type","radio");support.radioValue=input.value==="t";input.setAttribute("checked","checked");input.setAttribute("name","t");div.appendChild(input);fragment=document.createDocumentFragment();fragment.appendChild(div.lastChild);support.checkClone=fragment.cloneNode(true).cloneNode(true).lastChild.checked;support.appendChecked=input.checked;fragment.removeChild(input);fragment.appendChild(div);if(div.attachEvent){for(i in{submit:1,change:1,focusin:1}){eventName="on"+i;isSupported=(eventName in div);if(!isSupported){div.setAttribute(eventName,"return;");isSupported=(typeof div[eventName]==="function");} +support[i+"Bubbles"]=isSupported;}} +fragment.removeChild(div);fragment=select=opt=div=input=null;jQuery(function(){var container,outer,inner,table,td,offsetSupport,marginDiv,conMarginTop,style,html,positionTopLeftWidthHeight,paddingMarginBorderVisibility,paddingMarginBorder,body=document.getElementsByTagName("body")[0];if(!body){return;} +conMarginTop=1;paddingMarginBorder="padding:0;margin:0;border:";positionTopLeftWidthHeight="position:absolute;top:0;left:0;width:1px;height:1px;";paddingMarginBorderVisibility=paddingMarginBorder+"0;visibility:hidden;";style="style='"+positionTopLeftWidthHeight+paddingMarginBorder+"5px solid #000;";html="
"+""+"
";container=document.createElement("div");container.style.cssText=paddingMarginBorderVisibility+"width:0;height:0;position:static;top:0;margin-top:"+conMarginTop+"px";body.insertBefore(container,body.firstChild);div=document.createElement("div");container.appendChild(div);div.innerHTML="
t
";tds=div.getElementsByTagName("td");isSupported=(tds[0].offsetHeight===0);tds[0].style.display="";tds[1].style.display="none";support.reliableHiddenOffsets=isSupported&&(tds[0].offsetHeight===0);if(window.getComputedStyle){div.innerHTML="";marginDiv=document.createElement("div");marginDiv.style.width="0";marginDiv.style.marginRight="0";div.style.width="2px";div.appendChild(marginDiv);support.reliableMarginRight=(parseInt((window.getComputedStyle(marginDiv,null)||{marginRight:0}).marginRight,10)||0)===0;} +if(typeof div.style.zoom!=="undefined"){div.innerHTML="";div.style.width=div.style.padding="1px";div.style.border=0;div.style.overflow="hidden";div.style.display="inline";div.style.zoom=1;support.inlineBlockNeedsLayout=(div.offsetWidth===3);div.style.display="block";div.style.overflow="visible";div.innerHTML="
";support.shrinkWrapBlocks=(div.offsetWidth!==3);} +div.style.cssText=positionTopLeftWidthHeight+paddingMarginBorderVisibility;div.innerHTML=html;outer=div.firstChild;inner=outer.firstChild;td=outer.nextSibling.firstChild.firstChild;offsetSupport={doesNotAddBorder:(inner.offsetTop!==5),doesAddBorderForTableAndCells:(td.offsetTop===5)};inner.style.position="fixed";inner.style.top="20px";offsetSupport.fixedPosition=(inner.offsetTop===20||inner.offsetTop===15);inner.style.position=inner.style.top="";outer.style.overflow="hidden";outer.style.position="relative";offsetSupport.subtractsBorderForOverflowNotVisible=(inner.offsetTop===-5);offsetSupport.doesNotIncludeMarginInBodyOffset=(body.offsetTop!==conMarginTop);if(window.getComputedStyle){div.style.marginTop="1%";support.pixelMargin=(window.getComputedStyle(div,null)||{marginTop:0}).marginTop!=="1%";} +if(typeof container.style.zoom!=="undefined"){container.style.zoom=1;} +body.removeChild(container);marginDiv=div=container=null;jQuery.extend(support,offsetSupport);});return support;})();var rbrace=/^(?:\{.*\}|\[.*\])$/,rmultiDash=/([A-Z])/g;jQuery.extend({cache:{},uuid:0,expando:"jQuery"+(jQuery.fn.jquery+Math.random()).replace(/\D/g,""),noData:{"embed":true,"object":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000","applet":true},hasData:function(elem){elem=elem.nodeType?jQuery.cache[elem[jQuery.expando]]:elem[jQuery.expando];return!!elem&&!isEmptyDataObject(elem);},data:function(elem,name,data,pvt){if(!jQuery.acceptData(elem)){return;} +var privateCache,thisCache,ret,internalKey=jQuery.expando,getByName=typeof name==="string",isNode=elem.nodeType,cache=isNode?jQuery.cache:elem,id=isNode?elem[internalKey]:elem[internalKey]&&internalKey,isEvents=name==="events";if((!id||!cache[id]||(!isEvents&&!pvt&&!cache[id].data))&&getByName&&data===undefined){return;} +if(!id){if(isNode){elem[internalKey]=id=++jQuery.uuid;}else{id=internalKey;}} +if(!cache[id]){cache[id]={};if(!isNode){cache[id].toJSON=jQuery.noop;}} +if(typeof name==="object"||typeof name==="function"){if(pvt){cache[id]=jQuery.extend(cache[id],name);}else{cache[id].data=jQuery.extend(cache[id].data,name);}} +privateCache=thisCache=cache[id];if(!pvt){if(!thisCache.data){thisCache.data={};} +thisCache=thisCache.data;} +if(data!==undefined){thisCache[jQuery.camelCase(name)]=data;} +if(isEvents&&!thisCache[name]){return privateCache.events;} +if(getByName){ret=thisCache[name];if(ret==null){ret=thisCache[jQuery.camelCase(name)];}}else{ret=thisCache;} +return ret;},removeData:function(elem,name,pvt){if(!jQuery.acceptData(elem)){return;} +var thisCache,i,l,internalKey=jQuery.expando,isNode=elem.nodeType,cache=isNode?jQuery.cache:elem,id=isNode?elem[internalKey]:internalKey;if(!cache[id]){return;} +if(name){thisCache=pvt?cache[id]:cache[id].data;if(thisCache){if(!jQuery.isArray(name)){if(name in thisCache){name=[name];}else{name=jQuery.camelCase(name);if(name in thisCache){name=[name];}else{name=name.split(" ");}}} +for(i=0,l=name.length;i1,null,false);},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});}});function dataAttr(elem,key,data){if(data===undefined&&elem.nodeType===1){var name="data-"+key.replace(rmultiDash,"-$1").toLowerCase();data=elem.getAttribute(name);if(typeof data==="string"){try{data=data==="true"?true:data==="false"?false:data==="null"?null:jQuery.isNumeric(data)?+data:rbrace.test(data)?jQuery.parseJSON(data):data;}catch(e){} +jQuery.data(elem,key,data);}else{data=undefined;}} +return data;} +function isEmptyDataObject(obj){for(var name in obj){if(name==="data"&&jQuery.isEmptyObject(obj[name])){continue;} +if(name!=="toJSON"){return false;}} +return true;} +function handleQueueMarkDefer(elem,type,src){var deferDataKey=type+"defer",queueDataKey=type+"queue",markDataKey=type+"mark",defer=jQuery._data(elem,deferDataKey);if(defer&&(src==="queue"||!jQuery._data(elem,queueDataKey))&&(src==="mark"||!jQuery._data(elem,markDataKey))){setTimeout(function(){if(!jQuery._data(elem,queueDataKey)&&!jQuery._data(elem,markDataKey)){jQuery.removeData(elem,deferDataKey,true);defer.fire();}},0);}} +jQuery.extend({_mark:function(elem,type){if(elem){type=(type||"fx")+"mark";jQuery._data(elem,type,(jQuery._data(elem,type)||0)+1);}},_unmark:function(force,elem,type){if(force!==true){type=elem;elem=force;force=false;} +if(elem){type=type||"fx";var key=type+"mark",count=force?0:((jQuery._data(elem,key)||1)-1);if(count){jQuery._data(elem,key,count);}else{jQuery.removeData(elem,key,true);handleQueueMarkDefer(elem,type,"mark");}}},queue:function(elem,type,data){var q;if(elem){type=(type||"fx")+"queue";q=jQuery._data(elem,type);if(data){if(!q||jQuery.isArray(data)){q=jQuery._data(elem,type,jQuery.makeArray(data));}else{q.push(data);}} +return q||[];}},dequeue:function(elem,type){type=type||"fx";var queue=jQuery.queue(elem,type),fn=queue.shift(),hooks={};if(fn==="inprogress"){fn=queue.shift();} +if(fn){if(type==="fx"){queue.unshift("inprogress");} +jQuery._data(elem,type+".run",hooks);fn.call(elem,function(){jQuery.dequeue(elem,type);},hooks);} +if(!queue.length){jQuery.removeData(elem,type+"queue "+type+".run",true);handleQueueMarkDefer(elem,type,"queue");}}});jQuery.fn.extend({queue:function(type,data){var setter=2;if(typeof type!=="string"){data=type;type="fx";setter--;} +if(arguments.length1);},removeAttr:function(name){return this.each(function(){jQuery.removeAttr(this,name);});},prop:function(name,value){return jQuery.access(this,jQuery.prop,name,value,arguments.length>1);},removeProp:function(name){name=jQuery.propFix[name]||name;return this.each(function(){try{this[name]=undefined;delete this[name];}catch(e){}});},addClass:function(value){var classNames,i,l,elem,setClass,c,cl;if(jQuery.isFunction(value)){return this.each(function(j){jQuery(this).addClass(value.call(this,j,this.className));});} +if(value&&typeof value==="string"){classNames=value.split(rspace);for(i=0,l=this.length;i-1){return true;}} +return false;},val:function(value){var hooks,ret,isFunction,elem=this[0];if(!arguments.length){if(elem){hooks=jQuery.valHooks[elem.type]||jQuery.valHooks[elem.nodeName.toLowerCase()];if(hooks&&"get"in hooks&&(ret=hooks.get(elem,"value"))!==undefined){return ret;} +ret=elem.value;return typeof ret==="string"?ret.replace(rreturn,""):ret==null?"":ret;} +return;} +isFunction=jQuery.isFunction(value);return this.each(function(i){var self=jQuery(this),val;if(this.nodeType!==1){return;} +if(isFunction){val=value.call(this,i,self.val());}else{val=value;} +if(val==null){val="";}else if(typeof val==="number"){val+="";}else if(jQuery.isArray(val)){val=jQuery.map(val,function(value){return value==null?"":value+"";});} +hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()];if(!hooks||!("set"in hooks)||hooks.set(this,val,"value")===undefined){this.value=val;}});}});jQuery.extend({valHooks:{option:{get:function(elem){var val=elem.attributes.value;return!val||val.specified?elem.value:elem.text;}},select:{get:function(elem){var value,i,max,option,index=elem.selectedIndex,values=[],options=elem.options,one=elem.type==="select-one";if(index<0){return null;} +i=one?index:0;max=one?index+1:options.length;for(;i=0;});if(!values.length){elem.selectedIndex=-1;} +return values;}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(elem,name,value,pass){var ret,hooks,notxml,nType=elem.nodeType;if(!elem||nType===3||nType===8||nType===2){return;} +if(pass&&name in jQuery.attrFn){return jQuery(elem)[name](value);} +if(typeof elem.getAttribute==="undefined"){return jQuery.prop(elem,name,value);} +notxml=nType!==1||!jQuery.isXMLDoc(elem);if(notxml){name=name.toLowerCase();hooks=jQuery.attrHooks[name]||(rboolean.test(name)?boolHook:nodeHook);} +if(value!==undefined){if(value===null){jQuery.removeAttr(elem,name);return;}else if(hooks&&"set"in hooks&¬xml&&(ret=hooks.set(elem,value,name))!==undefined){return ret;}else{elem.setAttribute(name,""+value);return value;}}else if(hooks&&"get"in hooks&¬xml&&(ret=hooks.get(elem,name))!==null){return ret;}else{ret=elem.getAttribute(name);return ret===null?undefined:ret;}},removeAttr:function(elem,value){var propName,attrNames,name,l,isBool,i=0;if(value&&elem.nodeType===1){attrNames=value.toLowerCase().split(rspace);l=attrNames.length;for(;i=0);}}});});var rformElems=/^(?:textarea|input|select)$/i,rtypenamespace=/^([^\.]*)?(?:\.(.+))?$/,rhoverHack=/(?:^|\s)hover(\.\S+)?\b/,rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|contextmenu)|click/,rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,rquickIs=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,quickParse=function(selector){var quick=rquickIs.exec(selector);if(quick){quick[1]=(quick[1]||"").toLowerCase();quick[3]=quick[3]&&new RegExp("(?:^|\\s)"+quick[3]+"(?:\\s|$)");} +return quick;},quickIs=function(elem,m){var attrs=elem.attributes||{};return((!m[1]||elem.nodeName.toLowerCase()===m[1])&&(!m[2]||(attrs.id||{}).value===m[2])&&(!m[3]||m[3].test((attrs["class"]||{}).value)));},hoverHack=function(events){return jQuery.event.special.hover?events:events.replace(rhoverHack,"mouseenter$1 mouseleave$1");};jQuery.event={add:function(elem,types,handler,data,selector){var elemData,eventHandle,events,t,tns,type,namespaces,handleObj,handleObjIn,quick,handlers,special;if(elem.nodeType===3||elem.nodeType===8||!types||!handler||!(elemData=jQuery._data(elem))){return;} +if(handler.handler){handleObjIn=handler;handler=handleObjIn.handler;selector=handleObjIn.selector;} +if(!handler.guid){handler.guid=jQuery.guid++;} +events=elemData.events;if(!events){elemData.events=events={};} +eventHandle=elemData.handle;if(!eventHandle){elemData.handle=eventHandle=function(e){return typeof jQuery!=="undefined"&&(!e||jQuery.event.triggered!==e.type)?jQuery.event.dispatch.apply(eventHandle.elem,arguments):undefined;};eventHandle.elem=elem;} +types=jQuery.trim(hoverHack(types)).split(" ");for(t=0;t=0){type=type.slice(0,-1);exclusive=true;} +if(type.indexOf(".")>=0){namespaces=type.split(".");type=namespaces.shift();namespaces.sort();} +if((!elem||jQuery.event.customEvent[type])&&!jQuery.event.global[type]){return;} +event=typeof event==="object"?event[jQuery.expando]?event:new jQuery.Event(type,event):new jQuery.Event(type);event.type=type;event.isTrigger=true;event.exclusive=exclusive;event.namespace=namespaces.join(".");event.namespace_re=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;ontype=type.indexOf(":")<0?"on"+type:"";if(!elem){cache=jQuery.cache;for(i in cache){if(cache[i].events&&cache[i].events[type]){jQuery.event.trigger(event,data,cache[i].handle.elem,true);}} +return;} +event.result=undefined;if(!event.target){event.target=elem;} +data=data!=null?jQuery.makeArray(data):[];data.unshift(event);special=jQuery.event.special[type]||{};if(special.trigger&&special.trigger.apply(elem,data)===false){return;} +eventPath=[[elem,special.bindType||type]];if(!onlyHandlers&&!special.noBubble&&!jQuery.isWindow(elem)){bubbleType=special.delegateType||type;cur=rfocusMorph.test(bubbleType+type)?elem:elem.parentNode;old=null;for(;cur;cur=cur.parentNode){eventPath.push([cur,bubbleType]);old=cur;} +if(old&&old===elem.ownerDocument){eventPath.push([old.defaultView||old.parentWindow||window,bubbleType]);}} +for(i=0;idelegateCount){handlerQueue.push({elem:this,matches:handlers.slice(delegateCount)});} +for(i=0;i0?this.on(name,null,data,fn):this.trigger(name);};if(jQuery.attrFn){jQuery.attrFn[name]=true;} +if(rkeyEvent.test(name)){jQuery.event.fixHooks[name]=jQuery.event.keyHooks;} +if(rmouseEvent.test(name)){jQuery.event.fixHooks[name]=jQuery.event.mouseHooks;}});(function(){var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,expando="sizcache"+(Math.random()+'').replace('.',''),done=0,toString=Object.prototype.toString,hasDuplicate=false,baseHasDuplicate=true,rBackslash=/\\/g,rReturn=/\r\n/g,rNonWord=/\W/;[0,0].sort(function(){baseHasDuplicate=false;return 0;});var Sizzle=function(selector,context,results,seed){results=results||[];context=context||document;var origContext=context;if(context.nodeType!==1&&context.nodeType!==9){return[];} +if(!selector||typeof selector!=="string"){return results;} +var m,set,checkSet,extra,ret,cur,pop,i,prune=true,contextXML=Sizzle.isXML(context),parts=[],soFar=selector;do{chunker.exec("");m=chunker.exec(soFar);if(m){soFar=m[3];parts.push(m[1]);if(m[2]){extra=m[3];break;}}}while(m);if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context,seed);}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);while(parts.length){selector=parts.shift();if(Expr.relative[selector]){selector+=parts.shift();} +set=posProcess(selector,set,seed);}}}else{if(!seed&&parts.length>1&&context.nodeType===9&&!contextXML&&Expr.match.ID.test(parts[0])&&!Expr.match.ID.test(parts[parts.length-1])){ret=Sizzle.find(parts.shift(),context,contextXML);context=ret.expr?Sizzle.filter(ret.expr,ret.set)[0]:ret.set[0];} +if(context){ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&(parts[0]==="~"||parts[0]==="+")&&context.parentNode?context.parentNode:context,contextXML);set=ret.expr?Sizzle.filter(ret.expr,ret.set):ret.set;if(parts.length>0){checkSet=makeArray(set);}else{prune=false;} +while(parts.length){cur=parts.pop();pop=cur;if(!Expr.relative[cur]){cur="";}else{pop=parts.pop();} +if(pop==null){pop=context;} +Expr.relative[cur](checkSet,pop,contextXML);}}else{checkSet=parts=[];}} +if(!checkSet){checkSet=set;} +if(!checkSet){Sizzle.error(cur||selector);} +if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet);}else if(context&&context.nodeType===1){for(i=0;checkSet[i]!=null;i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&Sizzle.contains(context,checkSet[i]))){results.push(set[i]);}}}else{for(i=0;checkSet[i]!=null;i++){if(checkSet[i]&&checkSet[i].nodeType===1){results.push(set[i]);}}}}else{makeArray(checkSet,results);} +if(extra){Sizzle(extra,origContext,results,seed);Sizzle.uniqueSort(results);} +return results;};Sizzle.uniqueSort=function(results){if(sortOrder){hasDuplicate=baseHasDuplicate;results.sort(sortOrder);if(hasDuplicate){for(var i=1;i0;};Sizzle.find=function(expr,context,isXML){var set,i,len,match,type,left;if(!expr){return[];} +for(i=0,len=Expr.order.length;i":function(checkSet,part){var elem,isPartStr=typeof part==="string",i=0,l=checkSet.length;if(isPartStr&&!rNonWord.test(part)){part=part.toLowerCase();for(;i=0)){if(!inplace){result.push(elem);}}else if(inplace){curLoop[i]=false;}}} +return false;},ID:function(match){return match[1].replace(rBackslash,"");},TAG:function(match,curLoop){return match[1].replace(rBackslash,"").toLowerCase();},CHILD:function(match){if(match[1]==="nth"){if(!match[2]){Sizzle.error(match[0]);} +match[2]=match[2].replace(/^\+|\s*/g,'');var test=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(match[2]==="even"&&"2n"||match[2]==="odd"&&"2n+1"||!/\D/.test(match[2])&&"0n+"+match[2]||match[2]);match[2]=(test[1]+(test[2]||1))-0;match[3]=test[3]-0;} +else if(match[2]){Sizzle.error(match[0]);} +match[0]=done++;return match;},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1]=match[1].replace(rBackslash,"");if(!isXML&&Expr.attrMap[name]){match[1]=Expr.attrMap[name];} +match[4]=(match[4]||match[5]||"").replace(rBackslash,"");if(match[2]==="~="){match[4]=" "+match[4]+" ";} +return match;},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if((chunker.exec(match[3])||"").length>1||/^\w/.test(match[3])){match[3]=Sizzle(match[3],null,null,curLoop);}else{var ret=Sizzle.filter(match[3],curLoop,inplace,true^not);if(!inplace){result.push.apply(result,ret);} +return false;}}else if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0])){return true;} +return match;},POS:function(match){match.unshift(true);return match;}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden";},disabled:function(elem){return elem.disabled===true;},checked:function(elem){return elem.checked===true;},selected:function(elem){if(elem.parentNode){elem.parentNode.selectedIndex;} +return elem.selected===true;},parent:function(elem){return!!elem.firstChild;},empty:function(elem){return!elem.firstChild;},has:function(elem,i,match){return!!Sizzle(match[3],elem).length;},header:function(elem){return(/h\d/i).test(elem.nodeName);},text:function(elem){var attr=elem.getAttribute("type"),type=elem.type;return elem.nodeName.toLowerCase()==="input"&&"text"===type&&(attr===type||attr===null);},radio:function(elem){return elem.nodeName.toLowerCase()==="input"&&"radio"===elem.type;},checkbox:function(elem){return elem.nodeName.toLowerCase()==="input"&&"checkbox"===elem.type;},file:function(elem){return elem.nodeName.toLowerCase()==="input"&&"file"===elem.type;},password:function(elem){return elem.nodeName.toLowerCase()==="input"&&"password"===elem.type;},submit:function(elem){var name=elem.nodeName.toLowerCase();return(name==="input"||name==="button")&&"submit"===elem.type;},image:function(elem){return elem.nodeName.toLowerCase()==="input"&&"image"===elem.type;},reset:function(elem){var name=elem.nodeName.toLowerCase();return(name==="input"||name==="button")&&"reset"===elem.type;},button:function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&"button"===elem.type||name==="button";},input:function(elem){return(/input|select|textarea|button/i).test(elem.nodeName);},focus:function(elem){return elem===elem.ownerDocument.activeElement;}},setFilters:{first:function(elem,i){return i===0;},last:function(elem,i,match,array){return i===array.length-1;},even:function(elem,i){return i%2===0;},odd:function(elem,i){return i%2===1;},lt:function(elem,i,match){return imatch[3]-0;},nth:function(elem,i,match){return match[3]-0===i;},eq:function(elem,i,match){return match[3]-0===i;}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];if(filter){return filter(elem,i,match,array);}else if(name==="contains"){return(elem.textContent||elem.innerText||getText([elem])||"").indexOf(match[3])>=0;}else if(name==="not"){var not=match[3];for(var j=0,l=not.length;j=0);}}},ID:function(elem,match){return elem.nodeType===1&&elem.getAttribute("id")===match;},TAG:function(elem,match){return(match==="*"&&elem.nodeType===1)||!!elem.nodeName&&elem.nodeName.toLowerCase()===match;},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1;},ATTR:function(elem,match){var name=match[1],result=Sizzle.attr?Sizzle.attr(elem,name):Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),value=result+"",type=match[2],check=match[4];return result==null?type==="!=":!type&&Sizzle.attr?result!=null:type==="="?value===check:type==="*="?value.indexOf(check)>=0:type==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:type==="!="?value!==check:type==="^="?value.indexOf(check)===0:type==="$="?value.substr(value.length-check.length)===check:type==="|="?value===check||value.substr(0,check.length+1)===check+"-":false;},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name];if(filter){return filter(elem,i,match,array);}}}};var origPOS=Expr.match.POS,fescape=function(all,num){return"\\"+(num-0+1);};for(var type in Expr.match){Expr.match[type]=new RegExp(Expr.match[type].source+(/(?![^\[]*\])(?![^\(]*\))/.source));Expr.leftMatch[type]=new RegExp(/(^(?:.|\r|\n)*?)/.source+Expr.match[type].source.replace(/\\(\d+)/g,fescape));} +Expr.match.globalPOS=origPOS;var makeArray=function(array,results){array=Array.prototype.slice.call(array,0);if(results){results.push.apply(results,array);return results;} +return array;};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType;}catch(e){makeArray=function(array,results){var i=0,ret=results||[];if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array);}else{if(typeof array.length==="number"){for(var l=array.length;i";root.insertBefore(form,root.firstChild);if(document.getElementById(id)){Expr.find.ID=function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?m.id===match[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:[];}};Expr.filter.ID=function(elem,match){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return elem.nodeType===1&&node&&node.nodeValue===match;};} +root.removeChild(form);root=form=null;})();(function(){var div=document.createElement("div");div.appendChild(document.createComment(""));if(div.getElementsByTagName("*").length>0){Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]);if(match[1]==="*"){var tmp=[];for(var i=0;results[i];i++){if(results[i].nodeType===1){tmp.push(results[i]);}} +results=tmp;} +return results;};} +div.innerHTML="";if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2);};} +div=null;})();if(document.querySelectorAll){(function(){var oldSizzle=Sizzle,div=document.createElement("div"),id="__sizzle__";div.innerHTML="

";if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return;} +Sizzle=function(query,context,extra,seed){context=context||document;if(!seed&&!Sizzle.isXML(context)){var match=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(query);if(match&&(context.nodeType===1||context.nodeType===9)){if(match[1]){return makeArray(context.getElementsByTagName(query),extra);}else if(match[2]&&Expr.find.CLASS&&context.getElementsByClassName){return makeArray(context.getElementsByClassName(match[2]),extra);}} +if(context.nodeType===9){if(query==="body"&&context.body){return makeArray([context.body],extra);}else if(match&&match[3]){var elem=context.getElementById(match[3]);if(elem&&elem.parentNode){if(elem.id===match[3]){return makeArray([elem],extra);}}else{return makeArray([],extra);}} +try{return makeArray(context.querySelectorAll(query),extra);}catch(qsaError){}}else if(context.nodeType===1&&context.nodeName.toLowerCase()!=="object"){var oldContext=context,old=context.getAttribute("id"),nid=old||id,hasParent=context.parentNode,relativeHierarchySelector=/^\s*[+~]/.test(query);if(!old){context.setAttribute("id",nid);}else{nid=nid.replace(/'/g,"\\$&");} +if(relativeHierarchySelector&&hasParent){context=context.parentNode;} +try{if(!relativeHierarchySelector||hasParent){return makeArray(context.querySelectorAll("[id='"+nid+"'] "+query),extra);}}catch(pseudoError){}finally{if(!old){oldContext.removeAttribute("id");}}}} +return oldSizzle(query,context,extra,seed);};for(var prop in oldSizzle){Sizzle[prop]=oldSizzle[prop];} +div=null;})();} +(function(){var html=document.documentElement,matches=html.matchesSelector||html.mozMatchesSelector||html.webkitMatchesSelector||html.msMatchesSelector;if(matches){var disconnectedMatch=!matches.call(document.createElement("div"),"div"),pseudoWorks=false;try{matches.call(document.documentElement,"[test!='']:sizzle");}catch(pseudoError){pseudoWorks=true;} +Sizzle.matchesSelector=function(node,expr){expr=expr.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!Sizzle.isXML(node)){try{if(pseudoWorks||!Expr.match.PSEUDO.test(expr)&&!/!=/.test(expr)){var ret=matches.call(node,expr);if(ret||!disconnectedMatch||node.document&&node.document.nodeType!==11){return ret;}}}catch(e){}} +return Sizzle(expr,null,null,[node]).length>0;};}})();(function(){var div=document.createElement("div");div.innerHTML="
";if(!div.getElementsByClassName||div.getElementsByClassName("e").length===0){return;} +div.lastChild.className="e";if(div.getElementsByClassName("e").length===1){return;} +Expr.order.splice(1,0,"CLASS");Expr.find.CLASS=function(match,context,isXML){if(typeof context.getElementsByClassName!=="undefined"&&!isXML){return context.getElementsByClassName(match[1]);}};div=null;})();function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){for(var i=0,l=checkSet.length;i0){match=elem;break;}} +elem=elem[dir];} +checkSet[i]=match;}}} +if(document.documentElement.contains){Sizzle.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):true);};}else if(document.documentElement.compareDocumentPosition){Sizzle.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16);};}else{Sizzle.contains=function(){return false;};} +Sizzle.isXML=function(elem){var documentElement=(elem?elem.ownerDocument||elem:0).documentElement;return documentElement?documentElement.nodeName!=="HTML":false;};var posProcess=function(selector,context,seed){var match,tmpSet=[],later="",root=context.nodeType?[context]:context;while((match=Expr.match.PSEUDO.exec(selector))){later+=match[0];selector=selector.replace(Expr.match.PSEUDO,"");} +selector=Expr.relative[selector]?selector+"*":selector;for(var i=0,l=root.length;i0){for(n=length;n=0:jQuery.filter(selector,this).length>0:this.filter(selector).length>0);},closest:function(selectors,context){var ret=[],i,l,cur=this[0];if(jQuery.isArray(selectors)){var level=1;while(cur&&cur.ownerDocument&&cur!==context){for(i=0;i-1:jQuery.find.matchesSelector(cur,selectors)){ret.push(cur);break;}else{cur=cur.parentNode;if(!cur||!cur.ownerDocument||cur===context||cur.nodeType===11){break;}}}} +ret=ret.length>1?jQuery.unique(ret):ret;return this.pushStack(ret,"closest",selectors);},index:function(elem){if(!elem){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1;} +if(typeof elem==="string"){return jQuery.inArray(this[0],jQuery(elem));} +return jQuery.inArray(elem.jquery?elem[0]:elem,this);},add:function(selector,context){var set=typeof selector==="string"?jQuery(selector,context):jQuery.makeArray(selector&&selector.nodeType?[selector]:selector),all=jQuery.merge(this.get(),set);return this.pushStack(isDisconnected(set[0])||isDisconnected(all[0])?all:jQuery.unique(all));},andSelf:function(){return this.add(this.prevObject);}});function isDisconnected(node){return!node||!node.parentNode||node.parentNode.nodeType===11;} +jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&parent.nodeType!==11?parent:null;},parents:function(elem){return jQuery.dir(elem,"parentNode");},parentsUntil:function(elem,i,until){return jQuery.dir(elem,"parentNode",until);},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},nextUntil:function(elem,i,until){return jQuery.dir(elem,"nextSibling",until);},prevUntil:function(elem,i,until){return jQuery.dir(elem,"previousSibling",until);},siblings:function(elem){return jQuery.sibling((elem.parentNode||{}).firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(until,selector){var ret=jQuery.map(this,fn,until);if(!runtil.test(name)){selector=until;} +if(selector&&typeof selector==="string"){ret=jQuery.filter(selector,ret);} +ret=this.length>1&&!guaranteedUnique[name]?jQuery.unique(ret):ret;if((this.length>1||rmultiselector.test(selector))&&rparentsprev.test(name)){ret=ret.reverse();} +return this.pushStack(ret,name,slice.call(arguments).join(","));};});jQuery.extend({filter:function(expr,elems,not){if(not){expr=":not("+expr+")";} +return elems.length===1?jQuery.find.matchesSelector(elems[0],expr)?[elems[0]]:[]:jQuery.find.matches(expr,elems);},dir:function(elem,dir,until){var matched=[],cur=elem[dir];while(cur&&cur.nodeType!==9&&(until===undefined||cur.nodeType!==1||!jQuery(cur).is(until))){if(cur.nodeType===1){matched.push(cur);} +cur=cur[dir];} +return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir]){if(cur.nodeType===1&&++num===result){break;}} +return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType===1&&n!==elem){r.push(n);}} +return r;}});function winnow(elements,qualifier,keep){qualifier=qualifier||0;if(jQuery.isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){var retVal=!!qualifier.call(elem,i,elem);return retVal===keep;});}else if(qualifier.nodeType){return jQuery.grep(elements,function(elem,i){return(elem===qualifier)===keep;});}else if(typeof qualifier==="string"){var filtered=jQuery.grep(elements,function(elem){return elem.nodeType===1;});if(isSimple.test(qualifier)){return jQuery.filter(qualifier,filtered,!keep);}else{qualifier=jQuery.filter(qualifier,filtered);}} +return jQuery.grep(elements,function(elem,i){return(jQuery.inArray(elem,qualifier)>=0)===keep;});} +function createSafeFragment(document){var list=nodeNames.split("|"),safeFrag=document.createDocumentFragment();if(safeFrag.createElement){while(list.length){safeFrag.createElement(list.pop());}} +return safeFrag;} +var nodeNames="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|"+"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",rinlinejQuery=/ jQuery\d+="(?:\d+|null)"/g,rleadingWhitespace=/^\s+/,rxhtmlTag=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,rtagName=/<([\w:]+)/,rtbody=/]","i"),rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rscriptType=/\/(java|ecma)script/i,rcleanScript=/^\s*",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},safeFragment=createSafeFragment(document);wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;if(!jQuery.support.htmlSerialize){wrapMap._default=[1,"div
","
"];} +jQuery.fn.extend({text:function(value){return jQuery.access(this,function(value){return value===undefined?jQuery.text(this):this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(value));},null,value,arguments.length);},wrapAll:function(html){if(jQuery.isFunction(html)){return this.each(function(i){jQuery(this).wrapAll(html.call(this,i));});} +if(this[0]){var wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){wrap.insertBefore(this[0]);} +wrap.map(function(){var elem=this;while(elem.firstChild&&elem.firstChild.nodeType===1){elem=elem.firstChild;} +return elem;}).append(this);} +return this;},wrapInner:function(html){if(jQuery.isFunction(html)){return this.each(function(i){jQuery(this).wrapInner(html.call(this,i));});} +return this.each(function(){var self=jQuery(this),contents=self.contents();if(contents.length){contents.wrapAll(html);}else{self.append(html);}});},wrap:function(html){var isFunction=jQuery.isFunction(html);return this.each(function(i){jQuery(this).wrapAll(isFunction?html.call(this,i):html);});},unwrap:function(){return this.parent().each(function(){if(!jQuery.nodeName(this,"body")){jQuery(this).replaceWith(this.childNodes);}}).end();},append:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType===1){this.appendChild(elem);}});},prepend:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType===1){this.insertBefore(elem,this.firstChild);}});},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this);});}else if(arguments.length){var set=jQuery.clean(arguments);set.push.apply(set,this.toArray());return this.pushStack(set,"before",arguments);}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});}else if(arguments.length){var set=this.pushStack(this,"after",arguments);set.push.apply(set,jQuery.clean(arguments));return set;}},remove:function(selector,keepData){for(var i=0,elem;(elem=this[i])!=null;i++){if(!selector||jQuery.filter(selector,[elem]).length){if(!keepData&&elem.nodeType===1){jQuery.cleanData(elem.getElementsByTagName("*"));jQuery.cleanData([elem]);} +if(elem.parentNode){elem.parentNode.removeChild(elem);}}} +return this;},empty:function(){for(var i=0,elem;(elem=this[i])!=null;i++){if(elem.nodeType===1){jQuery.cleanData(elem.getElementsByTagName("*"));} +while(elem.firstChild){elem.removeChild(elem.firstChild);}} +return this;},clone:function(dataAndEvents,deepDataAndEvents){dataAndEvents=dataAndEvents==null?false:dataAndEvents;deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents;return this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents);});},html:function(value){return jQuery.access(this,function(value){var elem=this[0]||{},i=0,l=this.length;if(value===undefined){return elem.nodeType===1?elem.innerHTML.replace(rinlinejQuery,""):null;} +if(typeof value==="string"&&!rnoInnerhtml.test(value)&&(jQuery.support.leadingWhitespace||!rleadingWhitespace.test(value))&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=value.replace(rxhtmlTag,"<$1>");try{for(;i1&&i0?this.clone(true):this).get();jQuery(insert[i])[original](elems);ret=ret.concat(elems);} +return this.pushStack(ret,name,insert.selector);}};});function getAll(elem){if(typeof elem.getElementsByTagName!=="undefined"){return elem.getElementsByTagName("*");}else if(typeof elem.querySelectorAll!=="undefined"){return elem.querySelectorAll("*");}else{return[];}} +function fixDefaultChecked(elem){if(elem.type==="checkbox"||elem.type==="radio"){elem.defaultChecked=elem.checked;}} +function findInputs(elem){var nodeName=(elem.nodeName||"").toLowerCase();if(nodeName==="input"){fixDefaultChecked(elem);}else if(nodeName!=="script"&&typeof elem.getElementsByTagName!=="undefined"){jQuery.grep(elem.getElementsByTagName("input"),fixDefaultChecked);}} +function shimCloneNode(elem){var div=document.createElement("div");safeFragment.appendChild(div);div.innerHTML=elem.outerHTML;return div.firstChild;} +jQuery.extend({clone:function(elem,dataAndEvents,deepDataAndEvents){var srcElements,destElements,i,clone=jQuery.support.html5Clone||jQuery.isXMLDoc(elem)||!rnoshimcache.test("<"+elem.nodeName+">")?elem.cloneNode(true):shimCloneNode(elem);if((!jQuery.support.noCloneEvent||!jQuery.support.noCloneChecked)&&(elem.nodeType===1||elem.nodeType===11)&&!jQuery.isXMLDoc(elem)){cloneFixAttributes(elem,clone);srcElements=getAll(elem);destElements=getAll(clone);for(i=0;srcElements[i];++i){if(destElements[i]){cloneFixAttributes(srcElements[i],destElements[i]);}}} +if(dataAndEvents){cloneCopyEvent(elem,clone);if(deepDataAndEvents){srcElements=getAll(elem);destElements=getAll(clone);for(i=0;srcElements[i];++i){cloneCopyEvent(srcElements[i],destElements[i]);}}} +srcElements=destElements=null;return clone;},clean:function(elems,context,fragment,scripts){var checkScriptType,script,j,ret=[];context=context||document;if(typeof context.createElement==="undefined"){context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;} +for(var i=0,elem;(elem=elems[i])!=null;i++){if(typeof elem==="number"){elem+="";} +if(!elem){continue;} +if(typeof elem==="string"){if(!rhtml.test(elem)){elem=context.createTextNode(elem);}else{elem=elem.replace(rxhtmlTag,"<$1>");var tag=(rtagName.exec(elem)||["",""])[1].toLowerCase(),wrap=wrapMap[tag]||wrapMap._default,depth=wrap[0],div=context.createElement("div"),safeChildNodes=safeFragment.childNodes,remove;if(context===document){safeFragment.appendChild(div);}else{createSafeFragment(context).appendChild(div);} +div.innerHTML=wrap[1]+elem+wrap[2];while(depth--){div=div.lastChild;} +if(!jQuery.support.tbody){var hasBody=rtbody.test(elem),tbody=tag==="table"&&!hasBody?div.firstChild&&div.firstChild.childNodes:wrap[1]===""&&!hasBody?div.childNodes:[];for(j=tbody.length-1;j>=0;--j){if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length){tbody[j].parentNode.removeChild(tbody[j]);}}} +if(!jQuery.support.leadingWhitespace&&rleadingWhitespace.test(elem)){div.insertBefore(context.createTextNode(rleadingWhitespace.exec(elem)[0]),div.firstChild);} +elem=div.childNodes;if(div){div.parentNode.removeChild(div);if(safeChildNodes.length>0){remove=safeChildNodes[safeChildNodes.length-1];if(remove&&remove.parentNode){remove.parentNode.removeChild(remove);}}}}} +var len;if(!jQuery.support.appendChecked){if(elem[0]&&typeof(len=elem.length)==="number"){for(j=0;j1);};jQuery.extend({cssHooks:{opacity:{get:function(elem,computed){if(computed){var ret=curCSS(elem,"opacity");return ret===""?"1":ret;}else{return elem.style.opacity;}}}},cssNumber:{"fillOpacity":true,"fontWeight":true,"lineHeight":true,"opacity":true,"orphans":true,"widows":true,"zIndex":true,"zoom":true},cssProps:{"float":jQuery.support.cssFloat?"cssFloat":"styleFloat"},style:function(elem,name,value,extra){if(!elem||elem.nodeType===3||elem.nodeType===8||!elem.style){return;} +var ret,type,origName=jQuery.camelCase(name),style=elem.style,hooks=jQuery.cssHooks[origName];name=jQuery.cssProps[origName]||origName;if(value!==undefined){type=typeof value;if(type==="string"&&(ret=rrelNum.exec(value))){value=(+(ret[1]+1)*+ret[2])+parseFloat(jQuery.css(elem,name));type="number";} +if(value==null||type==="number"&&isNaN(value)){return;} +if(type==="number"&&!jQuery.cssNumber[origName]){value+="px";} +if(!hooks||!("set"in hooks)||(value=hooks.set(elem,value))!==undefined){try{style[name]=value;}catch(e){}}}else{if(hooks&&"get"in hooks&&(ret=hooks.get(elem,false,extra))!==undefined){return ret;} +return style[name];}},css:function(elem,name,extra){var ret,hooks;name=jQuery.camelCase(name);hooks=jQuery.cssHooks[name];name=jQuery.cssProps[name]||name;if(name==="cssFloat"){name="float";} +if(hooks&&"get"in hooks&&(ret=hooks.get(elem,true,extra))!==undefined){return ret;}else if(curCSS){return curCSS(elem,name);}},swap:function(elem,options,callback){var old={},ret,name;for(name in options){old[name]=elem.style[name];elem.style[name]=options[name];} +ret=callback.call(elem);for(name in options){elem.style[name]=old[name];} +return ret;}});jQuery.curCSS=jQuery.css;if(document.defaultView&&document.defaultView.getComputedStyle){getComputedStyle=function(elem,name){var ret,defaultView,computedStyle,width,style=elem.style;name=name.replace(rupper,"-$1").toLowerCase();if((defaultView=elem.ownerDocument.defaultView)&&(computedStyle=defaultView.getComputedStyle(elem,null))){ret=computedStyle.getPropertyValue(name);if(ret===""&&!jQuery.contains(elem.ownerDocument.documentElement,elem)){ret=jQuery.style(elem,name);}} +if(!jQuery.support.pixelMargin&&computedStyle&&rmargin.test(name)&&rnumnonpx.test(ret)){width=style.width;style.width=ret;ret=computedStyle.width;style.width=width;} +return ret;};} +if(document.documentElement.currentStyle){currentStyle=function(elem,name){var left,rsLeft,uncomputed,ret=elem.currentStyle&&elem.currentStyle[name],style=elem.style;if(ret==null&&style&&(uncomputed=style[name])){ret=uncomputed;} +if(rnumnonpx.test(ret)){left=style.left;rsLeft=elem.runtimeStyle&&elem.runtimeStyle.left;if(rsLeft){elem.runtimeStyle.left=elem.currentStyle.left;} +style.left=name==="fontSize"?"1em":ret;ret=style.pixelLeft+"px";style.left=left;if(rsLeft){elem.runtimeStyle.left=rsLeft;}} +return ret===""?"auto":ret;};} +curCSS=getComputedStyle||currentStyle;function getWidthOrHeight(elem,name,extra){var val=name==="width"?elem.offsetWidth:elem.offsetHeight,i=name==="width"?1:0,len=4;if(val>0){if(extra!=="border"){for(;i=1&&jQuery.trim(filter.replace(ralpha,""))===""){style.removeAttribute("filter");if(currentStyle&&!currentStyle.filter){return;}} +style.filter=ralpha.test(filter)?filter.replace(ralpha,opacity):filter+" "+opacity;}};} +jQuery(function(){if(!jQuery.support.reliableMarginRight){jQuery.cssHooks.marginRight={get:function(elem,computed){return jQuery.swap(elem,{"display":"inline-block"},function(){if(computed){return curCSS(elem,"margin-right");}else{return elem.style.marginRight;}});}};}});if(jQuery.expr&&jQuery.expr.filters){jQuery.expr.filters.hidden=function(elem){var width=elem.offsetWidth,height=elem.offsetHeight;return(width===0&&height===0)||(!jQuery.support.reliableHiddenOffsets&&((elem.style&&elem.style.display)||jQuery.css(elem,"display"))==="none");};jQuery.expr.filters.visible=function(elem){return!jQuery.expr.filters.hidden(elem);};} +jQuery.each({margin:"",padding:"",border:"Width"},function(prefix,suffix){jQuery.cssHooks[prefix+suffix]={expand:function(value){var i,parts=typeof value==="string"?value.split(" "):[value],expanded={};for(i=0;i<4;i++){expanded[prefix+cssExpand[i]+suffix]=parts[i]||parts[i-2]||parts[0];} +return expanded;}};});var r20=/%20/g,rbracket=/\[\]$/,rCRLF=/\r?\n/g,rhash=/#.*$/,rheaders=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,rinput=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,rlocalProtocol=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,rquery=/\?/,rscript=/)<[^<]*)*<\/script>/gi,rselectTextarea=/^(?:select|textarea)/i,rspacesAjax=/\s+/,rts=/([?&])_=[^&]*/,rurl=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,_load=jQuery.fn.load,prefilters={},transports={},ajaxLocation,ajaxLocParts,allTypes=["*/"]+["*"];try{ajaxLocation=location.href;}catch(e){ajaxLocation=document.createElement("a");ajaxLocation.href="";ajaxLocation=ajaxLocation.href;} +ajaxLocParts=rurl.exec(ajaxLocation.toLowerCase())||[];function addToPrefiltersOrTransports(structure){return function(dataTypeExpression,func){if(typeof dataTypeExpression!=="string"){func=dataTypeExpression;dataTypeExpression="*";} +if(jQuery.isFunction(func)){var dataTypes=dataTypeExpression.toLowerCase().split(rspacesAjax),i=0,length=dataTypes.length,dataType,list,placeBefore;for(;i=0){var selector=url.slice(off,url.length);url=url.slice(0,off);} +var type="GET";if(params){if(jQuery.isFunction(params)){callback=params;params=undefined;}else if(typeof params==="object"){params=jQuery.param(params,jQuery.ajaxSettings.traditional);type="POST";}} +var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(jqXHR,status,responseText){responseText=jqXHR.responseText;if(jqXHR.isResolved()){jqXHR.done(function(r){responseText=r;});self.html(selector?jQuery("
").append(responseText.replace(rscript,"")).find(selector):responseText);} +if(callback){self.each(callback,[responseText,status,jqXHR]);}}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return this.elements?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||rselectTextarea.test(this.nodeName)||rinput.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:jQuery.isArray(val)?jQuery.map(val,function(val,i){return{name:elem.name,value:val.replace(rCRLF,"\r\n")};}):{name:elem.name,value:val.replace(rCRLF,"\r\n")};}).get();}});jQuery.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(i,o){jQuery.fn[o]=function(f){return this.on(o,f);};});jQuery.each(["get","post"],function(i,method){jQuery[method]=function(url,data,callback,type){if(jQuery.isFunction(data)){type=type||callback;callback=data;data=undefined;} +return jQuery.ajax({type:method,url:url,data:data,success:callback,dataType:type});};});jQuery.extend({getScript:function(url,callback){return jQuery.get(url,undefined,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},ajaxSetup:function(target,settings){if(settings){ajaxExtend(target,jQuery.ajaxSettings);}else{settings=target;target=jQuery.ajaxSettings;} +ajaxExtend(target,settings);return target;},ajaxSettings:{url:ajaxLocation,isLocal:rlocalProtocol.test(ajaxLocParts[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":allTypes},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":window.String,"text html":true,"text json":jQuery.parseJSON,"text xml":jQuery.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(url,options){if(typeof url==="object"){options=url;url=undefined;} +options=options||{};var +s=jQuery.ajaxSetup({},options),callbackContext=s.context||s,globalEventContext=callbackContext!==s&&(callbackContext.nodeType||callbackContext instanceof jQuery)?jQuery(callbackContext):jQuery.event,deferred=jQuery.Deferred(),completeDeferred=jQuery.Callbacks("once memory"),statusCode=s.statusCode||{},ifModifiedKey,requestHeaders={},requestHeadersNames={},responseHeadersString,responseHeaders,transport,timeoutTimer,parts,state=0,fireGlobals,i,jqXHR={readyState:0,setRequestHeader:function(name,value){if(!state){var lname=name.toLowerCase();name=requestHeadersNames[lname]=requestHeadersNames[lname]||name;requestHeaders[name]=value;} +return this;},getAllResponseHeaders:function(){return state===2?responseHeadersString:null;},getResponseHeader:function(key){var match;if(state===2){if(!responseHeaders){responseHeaders={};while((match=rheaders.exec(responseHeadersString))){responseHeaders[match[1].toLowerCase()]=match[2];}} +match=responseHeaders[key.toLowerCase()];} +return match===undefined?null:match;},overrideMimeType:function(type){if(!state){s.mimeType=type;} +return this;},abort:function(statusText){statusText=statusText||"abort";if(transport){transport.abort(statusText);} +done(0,statusText);return this;}};function done(status,nativeStatusText,responses,headers){if(state===2){return;} +state=2;if(timeoutTimer){clearTimeout(timeoutTimer);} +transport=undefined;responseHeadersString=headers||"";jqXHR.readyState=status>0?4:0;var isSuccess,success,error,statusText=nativeStatusText,response=responses?ajaxHandleResponses(s,jqXHR,responses):undefined,lastModified,etag;if(status>=200&&status<300||status===304){if(s.ifModified){if((lastModified=jqXHR.getResponseHeader("Last-Modified"))){jQuery.lastModified[ifModifiedKey]=lastModified;} +if((etag=jqXHR.getResponseHeader("Etag"))){jQuery.etag[ifModifiedKey]=etag;}} +if(status===304){statusText="notmodified";isSuccess=true;}else{try{success=ajaxConvert(s,response);statusText="success";isSuccess=true;}catch(e){statusText="parsererror";error=e;}}}else{error=statusText;if(!statusText||status){statusText="error";if(status<0){status=0;}}} +jqXHR.status=status;jqXHR.statusText=""+(nativeStatusText||statusText);if(isSuccess){deferred.resolveWith(callbackContext,[success,statusText,jqXHR]);}else{deferred.rejectWith(callbackContext,[jqXHR,statusText,error]);} +jqXHR.statusCode(statusCode);statusCode=undefined;if(fireGlobals){globalEventContext.trigger("ajax"+(isSuccess?"Success":"Error"),[jqXHR,s,isSuccess?success:error]);} +completeDeferred.fireWith(callbackContext,[jqXHR,statusText]);if(fireGlobals){globalEventContext.trigger("ajaxComplete",[jqXHR,s]);if(!(--jQuery.active)){jQuery.event.trigger("ajaxStop");}}} +deferred.promise(jqXHR);jqXHR.success=jqXHR.done;jqXHR.error=jqXHR.fail;jqXHR.complete=completeDeferred.add;jqXHR.statusCode=function(map){if(map){var tmp;if(state<2){for(tmp in map){statusCode[tmp]=[statusCode[tmp],map[tmp]];}}else{tmp=map[jqXHR.status];jqXHR.then(tmp,tmp);}} +return this;};s.url=((url||s.url)+"").replace(rhash,"").replace(rprotocol,ajaxLocParts[1]+"//");s.dataTypes=jQuery.trim(s.dataType||"*").toLowerCase().split(rspacesAjax);if(s.crossDomain==null){parts=rurl.exec(s.url.toLowerCase());s.crossDomain=!!(parts&&(parts[1]!=ajaxLocParts[1]||parts[2]!=ajaxLocParts[2]||(parts[3]||(parts[1]==="http:"?80:443))!=(ajaxLocParts[3]||(ajaxLocParts[1]==="http:"?80:443))));} +if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jQuery.param(s.data,s.traditional);} +inspectPrefiltersOrTransports(prefilters,s,options,jqXHR);if(state===2){return false;} +fireGlobals=s.global;s.type=s.type.toUpperCase();s.hasContent=!rnoContent.test(s.type);if(fireGlobals&&jQuery.active++===0){jQuery.event.trigger("ajaxStart");} +if(!s.hasContent){if(s.data){s.url+=(rquery.test(s.url)?"&":"?")+s.data;delete s.data;} +ifModifiedKey=s.url;if(s.cache===false){var ts=jQuery.now(),ret=s.url.replace(rts,"$1_="+ts);s.url=ret+((ret===s.url)?(rquery.test(s.url)?"&":"?")+"_="+ts:"");}} +if(s.data&&s.hasContent&&s.contentType!==false||options.contentType){jqXHR.setRequestHeader("Content-Type",s.contentType);} +if(s.ifModified){ifModifiedKey=ifModifiedKey||s.url;if(jQuery.lastModified[ifModifiedKey]){jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[ifModifiedKey]);} +if(jQuery.etag[ifModifiedKey]){jqXHR.setRequestHeader("If-None-Match",jQuery.etag[ifModifiedKey]);}} +jqXHR.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+(s.dataTypes[0]!=="*"?", "+allTypes+"; q=0.01":""):s.accepts["*"]);for(i in s.headers){jqXHR.setRequestHeader(i,s.headers[i]);} +if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===false||state===2)){jqXHR.abort();return false;} +for(i in{success:1,error:1,complete:1}){jqXHR[i](s[i]);} +transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR);if(!transport){done(-1,"No Transport");}else{jqXHR.readyState=1;if(fireGlobals){globalEventContext.trigger("ajaxSend",[jqXHR,s]);} +if(s.async&&s.timeout>0){timeoutTimer=setTimeout(function(){jqXHR.abort("timeout");},s.timeout);} +try{state=1;transport.send(requestHeaders,done);}catch(e){if(state<2){done(-1,e);}else{throw e;}}} +return jqXHR;},param:function(a,traditional){var s=[],add=function(key,value){value=jQuery.isFunction(value)?value():value;s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value);};if(traditional===undefined){traditional=jQuery.ajaxSettings.traditional;} +if(jQuery.isArray(a)||(a.jquery&&!jQuery.isPlainObject(a))){jQuery.each(a,function(){add(this.name,this.value);});}else{for(var prefix in a){buildParams(prefix,a[prefix],traditional,add);}} +return s.join("&").replace(r20,"+");}});function buildParams(prefix,obj,traditional,add){if(jQuery.isArray(obj)){jQuery.each(obj,function(i,v){if(traditional||rbracket.test(prefix)){add(prefix,v);}else{buildParams(prefix+"["+(typeof v==="object"?i:"")+"]",v,traditional,add);}});}else if(!traditional&&jQuery.type(obj)==="object"){for(var name in obj){buildParams(prefix+"["+name+"]",obj[name],traditional,add);}}else{add(prefix,obj);}} +jQuery.extend({active:0,lastModified:{},etag:{}});function ajaxHandleResponses(s,jqXHR,responses){var contents=s.contents,dataTypes=s.dataTypes,responseFields=s.responseFields,ct,type,finalDataType,firstDataType;for(type in responseFields){if(type in responses){jqXHR[responseFields[type]]=responses[type];}} +while(dataTypes[0]==="*"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader("content-type");}} +if(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}} +if(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{for(type in responses){if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){finalDataType=type;break;} +if(!firstDataType){firstDataType=type;}} +finalDataType=finalDataType||firstDataType;} +if(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);} +return responses[finalDataType];}} +function ajaxConvert(s,response){if(s.dataFilter){response=s.dataFilter(response,s.dataType);} +var dataTypes=s.dataTypes,converters={},i,key,length=dataTypes.length,tmp,current=dataTypes[0],prev,conversion,conv,conv1,conv2;for(i=1;i=options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();options.animatedProperties[this.prop]=true;for(p in options.animatedProperties){if(options.animatedProperties[p]!==true){done=false;}} +if(done){if(options.overflow!=null&&!jQuery.support.shrinkWrapBlocks){jQuery.each(["","X","Y"],function(index,value){elem.style["overflow"+value]=options.overflow[index];});} +if(options.hide){jQuery(elem).hide();} +if(options.hide||options.show){for(p in options.animatedProperties){jQuery.style(elem,p,options.orig[p]);jQuery.removeData(elem,"fxshow"+p,true);jQuery.removeData(elem,"toggle"+p,true);}} +complete=options.complete;if(complete){options.complete=false;complete.call(elem);}} +return false;}else{if(options.duration==Infinity){this.now=t;}else{n=t-this.startTime;this.state=n/options.duration;this.pos=jQuery.easing[options.animatedProperties[this.prop]](this.state,n,0,1,options.duration);this.now=this.start+((this.end-this.start)*this.pos);} +this.update();} +return true;}};jQuery.extend(jQuery.fx,{tick:function(){var timer,timers=jQuery.timers,i=0;for(;i").appendTo(body),display=elem.css("display");elem.remove();if(display==="none"||display===""){if(!iframe){iframe=document.createElement("iframe");iframe.frameBorder=iframe.width=iframe.height=0;} +body.appendChild(iframe);if(!iframeDoc||!iframe.createElement){iframeDoc=(iframe.contentWindow||iframe.contentDocument).document;iframeDoc.write((jQuery.support.boxModel?"":"")+"");iframeDoc.close();} +elem=iframeDoc.createElement(nodeName);iframeDoc.body.appendChild(elem);display=jQuery.css(elem,"display");body.removeChild(iframe);} +elemdisplay[nodeName]=display;} +return elemdisplay[nodeName];} +var getOffset,rtable=/^t(?:able|d|h)$/i,rroot=/^(?:body|html)$/i;if("getBoundingClientRect"in document.documentElement){getOffset=function(elem,doc,docElem,box){try{box=elem.getBoundingClientRect();}catch(e){} +if(!box||!jQuery.contains(docElem,elem)){return box?{top:box.top,left:box.left}:{top:0,left:0};} +var body=doc.body,win=getWindow(doc),clientTop=docElem.clientTop||body.clientTop||0,clientLeft=docElem.clientLeft||body.clientLeft||0,scrollTop=win.pageYOffset||jQuery.support.boxModel&&docElem.scrollTop||body.scrollTop,scrollLeft=win.pageXOffset||jQuery.support.boxModel&&docElem.scrollLeft||body.scrollLeft,top=box.top+scrollTop-clientTop,left=box.left+scrollLeft-clientLeft;return{top:top,left:left};};}else{getOffset=function(elem,doc,docElem){var computedStyle,offsetParent=elem.offsetParent,prevOffsetParent=elem,body=doc.body,defaultView=doc.defaultView,prevComputedStyle=defaultView?defaultView.getComputedStyle(elem,null):elem.currentStyle,top=elem.offsetTop,left=elem.offsetLeft;while((elem=elem.parentNode)&&elem!==body&&elem!==docElem){if(jQuery.support.fixedPosition&&prevComputedStyle.position==="fixed"){break;} +computedStyle=defaultView?defaultView.getComputedStyle(elem,null):elem.currentStyle;top-=elem.scrollTop;left-=elem.scrollLeft;if(elem===offsetParent){top+=elem.offsetTop;left+=elem.offsetLeft;if(jQuery.support.doesNotAddBorder&&!(jQuery.support.doesAddBorderForTableAndCells&&rtable.test(elem.nodeName))){top+=parseFloat(computedStyle.borderTopWidth)||0;left+=parseFloat(computedStyle.borderLeftWidth)||0;} +prevOffsetParent=offsetParent;offsetParent=elem.offsetParent;} +if(jQuery.support.subtractsBorderForOverflowNotVisible&&computedStyle.overflow!=="visible"){top+=parseFloat(computedStyle.borderTopWidth)||0;left+=parseFloat(computedStyle.borderLeftWidth)||0;} +prevComputedStyle=computedStyle;} +if(prevComputedStyle.position==="relative"||prevComputedStyle.position==="static"){top+=body.offsetTop;left+=body.offsetLeft;} +if(jQuery.support.fixedPosition&&prevComputedStyle.position==="fixed"){top+=Math.max(docElem.scrollTop,body.scrollTop);left+=Math.max(docElem.scrollLeft,body.scrollLeft);} +return{top:top,left:left};};} +jQuery.fn.offset=function(options){if(arguments.length){return options===undefined?this:this.each(function(i){jQuery.offset.setOffset(this,options,i);});} +var elem=this[0],doc=elem&&elem.ownerDocument;if(!doc){return null;} +if(elem===doc.body){return jQuery.offset.bodyOffset(elem);} +return getOffset(elem,doc,doc.documentElement);};jQuery.offset={bodyOffset:function(body){var top=body.offsetTop,left=body.offsetLeft;if(jQuery.support.doesNotIncludeMarginInBodyOffset){top+=parseFloat(jQuery.css(body,"marginTop"))||0;left+=parseFloat(jQuery.css(body,"marginLeft"))||0;} +return{top:top,left:left};},setOffset:function(elem,options,i){var position=jQuery.css(elem,"position");if(position==="static"){elem.style.position="relative";} +var curElem=jQuery(elem),curOffset=curElem.offset(),curCSSTop=jQuery.css(elem,"top"),curCSSLeft=jQuery.css(elem,"left"),calculatePosition=(position==="absolute"||position==="fixed")&&jQuery.inArray("auto",[curCSSTop,curCSSLeft])>-1,props={},curPosition={},curTop,curLeft;if(calculatePosition){curPosition=curElem.position();curTop=curPosition.top;curLeft=curPosition.left;}else{curTop=parseFloat(curCSSTop)||0;curLeft=parseFloat(curCSSLeft)||0;} +if(jQuery.isFunction(options)){options=options.call(elem,i,curOffset);} +if(options.top!=null){props.top=(options.top-curOffset.top)+curTop;} +if(options.left!=null){props.left=(options.left-curOffset.left)+curLeft;} +if("using"in options){options.using.call(elem,props);}else{curElem.css(props);}}};jQuery.fn.extend({position:function(){if(!this[0]){return null;} +var elem=this[0],offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=rroot.test(offsetParent[0].nodeName)?{top:0,left:0}:offsetParent.offset();offset.top-=parseFloat(jQuery.css(elem,"marginTop"))||0;offset.left-=parseFloat(jQuery.css(elem,"marginLeft"))||0;parentOffset.top+=parseFloat(jQuery.css(offsetParent[0],"borderTopWidth"))||0;parentOffset.left+=parseFloat(jQuery.css(offsetParent[0],"borderLeftWidth"))||0;return{top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};},offsetParent:function(){return this.map(function(){var offsetParent=this.offsetParent||document.body;while(offsetParent&&(!rroot.test(offsetParent.nodeName)&&jQuery.css(offsetParent,"position")==="static")){offsetParent=offsetParent.offsetParent;} +return offsetParent;});}});jQuery.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(method,prop){var top=/Y/.test(prop);jQuery.fn[method]=function(val){return jQuery.access(this,function(elem,method,val){var win=getWindow(elem);if(val===undefined){return win?(prop in win)?win[prop]:jQuery.support.boxModel&&win.document.documentElement[method]||win.document.body[method]:elem[method];} +if(win){win.scrollTo(!top?val:jQuery(win).scrollLeft(),top?val:jQuery(win).scrollTop());}else{elem[method]=val;}},method,val,arguments.length,null);};});function getWindow(elem){return jQuery.isWindow(elem)?elem:elem.nodeType===9?elem.defaultView||elem.parentWindow:false;} +jQuery.each({Height:"height",Width:"width"},function(name,type){var clientProp="client"+name,scrollProp="scroll"+name,offsetProp="offset"+name;jQuery.fn["inner"+name]=function(){var elem=this[0];return elem?elem.style?parseFloat(jQuery.css(elem,type,"padding")):this[type]():null;};jQuery.fn["outer"+name]=function(margin){var elem=this[0];return elem?elem.style?parseFloat(jQuery.css(elem,type,margin?"margin":"border")):this[type]():null;};jQuery.fn[type]=function(value){return jQuery.access(this,function(elem,type,value){var doc,docElemProp,orig,ret;if(jQuery.isWindow(elem)){doc=elem.document;docElemProp=doc.documentElement[clientProp];return jQuery.support.boxModel&&docElemProp||doc.body&&doc.body[clientProp]||docElemProp;} +if(elem.nodeType===9){doc=elem.documentElement;if(doc[clientProp]>=doc[scrollProp]){return doc[clientProp];} +return Math.max(elem.body[scrollProp],doc[scrollProp],elem.body[offsetProp],doc[offsetProp]);} +if(value===undefined){orig=jQuery.css(elem,type);ret=parseFloat(orig);return jQuery.isNumeric(ret)?ret:orig;} +jQuery(elem).css(type,value);},type,value,arguments.length,null);};});window.jQuery=window.$=jQuery;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return jQuery;});}})(window);(function(window,document,undefined){'use strict';function minErr(module){return function(){var code=arguments[0],prefix='['+(module?module+':':'')+code+'] ',template=arguments[1],templateArgs=arguments,stringify=function(obj){if(typeof obj==='function'){return obj.toString().replace(/ \{[\s\S]*$/,'');}else if(typeof obj==='undefined'){return'undefined';}else if(typeof obj!=='string'){return JSON.stringify(obj);} +return obj;},message,i;message=prefix+template.replace(/\{\d+\}/g,function(match){var index=+match.slice(1,-1),arg;if(index+20&&(length-1)in obj;} +function forEach(obj,iterator,context){var key;if(obj){if(isFunction(obj)){for(key in obj){if(key!='prototype'&&key!='length'&&key!='name'&&obj.hasOwnProperty(key)){iterator.call(context,obj[key],key);}}}else if(obj.forEach&&obj.forEach!==forEach){obj.forEach(iterator,context);}else if(isArrayLike(obj)){for(key=0;key=0) +array.splice(index,1);return value;} +function isLeafNode(node){if(node){switch(node.nodeName){case"OPTION":case"PRE":case"TITLE":return true;}} +return false;} +function copy(source,destination){if(isWindow(source)||isScope(source)){throw ngMinErr('cpws',"Can't copy! Making copies of Window or Scope instances is not supported.");} +if(!destination){destination=source;if(source){if(isArray(source)){destination=copy(source,[]);}else if(isDate(source)){destination=new Date(source.getTime());}else if(isRegExp(source)){destination=new RegExp(source.source);}else if(isObject(source)){destination=copy(source,{});}}}else{if(source===destination)throw ngMinErr('cpi',"Can't copy! Source and destination are identical.");if(isArray(source)){destination.length=0;for(var i=0;i2?sliceArgs(arguments,2):[];if(isFunction(fn)&&!(fn instanceof RegExp)){return curryArgs.length?function(){return arguments.length?fn.apply(self,curryArgs.concat(slice.call(arguments,0))):fn.apply(self,curryArgs);}:function(){return arguments.length?fn.apply(self,arguments):fn.call(self);};}else{return fn;}} +function toJsonReplacer(key,value){var val=value;if(typeof key==='string'&&key.charAt(0)==='$'){val=undefined;}else if(isWindow(value)){val='$WINDOW';}else if(value&&document===value){val='$DOCUMENT';}else if(isScope(value)){val='$SCOPE';} +return val;} +function toJson(obj,pretty){if(typeof obj==='undefined')return undefined;return JSON.stringify(obj,toJsonReplacer,pretty?' ':null);} +function fromJson(json){return isString(json)?JSON.parse(json):json;} +function toBoolean(value){if(value&&value.length!==0){var v=lowercase(""+value);value=!(v=='f'||v=='0'||v=='false'||v=='no'||v=='n'||v=='[]');}else{value=false;} +return value;} +function startingTag(element){element=jqLite(element).clone();try{element.html('');}catch(e){} +var TEXT_NODE=3;var elemHtml=jqLite('
').append(element).html();try{return element[0].nodeType===TEXT_NODE?lowercase(elemHtml):elemHtml.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(match,nodeName){return'<'+lowercase(nodeName);});}catch(e){return lowercase(elemHtml);}} +function tryDecodeURIComponent(value){try{return decodeURIComponent(value);}catch(e){}} +function parseKeyValue(keyValue){var obj={},key_value,key;forEach((keyValue||"").split('&'),function(keyValue){if(keyValue){key_value=keyValue.split('=');key=tryDecodeURIComponent(key_value[0]);if(isDefined(key)){var val=isDefined(key_value[1])?tryDecodeURIComponent(key_value[1]):true;if(!obj[key]){obj[key]=val;}else if(isArray(obj[key])){obj[key].push(val);}else{obj[key]=[obj[key],val];}}}});return obj;} +function toKeyValue(obj){var parts=[];forEach(obj,function(value,key){if(isArray(value)){forEach(value,function(arrayValue){parts.push(encodeUriQuery(key,true)+ +(arrayValue===true?'':'='+encodeUriQuery(arrayValue,true)));});}else{parts.push(encodeUriQuery(key,true)+ +(value===true?'':'='+encodeUriQuery(value,true)));}});return parts.length?parts.join('&'):'';} +function encodeUriSegment(val){return encodeUriQuery(val,true).replace(/%26/gi,'&').replace(/%3D/gi,'=').replace(/%2B/gi,'+');} +function encodeUriQuery(val,pctEncodeSpaces){return encodeURIComponent(val).replace(/%40/gi,'@').replace(/%3A/gi,':').replace(/%24/g,'$').replace(/%2C/gi,',').replace(/%20/g,(pctEncodeSpaces?'%20':'+'));} +function angularInit(element,bootstrap){var elements=[element],appElement,module,names=['ng:app','ng-app','x-ng-app','data-ng-app'],NG_APP_CLASS_REGEXP=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;function append(element){element&&elements.push(element);} +forEach(names,function(name){names[name]=true;append(document.getElementById(name));name=name.replace(':','\\:');if(element.querySelectorAll){forEach(element.querySelectorAll('.'+name),append);forEach(element.querySelectorAll('.'+name+'\\:'),append);forEach(element.querySelectorAll('['+name+']'),append);}});forEach(elements,function(element){if(!appElement){var className=' '+element.className+' ';var match=NG_APP_CLASS_REGEXP.exec(className);if(match){appElement=element;module=(match[2]||'').replace(/\s+/g,',');}else{forEach(element.attributes,function(attr){if(!appElement&&names[attr.name]){appElement=element;module=attr.value;}});}}});if(appElement){bootstrap(appElement,module?[module]:[]);}} +function bootstrap(element,modules){var doBootstrap=function(){element=jqLite(element);if(element.injector()){var tag=(element[0]===document)?'document':startingTag(element);throw ngMinErr('btstrpd',"App Already Bootstrapped with this Element '{0}'",tag);} +modules=modules||[];modules.unshift(['$provide',function($provide){$provide.value('$rootElement',element);}]);modules.unshift('ng');var injector=createInjector(modules);injector.invoke(['$rootScope','$rootElement','$compile','$injector','$animate',function(scope,element,compile,injector,animate){scope.$apply(function(){element.data('$injector',injector);compile(element)(scope);});}]);return injector;};var NG_DEFER_BOOTSTRAP=/^NG_DEFER_BOOTSTRAP!/;if(window&&!NG_DEFER_BOOTSTRAP.test(window.name)){return doBootstrap();} +window.name=window.name.replace(NG_DEFER_BOOTSTRAP,'');angular.resumeBootstrap=function(extraModules){forEach(extraModules,function(module){modules.push(module);});doBootstrap();};} +var SNAKE_CASE_REGEXP=/[A-Z]/g;function snake_case(name,separator){separator=separator||'_';return name.replace(SNAKE_CASE_REGEXP,function(letter,pos){return(pos?separator:'')+letter.toLowerCase();});} +function bindJQuery(){jQuery=window.jQuery;if(jQuery){jqLite=jQuery;extend(jQuery.fn,{scope:JQLitePrototype.scope,isolateScope:JQLitePrototype.isolateScope,controller:JQLitePrototype.controller,injector:JQLitePrototype.injector,inheritedData:JQLitePrototype.inheritedData});jqLitePatchJQueryRemove('remove',true,true,false);jqLitePatchJQueryRemove('empty',false,false,false);jqLitePatchJQueryRemove('html',false,false,true);}else{jqLite=JQLite;} +angular.element=jqLite;} +function assertArg(arg,name,reason){if(!arg){throw ngMinErr('areq',"Argument '{0}' is {1}",(name||'?'),(reason||"required"));} +return arg;} +function assertArgFn(arg,name,acceptArrayAnnotation){if(acceptArrayAnnotation&&isArray(arg)){arg=arg[arg.length-1];} +assertArg(isFunction(arg),name,'not a function, got '+ +(arg&&typeof arg=='object'?arg.constructor.name||'Object':typeof arg));return arg;} +function assertNotHasOwnProperty(name,context){if(name==='hasOwnProperty'){throw ngMinErr('badname',"hasOwnProperty is not a valid {0} name",context);}} +function getter(obj,path,bindFnToScope){if(!path)return obj;var keys=path.split('.');var key;var lastInstance=obj;var len=keys.length;for(var i=0;i 
'+element;div.removeChild(div.firstChild);jqLiteAddNodes(this,div.childNodes);var fragment=jqLite(document.createDocumentFragment());fragment.append(this);}else{jqLiteAddNodes(this,element);}} +function jqLiteClone(element){return element.cloneNode(true);} +function jqLiteDealoc(element){jqLiteRemoveData(element);for(var i=0,children=element.childNodes||[];i-1);} +function jqLiteRemoveClass(element,cssClasses){if(cssClasses&&element.setAttribute){forEach(cssClasses.split(' '),function(cssClass){element.setAttribute('class',trim((" "+(element.getAttribute('class')||'')+" ").replace(/[\n\t]/g," ").replace(" "+trim(cssClass)+" "," ")));});}} +function jqLiteAddClass(element,cssClasses){if(cssClasses&&element.setAttribute){var existingClasses=(' '+(element.getAttribute('class')||'')+' ').replace(/[\n\t]/g," ");forEach(cssClasses.split(' '),function(cssClass){cssClass=trim(cssClass);if(existingClasses.indexOf(' '+cssClass+' ')===-1){existingClasses+=cssClass+' ';}});element.setAttribute('class',trim(existingClasses));}} +function jqLiteAddNodes(root,elements){if(elements){elements=(!elements.nodeName&&isDefined(elements.length)&&!isWindow(elements))?elements:[elements];for(var i=0;i=0)?jqLite(this[index]):jqLite(this[this.length+index]);},length:0,push:push,sort:[].sort,splice:[].splice};var BOOLEAN_ATTR={};forEach('multiple,selected,checked,disabled,readOnly,required,open'.split(','),function(value){BOOLEAN_ATTR[lowercase(value)]=value;});var BOOLEAN_ELEMENTS={};forEach('input,select,option,textarea,button,form,details'.split(','),function(value){BOOLEAN_ELEMENTS[uppercase(value)]=true;});function getBooleanAttrName(element,name){var booleanAttr=BOOLEAN_ATTR[name.toLowerCase()];return booleanAttr&&BOOLEAN_ELEMENTS[element.nodeName]&&booleanAttr;} +forEach({data:jqLiteData,inheritedData:jqLiteInheritedData,scope:function(element){return jqLite(element).data('$scope')||jqLiteInheritedData(element.parentNode||element,['$isolateScope','$scope']);},isolateScope:function(element){return jqLite(element).data('$isolateScope')||jqLite(element).data('$isolateScopeNoTemplate');},controller:jqLiteController,injector:function(element){return jqLiteInheritedData(element,'$injector');},removeAttr:function(element,name){element.removeAttribute(name);},hasClass:jqLiteHasClass,css:function(element,name,value){name=camelCase(name);if(isDefined(value)){element.style[name]=value;}else{var val;if(msie<=8){val=element.currentStyle&&element.currentStyle[name];if(val==='')val='auto';} +val=val||element.style[name];if(msie<=8){val=(val==='')?undefined:val;} +return val;}},attr:function(element,name,value){var lowercasedName=lowercase(name);if(BOOLEAN_ATTR[lowercasedName]){if(isDefined(value)){if(!!value){element[name]=true;element.setAttribute(name,lowercasedName);}else{element[name]=false;element.removeAttribute(lowercasedName);}}else{return(element[name]||(element.attributes.getNamedItem(name)||noop).specified)?lowercasedName:undefined;}}else if(isDefined(value)){element.setAttribute(name,value);}else if(element.getAttribute){var ret=element.getAttribute(name,2);return ret===null?undefined:ret;}},prop:function(element,name,value){if(isDefined(value)){element[name]=value;}else{return element[name];}},text:(function(){var NODE_TYPE_TEXT_PROPERTY=[];if(msie<9){NODE_TYPE_TEXT_PROPERTY[1]='innerText';NODE_TYPE_TEXT_PROPERTY[3]='nodeValue';}else{NODE_TYPE_TEXT_PROPERTY[1]=NODE_TYPE_TEXT_PROPERTY[3]='textContent';} +getText.$dv='';return getText;function getText(element,value){var textProp=NODE_TYPE_TEXT_PROPERTY[element.nodeType];if(isUndefined(value)){return textProp?element[textProp]:'';} +element[textProp]=value;}})(),val:function(element,value){if(isUndefined(value)){if(nodeName_(element)==='SELECT'&&element.multiple){var result=[];forEach(element.options,function(option){if(option.selected){result.push(option.value||option.text);}});return result.length===0?null:result;} +return element.value;} +element.value=value;},html:function(element,value){if(isUndefined(value)){return element.innerHTML;} +for(var i=0,childNodes=element.childNodes;i4096){$log.warn("Cookie '"+name+"' possibly not set or overflowed because it was too large ("+ +cookieLength+" > 4096 bytes)!");}}}}else{if(rawDocument.cookie!==lastCookieString){lastCookieString=rawDocument.cookie;cookieArray=lastCookieString.split("; ");lastCookies={};for(i=0;i0){name=unescape(cookie.substring(0,index));if(lastCookies[name]===undefined){lastCookies[name]=unescape(cookie.substring(index+1));}}}} +return lastCookies;}};self.defer=function(fn,delay){var timeoutId;outstandingRequestCount++;timeoutId=setTimeout(function(){delete pendingDeferIds[timeoutId];completeOutstandingRequest(fn);},delay||0);pendingDeferIds[timeoutId]=true;return timeoutId;};self.defer.cancel=function(deferId){if(pendingDeferIds[deferId]){delete pendingDeferIds[deferId];clearTimeout(deferId);completeOutstandingRequest(noop);return true;} +return false;};} +function $BrowserProvider(){this.$get=['$window','$log','$sniffer','$document',function($window,$log,$sniffer,$document){return new Browser($window,$document,$log,$sniffer);}];} +function $CacheFactoryProvider(){this.$get=function(){var caches={};function cacheFactory(cacheId,options){if(cacheId in caches){throw minErr('$cacheFactory')('iid',"CacheId '{0}' is already taken!",cacheId);} +var size=0,stats=extend({},options,{id:cacheId}),data={},capacity=(options&&options.capacity)||Number.MAX_VALUE,lruHash={},freshEnd=null,staleEnd=null;return caches[cacheId]={put:function(key,value){var lruEntry=lruHash[key]||(lruHash[key]={key:key});refresh(lruEntry);if(isUndefined(value))return;if(!(key in data))size++;data[key]=value;if(size>capacity){this.remove(staleEnd.key);} +return value;},get:function(key){var lruEntry=lruHash[key];if(!lruEntry)return;refresh(lruEntry);return data[key];},remove:function(key){var lruEntry=lruHash[key];if(!lruEntry)return;if(lruEntry==freshEnd)freshEnd=lruEntry.p;if(lruEntry==staleEnd)staleEnd=lruEntry.n;link(lruEntry.n,lruEntry.p);delete lruHash[key];delete data[key];size--;},removeAll:function(){data={};size=0;lruHash={};freshEnd=staleEnd=null;},destroy:function(){data=null;stats=null;lruHash=null;delete caches[cacheId];},info:function(){return extend({},stats,{size:size});}};function refresh(entry){if(entry!=freshEnd){if(!staleEnd){staleEnd=entry;}else if(staleEnd==entry){staleEnd=entry.n;} +link(entry.n,entry.p);link(entry,freshEnd);freshEnd=entry;freshEnd.n=null;}} +function link(nextEntry,prevEntry){if(nextEntry!=prevEntry){if(nextEntry)nextEntry.p=prevEntry;if(prevEntry)prevEntry.n=nextEntry;}}} +cacheFactory.info=function(){var info={};forEach(caches,function(cache,cacheId){info[cacheId]=cache.info();});return info;};cacheFactory.get=function(cacheId){return caches[cacheId];};return cacheFactory;};} +function $TemplateCacheProvider(){this.$get=['$cacheFactory',function($cacheFactory){return $cacheFactory('templates');}];} +var $compileMinErr=minErr('$compile');$CompileProvider.$inject=['$provide'];function $CompileProvider($provide){var hasDirectives={},Suffix='Directive',COMMENT_DIRECTIVE_REGEXP=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,CLASS_DIRECTIVE_REGEXP=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,aHrefSanitizationWhitelist=/^\s*(https?|ftp|mailto|tel|file):/,imgSrcSanitizationWhitelist=/^\s*(https?|ftp|file):|data:image\//;var EVENT_HANDLER_ATTR_REGEXP=/^(on[a-z]+|formaction)$/;this.directive=function registerDirective(name,directiveFactory){assertNotHasOwnProperty(name,'directive');if(isString(name)){assertArg(directiveFactory,'directiveFactory');if(!hasDirectives.hasOwnProperty(name)){hasDirectives[name]=[];$provide.factory(name+Suffix,['$injector','$exceptionHandler',function($injector,$exceptionHandler){var directives=[];forEach(hasDirectives[name],function(directiveFactory,index){try{var directive=$injector.invoke(directiveFactory);if(isFunction(directive)){directive={compile:valueFn(directive)};}else if(!directive.compile&&directive.link){directive.compile=valueFn(directive.link);} +directive.priority=directive.priority||0;directive.index=index;directive.name=directive.name||name;directive.require=directive.require||(directive.controller&&directive.name);directive.restrict=directive.restrict||'A';directives.push(directive);}catch(e){$exceptionHandler(e);}});return directives;}]);} +hasDirectives[name].push(directiveFactory);}else{forEach(name,reverseParams(registerDirective));} +return this;};this.aHrefSanitizationWhitelist=function(regexp){if(isDefined(regexp)){aHrefSanitizationWhitelist=regexp;return this;} +return aHrefSanitizationWhitelist;};this.imgSrcSanitizationWhitelist=function(regexp){if(isDefined(regexp)){imgSrcSanitizationWhitelist=regexp;return this;} +return imgSrcSanitizationWhitelist;};this.$get=['$injector','$interpolate','$exceptionHandler','$http','$templateCache','$parse','$controller','$rootScope','$document','$sce','$animate',function($injector,$interpolate,$exceptionHandler,$http,$templateCache,$parse,$controller,$rootScope,$document,$sce,$animate){var Attributes=function(element,attr){this.$$element=element;this.$attr=attr||{};};Attributes.prototype={$normalize:directiveNormalize,$addClass:function(classVal){if(classVal&&classVal.length>0){$animate.addClass(this.$$element,classVal);}},$removeClass:function(classVal){if(classVal&&classVal.length>0){$animate.removeClass(this.$$element,classVal);}},$set:function(key,value,writeAttr,attrName){if(key=='class'){value=value||'';var current=this.$$element.attr('class')||'';this.$removeClass(tokenDifference(current,value).join(' '));this.$addClass(tokenDifference(value,current).join(' '));}else{var booleanKey=getBooleanAttrName(this.$$element[0],key),normalizedVal,nodeName;if(booleanKey){this.$$element.prop(key,value);attrName=booleanKey;} +this[key]=value;if(attrName){this.$attr[key]=attrName;}else{attrName=this.$attr[key];if(!attrName){this.$attr[key]=attrName=snake_case(key,'-');}} +nodeName=nodeName_(this.$$element);if((nodeName==='A'&&key==='href')||(nodeName==='IMG'&&key==='src')){if(!msie||msie>=8){normalizedVal=urlResolve(value).href;if(normalizedVal!==''){if((key==='href'&&!normalizedVal.match(aHrefSanitizationWhitelist))||(key==='src'&&!normalizedVal.match(imgSrcSanitizationWhitelist))){this[key]=value='unsafe:'+normalizedVal;}}}} +if(writeAttr!==false){if(value===null||value===undefined){this.$$element.removeAttr(attrName);}else{this.$$element.attr(attrName,value);}}} +var $$observers=this.$$observers;$$observers&&forEach($$observers[key],function(fn){try{fn(value);}catch(e){$exceptionHandler(e);}});function tokenDifference(str1,str2){var values=[],tokens1=str1.split(/\s+/),tokens2=str2.split(/\s+/);outer:for(var i=0;i').parent()[0];}});var compositeLinkFn=compileNodes($compileNodes,transcludeFn,$compileNodes,maxPriority,ignoreDirective,previousCompileContext);return function publicLinkFn(scope,cloneConnectFn,transcludeControllers){assertArg(scope,'scope');var $linkNode=cloneConnectFn?JQLitePrototype.clone.call($compileNodes):$compileNodes;forEach(transcludeControllers,function(instance,name){$linkNode.data('$'+name+'Controller',instance);});for(var i=0,ii=$linkNode.length;i=8||attr.specified){name=attr.name;ngAttrName=directiveNormalize(name);if(NG_ATTR_BINDING.test(ngAttrName)){name=snake_case(ngAttrName.substr(6),'-');} +var directiveNName=ngAttrName.replace(/(Start|End)$/,'');if(ngAttrName===directiveNName+'Start'){attrStartName=name;attrEndName=name.substr(0,name.length-5)+'end';name=name.substr(0,name.length-6);} +nName=directiveNormalize(name.toLowerCase());attrsMap[nName]=name;attrs[nName]=value=trim((msie&&name=='href')?decodeURIComponent(node.getAttribute(name,2)):attr.value);if(getBooleanAttrName(node,nName)){attrs[nName]=true;} +addAttrInterpolateDirective(node,directives,value,nName);addDirective(directives,nName,'A',maxPriority,ignoreDirective,attrStartName,attrEndName);}} +className=node.className;if(isString(className)&&className!==''){while(match=CLASS_DIRECTIVE_REGEXP.exec(className)){nName=directiveNormalize(match[2]);if(addDirective(directives,nName,'C',maxPriority,ignoreDirective)){attrs[nName]=trim(match[3]);} +className=className.substr(match.index+match[0].length);}} +break;case 3:addTextInterpolateDirective(directives,node.nodeValue);break;case 8:try{match=COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);if(match){nName=directiveNormalize(match[1]);if(addDirective(directives,nName,'M',maxPriority,ignoreDirective)){attrs[nName]=trim(match[2]);}}}catch(e){} +break;} +directives.sort(byPriority);return directives;} +function groupScan(node,attrStart,attrEnd){var nodes=[];var depth=0;if(attrStart&&node.hasAttribute&&node.hasAttribute(attrStart)){var startNode=node;do{if(!node){throw $compileMinErr('uterdir',"Unterminated attribute, found '{0}' but no matching '{1}' found.",attrStart,attrEnd);} +if(node.nodeType==1){if(node.hasAttribute(attrStart))depth++;if(node.hasAttribute(attrEnd))depth--;} +nodes.push(node);node=node.nextSibling;}while(depth>0);}else{nodes.push(node);} +return jqLite(nodes);} +function groupElementsLinkFnWrapper(linkFn,attrStart,attrEnd){return function(scope,element,attrs,controllers,transcludeFn){element=groupScan(element[0],attrStart,attrEnd);return linkFn(scope,element,attrs,controllers,transcludeFn);};} +function applyDirectivesToNode(directives,compileNode,templateAttrs,transcludeFn,jqCollection,originalReplaceDirective,preLinkFns,postLinkFns,previousCompileContext){previousCompileContext=previousCompileContext||{};var terminalPriority=-Number.MAX_VALUE,newScopeDirective,controllerDirectives=previousCompileContext.controllerDirectives,newIsolateScopeDirective=previousCompileContext.newIsolateScopeDirective,templateDirective=previousCompileContext.templateDirective,nonTlbTranscludeDirective=previousCompileContext.nonTlbTranscludeDirective,hasTranscludeDirective=false,hasElementTranscludeDirective=false,$compileNode=templateAttrs.$$element=jqLite(compileNode),directive,directiveName,$template,replaceDirective=originalReplaceDirective,childTranscludeFn=transcludeFn,linkFn,directiveValue;for(var i=0,ii=directives.length;idirective.priority){break;} +if(directiveValue=directive.scope){newScopeDirective=newScopeDirective||directive;if(!directive.templateUrl){assertNoDuplicate('new/isolated scope',newIsolateScopeDirective,directive,$compileNode);if(isObject(directiveValue)){newIsolateScopeDirective=directive;}}} +directiveName=directive.name;if(!directive.templateUrl&&directive.controller){directiveValue=directive.controller;controllerDirectives=controllerDirectives||{};assertNoDuplicate("'"+directiveName+"' controller",controllerDirectives[directiveName],directive,$compileNode);controllerDirectives[directiveName]=directive;} +if(directiveValue=directive.transclude){hasTranscludeDirective=true;if(!directive.$$tlb){assertNoDuplicate('transclusion',nonTlbTranscludeDirective,directive,$compileNode);nonTlbTranscludeDirective=directive;} +if(directiveValue=='element'){hasElementTranscludeDirective=true;terminalPriority=directive.priority;$template=groupScan(compileNode,attrStart,attrEnd);$compileNode=templateAttrs.$$element=jqLite(document.createComment(' '+directiveName+': '+ +templateAttrs[directiveName]+' '));compileNode=$compileNode[0];replaceWith(jqCollection,jqLite(sliceArgs($template)),compileNode);childTranscludeFn=compile($template,transcludeFn,terminalPriority,replaceDirective&&replaceDirective.name,{nonTlbTranscludeDirective:nonTlbTranscludeDirective});}else{$template=jqLite(jqLiteClone(compileNode)).contents();$compileNode.html('');childTranscludeFn=compile($template,transcludeFn);}} +if(directive.template){assertNoDuplicate('template',templateDirective,directive,$compileNode);templateDirective=directive;directiveValue=(isFunction(directive.template))?directive.template($compileNode,templateAttrs):directive.template;directiveValue=denormalizeTemplate(directiveValue);if(directive.replace){replaceDirective=directive;$template=jqLite('
'+ +trim(directiveValue)+'
').contents();compileNode=$template[0];if($template.length!=1||compileNode.nodeType!==1){throw $compileMinErr('tplrt',"Template for directive '{0}' must have exactly one root element. {1}",directiveName,'');} +replaceWith(jqCollection,$compileNode,compileNode);var newTemplateAttrs={$attr:{}};var templateDirectives=collectDirectives(compileNode,[],newTemplateAttrs);var unprocessedDirectives=directives.splice(i+1,directives.length-(i+1));if(newIsolateScopeDirective){markDirectivesAsIsolate(templateDirectives);} +directives=directives.concat(templateDirectives).concat(unprocessedDirectives);mergeTemplateAttributes(templateAttrs,newTemplateAttrs);ii=directives.length;}else{$compileNode.html(directiveValue);}} +if(directive.templateUrl){assertNoDuplicate('template',templateDirective,directive,$compileNode);templateDirective=directive;if(directive.replace){replaceDirective=directive;} +nodeLinkFn=compileTemplateUrl(directives.splice(i,directives.length-i),$compileNode,templateAttrs,jqCollection,childTranscludeFn,preLinkFns,postLinkFns,{controllerDirectives:controllerDirectives,newIsolateScopeDirective:newIsolateScopeDirective,templateDirective:templateDirective,nonTlbTranscludeDirective:nonTlbTranscludeDirective});ii=directives.length;}else if(directive.compile){try{linkFn=directive.compile($compileNode,templateAttrs,childTranscludeFn);if(isFunction(linkFn)){addLinkFns(null,linkFn,attrStart,attrEnd);}else if(linkFn){addLinkFns(linkFn.pre,linkFn.post,attrStart,attrEnd);}}catch(e){$exceptionHandler(e,startingTag($compileNode));}} +if(directive.terminal){nodeLinkFn.terminal=true;terminalPriority=Math.max(terminalPriority,directive.priority);}} +nodeLinkFn.scope=newScopeDirective&&newScopeDirective.scope===true;nodeLinkFn.transclude=hasTranscludeDirective&&childTranscludeFn;return nodeLinkFn;function addLinkFns(pre,post,attrStart,attrEnd){if(pre){if(attrStart)pre=groupElementsLinkFnWrapper(pre,attrStart,attrEnd);pre.require=directive.require;if(newIsolateScopeDirective===directive||directive.$$isolateScope){pre=cloneAndAnnotateFn(pre,{isolateScope:true});} +preLinkFns.push(pre);} +if(post){if(attrStart)post=groupElementsLinkFnWrapper(post,attrStart,attrEnd);post.require=directive.require;if(newIsolateScopeDirective===directive||directive.$$isolateScope){post=cloneAndAnnotateFn(post,{isolateScope:true});} +postLinkFns.push(post);}} +function getControllers(require,$element,elementControllers){var value,retrievalMethod='data',optional=false;if(isString(require)){while((value=require.charAt(0))=='^'||value=='?'){require=require.substr(1);if(value=='^'){retrievalMethod='inheritedData';} +optional=optional||value=='?';} +value=null;if(elementControllers&&retrievalMethod==='data'){value=elementControllers[require];} +value=value||$element[retrievalMethod]('$'+require+'Controller');if(!value&&!optional){throw $compileMinErr('ctreq',"Controller '{0}', required by directive '{1}', can't be found!",require,directiveName);} +return value;}else if(isArray(require)){value=[];forEach(require,function(require){value.push(getControllers(require,$element,elementControllers));});} +return value;} +function nodeLinkFn(childLinkFn,scope,linkNode,$rootElement,boundTranscludeFn){var attrs,$element,i,ii,linkFn,controller,isolateScope,elementControllers={},transcludeFn;if(compileNode===linkNode){attrs=templateAttrs;}else{attrs=shallowCopy(templateAttrs,new Attributes(jqLite(linkNode),templateAttrs.$attr));} +$element=attrs.$$element;if(newIsolateScopeDirective){var LOCAL_REGEXP=/^\s*([@=&])(\??)\s*(\w*)\s*$/;var $linkNode=jqLite(linkNode);isolateScope=scope.$new(true);if(templateDirective&&(templateDirective===newIsolateScopeDirective.$$originalDirective)){$linkNode.data('$isolateScope',isolateScope);}else{$linkNode.data('$isolateScopeNoTemplate',isolateScope);} +safeAddClass($linkNode,'ng-isolate-scope');forEach(newIsolateScopeDirective.scope,function(definition,scopeName){var match=definition.match(LOCAL_REGEXP)||[],attrName=match[3]||scopeName,optional=(match[2]=='?'),mode=match[1],lastValue,parentGet,parentSet;isolateScope.$$isolateBindings[scopeName]=mode+attrName;switch(mode){case'@':attrs.$observe(attrName,function(value){isolateScope[scopeName]=value;});attrs.$$observers[attrName].$$scope=scope;if(attrs[attrName]){isolateScope[scopeName]=$interpolate(attrs[attrName])(scope);} +break;case'=':if(optional&&!attrs[attrName]){return;} +parentGet=$parse(attrs[attrName]);parentSet=parentGet.assign||function(){lastValue=isolateScope[scopeName]=parentGet(scope);throw $compileMinErr('nonassign',"Expression '{0}' used with directive '{1}' is non-assignable!",attrs[attrName],newIsolateScopeDirective.name);};lastValue=isolateScope[scopeName]=parentGet(scope);isolateScope.$watch(function parentValueWatch(){var parentValue=parentGet(scope);if(parentValue!==isolateScope[scopeName]){if(parentValue!==lastValue){lastValue=isolateScope[scopeName]=parentValue;}else{parentSet(scope,parentValue=lastValue=isolateScope[scopeName]);}} +return parentValue;});break;case'&':parentGet=$parse(attrs[attrName]);isolateScope[scopeName]=function(locals){return parentGet(scope,locals);};break;default:throw $compileMinErr('iscp',"Invalid isolate scope definition for directive '{0}'."+" Definition: {... {1}: '{2}' ...}",newIsolateScopeDirective.name,scopeName,definition);}});} +transcludeFn=boundTranscludeFn&&controllersBoundTransclude;if(controllerDirectives){forEach(controllerDirectives,function(directive){var locals={$scope:directive===newIsolateScopeDirective||directive.$$isolateScope?isolateScope:scope,$element:$element,$attrs:attrs,$transclude:transcludeFn},controllerInstance;controller=directive.controller;if(controller=='@'){controller=attrs[directive.name];} +controllerInstance=$controller(controller,locals);elementControllers[directive.name]=controllerInstance;if(!hasElementTranscludeDirective){$element.data('$'+directive.name+'Controller',controllerInstance);} +if(directive.controllerAs){locals.$scope[directive.controllerAs]=controllerInstance;}});} +for(i=0,ii=preLinkFns.length;i=0;i--){try{linkFn=postLinkFns[i];linkFn(linkFn.isolateScope?isolateScope:scope,$element,attrs,linkFn.require&&getControllers(linkFn.require,$element,elementControllers),transcludeFn);}catch(e){$exceptionHandler(e,startingTag($element));}} +function controllersBoundTransclude(scope,cloneAttachFn){var transcludeControllers;if(arguments.length<2){cloneAttachFn=scope;scope=undefined;} +if(hasElementTranscludeDirective){transcludeControllers=elementControllers;} +return boundTranscludeFn(scope,cloneAttachFn,transcludeControllers);}}} +function markDirectivesAsIsolate(directives){for(var j=0,jj=directives.length;jdirective.priority)&&directive.restrict.indexOf(location)!=-1){if(startAttrName){directive=inherit(directive,{$$start:startAttrName,$$end:endAttrName});} +tDirectives.push(directive);match=directive;}}catch(e){$exceptionHandler(e);}}} +return match;} +function mergeTemplateAttributes(dst,src){var srcAttr=src.$attr,dstAttr=dst.$attr,$element=dst.$$element;forEach(dst,function(value,key){if(key.charAt(0)!='$'){if(src[key]){value+=(key==='style'?';':' ')+src[key];} +dst.$set(key,value,true,srcAttr[key]);}});forEach(src,function(value,key){if(key=='class'){safeAddClass($element,value);dst['class']=(dst['class']?dst['class']+' ':'')+value;}else if(key=='style'){$element.attr('style',$element.attr('style')+';'+value);dst['style']=(dst['style']?dst['style']+';':'')+value;}else if(key.charAt(0)!='$'&&!dst.hasOwnProperty(key)){dst[key]=value;dstAttr[key]=srcAttr[key];}});} +function compileTemplateUrl(directives,$compileNode,tAttrs,$rootElement,childTranscludeFn,preLinkFns,postLinkFns,previousCompileContext){var linkQueue=[],afterTemplateNodeLinkFn,afterTemplateChildLinkFn,beforeTemplateCompileNode=$compileNode[0],origAsyncDirective=directives.shift(),derivedSyncDirective=extend({},origAsyncDirective,{templateUrl:null,transclude:null,replace:null,$$originalDirective:origAsyncDirective}),templateUrl=(isFunction(origAsyncDirective.templateUrl))?origAsyncDirective.templateUrl($compileNode,tAttrs):origAsyncDirective.templateUrl;$compileNode.html('');$http.get($sce.getTrustedResourceUrl(templateUrl),{cache:$templateCache}).success(function(content){var compileNode,tempTemplateAttrs,$template,childBoundTranscludeFn;content=denormalizeTemplate(content);if(origAsyncDirective.replace){$template=jqLite('
'+trim(content)+'
').contents();compileNode=$template[0];if($template.length!=1||compileNode.nodeType!==1){throw $compileMinErr('tplrt',"Template for directive '{0}' must have exactly one root element. {1}",origAsyncDirective.name,templateUrl);} +tempTemplateAttrs={$attr:{}};replaceWith($rootElement,$compileNode,compileNode);var templateDirectives=collectDirectives(compileNode,[],tempTemplateAttrs);if(isObject(origAsyncDirective.scope)){markDirectivesAsIsolate(templateDirectives);} +directives=templateDirectives.concat(directives);mergeTemplateAttributes(tAttrs,tempTemplateAttrs);}else{compileNode=beforeTemplateCompileNode;$compileNode.html(content);} +directives.unshift(derivedSyncDirective);afterTemplateNodeLinkFn=applyDirectivesToNode(directives,compileNode,tAttrs,childTranscludeFn,$compileNode,origAsyncDirective,preLinkFns,postLinkFns,previousCompileContext);forEach($rootElement,function(node,i){if(node==compileNode){$rootElement[i]=$compileNode[0];}});afterTemplateChildLinkFn=compileNodes($compileNode[0].childNodes,childTranscludeFn);while(linkQueue.length){var scope=linkQueue.shift(),beforeTemplateLinkNode=linkQueue.shift(),linkRootElement=linkQueue.shift(),boundTranscludeFn=linkQueue.shift(),linkNode=$compileNode[0];if(beforeTemplateLinkNode!==beforeTemplateCompileNode){linkNode=jqLiteClone(compileNode);replaceWith(linkRootElement,jqLite(beforeTemplateLinkNode),linkNode);} +if(afterTemplateNodeLinkFn.transclude){childBoundTranscludeFn=createBoundTranscludeFn(scope,afterTemplateNodeLinkFn.transclude);}else{childBoundTranscludeFn=boundTranscludeFn;} +afterTemplateNodeLinkFn(afterTemplateChildLinkFn,scope,linkNode,$rootElement,childBoundTranscludeFn);} +linkQueue=null;}).error(function(response,code,headers,config){throw $compileMinErr('tpload','Failed to load template: {0}',config.url);});return function delayedNodeLinkFn(ignoreChildLinkFn,scope,node,rootElement,boundTranscludeFn){if(linkQueue){linkQueue.push(scope);linkQueue.push(node);linkQueue.push(rootElement);linkQueue.push(boundTranscludeFn);}else{afterTemplateNodeLinkFn(afterTemplateChildLinkFn,scope,node,rootElement,boundTranscludeFn);}};} +function byPriority(a,b){var diff=b.priority-a.priority;if(diff!==0)return diff;if(a.name!==b.name)return(a.name0){var timeoutId=$browserDefer(timeoutRequest,timeout);}else if(timeout&&timeout.then){timeout.then(timeoutRequest);} +function timeoutRequest(){status=-1;jsonpDone&&jsonpDone();xhr&&xhr.abort();} +function completeRequest(callback,status,response,headersString){var protocol=locationProtocol||urlResolve(url).protocol;timeoutId&&$browserDefer.cancel(timeoutId);jsonpDone=xhr=null;status=(protocol=='file')?(response?200:404):status;status=status==1223?204:status;callback(status,response,headersString);$browser.$$completeOutstandingRequest(noop);}};function jsonpReq(url,done){var script=rawDocument.createElement('script'),doneWrapper=function(){rawDocument.body.removeChild(script);if(done)done();};script.type='text/javascript';script.src=url;if(msie){script.onreadystatechange=function(){if(/loaded|complete/.test(script.readyState))doneWrapper();};}else{script.onload=script.onerror=doneWrapper;} +rawDocument.body.appendChild(script);return doneWrapper;}} +var $interpolateMinErr=minErr('$interpolate');function $InterpolateProvider(){var startSymbol='{{';var endSymbol='}}';this.startSymbol=function(value){if(value){startSymbol=value;return this;}else{return startSymbol;}};this.endSymbol=function(value){if(value){endSymbol=value;return this;}else{return endSymbol;}};this.$get=['$parse','$exceptionHandler','$sce',function($parse,$exceptionHandler,$sce){var startSymbolLength=startSymbol.length,endSymbolLength=endSymbol.length;function $interpolate(text,mustHaveExpression,trustedContext){var startIndex,endIndex,index=0,parts=[],length=text.length,hasInterpolation=false,fn,exp,concat=[];while(index1){throw $interpolateMinErr('noconcat',"Error while interpolating: {0}\nStrict Contextual Escaping disallows "+"interpolations that concatenate multiple expressions when a trusted value is "+"required. See http://docs.angularjs.org/api/ng.$sce",text);} +if(!mustHaveExpression||hasInterpolation){concat.length=length;fn=function(context){try{for(var i=0,ii=length,part;i0&&iteration>=count){deferred.resolve(iteration);clearInterval(promise.$$intervalId);delete intervals[promise.$$intervalId];} +if(!skipApply)$rootScope.$apply();},delay);intervals[promise.$$intervalId]=deferred;return promise;} +interval.cancel=function(promise){if(promise&&promise.$$intervalId in intervals){intervals[promise.$$intervalId].reject('canceled');clearInterval(promise.$$intervalId);delete intervals[promise.$$intervalId];return true;} +return false;};return interval;}];} +function $LocaleProvider(){this.$get=function(){return{id:'en-us',NUMBER_FORMATS:{DECIMAL_SEP:'.',GROUP_SEP:',',PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:'',posSuf:'',negPre:'-',negSuf:'',gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:'\u00A4',posSuf:'',negPre:'(\u00A4',negSuf:')',gSize:3,lgSize:3}],CURRENCY_SYM:'$'},DATETIME_FORMATS:{MONTH:'January,February,March,April,May,June,July,August,September,October,November,December'.split(','),SHORTMONTH:'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(','),DAY:'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday'.split(','),SHORTDAY:'Sun,Mon,Tue,Wed,Thu,Fri,Sat'.split(','),AMPMS:['AM','PM'],medium:'MMM d, y h:mm:ss a',short:'M/d/yy h:mm a',fullDate:'EEEE, MMMM d, y',longDate:'MMMM d, y',mediumDate:'MMM d, y',shortDate:'M/d/yy',mediumTime:'h:mm:ss a',shortTime:'h:mm a'},pluralCat:function(num){if(num===1){return'one';} +return'other';}};};} +var PATH_MATCH=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,DEFAULT_PORTS={'http':80,'https':443,'ftp':21};var $locationMinErr=minErr('$location');function encodePath(path){var segments=path.split('/'),i=segments.length;while(i--){segments[i]=encodeUriSegment(segments[i]);} +return segments.join('/');} +function parseAbsoluteUrl(absoluteUrl,locationObj,appBase){var parsedUrl=urlResolve(absoluteUrl,appBase);locationObj.$$protocol=parsedUrl.protocol;locationObj.$$host=parsedUrl.hostname;locationObj.$$port=int(parsedUrl.port)||DEFAULT_PORTS[parsedUrl.protocol]||null;} +function parseAppUrl(relativeUrl,locationObj,appBase){var prefixed=(relativeUrl.charAt(0)!=='/');if(prefixed){relativeUrl='/'+relativeUrl;} +var match=urlResolve(relativeUrl,appBase);locationObj.$$path=decodeURIComponent(prefixed&&match.pathname.charAt(0)==='/'?match.pathname.substring(1):match.pathname);locationObj.$$search=parseKeyValue(match.search);locationObj.$$hash=decodeURIComponent(match.hash);if(locationObj.$$path&&locationObj.$$path.charAt(0)!='/'){locationObj.$$path='/'+locationObj.$$path;}} +function beginsWith(begin,whole){if(whole.indexOf(begin)===0){return whole.substr(begin.length);}} +function stripHash(url){var index=url.indexOf('#');return index==-1?url:url.substr(0,index);} +function stripFile(url){return url.substr(0,stripHash(url).lastIndexOf('/')+1);} +function serverBase(url){return url.substring(0,url.indexOf('/',url.indexOf('//')+2));} +function LocationHtml5Url(appBase,basePrefix){this.$$html5=true;basePrefix=basePrefix||'';var appBaseNoFile=stripFile(appBase);parseAbsoluteUrl(appBase,this,appBase);this.$$parse=function(url){var pathUrl=beginsWith(appBaseNoFile,url);if(!isString(pathUrl)){throw $locationMinErr('ipthprfx','Invalid url "{0}", missing path prefix "{1}".',url,appBaseNoFile);} +parseAppUrl(pathUrl,this,appBase);if(!this.$$path){this.$$path='/';} +this.$$compose();};this.$$compose=function(){var search=toKeyValue(this.$$search),hash=this.$$hash?'#'+encodeUriSegment(this.$$hash):'';this.$$url=encodePath(this.$$path)+(search?'?'+search:'')+hash;this.$$absUrl=appBaseNoFile+this.$$url.substr(1);};this.$$rewrite=function(url){var appUrl,prevAppUrl;if((appUrl=beginsWith(appBase,url))!==undefined){prevAppUrl=appUrl;if((appUrl=beginsWith(basePrefix,appUrl))!==undefined){return appBaseNoFile+(beginsWith('/',appUrl)||appUrl);}else{return appBase+prevAppUrl;}}else if((appUrl=beginsWith(appBaseNoFile,url))!==undefined){return appBaseNoFile+appUrl;}else if(appBaseNoFile==url+'/'){return appBaseNoFile;}};} +function LocationHashbangUrl(appBase,hashPrefix){var appBaseNoFile=stripFile(appBase);parseAbsoluteUrl(appBase,this,appBase);this.$$parse=function(url){var withoutBaseUrl=beginsWith(appBase,url)||beginsWith(appBaseNoFile,url);var withoutHashUrl=withoutBaseUrl.charAt(0)=='#'?beginsWith(hashPrefix,withoutBaseUrl):(this.$$html5)?withoutBaseUrl:'';if(!isString(withoutHashUrl)){throw $locationMinErr('ihshprfx','Invalid url "{0}", missing hash prefix "{1}".',url,hashPrefix);} +parseAppUrl(withoutHashUrl,this,appBase);this.$$compose();};this.$$compose=function(){var search=toKeyValue(this.$$search),hash=this.$$hash?'#'+encodeUriSegment(this.$$hash):'';this.$$url=encodePath(this.$$path)+(search?'?'+search:'')+hash;this.$$absUrl=appBase+(this.$$url?hashPrefix+this.$$url:'');};this.$$rewrite=function(url){if(stripHash(appBase)==stripHash(url)){return url;}};} +function LocationHashbangInHtml5Url(appBase,hashPrefix){this.$$html5=true;LocationHashbangUrl.apply(this,arguments);var appBaseNoFile=stripFile(appBase);this.$$rewrite=function(url){var appUrl;if(appBase==stripHash(url)){return url;}else if((appUrl=beginsWith(appBaseNoFile,url))){return appBase+hashPrefix+appUrl;}else if(appBaseNoFile===url+'/'){return appBaseNoFile;}};} +LocationHashbangInHtml5Url.prototype=LocationHashbangUrl.prototype=LocationHtml5Url.prototype={$$html5:false,$$replace:false,absUrl:locationGetter('$$absUrl'),url:function(url,replace){if(isUndefined(url)) +return this.$$url;var match=PATH_MATCH.exec(url);if(match[1])this.path(decodeURIComponent(match[1]));if(match[2]||match[1])this.search(match[3]||'');this.hash(match[5]||'',replace);return this;},protocol:locationGetter('$$protocol'),host:locationGetter('$$host'),port:locationGetter('$$port'),path:locationGetterSetter('$$path',function(path){return path.charAt(0)=='/'?path:'/'+path;}),search:function(search,paramValue){switch(arguments.length){case 0:return this.$$search;case 1:if(isString(search)){this.$$search=parseKeyValue(search);}else if(isObject(search)){this.$$search=search;}else{throw $locationMinErr('isrcharg','The first argument of the `$location#search()` call must be a string or an object.');} +break;default:if(isUndefined(paramValue)||paramValue===null){delete this.$$search[search];}else{this.$$search[search]=paramValue;}} +this.$$compose();return this;},hash:locationGetterSetter('$$hash',identity),replace:function(){this.$$replace=true;return this;}};function locationGetter(property){return function(){return this[property];};} +function locationGetterSetter(property,preprocess){return function(value){if(isUndefined(value)) +return this[property];this[property]=preprocess(value);this.$$compose();return this;};} +function $LocationProvider(){var hashPrefix='',html5Mode=false;this.hashPrefix=function(prefix){if(isDefined(prefix)){hashPrefix=prefix;return this;}else{return hashPrefix;}};this.html5Mode=function(mode){if(isDefined(mode)){html5Mode=mode;return this;}else{return html5Mode;}};this.$get=['$rootScope','$browser','$sniffer','$rootElement',function($rootScope,$browser,$sniffer,$rootElement){var $location,LocationMode,baseHref=$browser.baseHref(),initialUrl=$browser.url(),appBase;if(html5Mode){appBase=serverBase(initialUrl)+(baseHref||'/');LocationMode=$sniffer.history?LocationHtml5Url:LocationHashbangInHtml5Url;}else{appBase=stripHash(initialUrl);LocationMode=LocationHashbangUrl;} +$location=new LocationMode(appBase,'#'+hashPrefix);$location.$$parse($location.$$rewrite(initialUrl));$rootElement.on('click',function(event){if(event.ctrlKey||event.metaKey||event.which==2)return;var elm=jqLite(event.target);while(lowercase(elm[0].nodeName)!=='a'){if(elm[0]===$rootElement[0]||!(elm=elm.parent())[0])return;} +var absHref=elm.prop('href');var rewrittenUrl=$location.$$rewrite(absHref);if(absHref&&!elm.attr('target')&&rewrittenUrl&&!event.isDefaultPrevented()){event.preventDefault();if(rewrittenUrl!=$browser.url()){$location.$$parse(rewrittenUrl);$rootScope.$apply();window.angular['ff-684208-preventDefault']=true;}}});if($location.absUrl()!=initialUrl){$browser.url($location.absUrl(),true);} +$browser.onUrlChange(function(newUrl){if($location.absUrl()!=newUrl){if($rootScope.$broadcast('$locationChangeStart',newUrl,$location.absUrl()).defaultPrevented){$browser.url($location.absUrl());return;} +$rootScope.$evalAsync(function(){var oldUrl=$location.absUrl();$location.$$parse(newUrl);afterLocationChange(oldUrl);});if(!$rootScope.$$phase)$rootScope.$digest();}});var changeCounter=0;$rootScope.$watch(function $locationWatch(){var oldUrl=$browser.url();var currentReplace=$location.$$replace;if(!changeCounter||oldUrl!=$location.absUrl()){changeCounter++;$rootScope.$evalAsync(function(){if($rootScope.$broadcast('$locationChangeStart',$location.absUrl(),oldUrl).defaultPrevented){$location.$$parse(oldUrl);}else{$browser.url($location.absUrl(),currentReplace);afterLocationChange(oldUrl);}});} +$location.$$replace=false;return changeCounter;});return $location;function afterLocationChange(oldUrl){$rootScope.$broadcast('$locationChangeSuccess',$location.absUrl(),oldUrl);}}];} +function $LogProvider(){var debug=true,self=this;this.debugEnabled=function(flag){if(isDefined(flag)){debug=flag;return this;}else{return debug;}};this.$get=['$window',function($window){return{log:consoleLog('log'),info:consoleLog('info'),warn:consoleLog('warn'),error:consoleLog('error'),debug:(function(){var fn=consoleLog('debug');return function(){if(debug){fn.apply(self,arguments);}};}())};function formatError(arg){if(arg instanceof Error){if(arg.stack){arg=(arg.message&&arg.stack.indexOf(arg.message)===-1)?'Error: '+arg.message+'\n'+arg.stack:arg.stack;}else if(arg.sourceURL){arg=arg.message+'\n'+arg.sourceURL+':'+arg.line;}} +return arg;} +function consoleLog(type){var console=$window.console||{},logFn=console[type]||console.log||noop;if(logFn.apply){return function(){var args=[];forEach(arguments,function(arg){args.push(formatError(arg));});return logFn.apply(console,args);};} +return function(arg1,arg2){logFn(arg1,arg2==null?'':arg2);};}}];} +var $parseMinErr=minErr('$parse');var promiseWarningCache={};var promiseWarning;function ensureSafeMemberName(name,fullExpression){if(name==="constructor"){throw $parseMinErr('isecfld','Referencing "constructor" field in Angular expressions is disallowed! Expression: {0}',fullExpression);} +return name;} +function ensureSafeObject(obj,fullExpression){if(obj&&obj.constructor===obj){throw $parseMinErr('isecfn','Referencing Function in Angular expressions is disallowed! Expression: {0}',fullExpression);}else if(obj&&obj.document&&obj.location&&obj.alert&&obj.setInterval){throw $parseMinErr('isecwindow','Referencing the Window in Angular expressions is disallowed! Expression: {0}',fullExpression);}else if(obj&&(obj.nodeName||(obj.on&&obj.find))){throw $parseMinErr('isecdom','Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}',fullExpression);}else{return obj;}} +var OPERATORS={'null':function(){return null;},'true':function(){return true;},'false':function(){return false;},undefined:noop,'+':function(self,locals,a,b){a=a(self,locals);b=b(self,locals);if(isDefined(a)){if(isDefined(b)){return a+b;} +return a;} +return isDefined(b)?b:undefined;},'-':function(self,locals,a,b){a=a(self,locals);b=b(self,locals);return(isDefined(a)?a:0)-(isDefined(b)?b:0);},'*':function(self,locals,a,b){return a(self,locals)*b(self,locals);},'/':function(self,locals,a,b){return a(self,locals)/b(self,locals);},'%':function(self,locals,a,b){return a(self,locals)%b(self,locals);},'^':function(self,locals,a,b){return a(self,locals)^b(self,locals);},'=':noop,'===':function(self,locals,a,b){return a(self,locals)===b(self,locals);},'!==':function(self,locals,a,b){return a(self,locals)!==b(self,locals);},'==':function(self,locals,a,b){return a(self,locals)==b(self,locals);},'!=':function(self,locals,a,b){return a(self,locals)!=b(self,locals);},'<':function(self,locals,a,b){return a(self,locals)':function(self,locals,a,b){return a(self,locals)>b(self,locals);},'<=':function(self,locals,a,b){return a(self,locals)<=b(self,locals);},'>=':function(self,locals,a,b){return a(self,locals)>=b(self,locals);},'&&':function(self,locals,a,b){return a(self,locals)&&b(self,locals);},'||':function(self,locals,a,b){return a(self,locals)||b(self,locals);},'&':function(self,locals,a,b){return a(self,locals)&b(self,locals);},'|':function(self,locals,a,b){return b(self,locals)(self,locals,a(self,locals));},'!':function(self,locals,a){return!a(self,locals);}};var ESCAPE={"n":"\n","f":"\f","r":"\r","t":"\t","v":"\v","'":"'",'"':'"'};var Lexer=function(options){this.options=options;};Lexer.prototype={constructor:Lexer,lex:function(text){this.text=text;this.index=0;this.ch=undefined;this.lastCh=':';this.tokens=[];var token;var json=[];while(this.index0){var token=this.tokens[0];var t=token.text;if(t===e1||t===e2||t===e3||t===e4||(!e1&&!e2&&!e3&&!e4)){return token;}} +return false;},expect:function(e1,e2,e3,e4){var token=this.peek(e1,e2,e3,e4);if(token){if(this.json&&!token.json){this.throwError('is not valid json',token);} +this.tokens.shift();return token;} +return false;},consume:function(e1){if(!this.expect(e1)){this.throwError('is unexpected, expecting ['+e1+']',this.peek());}},unaryFn:function(fn,right){return extend(function(self,locals){return fn(self,locals,right);},{constant:right.constant});},ternaryFn:function(left,middle,right){return extend(function(self,locals){return left(self,locals)?middle(self,locals):right(self,locals);},{constant:left.constant&&middle.constant&&right.constant});},binaryFn:function(left,fn,right){return extend(function(self,locals){return fn(self,locals,left,right);},{constant:left.constant&&right.constant});},statements:function(){var statements=[];while(true){if(this.tokens.length>0&&!this.peek('}',')',';',']')) +statements.push(this.filterChain());if(!this.expect(';')){return(statements.length===1)?statements[0]:function(self,locals){var value;for(var i=0;i','<=','>='))){left=this.binaryFn(left,token.fn,this.relational());} +return left;},additive:function(){var left=this.multiplicative();var token;while((token=this.expect('+','-'))){left=this.binaryFn(left,token.fn,this.multiplicative());} +return left;},multiplicative:function(){var left=this.unary();var token;while((token=this.expect('*','/','%'))){left=this.binaryFn(left,token.fn,this.unary());} +return left;},unary:function(){var token;if(this.expect('+')){return this.primary();}else if((token=this.expect('-'))){return this.binaryFn(Parser.ZERO,token.fn,this.unary());}else if((token=this.expect('!'))){return this.unaryFn(token.fn,this.unary());}else{return this.primary();}},fieldAccess:function(object){var parser=this;var field=this.expect().text;var getter=getterFn(field,this.options,this.text);return extend(function(scope,locals,self){return getter(self||object(scope,locals),locals);},{assign:function(scope,value,locals){return setter(object(scope,locals),field,value,parser.text,parser.options);}});},objectIndex:function(obj){var parser=this;var indexFn=this.expression();this.consume(']');return extend(function(self,locals){var o=obj(self,locals),i=indexFn(self,locals),v,p;if(!o)return undefined;v=ensureSafeObject(o[i],parser.text);if(v&&v.then&&parser.options.unwrapPromises){p=v;if(!('$$v'in v)){p.$$v=undefined;p.then(function(val){p.$$v=val;});} +v=v.$$v;} +return v;},{assign:function(self,value,locals){var key=indexFn(self,locals);var safe=ensureSafeObject(obj(self,locals),parser.text);return safe[key]=value;}});},functionCall:function(fn,contextGetter){var argsFn=[];if(this.peekToken().text!==')'){do{argsFn.push(this.expression());}while(this.expect(','));} +this.consume(')');var parser=this;return function(scope,locals){var args=[];var context=contextGetter?contextGetter(scope,locals):scope;for(var i=0;i1;i++){key=ensureSafeMemberName(element.shift(),fullExp);var propertyObj=obj[key];if(!propertyObj){propertyObj={};obj[key]=propertyObj;} +obj=propertyObj;if(obj.then&&options.unwrapPromises){promiseWarning(fullExp);if(!("$$v"in obj)){(function(promise){promise.then(function(val){promise.$$v=val;});})(obj);} +if(obj.$$v===undefined){obj.$$v={};} +obj=obj.$$v;}} +key=ensureSafeMemberName(element.shift(),fullExp);obj[key]=setValue;return setValue;} +var getterFnCache={};function cspSafeGetterFn(key0,key1,key2,key3,key4,fullExp,options){ensureSafeMemberName(key0,fullExp);ensureSafeMemberName(key1,fullExp);ensureSafeMemberName(key2,fullExp);ensureSafeMemberName(key3,fullExp);ensureSafeMemberName(key4,fullExp);return!options.unwrapPromises?function cspSafeGetter(scope,locals){var pathVal=(locals&&locals.hasOwnProperty(key0))?locals:scope;if(pathVal===null||pathVal===undefined)return pathVal;pathVal=pathVal[key0];if(!key1||pathVal===null||pathVal===undefined)return pathVal;pathVal=pathVal[key1];if(!key2||pathVal===null||pathVal===undefined)return pathVal;pathVal=pathVal[key2];if(!key3||pathVal===null||pathVal===undefined)return pathVal;pathVal=pathVal[key3];if(!key4||pathVal===null||pathVal===undefined)return pathVal;pathVal=pathVal[key4];return pathVal;}:function cspSafePromiseEnabledGetter(scope,locals){var pathVal=(locals&&locals.hasOwnProperty(key0))?locals:scope,promise;if(pathVal===null||pathVal===undefined)return pathVal;pathVal=pathVal[key0];if(pathVal&&pathVal.then){promiseWarning(fullExp);if(!("$$v"in pathVal)){promise=pathVal;promise.$$v=undefined;promise.then(function(val){promise.$$v=val;});} +pathVal=pathVal.$$v;} +if(!key1||pathVal===null||pathVal===undefined)return pathVal;pathVal=pathVal[key1];if(pathVal&&pathVal.then){promiseWarning(fullExp);if(!("$$v"in pathVal)){promise=pathVal;promise.$$v=undefined;promise.then(function(val){promise.$$v=val;});} +pathVal=pathVal.$$v;} +if(!key2||pathVal===null||pathVal===undefined)return pathVal;pathVal=pathVal[key2];if(pathVal&&pathVal.then){promiseWarning(fullExp);if(!("$$v"in pathVal)){promise=pathVal;promise.$$v=undefined;promise.then(function(val){promise.$$v=val;});} +pathVal=pathVal.$$v;} +if(!key3||pathVal===null||pathVal===undefined)return pathVal;pathVal=pathVal[key3];if(pathVal&&pathVal.then){promiseWarning(fullExp);if(!("$$v"in pathVal)){promise=pathVal;promise.$$v=undefined;promise.then(function(val){promise.$$v=val;});} +pathVal=pathVal.$$v;} +if(!key4||pathVal===null||pathVal===undefined)return pathVal;pathVal=pathVal[key4];if(pathVal&&pathVal.then){promiseWarning(fullExp);if(!("$$v"in pathVal)){promise=pathVal;promise.$$v=undefined;promise.then(function(val){promise.$$v=val;});} +pathVal=pathVal.$$v;} +return pathVal;};} +function getterFn(path,options,fullExp){if(getterFnCache.hasOwnProperty(path)){return getterFnCache[path];} +var pathKeys=path.split('.'),pathKeysLength=pathKeys.length,fn;if(options.csp){if(pathKeysLength<6){fn=cspSafeGetterFn(pathKeys[0],pathKeys[1],pathKeys[2],pathKeys[3],pathKeys[4],fullExp,options);}else{fn=function(scope,locals){var i=0,val;do{val=cspSafeGetterFn(pathKeys[i++],pathKeys[i++],pathKeys[i++],pathKeys[i++],pathKeys[i++],fullExp,options)(scope,locals);locals=undefined;scope=val;}while(inewLength){changeDetected++;for(key in oldValue){if(oldValue.hasOwnProperty(key)&&!newValue.hasOwnProperty(key)){oldLength--;delete oldValue[key];}}}} +return changeDetected;} +function $watchCollectionAction(){listener(newValue,oldValue,self);} +return this.$watch($watchCollectionWatch,$watchCollectionAction);},$digest:function(){var watch,value,last,watchers,asyncQueue=this.$$asyncQueue,postDigestQueue=this.$$postDigestQueue,length,dirty,ttl=TTL,next,current,target=this,watchLog=[],logIdx,logMsg,asyncTask;beginPhase('$digest');do{dirty=false;current=target;while(asyncQueue.length){try{asyncTask=asyncQueue.shift();asyncTask.scope.$eval(asyncTask.expression);}catch(e){$exceptionHandler(e);}} +do{if((watchers=current.$$watchers)){length=watchers.length;while(length--){try{watch=watchers[length];if(watch&&(value=watch.get(current))!==(last=watch.last)&&!(watch.eq?equals(value,last):(typeof value=='number'&&typeof last=='number'&&isNaN(value)&&isNaN(last)))){dirty=true;watch.last=watch.eq?copy(value):value;watch.fn(value,((last===initWatchVal)?value:last),current);if(ttl<5){logIdx=4-ttl;if(!watchLog[logIdx])watchLog[logIdx]=[];logMsg=(isFunction(watch.exp))?'fn: '+(watch.exp.name||watch.exp.toString()):watch.exp;logMsg+='; newVal: '+toJson(value)+'; oldVal: '+toJson(last);watchLog[logIdx].push(logMsg);}}}catch(e){$exceptionHandler(e);}}} +if(!(next=(current.$$childHead||(current!==target&¤t.$$nextSibling)))){while(current!==target&&!(next=current.$$nextSibling)){current=current.$parent;}}}while((current=next));if(dirty&&!(ttl--)){clearPhase();throw $rootScopeMinErr('infdig','{0} $digest() iterations reached. Aborting!\n'+'Watchers fired in the last 5 iterations: {1}',TTL,toJson(watchLog));}}while(dirty||asyncQueue.length);clearPhase();while(postDigestQueue.length){try{postDigestQueue.shift()();}catch(e){$exceptionHandler(e);}}},$destroy:function(){if($rootScope==this||this.$$destroyed)return;var parent=this.$parent;this.$broadcast('$destroy');this.$$destroyed=true;if(parent.$$childHead==this)parent.$$childHead=this.$$nextSibling;if(parent.$$childTail==this)parent.$$childTail=this.$$prevSibling;if(this.$$prevSibling)this.$$prevSibling.$$nextSibling=this.$$nextSibling;if(this.$$nextSibling)this.$$nextSibling.$$prevSibling=this.$$prevSibling;this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;},$eval:function(expr,locals){return $parse(expr)(this,locals);},$evalAsync:function(expr){if(!$rootScope.$$phase&&!$rootScope.$$asyncQueue.length){$browser.defer(function(){if($rootScope.$$asyncQueue.length){$rootScope.$digest();}});} +this.$$asyncQueue.push({scope:this,expression:expr});},$$postDigest:function(fn){this.$$postDigestQueue.push(fn);},$apply:function(expr){try{beginPhase('$apply');return this.$eval(expr);}catch(e){$exceptionHandler(e);}finally{clearPhase();try{$rootScope.$digest();}catch(e){$exceptionHandler(e);throw e;}}},$on:function(name,listener){var namedListeners=this.$$listeners[name];if(!namedListeners){this.$$listeners[name]=namedListeners=[];} +namedListeners.push(listener);return function(){namedListeners[indexOf(namedListeners,listener)]=null;};},$emit:function(name,args){var empty=[],namedListeners,scope=this,stopPropagation=false,event={name:name,targetScope:scope,stopPropagation:function(){stopPropagation=true;},preventDefault:function(){event.defaultPrevented=true;},defaultPrevented:false},listenerArgs=concat([event],arguments,1),i,length;do{namedListeners=scope.$$listeners[name]||empty;event.currentScope=scope;for(i=0,length=namedListeners.length;i-1){throw $sceMinErr('iwcard','Illegal sequence *** in string matcher. String: {0}',matcher);} +matcher=escapeForRegexp(matcher).replace('\\*\\*','.*').replace('\\*','[^:/.?&;]*');return new RegExp('^'+matcher+'$');}else if(isRegExp(matcher)){return new RegExp('^'+matcher.source+'$');}else{throw $sceMinErr('imatcher','Matchers may only be "self", string patterns or RegExp objects');}} +function adjustMatchers(matchers){var adjustedMatchers=[];if(isDefined(matchers)){forEach(matchers,function(matcher){adjustedMatchers.push(adjustMatcher(matcher));});} +return adjustedMatchers;} +function $SceDelegateProvider(){this.SCE_CONTEXTS=SCE_CONTEXTS;var resourceUrlWhitelist=['self'],resourceUrlBlacklist=[];this.resourceUrlWhitelist=function(value){if(arguments.length){resourceUrlWhitelist=adjustMatchers(value);} +return resourceUrlWhitelist;};this.resourceUrlBlacklist=function(value){if(arguments.length){resourceUrlBlacklist=adjustMatchers(value);} +return resourceUrlBlacklist;};this.$get=['$log','$document','$injector',function($log,$document,$injector){var htmlSanitizer=function htmlSanitizer(html){throw $sceMinErr('unsafe','Attempting to use an unsafe value in a safe context.');};if($injector.has('$sanitize')){htmlSanitizer=$injector.get('$sanitize');} +function matchUrl(matcher,parsedUrl){if(matcher==='self'){return urlIsSameOrigin(parsedUrl);}else{return!!matcher.exec(parsedUrl.href);}} +function isResourceUrlAllowedByPolicy(url){var parsedUrl=urlResolve(url.toString());var i,n,allowed=false;for(i=0,n=resourceUrlWhitelist.length;i to the top of your HTML '+'document. See http://docs.angularjs.org/api/ng.$sce for more information.');}} +var sce=copy(SCE_CONTEXTS);sce.isEnabled=function(){return enabled;};sce.trustAs=$sceDelegate.trustAs;sce.getTrusted=$sceDelegate.getTrusted;sce.valueOf=$sceDelegate.valueOf;if(!enabled){sce.trustAs=sce.getTrusted=function(type,value){return value;};sce.valueOf=identity;} +sce.parseAs=function sceParseAs(type,expr){var parsed=$parse(expr);if(parsed.literal&&parsed.constant){return parsed;}else{return function sceParseAsTrusted(self,locals){return sce.getTrusted(type,parsed(self,locals));};}};var parse=sce.parseAs,getTrusted=sce.getTrusted,trustAs=sce.trustAs;forEach(SCE_CONTEXTS,function(enumValue,name){var lName=lowercase(name);sce[camelCase("parse_as_"+lName)]=function(expr){return parse(enumValue,expr);};sce[camelCase("get_trusted_"+lName)]=function(value){return getTrusted(enumValue,value);};sce[camelCase("trust_as_"+lName)]=function(value){return trustAs(enumValue,value);};});return sce;}];} +function $SnifferProvider(){this.$get=['$window','$document',function($window,$document){var eventSupport={},android=int((/android (\d+)/.exec(lowercase(($window.navigator||{}).userAgent))||[])[1]),boxee=/Boxee/i.test(($window.navigator||{}).userAgent),document=$document[0]||{},vendorPrefix,vendorRegex=/^(Moz|webkit|O|ms)(?=[A-Z])/,bodyStyle=document.body&&document.body.style,transitions=false,animations=false,match;if(bodyStyle){for(var prop in bodyStyle){if(match=vendorRegex.exec(prop)){vendorPrefix=match[0];vendorPrefix=vendorPrefix.substr(0,1).toUpperCase()+vendorPrefix.substr(1);break;}} +if(!vendorPrefix){vendorPrefix=('WebkitOpacity'in bodyStyle)&&'webkit';} +transitions=!!(('transition'in bodyStyle)||(vendorPrefix+'Transition'in bodyStyle));animations=!!(('animation'in bodyStyle)||(vendorPrefix+'Animation'in bodyStyle));if(android&&(!transitions||!animations)){transitions=isString(document.body.style.webkitTransition);animations=isString(document.body.style.webkitAnimation);}} +return{history:!!($window.history&&$window.history.pushState&&!(android<4)&&!boxee),hashchange:'onhashchange'in $window&&(!document.documentMode||document.documentMode>7),hasEvent:function(event){if(event=='input'&&msie==9)return false;if(isUndefined(eventSupport[event])){var divElm=document.createElement('div');eventSupport[event]='on'+event in divElm;} +return eventSupport[event];},csp:csp(),vendorPrefix:vendorPrefix,transitions:transitions,animations:animations,msie:msie};}];} +function $TimeoutProvider(){this.$get=['$rootScope','$browser','$q','$exceptionHandler',function($rootScope,$browser,$q,$exceptionHandler){var deferreds={};function timeout(fn,delay,invokeApply){var deferred=$q.defer(),promise=deferred.promise,skipApply=(isDefined(invokeApply)&&!invokeApply),timeoutId;timeoutId=$browser.defer(function(){try{deferred.resolve(fn());}catch(e){deferred.reject(e);$exceptionHandler(e);} +finally{delete deferreds[promise.$$timeoutId];} +if(!skipApply)$rootScope.$apply();},delay);promise.$$timeoutId=timeoutId;deferreds[timeoutId]=deferred;return promise;} +timeout.cancel=function(promise){if(promise&&promise.$$timeoutId in deferreds){deferreds[promise.$$timeoutId].reject('canceled');delete deferreds[promise.$$timeoutId];return $browser.defer.cancel(promise.$$timeoutId);} +return false;};return timeout;}];} +var urlParsingNode=document.createElement("a");var windowsFilePathExp=/^\/?.*?:(\/.*)/;var originUrl=urlResolve(window.location.href,true);function urlResolve(url,base){var href=url,pathname;if(msie){urlParsingNode.setAttribute("href",href);href=urlParsingNode.href;} +urlParsingNode.setAttribute('href',href);pathname=removeWindowsDriveName(urlParsingNode.pathname,url,base);pathname=(pathname.charAt(0)==='/')?pathname:'/'+pathname;return{href:urlParsingNode.href,protocol:urlParsingNode.protocol?urlParsingNode.protocol.replace(/:$/,''):'',host:urlParsingNode.host,search:urlParsingNode.search?urlParsingNode.search.replace(/^\?/,''):'',hash:urlParsingNode.hash?urlParsingNode.hash.replace(/^#/,''):'',hostname:urlParsingNode.hostname,port:urlParsingNode.port,pathname:pathname};} +function urlIsSameOrigin(requestUrl){var parsed=(isString(requestUrl))?urlResolve(requestUrl):requestUrl;return(parsed.protocol===originUrl.protocol&&parsed.host===originUrl.host);} +function removeWindowsDriveName(path,url,base){var firstPathSegmentMatch;if(url.indexOf(base)===0){url=url.replace(base,'');} +if(windowsFilePathExp.exec(url)){return path;} +firstPathSegmentMatch=windowsFilePathExp.exec(path);return firstPathSegmentMatch?firstPathSegmentMatch[1]:path;} +function $WindowProvider(){this.$get=valueFn(window);} +$FilterProvider.$inject=['$provide'];function $FilterProvider($provide){var suffix='Filter';function register(name,factory){if(isObject(name)){var filters={};forEach(name,function(filter,key){filters[key]=register(key,filter);});return filters;}else{return $provide.factory(name+suffix,factory);}} +this.register=register;this.$get=['$injector',function($injector){return function(name){return $injector.get(name+suffix);};}];register('currency',currencyFilter);register('date',dateFilter);register('filter',filterFilter);register('json',jsonFilter);register('limitTo',limitToFilter);register('lowercase',lowercaseFilter);register('number',numberFilter);register('orderBy',orderByFilter);register('uppercase',uppercaseFilter);} +function filterFilter(){return function(array,expression,comparator){if(!isArray(array))return array;var comparatorType=typeof(comparator),predicates=[];predicates.check=function(value){for(var j=0;j-1;};}} +var search=function(obj,text){if(typeof text=='string'&&text.charAt(0)==='!'){return!search(obj,text.substr(1));} +switch(typeof obj){case"boolean":case"number":case"string":return comparator(obj,text);case"object":switch(typeof text){case"object":return comparator(obj,text);default:for(var objKey in obj){if(objKey.charAt(0)!=='$'&&search(obj[objKey],text)){return true;}} +break;} +return false;case"array":for(var i=0;ifractionSize+1){numStr='0';}else{formatedText=numStr;hasExponent=true;}} +if(!hasExponent){var fractionLen=(numStr.split(DECIMAL_SEP)[1]||'').length;if(isUndefined(fractionSize)){fractionSize=Math.min(Math.max(pattern.minFrac,fractionLen),pattern.maxFrac);} +var pow=Math.pow(10,fractionSize);number=Math.round(number*pow)/pow;var fraction=(''+number).split(DECIMAL_SEP);var whole=fraction[0];fraction=fraction[1]||'';var i,pos=0,lgroup=pattern.lgSize,group=pattern.gSize;if(whole.length>=(lgroup+group)){pos=whole.length-lgroup;for(i=0;i0&&number>-1&&number<1){formatedText=number.toFixed(fractionSize);}} +parts.push(isNegative?pattern.negPre:pattern.posPre);parts.push(formatedText);parts.push(isNegative?pattern.negSuf:pattern.posSuf);return parts.join('');} +function padNumber(num,digits,trim){var neg='';if(num<0){neg='-';num=-num;} +num=''+num;while(num.length0||value>-offset) +value+=offset;if(value===0&&offset==-12)value=12;return padNumber(value,size,trim);};} +function dateStrGetter(name,shortForm){return function(date,formats){var value=date['get'+name]();var get=uppercase(shortForm?('SHORT'+name):name);return formats[get][value];};} +function timeZoneGetter(date){var zone=-1*date.getTimezoneOffset();var paddedZone=(zone>=0)?"+":"";paddedZone+=padNumber(Math[zone>0?'floor':'ceil'](zone/60),2)+ +padNumber(Math.abs(zone%60),2);return paddedZone;} +function ampmGetter(date,formats){return date.getHours()<12?formats.AMPMS[0]:formats.AMPMS[1];} +var DATE_FORMATS={yyyy:dateGetter('FullYear',4),yy:dateGetter('FullYear',2,0,true),y:dateGetter('FullYear',1),MMMM:dateStrGetter('Month'),MMM:dateStrGetter('Month',true),MM:dateGetter('Month',2,1),M:dateGetter('Month',1,1),dd:dateGetter('Date',2),d:dateGetter('Date',1),HH:dateGetter('Hours',2),H:dateGetter('Hours',1),hh:dateGetter('Hours',2,-12),h:dateGetter('Hours',1,-12),mm:dateGetter('Minutes',2),m:dateGetter('Minutes',1),ss:dateGetter('Seconds',2),s:dateGetter('Seconds',1),sss:dateGetter('Milliseconds',3),EEEE:dateStrGetter('Day'),EEE:dateStrGetter('Day',true),a:ampmGetter,Z:timeZoneGetter};var DATE_FORMATS_SPLIT=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,NUMBER_STRING=/^\-?\d+$/;dateFilter.$inject=['$locale'];function dateFilter($locale){var R_ISO8601_STR=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;function jsonStringToDate(string){var match;if(match=string.match(R_ISO8601_STR)){var date=new Date(0),tzHour=0,tzMin=0,dateSetter=match[8]?date.setUTCFullYear:date.setFullYear,timeSetter=match[8]?date.setUTCHours:date.setHours;if(match[9]){tzHour=int(match[9]+match[10]);tzMin=int(match[9]+match[11]);} +dateSetter.call(date,int(match[1]),int(match[2])-1,int(match[3]));var h=int(match[4]||0)-tzHour;var m=int(match[5]||0)-tzMin;var s=int(match[6]||0);var ms=Math.round(parseFloat('0.'+(match[7]||0))*1000);timeSetter.call(date,h,m,s,ms);return date;} +return string;} +return function(date,format){var text='',parts=[],fn,match;format=format||'mediumDate';format=$locale.DATETIME_FORMATS[format]||format;if(isString(date)){if(NUMBER_STRING.test(date)){date=int(date);}else{date=jsonStringToDate(date);}} +if(isNumber(date)){date=new Date(date);} +if(!isDate(date)){return date;} +while(format){match=DATE_FORMATS_SPLIT.exec(format);if(match){parts=concat(parts,match,1);format=parts.pop();}else{parts.push(format);format=null;}} +forEach(parts,function(value){fn=DATE_FORMATS[value];text+=fn?fn(date,$locale.DATETIME_FORMATS):value.replace(/(^'|'$)/g,'').replace(/''/g,"'");});return text;};} +function jsonFilter(){return function(object){return toJson(object,true);};} +var lowercaseFilter=valueFn(lowercase);var uppercaseFilter=valueFn(uppercase);function limitToFilter(){return function(input,limit){if(!isArray(input)&&!isString(input))return input;limit=int(limit);if(isString(input)){if(limit){return limit>=0?input.slice(0,limit):input.slice(limit,input.length);}else{return"";}} +var out=[],i,n;if(limit>input.length) +limit=input.length;else if(limit<-input.length) +limit=-input.length;if(limit>0){i=0;n=limit;}else{i=input.length+limit;n=input.length;} +for(;imaxlength){ctrl.$setValidity('maxlength',false);return undefined;}else{ctrl.$setValidity('maxlength',true);return value;}};ctrl.$parsers.push(maxLengthValidator);ctrl.$formatters.push(maxLengthValidator);}} +function numberInputType(scope,element,attr,ctrl,$sniffer,$browser){textInputType(scope,element,attr,ctrl,$sniffer,$browser);ctrl.$parsers.push(function(value){var empty=ctrl.$isEmpty(value);if(empty||NUMBER_REGEXP.test(value)){ctrl.$setValidity('number',true);return value===''?null:(empty?value:parseFloat(value));}else{ctrl.$setValidity('number',false);return undefined;}});ctrl.$formatters.push(function(value){return ctrl.$isEmpty(value)?'':''+value;});if(attr.min){var minValidator=function(value){var min=parseFloat(attr.min);if(!ctrl.$isEmpty(value)&&valuemax){ctrl.$setValidity('max',false);return undefined;}else{ctrl.$setValidity('max',true);return value;}};ctrl.$parsers.push(maxValidator);ctrl.$formatters.push(maxValidator);} +ctrl.$formatters.push(function(value){if(ctrl.$isEmpty(value)||isNumber(value)){ctrl.$setValidity('number',true);return value;}else{ctrl.$setValidity('number',false);return undefined;}});} +function urlInputType(scope,element,attr,ctrl,$sniffer,$browser){textInputType(scope,element,attr,ctrl,$sniffer,$browser);var urlValidator=function(value){if(ctrl.$isEmpty(value)||URL_REGEXP.test(value)){ctrl.$setValidity('url',true);return value;}else{ctrl.$setValidity('url',false);return undefined;}};ctrl.$formatters.push(urlValidator);ctrl.$parsers.push(urlValidator);} +function emailInputType(scope,element,attr,ctrl,$sniffer,$browser){textInputType(scope,element,attr,ctrl,$sniffer,$browser);var emailValidator=function(value){if(ctrl.$isEmpty(value)||EMAIL_REGEXP.test(value)){ctrl.$setValidity('email',true);return value;}else{ctrl.$setValidity('email',false);return undefined;}};ctrl.$formatters.push(emailValidator);ctrl.$parsers.push(emailValidator);} +function radioInputType(scope,element,attr,ctrl){if(isUndefined(attr.name)){element.attr('name',nextUid());} +element.on('click',function(){if(element[0].checked){scope.$apply(function(){ctrl.$setViewValue(attr.value);});}});ctrl.$render=function(){var value=attr.value;element[0].checked=(value==ctrl.$viewValue);};attr.$observe('value',ctrl.$render);} +function checkboxInputType(scope,element,attr,ctrl){var trueValue=attr.ngTrueValue,falseValue=attr.ngFalseValue;if(!isString(trueValue))trueValue=true;if(!isString(falseValue))falseValue=false;element.on('click',function(){scope.$apply(function(){ctrl.$setViewValue(element[0].checked);});});ctrl.$render=function(){element[0].checked=ctrl.$viewValue;};ctrl.$isEmpty=function(value){return value!==trueValue;};ctrl.$formatters.push(function(value){return value===trueValue;});ctrl.$parsers.push(function(value){return value?trueValue:falseValue;});} +var inputDirective=['$browser','$sniffer',function($browser,$sniffer){return{restrict:'E',require:'?ngModel',link:function(scope,element,attr,ctrl){if(ctrl){(inputType[lowercase(attr.type)]||inputType.text)(scope,element,attr,ctrl,$sniffer,$browser);}}};}];var VALID_CLASS='ng-valid',INVALID_CLASS='ng-invalid',PRISTINE_CLASS='ng-pristine',DIRTY_CLASS='ng-dirty';var NgModelController=['$scope','$exceptionHandler','$attrs','$element','$parse',function($scope,$exceptionHandler,$attr,$element,$parse){this.$viewValue=Number.NaN;this.$modelValue=Number.NaN;this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$pristine=true;this.$dirty=false;this.$valid=true;this.$invalid=false;this.$name=$attr.name;var ngModelGet=$parse($attr.ngModel),ngModelSet=ngModelGet.assign;if(!ngModelSet){throw minErr('ngModel')('nonassign',"Expression '{0}' is non-assignable. Element: {1}",$attr.ngModel,startingTag($element));} +this.$render=noop;this.$isEmpty=function(value){return isUndefined(value)||value===''||value===null||value!==value;};var parentForm=$element.inheritedData('$formController')||nullFormCtrl,invalidCount=0,$error=this.$error={};$element.addClass(PRISTINE_CLASS);toggleValidCss(true);function toggleValidCss(isValid,validationErrorKey){validationErrorKey=validationErrorKey?'-'+snake_case(validationErrorKey,'-'):'';$element.removeClass((isValid?INVALID_CLASS:VALID_CLASS)+validationErrorKey).addClass((isValid?VALID_CLASS:INVALID_CLASS)+validationErrorKey);} +this.$setValidity=function(validationErrorKey,isValid){if($error[validationErrorKey]===!isValid)return;if(isValid){if($error[validationErrorKey])invalidCount--;if(!invalidCount){toggleValidCss(true);this.$valid=true;this.$invalid=false;}}else{toggleValidCss(false);this.$invalid=true;this.$valid=false;invalidCount++;} +$error[validationErrorKey]=!isValid;toggleValidCss(isValid,validationErrorKey);parentForm.$setValidity(validationErrorKey,isValid,this);};this.$setPristine=function(){this.$dirty=false;this.$pristine=true;$element.removeClass(DIRTY_CLASS).addClass(PRISTINE_CLASS);};this.$setViewValue=function(value){this.$viewValue=value;if(this.$pristine){this.$dirty=true;this.$pristine=false;$element.removeClass(PRISTINE_CLASS).addClass(DIRTY_CLASS);parentForm.$setDirty();} +forEach(this.$parsers,function(fn){value=fn(value);});if(this.$modelValue!==value){this.$modelValue=value;ngModelSet($scope,value);forEach(this.$viewChangeListeners,function(listener){try{listener();}catch(e){$exceptionHandler(e);}});}};var ctrl=this;$scope.$watch(function ngModelWatch(){var value=ngModelGet($scope);if(ctrl.$modelValue!==value){var formatters=ctrl.$formatters,idx=formatters.length;ctrl.$modelValue=value;while(idx--){value=formatters[idx](value);} +if(ctrl.$viewValue!==value){ctrl.$viewValue=value;ctrl.$render();}}});}];var ngModelDirective=function(){return{require:['ngModel','^?form'],controller:NgModelController,link:function(scope,element,attr,ctrls){var modelCtrl=ctrls[0],formCtrl=ctrls[1]||nullFormCtrl;formCtrl.$addControl(modelCtrl);scope.$on('$destroy',function(){formCtrl.$removeControl(modelCtrl);});}};};var ngChangeDirective=valueFn({require:'ngModel',link:function(scope,element,attr,ctrl){ctrl.$viewChangeListeners.push(function(){scope.$eval(attr.ngChange);});}});var requiredDirective=function(){return{require:'?ngModel',link:function(scope,elm,attr,ctrl){if(!ctrl)return;attr.required=true;var validator=function(value){if(attr.required&&ctrl.$isEmpty(value)){ctrl.$setValidity('required',false);return;}else{ctrl.$setValidity('required',true);return value;}};ctrl.$formatters.push(validator);ctrl.$parsers.unshift(validator);attr.$observe('required',function(){validator(ctrl.$viewValue);});}};};var ngListDirective=function(){return{require:'ngModel',link:function(scope,element,attr,ctrl){var match=/\/(.*)\//.exec(attr.ngList),separator=match&&new RegExp(match[1])||attr.ngList||',';var parse=function(viewValue){if(isUndefined(viewValue))return;var list=[];if(viewValue){forEach(viewValue.split(separator),function(value){if(value)list.push(trim(value));});} +return list;};ctrl.$parsers.push(parse);ctrl.$formatters.push(function(value){if(isArray(value)){return value.join(', ');} +return undefined;});ctrl.$isEmpty=function(value){return!value||!value.length;};}};};var CONSTANT_VALUE_REGEXP=/^(true|false|\d+)$/;var ngValueDirective=function(){return{priority:100,compile:function(tpl,tplAttr){if(CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue)){return function ngValueConstantLink(scope,elm,attr){attr.$set('value',scope.$eval(attr.ngValue));};}else{return function ngValueLink(scope,elm,attr){scope.$watch(attr.ngValue,function valueWatchAction(value){attr.$set('value',value);});};}}};};var ngBindDirective=ngDirective(function(scope,element,attr){element.addClass('ng-binding').data('$binding',attr.ngBind);scope.$watch(attr.ngBind,function ngBindWatchAction(value){element.text(value==undefined?'':value);});});var ngBindTemplateDirective=['$interpolate',function($interpolate){return function(scope,element,attr){var interpolateFn=$interpolate(element.attr(attr.$attr.ngBindTemplate));element.addClass('ng-binding').data('$binding',interpolateFn);attr.$observe('ngBindTemplate',function(value){element.text(value);});};}];var ngBindHtmlDirective=['$sce','$parse',function($sce,$parse){return function(scope,element,attr){element.addClass('ng-binding').data('$binding',attr.ngBindHtml);var parsed=$parse(attr.ngBindHtml);function getStringValue(){return(parsed(scope)||'').toString();} +scope.$watch(getStringValue,function ngBindHtmlWatchAction(value){element.html($sce.getTrustedHtml(parsed(scope))||'');});};}];function classDirective(name,selector){name='ngClass'+name;return function(){return{restrict:'AC',link:function(scope,element,attr){var oldVal;scope.$watch(attr[name],ngClassWatchAction,true);attr.$observe('class',function(value){ngClassWatchAction(scope.$eval(attr[name]));});if(name!=='ngClass'){scope.$watch('$index',function($index,old$index){var mod=$index&1;if(mod!==old$index&1){if(mod===selector){addClass(scope.$eval(attr[name]));}else{removeClass(scope.$eval(attr[name]));}}});} +function ngClassWatchAction(newVal){if(selector===true||scope.$index%2===selector){if(oldVal&&!equals(newVal,oldVal)){removeClass(oldVal);} +addClass(newVal);} +oldVal=copy(newVal);} +function removeClass(classVal){attr.$removeClass(flattenClasses(classVal));} +function addClass(classVal){attr.$addClass(flattenClasses(classVal));} +function flattenClasses(classVal){if(isArray(classVal)){return classVal.join(' ');}else if(isObject(classVal)){var classes=[],i=0;forEach(classVal,function(v,k){if(v){classes.push(k);}});return classes.join(' ');} +return classVal;}}};};} +var ngClassDirective=classDirective('',true);var ngClassOddDirective=classDirective('Odd',0);var ngClassEvenDirective=classDirective('Even',1);var ngCloakDirective=ngDirective({compile:function(element,attr){attr.$set('ngCloak',undefined);element.removeClass('ng-cloak');}});var ngControllerDirective=[function(){return{scope:true,controller:'@'};}];var ngEventDirectives={};forEach('click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste'.split(' '),function(name){var directiveName=directiveNormalize('ng-'+name);ngEventDirectives[directiveName]=['$parse',function($parse){return{compile:function($element,attr){var fn=$parse(attr[directiveName]);return function(scope,element,attr){element.on(lowercase(name),function(event){scope.$apply(function(){fn(scope,{$event:event});});});};}};}];});var ngIfDirective=['$animate',function($animate){return{transclude:'element',priority:600,terminal:true,restrict:'A',$$tlb:true,link:function($scope,$element,$attr,ctrl,$transclude){var block,childScope;$scope.$watch($attr.ngIf,function ngIfWatchAction(value){if(toBoolean(value)){if(!childScope){childScope=$scope.$new();$transclude(childScope,function(clone){block={startNode:clone[0],endNode:clone[clone.length++]=document.createComment(' end ngIf: '+$attr.ngIf+' ')};$animate.enter(clone,$element.parent(),$element);});}}else{if(childScope){childScope.$destroy();childScope=null;} +if(block){$animate.leave(getBlockElements(block));block=null;}}});}};}];var ngIncludeDirective=['$http','$templateCache','$anchorScroll','$compile','$animate','$sce',function($http,$templateCache,$anchorScroll,$compile,$animate,$sce){return{restrict:'ECA',priority:400,terminal:true,transclude:'element',compile:function(element,attr){var srcExp=attr.ngInclude||attr.src,onloadExp=attr.onload||'',autoScrollExp=attr.autoscroll;return function(scope,$element,$attr,ctrl,$transclude){var changeCounter=0,currentScope,currentElement;var cleanupLastIncludeContent=function(){if(currentScope){currentScope.$destroy();currentScope=null;} +if(currentElement){$animate.leave(currentElement);currentElement=null;}};scope.$watch($sce.parseAsResourceUrl(srcExp),function ngIncludeWatchAction(src){var afterAnimation=function(){if(isDefined(autoScrollExp)&&(!autoScrollExp||scope.$eval(autoScrollExp))){$anchorScroll();}};var thisChangeId=++changeCounter;if(src){$http.get(src,{cache:$templateCache}).success(function(response){if(thisChangeId!==changeCounter)return;var newScope=scope.$new();$transclude(newScope,function(clone){cleanupLastIncludeContent();currentScope=newScope;currentElement=clone;currentElement.html(response);$animate.enter(currentElement,null,$element,afterAnimation);$compile(currentElement.contents())(currentScope);currentScope.$emit('$includeContentLoaded');scope.$eval(onloadExp);});}).error(function(){if(thisChangeId===changeCounter)cleanupLastIncludeContent();});scope.$emit('$includeContentRequested');}else{cleanupLastIncludeContent();}});};}};}];var ngInitDirective=ngDirective({compile:function(){return{pre:function(scope,element,attrs){scope.$eval(attrs.ngInit);}};}});var ngNonBindableDirective=ngDirective({terminal:true,priority:1000});var ngPluralizeDirective=['$locale','$interpolate',function($locale,$interpolate){var BRACE=/{}/g;return{restrict:'EA',link:function(scope,element,attr){var numberExp=attr.count,whenExp=attr.$attr.when&&element.attr(attr.$attr.when),offset=attr.offset||0,whens=scope.$eval(whenExp)||{},whensExpFns={},startSymbol=$interpolate.startSymbol(),endSymbol=$interpolate.endSymbol(),isWhen=/^when(Minus)?(.+)$/;forEach(attr,function(expression,attributeName){if(isWhen.test(attributeName)){whens[lowercase(attributeName.replace('when','').replace('Minus','-'))]=element.attr(attr.$attr[attributeName]);}});forEach(whens,function(expression,key){whensExpFns[key]=$interpolate(expression.replace(BRACE,startSymbol+numberExp+'-'+ +offset+endSymbol));});scope.$watch(function ngPluralizeWatch(){var value=parseFloat(scope.$eval(numberExp));if(!isNaN(value)){if(!(value in whens))value=$locale.pluralCat(value-offset);return whensExpFns[value](scope,element,true);}else{return'';}},function ngPluralizeWatchAction(newVal){element.text(newVal);});}};}];var ngRepeatDirective=['$parse','$animate',function($parse,$animate){var NG_REMOVED='$$NG_REMOVED';var ngRepeatMinErr=minErr('ngRepeat');return{transclude:'element',priority:1000,terminal:true,$$tlb:true,link:function($scope,$element,$attr,ctrl,$transclude){var expression=$attr.ngRepeat;var match=expression.match(/^\s*(.+)\s+in\s+(.*?)\s*(\s+track\s+by\s+(.+)\s*)?$/),trackByExp,trackByExpGetter,trackByIdExpFn,trackByIdArrayFn,trackByIdObjFn,lhs,rhs,valueIdentifier,keyIdentifier,hashFnLocals={$id:hashKey};if(!match){throw ngRepeatMinErr('iexp',"Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",expression);} +lhs=match[1];rhs=match[2];trackByExp=match[4];if(trackByExp){trackByExpGetter=$parse(trackByExp);trackByIdExpFn=function(key,value,index){if(keyIdentifier)hashFnLocals[keyIdentifier]=key;hashFnLocals[valueIdentifier]=value;hashFnLocals.$index=index;return trackByExpGetter($scope,hashFnLocals);};}else{trackByIdArrayFn=function(key,value){return hashKey(value);};trackByIdObjFn=function(key){return key;};} +match=lhs.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!match){throw ngRepeatMinErr('iidexp',"'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",lhs);} +valueIdentifier=match[3]||match[1];keyIdentifier=match[2];var lastBlockMap={};$scope.$watchCollection(rhs,function ngRepeatAction(collection){var index,length,previousNode=$element[0],nextNode,nextBlockMap={},arrayLength,childScope,key,value,trackById,trackByIdFn,collectionKeys,block,nextBlockOrder=[],elementsToRemove;if(isArrayLike(collection)){collectionKeys=collection;trackByIdFn=trackByIdExpFn||trackByIdArrayFn;}else{trackByIdFn=trackByIdExpFn||trackByIdObjFn;collectionKeys=[];for(key in collection){if(collection.hasOwnProperty(key)&&key.charAt(0)!='$'){collectionKeys.push(key);}} +collectionKeys.sort();} +arrayLength=collectionKeys.length;length=nextBlockOrder.length=collectionKeys.length;for(index=0;indexindex){existingOptions.pop().element.remove();}} +while(optionGroupsCache.length>groupIndex){optionGroupsCache.pop()[0].element.remove();}}}}};}];var optionDirective=['$interpolate',function($interpolate){var nullSelectCtrl={addOption:noop,removeOption:noop};return{restrict:'E',priority:100,compile:function(element,attr){if(isUndefined(attr.value)){var interpolateFn=$interpolate(element.text(),true);if(!interpolateFn){attr.$set('value',element.text());}} +return function(scope,element,attr){var selectCtrlName='$selectController',parent=element.parent(),selectCtrl=parent.data(selectCtrlName)||parent.parent().data(selectCtrlName);if(selectCtrl&&selectCtrl.databound){element.prop('selected',false);}else{selectCtrl=nullSelectCtrl;} +if(interpolateFn){scope.$watch(interpolateFn,function interpolateWatchAction(newVal,oldVal){attr.$set('value',newVal);if(newVal!==oldVal)selectCtrl.removeOption(oldVal);selectCtrl.addOption(newVal);});}else{selectCtrl.addOption(attr.value);} +element.on('$destroy',function(){selectCtrl.removeOption(attr.value);});};}};}];var styleDirective=valueFn({restrict:'E',terminal:true});bindJQuery();publishExternalAPI(angular);jqLite(document).ready(function(){angularInit(document,bootstrap);});})(window,document);!angular.$$csp()&&angular.element(document).find('head').prepend('');var Horizon=function(){var horizon={},initFunctions=[];horizon.addInitFunction=function(fn){initFunctions.push(fn);};horizon.init=function(){for(var i=0;isize){if(includeEllipsis){return string.substring(0,(size-3))+"…";} +return string.substring(0,size);} +return string;},loadAngular:function(element){try{$compile(element)($rootScope);$rootScope.$apply();}catch(err){}}};} +angular.module('hz.utils.hzUtils',['hz.conf']).service('hzUtils',['hzConfig','$log','$rootScope','$compile',utils]);angular.module('hz.utils',['hz.utils.hzUtils']);}());(function($){$.cookie=function(key,value,options){if(arguments.length>1&&(!/Object/.test(Object.prototype.toString.call(value))||value===null||value===undefined)){options=$.extend({},options);if(value===null||value===undefined){options.expires=-1;} +if(typeof options.expires==='number'){var days=options.expires,t=options.expires=new Date();t.setDate(t.getDate()+days);} +value=String(value);return(document.cookie=[encodeURIComponent(key),'=',options.raw?value:encodeURIComponent(value),options.expires?'; expires='+options.expires.toUTCString():'',options.path?'; path='+options.path:'',options.domain?'; domain='+options.domain:'',options.secure?'; secure':''].join(''));} +options=value||{};var decode=options.raw?function(s){return s;}:decodeURIComponent;var pairs=document.cookie.split('; ');for(var i=0,pair;pair=pairs[i]&&pairs[i].split('=');i++){if(decode(pair[0])===key)return decode(pair[1]||'');} +return null;};})(jQuery);(function($,window,document,undefined){$.fn.quicksearch=function(target,opt){var timeout,cache,rowcache,jq_results,val='',e=this,options=$.extend({delay:100,selector:null,stripeRows:null,loader:null,noResults:'',bind:'keyup',onBefore:function(){return;},onAfter:function(){return;},show:function(){this.style.display="";},hide:function(){this.style.display="none";},prepareQuery:function(val){return val.toLowerCase().split(' ');},testQuery:function(query,txt,_row){for(var i=0;i','g'),"");output=$.trim(output.toLowerCase());return output;};this.results=function(bool){if(typeof options.noResults==="string"&&options.noResults!==""){if(bool){$(options.noResults).hide();}else{$(options.noResults).show();}} +return this;};this.loader=function(bool){if(typeof options.loader==="string"&&options.loader!==""){(bool)?$(options.loader).show():$(options.loader).hide();} +return this;};this.cache=function(){jq_results=$(target);if(typeof options.noResults==="string"&&options.noResults!==""){jq_results=jq_results.not(options.noResults);} +var t=(typeof options.selector==="string")?jq_results.find(options.selector):$(target).not(options.noResults);cache=t.map(function(){return e.strip_html(this.innerHTML);});rowcache=jq_results.map(function(){return this;});return this.go();};this.trigger=function(){this.loader(true);options.onBefore();window.clearTimeout(timeout);timeout=window.setTimeout(function(){e.go();},options.delay);return this;};this.cache();this.results(true);this.stripe();this.loader(false);return this.each(function(){$(this).bind(options.bind,function(){val=$(this).val();e.trigger();});});};}(jQuery,this,document));!(function($){"use strict";$.extend({tablesorter:new function(){var ts=this;ts.version="2.14.5";ts.parsers=[];ts.widgets=[];ts.defaults={theme:'default',widthFixed:false,showProcessing:false,headerTemplate:'{content}',onRenderTemplate:null,onRenderHeader:null,cancelSelection:true,tabIndex:true,dateFormat:'mmddyyyy',sortMultiSortKey:'shiftKey',sortResetKey:'ctrlKey',usNumberFormat:true,delayInit:false,serverSideSorting:false,headers:{},ignoreCase:true,sortForce:null,sortList:[],sortAppend:null,sortStable:false,sortInitialOrder:'asc',sortLocaleCompare:false,sortReset:false,sortRestart:false,emptyTo:'bottom',stringTo:'max',textExtraction:'simple',textSorter:null,numberSorter:null,widgets:[],widgetOptions:{zebra:['even','odd']},initWidgets:true,initialized:null,tableClass:'',cssAsc:'',cssDesc:'',cssHeader:'',cssHeaderRow:'',cssProcessing:'',cssChildRow:'tablesorter-childRow',cssIcon:'tablesorter-icon',cssInfoBlock:'tablesorter-infoOnly',selectorHeaders:'> thead th, > thead td',selectorSort:'th, td',selectorRemove:'.remove-me',debug:false,headerList:[],empties:{},strings:{},parsers:[]};ts.css={table:'tablesorter',childRow:'tablesorter-childRow',header:'tablesorter-header',headerRow:'tablesorter-headerRow',icon:'tablesorter-icon',info:'tablesorter-infoOnly',processing:'tablesorter-processing',sortAsc:'tablesorter-headerAsc',sortDesc:'tablesorter-headerDesc'};function log(){var s=arguments.length>1?Array.prototype.slice.call(arguments):arguments[0];if(typeof console!=="undefined"&&typeof console.log!=="undefined"){console.log(s);}else{alert(s);}} +function benchmark(s,d){log(s+" ("+(new Date().getTime()-d.getTime())+"ms)");} +ts.log=log;ts.benchmark=benchmark;function isEmptyObject(obj){for(var name in obj){return false;} +return true;} +function getElementText(table,node,cellIndex){if(!node){return"";} +var c=table.config,t=c.textExtraction,text="";if(t==="simple"){if(c.supportsTextContent){text=node.textContent;}else{text=$(node).text();}}else{if(typeof t==="function"){text=t(node,table,cellIndex);}else if(typeof t==="object"&&t.hasOwnProperty(cellIndex)){text=t[cellIndex](node,table,cellIndex);}else{text=c.supportsTextContent?node.textContent:$(node).text();}} +return $.trim(text);} +function detectParserForColumn(table,rows,rowIndex,cellIndex){var cur,i=ts.parsers.length,node=false,nodeValue='',keepLooking=true;while(nodeValue===''&&keepLooking){rowIndex++;if(rows[rowIndex]){node=rows[rowIndex].cells[cellIndex];nodeValue=getElementText(table,node,cellIndex);if(table.config.debug){log('Checking if value was empty on row '+rowIndex+', column: '+cellIndex+': "'+nodeValue+'"');}}else{keepLooking=false;}} +while(--i>=0){cur=ts.parsers[i];if(cur&&cur.id!=='text'&&cur.is&&cur.is(nodeValue,table,node)){return cur;}} +return ts.getParserById('text');} +function buildParserCache(table){var c=table.config,tb=c.$tbodies=c.$table.children('tbody:not(.'+c.cssInfoBlock+')'),rows,list,l,i,h,ch,p,time,parsersDebug="";if(tb.length===0){return c.debug?log('*Empty table!* Not building a parser cache'):'';}else if(c.debug){time=new Date();log('Detecting parsers for each column');} +rows=tb[0].rows;if(rows[0]){list=[];l=rows[0].cells.length;for(i=0;i':'';c.$headers=$(table).find(c.selectorHeaders).each(function(index){$t=$(this);ch=c.headers[index];c.headerContent[index]=$(this).html();t=c.headerTemplate.replace(/\{content\}/g,$(this).html()).replace(/\{icon\}/g,i);if(c.onRenderTemplate){h=c.onRenderTemplate.apply($t,[index,t]);if(h&&typeof h==='string'){t=h;}} +$(this).html('
'+t+'
');if(c.onRenderHeader){c.onRenderHeader.apply($t,[index]);} +this.column=header_index[this.parentNode.rowIndex+"-"+this.cellIndex];this.order=formatSortingOrder(ts.getData($t,ch,'sortInitialOrder')||c.sortInitialOrder)?[1,0,2]:[0,1,2];this.count=-1;this.lockedOrder=false;lock=ts.getData($t,ch,'lockedOrder')||false;if(typeof lock!=='undefined'&&lock!==false){this.order=this.lockedOrder=formatSortingOrder(lock)?[1,1,1]:[0,0,0];} +$t.addClass(ts.css.header+' '+c.cssHeader);c.headerList[index]=this;$t.parent().addClass(ts.css.headerRow+' '+c.cssHeaderRow);if(c.tabIndex){$t.attr("tabindex",0);}});updateHeader(table);if(c.debug){benchmark("Built headers:",time);log(c.$headers);}} +function commonUpdate(table,resort,callback){var c=table.config;c.$table.find(c.selectorRemove).remove();buildParserCache(table);buildCache(table);checkResort(c.$table,resort,callback);} +function updateHeader(table){var s,c=table.config;c.$headers.each(function(index,th){s=ts.getData(th,c.headers[index],'sorter')==='false';th.sortDisabled=s;$(th)[s?'addClass':'removeClass']('sorter-false');});} +function setHeadersCss(table){var f,i,j,l,c=table.config,list=c.sortList,css=[ts.css.sortAsc+' '+c.cssAsc,ts.css.sortDesc+' '+c.cssDesc],$t=$(table).find('tfoot tr').children().removeClass(css.join(' '));c.$headers.removeClass(css.join(' '));l=list.length;for(i=0;i'),overallWidth=$(table).width();$(table.tBodies[0]).find("tr:first").children("td:visible").each(function(){colgroup.append($('
').css('width',parseInt(($(this).width()/overallWidth)*1000,10)/10+'%'));});$(table).prepend(colgroup);}} +function updateHeaderSortCount(table,list){var s,t,o,c=table.config,sl=list||c.sortList;c.sortList=[];$.each(sl,function(i,v){s=[parseInt(v[0],10),parseInt(v[1],10)];o=c.$headers[s[0]];if(o){c.sortList.push(s);t=$.inArray(s[1],o.order);o.count=t>=0?t:s[1]%(c.sortReset?3:2);}});} +function getCachedSortType(parsers,i){return(parsers&&parsers[i])?parsers[i].type||'':'';} +function initSort(table,cell,e){var a,i,j,o,s,c=table.config,k=!e[c.sortMultiSortKey],$this=$(table);$this.trigger("sortStart",table);cell.count=e[c.sortResetKey]?2:(cell.count+1)%(c.sortReset?3:2);if(c.sortRestart){i=cell;c.$headers.each(function(){if(this!==i&&(k||!$(this).is('.'+ts.css.sortDesc+',.'+ts.css.sortAsc))){this.count=-1;}});} +i=cell.column;if(k){c.sortList=[];if(c.sortForce!==null){a=c.sortForce;for(j=0;j1){for(j=1;j1){if(ts.isValueInArray(c.sortAppend[0][0],c.sortList)){c.sortList.pop();}} +if(ts.isValueInArray(i,c.sortList)){for(j=0;j1){for(j=1;j250)){return;} +if(e.type==='mousedown'){downTime=new Date().getTime();return e.target.tagName==="INPUT"?'':!c.cancelSelection;} +if(c.delayInit&&isEmptyObject(c.cache)){buildCache(table);} +var $cell=/TH|TD/.test(this.tagName)?$(this):$(this).parents('th, td').filter(':first'),cell=$cell[0];if(!cell.sortDisabled){initSort(table,cell,e);}});if(c.cancelSelection){c.$headers.attr('unselectable','on').bind('selectstart',false).css({'user-select':'none','MozUserSelect':'none'});} +$this.unbind('sortReset update updateRows updateCell updateAll addRows sorton appendCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave '.split(' ').join('.tablesorter ')).bind("sortReset.tablesorter",function(e){e.stopPropagation();c.sortList=[];setHeadersCss(table);multisort(table);appendToTable(table);}).bind("updateAll.tablesorter",function(e,resort,callback){e.stopPropagation();ts.refreshWidgets(table,true,true);ts.restoreHeaders(table);buildHeaders(table);bindEvents(table);commonUpdate(table,resort,callback);}).bind("update.tablesorter updateRows.tablesorter",function(e,resort,callback){e.stopPropagation();updateHeader(table);commonUpdate(table,resort,callback);}).bind("updateCell.tablesorter",function(e,cell,resort,callback){e.stopPropagation();$this.find(c.selectorRemove).remove();var l,row,icell,$tb=$this.find('tbody'),tbdy=$tb.index($(cell).parents('tbody').filter(':first')),$row=$(cell).parents('tr').filter(':first');cell=$(cell)[0];if($tb.length&&tbdy>=0){row=$tb.eq(tbdy).find('tr').index($row);icell=cell.cellIndex;l=c.cache[tbdy].normalized[row].length-1;c.cache[tbdy].row[table.config.cache[tbdy].normalized[row][l]]=$row;c.cache[tbdy].normalized[row][icell]=c.parsers[icell].format(getElementText(table,cell,icell),table,cell,icell);checkResort($this,resort,callback);}}).bind("addRows.tablesorter",function(e,$row,resort,callback){e.stopPropagation();if(isEmptyObject(c.cache)){updateHeader(table);commonUpdate(table,resort,callback);}else{var i,rows=$row.filter('tr').length,dat=[],l=$row[0].cells.length,tbdy=$this.find('tbody').index($row.parents('tbody').filter(':first'));if(!c.parsers){buildParserCache(table);} +for(i=0;ix')[0].textContent==='x';c.supportsDataObject=(function(version){version[0]=parseInt(version[0],10);return(version[0]>1)||(version[0]===1&&parseInt(version[1],10)>=4);})($.fn.jquery.split("."));c.string={'max':1,'min':-1,'max+':1,'max-':-1,'zero':0,'none':0,'null':0,'top':true,'bottom':false};if(!/tablesorter\-/.test($this.attr('class'))){k=(c.theme!==''?' tablesorter-'+c.theme:'');} +c.$table=$this.addClass(ts.css.table+' '+c.tableClass+k);c.$tbodies=$this.children('tbody:not(.'+c.cssInfoBlock+')');c.widgetInit={};buildHeaders(table);fixColumnWidth(table);buildParserCache(table);if(!c.delayInit){buildCache(table);} +bindEvents(table);if(c.supportsDataObject&&typeof $this.data().sortlist!=='undefined'){c.sortList=$this.data().sortlist;}else if(m&&($this.metadata()&&$this.metadata().sortlist)){c.sortList=$this.metadata().sortlist;} +ts.applyWidget(table,true);if(c.sortList.length>0){$this.trigger("sorton",[c.sortList,{},!c.initWidgets]);}else if(c.initWidgets){ts.applyWidget(table);} +if(c.showProcessing){$this.unbind('sortBegin.tablesorter sortEnd.tablesorter').bind('sortBegin.tablesorter sortEnd.tablesorter',function(e){ts.isProcessing(table,e.type==='sortBegin');});} +table.hasInitialized=true;table.isProcessing=false;if(c.debug){ts.benchmark("Overall initialization time",$.data(table,'startoveralltimer'));} +$this.trigger('tablesorter-initialized',table);if(typeof c.initialized==='function'){c.initialized(table);}};ts.isProcessing=function(table,toggle,$ths){table=$(table);var c=table[0].config,$h=$ths||table.find('.'+ts.css.header);if(toggle){if(c.sortList.length>0){$h=$h.filter(function(){return this.sortDisabled?false:ts.isValueInArray(parseFloat($(this).attr('data-column')),c.sortList);});} +$h.addClass(ts.css.processing+' '+c.cssProcessing);}else{$h.removeClass(ts.css.processing+' '+c.cssProcessing);}};ts.processTbody=function(table,$tb,getIt){var holdr;if(getIt){table.isProcessing=true;$tb.before('');holdr=($.fn.detach)?$tb.detach():$tb.remove();return holdr;} +holdr=$(table).find('span.tablesorter-savemyplace');$tb.insertAfter(holdr);holdr.remove();table.isProcessing=false;};ts.clearTableBody=function(table){$(table)[0].config.$tbodies.empty();};ts.restoreHeaders=function(table){var c=table.config;c.$table.find(c.selectorHeaders).each(function(i){if($(this).find('.tablesorter-header-inner').length){$(this).html(c.headerContent[i]);}});};ts.destroy=function(table,removeClasses,callback){table=$(table)[0];if(!table.hasInitialized){return;} +ts.refreshWidgets(table,true,true);var $t=$(table),c=table.config,$h=$t.find('thead:first'),$r=$h.find('tr.'+ts.css.headerRow).removeClass(ts.css.headerRow+' '+c.cssHeaderRow),$f=$t.find('tfoot:first > tr').children('th, td');$h.find('tr').not($r).remove();$t.removeData('tablesorter').unbind('sortReset update updateAll updateRows updateCell addRows sorton appendCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave keypress sortBegin sortEnd '.split(' ').join('.tablesorter '));c.$headers.add($f).removeClass([ts.css.header,c.cssHeader,c.cssAsc,c.cssDesc,ts.css.sortAsc,ts.css.sortDesc].join(' ')).removeAttr('data-column');$r.find(c.selectorSort).unbind('mousedown.tablesorter mouseup.tablesorter keypress.tablesorter');ts.restoreHeaders(table);if(removeClasses!==false){$t.removeClass(ts.css.table+' '+c.tableClass+' tablesorter-'+c.theme);} +table.hasInitialized=false;if(typeof callback==='function'){callback(table);}};ts.regex={chunk:/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,hex:/^0x[0-9a-f]+$/i};ts.sortNatural=function(a,b){if(a===b){return 0;} +var xN,xD,yN,yD,xF,yF,i,mx,r=ts.regex;if(r.hex.test(b)){xD=parseInt(a.match(r.hex),16);yD=parseInt(b.match(r.hex),16);if(xDyD){return 1;}} +xN=a.replace(r.chunk,'\\0$1\\0').replace(/\\0$/,'').replace(/^\\0/,'').split('\\0');yN=b.replace(r.chunk,'\\0$1\\0').replace(/\\0$/,'').replace(/^\\0/,'').split('\\0');mx=Math.max(xN.length,yN.length);for(i=0;iyF){return 1;}} +return 0;};ts.sortNaturalAsc=function(a,b,col,table,c){if(a===b){return 0;} +var e=c.string[(c.empties[col]||c.emptyTo)];if(a===''&&e!==0){return typeof e==='boolean'?(e?-1:1):-e||-1;} +if(b===''&&e!==0){return typeof e==='boolean'?(e?1:-1):e||1;} +return ts.sortNatural(a,b);};ts.sortNaturalDesc=function(a,b,col,table,c){if(a===b){return 0;} +var e=c.string[(c.empties[col]||c.emptyTo)];if(a===''&&e!==0){return typeof e==='boolean'?(e?-1:1):e||1;} +if(b===''&&e!==0){return typeof e==='boolean'?(e?1:-1):-e||-1;} +return ts.sortNatural(b,a);};ts.sortText=function(a,b){return a>b?1:(a1){row=0;$tv=$tb.children('tr:visible').not(c.selectorRemove);$tv.each(function(){$tr=$(this);if(!child.test(this.className)){row++;} +even=(row%2===0);$tr.removeClass(wo.zebra[even?1:0]).addClass(wo.zebra[even?0:1]);});}} +if(c.debug){ts.benchmark("Applying Zebra widget",time);}},remove:function(table,c,wo){var k,$tb,b=c.$tbodies,rmv=(wo.zebra||["even","odd"]).join(' ');for(k=0;k>1):c.left+e)+"px",top:(c.top=="auto"?i.y-h.y+(a.offsetHeight>>1):c.top+e)+"px"})),d.setAttribute("aria-role","progressbar"),b.lines(d,b.opts);if(!f){var j=0,k=c.fps,m=k/c.speed,o=(1-c.opacity)/(m*c.trail/100),p=m/c.lines;!function q(){j++;for(var a=c.lines;a;a--){var e=Math.max(1-(j+a*p)%m*o,c.opacity);b.opacity(d,c.lines-a,e,c)}b.timeout=b.el&&setTimeout(q,~~(1e3/k))}()}return b},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=c),this},lines:function(a,b){function e(a,d){return l(g(),{position:"absolute",width:b.length+b.width+"px",height:b.width+"px",background:a,boxShadow:d,transformOrigin:"left",transform:"rotate("+~~(360/b.lines*c+b.rotate)+"deg) translate("+b.radius+"px"+",0)",borderRadius:(b.width>>1)+"px"})}var c=0,d;for(;c',b)}var b=l(g("group"),{behavior:"url(#default#VML)"});!k(b,"transform")&&b.adj?(i.addRule(".spin-vml","behavior:url(#default#VML)"),p.prototype.lines=function(b,c){function f(){return l(a("group",{coordsize:e+" "+e,coordorigin:-d+" "+-d}),{width:e,height:e})}function k(b,e,g){h(i,h(l(f(),{rotation:360/c.lines*b+"deg",left:~~e}),h(l(a("roundrect",{arcsize:1}),{width:d,height:c.width,left:c.radius,top:-c.width>>1,filter:g}),a("fill",{color:c.color,opacity:c.opacity}),a("stroke",{opacity:0}))))}var d=c.length+c.width,e=2*d,g=-(c.width+c.length)*2+"px",i=l(f(),{position:"absolute",top:g,left:g}),j;if(c.shadow)for(j=1;j<=c.lines;j++)k(j,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(j=1;j<=c.lines;j++)k(j);return h(b,i)},p.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d=0)&&focusable(element,!isTabIndexNaN);}});$(function(){var body=document.body,div=body.appendChild(div=document.createElement("div"));div.offsetHeight;$.extend(div.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});$.support.minHeight=div.offsetHeight===100;$.support.selectstart="onselectstart"in div;body.removeChild(div).style.display="none";});if(!$("").outerWidth(1).jquery){$.each(["Width","Height"],function(i,name){var side=name==="Width"?["Left","Right"]:["Top","Bottom"],type=name.toLowerCase(),orig={innerWidth:$.fn.innerWidth,innerHeight:$.fn.innerHeight,outerWidth:$.fn.outerWidth,outerHeight:$.fn.outerHeight};function reduce(elem,size,border,margin){$.each(side,function(){size-=parseFloat($.css(elem,"padding"+this))||0;if(border){size-=parseFloat($.css(elem,"border"+this+"Width"))||0;} +if(margin){size-=parseFloat($.css(elem,"margin"+this))||0;}});return size;} +$.fn["inner"+name]=function(size){if(size===undefined){return orig["inner"+name].call(this);} +return this.each(function(){$(this).css(type,reduce(this,size)+"px");});};$.fn["outer"+name]=function(size,margin){if(typeof size!=="number"){return orig["outer"+name].call(this,size);} +return this.each(function(){$(this).css(type,reduce(this,size,true,margin)+"px");});};});} +if($("").data("a-b","a").removeData("a-b").data("a-b")){$.fn.removeData=(function(removeData){return function(key){if(arguments.length){return removeData.call(this,$.camelCase(key));}else{return removeData.call(this);}};})($.fn.removeData);} +(function(){var uaMatch=/msie ([\w.]+)/.exec(navigator.userAgent.toLowerCase())||[];$.ui.ie=uaMatch.length?true:false;$.ui.ie6=parseFloat(uaMatch[1],10)===6;})();$.fn.extend({disableSelection:function(){return this.bind(($.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(event){event.preventDefault();});},enableSelection:function(){return this.unbind(".ui-disableSelection");}});$.extend($.ui,{plugin:{add:function(module,option,set){var i,proto=$.ui[module].prototype;for(i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]]);}},call:function(instance,name,args){var i,set=instance.plugins[name];if(!set||!instance.element[0].parentNode||instance.element[0].parentNode.nodeType===11){return;} +for(i=0;i0){return true;} +el[scroll]=1;has=(el[scroll]>0);el[scroll]=0;return has;},isOverAxis:function(x,reference,size){return(x>reference)&&(x<(reference+size));},isOver:function(y,x,top,left,height,width){return $.ui.isOverAxis(y,top,height)&&$.ui.isOverAxis(x,left,width);}});})(jQuery);(function($,undefined){var uuid=0,slice=Array.prototype.slice,_cleanData=$.cleanData;$.cleanData=function(elems){for(var i=0,elem;(elem=elems[i])!=null;i++){try{$(elem).triggerHandler("remove");}catch(e){}} +_cleanData(elems);};$.widget=function(name,base,prototype){var fullName,existingConstructor,constructor,basePrototype,namespace=name.split(".")[0];name=name.split(".")[1];fullName=namespace+"-"+name;if(!prototype){prototype=base;base=$.Widget;} +$.expr[":"][fullName.toLowerCase()]=function(elem){return!!$.data(elem,fullName);};$[namespace]=$[namespace]||{};existingConstructor=$[namespace][name];constructor=$[namespace][name]=function(options,element){if(!this._createWidget){return new constructor(options,element);} +if(arguments.length){this._createWidget(options,element);}};$.extend(constructor,existingConstructor,{version:prototype.version,_proto:$.extend({},prototype),_childConstructors:[]});basePrototype=new base();basePrototype.options=$.widget.extend({},basePrototype.options);$.each(prototype,function(prop,value){if($.isFunction(value)){prototype[prop]=(function(){var _super=function(){return base.prototype[prop].apply(this,arguments);},_superApply=function(args){return base.prototype[prop].apply(this,args);};return function(){var __super=this._super,__superApply=this._superApply,returnValue;this._super=_super;this._superApply=_superApply;returnValue=value.apply(this,arguments);this._super=__super;this._superApply=__superApply;return returnValue;};})();}});constructor.prototype=$.widget.extend(basePrototype,{widgetEventPrefix:existingConstructor?basePrototype.widgetEventPrefix:name},prototype,{constructor:constructor,namespace:namespace,widgetName:name,widgetBaseClass:fullName,widgetFullName:fullName});if(existingConstructor){$.each(existingConstructor._childConstructors,function(i,child){var childPrototype=child.prototype;$.widget(childPrototype.namespace+"."+childPrototype.widgetName,constructor,child._proto);});delete existingConstructor._childConstructors;}else{base._childConstructors.push(constructor);} +$.widget.bridge(name,constructor);};$.widget.extend=function(target){var input=slice.call(arguments,1),inputIndex=0,inputLength=input.length,key,value;for(;inputIndex",options:{disabled:false,create:null},_createWidget:function(options,element){element=$(element||this.defaultElement||this)[0];this.element=$(element);this.uuid=uuid++;this.eventNamespace="."+this.widgetName+this.uuid;this.options=$.widget.extend({},this.options,this._getCreateOptions(),options);this.bindings=$();this.hoverable=$();this.focusable=$();if(element!==this){$.data(element,this.widgetName,this);$.data(element,this.widgetFullName,this);this._on(true,this.element,{remove:function(event){if(event.target===element){this.destroy();}}});this.document=$(element.style?element.ownerDocument:element.document||element);this.window=$(this.document[0].defaultView||this.document[0].parentWindow);} +this._create();this._trigger("create",null,this._getCreateEventData());this._init();},_getCreateOptions:$.noop,_getCreateEventData:$.noop,_create:$.noop,_init:$.noop,destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData($.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:$.noop,widget:function(){return this.element;},option:function(key,value){var options=key,parts,curOption,i;if(arguments.length===0){return $.widget.extend({},this.options);} +if(typeof key==="string"){options={};parts=key.split(".");key=parts.shift();if(parts.length){curOption=options[key]=$.widget.extend({},this.options[key]);for(i=0;i=9)&&!event.button){return this._mouseUp(event);} +if(this._mouseStarted){this._mouseDrag(event);return event.preventDefault();} +if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,event)!==false);(this._mouseStarted?this._mouseDrag(event):this._mouseUp(event));} +return!this._mouseStarted;},_mouseUp:function(event){$(document).unbind('mousemove.'+this.widgetName,this._mouseMoveDelegate).unbind('mouseup.'+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(event.target===this._mouseDownEvent.target){$.data(event.target,this.widgetName+'.preventClickEvent',true);} +this._mouseStop(event);} +return false;},_mouseDistanceMet:function(event){return(Math.max(Math.abs(this._mouseDownEvent.pageX-event.pageX),Math.abs(this._mouseDownEvent.pageY-event.pageY))>=this.options.distance);},_mouseDelayMet:function(event){return this.mouseDelayMet;},_mouseStart:function(event){},_mouseDrag:function(event){},_mouseStop:function(event){},_mouseCapture:function(event){return true;}});})(jQuery);(function($,undefined){$.ui=$.ui||{};var cachedScrollbarWidth,max=Math.max,abs=Math.abs,round=Math.round,rhorizontal=/left|center|right/,rvertical=/top|center|bottom/,roffset=/[\+\-]\d+%?/,rposition=/^\w+/,rpercent=/%$/,_position=$.fn.position;function getOffsets(offsets,width,height){return[parseInt(offsets[0],10)*(rpercent.test(offsets[0])?width/100:1),parseInt(offsets[1],10)*(rpercent.test(offsets[1])?height/100:1)];} +function parseCss(element,property){return parseInt($.css(element,property),10)||0;} +$.position={scrollbarWidth:function(){if(cachedScrollbarWidth!==undefined){return cachedScrollbarWidth;} +var w1,w2,div=$("
"),innerDiv=div.children()[0];$("body").append(div);w1=innerDiv.offsetWidth;div.css("overflow","scroll");w2=innerDiv.offsetWidth;if(w1===w2){w2=div[0].clientWidth;} +div.remove();return(cachedScrollbarWidth=w1-w2);},getScrollInfo:function(within){var overflowX=within.isWindow?"":within.element.css("overflow-x"),overflowY=within.isWindow?"":within.element.css("overflow-y"),hasOverflowX=overflowX==="scroll"||(overflowX==="auto"&&within.width0?"right":"center",vertical:bottom<0?"top":top>0?"bottom":"middle"};if(targetWidthmax(abs(top),abs(bottom))){feedback.important="horizontal";}else{feedback.important="vertical";} +options.using.call(this,props,feedback);};} +elem.offset($.extend(position,{using:using}));});};$.ui.position={fit:{left:function(position,data){var within=data.within,withinOffset=within.isWindow?within.scrollLeft:within.offset.left,outerWidth=within.width,collisionPosLeft=position.left-data.collisionPosition.marginLeft,overLeft=withinOffset-collisionPosLeft,overRight=collisionPosLeft+data.collisionWidth-outerWidth-withinOffset,newOverRight;if(data.collisionWidth>outerWidth){if(overLeft>0&&overRight<=0){newOverRight=position.left+overLeft+data.collisionWidth-outerWidth-withinOffset;position.left+=overLeft-newOverRight;}else if(overRight>0&&overLeft<=0){position.left=withinOffset;}else{if(overLeft>overRight){position.left=withinOffset+outerWidth-data.collisionWidth;}else{position.left=withinOffset;}}}else if(overLeft>0){position.left+=overLeft;}else if(overRight>0){position.left-=overRight;}else{position.left=max(position.left-collisionPosLeft,position.left);}},top:function(position,data){var within=data.within,withinOffset=within.isWindow?within.scrollTop:within.offset.top,outerHeight=data.within.height,collisionPosTop=position.top-data.collisionPosition.marginTop,overTop=withinOffset-collisionPosTop,overBottom=collisionPosTop+data.collisionHeight-outerHeight-withinOffset,newOverBottom;if(data.collisionHeight>outerHeight){if(overTop>0&&overBottom<=0){newOverBottom=position.top+overTop+data.collisionHeight-outerHeight-withinOffset;position.top+=overTop-newOverBottom;}else if(overBottom>0&&overTop<=0){position.top=withinOffset;}else{if(overTop>overBottom){position.top=withinOffset+outerHeight-data.collisionHeight;}else{position.top=withinOffset;}}}else if(overTop>0){position.top+=overTop;}else if(overBottom>0){position.top-=overBottom;}else{position.top=max(position.top-collisionPosTop,position.top);}}},flip:{left:function(position,data){var within=data.within,withinOffset=within.offset.left+within.scrollLeft,outerWidth=within.width,offsetLeft=within.isWindow?within.scrollLeft:within.offset.left,collisionPosLeft=position.left-data.collisionPosition.marginLeft,overLeft=collisionPosLeft-offsetLeft,overRight=collisionPosLeft+data.collisionWidth-outerWidth-offsetLeft,myOffset=data.my[0]==="left"?-data.elemWidth:data.my[0]==="right"?data.elemWidth:0,atOffset=data.at[0]==="left"?data.targetWidth:data.at[0]==="right"?-data.targetWidth:0,offset=-2*data.offset[0],newOverRight,newOverLeft;if(overLeft<0){newOverRight=position.left+myOffset+atOffset+offset+data.collisionWidth-outerWidth-withinOffset;if(newOverRight<0||newOverRight0){newOverLeft=position.left-data.collisionPosition.marginLeft+myOffset+atOffset+offset-offsetLeft;if(newOverLeft>0||abs(newOverLeft)overTop&&(newOverBottom<0||newOverBottom0){newOverTop=position.top-data.collisionPosition.marginTop+myOffset+atOffset+offset-offsetTop;if((position.top+myOffset+atOffset+offset)>overBottom&&(newOverTop>0||abs(newOverTop)10&&offsetLeft<11;testElement.innerHTML="";testElementParent.removeChild(testElement);})();if($.uiBackCompat!==false){(function($){var _position=$.fn.position;$.fn.position=function(options){if(!options||!options.offset){return _position.call(this,options);} +var offset=options.offset.split(" "),at=options.at.split(" ");if(offset.length===1){offset[1]=offset[0];} +if(/^\d/.test(offset[0])){offset[0]="+"+offset[0];} +if(/^\d/.test(offset[1])){offset[1]="+"+offset[1];} +if(at.length===1){if(/left|center|right/.test(at[0])){at[1]="center";}else{at[1]=at[0];at[0]="center";}} +return _position.call(this,$.extend(options,{at:at[0]+offset[0]+" "+at[1]+offset[1],offset:undefined}));};}(jQuery));}}(jQuery));(function($,undefined){$.widget("ui.draggable",$.ui.mouse,{version:"1.9.2",widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(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(event){var o=this.options;if(this.helper||o.disabled||$(event.target).is('.ui-resizable-handle')) +return false;this.handle=this._getHandle(event);if(!this.handle) +return false;$(o.iframeFix===true?"iframe":o.iframeFix).each(function(){$('
').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css($(this).offset()).appendTo("body");});return true;},_mouseStart:function(event){var o=this.options;this.helper=this._createHelper(event);this.helper.addClass("ui-draggable-dragging");this._cacheHelperProportions();if($.ui.ddmanager) +$.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};$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(event);this.originalPageX=event.pageX;this.originalPageY=event.pageY;(o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt));if(o.containment) +this._setContainment();if(this._trigger("start",event)===false){this._clear();return false;} +this._cacheHelperProportions();if($.ui.ddmanager&&!o.dropBehaviour) +$.ui.ddmanager.prepareOffsets(this,event);this._mouseDrag(event,true);if($.ui.ddmanager)$.ui.ddmanager.dragStart(this,event);return true;},_mouseDrag:function(event,noPropagation){this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!noPropagation){var ui=this._uiHash();if(this._trigger('drag',event,ui)===false){this._mouseUp({});return false;} +this.position=ui.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';if($.ui.ddmanager)$.ui.ddmanager.drag(this,event);return false;},_mouseStop:function(event){var dropped=false;if($.ui.ddmanager&&!this.options.dropBehaviour) +dropped=$.ui.ddmanager.drop(this,event);if(this.dropped){dropped=this.dropped;this.dropped=false;} +var element=this.element[0],elementInDom=false;while(element&&(element=element.parentNode)){if(element==document){elementInDom=true;}} +if(!elementInDom&&this.options.helper==="original") +return false;if((this.options.revert=="invalid"&&!dropped)||(this.options.revert=="valid"&&dropped)||this.options.revert===true||($.isFunction(this.options.revert)&&this.options.revert.call(this.element,dropped))){var that=this;$(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){if(that._trigger("stop",event)!==false){that._clear();}});}else{if(this._trigger("stop",event)!==false){this._clear();}} +return false;},_mouseUp:function(event){$("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this);});if($.ui.ddmanager)$.ui.ddmanager.dragStop(this,event);return $.ui.mouse.prototype._mouseUp.call(this,event);},cancel:function(){if(this.helper.is(".ui-draggable-dragging")){this._mouseUp({});}else{this._clear();} +return this;},_getHandle:function(event){var handle=!this.options.handle||!$(this.options.handle,this.element).length?true:false;$(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==event.target)handle=true;});return handle;},_createHelper:function(event){var o=this.options;var helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[event])):(o.helper=='clone'?this.element.clone().removeAttr('id'):this.element);if(!helper.parents('body').length) +helper.appendTo((o.appendTo=='parent'?this.element[0].parentNode:o.appendTo));if(helper[0]!=this.element[0]&&!(/(fixed|absolute)/).test(helper.css("position"))) +helper.css("position","absolute");return helper;},_adjustOffsetFromHelper:function(obj){if(typeof obj=='string'){obj=obj.split(' ');} +if($.isArray(obj)){obj={left:+obj[0],top:+obj[1]||0};} +if('left'in obj){this.offset.click.left=obj.left+this.margins.left;} +if('right'in obj){this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left;} +if('top'in obj){this.offset.click.top=obj.top+this.margins.top;} +if('bottom'in obj){this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top;}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();if(this.cssPosition=='absolute'&&this.scrollParent[0]!=document&&$.contains(this.scrollParent[0],this.offsetParent[0])){po.left+=this.scrollParent.scrollLeft();po.top+=this.scrollParent.scrollTop();} +if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=='html'&&$.ui.ie)) +po={top:0,left:0};return{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var p=this.element.position();return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()};}else{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 o=this.options;if(o.containment=='parent')o.containment=this.helper[0].parentNode;if(o.containment=='document'||o.containment=='window')this.containment=[o.containment=='document'?0:$(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,o.containment=='document'?0:$(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(o.containment=='document'?0:$(window).scrollLeft())+$(o.containment=='document'?document:window).width()-this.helperProportions.width-this.margins.left,(o.containment=='document'?0:$(window).scrollTop())+($(o.containment=='document'?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!(/^(document|window|parent)$/).test(o.containment)&&o.containment.constructor!=Array){var c=$(o.containment);var ce=c[0];if(!ce)return;var co=c.offset();var over=($(ce).css("overflow")!='hidden');this.containment=[(parseInt($(ce).css("borderLeftWidth"),10)||0)+(parseInt($(ce).css("paddingLeft"),10)||0),(parseInt($(ce).css("borderTopWidth"),10)||0)+(parseInt($(ce).css("paddingTop"),10)||0),(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt($(ce).css("borderLeftWidth"),10)||0)-(parseInt($(ce).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt($(ce).css("borderTopWidth"),10)||0)-(parseInt($(ce).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=c;}else if(o.containment.constructor==Array){this.containment=o.containment;}},_convertPositionTo:function(d,pos){if(!pos)pos=this.position;var mod=d=="absolute"?1:-1;var o=this.options,scroll=this.cssPosition=='absolute'&&!(this.scrollParent[0]!=document&&$.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);return{top:(pos.top ++this.offset.relative.top*mod ++this.offset.parent.top*mod +-((this.cssPosition=='fixed'?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop()))*mod)),left:(pos.left ++this.offset.relative.left*mod ++this.offset.parent.left*mod +-((this.cssPosition=='fixed'?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())*mod))};},_generatePosition:function(event){var o=this.options,scroll=this.cssPosition=='absolute'&&!(this.scrollParent[0]!=document&&$.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);var pageX=event.pageX;var pageY=event.pageY;if(this.originalPosition){var containment;if(this.containment){if(this.relative_container){var co=this.relative_container.offset();containment=[this.containment[0]+co.left,this.containment[1]+co.top,this.containment[2]+co.left,this.containment[3]+co.top];} +else{containment=this.containment;} +if(event.pageX-this.offset.click.leftcontainment[2])pageX=containment[2]+this.offset.click.left;if(event.pageY-this.offset.click.top>containment[3])pageY=containment[3]+this.offset.click.top;} +if(o.grid){var top=o.grid[1]?this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY;pageY=containment?(!(top-this.offset.click.topcontainment[3])?top:(!(top-this.offset.click.topcontainment[2])?left:(!(left-this.offset.click.left=0;i--){var l=inst.snapElements[i].left,r=l+inst.snapElements[i].width,t=inst.snapElements[i].top,b=t+inst.snapElements[i].height;if(!((l-d=t&&y1<=b)||(y2>=t&&y2<=b)||(y1b))&&((x1>=l&&x1<=r)||(x2>=l&&x2<=r)||(x1r));break;default:return false;break;}};$.ui.ddmanager={current:null,droppables:{'default':[]},prepareOffsets:function(t,event){var m=$.ui.ddmanager.droppables[t.options.scope]||[];var type=event?event.type:null;var list=(t.currentItem||t.element).find(":data(droppable)").andSelf();droppablesLoop:for(var i=0;i");},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled");this._mouseDestroy();},_mouseStart:function(event){var that=this;this.opos=[event.pageX,event.pageY];if(this.options.disabled) +return;var options=this.options;this.selectees=$(options.filter,this.element[0]);this._trigger("start",event);$(options.appendTo).append(this.helper);this.helper.css({"left":event.clientX,"top":event.clientY,"width":0,"height":0});if(options.autoRefresh){this.refresh();} +this.selectees.filter('.ui-selected').each(function(){var selectee=$.data(this,"selectable-item");selectee.startselected=true;if(!event.metaKey&&!event.ctrlKey){selectee.$element.removeClass('ui-selected');selectee.selected=false;selectee.$element.addClass('ui-unselecting');selectee.unselecting=true;that._trigger("unselecting",event,{unselecting:selectee.element});}});$(event.target).parents().andSelf().each(function(){var selectee=$.data(this,"selectable-item");if(selectee){var doSelect=(!event.metaKey&&!event.ctrlKey)||!selectee.$element.hasClass('ui-selected');selectee.$element.removeClass(doSelect?"ui-unselecting":"ui-selected").addClass(doSelect?"ui-selecting":"ui-unselecting");selectee.unselecting=!doSelect;selectee.selecting=doSelect;selectee.selected=doSelect;if(doSelect){that._trigger("selecting",event,{selecting:selectee.element});}else{that._trigger("unselecting",event,{unselecting:selectee.element});} +return false;}});},_mouseDrag:function(event){var that=this;this.dragged=true;if(this.options.disabled) +return;var options=this.options;var x1=this.opos[0],y1=this.opos[1],x2=event.pageX,y2=event.pageY;if(x1>x2){var tmp=x2;x2=x1;x1=tmp;} +if(y1>y2){var tmp=y2;y2=y1;y1=tmp;} +this.helper.css({left:x1,top:y1,width:x2-x1,height:y2-y1});this.selectees.each(function(){var selectee=$.data(this,"selectable-item");if(!selectee||selectee.element==that.element[0]) +return;var hit=false;if(options.tolerance=='touch'){hit=(!(selectee.left>x2||selectee.righty2||selectee.bottomx1&&selectee.righty1&&selectee.bottom *',opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000},_create:function(){var o=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?o.axis==='x'||(/left|right/).test(this.items[0].item.css('float'))||(/inline|table-cell/).test(this.items[0].item.css('display')):false;this.offset=this.element.offset();this._mouseInit();this.ready=true},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled");this._mouseDestroy();for(var i=this.items.length-1;i>=0;i--) +this.items[i].item.removeData(this.widgetName+"-item");return this;},_setOption:function(key,value){if(key==="disabled"){this.options[key]=value;this.widget().toggleClass("ui-sortable-disabled",!!value);}else{$.Widget.prototype._setOption.apply(this,arguments);}},_mouseCapture:function(event,overrideHandle){var that=this;if(this.reverting){return false;} +if(this.options.disabled||this.options.type=='static')return false;this._refreshItems(event);var currentItem=null,nodes=$(event.target).parents().each(function(){if($.data(this,that.widgetName+'-item')==that){currentItem=$(this);return false;}});if($.data(event.target,that.widgetName+'-item')==that)currentItem=$(event.target);if(!currentItem)return false;if(this.options.handle&&!overrideHandle){var validHandle=false;$(this.options.handle,currentItem).find("*").andSelf().each(function(){if(this==event.target)validHandle=true;});if(!validHandle)return false;} +this.currentItem=currentItem;this._removeCurrentsFromItems();return true;},_mouseStart:function(event,overrideHandle,noActivation){var o=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(event);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");this.originalPosition=this._generatePosition(event);this.originalPageX=event.pageX;this.originalPageY=event.pageY;(o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt));this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide();} +this._createPlaceholder();if(o.containment) +this._setContainment();if(o.cursor){if($('body').css("cursor"))this._storedCursor=$('body').css("cursor");$('body').css("cursor",o.cursor);} +if(o.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",o.opacity);} +if(o.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",o.zIndex);} +if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!='HTML') +this.overflowOffset=this.scrollParent.offset();this._trigger("start",event,this._uiHash());if(!this._preserveHelperProportions) +this._cacheHelperProportions();if(!noActivation){for(var i=this.containers.length-1;i>=0;i--){this.containers[i]._trigger("activate",event,this._uiHash(this));}} +if($.ui.ddmanager) +$.ui.ddmanager.current=this;if($.ui.ddmanager&&!o.dropBehaviour) +$.ui.ddmanager.prepareOffsets(this,event);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(event);return true;},_mouseDrag:function(event){this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs;} +if(this.options.scroll){var o=this.options,scrolled=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!='HTML'){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-event.pageY=0;i--){var item=this.items[i],itemElement=item.item[0],intersection=this._intersectsWithPointer(item);if(!intersection)continue;if(item.instance!==this.currentContainer)continue;if(itemElement!=this.currentItem[0]&&this.placeholder[intersection==1?"next":"prev"]()[0]!=itemElement&&!$.contains(this.placeholder[0],itemElement)&&(this.options.type=='semi-dynamic'?!$.contains(this.element[0],itemElement):true)){this.direction=intersection==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(item)){this._rearrange(event,item);}else{break;} +this._trigger("change",event,this._uiHash());break;}} +this._contactContainers(event);if($.ui.ddmanager)$.ui.ddmanager.drag(this,event);this._trigger('sort',event,this._uiHash());this.lastPositionAbs=this.positionAbs;return false;},_mouseStop:function(event,noPropagation){if(!event)return;if($.ui.ddmanager&&!this.options.dropBehaviour) +$.ui.ddmanager.drop(this,event);if(this.options.revert){var that=this;var cur=this.placeholder.offset();this.reverting=true;$(this.helper).animate({left:cur.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:cur.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){that._clear(event);});}else{this._clear(event,noPropagation);} +return false;},cancel:function(){if(this.dragging){this._mouseUp({target:null});if(this.options.helper=="original") +this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");else +this.currentItem.show();for(var i=this.containers.length-1;i>=0;i--){this.containers[i]._trigger("deactivate",null,this._uiHash(this));if(this.containers[i].containerCache.over){this.containers[i]._trigger("out",null,this._uiHash(this));this.containers[i].containerCache.over=0;}}} +if(this.placeholder){if(this.placeholder[0].parentNode)this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode)this.helper.remove();$.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){$(this.domPosition.prev).after(this.currentItem);}else{$(this.domPosition.parent).prepend(this.currentItem);}} +return this;},serialize:function(o){var items=this._getItemsAsjQuery(o&&o.connected);var str=[];o=o||{};$(items).each(function(){var res=($(o.item||this).attr(o.attribute||'id')||'').match(o.expression||(/(.+)[-=_](.+)/));if(res)str.push((o.key||res[1]+'[]')+'='+(o.key&&o.expression?res[1]:res[2]));});if(!str.length&&o.key){str.push(o.key+'=');} +return str.join('&');},toArray:function(o){var items=this._getItemsAsjQuery(o&&o.connected);var ret=[];o=o||{};items.each(function(){ret.push($(o.item||this).attr(o.attribute||'id')||'');});return ret;},_intersectsWith:function(item){var x1=this.positionAbs.left,x2=x1+this.helperProportions.width,y1=this.positionAbs.top,y2=y1+this.helperProportions.height;var l=item.left,r=l+item.width,t=item.top,b=t+item.height;var dyClick=this.offset.click.top,dxClick=this.offset.click.left;var isOverElement=(y1+dyClick)>t&&(y1+dyClick)l&&(x1+dxClick)item[this.floating?'width':'height'])){return isOverElement;}else{return(l0?"down":"up");},_getDragHorizontalDirection:function(){var delta=this.positionAbs.left-this.lastPositionAbs.left;return delta!=0&&(delta>0?"right":"left");},refresh:function(event){this._refreshItems(event);this.refreshPositions();return this;},_connectWith:function(){var options=this.options;return options.connectWith.constructor==String?[options.connectWith]:options.connectWith;},_getItemsAsjQuery:function(connected){var items=[];var queries=[];var connectWith=this._connectWith();if(connectWith&&connected){for(var i=connectWith.length-1;i>=0;i--){var cur=$(connectWith[i]);for(var j=cur.length-1;j>=0;j--){var inst=$.data(cur[j],this.widgetName);if(inst&&inst!=this&&!inst.options.disabled){queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element):$(inst.options.items,inst.element).not(".ui-sortable-helper").not('.ui-sortable-placeholder'),inst]);}};};} +queries.push([$.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):$(this.options.items,this.element).not(".ui-sortable-helper").not('.ui-sortable-placeholder'),this]);for(var i=queries.length-1;i>=0;i--){queries[i][0].each(function(){items.push(this);});};return $(items);},_removeCurrentsFromItems:function(){var list=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=$.grep(this.items,function(item){for(var j=0;j=0;i--){var cur=$(connectWith[i]);for(var j=cur.length-1;j>=0;j--){var inst=$.data(cur[j],this.widgetName);if(inst&&inst!=this&&!inst.options.disabled){queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element[0],event,{item:this.currentItem}):$(inst.options.items,inst.element),inst]);this.containers.push(inst);}};};} +for(var i=queries.length-1;i>=0;i--){var targetData=queries[i][1];var _queries=queries[i][0];for(var j=0,queriesLength=_queries.length;j=0;i--){var item=this.items[i];if(item.instance!=this.currentContainer&&this.currentContainer&&item.item[0]!=this.currentItem[0]) +continue;var t=this.options.toleranceElement?$(this.options.toleranceElement,item.item):item.item;if(!fast){item.width=t.outerWidth();item.height=t.outerHeight();} +var p=t.offset();item.left=p.left;item.top=p.top;};if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this);}else{for(var i=this.containers.length-1;i>=0;i--){var p=this.containers[i].element.offset();this.containers[i].containerCache.left=p.left;this.containers[i].containerCache.top=p.top;this.containers[i].containerCache.width=this.containers[i].element.outerWidth();this.containers[i].containerCache.height=this.containers[i].element.outerHeight();};} +return this;},_createPlaceholder:function(that){that=that||this;var o=that.options;if(!o.placeholder||o.placeholder.constructor==String){var className=o.placeholder;o.placeholder={element:function(){var el=$(document.createElement(that.currentItem[0].nodeName)).addClass(className||that.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!className) +el.style.visibility="hidden";return el;},update:function(container,p){if(className&&!o.forcePlaceholderSize)return;if(!p.height()){p.height(that.currentItem.innerHeight()-parseInt(that.currentItem.css('paddingTop')||0,10)-parseInt(that.currentItem.css('paddingBottom')||0,10));};if(!p.width()){p.width(that.currentItem.innerWidth()-parseInt(that.currentItem.css('paddingLeft')||0,10)-parseInt(that.currentItem.css('paddingRight')||0,10));};}};} +that.placeholder=$(o.placeholder.element.call(that.element,that.currentItem));that.currentItem.after(that.placeholder);o.placeholder.update(that,that.placeholder);},_contactContainers:function(event){var innermostContainer=null,innermostIndex=null;for(var i=this.containers.length-1;i>=0;i--){if($.contains(this.currentItem[0],this.containers[i].element[0])) +continue;if(this._intersectsWith(this.containers[i].containerCache)){if(innermostContainer&&$.contains(this.containers[i].element[0],innermostContainer.element[0])) +continue;innermostContainer=this.containers[i];innermostIndex=i;}else{if(this.containers[i].containerCache.over){this.containers[i]._trigger("out",event,this._uiHash(this));this.containers[i].containerCache.over=0;}}} +if(!innermostContainer)return;if(this.containers.length===1){this.containers[innermostIndex]._trigger("over",event,this._uiHash(this));this.containers[innermostIndex].containerCache.over=1;}else{var dist=10000;var itemWithLeastDistance=null;var posProperty=this.containers[innermostIndex].floating?'left':'top';var sizeProperty=this.containers[innermostIndex].floating?'width':'height';var base=this.positionAbs[posProperty]+this.offset.click[posProperty];for(var j=this.items.length-1;j>=0;j--){if(!$.contains(this.containers[innermostIndex].element[0],this.items[j].item[0]))continue;if(this.items[j].item[0]==this.currentItem[0])continue;var cur=this.items[j].item.offset()[posProperty];var nearBottom=false;if(Math.abs(cur-base)>Math.abs(cur+this.items[j][sizeProperty]-base)){nearBottom=true;cur+=this.items[j][sizeProperty];} +if(Math.abs(cur-base)this.containment[2])pageX=this.containment[2]+this.offset.click.left;if(event.pageY-this.offset.click.top>this.containment[3])pageY=this.containment[3]+this.offset.click.top;} +if(o.grid){var top=this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1];pageY=this.containment?(!(top-this.offset.click.topthis.containment[3])?top:(!(top-this.offset.click.topthis.containment[2])?left:(!(left-this.offset.click.left=0;i--){if(!noPropagation)delayedTriggers.push((function(c){return function(event){c._trigger("deactivate",event,this._uiHash(this));};}).call(this,this.containers[i]));if(this.containers[i].containerCache.over){delayedTriggers.push((function(c){return function(event){c._trigger("out",event,this._uiHash(this));};}).call(this,this.containers[i]));this.containers[i].containerCache.over=0;}} +if(this._storedCursor)$('body').css("cursor",this._storedCursor);if(this._storedOpacity)this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=='auto'?'':this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!noPropagation){this._trigger("beforeStop",event,this._uiHash());for(var i=0;i=obj.currentIndex()));$($settings.nextSelector,element).toggleClass('disabled',(obj.currentIndex()>=obj.navigationLength()));obj.rebindClick($($settings.nextSelector,element),obj.next);obj.rebindClick($($settings.previousSelector,element),obj.previous);obj.rebindClick($($settings.lastSelector,element),obj.last);obj.rebindClick($($settings.firstSelector,element),obj.first);if($settings.onTabShow&&typeof $settings.onTabShow==='function'&&$settings.onTabShow($activeTab,$navigation,obj.currentIndex())===false){return false;}};this.next=function(e){if(element.hasClass('last')){return false;} +if($settings.onNext&&typeof $settings.onNext==='function'&&$settings.onNext($activeTab,$navigation,obj.nextIndex())===false){return false;} +$index=obj.nextIndex();if($index>obj.navigationLength()){}else{$navigation.find('li:eq('+$index+') a').tab('show');}};this.previous=function(e){if(element.hasClass('first')){return false;} +if($settings.onPrevious&&typeof $settings.onPrevious==='function'&&$settings.onPrevious($activeTab,$navigation,obj.previousIndex())===false){return false;} +$index=obj.previousIndex();if($index<0){}else{$navigation.find('li:eq('+$index+') a').tab('show');}};this.first=function(e){if($settings.onFirst&&typeof $settings.onFirst==='function'&&$settings.onFirst($activeTab,$navigation,obj.firstIndex())===false){return false;} +if(element.hasClass('disabled')){return false;} +$navigation.find('li:eq(0) a').tab('show');};this.last=function(e){if($settings.onLast&&typeof $settings.onLast==='function'&&$settings.onLast($activeTab,$navigation,obj.lastIndex())===false){return false;} +if(element.hasClass('disabled')){return false;} +$navigation.find('li:eq('+obj.navigationLength()+') a').tab('show');};this.currentIndex=function(){return $navigation.find('li').index($activeTab);};this.firstIndex=function(){return 0;};this.lastIndex=function(){return obj.navigationLength();};this.getIndex=function(e){return $navigation.find('li').index(e);};this.nextIndex=function(){return $navigation.find('li').index($activeTab)+1;};this.previousIndex=function(){return $navigation.find('li').index($activeTab)-1;};this.navigationLength=function(){return $navigation.find('li').length-1;};this.activeTab=function(){return $activeTab;};this.nextTab=function(){return $navigation.find('li:eq('+(obj.currentIndex()+1)+')').length?$navigation.find('li:eq('+(obj.currentIndex()+1)+')'):null;};this.previousTab=function(){if(obj.currentIndex()<=0){return null;} +return $navigation.find('li:eq('+parseInt(obj.currentIndex()-1)+')');};this.show=function(index){return element.find('li:eq('+index+') a').tab('show');};this.disable=function(index){$navigation.find('li:eq('+index+')').addClass('disabled');};this.enable=function(index){$navigation.find('li:eq('+index+')').removeClass('disabled');};this.hide=function(index){$navigation.find('li:eq('+index+')').hide();};this.display=function(index){$navigation.find('li:eq('+index+')').show();};this.remove=function(args){var $index=args[0];var $removeTabPane=typeof args[1]!='undefined'?args[1]:false;var $item=$navigation.find('li:eq('+$index+')');if($removeTabPane){var $href=$item.find('a').attr('href');$($href).remove();} +$item.remove();};$navigation=element.find('ul:first',element);$activeTab=$navigation.find('li.active',element);if(!$navigation.hasClass($settings.tabClass)){$navigation.addClass($settings.tabClass);} +if($settings.onInit&&typeof $settings.onInit==='function'){$settings.onInit($activeTab,$navigation,0);} +if($settings.onShow&&typeof $settings.onShow==='function'){$settings.onShow($activeTab,$navigation,obj.nextIndex());} +obj.fixNavigationButtons();$('a[data-toggle="tab"]',$navigation).on('click',function(e){var clickedIndex=$navigation.find('li').index($(e.currentTarget).parent('li'));if($settings.onTabClick&&typeof $settings.onTabClick==='function'&&$settings.onTabClick($activeTab,$navigation,obj.currentIndex(),clickedIndex)===false){return false;}});$('a[data-toggle="tab"]',$navigation).on('shown',function(e){$element=$(e.target).parent();var nextTab=$navigation.find('li').index($element);if($element.hasClass('disabled')){return false;} +if($settings.onTabChange&&typeof $settings.onTabChange==='function'&&$settings.onTabChange($activeTab,$navigation,obj.currentIndex(),nextTab)===false){return false;} +$activeTab=$element;obj.fixNavigationButtons();});};$.fn.bootstrapWizard=function(options){if(typeof options=='string'){var args=Array.prototype.slice.call(arguments,1) +if(args.length===1){args.toString();} +return this.data('bootstrapWizard')[options](args);} +return this.each(function(index){var element=$(this);if(element.data('bootstrapWizard'))return;var wizard=new bootstrapWizardCreate(element,options);element.data('bootstrapWizard',wizard);});};$.fn.bootstrapWizard.defaults={tabClass:'nav nav-pills',nextSelector:'.wizard li.next',previousSelector:'.wizard li.previous',firstSelector:'.wizard li.first',lastSelector:'.wizard li.last',onShow:null,onInit:null,onNext:null,onPrevious:null,onLast:null,onFirst:null,onTabChange:null,onTabClick:null,onTabShow:null};})(jQuery);d3=function(){var d3={version:"3.1.6"};if(!Date.now)Date.now=function(){return+new Date();};var d3_document=document,d3_window=window;try{d3_document.createElement("div").style.setProperty("opacity",0,"");}catch(error){var d3_style_prototype=d3_window.CSSStyleDeclaration.prototype,d3_style_setProperty=d3_style_prototype.setProperty;d3_style_prototype.setProperty=function(name,value,priority){d3_style_setProperty.call(this,name,value+"",priority);};} +d3.ascending=function(a,b){return ab?1:a>=b?0:NaN;};d3.descending=function(a,b){return ba?1:b>=a?0:NaN;};d3.min=function(array,f){var i=-1,n=array.length,a,b;if(arguments.length===1){while(++ib)a=b;}else{while(++ib)a=b;} +return a;};d3.max=function(array,f){var i=-1,n=array.length,a,b;if(arguments.length===1){while(++ia)a=b;}else{while(++ia)a=b;} +return a;};d3.extent=function(array,f){var i=-1,n=array.length,a,b,c;if(arguments.length===1){while(++ib)a=b;if(cb)a=b;if(c1)array=array.map(f);array=array.filter(d3_number);return array.length?d3.quantile(array.sort(d3.ascending),.5):undefined;};d3.bisector=function(f){return{left:function(a,x,lo,hi){if(arguments.length<3)lo=0;if(arguments.length<4)hi=a.length;while(lo>>1;if(f.call(a,a[mid],mid)>>1;if(xstop)range.push(j/k);else while((j=start+step*++i)=keys.length)return rollup?rollup.call(nest,array):sortValues?array.sort(sortValues):array;var i=-1,n=array.length,key=keys[depth++],keyValue,object,setter,valuesByKey=new d3_Map(),values;while(++i=keys.length)return map;var array=[],sortKey=sortKeys[depth++];map.forEach(function(key,keyMap){array.push({key:key,values:entries(keyMap,depth)});});return sortKey?array.sort(function(a,b){return sortKey(a.key,b.key);}):array;} +nest.map=function(array,mapType){return map(mapType,array,0);};nest.entries=function(array){return entries(map(d3.map,array,0),0);};nest.key=function(d){keys.push(d);return nest;};nest.sortKeys=function(order){sortKeys[keys.length-1]=order;return nest;};nest.sortValues=function(order){sortValues=order;return nest;};nest.rollup=function(f){rollup=f;return nest;};return nest;};d3.set=function(array){var set=new d3_Set();if(array)for(var i=0;i=0){name=type.substring(i+1);type=type.substring(0,i);} +if(type)return arguments.length<2?this[type].on(name):this[type].on(name,listener);if(arguments.length===2){if(listener==null)for(type in this){if(this.hasOwnProperty(type))this[type].on(name,null);} +return this;}};function d3_dispatch_event(dispatch){var listeners=[],listenerByName=new d3_Map();function event(){var z=listeners,i=-1,n=z.length,l;while(++i=0){prefix=name.substring(0,i);name=name.substring(i+1);} +return d3_nsPrefix.hasOwnProperty(prefix)?{space:d3_nsPrefix[prefix],local:name}:name;}};d3_selectionPrototype.attr=function(name,value){if(arguments.length<2){if(typeof name==="string"){var node=this.node();name=d3.ns.qualify(name);return name.local?node.getAttributeNS(name.space,name.local):node.getAttribute(name);} +for(value in name)this.each(d3_selection_attr(value,name[value]));return this;} +return this.each(d3_selection_attr(name,value));};function d3_selection_attr(name,value){name=d3.ns.qualify(name);function attrNull(){this.removeAttribute(name);} +function attrNullNS(){this.removeAttributeNS(name.space,name.local);} +function attrConstant(){this.setAttribute(name,value);} +function attrConstantNS(){this.setAttributeNS(name.space,name.local,value);} +function attrFunction(){var x=value.apply(this,arguments);if(x==null)this.removeAttribute(name);else this.setAttribute(name,x);} +function attrFunctionNS(){var x=value.apply(this,arguments);if(x==null)this.removeAttributeNS(name.space,name.local);else this.setAttributeNS(name.space,name.local,x);} +return value==null?name.local?attrNullNS:attrNull:typeof value==="function"?name.local?attrFunctionNS:attrFunction:name.local?attrConstantNS:attrConstant;} +function d3_collapse(s){return s.trim().replace(/\s+/g," ");} +d3.requote=function(s){return s.replace(d3_requote_re,"\\$&");};var d3_requote_re=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;d3_selectionPrototype.classed=function(name,value){if(arguments.length<2){if(typeof name==="string"){var node=this.node(),n=(name=name.trim().split(/^|\s+/g)).length,i=-1;if(value=node.classList){while(++i=0;){if(node=group[i]){if(next&&next!==node.nextSibling)next.parentNode.insertBefore(node,next);next=node;}}} +return this;};d3_selectionPrototype.sort=function(comparator){comparator=d3_selection_sortComparator.apply(this,arguments);for(var j=-1,m=this.length;++j0)type=type.substring(0,i);var filter=d3_selection_onFilters.get(type);if(filter)type=filter,wrap=d3_selection_onFilter;function onRemove(){var l=this[name];if(l){this.removeEventListener(type,l,l.$);delete this[name];}} +function onAdd(){var l=wrap(listener,d3_array(arguments));onRemove.call(this);this.addEventListener(type,this[name]=l,l.$=capture);l._=listener;} +function removeAll(){var re=new RegExp("^__on([^.]+)"+d3.requote(type)+"$"),match;for(var name in this){if(match=name.match(re)){var l=this[name];this.removeEventListener(match[1],l,l.$);delete this[name];}}} +return i?listener?onAdd:onRemove:listener?d3_noop:removeAll;} +var d3_selection_onFilters=d3.map({mouseenter:"mouseover",mouseleave:"mouseout"});d3_selection_onFilters.forEach(function(k){if("on"+k in d3_document)d3_selection_onFilters.remove(k);});function d3_selection_onListener(listener,argumentz){return function(e){var o=d3.event;d3.event=e;argumentz[0]=this.__data__;try{listener.apply(this,argumentz);}finally{d3.event=o;}};} +function d3_selection_onFilter(listener,argumentz){var l=d3_selection_onListener(listener,argumentz);return function(e){var target=this,related=e.relatedTarget;if(!related||related!==target&&!(related.compareDocumentPosition(target)&8)){l.call(target,e);}};} +d3_selectionPrototype.each=function(callback){return d3_selection_each(this,function(node,i,j){callback.call(node,node.__data__,i,j);});};function d3_selection_each(groups,callback){for(var j=0,m=groups.length;j1?1:s;l=l<0?0:l>1?1:l;m2=l<=.5?l*(1+s):l+s-l*s;m1=2*l-m2;function v(h){if(h>360)h-=360;else if(h<0)h+=360;if(h<60)return m1+(m2-m1)*h/60;if(h<180)return m2;if(h<240)return m1+(m2-m1)*(240-h)/60;return m1;} +function vv(h){return Math.round(v(h)*255);} +return d3_rgb(vv(h+120),vv(h),vv(h-120));} +var π=Math.PI,ε=1e-6,d3_radians=π/180,d3_degrees=180/π;function d3_sgn(x){return x>0?1:x<0?-1:0;} +function d3_acos(x){return Math.acos(Math.max(-1,Math.min(1,x)));} +function d3_asin(x){return x>1?π/2:x<-1?-π/2:Math.asin(x);} +function d3_sinh(x){return(Math.exp(x)-Math.exp(-x))/2;} +function d3_cosh(x){return(Math.exp(x)+Math.exp(-x))/2;} +function d3_haversin(x){return(x=Math.sin(x/2))*x;} +d3.hcl=function(h,c,l){return arguments.length===1?h instanceof d3_Hcl?d3_hcl(h.h,h.c,h.l):h instanceof d3_Lab?d3_lab_hcl(h.l,h.a,h.b):d3_lab_hcl((h=d3_rgb_lab((h=d3.rgb(h)).r,h.g,h.b)).l,h.a,h.b):d3_hcl(+h,+c,+l);};function d3_hcl(h,c,l){return new d3_Hcl(h,c,l);} +function d3_Hcl(h,c,l){this.h=h;this.c=c;this.l=l;} +var d3_hclPrototype=d3_Hcl.prototype=new d3_Color();d3_hclPrototype.brighter=function(k){return d3_hcl(this.h,this.c,Math.min(100,this.l+d3_lab_K*(arguments.length?k:1)));};d3_hclPrototype.darker=function(k){return d3_hcl(this.h,this.c,Math.max(0,this.l-d3_lab_K*(arguments.length?k:1)));};d3_hclPrototype.rgb=function(){return d3_hcl_lab(this.h,this.c,this.l).rgb();};function d3_hcl_lab(h,c,l){if(isNaN(h))h=0;if(isNaN(c))c=0;return d3_lab(l,Math.cos(h*=d3_radians)*c,Math.sin(h)*c);} +d3.lab=function(l,a,b){return arguments.length===1?l instanceof d3_Lab?d3_lab(l.l,l.a,l.b):l instanceof d3_Hcl?d3_hcl_lab(l.l,l.c,l.h):d3_rgb_lab((l=d3.rgb(l)).r,l.g,l.b):d3_lab(+l,+a,+b);};function d3_lab(l,a,b){return new d3_Lab(l,a,b);} +function d3_Lab(l,a,b){this.l=l;this.a=a;this.b=b;} +var d3_lab_K=18;var d3_lab_X=.95047,d3_lab_Y=1,d3_lab_Z=1.08883;var d3_labPrototype=d3_Lab.prototype=new d3_Color();d3_labPrototype.brighter=function(k){return d3_lab(Math.min(100,this.l+d3_lab_K*(arguments.length?k:1)),this.a,this.b);};d3_labPrototype.darker=function(k){return d3_lab(Math.max(0,this.l-d3_lab_K*(arguments.length?k:1)),this.a,this.b);};d3_labPrototype.rgb=function(){return d3_lab_rgb(this.l,this.a,this.b);};function d3_lab_rgb(l,a,b){var y=(l+16)/116,x=y+a/500,z=y-b/200;x=d3_lab_xyz(x)*d3_lab_X;y=d3_lab_xyz(y)*d3_lab_Y;z=d3_lab_xyz(z)*d3_lab_Z;return d3_rgb(d3_xyz_rgb(3.2404542*x-1.5371385*y-.4985314*z),d3_xyz_rgb(-.969266*x+1.8760108*y+.041556*z),d3_xyz_rgb(.0556434*x-.2040259*y+1.0572252*z));} +function d3_lab_hcl(l,a,b){return l>0?d3_hcl(Math.atan2(b,a)*d3_degrees,Math.sqrt(a*a+b*b),l):d3_hcl(NaN,NaN,l);} +function d3_lab_xyz(x){return x>.206893034?x*x*x:(x-4/29)/7.787037;} +function d3_xyz_lab(x){return x>.008856?Math.pow(x,1/3):7.787037*x+4/29;} +function d3_xyz_rgb(r){return Math.round(255*(r<=.00304?12.92*r:1.055*Math.pow(r,1/2.4)-.055));} +d3.rgb=function(r,g,b){return arguments.length===1?r instanceof d3_Rgb?d3_rgb(r.r,r.g,r.b):d3_rgb_parse(""+r,d3_rgb,d3_hsl_rgb):d3_rgb(~~r,~~g,~~b);};function d3_rgb(r,g,b){return new d3_Rgb(r,g,b);} +function d3_Rgb(r,g,b){this.r=r;this.g=g;this.b=b;} +var d3_rgbPrototype=d3_Rgb.prototype=new d3_Color();d3_rgbPrototype.brighter=function(k){k=Math.pow(.7,arguments.length?k:1);var r=this.r,g=this.g,b=this.b,i=30;if(!r&&!g&&!b)return d3_rgb(i,i,i);if(r&&r0&&l<1?0:h;} +return d3_hsl(h,s,l);} +function d3_rgb_lab(r,g,b){r=d3_rgb_xyz(r);g=d3_rgb_xyz(g);b=d3_rgb_xyz(b);var x=d3_xyz_lab((.4124564*r+.3575761*g+.1804375*b)/d3_lab_X),y=d3_xyz_lab((.2126729*r+.7151522*g+.072175*b)/d3_lab_Y),z=d3_xyz_lab((.0193339*r+.119192*g+.9503041*b)/d3_lab_Z);return d3_lab(116*y-16,500*(x-y),200*(y-z));} +function d3_rgb_xyz(r){return(r/=255)<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4);} +function d3_rgb_parseNumber(c){var f=parseFloat(c);return c.charAt(c.length-1)==="%"?Math.round(f*2.55):f;} +var d3_rgb_names=d3.map({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",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#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",grey:"#808080",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",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",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:"#db7093",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",slategrey:"#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"});d3_rgb_names.forEach(function(key,value){d3_rgb_names.set(key,d3_rgb_parse(value,d3_rgb,d3_hsl_rgb));});function d3_functor(v){return typeof v==="function"?v:function(){return v;};} +d3.functor=d3_functor;function d3_identity(d){return d;} +d3.xhr=function(url,mimeType,callback){var xhr={},dispatch=d3.dispatch("progress","load","error"),headers={},response=d3_identity,request=new(d3_window.XDomainRequest&&/^(http(s)?:)?\/\//.test(url)?XDomainRequest:XMLHttpRequest)();"onload"in request?request.onload=request.onerror=respond:request.onreadystatechange=function(){request.readyState>3&&respond();};function respond(){var s=request.status;!s&&request.responseText||s>=200&&s<300||s===304?dispatch.load.call(xhr,response.call(xhr,request)):dispatch.error.call(xhr,request);} +request.onprogress=function(event){var o=d3.event;d3.event=event;try{dispatch.progress.call(xhr,request);}finally{d3.event=o;}};xhr.header=function(name,value){name=(name+"").toLowerCase();if(arguments.length<2)return headers[name];if(value==null)delete headers[name];else headers[name]=value+"";return xhr;};xhr.mimeType=function(value){if(!arguments.length)return mimeType;mimeType=value==null?null:value+"";return xhr;};xhr.response=function(value){response=value;return xhr;};["get","post"].forEach(function(method){xhr[method]=function(){return xhr.send.apply(xhr,[method].concat(d3_array(arguments)));};});xhr.send=function(method,data,callback){if(arguments.length===2&&typeof data==="function")callback=data,data=null;request.open(method,url,true);if(mimeType!=null&&!("accept"in headers))headers["accept"]=mimeType+",*/*";if(request.setRequestHeader)for(var name in headers)request.setRequestHeader(name,headers[name]);if(mimeType!=null&&request.overrideMimeType)request.overrideMimeType(mimeType);if(callback!=null)xhr.on("error",callback).on("load",function(request){callback(null,request);});request.send(data==null?null:data);return xhr;};xhr.abort=function(){request.abort();return xhr;};d3.rebind(xhr,dispatch,"on");if(arguments.length===2&&typeof mimeType==="function")callback=mimeType,mimeType=null;return callback==null?xhr:xhr.get(d3_xhr_fixCallback(callback));};function d3_xhr_fixCallback(callback){return callback.length===1?function(error,request){callback(error==null?request:null);}:callback;} +function d3_dsv(delimiter,mimeType){var reFormat=new RegExp('["'+delimiter+"\n]"),delimiterCode=delimiter.charCodeAt(0);function dsv(url,row,callback){if(arguments.length<3)callback=row,row=null;var xhr=d3.xhr(url,mimeType,callback);xhr.row=function(_){return arguments.length?xhr.response((row=_)==null?response:typedResponse(_)):row;};return xhr.row(row);} +function response(request){return dsv.parse(request.responseText);} +function typedResponse(f){return function(request){return dsv.parse(request.responseText,f);};} +dsv.parse=function(text,f){var o;return dsv.parseRows(text,function(row,i){if(o)return o(row,i-1);var a=new Function("d","return {"+row.map(function(name,i){return JSON.stringify(name)+": d["+i+"]";}).join(",")+"}");o=f?function(row,i){return f(a(row),i);}:a;});};dsv.parseRows=function(text,f){var EOL={},EOF={},rows=[],N=text.length,I=0,n=0,t,eol;function token(){if(I>=N)return EOF;if(eol)return eol=false,EOL;var j=I;if(text.charCodeAt(j)===34){var i=j;while(i++=t1.delay)t1.flush=t1.callback(elapsed);t1=t1.next;} +var delay=d3_timer_flush()-now;if(delay>24){if(isFinite(delay)){clearTimeout(d3_timer_timeout);d3_timer_timeout=setTimeout(d3_timer_step,delay);} +d3_timer_interval=0;}else{d3_timer_interval=1;d3_timer_frame(d3_timer_step);}} +d3.timer.flush=function(){var elapsed,now=Date.now(),t1=d3_timer_queue;while(t1){elapsed=now-t1.then;if(!t1.delay)t1.flush=t1.callback(elapsed);t1=t1.next;} +d3_timer_flush();};function d3_timer_flush(){var t0=null,t1=d3_timer_queue,then=Infinity;while(t1){if(t1.flush){delete d3_timer_byId[t1.callback.id];t1=t0?t0.next=t1.next:d3_timer_queue=t1.next;}else{then=Math.min(then,t1.then+t1.delay);t1=(t0=t1).next;}} +return then;} +var d3_timer_frame=d3_window.requestAnimationFrame||d3_window.webkitRequestAnimationFrame||d3_window.mozRequestAnimationFrame||d3_window.oRequestAnimationFrame||d3_window.msRequestAnimationFrame||function(callback){setTimeout(callback,17);};var d3_format_decimalPoint=".",d3_format_thousandsSeparator=",",d3_format_grouping=[3,3];var d3_formatPrefixes=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(d3_formatPrefix);d3.formatPrefix=function(value,precision){var i=0;if(value){if(value<0)value*=-1;if(precision)value=d3.round(value,d3_format_precision(value,precision));i=1+Math.floor(1e-12+Math.log(value)/Math.LN10);i=Math.max(-24,Math.min(24,Math.floor((i<=0?i+1:i-1)/3)*3));} +return d3_formatPrefixes[8+i/3];};function d3_formatPrefix(d,i){var k=Math.pow(10,Math.abs(8-i)*3);return{scale:i>8?function(d){return d/k;}:function(d){return d*k;},symbol:d};} +d3.round=function(x,n){return n?Math.round(x*(n=Math.pow(10,n)))/n:Math.round(x);};d3.format=function(specifier){var match=d3_format_re.exec(specifier),fill=match[1]||" ",align=match[2]||">",sign=match[3]||"",basePrefix=match[4]||"",zfill=match[5],width=+match[6],comma=match[7],precision=match[8],type=match[9],scale=1,suffix="",integer=false;if(precision)precision=+precision.substring(1);if(zfill||fill==="0"&&align==="="){zfill=fill="0";align="=";if(comma)width-=Math.floor((width-1)/4);} +switch(type){case"n":comma=true;type="g";break;case"%":scale=100;suffix="%";type="f";break;case"p":scale=100;suffix="%";type="r";break;case"b":case"o":case"x":case"X":if(basePrefix)basePrefix="0"+type.toLowerCase();case"c":case"d":integer=true;precision=0;break;case"s":scale=-1;type="r";break;} +if(basePrefix==="#")basePrefix="";if(type=="r"&&!precision)type="g";if(precision!=null){if(type=="g")precision=Math.max(1,Math.min(21,precision));else if(type=="e"||type=="f")precision=Math.max(0,Math.min(20,precision));} +type=d3_format_types.get(type)||d3_format_typeDefault;var zcomma=zfill&,return function(value){if(integer&&value%1)return"";var negative=value<0||value===0&&1/value<0?(value=-value,"-"):sign;if(scale<0){var prefix=d3.formatPrefix(value,precision);value=prefix.scale(value);suffix=prefix.symbol;}else{value*=scale;} +value=type(value,precision);if(!zfill&&comma)value=d3_format_group(value);var length=basePrefix.length+value.length+(zcomma?0:negative.length),padding=length"?padding+negative+value:align==="^"?padding.substring(0,length>>=1)+negative+value+padding.substring(length):negative+(zcomma?value:padding+value))+suffix;};};var d3_format_re=/(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i;var d3_format_types=d3.map({b:function(x){return x.toString(2);},c:function(x){return String.fromCharCode(x);},o:function(x){return x.toString(8);},x:function(x){return x.toString(16);},X:function(x){return x.toString(16).toUpperCase();},g:function(x,p){return x.toPrecision(p);},e:function(x,p){return x.toExponential(p);},f:function(x,p){return x.toFixed(p);},r:function(x,p){return(x=d3.round(x,d3_format_precision(x,p))).toFixed(Math.max(0,Math.min(20,d3_format_precision(x*(1+1e-15),p))));}});function d3_format_precision(x,p){return p-(x?Math.ceil(Math.log(x)/Math.LN10):1);} +function d3_format_typeDefault(x){return x+"";} +var d3_format_group=d3_identity;if(d3_format_grouping){var d3_format_groupingLength=d3_format_grouping.length;d3_format_group=function(value){var i=value.lastIndexOf("."),f=i>=0?"."+value.substring(i+1):(i=value.length,""),t=[],j=0,g=d3_format_grouping[0];while(i>0&&g>0){t.push(value.substring(i-=g,i+g));g=d3_format_grouping[j=(j+1)%d3_format_groupingLength];} +return t.reverse().join(d3_format_thousandsSeparator||"")+f;};} +d3.geo={};d3.geo.stream=function(object,listener){if(object&&d3_geo_streamObjectType.hasOwnProperty(object.type)){d3_geo_streamObjectType[object.type](object,listener);}else{d3_geo_streamGeometry(object,listener);}};function d3_geo_streamGeometry(geometry,listener){if(geometry&&d3_geo_streamGeometryType.hasOwnProperty(geometry.type)){d3_geo_streamGeometryType[geometry.type](geometry,listener);}} +var d3_geo_streamObjectType={Feature:function(feature,listener){d3_geo_streamGeometry(feature.geometry,listener);},FeatureCollection:function(object,listener){var features=object.features,i=-1,n=features.length;while(++ix1)x1=x;if(yy1)y1=y;} +function boundPolygonLineEnd(){bound.point=bound.lineEnd=d3_noop;} +return function(feature){y1=x1=-(x0=y0=Infinity);d3.geo.stream(feature,projectStream(bound));return[[x0,y0],[x1,y1]];};} +d3.geo.centroid=function(object){d3_geo_centroidDimension=d3_geo_centroidW=d3_geo_centroidX=d3_geo_centroidY=d3_geo_centroidZ=0;d3.geo.stream(object,d3_geo_centroid);var m;if(d3_geo_centroidW&&Math.abs(m=Math.sqrt(d3_geo_centroidX*d3_geo_centroidX+d3_geo_centroidY*d3_geo_centroidY+d3_geo_centroidZ*d3_geo_centroidZ))>ε){return[Math.atan2(d3_geo_centroidY,d3_geo_centroidX)*d3_degrees,Math.asin(Math.max(-1,Math.min(1,d3_geo_centroidZ/m)))*d3_degrees];}};var d3_geo_centroidDimension,d3_geo_centroidW,d3_geo_centroidX,d3_geo_centroidY,d3_geo_centroidZ;var d3_geo_centroid={sphere:function(){if(d3_geo_centroidDimension<2){d3_geo_centroidDimension=2;d3_geo_centroidW=d3_geo_centroidX=d3_geo_centroidY=d3_geo_centroidZ=0;}},point:d3_geo_centroidPoint,lineStart:d3_geo_centroidLineStart,lineEnd:d3_geo_centroidLineEnd,polygonStart:function(){if(d3_geo_centroidDimension<2){d3_geo_centroidDimension=2;d3_geo_centroidW=d3_geo_centroidX=d3_geo_centroidY=d3_geo_centroidZ=0;} +d3_geo_centroid.lineStart=d3_geo_centroidRingStart;},polygonEnd:function(){d3_geo_centroid.lineStart=d3_geo_centroidLineStart;}};function d3_geo_centroidPoint(λ,φ){if(d3_geo_centroidDimension)return;++d3_geo_centroidW;λ*=d3_radians;var cosφ=Math.cos(φ*=d3_radians);d3_geo_centroidX+=(cosφ*Math.cos(λ)-d3_geo_centroidX)/d3_geo_centroidW;d3_geo_centroidY+=(cosφ*Math.sin(λ)-d3_geo_centroidY)/d3_geo_centroidW;d3_geo_centroidZ+=(Math.sin(φ)-d3_geo_centroidZ)/d3_geo_centroidW;} +function d3_geo_centroidRingStart(){var λ00,φ00;d3_geo_centroidDimension=1;d3_geo_centroidLineStart();d3_geo_centroidDimension=2;var linePoint=d3_geo_centroid.point;d3_geo_centroid.point=function(λ,φ){linePoint(λ00=λ,φ00=φ);};d3_geo_centroid.lineEnd=function(){d3_geo_centroid.point(λ00,φ00);d3_geo_centroidLineEnd();d3_geo_centroid.lineEnd=d3_geo_centroidLineEnd;};} +function d3_geo_centroidLineStart(){var x0,y0,z0;if(d3_geo_centroidDimension>1)return;if(d3_geo_centroidDimension<1){d3_geo_centroidDimension=1;d3_geo_centroidW=d3_geo_centroidX=d3_geo_centroidY=d3_geo_centroidZ=0;} +d3_geo_centroid.point=function(λ,φ){λ*=d3_radians;var cosφ=Math.cos(φ*=d3_radians);x0=cosφ*Math.cos(λ);y0=cosφ*Math.sin(λ);z0=Math.sin(φ);d3_geo_centroid.point=nextPoint;};function nextPoint(λ,φ){λ*=d3_radians;var cosφ=Math.cos(φ*=d3_radians),x=cosφ*Math.cos(λ),y=cosφ*Math.sin(λ),z=Math.sin(φ),w=Math.atan2(Math.sqrt((w=y0*z-z0*y)*w+(w=z0*x-x0*z)*w+(w=x0*y-y0*x)*w),x0*x+y0*y+z0*z);d3_geo_centroidW+=w;d3_geo_centroidX+=w*(x0+(x0=x));d3_geo_centroidY+=w*(y0+(y0=y));d3_geo_centroidZ+=w*(z0+(z0=z));}} +function d3_geo_centroidLineEnd(){d3_geo_centroid.point=d3_geo_centroidPoint;} +function d3_geo_cartesian(spherical){var λ=spherical[0],φ=spherical[1],cosφ=Math.cos(φ);return[cosφ*Math.cos(λ),cosφ*Math.sin(λ),Math.sin(φ)];} +function d3_geo_cartesianDot(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2];} +function d3_geo_cartesianCross(a,b){return[a[1]*b[2]-a[2]*b[1],a[2]*b[0]-a[0]*b[2],a[0]*b[1]-a[1]*b[0]];} +function d3_geo_cartesianAdd(a,b){a[0]+=b[0];a[1]+=b[1];a[2]+=b[2];} +function d3_geo_cartesianScale(vector,k){return[vector[0]*k,vector[1]*k,vector[2]*k];} +function d3_geo_cartesianNormalize(d){var l=Math.sqrt(d[0]*d[0]+d[1]*d[1]+d[2]*d[2]);d[0]/=l;d[1]/=l;d[2]/=l;} +function d3_true(){return true;} +function d3_geo_spherical(cartesian){return[Math.atan2(cartesian[1],cartesian[0]),Math.asin(Math.max(-1,Math.min(1,cartesian[2])))];} +function d3_geo_sphericalEqual(a,b){return Math.abs(a[0]-b[0])<ε&&Math.abs(a[1]-b[1])<ε;} +function d3_geo_clipPolygon(segments,compare,inside,interpolate,listener){var subject=[],clip=[];segments.forEach(function(segment){if((n=segment.length-1)<=0)return;var n,p0=segment[0],p1=segment[n];if(d3_geo_sphericalEqual(p0,p1)){listener.lineStart();for(var i=0;i=0;)listener.point((point=points[i])[0],point[1]);}else{interpolate(current.point,current.prev.point,-1,listener);} +current=current.prev;} +current=current.other;points=current.points;}while(!current.visited);listener.lineEnd();}} +function d3_geo_clipPolygonLinkCircular(array){if(!(n=array.length))return;var n,i=0,a=array[0],b;while(++i1&&clean&2)ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));segments.push(ringSegments.filter(d3_geo_clipSegmentLength1));} +return clip;};} +function d3_geo_clipSegmentLength1(segment){return segment.length>1;} +function d3_geo_clipBufferListener(){var lines=[],line;return{lineStart:function(){lines.push(line=[]);},point:function(λ,φ){line.push([λ,φ]);},lineEnd:d3_noop,buffer:function(){var buffer=lines;lines=[];line=null;return buffer;},rejoin:function(){if(lines.length>1)lines.push(lines.pop().concat(lines.shift()));}};} +function d3_geo_clipAreaRing(ring,invisible){if(!(n=ring.length))return 0;var n,i=0,area=0,p=ring[0],λ=p[0],φ=p[1],cosφ=Math.cos(φ),x0=Math.atan2(invisible*Math.sin(λ)*cosφ,Math.sin(φ)),y0=1-invisible*Math.cos(λ)*cosφ,x1=x0,x,y;while(++i2)area+=4*(x-x0);}else if(Math.abs(y0-2)<ε)area+=4*(x-x1);else area+=((3*π+x-x0)%(2*π)-π)*(y0+y);x1=x0,x0=x,y0=y;} +return area;} +function d3_geo_clipSort(a,b){return((a=a.point)[0]<0?a[1]-π/2-ε:π/2-a[1])-((b=b.point)[0]<0?b[1]-π/2-ε:π/2-b[1]);} +var d3_geo_clipAntimeridian=d3_geo_clip(d3_true,d3_geo_clipAntimeridianLine,d3_geo_clipAntimeridianInterpolate);function d3_geo_clipAntimeridianLine(listener){var λ0=NaN,φ0=NaN,sλ0=NaN,clean;return{lineStart:function(){listener.lineStart();clean=1;},point:function(λ1,φ1){var sλ1=λ1>0?π:-π,dλ=Math.abs(λ1-λ0);if(Math.abs(dλ-π)<ε){listener.point(λ0,φ0=(φ0+φ1)/2>0?π/2:-π/2);listener.point(sλ0,φ0);listener.lineEnd();listener.lineStart();listener.point(sλ1,φ0);listener.point(λ1,φ0);clean=0;}else if(sλ0!==sλ1&&dλ>=π){if(Math.abs(λ0-sλ0)<ε)λ0-=sλ0*ε;if(Math.abs(λ1-sλ1)<ε)λ1-=sλ1*ε;φ0=d3_geo_clipAntimeridianIntersect(λ0,φ0,λ1,φ1);listener.point(sλ0,φ0);listener.lineEnd();listener.lineStart();listener.point(sλ1,φ0);clean=0;} +listener.point(λ0=λ1,φ0=φ1);sλ0=sλ1;},lineEnd:function(){listener.lineEnd();λ0=φ0=NaN;},clean:function(){return 2-clean;}};} +function d3_geo_clipAntimeridianIntersect(λ0,φ0,λ1,φ1){var cosφ0,cosφ1,sinλ0_λ1=Math.sin(λ0-λ1);return Math.abs(sinλ0_λ1)>ε?Math.atan((Math.sin(φ0)*(cosφ1=Math.cos(φ1))*Math.sin(λ1)-Math.sin(φ1)*(cosφ0=Math.cos(φ0))*Math.sin(λ0))/(cosφ0*cosφ1*sinλ0_λ1)):(φ0+φ1)/2;} +function d3_geo_clipAntimeridianInterpolate(from,to,direction,listener){var φ;if(from==null){φ=direction*π/2;listener.point(-π,φ);listener.point(0,φ);listener.point(π,φ);listener.point(π,0);listener.point(π,-φ);listener.point(0,-φ);listener.point(-π,-φ);listener.point(-π,0);listener.point(-π,φ);}else if(Math.abs(from[0]-to[0])>ε){var s=(from[0]0,notHemisphere=Math.abs(cr)>ε,interpolate=d3_geo_circleInterpolate(radius,6*d3_radians);return d3_geo_clip(visible,clipLine,interpolate);function visible(λ,φ){return Math.cos(λ)*Math.cos(φ)>cr;} +function clipLine(listener){var point0,c0,v0,v00,clean;return{lineStart:function(){v00=v0=false;clean=1;},point:function(λ,φ){var point1=[λ,φ],point2,v=visible(λ,φ),c=smallRadius?v?0:code(λ,φ):v?code(λ+(λ<0?π:-π),φ):0;if(!point0&&(v00=v0=v))listener.lineStart();if(v!==v0){point2=intersect(point0,point1);if(d3_geo_sphericalEqual(point0,point2)||d3_geo_sphericalEqual(point1,point2)){point1[0]+=ε;point1[1]+=ε;v=visible(point1[0],point1[1]);}} +if(v!==v0){clean=0;if(v){listener.lineStart();point2=intersect(point1,point0);listener.point(point2[0],point2[1]);}else{point2=intersect(point0,point1);listener.point(point2[0],point2[1]);listener.lineEnd();} +point0=point2;}else if(notHemisphere&&point0&&smallRadius^v){var t;if(!(c&c0)&&(t=intersect(point1,point0,true))){clean=0;if(smallRadius){listener.lineStart();listener.point(t[0][0],t[0][1]);listener.point(t[1][0],t[1][1]);listener.lineEnd();}else{listener.point(t[1][0],t[1][1]);listener.lineEnd();listener.lineStart();listener.point(t[0][0],t[0][1]);}}} +if(v&&(!point0||!d3_geo_sphericalEqual(point0,point1))){listener.point(point1[0],point1[1]);} +point0=point1,v0=v,c0=c;},lineEnd:function(){if(v0)listener.lineEnd();point0=null;},clean:function(){return clean|(v00&&v0)<<1;}};} +function intersect(a,b,two){var pa=d3_geo_cartesian(a),pb=d3_geo_cartesian(b);var n1=[1,0,0],n2=d3_geo_cartesianCross(pa,pb),n2n2=d3_geo_cartesianDot(n2,n2),n1n2=n2[0],determinant=n2n2-n1n2*n1n2;if(!determinant)return!two&&a;var c1=cr*n2n2/determinant,c2=-cr*n1n2/determinant,n1xn2=d3_geo_cartesianCross(n1,n2),A=d3_geo_cartesianScale(n1,c1),B=d3_geo_cartesianScale(n2,c2);d3_geo_cartesianAdd(A,B);var u=n1xn2,w=d3_geo_cartesianDot(A,u),uu=d3_geo_cartesianDot(u,u),t2=w*w-uu*(d3_geo_cartesianDot(A,A)-1);if(t2<0)return;var t=Math.sqrt(t2),q=d3_geo_cartesianScale(u,(-w-t)/uu);d3_geo_cartesianAdd(q,A);q=d3_geo_spherical(q);if(!two)return q;var λ0=a[0],λ1=b[0],φ0=a[1],φ1=b[1],z;if(λ1<λ0)z=λ0,λ0=λ1,λ1=z;var δλ=λ1-λ0,polar=Math.abs(δλ-π)<ε,meridian=polar||δλ<ε;if(!polar&&φ1<φ0)z=φ0,φ0=φ1,φ1=z;if(meridian?polar?φ0+φ1>0^q[1]<(Math.abs(q[0]-λ0)<ε?φ0:φ1):φ0<=q[1]&&q[1]<=φ1:δλ>π^(λ0<=q[0]&&q[0]<=λ1)){var q1=d3_geo_cartesianScale(u,(-w+t)/uu);d3_geo_cartesianAdd(q1,A);return[q,d3_geo_spherical(q1)];}} +function code(λ,φ){var r=smallRadius?radius:π-radius,code=0;if(λ<-r)code|=1;else if(λ>r)code|=2;if(φ<-r)code|=4;else if(φ>r)code|=8;return code;}} +var d3_geo_clipViewMAX=1e9;function d3_geo_clipView(x0,y0,x1,y1){return function(listener){var listener_=listener,bufferListener=d3_geo_clipBufferListener(),segments,polygon,ring;var clip={point:point,lineStart:lineStart,lineEnd:lineEnd,polygonStart:function(){listener=bufferListener;segments=[];polygon=[];},polygonEnd:function(){listener=listener_;if((segments=d3.merge(segments)).length){listener.polygonStart();d3_geo_clipPolygon(segments,compare,inside,interpolate,listener);listener.polygonEnd();}else if(insidePolygon([x0,y0])){listener.polygonStart(),listener.lineStart();interpolate(null,null,1,listener);listener.lineEnd(),listener.polygonEnd();} +segments=polygon=ring=null;}};function inside(point){var a=corner(point,-1),i=insidePolygon([a===0||a===3?x0:x1,a>1?y1:y0]);return i;} +function insidePolygon(p){var wn=0,n=polygon.length,y=p[1];for(var i=0;iy&&isLeft(a,b,p)>0)++wn;}else{if(b[1]<=y&&isLeft(a,b,p)<0)--wn;} +a=b;}} +return wn!==0;} +function isLeft(a,b,c){return(b[0]-a[0])*(c[1]-a[1])-(c[0]-a[0])*(b[1]-a[1]);} +function interpolate(from,to,direction,listener){var a=0,a1=0;if(from==null||(a=corner(from,direction))!==(a1=corner(to,direction))||comparePoints(from,to)<0^direction>0){do{listener.point(a===0||a===3?x0:x1,a>1?y1:y0);}while((a=(a+direction+4)%4)!==a1);}else{listener.point(to[0],to[1]);}} +function visible(x,y){return x0<=x&&x<=x1&&y0<=y&&y<=y1;} +function point(x,y){if(visible(x,y))listener.point(x,y);} +var x__,y__,v__,x_,y_,v_,first;function lineStart(){clip.point=linePoint;if(polygon)polygon.push(ring=[]);first=true;v_=false;x_=y_=NaN;} +function lineEnd(){if(segments){linePoint(x__,y__);if(v__&&v_)bufferListener.rejoin();segments.push(bufferListener.buffer());} +clip.point=point;if(v_)listener.lineEnd();} +function linePoint(x,y){x=Math.max(-d3_geo_clipViewMAX,Math.min(d3_geo_clipViewMAX,x));y=Math.max(-d3_geo_clipViewMAX,Math.min(d3_geo_clipViewMAX,y));var v=visible(x,y);if(polygon)ring.push([x,y]);if(first){x__=x,y__=y,v__=v;first=false;if(v){listener.lineStart();listener.point(x,y);}}else{if(v&&v_)listener.point(x,y);else{var a=[x_,y_],b=[x,y];if(clipLine(a,b)){if(!v_){listener.lineStart();listener.point(a[0],a[1]);} +listener.point(b[0],b[1]);if(!v)listener.lineEnd();}else{listener.lineStart();listener.point(x,y);}}} +x_=x,y_=y,v_=v;} +return clip;};function corner(p,direction){return Math.abs(p[0]-x0)<ε?direction>0?0:3:Math.abs(p[0]-x1)<ε?direction>0?2:1:Math.abs(p[1]-y0)<ε?direction>0?1:0:direction>0?3:2;} +function compare(a,b){return comparePoints(a.point,b.point);} +function comparePoints(a,b){var ca=corner(a,1),cb=corner(b,1);return ca!==cb?ca-cb:ca===0?b[1]-a[1]:ca===1?a[0]-b[0]:ca===2?a[1]-b[1]:b[0]-a[0];} +function clipLine(a,b){var dx=b[0]-a[0],dy=b[1]-a[1],t=[0,1];if(Math.abs(dx)<ε&&Math.abs(dy)<ε)return x0<=a[0]&&a[0]<=x1&&y0<=a[1]&&a[1]<=y1;if(d3_geo_clipViewT(x0-a[0],dx,t)&&d3_geo_clipViewT(a[0]-x1,-dx,t)&&d3_geo_clipViewT(y0-a[1],dy,t)&&d3_geo_clipViewT(a[1]-y1,-dy,t)){if(t[1]<1){b[0]=a[0]+t[1]*dx;b[1]=a[1]+t[1]*dy;} +if(t[0]>0){a[0]+=t[0]*dx;a[1]+=t[0]*dy;} +return true;} +return false;}} +function d3_geo_clipViewT(num,denominator,t){if(Math.abs(denominator)<ε)return num<=0;var u=num/denominator;if(denominator>0){if(u>t[1])return false;if(u>t[0])t[0]=u;}else{if(u4*δ2&&depth--){var a=a0+a1,b=b0+b1,c=c0+c1,m=Math.sqrt(a*a+b*b+c*c),φ2=Math.asin(c/=m),λ2=Math.abs(Math.abs(c)-1)<ε?(λ0+λ1)/2:Math.atan2(b,a),p=project(λ2,φ2),x2=p[0],y2=p[1],dx2=x2-x0,dy2=y2-y0,dz=dy*dx2-dx*dy2;if(dz*dz/d2>δ2||Math.abs((dx*dx2+dy*dy2)/d2-.5)>.3){resampleLineTo(x0,y0,λ0,a0,b0,c0,x2,y2,λ2,a/=m,b/=m,c,depth,stream);stream.point(x2,y2);resampleLineTo(x2,y2,λ2,a,b,c,x1,y1,λ1,a1,b1,c1,depth,stream);}}} +resample.precision=function(_){if(!arguments.length)return Math.sqrt(δ2);maxDepth=(δ2=_*_)>0&&16;return resample;};return resample;} +d3.geo.projection=d3_geo_projection;d3.geo.projectionMutator=d3_geo_projectionMutator;function d3_geo_projection(project){return d3_geo_projectionMutator(function(){return project;})();} +function d3_geo_projectionMutator(projectAt){var project,rotate,projectRotate,projectResample=d3_geo_resample(function(x,y){x=project(x,y);return[x[0]*k+δx,δy-x[1]*k];}),k=150,x=480,y=250,λ=0,φ=0,δλ=0,δφ=0,δγ=0,δx,δy,preclip=d3_geo_clipAntimeridian,postclip=d3_identity,clipAngle=null,clipExtent=null;function projection(point){point=projectRotate(point[0]*d3_radians,point[1]*d3_radians);return[point[0]*k+δx,δy-point[1]*k];} +function invert(point){point=projectRotate.invert((point[0]-δx)/k,(δy-point[1])/k);return point&&[point[0]*d3_degrees,point[1]*d3_degrees];} +projection.stream=function(stream){return d3_geo_projectionRadiansRotate(rotate,preclip(projectResample(postclip(stream))));};projection.clipAngle=function(_){if(!arguments.length)return clipAngle;preclip=_==null?(clipAngle=_,d3_geo_clipAntimeridian):d3_geo_clipCircle((clipAngle=+_)*d3_radians);return projection;};projection.clipExtent=function(_){if(!arguments.length)return clipExtent;clipExtent=_;postclip=_==null?d3_identity:d3_geo_clipView(_[0][0],_[0][1],_[1][0],_[1][1]);return projection;};projection.scale=function(_){if(!arguments.length)return k;k=+_;return reset();};projection.translate=function(_){if(!arguments.length)return[x,y];x=+_[0];y=+_[1];return reset();};projection.center=function(_){if(!arguments.length)return[λ*d3_degrees,φ*d3_degrees];λ=_[0]%360*d3_radians;φ=_[1]%360*d3_radians;return reset();};projection.rotate=function(_){if(!arguments.length)return[δλ*d3_degrees,δφ*d3_degrees,δγ*d3_degrees];δλ=_[0]%360*d3_radians;δφ=_[1]%360*d3_radians;δγ=_.length>2?_[2]%360*d3_radians:0;return reset();};d3.rebind(projection,projectResample,"precision");function reset(){projectRotate=d3_geo_compose(rotate=d3_geo_rotation(δλ,δφ,δγ),project);var center=project(λ,φ);δx=x-center[0]*k;δy=y+center[1]*k;return projection;} +return function(){project=projectAt.apply(this,arguments);projection.invert=project.invert&&invert;return reset();};} +function d3_geo_projectionRadiansRotate(rotate,stream){return{point:function(x,y){y=rotate(x*d3_radians,y*d3_radians),x=y[0];stream.point(x>π?x-2*π:x<-π?x+2*π:x,y[1]);},sphere:function(){stream.sphere();},lineStart:function(){stream.lineStart();},lineEnd:function(){stream.lineEnd();},polygonStart:function(){stream.polygonStart();},polygonEnd:function(){stream.polygonEnd();}};} +function d3_geo_equirectangular(λ,φ){return[λ,φ];} +(d3.geo.equirectangular=function(){return d3_geo_projection(d3_geo_equirectangular);}).raw=d3_geo_equirectangular.invert=d3_geo_equirectangular;d3.geo.rotation=function(rotate){rotate=d3_geo_rotation(rotate[0]%360*d3_radians,rotate[1]*d3_radians,rotate.length>2?rotate[2]*d3_radians:0);function forward(coordinates){coordinates=rotate(coordinates[0]*d3_radians,coordinates[1]*d3_radians);return coordinates[0]*=d3_degrees,coordinates[1]*=d3_degrees,coordinates;} +forward.invert=function(coordinates){coordinates=rotate.invert(coordinates[0]*d3_radians,coordinates[1]*d3_radians);return coordinates[0]*=d3_degrees,coordinates[1]*=d3_degrees,coordinates;};return forward;};function d3_geo_rotation(δλ,δφ,δγ){return δλ?δφ||δγ?d3_geo_compose(d3_geo_rotationλ(δλ),d3_geo_rotationφγ(δφ,δγ)):d3_geo_rotationλ(δλ):δφ||δγ?d3_geo_rotationφγ(δφ,δγ):d3_geo_equirectangular;} +function d3_geo_forwardRotationλ(δλ){return function(λ,φ){return λ+=δλ,[λ>π?λ-2*π:λ<-π?λ+2*π:λ,φ];};} +function d3_geo_rotationλ(δλ){var rotation=d3_geo_forwardRotationλ(δλ);rotation.invert=d3_geo_forwardRotationλ(-δλ);return rotation;} +function d3_geo_rotationφγ(δφ,δγ){var cosδφ=Math.cos(δφ),sinδφ=Math.sin(δφ),cosδγ=Math.cos(δγ),sinδγ=Math.sin(δγ);function rotation(λ,φ){var cosφ=Math.cos(φ),x=Math.cos(λ)*cosφ,y=Math.sin(λ)*cosφ,z=Math.sin(φ),k=z*cosδφ+x*sinδφ;return[Math.atan2(y*cosδγ-k*sinδγ,x*cosδφ-z*sinδφ),Math.asin(Math.max(-1,Math.min(1,k*cosδγ+y*sinδγ)))];} +rotation.invert=function(λ,φ){var cosφ=Math.cos(φ),x=Math.cos(λ)*cosφ,y=Math.sin(λ)*cosφ,z=Math.sin(φ),k=z*cosδγ-y*sinδγ;return[Math.atan2(y*cosδγ+z*sinδγ,x*cosδφ+k*sinδφ),Math.asin(Math.max(-1,Math.min(1,k*cosδφ-x*sinδφ)))];};return rotation;} +d3.geo.circle=function(){var origin=[0,0],angle,precision=6,interpolate;function circle(){var center=typeof origin==="function"?origin.apply(this,arguments):origin,rotate=d3_geo_rotation(-center[0]*d3_radians,-center[1]*d3_radians,0).invert,ring=[];interpolate(null,null,1,{point:function(x,y){ring.push(x=rotate(x,y));x[0]*=d3_degrees,x[1]*=d3_degrees;}});return{type:"Polygon",coordinates:[ring]};} +circle.origin=function(x){if(!arguments.length)return origin;origin=x;return circle;};circle.angle=function(x){if(!arguments.length)return angle;interpolate=d3_geo_circleInterpolate((angle=+x)*d3_radians,precision*d3_radians);return circle;};circle.precision=function(_){if(!arguments.length)return precision;interpolate=d3_geo_circleInterpolate(angle*d3_radians,(precision=+_)*d3_radians);return circle;};return circle.angle(90);};function d3_geo_circleInterpolate(radius,precision){var cr=Math.cos(radius),sr=Math.sin(radius);return function(from,to,direction,listener){if(from!=null){from=d3_geo_circleAngle(cr,from);to=d3_geo_circleAngle(cr,to);if(direction>0?fromto)from+=direction*2*π;}else{from=radius+direction*2*π;to=radius;} +var point;for(var step=direction*precision,t=from;direction>0?t>to:tε;}).map(x)).concat(d3.range(Math.ceil(y0/dy)*dy,y1,dy).filter(function(y){return Math.abs(y%DY)>ε;}).map(y));} +graticule.lines=function(){return lines().map(function(coordinates){return{type:"LineString",coordinates:coordinates};});};graticule.outline=function(){return{type:"Polygon",coordinates:[X(X0).concat(Y(Y1).slice(1),X(X1).reverse().slice(1),Y(Y0).reverse().slice(1))]};};graticule.extent=function(_){if(!arguments.length)return graticule.minorExtent();return graticule.majorExtent(_).minorExtent(_);};graticule.majorExtent=function(_){if(!arguments.length)return[[X0,Y0],[X1,Y1]];X0=+_[0][0],X1=+_[1][0];Y0=+_[0][1],Y1=+_[1][1];if(X0>X1)_=X0,X0=X1,X1=_;if(Y0>Y1)_=Y0,Y0=Y1,Y1=_;return graticule.precision(precision);};graticule.minorExtent=function(_){if(!arguments.length)return[[x0,y0],[x1,y1]];x0=+_[0][0],x1=+_[1][0];y0=+_[0][1],y1=+_[1][1];if(x0>x1)_=x0,x0=x1,x1=_;if(y0>y1)_=y0,y0=y1,y1=_;return graticule.precision(precision);};graticule.step=function(_){if(!arguments.length)return graticule.minorStep();return graticule.majorStep(_).minorStep(_);};graticule.majorStep=function(_){if(!arguments.length)return[DX,DY];DX=+_[0],DY=+_[1];return graticule;};graticule.minorStep=function(_){if(!arguments.length)return[dx,dy];dx=+_[0],dy=+_[1];return graticule;};graticule.precision=function(_){if(!arguments.length)return precision;precision=+_;x=d3_geo_graticuleX(y0,y1,90);y=d3_geo_graticuleY(x0,x1,precision);X=d3_geo_graticuleX(Y0,Y1,90);Y=d3_geo_graticuleY(X0,X1,precision);return graticule;};return graticule.majorExtent([[-180,-90+ε],[180,90-ε]]).minorExtent([[-180,-80-ε],[180,80+ε]]);};function d3_geo_graticuleX(y0,y1,dy){var y=d3.range(y0,y1-ε,dy).concat(y1);return function(x){return y.map(function(y){return[x,y];});};} +function d3_geo_graticuleY(x0,x1,dx){var x=d3.range(x0,x1-ε,dx).concat(x1);return function(y){return x.map(function(x){return[x,y];});};} +function d3_source(d){return d.source;} +function d3_target(d){return d.target;} +d3.geo.greatArc=function(){var source=d3_source,source_,target=d3_target,target_;function greatArc(){return{type:"LineString",coordinates:[source_||source.apply(this,arguments),target_||target.apply(this,arguments)]};} +greatArc.distance=function(){return d3.geo.distance(source_||source.apply(this,arguments),target_||target.apply(this,arguments));};greatArc.source=function(_){if(!arguments.length)return source;source=_,source_=typeof _==="function"?null:_;return greatArc;};greatArc.target=function(_){if(!arguments.length)return target;target=_,target_=typeof _==="function"?null:_;return greatArc;};greatArc.precision=function(){return arguments.length?greatArc:0;};return greatArc;};d3.geo.interpolate=function(source,target){return d3_geo_interpolate(source[0]*d3_radians,source[1]*d3_radians,target[0]*d3_radians,target[1]*d3_radians);};function d3_geo_interpolate(x0,y0,x1,y1){var cy0=Math.cos(y0),sy0=Math.sin(y0),cy1=Math.cos(y1),sy1=Math.sin(y1),kx0=cy0*Math.cos(x0),ky0=cy0*Math.sin(x0),kx1=cy1*Math.cos(x1),ky1=cy1*Math.sin(x1),d=2*Math.asin(Math.sqrt(d3_haversin(y1-y0)+cy0*cy1*d3_haversin(x1-x0))),k=1/Math.sin(d);var interpolate=d?function(t){var B=Math.sin(t*=d)*k,A=Math.sin(d-t)*k,x=A*kx0+B*kx1,y=A*ky0+B*ky1,z=A*sy0+B*sy1;return[Math.atan2(y,x)*d3_degrees,Math.atan2(z,Math.sqrt(x*x+y*y))*d3_degrees];}:function(){return[x0*d3_degrees,y0*d3_degrees];};interpolate.distance=d;return interpolate;} +d3.geo.length=function(object){d3_geo_lengthSum=0;d3.geo.stream(object,d3_geo_length);return d3_geo_lengthSum;};var d3_geo_lengthSum;var d3_geo_length={sphere:d3_noop,point:d3_noop,lineStart:d3_geo_lengthLineStart,lineEnd:d3_noop,polygonStart:d3_noop,polygonEnd:d3_noop};function d3_geo_lengthLineStart(){var λ0,sinφ0,cosφ0;d3_geo_length.point=function(λ,φ){λ0=λ*d3_radians,sinφ0=Math.sin(φ*=d3_radians),cosφ0=Math.cos(φ);d3_geo_length.point=nextPoint;};d3_geo_length.lineEnd=function(){d3_geo_length.point=d3_geo_length.lineEnd=d3_noop;};function nextPoint(λ,φ){var sinφ=Math.sin(φ*=d3_radians),cosφ=Math.cos(φ),t=Math.abs((λ*=d3_radians)-λ0),cosΔλ=Math.cos(t);d3_geo_lengthSum+=Math.atan2(Math.sqrt((t=cosφ*Math.sin(t))*t+(t=cosφ0*sinφ-sinφ0*cosφ*cosΔλ)*t),sinφ0*sinφ+cosφ0*cosφ*cosΔλ);λ0=λ,sinφ0=sinφ,cosφ0=cosφ;}} +function d3_geo_conic(projectAt){var φ0=0,φ1=π/3,m=d3_geo_projectionMutator(projectAt),p=m(φ0,φ1);p.parallels=function(_){if(!arguments.length)return[φ0/π*180,φ1/π*180];return m(φ0=_[0]*π/180,φ1=_[1]*π/180);};return p;} +function d3_geo_conicEqualArea(φ0,φ1){var sinφ0=Math.sin(φ0),n=(sinφ0+Math.sin(φ1))/2,C=1+sinφ0*(2*n-sinφ0),ρ0=Math.sqrt(C)/n;function forward(λ,φ){var ρ=Math.sqrt(C-2*n*Math.sin(φ))/n;return[ρ*Math.sin(λ*=n),ρ0-ρ*Math.cos(λ)];} +forward.invert=function(x,y){var ρ0_y=ρ0-y;return[Math.atan2(x,ρ0_y)/n,Math.asin((C-(x*x+ρ0_y*ρ0_y)*n*n)/(2*n))];};return forward;} +(d3.geo.conicEqualArea=function(){return d3_geo_conic(d3_geo_conicEqualArea);}).raw=d3_geo_conicEqualArea;d3.geo.albersUsa=function(){var lower48=d3.geo.conicEqualArea().rotate([98,0]).center([0,38]).parallels([29.5,45.5]);var alaska=d3.geo.conicEqualArea().rotate([160,0]).center([0,60]).parallels([55,65]);var hawaii=d3.geo.conicEqualArea().rotate([160,0]).center([0,20]).parallels([8,18]);var puertoRico=d3.geo.conicEqualArea().rotate([60,0]).center([0,10]).parallels([8,18]);var alaskaInvert,hawaiiInvert,puertoRicoInvert;function albersUsa(coordinates){return projection(coordinates)(coordinates);} +function projection(point){var lon=point[0],lat=point[1];return lat>50?alaska:lon<-140?hawaii:lat<21?puertoRico:lower48;} +albersUsa.invert=function(coordinates){return alaskaInvert(coordinates)||hawaiiInvert(coordinates)||puertoRicoInvert(coordinates)||lower48.invert(coordinates);};albersUsa.scale=function(x){if(!arguments.length)return lower48.scale();lower48.scale(x);alaska.scale(x*.6);hawaii.scale(x);puertoRico.scale(x*1.5);return albersUsa.translate(lower48.translate());};albersUsa.translate=function(x){if(!arguments.length)return lower48.translate();var dz=lower48.scale(),dx=x[0],dy=x[1];lower48.translate(x);alaska.translate([dx-.4*dz,dy+.17*dz]);hawaii.translate([dx-.19*dz,dy+.2*dz]);puertoRico.translate([dx+.58*dz,dy+.43*dz]);alaskaInvert=d3_geo_albersUsaInvert(alaska,[[-180,50],[-130,72]]);hawaiiInvert=d3_geo_albersUsaInvert(hawaii,[[-164,18],[-154,24]]);puertoRicoInvert=d3_geo_albersUsaInvert(puertoRico,[[-67.5,17.5],[-65,19]]);return albersUsa;};return albersUsa.scale(1e3);};function d3_geo_albersUsaInvert(projection,extent){var a=projection(extent[0]),b=projection([.5*(extent[0][0]+extent[1][0]),extent[0][1]]),c=projection([extent[1][0],extent[0][1]]),d=projection(extent[1]);var dya=b[1]-a[1],dxa=b[0]-a[0],dyb=c[1]-b[1],dxb=c[0]-b[0];var ma=dya/dxa,mb=dyb/dxb;var cx=.5*(ma*mb*(a[1]-c[1])+mb*(a[0]+b[0])-ma*(b[0]+c[0]))/(mb-ma),cy=(.5*(a[0]+b[0])-cx)/ma+.5*(a[1]+b[1]);var dx0=d[0]-cx,dy0=d[1]-cy,dx1=a[0]-cx,dy1=a[1]-cy,r0=dx0*dx0+dy0*dy0,r1=dx1*dx1+dy1*dy1;var a0=Math.atan2(dy0,dx0),a1=Math.atan2(dy1,dx1);return function(coordinates){var dx=coordinates[0]-cx,dy=coordinates[1]-cy,r=dx*dx+dy*dy,a=Math.atan2(dy,dx);if(r01){t=tangents[1];p=points[pi];pi++;path+="C"+(p0[0]+t0[0])+","+(p0[1]+t0[1])+","+(p[0]-t[0])+","+(p[1]-t[1])+","+p[0]+","+p[1];for(var i=2;i9){s=d*3/Math.sqrt(s);m[i]=s*a;m[i+1]=s*b;}}} +i=-1;while(++i<=j){s=(points[Math.min(j,i+1)][0]-points[Math.max(0,i-1)][0])/(6*(1+m[i]*m[i]));tangents.push([s||0,m[i]*s||0]);} +return tangents;} +function d3_svg_lineMonotone(points){return points.length<3?d3_svg_lineLinear(points):points[0]+d3_svg_lineHermite(points,d3_svg_lineMonotoneTangents(points));} +d3.geom.hull=function(vertices){var x=d3_svg_lineX,y=d3_svg_lineY;if(arguments.length)return hull(vertices);function hull(data){if(data.length<3)return[];var fx=d3_functor(x),fy=d3_functor(y),n=data.length,vertices,plen=n-1,points=[],stack=[],d,i,j,h=0,x1,y1,x2,y2,u,v,a,sp;if(fx===d3_svg_lineX&&y===d3_svg_lineY)vertices=data;else for(i=0,vertices=[];i=x2*x2+y2*y2){points[i].index=-1;continue;}else{points[u].index=-1;}} +a=points[i].angle;u=i;v=j;} +stack.push(h);for(i=0,j=0;i<2;++j){if(points[j].index>-1){stack.push(points[j].index);i++;}} +sp=stack.length;for(;j=0;--i)poly.push(data[stack[i]]);return poly;} +hull.x=function(_){return arguments.length?(x=_,hull):x;};hull.y=function(_){return arguments.length?(y=_,hull):y;};return hull;};function d3_geom_hullCCW(i1,i2,i3,v){var t,a,b,c,d,e,f;t=v[i1];a=t[0];b=t[1];t=v[i2];c=t[0];d=t[1];t=v[i3];e=t[0];f=t[1];return(f-b)*(c-a)-(d-b)*(e-a)>0;} +d3.geom.polygon=function(coordinates){coordinates.area=function(){var i=0,n=coordinates.length,area=coordinates[n-1][1]*coordinates[0][0]-coordinates[n-1][0]*coordinates[0][1];while(++i=0){s1=e.ep.r;s2=e.ep.l;}else{s1=e.ep.l;s2=e.ep.r;} +if(e.a===1){y1=s1?s1.y:-Z;x1=e.c-e.b*y1;y2=s2?s2.y:Z;x2=e.c-e.b*y2;}else{x1=s1?s1.x:-Z;y1=e.c-e.a*x1;x2=s2?s2.x:Z;y2=e.c-e.a*x2;} +var v1=[x1,y1],v2=[x2,y2];polygons[e.region.l.index].push(v1,v2);polygons[e.region.r.index].push(v1,v2);});polygons=polygons.map(function(polygon,i){var cx=points[i][0],cy=points[i][1],angle=polygon.map(function(v){return Math.atan2(v[0]-cx,v[1]-cy);}),order=d3.range(polygon.length).sort(function(a,b){return angle[a]-angle[b];});return order.filter(function(d,i){return!i||angle[d]-angle[order[i-1]]>ε;}).map(function(d){return polygon[d];});});polygons.forEach(function(polygon,i){var n=polygon.length;if(!n)return polygon.push([-Z,-Z],[-Z,Z],[Z,Z],[Z,-Z]);if(n>2)return;var p0=points[i],p1=polygon[0],p2=polygon[1],x0=p0[0],y0=p0[1],x1=p1[0],y1=p1[1],x2=p2[0],y2=p2[1],dx=Math.abs(x2-x1),dy=y2-y1;if(Math.abs(dy)<ε){var y=y00)y*=-1;polygon.push([-Z,y],[Z,y]);}}});if(clip)for(i=0;ib.y?1:a.xb.x?1:0;}),bottomSite:null};var EdgeList={list:[],leftEnd:null,rightEnd:null,init:function(){EdgeList.leftEnd=EdgeList.createHalfEdge(null,"l");EdgeList.rightEnd=EdgeList.createHalfEdge(null,"l");EdgeList.leftEnd.r=EdgeList.rightEnd;EdgeList.rightEnd.l=EdgeList.leftEnd;EdgeList.list.unshift(EdgeList.leftEnd,EdgeList.rightEnd);},createHalfEdge:function(edge,side){return{edge:edge,side:side,vertex:null,l:null,r:null};},insert:function(lb,he){he.l=lb;he.r=lb.r;lb.r.l=he;lb.r=he;},leftBound:function(p){var he=EdgeList.leftEnd;do{he=he.r;}while(he!=EdgeList.rightEnd&&Geom.rightOf(he,p));he=he.l;return he;},del:function(he){he.l.r=he.r;he.r.l=he.l;he.edge=null;},right:function(he){return he.r;},left:function(he){return he.l;},leftRegion:function(he){return he.edge==null?Sites.bottomSite:he.edge.region[he.side];},rightRegion:function(he){return he.edge==null?Sites.bottomSite:he.edge.region[d3_geom_voronoiOpposite[he.side]];}};var Geom={bisect:function(s1,s2){var newEdge={region:{l:s1,r:s2},ep:{l:null,r:null}};var dx=s2.x-s1.x,dy=s2.y-s1.y,adx=dx>0?dx:-dx,ady=dy>0?dy:-dy;newEdge.c=s1.x*dx+s1.y*dy+(dx*dx+dy*dy)*.5;if(adx>ady){newEdge.a=1;newEdge.b=dy/dx;newEdge.c/=dx;}else{newEdge.b=1;newEdge.a=dx/dy;newEdge.c/=dy;} +return newEdge;},intersect:function(el1,el2){var e1=el1.edge,e2=el2.edge;if(!e1||!e2||e1.region.r==e2.region.r){return null;} +var d=e1.a*e2.b-e1.b*e2.a;if(Math.abs(d)<1e-10){return null;} +var xint=(e1.c*e2.b-e2.c*e1.b)/d,yint=(e2.c*e1.a-e1.c*e2.a)/d,e1r=e1.region.r,e2r=e2.region.r,el,e;if(e1r.y=e.region.r.x;if(rightOfSite&&el.side==="l"||!rightOfSite&&el.side==="r"){return null;} +return{x:xint,y:yint};},rightOf:function(he,p){var e=he.edge,topsite=e.region.r,rightOfSite=p.x>topsite.x;if(rightOfSite&&he.side==="l"){return 1;} +if(!rightOfSite&&he.side==="r"){return 0;} +if(e.a===1){var dyp=p.y-topsite.y,dxp=p.x-topsite.x,fast=0,above=0;if(!rightOfSite&&e.b<0||rightOfSite&&e.b>=0){above=fast=dyp>=e.b*dxp;}else{above=p.x+p.y*e.b>e.c;if(e.b<0){above=!above;} +if(!above){fast=1;}} +if(!fast){var dxs=topsite.x-e.region.l.x;above=e.b*(dxp*dxp-dyp*dyp)t2*t2+t3*t3;} +return he.side==="l"?above:!above;},endPoint:function(edge,side,site){edge.ep[side]=site;if(!edge.ep[d3_geom_voronoiOpposite[side]])return;callback(edge);},distance:function(s,t){var dx=s.x-t.x,dy=s.y-t.y;return Math.sqrt(dx*dx+dy*dy);}};var EventQueue={list:[],insert:function(he,site,offset){he.vertex=site;he.ystar=site.y+offset;for(var i=0,list=EventQueue.list,l=list.length;inext.ystar||he.ystar==next.ystar&&site.x>next.vertex.x){continue;}else{break;}} +list.splice(i,0,he);},del:function(he){for(var i=0,ls=EventQueue.list,l=ls.length;itop.y){temp=bot;bot=top;top=temp;pm="r";} +e=Geom.bisect(bot,top);bisector=EdgeList.createHalfEdge(e,pm);EdgeList.insert(llbnd,bisector);Geom.endPoint(e,d3_geom_voronoiOpposite[pm],v);p=Geom.intersect(llbnd,bisector);if(p){EventQueue.del(llbnd);EventQueue.insert(llbnd,p,Geom.distance(p,bot));} +p=Geom.intersect(bisector,rrbnd);if(p){EventQueue.insert(bisector,p,Geom.distance(p,bot));}}else{break;}} +for(lbnd=EdgeList.right(EdgeList.leftEnd);lbnd!=EdgeList.rightEnd;lbnd=EdgeList.right(lbnd)){callback(lbnd.edge);}} +d3.geom.quadtree=function(points,x1,y1,x2,y2){var x=d3_svg_lineX,y=d3_svg_lineY,compat;if(compat=arguments.length){x=d3_geom_quadtreeCompatX;y=d3_geom_quadtreeCompatY;if(compat===3){y2=y1;x2=x1;y1=x1=0;} +return quadtree(points);} +function quadtree(data){var d,fx=d3_functor(x),fy=d3_functor(y),xs,ys,i,n,x1_,y1_,x2_,y2_;if(x1!=null){x1_=x1,y1_=y1,x2_=x2,y2_=y2;}else{x2_=y2_=-(x1_=y1_=Infinity);xs=[],ys=[];n=data.length;if(compat)for(i=0;ix2_)x2_=d.x;if(d.y>y2_)y2_=d.y;xs.push(d.x);ys.push(d.y);}else for(i=0;ix2_)x2_=x_;if(y_>y2_)y2_=y_;xs.push(x_);ys.push(y_);}} +var dx=x2_-x1_,dy=y2_-y1_;if(dx>dy)y2_=y1_+dx;else x2_=x1_+dy;function insert(n,d,x,y,x1,y1,x2,y2){if(isNaN(x)||isNaN(y))return;if(n.leaf){var nx=n.x,ny=n.y;if(nx!=null){if(Math.abs(nx-x)+Math.abs(ny-y)<.01){insertChild(n,d,x,y,x1,y1,x2,y2);}else{var nPoint=n.point;n.x=n.y=n.point=null;insertChild(n,nPoint,nx,ny,x1,y1,x2,y2);insertChild(n,d,x,y,x1,y1,x2,y2);}}else{n.x=x,n.y=y,n.point=d;}}else{insertChild(n,d,x,y,x1,y1,x2,y2);}} +function insertChild(n,d,x,y,x1,y1,x2,y2){var sx=(x1+x2)*.5,sy=(y1+y2)*.5,right=x>=sx,bottom=y>=sy,i=(bottom<<1)+right;n.leaf=false;n=n.nodes[i]||(n.nodes[i]=d3_geom_quadtreeNode());if(right)x1=sx;else x2=sx;if(bottom)y1=sy;else y2=sy;insert(n,d,x,y,x1,y1,x2,y2);} +var root=d3_geom_quadtreeNode();root.add=function(d){insert(root,d,+fx(d,++i),+fy(d,i),x1_,y1_,x2_,y2_);};root.visit=function(f){d3_geom_quadtreeVisit(f,root,x1_,y1_,x2_,y2_);};i=-1;if(x1==null){while(++i180)rb+=360;else if(rb-ra>180)ra+=360;q.push({i:s.push(s.pop()+"rotate(",null,")")-2,x:d3_interpolateNumber(ra,rb)});}else if(rb){s.push(s.pop()+"rotate("+rb+")");} +if(wa!=wb){q.push({i:s.push(s.pop()+"skewX(",null,")")-2,x:d3_interpolateNumber(wa,wb)});}else if(wb){s.push(s.pop()+"skewX("+wb+")");} +if(ka[0]!=kb[0]||ka[1]!=kb[1]){n=s.push(s.pop()+"scale(",null,",",null,")");q.push({i:n-4,x:d3_interpolateNumber(ka[0],kb[0])},{i:n-2,x:d3_interpolateNumber(ka[1],kb[1])});}else if(kb[0]!=1||kb[1]!=1){s.push(s.pop()+"scale("+kb+")");} +n=q.length;return function(t){var i=-1,o;while(++i=0&&!(f=d3.interpolators[i](a,b)));return f;} +function d3_interpolateByName(name){return name=="transform"?d3_interpolateTransform:d3_interpolate;} +d3.interpolators=[function(a,b){var t=typeof b;return(t==="string"||t!==typeof a?d3_rgb_names.has(b)||/^(#|rgb\(|hsl\()/.test(b)?d3_interpolateRgb:d3_interpolateString:b instanceof d3_Color?d3_interpolateRgb:t==="object"?Array.isArray(b)?d3_interpolateArray:d3_interpolateObject:d3_interpolateNumber)(a,b);}];d3.interpolateArray=d3_interpolateArray;function d3_interpolateArray(a,b){var x=[],c=[],na=a.length,nb=b.length,n0=Math.min(a.length,b.length),i;for(i=0;i=0?name.substring(0,i):name,m=i>=0?name.substring(i+1):"in";t=d3_ease.get(t)||d3_ease_default;m=d3_ease_mode.get(m)||d3_identity;return d3_ease_clamp(m(t.apply(null,Array.prototype.slice.call(arguments,1))));};function d3_ease_clamp(f){return function(t){return t<=0?0:t>=1?1:f(t);};} +function d3_ease_reverse(f){return function(t){return 1-f(1-t);};} +function d3_ease_reflect(f){return function(t){return.5*(t<.5?f(2*t):2-f(2-2*t));};} +function d3_ease_quad(t){return t*t;} +function d3_ease_cubic(t){return t*t*t;} +function d3_ease_cubicInOut(t){if(t<=0)return 0;if(t>=1)return 1;var t2=t*t,t3=t2*t;return 4*(t<.5?t3:3*(t-t2)+t3-.75);} +function d3_ease_poly(e){return function(t){return Math.pow(t,e);};} +function d3_ease_sin(t){return 1-Math.cos(t*π/2);} +function d3_ease_exp(t){return Math.pow(2,10*(t-1));} +function d3_ease_circle(t){return 1-Math.sqrt(1-t*t);} +function d3_ease_elastic(a,p){var s;if(arguments.length<2)p=.45;if(arguments.length)s=p/(2*π)*Math.asin(1/a);else a=1,s=p/4;return function(t){return 1+a*Math.pow(2,10*-t)*Math.sin((t-s)*2*π/p);};} +function d3_ease_back(s){if(!s)s=1.70158;return function(t){return t*t*((s+1)*t-s);};} +function d3_ease_bounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375;} +d3.interpolateHcl=d3_interpolateHcl;function d3_interpolateHcl(a,b){a=d3.hcl(a);b=d3.hcl(b);var ah=a.h,ac=a.c,al=a.l,bh=b.h-ah,bc=b.c-ac,bl=b.l-al;if(isNaN(bc))bc=0,ac=isNaN(ac)?b.c:ac;if(isNaN(bh))bh=0,ah=isNaN(ah)?b.h:ah;else if(bh>180)bh-=360;else if(bh<-180)bh+=360;return function(t){return d3_hcl_lab(ah+bh*t,ac+bc*t,al+bl*t)+"";};} +d3.interpolateHsl=d3_interpolateHsl;function d3_interpolateHsl(a,b){a=d3.hsl(a);b=d3.hsl(b);var ah=a.h,as=a.s,al=a.l,bh=b.h-ah,bs=b.s-as,bl=b.l-al;if(isNaN(bs))bs=0,as=isNaN(as)?b.s:as;if(isNaN(bh))bh=0,ah=isNaN(ah)?b.h:ah;else if(bh>180)bh-=360;else if(bh<-180)bh+=360;return function(t){return d3_hsl_rgb(ah+bh*t,as+bs*t,al+bl*t)+"";};} +d3.interpolateLab=d3_interpolateLab;function d3_interpolateLab(a,b){a=d3.lab(a);b=d3.lab(b);var al=a.l,aa=a.a,ab=a.b,bl=b.l-al,ba=b.a-aa,bb=b.b-ab;return function(t){return d3_lab_rgb(al+bl*t,aa+ba*t,ab+bb*t)+"";};} +d3.interpolateRound=d3_interpolateRound;function d3_interpolateRound(a,b){b-=a;return function(t){return Math.round(a+b*t);};} +function d3_uninterpolateNumber(a,b){b=b-(a=+a)?1/(b-a):0;return function(x){return(x-a)*b;};} +function d3_uninterpolateClamp(a,b){b=b-(a=+a)?1/(b-a):0;return function(x){return Math.max(0,Math.min(1,(x-a)*b));};} +d3.layout={};d3.layout.bundle=function(){return function(links){var paths=[],i=-1,n=links.length;while(++i0)alpha=x;else alpha=0;}else if(x>0){event.start({type:"start",alpha:alpha=x});d3.timer(force.tick);} +return force;};force.start=function(){var i,j,n=nodes.length,m=links.length,w=size[0],h=size[1],neighbors,o;for(i=0;imax)max=o;sums.push(o);} +for(j=0;jv){j=i;v=k;}} +return j;} +function d3_layout_stackReduceSum(d){return d.reduce(d3_layout_stackSum,0);} +function d3_layout_stackSum(p,d){return p+d[1];} +d3.layout.histogram=function(){var frequency=true,valuer=Number,ranger=d3_layout_histogramRange,binner=d3_layout_histogramBinSturges;function histogram(data,i){var bins=[],values=data.map(valuer,this),range=ranger.call(this,values,i),thresholds=binner.call(this,range,values,i),bin,i=-1,n=values.length,m=thresholds.length-1,k=frequency?1:1/n,x;while(++i0){i=-1;while(++i=range[0]&&x<=range[1]){bin=bins[d3.bisect(thresholds,x,1,m)-1];bin.y+=k;bin.push(data[i]);}}} +return bins;} +histogram.value=function(x){if(!arguments.length)return valuer;valuer=x;return histogram;};histogram.range=function(x){if(!arguments.length)return ranger;ranger=d3_functor(x);return histogram;};histogram.bins=function(x){if(!arguments.length)return binner;binner=typeof x==="number"?function(range){return d3_layout_histogramBinFixed(range,x);}:d3_functor(x);return histogram;};histogram.frequency=function(x){if(!arguments.length)return frequency;frequency=!!x;return histogram;};return histogram;};function d3_layout_histogramBinSturges(range,values){return d3_layout_histogramBinFixed(range,Math.ceil(Math.log(values.length)/Math.LN2+1));} +function d3_layout_histogramBinFixed(range,n){var x=-1,b=+range[0],m=(range[1]-b)/n,f=[];while(++x<=n)f[x]=m*x+b;return f;} +function d3_layout_histogramRange(values){return[d3.min(values),d3.max(values)];} +d3.layout.tree=function(){var hierarchy=d3.layout.hierarchy().sort(null).value(null),separation=d3_layout_treeSeparation,size=[1,1];function tree(d,i){var nodes=hierarchy.call(this,d,i),root=nodes[0];function firstWalk(node,previousSibling){var children=node.children,layout=node._tree;if(children&&(n=children.length)){var n,firstChild=children[0],previousChild,ancestor=firstChild,child,i=-1;while(++i0){d3_layout_treeMove(d3_layout_treeAncestor(vim,node,ancestor),node,shift);sip+=shift;sop+=shift;} +sim+=vim._tree.mod;sip+=vip._tree.mod;som+=vom._tree.mod;sop+=vop._tree.mod;} +if(vim&&!d3_layout_treeRight(vop)){vop._tree.thread=vim;vop._tree.mod+=sim-sop;} +if(vip&&!d3_layout_treeLeft(vom)){vom._tree.thread=vip;vom._tree.mod+=sip-som;ancestor=node;}} +return ancestor;} +d3_layout_treeVisitAfter(root,function(node,previousSibling){node._tree={ancestor:node,prelim:0,mod:0,change:0,shift:0,number:previousSibling?previousSibling._tree.number+1:0};});firstWalk(root);secondWalk(root,-root._tree.prelim);var left=d3_layout_treeSearch(root,d3_layout_treeLeftmost),right=d3_layout_treeSearch(root,d3_layout_treeRightmost),deep=d3_layout_treeSearch(root,d3_layout_treeDeepest),x0=left.x-separation(left,right)/2,x1=right.x+separation(right,left)/2,y1=deep.depth||1;d3_layout_treeVisitAfter(root,function(node){node.x=(node.x-x0)/(x1-x0)*size[0];node.y=node.depth/y1*size[1];delete node._tree;});return nodes;} +tree.separation=function(x){if(!arguments.length)return separation;separation=x;return tree;};tree.size=function(x){if(!arguments.length)return size;size=x;return tree;};return d3_layout_hierarchyRebind(tree,hierarchy);};function d3_layout_treeSeparation(a,b){return a.parent==b.parent?1:2;} +function d3_layout_treeLeft(node){var children=node.children;return children&&children.length?children[0]:node._tree.thread;} +function d3_layout_treeRight(node){var children=node.children,n;return children&&(n=children.length)?children[n-1]:node._tree.thread;} +function d3_layout_treeSearch(node,compare){var children=node.children;if(children&&(n=children.length)){var child,n,i=-1;while(++i0){node=child;}}} +return node;} +function d3_layout_treeRightmost(a,b){return a.x-b.x;} +function d3_layout_treeLeftmost(a,b){return b.x-a.x;} +function d3_layout_treeDeepest(a,b){return a.depth-b.depth;} +function d3_layout_treeVisitAfter(node,callback){function visit(node,previousSibling){var children=node.children;if(children&&(n=children.length)){var child,previousChild=null,i=-1,n;while(++i=0){child=children[i]._tree;child.prelim+=shift;child.mod+=shift;shift+=child.shift+(change+=child.change);}} +function d3_layout_treeMove(ancestor,node,shift){ancestor=ancestor._tree;node=node._tree;var change=shift/(node.number-ancestor.number);ancestor.change+=change;node.change-=change;node.shift+=shift;node.prelim+=shift;node.mod+=shift;} +function d3_layout_treeAncestor(vim,node,ancestor){return vim._tree.ancestor.parent==node.parent?vim._tree.ancestor:ancestor;} +d3.layout.pack=function(){var hierarchy=d3.layout.hierarchy().sort(d3_layout_packSort),padding=0,size=[1,1];function pack(d,i){var nodes=hierarchy.call(this,d,i),root=nodes[0];root.x=0;root.y=0;d3_layout_treeVisitAfter(root,function(d){d.r=Math.sqrt(d.value);});d3_layout_treeVisitAfter(root,d3_layout_packSiblings);var w=size[0],h=size[1],k=Math.max(2*root.r/w,2*root.r/h);if(padding>0){var dr=padding*k/2;d3_layout_treeVisitAfter(root,function(d){d.r+=dr;});d3_layout_treeVisitAfter(root,d3_layout_packSiblings);d3_layout_treeVisitAfter(root,function(d){d.r-=dr;});k=Math.max(2*root.r/w,2*root.r/h);} +d3_layout_packTransform(root,w/2,h/2,1/k);return nodes;} +pack.size=function(x){if(!arguments.length)return size;size=x;return pack;};pack.padding=function(_){if(!arguments.length)return padding;padding=+_;return pack;};return d3_layout_hierarchyRebind(pack,hierarchy);};function d3_layout_packSort(a,b){return a.value-b.value;} +function d3_layout_packInsert(a,b){var c=a._pack_next;a._pack_next=b;b._pack_prev=a;b._pack_next=c;c._pack_prev=b;} +function d3_layout_packSplice(a,b){a._pack_next=b;b._pack_prev=a;} +function d3_layout_packIntersects(a,b){var dx=b.x-a.x,dy=b.y-a.y,dr=a.r+b.r;return dr*dr-dx*dx-dy*dy>.001;} +function d3_layout_packSiblings(node){if(!(nodes=node.children)||!(n=nodes.length))return;var nodes,xMin=Infinity,xMax=-Infinity,yMin=Infinity,yMax=-Infinity,a,b,c,i,j,k,n;function bound(node){xMin=Math.min(node.x-node.r,xMin);xMax=Math.max(node.x+node.r,xMax);yMin=Math.min(node.y-node.r,yMin);yMax=Math.max(node.y+node.r,yMax);} +nodes.forEach(d3_layout_packLink);a=nodes[0];a.x=-a.r;a.y=0;bound(a);if(n>1){b=nodes[1];b.x=b.r;b.y=0;bound(b);if(n>2){c=nodes[2];d3_layout_packPlace(a,b,c);bound(c);d3_layout_packInsert(a,c);a._pack_prev=c;d3_layout_packInsert(c,b);b=a._pack_next;for(i=3;i0){row.push(child=remaining[n-1]);row.area+=child.area;if(mode!=="squarify"||(score=worst(row,u))<=best){remaining.pop();best=score;}else{row.area-=row.pop().area;position(row,u,rect,false);u=Math.min(rect.dx,rect.dy);row.length=row.area=0;best=Infinity;}} +if(row.length){position(row,u,rect,true);row.length=row.area=0;} +children.forEach(squarify);}} +function stickify(node){var children=node.children;if(children&&children.length){var rect=pad(node),remaining=children.slice(),child,row=[];scale(remaining,rect.dx*rect.dy/node.value);row.area=0;while(child=remaining.pop()){row.push(child);row.area+=child.area;if(child.z!=null){position(row,child.z?rect.dx:rect.dy,rect,!remaining.length);row.length=row.area=0;}} +children.forEach(stickify);}} +function worst(row,u){var s=row.area,r,rmax=0,rmin=Infinity,i=-1,n=row.length;while(++irmax)rmax=r;} +s*=s;u*=u;return s?Math.max(u*rmax*ratio/s,s/(u*rmin*ratio)):Infinity;} +function position(row,u,rect,flush){var i=-1,n=row.length,x=rect.x,y=rect.y,v=u?round(row.area/u):0,o;if(u==rect.dx){if(flush||v>rect.dy)v=rect.dy;while(++irect.dx)v=rect.dx;while(++i1);return µ+σ*x*Math.sqrt(-2*Math.log(r)/r);};},logNormal:function(){var random=d3.random.normal.apply(d3,arguments);return function(){return Math.exp(random());};},irwinHall:function(m){return function(){for(var s=0,j=0;j2?d3_scale_polylinear:d3_scale_bilinear,uninterpolate=clamp?d3_uninterpolateClamp:d3_uninterpolateNumber;output=linear(domain,range,uninterpolate,interpolate);input=linear(range,domain,uninterpolate,d3_interpolate);return scale;} +function scale(x){return output(x);} +scale.invert=function(y){return input(y);};scale.domain=function(x){if(!arguments.length)return domain;domain=x.map(Number);return rescale();};scale.range=function(x){if(!arguments.length)return range;range=x;return rescale();};scale.rangeRound=function(x){return scale.range(x).interpolate(d3_interpolateRound);};scale.clamp=function(x){if(!arguments.length)return clamp;clamp=x;return rescale();};scale.interpolate=function(x){if(!arguments.length)return interpolate;interpolate=x;return rescale();};scale.ticks=function(m){return d3_scale_linearTicks(domain,m);};scale.tickFormat=function(m,format){return d3_scale_linearTickFormat(domain,m,format);};scale.nice=function(){d3_scale_nice(domain,d3_scale_linearNice);return rescale();};scale.copy=function(){return d3_scale_linear(domain,range,interpolate,clamp);};return rescale();} +function d3_scale_linearRebind(scale,linear){return d3.rebind(scale,linear,"range","rangeRound","interpolate","clamp");} +function d3_scale_linearNice(dx){dx=Math.pow(10,Math.round(Math.log(dx)/Math.LN10)-1);return dx&&{floor:function(x){return Math.floor(x/dx)*dx;},ceil:function(x){return Math.ceil(x/dx)*dx;}};} +function d3_scale_linearTickRange(domain,m){var extent=d3_scaleExtent(domain),span=extent[1]-extent[0],step=Math.pow(10,Math.floor(Math.log(span/m)/Math.LN10)),err=m/span*step;if(err<=.15)step*=10;else if(err<=.35)step*=5;else if(err<=.75)step*=2;extent[0]=Math.ceil(extent[0]/step)*step;extent[1]=Math.floor(extent[1]/step)*step+step*.5;extent[2]=step;return extent;} +function d3_scale_linearTicks(domain,m){return d3.range.apply(d3,d3_scale_linearTickRange(domain,m));} +function d3_scale_linearTickFormat(domain,m,format){var precision=-Math.floor(Math.log(d3_scale_linearTickRange(domain,m)[2])/Math.LN10+.01);return d3.format(format?format.replace(d3_format_re,function(a,b,c,d,e,f,g,h,i,j){return[b,c,d,e,f,g,h,i||"."+(precision-(j==="%")*2),j].join("");}):",."+precision+"f");} +d3.scale.log=function(){return d3_scale_log(d3.scale.linear().domain([0,Math.LN10]),10,d3_scale_logp,d3_scale_powp);};function d3_scale_log(linear,base,log,pow){function scale(x){return linear(log(x));} +scale.invert=function(x){return pow(linear.invert(x));};scale.domain=function(x){if(!arguments.length)return linear.domain().map(pow);if(x[0]<0)log=d3_scale_logn,pow=d3_scale_pown;else log=d3_scale_logp,pow=d3_scale_powp;linear.domain(x.map(log));return scale;};scale.base=function(_){if(!arguments.length)return base;base=+_;return scale;};scale.nice=function(){linear.domain(d3_scale_nice(linear.domain(),d3_scale_logNice(base)));return scale;};scale.ticks=function(){var extent=d3_scaleExtent(linear.domain()),ticks=[];if(extent.every(isFinite)){var b=Math.log(base),i=Math.floor(extent[0]/b),j=Math.ceil(extent[1]/b),u=pow(extent[0]),v=pow(extent[1]),n=base%1?2:base;if(log===d3_scale_logn){ticks.push(-Math.pow(base,-i));for(;i++0;k--)ticks.push(-Math.pow(base,-i)*k);}else{for(;iv;j--){} +ticks=ticks.slice(i,j);} +return ticks;};scale.tickFormat=function(n,format){if(arguments.length<2)format=d3_scale_logFormat;if(!arguments.length)return format;var b=Math.log(base),k=Math.max(.1,n/scale.ticks().length),f=log===d3_scale_logn?(e=-1e-12,Math.floor):(e=1e-12,Math.ceil),e;return function(d){return d/pow(b*f(log(d)/b+e))<=k?format(d):"";};};scale.copy=function(){return d3_scale_log(linear.copy(),base,log,pow);};return d3_scale_linearRebind(scale,linear);} +var d3_scale_logFormat=d3.format(".0e");function d3_scale_logp(x){return Math.log(x<0?0:x);} +function d3_scale_powp(x){return Math.exp(x);} +function d3_scale_logn(x){return-Math.log(x>0?0:-x);} +function d3_scale_pown(x){return-Math.exp(-x);} +function d3_scale_logNice(base){base=Math.log(base);var nice={floor:function(x){return Math.floor(x/base)*base;},ceil:function(x){return Math.ceil(x/base)*base;}};return function(){return nice;};} +d3.scale.pow=function(){return d3_scale_pow(d3.scale.linear(),1);};function d3_scale_pow(linear,exponent){var powp=d3_scale_powPow(exponent),powb=d3_scale_powPow(1/exponent);function scale(x){return linear(powp(x));} +scale.invert=function(x){return powb(linear.invert(x));};scale.domain=function(x){if(!arguments.length)return linear.domain().map(powb);linear.domain(x.map(powp));return scale;};scale.ticks=function(m){return d3_scale_linearTicks(scale.domain(),m);};scale.tickFormat=function(m,format){return d3_scale_linearTickFormat(scale.domain(),m,format);};scale.nice=function(){return scale.domain(d3_scale_nice(scale.domain(),d3_scale_linearNice));};scale.exponent=function(x){if(!arguments.length)return exponent;var domain=scale.domain();powp=d3_scale_powPow(exponent=x);powb=d3_scale_powPow(1/exponent);return scale.domain(domain);};scale.copy=function(){return d3_scale_pow(linear.copy(),exponent);};return d3_scale_linearRebind(scale,linear);} +function d3_scale_powPow(e){return function(x){return x<0?-Math.pow(-x,e):Math.pow(x,e);};} +d3.scale.sqrt=function(){return d3.scale.pow().exponent(.5);};d3.scale.ordinal=function(){return d3_scale_ordinal([],{t:"range",a:[[]]});};function d3_scale_ordinal(domain,ranger){var index,range,rangeBand;function scale(x){return range[((index.get(x)||index.set(x,domain.push(x)))-1)%range.length];} +function steps(start,step){return d3.range(domain.length).map(function(i){return start+step*i;});} +scale.domain=function(x){if(!arguments.length)return domain;domain=[];index=new d3_Map();var i=-1,n=x.length,xi;while(++i=d3_svg_arcMax?r0?"M0,"+r1+"A"+r1+","+r1+" 0 1,1 0,"+-r1+"A"+r1+","+r1+" 0 1,1 0,"+r1+"M0,"+r0+"A"+r0+","+r0+" 0 1,0 0,"+-r0+"A"+r0+","+r0+" 0 1,0 0,"+r0+"Z":"M0,"+r1+"A"+r1+","+r1+" 0 1,1 0,"+-r1+"A"+r1+","+r1+" 0 1,1 0,"+r1+"Z":r0?"M"+r1*c0+","+r1*s0+"A"+r1+","+r1+" 0 "+df+",1 "+r1*c1+","+r1*s1+"L"+r0*c1+","+r0*s1+"A"+r0+","+r0+" 0 "+df+",0 "+r0*c0+","+r0*s0+"Z":"M"+r1*c0+","+r1*s0+"A"+r1+","+r1+" 0 "+df+",1 "+r1*c1+","+r1*s1+"L0,0"+"Z";} +arc.innerRadius=function(v){if(!arguments.length)return innerRadius;innerRadius=d3_functor(v);return arc;};arc.outerRadius=function(v){if(!arguments.length)return outerRadius;outerRadius=d3_functor(v);return arc;};arc.startAngle=function(v){if(!arguments.length)return startAngle;startAngle=d3_functor(v);return arc;};arc.endAngle=function(v){if(!arguments.length)return endAngle;endAngle=d3_functor(v);return arc;};arc.centroid=function(){var r=(innerRadius.apply(this,arguments)+outerRadius.apply(this,arguments))/2,a=(startAngle.apply(this,arguments)+endAngle.apply(this,arguments))/2+d3_svg_arcOffset;return[Math.cos(a)*r,Math.sin(a)*r];};return arc;};var d3_svg_arcOffset=-π/2,d3_svg_arcMax=2*π-1e-6;function d3_svg_arcInnerRadius(d){return d.innerRadius;} +function d3_svg_arcOuterRadius(d){return d.outerRadius;} +function d3_svg_arcStartAngle(d){return d.startAngle;} +function d3_svg_arcEndAngle(d){return d.endAngle;} +d3.svg.line.radial=function(){var line=d3_svg_line(d3_svg_lineRadial);line.radius=line.x,delete line.x;line.angle=line.y,delete line.y;return line;};function d3_svg_lineRadial(points){var point,i=-1,n=points.length,r,a;while(++iπ)+",1 "+p;} +function curve(r0,p0,r1,p1){return"Q 0,0 "+p1;} +chord.radius=function(v){if(!arguments.length)return radius;radius=d3_functor(v);return chord;};chord.source=function(v){if(!arguments.length)return source;source=d3_functor(v);return chord;};chord.target=function(v){if(!arguments.length)return target;target=d3_functor(v);return chord;};chord.startAngle=function(v){if(!arguments.length)return startAngle;startAngle=d3_functor(v);return chord;};chord.endAngle=function(v){if(!arguments.length)return endAngle;endAngle=d3_functor(v);return chord;};return chord;};function d3_svg_chordRadius(d){return d.radius;} +d3.svg.diagonal=function(){var source=d3_source,target=d3_target,projection=d3_svg_diagonalProjection;function diagonal(d,i){var p0=source.call(this,d,i),p3=target.call(this,d,i),m=(p0.y+p3.y)/2,p=[p0,{x:p0.x,y:m},{x:p3.x,y:m},p3];p=p.map(projection);return"M"+p[0]+"C"+p[1]+" "+p[2]+" "+p[3];} +diagonal.source=function(x){if(!arguments.length)return source;source=d3_functor(x);return diagonal;};diagonal.target=function(x){if(!arguments.length)return target;target=d3_functor(x);return diagonal;};diagonal.projection=function(x){if(!arguments.length)return projection;projection=x;return diagonal;};return diagonal;};function d3_svg_diagonalProjection(d){return[d.x,d.y];} +d3.svg.diagonal.radial=function(){var diagonal=d3.svg.diagonal(),projection=d3_svg_diagonalProjection,projection_=diagonal.projection;diagonal.projection=function(x){return arguments.length?projection_(d3_svg_diagonalRadialProjection(projection=x)):projection;};return diagonal;};function d3_svg_diagonalRadialProjection(projection){return function(){var d=projection.apply(this,arguments),r=d[0],a=d[1]+d3_svg_arcOffset;return[r*Math.cos(a),r*Math.sin(a)];};} +d3.svg.symbol=function(){var type=d3_svg_symbolType,size=d3_svg_symbolSize;function symbol(d,i){return(d3_svg_symbols.get(type.call(this,d,i))||d3_svg_symbolCircle)(size.call(this,d,i));} +symbol.type=function(x){if(!arguments.length)return type;type=d3_functor(x);return symbol;};symbol.size=function(x){if(!arguments.length)return size;size=d3_functor(x);return symbol;};return symbol;};function d3_svg_symbolSize(){return 64;} +function d3_svg_symbolType(){return"circle";} +function d3_svg_symbolCircle(size){var r=Math.sqrt(size/π);return"M0,"+r+"A"+r+","+r+" 0 1,1 0,"+-r+"A"+r+","+r+" 0 1,1 0,"+r+"Z";} +var d3_svg_symbols=d3.map({circle:d3_svg_symbolCircle,cross:function(size){var r=Math.sqrt(size/5)/2;return"M"+-3*r+","+-r+"H"+-r+"V"+-3*r+"H"+r+"V"+-r+"H"+3*r+"V"+r+"H"+r+"V"+3*r+"H"+-r+"V"+r+"H"+-3*r+"Z";},diamond:function(size){var ry=Math.sqrt(size/(2*d3_svg_symbolTan30)),rx=ry*d3_svg_symbolTan30;return"M0,"+-ry+"L"+rx+",0"+" 0,"+ry+" "+-rx+",0"+"Z";},square:function(size){var r=Math.sqrt(size)/2;return"M"+-r+","+-r+"L"+r+","+-r+" "+r+","+r+" "+-r+","+r+"Z";},"triangle-down":function(size){var rx=Math.sqrt(size/d3_svg_symbolSqrt3),ry=rx*d3_svg_symbolSqrt3/2;return"M0,"+ry+"L"+rx+","+-ry+" "+-rx+","+-ry+"Z";},"triangle-up":function(size){var rx=Math.sqrt(size/d3_svg_symbolSqrt3),ry=rx*d3_svg_symbolSqrt3/2;return"M0,"+-ry+"L"+rx+","+ry+" "+-rx+","+ry+"Z";}});d3.svg.symbolTypes=d3_svg_symbols.keys();var d3_svg_symbolSqrt3=Math.sqrt(3),d3_svg_symbolTan30=Math.tan(30*d3_radians);function d3_transition(groups,id){d3_arraySubclass(groups,d3_transitionPrototype);groups.id=id;return groups;} +var d3_transitionPrototype=[],d3_transitionId=0,d3_transitionInheritId,d3_transitionInherit={ease:d3_ease_cubicInOut,delay:0,duration:250};d3_transitionPrototype.call=d3_selectionPrototype.call;d3_transitionPrototype.empty=d3_selectionPrototype.empty;d3_transitionPrototype.node=d3_selectionPrototype.node;d3.transition=function(selection){return arguments.length?d3_transitionInheritId?selection.transition():selection:d3_selectionRoot.transition();};d3.transition.prototype=d3_transitionPrototype;d3_transitionPrototype.select=function(selector){var id=this.id,subgroups=[],subgroup,subnode,node;if(typeof selector!=="function")selector=d3_selection_selector(selector);for(var j=-1,m=this.length;++jid)return stop();lock.active=id;event.start.call(node,d,i);transition.tween.forEach(function(key,value){if(value=value.call(node,d,i)){tweened.push(value);}});if(!tick(elapsed))d3.timer(tick,0,time);return 1;} +function tick(elapsed){if(lock.active!==id)return stop();var t=(elapsed-delay)/duration,e=ease(t),n=tweened.length;while(n>0){tweened[--n].call(node,e);} +if(t>=1){stop();event.end.call(node,d,i);return 1;}} +function stop(){if(--lock.count)delete lock[id];else delete node.__transition__;return 1;}},0,time);return transition;}} +d3.svg.axis=function(){var scale=d3.scale.linear(),orient=d3_svg_axisDefaultOrient,tickMajorSize=6,tickMinorSize=6,tickEndSize=6,tickPadding=3,tickArguments_=[10],tickValues=null,tickFormat_,tickSubdivide=0;function axis(g){g.each(function(){var g=d3.select(this);var ticks=tickValues==null?scale.ticks?scale.ticks.apply(scale,tickArguments_):scale.domain():tickValues,tickFormat=tickFormat_==null?scale.tickFormat?scale.tickFormat.apply(scale,tickArguments_):String:tickFormat_;var subticks=d3_svg_axisSubdivide(scale,ticks,tickSubdivide),subtick=g.selectAll(".tick.minor").data(subticks,String),subtickEnter=subtick.enter().insert("line",".tick").attr("class","tick minor").style("opacity",1e-6),subtickExit=d3.transition(subtick.exit()).style("opacity",1e-6).remove(),subtickUpdate=d3.transition(subtick).style("opacity",1);var tick=g.selectAll(".tick.major").data(ticks,String),tickEnter=tick.enter().insert("g","path").attr("class","tick major").style("opacity",1e-6),tickExit=d3.transition(tick.exit()).style("opacity",1e-6).remove(),tickUpdate=d3.transition(tick).style("opacity",1),tickTransform;var range=d3_scaleRange(scale),path=g.selectAll(".domain").data([0]),pathUpdate=(path.enter().append("path").attr("class","domain"),d3.transition(path));var scale1=scale.copy(),scale0=this.__chart__||scale1;this.__chart__=scale1;tickEnter.append("line");tickEnter.append("text");var lineEnter=tickEnter.select("line"),lineUpdate=tickUpdate.select("line"),text=tick.select("text").text(tickFormat),textEnter=tickEnter.select("text"),textUpdate=tickUpdate.select("text");switch(orient){case"bottom":{tickTransform=d3_svg_axisX;subtickEnter.attr("y2",tickMinorSize);subtickUpdate.attr("x2",0).attr("y2",tickMinorSize);lineEnter.attr("y2",tickMajorSize);textEnter.attr("y",Math.max(tickMajorSize,0)+tickPadding);lineUpdate.attr("x2",0).attr("y2",tickMajorSize);textUpdate.attr("x",0).attr("y",Math.max(tickMajorSize,0)+tickPadding);text.attr("dy",".71em").style("text-anchor","middle");pathUpdate.attr("d","M"+range[0]+","+tickEndSize+"V0H"+range[1]+"V"+tickEndSize);break;} +case"top":{tickTransform=d3_svg_axisX;subtickEnter.attr("y2",-tickMinorSize);subtickUpdate.attr("x2",0).attr("y2",-tickMinorSize);lineEnter.attr("y2",-tickMajorSize);textEnter.attr("y",-(Math.max(tickMajorSize,0)+tickPadding));lineUpdate.attr("x2",0).attr("y2",-tickMajorSize);textUpdate.attr("x",0).attr("y",-(Math.max(tickMajorSize,0)+tickPadding));text.attr("dy","0em").style("text-anchor","middle");pathUpdate.attr("d","M"+range[0]+","+-tickEndSize+"V0H"+range[1]+"V"+-tickEndSize);break;} +case"left":{tickTransform=d3_svg_axisY;subtickEnter.attr("x2",-tickMinorSize);subtickUpdate.attr("x2",-tickMinorSize).attr("y2",0);lineEnter.attr("x2",-tickMajorSize);textEnter.attr("x",-(Math.max(tickMajorSize,0)+tickPadding));lineUpdate.attr("x2",-tickMajorSize).attr("y2",0);textUpdate.attr("x",-(Math.max(tickMajorSize,0)+tickPadding)).attr("y",0);text.attr("dy",".32em").style("text-anchor","end");pathUpdate.attr("d","M"+-tickEndSize+","+range[0]+"H0V"+range[1]+"H"+-tickEndSize);break;} +case"right":{tickTransform=d3_svg_axisY;subtickEnter.attr("x2",tickMinorSize);subtickUpdate.attr("x2",tickMinorSize).attr("y2",0);lineEnter.attr("x2",tickMajorSize);textEnter.attr("x",Math.max(tickMajorSize,0)+tickPadding);lineUpdate.attr("x2",tickMajorSize).attr("y2",0);textUpdate.attr("x",Math.max(tickMajorSize,0)+tickPadding).attr("y",0);text.attr("dy",".32em").style("text-anchor","start");pathUpdate.attr("d","M"+tickEndSize+","+range[0]+"H0V"+range[1]+"H"+tickEndSize);break;}} +if(scale.ticks){tickEnter.call(tickTransform,scale0);tickUpdate.call(tickTransform,scale1);tickExit.call(tickTransform,scale1);subtickEnter.call(tickTransform,scale0);subtickUpdate.call(tickTransform,scale1);subtickExit.call(tickTransform,scale1);}else{var dx=scale1.rangeBand()/2,x=function(d){return scale1(d)+dx;};tickEnter.call(tickTransform,x);tickUpdate.call(tickTransform,x);}});} +axis.scale=function(x){if(!arguments.length)return scale;scale=x;return axis;};axis.orient=function(x){if(!arguments.length)return orient;orient=x in d3_svg_axisOrients?x+"":d3_svg_axisDefaultOrient;return axis;};axis.ticks=function(){if(!arguments.length)return tickArguments_;tickArguments_=arguments;return axis;};axis.tickValues=function(x){if(!arguments.length)return tickValues;tickValues=x;return axis;};axis.tickFormat=function(x){if(!arguments.length)return tickFormat_;tickFormat_=x;return axis;};axis.tickSize=function(x,y){if(!arguments.length)return tickMajorSize;var n=arguments.length-1;tickMajorSize=+x;tickMinorSize=n>1?+y:tickMajorSize;tickEndSize=n>0?+arguments[n]:tickMajorSize;return axis;};axis.tickPadding=function(x){if(!arguments.length)return tickPadding;tickPadding=+x;return axis;};axis.tickSubdivide=function(x){if(!arguments.length)return tickSubdivide;tickSubdivide=+x;return axis;};return axis;};var d3_svg_axisDefaultOrient="bottom",d3_svg_axisOrients={top:1,right:1,bottom:1,left:1};function d3_svg_axisX(selection,x){selection.attr("transform",function(d){return"translate("+x(d)+",0)";});} +function d3_svg_axisY(selection,y){selection.attr("transform",function(d){return"translate(0,"+y(d)+")";});} +function d3_svg_axisSubdivide(scale,ticks,m){subticks=[];if(m&&ticks.length>1){var extent=d3_scaleExtent(scale.domain()),subticks,i=-1,n=ticks.length,d=(ticks[1]-ticks[0])/++m,j,v;while(++i0;){if((v=+ticks[i]-j*d)>=extent[0]){subticks.push(v);}}} +for(--i,j=0;++jrect,.s>rect").attr("width",extent[1][0]-extent[0][0]);} +function redrawY(g){g.select(".extent").attr("y",extent[0][1]);g.selectAll(".extent,.e>rect,.w>rect").attr("height",extent[1][1]-extent[0][1]);} +function brushstart(){var target=this,eventTarget=d3.select(d3.event.target),event_=event.of(target,arguments),g=d3.select(target),resizing=eventTarget.datum(),resizingX=!/^(n|s)$/.test(resizing)&&x,resizingY=!/^(e|w)$/.test(resizing)&&y,dragging=eventTarget.classed("extent"),center,origin=mouse(),offset;var w=d3.select(d3_window).on("mousemove.brush",brushmove).on("mouseup.brush",brushend).on("touchmove.brush",brushmove).on("touchend.brush",brushend).on("keydown.brush",keydown).on("keyup.brush",keyup);if(dragging){origin[0]=extent[0][0]-origin[0];origin[1]=extent[0][1]-origin[1];}else if(resizing){var ex=+/w$/.test(resizing),ey=+/^n/.test(resizing);offset=[extent[1-ex][0]-origin[0],extent[1-ey][1]-origin[1]];origin[0]=extent[ex][0];origin[1]=extent[ey][1];}else if(d3.event.altKey)center=origin.slice();g.style("pointer-events","none").selectAll(".resize").style("display",null);d3.select("body").style("cursor",eventTarget.style("cursor"));event_({type:"brushstart"});brushmove();d3_eventCancel();function mouse(){var touches=d3.event.changedTouches;return touches?d3.touches(target,touches)[0]:d3.mouse(target);} +function keydown(){if(d3.event.keyCode==32){if(!dragging){center=null;origin[0]-=extent[1][0];origin[1]-=extent[1][1];dragging=2;} +d3_eventCancel();}} +function keyup(){if(d3.event.keyCode==32&&dragging==2){origin[0]+=extent[1][0];origin[1]+=extent[1][1];dragging=0;d3_eventCancel();}} +function brushmove(){var point=mouse(),moved=false;if(offset){point[0]+=offset[0];point[1]+=offset[1];} +if(!dragging){if(d3.event.altKey){if(!center)center=[(extent[0][0]+extent[1][0])/2,(extent[0][1]+extent[1][1])/2];origin[0]=extent[+(point[0]1?Date.UTC.apply(this,arguments):arguments[0]);} +d3_time_utc.prototype={getDate:function(){return this._.getUTCDate();},getDay:function(){return this._.getUTCDay();},getFullYear:function(){return this._.getUTCFullYear();},getHours:function(){return this._.getUTCHours();},getMilliseconds:function(){return this._.getUTCMilliseconds();},getMinutes:function(){return this._.getUTCMinutes();},getMonth:function(){return this._.getUTCMonth();},getSeconds:function(){return this._.getUTCSeconds();},getTime:function(){return this._.getTime();},getTimezoneOffset:function(){return 0;},valueOf:function(){return this._.valueOf();},setDate:function(){d3_time_prototype.setUTCDate.apply(this._,arguments);},setDay:function(){d3_time_prototype.setUTCDay.apply(this._,arguments);},setFullYear:function(){d3_time_prototype.setUTCFullYear.apply(this._,arguments);},setHours:function(){d3_time_prototype.setUTCHours.apply(this._,arguments);},setMilliseconds:function(){d3_time_prototype.setUTCMilliseconds.apply(this._,arguments);},setMinutes:function(){d3_time_prototype.setUTCMinutes.apply(this._,arguments);},setMonth:function(){d3_time_prototype.setUTCMonth.apply(this._,arguments);},setSeconds:function(){d3_time_prototype.setUTCSeconds.apply(this._,arguments);},setTime:function(){d3_time_prototype.setTime.apply(this._,arguments);}};var d3_time_prototype=Date.prototype;var d3_time_formatDateTime="%a %b %e %X %Y",d3_time_formatDate="%m/%d/%Y",d3_time_formatTime="%H:%M:%S";var d3_time_days=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d3_time_dayAbbreviations=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],d3_time_months=["January","February","March","April","May","June","July","August","September","October","November","December"],d3_time_monthAbbreviations=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function d3_time_interval(local,step,number){function round(date){var d0=local(date),d1=offset(d0,1);return date-d01){while(time=m)return-1;c=template.charCodeAt(i++);if(c===37){p=d3_time_parsers[template.charAt(i++)];if(!p||(j=p(date,string,j))<0)return-1;}else if(c!=string.charCodeAt(j++)){return-1;}} +return j;} +function d3_time_formatRe(names){return new RegExp("^(?:"+names.map(d3.requote).join("|")+")","i");} +function d3_time_formatLookup(names){var map=new d3_Map(),i=-1,n=names.length;while(++i=12?"PM":"AM";},S:function(d,p){return d3_time_formatPad(d.getSeconds(),p,2);},U:function(d,p){return d3_time_formatPad(d3.time.sundayOfYear(d),p,2);},w:function(d){return d.getDay();},W:function(d,p){return d3_time_formatPad(d3.time.mondayOfYear(d),p,2);},x:d3.time.format(d3_time_formatDate),X:d3.time.format(d3_time_formatTime),y:function(d,p){return d3_time_formatPad(d.getFullYear()%100,p,2);},Y:function(d,p){return d3_time_formatPad(d.getFullYear()%1e4,p,4);},Z:d3_time_zone,"%":function(){return"%";}};var d3_time_parsers={a:d3_time_parseWeekdayAbbrev,A:d3_time_parseWeekday,b:d3_time_parseMonthAbbrev,B:d3_time_parseMonth,c:d3_time_parseLocaleFull,d:d3_time_parseDay,e:d3_time_parseDay,H:d3_time_parseHour24,I:d3_time_parseHour24,L:d3_time_parseMilliseconds,m:d3_time_parseMonthNumber,M:d3_time_parseMinutes,p:d3_time_parseAmPm,S:d3_time_parseSeconds,x:d3_time_parseLocaleDate,X:d3_time_parseLocaleTime,y:d3_time_parseYear,Y:d3_time_parseFullYear};function d3_time_parseWeekdayAbbrev(date,string,i){d3_time_dayAbbrevRe.lastIndex=0;var n=d3_time_dayAbbrevRe.exec(string.substring(i));return n?i+=n[0].length:-1;} +function d3_time_parseWeekday(date,string,i){d3_time_dayRe.lastIndex=0;var n=d3_time_dayRe.exec(string.substring(i));return n?i+=n[0].length:-1;} +function d3_time_parseMonthAbbrev(date,string,i){d3_time_monthAbbrevRe.lastIndex=0;var n=d3_time_monthAbbrevRe.exec(string.substring(i));return n?(date.m=d3_time_monthAbbrevLookup.get(n[0].toLowerCase()),i+=n[0].length):-1;} +function d3_time_parseMonth(date,string,i){d3_time_monthRe.lastIndex=0;var n=d3_time_monthRe.exec(string.substring(i));return n?(date.m=d3_time_monthLookup.get(n[0].toLowerCase()),i+=n[0].length):-1;} +function d3_time_parseLocaleFull(date,string,i){return d3_time_parse(date,d3_time_formats.c.toString(),string,i);} +function d3_time_parseLocaleDate(date,string,i){return d3_time_parse(date,d3_time_formats.x.toString(),string,i);} +function d3_time_parseLocaleTime(date,string,i){return d3_time_parse(date,d3_time_formats.X.toString(),string,i);} +function d3_time_parseFullYear(date,string,i){d3_time_numberRe.lastIndex=0;var n=d3_time_numberRe.exec(string.substring(i,i+4));return n?(date.y=+n[0],i+=n[0].length):-1;} +function d3_time_parseYear(date,string,i){d3_time_numberRe.lastIndex=0;var n=d3_time_numberRe.exec(string.substring(i,i+2));return n?(date.y=d3_time_expandYear(+n[0]),i+=n[0].length):-1;} +function d3_time_expandYear(d){return d+(d>68?1900:2e3);} +function d3_time_parseMonthNumber(date,string,i){d3_time_numberRe.lastIndex=0;var n=d3_time_numberRe.exec(string.substring(i,i+2));return n?(date.m=n[0]-1,i+=n[0].length):-1;} +function d3_time_parseDay(date,string,i){d3_time_numberRe.lastIndex=0;var n=d3_time_numberRe.exec(string.substring(i,i+2));return n?(date.d=+n[0],i+=n[0].length):-1;} +function d3_time_parseHour24(date,string,i){d3_time_numberRe.lastIndex=0;var n=d3_time_numberRe.exec(string.substring(i,i+2));return n?(date.H=+n[0],i+=n[0].length):-1;} +function d3_time_parseMinutes(date,string,i){d3_time_numberRe.lastIndex=0;var n=d3_time_numberRe.exec(string.substring(i,i+2));return n?(date.M=+n[0],i+=n[0].length):-1;} +function d3_time_parseSeconds(date,string,i){d3_time_numberRe.lastIndex=0;var n=d3_time_numberRe.exec(string.substring(i,i+2));return n?(date.S=+n[0],i+=n[0].length):-1;} +function d3_time_parseMilliseconds(date,string,i){d3_time_numberRe.lastIndex=0;var n=d3_time_numberRe.exec(string.substring(i,i+3));return n?(date.L=+n[0],i+=n[0].length):-1;} +var d3_time_numberRe=/^\s*\d+/;function d3_time_parseAmPm(date,string,i){var n=d3_time_amPmLookup.get(string.substring(i,i+=2).toLowerCase());return n==null?-1:(date.p=n,i);} +var d3_time_amPmLookup=d3.map({am:0,pm:1});function d3_time_zone(d){var z=d.getTimezoneOffset(),zs=z>0?"-":"+",zh=~~(Math.abs(z)/60),zm=Math.abs(z)%60;return zs+d3_time_formatPad(zh,"0",2)+d3_time_formatPad(zm,"0",2);} +d3.time.format.utc=function(template){var local=d3.time.format(template);function format(date){try{d3_time=d3_time_utc;var utc=new d3_time();utc._=date;return local(utc);}finally{d3_time=Date;}} +format.parse=function(string){try{d3_time=d3_time_utc;var date=local.parse(string);return date&&date._;}finally{d3_time=Date;}};format.toString=local.toString;return format;};var d3_time_formatIso=d3.time.format.utc("%Y-%m-%dT%H:%M:%S.%LZ");d3.time.format.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?d3_time_formatIsoNative:d3_time_formatIso;function d3_time_formatIsoNative(date){return date.toISOString();} +d3_time_formatIsoNative.parse=function(string){var date=new Date(string);return isNaN(date)?null:date;};d3_time_formatIsoNative.toString=d3_time_formatIso.toString;d3.time.second=d3_time_interval(function(date){return new d3_time(Math.floor(date/1e3)*1e3);},function(date,offset){date.setTime(date.getTime()+Math.floor(offset)*1e3);},function(date){return date.getSeconds();});d3.time.seconds=d3.time.second.range;d3.time.seconds.utc=d3.time.second.utc.range;d3.time.minute=d3_time_interval(function(date){return new d3_time(Math.floor(date/6e4)*6e4);},function(date,offset){date.setTime(date.getTime()+Math.floor(offset)*6e4);},function(date){return date.getMinutes();});d3.time.minutes=d3.time.minute.range;d3.time.minutes.utc=d3.time.minute.utc.range;d3.time.hour=d3_time_interval(function(date){var timezone=date.getTimezoneOffset()/60;return new d3_time((Math.floor(date/36e5-timezone)+timezone)*36e5);},function(date,offset){date.setTime(date.getTime()+Math.floor(offset)*36e5);},function(date){return date.getHours();});d3.time.hours=d3.time.hour.range;d3.time.hours.utc=d3.time.hour.utc.range;d3.time.month=d3_time_interval(function(date){date=d3.time.day(date);date.setDate(1);return date;},function(date,offset){date.setMonth(date.getMonth()+offset);},function(date){return date.getMonth();});d3.time.months=d3.time.month.range;d3.time.months.utc=d3.time.month.utc.range;function d3_time_scale(linear,methods,format){function scale(x){return linear(x);} +scale.invert=function(x){return d3_time_scaleDate(linear.invert(x));};scale.domain=function(x){if(!arguments.length)return linear.domain().map(d3_time_scaleDate);linear.domain(x);return scale;};scale.nice=function(m){return scale.domain(d3_scale_nice(scale.domain(),function(){return m;}));};scale.ticks=function(m,k){var extent=d3_scaleExtent(scale.domain());if(typeof m!=="function"){var span=extent[1]-extent[0],target=span/m,i=d3.bisect(d3_time_scaleSteps,target);if(i==d3_time_scaleSteps.length)return methods.year(extent,m);if(!i)return linear.ticks(m).map(d3_time_scaleDate);if(Math.log(target/d3_time_scaleSteps[i-1])(children.length-1)||pos<0)return +if(this.sliding){return this.$element.one('slid',function(){that.to(pos)})} +if(activePos==pos){return this.pause().cycle()} +return this.slide(pos>activePos?'next':'prev',$(children[pos]))},pause:function(){clearInterval(this.interval) +this.interval=null +return this},next:function(){if(this.sliding)return +return this.slide('next')},prev:function(){if(this.sliding)return +return this.slide('prev')},slide:function(type,next){var $active=this.$element.find('.active'),$next=next||$active[type](),isCycling=this.interval,direction=type=='next'?'left':'right',fallback=type=='next'?'first':'last',that=this +if(!$next.length)return +this.sliding=true +isCycling&&this.pause() +$next=$next.length?$next:this.$element.find('.item')[fallback]() +if(!$.support.transition&&this.$element.hasClass('slide')){this.$element.trigger('slide') +$active.removeClass('active') +$next.addClass('active') +this.sliding=false +this.$element.trigger('slid')}else{$next.addClass(type) +$next[0].offsetWidth +$active.addClass(direction) +$next.addClass(direction) +this.$element.trigger('slide') +this.$element.one($.support.transition.end,function(){$next.removeClass([type,direction].join(' ')).addClass('active') +$active.removeClass(['active',direction].join(' ')) +that.sliding=false +setTimeout(function(){that.$element.trigger('slid')},0)})} +isCycling&&this.cycle() +return this}} +$.fn.carousel=function(option){return this.each(function(){var $this=$(this),data=$this.data('carousel'),options=typeof option=='object'&&option +if(!data)$this.data('carousel',(data=new Carousel(this,options))) +if(typeof option=='number')data.to(option) +else if(typeof option=='string'||(option=options.slide))data[option]() +else data.cycle()})} +$.fn.carousel.defaults={interval:5000} +$.fn.carousel.Constructor=Carousel +$(function(){$('body').on('click.carousel.data-api','[data-slide]',function(e){var $this=$(this),href,$target=$($this.attr('data-target')||(href=$this.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,'')),options=!$target.data('modal')&&$.extend({},$target.data(),$this.data()) +$target.carousel(options) +e.preventDefault()})})}(window.jQuery);!function($){"use strict" +var Collapse=function(element,options){this.$element=$(element) +this.options=$.extend({},$.fn.collapse.defaults,options) +if(this.options["parent"]){this.$parent=$(this.options["parent"])} +this.options.toggle&&this.toggle()} +Collapse.prototype={constructor:Collapse,dimension:function(){var hasWidth=this.$element.hasClass('width') +return hasWidth?'width':'height'},show:function(){var dimension=this.dimension(),scroll=$.camelCase(['scroll',dimension].join('-')),actives=this.$parent&&this.$parent.find('.in'),hasData +if(actives&&actives.length){hasData=actives.data('collapse') +actives.collapse('hide') +hasData||actives.data('collapse',null)} +this.$element[dimension](0) +this.transition('addClass','show','shown') +this.$element[dimension](this.$element[0][scroll])},hide:function(){var dimension=this.dimension() +this.reset(this.$element[dimension]()) +this.transition('removeClass','hide','hidden') +this.$element[dimension](0)},reset:function(size){var dimension=this.dimension() +this.$element.removeClass('collapse') +[dimension](size||'auto') +[0].offsetWidth +this.$element.addClass('collapse')},transition:function(method,startEvent,completeEvent){var that=this,complete=function(){if(startEvent=='show')that.reset() +that.$element.trigger(completeEvent)} +this.$element.trigger(startEvent) +[method]('in') +$.support.transition&&this.$element.hasClass('collapse')?this.$element.one($.support.transition.end,complete):complete()},toggle:function(){this[this.$element.hasClass('in')?'hide':'show']()}} +$.fn.collapse=function(option){return this.each(function(){var $this=$(this),data=$this.data('collapse'),options=typeof option=='object'&&option +if(!data)$this.data('collapse',(data=new Collapse(this,options))) +if(typeof option=='string')data[option]()})} +$.fn.collapse.defaults={toggle:true} +$.fn.collapse.Constructor=Collapse +$(function(){$('body').on('click.collapse.data-api','[data-toggle=collapse]',function(e){var $this=$(this),href,target=$this.attr('data-target')||e.preventDefault()||(href=$this.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,''),option=$(target).data('collapse')?'toggle':$this.data() +$(target).collapse(option)})})}(window.jQuery);!function($){"use strict" +var toggle='[data-toggle="dropdown"]',Dropdown=function(element){var $el=$(element).on('click.dropdown.data-api',this.toggle) +$('html').on('click.dropdown.data-api',function(){$el.parent().removeClass('open')})} +Dropdown.prototype={constructor:Dropdown,toggle:function(e){var $this=$(this),selector=$this.attr('data-target'),$parent,isActive +if(!selector){selector=$this.attr('href') +selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,'')} +$parent=$(selector) +$parent.length||($parent=$this.parent()) +isActive=$parent.hasClass('open') +clearMenus() +!isActive&&$parent.toggleClass('open') +return false}} +function clearMenus(){$(toggle).parent().removeClass('open')} +$.fn.dropdown=function(option){return this.each(function(){var $this=$(this),data=$this.data('dropdown') +if(!data)$this.data('dropdown',(data=new Dropdown(this))) +if(typeof option=='string')data[option].call($this)})} +$.fn.dropdown.Constructor=Dropdown +$(function(){$('html').on('click.dropdown.data-api',clearMenus) +$('body').on('click.dropdown.data-api',toggle,Dropdown.prototype.toggle)})}(window.jQuery);!function($){"use strict" +var Modal=function(content,options){this.options=options +this.$element=$(content).delegate('[data-dismiss="modal"]','click.dismiss.modal',$.proxy(this.hide,this))} +Modal.prototype={constructor:Modal,toggle:function(){return this[!this.isShown?'show':'hide']()},show:function(){var that=this +if(this.isShown)return +$('body').addClass('modal-open') +this.isShown=true +this.$element.trigger('show') +escape.call(this) +backdrop.call(this,function(){var transition=$.support.transition&&that.$element.hasClass('fade') +!that.$element.parent().length&&that.$element.appendTo(document.body) +that.$element.show() +if(transition){that.$element[0].offsetWidth} +that.$element.addClass('in') +transition?that.$element.one($.support.transition.end,function(){that.$element.trigger('shown')}):that.$element.trigger('shown')})},hide:function(e){e&&e.preventDefault() +if(!this.isShown)return +var that=this +this.isShown=false +$('body').removeClass('modal-open') +escape.call(this) +this.$element.trigger('hide').removeClass('in') +$.support.transition&&this.$element.hasClass('fade')?hideWithTransition.call(this):hideModal.call(this)}} +function hideWithTransition(){var that=this,timeout=setTimeout(function(){that.$element.off($.support.transition.end) +hideModal.call(that)},500) +this.$element.one($.support.transition.end,function(){clearTimeout(timeout) +hideModal.call(that)})} +function hideModal(that){this.$element.hide().trigger('hidden') +backdrop.call(this)} +function backdrop(callback){var that=this,animate=this.$element.hasClass('fade')?'fade':'' +if(this.isShown&&this.options.backdrop){var doAnimate=$.support.transition&&animate +this.$backdrop=$('
';while(dowCnt'+DPGlobal.dates.daysMin[(dowCnt++)%7]+'';} +html+='';this.picker.find('.datepicker-days thead').append(html);},fillMonths:function(){var html='';var i=0 +while(i<12){html+=''+DPGlobal.dates.monthsShort[i++]+'';} +this.picker.find('.datepicker-months td').append(html);},fill:function(){var d=new Date(this.viewDate),year=d.getFullYear(),month=d.getMonth(),currentDate=this.date.valueOf();this.picker.find('.datepicker-days th:eq(1)').text(DPGlobal.dates.months[month]+' '+year);var prevMonth=new Date(year,month-1,28,0,0,0,0),day=DPGlobal.getDaysInMonth(prevMonth.getFullYear(),prevMonth.getMonth());prevMonth.setDate(day);prevMonth.setDate(day-(prevMonth.getDay()-this.weekStart+7)%7);var nextMonth=new Date(prevMonth);nextMonth.setDate(nextMonth.getDate()+42);nextMonth=nextMonth.valueOf();html=[];var clsName;while(prevMonth.valueOf()');} +clsName=this.onRender(prevMonth);if(prevMonth.getMonth()month){clsName+=' new';} +if(prevMonth.valueOf()===currentDate){clsName+=' active';} +html.push('');if(prevMonth.getDay()===this.weekEnd){html.push('');} +prevMonth.setDate(prevMonth.getDate()+1);} +this.picker.find('.datepicker-days tbody').empty().append(html.join(''));var currentYear=this.date.getFullYear();var months=this.picker.find('.datepicker-months').find('th:eq(1)').text(year).end().find('span').removeClass('active');if(currentYear===year){months.eq(this.date.getMonth()).addClass('active');} +html='';year=parseInt(year/10,10)*10;var yearCont=this.picker.find('.datepicker-years').find('th:eq(1)').text(year+'-'+(year+9)).end().find('td');year-=1;for(var i=-1;i<11;i++){html+=''+year+'';year+=1;} +yearCont.html(html);},click:function(e){e.stopPropagation();e.preventDefault();var target=$(e.target).closest('span, td, th');if(target.length===1){switch(target[0].nodeName.toLowerCase()){case'th':switch(target[0].className){case'switch':this.showMode(1);break;case'prev':case'next':this.viewDate['set'+DPGlobal.modes[this.viewMode].navFnc].call(this.viewDate,this.viewDate['get'+DPGlobal.modes[this.viewMode].navFnc].call(this.viewDate)+ +DPGlobal.modes[this.viewMode].navStep*(target[0].className==='prev'?-1:1));this.fill();this.set();break;} +break;case'span':if(target.is('.month')){var month=target.parent().find('span').index(target);this.viewDate.setMonth(month);}else{var year=parseInt(target.text(),10)||0;this.viewDate.setFullYear(year);} +if(this.viewMode!==0){this.date=new Date(this.viewDate);this.element.trigger({type:'changeDate',date:this.date,viewMode:DPGlobal.modes[this.viewMode].clsName});} +this.showMode(-1);this.fill();this.set();break;case'td':if(target.is('.day')&&!target.is('.disabled')){var day=parseInt(target.text(),10)||1;var month=this.viewDate.getMonth();if(target.is('.old')){month-=1;}else if(target.is('.new')){month+=1;} +var year=this.viewDate.getFullYear();this.date=new Date(year,month,day,0,0,0,0);this.viewDate=new Date(year,month,Math.min(28,day),0,0,0,0);this.fill();this.set();this.element.trigger({type:'changeDate',date:this.date,viewMode:DPGlobal.modes[this.viewMode].clsName});} +break;}}},mousedown:function(e){e.stopPropagation();e.preventDefault();},showMode:function(dir){if(dir){this.viewMode=Math.max(this.minViewMode,Math.min(2,this.viewMode+dir));} +this.picker.find('>div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).show();}};$.fn.datepicker=function(option,val){return this.each(function(){var $this=$(this),data=$this.data('datepicker'),options=typeof option==='object'&&option;if(!data){$this.data('datepicker',(data=new Datepicker(this,$.extend({},$.fn.datepicker.defaults,options))));} +if(typeof option==='string')data[option](val);});};$.fn.datepicker.defaults={onRender:function(date){return'';}};$.fn.datepicker.Constructor=Datepicker;var DPGlobal={modes:[{clsName:'days',navFnc:'Month',navStep:1},{clsName:'months',navFnc:'FullYear',navStep:1},{clsName:'years',navFnc:'FullYear',navStep:10}],dates:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},isLeapYear:function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0))},getDaysInMonth:function(year,month){return[31,(DPGlobal.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month]},parseFormat:function(format){var separator=format.match(/[.\/\-\s].*?/),parts=format.split(/\W+/);if(!separator||!parts||parts.length===0){throw new Error("Invalid date format.");} +return{separator:separator,parts:parts};},parseDate:function(date,format){var parts=date.split(format.separator),date=new Date(),val;date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0);if(parts.length===format.parts.length){var year=date.getFullYear(),day=date.getDate(),month=date.getMonth();for(var i=0,cnt=format.parts.length;i'+''+''+''+''+''+'',contTemplate:''};DPGlobal.template='
'+prevMonth.getDate()+'
'+ +DPGlobal.headTemplate+''+'
'+''+'
'+''+ +DPGlobal.headTemplate+ +DPGlobal.contTemplate+'
'+'
'+'
'+''+ +DPGlobal.headTemplate+ +DPGlobal.contTemplate+'
'+'
'+'';}(window.jQuery);var Hogan={};(function(Hogan,useArrayBuffer){Hogan.Template=function(renderFunc,text,compiler,options){this.r=renderFunc||this.r;this.c=compiler;this.options=options;this.text=text||'';this.buf=(useArrayBuffer)?[]:'';} +Hogan.Template.prototype={r:function(context,partials,indent){return'';},v:hoganEscape,t:coerceToString,render:function render(context,partials,indent){return this.ri([context],partials||{},indent);},ri:function(context,partials,indent){return this.r(context,partials,indent);},rp:function(name,context,partials,indent){var partial=partials[name];if(!partial){return'';} +if(this.c&&typeof partial=='string'){partial=this.c.compile(partial,this.options);} +return partial.ri(context,partials,indent);},rs:function(context,partials,section){var tail=context[context.length-1];if(!isArray(tail)){section(context,partials,this);return;} +for(var i=0;i=0;i--){v=ctx[i];if(v&&typeof v=='object'&&key in v){val=v[key];found=true;break;}} +if(!found){return(returnFound)?false:"";} +if(!returnFound&&typeof val=='function'){val=this.lv(val,ctx,partials);} +return val;},ho:function(val,cx,partials,text,tags){var compiler=this.c;var options=this.options;options.delimiters=tags;var text=val.call(cx,text);text=(text==null)?String(text):text.toString();this.b(compiler.compile(text,options).render(cx,partials));return false;},b:(useArrayBuffer)?function(s){this.buf.push(s);}:function(s){this.buf+=s;},fl:(useArrayBuffer)?function(){var r=this.buf.join('');this.buf=[];return r;}:function(){var r=this.buf;this.buf='';return r;},ls:function(val,ctx,partials,inverted,start,end,tags){var cx=ctx[ctx.length-1],t=null;if(!inverted&&this.c&&val.length>0){return this.ho(val,cx,partials,this.text.substring(start,end),tags);} +t=val.call(cx);if(typeof t=='function'){if(inverted){return true;}else if(this.c){return this.ho(t,cx,partials,this.text.substring(start,end),tags);}} +return t;},lv:function(val,ctx,partials){var cx=ctx[ctx.length-1];var result=val.call(cx);if(typeof result=='function'){result=coerceToString(result.call(cx));if(this.c&&~result.indexOf("{\u007B")){return this.c.compile(result,this.options).render(cx,partials);}} +return coerceToString(result);}};var rAmp=/&/g,rLt=//g,rApos=/\'/g,rQuot=/\"/g,hChars=/[&<>\"\']/;function coerceToString(val){return String((val===null||val===undefined)?'':val);} +function hoganEscape(str){str=coerceToString(str);return hChars.test(str)?str.replace(rAmp,'&').replace(rLt,'<').replace(rGt,'>').replace(rApos,''').replace(rQuot,'"'):str;} +var isArray=Array.isArray||function(a){return Object.prototype.toString.call(a)==='[object Array]';};})(typeof exports!=='undefined'?exports:Hogan);(function(Hogan){var rIsWhitespace=/\S/,rQuot=/\"/g,rNewline=/\n/g,rCr=/\r/g,rSlash=/\\/g,tagTypes={'#':1,'^':2,'/':3,'!':4,'>':5,'<':6,'=':7,'_v':8,'{':9,'&':10};Hogan.scan=function scan(text,delimiters){var len=text.length,IN_TEXT=0,IN_TAG_TYPE=1,IN_TAG=2,state=IN_TEXT,tagType=null,tag=null,buf='',tokens=[],seenTag=false,i=0,lineStart=0,otag='{{',ctag='}}';function addBuf(){if(buf.length>0){tokens.push(new String(buf));buf='';}} +function lineIsWhitespace(){var isAllWhitespace=true;for(var j=lineStart;j'){next.indent=tokens[j].toString()} +tokens.splice(j,1);}}}else if(!noNewLine){tokens.push({tag:'\n'});} +seenTag=false;lineStart=tokens.length;} +function changeDelimiters(text,index){var close='='+ctag,closeIndex=text.indexOf(close,index),delimiters=trim(text.substring(text.indexOf('=',index)+1,closeIndex)).split(' ');otag=delimiters[0];ctag=delimiters[1];return closeIndex+close.length-1;} +if(delimiters){delimiters=delimiters.split(' ');otag=delimiters[0];ctag=delimiters[1];} +for(i=0;i0){token=tokens.shift();if(token.tag=='#'||token.tag=='^'||isOpener(token,customTags)){stack.push(token);token.nodes=buildTree(tokens,token.tag,stack,customTags);instructions.push(token);}else if(token.tag=='/'){if(stack.length===0){throw new Error('Closing tag without opener: /'+token.n);} +opener=stack.pop();if(token.n!=opener.n&&!isCloser(token.n,opener.n,customTags)){throw new Error('Nesting error: '+opener.n+' vs. '+token.n);} +opener.end=token.i;return instructions;}else{instructions.push(token);}} +if(stack.length>0){throw new Error('missing closing tag: '+stack.pop().n);} +return instructions;} +function isOpener(token,tags){for(var i=0,l=tags.length;i'){code+=partial(tree[i]);}else if(tag=='{'||tag=='&'){code+=tripleStache(tree[i].n,chooseMethod(tree[i].n));}else if(tag=='\n'){code+=text('"\\n"'+(tree.length-1==i?'':' + i'));}else if(tag=='_v'){code+=variable(tree[i].n,chooseMethod(tree[i].n));}else if(tag===undefined){code+=text('"'+esc(tree[i])+'"');}} +return code;} +function section(nodes,id,method,start,end,tags){return'if(_.s(_.'+method+'("'+esc(id)+'",c,p,1),'+'c,p,0,'+start+','+end+',"'+tags+'")){'+'_.rs(c,p,'+'function(c,p,_){'+ +walk(nodes)+'});c.pop();}';} +function invertedSection(nodes,id,method){return'if(!_.s(_.'+method+'("'+esc(id)+'",c,p,1),c,p,1,0,0,"")){'+ +walk(nodes)+'};';} +function partial(tok){return'_.b(_.rp("'+esc(tok.n)+'",c,p,"'+(tok.indent||'')+'"));';} +function tripleStache(id,method){return'_.b(_.t(_.'+method+'("'+esc(id)+'",c,p,0)));';} +function variable(id,method){return'_.b(_.v(_.'+method+'("'+esc(id)+'",c,p,0)));';} +function text(id){return'_.b('+id+');';} +Hogan.parse=function(tokens,text,options){options=options||{};return buildTree(tokens,'',[],options.sectionTags||[]);},Hogan.cache={};Hogan.compile=function(text,options){options=options||{};var key=text+'||'+!!options.asString;var t=this.cache[key];if(t){return t;} +t=this.generate(this.parse(this.scan(text,options.delimiters),text,options),text,options);return this.cache[key]=t;};})(typeof exports!=='undefined'?exports:Hogan);horizon.addInitFunction(function(){var allPanelGroupBodies=$('.nav_accordion > dd > div > ul');allPanelGroupBodies.each(function(index,value){var activePanels=$(this).find('li > a.active');if(activePanels.length===0){$(this).slideUp(0);}});var activePanel=$('.nav_accordion > dd > div > ul > li > a.active');activePanel.closest('div').find('h4').addClass('active');$('.nav_accordion > dt').click(function(){var myDashHeader=$(this);var myDashWasActive=myDashHeader.hasClass("active");var allDashboardHeaders=$('.nav_accordion > dt');allDashboardHeaders.removeClass("active");var allDashboardBodies=$('.nav_accordion > dd');allDashboardBodies.slideUp();if(!myDashWasActive){myDashHeader.addClass("active");var myDashBody=myDashHeader.next();myDashBody.slideDown();var activeDashPanel=myDashBody.find("div > ul > li > a.active");if(activeDashPanel.length===0){var activePanel=myDashBody.find("div:first > ul");activePanel.slideDown();activePanel.closest('div').find("h4").addClass("active");var nonActivePanels=myDashBody.find("div:not(:first) > ul");nonActivePanels.slideUp();} +else +{activeDashPanel.closest('div').find("h4").addClass("active");allPanelGroupBodies.each(function(index,value){var activePanels=value.find('li > a.active');if(activePanels.length===0){$(this).slideUp();}});}} +return false;});$('.nav_accordion > dd > div > h4').click(function(){var myPanelGroupHeader=$(this);myPanelGroupWasActive=myPanelGroupHeader.hasClass("active");var allPanelGroupHeaders=$('.nav_accordion > dd > div > h4');allPanelGroupHeaders.removeClass("active");allPanelGroupBodies.slideUp();if(!myPanelGroupWasActive){myPanelGroupHeader.addClass("active");myPanelGroupHeader.closest('div').find('ul').slideDown();}});$('.nav_accordion > dd > ul > li > a').click(function(){horizon.modals.modal_spinner(gettext("Loading"));});});horizon.ajax={_queue:[],_active:[],get_messages:function(request){return request.getResponseHeader("X-Horizon-Messages");},queue:function(opts){var complete=opts.complete,active=horizon.ajax._active;opts.complete=function(){var index=$.inArray(request,active);if(index>-1){active.splice(index,1);} +horizon.ajax.next();if(complete){complete.apply(this,arguments);}};function request(){return $.ajax(opts);} +horizon.ajax._queue.push(request);horizon.ajax.next();},next:function(){var queue=horizon.ajax._queue,limit=horizon.conf.ajax.queue_limit,request;if(queue.length&&(!limit||horizon.ajax._active.lengthdefaultVolSize){defaultVolSize=minDiskSize;} +if(volSizeendDate.date.valueOf()){var newDate=new Date(ev.date);newDate.setDate(newDate.getDate()+1);endDate.setValue(newDate);$('input#id_end')[0].focus();} +startDate.hide();}).data('datepicker');var endDate=$('input#id_end').datepicker({onRender:function(date){return date.valueOf()+");$this.after($button);});};horizon.forms.prevent_multiple_submission=function(el){var $form=$(el).find("form");$form.submit(function(){var button=$(this).find('[type="submit"]');if(button.hasClass('btn-primary')&&!button.hasClass('always-enabled')){$(this).submit(function(){return false;});button.removeClass('primary').addClass('disabled');button.attr('disabled','disabled');} +return true;});};horizon.forms.init_examples=function(el){var $el=$(el);$el.find("#create_image_form input#id_copy_from").attr("placeholder","http://example.com/image.iso");$el.find(".table_search input").attr("placeholder",gettext("Filter"));$el.find("#attach_volume_form #id_device").attr("placeholder","/dev/vdc");};horizon.addInitFunction(function(){horizon.forms.prevent_multiple_submission($('body'));horizon.modals.addModalInitFunction(horizon.forms.prevent_multiple_submission);horizon.forms.bind_add_item_handlers($("body"));horizon.modals.addModalInitFunction(horizon.forms.bind_add_item_handlers);horizon.forms.init_examples($("body"));horizon.modals.addModalInitFunction(horizon.forms.init_examples);horizon.forms.handle_snapshot_source();horizon.forms.handle_volume_source();horizon.forms.handle_image_source();horizon.forms.datepicker();$("body").on("click","form button.btn-danger",function(evt){horizon.datatables.confirm(this);evt.preventDefault();});$(document).on("change",'select.switchable',function(evt){var $fieldset=$(evt.target).closest('fieldset'),$switchables=$fieldset.find('.switchable');$switchables.each(function(index,switchable){var $switchable=$(switchable),slug=$switchable.data('slug'),visible=$switchable.is(':visible'),val=$switchable.val();$fieldset.find('.switched[data-switch-on*="'+slug+'"]').each(function(index,input){var $input=$(input),data=$input.data(slug+"-"+val);if(typeof data==="undefined"||!visible){$input.closest('.form-field').hide();}else{$('label[for='+$input.attr('id')+']').html(data);$input.closest('.form-field').show();}});});});$('select.switchable').trigger('change');horizon.modals.addModalInitFunction(function(modal){$(modal).find('select.switchable').trigger('change');});function update_volume_source_displayed_fields(field){var $this=$(field),base_type=$this.val();$this.find("option").each(function(){if(this.value!==base_type){$("#id_"+this.value).closest(".control-group").hide();}else{$("#id_"+this.value).closest(".control-group").show();}});} +$(document).on('change','#id_volume_source_type',function(evt){update_volume_source_displayed_fields(this);});$('#id_volume_source_type').change();horizon.modals.addModalInitFunction(function(modal){$(modal).find("#id_volume_source_type").change();});$(document).tooltip({selector:"div.form-field :input:not(:checkbox)",placement:function(tip,input){return $(input).closest("form[class*='split']").length?"bottom":'right';},trigger:'focus',title:function(){return $(this).closest('div.form-field').children('.help-block').text();}});$(document).on('mousedown keydown','.form-field select',function(evt){$(this).tooltip('hide');});$(document).on('keydown.esc_btn',function(evt){if(evt.keyCode===27){$('.tooltip').hide();}});$('span.help-block').hide();});horizon.formset_table=(function(){'use strict';var module={};module.reenumerate_rows=function(table,prefix){var count=0;var input_name_re=new RegExp('^'+prefix+'-(\\d+|__prefix__)-');var input_id_re=new RegExp('^id_'+prefix+'-(\\d+|__prefix__)-');table.find('tbody tr').each(function(){$(this).find('input').each(function(){var input=$(this);input.attr('name',input.attr('name').replace(input_name_re,prefix+'-'+count+'-'));input.attr('id',input.attr('id').replace(input_id_re,'id_'+prefix+'-'+count+'-'));});count+=1;});$('#id_'+prefix+'-TOTAL_FORMS').val(count);};module.delete_row=function(e){$(this).closest('tr').hide();$(this).prev('input[name$="-DELETE"]').attr('checked',true);};module.replace_delete=function(where){where.find('input[name$="-DELETE"]').hide().after($('×').click(module.delete_row));};module.add_row=function(table,prefix,empty_row_html){var new_row=$(empty_row_html);module.replace_delete(new_row);table.find('tbody').append(new_row);module.reenumerate_rows(table,prefix);};module.init=function(prefix,empty_row_html,add_label){var table=$('table#'+prefix);module.replace_delete(table);if(add_label){var button=$(''+ +add_label+'');table.find('tfoot td').append(button);button.click(function(){module.add_row(table,prefix,empty_row_html);});} +var initial_forms=+$('#id_'+prefix+'-INITIAL_FORMS').val();var total_forms=+$('#id_'+prefix+'-TOTAL_FORMS').val();if(table.find('tbody tr').length>1&&table.find('tbody td.error').length===0&&total_forms>initial_forms){table.find('tbody tr').each(function(index){if(index>=initial_forms){$(this).remove();}});module.reenumerate_rows(table,prefix);$('#id_'+prefix+'-INITIAL_FORMS').val($('#id_'+prefix+'-TOTAL_FORMS').val());} +table.find('td.error[title]').tooltip();};return module;}());horizon.instances={user_decided_length:false,networks_selected:[],networks_available:[],getConsoleLog:function(via_user_submit){var form_element=$("#tail_length"),data;if(!via_user_submit){via_user_submit=false;} +if(this.user_decided_length){data=$(form_element).serialize();}else{data="length=35";} +$.ajax({url:$(form_element).attr('action'),data:data,method:'get',success:function(response_body){$('pre.logs').text(response_body);},error:function(response){if(via_user_submit){horizon.clearErrorMessages();horizon.alert('error',gettext('There was a problem communicating with the server, please try again.'));}}});},get_network_element:function(network_id){return $('li > label[for^="id_network_'+network_id+'"]');},init_network_list:function(){horizon.instances.networks_selected=[];horizon.instances.networks_available=[];$(this.get_network_element("")).each(function(){var $this=$(this);var $input=$this.children("input");var network_property={name:$this.text().replace(/^\s+/,""),id:$input.attr("id"),value:$input.attr("value")};if($input.is(':checked')){horizon.instances.networks_selected.push(network_property);}else{horizon.instances.networks_available.push(network_property);}});},generate_network_element:function(name,id,value){var $li=$('
  • ');$li.attr('name',value).html(name+'('+value+')');return $li;},generate_networklist_html:function(){var self=this;var updateForm=function(){var lists=$("#networkListId div.input li").attr('data-index',100);var active_networks=$("#selected_network > li").map(function(){return $(this).attr("name");});$("#networkListId div.input input:checkbox").removeAttr('checked');active_networks.each(function(index,value){$("#networkListId div.input input:checkbox[value="+value+"]").attr('checked','checked').parents("li").attr('data-index',index);});$("#networkListId div.input ul").html(lists.sort(function(a,b){if($(a).data("index")<$(b).data("index")){return-1;} +if($(a).data("index")>$(b).data("index")){return 1;} +return 0;}));};$("#networkListSortContainer").show();$("#networkListIdContainer").hide();self.init_network_list();$("#available_network").empty();$.each(self.networks_available,function(index,value){$("#available_network").append(self.generate_network_element(value.name,value.id,value.value));});$("#selected_network").empty();$.each(self.networks_selected,function(index,value){$("#selected_network").append(self.generate_network_element(value.name,value.id,value.value));});$(".networklist > li > a.btn").click(function(e){var $this=$(this);e.preventDefault();e.stopPropagation();if($this.parents("ul#available_network").length>0){$this.parent().appendTo($("#selected_network"));}else if($this.parents("ul#selected_network").length>0){$this.parent().appendTo($("#available_network"));} +updateForm();});if($("#networkListId > div.control-group.error").length>0){var errortext=$("#networkListId > div.control-group.error").find("span.help-inline").text();$("#selected_network_label").before($('
    ').html(errortext));} +$(".networklist").sortable({connectWith:"ul.networklist",placeholder:"ui-state-highlight",distance:5,start:function(e,info){$("#selected_network").addClass("dragging");},stop:function(e,info){$("#selected_network").removeClass("dragging");updateForm();}}).disableSelection();},workflow_init:function(modal){horizon.instances.generate_networklist_html();}};horizon.addInitFunction(function(){$(document).on('submit','#tail_length',function(evt){horizon.instances.user_decided_length=true;horizon.instances.getConsoleLog(true);evt.preventDefault();});function update_launch_source_displayed_fields(field){var $this=$(field),base_type=$this.val();$this.closest(".control-group").nextAll().hide();switch(base_type){case"image_id":$("#id_image_id").closest(".control-group").show();break;case"instance_snapshot_id":$("#id_instance_snapshot_id").closest(".control-group").show();break;case"volume_id":$("#id_volume_id").closest(".control-group").show();break;case"volume_image_id":$("#id_image_id, #id_volume_size, #id_device_name, , #id_delete_on_terminate").closest(".control-group").show();break;case"volume_snapshot_id":$("#id_volume_snapshot_id, #id_device_name, #id_delete_on_terminate").closest(".control-group").show();break;}} +$(document).on('change','.workflow #id_source_type',function(evt){update_launch_source_displayed_fields(this);});$('.workflow #id_source_type').change();horizon.modals.addModalInitFunction(function(modal){$(modal).find("#id_source_type").change();});function update_image_id_fields(field){var $this=$(field),volume_opt=$this.val();var $option=$this.find("option:selected");var $form=$this.closest('form');var $volSize=$form.find('input#id_volume_size');$volSize.val($option.data("volume_size"));} +$(document).on('change','.workflow #id_image_id',function(evt){update_image_id_fields(this);});horizon.instances.decrypt_password=function(encrypted_password,private_key){var crypt=new JSEncrypt();crypt.setKey(private_key);return crypt.decrypt(encrypted_password);};$(document).on('change','#id_private_key_file',function(evt){var file=evt.target.files[0];var reader=new FileReader();if(file){reader.onloadend=function(event){$("#id_private_key").val(event.target.result);};reader.onerror=function(event){horizon.clearErrorMessages();horizon.alert('error',gettext('Could not read the file'));};reader.readAsText(file);} +else{horizon.clearErrorMessages();horizon.alert('error',gettext('Could not decrypt the password'));}});$(document).on('show','#password_instance_modal',function(evt){$("#id_decrypted_password").css("font-family","monospace");$("#id_decrypted_password").css("cursor","text");$("#id_encrypted_password").css("cursor","text");$("#id_keypair_name").css("cursor","text");});$(document).on('click','#decryptpassword_button',function(evt){encrypted_password=$("#id_encrypted_password").val();private_key=$('#id_private_key').val();if(!private_key){evt.preventDefault();$(this).closest('.modal').modal('hide');} +else{if(private_key.length>0){evt.preventDefault();decrypted_password=horizon.instances.decrypt_password(encrypted_password,private_key);if(decrypted_password===false||decrypted_password===null){horizon.clearErrorMessages();horizon.alert('error',gettext('Could not decrypt the password'));} +else{$("#id_decrypted_password").val(decrypted_password);$("#decryptpassword_button").hide();}}}});});horizon.alert=function(type,message,extra_tags){safe=false;if(typeof(extra_tags)!=="undefined"&&$.inArray('safe',extra_tags.split(' '))!==-1){safe=true;} +var template=horizon.templates.compiled_templates["#alert_message_template"],params={"type":type,"type_display":{'danger':gettext("Danger: "),'warning':gettext("Warning: "),'info':gettext("Notice: "),'success':gettext("Success: "),'error':gettext("Error: ")}[type],"message":message,"safe":safe};return $(template.render(params)).hide().prependTo("#main_content .messages").fadeIn(100);};horizon.clearErrorMessages=function(){$('#main_content .messages .alert.alert-error').remove();};horizon.clearSuccessMessages=function(){$('#main_content .messages .alert.alert-success').remove();};horizon.clearAllMessages=function(){horizon.clearErrorMessages();horizon.clearSuccessMessages();};horizon.autoDismissAlerts=function(){var $alerts=$('#main_content .messages .alert');$alerts.each(function(index,alert){var $alert=$(this),types=$alert.attr('class').split(' '),intersection=$.grep(types,function(value){return $.inArray(value,horizon.conf.auto_fade_alerts.types)!==-1;});if(intersection.length>0){setTimeout(function(){$alert.fadeOut(horizon.conf.auto_fade_alerts.fade_duration);},horizon.conf.auto_fade_alerts.delay);}});};horizon.addInitFunction(function(){$("body").ajaxComplete(function(event,request,settings){var message_array=$.parseJSON(horizon.ajax.get_messages(request));$(message_array).each(function(index,item){horizon.alert(item[0],item[1],item[2]);});});$('a.ajax-modal').click(function(){horizon.clearAllMessages();});$(".alert").alert();horizon.autoDismissAlerts();});horizon.modals={_request:null,spinner:null,_init_functions:[]};horizon.modals.addModalInitFunction=function(f){horizon.modals._init_functions.push(f);};horizon.modals.initModal=function(modal){$(horizon.modals._init_functions).each(function(index,f){f(modal);});};horizon.modals.create=function(title,body,confirm,cancel){if(!cancel){cancel=gettext("Cancel");} +var template=horizon.templates.compiled_templates["#modal_template"],params={title:title,body:body,confirm:confirm,cancel:cancel},modal=$(template.render(params)).appendTo("#modal_wrapper");return modal;};horizon.modals.success=function(data,textStatus,jqXHR){var modal;$('#modal_wrapper').append(data);$('.modal span.help-block').hide();modal=$('.modal:last');modal.modal();$(modal).trigger("new_modal",modal);return modal;};horizon.modals.modal_spinner=function(text){var template=horizon.templates.compiled_templates["#spinner-modal"];horizon.modals.spinner=$(template.render({text:text}));horizon.modals.spinner.appendTo("#modal_wrapper");horizon.modals.spinner.modal({backdrop:'static'});horizon.modals.spinner.spin(horizon.conf.spinner_options.modal);};horizon.addInitFunction(function(){$('#modal_wrapper').on('new_modal',function(evt,modal){horizon.modals.initModal(modal);});$(document).on('click','.modal .cancel',function(evt){$(this).closest('.modal').modal('hide');evt.preventDefault();});$(document).on('submit','.modal form',function(evt){var $form=$(this),$button=$form.find(".modal-footer .btn-primary"),update_field_id=$form.attr("data-add-to-field"),headers={};if($form.attr("enctype")==="multipart/form-data"){return;} +evt.preventDefault();$button.prop("disabled",true);if(update_field_id){headers["X-Horizon-Add-To-Field"]=update_field_id;} +$.ajax({type:"POST",url:$form.attr('action'),headers:headers,data:$form.serialize(),beforeSend:function(){$("#modal_wrapper .modal").last().modal("hide");horizon.modals.modal_spinner(gettext("Working"));},complete:function(){horizon.modals.spinner.modal('hide');$("#modal_wrapper .modal").last().modal("show");$button.prop("disabled",false);},success:function(data,textStatus,jqXHR){var redirect_header=jqXHR.getResponseHeader("X-Horizon-Location"),add_to_field_header=jqXHR.getResponseHeader("X-Horizon-Add-To-Field"),json_data,field_to_update;$form.closest(".modal").modal("hide");if(redirect_header){location.href=redirect_header;} +else if(add_to_field_header){json_data=$.parseJSON(data);field_to_update=$("#"+add_to_field_header);field_to_update.append("");field_to_update.change();field_to_update.val(json_data[0]);}else{horizon.modals.success(data,textStatus,jqXHR);}},error:function(jqXHR,status,errorThrown){if(jqXHR.getResponseHeader('logout')){location.href=jqXHR.getResponseHeader("X-Horizon-Location");}else{$form.closest(".modal").modal("hide");horizon.alert("error",gettext("There was an error submitting the form. Please try again."));}}});});$(document).on('show','.modal',function(evt){if($(evt.target).hasClass("modal")){var scrollShift=$('body').scrollTop()||$('html').scrollTop(),$this=$(this),topVal=$this.css('top');$this.css('top',scrollShift+parseInt(topVal,10));} +$("select",evt.target).keyup(function(e){if(e.keyCode===27){e.target.blur();e.stopPropagation();}});});horizon.modals.addModalInitFunction(function(modal){$(modal).find(":text, select, textarea").filter(":visible:first").focus();});horizon.modals.addModalInitFunction(function(modal){var _max_visited_step=0;var _validate_steps=function(start,end){var $form=$('.workflow > form'),response={};if(typeof end==='undefined'){end=start;} +$form.find('td.actions div.alert-error').remove();$form.find('.control-group.error').each(function(){var $group=$(this);$group.removeClass('error');$group.find('span.help-inline.error').remove();});$.ajax({type:'POST',url:$form.attr('action'),headers:{'X-Horizon-Validate-Step-Start':start,'X-Horizon-Validate-Step-End':end},data:$form.serialize(),dataType:'json',async:false,success:function(data){response=data;}});if(response.has_errors){var first_field=true;$.each(response.errors,function(step_slug,step_errors){var step_id=response.workflow_slug+'__'+step_slug,$fieldset=$form.find('#'+step_id);$.each(step_errors,function(field,errors){var $field;if(field==='__all__'){$.each(errors,function(index,error){$fieldset.find('td.actions').prepend('
    '+ +error+'
    ');});$fieldset.find('input, select, textarea').first().focus();return;} +$field=$fieldset.find('[name="'+field+'"]');$field.closest('.control-group').addClass('error');$.each(errors,function(index,error){$field.before(''+ +error+'');});if(first_field){$field.focus();first_field=false;}});});return false;}};$('.workflow.wizard').bootstrapWizard({tabClass:'wizard-tabs',nextSelector:'.button-next',previousSelector:'.button-previous',onTabShow:function(tab,navigation,index){var $navs=navigation.find('li');var total=$navs.length;var current=index;var $footer=$('.modal-footer');_max_visited_step=Math.max(_max_visited_step,current);if(current+1>=total){$footer.find('.button-next').hide();$footer.find('.button-final').show();}else{$footer.find('.button-next').show();$footer.find('.button-final').hide();} +$navs.each(function(i){$this=$(this);if(i<=_max_visited_step){$this.addClass('done');}else{$this.removeClass('done');}});},onNext:function($tab,$nav,index){return _validate_steps(index-1);},onTabClick:function($tab,$nav,current,index){return(index<=current||_validate_steps(current,index-1)!==false);}});});horizon.modals.addModalInitFunction(horizon.datatables.validate_button);$(document).on('click','.ajax-modal',function(evt){var $this=$(this);if(horizon.modals._request&&typeof(horizon.modals._request.abort)!==undefined){horizon.modals._request.abort();} +horizon.modals._request=$.ajax($this.attr('href'),{beforeSend:function(){horizon.modals.modal_spinner(gettext("Loading"));},complete:function(){horizon.modals._request=null;horizon.modals.spinner.modal('hide');},error:function(jqXHR,status,errorThrown){if(jqXHR.status===401){var redir_url=jqXHR.getResponseHeader("X-Horizon-Location");if(redir_url){location.href=redir_url;}else{location.reload(true);}} +else{if(!horizon.ajax.get_messages(jqXHR)){horizon.alert("error",gettext("An error occurred. Please try again later."));}}},success:function(data,textStatus,jqXHR){var update_field_id=$this.attr('data-add-to-field'),modal,form;modal=horizon.modals.success(data,textStatus,jqXHR);if(update_field_id){form=modal.find("form");if(form.length){form.attr("data-add-to-field",update_field_id);}}}});evt.preventDefault();});$(document).on("show",".modal",function(){var container=$("#modal_wrapper"),modal_stack=container.find(".modal"),$this=$(this);modal_stack.splice(modal_stack.length-1,1);modal_stack.modal("hide");horizon.utils.loadAngular(container);});$(document).on('hidden','.modal',function(){var $this=$(this),modal_stack=$("#modal_wrapper .modal");if($this[0]===modal_stack.last()[0]||$this.hasClass("loading")){$this.remove();if(!$this.hasClass("loading")){$("#modal_wrapper .modal").last().modal("show");}}});});horizon.Quota={is_flavor_quota:false,user_value_progress_bars:[],auto_value_progress_bars:[],flavor_progress_bars:[],user_value_form_inputs:[],selected_flavor:null,flavors:[],init:function(){this.user_value_progress_bars=$('div[data-progress-indicator-for]');this.auto_value_progress_bars=$('div[data-progress-indicator-step-by]');this.user_value_form_inputs=$($.map(this.user_value_progress_bars,function(elm){return('#'+$(elm).attr('data-progress-indicator-for'));}));this._initialCreation(this.user_value_progress_bars);this._initialCreation(this.auto_value_progress_bars);this._initialCreation(this.flavor_progress_bars);this._initialAnimations();this._attachInputHandlers();},belowMinimum:function(minimum,actual){return parseInt(minimum,10)>parseInt(actual,10);},imageFitsFlavor:function(image,flavor){if(image===undefined){return true;}else{overDisk=horizon.Quota.belowMinimum(image.min_disk,flavor.disk);overRAM=horizon.Quota.belowMinimum(image.min_ram,flavor.ram);return!(overDisk||overRAM);}},noteDisabledFlavors:function(allDisabled){if($('#some_flavors_disabled').length===0){message=allDisabled?horizon.Quota.allFlavorsDisabledMessage:horizon.Quota.disabledFlavorMessage;$('#id_flavor').parent().append(""+ +message+'');}},resetFlavors:function(){if($('#some_flavors_disabled')){$('#some_flavors_disabled').remove();$('#id_flavor option').each(function(){$(this).attr('disabled',false);});}},findImageById:function(id){_image=undefined;$.each(horizon.Quota.images,function(i,image){if(image.id===id){_image=image;}});return _image;},getSelectedImage:function(){selected=$('#id_image_id option:selected').val();return horizon.Quota.findImageById(selected);},disableFlavorsForImage:function(image){image=horizon.Quota.getSelectedImage();to_disable=[];horizon.Quota.resetFlavors();$.each(horizon.Quota.flavors,function(i,flavor){if(!horizon.Quota.imageFitsFlavor(image,flavor)){to_disable.push(flavor.name);}});flavors=$('#id_flavor option');$.each(to_disable,function(i,flavor_name){flavors.each(function(){if($(this).text()===flavor_name){$(this).attr('disabled','disabled');}});});if(to_disable.length>0){selected=($('#id_flavor option').filter(':selected'))[0];if(to_disable.length=100){return full;} +else if(used>=80){return nearlyfull;} +else{return frgrnd;}});},update:function(element,value){var full="#D0342B";var addition="#00D300";var already_used=parseInt(d3.select("#"+element).select(".usedbar").attr("d"));d3.select("#"+element).select(".newbar").transition().duration(500).attr("width",function(){if((value+already_used)>=100){return"100%";}else{return(value+already_used)+"%";}}).style("fill",function(){if(value>(100-already_used)){return full;}else{return addition;}});},_attachInputHandlers:function(){var scope=this;if(this.is_flavor_quota){var eventCallback=function(evt){scope.showFlavorDetails();scope.updateFlavorUsage();};var imageChangeCallback=function(event){scope.disableFlavorsForImage();};$('#id_flavor').on('change',eventCallback);$('#id_count').on('keyup',eventCallback);$('#id_image_id').on('change',imageChangeCallback);} +$(this.user_value_form_inputs).each(function(index,element){$(element).on('keyup',function(evt){var progress_element=$('div[data-progress-indicator-for='+$(evt.target).attr('id')+']');var integers_in_input=$(evt.target).val().match(/\d+/g);var user_integer;if(integers_in_input===null){user_integer=0;}else if(integers_in_input.length>1){user_integer=integers_in_input.join('');}else if(integers_in_input.length===1){user_integer=integers_in_input[0];} +var progress_amount=parseInt(user_integer,10);scope.updateUsageFor(progress_element,progress_amount);});});},_initialAnimations:function(){var scope=this;$(this.auto_value_progress_bars).each(function(index,element){var auto_progress=$(element);var update_amount=parseInt(auto_progress.attr('data-progress-indicator-step-by'),10);scope.updateUsageFor(auto_progress,update_amount);});},_initialCreation:function(bars){var scope=this;$(bars).each(function(index,element){var progress_element=$(element);var quota_limit=parseInt(progress_element.attr('data-quota-limit'),10);var quota_used=parseInt(progress_element.attr('data-quota-used'),10);var percentage_used=0;if(!isNaN(quota_limit)&&!isNaN(quota_used)){percentage_used=(quota_used/quota_limit)*100;} +scope.drawUsed($(element).attr('id'),percentage_used);});}};horizon.datatables={update:function(){var $rows_to_update=$('tr.status_unknown.ajax-update');if($rows_to_update.length){var interval=$rows_to_update.attr('data-update-interval'),$table=$rows_to_update.closest('table'),decay_constant=$table.attr('decay_constant');if($rows_to_update.find('.actions_column .btn-group.open').length){setTimeout(horizon.datatables.update,interval);$table.removeAttr('decay_constant');return;} +$rows_to_update.each(function(index,row){var $row=$(this),$table=$row.closest('table.datatable');horizon.ajax.queue({url:$row.attr('data-update-url'),error:function(jqXHR,textStatus,errorThrown){switch(jqXHR.status){case 404:var $footer,row_count,footer_text,colspan,template,params,$empty_row;row_count=horizon.datatables.update_footer_count($table,-1);if(row_count===0){colspan=$table.find('th[colspan]').attr('colspan');template=horizon.templates.compiled_templates["#empty_row_template"];params={"colspan":colspan,no_items_label:gettext("No items to display.")};empty_row=template.render(params);$row.replaceWith(empty_row);}else{$row.remove();} +$table.trigger("update");break;default:horizon.utils.log(gettext("An error occurred while updating."));$row.removeClass("ajax-update");$row.find("i.ajax-updating").remove();break;}},success:function(data,textStatus,jqXHR){var $new_row=$(data);if($new_row.hasClass('status_unknown')){var spinner_elm=$new_row.find("td.status_unknown:last");if($new_row.find('.btn-action-required').length>0){spinner_elm.prepend($("
    ").addClass("action_required_img").append($("").attr("src","/static/dashboard/img/action_required.png")));}else{spinner_elm.prepend($("
    ").addClass("loading_gif").append($("").attr("src","/static/dashboard/img/loading.gif")));}} +if($new_row.html()!==$row.html()){if($row.find('.table-row-multi-select:checkbox').is(':checked')){$new_row.find('.table-row-multi-select:checkbox').prop('checked',true);} +$row.replaceWith($new_row);$table.trigger("update");$table.removeAttr('decay_constant');}},complete:function(jqXHR,textStatus){horizon.datatables.validate_button();if(decay_constant===undefined){decay_constant=1;}else{decay_constant++;} +$table.attr('decay_constant',decay_constant);next_poll=interval*decay_constant;if(next_poll>30*1000){next_poll=30*1000;} +setTimeout(horizon.datatables.update,next_poll);}});});}},validate_button:function(){$("form").each(function(i){var checkboxes=$(this).find(".table-row-multi-select:checkbox");var action_buttons=$(this).find(".table_actions button.btn-danger");action_buttons.toggleClass("disabled",!checkboxes.filter(":checked").length);});}};horizon.datatables.confirm=function(action){var $action=$(action),$modal_parent=$(action).closest('.modal'),name_array=[],closest_table_id,action_string,name_string,title,body,modal,form;if($action.hasClass("disabled")){return;} +action_string=$action.text();name_string="";closest_table_id=$(action).closest("table").attr("id");if($("#"+closest_table_id+" tr[data-display]").length>0){if($(action).closest("div").hasClass("table_actions")){$("#"+closest_table_id+" tr[data-display]").has(".table-row-multi-select:checkbox:checked").each(function(){name_array.push(" \""+$(this).attr("data-display")+"\"");});name_array.join(", ");name_string=name_array.toString();}else{name_string=" \""+$(action).closest("tr").attr("data-display")+"\"";} +name_string=interpolate(gettext("You have selected %s. "),[name_string]);} +title=interpolate(gettext("Confirm %s"),[action_string]);body=name_string+gettext("Please confirm your selection. This action cannot be undone.");modal=horizon.modals.create(title,body,action_string);modal.modal();if($modal_parent.length){var child_backdrop=modal.next('.modal-backdrop');child_backdrop.css('z-index',$modal_parent.css('z-index')+10);modal.css('z-index',child_backdrop.css('z-index')+10);} +modal.find('.btn-primary').click(function(evt){form=$action.closest('form');form.append("");form.submit();modal.modal('hide');horizon.modals.modal_spinner(gettext("Working"));return false;});return modal;};$.tablesorter.addParser({id:'sizeSorter',is:function(s){return false;},format:function(s){var sizes={BYTE:0,B:0,KB:1,MB:2,GB:3,TB:4,PB:5};var regex=/([\d\.,]+)\s*(byte|B|KB|MB|GB|TB|PB)+/i;var match=s.match(regex);if(match&&match.length===3){return parseFloat(match[1])*Math.pow(1024,sizes[match[2].toUpperCase()]);} +return parseInt(s,10);},type:'numeric'});$.tablesorter.addParser({id:'timesinceSorter',is:function(s){return false;},format:function(s,table,cell,cellIndex){return $(cell).find('span').data('seconds');},type:'numeric'});horizon.datatables.disable_buttons=function(){$("table .table_actions").on("click",".btn.disabled",function(event){event.preventDefault();event.stopPropagation();});};horizon.datatables.update_footer_count=function(el,modifier){var $el=$(el),$browser,$footer,row_count,footer_text_template,footer_text;if(!modifier){modifier=0;} +$browser=$el.closest("#browser_wrapper");if($browser.length){$footer=$browser.find('.tfoot span.content_table_count');} +else{$footer=$el.find('tfoot span.table_count');} +row_count=$el.find('tbody tr:visible').length+modifier-$el.find('.empty').length;footer_text_template=ngettext("Displaying %s item","Displaying %s items",row_count);footer_text=interpolate(footer_text_template,[row_count]);$footer.text(footer_text);return row_count;};horizon.datatables.add_no_results_row=function(table){template=horizon.templates.compiled_templates["#empty_row_template"];if(!table.find("tbody tr:visible").length&&typeof(template)!=="undefined"){colspan=table.find("th[colspan]").attr('colspan');params={"colspan":colspan,no_items_label:gettext("No items to display.")};table.find("tbody").append(template.render(params));}};horizon.datatables.remove_no_results_row=function(table){table.find("tr.empty").remove();};horizon.datatables.fix_row_striping=function(table){table.trigger('applyWidgetId',['zebra']);};horizon.datatables.set_table_sorting=function(parent){$(parent).find("table.datatable").each(function(){var $table=$(this),header_options={};if($table.find('tbody tr').not('.empty').length>1){$table.find("thead th[class!='table_header']").each(function(i,val){$th=$(this);if(!$th.hasClass('sortable')){header_options[i]={sorter:false};}else if($th.data('type')==='size'){header_options[i]={sorter:'sizeSorter'};}else if($th.data('type')==='ip'){header_options[i]={sorter:'ipAddress'};}else if($th.data('type')==='timesince'){header_options[i]={sorter:'timesinceSorter'};}});$table.tablesorter({headers:header_options,widgets:['zebra'],selectorHeaders:"thead th[class!='table_header']",cancelSelection:false});}});};horizon.datatables.add_table_checkboxes=function(parent){$(parent).find('table thead .multi_select_column').each(function(index,thead){if(!$(thead).find('.table-row-multi-select:checkbox').length&&$(thead).parents('table').find('tbody .table-row-multi-select:checkbox').length){$(thead).append('');}});};horizon.datatables.set_table_query_filter=function(parent){$(parent).find('table').each(function(index,elm){var input=$($(elm).find('div.table_search.client input')),table_selector;if(input.length>0){input.on('keypress',function(evt){if(evt.keyCode===13){return false;}});input.next('button.btn-search').on('click keypress',function(evt){return false;});table_selector='table#'+$(elm).attr('id');input.quicksearch(table_selector+' tbody tr',{'delay':300,'loader':'span.loading','bind':'keyup click','show':this.show,'hide':this.hide,onBefore:function(){var table=$(table_selector);horizon.datatables.remove_no_results_row(table);},onAfter:function(){var template,table,colspan,params;table=$(table_selector);horizon.datatables.update_footer_count(table);horizon.datatables.add_no_results_row(table);horizon.datatables.fix_row_striping(table);},prepareQuery:function(val){return new RegExp(val,"i");},testQuery:function(query,txt,_row){return query.test($(_row).find('td:not(.hidden):not(.actions_column)').text());}});}});};horizon.datatables.set_table_fixed_filter=function(parent){$(parent).find('table.datatable').each(function(index,elm){$(elm).on('click','div.table_filter button',function(evt){var table=$(elm);var category=$(this).val();evt.preventDefault();horizon.datatables.remove_no_results_row(table);table.find('tbody tr').hide();table.find('tbody tr.category-'+category).show();horizon.datatables.update_footer_count(table);horizon.datatables.add_no_results_row(table);horizon.datatables.fix_row_striping(table);});$(elm).find('div.table_filter button').each(function(i,button){if($(button).text().indexOf(' (0)')===-1){$(button).addClass('active');$(button).trigger('click');return false;}});});};horizon.addInitFunction(function(){horizon.datatables.validate_button();horizon.datatables.disable_buttons();$('table.datatable').each(function(idx,el){horizon.datatables.update_footer_count($(el),0);});$('div.table_wrapper, #modal_wrapper').on('click','table thead .multi_select_column .table-row-multi-select:checkbox',function(evt){var $this=$(this),$table=$this.closest('table'),is_checked=$this.prop('checked'),checkboxes=$table.find('tbody .table-row-multi-select:visible:checkbox');checkboxes.prop('checked',is_checked);});$("div.table_wrapper, #modal_wrapper").on("click",'table tbody .table-row-multi-select:checkbox',function(evt){var $table=$(this).closest('table');var $multi_select_checkbox=$table.find('thead .multi_select_column .table-row-multi-select:checkbox');var any_unchecked=$table.find("tbody .table-row-multi-select:checkbox").not(":checked");$multi_select_checkbox.prop('checked',any_unchecked.length===0);});$("div.table_wrapper, #modal_wrapper").on("click",'.table-row-multi-select:checkbox',function(evt){var $form=$(this).closest("form");var any_checked=$form.find("tbody .table-row-multi-select:checkbox").is(":checked");if(any_checked){$form.find(".table_actions button.btn-danger").removeClass("disabled");}else{$form.find(".table_actions button.btn-danger").addClass("disabled");}});horizon.datatables.add_table_checkboxes($('body'));horizon.datatables.set_table_sorting($('body'));horizon.datatables.set_table_query_filter($('body'));horizon.datatables.set_table_fixed_filter($('body'));horizon.modals.addModalInitFunction(horizon.datatables.add_table_checkboxes);horizon.modals.addModalInitFunction(horizon.datatables.set_table_sorting);horizon.modals.addModalInitFunction(horizon.datatables.set_table_query_filter);horizon.modals.addModalInitFunction(horizon.datatables.set_table_fixed_filter);horizon.tabs.addTabLoadFunction(horizon.datatables.add_table_checkboxes);horizon.tabs.addTabLoadFunction(horizon.datatables.set_table_sorting);horizon.tabs.addTabLoadFunction(horizon.datatables.set_table_query_filter);horizon.tabs.addTabLoadFunction(horizon.datatables.set_table_fixed_filter);horizon.datatables.update();});horizon.inline_edit={get_cell_id:function(td_element){return[td_element.parents("tr").first().data("object-id"),"__",td_element.data("cell-name")].join('');},get_object_container:function(td_element){if(!window.cell_object_container){window.cell_object_container=[];} +return window.cell_object_container;},get_cell_object:function(td_element){var cell_id=horizon.inline_edit.get_cell_id(td_element);var id="cell__"+cell_id;var container=horizon.inline_edit.get_object_container(td_element);var cell_object;if(container&&container[id]){cell_object=container[id];cell_object.reset_with(td_element);return cell_object;}else{cell_object=new horizon.inline_edit.Cell(td_element);container[id]=cell_object;return cell_object;}},Cell:function(td_element){var self=this;self.reset_with=function(td_element){self.td_element=td_element;self.form_element=td_element.find("input, textarea");self.url=td_element.data('update-url');self.inline_edit_mod=false;self.successful_update=false;};self.reset_with(td_element);self.refresh=function(){horizon.ajax.queue({url:self.url,data:{'inline_edit_mod':self.inline_edit_mod},beforeSend:function(){self.start_loading();},complete:function(){$(".tooltip.fade.top.in").remove();self.stop_loading();if(self.successful_update){var success=$('
    ');self.td_element.find('.inline-edit-status').append(success);var background_color=self.td_element.css('background-color');self.td_element.addClass("no-transition");self.td_element.addClass("success");self.td_element.removeClass("no-transition");self.td_element.removeClass("inline_edit_available");success.fadeOut(1300,function(){self.td_element.addClass("inline_edit_available");self.td_element.removeClass("success");});}},error:function(jqXHR,status,errorThrown){if(jqXHR.status===401){var redir_url=jqXHR.getResponseHeader("X-Horizon-Location");if(redir_url){location.href=redir_url;}else{horizon.alert("error",gettext("Not authorized to do this operation."));}} +else{if(!horizon.ajax.get_messages(jqXHR)){horizon.alert("error",gettext("An error occurred. Please try again later."));}}},success:function(data,textStatus,jqXHR){var td_element=$(data);self.form_element=self.get_form_element(td_element);if(self.inline_edit_mod){var table_cell_wrapper=td_element.find(".table_cell_wrapper");width=self.td_element.outerWidth();height=self.td_element.outerHeight();td_element.width(width);td_element.height(height);td_element.css('margin',0).css('padding',0);table_cell_wrapper.css('margin',0).css('padding',0);if(self.form_element.attr('type')==='checkbox'){var inline_edit_form=td_element.find(".inline-edit-form");inline_edit_form.css('padding-top','11px').css('padding-left','4px');inline_edit_form.width(width-40);}else{self.form_element.width(width-40);self.form_element.height(height-2);self.form_element.css('margin',0).css('padding',0);}} +self.cached_presentation_view=self.td_element;self.rewrite_cell(td_element);if(self.inline_edit_mod){self.form_element.focus();}}});};self.update=function(post_data){horizon.ajax.queue({type:'POST',url:self.url,data:post_data,beforeSend:function(){self.start_loading();},complete:function(){if(!self.successful_update){self.stop_loading();}},error:function(jqXHR,status,errorThrown){if(jqXHR.status===400){if(self.td_element.find(".inline-edit-error .error").length<=0){self.form_element.css('padding-left','20px');self.form_element.width(self.form_element.width()-20);} +error_message=$.parseJSON(jqXHR.responseText).message;var error=$('
    ');self.td_element.find(".inline-edit-error").html(error);error.tooltip({'placement':'top'});} +else if(jqXHR.status===401){var redir_url=jqXHR.getResponseHeader("X-Horizon-Location");if(redir_url){location.href=redir_url;}else{horizon.alert("error",gettext("Not authorized to do this operation."));}} +else{if(!horizon.ajax.get_messages(jqXHR)){horizon.alert("error",gettext("An error occurred. Please try again later."));}}},success:function(data,textStatus,jqXHR){self.successful_update=true;self.refresh();}});};self.cancel=function(){self.rewrite_cell(self.cached_presentation_view);self.stop_loading();};self.get_form_element=function(td_element){return td_element.find("input, textarea");};self.rewrite_cell=function(td_element){self.td_element.replaceWith(td_element);self.td_element=td_element;};self.start_loading=function(){self.td_element.addClass("no-transition");var spinner=$('
    ');self.td_element.find('.inline-edit-status').append(spinner);self.td_element.addClass("loading");self.td_element.removeClass("inline_edit_available");self.get_form_element(self.td_element).attr("disabled","disabled");};self.stop_loading=function(){self.td_element.find('div.inline-edit-status div.loading').remove();self.td_element.removeClass("loading");self.td_element.addClass("inline_edit_available");self.get_form_element(self.td_element).removeAttr("disabled");};}};horizon.addInitFunction(function(){$('table').on('click','.ajax-inline-edit',function(evt){var $this=$(this);var td_element=$this.parents('td').first();var cell=horizon.inline_edit.get_cell_object(td_element);cell.inline_edit_mod=true;cell.refresh();evt.preventDefault();});var submit_form=function(evt,el){var $submit=$(el);var td_element=$submit.parents('td').first();var post_data=$submit.parents('form').first().serialize();var cell=horizon.inline_edit.get_cell_object(td_element);cell.update(post_data);evt.preventDefault();};$('table').on('click','.inline-edit-submit',function(evt){submit_form(evt,this);});$('table').on('keypress','.inline-edit-form',function(evt){if(evt.which===13&&!evt.shiftKey){submit_form(evt,this);}});$('table').on('click','.inline-edit-cancel',function(evt){var $cancel=$(this);var td_element=$cancel.parents('td').first();var cell=horizon.inline_edit.get_cell_object(td_element);cell.cancel();evt.preventDefault();});$('table').on('mouseenter','.inline_edit_available',function(evt){$(this).find(".table_cell_action").fadeIn(100);});$('table').on('mouseleave','.inline_edit_available',function(evt){$(this).find(".table_cell_action").fadeOut(200);});$('table').on('mouseenter','.table_cell_action',function(evt){$(this).addClass("hovered");});$('table').on('mouseleave','.table_cell_action',function(evt){$(this).removeClass("hovered");});});horizon.tabs={_init_load_functions:[]};horizon.tabs.addTabLoadFunction=function(f){horizon.tabs._init_load_functions.push(f);};horizon.tabs.initTabLoad=function(tab){$(horizon.tabs._init_load_functions).each(function(index,f){f(tab);});};horizon.tabs.load_tab=function(evt){var $this=$(this),tab_id=$this.attr('data-target'),tab_pane=$(tab_id);tab_pane.append(""+gettext("Loading")+"…");tab_pane.spin(horizon.conf.spinner_options.inline);$(tab_pane.data().spinner.el).css('top','9px');$(tab_pane.data().spinner.el).css('left','15px');if(window.location.search.length>0){tab_pane.load(window.location.search+"&tab="+tab_id.replace('#',''),function(){horizon.tabs.initTabLoad(tab_pane);});}else{tab_pane.load("?tab="+tab_id.replace('#',''),function(){horizon.tabs.initTabLoad(tab_pane);});} +$this.attr("data-loaded","true");evt.preventDefault();};horizon.addInitFunction(function(){var data=horizon.cookies.read('tabs');$(".tab-content").find(".js-tab-pane").addClass("tab-pane");horizon.modals.addModalInitFunction(function(el){$(el).find(".js-tab-pane").addClass("tab-pane");});$(document).on("show",".ajax-tabs a[data-loaded='false']",horizon.tabs.load_tab);$(document).on("shown",".nav-tabs a[data-toggle='tab']",function(evt){var $tab=$(evt.target),$content=$($(evt.target).attr('data-target'));$content.find("table.datatable").each(function(){horizon.datatables.update_footer_count($(this));});horizon.cookies.update("tabs",$tab.closest(".nav-tabs").attr("id"),$tab.attr('data-target'));});$(".nav-tabs[data-sticky-tabs='sticky']").each(function(index,item){var $this=$(this),id=$this.attr("id"),active_tab=data[id];if(active_tab&&window.location.search.indexOf("tab=")<0){$this.find("a[data-target='"+active_tab+"']").tab('show');}});$(document).on("keydown",".tab-pane :input:visible:last",function(evt){var $this=$(this),next_pane=$this.closest(".tab-pane").next(".tab-pane");if(evt.which===9&&!event.shiftKey&&next_pane.length){evt.preventDefault();$(".nav-tabs a[data-target='#"+next_pane.attr("id")+"']").tab('show');}});$(document).on("keydown",".tab-pane :input:visible:first",function(evt){var $this=$(this),prev_pane=$this.closest(".tab-pane").prev(".tab-pane");if(event.shiftKey&&evt.which===9&&prev_pane.length){evt.preventDefault();$(".nav-tabs a[data-target='#"+prev_pane.attr("id")+"']").tab('show');prev_pane.find(":input:last").focus();console.log(prev_pane);}});$(document).on("focus",".tab-content :input",function(){var $this=$(this),tab_pane=$this.closest(".tab-pane"),tab_id=tab_pane.attr('id');if(!tab_pane.hasClass("active")){$(".nav-tabs a[data-target='#"+tab_id+"']").tab('show');}});});horizon.templates={template_ids:["#modal_template","#empty_row_template","#alert_message_template","#spinner-modal","#membership_template"],compiled_templates:{}};horizon.templates.compile_templates=function(){$.each(horizon.templates.template_ids,function(ind,template_id){horizon.templates.compiled_templates[template_id]=Hogan.compile($(template_id).html());});};horizon.addInitFunction(function(){horizon.templates.compile_templates();});horizon.user={init:function(){$("#id_password").change(function(){if($("#id_confirm_password").val()!==""){horizon.user.check_passwords_match();}});$("#id_confirm_password").change(function(){horizon.user.check_passwords_match();});},check_passwords_match:function(){var row=$("label[for='id_confirm_password']");var error_id="id_confirm_password_error";var msg=""+gettext("Passwords do not match.")+"";var password=$("#id_password").val();var confirm_password=$("#id_confirm_password").val();if(password!==confirm_password&&$("#"+error_id).length===0){$(row).parent().addClass("error");$(row).after(msg);}else if(password===confirm_password){$(row).parent().removeClass("error");$("#"+error_id).remove();}}};horizon.membership={current_membership:[],data:[],roles:[],has_roles:[],default_role_id:[],get_field_id:function(id_string){return id_string.slice(id_string.lastIndexOf("_")+1);},get_role_element:function(step_slug,role_id){return $('select[id^="id_'+step_slug+'_role_'+role_id+'"]');},get_member_element:function(step_slug,data_id){return $('li[data-'+step_slug+'-id$='+data_id+']').parent();},init_properties:function(step_slug){horizon.membership.has_roles[step_slug]=$("."+step_slug+"_membership").data('show-roles')!=="False";horizon.membership.default_role_id[step_slug]=$('#id_default_'+step_slug+'_role').attr('value');horizon.membership.init_data_list(step_slug);horizon.membership.init_role_list(step_slug);horizon.membership.init_current_membership(step_slug);},init_data_list:function(step_slug){horizon.membership.data[step_slug]=[];angular.forEach($(this.get_role_element(step_slug,"")).find("option"),function(option){horizon.membership.data[step_slug][option.value]=option.text;});},init_role_list:function(step_slug){horizon.membership.roles[step_slug]=[];angular.forEach($('label[for^="id_'+step_slug+'_role_"]'),function(role){var id=horizon.membership.get_field_id($(role).attr('for'));horizon.membership.roles[step_slug][id]=$(role).text();});},init_current_membership:function(step_slug){horizon.membership.current_membership[step_slug]=[];var members_list=[];var role_name,role_id,selected_members;angular.forEach(this.get_role_element(step_slug,''),function(value,key){role_id=horizon.membership.get_field_id($(value).attr('id'));role_name=$('label[for="id_'+step_slug+'_role_'+role_id+'"]').text();selected_members=$(value).find("option:selected");members_list=[];if(selected_members){angular.forEach(selected_members,function(member){members_list.push(member.value);});} +horizon.membership.current_membership[step_slug][role_id]=members_list;});},get_member_roles:function(step_slug,data_id){var roles=[];for(var role in horizon.membership.current_membership[step_slug]){if($.inArray(data_id,horizon.membership.current_membership[step_slug][role])!==-1){roles.push(role);}} +return roles;},update_role_lists:function(step_slug,role_id,new_list){this.get_role_element(step_slug,role_id).val(new_list);horizon.membership.current_membership[step_slug][role_id]=new_list;},remove_member:function(step_slug,data_id,role_id,role_list){var index=role_list.indexOf(data_id);if(index>=0){role_list.splice(index,1);horizon.membership.update_role_lists(step_slug,role_id,role_list);}},remove_member_from_role:function(step_slug,data_id,role_id){var role,membership=horizon.membership.current_membership[step_slug];if(role_id){horizon.membership.remove_member(step_slug,data_id,role_id,membership[role_id]);} +else{for(role in membership){if(membership.hasOwnProperty(role)){horizon.membership.remove_member(step_slug,data_id,role,membership[role]);}}}},add_member_to_role:function(step_slug,data_id,role_id){var role_list=horizon.membership.current_membership[step_slug][role_id];role_list.push(data_id);horizon.membership.update_role_lists(step_slug,role_id,role_list);},update_member_role_dropdown:function(step_slug,data_id,role_ids,member_el){if(typeof(role_ids)==='undefined'){role_ids=horizon.membership.get_member_roles(step_slug,data_id);} +if(typeof(member_el)==='undefined'){member_el=horizon.membership.get_member_element(step_slug,data_id);} +var $dropdown=member_el.find("li.member").siblings('.dropdown');var $role_items=$dropdown.children('.role_dropdown').children('li');$role_items.each(function(idx,el){if($.inArray(($(el).data('role-id')),role_ids)!==-1){$(el).addClass('selected');}else{$(el).removeClass('selected');}});var $roles_display=$dropdown.children('.dropdown-toggle').children('.roles_display');var roles_to_display=[];for(var i=0;i0){$("."+step_slug+"_members").append(this.generate_member_element(step_slug,display_name,data_id,role_ids,"-"));} +else{$(".available_"+step_slug).append(this.generate_member_element(step_slug,display_name,data_id,role_ids,"+"));}}} +horizon.membership.detect_no_results(step_slug);},update_membership:function(step_slug){$(".available_"+step_slug+", ."+step_slug+"_members").on('click',".btn-group a[href='#add_remove']",function(evt){evt.preventDefault();var available=$(".available_"+step_slug).has($(this)).length;var data_id=horizon.membership.get_field_id($(this).parent().siblings().attr('data-'+step_slug+'-id'));var member_el=$(this).parent().parent();if(available){var default_role=horizon.membership.default_role_id[step_slug];$(this).text("-");$("."+step_slug+"_members").append(member_el);horizon.membership.add_member_to_role(step_slug,data_id,default_role);if(horizon.membership.has_roles[step_slug]){$(this).parent().siblings(".role_options").show();horizon.membership.update_member_role_dropdown(step_slug,data_id,[default_role],member_el);}} +else{$(this).text("+");$(this).parent().siblings(".role_options").hide();$(".available_"+step_slug).append(member_el);horizon.membership.remove_member_from_role(step_slug,data_id);} +horizon.membership.list_filtering(step_slug);horizon.membership.detect_no_results(step_slug);$("input."+step_slug+"_filter").val("");});},detect_no_results:function(step_slug){$('.'+step_slug+'_filterable').each(function(){var css_class=$(this).find('ul').attr('class');var filter=$.grep(css_class.split(' '),function(val){return val.indexOf(step_slug)!==-1;})[0];if(!$('.'+filter).children('ul').length){$('#no_'+filter).show();$("input[id='"+filter+"']").attr('disabled','disabled');} +else{$('#no_'+filter).hide();$("input[id='"+filter+"']").removeAttr('disabled');}});},select_member_role:function(step_slug){$(".available_"+step_slug+", ."+step_slug+"_members").on('click','.role_dropdown li',function(evt){evt.preventDefault();evt.stopPropagation();var new_role_id=$(this).attr("data-role-id");var id_str=$(this).parent().parent().siblings(".member").attr("data-"+step_slug+"-id");var data_id=horizon.membership.get_field_id(id_str);if($(this).hasClass('selected')){$(this).removeClass('selected');horizon.membership.remove_member_from_role(step_slug,data_id,new_role_id);}else{$(this).addClass('selected');horizon.membership.add_member_to_role(step_slug,data_id,new_role_id);} +horizon.membership.update_member_role_dropdown(step_slug,data_id);});},add_new_member:function(step_slug){$("select[id='id_new_"+step_slug+"']").on('change',function(evt){var display_name=$(this).find("option").text();var data_id=$(this).find("option").attr("value");var default_role_id=horizon.membership.default_role_id[step_slug];$("."+step_slug+"_members").append(horizon.membership.generate_member_element(step_slug,display_name,data_id,[default_role_id],"-"));horizon.membership.data[step_slug][data_id]=display_name;$("select[multiple='multiple']").append("");horizon.membership.add_member_to_role(step_slug,data_id,default_role_id);$(this).text("");horizon.membership.list_filtering(step_slug);horizon.membership.detect_no_results(step_slug);$("input.filter").val("");$("."+step_slug+"_members .btn-group").removeClass('last_stripe');$("."+step_slug+"_members .btn-group:last").addClass('last_stripe');});},add_new_member_styling:function(step_slug){var add_member_el=$("label[for='id_new_"+step_slug+"']").parent();$(add_member_el).find("select").hide();$("#add_"+step_slug).append($(add_member_el));$(add_member_el).addClass("add_"+step_slug);$(add_member_el).find("label, .input").addClass("add_"+step_slug+"_btn");},fix_stripes:function(step_slug){$('.fake_'+step_slug+'_table').each(function(){var filter="."+$(this).attr('id');var visible=" .btn-group:visible";var even=" .btn-group:visible:even";var last=" .btn-group:visible:last";$(filter+visible).removeClass('dark_stripe');$(filter+visible).addClass('light_stripe');$(filter+even).removeClass('light_stripe');$(filter+even).addClass('dark_stripe');$(filter+visible).removeClass('last_stripe');$(filter+last).addClass('last_stripe');});},list_filtering:function(step_slug){$('input.'+step_slug+'_filter').unbind();$('.'+step_slug+'_filterable').each(function(){var css_class=$(this).children().children('ul').attr('class');var filter=$.grep(css_class.split(' '),function(val){return val.indexOf(step_slug)!==-1;})[0];var input=$("input[id='"+filter+"']");input.quicksearch('ul.'+filter+' ul li span.display_name',{'delay':200,'loader':'span.loading','show':function(){$(this).parent().parent().show();if(filter==="available_"+step_slug){$(this).parent('.dropdown-toggle').hide();}},'hide':function(){$(this).parent().parent().hide();},'noResults':'ul#no_'+filter,'onAfter':function(){horizon.membership.fix_stripes(step_slug);},'prepareQuery':function(val){return new RegExp(val,"i");},'testQuery':function(query,txt,span){if($(input).attr('id')===filter){$(input).prev().removeAttr('disabled');return query.test($(span).text());}else{return true;}}});});},workflow_init:function(modal,step_slug,step_id){$(".tab-content, .workflow").addClass("dropdown_fix");$(modal).find('form').each(function(){var $form=$(this);if($form.find('div.'+step_slug+'_membership').length===0){return;} +horizon.membership.init_properties(step_slug);horizon.membership.generate_html(step_slug);horizon.membership.update_membership(step_slug);horizon.membership.select_member_role(step_slug);horizon.membership.add_new_member(step_slug);$form.find(".available_"+step_slug+" .role_options").hide();if(!horizon.membership.has_roles[step_slug]){$form.find("."+step_slug+"_members .role_options").hide();} +if(step_id.indexOf('update')===0){$form.find("#"+step_id+" input").blur();} +$form.find('.'+step_slug+'_membership').keydown(function(event){if(event.keyCode===13){event.preventDefault();return false;}});horizon.membership.add_new_member_styling(step_slug);horizon.membership.list_filtering(step_slug);horizon.membership.detect_no_results(step_slug);$form.find('.fake_'+step_slug+'_table').each(function(){var filter="."+$(this).attr('id');$(filter+' .btn-group:even').addClass('dark_stripe');$(filter+' .btn-group:last').addClass('last_stripe');});});}};horizon.network_topology={model:null,svg:'#topology_canvas',svg_container:'#topologyCanvasContainer',post_messages:'#topologyMessages',network_tmpl:{small:'#topology_template > .network_container_small',normal:'#topology_template > .network_container_normal'},router_tmpl:{small:'#topology_template > .router_small',normal:'#topology_template > .router_normal'},instance_tmpl:{small:'#topology_template > .instance_small',normal:'#topology_template > .instance_normal'},balloon_tmpl:null,balloon_device_tmpl:null,balloon_port_tmpl:null,network_index:{},balloon_id:null,reload_duration:10000,draw_mode:'normal',network_height:0,previous_message:null,element_properties:{normal:{network_width:270,network_min_height:500,top_margin:80,default_height:50,margin:20,device_x:98.5,device_width:90,port_margin:16,port_height:6,port_width:82,port_text_margin:{x:6,y:-4},texts_bg_y:32,type_y:46,balloon_margin:{x:12,y:-12}},small:{network_width:100,network_min_height:400,top_margin:50,default_height:20,margin:30,device_x:47.5,device_width:20,port_margin:5,port_height:3,port_width:32.5,port_text_margin:{x:0,y:0},texts_bg_y:0,type_y:0,balloon_margin:{x:12,y:-30}},cidr_margin:5,device_name_max_size:9,device_name_suffix:'..'},init:function(){var self=this;$(self.svg_container).spin(horizon.conf.spinner_options.modal);if($('#networktopology').length===0){return;} +self.color=d3.scale.category10();self.balloon_tmpl=Hogan.compile($('#balloon_container').html());self.balloon_device_tmpl=Hogan.compile($('#balloon_device').html());self.balloon_port_tmpl=Hogan.compile($('#balloon_port').html());$(document).on('click','a.closeTopologyBalloon',function(e){e.preventDefault();self.delete_balloon();}).on('click','.topologyBalloon',function(e){e.stopPropagation();}).on('click','a.vnc_window',function(e){e.preventDefault();var vnc_window=window.open($(this).attr('href'),vnc_window,'width=760,height=560');self.delete_balloon();}).click(function(){self.delete_balloon();});$('.toggleView > .btn').click(function(){self.draw_mode=$(this).data('value');$('g.network').remove();$.cookie('ntp_draw_mode',self.draw_mode);self.data_convert();});$(window).on('message',function(e){var message=$.parseJSON(e.originalEvent.data);if(self.previous_message!==message.message){horizon.alert(message.type,message.message);horizon.autoDismissAlerts();self.previous_message=message.message;self.delete_post_message(message.iframe_id);self.load_network_info();setTimeout(function(){self.previous_message=null;},10000);}});self.load_network_info();},load_network_info:function(){var self=this;if($('#networktopology').length===0){return;} +$.getJSON($('#networktopology').data('networktopology')+'?'+$.now(),function(data){self.model=data;self.data_convert();setTimeout(function(){self.load_network_info();},self.reload_duration);});},select_draw_mode:function(){var self=this;var draw_mode=$.cookie('ntp_draw_mode');if(draw_mode&&(draw_mode==='normal'||draw_mode==='small')){self.draw_mode=draw_mode;}else{if(self.model.networks.length*self.element_properties.normal.network_width>$('#topologyCanvas').width()){self.draw_mode='small';}else{self.draw_mode='normal';} +$.cookie('ntp_draw_mode',self.draw_mode);} +$('.toggleView > .btn').each(function(){var $this=$(this);if($this.hasClass(self.draw_mode)){$this.addClass('active');}});},data_convert:function(){var self=this;var model=self.model;$.each(model.networks,function(index,network){self.network_index[network.id]=index;});self.select_draw_mode();var element_properties=self.element_properties[self.draw_mode];self.network_height=element_properties.top_margin;$.each([{model:model.routers,type:'router'},{model:model.servers,type:'instance'}],function(index,devices){var type=devices.type;var model=devices.model;$.each(model,function(index,device){device.type=type;device.ports=self.select_port(device.id);var hasports=(device.ports.length<=0)?false:true;device.parent_network=(hasports)?self.select_main_port(device.ports).network_id:self.model.networks[0].id;var height=element_properties.port_margin*(device.ports.length-1);device.height=(self.draw_mode==='normal'&&height>element_properties.default_height)?height:element_properties.default_height;device.pos_y=self.network_height;device.port_height=(self.draw_mode==='small'&&height>device.height)?1:element_properties.port_height;device.port_margin=(self.draw_mode==='small'&&height>device.height)?device.height/device.ports.length:element_properties.port_margin;self.network_height+=device.height+element_properties.margin;});});$.each(model.networks,function(index,network){network.devices=[];$.each([model.routers,model.servers],function(index,devices){$.each(devices,function(index,device){if(network.id===device.parent_network){network.devices.push(device);}});});});self.network_height+=element_properties.top_margin;self.network_height=(self.network_height>element_properties.network_min_height)?self.network_height:element_properties.network_min_height;self.draw_topology();},draw_topology:function(){var self=this;$(self.svg_container).spin(false);$(self.svg_container).removeClass('noinfo');if(self.model.networks.length<=0){$('g.network').remove();$(self.svg_container).addClass('noinfo');return;} +var svg=d3.select(self.svg);var element_properties=self.element_properties[self.draw_mode];svg.attr('width',self.model.networks.length*element_properties.network_width).attr('height',self.network_height);var network=svg.selectAll('g.network').data(self.model.networks);var network_enter=network.enter().append('g').attr('class','network').each(function(d,i){this.appendChild(d3.select(self.network_tmpl[self.draw_mode]).node().cloneNode(true));var $this=d3.select(this).select('.network-rect');if(d.url){$this.on('mouseover',function(){$this.transition().style('fill',function(){return d3.rgb(self.get_network_color(d.id)).brighter(0.5);});}).on('mouseout',function(){$this.transition().style('fill',function(){return self.get_network_color(d.id);});}).on('click',function(){window.location.href=d.url;});}else{$this.classed('nourl',true);}});network.attr('id',function(d){return'id_'+d.id;}).attr('transform',function(d,i){return'translate('+element_properties.network_width*i+','+0+')';}).select('.network-rect').attr('height',function(d){return self.network_height;}).style('fill',function(d){return self.get_network_color(d.id);});network.select('.network-name').attr('x',function(d){return self.network_height/2;}).text(function(d){return d.name;});network.select('.network-cidr').attr('x',function(d){return self.network_height-self.element_properties.cidr_margin;}).text(function(d){var cidr=$.map(d.subnets,function(n,i){return n.cidr;});return cidr.join(', ');});network.exit().remove();var device=network.selectAll('g.device').data(function(d){return d.devices;});var device_enter=device.enter().append("g").attr('class','device').each(function(d,i){var device_template=self[d.type+'_tmpl'][self.draw_mode];this.appendChild(d3.select(device_template).node().cloneNode(true));});device_enter.on('mouseenter',function(d){var $this=$(this);self.show_balloon(d,$this);}).on('click',function(){d3.event.stopPropagation();});device.attr('id',function(d){return'id_'+d.id;}).attr('transform',function(d,i){return'translate('+element_properties.device_x+','+d.pos_y+')';}).select('.frame').attr('height',function(d){return d.height;});device.select('.texts_bg').attr('y',function(d){return element_properties.texts_bg_y+d.height-element_properties.default_height;});device.select('.type').attr('y',function(d){return element_properties.type_y+d.height-element_properties.default_height;});device.select('.name').text(function(d){return self.string_truncate(d.name);});device.each(function(d){if(d.status==='BUILD'){d3.select(this).classed('loading',true);}else if(d.task==='deleting'){d3.select(this).classed('loading',true);if('bl_'+d.id===self.balloon_id){self.delete_balloon();}}else{d3.select(this).classed('loading',false);if('bl_'+d.id===self.balloon_id){var $this=$(this);self.show_balloon(d,$this);}}});device.exit().each(function(d){if('bl_'+d.id===self.balloon_id){self.delete_balloon();}}).remove();var port=device.select('g.ports').selectAll('g.port').data(function(d){return d.ports;});var port_enter=port.enter().append('g').attr('class','port').attr('id',function(d){return'id_'+d.id;});port_enter.append('line').attr('class','port_line');port_enter.append('text').attr('class','port_text');device.select('g.ports').each(function(d,i){this._portdata={};this._portdata.ports_length=d.ports.length;this._portdata.parent_network=d.parent_network;this._portdata.device_height=d.height;this._portdata.port_height=d.port_height;this._portdata.port_margin=d.port_margin;this._portdata.left=0;this._portdata.right=0;$(this).mouseenter(function(e){e.stopPropagation();});});port.each(function(d,i){var index_diff=self.get_network_index(this.parentNode._portdata.parent_network)- +self.get_network_index(d.network_id);this._index_diff=index_diff=(index_diff>=0)?++index_diff:index_diff;this._direction=(this._index_diff<0)?'right':'left';this._index=this.parentNode._portdata[this._direction]++;});port.attr('transform',function(d,i){var x=(this._direction==='left')?0:element_properties.device_width;var ports_length=this.parentNode._portdata[this._direction];var distance=this.parentNode._portdata.port_margin;var y=(this.parentNode._portdata.device_height- +(ports_length-1)*distance)/2+this._index*distance;return'translate('+x+','+y+')';});port.select('.port_line').attr('stroke-width',function(d,i){return this.parentNode.parentNode._portdata.port_height;}).attr('stroke',function(d,i){return self.get_network_color(d.network_id);}).attr('x1',0).attr('y1',0).attr('y2',0).attr('x2',function(d,i){var parent=this.parentNode;var width=(Math.abs(parent._index_diff)-1)*element_properties.network_width+ +element_properties.port_width;return(parent._direction==='left')?-1*width:width;});port.select('.port_text').attr('x',function(d){var parent=this.parentNode;if(parent._direction==='left'){d3.select(this).classed('left',true);return element_properties.port_text_margin.x*-1;}else{d3.select(this).classed('left',false);return element_properties.port_text_margin.x;}}).attr('y',function(d){return element_properties.port_text_margin.y;}).text(function(d){var ip_label=[];$.each(d.fixed_ips,function(){ip_label.push(this.ip_address);});return ip_label.join(',');});port.exit().remove();},get_network_color:function(network_id){return this.color(this.get_network_index(network_id));},get_network_index:function(network_id){return this.network_index[network_id];},select_port:function(device_id){return $.map(this.model.ports,function(port,index){if(port.device_id===device_id){return port;}});},select_main_port:function(ports){var _self=this;var main_port_index=0;var MAX_INT=4294967295;var min_port_length=MAX_INT;$.each(ports,function(index,port){var port_length=_self.sum_port_length(port.network_id,ports);if(port_lengthmax_size){str=str.substr(0,i)+suffix;break;}} +return str;},delete_device:function(type,device_id){var self=this;var message={id:device_id};self.post_message(device_id,type,message);},delete_port:function(router_id,port_id){var self=this;var message={id:port_id};self.post_message(port_id,'router/'+router_id+'/',message);},show_balloon:function(d,element){var self=this;var element_properties=self.element_properties[self.draw_mode];if(self.balloon_id){self.delete_balloon();} +var balloon_tmpl=self.balloon_tmpl;var device_tmpl=self.balloon_device_tmpl;var port_tmpl=self.balloon_port_tmpl;var balloon_id='bl_'+d.id;var ports=[];$.each(d.ports,function(i,port){var object={};object.id=port.id;object.router_id=port.device_id;object.url=port.url;object.port_status=port.status;object.port_status_css=(port.status==="ACTIVE")?'active':'down';var ip_address='';try{ip_address=port.fixed_ips[0].ip_address;}catch(e){ip_address='no info';} +var device_owner='';try{device_owner=port.device_owner.replace('network:','');}catch(e){device_owner='no info';} +object.ip_address=ip_address;object.device_owner=device_owner;object.is_interface=(device_owner==='router_interface')?true:false;ports.push(object);});var html_data={balloon_id:balloon_id,id:d.id,url:d.url,name:d.name,type:d.type,type_capital:d.type.replace(/^\w/,function($0){return $0.toUpperCase();}),status:d.status,status_class:(d.status==="ACTIVE")?'active':'down',status_label:gettext("STATUS"),id_label:gettext("ID"),interfaces_label:gettext("Interfaces"),interface_label:gettext("Interface"),open_console_label:gettext("open console"),view_details_label:interpolate(gettext("view %s details"),[d.type])};if(d.type==='router'){html_data.port=ports;html=balloon_tmpl.render(html_data,{table1:device_tmpl,table2:port_tmpl});}else if(d.type==='instance'){html_data.console_id=d.id;html_data.console=d.console;html=balloon_tmpl.render(html_data,{table1:device_tmpl});}else{return;} +$(self.svg_container).append(html);var device_position=element.find('.frame');var x=device_position.position().left+ +element_properties.device_width+ +element_properties.balloon_margin.x;var y=device_position.position().top+ +element_properties.balloon_margin.y;$('#'+balloon_id).css({'left':x+'px','top':y+'px'}).show();var $balloon=$('#'+balloon_id);if($balloon.offset().left+$balloon.outerWidth()>$(window).outerWidth()){$balloon.css({'left':0+'px'}).css({'left':(device_position.position().left-$balloon.outerWidth()- +element_properties.balloon_margin.x+'px')}).addClass('leftPosition');} +$balloon.find('.delete-device').click(function(e){var $this=$(this);$this.addClass('deleting');d3.select('#id_'+$this.data('device-id')).classed('loading',true);self.delete_device($this.data('type'),$this.data('device-id'));});$balloon.find('.delete-port').click(function(e){var $this=$(this);self.delete_port($this.data('router-id'),$this.data('port-id'));});self.balloon_id=balloon_id;},delete_balloon:function(){var self=this;if(self.balloon_id){$('#'+self.balloon_id).remove();self.balloon_id=null;}},post_message:function(id,url,message){var self=this;var iframe_id='ifr_'+id;var iframe=$('