Version Notes
Adds multiple selection features for attribute and price filters in Magento layered navigation.
Download this release
Release Info
Developer | Mana Team |
Extension | Mana_Filters |
Version | 15.11.24.13 |
Comparing to | |
See all releases |
Code changes from version 14.11.25.15 to 15.11.24.13
- app/code/local/Mana/Core/Block/ExcludeProductsNotAssignedToSubCategories.php +81 -0
- app/code/local/Mana/Core/Helper/Data.php +43 -1
- app/code/local/Mana/Core/Helper/Db.php +11 -0
- app/code/local/Mana/Core/Helper/PageType.php +4 -1
- app/code/local/Mana/Core/Model/Source/Abstract.php +5 -1
- app/code/local/Mana/Core/etc/config.xml +1 -1
- app/code/local/Mana/Core/etc/system.xml +2 -2
- app/code/local/Mana/Db/Model/Observer.php +5 -2
- app/code/local/Mana/Db/etc/config.xml +1 -1
- app/code/local/Mana/Filters/Helper/Data.php +50 -16
- app/code/local/Mana/Filters/Helper/Item.php +21 -4
- app/code/local/Mana/Filters/Model/Filter/Attribute.php +2 -2
- app/code/local/Mana/Filters/Model/Filter/Category.php +72 -4
- app/code/local/Mana/Filters/Model/Filter/Decimal.php +4 -0
- app/code/local/Mana/Filters/Model/Source/Filter.php +8 -3
- app/code/local/Mana/Filters/Resource/Filter/Price.php +65 -1
- app/code/local/Mana/Filters/Resource/Filter2.php +3 -2
- app/code/local/Mana/Filters/Resource/Filter2/Collection.php +12 -0
- app/code/local/Mana/Filters/Resource/Filter2/Store/Collection.php +24 -0
- app/code/local/Mana/Filters/Resource/Item.php +19 -12
- app/code/local/Mana/Filters/etc/config.xml +1 -1
- app/design/adminhtml/default/default/layout/mana_core.xml +6 -0
- app/design/frontend/base/default/layout/mana_core.xml +6 -0
- app/etc/modules/Mana_Core.xml +5 -6
- js/jquery/froogaloop.js +289 -289
- js/jquery/froogaloop.min.js +4 -4
- js/jquery/history.js +0 -1
- js/jquery/jquery.js +7427 -6553
- js/jquery/jquery.min.js +4 -3
- js/mana/core.js +50 -48
- js/mana/core.js.map +26 -26
- js/mana/core.min.js +7 -7
- js/src/Mana/Core/Ajax.js +5 -4
- js/src/Mana/Core/obsolete.js +8 -7
- js/src/Mana/Core/rwd.js +1 -1
- package.xml +6 -6
- skin/frontend/base/default/css/mana_core.css +1 -1
app/code/local/Mana/Core/Block/ExcludeProductsNotAssignedToSubCategories.php
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @category Mana
|
4 |
+
* @package Mana_Core
|
5 |
+
* @copyright Copyright (c) http://www.manadev.com
|
6 |
+
* @license http://www.manadev.com/license Proprietary License
|
7 |
+
*/
|
8 |
+
/**
|
9 |
+
* @author Mana Team
|
10 |
+
*
|
11 |
+
*/
|
12 |
+
class Mana_Core_Block_ExcludeProductsNotAssignedToSubCategories extends Mage_Core_Block_Template {
|
13 |
+
protected function _prepareLayout()
|
14 |
+
{
|
15 |
+
/* @var $layoutHelper Mana_Core_Helper_Layout */
|
16 |
+
$layoutHelper = Mage::helper('mana_core/layout');
|
17 |
+
$layoutHelper->delayPrepareLayout($this, 100);
|
18 |
+
|
19 |
+
return $this;
|
20 |
+
}
|
21 |
+
|
22 |
+
public function delayedPrepareLayout() {
|
23 |
+
$layer = $this->getLayer();
|
24 |
+
if ($this->getShowRootCategory()) {
|
25 |
+
$this->setCategoryId(Mage::app()->getStore()->getRootCategoryId());
|
26 |
+
}
|
27 |
+
|
28 |
+
if (Mage::registry('product')) {
|
29 |
+
$categories = Mage::registry('product')->getCategoryCollection()
|
30 |
+
->setPage(1, 1)
|
31 |
+
->load();
|
32 |
+
if ($categories->count()) {
|
33 |
+
$this->setCategoryId(current($categories->getIterator()));
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
+
$origCategory = null;
|
38 |
+
if ($this->getCategoryId()) {
|
39 |
+
$category = Mage::getModel('catalog/category')->load($this->getCategoryId());
|
40 |
+
if ($category->getId()) {
|
41 |
+
$origCategory = $layer->getCurrentCategory();
|
42 |
+
$layer->setCurrentCategory($category);
|
43 |
+
}
|
44 |
+
$categoryId = $this->getCategoryId();
|
45 |
+
}
|
46 |
+
else {
|
47 |
+
$categoryId = Mage::app()->getStore()->getRootCategoryId();
|
48 |
+
}
|
49 |
+
|
50 |
+
$this->_prepareProductCollection($layer->getProductCollection(), $categoryId);
|
51 |
+
|
52 |
+
if ($origCategory) {
|
53 |
+
$layer->setCurrentCategory($origCategory);
|
54 |
+
}
|
55 |
+
|
56 |
+
return parent::_prepareLayout();
|
57 |
+
}
|
58 |
+
|
59 |
+
public function getLayer() {
|
60 |
+
return Mage::helper('mana_core/layer')->getLayer();
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* @param Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection $collection
|
65 |
+
* @param $categoryId
|
66 |
+
*/
|
67 |
+
protected function _prepareProductCollection($collection, $categoryId) {
|
68 |
+
$res = $collection->getResource();
|
69 |
+
$db = $res->getReadConnection();
|
70 |
+
$storeId = Mage::app()->getStore()->getId();
|
71 |
+
$subSelect = $db->select()
|
72 |
+
->from(array('subcat_index' => $res->getTable('catalog/category_product_index')),
|
73 |
+
new Zend_Db_Expr("`subcat_index`.`product_id`"))
|
74 |
+
->joinInner(array('subcat' => $res->getTable('catalog/category')),
|
75 |
+
"`subcat`.`entity_id` = `subcat_index`.`category_id`", null)
|
76 |
+
->where("`subcat_index`.`store_id`=$storeId AND `subcat_index`.`visibility` IN(2, 4) AND `subcat`.`parent_id` = ?",
|
77 |
+
$categoryId);
|
78 |
+
|
79 |
+
$collection->getSelect()->where("`e`.`entity_id` IN ({$subSelect})");
|
80 |
+
}
|
81 |
+
}
|
app/code/local/Mana/Core/Helper/Data.php
CHANGED
@@ -17,6 +17,11 @@ class Mana_Core_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
17 |
*/
|
18 |
protected $_rootCategory;
|
19 |
|
|
|
|
|
|
|
|
|
|
|
20 |
/**
|
21 |
* Retrieve config value for store by path. By default uses standard Magento function to query core_config_data
|
22 |
* table and use config.xml for default value. Though this could be replaced by extensions (in later versions).
|
@@ -430,7 +435,9 @@ class Mana_Core_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
430 |
|
431 |
$result = '';
|
432 |
foreach ($request->getUserParams() as $key => $value) {
|
433 |
-
$
|
|
|
|
|
434 |
}
|
435 |
return $result;
|
436 |
}
|
@@ -753,6 +760,10 @@ class Mana_Core_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
753 |
return $this->isModuleEnabled('Mana_Filters');
|
754 |
}
|
755 |
|
|
|
|
|
|
|
|
|
756 |
public function isManadevLayeredNavigationCheckboxesInstalled() {
|
757 |
return $this->isModuleEnabled('ManaPro_FilterCheckboxes');
|
758 |
}
|
@@ -769,6 +780,10 @@ class Mana_Core_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
769 |
return $this->isModuleEnabled('Mana_AttributePage');
|
770 |
}
|
771 |
|
|
|
|
|
|
|
|
|
772 |
public function isManadevLayeredNavigationTreeInstalled() {
|
773 |
return $this->isModuleEnabled('ManaPro_FilterTree');
|
774 |
}
|
@@ -791,6 +806,18 @@ class Mana_Core_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
791 |
return $this->isModuleEnabled('Mana_Page');
|
792 |
}
|
793 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
794 |
protected $_accentTranslations = array(
|
795 |
'à' => 'a',
|
796 |
'á' => 'a',
|
@@ -925,4 +952,19 @@ class Mana_Core_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
925 |
}
|
926 |
return $this->_rootCategory;
|
927 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
928 |
}
|
17 |
*/
|
18 |
protected $_rootCategory;
|
19 |
|
20 |
+
/**
|
21 |
+
* @var Mage_Core_Model_Store
|
22 |
+
*/
|
23 |
+
protected $_actualCurrentStore;
|
24 |
+
|
25 |
/**
|
26 |
* Retrieve config value for store by path. By default uses standard Magento function to query core_config_data
|
27 |
* table and use config.xml for default value. Though this could be replaced by extensions (in later versions).
|
435 |
|
436 |
$result = '';
|
437 |
foreach ($request->getUserParams() as $key => $value) {
|
438 |
+
if (!is_object($value)) {
|
439 |
+
$result .= '/' . $key . '/' . $value;
|
440 |
+
}
|
441 |
}
|
442 |
return $result;
|
443 |
}
|
760 |
return $this->isModuleEnabled('Mana_Filters');
|
761 |
}
|
762 |
|
763 |
+
public function isManadevPaidLayeredNavigationInstalled() {
|
764 |
+
return $this->isModuleEnabled('ManaPro_FilterAdmin');
|
765 |
+
}
|
766 |
+
|
767 |
public function isManadevLayeredNavigationCheckboxesInstalled() {
|
768 |
return $this->isModuleEnabled('ManaPro_FilterCheckboxes');
|
769 |
}
|
780 |
return $this->isModuleEnabled('Mana_AttributePage');
|
781 |
}
|
782 |
|
783 |
+
public function isManadevSortingInstalled() {
|
784 |
+
return $this->isModuleEnabled('Mana_Sorting');
|
785 |
+
}
|
786 |
+
|
787 |
public function isManadevLayeredNavigationTreeInstalled() {
|
788 |
return $this->isModuleEnabled('ManaPro_FilterTree');
|
789 |
}
|
806 |
return $this->isModuleEnabled('Mana_Page');
|
807 |
}
|
808 |
|
809 |
+
public function isManadevCMSProInstalled() {
|
810 |
+
return $this->isModuleEnabled('ManaPro_Content');
|
811 |
+
}
|
812 |
+
|
813 |
+
public function isManadevCMSInstalled() {
|
814 |
+
return $this->isModuleEnabled('Mana_Content');
|
815 |
+
}
|
816 |
+
|
817 |
+
public function isManadevManySKUInstalled() {
|
818 |
+
return $this->isModuleEnabled('ManaPro_ProductFaces');
|
819 |
+
}
|
820 |
+
|
821 |
protected $_accentTranslations = array(
|
822 |
'à' => 'a',
|
823 |
'á' => 'a',
|
952 |
}
|
953 |
return $this->_rootCategory;
|
954 |
}
|
955 |
+
|
956 |
+
public function setCurrentStore($store) {
|
957 |
+
if (!$this->_actualCurrentStore) {
|
958 |
+
$this->_actualCurrentStore = Mage::app()->getStore();
|
959 |
+
}
|
960 |
+
|
961 |
+
Mage::app()->setCurrentStore(Mage::app()->getStore($store));
|
962 |
+
}
|
963 |
+
|
964 |
+
public function restoreCurrentStore() {
|
965 |
+
if ($this->_actualCurrentStore) {
|
966 |
+
Mage::app()->setCurrentStore($this->_actualCurrentStore);
|
967 |
+
$this->_actualCurrentStore = null;
|
968 |
+
}
|
969 |
+
}
|
970 |
}
|
app/code/local/Mana/Core/Helper/Db.php
CHANGED
@@ -88,6 +88,10 @@ class Mana_Core_Helper_Db extends Mage_Core_Helper_Abstract {
|
|
88 |
return $expr;
|
89 |
}
|
90 |
|
|
|
|
|
|
|
|
|
91 |
public function getSeoSymbols() {
|
92 |
return self::$_seoSymbols;
|
93 |
}
|
@@ -103,4 +107,11 @@ class Mana_Core_Helper_Db extends Mage_Core_Helper_Abstract {
|
|
103 |
|
104 |
return $this;
|
105 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
}
|
88 |
return $expr;
|
89 |
}
|
90 |
|
91 |
+
public function makeNotEmpty($expr) {
|
92 |
+
return "IF ($expr = '', '-', $expr)";
|
93 |
+
}
|
94 |
+
|
95 |
public function getSeoSymbols() {
|
96 |
return self::$_seoSymbols;
|
97 |
}
|
107 |
|
108 |
return $this;
|
109 |
}
|
110 |
+
|
111 |
+
public function indexRequiresReindexing($code) {
|
112 |
+
/* @var $indexer Mage_Index_Model_Indexer */
|
113 |
+
$indexer = Mage::getSingleton('index/indexer');
|
114 |
+
$process = $indexer->getProcessByCode($code);
|
115 |
+
return $process->getData('status') != Mage_Index_Model_Process::STATUS_PENDING;
|
116 |
+
}
|
117 |
}
|
app/code/local/Mana/Core/Helper/PageType.php
CHANGED
@@ -35,12 +35,15 @@ abstract class Mana_Core_Helper_PageType extends Mage_Core_Helper_Abstract {
|
|
35 |
}
|
36 |
|
37 |
public function getPageContent() {
|
|
|
|
|
|
|
38 |
return array(
|
39 |
'page_type' => $this->getPageTypeId(),
|
40 |
'meta_title' => Mage::getStoreConfig('design/head/default_title'),
|
41 |
'meta_keywords' => Mage::getStoreConfig('design/head/default_keywords'),
|
42 |
'meta_description' => Mage::getStoreConfig('design/head/default_description'),
|
43 |
-
'meta_robots' => Mage::getStoreConfig('design/head/default_robots'),
|
44 |
'title' => '',
|
45 |
'description' => '',
|
46 |
);
|
35 |
}
|
36 |
|
37 |
public function getPageContent() {
|
38 |
+
$layout = Mage::getSingleton('core/layout');
|
39 |
+
$headBlock = $layout->getBlock('head');
|
40 |
+
|
41 |
return array(
|
42 |
'page_type' => $this->getPageTypeId(),
|
43 |
'meta_title' => Mage::getStoreConfig('design/head/default_title'),
|
44 |
'meta_keywords' => Mage::getStoreConfig('design/head/default_keywords'),
|
45 |
'meta_description' => Mage::getStoreConfig('design/head/default_description'),
|
46 |
+
'meta_robots' => $headBlock ? $headBlock->getRobots() : Mage::getStoreConfig('design/head/default_robots'),
|
47 |
'title' => '',
|
48 |
'description' => '',
|
49 |
);
|
app/code/local/Mana/Core/Model/Source/Abstract.php
CHANGED
@@ -38,7 +38,11 @@ abstract class Mana_Core_Model_Source_Abstract {
|
|
38 |
{
|
39 |
$_options = array();
|
40 |
foreach ($this->getAllOptions() as $option) {
|
41 |
-
$
|
|
|
|
|
|
|
|
|
42 |
}
|
43 |
return $_options;
|
44 |
}
|
38 |
{
|
39 |
$_options = array();
|
40 |
foreach ($this->getAllOptions() as $option) {
|
41 |
+
if(!is_array($option['value'])) {
|
42 |
+
$_options[$option['value']] = $option['label'];
|
43 |
+
} else {
|
44 |
+
$_options[] = $option['label'];
|
45 |
+
}
|
46 |
}
|
47 |
return $_options;
|
48 |
}
|
app/code/local/Mana/Core/etc/config.xml
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
<Mana_Core>
|
13 |
<!-- This version number identifies version of database tables specific to this extension. It is written to
|
14 |
core_resource table. -->
|
15 |
-
<version>
|
16 |
</Mana_Core>
|
17 |
</modules>
|
18 |
<!-- This section contains module settings which are merged into global configuration during each page load,
|
12 |
<Mana_Core>
|
13 |
<!-- This version number identifies version of database tables specific to this extension. It is written to
|
14 |
core_resource table. -->
|
15 |
+
<version>15.11.24.13</version>
|
16 |
</Mana_Core>
|
17 |
</modules>
|
18 |
<!-- This section contains module settings which are merged into global configuration during each page load,
|
app/code/local/Mana/Core/etc/system.xml
CHANGED
@@ -31,7 +31,7 @@
|
|
31 |
<show_in_store>1</show_in_store>
|
32 |
<fields>
|
33 |
<jquery translate="label comment">
|
34 |
-
<label>jQuery (version 1.
|
35 |
<comment>Always runs in jQuery.noConflict() mode (slight modification) to prevent conflicts with Prototype JavaScript library used by Magento.</comment>
|
36 |
<frontend_type>select</frontend_type>
|
37 |
<source_model>mana_core/source_js</source_model>
|
@@ -51,7 +51,7 @@
|
|
51 |
<show_in_store>1</show_in_store>
|
52 |
<fields>
|
53 |
<jquery translate="label comment">
|
54 |
-
<label>jQuery (version 1.
|
55 |
<comment>Always runs in jQuery.noConflict() mode (slight modification) to prevent conflicts with Prototype JavaScript library used by Magento.</comment>
|
56 |
<frontend_type>select</frontend_type>
|
57 |
<source_model>mana_core/source_js</source_model>
|
31 |
<show_in_store>1</show_in_store>
|
32 |
<fields>
|
33 |
<jquery translate="label comment">
|
34 |
+
<label>jQuery (version 1.11.2)</label>
|
35 |
<comment>Always runs in jQuery.noConflict() mode (slight modification) to prevent conflicts with Prototype JavaScript library used by Magento.</comment>
|
36 |
<frontend_type>select</frontend_type>
|
37 |
<source_model>mana_core/source_js</source_model>
|
51 |
<show_in_store>1</show_in_store>
|
52 |
<fields>
|
53 |
<jquery translate="label comment">
|
54 |
+
<label>jQuery (version 1.11.2)</label>
|
55 |
<comment>Always runs in jQuery.noConflict() mode (slight modification) to prevent conflicts with Prototype JavaScript library used by Magento.</comment>
|
56 |
<frontend_type>select</frontend_type>
|
57 |
<source_model>mana_core/source_js</source_model>
|
app/code/local/Mana/Db/Model/Observer.php
CHANGED
@@ -35,8 +35,11 @@ class Mana_Db_Model_Observer {
|
|
35 |
if ($reindex = Mage::registry('m_reindex')) {
|
36 |
foreach ($reindex as $code) {
|
37 |
$indexer->getProcessByCode($code)
|
38 |
-
->changeStatus(Mage_Index_Model_Process::STATUS_REQUIRE_REINDEX)
|
39 |
-
|
|
|
|
|
|
|
40 |
}
|
41 |
}
|
42 |
if ($savedObjects = Mage::registry('m_objects_to_be_saved')) {
|
35 |
if ($reindex = Mage::registry('m_reindex')) {
|
36 |
foreach ($reindex as $code) {
|
37 |
$indexer->getProcessByCode($code)
|
38 |
+
->changeStatus(Mage_Index_Model_Process::STATUS_REQUIRE_REINDEX);
|
39 |
+
}
|
40 |
+
foreach ($reindex as $code) {
|
41 |
+
$indexer->getProcessByCode($code)
|
42 |
+
->reindexAll();
|
43 |
}
|
44 |
}
|
45 |
if ($savedObjects = Mage::registry('m_objects_to_be_saved')) {
|
app/code/local/Mana/Db/etc/config.xml
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
<Mana_Db>
|
13 |
<!-- This version number identifies version of database tables specific to this extension. It is written to
|
14 |
core_resource table. -->
|
15 |
-
<version>
|
16 |
</Mana_Db>
|
17 |
</modules>
|
18 |
<!-- This section contains module settings which are merged into global configuration during each page load,
|
12 |
<Mana_Db>
|
13 |
<!-- This version number identifies version of database tables specific to this extension. It is written to
|
14 |
core_resource table. -->
|
15 |
+
<version>15.01.29.22</version>
|
16 |
</Mana_Db>
|
17 |
</modules>
|
18 |
<!-- This section contains module settings which are merged into global configuration during each page load,
|
app/code/local/Mana/Filters/Helper/Data.php
CHANGED
@@ -219,7 +219,7 @@ class Mana_Filters_Helper_Data extends Mana_Core_Helper_Layer {
|
|
219 |
}
|
220 |
}
|
221 |
|
222 |
-
|
223 |
if ($block->getData('show_'.$filter->getCode())) {
|
224 |
return true;
|
225 |
}
|
@@ -240,30 +240,64 @@ class Mana_Filters_Helper_Data extends Mana_Core_Helper_Layer {
|
|
240 |
if (in_array($showInFilter, $showIn)) {
|
241 |
return true;
|
242 |
}
|
243 |
-
if ($this->isMobileFilter($block, $filter))
|
244 |
-
{
|
245 |
-
return true;
|
246 |
-
}
|
247 |
return false;
|
248 |
}
|
249 |
else {
|
250 |
return true;
|
251 |
}
|
252 |
}
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
|
|
258 |
}
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
263 |
}
|
264 |
}
|
|
|
265 |
return false;
|
266 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
267 |
public function getFilterLayoutName($block, $filter) {
|
268 |
if ($showInFilter = $block->getShowInFilter()) {
|
269 |
return 'm_' . $showInFilter . '_' . $filter->getCode() . '_filter';
|
@@ -298,7 +332,7 @@ class Mana_Filters_Helper_Data extends Mana_Core_Helper_Layer {
|
|
298 |
if ($inCurrentCategory) {
|
299 |
$from = $select->getPart(Varien_Db_Select::FROM);
|
300 |
if (isset($from['cat_index'])) {
|
301 |
-
$categoryId = $this->getLayer()->getCurrentCategory()->getId();
|
302 |
$from['cat_index']['joinCondition'] = preg_replace(
|
303 |
"/(.*)(`?)cat_index(`?).(`?)category_id(`?)='(\\d+)'(.*)/",
|
304 |
"$1$2cat_index$3.$4category_id$5='{$categoryId}'$7",
|
@@ -440,7 +474,7 @@ class Mana_Filters_Helper_Data extends Mana_Core_Helper_Layer {
|
|
440 |
foreach ($filterCollection as $filter) {
|
441 |
/* @var $filter Mana_Filters_Model_Filter2_Store */
|
442 |
if ($filter->getType() == 'category') {
|
443 |
-
if ($filter->getData('display') == 'tree') {
|
444 |
return true;
|
445 |
}
|
446 |
}
|
219 |
}
|
220 |
}
|
221 |
|
222 |
+
protected function _canShowFilterInBlock($block, $filter) {
|
223 |
if ($block->getData('show_'.$filter->getCode())) {
|
224 |
return true;
|
225 |
}
|
240 |
if (in_array($showInFilter, $showIn)) {
|
241 |
return true;
|
242 |
}
|
|
|
|
|
|
|
|
|
243 |
return false;
|
244 |
}
|
245 |
else {
|
246 |
return true;
|
247 |
}
|
248 |
}
|
249 |
+
|
250 |
+
protected function _findBlockForPosition($position) {
|
251 |
+
$layout = Mage::getSingleton('core/layout');
|
252 |
+
foreach (array("mana.catalog.{$position}nav", "mana.catalogsearch.{$position}nav") as $blockName) {
|
253 |
+
if ($block = $layout->getBlock($blockName)) {
|
254 |
+
return $block;
|
255 |
}
|
256 |
+
}
|
257 |
+
|
258 |
+
return false;
|
259 |
+
}
|
260 |
+
|
261 |
+
protected function _isMobileOnlyFilter($block, $filter) {
|
262 |
+
if (!($showInFilter = $block->getShowInFilter())) {
|
263 |
+
return false;
|
264 |
+
}
|
265 |
+
|
266 |
+
if ($showInFilter != 'above_products') {
|
267 |
+
return false;
|
268 |
+
}
|
269 |
+
|
270 |
+
if (!in_array(Mage::getStoreConfig('mana_filters/mobile/column_filters'), array('copy', 'move'))) {
|
271 |
+
return false;
|
272 |
+
}
|
273 |
+
|
274 |
+
$showIn = $filter->getShowIn();
|
275 |
+
if (!is_array($showIn)) {
|
276 |
+
$showIn = explode(',', $showIn);
|
277 |
+
}
|
278 |
+
|
279 |
+
foreach (array('left', 'right') as $position) {
|
280 |
+
if ($block = $this->_findBlockForPosition($position)) {
|
281 |
+
if ($this->_canShowFilterInBlock($block, $filter)) {
|
282 |
+
return true;
|
283 |
+
}
|
284 |
+
elseif (in_array($position, $showIn)) {
|
285 |
+
return true;
|
286 |
+
}
|
287 |
}
|
288 |
}
|
289 |
+
|
290 |
return false;
|
291 |
}
|
292 |
+
|
293 |
+
public function canShowFilterInBlock($block, $filter) {
|
294 |
+
return $this->_canShowFilterInBlock($block, $filter) || $this->_isMobileOnlyFilter($block, $filter);
|
295 |
+
}
|
296 |
+
|
297 |
+
public function isMobileFilter($block, $filter) {
|
298 |
+
return !$this->_canShowFilterInBlock($block, $filter) && $this->_isMobileOnlyFilter($block, $filter);
|
299 |
+
}
|
300 |
+
|
301 |
public function getFilterLayoutName($block, $filter) {
|
302 |
if ($showInFilter = $block->getShowInFilter()) {
|
303 |
return 'm_' . $showInFilter . '_' . $filter->getCode() . '_filter';
|
332 |
if ($inCurrentCategory) {
|
333 |
$from = $select->getPart(Varien_Db_Select::FROM);
|
334 |
if (isset($from['cat_index'])) {
|
335 |
+
$categoryId = is_int($inCurrentCategory) ? $inCurrentCategory : $this->getLayer()->getCurrentCategory()->getId();
|
336 |
$from['cat_index']['joinCondition'] = preg_replace(
|
337 |
"/(.*)(`?)cat_index(`?).(`?)category_id(`?)='(\\d+)'(.*)/",
|
338 |
"$1$2cat_index$3.$4category_id$5='{$categoryId}'$7",
|
474 |
foreach ($filterCollection as $filter) {
|
475 |
/* @var $filter Mana_Filters_Model_Filter2_Store */
|
476 |
if ($filter->getType() == 'category') {
|
477 |
+
if ($filter->getData('display') == 'tree' || $filter->getData('display') == 'subtree') {
|
478 |
return true;
|
479 |
}
|
480 |
}
|
app/code/local/Mana/Filters/Helper/Item.php
CHANGED
@@ -39,14 +39,27 @@ class Mana_Filters_Helper_Item extends Mana_Core_Helper_Layer {
|
|
39 |
return $this->_resources;
|
40 |
}
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
/**
|
43 |
* @param Mana_Filters_Model_Filter_Attribute $filter
|
44 |
* @param Mana_Filters_Model_Item[] $items
|
45 |
*/
|
46 |
public function registerItems($filter, $items) {
|
47 |
if ($this->isEnabled()) {
|
48 |
-
$this->
|
49 |
-
|
|
|
|
|
50 |
}
|
51 |
}
|
52 |
|
@@ -90,7 +103,9 @@ class Mana_Filters_Helper_Item extends Mana_Core_Helper_Layer {
|
|
90 |
* @return array|bool
|
91 |
*/
|
92 |
public function getAttributeItems($attributeId) {
|
93 |
-
|
|
|
|
|
94 |
}
|
95 |
|
96 |
/**
|
@@ -98,7 +113,9 @@ class Mana_Filters_Helper_Item extends Mana_Core_Helper_Layer {
|
|
98 |
* @return Mana_Filters_Model_Item|bool
|
99 |
*/
|
100 |
public function get($optionId) {
|
101 |
-
|
|
|
|
|
102 |
}
|
103 |
|
104 |
#region Dependencies
|
39 |
return $this->_resources;
|
40 |
}
|
41 |
|
42 |
+
protected function _prepareArraysForCurrentStore() {
|
43 |
+
$storeId = Mage::app()->getStore()->getId();
|
44 |
+
if (!isset($this->_attributeItems[$storeId])) {
|
45 |
+
$this->_attributeItems[$storeId] = array();
|
46 |
+
}
|
47 |
+
if (!isset($this->_allItems[$storeId])) {
|
48 |
+
$this->_allItems[$storeId] = array();
|
49 |
+
}
|
50 |
+
return $storeId;
|
51 |
+
}
|
52 |
+
|
53 |
/**
|
54 |
* @param Mana_Filters_Model_Filter_Attribute $filter
|
55 |
* @param Mana_Filters_Model_Item[] $items
|
56 |
*/
|
57 |
public function registerItems($filter, $items) {
|
58 |
if ($this->isEnabled()) {
|
59 |
+
$storeId = $this->_prepareArraysForCurrentStore();
|
60 |
+
|
61 |
+
$this->_attributeItems[$storeId][$filter->getAttributeModel()->getId()] = $items;
|
62 |
+
$this->_allItems[$storeId] += $items;
|
63 |
}
|
64 |
}
|
65 |
|
103 |
* @return array|bool
|
104 |
*/
|
105 |
public function getAttributeItems($attributeId) {
|
106 |
+
$storeId = $this->_prepareArraysForCurrentStore();
|
107 |
+
|
108 |
+
return isset($this->_attributeItems[$storeId][$attributeId]) ? $this->_attributeItems[$storeId][$attributeId] : false;
|
109 |
}
|
110 |
|
111 |
/**
|
113 |
* @return Mana_Filters_Model_Item|bool
|
114 |
*/
|
115 |
public function get($optionId) {
|
116 |
+
$storeId = $this->_prepareArraysForCurrentStore();
|
117 |
+
|
118 |
+
return isset($this->_allItems[$storeId][$optionId]) ? $this->_allItems[$storeId][$optionId] : false;
|
119 |
}
|
120 |
|
121 |
#region Dependencies
|
app/code/local/Mana/Filters/Model/Filter/Attribute.php
CHANGED
@@ -119,8 +119,8 @@ class Mana_Filters_Model_Filter_Attribute
|
|
119 |
$tags = $this->getLayer()->getStateTags($tags);
|
120 |
|
121 |
$sortMethod = $this->getFilterOptions()->getSortMethod() ? $this->getFilterOptions()->getSortMethod() : 'byPosition';
|
122 |
-
foreach (array_keys($data) as $position => $
|
123 |
-
$data[$
|
124 |
}
|
125 |
if ($this->_addSpecialOptionsToAllOptions()) {
|
126 |
$data = array_merge($data, Mage::helper('mana_filters')->getSpecialOptionData($this->getFilterOptions()->getCode()));
|
119 |
$tags = $this->getLayer()->getStateTags($tags);
|
120 |
|
121 |
$sortMethod = $this->getFilterOptions()->getSortMethod() ? $this->getFilterOptions()->getSortMethod() : 'byPosition';
|
122 |
+
foreach (array_keys($data) as $position => $itemKey) {
|
123 |
+
$data[$itemKey]['position'] = $position;
|
124 |
}
|
125 |
if ($this->_addSpecialOptionsToAllOptions()) {
|
126 |
$data = array_merge($data, Mage::helper('mana_filters')->getSpecialOptionData($this->getFilterOptions()->getCode()));
|
app/code/local/Mana/Filters/Model/Filter/Category.php
CHANGED
@@ -17,6 +17,7 @@ class Mana_Filters_Model_Filter_Category
|
|
17 |
{
|
18 |
const GET_ALL_CHILDREN_RECURSIVELY = 'recursive';
|
19 |
const GET_ALL_DIRECT_CHILDREN = 'direct';
|
|
|
20 |
#region Category Specific logic
|
21 |
protected $_countedCategories;
|
22 |
|
@@ -67,7 +68,7 @@ class Mana_Filters_Model_Filter_Category
|
|
67 |
'label' => Mage::helper('core')->htmlEscape($category->getName()),
|
68 |
'value' => $category->getId(),
|
69 |
'count' => $category->getProductCount(),
|
70 |
-
'm_selected' => $category->getId() == $this->getCategory()->getId()
|
71 |
);
|
72 |
}
|
73 |
}
|
@@ -338,6 +339,15 @@ class Mana_Filters_Model_Filter_Category
|
|
338 |
return null;
|
339 |
}
|
340 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
341 |
public function getChildrenCollection($category, $mode) {
|
342 |
|
343 |
/* @var $resource Mage_Catalog_Model_Resource_Eav_Mysql4_Category */
|
@@ -351,28 +361,34 @@ class Mana_Filters_Model_Filter_Category
|
|
351 |
case self::GET_ALL_DIRECT_CHILDREN:
|
352 |
$categoryIds = $resource->getChildren($category, false);
|
353 |
break;
|
|
|
|
|
|
|
354 |
}
|
355 |
|
356 |
$collection = $category->getCollection();
|
|
|
357 |
|
358 |
/* @var $_conn Varien_Db_Adapter_Pdo_Mysql */
|
359 |
$_conn = $collection->getConnection();
|
360 |
|
361 |
/* @var $collection Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Collection */
|
362 |
if (Mage::helper('catalog/category_flat')->isEnabled()) {
|
|
|
363 |
$storeId = $category->getStoreId();
|
364 |
$collection->getSelect()
|
365 |
->reset(Zend_Db_Select::COLUMNS)
|
366 |
-
->columns('
|
367 |
->joinLeft(
|
368 |
array('url_rewrite' => $collection->getTable('core/url_rewrite')),
|
369 |
-
'url_rewrite.category_id=
|
370 |
$_conn->quoteInto(
|
371 |
'url_rewrite.product_id IS NULL AND url_rewrite.store_id=? AND url_rewrite.id_path LIKE "category/%"',
|
372 |
$storeId),
|
373 |
array('request_path' => 'url_rewrite.request_path'));
|
374 |
}
|
375 |
else {
|
|
|
376 |
$collection
|
377 |
->addAttributeToSelect('url_key')
|
378 |
->addAttributeToSelect('name')
|
@@ -380,9 +396,48 @@ class Mana_Filters_Model_Filter_Category
|
|
380 |
->addAttributeToSelect('is_anchor')
|
381 |
->joinUrlRewrite();
|
382 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
383 |
$collection
|
384 |
->addAttributeToFilter('is_active', 1)
|
385 |
-
->addIdFilter($categoryIds)
|
386 |
->setOrder('position', 'ASC')
|
387 |
->load();
|
388 |
|
@@ -412,5 +467,18 @@ class Mana_Filters_Model_Filter_Category
|
|
412 |
return Mage::helper('manapro_filterdependent');
|
413 |
}
|
414 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
415 |
#endregion
|
416 |
}
|
17 |
{
|
18 |
const GET_ALL_CHILDREN_RECURSIVELY = 'recursive';
|
19 |
const GET_ALL_DIRECT_CHILDREN = 'direct';
|
20 |
+
const GET_ALL_PARENTS = 'parents';
|
21 |
#region Category Specific logic
|
22 |
protected $_countedCategories;
|
23 |
|
68 |
'label' => Mage::helper('core')->htmlEscape($category->getName()),
|
69 |
'value' => $category->getId(),
|
70 |
'count' => $category->getProductCount(),
|
71 |
+
'm_selected' => $category->getId() == ($this->isApplied() ? $this->getAppliedCategory()->getId() : $this->getCategory()->getId())
|
72 |
);
|
73 |
}
|
74 |
}
|
339 |
return null;
|
340 |
}
|
341 |
|
342 |
+
/**
|
343 |
+
* @param Varien_Db_Select $select
|
344 |
+
*/
|
345 |
+
protected function getMainAlias($select) {
|
346 |
+
$from = $select->getPart(Varien_Db_Select::FROM);
|
347 |
+
$aliases = array_keys($from);
|
348 |
+
return $aliases[0];
|
349 |
+
}
|
350 |
+
|
351 |
public function getChildrenCollection($category, $mode) {
|
352 |
|
353 |
/* @var $resource Mage_Catalog_Model_Resource_Eav_Mysql4_Category */
|
361 |
case self::GET_ALL_DIRECT_CHILDREN:
|
362 |
$categoryIds = $resource->getChildren($category, false);
|
363 |
break;
|
364 |
+
case self::GET_ALL_PARENTS:
|
365 |
+
$categoryIds = array_filter(explode(',', $category->getPathInStore()));
|
366 |
+
break;
|
367 |
}
|
368 |
|
369 |
$collection = $category->getCollection();
|
370 |
+
$alias = $this->getMainAlias($collection->getSelect());
|
371 |
|
372 |
/* @var $_conn Varien_Db_Adapter_Pdo_Mysql */
|
373 |
$_conn = $collection->getConnection();
|
374 |
|
375 |
/* @var $collection Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Collection */
|
376 |
if (Mage::helper('catalog/category_flat')->isEnabled()) {
|
377 |
+
// $alias = 'main_table';
|
378 |
$storeId = $category->getStoreId();
|
379 |
$collection->getSelect()
|
380 |
->reset(Zend_Db_Select::COLUMNS)
|
381 |
+
->columns($alias . '.*')
|
382 |
->joinLeft(
|
383 |
array('url_rewrite' => $collection->getTable('core/url_rewrite')),
|
384 |
+
'url_rewrite.category_id=' . $alias . '.entity_id AND url_rewrite.is_system=1 AND ' .
|
385 |
$_conn->quoteInto(
|
386 |
'url_rewrite.product_id IS NULL AND url_rewrite.store_id=? AND url_rewrite.id_path LIKE "category/%"',
|
387 |
$storeId),
|
388 |
array('request_path' => 'url_rewrite.request_path'));
|
389 |
}
|
390 |
else {
|
391 |
+
// $alias = 'e';
|
392 |
$collection
|
393 |
->addAttributeToSelect('url_key')
|
394 |
->addAttributeToSelect('name')
|
396 |
->addAttributeToSelect('is_anchor')
|
397 |
->joinUrlRewrite();
|
398 |
}
|
399 |
+
|
400 |
+
if ($this->coreHelper()->isManadevPaidLayeredNavigationInstalled()) {
|
401 |
+
if ($this->flatHelper()->isEnabled() && $this->flatHelper()->isRebuilt() &&
|
402 |
+
!$this->dbHelper()->indexRequiresReindexing('catalog_category_flat'))
|
403 |
+
{
|
404 |
+
$collection->addAttributeToFilter('m_show_in_layered_navigation', 1);
|
405 |
+
}
|
406 |
+
else {
|
407 |
+
$res = Mage::getSingleton('core/resource');
|
408 |
+
$showInLayeredNavigationTable = $res->getTableName('catalog_category_entity_int');
|
409 |
+
$db = $collection->getConnection();
|
410 |
+
|
411 |
+
$attributeSelect = $db->select()
|
412 |
+
->from(array('a' => $res->getTableName('eav/attribute')), 'attribute_id')
|
413 |
+
->join(array('t' => $res->getTableName('eav/entity_type')),
|
414 |
+
$db->quoteInto("`t`.`entity_type_id` = `a`.`entity_type_id`
|
415 |
+
AND `t`.`entity_type_code` = ?", 'catalog_category'), null)
|
416 |
+
->where("`a`.`attribute_code` = ?", 'm_show_in_layered_navigation');
|
417 |
+
$attributeId = $db->fetchOne($attributeSelect);
|
418 |
+
|
419 |
+
$storeId = Mage::app()->getStore()->getId();
|
420 |
+
$collection->getSelect()
|
421 |
+
->joinLeft(array('m_siln_g' => $showInLayeredNavigationTable),
|
422 |
+
"`m_siln_g`.`entity_id` = `$alias`.`entity_id`
|
423 |
+
AND `m_siln_g`.`attribute_id` = $attributeId
|
424 |
+
AND `m_siln_g`.`store_id` = 0", null)
|
425 |
+
->joinLeft(array('m_siln_s' => $showInLayeredNavigationTable),
|
426 |
+
"`m_siln_s`.`entity_id` = `$alias`.`entity_id`
|
427 |
+
AND `m_siln_s`.`attribute_id` = $attributeId
|
428 |
+
AND `m_siln_s`.`store_id` = $storeId", null)
|
429 |
+
->where("COALESCE(`m_siln_s`.`value`, `m_siln_g`.`value`) = 1");
|
430 |
+
}
|
431 |
+
}
|
432 |
+
|
433 |
+
if (count($categoryIds)) {
|
434 |
+
$collection->getSelect()->where("`$alias`.`entity_id` IN (" . implode(', ', $categoryIds) . ")");
|
435 |
+
}
|
436 |
+
else {
|
437 |
+
$collection->getSelect()->where("1 <> 1");
|
438 |
+
}
|
439 |
$collection
|
440 |
->addAttributeToFilter('is_active', 1)
|
|
|
441 |
->setOrder('position', 'ASC')
|
442 |
->load();
|
443 |
|
467 |
return Mage::helper('manapro_filterdependent');
|
468 |
}
|
469 |
|
470 |
+
/**
|
471 |
+
* @return Mage_Catalog_Helper_Category_Flat
|
472 |
+
*/
|
473 |
+
public function flatHelper() {
|
474 |
+
return Mage::helper('catalog/category_flat');
|
475 |
+
}
|
476 |
+
|
477 |
+
/**
|
478 |
+
* @return Mana_Core_Helper_Db
|
479 |
+
*/
|
480 |
+
public function dbHelper() {
|
481 |
+
return Mage::helper('mana_core/db');
|
482 |
+
}
|
483 |
#endregion
|
484 |
}
|
app/code/local/Mana/Filters/Model/Filter/Decimal.php
CHANGED
@@ -330,6 +330,10 @@ class Mana_Filters_Model_Filter_Decimal
|
|
330 |
|
331 |
public function getRange()
|
332 |
{
|
|
|
|
|
|
|
|
|
333 |
$range = $this->getData('range');
|
334 |
|
335 |
$value = $this->getMSelectedValues();
|
330 |
|
331 |
public function getRange()
|
332 |
{
|
333 |
+
if ($this->hasData('range')) {
|
334 |
+
return $this->getData('range');
|
335 |
+
}
|
336 |
+
|
337 |
$range = $this->getData('range');
|
338 |
|
339 |
$value = $this->getMSelectedValues();
|
app/code/local/Mana/Filters/Model/Source/Filter.php
CHANGED
@@ -39,6 +39,10 @@ class Mana_Filters_Model_Source_Filter extends Mana_Core_Model_Source_Abstract {
|
|
39 |
$select = $collection->getSelect()
|
40 |
->reset(Varien_Db_Select::COLUMNS)
|
41 |
->columns(array('id', 'name'));
|
|
|
|
|
|
|
|
|
42 |
}
|
43 |
else {
|
44 |
$collection = $this->getStoreLevelFilterCollection()
|
@@ -49,9 +53,10 @@ class Mana_Filters_Model_Source_Filter extends Mana_Core_Model_Source_Abstract {
|
|
49 |
Mage::helper('mana_db')->joinLeft($select,
|
50 |
'global', Mage::getSingleton('core/resource')->getTableName('mana_filters/filter2'),
|
51 |
'main_table.global_id = global.id');
|
52 |
-
|
53 |
-
|
54 |
-
|
|
|
55 |
}
|
56 |
|
57 |
if (count($this->_excluded)) {
|
39 |
$select = $collection->getSelect()
|
40 |
->reset(Varien_Db_Select::COLUMNS)
|
41 |
->columns(array('id', 'name'));
|
42 |
+
|
43 |
+
if ($this->_currentFilterId) {
|
44 |
+
$collection->addFieldToFilter('id', array('neq' => $this->_currentFilterId));
|
45 |
+
}
|
46 |
}
|
47 |
else {
|
48 |
$collection = $this->getStoreLevelFilterCollection()
|
53 |
Mage::helper('mana_db')->joinLeft($select,
|
54 |
'global', Mage::getSingleton('core/resource')->getTableName('mana_filters/filter2'),
|
55 |
'main_table.global_id = global.id');
|
56 |
+
|
57 |
+
if ($this->_currentFilterId) {
|
58 |
+
$collection->addFieldToFilter('global_id', array('neq' => $this->_currentFilterId));
|
59 |
+
}
|
60 |
}
|
61 |
|
62 |
if (count($this->_excluded)) {
|
app/code/local/Mana/Filters/Resource/Filter/Price.php
CHANGED
@@ -26,6 +26,7 @@ class Mana_Filters_Resource_Filter_Price extends Mage_Catalog_Model_Resource_Eav
|
|
26 |
$collection->addPriceData($filter->getCustomerGroupId(), $filter->getWebsiteId());
|
27 |
|
28 |
$select = clone $collection->getSelect();
|
|
|
29 |
|
30 |
// reset columns, order and limitation conditions
|
31 |
$select->reset(Zend_Db_Select::COLUMNS);
|
@@ -43,6 +44,7 @@ class Mana_Filters_Resource_Filter_Price extends Mage_Catalog_Model_Resource_Eav
|
|
43 |
}
|
44 |
|
45 |
// processing FROM part
|
|
|
46 |
$priceIndexJoinPart = $fromPart[Mage_Catalog_Model_Resource_Product_Collection::INDEX_TABLE_ALIAS];
|
47 |
$priceIndexJoinConditions = explode('AND', $priceIndexJoinPart['joinCondition']);
|
48 |
$priceIndexJoinPart['joinType'] = Zend_Db_Select::FROM;
|
@@ -57,6 +59,9 @@ class Mana_Filters_Resource_Filter_Price extends Mage_Catalog_Model_Resource_Eav
|
|
57 |
|
58 |
// processing WHERE part
|
59 |
$wherePart = $select->getPart(Zend_Db_Select::WHERE);
|
|
|
|
|
|
|
60 |
foreach ($wherePart as $key => $wherePartItem) {
|
61 |
$wherePart[$key] = $this->_replaceTableAlias($wherePartItem);
|
62 |
}
|
@@ -219,7 +224,7 @@ class Mana_Filters_Resource_Filter_Price extends Mage_Catalog_Model_Resource_Eav
|
|
219 |
|
220 |
//Mage::helper('mana_filters')->resetProductCollectionWhereClause($select);
|
221 |
$select->columns(array($maxPriceExpr))->order('m_max_price DESC');
|
222 |
-
|
223 |
$result = $connection->fetchOne($select) * $filter->getCurrencyRate();
|
224 |
// Mage::log('MAX select: ' . ((string)$select), Zend_Log::DEBUG, 'price.log');
|
225 |
// Mage::log("MAX result: $result", Zend_Log::DEBUG, 'price.log');
|
@@ -302,4 +307,63 @@ class Mana_Filters_Resource_Filter_Price extends Mage_Catalog_Model_Resource_Eav
|
|
302 |
return $result;
|
303 |
}
|
304 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
}
|
26 |
$collection->addPriceData($filter->getCustomerGroupId(), $filter->getWebsiteId());
|
27 |
|
28 |
$select = clone $collection->getSelect();
|
29 |
+
//$sql = $select->__toString();
|
30 |
|
31 |
// reset columns, order and limitation conditions
|
32 |
$select->reset(Zend_Db_Select::COLUMNS);
|
44 |
}
|
45 |
|
46 |
// processing FROM part
|
47 |
+
$oldMainFromClause = $fromPart[Mage_Catalog_Model_Resource_Product_Collection::MAIN_TABLE_ALIAS];
|
48 |
$priceIndexJoinPart = $fromPart[Mage_Catalog_Model_Resource_Product_Collection::INDEX_TABLE_ALIAS];
|
49 |
$priceIndexJoinConditions = explode('AND', $priceIndexJoinPart['joinCondition']);
|
50 |
$priceIndexJoinPart['joinType'] = Zend_Db_Select::FROM;
|
59 |
|
60 |
// processing WHERE part
|
61 |
$wherePart = $select->getPart(Zend_Db_Select::WHERE);
|
62 |
+
foreach ($wherePart as $key => $wherePartItem) {
|
63 |
+
$wherePart[$key] = $this->_replaceProductTableAlias($select, $wherePartItem, $oldMainFromClause);
|
64 |
+
}
|
65 |
foreach ($wherePart as $key => $wherePartItem) {
|
66 |
$wherePart[$key] = $this->_replaceTableAlias($wherePartItem);
|
67 |
}
|
224 |
|
225 |
//Mage::helper('mana_filters')->resetProductCollectionWhereClause($select);
|
226 |
$select->columns(array($maxPriceExpr))->order('m_max_price DESC');
|
227 |
+
//$sql = ((string)$select);
|
228 |
$result = $connection->fetchOne($select) * $filter->getCurrencyRate();
|
229 |
// Mage::log('MAX select: ' . ((string)$select), Zend_Log::DEBUG, 'price.log');
|
230 |
// Mage::log("MAX result: $result", Zend_Log::DEBUG, 'price.log');
|
307 |
return $result;
|
308 |
}
|
309 |
|
310 |
+
/**
|
311 |
+
* @param Varien_Db_Select $select
|
312 |
+
* @param $conditionString
|
313 |
+
* @return mixed|null
|
314 |
+
*/
|
315 |
+
protected function _replaceProductTableAlias($select, $conditionString, $oldMainFromClause) {
|
316 |
+
if (is_null($conditionString)) {
|
317 |
+
return null;
|
318 |
+
}
|
319 |
+
$adapter = $this->_getReadAdapter();
|
320 |
+
if (strpos($conditionString, 'e.') === false) {
|
321 |
+
return $conditionString;
|
322 |
+
}
|
323 |
+
|
324 |
+
$fromPart = $select->getPart(Zend_Db_Select::FROM);
|
325 |
+
if (!isset($fromPart['main_table'])) {
|
326 |
+
$select->join(array('main_table' => $oldMainFromClause['tableName']), "`e`.`entity_id` = `main_table`.`entity_id`", null);
|
327 |
+
}
|
328 |
+
$oldAlias = array(
|
329 |
+
'e' . '.',
|
330 |
+
$adapter->quoteIdentifier('e') . '.',
|
331 |
+
);
|
332 |
+
$newAlias = array(
|
333 |
+
'main_table' . '.',
|
334 |
+
$adapter->quoteIdentifier('main_table') . '.',
|
335 |
+
);
|
336 |
+
return $this->_replaceAliasExpr($oldAlias, $newAlias, $conditionString);
|
337 |
+
}
|
338 |
+
|
339 |
+
protected function _replaceAliasExpr($old, $new, $expr) {
|
340 |
+
if (is_array($old)) {
|
341 |
+
$result = $expr;
|
342 |
+
foreach (array_keys($old) as $index) {
|
343 |
+
$result = $this->_replaceAliasExpr($old[$index], $new[$index], $result);
|
344 |
+
}
|
345 |
+
return $result;
|
346 |
+
}
|
347 |
+
else {
|
348 |
+
$pattern = '/^(' . preg_quote($old) . ')|[^A-Za-z_0-9](' . preg_quote($old) . ')/';
|
349 |
+
$offset = 0;
|
350 |
+
$result = '';
|
351 |
+
while(preg_match($pattern, $expr, $matches, PREG_OFFSET_CAPTURE, $offset)) {
|
352 |
+
$match = $matches[1][0] ? $matches[1] : $matches[2];
|
353 |
+
$strFound = $match[0];
|
354 |
+
$offsetFound = $match[1];
|
355 |
+
if ($offsetFound > $offset) {
|
356 |
+
$result .= substr($expr, $offset, $offsetFound - $offset);
|
357 |
+
}
|
358 |
+
$result .= $new;
|
359 |
+
$offset = $offsetFound + strlen($strFound);
|
360 |
+
}
|
361 |
+
if (strlen($expr) > $offset) {
|
362 |
+
$result .= substr($expr, $offset);
|
363 |
+
}
|
364 |
+
return $result;
|
365 |
+
|
366 |
+
}
|
367 |
+
}
|
368 |
+
|
369 |
}
|
app/code/local/Mana/Filters/Resource/Filter2.php
CHANGED
@@ -282,10 +282,11 @@ class Mana_Filters_Resource_Filter2 extends Mana_Db_Resource_Object {
|
|
282 |
->joinLeft(array('eav_attribute_additional' => Mage::getSingleton('core/resource')->getTableName('catalog/eav_attribute')),
|
283 |
'eav_attribute.attribute_id = eav_attribute_additional.attribute_id', null)
|
284 |
->joinLeft(array('eav_entity_type' => Mage::getSingleton('core/resource')->getTableName('eav/entity_type')),
|
285 |
-
"eav_entity_type.entity_type_id = eav_attribute.entity_type_id
|
286 |
->distinct()
|
287 |
->where('(eav_attribute.attribute_id IS NULL) OR (eav_attribute_additional.is_filterable = 0)')
|
288 |
-
->where("target.code <> 'category'")
|
|
|
289 |
$target->setSelect('main', $select);
|
290 |
}
|
291 |
/**
|
282 |
->joinLeft(array('eav_attribute_additional' => Mage::getSingleton('core/resource')->getTableName('catalog/eav_attribute')),
|
283 |
'eav_attribute.attribute_id = eav_attribute_additional.attribute_id', null)
|
284 |
->joinLeft(array('eav_entity_type' => Mage::getSingleton('core/resource')->getTableName('eav/entity_type')),
|
285 |
+
"eav_entity_type.entity_type_id = eav_attribute.entity_type_id", null)
|
286 |
->distinct()
|
287 |
->where('(eav_attribute.attribute_id IS NULL) OR (eav_attribute_additional.is_filterable = 0)')
|
288 |
+
->where("target.code <> 'category'")
|
289 |
+
->where("eav_entity_type.entity_type_code = 'catalog_product'");
|
290 |
$target->setSelect('main', $select);
|
291 |
}
|
292 |
/**
|
app/code/local/Mana/Filters/Resource/Filter2/Collection.php
CHANGED
@@ -27,4 +27,16 @@ class Mana_Filters_Resource_Filter2_Collection extends Mana_Db_Resource_Object_C
|
|
27 |
$this->addFieldToFilter('code', array('in' => $codes));
|
28 |
return $this;
|
29 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
}
|
27 |
$this->addFieldToFilter('code', array('in' => $codes));
|
28 |
return $this;
|
29 |
}
|
30 |
+
|
31 |
+
protected function _initSelect()
|
32 |
+
{
|
33 |
+
$this->getSelect()
|
34 |
+
->from(array('main_table' => $this->getMainTable()))
|
35 |
+
->joinLeft(array('ea' => $this->getTable('eav/attribute')), "`ea`.`attribute_code` = `main_table`.`code` AND `ea`.`attribute_code` <> 'category'", null)
|
36 |
+
->joinLeft(array('et' => $this->getTable('eav/entity_type')),
|
37 |
+
"`et`.`entity_type_id` = `ea`.`entity_type_id` AND `et`.`entity_type_code` = 'catalog_product'", null)
|
38 |
+
->joinLeft(array('ca' => $this->getTable('catalog/eav_attribute')), "`ca`.`attribute_id` = `ea`.`attribute_id`", null)
|
39 |
+
->where("`main_table`.`type` = 'category' OR (`et`.`entity_type_id` IS NOT NULL AND `ca`.`is_filterable` <> 0)");
|
40 |
+
return $this;
|
41 |
+
}
|
42 |
}
|
app/code/local/Mana/Filters/Resource/Filter2/Store/Collection.php
CHANGED
@@ -24,6 +24,25 @@ class Mana_Filters_Resource_Filter2_Store_Collection extends Mana_Filters_Resour
|
|
24 |
{
|
25 |
$this->_init(strtolower('Mana_Filters/Filter2_Store'));
|
26 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
/**
|
28 |
* Enter description here ...
|
29 |
* @param Mana_Db_Model_Virtual_Result $result
|
@@ -64,6 +83,11 @@ class Mana_Filters_Resource_Filter2_Store_Collection extends Mana_Filters_Resour
|
|
64 |
return $this;
|
65 |
}
|
66 |
|
|
|
|
|
|
|
|
|
|
|
67 |
#region Dependencies
|
68 |
|
69 |
/**
|
24 |
{
|
25 |
$this->_init(strtolower('Mana_Filters/Filter2_Store'));
|
26 |
}
|
27 |
+
|
28 |
+
protected function _initSelect()
|
29 |
+
{
|
30 |
+
$this->getSelect()->from(array('main_table' => $this->getMainTable()));
|
31 |
+
|
32 |
+
$globalEntityName = Mage::helper('mana_db')->getGlobalEntityName($this->getEntityName());
|
33 |
+
Mage::helper('mana_db')->joinLeft($this->getSelect(),
|
34 |
+
'global', Mage::getSingleton('core/resource')->getTableName($globalEntityName),
|
35 |
+
'main_table.global_id = global.id');
|
36 |
+
|
37 |
+
$this->getSelect()
|
38 |
+
->joinLeft(array('ea' => $this->getTable('eav/attribute')), "`ea`.`attribute_code` = `global`.`code` AND `ea`.`attribute_code` <> 'category'", null)
|
39 |
+
->joinLeft(array('et' => $this->getTable('eav/entity_type')),
|
40 |
+
"`et`.`entity_type_id` = `ea`.`entity_type_id` AND `et`.`entity_type_code` = 'catalog_product'", null)
|
41 |
+
->joinLeft(array('ca' => $this->getTable('catalog/eav_attribute')), "`ca`.`attribute_id` = `ea`.`attribute_id`", null)
|
42 |
+
->where("`global`.`type` = 'category' OR (`et`.`entity_type_id` IS NOT NULL AND `ca`.`is_filterable` <> 0)");
|
43 |
+
return $this;
|
44 |
+
}
|
45 |
+
|
46 |
/**
|
47 |
* Enter description here ...
|
48 |
* @param Mana_Db_Model_Virtual_Result $result
|
83 |
return $this;
|
84 |
}
|
85 |
|
86 |
+
public function addColorsFilter() {
|
87 |
+
$this->getSelect()->where("`main_table`.`display` LIKE ?", 'colors%');
|
88 |
+
return $this;
|
89 |
+
}
|
90 |
+
|
91 |
#region Dependencies
|
92 |
|
93 |
/**
|
app/code/local/Mana/Filters/Resource/Item.php
CHANGED
@@ -33,8 +33,20 @@ class Mana_Filters_Resource_Item extends Mage_Core_Model_Mysql4_Abstract {
|
|
33 |
$db = $this->_getReadAdapter();
|
34 |
$attribute = $filter->getAttributeModel();
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
$selectedOptionIds = $filter->getMSelectedValues();
|
37 |
-
$isSelectedExpr = count($selectedOptionIds) ? "`eav`.`value` IN (" . implode(', ', $selectedOptionIds). ")" : "
|
38 |
|
39 |
$fields = array(
|
40 |
'sort_order' => new Zend_Db_Expr("`o`.`sort_order`"),
|
@@ -45,24 +57,19 @@ class Mana_Filters_Resource_Item extends Mage_Core_Model_Mysql4_Abstract {
|
|
45 |
? "NOT ($isSelectedExpr)"
|
46 |
: $isSelectedExpr),
|
47 |
);
|
48 |
-
$select
|
49 |
-
->
|
50 |
-
"`eav`.`entity_id` = `e`.`entity_id` AND
|
51 |
-
{$db->quoteInto("`eav`.`attribute_id` = ?", $attribute->getAttributeId())} AND
|
52 |
-
{$db->quoteInto("`eav`.`store_id` = ?", $filter->getStoreId())}",
|
53 |
-
array('count' => "COUNT(DISTINCT `eav`.`entity_id`)")
|
54 |
-
)
|
55 |
->joinInner(array('o' => $this->getTable('eav/attribute_option')),
|
56 |
"`o`.`option_id` = `eav`.`value`", null)
|
57 |
->joinInner(array('vg' => $this->getTable('eav/attribute_option_value')),
|
58 |
$db->quoteInto("`vg`.`option_id` = `eav`.`value` AND `vg`.`store_id` = ?", 0), null)
|
59 |
->joinLeft(array('vs' => $this->getTable('eav/attribute_option_value')),
|
60 |
$db->quoteInto("`vs`.`option_id` = `eav`.`value` AND `vs`.`store_id` = ?", $filter->getStoreId()), null)
|
61 |
-
->columns($fields)
|
62 |
-
->group($fields);
|
63 |
|
64 |
-
|
65 |
-
|
|
|
66 |
|
67 |
}
|
68 |
|
33 |
$db = $this->_getReadAdapter();
|
34 |
$attribute = $filter->getAttributeModel();
|
35 |
|
36 |
+
$select
|
37 |
+
->joinInner(array('eav' => $this->getTable('catalog/product_index_eav')),
|
38 |
+
"`eav`.`entity_id` = `e`.`entity_id` AND
|
39 |
+
{$db->quoteInto("`eav`.`attribute_id` = ?", $attribute->getAttributeId())} AND
|
40 |
+
{$db->quoteInto("`eav`.`store_id` = ?", $filter->getStoreId())}",
|
41 |
+
array(
|
42 |
+
'count' => new Zend_Db_Expr("COUNT(DISTINCT `eav`.`entity_id`)"),
|
43 |
+
'value' => new Zend_Db_Expr("`eav`.`value`")
|
44 |
+
)
|
45 |
+
)
|
46 |
+
->group(new Zend_Db_Expr("`eav`.`value`"));
|
47 |
+
|
48 |
$selectedOptionIds = $filter->getMSelectedValues();
|
49 |
+
$isSelectedExpr = count($selectedOptionIds) ? "`eav`.`value` IN (" . implode(', ', $selectedOptionIds). ")" : "1 <> 1";
|
50 |
|
51 |
$fields = array(
|
52 |
'sort_order' => new Zend_Db_Expr("`o`.`sort_order`"),
|
57 |
? "NOT ($isSelectedExpr)"
|
58 |
: $isSelectedExpr),
|
59 |
);
|
60 |
+
$itemSelect = $db->select()
|
61 |
+
->from(array('eav' => $select), array('count' => new Zend_Db_Expr("`eav`.`count`")))
|
|
|
|
|
|
|
|
|
|
|
62 |
->joinInner(array('o' => $this->getTable('eav/attribute_option')),
|
63 |
"`o`.`option_id` = `eav`.`value`", null)
|
64 |
->joinInner(array('vg' => $this->getTable('eav/attribute_option_value')),
|
65 |
$db->quoteInto("`vg`.`option_id` = `eav`.`value` AND `vg`.`store_id` = ?", 0), null)
|
66 |
->joinLeft(array('vs' => $this->getTable('eav/attribute_option_value')),
|
67 |
$db->quoteInto("`vs`.`option_id` = `eav`.`value` AND `vs`.`store_id` = ?", $filter->getStoreId()), null)
|
68 |
+
->columns($fields);
|
|
|
69 |
|
70 |
+
$sql = $select->__toString();
|
71 |
+
$sql = $itemSelect->__toString();
|
72 |
+
return $itemSelect;
|
73 |
|
74 |
}
|
75 |
|
app/code/local/Mana/Filters/etc/config.xml
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
<Mana_Filters>
|
13 |
<!-- This version number identifies version of database tables specific to this extension. It is written to
|
14 |
core_resource table. -->
|
15 |
-
<version>
|
16 |
</Mana_Filters>
|
17 |
</modules>
|
18 |
|
12 |
<Mana_Filters>
|
13 |
<!-- This version number identifies version of database tables specific to this extension. It is written to
|
14 |
core_resource table. -->
|
15 |
+
<version>15.10.16.16</version>
|
16 |
</Mana_Filters>
|
17 |
</modules>
|
18 |
|
app/design/adminhtml/default/default/layout/mana_core.xml
CHANGED
@@ -66,4 +66,10 @@ examples on what kind of actions can be applied to referenced blocks.
|
|
66 |
<action method="addJs" ifconfig="mana_dev/debug/jquery_min"><script>jquery/jquery-ui.min.js</script></action>
|
67 |
</reference>
|
68 |
</jquery_ui>
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
</layout>
|
66 |
<action method="addJs" ifconfig="mana_dev/debug/jquery_min"><script>jquery/jquery-ui.min.js</script></action>
|
67 |
</reference>
|
68 |
</jquery_ui>
|
69 |
+
<jstree>
|
70 |
+
<reference name="head">
|
71 |
+
<action method="addCss"><stylesheet>lib/jstree/style.css</stylesheet></action>
|
72 |
+
<action method="addItem"><type>skin_js</type><name>lib/jstree/jstree.js</name><params/></action>
|
73 |
+
</reference>
|
74 |
+
</jstree>
|
75 |
</layout>
|
app/design/frontend/base/default/layout/mana_core.xml
CHANGED
@@ -67,4 +67,10 @@ examples on what kind of actions can be applied to referenced blocks.
|
|
67 |
<action method="addJs"><script>jquery/validate/jquery.validate.js</script></action>
|
68 |
</reference>
|
69 |
</jquery_ui>
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
</layout>
|
67 |
<action method="addJs"><script>jquery/validate/jquery.validate.js</script></action>
|
68 |
</reference>
|
69 |
</jquery_ui>
|
70 |
+
<jquery_lighter>
|
71 |
+
<reference name="head">
|
72 |
+
<action method="addCss"><stylesheet>lib/jquery-lighter/jquery.lighter.css</stylesheet></action>
|
73 |
+
<action method="addItem"><type>skin_js</type><name>lib/jquery-lighter/jquery.lighter.js</name><params/></action>
|
74 |
+
</reference>
|
75 |
+
</jquery_lighter>
|
76 |
</layout>
|
app/etc/modules/Mana_Core.xml
CHANGED
@@ -15,13 +15,12 @@
|
|
15 |
<active>true</active>
|
16 |
<!-- This instructs Magento to search for module code in app/code/local directory. -->
|
17 |
<codePool>local</codePool>
|
18 |
-
|
19 |
-
<Enterprise_PageCache>
|
20 |
-
<depends>
|
21 |
-
<Mana_Core />
|
22 |
-
</depends>
|
23 |
-
</Enterprise_PageCache>
|
24 |
<!-- INSERT HERE: depends -->
|
25 |
</Mana_Core>
|
|
|
|
|
|
|
|
|
|
|
26 |
</modules>
|
27 |
</config>
|
15 |
<active>true</active>
|
16 |
<!-- This instructs Magento to search for module code in app/code/local directory. -->
|
17 |
<codePool>local</codePool>
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
<!-- INSERT HERE: depends -->
|
19 |
</Mana_Core>
|
20 |
+
<Enterprise_PageCache>
|
21 |
+
<depends>
|
22 |
+
<Mana_Core/>
|
23 |
+
</depends>
|
24 |
+
</Enterprise_PageCache>
|
25 |
</modules>
|
26 |
</config>
|
js/jquery/froogaloop.js
CHANGED
@@ -1,290 +1,290 @@
|
|
1 |
-
; // for better merging
|
2 |
-
|
3 |
-
// Init style shamelessly stolen from jQuery http://jquery.com
|
4 |
-
var Froogaloop = (function(){
|
5 |
-
// Define a local copy of Froogaloop
|
6 |
-
function Froogaloop(iframe) {
|
7 |
-
// The Froogaloop object is actually just the init constructor
|
8 |
-
return new Froogaloop.fn.init(iframe);
|
9 |
-
}
|
10 |
-
|
11 |
-
var eventCallbacks = {},
|
12 |
-
hasWindowEvent = false,
|
13 |
-
isReady = false,
|
14 |
-
slice = Array.prototype.slice,
|
15 |
-
playerDomain = '';
|
16 |
-
|
17 |
-
Froogaloop.fn = Froogaloop.prototype = {
|
18 |
-
element: null,
|
19 |
-
|
20 |
-
init: function(iframe) {
|
21 |
-
if (typeof iframe === "string") {
|
22 |
-
iframe = document.getElementById(iframe);
|
23 |
-
}
|
24 |
-
|
25 |
-
this.element = iframe;
|
26 |
-
|
27 |
-
// Register message event listeners
|
28 |
-
playerDomain = getDomainFromUrl(this.element.getAttribute('src'));
|
29 |
-
|
30 |
-
return this;
|
31 |
-
},
|
32 |
-
|
33 |
-
/*
|
34 |
-
* Calls a function to act upon the player.
|
35 |
-
*
|
36 |
-
* @param {string} method The name of the Javascript API method to call. Eg: 'play'.
|
37 |
-
* @param {Array|Function} valueOrCallback params Array of parameters to pass when calling an API method
|
38 |
-
* or callback function when the method returns a value.
|
39 |
-
*/
|
40 |
-
api: function(method, valueOrCallback) {
|
41 |
-
if (!this.element || !method) {
|
42 |
-
return false;
|
43 |
-
}
|
44 |
-
|
45 |
-
var self = this,
|
46 |
-
element = self.element,
|
47 |
-
target_id = element.id !== '' ? element.id : null,
|
48 |
-
params = !isFunction(valueOrCallback) ? valueOrCallback : null,
|
49 |
-
callback = isFunction(valueOrCallback) ? valueOrCallback : null;
|
50 |
-
|
51 |
-
// Store the callback for get functions
|
52 |
-
if (callback) {
|
53 |
-
storeCallback(method, callback, target_id);
|
54 |
-
}
|
55 |
-
|
56 |
-
postMessage(method, params, element);
|
57 |
-
return self;
|
58 |
-
},
|
59 |
-
|
60 |
-
/*
|
61 |
-
* Registers an event listener and a callback function that gets called when the event fires.
|
62 |
-
*
|
63 |
-
* @param eventName (String): Name of the event to listen for.
|
64 |
-
* @param callback (Function): Function that should be called when the event fires.
|
65 |
-
*/
|
66 |
-
addEvent: function(eventName, callback) {
|
67 |
-
if (!this.element) {
|
68 |
-
return false;
|
69 |
-
}
|
70 |
-
|
71 |
-
var self = this,
|
72 |
-
element = self.element,
|
73 |
-
target_id = element.id !== '' ? element.id : null;
|
74 |
-
|
75 |
-
|
76 |
-
storeCallback(eventName, callback, target_id);
|
77 |
-
|
78 |
-
// The ready event is not registered via postMessage. It fires regardless.
|
79 |
-
if (eventName != 'ready') {
|
80 |
-
postMessage('addEventListener', eventName, element);
|
81 |
-
}
|
82 |
-
else if (eventName == 'ready' && isReady) {
|
83 |
-
callback.call(null, target_id);
|
84 |
-
}
|
85 |
-
|
86 |
-
return self;
|
87 |
-
},
|
88 |
-
|
89 |
-
/*
|
90 |
-
* Unregisters an event listener that gets called when the event fires.
|
91 |
-
*
|
92 |
-
* @param eventName (String): Name of the event to stop listening for.
|
93 |
-
*/
|
94 |
-
removeEvent: function(eventName) {
|
95 |
-
if (!this.element) {
|
96 |
-
return false;
|
97 |
-
}
|
98 |
-
|
99 |
-
var self = this,
|
100 |
-
element = self.element,
|
101 |
-
target_id = element.id !== '' ? element.id : null,
|
102 |
-
removed = removeCallback(eventName, target_id);
|
103 |
-
|
104 |
-
// The ready event is not registered
|
105 |
-
if (eventName != 'ready' && removed) {
|
106 |
-
postMessage('removeEventListener', eventName, element);
|
107 |
-
}
|
108 |
-
}
|
109 |
-
};
|
110 |
-
|
111 |
-
/**
|
112 |
-
* Handles posting a message to the parent window.
|
113 |
-
*
|
114 |
-
* @param method (String): name of the method to call inside the player. For api calls
|
115 |
-
* this is the name of the api method (api_play or api_pause) while for events this method
|
116 |
-
* is api_addEventListener.
|
117 |
-
* @param params (Object or Array): List of parameters to submit to the method. Can be either
|
118 |
-
* a single param or an array list of parameters.
|
119 |
-
* @param target (HTMLElement): Target iframe to post the message to.
|
120 |
-
*/
|
121 |
-
function postMessage(method, params, target) {
|
122 |
-
if (!target.contentWindow.postMessage) {
|
123 |
-
return false;
|
124 |
-
}
|
125 |
-
|
126 |
-
var url = target.getAttribute('src').split('?')[0],
|
127 |
-
data = JSON.stringify({
|
128 |
-
method: method,
|
129 |
-
value: params
|
130 |
-
});
|
131 |
-
|
132 |
-
if (url.substr(0, 2) === '//') {
|
133 |
-
url = window.location.protocol + url;
|
134 |
-
}
|
135 |
-
|
136 |
-
target.contentWindow.postMessage(data, url);
|
137 |
-
}
|
138 |
-
|
139 |
-
/**
|
140 |
-
* Event that fires whenever the window receives a message from its parent
|
141 |
-
* via window.postMessage.
|
142 |
-
*/
|
143 |
-
function onMessageReceived(event) {
|
144 |
-
var data, method;
|
145 |
-
|
146 |
-
try {
|
147 |
-
data = JSON.parse(event.data);
|
148 |
-
method = data.event || data.method;
|
149 |
-
}
|
150 |
-
catch(e) {
|
151 |
-
//fail silently... like a ninja!
|
152 |
-
}
|
153 |
-
|
154 |
-
if (method == 'ready' && !isReady) {
|
155 |
-
isReady = true;
|
156 |
-
}
|
157 |
-
|
158 |
-
// Handles messages from moogaloop only
|
159 |
-
if (event.origin != playerDomain) {
|
160 |
-
return false;
|
161 |
-
}
|
162 |
-
|
163 |
-
var value = data.value,
|
164 |
-
eventData = data.data,
|
165 |
-
target_id = target_id === '' ? null : data.player_id,
|
166 |
-
|
167 |
-
callback = getCallback(method, target_id),
|
168 |
-
params = [];
|
169 |
-
|
170 |
-
if (!callback) {
|
171 |
-
return false;
|
172 |
-
}
|
173 |
-
|
174 |
-
if (value !== undefined) {
|
175 |
-
params.push(value);
|
176 |
-
}
|
177 |
-
|
178 |
-
if (eventData) {
|
179 |
-
params.push(eventData);
|
180 |
-
}
|
181 |
-
|
182 |
-
if (target_id) {
|
183 |
-
params.push(target_id);
|
184 |
-
}
|
185 |
-
|
186 |
-
return params.length > 0 ? callback.apply(null, params) : callback.call();
|
187 |
-
}
|
188 |
-
|
189 |
-
|
190 |
-
/**
|
191 |
-
* Stores submitted callbacks for each iframe being tracked and each
|
192 |
-
* event for that iframe.
|
193 |
-
*
|
194 |
-
* @param eventName (String): Name of the event. Eg. api_onPlay
|
195 |
-
* @param callback (Function): Function that should get executed when the
|
196 |
-
* event is fired.
|
197 |
-
* @param target_id (String) [Optional]: If handling more than one iframe then
|
198 |
-
* it stores the different callbacks for different iframes based on the iframe's
|
199 |
-
* id.
|
200 |
-
*/
|
201 |
-
function storeCallback(eventName, callback, target_id) {
|
202 |
-
if (target_id) {
|
203 |
-
if (!eventCallbacks[target_id]) {
|
204 |
-
eventCallbacks[target_id] = {};
|
205 |
-
}
|
206 |
-
eventCallbacks[target_id][eventName] = callback;
|
207 |
-
}
|
208 |
-
else {
|
209 |
-
eventCallbacks[eventName] = callback;
|
210 |
-
}
|
211 |
-
}
|
212 |
-
|
213 |
-
/**
|
214 |
-
* Retrieves stored callbacks.
|
215 |
-
*/
|
216 |
-
function getCallback(eventName, target_id) {
|
217 |
-
if (target_id) {
|
218 |
-
return eventCallbacks[target_id][eventName];
|
219 |
-
}
|
220 |
-
else {
|
221 |
-
return eventCallbacks[eventName];
|
222 |
-
}
|
223 |
-
}
|
224 |
-
|
225 |
-
function removeCallback(eventName, target_id) {
|
226 |
-
if (target_id && eventCallbacks[target_id]) {
|
227 |
-
if (!eventCallbacks[target_id][eventName]) {
|
228 |
-
return false;
|
229 |
-
}
|
230 |
-
eventCallbacks[target_id][eventName] = null;
|
231 |
-
}
|
232 |
-
else {
|
233 |
-
if (!eventCallbacks[eventName]) {
|
234 |
-
return false;
|
235 |
-
}
|
236 |
-
eventCallbacks[eventName] = null;
|
237 |
-
}
|
238 |
-
|
239 |
-
return true;
|
240 |
-
}
|
241 |
-
|
242 |
-
/**
|
243 |
-
* Returns a domain's root domain.
|
244 |
-
* Eg. returns http://vimeo.com when http://vimeo.com/channels is sbumitted
|
245 |
-
*
|
246 |
-
* @param url (String): Url to test against.
|
247 |
-
* @return url (String): Root domain of submitted url
|
248 |
-
*/
|
249 |
-
function getDomainFromUrl(url) {
|
250 |
-
if (url.substr(0, 2) === '//') {
|
251 |
-
url = window.location.protocol + url;
|
252 |
-
}
|
253 |
-
|
254 |
-
var url_pieces = url.split('/'),
|
255 |
-
domain_str = '';
|
256 |
-
|
257 |
-
for(var i = 0, length = url_pieces.length; i < length; i++) {
|
258 |
-
if(i<3) {domain_str += url_pieces[i];}
|
259 |
-
else {break;}
|
260 |
-
if(i<2) {domain_str += '/';}
|
261 |
-
}
|
262 |
-
|
263 |
-
return domain_str;
|
264 |
-
}
|
265 |
-
|
266 |
-
function isFunction(obj) {
|
267 |
-
return !!(obj && obj.constructor && obj.call && obj.apply);
|
268 |
-
}
|
269 |
-
|
270 |
-
function isArray(obj) {
|
271 |
-
return toString.call(obj) === '[object Array]';
|
272 |
-
}
|
273 |
-
|
274 |
-
// Give the init function the Froogaloop prototype for later instantiation
|
275 |
-
Froogaloop.fn.init.prototype = Froogaloop.fn;
|
276 |
-
|
277 |
-
// Listens for the message event.
|
278 |
-
// W3C
|
279 |
-
if (window.addEventListener) {
|
280 |
-
window.addEventListener('message', onMessageReceived, false);
|
281 |
-
}
|
282 |
-
// IE
|
283 |
-
else {
|
284 |
-
window.attachEvent('onmessage', onMessageReceived);
|
285 |
-
}
|
286 |
-
|
287 |
-
// Expose froogaloop to the global object
|
288 |
-
return (window.Froogaloop = window.$f = Froogaloop);
|
289 |
-
|
290 |
})();
|
1 |
+
; // for better merging
|
2 |
+
|
3 |
+
// Init style shamelessly stolen from jQuery http://jquery.com
|
4 |
+
var Froogaloop = (function(){
|
5 |
+
// Define a local copy of Froogaloop
|
6 |
+
function Froogaloop(iframe) {
|
7 |
+
// The Froogaloop object is actually just the init constructor
|
8 |
+
return new Froogaloop.fn.init(iframe);
|
9 |
+
}
|
10 |
+
|
11 |
+
var eventCallbacks = {},
|
12 |
+
hasWindowEvent = false,
|
13 |
+
isReady = false,
|
14 |
+
slice = Array.prototype.slice,
|
15 |
+
playerDomain = '';
|
16 |
+
|
17 |
+
Froogaloop.fn = Froogaloop.prototype = {
|
18 |
+
element: null,
|
19 |
+
|
20 |
+
init: function(iframe) {
|
21 |
+
if (typeof iframe === "string") {
|
22 |
+
iframe = document.getElementById(iframe);
|
23 |
+
}
|
24 |
+
|
25 |
+
this.element = iframe;
|
26 |
+
|
27 |
+
// Register message event listeners
|
28 |
+
playerDomain = getDomainFromUrl(this.element.getAttribute('src'));
|
29 |
+
|
30 |
+
return this;
|
31 |
+
},
|
32 |
+
|
33 |
+
/*
|
34 |
+
* Calls a function to act upon the player.
|
35 |
+
*
|
36 |
+
* @param {string} method The name of the Javascript API method to call. Eg: 'play'.
|
37 |
+
* @param {Array|Function} valueOrCallback params Array of parameters to pass when calling an API method
|
38 |
+
* or callback function when the method returns a value.
|
39 |
+
*/
|
40 |
+
api: function(method, valueOrCallback) {
|
41 |
+
if (!this.element || !method) {
|
42 |
+
return false;
|
43 |
+
}
|
44 |
+
|
45 |
+
var self = this,
|
46 |
+
element = self.element,
|
47 |
+
target_id = element.id !== '' ? element.id : null,
|
48 |
+
params = !isFunction(valueOrCallback) ? valueOrCallback : null,
|
49 |
+
callback = isFunction(valueOrCallback) ? valueOrCallback : null;
|
50 |
+
|
51 |
+
// Store the callback for get functions
|
52 |
+
if (callback) {
|
53 |
+
storeCallback(method, callback, target_id);
|
54 |
+
}
|
55 |
+
|
56 |
+
postMessage(method, params, element);
|
57 |
+
return self;
|
58 |
+
},
|
59 |
+
|
60 |
+
/*
|
61 |
+
* Registers an event listener and a callback function that gets called when the event fires.
|
62 |
+
*
|
63 |
+
* @param eventName (String): Name of the event to listen for.
|
64 |
+
* @param callback (Function): Function that should be called when the event fires.
|
65 |
+
*/
|
66 |
+
addEvent: function(eventName, callback) {
|
67 |
+
if (!this.element) {
|
68 |
+
return false;
|
69 |
+
}
|
70 |
+
|
71 |
+
var self = this,
|
72 |
+
element = self.element,
|
73 |
+
target_id = element.id !== '' ? element.id : null;
|
74 |
+
|
75 |
+
|
76 |
+
storeCallback(eventName, callback, target_id);
|
77 |
+
|
78 |
+
// The ready event is not registered via postMessage. It fires regardless.
|
79 |
+
if (eventName != 'ready') {
|
80 |
+
postMessage('addEventListener', eventName, element);
|
81 |
+
}
|
82 |
+
else if (eventName == 'ready' && isReady) {
|
83 |
+
callback.call(null, target_id);
|
84 |
+
}
|
85 |
+
|
86 |
+
return self;
|
87 |
+
},
|
88 |
+
|
89 |
+
/*
|
90 |
+
* Unregisters an event listener that gets called when the event fires.
|
91 |
+
*
|
92 |
+
* @param eventName (String): Name of the event to stop listening for.
|
93 |
+
*/
|
94 |
+
removeEvent: function(eventName) {
|
95 |
+
if (!this.element) {
|
96 |
+
return false;
|
97 |
+
}
|
98 |
+
|
99 |
+
var self = this,
|
100 |
+
element = self.element,
|
101 |
+
target_id = element.id !== '' ? element.id : null,
|
102 |
+
removed = removeCallback(eventName, target_id);
|
103 |
+
|
104 |
+
// The ready event is not registered
|
105 |
+
if (eventName != 'ready' && removed) {
|
106 |
+
postMessage('removeEventListener', eventName, element);
|
107 |
+
}
|
108 |
+
}
|
109 |
+
};
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Handles posting a message to the parent window.
|
113 |
+
*
|
114 |
+
* @param method (String): name of the method to call inside the player. For api calls
|
115 |
+
* this is the name of the api method (api_play or api_pause) while for events this method
|
116 |
+
* is api_addEventListener.
|
117 |
+
* @param params (Object or Array): List of parameters to submit to the method. Can be either
|
118 |
+
* a single param or an array list of parameters.
|
119 |
+
* @param target (HTMLElement): Target iframe to post the message to.
|
120 |
+
*/
|
121 |
+
function postMessage(method, params, target) {
|
122 |
+
if (!target.contentWindow.postMessage) {
|
123 |
+
return false;
|
124 |
+
}
|
125 |
+
|
126 |
+
var url = target.getAttribute('src').split('?')[0],
|
127 |
+
data = JSON.stringify({
|
128 |
+
method: method,
|
129 |
+
value: params
|
130 |
+
});
|
131 |
+
|
132 |
+
if (url.substr(0, 2) === '//') {
|
133 |
+
url = window.location.protocol + url;
|
134 |
+
}
|
135 |
+
|
136 |
+
target.contentWindow.postMessage(data, url);
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Event that fires whenever the window receives a message from its parent
|
141 |
+
* via window.postMessage.
|
142 |
+
*/
|
143 |
+
function onMessageReceived(event) {
|
144 |
+
var data, method;
|
145 |
+
|
146 |
+
try {
|
147 |
+
data = JSON.parse(event.data);
|
148 |
+
method = data.event || data.method;
|
149 |
+
}
|
150 |
+
catch(e) {
|
151 |
+
//fail silently... like a ninja!
|
152 |
+
}
|
153 |
+
|
154 |
+
if (method == 'ready' && !isReady) {
|
155 |
+
isReady = true;
|
156 |
+
}
|
157 |
+
|
158 |
+
// Handles messages from moogaloop only
|
159 |
+
if (event.origin != playerDomain) {
|
160 |
+
return false;
|
161 |
+
}
|
162 |
+
|
163 |
+
var value = data.value,
|
164 |
+
eventData = data.data,
|
165 |
+
target_id = target_id === '' ? null : data.player_id,
|
166 |
+
|
167 |
+
callback = getCallback(method, target_id),
|
168 |
+
params = [];
|
169 |
+
|
170 |
+
if (!callback) {
|
171 |
+
return false;
|
172 |
+
}
|
173 |
+
|
174 |
+
if (value !== undefined) {
|
175 |
+
params.push(value);
|
176 |
+
}
|
177 |
+
|
178 |
+
if (eventData) {
|
179 |
+
params.push(eventData);
|
180 |
+
}
|
181 |
+
|
182 |
+
if (target_id) {
|
183 |
+
params.push(target_id);
|
184 |
+
}
|
185 |
+
|
186 |
+
return params.length > 0 ? callback.apply(null, params) : callback.call();
|
187 |
+
}
|
188 |
+
|
189 |
+
|
190 |
+
/**
|
191 |
+
* Stores submitted callbacks for each iframe being tracked and each
|
192 |
+
* event for that iframe.
|
193 |
+
*
|
194 |
+
* @param eventName (String): Name of the event. Eg. api_onPlay
|
195 |
+
* @param callback (Function): Function that should get executed when the
|
196 |
+
* event is fired.
|
197 |
+
* @param target_id (String) [Optional]: If handling more than one iframe then
|
198 |
+
* it stores the different callbacks for different iframes based on the iframe's
|
199 |
+
* id.
|
200 |
+
*/
|
201 |
+
function storeCallback(eventName, callback, target_id) {
|
202 |
+
if (target_id) {
|
203 |
+
if (!eventCallbacks[target_id]) {
|
204 |
+
eventCallbacks[target_id] = {};
|
205 |
+
}
|
206 |
+
eventCallbacks[target_id][eventName] = callback;
|
207 |
+
}
|
208 |
+
else {
|
209 |
+
eventCallbacks[eventName] = callback;
|
210 |
+
}
|
211 |
+
}
|
212 |
+
|
213 |
+
/**
|
214 |
+
* Retrieves stored callbacks.
|
215 |
+
*/
|
216 |
+
function getCallback(eventName, target_id) {
|
217 |
+
if (target_id) {
|
218 |
+
return eventCallbacks[target_id][eventName];
|
219 |
+
}
|
220 |
+
else {
|
221 |
+
return eventCallbacks[eventName];
|
222 |
+
}
|
223 |
+
}
|
224 |
+
|
225 |
+
function removeCallback(eventName, target_id) {
|
226 |
+
if (target_id && eventCallbacks[target_id]) {
|
227 |
+
if (!eventCallbacks[target_id][eventName]) {
|
228 |
+
return false;
|
229 |
+
}
|
230 |
+
eventCallbacks[target_id][eventName] = null;
|
231 |
+
}
|
232 |
+
else {
|
233 |
+
if (!eventCallbacks[eventName]) {
|
234 |
+
return false;
|
235 |
+
}
|
236 |
+
eventCallbacks[eventName] = null;
|
237 |
+
}
|
238 |
+
|
239 |
+
return true;
|
240 |
+
}
|
241 |
+
|
242 |
+
/**
|
243 |
+
* Returns a domain's root domain.
|
244 |
+
* Eg. returns http://vimeo.com when http://vimeo.com/channels is sbumitted
|
245 |
+
*
|
246 |
+
* @param url (String): Url to test against.
|
247 |
+
* @return url (String): Root domain of submitted url
|
248 |
+
*/
|
249 |
+
function getDomainFromUrl(url) {
|
250 |
+
if (url.substr(0, 2) === '//') {
|
251 |
+
url = window.location.protocol + url;
|
252 |
+
}
|
253 |
+
|
254 |
+
var url_pieces = url.split('/'),
|
255 |
+
domain_str = '';
|
256 |
+
|
257 |
+
for(var i = 0, length = url_pieces.length; i < length; i++) {
|
258 |
+
if(i<3) {domain_str += url_pieces[i];}
|
259 |
+
else {break;}
|
260 |
+
if(i<2) {domain_str += '/';}
|
261 |
+
}
|
262 |
+
|
263 |
+
return domain_str;
|
264 |
+
}
|
265 |
+
|
266 |
+
function isFunction(obj) {
|
267 |
+
return !!(obj && obj.constructor && obj.call && obj.apply);
|
268 |
+
}
|
269 |
+
|
270 |
+
function isArray(obj) {
|
271 |
+
return toString.call(obj) === '[object Array]';
|
272 |
+
}
|
273 |
+
|
274 |
+
// Give the init function the Froogaloop prototype for later instantiation
|
275 |
+
Froogaloop.fn.init.prototype = Froogaloop.fn;
|
276 |
+
|
277 |
+
// Listens for the message event.
|
278 |
+
// W3C
|
279 |
+
if (window.addEventListener) {
|
280 |
+
window.addEventListener('message', onMessageReceived, false);
|
281 |
+
}
|
282 |
+
// IE
|
283 |
+
else {
|
284 |
+
window.attachEvent('onmessage', onMessageReceived);
|
285 |
+
}
|
286 |
+
|
287 |
+
// Expose froogaloop to the global object
|
288 |
+
return (window.Froogaloop = window.$f = Froogaloop);
|
289 |
+
|
290 |
})();
|
js/jquery/froogaloop.min.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
; // for better merging
|
2 |
-
var Froogaloop=function(){function e(a){return new e.fn.init(a)}function h(a,c,b){if(!b.contentWindow.postMessage)return!1;var f=b.getAttribute("src").split("?")[0],a=JSON.stringify({method:a,value:c});"//"===f.substr(0,2)&&(f=window.location.protocol+f);b.contentWindow.postMessage(a,f)}function j(a){var c,b;try{c=JSON.parse(a.data),b=c.event||c.method}catch(f){}"ready"==b&&!i&&(i=!0);if(a.origin!=k)return!1;var a=c.value,e=c.data,g=""===g?null:c.player_id;c=g?d[g][b]:d[b];b=[];if(!c)return!1;void 0!==
|
3 |
-
a&&b.push(a);e&&b.push(e);g&&b.push(g);return 0<b.length?c.apply(null,b):c.call()}function l(a,c,b){b?(d[b]||(d[b]={}),d[b][a]=c):d[a]=c}var d={},i=!1,k="";e.fn=e.prototype={element:null,init:function(a){"string"===typeof a&&(a=document.getElementById(a));this.element=a;a=this.element.getAttribute("src");"//"===a.substr(0,2)&&(a=window.location.protocol+a);for(var a=a.split("/"),c="",b=0,f=a.length;b<f;b++){if(3>b)c+=a[b];else break;2>b&&(c+="/")}k=c;return this},api:function(a,c){if(!this.element||
|
4 |
-
!a)return!1;var b=this.element,f=""!==b.id?b.id:null,d=!c||!c.constructor||!c.call||!c.apply?c:null,e=c&&c.constructor&&c.call&&c.apply?c:null;e&&l(a,e,f);h(a,d,b);return this},addEvent:function(a,c){if(!this.element)return!1;var b=this.element,d=""!==b.id?b.id:null;l(a,c,d);"ready"!=a?h("addEventListener",a,b):"ready"==a&&i&&c.call(null,d);return this},removeEvent:function(a){if(!this.element)return!1;var c=this.element,b;a:{if((b=""!==c.id?c.id:null)&&d[b]){if(!d[b][a]){b=!1;break a}d[b][a]=null}else{if(!d[a]){b=
|
5 |
!1;break a}d[a]=null}b=!0}"ready"!=a&&b&&h("removeEventListener",a,c)}};e.fn.init.prototype=e.fn;window.addEventListener?window.addEventListener("message",j,!1):window.attachEvent("onmessage",j);return window.Froogaloop=window.$f=e}();
|
1 |
+
; // for better merging
|
2 |
+
var Froogaloop=function(){function e(a){return new e.fn.init(a)}function h(a,c,b){if(!b.contentWindow.postMessage)return!1;var f=b.getAttribute("src").split("?")[0],a=JSON.stringify({method:a,value:c});"//"===f.substr(0,2)&&(f=window.location.protocol+f);b.contentWindow.postMessage(a,f)}function j(a){var c,b;try{c=JSON.parse(a.data),b=c.event||c.method}catch(f){}"ready"==b&&!i&&(i=!0);if(a.origin!=k)return!1;var a=c.value,e=c.data,g=""===g?null:c.player_id;c=g?d[g][b]:d[b];b=[];if(!c)return!1;void 0!==
|
3 |
+
a&&b.push(a);e&&b.push(e);g&&b.push(g);return 0<b.length?c.apply(null,b):c.call()}function l(a,c,b){b?(d[b]||(d[b]={}),d[b][a]=c):d[a]=c}var d={},i=!1,k="";e.fn=e.prototype={element:null,init:function(a){"string"===typeof a&&(a=document.getElementById(a));this.element=a;a=this.element.getAttribute("src");"//"===a.substr(0,2)&&(a=window.location.protocol+a);for(var a=a.split("/"),c="",b=0,f=a.length;b<f;b++){if(3>b)c+=a[b];else break;2>b&&(c+="/")}k=c;return this},api:function(a,c){if(!this.element||
|
4 |
+
!a)return!1;var b=this.element,f=""!==b.id?b.id:null,d=!c||!c.constructor||!c.call||!c.apply?c:null,e=c&&c.constructor&&c.call&&c.apply?c:null;e&&l(a,e,f);h(a,d,b);return this},addEvent:function(a,c){if(!this.element)return!1;var b=this.element,d=""!==b.id?b.id:null;l(a,c,d);"ready"!=a?h("addEventListener",a,b):"ready"==a&&i&&c.call(null,d);return this},removeEvent:function(a){if(!this.element)return!1;var c=this.element,b;a:{if((b=""!==c.id?c.id:null)&&d[b]){if(!d[b][a]){b=!1;break a}d[b][a]=null}else{if(!d[a]){b=
|
5 |
!1;break a}d[a]=null}b=!0}"ready"!=a&&b&&h("removeEventListener",a,c)}};e.fn.init.prototype=e.fn;window.addEventListener?window.addEventListener("message",j,!1):window.attachEvent("onmessage",j);return window.Froogaloop=window.$f=e}();
|
js/jquery/history.js
CHANGED
@@ -7,7 +7,6 @@
|
|
7 |
|
8 |
(function(window, jQuery, Object, undefined){
|
9 |
"use strict";
|
10 |
-
|
11 |
// --------------------------------------------------------------------------
|
12 |
// Initialise
|
13 |
|
7 |
|
8 |
(function(window, jQuery, Object, undefined){
|
9 |
"use strict";
|
|
|
10 |
// --------------------------------------------------------------------------
|
11 |
// Initialise
|
12 |
|
js/jquery/jquery.js
CHANGED
@@ -1,71 +1,81 @@
|
|
1 |
/*!
|
2 |
-
* jQuery JavaScript Library v1.
|
3 |
* http://jquery.com/
|
4 |
*
|
5 |
* Includes Sizzle.js
|
6 |
* http://sizzlejs.com/
|
7 |
*
|
8 |
-
* Copyright
|
9 |
* Released under the MIT license
|
10 |
* http://jquery.org/license
|
11 |
*
|
12 |
-
* Date:
|
13 |
*/
|
14 |
-
(function( window, undefined ) {
|
15 |
-
var
|
16 |
-
// A central reference to the root jQuery(document)
|
17 |
-
rootjQuery,
|
18 |
|
19 |
-
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
location = window.location,
|
25 |
-
navigator = window.navigator,
|
26 |
|
27 |
-
|
28 |
-
|
|
|
|
|
|
|
29 |
|
30 |
-
|
31 |
-
_$ = window.$,
|
32 |
|
33 |
-
|
34 |
-
core_push = Array.prototype.push,
|
35 |
-
core_slice = Array.prototype.slice,
|
36 |
-
core_indexOf = Array.prototype.indexOf,
|
37 |
-
core_toString = Object.prototype.toString,
|
38 |
-
core_hasOwn = Object.prototype.hasOwnProperty,
|
39 |
-
core_trim = String.prototype.trim,
|
40 |
|
41 |
-
|
42 |
-
jQuery = function( selector, context ) {
|
43 |
-
// The jQuery object is actually just the init constructor 'enhanced'
|
44 |
-
return new jQuery.fn.init( selector, context, rootjQuery );
|
45 |
-
},
|
46 |
|
47 |
-
|
48 |
-
core_pnum = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,
|
49 |
|
50 |
-
|
51 |
-
core_rnotwhite = /\S/,
|
52 |
-
core_rspace = /\s+/,
|
53 |
|
54 |
-
|
55 |
-
rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
|
56 |
|
57 |
-
|
58 |
-
// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
|
59 |
-
rquickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
|
60 |
|
61 |
-
|
62 |
-
rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
|
63 |
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
|
70 |
// Matches dashed string for camelizing
|
71 |
rmsPrefix = /^-ms-/,
|
@@ -73,163 +83,48 @@ var
|
|
73 |
|
74 |
// Used by jQuery.camelCase as callback to replace()
|
75 |
fcamelCase = function( all, letter ) {
|
76 |
-
return
|
77 |
-
}
|
78 |
-
|
79 |
-
// The ready event handler and self cleanup method
|
80 |
-
DOMContentLoaded = function() {
|
81 |
-
if ( document.addEventListener ) {
|
82 |
-
document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
|
83 |
-
jQuery.ready();
|
84 |
-
} else if ( document.readyState === "complete" ) {
|
85 |
-
// we're here because readyState === "complete" in oldIE
|
86 |
-
// which is good enough for us to call the dom ready!
|
87 |
-
document.detachEvent( "onreadystatechange", DOMContentLoaded );
|
88 |
-
jQuery.ready();
|
89 |
-
}
|
90 |
-
},
|
91 |
-
|
92 |
-
// [[Class]] -> type pairs
|
93 |
-
class2type = {};
|
94 |
|
95 |
jQuery.fn = jQuery.prototype = {
|
96 |
-
|
97 |
-
|
98 |
-
var match, elem, ret, doc;
|
99 |
-
|
100 |
-
// Handle $(""), $(null), $(undefined), $(false)
|
101 |
-
if ( !selector ) {
|
102 |
-
return this;
|
103 |
-
}
|
104 |
-
|
105 |
-
// Handle $(DOMElement)
|
106 |
-
if ( selector.nodeType ) {
|
107 |
-
this.context = this[0] = selector;
|
108 |
-
this.length = 1;
|
109 |
-
return this;
|
110 |
-
}
|
111 |
-
|
112 |
-
// Handle HTML strings
|
113 |
-
if ( typeof selector === "string" ) {
|
114 |
-
if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
|
115 |
-
// Assume that strings that start and end with <> are HTML and skip the regex check
|
116 |
-
match = [ null, selector, null ];
|
117 |
-
|
118 |
-
} else {
|
119 |
-
match = rquickExpr.exec( selector );
|
120 |
-
}
|
121 |
-
|
122 |
-
// Match html or make sure no context is specified for #id
|
123 |
-
if ( match && (match[1] || !context) ) {
|
124 |
-
|
125 |
-
// HANDLE: $(html) -> $(array)
|
126 |
-
if ( match[1] ) {
|
127 |
-
context = context instanceof jQuery ? context[0] : context;
|
128 |
-
doc = ( context && context.nodeType ? context.ownerDocument || context : document );
|
129 |
-
|
130 |
-
// scripts is true for back-compat
|
131 |
-
selector = jQuery.parseHTML( match[1], doc, true );
|
132 |
-
if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
|
133 |
-
this.attr.call( selector, context, true );
|
134 |
-
}
|
135 |
-
|
136 |
-
return jQuery.merge( this, selector );
|
137 |
-
|
138 |
-
// HANDLE: $(#id)
|
139 |
-
} else {
|
140 |
-
elem = document.getElementById( match[2] );
|
141 |
-
|
142 |
-
// Check parentNode to catch when Blackberry 4.6 returns
|
143 |
-
// nodes that are no longer in the document #6963
|
144 |
-
if ( elem && elem.parentNode ) {
|
145 |
-
// Handle the case where IE and Opera return items
|
146 |
-
// by name instead of ID
|
147 |
-
if ( elem.id !== match[2] ) {
|
148 |
-
return rootjQuery.find( selector );
|
149 |
-
}
|
150 |
-
|
151 |
-
// Otherwise, we inject the element directly into the jQuery object
|
152 |
-
this.length = 1;
|
153 |
-
this[0] = elem;
|
154 |
-
}
|
155 |
-
|
156 |
-
this.context = document;
|
157 |
-
this.selector = selector;
|
158 |
-
return this;
|
159 |
-
}
|
160 |
-
|
161 |
-
// HANDLE: $(expr, $(...))
|
162 |
-
} else if ( !context || context.jquery ) {
|
163 |
-
return ( context || rootjQuery ).find( selector );
|
164 |
-
|
165 |
-
// HANDLE: $(expr, context)
|
166 |
-
// (which is just equivalent to: $(context).find(expr)
|
167 |
-
} else {
|
168 |
-
return this.constructor( context ).find( selector );
|
169 |
-
}
|
170 |
-
|
171 |
-
// HANDLE: $(function)
|
172 |
-
// Shortcut for document ready
|
173 |
-
} else if ( jQuery.isFunction( selector ) ) {
|
174 |
-
return rootjQuery.ready( selector );
|
175 |
-
}
|
176 |
-
|
177 |
-
if ( selector.selector !== undefined ) {
|
178 |
-
this.selector = selector.selector;
|
179 |
-
this.context = selector.context;
|
180 |
-
}
|
181 |
|
182 |
-
|
183 |
-
},
|
184 |
|
185 |
// Start with an empty selector
|
186 |
selector: "",
|
187 |
|
188 |
-
// The current version of jQuery being used
|
189 |
-
jquery: "1.8.3",
|
190 |
-
|
191 |
// The default length of a jQuery object is 0
|
192 |
length: 0,
|
193 |
|
194 |
-
// The number of elements contained in the matched element set
|
195 |
-
size: function() {
|
196 |
-
return this.length;
|
197 |
-
},
|
198 |
-
|
199 |
toArray: function() {
|
200 |
-
return
|
201 |
},
|
202 |
|
203 |
// Get the Nth element in the matched element set OR
|
204 |
// Get the whole matched element set as a clean array
|
205 |
get: function( num ) {
|
206 |
-
return num
|
207 |
|
208 |
-
// Return
|
209 |
-
this.
|
210 |
|
211 |
-
// Return
|
212 |
-
(
|
213 |
},
|
214 |
|
215 |
// Take an array of elements and push it onto the stack
|
216 |
// (returning the new matched element set)
|
217 |
-
pushStack: function( elems
|
218 |
|
219 |
// Build a new jQuery matched element set
|
220 |
var ret = jQuery.merge( this.constructor(), elems );
|
221 |
|
222 |
// Add the old object onto the stack (as a reference)
|
223 |
ret.prevObject = this;
|
224 |
-
|
225 |
ret.context = this.context;
|
226 |
|
227 |
-
if ( name === "find" ) {
|
228 |
-
ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
|
229 |
-
} else if ( name ) {
|
230 |
-
ret.selector = this.selector + "." + name + "(" + selector + ")";
|
231 |
-
}
|
232 |
-
|
233 |
// Return the newly-formed element set
|
234 |
return ret;
|
235 |
},
|
@@ -241,18 +136,14 @@ jQuery.fn = jQuery.prototype = {
|
|
241 |
return jQuery.each( this, callback, args );
|
242 |
},
|
243 |
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
return this;
|
249 |
},
|
250 |
|
251 |
-
|
252 |
-
|
253 |
-
return i === -1 ?
|
254 |
-
this.slice( i ) :
|
255 |
-
this.slice( i, i + 1 );
|
256 |
},
|
257 |
|
258 |
first: function() {
|
@@ -263,15 +154,10 @@ jQuery.fn = jQuery.prototype = {
|
|
263 |
return this.eq( -1 );
|
264 |
},
|
265 |
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
map: function( callback ) {
|
272 |
-
return this.pushStack( jQuery.map(this, function( elem, i ) {
|
273 |
-
return callback.call( elem, i, elem );
|
274 |
-
}));
|
275 |
},
|
276 |
|
277 |
end: function() {
|
@@ -280,16 +166,13 @@ jQuery.fn = jQuery.prototype = {
|
|
280 |
|
281 |
// For internal use only.
|
282 |
// Behaves like an Array's method, not like a jQuery method.
|
283 |
-
push:
|
284 |
-
sort:
|
285 |
-
splice:
|
286 |
};
|
287 |
|
288 |
-
// Give the init function the jQuery prototype for later instantiation
|
289 |
-
jQuery.fn.init.prototype = jQuery.fn;
|
290 |
-
|
291 |
jQuery.extend = jQuery.fn.extend = function() {
|
292 |
-
var
|
293 |
target = arguments[0] || {},
|
294 |
i = 1,
|
295 |
length = arguments.length,
|
@@ -298,9 +181,10 @@ jQuery.extend = jQuery.fn.extend = function() {
|
|
298 |
// Handle a deep copy situation
|
299 |
if ( typeof target === "boolean" ) {
|
300 |
deep = target;
|
301 |
-
|
302 |
// skip the boolean and the target
|
303 |
-
|
|
|
304 |
}
|
305 |
|
306 |
// Handle case when target is a string or something (possible in deep copy)
|
@@ -309,9 +193,9 @@ jQuery.extend = jQuery.fn.extend = function() {
|
|
309 |
}
|
310 |
|
311 |
// extend jQuery itself if only one argument is passed
|
312 |
-
if (
|
313 |
target = this;
|
314 |
-
|
315 |
}
|
316 |
|
317 |
for ( ; i < length; i++ ) {
|
@@ -353,63 +237,17 @@ jQuery.extend = jQuery.fn.extend = function() {
|
|
353 |
};
|
354 |
|
355 |
jQuery.extend({
|
356 |
-
|
357 |
-
|
358 |
-
window.$ = _$;
|
359 |
-
}
|
360 |
-
|
361 |
-
if ( deep && window.jQuery === jQuery ) {
|
362 |
-
window.jQuery = _jQuery;
|
363 |
-
}
|
364 |
-
|
365 |
-
return jQuery;
|
366 |
-
},
|
367 |
-
|
368 |
-
// Is the DOM ready to be used? Set to true once it occurs.
|
369 |
-
isReady: false,
|
370 |
|
371 |
-
//
|
372 |
-
|
373 |
-
readyWait: 1,
|
374 |
|
375 |
-
|
376 |
-
|
377 |
-
if ( hold ) {
|
378 |
-
jQuery.readyWait++;
|
379 |
-
} else {
|
380 |
-
jQuery.ready( true );
|
381 |
-
}
|
382 |
},
|
383 |
|
384 |
-
|
385 |
-
ready: function( wait ) {
|
386 |
-
|
387 |
-
// Abort if there are pending holds or we're already ready
|
388 |
-
if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
|
389 |
-
return;
|
390 |
-
}
|
391 |
-
|
392 |
-
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
|
393 |
-
if ( !document.body ) {
|
394 |
-
return setTimeout( jQuery.ready, 1 );
|
395 |
-
}
|
396 |
-
|
397 |
-
// Remember that the DOM is ready
|
398 |
-
jQuery.isReady = true;
|
399 |
-
|
400 |
-
// If a normal DOM Ready event fired, decrement, and wait if need be
|
401 |
-
if ( wait !== true && --jQuery.readyWait > 0 ) {
|
402 |
-
return;
|
403 |
-
}
|
404 |
-
|
405 |
-
// If there are functions bound, to execute
|
406 |
-
readyList.resolveWith( document, [ jQuery ] );
|
407 |
-
|
408 |
-
// Trigger any bound ready events
|
409 |
-
if ( jQuery.fn.trigger ) {
|
410 |
-
jQuery( document ).trigger("ready").off("ready");
|
411 |
-
}
|
412 |
-
},
|
413 |
|
414 |
// See test/unit/core.js for details concerning isFunction.
|
415 |
// Since version 1.3, DOM methods and functions like alert
|
@@ -423,20 +261,29 @@ jQuery.extend({
|
|
423 |
},
|
424 |
|
425 |
isWindow: function( obj ) {
|
|
|
426 |
return obj != null && obj == obj.window;
|
427 |
},
|
428 |
|
429 |
isNumeric: function( obj ) {
|
430 |
-
|
|
|
|
|
|
|
|
|
431 |
},
|
432 |
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
|
|
|
|
437 |
},
|
438 |
|
439 |
isPlainObject: function( obj ) {
|
|
|
|
|
440 |
// Must be an Object.
|
441 |
// Because of IE, we also have to check the presence of the constructor property.
|
442 |
// Make sure that DOM nodes and window objects don't pass through, as well
|
@@ -447,8 +294,8 @@ jQuery.extend({
|
|
447 |
try {
|
448 |
// Not own constructor property must be Object
|
449 |
if ( obj.constructor &&
|
450 |
-
!
|
451 |
-
!
|
452 |
return false;
|
453 |
}
|
454 |
} catch ( e ) {
|
@@ -456,107 +303,35 @@ jQuery.extend({
|
|
456 |
return false;
|
457 |
}
|
458 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
459 |
// Own properties are enumerated firstly, so to speed up,
|
460 |
// if last one is own, then all properties are own.
|
461 |
-
|
462 |
-
var key;
|
463 |
for ( key in obj ) {}
|
464 |
|
465 |
-
return key === undefined ||
|
466 |
-
},
|
467 |
-
|
468 |
-
isEmptyObject: function( obj ) {
|
469 |
-
var name;
|
470 |
-
for ( name in obj ) {
|
471 |
-
return false;
|
472 |
-
}
|
473 |
-
return true;
|
474 |
-
},
|
475 |
-
|
476 |
-
error: function( msg ) {
|
477 |
-
throw new Error( msg );
|
478 |
-
},
|
479 |
-
|
480 |
-
// data: string of html
|
481 |
-
// context (optional): If specified, the fragment will be created in this context, defaults to document
|
482 |
-
// scripts (optional): If true, will include scripts passed in the html string
|
483 |
-
parseHTML: function( data, context, scripts ) {
|
484 |
-
var parsed;
|
485 |
-
if ( !data || typeof data !== "string" ) {
|
486 |
-
return null;
|
487 |
-
}
|
488 |
-
if ( typeof context === "boolean" ) {
|
489 |
-
scripts = context;
|
490 |
-
context = 0;
|
491 |
-
}
|
492 |
-
context = context || document;
|
493 |
-
|
494 |
-
// Single tag
|
495 |
-
if ( (parsed = rsingleTag.exec( data )) ) {
|
496 |
-
return [ context.createElement( parsed[1] ) ];
|
497 |
-
}
|
498 |
-
|
499 |
-
parsed = jQuery.buildFragment( [ data ], context, scripts ? null : [] );
|
500 |
-
return jQuery.merge( [],
|
501 |
-
(parsed.cacheable ? jQuery.clone( parsed.fragment ) : parsed.fragment).childNodes );
|
502 |
-
},
|
503 |
-
|
504 |
-
parseJSON: function( data ) {
|
505 |
-
if ( !data || typeof data !== "string") {
|
506 |
-
return null;
|
507 |
-
}
|
508 |
-
|
509 |
-
// Make sure leading/trailing whitespace is removed (IE can't handle it)
|
510 |
-
data = jQuery.trim( data );
|
511 |
-
|
512 |
-
// Attempt to parse using the native JSON parser first
|
513 |
-
if ( window.JSON && window.JSON.parse ) {
|
514 |
-
return window.JSON.parse( data );
|
515 |
-
}
|
516 |
-
|
517 |
-
// Make sure the incoming data is actual JSON
|
518 |
-
// Logic borrowed from http://json.org/json2.js
|
519 |
-
if ( rvalidchars.test( data.replace( rvalidescape, "@" )
|
520 |
-
.replace( rvalidtokens, "]" )
|
521 |
-
.replace( rvalidbraces, "")) ) {
|
522 |
-
|
523 |
-
return ( new Function( "return " + data ) )();
|
524 |
-
|
525 |
-
}
|
526 |
-
jQuery.error( "Invalid JSON: " + data );
|
527 |
},
|
528 |
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
if ( !data || typeof data !== "string" ) {
|
533 |
-
return null;
|
534 |
-
}
|
535 |
-
try {
|
536 |
-
if ( window.DOMParser ) { // Standard
|
537 |
-
tmp = new DOMParser();
|
538 |
-
xml = tmp.parseFromString( data , "text/xml" );
|
539 |
-
} else { // IE
|
540 |
-
xml = new ActiveXObject( "Microsoft.XMLDOM" );
|
541 |
-
xml.async = "false";
|
542 |
-
xml.loadXML( data );
|
543 |
-
}
|
544 |
-
} catch( e ) {
|
545 |
-
xml = undefined;
|
546 |
-
}
|
547 |
-
if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
|
548 |
-
jQuery.error( "Invalid XML: " + data );
|
549 |
}
|
550 |
-
return
|
|
|
|
|
551 |
},
|
552 |
|
553 |
-
noop: function() {},
|
554 |
-
|
555 |
// Evaluates a script in a global context
|
556 |
// Workarounds based on findings by Jim Driscoll
|
557 |
// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
|
558 |
globalEval: function( data ) {
|
559 |
-
if ( data &&
|
560 |
// We use execScript on Internet Explorer
|
561 |
// We use an anonymous function so that context is window
|
562 |
// rather than jQuery in Firefox
|
@@ -578,21 +353,25 @@ jQuery.extend({
|
|
578 |
|
579 |
// args is for internal usage only
|
580 |
each: function( obj, callback, args ) {
|
581 |
-
var
|
582 |
i = 0,
|
583 |
length = obj.length,
|
584 |
-
|
585 |
|
586 |
if ( args ) {
|
587 |
-
if (
|
588 |
-
for (
|
589 |
-
|
|
|
|
|
590 |
break;
|
591 |
}
|
592 |
}
|
593 |
} else {
|
594 |
-
for (
|
595 |
-
|
|
|
|
|
596 |
break;
|
597 |
}
|
598 |
}
|
@@ -600,15 +379,19 @@ jQuery.extend({
|
|
600 |
|
601 |
// A special, fast, case for the most common use of each
|
602 |
} else {
|
603 |
-
if (
|
604 |
-
for (
|
605 |
-
|
|
|
|
|
606 |
break;
|
607 |
}
|
608 |
}
|
609 |
} else {
|
610 |
-
for (
|
611 |
-
|
|
|
|
|
612 |
break;
|
613 |
}
|
614 |
}
|
@@ -618,35 +401,25 @@ jQuery.extend({
|
|
618 |
return obj;
|
619 |
},
|
620 |
|
621 |
-
//
|
622 |
-
trim:
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
} :
|
628 |
-
|
629 |
-
// Otherwise use our own trimming functionality
|
630 |
-
function( text ) {
|
631 |
-
return text == null ?
|
632 |
-
"" :
|
633 |
-
( text + "" ).replace( rtrim, "" );
|
634 |
-
},
|
635 |
|
636 |
// results is for internal usage only
|
637 |
makeArray: function( arr, results ) {
|
638 |
-
var
|
639 |
-
ret = results || [];
|
640 |
|
641 |
if ( arr != null ) {
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
core_push.call( ret, arr );
|
648 |
} else {
|
649 |
-
|
650 |
}
|
651 |
}
|
652 |
|
@@ -657,8 +430,8 @@ jQuery.extend({
|
|
657 |
var len;
|
658 |
|
659 |
if ( arr ) {
|
660 |
-
if (
|
661 |
-
return
|
662 |
}
|
663 |
|
664 |
len = arr.length;
|
@@ -676,16 +449,17 @@ jQuery.extend({
|
|
676 |
},
|
677 |
|
678 |
merge: function( first, second ) {
|
679 |
-
var
|
680 |
-
|
681 |
-
|
682 |
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
}
|
687 |
|
688 |
-
|
|
|
|
|
689 |
while ( second[j] !== undefined ) {
|
690 |
first[ i++ ] = second[ j++ ];
|
691 |
}
|
@@ -696,57 +470,56 @@ jQuery.extend({
|
|
696 |
return first;
|
697 |
},
|
698 |
|
699 |
-
grep: function( elems, callback,
|
700 |
-
var
|
701 |
-
|
702 |
i = 0,
|
703 |
-
length = elems.length
|
704 |
-
|
705 |
|
706 |
// Go through the array, only saving the items
|
707 |
// that pass the validator function
|
708 |
for ( ; i < length; i++ ) {
|
709 |
-
|
710 |
-
if (
|
711 |
-
|
712 |
}
|
713 |
}
|
714 |
|
715 |
-
return
|
716 |
},
|
717 |
|
718 |
// arg is for internal usage only
|
719 |
map: function( elems, callback, arg ) {
|
720 |
-
var value,
|
721 |
-
ret = [],
|
722 |
i = 0,
|
723 |
length = elems.length,
|
724 |
-
|
725 |
-
|
726 |
|
727 |
-
// Go through the array, translating each of the items to their
|
728 |
if ( isArray ) {
|
729 |
for ( ; i < length; i++ ) {
|
730 |
value = callback( elems[ i ], i, arg );
|
731 |
|
732 |
if ( value != null ) {
|
733 |
-
ret
|
734 |
}
|
735 |
}
|
736 |
|
737 |
// Go through every key on the object,
|
738 |
} else {
|
739 |
-
for (
|
740 |
-
value = callback( elems[
|
741 |
|
742 |
if ( value != null ) {
|
743 |
-
ret
|
744 |
}
|
745 |
}
|
746 |
}
|
747 |
|
748 |
// Flatten any nested arrays
|
749 |
-
return
|
750 |
},
|
751 |
|
752 |
// A global GUID counter for objects
|
@@ -755,7 +528,7 @@ jQuery.extend({
|
|
755 |
// Bind a function to a context, optionally partially applying any
|
756 |
// arguments.
|
757 |
proxy: function( fn, context ) {
|
758 |
-
var
|
759 |
|
760 |
if ( typeof context === "string" ) {
|
761 |
tmp = fn[ context ];
|
@@ -770,9 +543,9 @@ jQuery.extend({
|
|
770 |
}
|
771 |
|
772 |
// Simulated bind
|
773 |
-
args =
|
774 |
proxy = function() {
|
775 |
-
return fn.apply( context, args.concat(
|
776 |
};
|
777 |
|
778 |
// Set the guid of unique handler to the same of original handler, so it can be removed
|
@@ -781,214 +554,2610 @@ jQuery.extend({
|
|
781 |
return proxy;
|
782 |
},
|
783 |
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
var exec,
|
788 |
-
bulk = key == null,
|
789 |
-
i = 0,
|
790 |
-
length = elems.length;
|
791 |
-
|
792 |
-
// Sets many values
|
793 |
-
if ( key && typeof key === "object" ) {
|
794 |
-
for ( i in key ) {
|
795 |
-
jQuery.access( elems, fn, i, key[i], 1, emptyGet, value );
|
796 |
-
}
|
797 |
-
chainable = 1;
|
798 |
-
|
799 |
-
// Sets one value
|
800 |
-
} else if ( value !== undefined ) {
|
801 |
-
// Optionally, function values get executed if exec is true
|
802 |
-
exec = pass === undefined && jQuery.isFunction( value );
|
803 |
-
|
804 |
-
if ( bulk ) {
|
805 |
-
// Bulk operations only iterate when executing function values
|
806 |
-
if ( exec ) {
|
807 |
-
exec = fn;
|
808 |
-
fn = function( elem, key, value ) {
|
809 |
-
return exec.call( jQuery( elem ), value );
|
810 |
-
};
|
811 |
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
}
|
817 |
-
}
|
818 |
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
824 |
|
825 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
826 |
}
|
|
|
|
|
827 |
|
828 |
-
|
829 |
-
|
830 |
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
835 |
},
|
836 |
|
837 |
-
|
838 |
-
return ( new Date() ).getTime();
|
839 |
-
}
|
840 |
-
});
|
841 |
|
842 |
-
|
843 |
-
if ( !readyList ) {
|
844 |
|
845 |
-
|
|
|
|
|
|
|
846 |
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
// Handle it asynchronously to allow scripts the opportunity to delay ready
|
852 |
-
setTimeout( jQuery.ready, 1 );
|
853 |
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
858 |
|
859 |
-
|
860 |
-
|
|
|
861 |
|
862 |
-
|
863 |
-
|
864 |
-
// Ensure firing before onload, maybe late but safe also for iframes
|
865 |
-
document.attachEvent( "onreadystatechange", DOMContentLoaded );
|
866 |
|
867 |
-
|
868 |
-
window.attachEvent( "onload", jQuery.ready );
|
869 |
|
870 |
-
|
871 |
-
|
872 |
-
var top = false;
|
873 |
|
874 |
-
|
875 |
-
|
876 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
877 |
|
878 |
-
|
879 |
-
|
880 |
-
if ( !jQuery.isReady ) {
|
881 |
|
882 |
-
|
883 |
-
// Use the trick by Diego Perini
|
884 |
-
// http://javascript.nwbox.com/IEContentLoaded/
|
885 |
-
top.doScroll("left");
|
886 |
-
} catch(e) {
|
887 |
-
return setTimeout( doScrollCheck, 50 );
|
888 |
-
}
|
889 |
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
895 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
896 |
}
|
897 |
-
return readyList.promise( obj );
|
898 |
-
};
|
899 |
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
});
|
904 |
|
905 |
-
|
906 |
-
|
907 |
-
// String to Object options format cache
|
908 |
-
var optionsCache = {};
|
909 |
|
910 |
-
|
911 |
-
|
912 |
-
var object = optionsCache[ options ] = {};
|
913 |
-
jQuery.each( options.split( core_rspace ), function( _, flag ) {
|
914 |
-
object[ flag ] = true;
|
915 |
-
});
|
916 |
-
return object;
|
917 |
-
}
|
918 |
|
919 |
-
|
920 |
-
* Create a callback list using the following parameters:
|
921 |
-
*
|
922 |
-
* options: an optional list of space-separated options that will change how
|
923 |
-
* the callback list behaves or a more traditional option object
|
924 |
-
*
|
925 |
-
* By default a callback list will act like an event callback list and can be
|
926 |
-
* "fired" multiple times.
|
927 |
-
*
|
928 |
-
* Possible options:
|
929 |
-
*
|
930 |
-
* once: will ensure the callback list can only be fired once (like a Deferred)
|
931 |
-
*
|
932 |
-
* memory: will keep track of previous values and will call any callback added
|
933 |
-
* after the list has been fired right away with the latest "memorized"
|
934 |
-
* values (like a Deferred)
|
935 |
-
*
|
936 |
-
* unique: will ensure a callback can only be added once (no duplicate in the list)
|
937 |
-
*
|
938 |
-
* stopOnFalse: interrupt callings when a callback returns false
|
939 |
-
*
|
940 |
-
*/
|
941 |
-
jQuery.Callbacks = function( options ) {
|
942 |
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
948 |
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
//
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
if (
|
975 |
-
|
976 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
977 |
}
|
|
|
|
|
978 |
}
|
979 |
-
|
980 |
-
if (
|
981 |
-
|
982 |
-
|
983 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
984 |
}
|
985 |
-
} else if ( memory ) {
|
986 |
-
list = [];
|
987 |
-
} else {
|
988 |
-
self.disable();
|
989 |
}
|
990 |
}
|
991 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
992 |
// Actual Callbacks object
|
993 |
self = {
|
994 |
// Add a callback or a collection of callbacks to the list
|
@@ -1027,7 +3196,7 @@ jQuery.Callbacks = function( options ) {
|
|
1027 |
if ( list ) {
|
1028 |
jQuery.each( arguments, function( _, arg ) {
|
1029 |
var index;
|
1030 |
-
while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
|
1031 |
list.splice( index, 1 );
|
1032 |
// Handle firing indexes
|
1033 |
if ( firing ) {
|
@@ -1043,13 +3212,15 @@ jQuery.Callbacks = function( options ) {
|
|
1043 |
}
|
1044 |
return this;
|
1045 |
},
|
1046 |
-
//
|
|
|
1047 |
has: function( fn ) {
|
1048 |
-
return jQuery.inArray( fn, list ) > -1;
|
1049 |
},
|
1050 |
// Remove all callbacks from the list
|
1051 |
empty: function() {
|
1052 |
list = [];
|
|
|
1053 |
return this;
|
1054 |
},
|
1055 |
// Have the list do nothing anymore
|
@@ -1075,9 +3246,9 @@ jQuery.Callbacks = function( options ) {
|
|
1075 |
},
|
1076 |
// Call all callbacks with the given context and arguments
|
1077 |
fireWith: function( context, args ) {
|
1078 |
-
args = args || [];
|
1079 |
-
args = [ context, args.slice ? args.slice() : args ];
|
1080 |
if ( list && ( !fired || stack ) ) {
|
|
|
|
|
1081 |
if ( firing ) {
|
1082 |
stack.push( args );
|
1083 |
} else {
|
@@ -1099,6 +3270,8 @@ jQuery.Callbacks = function( options ) {
|
|
1099 |
|
1100 |
return self;
|
1101 |
};
|
|
|
|
|
1102 |
jQuery.extend({
|
1103 |
|
1104 |
Deferred: function( func ) {
|
@@ -1121,23 +3294,19 @@ jQuery.extend({
|
|
1121 |
var fns = arguments;
|
1122 |
return jQuery.Deferred(function( newDefer ) {
|
1123 |
jQuery.each( tuples, function( i, tuple ) {
|
1124 |
-
var
|
1125 |
-
fn = fns[ i ];
|
1126 |
// deferred[ done | fail | progress ] for forwarding actions to newDefer
|
1127 |
-
deferred[ tuple[1] ](
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
} :
|
1139 |
-
newDefer[ action ]
|
1140 |
-
);
|
1141 |
});
|
1142 |
fns = null;
|
1143 |
}).promise();
|
@@ -1171,8 +3340,11 @@ jQuery.extend({
|
|
1171 |
}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
|
1172 |
}
|
1173 |
|
1174 |
-
// deferred[ resolve | reject | notify ]
|
1175 |
-
deferred[ tuple[0] ] =
|
|
|
|
|
|
|
1176 |
deferred[ tuple[0] + "With" ] = list.fireWith;
|
1177 |
});
|
1178 |
|
@@ -1191,7 +3363,7 @@ jQuery.extend({
|
|
1191 |
// Deferred helper
|
1192 |
when: function( subordinate /* , ..., subordinateN */ ) {
|
1193 |
var i = 0,
|
1194 |
-
resolveValues =
|
1195 |
length = resolveValues.length,
|
1196 |
|
1197 |
// the count of uncompleted subordinates
|
@@ -1204,10 +3376,11 @@ jQuery.extend({
|
|
1204 |
updateFunc = function( i, contexts, values ) {
|
1205 |
return function( value ) {
|
1206 |
contexts[ i ] = this;
|
1207 |
-
values[ i ] = arguments.length > 1 ?
|
1208 |
-
if( values === progressValues ) {
|
1209 |
deferred.notifyWith( contexts, values );
|
1210 |
-
|
|
|
1211 |
deferred.resolveWith( contexts, values );
|
1212 |
}
|
1213 |
};
|
@@ -1240,563 +3413,246 @@ jQuery.extend({
|
|
1240 |
return deferred.promise();
|
1241 |
}
|
1242 |
});
|
1243 |
-
jQuery.support = (function() {
|
1244 |
-
|
1245 |
-
var support,
|
1246 |
-
all,
|
1247 |
-
a,
|
1248 |
-
select,
|
1249 |
-
opt,
|
1250 |
-
input,
|
1251 |
-
fragment,
|
1252 |
-
eventName,
|
1253 |
-
i,
|
1254 |
-
isSupported,
|
1255 |
-
clickFn,
|
1256 |
-
div = document.createElement("div");
|
1257 |
-
|
1258 |
-
// Setup
|
1259 |
-
div.setAttribute( "className", "t" );
|
1260 |
-
div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
|
1261 |
-
|
1262 |
-
// Support tests won't run in some limited or non-browser environments
|
1263 |
-
all = div.getElementsByTagName("*");
|
1264 |
-
a = div.getElementsByTagName("a")[ 0 ];
|
1265 |
-
if ( !all || !a || !all.length ) {
|
1266 |
-
return {};
|
1267 |
-
}
|
1268 |
-
|
1269 |
-
// First batch of tests
|
1270 |
-
select = document.createElement("select");
|
1271 |
-
opt = select.appendChild( document.createElement("option") );
|
1272 |
-
input = div.getElementsByTagName("input")[ 0 ];
|
1273 |
-
|
1274 |
-
a.style.cssText = "top:1px;float:left;opacity:.5";
|
1275 |
-
support = {
|
1276 |
-
// IE strips leading whitespace when .innerHTML is used
|
1277 |
-
leadingWhitespace: ( div.firstChild.nodeType === 3 ),
|
1278 |
-
|
1279 |
-
// Make sure that tbody elements aren't automatically inserted
|
1280 |
-
// IE will insert them into empty tables
|
1281 |
-
tbody: !div.getElementsByTagName("tbody").length,
|
1282 |
-
|
1283 |
-
// Make sure that link elements get serialized correctly by innerHTML
|
1284 |
-
// This requires a wrapper element in IE
|
1285 |
-
htmlSerialize: !!div.getElementsByTagName("link").length,
|
1286 |
-
|
1287 |
-
// Get the style information from getAttribute
|
1288 |
-
// (IE uses .cssText instead)
|
1289 |
-
style: /top/.test( a.getAttribute("style") ),
|
1290 |
-
|
1291 |
-
// Make sure that URLs aren't manipulated
|
1292 |
-
// (IE normalizes it by default)
|
1293 |
-
hrefNormalized: ( a.getAttribute("href") === "/a" ),
|
1294 |
-
|
1295 |
-
// Make sure that element opacity exists
|
1296 |
-
// (IE uses filter instead)
|
1297 |
-
// Use a regex to work around a WebKit issue. See #5145
|
1298 |
-
opacity: /^0.5/.test( a.style.opacity ),
|
1299 |
-
|
1300 |
-
// Verify style float existence
|
1301 |
-
// (IE uses styleFloat instead of cssFloat)
|
1302 |
-
cssFloat: !!a.style.cssFloat,
|
1303 |
-
|
1304 |
-
// Make sure that if no value is specified for a checkbox
|
1305 |
-
// that it defaults to "on".
|
1306 |
-
// (WebKit defaults to "" instead)
|
1307 |
-
checkOn: ( input.value === "on" ),
|
1308 |
-
|
1309 |
-
// Make sure that a selected-by-default option has a working selected property.
|
1310 |
-
// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
|
1311 |
-
optSelected: opt.selected,
|
1312 |
-
|
1313 |
-
// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
|
1314 |
-
getSetAttribute: div.className !== "t",
|
1315 |
-
|
1316 |
-
// Tests for enctype support on a form (#6743)
|
1317 |
-
enctype: !!document.createElement("form").enctype,
|
1318 |
-
|
1319 |
-
// Makes sure cloning an html5 element does not cause problems
|
1320 |
-
// Where outerHTML is undefined, this still works
|
1321 |
-
html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>",
|
1322 |
-
|
1323 |
-
// jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode
|
1324 |
-
boxModel: ( document.compatMode === "CSS1Compat" ),
|
1325 |
-
|
1326 |
-
// Will be defined later
|
1327 |
-
submitBubbles: true,
|
1328 |
-
changeBubbles: true,
|
1329 |
-
focusinBubbles: false,
|
1330 |
-
deleteExpando: true,
|
1331 |
-
noCloneEvent: true,
|
1332 |
-
inlineBlockNeedsLayout: false,
|
1333 |
-
shrinkWrapBlocks: false,
|
1334 |
-
reliableMarginRight: true,
|
1335 |
-
boxSizingReliable: true,
|
1336 |
-
pixelPosition: false
|
1337 |
-
};
|
1338 |
-
|
1339 |
-
// Make sure checked status is properly cloned
|
1340 |
-
input.checked = true;
|
1341 |
-
support.noCloneChecked = input.cloneNode( true ).checked;
|
1342 |
|
1343 |
-
// Make sure that the options inside disabled selects aren't marked as disabled
|
1344 |
-
// (WebKit marks them as disabled)
|
1345 |
-
select.disabled = true;
|
1346 |
-
support.optDisabled = !opt.disabled;
|
1347 |
-
|
1348 |
-
// Test to see if it's possible to delete an expando from an element
|
1349 |
-
// Fails in Internet Explorer
|
1350 |
-
try {
|
1351 |
-
delete div.test;
|
1352 |
-
} catch( e ) {
|
1353 |
-
support.deleteExpando = false;
|
1354 |
-
}
|
1355 |
-
|
1356 |
-
if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
|
1357 |
-
div.attachEvent( "onclick", clickFn = function() {
|
1358 |
-
// Cloning a node shouldn't copy over any
|
1359 |
-
// bound event handlers (IE does this)
|
1360 |
-
support.noCloneEvent = false;
|
1361 |
-
});
|
1362 |
-
div.cloneNode( true ).fireEvent("onclick");
|
1363 |
-
div.detachEvent( "onclick", clickFn );
|
1364 |
-
}
|
1365 |
-
|
1366 |
-
// Check if a radio maintains its value
|
1367 |
-
// after being appended to the DOM
|
1368 |
-
input = document.createElement("input");
|
1369 |
-
input.value = "t";
|
1370 |
-
input.setAttribute( "type", "radio" );
|
1371 |
-
support.radioValue = input.value === "t";
|
1372 |
-
|
1373 |
-
input.setAttribute( "checked", "checked" );
|
1374 |
-
|
1375 |
-
// #11217 - WebKit loses check when the name is after the checked attribute
|
1376 |
-
input.setAttribute( "name", "t" );
|
1377 |
-
|
1378 |
-
div.appendChild( input );
|
1379 |
-
fragment = document.createDocumentFragment();
|
1380 |
-
fragment.appendChild( div.lastChild );
|
1381 |
-
|
1382 |
-
// WebKit doesn't clone checked state correctly in fragments
|
1383 |
-
support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
|
1384 |
-
|
1385 |
-
// Check if a disconnected checkbox will retain its checked
|
1386 |
-
// value of true after appended to the DOM (IE6/7)
|
1387 |
-
support.appendChecked = input.checked;
|
1388 |
-
|
1389 |
-
fragment.removeChild( input );
|
1390 |
-
fragment.appendChild( div );
|
1391 |
-
|
1392 |
-
// Technique from Juriy Zaytsev
|
1393 |
-
// http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
|
1394 |
-
// We only care about the case where non-standard event systems
|
1395 |
-
// are used, namely in IE. Short-circuiting here helps us to
|
1396 |
-
// avoid an eval call (in setAttribute) which can cause CSP
|
1397 |
-
// to go haywire. See: https://developer.mozilla.org/en/Security/CSP
|
1398 |
-
if ( div.attachEvent ) {
|
1399 |
-
for ( i in {
|
1400 |
-
submit: true,
|
1401 |
-
change: true,
|
1402 |
-
focusin: true
|
1403 |
-
}) {
|
1404 |
-
eventName = "on" + i;
|
1405 |
-
isSupported = ( eventName in div );
|
1406 |
-
if ( !isSupported ) {
|
1407 |
-
div.setAttribute( eventName, "return;" );
|
1408 |
-
isSupported = ( typeof div[ eventName ] === "function" );
|
1409 |
-
}
|
1410 |
-
support[ i + "Bubbles" ] = isSupported;
|
1411 |
-
}
|
1412 |
-
}
|
1413 |
|
1414 |
-
|
1415 |
-
|
1416 |
-
var container, div, tds, marginDiv,
|
1417 |
-
divReset = "padding:0;margin:0;border:0;display:block;overflow:hidden;",
|
1418 |
-
body = document.getElementsByTagName("body")[0];
|
1419 |
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
}
|
1424 |
-
|
1425 |
-
container = document.createElement("div");
|
1426 |
-
container.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px";
|
1427 |
-
body.insertBefore( container, body.firstChild );
|
1428 |
-
|
1429 |
-
// Construct the test element
|
1430 |
-
div = document.createElement("div");
|
1431 |
-
container.appendChild( div );
|
1432 |
-
|
1433 |
-
// Check if table cells still have offsetWidth/Height when they are set
|
1434 |
-
// to display:none and there are still other visible table cells in a
|
1435 |
-
// table row; if so, offsetWidth/Height are not reliable for use when
|
1436 |
-
// determining if an element has been hidden directly using
|
1437 |
-
// display:none (it is still safe to use offsets if a parent element is
|
1438 |
-
// hidden; don safety goggles and see bug #4512 for more information).
|
1439 |
-
// (only IE 8 fails this test)
|
1440 |
-
div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
|
1441 |
-
tds = div.getElementsByTagName("td");
|
1442 |
-
tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none";
|
1443 |
-
isSupported = ( tds[ 0 ].offsetHeight === 0 );
|
1444 |
-
|
1445 |
-
tds[ 0 ].style.display = "";
|
1446 |
-
tds[ 1 ].style.display = "none";
|
1447 |
-
|
1448 |
-
// Check if empty table cells still have offsetWidth/Height
|
1449 |
-
// (IE <= 8 fail this test)
|
1450 |
-
support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
|
1451 |
-
|
1452 |
-
// Check box-sizing and margin behavior
|
1453 |
-
div.innerHTML = "";
|
1454 |
-
div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";
|
1455 |
-
support.boxSizing = ( div.offsetWidth === 4 );
|
1456 |
-
support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 );
|
1457 |
-
|
1458 |
-
// NOTE: To any future maintainer, we've window.getComputedStyle
|
1459 |
-
// because jsdom on node.js will break without it.
|
1460 |
-
if ( window.getComputedStyle ) {
|
1461 |
-
support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
|
1462 |
-
support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
|
1463 |
-
|
1464 |
-
// Check if div with explicit width and no margin-right incorrectly
|
1465 |
-
// gets computed margin-right based on width of container. For more
|
1466 |
-
// info see bug #3333
|
1467 |
-
// Fails in WebKit before Feb 2011 nightlies
|
1468 |
-
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
|
1469 |
-
marginDiv = document.createElement("div");
|
1470 |
-
marginDiv.style.cssText = div.style.cssText = divReset;
|
1471 |
-
marginDiv.style.marginRight = marginDiv.style.width = "0";
|
1472 |
-
div.style.width = "1px";
|
1473 |
-
div.appendChild( marginDiv );
|
1474 |
-
support.reliableMarginRight =
|
1475 |
-
!parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
|
1476 |
-
}
|
1477 |
-
|
1478 |
-
if ( typeof div.style.zoom !== "undefined" ) {
|
1479 |
-
// Check if natively block-level elements act like inline-block
|
1480 |
-
// elements when setting their display to 'inline' and giving
|
1481 |
-
// them layout
|
1482 |
-
// (IE < 8 does this)
|
1483 |
-
div.innerHTML = "";
|
1484 |
-
div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
|
1485 |
-
support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
|
1486 |
-
|
1487 |
-
// Check if elements with layout shrink-wrap their children
|
1488 |
-
// (IE 6 does this)
|
1489 |
-
div.style.display = "block";
|
1490 |
-
div.style.overflow = "visible";
|
1491 |
-
div.innerHTML = "<div></div>";
|
1492 |
-
div.firstChild.style.width = "5px";
|
1493 |
-
support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
|
1494 |
-
|
1495 |
-
container.style.zoom = 1;
|
1496 |
-
}
|
1497 |
-
|
1498 |
-
// Null elements to avoid leaks in IE
|
1499 |
-
body.removeChild( container );
|
1500 |
-
container = div = tds = marginDiv = null;
|
1501 |
-
});
|
1502 |
|
1503 |
-
|
1504 |
-
|
1505 |
-
all = a = select = opt = input = fragment = div = null;
|
1506 |
-
|
1507 |
-
return support;
|
1508 |
-
})();
|
1509 |
-
var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
|
1510 |
-
rmultiDash = /([A-Z])/g;
|
1511 |
|
1512 |
jQuery.extend({
|
1513 |
-
|
1514 |
-
|
1515 |
-
deletedIds: [],
|
1516 |
-
|
1517 |
-
// Remove at next major release (1.9/2.0)
|
1518 |
-
uuid: 0,
|
1519 |
-
|
1520 |
-
// Unique for each copy of jQuery on the page
|
1521 |
-
// Non-digits removed to match rinlinejQuery
|
1522 |
-
expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
|
1523 |
-
|
1524 |
-
// The following elements throw uncatchable exceptions if you
|
1525 |
-
// attempt to add expando properties to them.
|
1526 |
-
noData: {
|
1527 |
-
"embed": true,
|
1528 |
-
// Ban all objects except for Flash (which handle expandos)
|
1529 |
-
"object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
|
1530 |
-
"applet": true
|
1531 |
-
},
|
1532 |
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
},
|
1537 |
|
1538 |
-
|
1539 |
-
|
1540 |
-
|
|
|
|
|
|
|
1541 |
}
|
|
|
1542 |
|
1543 |
-
|
1544 |
-
|
1545 |
-
getByName = typeof name === "string",
|
1546 |
-
|
1547 |
-
// We have to handle DOM nodes and JS objects differently because IE6-7
|
1548 |
-
// can't GC object references properly across the DOM-JS boundary
|
1549 |
-
isNode = elem.nodeType,
|
1550 |
-
|
1551 |
-
// Only DOM nodes need the global jQuery cache; JS object data is
|
1552 |
-
// attached directly to the object so GC can occur automatically
|
1553 |
-
cache = isNode ? jQuery.cache : elem,
|
1554 |
-
|
1555 |
-
// Only defining an ID for JS objects if its cache already exists allows
|
1556 |
-
// the code to shortcut on the same path as a DOM node with no cache
|
1557 |
-
id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
|
1558 |
|
1559 |
-
//
|
1560 |
-
|
1561 |
-
if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) {
|
1562 |
return;
|
1563 |
}
|
1564 |
|
1565 |
-
|
1566 |
-
|
1567 |
-
|
1568 |
-
if ( isNode ) {
|
1569 |
-
elem[ internalKey ] = id = jQuery.deletedIds.pop() || jQuery.guid++;
|
1570 |
-
} else {
|
1571 |
-
id = internalKey;
|
1572 |
-
}
|
1573 |
}
|
1574 |
|
1575 |
-
|
1576 |
-
|
1577 |
-
|
1578 |
-
// Avoids exposing jQuery metadata on plain JS objects when the object
|
1579 |
-
// is serialized using JSON.stringify
|
1580 |
-
if ( !isNode ) {
|
1581 |
-
cache[ id ].toJSON = jQuery.noop;
|
1582 |
-
}
|
1583 |
-
}
|
1584 |
|
1585 |
-
//
|
1586 |
-
|
1587 |
-
|
1588 |
-
if ( pvt ) {
|
1589 |
-
cache[ id ] = jQuery.extend( cache[ id ], name );
|
1590 |
-
} else {
|
1591 |
-
cache[ id ].data = jQuery.extend( cache[ id ].data, name );
|
1592 |
-
}
|
1593 |
}
|
1594 |
|
1595 |
-
|
1596 |
-
|
1597 |
-
// jQuery data() is stored in a separate object inside the object's internal data
|
1598 |
-
// cache in order to avoid key collisions between internal data and user-defined
|
1599 |
-
// data.
|
1600 |
-
if ( !pvt ) {
|
1601 |
-
if ( !thisCache.data ) {
|
1602 |
-
thisCache.data = {};
|
1603 |
-
}
|
1604 |
-
|
1605 |
-
thisCache = thisCache.data;
|
1606 |
-
}
|
1607 |
|
1608 |
-
|
1609 |
-
|
|
|
|
|
1610 |
}
|
|
|
|
|
1611 |
|
1612 |
-
|
1613 |
-
|
1614 |
-
|
1615 |
-
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
// Test for null|undefined property data
|
1620 |
-
if ( ret == null ) {
|
1621 |
-
|
1622 |
-
// Try to find the camelCased property
|
1623 |
-
ret = thisCache[ jQuery.camelCase( name ) ];
|
1624 |
-
}
|
1625 |
-
} else {
|
1626 |
-
ret = thisCache;
|
1627 |
-
}
|
1628 |
|
1629 |
-
|
1630 |
-
|
|
|
|
|
|
|
1631 |
|
1632 |
-
|
1633 |
-
|
1634 |
-
|
1635 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1636 |
|
1637 |
-
|
|
|
|
|
|
|
1638 |
|
1639 |
-
|
|
|
|
|
|
|
|
|
|
|
1640 |
|
1641 |
-
|
1642 |
-
|
1643 |
-
|
|
|
1644 |
|
1645 |
-
|
1646 |
-
|
1647 |
-
if ( !cache[ id ] ) {
|
1648 |
-
return;
|
1649 |
-
}
|
1650 |
|
1651 |
-
|
|
|
|
|
|
|
1652 |
|
1653 |
-
|
|
|
1654 |
|
1655 |
-
|
|
|
|
|
1656 |
|
1657 |
-
|
1658 |
-
|
|
|
1659 |
|
1660 |
-
|
1661 |
-
|
1662 |
-
|
1663 |
-
} else {
|
1664 |
|
1665 |
-
|
1666 |
-
|
1667 |
-
|
1668 |
-
|
1669 |
-
}
|
1670 |
-
|
1671 |
}
|
1672 |
-
}
|
1673 |
-
}
|
1674 |
|
1675 |
-
|
1676 |
-
|
1677 |
-
}
|
1678 |
|
1679 |
-
|
1680 |
-
|
1681 |
-
|
1682 |
-
|
1683 |
-
}
|
1684 |
}
|
1685 |
}
|
|
|
|
|
|
|
1686 |
|
1687 |
-
// See jQuery.data for more information
|
1688 |
-
if ( !pvt ) {
|
1689 |
-
delete cache[ id ].data;
|
1690 |
|
1691 |
-
|
1692 |
-
// had been the only thing left in it
|
1693 |
-
if ( !isEmptyDataObject( cache[ id ] ) ) {
|
1694 |
-
return;
|
1695 |
-
}
|
1696 |
-
}
|
1697 |
|
1698 |
-
// Destroy the cache
|
1699 |
-
if ( isNode ) {
|
1700 |
-
jQuery.cleanData( [ elem ], true );
|
1701 |
|
1702 |
-
// Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
|
1703 |
-
} else if ( jQuery.support.deleteExpando || cache != cache.window ) {
|
1704 |
-
delete cache[ id ];
|
1705 |
|
1706 |
-
|
1707 |
-
|
1708 |
-
|
1709 |
-
|
1710 |
-
|
|
|
|
|
1711 |
|
1712 |
-
|
1713 |
-
|
1714 |
-
|
1715 |
-
},
|
1716 |
|
1717 |
-
|
1718 |
-
|
1719 |
-
|
|
|
1720 |
|
1721 |
-
|
1722 |
-
|
|
|
|
|
1723 |
}
|
1724 |
-
});
|
1725 |
|
1726 |
-
|
1727 |
-
|
1728 |
-
|
1729 |
-
|
1730 |
-
|
1731 |
-
data = null;
|
1732 |
|
1733 |
-
|
1734 |
-
|
1735 |
-
|
1736 |
-
|
|
|
|
|
1737 |
|
1738 |
-
|
1739 |
-
|
1740 |
-
|
1741 |
-
|
|
|
|
|
|
|
|
|
1742 |
|
1743 |
-
|
1744 |
-
|
1745 |
|
1746 |
-
dataAttr( elem, name, data[ name ] );
|
1747 |
-
}
|
1748 |
-
}
|
1749 |
-
jQuery._data( elem, "parsedAttrs", true );
|
1750 |
-
}
|
1751 |
-
}
|
1752 |
|
1753 |
-
return data;
|
1754 |
-
}
|
1755 |
|
1756 |
-
// Sets multiple values
|
1757 |
-
if ( typeof key === "object" ) {
|
1758 |
-
return this.each(function() {
|
1759 |
-
jQuery.data( this, key );
|
1760 |
-
});
|
1761 |
-
}
|
1762 |
|
1763 |
-
|
1764 |
-
|
1765 |
-
part = parts[1] + "!";
|
1766 |
|
1767 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1768 |
|
1769 |
-
|
1770 |
-
|
|
|
1771 |
|
1772 |
-
// Try to fetch any internally stored data first
|
1773 |
-
if ( data === undefined && elem ) {
|
1774 |
-
data = jQuery.data( elem, key );
|
1775 |
-
data = dataAttr( elem, key, data );
|
1776 |
-
}
|
1777 |
|
1778 |
-
|
1779 |
-
|
1780 |
-
|
1781 |
-
|
|
|
|
|
1782 |
|
1783 |
-
|
1784 |
-
|
1785 |
-
|
1786 |
|
1787 |
-
|
1788 |
-
|
1789 |
-
|
1790 |
-
});
|
1791 |
-
}, null, value, arguments.length > 1, null, false );
|
1792 |
-
},
|
1793 |
|
1794 |
-
|
1795 |
-
|
1796 |
-
|
1797 |
-
});
|
1798 |
-
}
|
1799 |
-
});
|
1800 |
|
1801 |
function dataAttr( elem, key, data ) {
|
1802 |
// If nothing was found internally, try to fetch any
|
@@ -1810,11 +3666,11 @@ function dataAttr( elem, key, data ) {
|
|
1810 |
if ( typeof data === "string" ) {
|
1811 |
try {
|
1812 |
data = data === "true" ? true :
|
1813 |
-
|
1814 |
-
|
1815 |
-
|
1816 |
-
|
1817 |
-
|
1818 |
data;
|
1819 |
} catch( e ) {}
|
1820 |
|
@@ -1839,799 +3695,600 @@ function isEmptyDataObject( obj ) {
|
|
1839 |
continue;
|
1840 |
}
|
1841 |
if ( name !== "toJSON" ) {
|
1842 |
-
return false;
|
1843 |
-
}
|
1844 |
-
}
|
1845 |
-
|
1846 |
-
return true;
|
1847 |
-
}
|
1848 |
-
jQuery.extend({
|
1849 |
-
queue: function( elem, type, data ) {
|
1850 |
-
var queue;
|
1851 |
-
|
1852 |
-
if ( elem ) {
|
1853 |
-
type = ( type || "fx" ) + "queue";
|
1854 |
-
queue = jQuery._data( elem, type );
|
1855 |
-
|
1856 |
-
// Speed up dequeue by getting out quickly if this is just a lookup
|
1857 |
-
if ( data ) {
|
1858 |
-
if ( !queue || jQuery.isArray(data) ) {
|
1859 |
-
queue = jQuery._data( elem, type, jQuery.makeArray(data) );
|
1860 |
-
} else {
|
1861 |
-
queue.push( data );
|
1862 |
-
}
|
1863 |
-
}
|
1864 |
-
return queue || [];
|
1865 |
-
}
|
1866 |
-
},
|
1867 |
-
|
1868 |
-
dequeue: function( elem, type ) {
|
1869 |
-
type = type || "fx";
|
1870 |
-
|
1871 |
-
var queue = jQuery.queue( elem, type ),
|
1872 |
-
startLength = queue.length,
|
1873 |
-
fn = queue.shift(),
|
1874 |
-
hooks = jQuery._queueHooks( elem, type ),
|
1875 |
-
next = function() {
|
1876 |
-
jQuery.dequeue( elem, type );
|
1877 |
-
};
|
1878 |
-
|
1879 |
-
// If the fx queue is dequeued, always remove the progress sentinel
|
1880 |
-
if ( fn === "inprogress" ) {
|
1881 |
-
fn = queue.shift();
|
1882 |
-
startLength--;
|
1883 |
-
}
|
1884 |
-
|
1885 |
-
if ( fn ) {
|
1886 |
-
|
1887 |
-
// Add a progress sentinel to prevent the fx queue from being
|
1888 |
-
// automatically dequeued
|
1889 |
-
if ( type === "fx" ) {
|
1890 |
-
queue.unshift( "inprogress" );
|
1891 |
-
}
|
1892 |
-
|
1893 |
-
// clear up the last queue stop function
|
1894 |
-
delete hooks.stop;
|
1895 |
-
fn.call( elem, next, hooks );
|
1896 |
-
}
|
1897 |
-
|
1898 |
-
if ( !startLength && hooks ) {
|
1899 |
-
hooks.empty.fire();
|
1900 |
-
}
|
1901 |
-
},
|
1902 |
-
|
1903 |
-
// not intended for public consumption - generates a queueHooks object, or returns the current one
|
1904 |
-
_queueHooks: function( elem, type ) {
|
1905 |
-
var key = type + "queueHooks";
|
1906 |
-
return jQuery._data( elem, key ) || jQuery._data( elem, key, {
|
1907 |
-
empty: jQuery.Callbacks("once memory").add(function() {
|
1908 |
-
jQuery.removeData( elem, type + "queue", true );
|
1909 |
-
jQuery.removeData( elem, key, true );
|
1910 |
-
})
|
1911 |
-
});
|
1912 |
-
}
|
1913 |
-
});
|
1914 |
-
|
1915 |
-
jQuery.fn.extend({
|
1916 |
-
queue: function( type, data ) {
|
1917 |
-
var setter = 2;
|
1918 |
-
|
1919 |
-
if ( typeof type !== "string" ) {
|
1920 |
-
data = type;
|
1921 |
-
type = "fx";
|
1922 |
-
setter--;
|
1923 |
-
}
|
1924 |
-
|
1925 |
-
if ( arguments.length < setter ) {
|
1926 |
-
return jQuery.queue( this[0], type );
|
1927 |
-
}
|
1928 |
-
|
1929 |
-
return data === undefined ?
|
1930 |
-
this :
|
1931 |
-
this.each(function() {
|
1932 |
-
var queue = jQuery.queue( this, type, data );
|
1933 |
-
|
1934 |
-
// ensure a hooks for this queue
|
1935 |
-
jQuery._queueHooks( this, type );
|
1936 |
-
|
1937 |
-
if ( type === "fx" && queue[0] !== "inprogress" ) {
|
1938 |
-
jQuery.dequeue( this, type );
|
1939 |
-
}
|
1940 |
-
});
|
1941 |
-
},
|
1942 |
-
dequeue: function( type ) {
|
1943 |
-
return this.each(function() {
|
1944 |
-
jQuery.dequeue( this, type );
|
1945 |
-
});
|
1946 |
-
},
|
1947 |
-
// Based off of the plugin by Clint Helfers, with permission.
|
1948 |
-
// http://blindsignals.com/index.php/2009/07/jquery-delay/
|
1949 |
-
delay: function( time, type ) {
|
1950 |
-
time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
|
1951 |
-
type = type || "fx";
|
1952 |
-
|
1953 |
-
return this.queue( type, function( next, hooks ) {
|
1954 |
-
var timeout = setTimeout( next, time );
|
1955 |
-
hooks.stop = function() {
|
1956 |
-
clearTimeout( timeout );
|
1957 |
-
};
|
1958 |
-
});
|
1959 |
-
},
|
1960 |
-
clearQueue: function( type ) {
|
1961 |
-
return this.queue( type || "fx", [] );
|
1962 |
-
},
|
1963 |
-
// Get a promise resolved when queues of a certain type
|
1964 |
-
// are emptied (fx is the type by default)
|
1965 |
-
promise: function( type, obj ) {
|
1966 |
-
var tmp,
|
1967 |
-
count = 1,
|
1968 |
-
defer = jQuery.Deferred(),
|
1969 |
-
elements = this,
|
1970 |
-
i = this.length,
|
1971 |
-
resolve = function() {
|
1972 |
-
if ( !( --count ) ) {
|
1973 |
-
defer.resolveWith( elements, [ elements ] );
|
1974 |
-
}
|
1975 |
-
};
|
1976 |
-
|
1977 |
-
if ( typeof type !== "string" ) {
|
1978 |
-
obj = type;
|
1979 |
-
type = undefined;
|
1980 |
}
|
1981 |
-
|
1982 |
|
1983 |
-
|
1984 |
-
|
1985 |
-
|
1986 |
-
|
1987 |
-
|
1988 |
-
|
1989 |
-
}
|
1990 |
-
resolve();
|
1991 |
-
return defer.promise( obj );
|
1992 |
}
|
1993 |
-
});
|
1994 |
-
var nodeHook, boolHook, fixSpecified,
|
1995 |
-
rclass = /[\t\r\n]/g,
|
1996 |
-
rreturn = /\r/g,
|
1997 |
-
rtype = /^(?:button|input)$/i,
|
1998 |
-
rfocusable = /^(?:button|input|object|select|textarea)$/i,
|
1999 |
-
rclickable = /^a(?:rea|)$/i,
|
2000 |
-
rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
|
2001 |
-
getSetAttribute = jQuery.support.getSetAttribute;
|
2002 |
|
2003 |
-
|
2004 |
-
|
2005 |
-
return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
|
2006 |
-
},
|
2007 |
|
2008 |
-
|
2009 |
-
|
2010 |
-
|
2011 |
-
});
|
2012 |
-
},
|
2013 |
|
2014 |
-
|
2015 |
-
|
2016 |
-
|
2017 |
|
2018 |
-
|
2019 |
-
|
2020 |
-
|
2021 |
-
// try/catch handles cases where IE balks (such as removing a property on window)
|
2022 |
-
try {
|
2023 |
-
this[ name ] = undefined;
|
2024 |
-
delete this[ name ];
|
2025 |
-
} catch( e ) {}
|
2026 |
-
});
|
2027 |
-
},
|
2028 |
|
2029 |
-
|
2030 |
-
|
2031 |
-
|
|
|
|
|
2032 |
|
2033 |
-
|
2034 |
-
|
2035 |
-
|
2036 |
-
|
|
|
|
|
|
|
2037 |
}
|
|
|
2038 |
|
2039 |
-
|
2040 |
-
|
2041 |
-
|
2042 |
-
|
2043 |
-
|
2044 |
|
2045 |
-
|
2046 |
-
|
2047 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2048 |
|
2049 |
-
|
2050 |
-
setClass = " " + elem.className + " ";
|
2051 |
|
2052 |
-
|
2053 |
-
|
2054 |
-
|
2055 |
-
|
2056 |
-
|
2057 |
-
|
2058 |
-
}
|
2059 |
-
}
|
2060 |
-
}
|
2061 |
}
|
2062 |
|
2063 |
-
|
2064 |
-
}
|
2065 |
|
2066 |
-
|
2067 |
-
|
|
|
2068 |
|
2069 |
-
|
2070 |
-
|
2071 |
-
|
2072 |
-
});
|
2073 |
-
}
|
2074 |
-
if ( (value && typeof value === "string") || value === undefined ) {
|
2075 |
-
removes = ( value || "" ).split( core_rspace );
|
2076 |
|
2077 |
-
|
2078 |
-
|
2079 |
-
if ( elem.nodeType === 1 && elem.className ) {
|
2080 |
|
2081 |
-
|
|
|
2082 |
|
2083 |
-
|
2084 |
-
|
2085 |
-
// Remove until there is nothing to remove,
|
2086 |
-
while ( className.indexOf(" " + removes[ c ] + " ") >= 0 ) {
|
2087 |
-
className = className.replace( " " + removes[ c ] + " " , " " );
|
2088 |
-
}
|
2089 |
-
}
|
2090 |
-
elem.className = value ? jQuery.trim( className ) : "";
|
2091 |
-
}
|
2092 |
-
}
|
2093 |
}
|
|
|
|
|
|
|
2094 |
|
2095 |
-
|
2096 |
-
|
2097 |
-
|
2098 |
-
toggleClass: function( value, stateVal ) {
|
2099 |
-
var type = typeof value,
|
2100 |
-
isBool = typeof stateVal === "boolean";
|
2101 |
|
2102 |
-
|
2103 |
-
|
2104 |
-
|
2105 |
-
|
2106 |
-
}
|
2107 |
|
2108 |
-
|
2109 |
-
|
2110 |
-
// toggle individual class names
|
2111 |
-
var className,
|
2112 |
-
i = 0,
|
2113 |
-
self = jQuery( this ),
|
2114 |
-
state = stateVal,
|
2115 |
-
classNames = value.split( core_rspace );
|
2116 |
|
2117 |
-
|
2118 |
-
|
2119 |
-
|
2120 |
-
self[ state ? "addClass" : "removeClass" ]( className );
|
2121 |
-
}
|
2122 |
|
2123 |
-
|
2124 |
-
|
2125 |
-
|
2126 |
-
|
2127 |
-
|
2128 |
|
2129 |
-
|
2130 |
-
this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
|
2131 |
-
}
|
2132 |
-
});
|
2133 |
-
},
|
2134 |
|
2135 |
-
|
2136 |
-
var className = " " + selector + " ",
|
2137 |
-
i = 0,
|
2138 |
-
l = this.length;
|
2139 |
-
for ( ; i < l; i++ ) {
|
2140 |
-
if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
|
2141 |
-
return true;
|
2142 |
-
}
|
2143 |
-
}
|
2144 |
|
2145 |
-
|
2146 |
-
},
|
2147 |
|
2148 |
-
|
2149 |
-
|
2150 |
-
elem = this[0];
|
2151 |
|
2152 |
-
|
2153 |
-
|
2154 |
-
|
|
|
2155 |
|
2156 |
-
|
2157 |
-
|
|
|
|
|
|
|
|
|
|
|
2158 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2159 |
|
2160 |
-
|
|
|
|
|
|
|
2161 |
|
2162 |
-
|
2163 |
-
|
2164 |
-
|
2165 |
-
|
2166 |
-
ret == null ? "" : ret;
|
2167 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2168 |
|
|
|
|
|
|
|
2169 |
return;
|
2170 |
}
|
|
|
2171 |
|
2172 |
-
|
|
|
|
|
2173 |
|
2174 |
-
|
2175 |
-
|
2176 |
-
|
|
|
|
|
2177 |
|
2178 |
-
|
2179 |
-
|
2180 |
-
|
|
|
|
|
2181 |
|
2182 |
-
|
2183 |
-
|
2184 |
-
} else {
|
2185 |
-
val = value;
|
2186 |
-
}
|
2187 |
|
2188 |
-
|
2189 |
-
|
2190 |
-
|
2191 |
-
|
2192 |
-
|
2193 |
-
|
2194 |
-
|
2195 |
-
|
2196 |
-
});
|
2197 |
-
}
|
2198 |
|
2199 |
-
|
|
|
|
|
|
|
2200 |
|
2201 |
-
|
2202 |
-
|
2203 |
-
|
2204 |
-
|
2205 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2206 |
}
|
2207 |
});
|
2208 |
|
2209 |
-
jQuery.extend({
|
2210 |
-
|
2211 |
-
|
2212 |
-
|
2213 |
-
|
2214 |
-
// uses .value. See #6932
|
2215 |
-
var val = elem.attributes.value;
|
2216 |
-
return !val || val.specified ? elem.value : elem.text;
|
2217 |
-
}
|
2218 |
-
},
|
2219 |
-
select: {
|
2220 |
-
get: function( elem ) {
|
2221 |
-
var value, option,
|
2222 |
-
options = elem.options,
|
2223 |
-
index = elem.selectedIndex,
|
2224 |
-
one = elem.type === "select-one" || index < 0,
|
2225 |
-
values = one ? null : [],
|
2226 |
-
max = one ? index + 1 : options.length,
|
2227 |
-
i = index < 0 ?
|
2228 |
-
max :
|
2229 |
-
one ? index : 0;
|
2230 |
|
2231 |
-
|
2232 |
-
|
2233 |
-
option = options[ i ];
|
2234 |
|
2235 |
-
|
2236 |
-
|
2237 |
-
|
2238 |
-
|
2239 |
-
( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
|
2240 |
|
2241 |
-
|
2242 |
-
|
|
|
2243 |
|
2244 |
-
//
|
2245 |
-
|
2246 |
-
|
|
|
|
|
|
|
|
|
|
|
2247 |
}
|
2248 |
-
|
2249 |
-
// Multi-Selects return an array
|
2250 |
-
values.push( value );
|
2251 |
}
|
|
|
2252 |
}
|
|
|
2253 |
|
2254 |
-
|
2255 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2256 |
|
2257 |
-
set: function( elem, value ) {
|
2258 |
-
var values = jQuery.makeArray( value );
|
2259 |
|
2260 |
-
|
2261 |
-
|
2262 |
-
|
2263 |
|
2264 |
-
|
2265 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2266 |
}
|
2267 |
-
return values;
|
2268 |
}
|
|
|
2269 |
}
|
2270 |
},
|
2271 |
|
2272 |
-
|
2273 |
-
|
2274 |
-
|
2275 |
-
attr: function( elem, name, value, pass ) {
|
2276 |
-
var ret, hooks, notxml,
|
2277 |
-
nType = elem.nodeType;
|
2278 |
-
|
2279 |
-
// don't get/set attributes on text, comment and attribute nodes
|
2280 |
-
if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
|
2281 |
-
return;
|
2282 |
-
}
|
2283 |
-
|
2284 |
-
if ( pass && jQuery.isFunction( jQuery.fn[ name ] ) ) {
|
2285 |
-
return jQuery( elem )[ name ]( value );
|
2286 |
-
}
|
2287 |
-
|
2288 |
-
// Fallback to prop when attributes are not supported
|
2289 |
-
if ( typeof elem.getAttribute === "undefined" ) {
|
2290 |
-
return jQuery.prop( elem, name, value );
|
2291 |
-
}
|
2292 |
|
2293 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2294 |
|
2295 |
-
//
|
2296 |
-
|
2297 |
-
|
2298 |
-
|
2299 |
-
hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
|
2300 |
}
|
2301 |
|
2302 |
-
if (
|
2303 |
-
|
2304 |
-
if ( value === null ) {
|
2305 |
-
jQuery.removeAttr( elem, name );
|
2306 |
-
return;
|
2307 |
-
|
2308 |
-
} else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
|
2309 |
-
return ret;
|
2310 |
|
2311 |
-
|
2312 |
-
|
2313 |
-
|
|
|
2314 |
}
|
2315 |
|
2316 |
-
|
2317 |
-
|
2318 |
-
|
2319 |
-
}
|
2320 |
-
|
2321 |
-
ret = elem.getAttribute( name );
|
2322 |
|
2323 |
-
|
2324 |
-
|
2325 |
-
undefined :
|
2326 |
-
ret;
|
2327 |
}
|
2328 |
},
|
2329 |
|
2330 |
-
|
2331 |
-
|
2332 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2333 |
|
2334 |
-
|
|
|
|
|
2335 |
|
2336 |
-
|
|
|
|
|
|
|
|
|
2337 |
|
2338 |
-
|
2339 |
-
|
|
|
2340 |
|
2341 |
-
|
2342 |
-
|
2343 |
-
|
|
|
2344 |
|
2345 |
-
|
2346 |
-
|
2347 |
-
if ( !isBool ) {
|
2348 |
-
jQuery.attr( elem, name, "" );
|
2349 |
-
}
|
2350 |
-
elem.removeAttribute( getSetAttribute ? name : propName );
|
2351 |
|
2352 |
-
|
2353 |
-
|
2354 |
-
elem[ propName ] = false;
|
2355 |
-
}
|
2356 |
}
|
2357 |
-
}
|
2358 |
-
}
|
2359 |
},
|
2360 |
-
|
2361 |
-
|
2362 |
-
|
2363 |
-
|
2364 |
-
|
2365 |
-
|
2366 |
-
|
2367 |
-
|
2368 |
-
|
2369 |
-
|
2370 |
-
|
2371 |
-
|
2372 |
-
|
2373 |
-
|
2374 |
-
|
2375 |
-
|
2376 |
-
|
2377 |
-
|
2378 |
-
|
2379 |
-
},
|
2380 |
-
// Use the value property for back compat
|
2381 |
-
// Use the nodeHook for button elements in IE6/7 (#1954)
|
2382 |
-
value: {
|
2383 |
-
get: function( elem, name ) {
|
2384 |
-
if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
|
2385 |
-
return nodeHook.get( elem, name );
|
2386 |
-
}
|
2387 |
-
return name in elem ?
|
2388 |
-
elem.value :
|
2389 |
-
null;
|
2390 |
-
},
|
2391 |
-
set: function( elem, value, name ) {
|
2392 |
-
if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
|
2393 |
-
return nodeHook.set( elem, value, name );
|
2394 |
}
|
2395 |
-
|
2396 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2397 |
}
|
2398 |
}
|
2399 |
-
|
|
|
|
|
|
|
|
|
2400 |
|
2401 |
-
|
2402 |
-
tabindex: "tabIndex",
|
2403 |
-
readonly: "readOnly",
|
2404 |
-
"for": "htmlFor",
|
2405 |
-
"class": "className",
|
2406 |
-
maxlength: "maxLength",
|
2407 |
-
cellspacing: "cellSpacing",
|
2408 |
-
cellpadding: "cellPadding",
|
2409 |
-
rowspan: "rowSpan",
|
2410 |
-
colspan: "colSpan",
|
2411 |
-
usemap: "useMap",
|
2412 |
-
frameborder: "frameBorder",
|
2413 |
-
contenteditable: "contentEditable"
|
2414 |
-
},
|
2415 |
|
2416 |
-
|
2417 |
-
|
2418 |
-
|
|
|
|
|
|
|
2419 |
|
2420 |
-
// don't get/set properties on text, comment and attribute nodes
|
2421 |
-
if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
|
2422 |
-
return;
|
2423 |
-
}
|
2424 |
|
2425 |
-
notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
|
2426 |
|
2427 |
-
|
2428 |
-
|
2429 |
-
|
2430 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2431 |
}
|
2432 |
|
2433 |
-
|
2434 |
-
|
2435 |
-
|
2436 |
|
2437 |
-
|
2438 |
-
|
2439 |
-
|
2440 |
|
2441 |
-
|
2442 |
-
|
2443 |
-
|
|
|
|
|
2444 |
|
|
|
2445 |
} else {
|
2446 |
-
|
|
|
|
|
|
|
2447 |
}
|
2448 |
}
|
2449 |
-
},
|
2450 |
-
|
2451 |
-
propHooks: {
|
2452 |
-
tabIndex: {
|
2453 |
-
get: function( elem ) {
|
2454 |
-
// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
|
2455 |
-
// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
|
2456 |
-
var attributeNode = elem.getAttributeNode("tabindex");
|
2457 |
|
2458 |
-
|
2459 |
-
|
2460 |
-
|
2461 |
-
0 :
|
2462 |
-
undefined;
|
2463 |
}
|
2464 |
}
|
2465 |
}
|
2466 |
-
});
|
2467 |
|
2468 |
-
|
2469 |
-
|
2470 |
-
get: function( elem, name ) {
|
2471 |
-
// Align boolean attributes with corresponding properties
|
2472 |
-
// Fall back to attribute presence where some booleans are not supported
|
2473 |
-
var attrNode,
|
2474 |
-
property = jQuery.prop( elem, name );
|
2475 |
-
return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
|
2476 |
-
name.toLowerCase() :
|
2477 |
-
undefined;
|
2478 |
-
},
|
2479 |
-
set: function( elem, value, name ) {
|
2480 |
-
var propName;
|
2481 |
-
if ( value === false ) {
|
2482 |
-
// Remove boolean attributes when set to false
|
2483 |
-
jQuery.removeAttr( elem, name );
|
2484 |
-
} else {
|
2485 |
-
// value is true since we know at this point it's type boolean and not false
|
2486 |
-
// Set boolean attributes to the same name and set the DOM property
|
2487 |
-
propName = jQuery.propFix[ name ] || name;
|
2488 |
-
if ( propName in elem ) {
|
2489 |
-
// Only set the IDL specifically if it already exists on the element
|
2490 |
-
elem[ propName ] = true;
|
2491 |
-
}
|
2492 |
|
2493 |
-
|
2494 |
-
|
2495 |
-
|
2496 |
-
|
2497 |
};
|
|
|
2498 |
|
2499 |
-
// IE6/7 do not support getting/setting some attributes with get/setAttribute
|
2500 |
-
if ( !getSetAttribute ) {
|
2501 |
|
2502 |
-
fixSpecified = {
|
2503 |
-
name: true,
|
2504 |
-
id: true,
|
2505 |
-
coords: true
|
2506 |
-
};
|
2507 |
|
2508 |
-
|
2509 |
-
//
|
2510 |
-
|
2511 |
-
|
2512 |
-
|
2513 |
-
ret = elem.getAttributeNode( name );
|
2514 |
-
return ret && ( fixSpecified[ name ] ? ret.value !== "" : ret.specified ) ?
|
2515 |
-
ret.value :
|
2516 |
-
undefined;
|
2517 |
-
},
|
2518 |
-
set: function( elem, value, name ) {
|
2519 |
-
// Set the existing or create a new attribute node
|
2520 |
-
var ret = elem.getAttributeNode( name );
|
2521 |
-
if ( !ret ) {
|
2522 |
-
ret = document.createAttribute( name );
|
2523 |
-
elem.setAttributeNode( ret );
|
2524 |
-
}
|
2525 |
-
return ( ret.value = value + "" );
|
2526 |
-
}
|
2527 |
-
};
|
2528 |
|
2529 |
-
//
|
2530 |
-
|
2531 |
-
|
2532 |
-
|
2533 |
-
|
2534 |
-
|
2535 |
-
|
2536 |
-
|
2537 |
-
|
2538 |
-
|
2539 |
-
|
2540 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2541 |
|
2542 |
-
//
|
2543 |
-
//
|
2544 |
-
|
2545 |
-
|
2546 |
-
|
2547 |
-
|
2548 |
-
|
2549 |
-
|
2550 |
-
nodeHook.set( elem, value, name );
|
2551 |
-
}
|
2552 |
-
};
|
2553 |
-
}
|
2554 |
|
|
|
|
|
|
|
2555 |
|
2556 |
-
//
|
2557 |
-
|
2558 |
-
|
2559 |
-
|
2560 |
-
|
2561 |
-
|
2562 |
-
|
2563 |
-
}
|
2564 |
});
|
2565 |
-
});
|
2566 |
-
}
|
2567 |
|
2568 |
-
|
2569 |
-
|
2570 |
-
|
2571 |
-
|
2572 |
-
|
2573 |
-
|
2574 |
-
|
2575 |
-
|
2576 |
-
|
|
|
|
|
2577 |
}
|
2578 |
-
}
|
2579 |
-
}
|
2580 |
|
2581 |
-
// Safari mis-reports the default selected property of an option
|
2582 |
-
// Accessing the parent's selectedIndex property fixes it
|
2583 |
-
if ( !jQuery.support.optSelected ) {
|
2584 |
-
jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
|
2585 |
-
get: function( elem ) {
|
2586 |
-
var parent = elem.parentNode;
|
2587 |
|
2588 |
-
|
2589 |
-
|
|
|
2590 |
|
2591 |
-
|
2592 |
-
|
2593 |
-
|
2594 |
-
|
2595 |
-
|
2596 |
-
|
|
|
|
|
2597 |
}
|
2598 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2599 |
}
|
2600 |
|
2601 |
-
|
2602 |
-
|
2603 |
-
jQuery.propFix.enctype = "encoding";
|
2604 |
}
|
2605 |
|
2606 |
-
|
2607 |
-
|
2608 |
-
|
2609 |
-
|
2610 |
-
get: function( elem ) {
|
2611 |
-
// Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
|
2612 |
-
return elem.getAttribute("value") === null ? "on" : elem.value;
|
2613 |
-
}
|
2614 |
-
};
|
2615 |
-
});
|
2616 |
}
|
2617 |
-
jQuery.each([ "radio", "checkbox" ], function() {
|
2618 |
-
jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
|
2619 |
-
set: function( elem, value ) {
|
2620 |
-
if ( jQuery.isArray( value ) ) {
|
2621 |
-
return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
|
2622 |
-
}
|
2623 |
-
}
|
2624 |
-
});
|
2625 |
-
});
|
2626 |
-
var rformElems = /^(?:textarea|input|select)$/i,
|
2627 |
-
rtypenamespace = /^([^\.]*|)(?:\.(.+)|)$/,
|
2628 |
-
rhoverHack = /(?:^|\s)hover(\.\S+|)\b/,
|
2629 |
-
rkeyEvent = /^key/,
|
2630 |
-
rmouseEvent = /^(?:mouse|contextmenu)|click/,
|
2631 |
-
rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
|
2632 |
-
hoverHack = function( events ) {
|
2633 |
-
return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
|
2634 |
-
};
|
2635 |
|
2636 |
/*
|
2637 |
* Helper functions for managing events -- not part of the public interface.
|
@@ -2639,14 +4296,16 @@ var rformElems = /^(?:textarea|input|select)$/i,
|
|
2639 |
*/
|
2640 |
jQuery.event = {
|
2641 |
|
2642 |
-
|
2643 |
|
2644 |
-
|
2645 |
-
|
2646 |
-
|
|
|
|
|
2647 |
|
2648 |
-
// Don't attach events to noData or text/comment nodes (allow plain objects
|
2649 |
-
if (
|
2650 |
return;
|
2651 |
}
|
2652 |
|
@@ -2663,16 +4322,14 @@ jQuery.event = {
|
|
2663 |
}
|
2664 |
|
2665 |
// Init the element's event structure and main handler, if this is the first
|
2666 |
-
events = elemData.events
|
2667 |
-
|
2668 |
-
elemData.events = events = {};
|
2669 |
}
|
2670 |
-
eventHandle = elemData.handle
|
2671 |
-
|
2672 |
-
elemData.handle = eventHandle = function( e ) {
|
2673 |
// Discard the second event of a jQuery.event.trigger() and
|
2674 |
// when an event is called after a page has unloaded
|
2675 |
-
return typeof jQuery !==
|
2676 |
jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
|
2677 |
undefined;
|
2678 |
};
|
@@ -2681,13 +4338,17 @@ jQuery.event = {
|
|
2681 |
}
|
2682 |
|
2683 |
// Handle multiple events separated by a space
|
2684 |
-
|
2685 |
-
|
2686 |
-
|
2687 |
-
|
2688 |
-
|
2689 |
-
|
2690 |
-
|
|
|
|
|
|
|
|
|
2691 |
|
2692 |
// If event changes its type, use the special event handlers for the changed type
|
2693 |
special = jQuery.event.special[ type ] || {};
|
@@ -2701,7 +4362,7 @@ jQuery.event = {
|
|
2701 |
// handleObj is passed to all event handlers
|
2702 |
handleObj = jQuery.extend({
|
2703 |
type: type,
|
2704 |
-
origType:
|
2705 |
data: data,
|
2706 |
handler: handler,
|
2707 |
guid: handler.guid,
|
@@ -2711,8 +4372,7 @@ jQuery.event = {
|
|
2711 |
}, handleObjIn );
|
2712 |
|
2713 |
// Init the event handler queue if we're the first
|
2714 |
-
handlers = events[ type ]
|
2715 |
-
if ( !handlers ) {
|
2716 |
handlers = events[ type ] = [];
|
2717 |
handlers.delegateCount = 0;
|
2718 |
|
@@ -2751,13 +4411,12 @@ jQuery.event = {
|
|
2751 |
elem = null;
|
2752 |
},
|
2753 |
|
2754 |
-
global: {},
|
2755 |
-
|
2756 |
// Detach an event or set of events from an element
|
2757 |
remove: function( elem, types, handler, selector, mappedTypes ) {
|
2758 |
-
|
2759 |
-
|
2760 |
-
|
|
|
2761 |
elemData = jQuery.hasData( elem ) && jQuery._data( elem );
|
2762 |
|
2763 |
if ( !elemData || !(events = elemData.events) ) {
|
@@ -2765,11 +4424,12 @@ jQuery.event = {
|
|
2765 |
}
|
2766 |
|
2767 |
// Once for each type.namespace in types; type may be omitted
|
2768 |
-
types =
|
2769 |
-
|
2770 |
-
|
2771 |
-
|
2772 |
-
|
|
|
2773 |
|
2774 |
// Unbind all events (on this namespace, if provided) for the element
|
2775 |
if ( !type ) {
|
@@ -2780,23 +4440,23 @@ jQuery.event = {
|
|
2780 |
}
|
2781 |
|
2782 |
special = jQuery.event.special[ type ] || {};
|
2783 |
-
type = ( selector? special.delegateType : special.bindType ) || type;
|
2784 |
-
|
2785 |
-
|
2786 |
-
namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.|)") + "(\\.|$)") : null;
|
2787 |
|
2788 |
// Remove matching events
|
2789 |
-
|
2790 |
-
|
|
|
2791 |
|
2792 |
if ( ( mappedTypes || origType === handleObj.origType ) &&
|
2793 |
-
|
2794 |
-
|
2795 |
-
|
2796 |
-
|
2797 |
|
2798 |
if ( handleObj.selector ) {
|
2799 |
-
|
2800 |
}
|
2801 |
if ( special.remove ) {
|
2802 |
special.remove.call( elem, handleObj );
|
@@ -2806,7 +4466,7 @@ jQuery.event = {
|
|
2806 |
|
2807 |
// Remove generic event handler if we removed something and no more handlers exist
|
2808 |
// (avoids potential for endless recursion during removal of special event handlers)
|
2809 |
-
if (
|
2810 |
if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
|
2811 |
jQuery.removeEvent( elem, type, elemData.handle );
|
2812 |
}
|
@@ -2821,80 +4481,48 @@ jQuery.event = {
|
|
2821 |
|
2822 |
// removeData also checks for emptiness and clears the expando if empty
|
2823 |
// so use it instead of delete
|
2824 |
-
jQuery.
|
2825 |
}
|
2826 |
},
|
2827 |
|
2828 |
-
// Events that are safe to short-circuit if no handlers are attached.
|
2829 |
-
// Native DOM events should not be added, they may have inline handlers.
|
2830 |
-
customEvent: {
|
2831 |
-
"getData": true,
|
2832 |
-
"setData": true,
|
2833 |
-
"changeData": true
|
2834 |
-
},
|
2835 |
-
|
2836 |
trigger: function( event, data, elem, onlyHandlers ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2837 |
// Don't do events on text and comment nodes
|
2838 |
-
if ( elem
|
2839 |
return;
|
2840 |
}
|
2841 |
|
2842 |
-
// Event object or event type
|
2843 |
-
var cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType,
|
2844 |
-
type = event.type || event,
|
2845 |
-
namespaces = [];
|
2846 |
-
|
2847 |
// focus/blur morphs to focusin/out; ensure we're not firing them right now
|
2848 |
if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
|
2849 |
return;
|
2850 |
}
|
2851 |
|
2852 |
-
if ( type.indexOf(
|
2853 |
-
// Exclusive events trigger only for the exact event (no namespaces)
|
2854 |
-
type = type.slice(0, -1);
|
2855 |
-
exclusive = true;
|
2856 |
-
}
|
2857 |
-
|
2858 |
-
if ( type.indexOf( "." ) >= 0 ) {
|
2859 |
// Namespaced trigger; create a regexp to match event type in handle()
|
2860 |
namespaces = type.split(".");
|
2861 |
type = namespaces.shift();
|
2862 |
namespaces.sort();
|
2863 |
}
|
|
|
2864 |
|
2865 |
-
|
2866 |
-
|
2867 |
-
|
2868 |
-
|
2869 |
-
|
2870 |
-
// Caller can pass in an Event, Object, or just an event type string
|
2871 |
-
event = typeof event === "object" ?
|
2872 |
-
// jQuery.Event object
|
2873 |
-
event[ jQuery.expando ] ? event :
|
2874 |
-
// Object literal
|
2875 |
-
new jQuery.Event( type, event ) :
|
2876 |
-
// Just the event type (string)
|
2877 |
-
new jQuery.Event( type );
|
2878 |
-
|
2879 |
-
event.type = type;
|
2880 |
-
event.isTrigger = true;
|
2881 |
-
event.exclusive = exclusive;
|
2882 |
-
event.namespace = namespaces.join( "." );
|
2883 |
-
event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null;
|
2884 |
-
ontype = type.indexOf( ":" ) < 0 ? "on" + type : "";
|
2885 |
-
|
2886 |
-
// Handle a global trigger
|
2887 |
-
if ( !elem ) {
|
2888 |
|
2889 |
-
|
2890 |
-
|
2891 |
-
|
2892 |
-
|
2893 |
-
|
2894 |
-
|
2895 |
-
}
|
2896 |
-
return;
|
2897 |
-
}
|
2898 |
|
2899 |
// Clean up the event in case it is being reused
|
2900 |
event.result = undefined;
|
@@ -2903,47 +4531,56 @@ jQuery.event = {
|
|
2903 |
}
|
2904 |
|
2905 |
// Clone any incoming data and prepend the event, creating the handler arg list
|
2906 |
-
data = data
|
2907 |
-
|
|
|
2908 |
|
2909 |
// Allow special events to draw outside the lines
|
2910 |
special = jQuery.event.special[ type ] || {};
|
2911 |
-
if ( special.trigger && special.trigger.apply( elem, data ) === false ) {
|
2912 |
return;
|
2913 |
}
|
2914 |
|
2915 |
// Determine event propagation path in advance, per W3C events spec (#9951)
|
2916 |
// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
|
2917 |
-
eventPath = [[ elem, special.bindType || type ]];
|
2918 |
if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
|
2919 |
|
2920 |
bubbleType = special.delegateType || type;
|
2921 |
-
|
2922 |
-
|
2923 |
-
|
2924 |
-
|
|
|
|
|
2925 |
}
|
2926 |
|
2927 |
// Only add window if we got to document (e.g., not plain obj or detached DOM)
|
2928 |
-
if (
|
2929 |
-
eventPath.push(
|
2930 |
}
|
2931 |
}
|
2932 |
|
2933 |
// Fire handlers on the event path
|
2934 |
-
|
|
|
2935 |
|
2936 |
-
|
2937 |
-
|
|
|
2938 |
|
|
|
2939 |
handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
|
2940 |
if ( handle ) {
|
2941 |
handle.apply( cur, data );
|
2942 |
}
|
2943 |
-
|
|
|
2944 |
handle = ontype && cur[ ontype ];
|
2945 |
-
if ( handle &&
|
2946 |
-
event.
|
|
|
|
|
|
|
2947 |
}
|
2948 |
}
|
2949 |
event.type = type;
|
@@ -2951,29 +4588,33 @@ jQuery.event = {
|
|
2951 |
// If nobody prevented the default action, do it now
|
2952 |
if ( !onlyHandlers && !event.isDefaultPrevented() ) {
|
2953 |
|
2954 |
-
if ( (!special._default || special._default.apply(
|
2955 |
-
|
2956 |
|
2957 |
// Call a native DOM method on the target with the same name name as the event.
|
2958 |
// Can't use an .isFunction() check here because IE6/7 fails that test.
|
2959 |
// Don't do default actions on window, that's where global variables be (#6170)
|
2960 |
-
|
2961 |
-
if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) {
|
2962 |
|
2963 |
// Don't re-trigger an onFOO event when we call its FOO() method
|
2964 |
-
|
2965 |
|
2966 |
-
if (
|
2967 |
elem[ ontype ] = null;
|
2968 |
}
|
2969 |
|
2970 |
// Prevent re-triggering of the same event, since we already bubbled it above
|
2971 |
jQuery.event.triggered = type;
|
2972 |
-
|
|
|
|
|
|
|
|
|
|
|
2973 |
jQuery.event.triggered = undefined;
|
2974 |
|
2975 |
-
if (
|
2976 |
-
elem[ ontype ] =
|
2977 |
}
|
2978 |
}
|
2979 |
}
|
@@ -2985,15 +4626,13 @@ jQuery.event = {
|
|
2985 |
dispatch: function( event ) {
|
2986 |
|
2987 |
// Make a writable jQuery.Event from the native event object
|
2988 |
-
event = jQuery.event.fix( event
|
2989 |
|
2990 |
-
var i,
|
2991 |
-
|
2992 |
-
|
2993 |
-
|
2994 |
-
|
2995 |
-
special = jQuery.event.special[ event.type ] || {},
|
2996 |
-
handlerQueue = [];
|
2997 |
|
2998 |
// Use the fix-ed jQuery.Event rather than the (read-only) native event
|
2999 |
args[0] = event;
|
@@ -3004,81 +4643,142 @@ jQuery.event = {
|
|
3004 |
return;
|
3005 |
}
|
3006 |
|
3007 |
-
// Determine handlers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3008 |
// Avoid non-left-click bubbling in Firefox (#3861)
|
3009 |
-
if ( delegateCount && !
|
3010 |
|
3011 |
-
|
|
|
|
|
3012 |
|
3013 |
-
// Don't
|
3014 |
-
|
3015 |
-
|
3016 |
matches = [];
|
3017 |
for ( i = 0; i < delegateCount; i++ ) {
|
3018 |
handleObj = handlers[ i ];
|
3019 |
-
sel = handleObj.selector;
|
3020 |
|
3021 |
-
|
3022 |
-
|
|
|
|
|
|
|
3023 |
jQuery( sel, this ).index( cur ) >= 0 :
|
3024 |
jQuery.find( sel, this, null, [ cur ] ).length;
|
3025 |
}
|
3026 |
-
if (
|
3027 |
matches.push( handleObj );
|
3028 |
}
|
3029 |
}
|
3030 |
if ( matches.length ) {
|
3031 |
-
handlerQueue.push({ elem: cur,
|
3032 |
}
|
3033 |
}
|
3034 |
}
|
3035 |
}
|
3036 |
|
3037 |
// Add the remaining (directly-bound) handlers
|
3038 |
-
if ( handlers.length
|
3039 |
-
handlerQueue.push({ elem: this,
|
3040 |
}
|
3041 |
|
3042 |
-
|
3043 |
-
|
3044 |
-
matched = handlerQueue[ i ];
|
3045 |
-
event.currentTarget = matched.elem;
|
3046 |
|
3047 |
-
|
3048 |
-
|
|
|
|
|
3049 |
|
3050 |
-
|
3051 |
-
|
3052 |
-
|
|
|
|
|
3053 |
|
3054 |
-
|
3055 |
-
|
|
|
|
|
|
|
|
|
|
|
3056 |
|
3057 |
-
|
3058 |
-
.apply( matched.elem, args );
|
3059 |
|
3060 |
-
|
3061 |
-
|
3062 |
-
|
3063 |
-
|
3064 |
-
event.stopPropagation();
|
3065 |
-
}
|
3066 |
-
}
|
3067 |
-
}
|
3068 |
-
}
|
3069 |
}
|
3070 |
|
3071 |
-
//
|
3072 |
-
|
3073 |
-
|
|
|
3074 |
}
|
3075 |
|
3076 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3077 |
},
|
3078 |
|
3079 |
// Includes some event props shared by KeyEvent and MouseEvent
|
3080 |
-
|
3081 |
-
props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
|
3082 |
|
3083 |
fixHooks: {},
|
3084 |
|
@@ -3098,7 +4798,7 @@ jQuery.event = {
|
|
3098 |
mouseHooks: {
|
3099 |
props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
|
3100 |
filter: function( event, original ) {
|
3101 |
-
var eventDoc, doc,
|
3102 |
button = original.button,
|
3103 |
fromElement = original.fromElement;
|
3104 |
|
@@ -3127,64 +4827,58 @@ jQuery.event = {
|
|
3127 |
}
|
3128 |
},
|
3129 |
|
3130 |
-
fix: function( event ) {
|
3131 |
-
if ( event[ jQuery.expando ] ) {
|
3132 |
-
return event;
|
3133 |
-
}
|
3134 |
-
|
3135 |
-
// Create a writable copy of the event object and normalize some properties
|
3136 |
-
var i, prop,
|
3137 |
-
originalEvent = event,
|
3138 |
-
fixHook = jQuery.event.fixHooks[ event.type ] || {},
|
3139 |
-
copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
|
3140 |
-
|
3141 |
-
event = jQuery.Event( originalEvent );
|
3142 |
-
|
3143 |
-
for ( i = copy.length; i; ) {
|
3144 |
-
prop = copy[ --i ];
|
3145 |
-
event[ prop ] = originalEvent[ prop ];
|
3146 |
-
}
|
3147 |
-
|
3148 |
-
// Fix target property, if necessary (#1925, IE 6/7/8 & Safari2)
|
3149 |
-
if ( !event.target ) {
|
3150 |
-
event.target = originalEvent.srcElement || document;
|
3151 |
-
}
|
3152 |
-
|
3153 |
-
// Target should not be a text node (#504, Safari)
|
3154 |
-
if ( event.target.nodeType === 3 ) {
|
3155 |
-
event.target = event.target.parentNode;
|
3156 |
-
}
|
3157 |
-
|
3158 |
-
// For mouse/key events, metaKey==false if it's undefined (#3368, #11328; IE6/7/8)
|
3159 |
-
event.metaKey = !!event.metaKey;
|
3160 |
-
|
3161 |
-
return fixHook.filter? fixHook.filter( event, originalEvent ) : event;
|
3162 |
-
},
|
3163 |
-
|
3164 |
special: {
|
3165 |
load: {
|
3166 |
// Prevent triggered image.load events from bubbling to window.load
|
3167 |
noBubble: true
|
3168 |
},
|
3169 |
-
|
3170 |
focus: {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3171 |
delegateType: "focusin"
|
3172 |
},
|
3173 |
blur: {
|
|
|
|
|
|
|
|
|
|
|
|
|
3174 |
delegateType: "focusout"
|
3175 |
},
|
3176 |
-
|
3177 |
-
|
3178 |
-
|
3179 |
-
|
3180 |
-
|
3181 |
-
|
3182 |
}
|
3183 |
},
|
3184 |
|
3185 |
-
|
3186 |
-
|
3187 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3188 |
}
|
3189 |
}
|
3190 |
}
|
@@ -3197,7 +4891,8 @@ jQuery.event = {
|
|
3197 |
var e = jQuery.extend(
|
3198 |
new jQuery.Event(),
|
3199 |
event,
|
3200 |
-
{
|
|
|
3201 |
isSimulated: true,
|
3202 |
originalEvent: {}
|
3203 |
}
|
@@ -3213,10 +4908,6 @@ jQuery.event = {
|
|
3213 |
}
|
3214 |
};
|
3215 |
|
3216 |
-
// Some plugins are using, but it's undocumented/deprecated and will be removed.
|
3217 |
-
// The 1.7 special event interface should provide all the hooks needed now.
|
3218 |
-
jQuery.event.handle = jQuery.event.dispatch;
|
3219 |
-
|
3220 |
jQuery.removeEvent = document.removeEventListener ?
|
3221 |
function( elem, type, handle ) {
|
3222 |
if ( elem.removeEventListener ) {
|
@@ -3230,7 +4921,7 @@ jQuery.removeEvent = document.removeEventListener ?
|
|
3230 |
|
3231 |
// #8545, #7054, preventing memory leaks for custom events in IE6-8
|
3232 |
// detachEvent needed property on element, by name of that event, to properly expose it to GC
|
3233 |
-
if ( typeof elem[ name ] ===
|
3234 |
elem[ name ] = null;
|
3235 |
}
|
3236 |
|
@@ -3251,8 +4942,12 @@ jQuery.Event = function( src, props ) {
|
|
3251 |
|
3252 |
// Events bubbling up the document may have been marked as prevented
|
3253 |
// by a handler lower down the tree; reflect the correct value.
|
3254 |
-
this.isDefaultPrevented =
|
3255 |
-
|
|
|
|
|
|
|
|
|
3256 |
|
3257 |
// Event type
|
3258 |
} else {
|
@@ -3271,60 +4966,66 @@ jQuery.Event = function( src, props ) {
|
|
3271 |
this[ jQuery.expando ] = true;
|
3272 |
};
|
3273 |
|
3274 |
-
function returnFalse() {
|
3275 |
-
return false;
|
3276 |
-
}
|
3277 |
-
function returnTrue() {
|
3278 |
-
return true;
|
3279 |
-
}
|
3280 |
-
|
3281 |
// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
|
3282 |
// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
|
3283 |
jQuery.Event.prototype = {
|
3284 |
-
|
3285 |
-
|
|
|
3286 |
|
|
|
3287 |
var e = this.originalEvent;
|
|
|
|
|
3288 |
if ( !e ) {
|
3289 |
return;
|
3290 |
}
|
3291 |
|
3292 |
-
//
|
3293 |
if ( e.preventDefault ) {
|
3294 |
e.preventDefault();
|
3295 |
|
3296 |
-
//
|
|
|
3297 |
} else {
|
3298 |
e.returnValue = false;
|
3299 |
}
|
3300 |
},
|
3301 |
stopPropagation: function() {
|
3302 |
-
this.isPropagationStopped = returnTrue;
|
3303 |
-
|
3304 |
var e = this.originalEvent;
|
|
|
|
|
3305 |
if ( !e ) {
|
3306 |
return;
|
3307 |
}
|
3308 |
-
//
|
3309 |
if ( e.stopPropagation ) {
|
3310 |
e.stopPropagation();
|
3311 |
}
|
3312 |
-
|
|
|
|
|
3313 |
e.cancelBubble = true;
|
3314 |
},
|
3315 |
stopImmediatePropagation: function() {
|
|
|
|
|
3316 |
this.isImmediatePropagationStopped = returnTrue;
|
|
|
|
|
|
|
|
|
|
|
3317 |
this.stopPropagation();
|
3318 |
-
}
|
3319 |
-
isDefaultPrevented: returnFalse,
|
3320 |
-
isPropagationStopped: returnFalse,
|
3321 |
-
isImmediatePropagationStopped: returnFalse
|
3322 |
};
|
3323 |
|
3324 |
// Create mouseenter/leave events using mouseover/out and event-time checks
|
3325 |
jQuery.each({
|
3326 |
mouseenter: "mouseover",
|
3327 |
-
mouseleave: "mouseout"
|
|
|
|
|
3328 |
}, function( orig, fix ) {
|
3329 |
jQuery.event.special[ orig ] = {
|
3330 |
delegateType: fix,
|
@@ -3334,8 +5035,7 @@ jQuery.each({
|
|
3334 |
var ret,
|
3335 |
target = this,
|
3336 |
related = event.relatedTarget,
|
3337 |
-
handleObj = event.handleObj
|
3338 |
-
selector = handleObj.selector;
|
3339 |
|
3340 |
// For mousenter/leave call the handler if related is outside the target.
|
3341 |
// NB: No relatedTarget if the mouse left/entered the browser window
|
@@ -3350,7 +5050,7 @@ jQuery.each({
|
|
3350 |
});
|
3351 |
|
3352 |
// IE submit delegation
|
3353 |
-
if ( !
|
3354 |
|
3355 |
jQuery.event.special.submit = {
|
3356 |
setup: function() {
|
@@ -3364,11 +5064,11 @@ if ( !jQuery.support.submitBubbles ) {
|
|
3364 |
// Node name check avoids a VML-related crash in IE (#9807)
|
3365 |
var elem = e.target,
|
3366 |
form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
|
3367 |
-
if ( form && !jQuery._data( form, "
|
3368 |
jQuery.event.add( form, "submit._submit", function( event ) {
|
3369 |
event._submit_bubble = true;
|
3370 |
});
|
3371 |
-
jQuery._data( form, "
|
3372 |
}
|
3373 |
});
|
3374 |
// return undefined since we don't need an event listener
|
@@ -3397,7 +5097,7 @@ if ( !jQuery.support.submitBubbles ) {
|
|
3397 |
}
|
3398 |
|
3399 |
// IE change delegation and checkbox/radio fix
|
3400 |
-
if ( !
|
3401 |
|
3402 |
jQuery.event.special.change = {
|
3403 |
|
@@ -3427,13 +5127,13 @@ if ( !jQuery.support.changeBubbles ) {
|
|
3427 |
jQuery.event.add( this, "beforeactivate._change", function( e ) {
|
3428 |
var elem = e.target;
|
3429 |
|
3430 |
-
if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "
|
3431 |
jQuery.event.add( elem, "change._change", function( event ) {
|
3432 |
if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
|
3433 |
jQuery.event.simulate( "change", this.parentNode, event, true );
|
3434 |
}
|
3435 |
});
|
3436 |
-
jQuery._data( elem, "
|
3437 |
}
|
3438 |
});
|
3439 |
},
|
@@ -3456,24 +5156,33 @@ if ( !jQuery.support.changeBubbles ) {
|
|
3456 |
}
|
3457 |
|
3458 |
// Create "bubbling" focus and blur events
|
3459 |
-
if ( !
|
3460 |
jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
|
3461 |
|
3462 |
-
// Attach a single capturing handler while someone wants focusin/focusout
|
3463 |
-
var
|
3464 |
-
handler = function( event ) {
|
3465 |
jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
|
3466 |
};
|
3467 |
|
3468 |
jQuery.event.special[ fix ] = {
|
3469 |
setup: function() {
|
3470 |
-
|
3471 |
-
|
|
|
|
|
|
|
3472 |
}
|
|
|
3473 |
},
|
3474 |
teardown: function() {
|
3475 |
-
|
3476 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
3477 |
}
|
3478 |
}
|
3479 |
};
|
@@ -3483,12 +5192,12 @@ if ( !jQuery.support.focusinBubbles ) {
|
|
3483 |
jQuery.fn.extend({
|
3484 |
|
3485 |
on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
|
3486 |
-
var
|
3487 |
|
3488 |
// Types can be a map of types/handlers
|
3489 |
if ( typeof types === "object" ) {
|
3490 |
// ( types-Object, selector, data )
|
3491 |
-
if ( typeof selector !== "string" ) {
|
3492 |
// ( types-Object, data )
|
3493 |
data = data || selector;
|
3494 |
selector = undefined;
|
@@ -3570,3730 +5279,3315 @@ jQuery.fn.extend({
|
|
3570 |
});
|
3571 |
},
|
3572 |
|
3573 |
-
bind: function( types, data, fn ) {
|
3574 |
-
return this.on( types, null, data, fn );
|
3575 |
-
},
|
3576 |
-
unbind: function( types, fn ) {
|
3577 |
-
return this.off( types, null, fn );
|
3578 |
-
},
|
3579 |
-
|
3580 |
-
live: function( types, data, fn ) {
|
3581 |
-
jQuery( this.context ).on( types, this.selector, data, fn );
|
3582 |
-
return this;
|
3583 |
-
},
|
3584 |
-
die: function( types, fn ) {
|
3585 |
-
jQuery( this.context ).off( types, this.selector || "**", fn );
|
3586 |
-
return this;
|
3587 |
-
},
|
3588 |
-
|
3589 |
-
delegate: function( selector, types, data, fn ) {
|
3590 |
-
return this.on( types, selector, data, fn );
|
3591 |
-
},
|
3592 |
-
undelegate: function( selector, types, fn ) {
|
3593 |
-
// ( namespace ) or ( selector, types [, fn] )
|
3594 |
-
return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
|
3595 |
-
},
|
3596 |
-
|
3597 |
trigger: function( type, data ) {
|
3598 |
return this.each(function() {
|
3599 |
jQuery.event.trigger( type, data, this );
|
3600 |
});
|
3601 |
},
|
3602 |
triggerHandler: function( type, data ) {
|
3603 |
-
|
3604 |
-
|
3605 |
-
|
3606 |
-
},
|
3607 |
-
|
3608 |
-
toggle: function( fn ) {
|
3609 |
-
// Save reference to arguments for access in closure
|
3610 |
-
var args = arguments,
|
3611 |
-
guid = fn.guid || jQuery.guid++,
|
3612 |
-
i = 0,
|
3613 |
-
toggler = function( event ) {
|
3614 |
-
// Figure out which function to execute
|
3615 |
-
var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
|
3616 |
-
jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
|
3617 |
-
|
3618 |
-
// Make sure that clicks stop
|
3619 |
-
event.preventDefault();
|
3620 |
-
|
3621 |
-
// and execute the function
|
3622 |
-
return args[ lastToggle ].apply( this, arguments ) || false;
|
3623 |
-
};
|
3624 |
-
|
3625 |
-
// link all the functions, so any of them can unbind this click handler
|
3626 |
-
toggler.guid = guid;
|
3627 |
-
while ( i < args.length ) {
|
3628 |
-
args[ i++ ].guid = guid;
|
3629 |
}
|
3630 |
-
|
3631 |
-
return this.click( toggler );
|
3632 |
-
},
|
3633 |
-
|
3634 |
-
hover: function( fnOver, fnOut ) {
|
3635 |
-
return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
|
3636 |
}
|
3637 |
});
|
3638 |
|
3639 |
-
jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
|
3640 |
-
"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
|
3641 |
-
"change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
|
3642 |
-
|
3643 |
-
// Handle event binding
|
3644 |
-
jQuery.fn[ name ] = function( data, fn ) {
|
3645 |
-
if ( fn == null ) {
|
3646 |
-
fn = data;
|
3647 |
-
data = null;
|
3648 |
-
}
|
3649 |
-
|
3650 |
-
return arguments.length > 0 ?
|
3651 |
-
this.on( name, null, data, fn ) :
|
3652 |
-
this.trigger( name );
|
3653 |
-
};
|
3654 |
|
3655 |
-
|
3656 |
-
|
3657 |
-
|
3658 |
|
3659 |
-
if (
|
3660 |
-
|
|
|
|
|
|
|
|
|
3661 |
}
|
3662 |
-
|
3663 |
-
|
3664 |
-
* Sizzle CSS Selector Engine
|
3665 |
-
* Copyright 2012 jQuery Foundation and other contributors
|
3666 |
-
* Released under the MIT license
|
3667 |
-
* http://sizzlejs.com/
|
3668 |
-
*/
|
3669 |
-
(function( window, undefined ) {
|
3670 |
-
|
3671 |
-
var cachedruns,
|
3672 |
-
assertGetIdNotName,
|
3673 |
-
Expr,
|
3674 |
-
getText,
|
3675 |
-
isXML,
|
3676 |
-
contains,
|
3677 |
-
compile,
|
3678 |
-
sortOrder,
|
3679 |
-
hasDuplicate,
|
3680 |
-
outermostContext,
|
3681 |
|
3682 |
-
|
3683 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3684 |
|
3685 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3686 |
|
3687 |
-
|
3688 |
-
|
3689 |
-
|
3690 |
-
dirruns = 0,
|
3691 |
-
done = 0,
|
3692 |
-
pop = [].pop,
|
3693 |
-
push = [].push,
|
3694 |
-
slice = [].slice,
|
3695 |
-
// Use a stripped-down indexOf if a native one is unavailable
|
3696 |
-
indexOf = [].indexOf || function( elem ) {
|
3697 |
-
var i = 0,
|
3698 |
-
len = this.length;
|
3699 |
-
for ( ; i < len; i++ ) {
|
3700 |
-
if ( this[i] === elem ) {
|
3701 |
-
return i;
|
3702 |
-
}
|
3703 |
-
}
|
3704 |
-
return -1;
|
3705 |
},
|
|
|
|
|
3706 |
|
3707 |
-
|
3708 |
-
|
3709 |
-
|
3710 |
-
return fn;
|
3711 |
-
},
|
3712 |
|
3713 |
-
|
3714 |
-
|
3715 |
-
|
|
|
|
|
|
|
3716 |
|
3717 |
-
|
3718 |
-
|
3719 |
-
if (
|
3720 |
-
|
|
|
|
|
3721 |
}
|
|
|
|
|
3722 |
|
3723 |
-
|
3724 |
-
|
3725 |
-
|
3726 |
-
|
3727 |
-
|
3728 |
-
classCache = createCache(),
|
3729 |
-
tokenCache = createCache(),
|
3730 |
-
compilerCache = createCache(),
|
3731 |
-
|
3732 |
-
// Regex
|
3733 |
|
3734 |
-
|
3735 |
-
|
3736 |
-
|
3737 |
-
|
|
|
|
|
3738 |
|
3739 |
-
|
3740 |
-
|
3741 |
-
|
3742 |
-
|
|
|
3743 |
|
3744 |
-
|
3745 |
-
|
3746 |
-
|
3747 |
-
|
3748 |
|
3749 |
-
|
3750 |
-
|
3751 |
-
|
3752 |
-
|
3753 |
-
|
3754 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3755 |
|
3756 |
-
|
3757 |
-
|
3758 |
-
|
|
|
|
|
|
|
|
|
|
|
3759 |
|
3760 |
-
|
3761 |
-
rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
|
3762 |
|
3763 |
-
|
3764 |
-
|
3765 |
-
|
3766 |
|
3767 |
-
|
3768 |
-
|
|
|
|
|
3769 |
|
3770 |
-
|
3771 |
-
|
3772 |
-
|
3773 |
|
3774 |
-
|
3775 |
-
|
|
|
|
|
|
|
|
|
3776 |
|
3777 |
-
|
|
|
|
|
|
|
|
|
3778 |
|
3779 |
-
|
3780 |
-
|
3781 |
-
"CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
|
3782 |
-
"NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ),
|
3783 |
-
"TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
|
3784 |
-
"ATTR": new RegExp( "^" + attributes ),
|
3785 |
-
"PSEUDO": new RegExp( "^" + pseudos ),
|
3786 |
-
"POS": new RegExp( pos, "i" ),
|
3787 |
-
"CHILD": new RegExp( "^:(only|nth|first|last)-child(?:\\(" + whitespace +
|
3788 |
-
"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
|
3789 |
-
"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
|
3790 |
-
// For use in libraries implementing .is()
|
3791 |
-
"needsContext": new RegExp( "^" + whitespace + "*[>+~]|" + pos, "i" )
|
3792 |
-
},
|
3793 |
|
3794 |
-
//
|
|
|
|
|
|
|
3795 |
|
3796 |
-
|
3797 |
-
assert = function( fn ) {
|
3798 |
-
var div = document.createElement("div");
|
3799 |
|
3800 |
-
|
3801 |
-
|
3802 |
-
|
3803 |
-
return false;
|
3804 |
-
} finally {
|
3805 |
-
// release memory in IE
|
3806 |
-
div = null;
|
3807 |
-
}
|
3808 |
-
},
|
3809 |
|
3810 |
-
|
3811 |
-
|
3812 |
-
div.appendChild( document.createComment("") );
|
3813 |
-
return !div.getElementsByTagName("*").length;
|
3814 |
-
}),
|
3815 |
-
|
3816 |
-
// Check if getAttribute returns normalized href attributes
|
3817 |
-
assertHrefNotNormalized = assert(function( div ) {
|
3818 |
-
div.innerHTML = "<a href='#'></a>";
|
3819 |
-
return div.firstChild && typeof div.firstChild.getAttribute !== strundefined &&
|
3820 |
-
div.firstChild.getAttribute("href") === "#";
|
3821 |
-
}),
|
3822 |
-
|
3823 |
-
// Check if attributes should be retrieved by attribute nodes
|
3824 |
-
assertAttributes = assert(function( div ) {
|
3825 |
-
div.innerHTML = "<select></select>";
|
3826 |
-
var type = typeof div.lastChild.getAttribute("multiple");
|
3827 |
-
// IE8 returns a string for some attributes even when not present
|
3828 |
-
return type !== "boolean" && type !== "string";
|
3829 |
-
}),
|
3830 |
-
|
3831 |
-
// Check if getElementsByClassName can be trusted
|
3832 |
-
assertUsableClassName = assert(function( div ) {
|
3833 |
-
// Opera can't find a second classname (in 9.6)
|
3834 |
-
div.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>";
|
3835 |
-
if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) {
|
3836 |
-
return false;
|
3837 |
}
|
3838 |
|
3839 |
-
//
|
3840 |
-
|
3841 |
-
|
3842 |
-
}),
|
3843 |
|
3844 |
-
//
|
3845 |
-
|
3846 |
-
|
3847 |
-
|
3848 |
-
div.id = expando + 0;
|
3849 |
-
div.innerHTML = "<a name='" + expando + "'></a><div name='" + expando + "'></div>";
|
3850 |
-
docElem.insertBefore( div, docElem.firstChild );
|
3851 |
-
|
3852 |
-
// Test
|
3853 |
-
var pass = document.getElementsByName &&
|
3854 |
-
// buggy browsers will return fewer than the correct 2
|
3855 |
-
document.getElementsByName( expando ).length === 2 +
|
3856 |
-
// buggy browsers will return more than the correct 0
|
3857 |
-
document.getElementsByName( expando + 0 ).length;
|
3858 |
-
assertGetIdNotName = !document.getElementById( expando );
|
3859 |
-
|
3860 |
-
// Cleanup
|
3861 |
-
docElem.removeChild( div );
|
3862 |
-
|
3863 |
-
return pass;
|
3864 |
-
});
|
3865 |
|
3866 |
-
//
|
3867 |
-
|
3868 |
-
|
3869 |
-
|
3870 |
-
|
3871 |
-
var elem,
|
3872 |
-
results = [];
|
3873 |
-
for ( ; (elem = this[i]); i++ ) {
|
3874 |
-
results.push( elem );
|
3875 |
}
|
3876 |
-
return results;
|
3877 |
-
};
|
3878 |
-
}
|
3879 |
-
|
3880 |
-
function Sizzle( selector, context, results, seed ) {
|
3881 |
-
results = results || [];
|
3882 |
-
context = context || document;
|
3883 |
-
var match, elem, xml, m,
|
3884 |
-
nodeType = context.nodeType;
|
3885 |
|
3886 |
-
|
3887 |
-
|
3888 |
-
|
|
|
|
|
|
|
|
|
3889 |
|
3890 |
-
if (
|
3891 |
-
|
3892 |
-
|
|
|
3893 |
|
3894 |
-
|
3895 |
|
3896 |
-
|
3897 |
-
|
3898 |
-
|
3899 |
-
|
3900 |
-
|
3901 |
-
elem = context.getElementById( m );
|
3902 |
-
// Check parentNode to catch when Blackberry 4.6 returns
|
3903 |
-
// nodes that are no longer in the document #6963
|
3904 |
-
if ( elem && elem.parentNode ) {
|
3905 |
-
// Handle the case where IE, Opera, and Webkit return items
|
3906 |
-
// by name instead of ID
|
3907 |
-
if ( elem.id === m ) {
|
3908 |
-
results.push( elem );
|
3909 |
-
return results;
|
3910 |
-
}
|
3911 |
-
} else {
|
3912 |
-
return results;
|
3913 |
-
}
|
3914 |
-
} else {
|
3915 |
-
// Context is not a document
|
3916 |
-
if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
|
3917 |
-
contains( context, elem ) && elem.id === m ) {
|
3918 |
-
results.push( elem );
|
3919 |
-
return results;
|
3920 |
-
}
|
3921 |
-
}
|
3922 |
|
3923 |
-
|
3924 |
-
|
3925 |
-
|
3926 |
-
|
3927 |
|
3928 |
-
|
3929 |
-
|
3930 |
-
|
3931 |
-
|
3932 |
-
}
|
3933 |
-
}
|
3934 |
}
|
3935 |
-
|
3936 |
-
// All others
|
3937 |
-
return select( selector.replace( rtrim, "$1" ), context, results, seed, xml );
|
3938 |
}
|
3939 |
|
3940 |
-
|
3941 |
-
|
3942 |
-
|
|
|
3943 |
|
3944 |
-
|
3945 |
-
|
3946 |
-
};
|
3947 |
|
3948 |
-
//
|
3949 |
-
|
3950 |
-
|
3951 |
-
|
3952 |
-
|
3953 |
-
};
|
3954 |
-
}
|
3955 |
|
3956 |
-
|
3957 |
-
|
3958 |
-
return function( elem ) {
|
3959 |
-
var name = elem.nodeName.toLowerCase();
|
3960 |
-
return (name === "input" || name === "button") && elem.type === type;
|
3961 |
-
};
|
3962 |
-
}
|
3963 |
|
3964 |
-
//
|
3965 |
-
|
3966 |
-
|
3967 |
-
argument = +argument;
|
3968 |
-
return markFunction(function( seed, matches ) {
|
3969 |
-
var j,
|
3970 |
-
matchIndexes = fn( [], seed.length, argument ),
|
3971 |
-
i = matchIndexes.length;
|
3972 |
|
3973 |
-
//
|
3974 |
-
|
3975 |
-
|
3976 |
-
|
|
|
3977 |
}
|
3978 |
}
|
3979 |
-
}
|
3980 |
-
});
|
3981 |
-
}
|
3982 |
|
3983 |
-
|
3984 |
-
|
3985 |
-
|
3986 |
-
|
3987 |
-
|
3988 |
-
var node,
|
3989 |
-
ret = "",
|
3990 |
-
i = 0,
|
3991 |
-
nodeType = elem.nodeType;
|
3992 |
|
3993 |
-
|
3994 |
-
|
3995 |
-
// Use textContent for elements
|
3996 |
-
// innerText usage removed for consistency of new lines (see #11153)
|
3997 |
-
if ( typeof elem.textContent === "string" ) {
|
3998 |
-
return elem.textContent;
|
3999 |
-
} else {
|
4000 |
-
// Traverse its children
|
4001 |
-
for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
|
4002 |
-
ret += getText( elem );
|
4003 |
}
|
|
|
|
|
4004 |
}
|
4005 |
-
} else if ( nodeType === 3 || nodeType === 4 ) {
|
4006 |
-
return elem.nodeValue;
|
4007 |
}
|
4008 |
-
// Do not include comment or processing instruction nodes
|
4009 |
-
} else {
|
4010 |
|
4011 |
-
//
|
4012 |
-
|
4013 |
-
|
4014 |
-
|
4015 |
}
|
4016 |
-
}
|
4017 |
-
return ret;
|
4018 |
-
};
|
4019 |
|
4020 |
-
|
4021 |
-
// documentElement is verified for cases where it doesn't yet exist
|
4022 |
-
// (such as loading iframes in IE - #4833)
|
4023 |
-
var documentElement = elem && (elem.ownerDocument || elem).documentElement;
|
4024 |
-
return documentElement ? documentElement.nodeName !== "HTML" : false;
|
4025 |
-
};
|
4026 |
|
4027 |
-
//
|
4028 |
-
|
4029 |
-
|
4030 |
-
var adown = a.nodeType === 9 ? a.documentElement : a,
|
4031 |
-
bup = b && b.parentNode;
|
4032 |
-
return a === bup || !!( bup && bup.nodeType === 1 && adown.contains && adown.contains(bup) );
|
4033 |
-
} :
|
4034 |
-
docElem.compareDocumentPosition ?
|
4035 |
-
function( a, b ) {
|
4036 |
-
return b && !!( a.compareDocumentPosition( b ) & 16 );
|
4037 |
-
} :
|
4038 |
-
function( a, b ) {
|
4039 |
-
while ( (b = b.parentNode) ) {
|
4040 |
-
if ( b === a ) {
|
4041 |
-
return true;
|
4042 |
-
}
|
4043 |
-
}
|
4044 |
-
return false;
|
4045 |
-
};
|
4046 |
|
4047 |
-
|
4048 |
-
|
4049 |
-
|
|
|
4050 |
|
4051 |
-
|
4052 |
-
|
4053 |
-
}
|
4054 |
-
if ( (val = Expr.attrHandle[ name ]) ) {
|
4055 |
-
return val( elem );
|
4056 |
-
}
|
4057 |
-
if ( xml || assertAttributes ) {
|
4058 |
-
return elem.getAttribute( name );
|
4059 |
-
}
|
4060 |
-
val = elem.getAttributeNode( name );
|
4061 |
-
return val ?
|
4062 |
-
typeof elem[ name ] === "boolean" ?
|
4063 |
-
elem[ name ] ? name : null :
|
4064 |
-
val.specified ? val.value : null :
|
4065 |
-
null;
|
4066 |
-
};
|
4067 |
|
4068 |
-
|
|
|
4069 |
|
4070 |
-
|
4071 |
-
|
4072 |
|
4073 |
-
|
4074 |
|
4075 |
-
|
|
|
|
|
4076 |
|
4077 |
-
|
4078 |
-
|
4079 |
-
|
4080 |
-
{
|
4081 |
-
"href": function( elem ) {
|
4082 |
-
return elem.getAttribute( "href", 2 );
|
4083 |
-
},
|
4084 |
-
"type": function( elem ) {
|
4085 |
-
return elem.getAttribute("type");
|
4086 |
-
}
|
4087 |
-
},
|
4088 |
|
4089 |
-
|
4090 |
-
|
4091 |
-
|
4092 |
-
if ( typeof context.getElementById !== strundefined && !xml ) {
|
4093 |
-
var m = context.getElementById( id );
|
4094 |
-
// Check parentNode to catch when Blackberry 4.6 returns
|
4095 |
-
// nodes that are no longer in the document #6963
|
4096 |
-
return m && m.parentNode ? [m] : [];
|
4097 |
-
}
|
4098 |
-
} :
|
4099 |
-
function( id, context, xml ) {
|
4100 |
-
if ( typeof context.getElementById !== strundefined && !xml ) {
|
4101 |
-
var m = context.getElementById( id );
|
4102 |
-
|
4103 |
-
return m ?
|
4104 |
-
m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ?
|
4105 |
-
[m] :
|
4106 |
-
undefined :
|
4107 |
-
[];
|
4108 |
-
}
|
4109 |
-
},
|
4110 |
|
4111 |
-
|
4112 |
-
|
4113 |
-
|
4114 |
-
return context.getElementsByTagName( tag );
|
4115 |
-
}
|
4116 |
-
} :
|
4117 |
-
function( tag, context ) {
|
4118 |
-
var results = context.getElementsByTagName( tag );
|
4119 |
|
4120 |
-
|
4121 |
-
if ( tag === "*" ) {
|
4122 |
-
var elem,
|
4123 |
-
tmp = [],
|
4124 |
-
i = 0;
|
4125 |
|
4126 |
-
|
4127 |
-
|
4128 |
-
|
4129 |
-
|
4130 |
}
|
4131 |
|
4132 |
-
|
4133 |
-
|
4134 |
-
|
4135 |
-
|
4136 |
|
4137 |
-
|
4138 |
-
|
4139 |
-
return context.getElementsByName( name );
|
4140 |
-
}
|
4141 |
-
},
|
4142 |
|
4143 |
-
|
4144 |
-
|
4145 |
-
|
4146 |
-
|
4147 |
-
|
4148 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4149 |
|
4150 |
-
|
4151 |
-
">": { dir: "parentNode", first: true },
|
4152 |
-
" ": { dir: "parentNode" },
|
4153 |
-
"+": { dir: "previousSibling", first: true },
|
4154 |
-
"~": { dir: "previousSibling" }
|
4155 |
-
},
|
4156 |
|
4157 |
-
|
4158 |
-
|
4159 |
-
match[1] = match[1].replace( rbackslash, "" );
|
4160 |
|
4161 |
-
|
4162 |
-
|
|
|
|
|
4163 |
|
4164 |
-
|
4165 |
-
|
|
|
4166 |
}
|
|
|
4167 |
|
4168 |
-
|
4169 |
-
|
4170 |
-
|
4171 |
-
|
4172 |
-
/* matches from matchExpr["CHILD"]
|
4173 |
-
1 type (only|nth|...)
|
4174 |
-
2 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
|
4175 |
-
3 xn-component of xn+y argument ([+-]?\d*n|)
|
4176 |
-
4 sign of xn-component
|
4177 |
-
5 x of xn-component
|
4178 |
-
6 sign of y-component
|
4179 |
-
7 y of y-component
|
4180 |
-
*/
|
4181 |
-
match[1] = match[1].toLowerCase();
|
4182 |
|
4183 |
-
|
4184 |
-
|
4185 |
-
|
4186 |
-
|
4187 |
-
|
4188 |
|
4189 |
-
|
4190 |
-
|
4191 |
-
match[3] = +( match[3] ? match[4] + (match[5] || 1) : 2 * ( match[2] === "even" || match[2] === "odd" ) );
|
4192 |
-
match[4] = +( ( match[6] + match[7] ) || match[2] === "odd" );
|
4193 |
|
4194 |
-
//
|
4195 |
-
|
4196 |
-
|
|
|
4197 |
}
|
4198 |
|
4199 |
-
|
4200 |
-
},
|
4201 |
|
4202 |
-
|
4203 |
-
|
4204 |
-
|
4205 |
-
|
|
|
|
|
4206 |
}
|
4207 |
|
4208 |
-
|
4209 |
-
|
4210 |
-
|
4211 |
-
|
4212 |
-
|
4213 |
-
|
4214 |
-
|
4215 |
-
// advance to the next closing parenthesis
|
4216 |
-
(excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
|
4217 |
-
|
4218 |
-
// excess is a negative index
|
4219 |
-
unquoted = unquoted.slice( 0, excess );
|
4220 |
-
match[0] = match[0].slice( 0, excess );
|
4221 |
}
|
4222 |
-
match[2] = unquoted;
|
4223 |
}
|
4224 |
-
|
4225 |
-
// Return only captures needed by the pseudo filter method (type and argument)
|
4226 |
-
return match.slice( 0, 3 );
|
4227 |
}
|
4228 |
-
},
|
4229 |
-
|
4230 |
-
filter: {
|
4231 |
-
"ID": assertGetIdNotName ?
|
4232 |
-
function( id ) {
|
4233 |
-
id = id.replace( rbackslash, "" );
|
4234 |
-
return function( elem ) {
|
4235 |
-
return elem.getAttribute("id") === id;
|
4236 |
-
};
|
4237 |
-
} :
|
4238 |
-
function( id ) {
|
4239 |
-
id = id.replace( rbackslash, "" );
|
4240 |
-
return function( elem ) {
|
4241 |
-
var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
|
4242 |
-
return node && node.value === id;
|
4243 |
-
};
|
4244 |
-
},
|
4245 |
-
|
4246 |
-
"TAG": function( nodeName ) {
|
4247 |
-
if ( nodeName === "*" ) {
|
4248 |
-
return function() { return true; };
|
4249 |
-
}
|
4250 |
-
nodeName = nodeName.replace( rbackslash, "" ).toLowerCase();
|
4251 |
-
|
4252 |
-
return function( elem ) {
|
4253 |
-
return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
|
4254 |
-
};
|
4255 |
-
},
|
4256 |
-
|
4257 |
-
"CLASS": function( className ) {
|
4258 |
-
var pattern = classCache[ expando ][ className + " " ];
|
4259 |
-
|
4260 |
-
return pattern ||
|
4261 |
-
(pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
|
4262 |
-
classCache( className, function( elem ) {
|
4263 |
-
return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" );
|
4264 |
-
});
|
4265 |
-
},
|
4266 |
-
|
4267 |
-
"ATTR": function( name, operator, check ) {
|
4268 |
-
return function( elem, context ) {
|
4269 |
-
var result = Sizzle.attr( elem, name );
|
4270 |
|
4271 |
-
|
4272 |
-
return operator === "!=";
|
4273 |
-
}
|
4274 |
-
if ( !operator ) {
|
4275 |
-
return true;
|
4276 |
-
}
|
4277 |
|
4278 |
-
|
|
|
4279 |
|
4280 |
-
|
4281 |
-
|
4282 |
-
|
4283 |
-
|
4284 |
-
|
4285 |
-
|
4286 |
-
|
4287 |
-
false;
|
4288 |
-
};
|
4289 |
-
},
|
4290 |
|
4291 |
-
|
|
|
4292 |
|
4293 |
-
|
4294 |
-
|
4295 |
-
var node, diff,
|
4296 |
-
parent = elem.parentNode;
|
4297 |
|
4298 |
-
|
4299 |
-
|
4300 |
-
|
|
|
|
|
4301 |
|
4302 |
-
|
4303 |
-
|
4304 |
-
|
4305 |
-
if ( node.nodeType === 1 ) {
|
4306 |
-
diff++;
|
4307 |
-
if ( elem === node ) {
|
4308 |
-
break;
|
4309 |
-
}
|
4310 |
}
|
4311 |
}
|
4312 |
}
|
4313 |
|
4314 |
-
//
|
4315 |
-
|
4316 |
-
return diff === first || ( diff % first === 0 && diff / first >= 0 );
|
4317 |
-
};
|
4318 |
-
}
|
4319 |
|
4320 |
-
|
4321 |
-
var node = elem;
|
4322 |
-
|
4323 |
-
switch ( type ) {
|
4324 |
-
case "only":
|
4325 |
-
case "first":
|
4326 |
-
while ( (node = node.previousSibling) ) {
|
4327 |
-
if ( node.nodeType === 1 ) {
|
4328 |
-
return false;
|
4329 |
-
}
|
4330 |
-
}
|
4331 |
|
4332 |
-
|
4333 |
-
|
4334 |
-
|
|
|
|
|
4335 |
|
4336 |
-
|
|
|
4337 |
|
4338 |
-
|
4339 |
-
|
4340 |
-
while ( (node = node.nextSibling) ) {
|
4341 |
-
if ( node.nodeType === 1 ) {
|
4342 |
-
return false;
|
4343 |
-
}
|
4344 |
}
|
4345 |
|
4346 |
-
|
|
|
4347 |
}
|
4348 |
-
}
|
4349 |
-
}
|
|
|
|
|
4350 |
|
4351 |
-
|
4352 |
-
|
4353 |
-
|
4354 |
-
|
4355 |
-
|
4356 |
-
|
4357 |
-
|
4358 |
-
|
4359 |
|
4360 |
-
|
4361 |
-
|
4362 |
-
|
4363 |
-
|
4364 |
-
|
4365 |
}
|
|
|
|
|
4366 |
|
4367 |
-
|
4368 |
-
|
4369 |
-
|
4370 |
-
|
4371 |
-
|
4372 |
-
var idx,
|
4373 |
-
matched = fn( seed, argument ),
|
4374 |
-
i = matched.length;
|
4375 |
-
while ( i-- ) {
|
4376 |
-
idx = indexOf.call( seed, matched[i] );
|
4377 |
-
seed[ idx ] = !( matches[ idx ] = matched[i] );
|
4378 |
-
}
|
4379 |
-
}) :
|
4380 |
-
function( elem ) {
|
4381 |
-
return fn( elem, 0, args );
|
4382 |
-
};
|
4383 |
}
|
4384 |
-
|
4385 |
-
return fn;
|
4386 |
-
}
|
4387 |
},
|
4388 |
|
4389 |
-
|
4390 |
-
|
4391 |
-
|
4392 |
-
|
4393 |
-
|
4394 |
-
|
4395 |
-
|
4396 |
-
matcher = compile( selector.replace( rtrim, "$1" ) );
|
4397 |
-
|
4398 |
-
return matcher[ expando ] ?
|
4399 |
-
markFunction(function( seed, matches, context, xml ) {
|
4400 |
-
var elem,
|
4401 |
-
unmatched = matcher( seed, null, xml, [] ),
|
4402 |
-
i = seed.length;
|
4403 |
-
|
4404 |
-
// Match elements unmatched by `matcher`
|
4405 |
-
while ( i-- ) {
|
4406 |
-
if ( (elem = unmatched[i]) ) {
|
4407 |
-
seed[i] = !(matches[i] = elem);
|
4408 |
-
}
|
4409 |
-
}
|
4410 |
-
}) :
|
4411 |
-
function( elem, context, xml ) {
|
4412 |
-
input[0] = elem;
|
4413 |
-
matcher( input, null, xml, results );
|
4414 |
-
return !results.pop();
|
4415 |
-
};
|
4416 |
-
}),
|
4417 |
-
|
4418 |
-
"has": markFunction(function( selector ) {
|
4419 |
-
return function( elem ) {
|
4420 |
-
return Sizzle( selector, elem ).length > 0;
|
4421 |
-
};
|
4422 |
-
}),
|
4423 |
|
4424 |
-
|
4425 |
-
|
4426 |
-
|
4427 |
-
|
4428 |
-
|
|
|
|
|
4429 |
|
4430 |
-
|
4431 |
-
|
4432 |
-
|
|
|
4433 |
|
4434 |
-
|
4435 |
-
return elem.disabled === true;
|
4436 |
-
},
|
4437 |
|
4438 |
-
|
4439 |
-
|
4440 |
-
|
4441 |
-
var nodeName = elem.nodeName.toLowerCase();
|
4442 |
-
return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
|
4443 |
-
},
|
4444 |
|
4445 |
-
"selected": function( elem ) {
|
4446 |
-
// Accessing this property makes selected-by-default
|
4447 |
-
// options in Safari work properly
|
4448 |
if ( elem.parentNode ) {
|
4449 |
-
elem.
|
|
|
|
|
|
|
4450 |
}
|
|
|
4451 |
|
4452 |
-
|
4453 |
-
|
4454 |
|
4455 |
-
|
4456 |
-
|
4457 |
-
|
4458 |
|
4459 |
-
|
4460 |
-
//
|
4461 |
-
|
4462 |
-
|
4463 |
-
// Thanks to Diego Perini for the nodeName shortcut
|
4464 |
-
// Greater than "@" means alpha characters (specifically not starting with "#" or "?")
|
4465 |
-
var nodeType;
|
4466 |
-
elem = elem.firstChild;
|
4467 |
-
while ( elem ) {
|
4468 |
-
if ( elem.nodeName > "@" || (nodeType = elem.nodeType) === 3 || nodeType === 4 ) {
|
4469 |
-
return false;
|
4470 |
-
}
|
4471 |
-
elem = elem.nextSibling;
|
4472 |
}
|
4473 |
-
return true;
|
4474 |
-
},
|
4475 |
|
4476 |
-
|
4477 |
-
|
4478 |
-
|
|
|
4479 |
|
4480 |
-
|
4481 |
-
|
4482 |
-
|
4483 |
-
|
4484 |
-
|
4485 |
-
|
4486 |
-
( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === type );
|
4487 |
-
},
|
4488 |
|
4489 |
-
|
4490 |
-
|
4491 |
-
"checkbox": createInputPseudo("checkbox"),
|
4492 |
-
"file": createInputPseudo("file"),
|
4493 |
-
"password": createInputPseudo("password"),
|
4494 |
-
"image": createInputPseudo("image"),
|
4495 |
|
4496 |
-
|
4497 |
-
|
|
|
4498 |
|
4499 |
-
|
4500 |
-
|
4501 |
-
|
4502 |
-
|
4503 |
|
4504 |
-
|
4505 |
-
|
4506 |
-
|
|
|
|
|
4507 |
|
4508 |
-
|
4509 |
-
|
4510 |
-
|
4511 |
-
|
|
|
4512 |
|
4513 |
-
|
4514 |
-
|
4515 |
-
|
|
|
|
|
4516 |
|
4517 |
-
|
4518 |
-
"first": createPositionalPseudo(function() {
|
4519 |
-
return [ 0 ];
|
4520 |
-
}),
|
4521 |
|
4522 |
-
|
4523 |
-
|
4524 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4525 |
|
4526 |
-
|
4527 |
-
return [ argument < 0 ? argument + length : argument ];
|
4528 |
-
}),
|
4529 |
|
4530 |
-
|
4531 |
-
|
4532 |
-
matchIndexes.push( i );
|
4533 |
}
|
4534 |
-
return matchIndexes;
|
4535 |
-
}),
|
4536 |
|
4537 |
-
|
4538 |
-
|
4539 |
-
matchIndexes.push( i );
|
4540 |
}
|
4541 |
-
|
4542 |
-
|
4543 |
|
4544 |
-
|
4545 |
-
|
4546 |
-
matchIndexes.push( i );
|
4547 |
-
}
|
4548 |
-
return matchIndexes;
|
4549 |
-
}),
|
4550 |
|
4551 |
-
|
4552 |
-
|
4553 |
-
|
|
|
|
|
|
|
|
|
|
|
4554 |
}
|
4555 |
-
|
4556 |
-
})
|
4557 |
-
}
|
4558 |
-
};
|
4559 |
|
4560 |
-
|
4561 |
-
|
4562 |
-
|
4563 |
-
|
|
|
|
|
|
|
4564 |
|
4565 |
-
|
4566 |
|
4567 |
-
|
4568 |
-
|
4569 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4570 |
}
|
4571 |
|
4572 |
-
|
4573 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4574 |
|
4575 |
-
|
4576 |
-
|
|
|
|
|
4577 |
|
4578 |
-
|
4579 |
-
|
4580 |
-
if ( a === b ) {
|
4581 |
-
hasDuplicate = true;
|
4582 |
-
return 0;
|
4583 |
-
}
|
4584 |
|
4585 |
-
|
4586 |
-
|
4587 |
-
|
4588 |
-
|
4589 |
-
|
4590 |
-
function( a, b ) {
|
4591 |
-
// The nodes are identical, we can exit early
|
4592 |
-
if ( a === b ) {
|
4593 |
-
hasDuplicate = true;
|
4594 |
-
return 0;
|
4595 |
|
4596 |
-
|
4597 |
-
|
4598 |
-
return a.sourceIndex - b.sourceIndex;
|
4599 |
-
}
|
4600 |
|
4601 |
-
|
4602 |
-
|
4603 |
-
bp = [],
|
4604 |
-
aup = a.parentNode,
|
4605 |
-
bup = b.parentNode,
|
4606 |
-
cur = aup;
|
4607 |
|
4608 |
-
|
4609 |
-
|
4610 |
-
return siblingCheck( a, b );
|
4611 |
|
4612 |
-
|
4613 |
-
|
4614 |
-
|
|
|
|
|
4615 |
|
4616 |
-
|
4617 |
-
|
4618 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4619 |
|
4620 |
-
|
4621 |
-
|
4622 |
-
|
4623 |
-
ap.unshift( cur );
|
4624 |
-
cur = cur.parentNode;
|
4625 |
}
|
4626 |
|
4627 |
-
|
|
|
|
|
4628 |
|
4629 |
-
|
4630 |
-
|
4631 |
-
|
4632 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4633 |
|
4634 |
-
|
4635 |
-
|
|
|
4636 |
|
4637 |
-
|
4638 |
-
|
4639 |
-
if ( ap[i] !== bp[i] ) {
|
4640 |
-
return siblingCheck( ap[i], bp[i] );
|
4641 |
-
}
|
4642 |
}
|
4643 |
|
4644 |
-
|
4645 |
-
return i === al ?
|
4646 |
-
siblingCheck( a, bp[i], -1 ) :
|
4647 |
-
siblingCheck( ap[i], b, 1 );
|
4648 |
};
|
|
|
4649 |
|
4650 |
-
// Always assume the presence of duplicates if sort doesn't
|
4651 |
-
// pass them to our comparison function (as in Google Chrome).
|
4652 |
-
[0, 0].sort( sortOrder );
|
4653 |
-
baseHasDuplicate = !hasDuplicate;
|
4654 |
-
|
4655 |
-
// Document sorting and removing duplicates
|
4656 |
-
Sizzle.uniqueSort = function( results ) {
|
4657 |
-
var elem,
|
4658 |
-
duplicates = [],
|
4659 |
-
i = 1,
|
4660 |
-
j = 0;
|
4661 |
-
|
4662 |
-
hasDuplicate = baseHasDuplicate;
|
4663 |
-
results.sort( sortOrder );
|
4664 |
|
4665 |
-
|
4666 |
-
|
4667 |
-
if ( elem === results[ i - 1 ] ) {
|
4668 |
-
j = duplicates.push( i );
|
4669 |
-
}
|
4670 |
-
}
|
4671 |
-
while ( j-- ) {
|
4672 |
-
results.splice( duplicates[ j ], 1 );
|
4673 |
-
}
|
4674 |
-
}
|
4675 |
|
4676 |
-
|
4677 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4678 |
|
4679 |
-
|
4680 |
-
|
4681 |
-
};
|
4682 |
|
4683 |
-
|
4684 |
-
|
4685 |
-
|
4686 |
-
cached = tokenCache[ expando ][ selector + " " ];
|
4687 |
|
4688 |
-
|
4689 |
-
|
4690 |
-
|
4691 |
|
4692 |
-
|
4693 |
-
|
4694 |
-
preFilters = Expr.preFilter;
|
4695 |
|
4696 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4697 |
|
4698 |
-
|
4699 |
-
|
4700 |
-
if ( match ) {
|
4701 |
-
// Don't consume trailing commas as valid
|
4702 |
-
soFar = soFar.slice( match[0].length ) || soFar;
|
4703 |
-
}
|
4704 |
-
groups.push( tokens = [] );
|
4705 |
-
}
|
4706 |
|
4707 |
-
|
|
|
4708 |
|
4709 |
-
|
4710 |
-
|
4711 |
-
tokens.push( matched = new Token( match.shift() ) );
|
4712 |
-
soFar = soFar.slice( matched.length );
|
4713 |
|
4714 |
-
//
|
4715 |
-
|
4716 |
-
}
|
4717 |
|
4718 |
-
|
4719 |
-
|
4720 |
-
|
4721 |
-
(match = preFilters[ type ]( match ))) ) {
|
4722 |
|
4723 |
-
|
4724 |
-
|
4725 |
-
matched.type = type;
|
4726 |
-
matched.matches = match;
|
4727 |
-
}
|
4728 |
}
|
4729 |
|
4730 |
-
|
4731 |
-
|
4732 |
-
}
|
4733 |
}
|
4734 |
|
4735 |
-
|
4736 |
-
// if we're just parsing
|
4737 |
-
// Otherwise, throw an error or return tokens
|
4738 |
-
return parseOnly ?
|
4739 |
-
soFar.length :
|
4740 |
-
soFar ?
|
4741 |
-
Sizzle.error( selector ) :
|
4742 |
-
// Cache the tokens
|
4743 |
-
tokenCache( selector, groups ).slice( 0 );
|
4744 |
}
|
4745 |
|
4746 |
-
function addCombinator( matcher, combinator, base ) {
|
4747 |
-
var dir = combinator.dir,
|
4748 |
-
checkNonElements = base && combinator.dir === "parentNode",
|
4749 |
-
doneName = done++;
|
4750 |
|
4751 |
-
|
4752 |
-
|
4753 |
-
function( elem, context, xml ) {
|
4754 |
-
while ( (elem = elem[ dir ]) ) {
|
4755 |
-
if ( checkNonElements || elem.nodeType === 1 ) {
|
4756 |
-
return matcher( elem, context, xml );
|
4757 |
-
}
|
4758 |
-
}
|
4759 |
-
} :
|
4760 |
|
4761 |
-
|
4762 |
-
|
4763 |
-
|
4764 |
-
|
4765 |
-
var cache,
|
4766 |
-
dirkey = dirruns + " " + doneName + " ",
|
4767 |
-
cachedkey = dirkey + cachedruns;
|
4768 |
-
while ( (elem = elem[ dir ]) ) {
|
4769 |
-
if ( checkNonElements || elem.nodeType === 1 ) {
|
4770 |
-
if ( (cache = elem[ expando ]) === cachedkey ) {
|
4771 |
-
return elem.sizset;
|
4772 |
-
} else if ( typeof cache === "string" && cache.indexOf(dirkey) === 0 ) {
|
4773 |
-
if ( elem.sizset ) {
|
4774 |
-
return elem;
|
4775 |
-
}
|
4776 |
-
} else {
|
4777 |
-
elem[ expando ] = cachedkey;
|
4778 |
-
if ( matcher( elem, context, xml ) ) {
|
4779 |
-
elem.sizset = true;
|
4780 |
-
return elem;
|
4781 |
-
}
|
4782 |
-
elem.sizset = false;
|
4783 |
-
}
|
4784 |
-
}
|
4785 |
-
}
|
4786 |
-
} else {
|
4787 |
-
while ( (elem = elem[ dir ]) ) {
|
4788 |
-
if ( checkNonElements || elem.nodeType === 1 ) {
|
4789 |
-
if ( matcher( elem, context, xml ) ) {
|
4790 |
-
return elem;
|
4791 |
-
}
|
4792 |
-
}
|
4793 |
-
}
|
4794 |
-
}
|
4795 |
-
};
|
4796 |
-
}
|
4797 |
|
4798 |
-
|
4799 |
-
|
4800 |
-
function( elem, context, xml ) {
|
4801 |
-
var i = matchers.length;
|
4802 |
-
while ( i-- ) {
|
4803 |
-
if ( !matchers[i]( elem, context, xml ) ) {
|
4804 |
-
return false;
|
4805 |
-
}
|
4806 |
-
}
|
4807 |
-
return true;
|
4808 |
-
} :
|
4809 |
-
matchers[0];
|
4810 |
-
}
|
4811 |
|
4812 |
-
|
4813 |
-
|
4814 |
-
newUnmatched = [],
|
4815 |
-
i = 0,
|
4816 |
-
len = unmatched.length,
|
4817 |
-
mapped = map != null;
|
4818 |
|
4819 |
-
|
4820 |
-
if (
|
4821 |
-
|
4822 |
-
|
4823 |
-
if ( mapped ) {
|
4824 |
-
map.push( i );
|
4825 |
-
}
|
4826 |
-
}
|
4827 |
}
|
4828 |
-
}
|
4829 |
|
4830 |
-
|
4831 |
-
|
|
|
|
|
|
|
4832 |
|
4833 |
-
|
4834 |
-
|
4835 |
-
|
4836 |
-
|
4837 |
-
|
4838 |
-
|
4839 |
-
|
4840 |
-
|
4841 |
-
|
4842 |
-
|
4843 |
-
|
4844 |
-
|
|
|
4845 |
|
4846 |
-
|
4847 |
-
elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
|
4848 |
|
4849 |
-
|
4850 |
-
|
4851 |
-
condense( elems, preMap, preFilter, context, xml ) :
|
4852 |
-
elems,
|
4853 |
|
4854 |
-
|
4855 |
-
|
4856 |
-
postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
|
4857 |
|
4858 |
-
|
4859 |
-
[] :
|
4860 |
|
4861 |
-
// ...otherwise use results directly
|
4862 |
-
results :
|
4863 |
-
matcherIn;
|
4864 |
|
4865 |
-
|
4866 |
-
|
4867 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4868 |
}
|
4869 |
|
4870 |
-
|
4871 |
-
|
4872 |
-
temp = condense( matcherOut, postMap );
|
4873 |
-
postFilter( temp, [], context, xml );
|
4874 |
|
4875 |
-
|
4876 |
-
|
4877 |
-
|
4878 |
-
|
4879 |
-
|
4880 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4881 |
}
|
4882 |
-
}
|
4883 |
|
4884 |
-
|
4885 |
-
|
4886 |
-
|
4887 |
-
|
4888 |
-
|
4889 |
-
i = matcherOut.length;
|
4890 |
-
while ( i-- ) {
|
4891 |
-
if ( (elem = matcherOut[i]) ) {
|
4892 |
-
// Restore matcherIn since elem is not yet a final match
|
4893 |
-
temp.push( (matcherIn[i] = elem) );
|
4894 |
-
}
|
4895 |
-
}
|
4896 |
-
postFinder( null, (matcherOut = []), temp, xml );
|
4897 |
-
}
|
4898 |
|
4899 |
-
//
|
4900 |
-
|
4901 |
-
|
4902 |
-
|
4903 |
-
(temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
|
4904 |
|
4905 |
-
|
4906 |
-
|
4907 |
-
|
4908 |
-
}
|
4909 |
|
4910 |
-
|
4911 |
-
|
4912 |
-
|
4913 |
-
|
4914 |
-
matcherOut.splice( preexisting, matcherOut.length ) :
|
4915 |
-
matcherOut
|
4916 |
-
);
|
4917 |
-
if ( postFinder ) {
|
4918 |
-
postFinder( null, results, matcherOut, xml );
|
4919 |
-
} else {
|
4920 |
-
push.apply( results, matcherOut );
|
4921 |
}
|
4922 |
}
|
4923 |
-
});
|
4924 |
-
}
|
4925 |
|
4926 |
-
|
4927 |
-
|
4928 |
-
|
4929 |
-
|
4930 |
-
|
4931 |
-
|
|
|
|
|
|
|
|
|
4932 |
|
4933 |
-
|
4934 |
-
|
4935 |
-
|
4936 |
-
}, implicitRelative, true ),
|
4937 |
-
matchAnyContext = addCombinator( function( elem ) {
|
4938 |
-
return indexOf.call( checkContext, elem ) > -1;
|
4939 |
-
}, implicitRelative, true ),
|
4940 |
-
matchers = [ function( elem, context, xml ) {
|
4941 |
-
return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
|
4942 |
-
(checkContext = context).nodeType ?
|
4943 |
-
matchContext( elem, context, xml ) :
|
4944 |
-
matchAnyContext( elem, context, xml ) );
|
4945 |
-
} ];
|
4946 |
|
4947 |
-
|
4948 |
-
|
4949 |
-
matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];
|
4950 |
-
} else {
|
4951 |
-
matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
|
4952 |
|
4953 |
-
|
4954 |
-
|
4955 |
-
|
4956 |
-
|
4957 |
-
for ( ; j < len; j++ ) {
|
4958 |
-
if ( Expr.relative[ tokens[j].type ] ) {
|
4959 |
-
break;
|
4960 |
-
}
|
4961 |
-
}
|
4962 |
-
return setMatcher(
|
4963 |
-
i > 1 && elementMatcher( matchers ),
|
4964 |
-
i > 1 && tokens.slice( 0, i - 1 ).join("").replace( rtrim, "$1" ),
|
4965 |
-
matcher,
|
4966 |
-
i < j && matcherFromTokens( tokens.slice( i, j ) ),
|
4967 |
-
j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
|
4968 |
-
j < len && tokens.join("")
|
4969 |
-
);
|
4970 |
-
}
|
4971 |
-
matchers.push( matcher );
|
4972 |
}
|
4973 |
-
}
|
4974 |
|
4975 |
-
|
4976 |
-
|
4977 |
-
|
4978 |
-
function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
|
4979 |
-
var bySet = setMatchers.length > 0,
|
4980 |
-
byElement = elementMatchers.length > 0,
|
4981 |
-
superMatcher = function( seed, context, xml, results, expandContext ) {
|
4982 |
-
var elem, j, matcher,
|
4983 |
-
setMatched = [],
|
4984 |
-
matchedCount = 0,
|
4985 |
-
i = "0",
|
4986 |
-
unmatched = seed && [],
|
4987 |
-
outermost = expandContext != null,
|
4988 |
-
contextBackup = outermostContext,
|
4989 |
-
// We must always have either seed elements or context
|
4990 |
-
elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
|
4991 |
-
// Nested matchers should use non-integer dirruns
|
4992 |
-
dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.E);
|
4993 |
|
4994 |
-
|
4995 |
-
|
4996 |
-
|
4997 |
-
|
|
|
4998 |
|
4999 |
-
//
|
5000 |
-
|
5001 |
-
|
5002 |
-
|
5003 |
-
if ( matcher( elem, context, xml ) ) {
|
5004 |
-
results.push( elem );
|
5005 |
-
break;
|
5006 |
-
}
|
5007 |
-
}
|
5008 |
-
if ( outermost ) {
|
5009 |
-
dirruns = dirrunsUnique;
|
5010 |
-
cachedruns = ++superMatcher.el;
|
5011 |
-
}
|
5012 |
-
}
|
5013 |
|
5014 |
-
|
5015 |
-
|
5016 |
-
|
5017 |
-
|
5018 |
-
|
5019 |
-
|
5020 |
|
5021 |
-
|
5022 |
-
|
5023 |
-
|
5024 |
-
|
5025 |
-
}
|
5026 |
}
|
|
|
5027 |
|
5028 |
-
|
5029 |
-
|
5030 |
-
|
5031 |
-
|
5032 |
-
|
5033 |
-
|
|
|
5034 |
|
5035 |
-
if ( seed ) {
|
5036 |
-
// Reintegrate element matches to eliminate the need for sorting
|
5037 |
-
if ( matchedCount > 0 ) {
|
5038 |
-
while ( i-- ) {
|
5039 |
-
if ( !(unmatched[i] || setMatched[i]) ) {
|
5040 |
-
setMatched[i] = pop.call( results );
|
5041 |
-
}
|
5042 |
-
}
|
5043 |
-
}
|
5044 |
|
5045 |
-
// Discard index placeholder values to get only actual matches
|
5046 |
-
setMatched = condense( setMatched );
|
5047 |
-
}
|
5048 |
|
5049 |
-
// Add matches to results
|
5050 |
-
push.apply( results, setMatched );
|
5051 |
|
5052 |
-
|
5053 |
-
|
5054 |
-
|
|
|
|
|
5055 |
|
5056 |
-
|
5057 |
-
|
|
|
|
|
5058 |
}
|
5059 |
|
5060 |
-
|
5061 |
-
|
5062 |
-
|
5063 |
-
|
|
|
|
|
5064 |
}
|
5065 |
|
5066 |
-
|
5067 |
-
};
|
5068 |
|
5069 |
-
|
5070 |
-
|
5071 |
-
|
5072 |
-
superMatcher;
|
5073 |
}
|
5074 |
|
5075 |
-
compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
|
5076 |
-
var i,
|
5077 |
-
setMatchers = [],
|
5078 |
-
elementMatchers = [],
|
5079 |
-
cached = compilerCache[ expando ][ selector + " " ];
|
5080 |
|
5081 |
-
|
5082 |
-
|
5083 |
-
|
5084 |
-
|
5085 |
-
}
|
5086 |
-
i = group.length;
|
5087 |
-
while ( i-- ) {
|
5088 |
-
cached = matcherFromTokens( group[i] );
|
5089 |
-
if ( cached[ expando ] ) {
|
5090 |
-
setMatchers.push( cached );
|
5091 |
-
} else {
|
5092 |
-
elementMatchers.push( cached );
|
5093 |
-
}
|
5094 |
-
}
|
5095 |
|
5096 |
-
|
5097 |
-
|
5098 |
-
|
5099 |
-
|
5100 |
-
|
5101 |
|
5102 |
-
|
5103 |
-
|
5104 |
-
|
5105 |
-
for ( ; i < len; i++ ) {
|
5106 |
-
Sizzle( selector, contexts[i], results );
|
5107 |
}
|
5108 |
-
return results;
|
5109 |
-
}
|
5110 |
|
5111 |
-
|
5112 |
-
var i, tokens, token, type, find,
|
5113 |
-
match = tokenize( selector ),
|
5114 |
-
j = match.length;
|
5115 |
|
5116 |
-
|
5117 |
-
|
5118 |
-
|
5119 |
|
5120 |
-
|
5121 |
-
|
5122 |
-
|
5123 |
-
context.nodeType === 9 && !xml &&
|
5124 |
-
Expr.relative[ tokens[1].type ] ) {
|
5125 |
|
5126 |
-
|
5127 |
-
|
5128 |
-
|
5129 |
-
|
|
|
|
|
|
|
|
|
5130 |
|
5131 |
-
|
|
|
|
|
|
|
5132 |
}
|
|
|
|
|
5133 |
|
5134 |
-
|
5135 |
-
|
5136 |
-
|
|
|
|
|
|
|
5137 |
|
5138 |
-
|
5139 |
-
|
5140 |
-
|
5141 |
-
|
5142 |
-
|
5143 |
-
|
5144 |
-
if ( (seed = find(
|
5145 |
-
token.matches[0].replace( rbackslash, "" ),
|
5146 |
-
rsibling.test( tokens[0].type ) && context.parentNode || context,
|
5147 |
-
xml
|
5148 |
-
)) ) {
|
5149 |
-
|
5150 |
-
// If seed is empty or no tokens remain, we can return early
|
5151 |
-
tokens.splice( i, 1 );
|
5152 |
-
selector = seed.length && tokens.join("");
|
5153 |
-
if ( !selector ) {
|
5154 |
-
push.apply( results, slice.call( seed, 0 ) );
|
5155 |
-
return results;
|
5156 |
-
}
|
5157 |
|
5158 |
-
|
5159 |
-
|
5160 |
-
|
|
|
5161 |
}
|
|
|
5162 |
}
|
5163 |
-
}
|
5164 |
|
5165 |
-
|
5166 |
-
|
5167 |
-
|
5168 |
-
seed,
|
5169 |
-
context,
|
5170 |
-
xml,
|
5171 |
-
results,
|
5172 |
-
rsibling.test( selector )
|
5173 |
-
);
|
5174 |
-
return results;
|
5175 |
-
}
|
5176 |
|
5177 |
-
|
5178 |
-
|
5179 |
-
|
5180 |
-
|
5181 |
-
|
5182 |
-
rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,
|
5183 |
-
|
5184 |
-
// qSa(:focus) reports false when true (Chrome 21), no need to also add to buggyMatches since matches checks buggyQSA
|
5185 |
-
// A support test would require too much code (would include document ready)
|
5186 |
-
rbuggyQSA = [ ":focus" ],
|
5187 |
-
|
5188 |
-
// matchesSelector(:active) reports false when true (IE9/Opera 11.5)
|
5189 |
-
// A support test would require too much code (would include document ready)
|
5190 |
-
// just skip matchesSelector for :active
|
5191 |
-
rbuggyMatches = [ ":active" ],
|
5192 |
-
matches = docElem.matchesSelector ||
|
5193 |
-
docElem.mozMatchesSelector ||
|
5194 |
-
docElem.webkitMatchesSelector ||
|
5195 |
-
docElem.oMatchesSelector ||
|
5196 |
-
docElem.msMatchesSelector;
|
5197 |
|
5198 |
-
//
|
5199 |
-
|
5200 |
-
|
5201 |
-
|
5202 |
-
|
5203 |
-
|
5204 |
-
|
5205 |
-
//
|
5206 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5207 |
|
5208 |
-
// IE8 - Some boolean attributes are not treated correctly
|
5209 |
-
if ( !div.querySelectorAll("[selected]").length ) {
|
5210 |
-
rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" );
|
5211 |
-
}
|
5212 |
|
5213 |
-
|
5214 |
-
|
5215 |
-
|
5216 |
-
|
5217 |
-
rbuggyQSA.push(":checked");
|
5218 |
-
}
|
5219 |
-
});
|
5220 |
|
5221 |
-
|
|
|
|
|
|
|
|
|
5222 |
|
5223 |
-
|
5224 |
-
// Should not select anything
|
5225 |
-
div.innerHTML = "<p test=''></p>";
|
5226 |
-
if ( div.querySelectorAll("[test^='']").length ) {
|
5227 |
-
rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" );
|
5228 |
-
}
|
5229 |
|
5230 |
-
|
5231 |
-
|
5232 |
-
|
5233 |
-
|
5234 |
-
rbuggyQSA.push(":enabled", ":disabled");
|
5235 |
-
}
|
5236 |
-
});
|
5237 |
|
5238 |
-
|
5239 |
-
|
5240 |
-
|
5241 |
-
select = function( selector, context, results, seed, xml ) {
|
5242 |
-
// Only use querySelectorAll when not filtering,
|
5243 |
-
// when this is not xml,
|
5244 |
-
// and when no QSA bugs apply
|
5245 |
-
if ( !seed && !xml && !rbuggyQSA.test( selector ) ) {
|
5246 |
-
var groups, i,
|
5247 |
-
old = true,
|
5248 |
-
nid = expando,
|
5249 |
-
newContext = context,
|
5250 |
-
newSelector = context.nodeType === 9 && selector;
|
5251 |
-
|
5252 |
-
// qSA works strangely on Element-rooted queries
|
5253 |
-
// We can work around this by specifying an extra ID on the root
|
5254 |
-
// and working up from there (Thanks to Andrew Dupont for the technique)
|
5255 |
-
// IE 8 doesn't work on object elements
|
5256 |
-
if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
|
5257 |
-
groups = tokenize( selector );
|
5258 |
-
|
5259 |
-
if ( (old = context.getAttribute("id")) ) {
|
5260 |
-
nid = old.replace( rescape, "\\$&" );
|
5261 |
-
} else {
|
5262 |
-
context.setAttribute( "id", nid );
|
5263 |
-
}
|
5264 |
-
nid = "[id='" + nid + "'] ";
|
5265 |
|
5266 |
-
i = groups.length;
|
5267 |
-
while ( i-- ) {
|
5268 |
-
groups[i] = nid + groups[i].join("");
|
5269 |
-
}
|
5270 |
-
newContext = rsibling.test( selector ) && context.parentNode || context;
|
5271 |
-
newSelector = groups.join(",");
|
5272 |
-
}
|
5273 |
|
5274 |
-
|
5275 |
-
|
5276 |
-
|
5277 |
-
newSelector
|
5278 |
-
), 0 ) );
|
5279 |
-
return results;
|
5280 |
-
} catch(qsaError) {
|
5281 |
-
} finally {
|
5282 |
-
if ( !old ) {
|
5283 |
-
context.removeAttribute("id");
|
5284 |
-
}
|
5285 |
-
}
|
5286 |
-
}
|
5287 |
-
}
|
5288 |
|
5289 |
-
|
5290 |
-
|
|
|
|
|
|
|
5291 |
|
5292 |
-
|
5293 |
-
|
5294 |
-
|
5295 |
-
|
5296 |
-
|
5297 |
|
5298 |
-
|
5299 |
-
// Gecko does not error, returns false instead
|
5300 |
-
try {
|
5301 |
-
matches.call( div, "[test!='']:sizzle" );
|
5302 |
-
rbuggyMatches.push( "!=", pseudos );
|
5303 |
-
} catch ( e ) {}
|
5304 |
-
});
|
5305 |
|
5306 |
-
// rbuggyMatches always contains :active and :focus, so no need for a length check
|
5307 |
-
rbuggyMatches = /* rbuggyMatches.length && */ new RegExp( rbuggyMatches.join("|") );
|
5308 |
|
5309 |
-
|
5310 |
-
|
5311 |
-
expr = expr.replace( rattributeQuotes, "='$1']" );
|
5312 |
|
5313 |
-
|
5314 |
-
|
5315 |
-
|
5316 |
-
|
5317 |
-
|
5318 |
-
// IE 9's matchesSelector returns false on disconnected nodes
|
5319 |
-
if ( ret || disconnectedMatch ||
|
5320 |
-
// As well, disconnected nodes are said to be in a document
|
5321 |
-
// fragment in IE 9
|
5322 |
-
elem.document && elem.document.nodeType !== 11 ) {
|
5323 |
-
return ret;
|
5324 |
-
}
|
5325 |
-
} catch(e) {}
|
5326 |
-
}
|
5327 |
|
5328 |
-
|
5329 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5330 |
}
|
5331 |
-
}
|
|
|
|
|
5332 |
}
|
5333 |
|
5334 |
-
|
5335 |
-
|
|
|
|
|
|
|
5336 |
|
5337 |
-
|
5338 |
-
|
5339 |
-
|
5340 |
-
|
|
|
5341 |
|
5342 |
-
|
5343 |
-
|
5344 |
-
|
5345 |
-
|
5346 |
-
|
5347 |
-
|
5348 |
-
|
5349 |
-
|
5350 |
-
jQuery.contains = Sizzle.contains;
|
5351 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5352 |
|
5353 |
-
|
5354 |
-
|
5355 |
-
|
5356 |
-
|
5357 |
-
|
5358 |
-
// methods guaranteed to produce a unique set when starting from a unique set
|
5359 |
-
guaranteedUnique = {
|
5360 |
-
children: true,
|
5361 |
-
contents: true,
|
5362 |
-
next: true,
|
5363 |
-
prev: true
|
5364 |
-
};
|
5365 |
|
5366 |
-
|
5367 |
-
|
5368 |
-
|
5369 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5370 |
|
5371 |
-
|
5372 |
-
|
5373 |
-
|
5374 |
-
|
5375 |
-
|
5376 |
-
|
5377 |
-
|
5378 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5379 |
}
|
5380 |
|
5381 |
-
|
|
|
|
|
|
|
|
|
5382 |
|
5383 |
-
|
5384 |
-
|
5385 |
-
|
|
|
|
|
|
|
|
|
5386 |
|
5387 |
-
|
5388 |
-
|
5389 |
-
|
5390 |
-
for ( r = 0; r < length; r++ ) {
|
5391 |
-
if ( ret[r] === ret[n] ) {
|
5392 |
-
ret.splice(n--, 1);
|
5393 |
-
break;
|
5394 |
-
}
|
5395 |
-
}
|
5396 |
-
}
|
5397 |
}
|
5398 |
}
|
|
|
5399 |
|
5400 |
-
|
5401 |
-
|
5402 |
|
5403 |
-
|
5404 |
-
var i,
|
5405 |
-
targets = jQuery( target, this ),
|
5406 |
-
len = targets.length;
|
5407 |
|
5408 |
-
|
5409 |
-
|
5410 |
-
|
5411 |
-
|
5412 |
-
|
5413 |
-
}
|
5414 |
-
});
|
5415 |
-
},
|
5416 |
|
5417 |
-
|
5418 |
-
|
5419 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
5420 |
|
5421 |
-
|
5422 |
-
|
5423 |
-
|
|
|
5424 |
|
5425 |
-
|
5426 |
-
|
5427 |
-
|
5428 |
-
// If this is a positional/relative selector, check membership in the returned set
|
5429 |
-
// so $("p:first").is("p:last") won't return true for a doc with two "p".
|
5430 |
-
rneedsContext.test( selector ) ?
|
5431 |
-
jQuery( selector, this.context ).index( this[0] ) >= 0 :
|
5432 |
-
jQuery.filter( selector, this ).length > 0 :
|
5433 |
-
this.filter( selector ).length > 0 );
|
5434 |
-
},
|
5435 |
|
5436 |
-
|
5437 |
-
|
5438 |
-
|
5439 |
-
l = this.length,
|
5440 |
-
ret = [],
|
5441 |
-
pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
|
5442 |
-
jQuery( selectors, context || this.context ) :
|
5443 |
-
0;
|
5444 |
|
5445 |
-
|
5446 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5447 |
|
5448 |
-
|
5449 |
-
|
5450 |
-
|
5451 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
5452 |
}
|
5453 |
-
cur = cur.parentNode;
|
5454 |
}
|
5455 |
}
|
|
|
5456 |
|
5457 |
-
|
5458 |
-
|
5459 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5460 |
},
|
5461 |
|
5462 |
-
//
|
5463 |
-
//
|
5464 |
-
|
|
|
|
|
|
|
5465 |
|
5466 |
-
|
5467 |
-
|
5468 |
-
|
|
|
|
|
5469 |
}
|
5470 |
|
5471 |
-
//
|
5472 |
-
|
5473 |
-
|
5474 |
-
|
5475 |
|
5476 |
-
|
5477 |
-
return jQuery.inArray(
|
5478 |
-
// If it receives a jQuery object, the first element is used
|
5479 |
-
elem.jquery ? elem[0] : elem, this );
|
5480 |
-
},
|
5481 |
|
5482 |
-
|
5483 |
-
|
5484 |
-
|
5485 |
-
jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
|
5486 |
-
all = jQuery.merge( this.get(), set );
|
5487 |
|
5488 |
-
|
5489 |
-
|
5490 |
-
|
5491 |
-
},
|
5492 |
|
5493 |
-
|
5494 |
-
|
5495 |
-
|
5496 |
-
|
5497 |
-
|
5498 |
-
}
|
5499 |
|
5500 |
-
|
|
|
|
|
|
|
5501 |
|
5502 |
-
//
|
5503 |
-
|
5504 |
-
|
5505 |
-
|
5506 |
-
}
|
5507 |
|
5508 |
-
|
5509 |
-
|
5510 |
-
|
5511 |
-
|
|
|
5512 |
|
5513 |
-
|
5514 |
-
|
5515 |
|
5516 |
-
|
5517 |
-
|
5518 |
-
|
5519 |
-
|
5520 |
-
|
5521 |
-
|
5522 |
-
return jQuery.dir( elem, "parentNode" );
|
5523 |
-
},
|
5524 |
-
parentsUntil: function( elem, i, until ) {
|
5525 |
-
return jQuery.dir( elem, "parentNode", until );
|
5526 |
-
},
|
5527 |
-
next: function( elem ) {
|
5528 |
-
return sibling( elem, "nextSibling" );
|
5529 |
-
},
|
5530 |
-
prev: function( elem ) {
|
5531 |
-
return sibling( elem, "previousSibling" );
|
5532 |
-
},
|
5533 |
-
nextAll: function( elem ) {
|
5534 |
-
return jQuery.dir( elem, "nextSibling" );
|
5535 |
-
},
|
5536 |
-
prevAll: function( elem ) {
|
5537 |
-
return jQuery.dir( elem, "previousSibling" );
|
5538 |
-
},
|
5539 |
-
nextUntil: function( elem, i, until ) {
|
5540 |
-
return jQuery.dir( elem, "nextSibling", until );
|
5541 |
-
},
|
5542 |
-
prevUntil: function( elem, i, until ) {
|
5543 |
-
return jQuery.dir( elem, "previousSibling", until );
|
5544 |
-
},
|
5545 |
-
siblings: function( elem ) {
|
5546 |
-
return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
|
5547 |
-
},
|
5548 |
-
children: function( elem ) {
|
5549 |
-
return jQuery.sibling( elem.firstChild );
|
5550 |
-
},
|
5551 |
-
contents: function( elem ) {
|
5552 |
-
return jQuery.nodeName( elem, "iframe" ) ?
|
5553 |
-
elem.contentDocument || elem.contentWindow.document :
|
5554 |
-
jQuery.merge( [], elem.childNodes );
|
5555 |
-
}
|
5556 |
-
}, function( name, fn ) {
|
5557 |
-
jQuery.fn[ name ] = function( until, selector ) {
|
5558 |
-
var ret = jQuery.map( this, fn, until );
|
5559 |
|
5560 |
-
|
5561 |
-
|
5562 |
-
|
|
|
|
|
5563 |
|
5564 |
-
|
5565 |
-
|
5566 |
}
|
|
|
5567 |
|
5568 |
-
|
|
|
|
|
5569 |
|
5570 |
-
|
5571 |
-
|
5572 |
-
}
|
5573 |
|
5574 |
-
|
5575 |
-
|
5576 |
-
|
5577 |
|
5578 |
-
|
5579 |
-
|
5580 |
-
|
5581 |
-
expr = ":not(" + expr + ")";
|
5582 |
}
|
5583 |
|
5584 |
-
|
5585 |
-
|
5586 |
-
|
5587 |
-
|
5588 |
-
|
5589 |
-
dir: function( elem, dir, until ) {
|
5590 |
-
var matched = [],
|
5591 |
-
cur = elem[ dir ];
|
5592 |
|
5593 |
-
|
5594 |
-
|
5595 |
-
|
5596 |
-
}
|
5597 |
-
cur = cur[dir];
|
5598 |
}
|
5599 |
-
return matched;
|
5600 |
-
},
|
5601 |
|
5602 |
-
|
5603 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
5604 |
|
5605 |
-
|
5606 |
-
|
5607 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5608 |
}
|
5609 |
-
}
|
5610 |
|
5611 |
-
|
5612 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5613 |
});
|
5614 |
|
5615 |
-
|
5616 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
5617 |
|
5618 |
-
|
5619 |
-
|
5620 |
-
|
|
|
|
|
5621 |
|
5622 |
-
|
5623 |
-
|
5624 |
-
|
5625 |
-
return retVal === keep;
|
5626 |
-
});
|
5627 |
|
5628 |
-
|
5629 |
-
|
5630 |
-
|
5631 |
-
|
|
|
5632 |
|
5633 |
-
|
5634 |
-
|
5635 |
-
|
5636 |
-
|
5637 |
|
5638 |
-
|
5639 |
-
|
5640 |
-
|
5641 |
-
|
5642 |
-
|
5643 |
-
}
|
5644 |
|
5645 |
-
|
5646 |
-
|
5647 |
-
|
|
|
|
|
|
|
5648 |
}
|
5649 |
-
function createSafeFragment( document ) {
|
5650 |
-
var list = nodeNames.split( "|" ),
|
5651 |
-
safeFrag = document.createDocumentFragment();
|
5652 |
|
5653 |
-
|
5654 |
-
|
5655 |
-
|
5656 |
-
|
5657 |
-
|
|
|
|
|
5658 |
}
|
5659 |
}
|
5660 |
-
|
5661 |
-
}
|
5662 |
-
|
5663 |
-
var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
|
5664 |
-
"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
|
5665 |
-
rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
|
5666 |
-
rleadingWhitespace = /^\s+/,
|
5667 |
-
rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
|
5668 |
-
rtagName = /<([\w:]+)/,
|
5669 |
-
rtbody = /<tbody/i,
|
5670 |
-
rhtml = /<|&#?\w+;/,
|
5671 |
-
rnoInnerhtml = /<(?:script|style|link)/i,
|
5672 |
-
rnocache = /<(?:script|object|embed|option|style)/i,
|
5673 |
-
rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
|
5674 |
-
rcheckableType = /^(?:checkbox|radio)$/,
|
5675 |
-
// checked="checked" or checked
|
5676 |
-
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
|
5677 |
-
rscriptType = /\/(java|ecma)script/i,
|
5678 |
-
rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,
|
5679 |
-
wrapMap = {
|
5680 |
-
option: [ 1, "<select multiple='multiple'>", "</select>" ],
|
5681 |
-
legend: [ 1, "<fieldset>", "</fieldset>" ],
|
5682 |
-
thead: [ 1, "<table>", "</table>" ],
|
5683 |
-
tr: [ 2, "<table><tbody>", "</tbody></table>" ],
|
5684 |
-
td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
|
5685 |
-
col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
|
5686 |
-
area: [ 1, "<map>", "</map>" ],
|
5687 |
-
_default: [ 0, "", "" ]
|
5688 |
-
},
|
5689 |
-
safeFragment = createSafeFragment( document ),
|
5690 |
-
fragmentDiv = safeFragment.appendChild( document.createElement("div") );
|
5691 |
|
5692 |
-
|
5693 |
-
|
5694 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5695 |
|
5696 |
-
//
|
5697 |
-
|
5698 |
-
if ( !jQuery.support.htmlSerialize ) {
|
5699 |
-
wrapMap._default = [ 1, "X<div>", "</div>" ];
|
5700 |
-
}
|
5701 |
|
5702 |
-
|
5703 |
-
|
5704 |
-
|
5705 |
-
|
5706 |
-
jQuery.text( this ) :
|
5707 |
-
this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
|
5708 |
-
}, null, value, arguments.length );
|
5709 |
-
},
|
5710 |
|
5711 |
-
|
5712 |
-
if ( jQuery.isFunction( html ) ) {
|
5713 |
-
return this.each(function(i) {
|
5714 |
-
jQuery(this).wrapAll( html.call(this, i) );
|
5715 |
-
});
|
5716 |
}
|
|
|
5717 |
|
5718 |
-
|
5719 |
-
|
5720 |
-
|
|
|
5721 |
|
5722 |
-
|
5723 |
-
|
5724 |
-
|
|
|
|
|
|
|
5725 |
|
5726 |
-
|
5727 |
-
|
|
|
5728 |
|
5729 |
-
|
5730 |
-
|
5731 |
}
|
5732 |
|
5733 |
-
return
|
5734 |
-
}
|
5735 |
-
}
|
5736 |
|
5737 |
-
|
|
|
|
|
|
|
5738 |
},
|
5739 |
-
|
5740 |
-
|
5741 |
-
|
5742 |
-
|
5743 |
-
|
5744 |
-
|
|
|
|
|
|
|
5745 |
}
|
5746 |
|
5747 |
return this.each(function() {
|
5748 |
-
|
5749 |
-
|
5750 |
-
|
5751 |
-
if ( contents.length ) {
|
5752 |
-
contents.wrapAll( html );
|
5753 |
-
|
5754 |
} else {
|
5755 |
-
|
5756 |
}
|
5757 |
});
|
5758 |
-
}
|
5759 |
-
|
5760 |
-
wrap: function( html ) {
|
5761 |
-
var isFunction = jQuery.isFunction( html );
|
5762 |
|
5763 |
-
return this.each(function(i) {
|
5764 |
-
jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
|
5765 |
-
});
|
5766 |
-
},
|
5767 |
|
5768 |
-
|
5769 |
-
|
5770 |
-
|
5771 |
-
|
5772 |
-
}
|
5773 |
-
}).end();
|
5774 |
-
},
|
5775 |
|
5776 |
-
|
5777 |
-
|
5778 |
-
|
5779 |
-
|
5780 |
-
|
5781 |
-
|
|
|
|
|
|
|
|
|
5782 |
},
|
|
|
|
|
5783 |
|
5784 |
-
|
5785 |
-
|
5786 |
-
|
5787 |
-
this.insertBefore( elem, this.firstChild );
|
5788 |
-
}
|
5789 |
-
});
|
5790 |
},
|
|
|
|
|
|
|
5791 |
|
5792 |
-
|
5793 |
-
|
5794 |
-
|
5795 |
-
|
5796 |
-
|
|
|
5797 |
}
|
|
|
5798 |
|
5799 |
-
if (
|
5800 |
-
|
5801 |
-
return this.pushStack( jQuery.merge( set, this ), "before", this.selector );
|
5802 |
}
|
5803 |
-
},
|
5804 |
|
5805 |
-
|
5806 |
-
|
5807 |
-
|
5808 |
-
|
5809 |
-
});
|
5810 |
}
|
|
|
|
|
|
|
5811 |
|
5812 |
-
|
5813 |
-
var set = jQuery.clean( arguments );
|
5814 |
-
return this.pushStack( jQuery.merge( this, set ), "after", this.selector );
|
5815 |
-
}
|
5816 |
-
},
|
5817 |
|
5818 |
-
|
5819 |
-
|
5820 |
-
|
5821 |
-
|
5822 |
|
5823 |
-
|
5824 |
-
|
5825 |
-
|
5826 |
-
|
5827 |
-
jQuery.cleanData( [ elem ] );
|
5828 |
-
}
|
5829 |
|
5830 |
-
|
5831 |
-
|
5832 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5833 |
}
|
5834 |
}
|
|
|
|
|
5835 |
|
5836 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5837 |
},
|
|
|
|
|
|
|
|
|
5838 |
|
5839 |
-
|
5840 |
-
var elem,
|
5841 |
-
i = 0;
|
5842 |
|
5843 |
-
|
5844 |
-
|
5845 |
-
if ( elem.nodeType === 1 ) {
|
5846 |
-
jQuery.cleanData( elem.getElementsByTagName("*") );
|
5847 |
-
}
|
5848 |
|
5849 |
-
// Remove any remaining nodes
|
5850 |
-
while ( elem.firstChild ) {
|
5851 |
-
elem.removeChild( elem.firstChild );
|
5852 |
-
}
|
5853 |
-
}
|
5854 |
|
5855 |
-
return this;
|
5856 |
-
},
|
5857 |
|
5858 |
-
clone: function( dataAndEvents, deepDataAndEvents ) {
|
5859 |
-
dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
|
5860 |
-
deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
|
5861 |
|
5862 |
-
|
5863 |
-
|
5864 |
-
|
5865 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5866 |
|
5867 |
-
|
5868 |
-
|
5869 |
-
|
5870 |
-
|
5871 |
-
|
5872 |
|
5873 |
-
if (
|
5874 |
-
|
5875 |
-
|
5876 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5877 |
}
|
5878 |
|
5879 |
-
//
|
5880 |
-
if (
|
5881 |
-
|
5882 |
-
|
5883 |
-
|
|
|
|
|
|
|
|
|
5884 |
|
5885 |
-
|
|
|
|
|
5886 |
|
5887 |
-
|
5888 |
-
|
5889 |
-
|
5890 |
-
|
5891 |
-
|
5892 |
-
|
5893 |
-
|
5894 |
-
}
|
5895 |
-
}
|
5896 |
|
5897 |
-
|
|
|
|
|
|
|
|
|
5898 |
|
5899 |
-
|
5900 |
-
|
5901 |
-
|
|
|
|
|
|
|
|
|
5902 |
|
5903 |
-
|
5904 |
-
|
5905 |
-
|
5906 |
-
}, null, value, arguments.length );
|
5907 |
-
},
|
5908 |
|
5909 |
-
|
5910 |
-
|
5911 |
-
// Make sure that the elements are removed from the DOM before they are inserted
|
5912 |
-
// this can help fix replacing a parent with child elements
|
5913 |
-
if ( jQuery.isFunction( value ) ) {
|
5914 |
-
return this.each(function(i) {
|
5915 |
-
var self = jQuery(this), old = self.html();
|
5916 |
-
self.replaceWith( value.call( this, i, old ) );
|
5917 |
-
});
|
5918 |
-
}
|
5919 |
|
5920 |
-
|
5921 |
-
|
5922 |
-
|
|
|
|
|
|
|
|
|
5923 |
|
5924 |
-
|
5925 |
-
|
5926 |
-
|
|
|
|
|
5927 |
|
5928 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5929 |
|
5930 |
-
|
5931 |
-
|
5932 |
-
|
5933 |
-
|
|
|
|
|
|
|
|
|
|
|
5934 |
}
|
5935 |
-
}
|
5936 |
}
|
|
|
5937 |
|
5938 |
-
|
5939 |
-
this
|
5940 |
-
this
|
5941 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5942 |
|
5943 |
-
|
5944 |
-
|
5945 |
-
|
|
|
|
|
|
|
|
|
5946 |
|
5947 |
-
|
|
|
|
|
5948 |
|
5949 |
-
//
|
5950 |
-
|
|
|
5951 |
|
5952 |
-
|
5953 |
-
i = 0,
|
5954 |
-
value = args[0],
|
5955 |
-
scripts = [],
|
5956 |
-
l = this.length;
|
5957 |
|
5958 |
-
|
5959 |
-
|
5960 |
-
|
5961 |
-
|
5962 |
-
}
|
|
|
|
|
5963 |
}
|
|
|
5964 |
|
5965 |
-
|
5966 |
-
|
5967 |
-
|
5968 |
-
|
5969 |
-
|
|
|
|
|
5970 |
});
|
5971 |
}
|
|
|
5972 |
|
5973 |
-
|
5974 |
-
|
5975 |
-
|
5976 |
-
|
|
|
|
|
|
|
5977 |
|
5978 |
-
|
5979 |
-
|
|
|
|
|
|
|
|
|
5980 |
}
|
|
|
5981 |
|
5982 |
-
|
5983 |
-
|
|
|
|
|
|
|
5984 |
|
5985 |
-
|
5986 |
-
|
5987 |
-
|
5988 |
-
|
5989 |
-
callback.call(
|
5990 |
-
table && jQuery.nodeName( this[i], "table" ) ?
|
5991 |
-
findOrAppend( this[i], "tbody" ) :
|
5992 |
-
this[i],
|
5993 |
-
i === iNoClone ?
|
5994 |
-
fragment :
|
5995 |
-
jQuery.clone( fragment, true, true )
|
5996 |
-
);
|
5997 |
-
}
|
5998 |
}
|
|
|
|
|
|
|
5999 |
|
6000 |
-
|
6001 |
-
|
6002 |
-
|
6003 |
-
|
6004 |
-
|
6005 |
-
|
6006 |
-
|
6007 |
-
|
6008 |
-
|
6009 |
-
|
6010 |
-
|
6011 |
-
|
6012 |
-
|
6013 |
-
|
6014 |
-
|
6015 |
-
|
6016 |
-
|
6017 |
-
|
6018 |
-
|
6019 |
-
|
6020 |
-
}
|
6021 |
|
6022 |
-
|
6023 |
-
|
6024 |
-
|
6025 |
-
|
|
|
|
|
6026 |
}
|
6027 |
}
|
6028 |
|
6029 |
-
|
|
|
|
|
6030 |
}
|
6031 |
-
});
|
6032 |
-
|
6033 |
-
function findOrAppend( elem, tag ) {
|
6034 |
-
return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) );
|
6035 |
}
|
6036 |
|
6037 |
-
function
|
|
|
6038 |
|
6039 |
-
|
6040 |
-
|
6041 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
6042 |
|
6043 |
-
|
6044 |
-
|
6045 |
-
|
6046 |
-
|
6047 |
|
6048 |
-
|
6049 |
-
|
6050 |
-
|
|
|
6051 |
|
6052 |
-
|
6053 |
-
|
6054 |
-
|
|
|
|
|
|
|
|
|
6055 |
}
|
|
|
|
|
6056 |
}
|
6057 |
}
|
6058 |
-
|
6059 |
-
// make the cloned public data object a copy from the original
|
6060 |
-
if ( curData.data ) {
|
6061 |
-
curData.data = jQuery.extend( {}, curData.data );
|
6062 |
-
}
|
6063 |
}
|
6064 |
|
6065 |
-
function
|
6066 |
-
var
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6067 |
|
6068 |
-
|
6069 |
-
|
6070 |
-
|
|
|
|
|
6071 |
}
|
6072 |
|
6073 |
-
|
6074 |
-
// but also removes the attachEvent events, which we *do* want
|
6075 |
-
if ( dest.clearAttributes ) {
|
6076 |
-
dest.clearAttributes();
|
6077 |
-
}
|
6078 |
|
6079 |
-
|
6080 |
-
|
6081 |
-
if ( dest.mergeAttributes ) {
|
6082 |
-
dest.mergeAttributes( src );
|
6083 |
}
|
6084 |
|
6085 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
6086 |
|
6087 |
-
|
6088 |
-
|
6089 |
-
|
6090 |
-
|
6091 |
-
|
6092 |
-
|
6093 |
|
6094 |
-
|
6095 |
-
|
6096 |
-
|
6097 |
-
|
6098 |
-
|
6099 |
-
|
|
|
6100 |
}
|
6101 |
|
6102 |
-
|
6103 |
-
|
6104 |
-
|
6105 |
-
// a checked appearance if the defaultChecked value isn't also set
|
6106 |
-
|
6107 |
-
dest.defaultChecked = dest.checked = src.checked;
|
6108 |
|
6109 |
-
|
6110 |
-
|
6111 |
-
|
6112 |
-
|
6113 |
}
|
|
|
6114 |
|
6115 |
-
|
6116 |
-
|
6117 |
-
|
6118 |
-
|
6119 |
-
|
6120 |
-
|
6121 |
-
// cloning other types of input fields
|
6122 |
-
} else if ( nodeName === "input" || nodeName === "textarea" ) {
|
6123 |
-
dest.defaultValue = src.defaultValue;
|
6124 |
-
|
6125 |
-
// IE blanks contents when cloning scripts
|
6126 |
-
} else if ( nodeName === "script" && dest.text !== src.text ) {
|
6127 |
-
dest.text = src.text;
|
6128 |
}
|
|
|
6129 |
|
6130 |
-
|
6131 |
-
|
6132 |
-
|
6133 |
-
|
6134 |
-
|
6135 |
-
|
6136 |
-
|
6137 |
-
first = args[ 0 ];
|
6138 |
-
|
6139 |
-
// Set context from what may come in as undefined or a jQuery collection or a node
|
6140 |
-
// Updated to fix #12266 where accessing context[0] could throw an exception in IE9/10 &
|
6141 |
-
// also doubles as fix for #8950 where plain objects caused createDocumentFragment exception
|
6142 |
-
context = context || document;
|
6143 |
-
context = !context.nodeType && context[0] || context;
|
6144 |
-
context = context.ownerDocument || context;
|
6145 |
|
6146 |
-
|
6147 |
-
|
6148 |
-
// IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
|
6149 |
-
// Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
|
6150 |
-
// Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501
|
6151 |
-
if ( args.length === 1 && typeof first === "string" && first.length < 512 && context === document &&
|
6152 |
-
first.charAt(0) === "<" && !rnocache.test( first ) &&
|
6153 |
-
(jQuery.support.checkClone || !rchecked.test( first )) &&
|
6154 |
-
(jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {
|
6155 |
|
6156 |
-
|
6157 |
-
|
6158 |
-
|
6159 |
-
cachehit = fragment !== undefined;
|
6160 |
}
|
6161 |
|
6162 |
-
|
6163 |
-
|
6164 |
-
jQuery.clean( args, context, fragment, scripts );
|
6165 |
|
6166 |
-
|
6167 |
-
|
6168 |
-
|
6169 |
-
jQuery.fragments[ first ] = cachehit && fragment;
|
6170 |
}
|
6171 |
-
}
|
6172 |
-
|
6173 |
-
return { fragment: fragment, cacheable: cacheable };
|
6174 |
-
};
|
6175 |
-
|
6176 |
-
jQuery.fragments = {};
|
6177 |
-
|
6178 |
-
jQuery.each({
|
6179 |
-
appendTo: "append",
|
6180 |
-
prependTo: "prepend",
|
6181 |
-
insertBefore: "before",
|
6182 |
-
insertAfter: "after",
|
6183 |
-
replaceAll: "replaceWith"
|
6184 |
-
}, function( name, original ) {
|
6185 |
-
jQuery.fn[ name ] = function( selector ) {
|
6186 |
-
var elems,
|
6187 |
-
i = 0,
|
6188 |
-
ret = [],
|
6189 |
-
insert = jQuery( selector ),
|
6190 |
-
l = insert.length,
|
6191 |
-
parent = this.length === 1 && this[0].parentNode;
|
6192 |
-
|
6193 |
-
if ( (parent == null || parent && parent.nodeType === 11 && parent.childNodes.length === 1) && l === 1 ) {
|
6194 |
-
insert[ original ]( this[0] );
|
6195 |
-
return this;
|
6196 |
-
} else {
|
6197 |
-
for ( ; i < l; i++ ) {
|
6198 |
-
elems = ( i > 0 ? this.clone(true) : this ).get();
|
6199 |
-
jQuery( insert[i] )[ original ]( elems );
|
6200 |
-
ret = ret.concat( elems );
|
6201 |
-
}
|
6202 |
|
6203 |
-
|
|
|
6204 |
}
|
6205 |
};
|
6206 |
-
});
|
6207 |
|
6208 |
-
|
6209 |
-
|
6210 |
-
return elem.getElementsByTagName( "*" );
|
6211 |
|
6212 |
-
|
6213 |
-
|
6214 |
|
6215 |
-
|
6216 |
-
return
|
6217 |
-
}
|
6218 |
-
}
|
6219 |
|
6220 |
-
//
|
6221 |
-
|
6222 |
-
|
6223 |
-
|
6224 |
-
|
6225 |
-
|
|
|
|
|
|
|
6226 |
|
6227 |
-
|
6228 |
-
|
6229 |
-
|
6230 |
-
|
6231 |
-
|
6232 |
-
|
6233 |
|
6234 |
-
|
6235 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6236 |
|
6237 |
-
|
6238 |
-
|
6239 |
-
|
6240 |
-
|
|
|
|
|
|
|
6241 |
}
|
6242 |
|
6243 |
-
|
6244 |
-
|
6245 |
-
|
6246 |
-
|
6247 |
-
|
6248 |
-
// proprietary methods to clear the events. Thanks to MooTools
|
6249 |
-
// guys for this hotness.
|
6250 |
-
|
6251 |
-
cloneFixAttributes( elem, clone );
|
6252 |
|
6253 |
-
|
6254 |
-
|
6255 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6256 |
|
6257 |
-
|
6258 |
-
|
6259 |
-
|
6260 |
-
|
6261 |
-
|
6262 |
-
if ( destElements[i] ) {
|
6263 |
-
cloneFixAttributes( srcElements[i], destElements[i] );
|
6264 |
}
|
6265 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6266 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6267 |
|
6268 |
-
|
6269 |
-
|
6270 |
-
cloneCopyEvent( elem, clone );
|
6271 |
|
6272 |
-
|
6273 |
-
|
6274 |
-
|
|
|
|
|
|
|
6275 |
|
6276 |
-
|
6277 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6278 |
}
|
6279 |
}
|
6280 |
-
}
|
6281 |
|
6282 |
-
|
|
|
|
|
|
|
|
|
6283 |
|
6284 |
-
|
6285 |
-
|
6286 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6287 |
|
6288 |
-
|
6289 |
-
var i, j, elem, tag, wrap, depth, div, hasBody, tbody, len, handleScript, jsTags,
|
6290 |
-
safe = context === document && safeFragment,
|
6291 |
-
ret = [];
|
6292 |
|
6293 |
-
|
6294 |
-
|
6295 |
-
|
|
|
|
|
6296 |
}
|
|
|
6297 |
|
6298 |
-
|
6299 |
-
|
6300 |
-
|
6301 |
-
|
6302 |
-
|
6303 |
-
|
6304 |
-
if ( !elem ) {
|
6305 |
-
continue;
|
6306 |
-
}
|
6307 |
|
6308 |
-
|
6309 |
-
|
6310 |
-
|
6311 |
-
|
6312 |
-
|
6313 |
-
|
6314 |
-
|
6315 |
-
|
6316 |
-
safe.appendChild( div );
|
6317 |
|
6318 |
-
|
6319 |
-
elem = elem.replace(rxhtmlTag, "<$1></$2>");
|
6320 |
|
6321 |
-
|
6322 |
-
|
6323 |
-
|
6324 |
-
|
6325 |
-
|
6326 |
|
6327 |
-
|
6328 |
-
|
6329 |
-
|
6330 |
-
|
6331 |
|
6332 |
-
|
6333 |
-
|
|
|
|
|
|
|
|
|
6334 |
|
6335 |
-
// String was a <table>, *may* have spurious <tbody>
|
6336 |
-
hasBody = rtbody.test(elem);
|
6337 |
-
tbody = tag === "table" && !hasBody ?
|
6338 |
-
div.firstChild && div.firstChild.childNodes :
|
6339 |
-
|
6340 |
-
// String was a bare <thead> or <tfoot>
|
6341 |
-
wrap[1] === "<table>" && !hasBody ?
|
6342 |
-
div.childNodes :
|
6343 |
-
[];
|
6344 |
-
|
6345 |
-
for ( j = tbody.length - 1; j >= 0 ; --j ) {
|
6346 |
-
if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
|
6347 |
-
tbody[ j ].parentNode.removeChild( tbody[ j ] );
|
6348 |
-
}
|
6349 |
-
}
|
6350 |
-
}
|
6351 |
|
6352 |
-
|
6353 |
-
|
6354 |
-
|
6355 |
-
|
|
|
6356 |
|
6357 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
6358 |
|
6359 |
-
// Take out of fragment container (we need a fresh div each time)
|
6360 |
-
div.parentNode.removeChild( div );
|
6361 |
-
}
|
6362 |
-
}
|
6363 |
|
6364 |
-
|
6365 |
-
|
6366 |
-
|
6367 |
-
jQuery.merge( ret, elem );
|
6368 |
-
}
|
6369 |
-
}
|
6370 |
|
6371 |
-
|
6372 |
-
|
6373 |
-
|
6374 |
-
|
|
|
6375 |
|
6376 |
-
|
6377 |
-
|
6378 |
-
|
6379 |
-
|
6380 |
-
if ( jQuery.nodeName( elem, "input" ) ) {
|
6381 |
-
fixDefaultChecked( elem );
|
6382 |
-
} else if ( typeof elem.getElementsByTagName !== "undefined" ) {
|
6383 |
-
jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked );
|
6384 |
-
}
|
6385 |
-
}
|
6386 |
-
}
|
6387 |
|
6388 |
-
|
6389 |
-
if ( fragment ) {
|
6390 |
-
// Special handling of each script element
|
6391 |
-
handleScript = function( elem ) {
|
6392 |
-
// Check if we consider it executable
|
6393 |
-
if ( !elem.type || rscriptType.test( elem.type ) ) {
|
6394 |
-
// Detach the script and store it in the scripts array (if provided) or the fragment
|
6395 |
-
// Return truthy to indicate that it has been handled
|
6396 |
-
return scripts ?
|
6397 |
-
scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) :
|
6398 |
-
fragment.appendChild( elem );
|
6399 |
-
}
|
6400 |
-
};
|
6401 |
|
6402 |
-
|
6403 |
-
|
6404 |
-
if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) {
|
6405 |
-
// Append to fragment and handle embedded scripts
|
6406 |
-
fragment.appendChild( elem );
|
6407 |
-
if ( typeof elem.getElementsByTagName !== "undefined" ) {
|
6408 |
-
// handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration
|
6409 |
-
jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript );
|
6410 |
-
|
6411 |
-
// Splice the scripts into ret after their former ancestor and advance our index beyond them
|
6412 |
-
ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
|
6413 |
-
i += jsTags.length;
|
6414 |
-
}
|
6415 |
-
}
|
6416 |
-
}
|
6417 |
-
}
|
6418 |
|
6419 |
-
|
6420 |
-
|
|
|
6421 |
|
6422 |
-
|
6423 |
-
|
6424 |
-
|
6425 |
-
internalKey = jQuery.expando,
|
6426 |
-
cache = jQuery.cache,
|
6427 |
-
deleteExpando = jQuery.support.deleteExpando,
|
6428 |
-
special = jQuery.event.special;
|
6429 |
|
6430 |
-
|
|
|
6431 |
|
6432 |
-
|
|
|
|
|
6433 |
|
6434 |
-
|
6435 |
-
|
6436 |
|
6437 |
-
|
6438 |
-
|
6439 |
-
|
6440 |
-
|
6441 |
-
jQuery.event.remove( elem, type );
|
6442 |
|
6443 |
-
|
6444 |
-
|
6445 |
-
|
6446 |
-
|
6447 |
-
|
6448 |
-
}
|
6449 |
|
6450 |
-
|
6451 |
-
|
|
|
|
|
|
|
6452 |
|
6453 |
-
delete cache[ id ];
|
6454 |
|
6455 |
-
|
6456 |
-
// nor does it have a removeAttribute function on Document nodes;
|
6457 |
-
// we must handle all of these cases
|
6458 |
-
if ( deleteExpando ) {
|
6459 |
-
delete elem[ internalKey ];
|
6460 |
|
6461 |
-
|
6462 |
-
|
|
|
|
|
6463 |
|
6464 |
-
|
6465 |
-
|
6466 |
-
|
6467 |
|
6468 |
-
|
6469 |
-
|
6470 |
}
|
6471 |
-
}
|
6472 |
-
}
|
6473 |
-
}
|
6474 |
-
});
|
6475 |
-
// Limit scope pollution from any deprecated API
|
6476 |
-
(function() {
|
6477 |
|
6478 |
-
|
6479 |
|
6480 |
-
|
6481 |
-
//
|
6482 |
-
|
6483 |
-
|
6484 |
-
|
|
|
6485 |
|
6486 |
-
|
6487 |
-
|
6488 |
-
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) ||
|
6489 |
-
/(msie) ([\w.]+)/.exec( ua ) ||
|
6490 |
-
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) ||
|
6491 |
-
[];
|
6492 |
|
6493 |
-
|
6494 |
-
browser: match[ 1 ] || "",
|
6495 |
-
version: match[ 2 ] || "0"
|
6496 |
-
};
|
6497 |
-
};
|
6498 |
|
6499 |
-
|
6500 |
-
|
6501 |
|
6502 |
-
if (
|
6503 |
-
|
6504 |
-
|
6505 |
-
}
|
6506 |
|
6507 |
-
|
6508 |
-
|
6509 |
-
|
6510 |
-
|
6511 |
-
|
6512 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6513 |
|
6514 |
-
jQuery.
|
6515 |
|
6516 |
-
|
6517 |
-
|
6518 |
-
|
|
|
|
|
6519 |
}
|
6520 |
-
|
6521 |
-
jQuerySub.superclass = this;
|
6522 |
-
jQuerySub.fn = jQuerySub.prototype = this();
|
6523 |
-
jQuerySub.fn.constructor = jQuerySub;
|
6524 |
-
jQuerySub.sub = this.sub;
|
6525 |
-
jQuerySub.fn.init = function init( selector, context ) {
|
6526 |
-
if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
|
6527 |
-
context = jQuerySub( context );
|
6528 |
-
}
|
6529 |
|
6530 |
-
|
6531 |
-
|
6532 |
-
|
6533 |
-
|
6534 |
-
|
6535 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6536 |
|
6537 |
-
|
6538 |
-
|
6539 |
-
|
6540 |
-
ropacity = /opacity=([^)]*)/,
|
6541 |
-
rposition = /^(top|right|bottom|left)$/,
|
6542 |
-
// swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
|
6543 |
-
// see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
|
6544 |
-
rdisplayswap = /^(none|table(?!-c[ea]).+)/,
|
6545 |
-
rmargin = /^margin/,
|
6546 |
-
rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ),
|
6547 |
-
rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ),
|
6548 |
-
rrelNum = new RegExp( "^([-+])=(" + core_pnum + ")", "i" ),
|
6549 |
-
elemdisplay = { BODY: "block" },
|
6550 |
|
6551 |
-
|
6552 |
-
|
6553 |
-
|
6554 |
-
|
6555 |
-
|
6556 |
|
6557 |
-
|
6558 |
-
|
6559 |
|
6560 |
-
|
|
|
|
|
|
|
6561 |
|
6562 |
-
// return
|
6563 |
-
|
|
|
|
|
6564 |
|
6565 |
-
|
6566 |
-
|
6567 |
-
return name;
|
6568 |
-
}
|
6569 |
|
6570 |
-
|
6571 |
-
|
6572 |
-
|
6573 |
-
|
|
|
6574 |
|
6575 |
-
|
6576 |
-
|
6577 |
-
if ( name in style ) {
|
6578 |
-
return name;
|
6579 |
-
}
|
6580 |
-
}
|
6581 |
|
6582 |
-
|
6583 |
-
}
|
6584 |
|
6585 |
-
|
6586 |
-
|
6587 |
-
|
6588 |
-
|
|
|
|
|
6589 |
|
6590 |
-
|
6591 |
-
var elem, display,
|
6592 |
-
values = [],
|
6593 |
-
index = 0,
|
6594 |
-
length = elements.length;
|
6595 |
|
6596 |
-
|
6597 |
-
|
6598 |
-
|
6599 |
-
continue;
|
6600 |
-
}
|
6601 |
-
values[ index ] = jQuery._data( elem, "olddisplay" );
|
6602 |
-
if ( show ) {
|
6603 |
-
// Reset the inline display of this element to learn if it is
|
6604 |
-
// being hidden by cascaded rules or not
|
6605 |
-
if ( !values[ index ] && elem.style.display === "none" ) {
|
6606 |
-
elem.style.display = "";
|
6607 |
-
}
|
6608 |
|
6609 |
-
|
6610 |
-
|
6611 |
-
|
6612 |
-
|
6613 |
-
|
6614 |
-
|
6615 |
-
|
6616 |
-
|
|
|
6617 |
|
6618 |
-
|
6619 |
-
jQuery._data( elem, "olddisplay", display );
|
6620 |
}
|
6621 |
}
|
6622 |
}
|
|
|
6623 |
|
6624 |
-
|
6625 |
-
|
6626 |
-
|
6627 |
-
elem
|
6628 |
-
|
6629 |
-
|
6630 |
-
|
6631 |
-
if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
|
6632 |
-
elem.style.display = show ? values[ index ] || "" : "none";
|
6633 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6634 |
}
|
|
|
|
|
|
|
6635 |
|
6636 |
-
|
6637 |
-
|
|
|
|
|
|
|
|
|
6638 |
|
6639 |
jQuery.fn.extend({
|
6640 |
-
|
6641 |
-
return
|
6642 |
-
return value !== undefined ?
|
6643 |
-
jQuery.style( elem, name, value ) :
|
6644 |
-
jQuery.css( elem, name );
|
6645 |
-
}, name, value, arguments.length > 1 );
|
6646 |
-
},
|
6647 |
-
show: function() {
|
6648 |
-
return showHide( this, true );
|
6649 |
-
},
|
6650 |
-
hide: function() {
|
6651 |
-
return showHide( this );
|
6652 |
},
|
6653 |
-
toggle: function( state, fn2 ) {
|
6654 |
-
var bool = typeof state === "boolean";
|
6655 |
-
|
6656 |
-
if ( jQuery.isFunction( state ) && jQuery.isFunction( fn2 ) ) {
|
6657 |
-
return eventsToggle.apply( this, arguments );
|
6658 |
-
}
|
6659 |
|
|
|
6660 |
return this.each(function() {
|
6661 |
-
|
6662 |
-
jQuery( this ).show();
|
6663 |
-
} else {
|
6664 |
-
jQuery( this ).hide();
|
6665 |
-
}
|
6666 |
});
|
6667 |
}
|
6668 |
});
|
6669 |
|
6670 |
jQuery.extend({
|
6671 |
-
|
6672 |
-
|
6673 |
-
|
6674 |
-
opacity: {
|
6675 |
-
get: function( elem, computed ) {
|
6676 |
-
if ( computed ) {
|
6677 |
-
// We should always get a number back from opacity
|
6678 |
-
var ret = curCSS( elem, "opacity" );
|
6679 |
-
return ret === "" ? "1" : ret;
|
6680 |
-
|
6681 |
-
}
|
6682 |
-
}
|
6683 |
-
}
|
6684 |
-
},
|
6685 |
-
|
6686 |
-
// Exclude the following css properties to add px
|
6687 |
-
cssNumber: {
|
6688 |
-
"fillOpacity": true,
|
6689 |
-
"fontWeight": true,
|
6690 |
-
"lineHeight": true,
|
6691 |
-
"opacity": true,
|
6692 |
-
"orphans": true,
|
6693 |
-
"widows": true,
|
6694 |
-
"zIndex": true,
|
6695 |
-
"zoom": true
|
6696 |
-
},
|
6697 |
-
|
6698 |
-
// Add in properties whose names you wish to fix before
|
6699 |
-
// setting or getting the value
|
6700 |
-
cssProps: {
|
6701 |
-
// normalize float css property
|
6702 |
-
"float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
|
6703 |
-
},
|
6704 |
|
6705 |
-
|
6706 |
-
|
6707 |
-
// Don't set styles on text and comment nodes
|
6708 |
-
if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
|
6709 |
return;
|
6710 |
}
|
6711 |
|
6712 |
-
//
|
6713 |
-
|
6714 |
-
|
6715 |
-
|
6716 |
-
|
6717 |
-
name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
|
6718 |
|
6719 |
-
//
|
6720 |
-
//
|
6721 |
-
|
|
|
|
|
|
|
|
|
6722 |
|
6723 |
-
// Check if we're setting a value
|
6724 |
if ( value !== undefined ) {
|
6725 |
-
type = typeof value;
|
6726 |
|
6727 |
-
|
6728 |
-
|
6729 |
-
value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
|
6730 |
-
// Fixes bug #9237
|
6731 |
-
type = "number";
|
6732 |
-
}
|
6733 |
|
6734 |
-
|
6735 |
-
|
6736 |
-
return;
|
6737 |
-
}
|
6738 |
|
6739 |
-
|
6740 |
-
|
6741 |
-
value
|
6742 |
}
|
6743 |
|
6744 |
-
|
6745 |
-
|
6746 |
-
// Wrapped to prevent IE from throwing errors when 'invalid' values are provided
|
6747 |
-
// Fixes bug #5509
|
6748 |
-
try {
|
6749 |
-
style[ name ] = value;
|
6750 |
-
} catch(e) {}
|
6751 |
-
}
|
6752 |
|
6753 |
} else {
|
6754 |
-
|
6755 |
-
if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
|
6756 |
-
return ret;
|
6757 |
-
}
|
6758 |
|
6759 |
-
//
|
6760 |
-
return
|
|
|
|
|
6761 |
}
|
6762 |
},
|
6763 |
|
6764 |
-
|
6765 |
-
var
|
6766 |
-
|
|
|
6767 |
|
6768 |
-
|
6769 |
-
|
|
|
6770 |
|
6771 |
-
|
6772 |
-
|
6773 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6774 |
|
6775 |
-
|
6776 |
-
|
6777 |
-
|
6778 |
-
|
6779 |
|
6780 |
-
|
6781 |
-
|
6782 |
-
val = curCSS( elem, name );
|
6783 |
}
|
|
|
6784 |
|
6785 |
-
|
6786 |
-
|
6787 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6788 |
}
|
|
|
|
|
6789 |
|
6790 |
-
|
6791 |
-
|
6792 |
-
|
6793 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6794 |
}
|
6795 |
-
return val;
|
6796 |
-
},
|
6797 |
|
6798 |
-
|
6799 |
-
|
6800 |
-
|
6801 |
-
old = {};
|
6802 |
|
6803 |
-
|
6804 |
-
|
6805 |
-
old[ name ] = elem.style[ name ];
|
6806 |
-
elem.style[ name ] = options[ name ];
|
6807 |
-
}
|
6808 |
|
6809 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6810 |
|
6811 |
-
|
6812 |
-
|
6813 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6814 |
}
|
|
|
|
|
6815 |
|
6816 |
-
|
6817 |
-
|
6818 |
-
});
|
6819 |
|
6820 |
-
//
|
6821 |
-
//
|
6822 |
-
|
6823 |
-
|
6824 |
-
|
6825 |
-
|
6826 |
-
|
|
|
|
|
|
|
|
|
6827 |
|
6828 |
-
|
6829 |
|
6830 |
-
//
|
6831 |
-
|
|
|
|
|
|
|
|
|
6832 |
|
6833 |
-
|
6834 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
6835 |
}
|
|
|
6836 |
|
6837 |
-
|
6838 |
-
|
6839 |
-
|
6840 |
-
|
6841 |
-
if (
|
6842 |
-
|
6843 |
-
|
6844 |
-
|
|
|
|
|
6845 |
|
6846 |
-
|
6847 |
-
|
|
|
|
|
|
|
|
|
|
|
6848 |
|
6849 |
-
|
6850 |
-
|
6851 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
6852 |
}
|
6853 |
-
}
|
|
|
|
|
6854 |
|
6855 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6856 |
};
|
6857 |
-
}
|
6858 |
-
curCSS = function( elem, name ) {
|
6859 |
-
var left, rsLeft,
|
6860 |
-
ret = elem.currentStyle && elem.currentStyle[ name ],
|
6861 |
-
style = elem.style;
|
6862 |
|
6863 |
-
// Avoid setting ret to empty string here
|
6864 |
-
// so we don't default to auto
|
6865 |
-
if ( ret == null && style && style[ name ] ) {
|
6866 |
-
ret = style[ name ];
|
6867 |
-
}
|
6868 |
|
6869 |
-
// From the awesome hack by Dean Edwards
|
6870 |
-
// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
|
6871 |
|
6872 |
-
// If we're not dealing with a regular pixel number
|
6873 |
-
// but a number that has a weird ending, we need to convert it to pixels
|
6874 |
-
// but not position css attributes, as those are proportional to the parent element instead
|
6875 |
-
// and we can't measure the parent instead because it might trigger a "stacking dolls" problem
|
6876 |
-
if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
|
6877 |
|
6878 |
-
|
6879 |
-
|
6880 |
-
rsLeft = elem.runtimeStyle && elem.runtimeStyle.left;
|
6881 |
|
6882 |
-
|
6883 |
-
|
6884 |
-
|
6885 |
-
|
6886 |
-
style.left = name === "fontSize" ? "1em" : ret;
|
6887 |
-
ret = style.pixelLeft + "px";
|
6888 |
|
6889 |
-
|
6890 |
-
|
6891 |
-
|
6892 |
-
|
6893 |
-
|
6894 |
-
|
|
|
|
|
|
|
|
|
|
|
6895 |
|
6896 |
-
|
6897 |
-
|
6898 |
-
|
|
|
|
|
6899 |
|
6900 |
-
function
|
6901 |
-
|
6902 |
-
|
6903 |
-
Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
|
6904 |
-
value;
|
6905 |
-
}
|
6906 |
|
6907 |
-
|
6908 |
-
|
6909 |
-
|
6910 |
-
|
6911 |
-
// Otherwise initialize for horizontal or vertical properties
|
6912 |
-
name === "width" ? 1 : 0,
|
6913 |
|
6914 |
-
|
6915 |
|
6916 |
-
|
6917 |
-
|
6918 |
-
|
6919 |
-
|
6920 |
-
// because of the reliableMarginRight CSS hook!
|
6921 |
-
val += jQuery.css( elem, extra + cssExpand[ i ], true );
|
6922 |
}
|
6923 |
|
6924 |
-
|
6925 |
-
|
6926 |
-
|
6927 |
-
|
6928 |
-
val -= parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0;
|
6929 |
-
}
|
6930 |
|
6931 |
-
// at this point, extra isn't border nor margin, so remove border
|
6932 |
-
if ( extra !== "margin" ) {
|
6933 |
-
val -= parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0;
|
6934 |
-
}
|
6935 |
} else {
|
6936 |
-
|
6937 |
-
|
|
|
|
|
|
|
6938 |
|
6939 |
-
|
6940 |
-
|
6941 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6942 |
}
|
6943 |
}
|
6944 |
}
|
|
|
6945 |
|
6946 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6947 |
}
|
6948 |
|
6949 |
-
|
6950 |
-
|
6951 |
-
|
6952 |
-
|
6953 |
-
|
6954 |
-
|
|
|
6955 |
|
6956 |
-
|
6957 |
-
|
6958 |
-
// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
|
6959 |
-
if ( val <= 0 || val == null ) {
|
6960 |
-
// Fall back to computed then uncomputed css if necessary
|
6961 |
-
val = curCSS( elem, name );
|
6962 |
-
if ( val < 0 || val == null ) {
|
6963 |
-
val = elem.style[ name ];
|
6964 |
-
}
|
6965 |
|
6966 |
-
|
6967 |
-
|
6968 |
-
|
|
|
|
|
|
|
6969 |
}
|
|
|
|
|
6970 |
|
6971 |
-
|
6972 |
-
|
6973 |
-
|
6974 |
-
|
6975 |
-
|
6976 |
-
|
6977 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6978 |
|
6979 |
-
|
6980 |
-
|
6981 |
-
|
6982 |
-
elem,
|
6983 |
-
name,
|
6984 |
-
extra || ( isBorderBox ? "border" : "content" ),
|
6985 |
-
valueIsBorderBox
|
6986 |
-
)
|
6987 |
-
) + "px";
|
6988 |
}
|
6989 |
|
6990 |
|
6991 |
-
// Try to determine the default display value of an element
|
6992 |
-
function css_defaultDisplay( nodeName ) {
|
6993 |
-
if ( elemdisplay[ nodeName ] ) {
|
6994 |
-
return elemdisplay[ nodeName ];
|
6995 |
-
}
|
6996 |
|
6997 |
-
var elem = jQuery( "<" + nodeName + ">" ).appendTo( document.body ),
|
6998 |
-
display = elem.css("display");
|
6999 |
-
elem.remove();
|
7000 |
|
7001 |
-
|
7002 |
-
// get element's real default display by attaching it to a temp iframe
|
7003 |
-
if ( display === "none" || display === "" ) {
|
7004 |
-
// Use the already-created iframe if possible
|
7005 |
-
iframe = document.body.appendChild(
|
7006 |
-
iframe || jQuery.extend( document.createElement("iframe"), {
|
7007 |
-
frameBorder: 0,
|
7008 |
-
width: 0,
|
7009 |
-
height: 0
|
7010 |
-
})
|
7011 |
-
);
|
7012 |
|
7013 |
-
|
7014 |
-
|
7015 |
-
|
7016 |
-
|
7017 |
-
|
7018 |
-
|
7019 |
-
iframeDoc.close();
|
7020 |
-
}
|
7021 |
|
7022 |
-
|
|
|
|
|
|
|
|
|
7023 |
|
7024 |
-
|
7025 |
-
|
7026 |
-
|
7027 |
|
7028 |
-
|
7029 |
-
|
|
|
|
|
|
|
|
|
7030 |
|
7031 |
-
|
7032 |
-
|
|
|
|
|
|
|
|
|
|
|
7033 |
|
7034 |
-
|
7035 |
-
|
7036 |
-
|
7037 |
-
|
7038 |
-
|
7039 |
-
// however, it must have a current display style that would benefit from this
|
7040 |
-
if ( elem.offsetWidth === 0 && rdisplayswap.test( curCSS( elem, "display" ) ) ) {
|
7041 |
-
return jQuery.swap( elem, cssShow, function() {
|
7042 |
-
return getWidthOrHeight( elem, name, extra );
|
7043 |
-
});
|
7044 |
-
} else {
|
7045 |
-
return getWidthOrHeight( elem, name, extra );
|
7046 |
}
|
7047 |
}
|
7048 |
-
},
|
7049 |
-
|
7050 |
-
set: function( elem, value, extra ) {
|
7051 |
-
return setPositiveNumber( elem, value, extra ?
|
7052 |
-
augmentWidthOrHeight(
|
7053 |
-
elem,
|
7054 |
-
name,
|
7055 |
-
extra,
|
7056 |
-
jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box"
|
7057 |
-
) : 0
|
7058 |
-
);
|
7059 |
}
|
7060 |
-
};
|
7061 |
-
});
|
7062 |
|
7063 |
-
|
7064 |
-
|
7065 |
-
get: function( elem, computed ) {
|
7066 |
-
// IE uses filters for opacity
|
7067 |
-
return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
|
7068 |
-
( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
|
7069 |
-
computed ? "1" : "";
|
7070 |
-
},
|
7071 |
|
7072 |
-
|
7073 |
-
|
7074 |
-
|
7075 |
-
|
7076 |
-
|
7077 |
|
7078 |
-
|
7079 |
-
|
7080 |
-
|
|
|
|
|
|
|
|
|
7081 |
|
7082 |
-
|
7083 |
-
|
7084 |
-
|
|
|
|
|
|
|
|
|
7085 |
|
7086 |
-
|
7087 |
-
|
7088 |
-
|
7089 |
-
|
|
|
|
|
|
|
|
|
7090 |
|
7091 |
-
|
7092 |
-
|
7093 |
-
|
|
|
|
|
7094 |
}
|
7095 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7096 |
|
7097 |
-
|
7098 |
-
|
7099 |
-
|
7100 |
-
|
7101 |
}
|
7102 |
-
};
|
7103 |
-
}
|
7104 |
|
7105 |
-
|
7106 |
-
|
7107 |
-
|
7108 |
-
|
7109 |
-
|
7110 |
-
|
7111 |
-
|
7112 |
-
// Work around by temporarily setting element display to inline-block
|
7113 |
-
return jQuery.swap( elem, { "display": "inline-block" }, function() {
|
7114 |
-
if ( computed ) {
|
7115 |
-
return curCSS( elem, "marginRight" );
|
7116 |
-
}
|
7117 |
-
});
|
7118 |
-
}
|
7119 |
-
};
|
7120 |
-
}
|
7121 |
|
7122 |
-
|
7123 |
-
|
7124 |
-
|
7125 |
-
|
7126 |
-
|
7127 |
-
|
7128 |
-
get: function( elem, computed ) {
|
7129 |
-
if ( computed ) {
|
7130 |
-
var ret = curCSS( elem, prop );
|
7131 |
-
// if curCSS returns percentage, fallback to offset
|
7132 |
-
return rnumnonpx.test( ret ) ? jQuery( elem ).position()[ prop ] + "px" : ret;
|
7133 |
}
|
7134 |
}
|
7135 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7136 |
});
|
7137 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7138 |
|
|
|
|
|
7139 |
});
|
7140 |
|
7141 |
-
if ( jQuery.expr && jQuery.expr.filters ) {
|
7142 |
-
jQuery.expr.filters.hidden = function( elem ) {
|
7143 |
-
return ( elem.offsetWidth === 0 && elem.offsetHeight === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || curCSS( elem, "display" )) === "none");
|
7144 |
-
};
|
7145 |
|
7146 |
-
jQuery.expr.filters.visible = function( elem ) {
|
7147 |
-
return !jQuery.expr.filters.hidden( elem );
|
7148 |
-
};
|
7149 |
-
}
|
7150 |
|
7151 |
-
// These hooks are used by animate to expand properties
|
7152 |
-
jQuery.each({
|
7153 |
-
margin: "",
|
7154 |
-
padding: "",
|
7155 |
-
border: "Width"
|
7156 |
-
}, function( prefix, suffix ) {
|
7157 |
-
jQuery.cssHooks[ prefix + suffix ] = {
|
7158 |
-
expand: function( value ) {
|
7159 |
-
var i,
|
7160 |
|
7161 |
-
|
7162 |
-
parts = typeof value === "string" ? value.split(" ") : [ value ],
|
7163 |
-
expanded = {};
|
7164 |
|
7165 |
-
for ( i = 0; i < 4; i++ ) {
|
7166 |
-
expanded[ prefix + cssExpand[ i ] + suffix ] =
|
7167 |
-
parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
|
7168 |
-
}
|
7169 |
|
7170 |
-
|
7171 |
-
|
7172 |
-
|
7173 |
|
7174 |
-
|
7175 |
-
|
7176 |
-
|
|
|
|
|
|
|
7177 |
});
|
7178 |
-
var r20 = /%20/g,
|
7179 |
-
rbracket = /\[\]$/,
|
7180 |
-
rCRLF = /\r?\n/g,
|
7181 |
-
rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
|
7182 |
-
rselectTextarea = /^(?:select|textarea)/i;
|
7183 |
|
7184 |
jQuery.fn.extend({
|
7185 |
-
|
7186 |
-
return
|
7187 |
},
|
7188 |
-
serializeArray: function() {
|
7189 |
-
return this.map(function(){
|
7190 |
-
return this.elements ? jQuery.makeArray( this.elements ) : this;
|
7191 |
-
})
|
7192 |
-
.filter(function(){
|
7193 |
-
return this.name && !this.disabled &&
|
7194 |
-
( this.checked || rselectTextarea.test( this.nodeName ) ||
|
7195 |
-
rinput.test( this.type ) );
|
7196 |
-
})
|
7197 |
-
.map(function( i, elem ){
|
7198 |
-
var val = jQuery( this ).val();
|
7199 |
|
7200 |
-
|
7201 |
-
|
7202 |
-
|
7203 |
-
|
7204 |
-
|
7205 |
-
|
7206 |
-
|
7207 |
-
|
|
|
|
|
|
|
|
|
|
|
7208 |
}
|
7209 |
});
|
7210 |
|
7211 |
-
//Serialize an array of form elements or a set of
|
7212 |
-
//key/values into a query string
|
7213 |
-
jQuery.param = function( a, traditional ) {
|
7214 |
-
var prefix,
|
7215 |
-
s = [],
|
7216 |
-
add = function( key, value ) {
|
7217 |
-
// If value is a function, invoke it and return its value
|
7218 |
-
value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
|
7219 |
-
s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
|
7220 |
-
};
|
7221 |
|
7222 |
-
|
7223 |
-
|
7224 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7225 |
}
|
7226 |
|
7227 |
-
|
7228 |
-
|
7229 |
-
|
7230 |
-
jQuery.each( a, function() {
|
7231 |
-
add( this.name, this.value );
|
7232 |
-
});
|
7233 |
|
7234 |
-
|
7235 |
-
|
7236 |
-
|
7237 |
-
|
7238 |
-
|
|
|
|
|
7239 |
}
|
7240 |
-
}
|
7241 |
|
7242 |
-
|
7243 |
-
|
7244 |
-
|
|
|
7245 |
|
7246 |
-
|
7247 |
-
|
7248 |
|
7249 |
-
|
7250 |
-
//
|
7251 |
-
|
7252 |
-
|
7253 |
-
|
7254 |
-
add( prefix, v );
|
7255 |
|
7256 |
-
|
7257 |
-
|
7258 |
-
|
7259 |
-
|
7260 |
-
|
7261 |
-
|
7262 |
-
// deserialization algorithm or to provide an option or flag
|
7263 |
-
// to force array serialization to be shallow.
|
7264 |
-
buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
|
7265 |
-
}
|
7266 |
-
});
|
7267 |
|
7268 |
-
} else if ( !traditional && jQuery.type( obj ) === "object" ) {
|
7269 |
-
// Serialize object item.
|
7270 |
-
for ( name in obj ) {
|
7271 |
-
buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
|
7272 |
-
}
|
7273 |
|
7274 |
-
|
7275 |
-
|
7276 |
-
|
|
|
|
|
7277 |
}
|
7278 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7279 |
var
|
7280 |
// Document location
|
7281 |
ajaxLocParts,
|
7282 |
ajaxLocation,
|
7283 |
|
7284 |
rhash = /#.*$/,
|
|
|
7285 |
rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
|
7286 |
// #7653, #8125, #8152: local protocol detection
|
7287 |
-
rlocalProtocol = /^(?:about|app|app
|
7288 |
rnoContent = /^(?:GET|HEAD)$/,
|
7289 |
rprotocol = /^\/\//,
|
7290 |
-
|
7291 |
-
rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
|
7292 |
-
rts = /([?&])_=[^&]*/,
|
7293 |
-
rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
|
7294 |
-
|
7295 |
-
// Keep a copy of the old load method
|
7296 |
-
_load = jQuery.fn.load,
|
7297 |
|
7298 |
/* Prefilters
|
7299 |
* 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
|
@@ -7314,7 +8608,7 @@ var
|
|
7314 |
transports = {},
|
7315 |
|
7316 |
// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
|
7317 |
-
allTypes =
|
7318 |
|
7319 |
// #8138, IE may throw an exception when accessing
|
7320 |
// a field from window.location if document.domain has been set
|
@@ -7342,215 +8636,238 @@ function addToPrefiltersOrTransports( structure ) {
|
|
7342 |
dataTypeExpression = "*";
|
7343 |
}
|
7344 |
|
7345 |
-
var dataType,
|
7346 |
-
dataTypes = dataTypeExpression.toLowerCase().split( core_rspace ),
|
7347 |
i = 0,
|
7348 |
-
|
7349 |
|
7350 |
if ( jQuery.isFunction( func ) ) {
|
7351 |
// For each dataType in the dataTypeExpression
|
7352 |
-
|
7353 |
-
|
7354 |
-
|
7355 |
-
|
7356 |
-
|
7357 |
-
|
7358 |
-
|
|
|
|
|
7359 |
}
|
7360 |
-
list = structure[ dataType ] = structure[ dataType ] || [];
|
7361 |
-
// then we add to the structure accordingly
|
7362 |
-
list[ placeBefore ? "unshift" : "push" ]( func );
|
7363 |
}
|
7364 |
}
|
7365 |
};
|
7366 |
}
|
7367 |
|
7368 |
// Base inspection function for prefilters and transports
|
7369 |
-
function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR
|
7370 |
-
|
7371 |
-
|
7372 |
-
|
7373 |
-
|
7374 |
-
|
7375 |
-
|
7376 |
-
|
7377 |
-
|
7378 |
-
|
7379 |
-
|
7380 |
-
|
7381 |
-
|
7382 |
-
|
7383 |
-
|
7384 |
-
|
7385 |
-
// If we got redirected to another dataType
|
7386 |
-
// we try there if executing only and not done already
|
7387 |
-
if ( typeof selection === "string" ) {
|
7388 |
-
if ( !executeOnly || inspected[ selection ] ) {
|
7389 |
-
selection = undefined;
|
7390 |
-
} else {
|
7391 |
-
options.dataTypes.unshift( selection );
|
7392 |
-
selection = inspectPrefiltersOrTransports(
|
7393 |
-
structure, options, originalOptions, jqXHR, selection, inspected );
|
7394 |
}
|
7395 |
-
}
|
7396 |
-
|
7397 |
-
// If we're only executing or nothing was selected
|
7398 |
-
// we try the catchall dataType if not done already
|
7399 |
-
if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) {
|
7400 |
-
selection = inspectPrefiltersOrTransports(
|
7401 |
-
structure, options, originalOptions, jqXHR, "*", inspected );
|
7402 |
}
|
7403 |
-
|
7404 |
-
|
7405 |
-
return selection;
|
7406 |
}
|
7407 |
|
7408 |
// A special extend for ajax options
|
7409 |
// that takes "flat" options (not to be deep extended)
|
7410 |
// Fixes #9887
|
7411 |
function ajaxExtend( target, src ) {
|
7412 |
-
var
|
7413 |
flatOptions = jQuery.ajaxSettings.flatOptions || {};
|
|
|
7414 |
for ( key in src ) {
|
7415 |
if ( src[ key ] !== undefined ) {
|
7416 |
-
( flatOptions[ key ] ? target : ( deep || (
|
7417 |
}
|
7418 |
}
|
7419 |
if ( deep ) {
|
7420 |
jQuery.extend( true, target, deep );
|
7421 |
}
|
|
|
|
|
7422 |
}
|
7423 |
|
7424 |
-
|
7425 |
-
|
7426 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7427 |
}
|
7428 |
|
7429 |
-
//
|
7430 |
-
if (
|
7431 |
-
|
|
|
|
|
|
|
|
|
|
|
7432 |
}
|
7433 |
|
7434 |
-
|
7435 |
-
|
7436 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7437 |
|
7438 |
-
|
7439 |
-
|
7440 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7441 |
}
|
7442 |
|
7443 |
-
|
7444 |
-
if ( jQuery.isFunction( params ) ) {
|
7445 |
-
|
7446 |
-
// We assume that it's the callback
|
7447 |
-
callback = params;
|
7448 |
-
params = undefined;
|
7449 |
|
7450 |
-
//
|
7451 |
-
|
7452 |
-
type = "POST";
|
7453 |
-
}
|
7454 |
|
7455 |
-
|
7456 |
-
|
7457 |
-
|
7458 |
|
7459 |
-
//
|
7460 |
-
|
7461 |
-
|
7462 |
-
data: params,
|
7463 |
-
complete: function( jqXHR, status ) {
|
7464 |
-
if ( callback ) {
|
7465 |
-
self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
|
7466 |
-
}
|
7467 |
}
|
7468 |
-
}).done(function( responseText ) {
|
7469 |
|
7470 |
-
|
7471 |
-
|
7472 |
|
7473 |
-
|
7474 |
-
self.html( selector ?
|
7475 |
|
7476 |
-
//
|
7477 |
-
|
7478 |
|
7479 |
-
|
7480 |
-
// to avoid any 'Permission Denied' errors in IE
|
7481 |
-
.append( responseText.replace( rscript, "" ) )
|
7482 |
|
7483 |
-
|
7484 |
-
|
7485 |
|
7486 |
-
|
7487 |
-
|
7488 |
|
7489 |
-
|
|
|
|
|
7490 |
|
7491 |
-
|
7492 |
-
|
|
|
7493 |
|
7494 |
-
//
|
7495 |
-
|
7496 |
-
|
7497 |
-
|
7498 |
-
|
7499 |
-
|
|
|
7500 |
|
7501 |
-
|
7502 |
-
|
7503 |
-
|
7504 |
-
|
7505 |
-
|
7506 |
-
|
7507 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7508 |
}
|
|
|
7509 |
|
7510 |
-
|
7511 |
-
|
7512 |
-
url: url,
|
7513 |
-
data: data,
|
7514 |
-
success: callback,
|
7515 |
-
dataType: type
|
7516 |
-
});
|
7517 |
-
};
|
7518 |
-
});
|
7519 |
|
7520 |
jQuery.extend({
|
7521 |
|
7522 |
-
|
7523 |
-
|
7524 |
-
},
|
7525 |
-
|
7526 |
-
getJSON: function( url, data, callback ) {
|
7527 |
-
return jQuery.get( url, data, callback, "json" );
|
7528 |
-
},
|
7529 |
|
7530 |
-
//
|
7531 |
-
|
7532 |
-
|
7533 |
-
ajaxSetup: function( target, settings ) {
|
7534 |
-
if ( settings ) {
|
7535 |
-
// Building a settings object
|
7536 |
-
ajaxExtend( target, jQuery.ajaxSettings );
|
7537 |
-
} else {
|
7538 |
-
// Extending ajaxSettings
|
7539 |
-
settings = target;
|
7540 |
-
target = jQuery.ajaxSettings;
|
7541 |
-
}
|
7542 |
-
ajaxExtend( target, settings );
|
7543 |
-
return target;
|
7544 |
-
},
|
7545 |
|
7546 |
ajaxSettings: {
|
7547 |
url: ajaxLocation,
|
|
|
7548 |
isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
|
7549 |
global: true,
|
7550 |
-
type: "GET",
|
7551 |
-
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
|
7552 |
processData: true,
|
7553 |
async: true,
|
|
|
7554 |
/*
|
7555 |
timeout: 0,
|
7556 |
data: null,
|
@@ -7564,11 +8881,11 @@ jQuery.extend({
|
|
7564 |
*/
|
7565 |
|
7566 |
accepts: {
|
7567 |
-
|
7568 |
-
html: "text/html",
|
7569 |
text: "text/plain",
|
7570 |
-
|
7571 |
-
"
|
|
|
7572 |
},
|
7573 |
|
7574 |
contents: {
|
@@ -7579,16 +8896,16 @@ jQuery.extend({
|
|
7579 |
|
7580 |
responseFields: {
|
7581 |
xml: "responseXML",
|
7582 |
-
text: "responseText"
|
|
|
7583 |
},
|
7584 |
|
7585 |
-
//
|
7586 |
-
//
|
7587 |
-
// 2) the catchall symbol "*" can be used for source_type
|
7588 |
converters: {
|
7589 |
|
7590 |
// Convert anything to text
|
7591 |
-
"* text":
|
7592 |
|
7593 |
// Text to html (true = no transformation)
|
7594 |
"text html": true,
|
@@ -7605,11 +8922,24 @@ jQuery.extend({
|
|
7605 |
// and when you create one that shouldn't be
|
7606 |
// deep extended (see ajaxExtend)
|
7607 |
flatOptions: {
|
7608 |
-
|
7609 |
-
|
7610 |
}
|
7611 |
},
|
7612 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7613 |
ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
|
7614 |
ajaxTransport: addToPrefiltersOrTransports( transports ),
|
7615 |
|
@@ -7625,34 +8955,34 @@ jQuery.extend({
|
|
7625 |
// Force options to be an object
|
7626 |
options = options || {};
|
7627 |
|
7628 |
-
var //
|
7629 |
-
|
7630 |
-
//
|
|
|
|
|
|
|
|
|
7631 |
responseHeadersString,
|
7632 |
-
responseHeaders,
|
7633 |
-
// transport
|
7634 |
-
transport,
|
7635 |
// timeout handle
|
7636 |
timeoutTimer,
|
7637 |
-
|
7638 |
-
parts,
|
7639 |
// To know if global events are to be dispatched
|
7640 |
fireGlobals,
|
7641 |
-
|
7642 |
-
|
|
|
|
|
7643 |
// Create the final options object
|
7644 |
s = jQuery.ajaxSetup( {}, options ),
|
7645 |
// Callbacks context
|
7646 |
callbackContext = s.context || s,
|
7647 |
-
// Context for global events
|
7648 |
-
|
7649 |
-
|
7650 |
-
|
7651 |
-
( callbackContext.nodeType || callbackContext instanceof jQuery ) ?
|
7652 |
-
jQuery( callbackContext ) : jQuery.event,
|
7653 |
// Deferreds
|
7654 |
deferred = jQuery.Deferred(),
|
7655 |
-
completeDeferred = jQuery.Callbacks(
|
7656 |
// Status-dependent callbacks
|
7657 |
statusCode = s.statusCode || {},
|
7658 |
// Headers (they are sent all at once)
|
@@ -7664,37 +8994,36 @@ jQuery.extend({
|
|
7664 |
strAbort = "canceled",
|
7665 |
// Fake xhr
|
7666 |
jqXHR = {
|
7667 |
-
|
7668 |
readyState: 0,
|
7669 |
|
7670 |
-
// Caches the header
|
7671 |
-
setRequestHeader: function( name, value ) {
|
7672 |
-
if ( !state ) {
|
7673 |
-
var lname = name.toLowerCase();
|
7674 |
-
name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
|
7675 |
-
requestHeaders[ name ] = value;
|
7676 |
-
}
|
7677 |
-
return this;
|
7678 |
-
},
|
7679 |
-
|
7680 |
-
// Raw string
|
7681 |
-
getAllResponseHeaders: function() {
|
7682 |
-
return state === 2 ? responseHeadersString : null;
|
7683 |
-
},
|
7684 |
-
|
7685 |
// Builds headers hashtable if needed
|
7686 |
getResponseHeader: function( key ) {
|
7687 |
var match;
|
7688 |
if ( state === 2 ) {
|
7689 |
if ( !responseHeaders ) {
|
7690 |
responseHeaders = {};
|
7691 |
-
while( (
|
7692 |
responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
|
7693 |
}
|
7694 |
}
|
7695 |
match = responseHeaders[ key.toLowerCase() ];
|
7696 |
}
|
7697 |
-
return match
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7698 |
},
|
7699 |
|
7700 |
// Overrides response content-type header
|
@@ -7705,164 +9034,58 @@ jQuery.extend({
|
|
7705 |
return this;
|
7706 |
},
|
7707 |
|
7708 |
-
//
|
7709 |
-
|
7710 |
-
|
7711 |
-
if (
|
7712 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7713 |
}
|
7714 |
-
done( 0, statusText );
|
7715 |
return this;
|
7716 |
-
}
|
7717 |
-
};
|
7718 |
-
|
7719 |
-
// Callback for when everything is done
|
7720 |
-
// It is defined here because jslint complains if it is declared
|
7721 |
-
// at the end of the function (which would be more logical and readable)
|
7722 |
-
function done( status, nativeStatusText, responses, headers ) {
|
7723 |
-
var isSuccess, success, error, response, modified,
|
7724 |
-
statusText = nativeStatusText;
|
7725 |
-
|
7726 |
-
// Called once
|
7727 |
-
if ( state === 2 ) {
|
7728 |
-
return;
|
7729 |
-
}
|
7730 |
-
|
7731 |
-
// State is "done" now
|
7732 |
-
state = 2;
|
7733 |
-
|
7734 |
-
// Clear timeout if it exists
|
7735 |
-
if ( timeoutTimer ) {
|
7736 |
-
clearTimeout( timeoutTimer );
|
7737 |
-
}
|
7738 |
-
|
7739 |
-
// Dereference transport for early garbage collection
|
7740 |
-
// (no matter how long the jqXHR object will be used)
|
7741 |
-
transport = undefined;
|
7742 |
-
|
7743 |
-
// Cache response headers
|
7744 |
-
responseHeadersString = headers || "";
|
7745 |
-
|
7746 |
-
// Set readyState
|
7747 |
-
jqXHR.readyState = status > 0 ? 4 : 0;
|
7748 |
-
|
7749 |
-
// Get response data
|
7750 |
-
if ( responses ) {
|
7751 |
-
response = ajaxHandleResponses( s, jqXHR, responses );
|
7752 |
-
}
|
7753 |
-
|
7754 |
-
// If successful, handle type chaining
|
7755 |
-
if ( status >= 200 && status < 300 || status === 304 ) {
|
7756 |
-
|
7757 |
-
// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
|
7758 |
-
if ( s.ifModified ) {
|
7759 |
-
|
7760 |
-
modified = jqXHR.getResponseHeader("Last-Modified");
|
7761 |
-
if ( modified ) {
|
7762 |
-
jQuery.lastModified[ ifModifiedKey ] = modified;
|
7763 |
-
}
|
7764 |
-
modified = jqXHR.getResponseHeader("Etag");
|
7765 |
-
if ( modified ) {
|
7766 |
-
jQuery.etag[ ifModifiedKey ] = modified;
|
7767 |
-
}
|
7768 |
-
}
|
7769 |
-
|
7770 |
-
// If not modified
|
7771 |
-
if ( status === 304 ) {
|
7772 |
-
|
7773 |
-
statusText = "notmodified";
|
7774 |
-
isSuccess = true;
|
7775 |
-
|
7776 |
-
// If we have data
|
7777 |
-
} else {
|
7778 |
|
7779 |
-
|
7780 |
-
|
7781 |
-
|
7782 |
-
|
7783 |
-
|
7784 |
-
}
|
7785 |
-
} else {
|
7786 |
-
// We extract error from statusText
|
7787 |
-
// then normalize statusText and status for non-aborts
|
7788 |
-
error = statusText;
|
7789 |
-
if ( !statusText || status ) {
|
7790 |
-
statusText = "error";
|
7791 |
-
if ( status < 0 ) {
|
7792 |
-
status = 0;
|
7793 |
}
|
|
|
|
|
7794 |
}
|
7795 |
-
}
|
7796 |
-
|
7797 |
-
// Set data for the fake xhr object
|
7798 |
-
jqXHR.status = status;
|
7799 |
-
jqXHR.statusText = ( nativeStatusText || statusText ) + "";
|
7800 |
-
|
7801 |
-
// Success/Error
|
7802 |
-
if ( isSuccess ) {
|
7803 |
-
deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
|
7804 |
-
} else {
|
7805 |
-
deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
|
7806 |
-
}
|
7807 |
-
|
7808 |
-
// Status-dependent callbacks
|
7809 |
-
jqXHR.statusCode( statusCode );
|
7810 |
-
statusCode = undefined;
|
7811 |
-
|
7812 |
-
if ( fireGlobals ) {
|
7813 |
-
globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ),
|
7814 |
-
[ jqXHR, s, isSuccess ? success : error ] );
|
7815 |
-
}
|
7816 |
-
|
7817 |
-
// Complete
|
7818 |
-
completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
|
7819 |
-
|
7820 |
-
if ( fireGlobals ) {
|
7821 |
-
globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
|
7822 |
-
// Handle the global AJAX counter
|
7823 |
-
if ( !( --jQuery.active ) ) {
|
7824 |
-
jQuery.event.trigger( "ajaxStop" );
|
7825 |
-
}
|
7826 |
-
}
|
7827 |
-
}
|
7828 |
|
7829 |
// Attach deferreds
|
7830 |
-
deferred.promise( jqXHR );
|
7831 |
jqXHR.success = jqXHR.done;
|
7832 |
jqXHR.error = jqXHR.fail;
|
7833 |
-
jqXHR.complete = completeDeferred.add;
|
7834 |
-
|
7835 |
-
// Status-dependent callbacks
|
7836 |
-
jqXHR.statusCode = function( map ) {
|
7837 |
-
if ( map ) {
|
7838 |
-
var tmp;
|
7839 |
-
if ( state < 2 ) {
|
7840 |
-
for ( tmp in map ) {
|
7841 |
-
statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];
|
7842 |
-
}
|
7843 |
-
} else {
|
7844 |
-
tmp = map[ jqXHR.status ];
|
7845 |
-
jqXHR.always( tmp );
|
7846 |
-
}
|
7847 |
-
}
|
7848 |
-
return this;
|
7849 |
-
};
|
7850 |
|
7851 |
// Remove hash character (#7531: and string promotion)
|
7852 |
// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
|
|
|
7853 |
// We also use the url parameter if available
|
7854 |
-
s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
|
|
|
|
|
|
|
7855 |
|
7856 |
// Extract dataTypes list
|
7857 |
-
s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().
|
7858 |
|
7859 |
// A cross-domain request is in order when we have a protocol:host:port mismatch
|
7860 |
if ( s.crossDomain == null ) {
|
7861 |
parts = rurl.exec( s.url.toLowerCase() );
|
7862 |
s.crossDomain = !!( parts &&
|
7863 |
( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
|
7864 |
-
( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) )
|
7865 |
-
( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
|
7866 |
);
|
7867 |
}
|
7868 |
|
@@ -7880,7 +9103,13 @@ jQuery.extend({
|
|
7880 |
}
|
7881 |
|
7882 |
// We can fire global events as of now if asked to
|
7883 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
7884 |
|
7885 |
// Uppercase the type
|
7886 |
s.type = s.type.toUpperCase();
|
@@ -7888,52 +9117,47 @@ jQuery.extend({
|
|
7888 |
// Determine if request has content
|
7889 |
s.hasContent = !rnoContent.test( s.type );
|
7890 |
|
7891 |
-
//
|
7892 |
-
|
7893 |
-
|
7894 |
-
}
|
7895 |
|
7896 |
// More options handling for requests with no content
|
7897 |
if ( !s.hasContent ) {
|
7898 |
|
7899 |
// If data is available, append data to url
|
7900 |
if ( s.data ) {
|
7901 |
-
s.url += ( rquery.test(
|
7902 |
// #9682: remove data so that it's not used in an eventual retry
|
7903 |
delete s.data;
|
7904 |
}
|
7905 |
|
7906 |
-
// Get ifModifiedKey before adding the anti-cache parameter
|
7907 |
-
ifModifiedKey = s.url;
|
7908 |
-
|
7909 |
// Add anti-cache in url if needed
|
7910 |
if ( s.cache === false ) {
|
|
|
7911 |
|
7912 |
-
|
7913 |
-
|
7914 |
-
ret = s.url.replace( rts, "$1_=" + ts );
|
7915 |
|
7916 |
-
|
7917 |
-
|
7918 |
}
|
7919 |
}
|
7920 |
|
7921 |
-
// Set the correct header, if data is being sent
|
7922 |
-
if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
|
7923 |
-
jqXHR.setRequestHeader( "Content-Type", s.contentType );
|
7924 |
-
}
|
7925 |
-
|
7926 |
// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
|
7927 |
if ( s.ifModified ) {
|
7928 |
-
|
7929 |
-
|
7930 |
-
jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] );
|
7931 |
}
|
7932 |
-
if ( jQuery.etag[
|
7933 |
-
jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[
|
7934 |
}
|
7935 |
}
|
7936 |
|
|
|
|
|
|
|
|
|
|
|
7937 |
// Set the Accepts header for the server, depending on the dataType
|
7938 |
jqXHR.setRequestHeader(
|
7939 |
"Accept",
|
@@ -7949,9 +9173,8 @@ jQuery.extend({
|
|
7949 |
|
7950 |
// Allow custom headers/mimetypes and early abort
|
7951 |
if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
|
7952 |
-
|
7953 |
-
|
7954 |
-
|
7955 |
}
|
7956 |
|
7957 |
// aborting is no longer a cancellation
|
@@ -7970,21 +9193,22 @@ jQuery.extend({
|
|
7970 |
done( -1, "No Transport" );
|
7971 |
} else {
|
7972 |
jqXHR.readyState = 1;
|
|
|
7973 |
// Send global event
|
7974 |
if ( fireGlobals ) {
|
7975 |
globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
|
7976 |
}
|
7977 |
// Timeout
|
7978 |
if ( s.async && s.timeout > 0 ) {
|
7979 |
-
timeoutTimer = setTimeout(
|
7980 |
-
jqXHR.abort(
|
7981 |
}, s.timeout );
|
7982 |
}
|
7983 |
|
7984 |
try {
|
7985 |
state = 1;
|
7986 |
transport.send( requestHeaders, done );
|
7987 |
-
} catch (e) {
|
7988 |
// Propagate exception as error if not done
|
7989 |
if ( state < 2 ) {
|
7990 |
done( -1, e );
|
@@ -7995,421 +9219,416 @@ jQuery.extend({
|
|
7995 |
}
|
7996 |
}
|
7997 |
|
7998 |
-
|
7999 |
-
|
8000 |
-
|
8001 |
-
|
8002 |
-
active: 0,
|
8003 |
|
8004 |
-
|
8005 |
-
|
8006 |
-
|
|
|
8007 |
|
8008 |
-
|
|
|
8009 |
|
8010 |
-
|
8011 |
-
|
8012 |
-
|
8013 |
-
|
8014 |
-
*/
|
8015 |
-
function ajaxHandleResponses( s, jqXHR, responses ) {
|
8016 |
|
8017 |
-
|
8018 |
-
|
8019 |
-
|
8020 |
-
responseFields = s.responseFields;
|
8021 |
|
8022 |
-
|
8023 |
-
|
8024 |
-
if ( type in responses ) {
|
8025 |
-
jqXHR[ responseFields[type] ] = responses[ type ];
|
8026 |
-
}
|
8027 |
-
}
|
8028 |
|
8029 |
-
|
8030 |
-
|
8031 |
-
dataTypes.shift();
|
8032 |
-
if ( ct === undefined ) {
|
8033 |
-
ct = s.mimeType || jqXHR.getResponseHeader( "content-type" );
|
8034 |
-
}
|
8035 |
-
}
|
8036 |
|
8037 |
-
|
8038 |
-
|
8039 |
-
for ( type in contents ) {
|
8040 |
-
if ( contents[ type ] && contents[ type ].test( ct ) ) {
|
8041 |
-
dataTypes.unshift( type );
|
8042 |
-
break;
|
8043 |
-
}
|
8044 |
-
}
|
8045 |
-
}
|
8046 |
|
8047 |
-
|
8048 |
-
|
8049 |
-
|
8050 |
-
} else {
|
8051 |
-
// Try convertible dataTypes
|
8052 |
-
for ( type in responses ) {
|
8053 |
-
if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
|
8054 |
-
finalDataType = type;
|
8055 |
-
break;
|
8056 |
-
}
|
8057 |
-
if ( !firstDataType ) {
|
8058 |
-
firstDataType = type;
|
8059 |
}
|
8060 |
-
}
|
8061 |
-
// Or just use first one
|
8062 |
-
finalDataType = finalDataType || firstDataType;
|
8063 |
-
}
|
8064 |
-
|
8065 |
-
// If we found a dataType
|
8066 |
-
// We add the dataType to the list if needed
|
8067 |
-
// and return the corresponding response
|
8068 |
-
if ( finalDataType ) {
|
8069 |
-
if ( finalDataType !== dataTypes[ 0 ] ) {
|
8070 |
-
dataTypes.unshift( finalDataType );
|
8071 |
-
}
|
8072 |
-
return responses[ finalDataType ];
|
8073 |
-
}
|
8074 |
-
}
|
8075 |
|
8076 |
-
//
|
8077 |
-
|
8078 |
-
|
8079 |
-
var conv, conv2, current, tmp,
|
8080 |
-
// Work with a copy of dataTypes in case we need to modify it for conversion
|
8081 |
-
dataTypes = s.dataTypes.slice(),
|
8082 |
-
prev = dataTypes[ 0 ],
|
8083 |
-
converters = {},
|
8084 |
-
i = 0;
|
8085 |
|
8086 |
-
|
8087 |
-
|
8088 |
-
response = s.dataFilter( response, s.dataType );
|
8089 |
-
}
|
8090 |
|
8091 |
-
|
8092 |
-
|
8093 |
-
|
8094 |
-
|
8095 |
-
|
8096 |
-
|
|
|
|
|
|
|
|
|
|
|
8097 |
|
8098 |
-
|
8099 |
-
|
|
|
8100 |
|
8101 |
-
|
8102 |
-
|
|
|
8103 |
|
8104 |
-
|
8105 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8106 |
|
8107 |
-
|
8108 |
-
|
|
|
8109 |
|
8110 |
-
|
8111 |
-
|
8112 |
-
|
|
|
|
|
|
|
8113 |
|
8114 |
-
|
8115 |
-
|
8116 |
-
|
8117 |
|
8118 |
-
|
8119 |
-
|
8120 |
-
|
8121 |
-
|
8122 |
-
// Condense equivalence converters
|
8123 |
-
if ( conv === true ) {
|
8124 |
-
conv = converters[ conv2 ];
|
8125 |
|
8126 |
-
|
8127 |
-
|
8128 |
-
current = tmp[ 0 ];
|
8129 |
-
dataTypes.splice( i--, 0, current );
|
8130 |
-
}
|
8131 |
|
8132 |
-
|
8133 |
-
|
8134 |
-
|
8135 |
-
|
|
|
8136 |
}
|
|
|
|
|
8137 |
|
8138 |
-
|
8139 |
-
|
8140 |
|
8141 |
-
|
8142 |
-
|
8143 |
-
|
8144 |
-
} else {
|
8145 |
-
try {
|
8146 |
-
response = conv( response );
|
8147 |
-
} catch ( e ) {
|
8148 |
-
return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
|
8149 |
-
}
|
8150 |
-
}
|
8151 |
-
}
|
8152 |
-
}
|
8153 |
|
8154 |
-
|
8155 |
-
|
8156 |
-
}
|
8157 |
}
|
|
|
8158 |
|
8159 |
-
|
8160 |
-
|
8161 |
-
|
8162 |
-
|
8163 |
-
|
8164 |
-
|
|
|
|
|
8165 |
|
8166 |
-
|
8167 |
-
|
8168 |
-
|
8169 |
-
|
8170 |
-
|
8171 |
-
|
8172 |
-
|
8173 |
-
}
|
8174 |
});
|
8175 |
|
8176 |
-
// Detect, normalize options and install callbacks for jsonp requests
|
8177 |
-
jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
|
8178 |
|
8179 |
-
|
8180 |
-
|
8181 |
-
url
|
8182 |
-
|
8183 |
-
|
8184 |
-
|
8185 |
-
|
8186 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8187 |
|
8188 |
-
|
8189 |
-
|
8190 |
|
8191 |
-
|
8192 |
-
|
8193 |
-
|
8194 |
-
s.jsonpCallback;
|
8195 |
-
overwritten = window[ callbackName ];
|
8196 |
|
8197 |
-
|
8198 |
-
|
8199 |
-
s.url = url.replace( rjsonp, "$1" + callbackName );
|
8200 |
-
} else if ( replaceInData ) {
|
8201 |
-
s.data = data.replace( rjsonp, "$1" + callbackName );
|
8202 |
-
} else if ( hasCallback ) {
|
8203 |
-
s.url += ( rquestion.test( url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
|
8204 |
}
|
8205 |
|
8206 |
-
|
8207 |
-
|
8208 |
-
if ( !responseContainer ) {
|
8209 |
-
jQuery.error( callbackName + " was not called" );
|
8210 |
-
}
|
8211 |
-
return responseContainer[ 0 ];
|
8212 |
-
};
|
8213 |
-
|
8214 |
-
// force json dataType
|
8215 |
-
s.dataTypes[ 0 ] = "json";
|
8216 |
|
8217 |
-
|
8218 |
-
|
8219 |
-
|
8220 |
-
|
|
|
|
|
8221 |
|
8222 |
-
|
8223 |
-
|
8224 |
-
|
8225 |
-
window[ callbackName ] = overwritten;
|
8226 |
|
8227 |
-
|
8228 |
-
|
8229 |
-
// make sure that re-using the options doesn't screw things around
|
8230 |
-
s.jsonpCallback = originalSettings.jsonpCallback;
|
8231 |
|
8232 |
-
|
8233 |
-
|
8234 |
}
|
|
|
|
|
8235 |
|
8236 |
-
|
8237 |
-
|
8238 |
-
overwritten( responseContainer[ 0 ] );
|
8239 |
-
}
|
8240 |
|
8241 |
-
|
|
|
8242 |
});
|
8243 |
-
|
8244 |
-
// Delegate to script
|
8245 |
-
return "script";
|
8246 |
-
}
|
8247 |
-
});
|
8248 |
-
// Install script dataType
|
8249 |
-
jQuery.ajaxSetup({
|
8250 |
-
accepts: {
|
8251 |
-
script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
|
8252 |
-
},
|
8253 |
-
contents: {
|
8254 |
-
script: /javascript|ecmascript/
|
8255 |
},
|
8256 |
-
converters: {
|
8257 |
-
"text script": function( text ) {
|
8258 |
-
jQuery.globalEval( text );
|
8259 |
-
return text;
|
8260 |
-
}
|
8261 |
-
}
|
8262 |
-
});
|
8263 |
|
8264 |
-
|
8265 |
-
|
8266 |
-
|
8267 |
-
|
8268 |
-
|
8269 |
-
|
8270 |
-
s.type = "GET";
|
8271 |
-
s.global = false;
|
8272 |
}
|
8273 |
});
|
8274 |
|
8275 |
-
// Bind script tag hack transport
|
8276 |
-
jQuery.ajaxTransport( "script", function(s) {
|
8277 |
|
8278 |
-
|
8279 |
-
|
|
|
|
|
|
|
|
|
|
|
8280 |
|
8281 |
-
|
8282 |
-
|
|
|
8283 |
|
8284 |
-
return {
|
8285 |
|
8286 |
-
send: function( _, callback ) {
|
8287 |
|
8288 |
-
script = document.createElement( "script" );
|
8289 |
|
8290 |
-
|
|
|
|
|
|
|
|
|
8291 |
|
8292 |
-
|
8293 |
-
|
8294 |
-
}
|
8295 |
|
8296 |
-
|
|
|
|
|
|
|
|
|
|
|
8297 |
|
8298 |
-
|
8299 |
-
|
|
|
|
|
|
|
8300 |
|
8301 |
-
|
|
|
|
|
|
|
|
|
8302 |
|
8303 |
-
|
8304 |
-
|
|
|
|
|
|
|
8305 |
|
8306 |
-
|
8307 |
-
|
8308 |
-
|
8309 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
8310 |
|
8311 |
-
|
8312 |
-
|
|
|
|
|
8313 |
|
8314 |
-
|
8315 |
-
|
8316 |
-
|
8317 |
-
|
8318 |
-
|
8319 |
-
|
8320 |
-
// Use insertBefore instead of appendChild to circumvent an IE6 bug.
|
8321 |
-
// This arises when a base node is used (#2709 and #4378).
|
8322 |
-
head.insertBefore( script, head.firstChild );
|
8323 |
-
},
|
8324 |
|
8325 |
-
|
8326 |
-
|
8327 |
-
|
8328 |
-
|
8329 |
-
|
8330 |
-
};
|
8331 |
-
}
|
8332 |
-
});
|
8333 |
-
var xhrCallbacks,
|
8334 |
-
// #5280: Internet Explorer will keep connections alive if we don't abort on unload
|
8335 |
-
xhrOnUnloadAbort = window.ActiveXObject ? function() {
|
8336 |
-
// Abort all pending requests
|
8337 |
-
for ( var key in xhrCallbacks ) {
|
8338 |
-
xhrCallbacks[ key ]( 0, 1 );
|
8339 |
}
|
8340 |
-
}
|
8341 |
-
xhrId = 0;
|
8342 |
|
8343 |
-
//
|
8344 |
-
|
8345 |
-
|
8346 |
-
|
8347 |
-
|
8348 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8349 |
|
8350 |
-
function createActiveXHR() {
|
8351 |
-
try {
|
8352 |
-
return new window.ActiveXObject( "Microsoft.XMLHTTP" );
|
8353 |
-
} catch( e ) {}
|
8354 |
-
}
|
8355 |
|
8356 |
// Create the request object
|
8357 |
// (This is still attached to ajaxSettings for backward compatibility)
|
8358 |
-
jQuery.ajaxSettings.xhr = window.ActiveXObject ?
|
8359 |
-
|
8360 |
-
* implement the XMLHttpRequest in IE7 (can't request local files),
|
8361 |
-
* so we use the ActiveXObject when it is available
|
8362 |
-
* Additionally XMLHttpRequest can be disabled in IE7/IE8 so
|
8363 |
-
* we need a fallback.
|
8364 |
-
*/
|
8365 |
function() {
|
8366 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8367 |
} :
|
8368 |
// For all other browsers, use the standard XMLHttpRequest object
|
8369 |
createStandardXHR;
|
8370 |
|
8371 |
-
|
8372 |
-
|
8373 |
-
jQuery.
|
8374 |
-
|
8375 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8376 |
});
|
8377 |
-
}
|
|
|
|
|
|
|
|
|
8378 |
|
8379 |
// Create transport if the browser can provide an xhr
|
8380 |
-
if (
|
8381 |
|
8382 |
-
jQuery.ajaxTransport(function(
|
8383 |
// Cross domain only allowed if supported through XMLHttpRequest
|
8384 |
-
if ( !
|
8385 |
|
8386 |
var callback;
|
8387 |
|
8388 |
return {
|
8389 |
send: function( headers, complete ) {
|
8390 |
-
|
8391 |
-
|
8392 |
-
|
8393 |
-
xhr = s.xhr();
|
8394 |
|
8395 |
// Open the socket
|
8396 |
-
|
8397 |
-
if ( s.username ) {
|
8398 |
-
xhr.open( s.type, s.url, s.async, s.username, s.password );
|
8399 |
-
} else {
|
8400 |
-
xhr.open( s.type, s.url, s.async );
|
8401 |
-
}
|
8402 |
|
8403 |
// Apply custom fields if provided
|
8404 |
-
if (
|
8405 |
-
for ( i in
|
8406 |
-
xhr[ i ] =
|
8407 |
}
|
8408 |
}
|
8409 |
|
8410 |
// Override mime type if needed
|
8411 |
-
if (
|
8412 |
-
xhr.overrideMimeType(
|
8413 |
}
|
8414 |
|
8415 |
// X-Requested-With header
|
@@ -8417,888 +9636,444 @@ if ( jQuery.support.ajax ) {
|
|
8417 |
// akin to a jigsaw puzzle, we simply never set it to be sure.
|
8418 |
// (it can always be set on a per-request basis or even using ajaxSetup)
|
8419 |
// For same-domain requests, won't change header if already provided.
|
8420 |
-
if ( !
|
8421 |
-
headers[
|
8422 |
}
|
8423 |
|
8424 |
-
//
|
8425 |
-
|
8426 |
-
|
8427 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
8428 |
}
|
8429 |
-
}
|
8430 |
|
8431 |
// Do send the request
|
8432 |
// This may raise an exception which is actually
|
8433 |
// handled in jQuery.ajax (so no try/catch here)
|
8434 |
-
xhr.send( (
|
8435 |
|
8436 |
// Listener
|
8437 |
-
callback = function( _, isAbort ) {
|
8438 |
-
|
8439 |
-
|
8440 |
-
|
8441 |
-
|
8442 |
-
|
8443 |
-
|
8444 |
-
|
8445 |
-
|
8446 |
-
|
8447 |
-
|
8448 |
-
|
8449 |
-
|
8450 |
-
|
8451 |
-
|
8452 |
-
|
8453 |
-
|
8454 |
-
|
8455 |
-
|
8456 |
-
//
|
8457 |
-
|
8458 |
-
|
8459 |
-
|
8460 |
-
|
8461 |
-
|
8462 |
-
}
|
8463 |
-
|
8464 |
-
// If it's an abort
|
8465 |
-
if ( isAbort ) {
|
8466 |
-
// Abort it manually if needed
|
8467 |
-
if ( xhr.readyState !== 4 ) {
|
8468 |
-
xhr.abort();
|
8469 |
-
}
|
8470 |
-
} else {
|
8471 |
-
status = xhr.status;
|
8472 |
-
responseHeaders = xhr.getAllResponseHeaders();
|
8473 |
-
responses = {};
|
8474 |
-
xml = xhr.responseXML;
|
8475 |
-
|
8476 |
-
// Construct response list
|
8477 |
-
if ( xml && xml.documentElement /* #4958 */ ) {
|
8478 |
-
responses.xml = xml;
|
8479 |
-
}
|
8480 |
-
|
8481 |
-
// When requesting binary data, IE6-9 will throw an exception
|
8482 |
-
// on any attempt to access responseText (#11426)
|
8483 |
-
try {
|
8484 |
-
responses.text = xhr.responseText;
|
8485 |
-
} catch( e ) {
|
8486 |
-
}
|
8487 |
|
8488 |
-
|
8489 |
-
|
8490 |
-
|
8491 |
-
|
8492 |
-
|
8493 |
-
|
8494 |
-
|
8495 |
-
|
8496 |
|
8497 |
-
|
8498 |
|
8499 |
-
|
8500 |
-
|
8501 |
-
|
8502 |
-
|
8503 |
-
|
8504 |
-
|
8505 |
-
|
8506 |
-
|
8507 |
-
}
|
8508 |
}
|
8509 |
}
|
8510 |
-
} catch( firefoxAccessException ) {
|
8511 |
-
if ( !isAbort ) {
|
8512 |
-
complete( -1, firefoxAccessException );
|
8513 |
-
}
|
8514 |
}
|
8515 |
|
8516 |
// Call complete if needed
|
8517 |
if ( responses ) {
|
8518 |
-
complete( status, statusText, responses,
|
8519 |
}
|
8520 |
};
|
8521 |
|
8522 |
-
if ( !
|
8523 |
// if we're in sync mode we fire the callback
|
8524 |
callback();
|
8525 |
} else if ( xhr.readyState === 4 ) {
|
8526 |
// (IE6 & IE7) if it's in cache and has been
|
8527 |
// retrieved directly we need to fire the callback
|
8528 |
-
setTimeout( callback
|
8529 |
} else {
|
8530 |
-
|
8531 |
-
|
8532 |
-
// Create the active xhrs callbacks list if needed
|
8533 |
-
// and attach the unload handler
|
8534 |
-
if ( !xhrCallbacks ) {
|
8535 |
-
xhrCallbacks = {};
|
8536 |
-
jQuery( window ).unload( xhrOnUnloadAbort );
|
8537 |
-
}
|
8538 |
-
// Add to list of active xhrs callbacks
|
8539 |
-
xhrCallbacks[ handle ] = callback;
|
8540 |
-
}
|
8541 |
-
xhr.onreadystatechange = callback;
|
8542 |
}
|
8543 |
},
|
8544 |
|
8545 |
abort: function() {
|
8546 |
if ( callback ) {
|
8547 |
-
callback(
|
8548 |
}
|
8549 |
}
|
8550 |
};
|
8551 |
}
|
8552 |
});
|
8553 |
}
|
8554 |
-
var fxNow, timerId,
|
8555 |
-
rfxtypes = /^(?:toggle|show|hide)$/,
|
8556 |
-
rfxnum = new RegExp( "^(?:([-+])=|)(" + core_pnum + ")([a-z%]*)$", "i" ),
|
8557 |
-
rrun = /queueHooks$/,
|
8558 |
-
animationPrefilters = [ defaultPrefilter ],
|
8559 |
-
tweeners = {
|
8560 |
-
"*": [function( prop, value ) {
|
8561 |
-
var end, unit,
|
8562 |
-
tween = this.createTween( prop, value ),
|
8563 |
-
parts = rfxnum.exec( value ),
|
8564 |
-
target = tween.cur(),
|
8565 |
-
start = +target || 0,
|
8566 |
-
scale = 1,
|
8567 |
-
maxIterations = 20;
|
8568 |
-
|
8569 |
-
if ( parts ) {
|
8570 |
-
end = +parts[2];
|
8571 |
-
unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" );
|
8572 |
-
|
8573 |
-
// We need to compute starting value
|
8574 |
-
if ( unit !== "px" && start ) {
|
8575 |
-
// Iteratively approximate from a nonzero starting point
|
8576 |
-
// Prefer the current property, because this process will be trivial if it uses the same units
|
8577 |
-
// Fallback to end or a simple constant
|
8578 |
-
start = jQuery.css( tween.elem, prop, true ) || end || 1;
|
8579 |
-
|
8580 |
-
do {
|
8581 |
-
// If previous iteration zeroed out, double until we get *something*
|
8582 |
-
// Use a string for doubling factor so we don't accidentally see scale as unchanged below
|
8583 |
-
scale = scale || ".5";
|
8584 |
-
|
8585 |
-
// Adjust and apply
|
8586 |
-
start = start / scale;
|
8587 |
-
jQuery.style( tween.elem, prop, start + unit );
|
8588 |
-
|
8589 |
-
// Update scale, tolerating zero or NaN from tween.cur()
|
8590 |
-
// And breaking the loop if scale is unchanged or perfect, or if we've just had enough
|
8591 |
-
} while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
|
8592 |
-
}
|
8593 |
-
|
8594 |
-
tween.unit = unit;
|
8595 |
-
tween.start = start;
|
8596 |
-
// If a +=/-= token was provided, we're doing a relative animation
|
8597 |
-
tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end;
|
8598 |
-
}
|
8599 |
-
return tween;
|
8600 |
-
}]
|
8601 |
-
};
|
8602 |
-
|
8603 |
-
// Animations created synchronously will run synchronously
|
8604 |
-
function createFxNow() {
|
8605 |
-
setTimeout(function() {
|
8606 |
-
fxNow = undefined;
|
8607 |
-
}, 0 );
|
8608 |
-
return ( fxNow = jQuery.now() );
|
8609 |
-
}
|
8610 |
-
|
8611 |
-
function createTweens( animation, props ) {
|
8612 |
-
jQuery.each( props, function( prop, value ) {
|
8613 |
-
var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
|
8614 |
-
index = 0,
|
8615 |
-
length = collection.length;
|
8616 |
-
for ( ; index < length; index++ ) {
|
8617 |
-
if ( collection[ index ].call( animation, prop, value ) ) {
|
8618 |
-
|
8619 |
-
// we're done with this property
|
8620 |
-
return;
|
8621 |
-
}
|
8622 |
-
}
|
8623 |
-
});
|
8624 |
-
}
|
8625 |
-
|
8626 |
-
function Animation( elem, properties, options ) {
|
8627 |
-
var result,
|
8628 |
-
index = 0,
|
8629 |
-
tweenerIndex = 0,
|
8630 |
-
length = animationPrefilters.length,
|
8631 |
-
deferred = jQuery.Deferred().always( function() {
|
8632 |
-
// don't match elem in the :animated selector
|
8633 |
-
delete tick.elem;
|
8634 |
-
}),
|
8635 |
-
tick = function() {
|
8636 |
-
var currentTime = fxNow || createFxNow(),
|
8637 |
-
remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
|
8638 |
-
// archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
|
8639 |
-
temp = remaining / animation.duration || 0,
|
8640 |
-
percent = 1 - temp,
|
8641 |
-
index = 0,
|
8642 |
-
length = animation.tweens.length;
|
8643 |
-
|
8644 |
-
for ( ; index < length ; index++ ) {
|
8645 |
-
animation.tweens[ index ].run( percent );
|
8646 |
-
}
|
8647 |
-
|
8648 |
-
deferred.notifyWith( elem, [ animation, percent, remaining ]);
|
8649 |
-
|
8650 |
-
if ( percent < 1 && length ) {
|
8651 |
-
return remaining;
|
8652 |
-
} else {
|
8653 |
-
deferred.resolveWith( elem, [ animation ] );
|
8654 |
-
return false;
|
8655 |
-
}
|
8656 |
-
},
|
8657 |
-
animation = deferred.promise({
|
8658 |
-
elem: elem,
|
8659 |
-
props: jQuery.extend( {}, properties ),
|
8660 |
-
opts: jQuery.extend( true, { specialEasing: {} }, options ),
|
8661 |
-
originalProperties: properties,
|
8662 |
-
originalOptions: options,
|
8663 |
-
startTime: fxNow || createFxNow(),
|
8664 |
-
duration: options.duration,
|
8665 |
-
tweens: [],
|
8666 |
-
createTween: function( prop, end, easing ) {
|
8667 |
-
var tween = jQuery.Tween( elem, animation.opts, prop, end,
|
8668 |
-
animation.opts.specialEasing[ prop ] || animation.opts.easing );
|
8669 |
-
animation.tweens.push( tween );
|
8670 |
-
return tween;
|
8671 |
-
},
|
8672 |
-
stop: function( gotoEnd ) {
|
8673 |
-
var index = 0,
|
8674 |
-
// if we are going to the end, we want to run all the tweens
|
8675 |
-
// otherwise we skip this part
|
8676 |
-
length = gotoEnd ? animation.tweens.length : 0;
|
8677 |
-
|
8678 |
-
for ( ; index < length ; index++ ) {
|
8679 |
-
animation.tweens[ index ].run( 1 );
|
8680 |
-
}
|
8681 |
-
|
8682 |
-
// resolve when we played the last frame
|
8683 |
-
// otherwise, reject
|
8684 |
-
if ( gotoEnd ) {
|
8685 |
-
deferred.resolveWith( elem, [ animation, gotoEnd ] );
|
8686 |
-
} else {
|
8687 |
-
deferred.rejectWith( elem, [ animation, gotoEnd ] );
|
8688 |
-
}
|
8689 |
-
return this;
|
8690 |
-
}
|
8691 |
-
}),
|
8692 |
-
props = animation.props;
|
8693 |
-
|
8694 |
-
propFilter( props, animation.opts.specialEasing );
|
8695 |
-
|
8696 |
-
for ( ; index < length ; index++ ) {
|
8697 |
-
result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
|
8698 |
-
if ( result ) {
|
8699 |
-
return result;
|
8700 |
-
}
|
8701 |
-
}
|
8702 |
-
|
8703 |
-
createTweens( animation, props );
|
8704 |
-
|
8705 |
-
if ( jQuery.isFunction( animation.opts.start ) ) {
|
8706 |
-
animation.opts.start.call( elem, animation );
|
8707 |
-
}
|
8708 |
-
|
8709 |
-
jQuery.fx.timer(
|
8710 |
-
jQuery.extend( tick, {
|
8711 |
-
anim: animation,
|
8712 |
-
queue: animation.opts.queue,
|
8713 |
-
elem: elem
|
8714 |
-
})
|
8715 |
-
);
|
8716 |
|
8717 |
-
|
8718 |
-
|
8719 |
-
|
8720 |
-
.
|
8721 |
-
|
8722 |
}
|
8723 |
|
8724 |
-
function
|
8725 |
-
|
8726 |
-
|
8727 |
-
|
8728 |
-
for ( index in props ) {
|
8729 |
-
name = jQuery.camelCase( index );
|
8730 |
-
easing = specialEasing[ name ];
|
8731 |
-
value = props[ index ];
|
8732 |
-
if ( jQuery.isArray( value ) ) {
|
8733 |
-
easing = value[ 1 ];
|
8734 |
-
value = props[ index ] = value[ 0 ];
|
8735 |
-
}
|
8736 |
-
|
8737 |
-
if ( index !== name ) {
|
8738 |
-
props[ name ] = value;
|
8739 |
-
delete props[ index ];
|
8740 |
-
}
|
8741 |
-
|
8742 |
-
hooks = jQuery.cssHooks[ name ];
|
8743 |
-
if ( hooks && "expand" in hooks ) {
|
8744 |
-
value = hooks.expand( value );
|
8745 |
-
delete props[ name ];
|
8746 |
-
|
8747 |
-
// not quite $.extend, this wont overwrite keys already present.
|
8748 |
-
// also - reusing 'index' from above because we have the correct "name"
|
8749 |
-
for ( index in value ) {
|
8750 |
-
if ( !( index in props ) ) {
|
8751 |
-
props[ index ] = value[ index ];
|
8752 |
-
specialEasing[ index ] = easing;
|
8753 |
-
}
|
8754 |
-
}
|
8755 |
-
} else {
|
8756 |
-
specialEasing[ name ] = easing;
|
8757 |
-
}
|
8758 |
-
}
|
8759 |
}
|
8760 |
|
8761 |
-
jQuery.Animation = jQuery.extend( Animation, {
|
8762 |
|
8763 |
-
tweener: function( props, callback ) {
|
8764 |
-
if ( jQuery.isFunction( props ) ) {
|
8765 |
-
callback = props;
|
8766 |
-
props = [ "*" ];
|
8767 |
-
} else {
|
8768 |
-
props = props.split(" ");
|
8769 |
-
}
|
8770 |
|
8771 |
-
var prop,
|
8772 |
-
index = 0,
|
8773 |
-
length = props.length;
|
8774 |
|
8775 |
-
|
8776 |
-
|
8777 |
-
|
8778 |
-
|
8779 |
-
}
|
8780 |
},
|
8781 |
-
|
8782 |
-
|
8783 |
-
|
8784 |
-
|
8785 |
-
|
8786 |
-
|
|
|
8787 |
}
|
8788 |
}
|
8789 |
});
|
8790 |
|
8791 |
-
|
8792 |
-
|
8793 |
-
|
8794 |
-
|
8795 |
-
orig = {},
|
8796 |
-
handled = [],
|
8797 |
-
hidden = elem.nodeType && isHidden( elem );
|
8798 |
-
|
8799 |
-
// handle queue: false promises
|
8800 |
-
if ( !opts.queue ) {
|
8801 |
-
hooks = jQuery._queueHooks( elem, "fx" );
|
8802 |
-
if ( hooks.unqueued == null ) {
|
8803 |
-
hooks.unqueued = 0;
|
8804 |
-
oldfire = hooks.empty.fire;
|
8805 |
-
hooks.empty.fire = function() {
|
8806 |
-
if ( !hooks.unqueued ) {
|
8807 |
-
oldfire();
|
8808 |
-
}
|
8809 |
-
};
|
8810 |
-
}
|
8811 |
-
hooks.unqueued++;
|
8812 |
-
|
8813 |
-
anim.always(function() {
|
8814 |
-
// doing this makes sure that the complete handler will be called
|
8815 |
-
// before this completes
|
8816 |
-
anim.always(function() {
|
8817 |
-
hooks.unqueued--;
|
8818 |
-
if ( !jQuery.queue( elem, "fx" ).length ) {
|
8819 |
-
hooks.empty.fire();
|
8820 |
-
}
|
8821 |
-
});
|
8822 |
-
});
|
8823 |
}
|
|
|
|
|
|
|
|
|
|
|
8824 |
|
8825 |
-
|
8826 |
-
|
8827 |
-
// Make sure that nothing sneaks out
|
8828 |
-
// Record all 3 overflow attributes because IE does not
|
8829 |
-
// change the overflow attribute when overflowX and
|
8830 |
-
// overflowY are set to the same value
|
8831 |
-
opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
|
8832 |
-
|
8833 |
-
// Set display property to inline-block for height/width
|
8834 |
-
// animations on inline elements that are having width/height animated
|
8835 |
-
if ( jQuery.css( elem, "display" ) === "inline" &&
|
8836 |
-
jQuery.css( elem, "float" ) === "none" ) {
|
8837 |
-
|
8838 |
-
// inline-level elements accept inline-block;
|
8839 |
-
// block-level elements need to be inline with layout
|
8840 |
-
if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) {
|
8841 |
-
style.display = "inline-block";
|
8842 |
|
8843 |
-
|
8844 |
-
|
8845 |
-
}
|
8846 |
-
}
|
8847 |
-
}
|
8848 |
|
8849 |
-
|
8850 |
-
|
8851 |
-
if ( !jQuery.support.shrinkWrapBlocks ) {
|
8852 |
-
anim.done(function() {
|
8853 |
-
style.overflow = opts.overflow[ 0 ];
|
8854 |
-
style.overflowX = opts.overflow[ 1 ];
|
8855 |
-
style.overflowY = opts.overflow[ 2 ];
|
8856 |
-
});
|
8857 |
-
}
|
8858 |
-
}
|
8859 |
|
|
|
8860 |
|
8861 |
-
|
8862 |
-
for ( index in props ) {
|
8863 |
-
value = props[ index ];
|
8864 |
-
if ( rfxtypes.exec( value ) ) {
|
8865 |
-
delete props[ index ];
|
8866 |
-
toggle = toggle || value === "toggle";
|
8867 |
-
if ( value === ( hidden ? "hide" : "show" ) ) {
|
8868 |
-
continue;
|
8869 |
-
}
|
8870 |
-
handled.push( index );
|
8871 |
-
}
|
8872 |
-
}
|
8873 |
|
8874 |
-
|
8875 |
-
if ( length ) {
|
8876 |
-
dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} );
|
8877 |
-
if ( "hidden" in dataShow ) {
|
8878 |
-
hidden = dataShow.hidden;
|
8879 |
-
}
|
8880 |
|
8881 |
-
|
8882 |
-
if ( toggle ) {
|
8883 |
-
dataShow.hidden = !hidden;
|
8884 |
-
}
|
8885 |
-
if ( hidden ) {
|
8886 |
-
jQuery( elem ).show();
|
8887 |
-
} else {
|
8888 |
-
anim.done(function() {
|
8889 |
-
jQuery( elem ).hide();
|
8890 |
-
});
|
8891 |
-
}
|
8892 |
-
anim.done(function() {
|
8893 |
-
var prop;
|
8894 |
-
jQuery.removeData( elem, "fxshow", true );
|
8895 |
-
for ( prop in orig ) {
|
8896 |
-
jQuery.style( elem, prop, orig[ prop ] );
|
8897 |
-
}
|
8898 |
-
});
|
8899 |
-
for ( index = 0 ; index < length ; index++ ) {
|
8900 |
-
prop = handled[ index ];
|
8901 |
-
tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 );
|
8902 |
-
orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop );
|
8903 |
|
8904 |
-
|
8905 |
-
|
8906 |
-
if ( hidden ) {
|
8907 |
-
tween.end = tween.start;
|
8908 |
-
tween.start = prop === "width" || prop === "height" ? 1 : 0;
|
8909 |
}
|
8910 |
-
}
|
8911 |
-
}
|
8912 |
-
}
|
8913 |
-
}
|
8914 |
-
|
8915 |
-
function Tween( elem, options, prop, end, easing ) {
|
8916 |
-
return new Tween.prototype.init( elem, options, prop, end, easing );
|
8917 |
-
}
|
8918 |
-
jQuery.Tween = Tween;
|
8919 |
|
8920 |
-
|
8921 |
-
constructor: Tween,
|
8922 |
-
init: function( elem, options, prop, end, easing, unit ) {
|
8923 |
-
this.elem = elem;
|
8924 |
-
this.prop = prop;
|
8925 |
-
this.easing = easing || "swing";
|
8926 |
-
this.options = options;
|
8927 |
-
this.start = this.now = this.cur();
|
8928 |
-
this.end = end;
|
8929 |
-
this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
|
8930 |
-
},
|
8931 |
-
cur: function() {
|
8932 |
-
var hooks = Tween.propHooks[ this.prop ];
|
8933 |
|
8934 |
-
|
8935 |
-
|
8936 |
-
Tween.propHooks._default.get( this );
|
8937 |
-
},
|
8938 |
-
run: function( percent ) {
|
8939 |
-
var eased,
|
8940 |
-
hooks = Tween.propHooks[ this.prop ];
|
8941 |
|
8942 |
-
|
8943 |
-
this.pos = eased = jQuery.easing[ this.easing ](
|
8944 |
-
percent, this.options.duration * percent, 0, 1, this.options.duration
|
8945 |
-
);
|
8946 |
-
} else {
|
8947 |
-
this.pos = eased = percent;
|
8948 |
-
}
|
8949 |
-
this.now = ( this.end - this.start ) * eased + this.start;
|
8950 |
|
8951 |
-
|
8952 |
-
|
8953 |
-
}
|
8954 |
|
8955 |
-
|
8956 |
-
|
8957 |
-
|
8958 |
-
|
8959 |
-
}
|
8960 |
-
return this;
|
8961 |
-
}
|
8962 |
-
};
|
8963 |
|
8964 |
-
|
|
|
8965 |
|
8966 |
-
|
8967 |
-
|
8968 |
-
|
8969 |
-
|
|
|
|
|
8970 |
|
8971 |
-
|
8972 |
-
|
8973 |
-
|
8974 |
-
}
|
8975 |
|
8976 |
-
|
8977 |
-
|
8978 |
-
|
8979 |
-
|
8980 |
-
result = jQuery.css( tween.elem, tween.prop, false, "" );
|
8981 |
-
// Empty strings, null, undefined and "auto" are converted to 0.
|
8982 |
-
return !result || result === "auto" ? 0 : result;
|
8983 |
-
},
|
8984 |
-
set: function( tween ) {
|
8985 |
-
// use step hook for back compat - use cssHook if its there - use .style if its
|
8986 |
-
// available and use plain properties where available
|
8987 |
-
if ( jQuery.fx.step[ tween.prop ] ) {
|
8988 |
-
jQuery.fx.step[ tween.prop ]( tween );
|
8989 |
-
} else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
|
8990 |
-
jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
|
8991 |
-
} else {
|
8992 |
-
tween.elem[ tween.prop ] = tween.now;
|
8993 |
}
|
8994 |
-
}
|
8995 |
}
|
8996 |
-
};
|
8997 |
|
8998 |
-
// Remove in 2.0 - this supports IE8's panic based approach
|
8999 |
-
// to setting things on disconnected nodes
|
9000 |
|
9001 |
-
Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
|
9002 |
-
set: function( tween ) {
|
9003 |
-
if ( tween.elem.nodeType && tween.elem.parentNode ) {
|
9004 |
-
tween.elem[ tween.prop ] = tween.now;
|
9005 |
-
}
|
9006 |
-
}
|
9007 |
-
};
|
9008 |
|
9009 |
-
|
9010 |
-
|
9011 |
-
|
9012 |
-
|
9013 |
-
|
9014 |
-
|
9015 |
-
|
9016 |
-
|
9017 |
-
|
|
|
|
|
|
|
9018 |
});
|
9019 |
|
9020 |
-
|
9021 |
-
|
9022 |
|
9023 |
-
|
9024 |
-
|
|
|
|
|
|
|
9025 |
|
9026 |
-
|
9027 |
-
|
9028 |
-
},
|
9029 |
-
animate: function( prop, speed, easing, callback ) {
|
9030 |
-
var empty = jQuery.isEmptyObject( prop ),
|
9031 |
-
optall = jQuery.speed( speed, easing, callback ),
|
9032 |
-
doAnimation = function() {
|
9033 |
-
// Operate on a copy of prop so per-property easing won't be lost
|
9034 |
-
var anim = Animation( this, jQuery.extend( {}, prop ), optall );
|
9035 |
|
9036 |
-
|
9037 |
-
|
9038 |
-
|
9039 |
-
|
9040 |
-
};
|
9041 |
|
9042 |
-
|
9043 |
-
|
9044 |
-
|
9045 |
-
|
9046 |
-
|
9047 |
-
|
9048 |
-
|
9049 |
-
|
9050 |
-
|
|
|
|
|
|
|
|
|
9051 |
};
|
9052 |
|
9053 |
-
|
9054 |
-
|
9055 |
-
clearQueue = type;
|
9056 |
-
type = undefined;
|
9057 |
-
}
|
9058 |
-
if ( clearQueue && type !== false ) {
|
9059 |
-
this.queue( type || "fx", [] );
|
9060 |
-
}
|
9061 |
|
9062 |
-
|
9063 |
-
|
9064 |
-
|
9065 |
-
|
9066 |
-
|
9067 |
|
9068 |
-
|
9069 |
-
|
9070 |
-
|
9071 |
-
|
9072 |
-
} else {
|
9073 |
-
for ( index in data ) {
|
9074 |
-
if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
|
9075 |
-
stopQueue( data[ index ] );
|
9076 |
-
}
|
9077 |
-
}
|
9078 |
-
}
|
9079 |
|
9080 |
-
|
9081 |
-
|
9082 |
-
|
9083 |
-
|
9084 |
-
|
9085 |
-
|
|
|
9086 |
}
|
9087 |
|
9088 |
-
//
|
9089 |
-
|
9090 |
-
|
9091 |
-
if ( dequeue || !gotoEnd ) {
|
9092 |
-
jQuery.dequeue( this, type );
|
9093 |
}
|
|
|
|
|
9094 |
});
|
|
|
|
|
|
|
9095 |
}
|
9096 |
});
|
9097 |
|
9098 |
-
// Generate parameters to create a standard animation
|
9099 |
-
function genFx( type, includeWidth ) {
|
9100 |
-
var which,
|
9101 |
-
attrs = { height: type },
|
9102 |
-
i = 0;
|
9103 |
|
9104 |
-
|
9105 |
-
|
9106 |
-
|
9107 |
-
|
9108 |
-
|
9109 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
9110 |
}
|
|
|
9111 |
|
9112 |
-
|
9113 |
-
|
|
|
|
|
|
|
|
|
9114 |
}
|
9115 |
|
9116 |
-
|
9117 |
-
}
|
9118 |
|
9119 |
-
|
9120 |
-
jQuery.
|
9121 |
-
|
9122 |
-
slideUp: genFx("hide"),
|
9123 |
-
slideToggle: genFx("toggle"),
|
9124 |
-
fadeIn: { opacity: "show" },
|
9125 |
-
fadeOut: { opacity: "hide" },
|
9126 |
-
fadeToggle: { opacity: "toggle" }
|
9127 |
-
}, function( name, props ) {
|
9128 |
-
jQuery.fn[ name ] = function( speed, easing, callback ) {
|
9129 |
-
return this.animate( props, speed, easing, callback );
|
9130 |
-
};
|
9131 |
-
});
|
9132 |
|
9133 |
-
jQuery.
|
9134 |
-
|
9135 |
-
complete: fn || !fn && easing ||
|
9136 |
-
jQuery.isFunction( speed ) && speed,
|
9137 |
-
duration: speed,
|
9138 |
-
easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
|
9139 |
-
};
|
9140 |
|
9141 |
-
opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
|
9142 |
-
opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
|
9143 |
|
9144 |
-
|
9145 |
-
|
9146 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
9147 |
}
|
9148 |
|
9149 |
-
|
9150 |
-
|
|
|
9151 |
|
9152 |
-
|
9153 |
-
|
9154 |
-
|
9155 |
-
|
9156 |
|
9157 |
-
|
9158 |
-
|
9159 |
-
}
|
9160 |
-
};
|
9161 |
|
9162 |
-
|
9163 |
-
|
|
|
9164 |
|
9165 |
-
|
9166 |
-
|
9167 |
-
|
9168 |
-
},
|
9169 |
-
swing: function( p ) {
|
9170 |
-
return 0.5 - Math.cos( p*Math.PI ) / 2;
|
9171 |
}
|
9172 |
-
};
|
9173 |
|
9174 |
-
|
9175 |
-
|
9176 |
-
jQuery.
|
9177 |
-
|
9178 |
-
timers = jQuery.timers,
|
9179 |
-
i = 0;
|
9180 |
|
9181 |
-
|
|
|
|
|
|
|
|
|
9182 |
|
9183 |
-
|
9184 |
-
|
9185 |
-
// Checks the timer has not already been removed
|
9186 |
-
if ( !timer() && timers[ i ] === timer ) {
|
9187 |
-
timers.splice( i--, 1 );
|
9188 |
-
}
|
9189 |
-
}
|
9190 |
|
9191 |
-
|
9192 |
-
jQuery.fx.stop();
|
9193 |
-
}
|
9194 |
-
fxNow = undefined;
|
9195 |
-
};
|
9196 |
|
9197 |
-
|
9198 |
-
|
9199 |
-
|
9200 |
-
}
|
9201 |
-
};
|
9202 |
|
9203 |
-
|
|
|
9204 |
|
9205 |
-
|
9206 |
-
|
9207 |
-
|
9208 |
-
}
|
9209 |
|
9210 |
-
|
9211 |
-
slow: 600,
|
9212 |
-
fast: 200,
|
9213 |
-
// Default speed
|
9214 |
-
_default: 400
|
9215 |
};
|
9216 |
|
9217 |
-
// Back Compat <1.8 extension point
|
9218 |
-
jQuery.fx.step = {};
|
9219 |
-
|
9220 |
-
if ( jQuery.expr && jQuery.expr.filters ) {
|
9221 |
-
jQuery.expr.filters.animated = function( elem ) {
|
9222 |
-
return jQuery.grep(jQuery.timers, function( fn ) {
|
9223 |
-
return elem === fn.elem;
|
9224 |
-
}).length;
|
9225 |
-
};
|
9226 |
-
}
|
9227 |
-
var rroot = /^(?:body|html)$/i;
|
9228 |
|
9229 |
-
jQuery.fn.offset = function( options ) {
|
9230 |
-
if ( arguments.length ) {
|
9231 |
-
return options === undefined ?
|
9232 |
-
this :
|
9233 |
-
this.each(function( i ) {
|
9234 |
-
jQuery.offset.setOffset( this, options, i );
|
9235 |
-
});
|
9236 |
-
}
|
9237 |
|
9238 |
-
var docElem, body, win, clientTop, clientLeft, scrollTop, scrollLeft,
|
9239 |
-
box = { top: 0, left: 0 },
|
9240 |
-
elem = this[ 0 ],
|
9241 |
-
doc = elem && elem.ownerDocument;
|
9242 |
|
9243 |
-
|
9244 |
-
|
9245 |
-
|
|
|
|
|
|
|
9246 |
|
9247 |
-
if ( (body = doc.body) === elem ) {
|
9248 |
-
return jQuery.offset.bodyOffset( elem );
|
9249 |
-
}
|
9250 |
|
9251 |
-
docElem = doc.documentElement;
|
9252 |
|
9253 |
-
// Make sure it's not a disconnected DOM node
|
9254 |
-
if ( !jQuery.contains( docElem, elem ) ) {
|
9255 |
-
return box;
|
9256 |
-
}
|
9257 |
|
9258 |
-
|
9259 |
-
|
9260 |
-
|
9261 |
-
|
9262 |
-
}
|
9263 |
-
win = getWindow( doc );
|
9264 |
-
clientTop = docElem.clientTop || body.clientTop || 0;
|
9265 |
-
clientLeft = docElem.clientLeft || body.clientLeft || 0;
|
9266 |
-
scrollTop = win.pageYOffset || docElem.scrollTop;
|
9267 |
-
scrollLeft = win.pageXOffset || docElem.scrollLeft;
|
9268 |
-
return {
|
9269 |
-
top: box.top + scrollTop - clientTop,
|
9270 |
-
left: box.left + scrollLeft - clientLeft
|
9271 |
-
};
|
9272 |
};
|
9273 |
|
9274 |
-
jQuery.offset = {
|
9275 |
|
9276 |
-
bodyOffset: function( body ) {
|
9277 |
-
var top = body.offsetTop,
|
9278 |
-
left = body.offsetLeft;
|
9279 |
|
9280 |
-
if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) {
|
9281 |
-
top += parseFloat( jQuery.css(body, "marginTop") ) || 0;
|
9282 |
-
left += parseFloat( jQuery.css(body, "marginLeft") ) || 0;
|
9283 |
-
}
|
9284 |
|
9285 |
-
return { top: top, left: left };
|
9286 |
-
},
|
9287 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9288 |
setOffset: function( elem, options, i ) {
|
9289 |
-
var
|
|
|
|
|
|
|
9290 |
|
9291 |
// set position first, in-case top/left are set even on static elem
|
9292 |
if ( position === "static" ) {
|
9293 |
elem.style.position = "relative";
|
9294 |
}
|
9295 |
|
9296 |
-
|
9297 |
-
|
9298 |
-
|
9299 |
-
|
9300 |
-
|
9301 |
-
props = {}, curPosition = {}, curTop, curLeft;
|
9302 |
|
9303 |
// need to be able to calculate position if either top or left is auto and position is either absolute or fixed
|
9304 |
if ( calculatePosition ) {
|
@@ -9329,58 +10104,99 @@ jQuery.offset = {
|
|
9329 |
}
|
9330 |
};
|
9331 |
|
9332 |
-
|
9333 |
jQuery.fn.extend({
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9334 |
|
9335 |
position: function() {
|
9336 |
-
if ( !this[0] ) {
|
9337 |
return;
|
9338 |
}
|
9339 |
|
9340 |
-
var
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9341 |
|
9342 |
-
|
9343 |
-
|
|
|
|
|
|
|
9344 |
|
9345 |
-
|
9346 |
-
|
9347 |
-
|
|
|
9348 |
|
9349 |
-
// Subtract element margins
|
9350 |
// note: when an element has margin: auto the offsetLeft and marginLeft
|
9351 |
// are the same in Safari causing offset.left to incorrectly be 0
|
9352 |
-
offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0;
|
9353 |
-
offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0;
|
9354 |
-
|
9355 |
-
// Add offsetParent borders
|
9356 |
-
parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0;
|
9357 |
-
parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0;
|
9358 |
-
|
9359 |
-
// Subtract the two offsets
|
9360 |
return {
|
9361 |
-
top: offset.top - parentOffset.top,
|
9362 |
-
left: offset.left - parentOffset.left
|
9363 |
};
|
9364 |
},
|
9365 |
|
9366 |
offsetParent: function() {
|
9367 |
return this.map(function() {
|
9368 |
-
var offsetParent = this.offsetParent ||
|
9369 |
-
|
|
|
9370 |
offsetParent = offsetParent.offsetParent;
|
9371 |
}
|
9372 |
-
return offsetParent ||
|
9373 |
});
|
9374 |
}
|
9375 |
});
|
9376 |
|
9377 |
-
|
9378 |
// Create scrollLeft and scrollTop methods
|
9379 |
-
jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) {
|
9380 |
var top = /Y/.test( prop );
|
9381 |
|
9382 |
jQuery.fn[ method ] = function( val ) {
|
9383 |
-
return
|
9384 |
var win = getWindow( elem );
|
9385 |
|
9386 |
if ( val === undefined ) {
|
@@ -9392,7 +10208,7 @@ jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( me
|
|
9392 |
if ( win ) {
|
9393 |
win.scrollTo(
|
9394 |
!top ? val : jQuery( win ).scrollLeft(),
|
9395 |
-
|
9396 |
);
|
9397 |
|
9398 |
} else {
|
@@ -9402,13 +10218,25 @@ jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( me
|
|
9402 |
};
|
9403 |
});
|
9404 |
|
9405 |
-
|
9406 |
-
|
9407 |
-
|
9408 |
-
|
9409 |
-
|
9410 |
-
|
9411 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9412 |
// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
|
9413 |
jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
|
9414 |
jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
|
@@ -9417,7 +10245,7 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
|
|
9417 |
var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
|
9418 |
extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
|
9419 |
|
9420 |
-
return
|
9421 |
var doc;
|
9422 |
|
9423 |
if ( jQuery.isWindow( elem ) ) {
|
@@ -9442,7 +10270,7 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
|
|
9442 |
|
9443 |
return value === undefined ?
|
9444 |
// Get width or height on the element, requesting but not forcing parseFloat
|
9445 |
-
jQuery.css( elem, type,
|
9446 |
|
9447 |
// Set width or height on the element
|
9448 |
jQuery.style( elem, type, value, extra );
|
@@ -9450,23 +10278,69 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
|
|
9450 |
};
|
9451 |
});
|
9452 |
});
|
9453 |
-
|
9454 |
-
|
9455 |
-
|
9456 |
-
|
9457 |
-
|
9458 |
-
|
9459 |
-
|
9460 |
-
|
9461 |
-
|
9462 |
-
|
9463 |
-
|
9464 |
-
|
9465 |
-
//
|
9466 |
-
//
|
9467 |
-
//
|
9468 |
-
|
9469 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9470 |
}
|
9471 |
|
9472 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/*!
|
2 |
+
* jQuery JavaScript Library v1.11.2
|
3 |
* http://jquery.com/
|
4 |
*
|
5 |
* Includes Sizzle.js
|
6 |
* http://sizzlejs.com/
|
7 |
*
|
8 |
+
* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
|
9 |
* Released under the MIT license
|
10 |
* http://jquery.org/license
|
11 |
*
|
12 |
+
* Date: 2014-12-17T15:27Z
|
13 |
*/
|
|
|
|
|
|
|
|
|
14 |
|
15 |
+
(function( global, factory ) {
|
16 |
+
|
17 |
+
if ( typeof module === "object" && typeof module.exports === "object" ) {
|
18 |
+
// For CommonJS and CommonJS-like environments where a proper window is present,
|
19 |
+
// execute the factory and get jQuery
|
20 |
+
// For environments that do not inherently posses a window with a document
|
21 |
+
// (such as Node.js), expose a jQuery-making factory as module.exports
|
22 |
+
// This accentuates the need for the creation of a real window
|
23 |
+
// e.g. var jQuery = require("jquery")(window);
|
24 |
+
// See ticket #14549 for more info
|
25 |
+
module.exports = global.document ?
|
26 |
+
factory( global, true ) :
|
27 |
+
function( w ) {
|
28 |
+
if ( !w.document ) {
|
29 |
+
throw new Error( "jQuery requires a window with a document" );
|
30 |
+
}
|
31 |
+
return factory( w );
|
32 |
+
};
|
33 |
+
} else {
|
34 |
+
factory( global );
|
35 |
+
}
|
36 |
|
37 |
+
// Pass this if window is not defined yet
|
38 |
+
}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
|
|
|
|
|
39 |
|
40 |
+
// Can't do this because several apps including ASP.NET trace
|
41 |
+
// the stack via arguments.caller.callee and Firefox dies if
|
42 |
+
// you try to trace through "use strict" call chains. (#13335)
|
43 |
+
// Support: Firefox 18+
|
44 |
+
//
|
45 |
|
46 |
+
var deletedIds = [];
|
|
|
47 |
|
48 |
+
var slice = deletedIds.slice;
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
+
var concat = deletedIds.concat;
|
|
|
|
|
|
|
|
|
51 |
|
52 |
+
var push = deletedIds.push;
|
|
|
53 |
|
54 |
+
var indexOf = deletedIds.indexOf;
|
|
|
|
|
55 |
|
56 |
+
var class2type = {};
|
|
|
57 |
|
58 |
+
var toString = class2type.toString;
|
|
|
|
|
59 |
|
60 |
+
var hasOwn = class2type.hasOwnProperty;
|
|
|
61 |
|
62 |
+
var support = {};
|
63 |
+
|
64 |
+
|
65 |
+
|
66 |
+
var
|
67 |
+
version = "1.11.2",
|
68 |
+
|
69 |
+
// Define a local copy of jQuery
|
70 |
+
jQuery = function( selector, context ) {
|
71 |
+
// The jQuery object is actually just the init constructor 'enhanced'
|
72 |
+
// Need init if jQuery is called (just allow error to be thrown if not included)
|
73 |
+
return new jQuery.fn.init( selector, context );
|
74 |
+
},
|
75 |
+
|
76 |
+
// Support: Android<4.1, IE<9
|
77 |
+
// Make sure we trim BOM and NBSP
|
78 |
+
rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
|
79 |
|
80 |
// Matches dashed string for camelizing
|
81 |
rmsPrefix = /^-ms-/,
|
83 |
|
84 |
// Used by jQuery.camelCase as callback to replace()
|
85 |
fcamelCase = function( all, letter ) {
|
86 |
+
return letter.toUpperCase();
|
87 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
|
89 |
jQuery.fn = jQuery.prototype = {
|
90 |
+
// The current version of jQuery being used
|
91 |
+
jquery: version,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
|
93 |
+
constructor: jQuery,
|
|
|
94 |
|
95 |
// Start with an empty selector
|
96 |
selector: "",
|
97 |
|
|
|
|
|
|
|
98 |
// The default length of a jQuery object is 0
|
99 |
length: 0,
|
100 |
|
|
|
|
|
|
|
|
|
|
|
101 |
toArray: function() {
|
102 |
+
return slice.call( this );
|
103 |
},
|
104 |
|
105 |
// Get the Nth element in the matched element set OR
|
106 |
// Get the whole matched element set as a clean array
|
107 |
get: function( num ) {
|
108 |
+
return num != null ?
|
109 |
|
110 |
+
// Return just the one element from the set
|
111 |
+
( num < 0 ? this[ num + this.length ] : this[ num ] ) :
|
112 |
|
113 |
+
// Return all the elements in a clean array
|
114 |
+
slice.call( this );
|
115 |
},
|
116 |
|
117 |
// Take an array of elements and push it onto the stack
|
118 |
// (returning the new matched element set)
|
119 |
+
pushStack: function( elems ) {
|
120 |
|
121 |
// Build a new jQuery matched element set
|
122 |
var ret = jQuery.merge( this.constructor(), elems );
|
123 |
|
124 |
// Add the old object onto the stack (as a reference)
|
125 |
ret.prevObject = this;
|
|
|
126 |
ret.context = this.context;
|
127 |
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
// Return the newly-formed element set
|
129 |
return ret;
|
130 |
},
|
136 |
return jQuery.each( this, callback, args );
|
137 |
},
|
138 |
|
139 |
+
map: function( callback ) {
|
140 |
+
return this.pushStack( jQuery.map(this, function( elem, i ) {
|
141 |
+
return callback.call( elem, i, elem );
|
142 |
+
}));
|
|
|
143 |
},
|
144 |
|
145 |
+
slice: function() {
|
146 |
+
return this.pushStack( slice.apply( this, arguments ) );
|
|
|
|
|
|
|
147 |
},
|
148 |
|
149 |
first: function() {
|
154 |
return this.eq( -1 );
|
155 |
},
|
156 |
|
157 |
+
eq: function( i ) {
|
158 |
+
var len = this.length,
|
159 |
+
j = +i + ( i < 0 ? len : 0 );
|
160 |
+
return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
|
|
|
|
|
|
|
|
|
|
|
161 |
},
|
162 |
|
163 |
end: function() {
|
166 |
|
167 |
// For internal use only.
|
168 |
// Behaves like an Array's method, not like a jQuery method.
|
169 |
+
push: push,
|
170 |
+
sort: deletedIds.sort,
|
171 |
+
splice: deletedIds.splice
|
172 |
};
|
173 |
|
|
|
|
|
|
|
174 |
jQuery.extend = jQuery.fn.extend = function() {
|
175 |
+
var src, copyIsArray, copy, name, options, clone,
|
176 |
target = arguments[0] || {},
|
177 |
i = 1,
|
178 |
length = arguments.length,
|
181 |
// Handle a deep copy situation
|
182 |
if ( typeof target === "boolean" ) {
|
183 |
deep = target;
|
184 |
+
|
185 |
// skip the boolean and the target
|
186 |
+
target = arguments[ i ] || {};
|
187 |
+
i++;
|
188 |
}
|
189 |
|
190 |
// Handle case when target is a string or something (possible in deep copy)
|
193 |
}
|
194 |
|
195 |
// extend jQuery itself if only one argument is passed
|
196 |
+
if ( i === length ) {
|
197 |
target = this;
|
198 |
+
i--;
|
199 |
}
|
200 |
|
201 |
for ( ; i < length; i++ ) {
|
237 |
};
|
238 |
|
239 |
jQuery.extend({
|
240 |
+
// Unique for each copy of jQuery on the page
|
241 |
+
expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
242 |
|
243 |
+
// Assume jQuery is ready without the ready module
|
244 |
+
isReady: true,
|
|
|
245 |
|
246 |
+
error: function( msg ) {
|
247 |
+
throw new Error( msg );
|
|
|
|
|
|
|
|
|
|
|
248 |
},
|
249 |
|
250 |
+
noop: function() {},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
251 |
|
252 |
// See test/unit/core.js for details concerning isFunction.
|
253 |
// Since version 1.3, DOM methods and functions like alert
|
261 |
},
|
262 |
|
263 |
isWindow: function( obj ) {
|
264 |
+
/* jshint eqeqeq: false */
|
265 |
return obj != null && obj == obj.window;
|
266 |
},
|
267 |
|
268 |
isNumeric: function( obj ) {
|
269 |
+
// parseFloat NaNs numeric-cast false positives (null|true|false|"")
|
270 |
+
// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
|
271 |
+
// subtraction forces infinities to NaN
|
272 |
+
// adding 1 corrects loss of precision from parseFloat (#15100)
|
273 |
+
return !jQuery.isArray( obj ) && (obj - parseFloat( obj ) + 1) >= 0;
|
274 |
},
|
275 |
|
276 |
+
isEmptyObject: function( obj ) {
|
277 |
+
var name;
|
278 |
+
for ( name in obj ) {
|
279 |
+
return false;
|
280 |
+
}
|
281 |
+
return true;
|
282 |
},
|
283 |
|
284 |
isPlainObject: function( obj ) {
|
285 |
+
var key;
|
286 |
+
|
287 |
// Must be an Object.
|
288 |
// Because of IE, we also have to check the presence of the constructor property.
|
289 |
// Make sure that DOM nodes and window objects don't pass through, as well
|
294 |
try {
|
295 |
// Not own constructor property must be Object
|
296 |
if ( obj.constructor &&
|
297 |
+
!hasOwn.call(obj, "constructor") &&
|
298 |
+
!hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
|
299 |
return false;
|
300 |
}
|
301 |
} catch ( e ) {
|
303 |
return false;
|
304 |
}
|
305 |
|
306 |
+
// Support: IE<9
|
307 |
+
// Handle iteration over inherited properties before own properties.
|
308 |
+
if ( support.ownLast ) {
|
309 |
+
for ( key in obj ) {
|
310 |
+
return hasOwn.call( obj, key );
|
311 |
+
}
|
312 |
+
}
|
313 |
+
|
314 |
// Own properties are enumerated firstly, so to speed up,
|
315 |
// if last one is own, then all properties are own.
|
|
|
|
|
316 |
for ( key in obj ) {}
|
317 |
|
318 |
+
return key === undefined || hasOwn.call( obj, key );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
319 |
},
|
320 |
|
321 |
+
type: function( obj ) {
|
322 |
+
if ( obj == null ) {
|
323 |
+
return obj + "";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
324 |
}
|
325 |
+
return typeof obj === "object" || typeof obj === "function" ?
|
326 |
+
class2type[ toString.call(obj) ] || "object" :
|
327 |
+
typeof obj;
|
328 |
},
|
329 |
|
|
|
|
|
330 |
// Evaluates a script in a global context
|
331 |
// Workarounds based on findings by Jim Driscoll
|
332 |
// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
|
333 |
globalEval: function( data ) {
|
334 |
+
if ( data && jQuery.trim( data ) ) {
|
335 |
// We use execScript on Internet Explorer
|
336 |
// We use an anonymous function so that context is window
|
337 |
// rather than jQuery in Firefox
|
353 |
|
354 |
// args is for internal usage only
|
355 |
each: function( obj, callback, args ) {
|
356 |
+
var value,
|
357 |
i = 0,
|
358 |
length = obj.length,
|
359 |
+
isArray = isArraylike( obj );
|
360 |
|
361 |
if ( args ) {
|
362 |
+
if ( isArray ) {
|
363 |
+
for ( ; i < length; i++ ) {
|
364 |
+
value = callback.apply( obj[ i ], args );
|
365 |
+
|
366 |
+
if ( value === false ) {
|
367 |
break;
|
368 |
}
|
369 |
}
|
370 |
} else {
|
371 |
+
for ( i in obj ) {
|
372 |
+
value = callback.apply( obj[ i ], args );
|
373 |
+
|
374 |
+
if ( value === false ) {
|
375 |
break;
|
376 |
}
|
377 |
}
|
379 |
|
380 |
// A special, fast, case for the most common use of each
|
381 |
} else {
|
382 |
+
if ( isArray ) {
|
383 |
+
for ( ; i < length; i++ ) {
|
384 |
+
value = callback.call( obj[ i ], i, obj[ i ] );
|
385 |
+
|
386 |
+
if ( value === false ) {
|
387 |
break;
|
388 |
}
|
389 |
}
|
390 |
} else {
|
391 |
+
for ( i in obj ) {
|
392 |
+
value = callback.call( obj[ i ], i, obj[ i ] );
|
393 |
+
|
394 |
+
if ( value === false ) {
|
395 |
break;
|
396 |
}
|
397 |
}
|
401 |
return obj;
|
402 |
},
|
403 |
|
404 |
+
// Support: Android<4.1, IE<9
|
405 |
+
trim: function( text ) {
|
406 |
+
return text == null ?
|
407 |
+
"" :
|
408 |
+
( text + "" ).replace( rtrim, "" );
|
409 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
410 |
|
411 |
// results is for internal usage only
|
412 |
makeArray: function( arr, results ) {
|
413 |
+
var ret = results || [];
|
|
|
414 |
|
415 |
if ( arr != null ) {
|
416 |
+
if ( isArraylike( Object(arr) ) ) {
|
417 |
+
jQuery.merge( ret,
|
418 |
+
typeof arr === "string" ?
|
419 |
+
[ arr ] : arr
|
420 |
+
);
|
|
|
421 |
} else {
|
422 |
+
push.call( ret, arr );
|
423 |
}
|
424 |
}
|
425 |
|
430 |
var len;
|
431 |
|
432 |
if ( arr ) {
|
433 |
+
if ( indexOf ) {
|
434 |
+
return indexOf.call( arr, elem, i );
|
435 |
}
|
436 |
|
437 |
len = arr.length;
|
449 |
},
|
450 |
|
451 |
merge: function( first, second ) {
|
452 |
+
var len = +second.length,
|
453 |
+
j = 0,
|
454 |
+
i = first.length;
|
455 |
|
456 |
+
while ( j < len ) {
|
457 |
+
first[ i++ ] = second[ j++ ];
|
458 |
+
}
|
|
|
459 |
|
460 |
+
// Support: IE<9
|
461 |
+
// Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists)
|
462 |
+
if ( len !== len ) {
|
463 |
while ( second[j] !== undefined ) {
|
464 |
first[ i++ ] = second[ j++ ];
|
465 |
}
|
470 |
return first;
|
471 |
},
|
472 |
|
473 |
+
grep: function( elems, callback, invert ) {
|
474 |
+
var callbackInverse,
|
475 |
+
matches = [],
|
476 |
i = 0,
|
477 |
+
length = elems.length,
|
478 |
+
callbackExpect = !invert;
|
479 |
|
480 |
// Go through the array, only saving the items
|
481 |
// that pass the validator function
|
482 |
for ( ; i < length; i++ ) {
|
483 |
+
callbackInverse = !callback( elems[ i ], i );
|
484 |
+
if ( callbackInverse !== callbackExpect ) {
|
485 |
+
matches.push( elems[ i ] );
|
486 |
}
|
487 |
}
|
488 |
|
489 |
+
return matches;
|
490 |
},
|
491 |
|
492 |
// arg is for internal usage only
|
493 |
map: function( elems, callback, arg ) {
|
494 |
+
var value,
|
|
|
495 |
i = 0,
|
496 |
length = elems.length,
|
497 |
+
isArray = isArraylike( elems ),
|
498 |
+
ret = [];
|
499 |
|
500 |
+
// Go through the array, translating each of the items to their new values
|
501 |
if ( isArray ) {
|
502 |
for ( ; i < length; i++ ) {
|
503 |
value = callback( elems[ i ], i, arg );
|
504 |
|
505 |
if ( value != null ) {
|
506 |
+
ret.push( value );
|
507 |
}
|
508 |
}
|
509 |
|
510 |
// Go through every key on the object,
|
511 |
} else {
|
512 |
+
for ( i in elems ) {
|
513 |
+
value = callback( elems[ i ], i, arg );
|
514 |
|
515 |
if ( value != null ) {
|
516 |
+
ret.push( value );
|
517 |
}
|
518 |
}
|
519 |
}
|
520 |
|
521 |
// Flatten any nested arrays
|
522 |
+
return concat.apply( [], ret );
|
523 |
},
|
524 |
|
525 |
// A global GUID counter for objects
|
528 |
// Bind a function to a context, optionally partially applying any
|
529 |
// arguments.
|
530 |
proxy: function( fn, context ) {
|
531 |
+
var args, proxy, tmp;
|
532 |
|
533 |
if ( typeof context === "string" ) {
|
534 |
tmp = fn[ context ];
|
543 |
}
|
544 |
|
545 |
// Simulated bind
|
546 |
+
args = slice.call( arguments, 2 );
|
547 |
proxy = function() {
|
548 |
+
return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
|
549 |
};
|
550 |
|
551 |
// Set the guid of unique handler to the same of original handler, so it can be removed
|
554 |
return proxy;
|
555 |
},
|
556 |
|
557 |
+
now: function() {
|
558 |
+
return +( new Date() );
|
559 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
560 |
|
561 |
+
// jQuery.support is not used in Core but other projects attach their
|
562 |
+
// properties to it so it needs to exist.
|
563 |
+
support: support
|
564 |
+
});
|
|
|
|
|
565 |
|
566 |
+
// Populate the class2type map
|
567 |
+
jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
|
568 |
+
class2type[ "[object " + name + "]" ] = name.toLowerCase();
|
569 |
+
});
|
570 |
+
|
571 |
+
function isArraylike( obj ) {
|
572 |
+
var length = obj.length,
|
573 |
+
type = jQuery.type( obj );
|
574 |
+
|
575 |
+
if ( type === "function" || jQuery.isWindow( obj ) ) {
|
576 |
+
return false;
|
577 |
+
}
|
578 |
+
|
579 |
+
if ( obj.nodeType === 1 && length ) {
|
580 |
+
return true;
|
581 |
+
}
|
582 |
+
|
583 |
+
return type === "array" || length === 0 ||
|
584 |
+
typeof length === "number" && length > 0 && ( length - 1 ) in obj;
|
585 |
+
}
|
586 |
+
var Sizzle =
|
587 |
+
/*!
|
588 |
+
* Sizzle CSS Selector Engine v2.2.0-pre
|
589 |
+
* http://sizzlejs.com/
|
590 |
+
*
|
591 |
+
* Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors
|
592 |
+
* Released under the MIT license
|
593 |
+
* http://jquery.org/license
|
594 |
+
*
|
595 |
+
* Date: 2014-12-16
|
596 |
+
*/
|
597 |
+
(function( window ) {
|
598 |
+
|
599 |
+
var i,
|
600 |
+
support,
|
601 |
+
Expr,
|
602 |
+
getText,
|
603 |
+
isXML,
|
604 |
+
tokenize,
|
605 |
+
compile,
|
606 |
+
select,
|
607 |
+
outermostContext,
|
608 |
+
sortInput,
|
609 |
+
hasDuplicate,
|
610 |
+
|
611 |
+
// Local document vars
|
612 |
+
setDocument,
|
613 |
+
document,
|
614 |
+
docElem,
|
615 |
+
documentIsHTML,
|
616 |
+
rbuggyQSA,
|
617 |
+
rbuggyMatches,
|
618 |
+
matches,
|
619 |
+
contains,
|
620 |
|
621 |
+
// Instance-specific data
|
622 |
+
expando = "sizzle" + 1 * new Date(),
|
623 |
+
preferredDoc = window.document,
|
624 |
+
dirruns = 0,
|
625 |
+
done = 0,
|
626 |
+
classCache = createCache(),
|
627 |
+
tokenCache = createCache(),
|
628 |
+
compilerCache = createCache(),
|
629 |
+
sortOrder = function( a, b ) {
|
630 |
+
if ( a === b ) {
|
631 |
+
hasDuplicate = true;
|
632 |
}
|
633 |
+
return 0;
|
634 |
+
},
|
635 |
|
636 |
+
// General-purpose constants
|
637 |
+
MAX_NEGATIVE = 1 << 31,
|
638 |
|
639 |
+
// Instance methods
|
640 |
+
hasOwn = ({}).hasOwnProperty,
|
641 |
+
arr = [],
|
642 |
+
pop = arr.pop,
|
643 |
+
push_native = arr.push,
|
644 |
+
push = arr.push,
|
645 |
+
slice = arr.slice,
|
646 |
+
// Use a stripped-down indexOf as it's faster than native
|
647 |
+
// http://jsperf.com/thor-indexof-vs-for/5
|
648 |
+
indexOf = function( list, elem ) {
|
649 |
+
var i = 0,
|
650 |
+
len = list.length;
|
651 |
+
for ( ; i < len; i++ ) {
|
652 |
+
if ( list[i] === elem ) {
|
653 |
+
return i;
|
654 |
+
}
|
655 |
+
}
|
656 |
+
return -1;
|
657 |
},
|
658 |
|
659 |
+
booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
|
|
|
|
|
|
|
660 |
|
661 |
+
// Regular expressions
|
|
|
662 |
|
663 |
+
// Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
|
664 |
+
whitespace = "[\\x20\\t\\r\\n\\f]",
|
665 |
+
// http://www.w3.org/TR/css3-syntax/#characters
|
666 |
+
characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
|
667 |
|
668 |
+
// Loosely modeled on CSS identifier characters
|
669 |
+
// An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
|
670 |
+
// Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
|
671 |
+
identifier = characterEncoding.replace( "w", "w#" ),
|
|
|
|
|
672 |
|
673 |
+
// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
|
674 |
+
attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace +
|
675 |
+
// Operator (capture 2)
|
676 |
+
"*([*^$|!~]?=)" + whitespace +
|
677 |
+
// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
|
678 |
+
"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
|
679 |
+
"*\\]",
|
680 |
+
|
681 |
+
pseudos = ":(" + characterEncoding + ")(?:\\((" +
|
682 |
+
// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
|
683 |
+
// 1. quoted (capture 3; capture 4 or capture 5)
|
684 |
+
"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
|
685 |
+
// 2. simple (capture 6)
|
686 |
+
"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
|
687 |
+
// 3. anything else (capture 2)
|
688 |
+
".*" +
|
689 |
+
")\\)|)",
|
690 |
|
691 |
+
// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
|
692 |
+
rwhitespace = new RegExp( whitespace + "+", "g" ),
|
693 |
+
rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
|
694 |
|
695 |
+
rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
|
696 |
+
rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
|
|
|
|
|
697 |
|
698 |
+
rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
|
|
|
699 |
|
700 |
+
rpseudo = new RegExp( pseudos ),
|
701 |
+
ridentifier = new RegExp( "^" + identifier + "$" ),
|
|
|
702 |
|
703 |
+
matchExpr = {
|
704 |
+
"ID": new RegExp( "^#(" + characterEncoding + ")" ),
|
705 |
+
"CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
|
706 |
+
"TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
|
707 |
+
"ATTR": new RegExp( "^" + attributes ),
|
708 |
+
"PSEUDO": new RegExp( "^" + pseudos ),
|
709 |
+
"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
|
710 |
+
"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
|
711 |
+
"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
|
712 |
+
"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
|
713 |
+
// For use in libraries implementing .is()
|
714 |
+
// We use this for POS matching in `select`
|
715 |
+
"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
|
716 |
+
whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
|
717 |
+
},
|
718 |
|
719 |
+
rinputs = /^(?:input|select|textarea|button)$/i,
|
720 |
+
rheader = /^h\d$/i,
|
|
|
721 |
|
722 |
+
rnative = /^[^{]+\{\s*\[native \w/,
|
|
|
|
|
|
|
|
|
|
|
|
|
723 |
|
724 |
+
// Easily-parseable/retrievable ID or TAG or CLASS selectors
|
725 |
+
rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
|
726 |
+
|
727 |
+
rsibling = /[+~]/,
|
728 |
+
rescape = /'|\\/g,
|
729 |
+
|
730 |
+
// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
|
731 |
+
runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
|
732 |
+
funescape = function( _, escaped, escapedWhitespace ) {
|
733 |
+
var high = "0x" + escaped - 0x10000;
|
734 |
+
// NaN means non-codepoint
|
735 |
+
// Support: Firefox<24
|
736 |
+
// Workaround erroneous numeric interpretation of +"0x"
|
737 |
+
return high !== high || escapedWhitespace ?
|
738 |
+
escaped :
|
739 |
+
high < 0 ?
|
740 |
+
// BMP codepoint
|
741 |
+
String.fromCharCode( high + 0x10000 ) :
|
742 |
+
// Supplemental Plane codepoint (surrogate pair)
|
743 |
+
String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
|
744 |
+
},
|
745 |
+
|
746 |
+
// Used for iframes
|
747 |
+
// See setDocument()
|
748 |
+
// Removing the function wrapper causes a "Permission Denied"
|
749 |
+
// error in IE
|
750 |
+
unloadHandler = function() {
|
751 |
+
setDocument();
|
752 |
+
};
|
753 |
+
|
754 |
+
// Optimize for push.apply( _, NodeList )
|
755 |
+
try {
|
756 |
+
push.apply(
|
757 |
+
(arr = slice.call( preferredDoc.childNodes )),
|
758 |
+
preferredDoc.childNodes
|
759 |
+
);
|
760 |
+
// Support: Android<4.0
|
761 |
+
// Detect silently failing push.apply
|
762 |
+
arr[ preferredDoc.childNodes.length ].nodeType;
|
763 |
+
} catch ( e ) {
|
764 |
+
push = { apply: arr.length ?
|
765 |
+
|
766 |
+
// Leverage slice if possible
|
767 |
+
function( target, els ) {
|
768 |
+
push_native.apply( target, slice.call(els) );
|
769 |
+
} :
|
770 |
+
|
771 |
+
// Support: IE<9
|
772 |
+
// Otherwise append directly
|
773 |
+
function( target, els ) {
|
774 |
+
var j = target.length,
|
775 |
+
i = 0;
|
776 |
+
// Can't trust NodeList.length
|
777 |
+
while ( (target[j++] = els[i++]) ) {}
|
778 |
+
target.length = j - 1;
|
779 |
}
|
780 |
+
};
|
781 |
+
}
|
782 |
+
|
783 |
+
function Sizzle( selector, context, results, seed ) {
|
784 |
+
var match, elem, m, nodeType,
|
785 |
+
// QSA vars
|
786 |
+
i, groups, old, nid, newContext, newSelector;
|
787 |
+
|
788 |
+
if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
|
789 |
+
setDocument( context );
|
790 |
}
|
|
|
|
|
791 |
|
792 |
+
context = context || document;
|
793 |
+
results = results || [];
|
794 |
+
nodeType = context.nodeType;
|
|
|
795 |
|
796 |
+
if ( typeof selector !== "string" || !selector ||
|
797 |
+
nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
|
|
|
|
|
798 |
|
799 |
+
return results;
|
800 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
801 |
|
802 |
+
if ( !seed && documentIsHTML ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
803 |
|
804 |
+
// Try to shortcut find operations when possible (e.g., not under DocumentFragment)
|
805 |
+
if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
|
806 |
+
// Speed-up: Sizzle("#ID")
|
807 |
+
if ( (m = match[1]) ) {
|
808 |
+
if ( nodeType === 9 ) {
|
809 |
+
elem = context.getElementById( m );
|
810 |
+
// Check parentNode to catch when Blackberry 4.6 returns
|
811 |
+
// nodes that are no longer in the document (jQuery #6963)
|
812 |
+
if ( elem && elem.parentNode ) {
|
813 |
+
// Handle the case where IE, Opera, and Webkit return items
|
814 |
+
// by name instead of ID
|
815 |
+
if ( elem.id === m ) {
|
816 |
+
results.push( elem );
|
817 |
+
return results;
|
818 |
+
}
|
819 |
+
} else {
|
820 |
+
return results;
|
821 |
+
}
|
822 |
+
} else {
|
823 |
+
// Context is not a document
|
824 |
+
if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
|
825 |
+
contains( context, elem ) && elem.id === m ) {
|
826 |
+
results.push( elem );
|
827 |
+
return results;
|
828 |
+
}
|
829 |
+
}
|
830 |
|
831 |
+
// Speed-up: Sizzle("TAG")
|
832 |
+
} else if ( match[2] ) {
|
833 |
+
push.apply( results, context.getElementsByTagName( selector ) );
|
834 |
+
return results;
|
835 |
+
|
836 |
+
// Speed-up: Sizzle(".CLASS")
|
837 |
+
} else if ( (m = match[3]) && support.getElementsByClassName ) {
|
838 |
+
push.apply( results, context.getElementsByClassName( m ) );
|
839 |
+
return results;
|
840 |
+
}
|
841 |
+
}
|
842 |
+
|
843 |
+
// QSA path
|
844 |
+
if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
|
845 |
+
nid = old = expando;
|
846 |
+
newContext = context;
|
847 |
+
newSelector = nodeType !== 1 && selector;
|
848 |
+
|
849 |
+
// qSA works strangely on Element-rooted queries
|
850 |
+
// We can work around this by specifying an extra ID on the root
|
851 |
+
// and working up from there (Thanks to Andrew Dupont for the technique)
|
852 |
+
// IE 8 doesn't work on object elements
|
853 |
+
if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
|
854 |
+
groups = tokenize( selector );
|
855 |
+
|
856 |
+
if ( (old = context.getAttribute("id")) ) {
|
857 |
+
nid = old.replace( rescape, "\\$&" );
|
858 |
+
} else {
|
859 |
+
context.setAttribute( "id", nid );
|
860 |
+
}
|
861 |
+
nid = "[id='" + nid + "'] ";
|
862 |
+
|
863 |
+
i = groups.length;
|
864 |
+
while ( i-- ) {
|
865 |
+
groups[i] = nid + toSelector( groups[i] );
|
866 |
}
|
867 |
+
newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context;
|
868 |
+
newSelector = groups.join(",");
|
869 |
}
|
870 |
+
|
871 |
+
if ( newSelector ) {
|
872 |
+
try {
|
873 |
+
push.apply( results,
|
874 |
+
newContext.querySelectorAll( newSelector )
|
875 |
+
);
|
876 |
+
return results;
|
877 |
+
} catch(qsaError) {
|
878 |
+
} finally {
|
879 |
+
if ( !old ) {
|
880 |
+
context.removeAttribute("id");
|
881 |
}
|
|
|
|
|
|
|
|
|
882 |
}
|
883 |
}
|
884 |
+
}
|
885 |
+
}
|
886 |
+
|
887 |
+
// All others
|
888 |
+
return select( selector.replace( rtrim, "$1" ), context, results, seed );
|
889 |
+
}
|
890 |
+
|
891 |
+
/**
|
892 |
+
* Create key-value caches of limited size
|
893 |
+
* @returns {Function(string, Object)} Returns the Object data after storing it on itself with
|
894 |
+
* property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
|
895 |
+
* deleting the oldest entry
|
896 |
+
*/
|
897 |
+
function createCache() {
|
898 |
+
var keys = [];
|
899 |
+
|
900 |
+
function cache( key, value ) {
|
901 |
+
// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
|
902 |
+
if ( keys.push( key + " " ) > Expr.cacheLength ) {
|
903 |
+
// Only keep the most recent entries
|
904 |
+
delete cache[ keys.shift() ];
|
905 |
+
}
|
906 |
+
return (cache[ key + " " ] = value);
|
907 |
+
}
|
908 |
+
return cache;
|
909 |
+
}
|
910 |
+
|
911 |
+
/**
|
912 |
+
* Mark a function for special use by Sizzle
|
913 |
+
* @param {Function} fn The function to mark
|
914 |
+
*/
|
915 |
+
function markFunction( fn ) {
|
916 |
+
fn[ expando ] = true;
|
917 |
+
return fn;
|
918 |
+
}
|
919 |
+
|
920 |
+
/**
|
921 |
+
* Support testing using an element
|
922 |
+
* @param {Function} fn Passed the created div and expects a boolean result
|
923 |
+
*/
|
924 |
+
function assert( fn ) {
|
925 |
+
var div = document.createElement("div");
|
926 |
+
|
927 |
+
try {
|
928 |
+
return !!fn( div );
|
929 |
+
} catch (e) {
|
930 |
+
return false;
|
931 |
+
} finally {
|
932 |
+
// Remove from its parent by default
|
933 |
+
if ( div.parentNode ) {
|
934 |
+
div.parentNode.removeChild( div );
|
935 |
+
}
|
936 |
+
// release memory in IE
|
937 |
+
div = null;
|
938 |
+
}
|
939 |
+
}
|
940 |
+
|
941 |
+
/**
|
942 |
+
* Adds the same handler for all of the specified attrs
|
943 |
+
* @param {String} attrs Pipe-separated list of attributes
|
944 |
+
* @param {Function} handler The method that will be applied
|
945 |
+
*/
|
946 |
+
function addHandle( attrs, handler ) {
|
947 |
+
var arr = attrs.split("|"),
|
948 |
+
i = attrs.length;
|
949 |
+
|
950 |
+
while ( i-- ) {
|
951 |
+
Expr.attrHandle[ arr[i] ] = handler;
|
952 |
+
}
|
953 |
+
}
|
954 |
+
|
955 |
+
/**
|
956 |
+
* Checks document order of two siblings
|
957 |
+
* @param {Element} a
|
958 |
+
* @param {Element} b
|
959 |
+
* @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
|
960 |
+
*/
|
961 |
+
function siblingCheck( a, b ) {
|
962 |
+
var cur = b && a,
|
963 |
+
diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
|
964 |
+
( ~b.sourceIndex || MAX_NEGATIVE ) -
|
965 |
+
( ~a.sourceIndex || MAX_NEGATIVE );
|
966 |
+
|
967 |
+
// Use IE sourceIndex if available on both nodes
|
968 |
+
if ( diff ) {
|
969 |
+
return diff;
|
970 |
+
}
|
971 |
+
|
972 |
+
// Check if b follows a
|
973 |
+
if ( cur ) {
|
974 |
+
while ( (cur = cur.nextSibling) ) {
|
975 |
+
if ( cur === b ) {
|
976 |
+
return -1;
|
977 |
+
}
|
978 |
+
}
|
979 |
+
}
|
980 |
+
|
981 |
+
return a ? 1 : -1;
|
982 |
+
}
|
983 |
+
|
984 |
+
/**
|
985 |
+
* Returns a function to use in pseudos for input types
|
986 |
+
* @param {String} type
|
987 |
+
*/
|
988 |
+
function createInputPseudo( type ) {
|
989 |
+
return function( elem ) {
|
990 |
+
var name = elem.nodeName.toLowerCase();
|
991 |
+
return name === "input" && elem.type === type;
|
992 |
+
};
|
993 |
+
}
|
994 |
+
|
995 |
+
/**
|
996 |
+
* Returns a function to use in pseudos for buttons
|
997 |
+
* @param {String} type
|
998 |
+
*/
|
999 |
+
function createButtonPseudo( type ) {
|
1000 |
+
return function( elem ) {
|
1001 |
+
var name = elem.nodeName.toLowerCase();
|
1002 |
+
return (name === "input" || name === "button") && elem.type === type;
|
1003 |
+
};
|
1004 |
+
}
|
1005 |
+
|
1006 |
+
/**
|
1007 |
+
* Returns a function to use in pseudos for positionals
|
1008 |
+
* @param {Function} fn
|
1009 |
+
*/
|
1010 |
+
function createPositionalPseudo( fn ) {
|
1011 |
+
return markFunction(function( argument ) {
|
1012 |
+
argument = +argument;
|
1013 |
+
return markFunction(function( seed, matches ) {
|
1014 |
+
var j,
|
1015 |
+
matchIndexes = fn( [], seed.length, argument ),
|
1016 |
+
i = matchIndexes.length;
|
1017 |
+
|
1018 |
+
// Match elements found at the specified indexes
|
1019 |
+
while ( i-- ) {
|
1020 |
+
if ( seed[ (j = matchIndexes[i]) ] ) {
|
1021 |
+
seed[j] = !(matches[j] = seed[j]);
|
1022 |
+
}
|
1023 |
+
}
|
1024 |
+
});
|
1025 |
+
});
|
1026 |
+
}
|
1027 |
+
|
1028 |
+
/**
|
1029 |
+
* Checks a node for validity as a Sizzle context
|
1030 |
+
* @param {Element|Object=} context
|
1031 |
+
* @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
|
1032 |
+
*/
|
1033 |
+
function testContext( context ) {
|
1034 |
+
return context && typeof context.getElementsByTagName !== "undefined" && context;
|
1035 |
+
}
|
1036 |
+
|
1037 |
+
// Expose support vars for convenience
|
1038 |
+
support = Sizzle.support = {};
|
1039 |
+
|
1040 |
+
/**
|
1041 |
+
* Detects XML nodes
|
1042 |
+
* @param {Element|Object} elem An element or a document
|
1043 |
+
* @returns {Boolean} True iff elem is a non-HTML XML node
|
1044 |
+
*/
|
1045 |
+
isXML = Sizzle.isXML = function( elem ) {
|
1046 |
+
// documentElement is verified for cases where it doesn't yet exist
|
1047 |
+
// (such as loading iframes in IE - #4833)
|
1048 |
+
var documentElement = elem && (elem.ownerDocument || elem).documentElement;
|
1049 |
+
return documentElement ? documentElement.nodeName !== "HTML" : false;
|
1050 |
+
};
|
1051 |
+
|
1052 |
+
/**
|
1053 |
+
* Sets document-related variables once based on the current document
|
1054 |
+
* @param {Element|Object} [doc] An element or document object to use to set the document
|
1055 |
+
* @returns {Object} Returns the current document
|
1056 |
+
*/
|
1057 |
+
setDocument = Sizzle.setDocument = function( node ) {
|
1058 |
+
var hasCompare, parent,
|
1059 |
+
doc = node ? node.ownerDocument || node : preferredDoc;
|
1060 |
+
|
1061 |
+
// If no document and documentElement is available, return
|
1062 |
+
if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
|
1063 |
+
return document;
|
1064 |
+
}
|
1065 |
+
|
1066 |
+
// Set our document
|
1067 |
+
document = doc;
|
1068 |
+
docElem = doc.documentElement;
|
1069 |
+
parent = doc.defaultView;
|
1070 |
+
|
1071 |
+
// Support: IE>8
|
1072 |
+
// If iframe document is assigned to "document" variable and if iframe has been reloaded,
|
1073 |
+
// IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
|
1074 |
+
// IE6-8 do not support the defaultView property so parent will be undefined
|
1075 |
+
if ( parent && parent !== parent.top ) {
|
1076 |
+
// IE11 does not have attachEvent, so all must suffer
|
1077 |
+
if ( parent.addEventListener ) {
|
1078 |
+
parent.addEventListener( "unload", unloadHandler, false );
|
1079 |
+
} else if ( parent.attachEvent ) {
|
1080 |
+
parent.attachEvent( "onunload", unloadHandler );
|
1081 |
+
}
|
1082 |
+
}
|
1083 |
+
|
1084 |
+
/* Support tests
|
1085 |
+
---------------------------------------------------------------------- */
|
1086 |
+
documentIsHTML = !isXML( doc );
|
1087 |
+
|
1088 |
+
/* Attributes
|
1089 |
+
---------------------------------------------------------------------- */
|
1090 |
+
|
1091 |
+
// Support: IE<8
|
1092 |
+
// Verify that getAttribute really returns attributes and not properties
|
1093 |
+
// (excepting IE8 booleans)
|
1094 |
+
support.attributes = assert(function( div ) {
|
1095 |
+
div.className = "i";
|
1096 |
+
return !div.getAttribute("className");
|
1097 |
+
});
|
1098 |
+
|
1099 |
+
/* getElement(s)By*
|
1100 |
+
---------------------------------------------------------------------- */
|
1101 |
+
|
1102 |
+
// Check if getElementsByTagName("*") returns only elements
|
1103 |
+
support.getElementsByTagName = assert(function( div ) {
|
1104 |
+
div.appendChild( doc.createComment("") );
|
1105 |
+
return !div.getElementsByTagName("*").length;
|
1106 |
+
});
|
1107 |
+
|
1108 |
+
// Support: IE<9
|
1109 |
+
support.getElementsByClassName = rnative.test( doc.getElementsByClassName );
|
1110 |
+
|
1111 |
+
// Support: IE<10
|
1112 |
+
// Check if getElementById returns elements by name
|
1113 |
+
// The broken getElementById methods don't pick up programatically-set names,
|
1114 |
+
// so use a roundabout getElementsByName test
|
1115 |
+
support.getById = assert(function( div ) {
|
1116 |
+
docElem.appendChild( div ).id = expando;
|
1117 |
+
return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
|
1118 |
+
});
|
1119 |
+
|
1120 |
+
// ID find and filter
|
1121 |
+
if ( support.getById ) {
|
1122 |
+
Expr.find["ID"] = function( id, context ) {
|
1123 |
+
if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
|
1124 |
+
var m = context.getElementById( id );
|
1125 |
+
// Check parentNode to catch when Blackberry 4.6 returns
|
1126 |
+
// nodes that are no longer in the document #6963
|
1127 |
+
return m && m.parentNode ? [ m ] : [];
|
1128 |
+
}
|
1129 |
+
};
|
1130 |
+
Expr.filter["ID"] = function( id ) {
|
1131 |
+
var attrId = id.replace( runescape, funescape );
|
1132 |
+
return function( elem ) {
|
1133 |
+
return elem.getAttribute("id") === attrId;
|
1134 |
+
};
|
1135 |
+
};
|
1136 |
+
} else {
|
1137 |
+
// Support: IE6/7
|
1138 |
+
// getElementById is not reliable as a find shortcut
|
1139 |
+
delete Expr.find["ID"];
|
1140 |
+
|
1141 |
+
Expr.filter["ID"] = function( id ) {
|
1142 |
+
var attrId = id.replace( runescape, funescape );
|
1143 |
+
return function( elem ) {
|
1144 |
+
var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
|
1145 |
+
return node && node.value === attrId;
|
1146 |
+
};
|
1147 |
+
};
|
1148 |
+
}
|
1149 |
+
|
1150 |
+
// Tag
|
1151 |
+
Expr.find["TAG"] = support.getElementsByTagName ?
|
1152 |
+
function( tag, context ) {
|
1153 |
+
if ( typeof context.getElementsByTagName !== "undefined" ) {
|
1154 |
+
return context.getElementsByTagName( tag );
|
1155 |
+
|
1156 |
+
// DocumentFragment nodes don't have gEBTN
|
1157 |
+
} else if ( support.qsa ) {
|
1158 |
+
return context.querySelectorAll( tag );
|
1159 |
+
}
|
1160 |
+
} :
|
1161 |
+
|
1162 |
+
function( tag, context ) {
|
1163 |
+
var elem,
|
1164 |
+
tmp = [],
|
1165 |
+
i = 0,
|
1166 |
+
// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
|
1167 |
+
results = context.getElementsByTagName( tag );
|
1168 |
+
|
1169 |
+
// Filter out possible comments
|
1170 |
+
if ( tag === "*" ) {
|
1171 |
+
while ( (elem = results[i++]) ) {
|
1172 |
+
if ( elem.nodeType === 1 ) {
|
1173 |
+
tmp.push( elem );
|
1174 |
+
}
|
1175 |
+
}
|
1176 |
+
|
1177 |
+
return tmp;
|
1178 |
+
}
|
1179 |
+
return results;
|
1180 |
+
};
|
1181 |
+
|
1182 |
+
// Class
|
1183 |
+
Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
|
1184 |
+
if ( documentIsHTML ) {
|
1185 |
+
return context.getElementsByClassName( className );
|
1186 |
+
}
|
1187 |
+
};
|
1188 |
+
|
1189 |
+
/* QSA/matchesSelector
|
1190 |
+
---------------------------------------------------------------------- */
|
1191 |
+
|
1192 |
+
// QSA and matchesSelector support
|
1193 |
+
|
1194 |
+
// matchesSelector(:active) reports false when true (IE9/Opera 11.5)
|
1195 |
+
rbuggyMatches = [];
|
1196 |
+
|
1197 |
+
// qSa(:focus) reports false when true (Chrome 21)
|
1198 |
+
// We allow this because of a bug in IE8/9 that throws an error
|
1199 |
+
// whenever `document.activeElement` is accessed on an iframe
|
1200 |
+
// So, we allow :focus to pass through QSA all the time to avoid the IE error
|
1201 |
+
// See http://bugs.jquery.com/ticket/13378
|
1202 |
+
rbuggyQSA = [];
|
1203 |
+
|
1204 |
+
if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
|
1205 |
+
// Build QSA regex
|
1206 |
+
// Regex strategy adopted from Diego Perini
|
1207 |
+
assert(function( div ) {
|
1208 |
+
// Select is set to empty string on purpose
|
1209 |
+
// This is to test IE's treatment of not explicitly
|
1210 |
+
// setting a boolean content attribute,
|
1211 |
+
// since its presence should be enough
|
1212 |
+
// http://bugs.jquery.com/ticket/12359
|
1213 |
+
docElem.appendChild( div ).innerHTML = "<a id='" + expando + "'></a>" +
|
1214 |
+
"<select id='" + expando + "-\f]' msallowcapture=''>" +
|
1215 |
+
"<option selected=''></option></select>";
|
1216 |
+
|
1217 |
+
// Support: IE8, Opera 11-12.16
|
1218 |
+
// Nothing should be selected when empty strings follow ^= or $= or *=
|
1219 |
+
// The test attribute must be unknown in Opera but "safe" for WinRT
|
1220 |
+
// http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
|
1221 |
+
if ( div.querySelectorAll("[msallowcapture^='']").length ) {
|
1222 |
+
rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
|
1223 |
+
}
|
1224 |
+
|
1225 |
+
// Support: IE8
|
1226 |
+
// Boolean attributes and "value" are not treated correctly
|
1227 |
+
if ( !div.querySelectorAll("[selected]").length ) {
|
1228 |
+
rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
|
1229 |
+
}
|
1230 |
+
|
1231 |
+
// Support: Chrome<29, Android<4.2+, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.7+
|
1232 |
+
if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
|
1233 |
+
rbuggyQSA.push("~=");
|
1234 |
+
}
|
1235 |
+
|
1236 |
+
// Webkit/Opera - :checked should return selected option elements
|
1237 |
+
// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
|
1238 |
+
// IE8 throws error here and will not see later tests
|
1239 |
+
if ( !div.querySelectorAll(":checked").length ) {
|
1240 |
+
rbuggyQSA.push(":checked");
|
1241 |
+
}
|
1242 |
+
|
1243 |
+
// Support: Safari 8+, iOS 8+
|
1244 |
+
// https://bugs.webkit.org/show_bug.cgi?id=136851
|
1245 |
+
// In-page `selector#id sibing-combinator selector` fails
|
1246 |
+
if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) {
|
1247 |
+
rbuggyQSA.push(".#.+[+~]");
|
1248 |
+
}
|
1249 |
+
});
|
1250 |
+
|
1251 |
+
assert(function( div ) {
|
1252 |
+
// Support: Windows 8 Native Apps
|
1253 |
+
// The type and name attributes are restricted during .innerHTML assignment
|
1254 |
+
var input = doc.createElement("input");
|
1255 |
+
input.setAttribute( "type", "hidden" );
|
1256 |
+
div.appendChild( input ).setAttribute( "name", "D" );
|
1257 |
+
|
1258 |
+
// Support: IE8
|
1259 |
+
// Enforce case-sensitivity of name attribute
|
1260 |
+
if ( div.querySelectorAll("[name=d]").length ) {
|
1261 |
+
rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
|
1262 |
+
}
|
1263 |
+
|
1264 |
+
// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
|
1265 |
+
// IE8 throws error here and will not see later tests
|
1266 |
+
if ( !div.querySelectorAll(":enabled").length ) {
|
1267 |
+
rbuggyQSA.push( ":enabled", ":disabled" );
|
1268 |
+
}
|
1269 |
+
|
1270 |
+
// Opera 10-11 does not throw on post-comma invalid pseudos
|
1271 |
+
div.querySelectorAll("*,:x");
|
1272 |
+
rbuggyQSA.push(",.*:");
|
1273 |
+
});
|
1274 |
+
}
|
1275 |
+
|
1276 |
+
if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
|
1277 |
+
docElem.webkitMatchesSelector ||
|
1278 |
+
docElem.mozMatchesSelector ||
|
1279 |
+
docElem.oMatchesSelector ||
|
1280 |
+
docElem.msMatchesSelector) )) ) {
|
1281 |
+
|
1282 |
+
assert(function( div ) {
|
1283 |
+
// Check to see if it's possible to do matchesSelector
|
1284 |
+
// on a disconnected node (IE 9)
|
1285 |
+
support.disconnectedMatch = matches.call( div, "div" );
|
1286 |
+
|
1287 |
+
// This should fail with an exception
|
1288 |
+
// Gecko does not error, returns false instead
|
1289 |
+
matches.call( div, "[s!='']:x" );
|
1290 |
+
rbuggyMatches.push( "!=", pseudos );
|
1291 |
+
});
|
1292 |
+
}
|
1293 |
+
|
1294 |
+
rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
|
1295 |
+
rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
|
1296 |
+
|
1297 |
+
/* Contains
|
1298 |
+
---------------------------------------------------------------------- */
|
1299 |
+
hasCompare = rnative.test( docElem.compareDocumentPosition );
|
1300 |
+
|
1301 |
+
// Element contains another
|
1302 |
+
// Purposefully does not implement inclusive descendent
|
1303 |
+
// As in, an element does not contain itself
|
1304 |
+
contains = hasCompare || rnative.test( docElem.contains ) ?
|
1305 |
+
function( a, b ) {
|
1306 |
+
var adown = a.nodeType === 9 ? a.documentElement : a,
|
1307 |
+
bup = b && b.parentNode;
|
1308 |
+
return a === bup || !!( bup && bup.nodeType === 1 && (
|
1309 |
+
adown.contains ?
|
1310 |
+
adown.contains( bup ) :
|
1311 |
+
a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
|
1312 |
+
));
|
1313 |
+
} :
|
1314 |
+
function( a, b ) {
|
1315 |
+
if ( b ) {
|
1316 |
+
while ( (b = b.parentNode) ) {
|
1317 |
+
if ( b === a ) {
|
1318 |
+
return true;
|
1319 |
+
}
|
1320 |
+
}
|
1321 |
+
}
|
1322 |
+
return false;
|
1323 |
+
};
|
1324 |
+
|
1325 |
+
/* Sorting
|
1326 |
+
---------------------------------------------------------------------- */
|
1327 |
+
|
1328 |
+
// Document order sorting
|
1329 |
+
sortOrder = hasCompare ?
|
1330 |
+
function( a, b ) {
|
1331 |
+
|
1332 |
+
// Flag for duplicate removal
|
1333 |
+
if ( a === b ) {
|
1334 |
+
hasDuplicate = true;
|
1335 |
+
return 0;
|
1336 |
+
}
|
1337 |
+
|
1338 |
+
// Sort on method existence if only one input has compareDocumentPosition
|
1339 |
+
var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
|
1340 |
+
if ( compare ) {
|
1341 |
+
return compare;
|
1342 |
+
}
|
1343 |
+
|
1344 |
+
// Calculate position if both inputs belong to the same document
|
1345 |
+
compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
|
1346 |
+
a.compareDocumentPosition( b ) :
|
1347 |
+
|
1348 |
+
// Otherwise we know they are disconnected
|
1349 |
+
1;
|
1350 |
+
|
1351 |
+
// Disconnected nodes
|
1352 |
+
if ( compare & 1 ||
|
1353 |
+
(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
|
1354 |
+
|
1355 |
+
// Choose the first element that is related to our preferred document
|
1356 |
+
if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
|
1357 |
+
return -1;
|
1358 |
+
}
|
1359 |
+
if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
|
1360 |
+
return 1;
|
1361 |
+
}
|
1362 |
+
|
1363 |
+
// Maintain original order
|
1364 |
+
return sortInput ?
|
1365 |
+
( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
|
1366 |
+
0;
|
1367 |
+
}
|
1368 |
+
|
1369 |
+
return compare & 4 ? -1 : 1;
|
1370 |
+
} :
|
1371 |
+
function( a, b ) {
|
1372 |
+
// Exit early if the nodes are identical
|
1373 |
+
if ( a === b ) {
|
1374 |
+
hasDuplicate = true;
|
1375 |
+
return 0;
|
1376 |
+
}
|
1377 |
+
|
1378 |
+
var cur,
|
1379 |
+
i = 0,
|
1380 |
+
aup = a.parentNode,
|
1381 |
+
bup = b.parentNode,
|
1382 |
+
ap = [ a ],
|
1383 |
+
bp = [ b ];
|
1384 |
+
|
1385 |
+
// Parentless nodes are either documents or disconnected
|
1386 |
+
if ( !aup || !bup ) {
|
1387 |
+
return a === doc ? -1 :
|
1388 |
+
b === doc ? 1 :
|
1389 |
+
aup ? -1 :
|
1390 |
+
bup ? 1 :
|
1391 |
+
sortInput ?
|
1392 |
+
( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
|
1393 |
+
0;
|
1394 |
+
|
1395 |
+
// If the nodes are siblings, we can do a quick check
|
1396 |
+
} else if ( aup === bup ) {
|
1397 |
+
return siblingCheck( a, b );
|
1398 |
+
}
|
1399 |
+
|
1400 |
+
// Otherwise we need full lists of their ancestors for comparison
|
1401 |
+
cur = a;
|
1402 |
+
while ( (cur = cur.parentNode) ) {
|
1403 |
+
ap.unshift( cur );
|
1404 |
+
}
|
1405 |
+
cur = b;
|
1406 |
+
while ( (cur = cur.parentNode) ) {
|
1407 |
+
bp.unshift( cur );
|
1408 |
+
}
|
1409 |
+
|
1410 |
+
// Walk down the tree looking for a discrepancy
|
1411 |
+
while ( ap[i] === bp[i] ) {
|
1412 |
+
i++;
|
1413 |
+
}
|
1414 |
+
|
1415 |
+
return i ?
|
1416 |
+
// Do a sibling check if the nodes have a common ancestor
|
1417 |
+
siblingCheck( ap[i], bp[i] ) :
|
1418 |
+
|
1419 |
+
// Otherwise nodes in our document sort first
|
1420 |
+
ap[i] === preferredDoc ? -1 :
|
1421 |
+
bp[i] === preferredDoc ? 1 :
|
1422 |
+
0;
|
1423 |
+
};
|
1424 |
+
|
1425 |
+
return doc;
|
1426 |
+
};
|
1427 |
+
|
1428 |
+
Sizzle.matches = function( expr, elements ) {
|
1429 |
+
return Sizzle( expr, null, null, elements );
|
1430 |
+
};
|
1431 |
+
|
1432 |
+
Sizzle.matchesSelector = function( elem, expr ) {
|
1433 |
+
// Set document vars if needed
|
1434 |
+
if ( ( elem.ownerDocument || elem ) !== document ) {
|
1435 |
+
setDocument( elem );
|
1436 |
+
}
|
1437 |
+
|
1438 |
+
// Make sure that attribute selectors are quoted
|
1439 |
+
expr = expr.replace( rattributeQuotes, "='$1']" );
|
1440 |
+
|
1441 |
+
if ( support.matchesSelector && documentIsHTML &&
|
1442 |
+
( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
|
1443 |
+
( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
|
1444 |
+
|
1445 |
+
try {
|
1446 |
+
var ret = matches.call( elem, expr );
|
1447 |
+
|
1448 |
+
// IE 9's matchesSelector returns false on disconnected nodes
|
1449 |
+
if ( ret || support.disconnectedMatch ||
|
1450 |
+
// As well, disconnected nodes are said to be in a document
|
1451 |
+
// fragment in IE 9
|
1452 |
+
elem.document && elem.document.nodeType !== 11 ) {
|
1453 |
+
return ret;
|
1454 |
+
}
|
1455 |
+
} catch (e) {}
|
1456 |
+
}
|
1457 |
+
|
1458 |
+
return Sizzle( expr, document, null, [ elem ] ).length > 0;
|
1459 |
+
};
|
1460 |
+
|
1461 |
+
Sizzle.contains = function( context, elem ) {
|
1462 |
+
// Set document vars if needed
|
1463 |
+
if ( ( context.ownerDocument || context ) !== document ) {
|
1464 |
+
setDocument( context );
|
1465 |
+
}
|
1466 |
+
return contains( context, elem );
|
1467 |
+
};
|
1468 |
+
|
1469 |
+
Sizzle.attr = function( elem, name ) {
|
1470 |
+
// Set document vars if needed
|
1471 |
+
if ( ( elem.ownerDocument || elem ) !== document ) {
|
1472 |
+
setDocument( elem );
|
1473 |
+
}
|
1474 |
+
|
1475 |
+
var fn = Expr.attrHandle[ name.toLowerCase() ],
|
1476 |
+
// Don't get fooled by Object.prototype properties (jQuery #13807)
|
1477 |
+
val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
|
1478 |
+
fn( elem, name, !documentIsHTML ) :
|
1479 |
+
undefined;
|
1480 |
+
|
1481 |
+
return val !== undefined ?
|
1482 |
+
val :
|
1483 |
+
support.attributes || !documentIsHTML ?
|
1484 |
+
elem.getAttribute( name ) :
|
1485 |
+
(val = elem.getAttributeNode(name)) && val.specified ?
|
1486 |
+
val.value :
|
1487 |
+
null;
|
1488 |
+
};
|
1489 |
+
|
1490 |
+
Sizzle.error = function( msg ) {
|
1491 |
+
throw new Error( "Syntax error, unrecognized expression: " + msg );
|
1492 |
+
};
|
1493 |
+
|
1494 |
+
/**
|
1495 |
+
* Document sorting and removing duplicates
|
1496 |
+
* @param {ArrayLike} results
|
1497 |
+
*/
|
1498 |
+
Sizzle.uniqueSort = function( results ) {
|
1499 |
+
var elem,
|
1500 |
+
duplicates = [],
|
1501 |
+
j = 0,
|
1502 |
+
i = 0;
|
1503 |
+
|
1504 |
+
// Unless we *know* we can detect duplicates, assume their presence
|
1505 |
+
hasDuplicate = !support.detectDuplicates;
|
1506 |
+
sortInput = !support.sortStable && results.slice( 0 );
|
1507 |
+
results.sort( sortOrder );
|
1508 |
+
|
1509 |
+
if ( hasDuplicate ) {
|
1510 |
+
while ( (elem = results[i++]) ) {
|
1511 |
+
if ( elem === results[ i ] ) {
|
1512 |
+
j = duplicates.push( i );
|
1513 |
+
}
|
1514 |
+
}
|
1515 |
+
while ( j-- ) {
|
1516 |
+
results.splice( duplicates[ j ], 1 );
|
1517 |
+
}
|
1518 |
+
}
|
1519 |
+
|
1520 |
+
// Clear input after sorting to release objects
|
1521 |
+
// See https://github.com/jquery/sizzle/pull/225
|
1522 |
+
sortInput = null;
|
1523 |
+
|
1524 |
+
return results;
|
1525 |
+
};
|
1526 |
+
|
1527 |
+
/**
|
1528 |
+
* Utility function for retrieving the text value of an array of DOM nodes
|
1529 |
+
* @param {Array|Element} elem
|
1530 |
+
*/
|
1531 |
+
getText = Sizzle.getText = function( elem ) {
|
1532 |
+
var node,
|
1533 |
+
ret = "",
|
1534 |
+
i = 0,
|
1535 |
+
nodeType = elem.nodeType;
|
1536 |
+
|
1537 |
+
if ( !nodeType ) {
|
1538 |
+
// If no nodeType, this is expected to be an array
|
1539 |
+
while ( (node = elem[i++]) ) {
|
1540 |
+
// Do not traverse comment nodes
|
1541 |
+
ret += getText( node );
|
1542 |
+
}
|
1543 |
+
} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
|
1544 |
+
// Use textContent for elements
|
1545 |
+
// innerText usage removed for consistency of new lines (jQuery #11153)
|
1546 |
+
if ( typeof elem.textContent === "string" ) {
|
1547 |
+
return elem.textContent;
|
1548 |
+
} else {
|
1549 |
+
// Traverse its children
|
1550 |
+
for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
|
1551 |
+
ret += getText( elem );
|
1552 |
+
}
|
1553 |
+
}
|
1554 |
+
} else if ( nodeType === 3 || nodeType === 4 ) {
|
1555 |
+
return elem.nodeValue;
|
1556 |
+
}
|
1557 |
+
// Do not include comment or processing instruction nodes
|
1558 |
+
|
1559 |
+
return ret;
|
1560 |
+
};
|
1561 |
+
|
1562 |
+
Expr = Sizzle.selectors = {
|
1563 |
+
|
1564 |
+
// Can be adjusted by the user
|
1565 |
+
cacheLength: 50,
|
1566 |
+
|
1567 |
+
createPseudo: markFunction,
|
1568 |
+
|
1569 |
+
match: matchExpr,
|
1570 |
+
|
1571 |
+
attrHandle: {},
|
1572 |
+
|
1573 |
+
find: {},
|
1574 |
+
|
1575 |
+
relative: {
|
1576 |
+
">": { dir: "parentNode", first: true },
|
1577 |
+
" ": { dir: "parentNode" },
|
1578 |
+
"+": { dir: "previousSibling", first: true },
|
1579 |
+
"~": { dir: "previousSibling" }
|
1580 |
+
},
|
1581 |
+
|
1582 |
+
preFilter: {
|
1583 |
+
"ATTR": function( match ) {
|
1584 |
+
match[1] = match[1].replace( runescape, funescape );
|
1585 |
+
|
1586 |
+
// Move the given value to match[3] whether quoted or unquoted
|
1587 |
+
match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
|
1588 |
+
|
1589 |
+
if ( match[2] === "~=" ) {
|
1590 |
+
match[3] = " " + match[3] + " ";
|
1591 |
+
}
|
1592 |
+
|
1593 |
+
return match.slice( 0, 4 );
|
1594 |
+
},
|
1595 |
+
|
1596 |
+
"CHILD": function( match ) {
|
1597 |
+
/* matches from matchExpr["CHILD"]
|
1598 |
+
1 type (only|nth|...)
|
1599 |
+
2 what (child|of-type)
|
1600 |
+
3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
|
1601 |
+
4 xn-component of xn+y argument ([+-]?\d*n|)
|
1602 |
+
5 sign of xn-component
|
1603 |
+
6 x of xn-component
|
1604 |
+
7 sign of y-component
|
1605 |
+
8 y of y-component
|
1606 |
+
*/
|
1607 |
+
match[1] = match[1].toLowerCase();
|
1608 |
+
|
1609 |
+
if ( match[1].slice( 0, 3 ) === "nth" ) {
|
1610 |
+
// nth-* requires argument
|
1611 |
+
if ( !match[3] ) {
|
1612 |
+
Sizzle.error( match[0] );
|
1613 |
+
}
|
1614 |
+
|
1615 |
+
// numeric x and y parameters for Expr.filter.CHILD
|
1616 |
+
// remember that false/true cast respectively to 0/1
|
1617 |
+
match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
|
1618 |
+
match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
|
1619 |
+
|
1620 |
+
// other types prohibit arguments
|
1621 |
+
} else if ( match[3] ) {
|
1622 |
+
Sizzle.error( match[0] );
|
1623 |
+
}
|
1624 |
+
|
1625 |
+
return match;
|
1626 |
+
},
|
1627 |
+
|
1628 |
+
"PSEUDO": function( match ) {
|
1629 |
+
var excess,
|
1630 |
+
unquoted = !match[6] && match[2];
|
1631 |
+
|
1632 |
+
if ( matchExpr["CHILD"].test( match[0] ) ) {
|
1633 |
+
return null;
|
1634 |
+
}
|
1635 |
+
|
1636 |
+
// Accept quoted arguments as-is
|
1637 |
+
if ( match[3] ) {
|
1638 |
+
match[2] = match[4] || match[5] || "";
|
1639 |
+
|
1640 |
+
// Strip excess characters from unquoted arguments
|
1641 |
+
} else if ( unquoted && rpseudo.test( unquoted ) &&
|
1642 |
+
// Get excess from tokenize (recursively)
|
1643 |
+
(excess = tokenize( unquoted, true )) &&
|
1644 |
+
// advance to the next closing parenthesis
|
1645 |
+
(excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
|
1646 |
+
|
1647 |
+
// excess is a negative index
|
1648 |
+
match[0] = match[0].slice( 0, excess );
|
1649 |
+
match[2] = unquoted.slice( 0, excess );
|
1650 |
+
}
|
1651 |
+
|
1652 |
+
// Return only captures needed by the pseudo filter method (type and argument)
|
1653 |
+
return match.slice( 0, 3 );
|
1654 |
+
}
|
1655 |
+
},
|
1656 |
+
|
1657 |
+
filter: {
|
1658 |
+
|
1659 |
+
"TAG": function( nodeNameSelector ) {
|
1660 |
+
var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
|
1661 |
+
return nodeNameSelector === "*" ?
|
1662 |
+
function() { return true; } :
|
1663 |
+
function( elem ) {
|
1664 |
+
return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
|
1665 |
+
};
|
1666 |
+
},
|
1667 |
+
|
1668 |
+
"CLASS": function( className ) {
|
1669 |
+
var pattern = classCache[ className + " " ];
|
1670 |
+
|
1671 |
+
return pattern ||
|
1672 |
+
(pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
|
1673 |
+
classCache( className, function( elem ) {
|
1674 |
+
return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
|
1675 |
+
});
|
1676 |
+
},
|
1677 |
+
|
1678 |
+
"ATTR": function( name, operator, check ) {
|
1679 |
+
return function( elem ) {
|
1680 |
+
var result = Sizzle.attr( elem, name );
|
1681 |
+
|
1682 |
+
if ( result == null ) {
|
1683 |
+
return operator === "!=";
|
1684 |
+
}
|
1685 |
+
if ( !operator ) {
|
1686 |
+
return true;
|
1687 |
+
}
|
1688 |
+
|
1689 |
+
result += "";
|
1690 |
+
|
1691 |
+
return operator === "=" ? result === check :
|
1692 |
+
operator === "!=" ? result !== check :
|
1693 |
+
operator === "^=" ? check && result.indexOf( check ) === 0 :
|
1694 |
+
operator === "*=" ? check && result.indexOf( check ) > -1 :
|
1695 |
+
operator === "$=" ? check && result.slice( -check.length ) === check :
|
1696 |
+
operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
|
1697 |
+
operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
|
1698 |
+
false;
|
1699 |
+
};
|
1700 |
+
},
|
1701 |
+
|
1702 |
+
"CHILD": function( type, what, argument, first, last ) {
|
1703 |
+
var simple = type.slice( 0, 3 ) !== "nth",
|
1704 |
+
forward = type.slice( -4 ) !== "last",
|
1705 |
+
ofType = what === "of-type";
|
1706 |
+
|
1707 |
+
return first === 1 && last === 0 ?
|
1708 |
+
|
1709 |
+
// Shortcut for :nth-*(n)
|
1710 |
+
function( elem ) {
|
1711 |
+
return !!elem.parentNode;
|
1712 |
+
} :
|
1713 |
+
|
1714 |
+
function( elem, context, xml ) {
|
1715 |
+
var cache, outerCache, node, diff, nodeIndex, start,
|
1716 |
+
dir = simple !== forward ? "nextSibling" : "previousSibling",
|
1717 |
+
parent = elem.parentNode,
|
1718 |
+
name = ofType && elem.nodeName.toLowerCase(),
|
1719 |
+
useCache = !xml && !ofType;
|
1720 |
+
|
1721 |
+
if ( parent ) {
|
1722 |
+
|
1723 |
+
// :(first|last|only)-(child|of-type)
|
1724 |
+
if ( simple ) {
|
1725 |
+
while ( dir ) {
|
1726 |
+
node = elem;
|
1727 |
+
while ( (node = node[ dir ]) ) {
|
1728 |
+
if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
|
1729 |
+
return false;
|
1730 |
+
}
|
1731 |
+
}
|
1732 |
+
// Reverse direction for :only-* (if we haven't yet done so)
|
1733 |
+
start = dir = type === "only" && !start && "nextSibling";
|
1734 |
+
}
|
1735 |
+
return true;
|
1736 |
+
}
|
1737 |
+
|
1738 |
+
start = [ forward ? parent.firstChild : parent.lastChild ];
|
1739 |
+
|
1740 |
+
// non-xml :nth-child(...) stores cache data on `parent`
|
1741 |
+
if ( forward && useCache ) {
|
1742 |
+
// Seek `elem` from a previously-cached index
|
1743 |
+
outerCache = parent[ expando ] || (parent[ expando ] = {});
|
1744 |
+
cache = outerCache[ type ] || [];
|
1745 |
+
nodeIndex = cache[0] === dirruns && cache[1];
|
1746 |
+
diff = cache[0] === dirruns && cache[2];
|
1747 |
+
node = nodeIndex && parent.childNodes[ nodeIndex ];
|
1748 |
+
|
1749 |
+
while ( (node = ++nodeIndex && node && node[ dir ] ||
|
1750 |
+
|
1751 |
+
// Fallback to seeking `elem` from the start
|
1752 |
+
(diff = nodeIndex = 0) || start.pop()) ) {
|
1753 |
+
|
1754 |
+
// When found, cache indexes on `parent` and break
|
1755 |
+
if ( node.nodeType === 1 && ++diff && node === elem ) {
|
1756 |
+
outerCache[ type ] = [ dirruns, nodeIndex, diff ];
|
1757 |
+
break;
|
1758 |
+
}
|
1759 |
+
}
|
1760 |
+
|
1761 |
+
// Use previously-cached element index if available
|
1762 |
+
} else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
|
1763 |
+
diff = cache[1];
|
1764 |
+
|
1765 |
+
// xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
|
1766 |
+
} else {
|
1767 |
+
// Use the same loop as above to seek `elem` from the start
|
1768 |
+
while ( (node = ++nodeIndex && node && node[ dir ] ||
|
1769 |
+
(diff = nodeIndex = 0) || start.pop()) ) {
|
1770 |
+
|
1771 |
+
if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
|
1772 |
+
// Cache the index of each encountered element
|
1773 |
+
if ( useCache ) {
|
1774 |
+
(node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
|
1775 |
+
}
|
1776 |
+
|
1777 |
+
if ( node === elem ) {
|
1778 |
+
break;
|
1779 |
+
}
|
1780 |
+
}
|
1781 |
+
}
|
1782 |
+
}
|
1783 |
+
|
1784 |
+
// Incorporate the offset, then check against cycle size
|
1785 |
+
diff -= last;
|
1786 |
+
return diff === first || ( diff % first === 0 && diff / first >= 0 );
|
1787 |
+
}
|
1788 |
+
};
|
1789 |
+
},
|
1790 |
+
|
1791 |
+
"PSEUDO": function( pseudo, argument ) {
|
1792 |
+
// pseudo-class names are case-insensitive
|
1793 |
+
// http://www.w3.org/TR/selectors/#pseudo-classes
|
1794 |
+
// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
|
1795 |
+
// Remember that setFilters inherits from pseudos
|
1796 |
+
var args,
|
1797 |
+
fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
|
1798 |
+
Sizzle.error( "unsupported pseudo: " + pseudo );
|
1799 |
+
|
1800 |
+
// The user may use createPseudo to indicate that
|
1801 |
+
// arguments are needed to create the filter function
|
1802 |
+
// just as Sizzle does
|
1803 |
+
if ( fn[ expando ] ) {
|
1804 |
+
return fn( argument );
|
1805 |
+
}
|
1806 |
+
|
1807 |
+
// But maintain support for old signatures
|
1808 |
+
if ( fn.length > 1 ) {
|
1809 |
+
args = [ pseudo, pseudo, "", argument ];
|
1810 |
+
return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
|
1811 |
+
markFunction(function( seed, matches ) {
|
1812 |
+
var idx,
|
1813 |
+
matched = fn( seed, argument ),
|
1814 |
+
i = matched.length;
|
1815 |
+
while ( i-- ) {
|
1816 |
+
idx = indexOf( seed, matched[i] );
|
1817 |
+
seed[ idx ] = !( matches[ idx ] = matched[i] );
|
1818 |
+
}
|
1819 |
+
}) :
|
1820 |
+
function( elem ) {
|
1821 |
+
return fn( elem, 0, args );
|
1822 |
+
};
|
1823 |
+
}
|
1824 |
+
|
1825 |
+
return fn;
|
1826 |
+
}
|
1827 |
+
},
|
1828 |
+
|
1829 |
+
pseudos: {
|
1830 |
+
// Potentially complex pseudos
|
1831 |
+
"not": markFunction(function( selector ) {
|
1832 |
+
// Trim the selector passed to compile
|
1833 |
+
// to avoid treating leading and trailing
|
1834 |
+
// spaces as combinators
|
1835 |
+
var input = [],
|
1836 |
+
results = [],
|
1837 |
+
matcher = compile( selector.replace( rtrim, "$1" ) );
|
1838 |
+
|
1839 |
+
return matcher[ expando ] ?
|
1840 |
+
markFunction(function( seed, matches, context, xml ) {
|
1841 |
+
var elem,
|
1842 |
+
unmatched = matcher( seed, null, xml, [] ),
|
1843 |
+
i = seed.length;
|
1844 |
+
|
1845 |
+
// Match elements unmatched by `matcher`
|
1846 |
+
while ( i-- ) {
|
1847 |
+
if ( (elem = unmatched[i]) ) {
|
1848 |
+
seed[i] = !(matches[i] = elem);
|
1849 |
+
}
|
1850 |
+
}
|
1851 |
+
}) :
|
1852 |
+
function( elem, context, xml ) {
|
1853 |
+
input[0] = elem;
|
1854 |
+
matcher( input, null, xml, results );
|
1855 |
+
// Don't keep the element (issue #299)
|
1856 |
+
input[0] = null;
|
1857 |
+
return !results.pop();
|
1858 |
+
};
|
1859 |
+
}),
|
1860 |
+
|
1861 |
+
"has": markFunction(function( selector ) {
|
1862 |
+
return function( elem ) {
|
1863 |
+
return Sizzle( selector, elem ).length > 0;
|
1864 |
+
};
|
1865 |
+
}),
|
1866 |
+
|
1867 |
+
"contains": markFunction(function( text ) {
|
1868 |
+
text = text.replace( runescape, funescape );
|
1869 |
+
return function( elem ) {
|
1870 |
+
return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
|
1871 |
+
};
|
1872 |
+
}),
|
1873 |
+
|
1874 |
+
// "Whether an element is represented by a :lang() selector
|
1875 |
+
// is based solely on the element's language value
|
1876 |
+
// being equal to the identifier C,
|
1877 |
+
// or beginning with the identifier C immediately followed by "-".
|
1878 |
+
// The matching of C against the element's language value is performed case-insensitively.
|
1879 |
+
// The identifier C does not have to be a valid language name."
|
1880 |
+
// http://www.w3.org/TR/selectors/#lang-pseudo
|
1881 |
+
"lang": markFunction( function( lang ) {
|
1882 |
+
// lang value must be a valid identifier
|
1883 |
+
if ( !ridentifier.test(lang || "") ) {
|
1884 |
+
Sizzle.error( "unsupported lang: " + lang );
|
1885 |
+
}
|
1886 |
+
lang = lang.replace( runescape, funescape ).toLowerCase();
|
1887 |
+
return function( elem ) {
|
1888 |
+
var elemLang;
|
1889 |
+
do {
|
1890 |
+
if ( (elemLang = documentIsHTML ?
|
1891 |
+
elem.lang :
|
1892 |
+
elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
|
1893 |
+
|
1894 |
+
elemLang = elemLang.toLowerCase();
|
1895 |
+
return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
|
1896 |
+
}
|
1897 |
+
} while ( (elem = elem.parentNode) && elem.nodeType === 1 );
|
1898 |
+
return false;
|
1899 |
+
};
|
1900 |
+
}),
|
1901 |
+
|
1902 |
+
// Miscellaneous
|
1903 |
+
"target": function( elem ) {
|
1904 |
+
var hash = window.location && window.location.hash;
|
1905 |
+
return hash && hash.slice( 1 ) === elem.id;
|
1906 |
+
},
|
1907 |
+
|
1908 |
+
"root": function( elem ) {
|
1909 |
+
return elem === docElem;
|
1910 |
+
},
|
1911 |
+
|
1912 |
+
"focus": function( elem ) {
|
1913 |
+
return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
|
1914 |
+
},
|
1915 |
+
|
1916 |
+
// Boolean properties
|
1917 |
+
"enabled": function( elem ) {
|
1918 |
+
return elem.disabled === false;
|
1919 |
+
},
|
1920 |
+
|
1921 |
+
"disabled": function( elem ) {
|
1922 |
+
return elem.disabled === true;
|
1923 |
+
},
|
1924 |
+
|
1925 |
+
"checked": function( elem ) {
|
1926 |
+
// In CSS3, :checked should return both checked and selected elements
|
1927 |
+
// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
|
1928 |
+
var nodeName = elem.nodeName.toLowerCase();
|
1929 |
+
return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
|
1930 |
+
},
|
1931 |
+
|
1932 |
+
"selected": function( elem ) {
|
1933 |
+
// Accessing this property makes selected-by-default
|
1934 |
+
// options in Safari work properly
|
1935 |
+
if ( elem.parentNode ) {
|
1936 |
+
elem.parentNode.selectedIndex;
|
1937 |
+
}
|
1938 |
+
|
1939 |
+
return elem.selected === true;
|
1940 |
+
},
|
1941 |
+
|
1942 |
+
// Contents
|
1943 |
+
"empty": function( elem ) {
|
1944 |
+
// http://www.w3.org/TR/selectors/#empty-pseudo
|
1945 |
+
// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
|
1946 |
+
// but not by others (comment: 8; processing instruction: 7; etc.)
|
1947 |
+
// nodeType < 6 works because attributes (2) do not appear as children
|
1948 |
+
for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
|
1949 |
+
if ( elem.nodeType < 6 ) {
|
1950 |
+
return false;
|
1951 |
+
}
|
1952 |
+
}
|
1953 |
+
return true;
|
1954 |
+
},
|
1955 |
+
|
1956 |
+
"parent": function( elem ) {
|
1957 |
+
return !Expr.pseudos["empty"]( elem );
|
1958 |
+
},
|
1959 |
+
|
1960 |
+
// Element/input types
|
1961 |
+
"header": function( elem ) {
|
1962 |
+
return rheader.test( elem.nodeName );
|
1963 |
+
},
|
1964 |
+
|
1965 |
+
"input": function( elem ) {
|
1966 |
+
return rinputs.test( elem.nodeName );
|
1967 |
+
},
|
1968 |
+
|
1969 |
+
"button": function( elem ) {
|
1970 |
+
var name = elem.nodeName.toLowerCase();
|
1971 |
+
return name === "input" && elem.type === "button" || name === "button";
|
1972 |
+
},
|
1973 |
+
|
1974 |
+
"text": function( elem ) {
|
1975 |
+
var attr;
|
1976 |
+
return elem.nodeName.toLowerCase() === "input" &&
|
1977 |
+
elem.type === "text" &&
|
1978 |
+
|
1979 |
+
// Support: IE<8
|
1980 |
+
// New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
|
1981 |
+
( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
|
1982 |
+
},
|
1983 |
+
|
1984 |
+
// Position-in-collection
|
1985 |
+
"first": createPositionalPseudo(function() {
|
1986 |
+
return [ 0 ];
|
1987 |
+
}),
|
1988 |
+
|
1989 |
+
"last": createPositionalPseudo(function( matchIndexes, length ) {
|
1990 |
+
return [ length - 1 ];
|
1991 |
+
}),
|
1992 |
+
|
1993 |
+
"eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
|
1994 |
+
return [ argument < 0 ? argument + length : argument ];
|
1995 |
+
}),
|
1996 |
+
|
1997 |
+
"even": createPositionalPseudo(function( matchIndexes, length ) {
|
1998 |
+
var i = 0;
|
1999 |
+
for ( ; i < length; i += 2 ) {
|
2000 |
+
matchIndexes.push( i );
|
2001 |
+
}
|
2002 |
+
return matchIndexes;
|
2003 |
+
}),
|
2004 |
+
|
2005 |
+
"odd": createPositionalPseudo(function( matchIndexes, length ) {
|
2006 |
+
var i = 1;
|
2007 |
+
for ( ; i < length; i += 2 ) {
|
2008 |
+
matchIndexes.push( i );
|
2009 |
+
}
|
2010 |
+
return matchIndexes;
|
2011 |
+
}),
|
2012 |
+
|
2013 |
+
"lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
|
2014 |
+
var i = argument < 0 ? argument + length : argument;
|
2015 |
+
for ( ; --i >= 0; ) {
|
2016 |
+
matchIndexes.push( i );
|
2017 |
+
}
|
2018 |
+
return matchIndexes;
|
2019 |
+
}),
|
2020 |
+
|
2021 |
+
"gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
|
2022 |
+
var i = argument < 0 ? argument + length : argument;
|
2023 |
+
for ( ; ++i < length; ) {
|
2024 |
+
matchIndexes.push( i );
|
2025 |
+
}
|
2026 |
+
return matchIndexes;
|
2027 |
+
})
|
2028 |
+
}
|
2029 |
+
};
|
2030 |
+
|
2031 |
+
Expr.pseudos["nth"] = Expr.pseudos["eq"];
|
2032 |
+
|
2033 |
+
// Add button/input type pseudos
|
2034 |
+
for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
|
2035 |
+
Expr.pseudos[ i ] = createInputPseudo( i );
|
2036 |
+
}
|
2037 |
+
for ( i in { submit: true, reset: true } ) {
|
2038 |
+
Expr.pseudos[ i ] = createButtonPseudo( i );
|
2039 |
+
}
|
2040 |
+
|
2041 |
+
// Easy API for creating new setFilters
|
2042 |
+
function setFilters() {}
|
2043 |
+
setFilters.prototype = Expr.filters = Expr.pseudos;
|
2044 |
+
Expr.setFilters = new setFilters();
|
2045 |
+
|
2046 |
+
tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
|
2047 |
+
var matched, match, tokens, type,
|
2048 |
+
soFar, groups, preFilters,
|
2049 |
+
cached = tokenCache[ selector + " " ];
|
2050 |
+
|
2051 |
+
if ( cached ) {
|
2052 |
+
return parseOnly ? 0 : cached.slice( 0 );
|
2053 |
+
}
|
2054 |
+
|
2055 |
+
soFar = selector;
|
2056 |
+
groups = [];
|
2057 |
+
preFilters = Expr.preFilter;
|
2058 |
+
|
2059 |
+
while ( soFar ) {
|
2060 |
+
|
2061 |
+
// Comma and first run
|
2062 |
+
if ( !matched || (match = rcomma.exec( soFar )) ) {
|
2063 |
+
if ( match ) {
|
2064 |
+
// Don't consume trailing commas as valid
|
2065 |
+
soFar = soFar.slice( match[0].length ) || soFar;
|
2066 |
+
}
|
2067 |
+
groups.push( (tokens = []) );
|
2068 |
+
}
|
2069 |
+
|
2070 |
+
matched = false;
|
2071 |
+
|
2072 |
+
// Combinators
|
2073 |
+
if ( (match = rcombinators.exec( soFar )) ) {
|
2074 |
+
matched = match.shift();
|
2075 |
+
tokens.push({
|
2076 |
+
value: matched,
|
2077 |
+
// Cast descendant combinators to space
|
2078 |
+
type: match[0].replace( rtrim, " " )
|
2079 |
+
});
|
2080 |
+
soFar = soFar.slice( matched.length );
|
2081 |
+
}
|
2082 |
+
|
2083 |
+
// Filters
|
2084 |
+
for ( type in Expr.filter ) {
|
2085 |
+
if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
|
2086 |
+
(match = preFilters[ type ]( match ))) ) {
|
2087 |
+
matched = match.shift();
|
2088 |
+
tokens.push({
|
2089 |
+
value: matched,
|
2090 |
+
type: type,
|
2091 |
+
matches: match
|
2092 |
+
});
|
2093 |
+
soFar = soFar.slice( matched.length );
|
2094 |
+
}
|
2095 |
+
}
|
2096 |
+
|
2097 |
+
if ( !matched ) {
|
2098 |
+
break;
|
2099 |
+
}
|
2100 |
+
}
|
2101 |
+
|
2102 |
+
// Return the length of the invalid excess
|
2103 |
+
// if we're just parsing
|
2104 |
+
// Otherwise, throw an error or return tokens
|
2105 |
+
return parseOnly ?
|
2106 |
+
soFar.length :
|
2107 |
+
soFar ?
|
2108 |
+
Sizzle.error( selector ) :
|
2109 |
+
// Cache the tokens
|
2110 |
+
tokenCache( selector, groups ).slice( 0 );
|
2111 |
+
};
|
2112 |
+
|
2113 |
+
function toSelector( tokens ) {
|
2114 |
+
var i = 0,
|
2115 |
+
len = tokens.length,
|
2116 |
+
selector = "";
|
2117 |
+
for ( ; i < len; i++ ) {
|
2118 |
+
selector += tokens[i].value;
|
2119 |
+
}
|
2120 |
+
return selector;
|
2121 |
+
}
|
2122 |
+
|
2123 |
+
function addCombinator( matcher, combinator, base ) {
|
2124 |
+
var dir = combinator.dir,
|
2125 |
+
checkNonElements = base && dir === "parentNode",
|
2126 |
+
doneName = done++;
|
2127 |
+
|
2128 |
+
return combinator.first ?
|
2129 |
+
// Check against closest ancestor/preceding element
|
2130 |
+
function( elem, context, xml ) {
|
2131 |
+
while ( (elem = elem[ dir ]) ) {
|
2132 |
+
if ( elem.nodeType === 1 || checkNonElements ) {
|
2133 |
+
return matcher( elem, context, xml );
|
2134 |
+
}
|
2135 |
+
}
|
2136 |
+
} :
|
2137 |
+
|
2138 |
+
// Check against all ancestor/preceding elements
|
2139 |
+
function( elem, context, xml ) {
|
2140 |
+
var oldCache, outerCache,
|
2141 |
+
newCache = [ dirruns, doneName ];
|
2142 |
+
|
2143 |
+
// We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
|
2144 |
+
if ( xml ) {
|
2145 |
+
while ( (elem = elem[ dir ]) ) {
|
2146 |
+
if ( elem.nodeType === 1 || checkNonElements ) {
|
2147 |
+
if ( matcher( elem, context, xml ) ) {
|
2148 |
+
return true;
|
2149 |
+
}
|
2150 |
+
}
|
2151 |
+
}
|
2152 |
+
} else {
|
2153 |
+
while ( (elem = elem[ dir ]) ) {
|
2154 |
+
if ( elem.nodeType === 1 || checkNonElements ) {
|
2155 |
+
outerCache = elem[ expando ] || (elem[ expando ] = {});
|
2156 |
+
if ( (oldCache = outerCache[ dir ]) &&
|
2157 |
+
oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
|
2158 |
+
|
2159 |
+
// Assign to newCache so results back-propagate to previous elements
|
2160 |
+
return (newCache[ 2 ] = oldCache[ 2 ]);
|
2161 |
+
} else {
|
2162 |
+
// Reuse newcache so results back-propagate to previous elements
|
2163 |
+
outerCache[ dir ] = newCache;
|
2164 |
+
|
2165 |
+
// A match means we're done; a fail means we have to keep checking
|
2166 |
+
if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
|
2167 |
+
return true;
|
2168 |
+
}
|
2169 |
+
}
|
2170 |
+
}
|
2171 |
+
}
|
2172 |
+
}
|
2173 |
+
};
|
2174 |
+
}
|
2175 |
+
|
2176 |
+
function elementMatcher( matchers ) {
|
2177 |
+
return matchers.length > 1 ?
|
2178 |
+
function( elem, context, xml ) {
|
2179 |
+
var i = matchers.length;
|
2180 |
+
while ( i-- ) {
|
2181 |
+
if ( !matchers[i]( elem, context, xml ) ) {
|
2182 |
+
return false;
|
2183 |
+
}
|
2184 |
+
}
|
2185 |
+
return true;
|
2186 |
+
} :
|
2187 |
+
matchers[0];
|
2188 |
+
}
|
2189 |
+
|
2190 |
+
function multipleContexts( selector, contexts, results ) {
|
2191 |
+
var i = 0,
|
2192 |
+
len = contexts.length;
|
2193 |
+
for ( ; i < len; i++ ) {
|
2194 |
+
Sizzle( selector, contexts[i], results );
|
2195 |
+
}
|
2196 |
+
return results;
|
2197 |
+
}
|
2198 |
+
|
2199 |
+
function condense( unmatched, map, filter, context, xml ) {
|
2200 |
+
var elem,
|
2201 |
+
newUnmatched = [],
|
2202 |
+
i = 0,
|
2203 |
+
len = unmatched.length,
|
2204 |
+
mapped = map != null;
|
2205 |
+
|
2206 |
+
for ( ; i < len; i++ ) {
|
2207 |
+
if ( (elem = unmatched[i]) ) {
|
2208 |
+
if ( !filter || filter( elem, context, xml ) ) {
|
2209 |
+
newUnmatched.push( elem );
|
2210 |
+
if ( mapped ) {
|
2211 |
+
map.push( i );
|
2212 |
+
}
|
2213 |
+
}
|
2214 |
+
}
|
2215 |
+
}
|
2216 |
+
|
2217 |
+
return newUnmatched;
|
2218 |
+
}
|
2219 |
+
|
2220 |
+
function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
|
2221 |
+
if ( postFilter && !postFilter[ expando ] ) {
|
2222 |
+
postFilter = setMatcher( postFilter );
|
2223 |
+
}
|
2224 |
+
if ( postFinder && !postFinder[ expando ] ) {
|
2225 |
+
postFinder = setMatcher( postFinder, postSelector );
|
2226 |
+
}
|
2227 |
+
return markFunction(function( seed, results, context, xml ) {
|
2228 |
+
var temp, i, elem,
|
2229 |
+
preMap = [],
|
2230 |
+
postMap = [],
|
2231 |
+
preexisting = results.length,
|
2232 |
+
|
2233 |
+
// Get initial elements from seed or context
|
2234 |
+
elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
|
2235 |
+
|
2236 |
+
// Prefilter to get matcher input, preserving a map for seed-results synchronization
|
2237 |
+
matcherIn = preFilter && ( seed || !selector ) ?
|
2238 |
+
condense( elems, preMap, preFilter, context, xml ) :
|
2239 |
+
elems,
|
2240 |
+
|
2241 |
+
matcherOut = matcher ?
|
2242 |
+
// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
|
2243 |
+
postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
|
2244 |
+
|
2245 |
+
// ...intermediate processing is necessary
|
2246 |
+
[] :
|
2247 |
+
|
2248 |
+
// ...otherwise use results directly
|
2249 |
+
results :
|
2250 |
+
matcherIn;
|
2251 |
+
|
2252 |
+
// Find primary matches
|
2253 |
+
if ( matcher ) {
|
2254 |
+
matcher( matcherIn, matcherOut, context, xml );
|
2255 |
+
}
|
2256 |
+
|
2257 |
+
// Apply postFilter
|
2258 |
+
if ( postFilter ) {
|
2259 |
+
temp = condense( matcherOut, postMap );
|
2260 |
+
postFilter( temp, [], context, xml );
|
2261 |
+
|
2262 |
+
// Un-match failing elements by moving them back to matcherIn
|
2263 |
+
i = temp.length;
|
2264 |
+
while ( i-- ) {
|
2265 |
+
if ( (elem = temp[i]) ) {
|
2266 |
+
matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
|
2267 |
+
}
|
2268 |
+
}
|
2269 |
+
}
|
2270 |
+
|
2271 |
+
if ( seed ) {
|
2272 |
+
if ( postFinder || preFilter ) {
|
2273 |
+
if ( postFinder ) {
|
2274 |
+
// Get the final matcherOut by condensing this intermediate into postFinder contexts
|
2275 |
+
temp = [];
|
2276 |
+
i = matcherOut.length;
|
2277 |
+
while ( i-- ) {
|
2278 |
+
if ( (elem = matcherOut[i]) ) {
|
2279 |
+
// Restore matcherIn since elem is not yet a final match
|
2280 |
+
temp.push( (matcherIn[i] = elem) );
|
2281 |
+
}
|
2282 |
+
}
|
2283 |
+
postFinder( null, (matcherOut = []), temp, xml );
|
2284 |
+
}
|
2285 |
+
|
2286 |
+
// Move matched elements from seed to results to keep them synchronized
|
2287 |
+
i = matcherOut.length;
|
2288 |
+
while ( i-- ) {
|
2289 |
+
if ( (elem = matcherOut[i]) &&
|
2290 |
+
(temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {
|
2291 |
+
|
2292 |
+
seed[temp] = !(results[temp] = elem);
|
2293 |
+
}
|
2294 |
+
}
|
2295 |
+
}
|
2296 |
+
|
2297 |
+
// Add elements to results, through postFinder if defined
|
2298 |
+
} else {
|
2299 |
+
matcherOut = condense(
|
2300 |
+
matcherOut === results ?
|
2301 |
+
matcherOut.splice( preexisting, matcherOut.length ) :
|
2302 |
+
matcherOut
|
2303 |
+
);
|
2304 |
+
if ( postFinder ) {
|
2305 |
+
postFinder( null, results, matcherOut, xml );
|
2306 |
+
} else {
|
2307 |
+
push.apply( results, matcherOut );
|
2308 |
+
}
|
2309 |
+
}
|
2310 |
+
});
|
2311 |
+
}
|
2312 |
+
|
2313 |
+
function matcherFromTokens( tokens ) {
|
2314 |
+
var checkContext, matcher, j,
|
2315 |
+
len = tokens.length,
|
2316 |
+
leadingRelative = Expr.relative[ tokens[0].type ],
|
2317 |
+
implicitRelative = leadingRelative || Expr.relative[" "],
|
2318 |
+
i = leadingRelative ? 1 : 0,
|
2319 |
+
|
2320 |
+
// The foundational matcher ensures that elements are reachable from top-level context(s)
|
2321 |
+
matchContext = addCombinator( function( elem ) {
|
2322 |
+
return elem === checkContext;
|
2323 |
+
}, implicitRelative, true ),
|
2324 |
+
matchAnyContext = addCombinator( function( elem ) {
|
2325 |
+
return indexOf( checkContext, elem ) > -1;
|
2326 |
+
}, implicitRelative, true ),
|
2327 |
+
matchers = [ function( elem, context, xml ) {
|
2328 |
+
var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
|
2329 |
+
(checkContext = context).nodeType ?
|
2330 |
+
matchContext( elem, context, xml ) :
|
2331 |
+
matchAnyContext( elem, context, xml ) );
|
2332 |
+
// Avoid hanging onto element (issue #299)
|
2333 |
+
checkContext = null;
|
2334 |
+
return ret;
|
2335 |
+
} ];
|
2336 |
+
|
2337 |
+
for ( ; i < len; i++ ) {
|
2338 |
+
if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
|
2339 |
+
matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
|
2340 |
+
} else {
|
2341 |
+
matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
|
2342 |
+
|
2343 |
+
// Return special upon seeing a positional matcher
|
2344 |
+
if ( matcher[ expando ] ) {
|
2345 |
+
// Find the next relative operator (if any) for proper handling
|
2346 |
+
j = ++i;
|
2347 |
+
for ( ; j < len; j++ ) {
|
2348 |
+
if ( Expr.relative[ tokens[j].type ] ) {
|
2349 |
+
break;
|
2350 |
+
}
|
2351 |
+
}
|
2352 |
+
return setMatcher(
|
2353 |
+
i > 1 && elementMatcher( matchers ),
|
2354 |
+
i > 1 && toSelector(
|
2355 |
+
// If the preceding token was a descendant combinator, insert an implicit any-element `*`
|
2356 |
+
tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
|
2357 |
+
).replace( rtrim, "$1" ),
|
2358 |
+
matcher,
|
2359 |
+
i < j && matcherFromTokens( tokens.slice( i, j ) ),
|
2360 |
+
j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
|
2361 |
+
j < len && toSelector( tokens )
|
2362 |
+
);
|
2363 |
+
}
|
2364 |
+
matchers.push( matcher );
|
2365 |
+
}
|
2366 |
+
}
|
2367 |
+
|
2368 |
+
return elementMatcher( matchers );
|
2369 |
+
}
|
2370 |
+
|
2371 |
+
function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
|
2372 |
+
var bySet = setMatchers.length > 0,
|
2373 |
+
byElement = elementMatchers.length > 0,
|
2374 |
+
superMatcher = function( seed, context, xml, results, outermost ) {
|
2375 |
+
var elem, j, matcher,
|
2376 |
+
matchedCount = 0,
|
2377 |
+
i = "0",
|
2378 |
+
unmatched = seed && [],
|
2379 |
+
setMatched = [],
|
2380 |
+
contextBackup = outermostContext,
|
2381 |
+
// We must always have either seed elements or outermost context
|
2382 |
+
elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
|
2383 |
+
// Use integer dirruns iff this is the outermost matcher
|
2384 |
+
dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
|
2385 |
+
len = elems.length;
|
2386 |
+
|
2387 |
+
if ( outermost ) {
|
2388 |
+
outermostContext = context !== document && context;
|
2389 |
+
}
|
2390 |
+
|
2391 |
+
// Add elements passing elementMatchers directly to results
|
2392 |
+
// Keep `i` a string if there are no elements so `matchedCount` will be "00" below
|
2393 |
+
// Support: IE<9, Safari
|
2394 |
+
// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
|
2395 |
+
for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
|
2396 |
+
if ( byElement && elem ) {
|
2397 |
+
j = 0;
|
2398 |
+
while ( (matcher = elementMatchers[j++]) ) {
|
2399 |
+
if ( matcher( elem, context, xml ) ) {
|
2400 |
+
results.push( elem );
|
2401 |
+
break;
|
2402 |
+
}
|
2403 |
+
}
|
2404 |
+
if ( outermost ) {
|
2405 |
+
dirruns = dirrunsUnique;
|
2406 |
+
}
|
2407 |
+
}
|
2408 |
+
|
2409 |
+
// Track unmatched elements for set filters
|
2410 |
+
if ( bySet ) {
|
2411 |
+
// They will have gone through all possible matchers
|
2412 |
+
if ( (elem = !matcher && elem) ) {
|
2413 |
+
matchedCount--;
|
2414 |
+
}
|
2415 |
+
|
2416 |
+
// Lengthen the array for every element, matched or not
|
2417 |
+
if ( seed ) {
|
2418 |
+
unmatched.push( elem );
|
2419 |
+
}
|
2420 |
+
}
|
2421 |
+
}
|
2422 |
+
|
2423 |
+
// Apply set filters to unmatched elements
|
2424 |
+
matchedCount += i;
|
2425 |
+
if ( bySet && i !== matchedCount ) {
|
2426 |
+
j = 0;
|
2427 |
+
while ( (matcher = setMatchers[j++]) ) {
|
2428 |
+
matcher( unmatched, setMatched, context, xml );
|
2429 |
+
}
|
2430 |
+
|
2431 |
+
if ( seed ) {
|
2432 |
+
// Reintegrate element matches to eliminate the need for sorting
|
2433 |
+
if ( matchedCount > 0 ) {
|
2434 |
+
while ( i-- ) {
|
2435 |
+
if ( !(unmatched[i] || setMatched[i]) ) {
|
2436 |
+
setMatched[i] = pop.call( results );
|
2437 |
+
}
|
2438 |
+
}
|
2439 |
+
}
|
2440 |
+
|
2441 |
+
// Discard index placeholder values to get only actual matches
|
2442 |
+
setMatched = condense( setMatched );
|
2443 |
+
}
|
2444 |
+
|
2445 |
+
// Add matches to results
|
2446 |
+
push.apply( results, setMatched );
|
2447 |
+
|
2448 |
+
// Seedless set matches succeeding multiple successful matchers stipulate sorting
|
2449 |
+
if ( outermost && !seed && setMatched.length > 0 &&
|
2450 |
+
( matchedCount + setMatchers.length ) > 1 ) {
|
2451 |
+
|
2452 |
+
Sizzle.uniqueSort( results );
|
2453 |
+
}
|
2454 |
+
}
|
2455 |
+
|
2456 |
+
// Override manipulation of globals by nested matchers
|
2457 |
+
if ( outermost ) {
|
2458 |
+
dirruns = dirrunsUnique;
|
2459 |
+
outermostContext = contextBackup;
|
2460 |
+
}
|
2461 |
+
|
2462 |
+
return unmatched;
|
2463 |
+
};
|
2464 |
+
|
2465 |
+
return bySet ?
|
2466 |
+
markFunction( superMatcher ) :
|
2467 |
+
superMatcher;
|
2468 |
+
}
|
2469 |
+
|
2470 |
+
compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
|
2471 |
+
var i,
|
2472 |
+
setMatchers = [],
|
2473 |
+
elementMatchers = [],
|
2474 |
+
cached = compilerCache[ selector + " " ];
|
2475 |
+
|
2476 |
+
if ( !cached ) {
|
2477 |
+
// Generate a function of recursive functions that can be used to check each element
|
2478 |
+
if ( !match ) {
|
2479 |
+
match = tokenize( selector );
|
2480 |
+
}
|
2481 |
+
i = match.length;
|
2482 |
+
while ( i-- ) {
|
2483 |
+
cached = matcherFromTokens( match[i] );
|
2484 |
+
if ( cached[ expando ] ) {
|
2485 |
+
setMatchers.push( cached );
|
2486 |
+
} else {
|
2487 |
+
elementMatchers.push( cached );
|
2488 |
+
}
|
2489 |
+
}
|
2490 |
+
|
2491 |
+
// Cache the compiled function
|
2492 |
+
cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
|
2493 |
+
|
2494 |
+
// Save selector and tokenization
|
2495 |
+
cached.selector = selector;
|
2496 |
+
}
|
2497 |
+
return cached;
|
2498 |
+
};
|
2499 |
+
|
2500 |
+
/**
|
2501 |
+
* A low-level selection function that works with Sizzle's compiled
|
2502 |
+
* selector functions
|
2503 |
+
* @param {String|Function} selector A selector or a pre-compiled
|
2504 |
+
* selector function built with Sizzle.compile
|
2505 |
+
* @param {Element} context
|
2506 |
+
* @param {Array} [results]
|
2507 |
+
* @param {Array} [seed] A set of elements to match against
|
2508 |
+
*/
|
2509 |
+
select = Sizzle.select = function( selector, context, results, seed ) {
|
2510 |
+
var i, tokens, token, type, find,
|
2511 |
+
compiled = typeof selector === "function" && selector,
|
2512 |
+
match = !seed && tokenize( (selector = compiled.selector || selector) );
|
2513 |
+
|
2514 |
+
results = results || [];
|
2515 |
+
|
2516 |
+
// Try to minimize operations if there is no seed and only one group
|
2517 |
+
if ( match.length === 1 ) {
|
2518 |
+
|
2519 |
+
// Take a shortcut and set the context if the root selector is an ID
|
2520 |
+
tokens = match[0] = match[0].slice( 0 );
|
2521 |
+
if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
|
2522 |
+
support.getById && context.nodeType === 9 && documentIsHTML &&
|
2523 |
+
Expr.relative[ tokens[1].type ] ) {
|
2524 |
+
|
2525 |
+
context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
|
2526 |
+
if ( !context ) {
|
2527 |
+
return results;
|
2528 |
+
|
2529 |
+
// Precompiled matchers will still verify ancestry, so step up a level
|
2530 |
+
} else if ( compiled ) {
|
2531 |
+
context = context.parentNode;
|
2532 |
+
}
|
2533 |
+
|
2534 |
+
selector = selector.slice( tokens.shift().value.length );
|
2535 |
+
}
|
2536 |
+
|
2537 |
+
// Fetch a seed set for right-to-left matching
|
2538 |
+
i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
|
2539 |
+
while ( i-- ) {
|
2540 |
+
token = tokens[i];
|
2541 |
+
|
2542 |
+
// Abort if we hit a combinator
|
2543 |
+
if ( Expr.relative[ (type = token.type) ] ) {
|
2544 |
+
break;
|
2545 |
+
}
|
2546 |
+
if ( (find = Expr.find[ type ]) ) {
|
2547 |
+
// Search, expanding context for leading sibling combinators
|
2548 |
+
if ( (seed = find(
|
2549 |
+
token.matches[0].replace( runescape, funescape ),
|
2550 |
+
rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
|
2551 |
+
)) ) {
|
2552 |
+
|
2553 |
+
// If seed is empty or no tokens remain, we can return early
|
2554 |
+
tokens.splice( i, 1 );
|
2555 |
+
selector = seed.length && toSelector( tokens );
|
2556 |
+
if ( !selector ) {
|
2557 |
+
push.apply( results, seed );
|
2558 |
+
return results;
|
2559 |
+
}
|
2560 |
+
|
2561 |
+
break;
|
2562 |
+
}
|
2563 |
+
}
|
2564 |
+
}
|
2565 |
+
}
|
2566 |
+
|
2567 |
+
// Compile and execute a filtering function if one is not provided
|
2568 |
+
// Provide `match` to avoid retokenization if we modified the selector above
|
2569 |
+
( compiled || compile( selector, match ) )(
|
2570 |
+
seed,
|
2571 |
+
context,
|
2572 |
+
!documentIsHTML,
|
2573 |
+
results,
|
2574 |
+
rsibling.test( selector ) && testContext( context.parentNode ) || context
|
2575 |
+
);
|
2576 |
+
return results;
|
2577 |
+
};
|
2578 |
+
|
2579 |
+
// One-time assignments
|
2580 |
+
|
2581 |
+
// Sort stability
|
2582 |
+
support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
|
2583 |
+
|
2584 |
+
// Support: Chrome 14-35+
|
2585 |
+
// Always assume duplicates if they aren't passed to the comparison function
|
2586 |
+
support.detectDuplicates = !!hasDuplicate;
|
2587 |
+
|
2588 |
+
// Initialize against the default document
|
2589 |
+
setDocument();
|
2590 |
+
|
2591 |
+
// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
|
2592 |
+
// Detached nodes confoundingly follow *each other*
|
2593 |
+
support.sortDetached = assert(function( div1 ) {
|
2594 |
+
// Should return 1, but returns 4 (following)
|
2595 |
+
return div1.compareDocumentPosition( document.createElement("div") ) & 1;
|
2596 |
+
});
|
2597 |
+
|
2598 |
+
// Support: IE<8
|
2599 |
+
// Prevent attribute/property "interpolation"
|
2600 |
+
// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
|
2601 |
+
if ( !assert(function( div ) {
|
2602 |
+
div.innerHTML = "<a href='#'></a>";
|
2603 |
+
return div.firstChild.getAttribute("href") === "#" ;
|
2604 |
+
}) ) {
|
2605 |
+
addHandle( "type|href|height|width", function( elem, name, isXML ) {
|
2606 |
+
if ( !isXML ) {
|
2607 |
+
return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
|
2608 |
+
}
|
2609 |
+
});
|
2610 |
+
}
|
2611 |
+
|
2612 |
+
// Support: IE<9
|
2613 |
+
// Use defaultValue in place of getAttribute("value")
|
2614 |
+
if ( !support.attributes || !assert(function( div ) {
|
2615 |
+
div.innerHTML = "<input/>";
|
2616 |
+
div.firstChild.setAttribute( "value", "" );
|
2617 |
+
return div.firstChild.getAttribute( "value" ) === "";
|
2618 |
+
}) ) {
|
2619 |
+
addHandle( "value", function( elem, name, isXML ) {
|
2620 |
+
if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
|
2621 |
+
return elem.defaultValue;
|
2622 |
+
}
|
2623 |
+
});
|
2624 |
+
}
|
2625 |
+
|
2626 |
+
// Support: IE<9
|
2627 |
+
// Use getAttributeNode to fetch booleans when getAttribute lies
|
2628 |
+
if ( !assert(function( div ) {
|
2629 |
+
return div.getAttribute("disabled") == null;
|
2630 |
+
}) ) {
|
2631 |
+
addHandle( booleans, function( elem, name, isXML ) {
|
2632 |
+
var val;
|
2633 |
+
if ( !isXML ) {
|
2634 |
+
return elem[ name ] === true ? name.toLowerCase() :
|
2635 |
+
(val = elem.getAttributeNode( name )) && val.specified ?
|
2636 |
+
val.value :
|
2637 |
+
null;
|
2638 |
+
}
|
2639 |
+
});
|
2640 |
+
}
|
2641 |
+
|
2642 |
+
return Sizzle;
|
2643 |
+
|
2644 |
+
})( window );
|
2645 |
+
|
2646 |
+
|
2647 |
+
|
2648 |
+
jQuery.find = Sizzle;
|
2649 |
+
jQuery.expr = Sizzle.selectors;
|
2650 |
+
jQuery.expr[":"] = jQuery.expr.pseudos;
|
2651 |
+
jQuery.unique = Sizzle.uniqueSort;
|
2652 |
+
jQuery.text = Sizzle.getText;
|
2653 |
+
jQuery.isXMLDoc = Sizzle.isXML;
|
2654 |
+
jQuery.contains = Sizzle.contains;
|
2655 |
+
|
2656 |
+
|
2657 |
+
|
2658 |
+
var rneedsContext = jQuery.expr.match.needsContext;
|
2659 |
+
|
2660 |
+
var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/);
|
2661 |
+
|
2662 |
+
|
2663 |
+
|
2664 |
+
var risSimple = /^.[^:#\[\.,]*$/;
|
2665 |
+
|
2666 |
+
// Implement the identical functionality for filter and not
|
2667 |
+
function winnow( elements, qualifier, not ) {
|
2668 |
+
if ( jQuery.isFunction( qualifier ) ) {
|
2669 |
+
return jQuery.grep( elements, function( elem, i ) {
|
2670 |
+
/* jshint -W018 */
|
2671 |
+
return !!qualifier.call( elem, i, elem ) !== not;
|
2672 |
+
});
|
2673 |
+
|
2674 |
+
}
|
2675 |
+
|
2676 |
+
if ( qualifier.nodeType ) {
|
2677 |
+
return jQuery.grep( elements, function( elem ) {
|
2678 |
+
return ( elem === qualifier ) !== not;
|
2679 |
+
});
|
2680 |
+
|
2681 |
+
}
|
2682 |
+
|
2683 |
+
if ( typeof qualifier === "string" ) {
|
2684 |
+
if ( risSimple.test( qualifier ) ) {
|
2685 |
+
return jQuery.filter( qualifier, elements, not );
|
2686 |
+
}
|
2687 |
+
|
2688 |
+
qualifier = jQuery.filter( qualifier, elements );
|
2689 |
+
}
|
2690 |
+
|
2691 |
+
return jQuery.grep( elements, function( elem ) {
|
2692 |
+
return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not;
|
2693 |
+
});
|
2694 |
+
}
|
2695 |
+
|
2696 |
+
jQuery.filter = function( expr, elems, not ) {
|
2697 |
+
var elem = elems[ 0 ];
|
2698 |
+
|
2699 |
+
if ( not ) {
|
2700 |
+
expr = ":not(" + expr + ")";
|
2701 |
+
}
|
2702 |
+
|
2703 |
+
return elems.length === 1 && elem.nodeType === 1 ?
|
2704 |
+
jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
|
2705 |
+
jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
|
2706 |
+
return elem.nodeType === 1;
|
2707 |
+
}));
|
2708 |
+
};
|
2709 |
+
|
2710 |
+
jQuery.fn.extend({
|
2711 |
+
find: function( selector ) {
|
2712 |
+
var i,
|
2713 |
+
ret = [],
|
2714 |
+
self = this,
|
2715 |
+
len = self.length;
|
2716 |
+
|
2717 |
+
if ( typeof selector !== "string" ) {
|
2718 |
+
return this.pushStack( jQuery( selector ).filter(function() {
|
2719 |
+
for ( i = 0; i < len; i++ ) {
|
2720 |
+
if ( jQuery.contains( self[ i ], this ) ) {
|
2721 |
+
return true;
|
2722 |
+
}
|
2723 |
+
}
|
2724 |
+
}) );
|
2725 |
+
}
|
2726 |
+
|
2727 |
+
for ( i = 0; i < len; i++ ) {
|
2728 |
+
jQuery.find( selector, self[ i ], ret );
|
2729 |
+
}
|
2730 |
+
|
2731 |
+
// Needed because $( selector, context ) becomes $( context ).find( selector )
|
2732 |
+
ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
|
2733 |
+
ret.selector = this.selector ? this.selector + " " + selector : selector;
|
2734 |
+
return ret;
|
2735 |
+
},
|
2736 |
+
filter: function( selector ) {
|
2737 |
+
return this.pushStack( winnow(this, selector || [], false) );
|
2738 |
+
},
|
2739 |
+
not: function( selector ) {
|
2740 |
+
return this.pushStack( winnow(this, selector || [], true) );
|
2741 |
+
},
|
2742 |
+
is: function( selector ) {
|
2743 |
+
return !!winnow(
|
2744 |
+
this,
|
2745 |
+
|
2746 |
+
// If this is a positional/relative selector, check membership in the returned set
|
2747 |
+
// so $("p:first").is("p:last") won't return true for a doc with two "p".
|
2748 |
+
typeof selector === "string" && rneedsContext.test( selector ) ?
|
2749 |
+
jQuery( selector ) :
|
2750 |
+
selector || [],
|
2751 |
+
false
|
2752 |
+
).length;
|
2753 |
+
}
|
2754 |
+
});
|
2755 |
+
|
2756 |
+
|
2757 |
+
// Initialize a jQuery object
|
2758 |
+
|
2759 |
+
|
2760 |
+
// A central reference to the root jQuery(document)
|
2761 |
+
var rootjQuery,
|
2762 |
+
|
2763 |
+
// Use the correct document accordingly with window argument (sandbox)
|
2764 |
+
document = window.document,
|
2765 |
+
|
2766 |
+
// A simple way to check for HTML strings
|
2767 |
+
// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
|
2768 |
+
// Strict HTML recognition (#11290: must start with <)
|
2769 |
+
rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
|
2770 |
+
|
2771 |
+
init = jQuery.fn.init = function( selector, context ) {
|
2772 |
+
var match, elem;
|
2773 |
+
|
2774 |
+
// HANDLE: $(""), $(null), $(undefined), $(false)
|
2775 |
+
if ( !selector ) {
|
2776 |
+
return this;
|
2777 |
+
}
|
2778 |
+
|
2779 |
+
// Handle HTML strings
|
2780 |
+
if ( typeof selector === "string" ) {
|
2781 |
+
if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
|
2782 |
+
// Assume that strings that start and end with <> are HTML and skip the regex check
|
2783 |
+
match = [ null, selector, null ];
|
2784 |
+
|
2785 |
+
} else {
|
2786 |
+
match = rquickExpr.exec( selector );
|
2787 |
+
}
|
2788 |
+
|
2789 |
+
// Match html or make sure no context is specified for #id
|
2790 |
+
if ( match && (match[1] || !context) ) {
|
2791 |
+
|
2792 |
+
// HANDLE: $(html) -> $(array)
|
2793 |
+
if ( match[1] ) {
|
2794 |
+
context = context instanceof jQuery ? context[0] : context;
|
2795 |
+
|
2796 |
+
// scripts is true for back-compat
|
2797 |
+
// Intentionally let the error be thrown if parseHTML is not present
|
2798 |
+
jQuery.merge( this, jQuery.parseHTML(
|
2799 |
+
match[1],
|
2800 |
+
context && context.nodeType ? context.ownerDocument || context : document,
|
2801 |
+
true
|
2802 |
+
) );
|
2803 |
+
|
2804 |
+
// HANDLE: $(html, props)
|
2805 |
+
if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
|
2806 |
+
for ( match in context ) {
|
2807 |
+
// Properties of context are called as methods if possible
|
2808 |
+
if ( jQuery.isFunction( this[ match ] ) ) {
|
2809 |
+
this[ match ]( context[ match ] );
|
2810 |
+
|
2811 |
+
// ...and otherwise set as attributes
|
2812 |
+
} else {
|
2813 |
+
this.attr( match, context[ match ] );
|
2814 |
+
}
|
2815 |
+
}
|
2816 |
+
}
|
2817 |
+
|
2818 |
+
return this;
|
2819 |
+
|
2820 |
+
// HANDLE: $(#id)
|
2821 |
+
} else {
|
2822 |
+
elem = document.getElementById( match[2] );
|
2823 |
+
|
2824 |
+
// Check parentNode to catch when Blackberry 4.6 returns
|
2825 |
+
// nodes that are no longer in the document #6963
|
2826 |
+
if ( elem && elem.parentNode ) {
|
2827 |
+
// Handle the case where IE and Opera return items
|
2828 |
+
// by name instead of ID
|
2829 |
+
if ( elem.id !== match[2] ) {
|
2830 |
+
return rootjQuery.find( selector );
|
2831 |
+
}
|
2832 |
+
|
2833 |
+
// Otherwise, we inject the element directly into the jQuery object
|
2834 |
+
this.length = 1;
|
2835 |
+
this[0] = elem;
|
2836 |
+
}
|
2837 |
+
|
2838 |
+
this.context = document;
|
2839 |
+
this.selector = selector;
|
2840 |
+
return this;
|
2841 |
+
}
|
2842 |
+
|
2843 |
+
// HANDLE: $(expr, $(...))
|
2844 |
+
} else if ( !context || context.jquery ) {
|
2845 |
+
return ( context || rootjQuery ).find( selector );
|
2846 |
+
|
2847 |
+
// HANDLE: $(expr, context)
|
2848 |
+
// (which is just equivalent to: $(context).find(expr)
|
2849 |
+
} else {
|
2850 |
+
return this.constructor( context ).find( selector );
|
2851 |
+
}
|
2852 |
+
|
2853 |
+
// HANDLE: $(DOMElement)
|
2854 |
+
} else if ( selector.nodeType ) {
|
2855 |
+
this.context = this[0] = selector;
|
2856 |
+
this.length = 1;
|
2857 |
+
return this;
|
2858 |
+
|
2859 |
+
// HANDLE: $(function)
|
2860 |
+
// Shortcut for document ready
|
2861 |
+
} else if ( jQuery.isFunction( selector ) ) {
|
2862 |
+
return typeof rootjQuery.ready !== "undefined" ?
|
2863 |
+
rootjQuery.ready( selector ) :
|
2864 |
+
// Execute immediately if ready is not present
|
2865 |
+
selector( jQuery );
|
2866 |
+
}
|
2867 |
+
|
2868 |
+
if ( selector.selector !== undefined ) {
|
2869 |
+
this.selector = selector.selector;
|
2870 |
+
this.context = selector.context;
|
2871 |
+
}
|
2872 |
+
|
2873 |
+
return jQuery.makeArray( selector, this );
|
2874 |
+
};
|
2875 |
+
|
2876 |
+
// Give the init function the jQuery prototype for later instantiation
|
2877 |
+
init.prototype = jQuery.fn;
|
2878 |
+
|
2879 |
+
// Initialize central reference
|
2880 |
+
rootjQuery = jQuery( document );
|
2881 |
+
|
2882 |
+
|
2883 |
+
var rparentsprev = /^(?:parents|prev(?:Until|All))/,
|
2884 |
+
// methods guaranteed to produce a unique set when starting from a unique set
|
2885 |
+
guaranteedUnique = {
|
2886 |
+
children: true,
|
2887 |
+
contents: true,
|
2888 |
+
next: true,
|
2889 |
+
prev: true
|
2890 |
+
};
|
2891 |
+
|
2892 |
+
jQuery.extend({
|
2893 |
+
dir: function( elem, dir, until ) {
|
2894 |
+
var matched = [],
|
2895 |
+
cur = elem[ dir ];
|
2896 |
+
|
2897 |
+
while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
|
2898 |
+
if ( cur.nodeType === 1 ) {
|
2899 |
+
matched.push( cur );
|
2900 |
+
}
|
2901 |
+
cur = cur[dir];
|
2902 |
+
}
|
2903 |
+
return matched;
|
2904 |
+
},
|
2905 |
+
|
2906 |
+
sibling: function( n, elem ) {
|
2907 |
+
var r = [];
|
2908 |
+
|
2909 |
+
for ( ; n; n = n.nextSibling ) {
|
2910 |
+
if ( n.nodeType === 1 && n !== elem ) {
|
2911 |
+
r.push( n );
|
2912 |
+
}
|
2913 |
+
}
|
2914 |
+
|
2915 |
+
return r;
|
2916 |
+
}
|
2917 |
+
});
|
2918 |
+
|
2919 |
+
jQuery.fn.extend({
|
2920 |
+
has: function( target ) {
|
2921 |
+
var i,
|
2922 |
+
targets = jQuery( target, this ),
|
2923 |
+
len = targets.length;
|
2924 |
+
|
2925 |
+
return this.filter(function() {
|
2926 |
+
for ( i = 0; i < len; i++ ) {
|
2927 |
+
if ( jQuery.contains( this, targets[i] ) ) {
|
2928 |
+
return true;
|
2929 |
+
}
|
2930 |
+
}
|
2931 |
+
});
|
2932 |
+
},
|
2933 |
+
|
2934 |
+
closest: function( selectors, context ) {
|
2935 |
+
var cur,
|
2936 |
+
i = 0,
|
2937 |
+
l = this.length,
|
2938 |
+
matched = [],
|
2939 |
+
pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
|
2940 |
+
jQuery( selectors, context || this.context ) :
|
2941 |
+
0;
|
2942 |
+
|
2943 |
+
for ( ; i < l; i++ ) {
|
2944 |
+
for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {
|
2945 |
+
// Always skip document fragments
|
2946 |
+
if ( cur.nodeType < 11 && (pos ?
|
2947 |
+
pos.index(cur) > -1 :
|
2948 |
+
|
2949 |
+
// Don't pass non-elements to Sizzle
|
2950 |
+
cur.nodeType === 1 &&
|
2951 |
+
jQuery.find.matchesSelector(cur, selectors)) ) {
|
2952 |
+
|
2953 |
+
matched.push( cur );
|
2954 |
+
break;
|
2955 |
+
}
|
2956 |
+
}
|
2957 |
+
}
|
2958 |
+
|
2959 |
+
return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched );
|
2960 |
+
},
|
2961 |
+
|
2962 |
+
// Determine the position of an element within
|
2963 |
+
// the matched set of elements
|
2964 |
+
index: function( elem ) {
|
2965 |
+
|
2966 |
+
// No argument, return index in parent
|
2967 |
+
if ( !elem ) {
|
2968 |
+
return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;
|
2969 |
+
}
|
2970 |
+
|
2971 |
+
// index in selector
|
2972 |
+
if ( typeof elem === "string" ) {
|
2973 |
+
return jQuery.inArray( this[0], jQuery( elem ) );
|
2974 |
+
}
|
2975 |
+
|
2976 |
+
// Locate the position of the desired element
|
2977 |
+
return jQuery.inArray(
|
2978 |
+
// If it receives a jQuery object, the first element is used
|
2979 |
+
elem.jquery ? elem[0] : elem, this );
|
2980 |
+
},
|
2981 |
+
|
2982 |
+
add: function( selector, context ) {
|
2983 |
+
return this.pushStack(
|
2984 |
+
jQuery.unique(
|
2985 |
+
jQuery.merge( this.get(), jQuery( selector, context ) )
|
2986 |
+
)
|
2987 |
+
);
|
2988 |
+
},
|
2989 |
+
|
2990 |
+
addBack: function( selector ) {
|
2991 |
+
return this.add( selector == null ?
|
2992 |
+
this.prevObject : this.prevObject.filter(selector)
|
2993 |
+
);
|
2994 |
+
}
|
2995 |
+
});
|
2996 |
+
|
2997 |
+
function sibling( cur, dir ) {
|
2998 |
+
do {
|
2999 |
+
cur = cur[ dir ];
|
3000 |
+
} while ( cur && cur.nodeType !== 1 );
|
3001 |
+
|
3002 |
+
return cur;
|
3003 |
+
}
|
3004 |
+
|
3005 |
+
jQuery.each({
|
3006 |
+
parent: function( elem ) {
|
3007 |
+
var parent = elem.parentNode;
|
3008 |
+
return parent && parent.nodeType !== 11 ? parent : null;
|
3009 |
+
},
|
3010 |
+
parents: function( elem ) {
|
3011 |
+
return jQuery.dir( elem, "parentNode" );
|
3012 |
+
},
|
3013 |
+
parentsUntil: function( elem, i, until ) {
|
3014 |
+
return jQuery.dir( elem, "parentNode", until );
|
3015 |
+
},
|
3016 |
+
next: function( elem ) {
|
3017 |
+
return sibling( elem, "nextSibling" );
|
3018 |
+
},
|
3019 |
+
prev: function( elem ) {
|
3020 |
+
return sibling( elem, "previousSibling" );
|
3021 |
+
},
|
3022 |
+
nextAll: function( elem ) {
|
3023 |
+
return jQuery.dir( elem, "nextSibling" );
|
3024 |
+
},
|
3025 |
+
prevAll: function( elem ) {
|
3026 |
+
return jQuery.dir( elem, "previousSibling" );
|
3027 |
+
},
|
3028 |
+
nextUntil: function( elem, i, until ) {
|
3029 |
+
return jQuery.dir( elem, "nextSibling", until );
|
3030 |
+
},
|
3031 |
+
prevUntil: function( elem, i, until ) {
|
3032 |
+
return jQuery.dir( elem, "previousSibling", until );
|
3033 |
+
},
|
3034 |
+
siblings: function( elem ) {
|
3035 |
+
return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
|
3036 |
+
},
|
3037 |
+
children: function( elem ) {
|
3038 |
+
return jQuery.sibling( elem.firstChild );
|
3039 |
+
},
|
3040 |
+
contents: function( elem ) {
|
3041 |
+
return jQuery.nodeName( elem, "iframe" ) ?
|
3042 |
+
elem.contentDocument || elem.contentWindow.document :
|
3043 |
+
jQuery.merge( [], elem.childNodes );
|
3044 |
+
}
|
3045 |
+
}, function( name, fn ) {
|
3046 |
+
jQuery.fn[ name ] = function( until, selector ) {
|
3047 |
+
var ret = jQuery.map( this, fn, until );
|
3048 |
+
|
3049 |
+
if ( name.slice( -5 ) !== "Until" ) {
|
3050 |
+
selector = until;
|
3051 |
+
}
|
3052 |
+
|
3053 |
+
if ( selector && typeof selector === "string" ) {
|
3054 |
+
ret = jQuery.filter( selector, ret );
|
3055 |
+
}
|
3056 |
+
|
3057 |
+
if ( this.length > 1 ) {
|
3058 |
+
// Remove duplicates
|
3059 |
+
if ( !guaranteedUnique[ name ] ) {
|
3060 |
+
ret = jQuery.unique( ret );
|
3061 |
+
}
|
3062 |
+
|
3063 |
+
// Reverse order for parents* and prev-derivatives
|
3064 |
+
if ( rparentsprev.test( name ) ) {
|
3065 |
+
ret = ret.reverse();
|
3066 |
+
}
|
3067 |
+
}
|
3068 |
+
|
3069 |
+
return this.pushStack( ret );
|
3070 |
+
};
|
3071 |
+
});
|
3072 |
+
var rnotwhite = (/\S+/g);
|
3073 |
+
|
3074 |
+
|
3075 |
+
|
3076 |
+
// String to Object options format cache
|
3077 |
+
var optionsCache = {};
|
3078 |
+
|
3079 |
+
// Convert String-formatted options into Object-formatted ones and store in cache
|
3080 |
+
function createOptions( options ) {
|
3081 |
+
var object = optionsCache[ options ] = {};
|
3082 |
+
jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {
|
3083 |
+
object[ flag ] = true;
|
3084 |
+
});
|
3085 |
+
return object;
|
3086 |
+
}
|
3087 |
+
|
3088 |
+
/*
|
3089 |
+
* Create a callback list using the following parameters:
|
3090 |
+
*
|
3091 |
+
* options: an optional list of space-separated options that will change how
|
3092 |
+
* the callback list behaves or a more traditional option object
|
3093 |
+
*
|
3094 |
+
* By default a callback list will act like an event callback list and can be
|
3095 |
+
* "fired" multiple times.
|
3096 |
+
*
|
3097 |
+
* Possible options:
|
3098 |
+
*
|
3099 |
+
* once: will ensure the callback list can only be fired once (like a Deferred)
|
3100 |
+
*
|
3101 |
+
* memory: will keep track of previous values and will call any callback added
|
3102 |
+
* after the list has been fired right away with the latest "memorized"
|
3103 |
+
* values (like a Deferred)
|
3104 |
+
*
|
3105 |
+
* unique: will ensure a callback can only be added once (no duplicate in the list)
|
3106 |
+
*
|
3107 |
+
* stopOnFalse: interrupt callings when a callback returns false
|
3108 |
+
*
|
3109 |
+
*/
|
3110 |
+
jQuery.Callbacks = function( options ) {
|
3111 |
+
|
3112 |
+
// Convert options from String-formatted to Object-formatted if needed
|
3113 |
+
// (we check in cache first)
|
3114 |
+
options = typeof options === "string" ?
|
3115 |
+
( optionsCache[ options ] || createOptions( options ) ) :
|
3116 |
+
jQuery.extend( {}, options );
|
3117 |
+
|
3118 |
+
var // Flag to know if list is currently firing
|
3119 |
+
firing,
|
3120 |
+
// Last fire value (for non-forgettable lists)
|
3121 |
+
memory,
|
3122 |
+
// Flag to know if list was already fired
|
3123 |
+
fired,
|
3124 |
+
// End of the loop when firing
|
3125 |
+
firingLength,
|
3126 |
+
// Index of currently firing callback (modified by remove if needed)
|
3127 |
+
firingIndex,
|
3128 |
+
// First callback to fire (used internally by add and fireWith)
|
3129 |
+
firingStart,
|
3130 |
+
// Actual callback list
|
3131 |
+
list = [],
|
3132 |
+
// Stack of fire calls for repeatable lists
|
3133 |
+
stack = !options.once && [],
|
3134 |
+
// Fire callbacks
|
3135 |
+
fire = function( data ) {
|
3136 |
+
memory = options.memory && data;
|
3137 |
+
fired = true;
|
3138 |
+
firingIndex = firingStart || 0;
|
3139 |
+
firingStart = 0;
|
3140 |
+
firingLength = list.length;
|
3141 |
+
firing = true;
|
3142 |
+
for ( ; list && firingIndex < firingLength; firingIndex++ ) {
|
3143 |
+
if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
|
3144 |
+
memory = false; // To prevent further calls using add
|
3145 |
+
break;
|
3146 |
+
}
|
3147 |
+
}
|
3148 |
+
firing = false;
|
3149 |
+
if ( list ) {
|
3150 |
+
if ( stack ) {
|
3151 |
+
if ( stack.length ) {
|
3152 |
+
fire( stack.shift() );
|
3153 |
+
}
|
3154 |
+
} else if ( memory ) {
|
3155 |
+
list = [];
|
3156 |
+
} else {
|
3157 |
+
self.disable();
|
3158 |
+
}
|
3159 |
+
}
|
3160 |
+
},
|
3161 |
// Actual Callbacks object
|
3162 |
self = {
|
3163 |
// Add a callback or a collection of callbacks to the list
|
3196 |
if ( list ) {
|
3197 |
jQuery.each( arguments, function( _, arg ) {
|
3198 |
var index;
|
3199 |
+
while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
|
3200 |
list.splice( index, 1 );
|
3201 |
// Handle firing indexes
|
3202 |
if ( firing ) {
|
3212 |
}
|
3213 |
return this;
|
3214 |
},
|
3215 |
+
// Check if a given callback is in the list.
|
3216 |
+
// If no argument is given, return whether or not list has callbacks attached.
|
3217 |
has: function( fn ) {
|
3218 |
+
return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
|
3219 |
},
|
3220 |
// Remove all callbacks from the list
|
3221 |
empty: function() {
|
3222 |
list = [];
|
3223 |
+
firingLength = 0;
|
3224 |
return this;
|
3225 |
},
|
3226 |
// Have the list do nothing anymore
|
3246 |
},
|
3247 |
// Call all callbacks with the given context and arguments
|
3248 |
fireWith: function( context, args ) {
|
|
|
|
|
3249 |
if ( list && ( !fired || stack ) ) {
|
3250 |
+
args = args || [];
|
3251 |
+
args = [ context, args.slice ? args.slice() : args ];
|
3252 |
if ( firing ) {
|
3253 |
stack.push( args );
|
3254 |
} else {
|
3270 |
|
3271 |
return self;
|
3272 |
};
|
3273 |
+
|
3274 |
+
|
3275 |
jQuery.extend({
|
3276 |
|
3277 |
Deferred: function( func ) {
|
3294 |
var fns = arguments;
|
3295 |
return jQuery.Deferred(function( newDefer ) {
|
3296 |
jQuery.each( tuples, function( i, tuple ) {
|
3297 |
+
var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
|
|
|
3298 |
// deferred[ done | fail | progress ] for forwarding actions to newDefer
|
3299 |
+
deferred[ tuple[1] ](function() {
|
3300 |
+
var returned = fn && fn.apply( this, arguments );
|
3301 |
+
if ( returned && jQuery.isFunction( returned.promise ) ) {
|
3302 |
+
returned.promise()
|
3303 |
+
.done( newDefer.resolve )
|
3304 |
+
.fail( newDefer.reject )
|
3305 |
+
.progress( newDefer.notify );
|
3306 |
+
} else {
|
3307 |
+
newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
|
3308 |
+
}
|
3309 |
+
});
|
|
|
|
|
|
|
3310 |
});
|
3311 |
fns = null;
|
3312 |
}).promise();
|
3340 |
}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
|
3341 |
}
|
3342 |
|
3343 |
+
// deferred[ resolve | reject | notify ]
|
3344 |
+
deferred[ tuple[0] ] = function() {
|
3345 |
+
deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
|
3346 |
+
return this;
|
3347 |
+
};
|
3348 |
deferred[ tuple[0] + "With" ] = list.fireWith;
|
3349 |
});
|
3350 |
|
3363 |
// Deferred helper
|
3364 |
when: function( subordinate /* , ..., subordinateN */ ) {
|
3365 |
var i = 0,
|
3366 |
+
resolveValues = slice.call( arguments ),
|
3367 |
length = resolveValues.length,
|
3368 |
|
3369 |
// the count of uncompleted subordinates
|
3376 |
updateFunc = function( i, contexts, values ) {
|
3377 |
return function( value ) {
|
3378 |
contexts[ i ] = this;
|
3379 |
+
values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
|
3380 |
+
if ( values === progressValues ) {
|
3381 |
deferred.notifyWith( contexts, values );
|
3382 |
+
|
3383 |
+
} else if ( !(--remaining) ) {
|
3384 |
deferred.resolveWith( contexts, values );
|
3385 |
}
|
3386 |
};
|
3413 |
return deferred.promise();
|
3414 |
}
|
3415 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3416 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3417 |
|
3418 |
+
// The deferred used on DOM ready
|
3419 |
+
var readyList;
|
|
|
|
|
|
|
3420 |
|
3421 |
+
jQuery.fn.ready = function( fn ) {
|
3422 |
+
// Add the callback
|
3423 |
+
jQuery.ready.promise().done( fn );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3424 |
|
3425 |
+
return this;
|
3426 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
3427 |
|
3428 |
jQuery.extend({
|
3429 |
+
// Is the DOM ready to be used? Set to true once it occurs.
|
3430 |
+
isReady: false,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3431 |
|
3432 |
+
// A counter to track how many items to wait for before
|
3433 |
+
// the ready event fires. See #6781
|
3434 |
+
readyWait: 1,
|
|
|
3435 |
|
3436 |
+
// Hold (or release) the ready event
|
3437 |
+
holdReady: function( hold ) {
|
3438 |
+
if ( hold ) {
|
3439 |
+
jQuery.readyWait++;
|
3440 |
+
} else {
|
3441 |
+
jQuery.ready( true );
|
3442 |
}
|
3443 |
+
},
|
3444 |
|
3445 |
+
// Handle when the DOM is ready
|
3446 |
+
ready: function( wait ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3447 |
|
3448 |
+
// Abort if there are pending holds or we're already ready
|
3449 |
+
if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
|
|
|
3450 |
return;
|
3451 |
}
|
3452 |
|
3453 |
+
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
|
3454 |
+
if ( !document.body ) {
|
3455 |
+
return setTimeout( jQuery.ready );
|
|
|
|
|
|
|
|
|
|
|
3456 |
}
|
3457 |
|
3458 |
+
// Remember that the DOM is ready
|
3459 |
+
jQuery.isReady = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3460 |
|
3461 |
+
// If a normal DOM Ready event fired, decrement, and wait if need be
|
3462 |
+
if ( wait !== true && --jQuery.readyWait > 0 ) {
|
3463 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
3464 |
}
|
3465 |
|
3466 |
+
// If there are functions bound, to execute
|
3467 |
+
readyList.resolveWith( document, [ jQuery ] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3468 |
|
3469 |
+
// Trigger any bound ready events
|
3470 |
+
if ( jQuery.fn.triggerHandler ) {
|
3471 |
+
jQuery( document ).triggerHandler( "ready" );
|
3472 |
+
jQuery( document ).off( "ready" );
|
3473 |
}
|
3474 |
+
}
|
3475 |
+
});
|
3476 |
|
3477 |
+
/**
|
3478 |
+
* Clean-up method for dom ready events
|
3479 |
+
*/
|
3480 |
+
function detach() {
|
3481 |
+
if ( document.addEventListener ) {
|
3482 |
+
document.removeEventListener( "DOMContentLoaded", completed, false );
|
3483 |
+
window.removeEventListener( "load", completed, false );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3484 |
|
3485 |
+
} else {
|
3486 |
+
document.detachEvent( "onreadystatechange", completed );
|
3487 |
+
window.detachEvent( "onload", completed );
|
3488 |
+
}
|
3489 |
+
}
|
3490 |
|
3491 |
+
/**
|
3492 |
+
* The ready event handler and self cleanup method
|
3493 |
+
*/
|
3494 |
+
function completed() {
|
3495 |
+
// readyState === "complete" is good enough for us to call the dom ready in oldIE
|
3496 |
+
if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) {
|
3497 |
+
detach();
|
3498 |
+
jQuery.ready();
|
3499 |
+
}
|
3500 |
+
}
|
3501 |
|
3502 |
+
jQuery.ready.promise = function( obj ) {
|
3503 |
+
if ( !readyList ) {
|
3504 |
+
|
3505 |
+
readyList = jQuery.Deferred();
|
3506 |
|
3507 |
+
// Catch cases where $(document).ready() is called after the browser event has already occurred.
|
3508 |
+
// we once tried to use readyState "interactive" here, but it caused issues like the one
|
3509 |
+
// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
|
3510 |
+
if ( document.readyState === "complete" ) {
|
3511 |
+
// Handle it asynchronously to allow scripts the opportunity to delay ready
|
3512 |
+
setTimeout( jQuery.ready );
|
3513 |
|
3514 |
+
// Standards-based browsers support DOMContentLoaded
|
3515 |
+
} else if ( document.addEventListener ) {
|
3516 |
+
// Use the handy event callback
|
3517 |
+
document.addEventListener( "DOMContentLoaded", completed, false );
|
3518 |
|
3519 |
+
// A fallback to window.onload, that will always work
|
3520 |
+
window.addEventListener( "load", completed, false );
|
|
|
|
|
|
|
3521 |
|
3522 |
+
// If IE event model is used
|
3523 |
+
} else {
|
3524 |
+
// Ensure firing before onload, maybe late but safe also for iframes
|
3525 |
+
document.attachEvent( "onreadystatechange", completed );
|
3526 |
|
3527 |
+
// A fallback to window.onload, that will always work
|
3528 |
+
window.attachEvent( "onload", completed );
|
3529 |
|
3530 |
+
// If IE and not a frame
|
3531 |
+
// continually check to see if the document is ready
|
3532 |
+
var top = false;
|
3533 |
|
3534 |
+
try {
|
3535 |
+
top = window.frameElement == null && document.documentElement;
|
3536 |
+
} catch(e) {}
|
3537 |
|
3538 |
+
if ( top && top.doScroll ) {
|
3539 |
+
(function doScrollCheck() {
|
3540 |
+
if ( !jQuery.isReady ) {
|
|
|
3541 |
|
3542 |
+
try {
|
3543 |
+
// Use the trick by Diego Perini
|
3544 |
+
// http://javascript.nwbox.com/IEContentLoaded/
|
3545 |
+
top.doScroll("left");
|
3546 |
+
} catch(e) {
|
3547 |
+
return setTimeout( doScrollCheck, 50 );
|
3548 |
}
|
|
|
|
|
3549 |
|
3550 |
+
// detach all dom ready events
|
3551 |
+
detach();
|
|
|
3552 |
|
3553 |
+
// and execute any waiting functions
|
3554 |
+
jQuery.ready();
|
3555 |
+
}
|
3556 |
+
})();
|
|
|
3557 |
}
|
3558 |
}
|
3559 |
+
}
|
3560 |
+
return readyList.promise( obj );
|
3561 |
+
};
|
3562 |
|
|
|
|
|
|
|
3563 |
|
3564 |
+
var strundefined = typeof undefined;
|
|
|
|
|
|
|
|
|
|
|
3565 |
|
|
|
|
|
|
|
3566 |
|
|
|
|
|
|
|
3567 |
|
3568 |
+
// Support: IE<9
|
3569 |
+
// Iteration over object's inherited properties before its own
|
3570 |
+
var i;
|
3571 |
+
for ( i in jQuery( support ) ) {
|
3572 |
+
break;
|
3573 |
+
}
|
3574 |
+
support.ownLast = i !== "0";
|
3575 |
|
3576 |
+
// Note: most support tests are defined in their respective modules.
|
3577 |
+
// false until the test is run
|
3578 |
+
support.inlineBlockNeedsLayout = false;
|
|
|
3579 |
|
3580 |
+
// Execute ASAP in case we need to set body.style.zoom
|
3581 |
+
jQuery(function() {
|
3582 |
+
// Minified: var a,b,c,d
|
3583 |
+
var val, div, body, container;
|
3584 |
|
3585 |
+
body = document.getElementsByTagName( "body" )[ 0 ];
|
3586 |
+
if ( !body || !body.style ) {
|
3587 |
+
// Return for frameset docs that don't have a body
|
3588 |
+
return;
|
3589 |
}
|
|
|
3590 |
|
3591 |
+
// Setup
|
3592 |
+
div = document.createElement( "div" );
|
3593 |
+
container = document.createElement( "div" );
|
3594 |
+
container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
|
3595 |
+
body.appendChild( container ).appendChild( div );
|
|
|
3596 |
|
3597 |
+
if ( typeof div.style.zoom !== strundefined ) {
|
3598 |
+
// Support: IE<8
|
3599 |
+
// Check if natively block-level elements act like inline-block
|
3600 |
+
// elements when setting their display to 'inline' and giving
|
3601 |
+
// them layout
|
3602 |
+
div.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1";
|
3603 |
|
3604 |
+
support.inlineBlockNeedsLayout = val = div.offsetWidth === 3;
|
3605 |
+
if ( val ) {
|
3606 |
+
// Prevent IE 6 from affecting layout for positioned elements #11048
|
3607 |
+
// Prevent IE from shrinking the body in IE 7 mode #12869
|
3608 |
+
// Support: IE<8
|
3609 |
+
body.style.zoom = 1;
|
3610 |
+
}
|
3611 |
+
}
|
3612 |
|
3613 |
+
body.removeChild( container );
|
3614 |
+
});
|
3615 |
|
|
|
|
|
|
|
|
|
|
|
|
|
3616 |
|
|
|
|
|
3617 |
|
|
|
|
|
|
|
|
|
|
|
|
|
3618 |
|
3619 |
+
(function() {
|
3620 |
+
var div = document.createElement( "div" );
|
|
|
3621 |
|
3622 |
+
// Execute the test only if not already executed in another module.
|
3623 |
+
if (support.deleteExpando == null) {
|
3624 |
+
// Support: IE<9
|
3625 |
+
support.deleteExpando = true;
|
3626 |
+
try {
|
3627 |
+
delete div.test;
|
3628 |
+
} catch( e ) {
|
3629 |
+
support.deleteExpando = false;
|
3630 |
+
}
|
3631 |
+
}
|
3632 |
|
3633 |
+
// Null elements to avoid leaks in IE.
|
3634 |
+
div = null;
|
3635 |
+
})();
|
3636 |
|
|
|
|
|
|
|
|
|
|
|
3637 |
|
3638 |
+
/**
|
3639 |
+
* Determines whether an object can have data
|
3640 |
+
*/
|
3641 |
+
jQuery.acceptData = function( elem ) {
|
3642 |
+
var noData = jQuery.noData[ (elem.nodeName + " ").toLowerCase() ],
|
3643 |
+
nodeType = +elem.nodeType || 1;
|
3644 |
|
3645 |
+
// Do not set data on non-element DOM nodes because it will not be cleared (#8335).
|
3646 |
+
return nodeType !== 1 && nodeType !== 9 ?
|
3647 |
+
false :
|
3648 |
|
3649 |
+
// Nodes accept data unless otherwise specified; rejection can be conditional
|
3650 |
+
!noData || noData !== true && elem.getAttribute("classid") === noData;
|
3651 |
+
};
|
|
|
|
|
|
|
3652 |
|
3653 |
+
|
3654 |
+
var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
|
3655 |
+
rmultiDash = /([A-Z])/g;
|
|
|
|
|
|
|
3656 |
|
3657 |
function dataAttr( elem, key, data ) {
|
3658 |
// If nothing was found internally, try to fetch any
|
3666 |
if ( typeof data === "string" ) {
|
3667 |
try {
|
3668 |
data = data === "true" ? true :
|
3669 |
+
data === "false" ? false :
|
3670 |
+
data === "null" ? null :
|
3671 |
+
// Only convert to a number if it doesn't change the string
|
3672 |
+
+data + "" === data ? +data :
|
3673 |
+
rbrace.test( data ) ? jQuery.parseJSON( data ) :
|
3674 |
data;
|
3675 |
} catch( e ) {}
|
3676 |
|
3695 |
continue;
|
3696 |
}
|
3697 |
if ( name !== "toJSON" ) {
|
3698 |
+
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3699 |
}
|
3700 |
+
}
|
3701 |
|
3702 |
+
return true;
|
3703 |
+
}
|
3704 |
+
|
3705 |
+
function internalData( elem, name, data, pvt /* Internal Use Only */ ) {
|
3706 |
+
if ( !jQuery.acceptData( elem ) ) {
|
3707 |
+
return;
|
|
|
|
|
|
|
3708 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3709 |
|
3710 |
+
var ret, thisCache,
|
3711 |
+
internalKey = jQuery.expando,
|
|
|
|
|
3712 |
|
3713 |
+
// We have to handle DOM nodes and JS objects differently because IE6-7
|
3714 |
+
// can't GC object references properly across the DOM-JS boundary
|
3715 |
+
isNode = elem.nodeType,
|
|
|
|
|
3716 |
|
3717 |
+
// Only DOM nodes need the global jQuery cache; JS object data is
|
3718 |
+
// attached directly to the object so GC can occur automatically
|
3719 |
+
cache = isNode ? jQuery.cache : elem,
|
3720 |
|
3721 |
+
// Only defining an ID for JS objects if its cache already exists allows
|
3722 |
+
// the code to shortcut on the same path as a DOM node with no cache
|
3723 |
+
id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3724 |
|
3725 |
+
// Avoid doing any more work than we need to when trying to get data on an
|
3726 |
+
// object that has no data at all
|
3727 |
+
if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) {
|
3728 |
+
return;
|
3729 |
+
}
|
3730 |
|
3731 |
+
if ( !id ) {
|
3732 |
+
// Only DOM nodes need a new unique ID for each element since their data
|
3733 |
+
// ends up in the global cache
|
3734 |
+
if ( isNode ) {
|
3735 |
+
id = elem[ internalKey ] = deletedIds.pop() || jQuery.guid++;
|
3736 |
+
} else {
|
3737 |
+
id = internalKey;
|
3738 |
}
|
3739 |
+
}
|
3740 |
|
3741 |
+
if ( !cache[ id ] ) {
|
3742 |
+
// Avoid exposing jQuery metadata on plain JS objects when the object
|
3743 |
+
// is serialized using JSON.stringify
|
3744 |
+
cache[ id ] = isNode ? {} : { toJSON: jQuery.noop };
|
3745 |
+
}
|
3746 |
|
3747 |
+
// An object can be passed to jQuery.data instead of a key/value pair; this gets
|
3748 |
+
// shallow copied over onto the existing cache
|
3749 |
+
if ( typeof name === "object" || typeof name === "function" ) {
|
3750 |
+
if ( pvt ) {
|
3751 |
+
cache[ id ] = jQuery.extend( cache[ id ], name );
|
3752 |
+
} else {
|
3753 |
+
cache[ id ].data = jQuery.extend( cache[ id ].data, name );
|
3754 |
+
}
|
3755 |
+
}
|
3756 |
|
3757 |
+
thisCache = cache[ id ];
|
|
|
3758 |
|
3759 |
+
// jQuery data() is stored in a separate object inside the object's internal data
|
3760 |
+
// cache in order to avoid key collisions between internal data and user-defined
|
3761 |
+
// data.
|
3762 |
+
if ( !pvt ) {
|
3763 |
+
if ( !thisCache.data ) {
|
3764 |
+
thisCache.data = {};
|
|
|
|
|
|
|
3765 |
}
|
3766 |
|
3767 |
+
thisCache = thisCache.data;
|
3768 |
+
}
|
3769 |
|
3770 |
+
if ( data !== undefined ) {
|
3771 |
+
thisCache[ jQuery.camelCase( name ) ] = data;
|
3772 |
+
}
|
3773 |
|
3774 |
+
// Check for both converted-to-camel and non-converted data property names
|
3775 |
+
// If a data property was specified
|
3776 |
+
if ( typeof name === "string" ) {
|
|
|
|
|
|
|
|
|
3777 |
|
3778 |
+
// First Try to find as-is property data
|
3779 |
+
ret = thisCache[ name ];
|
|
|
3780 |
|
3781 |
+
// Test for null|undefined property data
|
3782 |
+
if ( ret == null ) {
|
3783 |
|
3784 |
+
// Try to find the camelCased property
|
3785 |
+
ret = thisCache[ jQuery.camelCase( name ) ];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3786 |
}
|
3787 |
+
} else {
|
3788 |
+
ret = thisCache;
|
3789 |
+
}
|
3790 |
|
3791 |
+
return ret;
|
3792 |
+
}
|
|
|
|
|
|
|
|
|
3793 |
|
3794 |
+
function internalRemoveData( elem, name, pvt ) {
|
3795 |
+
if ( !jQuery.acceptData( elem ) ) {
|
3796 |
+
return;
|
3797 |
+
}
|
|
|
3798 |
|
3799 |
+
var thisCache, i,
|
3800 |
+
isNode = elem.nodeType,
|
|
|
|
|
|
|
|
|
|
|
|
|
3801 |
|
3802 |
+
// See jQuery.data for more information
|
3803 |
+
cache = isNode ? jQuery.cache : elem,
|
3804 |
+
id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
|
|
|
|
|
3805 |
|
3806 |
+
// If there is already no cache entry for this object, there is no
|
3807 |
+
// purpose in continuing
|
3808 |
+
if ( !cache[ id ] ) {
|
3809 |
+
return;
|
3810 |
+
}
|
3811 |
|
3812 |
+
if ( name ) {
|
|
|
|
|
|
|
|
|
3813 |
|
3814 |
+
thisCache = pvt ? cache[ id ] : cache[ id ].data;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3815 |
|
3816 |
+
if ( thisCache ) {
|
|
|
3817 |
|
3818 |
+
// Support array or space separated string names for data keys
|
3819 |
+
if ( !jQuery.isArray( name ) ) {
|
|
|
3820 |
|
3821 |
+
// try the string as a key before any manipulation
|
3822 |
+
if ( name in thisCache ) {
|
3823 |
+
name = [ name ];
|
3824 |
+
} else {
|
3825 |
|
3826 |
+
// split the camel cased version by spaces unless a key with the spaces exists
|
3827 |
+
name = jQuery.camelCase( name );
|
3828 |
+
if ( name in thisCache ) {
|
3829 |
+
name = [ name ];
|
3830 |
+
} else {
|
3831 |
+
name = name.split(" ");
|
3832 |
+
}
|
3833 |
}
|
3834 |
+
} else {
|
3835 |
+
// If "name" is an array of keys...
|
3836 |
+
// When data is initially created, via ("key", "val") signature,
|
3837 |
+
// keys will be converted to camelCase.
|
3838 |
+
// Since there is no way to tell _how_ a key was added, remove
|
3839 |
+
// both plain key and camelCase key. #12786
|
3840 |
+
// This will only penalize the array argument path.
|
3841 |
+
name = name.concat( jQuery.map( name, jQuery.camelCase ) );
|
3842 |
+
}
|
3843 |
|
3844 |
+
i = name.length;
|
3845 |
+
while ( i-- ) {
|
3846 |
+
delete thisCache[ name[i] ];
|
3847 |
+
}
|
3848 |
|
3849 |
+
// If there is no data left in the cache, we want to continue
|
3850 |
+
// and let the cache object itself get destroyed
|
3851 |
+
if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) {
|
3852 |
+
return;
|
|
|
3853 |
}
|
3854 |
+
}
|
3855 |
+
}
|
3856 |
+
|
3857 |
+
// See jQuery.data for more information
|
3858 |
+
if ( !pvt ) {
|
3859 |
+
delete cache[ id ].data;
|
3860 |
|
3861 |
+
// Don't destroy the parent cache unless the internal data object
|
3862 |
+
// had been the only thing left in it
|
3863 |
+
if ( !isEmptyDataObject( cache[ id ] ) ) {
|
3864 |
return;
|
3865 |
}
|
3866 |
+
}
|
3867 |
|
3868 |
+
// Destroy the cache
|
3869 |
+
if ( isNode ) {
|
3870 |
+
jQuery.cleanData( [ elem ], true );
|
3871 |
|
3872 |
+
// Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
|
3873 |
+
/* jshint eqeqeq: false */
|
3874 |
+
} else if ( support.deleteExpando || cache != cache.window ) {
|
3875 |
+
/* jshint eqeqeq: true */
|
3876 |
+
delete cache[ id ];
|
3877 |
|
3878 |
+
// When all else fails, null
|
3879 |
+
} else {
|
3880 |
+
cache[ id ] = null;
|
3881 |
+
}
|
3882 |
+
}
|
3883 |
|
3884 |
+
jQuery.extend({
|
3885 |
+
cache: {},
|
|
|
|
|
|
|
3886 |
|
3887 |
+
// The following elements (space-suffixed to avoid Object.prototype collisions)
|
3888 |
+
// throw uncatchable exceptions if you attempt to set expando properties
|
3889 |
+
noData: {
|
3890 |
+
"applet ": true,
|
3891 |
+
"embed ": true,
|
3892 |
+
// ...but Flash objects (which have this classid) *can* handle expandos
|
3893 |
+
"object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
|
3894 |
+
},
|
|
|
|
|
3895 |
|
3896 |
+
hasData: function( elem ) {
|
3897 |
+
elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
|
3898 |
+
return !!elem && !isEmptyDataObject( elem );
|
3899 |
+
},
|
3900 |
|
3901 |
+
data: function( elem, name, data ) {
|
3902 |
+
return internalData( elem, name, data );
|
3903 |
+
},
|
3904 |
+
|
3905 |
+
removeData: function( elem, name ) {
|
3906 |
+
return internalRemoveData( elem, name );
|
3907 |
+
},
|
3908 |
+
|
3909 |
+
// For internal use only.
|
3910 |
+
_data: function( elem, name, data ) {
|
3911 |
+
return internalData( elem, name, data, true );
|
3912 |
+
},
|
3913 |
+
|
3914 |
+
_removeData: function( elem, name ) {
|
3915 |
+
return internalRemoveData( elem, name, true );
|
3916 |
}
|
3917 |
});
|
3918 |
|
3919 |
+
jQuery.fn.extend({
|
3920 |
+
data: function( key, value ) {
|
3921 |
+
var i, name, data,
|
3922 |
+
elem = this[0],
|
3923 |
+
attrs = elem && elem.attributes;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3924 |
|
3925 |
+
// Special expections of .data basically thwart jQuery.access,
|
3926 |
+
// so implement the relevant behavior ourselves
|
|
|
3927 |
|
3928 |
+
// Gets all values
|
3929 |
+
if ( key === undefined ) {
|
3930 |
+
if ( this.length ) {
|
3931 |
+
data = jQuery.data( elem );
|
|
|
3932 |
|
3933 |
+
if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
|
3934 |
+
i = attrs.length;
|
3935 |
+
while ( i-- ) {
|
3936 |
|
3937 |
+
// Support: IE11+
|
3938 |
+
// The attrs elements can be null (#14894)
|
3939 |
+
if ( attrs[ i ] ) {
|
3940 |
+
name = attrs[ i ].name;
|
3941 |
+
if ( name.indexOf( "data-" ) === 0 ) {
|
3942 |
+
name = jQuery.camelCase( name.slice(5) );
|
3943 |
+
dataAttr( elem, name, data[ name ] );
|
3944 |
+
}
|
3945 |
}
|
|
|
|
|
|
|
3946 |
}
|
3947 |
+
jQuery._data( elem, "parsedAttrs", true );
|
3948 |
}
|
3949 |
+
}
|
3950 |
|
3951 |
+
return data;
|
3952 |
+
}
|
3953 |
+
|
3954 |
+
// Sets multiple values
|
3955 |
+
if ( typeof key === "object" ) {
|
3956 |
+
return this.each(function() {
|
3957 |
+
jQuery.data( this, key );
|
3958 |
+
});
|
3959 |
+
}
|
3960 |
+
|
3961 |
+
return arguments.length > 1 ?
|
3962 |
+
|
3963 |
+
// Sets one value
|
3964 |
+
this.each(function() {
|
3965 |
+
jQuery.data( this, key, value );
|
3966 |
+
}) :
|
3967 |
+
|
3968 |
+
// Gets one value
|
3969 |
+
// Try to fetch any internally stored data first
|
3970 |
+
elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined;
|
3971 |
+
},
|
3972 |
+
|
3973 |
+
removeData: function( key ) {
|
3974 |
+
return this.each(function() {
|
3975 |
+
jQuery.removeData( this, key );
|
3976 |
+
});
|
3977 |
+
}
|
3978 |
+
});
|
3979 |
|
|
|
|
|
3980 |
|
3981 |
+
jQuery.extend({
|
3982 |
+
queue: function( elem, type, data ) {
|
3983 |
+
var queue;
|
3984 |
|
3985 |
+
if ( elem ) {
|
3986 |
+
type = ( type || "fx" ) + "queue";
|
3987 |
+
queue = jQuery._data( elem, type );
|
3988 |
+
|
3989 |
+
// Speed up dequeue by getting out quickly if this is just a lookup
|
3990 |
+
if ( data ) {
|
3991 |
+
if ( !queue || jQuery.isArray(data) ) {
|
3992 |
+
queue = jQuery._data( elem, type, jQuery.makeArray(data) );
|
3993 |
+
} else {
|
3994 |
+
queue.push( data );
|
3995 |
}
|
|
|
3996 |
}
|
3997 |
+
return queue || [];
|
3998 |
}
|
3999 |
},
|
4000 |
|
4001 |
+
dequeue: function( elem, type ) {
|
4002 |
+
type = type || "fx";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4003 |
|
4004 |
+
var queue = jQuery.queue( elem, type ),
|
4005 |
+
startLength = queue.length,
|
4006 |
+
fn = queue.shift(),
|
4007 |
+
hooks = jQuery._queueHooks( elem, type ),
|
4008 |
+
next = function() {
|
4009 |
+
jQuery.dequeue( elem, type );
|
4010 |
+
};
|
4011 |
|
4012 |
+
// If the fx queue is dequeued, always remove the progress sentinel
|
4013 |
+
if ( fn === "inprogress" ) {
|
4014 |
+
fn = queue.shift();
|
4015 |
+
startLength--;
|
|
|
4016 |
}
|
4017 |
|
4018 |
+
if ( fn ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4019 |
|
4020 |
+
// Add a progress sentinel to prevent the fx queue from being
|
4021 |
+
// automatically dequeued
|
4022 |
+
if ( type === "fx" ) {
|
4023 |
+
queue.unshift( "inprogress" );
|
4024 |
}
|
4025 |
|
4026 |
+
// clear up the last queue stop function
|
4027 |
+
delete hooks.stop;
|
4028 |
+
fn.call( elem, next, hooks );
|
4029 |
+
}
|
|
|
|
|
4030 |
|
4031 |
+
if ( !startLength && hooks ) {
|
4032 |
+
hooks.empty.fire();
|
|
|
|
|
4033 |
}
|
4034 |
},
|
4035 |
|
4036 |
+
// not intended for public consumption - generates a queueHooks object, or returns the current one
|
4037 |
+
_queueHooks: function( elem, type ) {
|
4038 |
+
var key = type + "queueHooks";
|
4039 |
+
return jQuery._data( elem, key ) || jQuery._data( elem, key, {
|
4040 |
+
empty: jQuery.Callbacks("once memory").add(function() {
|
4041 |
+
jQuery._removeData( elem, type + "queue" );
|
4042 |
+
jQuery._removeData( elem, key );
|
4043 |
+
})
|
4044 |
+
});
|
4045 |
+
}
|
4046 |
+
});
|
4047 |
|
4048 |
+
jQuery.fn.extend({
|
4049 |
+
queue: function( type, data ) {
|
4050 |
+
var setter = 2;
|
4051 |
|
4052 |
+
if ( typeof type !== "string" ) {
|
4053 |
+
data = type;
|
4054 |
+
type = "fx";
|
4055 |
+
setter--;
|
4056 |
+
}
|
4057 |
|
4058 |
+
if ( arguments.length < setter ) {
|
4059 |
+
return jQuery.queue( this[0], type );
|
4060 |
+
}
|
4061 |
|
4062 |
+
return data === undefined ?
|
4063 |
+
this :
|
4064 |
+
this.each(function() {
|
4065 |
+
var queue = jQuery.queue( this, type, data );
|
4066 |
|
4067 |
+
// ensure a hooks for this queue
|
4068 |
+
jQuery._queueHooks( this, type );
|
|
|
|
|
|
|
|
|
4069 |
|
4070 |
+
if ( type === "fx" && queue[0] !== "inprogress" ) {
|
4071 |
+
jQuery.dequeue( this, type );
|
|
|
|
|
4072 |
}
|
4073 |
+
});
|
|
|
4074 |
},
|
4075 |
+
dequeue: function( type ) {
|
4076 |
+
return this.each(function() {
|
4077 |
+
jQuery.dequeue( this, type );
|
4078 |
+
});
|
4079 |
+
},
|
4080 |
+
clearQueue: function( type ) {
|
4081 |
+
return this.queue( type || "fx", [] );
|
4082 |
+
},
|
4083 |
+
// Get a promise resolved when queues of a certain type
|
4084 |
+
// are emptied (fx is the type by default)
|
4085 |
+
promise: function( type, obj ) {
|
4086 |
+
var tmp,
|
4087 |
+
count = 1,
|
4088 |
+
defer = jQuery.Deferred(),
|
4089 |
+
elements = this,
|
4090 |
+
i = this.length,
|
4091 |
+
resolve = function() {
|
4092 |
+
if ( !( --count ) ) {
|
4093 |
+
defer.resolveWith( elements, [ elements ] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4094 |
}
|
4095 |
+
};
|
4096 |
+
|
4097 |
+
if ( typeof type !== "string" ) {
|
4098 |
+
obj = type;
|
4099 |
+
type = undefined;
|
4100 |
+
}
|
4101 |
+
type = type || "fx";
|
4102 |
+
|
4103 |
+
while ( i-- ) {
|
4104 |
+
tmp = jQuery._data( elements[ i ], type + "queueHooks" );
|
4105 |
+
if ( tmp && tmp.empty ) {
|
4106 |
+
count++;
|
4107 |
+
tmp.empty.add( resolve );
|
4108 |
}
|
4109 |
}
|
4110 |
+
resolve();
|
4111 |
+
return defer.promise( obj );
|
4112 |
+
}
|
4113 |
+
});
|
4114 |
+
var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source;
|
4115 |
|
4116 |
+
var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4117 |
|
4118 |
+
var isHidden = function( elem, el ) {
|
4119 |
+
// isHidden might be called from jQuery#filter function;
|
4120 |
+
// in that case, element will be second argument
|
4121 |
+
elem = el || elem;
|
4122 |
+
return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
|
4123 |
+
};
|
4124 |
|
|
|
|
|
|
|
|
|
4125 |
|
|
|
4126 |
|
4127 |
+
// Multifunctional method to get and set values of a collection
|
4128 |
+
// The value/s can optionally be executed if it's a function
|
4129 |
+
var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
|
4130 |
+
var i = 0,
|
4131 |
+
length = elems.length,
|
4132 |
+
bulk = key == null;
|
4133 |
+
|
4134 |
+
// Sets many values
|
4135 |
+
if ( jQuery.type( key ) === "object" ) {
|
4136 |
+
chainable = true;
|
4137 |
+
for ( i in key ) {
|
4138 |
+
jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
|
4139 |
}
|
4140 |
|
4141 |
+
// Sets one value
|
4142 |
+
} else if ( value !== undefined ) {
|
4143 |
+
chainable = true;
|
4144 |
|
4145 |
+
if ( !jQuery.isFunction( value ) ) {
|
4146 |
+
raw = true;
|
4147 |
+
}
|
4148 |
|
4149 |
+
if ( bulk ) {
|
4150 |
+
// Bulk operations run against the entire set
|
4151 |
+
if ( raw ) {
|
4152 |
+
fn.call( elems, value );
|
4153 |
+
fn = null;
|
4154 |
|
4155 |
+
// ...except when executing function values
|
4156 |
} else {
|
4157 |
+
bulk = fn;
|
4158 |
+
fn = function( elem, key, value ) {
|
4159 |
+
return bulk.call( jQuery( elem ), value );
|
4160 |
+
};
|
4161 |
}
|
4162 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4163 |
|
4164 |
+
if ( fn ) {
|
4165 |
+
for ( ; i < length; i++ ) {
|
4166 |
+
fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
|
|
|
|
|
4167 |
}
|
4168 |
}
|
4169 |
}
|
|
|
4170 |
|
4171 |
+
return chainable ?
|
4172 |
+
elems :
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4173 |
|
4174 |
+
// Gets
|
4175 |
+
bulk ?
|
4176 |
+
fn.call( elems ) :
|
4177 |
+
length ? fn( elems[0], key ) : emptyGet;
|
4178 |
};
|
4179 |
+
var rcheckableType = (/^(?:checkbox|radio)$/i);
|
4180 |
|
|
|
|
|
4181 |
|
|
|
|
|
|
|
|
|
|
|
4182 |
|
4183 |
+
(function() {
|
4184 |
+
// Minified: var a,b,c
|
4185 |
+
var input = document.createElement( "input" ),
|
4186 |
+
div = document.createElement( "div" ),
|
4187 |
+
fragment = document.createDocumentFragment();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4188 |
|
4189 |
+
// Setup
|
4190 |
+
div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
|
4191 |
+
|
4192 |
+
// IE strips leading whitespace when .innerHTML is used
|
4193 |
+
support.leadingWhitespace = div.firstChild.nodeType === 3;
|
4194 |
+
|
4195 |
+
// Make sure that tbody elements aren't automatically inserted
|
4196 |
+
// IE will insert them into empty tables
|
4197 |
+
support.tbody = !div.getElementsByTagName( "tbody" ).length;
|
4198 |
+
|
4199 |
+
// Make sure that link elements get serialized correctly by innerHTML
|
4200 |
+
// This requires a wrapper element in IE
|
4201 |
+
support.htmlSerialize = !!div.getElementsByTagName( "link" ).length;
|
4202 |
+
|
4203 |
+
// Makes sure cloning an html5 element does not cause problems
|
4204 |
+
// Where outerHTML is undefined, this still works
|
4205 |
+
support.html5Clone =
|
4206 |
+
document.createElement( "nav" ).cloneNode( true ).outerHTML !== "<:nav></:nav>";
|
4207 |
+
|
4208 |
+
// Check if a disconnected checkbox will retain its checked
|
4209 |
+
// value of true after appended to the DOM (IE6/7)
|
4210 |
+
input.type = "checkbox";
|
4211 |
+
input.checked = true;
|
4212 |
+
fragment.appendChild( input );
|
4213 |
+
support.appendChecked = input.checked;
|
4214 |
|
4215 |
+
// Make sure textarea (and checkbox) defaultValue is properly cloned
|
4216 |
+
// Support: IE6-IE11+
|
4217 |
+
div.innerHTML = "<textarea>x</textarea>";
|
4218 |
+
support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
|
4219 |
+
|
4220 |
+
// #11217 - WebKit loses check when the name is after the checked attribute
|
4221 |
+
fragment.appendChild( div );
|
4222 |
+
div.innerHTML = "<input type='radio' checked='checked' name='t'/>";
|
|
|
|
|
|
|
|
|
4223 |
|
4224 |
+
// Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3
|
4225 |
+
// old WebKit doesn't clone checked state correctly in fragments
|
4226 |
+
support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
|
4227 |
|
4228 |
+
// Support: IE<9
|
4229 |
+
// Opera does not clone events (and typeof div.attachEvent === undefined).
|
4230 |
+
// IE9-10 clones events bound via attachEvent, but they don't trigger with .click()
|
4231 |
+
support.noCloneEvent = true;
|
4232 |
+
if ( div.attachEvent ) {
|
4233 |
+
div.attachEvent( "onclick", function() {
|
4234 |
+
support.noCloneEvent = false;
|
|
|
4235 |
});
|
|
|
|
|
4236 |
|
4237 |
+
div.cloneNode( true ).click();
|
4238 |
+
}
|
4239 |
+
|
4240 |
+
// Execute the test only if not already executed in another module.
|
4241 |
+
if (support.deleteExpando == null) {
|
4242 |
+
// Support: IE<9
|
4243 |
+
support.deleteExpando = true;
|
4244 |
+
try {
|
4245 |
+
delete div.test;
|
4246 |
+
} catch( e ) {
|
4247 |
+
support.deleteExpando = false;
|
4248 |
}
|
4249 |
+
}
|
4250 |
+
})();
|
4251 |
|
|
|
|
|
|
|
|
|
|
|
|
|
4252 |
|
4253 |
+
(function() {
|
4254 |
+
var i, eventName,
|
4255 |
+
div = document.createElement( "div" );
|
4256 |
|
4257 |
+
// Support: IE<9 (lack submit/change bubble), Firefox 23+ (lack focusin event)
|
4258 |
+
for ( i in { submit: true, change: true, focusin: true }) {
|
4259 |
+
eventName = "on" + i;
|
4260 |
+
|
4261 |
+
if ( !(support[ i + "Bubbles" ] = eventName in window) ) {
|
4262 |
+
// Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)
|
4263 |
+
div.setAttribute( eventName, "t" );
|
4264 |
+
support[ i + "Bubbles" ] = div.attributes[ eventName ].expando === false;
|
4265 |
}
|
4266 |
+
}
|
4267 |
+
|
4268 |
+
// Null elements to avoid leaks in IE.
|
4269 |
+
div = null;
|
4270 |
+
})();
|
4271 |
+
|
4272 |
+
|
4273 |
+
var rformElems = /^(?:input|select|textarea)$/i,
|
4274 |
+
rkeyEvent = /^key/,
|
4275 |
+
rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/,
|
4276 |
+
rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
|
4277 |
+
rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
|
4278 |
+
|
4279 |
+
function returnTrue() {
|
4280 |
+
return true;
|
4281 |
}
|
4282 |
|
4283 |
+
function returnFalse() {
|
4284 |
+
return false;
|
|
|
4285 |
}
|
4286 |
|
4287 |
+
function safeActiveElement() {
|
4288 |
+
try {
|
4289 |
+
return document.activeElement;
|
4290 |
+
} catch ( err ) { }
|
|
|
|
|
|
|
|
|
|
|
|
|
4291 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4292 |
|
4293 |
/*
|
4294 |
* Helper functions for managing events -- not part of the public interface.
|
4296 |
*/
|
4297 |
jQuery.event = {
|
4298 |
|
4299 |
+
global: {},
|
4300 |
|
4301 |
+
add: function( elem, types, handler, data, selector ) {
|
4302 |
+
var tmp, events, t, handleObjIn,
|
4303 |
+
special, eventHandle, handleObj,
|
4304 |
+
handlers, type, namespaces, origType,
|
4305 |
+
elemData = jQuery._data( elem );
|
4306 |
|
4307 |
+
// Don't attach events to noData or text/comment nodes (but allow plain objects)
|
4308 |
+
if ( !elemData ) {
|
4309 |
return;
|
4310 |
}
|
4311 |
|
4322 |
}
|
4323 |
|
4324 |
// Init the element's event structure and main handler, if this is the first
|
4325 |
+
if ( !(events = elemData.events) ) {
|
4326 |
+
events = elemData.events = {};
|
|
|
4327 |
}
|
4328 |
+
if ( !(eventHandle = elemData.handle) ) {
|
4329 |
+
eventHandle = elemData.handle = function( e ) {
|
|
|
4330 |
// Discard the second event of a jQuery.event.trigger() and
|
4331 |
// when an event is called after a page has unloaded
|
4332 |
+
return typeof jQuery !== strundefined && (!e || jQuery.event.triggered !== e.type) ?
|
4333 |
jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
|
4334 |
undefined;
|
4335 |
};
|
4338 |
}
|
4339 |
|
4340 |
// Handle multiple events separated by a space
|
4341 |
+
types = ( types || "" ).match( rnotwhite ) || [ "" ];
|
4342 |
+
t = types.length;
|
4343 |
+
while ( t-- ) {
|
4344 |
+
tmp = rtypenamespace.exec( types[t] ) || [];
|
4345 |
+
type = origType = tmp[1];
|
4346 |
+
namespaces = ( tmp[2] || "" ).split( "." ).sort();
|
4347 |
+
|
4348 |
+
// There *must* be a type, no attaching namespace-only handlers
|
4349 |
+
if ( !type ) {
|
4350 |
+
continue;
|
4351 |
+
}
|
4352 |
|
4353 |
// If event changes its type, use the special event handlers for the changed type
|
4354 |
special = jQuery.event.special[ type ] || {};
|
4362 |
// handleObj is passed to all event handlers
|
4363 |
handleObj = jQuery.extend({
|
4364 |
type: type,
|
4365 |
+
origType: origType,
|
4366 |
data: data,
|
4367 |
handler: handler,
|
4368 |
guid: handler.guid,
|
4372 |
}, handleObjIn );
|
4373 |
|
4374 |
// Init the event handler queue if we're the first
|
4375 |
+
if ( !(handlers = events[ type ]) ) {
|
|
|
4376 |
handlers = events[ type ] = [];
|
4377 |
handlers.delegateCount = 0;
|
4378 |
|
4411 |
elem = null;
|
4412 |
},
|
4413 |
|
|
|
|
|
4414 |
// Detach an event or set of events from an element
|
4415 |
remove: function( elem, types, handler, selector, mappedTypes ) {
|
4416 |
+
var j, handleObj, tmp,
|
4417 |
+
origCount, t, events,
|
4418 |
+
special, handlers, type,
|
4419 |
+
namespaces, origType,
|
4420 |
elemData = jQuery.hasData( elem ) && jQuery._data( elem );
|
4421 |
|
4422 |
if ( !elemData || !(events = elemData.events) ) {
|
4424 |
}
|
4425 |
|
4426 |
// Once for each type.namespace in types; type may be omitted
|
4427 |
+
types = ( types || "" ).match( rnotwhite ) || [ "" ];
|
4428 |
+
t = types.length;
|
4429 |
+
while ( t-- ) {
|
4430 |
+
tmp = rtypenamespace.exec( types[t] ) || [];
|
4431 |
+
type = origType = tmp[1];
|
4432 |
+
namespaces = ( tmp[2] || "" ).split( "." ).sort();
|
4433 |
|
4434 |
// Unbind all events (on this namespace, if provided) for the element
|
4435 |
if ( !type ) {
|
4440 |
}
|
4441 |
|
4442 |
special = jQuery.event.special[ type ] || {};
|
4443 |
+
type = ( selector ? special.delegateType : special.bindType ) || type;
|
4444 |
+
handlers = events[ type ] || [];
|
4445 |
+
tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );
|
|
|
4446 |
|
4447 |
// Remove matching events
|
4448 |
+
origCount = j = handlers.length;
|
4449 |
+
while ( j-- ) {
|
4450 |
+
handleObj = handlers[ j ];
|
4451 |
|
4452 |
if ( ( mappedTypes || origType === handleObj.origType ) &&
|
4453 |
+
( !handler || handler.guid === handleObj.guid ) &&
|
4454 |
+
( !tmp || tmp.test( handleObj.namespace ) ) &&
|
4455 |
+
( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
|
4456 |
+
handlers.splice( j, 1 );
|
4457 |
|
4458 |
if ( handleObj.selector ) {
|
4459 |
+
handlers.delegateCount--;
|
4460 |
}
|
4461 |
if ( special.remove ) {
|
4462 |
special.remove.call( elem, handleObj );
|
4466 |
|
4467 |
// Remove generic event handler if we removed something and no more handlers exist
|
4468 |
// (avoids potential for endless recursion during removal of special event handlers)
|
4469 |
+
if ( origCount && !handlers.length ) {
|
4470 |
if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
|
4471 |
jQuery.removeEvent( elem, type, elemData.handle );
|
4472 |
}
|
4481 |
|
4482 |
// removeData also checks for emptiness and clears the expando if empty
|
4483 |
// so use it instead of delete
|
4484 |
+
jQuery._removeData( elem, "events" );
|
4485 |
}
|
4486 |
},
|
4487 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4488 |
trigger: function( event, data, elem, onlyHandlers ) {
|
4489 |
+
var handle, ontype, cur,
|
4490 |
+
bubbleType, special, tmp, i,
|
4491 |
+
eventPath = [ elem || document ],
|
4492 |
+
type = hasOwn.call( event, "type" ) ? event.type : event,
|
4493 |
+
namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];
|
4494 |
+
|
4495 |
+
cur = tmp = elem = elem || document;
|
4496 |
+
|
4497 |
// Don't do events on text and comment nodes
|
4498 |
+
if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
|
4499 |
return;
|
4500 |
}
|
4501 |
|
|
|
|
|
|
|
|
|
|
|
4502 |
// focus/blur morphs to focusin/out; ensure we're not firing them right now
|
4503 |
if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
|
4504 |
return;
|
4505 |
}
|
4506 |
|
4507 |
+
if ( type.indexOf(".") >= 0 ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
4508 |
// Namespaced trigger; create a regexp to match event type in handle()
|
4509 |
namespaces = type.split(".");
|
4510 |
type = namespaces.shift();
|
4511 |
namespaces.sort();
|
4512 |
}
|
4513 |
+
ontype = type.indexOf(":") < 0 && "on" + type;
|
4514 |
|
4515 |
+
// Caller can pass in a jQuery.Event object, Object, or just an event type string
|
4516 |
+
event = event[ jQuery.expando ] ?
|
4517 |
+
event :
|
4518 |
+
new jQuery.Event( type, typeof event === "object" && event );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4519 |
|
4520 |
+
// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
|
4521 |
+
event.isTrigger = onlyHandlers ? 2 : 3;
|
4522 |
+
event.namespace = namespaces.join(".");
|
4523 |
+
event.namespace_re = event.namespace ?
|
4524 |
+
new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
|
4525 |
+
null;
|
|
|
|
|
|
|
4526 |
|
4527 |
// Clean up the event in case it is being reused
|
4528 |
event.result = undefined;
|
4531 |
}
|
4532 |
|
4533 |
// Clone any incoming data and prepend the event, creating the handler arg list
|
4534 |
+
data = data == null ?
|
4535 |
+
[ event ] :
|
4536 |
+
jQuery.makeArray( data, [ event ] );
|
4537 |
|
4538 |
// Allow special events to draw outside the lines
|
4539 |
special = jQuery.event.special[ type ] || {};
|
4540 |
+
if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
|
4541 |
return;
|
4542 |
}
|
4543 |
|
4544 |
// Determine event propagation path in advance, per W3C events spec (#9951)
|
4545 |
// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
|
|
|
4546 |
if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
|
4547 |
|
4548 |
bubbleType = special.delegateType || type;
|
4549 |
+
if ( !rfocusMorph.test( bubbleType + type ) ) {
|
4550 |
+
cur = cur.parentNode;
|
4551 |
+
}
|
4552 |
+
for ( ; cur; cur = cur.parentNode ) {
|
4553 |
+
eventPath.push( cur );
|
4554 |
+
tmp = cur;
|
4555 |
}
|
4556 |
|
4557 |
// Only add window if we got to document (e.g., not plain obj or detached DOM)
|
4558 |
+
if ( tmp === (elem.ownerDocument || document) ) {
|
4559 |
+
eventPath.push( tmp.defaultView || tmp.parentWindow || window );
|
4560 |
}
|
4561 |
}
|
4562 |
|
4563 |
// Fire handlers on the event path
|
4564 |
+
i = 0;
|
4565 |
+
while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
|
4566 |
|
4567 |
+
event.type = i > 1 ?
|
4568 |
+
bubbleType :
|
4569 |
+
special.bindType || type;
|
4570 |
|
4571 |
+
// jQuery handler
|
4572 |
handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
|
4573 |
if ( handle ) {
|
4574 |
handle.apply( cur, data );
|
4575 |
}
|
4576 |
+
|
4577 |
+
// Native handler
|
4578 |
handle = ontype && cur[ ontype ];
|
4579 |
+
if ( handle && handle.apply && jQuery.acceptData( cur ) ) {
|
4580 |
+
event.result = handle.apply( cur, data );
|
4581 |
+
if ( event.result === false ) {
|
4582 |
+
event.preventDefault();
|
4583 |
+
}
|
4584 |
}
|
4585 |
}
|
4586 |
event.type = type;
|
4588 |
// If nobody prevented the default action, do it now
|
4589 |
if ( !onlyHandlers && !event.isDefaultPrevented() ) {
|
4590 |
|
4591 |
+
if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&
|
4592 |
+
jQuery.acceptData( elem ) ) {
|
4593 |
|
4594 |
// Call a native DOM method on the target with the same name name as the event.
|
4595 |
// Can't use an .isFunction() check here because IE6/7 fails that test.
|
4596 |
// Don't do default actions on window, that's where global variables be (#6170)
|
4597 |
+
if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {
|
|
|
4598 |
|
4599 |
// Don't re-trigger an onFOO event when we call its FOO() method
|
4600 |
+
tmp = elem[ ontype ];
|
4601 |
|
4602 |
+
if ( tmp ) {
|
4603 |
elem[ ontype ] = null;
|
4604 |
}
|
4605 |
|
4606 |
// Prevent re-triggering of the same event, since we already bubbled it above
|
4607 |
jQuery.event.triggered = type;
|
4608 |
+
try {
|
4609 |
+
elem[ type ]();
|
4610 |
+
} catch ( e ) {
|
4611 |
+
// IE<9 dies on focus/blur to hidden element (#1486,#12518)
|
4612 |
+
// only reproducible on winXP IE8 native, not IE9 in IE8 mode
|
4613 |
+
}
|
4614 |
jQuery.event.triggered = undefined;
|
4615 |
|
4616 |
+
if ( tmp ) {
|
4617 |
+
elem[ ontype ] = tmp;
|
4618 |
}
|
4619 |
}
|
4620 |
}
|
4626 |
dispatch: function( event ) {
|
4627 |
|
4628 |
// Make a writable jQuery.Event from the native event object
|
4629 |
+
event = jQuery.event.fix( event );
|
4630 |
|
4631 |
+
var i, ret, handleObj, matched, j,
|
4632 |
+
handlerQueue = [],
|
4633 |
+
args = slice.call( arguments ),
|
4634 |
+
handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [],
|
4635 |
+
special = jQuery.event.special[ event.type ] || {};
|
|
|
|
|
4636 |
|
4637 |
// Use the fix-ed jQuery.Event rather than the (read-only) native event
|
4638 |
args[0] = event;
|
4643 |
return;
|
4644 |
}
|
4645 |
|
4646 |
+
// Determine handlers
|
4647 |
+
handlerQueue = jQuery.event.handlers.call( this, event, handlers );
|
4648 |
+
|
4649 |
+
// Run delegates first; they may want to stop propagation beneath us
|
4650 |
+
i = 0;
|
4651 |
+
while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
|
4652 |
+
event.currentTarget = matched.elem;
|
4653 |
+
|
4654 |
+
j = 0;
|
4655 |
+
while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
|
4656 |
+
|
4657 |
+
// Triggered event must either 1) have no namespace, or
|
4658 |
+
// 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
|
4659 |
+
if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
|
4660 |
+
|
4661 |
+
event.handleObj = handleObj;
|
4662 |
+
event.data = handleObj.data;
|
4663 |
+
|
4664 |
+
ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
|
4665 |
+
.apply( matched.elem, args );
|
4666 |
+
|
4667 |
+
if ( ret !== undefined ) {
|
4668 |
+
if ( (event.result = ret) === false ) {
|
4669 |
+
event.preventDefault();
|
4670 |
+
event.stopPropagation();
|
4671 |
+
}
|
4672 |
+
}
|
4673 |
+
}
|
4674 |
+
}
|
4675 |
+
}
|
4676 |
+
|
4677 |
+
// Call the postDispatch hook for the mapped type
|
4678 |
+
if ( special.postDispatch ) {
|
4679 |
+
special.postDispatch.call( this, event );
|
4680 |
+
}
|
4681 |
+
|
4682 |
+
return event.result;
|
4683 |
+
},
|
4684 |
+
|
4685 |
+
handlers: function( event, handlers ) {
|
4686 |
+
var sel, handleObj, matches, i,
|
4687 |
+
handlerQueue = [],
|
4688 |
+
delegateCount = handlers.delegateCount,
|
4689 |
+
cur = event.target;
|
4690 |
+
|
4691 |
+
// Find delegate handlers
|
4692 |
+
// Black-hole SVG <use> instance trees (#13180)
|
4693 |
// Avoid non-left-click bubbling in Firefox (#3861)
|
4694 |
+
if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
|
4695 |
|
4696 |
+
/* jshint eqeqeq: false */
|
4697 |
+
for ( ; cur != this; cur = cur.parentNode || this ) {
|
4698 |
+
/* jshint eqeqeq: true */
|
4699 |
|
4700 |
+
// Don't check non-elements (#13208)
|
4701 |
+
// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
|
4702 |
+
if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) {
|
4703 |
matches = [];
|
4704 |
for ( i = 0; i < delegateCount; i++ ) {
|
4705 |
handleObj = handlers[ i ];
|
|
|
4706 |
|
4707 |
+
// Don't conflict with Object.prototype properties (#13203)
|
4708 |
+
sel = handleObj.selector + " ";
|
4709 |
+
|
4710 |
+
if ( matches[ sel ] === undefined ) {
|
4711 |
+
matches[ sel ] = handleObj.needsContext ?
|
4712 |
jQuery( sel, this ).index( cur ) >= 0 :
|
4713 |
jQuery.find( sel, this, null, [ cur ] ).length;
|
4714 |
}
|
4715 |
+
if ( matches[ sel ] ) {
|
4716 |
matches.push( handleObj );
|
4717 |
}
|
4718 |
}
|
4719 |
if ( matches.length ) {
|
4720 |
+
handlerQueue.push({ elem: cur, handlers: matches });
|
4721 |
}
|
4722 |
}
|
4723 |
}
|
4724 |
}
|
4725 |
|
4726 |
// Add the remaining (directly-bound) handlers
|
4727 |
+
if ( delegateCount < handlers.length ) {
|
4728 |
+
handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });
|
4729 |
}
|
4730 |
|
4731 |
+
return handlerQueue;
|
4732 |
+
},
|
|
|
|
|
4733 |
|
4734 |
+
fix: function( event ) {
|
4735 |
+
if ( event[ jQuery.expando ] ) {
|
4736 |
+
return event;
|
4737 |
+
}
|
4738 |
|
4739 |
+
// Create a writable copy of the event object and normalize some properties
|
4740 |
+
var i, prop, copy,
|
4741 |
+
type = event.type,
|
4742 |
+
originalEvent = event,
|
4743 |
+
fixHook = this.fixHooks[ type ];
|
4744 |
|
4745 |
+
if ( !fixHook ) {
|
4746 |
+
this.fixHooks[ type ] = fixHook =
|
4747 |
+
rmouseEvent.test( type ) ? this.mouseHooks :
|
4748 |
+
rkeyEvent.test( type ) ? this.keyHooks :
|
4749 |
+
{};
|
4750 |
+
}
|
4751 |
+
copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
|
4752 |
|
4753 |
+
event = new jQuery.Event( originalEvent );
|
|
|
4754 |
|
4755 |
+
i = copy.length;
|
4756 |
+
while ( i-- ) {
|
4757 |
+
prop = copy[ i ];
|
4758 |
+
event[ prop ] = originalEvent[ prop ];
|
|
|
|
|
|
|
|
|
|
|
4759 |
}
|
4760 |
|
4761 |
+
// Support: IE<9
|
4762 |
+
// Fix target property (#1925)
|
4763 |
+
if ( !event.target ) {
|
4764 |
+
event.target = originalEvent.srcElement || document;
|
4765 |
}
|
4766 |
|
4767 |
+
// Support: Chrome 23+, Safari?
|
4768 |
+
// Target should not be a text node (#504, #13143)
|
4769 |
+
if ( event.target.nodeType === 3 ) {
|
4770 |
+
event.target = event.target.parentNode;
|
4771 |
+
}
|
4772 |
+
|
4773 |
+
// Support: IE<9
|
4774 |
+
// For mouse/key events, metaKey==false if it's undefined (#3368, #11328)
|
4775 |
+
event.metaKey = !!event.metaKey;
|
4776 |
+
|
4777 |
+
return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
|
4778 |
},
|
4779 |
|
4780 |
// Includes some event props shared by KeyEvent and MouseEvent
|
4781 |
+
props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
|
|
|
4782 |
|
4783 |
fixHooks: {},
|
4784 |
|
4798 |
mouseHooks: {
|
4799 |
props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
|
4800 |
filter: function( event, original ) {
|
4801 |
+
var body, eventDoc, doc,
|
4802 |
button = original.button,
|
4803 |
fromElement = original.fromElement;
|
4804 |
|
4827 |
}
|
4828 |
},
|
4829 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4830 |
special: {
|
4831 |
load: {
|
4832 |
// Prevent triggered image.load events from bubbling to window.load
|
4833 |
noBubble: true
|
4834 |
},
|
|
|
4835 |
focus: {
|
4836 |
+
// Fire native event if possible so blur/focus sequence is correct
|
4837 |
+
trigger: function() {
|
4838 |
+
if ( this !== safeActiveElement() && this.focus ) {
|
4839 |
+
try {
|
4840 |
+
this.focus();
|
4841 |
+
return false;
|
4842 |
+
} catch ( e ) {
|
4843 |
+
// Support: IE<9
|
4844 |
+
// If we error on focus to hidden element (#1486, #12518),
|
4845 |
+
// let .trigger() run the handlers
|
4846 |
+
}
|
4847 |
+
}
|
4848 |
+
},
|
4849 |
delegateType: "focusin"
|
4850 |
},
|
4851 |
blur: {
|
4852 |
+
trigger: function() {
|
4853 |
+
if ( this === safeActiveElement() && this.blur ) {
|
4854 |
+
this.blur();
|
4855 |
+
return false;
|
4856 |
+
}
|
4857 |
+
},
|
4858 |
delegateType: "focusout"
|
4859 |
},
|
4860 |
+
click: {
|
4861 |
+
// For checkbox, fire native event so checked state will be right
|
4862 |
+
trigger: function() {
|
4863 |
+
if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) {
|
4864 |
+
this.click();
|
4865 |
+
return false;
|
4866 |
}
|
4867 |
},
|
4868 |
|
4869 |
+
// For cross-browser consistency, don't fire native .click() on links
|
4870 |
+
_default: function( event ) {
|
4871 |
+
return jQuery.nodeName( event.target, "a" );
|
4872 |
+
}
|
4873 |
+
},
|
4874 |
+
|
4875 |
+
beforeunload: {
|
4876 |
+
postDispatch: function( event ) {
|
4877 |
+
|
4878 |
+
// Support: Firefox 20+
|
4879 |
+
// Firefox doesn't alert if the returnValue field is not set.
|
4880 |
+
if ( event.result !== undefined && event.originalEvent ) {
|
4881 |
+
event.originalEvent.returnValue = event.result;
|
4882 |
}
|
4883 |
}
|
4884 |
}
|
4891 |
var e = jQuery.extend(
|
4892 |
new jQuery.Event(),
|
4893 |
event,
|
4894 |
+
{
|
4895 |
+
type: type,
|
4896 |
isSimulated: true,
|
4897 |
originalEvent: {}
|
4898 |
}
|
4908 |
}
|
4909 |
};
|
4910 |
|
|
|
|
|
|
|
|
|
4911 |
jQuery.removeEvent = document.removeEventListener ?
|
4912 |
function( elem, type, handle ) {
|
4913 |
if ( elem.removeEventListener ) {
|
4921 |
|
4922 |
// #8545, #7054, preventing memory leaks for custom events in IE6-8
|
4923 |
// detachEvent needed property on element, by name of that event, to properly expose it to GC
|
4924 |
+
if ( typeof elem[ name ] === strundefined ) {
|
4925 |
elem[ name ] = null;
|
4926 |
}
|
4927 |
|
4942 |
|
4943 |
// Events bubbling up the document may have been marked as prevented
|
4944 |
// by a handler lower down the tree; reflect the correct value.
|
4945 |
+
this.isDefaultPrevented = src.defaultPrevented ||
|
4946 |
+
src.defaultPrevented === undefined &&
|
4947 |
+
// Support: IE < 9, Android < 4.0
|
4948 |
+
src.returnValue === false ?
|
4949 |
+
returnTrue :
|
4950 |
+
returnFalse;
|
4951 |
|
4952 |
// Event type
|
4953 |
} else {
|
4966 |
this[ jQuery.expando ] = true;
|
4967 |
};
|
4968 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4969 |
// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
|
4970 |
// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
|
4971 |
jQuery.Event.prototype = {
|
4972 |
+
isDefaultPrevented: returnFalse,
|
4973 |
+
isPropagationStopped: returnFalse,
|
4974 |
+
isImmediatePropagationStopped: returnFalse,
|
4975 |
|
4976 |
+
preventDefault: function() {
|
4977 |
var e = this.originalEvent;
|
4978 |
+
|
4979 |
+
this.isDefaultPrevented = returnTrue;
|
4980 |
if ( !e ) {
|
4981 |
return;
|
4982 |
}
|
4983 |
|
4984 |
+
// If preventDefault exists, run it on the original event
|
4985 |
if ( e.preventDefault ) {
|
4986 |
e.preventDefault();
|
4987 |
|
4988 |
+
// Support: IE
|
4989 |
+
// Otherwise set the returnValue property of the original event to false
|
4990 |
} else {
|
4991 |
e.returnValue = false;
|
4992 |
}
|
4993 |
},
|
4994 |
stopPropagation: function() {
|
|
|
|
|
4995 |
var e = this.originalEvent;
|
4996 |
+
|
4997 |
+
this.isPropagationStopped = returnTrue;
|
4998 |
if ( !e ) {
|
4999 |
return;
|
5000 |
}
|
5001 |
+
// If stopPropagation exists, run it on the original event
|
5002 |
if ( e.stopPropagation ) {
|
5003 |
e.stopPropagation();
|
5004 |
}
|
5005 |
+
|
5006 |
+
// Support: IE
|
5007 |
+
// Set the cancelBubble property of the original event to true
|
5008 |
e.cancelBubble = true;
|
5009 |
},
|
5010 |
stopImmediatePropagation: function() {
|
5011 |
+
var e = this.originalEvent;
|
5012 |
+
|
5013 |
this.isImmediatePropagationStopped = returnTrue;
|
5014 |
+
|
5015 |
+
if ( e && e.stopImmediatePropagation ) {
|
5016 |
+
e.stopImmediatePropagation();
|
5017 |
+
}
|
5018 |
+
|
5019 |
this.stopPropagation();
|
5020 |
+
}
|
|
|
|
|
|
|
5021 |
};
|
5022 |
|
5023 |
// Create mouseenter/leave events using mouseover/out and event-time checks
|
5024 |
jQuery.each({
|
5025 |
mouseenter: "mouseover",
|
5026 |
+
mouseleave: "mouseout",
|
5027 |
+
pointerenter: "pointerover",
|
5028 |
+
pointerleave: "pointerout"
|
5029 |
}, function( orig, fix ) {
|
5030 |
jQuery.event.special[ orig ] = {
|
5031 |
delegateType: fix,
|
5035 |
var ret,
|
5036 |
target = this,
|
5037 |
related = event.relatedTarget,
|
5038 |
+
handleObj = event.handleObj;
|
|
|
5039 |
|
5040 |
// For mousenter/leave call the handler if related is outside the target.
|
5041 |
// NB: No relatedTarget if the mouse left/entered the browser window
|
5050 |
});
|
5051 |
|
5052 |
// IE submit delegation
|
5053 |
+
if ( !support.submitBubbles ) {
|
5054 |
|
5055 |
jQuery.event.special.submit = {
|
5056 |
setup: function() {
|
5064 |
// Node name check avoids a VML-related crash in IE (#9807)
|
5065 |
var elem = e.target,
|
5066 |
form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
|
5067 |
+
if ( form && !jQuery._data( form, "submitBubbles" ) ) {
|
5068 |
jQuery.event.add( form, "submit._submit", function( event ) {
|
5069 |
event._submit_bubble = true;
|
5070 |
});
|
5071 |
+
jQuery._data( form, "submitBubbles", true );
|
5072 |
}
|
5073 |
});
|
5074 |
// return undefined since we don't need an event listener
|
5097 |
}
|
5098 |
|
5099 |
// IE change delegation and checkbox/radio fix
|
5100 |
+
if ( !support.changeBubbles ) {
|
5101 |
|
5102 |
jQuery.event.special.change = {
|
5103 |
|
5127 |
jQuery.event.add( this, "beforeactivate._change", function( e ) {
|
5128 |
var elem = e.target;
|
5129 |
|
5130 |
+
if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) {
|
5131 |
jQuery.event.add( elem, "change._change", function( event ) {
|
5132 |
if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
|
5133 |
jQuery.event.simulate( "change", this.parentNode, event, true );
|
5134 |
}
|
5135 |
});
|
5136 |
+
jQuery._data( elem, "changeBubbles", true );
|
5137 |
}
|
5138 |
});
|
5139 |
},
|
5156 |
}
|
5157 |
|
5158 |
// Create "bubbling" focus and blur events
|
5159 |
+
if ( !support.focusinBubbles ) {
|
5160 |
jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
|
5161 |
|
5162 |
+
// Attach a single capturing handler on the document while someone wants focusin/focusout
|
5163 |
+
var handler = function( event ) {
|
|
|
5164 |
jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
|
5165 |
};
|
5166 |
|
5167 |
jQuery.event.special[ fix ] = {
|
5168 |
setup: function() {
|
5169 |
+
var doc = this.ownerDocument || this,
|
5170 |
+
attaches = jQuery._data( doc, fix );
|
5171 |
+
|
5172 |
+
if ( !attaches ) {
|
5173 |
+
doc.addEventListener( orig, handler, true );
|
5174 |
}
|
5175 |
+
jQuery._data( doc, fix, ( attaches || 0 ) + 1 );
|
5176 |
},
|
5177 |
teardown: function() {
|
5178 |
+
var doc = this.ownerDocument || this,
|
5179 |
+
attaches = jQuery._data( doc, fix ) - 1;
|
5180 |
+
|
5181 |
+
if ( !attaches ) {
|
5182 |
+
doc.removeEventListener( orig, handler, true );
|
5183 |
+
jQuery._removeData( doc, fix );
|
5184 |
+
} else {
|
5185 |
+
jQuery._data( doc, fix, attaches );
|
5186 |
}
|
5187 |
}
|
5188 |
};
|
5192 |
jQuery.fn.extend({
|
5193 |
|
5194 |
on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
|
5195 |
+
var type, origFn;
|
5196 |
|
5197 |
// Types can be a map of types/handlers
|
5198 |
if ( typeof types === "object" ) {
|
5199 |
// ( types-Object, selector, data )
|
5200 |
+
if ( typeof selector !== "string" ) {
|
5201 |
// ( types-Object, data )
|
5202 |
data = data || selector;
|
5203 |
selector = undefined;
|
5279 |
});
|
5280 |
},
|
5281 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5282 |
trigger: function( type, data ) {
|
5283 |
return this.each(function() {
|
5284 |
jQuery.event.trigger( type, data, this );
|
5285 |
});
|
5286 |
},
|
5287 |
triggerHandler: function( type, data ) {
|
5288 |
+
var elem = this[0];
|
5289 |
+
if ( elem ) {
|
5290 |
+
return jQuery.event.trigger( type, data, elem, true );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5291 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
5292 |
}
|
5293 |
});
|
5294 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5295 |
|
5296 |
+
function createSafeFragment( document ) {
|
5297 |
+
var list = nodeNames.split( "|" ),
|
5298 |
+
safeFrag = document.createDocumentFragment();
|
5299 |
|
5300 |
+
if ( safeFrag.createElement ) {
|
5301 |
+
while ( list.length ) {
|
5302 |
+
safeFrag.createElement(
|
5303 |
+
list.pop()
|
5304 |
+
);
|
5305 |
+
}
|
5306 |
}
|
5307 |
+
return safeFrag;
|
5308 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5309 |
|
5310 |
+
var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
|
5311 |
+
"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
|
5312 |
+
rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
|
5313 |
+
rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
|
5314 |
+
rleadingWhitespace = /^\s+/,
|
5315 |
+
rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
|
5316 |
+
rtagName = /<([\w:]+)/,
|
5317 |
+
rtbody = /<tbody/i,
|
5318 |
+
rhtml = /<|&#?\w+;/,
|
5319 |
+
rnoInnerhtml = /<(?:script|style|link)/i,
|
5320 |
+
// checked="checked" or checked
|
5321 |
+
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
|
5322 |
+
rscriptType = /^$|\/(?:java|ecma)script/i,
|
5323 |
+
rscriptTypeMasked = /^true\/(.*)/,
|
5324 |
+
rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
|
5325 |
|
5326 |
+
// We have to close these tags to support XHTML (#13200)
|
5327 |
+
wrapMap = {
|
5328 |
+
option: [ 1, "<select multiple='multiple'>", "</select>" ],
|
5329 |
+
legend: [ 1, "<fieldset>", "</fieldset>" ],
|
5330 |
+
area: [ 1, "<map>", "</map>" ],
|
5331 |
+
param: [ 1, "<object>", "</object>" ],
|
5332 |
+
thead: [ 1, "<table>", "</table>" ],
|
5333 |
+
tr: [ 2, "<table><tbody>", "</tbody></table>" ],
|
5334 |
+
col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
|
5335 |
+
td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
|
5336 |
|
5337 |
+
// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
|
5338 |
+
// unless wrapped in a div with non-breaking characters in front of it.
|
5339 |
+
_default: support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5340 |
},
|
5341 |
+
safeFragment = createSafeFragment( document ),
|
5342 |
+
fragmentDiv = safeFragment.appendChild( document.createElement("div") );
|
5343 |
|
5344 |
+
wrapMap.optgroup = wrapMap.option;
|
5345 |
+
wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
|
5346 |
+
wrapMap.th = wrapMap.td;
|
|
|
|
|
5347 |
|
5348 |
+
function getAll( context, tag ) {
|
5349 |
+
var elems, elem,
|
5350 |
+
i = 0,
|
5351 |
+
found = typeof context.getElementsByTagName !== strundefined ? context.getElementsByTagName( tag || "*" ) :
|
5352 |
+
typeof context.querySelectorAll !== strundefined ? context.querySelectorAll( tag || "*" ) :
|
5353 |
+
undefined;
|
5354 |
|
5355 |
+
if ( !found ) {
|
5356 |
+
for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {
|
5357 |
+
if ( !tag || jQuery.nodeName( elem, tag ) ) {
|
5358 |
+
found.push( elem );
|
5359 |
+
} else {
|
5360 |
+
jQuery.merge( found, getAll( elem, tag ) );
|
5361 |
}
|
5362 |
+
}
|
5363 |
+
}
|
5364 |
|
5365 |
+
return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
|
5366 |
+
jQuery.merge( [ context ], found ) :
|
5367 |
+
found;
|
5368 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
5369 |
|
5370 |
+
// Used in buildFragment, fixes the defaultChecked property
|
5371 |
+
function fixDefaultChecked( elem ) {
|
5372 |
+
if ( rcheckableType.test( elem.type ) ) {
|
5373 |
+
elem.defaultChecked = elem.checked;
|
5374 |
+
}
|
5375 |
+
}
|
5376 |
|
5377 |
+
// Support: IE<8
|
5378 |
+
// Manipulating tables requires a tbody
|
5379 |
+
function manipulationTarget( elem, content ) {
|
5380 |
+
return jQuery.nodeName( elem, "table" ) &&
|
5381 |
+
jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ?
|
5382 |
|
5383 |
+
elem.getElementsByTagName("tbody")[0] ||
|
5384 |
+
elem.appendChild( elem.ownerDocument.createElement("tbody") ) :
|
5385 |
+
elem;
|
5386 |
+
}
|
5387 |
|
5388 |
+
// Replace/restore the type attribute of script elements for safe DOM manipulation
|
5389 |
+
function disableScript( elem ) {
|
5390 |
+
elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type;
|
5391 |
+
return elem;
|
5392 |
+
}
|
5393 |
+
function restoreScript( elem ) {
|
5394 |
+
var match = rscriptTypeMasked.exec( elem.type );
|
5395 |
+
if ( match ) {
|
5396 |
+
elem.type = match[1];
|
5397 |
+
} else {
|
5398 |
+
elem.removeAttribute("type");
|
5399 |
+
}
|
5400 |
+
return elem;
|
5401 |
+
}
|
5402 |
|
5403 |
+
// Mark scripts as having already been evaluated
|
5404 |
+
function setGlobalEval( elems, refElements ) {
|
5405 |
+
var elem,
|
5406 |
+
i = 0;
|
5407 |
+
for ( ; (elem = elems[i]) != null; i++ ) {
|
5408 |
+
jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) );
|
5409 |
+
}
|
5410 |
+
}
|
5411 |
|
5412 |
+
function cloneCopyEvent( src, dest ) {
|
|
|
5413 |
|
5414 |
+
if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
|
5415 |
+
return;
|
5416 |
+
}
|
5417 |
|
5418 |
+
var type, i, l,
|
5419 |
+
oldData = jQuery._data( src ),
|
5420 |
+
curData = jQuery._data( dest, oldData ),
|
5421 |
+
events = oldData.events;
|
5422 |
|
5423 |
+
if ( events ) {
|
5424 |
+
delete curData.handle;
|
5425 |
+
curData.events = {};
|
5426 |
|
5427 |
+
for ( type in events ) {
|
5428 |
+
for ( i = 0, l = events[ type ].length; i < l; i++ ) {
|
5429 |
+
jQuery.event.add( dest, type, events[ type ][ i ] );
|
5430 |
+
}
|
5431 |
+
}
|
5432 |
+
}
|
5433 |
|
5434 |
+
// make the cloned public data object a copy from the original
|
5435 |
+
if ( curData.data ) {
|
5436 |
+
curData.data = jQuery.extend( {}, curData.data );
|
5437 |
+
}
|
5438 |
+
}
|
5439 |
|
5440 |
+
function fixCloneNodeIssues( src, dest ) {
|
5441 |
+
var nodeName, e, data;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5442 |
|
5443 |
+
// We do not need to do anything for non-Elements
|
5444 |
+
if ( dest.nodeType !== 1 ) {
|
5445 |
+
return;
|
5446 |
+
}
|
5447 |
|
5448 |
+
nodeName = dest.nodeName.toLowerCase();
|
|
|
|
|
5449 |
|
5450 |
+
// IE6-8 copies events bound via attachEvent when using cloneNode.
|
5451 |
+
if ( !support.noCloneEvent && dest[ jQuery.expando ] ) {
|
5452 |
+
data = jQuery._data( dest );
|
|
|
|
|
|
|
|
|
|
|
|
|
5453 |
|
5454 |
+
for ( e in data.events ) {
|
5455 |
+
jQuery.removeEvent( dest, e, data.handle );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5456 |
}
|
5457 |
|
5458 |
+
// Event data gets referenced instead of copied if the expando gets copied too
|
5459 |
+
dest.removeAttribute( jQuery.expando );
|
5460 |
+
}
|
|
|
5461 |
|
5462 |
+
// IE blanks contents when cloning scripts, and tries to evaluate newly-set text
|
5463 |
+
if ( nodeName === "script" && dest.text !== src.text ) {
|
5464 |
+
disableScript( dest ).text = src.text;
|
5465 |
+
restoreScript( dest );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5466 |
|
5467 |
+
// IE6-10 improperly clones children of object elements using classid.
|
5468 |
+
// IE10 throws NoModificationAllowedError if parent is null, #12132.
|
5469 |
+
} else if ( nodeName === "object" ) {
|
5470 |
+
if ( dest.parentNode ) {
|
5471 |
+
dest.outerHTML = src.outerHTML;
|
|
|
|
|
|
|
|
|
5472 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5473 |
|
5474 |
+
// This path appears unavoidable for IE9. When cloning an object
|
5475 |
+
// element in IE9, the outerHTML strategy above is not sufficient.
|
5476 |
+
// If the src has innerHTML and the destination does not,
|
5477 |
+
// copy the src.innerHTML into the dest.innerHTML. #10324
|
5478 |
+
if ( support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) {
|
5479 |
+
dest.innerHTML = src.innerHTML;
|
5480 |
+
}
|
5481 |
|
5482 |
+
} else if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
|
5483 |
+
// IE6-8 fails to persist the checked state of a cloned checkbox
|
5484 |
+
// or radio button. Worse, IE6-7 fail to give the cloned element
|
5485 |
+
// a checked appearance if the defaultChecked value isn't also set
|
5486 |
|
5487 |
+
dest.defaultChecked = dest.checked = src.checked;
|
5488 |
|
5489 |
+
// IE6-7 get confused and end up setting the value of a cloned
|
5490 |
+
// checkbox/radio button to an empty string instead of "on"
|
5491 |
+
if ( dest.value !== src.value ) {
|
5492 |
+
dest.value = src.value;
|
5493 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5494 |
|
5495 |
+
// IE6-8 fails to return the selected option to the default selected
|
5496 |
+
// state when cloning options
|
5497 |
+
} else if ( nodeName === "option" ) {
|
5498 |
+
dest.defaultSelected = dest.selected = src.defaultSelected;
|
5499 |
|
5500 |
+
// IE6-8 fails to set the defaultValue to the correct value when
|
5501 |
+
// cloning other types of input fields
|
5502 |
+
} else if ( nodeName === "input" || nodeName === "textarea" ) {
|
5503 |
+
dest.defaultValue = src.defaultValue;
|
|
|
|
|
5504 |
}
|
|
|
|
|
|
|
5505 |
}
|
5506 |
|
5507 |
+
jQuery.extend({
|
5508 |
+
clone: function( elem, dataAndEvents, deepDataAndEvents ) {
|
5509 |
+
var destElements, node, clone, i, srcElements,
|
5510 |
+
inPage = jQuery.contains( elem.ownerDocument, elem );
|
5511 |
|
5512 |
+
if ( support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
|
5513 |
+
clone = elem.cloneNode( true );
|
|
|
5514 |
|
5515 |
+
// IE<=8 does not properly clone detached, unknown element nodes
|
5516 |
+
} else {
|
5517 |
+
fragmentDiv.innerHTML = elem.outerHTML;
|
5518 |
+
fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
|
5519 |
+
}
|
|
|
|
|
5520 |
|
5521 |
+
if ( (!support.noCloneEvent || !support.noCloneChecked) &&
|
5522 |
+
(elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
|
|
|
|
|
|
|
|
|
|
|
5523 |
|
5524 |
+
// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
|
5525 |
+
destElements = getAll( clone );
|
5526 |
+
srcElements = getAll( elem );
|
|
|
|
|
|
|
|
|
|
|
5527 |
|
5528 |
+
// Fix all IE cloning issues
|
5529 |
+
for ( i = 0; (node = srcElements[i]) != null; ++i ) {
|
5530 |
+
// Ensure that the destination node is not null; Fixes #9587
|
5531 |
+
if ( destElements[i] ) {
|
5532 |
+
fixCloneNodeIssues( node, destElements[i] );
|
5533 |
}
|
5534 |
}
|
5535 |
+
}
|
|
|
|
|
5536 |
|
5537 |
+
// Copy the events from the original to the clone
|
5538 |
+
if ( dataAndEvents ) {
|
5539 |
+
if ( deepDataAndEvents ) {
|
5540 |
+
srcElements = srcElements || getAll( elem );
|
5541 |
+
destElements = destElements || getAll( clone );
|
|
|
|
|
|
|
|
|
5542 |
|
5543 |
+
for ( i = 0; (node = srcElements[i]) != null; i++ ) {
|
5544 |
+
cloneCopyEvent( node, destElements[i] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5545 |
}
|
5546 |
+
} else {
|
5547 |
+
cloneCopyEvent( elem, clone );
|
5548 |
}
|
|
|
|
|
5549 |
}
|
|
|
|
|
5550 |
|
5551 |
+
// Preserve script evaluation history
|
5552 |
+
destElements = getAll( clone, "script" );
|
5553 |
+
if ( destElements.length > 0 ) {
|
5554 |
+
setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
|
5555 |
}
|
|
|
|
|
|
|
5556 |
|
5557 |
+
destElements = srcElements = node = null;
|
|
|
|
|
|
|
|
|
|
|
5558 |
|
5559 |
+
// Return the cloned set
|
5560 |
+
return clone;
|
5561 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5562 |
|
5563 |
+
buildFragment: function( elems, context, scripts, selection ) {
|
5564 |
+
var j, elem, contains,
|
5565 |
+
tmp, tag, tbody, wrap,
|
5566 |
+
l = elems.length,
|
5567 |
|
5568 |
+
// Ensure a safe fragment
|
5569 |
+
safe = createSafeFragment( context ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5570 |
|
5571 |
+
nodes = [],
|
5572 |
+
i = 0;
|
5573 |
|
5574 |
+
for ( ; i < l; i++ ) {
|
5575 |
+
elem = elems[ i ];
|
5576 |
|
5577 |
+
if ( elem || elem === 0 ) {
|
5578 |
|
5579 |
+
// Add nodes directly
|
5580 |
+
if ( jQuery.type( elem ) === "object" ) {
|
5581 |
+
jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
|
5582 |
|
5583 |
+
// Convert non-html into a text node
|
5584 |
+
} else if ( !rhtml.test( elem ) ) {
|
5585 |
+
nodes.push( context.createTextNode( elem ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5586 |
|
5587 |
+
// Convert html into DOM nodes
|
5588 |
+
} else {
|
5589 |
+
tmp = tmp || safe.appendChild( context.createElement("div") );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5590 |
|
5591 |
+
// Deserialize a standard representation
|
5592 |
+
tag = (rtagName.exec( elem ) || [ "", "" ])[ 1 ].toLowerCase();
|
5593 |
+
wrap = wrapMap[ tag ] || wrapMap._default;
|
|
|
|
|
|
|
|
|
|
|
5594 |
|
5595 |
+
tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2];
|
|
|
|
|
|
|
|
|
5596 |
|
5597 |
+
// Descend through wrappers to the right content
|
5598 |
+
j = wrap[0];
|
5599 |
+
while ( j-- ) {
|
5600 |
+
tmp = tmp.lastChild;
|
5601 |
}
|
5602 |
|
5603 |
+
// Manually add leading whitespace removed by IE
|
5604 |
+
if ( !support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
|
5605 |
+
nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );
|
5606 |
+
}
|
5607 |
|
5608 |
+
// Remove IE's autoinserted <tbody> from table fragments
|
5609 |
+
if ( !support.tbody ) {
|
|
|
|
|
|
|
5610 |
|
5611 |
+
// String was a <table>, *may* have spurious <tbody>
|
5612 |
+
elem = tag === "table" && !rtbody.test( elem ) ?
|
5613 |
+
tmp.firstChild :
|
5614 |
+
|
5615 |
+
// String was a bare <thead> or <tfoot>
|
5616 |
+
wrap[1] === "<table>" && !rtbody.test( elem ) ?
|
5617 |
+
tmp :
|
5618 |
+
0;
|
5619 |
+
|
5620 |
+
j = elem && elem.childNodes.length;
|
5621 |
+
while ( j-- ) {
|
5622 |
+
if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) {
|
5623 |
+
elem.removeChild( tbody );
|
5624 |
+
}
|
5625 |
+
}
|
5626 |
+
}
|
5627 |
|
5628 |
+
jQuery.merge( nodes, tmp.childNodes );
|
|
|
|
|
|
|
|
|
|
|
5629 |
|
5630 |
+
// Fix #12392 for WebKit and IE > 9
|
5631 |
+
tmp.textContent = "";
|
|
|
5632 |
|
5633 |
+
// Fix #12392 for oldIE
|
5634 |
+
while ( tmp.firstChild ) {
|
5635 |
+
tmp.removeChild( tmp.firstChild );
|
5636 |
+
}
|
5637 |
|
5638 |
+
// Remember the top-level container for proper cleanup
|
5639 |
+
tmp = safe.lastChild;
|
5640 |
+
}
|
5641 |
}
|
5642 |
+
}
|
5643 |
|
5644 |
+
// Fix #11356: Clear elements from fragment
|
5645 |
+
if ( tmp ) {
|
5646 |
+
safe.removeChild( tmp );
|
5647 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5648 |
|
5649 |
+
// Reset defaultChecked for any radios and checkboxes
|
5650 |
+
// about to be appended to the DOM in IE 6/7 (#8060)
|
5651 |
+
if ( !support.appendChecked ) {
|
5652 |
+
jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );
|
5653 |
+
}
|
5654 |
|
5655 |
+
i = 0;
|
5656 |
+
while ( (elem = nodes[ i++ ]) ) {
|
|
|
|
|
5657 |
|
5658 |
+
// #4087 - If origin and destination elements are the same, and this is
|
5659 |
+
// that element, do not do anything
|
5660 |
+
if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
|
5661 |
+
continue;
|
5662 |
}
|
5663 |
|
5664 |
+
contains = jQuery.contains( elem.ownerDocument, elem );
|
|
|
5665 |
|
5666 |
+
// Append to fragment
|
5667 |
+
tmp = getAll( safe.appendChild( elem ), "script" );
|
5668 |
+
|
5669 |
+
// Preserve script evaluation history
|
5670 |
+
if ( contains ) {
|
5671 |
+
setGlobalEval( tmp );
|
5672 |
}
|
5673 |
|
5674 |
+
// Capture executables
|
5675 |
+
if ( scripts ) {
|
5676 |
+
j = 0;
|
5677 |
+
while ( (elem = tmp[ j++ ]) ) {
|
5678 |
+
if ( rscriptType.test( elem.type || "" ) ) {
|
5679 |
+
scripts.push( elem );
|
5680 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
5681 |
}
|
|
|
5682 |
}
|
|
|
|
|
|
|
5683 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5684 |
|
5685 |
+
tmp = null;
|
|
|
|
|
|
|
|
|
|
|
5686 |
|
5687 |
+
return safe;
|
5688 |
+
},
|
5689 |
|
5690 |
+
cleanData: function( elems, /* internal */ acceptData ) {
|
5691 |
+
var elem, type, id, data,
|
5692 |
+
i = 0,
|
5693 |
+
internalKey = jQuery.expando,
|
5694 |
+
cache = jQuery.cache,
|
5695 |
+
deleteExpando = support.deleteExpando,
|
5696 |
+
special = jQuery.event.special;
|
|
|
|
|
|
|
5697 |
|
5698 |
+
for ( ; (elem = elems[i]) != null; i++ ) {
|
5699 |
+
if ( acceptData || jQuery.acceptData( elem ) ) {
|
5700 |
|
5701 |
+
id = elem[ internalKey ];
|
5702 |
+
data = id && cache[ id ];
|
|
|
|
|
5703 |
|
5704 |
+
if ( data ) {
|
5705 |
+
if ( data.events ) {
|
5706 |
+
for ( type in data.events ) {
|
5707 |
+
if ( special[ type ] ) {
|
5708 |
+
jQuery.event.remove( elem, type );
|
5709 |
|
5710 |
+
// This is a shortcut to avoid jQuery.event.remove's overhead
|
5711 |
+
} else {
|
5712 |
+
jQuery.removeEvent( elem, type, data.handle );
|
|
|
|
|
|
|
|
|
|
|
5713 |
}
|
5714 |
}
|
5715 |
}
|
5716 |
|
5717 |
+
// Remove cache only if it was not already removed by jQuery.event.remove
|
5718 |
+
if ( cache[ id ] ) {
|
|
|
|
|
|
|
5719 |
|
5720 |
+
delete cache[ id ];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5721 |
|
5722 |
+
// IE does not allow us to delete expando properties from nodes,
|
5723 |
+
// nor does it have a removeAttribute function on Document nodes;
|
5724 |
+
// we must handle all of these cases
|
5725 |
+
if ( deleteExpando ) {
|
5726 |
+
delete elem[ internalKey ];
|
5727 |
|
5728 |
+
} else if ( typeof elem.removeAttribute !== strundefined ) {
|
5729 |
+
elem.removeAttribute( internalKey );
|
5730 |
|
5731 |
+
} else {
|
5732 |
+
elem[ internalKey ] = null;
|
|
|
|
|
|
|
|
|
5733 |
}
|
5734 |
|
5735 |
+
deletedIds.push( id );
|
5736 |
+
}
|
5737 |
}
|
5738 |
+
}
|
5739 |
+
}
|
5740 |
+
}
|
5741 |
+
});
|
5742 |
|
5743 |
+
jQuery.fn.extend({
|
5744 |
+
text: function( value ) {
|
5745 |
+
return access( this, function( value ) {
|
5746 |
+
return value === undefined ?
|
5747 |
+
jQuery.text( this ) :
|
5748 |
+
this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
|
5749 |
+
}, null, value, arguments.length );
|
5750 |
+
},
|
5751 |
|
5752 |
+
append: function() {
|
5753 |
+
return this.domManip( arguments, function( elem ) {
|
5754 |
+
if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
|
5755 |
+
var target = manipulationTarget( this, elem );
|
5756 |
+
target.appendChild( elem );
|
5757 |
}
|
5758 |
+
});
|
5759 |
+
},
|
5760 |
|
5761 |
+
prepend: function() {
|
5762 |
+
return this.domManip( arguments, function( elem ) {
|
5763 |
+
if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
|
5764 |
+
var target = manipulationTarget( this, elem );
|
5765 |
+
target.insertBefore( elem, target.firstChild );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5766 |
}
|
5767 |
+
});
|
|
|
|
|
5768 |
},
|
5769 |
|
5770 |
+
before: function() {
|
5771 |
+
return this.domManip( arguments, function( elem ) {
|
5772 |
+
if ( this.parentNode ) {
|
5773 |
+
this.parentNode.insertBefore( elem, this );
|
5774 |
+
}
|
5775 |
+
});
|
5776 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5777 |
|
5778 |
+
after: function() {
|
5779 |
+
return this.domManip( arguments, function( elem ) {
|
5780 |
+
if ( this.parentNode ) {
|
5781 |
+
this.parentNode.insertBefore( elem, this.nextSibling );
|
5782 |
+
}
|
5783 |
+
});
|
5784 |
+
},
|
5785 |
|
5786 |
+
remove: function( selector, keepData /* Internal Use Only */ ) {
|
5787 |
+
var elem,
|
5788 |
+
elems = selector ? jQuery.filter( selector, this ) : this,
|
5789 |
+
i = 0;
|
5790 |
|
5791 |
+
for ( ; (elem = elems[i]) != null; i++ ) {
|
|
|
|
|
5792 |
|
5793 |
+
if ( !keepData && elem.nodeType === 1 ) {
|
5794 |
+
jQuery.cleanData( getAll( elem ) );
|
5795 |
+
}
|
|
|
|
|
|
|
5796 |
|
|
|
|
|
|
|
5797 |
if ( elem.parentNode ) {
|
5798 |
+
if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
|
5799 |
+
setGlobalEval( getAll( elem, "script" ) );
|
5800 |
+
}
|
5801 |
+
elem.parentNode.removeChild( elem );
|
5802 |
}
|
5803 |
+
}
|
5804 |
|
5805 |
+
return this;
|
5806 |
+
},
|
5807 |
|
5808 |
+
empty: function() {
|
5809 |
+
var elem,
|
5810 |
+
i = 0;
|
5811 |
|
5812 |
+
for ( ; (elem = this[i]) != null; i++ ) {
|
5813 |
+
// Remove element nodes and prevent memory leaks
|
5814 |
+
if ( elem.nodeType === 1 ) {
|
5815 |
+
jQuery.cleanData( getAll( elem, false ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5816 |
}
|
|
|
|
|
5817 |
|
5818 |
+
// Remove any remaining nodes
|
5819 |
+
while ( elem.firstChild ) {
|
5820 |
+
elem.removeChild( elem.firstChild );
|
5821 |
+
}
|
5822 |
|
5823 |
+
// If this is a select, ensure that it displays empty (#12336)
|
5824 |
+
// Support: IE<9
|
5825 |
+
if ( elem.options && jQuery.nodeName( elem, "select" ) ) {
|
5826 |
+
elem.options.length = 0;
|
5827 |
+
}
|
5828 |
+
}
|
|
|
|
|
5829 |
|
5830 |
+
return this;
|
5831 |
+
},
|
|
|
|
|
|
|
|
|
5832 |
|
5833 |
+
clone: function( dataAndEvents, deepDataAndEvents ) {
|
5834 |
+
dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
|
5835 |
+
deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
|
5836 |
|
5837 |
+
return this.map(function() {
|
5838 |
+
return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
|
5839 |
+
});
|
5840 |
+
},
|
5841 |
|
5842 |
+
html: function( value ) {
|
5843 |
+
return access( this, function( value ) {
|
5844 |
+
var elem = this[ 0 ] || {},
|
5845 |
+
i = 0,
|
5846 |
+
l = this.length;
|
5847 |
|
5848 |
+
if ( value === undefined ) {
|
5849 |
+
return elem.nodeType === 1 ?
|
5850 |
+
elem.innerHTML.replace( rinlinejQuery, "" ) :
|
5851 |
+
undefined;
|
5852 |
+
}
|
5853 |
|
5854 |
+
// See if we can take a shortcut and just use innerHTML
|
5855 |
+
if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
|
5856 |
+
( support.htmlSerialize || !rnoshimcache.test( value ) ) &&
|
5857 |
+
( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
|
5858 |
+
!wrapMap[ (rtagName.exec( value ) || [ "", "" ])[ 1 ].toLowerCase() ] ) {
|
5859 |
|
5860 |
+
value = value.replace( rxhtmlTag, "<$1></$2>" );
|
|
|
|
|
|
|
5861 |
|
5862 |
+
try {
|
5863 |
+
for (; i < l; i++ ) {
|
5864 |
+
// Remove element nodes and prevent memory leaks
|
5865 |
+
elem = this[i] || {};
|
5866 |
+
if ( elem.nodeType === 1 ) {
|
5867 |
+
jQuery.cleanData( getAll( elem, false ) );
|
5868 |
+
elem.innerHTML = value;
|
5869 |
+
}
|
5870 |
+
}
|
5871 |
|
5872 |
+
elem = 0;
|
|
|
|
|
5873 |
|
5874 |
+
// If using innerHTML throws an exception, use the fallback method
|
5875 |
+
} catch(e) {}
|
|
|
5876 |
}
|
|
|
|
|
5877 |
|
5878 |
+
if ( elem ) {
|
5879 |
+
this.empty().append( value );
|
|
|
5880 |
}
|
5881 |
+
}, null, value, arguments.length );
|
5882 |
+
},
|
5883 |
|
5884 |
+
replaceWith: function() {
|
5885 |
+
var arg = arguments[ 0 ];
|
|
|
|
|
|
|
|
|
5886 |
|
5887 |
+
// Make the changes, replacing each context element with the new content
|
5888 |
+
this.domManip( arguments, function( elem ) {
|
5889 |
+
arg = this.parentNode;
|
5890 |
+
|
5891 |
+
jQuery.cleanData( getAll( this ) );
|
5892 |
+
|
5893 |
+
if ( arg ) {
|
5894 |
+
arg.replaceChild( elem, this );
|
5895 |
}
|
5896 |
+
});
|
|
|
|
|
|
|
5897 |
|
5898 |
+
// Force removal if there was no new content (e.g., from empty arguments)
|
5899 |
+
return arg && (arg.length || arg.nodeType) ? this : this.remove();
|
5900 |
+
},
|
5901 |
+
|
5902 |
+
detach: function( selector ) {
|
5903 |
+
return this.remove( selector, true );
|
5904 |
+
},
|
5905 |
|
5906 |
+
domManip: function( args, callback ) {
|
5907 |
|
5908 |
+
// Flatten any nested arrays
|
5909 |
+
args = concat.apply( [], args );
|
5910 |
+
|
5911 |
+
var first, node, hasScripts,
|
5912 |
+
scripts, doc, fragment,
|
5913 |
+
i = 0,
|
5914 |
+
l = this.length,
|
5915 |
+
set = this,
|
5916 |
+
iNoClone = l - 1,
|
5917 |
+
value = args[0],
|
5918 |
+
isFunction = jQuery.isFunction( value );
|
5919 |
+
|
5920 |
+
// We can't cloneNode fragments that contain checked, in WebKit
|
5921 |
+
if ( isFunction ||
|
5922 |
+
( l > 1 && typeof value === "string" &&
|
5923 |
+
!support.checkClone && rchecked.test( value ) ) ) {
|
5924 |
+
return this.each(function( index ) {
|
5925 |
+
var self = set.eq( index );
|
5926 |
+
if ( isFunction ) {
|
5927 |
+
args[0] = value.call( this, index, self.html() );
|
5928 |
+
}
|
5929 |
+
self.domManip( args, callback );
|
5930 |
+
});
|
5931 |
}
|
5932 |
|
5933 |
+
if ( l ) {
|
5934 |
+
fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );
|
5935 |
+
first = fragment.firstChild;
|
5936 |
+
|
5937 |
+
if ( fragment.childNodes.length === 1 ) {
|
5938 |
+
fragment = first;
|
5939 |
+
}
|
5940 |
+
|
5941 |
+
if ( first ) {
|
5942 |
+
scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
|
5943 |
+
hasScripts = scripts.length;
|
5944 |
|
5945 |
+
// Use the original fragment for the last item instead of the first because it can end up
|
5946 |
+
// being emptied incorrectly in certain situations (#8070).
|
5947 |
+
for ( ; i < l; i++ ) {
|
5948 |
+
node = fragment;
|
5949 |
|
5950 |
+
if ( i !== iNoClone ) {
|
5951 |
+
node = jQuery.clone( node, true, true );
|
|
|
|
|
|
|
|
|
5952 |
|
5953 |
+
// Keep references to cloned scripts for later restoration
|
5954 |
+
if ( hasScripts ) {
|
5955 |
+
jQuery.merge( scripts, getAll( node, "script" ) );
|
5956 |
+
}
|
5957 |
+
}
|
|
|
|
|
|
|
|
|
|
|
5958 |
|
5959 |
+
callback.call( this[i], node, i );
|
5960 |
+
}
|
|
|
|
|
5961 |
|
5962 |
+
if ( hasScripts ) {
|
5963 |
+
doc = scripts[ scripts.length - 1 ].ownerDocument;
|
|
|
|
|
|
|
|
|
5964 |
|
5965 |
+
// Reenable scripts
|
5966 |
+
jQuery.map( scripts, restoreScript );
|
|
|
5967 |
|
5968 |
+
// Evaluate executable scripts on first document insertion
|
5969 |
+
for ( i = 0; i < hasScripts; i++ ) {
|
5970 |
+
node = scripts[ i ];
|
5971 |
+
if ( rscriptType.test( node.type || "" ) &&
|
5972 |
+
!jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
|
5973 |
|
5974 |
+
if ( node.src ) {
|
5975 |
+
// Optional AJAX dependency, but won't run scripts if not present
|
5976 |
+
if ( jQuery._evalUrl ) {
|
5977 |
+
jQuery._evalUrl( node.src );
|
5978 |
+
}
|
5979 |
+
} else {
|
5980 |
+
jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) );
|
5981 |
+
}
|
5982 |
+
}
|
5983 |
+
}
|
5984 |
+
}
|
5985 |
|
5986 |
+
// Fix #11809: Avoid leaking memory
|
5987 |
+
fragment = first = null;
|
5988 |
+
}
|
|
|
|
|
5989 |
}
|
5990 |
|
5991 |
+
return this;
|
5992 |
+
}
|
5993 |
+
});
|
5994 |
|
5995 |
+
jQuery.each({
|
5996 |
+
appendTo: "append",
|
5997 |
+
prependTo: "prepend",
|
5998 |
+
insertBefore: "before",
|
5999 |
+
insertAfter: "after",
|
6000 |
+
replaceAll: "replaceWith"
|
6001 |
+
}, function( name, original ) {
|
6002 |
+
jQuery.fn[ name ] = function( selector ) {
|
6003 |
+
var elems,
|
6004 |
+
i = 0,
|
6005 |
+
ret = [],
|
6006 |
+
insert = jQuery( selector ),
|
6007 |
+
last = insert.length - 1;
|
6008 |
|
6009 |
+
for ( ; i <= last; i++ ) {
|
6010 |
+
elems = i === last ? this : this.clone(true);
|
6011 |
+
jQuery( insert[i] )[ original ]( elems );
|
6012 |
|
6013 |
+
// Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
|
6014 |
+
push.apply( ret, elems.get() );
|
|
|
|
|
|
|
6015 |
}
|
6016 |
|
6017 |
+
return this.pushStack( ret );
|
|
|
|
|
|
|
6018 |
};
|
6019 |
+
});
|
6020 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6021 |
|
6022 |
+
var iframe,
|
6023 |
+
elemdisplay = {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6024 |
|
6025 |
+
/**
|
6026 |
+
* Retrieve the actual display of a element
|
6027 |
+
* @param {String} name nodeName of the element
|
6028 |
+
* @param {Object} doc Document object
|
6029 |
+
*/
|
6030 |
+
// Called only from within defaultDisplay
|
6031 |
+
function actualDisplay( name, doc ) {
|
6032 |
+
var style,
|
6033 |
+
elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
|
6034 |
|
6035 |
+
// getDefaultComputedStyle might be reliably used only on attached element
|
6036 |
+
display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?
|
|
|
6037 |
|
6038 |
+
// Use of this method is a temporary fix (more like optmization) until something better comes along,
|
6039 |
+
// since it was removed from specification and supported only in FF
|
6040 |
+
style.display : jQuery.css( elem[ 0 ], "display" );
|
|
|
6041 |
|
6042 |
+
// We don't have any data stored on the element,
|
6043 |
+
// so use "detach" method as fast way to get rid of the element
|
6044 |
+
elem.detach();
|
6045 |
|
6046 |
+
return display;
|
6047 |
+
}
|
|
|
6048 |
|
6049 |
+
/**
|
6050 |
+
* Try to determine the default display value of an element
|
6051 |
+
* @param {String} nodeName
|
6052 |
+
*/
|
6053 |
+
function defaultDisplay( nodeName ) {
|
6054 |
+
var doc = document,
|
6055 |
+
display = elemdisplay[ nodeName ];
|
6056 |
|
6057 |
+
if ( !display ) {
|
6058 |
+
display = actualDisplay( nodeName, doc );
|
|
|
|
|
|
|
|
|
|
|
|
|
6059 |
|
6060 |
+
// If the simple way fails, read from inside an iframe
|
6061 |
+
if ( display === "none" || !display ) {
|
6062 |
|
6063 |
+
// Use the already-created iframe if possible
|
6064 |
+
iframe = (iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" )).appendTo( doc.documentElement );
|
|
|
|
|
6065 |
|
6066 |
+
// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
|
6067 |
+
doc = ( iframe[ 0 ].contentWindow || iframe[ 0 ].contentDocument ).document;
|
|
|
6068 |
|
6069 |
+
// Support: IE
|
6070 |
+
doc.write();
|
6071 |
+
doc.close();
|
|
|
6072 |
|
6073 |
+
display = actualDisplay( nodeName, doc );
|
6074 |
+
iframe.detach();
|
|
|
|
|
|
|
6075 |
}
|
6076 |
|
6077 |
+
// Store the correct default display
|
6078 |
+
elemdisplay[ nodeName ] = display;
|
|
|
6079 |
}
|
6080 |
|
6081 |
+
return display;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6082 |
}
|
6083 |
|
|
|
|
|
|
|
|
|
6084 |
|
6085 |
+
(function() {
|
6086 |
+
var shrinkWrapBlocksVal;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6087 |
|
6088 |
+
support.shrinkWrapBlocks = function() {
|
6089 |
+
if ( shrinkWrapBlocksVal != null ) {
|
6090 |
+
return shrinkWrapBlocksVal;
|
6091 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6092 |
|
6093 |
+
// Will be changed later if needed.
|
6094 |
+
shrinkWrapBlocksVal = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6095 |
|
6096 |
+
// Minified: var b,c,d
|
6097 |
+
var div, body, container;
|
|
|
|
|
|
|
|
|
6098 |
|
6099 |
+
body = document.getElementsByTagName( "body" )[ 0 ];
|
6100 |
+
if ( !body || !body.style ) {
|
6101 |
+
// Test fired too early or in an unsupported environment, exit.
|
6102 |
+
return;
|
|
|
|
|
|
|
|
|
6103 |
}
|
|
|
6104 |
|
6105 |
+
// Setup
|
6106 |
+
div = document.createElement( "div" );
|
6107 |
+
container = document.createElement( "div" );
|
6108 |
+
container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
|
6109 |
+
body.appendChild( container ).appendChild( div );
|
6110 |
|
6111 |
+
// Support: IE6
|
6112 |
+
// Check if elements with layout shrink-wrap their children
|
6113 |
+
if ( typeof div.style.zoom !== strundefined ) {
|
6114 |
+
// Reset CSS: box-sizing; display; margin; border
|
6115 |
+
div.style.cssText =
|
6116 |
+
// Support: Firefox<29, Android 2.3
|
6117 |
+
// Vendor-prefix box-sizing
|
6118 |
+
"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
|
6119 |
+
"box-sizing:content-box;display:block;margin:0;border:0;" +
|
6120 |
+
"padding:1px;width:1px;zoom:1";
|
6121 |
+
div.appendChild( document.createElement( "div" ) ).style.width = "5px";
|
6122 |
+
shrinkWrapBlocksVal = div.offsetWidth !== 3;
|
6123 |
+
}
|
6124 |
|
6125 |
+
body.removeChild( container );
|
|
|
6126 |
|
6127 |
+
return shrinkWrapBlocksVal;
|
6128 |
+
};
|
|
|
|
|
6129 |
|
6130 |
+
})();
|
6131 |
+
var rmargin = (/^margin/);
|
|
|
6132 |
|
6133 |
+
var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
|
|
|
6134 |
|
|
|
|
|
|
|
6135 |
|
6136 |
+
|
6137 |
+
var getStyles, curCSS,
|
6138 |
+
rposition = /^(top|right|bottom|left)$/;
|
6139 |
+
|
6140 |
+
if ( window.getComputedStyle ) {
|
6141 |
+
getStyles = function( elem ) {
|
6142 |
+
// Support: IE<=11+, Firefox<=30+ (#15098, #14150)
|
6143 |
+
// IE throws on elements created in popups
|
6144 |
+
// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
|
6145 |
+
if ( elem.ownerDocument.defaultView.opener ) {
|
6146 |
+
return elem.ownerDocument.defaultView.getComputedStyle( elem, null );
|
6147 |
}
|
6148 |
|
6149 |
+
return window.getComputedStyle( elem, null );
|
6150 |
+
};
|
|
|
|
|
6151 |
|
6152 |
+
curCSS = function( elem, name, computed ) {
|
6153 |
+
var width, minWidth, maxWidth, ret,
|
6154 |
+
style = elem.style;
|
6155 |
+
|
6156 |
+
computed = computed || getStyles( elem );
|
6157 |
+
|
6158 |
+
// getPropertyValue is only needed for .css('filter') in IE9, see #12537
|
6159 |
+
ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined;
|
6160 |
+
|
6161 |
+
if ( computed ) {
|
6162 |
+
|
6163 |
+
if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
|
6164 |
+
ret = jQuery.style( elem, name );
|
6165 |
}
|
|
|
6166 |
|
6167 |
+
// A tribute to the "awesome hack by Dean Edwards"
|
6168 |
+
// Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right
|
6169 |
+
// Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
|
6170 |
+
// this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
|
6171 |
+
if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6172 |
|
6173 |
+
// Remember the original values
|
6174 |
+
width = style.width;
|
6175 |
+
minWidth = style.minWidth;
|
6176 |
+
maxWidth = style.maxWidth;
|
|
|
6177 |
|
6178 |
+
// Put in the new values to get a computed value out
|
6179 |
+
style.minWidth = style.maxWidth = style.width = ret;
|
6180 |
+
ret = computed.width;
|
|
|
6181 |
|
6182 |
+
// Revert the changed values
|
6183 |
+
style.width = width;
|
6184 |
+
style.minWidth = minWidth;
|
6185 |
+
style.maxWidth = maxWidth;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6186 |
}
|
6187 |
}
|
|
|
|
|
6188 |
|
6189 |
+
// Support: IE
|
6190 |
+
// IE returns zIndex value as an integer.
|
6191 |
+
return ret === undefined ?
|
6192 |
+
ret :
|
6193 |
+
ret + "";
|
6194 |
+
};
|
6195 |
+
} else if ( document.documentElement.currentStyle ) {
|
6196 |
+
getStyles = function( elem ) {
|
6197 |
+
return elem.currentStyle;
|
6198 |
+
};
|
6199 |
|
6200 |
+
curCSS = function( elem, name, computed ) {
|
6201 |
+
var left, rs, rsLeft, ret,
|
6202 |
+
style = elem.style;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6203 |
|
6204 |
+
computed = computed || getStyles( elem );
|
6205 |
+
ret = computed ? computed[ name ] : undefined;
|
|
|
|
|
|
|
6206 |
|
6207 |
+
// Avoid setting ret to empty string here
|
6208 |
+
// so we don't default to auto
|
6209 |
+
if ( ret == null && style && style[ name ] ) {
|
6210 |
+
ret = style[ name ];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6211 |
}
|
|
|
6212 |
|
6213 |
+
// From the awesome hack by Dean Edwards
|
6214 |
+
// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6215 |
|
6216 |
+
// If we're not dealing with a regular pixel number
|
6217 |
+
// but a number that has a weird ending, we need to convert it to pixels
|
6218 |
+
// but not position css attributes, as those are proportional to the parent element instead
|
6219 |
+
// and we can't measure the parent instead because it might trigger a "stacking dolls" problem
|
6220 |
+
if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
|
6221 |
|
6222 |
+
// Remember the original values
|
6223 |
+
left = style.left;
|
6224 |
+
rs = elem.runtimeStyle;
|
6225 |
+
rsLeft = rs && rs.left;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6226 |
|
6227 |
+
// Put in the new values to get a computed value out
|
6228 |
+
if ( rsLeft ) {
|
6229 |
+
rs.left = elem.currentStyle.left;
|
6230 |
+
}
|
6231 |
+
style.left = name === "fontSize" ? "1em" : ret;
|
6232 |
+
ret = style.pixelLeft + "px";
|
6233 |
|
6234 |
+
// Revert the changed values
|
6235 |
+
style.left = left;
|
6236 |
+
if ( rsLeft ) {
|
6237 |
+
rs.left = rsLeft;
|
|
|
6238 |
}
|
6239 |
+
}
|
6240 |
|
6241 |
+
// Support: IE
|
6242 |
+
// IE returns zIndex value as an integer.
|
6243 |
+
return ret === undefined ?
|
6244 |
+
ret :
|
6245 |
+
ret + "" || "auto";
|
6246 |
+
};
|
6247 |
+
}
|
6248 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6249 |
|
|
|
|
|
|
|
6250 |
|
|
|
|
|
6251 |
|
6252 |
+
function addGetHookIf( conditionFn, hookFn ) {
|
6253 |
+
// Define the hook, we'll check on the first run if it's really needed.
|
6254 |
+
return {
|
6255 |
+
get: function() {
|
6256 |
+
var condition = conditionFn();
|
6257 |
|
6258 |
+
if ( condition == null ) {
|
6259 |
+
// The test was not ready at this point; screw the hook this time
|
6260 |
+
// but check again when needed next time.
|
6261 |
+
return;
|
6262 |
}
|
6263 |
|
6264 |
+
if ( condition ) {
|
6265 |
+
// Hook not needed (or it's not possible to use it due to missing dependency),
|
6266 |
+
// remove it.
|
6267 |
+
// Since there are no other hooks for marginRight, remove the whole object.
|
6268 |
+
delete this.get;
|
6269 |
+
return;
|
6270 |
}
|
6271 |
|
6272 |
+
// Hook needed; redefine it so that the support test is not executed again.
|
|
|
6273 |
|
6274 |
+
return (this.get = hookFn).apply( this, arguments );
|
6275 |
+
}
|
6276 |
+
};
|
|
|
6277 |
}
|
6278 |
|
|
|
|
|
|
|
|
|
|
|
6279 |
|
6280 |
+
(function() {
|
6281 |
+
// Minified: var b,c,d,e,f,g, h,i
|
6282 |
+
var div, style, a, pixelPositionVal, boxSizingReliableVal,
|
6283 |
+
reliableHiddenOffsetsVal, reliableMarginRightVal;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6284 |
|
6285 |
+
// Setup
|
6286 |
+
div = document.createElement( "div" );
|
6287 |
+
div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
|
6288 |
+
a = div.getElementsByTagName( "a" )[ 0 ];
|
6289 |
+
style = a && a.style;
|
6290 |
|
6291 |
+
// Finish early in limited (non-browser) environments
|
6292 |
+
if ( !style ) {
|
6293 |
+
return;
|
|
|
|
|
6294 |
}
|
|
|
|
|
6295 |
|
6296 |
+
style.cssText = "float:left;opacity:.5";
|
|
|
|
|
|
|
6297 |
|
6298 |
+
// Support: IE<9
|
6299 |
+
// Make sure that element opacity exists (as opposed to filter)
|
6300 |
+
support.opacity = style.opacity === "0.5";
|
6301 |
|
6302 |
+
// Verify style float existence
|
6303 |
+
// (IE uses styleFloat instead of cssFloat)
|
6304 |
+
support.cssFloat = !!style.cssFloat;
|
|
|
|
|
6305 |
|
6306 |
+
div.style.backgroundClip = "content-box";
|
6307 |
+
div.cloneNode( true ).style.backgroundClip = "";
|
6308 |
+
support.clearCloneStyle = div.style.backgroundClip === "content-box";
|
6309 |
+
|
6310 |
+
// Support: Firefox<29, Android 2.3
|
6311 |
+
// Vendor-prefix box-sizing
|
6312 |
+
support.boxSizing = style.boxSizing === "" || style.MozBoxSizing === "" ||
|
6313 |
+
style.WebkitBoxSizing === "";
|
6314 |
|
6315 |
+
jQuery.extend(support, {
|
6316 |
+
reliableHiddenOffsets: function() {
|
6317 |
+
if ( reliableHiddenOffsetsVal == null ) {
|
6318 |
+
computeStyleTests();
|
6319 |
}
|
6320 |
+
return reliableHiddenOffsetsVal;
|
6321 |
+
},
|
6322 |
|
6323 |
+
boxSizingReliable: function() {
|
6324 |
+
if ( boxSizingReliableVal == null ) {
|
6325 |
+
computeStyleTests();
|
6326 |
+
}
|
6327 |
+
return boxSizingReliableVal;
|
6328 |
+
},
|
6329 |
|
6330 |
+
pixelPosition: function() {
|
6331 |
+
if ( pixelPositionVal == null ) {
|
6332 |
+
computeStyleTests();
|
6333 |
+
}
|
6334 |
+
return pixelPositionVal;
|
6335 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6336 |
|
6337 |
+
// Support: Android 2.3
|
6338 |
+
reliableMarginRight: function() {
|
6339 |
+
if ( reliableMarginRightVal == null ) {
|
6340 |
+
computeStyleTests();
|
6341 |
}
|
6342 |
+
return reliableMarginRightVal;
|
6343 |
}
|
6344 |
+
});
|
6345 |
|
6346 |
+
function computeStyleTests() {
|
6347 |
+
// Minified: var b,c,d,j
|
6348 |
+
var div, body, container, contents;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6349 |
|
6350 |
+
body = document.getElementsByTagName( "body" )[ 0 ];
|
6351 |
+
if ( !body || !body.style ) {
|
6352 |
+
// Test fired too early or in an unsupported environment, exit.
|
6353 |
+
return;
|
6354 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6355 |
|
6356 |
+
// Setup
|
6357 |
+
div = document.createElement( "div" );
|
6358 |
+
container = document.createElement( "div" );
|
6359 |
+
container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
|
6360 |
+
body.appendChild( container ).appendChild( div );
|
6361 |
+
|
6362 |
+
div.style.cssText =
|
6363 |
+
// Support: Firefox<29, Android 2.3
|
6364 |
+
// Vendor-prefix box-sizing
|
6365 |
+
"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" +
|
6366 |
+
"box-sizing:border-box;display:block;margin-top:1%;top:1%;" +
|
6367 |
+
"border:1px;padding:1px;width:4px;position:absolute";
|
6368 |
+
|
6369 |
+
// Support: IE<9
|
6370 |
+
// Assume reasonable values in the absence of getComputedStyle
|
6371 |
+
pixelPositionVal = boxSizingReliableVal = false;
|
6372 |
+
reliableMarginRightVal = true;
|
6373 |
+
|
6374 |
+
// Check for getComputedStyle so that this code is not run in IE<9.
|
6375 |
+
if ( window.getComputedStyle ) {
|
6376 |
+
pixelPositionVal = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
|
6377 |
+
boxSizingReliableVal =
|
6378 |
+
( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
|
6379 |
+
|
6380 |
+
// Support: Android 2.3
|
6381 |
+
// Div with explicit width and no margin-right incorrectly
|
6382 |
+
// gets computed margin-right based on width of container (#3333)
|
6383 |
+
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
|
6384 |
+
contents = div.appendChild( document.createElement( "div" ) );
|
6385 |
+
|
6386 |
+
// Reset CSS: box-sizing; display; margin; border; padding
|
6387 |
+
contents.style.cssText = div.style.cssText =
|
6388 |
+
// Support: Firefox<29, Android 2.3
|
6389 |
+
// Vendor-prefix box-sizing
|
6390 |
+
"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
|
6391 |
+
"box-sizing:content-box;display:block;margin:0;border:0;padding:0";
|
6392 |
+
contents.style.marginRight = contents.style.width = "0";
|
6393 |
+
div.style.width = "1px";
|
6394 |
+
|
6395 |
+
reliableMarginRightVal =
|
6396 |
+
!parseFloat( ( window.getComputedStyle( contents, null ) || {} ).marginRight );
|
6397 |
+
|
6398 |
+
div.removeChild( contents );
|
6399 |
+
}
|
6400 |
+
|
6401 |
+
// Support: IE8
|
6402 |
+
// Check if table cells still have offsetWidth/Height when they are set
|
6403 |
+
// to display:none and there are still other visible table cells in a
|
6404 |
+
// table row; if so, offsetWidth/Height are not reliable for use when
|
6405 |
+
// determining if an element has been hidden directly using
|
6406 |
+
// display:none (it is still safe to use offsets if a parent element is
|
6407 |
+
// hidden; don safety goggles and see bug #4512 for more information).
|
6408 |
+
div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
|
6409 |
+
contents = div.getElementsByTagName( "td" );
|
6410 |
+
contents[ 0 ].style.cssText = "margin:0;border:0;padding:0;display:none";
|
6411 |
+
reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;
|
6412 |
+
if ( reliableHiddenOffsetsVal ) {
|
6413 |
+
contents[ 0 ].style.display = "";
|
6414 |
+
contents[ 1 ].style.display = "none";
|
6415 |
+
reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;
|
6416 |
+
}
|
6417 |
+
|
6418 |
+
body.removeChild( container );
|
6419 |
+
}
|
6420 |
+
|
6421 |
+
})();
|
6422 |
|
|
|
|
|
|
|
|
|
6423 |
|
6424 |
+
// A method for quickly swapping in/out CSS properties to get correct calculations.
|
6425 |
+
jQuery.swap = function( elem, options, callback, args ) {
|
6426 |
+
var ret, name,
|
6427 |
+
old = {};
|
|
|
|
|
|
|
6428 |
|
6429 |
+
// Remember the old values, and insert the new ones
|
6430 |
+
for ( name in options ) {
|
6431 |
+
old[ name ] = elem.style[ name ];
|
6432 |
+
elem.style[ name ] = options[ name ];
|
6433 |
+
}
|
6434 |
|
6435 |
+
ret = callback.apply( elem, args || [] );
|
|
|
|
|
|
|
|
|
|
|
6436 |
|
6437 |
+
// Revert the old values
|
6438 |
+
for ( name in options ) {
|
6439 |
+
elem.style[ name ] = old[ name ];
|
6440 |
+
}
|
|
|
|
|
|
|
6441 |
|
6442 |
+
return ret;
|
6443 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6444 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6445 |
|
6446 |
+
var
|
6447 |
+
ralpha = /alpha\([^)]*\)/i,
|
6448 |
+
ropacity = /opacity\s*=\s*([^)]*)/,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6449 |
|
6450 |
+
// swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
|
6451 |
+
// see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
|
6452 |
+
rdisplayswap = /^(none|table(?!-c[ea]).+)/,
|
6453 |
+
rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ),
|
6454 |
+
rrelNum = new RegExp( "^([+-])=(" + pnum + ")", "i" ),
|
6455 |
|
6456 |
+
cssShow = { position: "absolute", visibility: "hidden", display: "block" },
|
6457 |
+
cssNormalTransform = {
|
6458 |
+
letterSpacing: "0",
|
6459 |
+
fontWeight: "400"
|
6460 |
+
},
|
6461 |
|
6462 |
+
cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
|
|
|
|
|
|
|
|
|
|
|
|
|
6463 |
|
|
|
|
|
6464 |
|
6465 |
+
// return a css property mapped to a potentially vendor prefixed property
|
6466 |
+
function vendorPropName( style, name ) {
|
|
|
6467 |
|
6468 |
+
// shortcut for names that are not vendor prefixed
|
6469 |
+
if ( name in style ) {
|
6470 |
+
return name;
|
6471 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6472 |
|
6473 |
+
// check for vendor prefixed names
|
6474 |
+
var capName = name.charAt(0).toUpperCase() + name.slice(1),
|
6475 |
+
origName = name,
|
6476 |
+
i = cssPrefixes.length;
|
6477 |
+
|
6478 |
+
while ( i-- ) {
|
6479 |
+
name = cssPrefixes[ i ] + capName;
|
6480 |
+
if ( name in style ) {
|
6481 |
+
return name;
|
6482 |
}
|
6483 |
+
}
|
6484 |
+
|
6485 |
+
return origName;
|
6486 |
}
|
6487 |
|
6488 |
+
function showHide( elements, show ) {
|
6489 |
+
var display, elem, hidden,
|
6490 |
+
values = [],
|
6491 |
+
index = 0,
|
6492 |
+
length = elements.length;
|
6493 |
|
6494 |
+
for ( ; index < length; index++ ) {
|
6495 |
+
elem = elements[ index ];
|
6496 |
+
if ( !elem.style ) {
|
6497 |
+
continue;
|
6498 |
+
}
|
6499 |
|
6500 |
+
values[ index ] = jQuery._data( elem, "olddisplay" );
|
6501 |
+
display = elem.style.display;
|
6502 |
+
if ( show ) {
|
6503 |
+
// Reset the inline display of this element to learn if it is
|
6504 |
+
// being hidden by cascaded rules or not
|
6505 |
+
if ( !values[ index ] && display === "none" ) {
|
6506 |
+
elem.style.display = "";
|
6507 |
+
}
|
|
|
6508 |
|
6509 |
+
// Set elements which have been overridden with display: none
|
6510 |
+
// in a stylesheet to whatever the default browser style is
|
6511 |
+
// for such an element
|
6512 |
+
if ( elem.style.display === "" && isHidden( elem ) ) {
|
6513 |
+
values[ index ] = jQuery._data( elem, "olddisplay", defaultDisplay(elem.nodeName) );
|
6514 |
+
}
|
6515 |
+
} else {
|
6516 |
+
hidden = isHidden( elem );
|
6517 |
|
6518 |
+
if ( display && display !== "none" || !hidden ) {
|
6519 |
+
jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) );
|
6520 |
+
}
|
6521 |
+
}
|
6522 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6523 |
|
6524 |
+
// Set the display of most of the elements in a second loop
|
6525 |
+
// to avoid the constant reflow
|
6526 |
+
for ( index = 0; index < length; index++ ) {
|
6527 |
+
elem = elements[ index ];
|
6528 |
+
if ( !elem.style ) {
|
6529 |
+
continue;
|
6530 |
+
}
|
6531 |
+
if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
|
6532 |
+
elem.style.display = show ? values[ index ] || "" : "none";
|
6533 |
+
}
|
6534 |
+
}
|
6535 |
|
6536 |
+
return elements;
|
6537 |
+
}
|
6538 |
+
|
6539 |
+
function setPositiveNumber( elem, value, subtract ) {
|
6540 |
+
var matches = rnumsplit.exec( value );
|
6541 |
+
return matches ?
|
6542 |
+
// Guard against undefined "subtract", e.g., when used as in cssHooks
|
6543 |
+
Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
|
6544 |
+
value;
|
6545 |
+
}
|
6546 |
+
|
6547 |
+
function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
|
6548 |
+
var i = extra === ( isBorderBox ? "border" : "content" ) ?
|
6549 |
+
// If we already have the right measurement, avoid augmentation
|
6550 |
+
4 :
|
6551 |
+
// Otherwise initialize for horizontal or vertical properties
|
6552 |
+
name === "width" ? 1 : 0,
|
6553 |
+
|
6554 |
+
val = 0;
|
6555 |
+
|
6556 |
+
for ( ; i < 4; i += 2 ) {
|
6557 |
+
// both box models exclude margin, so add it if we want it
|
6558 |
+
if ( extra === "margin" ) {
|
6559 |
+
val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
|
6560 |
}
|
6561 |
|
6562 |
+
if ( isBorderBox ) {
|
6563 |
+
// border-box includes padding, so remove it if we want content
|
6564 |
+
if ( extra === "content" ) {
|
6565 |
+
val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
|
6566 |
+
}
|
6567 |
|
6568 |
+
// at this point, extra isn't border nor margin, so remove border
|
6569 |
+
if ( extra !== "margin" ) {
|
6570 |
+
val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
|
6571 |
+
}
|
6572 |
+
} else {
|
6573 |
+
// at this point, extra isn't content, so add padding
|
6574 |
+
val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
|
6575 |
|
6576 |
+
// at this point, extra isn't content nor padding, so add border
|
6577 |
+
if ( extra !== "padding" ) {
|
6578 |
+
val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6579 |
}
|
6580 |
}
|
6581 |
+
}
|
6582 |
|
6583 |
+
return val;
|
6584 |
+
}
|
6585 |
|
6586 |
+
function getWidthOrHeight( elem, name, extra ) {
|
|
|
|
|
|
|
6587 |
|
6588 |
+
// Start with offset property, which is equivalent to the border-box value
|
6589 |
+
var valueIsBorderBox = true,
|
6590 |
+
val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
|
6591 |
+
styles = getStyles( elem ),
|
6592 |
+
isBorderBox = support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
|
|
|
|
|
|
|
6593 |
|
6594 |
+
// some non-html elements return undefined for offsetWidth, so check for null/undefined
|
6595 |
+
// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
|
6596 |
+
// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
|
6597 |
+
if ( val <= 0 || val == null ) {
|
6598 |
+
// Fall back to computed then uncomputed css if necessary
|
6599 |
+
val = curCSS( elem, name, styles );
|
6600 |
+
if ( val < 0 || val == null ) {
|
6601 |
+
val = elem.style[ name ];
|
6602 |
+
}
|
6603 |
|
6604 |
+
// Computed unit is not pixels. Stop here and return.
|
6605 |
+
if ( rnumnonpx.test(val) ) {
|
6606 |
+
return val;
|
6607 |
+
}
|
6608 |
|
6609 |
+
// we need the check for style in case a browser which returns unreliable values
|
6610 |
+
// for getComputedStyle silently falls back to the reliable elem.style
|
6611 |
+
valueIsBorderBox = isBorderBox && ( support.boxSizingReliable() || val === elem.style[ name ] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6612 |
|
6613 |
+
// Normalize "", auto, and prepare for extra
|
6614 |
+
val = parseFloat( val ) || 0;
|
6615 |
+
}
|
|
|
|
|
|
|
|
|
|
|
6616 |
|
6617 |
+
// use the active box-sizing model to add/subtract irrelevant styles
|
6618 |
+
return ( val +
|
6619 |
+
augmentWidthOrHeight(
|
6620 |
+
elem,
|
6621 |
+
name,
|
6622 |
+
extra || ( isBorderBox ? "border" : "content" ),
|
6623 |
+
valueIsBorderBox,
|
6624 |
+
styles
|
6625 |
+
)
|
6626 |
+
) + "px";
|
6627 |
+
}
|
6628 |
|
6629 |
+
jQuery.extend({
|
6630 |
+
// Add in style property hooks for overriding the default
|
6631 |
+
// behavior of getting and setting a style property
|
6632 |
+
cssHooks: {
|
6633 |
+
opacity: {
|
6634 |
+
get: function( elem, computed ) {
|
6635 |
+
if ( computed ) {
|
6636 |
+
// We should always get a number back from opacity
|
6637 |
+
var ret = curCSS( elem, "opacity" );
|
6638 |
+
return ret === "" ? "1" : ret;
|
6639 |
}
|
|
|
6640 |
}
|
6641 |
}
|
6642 |
+
},
|
6643 |
|
6644 |
+
// Don't automatically add "px" to these possibly-unitless properties
|
6645 |
+
cssNumber: {
|
6646 |
+
"columnCount": true,
|
6647 |
+
"fillOpacity": true,
|
6648 |
+
"flexGrow": true,
|
6649 |
+
"flexShrink": true,
|
6650 |
+
"fontWeight": true,
|
6651 |
+
"lineHeight": true,
|
6652 |
+
"opacity": true,
|
6653 |
+
"order": true,
|
6654 |
+
"orphans": true,
|
6655 |
+
"widows": true,
|
6656 |
+
"zIndex": true,
|
6657 |
+
"zoom": true
|
6658 |
},
|
6659 |
|
6660 |
+
// Add in properties whose names you wish to fix before
|
6661 |
+
// setting or getting the value
|
6662 |
+
cssProps: {
|
6663 |
+
// normalize float css property
|
6664 |
+
"float": support.cssFloat ? "cssFloat" : "styleFloat"
|
6665 |
+
},
|
6666 |
|
6667 |
+
// Get and set the style property on a DOM Node
|
6668 |
+
style: function( elem, name, value, extra ) {
|
6669 |
+
// Don't set styles on text and comment nodes
|
6670 |
+
if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
|
6671 |
+
return;
|
6672 |
}
|
6673 |
|
6674 |
+
// Make sure that we're working with the right name
|
6675 |
+
var ret, type, hooks,
|
6676 |
+
origName = jQuery.camelCase( name ),
|
6677 |
+
style = elem.style;
|
6678 |
|
6679 |
+
name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
|
|
|
|
|
|
|
|
|
6680 |
|
6681 |
+
// gets hook for the prefixed version
|
6682 |
+
// followed by the unprefixed version
|
6683 |
+
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
|
|
|
|
|
6684 |
|
6685 |
+
// Check if we're setting a value
|
6686 |
+
if ( value !== undefined ) {
|
6687 |
+
type = typeof value;
|
|
|
6688 |
|
6689 |
+
// convert relative number strings (+= or -=) to relative numbers. #7345
|
6690 |
+
if ( type === "string" && (ret = rrelNum.exec( value )) ) {
|
6691 |
+
value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
|
6692 |
+
// Fixes bug #9237
|
6693 |
+
type = "number";
|
6694 |
+
}
|
6695 |
|
6696 |
+
// Make sure that null and NaN values aren't set. See: #7116
|
6697 |
+
if ( value == null || value !== value ) {
|
6698 |
+
return;
|
6699 |
+
}
|
6700 |
|
6701 |
+
// If a number was passed in, add 'px' to the (except for certain CSS properties)
|
6702 |
+
if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
|
6703 |
+
value += "px";
|
6704 |
+
}
|
|
|
6705 |
|
6706 |
+
// Fixes #8908, it can be done more correctly by specifing setters in cssHooks,
|
6707 |
+
// but it would mean to define eight (for every problematic property) identical functions
|
6708 |
+
if ( !support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) {
|
6709 |
+
style[ name ] = "inherit";
|
6710 |
+
}
|
6711 |
|
6712 |
+
// If a hook was provided, use that value, otherwise just set the specified value
|
6713 |
+
if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
|
6714 |
|
6715 |
+
// Support: IE
|
6716 |
+
// Swallow errors from 'invalid' CSS values (#5509)
|
6717 |
+
try {
|
6718 |
+
style[ name ] = value;
|
6719 |
+
} catch(e) {}
|
6720 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6721 |
|
6722 |
+
} else {
|
6723 |
+
// If a hook was provided get the non-computed value from there
|
6724 |
+
if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
|
6725 |
+
return ret;
|
6726 |
+
}
|
6727 |
|
6728 |
+
// Otherwise just get the value from the style object
|
6729 |
+
return style[ name ];
|
6730 |
}
|
6731 |
+
},
|
6732 |
|
6733 |
+
css: function( elem, name, extra, styles ) {
|
6734 |
+
var num, val, hooks,
|
6735 |
+
origName = jQuery.camelCase( name );
|
6736 |
|
6737 |
+
// Make sure that we're working with the right name
|
6738 |
+
name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
|
|
|
6739 |
|
6740 |
+
// gets hook for the prefixed version
|
6741 |
+
// followed by the unprefixed version
|
6742 |
+
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
|
6743 |
|
6744 |
+
// If a hook was provided get the computed value from there
|
6745 |
+
if ( hooks && "get" in hooks ) {
|
6746 |
+
val = hooks.get( elem, true, extra );
|
|
|
6747 |
}
|
6748 |
|
6749 |
+
// Otherwise, if a way to get the computed value exists, use that
|
6750 |
+
if ( val === undefined ) {
|
6751 |
+
val = curCSS( elem, name, styles );
|
6752 |
+
}
|
|
|
|
|
|
|
|
|
6753 |
|
6754 |
+
//convert "normal" to computed value
|
6755 |
+
if ( val === "normal" && name in cssNormalTransform ) {
|
6756 |
+
val = cssNormalTransform[ name ];
|
|
|
|
|
6757 |
}
|
|
|
|
|
6758 |
|
6759 |
+
// Return, converting to number if forced or a qualifier was provided and val looks numeric
|
6760 |
+
if ( extra === "" || extra ) {
|
6761 |
+
num = parseFloat( val );
|
6762 |
+
return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
|
6763 |
+
}
|
6764 |
+
return val;
|
6765 |
+
}
|
6766 |
+
});
|
6767 |
|
6768 |
+
jQuery.each([ "height", "width" ], function( i, name ) {
|
6769 |
+
jQuery.cssHooks[ name ] = {
|
6770 |
+
get: function( elem, computed, extra ) {
|
6771 |
+
if ( computed ) {
|
6772 |
+
// certain elements can have dimension info if we invisibly show them
|
6773 |
+
// however, it must have a current display style that would benefit from this
|
6774 |
+
return rdisplayswap.test( jQuery.css( elem, "display" ) ) && elem.offsetWidth === 0 ?
|
6775 |
+
jQuery.swap( elem, cssShow, function() {
|
6776 |
+
return getWidthOrHeight( elem, name, extra );
|
6777 |
+
}) :
|
6778 |
+
getWidthOrHeight( elem, name, extra );
|
6779 |
}
|
6780 |
+
},
|
6781 |
|
6782 |
+
set: function( elem, value, extra ) {
|
6783 |
+
var styles = extra && getStyles( elem );
|
6784 |
+
return setPositiveNumber( elem, value, extra ?
|
6785 |
+
augmentWidthOrHeight(
|
6786 |
+
elem,
|
6787 |
+
name,
|
6788 |
+
extra,
|
6789 |
+
support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
|
6790 |
+
styles
|
6791 |
+
) : 0
|
6792 |
+
);
|
6793 |
+
}
|
6794 |
+
};
|
6795 |
});
|
6796 |
|
6797 |
+
if ( !support.opacity ) {
|
6798 |
+
jQuery.cssHooks.opacity = {
|
6799 |
+
get: function( elem, computed ) {
|
6800 |
+
// IE uses filters for opacity
|
6801 |
+
return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
|
6802 |
+
( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
|
6803 |
+
computed ? "1" : "";
|
6804 |
+
},
|
6805 |
|
6806 |
+
set: function( elem, value ) {
|
6807 |
+
var style = elem.style,
|
6808 |
+
currentStyle = elem.currentStyle,
|
6809 |
+
opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
|
6810 |
+
filter = currentStyle && currentStyle.filter || style.filter || "";
|
6811 |
|
6812 |
+
// IE has trouble with opacity if it does not have layout
|
6813 |
+
// Force it by setting the zoom level
|
6814 |
+
style.zoom = 1;
|
|
|
|
|
6815 |
|
6816 |
+
// if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
|
6817 |
+
// if value === "", then remove inline opacity #12685
|
6818 |
+
if ( ( value >= 1 || value === "" ) &&
|
6819 |
+
jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
|
6820 |
+
style.removeAttribute ) {
|
6821 |
|
6822 |
+
// Setting style.filter to null, "" & " " still leave "filter:" in the cssText
|
6823 |
+
// if "filter:" is present at all, clearType is disabled, we want to avoid this
|
6824 |
+
// style.removeAttribute is IE Only, but so apparently is this code path...
|
6825 |
+
style.removeAttribute( "filter" );
|
6826 |
|
6827 |
+
// if there is no filter style applied in a css rule or unset inline opacity, we are done
|
6828 |
+
if ( value === "" || currentStyle && !currentStyle.filter ) {
|
6829 |
+
return;
|
6830 |
+
}
|
6831 |
+
}
|
|
|
6832 |
|
6833 |
+
// otherwise, set new filter values
|
6834 |
+
style.filter = ralpha.test( filter ) ?
|
6835 |
+
filter.replace( ralpha, opacity ) :
|
6836 |
+
filter + " " + opacity;
|
6837 |
+
}
|
6838 |
+
};
|
6839 |
}
|
|
|
|
|
|
|
6840 |
|
6841 |
+
jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,
|
6842 |
+
function( elem, computed ) {
|
6843 |
+
if ( computed ) {
|
6844 |
+
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
|
6845 |
+
// Work around by temporarily setting element display to inline-block
|
6846 |
+
return jQuery.swap( elem, { "display": "inline-block" },
|
6847 |
+
curCSS, [ elem, "marginRight" ] );
|
6848 |
}
|
6849 |
}
|
6850 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6851 |
|
6852 |
+
// These hooks are used by animate to expand properties
|
6853 |
+
jQuery.each({
|
6854 |
+
margin: "",
|
6855 |
+
padding: "",
|
6856 |
+
border: "Width"
|
6857 |
+
}, function( prefix, suffix ) {
|
6858 |
+
jQuery.cssHooks[ prefix + suffix ] = {
|
6859 |
+
expand: function( value ) {
|
6860 |
+
var i = 0,
|
6861 |
+
expanded = {},
|
6862 |
|
6863 |
+
// assumes a single number if not a string
|
6864 |
+
parts = typeof value === "string" ? value.split(" ") : [ value ];
|
|
|
|
|
|
|
6865 |
|
6866 |
+
for ( ; i < 4; i++ ) {
|
6867 |
+
expanded[ prefix + cssExpand[ i ] + suffix ] =
|
6868 |
+
parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
|
6869 |
+
}
|
|
|
|
|
|
|
|
|
6870 |
|
6871 |
+
return expanded;
|
|
|
|
|
|
|
|
|
6872 |
}
|
6873 |
+
};
|
6874 |
|
6875 |
+
if ( !rmargin.test( prefix ) ) {
|
6876 |
+
jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
|
6877 |
+
}
|
6878 |
+
});
|
6879 |
|
6880 |
+
jQuery.fn.extend({
|
6881 |
+
css: function( name, value ) {
|
6882 |
+
return access( this, function( elem, name, value ) {
|
6883 |
+
var styles, len,
|
6884 |
+
map = {},
|
6885 |
+
i = 0;
|
6886 |
|
6887 |
+
if ( jQuery.isArray( name ) ) {
|
6888 |
+
styles = getStyles( elem );
|
6889 |
+
len = name.length;
|
6890 |
|
6891 |
+
for ( ; i < len; i++ ) {
|
6892 |
+
map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
|
6893 |
}
|
6894 |
|
6895 |
+
return map;
|
6896 |
+
}
|
|
|
6897 |
|
6898 |
+
return value !== undefined ?
|
6899 |
+
jQuery.style( elem, name, value ) :
|
6900 |
+
jQuery.css( elem, name );
|
6901 |
+
}, name, value, arguments.length > 1 );
|
6902 |
},
|
6903 |
+
show: function() {
|
6904 |
+
return showHide( this, true );
|
6905 |
+
},
|
6906 |
+
hide: function() {
|
6907 |
+
return showHide( this );
|
6908 |
+
},
|
6909 |
+
toggle: function( state ) {
|
6910 |
+
if ( typeof state === "boolean" ) {
|
6911 |
+
return state ? this.show() : this.hide();
|
6912 |
}
|
6913 |
|
6914 |
return this.each(function() {
|
6915 |
+
if ( isHidden( this ) ) {
|
6916 |
+
jQuery( this ).show();
|
|
|
|
|
|
|
|
|
6917 |
} else {
|
6918 |
+
jQuery( this ).hide();
|
6919 |
}
|
6920 |
});
|
6921 |
+
}
|
6922 |
+
});
|
|
|
|
|
6923 |
|
|
|
|
|
|
|
|
|
6924 |
|
6925 |
+
function Tween( elem, options, prop, end, easing ) {
|
6926 |
+
return new Tween.prototype.init( elem, options, prop, end, easing );
|
6927 |
+
}
|
6928 |
+
jQuery.Tween = Tween;
|
|
|
|
|
|
|
6929 |
|
6930 |
+
Tween.prototype = {
|
6931 |
+
constructor: Tween,
|
6932 |
+
init: function( elem, options, prop, end, easing, unit ) {
|
6933 |
+
this.elem = elem;
|
6934 |
+
this.prop = prop;
|
6935 |
+
this.easing = easing || "swing";
|
6936 |
+
this.options = options;
|
6937 |
+
this.start = this.now = this.cur();
|
6938 |
+
this.end = end;
|
6939 |
+
this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
|
6940 |
},
|
6941 |
+
cur: function() {
|
6942 |
+
var hooks = Tween.propHooks[ this.prop ];
|
6943 |
|
6944 |
+
return hooks && hooks.get ?
|
6945 |
+
hooks.get( this ) :
|
6946 |
+
Tween.propHooks._default.get( this );
|
|
|
|
|
|
|
6947 |
},
|
6948 |
+
run: function( percent ) {
|
6949 |
+
var eased,
|
6950 |
+
hooks = Tween.propHooks[ this.prop ];
|
6951 |
|
6952 |
+
if ( this.options.duration ) {
|
6953 |
+
this.pos = eased = jQuery.easing[ this.easing ](
|
6954 |
+
percent, this.options.duration * percent, 0, 1, this.options.duration
|
6955 |
+
);
|
6956 |
+
} else {
|
6957 |
+
this.pos = eased = percent;
|
6958 |
}
|
6959 |
+
this.now = ( this.end - this.start ) * eased + this.start;
|
6960 |
|
6961 |
+
if ( this.options.step ) {
|
6962 |
+
this.options.step.call( this.elem, this.now, this );
|
|
|
6963 |
}
|
|
|
6964 |
|
6965 |
+
if ( hooks && hooks.set ) {
|
6966 |
+
hooks.set( this );
|
6967 |
+
} else {
|
6968 |
+
Tween.propHooks._default.set( this );
|
|
|
6969 |
}
|
6970 |
+
return this;
|
6971 |
+
}
|
6972 |
+
};
|
6973 |
|
6974 |
+
Tween.prototype.init.prototype = Tween.prototype;
|
|
|
|
|
|
|
|
|
6975 |
|
6976 |
+
Tween.propHooks = {
|
6977 |
+
_default: {
|
6978 |
+
get: function( tween ) {
|
6979 |
+
var result;
|
6980 |
|
6981 |
+
if ( tween.elem[ tween.prop ] != null &&
|
6982 |
+
(!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
|
6983 |
+
return tween.elem[ tween.prop ];
|
6984 |
+
}
|
|
|
|
|
6985 |
|
6986 |
+
// passing an empty string as a 3rd parameter to .css will automatically
|
6987 |
+
// attempt a parseFloat and fallback to a string if the parse fails
|
6988 |
+
// so, simple values such as "10px" are parsed to Float.
|
6989 |
+
// complex values such as "rotate(1rad)" are returned as is.
|
6990 |
+
result = jQuery.css( tween.elem, tween.prop, "" );
|
6991 |
+
// Empty strings, null, undefined and "auto" are converted to 0.
|
6992 |
+
return !result || result === "auto" ? 0 : result;
|
6993 |
+
},
|
6994 |
+
set: function( tween ) {
|
6995 |
+
// use step hook for back compat - use cssHook if its there - use .style if its
|
6996 |
+
// available and use plain properties where available
|
6997 |
+
if ( jQuery.fx.step[ tween.prop ] ) {
|
6998 |
+
jQuery.fx.step[ tween.prop ]( tween );
|
6999 |
+
} else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
|
7000 |
+
jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
|
7001 |
+
} else {
|
7002 |
+
tween.elem[ tween.prop ] = tween.now;
|
7003 |
}
|
7004 |
}
|
7005 |
+
}
|
7006 |
+
};
|
7007 |
|
7008 |
+
// Support: IE <=9
|
7009 |
+
// Panic based approach to setting things on disconnected nodes
|
7010 |
+
|
7011 |
+
Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
|
7012 |
+
set: function( tween ) {
|
7013 |
+
if ( tween.elem.nodeType && tween.elem.parentNode ) {
|
7014 |
+
tween.elem[ tween.prop ] = tween.now;
|
7015 |
+
}
|
7016 |
+
}
|
7017 |
+
};
|
7018 |
+
|
7019 |
+
jQuery.easing = {
|
7020 |
+
linear: function( p ) {
|
7021 |
+
return p;
|
7022 |
},
|
7023 |
+
swing: function( p ) {
|
7024 |
+
return 0.5 - Math.cos( p * Math.PI ) / 2;
|
7025 |
+
}
|
7026 |
+
};
|
7027 |
|
7028 |
+
jQuery.fx = Tween.prototype.init;
|
|
|
|
|
7029 |
|
7030 |
+
// Back Compat <1.8 extension point
|
7031 |
+
jQuery.fx.step = {};
|
|
|
|
|
|
|
7032 |
|
|
|
|
|
|
|
|
|
|
|
7033 |
|
|
|
|
|
7034 |
|
|
|
|
|
|
|
7035 |
|
7036 |
+
var
|
7037 |
+
fxNow, timerId,
|
7038 |
+
rfxtypes = /^(?:toggle|show|hide)$/,
|
7039 |
+
rfxnum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ),
|
7040 |
+
rrun = /queueHooks$/,
|
7041 |
+
animationPrefilters = [ defaultPrefilter ],
|
7042 |
+
tweeners = {
|
7043 |
+
"*": [ function( prop, value ) {
|
7044 |
+
var tween = this.createTween( prop, value ),
|
7045 |
+
target = tween.cur(),
|
7046 |
+
parts = rfxnum.exec( value ),
|
7047 |
+
unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
|
7048 |
|
7049 |
+
// Starting value computation is required for potential unit mismatches
|
7050 |
+
start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) &&
|
7051 |
+
rfxnum.exec( jQuery.css( tween.elem, prop ) ),
|
7052 |
+
scale = 1,
|
7053 |
+
maxIterations = 20;
|
7054 |
|
7055 |
+
if ( start && start[ 3 ] !== unit ) {
|
7056 |
+
// Trust units reported by jQuery.css
|
7057 |
+
unit = unit || start[ 3 ];
|
7058 |
+
|
7059 |
+
// Make sure we update the tween properties later on
|
7060 |
+
parts = parts || [];
|
7061 |
+
|
7062 |
+
// Iteratively approximate from a nonzero starting point
|
7063 |
+
start = +target || 1;
|
7064 |
+
|
7065 |
+
do {
|
7066 |
+
// If previous iteration zeroed out, double until we get *something*
|
7067 |
+
// Use a string for doubling factor so we don't accidentally see scale as unchanged below
|
7068 |
+
scale = scale || ".5";
|
7069 |
+
|
7070 |
+
// Adjust and apply
|
7071 |
+
start = start / scale;
|
7072 |
+
jQuery.style( tween.elem, prop, start + unit );
|
7073 |
+
|
7074 |
+
// Update scale, tolerating zero or NaN from tween.cur()
|
7075 |
+
// And breaking the loop if scale is unchanged or perfect, or if we've just had enough
|
7076 |
+
} while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
|
7077 |
}
|
7078 |
|
7079 |
+
// Update tween properties
|
7080 |
+
if ( parts ) {
|
7081 |
+
start = tween.start = +start || +target || 0;
|
7082 |
+
tween.unit = unit;
|
7083 |
+
// If a +=/-= token was provided, we're doing a relative animation
|
7084 |
+
tween.end = parts[ 1 ] ?
|
7085 |
+
start + ( parts[ 1 ] + 1 ) * parts[ 2 ] :
|
7086 |
+
+parts[ 2 ];
|
7087 |
+
}
|
7088 |
|
7089 |
+
return tween;
|
7090 |
+
} ]
|
7091 |
+
};
|
7092 |
|
7093 |
+
// Animations created synchronously will run synchronously
|
7094 |
+
function createFxNow() {
|
7095 |
+
setTimeout(function() {
|
7096 |
+
fxNow = undefined;
|
7097 |
+
});
|
7098 |
+
return ( fxNow = jQuery.now() );
|
7099 |
+
}
|
|
|
|
|
7100 |
|
7101 |
+
// Generate parameters to create a standard animation
|
7102 |
+
function genFx( type, includeWidth ) {
|
7103 |
+
var which,
|
7104 |
+
attrs = { height: type },
|
7105 |
+
i = 0;
|
7106 |
|
7107 |
+
// if we include width, step value is 1 to do all cssExpand values,
|
7108 |
+
// if we don't include width, step value is 2 to skip over Left and Right
|
7109 |
+
includeWidth = includeWidth ? 1 : 0;
|
7110 |
+
for ( ; i < 4 ; i += 2 - includeWidth ) {
|
7111 |
+
which = cssExpand[ i ];
|
7112 |
+
attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
|
7113 |
+
}
|
7114 |
|
7115 |
+
if ( includeWidth ) {
|
7116 |
+
attrs.opacity = attrs.width = type;
|
7117 |
+
}
|
|
|
|
|
7118 |
|
7119 |
+
return attrs;
|
7120 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7121 |
|
7122 |
+
function createTween( value, prop, animation ) {
|
7123 |
+
var tween,
|
7124 |
+
collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
|
7125 |
+
index = 0,
|
7126 |
+
length = collection.length;
|
7127 |
+
for ( ; index < length; index++ ) {
|
7128 |
+
if ( (tween = collection[ index ].call( animation, prop, value )) ) {
|
7129 |
|
7130 |
+
// we're done with this property
|
7131 |
+
return tween;
|
7132 |
+
}
|
7133 |
+
}
|
7134 |
+
}
|
7135 |
|
7136 |
+
function defaultPrefilter( elem, props, opts ) {
|
7137 |
+
/* jshint validthis: true */
|
7138 |
+
var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
|
7139 |
+
anim = this,
|
7140 |
+
orig = {},
|
7141 |
+
style = elem.style,
|
7142 |
+
hidden = elem.nodeType && isHidden( elem ),
|
7143 |
+
dataShow = jQuery._data( elem, "fxshow" );
|
7144 |
|
7145 |
+
// handle queue: false promises
|
7146 |
+
if ( !opts.queue ) {
|
7147 |
+
hooks = jQuery._queueHooks( elem, "fx" );
|
7148 |
+
if ( hooks.unqueued == null ) {
|
7149 |
+
hooks.unqueued = 0;
|
7150 |
+
oldfire = hooks.empty.fire;
|
7151 |
+
hooks.empty.fire = function() {
|
7152 |
+
if ( !hooks.unqueued ) {
|
7153 |
+
oldfire();
|
7154 |
}
|
7155 |
+
};
|
7156 |
}
|
7157 |
+
hooks.unqueued++;
|
7158 |
|
7159 |
+
anim.always(function() {
|
7160 |
+
// doing this makes sure that the complete handler will be called
|
7161 |
+
// before this completes
|
7162 |
+
anim.always(function() {
|
7163 |
+
hooks.unqueued--;
|
7164 |
+
if ( !jQuery.queue( elem, "fx" ).length ) {
|
7165 |
+
hooks.empty.fire();
|
7166 |
+
}
|
7167 |
+
});
|
7168 |
+
});
|
7169 |
+
}
|
7170 |
|
7171 |
+
// height/width overflow pass
|
7172 |
+
if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
|
7173 |
+
// Make sure that nothing sneaks out
|
7174 |
+
// Record all 3 overflow attributes because IE does not
|
7175 |
+
// change the overflow attribute when overflowX and
|
7176 |
+
// overflowY are set to the same value
|
7177 |
+
opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
|
7178 |
|
7179 |
+
// Set display property to inline-block for height/width
|
7180 |
+
// animations on inline elements that are having width/height animated
|
7181 |
+
display = jQuery.css( elem, "display" );
|
7182 |
|
7183 |
+
// Test default display if display is currently "none"
|
7184 |
+
checkDisplay = display === "none" ?
|
7185 |
+
jQuery._data( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display;
|
7186 |
|
7187 |
+
if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) {
|
|
|
|
|
|
|
|
|
7188 |
|
7189 |
+
// inline-level elements accept inline-block;
|
7190 |
+
// block-level elements need to be inline with layout
|
7191 |
+
if ( !support.inlineBlockNeedsLayout || defaultDisplay( elem.nodeName ) === "inline" ) {
|
7192 |
+
style.display = "inline-block";
|
7193 |
+
} else {
|
7194 |
+
style.zoom = 1;
|
7195 |
+
}
|
7196 |
}
|
7197 |
+
}
|
7198 |
|
7199 |
+
if ( opts.overflow ) {
|
7200 |
+
style.overflow = "hidden";
|
7201 |
+
if ( !support.shrinkWrapBlocks() ) {
|
7202 |
+
anim.always(function() {
|
7203 |
+
style.overflow = opts.overflow[ 0 ];
|
7204 |
+
style.overflowX = opts.overflow[ 1 ];
|
7205 |
+
style.overflowY = opts.overflow[ 2 ];
|
7206 |
});
|
7207 |
}
|
7208 |
+
}
|
7209 |
|
7210 |
+
// show/hide pass
|
7211 |
+
for ( prop in props ) {
|
7212 |
+
value = props[ prop ];
|
7213 |
+
if ( rfxtypes.exec( value ) ) {
|
7214 |
+
delete props[ prop ];
|
7215 |
+
toggle = toggle || value === "toggle";
|
7216 |
+
if ( value === ( hidden ? "hide" : "show" ) ) {
|
7217 |
|
7218 |
+
// If there is dataShow left over from a stopped hide or show and we are going to proceed with show, we should pretend to be hidden
|
7219 |
+
if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
|
7220 |
+
hidden = true;
|
7221 |
+
} else {
|
7222 |
+
continue;
|
7223 |
+
}
|
7224 |
}
|
7225 |
+
orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
|
7226 |
|
7227 |
+
// Any non-fx value stops us from restoring the original display value
|
7228 |
+
} else {
|
7229 |
+
display = undefined;
|
7230 |
+
}
|
7231 |
+
}
|
7232 |
|
7233 |
+
if ( !jQuery.isEmptyObject( orig ) ) {
|
7234 |
+
if ( dataShow ) {
|
7235 |
+
if ( "hidden" in dataShow ) {
|
7236 |
+
hidden = dataShow.hidden;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7237 |
}
|
7238 |
+
} else {
|
7239 |
+
dataShow = jQuery._data( elem, "fxshow", {} );
|
7240 |
+
}
|
7241 |
|
7242 |
+
// store state if its toggle - enables .stop().toggle() to "reverse"
|
7243 |
+
if ( toggle ) {
|
7244 |
+
dataShow.hidden = !hidden;
|
7245 |
+
}
|
7246 |
+
if ( hidden ) {
|
7247 |
+
jQuery( elem ).show();
|
7248 |
+
} else {
|
7249 |
+
anim.done(function() {
|
7250 |
+
jQuery( elem ).hide();
|
7251 |
+
});
|
7252 |
+
}
|
7253 |
+
anim.done(function() {
|
7254 |
+
var prop;
|
7255 |
+
jQuery._removeData( elem, "fxshow" );
|
7256 |
+
for ( prop in orig ) {
|
7257 |
+
jQuery.style( elem, prop, orig[ prop ] );
|
7258 |
+
}
|
7259 |
+
});
|
7260 |
+
for ( prop in orig ) {
|
7261 |
+
tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
|
|
|
7262 |
|
7263 |
+
if ( !( prop in dataShow ) ) {
|
7264 |
+
dataShow[ prop ] = tween.start;
|
7265 |
+
if ( hidden ) {
|
7266 |
+
tween.end = tween.start;
|
7267 |
+
tween.start = prop === "width" || prop === "height" ? 1 : 0;
|
7268 |
+
}
|
7269 |
}
|
7270 |
}
|
7271 |
|
7272 |
+
// If this is a noop like .hide().hide(), restore an overwritten display value
|
7273 |
+
} else if ( (display === "none" ? defaultDisplay( elem.nodeName ) : display) === "inline" ) {
|
7274 |
+
style.display = display;
|
7275 |
}
|
|
|
|
|
|
|
|
|
7276 |
}
|
7277 |
|
7278 |
+
function propFilter( props, specialEasing ) {
|
7279 |
+
var index, name, easing, value, hooks;
|
7280 |
|
7281 |
+
// camelCase, specialEasing and expand cssHook pass
|
7282 |
+
for ( index in props ) {
|
7283 |
+
name = jQuery.camelCase( index );
|
7284 |
+
easing = specialEasing[ name ];
|
7285 |
+
value = props[ index ];
|
7286 |
+
if ( jQuery.isArray( value ) ) {
|
7287 |
+
easing = value[ 1 ];
|
7288 |
+
value = props[ index ] = value[ 0 ];
|
7289 |
+
}
|
7290 |
|
7291 |
+
if ( index !== name ) {
|
7292 |
+
props[ name ] = value;
|
7293 |
+
delete props[ index ];
|
7294 |
+
}
|
7295 |
|
7296 |
+
hooks = jQuery.cssHooks[ name ];
|
7297 |
+
if ( hooks && "expand" in hooks ) {
|
7298 |
+
value = hooks.expand( value );
|
7299 |
+
delete props[ name ];
|
7300 |
|
7301 |
+
// not quite $.extend, this wont overwrite keys already present.
|
7302 |
+
// also - reusing 'index' from above because we have the correct "name"
|
7303 |
+
for ( index in value ) {
|
7304 |
+
if ( !( index in props ) ) {
|
7305 |
+
props[ index ] = value[ index ];
|
7306 |
+
specialEasing[ index ] = easing;
|
7307 |
+
}
|
7308 |
}
|
7309 |
+
} else {
|
7310 |
+
specialEasing[ name ] = easing;
|
7311 |
}
|
7312 |
}
|
|
|
|
|
|
|
|
|
|
|
7313 |
}
|
7314 |
|
7315 |
+
function Animation( elem, properties, options ) {
|
7316 |
+
var result,
|
7317 |
+
stopped,
|
7318 |
+
index = 0,
|
7319 |
+
length = animationPrefilters.length,
|
7320 |
+
deferred = jQuery.Deferred().always( function() {
|
7321 |
+
// don't match elem in the :animated selector
|
7322 |
+
delete tick.elem;
|
7323 |
+
}),
|
7324 |
+
tick = function() {
|
7325 |
+
if ( stopped ) {
|
7326 |
+
return false;
|
7327 |
+
}
|
7328 |
+
var currentTime = fxNow || createFxNow(),
|
7329 |
+
remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
|
7330 |
+
// archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
|
7331 |
+
temp = remaining / animation.duration || 0,
|
7332 |
+
percent = 1 - temp,
|
7333 |
+
index = 0,
|
7334 |
+
length = animation.tweens.length;
|
7335 |
+
|
7336 |
+
for ( ; index < length ; index++ ) {
|
7337 |
+
animation.tweens[ index ].run( percent );
|
7338 |
+
}
|
7339 |
+
|
7340 |
+
deferred.notifyWith( elem, [ animation, percent, remaining ]);
|
7341 |
+
|
7342 |
+
if ( percent < 1 && length ) {
|
7343 |
+
return remaining;
|
7344 |
+
} else {
|
7345 |
+
deferred.resolveWith( elem, [ animation ] );
|
7346 |
+
return false;
|
7347 |
+
}
|
7348 |
+
},
|
7349 |
+
animation = deferred.promise({
|
7350 |
+
elem: elem,
|
7351 |
+
props: jQuery.extend( {}, properties ),
|
7352 |
+
opts: jQuery.extend( true, { specialEasing: {} }, options ),
|
7353 |
+
originalProperties: properties,
|
7354 |
+
originalOptions: options,
|
7355 |
+
startTime: fxNow || createFxNow(),
|
7356 |
+
duration: options.duration,
|
7357 |
+
tweens: [],
|
7358 |
+
createTween: function( prop, end ) {
|
7359 |
+
var tween = jQuery.Tween( elem, animation.opts, prop, end,
|
7360 |
+
animation.opts.specialEasing[ prop ] || animation.opts.easing );
|
7361 |
+
animation.tweens.push( tween );
|
7362 |
+
return tween;
|
7363 |
+
},
|
7364 |
+
stop: function( gotoEnd ) {
|
7365 |
+
var index = 0,
|
7366 |
+
// if we are going to the end, we want to run all the tweens
|
7367 |
+
// otherwise we skip this part
|
7368 |
+
length = gotoEnd ? animation.tweens.length : 0;
|
7369 |
+
if ( stopped ) {
|
7370 |
+
return this;
|
7371 |
+
}
|
7372 |
+
stopped = true;
|
7373 |
+
for ( ; index < length ; index++ ) {
|
7374 |
+
animation.tweens[ index ].run( 1 );
|
7375 |
+
}
|
7376 |
+
|
7377 |
+
// resolve when we played the last frame
|
7378 |
+
// otherwise, reject
|
7379 |
+
if ( gotoEnd ) {
|
7380 |
+
deferred.resolveWith( elem, [ animation, gotoEnd ] );
|
7381 |
+
} else {
|
7382 |
+
deferred.rejectWith( elem, [ animation, gotoEnd ] );
|
7383 |
+
}
|
7384 |
+
return this;
|
7385 |
+
}
|
7386 |
+
}),
|
7387 |
+
props = animation.props;
|
7388 |
+
|
7389 |
+
propFilter( props, animation.opts.specialEasing );
|
7390 |
|
7391 |
+
for ( ; index < length ; index++ ) {
|
7392 |
+
result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
|
7393 |
+
if ( result ) {
|
7394 |
+
return result;
|
7395 |
+
}
|
7396 |
}
|
7397 |
|
7398 |
+
jQuery.map( props, createTween, animation );
|
|
|
|
|
|
|
|
|
7399 |
|
7400 |
+
if ( jQuery.isFunction( animation.opts.start ) ) {
|
7401 |
+
animation.opts.start.call( elem, animation );
|
|
|
|
|
7402 |
}
|
7403 |
|
7404 |
+
jQuery.fx.timer(
|
7405 |
+
jQuery.extend( tick, {
|
7406 |
+
elem: elem,
|
7407 |
+
anim: animation,
|
7408 |
+
queue: animation.opts.queue
|
7409 |
+
})
|
7410 |
+
);
|
7411 |
|
7412 |
+
// attach callbacks from options
|
7413 |
+
return animation.progress( animation.opts.progress )
|
7414 |
+
.done( animation.opts.done, animation.opts.complete )
|
7415 |
+
.fail( animation.opts.fail )
|
7416 |
+
.always( animation.opts.always );
|
7417 |
+
}
|
7418 |
|
7419 |
+
jQuery.Animation = jQuery.extend( Animation, {
|
7420 |
+
tweener: function( props, callback ) {
|
7421 |
+
if ( jQuery.isFunction( props ) ) {
|
7422 |
+
callback = props;
|
7423 |
+
props = [ "*" ];
|
7424 |
+
} else {
|
7425 |
+
props = props.split(" ");
|
7426 |
}
|
7427 |
|
7428 |
+
var prop,
|
7429 |
+
index = 0,
|
7430 |
+
length = props.length;
|
|
|
|
|
|
|
7431 |
|
7432 |
+
for ( ; index < length ; index++ ) {
|
7433 |
+
prop = props[ index ];
|
7434 |
+
tweeners[ prop ] = tweeners[ prop ] || [];
|
7435 |
+
tweeners[ prop ].unshift( callback );
|
7436 |
}
|
7437 |
+
},
|
7438 |
|
7439 |
+
prefilter: function( callback, prepend ) {
|
7440 |
+
if ( prepend ) {
|
7441 |
+
animationPrefilters.unshift( callback );
|
7442 |
+
} else {
|
7443 |
+
animationPrefilters.push( callback );
|
7444 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7445 |
}
|
7446 |
+
});
|
7447 |
|
7448 |
+
jQuery.speed = function( speed, easing, fn ) {
|
7449 |
+
var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
|
7450 |
+
complete: fn || !fn && easing ||
|
7451 |
+
jQuery.isFunction( speed ) && speed,
|
7452 |
+
duration: speed,
|
7453 |
+
easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
|
7454 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7455 |
|
7456 |
+
opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
|
7457 |
+
opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7458 |
|
7459 |
+
// normalize opt.queue - true/undefined/null -> "fx"
|
7460 |
+
if ( opt.queue == null || opt.queue === true ) {
|
7461 |
+
opt.queue = "fx";
|
|
|
7462 |
}
|
7463 |
|
7464 |
+
// Queueing
|
7465 |
+
opt.old = opt.complete;
|
|
|
7466 |
|
7467 |
+
opt.complete = function() {
|
7468 |
+
if ( jQuery.isFunction( opt.old ) ) {
|
7469 |
+
opt.old.call( this );
|
|
|
7470 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7471 |
|
7472 |
+
if ( opt.queue ) {
|
7473 |
+
jQuery.dequeue( this, opt.queue );
|
7474 |
}
|
7475 |
};
|
|
|
7476 |
|
7477 |
+
return opt;
|
7478 |
+
};
|
|
|
7479 |
|
7480 |
+
jQuery.fn.extend({
|
7481 |
+
fadeTo: function( speed, to, easing, callback ) {
|
7482 |
|
7483 |
+
// show any hidden elements after setting opacity to 0
|
7484 |
+
return this.filter( isHidden ).css( "opacity", 0 ).show()
|
|
|
|
|
7485 |
|
7486 |
+
// animate to the value specified
|
7487 |
+
.end().animate({ opacity: to }, speed, easing, callback );
|
7488 |
+
},
|
7489 |
+
animate: function( prop, speed, easing, callback ) {
|
7490 |
+
var empty = jQuery.isEmptyObject( prop ),
|
7491 |
+
optall = jQuery.speed( speed, easing, callback ),
|
7492 |
+
doAnimation = function() {
|
7493 |
+
// Operate on a copy of prop so per-property easing won't be lost
|
7494 |
+
var anim = Animation( this, jQuery.extend( {}, prop ), optall );
|
7495 |
|
7496 |
+
// Empty animations, or finishing resolves immediately
|
7497 |
+
if ( empty || jQuery._data( this, "finish" ) ) {
|
7498 |
+
anim.stop( true );
|
7499 |
+
}
|
7500 |
+
};
|
7501 |
+
doAnimation.finish = doAnimation;
|
7502 |
|
7503 |
+
return empty || optall.queue === false ?
|
7504 |
+
this.each( doAnimation ) :
|
7505 |
+
this.queue( optall.queue, doAnimation );
|
7506 |
+
},
|
7507 |
+
stop: function( type, clearQueue, gotoEnd ) {
|
7508 |
+
var stopQueue = function( hooks ) {
|
7509 |
+
var stop = hooks.stop;
|
7510 |
+
delete hooks.stop;
|
7511 |
+
stop( gotoEnd );
|
7512 |
+
};
|
7513 |
|
7514 |
+
if ( typeof type !== "string" ) {
|
7515 |
+
gotoEnd = clearQueue;
|
7516 |
+
clearQueue = type;
|
7517 |
+
type = undefined;
|
7518 |
+
}
|
7519 |
+
if ( clearQueue && type !== false ) {
|
7520 |
+
this.queue( type || "fx", [] );
|
7521 |
}
|
7522 |
|
7523 |
+
return this.each(function() {
|
7524 |
+
var dequeue = true,
|
7525 |
+
index = type != null && type + "queueHooks",
|
7526 |
+
timers = jQuery.timers,
|
7527 |
+
data = jQuery._data( this );
|
|
|
|
|
|
|
|
|
7528 |
|
7529 |
+
if ( index ) {
|
7530 |
+
if ( data[ index ] && data[ index ].stop ) {
|
7531 |
+
stopQueue( data[ index ] );
|
7532 |
+
}
|
7533 |
+
} else {
|
7534 |
+
for ( index in data ) {
|
7535 |
+
if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
|
7536 |
+
stopQueue( data[ index ] );
|
7537 |
+
}
|
7538 |
+
}
|
7539 |
+
}
|
7540 |
|
7541 |
+
for ( index = timers.length; index--; ) {
|
7542 |
+
if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
|
7543 |
+
timers[ index ].anim.stop( gotoEnd );
|
7544 |
+
dequeue = false;
|
7545 |
+
timers.splice( index, 1 );
|
|
|
|
|
7546 |
}
|
7547 |
}
|
7548 |
+
|
7549 |
+
// start the next in the queue if the last step wasn't forced
|
7550 |
+
// timers currently will call their complete callbacks, which will dequeue
|
7551 |
+
// but only if they were gotoEnd
|
7552 |
+
if ( dequeue || !gotoEnd ) {
|
7553 |
+
jQuery.dequeue( this, type );
|
7554 |
+
}
|
7555 |
+
});
|
7556 |
+
},
|
7557 |
+
finish: function( type ) {
|
7558 |
+
if ( type !== false ) {
|
7559 |
+
type = type || "fx";
|
7560 |
}
|
7561 |
+
return this.each(function() {
|
7562 |
+
var index,
|
7563 |
+
data = jQuery._data( this ),
|
7564 |
+
queue = data[ type + "queue" ],
|
7565 |
+
hooks = data[ type + "queueHooks" ],
|
7566 |
+
timers = jQuery.timers,
|
7567 |
+
length = queue ? queue.length : 0;
|
7568 |
|
7569 |
+
// enable finishing flag on private data
|
7570 |
+
data.finish = true;
|
|
|
7571 |
|
7572 |
+
// empty the queue first
|
7573 |
+
jQuery.queue( this, type, [] );
|
7574 |
+
|
7575 |
+
if ( hooks && hooks.stop ) {
|
7576 |
+
hooks.stop.call( this, true );
|
7577 |
+
}
|
7578 |
|
7579 |
+
// look for any active animations, and finish them
|
7580 |
+
for ( index = timers.length; index--; ) {
|
7581 |
+
if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
|
7582 |
+
timers[ index ].anim.stop( true );
|
7583 |
+
timers.splice( index, 1 );
|
7584 |
+
}
|
7585 |
+
}
|
7586 |
+
|
7587 |
+
// look for any animations in the old queue and finish them
|
7588 |
+
for ( index = 0; index < length; index++ ) {
|
7589 |
+
if ( queue[ index ] && queue[ index ].finish ) {
|
7590 |
+
queue[ index ].finish.call( this );
|
7591 |
}
|
7592 |
}
|
|
|
7593 |
|
7594 |
+
// turn off finishing flag
|
7595 |
+
delete data.finish;
|
7596 |
+
});
|
7597 |
+
}
|
7598 |
+
});
|
7599 |
|
7600 |
+
jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
|
7601 |
+
var cssFn = jQuery.fn[ name ];
|
7602 |
+
jQuery.fn[ name ] = function( speed, easing, callback ) {
|
7603 |
+
return speed == null || typeof speed === "boolean" ?
|
7604 |
+
cssFn.apply( this, arguments ) :
|
7605 |
+
this.animate( genFx( name, true ), speed, easing, callback );
|
7606 |
+
};
|
7607 |
+
});
|
7608 |
+
|
7609 |
+
// Generate shortcuts for custom animations
|
7610 |
+
jQuery.each({
|
7611 |
+
slideDown: genFx("show"),
|
7612 |
+
slideUp: genFx("hide"),
|
7613 |
+
slideToggle: genFx("toggle"),
|
7614 |
+
fadeIn: { opacity: "show" },
|
7615 |
+
fadeOut: { opacity: "hide" },
|
7616 |
+
fadeToggle: { opacity: "toggle" }
|
7617 |
+
}, function( name, props ) {
|
7618 |
+
jQuery.fn[ name ] = function( speed, easing, callback ) {
|
7619 |
+
return this.animate( props, speed, easing, callback );
|
7620 |
+
};
|
7621 |
+
});
|
7622 |
+
|
7623 |
+
jQuery.timers = [];
|
7624 |
+
jQuery.fx.tick = function() {
|
7625 |
+
var timer,
|
7626 |
+
timers = jQuery.timers,
|
7627 |
+
i = 0;
|
7628 |
|
7629 |
+
fxNow = jQuery.now();
|
|
|
|
|
|
|
7630 |
|
7631 |
+
for ( ; i < timers.length; i++ ) {
|
7632 |
+
timer = timers[ i ];
|
7633 |
+
// Checks the timer has not already been removed
|
7634 |
+
if ( !timer() && timers[ i ] === timer ) {
|
7635 |
+
timers.splice( i--, 1 );
|
7636 |
}
|
7637 |
+
}
|
7638 |
|
7639 |
+
if ( !timers.length ) {
|
7640 |
+
jQuery.fx.stop();
|
7641 |
+
}
|
7642 |
+
fxNow = undefined;
|
7643 |
+
};
|
|
|
|
|
|
|
|
|
7644 |
|
7645 |
+
jQuery.fx.timer = function( timer ) {
|
7646 |
+
jQuery.timers.push( timer );
|
7647 |
+
if ( timer() ) {
|
7648 |
+
jQuery.fx.start();
|
7649 |
+
} else {
|
7650 |
+
jQuery.timers.pop();
|
7651 |
+
}
|
7652 |
+
};
|
|
|
7653 |
|
7654 |
+
jQuery.fx.interval = 13;
|
|
|
7655 |
|
7656 |
+
jQuery.fx.start = function() {
|
7657 |
+
if ( !timerId ) {
|
7658 |
+
timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
|
7659 |
+
}
|
7660 |
+
};
|
7661 |
|
7662 |
+
jQuery.fx.stop = function() {
|
7663 |
+
clearInterval( timerId );
|
7664 |
+
timerId = null;
|
7665 |
+
};
|
7666 |
|
7667 |
+
jQuery.fx.speeds = {
|
7668 |
+
slow: 600,
|
7669 |
+
fast: 200,
|
7670 |
+
// Default speed
|
7671 |
+
_default: 400
|
7672 |
+
};
|
7673 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7674 |
|
7675 |
+
// Based off of the plugin by Clint Helfers, with permission.
|
7676 |
+
// http://blindsignals.com/index.php/2009/07/jquery-delay/
|
7677 |
+
jQuery.fn.delay = function( time, type ) {
|
7678 |
+
time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
|
7679 |
+
type = type || "fx";
|
7680 |
|
7681 |
+
return this.queue( type, function( next, hooks ) {
|
7682 |
+
var timeout = setTimeout( next, time );
|
7683 |
+
hooks.stop = function() {
|
7684 |
+
clearTimeout( timeout );
|
7685 |
+
};
|
7686 |
+
});
|
7687 |
+
};
|
7688 |
|
|
|
|
|
|
|
|
|
7689 |
|
7690 |
+
(function() {
|
7691 |
+
// Minified: var a,b,c,d,e
|
7692 |
+
var input, div, select, a, opt;
|
|
|
|
|
|
|
7693 |
|
7694 |
+
// Setup
|
7695 |
+
div = document.createElement( "div" );
|
7696 |
+
div.setAttribute( "className", "t" );
|
7697 |
+
div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
|
7698 |
+
a = div.getElementsByTagName("a")[ 0 ];
|
7699 |
|
7700 |
+
// First batch of tests.
|
7701 |
+
select = document.createElement("select");
|
7702 |
+
opt = select.appendChild( document.createElement("option") );
|
7703 |
+
input = div.getElementsByTagName("input")[ 0 ];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7704 |
|
7705 |
+
a.style.cssText = "top:1px";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7706 |
|
7707 |
+
// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
|
7708 |
+
support.getSetAttribute = div.className !== "t";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7709 |
|
7710 |
+
// Get the style information from getAttribute
|
7711 |
+
// (IE uses .cssText instead)
|
7712 |
+
support.style = /top/.test( a.getAttribute("style") );
|
7713 |
|
7714 |
+
// Make sure that URLs aren't manipulated
|
7715 |
+
// (IE normalizes it by default)
|
7716 |
+
support.hrefNormalized = a.getAttribute("href") === "/a";
|
|
|
|
|
|
|
|
|
7717 |
|
7718 |
+
// Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
|
7719 |
+
support.checkOn = !!input.value;
|
7720 |
|
7721 |
+
// Make sure that a selected-by-default option has a working selected property.
|
7722 |
+
// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
|
7723 |
+
support.optSelected = opt.selected;
|
7724 |
|
7725 |
+
// Tests for enctype support on a form (#6743)
|
7726 |
+
support.enctype = !!document.createElement("form").enctype;
|
7727 |
|
7728 |
+
// Make sure that the options inside disabled selects aren't marked as disabled
|
7729 |
+
// (WebKit marks them as disabled)
|
7730 |
+
select.disabled = true;
|
7731 |
+
support.optDisabled = !opt.disabled;
|
|
|
7732 |
|
7733 |
+
// Support: IE8 only
|
7734 |
+
// Check if we can trust getAttribute("value")
|
7735 |
+
input = document.createElement( "input" );
|
7736 |
+
input.setAttribute( "value", "" );
|
7737 |
+
support.input = input.getAttribute( "value" ) === "";
|
|
|
7738 |
|
7739 |
+
// Check if an input maintains its value after becoming a radio
|
7740 |
+
input.value = "t";
|
7741 |
+
input.setAttribute( "type", "radio" );
|
7742 |
+
support.radioValue = input.value === "t";
|
7743 |
+
})();
|
7744 |
|
|
|
7745 |
|
7746 |
+
var rreturn = /\r/g;
|
|
|
|
|
|
|
|
|
7747 |
|
7748 |
+
jQuery.fn.extend({
|
7749 |
+
val: function( value ) {
|
7750 |
+
var hooks, ret, isFunction,
|
7751 |
+
elem = this[0];
|
7752 |
|
7753 |
+
if ( !arguments.length ) {
|
7754 |
+
if ( elem ) {
|
7755 |
+
hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
|
7756 |
|
7757 |
+
if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
|
7758 |
+
return ret;
|
7759 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
7760 |
|
7761 |
+
ret = elem.value;
|
7762 |
|
7763 |
+
return typeof ret === "string" ?
|
7764 |
+
// handle most common string cases
|
7765 |
+
ret.replace(rreturn, "") :
|
7766 |
+
// handle cases where value is null/undef or number
|
7767 |
+
ret == null ? "" : ret;
|
7768 |
+
}
|
7769 |
|
7770 |
+
return;
|
7771 |
+
}
|
|
|
|
|
|
|
|
|
7772 |
|
7773 |
+
isFunction = jQuery.isFunction( value );
|
|
|
|
|
|
|
|
|
7774 |
|
7775 |
+
return this.each(function( i ) {
|
7776 |
+
var val;
|
7777 |
|
7778 |
+
if ( this.nodeType !== 1 ) {
|
7779 |
+
return;
|
7780 |
+
}
|
|
|
7781 |
|
7782 |
+
if ( isFunction ) {
|
7783 |
+
val = value.call( this, i, jQuery( this ).val() );
|
7784 |
+
} else {
|
7785 |
+
val = value;
|
7786 |
+
}
|
7787 |
+
|
7788 |
+
// Treat null/undefined as ""; convert numbers to string
|
7789 |
+
if ( val == null ) {
|
7790 |
+
val = "";
|
7791 |
+
} else if ( typeof val === "number" ) {
|
7792 |
+
val += "";
|
7793 |
+
} else if ( jQuery.isArray( val ) ) {
|
7794 |
+
val = jQuery.map( val, function( value ) {
|
7795 |
+
return value == null ? "" : value + "";
|
7796 |
+
});
|
7797 |
+
}
|
7798 |
|
7799 |
+
hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
|
7800 |
|
7801 |
+
// If set returns undefined, fall back to normal setting
|
7802 |
+
if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
|
7803 |
+
this.value = val;
|
7804 |
+
}
|
7805 |
+
});
|
7806 |
}
|
7807 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7808 |
|
7809 |
+
jQuery.extend({
|
7810 |
+
valHooks: {
|
7811 |
+
option: {
|
7812 |
+
get: function( elem ) {
|
7813 |
+
var val = jQuery.find.attr( elem, "value" );
|
7814 |
+
return val != null ?
|
7815 |
+
val :
|
7816 |
+
// Support: IE10-11+
|
7817 |
+
// option.text throws exceptions (#14686, #14858)
|
7818 |
+
jQuery.trim( jQuery.text( elem ) );
|
7819 |
+
}
|
7820 |
+
},
|
7821 |
+
select: {
|
7822 |
+
get: function( elem ) {
|
7823 |
+
var value, option,
|
7824 |
+
options = elem.options,
|
7825 |
+
index = elem.selectedIndex,
|
7826 |
+
one = elem.type === "select-one" || index < 0,
|
7827 |
+
values = one ? null : [],
|
7828 |
+
max = one ? index + 1 : options.length,
|
7829 |
+
i = index < 0 ?
|
7830 |
+
max :
|
7831 |
+
one ? index : 0;
|
7832 |
|
7833 |
+
// Loop through all the selected options
|
7834 |
+
for ( ; i < max; i++ ) {
|
7835 |
+
option = options[ i ];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7836 |
|
7837 |
+
// oldIE doesn't update selected after form reset (#2551)
|
7838 |
+
if ( ( option.selected || i === index ) &&
|
7839 |
+
// Don't return options that are disabled or in a disabled optgroup
|
7840 |
+
( support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
|
7841 |
+
( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
|
7842 |
|
7843 |
+
// Get the specific value for the option
|
7844 |
+
value = jQuery( option ).val();
|
7845 |
|
7846 |
+
// We don't need an array for one selects
|
7847 |
+
if ( one ) {
|
7848 |
+
return value;
|
7849 |
+
}
|
7850 |
|
7851 |
+
// Multi-Selects return an array
|
7852 |
+
values.push( value );
|
7853 |
+
}
|
7854 |
+
}
|
7855 |
|
7856 |
+
return values;
|
7857 |
+
},
|
|
|
|
|
7858 |
|
7859 |
+
set: function( elem, value ) {
|
7860 |
+
var optionSet, option,
|
7861 |
+
options = elem.options,
|
7862 |
+
values = jQuery.makeArray( value ),
|
7863 |
+
i = options.length;
|
7864 |
|
7865 |
+
while ( i-- ) {
|
7866 |
+
option = options[ i ];
|
|
|
|
|
|
|
|
|
7867 |
|
7868 |
+
if ( jQuery.inArray( jQuery.valHooks.option.get( option ), values ) >= 0 ) {
|
|
|
7869 |
|
7870 |
+
// Support: IE6
|
7871 |
+
// When new option element is added to select box we need to
|
7872 |
+
// force reflow of newly added node in order to workaround delay
|
7873 |
+
// of initialization properties
|
7874 |
+
try {
|
7875 |
+
option.selected = optionSet = true;
|
7876 |
|
7877 |
+
} catch ( _ ) {
|
|
|
|
|
|
|
|
|
7878 |
|
7879 |
+
// Will be executed only in IE6
|
7880 |
+
option.scrollHeight;
|
7881 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7882 |
|
7883 |
+
} else {
|
7884 |
+
option.selected = false;
|
7885 |
+
}
|
7886 |
+
}
|
7887 |
+
|
7888 |
+
// Force browsers to behave consistently when non-matching value is set
|
7889 |
+
if ( !optionSet ) {
|
7890 |
+
elem.selectedIndex = -1;
|
7891 |
+
}
|
7892 |
|
7893 |
+
return options;
|
|
|
7894 |
}
|
7895 |
}
|
7896 |
}
|
7897 |
+
});
|
7898 |
|
7899 |
+
// Radios and checkboxes getter/setter
|
7900 |
+
jQuery.each([ "radio", "checkbox" ], function() {
|
7901 |
+
jQuery.valHooks[ this ] = {
|
7902 |
+
set: function( elem, value ) {
|
7903 |
+
if ( jQuery.isArray( value ) ) {
|
7904 |
+
return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
|
7905 |
+
}
|
|
|
|
|
7906 |
}
|
7907 |
+
};
|
7908 |
+
if ( !support.checkOn ) {
|
7909 |
+
jQuery.valHooks[ this ].get = function( elem ) {
|
7910 |
+
// Support: Webkit
|
7911 |
+
// "" is returned instead of "on" if a value isn't specified
|
7912 |
+
return elem.getAttribute("value") === null ? "on" : elem.value;
|
7913 |
+
};
|
7914 |
}
|
7915 |
+
});
|
7916 |
+
|
7917 |
+
|
7918 |
|
7919 |
+
|
7920 |
+
var nodeHook, boolHook,
|
7921 |
+
attrHandle = jQuery.expr.attrHandle,
|
7922 |
+
ruseDefault = /^(?:checked|selected)$/i,
|
7923 |
+
getSetAttribute = support.getSetAttribute,
|
7924 |
+
getSetInput = support.input;
|
7925 |
|
7926 |
jQuery.fn.extend({
|
7927 |
+
attr: function( name, value ) {
|
7928 |
+
return access( this, jQuery.attr, name, value, arguments.length > 1 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7929 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
7930 |
|
7931 |
+
removeAttr: function( name ) {
|
7932 |
return this.each(function() {
|
7933 |
+
jQuery.removeAttr( this, name );
|
|
|
|
|
|
|
|
|
7934 |
});
|
7935 |
}
|
7936 |
});
|
7937 |
|
7938 |
jQuery.extend({
|
7939 |
+
attr: function( elem, name, value ) {
|
7940 |
+
var hooks, ret,
|
7941 |
+
nType = elem.nodeType;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7942 |
|
7943 |
+
// don't get/set attributes on text, comment and attribute nodes
|
7944 |
+
if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
|
|
|
|
|
7945 |
return;
|
7946 |
}
|
7947 |
|
7948 |
+
// Fallback to prop when attributes are not supported
|
7949 |
+
if ( typeof elem.getAttribute === strundefined ) {
|
7950 |
+
return jQuery.prop( elem, name, value );
|
7951 |
+
}
|
|
|
|
|
7952 |
|
7953 |
+
// All attributes are lowercase
|
7954 |
+
// Grab necessary hook if one is defined
|
7955 |
+
if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
|
7956 |
+
name = name.toLowerCase();
|
7957 |
+
hooks = jQuery.attrHooks[ name ] ||
|
7958 |
+
( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
|
7959 |
+
}
|
7960 |
|
|
|
7961 |
if ( value !== undefined ) {
|
|
|
7962 |
|
7963 |
+
if ( value === null ) {
|
7964 |
+
jQuery.removeAttr( elem, name );
|
|
|
|
|
|
|
|
|
7965 |
|
7966 |
+
} else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
|
7967 |
+
return ret;
|
|
|
|
|
7968 |
|
7969 |
+
} else {
|
7970 |
+
elem.setAttribute( name, value + "" );
|
7971 |
+
return value;
|
7972 |
}
|
7973 |
|
7974 |
+
} else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
|
7975 |
+
return ret;
|
|
|
|
|
|
|
|
|
|
|
|
|
7976 |
|
7977 |
} else {
|
7978 |
+
ret = jQuery.find.attr( elem, name );
|
|
|
|
|
|
|
7979 |
|
7980 |
+
// Non-existent attributes return null, we normalize to undefined
|
7981 |
+
return ret == null ?
|
7982 |
+
undefined :
|
7983 |
+
ret;
|
7984 |
}
|
7985 |
},
|
7986 |
|
7987 |
+
removeAttr: function( elem, value ) {
|
7988 |
+
var name, propName,
|
7989 |
+
i = 0,
|
7990 |
+
attrNames = value && value.match( rnotwhite );
|
7991 |
|
7992 |
+
if ( attrNames && elem.nodeType === 1 ) {
|
7993 |
+
while ( (name = attrNames[i++]) ) {
|
7994 |
+
propName = jQuery.propFix[ name ] || name;
|
7995 |
|
7996 |
+
// Boolean attributes get special treatment (#10870)
|
7997 |
+
if ( jQuery.expr.match.bool.test( name ) ) {
|
7998 |
+
// Set corresponding property to false
|
7999 |
+
if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
|
8000 |
+
elem[ propName ] = false;
|
8001 |
+
// Support: IE<9
|
8002 |
+
// Also clear defaultChecked/defaultSelected (if appropriate)
|
8003 |
+
} else {
|
8004 |
+
elem[ jQuery.camelCase( "default-" + name ) ] =
|
8005 |
+
elem[ propName ] = false;
|
8006 |
+
}
|
8007 |
|
8008 |
+
// See #9699 for explanation of this approach (setting first, then removal)
|
8009 |
+
} else {
|
8010 |
+
jQuery.attr( elem, name, "" );
|
8011 |
+
}
|
8012 |
|
8013 |
+
elem.removeAttribute( getSetAttribute ? name : propName );
|
8014 |
+
}
|
|
|
8015 |
}
|
8016 |
+
},
|
8017 |
|
8018 |
+
attrHooks: {
|
8019 |
+
type: {
|
8020 |
+
set: function( elem, value ) {
|
8021 |
+
if ( !support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
|
8022 |
+
// Setting the type on a radio button after the value resets the value in IE6-9
|
8023 |
+
// Reset value to default in case type is set after value during creation
|
8024 |
+
var val = elem.value;
|
8025 |
+
elem.setAttribute( "type", value );
|
8026 |
+
if ( val ) {
|
8027 |
+
elem.value = val;
|
8028 |
+
}
|
8029 |
+
return value;
|
8030 |
+
}
|
8031 |
+
}
|
8032 |
}
|
8033 |
+
}
|
8034 |
+
});
|
8035 |
|
8036 |
+
// Hook for boolean attributes
|
8037 |
+
boolHook = {
|
8038 |
+
set: function( elem, value, name ) {
|
8039 |
+
if ( value === false ) {
|
8040 |
+
// Remove boolean attributes when set to false
|
8041 |
+
jQuery.removeAttr( elem, name );
|
8042 |
+
} else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
|
8043 |
+
// IE<8 needs the *property* name
|
8044 |
+
elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );
|
8045 |
+
|
8046 |
+
// Use defaultChecked and defaultSelected for oldIE
|
8047 |
+
} else {
|
8048 |
+
elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true;
|
8049 |
}
|
|
|
|
|
8050 |
|
8051 |
+
return name;
|
8052 |
+
}
|
8053 |
+
};
|
|
|
8054 |
|
8055 |
+
// Retrieve booleans specially
|
8056 |
+
jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
|
|
|
|
|
|
|
8057 |
|
8058 |
+
var getter = attrHandle[ name ] || jQuery.find.attr;
|
8059 |
+
|
8060 |
+
attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ?
|
8061 |
+
function( elem, name, isXML ) {
|
8062 |
+
var ret, handle;
|
8063 |
+
if ( !isXML ) {
|
8064 |
+
// Avoid an infinite loop by temporarily removing this function from the getter
|
8065 |
+
handle = attrHandle[ name ];
|
8066 |
+
attrHandle[ name ] = ret;
|
8067 |
+
ret = getter( elem, name, isXML ) != null ?
|
8068 |
+
name.toLowerCase() :
|
8069 |
+
null;
|
8070 |
+
attrHandle[ name ] = handle;
|
8071 |
+
}
|
8072 |
+
return ret;
|
8073 |
+
} :
|
8074 |
+
function( elem, name, isXML ) {
|
8075 |
+
if ( !isXML ) {
|
8076 |
+
return elem[ jQuery.camelCase( "default-" + name ) ] ?
|
8077 |
+
name.toLowerCase() :
|
8078 |
+
null;
|
8079 |
+
}
|
8080 |
+
};
|
8081 |
+
});
|
8082 |
|
8083 |
+
// fix oldIE attroperties
|
8084 |
+
if ( !getSetInput || !getSetAttribute ) {
|
8085 |
+
jQuery.attrHooks.value = {
|
8086 |
+
set: function( elem, value, name ) {
|
8087 |
+
if ( jQuery.nodeName( elem, "input" ) ) {
|
8088 |
+
// Does not return so that setAttribute is also used
|
8089 |
+
elem.defaultValue = value;
|
8090 |
+
} else {
|
8091 |
+
// Use nodeHook if defined (#1954); otherwise setAttribute is fine
|
8092 |
+
return nodeHook && nodeHook.set( elem, value, name );
|
8093 |
+
}
|
8094 |
}
|
8095 |
+
};
|
8096 |
+
}
|
8097 |
|
8098 |
+
// IE6/7 do not support getting/setting some attributes with get/setAttribute
|
8099 |
+
if ( !getSetAttribute ) {
|
|
|
8100 |
|
8101 |
+
// Use this for any attribute in IE6/7
|
8102 |
+
// This fixes almost every IE6/7 issue
|
8103 |
+
nodeHook = {
|
8104 |
+
set: function( elem, value, name ) {
|
8105 |
+
// Set the existing or create a new attribute node
|
8106 |
+
var ret = elem.getAttributeNode( name );
|
8107 |
+
if ( !ret ) {
|
8108 |
+
elem.setAttributeNode(
|
8109 |
+
(ret = elem.ownerDocument.createAttribute( name ))
|
8110 |
+
);
|
8111 |
+
}
|
8112 |
|
8113 |
+
ret.value = value += "";
|
8114 |
|
8115 |
+
// Break association with cloned elements by also using setAttribute (#9646)
|
8116 |
+
if ( name === "value" || value === elem.getAttribute( name ) ) {
|
8117 |
+
return value;
|
8118 |
+
}
|
8119 |
+
}
|
8120 |
+
};
|
8121 |
|
8122 |
+
// Some attributes are constructed with empty-string values when not defined
|
8123 |
+
attrHandle.id = attrHandle.name = attrHandle.coords =
|
8124 |
+
function( elem, name, isXML ) {
|
8125 |
+
var ret;
|
8126 |
+
if ( !isXML ) {
|
8127 |
+
return (ret = elem.getAttributeNode( name )) && ret.value !== "" ?
|
8128 |
+
ret.value :
|
8129 |
+
null;
|
8130 |
}
|
8131 |
+
};
|
8132 |
|
8133 |
+
// Fixing value retrieval on a button requires this module
|
8134 |
+
jQuery.valHooks.button = {
|
8135 |
+
get: function( elem, name ) {
|
8136 |
+
var ret = elem.getAttributeNode( name );
|
8137 |
+
if ( ret && ret.specified ) {
|
8138 |
+
return ret.value;
|
8139 |
+
}
|
8140 |
+
},
|
8141 |
+
set: nodeHook.set
|
8142 |
+
};
|
8143 |
|
8144 |
+
// Set contenteditable to false on removals(#10429)
|
8145 |
+
// Setting to empty string throws an error as an invalid value
|
8146 |
+
jQuery.attrHooks.contenteditable = {
|
8147 |
+
set: function( elem, value, name ) {
|
8148 |
+
nodeHook.set( elem, value === "" ? false : value, name );
|
8149 |
+
}
|
8150 |
+
};
|
8151 |
|
8152 |
+
// Set width and height to auto instead of 0 on empty string( Bug #8150 )
|
8153 |
+
// This is for removals
|
8154 |
+
jQuery.each([ "width", "height" ], function( i, name ) {
|
8155 |
+
jQuery.attrHooks[ name ] = {
|
8156 |
+
set: function( elem, value ) {
|
8157 |
+
if ( value === "" ) {
|
8158 |
+
elem.setAttribute( name, "auto" );
|
8159 |
+
return value;
|
8160 |
+
}
|
8161 |
}
|
8162 |
+
};
|
8163 |
+
});
|
8164 |
+
}
|
8165 |
|
8166 |
+
if ( !support.style ) {
|
8167 |
+
jQuery.attrHooks.style = {
|
8168 |
+
get: function( elem ) {
|
8169 |
+
// Return undefined in the case of empty string
|
8170 |
+
// Note: IE uppercases css property names, but if we were to .toLowerCase()
|
8171 |
+
// .cssText, that would destroy case senstitivity in URL's, like in "background"
|
8172 |
+
return elem.style.cssText || undefined;
|
8173 |
+
},
|
8174 |
+
set: function( elem, value ) {
|
8175 |
+
return ( elem.style.cssText = value + "" );
|
8176 |
+
}
|
8177 |
};
|
8178 |
+
}
|
|
|
|
|
|
|
|
|
8179 |
|
|
|
|
|
|
|
|
|
|
|
8180 |
|
|
|
|
|
8181 |
|
|
|
|
|
|
|
|
|
|
|
8182 |
|
8183 |
+
var rfocusable = /^(?:input|select|textarea|button|object)$/i,
|
8184 |
+
rclickable = /^(?:a|area)$/i;
|
|
|
8185 |
|
8186 |
+
jQuery.fn.extend({
|
8187 |
+
prop: function( name, value ) {
|
8188 |
+
return access( this, jQuery.prop, name, value, arguments.length > 1 );
|
8189 |
+
},
|
|
|
|
|
8190 |
|
8191 |
+
removeProp: function( name ) {
|
8192 |
+
name = jQuery.propFix[ name ] || name;
|
8193 |
+
return this.each(function() {
|
8194 |
+
// try/catch handles cases where IE balks (such as removing a property on window)
|
8195 |
+
try {
|
8196 |
+
this[ name ] = undefined;
|
8197 |
+
delete this[ name ];
|
8198 |
+
} catch( e ) {}
|
8199 |
+
});
|
8200 |
+
}
|
8201 |
+
});
|
8202 |
|
8203 |
+
jQuery.extend({
|
8204 |
+
propFix: {
|
8205 |
+
"for": "htmlFor",
|
8206 |
+
"class": "className"
|
8207 |
+
},
|
8208 |
|
8209 |
+
prop: function( elem, name, value ) {
|
8210 |
+
var ret, hooks, notxml,
|
8211 |
+
nType = elem.nodeType;
|
|
|
|
|
|
|
8212 |
|
8213 |
+
// don't get/set properties on text, comment and attribute nodes
|
8214 |
+
if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
|
8215 |
+
return;
|
8216 |
+
}
|
|
|
|
|
8217 |
|
8218 |
+
notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
|
8219 |
|
8220 |
+
if ( notxml ) {
|
8221 |
+
// Fix name and attach hooks
|
8222 |
+
name = jQuery.propFix[ name ] || name;
|
8223 |
+
hooks = jQuery.propHooks[ name ];
|
|
|
|
|
8224 |
}
|
8225 |
|
8226 |
+
if ( value !== undefined ) {
|
8227 |
+
return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?
|
8228 |
+
ret :
|
8229 |
+
( elem[ name ] = value );
|
|
|
|
|
8230 |
|
|
|
|
|
|
|
|
|
8231 |
} else {
|
8232 |
+
return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?
|
8233 |
+
ret :
|
8234 |
+
elem[ name ];
|
8235 |
+
}
|
8236 |
+
},
|
8237 |
|
8238 |
+
propHooks: {
|
8239 |
+
tabIndex: {
|
8240 |
+
get: function( elem ) {
|
8241 |
+
// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
|
8242 |
+
// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
|
8243 |
+
// Use proper attribute retrieval(#12072)
|
8244 |
+
var tabindex = jQuery.find.attr( elem, "tabindex" );
|
8245 |
+
|
8246 |
+
return tabindex ?
|
8247 |
+
parseInt( tabindex, 10 ) :
|
8248 |
+
rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
|
8249 |
+
0 :
|
8250 |
+
-1;
|
8251 |
}
|
8252 |
}
|
8253 |
}
|
8254 |
+
});
|
8255 |
|
8256 |
+
// Some attributes require a special call on IE
|
8257 |
+
// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
|
8258 |
+
if ( !support.hrefNormalized ) {
|
8259 |
+
// href/src property should get the full normalized URL (#10299/#12915)
|
8260 |
+
jQuery.each([ "href", "src" ], function( i, name ) {
|
8261 |
+
jQuery.propHooks[ name ] = {
|
8262 |
+
get: function( elem ) {
|
8263 |
+
return elem.getAttribute( name, 4 );
|
8264 |
+
}
|
8265 |
+
};
|
8266 |
+
});
|
8267 |
}
|
8268 |
|
8269 |
+
// Support: Safari, IE9+
|
8270 |
+
// mis-reports the default selected property of an option
|
8271 |
+
// Accessing the parent's selectedIndex property fixes it
|
8272 |
+
if ( !support.optSelected ) {
|
8273 |
+
jQuery.propHooks.selected = {
|
8274 |
+
get: function( elem ) {
|
8275 |
+
var parent = elem.parentNode;
|
8276 |
|
8277 |
+
if ( parent ) {
|
8278 |
+
parent.selectedIndex;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8279 |
|
8280 |
+
// Make sure that it also works with optgroups, see #5701
|
8281 |
+
if ( parent.parentNode ) {
|
8282 |
+
parent.parentNode.selectedIndex;
|
8283 |
+
}
|
8284 |
+
}
|
8285 |
+
return null;
|
8286 |
}
|
8287 |
+
};
|
8288 |
+
}
|
8289 |
|
8290 |
+
jQuery.each([
|
8291 |
+
"tabIndex",
|
8292 |
+
"readOnly",
|
8293 |
+
"maxLength",
|
8294 |
+
"cellSpacing",
|
8295 |
+
"cellPadding",
|
8296 |
+
"rowSpan",
|
8297 |
+
"colSpan",
|
8298 |
+
"useMap",
|
8299 |
+
"frameBorder",
|
8300 |
+
"contentEditable"
|
8301 |
+
], function() {
|
8302 |
+
jQuery.propFix[ this.toLowerCase() ] = this;
|
8303 |
+
});
|
8304 |
|
8305 |
+
// IE6/7 call enctype encoding
|
8306 |
+
if ( !support.enctype ) {
|
8307 |
+
jQuery.propFix.enctype = "encoding";
|
|
|
|
|
|
|
|
|
|
|
|
|
8308 |
}
|
8309 |
|
8310 |
|
|
|
|
|
|
|
|
|
|
|
8311 |
|
|
|
|
|
|
|
8312 |
|
8313 |
+
var rclass = /[\t\r\n\f]/g;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8314 |
|
8315 |
+
jQuery.fn.extend({
|
8316 |
+
addClass: function( value ) {
|
8317 |
+
var classes, elem, cur, clazz, j, finalValue,
|
8318 |
+
i = 0,
|
8319 |
+
len = this.length,
|
8320 |
+
proceed = typeof value === "string" && value;
|
|
|
|
|
8321 |
|
8322 |
+
if ( jQuery.isFunction( value ) ) {
|
8323 |
+
return this.each(function( j ) {
|
8324 |
+
jQuery( this ).addClass( value.call( this, j, this.className ) );
|
8325 |
+
});
|
8326 |
+
}
|
8327 |
|
8328 |
+
if ( proceed ) {
|
8329 |
+
// The disjunction here is for better compressibility (see removeClass)
|
8330 |
+
classes = ( value || "" ).match( rnotwhite ) || [];
|
8331 |
|
8332 |
+
for ( ; i < len; i++ ) {
|
8333 |
+
elem = this[ i ];
|
8334 |
+
cur = elem.nodeType === 1 && ( elem.className ?
|
8335 |
+
( " " + elem.className + " " ).replace( rclass, " " ) :
|
8336 |
+
" "
|
8337 |
+
);
|
8338 |
|
8339 |
+
if ( cur ) {
|
8340 |
+
j = 0;
|
8341 |
+
while ( (clazz = classes[j++]) ) {
|
8342 |
+
if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
|
8343 |
+
cur += clazz + " ";
|
8344 |
+
}
|
8345 |
+
}
|
8346 |
|
8347 |
+
// only assign if different to avoid unneeded rendering.
|
8348 |
+
finalValue = jQuery.trim( cur );
|
8349 |
+
if ( elem.className !== finalValue ) {
|
8350 |
+
elem.className = finalValue;
|
8351 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8352 |
}
|
8353 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8354 |
}
|
|
|
|
|
8355 |
|
8356 |
+
return this;
|
8357 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
8358 |
|
8359 |
+
removeClass: function( value ) {
|
8360 |
+
var classes, elem, cur, clazz, j, finalValue,
|
8361 |
+
i = 0,
|
8362 |
+
len = this.length,
|
8363 |
+
proceed = arguments.length === 0 || typeof value === "string" && value;
|
8364 |
|
8365 |
+
if ( jQuery.isFunction( value ) ) {
|
8366 |
+
return this.each(function( j ) {
|
8367 |
+
jQuery( this ).removeClass( value.call( this, j, this.className ) );
|
8368 |
+
});
|
8369 |
+
}
|
8370 |
+
if ( proceed ) {
|
8371 |
+
classes = ( value || "" ).match( rnotwhite ) || [];
|
8372 |
|
8373 |
+
for ( ; i < len; i++ ) {
|
8374 |
+
elem = this[ i ];
|
8375 |
+
// This expression is here for better compressibility (see addClass)
|
8376 |
+
cur = elem.nodeType === 1 && ( elem.className ?
|
8377 |
+
( " " + elem.className + " " ).replace( rclass, " " ) :
|
8378 |
+
""
|
8379 |
+
);
|
8380 |
|
8381 |
+
if ( cur ) {
|
8382 |
+
j = 0;
|
8383 |
+
while ( (clazz = classes[j++]) ) {
|
8384 |
+
// Remove *all* instances
|
8385 |
+
while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
|
8386 |
+
cur = cur.replace( " " + clazz + " ", " " );
|
8387 |
+
}
|
8388 |
+
}
|
8389 |
|
8390 |
+
// only assign if different to avoid unneeded rendering.
|
8391 |
+
finalValue = value ? jQuery.trim( cur ) : "";
|
8392 |
+
if ( elem.className !== finalValue ) {
|
8393 |
+
elem.className = finalValue;
|
8394 |
+
}
|
8395 |
}
|
8396 |
}
|
8397 |
+
}
|
8398 |
+
|
8399 |
+
return this;
|
8400 |
+
},
|
8401 |
+
|
8402 |
+
toggleClass: function( value, stateVal ) {
|
8403 |
+
var type = typeof value;
|
8404 |
+
|
8405 |
+
if ( typeof stateVal === "boolean" && type === "string" ) {
|
8406 |
+
return stateVal ? this.addClass( value ) : this.removeClass( value );
|
8407 |
+
}
|
8408 |
|
8409 |
+
if ( jQuery.isFunction( value ) ) {
|
8410 |
+
return this.each(function( i ) {
|
8411 |
+
jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
|
8412 |
+
});
|
8413 |
}
|
|
|
|
|
8414 |
|
8415 |
+
return this.each(function() {
|
8416 |
+
if ( type === "string" ) {
|
8417 |
+
// toggle individual class names
|
8418 |
+
var className,
|
8419 |
+
i = 0,
|
8420 |
+
self = jQuery( this ),
|
8421 |
+
classNames = value.match( rnotwhite ) || [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8422 |
|
8423 |
+
while ( (className = classNames[ i++ ]) ) {
|
8424 |
+
// check each className given, space separated list
|
8425 |
+
if ( self.hasClass( className ) ) {
|
8426 |
+
self.removeClass( className );
|
8427 |
+
} else {
|
8428 |
+
self.addClass( className );
|
|
|
|
|
|
|
|
|
|
|
8429 |
}
|
8430 |
}
|
8431 |
+
|
8432 |
+
// Toggle whole class name
|
8433 |
+
} else if ( type === strundefined || type === "boolean" ) {
|
8434 |
+
if ( this.className ) {
|
8435 |
+
// store className if set
|
8436 |
+
jQuery._data( this, "__className__", this.className );
|
8437 |
+
}
|
8438 |
+
|
8439 |
+
// If the element has a class name or if we're passed "false",
|
8440 |
+
// then remove the whole classname (if there was one, the above saved it).
|
8441 |
+
// Otherwise bring back whatever was previously saved (if anything),
|
8442 |
+
// falling back to the empty string if nothing was stored.
|
8443 |
+
this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
|
8444 |
+
}
|
8445 |
});
|
8446 |
+
},
|
8447 |
+
|
8448 |
+
hasClass: function( selector ) {
|
8449 |
+
var className = " " + selector + " ",
|
8450 |
+
i = 0,
|
8451 |
+
l = this.length;
|
8452 |
+
for ( ; i < l; i++ ) {
|
8453 |
+
if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
|
8454 |
+
return true;
|
8455 |
+
}
|
8456 |
+
}
|
8457 |
|
8458 |
+
return false;
|
8459 |
+
}
|
8460 |
});
|
8461 |
|
|
|
|
|
|
|
|
|
8462 |
|
|
|
|
|
|
|
|
|
8463 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8464 |
|
8465 |
+
// Return jQuery for attributes-only inclusion
|
|
|
|
|
8466 |
|
|
|
|
|
|
|
|
|
8467 |
|
8468 |
+
jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
|
8469 |
+
"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
|
8470 |
+
"change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
|
8471 |
|
8472 |
+
// Handle event binding
|
8473 |
+
jQuery.fn[ name ] = function( data, fn ) {
|
8474 |
+
return arguments.length > 0 ?
|
8475 |
+
this.on( name, null, data, fn ) :
|
8476 |
+
this.trigger( name );
|
8477 |
+
};
|
8478 |
});
|
|
|
|
|
|
|
|
|
|
|
8479 |
|
8480 |
jQuery.fn.extend({
|
8481 |
+
hover: function( fnOver, fnOut ) {
|
8482 |
+
return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
|
8483 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8484 |
|
8485 |
+
bind: function( types, data, fn ) {
|
8486 |
+
return this.on( types, null, data, fn );
|
8487 |
+
},
|
8488 |
+
unbind: function( types, fn ) {
|
8489 |
+
return this.off( types, null, fn );
|
8490 |
+
},
|
8491 |
+
|
8492 |
+
delegate: function( selector, types, data, fn ) {
|
8493 |
+
return this.on( types, selector, data, fn );
|
8494 |
+
},
|
8495 |
+
undelegate: function( selector, types, fn ) {
|
8496 |
+
// ( namespace ) or ( selector, types [, fn] )
|
8497 |
+
return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
|
8498 |
}
|
8499 |
});
|
8500 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8501 |
|
8502 |
+
var nonce = jQuery.now();
|
8503 |
+
|
8504 |
+
var rquery = (/\?/);
|
8505 |
+
|
8506 |
+
|
8507 |
+
|
8508 |
+
var rvalidtokens = /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;
|
8509 |
+
|
8510 |
+
jQuery.parseJSON = function( data ) {
|
8511 |
+
// Attempt to parse using the native JSON parser first
|
8512 |
+
if ( window.JSON && window.JSON.parse ) {
|
8513 |
+
// Support: Android 2.3
|
8514 |
+
// Workaround failure to string-cast null input
|
8515 |
+
return window.JSON.parse( data + "" );
|
8516 |
}
|
8517 |
|
8518 |
+
var requireNonComma,
|
8519 |
+
depth = null,
|
8520 |
+
str = jQuery.trim( data + "" );
|
|
|
|
|
|
|
8521 |
|
8522 |
+
// Guard against invalid (and possibly dangerous) input by ensuring that nothing remains
|
8523 |
+
// after removing valid tokens
|
8524 |
+
return str && !jQuery.trim( str.replace( rvalidtokens, function( token, comma, open, close ) {
|
8525 |
+
|
8526 |
+
// Force termination if we see a misplaced comma
|
8527 |
+
if ( requireNonComma && comma ) {
|
8528 |
+
depth = 0;
|
8529 |
}
|
|
|
8530 |
|
8531 |
+
// Perform no more replacements after returning to outermost depth
|
8532 |
+
if ( depth === 0 ) {
|
8533 |
+
return token;
|
8534 |
+
}
|
8535 |
|
8536 |
+
// Commas must not follow "[", "{", or ","
|
8537 |
+
requireNonComma = open || comma;
|
8538 |
|
8539 |
+
// Determine new depth
|
8540 |
+
// array/object open ("[" or "{"): depth += true - false (increment)
|
8541 |
+
// array/object close ("]" or "}"): depth += false - true (decrement)
|
8542 |
+
// other cases ("," or primitive): depth += true - true (numeric cast)
|
8543 |
+
depth += !close - !open;
|
|
|
8544 |
|
8545 |
+
// Remove this token
|
8546 |
+
return "";
|
8547 |
+
}) ) ?
|
8548 |
+
( Function( "return " + str ) )() :
|
8549 |
+
jQuery.error( "Invalid JSON: " + data );
|
8550 |
+
};
|
|
|
|
|
|
|
|
|
|
|
8551 |
|
|
|
|
|
|
|
|
|
|
|
8552 |
|
8553 |
+
// Cross-browser xml parsing
|
8554 |
+
jQuery.parseXML = function( data ) {
|
8555 |
+
var xml, tmp;
|
8556 |
+
if ( !data || typeof data !== "string" ) {
|
8557 |
+
return null;
|
8558 |
}
|
8559 |
+
try {
|
8560 |
+
if ( window.DOMParser ) { // Standard
|
8561 |
+
tmp = new DOMParser();
|
8562 |
+
xml = tmp.parseFromString( data, "text/xml" );
|
8563 |
+
} else { // IE
|
8564 |
+
xml = new ActiveXObject( "Microsoft.XMLDOM" );
|
8565 |
+
xml.async = "false";
|
8566 |
+
xml.loadXML( data );
|
8567 |
+
}
|
8568 |
+
} catch( e ) {
|
8569 |
+
xml = undefined;
|
8570 |
+
}
|
8571 |
+
if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
|
8572 |
+
jQuery.error( "Invalid XML: " + data );
|
8573 |
+
}
|
8574 |
+
return xml;
|
8575 |
+
};
|
8576 |
+
|
8577 |
+
|
8578 |
var
|
8579 |
// Document location
|
8580 |
ajaxLocParts,
|
8581 |
ajaxLocation,
|
8582 |
|
8583 |
rhash = /#.*$/,
|
8584 |
+
rts = /([?&])_=[^&]*/,
|
8585 |
rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
|
8586 |
// #7653, #8125, #8152: local protocol detection
|
8587 |
+
rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
|
8588 |
rnoContent = /^(?:GET|HEAD)$/,
|
8589 |
rprotocol = /^\/\//,
|
8590 |
+
rurl = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,
|
|
|
|
|
|
|
|
|
|
|
|
|
8591 |
|
8592 |
/* Prefilters
|
8593 |
* 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
|
8608 |
transports = {},
|
8609 |
|
8610 |
// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
|
8611 |
+
allTypes = "*/".concat("*");
|
8612 |
|
8613 |
// #8138, IE may throw an exception when accessing
|
8614 |
// a field from window.location if document.domain has been set
|
8636 |
dataTypeExpression = "*";
|
8637 |
}
|
8638 |
|
8639 |
+
var dataType,
|
|
|
8640 |
i = 0,
|
8641 |
+
dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];
|
8642 |
|
8643 |
if ( jQuery.isFunction( func ) ) {
|
8644 |
// For each dataType in the dataTypeExpression
|
8645 |
+
while ( (dataType = dataTypes[i++]) ) {
|
8646 |
+
// Prepend if requested
|
8647 |
+
if ( dataType.charAt( 0 ) === "+" ) {
|
8648 |
+
dataType = dataType.slice( 1 ) || "*";
|
8649 |
+
(structure[ dataType ] = structure[ dataType ] || []).unshift( func );
|
8650 |
+
|
8651 |
+
// Otherwise append
|
8652 |
+
} else {
|
8653 |
+
(structure[ dataType ] = structure[ dataType ] || []).push( func );
|
8654 |
}
|
|
|
|
|
|
|
8655 |
}
|
8656 |
}
|
8657 |
};
|
8658 |
}
|
8659 |
|
8660 |
// Base inspection function for prefilters and transports
|
8661 |
+
function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
|
8662 |
+
|
8663 |
+
var inspected = {},
|
8664 |
+
seekingTransport = ( structure === transports );
|
8665 |
+
|
8666 |
+
function inspect( dataType ) {
|
8667 |
+
var selected;
|
8668 |
+
inspected[ dataType ] = true;
|
8669 |
+
jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
|
8670 |
+
var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
|
8671 |
+
if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
|
8672 |
+
options.dataTypes.unshift( dataTypeOrTransport );
|
8673 |
+
inspect( dataTypeOrTransport );
|
8674 |
+
return false;
|
8675 |
+
} else if ( seekingTransport ) {
|
8676 |
+
return !( selected = dataTypeOrTransport );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8677 |
}
|
8678 |
+
});
|
8679 |
+
return selected;
|
|
|
|
|
|
|
|
|
|
|
8680 |
}
|
8681 |
+
|
8682 |
+
return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
|
|
|
8683 |
}
|
8684 |
|
8685 |
// A special extend for ajax options
|
8686 |
// that takes "flat" options (not to be deep extended)
|
8687 |
// Fixes #9887
|
8688 |
function ajaxExtend( target, src ) {
|
8689 |
+
var deep, key,
|
8690 |
flatOptions = jQuery.ajaxSettings.flatOptions || {};
|
8691 |
+
|
8692 |
for ( key in src ) {
|
8693 |
if ( src[ key ] !== undefined ) {
|
8694 |
+
( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
|
8695 |
}
|
8696 |
}
|
8697 |
if ( deep ) {
|
8698 |
jQuery.extend( true, target, deep );
|
8699 |
}
|
8700 |
+
|
8701 |
+
return target;
|
8702 |
}
|
8703 |
|
8704 |
+
/* Handles responses to an ajax request:
|
8705 |
+
* - finds the right dataType (mediates between content-type and expected dataType)
|
8706 |
+
* - returns the corresponding response
|
8707 |
+
*/
|
8708 |
+
function ajaxHandleResponses( s, jqXHR, responses ) {
|
8709 |
+
var firstDataType, ct, finalDataType, type,
|
8710 |
+
contents = s.contents,
|
8711 |
+
dataTypes = s.dataTypes;
|
8712 |
+
|
8713 |
+
// Remove auto dataType and get content-type in the process
|
8714 |
+
while ( dataTypes[ 0 ] === "*" ) {
|
8715 |
+
dataTypes.shift();
|
8716 |
+
if ( ct === undefined ) {
|
8717 |
+
ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
|
8718 |
+
}
|
8719 |
}
|
8720 |
|
8721 |
+
// Check if we're dealing with a known content-type
|
8722 |
+
if ( ct ) {
|
8723 |
+
for ( type in contents ) {
|
8724 |
+
if ( contents[ type ] && contents[ type ].test( ct ) ) {
|
8725 |
+
dataTypes.unshift( type );
|
8726 |
+
break;
|
8727 |
+
}
|
8728 |
+
}
|
8729 |
}
|
8730 |
|
8731 |
+
// Check to see if we have a response for the expected dataType
|
8732 |
+
if ( dataTypes[ 0 ] in responses ) {
|
8733 |
+
finalDataType = dataTypes[ 0 ];
|
8734 |
+
} else {
|
8735 |
+
// Try convertible dataTypes
|
8736 |
+
for ( type in responses ) {
|
8737 |
+
if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
|
8738 |
+
finalDataType = type;
|
8739 |
+
break;
|
8740 |
+
}
|
8741 |
+
if ( !firstDataType ) {
|
8742 |
+
firstDataType = type;
|
8743 |
+
}
|
8744 |
+
}
|
8745 |
+
// Or just use first one
|
8746 |
+
finalDataType = finalDataType || firstDataType;
|
8747 |
+
}
|
8748 |
|
8749 |
+
// If we found a dataType
|
8750 |
+
// We add the dataType to the list if needed
|
8751 |
+
// and return the corresponding response
|
8752 |
+
if ( finalDataType ) {
|
8753 |
+
if ( finalDataType !== dataTypes[ 0 ] ) {
|
8754 |
+
dataTypes.unshift( finalDataType );
|
8755 |
+
}
|
8756 |
+
return responses[ finalDataType ];
|
8757 |
+
}
|
8758 |
+
}
|
8759 |
+
|
8760 |
+
/* Chain conversions given the request and the original response
|
8761 |
+
* Also sets the responseXXX fields on the jqXHR instance
|
8762 |
+
*/
|
8763 |
+
function ajaxConvert( s, response, jqXHR, isSuccess ) {
|
8764 |
+
var conv2, current, conv, tmp, prev,
|
8765 |
+
converters = {},
|
8766 |
+
// Work with a copy of dataTypes in case we need to modify it for conversion
|
8767 |
+
dataTypes = s.dataTypes.slice();
|
8768 |
+
|
8769 |
+
// Create converters map with lowercased keys
|
8770 |
+
if ( dataTypes[ 1 ] ) {
|
8771 |
+
for ( conv in s.converters ) {
|
8772 |
+
converters[ conv.toLowerCase() ] = s.converters[ conv ];
|
8773 |
+
}
|
8774 |
}
|
8775 |
|
8776 |
+
current = dataTypes.shift();
|
|
|
|
|
|
|
|
|
|
|
8777 |
|
8778 |
+
// Convert to each sequential dataType
|
8779 |
+
while ( current ) {
|
|
|
|
|
8780 |
|
8781 |
+
if ( s.responseFields[ current ] ) {
|
8782 |
+
jqXHR[ s.responseFields[ current ] ] = response;
|
8783 |
+
}
|
8784 |
|
8785 |
+
// Apply the dataFilter if provided
|
8786 |
+
if ( !prev && isSuccess && s.dataFilter ) {
|
8787 |
+
response = s.dataFilter( response, s.dataType );
|
|
|
|
|
|
|
|
|
|
|
8788 |
}
|
|
|
8789 |
|
8790 |
+
prev = current;
|
8791 |
+
current = dataTypes.shift();
|
8792 |
|
8793 |
+
if ( current ) {
|
|
|
8794 |
|
8795 |
+
// There's only work to do if current dataType is non-auto
|
8796 |
+
if ( current === "*" ) {
|
8797 |
|
8798 |
+
current = prev;
|
|
|
|
|
8799 |
|
8800 |
+
// Convert response if prev dataType is non-auto and differs from current
|
8801 |
+
} else if ( prev !== "*" && prev !== current ) {
|
8802 |
|
8803 |
+
// Seek a direct converter
|
8804 |
+
conv = converters[ prev + " " + current ] || converters[ "* " + current ];
|
8805 |
|
8806 |
+
// If none found, seek a pair
|
8807 |
+
if ( !conv ) {
|
8808 |
+
for ( conv2 in converters ) {
|
8809 |
|
8810 |
+
// If conv2 outputs current
|
8811 |
+
tmp = conv2.split( " " );
|
8812 |
+
if ( tmp[ 1 ] === current ) {
|
8813 |
|
8814 |
+
// If prev can be converted to accepted input
|
8815 |
+
conv = converters[ prev + " " + tmp[ 0 ] ] ||
|
8816 |
+
converters[ "* " + tmp[ 0 ] ];
|
8817 |
+
if ( conv ) {
|
8818 |
+
// Condense equivalence converters
|
8819 |
+
if ( conv === true ) {
|
8820 |
+
conv = converters[ conv2 ];
|
8821 |
|
8822 |
+
// Otherwise, insert the intermediate dataType
|
8823 |
+
} else if ( converters[ conv2 ] !== true ) {
|
8824 |
+
current = tmp[ 0 ];
|
8825 |
+
dataTypes.unshift( tmp[ 1 ] );
|
8826 |
+
}
|
8827 |
+
break;
|
8828 |
+
}
|
8829 |
+
}
|
8830 |
+
}
|
8831 |
+
}
|
8832 |
+
|
8833 |
+
// Apply converter (if not an equivalence)
|
8834 |
+
if ( conv !== true ) {
|
8835 |
+
|
8836 |
+
// Unless errors are allowed to bubble, catch and return them
|
8837 |
+
if ( conv && s[ "throws" ] ) {
|
8838 |
+
response = conv( response );
|
8839 |
+
} else {
|
8840 |
+
try {
|
8841 |
+
response = conv( response );
|
8842 |
+
} catch ( e ) {
|
8843 |
+
return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
|
8844 |
+
}
|
8845 |
+
}
|
8846 |
+
}
|
8847 |
+
}
|
8848 |
}
|
8849 |
+
}
|
8850 |
|
8851 |
+
return { state: "success", data: response };
|
8852 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8853 |
|
8854 |
jQuery.extend({
|
8855 |
|
8856 |
+
// Counter for holding the number of active queries
|
8857 |
+
active: 0,
|
|
|
|
|
|
|
|
|
|
|
8858 |
|
8859 |
+
// Last-Modified header cache for next request
|
8860 |
+
lastModified: {},
|
8861 |
+
etag: {},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8862 |
|
8863 |
ajaxSettings: {
|
8864 |
url: ajaxLocation,
|
8865 |
+
type: "GET",
|
8866 |
isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
|
8867 |
global: true,
|
|
|
|
|
8868 |
processData: true,
|
8869 |
async: true,
|
8870 |
+
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
|
8871 |
/*
|
8872 |
timeout: 0,
|
8873 |
data: null,
|
8881 |
*/
|
8882 |
|
8883 |
accepts: {
|
8884 |
+
"*": allTypes,
|
|
|
8885 |
text: "text/plain",
|
8886 |
+
html: "text/html",
|
8887 |
+
xml: "application/xml, text/xml",
|
8888 |
+
json: "application/json, text/javascript"
|
8889 |
},
|
8890 |
|
8891 |
contents: {
|
8896 |
|
8897 |
responseFields: {
|
8898 |
xml: "responseXML",
|
8899 |
+
text: "responseText",
|
8900 |
+
json: "responseJSON"
|
8901 |
},
|
8902 |
|
8903 |
+
// Data converters
|
8904 |
+
// Keys separate source (or catchall "*") and destination types with a single space
|
|
|
8905 |
converters: {
|
8906 |
|
8907 |
// Convert anything to text
|
8908 |
+
"* text": String,
|
8909 |
|
8910 |
// Text to html (true = no transformation)
|
8911 |
"text html": true,
|
8922 |
// and when you create one that shouldn't be
|
8923 |
// deep extended (see ajaxExtend)
|
8924 |
flatOptions: {
|
8925 |
+
url: true,
|
8926 |
+
context: true
|
8927 |
}
|
8928 |
},
|
8929 |
|
8930 |
+
// Creates a full fledged settings object into target
|
8931 |
+
// with both ajaxSettings and settings fields.
|
8932 |
+
// If target is omitted, writes into ajaxSettings.
|
8933 |
+
ajaxSetup: function( target, settings ) {
|
8934 |
+
return settings ?
|
8935 |
+
|
8936 |
+
// Building a settings object
|
8937 |
+
ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
|
8938 |
+
|
8939 |
+
// Extending ajaxSettings
|
8940 |
+
ajaxExtend( jQuery.ajaxSettings, target );
|
8941 |
+
},
|
8942 |
+
|
8943 |
ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
|
8944 |
ajaxTransport: addToPrefiltersOrTransports( transports ),
|
8945 |
|
8955 |
// Force options to be an object
|
8956 |
options = options || {};
|
8957 |
|
8958 |
+
var // Cross-domain detection vars
|
8959 |
+
parts,
|
8960 |
+
// Loop variable
|
8961 |
+
i,
|
8962 |
+
// URL without anti-cache param
|
8963 |
+
cacheURL,
|
8964 |
+
// Response headers as string
|
8965 |
responseHeadersString,
|
|
|
|
|
|
|
8966 |
// timeout handle
|
8967 |
timeoutTimer,
|
8968 |
+
|
|
|
8969 |
// To know if global events are to be dispatched
|
8970 |
fireGlobals,
|
8971 |
+
|
8972 |
+
transport,
|
8973 |
+
// Response headers
|
8974 |
+
responseHeaders,
|
8975 |
// Create the final options object
|
8976 |
s = jQuery.ajaxSetup( {}, options ),
|
8977 |
// Callbacks context
|
8978 |
callbackContext = s.context || s,
|
8979 |
+
// Context for global events is callbackContext if it is a DOM node or jQuery collection
|
8980 |
+
globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
|
8981 |
+
jQuery( callbackContext ) :
|
8982 |
+
jQuery.event,
|
|
|
|
|
8983 |
// Deferreds
|
8984 |
deferred = jQuery.Deferred(),
|
8985 |
+
completeDeferred = jQuery.Callbacks("once memory"),
|
8986 |
// Status-dependent callbacks
|
8987 |
statusCode = s.statusCode || {},
|
8988 |
// Headers (they are sent all at once)
|
8994 |
strAbort = "canceled",
|
8995 |
// Fake xhr
|
8996 |
jqXHR = {
|
|
|
8997 |
readyState: 0,
|
8998 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8999 |
// Builds headers hashtable if needed
|
9000 |
getResponseHeader: function( key ) {
|
9001 |
var match;
|
9002 |
if ( state === 2 ) {
|
9003 |
if ( !responseHeaders ) {
|
9004 |
responseHeaders = {};
|
9005 |
+
while ( (match = rheaders.exec( responseHeadersString )) ) {
|
9006 |
responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
|
9007 |
}
|
9008 |
}
|
9009 |
match = responseHeaders[ key.toLowerCase() ];
|
9010 |
}
|
9011 |
+
return match == null ? null : match;
|
9012 |
+
},
|
9013 |
+
|
9014 |
+
// Raw string
|
9015 |
+
getAllResponseHeaders: function() {
|
9016 |
+
return state === 2 ? responseHeadersString : null;
|
9017 |
+
},
|
9018 |
+
|
9019 |
+
// Caches the header
|
9020 |
+
setRequestHeader: function( name, value ) {
|
9021 |
+
var lname = name.toLowerCase();
|
9022 |
+
if ( !state ) {
|
9023 |
+
name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
|
9024 |
+
requestHeaders[ name ] = value;
|
9025 |
+
}
|
9026 |
+
return this;
|
9027 |
},
|
9028 |
|
9029 |
// Overrides response content-type header
|
9034 |
return this;
|
9035 |
},
|
9036 |
|
9037 |
+
// Status-dependent callbacks
|
9038 |
+
statusCode: function( map ) {
|
9039 |
+
var code;
|
9040 |
+
if ( map ) {
|
9041 |
+
if ( state < 2 ) {
|
9042 |
+
for ( code in map ) {
|
9043 |
+
// Lazy-add the new callback in a way that preserves old ones
|
9044 |
+
statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
|
9045 |
+
}
|
9046 |
+
} else {
|
9047 |
+
// Execute the appropriate callbacks
|
9048 |
+
jqXHR.always( map[ jqXHR.status ] );
|
9049 |
+
}
|
9050 |
}
|
|
|
9051 |
return this;
|
9052 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9053 |
|
9054 |
+
// Cancel the request
|
9055 |
+
abort: function( statusText ) {
|
9056 |
+
var finalText = statusText || strAbort;
|
9057 |
+
if ( transport ) {
|
9058 |
+
transport.abort( finalText );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9059 |
}
|
9060 |
+
done( 0, finalText );
|
9061 |
+
return this;
|
9062 |
}
|
9063 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9064 |
|
9065 |
// Attach deferreds
|
9066 |
+
deferred.promise( jqXHR ).complete = completeDeferred.add;
|
9067 |
jqXHR.success = jqXHR.done;
|
9068 |
jqXHR.error = jqXHR.fail;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9069 |
|
9070 |
// Remove hash character (#7531: and string promotion)
|
9071 |
// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
|
9072 |
+
// Handle falsy url in the settings object (#10093: consistency with old signature)
|
9073 |
// We also use the url parameter if available
|
9074 |
+
s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
|
9075 |
+
|
9076 |
+
// Alias method option to type as per ticket #12004
|
9077 |
+
s.type = options.method || options.type || s.method || s.type;
|
9078 |
|
9079 |
// Extract dataTypes list
|
9080 |
+
s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];
|
9081 |
|
9082 |
// A cross-domain request is in order when we have a protocol:host:port mismatch
|
9083 |
if ( s.crossDomain == null ) {
|
9084 |
parts = rurl.exec( s.url.toLowerCase() );
|
9085 |
s.crossDomain = !!( parts &&
|
9086 |
( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
|
9087 |
+
( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
|
9088 |
+
( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )
|
9089 |
);
|
9090 |
}
|
9091 |
|
9103 |
}
|
9104 |
|
9105 |
// We can fire global events as of now if asked to
|
9106 |
+
// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
|
9107 |
+
fireGlobals = jQuery.event && s.global;
|
9108 |
+
|
9109 |
+
// Watch for a new set of requests
|
9110 |
+
if ( fireGlobals && jQuery.active++ === 0 ) {
|
9111 |
+
jQuery.event.trigger("ajaxStart");
|
9112 |
+
}
|
9113 |
|
9114 |
// Uppercase the type
|
9115 |
s.type = s.type.toUpperCase();
|
9117 |
// Determine if request has content
|
9118 |
s.hasContent = !rnoContent.test( s.type );
|
9119 |
|
9120 |
+
// Save the URL in case we're toying with the If-Modified-Since
|
9121 |
+
// and/or If-None-Match header later on
|
9122 |
+
cacheURL = s.url;
|
|
|
9123 |
|
9124 |
// More options handling for requests with no content
|
9125 |
if ( !s.hasContent ) {
|
9126 |
|
9127 |
// If data is available, append data to url
|
9128 |
if ( s.data ) {
|
9129 |
+
cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
|
9130 |
// #9682: remove data so that it's not used in an eventual retry
|
9131 |
delete s.data;
|
9132 |
}
|
9133 |
|
|
|
|
|
|
|
9134 |
// Add anti-cache in url if needed
|
9135 |
if ( s.cache === false ) {
|
9136 |
+
s.url = rts.test( cacheURL ) ?
|
9137 |
|
9138 |
+
// If there is already a '_' parameter, set its value
|
9139 |
+
cacheURL.replace( rts, "$1_=" + nonce++ ) :
|
|
|
9140 |
|
9141 |
+
// Otherwise add one to the end
|
9142 |
+
cacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++;
|
9143 |
}
|
9144 |
}
|
9145 |
|
|
|
|
|
|
|
|
|
|
|
9146 |
// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
|
9147 |
if ( s.ifModified ) {
|
9148 |
+
if ( jQuery.lastModified[ cacheURL ] ) {
|
9149 |
+
jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
|
|
|
9150 |
}
|
9151 |
+
if ( jQuery.etag[ cacheURL ] ) {
|
9152 |
+
jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
|
9153 |
}
|
9154 |
}
|
9155 |
|
9156 |
+
// Set the correct header, if data is being sent
|
9157 |
+
if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
|
9158 |
+
jqXHR.setRequestHeader( "Content-Type", s.contentType );
|
9159 |
+
}
|
9160 |
+
|
9161 |
// Set the Accepts header for the server, depending on the dataType
|
9162 |
jqXHR.setRequestHeader(
|
9163 |
"Accept",
|
9173 |
|
9174 |
// Allow custom headers/mimetypes and early abort
|
9175 |
if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
|
9176 |
+
// Abort if not done already and return
|
9177 |
+
return jqXHR.abort();
|
|
|
9178 |
}
|
9179 |
|
9180 |
// aborting is no longer a cancellation
|
9193 |
done( -1, "No Transport" );
|
9194 |
} else {
|
9195 |
jqXHR.readyState = 1;
|
9196 |
+
|
9197 |
// Send global event
|
9198 |
if ( fireGlobals ) {
|
9199 |
globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
|
9200 |
}
|
9201 |
// Timeout
|
9202 |
if ( s.async && s.timeout > 0 ) {
|
9203 |
+
timeoutTimer = setTimeout(function() {
|
9204 |
+
jqXHR.abort("timeout");
|
9205 |
}, s.timeout );
|
9206 |
}
|
9207 |
|
9208 |
try {
|
9209 |
state = 1;
|
9210 |
transport.send( requestHeaders, done );
|
9211 |
+
} catch ( e ) {
|
9212 |
// Propagate exception as error if not done
|
9213 |
if ( state < 2 ) {
|
9214 |
done( -1, e );
|
9219 |
}
|
9220 |
}
|
9221 |
|
9222 |
+
// Callback for when everything is done
|
9223 |
+
function done( status, nativeStatusText, responses, headers ) {
|
9224 |
+
var isSuccess, success, error, response, modified,
|
9225 |
+
statusText = nativeStatusText;
|
|
|
9226 |
|
9227 |
+
// Called once
|
9228 |
+
if ( state === 2 ) {
|
9229 |
+
return;
|
9230 |
+
}
|
9231 |
|
9232 |
+
// State is "done" now
|
9233 |
+
state = 2;
|
9234 |
|
9235 |
+
// Clear timeout if it exists
|
9236 |
+
if ( timeoutTimer ) {
|
9237 |
+
clearTimeout( timeoutTimer );
|
9238 |
+
}
|
|
|
|
|
9239 |
|
9240 |
+
// Dereference transport for early garbage collection
|
9241 |
+
// (no matter how long the jqXHR object will be used)
|
9242 |
+
transport = undefined;
|
|
|
9243 |
|
9244 |
+
// Cache response headers
|
9245 |
+
responseHeadersString = headers || "";
|
|
|
|
|
|
|
|
|
9246 |
|
9247 |
+
// Set readyState
|
9248 |
+
jqXHR.readyState = status > 0 ? 4 : 0;
|
|
|
|
|
|
|
|
|
|
|
9249 |
|
9250 |
+
// Determine if successful
|
9251 |
+
isSuccess = status >= 200 && status < 300 || status === 304;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9252 |
|
9253 |
+
// Get response data
|
9254 |
+
if ( responses ) {
|
9255 |
+
response = ajaxHandleResponses( s, jqXHR, responses );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9256 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9257 |
|
9258 |
+
// Convert no matter what (that way responseXXX fields are always set)
|
9259 |
+
response = ajaxConvert( s, response, jqXHR, isSuccess );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9260 |
|
9261 |
+
// If successful, handle type chaining
|
9262 |
+
if ( isSuccess ) {
|
|
|
|
|
9263 |
|
9264 |
+
// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
|
9265 |
+
if ( s.ifModified ) {
|
9266 |
+
modified = jqXHR.getResponseHeader("Last-Modified");
|
9267 |
+
if ( modified ) {
|
9268 |
+
jQuery.lastModified[ cacheURL ] = modified;
|
9269 |
+
}
|
9270 |
+
modified = jqXHR.getResponseHeader("etag");
|
9271 |
+
if ( modified ) {
|
9272 |
+
jQuery.etag[ cacheURL ] = modified;
|
9273 |
+
}
|
9274 |
+
}
|
9275 |
|
9276 |
+
// if no content
|
9277 |
+
if ( status === 204 || s.type === "HEAD" ) {
|
9278 |
+
statusText = "nocontent";
|
9279 |
|
9280 |
+
// if not modified
|
9281 |
+
} else if ( status === 304 ) {
|
9282 |
+
statusText = "notmodified";
|
9283 |
|
9284 |
+
// If we have data, let's convert it
|
9285 |
+
} else {
|
9286 |
+
statusText = response.state;
|
9287 |
+
success = response.data;
|
9288 |
+
error = response.error;
|
9289 |
+
isSuccess = !error;
|
9290 |
+
}
|
9291 |
+
} else {
|
9292 |
+
// We extract error from statusText
|
9293 |
+
// then normalize statusText and status for non-aborts
|
9294 |
+
error = statusText;
|
9295 |
+
if ( status || !statusText ) {
|
9296 |
+
statusText = "error";
|
9297 |
+
if ( status < 0 ) {
|
9298 |
+
status = 0;
|
9299 |
+
}
|
9300 |
+
}
|
9301 |
+
}
|
9302 |
|
9303 |
+
// Set data for the fake xhr object
|
9304 |
+
jqXHR.status = status;
|
9305 |
+
jqXHR.statusText = ( nativeStatusText || statusText ) + "";
|
9306 |
|
9307 |
+
// Success/Error
|
9308 |
+
if ( isSuccess ) {
|
9309 |
+
deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
|
9310 |
+
} else {
|
9311 |
+
deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
|
9312 |
+
}
|
9313 |
|
9314 |
+
// Status-dependent callbacks
|
9315 |
+
jqXHR.statusCode( statusCode );
|
9316 |
+
statusCode = undefined;
|
9317 |
|
9318 |
+
if ( fireGlobals ) {
|
9319 |
+
globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
|
9320 |
+
[ jqXHR, s, isSuccess ? success : error ] );
|
9321 |
+
}
|
|
|
|
|
|
|
9322 |
|
9323 |
+
// Complete
|
9324 |
+
completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
|
|
|
|
|
|
|
9325 |
|
9326 |
+
if ( fireGlobals ) {
|
9327 |
+
globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
|
9328 |
+
// Handle the global AJAX counter
|
9329 |
+
if ( !( --jQuery.active ) ) {
|
9330 |
+
jQuery.event.trigger("ajaxStop");
|
9331 |
}
|
9332 |
+
}
|
9333 |
+
}
|
9334 |
|
9335 |
+
return jqXHR;
|
9336 |
+
},
|
9337 |
|
9338 |
+
getJSON: function( url, data, callback ) {
|
9339 |
+
return jQuery.get( url, data, callback, "json" );
|
9340 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9341 |
|
9342 |
+
getScript: function( url, callback ) {
|
9343 |
+
return jQuery.get( url, undefined, callback, "script" );
|
|
|
9344 |
}
|
9345 |
+
});
|
9346 |
|
9347 |
+
jQuery.each( [ "get", "post" ], function( i, method ) {
|
9348 |
+
jQuery[ method ] = function( url, data, callback, type ) {
|
9349 |
+
// shift arguments if data argument was omitted
|
9350 |
+
if ( jQuery.isFunction( data ) ) {
|
9351 |
+
type = type || callback;
|
9352 |
+
callback = data;
|
9353 |
+
data = undefined;
|
9354 |
+
}
|
9355 |
|
9356 |
+
return jQuery.ajax({
|
9357 |
+
url: url,
|
9358 |
+
type: method,
|
9359 |
+
dataType: type,
|
9360 |
+
data: data,
|
9361 |
+
success: callback
|
9362 |
+
});
|
9363 |
+
};
|
9364 |
});
|
9365 |
|
|
|
|
|
9366 |
|
9367 |
+
jQuery._evalUrl = function( url ) {
|
9368 |
+
return jQuery.ajax({
|
9369 |
+
url: url,
|
9370 |
+
type: "GET",
|
9371 |
+
dataType: "script",
|
9372 |
+
async: false,
|
9373 |
+
global: false,
|
9374 |
+
"throws": true
|
9375 |
+
});
|
9376 |
+
};
|
9377 |
+
|
9378 |
+
|
9379 |
+
jQuery.fn.extend({
|
9380 |
+
wrapAll: function( html ) {
|
9381 |
+
if ( jQuery.isFunction( html ) ) {
|
9382 |
+
return this.each(function(i) {
|
9383 |
+
jQuery(this).wrapAll( html.call(this, i) );
|
9384 |
+
});
|
9385 |
+
}
|
9386 |
+
|
9387 |
+
if ( this[0] ) {
|
9388 |
+
// The elements to wrap the target around
|
9389 |
+
var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
|
9390 |
+
|
9391 |
+
if ( this[0].parentNode ) {
|
9392 |
+
wrap.insertBefore( this[0] );
|
9393 |
+
}
|
9394 |
|
9395 |
+
wrap.map(function() {
|
9396 |
+
var elem = this;
|
9397 |
|
9398 |
+
while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
|
9399 |
+
elem = elem.firstChild;
|
9400 |
+
}
|
|
|
|
|
9401 |
|
9402 |
+
return elem;
|
9403 |
+
}).append( this );
|
|
|
|
|
|
|
|
|
|
|
9404 |
}
|
9405 |
|
9406 |
+
return this;
|
9407 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9408 |
|
9409 |
+
wrapInner: function( html ) {
|
9410 |
+
if ( jQuery.isFunction( html ) ) {
|
9411 |
+
return this.each(function(i) {
|
9412 |
+
jQuery(this).wrapInner( html.call(this, i) );
|
9413 |
+
});
|
9414 |
+
}
|
9415 |
|
9416 |
+
return this.each(function() {
|
9417 |
+
var self = jQuery( this ),
|
9418 |
+
contents = self.contents();
|
|
|
9419 |
|
9420 |
+
if ( contents.length ) {
|
9421 |
+
contents.wrapAll( html );
|
|
|
|
|
9422 |
|
9423 |
+
} else {
|
9424 |
+
self.append( html );
|
9425 |
}
|
9426 |
+
});
|
9427 |
+
},
|
9428 |
|
9429 |
+
wrap: function( html ) {
|
9430 |
+
var isFunction = jQuery.isFunction( html );
|
|
|
|
|
9431 |
|
9432 |
+
return this.each(function(i) {
|
9433 |
+
jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
|
9434 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9435 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9436 |
|
9437 |
+
unwrap: function() {
|
9438 |
+
return this.parent().each(function() {
|
9439 |
+
if ( !jQuery.nodeName( this, "body" ) ) {
|
9440 |
+
jQuery( this ).replaceWith( this.childNodes );
|
9441 |
+
}
|
9442 |
+
}).end();
|
|
|
|
|
9443 |
}
|
9444 |
});
|
9445 |
|
|
|
|
|
9446 |
|
9447 |
+
jQuery.expr.filters.hidden = function( elem ) {
|
9448 |
+
// Support: Opera <= 12.12
|
9449 |
+
// Opera reports offsetWidths and offsetHeights less than zero on some elements
|
9450 |
+
return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||
|
9451 |
+
(!support.reliableHiddenOffsets() &&
|
9452 |
+
((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
|
9453 |
+
};
|
9454 |
|
9455 |
+
jQuery.expr.filters.visible = function( elem ) {
|
9456 |
+
return !jQuery.expr.filters.hidden( elem );
|
9457 |
+
};
|
9458 |
|
|
|
9459 |
|
|
|
9460 |
|
|
|
9461 |
|
9462 |
+
var r20 = /%20/g,
|
9463 |
+
rbracket = /\[\]$/,
|
9464 |
+
rCRLF = /\r?\n/g,
|
9465 |
+
rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
|
9466 |
+
rsubmittable = /^(?:input|select|textarea|keygen)/i;
|
9467 |
|
9468 |
+
function buildParams( prefix, obj, traditional, add ) {
|
9469 |
+
var name;
|
|
|
9470 |
|
9471 |
+
if ( jQuery.isArray( obj ) ) {
|
9472 |
+
// Serialize array item.
|
9473 |
+
jQuery.each( obj, function( i, v ) {
|
9474 |
+
if ( traditional || rbracket.test( prefix ) ) {
|
9475 |
+
// Treat each array item as a scalar.
|
9476 |
+
add( prefix, v );
|
9477 |
|
9478 |
+
} else {
|
9479 |
+
// Item is non-scalar (array or object), encode its numeric index.
|
9480 |
+
buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
|
9481 |
+
}
|
9482 |
+
});
|
9483 |
|
9484 |
+
} else if ( !traditional && jQuery.type( obj ) === "object" ) {
|
9485 |
+
// Serialize object item.
|
9486 |
+
for ( name in obj ) {
|
9487 |
+
buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
|
9488 |
+
}
|
9489 |
|
9490 |
+
} else {
|
9491 |
+
// Serialize scalar item.
|
9492 |
+
add( prefix, obj );
|
9493 |
+
}
|
9494 |
+
}
|
9495 |
|
9496 |
+
// Serialize an array of form elements or a set of
|
9497 |
+
// key/values into a query string
|
9498 |
+
jQuery.param = function( a, traditional ) {
|
9499 |
+
var prefix,
|
9500 |
+
s = [],
|
9501 |
+
add = function( key, value ) {
|
9502 |
+
// If value is a function, invoke it and return its value
|
9503 |
+
value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
|
9504 |
+
s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
|
9505 |
+
};
|
9506 |
|
9507 |
+
// Set traditional to true for jQuery <= 1.3.2 behavior.
|
9508 |
+
if ( traditional === undefined ) {
|
9509 |
+
traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
|
9510 |
+
}
|
9511 |
|
9512 |
+
// If an array was passed in, assume that it is an array of form elements.
|
9513 |
+
if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
|
9514 |
+
// Serialize the form elements
|
9515 |
+
jQuery.each( a, function() {
|
9516 |
+
add( this.name, this.value );
|
9517 |
+
});
|
|
|
|
|
|
|
|
|
9518 |
|
9519 |
+
} else {
|
9520 |
+
// If traditional, encode the "old" way (the way 1.3.2 or older
|
9521 |
+
// did it), otherwise encode params recursively.
|
9522 |
+
for ( prefix in a ) {
|
9523 |
+
buildParams( prefix, a[ prefix ], traditional, add );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9524 |
}
|
9525 |
+
}
|
|
|
9526 |
|
9527 |
+
// Return the resulting serialization
|
9528 |
+
return s.join( "&" ).replace( r20, "+" );
|
9529 |
+
};
|
9530 |
+
|
9531 |
+
jQuery.fn.extend({
|
9532 |
+
serialize: function() {
|
9533 |
+
return jQuery.param( this.serializeArray() );
|
9534 |
+
},
|
9535 |
+
serializeArray: function() {
|
9536 |
+
return this.map(function() {
|
9537 |
+
// Can add propHook for "elements" to filter or add form elements
|
9538 |
+
var elements = jQuery.prop( this, "elements" );
|
9539 |
+
return elements ? jQuery.makeArray( elements ) : this;
|
9540 |
+
})
|
9541 |
+
.filter(function() {
|
9542 |
+
var type = this.type;
|
9543 |
+
// Use .is(":disabled") so that fieldset[disabled] works
|
9544 |
+
return this.name && !jQuery( this ).is( ":disabled" ) &&
|
9545 |
+
rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
|
9546 |
+
( this.checked || !rcheckableType.test( type ) );
|
9547 |
+
})
|
9548 |
+
.map(function( i, elem ) {
|
9549 |
+
var val = jQuery( this ).val();
|
9550 |
+
|
9551 |
+
return val == null ?
|
9552 |
+
null :
|
9553 |
+
jQuery.isArray( val ) ?
|
9554 |
+
jQuery.map( val, function( val ) {
|
9555 |
+
return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
|
9556 |
+
}) :
|
9557 |
+
{ name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
|
9558 |
+
}).get();
|
9559 |
+
}
|
9560 |
+
});
|
9561 |
|
|
|
|
|
|
|
|
|
|
|
9562 |
|
9563 |
// Create the request object
|
9564 |
// (This is still attached to ajaxSettings for backward compatibility)
|
9565 |
+
jQuery.ajaxSettings.xhr = window.ActiveXObject !== undefined ?
|
9566 |
+
// Support: IE6+
|
|
|
|
|
|
|
|
|
|
|
9567 |
function() {
|
9568 |
+
|
9569 |
+
// XHR cannot access local files, always use ActiveX for that case
|
9570 |
+
return !this.isLocal &&
|
9571 |
+
|
9572 |
+
// Support: IE7-8
|
9573 |
+
// oldIE XHR does not support non-RFC2616 methods (#13240)
|
9574 |
+
// See http://msdn.microsoft.com/en-us/library/ie/ms536648(v=vs.85).aspx
|
9575 |
+
// and http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9
|
9576 |
+
// Although this check for six methods instead of eight
|
9577 |
+
// since IE also does not support "trace" and "connect"
|
9578 |
+
/^(get|post|head|put|delete|options)$/i.test( this.type ) &&
|
9579 |
+
|
9580 |
+
createStandardXHR() || createActiveXHR();
|
9581 |
} :
|
9582 |
// For all other browsers, use the standard XMLHttpRequest object
|
9583 |
createStandardXHR;
|
9584 |
|
9585 |
+
var xhrId = 0,
|
9586 |
+
xhrCallbacks = {},
|
9587 |
+
xhrSupported = jQuery.ajaxSettings.xhr();
|
9588 |
+
|
9589 |
+
// Support: IE<10
|
9590 |
+
// Open requests must be manually aborted on unload (#5280)
|
9591 |
+
// See https://support.microsoft.com/kb/2856746 for more info
|
9592 |
+
if ( window.attachEvent ) {
|
9593 |
+
window.attachEvent( "onunload", function() {
|
9594 |
+
for ( var key in xhrCallbacks ) {
|
9595 |
+
xhrCallbacks[ key ]( undefined, true );
|
9596 |
+
}
|
9597 |
});
|
9598 |
+
}
|
9599 |
+
|
9600 |
+
// Determine support properties
|
9601 |
+
support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
|
9602 |
+
xhrSupported = support.ajax = !!xhrSupported;
|
9603 |
|
9604 |
// Create transport if the browser can provide an xhr
|
9605 |
+
if ( xhrSupported ) {
|
9606 |
|
9607 |
+
jQuery.ajaxTransport(function( options ) {
|
9608 |
// Cross domain only allowed if supported through XMLHttpRequest
|
9609 |
+
if ( !options.crossDomain || support.cors ) {
|
9610 |
|
9611 |
var callback;
|
9612 |
|
9613 |
return {
|
9614 |
send: function( headers, complete ) {
|
9615 |
+
var i,
|
9616 |
+
xhr = options.xhr(),
|
9617 |
+
id = ++xhrId;
|
|
|
9618 |
|
9619 |
// Open the socket
|
9620 |
+
xhr.open( options.type, options.url, options.async, options.username, options.password );
|
|
|
|
|
|
|
|
|
|
|
9621 |
|
9622 |
// Apply custom fields if provided
|
9623 |
+
if ( options.xhrFields ) {
|
9624 |
+
for ( i in options.xhrFields ) {
|
9625 |
+
xhr[ i ] = options.xhrFields[ i ];
|
9626 |
}
|
9627 |
}
|
9628 |
|
9629 |
// Override mime type if needed
|
9630 |
+
if ( options.mimeType && xhr.overrideMimeType ) {
|
9631 |
+
xhr.overrideMimeType( options.mimeType );
|
9632 |
}
|
9633 |
|
9634 |
// X-Requested-With header
|
9636 |
// akin to a jigsaw puzzle, we simply never set it to be sure.
|
9637 |
// (it can always be set on a per-request basis or even using ajaxSetup)
|
9638 |
// For same-domain requests, won't change header if already provided.
|
9639 |
+
if ( !options.crossDomain && !headers["X-Requested-With"] ) {
|
9640 |
+
headers["X-Requested-With"] = "XMLHttpRequest";
|
9641 |
}
|
9642 |
|
9643 |
+
// Set headers
|
9644 |
+
for ( i in headers ) {
|
9645 |
+
// Support: IE<9
|
9646 |
+
// IE's ActiveXObject throws a 'Type Mismatch' exception when setting
|
9647 |
+
// request header to a null-value.
|
9648 |
+
//
|
9649 |
+
// To keep consistent with other XHR implementations, cast the value
|
9650 |
+
// to string and ignore `undefined`.
|
9651 |
+
if ( headers[ i ] !== undefined ) {
|
9652 |
+
xhr.setRequestHeader( i, headers[ i ] + "" );
|
9653 |
}
|
9654 |
+
}
|
9655 |
|
9656 |
// Do send the request
|
9657 |
// This may raise an exception which is actually
|
9658 |
// handled in jQuery.ajax (so no try/catch here)
|
9659 |
+
xhr.send( ( options.hasContent && options.data ) || null );
|
9660 |
|
9661 |
// Listener
|
9662 |
+
callback = function( _, isAbort ) {
|
9663 |
+
var status, statusText, responses;
|
9664 |
+
|
9665 |
+
// Was never called and is aborted or complete
|
9666 |
+
if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
|
9667 |
+
// Clean up
|
9668 |
+
delete xhrCallbacks[ id ];
|
9669 |
+
callback = undefined;
|
9670 |
+
xhr.onreadystatechange = jQuery.noop;
|
9671 |
+
|
9672 |
+
// Abort manually if needed
|
9673 |
+
if ( isAbort ) {
|
9674 |
+
if ( xhr.readyState !== 4 ) {
|
9675 |
+
xhr.abort();
|
9676 |
+
}
|
9677 |
+
} else {
|
9678 |
+
responses = {};
|
9679 |
+
status = xhr.status;
|
9680 |
+
|
9681 |
+
// Support: IE<10
|
9682 |
+
// Accessing binary-data responseText throws an exception
|
9683 |
+
// (#11426)
|
9684 |
+
if ( typeof xhr.responseText === "string" ) {
|
9685 |
+
responses.text = xhr.responseText;
|
9686 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9687 |
|
9688 |
+
// Firefox throws an exception when accessing
|
9689 |
+
// statusText for faulty cross-domain requests
|
9690 |
+
try {
|
9691 |
+
statusText = xhr.statusText;
|
9692 |
+
} catch( e ) {
|
9693 |
+
// We normalize with Webkit giving an empty statusText
|
9694 |
+
statusText = "";
|
9695 |
+
}
|
9696 |
|
9697 |
+
// Filter status for non standard behaviors
|
9698 |
|
9699 |
+
// If the request is local and we have data: assume a success
|
9700 |
+
// (success with no data won't get notified, that's the best we
|
9701 |
+
// can do given current implementations)
|
9702 |
+
if ( !status && options.isLocal && !options.crossDomain ) {
|
9703 |
+
status = responses.text ? 200 : 404;
|
9704 |
+
// IE - #1450: sometimes returns 1223 when it should be 204
|
9705 |
+
} else if ( status === 1223 ) {
|
9706 |
+
status = 204;
|
|
|
9707 |
}
|
9708 |
}
|
|
|
|
|
|
|
|
|
9709 |
}
|
9710 |
|
9711 |
// Call complete if needed
|
9712 |
if ( responses ) {
|
9713 |
+
complete( status, statusText, responses, xhr.getAllResponseHeaders() );
|
9714 |
}
|
9715 |
};
|
9716 |
|
9717 |
+
if ( !options.async ) {
|
9718 |
// if we're in sync mode we fire the callback
|
9719 |
callback();
|
9720 |
} else if ( xhr.readyState === 4 ) {
|
9721 |
// (IE6 & IE7) if it's in cache and has been
|
9722 |
// retrieved directly we need to fire the callback
|
9723 |
+
setTimeout( callback );
|
9724 |
} else {
|
9725 |
+
// Add to the list of active xhr callbacks
|
9726 |
+
xhr.onreadystatechange = xhrCallbacks[ id ] = callback;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9727 |
}
|
9728 |
},
|
9729 |
|
9730 |
abort: function() {
|
9731 |
if ( callback ) {
|
9732 |
+
callback( undefined, true );
|
9733 |
}
|
9734 |
}
|
9735 |
};
|
9736 |
}
|
9737 |
});
|
9738 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9739 |
|
9740 |
+
// Functions to create xhrs
|
9741 |
+
function createStandardXHR() {
|
9742 |
+
try {
|
9743 |
+
return new window.XMLHttpRequest();
|
9744 |
+
} catch( e ) {}
|
9745 |
}
|
9746 |
|
9747 |
+
function createActiveXHR() {
|
9748 |
+
try {
|
9749 |
+
return new window.ActiveXObject( "Microsoft.XMLHTTP" );
|
9750 |
+
} catch( e ) {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9751 |
}
|
9752 |
|
|
|
9753 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9754 |
|
|
|
|
|
|
|
9755 |
|
9756 |
+
// Install script dataType
|
9757 |
+
jQuery.ajaxSetup({
|
9758 |
+
accepts: {
|
9759 |
+
script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
|
|
|
9760 |
},
|
9761 |
+
contents: {
|
9762 |
+
script: /(?:java|ecma)script/
|
9763 |
+
},
|
9764 |
+
converters: {
|
9765 |
+
"text script": function( text ) {
|
9766 |
+
jQuery.globalEval( text );
|
9767 |
+
return text;
|
9768 |
}
|
9769 |
}
|
9770 |
});
|
9771 |
|
9772 |
+
// Handle cache's special case and global
|
9773 |
+
jQuery.ajaxPrefilter( "script", function( s ) {
|
9774 |
+
if ( s.cache === undefined ) {
|
9775 |
+
s.cache = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9776 |
}
|
9777 |
+
if ( s.crossDomain ) {
|
9778 |
+
s.type = "GET";
|
9779 |
+
s.global = false;
|
9780 |
+
}
|
9781 |
+
});
|
9782 |
|
9783 |
+
// Bind script tag hack transport
|
9784 |
+
jQuery.ajaxTransport( "script", function(s) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9785 |
|
9786 |
+
// This transport only deals with cross domain requests
|
9787 |
+
if ( s.crossDomain ) {
|
|
|
|
|
|
|
9788 |
|
9789 |
+
var script,
|
9790 |
+
head = document.head || jQuery("head")[0] || document.documentElement;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9791 |
|
9792 |
+
return {
|
9793 |
|
9794 |
+
send: function( _, callback ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9795 |
|
9796 |
+
script = document.createElement("script");
|
|
|
|
|
|
|
|
|
|
|
9797 |
|
9798 |
+
script.async = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9799 |
|
9800 |
+
if ( s.scriptCharset ) {
|
9801 |
+
script.charset = s.scriptCharset;
|
|
|
|
|
|
|
9802 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9803 |
|
9804 |
+
script.src = s.url;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9805 |
|
9806 |
+
// Attach handlers for all browsers
|
9807 |
+
script.onload = script.onreadystatechange = function( _, isAbort ) {
|
|
|
|
|
|
|
|
|
|
|
9808 |
|
9809 |
+
if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9810 |
|
9811 |
+
// Handle memory leak in IE
|
9812 |
+
script.onload = script.onreadystatechange = null;
|
|
|
9813 |
|
9814 |
+
// Remove the script
|
9815 |
+
if ( script.parentNode ) {
|
9816 |
+
script.parentNode.removeChild( script );
|
9817 |
+
}
|
|
|
|
|
|
|
|
|
9818 |
|
9819 |
+
// Dereference the script
|
9820 |
+
script = null;
|
9821 |
|
9822 |
+
// Callback if not abort
|
9823 |
+
if ( !isAbort ) {
|
9824 |
+
callback( 200, "success" );
|
9825 |
+
}
|
9826 |
+
}
|
9827 |
+
};
|
9828 |
|
9829 |
+
// Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending
|
9830 |
+
// Use native DOM manipulation to avoid our domManip AJAX trickery
|
9831 |
+
head.insertBefore( script, head.firstChild );
|
9832 |
+
},
|
9833 |
|
9834 |
+
abort: function() {
|
9835 |
+
if ( script ) {
|
9836 |
+
script.onload( undefined, true );
|
9837 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9838 |
}
|
9839 |
+
};
|
9840 |
}
|
9841 |
+
});
|
9842 |
|
|
|
|
|
9843 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9844 |
|
9845 |
+
|
9846 |
+
var oldCallbacks = [],
|
9847 |
+
rjsonp = /(=)\?(?=&|$)|\?\?/;
|
9848 |
+
|
9849 |
+
// Default jsonp settings
|
9850 |
+
jQuery.ajaxSetup({
|
9851 |
+
jsonp: "callback",
|
9852 |
+
jsonpCallback: function() {
|
9853 |
+
var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
|
9854 |
+
this[ callback ] = true;
|
9855 |
+
return callback;
|
9856 |
+
}
|
9857 |
});
|
9858 |
|
9859 |
+
// Detect, normalize options and install callbacks for jsonp requests
|
9860 |
+
jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
|
9861 |
|
9862 |
+
var callbackName, overwritten, responseContainer,
|
9863 |
+
jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
|
9864 |
+
"url" :
|
9865 |
+
typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
|
9866 |
+
);
|
9867 |
|
9868 |
+
// Handle iff the expected data type is "jsonp" or we have a parameter to set
|
9869 |
+
if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9870 |
|
9871 |
+
// Get callback name, remembering preexisting value associated with it
|
9872 |
+
callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
|
9873 |
+
s.jsonpCallback() :
|
9874 |
+
s.jsonpCallback;
|
|
|
9875 |
|
9876 |
+
// Insert callback into url or form data
|
9877 |
+
if ( jsonProp ) {
|
9878 |
+
s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
|
9879 |
+
} else if ( s.jsonp !== false ) {
|
9880 |
+
s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
|
9881 |
+
}
|
9882 |
+
|
9883 |
+
// Use data converter to retrieve json after script execution
|
9884 |
+
s.converters["script json"] = function() {
|
9885 |
+
if ( !responseContainer ) {
|
9886 |
+
jQuery.error( callbackName + " was not called" );
|
9887 |
+
}
|
9888 |
+
return responseContainer[ 0 ];
|
9889 |
};
|
9890 |
|
9891 |
+
// force json dataType
|
9892 |
+
s.dataTypes[ 0 ] = "json";
|
|
|
|
|
|
|
|
|
|
|
|
|
9893 |
|
9894 |
+
// Install callback
|
9895 |
+
overwritten = window[ callbackName ];
|
9896 |
+
window[ callbackName ] = function() {
|
9897 |
+
responseContainer = arguments;
|
9898 |
+
};
|
9899 |
|
9900 |
+
// Clean-up function (fires after converters)
|
9901 |
+
jqXHR.always(function() {
|
9902 |
+
// Restore preexisting value
|
9903 |
+
window[ callbackName ] = overwritten;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9904 |
|
9905 |
+
// Save back as free
|
9906 |
+
if ( s[ callbackName ] ) {
|
9907 |
+
// make sure that re-using the options doesn't screw things around
|
9908 |
+
s.jsonpCallback = originalSettings.jsonpCallback;
|
9909 |
+
|
9910 |
+
// save the callback name for future use
|
9911 |
+
oldCallbacks.push( callbackName );
|
9912 |
}
|
9913 |
|
9914 |
+
// Call if it was a function and we have a response
|
9915 |
+
if ( responseContainer && jQuery.isFunction( overwritten ) ) {
|
9916 |
+
overwritten( responseContainer[ 0 ] );
|
|
|
|
|
9917 |
}
|
9918 |
+
|
9919 |
+
responseContainer = overwritten = undefined;
|
9920 |
});
|
9921 |
+
|
9922 |
+
// Delegate to script
|
9923 |
+
return "script";
|
9924 |
}
|
9925 |
});
|
9926 |
|
|
|
|
|
|
|
|
|
|
|
9927 |
|
9928 |
+
|
9929 |
+
|
9930 |
+
// data: string of html
|
9931 |
+
// context (optional): If specified, the fragment will be created in this context, defaults to document
|
9932 |
+
// keepScripts (optional): If true, will include scripts passed in the html string
|
9933 |
+
jQuery.parseHTML = function( data, context, keepScripts ) {
|
9934 |
+
if ( !data || typeof data !== "string" ) {
|
9935 |
+
return null;
|
9936 |
+
}
|
9937 |
+
if ( typeof context === "boolean" ) {
|
9938 |
+
keepScripts = context;
|
9939 |
+
context = false;
|
9940 |
}
|
9941 |
+
context = context || document;
|
9942 |
|
9943 |
+
var parsed = rsingleTag.exec( data ),
|
9944 |
+
scripts = !keepScripts && [];
|
9945 |
+
|
9946 |
+
// Single tag
|
9947 |
+
if ( parsed ) {
|
9948 |
+
return [ context.createElement( parsed[1] ) ];
|
9949 |
}
|
9950 |
|
9951 |
+
parsed = jQuery.buildFragment( [ data ], context, scripts );
|
|
|
9952 |
|
9953 |
+
if ( scripts && scripts.length ) {
|
9954 |
+
jQuery( scripts ).remove();
|
9955 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9956 |
|
9957 |
+
return jQuery.merge( [], parsed.childNodes );
|
9958 |
+
};
|
|
|
|
|
|
|
|
|
|
|
9959 |
|
|
|
|
|
9960 |
|
9961 |
+
// Keep a copy of the old load method
|
9962 |
+
var _load = jQuery.fn.load;
|
9963 |
+
|
9964 |
+
/**
|
9965 |
+
* Load a url into a page
|
9966 |
+
*/
|
9967 |
+
jQuery.fn.load = function( url, params, callback ) {
|
9968 |
+
if ( typeof url !== "string" && _load ) {
|
9969 |
+
return _load.apply( this, arguments );
|
9970 |
}
|
9971 |
|
9972 |
+
var selector, response, type,
|
9973 |
+
self = this,
|
9974 |
+
off = url.indexOf(" ");
|
9975 |
|
9976 |
+
if ( off >= 0 ) {
|
9977 |
+
selector = jQuery.trim( url.slice( off, url.length ) );
|
9978 |
+
url = url.slice( 0, off );
|
9979 |
+
}
|
9980 |
|
9981 |
+
// If it's a function
|
9982 |
+
if ( jQuery.isFunction( params ) ) {
|
|
|
|
|
9983 |
|
9984 |
+
// We assume that it's the callback
|
9985 |
+
callback = params;
|
9986 |
+
params = undefined;
|
9987 |
|
9988 |
+
// Otherwise, build a param string
|
9989 |
+
} else if ( params && typeof params === "object" ) {
|
9990 |
+
type = "POST";
|
|
|
|
|
|
|
9991 |
}
|
|
|
9992 |
|
9993 |
+
// If we have elements to modify, make the request
|
9994 |
+
if ( self.length > 0 ) {
|
9995 |
+
jQuery.ajax({
|
9996 |
+
url: url,
|
|
|
|
|
9997 |
|
9998 |
+
// if "type" variable is undefined, then "GET" method will be used
|
9999 |
+
type: type,
|
10000 |
+
dataType: "html",
|
10001 |
+
data: params
|
10002 |
+
}).done(function( responseText ) {
|
10003 |
|
10004 |
+
// Save response for use in complete callback
|
10005 |
+
response = arguments;
|
|
|
|
|
|
|
|
|
|
|
10006 |
|
10007 |
+
self.html( selector ?
|
|
|
|
|
|
|
|
|
10008 |
|
10009 |
+
// If a selector was specified, locate the right elements in a dummy div
|
10010 |
+
// Exclude scripts to avoid IE 'Permission Denied' errors
|
10011 |
+
jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :
|
|
|
|
|
10012 |
|
10013 |
+
// Otherwise use the full result
|
10014 |
+
responseText );
|
10015 |
|
10016 |
+
}).complete( callback && function( jqXHR, status ) {
|
10017 |
+
self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
|
10018 |
+
});
|
10019 |
+
}
|
10020 |
|
10021 |
+
return this;
|
|
|
|
|
|
|
|
|
10022 |
};
|
10023 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10024 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10025 |
|
|
|
|
|
|
|
|
|
10026 |
|
10027 |
+
// Attach a bunch of functions for handling common AJAX events
|
10028 |
+
jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) {
|
10029 |
+
jQuery.fn[ type ] = function( fn ) {
|
10030 |
+
return this.on( type, fn );
|
10031 |
+
};
|
10032 |
+
});
|
10033 |
|
|
|
|
|
|
|
10034 |
|
|
|
10035 |
|
|
|
|
|
|
|
|
|
10036 |
|
10037 |
+
jQuery.expr.filters.animated = function( elem ) {
|
10038 |
+
return jQuery.grep(jQuery.timers, function( fn ) {
|
10039 |
+
return elem === fn.elem;
|
10040 |
+
}).length;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10041 |
};
|
10042 |
|
|
|
10043 |
|
|
|
|
|
|
|
10044 |
|
|
|
|
|
|
|
|
|
10045 |
|
|
|
|
|
10046 |
|
10047 |
+
var docElem = window.document.documentElement;
|
10048 |
+
|
10049 |
+
/**
|
10050 |
+
* Gets a window from an element
|
10051 |
+
*/
|
10052 |
+
function getWindow( elem ) {
|
10053 |
+
return jQuery.isWindow( elem ) ?
|
10054 |
+
elem :
|
10055 |
+
elem.nodeType === 9 ?
|
10056 |
+
elem.defaultView || elem.parentWindow :
|
10057 |
+
false;
|
10058 |
+
}
|
10059 |
+
|
10060 |
+
jQuery.offset = {
|
10061 |
setOffset: function( elem, options, i ) {
|
10062 |
+
var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
|
10063 |
+
position = jQuery.css( elem, "position" ),
|
10064 |
+
curElem = jQuery( elem ),
|
10065 |
+
props = {};
|
10066 |
|
10067 |
// set position first, in-case top/left are set even on static elem
|
10068 |
if ( position === "static" ) {
|
10069 |
elem.style.position = "relative";
|
10070 |
}
|
10071 |
|
10072 |
+
curOffset = curElem.offset();
|
10073 |
+
curCSSTop = jQuery.css( elem, "top" );
|
10074 |
+
curCSSLeft = jQuery.css( elem, "left" );
|
10075 |
+
calculatePosition = ( position === "absolute" || position === "fixed" ) &&
|
10076 |
+
jQuery.inArray("auto", [ curCSSTop, curCSSLeft ] ) > -1;
|
|
|
10077 |
|
10078 |
// need to be able to calculate position if either top or left is auto and position is either absolute or fixed
|
10079 |
if ( calculatePosition ) {
|
10104 |
}
|
10105 |
};
|
10106 |
|
|
|
10107 |
jQuery.fn.extend({
|
10108 |
+
offset: function( options ) {
|
10109 |
+
if ( arguments.length ) {
|
10110 |
+
return options === undefined ?
|
10111 |
+
this :
|
10112 |
+
this.each(function( i ) {
|
10113 |
+
jQuery.offset.setOffset( this, options, i );
|
10114 |
+
});
|
10115 |
+
}
|
10116 |
+
|
10117 |
+
var docElem, win,
|
10118 |
+
box = { top: 0, left: 0 },
|
10119 |
+
elem = this[ 0 ],
|
10120 |
+
doc = elem && elem.ownerDocument;
|
10121 |
+
|
10122 |
+
if ( !doc ) {
|
10123 |
+
return;
|
10124 |
+
}
|
10125 |
+
|
10126 |
+
docElem = doc.documentElement;
|
10127 |
+
|
10128 |
+
// Make sure it's not a disconnected DOM node
|
10129 |
+
if ( !jQuery.contains( docElem, elem ) ) {
|
10130 |
+
return box;
|
10131 |
+
}
|
10132 |
+
|
10133 |
+
// If we don't have gBCR, just use 0,0 rather than error
|
10134 |
+
// BlackBerry 5, iOS 3 (original iPhone)
|
10135 |
+
if ( typeof elem.getBoundingClientRect !== strundefined ) {
|
10136 |
+
box = elem.getBoundingClientRect();
|
10137 |
+
}
|
10138 |
+
win = getWindow( doc );
|
10139 |
+
return {
|
10140 |
+
top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),
|
10141 |
+
left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )
|
10142 |
+
};
|
10143 |
+
},
|
10144 |
|
10145 |
position: function() {
|
10146 |
+
if ( !this[ 0 ] ) {
|
10147 |
return;
|
10148 |
}
|
10149 |
|
10150 |
+
var offsetParent, offset,
|
10151 |
+
parentOffset = { top: 0, left: 0 },
|
10152 |
+
elem = this[ 0 ];
|
10153 |
+
|
10154 |
+
// fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is its only offset parent
|
10155 |
+
if ( jQuery.css( elem, "position" ) === "fixed" ) {
|
10156 |
+
// we assume that getBoundingClientRect is available when computed position is fixed
|
10157 |
+
offset = elem.getBoundingClientRect();
|
10158 |
+
} else {
|
10159 |
+
// Get *real* offsetParent
|
10160 |
+
offsetParent = this.offsetParent();
|
10161 |
|
10162 |
+
// Get correct offsets
|
10163 |
+
offset = this.offset();
|
10164 |
+
if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
|
10165 |
+
parentOffset = offsetParent.offset();
|
10166 |
+
}
|
10167 |
|
10168 |
+
// Add offsetParent borders
|
10169 |
+
parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
|
10170 |
+
parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
|
10171 |
+
}
|
10172 |
|
10173 |
+
// Subtract parent offsets and element margins
|
10174 |
// note: when an element has margin: auto the offsetLeft and marginLeft
|
10175 |
// are the same in Safari causing offset.left to incorrectly be 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10176 |
return {
|
10177 |
+
top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
|
10178 |
+
left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true)
|
10179 |
};
|
10180 |
},
|
10181 |
|
10182 |
offsetParent: function() {
|
10183 |
return this.map(function() {
|
10184 |
+
var offsetParent = this.offsetParent || docElem;
|
10185 |
+
|
10186 |
+
while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position" ) === "static" ) ) {
|
10187 |
offsetParent = offsetParent.offsetParent;
|
10188 |
}
|
10189 |
+
return offsetParent || docElem;
|
10190 |
});
|
10191 |
}
|
10192 |
});
|
10193 |
|
|
|
10194 |
// Create scrollLeft and scrollTop methods
|
10195 |
+
jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
|
10196 |
var top = /Y/.test( prop );
|
10197 |
|
10198 |
jQuery.fn[ method ] = function( val ) {
|
10199 |
+
return access( this, function( elem, method, val ) {
|
10200 |
var win = getWindow( elem );
|
10201 |
|
10202 |
if ( val === undefined ) {
|
10208 |
if ( win ) {
|
10209 |
win.scrollTo(
|
10210 |
!top ? val : jQuery( win ).scrollLeft(),
|
10211 |
+
top ? val : jQuery( win ).scrollTop()
|
10212 |
);
|
10213 |
|
10214 |
} else {
|
10218 |
};
|
10219 |
});
|
10220 |
|
10221 |
+
// Add the top/left cssHooks using jQuery.fn.position
|
10222 |
+
// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
|
10223 |
+
// getComputedStyle returns percent when specified for top/left/bottom/right
|
10224 |
+
// rather than make the css module depend on the offset module, we just check for it here
|
10225 |
+
jQuery.each( [ "top", "left" ], function( i, prop ) {
|
10226 |
+
jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
|
10227 |
+
function( elem, computed ) {
|
10228 |
+
if ( computed ) {
|
10229 |
+
computed = curCSS( elem, prop );
|
10230 |
+
// if curCSS returns percentage, fallback to offset
|
10231 |
+
return rnumnonpx.test( computed ) ?
|
10232 |
+
jQuery( elem ).position()[ prop ] + "px" :
|
10233 |
+
computed;
|
10234 |
+
}
|
10235 |
+
}
|
10236 |
+
);
|
10237 |
+
});
|
10238 |
+
|
10239 |
+
|
10240 |
// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
|
10241 |
jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
|
10242 |
jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
|
10245 |
var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
|
10246 |
extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
|
10247 |
|
10248 |
+
return access( this, function( elem, type, value ) {
|
10249 |
var doc;
|
10250 |
|
10251 |
if ( jQuery.isWindow( elem ) ) {
|
10270 |
|
10271 |
return value === undefined ?
|
10272 |
// Get width or height on the element, requesting but not forcing parseFloat
|
10273 |
+
jQuery.css( elem, type, extra ) :
|
10274 |
|
10275 |
// Set width or height on the element
|
10276 |
jQuery.style( elem, type, value, extra );
|
10278 |
};
|
10279 |
});
|
10280 |
});
|
10281 |
+
|
10282 |
+
|
10283 |
+
// The number of elements contained in the matched element set
|
10284 |
+
jQuery.fn.size = function() {
|
10285 |
+
return this.length;
|
10286 |
+
};
|
10287 |
+
|
10288 |
+
jQuery.fn.andSelf = jQuery.fn.addBack;
|
10289 |
+
|
10290 |
+
|
10291 |
+
|
10292 |
+
|
10293 |
+
// Register as a named AMD module, since jQuery can be concatenated with other
|
10294 |
+
// files that may use define, but not via a proper concatenation script that
|
10295 |
+
// understands anonymous AMD modules. A named AMD is safest and most robust
|
10296 |
+
// way to register. Lowercase jquery is used because AMD module names are
|
10297 |
+
// derived from file names, and jQuery is normally delivered in a lowercase
|
10298 |
+
// file name. Do this after creating the global so that if an AMD module wants
|
10299 |
+
// to call noConflict to hide this version of jQuery, it will work.
|
10300 |
+
|
10301 |
+
// Note that for maximum portability, libraries that are not jQuery should
|
10302 |
+
// declare themselves as anonymous modules, and avoid setting a global if an
|
10303 |
+
// AMD loader is present. jQuery is a special case. For more information, see
|
10304 |
+
// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
|
10305 |
+
|
10306 |
+
if ( typeof define === "function" && define.amd ) {
|
10307 |
+
define( "jquery", [], function() {
|
10308 |
+
return jQuery;
|
10309 |
+
});
|
10310 |
}
|
10311 |
|
10312 |
+
|
10313 |
+
|
10314 |
+
|
10315 |
+
var
|
10316 |
+
// Map over jQuery in case of overwrite
|
10317 |
+
_jQuery = window.jQuery,
|
10318 |
+
|
10319 |
+
// Map over the $ in case of overwrite
|
10320 |
+
_$ = window.$;
|
10321 |
+
|
10322 |
+
jQuery.noConflict = function( deep ) {
|
10323 |
+
if ( window.$ === jQuery ) {
|
10324 |
+
window.$ = _$;
|
10325 |
+
}
|
10326 |
+
|
10327 |
+
if ( deep && window.jQuery === jQuery ) {
|
10328 |
+
window.jQuery = _jQuery;
|
10329 |
+
}
|
10330 |
+
|
10331 |
+
return jQuery;
|
10332 |
+
};
|
10333 |
+
|
10334 |
+
// Expose jQuery and $ identifiers, even in
|
10335 |
+
// AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
|
10336 |
+
// and CommonJS for browser emulators (#13566)
|
10337 |
+
if ( typeof noGlobal === strundefined ) {
|
10338 |
+
window.jQuery = /*window.$ = */jQuery;
|
10339 |
+
}
|
10340 |
+
|
10341 |
+
|
10342 |
+
|
10343 |
+
|
10344 |
+
return jQuery;
|
10345 |
+
|
10346 |
+
}));
|
js/jquery/jquery.min.js
CHANGED
@@ -1,3 +1,4 @@
|
|
1 |
-
|
2 |
-
/*! jQuery v1.8.3 jquery.com | jquery.org/license */
|
3 |
-
(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r<i;r++)v.event.add(t,n,u[n][r])}o.data&&(o.data=v.extend({},o.data))}function Ot(e,t){var n;if(t.nodeType!==1)return;t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),n==="object"?(t.parentNode&&(t.outerHTML=e.outerHTML),v.support.html5Clone&&e.innerHTML&&!v.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):n==="input"&&Et.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):n==="option"?t.selected=e.defaultSelected:n==="input"||n==="textarea"?t.defaultValue=e.defaultValue:n==="script"&&t.text!==e.text&&(t.text=e.text),t.removeAttribute(v.expando)}function Mt(e){return typeof e.getElementsByTagName!="undefined"?e.getElementsByTagName("*"):typeof e.querySelectorAll!="undefined"?e.querySelectorAll("*"):[]}function _t(e){Et.test(e.type)&&(e.defaultChecked=e.checked)}function Qt(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Jt.length;while(i--){t=Jt[i]+n;if(t in e)return t}return r}function Gt(e,t){return e=t||e,v.css(e,"display")==="none"||!v.contains(e.ownerDocument,e)}function Yt(e,t){var n,r,i=[],s=0,o=e.length;for(;s<o;s++){n=e[s];if(!n.style)continue;i[s]=v._data(n,"olddisplay"),t?(!i[s]&&n.style.display==="none"&&(n.style.display=""),n.style.display===""&&Gt(n)&&(i[s]=v._data(n,"olddisplay",nn(n.nodeName)))):(r=Dt(n,"display"),!i[s]&&r!=="none"&&v._data(n,"olddisplay",r))}for(s=0;s<o;s++){n=e[s];if(!n.style)continue;if(!t||n.style.display==="none"||n.style.display==="")n.style.display=t?i[s]||"":"none"}return e}function Zt(e,t,n){var r=Rt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function en(e,t,n,r){var i=n===(r?"border":"content")?4:t==="width"?1:0,s=0;for(;i<4;i+=2)n==="margin"&&(s+=v.css(e,n+$t[i],!0)),r?(n==="content"&&(s-=parseFloat(Dt(e,"padding"+$t[i]))||0),n!=="margin"&&(s-=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0)):(s+=parseFloat(Dt(e,"padding"+$t[i]))||0,n!=="padding"&&(s+=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0));return s}function tn(e,t,n){var r=t==="width"?e.offsetWidth:e.offsetHeight,i=!0,s=v.support.boxSizing&&v.css(e,"boxSizing")==="border-box";if(r<=0||r==null){r=Dt(e,t);if(r<0||r==null)r=e.style[t];if(Ut.test(r))return r;i=s&&(v.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+en(e,t,n||(s?"border":"content"),i)+"px"}function nn(e){if(Wt[e])return Wt[e];var t=v("<"+e+">").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write("<!doctype html><html><body>"),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u<a;u++)r=o[u],s=/^\+/.test(r),s&&(r=r.substr(1)||"*"),i=e[r]=e[r]||[],i[s?"unshift":"push"](n)}}function kn(e,n,r,i,s,o){s=s||n.dataTypes[0],o=o||{},o[s]=!0;var u,a=e[s],f=0,l=a?a.length:0,c=e===Sn;for(;f<l&&(c||!u);f++)u=a[f](n,r,i),typeof u=="string"&&(!c||o[u]?u=t:(n.dataTypes.unshift(u),u=kn(e,n,r,i,u,o)));return(c||!u)&&!o["*"]&&(u=kn(e,n,r,i,"*",o)),u}function Ln(e,n){var r,i,s=v.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((s[r]?e:i||(i={}))[r]=n[r]);i&&v.extend(!0,e,i)}function An(e,n,r){var i,s,o,u,a=e.contents,f=e.dataTypes,l=e.responseFields;for(s in l)s in r&&(n[l[s]]=r[s]);while(f[0]==="*")f.shift(),i===t&&(i=e.mimeType||n.getResponseHeader("content-type"));if(i)for(s in a)if(a[s]&&a[s].test(i)){f.unshift(s);break}if(f[0]in r)o=f[0];else{for(s in r){if(!f[0]||e.converters[s+" "+f[0]]){o=s;break}u||(u=s)}o=o||u}if(o)return o!==f[0]&&f.unshift(o),r[o]}function On(e,t){var n,r,i,s,o=e.dataTypes.slice(),u=o[0],a={},f=0;e.dataFilter&&(t=e.dataFilter(t,e.dataType));if(o[1])for(n in e.converters)a[n.toLowerCase()]=e.converters[n];for(;i=o[++f];)if(i!=="*"){if(u!=="*"&&u!==i){n=a[u+" "+i]||a["* "+i];if(!n)for(r in a){s=r.split(" ");if(s[1]===i){n=a[u+" "+s[0]]||a["* "+s[0]];if(n){n===!0?n=a[r]:a[r]!==!0&&(i=s[0],o.splice(f--,0,i));break}}}if(n!==!0)if(n&&e["throws"])t=n(t);else try{t=n(t)}catch(l){return{state:"parsererror",error:n?l:"No conversion from "+u+" to "+i}}}u=i}return{state:"success",data:t}}function Fn(){try{return new e.XMLHttpRequest}catch(t){}}function In(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function $n(){return setTimeout(function(){qn=t},0),qn=v.now()}function Jn(e,t){v.each(t,function(t,n){var r=(Vn[t]||[]).concat(Vn["*"]),i=0,s=r.length;for(;i<s;i++)if(r[i].call(e,t,n))return})}function Kn(e,t,n){var r,i=0,s=0,o=Xn.length,u=v.Deferred().always(function(){delete a.elem}),a=function(){var t=qn||$n(),n=Math.max(0,f.startTime+f.duration-t),r=n/f.duration||0,i=1-r,s=0,o=f.tweens.length;for(;s<o;s++)f.tweens[s].run(i);return u.notifyWith(e,[f,i,n]),i<1&&o?n:(u.resolveWith(e,[f]),!1)},f=u.promise({elem:e,props:v.extend({},t),opts:v.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:qn||$n(),duration:n.duration,tweens:[],createTween:function(t,n,r){var i=v.Tween(e,f.opts,t,n,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(i),i},stop:function(t){var n=0,r=t?f.tweens.length:0;for(;n<r;n++)f.tweens[n].run(1);return t?u.resolveWith(e,[f,t]):u.rejectWith(e,[f,t]),this}}),l=f.props;Qn(l,f.opts.specialEasing);for(;i<o;i++){r=Xn[i].call(f,e,l,f.opts);if(r)return r}return Jn(f,l),v.isFunction(f.opts.start)&&f.opts.start.call(e,f),v.fx.timer(v.extend(a,{anim:f,queue:f.opts.queue,elem:e})),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always)}function Qn(e,t){var n,r,i,s,o;for(n in e){r=v.camelCase(n),i=t[r],s=e[n],v.isArray(s)&&(i=s[1],s=e[n]=s[0]),n!==r&&(e[r]=s,delete e[n]),o=v.cssHooks[r];if(o&&"expand"in o){s=o.expand(s),delete e[r];for(n in s)n in e||(e[n]=s[n],t[n]=i)}else t[r]=i}}function Gn(e,t,n){var r,i,s,o,u,a,f,l,c,h=this,p=e.style,d={},m=[],g=e.nodeType&&Gt(e);n.queue||(l=v._queueHooks(e,"fx"),l.unqueued==null&&(l.unqueued=0,c=l.empty.fire,l.empty.fire=function(){l.unqueued||c()}),l.unqueued++,h.always(function(){h.always(function(){l.unqueued--,v.queue(e,"fx").length||l.empty.fire()})})),e.nodeType===1&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],v.css(e,"display")==="inline"&&v.css(e,"float")==="none"&&(!v.support.inlineBlockNeedsLayout||nn(e.nodeName)==="inline"?p.display="inline-block":p.zoom=1)),n.overflow&&(p.overflow="hidden",v.support.shrinkWrapBlocks||h.done(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t){s=t[r];if(Un.exec(s)){delete t[r],a=a||s==="toggle";if(s===(g?"hide":"show"))continue;m.push(r)}}o=m.length;if(o){u=v._data(e,"fxshow")||v._data(e,"fxshow",{}),"hidden"in u&&(g=u.hidden),a&&(u.hidden=!g),g?v(e).show():h.done(function(){v(e).hide()}),h.done(function(){var t;v.removeData(e,"fxshow",!0);for(t in d)v.style(e,t,d[t])});for(r=0;r<o;r++)i=m[r],f=h.createTween(i,g?u[i]:0),d[i]=u[i]||v.style(e,i),i in u||(u[i]=f.start,g&&(f.end=f.start,f.start=i==="width"||i==="height"?1:0))}}function Yn(e,t,n,r,i){return new Yn.prototype.init(e,t,n,r,i)}function Zn(e,t){var n,r={height:e},i=0;t=t?1:0;for(;i<4;i+=2-t)n=$t[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function tr(e){return v.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}var n,r,i=e.document,s=e.location,o=e.navigator,u=e.jQuery,a=e.$,f=Array.prototype.push,l=Array.prototype.slice,c=Array.prototype.indexOf,h=Object.prototype.toString,p=Object.prototype.hasOwnProperty,d=String.prototype.trim,v=function(e,t){return new v.fn.init(e,t,n)},m=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,g=/\S/,y=/\s+/,b=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,w=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a<f;a++)if((e=arguments[a])!=null)for(n in e){r=u[n],i=e[n];if(u===i)continue;l&&i&&(v.isPlainObject(i)||(s=v.isArray(i)))?(s?(s=!1,o=r&&v.isArray(r)?r:[]):o=r&&v.isPlainObject(r)?r:{},u[n]=v.extend(l,o,i)):i!==t&&(u[n]=i)}return u},v.extend({noConflict:function(t){return e.$===v&&(e.$=a),t&&e.jQuery===v&&(e.jQuery=u),v},isReady:!1,readyWait:1,holdReady:function(e){e?v.readyWait++:v.ready(!0)},ready:function(e){if(e===!0?--v.readyWait:v.isReady)return;if(!i.body)return setTimeout(v.ready,1);v.isReady=!0;if(e!==!0&&--v.readyWait>0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s<o;)if(n.apply(e[s++],r)===!1)break}else if(u){for(i in e)if(n.call(e[i],i,e[i])===!1)break}else for(;s<o;)if(n.call(e[s],s,e[s++])===!1)break;return e},trim:d&&!d.call("\ufeff\u00a0")?function(e){return e==null?"":d.call(e)}:function(e){return e==null?"":(e+"").replace(b,"")},makeArray:function(e,t){var n,r=t||[];return e!=null&&(n=v.type(e),e.length==null||n==="string"||n==="function"||n==="regexp"||v.isWindow(e)?f.call(r,e):v.merge(r,e)),r},inArray:function(e,t,n){var r;if(t){if(c)return c.call(t,e,n);r=t.length,n=n?n<0?Math.max(0,r+n):n:0;for(;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,s=0;if(typeof r=="number")for(;s<r;s++)e[i++]=n[s];else while(n[s]!==t)e[i++]=n[s++];return e.length=i,e},grep:function(e,t,n){var r,i=[],s=0,o=e.length;n=!!n;for(;s<o;s++)r=!!t(e[s],s),n!==r&&i.push(e[s]);return i},map:function(e,n,r){var i,s,o=[],u=0,a=e.length,f=e instanceof v||a!==t&&typeof a=="number"&&(a>0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u<a;u++)i=n(e[u],u,r),i!=null&&(o[o.length]=i);else for(s in e)i=n(e[s],s,r),i!=null&&(o[o.length]=i);return o.concat.apply([],o)},guid:1,proxy:function(e,n){var r,i,s;return typeof n=="string"&&(r=e[n],n=e,e=r),v.isFunction(e)?(i=l.call(arguments,2),s=function(){return e.apply(n,i.concat(l.call(arguments)))},s.guid=e.guid=e.guid||v.guid++,s):t},access:function(e,n,r,i,s,o,u){var a,f=r==null,l=0,c=e.length;if(r&&typeof r=="object"){for(l in r)v.access(e,n,l,r[l],1,o,i);s=1}else if(i!==t){a=u===t&&v.isFunction(i),f&&(a?(a=n,n=function(e,t,n){return a.call(v(e),n)}):(n.call(e,i),n=null));if(n)for(;l<c;l++)n(e[l],r,a?i.call(e[l],l,n(e[l],r)):i,u);s=1}return s?e:f?n.call(e):c?n(e[0],r):o},now:function(){return(new Date).getTime()}}),v.ready.promise=function(t){if(!r){r=v.Deferred();if(i.readyState==="complete")setTimeout(v.ready,1);else if(i.addEventListener)i.addEventListener("DOMContentLoaded",A,!1),e.addEventListener("load",v.ready,!1);else{i.attachEvent("onreadystatechange",A),e.attachEvent("onload",v.ready);var n=!1;try{n=e.frameElement==null&&i.documentElement}catch(s){}n&&n.doScroll&&function o(){if(!v.isReady){try{n.doScroll("left")}catch(e){return setTimeout(o,50)}v.ready()}}()}}return r.promise(t)},v.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,t){O["[object "+t+"]"]=t.toLowerCase()}),n=v(i);var M={};v.Callbacks=function(e){e=typeof e=="string"?M[e]||_(e):v.extend({},e);var n,r,i,s,o,u,a=[],f=!e.once&&[],l=function(t){n=e.memory&&t,r=!0,u=s||0,s=0,o=a.length,i=!0;for(;a&&u<o;u++)if(a[u].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}i=!1,a&&(f?f.length&&l(f.shift()):n?a=[]:c.disable())},c={add:function(){if(a){var t=a.length;(function r(t){v.each(t,function(t,n){var i=v.type(n);i==="function"?(!e.unique||!c.has(n))&&a.push(n):n&&n.length&&i!=="string"&&r(n)})})(arguments),i?o=a.length:n&&(s=t,l(n))}return this},remove:function(){return a&&v.each(arguments,function(e,t){var n;while((n=v.inArray(t,a,n))>-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t<r;t++)n[t]&&v.isFunction(n[t].promise)?n[t].promise().done(o(t,f,n)).fail(s.reject).progress(o(t,a,u)):--i}return i||s.resolveWith(f,n),s.promise()}}),v.support=function(){var t,n,r,s,o,u,a,f,l,c,h,p=i.createElement("div");p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="<table><tr><td></td><td>t</td></tr></table>",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="<div></div>",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i<s;i++)delete r[t[i]];if(!(n?B:v.isEmptyObject)(r))return}}if(!n){delete u[a].data;if(!B(u[a]))return}o?v.cleanData([e],!0):v.support.deleteExpando||u!=u.window?delete u[a]:u[a]=null},_data:function(e,t,n){return v.data(e,t,n,!0)},acceptData:function(e){var t=e.nodeName&&v.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),v.fn.extend({data:function(e,n){var r,i,s,o,u,a=this[0],f=0,l=null;if(e===t){if(this.length){l=v.data(a);if(a.nodeType===1&&!v._data(a,"parsedAttrs")){s=a.attributes;for(u=s.length;f<u;f++)o=s[f].name,o.indexOf("data-")||(o=v.camelCase(o.substring(5)),H(a,o,l[o]));v._data(a,"parsedAttrs",!0)}}return l}return typeof e=="object"?this.each(function(){v.data(this,e)}):(r=e.split(".",2),r[1]=r[1]?"."+r[1]:"",i=r[1]+"!",v.access(this,function(n){if(n===t)return l=this.triggerHandler("getData"+i,[r[0]]),l===t&&a&&(l=v.data(a,e),l=H(a,e,l)),l===t&&r[1]?this.data(r[0]):l;r[1]=n,this.each(function(){var t=v(this);t.triggerHandler("setData"+i,r),v.data(this,e,n),t.triggerHandler("changeData"+i,r)})},null,n,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length<r?v.queue(this[0],e):n===t?this:this.each(function(){var t=v.queue(this,e,n);v._queueHooks(this,e),e==="fx"&&t[0]!=="inprogress"&&v.dequeue(this,e)})},dequeue:function(e){return this.each(function(){v.dequeue(this,e)})},delay:function(e,t){return e=v.fx?v.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,s=v.Deferred(),o=this,u=this.length,a=function(){--i||s.resolveWith(o,[o])};typeof e!="string"&&(n=e,e=t),e=e||"fx";while(u--)r=v._data(o[u],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(a));return a(),s.promise(n)}});var j,F,I,q=/[\t\r\n]/g,R=/\r/g,U=/^(?:button|input)$/i,z=/^(?:button|input|object|select|textarea)$/i,W=/^a(?:rea|)$/i,X=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,V=v.support.getSetAttribute;v.fn.extend({attr:function(e,t){return v.access(this,v.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n<r;n++){i=this[n];if(i.nodeType===1)if(!i.className&&t.length===1)i.className=e;else{s=" "+i.className+" ";for(o=0,u=t.length;o<u;o++)s.indexOf(" "+t[o]+" ")<0&&(s+=t[o]+" ");i.className=v.trim(s)}}}return this},removeClass:function(e){var n,r,i,s,o,u,a;if(v.isFunction(e))return this.each(function(t){v(this).removeClass(e.call(this,t,this.className))});if(e&&typeof e=="string"||e===t){n=(e||"").split(y);for(u=0,a=this.length;u<a;u++){i=this[u];if(i.nodeType===1&&i.className){r=(" "+i.className+" ").replace(q," ");for(s=0,o=n.length;s<o;s++)while(r.indexOf(" "+n[s]+" ")>=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n<r;n++)if(this[n].nodeType===1&&(" "+this[n].className+" ").replace(q," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a<u;a++){n=r[a];if((n.selected||a===i)&&(v.support.optDisabled?!n.disabled:n.getAttribute("disabled")===null)&&(!n.parentNode.disabled||!v.nodeName(n.parentNode,"optgroup"))){t=v(n).val();if(s)return t;o.push(t)}}return o},set:function(e,t){var n=v.makeArray(t);return v(e).find("option").each(function(){this.selected=v.inArray(v(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o<r.length;o++)i=r[o],i&&(n=v.propFix[i]||i,s=X.test(i),s||v.attr(e,i,""),e.removeAttribute(V?i:n),s&&n in e&&(e[n]=!1))}},attrHooks:{type:{set:function(e,t){if(U.test(e.nodeName)&&e.parentNode)v.error("type property can't be changed");else if(!v.support.radioValue&&t==="radio"&&v.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},value:{get:function(e,t){return j&&v.nodeName(e,"button")?j.get(e,t):t in e?e.value:null},set:function(e,t,n){if(j&&v.nodeName(e,"button"))return j.set(e,t,n);e.value=t}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,s,o,u=e.nodeType;if(!e||u===3||u===8||u===2)return;return o=u!==1||!v.isXMLDoc(e),o&&(n=v.propFix[n]||n,s=v.propHooks[n]),r!==t?s&&"set"in s&&(i=s.set(e,r,n))!==t?i:e[n]=r:s&&"get"in s&&(i=s.get(e,n))!==null?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):z.test(e.nodeName)||W.test(e.nodeName)&&e.href?0:t}}}}),F={get:function(e,n){var r,i=v.prop(e,n);return i===!0||typeof i!="boolean"&&(r=e.getAttributeNode(n))&&r.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var r;return t===!1?v.removeAttr(e,n):(r=v.propFix[n]||n,r in e&&(e[r]=!0),e.setAttribute(n,n.toLowerCase())),n}},V||(I={name:!0,id:!0,coords:!0},j=v.valHooks.button={get:function(e,n){var r;return r=e.getAttributeNode(n),r&&(I[n]?r.value!=="":r.specified)?r.value:t},set:function(e,t,n){var r=e.getAttributeNode(n);return r||(r=i.createAttribute(n),e.setAttributeNode(r)),r.value=t+""}},v.each(["width","height"],function(e,t){v.attrHooks[t]=v.extend(v.attrHooks[t],{set:function(e,n){if(n==="")return e.setAttribute(t,"auto"),n}})}),v.attrHooks.contenteditable={get:j.get,set:function(e,t,n){t===""&&(t="false"),j.set(e,t,n)}}),v.support.hrefNormalized||v.each(["href","src","width","height"],function(e,n){v.attrHooks[n]=v.extend(v.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return r===null?t:r}})}),v.support.style||(v.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=t+""}}),v.support.optSelected||(v.propHooks.selected=v.extend(v.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),v.support.enctype||(v.propFix.enctype="encoding"),v.support.checkOn||v.each(["radio","checkbox"],function(){v.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}}),v.each(["radio","checkbox"],function(){v.valHooks[this]=v.extend(v.valHooks[this],{set:function(e,t){if(v.isArray(t))return e.checked=v.inArray(v(e).val(),t)>=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f<n.length;f++){l=J.exec(n[f])||[],c=l[1],h=(l[2]||"").split(".").sort(),g=v.event.special[c]||{},c=(s?g.delegateType:g.bindType)||c,g=v.event.special[c]||{},p=v.extend({type:c,origType:l[1],data:i,handler:r,guid:r.guid,selector:s,needsContext:s&&v.expr.match.needsContext.test(s),namespace:h.join(".")},d),m=a[c];if(!m){m=a[c]=[],m.delegateCount=0;if(!g.setup||g.setup.call(e,i,h,u)===!1)e.addEventListener?e.addEventListener(c,u,!1):e.attachEvent&&e.attachEvent("on"+c,u)}g.add&&(g.add.call(e,p),p.handler.guid||(p.handler.guid=r.guid)),s?m.splice(m.delegateCount++,0,p):m.push(p),v.event.global[c]=!0}e=null},global:{},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,m,g=v.hasData(e)&&v._data(e);if(!g||!(h=g.events))return;t=v.trim(Z(t||"")).split(" ");for(s=0;s<t.length;s++){o=J.exec(t[s])||[],u=a=o[1],f=o[2];if(!u){for(u in h)v.event.remove(e,u+t[s],n,r,!0);continue}p=v.event.special[u]||{},u=(r?p.delegateType:p.bindType)||u,d=h[u]||[],l=d.length,f=f?new RegExp("(^|\\.)"+f.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(c=0;c<d.length;c++)m=d[c],(i||a===m.origType)&&(!n||n.guid===m.guid)&&(!f||f.test(m.namespace))&&(!r||r===m.selector||r==="**"&&m.selector)&&(d.splice(c--,1),m.selector&&d.delegateCount--,p.remove&&p.remove.call(e,m));d.length===0&&l!==d.length&&((!p.teardown||p.teardown.call(e,f,g.handle)===!1)&&v.removeEvent(e,u,g.handle),delete h[u])}v.isEmptyObject(h)&&(delete g.handle,v.removeData(e,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,r,s,o){if(!s||s.nodeType!==3&&s.nodeType!==8){var u,a,f,l,c,h,p,d,m,g,y=n.type||n,b=[];if(Y.test(y+v.event.triggered))return;y.indexOf("!")>=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f<m.length&&!n.isPropagationStopped();f++)l=m[f][0],n.type=m[f][1],d=(v._data(l,"events")||{})[n.type]&&v._data(l,"handle"),d&&d.apply(l,r),d=h&&l[h],d&&v.acceptData(l)&&d.apply&&d.apply(l,r)===!1&&n.preventDefault();return n.type=y,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(s.ownerDocument,r)===!1)&&(y!=="click"||!v.nodeName(s,"a"))&&v.acceptData(s)&&h&&s[y]&&(y!=="focus"&&y!=="blur"||n.target.offsetWidth!==0)&&!v.isWindow(s)&&(c=s[h],c&&(s[h]=null),v.event.triggered=y,s[y](),v.event.triggered=t,c&&(s[h]=c)),n.result}return},dispatch:function(n){n=v.event.fix(n||e.event);var r,i,s,o,u,a,f,c,h,p,d=(v._data(this,"events")||{})[n.type]||[],m=d.delegateCount,g=l.call(arguments),y=!n.exclusive&&!n.namespace,b=v.event.special[n.type]||{},w=[];g[0]=n,n.delegateTarget=this;if(b.preDispatch&&b.preDispatch.call(this,n)===!1)return;if(m&&(!n.button||n.type!=="click"))for(s=n.target;s!=this;s=s.parentNode||this)if(s.disabled!==!0||n.type!=="click"){u={},f=[];for(r=0;r<m;r++)c=d[r],h=c.selector,u[h]===t&&(u[h]=c.needsContext?v(h,this).index(s)>=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r<w.length&&!n.isPropagationStopped();r++){a=w[r],n.currentTarget=a.elem;for(i=0;i<a.matches.length&&!n.isImmediatePropagationStopped();i++){c=a.matches[i];if(y||!n.namespace&&!c.namespace||n.namespace_re&&n.namespace_re.test(c.namespace))n.data=c.data,n.handleObj=c,o=((v.event.special[c.origType]||{}).handle||c.handler).apply(a.elem,g),o!==t&&(n.result=o,o===!1&&(n.preventDefault(),n.stopPropagation()))}}return b.postDispatch&&b.postDispatch.call(this,n),n.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return e.which==null&&(e.which=t.charCode!=null?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,s,o,u=n.button,a=n.fromElement;return e.pageX==null&&n.clientX!=null&&(r=e.target.ownerDocument||i,s=r.documentElement,o=r.body,e.pageX=n.clientX+(s&&s.scrollLeft||o&&o.scrollLeft||0)-(s&&s.clientLeft||o&&o.clientLeft||0),e.pageY=n.clientY+(s&&s.scrollTop||o&&o.scrollTop||0)-(s&&s.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?n.toElement:a),!e.which&&u!==t&&(e.which=u&1?1:u&2?3:u&4?2:0),e}},fix:function(e){if(e[v.expando])return e;var t,n,r=e,s=v.event.fixHooks[e.type]||{},o=s.props?this.props.concat(s.props):this.props;e=v.Event(r);for(t=o.length;t;)n=o[--t],e[n]=r[n];return e.target||(e.target=r.srcElement||i),e.target.nodeType===3&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,r):e},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(e,t,n){v.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,r){var i=v.extend(new v.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?v.event.trigger(i,null,t):v.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},v.event.handle=v.event.dispatch,v.removeEvent=i.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]=="undefined"&&(e[r]=null),e.detachEvent(r,n))},v.Event=function(e,t){if(!(this instanceof v.Event))return new v.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?tt:et):this.type=e,t&&v.extend(this,t),this.timeStamp=e&&e.timeStamp||v.now(),this[v.expando]=!0},v.Event.prototype={preventDefault:function(){this.isDefaultPrevented=tt;var e=this.originalEvent;if(!e)return;e.preventDefault?e.preventDefault():e.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=tt;var e=this.originalEvent;if(!e)return;e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=tt,this.stopPropagation()},isDefaultPrevented:et,isPropagationStopped:et,isImmediatePropagationStopped:et},v.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){v.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj,o=s.selector;if(!i||i!==r&&!v.contains(r,i))e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t;return n}}}),v.support.submitBubbles||(v.event.special.submit={setup:function(){if(v.nodeName(this,"form"))return!1;v.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=v.nodeName(n,"input")||v.nodeName(n,"button")?n.form:t;r&&!v._data(r,"_submit_attached")&&(v.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),v._data(r,"_submit_attached",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&v.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(v.nodeName(this,"form"))return!1;v.event.remove(this,"._submit")}}),v.support.changeBubbles||(v.event.special.change={setup:function(){if($.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")v.event.add(this,"propertychange._change",function(e){e.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),v.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),v.event.simulate("change",this,e,!0)});return!1}v.event.add(this,"beforeactivate._change",function(e){var t=e.target;$.test(t.nodeName)&&!v._data(t,"_change_attached")&&(v.event.add(t,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&v.event.simulate("change",this.parentNode,e,!0)}),v._data(t,"_change_attached",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||t.type!=="radio"&&t.type!=="checkbox")return e.handleObj.handler.apply(this,arguments)},teardown:function(){return v.event.remove(this,"._change"),!$.test(this.nodeName)}}),v.support.focusinBubbles||v.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){v.event.simulate(t,e.target,v.event.fix(e),!0)};v.event.special[t]={setup:function(){n++===0&&i.addEventListener(e,r,!0)},teardown:function(){--n===0&&i.removeEventListener(e,r,!0)}}}),v.fn.extend({on:function(e,n,r,i,s){var o,u;if(typeof e=="object"){typeof n!="string"&&(r=r||n,n=t);for(u in e)this.on(u,n,r,e[u],s);return this}r==null&&i==null?(i=n,r=n=t):i==null&&(typeof n=="string"?(i=r,r=t):(i=r,r=n,n=t));if(i===!1)i=et;else if(!i)return this;return s===1&&(o=i,i=function(e){return v().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=v.guid++)),this.each(function(){v.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,s;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,v(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if(typeof e=="object"){for(s in e)this.off(s,n,e[s]);return this}if(n===!1||typeof n=="function")r=n,n=t;return r===!1&&(r=et),this.each(function(){v.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return v(this.context).on(e,this.selector,t,n),this},die:function(e,t){return v(this.context).off(e,this.selector||"**",t),this},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length===1?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){v.event.trigger(e,t,this)})},triggerHandler:function(e,t){if(this[0])return v.event.trigger(e,t,this[0],!0)},toggle:function(e){var t=arguments,n=e.guid||v.guid++,r=0,i=function(n){var i=(v._data(this,"lastToggle"+e.guid)||0)%r;return v._data(this,"lastToggle"+e.guid,i+1),n.preventDefault(),t[i].apply(this,arguments)||!1};i.guid=n;while(r<t.length)t[r++].guid=n;return this.click(i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),v.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){v.fn[t]=function(e,n){return n==null&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u<a;u++)if(s=e[u])if(!n||n(s,r,i))o.push(s),f&&t.push(u);return o}function ct(e,t,n,r,i,s){return r&&!r[d]&&(r=ct(r)),i&&!i[d]&&(i=ct(i,s)),N(function(s,o,u,a){var f,l,c,h=[],p=[],d=o.length,v=s||dt(t||"*",u.nodeType?[u]:u,[]),m=e&&(s||!t)?lt(v,h,e,u,a):v,g=n?i||(s?e:d||r)?[]:o:m;n&&n(m,g,u,a);if(r){f=lt(g,p),r(f,[],u,a),l=f.length;while(l--)if(c=f[l])g[p[l]]=!(m[p[l]]=c)}if(s){if(i||e){if(i){f=[],l=g.length;while(l--)(c=g[l])&&f.push(m[l]=c);i(null,g=[],f,a)}l=g.length;while(l--)(c=g[l])&&(f=i?T.call(s,c):h[l])>-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a<s;a++)if(n=i.relative[e[a].type])h=[at(ft(h),n)];else{n=i.filter[e[a].type].apply(null,e[a].matches);if(n[d]){r=++a;for(;r<s;r++)if(i.relative[e[r].type])break;return ct(a>1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a<r&&ht(e.slice(a,r)),r<s&&ht(e=e.slice(r)),r<s&&e.join(""))}h.push(n)}return ft(h)}function pt(e,t){var r=t.length>0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r<i;r++)nt(e,t[r],n);return n}function vt(e,t,n,r,s){var o,u,f,l,c,h=ut(e),p=h.length;if(!r&&h.length===1){u=h[0]=h[0].slice(0);if(u.length>2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;t<n;t++)if(this[t]===e)return t;return-1},N=function(e,t){return e[d]=t==null||t,e},C=function(){var e={},t=[];return N(function(n,r){return t.push(n)>i.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="<a name='"+d+"'></a><div name='"+d+"'></div>",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:st(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:st(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},f=y.compareDocumentPosition?function(e,t){return e===t?(l=!0,0):(!e.compareDocumentPosition||!t.compareDocumentPosition?e.compareDocumentPosition:e.compareDocumentPosition(t)&4)?-1:1}:function(e,t){if(e===t)return l=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,r,i=[],s=[],o=e.parentNode,u=t.parentNode,a=o;if(o===u)return ot(e,t);if(!o)return-1;if(!u)return 1;while(a)i.unshift(a),a=a.parentNode;a=u;while(a)s.unshift(a),a=a.parentNode;n=i.length,r=s.length;for(var f=0;f<n&&f<r;f++)if(i[f]!==s[f])return ot(i[f],s[f]);return f===n?ot(e,s[f],-1):ot(i[f],t,1)},[0,0].sort(f),h=!l,nt.uniqueSort=function(e){var t,n=[],r=1,i=0;l=h,e.sort(f);if(l){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e},nt.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},a=nt.compile=function(e,t){var n,r=[],i=[],s=A[d][e+" "];if(!s){t||(t=ut(e)),n=t.length;while(n--)s=ht(t[n]),s[d]?r.push(s):i.push(s);s=A(e,pt(i,r))}return s},g.querySelectorAll&&function(){var e,t=vt,n=/'|\\/g,r=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,i=[":focus"],s=[":active"],u=y.matchesSelector||y.mozMatchesSelector||y.webkitMatchesSelector||y.oMatchesSelector||y.msMatchesSelector;K(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="<p test=''></p>",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="<input type='hidden'/>",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t<n;t++)if(v.contains(u[t],this))return!0});o=this.pushStack("","find",e);for(t=0,n=this.length;t<n;t++){r=o.length,v.find(e,this[t],o);if(t>0)for(i=r;i<o.length;i++)for(s=0;s<r;s++)if(o[s]===o[i]){o.splice(i--,1);break}}return o},has:function(e){var t,n=v(e,this),r=n.length;return this.filter(function(){for(t=0;t<r;t++)if(v.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1),"not",e)},filter:function(e){return this.pushStack(ft(this,e,!0),"filter",e)},is:function(e){return!!e&&(typeof e=="string"?st.test(e)?v(e,this.context).index(this[0])>=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r<i;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&n.nodeType!==11){if(o?o.index(n)>-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/<tbody/i,gt=/<|&#?\w+;/,yt=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,wt=new RegExp("<(?:"+ct+")[\\s/>]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,Nt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X<div>","</div>"]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1></$2>");try{for(;r<i;r++)n=this[r]||{},n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),n.innerHTML=e);n=0}catch(s){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return ut(this[0])?this.length?this.pushStack(v(v.isFunction(e)?e():e),"replaceWith",e):this:v.isFunction(e)?this.each(function(t){var n=v(this),r=n.html();n.replaceWith(e.call(this,t,r))}):(typeof e!="string"&&(e=v(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;v(this).remove(),t?v(t).before(e):v(n).append(e)}))},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=[].concat.apply([],e);var i,s,o,u,a=0,f=e[0],l=[],c=this.length;if(!v.support.checkClone&&c>1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a<c;a++)r.call(n&&v.nodeName(this[a],"table")?Lt(this[a],"tbody"):this[a],a===u?o:v.clone(o,!0,!0))}o=s=null,l.length&&v.each(l,function(e,t){t.src?v.ajax?v.ajax({url:t.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):v.error("no ajax"):v.globalEval((t.text||t.textContent||t.innerHTML||"").replace(Tt,"")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),v.buildFragment=function(e,n,r){var s,o,u,a=e[0];return n=n||i,n=!n.nodeType&&n[0]||n,n=n.ownerDocument||n,e.length===1&&typeof a=="string"&&a.length<512&&n===i&&a.charAt(0)==="<"&&!bt.test(a)&&(v.support.checkClone||!St.test(a))&&(v.support.html5Clone||!wt.test(a))&&(o=!0,s=v.fragments[a],u=s!==t),s||(s=n.createDocumentFragment(),v.clean(e,n,s,r),o&&(v.fragments[a]=u&&s)),{fragment:s,cacheable:o}},v.fragments={},v.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){v.fn[e]=function(n){var r,i=0,s=[],o=v(n),u=o.length,a=this.length===1&&this[0].parentNode;if((a==null||a&&a.nodeType===11&&a.childNodes.length===1)&&u===1)return o[t](this[0]),this;for(;i<u;i++)r=(i>0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1></$2>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]==="<table>"&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("<div>").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r<i;r++)n=e[r],Vn[n]=Vn[n]||[],Vn[n].unshift(t)},prefilter:function(e,t){t?Xn.unshift(e):Xn.push(e)}}),v.Tween=Yn,Yn.prototype={constructor:Yn,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(v.cssNumber[n]?"":"px")},cur:function(){var e=Yn.propHooks[this.prop];return e&&e.get?e.get(this):Yn.propHooks._default.get(this)},run:function(e){var t,n=Yn.propHooks[this.prop];return this.options.duration?this.pos=t=v.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):Yn.propHooks._default.set(this),this}},Yn.prototype.init.prototype=Yn.prototype,Yn.propHooks={_default:{get:function(e){var t;return e.elem[e.prop]==null||!!e.elem.style&&e.elem.style[e.prop]!=null?(t=v.css(e.elem,e.prop,!1,""),!t||t==="auto"?0:t):e.elem[e.prop]},set:function(e){v.fx.step[e.prop]?v.fx.step[e.prop](e):e.elem.style&&(e.elem.style[v.cssProps[e.prop]]!=null||v.cssHooks[e.prop])?v.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Yn.propHooks.scrollTop=Yn.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},v.each(["toggle","show","hide"],function(e,t){var n=v.fn[t];v.fn[t]=function(r,i,s){return r==null||typeof r=="boolean"||!e&&v.isFunction(r)&&v.isFunction(i)?n.apply(this,arguments):this.animate(Zn(t,!0),r,i,s)}}),v.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Gt).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=v.isEmptyObject(e),s=v.speed(t,n,r),o=function(){var t=Kn(this,v.extend({},e),s);i&&t.stop(!0)};return i||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return typeof e!="string"&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=e!=null&&e+"queueHooks",s=v.timers,o=v._data(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(n in o)o[n]&&o[n].stop&&Wn.test(n)&&i(o[n]);for(n=s.length;n--;)s[n].elem===this&&(e==null||s[n].queue===e)&&(s[n].anim.stop(r),t=!1,s.splice(n,1));(t||!r)&&v.dequeue(this,e)})}}),v.each({slideDown:Zn("show"),slideUp:Zn("hide"),slideToggle:Zn("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){v.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),v.speed=function(e,t,n){var r=e&&typeof e=="object"?v.extend({},e):{complete:n||!n&&t||v.isFunction(e)&&e,duration:e,easing:n&&t||t&&!v.isFunction(t)&&t};r.duration=v.fx.off?0:typeof r.duration=="number"?r.duration:r.duration in v.fx.speeds?v.fx.speeds[r.duration]:v.fx.speeds._default;if(r.queue==null||r.queue===!0)r.queue="fx";return r.old=r.complete,r.complete=function(){v.isFunction(r.old)&&r.old.call(this),r.queue&&v.dequeue(this,r.queue)},r},v.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},v.timers=[],v.fx=Yn.prototype.init,v.fx.tick=function(){var e,n=v.timers,r=0;qn=v.now();for(;r<n.length;r++)e=n[r],!e()&&n[r]===e&&n.splice(r--,1);n.length||v.fx.stop(),qn=t},v.fx.timer=function(e){e()&&v.timers.push(e)&&!Rn&&(Rn=setInterval(v.fx.tick,v.fx.interval))},v.fx.interval=13,v.fx.stop=function(){clearInterval(Rn),Rn=null},v.fx.speeds={slow:600,fast:200,_default:400},v.fx.step={},v.expr&&v.expr.filters&&(v.expr.filters.animated=function(e){return v.grep(v.timers,function(t){return e===t.elem}).length});var er=/^(?:body|html)$/i;v.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){v.offset.setOffset(this,e,t)});var n,r,i,s,o,u,a,f={top:0,left:0},l=this[0],c=l&&l.ownerDocument;if(!c)return;return(r=c.body)===l?v.offset.bodyOffset(l):(n=c.documentElement,v.contains(n,l)?(typeof l.getBoundingClientRect!="undefined"&&(f=l.getBoundingClientRect()),i=tr(c),s=n.clientTop||r.clientTop||0,o=n.clientLeft||r.clientLeft||0,u=i.pageYOffset||n.scrollTop,a=i.pageXOffset||n.scrollLeft,{top:f.top+u-s,left:f.left+a-o}):f)},v.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft;return v.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(v.css(e,"marginTop"))||0,n+=parseFloat(v.css(e,"marginLeft"))||0),{top:t,left:n}},setOffset:function(e,t,n){var r=v.css(e,"position");r==="static"&&(e.style.position="relative");var i=v(e),s=i.offset(),o=v.css(e,"top"),u=v.css(e,"left"),a=(r==="absolute"||r==="fixed")&&v.inArray("auto",[o,u])>-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=/*e.$=*/v,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return v})})(window);
|
|
1 |
+
/*! jQuery v1.11.2 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
|
2 |
+
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.2",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=hb(),z=hb(),A=hb(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},eb=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fb){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function gb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+rb(o[l]);w=ab.test(a)&&pb(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function hb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ib(a){return a[u]=!0,a}function jb(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function kb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function lb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function nb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function ob(a){return ib(function(b){return b=+b,ib(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pb(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=gb.support={},f=gb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=gb.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",eb,!1):e.attachEvent&&e.attachEvent("onunload",eb)),p=!f(g),c.attributes=jb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=jb(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=jb(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(jb(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),jb(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&jb(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return lb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?lb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},gb.matches=function(a,b){return gb(a,null,null,b)},gb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return gb(b,n,null,[a]).length>0},gb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},gb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},gb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},gb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=gb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=gb.selectors={cacheLength:50,createPseudo:ib,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||gb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&gb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=gb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||gb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ib(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ib(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ib(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ib(function(a){return function(b){return gb(a,b).length>0}}),contains:ib(function(a){return a=a.replace(cb,db),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ib(function(a){return W.test(a||"")||gb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:ob(function(){return[0]}),last:ob(function(a,b){return[b-1]}),eq:ob(function(a,b,c){return[0>c?c+b:c]}),even:ob(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:ob(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:ob(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:ob(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=mb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=nb(b);function qb(){}qb.prototype=d.filters=d.pseudos,d.setFilters=new qb,g=gb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?gb.error(a):z(a,i).slice(0)};function rb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function tb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ub(a,b,c){for(var d=0,e=b.length;e>d;d++)gb(a,b[d],c);return c}function vb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wb(a,b,c,d,e,f){return d&&!d[u]&&(d=wb(d)),e&&!e[u]&&(e=wb(e,f)),ib(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ub(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:vb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=vb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=vb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sb(function(a){return a===b},h,!0),l=sb(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sb(tb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wb(i>1&&tb(m),i>1&&rb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xb(a.slice(i,e)),f>e&&xb(a=a.slice(e)),f>e&&rb(a))}m.push(c)}return tb(m)}function yb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=vb(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&gb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ib(f):f}return h=gb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,yb(e,d)),f.selector=a}return f},i=gb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&pb(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&rb(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&pb(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=jb(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),jb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||kb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&jb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||kb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),jb(function(a){return null==a.getAttribute("disabled")})||kb(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),gb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;
|
3 |
+
return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cb()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===cb()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ab:bb):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:bb,isPropagationStopped:bb,isImmediatePropagationStopped:bb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ab,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ab,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ab,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=bb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=bb),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function db(a){var b=eb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var eb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fb=/ jQuery\d+="(?:null|\d+)"/g,gb=new RegExp("<(?:"+eb+")[\\s/>]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/<tbody/i,lb=/<|&#?\w+;/,mb=/<(?:script|style|link)/i,nb=/checked\s*(?:[^=]|=\s*.checked.)/i,ob=/^$|\/(?:java|ecma)script/i,pb=/^true\/(.*)/,qb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,rb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?"<table>"!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Cb[0].contentWindow||Cb[0].contentDocument).document,b.write(),b.close(),c=Eb(a,b),Cb.detach()),Db[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Gb=/^margin/,Hb=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ib,Jb,Kb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ib=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Hb.test(g)&&Gb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ib=function(a){return a.currentStyle},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Hb.test(g)&&!Kb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Lb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight),b.removeChild(i)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Mb=/alpha\([^)]*\)/i,Nb=/opacity\s*=\s*([^)]*)/,Ob=/^(none|table(?!-c[ea]).+)/,Pb=new RegExp("^("+S+")(.*)$","i"),Qb=new RegExp("^([+-])=("+S+")","i"),Rb={position:"absolute",visibility:"hidden",display:"block"},Sb={letterSpacing:"0",fontWeight:"400"},Tb=["Webkit","O","Moz","ms"];function Ub(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Tb.length;while(e--)if(b=Tb[e]+c,b in a)return b;return d}function Vb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fb(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wb(a,b,c){var d=Pb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Yb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ib(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Jb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Hb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xb(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Jb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ub(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ub(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Jb(a,b,d)),"normal"===f&&b in Sb&&(f=Sb[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Ob.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Rb,function(){return Yb(a,b,d)}):Yb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ib(a);return Wb(a,c,d?Xb(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Mb.test(f)?f.replace(Mb,e):f+" "+e)}}),m.cssHooks.marginRight=Lb(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Jb,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Gb.test(a)||(m.cssHooks[a+b].set=Wb)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ib(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Vb(this,!0)},hide:function(){return Vb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Zb(a,b,c,d,e){return new Zb.prototype.init(a,b,c,d,e)
|
4 |
+
}m.Tween=Zb,Zb.prototype={constructor:Zb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")},cur:function(){var a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Zb.propHooks._default.set(this),this}},Zb.prototype.init.prototype=Zb.prototype,Zb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Zb.propHooks.scrollTop=Zb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Zb.prototype.init,m.fx.step={};var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[ic],ec={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bc.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bc.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fc(){return setTimeout(function(){$b=void 0}),$b=m.now()}function gc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hc(a,b,c){for(var d,e=(ec[b]||[]).concat(ec["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ic(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fb(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fb(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ac.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fb(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hc(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jc(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kc(a,b,c){var d,e,f=0,g=dc.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$b||fc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$b||fc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jc(k,j.opts.specialEasing);g>f;f++)if(d=dc[f].call(j,a,k,j.opts))return d;return m.map(k,hc,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kc,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ec[c]=ec[c]||[],ec[c].unshift(b)},prefilter:function(a,b){b?dc.unshift(a):dc.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kc(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gc(b,!0),a,d,e)}}),m.each({slideDown:gc("show"),slideUp:gc("hide"),slideToggle:gc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($b=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$b=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_b||(_b=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_b),_b=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lc=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lc,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mc,nc,oc=m.expr.attrHandle,pc=/^(?:checked|selected)$/i,qc=k.getSetAttribute,rc=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nc:mc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rc&&qc||!pc.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qc?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nc={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rc&&qc||!pc.test(c)?a.setAttribute(!qc&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=oc[b]||m.find.attr;oc[b]=rc&&qc||!pc.test(b)?function(a,b,d){var e,f;return d||(f=oc[b],oc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,oc[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rc&&qc||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mc&&mc.set(a,b,c)}}),qc||(mc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},oc.id=oc.name=oc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mc.set},m.attrHooks.contenteditable={set:function(a,b,c){mc.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sc=/^(?:input|select|textarea|button|object)$/i,tc=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sc.test(a.nodeName)||tc.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var uc=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(uc," ").indexOf(b)>=0)return!0;return!1}}),m.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(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vc=m.now(),wc=/\?/,xc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yc,zc,Ac=/#.*$/,Bc=/([?&])_=[^&]*/,Cc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Dc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ec=/^(?:GET|HEAD)$/,Fc=/^\/\//,Gc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hc={},Ic={},Jc="*/".concat("*");try{zc=location.href}catch(Kc){zc=y.createElement("a"),zc.href="",zc=zc.href}yc=Gc.exec(zc.toLowerCase())||[];function Lc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mc(a,b,c,d){var e={},f=a===Ic;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nc(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Oc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zc,type:"GET",isLocal:Dc.test(yc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nc(Nc(a,m.ajaxSettings),b):Nc(m.ajaxSettings,a)},ajaxPrefilter:Lc(Hc),ajaxTransport:Lc(Ic),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zc)+"").replace(Ac,"").replace(Fc,yc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yc[1]&&c[2]===yc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yc[3]||("http:"===yc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mc(Hc,k,b,v),2===t)return v;h=m.event&&k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Ec.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bc.test(e)?e.replace(Bc,"$1_="+vc++):e+(wc.test(e)?"&":"?")+"_="+vc++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mc(Ic,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Oc(k,v,c)),u=Pc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qc=/%20/g,Rc=/\[\]$/,Sc=/\r?\n/g,Tc=/^(?:submit|button|image|reset|file)$/i,Uc=/^(?:input|select|textarea|keygen)/i;function Vc(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rc.test(a)?d(a,e):Vc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vc(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vc(c,a[c],b,e);return d.join("&").replace(Qc,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Uc.test(this.nodeName)&&!Tc.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sc,"\r\n")}}):{name:b.name,value:c.replace(Sc,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zc()||$c()}:Zc;var Wc=0,Xc={},Yc=m.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Xc)Xc[a](void 0,!0)}),k.cors=!!Yc&&"withCredentials"in Yc,Yc=k.ajax=!!Yc,Yc&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xc[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zc(){try{return new a.XMLHttpRequest}catch(b){}}function $c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _c=[],ad=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_c.pop()||m.expando+"_"+vc++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ad.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ad.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ad,"$1"+e):b.jsonp!==!1&&(b.url+=(wc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_c.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bd=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bd)return bd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=/*a.$=*/m),m});
|
js/mana/core.js
CHANGED
@@ -7,8 +7,8 @@
|
|
7 |
|
8 |
; // make JS merging easier
|
9 |
|
10 |
-
|
11 |
-
|
12 |
var Mana = Mana || {};
|
13 |
|
14 |
(function($, $p, undefined) {
|
@@ -143,8 +143,8 @@ var Mana = Mana || {};
|
|
143 |
});
|
144 |
})(jQuery, $);
|
145 |
|
146 |
-
|
147 |
-
|
148 |
/* Simple JavaScript Inheritance
|
149 |
* By John Resig http://ejohn.org/
|
150 |
* MIT Licensed.
|
@@ -221,8 +221,8 @@ var m_object_initializing = false;
|
|
221 |
return Object;
|
222 |
};
|
223 |
})();
|
224 |
-
|
225 |
-
|
226 |
Mana.define('Mana/Core', ['jquery'], function ($) {
|
227 |
return Mana.Object.extend('Mana/Core', {
|
228 |
getClasses: function(element) {
|
@@ -271,8 +271,8 @@ Mana.define('Mana/Core', ['jquery'], function ($) {
|
|
271 |
}
|
272 |
});
|
273 |
});
|
274 |
-
|
275 |
-
|
276 |
Mana.define('Mana/Core/Config', ['jquery'], function ($) {
|
277 |
return Mana.Object.extend('Mana/Core/Config', {
|
278 |
_init: function () {
|
@@ -301,8 +301,8 @@ Mana.define('Mana/Core/Config', ['jquery'], function ($) {
|
|
301 |
|
302 |
});
|
303 |
});
|
304 |
-
|
305 |
-
|
306 |
Mana.define('Mana/Core/Json', ['jquery', 'singleton:Mana/Core'], function ($, core) {
|
307 |
return Mana.Object.extend('Mana/Core/Json', {
|
308 |
parse: function (what) {
|
@@ -327,8 +327,8 @@ Mana.define('Mana/Core/Json', ['jquery', 'singleton:Mana/Core'], function ($, co
|
|
327 |
}
|
328 |
});
|
329 |
});
|
330 |
-
|
331 |
-
|
332 |
Mana.define('Mana/Core/Utf8', [], function () {
|
333 |
return Mana.Object.extend('Mana/Core/Utf8', {
|
334 |
decode: function (str_data) {
|
@@ -376,8 +376,8 @@ Mana.define('Mana/Core/Utf8', [], function () {
|
|
376 |
}
|
377 |
});
|
378 |
});
|
379 |
-
|
380 |
-
|
381 |
Mana.define('Mana/Core/Base64', ['singleton:Mana/Core/Utf8'], function (utf8) {
|
382 |
return Mana.Object.extend('Mana/Core/Base64', {
|
383 |
encode: function (what) {
|
@@ -504,8 +504,8 @@ Mana.define('Mana/Core/Base64', ['singleton:Mana/Core/Utf8'], function (utf8) {
|
|
504 |
}
|
505 |
});
|
506 |
});
|
507 |
-
|
508 |
-
|
509 |
Mana.define('Mana/Core/UrlTemplate', ['singleton:Mana/Core/Base64', 'singleton:Mana/Core/Config'], function (base64, config) {
|
510 |
return Mana.Object.extend('Mana/Core/UrlTemplate', {
|
511 |
decodeAttribute: function (data) {
|
@@ -521,8 +521,8 @@ Mana.define('Mana/Core/UrlTemplate', ['singleton:Mana/Core/Base64', 'singleton:M
|
|
521 |
}
|
522 |
});
|
523 |
});
|
524 |
-
|
525 |
-
|
526 |
Mana.define('Mana/Core/StringTemplate', ['jquery'], function ($, undefined) {
|
527 |
return Mana.Object.extend('Mana/Core/StringTemplate', {
|
528 |
concat: function(parsedTemplate, vars) {
|
@@ -546,8 +546,8 @@ Mana.define('Mana/Core/StringTemplate', ['jquery'], function ($, undefined) {
|
|
546 |
}
|
547 |
});
|
548 |
});
|
549 |
-
|
550 |
-
|
551 |
Mana.define('Mana/Core/Layout', ['jquery', 'singleton:Mana/Core'], function ($, core, undefined) {
|
552 |
return Mana.Object.extend('Mana/Core/Layout', {
|
553 |
_init: function () {
|
@@ -847,8 +847,8 @@ Mana.define('Mana/Core/Layout', ['jquery', 'singleton:Mana/Core'], function ($,
|
|
847 |
}
|
848 |
});
|
849 |
});
|
850 |
-
|
851 |
-
|
852 |
Mana.define('Mana/Core/Ajax', ['jquery', 'singleton:Mana/Core/Layout', 'singleton:Mana/Core/Json',
|
853 |
'singleton:Mana/Core', 'singleton:Mana/Core/Config'],
|
854 |
function ($, layout, json, core, config, undefined)
|
@@ -924,6 +924,9 @@ function ($, layout, json, core, config, undefined)
|
|
924 |
$(selector).html(html);
|
925 |
});
|
926 |
}
|
|
|
|
|
|
|
927 |
if (response.blocks) {
|
928 |
$.each(response.blocks, function (blockName, sectionIndex) {
|
929 |
var block = layout.getBlock(blockName);
|
@@ -932,9 +935,6 @@ function ($, layout, json, core, config, undefined)
|
|
932 |
}
|
933 |
});
|
934 |
}
|
935 |
-
if (response.config) {
|
936 |
-
config.set(response.config);
|
937 |
-
}
|
938 |
if (response.script) {
|
939 |
$.globalEval(response.script);
|
940 |
}
|
@@ -1027,7 +1027,8 @@ function ($, layout, json, core, config, undefined)
|
|
1027 |
if (options.showWait) {
|
1028 |
page.hideWait();
|
1029 |
}
|
1030 |
-
|
|
|
1031 |
alert(error.status + (error.responseText ? ': ' + error.responseText : ''));
|
1032 |
}
|
1033 |
},
|
@@ -1146,8 +1147,8 @@ function ($, layout, json, core, config, undefined)
|
|
1146 |
}
|
1147 |
});
|
1148 |
});
|
1149 |
-
|
1150 |
-
|
1151 |
Mana.define('Mana/Core/Block', ['jquery', 'singleton:Mana/Core', 'singleton:Mana/Core/Layout',
|
1152 |
'singleton:Mana/Core/Json'],
|
1153 |
function($, core, layout, json, undefined) {
|
@@ -1373,8 +1374,8 @@ function($, core, layout, json, undefined) {
|
|
1373 |
}
|
1374 |
});
|
1375 |
});
|
1376 |
-
|
1377 |
-
|
1378 |
Mana.define('Mana/Core/PopupBlock', ['jquery', 'Mana/Core/Block', 'singleton:Mana/Core/Layout'], function ($, Block, layout) {
|
1379 |
return Block.extend('Mana/Core/PopupBlock', {
|
1380 |
prepare: function(options) {
|
@@ -1389,8 +1390,8 @@ Mana.define('Mana/Core/PopupBlock', ['jquery', 'Mana/Core/Block', 'singleton:Man
|
|
1389 |
}
|
1390 |
});
|
1391 |
});
|
1392 |
-
|
1393 |
-
|
1394 |
Mana.define('Mana/Core/PageBlock', ['jquery', 'Mana/Core/Block', 'singleton:Mana/Core/Config'],
|
1395 |
function ($, Block, config)
|
1396 |
{
|
@@ -1472,8 +1473,8 @@ function ($, Block, config)
|
|
1472 |
}
|
1473 |
});
|
1474 |
});
|
1475 |
-
|
1476 |
-
|
1477 |
Mana.require(['jquery', 'singleton:Mana/Core/Layout', 'singleton:Mana/Core/Ajax'], function($, layout, ajax) {
|
1478 |
function _generateBlocks() {
|
1479 |
var vars = layout.beginGeneratingBlocks();
|
@@ -1484,8 +1485,8 @@ Mana.require(['jquery', 'singleton:Mana/Core/Layout', 'singleton:Mana/Core/Ajax'
|
|
1484 |
ajax.startIntercepting();
|
1485 |
});
|
1486 |
});
|
1487 |
-
|
1488 |
-
|
1489 |
Mana.require(['jquery'], function($) {
|
1490 |
var bp = {
|
1491 |
xsmall: 479,
|
@@ -1496,7 +1497,7 @@ Mana.require(['jquery'], function($) {
|
|
1496 |
};
|
1497 |
Mana.rwdIsMobile = false;
|
1498 |
$(function() {
|
1499 |
-
if (window.enquire) {
|
1500 |
enquire.register('screen and (max-width: ' + bp.medium + 'px)', {
|
1501 |
match: function () {
|
1502 |
Mana.rwdIsMobile = true;
|
@@ -1510,8 +1511,8 @@ Mana.require(['jquery'], function($) {
|
|
1510 |
}
|
1511 |
});
|
1512 |
});
|
1513 |
-
|
1514 |
-
|
1515 |
//region (Obsolete) additional jQuery functions used in MANAdev extensions
|
1516 |
(function($) {
|
1517 |
// this variables are private to this code block
|
@@ -1617,12 +1618,13 @@ Mana.require(['jquery'], function($) {
|
|
1617 |
}
|
1618 |
|
1619 |
$.fn.mMarkAttr = function (attr, condition) {
|
1620 |
-
|
1621 |
-
|
1622 |
-
|
1623 |
-
|
1624 |
-
|
1625 |
-
|
|
|
1626 |
return this;
|
1627 |
};
|
1628 |
// the following function is executed when DOM ir ready. If not use this wrapper, code inside could fail if
|
@@ -1756,7 +1758,7 @@ Mana.require(['jquery'], function($) {
|
|
1756 |
popup: { contentSelector:'.' + name + '-text', containerClass:'m-' + name + '-popup-container', top:100 }
|
1757 |
|
1758 |
}, options);
|
1759 |
-
$(
|
1760 |
if ($.mPopupClosing()) {
|
1761 |
return false;
|
1762 |
}
|
@@ -1845,6 +1847,6 @@ Mana.require(['jquery'], function($) {
|
|
1845 |
};
|
1846 |
|
1847 |
})(jQuery);
|
1848 |
-
//endregion
|
1849 |
-
|
1850 |
//# sourceMappingURL=core.js.map
|
7 |
|
8 |
; // make JS merging easier
|
9 |
|
10 |
+
|
11 |
+
|
12 |
var Mana = Mana || {};
|
13 |
|
14 |
(function($, $p, undefined) {
|
143 |
});
|
144 |
})(jQuery, $);
|
145 |
|
146 |
+
|
147 |
+
|
148 |
/* Simple JavaScript Inheritance
|
149 |
* By John Resig http://ejohn.org/
|
150 |
* MIT Licensed.
|
221 |
return Object;
|
222 |
};
|
223 |
})();
|
224 |
+
|
225 |
+
|
226 |
Mana.define('Mana/Core', ['jquery'], function ($) {
|
227 |
return Mana.Object.extend('Mana/Core', {
|
228 |
getClasses: function(element) {
|
271 |
}
|
272 |
});
|
273 |
});
|
274 |
+
|
275 |
+
|
276 |
Mana.define('Mana/Core/Config', ['jquery'], function ($) {
|
277 |
return Mana.Object.extend('Mana/Core/Config', {
|
278 |
_init: function () {
|
301 |
|
302 |
});
|
303 |
});
|
304 |
+
|
305 |
+
|
306 |
Mana.define('Mana/Core/Json', ['jquery', 'singleton:Mana/Core'], function ($, core) {
|
307 |
return Mana.Object.extend('Mana/Core/Json', {
|
308 |
parse: function (what) {
|
327 |
}
|
328 |
});
|
329 |
});
|
330 |
+
|
331 |
+
|
332 |
Mana.define('Mana/Core/Utf8', [], function () {
|
333 |
return Mana.Object.extend('Mana/Core/Utf8', {
|
334 |
decode: function (str_data) {
|
376 |
}
|
377 |
});
|
378 |
});
|
379 |
+
|
380 |
+
|
381 |
Mana.define('Mana/Core/Base64', ['singleton:Mana/Core/Utf8'], function (utf8) {
|
382 |
return Mana.Object.extend('Mana/Core/Base64', {
|
383 |
encode: function (what) {
|
504 |
}
|
505 |
});
|
506 |
});
|
507 |
+
|
508 |
+
|
509 |
Mana.define('Mana/Core/UrlTemplate', ['singleton:Mana/Core/Base64', 'singleton:Mana/Core/Config'], function (base64, config) {
|
510 |
return Mana.Object.extend('Mana/Core/UrlTemplate', {
|
511 |
decodeAttribute: function (data) {
|
521 |
}
|
522 |
});
|
523 |
});
|
524 |
+
|
525 |
+
|
526 |
Mana.define('Mana/Core/StringTemplate', ['jquery'], function ($, undefined) {
|
527 |
return Mana.Object.extend('Mana/Core/StringTemplate', {
|
528 |
concat: function(parsedTemplate, vars) {
|
546 |
}
|
547 |
});
|
548 |
});
|
549 |
+
|
550 |
+
|
551 |
Mana.define('Mana/Core/Layout', ['jquery', 'singleton:Mana/Core'], function ($, core, undefined) {
|
552 |
return Mana.Object.extend('Mana/Core/Layout', {
|
553 |
_init: function () {
|
847 |
}
|
848 |
});
|
849 |
});
|
850 |
+
|
851 |
+
|
852 |
Mana.define('Mana/Core/Ajax', ['jquery', 'singleton:Mana/Core/Layout', 'singleton:Mana/Core/Json',
|
853 |
'singleton:Mana/Core', 'singleton:Mana/Core/Config'],
|
854 |
function ($, layout, json, core, config, undefined)
|
924 |
$(selector).html(html);
|
925 |
});
|
926 |
}
|
927 |
+
if (response.config) {
|
928 |
+
config.set(response.config);
|
929 |
+
}
|
930 |
if (response.blocks) {
|
931 |
$.each(response.blocks, function (blockName, sectionIndex) {
|
932 |
var block = layout.getBlock(blockName);
|
935 |
}
|
936 |
});
|
937 |
}
|
|
|
|
|
|
|
938 |
if (response.script) {
|
939 |
$.globalEval(response.script);
|
940 |
}
|
1027 |
if (options.showWait) {
|
1028 |
page.hideWait();
|
1029 |
}
|
1030 |
+
// When the request fails (let's say no internet), the status is `0` and no responseText. So, do not alert.
|
1031 |
+
if (options.showDebugMessages && error.status > 0) {
|
1032 |
alert(error.status + (error.responseText ? ': ' + error.responseText : ''));
|
1033 |
}
|
1034 |
},
|
1147 |
}
|
1148 |
});
|
1149 |
});
|
1150 |
+
|
1151 |
+
|
1152 |
Mana.define('Mana/Core/Block', ['jquery', 'singleton:Mana/Core', 'singleton:Mana/Core/Layout',
|
1153 |
'singleton:Mana/Core/Json'],
|
1154 |
function($, core, layout, json, undefined) {
|
1374 |
}
|
1375 |
});
|
1376 |
});
|
1377 |
+
|
1378 |
+
|
1379 |
Mana.define('Mana/Core/PopupBlock', ['jquery', 'Mana/Core/Block', 'singleton:Mana/Core/Layout'], function ($, Block, layout) {
|
1380 |
return Block.extend('Mana/Core/PopupBlock', {
|
1381 |
prepare: function(options) {
|
1390 |
}
|
1391 |
});
|
1392 |
});
|
1393 |
+
|
1394 |
+
|
1395 |
Mana.define('Mana/Core/PageBlock', ['jquery', 'Mana/Core/Block', 'singleton:Mana/Core/Config'],
|
1396 |
function ($, Block, config)
|
1397 |
{
|
1473 |
}
|
1474 |
});
|
1475 |
});
|
1476 |
+
|
1477 |
+
|
1478 |
Mana.require(['jquery', 'singleton:Mana/Core/Layout', 'singleton:Mana/Core/Ajax'], function($, layout, ajax) {
|
1479 |
function _generateBlocks() {
|
1480 |
var vars = layout.beginGeneratingBlocks();
|
1485 |
ajax.startIntercepting();
|
1486 |
});
|
1487 |
});
|
1488 |
+
|
1489 |
+
|
1490 |
Mana.require(['jquery'], function($) {
|
1491 |
var bp = {
|
1492 |
xsmall: 479,
|
1497 |
};
|
1498 |
Mana.rwdIsMobile = false;
|
1499 |
$(function() {
|
1500 |
+
if (window.enquire && window.enquire.register) {
|
1501 |
enquire.register('screen and (max-width: ' + bp.medium + 'px)', {
|
1502 |
match: function () {
|
1503 |
Mana.rwdIsMobile = true;
|
1511 |
}
|
1512 |
});
|
1513 |
});
|
1514 |
+
|
1515 |
+
|
1516 |
//region (Obsolete) additional jQuery functions used in MANAdev extensions
|
1517 |
(function($) {
|
1518 |
// this variables are private to this code block
|
1618 |
}
|
1619 |
|
1620 |
$.fn.mMarkAttr = function (attr, condition) {
|
1621 |
+
this.prop(attr, condition);
|
1622 |
+
//if (condition) {
|
1623 |
+
// this.attr(attr, attr);
|
1624 |
+
//}
|
1625 |
+
//else {
|
1626 |
+
// this.removeAttr(attr);
|
1627 |
+
//}
|
1628 |
return this;
|
1629 |
};
|
1630 |
// the following function is executed when DOM ir ready. If not use this wrapper, code inside could fail if
|
1758 |
popup: { contentSelector:'.' + name + '-text', containerClass:'m-' + name + '-popup-container', top:100 }
|
1759 |
|
1760 |
}, options);
|
1761 |
+
$(document).on('click', this, function () {
|
1762 |
if ($.mPopupClosing()) {
|
1763 |
return false;
|
1764 |
}
|
1847 |
};
|
1848 |
|
1849 |
})(jQuery);
|
1850 |
+
//endregion
|
1851 |
+
|
1852 |
//# sourceMappingURL=core.js.map
|
js/mana/core.js.map
CHANGED
@@ -1,27 +1,27 @@
|
|
1 |
-
{
|
2 |
-
"version": 3,
|
3 |
-
"file": "core.js",
|
4 |
-
"sources": [
|
5 |
-
"src/Mana/Core/header.js",
|
6 |
-
"src/Mana/Core/Mana.js",
|
7 |
-
"src/Mana/Core/Object.js",
|
8 |
-
"src/Mana/Core/Core.js",
|
9 |
-
"src/Mana/Core/Config.js",
|
10 |
-
"src/Mana/Core/Json.js",
|
11 |
-
"src/Mana/Core/Utf8.js",
|
12 |
-
"src/Mana/Core/Base64.js",
|
13 |
-
"src/Mana/Core/UrlTemplate.js",
|
14 |
-
"src/Mana/Core/StringTemplate.js",
|
15 |
-
"src/Mana/Core/Layout.js",
|
16 |
-
"src/Mana/Core/Ajax.js",
|
17 |
-
"src/Mana/Core/Block.js",
|
18 |
-
"src/Mana/Core/PopupBlock.js",
|
19 |
-
"src/Mana/Core/PageBlock.js",
|
20 |
-
"src/Mana/Core/init.js",
|
21 |
-
"src/Mana/Core/rwd.js",
|
22 |
-
"src/Mana/Core/obsolete.js"
|
23 |
-
],
|
24 |
-
"names": [],
|
25 |
-
"mappings": "AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;
|
26 |
-
"sourceRoot": "../"
|
27 |
}
|
1 |
+
{
|
2 |
+
"version": 3,
|
3 |
+
"file": "core.js",
|
4 |
+
"sources": [
|
5 |
+
"src/Mana/Core/header.js",
|
6 |
+
"src/Mana/Core/Mana.js",
|
7 |
+
"src/Mana/Core/Object.js",
|
8 |
+
"src/Mana/Core/Core.js",
|
9 |
+
"src/Mana/Core/Config.js",
|
10 |
+
"src/Mana/Core/Json.js",
|
11 |
+
"src/Mana/Core/Utf8.js",
|
12 |
+
"src/Mana/Core/Base64.js",
|
13 |
+
"src/Mana/Core/UrlTemplate.js",
|
14 |
+
"src/Mana/Core/StringTemplate.js",
|
15 |
+
"src/Mana/Core/Layout.js",
|
16 |
+
"src/Mana/Core/Ajax.js",
|
17 |
+
"src/Mana/Core/Block.js",
|
18 |
+
"src/Mana/Core/PopupBlock.js",
|
19 |
+
"src/Mana/Core/PageBlock.js",
|
20 |
+
"src/Mana/Core/init.js",
|
21 |
+
"src/Mana/Core/rwd.js",
|
22 |
+
"src/Mana/Core/obsolete.js"
|
23 |
+
],
|
24 |
+
"names": [],
|
25 |
+
"mappings": "AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",
|
26 |
+
"sourceRoot": "../"
|
27 |
}
|
js/mana/core.min.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
/**
|
2 |
-
* @category Mana
|
3 |
-
* @package Mana_Core
|
4 |
-
* @copyright Copyright (c) http://www.manadev.com
|
5 |
-
* @license http://www.manadev.com/license Proprietary License
|
6 |
-
*/
|
7 |
-
var Mana=Mana||{};!function(e,t,n){e.extend(Mana,{_singletons:{},_defines:{jquery:e,prototype:t},define:function(e,t,n){var o=Mana._resolveDependencyNames(t);return Mana._define(e,o.names,function(){return n.apply(this,Mana._resolveDependencies(arguments,o.deps))})},require:function(e,t){var n=Mana._resolveDependencyNames(e);return Mana._define(null,n.names,function(){return t.apply(this,Mana._resolveDependencies(arguments,n.deps))})},_define:function(t,n,o){var i=[];e.each(n,function(e,t){i.push(Mana._resolveDefine(t))});var r=o.apply(this,i);return t&&(Mana._defines[t]=r),r},_resolveDefine:function(e){return Mana._defines[e]===n&&console.warn("'"+e+"' is not defined"),Mana._defines[e]},requireOptional:function(e,t){var n=Mana._resolveDependencyNames(e);return Mana._define(null,n.names,function(){return t.apply(this,Mana._resolveDependencies(arguments,n.deps))})},_resolveDependencyNames:function(t){var n=[],o=[];return e.each(t,function(e,t){var i=t.indexOf(":"),r={name:t,resolver:""};-1!=i&&(r={name:t.substr(i+1),resolver:t.substr(0,i)}),Mana._resolveDependencyName(r),n.push(r.name),o.push(r)}),{names:n,deps:o}},_resolveDependencies:function(t,n){return e.each(t,function(e,o){t[e]=Mana._resolveDependency(n[e],o)}),t},_resolveDependencyName:function(){},_resolveDependency:function(e,t){if(t!==n)switch(e.resolver){case"singleton":return Mana._singletons[e.name]===n&&(Mana._singletons[e.name]=new t),Mana._singletons[e.name]}return t}})}(jQuery,$);var m_object_initializing=!1;!function(undefined){var fnTest=/xyz/.test(function(){})?/\b_super\b/:/.*/;Mana.Object=function(){},Mana.Object.extend=function(className,prop){prop===undefined&&(prop=className,className=undefined);var _super=this.prototype;m_object_initializing=!0;var prototype=new this;m_object_initializing=!1;for(var name in prop)prototype[name]="function"==typeof prop[name]&&"function"==typeof _super[name]&&fnTest.test(prop[name])?function(e,t){return function(){var n=this._super;this._super=_super[e];var o=t.apply(this,arguments);return this._super=n,o}}(name,prop[name]):prop[name];var Object;return className===undefined?Object=function(){!m_object_initializing&&this._init&&this._init.apply(this,arguments)}:eval("Object = function "+className.replace(/\//g,"_")+"() { if (!m_object_initializing && this._init) this._init.apply(this, arguments); };"),Object.prototype=prototype,Object.prototype.constructor=Object,Object.extend=arguments.callee,Object}}(),Mana.define("Mana/Core",["jquery"],function(e){return Mana.Object.extend("Mana/Core",{getClasses:function(e){return e.className&&e.className.split?e.className.split(/\s+/):[]},getPrefixedClass:function(t,n){var o="";return e.each(this.getClasses(t),function(e,t){return 0==t.indexOf(n)?(o=t.substr(n.length),!1):void 0}),o},arrayRemove:function(e,t,n){var o=e.slice((n||t)+1||e.length);return e.length=0>t?e.length+t:t,e.push.apply(e,o)},getBlockAlias:function(e,t){var n;return 0===(n=t.indexOf(e+"-"))?t.substr((e+"-").length):t},count:function(t){var n=0;return e.each(t,function(){n++}),n},isFunction:function(e){return!!(e&&e.constructor&&e.call&&e.apply)},isString:function(e){return"[object String]"==Object.prototype.toString.call(e)}})}),Mana.define("Mana/Core/Config",["jquery"],function(e){return Mana.Object.extend("Mana/Core/Config",{_init:function(){this._data={debug:!1,showOverlay:!0,showWait:!0}},getData:function(e){return this._data[e]},setData:function(e,t){return this._data[e]=t,this},set:function(t){return e.extend(this._data,t),this},getBaseUrl:function(e){return this.getData(0==e.indexOf(this.getData("url.base"))?"url.base":"url.secureBase")}})}),Mana.define("Mana/Core/Json",["jquery","singleton:Mana/Core"],function(e,t){return Mana.Object.extend("Mana/Core/Json",{parse:function(t){return e.parseJSON(t)},stringify:function(e){return Object.toJSON(e)},decodeAttribute:function(n){if(t.isString(n)){var o=n.split('"'),i=[];e.each(o,function(e,t){i.push(t.replace(/'/g,'"'))});var r=i.join("'");return this.parse(r)}return n}})}),Mana.define("Mana/Core/Utf8",[],function(){return Mana.Object.extend("Mana/Core/Utf8",{decode:function(e){var t=[],n=0,o=0,i=0,r=0,a=0;for(e+="";n<e.length;)i=e.charCodeAt(n),128>i?(t[o++]=String.fromCharCode(i),n++):i>191&&224>i?(r=e.charCodeAt(n+1),t[o++]=String.fromCharCode((31&i)<<6|63&r),n+=2):(r=e.charCodeAt(n+1),a=e.charCodeAt(n+2),t[o++]=String.fromCharCode((15&i)<<12|(63&r)<<6|63&a),n+=3);return t.join("")}})}),Mana.define("Mana/Core/Base64",["singleton:Mana/Core/Utf8"],function(e){return Mana.Object.extend("Mana/Core/Base64",{encode:function(e){for(var t,n,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i="",r=e.length,a=0;r-->0;){if(t=e.charCodeAt(a++),i+=o.charAt(t>>2&63),r--<=0){i+=o.charAt(t<<4&63),i+="==";break}if(n=e.charCodeAt(a++),i+=o.charAt(63&(t<<4|n>>4&15)),r--<=0){i+=o.charAt(n<<2&63),i+="=";break}t=e.charCodeAt(a++),i+=o.charAt(63&(n<<2|t>>6&3)),i+=o.charAt(63&t)}return i},decode:function(t){var n,o,i,r,a,c,s,u,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",d=0,h=0,p="",f=[];if(!t)return t;t+="";do r=l.indexOf(t.charAt(d++)),a=l.indexOf(t.charAt(d++)),c=l.indexOf(t.charAt(d++)),s=l.indexOf(t.charAt(d++)),u=r<<18|a<<12|c<<6|s,n=u>>16&255,o=u>>8&255,i=255&u,f[h++]=64==c?String.fromCharCode(n):64==s?String.fromCharCode(n,o):String.fromCharCode(n,o,i);while(d<t.length);return p=f.join(""),p=e.decode(p)}})}),Mana.define("Mana/Core/UrlTemplate",["singleton:Mana/Core/Base64","singleton:Mana/Core/Config"],function(e,t){return Mana.Object.extend("Mana/Core/UrlTemplate",{decodeAttribute:function(n){return t.getData("debug")?n:e.decode(n.replace(/-/g,"+").replace(/_/g,"/").replace(/,/g,"="))},encodeAttribute:function(t){return e.encode(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,",")}})}),Mana.define("Mana/Core/StringTemplate",["jquery"],function(e,t){return Mana.Object.extend("Mana/Core/StringTemplate",{concat:function(n,o){var i="";return e.each(n,function(e,n){var r=n[0],a=n[1];"string"==r?i+=a:"var"==r&&(i+=o[a]!==t?o[a]:"{{"+a+"}}")}),i}})}),Mana.define("Mana/Core/Layout",["jquery","singleton:Mana/Core"],function(e,t,n){return Mana.Object.extend("Mana/Core/Layout",{_init:function(){this._pageBlock=null},getPageBlock:function(){return this._pageBlock},getBlock:function(e){return this._getBlockRecursively(this.getPageBlock(),e)},getBlockForElement:function(e){var t=this._getElementBlockInfo(e);return t?this.getBlock(t.id):null},_getBlockRecursively:function(t,n){if(t.getId()==n)return t;var o=this,i=null;return e.each(t.getChildren(),function(e,t){return i=o._getBlockRecursively(t,n),i?!1:!0}),i},beginGeneratingBlocks:function(e){var t={parentBlock:e,namedBlocks:{}};return e&&(e.trigger("unload",{},!1,!0),e.trigger("unbind",{},!1,!0),t.namedBlocks=this._removeAnonymousBlocks(e)),t},endGeneratingBlocks:function(t){var o=t.parentBlock,i=t.namedBlocks,r=this;this._collectBlockTypes(o?o.getElement():document,function(t){if(!r._pageBlock){var a=document.body,c=e(a),s=c.attr("data-m-block"),u=s?t[s]:t["Mana/Core/PageBlock"];r._pageBlock=(new u).setElement(e("body")[0]).setId("page")}var l=o===n;l&&(o=r.getPageBlock()),r._generateBlocksInElement(o.getElement(),o,t,i),e.each(i,function(e,t){t.parent.removeChild(t.child)}),o.trigger("bind",{},!1,!0),o.trigger("load",{},!1,!0)})},_collectBlockTypes:function(t,n){var o=["Mana/Core/PageBlock"];this._collectBlockTypesInElement(t,o),Mana.requireOptional(o,function(){var t=arguments,i={};e.each(o,function(e,n){i[n]=t[e]}),n(i)})},_collectBlockTypesInElement:function(t,n){var o=this;e(t).children().each(function(){var e=o._getElementBlockInfo(this);e&&-1==n.indexOf(e.typeName)&&n.push(e.typeName),o._collectBlockTypesInElement(this,n)})},_removeAnonymousBlocks:function(t){var n=this,o={};return e.each(t.getChildren().slice(0),function(e,i){i.getId()?(o[i.getId()]={parent:t,child:i},n._removeAnonymousBlocks(i)):t.removeChild(i)}),o},_getElementBlockInfo:function(n){var o,i,r=e(n);return(o=t.getPrefixedClass(n,"mb-"))||(i=r.attr("data-m-block"))||r.hasClass("m-block")?{id:o||n.id,typeName:i||r.attr("data-m-block")||"Mana/Core/Block"}:null},_generateBlocksInElement:function(t,n,o,i){var r=this;e(t).children().each(function(){var e=r._createBlockFromElement(this,n,o,i);r._generateBlocksInElement(this,e||n,o,i)})},_createBlockFromElement:function(e,n,o,i){var r=this._getElementBlockInfo(e);if(r){var a,c=o[r.typeName],s=!1;return r.id?(a=n.getChild(t.getBlockAlias(n.getId(),r.id)),a?(s=!0,delete i[r.id]):c?a=new c:console.error("Block '"+r.typeName+"' is not defined"),a&&a.setId(r.id)):c?a=new c:console.error("Block '"+r.typeName+"' is not defined"),a?(a.setElement(e),s||n.addChild(a),a):null}return null},preparePopup:function(o){if(o=this._preparePopupOptions(o),o.$popup===n){var i=e("#m-popup");i.css({width:"auto",height:"auto"}),i.html(t.isString(o.content)?o.content:e(o.content).html()),o.popup["class"]&&i.addClass(o.popup["class"]),o.$popup=i}return o.$popup},_preparePopupOptions:function(e){return e.overlay===n&&(e.overlay={}),e.overlay.opacity===n&&(e.overlay.opacity=.2),e.popup===n&&(e.popup={}),e.popup.blockName===n&&(e.popup.blockName="Mana/Core/PopupBlock"),e.popupBlock===n&&(e.popupBlock={}),e.fadein===n&&(e.fadein={}),e.fadein.overlayTime===n&&(e.fadein.overlayTime=0),e.fadein.popupTime===n&&(e.fadein.popupTime=300),e.fadeout===n&&(e.fadeout={}),e.fadeout.overlayTime===n&&(e.fadeout.overlayTime=0),e.fadeout.popupTime===n&&(e.fadeout.popupTime=500),e},showPopup:function(t){t=this._preparePopupOptions(t);var n=this;Mana.requireOptional([t.popup.blockName],function(o){var i=t.fadeout.callback;t.fadeout.callback=function(){e("#m-popup").fadeOut(t.fadeout.popupTime,function(){i&&i()})};var r=n.getPageBlock().showOverlay("m-popup-overlay",t.fadeout),a=n.preparePopup(t);r.animate({opacity:t.overlay.opacity},t.fadein.overlayTime,function(){a.show();var i=new o;i.setElement(a[0]);var r=n.beginGeneratingBlocks(i);n.endGeneratingBlocks(r),i.prepare&&i.prepare(t.popupBlock),e(".m-popup-overlay").on("click",function(){return n.hidePopup(),!1}),n._popupEscListenerInitialized||(n._popupEscListenerInitialized=!0,e(document).keydown(function(t){return e(".m-popup-overlay").length&&27==t.keyCode?(n.hidePopup(),!1):!0})),a.css("top",(e(window).height()-a.outerHeight())/2+e(window).scrollTop()+"px").css("left",(e(window).width()-a.outerWidth())/2+e(window).scrollLeft()+"px");a.height();a.hide().css({height:"auto"});var c={left:a.css("left"),top:a.css("top"),width:a.width()+"px",height:a.height()+"px"};a.children().each(function(){e(this).css({width:a.width()+e(this).width()-e(this).outerWidth()+"px",height:a.height()+e(this).height()-e(this).outerHeight()+"px"})}),a.css({top:e(window).height()/2+e(window).scrollTop()+"px",left:e(window).width()/2+e(window).scrollLeft()+"px",width:"0px",height:"0px"}).show(),a.animate(c,t.fadein.popupTime,t.fadein.callback)})})},hidePopup:function(){this.getPageBlock().hideOverlay()}})}),Mana.define("Mana/Core/Ajax",["jquery","singleton:Mana/Core/Layout","singleton:Mana/Core/Json","singleton:Mana/Core","singleton:Mana/Core/Config"],function(e,t,n,o,i,r){return Mana.Object.extend("Mana/Core/Ajax",{_init:function(){this._interceptors=[],this._matchedInterceptorCache={},this._lastAjaxActionSource=r,this._oldSetLocation=r,this._preventClicks=0},_encodeUrl:function(e,t){return t.encode?t.encode.offset!==r?t.encode.length===r?0===t.encode.offset?window.encodeURI(e.substr(t.encode.offset)):e.substr(0,t.encode.offset)+window.encodeURI(e.substr(t.encode.offset)):0===t.encode.length?e:0===t.encode.offset?window.encodeURI(e.substr(t.encode.offset,t.encode.length))+e.substr(t.encode.offset+t.encode.length):e.substr(0,t.encode.offset)+window.encodeURI(e.substr(t.encode.offset,t.encode.length))+e.substr(t.encode.offset+t.encode.length):e:window.encodeURI(e)},get:function(t,n,o){var i=this;o=this._before(o,t),e.get(this._encodeUrl(t,o)).done(function(e){i._done(e,n,o,t)}).fail(function(e){i._fail(e,o,t)}).complete(function(){i._complete(o,t)})},post:function(t,n,o,i){var a=this;n===r&&(n=[]),o===r&&(o=function(){}),i=this._before(i,t,n),e.post(window.encodeURI(t),n).done(function(e){a._done(e,o,i,t,n)}).fail(function(e){a._fail(e,i,t,n)}).complete(function(){a._complete(i,t,n)})},update:function(n){n.updates&&e.each(n.updates,function(t,n){e(t).html(n)}),n.blocks&&e.each(n.blocks,function(e,o){var i=t.getBlock(e);i&&i.setContent(n.sections[o])}),n.config&&i.set(n.config),n.script&&e.globalEval(n.script),n.title&&(document.title=n.title.replace(/&/g,"&"))},getSectionSeparator:function(){return"\n91b5970cd70e2353d866806f8003c1cd56646961\n"},_before:function(n,o){var i=t.getPageBlock();return n=e.extend({showOverlay:i.getShowOverlay(),showWait:i.getShowWait(),showDebugMessages:i.getShowDebugMessages()},n),n.showOverlay&&i.showOverlay(),n.showWait&&i.showWait(),n.preventClicks&&this._preventClicks++,e(document).trigger("m-ajax-before",[[],o,"",n]),n},_done:function(e,o,i,r,a){var c=t.getPageBlock();i.showOverlay&&c.hideOverlay(),i.showWait&&c.hideWait();try{var s=e;try{var u=e.split(this.getSectionSeparator());e=u.shift(),e=n.parse(e),e.sections=u}catch(l){return void o(s,{url:r})}e?e.error&&!e.customErrorDisplay?i.showDebugMessages&&alert(e.message||e.error):o(e,{url:r,data:a}):i.showDebugMessages&&alert("No response.")}catch(d){if(i.showDebugMessages){var h="";"string"==typeof d?h+=d:(h+=d.message,d.fileName&&(h+="\n in "+d.fileName+" ("+d.lineNumber+")")),e&&(h+="\n\n",h+="string"==typeof e?e:n.stringify(e)),alert(h)}}},_fail:function(e,n){var o=t.getPageBlock();n.showOverlay&&o.hideOverlay(),n.showWait&&o.hideWait(),n.showDebugMessages&&alert(e.status+(e.responseText?": "+e.responseText:""))},_complete:function(t,n){t.preventClicks&&this._preventClicks--,e(document).trigger("m-ajax-after",[[],n,"",t])},addInterceptor:function(e){this._interceptors.push(e)},removeInterceptor:function(e){var t=this._interceptors.indexOf(e);-1!=t&&this._interceptors.splice(t,1)},startIntercepting:function(){var t=this;window.History&&window.History.enabled&&e(window).on("statechange",t._onStateChange=function(){var e=window.History.getState(),n=e.url;t._findMatchingInterceptor(n,t._lastAjaxActionSource)?t._internalCallInterceptionCallback(n,t._lastAjaxActionSource):t._oldSetLocation(n,t._lastAjaxActionSource)}),window.setLocation&&(this._oldSetLocation=window.setLocation,window.setLocation=function(e,n){t._callInterceptionCallback(e,n)}),e(document).on("click","a",t._onClick=function(){var e=this.href;return t._preventClicks&&e==location.href+"#"?!1:t._findMatchingInterceptor(e,this)?t._callInterceptionCallback(e,this):!0})},stopIntercepting:function(){window.History&&window.History.enabled&&(e(window).off("statechange",self._onStateChange),self._onStateChange=null),e(document).off("click","a",self._onClick),self._onClick=null},_internalCallInterceptionCallback:function(e,t){var n=this._findMatchingInterceptor(e,t);return n?(this.lastUrl=e,n.intercept(e,t),!1):!0},_callInterceptionCallback:function(e,t){return this._findMatchingInterceptor(e,t)?(this._lastAjaxActionSource=t,window.History&&window.History.enabled?window.History.pushState(null,window.title,e):this._internalCallInterceptionCallback(e,t)):this._oldSetLocation(e,t),!1},_findMatchingInterceptor:function(t,n){if(this._matchedInterceptorCache[t]===r){var o=!1;i.getData("ajax.enabled")&&e.each(this._interceptors,function(e,i){return i.match(t,n)?(o=i,!1):!0}),this._matchedInterceptorCache[t]=o}return this._matchedInterceptorCache[t]},getDocumentUrl:function(){return this.lastUrl?this.lastUrl:document.URL}})}),Mana.define("Mana/Core/Block",["jquery","singleton:Mana/Core","singleton:Mana/Core/Layout","singleton:Mana/Core/Json"],function(e,t,n,o,i){return Mana.Object.extend("Mana/Core/Block",{_init:function(){this._id="",this._element=null,this._parent=null,this._children=[],this._namedChildren={},this._isSelfContained=!1,this._eventHandlers={},this._data={},this._text={},this._subscribeToHtmlEvents()._subscribeToBlockEvents()},_subscribeToHtmlEvents:function(){return this._json={},this},_subscribeToBlockEvents:function(){return this},getElement:function(){return this._element},$:function(){return e(this.getElement())},setElement:function(e){return this._element=e,this},addChild:function(e){return this._children.push(e),e.getId()&&(this._namedChildren[t.getBlockAlias(this.getId(),e.getId())]=e),e._parent=this,this},removeChild:function(n){var o=e.inArray(n,this._children);return-1!=o&&(t.arrayRemove(this._children,o),n.getId()&&delete this._namedChildren[t.getBlockAlias(this.getId(),n.getId())]),n._parent=null,this},getIsSelfContained:function(){return this._isSelfContained},setIsSelfContained:function(e){return this._isSelfContained=e,this},getId:function(){return this._id||this.getElement().id},setId:function(e){return this._id=e,this},getParent:function(){return this._parent},getChild:function(n){if(t.isFunction(n)){var o=null;return e.each(this._children,function(e,t){return n(e,t)?(o=t,!1):!0}),o}return this._namedChildren[n]},getChildren:function(t){if(t===i)return this._children.slice(0);var n=[];return e.each(this._children,function(e,o){t(e,o)&&n.push(o)}),n},getAlias:function(){var t=i,n=this;return e.each(this._parent._namedChildren,function(e,o){return o===n?(t=e,!1):!0}),t},_trigger:function(t,n){return n.stopped||this._eventHandlers[t]===i||e.each(this._eventHandlers[t],function(e,t){var o=t.callback.call(t.target,n);return o===!1&&(n.stopped=!0),o}),n.result},trigger:function(t,n,o,r){return n===i&&(n={}),n.target===i&&(n.target=this),r===i&&(r=!1),o===i&&(o=!0),this._trigger(t,n),r&&e.each(this.getChildren(),function(e,o){o.trigger(t,n,!1,r)}),o&&this.getParent()&&this.getParent().trigger(t,n,o,!1),n.result},on:function(e,t,n,o){return this._eventHandlers[e]===i&&(this._eventHandlers[e]=[]),o===i&&(o=0),this._eventHandlers[e].push({target:t,callback:n,sortOrder:o}),this._eventHandlers[e].sort(function(e,t){return e.sortOrder<t.sortOrder?-1:e.sortOrder>t.sortOrder?1:0}),this},off:function(n,o,r){this._eventHandlers[n]===i&&(this._eventHandlers[n]=[]);var a=-1;e.each(this._eventHandlers[n],function(e,t){return t.target==o&&t.callback==r?(a=e,!1):!0}),-1!=a&&t.arrayRemove(this._eventHandlers[n],a)},setContent:function(t){if("string"!=e.type(t)){if(!(t.content&&this.getId()&&t.content[this.getId()]))return this;t=t.content[this.getId()]}var o=n.beginGeneratingBlocks(this);return t=e(t),e(this.getElement()).replaceWith(t),this.setElement(t[0]),n.endGeneratingBlocks(o),this},getData:function(e){return this._data[e]},setData:function(e,t){return this._data[e]=t,this},getText:function(e){return this._text[e]===i&&(this._text[e]=this.$().data(e+"-text")),this._text[e]},getJsonData:function(e,t){return this._json[e]===i&&(this._json[e]=o.decodeAttribute(this.$().data(e))),t===i?this._json[e]:this._json[e][t]}})}),Mana.define("Mana/Core/PopupBlock",["jquery","Mana/Core/Block","singleton:Mana/Core/Layout"],function(e,t,n){return t.extend("Mana/Core/PopupBlock",{prepare:function(e){var t=this;this._host=e.host,this.$().find(".btn-close").on("click",function(){return t._close()})},_close:function(){return n.hidePopup(),!1}})}),Mana.define("Mana/Core/PageBlock",["jquery","Mana/Core/Block","singleton:Mana/Core/Config"],function(e,t,n){return t.extend("Mana/Core/PageBlock",{_init:function(){this._defaultOverlayFadeout={overlayTime:0,popupTime:0,callback:null},this._overlayFadeout=this._defaultOverlayFadeout,this._super()},_subscribeToHtmlEvents:function(){function t(){o||(o=!0,n.resize(),o=!1)}var n=this,o=!1;return this._super().on("bind",this,function(){e(window).on("load",t),e(window).on("resize",t)}).on("unbind",this,function(){e(window).off("load",t),e(window).off("resize",t)})},_subscribeToBlockEvents:function(){return this._super().on("load",this,function(){this.resize()})},resize:function(){this.trigger("resize",{},!1,!0)},showOverlay:function(t,n){this._overlayFadeout=n||this._defaultOverlayFadeout;var o=e(t?'<div class="m-overlay '+t+'"></div>':'<div class="m-overlay"></div>');return o.appendTo(this.getElement()),o.css({left:0,top:0}).width(e(document).width()).height(e(document).height()),o},hideOverlay:function(){var t=this;return e(".m-overlay").fadeOut(this._overlayFadeout.overlayTime,function(){e(".m-overlay").remove(),t._overlayFadeout.callback&&t._overlayFadeout.callback(),t._overlayFadeout=t._defaultOverlayFadeout}),this},showWait:function(){return e("#m-wait").show(),this},hideWait:function(){return e("#m-wait").hide(),this},getShowDebugMessages:function(){return n.getData("debug")},getShowOverlay:function(){return n.getData("showOverlay")},getShowWait:function(){return n.getData("showWait")}})}),Mana.require(["jquery","singleton:Mana/Core/Layout","singleton:Mana/Core/Ajax"],function(e,t,n){function o(){var e=t.beginGeneratingBlocks();t.endGeneratingBlocks(e)}e(function(){o(),n.startIntercepting()})}),Mana.require(["jquery"],function(e){var t={xsmall:479,small:599,medium:770,large:979,xlarge:1199};Mana.rwdIsMobile=!1,e(function(){window.enquire&&enquire.register("screen and (max-width: "+t.medium+"px)",{match:function(){Mana.rwdIsMobile=!0,e(document).trigger("m-rwd-mobile")},unmatch:function(){Mana.rwdIsMobile=!1,e(document).trigger("m-rwd-wide")}})})}),function(e){var t={},n={};e.__=function(n){if("string"==typeof n){var o=arguments;return o[0]=t[n]?t[n]:n,e.vsprintf(o)}t=e.extend(t,n)},e.options=function(t){return"string"==typeof t?n[t]:(n=e.extend(!0,n,t),void e(document).trigger("m-options-changed"))},e.dynamicUpdate=function(t){t&&e.each(t,function(t,n){e(n.selector).html(n.html)})},e.dynamicReplace=function(t,n,o){t&&e.each(t,function(t,i){var r=e(t);if(r.length){var a=e(r[0]);r.length>1&&r.slice(1).remove(),a.replaceWith(o?e.utf8_decode(i):i)}else if(n)throw"There is no content to replace."})},e.errorUpdate=function(t,n){t||(t="#messages");var o=e(t);o.length?o.html('<ul class="messages"><li class="error-msg"><ul><li>'+n+"</li></ul></li></ul>"):alert(n)},e.arrayRemove=function(e,t,n){var o=e.slice((n||t)+1||e.length);return e.length=0>t?e.length+t:t,e.push.apply(e,o)},e.mViewport=function(){var e="CSS1Compat"==document.compatMode;return{l:window.pageXOffset||(e?document.documentElement.scrollLeft:document.body.scrollLeft),t:window.pageYOffset||(e?document.documentElement.scrollTop:document.body.scrollTop),w:window.innerWidth||(e?document.documentElement.clientWidth:document.body.clientWidth),h:window.innerHeight||(e?document.documentElement.clientHeight:document.body.clientHeight)}},e.mStickTo=function(t,n){var o=e(t).offset(),i=e.mViewport(),r=o.top+t.offsetHeight,a=o.left+(t.offsetWidth-n.outerWidth())/2;r+n.outerHeight()>i.t+i.h&&(r=o.top-n.outerHeight()),a+n.outerWidth()>i.l+i.w&&(a=o.left+t.offsetWidth-n.outerWidth()),n.css({left:a+"px",top:r+"px"})},e.fn.mMarkAttr=function(e,t){return t?this.attr(e,e):this.removeAttr(e),this},e(function(){try{window.mainNav&&window.mainNav("nav",{show_delay:"100",hide_delay:"100"})}catch(e){}}),e.base64_decode=function(t){var n,o,i,r,a,c,s,u,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",d=0,h=0,p="",f=[];if(!t)return t;t+="";do r=l.indexOf(t.charAt(d++)),a=l.indexOf(t.charAt(d++)),c=l.indexOf(t.charAt(d++)),s=l.indexOf(t.charAt(d++)),u=r<<18|a<<12|c<<6|s,n=u>>16&255,o=u>>8&255,i=255&u,f[h++]=64==c?String.fromCharCode(n):64==s?String.fromCharCode(n,o):String.fromCharCode(n,o,i);while(d<t.length);return p=f.join(""),p=e.utf8_decode(p)},e.utf8_decode=function(e){var t=[],n=0,o=0,i=0,r=0,a=0;for(e+="";n<e.length;)i=e.charCodeAt(n),128>i?(t[o++]=String.fromCharCode(i),n++):i>191&&224>i?(r=e.charCodeAt(n+1),t[o++]=String.fromCharCode((31&i)<<6|63&r),n+=2):(r=e.charCodeAt(n+1),a=e.charCodeAt(n+2),t[o++]=String.fromCharCode((15&i)<<12|(63&r)<<6|63&a),n+=3);return t.join("")};var o={overlayTime:500,popupTime:1e3,callback:null};e.mSetPopupFadeoutOptions=function(e){o=e},e.fn.extend({mPopup:function(t,n){var o=e.extend({fadeOut:{overlayTime:0,popupTime:500,callback:null},fadeIn:{overlayTime:0,popupTime:500,callback:null},overlay:{opacity:.2},popup:{contentSelector:"."+t+"-text",containerClass:"m-"+t+"-popup-container",top:100}},n);e(this).live("click",function(){if(e.mPopupClosing())return!1;var t=e(o.popup.contentSelector).html();e.mSetPopupFadeoutOptions(o.fadeOut);var n=e('<div class="m-popup-overlay"> </div>');return n.appendTo(document.body),n.css({left:0,top:0}).width(e(document).width()).height(e(document).height()),n.animate({opacity:o.overlay.opacity},o.fadeIn.overlayTime,function(){e("#m-popup").css({width:"auto",height:"auto"}).html(t).addClass(o.popup.containerClass).css("top",(e(window).height()-e("#m-popup").outerHeight())/2-o.popup.top+e(window).scrollTop()+"px").css("left",(e(window).width()-e("#m-popup").outerWidth())/2+e(window).scrollLeft()+"px");e("#m-popup").height();e("#m-popup").show().height(0),e("#m-popup").hide().css({height:"auto"});var n={left:e("#m-popup").css("left"),top:e("#m-popup").css("top"),width:e("#m-popup").width()+"px",height:e("#m-popup").height()+"px"};e("#m-popup").children().each(function(){e(this).css({width:e("#m-popup").width()+e(this).width()-e(this).outerWidth()+"px",height:e("#m-popup").height()+e(this).height()-e(this).outerHeight()+"px"})}),e("#m-popup").css({top:e(window).height()/2-o.popup.top+e(window).scrollTop()+"px",left:e(window).width()/2+e(window).scrollLeft()+"px",width:"0px",height:"0px"}).show(),e("#m-popup").animate(n,o.fadeIn.popupTime,function(){o.fadeIn.callback&&o.fadeIn.callback()})}),!1})}});var i=!1;e.mPopupClosing=function(e){return void 0!==e&&(i=e),i},e.mClosePopup=function(){return e.mPopupClosing(!0),e(".m-popup-overlay").fadeOut(o.overlayTime,function(){e(".m-popup-overlay").remove(),e("#m-popup").fadeOut(o.popupTime,function(){o.callback&&o.callback(),e.mPopupClosing(!1)})}),!1}}(jQuery);
|
1 |
+
/**
|
2 |
+
* @category Mana
|
3 |
+
* @package Mana_Core
|
4 |
+
* @copyright Copyright (c) http://www.manadev.com
|
5 |
+
* @license http://www.manadev.com/license Proprietary License
|
6 |
+
*/
|
7 |
+
var Mana=Mana||{};!function(e,t,n){e.extend(Mana,{_singletons:{},_defines:{jquery:e,prototype:t},define:function(e,t,n){var o=Mana._resolveDependencyNames(t);return Mana._define(e,o.names,function(){return n.apply(this,Mana._resolveDependencies(arguments,o.deps))})},require:function(e,t){var n=Mana._resolveDependencyNames(e);return Mana._define(null,n.names,function(){return t.apply(this,Mana._resolveDependencies(arguments,n.deps))})},_define:function(t,n,o){var i=[];e.each(n,function(e,t){i.push(Mana._resolveDefine(t))});var r=o.apply(this,i);return t&&(Mana._defines[t]=r),r},_resolveDefine:function(e){return Mana._defines[e]===n&&console.warn("'"+e+"' is not defined"),Mana._defines[e]},requireOptional:function(e,t){var n=Mana._resolveDependencyNames(e);return Mana._define(null,n.names,function(){return t.apply(this,Mana._resolveDependencies(arguments,n.deps))})},_resolveDependencyNames:function(t){var n=[],o=[];return e.each(t,function(e,t){var i=t.indexOf(":"),r={name:t,resolver:""};-1!=i&&(r={name:t.substr(i+1),resolver:t.substr(0,i)}),Mana._resolveDependencyName(r),n.push(r.name),o.push(r)}),{names:n,deps:o}},_resolveDependencies:function(t,n){return e.each(t,function(e,o){t[e]=Mana._resolveDependency(n[e],o)}),t},_resolveDependencyName:function(){},_resolveDependency:function(e,t){if(t!==n)switch(e.resolver){case"singleton":return Mana._singletons[e.name]===n&&(Mana._singletons[e.name]=new t),Mana._singletons[e.name]}return t}})}(jQuery,$);var m_object_initializing=!1;!function(undefined){var fnTest=/xyz/.test(function(){})?/\b_super\b/:/.*/;Mana.Object=function(){},Mana.Object.extend=function(className,prop){prop===undefined&&(prop=className,className=undefined);var _super=this.prototype;m_object_initializing=!0;var prototype=new this;m_object_initializing=!1;for(var name in prop)prototype[name]="function"==typeof prop[name]&&"function"==typeof _super[name]&&fnTest.test(prop[name])?function(e,t){return function(){var n=this._super;this._super=_super[e];var o=t.apply(this,arguments);return this._super=n,o}}(name,prop[name]):prop[name];var Object;return className===undefined?Object=function(){!m_object_initializing&&this._init&&this._init.apply(this,arguments)}:eval("Object = function "+className.replace(/\//g,"_")+"() { if (!m_object_initializing && this._init) this._init.apply(this, arguments); };"),Object.prototype=prototype,Object.prototype.constructor=Object,Object.extend=arguments.callee,Object}}(),Mana.define("Mana/Core",["jquery"],function(e){return Mana.Object.extend("Mana/Core",{getClasses:function(e){return e.className&&e.className.split?e.className.split(/\s+/):[]},getPrefixedClass:function(t,n){var o="";return e.each(this.getClasses(t),function(e,t){return 0==t.indexOf(n)?(o=t.substr(n.length),!1):void 0}),o},arrayRemove:function(e,t,n){var o=e.slice((n||t)+1||e.length);return e.length=0>t?e.length+t:t,e.push.apply(e,o)},getBlockAlias:function(e,t){var n;return 0===(n=t.indexOf(e+"-"))?t.substr((e+"-").length):t},count:function(t){var n=0;return e.each(t,function(){n++}),n},isFunction:function(e){return!!(e&&e.constructor&&e.call&&e.apply)},isString:function(e){return"[object String]"==Object.prototype.toString.call(e)}})}),Mana.define("Mana/Core/Config",["jquery"],function(e){return Mana.Object.extend("Mana/Core/Config",{_init:function(){this._data={debug:!1,showOverlay:!0,showWait:!0}},getData:function(e){return this._data[e]},setData:function(e,t){return this._data[e]=t,this},set:function(t){return e.extend(this._data,t),this},getBaseUrl:function(e){return 0==e.indexOf(this.getData("url.base"))?this.getData("url.base"):this.getData("url.secureBase")}})}),Mana.define("Mana/Core/Json",["jquery","singleton:Mana/Core"],function(e,t){return Mana.Object.extend("Mana/Core/Json",{parse:function(t){return e.parseJSON(t)},stringify:function(e){return Object.toJSON(e)},decodeAttribute:function(n){if(t.isString(n)){var o=n.split('"'),i=[];e.each(o,function(e,t){i.push(t.replace(/'/g,'"'))});var r=i.join("'");return this.parse(r)}return n}})}),Mana.define("Mana/Core/Utf8",[],function(){return Mana.Object.extend("Mana/Core/Utf8",{decode:function(e){var t=[],n=0,o=0,i=0,r=0,a=0;for(e+="";n<e.length;)i=e.charCodeAt(n),128>i?(t[o++]=String.fromCharCode(i),n++):i>191&&224>i?(r=e.charCodeAt(n+1),t[o++]=String.fromCharCode((31&i)<<6|63&r),n+=2):(r=e.charCodeAt(n+1),a=e.charCodeAt(n+2),t[o++]=String.fromCharCode((15&i)<<12|(63&r)<<6|63&a),n+=3);return t.join("")}})}),Mana.define("Mana/Core/Base64",["singleton:Mana/Core/Utf8"],function(e){return Mana.Object.extend("Mana/Core/Base64",{encode:function(e){for(var t,n,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i="",r=e.length,a=0;r-->0;){if(t=e.charCodeAt(a++),i+=o.charAt(t>>2&63),r--<=0){i+=o.charAt(t<<4&63),i+="==";break}if(n=e.charCodeAt(a++),i+=o.charAt(63&(t<<4|n>>4&15)),r--<=0){i+=o.charAt(n<<2&63),i+="=";break}t=e.charCodeAt(a++),i+=o.charAt(63&(n<<2|t>>6&3)),i+=o.charAt(63&t)}return i},decode:function(t){var n,o,i,r,a,c,s,u,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",d=0,h=0,p="",f=[];if(!t)return t;t+="";do r=l.indexOf(t.charAt(d++)),a=l.indexOf(t.charAt(d++)),c=l.indexOf(t.charAt(d++)),s=l.indexOf(t.charAt(d++)),u=r<<18|a<<12|c<<6|s,n=u>>16&255,o=u>>8&255,i=255&u,f[h++]=64==c?String.fromCharCode(n):64==s?String.fromCharCode(n,o):String.fromCharCode(n,o,i);while(d<t.length);return p=f.join(""),p=e.decode(p)}})}),Mana.define("Mana/Core/UrlTemplate",["singleton:Mana/Core/Base64","singleton:Mana/Core/Config"],function(e,t){return Mana.Object.extend("Mana/Core/UrlTemplate",{decodeAttribute:function(n){return t.getData("debug")?n:e.decode(n.replace(/-/g,"+").replace(/_/g,"/").replace(/,/g,"="))},encodeAttribute:function(t){return e.encode(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,",")}})}),Mana.define("Mana/Core/StringTemplate",["jquery"],function(e,t){return Mana.Object.extend("Mana/Core/StringTemplate",{concat:function(n,o){var i="";return e.each(n,function(e,n){var r=n[0],a=n[1];"string"==r?i+=a:"var"==r&&(i+=o[a]!==t?o[a]:"{{"+a+"}}")}),i}})}),Mana.define("Mana/Core/Layout",["jquery","singleton:Mana/Core"],function(e,t,n){return Mana.Object.extend("Mana/Core/Layout",{_init:function(){this._pageBlock=null},getPageBlock:function(){return this._pageBlock},getBlock:function(e){return this._getBlockRecursively(this.getPageBlock(),e)},getBlockForElement:function(e){var t=this._getElementBlockInfo(e);return t?this.getBlock(t.id):null},_getBlockRecursively:function(t,n){if(t.getId()==n)return t;var o=this,i=null;return e.each(t.getChildren(),function(e,t){return i=o._getBlockRecursively(t,n),i?!1:!0}),i},beginGeneratingBlocks:function(e){var t={parentBlock:e,namedBlocks:{}};return e&&(e.trigger("unload",{},!1,!0),e.trigger("unbind",{},!1,!0),t.namedBlocks=this._removeAnonymousBlocks(e)),t},endGeneratingBlocks:function(t){var o=t.parentBlock,i=t.namedBlocks,r=this;this._collectBlockTypes(o?o.getElement():document,function(t){if(!r._pageBlock){var a=document.body,c=e(a),s=c.attr("data-m-block"),u=s?t[s]:t["Mana/Core/PageBlock"];r._pageBlock=(new u).setElement(e("body")[0]).setId("page")}var l=o===n;l&&(o=r.getPageBlock()),r._generateBlocksInElement(o.getElement(),o,t,i),e.each(i,function(e,t){t.parent.removeChild(t.child)}),o.trigger("bind",{},!1,!0),o.trigger("load",{},!1,!0)})},_collectBlockTypes:function(t,n){var o=["Mana/Core/PageBlock"];this._collectBlockTypesInElement(t,o),Mana.requireOptional(o,function(){var t=arguments,i={};e.each(o,function(e,n){i[n]=t[e]}),n(i)})},_collectBlockTypesInElement:function(t,n){var o=this;e(t).children().each(function(){var e=o._getElementBlockInfo(this);e&&-1==n.indexOf(e.typeName)&&n.push(e.typeName),o._collectBlockTypesInElement(this,n)})},_removeAnonymousBlocks:function(t){var n=this,o={};return e.each(t.getChildren().slice(0),function(e,i){i.getId()?(o[i.getId()]={parent:t,child:i},n._removeAnonymousBlocks(i)):t.removeChild(i)}),o},_getElementBlockInfo:function(n){var o,i,r=e(n);return(o=t.getPrefixedClass(n,"mb-"))||(i=r.attr("data-m-block"))||r.hasClass("m-block")?{id:o||n.id,typeName:i||r.attr("data-m-block")||"Mana/Core/Block"}:null},_generateBlocksInElement:function(t,n,o,i){var r=this;e(t).children().each(function(){var e=r._createBlockFromElement(this,n,o,i);r._generateBlocksInElement(this,e||n,o,i)})},_createBlockFromElement:function(e,n,o,i){var r=this._getElementBlockInfo(e);if(r){var a,c=o[r.typeName],s=!1;return r.id?(a=n.getChild(t.getBlockAlias(n.getId(),r.id)),a?(s=!0,delete i[r.id]):c?a=new c:console.error("Block '"+r.typeName+"' is not defined"),a&&a.setId(r.id)):c?a=new c:console.error("Block '"+r.typeName+"' is not defined"),a?(a.setElement(e),s||n.addChild(a),a):null}return null},preparePopup:function(o){if(o=this._preparePopupOptions(o),o.$popup===n){var i=e("#m-popup");i.css({width:"auto",height:"auto"}),t.isString(o.content)?i.html(o.content):i.html(e(o.content).html()),o.popup["class"]&&i.addClass(o.popup["class"]),o.$popup=i}return o.$popup},_preparePopupOptions:function(e){return e.overlay===n&&(e.overlay={}),e.overlay.opacity===n&&(e.overlay.opacity=.2),e.popup===n&&(e.popup={}),e.popup.blockName===n&&(e.popup.blockName="Mana/Core/PopupBlock"),e.popupBlock===n&&(e.popupBlock={}),e.fadein===n&&(e.fadein={}),e.fadein.overlayTime===n&&(e.fadein.overlayTime=0),e.fadein.popupTime===n&&(e.fadein.popupTime=300),e.fadeout===n&&(e.fadeout={}),e.fadeout.overlayTime===n&&(e.fadeout.overlayTime=0),e.fadeout.popupTime===n&&(e.fadeout.popupTime=500),e},showPopup:function(t){t=this._preparePopupOptions(t);var n=this;Mana.requireOptional([t.popup.blockName],function(o){var i=t.fadeout.callback;t.fadeout.callback=function(){e("#m-popup").fadeOut(t.fadeout.popupTime,function(){i&&i()})};var r=n.getPageBlock().showOverlay("m-popup-overlay",t.fadeout),a=n.preparePopup(t);r.animate({opacity:t.overlay.opacity},t.fadein.overlayTime,function(){a.show();var i=new o;i.setElement(a[0]);var r=n.beginGeneratingBlocks(i);n.endGeneratingBlocks(r),i.prepare&&i.prepare(t.popupBlock),e(".m-popup-overlay").on("click",function(){return n.hidePopup(),!1}),n._popupEscListenerInitialized||(n._popupEscListenerInitialized=!0,e(document).keydown(function(t){return e(".m-popup-overlay").length&&27==t.keyCode?(n.hidePopup(),!1):!0})),a.css("top",(e(window).height()-a.outerHeight())/2+e(window).scrollTop()+"px").css("left",(e(window).width()-a.outerWidth())/2+e(window).scrollLeft()+"px");a.height();a.hide().css({height:"auto"});var c={left:a.css("left"),top:a.css("top"),width:a.width()+"px",height:a.height()+"px"};a.children().each(function(){e(this).css({width:a.width()+e(this).width()-e(this).outerWidth()+"px",height:a.height()+e(this).height()-e(this).outerHeight()+"px"})}),a.css({top:e(window).height()/2+e(window).scrollTop()+"px",left:e(window).width()/2+e(window).scrollLeft()+"px",width:"0px",height:"0px"}).show(),a.animate(c,t.fadein.popupTime,t.fadein.callback)})})},hidePopup:function(){this.getPageBlock().hideOverlay()}})}),Mana.define("Mana/Core/Ajax",["jquery","singleton:Mana/Core/Layout","singleton:Mana/Core/Json","singleton:Mana/Core","singleton:Mana/Core/Config"],function(e,t,n,o,i,r){return Mana.Object.extend("Mana/Core/Ajax",{_init:function(){this._interceptors=[],this._matchedInterceptorCache={},this._lastAjaxActionSource=r,this._oldSetLocation=r,this._preventClicks=0},_encodeUrl:function(e,t){return t.encode?t.encode.offset!==r?t.encode.length===r?0===t.encode.offset?window.encodeURI(e.substr(t.encode.offset)):e.substr(0,t.encode.offset)+window.encodeURI(e.substr(t.encode.offset)):0===t.encode.length?e:0===t.encode.offset?window.encodeURI(e.substr(t.encode.offset,t.encode.length))+e.substr(t.encode.offset+t.encode.length):e.substr(0,t.encode.offset)+window.encodeURI(e.substr(t.encode.offset,t.encode.length))+e.substr(t.encode.offset+t.encode.length):e:window.encodeURI(e)},get:function(t,n,o){var i=this;o=this._before(o,t),e.get(this._encodeUrl(t,o)).done(function(e){i._done(e,n,o,t)}).fail(function(e){i._fail(e,o,t)}).complete(function(){i._complete(o,t)})},post:function(t,n,o,i){var a=this;n===r&&(n=[]),o===r&&(o=function(){}),i=this._before(i,t,n),e.post(window.encodeURI(t),n).done(function(e){a._done(e,o,i,t,n)}).fail(function(e){a._fail(e,i,t,n)}).complete(function(){a._complete(i,t,n)})},update:function(n){n.updates&&e.each(n.updates,function(t,n){e(t).html(n)}),n.config&&i.set(n.config),n.blocks&&e.each(n.blocks,function(e,o){var i=t.getBlock(e);i&&i.setContent(n.sections[o])}),n.script&&e.globalEval(n.script),n.title&&(document.title=n.title.replace(/&/g,"&"))},getSectionSeparator:function(){return"\n91b5970cd70e2353d866806f8003c1cd56646961\n"},_before:function(n,o){var i=t.getPageBlock();return n=e.extend({showOverlay:i.getShowOverlay(),showWait:i.getShowWait(),showDebugMessages:i.getShowDebugMessages()},n),n.showOverlay&&i.showOverlay(),n.showWait&&i.showWait(),n.preventClicks&&this._preventClicks++,e(document).trigger("m-ajax-before",[[],o,"",n]),n},_done:function(e,o,i,r,a){var c=t.getPageBlock();i.showOverlay&&c.hideOverlay(),i.showWait&&c.hideWait();try{var s=e;try{var u=e.split(this.getSectionSeparator());e=u.shift(),e=n.parse(e),e.sections=u}catch(l){return o(s,{url:r}),void 0}e?e.error&&!e.customErrorDisplay?i.showDebugMessages&&alert(e.message||e.error):o(e,{url:r,data:a}):i.showDebugMessages&&alert("No response.")}catch(d){if(i.showDebugMessages){var h="";"string"==typeof d?h+=d:(h+=d.message,d.fileName&&(h+="\n in "+d.fileName+" ("+d.lineNumber+")")),e&&(h+="\n\n",h+="string"==typeof e?e:n.stringify(e)),alert(h)}}},_fail:function(e,n){var o=t.getPageBlock();n.showOverlay&&o.hideOverlay(),n.showWait&&o.hideWait(),n.showDebugMessages&&e.status>0&&alert(e.status+(e.responseText?": "+e.responseText:""))},_complete:function(t,n){t.preventClicks&&this._preventClicks--,e(document).trigger("m-ajax-after",[[],n,"",t])},addInterceptor:function(e){this._interceptors.push(e)},removeInterceptor:function(e){var t=this._interceptors.indexOf(e);-1!=t&&this._interceptors.splice(t,1)},startIntercepting:function(){var t=this;window.History&&window.History.enabled&&e(window).on("statechange",t._onStateChange=function(){var e=window.History.getState(),n=e.url;t._findMatchingInterceptor(n,t._lastAjaxActionSource)?t._internalCallInterceptionCallback(n,t._lastAjaxActionSource):t._oldSetLocation(n,t._lastAjaxActionSource)}),window.setLocation&&(this._oldSetLocation=window.setLocation,window.setLocation=function(e,n){t._callInterceptionCallback(e,n)}),e(document).on("click","a",t._onClick=function(){var e=this.href;return t._preventClicks&&e==location.href+"#"?!1:t._findMatchingInterceptor(e,this)?t._callInterceptionCallback(e,this):!0})},stopIntercepting:function(){window.History&&window.History.enabled&&(e(window).off("statechange",self._onStateChange),self._onStateChange=null),e(document).off("click","a",self._onClick),self._onClick=null},_internalCallInterceptionCallback:function(e,t){var n=this._findMatchingInterceptor(e,t);return n?(this.lastUrl=e,n.intercept(e,t),!1):!0},_callInterceptionCallback:function(e,t){return this._findMatchingInterceptor(e,t)?(this._lastAjaxActionSource=t,window.History&&window.History.enabled?window.History.pushState(null,window.title,e):this._internalCallInterceptionCallback(e,t)):this._oldSetLocation(e,t),!1},_findMatchingInterceptor:function(t,n){if(this._matchedInterceptorCache[t]===r){var o=!1;i.getData("ajax.enabled")&&e.each(this._interceptors,function(e,i){return i.match(t,n)?(o=i,!1):!0}),this._matchedInterceptorCache[t]=o}return this._matchedInterceptorCache[t]},getDocumentUrl:function(){return this.lastUrl?this.lastUrl:document.URL}})}),Mana.define("Mana/Core/Block",["jquery","singleton:Mana/Core","singleton:Mana/Core/Layout","singleton:Mana/Core/Json"],function(e,t,n,o,i){return Mana.Object.extend("Mana/Core/Block",{_init:function(){this._id="",this._element=null,this._parent=null,this._children=[],this._namedChildren={},this._isSelfContained=!1,this._eventHandlers={},this._data={},this._text={},this._subscribeToHtmlEvents()._subscribeToBlockEvents()},_subscribeToHtmlEvents:function(){return this._json={},this},_subscribeToBlockEvents:function(){return this},getElement:function(){return this._element},$:function(){return e(this.getElement())},setElement:function(e){return this._element=e,this},addChild:function(e){return this._children.push(e),e.getId()&&(this._namedChildren[t.getBlockAlias(this.getId(),e.getId())]=e),e._parent=this,this},removeChild:function(n){var o=e.inArray(n,this._children);return-1!=o&&(t.arrayRemove(this._children,o),n.getId()&&delete this._namedChildren[t.getBlockAlias(this.getId(),n.getId())]),n._parent=null,this},getIsSelfContained:function(){return this._isSelfContained},setIsSelfContained:function(e){return this._isSelfContained=e,this},getId:function(){return this._id||this.getElement().id},setId:function(e){return this._id=e,this},getParent:function(){return this._parent},getChild:function(n){if(t.isFunction(n)){var o=null;return e.each(this._children,function(e,t){return n(e,t)?(o=t,!1):!0}),o}return this._namedChildren[n]},getChildren:function(t){if(t===i)return this._children.slice(0);var n=[];return e.each(this._children,function(e,o){t(e,o)&&n.push(o)}),n},getAlias:function(){var t=i,n=this;return e.each(this._parent._namedChildren,function(e,o){return o===n?(t=e,!1):!0}),t},_trigger:function(t,n){return n.stopped||this._eventHandlers[t]===i||e.each(this._eventHandlers[t],function(e,t){var o=t.callback.call(t.target,n);return o===!1&&(n.stopped=!0),o}),n.result},trigger:function(t,n,o,r){return n===i&&(n={}),n.target===i&&(n.target=this),r===i&&(r=!1),o===i&&(o=!0),this._trigger(t,n),r&&e.each(this.getChildren(),function(e,o){o.trigger(t,n,!1,r)}),o&&this.getParent()&&this.getParent().trigger(t,n,o,!1),n.result},on:function(e,t,n,o){return this._eventHandlers[e]===i&&(this._eventHandlers[e]=[]),o===i&&(o=0),this._eventHandlers[e].push({target:t,callback:n,sortOrder:o}),this._eventHandlers[e].sort(function(e,t){return e.sortOrder<t.sortOrder?-1:e.sortOrder>t.sortOrder?1:0}),this},off:function(n,o,r){this._eventHandlers[n]===i&&(this._eventHandlers[n]=[]);var a=-1;e.each(this._eventHandlers[n],function(e,t){return t.target==o&&t.callback==r?(a=e,!1):!0}),-1!=a&&t.arrayRemove(this._eventHandlers[n],a)},setContent:function(t){if("string"!=e.type(t)){if(!(t.content&&this.getId()&&t.content[this.getId()]))return this;t=t.content[this.getId()]}var o=n.beginGeneratingBlocks(this);return t=e(t),e(this.getElement()).replaceWith(t),this.setElement(t[0]),n.endGeneratingBlocks(o),this},getData:function(e){return this._data[e]},setData:function(e,t){return this._data[e]=t,this},getText:function(e){return this._text[e]===i&&(this._text[e]=this.$().data(e+"-text")),this._text[e]},getJsonData:function(e,t){return this._json[e]===i&&(this._json[e]=o.decodeAttribute(this.$().data(e))),t===i?this._json[e]:this._json[e][t]}})}),Mana.define("Mana/Core/PopupBlock",["jquery","Mana/Core/Block","singleton:Mana/Core/Layout"],function(e,t,n){return t.extend("Mana/Core/PopupBlock",{prepare:function(e){var t=this;this._host=e.host,this.$().find(".btn-close").on("click",function(){return t._close()})},_close:function(){return n.hidePopup(),!1}})}),Mana.define("Mana/Core/PageBlock",["jquery","Mana/Core/Block","singleton:Mana/Core/Config"],function(e,t,n){return t.extend("Mana/Core/PageBlock",{_init:function(){this._defaultOverlayFadeout={overlayTime:0,popupTime:0,callback:null},this._overlayFadeout=this._defaultOverlayFadeout,this._super()},_subscribeToHtmlEvents:function(){function t(){o||(o=!0,n.resize(),o=!1)}var n=this,o=!1;return this._super().on("bind",this,function(){e(window).on("load",t),e(window).on("resize",t)}).on("unbind",this,function(){e(window).off("load",t),e(window).off("resize",t)})},_subscribeToBlockEvents:function(){return this._super().on("load",this,function(){this.resize()})},resize:function(){this.trigger("resize",{},!1,!0)},showOverlay:function(t,n){this._overlayFadeout=n||this._defaultOverlayFadeout;var o=t?e('<div class="m-overlay '+t+'"></div>'):e('<div class="m-overlay"></div>');return o.appendTo(this.getElement()),o.css({left:0,top:0}).width(e(document).width()).height(e(document).height()),o},hideOverlay:function(){var t=this;return e(".m-overlay").fadeOut(this._overlayFadeout.overlayTime,function(){e(".m-overlay").remove(),t._overlayFadeout.callback&&t._overlayFadeout.callback(),t._overlayFadeout=t._defaultOverlayFadeout}),this},showWait:function(){return e("#m-wait").show(),this},hideWait:function(){return e("#m-wait").hide(),this},getShowDebugMessages:function(){return n.getData("debug")},getShowOverlay:function(){return n.getData("showOverlay")},getShowWait:function(){return n.getData("showWait")}})}),Mana.require(["jquery","singleton:Mana/Core/Layout","singleton:Mana/Core/Ajax"],function(e,t,n){function o(){var e=t.beginGeneratingBlocks();t.endGeneratingBlocks(e)}e(function(){o(),n.startIntercepting()})}),Mana.require(["jquery"],function(e){var t={xsmall:479,small:599,medium:770,large:979,xlarge:1199};Mana.rwdIsMobile=!1,e(function(){window.enquire&&window.enquire.register&&enquire.register("screen and (max-width: "+t.medium+"px)",{match:function(){Mana.rwdIsMobile=!0,e(document).trigger("m-rwd-mobile")},unmatch:function(){Mana.rwdIsMobile=!1,e(document).trigger("m-rwd-wide")}})})}),function(e){var t={},n={};e.__=function(n){if("string"==typeof n){var o=arguments;return o[0]=t[n]?t[n]:n,e.vsprintf(o)}t=e.extend(t,n)},e.options=function(t){return"string"==typeof t?n[t]:(n=e.extend(!0,n,t),e(document).trigger("m-options-changed"),void 0)},e.dynamicUpdate=function(t){t&&e.each(t,function(t,n){e(n.selector).html(n.html)})},e.dynamicReplace=function(t,n,o){t&&e.each(t,function(t,i){var r=e(t);if(r.length){var a=e(r[0]);r.length>1&&r.slice(1).remove(),a.replaceWith(o?e.utf8_decode(i):i)}else if(n)throw"There is no content to replace."})},e.errorUpdate=function(t,n){t||(t="#messages");var o=e(t);o.length?o.html('<ul class="messages"><li class="error-msg"><ul><li>'+n+"</li></ul></li></ul>"):alert(n)},e.arrayRemove=function(e,t,n){var o=e.slice((n||t)+1||e.length);return e.length=0>t?e.length+t:t,e.push.apply(e,o)},e.mViewport=function(){var e="CSS1Compat"==document.compatMode;return{l:window.pageXOffset||(e?document.documentElement.scrollLeft:document.body.scrollLeft),t:window.pageYOffset||(e?document.documentElement.scrollTop:document.body.scrollTop),w:window.innerWidth||(e?document.documentElement.clientWidth:document.body.clientWidth),h:window.innerHeight||(e?document.documentElement.clientHeight:document.body.clientHeight)}},e.mStickTo=function(t,n){var o=e(t).offset(),i=e.mViewport(),r=o.top+t.offsetHeight,a=o.left+(t.offsetWidth-n.outerWidth())/2;r+n.outerHeight()>i.t+i.h&&(r=o.top-n.outerHeight()),a+n.outerWidth()>i.l+i.w&&(a=o.left+t.offsetWidth-n.outerWidth()),n.css({left:a+"px",top:r+"px"})},e.fn.mMarkAttr=function(e,t){return this.prop(e,t),this},e(function(){try{window.mainNav&&window.mainNav("nav",{show_delay:"100",hide_delay:"100"})}catch(e){}}),e.base64_decode=function(t){var n,o,i,r,a,c,s,u,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",d=0,h=0,p="",f=[];if(!t)return t;t+="";do r=l.indexOf(t.charAt(d++)),a=l.indexOf(t.charAt(d++)),c=l.indexOf(t.charAt(d++)),s=l.indexOf(t.charAt(d++)),u=r<<18|a<<12|c<<6|s,n=u>>16&255,o=u>>8&255,i=255&u,f[h++]=64==c?String.fromCharCode(n):64==s?String.fromCharCode(n,o):String.fromCharCode(n,o,i);while(d<t.length);return p=f.join(""),p=e.utf8_decode(p)},e.utf8_decode=function(e){var t=[],n=0,o=0,i=0,r=0,a=0;for(e+="";n<e.length;)i=e.charCodeAt(n),128>i?(t[o++]=String.fromCharCode(i),n++):i>191&&224>i?(r=e.charCodeAt(n+1),t[o++]=String.fromCharCode((31&i)<<6|63&r),n+=2):(r=e.charCodeAt(n+1),a=e.charCodeAt(n+2),t[o++]=String.fromCharCode((15&i)<<12|(63&r)<<6|63&a),n+=3);return t.join("")};var o={overlayTime:500,popupTime:1e3,callback:null};e.mSetPopupFadeoutOptions=function(e){o=e},e.fn.extend({mPopup:function(t,n){var o=e.extend({fadeOut:{overlayTime:0,popupTime:500,callback:null},fadeIn:{overlayTime:0,popupTime:500,callback:null},overlay:{opacity:.2},popup:{contentSelector:"."+t+"-text",containerClass:"m-"+t+"-popup-container",top:100}},n);e(document).on("click",this,function(){if(e.mPopupClosing())return!1;var t=e(o.popup.contentSelector).html();e.mSetPopupFadeoutOptions(o.fadeOut);var n=e('<div class="m-popup-overlay"> </div>');return n.appendTo(document.body),n.css({left:0,top:0}).width(e(document).width()).height(e(document).height()),n.animate({opacity:o.overlay.opacity},o.fadeIn.overlayTime,function(){e("#m-popup").css({width:"auto",height:"auto"}).html(t).addClass(o.popup.containerClass).css("top",(e(window).height()-e("#m-popup").outerHeight())/2-o.popup.top+e(window).scrollTop()+"px").css("left",(e(window).width()-e("#m-popup").outerWidth())/2+e(window).scrollLeft()+"px");e("#m-popup").height();e("#m-popup").show().height(0),e("#m-popup").hide().css({height:"auto"});var n={left:e("#m-popup").css("left"),top:e("#m-popup").css("top"),width:e("#m-popup").width()+"px",height:e("#m-popup").height()+"px"};e("#m-popup").children().each(function(){e(this).css({width:e("#m-popup").width()+e(this).width()-e(this).outerWidth()+"px",height:e("#m-popup").height()+e(this).height()-e(this).outerHeight()+"px"})}),e("#m-popup").css({top:e(window).height()/2-o.popup.top+e(window).scrollTop()+"px",left:e(window).width()/2+e(window).scrollLeft()+"px",width:"0px",height:"0px"}).show(),e("#m-popup").animate(n,o.fadeIn.popupTime,function(){o.fadeIn.callback&&o.fadeIn.callback()})}),!1})}});var i=!1;e.mPopupClosing=function(e){return void 0!==e&&(i=e),i},e.mClosePopup=function(){return e.mPopupClosing(!0),e(".m-popup-overlay").fadeOut(o.overlayTime,function(){e(".m-popup-overlay").remove(),e("#m-popup").fadeOut(o.popupTime,function(){o.callback&&o.callback(),e.mPopupClosing(!1)})}),!1}}(jQuery);
|
js/src/Mana/Core/Ajax.js
CHANGED
@@ -73,6 +73,9 @@ function ($, layout, json, core, config, undefined)
|
|
73 |
$(selector).html(html);
|
74 |
});
|
75 |
}
|
|
|
|
|
|
|
76 |
if (response.blocks) {
|
77 |
$.each(response.blocks, function (blockName, sectionIndex) {
|
78 |
var block = layout.getBlock(blockName);
|
@@ -81,9 +84,6 @@ function ($, layout, json, core, config, undefined)
|
|
81 |
}
|
82 |
});
|
83 |
}
|
84 |
-
if (response.config) {
|
85 |
-
config.set(response.config);
|
86 |
-
}
|
87 |
if (response.script) {
|
88 |
$.globalEval(response.script);
|
89 |
}
|
@@ -176,7 +176,8 @@ function ($, layout, json, core, config, undefined)
|
|
176 |
if (options.showWait) {
|
177 |
page.hideWait();
|
178 |
}
|
179 |
-
|
|
|
180 |
alert(error.status + (error.responseText ? ': ' + error.responseText : ''));
|
181 |
}
|
182 |
},
|
73 |
$(selector).html(html);
|
74 |
});
|
75 |
}
|
76 |
+
if (response.config) {
|
77 |
+
config.set(response.config);
|
78 |
+
}
|
79 |
if (response.blocks) {
|
80 |
$.each(response.blocks, function (blockName, sectionIndex) {
|
81 |
var block = layout.getBlock(blockName);
|
84 |
}
|
85 |
});
|
86 |
}
|
|
|
|
|
|
|
87 |
if (response.script) {
|
88 |
$.globalEval(response.script);
|
89 |
}
|
176 |
if (options.showWait) {
|
177 |
page.hideWait();
|
178 |
}
|
179 |
+
// When the request fails (let's say no internet), the status is `0` and no responseText. So, do not alert.
|
180 |
+
if (options.showDebugMessages && error.status > 0) {
|
181 |
alert(error.status + (error.responseText ? ': ' + error.responseText : ''));
|
182 |
}
|
183 |
},
|
js/src/Mana/Core/obsolete.js
CHANGED
@@ -103,12 +103,13 @@
|
|
103 |
}
|
104 |
|
105 |
$.fn.mMarkAttr = function (attr, condition) {
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
|
|
112 |
return this;
|
113 |
};
|
114 |
// the following function is executed when DOM ir ready. If not use this wrapper, code inside could fail if
|
@@ -242,7 +243,7 @@
|
|
242 |
popup: { contentSelector:'.' + name + '-text', containerClass:'m-' + name + '-popup-container', top:100 }
|
243 |
|
244 |
}, options);
|
245 |
-
$(
|
246 |
if ($.mPopupClosing()) {
|
247 |
return false;
|
248 |
}
|
103 |
}
|
104 |
|
105 |
$.fn.mMarkAttr = function (attr, condition) {
|
106 |
+
this.prop(attr, condition);
|
107 |
+
//if (condition) {
|
108 |
+
// this.attr(attr, attr);
|
109 |
+
//}
|
110 |
+
//else {
|
111 |
+
// this.removeAttr(attr);
|
112 |
+
//}
|
113 |
return this;
|
114 |
};
|
115 |
// the following function is executed when DOM ir ready. If not use this wrapper, code inside could fail if
|
243 |
popup: { contentSelector:'.' + name + '-text', containerClass:'m-' + name + '-popup-container', top:100 }
|
244 |
|
245 |
}, options);
|
246 |
+
$(document).on('click', this, function () {
|
247 |
if ($.mPopupClosing()) {
|
248 |
return false;
|
249 |
}
|
js/src/Mana/Core/rwd.js
CHANGED
@@ -8,7 +8,7 @@ Mana.require(['jquery'], function($) {
|
|
8 |
};
|
9 |
Mana.rwdIsMobile = false;
|
10 |
$(function() {
|
11 |
-
if (window.enquire) {
|
12 |
enquire.register('screen and (max-width: ' + bp.medium + 'px)', {
|
13 |
match: function () {
|
14 |
Mana.rwdIsMobile = true;
|
8 |
};
|
9 |
Mana.rwdIsMobile = false;
|
10 |
$(function() {
|
11 |
+
if (window.enquire && window.enquire.register) {
|
12 |
enquire.register('screen and (max-width: ' + bp.medium + 'px)', {
|
13 |
match: function () {
|
14 |
Mana.rwdIsMobile = true;
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Mana_Filters</name>
|
4 |
-
<version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL 3.0)</license>
|
7 |
<channel>community</channel>
|
@@ -9,10 +9,10 @@
|
|
9 |
<summary>Advanced layered navigation</summary>
|
10 |
<description>Add multiple selection features for attribute and price filters in Magento layered navigation</description>
|
11 |
<notes>Adds multiple selection features for attribute and price filters in Magento layered navigation.</notes>
|
12 |
-
<authors><author><name>Mana Team</name><user>
|
13 |
-
<date>
|
14 |
-
<time>
|
15 |
-
<contents><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="css"><file name="mana_core.css" hash="cdc7b84e7e3e73b182cf7ed02bbc76a8"/></dir><dir name="images"><dir name="mana_core"><file name="m-wait.gif" hash="1ae32bc8232ff2527c627e5b38eb319a"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="jquery"><file name="ui.css" hash="4ab351feeb25bfbcb84f61e722545525"/><dir name="images"><file name="animated-overlay.gif" hash="2b912f7c0653008ca28ebacda49025e7"/><file name="ui-bg_diagonals-thick_18_b81900_40x40.png" hash="95f9cceeb9d742dd3e917ec16ed754f8"/><file name="ui-bg_diagonals-thick_20_666666_40x40.png" hash="f040b255ca13e693da34ab33c7d6b554"/><file name="ui-bg_flat_0_aaaaaa_40x100.png" hash="2a44fbdb7360c60122bcf6dcef0387d8"/><file name="ui-bg_flat_10_000000_40x100.png" hash="c18cd01623c7fed23c80d53e2f5e7c78"/><file name="ui-bg_flat_75_ffffff_40x100.png" hash="8692e6efddf882acbff144c38ea7dfdf"/><file name="ui-bg_glass_55_fbf9ee_1x400.png" hash="f8f4558e0b92ff2cd6136781533902ec"/><file name="ui-bg_glass_65_ffffff_1x400.png" hash="e5a8f32e28fd5c27bf0fed33c8a8b9b5"/><file name="ui-bg_glass_75_dadada_1x400.png" hash="c12c6510dad3ebfa64c8a30e959a2469"/><file name="ui-bg_glass_75_e6e6e6_1x400.png" hash="f4254356c2a8c9a383205ef2c4de22c4"/><file name="ui-bg_glass_95_fef1ec_1x400.png" hash="5a3be2d8fff8324d59aec3df7b0a0c83"/><file name="ui-bg_glass_100_f6f6f6_1x400.png" hash="5f1847175ba18c41322cb9cb0581e0fb"/><file name="ui-bg_glass_100_fdf5ce_1x400.png" hash="d386adb3d23db4588a3271526a530f51"/><file name="ui-bg_gloss-wave_35_f6a828_500x100.png" hash="34c616d227cbdaefd8a81534d6ca7813"/><file name="ui-bg_highlight-soft_75_cccccc_1x100.png" hash="72c593d16e998952cd8d798fee33c6f3"/><file name="ui-bg_highlight-soft_75_ffe45c_1x100.png" hash="b806658954cb4d16ade8977af737f486"/><file name="ui-bg_highlight-soft_100_eeeeee_1x100.png" hash="384c3f17709ba0f809b023b6e7b10b84"/><file name="ui-icons_2e83ff_256x240.png" hash="25162bf857a8eb83ea932a58436e1049"/><file name="ui-icons_228ef1_256x240.png" hash="79f41c0765e9ec18562b20b0801d748b"/><file name="ui-icons_222222_256x240.png" hash="9129e086dc488d8bcaf808510bc646ba"/><file name="ui-icons_454545_256x240.png" hash="771099482bdc1571ece41073b1752596"/><file name="ui-icons_888888_256x240.png" hash="faf6f5dc44e713178784c1fb053990aa"/><file name="ui-icons_cd0a0a_256x240.png" hash="5d8808d43cefca6f6781a5316d176632"/><file name="ui-icons_ef8c08_256x240.png" hash="380c866362e1e42896f973ea92f67013"/><file name="ui-icons_ffd27a_256x240.png" hash="2a20f483ddcbc84e6469ce5bbd280699"/><file name="ui-icons_ffffff_256x240.png" hash="342bc03f6264c75d3f1d7f99e34295b9"/></dir></dir><file name="mana_core.css" hash="4b45e64cd88e3fcb70ccb3f1c4f39917"/><file name="mana_filters.css" hash="1d9769421d9cd76993bb033107363821"/></dir><dir name="images"><dir name="mana_core"><file name="m-wait.gif" hash="1ae32bc8232ff2527c627e5b38eb319a"/></dir></dir></dir></dir><dir name="rwd"><dir name="default"><dir name="css"><file name="mana_core.css" hash="c8533f81b029f25db3e3396cd75e779b"/><file name="mana_filters.css" hash="8b5cb1b1c480a051bed60ed64af2d790"/></dir><dir name="images"><dir name="mana_core"><file name="m-wait.gif" hash="79d9787b05ea3e0e5e1e7b23a357bca0"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="mana_core.xml" hash="cc0feb9124aa77e1f323b61cf504c204"/></dir><dir name="template"><dir name="mana"><dir name="core"><file name="js.phtml" hash="53a4035fe21537c0cd7fde286ed4a611"/><file name="popup.phtml" hash="e2823a07a8eefcad23f1ea416e95f84c"/><file name="require.phtml" hash="b85203a9ecf3808b5cdde85fcb03ec6e"/><file name="wait.phtml" hash="7c0ffe76e7b3aca2163d9ecc5145e81b"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="mana_core.xml" hash="67573b93ead87e30c31eedf5f39af2a2"/><file name="mana_filters.xml" hash="51005a99382d5450fbc6ea239bbbc7a2"/></dir><dir name="template"><dir name="mana"><dir name="core"><file name="js.phtml" hash="1aa41c842f1984142a864f667f99d33b"/><file name="popup.phtml" hash="e2823a07a8eefcad23f1ea416e95f84c"/><file name="require.phtml" hash="b85203a9ecf3808b5cdde85fcb03ec6e"/><file name="wait.phtml" hash="2fdb82f90c1aa8705fa76f500b967fef"/></dir><dir name="filters"><file name="cms.phtml" hash="b4c954289a496a8e79bddac6f89abbbe"/><file name="state.phtml" hash="9f49dcb0fa2e99652e02b9891d4ea7d8"/><dir name="items"><file name="list.phtml" hash="f5e0ac3cea381560e83d536433e303c7"/><file name="list_popup.phtml" hash="ff8d08726080a7eee21a85282d5294a4"/><file name="list_special.phtml" hash="2e930f38fbcd7b942d70adfb5307e305"/><file name="standard.phtml" hash="5c125504a6674f6eac8ea6ebd2c7ed1e"/><file name="standard_popup.phtml" hash="5318ff7766dce895a033ca0cea8a12d6"/></dir></dir></dir></dir></dir></dir><dir name="rwd"><dir name="default"><dir name="layout"><file name="mana_filters.xml" hash="5aa157d9c8f9cdb68c7d0c03c1e8a0f3"/></dir><dir name="template"><dir name="mana"><dir name="filters"><dir name="items"><file name="list.phtml" hash="1adf0a61f5a3a216939ae03daaae7080"/><file name="standard.phtml" hash="983c40cf9136b3b879d2d1a41bdccbf6"/></dir></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Mana_Core.csv" hash="264b6e6e44c593af6f79b93875091672"/><file name="Mana_Db.csv" hash="754c3b5f318886cb1eae04af5e841ada"/><file name="Mana_Filters.csv" hash="7a4c41f5f3d3a4f4389db3ba7cac53e4"/></dir></target><target name="mageweb"><dir name="js"><dir name="jquery"><file name="advListRotator.js" hash="6629920522d9fd8364469abe1ae705c9"/><file name="fileuploader.js" hash="164c23d4b94b5424c8e1c00057d45ce4"/><file name="froogaloop.js" hash="aefc485211db6c55726e13759063d312"/><file name="froogaloop.min.js" hash="d39fd09571c0cae46b8c35d75cffeb77"/><file name="history.adapter.jquery.js" hash="b930b14f725f7f882a06b834a486cc4c"/><file name="history.js" hash="89898d2f67eecb9f819588dcad2c8717"/><file name="jquery-ui.js" hash="6ac9f97eaab22d1a1f91572a20ef516b"/><file name="jquery-ui.min.js" hash="c1e83e4d225186ec057ea9eb18742dea"/><file name="jquery.easing.js" hash="cc674e02a06874bb5888ede6e0b1c977"/><file name="jquery.flexslider-min.js" hash="c236f33e84d73c1a873ec63cc25d7bd1"/><file name="jquery.js" hash="a581ffd88c93e2125e42f7ecb363739f"/><file name="jquery.min.js" hash="f8a9d24fe8df43991da1c0dd0dd9d1af"/><file name="jquery.noconflict.js" hash="0da09155d7323809b48494da0846bf34"/><file name="jquery.printf.js" hash="71e34de7c90b12d738ca6b912fef04da"/><file name="require.js" hash="a7afdceabeb04107653fdc7d274a00d1"/><file name="require.min.js" hash="215507e3b7eb905c61e436921c5736bd"/><dir name="validate"><file name="jquery.validate.js" hash="0bb7a2f5eea19acc7bb65f6c82ec15fb"/><dir name="localization"><file name="messages_ar.js" hash="a42cc9c91da7c4f6d2f48492dda14273"/><file name="messages_bg.js" hash="bc4ebf054b6a399abf518ef28bbad839"/><file name="messages_cn.js" hash="886e45b3ffd60a683ecc8e6ea644e519"/><file name="messages_cs.js" hash="6b794f90ab955c17fe02b6553876050c"/><file name="messages_da.js" hash="cc862df2998db2cc18c8276aa7bfe0f0"/><file name="messages_de.js" hash="70a9eb9abfc4365f36718b06b38f6725"/><file name="messages_el.js" hash="bd18b65d9f876e12997281e09d2a8bf3"/><file name="messages_es.js" hash="2f3a18c6d0377bc4658839a070853ed7"/><file name="messages_fa.js" hash="e32dd026bd9d2f626b7371bf025eb5c1"/><file name="messages_fi.js" hash="d8810a4f5b025594129f32957e521210"/><file name="messages_fr.js" hash="3081f76c1368d03d2e1a84a7ed9748e2"/><file name="messages_he.js" hash="028af705c2c07e946ce6de5e63223611"/><file name="messages_hu.js" hash="7612f6525fd5922f970d40b5929c88bb"/><file name="messages_it.js" hash="824964b0dcf1ea4904d18a125ff10b09"/><file name="messages_kk.js" hash="28c0dac0417ec5e0ec9271bfd11b7129"/><file name="messages_lt.js" hash="ef0a5dea6d4bfe7965ff9c719238f2b0"/><file name="messages_lv.js" hash="6d1d834333de4f018259481658d79e85"/><file name="messages_nl.js" hash="9f8aad8e3d769b0a636a02c672044232"/><file name="messages_no.js" hash="1a00dddbef393a2b8bc2e78934243566"/><file name="messages_pl.js" hash="28cea41b05ff80cc721b6896a2f658ba"/><file name="messages_ptbr.js" hash="194f1a4cbe9483dea4363400e046b923"/><file name="messages_ptpt.js" hash="3a9a7730cc461866e37f2cd8b0507f3a"/><file name="messages_ro.js" hash="eaf4c868e8fde6f5dee2f0a3ee0cbe12"/><file name="messages_ru.js" hash="e3d6e8809230c758b95438de4c783474"/><file name="messages_se.js" hash="b80035c9f1fdfba7c7f523838ec6510b"/><file name="messages_sk.js" hash="9e1b0a7378aff7add6100dc3c3e8d80c"/><file name="messages_tr.js" hash="7ecf31a65c2eefd8c7da62f65ccf33a7"/><file name="messages_tw.js" hash="b660609f8ddf6b17d71b72aa43512f1f"/><file name="messages_ua.js" hash="80e565078f016c8ea1cffc6c8cdd5a93"/><file name="methods_de.js" hash="a9d8792f8e46298165daaf4e9a5d98ad"/><file name="methods_nl.js" hash="8505eec534134eac849adca1cf8f2f9d"/><file name="methods_pt.js" hash="09b350c9c069b5a82d5811339ac15ab6"/></dir></dir></dir><dir name="mana"><file name="core.js" hash="50a499ad52d5155e6edaf7cad2f7e778"/><file name="core.js.map" hash="7ed0105807c60a60ef8027479f7007c7"/><file name="core.min.js" hash="7537021875f5a04f140258d91bb3bfc5"/></dir><dir name="src"><dir name="Mana"><dir name="Core"><file name="Ajax.js" hash="a4adb98a7e0e46efb596ef46d12f591c"/><file name="Base64.js" hash="32c5eca8e7ae6860935f6026c810bb7f"/><file name="Block.js" hash="aa31f18ce505d2c43ddfac845b3516d6"/><file name="Config.js" hash="2592b48b066c51fad272c471c14e1ca1"/><file name="Core.js" hash="2b29cb91249da92b4aa6a180d38a4f4b"/><file name="header.js" hash="53b9f4625f72a5e2d93edbc0129c1b82"/><file name="init.js" hash="e05d11b113604d27530c83bb9ff557cb"/><file name="Json.js" hash="226ab2f431754f2338aec47ecaabf720"/><file name="Layout.js" hash="e8c17f6f40c5d768a57cd73da2c575cd"/><file name="Mana.js" hash="fa1102a7f579b5dda5db1f2dfa848672"/><file name="Object.js" hash="e15ad2bbac3d4729b1bc7499415fd0e9"/><file name="obsolete.js" hash="6c05b74822091b64f27019f433afb5ec"/><file name="PageBlock.js" hash="4798d5992ded92dc472bde54486327cc"/><file name="PopupBlock.js" hash="22bdd511747703b95d267a9d649e3d8e"/><file name="rwd.js" hash="3bbb8b6175369e03560444faa9061264"/><file name="StringTemplate.js" hash="7cd14ce2f038bf9d1f88c516f0ec11a3"/><file name="UrlTemplate.js" hash="340bfd288bfdbe53e562fac6f81ee1c7"/><file name="Utf8.js" hash="a7381e9d7e3b54f8169d58ad660c8f13"/></dir></dir></dir></dir></target><target name="magelocal"><dir name="Mana"><dir name="Core"><file name="Profiler.php" hash="750f9a6490534be89ef5a55ddf62db21"/><file name="Profiler2.php" hash="65d3000031d885779b195558cecc159a"/><dir name="Block"><file name="Js.php" hash="23b65253ab9b20b0c80f5cb30b25e63f"/><file name="List.php" hash="8a54149b3d24b8f1447ee77dc7c691ed"/><file name="Require.php" hash="39764e20e72f331223f1ad85a21c15a3"/><file name="Singleton.php" hash="74e1cb457680fb2f999af95fa3af26c2"/></dir><dir name="etc"><file name="adminhtml.xml" hash="6245429c5bc31a6b9667afe2e714cdb9"/><file name="config.xml" hash="1724ef23c2b6347ba451dffb2df7b8c2"/><file name="system.xml" hash="107f9fc56e6b83ceb92fa20bfcc93705"/></dir><dir name="Exception"><file name="Validation.php" hash="fea7418326430c7acd04c34d8a4b3f07"/></dir><dir name="Helper"><file name="Data.php" hash="e08ef5d31e210c3f5f0a1519b5318568"/><file name="Db.php" hash="8f63c21d8e5d1feda88727d222a233a3"/><file name="Debug.php" hash="6fd3859ac2e817d36aadd8ba6c47405a"/><file name="Eav.php" hash="9a801730d87f636cdd612c83528d9998"/><file name="Files.php" hash="d0f013090c6266c8e39d7b095985ba27"/><file name="Image.php" hash="75ade04d12f104d05314f2d9343ec539"/><file name="Js.php" hash="a9866a72f35c584a0c4684d4b2a371dd"/><file name="Json.php" hash="39f860c7189913faad31b234903ea6d6"/><file name="Layer.php" hash="f1d1197dc115ef8680d7bfeb0ef11c84"/><file name="Layout.php" hash="32d6016c0ddad2f414791dee4712c13e"/><file name="Lock.php" hash="7567ccb21cef8c90dac0e9bbac321801"/><file name="Logger.php" hash="6fc13c5afbd795a4d0ecfe9c576baaac"/><file name="Mbstring.php" hash="1702040a0138b88445a36bdd23d44566"/><file name="PageType.php" hash="78c1ed2f6353d29f2f8ed580014176a2"/><file name="Router.php" hash="9713a66ad89d22b0d0a5c6d5a5937ae6"/><file name="Seo.php" hash="b8aafbf9d4ec1d796e83c9ff2f7fac0b"/><file name="StringTemplate.php" hash="a7720417ae715c37eb155853e3e84f90"/><file name="UrlTemplate.php" hash="2e04649154b3c1a80e40df17cc1846a6"/><file name="Utils.php" hash="611650a169c7747bbc8177dcd31ee2a4"/><dir name="Db"><file name="Aggregate.php" hash="ee2b6086c62e6870d2139b3e8f619bdc"/></dir><dir name="PageType"><file name="Category.php" hash="22851b663096414aa80a6504ff6d1196"/><file name="CmsPage.php" hash="a54ea981e73b877a9ec63023be79b1e5"/><file name="HomePage.php" hash="64891fa7d23b59fc14ad38d2e9fc2f4b"/><file name="Search.php" hash="3b0e7e11924e950f0d9a2d30e7a83118"/></dir></dir><dir name="Model"><file name="Callback.php" hash="2e8955cf399ea302e8b19c6ccb999cc5"/><file name="Closure.php" hash="f1456fc3e6aa04906339198be3a0a544"/><file name="Eav.php" hash="ed4adbb339497fefe1db29a59c2ed110"/><file name="Indexer.php" hash="d0e5a2c7f12a484336d3baa529ba41dc"/><file name="Object.php" hash="dcb759ec94621a28c4e531715813513c"/><file name="Observer.php" hash="ca5d42b0d4bef6a312575f07df964d2d"/><dir name="Attribute"><file name="Scope.php" hash="7277aac766688c59886cff561b8c44a3"/></dir><dir name="Condition"><file name="Abstract.php" hash="2b4cb990a9c690d7a1f5033e5a97cc3c"/><file name="Combine.php" hash="ee16e0a17610f5b08bc04b2f2967820b"/></dir><dir name="Config"><file name="Default.php" hash="b69bd384a59f38f214f565d21af1ca3a"/></dir><dir name="Html"><file name="Filter.php" hash="ca77f8b76bd39d00001d6dfb12ff6929"/><file name="Parser.php" hash="5f4c098e69b582025f909ddeeab6e630"/><file name="Reader.php" hash="41a66c26ce51f3803eba50cea5b95d96"/><file name="State.php" hash="5952deebd020273729594ace8a2cae9b"/><file name="Token.php" hash="5c7a4ef3150a35b8a6bf9e296e53e739"/></dir><dir name="Source"><file name="Abstract.php" hash="bb05e3ce9f5e01ef2843a5a558a86fd8"/><file name="Config.php" hash="59b1d6927157e4b34bde55794a7a86be"/><file name="Country.php" hash="cd5c9dd00c4456db2e6b4f6316303a8c"/><file name="Design.php" hash="8c033c3585d0bf0bc31a95cbbbf7d4c4"/><file name="Js.php" hash="71852d9a46c5fca27d4b0403e9ee19d9"/><file name="Layout.php" hash="4eb47f747d5a91983fb62e802ec51793"/><file name="Status.php" hash="d4fdf128e0c4cf088f654baf426c5f0f"/><file name="Yesno.php" hash="3082e75e81e111aed0ac9f1cc17e579e"/><file name="YesNoDefault.php" hash="4a13c8de30d7f27b71dac16bbf1e18ae"/></dir></dir><dir name="Resource"><file name="Eav.php" hash="2ada400977d3a8b0883a03998e1a4e47"/><file name="Indexer.php" hash="6ced1a9ad6696345071a189c8c3e657d"/><file name="JsonCollection.php" hash="5a1c91aace6564fc62c3eeeddc0cd03b"/><dir name="Attribute"><file name="Collection.php" hash="7f01d6480b5110a431a5b50571a9ec62"/></dir><dir name="Eav"><file name="Collection.php" hash="5153a97a4021aebced2b0a538d10b4e7"/><file name="Setup.php" hash="13360360cbfada91713159a38c82e6b2"/><dir name="Collection"><file name="Derived.php" hash="03a87d87a781c8256b6414fb132ed30e"/></dir></dir><dir name="Virtual"><file name="Collection.php" hash="ac2d11980e9dc015ed0cfbe12fbf3fc7"/></dir></dir><dir name="Rewrite"><dir name="PageCache"><file name="Processor.php" hash="d5175e3a150d92ec32016654c8a7988a"/></dir></dir><dir name="sql"><dir name="mana_core_setup"><file name="mysql4-install-1.1.1.php" hash="a169406e2cc37282d001e9415eda219a"/></dir></dir></dir><dir name="Db"><dir name="etc"><file name="config.xml" hash="03b75095a6c89342032e58fc8fbc1da7"/><file name="m_db.xml" hash="7fb95c96ed440dfc5efb8d3ed598dd20"/></dir><dir name="Exception"><file name="Formula.php" hash="f791f3d718241b9b004ae1719dd8fca8"/><file name="Validation.php" hash="7238432db3b3a24615dc186e60afc546"/></dir><dir name="Helper"><file name="Config.php" hash="947e93e74329de11cffe102dad3b5002"/><file name="Data.php" hash="a35a41643d9c5e875d0e8e2dbfa8d4d1"/><file name="Formula.php" hash="c5761ee937e3490d1508a3ed0cfac805"/><dir name="Formula"><file name="Abstract.php" hash="88283737316ebd8cafddce5e42ac2bd8"/><file name="DependencyFinder.php" hash="480e4097ef5e9b21c527f5c61dbd3987"/><file name="Entity.php" hash="e5f500a86b18b37dd43fc8ab151fd204"/><file name="Evaluator.php" hash="8dc9cf1b9ddf8cefd053909ba841d985"/><file name="Function.php" hash="db3fb341c32f9c285d37df84a36fb82c"/><file name="Parser.php" hash="7828e59f31c03e31da92a889b4e8b52f"/><file name="Processor.php" hash="4bf7bfa8a2cdcfbecaede6ab3aa67f04"/><file name="Selector.php" hash="91bee56da8ee75aa06edacb19cb925b9"/><dir name="Entity"><file name="Aggregate.php" hash="fab53a31e480228474de7015100d6498"/><file name="Foreign.php" hash="6d4159dcb6ff3f7e5a958b6e891057c1"/><file name="Frontend.php" hash="4bef999e0ca552c3fa8b518c36b6e239"/><file name="Normal.php" hash="6a91af1bd600ca9b8be40ee5be5c4fa5"/><dir name="Aggregate"><file name="Field.php" hash="682fc6e82caf400025ba22f6b1c40156"/></dir></dir><dir name="Function"><file name="Count.php" hash="62d463301d3eac82f9f8c2952cc23ed4"/><file name="Glue.php" hash="00abff0970bc94ef46ebdb91d773ab02"/><file name="If.php" hash="215287632f25bd541fe29051cc11fba4"/><file name="Lower.php" hash="7e91d1e618e66d262b0967f0a053adfd"/><file name="Seo.php" hash="70ce3da277c48fc84363c58baba3dd37"/><file name="SkinUrl.php" hash="059ac4b6d44bf7714886c023c30a1490"/></dir><dir name="Processor"><file name="Eav.php" hash="722b0888661d38b399f74eaf9ec4247e"/><file name="Entity.php" hash="b3d6e11b78cf782c9eae78ce1eefd155"/><file name="System.php" hash="c7a3c7bf6194b041dd17dc2b3a605f6f"/><file name="Table.php" hash="771155e0a194fcf7a821e51172100138"/></dir></dir></dir><dir name="Model"><file name="Entity.php" hash="88e63ed2ebdeb129757d7acbd6f4d805"/><file name="Indexer.php" hash="8596a12b7ee26e686937cef3d2985685"/><file name="Object.php" hash="91dac5c80f75dcb81c1aadaa8984b466"/><file name="Observer.php" hash="d52dc7c597890e130a6d0ee92846fa89"/><file name="Setup.php" hash="637ff1d605b453dacf2565587c78a8d9"/><file name="Validation.php" hash="f2dd026c3d73f3fd345e1b7abde51e7d"/><dir name="Entity"><file name="Indexer.php" hash="80ea5030912a762f6c1ccfaadbfbbc54"/></dir><dir name="Formula"><file name="Alias.php" hash="d14575f9f0477021a2e53ff1fd9c5501"/><file name="Closure.php" hash="d773c0f5ed1f593acb5458bfb3187a7b"/><file name="Context.php" hash="5fd16cf22bc1bac09856606ee0d0a141"/><file name="Entity.php" hash="c0eb7a9362996c104bde5cd2c469db10"/><file name="Expr.php" hash="b739ab589ea0e3378e32c12a69ba78cc"/><file name="Field.php" hash="d00b8c25724e34f6cad819edf1497ede"/><file name="Node.php" hash="e28d2d8d0af762abbe3b9677937103fe"/><dir name="Alias"><file name="Array.php" hash="6719df8e4123c881980f5a2b6ef93a8f"/><file name="Empty.php" hash="93e05898f60e111f12b5febb119305dd"/><file name="Single.php" hash="8603f08d6415110c8c0f04a805055fab"/></dir><dir name="Closure"><file name="AggregateFieldJoin.php" hash="f1d19cb54eaf620d038508b7ad31fc60"/><file name="ForeignJoin.php" hash="b07167a5ef2a7caf479266269f232edf"/><file name="ForeignJoinEnd.php" hash="6b9000298615ce69eadc04e707fbe17f"/><file name="Join.php" hash="b8d368c1042754f18d027027acccb27a"/></dir><dir name="Node"><file name="Add.php" hash="22f6ec02b3226ce2c9313f713d1b03fb"/><file name="Field.php" hash="93c6bf27b93091ebe7672500e7e94e48"/><file name="FormulaExpr.php" hash="b6a36a818533775fa778c6dc66ec40f7"/><file name="FunctionCall.php" hash="bac31778c670aca74c9db49dcb40007a"/><file name="Identifier.php" hash="a38aa478e6485ef9ea95fb0758c2ea49"/><file name="Multiply.php" hash="292881a092500642e4d98aeb33aa2f75"/><file name="NullValue.php" hash="2ddeb334ac3e12cdec1b413904e02210"/><file name="NumberConstant.php" hash="fd2524859dc3ed2a3fb46468b8352f72"/><file name="StringConstant.php" hash="04cdb7baa502e001dfb35af748efde30"/></dir></dir><dir name="Replication"><file name="Target.php" hash="b918ef992096a72080a743352385b64b"/></dir><dir name="Setup"><file name="Abstract.php" hash="d8e84857de7b1cdb6ba6c03e5f4aa867"/><file name="V13012122.php" hash="a2ca004389d5145d819ff791f965ef9e"/></dir><dir name="Virtual"><file name="Result.php" hash="33f35c946b2285e62a5a1c08c1bb3ec8"/></dir></dir><dir name="Resource"><file name="Entity.php" hash="c5f9ee0f1475f2d4a2075b5cead6199d"/><file name="Formula.php" hash="53b21b55b710d119fc91bbcf841caea2"/><file name="Object.php" hash="9106bec7565a3bedaf2de81b18569157"/><file name="Replicate.php" hash="e4c75872344dde3ed8a04744110faace"/><dir name="Edit"><file name="Session.php" hash="07474c4d34f6ec1cd91ade3e871ec096"/></dir><dir name="Entity"><file name="Collection.php" hash="291cbdeef792ab848175c0ae9bb65fad"/><file name="Indexer.php" hash="9e102278a3cf4e69ead0a34b12d3c91c"/><file name="JsonCollection.php" hash="e2f66cce960914674366bc4b54603650"/></dir><dir name="Object"><file name="Collection.php" hash="6f7f393abef136226ed22eb8f45d2fdd"/></dir></dir><dir name="sql"><dir name="mana_db_setup"><file name="mysql4-install-11.09.28.09.php" hash="0d8c0873cbbabb1db406e1c0b709b4de"/><file name="mysql4-upgrade-11.09.28.09-11.09.28.10.php" hash="04ccee17b3b04906e8fed2b1ac9214a3"/><file name="mysql4-upgrade-11.10.08.23-11.10.20.22.php" hash="847b24ea006e99af80cc8980ff7ff021"/></dir></dir></dir><dir name="Filters"><dir name="Block"><file name="Filter.php" hash="bfbc2dc381f8ec2cb3a2f3eecff673f6"/><file name="Layer.php" hash="cfc87dab28d7a269a987840cd52b84db"/><file name="Search.php" hash="e7c5d74b36406fb181ba149588070f95"/><file name="State.php" hash="5259384f8b24da0e737fde2d7ffcfd93"/><file name="View.php" hash="5257cd7eefe0b40f6b479c098dcda36e"/></dir><dir name="etc"><file name="config.xml" hash="910a53d815900b5edb63a4525eefac3e"/></dir><dir name="Helper"><file name="Data.php" hash="9037b11c2450bd0661d96aadbf031968"/><file name="Extended.php" hash="5b065cc2be0a8b96dc4db32bc8279304"/><file name="Item.php" hash="7f482a48c1e661076ccea3c21f59677c"/></dir><dir name="Interface"><file name="Filter.php" hash="f1aaf305fa9d01c666d5d0801816ced0"/></dir><dir name="Model"><file name="Filter.php" hash="cd3bc9276ff4566802e2d43280394e6f"/><file name="Filter2.php" hash="81ef439832e656d8aad2c6a8d3c2cf47"/><file name="Item.php" hash="a9c7bad2c855698387135d8b0cbd5610"/><file name="Observer.php" hash="e835045553a7e4d8d821eed81e6492a1"/><file name="Operation.php" hash="54d01ace78c5b6ba3facf1a2f3255618"/><file name="Query.php" hash="b37cef8c7b24752661fb340e0d78e807"/><file name="Repository.php" hash="e0cf842a98aa5ae27fc107c18f190fab"/><file name="Sort.php" hash="95804fcd46ca143587747dc7dfe9845e"/><dir name="Config"><dir name="Display"><file name="Default.php" hash="e16716300e514ef6ee7fa4c1c5fd3331"/></dir></dir><dir name="Filter"><file name="Attribute.php" hash="61d312cb5095bcc2f474b23f8c3afd82"/><file name="Category.php" hash="cc18ac1c3f47fda27fc74086d867c18f"/><file name="Common.php" hash="522b1695cf4f4f545c7174b90a8b06ba"/><file name="Decimal.php" hash="43bd8e5b3d47e19a156a15bf14a248a2"/><file name="Default.php" hash="960d7b6f0fd9c32cf9726e11a62cbb1e"/><file name="Price.php" hash="14c50f49106ea768d537465d3d1775e7"/></dir><dir name="Filter2"><file name="Store.php" hash="d82d20f485c4417bc51a73bcf01cd374"/><file name="Value.php" hash="d3214a80a4c3fe1eb492ce860de8d60b"/><dir name="Value"><file name="Store.php" hash="695bf8aad7ff431fe5a511098cf23f48"/></dir></dir><dir name="Solr"><file name="Attribute.php" hash="c60628b8ec074147918ea7a96e85ecd5"/><file name="Category.php" hash="281864a88dc542de2dd8bd15812a64d4"/><file name="Decimal.php" hash="4c732a1189b7cd5c96ece2f2040c4704"/><file name="Price.php" hash="33d267665ed583da42a0001a5e575426"/><dir name="Adapter"><file name="HttpStream.php" hash="e8ae626402b1403e7cbcb5f692aa76ee"/><file name="PhpExtension.php" hash="847d0e30ec5aef0ddb1dfe5fe150e30f"/></dir><dir name="And"><file name="Attribute.php" hash="3df0798bc675483dd4b327299fc00b33"/></dir><dir name="Reverse"><file name="Attribute.php" hash="c23dc7f104559c3df2f3394438735537"/><file name="Decimal.php" hash="89810a0c5fe707af354d7be73b8dfe36"/><file name="Price.php" hash="bf207efb2854f99a15775f38f019f5b4"/></dir></dir><dir name="Source"><file name="Display.php" hash="509e389d33e3175e304ab67ffdb79325"/><file name="Filter.php" hash="7f62fe307f6e83dbdb018e41e09c1087"/><file name="Filterable.php" hash="618680f75072220ad711dec6e220d43b"/><dir name="Display"><file name="All.php" hash="1875630a7565c9655c8c8724dad45bba"/><file name="Attribute.php" hash="d2bd347e70e3924490dff6e57274ff40"/><file name="Category.php" hash="437b3f678edd292a0110529aadfb1530"/><file name="Decimal.php" hash="b432f32e93fb1991f8882bfe25f0514e"/><file name="Price.php" hash="c6a017240beaf76666e9f702a9fcd48d"/></dir></dir></dir><dir name="Resource"><file name="Filter.php" hash="e74d789c7751fe0a126b38ab0bd3ac40"/><file name="Filter2.php" hash="ed398f976465a24464e92566a9b41f6a"/><file name="Item.php" hash="c90c3eb3649317e1746065ee3e15f44a"/><file name="ItemAdditionalInfo.php" hash="af989c2a78aadbe51831d216b6c54643"/><file name="Setup.php" hash="83b12b7939ac1c7696360f77304d9d84"/><dir name="EnterpriseSearch"><file name="Engine.php" hash="51d77208587d1c55c8d508a3024bd269"/></dir><dir name="Filter"><file name="Attribute.php" hash="5d8d60c67a2295bb690bf755247ff9cc"/><file name="Collection.php" hash="6831f054791977048641d43c288ff53c"/><file name="Decimal.php" hash="472f527ca55851d319d28ad4119e38ac"/><file name="Price.php" hash="a7141e1bb1ff424b6ccff608ab245fd9"/><dir name="And"><file name="Attribute.php" hash="cdc41ca223083360b35bd5f455733cd8"/></dir><dir name="Attribute"><file name="Collection.php" hash="c854270f63ca3bfd44cfd6ab27888676"/></dir><dir name="Collection"><file name="Derived.php" hash="5240ac10d2989122c49665919a9555ff"/></dir><dir name="Reverse"><file name="Attribute.php" hash="0be2e3f5eef03862e13b37deb1f7f7a3"/><file name="Decimal.php" hash="9d9974cf64c5178812bcc6fca83bc9ff"/><file name="Price.php" hash="3be48facf6596b618fc0a621f625d460"/></dir></dir><dir name="Filter2"><file name="Collection.php" hash="822b71198d05e41e90d096cb7cc47fa5"/><file name="Store.php" hash="4c430d687e9ae90ec36a9faa1c283aa1"/><file name="Value.php" hash="ea33d71787937002c2c794df69b982a8"/><dir name="Store"><file name="Collection.php" hash="7998c9394089d23d21db58a4023cc180"/></dir><dir name="Value"><file name="Collection.php" hash="3273b517dd65a46034cb3ef8adb3c610"/><file name="Store.php" hash="48d9631e8d34b15a72fc22e6bb3a98c2"/><dir name="Store"><file name="Collection.php" hash="073931492acfc99a3b5cd1ecf7113982"/></dir></dir></dir><dir name="Indexer"><file name="Source.php" hash="251589738ea54dcf6e986921f3810931"/></dir><dir name="Solr"><file name="Attribute.php" hash="f2b30e509881147f2f73ede11ac2fbed"/><file name="Collection.php" hash="9b35d28e731fc47f420447251a5e976b"/><file name="Engine.php" hash="e3c3306e436e6943aa10f9b1a77404be"/><dir name="And"><file name="Attribute.php" hash="a7dd5fbb9388a4b73efeeaa7e91a9b7b"/></dir><dir name="Reverse"><file name="Attribute.php" hash="1084278692e5ffe1d16640b530e33662"/></dir></dir></dir><dir name="sql"><dir name="mana_filters_setup"><file name="mysql4-install-1.1.1.php" hash="22f7381b5ea9261a2e8a00fda28f28ef"/><file name="mysql4-upgrade-1.1.1-1.9.1.php" hash="04c761bab20de6e0fed68e141fb68112"/><file name="mysql4-upgrade-11.09.24.09-11.09.28.09.php" hash="a007f769d492c43b1e7a583a2763300a"/><file name="mysql4-upgrade-11.10.19.18-11.10.23.01.php" hash="ef0b7b4f4530e5b01f349e3d534ebb16"/><file name="mysql4-upgrade-12.01.14.09-12.01.15.14.php" hash="001d8e035bc798d8779c29ac38912543"/><file name="mysql4-upgrade-12.04.10.23-12.04.17.18.php" hash="48f2d8cc8ca6afe014a95dea808e5087"/><file name="mysql4-upgrade-12.10.25.17-12.10.25.18.php" hash="5d726b388ac30fc00cd95bb86ab5641b"/><file name="mysql4-upgrade-12.11.02.16-12.11.13.15.php" hash="11fc0db6ff2f56fe95bfaf89ab758f61"/><file name="mysql4-upgrade-13.09.11.14-13.09.23.17.php" hash="aca62ea5d13c5bc3259a48e5cd4d5282"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Mana_Core.xml" hash="0ca7883c0f5fcaa12b32842f142f92eb"/><file name="Mana_Db.xml" hash="9b4669b284f2a688e165abaac373c358"/><file name="Mana_Filters.xml" hash="1a5a180ae37f2b369a2c8ce2d2d120b1"/></dir></target></contents>
|
16 |
<compatible/>
|
17 |
-
<dependencies
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Mana_Filters</name>
|
4 |
+
<version>15.11.24.13</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL 3.0)</license>
|
7 |
<channel>community</channel>
|
9 |
<summary>Advanced layered navigation</summary>
|
10 |
<description>Add multiple selection features for attribute and price filters in Magento layered navigation</description>
|
11 |
<notes>Adds multiple selection features for attribute and price filters in Magento layered navigation.</notes>
|
12 |
+
<authors><author><name>Mana Team</name><user>manadev</user><email>team@manadev.com</email></author></authors>
|
13 |
+
<date>2015-12-14</date>
|
14 |
+
<time>19:07:32</time>
|
15 |
+
<contents><target name="magelocal"><dir name="Mana"><dir name="Core"><dir name="Block"><file name="ExcludeProductsNotAssignedToSubCategories.php" hash="f5c0bd84df2ccfebdf73e11bcd2d3491"/><file name="Js.php" hash="23b65253ab9b20b0c80f5cb30b25e63f"/><file name="List.php" hash="8a54149b3d24b8f1447ee77dc7c691ed"/><file name="Require.php" hash="39764e20e72f331223f1ad85a21c15a3"/><file name="Singleton.php" hash="74e1cb457680fb2f999af95fa3af26c2"/></dir><dir name="Exception"><file name="Validation.php" hash="fea7418326430c7acd04c34d8a4b3f07"/></dir><dir name="Helper"><file name="Data.php" hash="e03bc299c6044c16504d76c7ac00cac5"/><dir name="Db"><file name="Aggregate.php" hash="ee2b6086c62e6870d2139b3e8f619bdc"/></dir><file name="Db.php" hash="52fd8b556a39135d4da8c2f47b92f525"/><file name="Debug.php" hash="6fd3859ac2e817d36aadd8ba6c47405a"/><file name="Eav.php" hash="9a801730d87f636cdd612c83528d9998"/><file name="Files.php" hash="d0f013090c6266c8e39d7b095985ba27"/><file name="Image.php" hash="75ade04d12f104d05314f2d9343ec539"/><file name="Js.php" hash="a9866a72f35c584a0c4684d4b2a371dd"/><file name="Json.php" hash="39f860c7189913faad31b234903ea6d6"/><file name="Layer.php" hash="f1d1197dc115ef8680d7bfeb0ef11c84"/><file name="Layout.php" hash="32d6016c0ddad2f414791dee4712c13e"/><file name="Lock.php" hash="7567ccb21cef8c90dac0e9bbac321801"/><file name="Logger.php" hash="6fc13c5afbd795a4d0ecfe9c576baaac"/><file name="Mbstring.php" hash="1702040a0138b88445a36bdd23d44566"/><dir name="PageType"><file name="Category.php" hash="22851b663096414aa80a6504ff6d1196"/><file name="CmsPage.php" hash="a54ea981e73b877a9ec63023be79b1e5"/><file name="HomePage.php" hash="64891fa7d23b59fc14ad38d2e9fc2f4b"/><file name="Search.php" hash="3b0e7e11924e950f0d9a2d30e7a83118"/></dir><file name="PageType.php" hash="a3b15fb9a5119f53c3542f49ccf42477"/><file name="Router.php" hash="9713a66ad89d22b0d0a5c6d5a5937ae6"/><file name="Seo.php" hash="b8aafbf9d4ec1d796e83c9ff2f7fac0b"/><file name="StringTemplate.php" hash="a7720417ae715c37eb155853e3e84f90"/><file name="UrlTemplate.php" hash="2e04649154b3c1a80e40df17cc1846a6"/><file name="Utils.php" hash="611650a169c7747bbc8177dcd31ee2a4"/></dir><dir name="Model"><dir name="Attribute"><file name="Scope.php" hash="7277aac766688c59886cff561b8c44a3"/></dir><file name="Callback.php" hash="2e8955cf399ea302e8b19c6ccb999cc5"/><file name="Closure.php" hash="f1456fc3e6aa04906339198be3a0a544"/><dir name="Condition"><file name="Abstract.php" hash="2b4cb990a9c690d7a1f5033e5a97cc3c"/><file name="Combine.php" hash="ee16e0a17610f5b08bc04b2f2967820b"/></dir><dir name="Config"><file name="Default.php" hash="b69bd384a59f38f214f565d21af1ca3a"/></dir><file name="Eav.php" hash="ed4adbb339497fefe1db29a59c2ed110"/><dir name="Html"><file name="Filter.php" hash="ca77f8b76bd39d00001d6dfb12ff6929"/><file name="Parser.php" hash="5f4c098e69b582025f909ddeeab6e630"/><file name="Reader.php" hash="41a66c26ce51f3803eba50cea5b95d96"/><file name="State.php" hash="5952deebd020273729594ace8a2cae9b"/><file name="Token.php" hash="5c7a4ef3150a35b8a6bf9e296e53e739"/></dir><file name="Indexer.php" hash="d0e5a2c7f12a484336d3baa529ba41dc"/><file name="Object.php" hash="dcb759ec94621a28c4e531715813513c"/><file name="Observer.php" hash="ca5d42b0d4bef6a312575f07df964d2d"/><dir name="Source"><file name="Abstract.php" hash="f29302f7393599a179a734526f8c8af9"/><file name="Config.php" hash="59b1d6927157e4b34bde55794a7a86be"/><file name="Country.php" hash="cd5c9dd00c4456db2e6b4f6316303a8c"/><file name="Design.php" hash="8c033c3585d0bf0bc31a95cbbbf7d4c4"/><file name="Js.php" hash="71852d9a46c5fca27d4b0403e9ee19d9"/><file name="Layout.php" hash="4eb47f747d5a91983fb62e802ec51793"/><file name="Status.php" hash="d4fdf128e0c4cf088f654baf426c5f0f"/><file name="YesNoDefault.php" hash="4a13c8de30d7f27b71dac16bbf1e18ae"/><file name="Yesno.php" hash="3082e75e81e111aed0ac9f1cc17e579e"/></dir></dir><file name="Profiler.php" hash="750f9a6490534be89ef5a55ddf62db21"/><file name="Profiler2.php" hash="65d3000031d885779b195558cecc159a"/><dir name="Resource"><dir name="Attribute"><file name="Collection.php" hash="7f01d6480b5110a431a5b50571a9ec62"/></dir><dir name="Eav"><dir name="Collection"><file name="Derived.php" hash="03a87d87a781c8256b6414fb132ed30e"/></dir><file name="Collection.php" hash="5153a97a4021aebced2b0a538d10b4e7"/><file name="Setup.php" hash="13360360cbfada91713159a38c82e6b2"/></dir><file name="Eav.php" hash="2ada400977d3a8b0883a03998e1a4e47"/><file name="Indexer.php" hash="6ced1a9ad6696345071a189c8c3e657d"/><file name="JsonCollection.php" hash="5a1c91aace6564fc62c3eeeddc0cd03b"/><dir name="Virtual"><file name="Collection.php" hash="ac2d11980e9dc015ed0cfbe12fbf3fc7"/></dir></dir><dir name="Rewrite"><dir name="PageCache"><file name="Processor.php" hash="d5175e3a150d92ec32016654c8a7988a"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="6245429c5bc31a6b9667afe2e714cdb9"/><file name="config.xml" hash="7a0ef3920a6a34f63f6f156261e75fce"/><file name="system.xml" hash="e656bac06665675d7cc0768a469e6362"/></dir><dir name="sql"><dir name="mana_core_setup"><file name="mysql4-install-1.1.1.php" hash="a169406e2cc37282d001e9415eda219a"/></dir></dir></dir><dir name="Db"><dir name="Exception"><file name="Formula.php" hash="f791f3d718241b9b004ae1719dd8fca8"/><file name="Validation.php" hash="7238432db3b3a24615dc186e60afc546"/></dir><dir name="Helper"><file name="Config.php" hash="947e93e74329de11cffe102dad3b5002"/><file name="Data.php" hash="a35a41643d9c5e875d0e8e2dbfa8d4d1"/><dir name="Formula"><file name="Abstract.php" hash="88283737316ebd8cafddce5e42ac2bd8"/><file name="DependencyFinder.php" hash="480e4097ef5e9b21c527f5c61dbd3987"/><dir name="Entity"><dir name="Aggregate"><file name="Field.php" hash="682fc6e82caf400025ba22f6b1c40156"/></dir><file name="Aggregate.php" hash="fab53a31e480228474de7015100d6498"/><file name="Foreign.php" hash="6d4159dcb6ff3f7e5a958b6e891057c1"/><file name="Frontend.php" hash="4bef999e0ca552c3fa8b518c36b6e239"/><file name="Normal.php" hash="6a91af1bd600ca9b8be40ee5be5c4fa5"/></dir><file name="Entity.php" hash="e5f500a86b18b37dd43fc8ab151fd204"/><file name="Evaluator.php" hash="8dc9cf1b9ddf8cefd053909ba841d985"/><dir name="Function"><file name="Count.php" hash="62d463301d3eac82f9f8c2952cc23ed4"/><file name="Glue.php" hash="00abff0970bc94ef46ebdb91d773ab02"/><file name="If.php" hash="215287632f25bd541fe29051cc11fba4"/><file name="Lower.php" hash="7e91d1e618e66d262b0967f0a053adfd"/><file name="Seo.php" hash="70ce3da277c48fc84363c58baba3dd37"/><file name="SkinUrl.php" hash="059ac4b6d44bf7714886c023c30a1490"/></dir><file name="Function.php" hash="db3fb341c32f9c285d37df84a36fb82c"/><file name="Parser.php" hash="7828e59f31c03e31da92a889b4e8b52f"/><dir name="Processor"><file name="Eav.php" hash="722b0888661d38b399f74eaf9ec4247e"/><file name="Entity.php" hash="b3d6e11b78cf782c9eae78ce1eefd155"/><file name="System.php" hash="c7a3c7bf6194b041dd17dc2b3a605f6f"/><file name="Table.php" hash="771155e0a194fcf7a821e51172100138"/></dir><file name="Processor.php" hash="4bf7bfa8a2cdcfbecaede6ab3aa67f04"/><file name="Selector.php" hash="91bee56da8ee75aa06edacb19cb925b9"/></dir><file name="Formula.php" hash="c5761ee937e3490d1508a3ed0cfac805"/></dir><dir name="Model"><dir name="Entity"><file name="Indexer.php" hash="80ea5030912a762f6c1ccfaadbfbbc54"/></dir><file name="Entity.php" hash="88e63ed2ebdeb129757d7acbd6f4d805"/><dir name="Formula"><dir name="Alias"><file name="Array.php" hash="6719df8e4123c881980f5a2b6ef93a8f"/><file name="Empty.php" hash="93e05898f60e111f12b5febb119305dd"/><file name="Single.php" hash="8603f08d6415110c8c0f04a805055fab"/></dir><file name="Alias.php" hash="d14575f9f0477021a2e53ff1fd9c5501"/><dir name="Closure"><file name="AggregateFieldJoin.php" hash="f1d19cb54eaf620d038508b7ad31fc60"/><file name="ForeignJoin.php" hash="b07167a5ef2a7caf479266269f232edf"/><file name="ForeignJoinEnd.php" hash="6b9000298615ce69eadc04e707fbe17f"/><file name="Join.php" hash="b8d368c1042754f18d027027acccb27a"/></dir><file name="Closure.php" hash="d773c0f5ed1f593acb5458bfb3187a7b"/><file name="Context.php" hash="5fd16cf22bc1bac09856606ee0d0a141"/><file name="Entity.php" hash="c0eb7a9362996c104bde5cd2c469db10"/><file name="Expr.php" hash="b739ab589ea0e3378e32c12a69ba78cc"/><file name="Field.php" hash="d00b8c25724e34f6cad819edf1497ede"/><dir name="Node"><file name="Add.php" hash="22f6ec02b3226ce2c9313f713d1b03fb"/><file name="Field.php" hash="93c6bf27b93091ebe7672500e7e94e48"/><file name="FormulaExpr.php" hash="b6a36a818533775fa778c6dc66ec40f7"/><file name="FunctionCall.php" hash="bac31778c670aca74c9db49dcb40007a"/><file name="Identifier.php" hash="a38aa478e6485ef9ea95fb0758c2ea49"/><file name="Multiply.php" hash="292881a092500642e4d98aeb33aa2f75"/><file name="NullValue.php" hash="2ddeb334ac3e12cdec1b413904e02210"/><file name="NumberConstant.php" hash="fd2524859dc3ed2a3fb46468b8352f72"/><file name="StringConstant.php" hash="04cdb7baa502e001dfb35af748efde30"/></dir><file name="Node.php" hash="e28d2d8d0af762abbe3b9677937103fe"/></dir><file name="Indexer.php" hash="8596a12b7ee26e686937cef3d2985685"/><file name="Object.php" hash="91dac5c80f75dcb81c1aadaa8984b466"/><file name="Observer.php" hash="1a03d41426ed296f968b34e08926dd27"/><dir name="Replication"><file name="Target.php" hash="b918ef992096a72080a743352385b64b"/></dir><dir name="Setup"><file name="Abstract.php" hash="d8e84857de7b1cdb6ba6c03e5f4aa867"/><file name="V13012122.php" hash="a2ca004389d5145d819ff791f965ef9e"/></dir><file name="Setup.php" hash="637ff1d605b453dacf2565587c78a8d9"/><file name="Validation.php" hash="f2dd026c3d73f3fd345e1b7abde51e7d"/><dir name="Virtual"><file name="Result.php" hash="33f35c946b2285e62a5a1c08c1bb3ec8"/></dir></dir><dir name="Resource"><dir name="Edit"><file name="Session.php" hash="07474c4d34f6ec1cd91ade3e871ec096"/></dir><dir name="Entity"><file name="Collection.php" hash="291cbdeef792ab848175c0ae9bb65fad"/><file name="Indexer.php" hash="9e102278a3cf4e69ead0a34b12d3c91c"/><file name="JsonCollection.php" hash="e2f66cce960914674366bc4b54603650"/></dir><file name="Entity.php" hash="c5f9ee0f1475f2d4a2075b5cead6199d"/><file name="Formula.php" hash="53b21b55b710d119fc91bbcf841caea2"/><dir name="Object"><file name="Collection.php" hash="6f7f393abef136226ed22eb8f45d2fdd"/></dir><file name="Object.php" hash="9106bec7565a3bedaf2de81b18569157"/><file name="Replicate.php" hash="e4c75872344dde3ed8a04744110faace"/></dir><dir name="etc"><file name="config.xml" hash="4e3c50a8ec5d6b564a0858154246adda"/><file name="m_db.xml" hash="7fb95c96ed440dfc5efb8d3ed598dd20"/></dir><dir name="sql"><dir name="mana_db_setup"><file name="mysql4-install-11.09.28.09.php" hash="0d8c0873cbbabb1db406e1c0b709b4de"/><file name="mysql4-upgrade-11.09.28.09-11.09.28.10.php" hash="04ccee17b3b04906e8fed2b1ac9214a3"/><file name="mysql4-upgrade-11.10.08.23-11.10.20.22.php" hash="847b24ea006e99af80cc8980ff7ff021"/></dir></dir></dir><dir name="Filters"><dir name="Block"><file name="Filter.php" hash="bfbc2dc381f8ec2cb3a2f3eecff673f6"/><file name="Layer.php" hash="cfc87dab28d7a269a987840cd52b84db"/><file name="Search.php" hash="e7c5d74b36406fb181ba149588070f95"/><file name="State.php" hash="5259384f8b24da0e737fde2d7ffcfd93"/><file name="View.php" hash="5257cd7eefe0b40f6b479c098dcda36e"/></dir><dir name="Helper"><file name="Data.php" hash="81483a480c5007aacbc4f2f39fec50b1"/><file name="Extended.php" hash="5b065cc2be0a8b96dc4db32bc8279304"/><file name="Item.php" hash="b7afe9960f8ab9f97dce037693064e88"/></dir><dir name="Interface"><file name="Filter.php" hash="f1aaf305fa9d01c666d5d0801816ced0"/></dir><dir name="Model"><dir name="Config"><dir name="Display"><file name="Default.php" hash="e16716300e514ef6ee7fa4c1c5fd3331"/></dir></dir><dir name="Filter"><file name="Attribute.php" hash="afa0d21d34f3b6098f5eef3713453273"/><file name="Category.php" hash="e9c27cb341eb573dd0c8f3a5056c76fa"/><file name="Common.php" hash="522b1695cf4f4f545c7174b90a8b06ba"/><file name="Decimal.php" hash="df459c77361b1f9c531d42a08ad87933"/><file name="Default.php" hash="960d7b6f0fd9c32cf9726e11a62cbb1e"/><file name="Price.php" hash="14c50f49106ea768d537465d3d1775e7"/></dir><file name="Filter.php" hash="cd3bc9276ff4566802e2d43280394e6f"/><dir name="Filter2"><file name="Store.php" hash="d82d20f485c4417bc51a73bcf01cd374"/><dir name="Value"><file name="Store.php" hash="695bf8aad7ff431fe5a511098cf23f48"/></dir><file name="Value.php" hash="d3214a80a4c3fe1eb492ce860de8d60b"/></dir><file name="Filter2.php" hash="81ef439832e656d8aad2c6a8d3c2cf47"/><file name="Item.php" hash="a9c7bad2c855698387135d8b0cbd5610"/><file name="Observer.php" hash="e835045553a7e4d8d821eed81e6492a1"/><file name="Operation.php" hash="54d01ace78c5b6ba3facf1a2f3255618"/><file name="Query.php" hash="b37cef8c7b24752661fb340e0d78e807"/><file name="Repository.php" hash="e0cf842a98aa5ae27fc107c18f190fab"/><dir name="Solr"><dir name="Adapter"><file name="HttpStream.php" hash="e8ae626402b1403e7cbcb5f692aa76ee"/><file name="PhpExtension.php" hash="847d0e30ec5aef0ddb1dfe5fe150e30f"/></dir><dir name="And"><file name="Attribute.php" hash="3df0798bc675483dd4b327299fc00b33"/></dir><file name="Attribute.php" hash="c60628b8ec074147918ea7a96e85ecd5"/><file name="Category.php" hash="281864a88dc542de2dd8bd15812a64d4"/><file name="Decimal.php" hash="4c732a1189b7cd5c96ece2f2040c4704"/><file name="Price.php" hash="33d267665ed583da42a0001a5e575426"/><dir name="Reverse"><file name="Attribute.php" hash="c23dc7f104559c3df2f3394438735537"/><file name="Decimal.php" hash="89810a0c5fe707af354d7be73b8dfe36"/><file name="Price.php" hash="bf207efb2854f99a15775f38f019f5b4"/></dir></dir><file name="Sort.php" hash="95804fcd46ca143587747dc7dfe9845e"/><dir name="Source"><dir name="Display"><file name="All.php" hash="1875630a7565c9655c8c8724dad45bba"/><file name="Attribute.php" hash="d2bd347e70e3924490dff6e57274ff40"/><file name="Category.php" hash="437b3f678edd292a0110529aadfb1530"/><file name="Decimal.php" hash="b432f32e93fb1991f8882bfe25f0514e"/><file name="Price.php" hash="c6a017240beaf76666e9f702a9fcd48d"/></dir><file name="Display.php" hash="509e389d33e3175e304ab67ffdb79325"/><file name="Filter.php" hash="ff7b227e3a0dcd3f2931114070c0a93d"/><file name="Filterable.php" hash="618680f75072220ad711dec6e220d43b"/></dir></dir><dir name="Resource"><dir name="EnterpriseSearch"><file name="Engine.php" hash="51d77208587d1c55c8d508a3024bd269"/></dir><dir name="Filter"><dir name="And"><file name="Attribute.php" hash="cdc41ca223083360b35bd5f455733cd8"/></dir><dir name="Attribute"><file name="Collection.php" hash="c854270f63ca3bfd44cfd6ab27888676"/></dir><file name="Attribute.php" hash="5d8d60c67a2295bb690bf755247ff9cc"/><dir name="Collection"><file name="Derived.php" hash="5240ac10d2989122c49665919a9555ff"/></dir><file name="Collection.php" hash="6831f054791977048641d43c288ff53c"/><file name="Decimal.php" hash="472f527ca55851d319d28ad4119e38ac"/><file name="Price.php" hash="c8b803ce83fbf9815fcc78c9e4dace4c"/><dir name="Reverse"><file name="Attribute.php" hash="0be2e3f5eef03862e13b37deb1f7f7a3"/><file name="Decimal.php" hash="9d9974cf64c5178812bcc6fca83bc9ff"/><file name="Price.php" hash="3be48facf6596b618fc0a621f625d460"/></dir></dir><file name="Filter.php" hash="e74d789c7751fe0a126b38ab0bd3ac40"/><dir name="Filter2"><file name="Collection.php" hash="6de6e38dd09b63efabd0ec3f174614fb"/><dir name="Store"><file name="Collection.php" hash="3aa2cc8ecde2d6d765c89351dc329ee3"/></dir><file name="Store.php" hash="4c430d687e9ae90ec36a9faa1c283aa1"/><dir name="Value"><file name="Collection.php" hash="3273b517dd65a46034cb3ef8adb3c610"/><dir name="Store"><file name="Collection.php" hash="073931492acfc99a3b5cd1ecf7113982"/></dir><file name="Store.php" hash="48d9631e8d34b15a72fc22e6bb3a98c2"/></dir><file name="Value.php" hash="ea33d71787937002c2c794df69b982a8"/></dir><file name="Filter2.php" hash="1c946990733a975b4b754cc16eaff43e"/><dir name="Indexer"><file name="Source.php" hash="251589738ea54dcf6e986921f3810931"/></dir><file name="Item.php" hash="b47f88c2db2dad8c0c1f82d794a5edff"/><file name="ItemAdditionalInfo.php" hash="af989c2a78aadbe51831d216b6c54643"/><file name="Setup.php" hash="83b12b7939ac1c7696360f77304d9d84"/><dir name="Solr"><dir name="And"><file name="Attribute.php" hash="a7dd5fbb9388a4b73efeeaa7e91a9b7b"/></dir><file name="Attribute.php" hash="f2b30e509881147f2f73ede11ac2fbed"/><file name="Collection.php" hash="9b35d28e731fc47f420447251a5e976b"/><file name="Engine.php" hash="e3c3306e436e6943aa10f9b1a77404be"/><dir name="Reverse"><file name="Attribute.php" hash="1084278692e5ffe1d16640b530e33662"/></dir></dir></dir><dir name="etc"><file name="config.xml" hash="956b4a3b445cd0e651b117444dd749d8"/></dir><dir name="sql"><dir name="mana_filters_setup"><file name="mysql4-install-1.1.1.php" hash="22f7381b5ea9261a2e8a00fda28f28ef"/><file name="mysql4-upgrade-1.1.1-1.9.1.php" hash="04c761bab20de6e0fed68e141fb68112"/><file name="mysql4-upgrade-11.09.24.09-11.09.28.09.php" hash="a007f769d492c43b1e7a583a2763300a"/><file name="mysql4-upgrade-11.10.19.18-11.10.23.01.php" hash="ef0b7b4f4530e5b01f349e3d534ebb16"/><file name="mysql4-upgrade-12.01.14.09-12.01.15.14.php" hash="001d8e035bc798d8779c29ac38912543"/><file name="mysql4-upgrade-12.04.10.23-12.04.17.18.php" hash="48f2d8cc8ca6afe014a95dea808e5087"/><file name="mysql4-upgrade-12.10.25.17-12.10.25.18.php" hash="5d726b388ac30fc00cd95bb86ab5641b"/><file name="mysql4-upgrade-12.11.02.16-12.11.13.15.php" hash="11fc0db6ff2f56fe95bfaf89ab758f61"/><file name="mysql4-upgrade-13.09.11.14-13.09.23.17.php" hash="aca62ea5d13c5bc3259a48e5cd4d5282"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="mana_core.xml" hash="eb2ba72e3c377e0997e8ff1b3dea4796"/></dir><dir name="template"><dir name="mana"><dir name="core"><file name="js.phtml" hash="53a4035fe21537c0cd7fde286ed4a611"/><file name="popup.phtml" hash="e2823a07a8eefcad23f1ea416e95f84c"/><file name="require.phtml" hash="b85203a9ecf3808b5cdde85fcb03ec6e"/><file name="wait.phtml" hash="7c0ffe76e7b3aca2163d9ecc5145e81b"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="mana_core.xml" hash="51ab6a0751b10868b4f2adc008ca7f87"/><file name="mana_filters.xml" hash="51005a99382d5450fbc6ea239bbbc7a2"/></dir><dir name="template"><dir name="mana"><dir name="core"><file name="js.phtml" hash="1aa41c842f1984142a864f667f99d33b"/><file name="popup.phtml" hash="e2823a07a8eefcad23f1ea416e95f84c"/><file name="require.phtml" hash="b85203a9ecf3808b5cdde85fcb03ec6e"/><file name="wait.phtml" hash="2fdb82f90c1aa8705fa76f500b967fef"/></dir><dir name="filters"><file name="cms.phtml" hash="b4c954289a496a8e79bddac6f89abbbe"/><dir name="items"><file name="list.phtml" hash="f5e0ac3cea381560e83d536433e303c7"/><file name="list_popup.phtml" hash="ff8d08726080a7eee21a85282d5294a4"/><file name="list_special.phtml" hash="2e930f38fbcd7b942d70adfb5307e305"/><file name="standard.phtml" hash="5c125504a6674f6eac8ea6ebd2c7ed1e"/><file name="standard_popup.phtml" hash="5318ff7766dce895a033ca0cea8a12d6"/></dir><file name="state.phtml" hash="9f49dcb0fa2e99652e02b9891d4ea7d8"/></dir></dir></dir></dir></dir><dir name="rwd"><dir name="default"><dir name="layout"><file name="mana_filters.xml" hash="5aa157d9c8f9cdb68c7d0c03c1e8a0f3"/></dir><dir name="template"><dir name="mana"><dir name="filters"><dir name="items"><file name="list.phtml" hash="1adf0a61f5a3a216939ae03daaae7080"/><file name="standard.phtml" hash="983c40cf9136b3b879d2d1a41bdccbf6"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Mana_Core.xml" hash="f04979b2ff9e69438d8acc2077aa1675"/><file name="Mana_Db.xml" hash="9b4669b284f2a688e165abaac373c358"/><file name="Mana_Filters.xml" hash="1a5a180ae37f2b369a2c8ce2d2d120b1"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Mana_Core.csv" hash="264b6e6e44c593af6f79b93875091672"/><file name="Mana_Db.csv" hash="754c3b5f318886cb1eae04af5e841ada"/><file name="Mana_Filters.csv" hash="7a4c41f5f3d3a4f4389db3ba7cac53e4"/></dir></target><target name="mageweb"><dir name="js"><dir name="jquery"><file name="advListRotator.js" hash="6629920522d9fd8364469abe1ae705c9"/><file name="fileuploader.js" hash="164c23d4b94b5424c8e1c00057d45ce4"/><file name="froogaloop.js" hash="e2260846e094906b27274d9b7db67c24"/><file name="froogaloop.min.js" hash="5fd3058d7e04a3f66559dbe78242f0cb"/><file name="history.adapter.jquery.js" hash="b930b14f725f7f882a06b834a486cc4c"/><file name="history.js" hash="70f8ec897dcbb1f8876d66ec24540660"/><file name="jquery-ui.js" hash="6ac9f97eaab22d1a1f91572a20ef516b"/><file name="jquery-ui.min.js" hash="c1e83e4d225186ec057ea9eb18742dea"/><file name="jquery.easing.js" hash="cc674e02a06874bb5888ede6e0b1c977"/><file name="jquery.flexslider-min.js" hash="c236f33e84d73c1a873ec63cc25d7bd1"/><file name="jquery.js" hash="7aa00fab28541795b6c0ccc90254063a"/><file name="jquery.min.js" hash="eef4d8205061a826b59042835422c8d6"/><file name="jquery.noconflict.js" hash="0da09155d7323809b48494da0846bf34"/><file name="jquery.printf.js" hash="71e34de7c90b12d738ca6b912fef04da"/><file name="require.js" hash="a7afdceabeb04107653fdc7d274a00d1"/><file name="require.min.js" hash="215507e3b7eb905c61e436921c5736bd"/><dir name="validate"><file name="jquery.validate.js" hash="0bb7a2f5eea19acc7bb65f6c82ec15fb"/><dir name="localization"><file name="messages_ar.js" hash="a42cc9c91da7c4f6d2f48492dda14273"/><file name="messages_bg.js" hash="bc4ebf054b6a399abf518ef28bbad839"/><file name="messages_cn.js" hash="886e45b3ffd60a683ecc8e6ea644e519"/><file name="messages_cs.js" hash="6b794f90ab955c17fe02b6553876050c"/><file name="messages_da.js" hash="cc862df2998db2cc18c8276aa7bfe0f0"/><file name="messages_de.js" hash="70a9eb9abfc4365f36718b06b38f6725"/><file name="messages_el.js" hash="bd18b65d9f876e12997281e09d2a8bf3"/><file name="messages_es.js" hash="2f3a18c6d0377bc4658839a070853ed7"/><file name="messages_fa.js" hash="e32dd026bd9d2f626b7371bf025eb5c1"/><file name="messages_fi.js" hash="d8810a4f5b025594129f32957e521210"/><file name="messages_fr.js" hash="3081f76c1368d03d2e1a84a7ed9748e2"/><file name="messages_he.js" hash="028af705c2c07e946ce6de5e63223611"/><file name="messages_hu.js" hash="7612f6525fd5922f970d40b5929c88bb"/><file name="messages_it.js" hash="824964b0dcf1ea4904d18a125ff10b09"/><file name="messages_kk.js" hash="28c0dac0417ec5e0ec9271bfd11b7129"/><file name="messages_lt.js" hash="ef0a5dea6d4bfe7965ff9c719238f2b0"/><file name="messages_lv.js" hash="6d1d834333de4f018259481658d79e85"/><file name="messages_nl.js" hash="9f8aad8e3d769b0a636a02c672044232"/><file name="messages_no.js" hash="1a00dddbef393a2b8bc2e78934243566"/><file name="messages_pl.js" hash="28cea41b05ff80cc721b6896a2f658ba"/><file name="messages_ptbr.js" hash="194f1a4cbe9483dea4363400e046b923"/><file name="messages_ptpt.js" hash="3a9a7730cc461866e37f2cd8b0507f3a"/><file name="messages_ro.js" hash="eaf4c868e8fde6f5dee2f0a3ee0cbe12"/><file name="messages_ru.js" hash="e3d6e8809230c758b95438de4c783474"/><file name="messages_se.js" hash="b80035c9f1fdfba7c7f523838ec6510b"/><file name="messages_sk.js" hash="9e1b0a7378aff7add6100dc3c3e8d80c"/><file name="messages_tr.js" hash="7ecf31a65c2eefd8c7da62f65ccf33a7"/><file name="messages_tw.js" hash="b660609f8ddf6b17d71b72aa43512f1f"/><file name="messages_ua.js" hash="80e565078f016c8ea1cffc6c8cdd5a93"/><file name="methods_de.js" hash="a9d8792f8e46298165daaf4e9a5d98ad"/><file name="methods_nl.js" hash="8505eec534134eac849adca1cf8f2f9d"/><file name="methods_pt.js" hash="09b350c9c069b5a82d5811339ac15ab6"/></dir></dir></dir><dir name="mana"><file name="core.js" hash="13c175a968c3e8fd831a861b9576f199"/><file name="core.js.map" hash="8283ddba831b9f2c2ded47dd3df58d49"/><file name="core.min.js" hash="3fb432e7d0cb73934e75f6012a28fd34"/></dir><dir name="src"><dir name="Mana"><dir name="Core"><file name="Ajax.js" hash="e0d7eeef31bbd93def05f1bc80e9d91d"/><file name="Base64.js" hash="32c5eca8e7ae6860935f6026c810bb7f"/><file name="Block.js" hash="aa31f18ce505d2c43ddfac845b3516d6"/><file name="Config.js" hash="2592b48b066c51fad272c471c14e1ca1"/><file name="Core.js" hash="2b29cb91249da92b4aa6a180d38a4f4b"/><file name="Json.js" hash="226ab2f431754f2338aec47ecaabf720"/><file name="Layout.js" hash="e8c17f6f40c5d768a57cd73da2c575cd"/><file name="Mana.js" hash="fa1102a7f579b5dda5db1f2dfa848672"/><file name="Object.js" hash="e15ad2bbac3d4729b1bc7499415fd0e9"/><file name="PageBlock.js" hash="4798d5992ded92dc472bde54486327cc"/><file name="PopupBlock.js" hash="22bdd511747703b95d267a9d649e3d8e"/><file name="StringTemplate.js" hash="7cd14ce2f038bf9d1f88c516f0ec11a3"/><file name="UrlTemplate.js" hash="340bfd288bfdbe53e562fac6f81ee1c7"/><file name="Utf8.js" hash="a7381e9d7e3b54f8169d58ad660c8f13"/><file name="header.js" hash="53b9f4625f72a5e2d93edbc0129c1b82"/><file name="init.js" hash="e05d11b113604d27530c83bb9ff557cb"/><file name="obsolete.js" hash="7070d60eb56f8bdc04eecb6f5ec56a23"/><file name="rwd.js" hash="181993d80083e199d5fd5a0a4c77a154"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="css"><file name="mana_core.css" hash="cdc7b84e7e3e73b182cf7ed02bbc76a8"/></dir><dir name="images"><dir name="mana_core"><file name="m-wait.gif" hash="1ae32bc8232ff2527c627e5b38eb319a"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="jquery"><dir name="images"><file name="animated-overlay.gif" hash="2b912f7c0653008ca28ebacda49025e7"/><file name="ui-bg_diagonals-thick_18_b81900_40x40.png" hash="95f9cceeb9d742dd3e917ec16ed754f8"/><file name="ui-bg_diagonals-thick_20_666666_40x40.png" hash="f040b255ca13e693da34ab33c7d6b554"/><file name="ui-bg_flat_0_aaaaaa_40x100.png" hash="2a44fbdb7360c60122bcf6dcef0387d8"/><file name="ui-bg_flat_10_000000_40x100.png" hash="c18cd01623c7fed23c80d53e2f5e7c78"/><file name="ui-bg_flat_75_ffffff_40x100.png" hash="8692e6efddf882acbff144c38ea7dfdf"/><file name="ui-bg_glass_100_f6f6f6_1x400.png" hash="5f1847175ba18c41322cb9cb0581e0fb"/><file name="ui-bg_glass_100_fdf5ce_1x400.png" hash="d386adb3d23db4588a3271526a530f51"/><file name="ui-bg_glass_55_fbf9ee_1x400.png" hash="f8f4558e0b92ff2cd6136781533902ec"/><file name="ui-bg_glass_65_ffffff_1x400.png" hash="e5a8f32e28fd5c27bf0fed33c8a8b9b5"/><file name="ui-bg_glass_75_dadada_1x400.png" hash="c12c6510dad3ebfa64c8a30e959a2469"/><file name="ui-bg_glass_75_e6e6e6_1x400.png" hash="f4254356c2a8c9a383205ef2c4de22c4"/><file name="ui-bg_glass_95_fef1ec_1x400.png" hash="5a3be2d8fff8324d59aec3df7b0a0c83"/><file name="ui-bg_gloss-wave_35_f6a828_500x100.png" hash="34c616d227cbdaefd8a81534d6ca7813"/><file name="ui-bg_highlight-soft_100_eeeeee_1x100.png" hash="384c3f17709ba0f809b023b6e7b10b84"/><file name="ui-bg_highlight-soft_75_cccccc_1x100.png" hash="72c593d16e998952cd8d798fee33c6f3"/><file name="ui-bg_highlight-soft_75_ffe45c_1x100.png" hash="b806658954cb4d16ade8977af737f486"/><file name="ui-icons_222222_256x240.png" hash="9129e086dc488d8bcaf808510bc646ba"/><file name="ui-icons_228ef1_256x240.png" hash="79f41c0765e9ec18562b20b0801d748b"/><file name="ui-icons_2e83ff_256x240.png" hash="25162bf857a8eb83ea932a58436e1049"/><file name="ui-icons_454545_256x240.png" hash="771099482bdc1571ece41073b1752596"/><file name="ui-icons_888888_256x240.png" hash="faf6f5dc44e713178784c1fb053990aa"/><file name="ui-icons_cd0a0a_256x240.png" hash="5d8808d43cefca6f6781a5316d176632"/><file name="ui-icons_ef8c08_256x240.png" hash="380c866362e1e42896f973ea92f67013"/><file name="ui-icons_ffd27a_256x240.png" hash="2a20f483ddcbc84e6469ce5bbd280699"/><file name="ui-icons_ffffff_256x240.png" hash="342bc03f6264c75d3f1d7f99e34295b9"/></dir><file name="ui.css" hash="4ab351feeb25bfbcb84f61e722545525"/></dir><file name="mana_core.css" hash="56952f35ddb6a6d0c01ded9f510fb2cd"/><file name="mana_filters.css" hash="1d9769421d9cd76993bb033107363821"/></dir><dir name="images"><dir name="mana_core"><file name="m-wait.gif" hash="1ae32bc8232ff2527c627e5b38eb319a"/></dir></dir></dir></dir><dir name="rwd"><dir name="default"><dir name="css"><file name="mana_core.css" hash="c8533f81b029f25db3e3396cd75e779b"/><file name="mana_filters.css" hash="8b5cb1b1c480a051bed60ed64af2d790"/></dir><dir name="images"><dir name="mana_core"><file name="m-wait.gif" hash="79d9787b05ea3e0e5e1e7b23a357bca0"/></dir></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
skin/frontend/base/default/css/mana_core.css
CHANGED
@@ -59,4 +59,4 @@
|
|
59 |
z-index: 10000;
|
60 |
}
|
61 |
a.m-disabled { }
|
62 |
-
label span.m-disabled { }
|
59 |
z-index: 10000;
|
60 |
}
|
61 |
a.m-disabled { }
|
62 |
+
label span.m-disabled { }
|