diff --git a/README.rst b/README.rst index 187a15cf..8f3fc64c 100644 --- a/README.rst +++ b/README.rst @@ -80,9 +80,10 @@ version of pip than is packaged with distros virtualenv. Note that this application is python 3 only so you must create your virtualenv with a python3 interpreter. -- ``virtualenv -p `which python3` venv`` +- ``python3 -m venv venv`` - ``source ./venv/bin/activate`` - ``pip install -c constraints.txt -r requirements.txt`` +- ``pip install -c constraints.txt -r vendored_requirements.txt`` Once your dev instance is up and running ---------------------------------------- @@ -138,7 +139,7 @@ admin3:XzynbNH9Sw3pLPXe Creating review permissions objects ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Some more voodoo magic that needs to be manually run because that's just how symposion works. -This creates the permission that needs to be applied to a user/group/team to be able to see the review sections of the site. +After conference Sections have been created, this command will add +Permission objects for those sections. ``./manage.py create_review_permissions`` diff --git a/docker/Dockerfile b/docker/Dockerfile index 688276bf..baf81ccd 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,6 +1,8 @@ FROM python:3.6 -COPY constraints.txt requirements.txt /reqs/ + +RUN set -ex \ + && apt-get update RUN set -ex \ && buildDeps=' \ @@ -15,18 +17,26 @@ RUN set -ex \ libmemcached-dev \ libsasl2-dev \ ' \ - && apt-get update \ + && apt-get install -y git xmlsec1 libmysqlclient18 \ && apt-get install -y $buildDeps --no-install-recommends \ - && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/lib/apt/lists/* + +RUN set -ex \ + && pip install uwsgi + +COPY constraints.txt requirements.txt /reqs/ + +RUN set -ex \ && pip install --no-cache-dir -r /reqs/requirements.txt -c /reqs/constraints.txt \ - && pip install uwsgi \ && apt-get purge -y --auto-remove $buildDeps \ && rm -rf /usr/src/python ~/.cache COPY . /app/symposion_app WORKDIR /app/symposion_app +RUN set -x \ + && pip install -r vendored_requirements.txt -c /reqs/constraints.txt RUN set -x \ && DJANGO_SECRET_KEY=1234 STRIPE_PUBLIC_KEY=1234 STRIPE_SECRET_KEY=1234 \ DATABASE_URL="sqlite:////dev/null" \ diff --git a/docker/Dockerfile.makemigrations b/docker/Dockerfile.makemigrations index 5cf1dfeb..d64f416d 100644 --- a/docker/Dockerfile.makemigrations +++ b/docker/Dockerfile.makemigrations @@ -18,5 +18,8 @@ RUN set -ex \ && apt-get install -y git xmlsec1 libmysqlclient18 \ && apt-get install -y $buildDeps --no-install-recommends RUN pip install -c /setup/constraints.txt -r /setup/requirements.txt +COPY . /source +WORKDIR /source +RUN pip install -c /setup/constraints.txt -r /source/vendored_requirements.txt ENTRYPOINT ["python","/source/manage.py", "makemigrations"] diff --git a/docs/index.rst b/docs/index.rst index 4002c9d2..d87b76d8 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -7,7 +7,7 @@ submission, reviews, scheduling and sponsor management. .. toctree:: - :maxdepth: 2 + :maxdepth: 3 project conference @@ -17,12 +17,6 @@ submission, reviews, scheduling and sponsor management. speakers schedule miniconfs - -.. include:: registrasion/README.rst - -.. toctree:: - :maxdepth: 3 - registrasion/index.rst About diff --git a/pinaxcon/registrasion/admin.py b/pinaxcon/registrasion/admin.py new file mode 100644 index 00000000..09679267 --- /dev/null +++ b/pinaxcon/registrasion/admin.py @@ -0,0 +1,5 @@ +from django.contrib import admin + +from .models import PastEvent + +admin.site.register(PastEvent) diff --git a/pinaxcon/registrasion/forms.py b/pinaxcon/registrasion/forms.py index b655f11c..7bb21f1e 100644 --- a/pinaxcon/registrasion/forms.py +++ b/pinaxcon/registrasion/forms.py @@ -9,7 +9,7 @@ class YesNoField(forms.TypedChoiceField): kwargs['required'] = True super(YesNoField, self).__init__( *args, - coerce=lambda x: x is True, + coerce=lambda x: x in ['True', 'Yes', True], choices=((None, '--------'), (False, 'No'), (True, 'Yes')), **kwargs ) diff --git a/pinaxcon/registrasion/management/commands/populate_inventory.py b/pinaxcon/registrasion/management/commands/populate_inventory.py index ae2a09e6..a1a36a32 100644 --- a/pinaxcon/registrasion/management/commands/populate_inventory.py +++ b/pinaxcon/registrasion/management/commands/populate_inventory.py @@ -13,7 +13,7 @@ from symposion import proposals class Command(BaseCommand): - help = 'Populates the inventory with the LCA2017 inventory model' + help = 'Populates the inventory with the LCA2018 inventory model' def add_arguments(self, parser): pass @@ -67,6 +67,20 @@ class Command(BaseCommand): limit_per_user=1, order=1, ) + self.terms = self.find_or_make( + inv.Category, + ("name",), + name="Terms, Conditions, and Code of Conduct Acceptance", + description="I agree to the " + " " + "terms and conditions of attendance, and I have read, " + "understood, and agree to act according to the standards set " + "forth in our " + "Code of Conduct.", + required=True, + render_type=inv.Category.RENDER_TYPE_CHECKBOX, + order=10, + ) self.penguin_dinner = self.find_or_make( inv.Category, ("name",), @@ -78,7 +92,7 @@ class Command(BaseCommand): required=False, render_type=inv.Category.RENDER_TYPE_QUANTITY, limit_per_user=10, - order=10, + order=20, ) self.speakers_dinner_ticket = self.find_or_make( inv.Category, @@ -91,7 +105,7 @@ class Command(BaseCommand): required=False, render_type=inv.Category.RENDER_TYPE_QUANTITY, limit_per_user=5, - order=20, + order=30, ) self.pdns_category = self.find_or_make( inv.Category, @@ -105,17 +119,17 @@ class Command(BaseCommand): required=False, render_type=inv.Category.RENDER_TYPE_RADIO, limit_per_user=1, - order=30, + order=40, ) self.t_shirt = self.find_or_make( inv.Category, ("name",), - name="T-Shirt", - description="Commemorative conference t-shirts, featuring the" + name="Shirt", + description="Commemorative conference polo shirts, featuring the " "linux.conf.au 2018 artwork.", required=False, render_type=inv.Category.RENDER_TYPE_ITEM_QUANTITY, - order=40, + order=50, ) # self.accommodation = self.find_or_make( # inv.Category, @@ -258,6 +272,17 @@ class Command(BaseCommand): order=90, ) + # Agreements + self.accept_terms = self.find_or_make( + inv.Product, + ("name","category",), + category = self.terms, + name="I Accept", + price=Decimal("00.00"), + reservation_duration=hours(24), + order=10, + limit_per_user=1, + ) # Penguin dinner self.penguin_adult = self.find_or_make( @@ -358,7 +383,7 @@ class Command(BaseCommand): inv.Product, ("name", "category",), category=self.extras, - name="Offset the carbon polution generated by your attendance, " + name="Offset the carbon pollution generated by your attendance, " "thanks to fifteen trees.", price=Decimal("5.00"), reservation_duration=hours(1), @@ -369,12 +394,12 @@ class Command(BaseCommand): ShirtGroup = namedtuple("ShirtGroup", ("prefix", "sizes")) shirt_names = { "mens": ShirtGroup( - "Men's/Straight Cut Size", - ("S", "M", "L", "XL", "2XL", "3XL", "5XL"), + "Men's/Straight Cut", + ("S", "M", "L", "XL", "2XL", "3XL", "4XL"), ), "womens": ShirtGroup( "Women's Classic Fit", - ("XS", "S", "M", "L", "XL", "2XL"), + ("8", "10", "12", "14", "16", "18"), ), } @@ -621,7 +646,6 @@ class Command(BaseCommand): ) pdns_by_staff.group.set([ self.group_team, - self.group_volunteers, ]) pdns_by_staff.categories.set([self.pdns_category, ]) @@ -630,14 +654,30 @@ class Command(BaseCommand): cond.CategoryFlag, ("description", ), description="GottaGettaTicketFirst", - condition=cond.FlagBase.ENABLE_IF_TRUE, + condition=cond.FlagBase.DISABLE_IF_FALSE, enabling_category = self.ticket ) needs_a_ticket.categories.set([ self.extras, self.t_shirt, self.penguin_dinner, + self.pdns_category, ]) + # Require attendees to accept the T&Cs and Code of Conduct + needs_agreement = self.find_or_make( + cond.CategoryFlag, + ("description", ), + description="Must Accept Terms", + condition=cond.FlagBase.DISABLE_IF_FALSE, + enabling_category = self.terms, + ) + needs_agreement.categories.set([ + self.extras, + self.t_shirt, + self.penguin_dinner, + self.pdns_category, + ]) + def populate_discounts(self): @@ -673,7 +713,7 @@ class Command(BaseCommand): early_bird_hobbyist_discount = self.find_or_make( cond.TimeOrStockLimitDiscount, ("description", ), - description="Early Bird Hobbyist", + description="Early Bird Discount - Hobbyist", end_time=datetime(year=2017, month=11, day=1), limit=150, # Across all users ) @@ -689,9 +729,9 @@ class Command(BaseCommand): early_bird = self.find_or_make( cond.TimeOrStockLimitDiscount, ("description", ), - description="Early Bird", + description="Early Bird Discount - Professional", end_time=datetime(year=2017, month=11, day=1), - limit=200, # Across professionals and hobbyists + limit=200, # Across professionals and fairy sponsors ) add_early_birds(early_bird) @@ -757,23 +797,22 @@ class Command(BaseCommand): ]) free_category(ticket_student_inclusions, self.t_shirt) - # Team & volunteer ticket inclusions + # Team ticket inclusions ticket_staff_inclusions = self.find_or_make( cond.IncludedProductDiscount, ("description", ), - description="Complimentary for ticket holder (staff/volunteer)", + description="Complimentary for ticket holder staff)", ) ticket_staff_inclusions.enabling_products.set([ self.ticket_team, - self.ticket_volunteer, ]) free_category(ticket_staff_inclusions, self.penguin_dinner) - # Team & volunteer t-shirts, regardless of ticket type + # Team & volunteer shirts, regardless of ticket type staff_t_shirts = self.find_or_make( cond.GroupMemberDiscount, ("description", ), - description="T-shirts complimentary for staff and volunteers", + description="Shirts complimentary for staff and volunteers", ) staff_t_shirts.group.set([ self.group_team, diff --git a/pinaxcon/registrasion/migrations/0006_auto_20170927_2301.py b/pinaxcon/registrasion/migrations/0006_auto_20170927_2301.py new file mode 100644 index 00000000..98330ac6 --- /dev/null +++ b/pinaxcon/registrasion/migrations/0006_auto_20170927_2301.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.5 on 2017-09-27 13:01 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('pinaxcon_registrasion', '0005_auto_20170702_2233'), + ] + + operations = [ + migrations.AddField( + model_name='attendeeprofile', + name='future_conference', + field=models.BooleanField(default=False, help_text='Select to have your login details made available to future Linux Australia conferences who share the same Single Sign On system.', verbose_name='Reuse my login for future Linux Australia conferences?'), + preserve_default=False, + ), + migrations.AlterField( + model_name='attendeeprofile', + name='lca_chat', + field=models.BooleanField(help_text='lca2018-chat is a high-traffic mailing list used by attendees during the week of the conference for general discussion.', verbose_name='Subscribe to the lca2018-chat list'), + ), + ] diff --git a/pinaxcon/registrasion/migrations/0007_auto_20170930_1610.py b/pinaxcon/registrasion/migrations/0007_auto_20170930_1610.py new file mode 100644 index 00000000..c5dafab2 --- /dev/null +++ b/pinaxcon/registrasion/migrations/0007_auto_20170930_1610.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.5 on 2017-09-30 06:10 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('pinaxcon_registrasion', '0006_auto_20170927_2301'), + ] + + operations = [ + migrations.AddField( + model_name='attendeeprofile', + name='agreement', + field=models.BooleanField(default=False, help_text='I agree to the terms and conditions of attendance, and I have read, understood, and agree to act according to the standards set forth in our Code of Conduct.'), + preserve_default=False, + ), + migrations.AlterField( + model_name='attendeeprofile', + name='state', + field=models.CharField(blank=True, help_text='If your Country is Australia, you must list a state.', max_length=256, verbose_name='State/Territory/Province'), + ), + ] diff --git a/pinaxcon/registrasion/migrations/0008_remove_attendeeprofile_agreement.py b/pinaxcon/registrasion/migrations/0008_remove_attendeeprofile_agreement.py new file mode 100644 index 00000000..d35526fe --- /dev/null +++ b/pinaxcon/registrasion/migrations/0008_remove_attendeeprofile_agreement.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.5 on 2017-10-01 08:14 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('pinaxcon_registrasion', '0007_auto_20170930_1610'), + ] + + operations = [ + migrations.RemoveField( + model_name='attendeeprofile', + name='agreement', + ), + ] diff --git a/pinaxcon/registrasion/models.py b/pinaxcon/registrasion/models.py index f30af712..91a05382 100644 --- a/pinaxcon/registrasion/models.py +++ b/pinaxcon/registrasion/models.py @@ -138,6 +138,7 @@ class AttendeeProfile(rego.AttendeeProfileBase): state = models.CharField( max_length=256, verbose_name="State/Territory/Province", + help_text="If your Country is Australia, you must list a state.", blank=True, ) @@ -179,13 +180,21 @@ class AttendeeProfile(rego.AttendeeProfileBase): ) lca_chat = models.BooleanField( - verbose_name="Subscribe to the lca2017-chat list", - help_text="lca2017-chat is a high-traffic mailing list used by " + verbose_name="Subscribe to the lca2018-chat list", + help_text="lca2018-chat is a high-traffic mailing list used by " "attendees during the week of the conference for general " "discussion.", blank=True, ) + future_conference = models.BooleanField( + verbose_name = "Reuse my login for future Linux Australia conferences?", + help_text="Select to have your login details made available to future " + "Linux Australia conferences who share the same Single Sign " + "On system.", + blank=True, + ) + past_lca = models.ManyToManyField( PastEvent, verbose_name="Which past linux.conf.au events have you attended?", diff --git a/pinaxcon/settings.py b/pinaxcon/settings.py index 8dec25d8..6f2ff238 100644 --- a/pinaxcon/settings.py +++ b/pinaxcon/settings.py @@ -322,7 +322,7 @@ PROPOSAL_FORMS = { ATTENDEE_PROFILE_MODEL = "pinaxcon.registrasion.models.AttendeeProfile" ATTENDEE_PROFILE_FORM = "pinaxcon.registrasion.forms.ProfileForm" INVOICE_CURRENCY = "AUD" - +TICKET_PRODUCT_CATEGORY = 1 ATTENDEE_PROFILE_FORM = "pinaxcon.registrasion.forms.ProfileForm" # CSRF custom error screen diff --git a/pinaxcon/templates/_form_snippet.html b/pinaxcon/templates/_form_snippet.html index 7d64b937..1e5193a3 100644 --- a/pinaxcon/templates/_form_snippet.html +++ b/pinaxcon/templates/_form_snippet.html @@ -1,4 +1,4 @@ -{% load pyconau2017_tags %} +{% load lca2018_tags %} {% load bootstrap %} {% if form.non_field_errors %} diff --git a/pinaxcon/templates/content_page.html b/pinaxcon/templates/content_page.html index 1b87f005..7fb76a8e 100644 --- a/pinaxcon/templates/content_page.html +++ b/pinaxcon/templates/content_page.html @@ -1,7 +1,7 @@ {% extends "site_base.html" %} {% load staticfiles %} -{% load pyconau2017_tags %} +{% load lca2018_tags %} {% load i18n %} diff --git a/pinaxcon/templates/dashboard.html b/pinaxcon/templates/dashboard.html index f681707a..841b0a01 100644 --- a/pinaxcon/templates/dashboard.html +++ b/pinaxcon/templates/dashboard.html @@ -5,7 +5,7 @@ {% load review_tags %} {% load teams_tags %} {% load registrasion_tags %} -{% load pyconau2017_tags %} +{% load lca2018_tags %} {% load staticfiles %} @@ -42,8 +42,8 @@

