From 9ea3a85582b0db5f8b685597ad16dbcc56463920 Mon Sep 17 00:00:00 2001 From: philippe vesin Date: Wed, 26 Jan 2022 12:01:50 +0100 Subject: [PATCH 1/2] refactor and add update position --- README.md | 2 +- src/Controller/PictogramController.php | 4 +- src/Controller/PictogramGroupController.php | 54 ++++++ src/DependencyInjection/Configuration.php | 3 +- src/Entity/PictogramGroup.php | 13 +- .../ProductsToPictogramGroupsTransformer.php | 177 ++++++++++++++++++ src/Menu/AdminMenuListener.php | 2 +- src/Model/PictogramGroupInterface.php | 5 - src/Resources/config/app/ui.yaml | 6 +- src/Resources/config/grids/pictogram.yaml | 112 +++++------ .../config/grids/pictogram_group.yaml | 2 + src/Resources/config/grids/templates.yaml | 3 +- src/Resources/config/routes/ajax/ajax.yaml | 6 +- .../config/routes/ajax/pictogram-group.yaml | 8 + src/Resources/config/routes/pictogram.yaml | 28 +-- .../config/services/data_transformer.yaml | 7 + .../config/services/event_listeners.yaml | 2 +- src/Resources/private/js/admin.js | 6 +- .../js/sylius-move-pictogram-groups.js | 40 ++++ ...t-variant.js => sylius-move-pictograms.js} | 0 src/Resources/public/admin-pictogram.min.js | 2 +- src/Resources/translations/messages.en.yaml | 2 +- .../translations/messages.en_US.yaml | 25 --- .../translations/messages.fr_FR.yaml | 25 --- .../Pictograms/Crud/Create/_content.html.twig | 4 +- .../Pictograms/Crud/Update/_content.html.twig | 4 +- .../{ => Pictogram}/updatePositions.html.twig | 3 +- .../PictogramGroup/updatePositions.html.twig | 9 + src/Traits/NamingTrait.php | 2 +- 29 files changed, 410 insertions(+), 146 deletions(-) create mode 100644 src/Controller/PictogramGroupController.php create mode 100644 src/Form/DataTransformer/ProductsToPictogramGroupsTransformer.php create mode 100644 src/Resources/config/routes/ajax/pictogram-group.yaml create mode 100644 src/Resources/config/services/data_transformer.yaml create mode 100644 src/Resources/private/js/sylius-move-pictogram-groups.js rename src/Resources/private/js/{sylius-move-product-variant.js => sylius-move-pictograms.js} (100%) delete mode 100644 src/Resources/translations/messages.en_US.yaml delete mode 100644 src/Resources/translations/messages.fr_FR.yaml rename src/Resources/views/Grid/Action/{ => Pictogram}/updatePositions.html.twig (85%) create mode 100644 src/Resources/views/Grid/Action/PictogramGroup/updatePositions.html.twig diff --git a/README.md b/README.md index 94f98e4..4dbfd32 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ class Product extends BaseProduct ## Usage 1. In the back office, under `Catalog`, enter `Pictogram Groups`. Create a group using a unique code -2. In `Pictogram Groups`, click `Modify Pictograms` to create/delete images for this group +2. In `Pictogram Groups`, click `Managing Pictograms` to create/delete images for this group 3. Go to a product's edit page, then click the `Pictograms` tab in the sidebar. Here you can toggle which pictograms you wish to display diff --git a/src/Controller/PictogramController.php b/src/Controller/PictogramController.php index c52ba38..e800a7f 100644 --- a/src/Controller/PictogramController.php +++ b/src/Controller/PictogramController.php @@ -3,8 +3,8 @@ namespace Asdoria\SyliusPictogramPlugin\Controller; +use Asdoria\SyliusPictogramPlugin\Model\PictogramInterface; use Sylius\Bundle\ResourceBundle\Controller\ResourceController; -use Sylius\Component\Core\Model\ProductVariantInterface; use Sylius\Component\Resource\ResourceActions; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; @@ -41,7 +41,7 @@ public function updatePositionsAction(Request $request): Response ); } - /** @var ProductVariantInterface $pictogram */ + /** @var PictogramInterface $pictogram */ $pictogram = $this->repository->findOneBy(['id' => $pictogramToUpdate['id']]); $pictogram->setPosition((int) $pictogramToUpdate['position']); $this->manager->flush(); diff --git a/src/Controller/PictogramGroupController.php b/src/Controller/PictogramGroupController.php new file mode 100644 index 0000000..579b7bb --- /dev/null +++ b/src/Controller/PictogramGroupController.php @@ -0,0 +1,54 @@ + + */ +class PictogramGroupController extends ResourceController +{ + /** + * @throws HttpException + */ + public function updatePositionsAction(Request $request): Response + { + $configuration = $this->requestConfigurationFactory->create($this->metadata, $request); + $this->isGrantedOr403($configuration, ResourceActions::UPDATE); + $pictogramGroupsToUpdate = $request->get('pictogramGroups'); + + if ($configuration->isCsrfProtectionEnabled() && !$this->isCsrfTokenValid('update-pictogram-group-position', $request->request->get('_csrf_token'))) { + throw new HttpException(Response::HTTP_FORBIDDEN, 'Invalid csrf token.'); + } + + if (in_array($request->getMethod(), ['POST', 'PUT', 'PATCH'], true) && null !== $pictogramGroupsToUpdate) { + foreach ($pictogramGroupsToUpdate as $pictogramGroupToUpdate) { + if (!is_numeric($pictogramGroupToUpdate['position'])) { + throw new HttpException( + Response::HTTP_NOT_ACCEPTABLE, + sprintf('The pictogramGroup position "%s" is invalid.', $pictogramGroupToUpdate['position']) + ); + } + + /** @var PictogramGroupInterface $pictogramGroup */ + $pictogramGroup = $this->repository->findOneBy(['id' => $pictogramGroupToUpdate['id']]); + $pictogramGroup->setPosition((int) $pictogramGroupToUpdate['position']); + $this->manager->flush(); + } + } + + return new JsonResponse(); + } +} diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index a81ebd3..3fabdd9 100755 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -4,6 +4,7 @@ namespace Asdoria\SyliusPictogramPlugin\DependencyInjection; use Asdoria\SyliusPictogramPlugin\Controller\PictogramController; +use Asdoria\SyliusPictogramPlugin\Controller\PictogramGroupController; use Asdoria\SyliusPictogramPlugin\Entity\Pictogram; use Asdoria\SyliusPictogramPlugin\Entity\PictogramGroup; use Asdoria\SyliusPictogramPlugin\Entity\PictogramGroupTranslation; @@ -69,7 +70,7 @@ private function addResourcesSection(ArrayNodeDefinition $node): void ->addDefaultsIfNotSet() ->children() ->scalarNode('model')->defaultValue(PictogramGroup::class)->cannotBeEmpty()->end() - ->scalarNode('controller')->defaultValue(ResourceController::class)->cannotBeEmpty()->end() + ->scalarNode('controller')->defaultValue(PictogramGroupController::class)->cannotBeEmpty()->end() ->scalarNode('repository')->defaultValue(PictogramGroupRepository::class)->end() ->scalarNode('factory')->defaultValue(Factory::class)->end() ->scalarNode('form')->defaultValue(PictogramGroupType::class)->cannotBeEmpty()->end() diff --git a/src/Entity/PictogramGroup.php b/src/Entity/PictogramGroup.php index 6ad0148..19ee568 100644 --- a/src/Entity/PictogramGroup.php +++ b/src/Entity/PictogramGroup.php @@ -23,7 +23,6 @@ class PictogramGroup implements PictogramGroupInterface { use ResourceTrait; use PictogramsTrait; - use NamingTrait; use CodeTrait; use SortableTrait; @@ -41,6 +40,18 @@ public function __construct() $this->initializePictogramsCollection(); } + /** + * @return string|null + */ + public function __toString() { + return $this->getName(); + } + + public function getName(): ?string + { + return $this->getTranslation()->getName(); + } + /** * @param null|string $locale * diff --git a/src/Form/DataTransformer/ProductsToPictogramGroupsTransformer.php b/src/Form/DataTransformer/ProductsToPictogramGroupsTransformer.php new file mode 100644 index 0000000..6a2e9b6 --- /dev/null +++ b/src/Form/DataTransformer/ProductsToPictogramGroupsTransformer.php @@ -0,0 +1,177 @@ + + */ +class ProductsToPictogramGroupsTransformer implements DataTransformerInterface +{ + /** @var FactoryInterface */ + private $pictogramFactory; + + /** @var ProductRepositoryInterface */ + private $productRepository; + + /** @var RepositoryInterface */ + private $pictogramGroupRepository; + + /** @var Collection */ + private $pictograms; + + /** + * ProductsToPictogramsTransformer constructor. + * + * @param FactoryInterface $pictogramFactory + * @param ProductRepositoryInterface $productRepository + * @param RepositoryInterface $pictogramGroupRepository + */ + public function __construct( + FactoryInterface $pictogramFactory, + ProductRepositoryInterface $productRepository, + RepositoryInterface $pictogramGroupRepository + ) + { + $this->pictogramFactory = $pictogramFactory; + $this->productRepository = $productRepository; + $this->pictogramGroupRepository = $pictogramGroupRepository; + } + + /** + * {@inheritdoc} + */ + public function transform($pictograms) + { + $this->setPictograms($pictograms); + + if (null === $pictograms) { + return ''; + } + + $values = []; + + /** @var PictogramInterface $pictogram */ + foreach ($pictograms as $pictogram) { + $values[$pictogram->getPictogramGroup()->getCode()] = $pictogram->getCode(); + } + + return $values; + } + + /** + * {@inheritdoc} + */ + public function reverseTransform($values): ?Collection + { + if (null === $values || '' === $values || !is_array($values)) { + return null; + } + + $pictograms = new ArrayCollection(); + foreach ($values as $pictogramGroupCode => $productCodes) { + if (null === $productCodes) { + continue; + } + + /** @var PictogramInterface $pictogram */ + $pictogram = $this->getPictogramByGroupCode($pictogramGroupCode); + $this->setAssociatedProductsByProductCodes($pictogram, $productCodes); + $pictograms->add($pictogram); + } + + $this->setPictograms(null); + + return $pictograms; + } + + /** + * @param Collection $products + * + * @return string|null + */ + private function getCodesAsStringFromProducts(Collection $products): ?string + { + if ($products->isEmpty()) { + return null; + } + + $codes = []; + + /** @var ProductInterface|ProductVariantInterface $product */ + foreach ($products as $product) { + $codes[] = $product->getCode(); + } + + return implode(',', $codes); + } + + /** + * @param string $pictogramGroupCode + * + * @return PictogramInterface + */ + private function getPictogramByGroupCode(string $pictogramGroupCode): PictogramInterface + { + /** @var PictogramInterface $pictogram */ + foreach ($this->pictograms as $pictogram) { + if ($pictogramGroupCode === $pictogram->getPictogramGroup()->getCode()) { + return $pictogram; + } + } + + /** @var PictogramGroupInterface $pictogramGroup */ + $pictogramGroup = $this->pictogramGroupRepository->findOneBy([ + 'code' => $pictogramGroupCode, + ]); + + /** @var PictogramInterface $pictogram */ + $pictogram = $this->pictogramFactory->createNew(); + $pictogram->setPictogramGroup($pictogramGroup); + + return $pictogram; + } + + /** + * @param PictogramInterface $pictogram + * @param string $productCodes + */ + private function setAssociatedProductsByProductCodes( + PictogramInterface $pictogram, + string $productCodes + ): void + { + $products = $this->productRepository->findBy(['code' => explode(',', $productCodes)]); + + foreach ($pictogram->getProducts() as $product) { + $pictogram->removeProduct($product); + } + + /** @var ProductInterface $product */ + foreach ($products as $product) { + $pictogram->addProduct($product); + } + } + + /** + * @param Collection|null $pictograms + */ + private function setPictograms(?Collection $pictograms): void + { + $this->pictograms = $pictograms; + } +} diff --git a/src/Menu/AdminMenuListener.php b/src/Menu/AdminMenuListener.php index 9ee6c75..26ebb72 100644 --- a/src/Menu/AdminMenuListener.php +++ b/src/Menu/AdminMenuListener.php @@ -40,7 +40,7 @@ private function addChild(ItemInterface $item): void ->addChild('pictogram_groups', [ 'route' => 'asdoria_admin_pictogram_group_index', ]) - ->setLabel('asdoria.ui.pictogram_groups') + ->setLabel('asdoria.menu.admin.main.pictogram_groups.header') ->setLabelAttribute('icon', 'building'); } } diff --git a/src/Model/PictogramGroupInterface.php b/src/Model/PictogramGroupInterface.php index 8c9ce0e..50cd818 100644 --- a/src/Model/PictogramGroupInterface.php +++ b/src/Model/PictogramGroupInterface.php @@ -22,11 +22,6 @@ interface PictogramGroupInterface extends ResourceInterface, PictogramsAwareInte */ public function getName(): ?string; - /** - * @param string|null $name - */ - public function setName(?string $name): void; - /** * @return int|null */ diff --git a/src/Resources/config/app/ui.yaml b/src/Resources/config/app/ui.yaml index 9cb3a36..694622a 100644 --- a/src/Resources/config/app/ui.yaml +++ b/src/Resources/config/app/ui.yaml @@ -32,7 +32,11 @@ sylius_ui: template: "@AsdoriaSyliusPictogramPlugin/Admin/_javascripts.html.twig" priority: 10 - + asdoria.admin.pictogram_group.index.javascripts: + blocks: + asdoria_pictogram_groups_javascripts: + template: "@AsdoriaSyliusPictogramPlugin/Admin/_javascripts.html.twig" + priority: 10 sylius.shop.product.show.content: blocks: diff --git a/src/Resources/config/grids/pictogram.yaml b/src/Resources/config/grids/pictogram.yaml index 586d85a..2a4c5d6 100644 --- a/src/Resources/config/grids/pictogram.yaml +++ b/src/Resources/config/grids/pictogram.yaml @@ -1,56 +1,56 @@ -sylius_grid: - grids: - sylius_admin_pictogram: - driver: - name: doctrine/orm - options: - class: '%asdoria.model.pictogram.class%' - repository: - method: createQueryBuilderByPictogramGroupId - arguments: [ "%locale%", $pictogramGroupId ] - sorting: - position: asc - fields: - image: - type: twig - label: sylius.ui.image - path: . - options: - template: "@AsdoriaSyliusPictogramPlugin/Grid/Field/pictogram_image.html.twig" - code: - type: string - label: sylius.ui.code - name: - type: string - label: sylius.ui.name - sortable: translations.name - pictogramGroup: - type: twig - label: asdoria.ui.pictogram_group - sortable: pictogramGroup - options: - template: "@AsdoriaSyliusPictogramPlugin/Grid/Field/pictogram_group.html.twig" - position: - type: twig - label: sylius.ui.position - path: . - sortable: position - options: - template: "@AsdoriaSyliusPictogramPlugin/Grid/Field/pictogram_position.html.twig" - actions: - main: - create: - type: create - update_positions: - type: update_product_variant_positions - item: - update: - type: update - delete: - type: delete - filters: - search: - type: string - label: sylius.ui.search - options: - fields: [ translations.name ] +#sylius_grid: +# grids: +# sylius_admin_pictogram: +# driver: +# name: doctrine/orm +# options: +# class: '%asdoria.model.pictogram.class%' +# repository: +# method: createQueryBuilderByPictogramGroupId +# arguments: [ "%locale%", $pictogramGroupId ] +# sorting: +# position: asc +# fields: +# image: +# type: twig +# label: sylius.ui.image +# path: . +# options: +# template: "@AsdoriaSyliusPictogramPlugin/Grid/Field/pictogram_image.html.twig" +# code: +# type: string +# label: sylius.ui.code +# name: +# type: string +# label: sylius.ui.name +# sortable: translations.name +# pictogramGroup: +# type: twig +# label: asdoria.ui.pictogram_group +# sortable: pictogramGroup +# options: +# template: "@AsdoriaSyliusPictogramPlugin/Grid/Field/pictogram_group.html.twig" +# position: +# type: twig +# label: sylius.ui.position +# path: . +# sortable: position +# options: +# template: "@AsdoriaSyliusPictogramPlugin/Grid/Field/pictogram_position.html.twig" +# actions: +# main: +# create: +# type: create +# update_positions: +# type: update_pictogram_positions +# item: +# update: +# type: update +# delete: +# type: delete +# filters: +# search: +# type: string +# label: sylius.ui.search +# options: +# fields: [ translations.name ] diff --git a/src/Resources/config/grids/pictogram_group.yaml b/src/Resources/config/grids/pictogram_group.yaml index 5dfdee3..820d4b9 100644 --- a/src/Resources/config/grids/pictogram_group.yaml +++ b/src/Resources/config/grids/pictogram_group.yaml @@ -26,6 +26,8 @@ sylius_grid: main: create: type: create + update_positions: + type: update_pictogram_group_positions item: update: type: update diff --git a/src/Resources/config/grids/templates.yaml b/src/Resources/config/grids/templates.yaml index 9ebb59f..636240f 100644 --- a/src/Resources/config/grids/templates.yaml +++ b/src/Resources/config/grids/templates.yaml @@ -2,4 +2,5 @@ sylius_grid: templates: action: pictogram: '@AsdoriaSyliusPictogramPlugin/Grid/Action/pictogram.html.twig' - update_pictogram_positions: "@AsdoriaSyliusPictogramPlugin/Grid/Action/updatePositions.html.twig" + update_pictogram_positions: "@AsdoriaSyliusPictogramPlugin/Grid/Action/Pictogram/updatePositions.html.twig" + update_pictogram_group_positions: "@AsdoriaSyliusPictogramPlugin/Grid/Action/PictogramGroup/updatePositions.html.twig" diff --git a/src/Resources/config/routes/ajax/ajax.yaml b/src/Resources/config/routes/ajax/ajax.yaml index ab0ce17..e3860ef 100644 --- a/src/Resources/config/routes/ajax/ajax.yaml +++ b/src/Resources/config/routes/ajax/ajax.yaml @@ -1,3 +1,7 @@ sylius_admin_ajax_pictogram: resource: "pictogram.yaml" - prefix: /pictograms/app + prefix: pictograms/ + +sylius_admin_ajax_pictogram_group: + resource: "pictogram-group.yaml" + prefix: pictogram-groups/ diff --git a/src/Resources/config/routes/ajax/pictogram-group.yaml b/src/Resources/config/routes/ajax/pictogram-group.yaml new file mode 100644 index 0000000..cf659d4 --- /dev/null +++ b/src/Resources/config/routes/ajax/pictogram-group.yaml @@ -0,0 +1,8 @@ +asdoria_admin_ajax_pictogram_groups_update_position: + path: /update + methods: [PUT] + defaults: + _controller: asdoria.controller.pictogram_group:updatePositionsAction + _format: json + _sylius: + permission: true diff --git a/src/Resources/config/routes/pictogram.yaml b/src/Resources/config/routes/pictogram.yaml index c4cbed2..e88e99a 100644 --- a/src/Resources/config/routes/pictogram.yaml +++ b/src/Resources/config/routes/pictogram.yaml @@ -1,14 +1,14 @@ -sylius_admin_pictogram: - resource: | - alias: asdoria.pictogram - section: admin - templates: "@SyliusAdmin\\Crud" - except: ['show'] - redirect: index - grid: sylius_admin_pictogram - permission: true - vars: - all: - templates: - form: '@AsdoriaSyliusPictogramPlugin/Admin/Pictogram/_form.html.twig' - type: sylius.resource +#sylius_admin_pictogram: +# resource: | +# alias: asdoria.pictogram +# section: admin +# templates: "@SyliusAdmin\\Crud" +# except: ['show'] +# redirect: index +# grid: sylius_admin_pictogram +# permission: true +# vars: +# all: +# templates: +# form: '@AsdoriaSyliusPictogramPlugin/Admin/Pictogram/_form.html.twig' +# type: sylius.resource diff --git a/src/Resources/config/services/data_transformer.yaml b/src/Resources/config/services/data_transformer.yaml new file mode 100644 index 0000000..21c9229 --- /dev/null +++ b/src/Resources/config/services/data_transformer.yaml @@ -0,0 +1,7 @@ +services: + asdoria.form.type.data_transformer.products_to_pictogram_groups: + class: Asdoria\SyliusPictogramPlugin\Form\DataTransformer\ProductsToPictogramGroupsTransformer + arguments: + - '@asdoria.factory.pictogram' + - '@sylius.repository.product' + - '@asdoria.repository.pictogram_group' diff --git a/src/Resources/config/services/event_listeners.yaml b/src/Resources/config/services/event_listeners.yaml index e24e460..4354b41 100644 --- a/src/Resources/config/services/event_listeners.yaml +++ b/src/Resources/config/services/event_listeners.yaml @@ -1,6 +1,6 @@ services: asdoria.listener.pictograms_upload: - parent: sylius.listener.images_upload + parent: sylius.listener.avatar_upload autowire: true autoconfigure: false public: false diff --git a/src/Resources/private/js/admin.js b/src/Resources/private/js/admin.js index c6d913b..c2664da 100644 --- a/src/Resources/private/js/admin.js +++ b/src/Resources/private/js/admin.js @@ -1,5 +1,7 @@ -import './sylius-move-product-variant'; +import './sylius-move-pictograms'; +import './sylius-move-pictogram-groups'; document.addEventListener('DOMContentLoaded', () => { - $('.asdoria-update-pictogram').movePictograms($('.asdoria-pictogram-position')); + $('.asdoria-update-pictograms').movePictograms($('.asdoria-pictogram-position')); + $('.asdoria-update-pictogram-groups').movePictogramGroups($('.asdoria-pictogram-group-position')); }); diff --git a/src/Resources/private/js/sylius-move-pictogram-groups.js b/src/Resources/private/js/sylius-move-pictogram-groups.js new file mode 100644 index 0000000..149844f --- /dev/null +++ b/src/Resources/private/js/sylius-move-pictogram-groups.js @@ -0,0 +1,40 @@ +import 'semantic-ui-css/components/api'; +import $ from 'jquery'; + +$.fn.extend({ + movePictogramGroups(positionInput) { + const pictogramGroupRows = []; + const element = this; + + element.api({ + method: 'PUT', + beforeSend(settings) { + /* eslint-disable-next-line no-param-reassign */ + settings.data = { + pictogramGroups: pictogramGroupRows, + _csrf_token: element.data('csrf-token'), + }; + + return settings; + }, + onSuccess() { + window.location.reload(); + }, + }); + + positionInput.on('input', (event) => { + const input = $(event.currentTarget); + const pictogramGroupId = input.data('id'); + const row = pictogramGroupRows.find(({ id }) => id === pictogramGroupId); + + if (!row) { + pictogramGroupRows.push({ + id: pictogramGroupId, + position: input.val(), + }); + } else { + row.position = input.val(); + } + }); + }, +}); diff --git a/src/Resources/private/js/sylius-move-product-variant.js b/src/Resources/private/js/sylius-move-pictograms.js similarity index 100% rename from src/Resources/private/js/sylius-move-product-variant.js rename to src/Resources/private/js/sylius-move-pictograms.js diff --git a/src/Resources/public/admin-pictogram.min.js b/src/Resources/public/admin-pictogram.min.js index 1905878..d402cab 100644 --- a/src/Resources/public/admin-pictogram.min.js +++ b/src/Resources/public/admin-pictogram.min.js @@ -1,2 +1,2 @@ /*! For license information please see admin-pictogram.min.js.LICENSE.txt */ -!function(){var e={755:function(e,t){var n;!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(r,o){"use strict";var i=[],a=Object.getPrototypeOf,s=i.slice,u=i.flat?function(e){return i.flat.call(e)}:function(e){return i.concat.apply([],e)},l=i.push,c=i.indexOf,f={},d=f.toString,p=f.hasOwnProperty,h=p.toString,g=h.call(Object),m={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},b=r.document,x={type:!0,src:!0,nonce:!0,noModule:!0};function w(e,t,n){var r,o,i=(n=n||b).createElement("script");if(i.text=e,t)for(r in x)(o=t[r]||t.getAttribute&&t.getAttribute(r))&&i.setAttribute(r,o);n.head.appendChild(i).parentNode.removeChild(i)}function T(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?f[d.call(e)]||"object":typeof e}var C="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function k(e){var t=!!e&&"length"in e&&e.length,n=T(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}S.fn=S.prototype={jquery:C,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(e){return this.pushStack(S.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(S.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),z=new RegExp(I+"|>"),X=new RegExp(W),V=new RegExp("^"+M+"$"),J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+F),PSEUDO:new RegExp("^"+W),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+H+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,oe=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ie=function(){d()},ae=xe((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{L.apply(D=O.call(w.childNodes),w.childNodes),D[w.childNodes.length].nodeType}catch(e){L={apply:D.length?function(e,t){R.apply(e,O.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(e,t,r,o){var i,s,l,c,f,h,v,y=t&&t.ownerDocument,w=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==w&&9!==w&&11!==w)return r;if(!o&&(d(t),t=t||p,g)){if(11!==w&&(f=Z.exec(e)))if(i=f[1]){if(9===w){if(!(l=t.getElementById(i)))return r;if(l.id===i)return r.push(l),r}else if(y&&(l=y.getElementById(i))&&b(t,l)&&l.id===i)return r.push(l),r}else{if(f[2])return L.apply(r,t.getElementsByTagName(e)),r;if((i=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return L.apply(r,t.getElementsByClassName(i)),r}if(n.qsa&&!E[e+" "]&&(!m||!m.test(e))&&(1!==w||"object"!==t.nodeName.toLowerCase())){if(v=e,y=t,1===w&&(z.test(e)||_.test(e))){for((y=ee.test(e)&&ve(t.parentNode)||t)===t&&n.scope||((c=t.getAttribute("id"))?c=c.replace(re,oe):t.setAttribute("id",c=x)),s=(h=a(e)).length;s--;)h[s]=(c?"#"+c:":scope")+" "+be(h[s]);v=h.join(",")}try{return L.apply(r,y.querySelectorAll(v)),r}catch(t){E(e,!0)}finally{c===x&&t.removeAttribute("id")}}}return u(e.replace(B,"$1"),t,r,o)}function ue(){var e=[];return function t(n,o){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=o}}function le(e){return e[x]=!0,e}function ce(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){for(var n=e.split("|"),o=n.length;o--;)r.attrHandle[n[o]]=t}function de(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function pe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function he(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ge(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function me(e){return le((function(t){return t=+t,le((function(n,r){for(var o,i=e([],n.length,t),a=i.length;a--;)n[o=i[a]]&&(n[o]=!(r[o]=n[o]))}))}))}function ve(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},d=se.setDocument=function(e){var t,o,a=e?e.ownerDocument||e:w;return a!=p&&9===a.nodeType&&a.documentElement?(h=(p=a).documentElement,g=!i(p),w!=p&&(o=p.defaultView)&&o.top!==o&&(o.addEventListener?o.addEventListener("unload",ie,!1):o.attachEvent&&o.attachEvent("onunload",ie)),n.scope=ce((function(e){return h.appendChild(e).appendChild(p.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=ce((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ce((function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=K.test(p.getElementsByClassName),n.getById=ce((function(e){return h.appendChild(e).id=x,!p.getElementsByName||!p.getElementsByName(x).length})),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,r,o,i=t.getElementById(e);if(i){if((n=i.getAttributeNode("id"))&&n.value===e)return[i];for(o=t.getElementsByName(e),r=0;i=o[r++];)if((n=i.getAttributeNode("id"))&&n.value===e)return[i]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],m=[],(n.qsa=K.test(p.querySelectorAll))&&(ce((function(e){var t;h.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+H+")"),e.querySelectorAll("[id~="+x+"-]").length||m.push("~="),(t=p.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||m.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+x+"+*").length||m.push(".#.+[+~]"),e.querySelectorAll("\\\f"),m.push("[\\r\\n\\f]")})),ce((function(e){e.innerHTML="";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")}))),(n.matchesSelector=K.test(y=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ce((function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),v.push("!=",W)})),m=m.length&&new RegExp(m.join("|")),v=v.length&&new RegExp(v.join("|")),t=K.test(h.compareDocumentPosition),b=t||K.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},q=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==p||e.ownerDocument==w&&b(w,e)?-1:t==p||t.ownerDocument==w&&b(w,t)?1:c?P(c,e)-P(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,a=[e],s=[t];if(!o||!i)return e==p?-1:t==p?1:o?-1:i?1:c?P(c,e)-P(c,t):0;if(o===i)return de(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?de(a[r],s[r]):a[r]==w?-1:s[r]==w?1:0},p):p},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(d(e),n.matchesSelector&&g&&!E[t+" "]&&(!v||!v.test(t))&&(!m||!m.test(t)))try{var r=y.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){E(t,!0)}return se(t,p,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!=p&&d(e),b(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=p&&d(e);var o=r.attrHandle[t.toLowerCase()],i=o&&j.call(r.attrHandle,t.toLowerCase())?o(e,t,!g):void 0;return void 0!==i?i:n.attributes||!g?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},se.escape=function(e){return(e+"").replace(re,oe)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,r=[],o=0,i=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(q),f){for(;t=e[i++];)t===e[i]&&(o=r.push(i));for(;o--;)e.splice(r[o],1)}return c=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=o(t);return n},r=se.selectors={cacheLength:50,createPseudo:le,match:J,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return J.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=S[e+" "];return t||(t=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+e+"("+I+"|$)"))&&S(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var o=se.attr(r,e);return null==o?"!="===t:!t||(o+="","="===t?o===n:"!="===t?o!==n:"^="===t?n&&0===o.indexOf(n):"*="===t?n&&o.indexOf(n)>-1:"$="===t?n&&o.slice(-n.length)===n:"~="===t?(" "+o.replace($," ")+" ").indexOf(n)>-1:"|="===t&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,o){var i="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===o?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h,g=i!==a?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!u&&!s,b=!1;if(m){if(i){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&y){for(b=(p=(l=(c=(f=(d=m)[x]||(d[x]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]||[])[0]===T&&l[1])&&l[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(b=p=0)||h.pop();)if(1===d.nodeType&&++b&&d===t){c[e]=[T,p,b];break}}else if(y&&(b=p=(l=(c=(f=(d=t)[x]||(d[x]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]||[])[0]===T&&l[1]),!1===b)for(;(d=++p&&d&&d[g]||(b=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++b||(y&&((c=(f=d[x]||(d[x]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]=[T,b]),d!==t)););return(b-=o)===r||b%r==0&&b/r>=0}}},PSEUDO:function(e,t){var n,o=r.pseudos[e]||r.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return o[x]?o(t):o.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?le((function(e,n){for(var r,i=o(e,t),a=i.length;a--;)e[r=P(e,i[a])]=!(n[r]=i[a])})):function(e){return o(e,0,n)}):o}},pseudos:{not:le((function(e){var t=[],n=[],r=s(e.replace(B,"$1"));return r[x]?le((function(e,t,n,o){for(var i,a=r(e,null,o,[]),s=e.length;s--;)(i=a[s])&&(e[s]=!(t[s]=i))})):function(e,o,i){return t[0]=e,r(t,null,i,n),t[0]=null,!n.pop()}})),has:le((function(e){return function(t){return se(e,t).length>0}})),contains:le((function(e){return e=e.replace(te,ne),function(t){return(t.textContent||o(t)).indexOf(e)>-1}})),lang:le((function(e){return V.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:me((function(){return[0]})),last:me((function(e,t){return[t-1]})),eq:me((function(e,t,n){return[n<0?n+t:n]})),even:me((function(e,t){for(var n=0;nt?t:n;--r>=0;)e.push(r);return e})),gt:me((function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){for(var o=e.length;o--;)if(!e[o](t,n,r))return!1;return!0}:e[0]}function Te(e,t,n,r,o){for(var i,a=[],s=0,u=e.length,l=null!=t;s-1&&(i[l]=!(a[l]=f))}}else v=Te(v===a?v.splice(h,v.length):v),o?o(null,a,v,u):L.apply(a,v)}))}function Se(e){for(var t,n,o,i=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=xe((function(e){return e===t}),s,!0),f=xe((function(e){return P(t,e)>-1}),s,!0),d=[function(e,n,r){var o=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,o}];u1&&we(d),u>1&&be(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(B,"$1"),n,u0,o=e.length>0,i=function(i,a,s,u,c){var f,h,m,v=0,y="0",b=i&&[],x=[],w=l,C=i||o&&r.find.TAG("*",c),S=T+=null==w?1:Math.random()||.1,k=C.length;for(c&&(l=a==p||a||c);y!==k&&null!=(f=C[y]);y++){if(o&&f){for(h=0,a||f.ownerDocument==p||(d(f),s=!g);m=e[h++];)if(m(f,a||p,s)){u.push(f);break}c&&(T=S)}n&&((f=!m&&f)&&v--,i&&b.push(f))}if(v+=y,n&&y!==v){for(h=0;m=t[h++];)m(b,x,a,s);if(i){if(v>0)for(;y--;)b[y]||x[y]||(x[y]=N.call(u));x=Te(x)}L.apply(u,x),c&&!i&&x.length>0&&v+t.length>1&&se.uniqueSort(u)}return c&&(T=S,l=w),b};return n?le(i):i}(i,o)),s.selector=e}return s},u=se.select=function(e,t,n,o){var i,u,l,c,f,d="function"==typeof e&&e,p=!o&&a(e=d.selector||e);if(n=n||[],1===p.length){if((u=p[0]=p[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(te,ne),t)||[])[0]))return n;d&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(i=J.needsContext.test(e)?0:u.length;i--&&(l=u[i],!r.relative[c=l.type]);)if((f=r.find[c])&&(o=f(l.matches[0].replace(te,ne),ee.test(u[0].type)&&ve(t.parentNode)||t))){if(u.splice(i,1),!(e=o.length&&be(u)))return L.apply(n,o),n;break}}return(d||s(e,p))(o,t,!g,n,!t||ee.test(e)&&ve(t.parentNode)||t),n},n.sortStable=x.split("").sort(q).join("")===x,n.detectDuplicates=!!f,d(),n.sortDetached=ce((function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))})),ce((function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")}))||fe("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&ce((function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||fe("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ce((function(e){return null==e.getAttribute("disabled")}))||fe(H,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),se}(r);S.find=A,S.expr=A.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=A.uniqueSort,S.text=A.getText,S.isXMLDoc=A.isXML,S.contains=A.contains,S.escapeSelector=A.escape;var E=function(e,t,n){for(var r=[],o=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&S(e).is(n))break;r.push(e)}return r},q=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},j=S.expr.match.needsContext;function D(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function R(e,t,n){return v(t)?S.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?S.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?S.grep(e,(function(e){return c.call(t,e)>-1!==n})):S.filter(t,e,n)}S.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,(function(e){return 1===e.nodeType})))},S.fn.extend({find:function(e){var t,n,r=this.length,o=this;if("string"!=typeof e)return this.pushStack(S(e).filter((function(){for(t=0;t1?S.uniqueSort(n):n},filter:function(e){return this.pushStack(R(this,e||[],!1))},not:function(e){return this.pushStack(R(this,e||[],!0))},is:function(e){return!!R(this,"string"==typeof e&&j.test(e)?S(e):e||[],!1).length}});var L,O=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,o;if(!e)return this;if(n=n||L,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:O.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:b,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(o=b.getElementById(r[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,L=S(b);var P=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function I(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter((function(){for(var e=0;e-1:1===n.nodeType&&S.find.matchesSelector(n,e))){i.push(n);break}return this.pushStack(i.length>1?S.uniqueSort(i):i)},index:function(e){return e?"string"==typeof e?c.call(S(e),this[0]):c.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return E(e,"parentNode")},parentsUntil:function(e,t,n){return E(e,"parentNode",n)},next:function(e){return I(e,"nextSibling")},prev:function(e){return I(e,"previousSibling")},nextAll:function(e){return E(e,"nextSibling")},prevAll:function(e){return E(e,"previousSibling")},nextUntil:function(e,t,n){return E(e,"nextSibling",n)},prevUntil:function(e,t,n){return E(e,"previousSibling",n)},siblings:function(e){return q((e.parentNode||{}).firstChild,e)},children:function(e){return q(e.firstChild)},contents:function(e){return null!=e.contentDocument&&a(e.contentDocument)?e.contentDocument:(D(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},(function(e,t){S.fn[e]=function(n,r){var o=S.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(o=S.filter(r,o)),this.length>1&&(H[e]||S.uniqueSort(o),P.test(e)&&o.reverse()),this.pushStack(o)}}));var M=/[^\x20\t\r\n\f]+/g;function F(e){return e}function W(e){throw e}function $(e,t,n,r){var o;try{e&&v(o=e.promise)?o.call(e).done(t).fail(n):e&&v(o=e.then)?o.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return S.each(e.match(M)||[],(function(e,n){t[n]=!0})),t}(e):S.extend({},e);var t,n,r,o,i=[],a=[],s=-1,u=function(){for(o=o||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s-1;)i.splice(n,1),n<=s&&s--})),this},has:function(e){return e?S.inArray(e,i)>-1:i.length>0},empty:function(){return i&&(i=[]),this},disable:function(){return o=a=[],i=n="",this},disabled:function(){return!i},lock:function(){return o=a=[],n||t||(i=n=""),this},locked:function(){return!!o},fireWith:function(e,n){return o||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},S.extend({Deferred:function(e){var t=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],n="pending",o={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},catch:function(e){return o.then(null,e)},pipe:function(){var e=arguments;return S.Deferred((function(n){S.each(t,(function(t,r){var o=v(e[r[4]])&&e[r[4]];i[r[1]]((function(){var e=o&&o.apply(this,arguments);e&&v(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,o?[e]:arguments)}))})),e=null})).promise()},then:function(e,n,o){var i=0;function a(e,t,n,o){return function(){var s=this,u=arguments,l=function(){var r,l;if(!(e=i&&(n!==W&&(s=void 0,u=[r]),t.rejectWith(s,u))}};e?c():(S.Deferred.getStackHook&&(c.stackTrace=S.Deferred.getStackHook()),r.setTimeout(c))}}return S.Deferred((function(r){t[0][3].add(a(0,r,v(o)?o:F,r.notifyWith)),t[1][3].add(a(0,r,v(e)?e:F)),t[2][3].add(a(0,r,v(n)?n:W))})).promise()},promise:function(e){return null!=e?S.extend(e,o):o}},i={};return S.each(t,(function(e,r){var a=r[2],s=r[5];o[r[1]]=a.add,s&&a.add((function(){n=s}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(r[3].fire),i[r[0]]=function(){return i[r[0]+"With"](this===i?void 0:this,arguments),this},i[r[0]+"With"]=a.fireWith})),o.promise(i),e&&e.call(i,i),i},when:function(e){var t=arguments.length,n=t,r=Array(n),o=s.call(arguments),i=S.Deferred(),a=function(e){return function(n){r[e]=this,o[e]=arguments.length>1?s.call(arguments):n,--t||i.resolveWith(r,o)}};if(t<=1&&($(e,i.done(a(n)).resolve,i.reject,!t),"pending"===i.state()||v(o[n]&&o[n].then)))return i.then();for(;n--;)$(o[n],a(n),i.reject);return i.promise()}});var B=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){r.console&&r.console.warn&&e&&B.test(e.name)&&r.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){r.setTimeout((function(){throw e}))};var U=S.Deferred();function _(){b.removeEventListener("DOMContentLoaded",_),r.removeEventListener("load",_),S.ready()}S.fn.ready=function(e){return U.then(e).catch((function(e){S.readyException(e)})),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0,!0!==e&&--S.readyWait>0||U.resolveWith(b,[S]))}}),S.ready.then=U.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?r.setTimeout(S.ready):(b.addEventListener("DOMContentLoaded",_),r.addEventListener("load",_));var z=function(e,t,n,r,o,i,a){var s=0,u=e.length,l=null==n;if("object"===T(n))for(s in o=!0,n)z(e,t,s,n[s],!0,i,a);else if(void 0!==r&&(o=!0,v(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each((function(){Z.remove(this,e)}))}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=K.get(e,t),n&&(!r||Array.isArray(n)?r=K.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),r=n.length,o=n.shift(),i=S._queueHooks(e,t);"inprogress"===o&&(o=n.shift(),r--),o&&("fx"===t&&n.unshift("inprogress"),delete i.stop,o.call(e,(function(){S.dequeue(e,t)}),i)),!r&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return K.get(e,n)||K.access(e,n,{empty:S.Callbacks("once memory").add((function(){K.remove(e,[t+"queue",n])}))})}}),S.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]*)/i,ye=/^$|^module$|\/(?:java|ecma)script/i;he=b.createDocumentFragment().appendChild(b.createElement("div")),(ge=b.createElement("input")).setAttribute("type","radio"),ge.setAttribute("checked","checked"),ge.setAttribute("name","t"),he.appendChild(ge),m.checkClone=he.cloneNode(!0).cloneNode(!0).lastChild.checked,he.innerHTML="",m.noCloneChecked=!!he.cloneNode(!0).lastChild.defaultValue,he.innerHTML="",m.option=!!he.lastChild;var be={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function xe(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&D(e,t)?S.merge([e],n):n}function we(e,t){for(var n=0,r=e.length;n",""]);var Te=/<|&#?\w+;/;function Ce(e,t,n,r,o){for(var i,a,s,u,l,c,f=t.createDocumentFragment(),d=[],p=0,h=e.length;p-1)o&&o.push(i);else if(l=se(i),a=xe(f.appendChild(i),"script"),l&&we(a),n)for(c=0;i=a[c++];)ye.test(i.type||"")&&n.push(i);return f}var Se=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Ae(){return!1}function Ee(e,t){return e===function(){try{return b.activeElement}catch(e){}}()==("focus"===t)}function qe(e,t,n,r,o,i){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)qe(e,s,n,r,t[s],i);return e}if(null==r&&null==o?(o=n,r=n=void 0):null==o&&("string"==typeof n?(o=r,r=void 0):(o=r,r=n,n=void 0)),!1===o)o=Ae;else if(!o)return e;return 1===i&&(a=o,o=function(e){return S().off(e),a.apply(this,arguments)},o.guid=a.guid||(a.guid=S.guid++)),e.each((function(){S.event.add(this,t,o,r,n)}))}function je(e,t,n){n?(K.set(e,t,!1),S.event.add(e,t,{namespace:!1,handler:function(e){var r,o,i=K.get(this,t);if(1&e.isTrigger&&this[t]){if(i.length)(S.event.special[t]||{}).delegateType&&e.stopPropagation();else if(i=s.call(arguments),K.set(this,t,i),r=n(this,t),this[t](),i!==(o=K.get(this,t))||r?K.set(this,t,!1):o={},i!==o)return e.stopImmediatePropagation(),e.preventDefault(),o&&o.value}else i.length&&(K.set(this,t,{value:S.event.trigger(S.extend(i[0],S.Event.prototype),i.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===K.get(e,t)&&S.event.add(e,t,ke)}S.event={global:{},add:function(e,t,n,r,o){var i,a,s,u,l,c,f,d,p,h,g,m=K.get(e);if(G(e))for(n.handler&&(n=(i=n).handler,o=i.selector),o&&S.find.matchesSelector(ae,o),n.guid||(n.guid=S.guid++),(u=m.events)||(u=m.events=Object.create(null)),(a=m.handle)||(a=m.handle=function(t){return void 0!==S&&S.event.triggered!==t.type?S.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(M)||[""]).length;l--;)p=g=(s=Se.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),p&&(f=S.event.special[p]||{},p=(o?f.delegateType:f.bindType)||p,f=S.event.special[p]||{},c=S.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:o,needsContext:o&&S.expr.match.needsContext.test(o),namespace:h.join(".")},i),(d=u[p])||((d=u[p]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(p,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),o?d.splice(d.delegateCount++,0,c):d.push(c),S.event.global[p]=!0)},remove:function(e,t,n,r,o){var i,a,s,u,l,c,f,d,p,h,g,m=K.hasData(e)&&K.get(e);if(m&&(u=m.events)){for(l=(t=(t||"").match(M)||[""]).length;l--;)if(p=g=(s=Se.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),p){for(f=S.event.special[p]||{},d=u[p=(r?f.delegateType:f.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=i=d.length;i--;)c=d[i],!o&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(i,1),c.selector&&d.delegateCount--,f.remove&&f.remove.call(e,c));a&&!d.length&&(f.teardown&&!1!==f.teardown.call(e,h,m.handle)||S.removeEvent(e,p,m.handle),delete u[p])}else for(p in u)S.event.remove(e,p+t[l],n,r,!0);S.isEmptyObject(u)&&K.remove(e,"handle events")}},dispatch:function(e){var t,n,r,o,i,a,s=new Array(arguments.length),u=S.event.fix(e),l=(K.get(this,"events")||Object.create(null))[u.type]||[],c=S.event.special[u.type]||{};for(s[0]=u,t=1;t=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(i=[],a={},n=0;n-1:S.find(o,this,null,[l]).length),a[o]&&i.push(r);i.length&&s.push({elem:l,handlers:i})}return l=this,u\s*$/g;function Le(e,t){return D(e,"table")&&D(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Oe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Pe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function He(e,t){var n,r,o,i,a,s;if(1===t.nodeType){if(K.hasData(e)&&(s=K.get(e).events))for(o in K.remove(t,"handle events"),s)for(n=0,r=s[o].length;n1&&"string"==typeof h&&!m.checkClone&&Ne.test(h))return e.each((function(o){var i=e.eq(o);g&&(t[0]=h.call(this,o,i.html())),Me(i,t,n,r)}));if(d&&(i=(o=Ce(t,e[0].ownerDocument,!1,e,r)).firstChild,1===o.childNodes.length&&(o=i),i||r)){for(s=(a=S.map(xe(o,"script"),Oe)).length;f0&&we(a,!u&&xe(e,"script")),s},cleanData:function(e){for(var t,n,r,o=S.event.special,i=0;void 0!==(n=e[i]);i++)if(G(n)){if(t=n[K.expando]){if(t.events)for(r in t.events)o[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[K.expando]=void 0}n[Z.expando]&&(n[Z.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Fe(this,e,!0)},remove:function(e){return Fe(this,e)},text:function(e){return z(this,(function(e){return void 0===e?S.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Me(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)}))},prepend:function(){return Me(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Le(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Me(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Me(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(xe(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return S.clone(this,e,t)}))},html:function(e){return z(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!De.test(e)&&!be[(ve.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-i-u-s-.5))||0),u}function nt(e,t,n){var r=$e(e),o=(!m.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,r),i=o,a=_e(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(We.test(a)){if(!n)return a;a="auto"}return(!m.boxSizingReliable()&&o||!m.reliableTrDimensions()&&D(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===S.css(e,"display",!1,r))&&e.getClientRects().length&&(o="border-box"===S.css(e,"boxSizing",!1,r),(i=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+tt(e,t,n||(o?"border":"content"),i,r,a)+"px"}function rt(e,t,n,r,o){return new rt.prototype.init(e,t,n,r,o)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=_e(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,i,a,s=Y(t),u=Qe.test(t),l=e.style;if(u||(t=Ye(s)),a=S.cssHooks[t]||S.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(o=a.get(e,!1,r))?o:l[t];"string"===(i=typeof n)&&(o=oe.exec(n))&&o[1]&&(n=ce(e,t,o),i="number"),null!=n&&n==n&&("number"!==i||u||(n+=o&&o[3]||(S.cssNumber[s]?"":"px")),m.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var o,i,a,s=Y(t);return Qe.test(t)||(t=Ye(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=_e(e,t,r)),"normal"===o&&t in Ze&&(o=Ze[t]),""===n||n?(i=parseFloat(o),!0===n||isFinite(i)?i||0:o):o}}),S.each(["height","width"],(function(e,t){S.cssHooks[t]={get:function(e,n,r){if(n)return!Ge.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?nt(e,t,r):Be(e,Ke,(function(){return nt(e,t,r)}))},set:function(e,n,r){var o,i=$e(e),a=!m.scrollboxSize()&&"absolute"===i.position,s=(a||r)&&"border-box"===S.css(e,"boxSizing",!1,i),u=r?tt(e,t,r,s,i):0;return s&&a&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(i[t])-tt(e,t,"border",!1,i)-.5)),u&&(o=oe.exec(n))&&"px"!==(o[3]||"px")&&(e.style[t]=n,n=S.css(e,t)),et(0,n,u)}}})),S.cssHooks.marginLeft=ze(m.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(_e(e,"marginLeft"))||e.getBoundingClientRect().left-Be(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),S.each({margin:"",padding:"",border:"Width"},(function(e,t){S.cssHooks[e+t]={expand:function(n){for(var r=0,o={},i="string"==typeof n?n.split(" "):[n];r<4;r++)o[e+ie[r]+t]=i[r]||i[r-2]||i[0];return o}},"margin"!==e&&(S.cssHooks[e+t].set=et)})),S.fn.extend({css:function(e,t){return z(this,(function(e,t,n){var r,o,i={},a=0;if(Array.isArray(t)){for(r=$e(e),o=t.length;a1)}}),S.Tween=rt,rt.prototype={constructor:rt,init:function(e,t,n,r,o,i){this.elem=e,this.prop=n,this.easing=o||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=i||(S.cssNumber[n]?"":"px")},cur:function(){var e=rt.propHooks[this.prop];return e&&e.get?e.get(this):rt.propHooks._default.get(this)},run:function(e){var t,n=rt.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rt.propHooks._default.set(this),this}},rt.prototype.init.prototype=rt.prototype,rt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[Ye(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}},rt.propHooks.scrollTop=rt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=rt.prototype.init,S.fx.step={};var ot,it,at=/^(?:toggle|show|hide)$/,st=/queueHooks$/;function ut(){it&&(!1===b.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(ut):r.setTimeout(ut,S.fx.interval),S.fx.tick())}function lt(){return r.setTimeout((function(){ot=void 0})),ot=Date.now()}function ct(e,t){var n,r=0,o={height:e};for(t=t?1:0;r<4;r+=2-t)o["margin"+(n=ie[r])]=o["padding"+n]=e;return t&&(o.opacity=o.width=e),o}function ft(e,t,n){for(var r,o=(dt.tweeners[t]||[]).concat(dt.tweeners["*"]),i=0,a=o.length;i1)},removeAttr:function(e){return this.each((function(){S.removeAttr(this,e)}))}}),S.extend({attr:function(e,t,n){var r,o,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return void 0===e.getAttribute?S.prop(e,t,n):(1===i&&S.isXMLDoc(e)||(o=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?pt:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:(e.setAttribute(t,n+""),n):o&&"get"in o&&null!==(r=o.get(e,t))?r:null==(r=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!m.radioValue&&"radio"===t&&D(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,o=t&&t.match(M);if(o&&1===e.nodeType)for(;n=o[r++];)e.removeAttribute(n)}}),pt={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=ht[t]||S.find.attr;ht[t]=function(e,t,r){var o,i,a=t.toLowerCase();return r||(i=ht[a],ht[a]=o,o=null!=n(e,t,r)?a:null,ht[a]=i),o}}));var gt=/^(?:input|select|textarea|button)$/i,mt=/^(?:a|area)$/i;function vt(e){return(e.match(M)||[]).join(" ")}function yt(e){return e.getAttribute&&e.getAttribute("class")||""}function bt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(M)||[]}S.fn.extend({prop:function(e,t){return z(this,S.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[S.propFix[e]||e]}))}}),S.extend({prop:function(e,t,n){var r,o,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&S.isXMLDoc(e)||(t=S.propFix[t]||t,o=S.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:e[t]=n:o&&"get"in o&&null!==(r=o.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||mt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),m.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){S.propFix[this.toLowerCase()]=this})),S.fn.extend({addClass:function(e){var t,n,r,o,i,a,s,u=0;if(v(e))return this.each((function(t){S(this).addClass(e.call(this,t,yt(this)))}));if((t=bt(e)).length)for(;n=this[u++];)if(o=yt(n),r=1===n.nodeType&&" "+vt(o)+" "){for(a=0;i=t[a++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");o!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,o,i,a,s,u=0;if(v(e))return this.each((function(t){S(this).removeClass(e.call(this,t,yt(this)))}));if(!arguments.length)return this.attr("class","");if((t=bt(e)).length)for(;n=this[u++];)if(o=yt(n),r=1===n.nodeType&&" "+vt(o)+" "){for(a=0;i=t[a++];)for(;r.indexOf(" "+i+" ")>-1;)r=r.replace(" "+i+" "," ");o!==(s=vt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):v(e)?this.each((function(n){S(this).toggleClass(e.call(this,n,yt(this),t),t)})):this.each((function(){var t,o,i,a;if(r)for(o=0,i=S(this),a=bt(e);t=a[o++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||((t=yt(this))&&K.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":K.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+vt(yt(n))+" ").indexOf(t)>-1)return!0;return!1}});var xt=/\r/g;S.fn.extend({val:function(e){var t,n,r,o=this[0];return arguments.length?(r=v(e),this.each((function(n){var o;1===this.nodeType&&(null==(o=r?e.call(this,n,S(this).val()):e)?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=S.map(o,(function(e){return null==e?"":e+""}))),(t=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))}))):o?(t=S.valHooks[o.type]||S.valHooks[o.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:"string"==typeof(n=o.value)?n.replace(xt,""):null==n?"":n:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:vt(S.text(e))}},select:{get:function(e){var t,n,r,o=e.options,i=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?i+1:o.length;for(r=i<0?u:a?i:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),i}}}}),S.each(["radio","checkbox"],(function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=S.inArray(S(e).val(),t)>-1}},m.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),m.focusin="onfocusin"in r;var wt=/^(?:focusinfocus|focusoutblur)$/,Tt=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,n,o){var i,a,s,u,l,c,f,d,h=[n||b],g=p.call(e,"type")?e.type:e,m=p.call(e,"namespace")?e.namespace.split("."):[];if(a=d=s=n=n||b,3!==n.nodeType&&8!==n.nodeType&&!wt.test(g+S.event.triggered)&&(g.indexOf(".")>-1&&(m=g.split("."),g=m.shift(),m.sort()),l=g.indexOf(":")<0&&"on"+g,(e=e[S.expando]?e:new S.Event(g,"object"==typeof e&&e)).isTrigger=o?2:3,e.namespace=m.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:S.makeArray(t,[e]),f=S.event.special[g]||{},o||!f.trigger||!1!==f.trigger.apply(n,t))){if(!o&&!f.noBubble&&!y(n)){for(u=f.delegateType||g,wt.test(u+g)||(a=a.parentNode);a;a=a.parentNode)h.push(a),s=a;s===(n.ownerDocument||b)&&h.push(s.defaultView||s.parentWindow||r)}for(i=0;(a=h[i++])&&!e.isPropagationStopped();)d=a,e.type=i>1?u:f.bindType||g,(c=(K.get(a,"events")||Object.create(null))[e.type]&&K.get(a,"handle"))&&c.apply(a,t),(c=l&&a[l])&&c.apply&&G(a)&&(e.result=c.apply(a,t),!1===e.result&&e.preventDefault());return e.type=g,o||e.isDefaultPrevented()||f._default&&!1!==f._default.apply(h.pop(),t)||!G(n)||l&&v(n[g])&&!y(n)&&((s=n[l])&&(n[l]=null),S.event.triggered=g,e.isPropagationStopped()&&d.addEventListener(g,Tt),n[g](),e.isPropagationStopped()&&d.removeEventListener(g,Tt),S.event.triggered=void 0,s&&(n[l]=s)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each((function(){S.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),m.focusin||S.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){S.event.simulate(t,e.target,S.event.fix(e))};S.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,o=K.access(r,t);o||r.addEventListener(e,n,!0),K.access(r,t,(o||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,o=K.access(r,t)-1;o?K.access(r,t,o):(r.removeEventListener(e,n,!0),K.remove(r,t))}}}));var Ct=r.location,St={guid:Date.now()},kt=/\?/;S.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new r.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||S.error("Invalid XML: "+(n?S.map(n.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var At=/\[\]$/,Et=/\r?\n/g,qt=/^(?:submit|button|image|reset|file)$/i,jt=/^(?:input|select|textarea|keygen)/i;function Dt(e,t,n,r){var o;if(Array.isArray(t))S.each(t,(function(t,o){n||At.test(e)?r(e,o):Dt(e+"["+("object"==typeof o&&null!=o?t:"")+"]",o,n,r)}));else if(n||"object"!==T(t))r(e,t);else for(o in t)Dt(e+"["+o+"]",t[o],n,r)}S.param=function(e,t){var n,r=[],o=function(e,t){var n=v(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,(function(){o(this.name,this.value)}));else for(n in e)Dt(n,e[n],t,o);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&jt.test(this.nodeName)&&!qt.test(e)&&(this.checked||!me.test(e))})).map((function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,(function(e){return{name:t.name,value:e.replace(Et,"\r\n")}})):{name:t.name,value:n.replace(Et,"\r\n")}})).get()}});var Nt=/%20/g,Rt=/#.*$/,Lt=/([?&])_=[^&]*/,Ot=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pt=/^(?:GET|HEAD)$/,Ht=/^\/\//,It={},Mt={},Ft="*/".concat("*"),Wt=b.createElement("a");function $t(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,o=0,i=t.toLowerCase().match(M)||[];if(v(n))for(;r=i[o++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Bt(e,t,n,r){var o={},i=e===Mt;function a(s){var u;return o[s]=!0,S.each(e[s]||[],(function(e,s){var l=s(t,n,r);return"string"!=typeof l||i||o[l]?i?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)})),u}return a(t.dataTypes[0])||!o["*"]&&a("*")}function Ut(e,t){var n,r,o=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((o[n]?e:r||(r={}))[n]=t[n]);return r&&S.extend(!0,e,r),e}Wt.href=Ct.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ft,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ut(Ut(e,S.ajaxSettings),t):Ut(S.ajaxSettings,e)},ajaxPrefilter:$t(It),ajaxTransport:$t(Mt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,o,i,a,s,u,l,c,f,d,p=S.ajaxSetup({},t),h=p.context||p,g=p.context&&(h.nodeType||h.jquery)?S(h):S.event,m=S.Deferred(),v=S.Callbacks("once memory"),y=p.statusCode||{},x={},w={},T="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(l){if(!a)for(a={};t=Ot.exec(i);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return l?i:null},setRequestHeader:function(e,t){return null==l&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,x[e]=t),this},overrideMimeType:function(e){return null==l&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)C.always(e[C.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||T;return n&&n.abort(t),k(0,t),this}};if(m.promise(C),p.url=((e||p.url||Ct.href)+"").replace(Ht,Ct.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(M)||[""],null==p.crossDomain){u=b.createElement("a");try{u.href=p.url,u.href=u.href,p.crossDomain=Wt.protocol+"//"+Wt.host!=u.protocol+"//"+u.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=S.param(p.data,p.traditional)),Bt(It,p,t,C),l)return C;for(f in(c=S.event&&p.global)&&0==S.active++&&S.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Pt.test(p.type),o=p.url.replace(Rt,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Nt,"+")):(d=p.url.slice(o.length),p.data&&(p.processData||"string"==typeof p.data)&&(o+=(kt.test(o)?"&":"?")+p.data,delete p.data),!1===p.cache&&(o=o.replace(Lt,"$1"),d=(kt.test(o)?"&":"?")+"_="+St.guid+++d),p.url=o+d),p.ifModified&&(S.lastModified[o]&&C.setRequestHeader("If-Modified-Since",S.lastModified[o]),S.etag[o]&&C.setRequestHeader("If-None-Match",S.etag[o])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Ft+"; q=0.01":""):p.accepts["*"]),p.headers)C.setRequestHeader(f,p.headers[f]);if(p.beforeSend&&(!1===p.beforeSend.call(h,C,p)||l))return C.abort();if(T="abort",v.add(p.complete),C.done(p.success),C.fail(p.error),n=Bt(Mt,p,t,C)){if(C.readyState=1,c&&g.trigger("ajaxSend",[C,p]),l)return C;p.async&&p.timeout>0&&(s=r.setTimeout((function(){C.abort("timeout")}),p.timeout));try{l=!1,n.send(x,k)}catch(e){if(l)throw e;k(-1,e)}}else k(-1,"No Transport");function k(e,t,a,u){var f,d,b,x,w,T=t;l||(l=!0,s&&r.clearTimeout(s),n=void 0,i=u||"",C.readyState=e>0?4:0,f=e>=200&&e<300||304===e,a&&(x=function(e,t,n){for(var r,o,i,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(o in s)if(s[o]&&s[o].test(r)){u.unshift(o);break}if(u[0]in n)i=u[0];else{for(o in n){if(!u[0]||e.converters[o+" "+u[0]]){i=o;break}a||(a=o)}i=i||a}if(i)return i!==u[0]&&u.unshift(i),n[i]}(p,C,a)),!f&&S.inArray("script",p.dataTypes)>-1&&S.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),x=function(e,t,n,r){var o,i,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(i=c.shift();i;)if(e.responseFields[i]&&(n[e.responseFields[i]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=i,i=c.shift())if("*"===i)i=u;else if("*"!==u&&u!==i){if(!(a=l[u+" "+i]||l["* "+i]))for(o in l)if((s=o.split(" "))[1]===i&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[o]:!0!==l[o]&&(i=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+i}}}return{state:"success",data:t}}(p,x,C,f),f?(p.ifModified&&((w=C.getResponseHeader("Last-Modified"))&&(S.lastModified[o]=w),(w=C.getResponseHeader("etag"))&&(S.etag[o]=w)),204===e||"HEAD"===p.type?T="nocontent":304===e?T="notmodified":(T=x.state,d=x.data,f=!(b=x.error))):(b=T,!e&&T||(T="error",e<0&&(e=0))),C.status=e,C.statusText=(t||T)+"",f?m.resolveWith(h,[d,T,C]):m.rejectWith(h,[C,T,b]),C.statusCode(y),y=void 0,c&&g.trigger(f?"ajaxSuccess":"ajaxError",[C,p,f?d:b]),v.fireWith(h,[C,T]),c&&(g.trigger("ajaxComplete",[C,p]),--S.active||S.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return S.get(e,t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],(function(e,t){S[t]=function(e,n,r,o){return v(n)&&(o=o||r,r=n,n=void 0),S.ajax(S.extend({url:e,type:t,dataType:o,data:n,success:r},S.isPlainObject(e)&&e))}})),S.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return v(e)?this.each((function(t){S(this).wrapInner(e.call(this,t))})):this.each((function(){var t=S(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=v(e);return this.each((function(n){S(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){S(this).replaceWith(this.childNodes)})),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(e){}};var _t={0:200,1223:204},zt=S.ajaxSettings.xhr();m.cors=!!zt&&"withCredentials"in zt,m.ajax=zt=!!zt,S.ajaxTransport((function(e){var t,n;if(m.cors||zt&&!e.crossDomain)return{send:function(o,i){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];for(a in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"),o)s.setRequestHeader(a,o[a]);t=function(e){return function(){t&&(t=n=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?i(0,"error"):i(s.status,s.statusText):i(_t[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),n=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&r.setTimeout((function(){t&&n()}))},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),S.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),S.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,o){t=S("