From 50f35f0db2be9586205e793f315608eec59c9666 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sat, 19 Jan 2019 22:08:29 +0100 Subject: [PATCH] Move icon into the top menu bar Change the way to select a random entry: - select all ids from the given user (with filters) - choose randomly one in php - find that entry --- app/Resources/static/themes/material/index.js | 4 ++- .../static/themes/material/js/tools.js | 14 +++++++- .../CoreBundle/Controller/EntryController.php | 2 +- .../CoreBundle/Repository/EntryRepository.php | 33 +++++++------------ .../Resources/translations/messages.da.yml | 1 + .../Resources/translations/messages.de.yml | 1 + .../Resources/translations/messages.en.yml | 1 + .../Resources/translations/messages.es.yml | 1 + .../Resources/translations/messages.fa.yml | 1 + .../Resources/translations/messages.fr.yml | 1 + .../Resources/translations/messages.it.yml | 1 + .../Resources/translations/messages.oc.yml | 1 + .../Resources/translations/messages.pl.yml | 1 + .../Resources/translations/messages.pt.yml | 1 + .../Resources/translations/messages.ro.yml | 1 + .../Resources/translations/messages.ru.yml | 1 + .../Resources/translations/messages.th.yml | 1 + .../Resources/translations/messages.tr.yml | 1 + .../themes/baggy/Entry/entries.html.twig | 4 ++- .../themes/material/Entry/entries.html.twig | 1 - .../views/themes/material/layout.html.twig | 11 ++++++- web/wallassets/material.js | 2 +- 22 files changed, 57 insertions(+), 28 deletions(-) diff --git a/app/Resources/static/themes/material/index.js b/app/Resources/static/themes/material/index.js index 96310d81f..057945977 100755 --- a/app/Resources/static/themes/material/index.js +++ b/app/Resources/static/themes/material/index.js @@ -8,7 +8,7 @@ import 'materialize-css/dist/js/materialize'; import '../_global/index'; /* Tools */ -import { initExport, initFilters } from './js/tools'; +import { initExport, initFilters, initRandom } from './js/tools'; /* Import shortcuts */ import './js/shortcuts/main'; @@ -32,8 +32,10 @@ $(document).ready(() => { format: 'dd/mm/yyyy', container: 'body', }); + initFilters(); initExport(); + initRandom(); const toggleNav = (toShow, toFocus) => { $('.nav-panel-actions').hide(100); diff --git a/app/Resources/static/themes/material/js/tools.js b/app/Resources/static/themes/material/js/tools.js index 39398fd8a..0b3d30385 100644 --- a/app/Resources/static/themes/material/js/tools.js +++ b/app/Resources/static/themes/material/js/tools.js @@ -8,6 +8,7 @@ function initFilters() { $('#clear_form_filters').on('click', () => { $('#filters input').val(''); $('#filters :checked').removeAttr('checked'); + return false; }); } @@ -21,4 +22,15 @@ function initExport() { } } -export { initExport, initFilters }; +function initRandom() { + // no display if export (ie: entries) not available + if ($('div').is('#export')) { + $('#button_random').show(); + } +} + +export { + initExport, + initFilters, + initRandom, +}; diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index dfb5eb549..5c8ecb402 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php @@ -253,7 +253,7 @@ class EntryController extends Controller * * @param string $type * - * @Route("/{type}/random", name="random_entry", requirements={"_locale": "unread|starred|archive|untagged|all"}) + * @Route("/{type}/random", name="random_entry", requirements={"type": "unread|starred|archive|untagged|all"}) * * @return \Symfony\Component\HttpFoundation\RedirectResponse */ diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index 879e66719..fabb19638 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php @@ -325,8 +325,8 @@ class EntryRepository extends EntityRepository * Find an entry by its url and its owner. * If it exists, return the entry otherwise return false. * - * @param $url - * @param $userId + * @param string $url + * @param int $userId * * @return Entry|bool */ @@ -417,8 +417,8 @@ class EntryRepository extends EntityRepository /** * Find all entries by url and owner. * - * @param $url - * @param $userId + * @param string $url + * @param int $userId * * @return array */ @@ -434,20 +434,17 @@ class EntryRepository extends EntityRepository /** * Returns a random entry, filtering by status. * - * @param $userId - * @param string $type can be unread, archive, starred, etc + * @param int $userId + * @param string $type Can be unread, archive, starred, etc * * @throws \Doctrine\ORM\NoResultException - * @throws \Doctrine\ORM\NonUniqueResultException - * - * @see https://github.com/doctrine/doctrine2/issues/5479#issuecomment-403862934 * * @return Entry */ public function getRandomEntry($userId, $type = '') { $qb = $this->getQueryBuilderByUser($userId) - ->select('MIN(e.id)', 'MAX(e.id)'); + ->select('e.id'); switch ($type) { case 'unread': @@ -465,18 +462,12 @@ class EntryRepository extends EntityRepository break; } - $idLimits = $qb - ->getQuery() - ->getOneOrNullResult(); - $randomPossibleIds = rand($idLimits[1], $idLimits[2]); + $ids = $qb->getQuery()->getArrayResult(); - return $qb - ->select('e') - ->andWhere('e.id >= :random_id') - ->setParameter('random_id', $randomPossibleIds) - ->setMaxResults(1) - ->getQuery() - ->getSingleResult(); + // random select one in the list + $randomId = $ids[mt_rand(0, \count($ids) - 1)]['id']; + + return $this->find($randomId); } /** diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml index 0099148af..5a770dffb 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml @@ -37,6 +37,7 @@ menu: add_new_entry: 'Tilføj ny artikel' search: 'Søg' filter_entries: 'Filtrer artikler' + # random_entry: Jump to a random entry from that list # export: 'Export' search_form: input_label: 'Indtast søgning' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml index 5e531b781..2ae8f08ec 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml @@ -37,6 +37,7 @@ menu: add_new_entry: 'Neuen Artikel hinzufügen' search: 'Suche' filter_entries: 'Artikel filtern' + # random_entry: Jump to a random entry from that list export: 'Exportieren' search_form: input_label: 'Suchbegriff hier eingeben' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml index 2b952bd50..d1d741591 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml @@ -37,6 +37,7 @@ menu: add_new_entry: 'Add a new entry' search: 'Search' filter_entries: 'Filter entries' + random_entry: Jump to a random entry from that list export: 'Export' search_form: input_label: 'Enter your search here' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml index 2e2fbb936..741d3e9f3 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml @@ -37,6 +37,7 @@ menu: add_new_entry: 'Añadir un nuevo artículo' search: 'Buscar' filter_entries: 'Filtrar los artículos' + # random_entry: Jump to a random entry from that list export: 'Exportar' search_form: input_label: 'Introduzca su búsqueda aquí' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml index c58bbccb4..2ef5dd528 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml @@ -37,6 +37,7 @@ menu: add_new_entry: 'افزودن مقالهٔ تازه' search: 'جستجو' filter_entries: 'فیلترکردن مقاله‌ها' + # random_entry: Jump to a random entry from that list export: 'برون‌بری' search_form: input_label: 'جستجوی خود را این‌جا بنویسید:' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index c3887f241..7a2029b45 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml @@ -37,6 +37,7 @@ menu: add_new_entry: "Sauvegarder un nouvel article" search: "Rechercher" filter_entries: "Filtrer les articles" + random_entry: Aller à un article aléatoire de cette liste export: "Exporter" search_form: input_label: "Saisissez votre terme de recherche" diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml index c2135ac01..3a4594455 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml @@ -37,6 +37,7 @@ menu: add_new_entry: 'Aggiungi un nuovo contenuto' search: 'Cerca' filter_entries: 'Filtra contenuti' + # random_entry: Jump to a random entry from that list export: 'Esporta' search_form: input_label: 'Inserisci qui la tua ricerca' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml index 6e2c1cf93..9df9e6456 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml @@ -37,6 +37,7 @@ menu: add_new_entry: 'Enregistrar un novèl article' search: 'Cercar' filter_entries: 'Filtrar los articles' + # random_entry: Jump to a random entry from that list export: 'Exportar' search_form: input_label: 'Picatz vòstre mot-clau a cercar aquí' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml index 18156cbea..684c40e28 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml @@ -37,6 +37,7 @@ menu: add_new_entry: 'Dodaj nowy wpis' search: 'Szukaj' filter_entries: 'Filtruj wpisy' + # random_entry: Jump to a random entry from that list export: 'Eksportuj' search_form: input_label: 'Wpisz swoje zapytanie tutaj' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml index 8493af476..7932d7ab0 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml @@ -37,6 +37,7 @@ menu: add_new_entry: 'Adicionar uma nova entrada' search: 'Pesquisa' filter_entries: 'Filtrar entradas' + # random_entry: Jump to a random entry from that list export: 'Exportar' search_form: input_label: 'Digite aqui sua pesquisa' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml index 8fba13dce..4d091f031 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml @@ -37,6 +37,7 @@ menu: add_new_entry: 'Introdu un nou articol' search: 'Căutare' filter_entries: 'Filtrează articolele' + # random_entry: Jump to a random entry from that list # export: 'Export' search_form: input_label: 'Introdu căutarea ta' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml index 56a63b142..cc327ae48 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml @@ -36,6 +36,7 @@ menu: add_new_entry: 'Добавить новую запись' search: 'Поиск' filter_entries: 'Фильтр записей' + # random_entry: Jump to a random entry from that list export: 'Экспорт' search_form: input_label: 'Введите текст для поиска' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml index 9f0a65325..148aa5411 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml @@ -37,6 +37,7 @@ menu: add_new_entry: 'เพิ่มรายการใหม่' search: 'ค้นหา' filter_entries: 'ตัวกรองรายการ' + # random_entry: Jump to a random entry from that list export: 'นำข้อมูลออก' search_form: input_label: 'ค้นหาที่นี้' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml index a2093223c..6fb9852a3 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml @@ -37,6 +37,7 @@ menu: add_new_entry: 'Yeni bir makale ekle' search: 'Ara' filter_entries: 'Filtrele' + # random_entry: Jump to a random entry from that list export: 'Dışa Aktar' search_form: input_label: 'Aramak istediğiniz herhangi bir şey yazın' diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig index f3baae2c7..549d60e7f 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig @@ -28,10 +28,12 @@
{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}
diff --git a/web/wallassets/material.js b/web/wallassets/material.js index f476dbe7d..7bce51de8 100644 --- a/web/wallassets/material.js +++ b/web/wallassets/material.js @@ -1 +1 @@ -!function(e){function __webpack_require__(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,__webpack_require__),i.l=!0,i.exports}var t={};__webpack_require__.m=e,__webpack_require__.c=t,__webpack_require__.i=function(e){return e},__webpack_require__.d=function(e,t,n){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=234)}([function(e,t,n){var i,r;!function(t,n){"object"==typeof e&&"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(n,a){function isArrayLike(e){var t=!!e&&"length"in e&&e.length,n=h.type(e);return"function"!==n&&!h.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function winnow(e,t,n){if(h.isFunction(t))return h.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return h.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(w.test(t))return h.filter(t,e,n);t=h.filter(t,e)}return h.grep(e,function(e){return u.call(t,e)>-1!==n})}function sibling(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function createOptions(e){var t={};return h.each(e.match(A)||[],function(e,n){t[n]=!0}),t}function completed(){s.removeEventListener("DOMContentLoaded",completed),n.removeEventListener("load",completed),h.ready()}function Data(){this.expando=h.expando+Data.uid++}function dataAttr(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(B,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(i))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:F.test(n)?h.parseJSON(n):n)}catch(e){}L.set(e,t,n)}else n=void 0;return n}function adjustCSS(e,t,n,i){var r,a=1,o=20,s=i?function(){return i.cur()}:function(){return h.css(e,t,"")},l=s(),c=n&&n[3]||(h.cssNumber[t]?"":"px"),d=(h.cssNumber[t]||"px"!==c&&+l)&&U.exec(h.css(e,t));if(d&&d[3]!==c){c=c||d[3],n=n||[],d=+l||1;do{a=a||".5",d/=a,h.style(e,t,d+c)}while(a!==(a=s()/l)&&1!==a&&--o)}return n&&(d=+d||+l||0,r=n[1]?d+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=d,i.end=r)),r}function getAll(e,t){var n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&h.nodeName(e,t)?h.merge([e],n):n}function setGlobalEval(e,t){for(var n=0,i=e.length;n-1)r&&r.push(a);else if(c=h.contains(a.ownerDocument,a),o=getAll(u.appendChild(a),"script"),c&&setGlobalEval(o),n)for(d=0;a=o[d++];)W.test(a.type||"")&&n.push(a);return u}function returnTrue(){return!0}function returnFalse(){return!1}function safeActiveElement(){try{return s.activeElement}catch(e){}}function on(e,t,n,i,r,a){var o,s;if("object"==typeof t){"string"!=typeof n&&(i=i||n,n=void 0);for(s in t)on(e,s,n,i,t[s],a);return e}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=returnFalse;else if(!r)return e;return 1===a&&(o=r,r=function(e){return h().off(e),o.apply(this,arguments)},r.guid=o.guid||(o.guid=h.guid++)),e.each(function(){h.event.add(this,t,r,i,n)})}function manipulationTarget(e,t){return h.nodeName(e,"table")&&h.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function disableScript(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function restoreScript(e){var t=ee.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function cloneCopyEvent(e,t){var n,i,r,a,o,s,l,c;if(1===t.nodeType){if(P.hasData(e)&&(a=P.access(e),o=P.set(t,a),c=a.events)){delete o.handle,o.events={};for(r in c)for(n=0,i=c[r].length;n1&&"string"==typeof g&&!f.checkClone&&J.test(g))return e.each(function(r){var a=e.eq(r);b&&(t[0]=g.call(this,r,a.html())),domManip(a,t,n,i)});if(p&&(r=buildFragment(t,e[0].ownerDocument,!1,e,i),a=r.firstChild,1===r.childNodes.length&&(r=a),a||i)){for(o=h.map(getAll(r,"script"),disableScript),s=o.length;u")).appendTo(t.documentElement),t=ne[0].contentDocument,t.write(),t.close(),n=actualDisplay(e,t),ne.detach()),ie[e]=n),n}function curCSS(e,t,n){var i,r,a,o,s=e.style;return n=n||oe(e),o=n?n.getPropertyValue(t)||n[t]:void 0,""!==o&&void 0!==o||h.contains(e.ownerDocument,e)||(o=h.style(e,t)),n&&!f.pixelMarginRight()&&ae.test(o)&&re.test(t)&&(i=s.width,r=s.minWidth,a=s.maxWidth,s.minWidth=s.maxWidth=s.width=o,o=n.width,s.width=i,s.minWidth=r,s.maxWidth=a),void 0!==o?o+"":o}function addGetHookIf(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function vendorPropName(e){if(e in me)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=pe.length;n--;)if((e=pe[n]+t)in me)return e}function setPositiveNumber(e,t,n){var i=U.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function augmentWidthOrHeight(e,t,n,i,r){for(var a=n===(i?"border":"content")?4:"width"===t?1:0,o=0;a<4;a+=2)"margin"===n&&(o+=h.css(e,n+G[a],!0,r)),i?("content"===n&&(o-=h.css(e,"padding"+G[a],!0,r)),"margin"!==n&&(o-=h.css(e,"border"+G[a]+"Width",!0,r))):(o+=h.css(e,"padding"+G[a],!0,r),"padding"!==n&&(o+=h.css(e,"border"+G[a]+"Width",!0,r)));return o}function getWidthOrHeight(e,t,n){var i=!0,r="width"===t?e.offsetWidth:e.offsetHeight,a=oe(e),o="border-box"===h.css(e,"boxSizing",!1,a);if(r<=0||null==r){if(r=curCSS(e,t,a),(r<0||null==r)&&(r=e.style[t]),ae.test(r))return r;i=o&&(f.boxSizingReliable()||r===e.style[t]),r=parseFloat(r)||0}return r+augmentWidthOrHeight(e,t,n||(o?"border":"content"),i,a)+"px"}function showHide(e,t){for(var n,i,r,a=[],o=0,s=e.length;o=0&&n=0},isPlainObject:function(e){var t;if("object"!==h.type(e)||e.nodeType||h.isWindow(e))return!1;if(e.constructor&&!g.call(e,"constructor")&&!g.call(e.constructor.prototype||{},"isPrototypeOf"))return!1;for(t in e);return void 0===t||g.call(e,t)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?p[m.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;(e=h.trim(e))&&(1===e.indexOf("use strict")?(t=s.createElement("script"),t.text=e,s.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(v,"ms-").replace(_,y)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,i=0;if(isArrayLike(e))for(n=e.length;ii.cacheLength&&delete cache[e.shift()],cache[t+" "]=n}var e=[];return cache}function markFunction(e){return e[y]=!0,e}function assert(e){var t=m.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function addHandle(e,t){for(var n=e.split("|"),r=n.length;r--;)i.attrHandle[n[r]]=t}function siblingCheck(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function createPositionalPseudo(e){return markFunction(function(t){return t=+t,markFunction(function(n,i){for(var r,a=e([],n.length,t),o=a.length;o--;)n[r=a[o]]&&(n[r]=!(i[r]=n[r]))})})}function testContext(e){return e&&void 0!==e.getElementsByTagName&&e}function setFilters(){}function toSelector(e){for(var t=0,n=e.length,i="";t1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function multipleContexts(e,t,n){for(var i=0,r=t.length;i-1&&(a[c]=!(o[c]=u))}}else b=condense(b===o?b.splice(g,b.length):b),r?r(null,o,b,l):k.apply(o,b)})}function matcherFromTokens(e){for(var t,n,r,a=e.length,o=i.relative[e[0].type],s=o||i.relative[" "],l=o?1:0,d=addCombinator(function(e){return e===t},s,!0),u=addCombinator(function(e){return P(t,e)>-1},s,!0),p=[function(e,n,i){var r=!o&&(i||n!==c)||((t=n).nodeType?d(e,n,i):u(e,n,i));return t=null,r}];l1&&elementMatcher(p),l>1&&toSelector(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,l0,r=e.length>0,a=function(a,o,s,l,d){var u,g,h,b=0,v="0",_=a&&[],y=[],E=c,C=a||r&&i.find.TAG("*",d),T=S+=null==E?1:Math.random()||.1,x=C.length;for(d&&(c=o===m||o||d);v!==x&&null!=(u=C[v]);v++){if(r&&u){for(g=0,o||u.ownerDocument===m||(p(u),s=!f);h=e[g++];)if(h(u,o||m,s)){l.push(u);break}d&&(S=T)}n&&((u=!h&&u)&&b--,a&&_.push(u))}if(b+=v,n&&v!==b){for(g=0;h=t[g++];)h(_,y,o,s);if(a){if(b>0)for(;v--;)_[v]||y[v]||(y[v]=A.call(l));y=condense(y)}k.apply(l,y),d&&!a&&y.length>0&&b+t.length>1&&Sizzle.uniqueSort(l)}return d&&(S=T,c=E),_};return n?markFunction(a):a}var t,n,i,r,a,o,s,l,c,d,u,p,m,g,f,h,b,v,_,y="sizzle"+1*new Date,E=e.document,S=0,C=0,T=createCache(),x=createCache(),w=createCache(),N=function(e,t){return e===t&&(u=!0),0},D=1<<31,M={}.hasOwnProperty,O=[],A=O.pop,I=O.push,k=O.push,R=O.slice,P=function(e,t){for(var n=0,i=e.length;n+~]|"+F+")"+F+"*"),W=new RegExp("="+F+"*([^\\]'\"]*?)"+F+"*\\]","g"),V=new RegExp(U),j=new RegExp("^"+B+"$"),K={ID:new RegExp("^#("+B+")"),CLASS:new RegExp("^\\.("+B+")"),TAG:new RegExp("^("+B+"|[*])"),ATTR:new RegExp("^"+q),PSEUDO:new RegExp("^"+U),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+F+"*(even|odd|(([+-]|)(\\d*)n|)"+F+"*(?:([+-]|)"+F+"*(\\d+)|))"+F+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+F+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+F+"*((?:-\\d)?\\d*)"+F+"*\\)|)(?=[^-]|$)","i")},Q=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,Y=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,J=/[+~]/,ee=/'|\\/g,te=new RegExp("\\\\([\\da-f]{1,6}"+F+"?|("+F+")|.)","ig"),ne=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},ie=function(){p()};try{k.apply(O=R.call(E.childNodes),E.childNodes),O[E.childNodes.length].nodeType}catch(e){k={apply:O.length?function(e,t){I.apply(e,R.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}n=Sizzle.support={},a=Sizzle.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},p=Sizzle.setDocument=function(e){var t,r,o=e?e.ownerDocument||e:E;return o!==m&&9===o.nodeType&&o.documentElement?(m=o,g=m.documentElement,f=!a(m),(r=m.defaultView)&&r.top!==r&&(r.addEventListener?r.addEventListener("unload",ie,!1):r.attachEvent&&r.attachEvent("onunload",ie)),n.attributes=assert(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=assert(function(e){return e.appendChild(m.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Z.test(m.getElementsByClassName),n.getById=assert(function(e){return g.appendChild(e).id=y,!m.getElementsByName||!m.getElementsByName(y).length}),n.getById?(i.find.ID=function(e,t){if(void 0!==t.getElementById&&f){var n=t.getElementById(e);return n?[n]:[]}},i.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}}):(delete i.find.ID,i.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}}),i.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,i=[],r=0,a=t.getElementsByTagName(e);if("*"===e){for(;n=a[r++];)1===n.nodeType&&i.push(n);return i}return a},i.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&f)return t.getElementsByClassName(e)},b=[],h=[],(n.qsa=Z.test(m.querySelectorAll))&&(assert(function(e){g.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&h.push("[*^$]="+F+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||h.push("\\["+F+"*(?:value|"+L+")"),e.querySelectorAll("[id~="+y+"-]").length||h.push("~="),e.querySelectorAll(":checked").length||h.push(":checked"),e.querySelectorAll("a#"+y+"+*").length||h.push(".#.+[+~]")}),assert(function(e){var t=m.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&h.push("name"+F+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(n.matchesSelector=Z.test(v=g.matches||g.webkitMatchesSelector||g.mozMatchesSelector||g.oMatchesSelector||g.msMatchesSelector))&&assert(function(e){n.disconnectedMatch=v.call(e,"div"),v.call(e,"[s!='']:x"),b.push("!=",U)}),h=h.length&&new RegExp(h.join("|")),b=b.length&&new RegExp(b.join("|")),t=Z.test(g.compareDocumentPosition),_=t||Z.test(g.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},N=t?function(e,t){if(e===t)return u=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i||(i=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&i||!n.sortDetached&&t.compareDocumentPosition(e)===i?e===m||e.ownerDocument===E&&_(E,e)?-1:t===m||t.ownerDocument===E&&_(E,t)?1:d?P(d,e)-P(d,t):0:4&i?-1:1)}:function(e,t){if(e===t)return u=!0,0;var n,i=0,r=e.parentNode,a=t.parentNode,o=[e],s=[t];if(!r||!a)return e===m?-1:t===m?1:r?-1:a?1:d?P(d,e)-P(d,t):0;if(r===a)return siblingCheck(e,t);for(n=e;n=n.parentNode;)o.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;o[i]===s[i];)i++;return i?siblingCheck(o[i],s[i]):o[i]===E?-1:s[i]===E?1:0},m):m},Sizzle.matches=function(e,t){return Sizzle(e,null,null,t)},Sizzle.matchesSelector=function(e,t){if((e.ownerDocument||e)!==m&&p(e),t=t.replace(W,"='$1']"),n.matchesSelector&&f&&!w[t+" "]&&(!b||!b.test(t))&&(!h||!h.test(t)))try{var i=v.call(e,t);if(i||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){}return Sizzle(t,m,null,[e]).length>0},Sizzle.contains=function(e,t){return(e.ownerDocument||e)!==m&&p(e),_(e,t)},Sizzle.attr=function(e,t){(e.ownerDocument||e)!==m&&p(e);var r=i.attrHandle[t.toLowerCase()],a=r&&M.call(i.attrHandle,t.toLowerCase())?r(e,t,!f):void 0;return void 0!==a?a:n.attributes||!f?e.getAttribute(t):(a=e.getAttributeNode(t))&&a.specified?a.value:null},Sizzle.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},Sizzle.uniqueSort=function(e){var t,i=[],r=0,a=0;if(u=!n.detectDuplicates,d=!n.sortStable&&e.slice(0),e.sort(N),u){for(;t=e[a++];)t===e[a]&&(r=i.push(a));for(;r--;)e.splice(i[r],1)}return d=null,e},r=Sizzle.getText=function(e){var t,n="",i=0,a=e.nodeType;if(a){if(1===a||9===a||11===a){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=r(e)}else if(3===a||4===a)return e.nodeValue}else for(;t=e[i++];)n+=r(t);return n},i=Sizzle.selectors={cacheLength:50,createPseudo:markFunction,match:K,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]||Sizzle.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]&&Sizzle.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return K.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&V.test(n)&&(t=o(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=T[e+" "];return t||(t=new RegExp("(^|"+F+")"+e+"("+F+"|$)"))&&T(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(i){var r=Sizzle.attr(i,e);return null==r?"!="===t:!t||(r+="","="===t?r===n:"!="===t?r!==n:"^="===t?n&&0===r.indexOf(n):"*="===t?n&&r.indexOf(n)>-1:"$="===t?n&&r.slice(-n.length)===n:"~="===t?(" "+r.replace(G," ")+" ").indexOf(n)>-1:"|="===t&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,i,r){var a="nth"!==e.slice(0,3),o="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var c,d,u,p,m,g,f=a!==o?"nextSibling":"previousSibling",h=t.parentNode,b=s&&t.nodeName.toLowerCase(),v=!l&&!s,_=!1;if(h){if(a){for(;f;){for(p=t;p=p[f];)if(s?p.nodeName.toLowerCase()===b:1===p.nodeType)return!1;g=f="only"===e&&!g&&"nextSibling"}return!0}if(g=[o?h.firstChild:h.lastChild],o&&v){for(p=h,u=p[y]||(p[y]={}),d=u[p.uniqueID]||(u[p.uniqueID]={}),c=d[e]||[],m=c[0]===S&&c[1],_=m&&c[2],p=m&&h.childNodes[m];p=++m&&p&&p[f]||(_=m=0)||g.pop();)if(1===p.nodeType&&++_&&p===t){d[e]=[S,m,_];break}}else if(v&&(p=t,u=p[y]||(p[y]={}),d=u[p.uniqueID]||(u[p.uniqueID]={}),c=d[e]||[],m=c[0]===S&&c[1],_=m),!1===_)for(;(p=++m&&p&&p[f]||(_=m=0)||g.pop())&&((s?p.nodeName.toLowerCase()!==b:1!==p.nodeType)||!++_||(v&&(u=p[y]||(p[y]={}),d=u[p.uniqueID]||(u[p.uniqueID]={}),d[e]=[S,_]),p!==t)););return(_-=r)===i||_%i==0&&_/i>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||Sizzle.error("unsupported pseudo: "+e);return r[y]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?markFunction(function(e,n){for(var i,a=r(e,t),o=a.length;o--;)i=P(e,a[o]),e[i]=!(n[i]=a[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:markFunction(function(e){var t=[],n=[],i=s(e.replace(z,"$1"));return i[y]?markFunction(function(e,t,n,r){for(var a,o=i(e,null,r,[]),s=e.length;s--;)(a=o[s])&&(e[s]=!(t[s]=a))}):function(e,r,a){return t[0]=e,i(t,null,a,n),t[0]=null,!n.pop()}}),has:markFunction(function(e){return function(t){return Sizzle(e,t).length>0}}),contains:markFunction(function(e){return e=e.replace(te,ne),function(t){return(t.textContent||t.innerText||r(t)).indexOf(e)>-1}}),lang:markFunction(function(e){return j.test(e||"")||Sizzle.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=f?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===g},focus:function(e){return e===m.activeElement&&(!m.hasFocus||m.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},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!i.pseudos.empty(e)},header:function(e){return X.test(e.nodeName)},input:function(e){return Q.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:createPositionalPseudo(function(){return[0]}),last:createPositionalPseudo(function(e,t){return[t-1]}),eq:createPositionalPseudo(function(e,t,n){return[n<0?n+t:n]}),even:createPositionalPseudo(function(e,t){for(var n=0;n=0;)e.push(i);return e}),gt:createPositionalPseudo(function(e,t,n){for(var i=n<0?n+t:n;++i2&&"ID"===(d=c[0]).type&&n.getById&&9===t.nodeType&&f&&i.relative[c[1].type]){if(!(t=(i.find.ID(d.matches[0].replace(te,ne),t)||[])[0]))return r;m&&(t=t.parentNode),e=e.slice(c.shift().value.length)}for(l=K.needsContext.test(e)?0:c.length;l--&&(d=c[l],!i.relative[u=d.type]);)if((p=i.find[u])&&(a=p(d.matches[0].replace(te,ne),J.test(c[0].type)&&testContext(t.parentNode)||t))){if(c.splice(l,1),!(e=a.length&&toSelector(c)))return k.apply(r,a),r;break}}return(m||s(e,g))(a,t,!f,r,!t||J.test(e)&&testContext(t.parentNode)||t),r},n.sortStable=y.split("").sort(N).join("")===y,n.detectDuplicates=!!u,p(),n.sortDetached=assert(function(e){return 1&e.compareDocumentPosition(m.createElement("div"))}),assert(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||addHandle("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&assert(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||addHandle("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),assert(function(e){return null==e.getAttribute("disabled")})||addHandle(L,function(e,t,n){var i;if(!n)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),Sizzle}(n);h.find=E,h.expr=E.selectors,h.expr[":"]=h.expr.pseudos,h.uniqueSort=h.unique=E.uniqueSort,h.text=E.getText,h.isXMLDoc=E.isXML,h.contains=E.contains;var S=function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&h(e).is(n))break;i.push(e)}return i},C=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},T=h.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;h.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?h.find.matchesSelector(i,e)?[i]:[]:h.find.matches(e,h.grep(t,function(e){return 1===e.nodeType}))},h.fn.extend({find:function(e){var t,n=this.length,i=[],r=this;if("string"!=typeof e)return this.pushStack(h(e).filter(function(){for(t=0;t1?h.unique(i):i),i.selector=this.selector?this.selector+" "+e:e,i},filter:function(e){return this.pushStack(winnow(this,e||[],!1))},not:function(e){return this.pushStack(winnow(this,e||[],!0))},is:function(e){return!!winnow(this,"string"==typeof e&&T.test(e)?h(e):e||[],!1).length}});var N,D=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(h.fn.init=function(e,t,n){var i,r;if(!e)return this;if(n=n||N,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:D.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof h?t[0]:t,h.merge(this,h.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:s,!0)),x.test(i[1])&&h.isPlainObject(t))for(i in t)h.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return r=s.getElementById(i[2]),r&&r.parentNode&&(this.length=1,this[0]=r),this.context=s,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):h.isFunction(e)?void 0!==n.ready?n.ready(e):e(h):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),h.makeArray(e,this))}).prototype=h.fn,N=h(s);var M=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};h.fn.extend({has:function(e){var t=h(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&h.find.matchesSelector(n,e))){a.push(n);break}return this.pushStack(a.length>1?h.uniqueSort(a):a)},index:function(e){return e?"string"==typeof e?u.call(h(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(h.uniqueSort(h.merge(this.get(),h(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),h.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return S(e,"parentNode")},parentsUntil:function(e,t,n){return S(e,"parentNode",n)},next:function(e){return sibling(e,"nextSibling")},prev:function(e){return sibling(e,"previousSibling")},nextAll:function(e){return S(e,"nextSibling")},prevAll:function(e){return S(e,"previousSibling")},nextUntil:function(e,t,n){return S(e,"nextSibling",n)},prevUntil:function(e,t,n){return S(e,"previousSibling",n)},siblings:function(e){return C((e.parentNode||{}).firstChild,e)},children:function(e){return C(e.firstChild)},contents:function(e){return e.contentDocument||h.merge([],e.childNodes)}},function(e,t){h.fn[e]=function(n,i){var r=h.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=h.filter(i,r)),this.length>1&&(O[e]||h.uniqueSort(r),M.test(e)&&r.reverse()),this.pushStack(r)}});var A=/\S+/g;h.Callbacks=function(e){e="string"==typeof e?createOptions(e):h.extend({},e);var t,n,i,r,a=[],o=[],s=-1,l=function(){for(r=e.once,i=t=!0;o.length;s=-1)for(n=o.shift();++s-1;)a.splice(n,1),n<=s&&s--}),this},has:function(e){return e?h.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return r=o=[],a=n="",this},disabled:function(){return!a},lock:function(){return r=o=[],n||(a=n=""),this},locked:function(){return!!r},fireWith:function(e,n){return r||(n=n||[],n=[e,n.slice?n.slice():n],o.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},h.extend({Deferred:function(e){var t=[["resolve","done",h.Callbacks("once memory"),"resolved"],["reject","fail",h.Callbacks("once memory"),"rejected"],["notify","progress",h.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var e=arguments;return h.Deferred(function(n){h.each(t,function(t,a){var o=h.isFunction(e[t])&&e[t];r[a[1]](function(){var e=o&&o.apply(this,arguments);e&&h.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[a[0]+"With"](this===i?n.promise():this,o?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?h.extend(e,i):i}},r={};return i.pipe=i.then,h.each(t,function(e,a){var o=a[2],s=a[3];i[a[1]]=o.add,s&&o.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),r[a[0]]=function(){return r[a[0]+"With"](this===r?i:this,arguments),this},r[a[0]+"With"]=o.fireWith}),i.promise(r),e&&e.call(r,r),r},when:function(e){var t,n,i,r=0,a=l.call(arguments),o=a.length,s=1!==o||e&&h.isFunction(e.promise)?o:0,c=1===s?e:h.Deferred(),d=function(e,n,i){return function(r){n[e]=this,i[e]=arguments.length>1?l.call(arguments):r,i===t?c.notifyWith(n,i):--s||c.resolveWith(n,i)}};if(o>1)for(t=new Array(o),n=new Array(o),i=new Array(o);r0||(I.resolveWith(s,[h]),h.fn.triggerHandler&&(h(s).triggerHandler("ready"),h(s).off("ready"))))}}),h.ready.promise=function(e){return I||(I=h.Deferred(),"complete"===s.readyState||"loading"!==s.readyState&&!s.documentElement.doScroll?n.setTimeout(h.ready):(s.addEventListener("DOMContentLoaded",completed),n.addEventListener("load",completed))),I.promise(e)},h.ready.promise();var k=function(e,t,n,i,r,a,o){var s=0,l=e.length,c=null==n;if("object"===h.type(n)){r=!0;for(s in n)k(e,t,s,n[s],!0,a,o)}else if(void 0!==i&&(r=!0,h.isFunction(i)||(o=!0),c&&(o?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(h(e),n)})),t))for(;s-1&&void 0!==n&&L.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){L.remove(this,e)})}}),h.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=P.get(e,t),n&&(!i||h.isArray(n)?i=P.access(e,t,h.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=h.queue(e,t),i=n.length,r=n.shift(),a=h._queueHooks(e,t),o=function(){h.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete a.stop,r.call(e,o,a)),!i&&a&&a.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return P.get(e,n)||P.access(e,n,{empty:h.Callbacks("once memory").add(function(){P.remove(e,[t+"queue",n])})})}}),h.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length",""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};V.optgroup=V.option,V.tbody=V.tfoot=V.colgroup=V.caption=V.thead,V.th=V.td;var j=/<|&#?\w+;/;!function(){var e=s.createDocumentFragment(),t=e.appendChild(s.createElement("div")),n=s.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),f.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",f.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var K=/^key/,Q=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,X=/^([^.]*)(?:\.(.+)|)/;h.event={global:{},add:function(e,t,n,i,r){var a,o,s,l,c,d,u,p,m,g,f,b=P.get(e);if(b)for(n.handler&&(a=n,n=a.handler,r=a.selector),n.guid||(n.guid=h.guid++),(l=b.events)||(l=b.events={}),(o=b.handle)||(o=b.handle=function(t){return void 0!==h&&h.event.triggered!==t.type?h.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(A)||[""],c=t.length;c--;)s=X.exec(t[c])||[],m=f=s[1],g=(s[2]||"").split(".").sort(),m&&(u=h.event.special[m]||{},m=(r?u.delegateType:u.bindType)||m,u=h.event.special[m]||{},d=h.extend({type:m,origType:f,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&h.expr.match.needsContext.test(r),namespace:g.join(".")},a),(p=l[m])||(p=l[m]=[],p.delegateCount=0,u.setup&&!1!==u.setup.call(e,i,g,o)||e.addEventListener&&e.addEventListener(m,o)),u.add&&(u.add.call(e,d),d.handler.guid||(d.handler.guid=n.guid)),r?p.splice(p.delegateCount++,0,d):p.push(d),h.event.global[m]=!0)},remove:function(e,t,n,i,r){var a,o,s,l,c,d,u,p,m,g,f,b=P.hasData(e)&&P.get(e);if(b&&(l=b.events)){for(t=(t||"").match(A)||[""],c=t.length;c--;)if(s=X.exec(t[c])||[],m=f=s[1],g=(s[2]||"").split(".").sort(),m){for(u=h.event.special[m]||{},m=(i?u.delegateType:u.bindType)||m,p=l[m]||[],s=s[2]&&new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=a=p.length;a--;)d=p[a],!r&&f!==d.origType||n&&n.guid!==d.guid||s&&!s.test(d.namespace)||i&&i!==d.selector&&("**"!==i||!d.selector)||(p.splice(a,1),d.selector&&p.delegateCount--,u.remove&&u.remove.call(e,d));o&&!p.length&&(u.teardown&&!1!==u.teardown.call(e,g,b.handle)||h.removeEvent(e,m,b.handle),delete l[m])}else for(m in l)h.event.remove(e,m+t[c],n,i,!0);h.isEmptyObject(l)&&P.remove(e,"handle events")}},dispatch:function(e){e=h.event.fix(e);var t,n,i,r,a,o=[],s=l.call(arguments),c=(P.get(this,"events")||{})[e.type]||[],d=h.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!d.preDispatch||!1!==d.preDispatch.call(this,e)){for(o=h.event.handlers.call(this,e,c),t=0;(r=o[t++])&&!e.isPropagationStopped();)for(e.currentTarget=r.elem,n=0;(a=r.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(a.namespace)||(e.handleObj=a,e.data=a.data,void 0!==(i=((h.event.special[a.origType]||{}).handle||a.handler).apply(r.elem,s))&&!1===(e.result=i)&&(e.preventDefault(),e.stopPropagation()));return d.postDispatch&&d.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,i,r,a,o=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==e.type)){for(i=[],n=0;n-1:h.find(r,this,null,[l]).length),i[r]&&i.push(a);i.length&&o.push({elem:l,handlers:i})}return s]*)\/>/gi,Y=/\s*$/g;h.extend({htmlPrefilter:function(e){return e.replace(Z,"<$1>")},clone:function(e,t,n){var i,r,a,o,s=e.cloneNode(!0),l=h.contains(e.ownerDocument,e);if(!(f.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||h.isXMLDoc(e)))for(o=getAll(s),a=getAll(e),i=0,r=a.length;i0&&setGlobalEval(o,!l&&getAll(e,"script")),s},cleanData:function(e){for(var t,n,i,r=h.event.special,a=0;void 0!==(n=e[a]);a++)if(R(n)){if(t=n[P.expando]){if(t.events)for(i in t.events)r[i]?h.event.remove(n,i):h.removeEvent(n,i,t.handle);n[P.expando]=void 0}n[L.expando]&&(n[L.expando]=void 0)}}}),h.fn.extend({domManip:domManip,detach:function(e){return remove(this,e,!0)},remove:function(e){return remove(this,e)},text:function(e){return k(this,function(e){return void 0===e?h.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 domManip(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){manipulationTarget(this,e).appendChild(e)}})},prepend:function(){return domManip(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=manipulationTarget(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return domManip(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return domManip(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&&(h.cleanData(getAll(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return h.clone(this,e,t)})},html:function(e){return k(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Y.test(e)&&!V[($.exec(e)||["",""])[1].toLowerCase()]){e=h.htmlPrefilter(e);try{for(;n1)},show:function(){return showHide(this,!0)},hide:function(){return showHide(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){z(this)?h(this).show():h(this).hide()})}}),h.Tween=Tween,Tween.prototype={constructor:Tween,init:function(e,t,n,i,r,a){this.elem=e,this.prop=n,this.easing=r||h.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=a||(h.cssNumber[n]?"":"px")},cur:function(){var e=Tween.propHooks[this.prop];return e&&e.get?e.get(this):Tween.propHooks._default.get(this)},run:function(e){var t,n=Tween.propHooks[this.prop];return this.options.duration?this.pos=t=h.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):Tween.propHooks._default.set(this),this}},Tween.prototype.init.prototype=Tween.prototype,Tween.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=h.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){h.fx.step[e.prop]?h.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[h.cssProps[e.prop]]&&!h.cssHooks[e.prop]?e.elem[e.prop]=e.now:h.style(e.elem,e.prop,e.now+e.unit)}}},Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},h.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},h.fx=Tween.prototype.init,h.fx.step={};var ge,fe,he=/^(?:toggle|show|hide)$/,be=/queueHooks$/;h.Animation=h.extend(Animation,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return adjustCSS(n.elem,e,U.exec(t),n),n}]},tweener:function(e,t){h.isFunction(e)?(t=e,e=["*"]):e=e.match(A);for(var n,i=0,r=e.length;i1)},removeAttr:function(e){return this.each(function(){h.removeAttr(this,e)})}}),h.extend({attr:function(e,t,n){var i,r,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return void 0===e.getAttribute?h.prop(e,t,n):(1===a&&h.isXMLDoc(e)||(t=t.toLowerCase(),r=h.attrHooks[t]||(h.expr.match.bool.test(t)?ve:void 0)),void 0!==n?null===n?void h.removeAttr(e,t):r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(i=r.get(e,t))?i:(i=h.find.attr(e,t),null==i?void 0:i))},attrHooks:{type:{set:function(e,t){if(!f.radioValue&&"radio"===t&&h.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i,r=0,a=t&&t.match(A);if(a&&1===e.nodeType)for(;n=a[r++];)i=h.propFix[n]||n,h.expr.match.bool.test(n)&&(e[i]=!1),e.removeAttribute(n)}}),ve={set:function(e,t,n){return!1===t?h.removeAttr(e,n):e.setAttribute(n,n),n}},h.each(h.expr.match.bool.source.match(/\w+/g),function(e,t){var n=_e[t]||h.find.attr;_e[t]=function(e,t,i){var r,a;return i||(a=_e[t],_e[t]=r,r=null!=n(e,t,i)?t.toLowerCase():null,_e[t]=a),r}});var ye=/^(?:input|select|textarea|button)$/i,Ee=/^(?:a|area)$/i;h.fn.extend({prop:function(e,t){return k(this,h.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[h.propFix[e]||e]})}}),h.extend({prop:function(e,t,n){var i,r,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return 1===a&&h.isXMLDoc(e)||(t=h.propFix[t]||t,r=h.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=h.find.attr(e,"tabindex");return t?parseInt(t,10):ye.test(e.nodeName)||Ee.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),f.optSelected||(h.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)}}),h.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){h.propFix[this.toLowerCase()]=this});var Se=/[\t\r\n\f]/g;h.fn.extend({addClass:function(e){var t,n,i,r,a,o,s,l=0;if(h.isFunction(e))return this.each(function(t){h(this).addClass(e.call(this,t,getClass(this)))});if("string"==typeof e&&e)for(t=e.match(A)||[];n=this[l++];)if(r=getClass(n),i=1===n.nodeType&&(" "+r+" ").replace(Se," ")){for(o=0;a=t[o++];)i.indexOf(" "+a+" ")<0&&(i+=a+" ");s=h.trim(i),r!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,i,r,a,o,s,l=0;if(h.isFunction(e))return this.each(function(t){h(this).removeClass(e.call(this,t,getClass(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(A)||[];n=this[l++];)if(r=getClass(n),i=1===n.nodeType&&(" "+r+" ").replace(Se," ")){for(o=0;a=t[o++];)for(;i.indexOf(" "+a+" ")>-1;)i=i.replace(" "+a+" "," ");s=h.trim(i),r!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):h.isFunction(e)?this.each(function(n){h(this).toggleClass(e.call(this,n,getClass(this),t),t)}):this.each(function(){var t,i,r,a;if("string"===n)for(i=0,r=h(this),a=e.match(A)||[];t=a[i++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else void 0!==e&&"boolean"!==n||(t=getClass(this),t&&P.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":P.get(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+getClass(n)+" ").replace(Se," ").indexOf(t)>-1)return!0;return!1}});var Ce=/\r/g,Te=/[\x20\t\r\n\f]+/g;h.fn.extend({val:function(e){var t,n,i,r=this[0];{if(arguments.length)return i=h.isFunction(e),this.each(function(n){var r;1===this.nodeType&&(r=i?e.call(this,n,h(this).val()):e,null==r?r="":"number"==typeof r?r+="":h.isArray(r)&&(r=h.map(r,function(e){return null==e?"":e+""})),(t=h.valHooks[this.type]||h.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))});if(r)return(t=h.valHooks[r.type]||h.valHooks[r.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:(n=r.value,"string"==typeof n?n.replace(Ce,""):null==n?"":n)}}}),h.extend({valHooks:{option:{get:function(e){var t=h.find.attr(e,"value");return null!=t?t:h.trim(h.text(e)).replace(Te," ")}},select:{get:function(e){for(var t,n,i=e.options,r=e.selectedIndex,a="select-one"===e.type||r<0,o=a?null:[],s=a?r+1:i.length,l=r<0?s:a?r:0;l-1)&&(n=!0);return n||(e.selectedIndex=-1),a}}}}),h.each(["radio","checkbox"],function(){h.valHooks[this]={set:function(e,t){if(h.isArray(t))return e.checked=h.inArray(h(e).val(),t)>-1}},f.checkOn||(h.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var xe=/^(?:focusinfocus|focusoutblur)$/;h.extend(h.event,{trigger:function(e,t,i,r){var a,o,l,c,d,u,p,m=[i||s],f=g.call(e,"type")?e.type:e,b=g.call(e,"namespace")?e.namespace.split("."):[];if(o=l=i=i||s,3!==i.nodeType&&8!==i.nodeType&&!xe.test(f+h.event.triggered)&&(f.indexOf(".")>-1&&(b=f.split("."),f=b.shift(),b.sort()),d=f.indexOf(":")<0&&"on"+f,e=e[h.expando]?e:new h.Event(f,"object"==typeof e&&e),e.isTrigger=r?2:3,e.namespace=b.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),t=null==t?[e]:h.makeArray(t,[e]),p=h.event.special[f]||{},r||!p.trigger||!1!==p.trigger.apply(i,t))){if(!r&&!p.noBubble&&!h.isWindow(i)){for(c=p.delegateType||f,xe.test(c+f)||(o=o.parentNode);o;o=o.parentNode)m.push(o),l=o;l===(i.ownerDocument||s)&&m.push(l.defaultView||l.parentWindow||n)}for(a=0;(o=m[a++])&&!e.isPropagationStopped();)e.type=a>1?c:p.bindType||f,u=(P.get(o,"events")||{})[e.type]&&P.get(o,"handle"),u&&u.apply(o,t),(u=d&&o[d])&&u.apply&&R(o)&&(e.result=u.apply(o,t),!1===e.result&&e.preventDefault());return e.type=f,r||e.isDefaultPrevented()||p._default&&!1!==p._default.apply(m.pop(),t)||!R(i)||d&&h.isFunction(i[f])&&!h.isWindow(i)&&(l=i[d],l&&(i[d]=null),h.event.triggered=f,i[f](),h.event.triggered=void 0,l&&(i[d]=l)),e.result}},simulate:function(e,t,n){var i=h.extend(new h.Event,n,{type:e,isSimulated:!0});h.event.trigger(i,null,t)}}),h.fn.extend({trigger:function(e,t){return this.each(function(){h.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return h.event.trigger(e,t,n,!0)}}),h.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){h.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),h.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),f.focusin="onfocusin"in n,f.focusin||h.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){h.event.simulate(t,e.target,h.event.fix(e))};h.event.special[t]={setup:function(){var i=this.ownerDocument||this,r=P.access(i,t);r||i.addEventListener(e,n,!0),P.access(i,t,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=P.access(i,t)-1;r?P.access(i,t,r):(i.removeEventListener(e,n,!0),P.remove(i,t))}}});var we=n.location,Ne=h.now(),De=/\?/;h.parseJSON=function(e){return JSON.parse(e+"")},h.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||h.error("Invalid XML: "+e),t};var Me=/#.*$/,Oe=/([?&])_=[^&]*/,Ae=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ie=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ke=/^(?:GET|HEAD)$/,Re=/^\/\//,Pe={},Le={},Fe="*/".concat("*"),Be=s.createElement("a");Be.href=we.href,h.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:we.href,type:"GET",isLocal:Ie.test(we.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Fe,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":h.parseJSON,"text xml":h.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?ajaxExtend(ajaxExtend(e,h.ajaxSettings),t):ajaxExtend(h.ajaxSettings,e)},ajaxPrefilter:addToPrefiltersOrTransports(Pe),ajaxTransport:addToPrefiltersOrTransports(Le),ajax:function(e,t){function done(e,t,o,s){var c,u,_,y,S,T=t;2!==E&&(E=2,l&&n.clearTimeout(l),i=void 0,a=s||"",C.readyState=e>0?4:0,c=e>=200&&e<300||304===e,o&&(y=ajaxHandleResponses(p,C,o)),y=ajaxConvert(p,y,C,c),c?(p.ifModified&&(S=C.getResponseHeader("Last-Modified"),S&&(h.lastModified[r]=S),(S=C.getResponseHeader("etag"))&&(h.etag[r]=S)),204===e||"HEAD"===p.type?T="nocontent":304===e?T="notmodified":(T=y.state,u=y.data,_=y.error,c=!_)):(_=T,!e&&T||(T="error",e<0&&(e=0))),C.status=e,C.statusText=(t||T)+"",c?f.resolveWith(m,[u,T,C]):f.rejectWith(m,[C,T,_]),C.statusCode(v),v=void 0,d&&g.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?u:_]),b.fireWith(m,[C,T]),d&&(g.trigger("ajaxComplete",[C,p]),--h.active||h.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,r,a,o,l,c,d,u,p=h.ajaxSetup({},t),m=p.context||p,g=p.context&&(m.nodeType||m.jquery)?h(m):h.event,f=h.Deferred(),b=h.Callbacks("once memory"),v=p.statusCode||{},_={},y={},E=0,S="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===E){if(!o)for(o={};t=Ae.exec(a);)o[t[1].toLowerCase()]=t[2];t=o[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===E?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return E||(e=y[n]=y[n]||e,_[e]=t),this},overrideMimeType:function(e){return E||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(E<2)for(t in e)v[t]=[v[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||S;return i&&i.abort(t),done(0,t),this}};if(f.promise(C).complete=b.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||we.href)+"").replace(Me,"").replace(Re,we.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=h.trim(p.dataType||"*").toLowerCase().match(A)||[""],null==p.crossDomain){c=s.createElement("a");try{c.href=p.url,c.href=c.href,p.crossDomain=Be.protocol+"//"+Be.host!=c.protocol+"//"+c.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=h.param(p.data,p.traditional)),inspectPrefiltersOrTransports(Pe,p,t,C),2===E)return C;d=h.event&&p.global,d&&0==h.active++&&h.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!ke.test(p.type),r=p.url,p.hasContent||(p.data&&(r=p.url+=(De.test(r)?"&":"?")+p.data,delete p.data),!1===p.cache&&(p.url=Oe.test(r)?r.replace(Oe,"$1_="+Ne++):r+(De.test(r)?"&":"?")+"_="+Ne++)),p.ifModified&&(h.lastModified[r]&&C.setRequestHeader("If-Modified-Since",h.lastModified[r]),h.etag[r]&&C.setRequestHeader("If-None-Match",h.etag[r])),(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]?", "+Fe+"; q=0.01":""):p.accepts["*"]);for(u in p.headers)C.setRequestHeader(u,p.headers[u]);if(p.beforeSend&&(!1===p.beforeSend.call(m,C,p)||2===E))return C.abort();S="abort";for(u in{success:1,error:1,complete:1})C[u](p[u]);if(i=inspectPrefiltersOrTransports(Le,p,t,C)){if(C.readyState=1,d&&g.trigger("ajaxSend",[C,p]),2===E)return C;p.async&&p.timeout>0&&(l=n.setTimeout(function(){C.abort("timeout")},p.timeout));try{E=1,i.send(_,done)}catch(e){if(!(E<2))throw e;done(-1,e)}}else done(-1,"No Transport");return C},getJSON:function(e,t,n){return h.get(e,t,n,"json")},getScript:function(e,t){return h.get(e,void 0,t,"script")}}),h.each(["get","post"],function(e,t){h[t]=function(e,n,i,r){return h.isFunction(n)&&(r=r||i,i=n,n=void 0),h.ajax(h.extend({url:e,type:t,dataType:r,data:n,success:i},h.isPlainObject(e)&&e))}}),h._evalUrl=function(e){return h.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},h.fn.extend({wrapAll:function(e){var t;return h.isFunction(e)?this.each(function(t){h(this).wrapAll(e.call(this,t))}):(this[0]&&(t=h(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 h.isFunction(e)?this.each(function(t){h(this).wrapInner(e.call(this,t))}):this.each(function(){var t=h(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=h.isFunction(e);return this.each(function(n){h(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){h.nodeName(this,"body")||h(this).replaceWith(this.childNodes)}).end()}}),h.expr.filters.hidden=function(e){return!h.expr.filters.visible(e)},h.expr.filters.visible=function(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0};var qe=/%20/g,Ue=/\[\]$/,Ge=/\r?\n/g,ze=/^(?:submit|button|image|reset|file)$/i,He=/^(?:input|select|textarea|keygen)/i;h.param=function(e,t){var n,i=[],r=function(e,t){t=h.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=h.ajaxSettings&&h.ajaxSettings.traditional),h.isArray(e)||e.jquery&&!h.isPlainObject(e))h.each(e,function(){r(this.name,this.value)});else for(n in e)buildParams(n,e[n],t,r);return i.join("&").replace(qe,"+")},h.fn.extend({serialize:function(){return h.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=h.prop(this,"elements");return e?h.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!h(this).is(":disabled")&&He.test(this.nodeName)&&!ze.test(e)&&(this.checked||!H.test(e))}).map(function(e,t){var n=h(this).val();return null==n?null:h.isArray(n)?h.map(n,function(e){return{name:t.name,value:e.replace(Ge,"\r\n")}}):{name:t.name,value:n.replace(Ge,"\r\n")}}).get()}}),h.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var $e={0:200,1223:204},We=h.ajaxSettings.xhr();f.cors=!!We&&"withCredentials"in We,f.ajax=We=!!We,h.ajaxTransport(function(e){var t,i;if(f.cors||We&&!e.crossDomain)return{send:function(r,a){var o,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)s[o]=e.xhrFields[o];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(o in r)s.setRequestHeader(o,r[o]);t=function(e){return function(){t&&(t=i=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?a(0,"error"):a(s.status,s.statusText):a($e[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(),i=s.onerror=t("error"),void 0!==s.onabort?s.onabort=i:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout(function(){t&&i()})},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),h.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 h.globalEval(e),e}}}),h.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),h.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,r){t=h("