From 5c4ca884d0cdeb402de27a62f2ce2cb3e04d3733 Mon Sep 17 00:00:00 2001 From: Jordi Date: Sat, 1 May 2021 13:51:14 +0200 Subject: [PATCH] Improve jQuery code Avoid some deprecations and use anonymous functions as much as possible. Try to avoid using this, and instead use the parameters passed to the function. --- assets/js/Admin.js | 177 ++++++++++++++++---------------- assets/js/app.js | 4 +- assets/js/base.js | 2 +- assets/js/jquery.confirmExit.js | 4 +- assets/js/sidebar.js | 4 +- assets/js/treeview.js | 6 +- src/Resources/public/app.js | 2 +- 7 files changed, 97 insertions(+), 102 deletions(-) diff --git a/assets/js/Admin.js b/assets/js/Admin.js index 540271fb45..a8be9a0c88 100644 --- a/assets/js/Admin.js +++ b/assets/js/Admin.js @@ -48,7 +48,7 @@ const Admin = { } }, read_config() { - const data = $('[data-sonata-admin]').data('sonata-admin'); + const data = jQuery('[data-sonata-admin]').data('sonata-admin'); this.config = data.config; this.translations = data.translations; @@ -94,8 +94,8 @@ const Admin = { if (Admin.get_config('USE_SELECT2')) { Admin.log('[core|setup_select2] configure Select2 on', subject); - jQuery('select:not([data-sonata-select2="false"])', subject).each(function eachSetupSelect2() { - const select = jQuery(this); + jQuery('select:not([data-sonata-select2="false"])', subject).each((index, element) => { + const select = jQuery(element); let allowClearEnabled = false; const popover = select.data('popover'); let maximumSelectionSize = null; @@ -142,15 +142,10 @@ const Admin = { Admin.log('[core|setup_icheck] configure iCheck on', subject); const inputs = jQuery('input[type="checkbox"]:not(label.btn > input, [data-sonata-icheck="false"]), input[type="radio"]:not(label.btn > input, [data-sonata-icheck="false"])', subject); - inputs - .iCheck({ - checkboxClass: 'icheckbox_square-blue', - radioClass: 'iradio_square-blue', - }) - // See https://github.com/fronteed/iCheck/issues/244 - .on('ifToggled', (e) => { - $(e.target).trigger('change'); - }); + inputs.iCheck({ + checkboxClass: 'icheckbox_square-blue', + radioClass: 'iradio_square-blue', + }); // In case some checkboxes were already checked (for instance after moving // back in the browser's session history) update iCheck checkboxes. @@ -174,13 +169,13 @@ const Admin = { const useICheck = Admin.get_config('USE_ICHECK'); // When a checkbox or an iCheck helper is clicked - jQuery('tbody input[type="checkbox"], tbody .iCheck-helper', subject).click(function iCheckClick(event) { + jQuery('tbody input[type="checkbox"], tbody .iCheck-helper', subject).on('click', (event) => { let input; if (useICheck) { - input = jQuery(this).prev('input[type="checkbox"]'); + input = jQuery(event.target).prev('input[type="checkbox"]'); } else { - input = jQuery(this); + input = jQuery(event.target); } if (input.length) { @@ -190,16 +185,16 @@ const Admin = { const isChecked = jQuery(`tbody input[type="checkbox"]:nth(${currentIndex})`, subject).prop('checked'); // Check all checkbox between previous and current one clicked - jQuery('tbody input[type="checkbox"]', subject).each((i, e) => { - if ((i > previousIndex && i < currentIndex) - || (i > currentIndex && i < previousIndex)) { + jQuery('tbody input[type="checkbox"]', subject).each((index, element) => { + if ((index > previousIndex && index < currentIndex) + || (indexedDB > currentIndex && index < previousIndex)) { if (useICheck) { - jQuery(e).iCheck(isChecked ? 'check' : 'uncheck'); + jQuery(element).iCheck(isChecked ? 'check' : 'uncheck'); return; } - jQuery(e).prop('checked', isChecked); + jQuery(element).prop('checked', isChecked); } }); } @@ -266,23 +261,23 @@ const Admin = { jQuery('.sonata-filter-count', subject).text(count); } - jQuery('a.sonata-toggle-filter', subject).on('click', (e) => { - e.preventDefault(); - e.stopPropagation(); + jQuery('a.sonata-toggle-filter', subject).on('click', (event) => { + event.preventDefault(); + event.stopPropagation(); - if (jQuery(e.target).attr('sonata-filter') === 'false') { + if (jQuery(event.target).attr('sonata-filter') === 'false') { return; } - Admin.log('[core|add_filters] handle filter container: ', jQuery(e.target).attr('filter-container')); + Admin.log('[core|add_filters] handle filter container: ', jQuery(event.target).attr('filter-container')); - const filtersContainer = jQuery(`#${jQuery(e.currentTarget).attr('filter-container')}`); + const filtersContainer = jQuery(`#${jQuery(event.currentTarget).attr('filter-container')}`); if (jQuery('div[sonata-filter="true"]:visible', filtersContainer).length === 0) { jQuery(filtersContainer).slideDown(); } - const targetSelector = jQuery(e.currentTarget).attr('filter-target'); + const targetSelector = jQuery(event.currentTarget).attr('filter-target'); const target = jQuery(`div[id="${targetSelector}"]`, filtersContainer); const filterToggler = jQuery('i', `.sonata-toggle-filter[filter-target="${targetSelector}"]`); if (jQuery(target).is(':visible')) { @@ -308,22 +303,22 @@ const Admin = { updateCounter(); }); - jQuery('.sonata-filter-form', subject).on('submit', function filterFormSubmit() { - const $form = jQuery(this); + jQuery('.sonata-filter-form', subject).on('submit', (event) => { + const $form = jQuery(event.target); $form.find('[sonata-filter="true"]:hidden :input').val(''); - if (!this.dataset.defaultValues) { + if (!event.target.dataset.defaultValues) { return; } const defaults = Admin.convert_query_string_to_object( - $.param({ filter: JSON.parse(this.dataset.defaultValues) }), + jQuery.param({ filter: JSON.parse(event.target.dataset.defaultValues) }), ); // Keep only changed values - $form.find('[name*=filter]').each((_i, field) => { - if (JSON.stringify(defaults[field.name] || '') === JSON.stringify($(field).val())) { - field.removeAttribute('name'); + $form.find('[name*=filter]').each((index, element) => { + if (JSON.stringify(defaults[element.name] || '') === JSON.stringify(jQuery(element).val())) { + element.removeAttribute('name'); } }); }); @@ -333,7 +328,7 @@ const Admin = { jQuery('.advanced-filter').hide(); } - jQuery('[data-toggle="advanced-filter"]', subject).click(() => { + jQuery('[data-toggle="advanced-filter"]', subject).on('click', () => { jQuery('.advanced-filter').toggle(); }); @@ -348,9 +343,9 @@ const Admin = { Admin.log('[core|set_object_field_value] set value field on', subject); this.log(jQuery('a.sonata-ba-edit-inline', subject)); - jQuery('a.sonata-ba-edit-inline', subject).click(function editInlineClick(event) { + jQuery('a.sonata-ba-edit-inline', subject).on('click', (event) => { Admin.stopEvent(event); - const element = jQuery(this); + const element = jQuery(event.target); jQuery.ajax({ url: element.attr('href'), type: 'POST', @@ -374,11 +369,11 @@ const Admin = { // Count and save element of each collection const highestCounterRegexp = new RegExp('_([0-9]+)[^0-9]*$'); - jQuery(subject).find('[data-prototype]').each(function countCollection() { - const collection = jQuery(this); + jQuery(subject).find('[data-prototype]').each((index, element) => { + const collection = jQuery(element); let counter = -1; - collection.children().each(function countCollectionChildren() { - const matches = highestCounterRegexp.exec(jQuery('[id^="sonata-ba-field-container"]', this).attr('id')); + collection.children().each((collectionIndex, collectionElement) => { + const matches = highestCounterRegexp.exec(jQuery('[id^="sonata-ba-field-container"]', collectionElement).attr('id')); if (matches && matches[1] && matches[1] > counter) { counter = parseInt(matches[1], 10); } @@ -388,10 +383,10 @@ const Admin = { }, setup_collection_buttons(subject) { - jQuery(subject).on('click', '.sonata-collection-add', function collectionAdd(event) { + jQuery(subject).on('click', '.sonata-collection-add', (event) => { Admin.stopEvent(event); - const container = jQuery(this).closest('[data-prototype]'); + const container = jQuery(event.target).closest('[data-prototype]'); Admin.collectionCounters[container.attr('id')] += 1; @@ -407,17 +402,17 @@ const Admin = { const nameRegexp = new RegExp(`${parts[parts.length - 1]}\\]\\[${protoName}`, 'g'); proto = proto.replace(nameRegexp, `${parts[parts.length - 1]}][${counter}`); jQuery(proto) - .insertBefore(jQuery(this).parent()) + .insertBefore(jQuery(event.target).parent()) .trigger('sonata-admin-append-form-element'); - jQuery(this).trigger('sonata-collection-item-added'); + jQuery(event.target).trigger('sonata-collection-item-added'); }); - jQuery(subject).on('click', '.sonata-collection-delete', function collectionDelete(event) { + jQuery(subject).on('click', '.sonata-collection-delete', (event) => { Admin.stopEvent(event); - jQuery(this).trigger('sonata-collection-item-deleted'); + jQuery(event.target).trigger('sonata-collection-item-deleted'); - jQuery(this).closest('.sonata-collection-row').remove(); + jQuery(event.target).closest('.sonata-collection-row').remove(); jQuery(document).trigger('sonata-collection-item-deleted-successful'); }); @@ -426,7 +421,7 @@ const Admin = { setup_per_page_switcher(subject) { Admin.log('[core|setup_per_page_switcher] setup page switcher', subject); - jQuery('select.per-page').change(function changePerPage() { + jQuery('select.per-page').on('change', () => { jQuery('input[type=submit]').hide(); window.top.location.href = this.options[this.selectedIndex].value; @@ -437,18 +432,18 @@ const Admin = { Admin.log('[core|setup_form_tabs_for_errors] setup form tab\'s errors', subject); // Switch to first tab with server side validation errors on page load - jQuery('form', subject).each(function formTabWithErrors() { - Admin.show_form_first_tab_with_errors(jQuery(this), '.sonata-ba-field-error'); + jQuery('form', subject).each((index, element) => { + Admin.show_form_first_tab_with_errors(jQuery(element), '.sonata-ba-field-error'); }); // Switch to first tab with HTML5 errors on form submit jQuery(subject) - .on('click', 'form [type="submit"]', function submitFormTabWithErrors() { - Admin.show_form_first_tab_with_errors(jQuery(this).closest('form'), ':invalid'); + .on('click', 'form [type="submit"]', (event) => { + Admin.show_form_first_tab_with_errors(jQuery(event.target).closest('form'), ':invalid'); }) - .on('keypress', 'form [type="text"]', function keyPressFormTabWithErrors(e) { - if (e.which === 13) { - Admin.show_form_first_tab_with_errors(jQuery(this), ':invalid'); + .on('keypress', 'form [type="text"]', (event) => { + if (event.which === 13) { + Admin.show_form_first_tab_with_errors(jQuery(event.target), ':invalid'); } }); }, @@ -459,9 +454,9 @@ const Admin = { const tabs = form.find('.nav-tabs a'); let firstTabWithErrors; - tabs.each(function eachTab() { - const id = jQuery(this).attr('href'); - const tab = jQuery(this); + tabs.each((index, element) => { + const id = jQuery(element).attr('href'); + const tab = jQuery(element); const icon = tab.find('.has-errors'); if (jQuery(id).find(errorSelector).length > 0) { @@ -483,12 +478,12 @@ const Admin = { const deleteCheckboxSelector = '.sonata-ba-field-inline-table [id$="_delete"][type="checkbox"]'; - jQuery(deleteCheckboxSelector, subject).each(function eachDeleteCheckbox() { - Admin.switch_inline_form_errors(jQuery(this)); + jQuery(deleteCheckboxSelector, subject).each((index, element) => { + Admin.switch_inline_form_errors(jQuery(element)); }); - jQuery(subject).on('change', deleteCheckboxSelector, function onChangeSubject() { - Admin.switch_inline_form_errors(jQuery(this)); + jQuery(subject).on('change', deleteCheckboxSelector, (event) => { + Admin.switch_inline_form_errors(jQuery(event.target)); }); }, @@ -652,7 +647,7 @@ const Admin = { jQuery(footer).addClass('stuck'); } - jQuery(window).scroll( + jQuery(window).on('scroll', () => { Admin.debounce(() => { if (footer.length && Math.round(jQuery(window).scrollTop() + jQuery(window).height()) >= jQuery(document).height()) { @@ -662,8 +657,8 @@ const Admin = { if (navbar.length && jQuery(window).scrollTop() === 0) { jQuery(navbar).removeClass('stuck'); } - }, 250), - ); + }, 250); + }); jQuery('body').on('expanded.pushMenu collapsed.pushMenu', () => { // the animation takes 0.3s to execute, so we have to take the width, @@ -673,11 +668,11 @@ const Admin = { }, 350); }); - jQuery(window).resize( + jQuery(window).on('resize', () => { Admin.debounce(() => { Admin.handleResize(footer, navbar, wrapper); - }, 250), - ); + }, 250); + }); }, handleResize(footer, navbar, wrapper) { @@ -731,11 +726,13 @@ const Admin = { setup_readmore_elements(subject) { Admin.log('[core|setup_readmore_elements] setup readmore elements on', subject); - jQuery(subject).find('.sonata-readmore').each(function eachReadMore() { - jQuery(this).readmore({ - collapsedHeight: parseInt(jQuery(this).data('readmore-height'), 10), - moreLink: `${jQuery(this).data('readmore-more')}`, - lessLink: `${jQuery(this).data('readmore-less')}`, + jQuery(subject).find('.sonata-readmore').each((index, element) => { + const $element = jQuery(element); + + $element.readmore({ + collapsedHeight: parseInt($element.data('readmore-height'), 10), + moreLink: `${$element.data('readmore-more')}`, + lessLink: `${$element.data('readmore-less')}`, }); }); }, @@ -747,8 +744,8 @@ const Admin = { setup_form_submit(subject) { Admin.log('[core|setup_form_submit] setup form submit on', subject); - jQuery(subject).find('form').on('submit', function onSubmitForm() { - const form = jQuery(this); + jQuery(subject).find('form').on('submit', (event) => { + const form = jQuery(event.target); // this allows to submit forms and know which button was clicked setTimeout(() => { @@ -785,8 +782,8 @@ const Admin = { * Remember open tab after refreshing page. */ setup_view_tabs_changer() { - jQuery('.changer-tab').on('click', function onClickChangeTab() { - const tab = jQuery(this).attr('aria-controls'); + jQuery('.changer-tab').on('click', (event) => { + const tab = jQuery(event.target).attr('aria-controls'); const search = window.location.search.substring(1); /* Get query string parameters from URL */ @@ -815,15 +812,9 @@ const Admin = { window.Admin = Admin; -jQuery(document).ready(() => { - Admin.handle_top_navbar_height(); -}); - -jQuery(window).resize(() => { +jQuery(() => { Admin.handle_top_navbar_height(); -}); -jQuery(document).ready(() => { jQuery('html').removeClass('no-js'); Admin.setup_per_page_switcher(document); @@ -832,16 +823,20 @@ jQuery(document).ready(() => { Admin.shared_setup(document); }); -jQuery(document).on('sonata-admin-append-form-element', (e) => { - Admin.setup_select2(e.target); - Admin.setup_icheck(e.target); - Admin.setup_collection_counter(e.target); +jQuery(window).on('resize', () => { + Admin.handle_top_navbar_height(); +}); + +jQuery(document).on('sonata-admin-append-form-element', (event) => { + Admin.setup_select2(event.target); + Admin.setup_icheck(event.target); + Admin.setup_collection_counter(event.target); }); jQuery(window).on('load', () => { if (Admin.get_config('CONFIRM_EXIT')) { - jQuery('.sonata-ba-form form').each(function eachFormConfirmExit() { - jQuery(this).confirmExit(); + jQuery('.sonata-ba-form form').each((index, element) => { + jQuery(element).confirmExit(); }); } }); diff --git a/assets/js/app.js b/assets/js/app.js index c7c6b100b1..dc6676e62f 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -58,5 +58,5 @@ import './sidebar'; import './base'; // Create global $ and jQuery variables to be used outside this script -// eslint-disable-next-line -global.$ = global.jQuery = $; +global.$ = $; +global.jQuery = $; diff --git a/assets/js/base.js b/assets/js/base.js index 65fd2d3fdf..3e146f1e3e 100644 --- a/assets/js/base.js +++ b/assets/js/base.js @@ -30,7 +30,7 @@ const SonataCore = { }, }; -jQuery(document).ready(() => { +jQuery(() => { SonataCore.remove_iCheck_in_flashmessage(); SonataCore.addFlashmessageListener(); }); diff --git a/assets/js/jquery.confirmExit.js b/assets/js/jquery.confirmExit.js index 623d64a90d..81d7e5f8cc 100644 --- a/assets/js/jquery.confirmExit.js +++ b/assets/js/jquery.confirmExit.js @@ -23,8 +23,8 @@ jQuery(window).on('beforeunload', (event) => { const message = window.Admin.get_translations('CONFIRM_EXIT'); let changes = false; - jQuery('form[data-original]').each(function formDataOriginal() { - if (jQuery(this).attr('data-original') !== jQuery(this).serialize()) { + jQuery('form[data-original]').each((index, element) => { + if (jQuery(element).attr('data-original') !== jQuery(element).serialize()) { changes = true; } }); diff --git a/assets/js/sidebar.js b/assets/js/sidebar.js index 2e0ab2785a..2397de0a11 100644 --- a/assets/js/sidebar.js +++ b/assets/js/sidebar.js @@ -7,8 +7,8 @@ * file that was distributed with this source code. */ -jQuery(document).ready(() => { - $('.sidebar-toggle').click(() => { +jQuery(() => { + jQuery('.sidebar-toggle').on('click', () => { if (document.cookie.includes('sonata_sidebar_hide=1')) { document.cookie = 'sonata_sidebar_hide=0;path=/'; diff --git a/assets/js/treeview.js b/assets/js/treeview.js index 15d10c8b61..60b4ab5105 100644 --- a/assets/js/treeview.js +++ b/assets/js/treeview.js @@ -57,14 +57,14 @@ TreeView.prototype = { * Set events and delegates */ setEvents() { - this.$togglers.on('click', jQuery.proxy(this.toggle, this)); + this.$togglers.on('click', this.toggle.bind(this)); }, /** * Toggle an item */ - toggle(ev) { - const $target = jQuery(ev.currentTarget); + toggle(event) { + const $target = jQuery(event.currentTarget); const $parent = $target.parent(); $parent.toggleClass(this.options.toggledState); $parent.next('ul').slideToggle(); diff --git a/src/Resources/public/app.js b/src/Resources/public/app.js index b75164cee3..37d9fbeea4 100644 --- a/src/Resources/public/app.js +++ b/src/Resources/public/app.js @@ -1 +1 @@ -!function(){var e={3752:function(e,t,n){var i=n(9755);if(void 0===i)throw new Error("AdminLTE requires jQuery");!function(e){"use strict";function t(t,n){if(this.element=t,this.options=n,this.$overlay=e(n.overlayTemplate),""===n.source)throw new Error("Source url was not defined. Please specify a url in your BoxRefresh source option.");this._setUpListeners(),this.load()}var n="lte.boxrefresh",i={source:"",params:{},trigger:".refresh-btn",content:".box-body",loadInContent:!0,responseType:"",overlayTemplate:'
',onLoadStart:function(){},onLoadDone:function(e){return e}};function s(s){return this.each((function(){var a=e(this),o=a.data(n);if(!o){var r=e.extend({},i,a.data(),"object"==typeof s&&s);a.data(n,o=new t(a,r))}if("string"==typeof o){if(void 0===o[s])throw new Error("No method named "+s);o[s]()}}))}t.prototype.load=function(){this._addOverlay(),this.options.onLoadStart.call(e(this)),e.get(this.options.source,this.options.params,function(t){this.options.loadInContent&&e(this.element).find(this.options.content).html(t),this.options.onLoadDone.call(e(this),t),this._removeOverlay()}.bind(this),""!==this.options.responseType&&this.options.responseType)},t.prototype._setUpListeners=function(){e(this.element).on("click",this.options.trigger,function(e){e&&e.preventDefault(),this.load()}.bind(this))},t.prototype._addOverlay=function(){e(this.element).append(this.$overlay)},t.prototype._removeOverlay=function(){e(this.$overlay).remove()};var a=e.fn.boxRefresh;e.fn.boxRefresh=s,e.fn.boxRefresh.Constructor=t,e.fn.boxRefresh.noConflict=function(){return e.fn.boxRefresh=a,this},e(window).on("load",(function(){e('[data-widget="box-refresh"]').each((function(){s.call(e(this))}))}))}(i),function(e){"use strict";function t(e,t){this.element=e,this.options=t,this._setUpListeners()}var n="lte.boxwidget",i={animationSpeed:500,collapseTrigger:'[data-widget="collapse"]',removeTrigger:'[data-widget="remove"]',collapseIcon:"fa-minus",expandIcon:"fa-plus",removeIcon:"fa-times"},s=".box-header",a=".box-body",o=".box-footer",r=".box-tools",d="collapsed-box";function l(s){return this.each((function(){var a=e(this),o=a.data(n);if(!o){var r=e.extend({},i,a.data(),"object"==typeof s&&s);a.data(n,o=new t(a,r))}if("string"==typeof s){if(void 0===o[s])throw new Error("No method named "+s);o[s]()}}))}t.prototype.toggle=function(){e(this.element).is(".collapsed-box")?this.expand():this.collapse()},t.prototype.expand=function(){var t=e.Event("expanded.boxwidget"),n=e.Event("expanding.boxwidget"),i=this.options.collapseIcon,l=this.options.expandIcon;e(this.element).removeClass(d),e(this.element).children(s+", "+a+", "+o).children(r).find("."+l).removeClass(l).addClass(i),e(this.element).children(a+", "+o).slideDown(this.options.animationSpeed,function(){e(this.element).trigger(t)}.bind(this)).trigger(n)},t.prototype.collapse=function(){var t=e.Event("collapsed.boxwidget"),n=e.Event("collapsing.boxwidget"),i=this.options.collapseIcon,l=this.options.expandIcon;e(this.element).children(s+", "+a+", "+o).children(r).find("."+i).removeClass(i).addClass(l),e(this.element).children(a+", "+o).slideUp(this.options.animationSpeed,function(){e(this.element).addClass(d),e(this.element).trigger(t)}.bind(this)).trigger(n)},t.prototype.remove=function(){var t=e.Event("removed.boxwidget"),n=e.Event("removing.boxwidget");e(this.element).slideUp(this.options.animationSpeed,function(){e(this.element).trigger(t),e(this.element).remove()}.bind(this)).trigger(n)},t.prototype._setUpListeners=function(){var t=this;e(this.element).on("click",this.options.collapseTrigger,(function(n){return n&&n.preventDefault(),t.toggle(e(this)),!1})),e(this.element).on("click",this.options.removeTrigger,(function(n){return n&&n.preventDefault(),t.remove(e(this)),!1}))};var u=e.fn.boxWidget;e.fn.boxWidget=l,e.fn.boxWidget.Constructor=t,e.fn.boxWidget.noConflict=function(){return e.fn.boxWidget=u,this},e(window).on("load",(function(){e(".box").each((function(){l.call(e(this))}))}))}(i),function(e){"use strict";function t(e,t){this.element=e,this.options=t,this.hasBindedResize=!1,this.init()}var n="lte.controlsidebar",i={controlsidebarSlide:!0},s=".control-sidebar",a='[data-toggle="control-sidebar"]',o=".control-sidebar-open",r="control-sidebar-open",d="control-sidebar-hold-transition";function l(s){return this.each((function(){var a=e(this),o=a.data(n);if(!o){var r=e.extend({},i,a.data(),"object"==typeof s&&s);a.data(n,o=new t(a,r))}"string"==typeof s&&o.toggle()}))}t.prototype.init=function(){e(this.element).is(a)||e(this).on("click",this.toggle),this.fix(),e(window).resize(function(){this.fix()}.bind(this))},t.prototype.toggle=function(t){t&&t.preventDefault(),this.fix(),e(s).is(o)||e("body").is(o)?this.collapse():this.expand()},t.prototype.expand=function(){e(s).show(),this.options.controlsidebarSlide?e(s).addClass(r):e("body").addClass(d).addClass(r).delay(50).queue((function(){e("body").removeClass(d),e(this).dequeue()})),e(this.element).trigger(e.Event("expanded.controlsidebar"))},t.prototype.collapse=function(){this.options.controlsidebarSlide?e(s).removeClass(r):e("body").addClass(d).removeClass(r).delay(50).queue((function(){e("body").removeClass(d),e(this).dequeue()})),e(s).fadeOut(),e(this.element).trigger(e.Event("collapsed.controlsidebar"))},t.prototype.fix=function(){e("body").is(".layout-boxed")&&this._fixForBoxed(e(".control-sidebar-bg"))},t.prototype._fixForBoxed=function(t){t.css({position:"absolute",height:e(".wrapper").height()})};var u=e.fn.controlSidebar;e.fn.controlSidebar=l,e.fn.controlSidebar.Constructor=t,e.fn.controlSidebar.noConflict=function(){return e.fn.controlSidebar=u,this},e(document).on("click",a,(function(t){t&&t.preventDefault(),l.call(e(this),"toggle")}))}(i),function(e){"use strict";function t(e){this.element=e}var n="lte.directchat";function i(i){return this.each((function(){var s=e(this),a=s.data(n);a||s.data(n,a=new t(s)),"string"==typeof i&&a.toggle(s)}))}t.prototype.toggle=function(e){e.parents(".direct-chat").first().toggleClass("direct-chat-contacts-open")};var s=e.fn.directChat;e.fn.directChat=i,e.fn.directChat.Constructor=t,e.fn.directChat.noConflict=function(){return e.fn.directChat=s,this},e(document).on("click",'[data-widget="chat-pane-toggle"]',(function(t){t&&t.preventDefault(),i.call(e(this),"toggle")}))}(i),function(e){"use strict";function t(e){this.options=e,this.init()}var n="lte.pushmenu",i={collapseScreenSize:767,expandOnHover:!1,expandTransitionDelay:200},s='[data-toggle="push-menu"]',a=".sidebar-mini",o="sidebar-collapse",r="sidebar-open",d="sidebar-expanded-on-hover",l="expanded.pushMenu",u="collapsed.pushMenu";function c(s){return this.each((function(){var a=e(this),o=a.data(n);if(!o){var r=e.extend({},i,a.data(),"object"==typeof s&&s);a.data(n,o=new t(r))}"toggle"===s&&o.toggle()}))}t.prototype.init=function(){(this.options.expandOnHover||e("body").is(a+".fixed"))&&(this.expandOnHover(),e("body").addClass("sidebar-mini-expand-feature")),e(".content-wrapper").click(function(){e(window).width()<=this.options.collapseScreenSize&&e("body").hasClass(r)&&this.close()}.bind(this)),e(".sidebar-form .form-control").click((function(e){e.stopPropagation()}))},t.prototype.toggle=function(){var t=e(window).width(),n=!e("body").hasClass(o);t<=this.options.collapseScreenSize&&(n=e("body").hasClass(r)),n?this.close():this.open()},t.prototype.open=function(){e(window).width()>this.options.collapseScreenSize?e("body").removeClass(o).trigger(e.Event(l)):e("body").addClass(r).trigger(e.Event(l))},t.prototype.close=function(){e(window).width()>this.options.collapseScreenSize?e("body").addClass(o).trigger(e.Event(u)):e("body").removeClass(r+" "+o).trigger(e.Event(u))},t.prototype.expandOnHover=function(){e(".main-sidebar").hover(function(){e("body").is(a+".sidebar-collapse")&&e(window).width()>this.options.collapseScreenSize&&this.expand()}.bind(this),function(){e("body").is(".sidebar-expanded-on-hover")&&this.collapse()}.bind(this))},t.prototype.expand=function(){setTimeout((function(){e("body").removeClass(o).addClass(d)}),this.options.expandTransitionDelay)},t.prototype.collapse=function(){setTimeout((function(){e("body").removeClass(d).addClass(o)}),this.options.expandTransitionDelay)};var h=e.fn.pushMenu;e.fn.pushMenu=c,e.fn.pushMenu.Constructor=t,e.fn.pushMenu.noConflict=function(){return e.fn.pushMenu=h,this},e(document).on("click",s,(function(t){t.preventDefault(),c.call(e(this),"toggle")})),e(window).on("load",(function(){c.call(e(s))}))}(i),function(e){"use strict";function t(e,t){this.element=e,this.options=t,this._setUpListeners()}var n="lte.todolist",i={onCheck:function(e){return e},onUnCheck:function(e){return e}},s={data:'[data-widget="todo-list"]'};function a(s){return this.each((function(){var a=e(this),o=a.data(n);if(!o){var r=e.extend({},i,a.data(),"object"==typeof s&&s);a.data(n,o=new t(a,r))}if("string"==typeof o){if(void 0===o[s])throw new Error("No method named "+s);o[s]()}}))}t.prototype.toggle=function(e){e.parents(s.li).first().toggleClass("done"),e.prop("checked")?this.check(e):this.unCheck(e)},t.prototype.check=function(e){this.options.onCheck.call(e)},t.prototype.unCheck=function(e){this.options.onUnCheck.call(e)},t.prototype._setUpListeners=function(){var t=this;e(this.element).on("change ifChanged","input:checkbox",(function(){t.toggle(e(this))}))};var o=e.fn.todoList;e.fn.todoList=a,e.fn.todoList.Constructor=t,e.fn.todoList.noConflict=function(){return e.fn.todoList=o,this},e(window).on("load",(function(){e(s.data).each((function(){a.call(e(this))}))}))}(i),function(e){"use strict";function t(t,n){this.element=t,this.options=n,e(this.element).addClass(d),e(s+o,this.element).addClass(r),this._setUpListeners()}var n="lte.tree",i={animationSpeed:500,accordion:!0,followLink:!1,trigger:".treeview a"},s=".treeview",a=".treeview-menu",o=".active",r="menu-open",d="tree";function l(s){return this.each((function(){var a=e(this);if(!a.data(n)){var o=e.extend({},i,a.data(),"object"==typeof s&&s);a.data(n,new t(a,o))}}))}t.prototype.toggle=function(e,t){var n=e.next(a),i=e.parent(),o=i.hasClass(r);i.is(s)&&(this.options.followLink&&"#"!==e.attr("href")||t.preventDefault(),o?this.collapse(n,i):this.expand(n,i))},t.prototype.expand=function(t,n){var i=e.Event("expanded.tree");if(this.options.accordion){var s=n.siblings(".menu-open, .active"),o=s.children(a);this.collapse(o,s)}n.addClass(r),t.stop().slideDown(this.options.animationSpeed,function(){e(this.element).trigger(i),n.height("auto")}.bind(this))},t.prototype.collapse=function(t,n){var i=e.Event("collapsed.tree");n.removeClass(r),t.stop().slideUp(this.options.animationSpeed,function(){e(this.element).trigger(i),n.find(s).removeClass(r).find(a).hide()}.bind(this))},t.prototype._setUpListeners=function(){var t=this;e(this.element).on("click",this.options.trigger,(function(n){t.toggle(e(this),n)}))};var u=e.fn.tree;e.fn.tree=l,e.fn.tree.Constructor=t,e.fn.tree.noConflict=function(){return e.fn.tree=u,this},e(window).on("load",(function(){e('[data-widget="tree"]').each((function(){l.call(e(this))}))}))}(i),function(e){"use strict";function t(e){this.options=e,this.bindedResize=!1,this.activate()}var n="lte.layout",i={slimscroll:!0,resetHeight:!0},s=".wrapper",a=".content-wrapper",o=".main-header",r=".sidebar",d=".sidebar-menu",l="fixed";function u(s){return this.each((function(){var a=e(this),o=a.data(n);if(!o){var r=e.extend({},i,a.data(),"object"==typeof s&&s);a.data(n,o=new t(r))}if("string"==typeof s){if(void 0===o[s])throw new Error("No method named "+s);o[s]()}}))}t.prototype.activate=function(){this.fix(),this.fixSidebar(),e("body").removeClass("hold-transition"),this.options.resetHeight&&e("body, html, "+s).css({height:"auto","min-height":"100%"}),this.bindedResize||(e(window).resize(function(){this.fix(),this.fixSidebar(),e(".main-header .logo, "+r).one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",function(){this.fix(),this.fixSidebar()}.bind(this))}.bind(this)),this.bindedResize=!0),e(d).on("expanded.tree",function(){this.fix(),this.fixSidebar()}.bind(this)),e(d).on("collapsed.tree",function(){this.fix(),this.fixSidebar()}.bind(this))},t.prototype.fix=function(){e(".layout-boxed > "+s).css("overflow","hidden");var t=e(".main-footer").outerHeight()||0,n=e(o).outerHeight()||0,i=n+t,d=e(window).height(),u=e(r).outerHeight()||0;if(e("body").hasClass(l))e(a).css("min-height",d-t);else{var c;c=u+n<=d?(e(a).css("min-height",d-i),d-i):(e(a).css("min-height",u),u);var h=e(".control-sidebar");void 0!==h&&h.height()>c&&e(a).css("min-height",h.height())}},t.prototype.fixSidebar=function(){e("body").hasClass(l)?this.options.slimscroll&&void 0!==e.fn.slimScroll&&0===e(".main-sidebar").find("slimScrollDiv").length&&e(r).slimScroll({height:e(window).height()-e(o).height()+"px"}):void 0!==e.fn.slimScroll&&e(r).slimScroll({destroy:!0}).height("auto")};var c=e.fn.layout;e.fn.layout=u,e.fn.layout.Constuctor=t,e.fn.layout.noConflict=function(){return e.fn.layout=c,this},e(window).on("load",(function(){u.call(e("body"))}))}(i)},8355:function(e,t,n){var i=n(9755),s=n(9755);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var r={collectionCounters:[],config:null,translations:null,shared_setup:function(e){r.read_config(),r.log("[core|shared_setup] Register services on",e),r.setup_ie10_polyfill(),r.set_object_field_value(e),r.add_filters(e),r.setup_select2(e),r.setup_icheck(e),r.setup_checkbox_range_selection(e),r.setup_xeditable(e),r.setup_form_tabs_for_errors(e),r.setup_inline_form_errors(e),r.setup_tree_view(e),r.setup_collection_counter(e),r.setup_sticky_elements(e),r.setup_readmore_elements(e),r.setup_form_submit(e)},setup_ie10_polyfill:function(){if(navigator.userAgent.match(/IEMobile\/10\.0/)){var e=document.createElement("style");e.appendChild(document.createTextNode("@-ms-viewport{width:auto!important}")),document.querySelector("head").appendChild(e)}},read_config:function(){var e=i("[data-sonata-admin]").data("sonata-admin");this.config=e.config,this.translations=e.translations},get_config:function(e){return null==this.config&&this.read_config(),this.config[e]},get_translations:function(e){return null==this.translations&&this.read_config(),this.translations[e]},setup_list_modal:function(e){r.log("[core|setup_list_modal] configure modal on",e),s("div.modal-dialog",e).css({width:"90%",height:"85%",padding:0}),s("div.modal-content",e).css({"border-radius":"0",height:"100%",padding:0}),s(".modal-body",e).css({width:"auto",height:"90%",padding:15,overflow:"auto"}),s(e).trigger("sonata-admin-setup-list-modal")},setup_select2:function(e){r.get_config("USE_SELECT2")&&(r.log("[core|setup_select2] configure Select2 on",e),s('select:not([data-sonata-select2="false"])',e).each((function(){var e=s(this),t=!1,n=e.data("popover"),i=null,a=10;e.removeClass("form-control"),e.find('option[value=""]').length||"true"===e.attr("data-sonata-select2-allow-clear")?t=!0:"false"===e.attr("data-sonata-select2-allow-clear")&&(t=!1),e.attr("data-sonata-select2-maximumSelectionSize")&&(i=e.attr("data-sonata-select2-maximumSelectionSize")),e.attr("data-sonata-select2-minimumResultsForSearch")&&(a=e.attr("data-sonata-select2-minimumResultsForSearch")),e.select2({width:function(){return r.get_select2_width(e)},theme:"bootstrap",dropdownAutoWidth:!0,minimumResultsForSearch:a,placeholder:t?" ":"",allowClear:t,maximumSelectionSize:i}),void 0!==n&&e.select2("container").popover(n.options)})))},setup_icheck:function(e){if(r.get_config("USE_ICHECK")){r.log("[core|setup_icheck] configure iCheck on",e);var t=s('input[type="checkbox"]:not(label.btn > input, [data-sonata-icheck="false"]), input[type="radio"]:not(label.btn > input, [data-sonata-icheck="false"])',e);t.iCheck({checkboxClass:"icheckbox_square-blue",radioClass:"iradio_square-blue"}).on("ifToggled",(function(e){i(e.target).trigger("change")})),e===window.document&&setTimeout((function(){t.iCheck("update")}),0)}},setup_checkbox_range_selection:function(e){var t;r.log("[core|setup_checkbox_range_selection] configure checkbox range selection on",e);var n=r.get_config("USE_ICHECK");s('tbody input[type="checkbox"], tbody .iCheck-helper',e).click((function(i){var a;if((a=n?s(this).prev('input[type="checkbox"]'):s(this)).length){var o=a.closest("tr").index();if(i.shiftKey&&t>=0){var r=s('tbody input[type="checkbox"]:nth('.concat(o,")"),e).prop("checked");s('tbody input[type="checkbox"]',e).each((function(e,i){if(e>t&&eo&&e',container:"body",placement:"auto",success:function(e){var t=s(e);r.setup_xeditable(t),s(this).closest("td").replaceWith(t)},error:function(e){return"application/json"===e.getResponseHeader("Content-Type")?JSON.parse(e.responseText):e.responseText}})},log:function(){if(r.get_config("DEBUG")){for(var e=arguments.length,t=new Array(e),n=0;n0?s(n).slideDown():s(n).slideUp(),t()}})),s(".sonata-filter-form",e).on("submit",(function(){var e=s(this);if(e.find('[sonata-filter="true"]:hidden :input').val(""),this.dataset.defaultValues){var t=r.convert_query_string_to_object(i.param({filter:JSON.parse(this.dataset.defaultValues)}));e.find("[name*=filter]").each((function(e,n){JSON.stringify(t[n.name]||"")===JSON.stringify(i(n).val())&&n.removeAttribute("name")}))}})),0===s(".advanced-filter :input:visible",e).filter((function(){return s(this).val()})).length&&s(".advanced-filter").hide(),s('[data-toggle="advanced-filter"]',e).click((function(){s(".advanced-filter").toggle()})),t()},set_object_field_value:function(e){r.log("[core|set_object_field_value] set value field on",e),this.log(s("a.sonata-ba-edit-inline",e)),s("a.sonata-ba-edit-inline",e).click((function(e){r.stopEvent(e);var t=s(this);s.ajax({url:t.attr("href"),type:"POST",success:function(e){var n=t.parent();n.children().remove(),n.html(s(e.replace(//g,"")).html()),n.effect("highlight",{color:"#57A957"},2e3),r.set_object_field_value(n)},error:function(){t.parent().effect("highlight",{color:"#C43C35"},2e3)}})}))},setup_collection_counter:function(e){r.log("[core|setup_collection_counter] setup collection counter",e);var t=new RegExp("_([0-9]+)[^0-9]*$");s(e).find("[data-prototype]").each((function(){var e=s(this),n=-1;e.children().each((function(){var e=t.exec(s('[id^="sonata-ba-field-container"]',this).attr("id"));e&&e[1]&&e[1]>n&&(n=parseInt(e[1],10))})),r.collectionCounters[e.attr("id")]=n}))},setup_collection_buttons:function(e){s(e).on("click",".sonata-collection-add",(function(e){r.stopEvent(e);var t=s(this).closest("[data-prototype]");r.collectionCounters[t.attr("id")]+=1;var n=r.collectionCounters[t.attr("id")],i=t.attr("data-prototype"),a=t.attr("data-prototype-name")||"__name__",o=new RegExp("".concat(t.attr("id"),"_").concat(a),"g");i=i.replace(o,"".concat(t.attr("id"),"_").concat(n));var d=t.attr("id").split("_"),l=new RegExp("".concat(d[d.length-1],"\\]\\[").concat(a),"g");i=i.replace(l,"".concat(d[d.length-1],"][").concat(n)),s(i).insertBefore(s(this).parent()).trigger("sonata-admin-append-form-element"),s(this).trigger("sonata-collection-item-added")})),s(e).on("click",".sonata-collection-delete",(function(e){r.stopEvent(e),s(this).trigger("sonata-collection-item-deleted"),s(this).closest(".sonata-collection-row").remove(),s(document).trigger("sonata-collection-item-deleted-successful")}))},setup_per_page_switcher:function(e){r.log("[core|setup_per_page_switcher] setup page switcher",e),s("select.per-page").change((function(){s("input[type=submit]").hide(),window.top.location.href=this.options[this.selectedIndex].value}))},setup_form_tabs_for_errors:function(e){r.log("[core|setup_form_tabs_for_errors] setup form tab's errors",e),s("form",e).each((function(){r.show_form_first_tab_with_errors(s(this),".sonata-ba-field-error")})),s(e).on("click",'form [type="submit"]',(function(){r.show_form_first_tab_with_errors(s(this).closest("form"),":invalid")})).on("keypress",'form [type="text"]',(function(e){13===e.which&&r.show_form_first_tab_with_errors(s(this),":invalid")}))},show_form_first_tab_with_errors:function(e,t){var n;r.log("[core|show_form_first_tab_with_errors] show first tab with errors",e),e.find(".nav-tabs a").each((function(){var e=s(this).attr("href"),i=s(this),a=i.find(".has-errors");s(e).find(t).length>0?(n||(i.tab("show"),n=i),a.removeClass("hide")):a.addClass("hide")}))},setup_inline_form_errors:function(e){r.log("[core|setup_inline_form_errors] show first tab with errors",e);var t='.sonata-ba-field-inline-table [id$="_delete"][type="checkbox"]';s(t,e).each((function(){r.switch_inline_form_errors(s(this))})),s(e).on("change",t,(function(){r.switch_inline_form_errors(s(this))}))},switch_inline_form_errors:function(e){r.log("[core|switch_inline_form_errors] switch_inline_form_errors",e);var t=e.closest(".sonata-ba-field-inline-table"),n=t.find(".sonata-ba-field-error-messages");e.is(":checked")?(t.find("[required]").removeAttr("required").attr("data-required","required"),n.hide()):(t.find("[data-required]").attr("required","required"),n.show())},setup_tree_view:function(e){r.log("[core|setup_tree_view] setup tree view",e),s("ul.js-treeview",e).treeView()},get_select2_width:function(e){var t=/width:(auto|(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc)))/i,n=e.attr("style");if(void 0!==n)for(var i=n.split(";"),s=0,a=i.length;s=1)return o[1]}return(n=e.css("width")).indexOf("%")>0?n:"100%"},setup_sortable_select2:function(e,t,n){for(var i=[],d=0;d").attr("type","hidden").attr("name","".concat(n+i,"]")).val(t[i]).appendTo(e.parents("form:first"))}e.remove()}))},setup_sticky_elements:function(e){if(r.get_config("USE_STICKYFORMS")){r.log("[core|setup_sticky_elements] setup sticky elements on",e);var t=s(e).find(".navbar-static-top"),n=s(e).find(".content-wrapper"),i=s(n).find("nav.navbar"),a=s(n).find(".sonata-ba-form-actions");i.length&&new window.Waypoint.Sticky({element:i[0],offset:function(){return r.refreshNavbarStuckClass(t),s(t).outerHeight()},handler:function(e){"up"===e?s(i).width("auto"):s(i).width(s(n).outerWidth()),r.refreshNavbarStuckClass(t)}}),a.length&&new window.Waypoint({element:n[0],offset:"bottom-in-view",handler:function(e){s(".sonata-ba-form form > .row").outerHeight()+s(a).outerHeight()-2=s(document).height()&&s(e).removeClass("stuck"),t.length&&0===s(window).scrollTop()&&s(t).removeClass("stuck")}),250)),s("body").on("expanded.pushMenu collapsed.pushMenu",(function(){setTimeout((function(){r.handleResize(e,t,n)}),350)})),s(window).resize(r.debounce((function(){r.handleResize(e,t,n)}),250))},handleResize:function(e,t,n){t.length&&s(t).hasClass("stuck")&&s(t).width(s(n).outerWidth()),e.length&&s(e).hasClass("stuck")&&s(e).width(s(n).outerWidth())},refreshNavbarStuckClass:function(e){var t=s("#navbar-stuck");t.length||(t=s('").appendTo(a)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(s=this.containers.length-1;s>=0;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!o.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var n,i,s,a,o=this.options,r=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY=0;n--)if(s=(i=this.items[n]).item[0],(a=this._intersectsWithPointer(i))&&i.instance===this.currentContainer&&!(s===this.currentItem[0]||this.placeholder[1===a?"next":"prev"]()[0]===s||e.contains(this.placeholder[0],s)||"semi-dynamic"===this.options.type&&e.contains(this.element[0],s))){if(this.direction=1===a?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(t,i),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,n){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var i=this,s=this.placeholder.offset(),a=this.options.axis,o={};a&&"x"!==a||(o.left=s.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),a&&"y"!==a||(o.top=s.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(o,parseInt(this.options.revert,10)||500,(function(){i._clear(t)}))}else this._clear(t,n);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new e.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var n=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},e(n).each((function(){var n=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);n&&i.push((t.key||n[1]+"[]")+"="+(t.key&&t.expression?n[1]:n[2]))})),!i.length&&t.key&&i.push(t.key+"="),i.join("&")},toArray:function(t){var n=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},n.each((function(){i.push(e(t.item||this).attr(t.attribute||"id")||"")})),i},_intersectsWith:function(e){var t=this.positionAbs.left,n=t+this.helperProportions.width,i=this.positionAbs.top,s=i+this.helperProportions.height,a=e.left,o=a+e.width,r=e.top,d=r+e.height,l=this.offset.click.top,u=this.offset.click.left,c="x"===this.options.axis||i+l>r&&i+la&&t+ue[this.floating?"width":"height"]?p:a0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){var n,i,s,a,o=[],r=[],d=this._connectWith();if(d&&t)for(n=d.length-1;n>=0;n--)for(i=(s=e(d[n],this.document[0])).length-1;i>=0;i--)(a=e.data(s[i],this.widgetFullName))&&a!==this&&!a.options.disabled&&r.push([e.isFunction(a.options.items)?a.options.items.call(a.element):e(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);function l(){o.push(this)}for(r.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),n=r.length-1;n>=0;n--)r[n][0].each(l);return e(o)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,(function(e){for(var n=0;n=0;n--)for(i=(s=e(h[n],this.document[0])).length-1;i>=0;i--)(a=e.data(s[i],this.widgetFullName))&&a!==this&&!a.options.disabled&&(c.push([e.isFunction(a.options.items)?a.options.items.call(a.element[0],t,{item:this.currentItem}):e(a.options.items,a.element),a]),this.containers.push(a));for(n=c.length-1;n>=0;n--)for(o=c[n][1],i=0,l=(r=c[n][0]).length;i=0;n--)(i=this.items[n]).instance!==this.currentContainer&&this.currentContainer&&i.item[0]!==this.currentItem[0]||(s=this.options.toleranceElement?e(this.options.toleranceElement,i.item):i.item,t||(i.width=s.outerWidth(),i.height=s.outerHeight()),a=s.offset(),i.left=a.left,i.top=a.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(n=this.containers.length-1;n>=0;n--)a=this.containers[n].element.offset(),this.containers[n].containerCache.left=a.left,this.containers[n].containerCache.top=a.top,this.containers[n].containerCache.width=this.containers[n].element.outerWidth(),this.containers[n].containerCache.height=this.containers[n].element.outerHeight();return this},_createPlaceholder:function(t){var n,i=(t=t||this).options;i.placeholder&&i.placeholder.constructor!==String||(n=i.placeholder,i.placeholder={element:function(){var i=t.currentItem[0].nodeName.toLowerCase(),s=e("<"+i+">",t.document[0]);return t._addClass(s,"ui-sortable-placeholder",n||t.currentItem[0].className)._removeClass(s,"ui-sortable-helper"),"tbody"===i?t._createTrPlaceholder(t.currentItem.find("tr").eq(0),e("",t.document[0]).appendTo(s)):"tr"===i?t._createTrPlaceholder(t.currentItem,s):"img"===i&&s.attr("src",t.currentItem.attr("src")),n||s.css("visibility","hidden"),s},update:function(e,s){n&&!i.forcePlaceholderSize||(s.height()||s.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),s.width()||s.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(i.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),i.placeholder.update(t,t.placeholder)},_createTrPlaceholder:function(t,n){var i=this;t.children().each((function(){e(" ",i.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(n)}))},_contactContainers:function(t){var n,i,s,a,o,r,d,l,u,c,h=null,p=null;for(n=this.containers.length-1;n>=0;n--)if(!e.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(h&&e.contains(this.containers[n].element[0],h.element[0]))continue;h=this.containers[n],p=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",t,this._uiHash(this)),this.containers[n].containerCache.over=0);if(h)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(s=1e4,a=null,o=(u=h.floating||this._isFloating(this.currentItem))?"left":"top",r=u?"width":"height",c=u?"pageX":"pageY",i=this.items.length-1;i>=0;i--)e.contains(this.containers[p].element[0],this.items[i].item[0])&&this.items[i].item[0]!==this.currentItem[0]&&(d=this.items[i].item.offset()[o],l=!1,t[c]-d>this.items[i][r]/2&&(l=!0),Math.abs(t[c]-d)this.containment[2]&&(a=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),s.grid&&(n=this.originalPageY+Math.round((o-this.originalPageY)/s.grid[1])*s.grid[1],o=this.containment?n-this.offset.click.top>=this.containment[1]&&n-this.offset.click.top<=this.containment[3]?n:n-this.offset.click.top>=this.containment[1]?n-s.grid[1]:n+s.grid[1]:n,i=this.originalPageX+Math.round((a-this.originalPageX)/s.grid[0])*s.grid[0],a=this.containment?i-this.offset.click.left>=this.containment[0]&&i-this.offset.click.left<=this.containment[2]?i:i-this.offset.click.left>=this.containment[0]?i-s.grid[0]:i+s.grid[0]:i)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():d?0:r.scrollTop()),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():d?0:r.scrollLeft())}},_rearrange:function(e,t,n,i){n?n[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var s=this.counter;this._delay((function(){s===this.counter&&this.refreshPositions(!i)}))},_clear:function(e,t){this.reverting=!1;var n,i=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(n in this._storedCSS)"auto"!==this._storedCSS[n]&&"static"!==this._storedCSS[n]||(this._storedCSS[n]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function s(e,t,n){return function(i){n._trigger(e,i,t._uiHash(t))}}for(this.fromOutside&&!t&&i.push((function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))})),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||i.push((function(e){this._trigger("update",e,this._uiHash())})),this!==this.currentContainer&&(t||(i.push((function(e){this._trigger("remove",e,this._uiHash())})),i.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),i.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),n=this.containers.length-1;n>=0;n--)t||i.push(s("deactivate",this,this.containers[n])),this.containers[n].containerCache.over&&(i.push(s("out",this,this.containers[n])),this.containers[n].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(n=0;n1;return d&&(o/=2),r.offset=s(r.offset),r.over=s(r.over),this.each((function(){if(null!==a){var l,u=n(this),c=u?this.contentWindow||window:this,h=e(c),p=a,m={};switch(typeof p){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(p)){p=s(p);break}p=u?e(p):e(p,c);case"object":if(0===p.length)return;(p.is||p.style)&&(l=(p=e(p)).offset())}var f=i(r.offset)&&r.offset(c,p)||r.offset;e.each(r.axis.split(""),(function(e,n){var i="x"===n?"Left":"Top",s=i.toLowerCase(),a="scroll"+i,o=h[a](),g=t.max(c,n);if(l)m[a]=l[s]+(u?0:o-h.offset()[s]),r.margin&&(m[a]-=parseInt(p.css("margin"+i),10)||0,m[a]-=parseInt(p.css("border"+i+"Width"),10)||0),m[a]+=f[s]||0,r.over[s]&&(m[a]+=p["x"===n?"width":"height"]()*r.over[s]);else{var y=p[s];m[a]=y.slice&&"%"===y.slice(-1)?parseFloat(y)/100*g:y}r.limit&&/^\d+$/.test(m[a])&&(m[a]=m[a]<=0?0:Math.min(m[a],g)),!e&&r.axis.length>1&&(o===m[a]?m={}:d&&(_(r.onAfterFirst),m={}))})),_(r.onAfter)}function _(t){var n=e.extend({},r,{queue:!0,duration:o,complete:t&&function(){t.call(c,p,r)}});h.animate(m,n)}}))},t.max=function(t,i){var s="x"===i?"Width":"Height",a="scroll"+s;if(!n(t))return t[a]-e(t)[s.toLowerCase()]();var o="client"+s,r=t.ownerDocument||t.document,d=r.documentElement,l=r.body;return Math.max(d[a],l[a])-Math.min(d[o],l[o])},e.Tween.propHooks.scrollLeft=e.Tween.propHooks.scrollTop={get:function(t){return e(t.elem)[t.prop]()},set:function(t){var n=this.get(t);if(t.options.interrupt&&t._last&&t._last!==n)return e(t.elem).stop();var i=Math.round(t.now);n!==i&&(e(t.elem)[t.prop](i),t._last=this.get(t))}},t})?i.apply(t,s):i)||(e.exports=a)}()},9755:function(e,t){var n,i,s;i="undefined"!=typeof window?window:this,s=function(i,s){var a=[],o=i.document,r=a.slice,d=a.concat,l=a.push,u=a.indexOf,c={},h=c.toString,p=c.hasOwnProperty,m={},f="2.2.4",_=function(e,t){return new _.fn.init(e,t)},g=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,y=/^-ms-/,v=/-([\da-z])/gi,M=function(e,t){return t.toUpperCase()};function b(e){var t=!!e&&"length"in e&&e.length,n=_.type(e);return"function"!==n&&!_.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}_.fn=_.prototype={jquery:f,constructor:_,selector:"",length:0,toArray:function(){return r.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:r.call(this)},pushStack:function(e){var t=_.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e){return _.each(this,e)},map:function(e){return this.pushStack(_.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(r.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n=0},isPlainObject:function(e){var t;if("object"!==_.type(e)||e.nodeType||_.isWindow(e))return!1;if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype||{},"isPrototypeOf"))return!1;for(t in e);return void 0===t||p.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?c[h.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;(e=_.trim(e))&&(1===e.indexOf("use strict")?((t=o.createElement("script")).text=e,o.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(y,"ms-").replace(v,M)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,i=0;if(b(e))for(n=e.length;i+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),q=new RegExp("=[\\x20\\t\\r\\n\\f]*([^\\]'\"]*?)[\\x20\\t\\r\\n\\f]*\\]","g"),V=new RegExp(N),J=new RegExp("^"+W+"$"),B={ID:new RegExp("^#("+W+")"),CLASS:new RegExp("^\\.("+W+")"),TAG:new RegExp("^("+W+"|[*])"),ATTR:new RegExp("^"+F),PSEUDO:new RegExp("^"+N),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("^(?:"+P+")$","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")},G=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,X=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Q=/[+~]/,ee=/'|\\/g,te=new RegExp("\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\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(){h()};try{E.apply(H=O.call(b.childNodes),b.childNodes),H[b.childNodes.length].nodeType}catch(e){E={apply:H.length?function(e,t){j.apply(e,O.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}function se(e,t,i,s){var a,r,l,u,c,m,g,y,w=t&&t.ownerDocument,L=t?t.nodeType:9;if(i=i||[],"string"!=typeof e||!e||1!==L&&9!==L&&11!==L)return i;if(!s&&((t?t.ownerDocument||t:b)!==p&&h(t),t=t||p,f)){if(11!==L&&(m=Z.exec(e)))if(a=m[1]){if(9===L){if(!(l=t.getElementById(a)))return i;if(l.id===a)return i.push(l),i}else if(w&&(l=w.getElementById(a))&&v(t,l)&&l.id===a)return i.push(l),i}else{if(m[2])return E.apply(i,t.getElementsByTagName(e)),i;if((a=m[3])&&n.getElementsByClassName&&t.getElementsByClassName)return E.apply(i,t.getElementsByClassName(a)),i}if(n.qsa&&!D[e+" "]&&(!_||!_.test(e))){if(1!==L)w=t,y=e;else if("object"!==t.nodeName.toLowerCase()){for((u=t.getAttribute("id"))?u=u.replace(ee,"\\$&"):t.setAttribute("id",u=M),r=(g=o(e)).length,c=J.test(u)?"#"+u:"[id='"+u+"']";r--;)g[r]=c+" "+fe(g[r]);y=g.join(","),w=Q.test(e)&&pe(t.parentNode)||t}if(y)try{return E.apply(i,w.querySelectorAll(y)),i}catch(e){}finally{u===M&&t.removeAttribute("id")}}}return d(e.replace(z,"$1"),t,i,s)}function ae(){var e=[];return function t(n,s){return e.push(n+" ")>i.cacheLength&&delete t[e.shift()],t[n+" "]=s}}function oe(e){return e[M]=!0,e}function re(e){var t=p.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),s=n.length;s--;)i.attrHandle[n[s]]=t}function le(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||x)-(~e.sourceIndex||x);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function ue(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function ce(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function he(e){return oe((function(t){return t=+t,oe((function(n,i){for(var s,a=e([],n.length,t),o=a.length;o--;)n[s=a[o]]&&(n[s]=!(i[s]=n[s]))}))}))}function pe(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},a=se.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},h=se.setDocument=function(e){var t,s,o=e?e.ownerDocument||e:b;return o!==p&&9===o.nodeType&&o.documentElement?(m=(p=o).documentElement,f=!a(p),(s=p.defaultView)&&s.top!==s&&(s.addEventListener?s.addEventListener("unload",ie,!1):s.attachEvent&&s.attachEvent("onunload",ie)),n.attributes=re((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=re((function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=X.test(p.getElementsByClassName),n.getById=re((function(e){return m.appendChild(e).id=M,!p.getElementsByName||!p.getElementsByName(M).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=[],s=0,a=t.getElementsByTagName(e);if("*"===e){for(;n=a[s++];)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)},g=[],_=[],(n.qsa=X.test(p.querySelectorAll))&&(re((function(e){m.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&_.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll("[selected]").length||_.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+P+")"),e.querySelectorAll("[id~="+M+"-]").length||_.push("~="),e.querySelectorAll(":checked").length||_.push(":checked"),e.querySelectorAll("a#"+M+"+*").length||_.push(".#.+[+~]")})),re((function(e){var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&_.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),e.querySelectorAll(":enabled").length||_.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),_.push(",.*:")}))),(n.matchesSelector=X.test(y=m.matches||m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&re((function(e){n.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),g.push("!=",N)})),_=_.length&&new RegExp(_.join("|")),g=g.length&&new RegExp(g.join("|")),t=X.test(m.compareDocumentPosition),v=t||X.test(m.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},T=t?function(e,t){if(e===t)return c=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i||(1&(i=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===i?e===p||e.ownerDocument===b&&v(b,e)?-1:t===p||t.ownerDocument===b&&v(b,t)?1:u?A(u,e)-A(u,t):0:4&i?-1:1)}:function(e,t){if(e===t)return c=!0,0;var n,i=0,s=e.parentNode,a=t.parentNode,o=[e],r=[t];if(!s||!a)return e===p?-1:t===p?1:s?-1:a?1:u?A(u,e)-A(u,t):0;if(s===a)return le(e,t);for(n=e;n=n.parentNode;)o.unshift(n);for(n=t;n=n.parentNode;)r.unshift(n);for(;o[i]===r[i];)i++;return i?le(o[i],r[i]):o[i]===b?-1:r[i]===b?1:0},p):p},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&h(e),t=t.replace(q,"='$1']"),n.matchesSelector&&f&&!D[t+" "]&&(!g||!g.test(t))&&(!_||!_.test(t)))try{var i=y.call(e,t);if(i||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){}return se(t,p,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!==p&&h(e),v(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!==p&&h(e);var s=i.attrHandle[t.toLowerCase()],a=s&&S.call(i.attrHandle,t.toLowerCase())?s(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},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,i=[],s=0,a=0;if(c=!n.detectDuplicates,u=!n.sortStable&&e.slice(0),e.sort(T),c){for(;t=e[a++];)t===e[a]&&(s=i.push(a));for(;s--;)e.splice(i[s],1)}return u=null,e},s=se.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+=s(e)}else if(3===a||4===a)return e.nodeValue}else for(;t=e[i++];)n+=s(t);return n},(i=se.selectors={cacheLength:50,createPseudo:oe,match:B,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 B.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=k[e+" "];return t||(t=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+e+"("+$+"|$)"))&&k(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 s=se.attr(i,e);return null==s?"!="===t:!t||(s+="","="===t?s===n:"!="===t?s!==n:"^="===t?n&&0===s.indexOf(n):"*="===t?n&&s.indexOf(n)>-1:"$="===t?n&&s.slice(-n.length)===n:"~="===t?(" "+s.replace(I," ")+" ").indexOf(n)>-1:"|="===t&&(s===n||s.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,i,s){var a="nth"!==e.slice(0,3),o="last"!==e.slice(-4),r="of-type"===t;return 1===i&&0===s?function(e){return!!e.parentNode}:function(t,n,d){var l,u,c,h,p,m,f=a!==o?"nextSibling":"previousSibling",_=t.parentNode,g=r&&t.nodeName.toLowerCase(),y=!d&&!r,v=!1;if(_){if(a){for(;f;){for(h=t;h=h[f];)if(r?h.nodeName.toLowerCase()===g:1===h.nodeType)return!1;m=f="only"===e&&!m&&"nextSibling"}return!0}if(m=[o?_.firstChild:_.lastChild],o&&y){for(v=(p=(l=(u=(c=(h=_)[M]||(h[M]={}))[h.uniqueID]||(c[h.uniqueID]={}))[e]||[])[0]===w&&l[1])&&l[2],h=p&&_.childNodes[p];h=++p&&h&&h[f]||(v=p=0)||m.pop();)if(1===h.nodeType&&++v&&h===t){u[e]=[w,p,v];break}}else if(y&&(v=p=(l=(u=(c=(h=t)[M]||(h[M]={}))[h.uniqueID]||(c[h.uniqueID]={}))[e]||[])[0]===w&&l[1]),!1===v)for(;(h=++p&&h&&h[f]||(v=p=0)||m.pop())&&((r?h.nodeName.toLowerCase()!==g:1!==h.nodeType)||!++v||(y&&((u=(c=h[M]||(h[M]={}))[h.uniqueID]||(c[h.uniqueID]={}))[e]=[w,v]),h!==t)););return(v-=s)===i||v%i==0&&v/i>=0}}},PSEUDO:function(e,t){var n,s=i.pseudos[e]||i.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return s[M]?s(t):s.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?oe((function(e,n){for(var i,a=s(e,t),o=a.length;o--;)e[i=A(e,a[o])]=!(n[i]=a[o])})):function(e){return s(e,0,n)}):s}},pseudos:{not:oe((function(e){var t=[],n=[],i=r(e.replace(z,"$1"));return i[M]?oe((function(e,t,n,s){for(var a,o=i(e,null,s,[]),r=e.length;r--;)(a=o[r])&&(e[r]=!(t[r]=a))})):function(e,s,a){return t[0]=e,i(t,null,a,n),t[0]=null,!n.pop()}})),has:oe((function(e){return function(t){return se(e,t).length>0}})),contains:oe((function(e){return e=e.replace(te,ne),function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}})),lang:oe((function(e){return J.test(e||"")||se.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===m},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.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 K.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:he((function(){return[0]})),last:he((function(e,t){return[t-1]})),eq:he((function(e,t,n){return[n<0?n+t:n]})),even:he((function(e,t){for(var n=0;n=0;)e.push(i);return e})),gt:he((function(e,t,n){for(var i=n<0?n+t:n;++i1?function(t,n,i){for(var s=e.length;s--;)if(!e[s](t,n,i))return!1;return!0}:e[0]}function ye(e,t,n,i,s){for(var a,o=[],r=0,d=e.length,l=null!=t;r-1&&(a[l]=!(o[l]=c))}}else g=ye(g===o?g.splice(m,g.length):g),s?s(null,o,g,d):E.apply(o,g)}))}function Me(e){for(var t,n,s,a=e.length,o=i.relative[e[0].type],r=o||i.relative[" "],d=o?1:0,u=_e((function(e){return e===t}),r,!0),c=_e((function(e){return A(t,e)>-1}),r,!0),h=[function(e,n,i){var s=!o&&(i||n!==l)||((t=n).nodeType?u(e,n,i):c(e,n,i));return t=null,s}];d1&&ge(h),d>1&&fe(e.slice(0,d-1).concat({value:" "===e[d-2].type?"*":""})).replace(z,"$1"),n,d0,s=e.length>0,a=function(a,o,r,d,u){var c,m,_,g=0,y="0",v=a&&[],M=[],b=l,L=a||s&&i.find.TAG("*",u),k=w+=null==b?1:Math.random()||.1,Y=L.length;for(u&&(l=o===p||o||u);y!==Y&&null!=(c=L[y]);y++){if(s&&c){for(m=0,o||c.ownerDocument===p||(h(c),r=!f);_=e[m++];)if(_(c,o||p,r)){d.push(c);break}u&&(w=k)}n&&((c=!_&&c)&&g--,a&&v.push(c))}if(g+=y,n&&y!==g){for(m=0;_=t[m++];)_(v,M,o,r);if(a){if(g>0)for(;y--;)v[y]||M[y]||(M[y]=C.call(d));M=ye(M)}E.apply(d,M),u&&!a&&M.length>0&&g+t.length>1&&se.uniqueSort(d)}return u&&(w=k,l=b),v};return n?oe(a):a}(a,s))).selector=e}return r},d=se.select=function(e,t,s,a){var d,l,u,c,h,p="function"==typeof e&&e,m=!a&&o(e=p.selector||e);if(s=s||[],1===m.length){if((l=m[0]=m[0].slice(0)).length>2&&"ID"===(u=l[0]).type&&n.getById&&9===t.nodeType&&f&&i.relative[l[1].type]){if(!(t=(i.find.ID(u.matches[0].replace(te,ne),t)||[])[0]))return s;p&&(t=t.parentNode),e=e.slice(l.shift().value.length)}for(d=B.needsContext.test(e)?0:l.length;d--&&(u=l[d],!i.relative[c=u.type]);)if((h=i.find[c])&&(a=h(u.matches[0].replace(te,ne),Q.test(l[0].type)&&pe(t.parentNode)||t))){if(l.splice(d,1),!(e=a.length&&fe(l)))return E.apply(s,a),s;break}}return(p||r(e,m))(a,t,!f,s,!t||Q.test(e)&&pe(t.parentNode)||t),s},n.sortStable=M.split("").sort(T).join("")===M,n.detectDuplicates=!!c,h(),n.sortDetached=re((function(e){return 1&e.compareDocumentPosition(p.createElement("div"))})),re((function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")}))||de("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&re((function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||de("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),re((function(e){return null==e.getAttribute("disabled")}))||de(P,(function(e,t,n){var i;if(!n)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null})),se}(i);_.find=w,_.expr=w.selectors,_.expr[":"]=_.expr.pseudos,_.uniqueSort=_.unique=w.uniqueSort,_.text=w.getText,_.isXMLDoc=w.isXML,_.contains=w.contains;var L=function(e,t,n){for(var i=[],s=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(s&&_(e).is(n))break;i.push(e)}return i},k=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},Y=_.expr.match.needsContext,D=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,T=/^.[^:#\[\.,]*$/;function x(e,t,n){if(_.isFunction(t))return _.grep(e,(function(e,i){return!!t.call(e,i,e)!==n}));if(t.nodeType)return _.grep(e,(function(e){return e===t!==n}));if("string"==typeof t){if(T.test(t))return _.filter(t,e,n);t=_.filter(t,e)}return _.grep(e,(function(e){return u.call(t,e)>-1!==n}))}_.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?_.find.matchesSelector(i,e)?[i]:[]:_.find.matches(e,_.grep(t,(function(e){return 1===e.nodeType})))},_.fn.extend({find:function(e){var t,n=this.length,i=[],s=this;if("string"!=typeof e)return this.pushStack(_(e).filter((function(){for(t=0;t1?_.unique(i):i)).selector=this.selector?this.selector+" "+e:e,i},filter:function(e){return this.pushStack(x(this,e||[],!1))},not:function(e){return this.pushStack(x(this,e||[],!0))},is:function(e){return!!x(this,"string"==typeof e&&Y.test(e)?_(e):e||[],!1).length}});var S,H=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(_.fn.init=function(e,t,n){var i,s;if(!e)return this;if(n=n||S,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:H.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 _?t[0]:t,_.merge(this,_.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:o,!0)),D.test(i[1])&&_.isPlainObject(t))for(i in t)_.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(s=o.getElementById(i[2]))&&s.parentNode&&(this.length=1,this[0]=s),this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):_.isFunction(e)?void 0!==n.ready?n.ready(e):e(_):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),_.makeArray(e,this))}).prototype=_.fn,S=_(o);var C=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function E(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}_.fn.extend({has:function(e){var t=_(e,this),n=t.length;return this.filter((function(){for(var e=0;e-1:1===n.nodeType&&_.find.matchesSelector(n,e))){a.push(n);break}return this.pushStack(a.length>1?_.uniqueSort(a):a)},index:function(e){return e?"string"==typeof e?u.call(_(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(_.uniqueSort(_.merge(this.get(),_(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),_.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return L(e,"parentNode")},parentsUntil:function(e,t,n){return L(e,"parentNode",n)},next:function(e){return E(e,"nextSibling")},prev:function(e){return E(e,"previousSibling")},nextAll:function(e){return L(e,"nextSibling")},prevAll:function(e){return L(e,"previousSibling")},nextUntil:function(e,t,n){return L(e,"nextSibling",n)},prevUntil:function(e,t,n){return L(e,"previousSibling",n)},siblings:function(e){return k((e.parentNode||{}).firstChild,e)},children:function(e){return k(e.firstChild)},contents:function(e){return e.contentDocument||_.merge([],e.childNodes)}},(function(e,t){_.fn[e]=function(n,i){var s=_.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(s=_.filter(i,s)),this.length>1&&(j[e]||_.uniqueSort(s),C.test(e)&&s.reverse()),this.pushStack(s)}}));var O,A=/\S+/g;function P(){o.removeEventListener("DOMContentLoaded",P),i.removeEventListener("load",P),_.ready()}_.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return _.each(e.match(A)||[],(function(e,n){t[n]=!0})),t}(e):_.extend({},e);var t,n,i,s,a=[],o=[],r=-1,d=function(){for(s=e.once,i=t=!0;o.length;r=-1)for(n=o.shift();++r-1;)a.splice(n,1),n<=r&&r--})),this},has:function(e){return e?_.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return s=o=[],a=n="",this},disabled:function(){return!a},lock:function(){return s=o=[],n||(a=n=""),this},locked:function(){return!!s},fireWith:function(e,n){return s||(n=[e,(n=n||[]).slice?n.slice():n],o.push(n),t||d()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!i}};return l},_.extend({Deferred:function(e){var t=[["resolve","done",_.Callbacks("once memory"),"resolved"],["reject","fail",_.Callbacks("once memory"),"rejected"],["notify","progress",_.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return s.done(arguments).fail(arguments),this},then:function(){var e=arguments;return _.Deferred((function(n){_.each(t,(function(t,a){var o=_.isFunction(e[t])&&e[t];s[a[1]]((function(){var e=o&&o.apply(this,arguments);e&&_.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?_.extend(e,i):i}},s={};return i.pipe=i.then,_.each(t,(function(e,a){var o=a[2],r=a[3];i[a[1]]=o.add,r&&o.add((function(){n=r}),t[1^e][2].disable,t[2][2].lock),s[a[0]]=function(){return s[a[0]+"With"](this===s?i:this,arguments),this},s[a[0]+"With"]=o.fireWith})),i.promise(s),e&&e.call(s,s),s},when:function(e){var t,n,i,s=0,a=r.call(arguments),o=a.length,d=1!==o||e&&_.isFunction(e.promise)?o:0,l=1===d?e:_.Deferred(),u=function(e,n,i){return function(s){n[e]=this,i[e]=arguments.length>1?r.call(arguments):s,i===t?l.notifyWith(n,i):--d||l.resolveWith(n,i)}};if(o>1)for(t=new Array(o),n=new Array(o),i=new Array(o);s0||(O.resolveWith(o,[_]),_.fn.triggerHandler&&(_(o).triggerHandler("ready"),_(o).off("ready"))))}}),_.ready.promise=function(e){return O||(O=_.Deferred(),"complete"===o.readyState||"loading"!==o.readyState&&!o.documentElement.doScroll?i.setTimeout(_.ready):(o.addEventListener("DOMContentLoaded",P),i.addEventListener("load",P))),O.promise(e)},_.ready.promise();var $=function(e,t,n,i,s,a,o){var r=0,d=e.length,l=null==n;if("object"===_.type(n))for(r in s=!0,n)$(e,t,r,n[r],!0,a,o);else if(void 0!==i&&(s=!0,_.isFunction(i)||(o=!0),l&&(o?(t.call(e,i),t=null):(l=t,t=function(e,t,n){return l.call(_(e),n)})),t))for(;r-1&&void 0!==n&&I.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){I.remove(this,e)}))}}),_.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=N.get(e,t),n&&(!i||_.isArray(n)?i=N.access(e,t,_.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=_.queue(e,t),i=n.length,s=n.shift(),a=_._queueHooks(e,t);"inprogress"===s&&(s=n.shift(),i--),s&&("fx"===t&&n.unshift("inprogress"),delete a.stop,s.call(e,(function(){_.dequeue(e,t)}),a)),!i&&a&&a.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return N.get(e,n)||N.access(e,n,{empty:_.Callbacks("once memory").add((function(){N.remove(e,[t+"queue",n])}))})}}),_.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,"",""]};function ee(e,t){var n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&_.nodeName(e,t)?_.merge([e],n):n}function te(e,t){for(var n=0,i=e.length;n-1)s&&s.push(a);else if(l=_.contains(a.ownerDocument,a),o=ee(c.appendChild(a),"script"),l&&te(o),n)for(u=0;a=o[u++];)Z.test(a.type||"")&&n.push(a);return c}ne=o.createDocumentFragment().appendChild(o.createElement("div")),(ie=o.createElement("input")).setAttribute("type","radio"),ie.setAttribute("checked","checked"),ie.setAttribute("name","t"),ne.appendChild(ie),m.checkClone=ne.cloneNode(!0).cloneNode(!0).lastChild.checked,ne.innerHTML="",m.noCloneChecked=!!ne.cloneNode(!0).lastChild.defaultValue;var oe=/^key/,re=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,de=/^([^.]*)(?:\.(.+)|)/;function le(){return!0}function ue(){return!1}function ce(){try{return o.activeElement}catch(e){}}function he(e,t,n,i,s,a){var o,r;if("object"==typeof t){for(r in"string"!=typeof n&&(i=i||n,n=void 0),t)he(e,r,n,i,t[r],a);return e}if(null==i&&null==s?(s=n,i=n=void 0):null==s&&("string"==typeof n?(s=i,i=void 0):(s=i,i=n,n=void 0)),!1===s)s=ue;else if(!s)return e;return 1===a&&(o=s,(s=function(e){return _().off(e),o.apply(this,arguments)}).guid=o.guid||(o.guid=_.guid++)),e.each((function(){_.event.add(this,t,s,i,n)}))}_.event={global:{},add:function(e,t,n,i,s){var a,o,r,d,l,u,c,h,p,m,f,g=N.get(e);if(g)for(n.handler&&(n=(a=n).handler,s=a.selector),n.guid||(n.guid=_.guid++),(d=g.events)||(d=g.events={}),(o=g.handle)||(o=g.handle=function(t){return void 0!==_&&_.event.triggered!==t.type?_.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(A)||[""]).length;l--;)p=f=(r=de.exec(t[l])||[])[1],m=(r[2]||"").split(".").sort(),p&&(c=_.event.special[p]||{},p=(s?c.delegateType:c.bindType)||p,c=_.event.special[p]||{},u=_.extend({type:p,origType:f,data:i,handler:n,guid:n.guid,selector:s,needsContext:s&&_.expr.match.needsContext.test(s),namespace:m.join(".")},a),(h=d[p])||((h=d[p]=[]).delegateCount=0,c.setup&&!1!==c.setup.call(e,i,m,o)||e.addEventListener&&e.addEventListener(p,o)),c.add&&(c.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),s?h.splice(h.delegateCount++,0,u):h.push(u),_.event.global[p]=!0)},remove:function(e,t,n,i,s){var a,o,r,d,l,u,c,h,p,m,f,g=N.hasData(e)&&N.get(e);if(g&&(d=g.events)){for(l=(t=(t||"").match(A)||[""]).length;l--;)if(p=f=(r=de.exec(t[l])||[])[1],m=(r[2]||"").split(".").sort(),p){for(c=_.event.special[p]||{},h=d[p=(i?c.delegateType:c.bindType)||p]||[],r=r[2]&&new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=a=h.length;a--;)u=h[a],!s&&f!==u.origType||n&&n.guid!==u.guid||r&&!r.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(h.splice(a,1),u.selector&&h.delegateCount--,c.remove&&c.remove.call(e,u));o&&!h.length&&(c.teardown&&!1!==c.teardown.call(e,m,g.handle)||_.removeEvent(e,p,g.handle),delete d[p])}else for(p in d)_.event.remove(e,p+t[l],n,i,!0);_.isEmptyObject(d)&&N.remove(e,"handle events")}},dispatch:function(e){e=_.event.fix(e);var t,n,i,s,a,o=[],d=r.call(arguments),l=(N.get(this,"events")||{})[e.type]||[],u=_.event.special[e.type]||{};if(d[0]=e,e.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,e)){for(o=_.event.handlers.call(this,e,l),t=0;(s=o[t++])&&!e.isPropagationStopped();)for(e.currentTarget=s.elem,n=0;(a=s.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(a.namespace)||(e.handleObj=a,e.data=a.data,void 0!==(i=((_.event.special[a.origType]||{}).handle||a.handler).apply(s.elem,d))&&!1===(e.result=i)&&(e.preventDefault(),e.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,i,s,a,o=[],r=t.delegateCount,d=e.target;if(r&&d.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;d!==this;d=d.parentNode||this)if(1===d.nodeType&&(!0!==d.disabled||"click"!==e.type)){for(i=[],n=0;n-1:_.find(s,this,null,[d]).length),i[s]&&i.push(a);i.length&&o.push({elem:d,handlers:i})}return r]*)\/>/gi,me=/\s*$/g;function ye(e,t){return _.nodeName(e,"table")&&_.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function ve(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Me(e){var t=_e.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function be(e,t){var n,i,s,a,o,r,d,l;if(1===t.nodeType){if(N.hasData(e)&&(a=N.access(e),o=N.set(t,a),l=a.events))for(s in delete o.handle,o.events={},l)for(n=0,i=l[s].length;n1&&"string"==typeof f&&!m.checkClone&&fe.test(f))return e.each((function(s){var a=e.eq(s);g&&(t[0]=f.call(this,s,a.html())),we(a,t,n,i)}));if(h&&(a=(s=ae(t,e[0].ownerDocument,!1,e,i)).firstChild,1===s.childNodes.length&&(s=a),a||i)){for(r=(o=_.map(ee(s,"script"),ve)).length;c")},clone:function(e,t,n){var i,s,a,o,r,d,l,u=e.cloneNode(!0),c=_.contains(e.ownerDocument,e);if(!(m.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||_.isXMLDoc(e)))for(o=ee(u),i=0,s=(a=ee(e)).length;i0&&te(o,!c&&ee(e,"script")),u},cleanData:function(e){for(var t,n,i,s=_.event.special,a=0;void 0!==(n=e[a]);a++)if(W(n)){if(t=n[N.expando]){if(t.events)for(i in t.events)s[i]?_.event.remove(n,i):_.removeEvent(n,i,t.handle);n[N.expando]=void 0}n[I.expando]&&(n[I.expando]=void 0)}}}),_.fn.extend({domManip:we,detach:function(e){return Le(this,e,!0)},remove:function(e){return Le(this,e)},text:function(e){return $(this,(function(e){return void 0===e?_.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 we(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||ye(this,e).appendChild(e)}))},prepend:function(){return we(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=ye(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return we(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return we(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&&(_.cleanData(ee(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return _.clone(this,e,t)}))},html:function(e){return $(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&&!me.test(e)&&!Q[(X.exec(e)||["",""])[1].toLowerCase()]){e=_.htmlPrefilter(e);try{for(;n")).appendTo(t.documentElement))[0].contentDocument).write(),t.close(),n=De(e,t),ke.detach()),Ye[e]=n),n}var xe=/^margin/,Se=new RegExp("^("+q+")(?!px)[a-z%]+$","i"),He=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=i),t.getComputedStyle(e)},Ce=function(e,t,n,i){var s,a,o={};for(a in t)o[a]=e.style[a],e.style[a]=t[a];for(a in s=n.apply(e,i||[]),t)e.style[a]=o[a];return s},je=o.documentElement;function Ee(e,t,n){var i,s,a,o,r=e.style;return""!==(o=(n=n||He(e))?n.getPropertyValue(t)||n[t]:void 0)&&void 0!==o||_.contains(e.ownerDocument,e)||(o=_.style(e,t)),n&&!m.pixelMarginRight()&&Se.test(o)&&xe.test(t)&&(i=r.width,s=r.minWidth,a=r.maxWidth,r.minWidth=r.maxWidth=r.width=o,o=n.width,r.width=i,r.minWidth=s,r.maxWidth=a),void 0!==o?o+"":o}function Oe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){var e,t,n,s,a=o.createElement("div"),r=o.createElement("div");function d(){r.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",r.innerHTML="",je.appendChild(a);var o=i.getComputedStyle(r);e="1%"!==o.top,s="2px"===o.marginLeft,t="4px"===o.width,r.style.marginRight="50%",n="4px"===o.marginRight,je.removeChild(a)}r.style&&(r.style.backgroundClip="content-box",r.cloneNode(!0).style.backgroundClip="",m.clearCloneStyle="content-box"===r.style.backgroundClip,a.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",a.appendChild(r),_.extend(m,{pixelPosition:function(){return d(),e},boxSizingReliable:function(){return null==t&&d(),t},pixelMarginRight:function(){return null==t&&d(),n},reliableMarginLeft:function(){return null==t&&d(),s},reliableMarginRight:function(){var e,t=r.appendChild(o.createElement("div"));return t.style.cssText=r.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",t.style.marginRight=t.style.width="0",r.style.width="1px",je.appendChild(a),e=!parseFloat(i.getComputedStyle(t).marginRight),je.removeChild(a),r.removeChild(t),e}}))}();var Ae=/^(none|table(?!-c[ea]).+)/,Pe={position:"absolute",visibility:"hidden",display:"block"},$e={letterSpacing:"0",fontWeight:"400"},We=["Webkit","O","Moz","ms"],Fe=o.createElement("div").style;function Ne(e){if(e in Fe)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=We.length;n--;)if((e=We[n]+t)in Fe)return e}function Ie(e,t,n){var i=V.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function ze(e,t,n,i,s){for(var a=n===(i?"border":"content")?4:"width"===t?1:0,o=0;a<4;a+=2)"margin"===n&&(o+=_.css(e,n+J[a],!0,s)),i?("content"===n&&(o-=_.css(e,"padding"+J[a],!0,s)),"margin"!==n&&(o-=_.css(e,"border"+J[a]+"Width",!0,s))):(o+=_.css(e,"padding"+J[a],!0,s),"padding"!==n&&(o+=_.css(e,"border"+J[a]+"Width",!0,s)));return o}function Re(e,t,n){var i=!0,s="width"===t?e.offsetWidth:e.offsetHeight,a=He(e),o="border-box"===_.css(e,"boxSizing",!1,a);if(s<=0||null==s){if(((s=Ee(e,t,a))<0||null==s)&&(s=e.style[t]),Se.test(s))return s;i=o&&(m.boxSizingReliable()||s===e.style[t]),s=parseFloat(s)||0}return s+ze(e,t,n||(o?"border":"content"),i,a)+"px"}function Ue(e,t){for(var n,i,s,a=[],o=0,r=e.length;o1)},show:function(){return Ue(this,!0)},hide:function(){return Ue(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){B(this)?_(this).show():_(this).hide()}))}}),_.Tween=qe,qe.prototype={constructor:qe,init:function(e,t,n,i,s,a){this.elem=e,this.prop=n,this.easing=s||_.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=a||(_.cssNumber[n]?"":"px")},cur:function(){var e=qe.propHooks[this.prop];return e&&e.get?e.get(this):qe.propHooks._default.get(this)},run:function(e){var t,n=qe.propHooks[this.prop];return this.options.duration?this.pos=t=_.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):qe.propHooks._default.set(this),this}},qe.prototype.init.prototype=qe.prototype,qe.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=_.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){_.fx.step[e.prop]?_.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[_.cssProps[e.prop]]&&!_.cssHooks[e.prop]?e.elem[e.prop]=e.now:_.style(e.elem,e.prop,e.now+e.unit)}}},qe.propHooks.scrollTop=qe.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},_.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},_.fx=qe.prototype.init,_.fx.step={};var Ve,Je,Be=/^(?:toggle|show|hide)$/,Ge=/queueHooks$/;function Ke(){return i.setTimeout((function(){Ve=void 0})),Ve=_.now()}function Xe(e,t){var n,i=0,s={height:e};for(t=t?1:0;i<4;i+=2-t)s["margin"+(n=J[i])]=s["padding"+n]=e;return t&&(s.opacity=s.width=e),s}function Ze(e,t,n){for(var i,s=(Qe.tweeners[t]||[]).concat(Qe.tweeners["*"]),a=0,o=s.length;a1)},removeAttr:function(e){return this.each((function(){_.removeAttr(this,e)}))}}),_.extend({attr:function(e,t,n){var i,s,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return void 0===e.getAttribute?_.prop(e,t,n):(1===a&&_.isXMLDoc(e)||(t=t.toLowerCase(),s=_.attrHooks[t]||(_.expr.match.bool.test(t)?et:void 0)),void 0!==n?null===n?void _.removeAttr(e,t):s&&"set"in s&&void 0!==(i=s.set(e,n,t))?i:(e.setAttribute(t,n+""),n):s&&"get"in s&&null!==(i=s.get(e,t))?i:null==(i=_.find.attr(e,t))?void 0:i)},attrHooks:{type:{set:function(e,t){if(!m.radioValue&&"radio"===t&&_.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i,s=0,a=t&&t.match(A);if(a&&1===e.nodeType)for(;n=a[s++];)i=_.propFix[n]||n,_.expr.match.bool.test(n)&&(e[i]=!1),e.removeAttribute(n)}}),et={set:function(e,t,n){return!1===t?_.removeAttr(e,n):e.setAttribute(n,n),n}},_.each(_.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=tt[t]||_.find.attr;tt[t]=function(e,t,i){var s,a;return i||(a=tt[t],tt[t]=s,s=null!=n(e,t,i)?t.toLowerCase():null,tt[t]=a),s}}));var nt=/^(?:input|select|textarea|button)$/i,it=/^(?:a|area)$/i;_.fn.extend({prop:function(e,t){return $(this,_.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[_.propFix[e]||e]}))}}),_.extend({prop:function(e,t,n){var i,s,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return 1===a&&_.isXMLDoc(e)||(t=_.propFix[t]||t,s=_.propHooks[t]),void 0!==n?s&&"set"in s&&void 0!==(i=s.set(e,n,t))?i:e[t]=n:s&&"get"in s&&null!==(i=s.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=_.find.attr(e,"tabindex");return t?parseInt(t,10):nt.test(e.nodeName)||it.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),m.optSelected||(_.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)}}),_.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){_.propFix[this.toLowerCase()]=this}));var st=/[\t\r\n\f]/g;function at(e){return e.getAttribute&&e.getAttribute("class")||""}_.fn.extend({addClass:function(e){var t,n,i,s,a,o,r,d=0;if(_.isFunction(e))return this.each((function(t){_(this).addClass(e.call(this,t,at(this)))}));if("string"==typeof e&&e)for(t=e.match(A)||[];n=this[d++];)if(s=at(n),i=1===n.nodeType&&(" "+s+" ").replace(st," ")){for(o=0;a=t[o++];)i.indexOf(" "+a+" ")<0&&(i+=a+" ");s!==(r=_.trim(i))&&n.setAttribute("class",r)}return this},removeClass:function(e){var t,n,i,s,a,o,r,d=0;if(_.isFunction(e))return this.each((function(t){_(this).removeClass(e.call(this,t,at(this)))}));if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(A)||[];n=this[d++];)if(s=at(n),i=1===n.nodeType&&(" "+s+" ").replace(st," ")){for(o=0;a=t[o++];)for(;i.indexOf(" "+a+" ")>-1;)i=i.replace(" "+a+" "," ");s!==(r=_.trim(i))&&n.setAttribute("class",r)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):_.isFunction(e)?this.each((function(n){_(this).toggleClass(e.call(this,n,at(this),t),t)})):this.each((function(){var t,i,s,a;if("string"===n)for(i=0,s=_(this),a=e.match(A)||[];t=a[i++];)s.hasClass(t)?s.removeClass(t):s.addClass(t);else void 0!==e&&"boolean"!==n||((t=at(this))&&N.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":N.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+at(n)+" ").replace(st," ").indexOf(t)>-1)return!0;return!1}});var ot=/\r/g,rt=/[\x20\t\r\n\f]+/g;_.fn.extend({val:function(e){var t,n,i,s=this[0];return arguments.length?(i=_.isFunction(e),this.each((function(n){var s;1===this.nodeType&&(null==(s=i?e.call(this,n,_(this).val()):e)?s="":"number"==typeof s?s+="":_.isArray(s)&&(s=_.map(s,(function(e){return null==e?"":e+""}))),(t=_.valHooks[this.type]||_.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,s,"value")||(this.value=s))}))):s?(t=_.valHooks[s.type]||_.valHooks[s.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(s,"value"))?n:"string"==typeof(n=s.value)?n.replace(ot,""):null==n?"":n:void 0}}),_.extend({valHooks:{option:{get:function(e){var t=_.find.attr(e,"value");return null!=t?t:_.trim(_.text(e)).replace(rt," ")}},select:{get:function(e){for(var t,n,i=e.options,s=e.selectedIndex,a="select-one"===e.type||s<0,o=a?null:[],r=a?s+1:i.length,d=s<0?r:a?s:0;d-1)&&(n=!0);return n||(e.selectedIndex=-1),a}}}}),_.each(["radio","checkbox"],(function(){_.valHooks[this]={set:function(e,t){if(_.isArray(t))return e.checked=_.inArray(_(e).val(),t)>-1}},m.checkOn||(_.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));var dt=/^(?:focusinfocus|focusoutblur)$/;_.extend(_.event,{trigger:function(e,t,n,s){var a,r,d,l,u,c,h,m=[n||o],f=p.call(e,"type")?e.type:e,g=p.call(e,"namespace")?e.namespace.split("."):[];if(r=d=n=n||o,3!==n.nodeType&&8!==n.nodeType&&!dt.test(f+_.event.triggered)&&(f.indexOf(".")>-1&&(g=f.split("."),f=g.shift(),g.sort()),u=f.indexOf(":")<0&&"on"+f,(e=e[_.expando]?e:new _.Event(f,"object"==typeof e&&e)).isTrigger=s?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:_.makeArray(t,[e]),h=_.event.special[f]||{},s||!h.trigger||!1!==h.trigger.apply(n,t))){if(!s&&!h.noBubble&&!_.isWindow(n)){for(l=h.delegateType||f,dt.test(l+f)||(r=r.parentNode);r;r=r.parentNode)m.push(r),d=r;d===(n.ownerDocument||o)&&m.push(d.defaultView||d.parentWindow||i)}for(a=0;(r=m[a++])&&!e.isPropagationStopped();)e.type=a>1?l:h.bindType||f,(c=(N.get(r,"events")||{})[e.type]&&N.get(r,"handle"))&&c.apply(r,t),(c=u&&r[u])&&c.apply&&W(r)&&(e.result=c.apply(r,t),!1===e.result&&e.preventDefault());return e.type=f,s||e.isDefaultPrevented()||h._default&&!1!==h._default.apply(m.pop(),t)||!W(n)||u&&_.isFunction(n[f])&&!_.isWindow(n)&&((d=n[u])&&(n[u]=null),_.event.triggered=f,n[f](),_.event.triggered=void 0,d&&(n[u]=d)),e.result}},simulate:function(e,t,n){var i=_.extend(new _.Event,n,{type:e,isSimulated:!0});_.event.trigger(i,null,t)}}),_.fn.extend({trigger:function(e,t){return this.each((function(){_.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return _.event.trigger(e,t,n,!0)}}),_.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){_.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}})),_.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),m.focusin="onfocusin"in i,m.focusin||_.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){_.event.simulate(t,e.target,_.event.fix(e))};_.event.special[t]={setup:function(){var i=this.ownerDocument||this,s=N.access(i,t);s||i.addEventListener(e,n,!0),N.access(i,t,(s||0)+1)},teardown:function(){var i=this.ownerDocument||this,s=N.access(i,t)-1;s?N.access(i,t,s):(i.removeEventListener(e,n,!0),N.remove(i,t))}}}));var lt=i.location,ut=_.now(),ct=/\?/;_.parseJSON=function(e){return JSON.parse(e+"")},_.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new i.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||_.error("Invalid XML: "+e),t};var ht=/#.*$/,pt=/([?&])_=[^&]*/,mt=/^(.*?):[ \t]*([^\r\n]*)$/gm,ft=/^(?:GET|HEAD)$/,_t=/^\/\//,gt={},yt={},vt="*/".concat("*"),Mt=o.createElement("a");function bt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,s=0,a=t.toLowerCase().match(A)||[];if(_.isFunction(n))for(;i=a[s++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function wt(e,t,n,i){var s={},a=e===yt;function o(r){var d;return s[r]=!0,_.each(e[r]||[],(function(e,r){var l=r(t,n,i);return"string"!=typeof l||a||s[l]?a?!(d=l):void 0:(t.dataTypes.unshift(l),o(l),!1)})),d}return o(t.dataTypes[0])||!s["*"]&&o("*")}function Lt(e,t){var n,i,s=_.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((s[n]?e:i||(i={}))[n]=t[n]);return i&&_.extend(!0,e,i),e}Mt.href=lt.href,_.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:lt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(lt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":vt,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":_.parseJSON,"text xml":_.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Lt(Lt(e,_.ajaxSettings),t):Lt(_.ajaxSettings,e)},ajaxPrefilter:bt(gt),ajaxTransport:bt(yt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,s,a,r,d,l,u,c,h=_.ajaxSetup({},t),p=h.context||h,m=h.context&&(p.nodeType||p.jquery)?_(p):_.event,f=_.Deferred(),g=_.Callbacks("once memory"),y=h.statusCode||{},v={},M={},b=0,w="canceled",L={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!r)for(r={};t=mt.exec(a);)r[t[1].toLowerCase()]=t[2];t=r[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=M[n]=M[n]||e,v[e]=t),this},overrideMimeType:function(e){return b||(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)y[t]=[y[t],e[t]];else L.always(e[L.status]);return this},abort:function(e){var t=e||w;return n&&n.abort(t),k(0,t),this}};if(f.promise(L).complete=g.add,L.success=L.done,L.error=L.fail,h.url=((e||h.url||lt.href)+"").replace(ht,"").replace(_t,lt.protocol+"//"),h.type=t.method||t.type||h.method||h.type,h.dataTypes=_.trim(h.dataType||"*").toLowerCase().match(A)||[""],null==h.crossDomain){l=o.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=Mt.protocol+"//"+Mt.host!=l.protocol+"//"+l.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=_.param(h.data,h.traditional)),wt(gt,h,t,L),2===b)return L;for(c in(u=_.event&&h.global)&&0==_.active++&&_.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!ft.test(h.type),s=h.url,h.hasContent||(h.data&&(s=h.url+=(ct.test(s)?"&":"?")+h.data,delete h.data),!1===h.cache&&(h.url=pt.test(s)?s.replace(pt,"$1_="+ut++):s+(ct.test(s)?"&":"?")+"_="+ut++)),h.ifModified&&(_.lastModified[s]&&L.setRequestHeader("If-Modified-Since",_.lastModified[s]),_.etag[s]&&L.setRequestHeader("If-None-Match",_.etag[s])),(h.data&&h.hasContent&&!1!==h.contentType||t.contentType)&&L.setRequestHeader("Content-Type",h.contentType),L.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+vt+"; q=0.01":""):h.accepts["*"]),h.headers)L.setRequestHeader(c,h.headers[c]);if(h.beforeSend&&(!1===h.beforeSend.call(p,L,h)||2===b))return L.abort();for(c in w="abort",{success:1,error:1,complete:1})L[c](h[c]);if(n=wt(yt,h,t,L)){if(L.readyState=1,u&&m.trigger("ajaxSend",[L,h]),2===b)return L;h.async&&h.timeout>0&&(d=i.setTimeout((function(){L.abort("timeout")}),h.timeout));try{b=1,n.send(v,k)}catch(e){if(!(b<2))throw e;k(-1,e)}}else k(-1,"No Transport");function k(e,t,o,r){var l,c,v,M,w,k=t;2!==b&&(b=2,d&&i.clearTimeout(d),n=void 0,a=r||"",L.readyState=e>0?4:0,l=e>=200&&e<300||304===e,o&&(M=function(e,t,n){for(var i,s,a,o,r=e.contents,d=e.dataTypes;"*"===d[0];)d.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(s in r)if(r[s]&&r[s].test(i)){d.unshift(s);break}if(d[0]in n)a=d[0];else{for(s in n){if(!d[0]||e.converters[s+" "+d[0]]){a=s;break}o||(o=s)}a=a||o}if(a)return a!==d[0]&&d.unshift(a),n[a]}(h,L,o)),M=function(e,t,n,i){var s,a,o,r,d,l={},u=e.dataTypes.slice();if(u[1])for(o in e.converters)l[o.toLowerCase()]=e.converters[o];for(a=u.shift();a;)if(e.responseFields[a]&&(n[e.responseFields[a]]=t),!d&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),d=a,a=u.shift())if("*"===a)a=d;else if("*"!==d&&d!==a){if(!(o=l[d+" "+a]||l["* "+a]))for(s in l)if((r=s.split(" "))[1]===a&&(o=l[d+" "+r[0]]||l["* "+r[0]])){!0===o?o=l[s]:!0!==l[s]&&(a=r[0],u.unshift(r[1]));break}if(!0!==o)if(o&&e.throws)t=o(t);else try{t=o(t)}catch(e){return{state:"parsererror",error:o?e:"No conversion from "+d+" to "+a}}}return{state:"success",data:t}}(h,M,L,l),l?(h.ifModified&&((w=L.getResponseHeader("Last-Modified"))&&(_.lastModified[s]=w),(w=L.getResponseHeader("etag"))&&(_.etag[s]=w)),204===e||"HEAD"===h.type?k="nocontent":304===e?k="notmodified":(k=M.state,c=M.data,l=!(v=M.error))):(v=k,!e&&k||(k="error",e<0&&(e=0))),L.status=e,L.statusText=(t||k)+"",l?f.resolveWith(p,[c,k,L]):f.rejectWith(p,[L,k,v]),L.statusCode(y),y=void 0,u&&m.trigger(l?"ajaxSuccess":"ajaxError",[L,h,l?c:v]),g.fireWith(p,[L,k]),u&&(m.trigger("ajaxComplete",[L,h]),--_.active||_.event.trigger("ajaxStop")))}return L},getJSON:function(e,t,n){return _.get(e,t,n,"json")},getScript:function(e,t){return _.get(e,void 0,t,"script")}}),_.each(["get","post"],(function(e,t){_[t]=function(e,n,i,s){return _.isFunction(n)&&(s=s||i,i=n,n=void 0),_.ajax(_.extend({url:e,type:t,dataType:s,data:n,success:i},_.isPlainObject(e)&&e))}})),_._evalUrl=function(e){return _.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},_.fn.extend({wrapAll:function(e){var t;return _.isFunction(e)?this.each((function(t){_(this).wrapAll(e.call(this,t))})):(this[0]&&(t=_(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 _.isFunction(e)?this.each((function(t){_(this).wrapInner(e.call(this,t))})):this.each((function(){var t=_(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=_.isFunction(e);return this.each((function(n){_(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(){return this.parent().each((function(){_.nodeName(this,"body")||_(this).replaceWith(this.childNodes)})).end()}}),_.expr.filters.hidden=function(e){return!_.expr.filters.visible(e)},_.expr.filters.visible=function(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0};var kt=/%20/g,Yt=/\[\]$/,Dt=/\r?\n/g,Tt=/^(?:submit|button|image|reset|file)$/i,xt=/^(?:input|select|textarea|keygen)/i;function St(e,t,n,i){var s;if(_.isArray(t))_.each(t,(function(t,s){n||Yt.test(e)?i(e,s):St(e+"["+("object"==typeof s&&null!=s?t:"")+"]",s,n,i)}));else if(n||"object"!==_.type(t))i(e,t);else for(s in t)St(e+"["+s+"]",t[s],n,i)}_.param=function(e,t){var n,i=[],s=function(e,t){t=_.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=_.ajaxSettings&&_.ajaxSettings.traditional),_.isArray(e)||e.jquery&&!_.isPlainObject(e))_.each(e,(function(){s(this.name,this.value)}));else for(n in e)St(n,e[n],t,s);return i.join("&").replace(kt,"+")},_.fn.extend({serialize:function(){return _.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=_.prop(this,"elements");return e?_.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!_(this).is(":disabled")&&xt.test(this.nodeName)&&!Tt.test(e)&&(this.checked||!K.test(e))})).map((function(e,t){var n=_(this).val();return null==n?null:_.isArray(n)?_.map(n,(function(e){return{name:t.name,value:e.replace(Dt,"\r\n")}})):{name:t.name,value:n.replace(Dt,"\r\n")}})).get()}}),_.ajaxSettings.xhr=function(){try{return new i.XMLHttpRequest}catch(e){}};var Ht={0:200,1223:204},Ct=_.ajaxSettings.xhr();m.cors=!!Ct&&"withCredentials"in Ct,m.ajax=Ct=!!Ct,_.ajaxTransport((function(e){var t,n;if(m.cors||Ct&&!e.crossDomain)return{send:function(s,a){var o,r=e.xhr();if(r.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)r[o]=e.xhrFields[o];for(o in e.mimeType&&r.overrideMimeType&&r.overrideMimeType(e.mimeType),e.crossDomain||s["X-Requested-With"]||(s["X-Requested-With"]="XMLHttpRequest"),s)r.setRequestHeader(o,s[o]);t=function(e){return function(){t&&(t=n=r.onload=r.onerror=r.onabort=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?a(0,"error"):a(r.status,r.statusText):a(Ht[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=t(),n=r.onerror=t("error"),void 0!==r.onabort?r.onabort=n:r.onreadystatechange=function(){4===r.readyState&&i.setTimeout((function(){t&&n()}))},t=t("abort");try{r.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),_.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 _.globalEval(e),e}}}),_.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),_.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain)return{send:function(i,s){t=_("