From 275ee399ed30db3d07cc20def3d483444cb22af7 Mon Sep 17 00:00:00 2001 From: Purvesh Date: Fri, 15 Jun 2018 15:02:12 +1200 Subject: [PATCH 1/8] feature request of no of item in cart displayed in cart menu --- .../default/views/layouts/menu-tree.blade.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/themes/avored/default/views/layouts/menu-tree.blade.php b/themes/avored/default/views/layouts/menu-tree.blade.php index 8748356b0..1a7dfe497 100644 --- a/themes/avored/default/views/layouts/menu-tree.blade.php +++ b/themes/avored/default/views/layouts/menu-tree.blade.php @@ -9,9 +9,18 @@ $url = route($menu->route, $menu->params); } @endphp - - {{ $menu->name }} - + + @if($menu->route == "cart.view") + + {{ $menu->name }} {{ Cart::count() }} + + @else + + + {{ $menu->name }} + + @endif + @php $children = $menu->children(); From 678e0e8d86665e77c204515fc36094c21548d028 Mon Sep 17 00:00:00 2001 From: Purvesh Date: Sat, 16 Jun 2018 10:57:39 +1200 Subject: [PATCH 2/8] added menu and basic product unit test --- .../resources/views/forms/select.blade.php | 3 +- .../src/Http/Controllers/MenuController.php | 13 ++-- .../ecommerce/tests/Controller/MenuTest.php | 34 ++++++++ .../tests/Controller/ProductTest.php | 78 +++++++++++++++++++ 4 files changed, 118 insertions(+), 10 deletions(-) create mode 100644 modules/avored/ecommerce/tests/Controller/MenuTest.php create mode 100644 modules/avored/ecommerce/tests/Controller/ProductTest.php diff --git a/modules/avored/ecommerce/resources/views/forms/select.blade.php b/modules/avored/ecommerce/resources/views/forms/select.blade.php index 476b9ba2e..bd2c55441 100644 --- a/modules/avored/ecommerce/resources/views/forms/select.blade.php +++ b/modules/avored/ecommerce/resources/views/forms/select.blade.php @@ -3,11 +3,10 @@ if (isset($model) && $model->$name) { $value = $model->$name; } -$attributes['type'] = 'text'; $attributes['class'] = 'form-control'; $attributes['id'] = $name; $attributes['name'] = $name; -$attributes['value'] = $value; + if (isset($attributes)) { $attributes = array_merge($attributes, $attributes); } diff --git a/modules/avored/ecommerce/src/Http/Controllers/MenuController.php b/modules/avored/ecommerce/src/Http/Controllers/MenuController.php index 88ecaa9b2..f137680c9 100644 --- a/modules/avored/ecommerce/src/Http/Controllers/MenuController.php +++ b/modules/avored/ecommerce/src/Http/Controllers/MenuController.php @@ -6,12 +6,10 @@ use AvoRed\Framework\Models\Database\Category; use Illuminate\Http\Request; use AvoRed\Framework\Menu\Facade as MenuFacade; -use AvoRed\Ecommerce\Models\Repository\MenuRepository; use AvoRed\Ecommerce\Models\Contracts\MenuInterface; class MenuController extends Controller { - /** * * @var \AvoRed\Ecommerce\Models\Repository\MenuRepository @@ -23,7 +21,6 @@ public function __construct(MenuInterface $repository) $this->repository = $repository; } - /** * Display a listing of the resource. * @@ -33,7 +30,7 @@ public function index() { $frontMenus = MenuFacade::all(); $categories = Category::all(); - $menus = $this->repository->parentsAll(); + $menus = $this->repository->parentsAll(); return view('avored-ecommerce::menu.index') ->with('categories', $categories) @@ -48,12 +45,12 @@ public function index() */ public function store(Request $request) { - $menuJson = $request->get('menu_json'); - $menuArray = json_decode($menuJson); - + $menuJson = $request->get('menu_json'); + $menuArray = json_decode($menuJson); + $this->repository->truncateAndCreateMenus($menuArray); return redirect()->route('admin.menu.index') - ->with('notificationText','Menu Save Successfully!!'); + ->with('notificationText', 'Menu Save Successfully!!'); } } diff --git a/modules/avored/ecommerce/tests/Controller/MenuTest.php b/modules/avored/ecommerce/tests/Controller/MenuTest.php new file mode 100644 index 000000000..733f09d72 --- /dev/null +++ b/modules/avored/ecommerce/tests/Controller/MenuTest.php @@ -0,0 +1,34 @@ +_getAdminUser(); + $response = $this->actingAs($user, 'admin')->get(route('admin.menu.index')); + $response->assertStatus(200); + $response->assertSee('Menu'); + + // + $data['menu_json'] = '[[{ + "name": "Kitchen", + "params": "kitchen", + "route": "category.view", + "children": [ + [] + ] + }]]'; + $response = $this->post(route('admin.menu.store'), $data); + + $response->assertRedirect(route('admin.menu.index')); + } +} diff --git a/modules/avored/ecommerce/tests/Controller/ProductTest.php b/modules/avored/ecommerce/tests/Controller/ProductTest.php new file mode 100644 index 000000000..54b16891b --- /dev/null +++ b/modules/avored/ecommerce/tests/Controller/ProductTest.php @@ -0,0 +1,78 @@ +_getAdminUser(); + // Product Index Route + $response = $this->actingAs($user, 'admin')->get(route('admin.product.index')); + $response->assertStatus(200); + $response->assertSee('Product List'); + + // Product Create Route + $response = $this->get(route('admin.product.create')); + $response->assertStatus(200); + $response->assertSee('Create Product'); + + // Product Store Route + $data = $this->_getBasicDummyData(); + $response = $this->post(route('admin.product.store'), $data); + $model = Product::whereName('product test name')->first(); + $response->assertRedirect(route('admin.product.edit', $model->id)); + + + $categoryModel = $this->_getDummyCategory(); + $data['category_id'] = [$categoryModel->id]; + $data['sku'] = 'test-sku'; + $data['description'] = 'test description'; + $data['price'] = 10; + $data['status'] = 1; + $data['qty'] = 10; + $data['in_stock'] = 1; + $data['track_stock'] = 1; + $data['is_taxable'] = 1; + $data['weight'] = 1; + $data['height'] = 1; + $data['width'] = 1; + $data['length'] = 1; + + // Product Update Route + $response = $this->put(route('admin.product.update', $model->id), $data); + $response->assertRedirect(route('admin.product.index')); + + // Product Destroy Route + $this->delete(route('admin.product.destroy', $model->id)); + $response->assertRedirect(route('admin.product.index')); + + } + + private function _getBasicDummyData($updateData = null) + { + $data['name'] = 'product test name'; + $data['type'] = 'BASIC'; + + return $data; + } + private function _getDummyCategory($updateData = null) + { + $data['name'] = 'category name test'; + $data['slug'] = 'test-category-slug'; + + $categoryRep = app()->get(CategoryInterface::class); + + return $categoryRep->create($data); + + } +} From 71e33a66c0bc577f265c17f388f1951914339755 Mon Sep 17 00:00:00 2001 From: Purvesh Date: Wed, 20 Jun 2018 08:54:38 +1200 Subject: [PATCH 3/8] Start working on Multi Currency setup --- .../avored/ecommerce/assets/countries.json | 2871 ++++++++++++++++- ...7_03_29_000001_avored_ecommerce_schema.php | 25 +- .../ecommerce/resources/lang/en/currency.php | 7 + .../resources/views/currency/index.blade.php | 13 + modules/avored/ecommerce/routes/web.php | 4 + .../src/DataGrid/SiteCurrencyDataGrid.php | 36 + .../Http/Controllers/CurrencyController.php | 22 + .../ecommerce/src/Models/Database/Country.php | 3 + modules/avored/ecommerce/src/Provider.php | 6 + 9 files changed, 2983 insertions(+), 4 deletions(-) create mode 100644 modules/avored/ecommerce/resources/lang/en/currency.php create mode 100644 modules/avored/ecommerce/resources/views/currency/index.blade.php create mode 100644 modules/avored/ecommerce/src/DataGrid/SiteCurrencyDataGrid.php create mode 100644 modules/avored/ecommerce/src/Http/Controllers/CurrencyController.php diff --git a/modules/avored/ecommerce/assets/countries.json b/modules/avored/ecommerce/assets/countries.json index 6323567b6..5f4400e20 100644 --- a/modules/avored/ecommerce/assets/countries.json +++ b/modules/avored/ecommerce/assets/countries.json @@ -1 +1,2870 @@ -{"BD": "Bangladesh", "BE": "Belgium", "BF": "Burkina Faso", "BG": "Bulgaria", "BA": "Bosnia and Herzegovina", "BB": "Barbados", "WF": "Wallis and Futuna", "BL": "Saint Barthelemy", "BM": "Bermuda", "BN": "Brunei", "BO": "Bolivia", "BH": "Bahrain", "BI": "Burundi", "BJ": "Benin", "BT": "Bhutan", "JM": "Jamaica", "BV": "Bouvet Island", "BW": "Botswana", "WS": "Samoa", "BQ": "Bonaire, Saint Eustatius and Saba ", "BR": "Brazil", "BS": "Bahamas", "JE": "Jersey", "BY": "Belarus", "BZ": "Belize", "RU": "Russia", "RW": "Rwanda", "RS": "Serbia", "TL": "East Timor", "RE": "Reunion", "TM": "Turkmenistan", "TJ": "Tajikistan", "RO": "Romania", "TK": "Tokelau", "GW": "Guinea-Bissau", "GU": "Guam", "GT": "Guatemala", "GS": "South Georgia and the South Sandwich Islands", "GR": "Greece", "GQ": "Equatorial Guinea", "GP": "Guadeloupe", "JP": "Japan", "GY": "Guyana", "GG": "Guernsey", "GF": "French Guiana", "GE": "Georgia", "GD": "Grenada", "GB": "United Kingdom", "GA": "Gabon", "SV": "El Salvador", "GN": "Guinea", "GM": "Gambia", "GL": "Greenland", "GI": "Gibraltar", "GH": "Ghana", "OM": "Oman", "TN": "Tunisia", "JO": "Jordan", "HR": "Croatia", "HT": "Haiti", "HU": "Hungary", "HK": "Hong Kong", "HN": "Honduras", "HM": "Heard Island and McDonald Islands", "VE": "Venezuela", "PR": "Puerto Rico", "PS": "Palestinian Territory", "PW": "Palau", "PT": "Portugal", "SJ": "Svalbard and Jan Mayen", "PY": "Paraguay", "IQ": "Iraq", "PA": "Panama", "PF": "French Polynesia", "PG": "Papua New Guinea", "PE": "Peru", "PK": "Pakistan", "PH": "Philippines", "PN": "Pitcairn", "PL": "Poland", "PM": "Saint Pierre and Miquelon", "ZM": "Zambia", "EH": "Western Sahara", "EE": "Estonia", "EG": "Egypt", "ZA": "South Africa", "EC": "Ecuador", "IT": "Italy", "VN": "Vietnam", "SB": "Solomon Islands", "ET": "Ethiopia", "SO": "Somalia", "ZW": "Zimbabwe", "SA": "Saudi Arabia", "ES": "Spain", "ER": "Eritrea", "ME": "Montenegro", "MD": "Moldova", "MG": "Madagascar", "MF": "Saint Martin", "MA": "Morocco", "MC": "Monaco", "UZ": "Uzbekistan", "MM": "Myanmar", "ML": "Mali", "MO": "Macao", "MN": "Mongolia", "MH": "Marshall Islands", "MK": "Macedonia", "MU": "Mauritius", "MT": "Malta", "MW": "Malawi", "MV": "Maldives", "MQ": "Martinique", "MP": "Northern Mariana Islands", "MS": "Montserrat", "MR": "Mauritania", "IM": "Isle of Man", "UG": "Uganda", "TZ": "Tanzania", "MY": "Malaysia", "MX": "Mexico", "IL": "Israel", "FR": "France", "IO": "British Indian Ocean Territory", "SH": "Saint Helena", "FI": "Finland", "FJ": "Fiji", "FK": "Falkland Islands", "FM": "Micronesia", "FO": "Faroe Islands", "NI": "Nicaragua", "NL": "Netherlands", "NO": "Norway", "NA": "Namibia", "VU": "Vanuatu", "NC": "New Caledonia", "NE": "Niger", "NF": "Norfolk Island", "NG": "Nigeria", "NZ": "New Zealand", "NP": "Nepal", "NR": "Nauru", "NU": "Niue", "CK": "Cook Islands", "XK": "Kosovo", "CI": "Ivory Coast", "CH": "Switzerland", "CO": "Colombia", "CN": "China", "CM": "Cameroon", "CL": "Chile", "CC": "Cocos Islands", "CA": "Canada", "CG": "Republic of the Congo", "CF": "Central African Republic", "CD": "Democratic Republic of the Congo", "CZ": "Czech Republic", "CY": "Cyprus", "CX": "Christmas Island", "CR": "Costa Rica", "CW": "Curacao", "CV": "Cape Verde", "CU": "Cuba", "SZ": "Swaziland", "SY": "Syria", "SX": "Sint Maarten", "KG": "Kyrgyzstan", "KE": "Kenya", "SS": "South Sudan", "SR": "Suriname", "KI": "Kiribati", "KH": "Cambodia", "KN": "Saint Kitts and Nevis", "KM": "Comoros", "ST": "Sao Tome and Principe", "SK": "Slovakia", "KR": "South Korea", "SI": "Slovenia", "KP": "North Korea", "KW": "Kuwait", "SN": "Senegal", "SM": "San Marino", "SL": "Sierra Leone", "SC": "Seychelles", "KZ": "Kazakhstan", "KY": "Cayman Islands", "SG": "Singapore", "SE": "Sweden", "SD": "Sudan", "DO": "Dominican Republic", "DM": "Dominica", "DJ": "Djibouti", "DK": "Denmark", "VG": "British Virgin Islands", "DE": "Germany", "YE": "Yemen", "DZ": "Algeria", "US": "United States", "UY": "Uruguay", "YT": "Mayotte", "UM": "United States Minor Outlying Islands", "LB": "Lebanon", "LC": "Saint Lucia", "LA": "Laos", "TV": "Tuvalu", "TW": "Taiwan", "TT": "Trinidad and Tobago", "TR": "Turkey", "LK": "Sri Lanka", "LI": "Liechtenstein", "LV": "Latvia", "TO": "Tonga", "LT": "Lithuania", "LU": "Luxembourg", "LR": "Liberia", "LS": "Lesotho", "TH": "Thailand", "TF": "French Southern Territories", "TG": "Togo", "TD": "Chad", "TC": "Turks and Caicos Islands", "LY": "Libya", "VA": "Vatican", "VC": "Saint Vincent and the Grenadines", "AE": "United Arab Emirates", "AD": "Andorra", "AG": "Antigua and Barbuda", "AF": "Afghanistan", "AI": "Anguilla", "VI": "U.S. Virgin Islands", "IS": "Iceland", "IR": "Iran", "AM": "Armenia", "AL": "Albania", "AO": "Angola", "AQ": "Antarctica", "AS": "American Samoa", "AR": "Argentina", "AU": "Australia", "AT": "Austria", "AW": "Aruba", "IN": "India", "AX": "Aland Islands", "AZ": "Azerbaijan", "IE": "Ireland", "ID": "Indonesia", "UA": "Ukraine", "QA": "Qatar", "MZ": "Mozambique"} \ No newline at end of file +{ + "AD": { + "name": "Andorra", + "native": "Andorra", + "phone": "376", + "continent": "EU", + "capital": "Andorra la Vella", + "currency": "EUR", + "languages": [ + "ca" + ] + }, + "AE": { + "name": "United Arab Emirates", + "native": "دولة الإمارات العربية المتحدة", + "phone": "971", + "continent": "AS", + "capital": "Abu Dhabi", + "currency": "AED", + "languages": [ + "ar" + ] + }, + "AF": { + "name": "Afghanistan", + "native": "افغانستان", + "phone": "93", + "continent": "AS", + "capital": "Kabul", + "currency": "AFN", + "languages": [ + "ps", + "uz", + "tk" + ] + }, + "AG": { + "name": "Antigua and Barbuda", + "native": "Antigua and Barbuda", + "phone": "1268", + "continent": "NA", + "capital": "Saint John's", + "currency": "XCD", + "languages": [ + "en" + ] + }, + "AI": { + "name": "Anguilla", + "native": "Anguilla", + "phone": "1264", + "continent": "NA", + "capital": "The Valley", + "currency": "XCD", + "languages": [ + "en" + ] + }, + "AL": { + "name": "Albania", + "native": "Shqipëria", + "phone": "355", + "continent": "EU", + "capital": "Tirana", + "currency": "ALL", + "languages": [ + "sq" + ] + }, + "AM": { + "name": "Armenia", + "native": "Հայաստան", + "phone": "374", + "continent": "AS", + "capital": "Yerevan", + "currency": "AMD", + "languages": [ + "hy", + "ru" + ] + }, + "AO": { + "name": "Angola", + "native": "Angola", + "phone": "244", + "continent": "AF", + "capital": "Luanda", + "currency": "AOA", + "languages": [ + "pt" + ] + }, + "AQ": { + "name": "Antarctica", + "native": "Antarctica", + "phone": "672", + "continent": "AN", + "capital": "", + "currency": "", + "languages": [] + }, + "AR": { + "name": "Argentina", + "native": "Argentina", + "phone": "54", + "continent": "SA", + "capital": "Buenos Aires", + "currency": "ARS", + "languages": [ + "es", + "gn" + ] + }, + "AS": { + "name": "American Samoa", + "native": "American Samoa", + "phone": "1684", + "continent": "OC", + "capital": "Pago Pago", + "currency": "USD", + "languages": [ + "en", + "sm" + ] + }, + "AT": { + "name": "Austria", + "native": "Österreich", + "phone": "43", + "continent": "EU", + "capital": "Vienna", + "currency": "EUR", + "languages": [ + "de" + ] + }, + "AU": { + "name": "Australia", + "native": "Australia", + "phone": "61", + "continent": "OC", + "capital": "Canberra", + "currency": "AUD", + "languages": [ + "en" + ] + }, + "AW": { + "name": "Aruba", + "native": "Aruba", + "phone": "297", + "continent": "NA", + "capital": "Oranjestad", + "currency": "AWG", + "languages": [ + "nl", + "pa" + ] + }, + "AX": { + "name": "Åland", + "native": "Åland", + "phone": "358", + "continent": "EU", + "capital": "Mariehamn", + "currency": "EUR", + "languages": [ + "sv" + ] + }, + "AZ": { + "name": "Azerbaijan", + "native": "Azərbaycan", + "phone": "994", + "continent": "AS", + "capital": "Baku", + "currency": "AZN", + "languages": [ + "az" + ] + }, + "BA": { + "name": "Bosnia and Herzegovina", + "native": "Bosna i Hercegovina", + "phone": "387", + "continent": "EU", + "capital": "Sarajevo", + "currency": "BAM", + "languages": [ + "bs", + "hr", + "sr" + ] + }, + "BB": { + "name": "Barbados", + "native": "Barbados", + "phone": "1246", + "continent": "NA", + "capital": "Bridgetown", + "currency": "BBD", + "languages": [ + "en" + ] + }, + "BD": { + "name": "Bangladesh", + "native": "Bangladesh", + "phone": "880", + "continent": "AS", + "capital": "Dhaka", + "currency": "BDT", + "languages": [ + "bn" + ] + }, + "BE": { + "name": "Belgium", + "native": "België", + "phone": "32", + "continent": "EU", + "capital": "Brussels", + "currency": "EUR", + "languages": [ + "nl", + "fr", + "de" + ] + }, + "BF": { + "name": "Burkina Faso", + "native": "Burkina Faso", + "phone": "226", + "continent": "AF", + "capital": "Ouagadougou", + "currency": "XOF", + "languages": [ + "fr", + "ff" + ] + }, + "BG": { + "name": "Bulgaria", + "native": "България", + "phone": "359", + "continent": "EU", + "capital": "Sofia", + "currency": "BGN", + "languages": [ + "bg" + ] + }, + "BH": { + "name": "Bahrain", + "native": "‏البحرين", + "phone": "973", + "continent": "AS", + "capital": "Manama", + "currency": "BHD", + "languages": [ + "ar" + ] + }, + "BI": { + "name": "Burundi", + "native": "Burundi", + "phone": "257", + "continent": "AF", + "capital": "Bujumbura", + "currency": "BIF", + "languages": [ + "fr", + "rn" + ] + }, + "BJ": { + "name": "Benin", + "native": "Bénin", + "phone": "229", + "continent": "AF", + "capital": "Porto-Novo", + "currency": "XOF", + "languages": [ + "fr" + ] + }, + "BL": { + "name": "Saint Barthélemy", + "native": "Saint-Barthélemy", + "phone": "590", + "continent": "NA", + "capital": "Gustavia", + "currency": "EUR", + "languages": [ + "fr" + ] + }, + "BM": { + "name": "Bermuda", + "native": "Bermuda", + "phone": "1441", + "continent": "NA", + "capital": "Hamilton", + "currency": "BMD", + "languages": [ + "en" + ] + }, + "BN": { + "name": "Brunei", + "native": "Negara Brunei Darussalam", + "phone": "673", + "continent": "AS", + "capital": "Bandar Seri Begawan", + "currency": "BND", + "languages": [ + "ms" + ] + }, + "BO": { + "name": "Bolivia", + "native": "Bolivia", + "phone": "591", + "continent": "SA", + "capital": "Sucre", + "currency": "BOB,BOV", + "languages": [ + "es", + "ay", + "qu" + ] + }, + "BQ": { + "name": "Bonaire", + "native": "Bonaire", + "phone": "5997", + "continent": "NA", + "capital": "Kralendijk", + "currency": "USD", + "languages": [ + "nl" + ] + }, + "BR": { + "name": "Brazil", + "native": "Brasil", + "phone": "55", + "continent": "SA", + "capital": "Brasília", + "currency": "BRL", + "languages": [ + "pt" + ] + }, + "BS": { + "name": "Bahamas", + "native": "Bahamas", + "phone": "1242", + "continent": "NA", + "capital": "Nassau", + "currency": "BSD", + "languages": [ + "en" + ] + }, + "BT": { + "name": "Bhutan", + "native": "ʼbrug-yul", + "phone": "975", + "continent": "AS", + "capital": "Thimphu", + "currency": "BTN,INR", + "languages": [ + "dz" + ] + }, + "BV": { + "name": "Bouvet Island", + "native": "Bouvetøya", + "phone": "47", + "continent": "AN", + "capital": "", + "currency": "NOK", + "languages": [ + "no", + "nb", + "nn" + ] + }, + "BW": { + "name": "Botswana", + "native": "Botswana", + "phone": "267", + "continent": "AF", + "capital": "Gaborone", + "currency": "BWP", + "languages": [ + "en", + "tn" + ] + }, + "BY": { + "name": "Belarus", + "native": "Белару́сь", + "phone": "375", + "continent": "EU", + "capital": "Minsk", + "currency": "BYR", + "languages": [ + "be", + "ru" + ] + }, + "BZ": { + "name": "Belize", + "native": "Belize", + "phone": "501", + "continent": "NA", + "capital": "Belmopan", + "currency": "BZD", + "languages": [ + "en", + "es" + ] + }, + "CA": { + "name": "Canada", + "native": "Canada", + "phone": "1", + "continent": "NA", + "capital": "Ottawa", + "currency": "CAD", + "languages": [ + "en", + "fr" + ] + }, + "CC": { + "name": "Cocos [Keeling] Islands", + "native": "Cocos (Keeling) Islands", + "phone": "61", + "continent": "AS", + "capital": "West Island", + "currency": "AUD", + "languages": [ + "en" + ] + }, + "CD": { + "name": "Democratic Republic of the Congo", + "native": "République démocratique du Congo", + "phone": "243", + "continent": "AF", + "capital": "Kinshasa", + "currency": "CDF", + "languages": [ + "fr", + "ln", + "kg", + "sw", + "lu" + ] + }, + "CF": { + "name": "Central African Republic", + "native": "Ködörösêse tî Bêafrîka", + "phone": "236", + "continent": "AF", + "capital": "Bangui", + "currency": "XAF", + "languages": [ + "fr", + "sg" + ] + }, + "CG": { + "name": "Republic of the Congo", + "native": "République du Congo", + "phone": "242", + "continent": "AF", + "capital": "Brazzaville", + "currency": "XAF", + "languages": [ + "fr", + "ln" + ] + }, + "CH": { + "name": "Switzerland", + "native": "Schweiz", + "phone": "41", + "continent": "EU", + "capital": "Bern", + "currency": "CHE,CHF,CHW", + "languages": [ + "de", + "fr", + "it" + ] + }, + "CI": { + "name": "Ivory Coast", + "native": "Côte d'Ivoire", + "phone": "225", + "continent": "AF", + "capital": "Yamoussoukro", + "currency": "XOF", + "languages": [ + "fr" + ] + }, + "CK": { + "name": "Cook Islands", + "native": "Cook Islands", + "phone": "682", + "continent": "OC", + "capital": "Avarua", + "currency": "NZD", + "languages": [ + "en" + ] + }, + "CL": { + "name": "Chile", + "native": "Chile", + "phone": "56", + "continent": "SA", + "capital": "Santiago", + "currency": "CLF,CLP", + "languages": [ + "es" + ] + }, + "CM": { + "name": "Cameroon", + "native": "Cameroon", + "phone": "237", + "continent": "AF", + "capital": "Yaoundé", + "currency": "XAF", + "languages": [ + "en", + "fr" + ] + }, + "CN": { + "name": "China", + "native": "中国", + "phone": "86", + "continent": "AS", + "capital": "Beijing", + "currency": "CNY", + "languages": [ + "zh" + ] + }, + "CO": { + "name": "Colombia", + "native": "Colombia", + "phone": "57", + "continent": "SA", + "capital": "Bogotá", + "currency": "COP", + "languages": [ + "es" + ] + }, + "CR": { + "name": "Costa Rica", + "native": "Costa Rica", + "phone": "506", + "continent": "NA", + "capital": "San José", + "currency": "CRC", + "languages": [ + "es" + ] + }, + "CU": { + "name": "Cuba", + "native": "Cuba", + "phone": "53", + "continent": "NA", + "capital": "Havana", + "currency": "CUC,CUP", + "languages": [ + "es" + ] + }, + "CV": { + "name": "Cape Verde", + "native": "Cabo Verde", + "phone": "238", + "continent": "AF", + "capital": "Praia", + "currency": "CVE", + "languages": [ + "pt" + ] + }, + "CW": { + "name": "Curacao", + "native": "Curaçao", + "phone": "5999", + "continent": "NA", + "capital": "Willemstad", + "currency": "ANG", + "languages": [ + "nl", + "pa", + "en" + ] + }, + "CX": { + "name": "Christmas Island", + "native": "Christmas Island", + "phone": "61", + "continent": "AS", + "capital": "Flying Fish Cove", + "currency": "AUD", + "languages": [ + "en" + ] + }, + "CY": { + "name": "Cyprus", + "native": "Κύπρος", + "phone": "357", + "continent": "EU", + "capital": "Nicosia", + "currency": "EUR", + "languages": [ + "el", + "tr", + "hy" + ] + }, + "CZ": { + "name": "Czech Republic", + "native": "Česká republika", + "phone": "420", + "continent": "EU", + "capital": "Prague", + "currency": "CZK", + "languages": [ + "cs", + "sk" + ] + }, + "DE": { + "name": "Germany", + "native": "Deutschland", + "phone": "49", + "continent": "EU", + "capital": "Berlin", + "currency": "EUR", + "languages": [ + "de" + ] + }, + "DJ": { + "name": "Djibouti", + "native": "Djibouti", + "phone": "253", + "continent": "AF", + "capital": "Djibouti", + "currency": "DJF", + "languages": [ + "fr", + "ar" + ] + }, + "DK": { + "name": "Denmark", + "native": "Danmark", + "phone": "45", + "continent": "EU", + "capital": "Copenhagen", + "currency": "DKK", + "languages": [ + "da" + ] + }, + "DM": { + "name": "Dominica", + "native": "Dominica", + "phone": "1767", + "continent": "NA", + "capital": "Roseau", + "currency": "XCD", + "languages": [ + "en" + ] + }, + "DO": { + "name": "Dominican Republic", + "native": "República Dominicana", + "phone": "1809,1829,1849", + "continent": "NA", + "capital": "Santo Domingo", + "currency": "DOP", + "languages": [ + "es" + ] + }, + "DZ": { + "name": "Algeria", + "native": "الجزائر", + "phone": "213", + "continent": "AF", + "capital": "Algiers", + "currency": "DZD", + "languages": [ + "ar" + ] + }, + "EC": { + "name": "Ecuador", + "native": "Ecuador", + "phone": "593", + "continent": "SA", + "capital": "Quito", + "currency": "USD", + "languages": [ + "es" + ] + }, + "EE": { + "name": "Estonia", + "native": "Eesti", + "phone": "372", + "continent": "EU", + "capital": "Tallinn", + "currency": "EUR", + "languages": [ + "et" + ] + }, + "EG": { + "name": "Egypt", + "native": "مصر‎", + "phone": "20", + "continent": "AF", + "capital": "Cairo", + "currency": "EGP", + "languages": [ + "ar" + ] + }, + "EH": { + "name": "Western Sahara", + "native": "الصحراء الغربية", + "phone": "212", + "continent": "AF", + "capital": "El Aaiún", + "currency": "MAD,DZD,MRO", + "languages": [ + "es" + ] + }, + "ER": { + "name": "Eritrea", + "native": "ኤርትራ", + "phone": "291", + "continent": "AF", + "capital": "Asmara", + "currency": "ERN", + "languages": [ + "ti", + "ar", + "en" + ] + }, + "ES": { + "name": "Spain", + "native": "España", + "phone": "34", + "continent": "EU", + "capital": "Madrid", + "currency": "EUR", + "languages": [ + "es", + "eu", + "ca", + "gl", + "oc" + ] + }, + "ET": { + "name": "Ethiopia", + "native": "ኢትዮጵያ", + "phone": "251", + "continent": "AF", + "capital": "Addis Ababa", + "currency": "ETB", + "languages": [ + "am" + ] + }, + "FI": { + "name": "Finland", + "native": "Suomi", + "phone": "358", + "continent": "EU", + "capital": "Helsinki", + "currency": "EUR", + "languages": [ + "fi", + "sv" + ] + }, + "FJ": { + "name": "Fiji", + "native": "Fiji", + "phone": "679", + "continent": "OC", + "capital": "Suva", + "currency": "FJD", + "languages": [ + "en", + "fj", + "hi", + "ur" + ] + }, + "FK": { + "name": "Falkland Islands", + "native": "Falkland Islands", + "phone": "500", + "continent": "SA", + "capital": "Stanley", + "currency": "FKP", + "languages": [ + "en" + ] + }, + "FM": { + "name": "Micronesia", + "native": "Micronesia", + "phone": "691", + "continent": "OC", + "capital": "Palikir", + "currency": "USD", + "languages": [ + "en" + ] + }, + "FO": { + "name": "Faroe Islands", + "native": "Føroyar", + "phone": "298", + "continent": "EU", + "capital": "Tórshavn", + "currency": "DKK", + "languages": [ + "fo" + ] + }, + "FR": { + "name": "France", + "native": "France", + "phone": "33", + "continent": "EU", + "capital": "Paris", + "currency": "EUR", + "languages": [ + "fr" + ] + }, + "GA": { + "name": "Gabon", + "native": "Gabon", + "phone": "241", + "continent": "AF", + "capital": "Libreville", + "currency": "XAF", + "languages": [ + "fr" + ] + }, + "GB": { + "name": "United Kingdom", + "native": "United Kingdom", + "phone": "44", + "continent": "EU", + "capital": "London", + "currency": "GBP", + "languages": [ + "en" + ] + }, + "GD": { + "name": "Grenada", + "native": "Grenada", + "phone": "1473", + "continent": "NA", + "capital": "St. George's", + "currency": "XCD", + "languages": [ + "en" + ] + }, + "GE": { + "name": "Georgia", + "native": "საქართველო", + "phone": "995", + "continent": "AS", + "capital": "Tbilisi", + "currency": "GEL", + "languages": [ + "ka" + ] + }, + "GF": { + "name": "French Guiana", + "native": "Guyane française", + "phone": "594", + "continent": "SA", + "capital": "Cayenne", + "currency": "EUR", + "languages": [ + "fr" + ] + }, + "GG": { + "name": "Guernsey", + "native": "Guernsey", + "phone": "44", + "continent": "EU", + "capital": "St. Peter Port", + "currency": "GBP", + "languages": [ + "en", + "fr" + ] + }, + "GH": { + "name": "Ghana", + "native": "Ghana", + "phone": "233", + "continent": "AF", + "capital": "Accra", + "currency": "GHS", + "languages": [ + "en" + ] + }, + "GI": { + "name": "Gibraltar", + "native": "Gibraltar", + "phone": "350", + "continent": "EU", + "capital": "Gibraltar", + "currency": "GIP", + "languages": [ + "en" + ] + }, + "GL": { + "name": "Greenland", + "native": "Kalaallit Nunaat", + "phone": "299", + "continent": "NA", + "capital": "Nuuk", + "currency": "DKK", + "languages": [ + "kl" + ] + }, + "GM": { + "name": "Gambia", + "native": "Gambia", + "phone": "220", + "continent": "AF", + "capital": "Banjul", + "currency": "GMD", + "languages": [ + "en" + ] + }, + "GN": { + "name": "Guinea", + "native": "Guinée", + "phone": "224", + "continent": "AF", + "capital": "Conakry", + "currency": "GNF", + "languages": [ + "fr", + "ff" + ] + }, + "GP": { + "name": "Guadeloupe", + "native": "Guadeloupe", + "phone": "590", + "continent": "NA", + "capital": "Basse-Terre", + "currency": "EUR", + "languages": [ + "fr" + ] + }, + "GQ": { + "name": "Equatorial Guinea", + "native": "Guinea Ecuatorial", + "phone": "240", + "continent": "AF", + "capital": "Malabo", + "currency": "XAF", + "languages": [ + "es", + "fr" + ] + }, + "GR": { + "name": "Greece", + "native": "Ελλάδα", + "phone": "30", + "continent": "EU", + "capital": "Athens", + "currency": "EUR", + "languages": [ + "el" + ] + }, + "GS": { + "name": "South Georgia and the South Sandwich Islands", + "native": "South Georgia", + "phone": "500", + "continent": "AN", + "capital": "King Edward Point", + "currency": "GBP", + "languages": [ + "en" + ] + }, + "GT": { + "name": "Guatemala", + "native": "Guatemala", + "phone": "502", + "continent": "NA", + "capital": "Guatemala City", + "currency": "GTQ", + "languages": [ + "es" + ] + }, + "GU": { + "name": "Guam", + "native": "Guam", + "phone": "1671", + "continent": "OC", + "capital": "Hagåtña", + "currency": "USD", + "languages": [ + "en", + "ch", + "es" + ] + }, + "GW": { + "name": "Guinea-Bissau", + "native": "Guiné-Bissau", + "phone": "245", + "continent": "AF", + "capital": "Bissau", + "currency": "XOF", + "languages": [ + "pt" + ] + }, + "GY": { + "name": "Guyana", + "native": "Guyana", + "phone": "592", + "continent": "SA", + "capital": "Georgetown", + "currency": "GYD", + "languages": [ + "en" + ] + }, + "HK": { + "name": "Hong Kong", + "native": "香港", + "phone": "852", + "continent": "AS", + "capital": "City of Victoria", + "currency": "HKD", + "languages": [ + "zh", + "en" + ] + }, + "HM": { + "name": "Heard Island and McDonald Islands", + "native": "Heard Island and McDonald Islands", + "phone": "61", + "continent": "AN", + "capital": "", + "currency": "AUD", + "languages": [ + "en" + ] + }, + "HN": { + "name": "Honduras", + "native": "Honduras", + "phone": "504", + "continent": "NA", + "capital": "Tegucigalpa", + "currency": "HNL", + "languages": [ + "es" + ] + }, + "HR": { + "name": "Croatia", + "native": "Hrvatska", + "phone": "385", + "continent": "EU", + "capital": "Zagreb", + "currency": "HRK", + "languages": [ + "hr" + ] + }, + "HT": { + "name": "Haiti", + "native": "Haïti", + "phone": "509", + "continent": "NA", + "capital": "Port-au-Prince", + "currency": "HTG,USD", + "languages": [ + "fr", + "ht" + ] + }, + "HU": { + "name": "Hungary", + "native": "Magyarország", + "phone": "36", + "continent": "EU", + "capital": "Budapest", + "currency": "HUF", + "languages": [ + "hu" + ] + }, + "ID": { + "name": "Indonesia", + "native": "Indonesia", + "phone": "62", + "continent": "AS", + "capital": "Jakarta", + "currency": "IDR", + "languages": [ + "id" + ] + }, + "IE": { + "name": "Ireland", + "native": "Éire", + "phone": "353", + "continent": "EU", + "capital": "Dublin", + "currency": "EUR", + "languages": [ + "ga", + "en" + ] + }, + "IL": { + "name": "Israel", + "native": "יִשְׂרָאֵל", + "phone": "972", + "continent": "AS", + "capital": "Jerusalem", + "currency": "ILS", + "languages": [ + "he", + "ar" + ] + }, + "IM": { + "name": "Isle of Man", + "native": "Isle of Man", + "phone": "44", + "continent": "EU", + "capital": "Douglas", + "currency": "GBP", + "languages": [ + "en", + "gv" + ] + }, + "IN": { + "name": "India", + "native": "भारत", + "phone": "91", + "continent": "AS", + "capital": "New Delhi", + "currency": "INR", + "languages": [ + "hi", + "en" + ] + }, + "IO": { + "name": "British Indian Ocean Territory", + "native": "British Indian Ocean Territory", + "phone": "246", + "continent": "AS", + "capital": "Diego Garcia", + "currency": "USD", + "languages": [ + "en" + ] + }, + "IQ": { + "name": "Iraq", + "native": "العراق", + "phone": "964", + "continent": "AS", + "capital": "Baghdad", + "currency": "IQD", + "languages": [ + "ar", + "ku" + ] + }, + "IR": { + "name": "Iran", + "native": "ایران", + "phone": "98", + "continent": "AS", + "capital": "Tehran", + "currency": "IRR", + "languages": [ + "fa" + ] + }, + "IS": { + "name": "Iceland", + "native": "Ísland", + "phone": "354", + "continent": "EU", + "capital": "Reykjavik", + "currency": "ISK", + "languages": [ + "is" + ] + }, + "IT": { + "name": "Italy", + "native": "Italia", + "phone": "39", + "continent": "EU", + "capital": "Rome", + "currency": "EUR", + "languages": [ + "it" + ] + }, + "JE": { + "name": "Jersey", + "native": "Jersey", + "phone": "44", + "continent": "EU", + "capital": "Saint Helier", + "currency": "GBP", + "languages": [ + "en", + "fr" + ] + }, + "JM": { + "name": "Jamaica", + "native": "Jamaica", + "phone": "1876", + "continent": "NA", + "capital": "Kingston", + "currency": "JMD", + "languages": [ + "en" + ] + }, + "JO": { + "name": "Jordan", + "native": "الأردن", + "phone": "962", + "continent": "AS", + "capital": "Amman", + "currency": "JOD", + "languages": [ + "ar" + ] + }, + "JP": { + "name": "Japan", + "native": "日本", + "phone": "81", + "continent": "AS", + "capital": "Tokyo", + "currency": "JPY", + "languages": [ + "ja" + ] + }, + "KE": { + "name": "Kenya", + "native": "Kenya", + "phone": "254", + "continent": "AF", + "capital": "Nairobi", + "currency": "KES", + "languages": [ + "en", + "sw" + ] + }, + "KG": { + "name": "Kyrgyzstan", + "native": "Кыргызстан", + "phone": "996", + "continent": "AS", + "capital": "Bishkek", + "currency": "KGS", + "languages": [ + "ky", + "ru" + ] + }, + "KH": { + "name": "Cambodia", + "native": "Kâmpŭchéa", + "phone": "855", + "continent": "AS", + "capital": "Phnom Penh", + "currency": "KHR", + "languages": [ + "km" + ] + }, + "KI": { + "name": "Kiribati", + "native": "Kiribati", + "phone": "686", + "continent": "OC", + "capital": "South Tarawa", + "currency": "AUD", + "languages": [ + "en" + ] + }, + "KM": { + "name": "Comoros", + "native": "Komori", + "phone": "269", + "continent": "AF", + "capital": "Moroni", + "currency": "KMF", + "languages": [ + "ar", + "fr" + ] + }, + "KN": { + "name": "Saint Kitts and Nevis", + "native": "Saint Kitts and Nevis", + "phone": "1869", + "continent": "NA", + "capital": "Basseterre", + "currency": "XCD", + "languages": [ + "en" + ] + }, + "KP": { + "name": "North Korea", + "native": "북한", + "phone": "850", + "continent": "AS", + "capital": "Pyongyang", + "currency": "KPW", + "languages": [ + "ko" + ] + }, + "KR": { + "name": "South Korea", + "native": "대한민국", + "phone": "82", + "continent": "AS", + "capital": "Seoul", + "currency": "KRW", + "languages": [ + "ko" + ] + }, + "KW": { + "name": "Kuwait", + "native": "الكويت", + "phone": "965", + "continent": "AS", + "capital": "Kuwait City", + "currency": "KWD", + "languages": [ + "ar" + ] + }, + "KY": { + "name": "Cayman Islands", + "native": "Cayman Islands", + "phone": "1345", + "continent": "NA", + "capital": "George Town", + "currency": "KYD", + "languages": [ + "en" + ] + }, + "KZ": { + "name": "Kazakhstan", + "native": "Қазақстан", + "phone": "76,77", + "continent": "AS", + "capital": "Astana", + "currency": "KZT", + "languages": [ + "kk", + "ru" + ] + }, + "LA": { + "name": "Laos", + "native": "ສປປລາວ", + "phone": "856", + "continent": "AS", + "capital": "Vientiane", + "currency": "LAK", + "languages": [ + "lo" + ] + }, + "LB": { + "name": "Lebanon", + "native": "لبنان", + "phone": "961", + "continent": "AS", + "capital": "Beirut", + "currency": "LBP", + "languages": [ + "ar", + "fr" + ] + }, + "LC": { + "name": "Saint Lucia", + "native": "Saint Lucia", + "phone": "1758", + "continent": "NA", + "capital": "Castries", + "currency": "XCD", + "languages": [ + "en" + ] + }, + "LI": { + "name": "Liechtenstein", + "native": "Liechtenstein", + "phone": "423", + "continent": "EU", + "capital": "Vaduz", + "currency": "CHF", + "languages": [ + "de" + ] + }, + "LK": { + "name": "Sri Lanka", + "native": "śrī laṃkāva", + "phone": "94", + "continent": "AS", + "capital": "Colombo", + "currency": "LKR", + "languages": [ + "si", + "ta" + ] + }, + "LR": { + "name": "Liberia", + "native": "Liberia", + "phone": "231", + "continent": "AF", + "capital": "Monrovia", + "currency": "LRD", + "languages": [ + "en" + ] + }, + "LS": { + "name": "Lesotho", + "native": "Lesotho", + "phone": "266", + "continent": "AF", + "capital": "Maseru", + "currency": "LSL,ZAR", + "languages": [ + "en", + "st" + ] + }, + "LT": { + "name": "Lithuania", + "native": "Lietuva", + "phone": "370", + "continent": "EU", + "capital": "Vilnius", + "currency": "LTL", + "languages": [ + "lt" + ] + }, + "LU": { + "name": "Luxembourg", + "native": "Luxembourg", + "phone": "352", + "continent": "EU", + "capital": "Luxembourg", + "currency": "EUR", + "languages": [ + "fr", + "de", + "lb" + ] + }, + "LV": { + "name": "Latvia", + "native": "Latvija", + "phone": "371", + "continent": "EU", + "capital": "Riga", + "currency": "EUR", + "languages": [ + "lv" + ] + }, + "LY": { + "name": "Libya", + "native": "‏ليبيا", + "phone": "218", + "continent": "AF", + "capital": "Tripoli", + "currency": "LYD", + "languages": [ + "ar" + ] + }, + "MA": { + "name": "Morocco", + "native": "المغرب", + "phone": "212", + "continent": "AF", + "capital": "Rabat", + "currency": "MAD", + "languages": [ + "ar" + ] + }, + "MC": { + "name": "Monaco", + "native": "Monaco", + "phone": "377", + "continent": "EU", + "capital": "Monaco", + "currency": "EUR", + "languages": [ + "fr" + ] + }, + "MD": { + "name": "Moldova", + "native": "Moldova", + "phone": "373", + "continent": "EU", + "capital": "Chișinău", + "currency": "MDL", + "languages": [ + "ro" + ] + }, + "ME": { + "name": "Montenegro", + "native": "Црна Гора", + "phone": "382", + "continent": "EU", + "capital": "Podgorica", + "currency": "EUR", + "languages": [ + "sr", + "bs", + "sq", + "hr" + ] + }, + "MF": { + "name": "Saint Martin", + "native": "Saint-Martin", + "phone": "590", + "continent": "NA", + "capital": "Marigot", + "currency": "EUR", + "languages": [ + "en", + "fr", + "nl" + ] + }, + "MG": { + "name": "Madagascar", + "native": "Madagasikara", + "phone": "261", + "continent": "AF", + "capital": "Antananarivo", + "currency": "MGA", + "languages": [ + "fr", + "mg" + ] + }, + "MH": { + "name": "Marshall Islands", + "native": "M̧ajeļ", + "phone": "692", + "continent": "OC", + "capital": "Majuro", + "currency": "USD", + "languages": [ + "en", + "mh" + ] + }, + "MK": { + "name": "Macedonia", + "native": "Македонија", + "phone": "389", + "continent": "EU", + "capital": "Skopje", + "currency": "MKD", + "languages": [ + "mk" + ] + }, + "ML": { + "name": "Mali", + "native": "Mali", + "phone": "223", + "continent": "AF", + "capital": "Bamako", + "currency": "XOF", + "languages": [ + "fr" + ] + }, + "MM": { + "name": "Myanmar [Burma]", + "native": "Myanma", + "phone": "95", + "continent": "AS", + "capital": "Naypyidaw", + "currency": "MMK", + "languages": [ + "my" + ] + }, + "MN": { + "name": "Mongolia", + "native": "Монгол улс", + "phone": "976", + "continent": "AS", + "capital": "Ulan Bator", + "currency": "MNT", + "languages": [ + "mn" + ] + }, + "MO": { + "name": "Macao", + "native": "澳門", + "phone": "853", + "continent": "AS", + "capital": "", + "currency": "MOP", + "languages": [ + "zh", + "pt" + ] + }, + "MP": { + "name": "Northern Mariana Islands", + "native": "Northern Mariana Islands", + "phone": "1670", + "continent": "OC", + "capital": "Saipan", + "currency": "USD", + "languages": [ + "en", + "ch" + ] + }, + "MQ": { + "name": "Martinique", + "native": "Martinique", + "phone": "596", + "continent": "NA", + "capital": "Fort-de-France", + "currency": "EUR", + "languages": [ + "fr" + ] + }, + "MR": { + "name": "Mauritania", + "native": "موريتانيا", + "phone": "222", + "continent": "AF", + "capital": "Nouakchott", + "currency": "MRO", + "languages": [ + "ar" + ] + }, + "MS": { + "name": "Montserrat", + "native": "Montserrat", + "phone": "1664", + "continent": "NA", + "capital": "Plymouth", + "currency": "XCD", + "languages": [ + "en" + ] + }, + "MT": { + "name": "Malta", + "native": "Malta", + "phone": "356", + "continent": "EU", + "capital": "Valletta", + "currency": "EUR", + "languages": [ + "mt", + "en" + ] + }, + "MU": { + "name": "Mauritius", + "native": "Maurice", + "phone": "230", + "continent": "AF", + "capital": "Port Louis", + "currency": "MUR", + "languages": [ + "en" + ] + }, + "MV": { + "name": "Maldives", + "native": "Maldives", + "phone": "960", + "continent": "AS", + "capital": "Malé", + "currency": "MVR", + "languages": [ + "dv" + ] + }, + "MW": { + "name": "Malawi", + "native": "Malawi", + "phone": "265", + "continent": "AF", + "capital": "Lilongwe", + "currency": "MWK", + "languages": [ + "en", + "ny" + ] + }, + "MX": { + "name": "Mexico", + "native": "México", + "phone": "52", + "continent": "NA", + "capital": "Mexico City", + "currency": "MXN", + "languages": [ + "es" + ] + }, + "MY": { + "name": "Malaysia", + "native": "Malaysia", + "phone": "60", + "continent": "AS", + "capital": "Kuala Lumpur", + "currency": "MYR", + "languages": [ + "ms" + ] + }, + "MZ": { + "name": "Mozambique", + "native": "Moçambique", + "phone": "258", + "continent": "AF", + "capital": "Maputo", + "currency": "MZN", + "languages": [ + "pt" + ] + }, + "NA": { + "name": "Namibia", + "native": "Namibia", + "phone": "264", + "continent": "AF", + "capital": "Windhoek", + "currency": "NAD,ZAR", + "languages": [ + "en", + "af" + ] + }, + "NC": { + "name": "New Caledonia", + "native": "Nouvelle-Calédonie", + "phone": "687", + "continent": "OC", + "capital": "Nouméa", + "currency": "XPF", + "languages": [ + "fr" + ] + }, + "NE": { + "name": "Niger", + "native": "Niger", + "phone": "227", + "continent": "AF", + "capital": "Niamey", + "currency": "XOF", + "languages": [ + "fr" + ] + }, + "NF": { + "name": "Norfolk Island", + "native": "Norfolk Island", + "phone": "672", + "continent": "OC", + "capital": "Kingston", + "currency": "AUD", + "languages": [ + "en" + ] + }, + "NG": { + "name": "Nigeria", + "native": "Nigeria", + "phone": "234", + "continent": "AF", + "capital": "Abuja", + "currency": "NGN", + "languages": [ + "en" + ] + }, + "NI": { + "name": "Nicaragua", + "native": "Nicaragua", + "phone": "505", + "continent": "NA", + "capital": "Managua", + "currency": "NIO", + "languages": [ + "es" + ] + }, + "NL": { + "name": "Netherlands", + "native": "Nederland", + "phone": "31", + "continent": "EU", + "capital": "Amsterdam", + "currency": "EUR", + "languages": [ + "nl" + ] + }, + "NO": { + "name": "Norway", + "native": "Norge", + "phone": "47", + "continent": "EU", + "capital": "Oslo", + "currency": "NOK", + "languages": [ + "no", + "nb", + "nn" + ] + }, + "NP": { + "name": "Nepal", + "native": "नपल", + "phone": "977", + "continent": "AS", + "capital": "Kathmandu", + "currency": "NPR", + "languages": [ + "ne" + ] + }, + "NR": { + "name": "Nauru", + "native": "Nauru", + "phone": "674", + "continent": "OC", + "capital": "Yaren", + "currency": "AUD", + "languages": [ + "en", + "na" + ] + }, + "NU": { + "name": "Niue", + "native": "Niuē", + "phone": "683", + "continent": "OC", + "capital": "Alofi", + "currency": "NZD", + "languages": [ + "en" + ] + }, + "NZ": { + "name": "New Zealand", + "native": "New Zealand", + "phone": "64", + "continent": "OC", + "capital": "Wellington", + "currency": "NZD", + "languages": [ + "en", + "mi" + ] + }, + "OM": { + "name": "Oman", + "native": "عمان", + "phone": "968", + "continent": "AS", + "capital": "Muscat", + "currency": "OMR", + "languages": [ + "ar" + ] + }, + "PA": { + "name": "Panama", + "native": "Panamá", + "phone": "507", + "continent": "NA", + "capital": "Panama City", + "currency": "PAB,USD", + "languages": [ + "es" + ] + }, + "PE": { + "name": "Peru", + "native": "Perú", + "phone": "51", + "continent": "SA", + "capital": "Lima", + "currency": "PEN", + "languages": [ + "es" + ] + }, + "PF": { + "name": "French Polynesia", + "native": "Polynésie française", + "phone": "689", + "continent": "OC", + "capital": "Papeetē", + "currency": "XPF", + "languages": [ + "fr" + ] + }, + "PG": { + "name": "Papua New Guinea", + "native": "Papua Niugini", + "phone": "675", + "continent": "OC", + "capital": "Port Moresby", + "currency": "PGK", + "languages": [ + "en" + ] + }, + "PH": { + "name": "Philippines", + "native": "Pilipinas", + "phone": "63", + "continent": "AS", + "capital": "Manila", + "currency": "PHP", + "languages": [ + "en" + ] + }, + "PK": { + "name": "Pakistan", + "native": "Pakistan", + "phone": "92", + "continent": "AS", + "capital": "Islamabad", + "currency": "PKR", + "languages": [ + "en", + "ur" + ] + }, + "PL": { + "name": "Poland", + "native": "Polska", + "phone": "48", + "continent": "EU", + "capital": "Warsaw", + "currency": "PLN", + "languages": [ + "pl" + ] + }, + "PM": { + "name": "Saint Pierre and Miquelon", + "native": "Saint-Pierre-et-Miquelon", + "phone": "508", + "continent": "NA", + "capital": "Saint-Pierre", + "currency": "EUR", + "languages": [ + "fr" + ] + }, + "PN": { + "name": "Pitcairn Islands", + "native": "Pitcairn Islands", + "phone": "64", + "continent": "OC", + "capital": "Adamstown", + "currency": "NZD", + "languages": [ + "en" + ] + }, + "PR": { + "name": "Puerto Rico", + "native": "Puerto Rico", + "phone": "1787,1939", + "continent": "NA", + "capital": "San Juan", + "currency": "USD", + "languages": [ + "es", + "en" + ] + }, + "PS": { + "name": "Palestine", + "native": "فلسطين", + "phone": "970", + "continent": "AS", + "capital": "Ramallah", + "currency": "ILS", + "languages": [ + "ar" + ] + }, + "PT": { + "name": "Portugal", + "native": "Portugal", + "phone": "351", + "continent": "EU", + "capital": "Lisbon", + "currency": "EUR", + "languages": [ + "pt" + ] + }, + "PW": { + "name": "Palau", + "native": "Palau", + "phone": "680", + "continent": "OC", + "capital": "Ngerulmud", + "currency": "USD", + "languages": [ + "en" + ] + }, + "PY": { + "name": "Paraguay", + "native": "Paraguay", + "phone": "595", + "continent": "SA", + "capital": "Asunción", + "currency": "PYG", + "languages": [ + "es", + "gn" + ] + }, + "QA": { + "name": "Qatar", + "native": "قطر", + "phone": "974", + "continent": "AS", + "capital": "Doha", + "currency": "QAR", + "languages": [ + "ar" + ] + }, + "RE": { + "name": "Réunion", + "native": "La Réunion", + "phone": "262", + "continent": "AF", + "capital": "Saint-Denis", + "currency": "EUR", + "languages": [ + "fr" + ] + }, + "RO": { + "name": "Romania", + "native": "România", + "phone": "40", + "continent": "EU", + "capital": "Bucharest", + "currency": "RON", + "languages": [ + "ro" + ] + }, + "RS": { + "name": "Serbia", + "native": "Србија", + "phone": "381", + "continent": "EU", + "capital": "Belgrade", + "currency": "RSD", + "languages": [ + "sr" + ] + }, + "RU": { + "name": "Russia", + "native": "Россия", + "phone": "7", + "continent": "EU", + "capital": "Moscow", + "currency": "RUB", + "languages": [ + "ru" + ] + }, + "RW": { + "name": "Rwanda", + "native": "Rwanda", + "phone": "250", + "continent": "AF", + "capital": "Kigali", + "currency": "RWF", + "languages": [ + "rw", + "en", + "fr" + ] + }, + "SA": { + "name": "Saudi Arabia", + "native": "العربية السعودية", + "phone": "966", + "continent": "AS", + "capital": "Riyadh", + "currency": "SAR", + "languages": [ + "ar" + ] + }, + "SB": { + "name": "Solomon Islands", + "native": "Solomon Islands", + "phone": "677", + "continent": "OC", + "capital": "Honiara", + "currency": "SBD", + "languages": [ + "en" + ] + }, + "SC": { + "name": "Seychelles", + "native": "Seychelles", + "phone": "248", + "continent": "AF", + "capital": "Victoria", + "currency": "SCR", + "languages": [ + "fr", + "en" + ] + }, + "SD": { + "name": "Sudan", + "native": "السودان", + "phone": "249", + "continent": "AF", + "capital": "Khartoum", + "currency": "SDG", + "languages": [ + "ar", + "en" + ] + }, + "SE": { + "name": "Sweden", + "native": "Sverige", + "phone": "46", + "continent": "EU", + "capital": "Stockholm", + "currency": "SEK", + "languages": [ + "sv" + ] + }, + "SG": { + "name": "Singapore", + "native": "Singapore", + "phone": "65", + "continent": "AS", + "capital": "Singapore", + "currency": "SGD", + "languages": [ + "en", + "ms", + "ta", + "zh" + ] + }, + "SH": { + "name": "Saint Helena", + "native": "Saint Helena", + "phone": "290", + "continent": "AF", + "capital": "Jamestown", + "currency": "SHP", + "languages": [ + "en" + ] + }, + "SI": { + "name": "Slovenia", + "native": "Slovenija", + "phone": "386", + "continent": "EU", + "capital": "Ljubljana", + "currency": "EUR", + "languages": [ + "sl" + ] + }, + "SJ": { + "name": "Svalbard and Jan Mayen", + "native": "Svalbard og Jan Mayen", + "phone": "4779", + "continent": "EU", + "capital": "Longyearbyen", + "currency": "NOK", + "languages": [ + "no" + ] + }, + "SK": { + "name": "Slovakia", + "native": "Slovensko", + "phone": "421", + "continent": "EU", + "capital": "Bratislava", + "currency": "EUR", + "languages": [ + "sk" + ] + }, + "SL": { + "name": "Sierra Leone", + "native": "Sierra Leone", + "phone": "232", + "continent": "AF", + "capital": "Freetown", + "currency": "SLL", + "languages": [ + "en" + ] + }, + "SM": { + "name": "San Marino", + "native": "San Marino", + "phone": "378", + "continent": "EU", + "capital": "City of San Marino", + "currency": "EUR", + "languages": [ + "it" + ] + }, + "SN": { + "name": "Senegal", + "native": "Sénégal", + "phone": "221", + "continent": "AF", + "capital": "Dakar", + "currency": "XOF", + "languages": [ + "fr" + ] + }, + "SO": { + "name": "Somalia", + "native": "Soomaaliya", + "phone": "252", + "continent": "AF", + "capital": "Mogadishu", + "currency": "SOS", + "languages": [ + "so", + "ar" + ] + }, + "SR": { + "name": "Suriname", + "native": "Suriname", + "phone": "597", + "continent": "SA", + "capital": "Paramaribo", + "currency": "SRD", + "languages": [ + "nl" + ] + }, + "SS": { + "name": "South Sudan", + "native": "South Sudan", + "phone": "211", + "continent": "AF", + "capital": "Juba", + "currency": "SSP", + "languages": [ + "en" + ] + }, + "ST": { + "name": "São Tomé and Príncipe", + "native": "São Tomé e Príncipe", + "phone": "239", + "continent": "AF", + "capital": "São Tomé", + "currency": "STD", + "languages": [ + "pt" + ] + }, + "SV": { + "name": "El Salvador", + "native": "El Salvador", + "phone": "503", + "continent": "NA", + "capital": "San Salvador", + "currency": "SVC,USD", + "languages": [ + "es" + ] + }, + "SX": { + "name": "Sint Maarten", + "native": "Sint Maarten", + "phone": "1721", + "continent": "NA", + "capital": "Philipsburg", + "currency": "ANG", + "languages": [ + "nl", + "en" + ] + }, + "SY": { + "name": "Syria", + "native": "سوريا", + "phone": "963", + "continent": "AS", + "capital": "Damascus", + "currency": "SYP", + "languages": [ + "ar" + ] + }, + "SZ": { + "name": "Swaziland", + "native": "Swaziland", + "phone": "268", + "continent": "AF", + "capital": "Lobamba", + "currency": "SZL", + "languages": [ + "en", + "ss" + ] + }, + "TC": { + "name": "Turks and Caicos Islands", + "native": "Turks and Caicos Islands", + "phone": "1649", + "continent": "NA", + "capital": "Cockburn Town", + "currency": "USD", + "languages": [ + "en" + ] + }, + "TD": { + "name": "Chad", + "native": "Tchad", + "phone": "235", + "continent": "AF", + "capital": "N'Djamena", + "currency": "XAF", + "languages": [ + "fr", + "ar" + ] + }, + "TF": { + "name": "French Southern Territories", + "native": "Territoire des Terres australes et antarctiques fr", + "phone": "262", + "continent": "AN", + "capital": "Port-aux-Français", + "currency": "EUR", + "languages": [ + "fr" + ] + }, + "TG": { + "name": "Togo", + "native": "Togo", + "phone": "228", + "continent": "AF", + "capital": "Lomé", + "currency": "XOF", + "languages": [ + "fr" + ] + }, + "TH": { + "name": "Thailand", + "native": "ประเทศไทย", + "phone": "66", + "continent": "AS", + "capital": "Bangkok", + "currency": "THB", + "languages": [ + "th" + ] + }, + "TJ": { + "name": "Tajikistan", + "native": "Тоҷикистон", + "phone": "992", + "continent": "AS", + "capital": "Dushanbe", + "currency": "TJS", + "languages": [ + "tg", + "ru" + ] + }, + "TK": { + "name": "Tokelau", + "native": "Tokelau", + "phone": "690", + "continent": "OC", + "capital": "Fakaofo", + "currency": "NZD", + "languages": [ + "en" + ] + }, + "TL": { + "name": "East Timor", + "native": "Timor-Leste", + "phone": "670", + "continent": "OC", + "capital": "Dili", + "currency": "USD", + "languages": [ + "pt" + ] + }, + "TM": { + "name": "Turkmenistan", + "native": "Türkmenistan", + "phone": "993", + "continent": "AS", + "capital": "Ashgabat", + "currency": "TMT", + "languages": [ + "tk", + "ru" + ] + }, + "TN": { + "name": "Tunisia", + "native": "تونس", + "phone": "216", + "continent": "AF", + "capital": "Tunis", + "currency": "TND", + "languages": [ + "ar" + ] + }, + "TO": { + "name": "Tonga", + "native": "Tonga", + "phone": "676", + "continent": "OC", + "capital": "Nuku'alofa", + "currency": "TOP", + "languages": [ + "en", + "to" + ] + }, + "TR": { + "name": "Turkey", + "native": "Türkiye", + "phone": "90", + "continent": "AS", + "capital": "Ankara", + "currency": "TRY", + "languages": [ + "tr" + ] + }, + "TT": { + "name": "Trinidad and Tobago", + "native": "Trinidad and Tobago", + "phone": "1868", + "continent": "NA", + "capital": "Port of Spain", + "currency": "TTD", + "languages": [ + "en" + ] + }, + "TV": { + "name": "Tuvalu", + "native": "Tuvalu", + "phone": "688", + "continent": "OC", + "capital": "Funafuti", + "currency": "AUD", + "languages": [ + "en" + ] + }, + "TW": { + "name": "Taiwan", + "native": "臺灣", + "phone": "886", + "continent": "AS", + "capital": "Taipei", + "currency": "TWD", + "languages": [ + "zh" + ] + }, + "TZ": { + "name": "Tanzania", + "native": "Tanzania", + "phone": "255", + "continent": "AF", + "capital": "Dodoma", + "currency": "TZS", + "languages": [ + "sw", + "en" + ] + }, + "UA": { + "name": "Ukraine", + "native": "Україна", + "phone": "380", + "continent": "EU", + "capital": "Kyiv", + "currency": "UAH", + "languages": [ + "uk" + ] + }, + "UG": { + "name": "Uganda", + "native": "Uganda", + "phone": "256", + "continent": "AF", + "capital": "Kampala", + "currency": "UGX", + "languages": [ + "en", + "sw" + ] + }, + "UM": { + "name": "U.S. Minor Outlying Islands", + "native": "United States Minor Outlying Islands", + "phone": "1", + "continent": "OC", + "capital": "", + "currency": "USD", + "languages": [ + "en" + ] + }, + "US": { + "name": "United States", + "native": "United States", + "phone": "1", + "continent": "NA", + "capital": "Washington D.C.", + "currency": "USD,USN,USS", + "languages": [ + "en" + ] + }, + "UY": { + "name": "Uruguay", + "native": "Uruguay", + "phone": "598", + "continent": "SA", + "capital": "Montevideo", + "currency": "UYI,UYU", + "languages": [ + "es" + ] + }, + "UZ": { + "name": "Uzbekistan", + "native": "O‘zbekiston", + "phone": "998", + "continent": "AS", + "capital": "Tashkent", + "currency": "UZS", + "languages": [ + "uz", + "ru" + ] + }, + "VA": { + "name": "Vatican City", + "native": "Vaticano", + "phone": "39066,379", + "continent": "EU", + "capital": "Vatican City", + "currency": "EUR", + "languages": [ + "it", + "la" + ] + }, + "VC": { + "name": "Saint Vincent and the Grenadines", + "native": "Saint Vincent and the Grenadines", + "phone": "1784", + "continent": "NA", + "capital": "Kingstown", + "currency": "XCD", + "languages": [ + "en" + ] + }, + "VE": { + "name": "Venezuela", + "native": "Venezuela", + "phone": "58", + "continent": "SA", + "capital": "Caracas", + "currency": "VEF", + "languages": [ + "es" + ] + }, + "VG": { + "name": "British Virgin Islands", + "native": "British Virgin Islands", + "phone": "1284", + "continent": "NA", + "capital": "Road Town", + "currency": "USD", + "languages": [ + "en" + ] + }, + "VI": { + "name": "U.S. Virgin Islands", + "native": "United States Virgin Islands", + "phone": "1340", + "continent": "NA", + "capital": "Charlotte Amalie", + "currency": "USD", + "languages": [ + "en" + ] + }, + "VN": { + "name": "Vietnam", + "native": "Việt Nam", + "phone": "84", + "continent": "AS", + "capital": "Hanoi", + "currency": "VND", + "languages": [ + "vi" + ] + }, + "VU": { + "name": "Vanuatu", + "native": "Vanuatu", + "phone": "678", + "continent": "OC", + "capital": "Port Vila", + "currency": "VUV", + "languages": [ + "bi", + "en", + "fr" + ] + }, + "WF": { + "name": "Wallis and Futuna", + "native": "Wallis et Futuna", + "phone": "681", + "continent": "OC", + "capital": "Mata-Utu", + "currency": "XPF", + "languages": [ + "fr" + ] + }, + "WS": { + "name": "Samoa", + "native": "Samoa", + "phone": "685", + "continent": "OC", + "capital": "Apia", + "currency": "WST", + "languages": [ + "sm", + "en" + ] + }, + "XK": { + "name": "Kosovo", + "native": "Republika e Kosovës", + "phone": "377,381,383,386", + "continent": "EU", + "capital": "Pristina", + "currency": "EUR", + "languages": [ + "sq", + "sr" + ] + }, + "YE": { + "name": "Yemen", + "native": "اليَمَن", + "phone": "967", + "continent": "AS", + "capital": "Sana'a", + "currency": "YER", + "languages": [ + "ar" + ] + }, + "YT": { + "name": "Mayotte", + "native": "Mayotte", + "phone": "262", + "continent": "AF", + "capital": "Mamoudzou", + "currency": "EUR", + "languages": [ + "fr" + ] + }, + "ZA": { + "name": "South Africa", + "native": "South Africa", + "phone": "27", + "continent": "AF", + "capital": "Pretoria", + "currency": "ZAR", + "languages": [ + "af", + "en", + "nr", + "st", + "ss", + "tn", + "ts", + "ve", + "xh", + "zu" + ] + }, + "ZM": { + "name": "Zambia", + "native": "Zambia", + "phone": "260", + "continent": "AF", + "capital": "Lusaka", + "currency": "ZMK", + "languages": [ + "en" + ] + }, + "ZW": { + "name": "Zimbabwe", + "native": "Zimbabwe", + "phone": "263", + "continent": "AF", + "capital": "Harare", + "currency": "ZWL", + "languages": [ + "en", + "sn", + "nd" + ] + } + } + \ No newline at end of file diff --git a/modules/avored/ecommerce/database/migrations/2017_03_29_000001_avored_ecommerce_schema.php b/modules/avored/ecommerce/database/migrations/2017_03_29_000001_avored_ecommerce_schema.php index 677a5fb3d..82c8ebc32 100644 --- a/modules/avored/ecommerce/database/migrations/2017_03_29_000001_avored_ecommerce_schema.php +++ b/modules/avored/ecommerce/database/migrations/2017_03_29_000001_avored_ecommerce_schema.php @@ -70,6 +70,19 @@ public function up() $table->increments('id'); $table->string('code'); $table->string('name'); + $table->string('phone_code')->nullable()->default(null); + $table->string('currency_code')->nullable()->default(null); + $table->string('lang_code')->nullable()->default(null); + $table->timestamps(); + }); + + Schema::create('site_ currencies', function (Blueprint $table) { + $table->increments('id'); + $table->string('code'); + $table->string('name'); + $table->float('conversion_rate'); + $table->enum()('status',['ENABLED','DISABLED'])->nullable()->default(null); + $table->timestamps(); }); @@ -199,11 +212,17 @@ public function up() Configuration::create(['configuration_key' => 'general_site_description', 'configuration_value' => 'AvoRed is a free open-source e-commerce application development platform written in PHP based on Laravel. Its an ingenuous and modular e-commerce that is easily customizable according to your needs, with a modern responsive mobile friendly interface as default']); Configuration::create(['configuration_key' => 'general_site_description', 'configuration_value' => 'AvoRed Laravel Ecommerce']); + $path = __DIR__ .'/../../assets/countries.json'; - $json = json_decode(file_get_contents($path), true); - foreach ($json as $code => $name) { - Country::create(['code' => $code, 'name' => $name]); + foreach ($json as $code => $country) { + + Country::create(['code' => strtolower($code), + 'name' => $country['name'], + 'phone_code' => $country['phone'], + 'currency_code' => $country['currency'], + 'lang_code' => (isset($country['languages'][0]) && $country['languages']) ?? null, + ]); } Schema::create('menus', function (Blueprint $table) { diff --git a/modules/avored/ecommerce/resources/lang/en/currency.php b/modules/avored/ecommerce/resources/lang/en/currency.php new file mode 100644 index 000000000..13ac2891d --- /dev/null +++ b/modules/avored/ecommerce/resources/lang/en/currency.php @@ -0,0 +1,7 @@ + 'Currency', + +]; diff --git a/modules/avored/ecommerce/resources/views/currency/index.blade.php b/modules/avored/ecommerce/resources/views/currency/index.blade.php new file mode 100644 index 000000000..4fc5254e2 --- /dev/null +++ b/modules/avored/ecommerce/resources/views/currency/index.blade.php @@ -0,0 +1,13 @@ +@extends('avored-ecommerce::layouts.app') + +@section('content') + +
+ {{ __('avored-ecommerce::currency.title') }} +
+ + + + + +@stop diff --git a/modules/avored/ecommerce/routes/web.php b/modules/avored/ecommerce/routes/web.php index 616dc48c0..cbfd86474 100644 --- a/modules/avored/ecommerce/routes/web.php +++ b/modules/avored/ecommerce/routes/web.php @@ -45,6 +45,7 @@ Route::resource('product', 'ProductController'); Route::resource('property', 'PropertyController'); Route::resource('role', 'RoleController'); + Route::resource('site-currency', 'SiteCurrencyController'); Route::get('menu', 'MenuController@index')->name('menu.index'); Route::post('menu', 'MenuController@store')->name('menu.store'); @@ -74,6 +75,9 @@ //Route::resource('order-status', 'OrderStatusController'); + Route::get('currency', 'CurrencyController@index') + ->name('currency.index'); + Route::get('order', 'OrderController@index')->name('order.index'); diff --git a/modules/avored/ecommerce/src/DataGrid/SiteCurrencyDataGrid.php b/modules/avored/ecommerce/src/DataGrid/SiteCurrencyDataGrid.php new file mode 100644 index 000000000..a98bf04cb --- /dev/null +++ b/modules/avored/ecommerce/src/DataGrid/SiteCurrencyDataGrid.php @@ -0,0 +1,36 @@ +model($model) + ->column('id', ['sortable' => true]) + ->column('code', ['label' => 'Code']) + ->column('name', ['label' => 'Name']) + ->linkColumn('conversation_rate', ['label' => 'Convertion Rate']) + ->linkColumn('edit', [], function ($model) { + return "id)."' >Edit"; + })->linkColumn('destroy', [], function ($model) { + return "
id)."'> + + ".csrf_field()." + id').submit()\" + >Destroy +
"; + }); + + $this->dataGrid = $dataGrid; + } +} diff --git a/modules/avored/ecommerce/src/Http/Controllers/CurrencyController.php b/modules/avored/ecommerce/src/Http/Controllers/CurrencyController.php new file mode 100644 index 000000000..409abcaa4 --- /dev/null +++ b/modules/avored/ecommerce/src/Http/Controllers/CurrencyController.php @@ -0,0 +1,22 @@ +subMenu('configuration', $configurationMenu); + $currencySetup = new AdminMenu(); + $currencySetup->key('currency_setup') + ->label('Currency Setup') + ->route('admin.currency.index') + ->icon('fas fa-dollar-sign'); + $systemMenu->subMenu('currency_setup', $currencySetup); From b0ed2d02a6c523631bf97d1866d6e963ea197e37 Mon Sep 17 00:00:00 2001 From: Purvesh Date: Wed, 20 Jun 2018 09:56:01 +1200 Subject: [PATCH 4/8] more updates for multi currency setup --- ...7_03_29_000001_avored_ecommerce_schema.php | 5 +- .../components/forms/avored-form-select.vue | 15 ++- .../ecommerce/resources/lang/en/currency.php | 2 + .../views/site-currency/_fields.blade.php | 45 ++++++++ .../views/site-currency/create.blade.php | 58 ++++++++++ .../views/site-currency/edit.blade.php | 57 ++++++++++ .../views/site-currency/index.blade.php | 16 +++ modules/avored/ecommerce/routes/web.php | 6 +- .../src/DataGrid/SiteCurrencyDataGrid.php | 2 +- .../Controllers/SiteCurrencyController.php | 105 ++++++++++++++++++ .../src/Http/Requests/SiteCurrencyRequest.php | 33 ++++++ .../SiteCurrencyFieldsComposer.php | 32 ++++++ .../Contracts/SiteCurrencyInterface.php | 47 ++++++++ .../src/Models/Database/SiteCurrency.php | 11 ++ .../Repository/SiteCurrencyRepository.php | 60 ++++++++++ modules/avored/ecommerce/src/Provider.php | 11 +- public/vendor/avored-admin/js/app.js | 2 +- 17 files changed, 486 insertions(+), 21 deletions(-) create mode 100644 modules/avored/ecommerce/resources/views/site-currency/_fields.blade.php create mode 100644 modules/avored/ecommerce/resources/views/site-currency/create.blade.php create mode 100644 modules/avored/ecommerce/resources/views/site-currency/edit.blade.php create mode 100644 modules/avored/ecommerce/resources/views/site-currency/index.blade.php create mode 100644 modules/avored/ecommerce/src/Http/Controllers/SiteCurrencyController.php create mode 100644 modules/avored/ecommerce/src/Http/Requests/SiteCurrencyRequest.php create mode 100644 modules/avored/ecommerce/src/Http/ViewComposers/SiteCurrencyFieldsComposer.php create mode 100644 modules/avored/ecommerce/src/Models/Contracts/SiteCurrencyInterface.php create mode 100644 modules/avored/ecommerce/src/Models/Database/SiteCurrency.php create mode 100644 modules/avored/ecommerce/src/Models/Repository/SiteCurrencyRepository.php diff --git a/modules/avored/ecommerce/database/migrations/2017_03_29_000001_avored_ecommerce_schema.php b/modules/avored/ecommerce/database/migrations/2017_03_29_000001_avored_ecommerce_schema.php index 82c8ebc32..f74637e73 100644 --- a/modules/avored/ecommerce/database/migrations/2017_03_29_000001_avored_ecommerce_schema.php +++ b/modules/avored/ecommerce/database/migrations/2017_03_29_000001_avored_ecommerce_schema.php @@ -76,13 +76,12 @@ public function up() $table->timestamps(); }); - Schema::create('site_ currencies', function (Blueprint $table) { + Schema::create('site_currencies', function (Blueprint $table) { $table->increments('id'); $table->string('code'); $table->string('name'); $table->float('conversion_rate'); - $table->enum()('status',['ENABLED','DISABLED'])->nullable()->default(null); - + $table->enum('status',['ENABLED','DISABLED'])->nullable()->default(null); $table->timestamps(); }); diff --git a/modules/avored/ecommerce/resources/assets/components/forms/avored-form-select.vue b/modules/avored/ecommerce/resources/assets/components/forms/avored-form-select.vue index 60943377b..a1b2917f3 100644 --- a/modules/avored/ecommerce/resources/assets/components/forms/avored-form-select.vue +++ b/modules/avored/ecommerce/resources/assets/components/forms/avored-form-select.vue @@ -42,17 +42,16 @@ options: function() { return JSON.parse(this.fieldOptions); }, - dataDisplayError : function() { - if(this.errorText == ""){ - return false; - } - return true; - }, }, data: function () { return { - - selectedValue: this.fieldValue + selectedValue: this.fieldValue, + dataDisplayError : function() { + if(this.errorText == ""){ + return false; + } + return true; + } } }, methods:{ diff --git a/modules/avored/ecommerce/resources/lang/en/currency.php b/modules/avored/ecommerce/resources/lang/en/currency.php index 13ac2891d..cd6445605 100644 --- a/modules/avored/ecommerce/resources/lang/en/currency.php +++ b/modules/avored/ecommerce/resources/lang/en/currency.php @@ -3,5 +3,7 @@ return [ 'title' => 'Currency', + 'create' => 'Create Currency', + 'update' => 'Update Currency', ]; diff --git a/modules/avored/ecommerce/resources/views/site-currency/_fields.blade.php b/modules/avored/ecommerce/resources/views/site-currency/_fields.blade.php new file mode 100644 index 000000000..bd99b202a --- /dev/null +++ b/modules/avored/ecommerce/resources/views/site-currency/_fields.blade.php @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/modules/avored/ecommerce/resources/views/site-currency/create.blade.php b/modules/avored/ecommerce/resources/views/site-currency/create.blade.php new file mode 100644 index 000000000..e054ec8dc --- /dev/null +++ b/modules/avored/ecommerce/resources/views/site-currency/create.blade.php @@ -0,0 +1,58 @@ +@extends('avored-ecommerce::layouts.app') + +@section('content') + +
+
+
+
+ {{ __('avored-ecommerce::currency.create') }} +
+
+ +
+ @csrf + + @include('avored-ecommerce::site-currency._fields') + +
+ + + {{ __('avored-ecommerce::lang.cancel') }} + +
+ +
+
+
+ +
+
+@endsection + + +@push('scripts') + + + + +@endpush \ No newline at end of file diff --git a/modules/avored/ecommerce/resources/views/site-currency/edit.blade.php b/modules/avored/ecommerce/resources/views/site-currency/edit.blade.php new file mode 100644 index 000000000..7178c613a --- /dev/null +++ b/modules/avored/ecommerce/resources/views/site-currency/edit.blade.php @@ -0,0 +1,57 @@ +@extends('avored-ecommerce::layouts.app') + +@section('content') + +
+
+
+
+ {{ __('avored-ecommerce::currency.update') }} +
+
+
+ @csrf() + @method('put') + + @include('avored-ecommerce::site-currency._fields') + +
+ + + {{ __('avored-ecommerce::lang.cancel') }} + +
+ +
+
+
+
+
+@endsection + +@push('scripts') + + + + +@endpush \ No newline at end of file diff --git a/modules/avored/ecommerce/resources/views/site-currency/index.blade.php b/modules/avored/ecommerce/resources/views/site-currency/index.blade.php new file mode 100644 index 000000000..de70d161b --- /dev/null +++ b/modules/avored/ecommerce/resources/views/site-currency/index.blade.php @@ -0,0 +1,16 @@ +@extends('avored-ecommerce::layouts.app') + +@section('content') + +
+ {{ __('avored-ecommerce::currency.title') }} + + + {{ __('avored-ecommerce::currency.create') }} + + +
+ {!! DataGrid::render($dataGrid) !!} + +@stop diff --git a/modules/avored/ecommerce/routes/web.php b/modules/avored/ecommerce/routes/web.php index cbfd86474..8a22f1fc0 100644 --- a/modules/avored/ecommerce/routes/web.php +++ b/modules/avored/ecommerce/routes/web.php @@ -74,11 +74,7 @@ Route::delete('themes/{name}', 'ThemeController@destroy')->name('theme.destroy'); //Route::resource('order-status', 'OrderStatusController'); - - Route::get('currency', 'CurrencyController@index') - ->name('currency.index'); - - + Route::get('order', 'OrderController@index')->name('order.index'); Route::post('get-property-element', 'PropertyController@getElementHtml')->name('property.element'); diff --git a/modules/avored/ecommerce/src/DataGrid/SiteCurrencyDataGrid.php b/modules/avored/ecommerce/src/DataGrid/SiteCurrencyDataGrid.php index a98bf04cb..c3a2336c6 100644 --- a/modules/avored/ecommerce/src/DataGrid/SiteCurrencyDataGrid.php +++ b/modules/avored/ecommerce/src/DataGrid/SiteCurrencyDataGrid.php @@ -16,7 +16,7 @@ public function __construct($model) ->column('id', ['sortable' => true]) ->column('code', ['label' => 'Code']) ->column('name', ['label' => 'Name']) - ->linkColumn('conversation_rate', ['label' => 'Convertion Rate']) + ->column('conversion_rate', ['label' => 'Convertion Rate']) ->linkColumn('edit', [], function ($model) { return "id)."' >Edit"; })->linkColumn('destroy', [], function ($model) { diff --git a/modules/avored/ecommerce/src/Http/Controllers/SiteCurrencyController.php b/modules/avored/ecommerce/src/Http/Controllers/SiteCurrencyController.php new file mode 100644 index 000000000..8e8c5d22b --- /dev/null +++ b/modules/avored/ecommerce/src/Http/Controllers/SiteCurrencyController.php @@ -0,0 +1,105 @@ +repository = $repository; + } + /** + * Display a listing of the resource. + * + * @return \Illuminate\Http\Response + */ + public function index() + { + $siteCurrencyGrid = new SiteCurrencyDataGrid($this->repository->query()); + + return view('avored-ecommerce::site-currency.index')->with('dataGrid', $siteCurrencyGrid->dataGrid); + } + + /** + * Show the form for creating a new resource. + * + * @return \Illuminate\Http\Response + */ + public function create() + { + return view('avored-ecommerce::site-currency.create'); + } + + /** + * Store a newly created resource in storage. + * + * @param \AvoRed\Ecommerce\Http\Requests\SiteCurrencyRequest $request + * + * @return \Illuminate\Http\Response + */ + public function store(SiteCurrencyRequest $request) + { + + $this->repository->create($request->all()); + + return redirect()->route('admin.site-currency.index'); + } + + /** + * Show the form for editing the specified resource. + * + * @param \AvoRed\Ecommerce\Models\Database\SiteCurrency $id + * + * @return \Illuminate\Http\Response + */ + public function edit($id) + { + $model = $this->repository->find($id); + return view('avored-ecommerce::site-currency.edit') + ->with('model', $model); + } + + /** + * Update the specified resource in storage. + * + * @param \AvoRed\Ecommerce\Http\Requests\SiteCurrencyRequest $request + * @param int $id + * + * @return \Illuminate\Http\Response + */ + public function update(SiteCurrencyRequest $request, $id) + { + + $siteCurrency = $this->repository->find($id); + $siteCurrency->update($request->all()); + + return redirect()->route('admin.site-currency.index'); + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * + * @return \Illuminate\Http\Response + */ + public function destroy($id) + { + $siteCurreny = $this->repository->find($id); + $siteCurreny->delete(); + return redirect()->route('admin.site-currency.index'); + } + +} diff --git a/modules/avored/ecommerce/src/Http/Requests/SiteCurrencyRequest.php b/modules/avored/ecommerce/src/Http/Requests/SiteCurrencyRequest.php new file mode 100644 index 000000000..8c6c70576 --- /dev/null +++ b/modules/avored/ecommerce/src/Http/Requests/SiteCurrencyRequest.php @@ -0,0 +1,33 @@ +put($country->currency_code,['id' => $country->currency_code,'name' => $country->currency_code] ); + } + $statusOptions = Collection::make([['id' => 'ENABLED','name' => 'Enabled'],['id' => 'DISABLED','name' => 'Disabled']]); + + $view->with('codeOptions', $options) + ->with('statusOptions',$statusOptions); + } +} diff --git a/modules/avored/ecommerce/src/Models/Contracts/SiteCurrencyInterface.php b/modules/avored/ecommerce/src/Models/Contracts/SiteCurrencyInterface.php new file mode 100644 index 000000000..9b174a604 --- /dev/null +++ b/modules/avored/ecommerce/src/Models/Contracts/SiteCurrencyInterface.php @@ -0,0 +1,47 @@ +key('currency_setup') + $currencySetup->key('site_currency_setup') ->label('Currency Setup') - ->route('admin.currency.index') + ->route('admin.site-currency.index') ->icon('fas fa-dollar-sign'); - $systemMenu->subMenu('currency_setup', $currencySetup); + $systemMenu->subMenu('site_currency', $currencySetup); @@ -844,5 +848,6 @@ protected function registerModelContracts() $this->app->bind(MenuInterface::class,MenuRepository::class); $this->app->bind(PageInterface::class,PageRepository::class); $this->app->bind(RoleInterface::class,RoleRepository::class); + $this->app->bind(SiteCurrencyInterface::class,SiteCurrencyRepository::class); } } diff --git a/public/vendor/avored-admin/js/app.js b/public/vendor/avored-admin/js/app.js index e33f9e92f..10a90010e 100644 --- a/public/vendor/avored-admin/js/app.js +++ b/public/vendor/avored-admin/js/app.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=138)}([function(e,t,n){(function(e){var t;t=function(){"use strict";var t,r;function i(){return t.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var n,r=[];for(n=0;n>>0,r=0;r0)for(n=0;n<_.length;n++)s(i=t[r=_[n]])||(e[r]=i);return e}var y=!1;function b(e){v(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===y&&(y=!0,i.updateOffset(this),y=!1)}function w(e){return e instanceof b||null!=e&&null!=e._isAMomentObject}function M(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function L(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=M(t)),n}function k(e,t,n){var r,i=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),a=0;for(r=0;r=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var F=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,R=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,W={},z={};function B(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(z[e]=i),t&&(z[t[0]]=function(){return $(i.apply(this,arguments),t[1],t[2])}),n&&(z[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function U(e,t){return e.isValid()?(t=q(t,e.localeData()),W[t]=W[t]||function(e){var t,n,r,i=e.match(F);for(t=0,n=i.length;t=0&&R.test(e);)e=e.replace(R,r),R.lastIndex=0,n-=1;return e}var V=/\d/,G=/\d\d/,K=/\d{3}/,J=/\d{4}/,Z=/[+-]?\d{6}/,X=/\d\d?/,Q=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,te=/\d{1,3}/,ne=/\d{1,4}/,re=/[+-]?\d{1,6}/,ie=/\d+/,oe=/[+-]?\d+/,ae=/Z|[+-]\d\d:?\d\d/gi,se=/Z|[+-]\d\d(?::?\d\d)?/gi,le=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ue={};function de(e,t,n){ue[e]=C(t)?t:function(e,r){return e&&n?n:t}}function ce(e,t){return c(ue,e)?ue[e](t._strict,t._locale):new RegExp(fe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i})))}function fe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var he={};function pe(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),l(t)&&(r=function(e,n){n[t]=L(e)}),n=0;n68?1900:2e3)};var Se,Ye=Ce("FullYear",!0);function Ce(e,t){return function(n){return null!=n?(Ee(this,e,n),i.updateOffset(this,t),this):Ae(this,e)}}function Ae(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Ee(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&De(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),He(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function He(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?De(e)?29:28:31-r%7%2}Se=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function ze(e,t,n){var r=7+t-n;return-((7+We(e,0,r).getUTCDay()-t)%7)+r-1}function Be(e,t,n,r,i){var o,a,s=1+7*(t-1)+(7+n-r)%7+ze(e,r,i);return s<=0?a=xe(o=e-1)+s:s>xe(e)?(o=e+1,a=s-xe(e)):(o=e,a=s),{year:o,dayOfYear:a}}function Ue(e,t,n){var r,i,o=ze(e.year(),t,n),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?r=a+qe(i=e.year()-1,t,n):a>qe(e.year(),t,n)?(r=a-qe(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function qe(e,t,n){var r=ze(e,t,n),i=ze(e+1,t,n);return(xe(e)-r+i)/7}B("w",["ww",2],"wo","week"),B("W",["WW",2],"Wo","isoWeek"),O("week","w"),O("isoWeek","W"),I("week",5),I("isoWeek",5),de("w",X),de("ww",X,G),de("W",X),de("WW",X,G),me(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=L(e)});B("d",0,"do","day"),B("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),B("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),B("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),B("e",0,0,"weekday"),B("E",0,0,"isoWeekday"),O("day","d"),O("weekday","e"),O("isoWeekday","E"),I("day",11),I("weekday",11),I("isoWeekday",11),de("d",X),de("e",X),de("E",X),de("dd",function(e,t){return t.weekdaysMinRegex(e)}),de("ddd",function(e,t){return t.weekdaysShortRegex(e)}),de("dddd",function(e,t){return t.weekdaysRegex(e)}),me(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:p(n).invalidWeekday=e}),me(["d","e","E"],function(e,t,n,r){t[r]=L(e)});var Ve="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Ge="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Ke="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var Je=le;var Ze=le;var Xe=le;function Qe(){function e(e,t){return t.length-e.length}var t,n,r,i,o,a=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=h([2e3,1]).day(t),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),o=this.weekdays(n,""),a.push(r),s.push(i),l.push(o),u.push(r),u.push(i),u.push(o);for(a.sort(e),s.sort(e),l.sort(e),u.sort(e),t=0;t<7;t++)s[t]=fe(s[t]),l[t]=fe(l[t]),u[t]=fe(u[t]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function et(){return this.hours()%12||12}function tt(e,t){B(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function nt(e,t){return t._meridiemParse}B("H",["HH",2],0,"hour"),B("h",["hh",2],0,et),B("k",["kk",2],0,function(){return this.hours()||24}),B("hmm",0,0,function(){return""+et.apply(this)+$(this.minutes(),2)}),B("hmmss",0,0,function(){return""+et.apply(this)+$(this.minutes(),2)+$(this.seconds(),2)}),B("Hmm",0,0,function(){return""+this.hours()+$(this.minutes(),2)}),B("Hmmss",0,0,function(){return""+this.hours()+$(this.minutes(),2)+$(this.seconds(),2)}),tt("a",!0),tt("A",!1),O("hour","h"),I("hour",13),de("a",nt),de("A",nt),de("H",X),de("h",X),de("k",X),de("HH",X,G),de("hh",X,G),de("kk",X,G),de("hmm",Q),de("hmmss",ee),de("Hmm",Q),de("Hmmss",ee),pe(["H","HH"],be),pe(["k","kk"],function(e,t,n){var r=L(e);t[be]=24===r?0:r}),pe(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),pe(["h","hh"],function(e,t,n){t[be]=L(e),p(n).bigHour=!0}),pe("hmm",function(e,t,n){var r=e.length-2;t[be]=L(e.substr(0,r)),t[we]=L(e.substr(r)),p(n).bigHour=!0}),pe("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[be]=L(e.substr(0,r)),t[we]=L(e.substr(r,2)),t[Me]=L(e.substr(i)),p(n).bigHour=!0}),pe("Hmm",function(e,t,n){var r=e.length-2;t[be]=L(e.substr(0,r)),t[we]=L(e.substr(r))}),pe("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[be]=L(e.substr(0,r)),t[we]=L(e.substr(r,2)),t[Me]=L(e.substr(i))});var rt,it=Ce("Hours",!0),ot={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:je,monthsShort:Pe,week:{dow:0,doy:6},weekdays:Ve,weekdaysMin:Ke,weekdaysShort:Ge,meridiemParse:/[ap]\.?m?\.?/i},at={},st={};function lt(e){return e?e.toLowerCase().replace("_","-"):e}function ut(t){var r=null;if(!at[t]&&void 0!==e&&e&&e.exports)try{r=rt._abbr;n(146)("./"+t),dt(r)}catch(e){}return at[t]}function dt(e,t){var n;return e&&((n=s(t)?ft(e):ct(e,t))?rt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),rt._abbr}function ct(e,t){if(null!==t){var n,r=ot;if(t.abbr=e,null!=at[e])Y("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=at[e]._config;else if(null!=t.parentLocale)if(null!=at[t.parentLocale])r=at[t.parentLocale]._config;else{if(null==(n=ut(t.parentLocale)))return st[t.parentLocale]||(st[t.parentLocale]=[]),st[t.parentLocale].push({name:e,config:t}),null;r=n._config}return at[e]=new E(A(r,t)),st[e]&&st[e].forEach(function(e){ct(e.name,e.config)}),dt(e),at[e]}return delete at[e],null}function ft(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return rt;if(!o(e)){if(t=ut(e))return t;e=[e]}return function(e){for(var t,n,r,i,o=0;o0;){if(r=ut(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&k(i,n,!0)>=t-1)break;t--}o++}return rt}(e)}function ht(e){var t,n=e._a;return n&&-2===p(e).overflow&&(t=n[ve]<0||n[ve]>11?ve:n[ye]<1||n[ye]>He(n[_e],n[ve])?ye:n[be]<0||n[be]>24||24===n[be]&&(0!==n[we]||0!==n[Me]||0!==n[Le])?be:n[we]<0||n[we]>59?we:n[Me]<0||n[Me]>59?Me:n[Le]<0||n[Le]>999?Le:-1,p(e)._overflowDayOfYear&&(t<_e||t>ye)&&(t=ye),p(e)._overflowWeeks&&-1===t&&(t=ke),p(e)._overflowWeekday&&-1===t&&(t=Te),p(e).overflow=t),e}function pt(e,t,n){return null!=e?e:null!=t?t:n}function mt(e){var t,n,r,o,a,s=[];if(!e._d){for(r=function(e){var t=new Date(i.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[ye]&&null==e._a[ve]&&function(e){var t,n,r,i,o,a,s,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)o=1,a=4,n=pt(t.GG,e._a[_e],Ue(Ct(),1,4).year),r=pt(t.W,1),((i=pt(t.E,1))<1||i>7)&&(l=!0);else{o=e._locale._week.dow,a=e._locale._week.doy;var u=Ue(Ct(),o,a);n=pt(t.gg,e._a[_e],u.year),r=pt(t.w,u.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(l=!0)):i=o}r<1||r>qe(n,o,a)?p(e)._overflowWeeks=!0:null!=l?p(e)._overflowWeekday=!0:(s=Be(n,r,i,o,a),e._a[_e]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(a=pt(e._a[_e],r[_e]),(e._dayOfYear>xe(a)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),n=We(a,0,e._dayOfYear),e._a[ve]=n.getUTCMonth(),e._a[ye]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[be]&&0===e._a[we]&&0===e._a[Me]&&0===e._a[Le]&&(e._nextDay=!0,e._a[be]=0),e._d=(e._useUTC?We:function(e,t,n,r,i,o,a){var s=new Date(e,t,n,r,i,o,a);return e<100&&e>=0&&isFinite(s.getFullYear())&&s.setFullYear(e),s}).apply(null,s),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[be]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(p(e).weekdayMismatch=!0)}}var gt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,vt=/Z|[+-]\d\d(?::?\d\d)?/,yt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],bt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],wt=/^\/?Date\((\-?\d+)/i;function Mt(e){var t,n,r,i,o,a,s=e._i,l=gt.exec(s)||_t.exec(s);if(l){for(p(e).iso=!0,t=0,n=yt.length;t0&&p(e).unusedInput.push(a),s=s.slice(s.indexOf(n)+n.length),u+=n.length),z[o]?(n?p(e).empty=!1:p(e).unusedTokens.push(o),ge(o,n,e)):e._strict&&!n&&p(e).unusedTokens.push(o);p(e).charsLeftOver=l-u,s.length>0&&p(e).unusedInput.push(s),e._a[be]<=12&&!0===p(e).bigHour&&e._a[be]>0&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[be]=function(e,t,n){var r;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[be],e._meridiem),mt(e),ht(e)}else xt(e);else Mt(e)}function St(e){var t=e._i,n=e._f;return e._locale=e._locale||ft(e._l),null===t||void 0===n&&""===t?g({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),w(t)?new b(ht(t)):(u(t)?e._d=t:o(n)?function(e){var t,n,r,i,o;if(0===e._f.length)return p(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;ithis?this:e:g()});function Ht(e,t){var n,r;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Ct();for(n=t[0],r=1;r(o=qe(e,r,i))&&(t=o),function(e,t,n,r,i){var o=Be(e,t,n,r,i),a=We(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,n,r,i))}B(0,["gg",2],0,function(){return this.weekYear()%100}),B(0,["GG",2],0,function(){return this.isoWeekYear()%100}),rn("gggg","weekYear"),rn("ggggg","weekYear"),rn("GGGG","isoWeekYear"),rn("GGGGG","isoWeekYear"),O("weekYear","gg"),O("isoWeekYear","GG"),I("weekYear",1),I("isoWeekYear",1),de("G",oe),de("g",oe),de("GG",X,G),de("gg",X,G),de("GGGG",ne,J),de("gggg",ne,J),de("GGGGG",re,Z),de("ggggg",re,Z),me(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=L(e)}),me(["gg","GG"],function(e,t,n,r){t[r]=i.parseTwoDigitYear(e)}),B("Q",0,"Qo","quarter"),O("quarter","Q"),I("quarter",7),de("Q",V),pe("Q",function(e,t){t[ve]=3*(L(e)-1)}),B("D",["DD",2],"Do","date"),O("date","D"),I("date",9),de("D",X),de("DD",X,G),de("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),pe(["D","DD"],ye),pe("Do",function(e,t){t[ye]=L(e.match(X)[0])});var an=Ce("Date",!0);B("DDD",["DDDD",3],"DDDo","dayOfYear"),O("dayOfYear","DDD"),I("dayOfYear",4),de("DDD",te),de("DDDD",K),pe(["DDD","DDDD"],function(e,t,n){n._dayOfYear=L(e)}),B("m",["mm",2],0,"minute"),O("minute","m"),I("minute",14),de("m",X),de("mm",X,G),pe(["m","mm"],we);var sn=Ce("Minutes",!1);B("s",["ss",2],0,"second"),O("second","s"),I("second",15),de("s",X),de("ss",X,G),pe(["s","ss"],Me);var ln,un=Ce("Seconds",!1);for(B("S",0,0,function(){return~~(this.millisecond()/100)}),B(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),B(0,["SSS",3],0,"millisecond"),B(0,["SSSS",4],0,function(){return 10*this.millisecond()}),B(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),B(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),B(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),B(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),B(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),O("millisecond","ms"),I("millisecond",16),de("S",te,V),de("SS",te,G),de("SSS",te,K),ln="SSSS";ln.length<=9;ln+="S")de(ln,ie);function dn(e,t){t[Le]=L(1e3*("0."+e))}for(ln="S";ln.length<=9;ln+="S")pe(ln,dn);var cn=Ce("Milliseconds",!1);B("z",0,0,"zoneAbbr"),B("zz",0,0,"zoneName");var fn=b.prototype;function hn(e){return e}fn.add=Zt,fn.calendar=function(e,t){var n=e||Ct(),r=Rt(n,this).startOf("day"),o=i.calendarFormat(this,r)||"sameElse",a=t&&(C(t[o])?t[o].call(this,n):t[o]);return this.format(a||this.localeData().calendar(o,this,Ct(n)))},fn.clone=function(){return new b(this)},fn.diff=function(e,t,n){var r,i,o;if(!this.isValid())return NaN;if(!(r=Rt(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=j(t)){case"year":o=Qt(this,r)/12;break;case"month":o=Qt(this,r);break;case"quarter":o=Qt(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-i)/864e5;break;case"week":o=(this-r-i)/6048e5;break;default:o=this-r}return n?o:M(o)},fn.endOf=function(e){return void 0===(e=j(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},fn.format=function(e){e||(e=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var t=U(this,e);return this.localeData().postformat(t)},fn.from=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Ct(e).isValid())?qt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},fn.fromNow=function(e){return this.from(Ct(),e)},fn.to=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Ct(e).isValid())?qt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},fn.toNow=function(e){return this.to(Ct(),e)},fn.get=function(e){return C(this[e=j(e)])?this[e]():this},fn.invalidAt=function(){return p(this).overflow},fn.isAfter=function(e,t){var n=w(e)?e:Ct(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=j(s(t)?"millisecond":t))?this.valueOf()>n.valueOf():n.valueOf()9999?U(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):C(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",U(n,"Z")):U(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},fn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+i)},fn.toJSON=function(){return this.isValid()?this.toISOString():null},fn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},fn.unix=function(){return Math.floor(this.valueOf()/1e3)},fn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},fn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},fn.year=Ye,fn.isLeapYear=function(){return De(this.year())},fn.weekYear=function(e){return on.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},fn.isoWeekYear=function(e){return on.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},fn.quarter=fn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},fn.month=Ie,fn.daysInMonth=function(){return He(this.year(),this.month())},fn.week=fn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},fn.isoWeek=fn.isoWeeks=function(e){var t=Ue(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},fn.weeksInYear=function(){var e=this.localeData()._week;return qe(this.year(),e.dow,e.doy)},fn.isoWeeksInYear=function(){return qe(this.year(),1,4)},fn.date=an,fn.day=fn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},fn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},fn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},fn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},fn.hour=fn.hours=it,fn.minute=fn.minutes=sn,fn.second=fn.seconds=un,fn.millisecond=fn.milliseconds=cn,fn.utcOffset=function(e,t,n){var r,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Ft(se,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=Wt(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),o!==e&&(!t||this._changeInProgress?Jt(this,qt(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:Wt(this)},fn.utc=function(e){return this.utcOffset(0,e)},fn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Wt(this),"m")),this},fn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Ft(ae,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},fn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Ct(e).utcOffset():0,(this.utcOffset()-e)%60==0)},fn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},fn.isLocal=function(){return!!this.isValid()&&!this._isUTC},fn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},fn.isUtc=zt,fn.isUTC=zt,fn.zoneAbbr=function(){return this._isUTC?"UTC":""},fn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},fn.dates=x("dates accessor is deprecated. Use date instead.",an),fn.months=x("months accessor is deprecated. Use month instead",Ie),fn.years=x("years accessor is deprecated. Use year instead",Ye),fn.zone=x("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),fn.isDSTShifted=x("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(v(e,this),(e=St(e))._a){var t=e._isUTC?h(e._a):Ct(e._a);this._isDSTShifted=this.isValid()&&k(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted});var pn=E.prototype;function mn(e,t,n,r){var i=ft(),o=h().set(r,t);return i[n](o,e)}function gn(e,t,n){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return mn(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=mn(e,r,n,"month");return i}function _n(e,t,n,r){"boolean"==typeof e?(l(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,l(t)&&(n=t,t=void 0),t=t||"");var i,o=ft(),a=e?o._week.dow:0;if(null!=n)return mn(t,(n+a)%7,r,"day");var s=[];for(i=0;i<7;i++)s[i]=mn(t,(i+a)%7,r,"day");return s}pn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return C(r)?r.call(t,n):r},pn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},pn.invalidDate=function(){return this._invalidDate},pn.ordinal=function(e){return this._ordinal.replace("%d",e)},pn.preparse=hn,pn.postformat=hn,pn.relativeTime=function(e,t,n,r){var i=this._relativeTime[n];return C(i)?i(e,t,n,r):i.replace(/%d/i,e)},pn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return C(n)?n(t):n.replace(/%s/i,t)},pn.set=function(e){var t,n;for(n in e)C(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},pn.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Oe).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone},pn.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Oe.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},pn.monthsParse=function(e,t,n){var r,i,o;if(this._monthsParseExact)return function(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=h([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=Se.call(this._shortMonthsParse,a))?i:null:-1!==(i=Se.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=Se.call(this._shortMonthsParse,a))?i:-1!==(i=Se.call(this._longMonthsParse,a))?i:null:-1!==(i=Se.call(this._longMonthsParse,a))?i:-1!==(i=Se.call(this._shortMonthsParse,a))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=h([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},pn.monthsRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||Re.call(this),e?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=Fe),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},pn.monthsShortRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||Re.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=$e),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},pn.week=function(e){return Ue(e,this._week.dow,this._week.doy).week},pn.firstDayOfYear=function(){return this._week.doy},pn.firstDayOfWeek=function(){return this._week.dow},pn.weekdays=function(e,t){return e?o(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:o(this._weekdays)?this._weekdays:this._weekdays.standalone},pn.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},pn.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},pn.weekdaysParse=function(e,t,n){var r,i,o;if(this._weekdaysParseExact)return function(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=h([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=Se.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Se.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=Se.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=Se.call(this._weekdaysParse,a))?i:-1!==(i=Se.call(this._shortWeekdaysParse,a))?i:-1!==(i=Se.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Se.call(this._shortWeekdaysParse,a))?i:-1!==(i=Se.call(this._weekdaysParse,a))?i:-1!==(i=Se.call(this._minWeekdaysParse,a))?i:null:-1!==(i=Se.call(this._minWeekdaysParse,a))?i:-1!==(i=Se.call(this._weekdaysParse,a))?i:-1!==(i=Se.call(this._shortWeekdaysParse,a))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=h([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},pn.weekdaysRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Qe.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=Je),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},pn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Qe.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ze),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},pn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Qe.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Xe),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},pn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},pn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},dt("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===L(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),i.lang=x("moment.lang is deprecated. Use moment.locale instead.",dt),i.langData=x("moment.langData is deprecated. Use moment.localeData instead.",ft);var vn=Math.abs;function yn(e,t,n,r){var i=qt(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function bn(e){return e<0?Math.floor(e):Math.ceil(e)}function wn(e){return 4800*e/146097}function Mn(e){return 146097*e/4800}function Ln(e){return function(){return this.as(e)}}var kn=Ln("ms"),Tn=Ln("s"),xn=Ln("m"),Dn=Ln("h"),Sn=Ln("d"),Yn=Ln("w"),Cn=Ln("M"),An=Ln("y");function En(e){return function(){return this.isValid()?this._data[e]:NaN}}var Hn=En("milliseconds"),On=En("seconds"),jn=En("minutes"),Pn=En("hours"),Nn=En("days"),In=En("months"),$n=En("years");var Fn=Math.round,Rn={ss:44,s:45,m:45,h:22,d:26,M:11};var Wn=Math.abs;function zn(e){return(e>0)-(e<0)||+e}function Bn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Wn(this._milliseconds)/1e3,r=Wn(this._days),i=Wn(this._months);t=M((e=M(n/60))/60),n%=60,e%=60;var o=M(i/12),a=i%=12,s=r,l=t,u=e,d=n?n.toFixed(3).replace(/\.?0+$/,""):"",c=this.asSeconds();if(!c)return"P0D";var f=c<0?"-":"",h=zn(this._months)!==zn(c)?"-":"",p=zn(this._days)!==zn(c)?"-":"",m=zn(this._milliseconds)!==zn(c)?"-":"";return f+"P"+(o?h+o+"Y":"")+(a?h+a+"M":"")+(s?p+s+"D":"")+(l||u||d?"T":"")+(l?m+l+"H":"")+(u?m+u+"M":"")+(d?m+d+"S":"")}var Un=jt.prototype;return Un.isValid=function(){return this._isValid},Un.abs=function(){var e=this._data;return this._milliseconds=vn(this._milliseconds),this._days=vn(this._days),this._months=vn(this._months),e.milliseconds=vn(e.milliseconds),e.seconds=vn(e.seconds),e.minutes=vn(e.minutes),e.hours=vn(e.hours),e.months=vn(e.months),e.years=vn(e.years),this},Un.add=function(e,t){return yn(this,e,t,1)},Un.subtract=function(e,t){return yn(this,e,t,-1)},Un.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=j(e))||"year"===e)return t=this._days+r/864e5,n=this._months+wn(t),"month"===e?n:n/12;switch(t=this._days+Math.round(Mn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},Un.asMilliseconds=kn,Un.asSeconds=Tn,Un.asMinutes=xn,Un.asHours=Dn,Un.asDays=Sn,Un.asWeeks=Yn,Un.asMonths=Cn,Un.asYears=An,Un.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*L(this._months/12):NaN},Un._bubble=function(){var e,t,n,r,i,o=this._milliseconds,a=this._days,s=this._months,l=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*bn(Mn(s)+a),a=0,s=0),l.milliseconds=o%1e3,e=M(o/1e3),l.seconds=e%60,t=M(e/60),l.minutes=t%60,n=M(t/60),l.hours=n%24,s+=i=M(wn(a+=M(n/24))),a-=bn(Mn(i)),r=M(s/12),s%=12,l.days=a,l.months=s,l.years=r,this},Un.clone=function(){return qt(this)},Un.get=function(e){return e=j(e),this.isValid()?this[e+"s"]():NaN},Un.milliseconds=Hn,Un.seconds=On,Un.minutes=jn,Un.hours=Pn,Un.days=Nn,Un.weeks=function(){return M(this.days()/7)},Un.months=In,Un.years=$n,Un.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=qt(e).abs(),i=Fn(r.as("s")),o=Fn(r.as("m")),a=Fn(r.as("h")),s=Fn(r.as("d")),l=Fn(r.as("M")),u=Fn(r.as("y")),d=i<=Rn.ss&&["s",i]||i0,d[4]=n,function(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}.apply(null,d)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},Un.toISOString=Bn,Un.toString=Bn,Un.toJSON=Bn,Un.locale=en,Un.localeData=nn,Un.toIsoString=x("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Bn),Un.lang=tn,B("X",0,0,"unix"),B("x",0,0,"valueOf"),de("x",oe),de("X",/[+-]?\d+(\.\d{1,3})?/),pe("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),pe("x",function(e,t,n){n._d=new Date(L(e))}),i.version="2.22.2",t=Ct,i.fn=fn,i.min=function(){return Ht("isBefore",[].slice.call(arguments,0))},i.max=function(){return Ht("isAfter",[].slice.call(arguments,0))},i.now=function(){return Date.now?Date.now():+new Date},i.utc=h,i.unix=function(e){return Ct(1e3*e)},i.months=function(e,t){return gn(e,t,"months")},i.isDate=u,i.locale=dt,i.invalid=g,i.duration=qt,i.isMoment=w,i.weekdays=function(e,t,n){return _n(e,t,n,"weekdays")},i.parseZone=function(){return Ct.apply(null,arguments).parseZone()},i.localeData=ft,i.isDuration=Pt,i.monthsShort=function(e,t){return gn(e,t,"monthsShort")},i.weekdaysMin=function(e,t,n){return _n(e,t,n,"weekdaysMin")},i.defineLocale=ct,i.updateLocale=function(e,t){if(null!=t){var n,r,i=ot;null!=(r=ut(e))&&(i=r._config),(n=new E(t=A(i,t))).parentLocale=at[e],at[e]=n,dt(e)}else null!=at[e]&&(null!=at[e].parentLocale?at[e]=at[e].parentLocale:null!=at[e]&&delete at[e]);return at[e]},i.locales=function(){return D(at)},i.weekdaysShort=function(e,t,n){return _n(e,t,n,"weekdaysShort")},i.normalizeUnits=j,i.relativeTimeRounding=function(e){return void 0===e?Fn:"function"==typeof e&&(Fn=e,!0)},i.relativeTimeThreshold=function(e,t){return void 0!==Rn[e]&&(void 0===t?Rn[e]:(Rn[e]=t,"s"===e&&(Rn.ss=t-1),!0))},i.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},i.prototype=fn,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},i},e.exports=t()}).call(t,n(6)(e))},function(e,t,n){"use strict";var r=n(133),i=n(154),o=Object.prototype.toString;function a(e){return"[object Array]"===o.call(e)}function s(e){return null!==e&&"object"==typeof e}function l(e){return"[object Function]"===o.call(e)}function u(e,t){if(null!==e&&void 0!==e)if("object"!=typeof e&&(e=[e]),a(e))for(var n=0,r=e.length;n0&&t-1 in e)}L.fn=L.prototype={jquery:"3.3.1",constructor:L,length:0,toArray:function(){return l.call(this)},get:function(e){return null==e?l.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=L.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return L.each(this,e)},map:function(e){return this.pushStack(L.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(l.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+P+")"+P+"*"),B=new RegExp("="+P+"*([^\\]'\"]*?)"+P+"*\\]","g"),U=new RegExp($),q=new RegExp("^"+N+"$"),V={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:new RegExp("^(?:"+j+")$","i"),needsContext:new RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,J=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,X=/[+~]/,Q=new RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),ee=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){f()},ie=ve(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{E.apply(Y=H.call(w.childNodes),w.childNodes),Y[w.childNodes.length].nodeType}catch(e){E={apply:Y.length?function(e,t){A.apply(e,H.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function oe(e,t,r,i){var o,s,u,d,c,p,_,v=t&&t.ownerDocument,M=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==M&&9!==M&&11!==M)return r;if(!i&&((t?t.ownerDocument||t:w)!==h&&f(t),t=t||h,m)){if(11!==M&&(c=Z.exec(e)))if(o=c[1]){if(9===M){if(!(u=t.getElementById(o)))return r;if(u.id===o)return r.push(u),r}else if(v&&(u=v.getElementById(o))&&y(t,u)&&u.id===o)return r.push(u),r}else{if(c[2])return E.apply(r,t.getElementsByTagName(e)),r;if((o=c[3])&&n.getElementsByClassName&&t.getElementsByClassName)return E.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!x[e+" "]&&(!g||!g.test(e))){if(1!==M)v=t,_=e;else if("object"!==t.nodeName.toLowerCase()){for((d=t.getAttribute("id"))?d=d.replace(te,ne):t.setAttribute("id",d=b),s=(p=a(e)).length;s--;)p[s]="#"+d+" "+_e(p[s]);_=p.join(","),v=X.test(e)&&me(t.parentNode)||t}if(_)try{return E.apply(r,v.querySelectorAll(_)),r}catch(e){}finally{d===b&&t.removeAttribute("id")}}}return l(e.replace(R,"$1"),t,r,i)}function ae(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function se(e){return e[b]=!0,e}function le(e){var t=h.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ue(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function de(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function ce(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function fe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function he(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ie(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function pe(e){return se(function(t){return t=+t,se(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=oe.support={},o=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},f=oe.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!==h&&9===a.nodeType&&a.documentElement?(p=(h=a).documentElement,m=!o(h),w!==h&&(i=h.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.attributes=le(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=le(function(e){return e.appendChild(h.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=J.test(h.getElementsByClassName),n.getById=le(function(e){return p.appendChild(e).id=b,!h.getElementsByName||!h.getElementsByName(b).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(Q,ee);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(Q,ee);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&m)return t.getElementsByClassName(e)},_=[],g=[],(n.qsa=J.test(h.querySelectorAll))&&(le(function(e){p.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+j+")"),e.querySelectorAll("[id~="+b+"-]").length||g.push("~="),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||g.push(".#.+[+~]")}),le(function(e){e.innerHTML="";var t=h.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+P+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),p.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(n.matchesSelector=J.test(v=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&le(function(e){n.disconnectedMatch=v.call(e,"*"),v.call(e,"[s!='']:x"),_.push("!=",$)}),g=g.length&&new RegExp(g.join("|")),_=_.length&&new RegExp(_.join("|")),t=J.test(p.compareDocumentPosition),y=t||J.test(p.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return c=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===h||e.ownerDocument===w&&y(w,e)?-1:t===h||t.ownerDocument===w&&y(w,t)?1:d?O(d,e)-O(d,t):0:4&r?-1:1)}:function(e,t){if(e===t)return c=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===h?-1:t===h?1:i?-1:o?1:d?O(d,e)-O(d,t):0;if(i===o)return de(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?de(a[r],s[r]):a[r]===w?-1:s[r]===w?1:0},h):h},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==h&&f(e),t=t.replace(B,"='$1']"),n.matchesSelector&&m&&!x[t+" "]&&(!_||!_.test(t))&&(!g||!g.test(t)))try{var r=v.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return oe(t,h,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==h&&f(e),y(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==h&&f(e);var i=r.attrHandle[t.toLowerCase()],o=i&&S.call(r.attrHandle,t.toLowerCase())?i(e,t,!m):void 0;return void 0!==o?o:n.attributes||!m?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,r=[],i=0,o=0;if(c=!n.detectDuplicates,d=!n.sortStable&&e.slice(0),e.sort(D),c){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return d=null,e},i=oe.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=oe.selectors={cacheLength:50,createPseudo:se,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Q,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Q,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&U.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Q,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=k[e+" "];return t||(t=new RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&k(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=oe.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(F," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,d,c,f,h,p,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,_=s&&t.nodeName.toLowerCase(),v=!l&&!s,y=!1;if(g){if(o){for(;m;){for(f=t;f=f[m];)if(s?f.nodeName.toLowerCase()===_:1===f.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&v){for(y=(h=(u=(d=(c=(f=g)[b]||(f[b]={}))[f.uniqueID]||(c[f.uniqueID]={}))[e]||[])[0]===M&&u[1])&&u[2],f=h&&g.childNodes[h];f=++h&&f&&f[m]||(y=h=0)||p.pop();)if(1===f.nodeType&&++y&&f===t){d[e]=[M,h,y];break}}else if(v&&(y=h=(u=(d=(c=(f=t)[b]||(f[b]={}))[f.uniqueID]||(c[f.uniqueID]={}))[e]||[])[0]===M&&u[1]),!1===y)for(;(f=++h&&f&&f[m]||(y=h=0)||p.pop())&&((s?f.nodeName.toLowerCase()!==_:1!==f.nodeType)||!++y||(v&&((d=(c=f[b]||(f[b]={}))[f.uniqueID]||(c[f.uniqueID]={}))[e]=[M,y]),f!==t)););return(y-=i)===r||y%r==0&&y/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return i[b]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,n){for(var r,o=i(e,t),a=o.length;a--;)e[r=O(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:se(function(e){var t=[],n=[],r=s(e.replace(R,"$1"));return r[b]?se(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:se(function(e){return function(t){return oe(e,t).length>0}}),contains:se(function(e){return e=e.replace(Q,ee),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:se(function(e){return q.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(Q,ee).toLowerCase(),function(t){var n;do{if(n=m?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===p},focus:function(e){return e===h.activeElement&&(!h.hasFocus||h.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:he(!1),disabled:he(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return K.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:pe(function(){return[0]}),last:pe(function(e,t){return[t-1]}),eq:pe(function(e,t,n){return[n<0?n+t:n]}),even:pe(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:pe(function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function be(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,u=null!=t;s-1&&(o[u]=!(a[u]=c))}}else _=be(_===a?_.splice(p,_.length):_),i?i(null,a,_,l):E.apply(a,_)})}function Me(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],l=a?1:0,d=ve(function(e){return e===t},s,!0),c=ve(function(e){return O(t,e)>-1},s,!0),f=[function(e,n,r){var i=!a&&(r||n!==u)||((t=n).nodeType?d(e,n,r):c(e,n,r));return t=null,i}];l1&&ye(f),l>1&&_e(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(R,"$1"),n,l0,i=e.length>0,o=function(o,a,s,l,d){var c,p,g,_=0,v="0",y=o&&[],b=[],w=u,L=o||i&&r.find.TAG("*",d),k=M+=null==w?1:Math.random()||.1,T=L.length;for(d&&(u=a===h||a||d);v!==T&&null!=(c=L[v]);v++){if(i&&c){for(p=0,a||c.ownerDocument===h||(f(c),s=!m);g=e[p++];)if(g(c,a||h,s)){l.push(c);break}d&&(M=k)}n&&((c=!g&&c)&&_--,o&&y.push(c))}if(_+=v,n&&v!==_){for(p=0;g=t[p++];)g(y,b,a,s);if(o){if(_>0)for(;v--;)y[v]||b[v]||(b[v]=C.call(l));b=be(b)}E.apply(l,b),d&&!o&&b.length>0&&_+t.length>1&&oe.uniqueSort(l)}return d&&(M=k,u=w),y};return n?se(o):o}(o,i))).selector=e}return s},l=oe.select=function(e,t,n,i){var o,l,u,d,c,f="function"==typeof e&&e,h=!i&&a(e=f.selector||e);if(n=n||[],1===h.length){if((l=h[0]=h[0].slice(0)).length>2&&"ID"===(u=l[0]).type&&9===t.nodeType&&m&&r.relative[l[1].type]){if(!(t=(r.find.ID(u.matches[0].replace(Q,ee),t)||[])[0]))return n;f&&(t=t.parentNode),e=e.slice(l.shift().value.length)}for(o=V.needsContext.test(e)?0:l.length;o--&&(u=l[o],!r.relative[d=u.type]);)if((c=r.find[d])&&(i=c(u.matches[0].replace(Q,ee),X.test(l[0].type)&&me(t.parentNode)||t))){if(l.splice(o,1),!(e=i.length&&_e(l)))return E.apply(n,i),n;break}}return(f||s(e,h))(i,t,!m,n,!t||X.test(e)&&me(t.parentNode)||t),n},n.sortStable=b.split("").sort(D).join("")===b,n.detectDuplicates=!!c,f(),n.sortDetached=le(function(e){return 1&e.compareDocumentPosition(h.createElement("fieldset"))}),le(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||ue("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&le(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ue("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),le(function(e){return null==e.getAttribute("disabled")})||ue(j,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(n);L.find=x,L.expr=x.selectors,L.expr[":"]=L.expr.pseudos,L.uniqueSort=L.unique=x.uniqueSort,L.text=x.getText,L.isXMLDoc=x.isXML,L.contains=x.contains,L.escapeSelector=x.escape;var D=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&L(e).is(n))break;r.push(e)}return r},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},Y=L.expr.match.needsContext;function C(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var A=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function E(e,t,n){return v(t)?L.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?L.grep(e,function(e){return e===t!==n}):"string"!=typeof t?L.grep(e,function(e){return c.call(t,e)>-1!==n}):L.filter(t,e,n)}L.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?L.find.matchesSelector(r,e)?[r]:[]:L.find.matches(e,L.grep(t,function(e){return 1===e.nodeType}))},L.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(L(e).filter(function(){for(t=0;t1?L.uniqueSort(n):n},filter:function(e){return this.pushStack(E(this,e||[],!1))},not:function(e){return this.pushStack(E(this,e||[],!0))},is:function(e){return!!E(this,"string"==typeof e&&Y.test(e)?L(e):e||[],!1).length}});var H,O=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(L.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||H,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:O.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof L?t[0]:t,L.merge(this,L.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:a,!0)),A.test(r[1])&&L.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=a.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(L):L.makeArray(e,this)}).prototype=L.fn,H=L(a);var j=/^(?:parents|prev(?:Until|All))/,P={children:!0,contents:!0,next:!0,prev:!0};function N(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}L.fn.extend({has:function(e){var t=L(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&L.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?L.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?c.call(L(e),this[0]):c.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(L.uniqueSort(L.merge(this.get(),L(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),L.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return D(e,"parentNode")},parentsUntil:function(e,t,n){return D(e,"parentNode",n)},next:function(e){return N(e,"nextSibling")},prev:function(e){return N(e,"previousSibling")},nextAll:function(e){return D(e,"nextSibling")},prevAll:function(e){return D(e,"previousSibling")},nextUntil:function(e,t,n){return D(e,"nextSibling",n)},prevUntil:function(e,t,n){return D(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return C(e,"iframe")?e.contentDocument:(C(e,"template")&&(e=e.content||e),L.merge([],e.childNodes))}},function(e,t){L.fn[e]=function(n,r){var i=L.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=L.filter(r,i)),this.length>1&&(P[e]||L.uniqueSort(i),j.test(e)&&i.reverse()),this.pushStack(i)}});var I=/[^\x20\t\r\n\f]+/g;function $(e){return e}function F(e){throw e}function R(e,t,n,r){var i;try{e&&v(i=e.promise)?i.call(e).done(t).fail(n):e&&v(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}L.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return L.each(e.match(I)||[],function(e,n){t[n]=!0}),t}(e):L.extend({},e);var t,n,r,i,o=[],a=[],s=-1,l=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s-1;)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?L.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!r}};return u},L.extend({Deferred:function(e){var t=[["notify","progress",L.Callbacks("memory"),L.Callbacks("memory"),2],["resolve","done",L.Callbacks("once memory"),L.Callbacks("once memory"),0,"resolved"],["reject","fail",L.Callbacks("once memory"),L.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return L.Deferred(function(n){L.each(t,function(t,r){var i=v(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&v(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(e,r,i){var o=0;function a(e,t,r,i){return function(){var s=this,l=arguments,u=function(){var n,u;if(!(e=o&&(r!==F&&(s=void 0,l=[n]),t.rejectWith(s,l))}};e?d():(L.Deferred.getStackHook&&(d.stackTrace=L.Deferred.getStackHook()),n.setTimeout(d))}}return L.Deferred(function(n){t[0][3].add(a(0,n,v(i)?i:$,n.notifyWith)),t[1][3].add(a(0,n,v(e)?e:$)),t[2][3].add(a(0,n,v(r)?r:F))}).promise()},promise:function(e){return null!=e?L.extend(e,i):i}},o={};return L.each(t,function(e,n){var a=n[2],s=n[5];i[n[1]]=a.add,s&&a.add(function(){r=s},t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=a.fireWith}),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=l.call(arguments),o=L.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?l.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(R(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||v(i[n]&&i[n].then)))return o.then();for(;n--;)R(i[n],a(n),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;L.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&W.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},L.readyException=function(e){n.setTimeout(function(){throw e})};var z=L.Deferred();function B(){a.removeEventListener("DOMContentLoaded",B),n.removeEventListener("load",B),L.ready()}L.fn.ready=function(e){return z.then(e).catch(function(e){L.readyException(e)}),this},L.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--L.readyWait:L.isReady)||(L.isReady=!0,!0!==e&&--L.readyWait>0||z.resolveWith(a,[L]))}}),L.ready.then=z.then,"complete"===a.readyState||"loading"!==a.readyState&&!a.documentElement.doScroll?n.setTimeout(L.ready):(a.addEventListener("DOMContentLoaded",B),n.addEventListener("load",B));var U=function(e,t,n,r,i,o,a){var s=0,l=e.length,u=null==n;if("object"===M(n))for(s in i=!0,n)U(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,v(r)||(a=!0),u&&(a?(t.call(e,r),t=null):(u=t,t=function(e,t,n){return u.call(L(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),L.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=X.get(e,t),n&&(!r||Array.isArray(n)?r=X.access(e,t,L.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=L.queue(e,t),r=n.length,i=n.shift(),o=L._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){L.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return X.get(e,n)||X.access(e,n,{empty:L.Callbacks("once memory").add(function(){X.remove(e,[t+"queue",n])})})}}),L.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,pe=/^$|^module$|\/(?:java|ecma)script/i,me={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ge(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&C(e,t)?L.merge([e],n):n}function _e(e,t){for(var n=0,r=e.length;n-1)i&&i.push(o);else if(u=L.contains(o.ownerDocument,o),a=ge(c.appendChild(o),"script"),u&&_e(a),n)for(d=0;o=a[d++];)pe.test(o.type||"")&&n.push(o);return c}ve=a.createDocumentFragment().appendChild(a.createElement("div")),(ye=a.createElement("input")).setAttribute("type","radio"),ye.setAttribute("checked","checked"),ye.setAttribute("name","t"),ve.appendChild(ye),_.checkClone=ve.cloneNode(!0).cloneNode(!0).lastChild.checked,ve.innerHTML="",_.noCloneChecked=!!ve.cloneNode(!0).lastChild.defaultValue;var Me=a.documentElement,Le=/^key/,ke=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Te=/^([^.]*)(?:\.(.+)|)/;function xe(){return!0}function De(){return!1}function Se(){try{return a.activeElement}catch(e){}}function Ye(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ye(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=De;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return L().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=L.guid++)),e.each(function(){L.event.add(this,t,i,r,n)})}L.event={global:{},add:function(e,t,n,r,i){var o,a,s,l,u,d,c,f,h,p,m,g=X.get(e);if(g)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&L.find.matchesSelector(Me,i),n.guid||(n.guid=L.guid++),(l=g.events)||(l=g.events={}),(a=g.handle)||(a=g.handle=function(t){return void 0!==L&&L.event.triggered!==t.type?L.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match(I)||[""]).length;u--;)h=m=(s=Te.exec(t[u])||[])[1],p=(s[2]||"").split(".").sort(),h&&(c=L.event.special[h]||{},h=(i?c.delegateType:c.bindType)||h,c=L.event.special[h]||{},d=L.extend({type:h,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&L.expr.match.needsContext.test(i),namespace:p.join(".")},o),(f=l[h])||((f=l[h]=[]).delegateCount=0,c.setup&&!1!==c.setup.call(e,r,p,a)||e.addEventListener&&e.addEventListener(h,a)),c.add&&(c.add.call(e,d),d.handler.guid||(d.handler.guid=n.guid)),i?f.splice(f.delegateCount++,0,d):f.push(d),L.event.global[h]=!0)},remove:function(e,t,n,r,i){var o,a,s,l,u,d,c,f,h,p,m,g=X.hasData(e)&&X.get(e);if(g&&(l=g.events)){for(u=(t=(t||"").match(I)||[""]).length;u--;)if(h=m=(s=Te.exec(t[u])||[])[1],p=(s[2]||"").split(".").sort(),h){for(c=L.event.special[h]||{},f=l[h=(r?c.delegateType:c.bindType)||h]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=f.length;o--;)d=f[o],!i&&m!==d.origType||n&&n.guid!==d.guid||s&&!s.test(d.namespace)||r&&r!==d.selector&&("**"!==r||!d.selector)||(f.splice(o,1),d.selector&&f.delegateCount--,c.remove&&c.remove.call(e,d));a&&!f.length&&(c.teardown&&!1!==c.teardown.call(e,p,g.handle)||L.removeEvent(e,h,g.handle),delete l[h])}else for(h in l)L.event.remove(e,h+t[u],n,r,!0);L.isEmptyObject(l)&&X.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=L.event.fix(e),l=new Array(arguments.length),u=(X.get(this,"events")||{})[s.type]||[],d=L.event.special[s.type]||{};for(l[0]=s,t=1;t=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==e.type||!0!==u.disabled)){for(o=[],a={},n=0;n-1:L.find(i,this,null,[u]).length),a[i]&&o.push(r);o.length&&s.push({elem:u,handlers:o})}return u=this,l\x20\t\r\n\f]*)[^>]*)\/>/gi,Ae=/\s*$/g;function Oe(e,t){return C(e,"table")&&C(11!==t.nodeType?t:t.firstChild,"tr")&&L(e).children("tbody")[0]||e}function je(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Pe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ne(e,t){var n,r,i,o,a,s,l,u;if(1===t.nodeType){if(X.hasData(e)&&(o=X.access(e),a=X.set(t,o),u=o.events))for(i in delete a.handle,a.events={},u)for(n=0,r=u[i].length;n1&&"string"==typeof p&&!_.checkClone&&Ee.test(p))return e.each(function(i){var o=e.eq(i);m&&(t[0]=p.call(this,i,o.html())),Ie(o,t,n,r)});if(f&&(o=(i=we(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=L.map(ge(i,"script"),je)).length;c")},clone:function(e,t,n){var r,i,o,a,s,l,u,d=e.cloneNode(!0),c=L.contains(e.ownerDocument,e);if(!(_.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||L.isXMLDoc(e)))for(a=ge(d),r=0,i=(o=ge(e)).length;r0&&_e(a,!c&&ge(e,"script")),d},cleanData:function(e){for(var t,n,r,i=L.event.special,o=0;void 0!==(n=e[o]);o++)if(J(n)){if(t=n[X.expando]){if(t.events)for(r in t.events)i[r]?L.event.remove(n,r):L.removeEvent(n,r,t.handle);n[X.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),L.fn.extend({detach:function(e){return $e(this,e,!0)},remove:function(e){return $e(this,e)},text:function(e){return U(this,function(e){return void 0===e?L.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Ie(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Oe(this,e).appendChild(e)})},prepend:function(){return Ie(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Oe(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Ie(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Ie(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(L.cleanData(ge(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return L.clone(this,e,t)})},html:function(e){return U(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ae.test(e)&&!me[(he.exec(e)||["",""])[1].toLowerCase()]){e=L.htmlPrefilter(e);try{for(;n=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-l-s-.5))),l}function et(e,t,n){var r=Re(e),i=ze(e,t,r),o="border-box"===L.css(e,"boxSizing",!1,r),a=o;if(Fe.test(i)){if(!n)return i;i="auto"}return a=a&&(_.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===L.css(e,"display",!1,r))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+Qe(e,t,n||(o?"border":"content"),a,r,i)+"px"}function tt(e,t,n,r,i){return new tt.prototype.init(e,t,n,r,i)}L.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=ze(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,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:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=K(t),l=qe.test(t),u=e.style;if(l||(t=Ze(s)),a=L.cssHooks[t]||L.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t];"string"===(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=le(e,t,i),o="number"),null!=n&&n==n&&("number"===o&&(n+=i&&i[3]||(L.cssNumber[s]?"":"px")),_.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(l?u.setProperty(t,n):u[t]=n))}},css:function(e,t,n,r){var i,o,a,s=K(t);return qe.test(t)||(t=Ze(s)),(a=L.cssHooks[t]||L.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=ze(e,t,r)),"normal"===i&&t in Ge&&(i=Ge[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),L.each(["height","width"],function(e,t){L.cssHooks[t]={get:function(e,n,r){if(n)return!Ue.test(L.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?et(e,t,r):se(e,Ve,function(){return et(e,t,r)})},set:function(e,n,r){var i,o=Re(e),a="border-box"===L.css(e,"boxSizing",!1,o),s=r&&Qe(e,t,r,a,o);return a&&_.scrollboxSize()===o.position&&(s-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Qe(e,t,"border",!1,o)-.5)),s&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=L.css(e,t)),Xe(0,n,s)}}}),L.cssHooks.marginLeft=Be(_.reliableMarginLeft,function(e,t){if(t)return(parseFloat(ze(e,"marginLeft"))||e.getBoundingClientRect().left-se(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),L.each({margin:"",padding:"",border:"Width"},function(e,t){L.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(L.cssHooks[e+t].set=Xe)}),L.fn.extend({css:function(e,t){return U(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Re(e),i=t.length;a1)}}),L.Tween=tt,tt.prototype={constructor:tt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||L.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(L.cssNumber[n]?"":"px")},cur:function(){var e=tt.propHooks[this.prop];return e&&e.get?e.get(this):tt.propHooks._default.get(this)},run:function(e){var t,n=tt.propHooks[this.prop];return this.options.duration?this.pos=t=L.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):tt.propHooks._default.set(this),this}},tt.prototype.init.prototype=tt.prototype,tt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=L.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){L.fx.step[e.prop]?L.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[L.cssProps[e.prop]]&&!L.cssHooks[e.prop]?e.elem[e.prop]=e.now:L.style(e.elem,e.prop,e.now+e.unit)}}},tt.propHooks.scrollTop=tt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},L.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},L.fx=tt.prototype.init,L.fx.step={};var nt,rt,it=/^(?:toggle|show|hide)$/,ot=/queueHooks$/;function at(){rt&&(!1===a.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(at):n.setTimeout(at,L.fx.interval),L.fx.tick())}function st(){return n.setTimeout(function(){nt=void 0}),nt=Date.now()}function lt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ut(e,t,n){for(var r,i=(dt.tweeners[t]||[]).concat(dt.tweeners["*"]),o=0,a=i.length;o1)},removeAttr:function(e){return this.each(function(){L.removeAttr(this,e)})}}),L.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?L.prop(e,t,n):(1===o&&L.isXMLDoc(e)||(i=L.attrHooks[t.toLowerCase()]||(L.expr.match.bool.test(t)?ct:void 0)),void 0!==n?null===n?void L.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=L.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!_.radioValue&&"radio"===t&&C(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(I);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),ct={set:function(e,t,n){return!1===t?L.removeAttr(e,n):e.setAttribute(n,n),n}},L.each(L.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ft[t]||L.find.attr;ft[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=ft[a],ft[a]=i,i=null!=n(e,t,r)?a:null,ft[a]=o),i}});var ht=/^(?:input|select|textarea|button)$/i,pt=/^(?:a|area)$/i;function mt(e){return(e.match(I)||[]).join(" ")}function gt(e){return e.getAttribute&&e.getAttribute("class")||""}function _t(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(I)||[]}L.fn.extend({prop:function(e,t){return U(this,L.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[L.propFix[e]||e]})}}),L.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&L.isXMLDoc(e)||(t=L.propFix[t]||t,i=L.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=L.find.attr(e,"tabindex");return t?parseInt(t,10):ht.test(e.nodeName)||pt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),_.optSelected||(L.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),L.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){L.propFix[this.toLowerCase()]=this}),L.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,l=0;if(v(e))return this.each(function(t){L(this).addClass(e.call(this,t,gt(this)))});if((t=_t(e)).length)for(;n=this[l++];)if(i=gt(n),r=1===n.nodeType&&" "+mt(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=mt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,l=0;if(v(e))return this.each(function(t){L(this).removeClass(e.call(this,t,gt(this)))});if(!arguments.length)return this.attr("class","");if((t=_t(e)).length)for(;n=this[l++];)if(i=gt(n),r=1===n.nodeType&&" "+mt(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=mt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):v(e)?this.each(function(n){L(this).toggleClass(e.call(this,n,gt(this),t),t)}):this.each(function(){var t,i,o,a;if(r)for(i=0,o=L(this),a=_t(e);t=a[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=gt(this))&&X.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":X.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+mt(gt(n))+" ").indexOf(t)>-1)return!0;return!1}});var vt=/\r/g;L.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=v(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,L(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=L.map(i,function(e){return null==e?"":e+""})),(t=L.valHooks[this.type]||L.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=L.valHooks[i.type]||L.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(vt,""):null==n?"":n:void 0}}),L.extend({valHooks:{option:{get:function(e){var t=L.find.attr(e,"value");return null!=t?t:mt(L.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],l=a?o+1:i.length;for(r=o<0?l:a?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),L.each(["radio","checkbox"],function(){L.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=L.inArray(L(e).val(),t)>-1}},_.checkOn||(L.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),_.focusin="onfocusin"in n;var yt=/^(?:focusinfocus|focusoutblur)$/,bt=function(e){e.stopPropagation()};L.extend(L.event,{trigger:function(e,t,r,i){var o,s,l,u,d,c,f,h,m=[r||a],g=p.call(e,"type")?e.type:e,_=p.call(e,"namespace")?e.namespace.split("."):[];if(s=h=l=r=r||a,3!==r.nodeType&&8!==r.nodeType&&!yt.test(g+L.event.triggered)&&(g.indexOf(".")>-1&&(g=(_=g.split(".")).shift(),_.sort()),d=g.indexOf(":")<0&&"on"+g,(e=e[L.expando]?e:new L.Event(g,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=_.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+_.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:L.makeArray(t,[e]),f=L.event.special[g]||{},i||!f.trigger||!1!==f.trigger.apply(r,t))){if(!i&&!f.noBubble&&!y(r)){for(u=f.delegateType||g,yt.test(u+g)||(s=s.parentNode);s;s=s.parentNode)m.push(s),l=s;l===(r.ownerDocument||a)&&m.push(l.defaultView||l.parentWindow||n)}for(o=0;(s=m[o++])&&!e.isPropagationStopped();)h=s,e.type=o>1?u:f.bindType||g,(c=(X.get(s,"events")||{})[e.type]&&X.get(s,"handle"))&&c.apply(s,t),(c=d&&s[d])&&c.apply&&J(s)&&(e.result=c.apply(s,t),!1===e.result&&e.preventDefault());return e.type=g,i||e.isDefaultPrevented()||f._default&&!1!==f._default.apply(m.pop(),t)||!J(r)||d&&v(r[g])&&!y(r)&&((l=r[d])&&(r[d]=null),L.event.triggered=g,e.isPropagationStopped()&&h.addEventListener(g,bt),r[g](),e.isPropagationStopped()&&h.removeEventListener(g,bt),L.event.triggered=void 0,l&&(r[d]=l)),e.result}},simulate:function(e,t,n){var r=L.extend(new L.Event,n,{type:e,isSimulated:!0});L.event.trigger(r,null,t)}}),L.fn.extend({trigger:function(e,t){return this.each(function(){L.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return L.event.trigger(e,t,n,!0)}}),_.focusin||L.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){L.event.simulate(t,e.target,L.event.fix(e))};L.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=X.access(r,t);i||r.addEventListener(e,n,!0),X.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=X.access(r,t)-1;i?X.access(r,t,i):(r.removeEventListener(e,n,!0),X.remove(r,t))}}});var wt=n.location,Mt=Date.now(),Lt=/\?/;L.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||L.error("Invalid XML: "+e),t};var kt=/\[\]$/,Tt=/\r?\n/g,xt=/^(?:submit|button|image|reset|file)$/i,Dt=/^(?:input|select|textarea|keygen)/i;function St(e,t,n,r){var i;if(Array.isArray(t))L.each(t,function(t,i){n||kt.test(e)?r(e,i):St(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==M(t))r(e,t);else for(i in t)St(e+"["+i+"]",t[i],n,r)}L.param=function(e,t){var n,r=[],i=function(e,t){var n=v(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!L.isPlainObject(e))L.each(e,function(){i(this.name,this.value)});else for(n in e)St(n,e[n],t,i);return r.join("&")},L.fn.extend({serialize:function(){return L.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=L.prop(this,"elements");return e?L.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!L(this).is(":disabled")&&Dt.test(this.nodeName)&&!xt.test(e)&&(this.checked||!fe.test(e))}).map(function(e,t){var n=L(this).val();return null==n?null:Array.isArray(n)?L.map(n,function(e){return{name:t.name,value:e.replace(Tt,"\r\n")}}):{name:t.name,value:n.replace(Tt,"\r\n")}}).get()}});var Yt=/%20/g,Ct=/#.*$/,At=/([?&])_=[^&]*/,Et=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ht=/^(?:GET|HEAD)$/,Ot=/^\/\//,jt={},Pt={},Nt="*/".concat("*"),It=a.createElement("a");function $t(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(I)||[];if(v(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Ft(e,t,n,r){var i={},o=e===Pt;function a(s){var l;return i[s]=!0,L.each(e[s]||[],function(e,s){var u=s(t,n,r);return"string"!=typeof u||o||i[u]?o?!(l=u):void 0:(t.dataTypes.unshift(u),a(u),!1)}),l}return a(t.dataTypes[0])||!i["*"]&&a("*")}function Rt(e,t){var n,r,i=L.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&L.extend(!0,e,r),e}It.href=wt.href,L.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:wt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(wt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Nt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":L.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Rt(Rt(e,L.ajaxSettings),t):Rt(L.ajaxSettings,e)},ajaxPrefilter:$t(jt),ajaxTransport:$t(Pt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,i,o,s,l,u,d,c,f,h,p=L.ajaxSetup({},t),m=p.context||p,g=p.context&&(m.nodeType||m.jquery)?L(m):L.event,_=L.Deferred(),v=L.Callbacks("once memory"),y=p.statusCode||{},b={},w={},M="canceled",k={readyState:0,getResponseHeader:function(e){var t;if(d){if(!s)for(s={};t=Et.exec(o);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return d?o:null},setRequestHeader:function(e,t){return null==d&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==d&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(d)k.always(e[k.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||M;return r&&r.abort(t),T(0,t),this}};if(_.promise(k),p.url=((e||p.url||wt.href)+"").replace(Ot,wt.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(I)||[""],null==p.crossDomain){u=a.createElement("a");try{u.href=p.url,u.href=u.href,p.crossDomain=It.protocol+"//"+It.host!=u.protocol+"//"+u.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=L.param(p.data,p.traditional)),Ft(jt,p,t,k),d)return k;for(f in(c=L.event&&p.global)&&0==L.active++&&L.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Ht.test(p.type),i=p.url.replace(Ct,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Yt,"+")):(h=p.url.slice(i.length),p.data&&(p.processData||"string"==typeof p.data)&&(i+=(Lt.test(i)?"&":"?")+p.data,delete p.data),!1===p.cache&&(i=i.replace(At,"$1"),h=(Lt.test(i)?"&":"?")+"_="+Mt+++h),p.url=i+h),p.ifModified&&(L.lastModified[i]&&k.setRequestHeader("If-Modified-Since",L.lastModified[i]),L.etag[i]&&k.setRequestHeader("If-None-Match",L.etag[i])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&k.setRequestHeader("Content-Type",p.contentType),k.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Nt+"; q=0.01":""):p.accepts["*"]),p.headers)k.setRequestHeader(f,p.headers[f]);if(p.beforeSend&&(!1===p.beforeSend.call(m,k,p)||d))return k.abort();if(M="abort",v.add(p.complete),k.done(p.success),k.fail(p.error),r=Ft(Pt,p,t,k)){if(k.readyState=1,c&&g.trigger("ajaxSend",[k,p]),d)return k;p.async&&p.timeout>0&&(l=n.setTimeout(function(){k.abort("timeout")},p.timeout));try{d=!1,r.send(b,T)}catch(e){if(d)throw e;T(-1,e)}}else T(-1,"No Transport");function T(e,t,a,s){var u,f,h,b,w,M=t;d||(d=!0,l&&n.clearTimeout(l),r=void 0,o=s||"",k.readyState=e>0?4:0,u=e>=200&&e<300||304===e,a&&(b=function(e,t,n){for(var r,i,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){l.unshift(i);break}if(l[0]in n)o=l[0];else{for(i in n){if(!l[0]||e.converters[i+" "+l[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==l[0]&&l.unshift(o),n[o]}(p,k,a)),b=function(e,t,n,r){var i,o,a,s,l,u={},d=e.dataTypes.slice();if(d[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];for(o=d.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=d.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(a=u[l+" "+o]||u["* "+o]))for(i in u)if((s=i.split(" "))[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){!0===a?a=u[i]:!0!==u[i]&&(o=s[0],d.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}(p,b,k,u),u?(p.ifModified&&((w=k.getResponseHeader("Last-Modified"))&&(L.lastModified[i]=w),(w=k.getResponseHeader("etag"))&&(L.etag[i]=w)),204===e||"HEAD"===p.type?M="nocontent":304===e?M="notmodified":(M=b.state,f=b.data,u=!(h=b.error))):(h=M,!e&&M||(M="error",e<0&&(e=0))),k.status=e,k.statusText=(t||M)+"",u?_.resolveWith(m,[f,M,k]):_.rejectWith(m,[k,M,h]),k.statusCode(y),y=void 0,c&&g.trigger(u?"ajaxSuccess":"ajaxError",[k,p,u?f:h]),v.fireWith(m,[k,M]),c&&(g.trigger("ajaxComplete",[k,p]),--L.active||L.event.trigger("ajaxStop")))}return k},getJSON:function(e,t,n){return L.get(e,t,n,"json")},getScript:function(e,t){return L.get(e,void 0,t,"script")}}),L.each(["get","post"],function(e,t){L[t]=function(e,n,r,i){return v(n)&&(i=i||r,r=n,n=void 0),L.ajax(L.extend({url:e,type:t,dataType:i,data:n,success:r},L.isPlainObject(e)&&e))}}),L._evalUrl=function(e){return L.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},L.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=L(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return v(e)?this.each(function(t){L(this).wrapInner(e.call(this,t))}):this.each(function(){var t=L(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v(e);return this.each(function(n){L(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){L(this).replaceWith(this.childNodes)}),this}}),L.expr.pseudos.hidden=function(e){return!L.expr.pseudos.visible(e)},L.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},L.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Wt={0:200,1223:204},zt=L.ajaxSettings.xhr();_.cors=!!zt&&"withCredentials"in zt,_.ajax=zt=!!zt,L.ajaxTransport(function(e){var t,r;if(_.cors||zt&&!e.crossDomain)return{send:function(i,o){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];for(a in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);t=function(e){return function(){t&&(t=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Wt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),r=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout(function(){t&&r()})},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),L.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),L.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return L.globalEval(e),e}}}),L.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),L.ajaxTransport("script",function(e){var t,n;if(e.crossDomain)return{send:function(r,i){t=L("