Register

-

To attend the conference, you must register an attendee profile and purchase your ticket

- Get your ticket +

To attend the conference, you must create an attendee profile and purchase your ticket

+ Get your ticket
{% else %} @@ -125,9 +125,9 @@ Invoice {{ invoice.id }} - ${{ invoice.value }} ({{ invoice.get_status_display }}) - Show void invoices {% endfor %} + diff --git a/pinaxcon/templates/registrasion/_invoice_details.html b/pinaxcon/templates/registrasion/_invoice_details.html index 12142037..0eba3c02 100644 --- a/pinaxcon/templates/registrasion/_invoice_details.html +++ b/pinaxcon/templates/registrasion/_invoice_details.html @@ -1,12 +1,12 @@ {% load registrasion_tags %} -{% load pyconau2017_tags %} +{% load lca2018_tags %}

Tax Invoice/Statement

Linux Australia

ABN 56 987 117 479

- Enquiries: please e-mail team@hobart.pyconau2017.org + Enquiries: please e-mail team@lca2018.org

{% endfor %} + +
+ + {% endif %} diff --git a/pinaxcon/templates/registrasion/guided_registration.html b/pinaxcon/templates/registrasion/guided_registration.html index 71af3298..8d507106 100644 --- a/pinaxcon/templates/registrasion/guided_registration.html +++ b/pinaxcon/templates/registrasion/guided_registration.html @@ -1,5 +1,5 @@ {% extends "registrasion/base.html" %} -{% load pyconau2017_tags %} +{% load lca2018_tags %} {% block header_title %}Buy Your Ticket{% endblock %} {% block header_paragraph %}Step {{ current_step }} of {{ total_steps|add:1 }} – {{ title }} {% endblock %} @@ -8,6 +8,21 @@ {% for section in sections %} {{ section.form.media.js }} {% endfor %} + + {% endblock %} {% block content %} @@ -26,14 +41,6 @@ {% if section.discounts %} {% include "registrasion/discount_list.html" with discounts=section.discounts %} - -
- You must select a product to receive any discounts.
- Applicable discounts will be applied automatically when you check out. -
- -
- {% endif %}

