├── CODE_OF_CONDUCT.md ├── Data and ML model ├── READ ME FIRST.txt ├── data_2014_2017_prepared.csv └── ml_model.py ├── README.md ├── db.sqlite3 ├── main ├── __init__.py ├── __pycache__ │ ├── __init__.cpython-37.pyc │ ├── admin.cpython-37.pyc │ ├── apps.cpython-37.pyc │ ├── forms.cpython-37.pyc │ ├── ml_model.cpython-37.pyc │ ├── ml_model2.cpython-37.pyc │ ├── models.cpython-37.pyc │ ├── urls.cpython-37.pyc │ └── views.cpython-37.pyc ├── admin.py ├── apps.py ├── forms.py ├── migrations │ ├── __init__.py │ └── __pycache__ │ │ └── __init__.cpython-37.pyc ├── ml_model.py ├── models.py ├── static │ └── main │ │ ├── assets │ │ ├── img │ │ │ └── background │ │ │ │ ├── img-38.jpg │ │ │ │ └── img-55.jpg │ │ └── svg │ │ │ ├── icons.svg │ │ │ ├── play.svg │ │ │ ├── video-icon-dark.svg │ │ │ └── video-icon.svg │ │ ├── css │ │ ├── materialize.css │ │ └── slides.min.css │ │ ├── images │ │ ├── avatar_g.jpg │ │ ├── bridge.jpg │ │ ├── favicon.ico │ │ ├── neha.jpg │ │ ├── priya.jpg │ │ ├── samridhhi.jpg │ │ ├── satish.jpg │ │ ├── satyendra.jpg │ │ ├── under_construction.jpg │ │ └── woods.jpg │ │ └── js │ │ ├── materialize.min.js │ │ └── slides.min.js ├── templates │ └── main │ │ ├── about.html │ │ ├── header.html │ │ ├── includes │ │ ├── messaging.html │ │ ├── navbar.html │ │ └── navbar_buttons.html │ │ ├── index1.html │ │ ├── index2.html │ │ ├── predict.html │ │ └── under_construction.html ├── testing.py ├── tests.py ├── urls.py ├── views.py └── xgboost_model.pkl ├── manage.py ├── requirements.txt └── ttps ├── __init__.py ├── __pycache__ ├── __init__.cpython-37.pyc ├── settings.cpython-37.pyc ├── urls.cpython-37.pyc └── wsgi.cpython-37.pyc ├── settings.py ├── urls.py └── wsgi.py /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at ramp0284@gmail.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq 77 | -------------------------------------------------------------------------------- /Data and ML model/READ ME FIRST.txt: -------------------------------------------------------------------------------- 1 | This section contains python file of Machine Learning Model for testing purposes, here original preprocessed data of 2 | 2 years also present. 3 | 4 | This python file is well customized so that anyone can run it on local machine without jupyter notebook for a single 5 | row prediction. -------------------------------------------------------------------------------- /Data and ML model/ml_model.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import os 3 | import numpy as np 4 | import pandas as pd 5 | import sklearn as sk 6 | from collections import defaultdict, Counter 7 | from sklearn.model_selection import train_test_split 8 | import xgboost as xgb 9 | 10 | 11 | # The first step is 12 | # to get our machine learning dataset: 13 | # 14 | 15 | 16 | def logic_layer(x): 17 | 18 | # preparation_steps = [] 19 | # preparation_output_schema = {u'userModified': False, u'columns': [{u'type': u'bigint', u'name': u'year'}, {u'type': u'bigint', u'name': u'quarter'}, {u'type': u'bigint', u'name': u'market'}, {u'type': u'bigint', u'name': u'dur_stay'}, {u'type': u'bigint', u'name': u'mode'}, {u'type': u'bigint', u'name': u'purpose'}, {u'type': u'double', u'name': u'Visits (000s)'}, {u'type': u'double', u'name': u'Spend (\xa3m)'}]} 20 | 21 | workpath = os.path.dirname(os.path.abspath(__file__)) #Returns the Path your .py file is in 22 | 23 | ml_dataset_handle = pd.read_csv(os.path.join(workpath, 'data_2014_2017_prepared.csv')) 24 | # ml_dataset_handle.set_preparation_steps(preparation_steps, preparation_output_schema) 25 | ml_dataset = ml_dataset_handle 26 | 27 | # print ('Base data has %i rows and %i columns' % (ml_dataset.shape[0], ml_dataset.shape[1])) 28 | # Five first records", 29 | # ml_dataset.head(5) 30 | 31 | 32 | 33 | 34 | 35 | ml_dataset = ml_dataset[[u'quarter', u'Visits (000s)', u'mode', u'purpose', u'year', u'dur_stay', u'market', u'Spend (\xa3m)']] 36 | 37 | 38 | 39 | ml_dataset['__target__'] = ml_dataset['Visits (000s)'] 40 | del ml_dataset['Visits (000s)'] 41 | 42 | 43 | # Remove rows for which the target is unknown. 44 | ml_dataset = ml_dataset[~ml_dataset['__target__'].isnull()] 45 | 46 | 47 | 48 | def coerce_to_unicode(x): 49 | if sys.version_info < (3, 0): 50 | if isinstance(x, str): 51 | return unicode(x,'utf-8') 52 | else: 53 | return unicode(x) 54 | else: 55 | return str(x) 56 | 57 | 58 | a = pd.DataFrame(columns = ['quarter', 'mode','purpose','year','dur_stay','market', 'Spend (£m)', '__target__']) 59 | a.loc[0]= x 60 | 61 | 62 | 63 | # train, test = train_test_split(ml_dataset, test_size=0.0) 64 | train = ml_dataset 65 | test = a 66 | # print ('Train data has %i rows and %i columns' % (train.shape[0], train.shape[1])) 67 | # print ('Test data has %i rows and %i columns' % (test.shape[0], test.shape[1])) 68 | # train = ml_dataset 69 | 70 | 71 | 72 | drop_rows_when_missing = [] 73 | impute_when_missing = [{'impute_with': u'MEAN', 'feature': u'quarter'}, {'impute_with': u'MEAN', 'feature': u'mode'}, {'impute_with': u'MEAN', 'feature': u'purpose'}, {'impute_with': u'MEAN', 'feature': u'year'}, {'impute_with': u'MEAN', 'feature': u'dur_stay'}, {'impute_with': u'MEAN', 'feature': u'market'}, {'impute_with': u'MEAN', 'feature': u'Spend (\xa3m)'}] 74 | 75 | # Features for which we drop rows with missing values" 76 | for feature in drop_rows_when_missing: 77 | train = train[train[feature].notnull()] 78 | test = test[test[feature].notnull()] 79 | # print ('Dropped missing records in %s' % feature) 80 | 81 | # Features for which we impute missing values" 82 | for feature in impute_when_missing: 83 | if feature['impute_with'] == 'MEAN': 84 | v = train[feature['feature']].mean() 85 | elif feature['impute_with'] == 'MEDIAN': 86 | v = train[feature['feature']].median() 87 | elif feature['impute_with'] == 'CREATE_CATEGORY': 88 | v = 'NULL_CATEGORY' 89 | elif feature['impute_with'] == 'MODE': 90 | v = train[feature['feature']].value_counts().index[0] 91 | elif feature['impute_with'] == 'CONSTANT': 92 | v = feature['value'] 93 | train[feature['feature']] = train[feature['feature']].fillna(v) 94 | test[feature['feature']] = test[feature['feature']].fillna(v) 95 | # print ('Imputed missing values in feature %s with value %s' % (feature['feature'], coerce_to_unicode(v))) 96 | 97 | 98 | 99 | 100 | rescale_features = {u'dur_stay': u'AVGSTD', u'mode': u'AVGSTD', u'Spend (\xa3m)': u'AVGSTD', u'year': u'AVGSTD', u'quarter': u'AVGSTD', u'market': u'AVGSTD', u'purpose': u'AVGSTD'} 101 | for (feature_name, rescale_method) in rescale_features.items(): 102 | if rescale_method == 'MINMAX': 103 | _min = train[feature_name].min() 104 | _max = train[feature_name].max() 105 | scale = _max - _min 106 | shift = _min 107 | else: 108 | shift = train[feature_name].mean() 109 | scale = train[feature_name].std() 110 | if scale == 0.: 111 | del train[feature_name] 112 | del test[feature_name] 113 | # print ('Feature %s was dropped because it has no variance' % feature_name) 114 | else: 115 | # print ('Rescaled %s' % feature_name) 116 | train[feature_name] = (train[feature_name] - shift).astype(np.float64) / scale 117 | test[feature_name] = (test[feature_name] - shift).astype(np.float64) / scale 118 | 119 | 120 | 121 | train_X = train.drop('__target__', axis=1) 122 | test_X = test.drop('__target__', axis=1) 123 | 124 | train_Y = np.array(train['__target__']) 125 | test_Y = np.array(test['__target__']) 126 | 127 | clf = xgb.XGBRegressor( 128 | max_depth=10, 129 | learning_rate=0.1, 130 | gamma=0.0, 131 | min_child_weight=0.0, 132 | max_delta_step=0.0, 133 | subsample=1.0, 134 | colsample_bytree=0.75, 135 | colsample_bylevel=1.0, 136 | reg_alpha=0.0, 137 | reg_lambda=1.0, 138 | n_estimators=300, 139 | silent=0, 140 | nthread=4, 141 | scale_pos_weight=1.0, 142 | base_score=0.5, 143 | seed=1337, 144 | missing=None, 145 | ) 146 | 147 | 148 | 149 | # %time 150 | clf.fit(train_X, train_Y) 151 | 152 | 153 | 154 | # a = pd.DataFrame(columns = ['quarter', 'mode','purpose','year','dur_stay','market', 'Spend (£m)']) 155 | 156 | 157 | 158 | 159 | # a['quarter'] = -1.380899 160 | # a['mode'] = -0.638146 161 | # a['purpose'] = 1.315741 162 | # a['year'] = -1.325480 163 | # a['dur_stay'] = -0.231486 164 | # a['market'] = 0.081364 165 | # a['Spend (£m)'] = -0.319305 166 | 167 | 168 | # x = [-1.380899, -0.638146, 1.315741, -1.325480, -0.231486, 0.081364, -0.319305] 169 | 170 | 171 | 172 | _predictions = clf.predict(test_X) 173 | predictions = pd.Series(data=_predictions, index=test_X.index, name='predicted_value') 174 | return int(round(predictions * 1000)) 175 | 176 | 177 | 178 | 179 | if __name__ == "__main__": 180 | x = [-1.380899, -0.638146, 1.315741, -1.325480, -0.231486, 0.081364, -0.319305, 0.380] 181 | y = [3, 3, 2, 2016, 7, 5, 0.897155, 3.556813] 182 | print(logic_layer(y)) 183 | input() -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ttps (Tourism and Travells Prediction System) 2 | This is a machine learning based project in which a trained ML model has been integrated with Django web application. This project intented to predict tourist based on given information from user. 3 | 4 | ## Running the project 5 | 6 | - Install the requirements by: `pip install -r requirements.txt` 7 | - Run migrations : `python manage.py migrate` 8 | - Run the server: `python manage.py runserver` 9 | 10 | Visit http://localhost:8000/ for accessing the website 11 | 12 | -------------------------------------------------------------------------------- /db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/db.sqlite3 -------------------------------------------------------------------------------- /main/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/main/__init__.py -------------------------------------------------------------------------------- /main/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/main/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /main/__pycache__/admin.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/main/__pycache__/admin.cpython-37.pyc -------------------------------------------------------------------------------- /main/__pycache__/apps.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/main/__pycache__/apps.cpython-37.pyc -------------------------------------------------------------------------------- /main/__pycache__/forms.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/main/__pycache__/forms.cpython-37.pyc -------------------------------------------------------------------------------- /main/__pycache__/ml_model.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/main/__pycache__/ml_model.cpython-37.pyc -------------------------------------------------------------------------------- /main/__pycache__/ml_model2.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/main/__pycache__/ml_model2.cpython-37.pyc -------------------------------------------------------------------------------- /main/__pycache__/models.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/main/__pycache__/models.cpython-37.pyc -------------------------------------------------------------------------------- /main/__pycache__/urls.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/main/__pycache__/urls.cpython-37.pyc -------------------------------------------------------------------------------- /main/__pycache__/views.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/main/__pycache__/views.cpython-37.pyc -------------------------------------------------------------------------------- /main/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. -------------------------------------------------------------------------------- /main/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class MainConfig(AppConfig): 5 | name = 'main' 6 | -------------------------------------------------------------------------------- /main/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | from django.core.validators import MinLengthValidator, MinValueValidator, MaxValueValidator 3 | 4 | 5 | class ContactForm(forms.Form): 6 | subject = forms.CharField(max_length=100) 7 | message = forms.CharField(widget=forms.Textarea) 8 | sender = forms.EmailField() 9 | cc_myself = forms.BooleanField(required=False) 10 | 11 | COUNTRY_CHOICES=[ 12 | ('0', 'Select Country'), 13 | ('1', 'France'), 14 | ('2', 'Germany'), 15 | ('3', 'USA'), 16 | ('4', 'Netherlands'), 17 | ('5', 'Belgium'), 18 | ('6', 'Irish Republic'), 19 | ('7', 'Australia'), 20 | ('8', 'Canada'), 21 | ('9', 'Italy'), 22 | ('10', 'Spain'), 23 | ('11', 'Switzerland'), 24 | ('12', 'Norway'), 25 | ('13', 'Japan'), 26 | ('14', 'Poland'), 27 | ('15', 'South Africa'), 28 | ('16', 'Denmark'), 29 | ('17', 'Central & South America'), 30 | ('18', 'Russia'), 31 | ('19', 'New Zealand'), 32 | ('20', 'Sweden'), 33 | ('21', 'India'), 34 | ('22', 'Hong Kong'), 35 | ('23', 'Portugsl'), 36 | ('24', 'Austria'), 37 | ('25', 'Greece'), 38 | ('26', 'Israel'), 39 | ('27', 'Middle East'), 40 | ('28', 'Other Africa'), 41 | ('29', 'Other Western Europe'), 42 | ('30', 'Other Asia'), 43 | ('31', 'Brazil'), 44 | ('32', 'Eastern Europe'), 45 | ('33', 'United Arab Emirates'), 46 | ('34', 'Singapore'), 47 | ('35', 'Czech Republic'), 48 | ('36', 'Malasia'), 49 | ('37', 'Saudi Arabia'), 50 | ('38', 'Nigeria'), 51 | ('39', 'Finland'), 52 | ('40', 'South Korea'), 53 | ('41', 'Mexico'), 54 | ('42', 'China'), 55 | ('43', 'Hungary'), 56 | ('44', 'Pakistan'), 57 | ('45', 'Turkey'), 58 | ('46', 'Thailand'), 59 | ('47', 'Egypt'), 60 | ('48', 'Taiwan'), 61 | ('49', 'Kenya'), 62 | ('50', 'Kuwait'), 63 | ('51', 'Other Eastern Europe'), 64 | ('52', 'Romania')] 65 | 66 | QUARTER_CHOICES = [ 67 | ('0', 'Select Quarter'), 68 | ('1', 'January-March'), 69 | ('2', 'April-June'), 70 | ('3', 'July-September'), 71 | ('4', 'October-December'), 72 | ] 73 | 74 | PURPOSE_CHOICES = [ 75 | ('0', 'Select Purpose'), 76 | ('1', 'Holiday'), 77 | ('2', 'VFR'), 78 | ('3', 'Business'), 79 | ('4', 'Miscellaneous'), 80 | ('5', 'Study') 81 | ] 82 | 83 | MODE_CHOICES = [ 84 | ('0', 'Select Travelling Mode'), 85 | ('1', 'Air'), 86 | ('2', 'Tunnel'), 87 | ('3', 'Sea') 88 | ] 89 | 90 | class TourismForm(forms.Form): 91 | year = forms.IntegerField(label="Year(eg.2020)", 92 | validators=[MinValueValidator(2000, message="Year is invalid!"), 93 | MaxValueValidator(9999, message="Please provide 4 digit year!")],) 94 | duration = forms.IntegerField(label="Duration(days)", validators=[MinValueValidator(1, message="Duration: Minimum 1 day required!")]) 95 | spends = forms.FloatField(label="Spends in $", validators=[MinValueValidator(0.1, message="Spends: Free m Nahi Milega!"), MaxValueValidator(150000, message="Spends shouldn't be exceed 150K $")],) 96 | mode = forms.CharField(label="Mode", widget=forms.Select(choices=MODE_CHOICES)) 97 | purpose = forms.CharField(label="Purpose", widget=forms.Select(choices=PURPOSE_CHOICES)) 98 | quarter = forms.CharField(label="Quarter", widget=forms.Select(choices=QUARTER_CHOICES), ) 99 | country = forms.CharField(label="Country", widget=forms.Select(choices=COUNTRY_CHOICES)) 100 | -------------------------------------------------------------------------------- /main/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/main/migrations/__init__.py -------------------------------------------------------------------------------- /main/migrations/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/main/migrations/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /main/ml_model.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import os 3 | import numpy as np 4 | import pandas as pd 5 | import sklearn as sk 6 | from sklearn.model_selection import train_test_split 7 | import xgboost as xgb 8 | import pickle 9 | 10 | 11 | # The first step is to get our machine learning dataset: 12 | # 13 | 14 | 15 | def logic_layer(x): 16 | workpath = os.path.dirname(os.path.abspath(__file__)) #Returns the Path your .py file is in 17 | 18 | 19 | # it loads the trained model into environment which is saved in same directory named as "xgboost_model.pkl" 20 | with open(os.path.join(workpath, 'xgboost_model.pkl'), 'rb') as f: 21 | clf = pickle.load(f) 22 | f.close() 23 | 24 | # Here we prepare our data in form of dataframe, same as in trained model 25 | a = pd.DataFrame(columns = ['quarter', 'mode','purpose','year','dur_stay','market', 'Spend (£m)', '__target__']) 26 | a.loc[0]= x 27 | test = a 28 | 29 | 30 | # Here rescaling is done and scale_list, shift_list taken from the trained model dataset 31 | 32 | # {'dur_stay': 'AVGSTD', 'mode': 'AVGSTD', 'Spend (£m)': 'AVGSTD', 'year': 'AVGSTD', 'quarter': 'AVGSTD', 'market': 'AVGSTD', 'purpose': 'AVGSTD'} 33 | scale_list = [5.379134276573772, 0.7736738167983019, 11.59681989634353, 1.1145033162651958, 1.0864534579734633, 15.398829026436987, 1.2086502909550274] 34 | shift_list = [8.212411193272438, 1.494562853414528, 5.049435762574525, 2015.4791938523997, 2.5104393214441063, 20.881542699724516, 2.411845730027548] 35 | # both list taken from the training dataset's rescaling factor 36 | rescale_features = {u'dur_stay': u'AVGSTD', u'mode': u'AVGSTD', u'Spend (\xa3m)': u'AVGSTD', u'year': u'AVGSTD', u'quarter': u'AVGSTD', u'market': u'AVGSTD', u'purpose': u'AVGSTD'} 37 | for cnt, (feature_name, rescale_method) in enumerate(rescale_features.items()): 38 | test[feature_name] = (test[feature_name] - shift_list[cnt]).astype(np.float64) / scale_list[cnt] 39 | 40 | test_X = test.drop('__target__', axis=1) 41 | 42 | test_Y = np.array(test['__target__']) 43 | 44 | 45 | _predictions = clf.predict(test_X) 46 | predictions = pd.Series(data=_predictions, index=test_X.index, name='predicted_value') 47 | return int(round(predictions * 1000)) 48 | 49 | 50 | 51 | # This is used for testing purpose in local environment as x, y, z three datasets are given as example 52 | if __name__ == "__main__": 53 | x = [-1.380899, -0.638146, 1.315741, -1.325480, -0.231486, 0.081364, -0.319305, 0.380] 54 | y = [3, 3, 2, 2016, 7, 5, 0.897155, 3.556813] 55 | z = [3, 1, 1, 2016, 15, 11 ,8.235992, 6.062523] 56 | print(logic_layer(y)) 57 | input() 58 | 59 | -------------------------------------------------------------------------------- /main/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /main/static/main/assets/img/background/img-38.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/main/static/main/assets/img/background/img-38.jpg -------------------------------------------------------------------------------- /main/static/main/assets/img/background/img-55.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/main/static/main/assets/img/background/img-55.jpg -------------------------------------------------------------------------------- /main/static/main/assets/svg/icons.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Slides Framework 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /main/static/main/assets/svg/play.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /main/static/main/assets/svg/video-icon-dark.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /main/static/main/assets/svg/video-icon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /main/static/main/images/avatar_g.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/main/static/main/images/avatar_g.jpg -------------------------------------------------------------------------------- /main/static/main/images/bridge.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/main/static/main/images/bridge.jpg -------------------------------------------------------------------------------- /main/static/main/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/main/static/main/images/favicon.ico -------------------------------------------------------------------------------- /main/static/main/images/neha.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/main/static/main/images/neha.jpg -------------------------------------------------------------------------------- /main/static/main/images/priya.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/main/static/main/images/priya.jpg -------------------------------------------------------------------------------- /main/static/main/images/samridhhi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/main/static/main/images/samridhhi.jpg -------------------------------------------------------------------------------- /main/static/main/images/satish.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/main/static/main/images/satish.jpg -------------------------------------------------------------------------------- /main/static/main/images/satyendra.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/main/static/main/images/satyendra.jpg -------------------------------------------------------------------------------- /main/static/main/images/under_construction.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/main/static/main/images/under_construction.jpg -------------------------------------------------------------------------------- /main/static/main/images/woods.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/main/static/main/images/woods.jpg -------------------------------------------------------------------------------- /main/static/main/js/slides.min.js: -------------------------------------------------------------------------------- 1 | window.pluginsAttached?alert("Attention: plugins.js library is attached twice and needs to be removed. The slides.min.js already contains both of scripts."):window.pluginsAttached=1,function(a){a.extend(a,{cacheImage:function(b,c){if("object"==typeof b)return void a.each(b,function(){a.cacheImage(String(this),c)});var d=new Image;return c=c||{},a.each(["load","error","abort"],function(){var b=String(this);"function"==typeof c[b]&&a(d).bind(b,c[b]),"function"==typeof c.complete&&a(d).bind(b,c.complete)}),d.src=b,d}}),a.extend(a.fn,{cacheImage:function(b){return this.each(function(){a.cacheImage(this.src,b)})}})}(jQuery),$.fn.redraw=function(){$(this).each(function(){this.offsetHeight})},!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),$.fn.removeClassByPrefix=function(a){return this.each(function(b,c){var d=c.className.split(" ").filter(function(b){return 0!==b.lastIndexOf(a,0)});c.className=$.trim(d.join(" "))}),this},!function(a,b){var c={};c.eventName="resizeEnd",c.delay=250,c.poll=function(){var b=a(this),d=b.data(c.eventName);d.timeoutId&&window.clearTimeout(d.timeoutId),d.timeoutId=window.setTimeout(function(){b.trigger(c.eventName)},c.delay)},a.event.special[c.eventName]={setup:function(){var b=a(this);b.data(c.eventName,{}),b.on("resize",c.poll)},teardown:function(){var b=a(this),d=b.data(c.eventName);d.timeoutId&&window.clearTimeout(d.timeoutId),b.removeData(c.eventName),b.off("resize",c.poll)}},a.fn[c.eventName]=function(a,b){return arguments.length>0?this.on(c.eventName,null,a,b):this.trigger(c.eventName)}}(jQuery,this),function(a){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],a):a(jQuery)}(function(a){function b(b){return!b||void 0!==b.allowPageScroll||void 0===b.swipe&&void 0===b.swipeStatus||(b.allowPageScroll=j),void 0!==b.click&&void 0===b.tap&&(b.tap=b.click),b||(b={}),b=a.extend({},a.fn.swipe.defaults,b),this.each(function(){var d=a(this),e=d.data(B);e||(e=new c(this,b),d.data(B,e))})}function c(b,c){function C(b){if(!(ja()||a(b.target).closest(c.excludedElements,Sa).length>0)){var d,e=b.originalEvent?b.originalEvent:b,f=y?e.touches[0]:e;return Ta=u,y?Ua=e.touches.length:b.preventDefault(),Ja=0,Ka=null,Qa=null,La=0,Ma=0,Na=0,Oa=1,Pa=0,Va=oa(),Ra=ra(),ha(),!y||Ua===c.fingers||c.fingers===s||R()?(la(0,f),Wa=Aa(),2==Ua&&(la(1,e.touches[1]),Ma=Na=ua(Va[0].start,Va[1].start)),(c.swipeStatus||c.pinchStatus)&&(d=J(e,Ta))):d=!1,d===!1?(Ta=x,J(e,Ta),d):(c.hold&&(ab=setTimeout(a.proxy(function(){Sa.trigger("hold",[e.target]),c.hold&&(d=c.hold.call(Sa,e,e.target))},this),c.longTapThreshold)),ka(!0),null)}}function D(a){var b=a.originalEvent?a.originalEvent:a;if(Ta!==w&&Ta!==x&&!ia()){var d,e=y?b.touches[0]:b,f=ma(e);if(Xa=Aa(),y&&(Ua=b.touches.length),c.hold&&clearTimeout(ab),Ta=v,2==Ua&&(0==Ma?(la(1,b.touches[1]),Ma=Na=ua(Va[0].start,Va[1].start)):(ma(b.touches[1]),Na=ua(Va[0].end,Va[1].end),Qa=wa(Va[0].end,Va[1].end)),Oa=va(Ma,Na),Pa=Math.abs(Ma-Na)),Ua===c.fingers||c.fingers===s||!y||R()){if(Ka=za(f.start,f.end),P(a,Ka),Ja=xa(f.start,f.end),La=ta(),pa(Ka,Ja),(c.swipeStatus||c.pinchStatus)&&(d=J(b,Ta)),!c.triggerOnTouchEnd||c.triggerOnTouchLeave){var g=!0;if(c.triggerOnTouchLeave){var h=Ba(this);g=Ca(f.end,h)}!c.triggerOnTouchEnd&&g?Ta=I(v):c.triggerOnTouchLeave&&!g&&(Ta=I(w)),Ta!=x&&Ta!=w||J(b,Ta)}}else Ta=x,J(b,Ta);d===!1&&(Ta=x,J(b,Ta))}}function E(a){var b=a.originalEvent;return y&&b.touches.length>0?(ga(),!0):(ia()&&(Ua=Za),Xa=Aa(),La=ta(),M()||!L()?(Ta=x,J(b,Ta)):c.triggerOnTouchEnd||0==c.triggerOnTouchEnd&&Ta===v?(a.preventDefault(),Ta=w,J(b,Ta)):!c.triggerOnTouchEnd&&Y()?(Ta=w,K(b,Ta,n)):Ta===v&&(Ta=x,J(b,Ta)),ka(!1),null)}function F(){Ua=0,Xa=0,Wa=0,Ma=0,Na=0,Oa=1,ha(),ka(!1)}function G(a){var b=a.originalEvent;c.triggerOnTouchLeave&&(Ta=I(w),J(b,Ta))}function H(){Sa.unbind(Ea,C),Sa.unbind(Ia,F),Sa.unbind(Fa,D),Sa.unbind(Ga,E),Ha&&Sa.unbind(Ha,G),ka(!1)}function I(a){var b=a,d=O(),e=L(),f=M();return!d||f?b=x:!e||a!=v||c.triggerOnTouchEnd&&!c.triggerOnTouchLeave?!e&&a==w&&c.triggerOnTouchLeave&&(b=x):b=w,b}function J(a,b){var c=void 0;return V()||U()?c=K(a,b,l):(S()||R())&&c!==!1&&(c=K(a,b,m)),ea()&&c!==!1?c=K(a,b,o):fa()&&c!==!1?c=K(a,b,p):da()&&c!==!1&&(c=K(a,b,n)),b===x&&F(a),b===w&&(y?0==a.touches.length&&F(a):F(a)),c}function K(b,j,k){var q=void 0;if(k==l){if(Sa.trigger("swipeStatus",[j,Ka||null,Ja||0,La||0,Ua,Va]),c.swipeStatus&&(q=c.swipeStatus.call(Sa,b,j,Ka||null,Ja||0,La||0,Ua,Va),q===!1))return!1;if(j==w&&T()){if(Sa.trigger("swipe",[Ka,Ja,La,Ua,Va]),c.swipe&&(q=c.swipe.call(Sa,b,Ka,Ja,La,Ua,Va),q===!1))return!1;switch(Ka){case d:Sa.trigger("swipeLeft",[Ka,Ja,La,Ua,Va]),c.swipeLeft&&(q=c.swipeLeft.call(Sa,b,Ka,Ja,La,Ua,Va));break;case e:Sa.trigger("swipeRight",[Ka,Ja,La,Ua,Va]),c.swipeRight&&(q=c.swipeRight.call(Sa,b,Ka,Ja,La,Ua,Va));break;case f:Sa.trigger("swipeUp",[Ka,Ja,La,Ua,Va]),c.swipeUp&&(q=c.swipeUp.call(Sa,b,Ka,Ja,La,Ua,Va));break;case g:Sa.trigger("swipeDown",[Ka,Ja,La,Ua,Va]),c.swipeDown&&(q=c.swipeDown.call(Sa,b,Ka,Ja,La,Ua,Va))}}}if(k==m){if(Sa.trigger("pinchStatus",[j,Qa||null,Pa||0,La||0,Ua,Oa,Va]),c.pinchStatus&&(q=c.pinchStatus.call(Sa,b,j,Qa||null,Pa||0,La||0,Ua,Oa,Va),q===!1))return!1;if(j==w&&Q())switch(Qa){case h:Sa.trigger("pinchIn",[Qa||null,Pa||0,La||0,Ua,Oa,Va]),c.pinchIn&&(q=c.pinchIn.call(Sa,b,Qa||null,Pa||0,La||0,Ua,Oa,Va));break;case i:Sa.trigger("pinchOut",[Qa||null,Pa||0,La||0,Ua,Oa,Va]),c.pinchOut&&(q=c.pinchOut.call(Sa,b,Qa||null,Pa||0,La||0,Ua,Oa,Va))}}return k==n?j!==x&&j!==w||(clearTimeout(_a),clearTimeout(ab),Z()&&!aa()?($a=Aa(),_a=setTimeout(a.proxy(function(){$a=null,Sa.trigger("tap",[b.target]),c.tap&&(q=c.tap.call(Sa,b,b.target))},this),c.doubleTapThreshold)):($a=null,Sa.trigger("tap",[b.target]),c.tap&&(q=c.tap.call(Sa,b,b.target)))):k==o?j!==x&&j!==w||(clearTimeout(_a),$a=null,Sa.trigger("doubletap",[b.target]),c.doubleTap&&(q=c.doubleTap.call(Sa,b,b.target))):k==p&&(j!==x&&j!==w||(clearTimeout(_a),$a=null,Sa.trigger("longtap",[b.target]),c.longTap&&(q=c.longTap.call(Sa,b,b.target)))),q}function L(){var a=!0;return null!==c.threshold&&(a=Ja>=c.threshold),a}function M(){var a=!1;return null!==c.cancelThreshold&&null!==Ka&&(a=qa(Ka)-Ja>=c.cancelThreshold),a}function N(){return null===c.pinchThreshold||Pa>=c.pinchThreshold}function O(){var a;return a=!c.maxTimeThreshold||!(La>=c.maxTimeThreshold)}function P(a,b){if(c.allowPageScroll===j||R())a.preventDefault();else{var h=c.allowPageScroll===k;switch(b){case d:(c.swipeLeft&&h||!h&&c.allowPageScroll!=q)&&a.preventDefault();break;case e:(c.swipeRight&&h||!h&&c.allowPageScroll!=q)&&a.preventDefault();break;case f:(c.swipeUp&&h||!h&&c.allowPageScroll!=r)&&a.preventDefault();break;case g:(c.swipeDown&&h||!h&&c.allowPageScroll!=r)&&a.preventDefault()}}}function Q(){var a=W(),b=X(),c=N();return a&&b&&c}function R(){return!!(c.pinchStatus||c.pinchIn||c.pinchOut)}function S(){return!(!Q()||!R())}function T(){var a=O(),b=L(),c=W(),d=X(),e=M(),f=!e&&d&&c&&b&&a;return f}function U(){return!!(c.swipe||c.swipeStatus||c.swipeLeft||c.swipeRight||c.swipeUp||c.swipeDown)}function V(){return!(!T()||!U())}function W(){return Ua===c.fingers||c.fingers===s||!y}function X(){return 0!==Va[0].end.x}function Y(){return!!c.tap}function Z(){return!!c.doubleTap}function $(){return!!c.longTap}function _(){if(null==$a)return!1;var a=Aa();return Z()&&a-$a<=c.doubleTapThreshold}function aa(){return _()}function ba(){return(1===Ua||!y)&&(isNaN(Ja)||Jac.longTapThreshold&&Ja=0?d:c<=360&&c>=315?d:c>=135&&c<=225?e:c>45&&c<135?g:f}function Aa(){var a=new Date;return a.getTime()}function Ba(b){b=a(b);var c=b.offset(),d={left:c.left,right:c.left+b.outerWidth(),top:c.top,bottom:c.top+b.outerHeight()};return d}function Ca(a,b){return a.x>b.left&&a.xb.top&&a.y
'),b.___gcfg={lang:d.options.buttons.googlePlus.lang};var f=0;"undefined"==typeof gapi&&0==f?(f=1,function(){var a=c.createElement("script");a.type="text/javascript",a.async=!0,a.src="//apis.google.com/js/plusone.js";var b=c.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b)}()):gapi.plusone.go()},facebook:function(b){var d=b.options.buttons.facebook;a(b.element).find(".buttons").append('');var e=0;"undefined"==typeof FB&&0==e?(e=1,function(a,b,c){var e,f=a.getElementsByTagName(b)[0];a.getElementById(c)||(e=a.createElement(b),e.id=c,e.src="//connect.facebook.net/"+d.lang+"/all.js#xfbml=1",f.parentNode.insertBefore(e,f))}(c,"script","facebook-jssdk")):FB.XFBML.parse()},twitter:function(b){var d=b.options.buttons.twitter;a(b.element).find(".buttons").append('');var e=0;"undefined"==typeof twttr&&0==e?(e=1,function(){var a=c.createElement("script");a.type="text/javascript",a.async=!0,a.src="//platform.twitter.com/widgets.js";var b=c.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b)}()):a.ajax({url:"//platform.twitter.com/widgets.js",dataType:"script",cache:!0})},digg:function(b){var d=b.options.buttons.digg;a(b.element).find(".buttons").append('
');var e=0;"undefined"==typeof __DBW&&0==e&&(e=1,function(){var a=c.createElement("SCRIPT"),b=c.getElementsByTagName("SCRIPT")[0];a.type="text/javascript",a.async=!0,a.src="//widgets.digg.com/buttons.js",b.parentNode.insertBefore(a,b)}())},delicious:function(b){if("tall"==b.options.buttons.delicious.size)var c="width:50px;",d="height:35px;width:50px;font-size:15px;line-height:35px;",e="height:18px;line-height:18px;margin-top:3px;";else var c="width:93px;",d="float:right;padding:0 3px;height:20px;width:26px;line-height:20px;",e="float:left;height:20px;line-height:20px;";var f=b.shorterTotal(b.options.count.delicious);"undefined"==typeof f&&(f=0),a(b.element).find(".buttons").append('
'+f+'
Delicious Add
'),a(b.element).find(".delicious").on("click",function(){b.openPopup("delicious")})},stumbleupon:function(d){var e=d.options.buttons.stumbleupon;a(d.element).find(".buttons").append('
');var f=0;"undefined"==typeof STMBLPN&&0==f?(f=1,function(){var a=c.createElement("script");a.type="text/javascript",a.async=!0,a.src="//platform.stumbleupon.com/1/widgets.js";var b=c.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b)}(),s=b.setTimeout(function(){"undefined"!=typeof STMBLPN&&(STMBLPN.processWidgets(),clearInterval(s))},500)):STMBLPN.processWidgets()},linkedin:function(d){var e=d.options.buttons.linkedin;a(d.element).find(".buttons").append('
');var f=0;"undefined"==typeof b.IN&&0==f?(f=1,function(){var a=c.createElement("script");a.type="text/javascript",a.async=!0,a.src="//platform.linkedin.com/in.js";var b=c.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b)}()):b.IN.init()},pinterest:function(b){var d=b.options.buttons.pinterest;a(b.element).find(".buttons").append(''),function(){var a=c.createElement("script");a.type="text/javascript",a.async=!0,a.src="//assets.pinterest.com/js/pinit.js";var b=c.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b)}()}},k={googlePlus:function(){},facebook:function(){fb=b.setInterval(function(){"undefined"!=typeof FB&&(FB.Event.subscribe("edge.create",function(a){_gaq.push(["_trackSocial","facebook","like",a])}),FB.Event.subscribe("edge.remove",function(a){_gaq.push(["_trackSocial","facebook","unlike",a])}),FB.Event.subscribe("message.send",function(a){_gaq.push(["_trackSocial","facebook","send",a])}),clearInterval(fb))},1e3)},twitter:function(){tw=b.setInterval(function(){"undefined"!=typeof twttr&&(twttr.events.bind("tweet",function(a){a&&_gaq.push(["_trackSocial","twitter","tweet"])}),clearInterval(tw))},1e3)},digg:function(){},delicious:function(){},stumbleupon:function(){},linkedin:function(){},pinterest:function(){}},l={googlePlus:function(a){b.open("https://plus.google.com/share?hl="+a.buttons.googlePlus.lang+"&url="+encodeURIComponent(""!==a.buttons.googlePlus.url?a.buttons.googlePlus.url:a.url),"","toolbar=0, status=0, width=900, height=500")},facebook:function(a){b.open("http://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(""!==a.buttons.facebook.url?a.buttons.facebook.url:a.url)+"&t="+a.text,"","toolbar=0, status=0, width=900, height=500")},twitter:function(a){b.open("https://twitter.com/intent/tweet?text="+encodeURIComponent(a.text)+"&url="+encodeURIComponent(""!==a.buttons.twitter.url?a.buttons.twitter.url:a.url)+(""!==a.buttons.twitter.via?"&via="+a.buttons.twitter.via:""),"","toolbar=0, status=0, width=650, height=360")},digg:function(a){b.open("http://digg.com/tools/diggthis/submit?url="+encodeURIComponent(""!==a.buttons.digg.url?a.buttons.digg.url:a.url)+"&title="+a.text+"&related=true&style=true","","toolbar=0, status=0, width=650, height=360")},delicious:function(a){b.open("http://www.delicious.com/save?v=5&noui&jump=close&url="+encodeURIComponent(""!==a.buttons.delicious.url?a.buttons.delicious.url:a.url)+"&title="+a.text,"delicious","toolbar=no,width=550,height=550")},stumbleupon:function(a){b.open("http://www.stumbleupon.com/badge/?url="+encodeURIComponent(""!==a.buttons.delicious.url?a.buttons.delicious.url:a.url),"stumbleupon","toolbar=no,width=550,height=550")},linkedin:function(a){b.open("https://www.linkedin.com/cws/share?url="+encodeURIComponent(""!==a.buttons.delicious.url?a.buttons.delicious.url:a.url)+"&token=&isFramed=true","linkedin","toolbar=no,width=550,height=550")},pinterest:function(a){b.open("http://pinterest.com/pin/create/button/?url="+encodeURIComponent(""!==a.buttons.pinterest.url?a.buttons.pinterest.url:a.url)+"&media="+encodeURIComponent(a.buttons.pinterest.media)+"&description="+a.buttons.pinterest.description,"pinterest","toolbar=no,width=700,height=300")}};f.prototype.init=function(){var b=this;""!==this.options.urlCurl&&(i.googlePlus=this.options.urlCurl+"?url={url}&type=googlePlus",i.stumbleupon=this.options.urlCurl+"?url={url}&type=stumbleupon"),a(this.element).addClass(this.options.className),"undefined"!=typeof a(this.element).data("title")&&(this.options.title=a(this.element).attr("data-title")),"undefined"!=typeof a(this.element).data("url")&&(this.options.url=a(this.element).data("url")),"undefined"!=typeof a(this.element).data("text")&&(this.options.text=a(this.element).data("text")),a.each(this.options.share,function(a,c){c===!0&&b.options.shareTotal++}),b.options.enableCounter===!0?a.each(this.options.share,function(a,c){if(c===!0)try{b.getSocialJson(a)}catch(a){}}):""!==b.options.template?this.options.render(this,this.options):this.loadButtons(),a(this.element).hover(function(){0===a(this).find(".buttons").length&&b.options.enableHover===!0&&b.loadButtons(),b.options.hover(b,b.options)},function(){b.options.hide(b,b.options)}),a(this.element).click(function(){return b.options.click(b,b.options),!1})},f.prototype.loadButtons=function(){var b=this;a(this.element).append('
'),a.each(b.options.share,function(a,c){1==c&&(j[a](b),b.options.enableTracking===!0&&k[a]())})},f.prototype.getSocialJson=function(b){var c=this,d=0,e=i[b].replace("{url}",encodeURIComponent(this.options.url));this.options.buttons[b].urlCount===!0&&""!==this.options.buttons[b].url&&(e=i[b].replace("{url}",this.options.buttons[b].url)),""!=e&&""!==c.options.urlCurl?a.getJSON(e,function(a){if("undefined"!=typeof a.count){var e=a.count+"";e=e.replace(" ",""),d+=parseInt(e,10)}else a.data&&a.data.length>0&&"undefined"!=typeof a.data[0].total_count?d+=parseInt(a.data[0].total_count,10):"undefined"!=typeof a[0]?d+=parseInt(a[0].total_posts,10):"undefined"!=typeof a[0];c.options.count[b]=d,c.options.total+=d,c.renderer(),c.rendererPerso()}).error(function(){c.options.count[b]=0,c.rendererPerso()}):(c.renderer(),c.options.count[b]=0,c.rendererPerso())},f.prototype.rendererPerso=function(){var a=0;for(e in this.options.count)a++;a===this.options.shareTotal&&this.options.render(this,this.options)},f.prototype.renderer=function(){var b=this.options.total,c=this.options.template;this.options.shorterTotal===!0&&(b=this.shorterTotal(b)),""!==c?(c=c.replace("{total}",b),a(this.element).html(c)):a(this.element).html('
'+b+""+(""!==this.options.title?'":"")+"
")},f.prototype.shorterTotal=function(a){return a>=1e6?a=(a/1e6).toFixed(2)+"M":a>=1e3&&(a=(a/1e3).toFixed(1)+"k"),a},f.prototype.openPopup=function(a){if(l[a](this.options),this.options.enableTracking===!0){var b={googlePlus:{site:"Google",action:"+1"},facebook:{site:"facebook",action:"like"},twitter:{site:"twitter",action:"tweet"},digg:{site:"digg",action:"add"},delicious:{site:"delicious",action:"add"},stumbleupon:{site:"stumbleupon",action:"add"},linkedin:{site:"linkedin",action:"share"},pinterest:{site:"pinterest",action:"pin"}};_gaq.push(["_trackSocial",b[a].site,b[a].action])}},f.prototype.simulateClick=function(){var b=a(this.element).html();a(this.element).html(b.replace(this.options.total,this.options.total+1))},f.prototype.update=function(a,b){""!==a&&(this.options.url=a),""!==b&&(this.options.text=b)},a.fn[g]=function(b){var c=arguments;return b===d||"object"==typeof b?this.each(function(){a.data(this,"plugin_"+g)||a.data(this,"plugin_"+g,new f(this,b))}):"string"==typeof b&&"_"!==b[0]&&"init"!==b?this.each(function(){var d=a.data(this,"plugin_"+g);d instanceof f&&"function"==typeof d[b]&&d[b].apply(d,Array.prototype.slice.call(c,1))}):void 0}}(jQuery,window,document),$.fn.nextOrFirst=function(a){var b=this.next(a);return b.length?b:this.prevAll(a).last()},$.fn.prevOrLast=function(a){var b=this.prev(a);return b.length?b:this.nextAll(a).last()},function(a,b,c){function d(a){return a=a||location.href,"#"+a.replace(/^[^#]*#?(.*)$/,"$1")}var e,f="hashchange",g=document,h=a.event.special,i=g.documentMode,j="on"+f in b&&(i===c||i>7);a.fn[f]=function(a){return a?this.bind(f,a):this.trigger(f)},a.fn[f].delay=50,h[f]=a.extend(h[f],{setup:function(){return!j&&void a(e.start)},teardown:function(){return!j&&void a(e.stop)}}),e=function(){function e(){var c=d(),h=l(i);c!==i?(k(i=c,h),a(b).trigger(f)):h!==i&&(location.href=location.href.replace(/#.*/,"")+h),g=setTimeout(e,a.fn[f].delay)}var g,h={},i=d(),j=function(a){return a},k=j,l=j;return h.start=function(){g||e()},h.stop=function(){g&&clearTimeout(g),g=c},h}()}(jQuery,this),+function(){"use strict";function a(a){var b={top:0,left:0};if(!a.offsetParent)return b;do b.left+=a.offsetLeft,b.top+=a.offsetTop;while(a=a.offsetParent);return b}function b(){this._activeZoom=this._initialScrollPosition=this._initialTouchPosition=this._touchMoveListener=null,this._document=document,this._window=window,this._body=document.body}function c(a){this._fullHeight=this._fullWidth=this._overlay=this._targetImageWrap=null,this._targetImage=a,this._body=document.body}var d,e,f,g,h,i;b.prototype.listen=function(){document.body.addEventListener("click",function(a){"zoom"===a.target.getAttribute("data-action")&&this._zoom(a)}.bind(this))},b.prototype._zoom=function(a){var b=a.target;if(b&&"IMG"==b.tagName&&!this._body.classList.contains("zoom-overlay-open")){if(a.metaKey||a.ctrlKey)return window.open(a.target.getAttribute("data-original")||a.target.currentSrc||a.target.src,"_blank");this._activeZoomClose(!0),this._activeZoom=new c(b),this._activeZoom.zoomImage(),d=this._scrollHandler.bind(this),e=this._clickHandler.bind(this),f=this._keyHandler.bind(this),g=this._touchStart.bind(this),this._window.addEventListener("scroll",d),this._document.addEventListener("click",e),this._document.addEventListener("keyup",f),this._document.addEventListener("touchstart",g),a.stopPropagation()}},b.prototype._activeZoomClose=function(a){this._activeZoom&&(a?this._activeZoom.dispose():this._activeZoom.close(),this._window.removeEventListener("scroll",d),this._document.removeEventListener("click",e),this._document.removeEventListener("keyup",f),this._document.removeEventListener("touchstart",g),this._activeZoom=null)},b.prototype._scrollHandler=function(a){null===this._initialScrollPosition&&(this._initialScrollPosition=window.scrollY);var b=this._initialScrollPosition-window.scrollY;Math.abs(b)>=40&&this._activeZoomClose()},b.prototype._keyHandler=function(a){27==a.keyCode&&this._activeZoomClose()},b.prototype._clickHandler=function(a){a.stopPropagation(),a.preventDefault(),this._activeZoomClose()},b.prototype._touchStart=function(a){this._initialTouchPosition=a.touches[0].pageY,h=this._touchMove.bind(this),a.target.addEventListener("touchmove",h)},b.prototype._touchMove=function(a){Math.abs(a.touches[0].pageY-this._initialTouchPosition)>10&&(this._activeZoomClose(),a.target.removeEventListener("touchmove",h))},c.OFFSET=80,c._MAX_WIDTH=2560,c._MAX_HEIGHT=4096,c.prototype.zoomImage=function(){var a=document.createElement("img");a.onload=function(){this._fullHeight=Number(a.height),this._fullWidth=Number(a.width),this._zoomOriginal()}.bind(this),a.src=this._targetImage.currentSrc||this._targetImage.src},c.prototype._zoomOriginal=function(){this._targetImageWrap=document.createElement("div"),this._targetImageWrap.className="zoom-img-wrap",this._targetImageWrap.style.position="absolute",this._targetImageWrap.style.top=a(this._targetImage).top+"px",this._targetImageWrap.style.left=a(this._targetImage).left+"px",this._targetImageClone=this._targetImage.cloneNode(),this._targetImageClone.style.visibility="hidden",this._targetImage.style.width=this._targetImage.offsetWidth+"px",this._targetImage.parentNode.replaceChild(this._targetImageClone,this._targetImage),document.body.appendChild(this._targetImageWrap),this._targetImageWrap.appendChild(this._targetImage), 2 | this._targetImage.classList.add("zoom-img"),this._targetImage.setAttribute("data-action","zoom-out"),this._overlay=document.createElement("div"),this._overlay.className="zoom-overlay",document.body.appendChild(this._overlay),this._calculateZoom(),this._triggerAnimation()},c.prototype._calculateZoom=function(){this._targetImage.offsetWidth;var a=this._fullWidth,b=this._fullHeight,d=(window.scrollY,a/this._targetImage.width),e=window.innerHeight-c.OFFSET,f=window.innerWidth-c.OFFSET,g=a/b,h=f/e;a7||-7>g)&&c(this._target,"x")>d&&(this.skipX=!0),!this.skipY&&(f>7||-7>f)&&c(this._target,"y")>e&&(this.skipY=!0),this.skipX&&this.skipY&&(this._tween.kill(),this.vars.onAutoKill&&this.vars.onAutoKill.apply(this.vars.onAutoKillScope||this._tween,this.vars.onAutoKillParams||[]))),this._wdw?b.scrollTo(this.skipX?d:this.x,this.skipY?e:this.y):(this.skipY||(this._target.scrollTop=this.y),this.skipX||(this._target.scrollLeft=this.x)),this.xPrev=this.x,this.yPrev=this.y}}),e=d.prototype;d.max=c,e.getX=function(){return this._wdw?null!=b.pageXOffset?b.pageXOffset:null!=a.scrollLeft?a.scrollLeft:document.body.scrollLeft:this._target.scrollLeft},e.getY=function(){return this._wdw?null!=b.pageYOffset?b.pageYOffset:null!=a.scrollTop?a.scrollTop:document.body.scrollTop:this._target.scrollTop},e._kill=function(a){return a.scrollTo_x&&(this.skipX=!0),a.scrollTo_y&&(this.skipY=!0),this._super._kill.call(this,a)}}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a,b){"use strict";var c=a.GreenSockGlobals=a.GreenSockGlobals||a;if(!c.TweenLite){var d,e,f,g,h,i=function(a){var b,d=a.split("."),e=c;for(b=0;d.length>b;b++)e[d[b]]=e=e[d[b]]||{};return e},j=i("com.greensock"),k=1e-10,l=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},m=function(){},n=function(){var a=Object.prototype.toString,b=a.call([]);return function(c){return null!=c&&(c instanceof Array||"object"==typeof c&&!!c.push&&a.call(c)===b)}}(),o={},p=function(d,e,f,g){this.sc=o[d]?o[d].sc:[],o[d]=this,this.gsClass=null,this.func=f;var h=[];this.check=function(j){for(var k,l,m,n,q=e.length,r=q;--q>-1;)(k=o[e[q]]||new p(e[q],[])).gsClass?(h[q]=k.gsClass,r--):j&&k.sc.push(this);if(0===r&&f)for(l=("com.greensock."+d).split("."),m=l.pop(),n=i(l.join("."))[m]=this.gsClass=f.apply(f,h),g&&(c[m]=n,"function"==typeof define&&define.amd?define((a.GreenSockAMDPath?a.GreenSockAMDPath+"/":"")+d.split(".").pop(),[],function(){return n}):d===b&&"undefined"!=typeof module&&module.exports&&(module.exports=n)),q=0;this.sc.length>q;q++)this.sc[q].check()},this.check(!0)},q=a._gsDefine=function(a,b,c,d){return new p(a,b,c,d)},r=j._class=function(a,b,c){return b=b||function(){},q(a,[],function(){return b},c),b};q.globals=c;var s=[0,0,1,1],t=[],u=r("easing.Ease",function(a,b,c,d){this._func=a,this._type=c||0,this._power=d||0,this._params=b?s.concat(b):s},!0),v=u.map={},w=u.register=function(a,b,c,d){for(var e,f,g,h,i=b.split(","),k=i.length,l=(c||"easeIn,easeOut,easeInOut").split(",");--k>-1;)for(f=i[k],e=d?r("easing."+f,null,!0):j.easing[f]||{},g=l.length;--g>-1;)h=l[g],v[f+"."+h]=v[h+f]=e[h]=a.getRatio?a:a[h]||new a};for(f=u.prototype,f._calcEnd=!1,f.getRatio=function(a){if(this._func)return this._params[0]=a,this._func.apply(null,this._params);var b=this._type,c=this._power,d=1===b?1-a:2===b?a:.5>a?2*a:2*(1-a);return 1===c?d*=d:2===c?d*=d*d:3===c?d*=d*d*d:4===c&&(d*=d*d*d*d),1===b?1-d:2===b?d:.5>a?d/2:1-d/2},d=["Linear","Quad","Cubic","Quart","Quint,Strong"],e=d.length;--e>-1;)f=d[e]+",Power"+e,w(new u(null,null,1,e),f,"easeOut",!0),w(new u(null,null,2,e),f,"easeIn"+(0===e?",easeNone":"")),w(new u(null,null,3,e),f,"easeInOut");v.linear=j.easing.Linear.easeIn,v.swing=j.easing.Quad.easeInOut;var x=r("events.EventDispatcher",function(a){this._listeners={},this._eventTarget=a||this});f=x.prototype,f.addEventListener=function(a,b,c,d,e){e=e||0;var f,i,j=this._listeners[a],k=0;for(null==j&&(this._listeners[a]=j=[]),i=j.length;--i>-1;)f=j[i],f.c===b&&f.s===c?j.splice(i,1):0===k&&e>f.pr&&(k=i+1);j.splice(k,0,{c:b,s:c,up:d,pr:e}),this!==g||h||g.wake()},f.removeEventListener=function(a,b){var c,d=this._listeners[a];if(d)for(c=d.length;--c>-1;)if(d[c].c===b)return void d.splice(c,1)},f.dispatchEvent=function(a){var b,c,d,e=this._listeners[a];if(e)for(b=e.length,c=this._eventTarget;--b>-1;)d=e[b],d&&(d.up?d.c.call(d.s||c,{type:a,target:c}):d.c.call(d.s||c))};var y=a.requestAnimationFrame,z=a.cancelAnimationFrame,A=Date.now||function(){return(new Date).getTime()},B=A();for(d=["ms","moz","webkit","o"],e=d.length;--e>-1&&!y;)y=a[d[e]+"RequestAnimationFrame"],z=a[d[e]+"CancelAnimationFrame"]||a[d[e]+"CancelRequestAnimationFrame"];r("Ticker",function(a,b){var c,d,e,f,i,j=this,l=A(),n=b!==!1&&y,o=500,p=33,q="tick",r=function(a){var b,g,h=A()-B;h>o&&(l+=h-p),B+=h,j.time=(B-l)/1e3,b=j.time-i,(!c||b>0||a===!0)&&(j.frame++,i+=b+(b>=f?.004:f-b),g=!0),a!==!0&&(e=d(r)),g&&j.dispatchEvent(q)};x.call(j),j.time=j.frame=0,j.tick=function(){r(!0)},j.lagSmoothing=function(a,b){o=a||1/k,p=Math.min(b,o,0)},j.sleep=function(){null!=e&&(n&&z?z(e):clearTimeout(e),d=m,e=null,j===g&&(h=!1))},j.wake=function(){null!==e?j.sleep():j.frame>10&&(B=A()-o+5),d=0===c?m:n&&y?y:function(a){return setTimeout(a,0|1e3*(i-j.time)+1)},j===g&&(h=!0),r(2)},j.fps=function(a){return arguments.length?(c=a,f=1/(c||60),i=this.time+f,void j.wake()):c},j.useRAF=function(a){return arguments.length?(j.sleep(),n=a,void j.fps(c)):n},j.fps(a),setTimeout(function(){n&&5>j.frame&&j.useRAF(!1)},1500)}),f=j.Ticker.prototype=new j.events.EventDispatcher,f.constructor=j.Ticker;var C=r("core.Animation",function(a,b){if(this.vars=b=b||{},this._duration=this._totalDuration=a||0,this._delay=Number(b.delay)||0,this._timeScale=1,this._active=b.immediateRender===!0,this.data=b.data,this._reversed=b.reversed===!0,R){h||g.wake();var c=this.vars.useFrames?Q:R;c.add(this,c._time),this.vars.paused&&this.paused(!0)}});g=C.ticker=new j.Ticker,f=C.prototype,f._dirty=f._gc=f._initted=f._paused=!1,f._totalTime=f._time=0,f._rawPrevTime=-1,f._next=f._last=f._onUpdate=f._timeline=f.timeline=null,f._paused=!1;var D=function(){h&&A()-B>2e3&&g.wake(),setTimeout(D,2e3)};D(),f.play=function(a,b){return null!=a&&this.seek(a,b),this.reversed(!1).paused(!1)},f.pause=function(a,b){return null!=a&&this.seek(a,b),this.paused(!0)},f.resume=function(a,b){return null!=a&&this.seek(a,b),this.paused(!1)},f.seek=function(a,b){return this.totalTime(Number(a),b!==!1)},f.restart=function(a,b){return this.reversed(!1).paused(!1).totalTime(a?-this._delay:0,b!==!1,!0)},f.reverse=function(a,b){return null!=a&&this.seek(a||this.totalDuration(),b),this.reversed(!0).paused(!1)},f.render=function(){},f.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this},f.isActive=function(){var a,b=this._timeline,c=this._startTime;return!b||!this._gc&&!this._paused&&b.isActive()&&(a=b.rawTime())>=c&&c+this.totalDuration()/this._timeScale>a},f._enabled=function(a,b){return h||g.wake(),this._gc=!a,this._active=this.isActive(),b!==!0&&(a&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!a&&this.timeline&&this._timeline._remove(this,!0)),!1},f._kill=function(){return this._enabled(!1,!1)},f.kill=function(a,b){return this._kill(a,b),this},f._uncache=function(a){for(var b=a?this:this.timeline;b;)b._dirty=!0,b=b.timeline;return this},f._swapSelfInParams=function(a){for(var b=a.length,c=a.concat();--b>-1;)"{self}"===a[b]&&(c[b]=this);return c},f._callback=function(a){var b=this.vars;b[a].apply(b[a+"Scope"]||b.callbackScope||this,b[a+"Params"]||t)},f.eventCallback=function(a,b,c,d){if("on"===(a||"").substr(0,2)){var e=this.vars;if(1===arguments.length)return e[a];null==b?delete e[a]:(e[a]=b,e[a+"Params"]=n(c)&&-1!==c.join("").indexOf("{self}")?this._swapSelfInParams(c):c,e[a+"Scope"]=d),"onUpdate"===a&&(this._onUpdate=b)}return this},f.delay=function(a){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+a-this._delay),this._delay=a,this):this._delay},f.duration=function(a){return arguments.length?(this._duration=this._totalDuration=a,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._timethis._duration?this._duration:a,b)):this._time},f.totalTime=function(a,b,c){if(h||g.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>a&&!c&&(a+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var d=this._totalDuration,e=this._timeline;if(a>d&&!c&&(a=d),this._startTime=(this._paused?this._pauseTime:e._time)-(this._reversed?d-a:a)/this._timeScale,e._dirty||this._uncache(!1),e._timeline)for(;e._timeline;)e._timeline._time!==(e._startTime+e._totalTime)/e._timeScale&&e.totalTime(e._totalTime,!0),e=e._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==a||0===this._duration)&&(this.render(a,b,!1),I.length&&T())}return this},f.progress=f.totalProgress=function(a,b){return arguments.length?this.totalTime(this.duration()*a,b):this._time/this.duration()},f.startTime=function(a){return arguments.length?(a!==this._startTime&&(this._startTime=a,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,a-this._delay)),this):this._startTime},f.endTime=function(a){return this._startTime+(0!=a?this.totalDuration():this.duration())/this._timeScale},f.timeScale=function(a){if(!arguments.length)return this._timeScale;if(a=a||k,this._timeline&&this._timeline.smoothChildTiming){var b=this._pauseTime,c=b||0===b?b:this._timeline.totalTime();this._startTime=c-(c-this._startTime)*this._timeScale/a}return this._timeScale=a,this._uncache(!1)},f.reversed=function(a){return arguments.length?(a!=this._reversed&&(this._reversed=a,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},f.paused=function(a){if(!arguments.length)return this._paused;var b,c,d=this._timeline;return a!=this._paused&&d&&(h||a||g.wake(),b=d.rawTime(),c=b-this._pauseTime,!a&&d.smoothChildTiming&&(this._startTime+=c,this._uncache(!1)),this._pauseTime=a?b:null,this._paused=a,this._active=this.isActive(),!a&&0!==c&&this._initted&&this.duration()&&this.render(d.smoothChildTiming?this._totalTime:(b-this._startTime)/this._timeScale,!0,!0)),this._gc&&!a&&this._enabled(!0,!1),this};var E=r("core.SimpleTimeline",function(a){C.call(this,0,a),this.autoRemoveChildren=this.smoothChildTiming=!0});f=E.prototype=new C,f.constructor=E,f.kill()._gc=!1,f._first=f._last=f._recent=null,f._sortChildren=!1,f.add=f.insert=function(a,b){var c,d;if(a._startTime=Number(b||0)+a._delay,a._paused&&this!==a._timeline&&(a._pauseTime=a._startTime+(this.rawTime()-a._startTime)/a._timeScale),a.timeline&&a.timeline._remove(a,!0),a.timeline=a._timeline=this,a._gc&&a._enabled(!0,!0),c=this._last,this._sortChildren)for(d=a._startTime;c&&c._startTime>d;)c=c._prev;return c?(a._next=c._next,c._next=a):(a._next=this._first,this._first=a),a._next?a._next._prev=a:this._last=a,a._prev=c,this._recent=a,this._timeline&&this._uncache(!0),this},f._remove=function(a,b){return a.timeline===this&&(b||a._enabled(!1,!0),a._prev?a._prev._next=a._next:this._first===a&&(this._first=a._next),a._next?a._next._prev=a._prev:this._last===a&&(this._last=a._prev),a._next=a._prev=a.timeline=null,a===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},f.render=function(a,b,c){var d,e=this._first;for(this._totalTime=this._time=this._rawPrevTime=a;e;)d=e._next,(e._active||a>=e._startTime&&!e._paused)&&(e._reversed?e.render((e._dirty?e.totalDuration():e._totalDuration)-(a-e._startTime)*e._timeScale,b,c):e.render((a-e._startTime)*e._timeScale,b,c)),e=d},f.rawTime=function(){return h||g.wake(),this._totalTime};var F=r("TweenLite",function(b,c,d){if(C.call(this,c,d),this.render=F.prototype.render,null==b)throw"Cannot tween a null target.";this.target=b="string"!=typeof b?b:F.selector(b)||b;var e,f,g,h=b.jquery||b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType),i=this.vars.overwrite;if(this._overwrite=i=null==i?P[F.defaultOverwrite]:"number"==typeof i?i>>0:P[i],(h||b instanceof Array||b.push&&n(b))&&"number"!=typeof b[0])for(this._targets=g=l(b),this._propLookup=[],this._siblings=[],e=0;g.length>e;e++)f=g[e],f?"string"!=typeof f?f.length&&f!==a&&f[0]&&(f[0]===a||f[0].nodeType&&f[0].style&&!f.nodeType)?(g.splice(e--,1),this._targets=g=g.concat(l(f))):(this._siblings[e]=U(f,this,!1),1===i&&this._siblings[e].length>1&&W(f,this,null,1,this._siblings[e])):(f=g[e--]=F.selector(f),"string"==typeof f&&g.splice(e+1,1)):g.splice(e--,1);else this._propLookup={},this._siblings=U(b,this,!1),1===i&&this._siblings.length>1&&W(b,this,null,1,this._siblings);(this.vars.immediateRender||0===c&&0===this._delay&&this.vars.immediateRender!==!1)&&(this._time=-k,this.render(-this._delay))},!0),G=function(b){return b&&b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType)},H=function(a,b){var c,d={};for(c in a)O[c]||c in b&&"transform"!==c&&"x"!==c&&"y"!==c&&"width"!==c&&"height"!==c&&"className"!==c&&"border"!==c||!(!L[c]||L[c]&&L[c]._autoCSS)||(d[c]=a[c],delete a[c]);a.css=d};f=F.prototype=new C,f.constructor=F,f.kill()._gc=!1,f.ratio=0,f._firstPT=f._targets=f._overwrittenProps=f._startAt=null,f._notifyPluginsOfEnabled=f._lazy=!1,F.version="1.17.0",F.defaultEase=f._ease=new u(null,null,1,1),F.defaultOverwrite="auto",F.ticker=g,F.autoSleep=120,F.lagSmoothing=function(a,b){g.lagSmoothing(a,b)},F.selector=a.$||a.jQuery||function(b){var c=a.$||a.jQuery;return c?(F.selector=c,c(b)):"undefined"==typeof document?b:document.querySelectorAll?document.querySelectorAll(b):document.getElementById("#"===b.charAt(0)?b.substr(1):b)};var I=[],J={},K=F._internals={isArray:n,isSelector:G,lazyTweens:I},L=F._plugins={},M=K.tweenLookup={},N=0,O=K.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1},P={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,true:1,false:0},Q=C._rootFramesTimeline=new E,R=C._rootTimeline=new E,S=30,T=K.lazyRender=function(){var a,b=I.length;for(J={};--b>-1;)a=I[b],a&&a._lazy!==!1&&(a.render(a._lazy[0],a._lazy[1],!0),a._lazy=!1);I.length=0};R._startTime=g.time,Q._startTime=g.frame,R._active=Q._active=!0,setTimeout(T,1),C._updateRoot=F.render=function(){var a,b,c;if(I.length&&T(),R.render((g.time-R._startTime)*R._timeScale,!1,!1),Q.render((g.frame-Q._startTime)*Q._timeScale,!1,!1),I.length&&T(),g.frame>=S){S=g.frame+(parseInt(F.autoSleep,10)||120);for(c in M){for(b=M[c].tweens,a=b.length;--a>-1;)b[a]._gc&&b.splice(a,1);0===b.length&&delete M[c]}if(c=R._first,(!c||c._paused)&&F.autoSleep&&!Q._first&&1===g._listeners.tick.length){for(;c&&c._paused;)c=c._next;c||g.sleep()}}},g.addEventListener("tick",C._updateRoot);var U=function(a,b,c){var d,e,f=a._gsTweenID;if(M[f||(a._gsTweenID=f="t"+N++)]||(M[f]={target:a,tweens:[]}),b&&(d=M[f].tweens,d[e=d.length]=b,c))for(;--e>-1;)d[e]===b&&d.splice(e,1);return M[f].tweens},V=function(a,b,c,d){var e,f,g=a.vars.onOverwrite;return g&&(e=g(a,b,c,d)),g=F.onOverwrite,g&&(f=g(a,b,c,d)),e!==!1&&f!==!1},W=function(a,b,c,d,e){var f,g,h,i;if(1===d||d>=4){for(i=e.length,f=0;i>f;f++)if((h=e[f])!==b)h._gc||h._kill(null,a,b)&&(g=!0);else if(5===d)break;return g}var j,l=b._startTime+k,m=[],n=0,o=0===b._duration;for(f=e.length;--f>-1;)(h=e[f])===b||h._gc||h._paused||(h._timeline!==b._timeline?(j=j||X(b,0,o),0===X(h,j,o)&&(m[n++]=h)):l>=h._startTime&&h._startTime+h.totalDuration()/h._timeScale>l&&((o||!h._initted)&&2e-10>=l-h._startTime||(m[n++]=h)));for(f=n;--f>-1;)if(h=m[f],2===d&&h._kill(c,a,b)&&(g=!0),2!==d||!h._firstPT&&h._initted){if(2!==d&&!V(h,b))continue;h._enabled(!1,!1)&&(g=!0)}return g},X=function(a,b,c){for(var d=a._timeline,e=d._timeScale,f=a._startTime;d._timeline;){if(f+=d._startTime,e*=d._timeScale,d._paused)return-100;d=d._timeline}return f/=e,f>b?f-b:c&&f===b||!a._initted&&2*k>f-b?k:(f+=a.totalDuration()/a._timeScale/e)>b+k?0:f-b-k};f._init=function(){var a,b,c,d,e,f=this.vars,g=this._overwrittenProps,h=this._duration,i=!!f.immediateRender,j=f.ease;if(f.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),e={};for(d in f.startAt)e[d]=f.startAt[d];if(e.overwrite=!1,e.immediateRender=!0,e.lazy=i&&f.lazy!==!1,e.startAt=e.delay=null,this._startAt=F.to(this.target,0,e),i)if(this._time>0)this._startAt=null;else if(0!==h)return}else if(f.runBackwards&&0!==h)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{0!==this._time&&(i=!1),c={};for(d in f)O[d]&&"autoCSS"!==d||(c[d]=f[d]);if(c.overwrite=0,c.data="isFromStart",c.lazy=i&&f.lazy!==!1,c.immediateRender=i,this._startAt=F.to(this.target,0,c),i){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=j=j?j instanceof u?j:"function"==typeof j?new u(j,f.easeParams):v[j]||F.defaultEase:F.defaultEase,f.easeParams instanceof Array&&j.config&&(this._ease=j.config.apply(j,f.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(a=this._targets.length;--a>-1;)this._initProps(this._targets[a],this._propLookup[a]={},this._siblings[a],g?g[a]:null)&&(b=!0);else b=this._initProps(this.target,this._propLookup,this._siblings,g);if(b&&F._onPluginEvent("_onInitAllProps",this),g&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),f.runBackwards)for(c=this._firstPT;c;)c.s+=c.c,c.c=-c.c,c=c._next;this._onUpdate=f.onUpdate,this._initted=!0},f._initProps=function(b,c,d,e){var f,g,h,i,j,k;if(null==b)return!1;J[b._gsTweenID]&&T(),this.vars.css||b.style&&b!==a&&b.nodeType&&L.css&&this.vars.autoCSS!==!1&&H(this.vars,b);for(f in this.vars){if(k=this.vars[f],O[f])k&&(k instanceof Array||k.push&&n(k))&&-1!==k.join("").indexOf("{self}")&&(this.vars[f]=k=this._swapSelfInParams(k,this));else if(L[f]&&(i=new L[f])._onInitTween(b,this.vars[f],this)){for(this._firstPT=j={_next:this._firstPT,t:i,p:"setRatio",s:0,c:1,f:!0,n:f,pg:!0,pr:i._priority},g=i._overwriteProps.length;--g>-1;)c[i._overwriteProps[g]]=this._firstPT;(i._priority||i._onInitAllProps)&&(h=!0),(i._onDisable||i._onEnable)&&(this._notifyPluginsOfEnabled=!0)}else this._firstPT=c[f]=j={_next:this._firstPT,t:b,p:f,f:"function"==typeof b[f],n:f,pg:!1,pr:0},j.s=j.f?b[f.indexOf("set")||"function"!=typeof b["get"+f.substr(3)]?f:"get"+f.substr(3)]():parseFloat(b[f]),j.c="string"==typeof k&&"="===k.charAt(1)?parseInt(k.charAt(0)+"1",10)*Number(k.substr(2)):Number(k)-j.s||0;j&&j._next&&(j._next._prev=j)}return e&&this._kill(e,b)?this._initProps(b,c,d,e):this._overwrite>1&&this._firstPT&&d.length>1&&W(b,this,c,this._overwrite,d)?(this._kill(c,b),this._initProps(b,c,d,e)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(J[b._gsTweenID]=!0),h)},f.render=function(a,b,c){var d,e,f,g,h=this._time,i=this._duration,j=this._rawPrevTime;if(a>=i)this._totalTime=this._time=i,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(d=!0,e="onComplete",c=c||this._timeline.autoRemoveChildren),0===i&&(this._initted||!this.vars.lazy||c)&&(this._startTime===this._timeline._duration&&(a=0),(0===a||0>j||j===k&&"isPause"!==this.data)&&j!==a&&(c=!0,j>k&&(e="onReverseComplete")),this._rawPrevTime=g=!b||a||j===a?a:k);else if(1e-7>a)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==h||0===i&&j>0)&&(e="onReverseComplete",d=this._reversed),0>a&&(this._active=!1,0===i&&(this._initted||!this.vars.lazy||c)&&(j>=0&&(j!==k||"isPause"!==this.data)&&(c=!0),this._rawPrevTime=g=!b||a||j===a?a:k)),this._initted||(c=!0);else if(this._totalTime=this._time=a,this._easeType){var l=a/i,m=this._easeType,n=this._easePower;(1===m||3===m&&l>=.5)&&(l=1-l),3===m&&(l*=2),1===n?l*=l:2===n?l*=l*l:3===n?l*=l*l*l:4===n&&(l*=l*l*l*l),this.ratio=1===m?1-l:2===m?l:.5>a/i?l/2:1-l/2}else this.ratio=this._ease.getRatio(a/i);if(this._time!==h||c){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!c&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=h,this._rawPrevTime=j,I.push(this),void(this._lazy=[a,b]);this._time&&!d?this.ratio=this._ease.getRatio(this._time/i):d&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==h&&a>=0&&(this._active=!0),0===h&&(this._startAt&&(a>=0?this._startAt.render(a,b,c):e||(e="_dummyGS")),this.vars.onStart&&(0!==this._time||0===i)&&(b||this._callback("onStart"))),f=this._firstPT;f;)f.f?f.t[f.p](f.c*this.ratio+f.s):f.t[f.p]=f.c*this.ratio+f.s,f=f._next;this._onUpdate&&(0>a&&this._startAt&&a!==-1e-4&&this._startAt.render(a,b,c),b||(this._time!==h||d)&&this._callback("onUpdate")),e&&(!this._gc||c)&&(0>a&&this._startAt&&!this._onUpdate&&a!==-1e-4&&this._startAt.render(a,b,c),d&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[e]&&this._callback(e),0===i&&this._rawPrevTime===k&&g!==k&&(this._rawPrevTime=0))}},f._kill=function(a,b,c){if("all"===a&&(a=null),null==a&&(null==b||b===this.target))return this._lazy=!1,this._enabled(!1,!1);b="string"!=typeof b?b||this._targets||this.target:F.selector(b)||b;var d,e,f,g,h,i,j,k,l,m=c&&this._time&&c._startTime===this._startTime&&this._timeline===c._timeline;if((n(b)||G(b))&&"number"!=typeof b[0])for(d=b.length;--d>-1;)this._kill(a,b[d],c)&&(i=!0);else{if(this._targets){for(d=this._targets.length;--d>-1;)if(b===this._targets[d]){h=this._propLookup[d]||{},this._overwrittenProps=this._overwrittenProps||[],e=this._overwrittenProps[d]=a?this._overwrittenProps[d]||{}:"all";break}}else{if(b!==this.target)return!1;h=this._propLookup,e=this._overwrittenProps=a?this._overwrittenProps||{}:"all"}if(h){if(j=a||h,k=a!==e&&"all"!==e&&a!==h&&("object"!=typeof a||!a._tempKill),c&&(F.onOverwrite||this.vars.onOverwrite)){for(f in j)h[f]&&(l||(l=[]),l.push(f));if((l||!a)&&!V(this,c,b,l))return!1}for(f in j)(g=h[f])&&(m&&(g.f?g.t[g.p](g.s):g.t[g.p]=g.s,i=!0),g.pg&&g.t._kill(j)&&(i=!0),g.pg&&0!==g.t._overwriteProps.length||(g._prev?g._prev._next=g._next:g===this._firstPT&&(this._firstPT=g._next),g._next&&(g._next._prev=g._prev),g._next=g._prev=null),delete h[f]),k&&(e[f]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return i},f.invalidate=function(){return this._notifyPluginsOfEnabled&&F._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],C.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-k,this.render(-this._delay)),this},f._enabled=function(a,b){if(h||g.wake(),a&&this._gc){var c,d=this._targets;if(d)for(c=d.length;--c>-1;)this._siblings[c]=U(d[c],this,!0);else this._siblings=U(this.target,this,!0)}return C.prototype._enabled.call(this,a,b),!(!this._notifyPluginsOfEnabled||!this._firstPT)&&F._onPluginEvent(a?"_onEnable":"_onDisable",this)},F.to=function(a,b,c){return new F(a,b,c)},F.from=function(a,b,c){return c.runBackwards=!0,c.immediateRender=0!=c.immediateRender,new F(a,b,c)},F.fromTo=function(a,b,c,d){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,new F(a,b,d)},F.delayedCall=function(a,b,c,d,e){return new F(b,0,{delay:a,onComplete:b,onCompleteParams:c,callbackScope:d,onReverseComplete:b,onReverseCompleteParams:c,immediateRender:!1,lazy:!1,useFrames:e,overwrite:0})},F.set=function(a,b){return new F(a,0,b)},F.getTweensOf=function(a,b){if(null==a)return[];a="string"!=typeof a?a:F.selector(a)||a;var c,d,e,f;if((n(a)||G(a))&&"number"!=typeof a[0]){for(c=a.length,d=[];--c>-1;)d=d.concat(F.getTweensOf(a[c],b));for(c=d.length;--c>-1;)for(f=d[c],e=c;--e>-1;)f===d[e]&&d.splice(c,1)}else for(d=U(a).concat(),c=d.length;--c>-1;)(d[c]._gc||b&&!d[c].isActive())&&d.splice(c,1);return d},F.killTweensOf=F.killDelayedCallsTo=function(a,b,c){"object"==typeof b&&(c=b,b=!1);for(var d=F.getTweensOf(a,b),e=d.length;--e>-1;)d[e]._kill(c,a)};var Y=r("plugins.TweenPlugin",function(a,b){this._overwriteProps=(a||"").split(","),this._propName=this._overwriteProps[0],this._priority=b||0,this._super=Y.prototype},!0);if(f=Y.prototype,Y.version="1.10.1",Y.API=2,f._firstPT=null,f._addTween=function(a,b,c,d,e,f){var g,h;return null!=d&&(g="number"==typeof d||"="!==d.charAt(1)?Number(d)-Number(c):parseInt(d.charAt(0)+"1",10)*Number(d.substr(2)))?(this._firstPT=h={_next:this._firstPT,t:a,p:b,s:c,c:g,f:"function"==typeof a[b],n:e||b,r:f},h._next&&(h._next._prev=h),h):void 0},f.setRatio=function(a){for(var b,c=this._firstPT,d=1e-6;c;)b=c.c*a+c.s,c.r?b=Math.round(b):d>b&&b>-d&&(b=0),c.f?c.t[c.p](b):c.t[c.p]=b,c=c._next},f._kill=function(a){var b,c=this._overwriteProps,d=this._firstPT;if(null!=a[this._propName])this._overwriteProps=[];else for(b=c.length;--b>-1;)null!=a[c[b]]&&c.splice(b,1);for(;d;)null!=a[d.n]&&(d._next&&(d._next._prev=d._prev),d._prev?(d._prev._next=d._next,d._prev=null):this._firstPT===d&&(this._firstPT=d._next)),d=d._next;return!1},f._roundProps=function(a,b){for(var c=this._firstPT;c;)(a[this._propName]||null!=c.n&&a[c.n.split(this._propName+"_").join("")])&&(c.r=b),c=c._next},F._onPluginEvent=function(a,b){var c,d,e,f,g,h=b._firstPT;if("_onInitAllProps"===a){for(;h;){for(g=h._next,d=e;d&&d.pr>h.pr;)d=d._next;(h._prev=d?d._prev:f)?h._prev._next=h:e=h,(h._next=d)?d._prev=h:f=h,h=g}h=b._firstPT=e}for(;h;)h.pg&&"function"==typeof h.t[a]&&h.t[a]()&&(c=!0),h=h._next;return c},Y.activate=function(a){for(var b=a.length;--b>-1;)a[b].API===Y.API&&(L[(new a[b])._propName]=a[b]);return!0},q.plugin=function(a){if(!(a&&a.propName&&a.init&&a.API))throw"illegal plugin definition.";var b,c=a.propName,d=a.priority||0,e=a.overwriteProps,f={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_roundProps",initAll:"_onInitAllProps"},g=r("plugins."+c.charAt(0).toUpperCase()+c.substr(1)+"Plugin",function(){Y.call(this,c,d),this._overwriteProps=e||[]},a.global===!0),h=g.prototype=new Y(c);h.constructor=g,g.API=a.API;for(b in f)"function"==typeof a[b]&&(h[f[b]]=a[b]);return g.version=a.version,Y.activate([g]),g},d=a._gsQueue){for(e=0;d.length>e;e++)d[e]();for(f in o)o[f].func||a.console.log("GSAP encountered missing dependency: com.greensock."+f)}h=!1}}("undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window,"TweenLite"),function(a,b){"use strict";a.addEventListener("DOMContentLoaded",function(){var c=b.location.href.replace(b.location.hash,"");[].slice.call(a.querySelectorAll("use[*|href]")).filter(function(a){return 0===a.getAttribute("xlink:href").indexOf("#")}).forEach(function(a){a.setAttribute("xlink:href",c.replace("#","")+a.getAttribute("xlink:href"))})},!1)}(document,window),!function(a,b){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(c){return b(a,c)}):"object"==typeof module&&module.exports?module.exports=b(a,require("jquery")):a.jQueryBridget=b(a,a.jQuery)}(window,function(a,b){"use strict";function c(c,f,h){function i(a,b,d){var e,f="$()."+c+'("'+b+'")';return a.each(function(a,i){var j=h.data(i,c);if(!j)return void g(c+" not initialized. Cannot call methods, i.e. "+f);var k=j[b];if(!k||"_"==b.charAt(0))return void g(f+" is not a valid method");var l=k.apply(j,d);e=void 0===e?l:e}),void 0!==e?e:a}function j(a,b){a.each(function(a,d){var e=h.data(d,c);e?(e.option(b),e._init()):(e=new f(d,b),h.data(d,c,e))})}h=h||b||a.jQuery,h&&(f.prototype.option||(f.prototype.option=function(a){h.isPlainObject(a)&&(this.options=h.extend(!0,this.options,a))}),h.fn[c]=function(a){if("string"==typeof a){var b=e.call(arguments,1);return i(this,a,b)}return j(this,a), 3 | this},d(h))}function d(a){!a||a&&a.bridget||(a.bridget=c)}var e=Array.prototype.slice,f=a.console,g="undefined"==typeof f?function(){}:function(a){f.error(a)};return d(b||a.jQuery),c}),function(a,b){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",b):"object"==typeof module&&module.exports?module.exports=b():a.EvEmitter=b()}("undefined"!=typeof window?window:this,function(){function a(){}var b=a.prototype;return b.on=function(a,b){if(a&&b){var c=this._events=this._events||{},d=c[a]=c[a]||[];return-1==d.indexOf(b)&&d.push(b),this}},b.once=function(a,b){if(a&&b){this.on(a,b);var c=this._onceEvents=this._onceEvents||{},d=c[a]=c[a]||{};return d[b]=!0,this}},b.off=function(a,b){var c=this._events&&this._events[a];if(c&&c.length){var d=c.indexOf(b);return-1!=d&&c.splice(d,1),this}},b.emitEvent=function(a,b){var c=this._events&&this._events[a];if(c&&c.length){c=c.slice(0),b=b||[];for(var d=this._onceEvents&&this._onceEvents[a],e=0;eb;b++){var c=i[b];a[c]=0}return a}function d(a){var b=getComputedStyle(a);return b||h("Style returned "+b+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),b}function e(){if(!k){k=!0;var b=document.createElement("div");b.style.width="200px",b.style.padding="1px 2px 3px 4px",b.style.borderStyle="solid",b.style.borderWidth="1px 2px 3px 4px",b.style.boxSizing="border-box";var c=document.body||document.documentElement;c.appendChild(b);var e=d(b);f.isBoxSizeOuter=g=200==a(e.width),c.removeChild(b)}}function f(b){if(e(),"string"==typeof b&&(b=document.querySelector(b)),b&&"object"==typeof b&&b.nodeType){var f=d(b);if("none"==f.display)return c();var h={};h.width=b.offsetWidth,h.height=b.offsetHeight;for(var k=h.isBorderBox="border-box"==f.boxSizing,l=0;j>l;l++){var m=i[l],n=f[m],o=parseFloat(n);h[m]=isNaN(o)?0:o}var p=h.paddingLeft+h.paddingRight,q=h.paddingTop+h.paddingBottom,r=h.marginLeft+h.marginRight,s=h.marginTop+h.marginBottom,t=h.borderLeftWidth+h.borderRightWidth,u=h.borderTopWidth+h.borderBottomWidth,v=k&&g,w=a(f.width);w!==!1&&(h.width=w+(v?0:p+t));var x=a(f.height);return x!==!1&&(h.height=x+(v?0:q+u)),h.innerWidth=h.width-(p+t),h.innerHeight=h.height-(q+u),h.outerWidth=h.width+r,h.outerHeight=h.height+s,h}}var g,h="undefined"==typeof console?b:function(a){console.error(a)},i=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],j=i.length,k=!1;return f}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",b):"object"==typeof module&&module.exports?module.exports=b():a.matchesSelector=b()}(window,function(){"use strict";var a=function(){var a=window.Element.prototype;if(a.matches)return"matches";if(a.matchesSelector)return"matchesSelector";for(var b=["webkit","moz","ms","o"],c=0;cg?"round":"floor";f=Math[h](f),this.cols=Math.max(f,1)},d.getContainerWidth=function(){var a=this._getOption("fitWidth"),c=a?this.element.parentNode:this.element,d=b(c);this.containerWidth=d&&d.innerWidth},d._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth%this.columnWidth,c=b&&1>b?"round":"ceil",d=Math[c](a.size.outerWidth/this.columnWidth);d=Math.min(d,this.cols);for(var e=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",f=this[e](d,a),g={x:this.columnWidth*f.col,y:f.y},h=f.y+a.size.outerHeight,i=d+f.col,j=f.col;i>j;j++)this.colYs[j]=h;return g},d._getTopColPosition=function(a){var b=this._getTopColGroup(a),c=Math.min.apply(Math,b);return{col:b.indexOf(c),y:c}},d._getTopColGroup=function(a){if(2>a)return this.colYs;for(var b=[],c=this.cols+1-a,d=0;c>d;d++)b[d]=this._getColGroupY(d,a);return b},d._getColGroupY=function(a,b){if(2>b)return this.colYs[a];var c=this.colYs.slice(a,a+b);return Math.max.apply(Math,c)},d._getHorizontalColPosition=function(a,b){var c=this.horizontalColIndex%this.cols,d=a>1&&c+a>this.cols;c=d?0:c;var e=b.size.outerWidth&&b.size.outerHeight;return this.horizontalColIndex=e?c+a:this.horizontalColIndex,{col:c,y:this._getColGroupY(c,a)}},d._manageStamp=function(a){var c=b(a),d=this._getElementOffset(a),e=this._getOption("originLeft"),f=e?d.left:d.right,g=f+c.outerWidth,h=Math.floor(f/this.columnWidth);h=Math.max(0,h);var i=Math.floor(g/this.columnWidth);i-=g%this.columnWidth?0:1,i=Math.min(this.cols-1,i);for(var j=this._getOption("originTop"),k=(j?d.top:d.bottom)+c.outerHeight,l=h;i>=l;l++)this.colYs[l]=Math.max(k,this.colYs[l])},d._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var a={height:this.maxY};return this._getOption("fitWidth")&&(a.width=this._getContainerFitWidth()),a},d._getContainerFitWidth=function(){for(var a=0,b=this.cols;--b&&0===this.colYs[b];)a++;return(this.cols-a)*this.columnWidth-this.gutter},d.needsResizeLayout=function(){var a=this.containerWidth;return this.getContainerWidth(),a!=this.containerWidth},c}),!function(a,b){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",b):"object"==typeof module&&module.exports?module.exports=b():a.EvEmitter=b()}("undefined"!=typeof window?window:this,function(){function a(){}var b=a.prototype;return b.on=function(a,b){if(a&&b){var c=this._events=this._events||{},d=c[a]=c[a]||[];return d.indexOf(b)==-1&&d.push(b),this}},b.once=function(a,b){if(a&&b){this.on(a,b);var c=this._onceEvents=this._onceEvents||{},d=c[a]=c[a]||{};return d[b]=!0,this}},b.off=function(a,b){var c=this._events&&this._events[a];if(c&&c.length){var d=c.indexOf(b);return d!=-1&&c.splice(d,1),this}},b.emitEvent=function(a,b){var c=this._events&&this._events[a];if(c&&c.length){c=c.slice(0),b=b||[];for(var d=this._onceEvents&&this._onceEvents[a],e=0;e").get(0).files,e.formdata=void 0!==window.FormData;var f=!!a.fn.prop;a.fn.attr2=function(){if(!f)return this.attr.apply(this,arguments);var a=this.prop.apply(this,arguments);return a&&a.jquery||"string"==typeof a?a:this.attr.apply(this,arguments)},a.fn.ajaxSubmit=function(b){function c(c){var d,e,f=a.param(c,b.traditional).split("&"),g=f.length,h=[];for(d=0;g>d;d++)f[d]=f[d].replace(/\+/g," "),e=f[d].split("="),h.push([decodeURIComponent(e[0]),decodeURIComponent(e[1])]);return h}function g(d){for(var e=new FormData,f=0;f').val(m.extraData[n].value).appendTo(x)[0]:a('').val(m.extraData[n]).appendTo(x)[0]);m.iframeTarget||q.appendTo("body"), 4 | r.attachEvent?r.attachEvent("onload",h):r.addEventListener("load",h,!1),setTimeout(b,15);try{x.submit()}catch(a){var p=document.createElement("form").submit;p.apply(x)}}finally{x.setAttribute("action",f),x.setAttribute("enctype",j),c?x.setAttribute("target",c):l.removeAttr("target"),a(k).remove()}}function h(b){if(!s.aborted&&!F){if(E=e(r),E||(d("cannot access response document"),b=A),b===z&&s)return s.abort("timeout"),void y.reject(s,"timeout");if(b==A&&s)return s.abort("server abort"),void y.reject(s,"error","server abort");if(E&&E.location.href!=m.iframeSrc||v){r.detachEvent?r.detachEvent("onload",h):r.removeEventListener("load",h,!1);var c,f="success";try{if(v)throw"timeout";var g="xml"==m.dataType||E.XMLDocument||a.isXMLDoc(E);if(d("isXml="+g),!g&&window.opera&&(null===E.body||!E.body.innerHTML)&&--G)return d("requeing onLoad callback, DOM not available"),void setTimeout(h,250);var i=E.body?E.body:E.documentElement;s.responseText=i?i.innerHTML:null,s.responseXML=E.XMLDocument?E.XMLDocument:E,g&&(m.dataType="xml"),s.getResponseHeader=function(a){var b={"content-type":m.dataType};return b[a.toLowerCase()]},i&&(s.status=Number(i.getAttribute("status"))||s.status,s.statusText=i.getAttribute("statusText")||s.statusText);var j=(m.dataType||"").toLowerCase(),k=/(json|script|text)/.test(j);if(k||m.textarea){var l=E.getElementsByTagName("textarea")[0];if(l)s.responseText=l.value,s.status=Number(l.getAttribute("status"))||s.status,s.statusText=l.getAttribute("statusText")||s.statusText;else if(k){var o=E.getElementsByTagName("pre")[0],p=E.getElementsByTagName("body")[0];o?s.responseText=o.textContent?o.textContent:o.innerText:p&&(s.responseText=p.textContent?p.textContent:p.innerText)}}else"xml"==j&&!s.responseXML&&s.responseText&&(s.responseXML=H(s.responseText));try{D=J(s,j,m)}catch(a){f="parsererror",s.error=c=a||f}}catch(a){d("error caught: ",a),f="error",s.error=c=a||f}s.aborted&&(d("upload aborted"),f=null),s.status&&(f=s.status>=200&&s.status<300||304===s.status?"success":"error"),"success"===f?(m.success&&m.success.call(m.context,D,"success",s),y.resolve(s.responseText,"success",s),n&&a.event.trigger("ajaxSuccess",[s,m])):f&&(void 0===c&&(c=s.statusText),m.error&&m.error.call(m.context,s,f,c),y.reject(s,"error",c),n&&a.event.trigger("ajaxError",[s,m,c])),n&&a.event.trigger("ajaxComplete",[s,m]),n&&!--a.active&&a.event.trigger("ajaxStop"),m.complete&&m.complete.call(m.context,s,f),F=!0,m.timeout&&clearTimeout(w),setTimeout(function(){m.iframeTarget?q.attr("src",m.iframeSrc):q.remove(),s.responseXML=null},100)}}}var j,k,m,n,o,q,r,s,t,u,v,w,x=l[0],y=a.Deferred();if(y.abort=function(a){s.abort(a)},c)for(k=0;k'),q.css({position:"absolute",top:"-1000px",left:"-1000px"})),r=q[0],s={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(b){var c="timeout"===b?"timeout":"aborted";d("aborting upload... "+c),this.aborted=1;try{r.contentWindow.document.execCommand&&r.contentWindow.document.execCommand("Stop")}catch(a){}q.attr("src",m.iframeSrc),s.error=c,m.error&&m.error.call(m.context,s,c,b),n&&a.event.trigger("ajaxError",[s,m,c]),m.complete&&m.complete.call(m.context,s,c)}},n=m.global,n&&0===a.active++&&a.event.trigger("ajaxStart"),n&&a.event.trigger("ajaxSend",[s,m]),m.beforeSend&&m.beforeSend.call(m.context,s,m)===!1)return m.global&&a.active--,y.reject(),y;if(s.aborted)return y.reject(),y;t=x.clk,t&&(u=t.name,u&&!t.disabled&&(m.extraData=m.extraData||{},m.extraData[u]=t.value,"image"==t.type&&(m.extraData[u+".x"]=x.clk_x,m.extraData[u+".y"]=x.clk_y)));var z=1,A=2,B=a("meta[name=csrf-token]").attr("content"),C=a("meta[name=csrf-param]").attr("content");C&&B&&(m.extraData=m.extraData||{},m.extraData[C]=B),m.forceSync?g():setTimeout(g,10);var D,E,F,G=50,H=a.parseXML||function(a,b){return window.ActiveXObject?(b=new ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(a)):b=(new DOMParser).parseFromString(a,"text/xml"),b&&b.documentElement&&"parsererror"!=b.documentElement.nodeName?b:null},I=a.parseJSON||function(a){return window.eval("("+a+")")},J=function(b,c,d){var e=b.getResponseHeader("content-type")||"",f="xml"===c||!c&&e.indexOf("xml")>=0,g=f?b.responseXML:b.responseText;return f&&"parsererror"===g.documentElement.nodeName&&a.error&&a.error("parsererror"),d&&d.dataFilter&&(g=d.dataFilter(g,c)),"string"==typeof g&&("json"===c||!c&&e.indexOf("json")>=0?g=I(g):("script"===c||!c&&e.indexOf("javascript")>=0)&&a.globalEval(g)),g};return y}if(!this.length)return d("ajaxSubmit: skipping submit process - no element selected"),this;var i,j,k,l=this;"function"==typeof b?b={success:b}:void 0===b&&(b={}),i=b.type||this.attr2("method"),j=b.url||this.attr2("action"),k="string"==typeof j?a.trim(j):"",k=k||window.location.href||"",k&&(k=(k.match(/^([^#]+)/)||[])[1]),b=a.extend(!0,{url:k,success:a.ajaxSettings.success,type:i||a.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},b);var m={};if(this.trigger("form-pre-serialize",[this,b,m]),m.veto)return d("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(b.beforeSerialize&&b.beforeSerialize(this,b)===!1)return d("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var n=b.traditional;void 0===n&&(n=a.ajaxSettings.traditional);var o,p=[],q=this.formToArray(b.semantic,p);if(b.data&&(b.extraData=b.data,o=a.param(b.data,n)),b.beforeSubmit&&b.beforeSubmit(q,this,b)===!1)return d("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[q,this,b,m]),m.veto)return d("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var r=a.param(q,n);o&&(r=r?r+"&"+o:o),"GET"==b.type.toUpperCase()?(b.url+=(b.url.indexOf("?")>=0?"&":"?")+r,b.data=null):b.data=r;var s=[];if(b.resetForm&&s.push(function(){l.resetForm()}),b.clearForm&&s.push(function(){l.clearForm(b.includeHidden)}),!b.dataType&&b.target){var t=b.success||function(){};s.push(function(c){var d=b.replaceTarget?"replaceWith":"html";a(b.target)[d](c).each(t,arguments)})}else b.success&&s.push(b.success);if(b.success=function(a,c,d){for(var e=b.context||this,f=0,g=s.length;g>f;f++)s[f].apply(e,[a,c,d||l,l])},b.error){var u=b.error;b.error=function(a,c,d){var e=b.context||this;u.apply(e,[a,c,d,l])}}if(b.complete){var v=b.complete;b.complete=function(a,c){var d=b.context||this;v.apply(d,[a,c,l])}}var w=a("input[type=file]:enabled",this).filter(function(){return""!==a(this).val()}),x=w.length>0,y="multipart/form-data",z=l.attr("enctype")==y||l.attr("encoding")==y,A=e.fileapi&&e.formdata;d("fileAPI :"+A);var B,C=(x||z)&&!A;b.iframe!==!1&&(b.iframe||C)?b.closeKeepAlive?a.get(b.closeKeepAlive,function(){B=h(q)}):B=h(q):B=(x||z)&&A?g(q):a.ajax(b),l.removeData("jqxhr").data("jqxhr",B);for(var D=0;Dj;j++)if(n=i[j],l=n.name,l&&!n.disabled)if(b&&g.clk&&"image"==n.type)g.clk==n&&(d.push({name:l,value:a(n).val(),type:n.type}),d.push({name:l+".x",value:g.clk_x},{name:l+".y",value:g.clk_y}));else if(m=a.fieldValue(n,!0),m&&m.constructor==Array)for(c&&c.push(n),k=0,p=m.length;p>k;k++)d.push({name:l,value:m[k]});else if(e.fileapi&&"file"==n.type){c&&c.push(n);var q=n.files;if(q.length)for(k=0;kf;f++)c.push({name:d,value:e[f]});else null!==e&&"undefined"!=typeof e&&c.push({name:this.name,value:e})}}),a.param(c)},a.fn.fieldValue=function(b){for(var c=[],d=0,e=this.length;e>d;d++){var f=this[d],g=a.fieldValue(f,b);null===g||"undefined"==typeof g||g.constructor==Array&&!g.length||(g.constructor==Array?a.merge(c,g):c.push(g))}return c},a.fieldValue=function(b,c){var d=b.name,e=b.type,f=b.tagName.toLowerCase();if(void 0===c&&(c=!0),c&&(!d||b.disabled||"reset"==e||"button"==e||("checkbox"==e||"radio"==e)&&!b.checked||("submit"==e||"image"==e)&&b.form&&b.form.clk!=b||"select"==f&&-1==b.selectedIndex))return null;if("select"==f){var g=b.selectedIndex;if(0>g)return null;for(var h=[],i=b.options,j="select-one"==e,k=j?g+1:i.length,l=j?g:0;k>l;l++){var m=i[l];if(m.selected){var n=m.value;if(n||(n=m.attributes&&m.attributes.value&&!m.attributes.value.specified?m.text:m.value),j)return n;h.push(n)}}return h}return a(b).val()},a.fn.clearForm=function(b){return this.each(function(){a("input,select,textarea",this).clearFields(b)})},a.fn.clearFields=a.fn.clearInputs=function(b){var c=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var d=this.type,e=this.tagName.toLowerCase();c.test(d)||"textarea"==e?this.value="":"checkbox"==d||"radio"==d?this.checked=!1:"select"==e?this.selectedIndex=-1:"file"==d?/MSIE/.test(navigator.userAgent)?a(this).replaceWith(a(this).clone(!0)):a(this).val(""):b&&(b===!0&&/hidden/.test(d)||"string"==typeof b&&a(this).is(b))&&(this.value="")})},a.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},a.fn.enable=function(a){return void 0===a&&(a=!0),this.each(function(){this.disabled=!a})},a.fn.selected=function(b){return void 0===b&&(b=!0),this.each(function(){var c=this.type;if("checkbox"==c||"radio"==c)this.checked=b;else if("option"==this.tagName.toLowerCase()){var d=a(this).parent("select");b&&d[0]&&"select-one"==d[0].type&&d.find("option").selected(!1),this.selected=b}})},a.fn.ajaxSubmit.debug=!1}),$.cookie=function(a,b,c){if(arguments.length>1&&"[object Object]"!==String(b)){if(c=$.extend({},c),null!==b&&void 0!==b||(c.expires=-1),"number"==typeof c.expires){var d=c.expires,e=c.expires=new Date;e.setDate(e.getDate()+d)}return b=String(b),document.cookie=[encodeURIComponent(a),"=",c.raw?b:encodeURIComponent(b),c.expires?"; expires="+c.expires.toUTCString():"",c.path?"; path="+c.path:"",c.domain?"; domain="+c.domain:"",c.secure?"; secure":""].join("")}c=b||{};var f,g=c.raw?function(a){return a}:decodeURIComponent;return(f=new RegExp("(?:^|; )"+encodeURIComponent(a)+"=([^;]*)").exec(document.cookie))?g(f[1]):null},!function(a,b,c){"use strict";"undefined"!=typeof module&&module.exports?module.exports=c(b,a):"function"==typeof define&&define.amd?define("detect-zoom",function(){return c(b,a)}):a[b]=c(b,a)}(window,"detectZoom",function(){var a=function(){return window.devicePixelRatio||1},b=function(){return{zoom:1,devicePxPerCssPx:1}},c=function(){var b=Math.round(screen.deviceXDPI/screen.logicalXDPI*100)/100;return{zoom:b,devicePxPerCssPx:b*a()}},d=function(){var b=Math.round(document.documentElement.offsetHeight/window.innerHeight*100)/100;return{zoom:b,devicePxPerCssPx:b*a()}},e=function(){var b=Math.round(window.outerWidth/window.innerWidth*100)/100;return{zoom:b,devicePxPerCssPx:b*a()}},f=function(){var b=Math.round(document.documentElement.clientWidth/window.innerWidth*100)/100;return{zoom:b,devicePxPerCssPx:b*a()}},g=function(){var b=90==Math.abs(window.orientation)?screen.height:screen.width,c=b/window.innerWidth;return{zoom:c,devicePxPerCssPx:c*a()}},h=function(){var b=function(a){return a.replace(/;/g," !important;")},c=document.createElement("div");c.innerHTML="1
2
3
4
5
6
7
8
9
0",c.setAttribute("style",b("font: 100px/1em sans-serif; -webkit-text-size-adjust: none; text-size-adjust: none; height: auto; width: 1em; padding: 0; overflow: visible;"));var d=document.createElement("div");d.setAttribute("style",b("width:0; height:0; overflow:hidden; visibility:hidden; position: absolute;")),d.appendChild(c),document.body.appendChild(d);var e=1e3/c.clientHeight;return e=Math.round(100*e)/100,document.body.removeChild(d),{zoom:e,devicePxPerCssPx:e*a()}},i=function(){var a=l("min--moz-device-pixel-ratio","",0,10,20,1e-4);return a=Math.round(100*a)/100,{zoom:a,devicePxPerCssPx:a}},j=function(){return{zoom:i().zoom,devicePxPerCssPx:a()}},k=function(){var b=window.top.outerWidth/window.top.innerWidth;return b=Math.round(100*b)/100,{zoom:b,devicePxPerCssPx:b*a()}},l=function(a,b,c,d,e,f){function g(c,d,e){var i=(c+d)/2;if(0>=e||f>d-c)return i;var j="("+a+":"+i+b+")";return h(j).matches?g(i,d,e-1):g(c,i,e-1)}var h,i,j,k;window.matchMedia?h=window.matchMedia:(i=document.getElementsByTagName("head")[0],j=document.createElement("style"),i.appendChild(j),k=document.createElement("div"),k.className="mediaQueryBinarySearch",k.style.display="none",document.body.appendChild(k),h=function(a){j.sheet.insertRule("@media "+a+"{.mediaQueryBinarySearch {text-decoration: underline} }",0);var b="underline"==getComputedStyle(k,null).textDecoration;return j.sheet.deleteRule(0),{matches:b}});var l=g(c,d,e);return k&&(i.removeChild(j),document.body.removeChild(k)),l},m=function(){var a=b;return isNaN(screen.logicalXDPI)||isNaN(screen.systemXDPI)?window.navigator.msMaxTouchPoints?a=d:window.chrome&&!(window.opera||navigator.userAgent.indexOf(" Opera")>=0)?a=e:Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0?a=f:"orientation"in window&&"webkitRequestAnimationFrame"in window?a=g:"webkitRequestAnimationFrame"in window?a=h:navigator.userAgent.indexOf("Opera")>=0?a=k:window.devicePixelRatio?a=j:i().zoom>.001&&(a=i):a=c,a}();return{zoom:function(){return m().zoom},device:function(){return m().devicePxPerCssPx}}}),window.inAction=1,window.allowSlide=1,window.blockScroll=1,window.effectOffset=500,window.effectSpeed=1e3,window.slideSpeed=1e3,window.cleanupDelay=1400,window.horizontalMode=0,window.sidebarShown=0,window.loadingProgress=0,window.smoothScroll=0,window.scrollSpeed=.5,window.preload=1,window.setHashLink=1,window.hideSidebarOnBodyClick=1,window.collectScrolls=0,window.sliderStatus=0,window.minScrollToSlide=500,window.minSwipeToSlide=4,window.enableMobileZoom=0,window.hideOnScrollSensitivity=100,window.allowParallaxOnMobile=1,window.hidePopupOnBodyClick=1,window.disableKeyNavigation=0;var $html=$("html");$(window).on("load",function(){window.loaded=1}),$(document).ready(function(){"use strict";function a(){var a=window.location.href.split("#")[1];if(a&&$('.slide[data-name="'+a+'"]').length>0){var b=$('.slide[data-name="'+a+'"]');window.isMobile&&window.isSimplifiedMobile||window.isScroll?b.length&&(!window.preload||window.loaded?$("html,body").stop().clearQueue().animate({scrollTop:b.position().top},window.effectSpeed):$(window).on("load",function(){$("html,body").stop().clearQueue().animate({scrollTop:b.position().top},window.effectSpeed)})):(window.stage=$(".slide").index(b)+1,d(window.stage))}}function b(){var a=window.loadingProgress/window.images;window.progressBar.css("width",100*a+"%"),window.loadingProgress==window.images&&window.progressBar.addClass("loaded")}function c(){$html.addClass("page-loaded"),window.inAction=0,window.blockScroll=0,window.loaded=1,setTimeout(function(){window.isScroll&&(f(),h()),window.isMobile&&window.isSimplifiedMobile?($(".slide").addClass("selected animate active"),f(),h()):d(window.stage)},500)}function d(a){if(a=parseInt(a),!(window.isMobile&&window.isSimplifiedMobile||window.isScroll)){h();var b=$(".slide").eq(a-1),c=$(".slide.selected"),d=c.index(".slide")+1;m(),e(),i(),window.allowSlide=1,n.removeClass("sidebarShown lastSlide firstSlide hidePanel-top hidePanel-bottom"),0!=window.setStageClasses&&(1===window.stage&&n.addClass("firstSlide"),window.stages===window.stage&&1!==window.stages&&n.addClass("lastSlide"),n.removeClassByPrefix("stage-").addClass("stage-"+window.stage)),b.hasClass("whiteSlide")?n.addClass("whiteSlide"):n.removeClass("whiteSlide"),d!==a&&0!=window.setStageClasses&&(c.removeClass("selected").addClass("active"),b.removeClass("before after").addClass("selected active"),b.prevAll(".slide").addClass("before").removeClass("after"),b.nextAll(".slide").addClass("after").removeClass("before"),$(window).trigger("slideChange",[parseInt(a),b])),window.setHashLink&&(b.attr("data-name")||b.attr("id")?window.location.hash=b.attr("data-name")?b.attr("data-name"):b.attr("id"):window.location.toString().indexOf("#")>0&&"file:"!==location.protocol&&location.href.split("#")[0]&&(history.pushState?window.history.pushState("","",location.href.split("#")[0]):window.location.hash="")),b.find(".content, .container").scrollTop(0),window.loaded&&(window.blockScroll=1,setTimeout(function(){d!==a&&(0===window.animationLoop?c.removeClass("active"):c.removeClass("active animate")),window.blockScroll=0},window.effectSpeed),window.effectOffset>window.slideSpeed&&(window.effectOffset=window.slideSpeed),setTimeout(function(){b.addClass("animate")},window.slideSpeed-window.effectOffset),0!=window.animationLoop&&$(".done").removeClass("done"),$(".slide.selected [class*='ae-']").one("webkitTransitionEnd oTransitionEnd msTransitionEnd transitionend",function(){$(this).addClass("done")}))}}function e(a){$(".zoom-overlay-open").length>0&&($(".zoom-img").click(),a&&$(".zoom-img-wrap, .zoom-overlay").remove())}function f(){p++,p>=2&&(m(),p=0),$(".slide").each(function(a,b){var c=$(b),d=c.index(".slide"),e=$(document).scrollTop(),f=c.offset().top,g=c.height(),i=window.windowHeight/2>g?g/2:window.windowHeight/2,j=fe-g+i,k=2*((e+window.windowHeight-f)/(window.windowHeight+g)-.5),l=!0;0===e&&(l=0===a),e+window.windowHeight===window.documentHeight&&(l=a===window.stages-1),0!=window.setStageClasses&&(j&&l?(c.prevAll(".slide").addClass("before").removeClass("after"),c.nextAll(".slide").addClass("after").removeClass("before"),c.addClass("selected animate active").removeClass("after before"),window.stage===d+1&&window.firstTimeTrigger||(window.stage=d+1,$(window).trigger("slideChange",[window.stage,c]),1===window.stage?n.addClass("firstSlide"):n.removeClass("firstSlide"),window.stages===window.stage?n.addClass("lastSlide"):n.removeClass("lastSlide"),n.removeClassByPrefix("stage-").addClass("stage-"+window.stage),c.hasClass("whiteSlide")?n.addClass("whiteSlide"):n.removeClass("whiteSlide"),"auto"==window.isAnimated&&(window.clearElementAnimation=setTimeout(function(){c.find("[class*='ae-']").addClass("done")},window.effectSpeed+window.cleanupDelay)),h()),window.firstTimeTrigger||(window.firstTimeTrigger=1,$(window).trigger("slideChange",[window.stage,c]))):c.removeClass("selected")),!(k>-1&&k<1)||window.allowParallaxOnMobile&&window.isMobile||(c.hasClass("parallax")||c.find(".parallax-element"))&&c.find(".parallax-element").each(function(){var a=$(this),b=parseInt(a.data("parallax-velocity"))?parseInt(a.data("parallax-velocity")):50,c=k*b;b>100&&(b=100),a.css("-webkit-transform","translate3d(0, "+c+"%, 0)").css("transform","translate3d(0, "+c+"%, 0)")})}),"animateOnEvent"==window.isAnimated&&(window.preload?window.loaded&&$("[class*='ae-']").each(function(a,b){var c=$(b);g(c)&&c.addClass("do").one("webkitAnimationEnd oanimationend msAnimationEnd animationend",function(){$(this).removeClassByPrefix("ae-").removeClass("do").addClass("done")})}):$("[class*='ae-']").each(function(a,b){var c=$(b);g(c)&&c.addClass("do").one("webkitAnimationEnd oanimationend msAnimationEnd animationend",function(){$(this).removeClassByPrefix("ae-").removeClass("do").addClass("done")})}))}function g(a){var b=$(window).scrollTop(),c=$(a),d=c.height(),e=b+window.windowHeight,f=c.offset().top,g=f+d;return d>=window.windowHeight/5?e>=f+d/5:bg}function h(){setTimeout(function(){$(v).length>0&&$(v).each(function(a,b){$(b).find("li.selected").removeClass("selected");var c=$(".slide.selected"),d=c.data("parent-slide-id"),e=c.index(".slide:not(.exclude)");e!==-1?$(b).find("li").eq(e).addClass("selected"):d&&(e=$('.slide[data-slide-id="'+d+'"]').index(".slide:not(.exclude)"),$(b).find("li").eq(e).addClass("selected"))})},100)}function i(){if(window.sidebarShown){$html.removeClass("sidebarShown").removeClassByPrefix("sidebar_");var a=$(".sidebar.visible");a.removeClass("visible"),window.removeAnimationTimeout=setTimeout(function(){a.removeClass("animate active").find(".done").removeClass("done")},500),window.sidebarShown=0,window.allowSlide=1}}function j(a){if(a="undefined"!=typeof a&&a,$.isArray(window.popupShown)){var b=a?a:window.popupShown.slice(-1)[0],c=$('.popup.visible[data-popup-id="'+b+'"]'),d=c.find("iframe"),e=c.find("video");d.length>0&&$(d).each(function(a,b){var c=$(b).attr("src"),d=c.indexOf("?autoplay")>-1?"?":"&";$(b).attr("src",$(b).attr("src").replace(d+"autoplay=1",""))}),e.length>0&&$(e).each(function(a,b){$(b)[0].pause(),$(b)[0].currentTime=0}),clearTimeout(window.clearPopupElementAnimation),c.addClass("hidePopup"),$(window).trigger("popupHidden"),setTimeout(function(){if(window.allowSlide=1,c.removeClass("visible animate active hidePopup").removeAttr("style").find(".done").removeClass("done"),$html.removeClass("popup_"+b),$.isArray(window.popupShown)){var a=window.popupShown.indexOf(b);a!=-1&&window.popupShown.splice(a,1)}window.popupShown.length<=0&&($html.removeClass("popupShown"),window.popupShown=!1)},500)}}function k(){var a=$(".grid.equal, .flex.equal");a.length&&$(a).each(function(a,b){var c=window.windowWidth,d=$(b).hasClass("later")?767:1024,d=$(b).data("equal-collapse-width")?parseInt($(b).data("equal-collapse-width")):d,e=$(b).find(".equalElement"),f=$(this).hasClass("equalMobile");if(c>=d||f){var g=0;$(e).each(function(a,b){$(b).css("height","auto"),g<$(b).outerHeight()&&(g=$(b).outerHeight())}),$(b).find(".equalElement").each(function(a,b){$(b).css("height",g+"px")})}else $(e).css("height","auto")})}function l(a,b){b="undefined"!=typeof b&&b;var c=a.offset(),d=a.position(),e=window.popupShown?Math.ceil(d.top):Math.ceil(c.top),f=Math.ceil(c.left),g=a.data("dropdown-id"),h=$('.dropdown[data-dropdown-id="'+g+'"]'),i=a.data("dropdown-position")?a.data("dropdown-position"):h.attr("class"),i=i.split(" ");b||m(),i.indexOf("bottom")!=-1?(e-=h.outerHeight(),h.removeClass("top").addClass("bottom")):(e+=a.outerHeight(),h.removeClass("bottom").addClass("top")),i.indexOf("right")!=-1?(f=f-h.outerWidth()+a.outerWidth(),h.removeClass("left center").addClass("right")):i.indexOf("left")!=-1?h.removeClass("right center").addClass("left"):i.indexOf("center")!=-1&&(f=f-h.outerWidth()/2+a.outerWidth()/2,h.removeClass("right left").addClass("center")),h.addClass("show").css("top",e).css("left",f),$html.addClass("dropdownShown dropdown_"+g),window.dropdownShown=!0}function m(){window.dropdownShown&&($html.removeClass("dropdownShown").removeClassByPrefix("dropdown_"),window.dropdownShown=!1,p=0,$(".dropdown.show").addClass("hide").one("webkitTransitionEnd otransitionend msTransitionEnd transitionend",function(){$(this).removeClass("show hide"),$html.removeClass("dropdownShown").removeClassByPrefix("dropdown_")}),$(window).trigger("dropdownHidden"))}var n=$("body");if(setTimeout(function(){$(window).trigger("ready")},1),n.hide().show(0),window.isScroll=n.hasClass("scroll"),window.isSimplifiedMobile=n.hasClass("simplifiedMobile"),(window.isScroll||window.isSimplifiedMobile&&window.isMobile)&&$html.addClass("scrollable"),$html.addClass("page-ready"),n.hasClass("fast")?(window.slideSpeed=700,window.cleanupDelay=1200,window.effectSpeed=800,window.scrollSpeed=.35,window.effectOffset=400):n.hasClass("slow")&&(window.slideSpeed=1400,window.cleanupDelay=2e3,window.effectSpeed=1400,window.effectOffset=400,window.scrollSpeed=.8,window.effectOffset=600),window.stage=1,window.stages=$(".slide").length,n.hasClass("horizontal")&&(window.horizontalMode=1),n.hasClass("noPreload")&&(window.preload=0),n.hasClass("animated")?window.isAnimated="auto":n.hasClass("animateOnEvent")&&(window.isAnimated="animateOnEvent",window.isMobile&&(window.isAnimated="auto",n.removeClass("animateOnEvent").addClass("animated"))),window.isSimplifiedMobile&&window.isMobile&&(window.isAnimated=!1,n.removeClass("animated animateOnEvent"),$("[class*='ae-']").addClass("done")),window.isAnimated||(window.cleanupDelay=0),n.hasClass("smoothScroll")&&!window.isMobile&&(window.smoothScroll=1),a(),$(window).on("popstate",function(b){setTimeout(function(){a()},100),b.preventDefault()}),window.preload){var o=[];$("*").each(function(){"none"!==$(this).css("background-image")?o.push($(this).css("background-image").replace(/.*\s?url\([\'\"]?/,"").replace(/[\'\"]?\).*/,"")):$(this).is("img")&&o.push($(this).attr("src"))}),window.images=o.length,window.progressBar=$(".progress-bar"),$.cacheImage(o,{complete:function(){window.loadingProgress++,b()}}),b()}d(window.stage),$(".grid.masonry").masonry({itemSelector:"li",transitionDuration:"0.1s"}),$(".grid.masonry").imagesLoaded().progress(function(){$(".grid.masonry").masonry("layout")}),window.preload&&window.images&&!window.loaded||c(),window.loaded||$(window).on("load",function(){c()}),$(".animated").on("click","[class*='ae-']:not('.done')",function(){$(this).addClass("done")}),window.changeSlide=function(a){if("increase"===a?a=window.stage+1>=window.stages?window.stages:window.stage+1:"decrease"===a&&(a=window.stage-1<1?1:window.stage-1),window.isMobile&&window.isSimplifiedMobile||window.isScroll){window.stage=a;var b=$(".slide:eq("+(window.stage-1)+")"),c=$(b).offset().top;$("html,body").stop().clearQueue().animate({scrollTop:c},1e3)}else if(a!==window.stage&&a<=window.stages&&1!==window.inAction){window.inAction=1,window.stage=a;var f=0;$(".zoom-overlay-open").length>0&&(e(),f=550),setTimeout(function(){d(window.stage),setTimeout(function(){window.inAction=0},window.slideSpeed)},f)}},$(".nextSlide").on("click",function(){window.changeSlide("increase")}),$(".prevSlide").on("click",function(){window.changeSlide("decrease")}),$(".toFirstSlide").on("click",function(){window.changeSlide(1),history.pushState?window.history.pushState("","",location.href.split("#")[0]):window.location.hash="",i()}),$(".toLastSlide").on("click",function(){window.changeSlide(window.stages),history.pushState?window.history.pushState("","",location.href.split("#")[0]):window.location.hash="",i()}),$('[class*="toSlide-"]').on("click",function(){var a=parseInt($(this).attr("class").split("toSlide-")[1].split(" ")[0]);window.changeSlide(a),i()}),$(window).on("resize load ready",function(){$('[data-action="zoom"]').removeAttr("style"),$(".zoom-overlay").length>0&&e("fast"),window.windowHeight=$(window).height(),window.windowWidth=$(window).width(),window.documentHeight=$(document).height()});$("html,body").on("DOMMouseScroll mousewheel scroll touchmove",function(a){var b=$(".slide.selected .content"),c=Math.ceil(Math.abs(a.deltaY)*a.deltaFactor),d=window.isFirefox?2:1,e=window.isWindows?2*d:d,f=a.originalEvent.wheelDelta?a.originalEvent.wheelDelta:a.deltaY*a.deltaFactor,g=f*d*e,h=a.deltaY>=0?"up":"down",i=b.scrollTop(),j=b.find(".container").outerHeight(),k=detectZoom.device(),l=window.isFirefox&&window.isWindows?200:window.minScrollToSlide;if(c){if(window.isScroll&&!window.sidebarShown&&!window.popupShown&&!window.blockScroll)if(window.smoothScroll&&!window.isMobile){g>1500&&(g=1500),g<-1e3&&(g=-1500);var m=$(window),o=m.scrollTop(),p=o-g;TweenLite.to(m,window.scrollSpeed,{scrollTo:{y:p,autoKill:!1},ease:Power4.easeOut,overwrite:"all"})}else window.isWindows||b.scrollTop(i-g);window.isScroll||window.isMobile&&window.isSimplifiedMobile||(j>window.windowHeight&&("up"===h&&0===b.scrollTop()||"down"===h&&b.scrollTop()+window.windowHeight>=Math.floor(j/k)?window.allowSlide=1:window.allowSlide=0,window.panelsToHide&&("down"===h&&b.scrollTop()>0?n.addClass("hidePanel-top"):"up"===h&&n.removeClass("hidePanel-top"),n.addClass("hidePanel-bottom"),"down"===h&&b.scrollTop()+window.windowHeight>=Math.floor(j/k)?n.removeClass("hidePanel-bottom"):"up"===h&&n.addClass("hidePanel-bottom")),window.sidebarShown||window.popupShown||window.blockScroll||(window.smoothScroll?(g>1500&&(g=1500),g<-1e3&&(g=-1500),TweenLite.to(b,.5,{scrollTo:{y:i-g,autoKill:!1},ease:Power4.easeOut,overwrite:5})):(i="up"===h?i-c:i+c,b.scrollTop(i)))),window.allowSlide&&c&&("down"==h?window.collectScrolls=window.collectScrolls+c:window.collectScrolls=window.collectScrolls-c,setTimeout(function(){window.collectScrolls=0},200)),Math.abs(window.collectScrolls)>=l&&window.allowSlide&&!window.sidebarShown&&!window.popupShown&&!window.disableOnScroll&&(window.collectScrolls=0,("down"===h&&window.stage!==window.stages||"up"===h&&1!==window.stage)&&1!==window.inAction&&("down"===h?window.changeSlide("increase"):window.changeSlide("decrease"))))}}),(window.isMobile&&window.isSimplifiedMobile||window.isScroll)&&$(window).on("DOMMouseScroll mousewheel scroll touchmove load",function(){f()});var p=0;if($(".mobile .slides:not(.scroll):not(.simplifiedMobile), .slides.desktopSwipe").swipe({swipeStatus:function(a,b,c,d){window.allowSwipeUp=1,window.allowSwipeDown=1;var e=$(".slide.selected .content"),f=Math.floor(e.find(".container").outerHeight()),g="up",h="down",i=window.minSwipeToSlide,j=window.innerHeight;window.sidebarShown&&(e=$(".sidebar .content")),window.popupShown&&(e=$(".popup .content")),"start"===b&&(window.scrollTop=e.scrollTop()),window.horizontalMode&&(g="left",h="right"),!window.horizontalMode&&f>j&&(window.scrollTop+j0&&(window.allowSwipeDown=0)),window.sidebarShown||window.disableOnSwipe||(window.horizontalMode?c===g&&d>i?window.changeSlide("increase"):c===h&&d>i&&window.changeSlide("decrease"):c===g&&d>i&&window.allowSwipeUp&&window.allowSlide?window.changeSlide("increase"):c===h&&d>i&&window.allowSwipeDown&&window.allowSlide&&window.changeSlide("decrease"))},maxTimeThreshold:0,fingers:"all",allowPageScroll:"vertical"}),$(".slides.desktopSwipe *").on("click",function(){$(this).addClass("selectable")}),$(".panel .compact").length>0&&$(".panel .compact").each(function(a,b){var c=$(b).parents(".panel"),d=$(c).find(".desktop"),e=b,f=$(c).hasClass("forceMobileView");$(window).on("load resize ready",function(){var a=$(document).width(),b=parseInt($(c).css("padding-left").replace("px",""))+parseInt($(c).css("padding-right").replace("px",""));if((window.isMobile||$(document).width()<767)&&f)$(d).addClass("hidden"),$(e).removeClass("hidden");else{$(d).removeClass("hidden"),$(e).addClass("hidden");var g=0;d.children().each(function(){g+=$(this).outerWidth()>$(this).children().outerWidth()?Math.round($(this).outerWidth()):Math.round($(this).children().outerWidth()); 5 | }),g+Math.round(b)>a+2||(window.isMobile||a<767)&&f?($(d).addClass("hidden"),$(e).removeClass("hidden")):($(d).removeClass("hidden"),$(e).addClass("hidden"))}})}),$(".panel.hideOnScroll").length>0&&(window.panelsToHide=!0,window.isScroll||window.isSimplifiedMobile)){var q,r=0,s=window.hideOnScrollSensitivity?window.hideOnScrollSensitivity:100,t=$(".panel.hideOnScroll");$(window).on("mousewheel",function(a){var b=$(this).scrollTop(),c=$(t),d=Math.ceil(Math.abs(a.deltaY)*a.deltaFactor);b>q?(r+=d,r>=s&&(c.addClass("hide"),r=s)):(r-=d,r<=s/5&&(r=0,c.removeClass("hide"))),q=b,(b+window.windowHeight+s>=window.documentHeight||b+s<=0)&&c.removeClass("hide")})}$(document).on("keydown",function(a){var b=2.5,c=50,d=$(".slide.selected .content"),f=d.scrollTop(),g=f+parseInt(b*c);window.disableKeyNavigation||"input"==a.target.nodeName.toLowerCase()||"textarea"==a.target.nodeName.toLowerCase()||(37===a.keyCode&&(a.preventDefault(),window.horizontalMode&&window.changeSlide("decrease")),38===a.keyCode&&(window.horizontalMode?(a.preventDefault(),TweenLite.to(d,window.scrollSpeed,{scrollTo:{y:g,autoKill:!0},ease:Power4.easeOut,overwrite:5})):(a.preventDefault(),window.changeSlide("decrease"))),39===a.keyCode&&window.horizontalMode&&(a.preventDefault(),window.changeSlide("increase")),40===a.keyCode&&(window.horizontalMode?(a.preventDefault(),TweenLite.to(d,window.scrollSpeed,{scrollTo:{y:g,autoKill:!0},ease:Power4.easeOut,overwrite:5})):(a.preventDefault(),window.changeSlide("increase"))),27===a.keyCode&&(i(),m(),j(),e()))});var u=$(".navigation"),v=$(u).find("ul"),w=$(".slide:not(.exclude)").length;$(v).length>0&&($(v).is(":empty")&&$(v).each(function(a,b){for(var c=1;c<=w;c++){var d=$(".slide:not(.exclude):eq("+(c-1)+")").data("title");void 0===d?$(b).append("
  • "):$(b).append('
  • ')}}),$(".navigation li").on("click touchend",function(){var a=$(this).index(),b=$(".slide:not(.exclude):eq("+a+")").index(".slide");$(this).blur(),window.changeSlide(b+1)}),$(".side").hasClass("compact")||$(window).on("load resize ready",function(){var a=window.windowHeight-140,b=$(".side").removeClass("compact").find("ul"),c=0;$(b).children().each(function(){c+=Math.round($(this).outerHeight(!0))}),c>a?$(".side").addClass("compact"):$(".side").removeClass("compact")})),$("a[href^='#'][target!='_blank']").click(function(a){var b=$(this).attr("href"),c=b.split("#")[1],e=c?$('.slide[id="'+c+'"], .slide[data-name="'+c+'"]'):$(".slide:eq(0)");if(e.length>0){if(a.preventDefault(),window.isMobile&&window.isSimplifiedMobile||window.isScroll){var f=e;f.length&&$("html,body").stop().clearQueue().animate({scrollTop:f.position().top},1e3),window.setHashLink&&(window.location.hash=c)}else window.stage=$(".slide").index(e)+1,d(window.stage);i()}}),$(".sidebarTrigger[data-sidebar-id]").on("click",function(){var a=$(this).data("sidebar-id");window.showSidebar(a)}),window.showSidebar=function(a){var b=a,c=$('.sidebar[data-sidebar-id="'+b+'"]'),d=$(c).hasClass("animated");window.sidebarShown?i():c.length>0&&(window.sidebarShown=1,window.allowSlide=0,$(c).removeClass("animate active").addClass("visible"),$html.addClass("sidebarShown sidebar_"+b),$(c).find(".content").scrollTop(0),d&&(clearTimeout(window.removeAnimationTimeout),setTimeout(function(){$(c).addClass("animate active")},100))),m()},$(document).on("mouseup touchstart",function(a){var b=$(".sidebarShown .sidebar, .dropdownTrigger");!b.is(a.target)&&0===b.has(a.target).length&&window.hideSidebarOnBodyClick&&i()}),$('.sidebar .close, .sidebar [data-sidebar-action="close"]').on("click touchstart",function(){i()}),$(".popupTrigger[data-popup-id]").on("click",function(){var a=$(this).data("popup-id");window.showPopup(a)}),window.showPopup=function(a){var b=a,c=$('.popup[data-popup-id="'+b+'"]'),d=c.hasClass("animated");if(c.length>0&&(i(),$(c).addClass("visible"),$(window).trigger("popupShown"),d&&setTimeout(function(){$(c).addClass("animate active"),clearTimeout(window.clearPopupElementAnimation),window.clearPopupElementAnimation=setTimeout(function(){$(c).find("[class*='ae-']").addClass("done")},window.effectSpeed+window.cleanupDelay)},100),$html.addClass("popupShown popup_"+b),$(c).find(".content").scrollTop(0),window.allowSlide=0,window.popupShown||(window.popupShown=[]),window.popupShown.push(b),$(c).hasClass("autoplay"))){var e=$(c),f=e.find("iframe"),g=e.find("video");if(f.length>0){var h=$(f).attr("src")?$(f).attr("src"):$(f).data("src"),j=h.indexOf("?")>-1?"&":"?";$(f).attr("src",h+j+"autoplay=1")}else g.length>0&&$(g)[0].play()}m()},window.hidePopupOnBodyClick&&$(document).on("click",function(a){var b=$(".popupShown .popup .popupContent, .popupTrigger");!b.is(a.target)&&0===b.has(a.target).length&&b.length>0&&j()}),$('.popup [data-popup-action="close"]').on("click",function(){j($(this).parents(".popup").data("popup-id"))}),window.setPopupHash&&($(".popupTrigger[data-popup-id]").on("click",function(){var a=$(this).attr("data-popup-id");window.location.hash="#"+a}),window.setPopupHash=[],$(".popupTrigger").each(function(){var a=$(this).attr("data-popup-id");$.inArray(a,window.setPopupHash)==-1&&window.setPopupHash.push(a)}),$.inArray(window.location.hash.split("#")[1],window.setPopupHash)!==-1&&(setTimeout(function(){$('.popupTrigger[data-popup-id="'+window.location.hash.split("#")[1]+'"]').click()},500),$(window).on("popupHidden",function(){history.pushState?window.history.pushState("","",location.href.split("#")[0]):window.location.hash=""}))),$(window).on("resize load ready popupShown",function(){setTimeout(function(){k()},1)}),$(window).on("resize",function(){$html.addClass("resizing")}).on("resizeEnd",function(){$html.removeClass("resizing")});var x=$(".slider");$(x).length>0&&$(x).each(function(a,b){var c=$(b),d=c.data("slider-id"),e=c.find(".selected").index();if(window.sliderStatus&&$html.removeClassByPrefix("slider_"+d).addClass("slider_"+d+"_"+e),c.hasClass("autoplay")){var f=c.data("slider-interval")?parseInt(c.data("slider-interval")):5e3,g=setInterval(function(){c.trigger("next")},f);0!=c.data("slider-stoponclick")&&$('[data-slider-id="'+d+'"]').on("mousedown touchstart",function(){clearInterval(g)})}(c.hasClass("clickable")||c.hasClass("autoplay"))&&c.on("click next",function(a){var b=$(this),c=b.data("slider-id"),d=$('.slider[data-slider-id="'+c+'"]'),f=a.target;"cancel"!=$(f).data("slider-event")&&(d.each(function(){var a=$(this),b=a.data("slider-id"),c=a.children(".selected"),d=c.nextOrFirst("li"),e=d.index(),f=$('.controller[data-slider-id="'+b+'"]'),g=a.is(".animated, .animateOnEvent");c.removeClass("selected").addClass("hide").one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",function(){$(this).removeClass("hide")}),d.removeClass("hide").addClass("selected"),window.sliderStatus&&$html.removeClassByPrefix("slider_"+b).addClass("slider_"+b+"_"+e),g&&(a.addClass("animateOnEvent"),a.find("li").removeClassByPrefix("ae-").removeClass("do"),a.find(".selected").each(function(a){$(this).removeClassByPrefix("ae-").removeClass("do").addClass("ae-"+(a+1)).addClass("do")}),$(window).scroll()),b&&f.length>0&&f.each(function(){var a=$(this);a.children(".selected").removeClass("selected"),a.children("li:eq("+e+")").addClass("selected")})}),window.sliderStatus&&$html.removeClassByPrefix("slider_"+c).addClass("slider_"+c+"_"+e))})});var y=$(".controller");if(y.length>0){var z=y.data("controller-selector")?y.data("controller-selector"):"li";y.on("click",z,function(){var a=$(this),b=a.closest(".controller"),c=$(b.find(z)).index(a),d=b.data("slider-id"),e=$('.slider[data-slider-id="'+d+'"]'),f=$('.controller[data-slider-id="'+d+'"]');a.hasClass("selected")||(f.each(function(){var a=$(this);a.children(".selected").removeClass("selected"),a.children("li:eq("+c+")").addClass("selected")}),e.each(function(){var a=$(this),b=a.hasClass("animated");a.children(".selected").removeClass("selected").addClass("hide").one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",function(){$(this).removeClass("hide")}),a.children("li").eq(c).removeClass("hide").addClass("selected"),b&&(a.addClass("animateOnEvent"),a.find(">li").removeClassByPrefix("ae-").removeClass("do"),a.find(".selected").each(function(a){$(this).removeClassByPrefix("ae-").removeClass("do").addClass("ae-"+(a+1)).addClass("do")}),$(window).scroll())}),window.sliderStatus&&$html.removeClassByPrefix("slider_"+sliderID).addClass("slider_"+sliderID+"_"+c))})}$("[data-slider-action]").click(function(){if($(this).data("slider-id")){var a,b,c=$(this),d=c.data("slider-id"),e=c.data("slider-action"),f=$('.slider[data-slider-id="'+d+'"]'),g=$('.controller[data-slider-id="'+d+'"]');window.sliderStatus&&$html.removeClassByPrefix("slider_"+d).addClass("slider_"+d+"_"+b),f.each(function(){var c=$(this),d=(g.data("controller-selector")?g.data("controller-selector"):"li",c.find(".selected")),f=c.hasClass("animated");"next"===e?a=d.nextOrFirst("li"):"prev"===e?a=d.prevOrLast("li"):(parseInt(e)||0===e)&&(b=parseInt(e),a=c.find(">li:eq("+b+")")),b=a.index(),d.removeClass("selected"),a.removeClass("hide").addClass("selected"),f&&(c.addClass("animateOnEvent"),c.find("li").removeClassByPrefix("ae-").removeClass("do"),c.find(".selected").each(function(a){$(this).removeClassByPrefix("ae-").removeClass("do").addClass("ae-"+(a+1)).addClass("do")}),$(window).scroll())}),g.each(function(){var a=$(this);d&&a.length>0&&(a.find(".selected").removeClass("selected").addClass("hide").one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",function(){c.removeClass("hide")}),a.find(z).eq(b).addClass("selected"))})}}),$("[data-slider-id].autoHeight").each(function(a,b){$(window).on("click resize load ready next",function(){var a=0;$(b).find(".selected");$(b).find(".selected").children().each(function(){a+=Math.round($(this).outerHeight(!0))}),$(b).height(a+"px")})}),$(".slider.clickable[data-slider-id], .controller[data-slider-id]").on("click",function(a){"cancel"!=$(a.target).data("slider-event")&&$(window).resize()}),window.dropdownShown=!1,$(".dropdownTrigger").on("click",function(){l($(this))}),$(".dropdownTrigger.hover").hover(function(){l($(this),"hover")}),$(window).on("resize",function(){m()}),$(document).on("mouseup touchstart",function(a){var b=$(".dropdownShown .dropdown");!b.is(a.target)&&0===b.has(a.target).length&&window.dropdownShown&&m()}),window.shareUrl=window.location.href,$(".share").data("url")&&(window.shareUrl=$(".dropdown").data("url")),window.shareText=document.title,$(".share").data("text")&&(window.shareText=$(".dropdown").data("url")),$(".share").sharrre({enableHover:!1,url:window.shareUrl,text:window.shareText,enableCounter:!1,share:{twitter:!0,facebook:!0,pinterest:!0,googlePlus:!0,stumbleupon:!0,linkedin:!0},buttons:{pinterest:{media:$(".dropdown").data("pinterest-image"),description:$(".dropdown").data("text")+" "+$(".dropdown").data("url")}},template:$(".share").html(),render:function(a){$(a.element).on("click touchstart",".social-twitter",function(){a.openPopup("twitter")}),$(a.element).on("click touchstart",".social-facebook",function(){a.openPopup("facebook")}),$(a.element).on("click touchstart",".social-pinterest",function(){a.openPopup("pinterest")}),$(a.element).on("click touchstart",".social-googlePlus",function(){a.openPopup("googlePlus")}),$(a.element).on("click touchstart",".social-stumbleupon",function(){a.openPopup("stumbleupon")}),$(a.element).on("click touchstart",".social-linkedin",function(){a.openPopup("linkedin")}),$(a.element).on("click touchstart",".mail",function(){var a=$(this).data("subject")?$(this).data("subject"):"",b=$(this).data("body")?$(this).data("body"):"",c=$(".dropdown").data("url")?$(".dropdown").data("url"):window.location.href;window.location.href="mailto:?subject="+encodeURIComponent(a)+"&body="+encodeURIComponent(b)+"%20"+c})}}),$(".dialogTrigger[data-dialog-id]").on("click",function(){var a=$(this).data("dialog-id");window.showDialog(a)}),window.showDialog=function(a){var b=a,c=$('.dialog[data-dialog-id="'+b+'"]');c.is(":visible")||c.addClass("reveal").slideDown(500,function(){$(this).removeClass("reveal").removeClass("hidden")})},$('.dialog [data-dialog-action="close"], .dialog [data-dialog-action="hide"]').on("click",function(){var a=$(this).parents(".dialog"),b=$(this).data("dialog-action"),c=a.data("dialog-id"),d=a.data("set-cookie"),e=a.data("cookie-name")?a.data("cookie-name"):c,f=!a.data("cookie-value")||a.data("cookie-value"),g=a.data("cookie-path");a.addClass("hide").slideUp(500,function(){$(this).removeClass("hide"),d&&"close"==b&&$.cookie(e,f,{expires:d,path:g})})}),$(".dialog[data-set-cookie]").each(function(a,b){var c=$(b).data("dialog-id"),d=$(b).data("cookie-name")?$(b).data("cookie-name"):c;!$(b).data("cookie-value")||$(b).data("cookie-value");$.cookie(d)&&$(b).hide()}),$(".dialog [data-href]").on("click",function(){$(this).data("target")?window.open($(this).data("href"),"_blank"):window.location=$(this).data("href")}),$(".dialog.hidden[data-dialog-delay]").each(function(){var a=parseFloat($(this).attr("data-dialog-delay")),b=$(this);isNaN(a)||setTimeout(function(){b.addClass("reveal").slideDown(500,function(){$(this).removeClass("reveal").removeClass("hidden")})},a)}),$(".dialog[data-dialog-hide-delay]").each(function(){var a=parseFloat($(this).attr("data-dialog-hide-delay")),b=$(this);isNaN(a)||setTimeout(function(){b.addClass("hide").slideUp(500,function(){$(this).removeClass("hide")})},a)}),$('.dialog [data-type="submit"]').click(function(){$(this).parents("form").submit()}),$("#contact-form, [data-ajax-form]").each(function(a,b){$(b).ajaxForm(function(){var a=$(b),c=$(b).find('[type="submit"]'),d=!!c.is("input"),e=c.data("success-text")?c.data("success-text"):"Done!",f=c.data("success-class")?c.data("success-class"):"green",g=d?c.val():c.html(),h=c.attr("class");d?c.val(e):c.text(e),c.addClass(f),setTimeout(function(){d?c.val(g):c.html(g),c.attr("class",h),a[0].reset()},4e3)})}),$("audio[data-sound-id]").each(function(a,b){var c=$(b),d=c.data("sound-id"),e=c[0],f=$('.soundTrigger[data-sound-id="'+d+'"]');e.autoplay?f.addClass("playing"):f.removeClass("playing")}),$(".soundTrigger").click(function(){var a=$(this).data("sound-id"),b=$('audio[data-sound-id="'+a+'"]'),c=b.data("sound-action")?b.data("sound-action"):"toggle",d=parseInt(b.data("sound-fade"))>=0||b.data("sound-fade")?parseInt(b.data("sound-fade")):500;!b[0].paused||"toggle"!==c&&"play"!==c?"toggle"!==c&&"pause"!==c||(b.animate({volume:0},d,function(){b[0].pause()}),$(this).removeClass("playing")):(b[0].play(),b.animate({volume:1},d),$(this).addClass("playing"))})}),window.isMobile=!1,/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&(window.isMobile=!0),window.isMobile?$html.addClass("mobile"):$html.addClass("desktop"),window.isFirefox=navigator.userAgent.toLowerCase().indexOf("firefox")>-1,window.isSafari=/^((?!chrome).)*safari/i.test(navigator.userAgent),window.isChrome=/chrom(e|ium)/.test(navigator.userAgent.toLowerCase()),window.isChromeiOS=navigator.userAgent.match("CriOS"),window.isMSIE=navigator.userAgent.match("MSIE"),window.isEdge=navigator.userAgent.match("Edge"),window.isAndroid=navigator.userAgent.toLowerCase().indexOf("android")>-1,window.isiPad=null!==navigator.userAgent.match(/iPad/i),window.isWindows=navigator.platform.toUpperCase().indexOf("WIN")!==-1,window.isOSX=navigator.platform.toUpperCase().indexOf("MAC")!==-1,window.isLinux=navigator.platform.toUpperCase().indexOf("LINUX")!==-1,window.isSafari&&$html.addClass("safari"),window.isFirefox&&$html.addClass("firefox"),window.isChrome&&$html.addClass("chrome"),window.isMSIE&&$html.addClass("msie"),window.isEdge&&$html.addClass("edge"),window.isAndroid&&$html.addClass("android"),window.isWindows&&$html.addClass("windows"),window.isOSX&&$html.addClass("osx"),window.isLinux&&$html.addClass("linux"),window.isRetina=window.matchMedia&&(window.matchMedia("only screen and (min-resolution: 124dpi), only screen and (min-resolution: 1.3dppx), only screen and (min-resolution: 48.8dpcm)").matches||window.matchMedia("only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (-o-min-device-pixel-ratio: 2.6/2), only screen and (min--moz-device-pixel-ratio: 1.3), only screen and (min-device-pixel-ratio: 1.3)").matches)||window.devicePixelRatio&&window.devicePixelRatio>1.3,window.isRetina&&$html.addClass("retina"); -------------------------------------------------------------------------------- /main/templates/main/about.html: -------------------------------------------------------------------------------- 1 | {% extends 'main/header.html' %} 2 | {% block title %}About us | Developers!{% endblock %} 3 | {% block content %} 4 | 5 | 6 | 7 | 8 | 9 |
    10 | 11 | 13 |
    14 | 15 | 16 |
    17 |

    About Us

    18 |

    Welcome to the blog of Developers

    19 |
    20 | 21 | 22 |
    23 | 24 | 25 |
    26 | 27 |
    28 | {% load static %} 29 | Nature 30 |
    31 |

    THIS PROJECT

    32 |
    Introduction to idea, July 5, 2019
    33 |
    34 | 35 |
    36 |

    The tours and travel prediction system is a web based application. The main purpose of “Tours and Travels Prediction System ” is to provide a convenient way for a customer to availability of book hotels, flight, train and bus for tour purposes on the basis of upcoming population prediction. 37 |

    38 |
    39 |
    40 |

    41 |
    42 |
    43 |

    Comments   0

    44 |
    45 |
    46 |
    47 |
    48 |
    49 | 50 | 51 |
    52 | Norway 53 |
    54 |

    BLOG ENTRY

    55 |
    Title description, July 2, 2019
    56 |
    57 | 58 |
    59 |

    Mauris neque quam, fermentum ut nisl vitae, convallis maximus nisl. Sed mattis nunc id lorem euismod placerat. Vivamus porttitor magna enim, ac accumsan tortor cursus at. Phasellus sed ultricies mi non congue ullam corper. Praesent tincidunt sed 60 | tellus ut rutrum. Sed vitae justo condimentum, porta lectus vitae, ultricies congue gravida diam non fringilla.

    61 |
    62 |
    63 |

    64 |
    65 |
    66 |

    Comments   2

    67 |
    68 |
    69 |
    70 |
    71 | 72 |
    73 | 74 | 75 |
    76 | 77 |
    78 | 79 | 80 |
    81 |

    Team

    82 |

    Just we, exploring the universe of Django. We have a heart of love and a interest of Web Development and Data Analysis. We want to share our world with you.

    83 |
    84 |

    85 | 86 | 87 |
    88 |
    89 |

    Developers

    90 |
    91 |
      92 |
    • 93 | Image 94 | Neha Dubey
      95 | CSED UCEM 96 |
    • 97 |
    • 98 | Image 99 | Priya Srivastava
      100 | CSED UCEM 101 |
    • 102 |
    • 103 | Image 104 | Samridhhi Srivastava
      105 | CSED UCEM 106 |
    • 107 |
    • 108 | Image 109 | Satish Kr Yadav
      110 | CSED UCEM 111 |
    • 112 |
    • 113 | Image 114 | Satyendra Giri
      115 | CSED UCEM 116 |
    • 117 |
    118 |
    119 |
    120 | 121 | 122 |
    123 | 124 | 125 |

    126 | 127 | 128 |
    129 | 130 |
    131 | 132 | {% endblock %} -------------------------------------------------------------------------------- /main/templates/main/header.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | {% load static %} 8 | 9 | {% block title %}{% endblock %} 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | {% include 'main/includes/messaging.html' %} 58 | 59 | {% include 'main/includes/navbar.html' %} 60 | 61 | {% block content %} 62 | 63 | {% endblock %} 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /main/templates/main/includes/messaging.html: -------------------------------------------------------------------------------- 1 | {% if messages %} 2 | {% for message in messages %} 3 | {% if message.tags == 'success'%} 4 | 5 | {% elif message.tags == 'info'%} 6 | 7 | {% elif message.tags == 'warning'%} 8 | 9 | {% elif message.tags == 'error'%} 10 | 11 | {% endif %} 12 | {% endfor %} 13 | {% endif %} 14 | 15 | -------------------------------------------------------------------------------- /main/templates/main/includes/navbar.html: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 16 |
      17 | {% include 'main/includes/navbar_buttons.html' %} 18 |
    -------------------------------------------------------------------------------- /main/templates/main/includes/navbar_buttons.html: -------------------------------------------------------------------------------- 1 |
  • homeHome
  • 2 | 3 | 4 | {% if user.is_authenticated %} 5 | 6 |
  • 7 | {{user.username}} 8 | 9 | 10 | 18 |
  • 19 | 20 |
  • group_workLogout
  • 22 | 23 | {% else %} 24 |
  • helpHow-to-use
  • 25 |
  • group_workLogin
  • 27 |
  • domainAbout
  • 28 | {% endif %} -------------------------------------------------------------------------------- /main/templates/main/index1.html: -------------------------------------------------------------------------------- 1 | {% extends 'main/header.html' %} 2 | {% block title %}Home{% endblock %} 3 | 4 | {% block content %} 5 | {% load static %} 6 | 7 |
    8 |
    9 |
    10 |
    11 |
    12 | 13 |

    14 | 15 |

    Tours And Travels Prediction System

    16 |
    17 |
    Feel The Power Of Machine Learning And Grab The Market . 18 | Get the fastest result with 93.5% accuracy 19 |
    20 | 21 |

    22 |
    23 | Get Started 24 |
    25 |
    26 |
    27 |
    28 |
    29 | 30 |
    31 |
    32 | {% endblock %} 33 | -------------------------------------------------------------------------------- /main/templates/main/index2.html: -------------------------------------------------------------------------------- 1 | {% extends 'main/header.html' %} 2 | {% block title %}To be{% endblock %} 3 | 4 | {% block content %} 5 | {% load static %} 6 | 7 |
    8 |
    9 |
    10 |
    11 | 12 |
    13 |
    14 |
    15 | {% csrf_token %} 16 | {{ form}} 17 | 18 | 19 | 20 |
    21 |
    22 |
    23 | 24 |
    25 |
    26 |
    27 | 28 |
    29 | 30 |
    31 | {% endblock %} 32 | -------------------------------------------------------------------------------- /main/templates/main/predict.html: -------------------------------------------------------------------------------- 1 | {% extends 'main/header.html' %} 2 | {% block title %}Prediction{% endblock %} 3 | 4 | {% block content %} 5 | {% load static %} 6 | 7 |
    8 |
    9 |
    10 |
    11 | 12 |
    13 |
    14 |

    The tourist expected are: {{tourist}}

    15 | 16 | 18 | 20 |
    17 | 19 |
    21 |
    22 |
    23 | 24 |
    25 |
    26 |
    27 | 28 |
    29 | 30 |
    31 | {% endblock %} 32 | -------------------------------------------------------------------------------- /main/templates/main/under_construction.html: -------------------------------------------------------------------------------- 1 | {% extends 'main/header.html' %} 2 | {% block title %}Stop | Under Construction{% endblock %} 3 | 4 | {% block content %} 5 |

    {{pagename}}

    6 |
    7 | 8 | {% load static %} 9 | 10 | 11 |
    12 | {% endblock %} -------------------------------------------------------------------------------- /main/testing.py: -------------------------------------------------------------------------------- 1 | import ml_model 2 | 3 | x = [-1.380899, -0.638146, 1.315741, -1.325480, -0.231486, 0.081364, -0.319305, 0.380] 4 | print(ml_model.logic_layer(x)) 5 | input() 6 | input() 7 | input() -------------------------------------------------------------------------------- /main/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /main/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from . import views 3 | 4 | app_name = "main" 5 | 6 | urlpatterns = [ 7 | path('', views.index, name="index"), 8 | path('index2', views.index2, name="index2"), 9 | path('predict', views.predict, name="predict"), 10 | path('about/', views.about, name="about"), 11 | path('under_construction', views.under_construction, name="under_construction"), 12 | ] 13 | -------------------------------------------------------------------------------- /main/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render, redirect 2 | from django.http import HttpResponse, HttpResponseRedirect 3 | from .forms import ContactForm, TourismForm 4 | from .ml_model import logic_layer 5 | from django.contrib import messages 6 | # Create your views here. 7 | res = None 8 | 9 | def index(request): 10 | return render(request=request, 11 | template_name='main/index1.html') 12 | 13 | def predict(request): 14 | return render(request=request, 15 | template_name='main/predict.html', context={"tourist": res}) 16 | 17 | 18 | def index2(request): 19 | if request.method == 'POST': 20 | form = TourismForm(request.POST) 21 | 22 | if form.is_valid(): 23 | 24 | year = form.cleaned_data['year'] 25 | duration = form.cleaned_data['duration'] 26 | spends = form.cleaned_data['spends'] / 1000 27 | mode = int(form.cleaned_data['mode']) 28 | purpose = int(form.cleaned_data['purpose']) 29 | quarter = int(form.cleaned_data['quarter']) 30 | country = int(form.cleaned_data['country']) 31 | 32 | x = [quarter, mode, purpose, year, duration, country, spends, 0.38] 33 | global res 34 | res = logic_layer(x) 35 | return redirect("/predict") 36 | else: 37 | problem = form.errors.as_data() 38 | # This section is used to handle invalid data 39 | messages.error(request, list(list(problem.values())[0][0])[0]) 40 | form = TourismForm() 41 | form = TourismForm() 42 | return render(request=request, template_name='main/index2.html', context={"form": form}) 43 | 44 | 45 | def about(request): 46 | return render(request=request, 47 | template_name="main/about.html") 48 | 49 | 50 | def under_construction(request): 51 | messages.info(request, "This page coming soon..") 52 | return render(request=request, 53 | template_name="main/under_construction.html") -------------------------------------------------------------------------------- /main/xgboost_model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/main/xgboost_model.pkl -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | 7 | def main(): 8 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ttps.settings') 9 | try: 10 | from django.core.management import execute_from_command_line 11 | except ImportError as exc: 12 | raise ImportError( 13 | "Couldn't import Django. Are you sure it's installed and " 14 | "available on your PYTHONPATH environment variable? Did you " 15 | "forget to activate a virtual environment?" 16 | ) from exc 17 | execute_from_command_line(sys.argv) 18 | 19 | 20 | if __name__ == '__main__': 21 | main() 22 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Django==2.2.4 2 | joblib==0.13.2 3 | numpy==1.16.4 4 | pandas==0.24.2 5 | python-dateutil==2.8.0 6 | pytz==2019.1 7 | scikit-learn==0.21.2 8 | scipy==1.3.0 9 | six==1.12.0 10 | sklearn==0.0 11 | sqlparse==0.3.0 12 | xgboost==0.90 13 | -------------------------------------------------------------------------------- /ttps/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/ttps/__init__.py -------------------------------------------------------------------------------- /ttps/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/ttps/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /ttps/__pycache__/settings.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/ttps/__pycache__/settings.cpython-37.pyc -------------------------------------------------------------------------------- /ttps/__pycache__/urls.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/ttps/__pycache__/urls.cpython-37.pyc -------------------------------------------------------------------------------- /ttps/__pycache__/wsgi.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Risk-taker0501/Django_ML_Project/9111f120f5e7648bc6e23ba60232437ad29bd62c/ttps/__pycache__/wsgi.cpython-37.pyc -------------------------------------------------------------------------------- /ttps/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for ttps project. 3 | 4 | Generated by 'django-admin startproject' using Django 2.2.1. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/2.2/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/2.2/ref/settings/ 11 | """ 12 | 13 | import os 14 | 15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 17 | 18 | 19 | # Quick-start development settings - unsuitable for production 20 | # See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/ 21 | 22 | # SECURITY WARNING: keep the secret key used in production secret! 23 | SECRET_KEY = '(u!04(j4tr$*xgt5gx@)4royb_dr=b)*(%uuov*jz8zoi3-h3o' 24 | 25 | # SECURITY WARNING: don't run with debug turned on in production! 26 | DEBUG = True 27 | 28 | ALLOWED_HOSTS = [] 29 | 30 | 31 | # Application definition 32 | 33 | INSTALLED_APPS = [ 34 | 'django.contrib.admin', 35 | 'django.contrib.auth', 36 | 'django.contrib.contenttypes', 37 | 'django.contrib.sessions', 38 | 'django.contrib.messages', 39 | 'django.contrib.staticfiles', 40 | 'main.apps.MainConfig', 41 | ] 42 | 43 | MIDDLEWARE = [ 44 | 'django.middleware.security.SecurityMiddleware', 45 | 'django.contrib.sessions.middleware.SessionMiddleware', 46 | 'django.middleware.common.CommonMiddleware', 47 | 'django.middleware.csrf.CsrfViewMiddleware', 48 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 49 | 'django.contrib.messages.middleware.MessageMiddleware', 50 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 51 | ] 52 | 53 | ROOT_URLCONF = 'ttps.urls' 54 | 55 | TEMPLATES = [ 56 | { 57 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 58 | 'DIRS': [], 59 | 'APP_DIRS': True, 60 | 'OPTIONS': { 61 | 'context_processors': [ 62 | 'django.template.context_processors.debug', 63 | 'django.template.context_processors.request', 64 | 'django.contrib.auth.context_processors.auth', 65 | 'django.contrib.messages.context_processors.messages', 66 | ], 67 | }, 68 | }, 69 | ] 70 | 71 | WSGI_APPLICATION = 'ttps.wsgi.application' 72 | 73 | 74 | # Database 75 | # https://docs.djangoproject.com/en/2.2/ref/settings/#databases 76 | 77 | DATABASES = { 78 | 'default': { 79 | 'ENGINE': 'django.db.backends.sqlite3', 80 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 81 | } 82 | } 83 | 84 | 85 | # Password validation 86 | # https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators 87 | 88 | AUTH_PASSWORD_VALIDATORS = [ 89 | { 90 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 91 | }, 92 | { 93 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 94 | }, 95 | { 96 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 97 | }, 98 | { 99 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 100 | }, 101 | ] 102 | 103 | 104 | # Internationalization 105 | # https://docs.djangoproject.com/en/2.2/topics/i18n/ 106 | 107 | LANGUAGE_CODE = 'en-us' 108 | 109 | TIME_ZONE = 'Asia/Kolkata' 110 | 111 | USE_I18N = True 112 | 113 | USE_L10N = True 114 | 115 | USE_TZ = True 116 | 117 | 118 | # Static files (CSS, JavaScript, Images) 119 | # https://docs.djangoproject.com/en/2.2/howto/static-files/ 120 | 121 | STATIC_URL = '/static/' 122 | -------------------------------------------------------------------------------- /ttps/urls.py: -------------------------------------------------------------------------------- 1 | """ttps URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/2.2/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.urls import include, path 14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 15 | """ 16 | from django.contrib import admin 17 | from django.urls import path, include 18 | 19 | urlpatterns = [ 20 | path('admin/', admin.site.urls), 21 | path('', include('main.urls')), 22 | ] 23 | -------------------------------------------------------------------------------- /ttps/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for ttps project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ttps.settings') 15 | 16 | application = get_wsgi_application() 17 | --------------------------------------------------------------------------------