Available options

@@ -45,7 +52,10 @@ {% endfor %}
- + {% if current_step > 1 %} + Back + {% endif %} +
diff --git a/pinaxcon/templates/registrasion/invoice.html b/pinaxcon/templates/registrasion/invoice.html index ebfadd9a..6e8a0812 100644 --- a/pinaxcon/templates/registrasion/invoice.html +++ b/pinaxcon/templates/registrasion/invoice.html @@ -1,15 +1,15 @@ {% extends "registrasion/base.html" %} {% load registrasion_tags %} -{% load pyconau2017_tags %} +{% load lca2018_tags %} {% load staticfiles %} {% block header_title %}{% conference_name %}{% endblock %} {% block header_paragraph %} -

Monday 16 January–Friday 20 January 2017.

-

Wrest Point Convention Centre, Hobart, Tasmania, Australia.

+

Monday 22 January–Friday 26 January 2018.

+

University of Technology Sydney, New South Wales, Australia.

{% endblock %} {% block header_inset_image %}{% illustration "tuz.svg" %}{% endblock %} -{% block header_background_image %}{% static "pyconau2017/images/wp_bg_optimised.jpg" %}{% endblock %} +{% block header_background_image %}{% static "lca2018/images/wp_bg_optimised.jpg" %}{% endblock %} {% block content %} @@ -25,7 +25,7 @@ {% url "invoice_access" invoice.user.attendee.access_code as access_url %}

Your most recent unpaid invoice will be available at {{ request.scheme }}://{{ request.get_host }}{{ access_url }} - You can give this URL to your accounts department to pay for this invoice.

+ You can print that page for your records, or give this URL to your accounts department to pay for this invoice

Pay this invoice by card diff --git a/pinaxcon/templates/registrasion/product_category.html b/pinaxcon/templates/registrasion/product_category.html index 0cbd23ce..182e8247 100644 --- a/pinaxcon/templates/registrasion/product_category.html +++ b/pinaxcon/templates/registrasion/product_category.html @@ -1,6 +1,6 @@ {% extends "registrasion/base.html" %} {% load registrasion_tags %} -{% load pyconau2017_tags %} +{% load lca2018_tags %} {% block header_title %}Product Category: {{ category.name }}{% endblock %} {% block header_inset_image %}{% illustration "lavender.svg" %}{% endblock %} @@ -50,13 +50,7 @@
{% if discounts %} -

Discounts and Complimentary Items

-
{% include "registrasion/discount_list.html" with discounts=discounts %} -
Any applicable discounts will be applied automatically when you check out.
- -
- {% endif %}

Make a selection

diff --git a/pinaxcon/templates/registrasion/profile_form.html b/pinaxcon/templates/registrasion/profile_form.html index 5911874d..95111d1d 100644 --- a/pinaxcon/templates/registrasion/profile_form.html +++ b/pinaxcon/templates/registrasion/profile_form.html @@ -1,5 +1,5 @@ {% extends "registrasion/base.html" %} -{% load pyconau2017_tags %} +{% load lca2018_tags %} {% block header_title %}Your profile{% endblock %} {% block header_paragraph %} @@ -8,13 +8,25 @@ {% endblock %} {% block scripts_extra %} - {{ form.media.js }} - +{{ form.media.js }} + {% endblock %} {% block content %} - +THIS IS THE FORM
{% csrf_token %} diff --git a/pinaxcon/templates/registrasion/review.html b/pinaxcon/templates/registrasion/review.html index f582673b..376a73ea 100644 --- a/pinaxcon/templates/registrasion/review.html +++ b/pinaxcon/templates/registrasion/review.html @@ -1,6 +1,6 @@ {% extends "registrasion/base.html" %} {% load registrasion_tags %} -{% load pyconau2017_tags %} +{% load lca2018_tags %} {% block header_title %}Review your selection{% endblock %} {% block header_inset_image %}{% illustration "wineglass.svg" %}{% endblock %} @@ -33,8 +33,8 @@ {% missing_categories as missing %} {% if missing %} - -

+

+

You have not selected anything from the following categories. If your ticket includes any of these, you still need to make a selection: @@ -42,7 +42,7 @@

{% include "registrasion/_category_list.html" with categories=missing %} - +
{% endif %}

@@ -58,7 +58,7 @@ the dashboard.

- + Check out and pay Return to dashboard diff --git a/pinaxcon/templates/registrasion/stripe/credit_card_payment.html b/pinaxcon/templates/registrasion/stripe/credit_card_payment.html index 33b1a9e0..c35b96bf 100644 --- a/pinaxcon/templates/registrasion/stripe/credit_card_payment.html +++ b/pinaxcon/templates/registrasion/stripe/credit_card_payment.html @@ -1,6 +1,6 @@ {% extends "registrasion/base.html" %} {% load registrasion_tags %} -{% load pyconau2017_tags %} +{% load lca2018_tags %} {% block scripts %} diff --git a/pinaxcon/templates/registrasion/stripe/js/form_handler.js b/pinaxcon/templates/registrasion/stripe/js/form_handler.js new file mode 100644 index 00000000..057da37f --- /dev/null +++ b/pinaxcon/templates/registrasion/stripe/js/form_handler.js @@ -0,0 +1,68 @@ +var stripe = Stripe('{{ PINAX_STRIPE_PUBLIC_KEY }}'); +var elements = stripe.elements(); + +function stripeify(elementId) { + var element = elements.create(elementId); + element.mount('#' + elementId); + + var htmlElement = document.getElementById(elementId); + var errors = elementId + "-errors"; + htmlElement.insertAdjacentHTML("afterend", ""); + var displayError = document.getElementById(errors); + + //Handle real-time validation errors from the card Element. + element.addEventListener('change', function(event) { + toggleErrorMessage(displayError, event.error); + }); + + // Create a token or display an error when the form is submitted. + var paymentForm = document.getElementById('payment-form'); + paymentForm.addEventListener('submit', function(event) { + event.preventDefault(); + + stripe.createToken(element).then(function(result) { + if (result.error) { + // Inform the user if there was an error + toggleErrorMessage(displayError, result.error); + } else { + // Send the token to your server + stripeTokenHandler(result.token); + } + }); + }); +} + +function toggleErrorMessage(errorElement, maybeError) { + errorClass = inputErrorClassName(); + if (maybeError) { + errorElement.textContent = maybeError.message; + errorElement.parentNode.classList.add(errorClass); + } else { + errorElement.textContent = ''; + errorElement.parentNode.classList.remove(errorClass); + } +} + + +function inputErrorClassName() { + return {% block form_control_error_class %}"has-error"{% endblock %}; +} + + +function stripeTokenHandler(token) { + // Insert the token ID into the form so it gets submitted to the server + + var form = document.getElementById('payment-form'); + tokenHolder = form.getElementsByClassName('registrasion-stripe-token')[0]; + inputId = tokenHolder.dataset.inputId; + + var hiddenInput = document.createElement('input'); + hiddenInput.setAttribute('type', 'hidden'); + hiddenInput.setAttribute('name', inputId); + hiddenInput.setAttribute('value', token.id); + + tokenHolder.appendChild(hiddenInput); + + // Submit the form + form.submit(); +} diff --git a/pinaxcon/templates/symposion/proposals/_proposal_fields.html b/pinaxcon/templates/symposion/proposals/_proposal_fields.html index 86940b0b..dd9f4925 100644 --- a/pinaxcon/templates/symposion/proposals/_proposal_fields.html +++ b/pinaxcon/templates/symposion/proposals/_proposal_fields.html @@ -1,5 +1,5 @@ {% load i18n %} -{% load pyconau2017_tags %} +{% load lca2018_tags %}
diff --git a/pinaxcon/templates/symposion/schedule/_grid.html b/pinaxcon/templates/symposion/schedule/_grid.html index f5899cd5..eee236b7 100644 --- a/pinaxcon/templates/symposion/schedule/_grid.html +++ b/pinaxcon/templates/symposion/schedule/_grid.html @@ -1,4 +1,4 @@ -{% load pyconau2017_tags %} +{% load lca2018_tags %} diff --git a/pinaxcon/templates/symposion/schedule/presentation_detail.html b/pinaxcon/templates/symposion/schedule/presentation_detail.html index cd19cb40..16626ab8 100644 --- a/pinaxcon/templates/symposion/schedule/presentation_detail.html +++ b/pinaxcon/templates/symposion/schedule/presentation_detail.html @@ -1,6 +1,6 @@ {% extends "symposion/schedule/public_base.html" %} -{% load pyconau2017_tags %} +{% load lca2018_tags %} {% load sitetree %} {% load staticfiles %} {% load thumbnail %} @@ -11,7 +11,7 @@ {% block header_inset_image %}{% with audience=presentation.proposal.get_target_audience_display %}{% if audience == "Business" %}{% illustration "falls.svg" %}{% elif audience == "Community" %}{% illustration "bridge.svg" %}{% elif audience == "Developer"%}{% illustration "hobart.svg" %}{% elif audience == "User" %}{% illustration "antarctica.svg" %}{% else %}{% illustration "casino.svg" %}{% endif %}{% endwith %}{% endblock %} -{% block header_background_image %}{% presentation_bg_number presentation 4 as bg_number %}{% if bg_number == 0 %}{% static "pyconau2017/images/mt_anne_bg_optimised.jpg" %}{% elif bg_number == 1 %}{% static "pyconau2017/images/the_neck_bg_optimised.jpg" %}{% elif bg_number == 2 %}{% static "pyconau2017/images/snug_falls_bg_optimised.jpg" %}{% elif bg_number == 3 %}{% static "pyconau2017/images/sleepy_bay_bg_optimised.jpg" %}{% endif %}{% endblock %} +{% block header_background_image %}{% presentation_bg_number presentation 4 as bg_number %}{% if bg_number == 0 %}{% static "lca2018/images/mt_anne_bg_optimised.jpg" %}{% elif bg_number == 1 %}{% static "lca2018/images/the_neck_bg_optimised.jpg" %}{% elif bg_number == 2 %}{% static "lca2018/images/snug_falls_bg_optimised.jpg" %}{% elif bg_number == 3 %}{% static "lca2018/images/sleepy_bay_bg_optimised.jpg" %}{% endif %}{% endblock %} {% block header_title %}{{ presentation.title }}{% endblock %} diff --git a/pinaxcon/templates/symposion/schedule/public_base.html b/pinaxcon/templates/symposion/schedule/public_base.html index 1de13708..e2b6668b 100644 --- a/pinaxcon/templates/symposion/schedule/public_base.html +++ b/pinaxcon/templates/symposion/schedule/public_base.html @@ -3,5 +3,5 @@ {% load staticfiles %} {% comment %} -{% block header_background_image %}{% static "pyconau2017/images/hobart_bg_optimised.jpg" %}{% endblock %} +{% block header_background_image %}{% static "lca2018/images/hobart_bg_optimised.jpg" %}{% endblock %} {% endcomment %} diff --git a/pinaxcon/templates/symposion/schedule/schedule_conference.html b/pinaxcon/templates/symposion/schedule/schedule_conference.html index ee075e76..7b8d92bf 100644 --- a/pinaxcon/templates/symposion/schedule/schedule_conference.html +++ b/pinaxcon/templates/symposion/schedule/schedule_conference.html @@ -2,7 +2,7 @@ {% load i18n %} {% load cache %} -{% load pyconau2017_tags %} +{% load lca2018_tags %} {% block head_title %}Conference Schedule{% endblock %} {% block header_title %}Conference Schedule{% endblock %} @@ -57,16 +57,16 @@ fragment = window.location.hash.toLowerCase().substring(1); if (!fragment) { - OFFSET = -11 * (60 * 60 * 1000); // Hobart is 11 hours ahead of UTC in Jan. + OFFSET = -11 * (60 * 60 * 1000); // Sydney is 11 hours ahead of UTC in Jan. JAN = 0; // because January is 0, not 1 fragments = [ - {"day": "monday", "time": Date.UTC(2017, JAN, 16)}, - {"day": "tuesday", "time": Date.UTC(2017, JAN, 17)}, - {"day": "wednesday", "time": Date.UTC(2017, JAN, 18)}, - {"day": "thursday", "time": Date.UTC(2017, JAN, 19)}, - {"day": "friday", "time": Date.UTC(2017, JAN, 20)}, - {"day": "saturday", "time": Date.UTC(2017, JAN, 21)}, + {"day": "monday", "time": Date.UTC(2018, JAN, 22)}, + {"day": "tuesday", "time": Date.UTC(2018, JAN, 23)}, + {"day": "wednesday", "time": Date.UTC(2018, JAN, 24)}, + {"day": "thursday", "time": Date.UTC(2018, JAN, 25)}, + {"day": "friday", "time": Date.UTC(2018, JAN, 26)}, + {"day": "saturday", "time": Date.UTC(2018, JAN, 27)}, ]; now = new Date().getTime(); diff --git a/pinaxcon/templates/symposion/schedule/schedule_detail.html b/pinaxcon/templates/symposion/schedule/schedule_detail.html index 0b83d66e..abb2b776 100644 --- a/pinaxcon/templates/symposion/schedule/schedule_detail.html +++ b/pinaxcon/templates/symposion/schedule/schedule_detail.html @@ -2,7 +2,7 @@ {% load i18n %} {% load cache %} -{% load pyconau2017_tags %} +{% load lca2018_tags %} {% load sitetree %} {% block head_title %}{{ schedule.section }} Schedule{% endblock %} diff --git a/pinaxcon/templates/symposion/schedule/schedule_list.html b/pinaxcon/templates/symposion/schedule/schedule_list.html index 565a8ff0..f2ac9364 100644 --- a/pinaxcon/templates/symposion/schedule/schedule_list.html +++ b/pinaxcon/templates/symposion/schedule/schedule_list.html @@ -2,7 +2,7 @@ {% load i18n %} {% load cache %} -{% load pyconau2017_tags %} +{% load lca2018_tags %} {% load sitetree %} {% block head_title %}Presentation Listing{% endblock %} diff --git a/pinaxcon/templates/symposion/speakers/speaker_profile.html b/pinaxcon/templates/symposion/speakers/speaker_profile.html index f1221e59..ee3b49ed 100644 --- a/pinaxcon/templates/symposion/speakers/speaker_profile.html +++ b/pinaxcon/templates/symposion/speakers/speaker_profile.html @@ -1,7 +1,7 @@ {% extends "symposion/schedule/public_base.html" %} {% load i18n %} -{% load pyconau2017_tags %} +{% load lca2018_tags %} {% load thumbnail %} {% if speaker.photo %} diff --git a/pinaxcon/templates/symposion/sponsorship/_sponsor_link.html b/pinaxcon/templates/symposion/sponsorship/_sponsor_link.html index 0b9bcd8d..2859683d 100644 --- a/pinaxcon/templates/symposion/sponsorship/_sponsor_link.html +++ b/pinaxcon/templates/symposion/sponsorship/_sponsor_link.html @@ -1,4 +1,4 @@ -{% load pyconau2017_tags %} +{% load lca2018_tags %} {% spaceless %} diff --git a/pinaxcon/templates/symposion/sponsorship/list.html b/pinaxcon/templates/symposion/sponsorship/list.html index cb5d1c5a..6b5c285a 100644 --- a/pinaxcon/templates/symposion/sponsorship/list.html +++ b/pinaxcon/templates/symposion/sponsorship/list.html @@ -1,7 +1,7 @@ {% extends "site_base.html" %} {% load sponsorship_tags %} -{% load pyconau2017_tags %} +{% load lca2018_tags %} {% load i18n %} {% block head_title %}{% trans "About Our Sponsors" %}{% endblock %} diff --git a/pinaxcon/templatetags/lca2017_tags.py b/pinaxcon/templatetags/lca2018_tags.py similarity index 93% rename from pinaxcon/templatetags/lca2017_tags.py rename to pinaxcon/templatetags/lca2018_tags.py index 4e142983..02b624a7 100644 --- a/pinaxcon/templatetags/lca2017_tags.py +++ b/pinaxcon/templatetags/lca2018_tags.py @@ -34,11 +34,9 @@ def proposal_permission(context, permname, proposal): return context.request.user.has_perm(perm) -# {% load statictags %}{% static 'pyconau2017/images/svgs/illustrations/' %}{{ illustration }} - @register.simple_tag(takes_context=False) def illustration(name): - return staticfiles.static('pyconau2017/images/svgs/illustrations/') + name + return staticfiles.static('lca2018/images/svgs/illustrations/') + name @register.simple_tag(takes_context=True) diff --git a/pinaxcon/templatetags/pyconau2017_tags.py b/pinaxcon/templatetags/pyconau2017_tags.py deleted file mode 100644 index 894b077f..00000000 --- a/pinaxcon/templatetags/pyconau2017_tags.py +++ /dev/null @@ -1,100 +0,0 @@ -import hashlib - -import os - -from decimal import Decimal -from django import template -from django.conf import settings -from django.contrib.staticfiles.templatetags import staticfiles -from easy_thumbnails.files import get_thumbnailer -from symposion.conference import models as conference_models -from symposion.schedule.models import Track - -CONFERENCE_ID = settings.CONFERENCE_ID - -register = template.Library() - - -@register.assignment_tag() -def classname(ob): - return ob.__class__.__name__ - - -@register.simple_tag(takes_context=True) -def can_manage(context, proposal): - return proposal_permission(context, "manage", proposal) - - -@register.simple_tag(takes_context=True) -def can_review(context, proposal): - return proposal_permission(context, "review", proposal) - - -def proposal_permission(context, permname, proposal): - slug = proposal.kind.section.slug - perm = "reviews.can_%s_%s" % (permname, slug) - return context.request.user.has_perm(perm) - - -# {% load statictags %}{% static 'pyconau2017/images/svgs/illustrations/' %}{{ illustration }} - -@register.simple_tag(takes_context=False) -def illustration(name): - return staticfiles.static('pyconau2017/images/svgs/illustrations/') + name - - -@register.simple_tag(takes_context=True) -def speaker_photo(context, speaker, size): - ''' Provides the speaker profile, or else fall back to libravatar or gravatar. ''' - - if speaker.photo: - thumbnailer = get_thumbnailer(speaker.photo) - thumbnail_options = {'crop': True, 'size': (size, size)} - thumbnail = thumbnailer.get_thumbnail(thumbnail_options) - return thumbnail.url - else: - email = speaker.user.email.encode("utf-8") - md5sum = hashlib.md5(email.strip().lower()).hexdigest() - fallback_image = ("https://2017.pycon-au.org/site_media/static" - "/pyconau23017/images/speaker-fallback-devil.jpg") - url = "https://secure.gravatar.com/avatar/%s?s=%d&d=%s" % (md5sum, size, fallback_image) - - return url - - -@register.simple_tag() -def define(value): - return value - - -@register.simple_tag() -def presentation_bg_number(presentation, count): - return sum(ord(i) for i in presentation.title) % count - - -@register.filter() -def gst(amount): - two_places = Decimal(10) ** -2 - return Decimal(amount / 11).quantize(two_places) - - -@register.simple_tag() -def conference_name(): - return conference_models.Conference.objects.get(id=CONFERENCE_ID).title - - -@register.filter() -def trackname(room, day): - try: - track_name = room.track_set.get(day=day).name - except Track.DoesNotExist: - track_name = None - return track_name - - -@register.simple_tag() -def sponsor_thumbnail(sponsor_logo): - if sponsor_logo is not None: - if sponsor_logo.upload: - return sponsor_logo.upload.url - return "" diff --git a/static/src/css/app.css b/static/src/css/app.css index 97289099..754519a8 100644 --- a/static/src/css/app.css +++ b/static/src/css/app.css @@ -107,3 +107,29 @@ div.system-message p.system-message-title { font-size: 12px; padding: 5px 0 0 12px; } + +/** + * The CSS shown here will not be introduced in the Quickstart guide, but shows + * how you can use CSS to style your Element's container. + */ +.StripeElement { + background-color: white; + padding: 8px 12px; + border-radius: 4px; + border: 3px solid transparent; + box-shadow: 1px 3px 5px 1px #e6ebf1; + -webkit-transition: box-shadow 150ms ease; + transition: box-shadow 150ms ease; +} + +.StripeElement--focus { + box-shadow: 1px 3px 5px 1px #cfd7df; +} + +.StripeElement--invalid { + border-color: #fa755a; +} + +.StripeElement--webkit-autofill { + background-color: #fefde5 !important; +} diff --git a/static/src/js/site-92ae8d0d6c.js b/static/src/js/site-92ae8d0d6c.js deleted file mode 100644 index 9ae21479..00000000 --- a/static/src/js/site-92ae8d0d6c.js +++ /dev/null @@ -1,38 +0,0 @@ -!function t(e,n,i){function o(s,a){if(!n[s]){if(!e[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(r)return r(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[s]={exports:{}};e[s][0].call(c.exports,function(t){var n=e[s][1][t];return o(n?n:t)},c,c.exports,t,e,n,i)}return n[s].exports}for(var r="function"==typeof require&&require,s=0;so?"top":!1;if("bottom"==this.affixed)return null!=n?o+this.unpin<=r.top?!1:"bottom":t-i>=o+s?!1:"bottom";var a=null==this.affixed,l=a?o:r.top,u=a?s:e;return null!=n&&n>=o?"top":null!=i&&l+u>=t-i?"bottom":!1},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},n.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),i=this.options.offset,o=i.top,r=i.bottom,s=Math.max(t(document).height(),t(document.body).height());"object"!=typeof i&&(r=o=i),"function"==typeof o&&(o=i.top(this.$element)),"function"==typeof r&&(r=i.bottom(this.$element));var a=this.getState(s,e,o,r);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var l="affix"+(a?"-"+a:""),u=t.Event(l+".bs.affix");if(this.$element.trigger(u),u.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-e-r})}};var i=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=n,t.fn.affix.noConflict=function(){return t.fn.affix=i,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var n=t(this),i=n.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),e.call(n,i)})})}(jQuery)},{}],3:[function(t,e,n){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.alert");o||n.data("bs.alert",o=new i(this)),"string"==typeof e&&o[e].call(n)})}var n='[data-dismiss="alert"]',i=function(e){t(e).on("click",n,this.close)};i.VERSION="3.3.6",i.TRANSITION_DURATION=150,i.prototype.close=function(e){function n(){s.detach().trigger("closed.bs.alert").remove()}var o=t(this),r=o.attr("data-target");r||(r=o.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var s=t(r);e&&e.preventDefault(),s.length||(s=o.closest(".alert")),s.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(s.removeClass("in"),t.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",n).emulateTransitionEnd(i.TRANSITION_DURATION):n())};var o=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=i,t.fn.alert.noConflict=function(){return t.fn.alert=o,this},t(document).on("click.bs.alert.data-api",n,i.prototype.close)}(jQuery)},{}],4:[function(t,e,n){+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.button"),r="object"==typeof e&&e;o||i.data("bs.button",o=new n(this,r)),"toggle"==e?o.toggle():e&&o.setState(e)})}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.isLoading=!1};n.VERSION="3.3.6",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(e){var n="disabled",i=this.$element,o=i.is("input")?"val":"html",r=i.data();e+="Text",null==r.resetText&&i.data("resetText",i[o]()),setTimeout(t.proxy(function(){i[o](null==r[e]?this.options[e]:r[e]),"loadingText"==e?(this.isLoading=!0,i.addClass(n).attr(n,n)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var i=t.fn.button;t.fn.button=e,t.fn.button.Constructor=n,t.fn.button.noConflict=function(){return t.fn.button=i,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var i=t(n.target);i.hasClass("btn")||(i=i.closest(".btn")),e.call(i,"toggle"),t(n.target).is('input[type="radio"]')||t(n.target).is('input[type="checkbox"]')||n.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery)},{}],5:[function(t,e,n){+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.carousel"),r=t.extend({},n.DEFAULTS,i.data(),"object"==typeof e&&e),s="string"==typeof e?e:r.slide;o||i.data("bs.carousel",o=new n(this,r)),"number"==typeof e?o.to(e):s?o[s]():r.interval&&o.pause().cycle()})}var n=function(e,n){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};n.VERSION="3.3.6",n.TRANSITION_DURATION=600,n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},n.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},n.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},n.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},n.prototype.getItemForDirection=function(t,e){var n=this.getItemIndex(e),i="prev"==t&&0===n||"next"==t&&n==this.$items.length-1;if(i&&!this.options.wrap)return e;var o="prev"==t?-1:1,r=(n+o)%this.$items.length;return this.$items.eq(r)},n.prototype.to=function(t){var e=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));return t>this.$items.length-1||0>t?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",this.$items.eq(t))},n.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){return this.sliding?void 0:this.slide("next")},n.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},n.prototype.slide=function(e,i){var o=this.$element.find(".item.active"),r=i||this.getItemForDirection(e,o),s=this.interval,a="next"==e?"left":"right",l=this;if(r.hasClass("active"))return this.sliding=!1;var u=r[0],c=t.Event("slide.bs.carousel",{relatedTarget:u,direction:a});if(this.$element.trigger(c),!c.isDefaultPrevented()){if(this.sliding=!0,s&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var f=t(this.$indicators.children()[this.getItemIndex(r)]);f&&f.addClass("active")}var p=t.Event("slid.bs.carousel",{relatedTarget:u,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(r.addClass(e),r[0].offsetWidth,o.addClass(a),r.addClass(a),o.one("bsTransitionEnd",function(){r.removeClass([e,a].join(" ")).addClass("active"),o.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(p)},0)}).emulateTransitionEnd(n.TRANSITION_DURATION)):(o.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger(p)),s&&this.cycle(),this}};var i=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=n,t.fn.carousel.noConflict=function(){return t.fn.carousel=i,this};var o=function(n){var i,o=t(this),r=t(o.attr("data-target")||(i=o.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""));if(r.hasClass("carousel")){var s=t.extend({},r.data(),o.data()),a=o.attr("data-slide-to");a&&(s.interval=!1),e.call(r,s),a&&r.data("bs.carousel").to(a),n.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",o).on("click.bs.carousel.data-api","[data-slide-to]",o),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var n=t(this);e.call(n,n.data())})})}(jQuery)},{}],6:[function(t,e,n){+function(t){"use strict";function e(e){var n,i=e.attr("data-target")||(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return t(i)}function n(e){return this.each(function(){var n=t(this),o=n.data("bs.collapse"),r=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e);!o&&r.toggle&&/show|hide/.test(e)&&(r.toggle=!1),o||n.data("bs.collapse",o=new i(this,r)),"string"==typeof e&&o[e]()})}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};i.VERSION="3.3.6",i.TRANSITION_DURATION=350,i.DEFAULTS={toggle:!0},i.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,o=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(o&&o.length&&(e=o.data("bs.collapse"),e&&e.transitioning))){var r=t.Event("show.bs.collapse");if(this.$element.trigger(r),!r.isDefaultPrevented()){o&&o.length&&(n.call(o,"hide"),e||o.data("bs.collapse",null));var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[s](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[s](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var l=t.camelCase(["scroll",s].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(i.TRANSITION_DURATION)[s](this.$element[0][l])}}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var o=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[n](0).one("bsTransitionEnd",t.proxy(o,this)).emulateTransitionEnd(i.TRANSITION_DURATION):o.call(this)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},i.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(n,i){var o=t(i);this.addAriaAndCollapsedClass(e(o),o)},this)).end()},i.prototype.addAriaAndCollapsedClass=function(t,e){var n=t.hasClass("in");t.attr("aria-expanded",n),e.toggleClass("collapsed",!n).attr("aria-expanded",n)};var o=t.fn.collapse;t.fn.collapse=n,t.fn.collapse.Constructor=i,t.fn.collapse.noConflict=function(){return t.fn.collapse=o,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(i){var o=t(this);o.attr("data-target")||i.preventDefault();var r=e(o),s=r.data("bs.collapse"),a=s?"toggle":o.data();n.call(r,a)})}(jQuery)},{}],7:[function(t,e,n){+function(t){"use strict";function e(e){var n=e.attr("data-target");n||(n=e.attr("href"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i=n&&t(n);return i&&i.length?i:e.parent()}function n(n){n&&3===n.which||(t(o).remove(),t(r).each(function(){var i=t(this),o=e(i),r={relatedTarget:this};o.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(o[0],n.target)||(o.trigger(n=t.Event("hide.bs.dropdown",r)),n.isDefaultPrevented()||(i.attr("aria-expanded","false"),o.removeClass("open").trigger(t.Event("hidden.bs.dropdown",r)))))}))}function i(e){return this.each(function(){var n=t(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new s(this)),"string"==typeof e&&i[e].call(n)})}var o=".dropdown-backdrop",r='[data-toggle="dropdown"]',s=function(e){t(e).on("click.bs.dropdown",this.toggle)};s.VERSION="3.3.6",s.prototype.toggle=function(i){var o=t(this);if(!o.is(".disabled, :disabled")){var r=e(o),s=r.hasClass("open");if(n(),!s){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",n);var a={relatedTarget:this};if(r.trigger(i=t.Event("show.bs.dropdown",a)),i.isDefaultPrevented())return;o.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},s.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var i=t(this);if(n.preventDefault(),n.stopPropagation(),!i.is(".disabled, :disabled")){var o=e(i),s=o.hasClass("open");if(!s&&27!=n.which||s&&27==n.which)return 27==n.which&&o.find(r).trigger("focus"),i.trigger("click");var a=" li:not(.disabled):visible a",l=o.find(".dropdown-menu"+a);if(l.length){var u=l.index(n.target);38==n.which&&u>0&&u--,40==n.which&&udocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth

'}),n.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),n.prototype.constructor=n,n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),n=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var i=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=n,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(jQuery)},{}],10:[function(t,e,n){+function(t){"use strict";function e(n,i){this.$body=t(document.body),this.$scrollElement=t(t(n).is(document.body)?window:n),this.options=t.extend({},e.DEFAULTS,i),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each(function(){var i=t(this),o=i.data("bs.scrollspy"),r="object"==typeof n&&n;o||i.data("bs.scrollspy",o=new e(this,r)),"string"==typeof n&&o[n]()})}e.VERSION="3.3.6",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,n="offset",i=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(n="position",i=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),o=e.data("target")||e.attr("href"),r=/^#./.test(o)&&t(o);return r&&r.length&&r.is(":visible")&&[[r[n]().top+i,o]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),i=this.options.offset+n-this.$scrollElement.height(),o=this.offsets,r=this.targets,s=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),e>=i)return s!=(t=r[r.length-1])&&this.activate(t);if(s&&e=o[t]&&(void 0===o[t+1]||e .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),o&&o()}var s=i.find("> .active"),a=o&&t.support.transition&&(s.length&&s.hasClass("fade")||!!i.find("> .fade").length);s.length&&a?s.one("bsTransitionEnd",r).emulateTransitionEnd(n.TRANSITION_DURATION):r(),s.removeClass("in")};var i=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=n,t.fn.tab.noConflict=function(){return t.fn.tab=i,this};var o=function(n){n.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',o).on("click.bs.tab.data-api",'[data-toggle="pill"]',o)}(jQuery)},{}],12:[function(t,e,n){+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.tooltip"),r="object"==typeof e&&e;!o&&/destroy|hide/.test(e)||(o||i.data("bs.tooltip",o=new n(this,r)),"string"==typeof e&&o[e]())})}var n=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};n.VERSION="3.3.6",n.TRANSITION_DURATION=150,n.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},n.prototype.init=function(e,n,i){if(this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),r=o.length;r--;){var s=o[r];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",l="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},n.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,function(t,i){n[t]!=i&&(e[t]=i)}),e},n.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusin"==e.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState?void(n.hoverState="in"):(clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show())},n.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},n.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusout"==e.type?"focus":"hover"]=!1),n.isInStateTrue()?void 0:(clearTimeout(n.timeout),n.hoverState="out",n.options.delay&&n.options.delay.hide?void(n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)):n.hide())},n.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var i=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!i)return;var o=this,r=this.tip(),s=this.getUID(this.type);this.setContent(),r.attr("id",s),this.$element.attr("aria-describedby",s),this.options.animation&&r.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,u=l.test(a);u&&(a=a.replace(l,"")||"top"), -r.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),f=r[0].offsetWidth,p=r[0].offsetHeight;if(u){var d=a,h=this.getPosition(this.$viewport);a="bottom"==a&&c.bottom+p>h.bottom?"top":"top"==a&&c.top-ph.width?"left":"left"==a&&c.left-fs.top+s.height&&(o.top=s.top+s.height-l)}else{var u=e.left-r,c=e.left+r+n;us.right&&(o.left=s.left+s.width-c)}return o},n.prototype.getTitle=function(){var t,e=this.$element,n=this.options;return t=e.attr("data-original-title")||("function"==typeof n.title?n.title.call(e[0]):n.title)},n.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},n.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},n.prototype.enable=function(){this.enabled=!0},n.prototype.disable=function(){this.enabled=!1},n.prototype.toggleEnabled=function(){this.enabled=!this.enabled},n.prototype.toggle=function(e){var n=this;e&&(n=t(e.currentTarget).data("bs."+this.type),n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),e?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},n.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null})};var i=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=n,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=i,this}}(jQuery)},{}],13:[function(t,e,n){+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}t.fn.emulateTransitionEnd=function(e){var n=!1,i=this;t(this).one("bsTransitionEnd",function(){n=!0});var o=function(){n||t(i).trigger(t.support.transition.end)};return setTimeout(o,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery)},{}],14:[function(t,e,n){!function(t,n){"object"==typeof e&&"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(t)}("undefined"!=typeof window?window:this,function(t,e){function n(t){var e=!!t&&"length"in t&&t.length,n=rt.type(t);return"function"===n||rt.isWindow(t)?!1:"array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t}function i(t,e,n){if(rt.isFunction(e))return rt.grep(t,function(t,i){return!!e.call(t,i,t)!==n});if(e.nodeType)return rt.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(gt.test(e))return rt.filter(e,t,n);e=rt.filter(e,t)}return rt.grep(t,function(t){return Z.call(e,t)>-1!==n})}function o(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function r(t){var e={};return rt.each(t.match(wt)||[],function(t,n){e[n]=!0}),e}function s(){Y.removeEventListener("DOMContentLoaded",s),t.removeEventListener("load",s),rt.ready()}function a(){this.expando=rt.expando+a.uid++}function l(t,e,n){var i;if(void 0===n&&1===t.nodeType)if(i="data-"+e.replace(Nt,"-$&").toLowerCase(),n=t.getAttribute(i),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:St.test(n)?rt.parseJSON(n):n}catch(o){}$t.set(t,e,n)}else n=void 0;return n}function u(t,e,n,i){var o,r=1,s=20,a=i?function(){return i.cur()}:function(){return rt.css(t,e,"")},l=a(),u=n&&n[3]||(rt.cssNumber[e]?"":"px"),c=(rt.cssNumber[e]||"px"!==u&&+l)&&jt.exec(rt.css(t,e));if(c&&c[3]!==u){u=u||c[3],n=n||[],c=+l||1;do r=r||".5",c/=r,rt.style(t,e,c+u);while(r!==(r=a()/l)&&1!==r&&--s)}return n&&(c=+c||+l||0,o=n[1]?c+(n[1]+1)*n[2]:+n[2],i&&(i.unit=u,i.start=c,i.end=o)),o}function c(t,e){var n="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e||"*"):"undefined"!=typeof t.querySelectorAll?t.querySelectorAll(e||"*"):[];return void 0===e||e&&rt.nodeName(t,e)?rt.merge([t],n):n}function f(t,e){for(var n=0,i=t.length;i>n;n++)kt.set(t[n],"globalEval",!e||kt.get(e[n],"globalEval"))}function p(t,e,n,i,o){for(var r,s,a,l,u,p,d=e.createDocumentFragment(),h=[],g=0,v=t.length;v>g;g++)if(r=t[g],r||0===r)if("object"===rt.type(r))rt.merge(h,r.nodeType?[r]:r);else if(Ht.test(r)){for(s=s||d.appendChild(e.createElement("div")),a=(Lt.exec(r)||["",""])[1].toLowerCase(),l=qt[a]||qt._default,s.innerHTML=l[1]+rt.htmlPrefilter(r)+l[2],p=l[0];p--;)s=s.lastChild;rt.merge(h,s.childNodes),s=d.firstChild,s.textContent=""}else h.push(e.createTextNode(r));for(d.textContent="",g=0;r=h[g++];)if(i&&rt.inArray(r,i)>-1)o&&o.push(r);else if(u=rt.contains(r.ownerDocument,r),s=c(d.appendChild(r),"script"),u&&f(s),n)for(p=0;r=s[p++];)Rt.test(r.type||"")&&n.push(r);return d}function d(){return!0}function h(){return!1}function g(){try{return Y.activeElement}catch(t){}}function v(t,e,n,i,o,r){var s,a;if("object"==typeof e){"string"!=typeof n&&(i=i||n,n=void 0);for(a in e)v(t,a,n,i,e[a],r);return t}if(null==i&&null==o?(o=n,i=n=void 0):null==o&&("string"==typeof n?(o=i,i=void 0):(o=i,i=n,n=void 0)),o===!1)o=h;else if(!o)return t;return 1===r&&(s=o,o=function(t){return rt().off(t),s.apply(this,arguments)},o.guid=s.guid||(s.guid=rt.guid++)),t.each(function(){rt.event.add(this,e,o,i,n)})}function m(t,e){return rt.nodeName(t,"table")&&rt.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function y(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function b(t){var e=Ut.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function x(t,e){var n,i,o,r,s,a,l,u;if(1===e.nodeType){if(kt.hasData(t)&&(r=kt.access(t),s=kt.set(e,r),u=r.events)){delete s.handle,s.events={};for(o in u)for(n=0,i=u[o].length;i>n;n++)rt.event.add(e,o,u[o][n])}$t.hasData(t)&&(a=$t.access(t),l=rt.extend({},a),$t.set(e,l))}}function w(t,e){var n=e.nodeName.toLowerCase();"input"===n&&It.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function T(t,e,n,i){e=K.apply([],e);var o,r,s,a,l,u,f=0,d=t.length,h=d-1,g=e[0],v=rt.isFunction(g);if(v||d>1&&"string"==typeof g&&!it.checkClone&&Bt.test(g))return t.each(function(o){var r=t.eq(o);v&&(e[0]=g.call(this,o,r.html())),T(r,e,n,i)});if(d&&(o=p(e,t[0].ownerDocument,!1,t,i),r=o.firstChild,1===o.childNodes.length&&(o=r),r||i)){for(s=rt.map(c(o,"script"),y),a=s.length;d>f;f++)l=o,f!==h&&(l=rt.clone(l,!0,!0),a&&rt.merge(s,c(l,"script"))),n.call(t[f],l,f);if(a)for(u=s[s.length-1].ownerDocument,rt.map(s,b),f=0;a>f;f++)l=s[f],Rt.test(l.type||"")&&!kt.access(l,"globalEval")&&rt.contains(u,l)&&(l.src?rt._evalUrl&&rt._evalUrl(l.src):rt.globalEval(l.textContent.replace(zt,"")))}return t}function C(t,e,n){for(var i,o=e?rt.filter(e,t):t,r=0;null!=(i=o[r]);r++)n||1!==i.nodeType||rt.cleanData(c(i)),i.parentNode&&(n&&rt.contains(i.ownerDocument,i)&&f(c(i,"script")),i.parentNode.removeChild(i));return t}function E(t,e){var n=rt(e.createElement(t)).appendTo(e.body),i=rt.css(n[0],"display");return n.detach(),i}function k(t){var e=Y,n=Xt[t];return n||(n=E(t,e),"none"!==n&&n||(Vt=(Vt||rt("