diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 00000000..685c0635
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,18 @@
+# EditorConfig is awesome: http://EditorConfig.org
+
+# top-most EditorConfig file
+root = true
+
+# Unix-style newlines with a newline ending every file
+[*]
+charset = utf-8
+end_of_line = lf
+trim_trailing_whitespace = true
+insert_final_newline = true
+indent_style = space
+indent_size = 4
+
+# 2 space indentation
+[*.yaml, *.yml]
+indent_style = space
+indent_size = 2
diff --git a/.gitignore b/.gitignore
index 0c7037ec..91b5e29e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,5 @@
themes/grav/.sass-cache
.DS_Store
+
+# Node Modules
+**/node_modules/**
diff --git a/admin.php b/admin.php
index a44443d6..6c952952 100644
--- a/admin.php
+++ b/admin.php
@@ -571,7 +571,7 @@ class AdminPlugin extends Plugin
$this->theme = $this->config->get('plugins.admin.theme', 'grav');
$assets = $this->grav['assets'];
- $translations = 'if (!window.translations) window.translations = {}; ' . PHP_EOL . 'window.translations.PLUGIN_ADMIN = {};' . PHP_EOL;
+ $translations = 'this.GravAdmin = this.GravAdmin || {}; if (!this.GravAdmin.translations) this.GravAdmin.translations = {}; ' . PHP_EOL . 'this.GravAdmin.translations.PLUGIN_ADMIN = {';
// Enable language translations
$translations_actual_state = $this->config->get('system.languages.translations');
@@ -597,13 +597,16 @@ class AdminPlugin extends Plugin
'DAYS',
'PAGE_MODES',
'PAGE_TYPES',
- 'ACCESS_LEVELS'
+ 'ACCESS_LEVELS',
+ 'NOTHING_TO_SAVE'
];
foreach($strings as $string) {
- $translations .= 'translations.PLUGIN_ADMIN.' . $string .' = "' . $this->admin->translate('PLUGIN_ADMIN.' . $string) . '"; ' . PHP_EOL;;
+ $separator = (end($strings) === $string) ? '' : ',';
+ $translations .= '"' . $string .'": "' . $this->admin->translate('PLUGIN_ADMIN.' . $string) . '"' . $separator;
}
+ $translations .= '};';
// set the actual translations state back
$this->config->set('system.languages.translations', $translations_actual_state);
diff --git a/classes/controller.php b/classes/controller.php
index 40f3bbbf..3982a843 100644
--- a/classes/controller.php
+++ b/classes/controller.php
@@ -447,6 +447,7 @@ class AdminController
'message' => $this->admin->translate('PLUGIN_ADMIN.YOUR_BACKUP_IS_READY_FOR_DOWNLOAD') . '. ' . $this->admin->translate('PLUGIN_ADMIN.DOWNLOAD_BACKUP') .' ',
'toastr' => [
'timeOut' => 0,
+ 'extendedTimeOut' => 0,
'closeButton' => true
]
];
@@ -576,7 +577,7 @@ class AdminController
foreach ($page->media()->all() as $name => $media) {
$media_list[$name] = ['url' => $media->cropZoom(150, 100)->url(), 'size' => $media->get('size')];
}
- $this->admin->json_response = ['status' => 'ok', 'results' => $media_list];
+ $this->admin->json_response = ['status' => 'success', 'results' => $media_list];
return true;
}
@@ -646,6 +647,7 @@ class AdminController
return false;
}
+ Cache::clearCache();
$this->admin->json_response = ['status' => 'success', 'message' => $this->admin->translate('PLUGIN_ADMIN.FILE_UPLOADED_SUCCESSFULLY')];
return true;
@@ -675,6 +677,7 @@ class AdminController
if (file_exists($targetPath)) {
if (unlink($targetPath)) {
+ Cache::clearCache();
$this->admin->json_response = ['status' => 'success', 'message' => $this->admin->translate('PLUGIN_ADMIN.FILE_DELETED') . ': '.$filename];
} else {
$this->admin->json_response = ['status' => 'error', 'message' => $this->admin->translate('PLUGIN_ADMIN.FILE_COULD_NOT_BE_DELETED') . ': '.$filename];
@@ -701,6 +704,7 @@ class AdminController
}
if ($deletedResponsiveImage) {
+ Cache::clearCache();
$this->admin->json_response = ['status' => 'success', 'message' => $this->admin->translate('PLUGIN_ADMIN.FILE_DELETED') . ': '.$filename];
} else {
$this->admin->json_response = ['status' => 'error', 'message' => $this->admin->translate('PLUGIN_ADMIN.FILE_NOT_FOUND') . ': '.$filename];
@@ -887,9 +891,9 @@ class AdminController
$result = \Grav\Plugin\Admin\Gpm::selfupgrade();
if ($result) {
- $this->admin->json_response = ['status' => 'success', 'message' => $this->admin->translate('PLUGIN_ADMIN.GRAV_WAS_SUCCESSFULLY_UPDATED_TO') . ' '];
+ $this->admin->json_response = ['status' => 'success', 'type' => 'updategrav', 'version' => GRAV_VERSION, 'message' => $this->admin->translate('PLUGIN_ADMIN.GRAV_WAS_SUCCESSFULLY_UPDATED_TO') . ' ' . GRAV_VERSION];
} else {
- $this->admin->json_response = ['status' => 'error', 'message' => $this->admin->translate('PLUGIN_ADMIN.GRAV_UPDATE_FAILED') . ' ' . Installer::lastErrorMsg()];
+ $this->admin->json_response = ['status' => 'error', 'type' => 'updategrav', 'version' => GRAV_VERSION, 'message' => $this->admin->translate('PLUGIN_ADMIN.GRAV_UPDATE_FAILED') . ' ' . Installer::lastErrorMsg()];
}
return true;
@@ -935,9 +939,9 @@ class AdminController
if ($this->view === 'update') {
if ($result) {
- $this->admin->json_response = ['status' => 'success', 'message' => $this->admin->translate('PLUGIN_ADMIN.EVERYTHING_UPDATED')];
+ $this->admin->json_response = ['status' => 'success', 'type' => 'update', 'message' => $this->admin->translate('PLUGIN_ADMIN.EVERYTHING_UPDATED')];
} else {
- $this->admin->json_response = ['status' => 'error', 'message' => $this->admin->translate('PLUGIN_ADMIN.UPDATES_FAILED')];
+ $this->admin->json_response = ['status' => 'error', 'type' => 'update', 'message' => $this->admin->translate('PLUGIN_ADMIN.UPDATES_FAILED')];
}
} else {
diff --git a/classes/popularity.php b/classes/popularity.php
index e2a583e5..f56887c1 100644
--- a/classes/popularity.php
+++ b/classes/popularity.php
@@ -130,7 +130,7 @@ class Popularity
$data[] = $count;
}
- return array('labels' => json_encode($labels), 'data' => json_encode($data));
+ return array('labels' => $labels, 'data' => $data);
}
/**
diff --git a/languages/en.yaml b/languages/en.yaml
index 5d76495b..93303f13 100644
--- a/languages/en.yaml
+++ b/languages/en.yaml
@@ -467,11 +467,13 @@ PLUGIN_ADMIN:
HIDE_HOME_IN_URLS: "Hide home route in URLs"
HIDE_HOME_IN_URLS_HELP: "Will ensure the default routes for any pages under home do not reference home's regular route"
TWIG_FIRST: "Process Twig First"
- TWIG_FIRST_HELP: "If you enabled Twig page processing, then you can configure Twig to process before or after markdown"
+ TWIG_FIRST_HELP: "If you enabled Twig page processing, then you can configure Twig to process before or after markdown"
SESSION_SECURE: "Secure"
SESSION_SECURE_HELP: "If true, indicates that communication for this cookie must be over an encrypted transmission. WARNING: Enable this only on sites that run exclusively on HTTPS"
SESSION_HTTPONLY: "HTTP Only"
SESSION_HTTPONLY_HELP: "If true, indicates that cookies should be used only over HTTP, and JavaScript modification is not allowed"
REVERSE_PROXY: "Reverse Proxy"
REVERSE_PROXY_HELP: "Enable this if you are behind a reverse proxy and you are having trouble with URLs containing incorrect ports"
- INVALID_FRONTMATTER_COULD_NOT_SAVE: "Invalid frontmatter, could not save"
\ No newline at end of file
+ INVALID_FRONTMATTER_COULD_NOT_SAVE: "Invalid frontmatter, could not save"
+ NOTHING_TO_SAVE: "Nothing to Save"
+
diff --git a/themes/grav/.eslintrc b/themes/grav/.eslintrc
new file mode 100644
index 00000000..4f728439
--- /dev/null
+++ b/themes/grav/.eslintrc
@@ -0,0 +1,181 @@
+{
+ "env": {
+ "browser": true,
+ "node": true
+ },
+
+ "ecmaFeatures": {
+ "arrowFunctions": true,
+ "destructuring": true,
+ "classes": true,
+ "defaultParams": true,
+ "blockBindings": true,
+ "modules": true,
+ "objectLiteralComputedProperties": true,
+ "objectLiteralShorthandMethods": true,
+ "objectLiteralShorthandProperties": true,
+ "restParams": true,
+ "spread": true,
+ "forOf": true,
+ "generators": true,
+ "templateStrings": true,
+ "superInFunctions": true,
+ "experimentalObjectRestSpread": true
+ },
+
+ "rules": {
+ "accessor-pairs": 2,
+ "array-bracket-spacing": 0,
+ "block-scoped-var": 0,
+ "brace-style": [2, "1tbs", { "allowSingleLine": true }],
+ "camelcase": 0,
+ "comma-dangle": [2, "never"],
+ "comma-spacing": [2, { "before": false, "after": true }],
+ "comma-style": [2, "last"],
+ "complexity": 0,
+ "computed-property-spacing": 0,
+ "consistent-return": 0,
+ "consistent-this": 0,
+ "constructor-super": 2,
+ "curly": [2, "multi-line"],
+ "default-case": 0,
+ "dot-location": [2, "property"],
+ "dot-notation": 0,
+ "eol-last": 2,
+ "eqeqeq": [2, "allow-null"],
+ "func-names": 0,
+ "func-style": 0,
+ "generator-star-spacing": [2, { "before": true, "after": true }],
+ "guard-for-in": 0,
+ "handle-callback-err": [2, "^(err|error)$" ],
+ "indent": [2, 4, { "SwitchCase": 1 }],
+ "key-spacing": [2, { "beforeColon": false, "afterColon": true }],
+ "linebreak-style": 0,
+ "lines-around-comment": 0,
+ "max-nested-callbacks": 0,
+ "new-cap": [2, { "newIsCap": true, "capIsNew": false }],
+ "new-parens": 2,
+ "newline-after-var": 0,
+ "no-alert": 0,
+ "no-array-constructor": 2,
+ "no-caller": 2,
+ "no-catch-shadow": 0,
+ "no-cond-assign": 2,
+ "no-console": 0,
+ "no-constant-condition": 0,
+ "no-continue": 0,
+ "no-control-regex": 2,
+ "no-debugger": 2,
+ "no-delete-var": 2,
+ "no-div-regex": 0,
+ "no-dupe-args": 2,
+ "no-dupe-keys": 2,
+ "no-duplicate-case": 2,
+ "no-else-return": 0,
+ "no-empty": 0,
+ "no-empty-character-class": 2,
+ "no-empty-label": 2,
+ "no-eq-null": 0,
+ "no-eval": 2,
+ "no-ex-assign": 2,
+ "no-extend-native": 2,
+ "no-extra-bind": 2,
+ "no-extra-boolean-cast": 2,
+ "no-extra-parens": 0,
+ "no-extra-semi": 0,
+ "no-fallthrough": 2,
+ "no-floating-decimal": 2,
+ "no-func-assign": 2,
+ "no-implied-eval": 2,
+ "no-inline-comments": 0,
+ "no-inner-declarations": [2, "functions"],
+ "no-invalid-regexp": 2,
+ "no-irregular-whitespace": 2,
+ "no-iterator": 2,
+ "no-label-var": 2,
+ "no-labels": 2,
+ "no-lone-blocks": 2,
+ "no-lonely-if": 0,
+ "no-loop-func": 0,
+ "no-mixed-requires": 0,
+ "no-mixed-spaces-and-tabs": 2,
+ "no-multi-spaces": 2,
+ "no-multi-str": 2,
+ "no-multiple-empty-lines": [2, { "max": 1 }],
+ "no-native-reassign": 2,
+ "no-negated-in-lhs": 2,
+ "no-nested-ternary": 0,
+ "no-new": 2,
+ "no-new-func": 0,
+ "no-new-object": 2,
+ "no-new-require": 2,
+ "no-new-wrappers": 2,
+ "no-obj-calls": 2,
+ "no-octal": 2,
+ "no-octal-escape": 2,
+ "no-param-reassign": 0,
+ "no-path-concat": 0,
+ "no-process-env": 0,
+ "no-process-exit": 0,
+ "no-proto": 0,
+ "no-redeclare": 2,
+ "no-regex-spaces": 2,
+ "no-restricted-modules": 0,
+ "no-return-assign": 2,
+ "no-script-url": 0,
+ "no-self-compare": 2,
+ "no-sequences": 2,
+ "no-shadow": 0,
+ "no-shadow-restricted-names": 2,
+ "no-spaced-func": 2,
+ "no-sparse-arrays": 2,
+ "no-sync": 0,
+ "no-ternary": 0,
+ "no-this-before-super": 2,
+ "no-throw-literal": 2,
+ "no-trailing-spaces": 2,
+ "no-undef": 2,
+ "no-undef-init": 2,
+ "no-undefined": 0,
+ "no-underscore-dangle": 0,
+ "no-unexpected-multiline": 2,
+ "no-unneeded-ternary": 2,
+ "no-unreachable": 2,
+ "no-unused-expressions": 0,
+ "no-unused-vars": [2, { "vars": "all", "args": "none" }],
+ "no-use-before-define": 0,
+ "no-var": 0,
+ "no-void": 0,
+ "no-warning-comments": 0,
+ "no-with": 2,
+ "object-curly-spacing": 0,
+ "object-shorthand": 0,
+ "one-var": [2, { "initialized": "never" }],
+ "operator-assignment": 0,
+ "operator-linebreak": [2, "after", { "overrides": { "?": "before", ":": "before" } }],
+ "padded-blocks": 0,
+ "prefer-const": 0,
+ "quote-props": 0,
+ "quotes": [2, "single", "avoid-escape"],
+ "radix": 2,
+ "semi": [2, "always"],
+ "semi-spacing": 0,
+ "sort-vars": 0,
+ "space-after-keywords": [2, "always"],
+ "space-before-blocks": [2, "always"],
+ "space-before-function-paren": [2, "never"],
+ "space-in-parens": [2, "never"],
+ "space-infix-ops": 2,
+ "space-return-throw-case": 2,
+ "space-unary-ops": [2, { "words": true, "nonwords": false }],
+ "spaced-comment": [2, "always", { "markers": ["global", "globals", "eslint", "eslint-disable", "*package", "!"] }],
+ "strict": 0,
+ "use-isnan": 2,
+ "valid-jsdoc": 0,
+ "valid-typeof": 2,
+ "vars-on-top": 0,
+ "wrap-iife": [2, "any"],
+ "wrap-regex": 0,
+ "yoda": [2, "never"]
+ }
+}
diff --git a/themes/grav/app/dashboard/backup.js b/themes/grav/app/dashboard/backup.js
new file mode 100644
index 00000000..f7eaecb8
--- /dev/null
+++ b/themes/grav/app/dashboard/backup.js
@@ -0,0 +1,24 @@
+import $ from 'jquery';
+import { translations } from 'grav-config';
+import request from '../utils/request';
+import { Instances as Charts } from './chart';
+
+$('[data-ajax*="task:backup"]').on('click', function() {
+ let element = $(this);
+ let url = element.data('ajax');
+
+ element
+ .attr('disabled', 'disabled')
+ .find('> .fa').removeClass('fa-database').addClass('fa-spin fa-refresh');
+
+ request(url, (/* response */) => {
+ if (Charts && Charts.backups) {
+ Charts.backups.updateData({ series: [0, 100] });
+ Charts.backups.element.find('.numeric').html(`0 ${translations.PLUGIN_ADMIN.DAYS.toLowerCase()} `);
+ }
+
+ element
+ .removeAttr('disabled')
+ .find('> .fa').removeClass('fa-spin fa-refresh').addClass('fa-database');
+ });
+});
diff --git a/themes/grav/app/dashboard/cache.js b/themes/grav/app/dashboard/cache.js
new file mode 100644
index 00000000..d454945e
--- /dev/null
+++ b/themes/grav/app/dashboard/cache.js
@@ -0,0 +1,49 @@
+import $ from 'jquery';
+import { config } from 'grav-config';
+import request from '../utils/request';
+
+const getUrl = (type = '') => {
+ if (type) {
+ type = `cleartype:${type}/`;
+ }
+
+ return `${config.base_url_relative}/cache.json/task:clearCache/${type}admin-nonce:${config.admin_nonce}`;
+};
+
+export default class Cache {
+ constructor() {
+ this.element = $('[data-clear-cache]');
+ $('body').on('click', '[data-clear-cache]', (event) => this.clear(event, event.target));
+ }
+
+ clear(event, element) {
+ let type = '';
+
+ if (event && event.preventDefault) { event.preventDefault(); }
+ if (typeof event === 'string') { type = event; }
+
+ element = element ? $(element) : $(`[data-clear-cache-type="${type}"]`);
+ type = type || $(element).data('clear-cache-type') || '';
+ let url = element.data('clearCache') || getUrl(event);
+
+ this.disable();
+
+ request(url, () => this.enable());
+ }
+
+ enable() {
+ this.element
+ .removeAttr('disabled')
+ .find('> .fa').removeClass('fa-refresh fa-spin').addClass('fa-trash');
+ }
+
+ disable() {
+ this.element
+ .attr('disabled', 'disabled')
+ .find('> .fa').removeClass('fa-trash').addClass('fa-refresh fa-spin');
+ }
+}
+
+let Instance = new Cache();
+
+export { Instance };
diff --git a/themes/grav/app/dashboard/chart.js b/themes/grav/app/dashboard/chart.js
new file mode 100644
index 00000000..50fa8022
--- /dev/null
+++ b/themes/grav/app/dashboard/chart.js
@@ -0,0 +1,124 @@
+import $ from 'jquery';
+import chartist from 'chartist';
+import { translations } from 'grav-config';
+import { Instance as gpm } from '../utils/gpm';
+import { Instance as updates } from '../updates';
+
+let isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
+
+export const defaults = {
+ data: {
+ series: [100, 0]
+ },
+ options: {
+ Pie: {
+ donut: true,
+ donutWidth: 10,
+ startAngle: 0,
+ total: 100,
+ showLabel: false,
+ height: 150,
+ chartPadding: !isFirefox ? 10 : 25
+ },
+ Bar: {
+ height: 164,
+ chartPadding: !isFirefox ? 5 : 25,
+
+ axisX: {
+ showGrid: false,
+ labelOffset: {
+ x: 0,
+ y: 5
+ }
+ },
+ axisY: {
+ offset: 15,
+ showLabel: true,
+ showGrid: true,
+ labelOffset: {
+ x: 5,
+ y: 5
+ },
+ scaleMinSpace: 20
+ }
+ }
+ }
+};
+
+export default class Chart {
+ constructor(element, options = {}, data = {}) {
+ this.element = $(element) || [];
+ if (!this.element[0]) { return; }
+
+ let type = (this.element.data('chart-type') || 'pie').toLowerCase();
+ this.type = type.charAt(0).toUpperCase() + type.substr(1).toLowerCase();
+
+ options = Object.assign({}, defaults.options[this.type], options);
+ data = Object.assign({}, defaults.data, data);
+ Object.assign(this, {
+ options,
+ data
+ });
+ this.chart = chartist[this.type](this.element.find('.ct-chart')[0], this.data, this.options);
+ }
+
+ updateData(data) {
+ Object.assign(this.data, data);
+ this.chart.update(this.data);
+ }
+};
+
+export class UpdatesChart extends Chart {
+ constructor(element, options = {}, data = {}) {
+ super(element, options, data);
+
+ this.chart.on('draw', (data) => this.draw(data));
+
+ gpm.on('fetched', (response) => {
+ let payload = response.payload.grav;
+ let missing = (response.payload.resources.total + (payload.isUpdatable ? 1 : 0)) * 100 / (response.payload.installed + (payload.isUpdatable ? 1 : 0));
+ let updated = 100 - missing;
+
+ this.updateData({ series: [updated, missing] });
+
+ if (response.payload.resources.total) {
+ updates.maintenance('show');
+ }
+ });
+ }
+
+ draw(data) {
+ if (data.index) { return; }
+
+ let notice = translations.PLUGIN_ADMIN[data.value === 100 ? 'FULLY_UPDATED' : 'UPDATES_AVAILABLE'];
+ this.element.find('.numeric span').text(`${Math.round(data.value)}%`);
+ this.element.find('.js__updates-available-description').html(notice);
+ this.element.find('.hidden').removeClass('hidden');
+ }
+
+ updateData(data) {
+ super.updateData(data);
+
+ // missing updates
+ if (this.data.series[0] < 100) {
+ this.element.closest('#updates').find('[data-maintenance-update]').fadeIn();
+ }
+ }
+}
+
+let charts = {};
+
+$('[data-chart-name]').each(function() {
+ let element = $(this);
+ let name = element.data('chart-name') || '';
+ let options = element.data('chart-options') || {};
+ let data = element.data('chart-data') || {};
+
+ if (name === 'updates') {
+ charts[name] = new UpdatesChart(element, options, data);
+ } else {
+ charts[name] = new Chart(element, options, data);
+ }
+});
+
+export let Instances = charts;
diff --git a/themes/grav/app/dashboard/index.js b/themes/grav/app/dashboard/index.js
new file mode 100644
index 00000000..7adee0d9
--- /dev/null
+++ b/themes/grav/app/dashboard/index.js
@@ -0,0 +1,12 @@
+import Chart, { UpdatesChart, Instances } from './chart';
+import { Instance as Cache } from './cache';
+import './backup';
+
+export default {
+ Chart: {
+ Chart,
+ UpdatesChart,
+ Instances
+ },
+ Cache
+};
diff --git a/themes/grav/app/dashboard/update.js b/themes/grav/app/dashboard/update.js
new file mode 100644
index 00000000..acf1bb7e
--- /dev/null
+++ b/themes/grav/app/dashboard/update.js
@@ -0,0 +1 @@
+// See ../updates/update.js
diff --git a/themes/grav/app/forms/fields/array.js b/themes/grav/app/forms/fields/array.js
new file mode 100644
index 00000000..caaf2b07
--- /dev/null
+++ b/themes/grav/app/forms/fields/array.js
@@ -0,0 +1,146 @@
+import $ from 'jquery';
+
+let body = $('body');
+
+class Template {
+ constructor(container) {
+ this.container = $(container);
+
+ if (this.getName() === undefined) {
+ this.container = this.container.closest('[data-grav-array-name]');
+ }
+ }
+
+ getName() {
+ return this.container.data('grav-array-name') || '';
+ }
+
+ getKeyPlaceholder() {
+ return this.container.data('grav-array-keyname') || 'Key';
+ }
+
+ getValuePlaceholder() {
+ return this.container.data('grav-array-valuename') || 'Value';
+ }
+
+ isValueOnly() {
+ return this.container.find('[data-grav-array-mode="value_only"]:first').length || false;
+ }
+
+ shouldBeDisabled() {
+ // check for toggleables, if field is toggleable and it's not enabled, render disabled
+ let toggle = this.container.closest('.form-field').find('[data-grav-field="toggleable"] input[type="checkbox"]');
+ return toggle.length && toggle.is(':not(:checked)');
+ }
+
+ getNewRow() {
+ let tpl = '';
+
+ if (this.isValueOnly()) {
+ tpl += `
+
+
+ `;
+ } else {
+ tpl += `
+
+
+
+ `;
+ }
+
+ tpl += `
+
+
+
`;
+
+ return tpl;
+ }
+}
+
+export default class ArrayField {
+ constructor() {
+ body.on('input', '[data-grav-array-type="key"], [data-grav-array-type="value"]', (event) => this.actionInput(event));
+ body.on('click touch', '[data-grav-array-action]', (event) => this.actionEvent(event));
+ }
+
+ actionInput(event) {
+ let element = $(event.target);
+ let type = element.data('grav-array-type');
+
+ this._setTemplate(element);
+
+ let template = element.data('array-template');
+ let keyElement = type === 'key' ? element : element.siblings('[data-grav-array-type="key"]:first');
+ let valueElement = type === 'value' ? element : element.siblings('[data-grav-array-type="value"]:first');
+
+ let name = `${template.getName()}[${!template.isValueOnly() ? keyElement.val() : this.getIndexFor(element)}]`;
+ valueElement.attr('name', !valueElement.val() ? template.getName() : name);
+
+ this.refreshNames(template);
+ }
+
+ actionEvent(event) {
+ let element = $(event.target);
+ let action = element.data('grav-array-action');
+
+ this._setTemplate(element);
+
+ this[`${action}Action`](element);
+ }
+
+ addAction(element) {
+ let template = element.data('array-template');
+ let row = element.closest('[data-grav-array-type="row"]');
+
+ row.after(template.getNewRow());
+ }
+
+ remAction(element) {
+ let template = element.data('array-template');
+ let row = element.closest('[data-grav-array-type="row"]');
+ let isLast = !row.siblings().length;
+
+ if (isLast) {
+ let newRow = $(template.getNewRow());
+ row.after(newRow);
+ newRow.find('[data-grav-array-type="value"]:last').attr('name', template.getName());
+ }
+
+ row.remove();
+ this.refreshNames(template);
+ }
+
+ refreshNames(template) {
+ if (!template.isValueOnly()) { return; }
+
+ let row = template.container.find('> div > [data-grav-array-type="row"]');
+ let inputs = row.find('[name]:not([name=""])');
+
+ inputs.each((index, input) => {
+ input = $(input);
+ let name = input.attr('name');
+ name = name.replace(/\[\d+\]$/, `[${index}]`);
+ input.attr('name', name);
+ });
+
+ if (!inputs.length) {
+ row.find('[data-grav-array-type="value"]').attr('name', template.getName());
+ }
+ }
+
+ getIndexFor(element) {
+ let template = element.data('array-template');
+ let row = element.closest('[data-grav-array-type="row"]');
+
+ return template.container.find(`${template.isValueOnly() ? '> div ' : ''} > [data-grav-array-type="row"]`).index(row);
+ }
+
+ _setTemplate(element) {
+ if (!element.data('array-template')) {
+ element.data('array-template', new Template(element.closest('[data-grav-array-name]')));
+ }
+ }
+}
+
+export let Instance = new ArrayField();
diff --git a/themes/grav/app/forms/fields/collections.js b/themes/grav/app/forms/fields/collections.js
new file mode 100644
index 00000000..1b812841
--- /dev/null
+++ b/themes/grav/app/forms/fields/collections.js
@@ -0,0 +1,98 @@
+import $ from 'jquery';
+import Sortable from 'sortablejs';
+import '../../utils/jquery-utils';
+
+export default class CollectionsField {
+ constructor() {
+ this.lists = $();
+
+ $('[data-type="collection"]').each((index, list) => this.addList(list));
+ $('body').on('mutation._grav', this._onAddedNodes.bind(this));
+
+ }
+
+ addList(list) {
+ list = $(list);
+ this.lists = this.lists.add(list);
+
+ list.on('click', '> .collection-actions [data-action="add"]', (event) => this.addItem(event));
+ list.on('click', '> ul > li > .item-actions [data-action="delete"]', (event) => this.removeItem(event));
+
+ list.find('[data-collection-holder]').each((index, container) => {
+ container = $(container);
+ if (container.data('collection-sort')) { return; }
+
+ container.data('collection-sort', new Sortable(container.get(0), {
+ forceFallback: true,
+ animation: 150,
+ onUpdate: () => this.reindex(container)
+ }));
+ });
+ }
+
+ addItem(event) {
+ let button = $(event.currentTarget);
+ let list = button.closest('[data-type="collection"]');
+ let template = $(list.find('> [data-collection-template="new"]').data('collection-template-html'));
+
+ list.find('> [data-collection-holder]').append(template);
+ this.reindex(list);
+ // button.data('key-index', keyIndex + 1);
+
+ // process markdown editors
+ /* var field = template.find('[name]').filter('textarea');
+ if (field.length && field.data('grav-mdeditor') && typeof MDEditors !== 'undefined') {
+ MDEditors.add(field);
+ }*/
+ }
+
+ removeItem(event) {
+ let button = $(event.currentTarget);
+ let item = button.closest('[data-collection-item]');
+ let list = button.closest('[data-type="collection"]');
+
+ item.remove();
+ this.reindex(list);
+ }
+
+ reindex(list) {
+ list = $(list).closest('[data-type="collection"]');
+
+ let items = list.find('> ul > [data-collection-item]');
+
+ items.each((index, item) => {
+ item = $(item);
+ item.attr('data-collection-key', index);
+
+ ['name', 'data-grav-field-name', 'id', 'for'].forEach((prop) => {
+ item.find('[' + prop + ']').each(function() {
+ let element = $(this);
+ let indexes = [];
+ element.parents('[data-collection-key]').map((idx, parent) => indexes.push($(parent).attr('data-collection-key')));
+ indexes.reverse();
+
+ let replaced = element.attr(prop).replace(/\[(\d+|\*)\]/g, (/* str, p1, offset */) => {
+ return `[${indexes.shift()}]`;
+ });
+
+ element.attr(prop, replaced);
+ });
+ });
+
+ });
+ }
+
+ _onAddedNodes(event, target/* , record, instance */) {
+ let collections = $(target).find('[data-type="collection"]');
+ if (!collections.length) { return; }
+
+ collections.each((index, collection) => {
+ collection = $(collection);
+ if (!~this.lists.index(collection)) {
+ this.addList(collection);
+ }
+ });
+ }
+}
+
+export let Instance = new CollectionsField();
diff --git a/themes/grav/app/forms/fields/index.js b/themes/grav/app/forms/fields/index.js
new file mode 100644
index 00000000..9739ddf1
--- /dev/null
+++ b/themes/grav/app/forms/fields/index.js
@@ -0,0 +1,18 @@
+import SelectizeField, { Instance as SelectizeFieldInstance } from './selectize';
+import ArrayField, { Instance as ArrayFieldInstance } from './array';
+import CollectionsField, { Instance as CollectionsFieldInstance } from './collections';
+
+export default {
+ SelectizeField: {
+ SelectizeField,
+ Instance: SelectizeFieldInstance
+ },
+ ArrayField: {
+ ArrayField,
+ Instance: ArrayFieldInstance
+ },
+ CollectionsField: {
+ CollectionsField,
+ Instance: CollectionsFieldInstance
+ }
+};
diff --git a/themes/grav/app/forms/fields/selectize.js b/themes/grav/app/forms/fields/selectize.js
new file mode 100644
index 00000000..5ad4d727
--- /dev/null
+++ b/themes/grav/app/forms/fields/selectize.js
@@ -0,0 +1,35 @@
+import $ from 'jquery';
+import 'selectize';
+
+export default class SelectizeField {
+ constructor(options = {}) {
+ this.options = Object.assign({}, options);
+ this.elements = [];
+
+ $('[data-grav-selectize]').each((index, element) => this.add(element));
+ $('body').on('mutation._grav', this._onAddedNodes.bind(this));
+ }
+
+ add(element) {
+ element = $(element);
+ let tag = element.prop('tagName').toLowerCase();
+ let isInput = tag === 'input' || tag === 'select';
+
+ let data = (isInput ? element.closest('[data-grav-selectize]') : element).data('grav-selectize') || {};
+ let field = (isInput ? element : element.find('input, select'));
+
+ if (!field.length || field.get(0).selectize) { return; }
+ field.selectize(data);
+
+ this.elements.push(field.data('selectize'));
+ }
+
+ _onAddedNodes(event, target/* , record, instance */) {
+ let fields = $(target).find('select.fancy, input.fancy');
+ if (!fields.length) { return; }
+
+ fields.each((index, field) => this.add(field));
+ }
+}
+
+export let Instance = new SelectizeField();
diff --git a/themes/grav/app/forms/form.js b/themes/grav/app/forms/form.js
new file mode 100644
index 00000000..d101c469
--- /dev/null
+++ b/themes/grav/app/forms/form.js
@@ -0,0 +1,104 @@
+import $ from 'jquery';
+import toastr from '../utils/toastr';
+import { translations } from 'grav-config';
+import { Instance as FormState } from './state';
+
+export default class Form {
+ constructor(form) {
+ this.form = $(form);
+ if (!this.form.length || this.form.prop('tagName').toLowerCase() !== 'form') { return; }
+
+ this.form.on('submit', (event) => {
+ if (FormState.equals()) {
+ event.preventDefault();
+ toastr.info(translations.PLUGIN_ADMIN.NOTHING_TO_SAVE);
+ }
+ });
+
+ this._attachShortcuts();
+ this._attachToggleables();
+ this._attachDisabledFields();
+
+ this.observer = new MutationObserver(this.addedNodes);
+ this.form.each((index, form) => this.observer.observe(form, { subtree: true, childList: true }));
+ }
+
+ _attachShortcuts() {
+ // CTRL + S / CMD + S - shortcut for [Save] when available
+ let saveTask = $('[name="task"][value="save"]').filter(function(index, element) {
+ element = $(element);
+ return !(element.parents('.remodal-overlay').length);
+ });
+
+ if (saveTask.length) {
+ $(window).on('keydown', function(event) {
+ var key = String.fromCharCode(event.which).toLowerCase();
+ if ((event.ctrlKey || event.metaKey) && key === 's') {
+ event.preventDefault();
+ saveTask.click();
+ }
+ });
+ }
+ }
+
+ _attachToggleables() {
+ let query = '[data-grav-field="toggleable"] input[type="checkbox"]';
+
+ this.form.on('change', query, (event) => {
+ let toggle = $(event.target);
+ let enabled = toggle.is(':checked');
+ let parent = toggle.parents('.form-field');
+ let label = parent.find('label.toggleable');
+ let fields = parent.find('.form-data');
+ let inputs = fields.find('input, select, textarea');
+
+ label.add(fields).css('opacity', enabled ? '' : 0.7);
+ inputs.map((index, input) => {
+ let isSelectize = input.selectize;
+ input = $(input);
+
+ if (isSelectize) {
+ isSelectize[enabled ? 'enable' : 'disable']();
+ } else {
+ input.prop('disabled', !enabled);
+ }
+ });
+ });
+
+ this.form.find(query).trigger('change');
+ }
+
+ _attachDisabledFields() {
+ let prefix = '.form-field-toggleable .form-data';
+ let query = [];
+
+ ['input', 'select', 'label[for]', 'textarea', '.selectize-control'].forEach((item) => {
+ query.push(`${prefix} ${item}`);
+ });
+
+ this.form.on('mousedown', query.join(', '), (event) => {
+ let target = $(event.target);
+ let input = target;
+ let isFor = input.prop('for');
+ let isSelectize = (input.hasClass('selectize-control') || input.parents('.selectize-control')).length;
+
+ if (isFor) { input = $(`[id="${isFor}"]`); }
+ if (isSelectize) { input = input.closest('.selectize-control').siblings('select[name]'); }
+
+ if (!input.prop('disabled')) { return true; }
+
+ let toggle = input.closest('.form-field').find('[data-grav-field="toggleable"] input[type="checkbox"]');
+ toggle.trigger('click');
+ });
+ }
+
+ addedNodes(mutations) {
+ mutations.forEach((mutation) => {
+ if (mutation.type !== 'childList' || !mutation.addedNodes) { return; }
+
+ $('body').trigger('mutation._grav', mutation.target, mutation, this);
+ });
+ }
+}
+
+export let Instance = new Form('form#blueprints');
diff --git a/themes/grav/app/forms/index.js b/themes/grav/app/forms/index.js
new file mode 100644
index 00000000..604cf1be
--- /dev/null
+++ b/themes/grav/app/forms/index.js
@@ -0,0 +1,16 @@
+import FormState, { Instance as FormStateInstance } from './state';
+import Form, { Instance as FormInstance } from './form';
+
+import Fields from './fields';
+
+export default {
+ Form: {
+ Form,
+ Instance: FormInstance
+ },
+ Fields,
+ FormState: {
+ FormState,
+ Instance: FormStateInstance
+ }
+};
diff --git a/themes/grav/app/forms/state.js b/themes/grav/app/forms/state.js
new file mode 100644
index 00000000..268b708b
--- /dev/null
+++ b/themes/grav/app/forms/state.js
@@ -0,0 +1,122 @@
+import $ from 'jquery';
+import Immutable from 'immutable';
+import '../utils/jquery-utils';
+
+let FormLoadState = {};
+
+const DOMBehaviors = {
+ attach() {
+ this.preventUnload();
+ this.preventClickAway();
+ },
+
+ preventUnload() {
+ if ($._data(window, 'events') && ($._data(window, 'events').beforeunload || []).filter((event) => event.namespace === '_grav')) {
+ return;
+ }
+
+ // Catch browser uri change / refresh attempt and stop it if the form state is dirty
+ $(window).on('beforeunload._grav', () => {
+ if (Instance.equals() === false) {
+ return `You have made changes on this page that you have not yet confirmed. If you navigate away from this page you will lose your unsaved changes.`;
+ }
+ });
+ },
+
+ preventClickAway() {
+ let selector = 'a[href]:not([href^=#])';
+
+ if ($._data($(selector).get(0), 'events') && ($._data($(selector).get(0), 'events').click || []).filter((event) => event.namespace === '_grav')) {
+ return;
+ }
+
+ // Prevent clicking away if the form state is dirty
+ // instead, display a confirmation before continuing
+ $(selector).on('click._grav', function(event) {
+ let isClean = Instance.equals();
+ if (isClean === null || isClean) { return true; }
+
+ event.preventDefault();
+
+ let destination = $(this).attr('href');
+ let modal = $('[data-remodal-id="changes"]');
+ let lookup = $.remodal.lookup[modal.data('remodal')];
+ let buttons = $('a.button', modal);
+
+ let handler = function(event) {
+ event.preventDefault();
+ let action = $(this).data('leave-action');
+
+ buttons.off('click', handler);
+ lookup.close();
+
+ if (action === 'continue') {
+ $(window).off('beforeunload');
+ window.location.href = destination;
+ }
+ };
+
+ buttons.on('click', handler);
+ lookup.open();
+ });
+ }
+};
+
+export default class FormState {
+ constructor(options = {
+ ignore: [],
+ form_id: 'blueprints'
+ }) {
+ this.options = options;
+ this.refresh();
+
+ if (!this.form || !this.fields.length) { return; }
+ FormLoadState = this.collect();
+ DOMBehaviors.attach();
+ }
+
+ refresh() {
+ this.form = $(`form#${this.options.form_id}`).filter(':noparents(.remodal)');
+ this.fields = $(`form#${this.options.form_id} *, [form="${this.options.form_id}"]`).filter(':input:not(.no-form)').filter(':noparents(.remodal)');
+
+ return this;
+ }
+
+ collect() {
+ if (!this.form || !this.fields.length) { return; }
+
+ let values = {};
+ this.refresh().fields.each((index, field) => {
+ field = $(field);
+ let name = field.prop('name');
+ let type = field.prop('type');
+ let value;
+
+ switch (type) {
+ case 'checkbox':
+ case 'radio':
+ value = field.is(':checked');
+ break;
+ default:
+ value = field.val();
+ }
+
+ if (name && !~this.options.ignore.indexOf(name)) {
+ values[name] = value;
+ }
+ });
+
+ return Immutable.OrderedMap(values);
+ }
+
+ // When the form doesn't exist or there are no fields, `equals` returns `null`
+ // for this reason, _NEVER_ check with !Instance.equals(), use Instance.equals() === false
+ equals() {
+ if (!this.form || !this.fields.length) { return null; }
+ return Immutable.is(FormLoadState, this.collect());
+ }
+};
+
+export let Instance = new FormState();
+
+export { DOMBehaviors };
diff --git a/themes/grav/app/main.js b/themes/grav/app/main.js
new file mode 100644
index 00000000..9b161b75
--- /dev/null
+++ b/themes/grav/app/main.js
@@ -0,0 +1,29 @@
+import GPM, { Instance as gpm } from './utils/gpm';
+import KeepAlive from './utils/keepalive';
+import Updates, { Instance as updates } from './updates';
+import Dashboard from './dashboard';
+import Pages from './pages';
+import Forms from './forms';
+import './plugins';
+import './themes';
+
+// bootstrap jQuery extensions
+import 'bootstrap/js/dropdown';
+
+// starts the keep alive, auto runs every X seconds
+KeepAlive.start();
+
+export default {
+ GPM: {
+ GPM,
+ Instance: gpm
+ },
+ KeepAlive,
+ Dashboard,
+ Pages,
+ Forms,
+ Updates: {
+ Updates,
+ Instance: updates
+ }
+};
diff --git a/themes/grav/app/pages/filter.js b/themes/grav/app/pages/filter.js
new file mode 100644
index 00000000..2b6fb117
--- /dev/null
+++ b/themes/grav/app/pages/filter.js
@@ -0,0 +1,134 @@
+import $ from 'jquery';
+import { config } from 'grav-config';
+import request from '../utils/request';
+import debounce from 'debounce';
+import { Instance as pagesTree } from './tree';
+import 'selectize';
+
+/* @formatter:off */
+/* eslint-disable */
+const options = [
+ { flag: 'Modular', key: 'Modular', cat: 'mode' },
+ { flag: 'Visible', key: 'Visible', cat: 'mode' },
+ { flag: 'Routable', key: 'Routable', cat: 'mode' },
+ { flag: 'Published', key: 'Published', cat: 'mode' },
+ { flag: 'Non-Modular', key: 'NonModular', cat: 'mode' },
+ { flag: 'Non-Visible', key: 'NonVisible', cat: 'mode' },
+ { flag: 'Non-Routable', key: 'NonRoutable', cat: 'mode' },
+ { flag: 'Non-Published', key: 'NonPublished', cat: 'mode' }
+];
+/* @formatter:on */
+/* eslint-enable */
+
+export default class PagesFilter {
+ constructor(filters, search) {
+ this.filters = $(filters);
+ this.search = $(search);
+ this.options = options;
+ this.tree = pagesTree;
+
+ if (!this.filters.length || !this.search.length) { return; }
+
+ this.labels = this.filters.data('filter-labels');
+
+ this.search.on('input', debounce(() => this.filter(), 250));
+ this.filters.on('change', () => this.filter());
+
+ this._initSelectize();
+ }
+
+ filter(value) {
+ let data = { flags: '', query: '' };
+
+ if (typeof value === 'object') {
+ Object.assign(data, value);
+ }
+ if (typeof value === 'string') {
+ data.query = value;
+ }
+ if (typeof value === 'undefined') {
+ data.flags = this.filters.val();
+ data.query = this.search.val();
+ }
+
+ if (!Object.keys(data).filter((key) => data[key] !== '').length) {
+ this.resetValues();
+ return;
+ }
+
+ data.flags = data.flags.replace(/(\s{1,})?,(\s{1,})?/g, ',');
+ this.setValues({ flags: data.flags, query: data.query }, 'silent');
+
+ request(`${config.base_url_relative}/pages-filter.json/task${config.param_sep}filterPages`, {
+ method: 'post',
+ body: data
+ }, (response) => {
+ this.refreshDOM(response);
+ });
+ }
+
+ refreshDOM(response) {
+ let items = $('[data-nav-id]');
+
+ if (!response) {
+ items.removeClass('search-match').show();
+ this.tree.restore();
+
+ return;
+ }
+
+ items.removeClass('search-match').hide();
+
+ response.results.forEach((page) => {
+ let match = items.filter(`[data-nav-id="${page}"]`).addClass('search-match').show();
+ match.parents('[data-nav-id]').addClass('search-match').show();
+
+ this.tree.expand(page, 'no-store');
+ });
+ }
+
+ setValues({ flags = '', query = ''}, silent) {
+ let flagsArray = flags.replace(/(\s{1,})?,(\s{1,})?/g, ',').split(',');
+ if (this.filters.val() !== flags) { this.filters[0].selectize.setValue(flagsArray, silent); }
+ if (this.search.val() !== query) { this.search.val(query); }
+ }
+
+ resetValues() {
+ this.setValues('', 'silent');
+ this.refreshDOM();
+ }
+
+ _initSelectize() {
+ let extras = {
+ type: this.filters.data('filter-types') || {},
+ access: this.filters.data('filter-access-levels') || {}
+ };
+
+ Object.keys(extras).forEach((cat) => {
+ Object.keys(extras[cat]).forEach((key) => {
+ this.options.push({
+ cat,
+ key,
+ flag: extras[cat][key]
+ });
+ });
+ });
+
+ this.filters.selectize({
+ maxItems: null,
+ valueField: 'key',
+ labelField: 'flag',
+ searchField: ['flag', 'key'],
+ options: this.options,
+ optgroups: this.labels,
+ optgroupField: 'cat',
+ optgroupLabelField: 'name',
+ optgroupValueField: 'id',
+ optgroupOrder: this.labels.map((item) => item.id),
+ plugins: ['optgroup_columns']
+ });
+ }
+}
+
+let Instance = new PagesFilter('input[name="page-filter"]', 'input[name="page-search"]');
+export { Instance };
diff --git a/themes/grav/app/pages/index.js b/themes/grav/app/pages/index.js
new file mode 100644
index 00000000..5859c29c
--- /dev/null
+++ b/themes/grav/app/pages/index.js
@@ -0,0 +1,26 @@
+import $ from 'jquery';
+import Sortable from 'sortablejs';
+import PageFilters, { Instance as PageFiltersInstance } from './filter';
+import './page';
+
+// Pages Ordering
+let Ordering = null;
+let orderingElement = $('#ordering');
+if (orderingElement.length) {
+ Ordering = new Sortable(orderingElement.get(0), {
+ filter: '.ignore',
+ onUpdate: function(event) {
+ let item = $(event.item);
+ let index = orderingElement.children().index(item) + 1;
+ $('[data-order]').val(index);
+ }
+ });
+}
+
+export default {
+ Ordering,
+ PageFilters: {
+ PageFilters,
+ Instance: PageFiltersInstance
+ }
+};
diff --git a/themes/grav/app/pages/page/add.js b/themes/grav/app/pages/page/add.js
new file mode 100644
index 00000000..3090fb9b
--- /dev/null
+++ b/themes/grav/app/pages/page/add.js
@@ -0,0 +1,31 @@
+import $ from 'jquery';
+
+let custom = false;
+let folder = $('input[name="folder"]');
+let title = $('input[name="title"]');
+
+title.on('input focus blur', () => {
+ if (custom) { return true; }
+
+ let slug = $.slugify(title.val());
+ folder.val(slug);
+});
+
+folder.on('input', () => {
+ let input = folder.get(0);
+ let value = folder.val();
+ let selection = {
+ start: input.selectionStart,
+ end: input.selectionEnd
+ };
+
+ value = value.toLowerCase().replace(/\s/g, '-').replace(/[^a-z0-9_\-]/g, '');
+ folder.val(value);
+ custom = !!value;
+
+ // restore cursor position
+ input.setSelectionRange(selection.start, selection.end);
+
+});
+
+folder.on('focus blur', () => title.trigger('input'));
diff --git a/themes/grav/app/pages/page/delete.js b/themes/grav/app/pages/page/delete.js
new file mode 100644
index 00000000..cc47ac9f
--- /dev/null
+++ b/themes/grav/app/pages/page/delete.js
@@ -0,0 +1,15 @@
+import $ from 'jquery';
+
+$('[data-remodal-target="delete"]').on('click', function() {
+ let confirm = $('[data-remodal-id="delete"] [data-delete-action]');
+ let link = $(this).data('delete-url');
+
+ confirm.data('delete-action', link);
+});
+
+$('[data-delete-action]').on('click', function() {
+ let remodal = $.remodal.lookup[$('[data-remodal-id="delete"]').data('remodal')];
+
+ window.location.href = $(this).data('delete-action');
+ remodal.close();
+});
diff --git a/themes/grav/app/pages/page/index.js b/themes/grav/app/pages/page/index.js
new file mode 100644
index 00000000..ffb6ab61
--- /dev/null
+++ b/themes/grav/app/pages/page/index.js
@@ -0,0 +1,37 @@
+import $ from 'jquery';
+import './add';
+import './move';
+import './delete';
+import './media';
+
+const switcher = $('input[type="radio"][name="mode-switch"]');
+
+if (switcher) {
+ let link = switcher.closest(':checked').data('leave-url');
+ let fakeLink = $(`
`);
+
+ switcher.parent().append(fakeLink);
+
+ switcher.siblings('label').on('mousedown touchdown', (event) => {
+ event.preventDefault();
+
+ // let remodal = $.remodal.lookup[$('[data-remodal-id="changes"]').data('remodal')];
+ let confirm = $('[data-remodal-id="changes"] [data-leave-action="continue"]');
+
+ confirm.one('click', () => {
+ $(window).on('beforeunload._grav');
+ fakeLink.off('click._grav');
+
+ $(event.target).trigger('click');
+ });
+
+ fakeLink.trigger('click._grav');
+ });
+
+ switcher.on('change', (event) => {
+ let radio = $(event.target);
+ link = radio.data('leave-url');
+
+ setTimeout(() => fakeLink.attr('href', link).get(0).click(), 5);
+ });
+}
diff --git a/themes/grav/app/pages/page/media.js b/themes/grav/app/pages/page/media.js
new file mode 100644
index 00000000..62513590
--- /dev/null
+++ b/themes/grav/app/pages/page/media.js
@@ -0,0 +1,380 @@
+import $ from 'jquery';
+import Dropzone from 'dropzone';
+import request from '../../utils/request';
+import { config } from 'grav-config';
+
+Dropzone.autoDiscover = false;
+Dropzone.options.gravPageDropzone = {};
+Dropzone.confirm = (question, accepted, rejected) => {
+ let doc = $(document);
+ let modalSelector = '[data-remodal-id="delete-media"]';
+
+ let removeEvents = () => {
+ doc.off('confirm', modalSelector, accept);
+ doc.off('cancel', modalSelector, reject);
+ };
+
+ let accept = () => {
+ accepted && accepted();
+ removeEvents();
+ };
+
+ let reject = () => {
+ rejected && rejected();
+ removeEvents();
+ };
+
+ $.remodal.lookup[$(modalSelector).data('remodal')].open();
+ doc.on('confirmation', modalSelector, accept);
+ doc.on('cancellation', modalSelector, reject);
+};
+
+const DropzoneMediaConfig = {
+ createImageThumbnails: { thumbnailWidth: 150 },
+ addRemoveLinks: false,
+ dictRemoveFileConfirmation: '[placeholder]',
+ previewTemplate: `
+
`.trim()
+};
+
+export default class PageMedia {
+ constructor({form = '[data-media-url]', container = '#grav-dropzone', options = {}} = {}) {
+ this.form = $(form);
+ this.container = $(container);
+ if (!this.form.length || !this.container.length) { return; }
+
+ this.options = Object.assign({}, DropzoneMediaConfig, {
+ url: `${this.form.data('media-url')}/task${config.param_sep}addmedia`,
+ acceptedFiles: this.form.data('media-types')
+ }, options);
+
+ this.dropzone = new Dropzone(container, this.options);
+ this.dropzone.on('complete', this.onDropzoneComplete.bind(this));
+ this.dropzone.on('success', this.onDropzoneSuccess.bind(this));
+ this.dropzone.on('removedfile', this.onDropzoneRemovedFile.bind(this));
+ this.dropzone.on('sending', this.onDropzoneSending.bind(this));
+
+ this.fetchMedia();
+ }
+
+ fetchMedia() {
+ let url = `${this.form.data('media-url')}/task${config.param_sep}listmedia/admin-nonce${config.param_sep}${config.admin_nonce}`;
+
+ request(url, (response) => {
+ let results = response.results;
+
+ Object.keys(results).forEach((name) => {
+ let data = results[name];
+ let mock = { name, size: data.size, accepted: true, extras: data };
+
+ this.dropzone.files.push(mock);
+ this.dropzone.options.addedfile.call(this.dropzone, mock);
+
+ if (name.match(/\.(jpg|jpeg|png|gif)$/i)) {
+ this.dropzone.options.thumbnail.call(this.dropzone, mock, data.url);
+ }
+ });
+
+ this.container.find('.dz-preview').prop('draggable', 'true');
+ });
+ }
+
+ onDropzoneSending(file, xhr, formData) {
+ formData.append('admin-nonce', config.admin_nonce);
+ }
+
+ onDropzoneSuccess(file, response, xhr) {
+ return this.handleError({
+ file,
+ data: response,
+ mode: 'removeFile',
+ msg: `
An error occurred while trying to upload the file ${file.name}
+
${response.message} `
+ });
+ }
+
+ onDropzoneComplete(file) {
+ if (!file.accepted) {
+ let data = {
+ status: 'error',
+ message: `Unsupported file type: ${file.name.match(/\..+/).join('')}`
+ };
+
+ return this.handleError({
+ file,
+ data,
+ mode: 'removeFile',
+ msg: `
An error occurred while trying to add the file ${file.name}
+
${data.message} `
+ });
+ }
+
+ // accepted
+ $('.dz-preview').prop('draggable', 'true');
+ }
+
+ onDropzoneRemovedFile(file, ...extra) {
+ if (!file.accepted || file.rejected) { return; }
+ let url = `${this.form.data('media-url')}/task${config.param_sep}delmedia`;
+
+ request(url, {
+ method: 'post',
+ body: {
+ filename: file.name
+ }
+ }, (response) => {
+ return this.handleError({
+ file,
+ data: response,
+ mode: 'addBack',
+ msg: `
An error occurred while trying to remove the file ${file.name}
+
${response.message} `
+ });
+ });
+ }
+
+ handleError(options) {
+ let { file, data, mode, msg } = options;
+ if (data.status !== 'error' && data.status !== 'unauthorized') { return ; }
+
+ switch (mode) {
+ case 'addBack':
+ if (file instanceof File) {
+ this.dropzone.addFile(file);
+ } else {
+ this.dropzone.files.push(file);
+ this.dropzone.options.addedfile.call(this, file);
+ this.dropzone.options.thumbnail.call(this, file, file.extras.url);
+ }
+
+ break;
+ case 'removeFile':
+ file.rejected = true;
+ this.dropzone.removeFile(file);
+
+ break;
+ default:
+ }
+
+ let modal = $('[data-remodal-id="generic"]');
+ modal.find('.error-content').html(msg);
+ $.remodal.lookup[modal.data('remodal')].open();
+ }
+}
+
+export let Instance = new PageMedia();
+
+// let container = $('[data-media-url]');
+
+// if (container.length) {
+/* let URI = container.data('media-url');
+ let dropzone = new Dropzone('#grav-dropzone', {
+ url: `${URI}/task${config.param_sep}addmedia`,
+ createImageThumbnails: { thumbnailWidth: 150 },
+ addRemoveLinks: false,
+ dictRemoveFileConfirmation: '[placeholder]',
+ acceptedFiles: container.data('media-types'),
+ previewTemplate: `
+
`
+ });*/
+
+ /* $.get(URI + '/task{{ config.system.param_sep }}listmedia/admin-nonce{{ config.system.param_sep }}' + GravAdmin.config.admin_nonce, function(data) {
+
+ $.proxy(modalError, this, {
+ data: data,
+ msg: '
An error occurred while trying to list files
'+data.message+' '
+ })();
+
+ if (data.results) {
+ $.each(data.results, function(filename, data){
+ var mockFile = { name: filename, size: data.size, accepted: true, extras: data };
+ thisDropzone.files.push(mockFile);
+ thisDropzone.options.addedfile.call(thisDropzone, mockFile);
+
+ if (filename.toLowerCase().match(/\.(jpg|jpeg|png|gif)$/)) {
+ thisDropzone.options.thumbnail.call(thisDropzone, mockFile, data.url);
+ }
+ });
+ }
+
+ $('.dz-preview').prop('draggable', 'true');
+ });*/
+
+ // console.log(dropzone);
+// }
+
+/*
+*/
diff --git a/themes/grav/app/pages/page/move.js b/themes/grav/app/pages/page/move.js
new file mode 100644
index 00000000..3ed7832a
--- /dev/null
+++ b/themes/grav/app/pages/page/move.js
@@ -0,0 +1,13 @@
+import $ from 'jquery';
+
+$('[data-page-move] button[name="task"][value="save"]').on('click', function() {
+ let route = $('form#blueprints:first select[name="route"]');
+ let moveTo = $('[data-page-move] select').val();
+
+ if (route.length && route.val() !== moveTo) {
+ let selectize = route.data('selectize');
+ route.val(moveTo);
+
+ if (selectize) selectize.setValue(moveTo);
+ }
+});
diff --git a/themes/grav/app/pages/tree.js b/themes/grav/app/pages/tree.js
new file mode 100644
index 00000000..0d1afcf8
--- /dev/null
+++ b/themes/grav/app/pages/tree.js
@@ -0,0 +1,116 @@
+import $ from 'jquery';
+
+const sessionKey = 'grav:admin:pages';
+
+if (!sessionStorage.getItem(sessionKey)) {
+ sessionStorage.setItem(sessionKey, '{}');
+}
+
+export default class PagesTree {
+ constructor(elements) {
+ this.elements = $(elements);
+ this.session = JSON.parse(sessionStorage.getItem(sessionKey));
+
+ if (!this.elements.length) { return; }
+
+ this.restore();
+
+ this.elements.find('.page-icon').on('click', (event) => this.toggle(event.target));
+
+ $('[data-page-toggleall]').on('click', (event) => {
+ let element = $(event.target).closest('[data-page-toggleall]');
+ let action = element.data('page-toggleall');
+
+ this[action]();
+ });
+ }
+
+ toggle(elements, dontStore = false) {
+ if (typeof elements === 'string') {
+ elements = $(`[data-nav-id="${elements}"]`).find('[data-toggle="children"]');
+ }
+
+ elements = $(elements || this.elements);
+ elements.each((index, element) => {
+ element = $(element);
+ let state = this.getState(element.closest('[data-toggle="children"]'));
+ this[state.isOpen ? 'collapse' : 'expand'](state.id, dontStore);
+ });
+ }
+
+ collapse(elements, dontStore = false) {
+ if (typeof elements === 'string') {
+ elements = $(`[data-nav-id="${elements}"]`).find('[data-toggle="children"]');
+ }
+
+ elements = $(elements || this.elements);
+ elements.each((index, element) => {
+ element = $(element);
+ let state = this.getState(element);
+
+ if (state.isOpen) {
+ state.children.hide();
+ state.icon.removeClass('children-open').addClass('children-closed');
+ if (!dontStore) { delete this.session[state.id]; }
+ }
+ });
+
+ if (!dontStore) { this.save(); }
+ }
+
+ expand(elements, dontStore = false) {
+ if (typeof elements === 'string') {
+ let element = $(`[data-nav-id="${elements}"]`);
+ let parents = element.parents('[data-nav-id]');
+
+ // loop back through parents, we don't want to expand an hidden child
+ if (parents.length) {
+ parents = parents.find('[data-toggle="children"]:first');
+ parents = parents.add(element.find('[data-toggle="children"]:first'));
+ return this.expand(parents, dontStore);
+ }
+
+ elements = element.find('[data-toggle="children"]:first');
+ }
+
+ elements = $(elements || this.elements);
+ elements.each((index, element) => {
+ element = $(element);
+ let state = this.getState(element);
+
+ if (!state.isOpen) {
+ state.children.show();
+ state.icon.removeClass('children-closed').addClass('children-open');
+ if (!dontStore) { this.session[state.id] = 1; }
+ }
+ });
+
+ if (!dontStore) { this.save(); }
+ }
+
+ restore() {
+ this.collapse(null, true);
+
+ Object.keys(this.session).forEach((key) => {
+ this.expand(key, 'no-store');
+ });
+ }
+
+ save() {
+ return sessionStorage.setItem(sessionKey, JSON.stringify(this.session));
+ }
+
+ getState(element) {
+ element = $(element);
+
+ return {
+ id: element.closest('[data-nav-id]').data('nav-id'),
+ children: element.closest('li.page-item').find('ul:first'),
+ icon: element.find('.page-icon'),
+ get isOpen() { return this.icon.hasClass('children-open'); }
+ };
+ }
+}
+
+let Instance = new PagesTree('[data-toggle="children"]');
+export { Instance };
diff --git a/themes/grav/app/plugins/index.js b/themes/grav/app/plugins/index.js
new file mode 100644
index 00000000..276dd063
--- /dev/null
+++ b/themes/grav/app/plugins/index.js
@@ -0,0 +1,24 @@
+import $ from 'jquery';
+
+// Plugins sliders details
+$('.gpm-name, .gpm-actions').on('click', function(e) {
+ let element = $(this);
+ let target = $(e.target);
+ let tag = target.prop('tagName').toLowerCase();
+
+ if (tag === 'a' || element.parent('a').length) { return true; }
+
+ let wrapper = element.siblings('.gpm-details').find('.table-wrapper');
+
+ wrapper.slideToggle({
+ duration: 350,
+ complete: () => {
+ let visible = wrapper.is(':visible');
+ wrapper
+ .closest('tr')
+ .find('.gpm-details-expand i')
+ .removeClass('fa-chevron-' + (visible ? 'down' : 'up'))
+ .addClass('fa-chevron-' + (visible ? 'up' : 'down'));
+ }
+ });
+});
diff --git a/themes/grav/app/themes/index.js b/themes/grav/app/themes/index.js
new file mode 100644
index 00000000..8d174e2d
--- /dev/null
+++ b/themes/grav/app/themes/index.js
@@ -0,0 +1,10 @@
+import $ from 'jquery';
+
+// Themes Switcher Warning
+$(document).on('mousedown', '[data-remodal-target="theme-switch-warn"]', (event) => {
+ let name = $(event.target).closest('[data-gpm-theme]').find('.gpm-name a:first').text();
+ let remodal = $('.remodal.theme-switcher');
+
+ remodal.find('strong').text(name);
+ remodal.find('.button.continue').attr('href', $(event.target).attr('href'));
+});
diff --git a/themes/grav/app/updates/check.js b/themes/grav/app/updates/check.js
new file mode 100644
index 00000000..4991f021
--- /dev/null
+++ b/themes/grav/app/updates/check.js
@@ -0,0 +1,26 @@
+import $ from 'jquery';
+import { Instance as gpm } from '../utils/gpm';
+import { translations } from 'grav-config';
+import toastr from '../utils/toastr';
+
+// Check for updates trigger
+$('[data-gpm-checkupdates]').on('click', function() {
+ let element = $(this);
+ element.find('i').addClass('fa-spin');
+
+ gpm.fetch((response) => {
+ element.find('i').removeClass('fa-spin');
+ let payload = response.payload;
+
+ if (!payload) { return; }
+ if (!payload.grav.isUpdatable && !payload.resources.total) {
+ toastr.success(translations.PLUGIN_ADMIN.EVERYTHING_UP_TO_DATE);
+ } else {
+ var grav = payload.grav.isUpdatable ? 'Grav v' + payload.grav.available : '';
+ var resources = payload.resources.total ? payload.resources.total + ' ' + translations.PLUGIN_ADMIN.UPDATES_ARE_AVAILABLE : '';
+
+ if (!resources) { grav += ' ' + translations.PLUGIN_ADMIN.IS_AVAILABLE_FOR_UPDATE; }
+ toastr.info(grav + (grav && resources ? ' ' + translations.PLUGIN_ADMIN.AND + ' ' : '') + resources);
+ }
+ }, true);
+});
diff --git a/themes/grav/app/updates/index.js b/themes/grav/app/updates/index.js
new file mode 100644
index 00000000..b15dbb3e
--- /dev/null
+++ b/themes/grav/app/updates/index.js
@@ -0,0 +1,134 @@
+import $ from 'jquery';
+import { config, translations } from 'grav-config';
+import formatBytes from '../utils/formatbytes';
+import { Instance as gpm } from '../utils/gpm';
+import './check';
+import './update';
+
+export default class Updates {
+ constructor(payload = {}) {
+ this.setPayload(payload);
+ this.task = `task${config.param_sep}`;
+ }
+
+ setPayload(payload = {}) {
+ this.payload = payload;
+
+ return this;
+ }
+
+ fetch(force = false) {
+ gpm.fetch((response) => this.setPayload(response), force);
+
+ return this;
+ }
+
+ maintenance(mode = 'hide') {
+ let element = $('#updates [data-maintenance-update]');
+
+ element[mode === 'show' ? 'fadeIn' : 'fadeOut']();
+
+ if (mode === 'hide') {
+ $('.badges.with-updates').removeClass('with-updates').find('.badge.updates').remove();
+ }
+
+ return this;
+ }
+
+ grav() {
+ let payload = this.payload.grav;
+
+ if (payload.isUpdatable) {
+ let task = this.task;
+ let bar = `
+
+ Grav
v${payload.available} ${translations.PLUGIN_ADMIN.IS_NOW_AVAILABLE}!
(${translations.PLUGIN_ADMIN.CURRENT}v${payload.version})
+ `;
+
+ if (!payload.isSymlink) {
+ bar += `
${translations.PLUGIN_ADMIN.UPDATE_GRAV_NOW} `;
+ } else {
+ bar += `
`;
+ }
+
+ $('[data-gpm-grav]').addClass('grav').html(`
${bar}
`);
+ }
+
+ $('#grav-update-button').on('click', function() {
+ $(this).html(`${translations.PLUGIN_ADMIN.UPDATING_PLEASE_WAIT} ${formatBytes(payload.assets['grav-update'].size)}..`);
+ });
+
+ return this;
+ }
+
+ resources() {
+ if (!this.payload.resources.total) { return this.maintenance('hide'); }
+
+ let map = ['plugins', 'themes'];
+ let singles = ['plugin', 'theme'];
+ let task = this.task;
+ let { plugins, themes } = this.payload.resources;
+
+ if (!this.payload.resources.total) { return this; }
+
+ [plugins, themes].forEach(function(resources, index) {
+ if (!resources || Array.isArray(resources)) { return; }
+ let length = Object.keys(resources).length;
+ let type = map[index];
+
+ // sidebar
+ $(`#admin-menu a[href$="/${map[index]}"]`)
+ .find('.badges')
+ .addClass('with-updates')
+ .find('.badge.updates').text(length);
+
+ // update all
+ let title = type.charAt(0).toUpperCase() + type.substr(1).toLowerCase();
+ let updateAll = $(`.grav-update.${type}`);
+ updateAll.html(`
+
+
+ ${length} ${translations.PLUGIN_ADMIN.OF_YOUR} ${type} ${translations.PLUGIN_ADMIN.HAVE_AN_UPDATE_AVAILABLE}
+ ${translations.PLUGIN_ADMIN.UPDATE} All ${title}
+
+ `);
+
+ Object.keys(resources).forEach(function(item) {
+ // listing page
+ let element = $(`[data-gpm-${singles[index]}="${item}"] .gpm-name`);
+ let url = element.find('a');
+
+ if (type === 'plugins' && !element.find('.badge.update').length) {
+ element.append(`
${translations.PLUGIN_ADMIN.UPDATE_AVAILABLE}! `);
+ } else if (type === 'themes') {
+ element.append(`
`);
+ }
+
+ // details page
+ let details = $(`.grav-update.${singles[index]}`);
+ if (details.length) {
+ details.html(`
+
+
+ v${resources[item].available} ${translations.PLUGIN_ADMIN.OF_THIS} ${singles[index]} ${translations.PLUGIN_ADMIN.IS_NOW_AVAILABLE}!
+ ${translations.PLUGIN_ADMIN.UPDATE} ${singles[index].charAt(0).toUpperCase() + singles[index].substr(1).toLowerCase()}
+
+ `);
+ }
+ });
+ });
+ }
+}
+
+let Instance = new Updates();
+export { Instance };
+
+// automatically refresh UI for updates (graph, sidebar, plugin/themes pages) after every fetch
+gpm.on('fetched', (response, raw) => {
+ Instance.setPayload(response.payload || {});
+ Instance.grav().resources();
+});
+
+if (config.enable_auto_updates_check === '1') {
+ gpm.fetch();
+}
diff --git a/themes/grav/app/updates/update.js b/themes/grav/app/updates/update.js
new file mode 100644
index 00000000..fa4da70d
--- /dev/null
+++ b/themes/grav/app/updates/update.js
@@ -0,0 +1,19 @@
+import $ from 'jquery';
+import request from '../utils/request';
+
+// Dashboard update and Grav update
+$('body').on('click', '[data-maintenance-update]', function() {
+ let element = $(this);
+ let url = element.data('maintenanceUpdate');
+
+ element.attr('disabled', 'disabled').find('> .fa').removeClass('fa-cloud-download').addClass('fa-refresh fa-spin');
+
+ request(url, (response) => {
+ if (response.type === 'updategrav') {
+ $('[data-gpm-grav]').remove();
+ $('#footer .grav-version').html(response.version);
+ }
+
+ element.removeAttr('disabled').find('> .fa').removeClass('fa-refresh fa-spin').addClass('fa-cloud-download');
+ });
+});
diff --git a/themes/grav/app/utils/formatbytes.js b/themes/grav/app/utils/formatbytes.js
new file mode 100644
index 00000000..55cf34c0
--- /dev/null
+++ b/themes/grav/app/utils/formatbytes.js
@@ -0,0 +1,11 @@
+const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
+
+export default function formatBytes(bytes, decimals) {
+ if (bytes === 0) return '0 Byte';
+
+ let k = 1000;
+ let value = Math.floor(Math.log(bytes) / Math.log(k));
+ let decimal = decimals + 1 || 3;
+
+ return (bytes / Math.pow(k, value)).toPrecision(decimal) + ' ' + sizes[value];
+}
diff --git a/themes/grav/app/utils/gpm.js b/themes/grav/app/utils/gpm.js
new file mode 100644
index 00000000..e381e637
--- /dev/null
+++ b/themes/grav/app/utils/gpm.js
@@ -0,0 +1,58 @@
+import { parseJSON, parseStatus, userFeedbackError } from './response';
+import { config } from 'grav-config';
+import { EventEmitter } from 'events';
+
+export default class GPM extends EventEmitter {
+ constructor(action = 'getUpdates') {
+ super();
+ this.payload = {};
+ this.raw = {};
+ this.action = action;
+ }
+
+ setPayload(payload = {}) {
+ this.payload = payload;
+ this.emit('payload', payload);
+
+ return this;
+ }
+
+ setAction(action = 'getUpdates') {
+ this.action = action;
+ this.emit('action', action);
+
+ return this;
+ }
+
+ fetch(callback = () => true, flush = false) {
+ let data = new FormData();
+ data.append('task', 'GPM');
+ data.append('action', this.action);
+
+ if (flush) {
+ data.append('flush', true);
+ }
+
+ this.emit('fetching', this);
+
+ fetch(config.base_url_relative, {
+ credentials: 'same-origin',
+ method: 'post',
+ body: data
+ }).then((response) => { this.raw = response; return response; })
+ .then(parseStatus)
+ .then(parseJSON)
+ .then((response) => this.response(response))
+ .then((response) => callback(response, this.raw))
+ .then((response) => this.emit('fetched', this.payload, this.raw, this))
+ .catch(userFeedbackError);
+ }
+
+ response(response) {
+ this.payload = response;
+
+ return response;
+ }
+}
+
+export let Instance = new GPM();
diff --git a/themes/grav/app/utils/jquery-utils.js b/themes/grav/app/utils/jquery-utils.js
new file mode 100644
index 00000000..61242386
--- /dev/null
+++ b/themes/grav/app/utils/jquery-utils.js
@@ -0,0 +1,4 @@
+import $ from 'jquery';
+
+// jQuery no parents filter
+$.expr[':']['noparents'] = $.expr.createPseudo((text) => (element) => $(element).parents(text).length < 1);
diff --git a/themes/grav/app/utils/keepalive.js b/themes/grav/app/utils/keepalive.js
new file mode 100644
index 00000000..b99d9e13
--- /dev/null
+++ b/themes/grav/app/utils/keepalive.js
@@ -0,0 +1,32 @@
+import { config } from 'grav-config';
+import { userFeedbackError } from './response';
+
+class KeepAlive {
+ constructor() {
+ this.active = false;
+ }
+
+ start() {
+ let timeout = config.admin_timeout / 1.5 * 1000;
+ this.timer = setInterval(() => this.fetch(), timeout);
+ this.active = true;
+ }
+
+ stop() {
+ clearInterval(this.timer);
+ this.active = false;
+ }
+
+ fetch() {
+ let data = new FormData();
+ data.append('admin-nonce', config.admin_nonce);
+
+ fetch(`${config.base_url_relative}/task${config.param_sep}keepAlive`, {
+ credentials: 'same-origin',
+ method: 'post',
+ body: data
+ }).catch(userFeedbackError);
+ }
+}
+
+export default new KeepAlive();
diff --git a/themes/grav/app/utils/request.js b/themes/grav/app/utils/request.js
new file mode 100644
index 00000000..74065d13
--- /dev/null
+++ b/themes/grav/app/utils/request.js
@@ -0,0 +1,38 @@
+import { parseStatus, parseJSON, userFeedback, userFeedbackError } from './response';
+import { config } from 'grav-config';
+
+let raw;
+let request = function(url, options = {}, callback = () => true) {
+ if (typeof options === 'function') {
+ callback = options;
+ options = {};
+ }
+
+ if (options.method && options.method === 'post' && options.body) {
+ let data = new FormData();
+
+ options.body = Object.assign({ 'admin-nonce': config.admin_nonce }, options.body);
+ Object.keys(options.body).map((key) => data.append(key, options.body[key]));
+ options.body = data;
+ }
+
+ options = Object.assign({
+ credentials: 'same-origin',
+ headers: {
+ 'Accept': 'application/json'
+ }
+ }, options);
+
+ return fetch(url, options)
+ .then((response) => {
+ raw = response;
+ return response;
+ })
+ .then(parseStatus)
+ .then(parseJSON)
+ .then(userFeedback)
+ .then((response) => callback(response, raw))
+ .catch(userFeedbackError);
+};
+
+export default request;
diff --git a/themes/grav/app/utils/response.js b/themes/grav/app/utils/response.js
new file mode 100644
index 00000000..a8829e80
--- /dev/null
+++ b/themes/grav/app/utils/response.js
@@ -0,0 +1,68 @@
+import toastr from './toastr';
+import { config } from 'grav-config';
+
+let error = function(response) {
+ let error = new Error(response.statusText || response || '');
+ error.response = response;
+
+ return error;
+};
+
+export function parseStatus(response) {
+ if (response.status >= 200 && response.status < 300) {
+ return response;
+ } else {
+ throw error(response);
+ }
+}
+
+export function parseJSON(response) {
+ return response.json();
+}
+
+export function userFeedback(response) {
+ let status = response.status;
+ let message = response.message || null;
+ let settings = response.toastr || null;
+ let backup;
+
+ switch (status) {
+ case 'unauthenticated':
+ document.location.href = config.base_url_relative;
+ throw error('Logged out');
+ case 'unauthorized':
+ status = 'error';
+ message = message || 'Unauthorized.';
+ break;
+ case 'error':
+ status = 'error';
+ message = message || 'Unknown error.';
+ break;
+ case 'success':
+ status = 'success';
+ message = message || '';
+ break;
+ default:
+ status = 'error';
+ message = message || 'Invalid AJAX response.';
+ break;
+ }
+
+ if (settings) {
+ backup = Object.assign({}, toastr.options);
+ Object.keys(settings).forEach((key) => toastr.options[key] = settings[key]);
+ }
+
+ if (message) { toastr[status === 'success' ? 'success' : 'error'](message); }
+
+ if (settings) {
+ toastr.options = backup;
+ }
+
+ return response;
+}
+
+export function userFeedbackError(error) {
+ toastr.error(`Fetch Failed:
${error.message}
${error.stack}`);
+ console.error(`${error.message} at ${error.stack}`);
+}
diff --git a/themes/grav/app/utils/toastr.js b/themes/grav/app/utils/toastr.js
new file mode 100644
index 00000000..80109654
--- /dev/null
+++ b/themes/grav/app/utils/toastr.js
@@ -0,0 +1,6 @@
+import toastr from 'toastr';
+
+toastr.options.positionClass = 'toast-top-right';
+toastr.options.preventDuplicates = true;
+
+export default toastr;
diff --git a/themes/grav/css-compiled/template.css b/themes/grav/css-compiled/template.css
index 7619f18a..a0005189 100644
--- a/themes/grav/css-compiled/template.css
+++ b/themes/grav/css-compiled/template.css
@@ -1,2 +1,2 @@
-@import url(//fonts.googleapis.com/css?family=Montserrat:400|Lato:300,400,700|Ubuntu+Mono:400,700);#admin-login,#admin-logo h3,#admin-main .titlebar h1,#admin-main .titlebar .button-bar,#admin-main .flush-bottom.button-bar .button,#admin-main .danger.button-bar .button,#admin-main .success.button-bar .button,#admin-dashboard #updates .numeric,#admin-dashboard #popularity .stat,#admin-topbar #admin-mode-toggle,#admin-topbar #admin-lang-toggle{position:relative;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-o-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.button{display:inline-block;padding:0.3rem 1.5rem;font-weight:300;-webkit-font-smoothing:auto;cursor:pointer;vertical-align:middle;font-family:"Lato","Helvetica","Tahoma","Geneva","Arial",sans-serif}.button:active{margin:1px 0 -1px 0}.button i{margin-right:5px}.button-small.button{padding:2px 10px;font-size:1rem}.button-x-small.button{padding:2px 8px 2px 5px;font-size:0.9rem}html,body{height:100%}body{background:#314D5B;color:#fff;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{color:#0082BA}a:hover{color:#003b54}b,strong{font-weight:600}.bigger{font-size:1.2rem}.button-bar{text-align:right;float:right;z-index:2}.secondary-accent{background:#349886;color:#fff}.secondary-accent .button-bar{background:#349886}.secondary-accent .button{background:#41bea8}.tertiary-accent{background:#2693B7;color:#fff}.tertiary-accent .button-bar{background:#2693B7}.tertiary-accent .button{background:#2aa4cc;background:#3aafd6;color:rgba(255,255,255,0.85);border-radius:4px}.tertiary-accent .button:hover{background:#4fb8da;color:#fff}.tertiary-accent .button.dropdown-toggle{background:#4fb8da;border-left:1px solid #2aa4cc}.alert{font-size:1.1rem;padding:1rem 3rem}.info{background:#9055AF;color:#fff}.info a{color:#e6e6e6}.info a:hover{color:#fff}.info-reverse{color:#9055AF}.notice{background:#2693B7;color:#fff}.notice a{color:#e6e6e6}.notice a:hover{color:#fff}.error{background:#DA4B46;color:#fff}.error a{color:#e6e6e6}.error a:hover{color:#fff}.badge{display:inline-block;font-size:0.9rem;font-family:"Lato","Helvetica","Tahoma","Geneva","Arial",sans-serif;font-weight:700;border-radius:10px;padding:0px 6px;min-width:20px;line-height:20px;text-align:center}.empty-state{margin:0 auto;text-align:center;padding-top:100px}@font-face{font-family:"rockettheme-apps";font-weight:normal;font-style:normal;src:url("../fonts/rockettheme-apps/rockettheme-apps.eot");src:url("../fonts/rockettheme-apps/rockettheme-apps.eot?#iefix") format("embedded-opentype"),url("../fonts/rockettheme-apps/rockettheme-apps.woff") format("woff"),url("../fonts/rockettheme-apps/rockettheme-apps.ttf") format("truetype"),url("../fonts/rockettheme-apps/rockettheme-apps.svg#rockettheme-apps") format("svg")}i.fa-grav,i.fa-grav-spaceman,i.fa-grav-text,i.fa-grav-full,i.fa-grav-logo,i.fa-grav-symbol,i.fa-grav-logo-both,i.fa-grav-both,i.fa-gantry,i.fa-gantry-logo,i.fa-gantry-symbol,i.fa-gantry-logo-both,i.fa-gantry-both{font-family:'rockettheme-apps';speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-grav-logo:before,.fa-grav-text:before{content:"\61"}.fa-grav-symbol:before,.fa-grav:before,.fa-grav-spaceman:before{content:"\62"}.fa-grav-logo-both:before,.fa-grav-both:before,.fa-grav-full:before{content:"\66"}.fa-gantry-logo:before{content:"\64"}.fa-gantry:before,.fa-gantry-symbol:before{content:"\63"}.fa-gantry-logo-both:before,.fa-gantry-both:before{content:"\65"}.default-animation,.tab-bar span,.tab-bar a,.form-tabs>label{-webkit-transition:all 0.5s ease;-moz-transition:all 0.5s ease;transition:all 0.5s ease}.default-border-radius{border-radius:4px}.default-glow-shadow{box-shadow:0 0 20px rgba(0,0,0,0.2)}.default-box-shadow{box-shadow:0 10px 20px rgba(0,0,0,0.2)}.padding-horiz{padding-left:7rem;padding-right:7rem}@media only all and (max-width: 59.938em){.padding-horiz{padding-left:4rem;padding-right:4rem}}@media only all and (max-width: 47.938em){.padding-horiz{padding-left:1rem;padding-right:1rem}}.padding-vert{padding-top:3rem;padding-bottom:3rem}body{font-family:"Lato","Helvetica","Tahoma","Geneva","Arial",sans-serif;font-weight:400}h1,h2,h3,h4,h5,h6{font-family:"Montserrat","Helvetica","Tahoma","Geneva","Arial",sans-serif;font-weight:400;text-rendering:optimizeLegibility;letter-spacing:-0px}body.simple-fonts{font-family:'Helvetica Neue', Helvetica, Arial, sans-serif !important}body.simple-fonts h1,body.simple-fonts h2,body.simple-fonts h3,body.simple-fonts h4,body.simple-fonts h5,body.simple-fonts h6,body.simple-fonts #admin-menu li,body.simple-fonts .button,body.simple-fonts .tab-bar,body.simple-fonts .badge,body.simple-fonts #admin-main .grav-mdeditor-preview,body.simple-fonts .form .note,body.simple-fonts .form-tabs,body.simple-fonts input,body.simple-fonts select,body.simple-fonts textarea,body.simple-fonts button,body.simple-fonts .selectize-input,body.simple-fonts .form-order-wrapper ul#ordering li{font-family:'Helvetica Neue', Helvetica, Arial, sans-serif !important}h1{font-size:3.2rem}@media only all and (max-width: 47.938em){h1{font-size:2.5rem;line-height:1.2;margin-bottom:2.5rem}}@media only all and (min-width: 48em) and (max-width: 59.938em){h2{font-size:2.1rem}}@media only all and (max-width: 47.938em){h2{font-size:2rem}}@media only all and (min-width: 48em) and (max-width: 59.938em){h3{font-size:1.7rem}}@media only all and (max-width: 47.938em){h3{font-size:1.6rem}}@media only all and (min-width: 48em) and (max-width: 59.938em){h4{font-size:1.35rem}}@media only all and (max-width: 47.938em){h4{font-size:1.25rem}}h1{letter-spacing:-3px}h2{letter-spacing:-2px}h3{letter-spacing:-1px}blockquote{border-left:10px solid #F0F2F4}blockquote p{font-size:1.1rem;color:#999}blockquote cite{display:block;text-align:right;color:#666;font-size:1.2rem}blockquote>blockquote>blockquote{margin:0}blockquote>blockquote>blockquote p{padding:15px;display:block;font-size:1rem;margin-top:0rem;margin-bottom:0rem}blockquote>blockquote>blockquote>p{margin-left:-71px;border-left:10px solid #F0AD4E;background:#FCF8F2;color:#df8a13}blockquote>blockquote>blockquote>blockquote>p{margin-left:-94px;border-left:10px solid #D9534F;background:#FDF7F7;color:#b52b27}blockquote>blockquote>blockquote>blockquote>blockquote>p{margin-left:-118px;border-left:10px solid #5BC0DE;background:#F4F8FA;color:#28a1c5}blockquote>blockquote>blockquote>blockquote>blockquote>blockquote>p{margin-left:-142px;border-left:10px solid #5CB85C;background:#F1F9F1;color:#3d8b3d}code,kbd,pre,samp{font-family:"Ubuntu Mono",monospace}code{background:#f9f2f4;color:#9c1d3d}pre{padding:2rem;background:#f6f6f6;border:1px solid #ddd;border-radius:3px}pre code{color:#237794;background:inherit}hr{border-bottom:4px solid #F0F2F4}.label{vertical-align:middle;background:#0082BA;border-radius:100%;color:#fff;height:1rem;min-width:1rem;line-height:1rem;display:inline-block;text-align:center;font-size:0.7rem;font-family:"Montserrat","Helvetica","Tahoma","Geneva","Arial",sans-serif;margin-right:0.75rem}.switch-toggle a,.switch-light span span{display:none}@media only screen{.switch-light{display:inline-block;position:relative;overflow:visible;padding:0;margin-left:100px}.switch-light *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.switch-light a{display:block;-webkit-transition:all 0.1s ease-out;-moz-transition:all 0.1s ease-out;transition:all 0.1s ease-out}.switch-light label,.switch-light>span{vertical-align:middle}.switch-light input:focus ~ a,.switch-light input:focus+label{outline:1px dotted #888}.switch-light label{position:relative;z-index:3;display:block;width:100%}.switch-light input{position:absolute;opacity:0;z-index:5}.switch-light input:checked ~ a{right:0%}.switch-light>span{position:absolute;left:-100px;width:100%;margin:0;padding-right:100px;text-align:left}.switch-light>span span{position:absolute;top:0;left:0;z-index:5;display:block;width:50%;margin-left:100px;text-align:center}.switch-light>span span:last-child{left:50%}.switch-light a{position:absolute;right:50%;top:0;z-index:4;display:block;width:50%;height:100%;padding:0}.switch-toggle{display:inline-block;position:relative;padding:0 !important}.switch-toggle *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.switch-toggle a{display:block;-webkit-transition:all 0.1s ease-out;-moz-transition:all 0.1s ease-out;transition:all 0.1s ease-out}.switch-toggle label,.switch-toggle>span{vertical-align:middle}.switch-toggle input:focus ~ a,.switch-toggle input:focus+label{outline:1px dotted #888}.switch-toggle input{position:absolute;opacity:0}.switch-toggle input+label{position:relative;z-index:2;float:left;height:100%;margin:0;text-align:center}.switch-toggle a{position:absolute;top:0;left:0;padding:0;z-index:1;width:50%;height:100%}.switch-toggle input:last-of-type:checked ~ a{left:50%}.switch-toggle.switch-3 label,.switch-toggle.switch-3 a{width:33.33333%}.switch-toggle.switch-3 input:checked:nth-of-type(2) ~ a{left:33.33333%}.switch-toggle.switch-3 input:checked:last-of-type ~ a{left:66.66667%}.switch-toggle.switch-4 label,.switch-toggle.switch-4 a{width:25%}.switch-toggle.switch-4 input:checked:nth-of-type(2) ~ a{left:25%}.switch-toggle.switch-4 input:checked:nth-of-type(3) ~ a{left:50%}.switch-toggle.switch-4 input:checked:last-of-type ~ a{left:75%}.switch-toggle.switch-5 label,.switch-toggle.switch-5 a{width:20%}.switch-toggle.switch-5 input:checked:nth-of-type(2) ~ a{left:20%}.switch-toggle.switch-5 input:checked:nth-of-type(3) ~ a{left:40%}.switch-toggle.switch-5 input:checked:nth-of-type(4) ~ a{left:60%}.switch-toggle.switch-5 input:checked:last-of-type ~ a{left:80%}.switch-grav{background-color:#fff;border:1px solid #d5d5d5;border-radius:4px}.switch-grav label{color:#737C81;-webkit-transition:color 0.2s ease-out;-moz-transition:color 0.2s ease-out;transition:color 0.2s ease-out;padding:5px 20px}.switch-grav>span span{opacity:0;-webkit-transition:all 0.1s;-moz-transition:all 0.1s;transition:all 0.1s}.switch-grav>span span:first-of-type{opacity:1}.switch-grav a{background:#777;border-radius:3px}.switch-grav.switch-toggle input.highlight:checked ~ a{background:#41bea8}.switch-grav.switch-light input:checked ~ a{background-color:#777}.switch-grav.switch-light input:checked ~ span span:first-of-type{opacity:0}.switch-grav.switch-light input:checked ~ span span:last-of-type{opacity:1}.switch-grav input:checked+label{color:#fff}}@media only screen and (-webkit-max-device-pixel-ratio: 2) and (max-device-width: 1280px){.switch-light,.switch-toggle{-webkit-animation:webkitSiblingBugfix infinite 1s}}@-webkit-keyframes webkitSiblingBugfix{from{-webkit-transform:translate3d(0, 0, 0)}to{-webkit-transform:translate3d(0, 0, 0)}}form h1,form h3{color:#314D5B;padding:0 3rem 0.5rem;margin:0 0 1rem;border-bottom:3px solid #e1e1e1;font-size:1.5rem;text-align:left;letter-spacing:-1px}form p{padding:0 3rem}form pre{padding:1.5rem 3rem}form .note{font-family:"Lato","Helvetica","Tahoma","Geneva","Arial",sans-serif;color:#DA4B46}form .form-field{margin-bottom:1rem;padding-left:3rem}form .form-data{padding-right:3rem}form .required{color:#DA4B46;font-family:helvetica, arial;vertical-align:middle;line-height:1;font-size:30px;margin-left:5px}form label{padding:5px 0;font-weight:400;margin:0}form label.toggleable{display:inline}form input,form select,form textarea,form button,form .selectize-input{font-family:"Lato","Helvetica","Tahoma","Geneva","Arial",sans-serif;font-size:1rem;line-height:1.7;border-radius:4px;-webkit-font-smoothing:antialiased}form .selectize-dropdown{z-index:100000}form .form-column>.form-field.grid{display:block}form .form-column>.form-field.grid>.block{-webkit-box-flex:0;-moz-box-flex:0;box-flex:0;-webkit-flex:0;-moz-flex:0;-ms-flex:0;flex:0}form .grid.vertical{-webkit-flex-flow:column;-moz-flex-flow:column;flex-flow:column}form .form-select-wrapper,form .selectize-control.single .selectize-input{position:relative}form .form-select-wrapper:after,form .selectize-control.single .selectize-input:after{margin-top:0;border:0;position:absolute;content:'\f078';font-family:'FontAwesome';right:12px;top:50%;line-height:0;color:#9ba2a6;pointer-events:none}form .selectize-control{height:39px}form .selectize-input{box-shadow:none;color:#737C81;padding:5px 30px 5px 10px;margin:0}form .selectize-input>input{font-size:1rem;line-height:1.7}form .selectize-control.multi .selectize-input{padding:0.425rem 0.425rem}form .selectize-control.multi .selectize-input.has-items{padding-top:6px;padding-bottom:4px}form .selectize-control.multi .selectize-input>div{color:#737C81;border-radius:2px;line-height:1.5}form .selectize-control.multi .selectize-input>div.active{background:#d5d5d5}form .selectize-control.single .selectize-input:after{right:27px}form .selectize-control.single .selectize-input.dropdown-active:after{content:'\f077'}form .x-small{max-width:5rem !important}form .small{max-width:10rem !important}form .medium{max-width:20rem}form .medium textarea{height:7rem}form .large{max-width:30rem !important}form .large textarea{height:10rem}form select{width:100%;border:1px solid #d5d5d5;background:#fff;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:5px 30px 5px 10px;cursor:pointer;margin:0}form input[type=text],form input[type=password],form input[type=email],form input[type=date]{width:100%;border:1px solid #d5d5d5;background:#fff}form input[readonly=readonly]{background:#f2f2f2;font-weight:bold}form textarea{width:100%;border:1px solid #d5d5d5;background:#fff}form .form-frontmatter-wrapper{border:1px solid #d5d5d5;border-radius:4px}form .switch-toggle label{cursor:pointer}form .switch-toggle a,form .switch-toggle label{outline:none !important}form .dynfields input[type=text],form [data-grav-field="array"] input[type=text]{width:40%;float:left;margin:0 5px 5px 0}form .dynfields .form-row,form [data-grav-field="array"] .form-row{display:inline-block}form .dynfields .form-row span,form [data-grav-field="array"] .form-row span{padding:0.5rem;display:inline-block;line-height:1.7;cursor:pointer}form .dynfields .form-row.array-field-value_only,form [data-grav-field="array"] .form-row.array-field-value_only{width:100%}form .button-bar{margin-top:1rem;background:#e6e6e6;padding:1.2rem 3rem;width:100%;border-bottom-left-radius:5px;border-bottom-right-radius:5px}form .checkboxes{display:inline-block;padding:5px 0}form .checkboxes label{display:inline;cursor:pointer;position:relative;padding:0 0 0 2rem;margin-right:15px}form .checkboxes label:before{content:"";display:inline-block;width:1.5rem;height:1.5rem;top:50%;left:0;margin-top:-0.75rem;margin-right:10px;position:absolute;background:#fff;border:1px solid #d5d5d5;border-radius:4px}form .checkboxes input[type=checkbox]{display:none}form .checkboxes input[type=checkbox]:checked+label:before{content:"\f00c";font-family:"FontAwesome";font-size:1.2rem;line-height:1;text-align:center}form .checkboxes.toggleable label{margin-right:0}.form-display-wrapper p{padding-left:0;padding-right:0}.form-display-wrapper p:first-child{margin-top:0}.form-frontmatter-wrapper{margin-bottom:3rem}.form-frontmatter-wrapper .dragbar{height:4px;background:#d5d5d5;cursor:row-resize}#frontmatter+.CodeMirror{border-radius:4px;padding:10px;height:130px}.form-order-wrapper ul#ordering{list-style:none;margin:0;padding:0}.form-order-wrapper ul#ordering li{padding:0.2rem 1rem;border-radius:4px;border:1px solid #d5d5d5;background:#f8f8f8;color:#8d959a;margin:3px 0;position:relative;font-family:"Lato","Helvetica","Tahoma","Geneva","Arial",sans-serif}.form-order-wrapper ul#ordering li.drag-handle{cursor:move;background:#fff;color:#5b6266}.form-order-wrapper ul#ordering li.drag-handle::after{content:'\f0c9';font-family:FontAwesome;position:absolute;right:10px}.form-list-wrapper ul[data-collection-holder]{list-style:none;margin:0;padding:0}.form-list-wrapper ul[data-collection-holder] li{cursor:move;padding:1rem;border-radius:4px;border:1px solid #d5d5d5;background:#f8f8f8;color:#8d959a;margin:3px 0;position:relative;font-family:"Lato","Helvetica","Tahoma","Geneva","Arial",sans-serif}.form-list-wrapper ul[data-collection-holder] li .item-actions{position:absolute;right:10px;top:4px;color:#5b6266}.form-list-wrapper ul[data-collection-holder] li .item-actions .fa-trash-o{cursor:pointer}.form-list-wrapper .collection-actions{text-align:right}.form-label.block{z-index:10000}.form-label.block:hover{z-index:10005}#admin-main .admin-block h2{font-size:1.25rem;margin:0 0 .5rem;letter-spacing:normal}.form-fieldset{background-color:#f7f7f7;border:2px solid #e1e1e1;margin:1rem 2rem}.form-fieldset--label{background-color:#f3f3f3}.form-fieldset--label:hover,.form-fieldset input:checked+.form-fieldset--label{background-color:#eee}.form-fieldset--label label{display:table;font-size:1.25rem;padding:.5rem 1rem;width:100%}.form-fieldset--label h2{margin:0 !important}.form-fieldset--label .actions{font-size:initial;display:table-cell;text-align:right;vertical-align:middle}.form-fieldset--label+.form-data{margin-top:1rem;padding:0}.form-fieldset--cursor{cursor:pointer}.form-fieldset--info{font-size:small}.form-fieldset>input:checked ~ .form-data,.form-fieldset--collapsible .open,.form-fieldset input:checked ~ .form-label .form-fieldset--collapsible .close{display:block}.form-fieldset>.form-data,.form-fieldset--collapsible .close,.form-fieldset input:checked ~ .form-label .form-fieldset--collapsible .open{display:none}table,tbody,thead{display:inline-block;width:100%}.gpm-details{width:100%;-webkit-box-flex:auto;-moz-box-flex:auto;box-flex:auto;-webkit-flex:auto;-moz-flex:auto;-ms-flex:auto;flex:auto}td{border:0;border-bottom:1px solid #e1e1e1}tr{-webkit-transition:all 0.2s ease;-moz-transition:all 0.2s ease;transition:all 0.2s ease;display:-webkit-box;display:-moz-box;display:box;display:-webkit-flex;display:-moz-flex;display:-ms-flexbox;display:flex;-webkit-box-lines:multiple;-moz-box-lines:multiple;box-lines:multiple;-webkit-flex-wrap:wrap;-moz-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}tr th{display:block;-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;-webkit-flex:1;-moz-flex:1;-ms-flex:1;flex:1;font-weight:bold}tr th:first-child{padding-left:3rem}tr th:last-child{padding-right:3rem}tr td{display:block;-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;-webkit-flex:1;-moz-flex:1;-ms-flex:1;flex:1}tr td.double{-webkit-box-flex:2;-moz-box-flex:2;box-flex:2;-webkit-flex:2;-moz-flex:2;-ms-flex:2;flex:2}tr td:first-child{padding-left:3rem}@media only all and (max-width: 47.938em){tr td:first-child{padding-left:.5rem}tr td:first-child .plugin-update-button{float:left}}tr td:last-child,tr td.gpm-actions{padding-right:3rem}tr td.gpm-actions{line-height:1;text-align:right;position:relative}tr td.gpm-actions .gpm-details-expand{position:absolute;top:12px;right:12px}tr td.gpm-details{margin:0;padding:0;background-color:#f7f7f7}@media only all and (max-width: 47.938em){tr td.gpm-details{word-wrap:break-word}}tr td.gpm-details>.table-wrapper{display:none}tr td.gpm-details>.table-wrapper td{border-bottom:0}tr td.gpm-details tbody{width:100%}tr:last-child td{border-bottom:0}tr:hover{background:#f3f3f3}.k-calendar-container table,.k-calendar-container tbody,.k-calendar-container thead{width:100%}.k-calendar-container thead th:first-child{padding-left:0}.k-calendar-container thead th:last-child{padding-right:0.5rem}.button{background:#41bea8;color:rgba(255,255,255,0.85);border-radius:4px}.button:hover{background:#54c5b0;color:#fff}.button.dropdown-toggle{background:#54c5b0;border-left:1px solid #3bab97}.button.dropdown-toggle{border-left:1px solid #3bab97}.button.secondary{background:#2a7a6b;color:rgba(255,255,255,0.85);border-radius:4px}.button.secondary:hover{background:#318d7c;color:#fff}.button.secondary.dropdown-toggle{background:#318d7c;border-left:1px solid #23675a}.button.secondary.dropdown-toggle{border-left:1px solid #318d7c}.button-group{position:relative;display:inline-block;vertical-align:middle}.button-group>.button:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0 !important;border-bottom-right-radius:0 !important}.button-group>.button:first-child{margin-left:0 !important}.button-group>.button{position:relative;float:left}.button-group>.button+.dropdown-toggle{text-align:center;padding-right:8px;padding-left:8px}.button-group>.button+.dropdown-toggle i{margin:0}.button-group>.button:last-child:not(:first-child),.button-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0 !important;border-bottom-left-radius:0 !important}.button-group .button+.button,.button-group .button+.button-group,.button-group .button-group+.button,.button-group .button-group+.button-group{margin-left:-1px}.button-group .dropdown-menu{position:absolute;top:100%;left:0;right:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#41bea8;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #3bab97;border:1px solid rgba(0,0,0,0.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.175);box-shadow:0 6px 12px rgba(0,0,0,0.175)}.button-group .dropdown-menu.language-switcher{min-width:auto}.button-group .dropdown-menu.lang-switcher{min-width:150px;left:inherit}.button-group .dropdown-menu.lang-switcher button{width:100%}.button-group .dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#349886}.button-group .dropdown-menu li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#fff;white-space:nowrap}.button-group .dropdown-menu li>a:focus,.button-group .dropdown-menu li>a:hover{color:#fff;text-decoration:none;background-color:#349886}.button-group .dropdown-menu.language-switcher a.active{background-color:#349886}.open>.dropdown-menu{display:block}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}#error{text-align:center;display:flex;align-items:center;justify-content:center;height:100%;padding-bottom:6rem}#error h1{font-size:5rem}#error p{margin:1rem 0}#admin-login{background:#253A47;max-width:24rem;margin:0 auto}#admin-login.wide{max-width:50rem}#admin-login.wide h1{height:100px}#admin-login.wide form>.padding{padding:3rem 2rem 8rem 2rem}#admin-login.wide form>.padding>div{width:50%;display:inline-block;margin-right:-2px}@media only all and (max-width: 47.938em){#admin-login.wide form>.padding>div{width:100%;margin-right:0}}#admin-login.wide form>.padding .form-field{padding:0 1rem}#admin-login.wide form label{padding:0}#admin-login.wide form input{margin-bottom:1rem;text-align:left}#admin-login.wide form input::-webkit-input-placeholder{color:#83949d;font-size:1rem;line-height:2rem}#admin-login.wide form input::-moz-placeholder{color:#83949d;font-size:1rem;line-height:2rem}#admin-login.wide form input:-moz-placeholder{color:#83949d;font-size:1rem;line-height:2rem}#admin-login.wide form input:-ms-input-placeholder{color:#83949d;font-size:1rem;line-height:2rem}#admin-login.wide .grid{display:block}#admin-login.wide .form-label,#admin-login.wide .form-data{display:block;width:100%;-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;-webkit-flex:1;-moz-flex:1;-ms-flex:1;flex:1}#admin-login .form-field{padding-left:0;margin-bottom:0}#admin-login .form-label{display:none}#admin-login .form-data{padding-right:0}#admin-login .wrapper-spacer{width:100% !important;display:block !important;padding:0 1rem}#admin-login .wrapper-spacer h3{padding-left:1rem;color:rgba(255,255,255,0.4);border-bottom:3px solid rgba(255,255,255,0.1)}#admin-login .instructions{display:block;padding:2rem 3rem 0;margin:0;font-size:1.3rem;color:rgba(255,255,255,0.8)}#admin-login .instructions p{margin:0}#admin-login h1{background:#21333e url(../images/logo.png) 50% 50% no-repeat;font-size:0;color:transparent;height:216px;margin:0}#admin-login form{position:relative}#admin-login form .padding{padding:3rem 3rem 6rem 3rem}#admin-login form input{margin-bottom:2rem;background:#314D5B;color:#fff;font-size:1.4rem;line-height:1.5;text-align:center;font-weight:300;-webkit-font-smoothing:auto;border:1px solid #1e2e39}#admin-login form input::-webkit-input-placeholder{color:#83949d}#admin-login form input::-moz-placeholder{color:#83949d}#admin-login form input:-moz-placeholder{color:#83949d}#admin-login form input:-ms-input-placeholder{color:#83949d}#admin-login form .form-actions{display:block !important;width:100% !important;text-align:center;position:absolute;bottom:0;left:0;right:0;padding:1.5rem 3rem}#admin-login form .form-actions button:first-child{margin-right:1rem}#admin-login .alert{text-align:center;padding:1rem 3rem}#admin-sidebar{position:absolute;left:0;top:0;bottom:0;width:20%;background:#253A47}@media only all and (max-width: 47.938em){#admin-sidebar{display:none;width:75%;z-index:999999}}#admin-sidebar a{color:#ccc}#admin-sidebar a:hover{color:#fff}#admin-logo{background:#21333e;height:4.2rem}#admin-logo h3{text-transform:uppercase;margin:0;text-align:center;font-size:1.2rem}#admin-logo h3 i{font-size:1rem;vertical-align:middle;margin-top:-1px}#admin-user-details,.admin-user-details{padding:2rem;border-bottom:1px solid #21333e;overflow:hidden}#admin-user-details img,.admin-user-details img{-webkit-transition:all 0.5s ease;-moz-transition:all 0.5s ease;transition:all 0.5s ease;border-radius:100%;float:left}@media only all and (min-width: 48em) and (max-width: 59.938em){#admin-user-details img,.admin-user-details img{float:none}}#admin-user-details:hover img,.admin-user-details:hover img{box-shadow:0px 0px 0 50px #2a4251}#admin-user-details .admin-user-names,.admin-user-details .admin-user-names{margin-left:45px}@media only all and (min-width: 48em) and (max-width: 59.938em){#admin-user-details .admin-user-names,.admin-user-details .admin-user-names{margin-left:0}}#admin-user-details .admin-user-names h4,#admin-user-details .admin-user-names h5,.admin-user-details .admin-user-names h4,.admin-user-details .admin-user-names h5{color:#e6e6e6;margin:0;font-size:1rem;line-height:1.3}#admin-user-details .admin-user-names h5,.admin-user-details .admin-user-names h5{font-family:"Lato","Helvetica","Tahoma","Geneva","Arial",sans-serif;color:#afc7d5;font-size:0.9rem}#admin-menu{display:block;margin:0;padding:0;list-style:none}#admin-menu li{font-family:"Montserrat","Helvetica","Tahoma","Geneva","Arial",sans-serif}#admin-menu li .badges{float:right;margin-right:1rem}#admin-menu li .badges .badge{display:inline-block;margin-right:-5px;color:#e6e6e6}#admin-menu li .badges .count{background-color:#365569}#admin-menu li .badges .updates{background-color:#2693B7;display:none}#admin-menu li .badges.with-updates .count{border-bottom-left-radius:0;border-top-left-radius:0}#admin-menu li .badges.with-updates .updates{border-bottom-right-radius:0;border-top-right-radius:0;display:inline-block}#admin-menu li a{-webkit-transition:all 0.2s ease;-moz-transition:all 0.2s ease;transition:all 0.2s ease;display:block;padding-left:25px;padding-top:0.7rem;padding-bottom:0.7rem;color:#d1dee7}@media only all and (min-width: 48em) and (max-width: 59.938em){#admin-menu li a{padding-left:20px}}#admin-menu li a i{-webkit-transition:all 0.2s ease;-moz-transition:all 0.2s ease;transition:all 0.2s ease;color:#afc7d5;margin-right:8px}@media only all and (min-width: 48em) and (max-width: 59.938em){#admin-menu li a i{display:none}}#admin-menu li a:hover{background:#21333e;color:#fff}#admin-menu li a:hover i{font-size:1.2rem}#admin-menu li.selected a{background:#314D5B;color:#fff;padding-left:16px;border-left:9px solid #349886}@media only all and (min-width: 48em) and (max-width: 59.938em){#admin-menu li.selected a{padding-left:11px}}#admin-menu li.selected a i{color:#e1eaf0}#admin-main{margin-left:20%}@media only all and (max-width: 47.938em){#admin-main{width:100%;margin-left:0}}#admin-main .hint:after,#admin-main [data-hint]:after{font-size:0.9rem;width:400px;line-height:inherit;white-space:normal}#admin-main h1{margin:0;font-size:1.5rem;text-align:left;letter-spacing:-1px}#admin-main .padding{padding:3rem}#admin-main .titlebar{position:relative;height:4.2rem;padding:0 3rem}@media only all and (max-width: 47.938em){#admin-main .titlebar{height:7.2rem;margin-top:-5.5rem;position:relative}}@media only all and (max-width: 47.938em){#admin-main .titlebar h1{transform:inherit;top:5px;font-size:1.2rem;display:block;text-align:center;padding:20px 0px;margin-top:-90px;z-index:2}#admin-main .titlebar h1>i:first-child:before{content:"\f0c9"}}@media only all and (max-width: 381px){#admin-main .titlebar h1{margin-top:-138px}}@media only all and (max-width: 47.938em){#admin-main .titlebar h1 .fa-th{cursor:pointer;float:left}}#admin-main .titlebar .button-bar{padding:0}@media only all and (max-width: 47.938em){#admin-main .titlebar .button-bar{text-align:center;display:block;float:none;margin:5rem auto 0px;padding-top:70px}}#admin-main .titlebar .preview{color:#fff;font-size:90%}#admin-main .titlebar .button{padding:0.3rem 0.6rem}@media only all and (max-width: 47.938em){#admin-main .titlebar .button{padding:0.2rem 0.5rem;font-size:0.9rem}}#admin-main .titlebar .button i{font-size:13px}#admin-main .admin-block .grav-update,#admin-main .admin-block .alert{margin-top:-2rem;margin-bottom:2rem}#admin-main .grav-update{padding:0 3rem;margin-top:-3rem;background:#9055AF;color:#fff}#admin-main .grav-update:after{content:"";display:table;clear:both}#admin-main .grav-update.plugins{padding-right:1rem}#admin-main .grav-update .button{float:right;margin-top:0.6rem;margin-left:1rem;line-height:1.5;background:#73448c;color:rgba(255,255,255,0.85);border-radius:4px}#admin-main .grav-update .button:hover{background:#814c9d;color:#fff}#admin-main .grav-update .button.dropdown-toggle{background:#814c9d;border-left:1px solid #653c7b}#admin-main .grav-update p{line-height:3rem;margin:0}#admin-main .grav-update i{padding-right:0.5rem}#admin-main .grav-update .less{color:rgba(255,255,255,0.75)}#admin-main .grav-update.grav{margin-top:0;-webkit-transition:margin-top 0.15s ease-out;-moz-transition:margin-top 0.15s ease-out;transition:margin-top 0.15s ease-out}@media only all and (max-width: 47.938em){#admin-main .grav-update.grav{position:absolute;z-index:9;bottom:0;width:100%}#admin-main .grav-update.grav p *{display:none}#admin-main .grav-update.grav p{font-size:0}#admin-main .grav-update.grav p button{width:95%;display:inherit;position:absolute;top:0;left:0;margin-left:2.5%;margin-right:2.5%;padding-left:0}}#admin-main .grav-update.grav+.content-padding{top:7.2rem;-webkit-transition:top 0.15s ease-out;-moz-transition:top 0.15s ease-out;transition:top 0.15s ease-out}@media only all and (max-width: 47.938em){#admin-main .grav-update.grav+.content-padding{top:7.2rem;padding-bottom:8rem;padding-top:0rem}}#admin-main .content-padding{position:absolute;top:4.2rem;bottom:0;left:20%;right:0;overflow-y:auto;padding:2.5rem}@media only all and (max-width: 47.938em){#admin-main .content-padding{top:7.2rem;left:0}}#admin-main .admin-block{background:#eee;color:#737C81;padding:2rem 0}#admin-main .admin-block h1{color:#314D5B;padding:0 3rem 0.5rem;margin:0 0 1rem;border-bottom:3px solid #e1e1e1}@media only all and (max-width: 47.938em){#admin-main .admin-block h1{padding:0 0 0.5rem;margin:0 0 1rem !important;text-indent:3rem}}#admin-main .admin-block h1.no_underline{border-bottom:0}#admin-main .admin-block .button-bar{margin-right:3rem}@media only all and (max-width: 47.938em){#admin-main .admin-block .button-bar{width:100%;margin:-.5rem 0 1rem 0;text-align:center}#admin-main .admin-block .button-bar .button{width:100%}}#admin-main .flush-bottom.button-bar{margin:1rem -2rem -1rem;height:70px;padding:0 1rem;float:none}@media only all and (max-width: 47.938em){#admin-main .flush-bottom.button-bar{height:auto;padding:2rem 1rem 0rem 1rem}}@media only all and (max-width: 47.938em){#admin-main .flush-bottom.button-bar .button{margin-left:0 !important;margin-bottom:.5rem;width:100%}}#admin-main .danger,#admin-main .success{position:relative}#admin-main .danger.button-bar,#admin-main .success.button-bar{margin:2rem 0 -2rem;height:70px;padding:1rem;float:none;background:#e9e9e9}#admin-main .danger.button-bar .button{background:#DA4B46;color:rgba(255,255,255,0.85);border-radius:4px}#admin-main .danger.button-bar .button:hover{background:#de605b;color:#fff}#admin-main .danger.button-bar .button.dropdown-toggle{background:#de605b;border-left:1px solid #d63631}#admin-dashboard:after{content:"";display:table;clear:both}#admin-dashboard .dashboard-item{float:left;width:50%;margin-bottom:2.5rem}@media only all and (max-width: 47.938em){#admin-dashboard .dashboard-item{width:100%}}#admin-dashboard .dashboard-item>div{padding:1rem 2rem}#admin-dashboard .dashboard-left{padding-right:1.25rem}@media only all and (max-width: 47.938em){#admin-dashboard .dashboard-left{padding-right:0rem}}#admin-dashboard .dashboard-right{padding-left:1.25rem}@media only all and (max-width: 47.938em){#admin-dashboard .dashboard-right{padding-left:0rem}}#admin-dashboard #updates p{text-align:center;color:rgba(255,255,255,0.96);margin:0}#admin-dashboard #updates .updates-chart{width:50%;float:left}#admin-dashboard #updates .chart-wrapper{position:relative}#admin-dashboard #updates .backups-chart{position:relative;width:50%;float:left}#admin-dashboard #updates .numeric{display:block;position:absolute;width:100%;text-align:center;font-size:1.7rem;line-height:1}#admin-dashboard #updates .numeric em{display:block;font-style:normal;font-size:1rem;color:rgba(255,255,255,0.85)}#admin-dashboard #updates .admin-update-charts{min-height:191px}#admin-dashboard #updates .admin-update-charts:after{content:"";display:table;clear:both}#admin-dashboard #updates .button{margin-left:0.5rem}@media only all and (min-width: 48em) and (max-width: 59.938em){#admin-dashboard #updates .button{width:49%;padding:.3rem 0rem;margin-left:0}}#admin-dashboard #popularity p{text-align:center;color:rgba(255,255,255,0.95);margin:0}#admin-dashboard #popularity .button-bar{height:100px;padding:0 1rem}#admin-dashboard #popularity .stat{display:block;float:left;width:33%;text-align:center}#admin-dashboard #popularity .stat b{display:block;font-size:2.5rem;line-height:1;font-weight:300}#admin-dashboard #popularity .stat i{display:block;font-style:normal;color:rgba(255,255,255,0.75)}#admin-dashboard .tertiary-accent{background-color:#2693B7;background-image:-webkit-linear-gradient(#2693B7,#64c0df);background-image:linear-gradient(#2693B7,#64c0df)}#admin-dashboard .secondary-accent{background-color:#349886;background-image:-webkit-linear-gradient(#349886,#67cbb9);background-image:linear-gradient(#349886,#67cbb9)}.no-flick,.card-item{-webkit-transform:translate3d(0, 0, 0)}.card-row{-webkit-box-pack:justify;-moz-box-pack:justify;box-pack:justify;-webkit-justify-content:space-between;-moz-justify-content:space-between;-ms-justify-content:space-between;-o-justify-content:space-between;justify-content:space-between;-ms-flex-pack:justify}.card-item{overflow:hidden;padding:1rem;margin:0;position:relative;width:31%;border:1px solid #e1e1e1;background:#fff;margin-bottom:2rem}@media only all and (min-width: 48em) and (max-width: 59.938em){.card-item{width:48%}}@media only all and (max-width: 47.938em){.card-item{width:100%}}.card-item h4{font-size:1.2rem;line-height:1.2}.user-details{text-align:center}.user-details img{border-radius:100%}.user-details h2{margin:0;font-size:1.8rem}.user-details h5{color:#8d959a;font-size:1.1rem;margin:0}#footer{text-align:center;padding:3rem 0 1rem}.ct-chart .ct-series .ct-bar{stroke-width:20px}.ct-chart .ct-series.ct-series-a .ct-bar{stroke:rgba(255,255,255,0.85) !important}.ct-chart .ct-series.ct-series-a .ct-slice-donut{stroke:#fff !important}.ct-chart .ct-series.ct-series-b .ct-slice-donut{stroke:rgba(255,255,255,0.2) !important}#popularity .ct-chart{margin:0 -10px -10px}#popularity .ct-chart .ct-chart-bar{padding:10px}#latest .page-title,#latest .page-route{overflow:auto}#latest .last-modified{padding-left:10px}#overlay{position:fixed;width:25%;height:100%;z-index:999999;left:75%;top:0;display:none}.gpm-item-info+#blueprints .block-tabs{padding-top:16px}.pages-list{list-style:none;margin:0;padding:0;border-top:1px solid #e1e1e1}.pages-list ul{list-style:none;margin:0;padding:0}.pages-list li{margin:0;padding:0}.pages-list .row{-webkit-transition:all 0.2s ease;-moz-transition:all 0.2s ease;transition:all 0.2s ease;border-bottom:1px solid #e1e1e1;line-height:2.5rem;padding-right:3rem}.pages-list .row:hover{background:#f3f3f3}.pages-list .row p.page-route{display:block;margin:-10px 0 5px 25px;line-height:1;font-size:0.9rem;color:#888;text-shadow:1px 1px 0 #fff}.pages-list .row p.page-route .spacer{color:#d5d5d5;display:inline-block;margin:0 0.3rem}.pages-list .row .hint--bottom:before,.pages-list .row .hint--bottom:after{left:4px}.pages-list .row .hint:after,.pages-list .row [data-hint]:after{border-radius:2px}.pages-list .row .badge.lang{background-color:#aaa;color:white;margin-left:8px}.pages-list .row .badge.lang.info{background-color:#9055AF}.pages-list .page-tools{display:inline-block;float:right;font-size:1.4rem}.pages-list .page-tools i{margin-left:10px}.pages-list .page-home{font-size:1.4rem;margin-left:10px;color:#bbb;vertical-align:middle}.pages-list .page-info{font-size:1.1rem;margin-left:10px;color:#bbb;vertical-align:middle}.pages-list .page-icon{color:#0082BA;font-weight:700}.pages-list .page-icon.children-open:before{content:'\f056'}.pages-list .page-icon.children-closed:before{content:'\f055'}.pages-list .page-icon.not-routable{color:#CE431D}.pages-list .page-icon.not-visible{color:#999}.pages-list .page-icon.modular{color:#9055AF}#page-filtering{margin:-2rem 3rem 1rem}#page-filtering:after{content:"";display:table;clear:both}#page-filtering .page-filters{width:60%;float:left}@media only all and (max-width: 47.938em){#page-filtering .page-filters{width:100%}}#page-filtering .page-search{position:relative;width:40%;float:left;padding-left:2rem;text-indent:2.5rem}#page-filtering .page-search:after{position:absolute;right:15px;top:10px;content:'\f002';font-family:'FontAwesome'}@media only all and (max-width: 47.938em){#page-filtering .page-search{width:100%;padding-top:1rem;padding-left:0rem}#page-filtering .page-search:after{top:1.5rem}}#page-filtering .page-shortcuts{clear:both;padding-top:5px}#page-filtering .page-shortcuts:after{content:"";display:table;clear:both}#page-filtering .page-shortcuts .button{background:#aaa;color:rgba(255,255,255,0.85);border-radius:4px}#page-filtering .page-shortcuts .button:hover{background:#b7b7b7;color:#fff}#page-filtering .page-shortcuts .button.dropdown-toggle{background:#b7b7b7;border-left:1px solid #9d9d9d}#page-filtering .selectize-control.multi .selectize-input{padding:0.425rem 0.425rem}#page-filtering .selectize-control.multi .selectize-input.has-items{padding-top:6px;padding-bottom:4px}#page-filtering .selectize-control.multi .selectize-input input{font-size:1rem;line-height:1.7}#page-filtering .selectize-control.multi .selectize-input>div,#page-filtering .selectize-control.multi .selectize-input>div.active{color:#777;padding:2px 10px}#page-filtering .selectize-control.multi .selectize-input>div[data-value='Routable'],#page-filtering .selectize-control.multi .selectize-input>div.active[data-value='Routable']{background:#CE431D;color:#fff}#page-filtering .selectize-control.multi .selectize-input>div[data-value='NonRoutable'],#page-filtering .selectize-control.multi .selectize-input>div.active[data-value='NonRoutable']{color:#CE431D}#page-filtering .selectize-control.multi .selectize-input>div[data-value='Visible'],#page-filtering .selectize-control.multi .selectize-input>div.active[data-value='Visible']{background:#71B15E;color:#fff}#page-filtering .selectize-control.multi .selectize-input>div[data-value='NonVisible'],#page-filtering .selectize-control.multi .selectize-input>div.active[data-value='NonVisible']{color:#71B15E}#page-filtering .selectize-control.multi .selectize-input>div[data-value='Modular'],#page-filtering .selectize-control.multi .selectize-input>div.active[data-value='Modular']{background:#9055AF;color:#fff}#page-filtering .selectize-control.multi .selectize-input>div[data-value='NonModular'],#page-filtering .selectize-control.multi .selectize-input>div.active[data-value='NonModular']{color:#9055AF}#page-filtering .selectize-control.multi .selectize-input>div[data-value='Published'],#page-filtering .selectize-control.multi .selectize-input>div.active[data-value='Published']{background:#0093B8;color:#fff}#page-filtering .selectize-control.multi .selectize-input>div[data-value='NonPublished'],#page-filtering .selectize-control.multi .selectize-input>div.active[data-value='NonPublished']{color:#0093B8}.admin-form-wrapper{position:relative}#admin-topbar{position:absolute;right:0.5rem;height:3.5rem}@media only all and (max-width: 47.938em){#admin-topbar{width:100%;right:0;top:.25rem;padding:0 .5rem}}#admin-topbar #admin-mode-toggle,#admin-topbar #admin-lang-toggle{height:37px;display:inline-block;vertical-align:inherit}#admin-topbar #admin-lang-toggle{z-index:10}#admin-topbar #admin-lang-toggle button{background:#73448c;color:rgba(255,255,255,0.85);border-radius:4px}#admin-topbar #admin-lang-toggle button:hover{background:#814c9d;color:#fff}#admin-topbar #admin-lang-toggle button.dropdown-toggle{background:#814c9d;border-left:1px solid #653c7b}#admin-topbar #admin-lang-toggle .dropdown-menu{background:#9055AF}#admin-topbar #admin-lang-toggle .dropdown-menu button{background:transparent;color:#fff;width:100%}#admin-topbar .switch-grav{border:0;background-color:#365569}@media only all and (max-width: 47.938em){#admin-topbar .switch-toggle{width:100%}}#admin-topbar .switch-toggle input:checked+label{color:#fff}#admin-topbar .switch-toggle input+label{color:#d1dee7}#admin-topbar .switch-toggle input.highlight:checked ~ a{background:#3aafd6}body .selectize-dropdown .optgroup-header{color:#000;border-bottom:1px solid #eee;background-color:#fafafa}.depth-0 .row{padding-left:3rem}.depth-1 .row{padding-left:6rem}.depth-2 .row{padding-left:9rem}.depth-3 .row{padding-left:12rem}.depth-4 .row{padding-left:15rem}.depth-5 .row{padding-left:18rem}.depth-6 .row{padding-left:21rem}.depth-7 .row{padding-left:24rem}.depth-8 .row{padding-left:27rem}.depth-9 .row{padding-left:30rem}.hidden{display:none !important}.switch-toggle input[type="radio"]{display:none !important}html.remodal_lock,body.remodal_lock{overflow:hidden}.remodal,[data-remodal-id]{visibility:hidden}.remodal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:10000;display:none;overflow:auto;-webkit-overflow-scrolling:touch;text-align:center}.remodal-overlay:after{display:inline-block;height:100%;margin-left:-0.05em;content:''}.remodal-overlay>*{-webkit-transform:translateZ(0px)}.remodal{position:relative;display:inline-block;text-align:left}.remodal-bg{-webkit-transition-property:filter;-moz-transition-property:filter;transition-property:filter;-webkit-transition-duration:0.2s;-moz-transition-duration:0.2s;transition-duration:0.2s;-webkit-transition-timing-function:linear;-moz-transition-timing-function:linear;transition-timing-function:linear}.remodal-overlay{opacity:0;background:rgba(33,36,46,0.8);-webkit-transition:opacity 0.2s linear;-moz-transition:opacity 0.2s linear;transition:opacity 0.2s linear}body.remodal_active .remodal-overlay{opacity:1}.remodal{width:100%;min-height:100%;padding-top:2rem;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;font-size:16px;background:#eee;background-clip:padding-box;color:#737C81;box-shadow:0 10px 20px rgba(0,0,0,0.5);-webkit-transform:scale(0.95);-moz-transform:scale(0.95);-ms-transform:scale(0.95);-o-transform:scale(0.95);transform:scale(0.95);-webkit-transition-property:-webkit-transform;-moz-transition-property:-moz-transform;transition-property:transform;-webkit-transition-duration:0.2s;-moz-transition-duration:0.2s;transition-duration:0.2s;-webkit-transition-timing-function:linear;-moz-transition-timing-function:linear;transition-timing-function:linear}body.remodal_active .remodal{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}.remodal,.remodal-overlay:after{vertical-align:middle}.remodal-close{position:absolute;top:10px;right:10px;color:#737C81;text-decoration:none;text-align:center;-webkit-transition:background 0.2s linear;-moz-transition:background 0.2s linear;transition:background 0.2s linear}.remodal-close:after{display:block;font-family:FontAwesome;content:"\f00d";font-size:28px;line-height:28px;cursor:pointer;text-decoration:none}.remodal-close:hover,.remodal-close:active{color:#43484b}@media only screen and (min-width: 40.063em){.remodal{max-width:700px;margin:20px auto;min-height:0;border-radius:6px}}.tab-bar{background:#253A47;margin:0;padding:0;list-style:none;font-family:"Montserrat","Helvetica","Tahoma","Geneva","Arial",sans-serif}.tab-bar:after{content:"";display:table;clear:both}.tab-bar li{display:block;float:left;height:3.5em}.tab-bar li.active span,.tab-bar li.active a{background:#eee;color:#737C81}@media only all and (max-width: 47.938em){.tab-bar li{width:100%}.tab-bar li span,.tab-bar li a{width:100%;text-align:center}}.tab-bar span,.tab-bar a{display:inline-block;padding:0 4rem;line-height:3.5em;color:#d1dee7}.tab-bar span:hover,.tab-bar a:hover{color:#fff;background:#141f25}@-webkit-keyframes show{from{opacity:0}to{opacity:1}}@-moz-keyframes show{from{opacity:0}to{opacity:1}}@keyframes show{from{opacity:0}to{opacity:1}}.form-tabs{background:#253A47;font-family:"Montserrat","Helvetica","Tahoma","Geneva","Arial",sans-serif;margin-top:-4rem}@media only all and (max-width: 47.938em){.form-tabs{padding-top:4rem}}.form-tabs>input[type=radio]{display:none}.form-tabs>input[type=radio]:checked+label{background:#eee;color:#737C81}.form-tabs>label{display:inline-block;cursor:pointer;color:#d1dee7;height:3.5em;text-align:center;line-height:3.5em;padding:0 2rem}@media only all and (max-width: 47.938em){.form-tabs>label{width:100%}}.form-tabs>label:last-of-type{border-bottom:none}.form-tabs>label:hover{color:#fff;background:#2a4251}.tab-body{position:absolute;top:-9999px;opacity:0;width:100%}.tab-body-wrapper{padding-top:3.5em;background:#eee}#tab1:checked ~ .tab-body-wrapper #tab-body-1,#tab2:checked ~ .tab-body-wrapper #tab-body-2,#tab3:checked ~ .tab-body-wrapper #tab-body-3,#tab4:checked ~ .tab-body-wrapper #tab-body-4,#tab5:checked ~ .tab-body-wrapper #tab-body-5,#tab6:checked ~ .tab-body-wrapper #tab-body-6,#tab7:checked ~ .tab-body-wrapper #tab-body-7,#tab8:checked ~ .tab-body-wrapper #tab-body-8,#tab9:checked ~ .tab-body-wrapper #tab-body-9,#tab10:checked ~ .tab-body-wrapper #tab-body-10{position:relative;top:0px;opacity:1}.grav-mdeditor .CodeMirror-scroll{margin-right:-36px;padding-bottom:36px}.grav-mdeditor-fullscreen{position:fixed;top:0;left:0;bottom:0;right:0;z-index:99999}.grav-mdeditor-fullscreen .grav-mdeditor-content,.grav-mdeditor-fullscreen .grav-mdeditor-code,.grav-mdeditor-fullscreen .CodeMirror-wrap,.grav-mdeditor-fullscreen .grav-mdeditor-preview{height:100% !important}.grav-mdeditor-fullscreen .grav-mdeditor-navbar,.grav-mdeditor-fullscreen .grav-mdeditor-navbar ul li:first-child a,.grav-mdeditor-fullscreen .grav-mdeditor-navbar-flip ul li:last-child a{border-radius:0}.grav-mdeditor-navbar{border:1px solid #d5d5d5;border-top-right-radius:4px;border-top-left-radius:4px;background:#fbfbfb}.grav-mdeditor-navbar:after{content:"";display:table;clear:both}.grav-mdeditor-navbar ul{list-style:none;margin:0;padding:0}.grav-mdeditor-navbar ul li{float:left;padding:inherit !important;margin:inherit !important;border-radius:inherit !important;border:inherit !important}.grav-mdeditor-navbar ul li:first-child a{border-top-left-radius:4px}.grav-mdeditor-navbar ul .mdeditor-active a{background:white;cursor:auto;border-left:1px solid #d5d5d5;border-right:1px solid #d5d5d5}.grav-mdeditor-navbar ul .mdeditor-active a:hover{background:#fff}.grav-mdeditor-navbar ul a{display:block;cursor:pointer;line-height:3rem;height:3rem;padding:0 1rem;color:#737C81}.grav-mdeditor-navbar ul a:hover{background:#f3f3f3;color:#5b6266}.grav-mdeditor-navbar-nav{float:left}.grav-mdeditor-navbar-flip{float:right}.grav-mdeditor-navbar-flip ul li:last-child a{border-top-right-radius:4px}.grav-mdeditor-content{cursor:text;border:1px solid #d5d5d5;border-top:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.grav-mdeditor-content:after{content:"";display:table;clear:both}.grav-mdeditor-code .CodeMirror{padding:10px 20px 20px 20px;border-bottom-left-radius:4px}.grav-mdeditor-preview{padding:20px;overflow-y:scroll;position:relative;background:#fbfbfb;border-bottom-right-radius:4px}.grav-mdeditor-navbar p{margin-top:10px;margin-bottom:10px;padding-left:20px}#admin-main .grav-mdeditor-preview{font-family:"Lato","Helvetica","Tahoma","Geneva","Arial",sans-serif}#admin-main .grav-mdeditor-preview h1,#admin-main .grav-mdeditor-preview h2,#admin-main .grav-mdeditor-preview h3,#admin-main .grav-mdeditor-preview h4,#admin-main .grav-mdeditor-preview h5,#admin-main .grav-mdeditor-preview h6{color:#5b6266}#admin-main .grav-mdeditor-preview h1{font-size:2rem;border:0}#admin-main .grav-mdeditor-preview h2{font-size:1.6rem}#admin-main .grav-mdeditor-preview h3{font-size:1.4rem}#admin-main .grav-mdeditor-preview h4{font-size:1.2rem}#admin-main .grav-mdeditor-preview h5{font-size:1.1rem}#admin-main .grav-mdeditor-preview p,#admin-main .grav-mdeditor-preview h1{padding:0}[data-mode=tab][data-active-tab=code] .grav-mdeditor-preview,[data-mode=tab][data-active-tab=preview] .grav-mdeditor-code{display:none}[data-mode=split] .grav-mdeditor-button-code,[data-mode=split] .grav-mdeditor-button-preview{display:none}[data-mode=split] .grav-mdeditor-code{border-right:1px solid #d5d5d5}[data-mode=split] .grav-mdeditor-code,[data-mode=split] .grav-mdeditor-code .grav-mdeditor-preview{float:left;width:50%}.cm-s-paper.CodeMirror{color:#676f74;font-size:14px;line-height:1.4}.cm-s-paper.CodeMirror pre{font-family:"DejaVu Sans Mono", Menlo, Monaco, Consolas, Courier, monospace}.cm-s-paper .cm-link{color:#005e87}.cm-s-paper .cm-comment{color:#80898e}.cm-s-paper .cm-header{color:#4f5559}.cm-s-paper .cm-strong{color:#5b6266}.cm-s-paper .cm-em{color:#4f5559}.cm-s-paper .cm-string{color:#0082BA}.cm-s-paper .cm-tag{color:#349886}.cm-s-paper .cm-bracket{color:#41bea8}.cm-s-paper .cm-variable{color:#4f5559}.cm-s-paper .cm-variable-2{color:#80898e}.cm-s-paper .cm-variable-3{color:#8d959a}.cm-s-paper .cm-hr{color:#d1d4d6;font-weight:bold}.cm-s-paper .cm-keyword{color:#0082BA}.cm-s-paper .cm-atom{color:#9055AF}.cm-s-paper .cm-meta{color:#676f74}.cm-s-paper .cm-number{color:#7f8c8d}.cm-s-paper .cm-def{color:#00f}.cm-s-paper .cm-variable{color:black}.cm-s-paper .cm-variable-2{color:#555}.cm-s-paper .cm-variable-3{color:#085}.cm-s-paper .cm-property{color:black}.cm-s-paper .cm-operator{color:black}.cm-s-paper .cm-string-2{color:#f50}.cm-s-paper .cm-meta{color:#555}.cm-s-paper .cm-error{color:#f00}.cm-s-paper .cm-qualifier{color:#555}.cm-s-paper .cm-builtin{color:#555}.cm-s-paper .cm-attribute{color:#7f8c8d}.cm-s-paper .cm-quote{color:#888}.cm-s-paper .cm-header-1{font-size:140%}.cm-s-paper .cm-header-2{font-size:120%}.cm-s-paper .cm-header-3{font-size:110%}.cm-s-paper .cm-negative{color:#d44}.cm-s-paper .cm-positive{color:#292}.cm-s-paper .cm-header,.cm-s-paper .cm-strong{font-weight:bold}.cm-s-paper .cm-em{font-style:italic}.cm-s-paper .cm-link{text-decoration:underline}.cm-s-paper .cm-invalidchar{color:#f00}.form-uploads-wrapper h3{font-size:1rem;margin:2rem 0 0.5rem 0}.dropzone{position:relative;border:1px #d5d5d5 solid;border-radius:4px;min-height:4rem;background:#fff}.dropzone.dz-clickable{cursor:pointer}.dropzone.dz-drag-hover{border-color:rgba(0,0,0,0.15);background:rgba(0,0,0,0.04)}.dropzone.dz-started .dz-message{display:none}.dropzone .dz-message{opacity:1;-ms-filter:none;filter:none}.dropzone .dz-preview{position:relative;display:inline-block;margin:1rem;vertical-align:top}.dropzone .dz-preview.dz-file-preview [data-dz-thumbnail]{display:none}.dropzone .dz-preview.dz-error .dz-error-mark{display:block}.dropzone .dz-preview.dz-success .dz-success-mark{display:block}.dropzone .dz-preview .dz-success-mark,.dropzone .dz-preview .dz-error-mark{color:#fff;font-family:FontAwesome;display:none;position:absolute;width:22px;height:22px;font-size:18px;line-height:25px;border-radius:100%;text-align:center;right:2px;top:2px}.dropzone .dz-preview .dz-success-mark span,.dropzone .dz-preview .dz-error-mark span{display:none}.dropzone .dz-preview:hover .dz-success-mark,.dropzone .dz-preview:hover .dz-error-mark{display:none}.dropzone .dz-preview .dz-success-mark{background-color:#41bea8}.dropzone .dz-preview .dz-success-mark::after{content:'\f00c'}.dropzone .dz-preview .dz-error-mark{background-color:#D55A4E}.dropzone .dz-preview .dz-error-mark::after{content:'\f12a'}.dropzone .dz-preview .dz-progress{position:absolute;top:100px;left:0px;right:0px;height:4px;background:#d7d7d7;display:none}.dropzone .dz-preview .dz-progress .dz-upload{display:block;position:absolute;top:0;bottom:0;left:0;width:0%;background-color:#41bea8}.dropzone .dz-preview .dz-error-message{display:none;position:absolute;top:0;left:0;right:0;font-size:0.9rem;line-height:1.2;padding:8px 10px;background:#f6f6f6;color:#D55A4E;z-index:500}.dropzone .dz-preview.dz-processing .dz-progress{display:block}.dropzone .dz-preview:hover:not(.hide-backface) .dz-details img{display:none}.dropzone .dz-preview:hover.dz-error .dz-error-message{display:block}.dropzone .dz-preview .dz-remove,.dropzone .dz-preview .dz-insert{display:none}.dropzone .dz-preview:hover .dz-remove,.dropzone .dz-preview:hover .dz-insert{display:block;position:absolute;left:0;right:0;bottom:22px;border:1px solid #e1e1e1;width:50%;text-align:center;cursor:pointer;font-size:0.8rem}.dropzone .dz-preview:hover .dz-remove:hover,.dropzone .dz-preview:hover .dz-insert:hover{background:#eee}.dropzone .dz-preview:hover .dz-remove{left:inherit;border-left:0}.dropzone .dz-preview:hover .dz-insert{right:inherit}.dropzone .dz-preview.dz-processing .dz-details{overflow:hidden}.dropzone .dz-preview.dz-processing .dz-details img{position:absolute;left:50%;top:50%;height:auto;width:100%;-webkit-transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.dropzone .dz-preview .dz-details{width:150px;height:100px;position:relative;background:#f6f6f6;border:1px solid #e1e1e1;font-size:0.8rem;padding:5px;margin-bottom:22px}.dropzone .dz-preview .dz-details .dz-filename{line-height:1.2;overflow:hidden;height:100%}.dropzone .dz-preview .dz-details img{position:absolute;top:0;left:0;width:150px;height:100px}.dropzone .dz-preview .dz-details .dz-size{position:absolute;bottom:-28px;left:0;right:0;text-align:center;font-size:0.8rem;height:28px;line-height:28px}.dropzone.dz-clickable .dz-message,.dropzone.dz-clickable .dz-message span{cursor:pointer;color:#c3c7ca;text-align:center;font-size:1.4rem;line-height:4rem}.dropzone *{cursor:default}.toast-title{font-weight:bold}.toast-message{-ms-word-wrap:break-word;word-wrap:break-word}.toast-message a,.toast-message label{color:#ffffff}.toast-message a:hover{color:#cccccc;text-decoration:none}.toast-close-button{position:relative;right:-0.3em;top:-0.3em;float:right;font-size:20px;font-weight:bold;color:#ffffff;-webkit-text-shadow:0 1px 0 #ffffff;text-shadow:0 1px 0 #ffffff;opacity:0.8;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80);filter:alpha(opacity=80)}.toast-close-button:hover,.toast-close-button:focus{color:#000000;text-decoration:none;cursor:pointer;opacity:0.4;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=40);filter:alpha(opacity=40)}button.toast-close-button{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.toast-top-right{top:5rem;right:1.5rem}#toast-container{position:fixed;z-index:999999}#toast-container *{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#toast-container>div{position:relative;overflow:hidden;margin:0 0 6px;padding:15px 15px 15px 50px;width:300px;border-radius:3px;background-position:15px center;background-repeat:no-repeat;color:#ffffff;opacity:0.9;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=90);filter:alpha(opacity=90)}#toast-container>:hover{opacity:1;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);filter:alpha(opacity=100);cursor:pointer}#toast-container>.toast-info{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=") !important}#toast-container>.toast-error{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=") !important}#toast-container>.toast-success{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==") !important}#toast-container>.toast-warning{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=") !important}#toast-container.toast-top-center>div,#toast-container.toast-bottom-center>div{width:300px;margin:auto}#toast-container.toast-top-full-width>div,#toast-container.toast-bottom-full-width>div{width:96%;margin:auto}.toast{background-color:#030303}.toast-success{background-color:#9055AF}.toast-success .button{background:#9b66b7;background:#a778bf;color:rgba(255,255,255,0.85);border-radius:4px}.toast-success .button:hover{background:#b289c7;color:#fff}.toast-success .button.dropdown-toggle{background:#b289c7;border-left:1px solid #9b66b7}.toast-error{background-color:#DA4B46}.toast-error .button{background-color:#c62d28;background:#9b231f;color:rgba(255,255,255,0.85);border-radius:4px}.toast-error .button:hover{background:#b02823;color:#fff}.toast-error .button.dropdown-toggle{background:#b02823;border-left:1px solid #861e1b}.toast-info{background-color:#2693B7}.toast-info .button{background-color:#1d718d;background:#144f63;color:rgba(255,255,255,0.85);border-radius:4px}.toast-info .button:hover{background:#196078;color:#fff}.toast-info .button.dropdown-toggle{background:#196078;border-left:1px solid #103e4d}.toast-warning{background-color:#f89406}.toast-warning .button{background-color:#c67605;background:#945904;color:rgba(255,255,255,0.85);border-radius:4px}.toast-warning .button:hover{background:#ad6704;color:#fff}.toast-warning .button.dropdown-toggle{background:#ad6704;border-left:1px solid #7c4a03}.toast-progress{position:absolute;left:0;bottom:0;height:4px;background-color:#000000;opacity:0.4;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=40);filter:alpha(opacity=40)}@media all and (max-width: 240px){#toast-container>div{padding:8px 8px 8px 50px;width:11em}#toast-container .toast-close-button{right:-0.2em;top:-0.2em}}@media all and (min-width: 241px) and (max-width: 480px){#toast-container>div{padding:8px 8px 8px 50px;width:18em}#toast-container .toast-close-button{right:-0.2em;top:-0.2em}}@media all and (min-width: 481px) and (max-width: 768px){#toast-container>div{padding:15px 15px 15px 50px;width:25em}}.gpm>table>tbody>tr{border-bottom:1px solid #e1e1e1}.gpm td{border:0}.gpm .gpm-name{white-space:nowrap;color:#b6bbbe}.gpm .gpm-version{padding-left:0.5rem;color:#8d959a;font-size:0.9rem}.gpm .gpm-update .gpm-name{color:#349886}.gpm .gpm-actions .enabled,.gpm .gpm-actions .disabled{font-size:1.6rem}.gpm .gpm-actions .disabled{color:#8d959a}.gpm .gpm-item-info{position:relative;border-bottom:3px solid #e1e1e1;padding-bottom:1rem;margin-bottom:3rem;overflow:hidden}@media only all and (max-width: 47.938em){.gpm .gpm-item-info{word-wrap:break-word}}.gpm .gpm-item-info .gpm-item-icon{color:#e6e6e6;position:absolute;right:3rem;font-size:20rem}.gpm .gpm-item-info table{position:relative}.gpm .gpm-item-info td{border:0;text-align:left !important}.gpm .gpm-item-info td:first-child{color:#9ba2a6;white-space:nowrap;width:25%}.gpm .gpm-item-info tr:hover{background:inherit}.gpm .badge.update{display:inline-block;background:#9055AF;border-radius:4px;padding:2px 10px;color:#fff;margin-left:1rem}.gpm .gpm-ribbon{background-color:#9055AF;overflow:hidden;white-space:nowrap;position:absolute;top:1rem;right:-2rem;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.gpm .gpm-ribbon a{color:#fff;display:block;font-weight:bold;font-size:0.9rem;padding:5px 40px;text-align:center}.gpm .themes{padding:3rem}.gpm .themes .gpm-name{margin-bottom:0.5rem}.gpm .themes .gpm-actions{background:#e9e9e9;margin:1rem -1rem -1rem -1rem;height:4rem;text-align:center;padding:1rem;font-size:1rem;font-weight:bold}.gpm .themes .active-theme .gpm-actions,.gpm .themes.inactive-theme .gpm-actions{line-height:2rem}.gpm .themes .active-theme{border:1px solid #349886}.gpm .themes .active-theme .gpm-actions{background:#349886;color:#eee}.gpm .themes .inactive-theme .gpm-actions{display:block;color:#a2a2a2;font-weight:normal}#phpinfo img{display:none}#phpinfo table{margin:1rem 0 0}#phpinfo tr:hover{background:transparent}#phpinfo th{background:#d9d9d9}#phpinfo td{word-wrap:break-word}#phpinfo td h1{margin:0rem -3rem 0rem !important}#phpinfo td:first-child{color:#349886}#phpinfo hr{border-bottom:0}#phpinfo h1{font-size:2.3rem}#phpinfo h2{font-size:1.7rem;margin:3rem 3rem 0rem !important}
+@import url(//fonts.googleapis.com/css?family=Montserrat:400|Lato:300,400,700|Ubuntu+Mono:400,700);#admin-login,#admin-logo h3,#admin-main .titlebar h1,#admin-main .titlebar .button-bar,#admin-main .flush-bottom.button-bar .button,#admin-main .danger.button-bar .button,#admin-main .success.button-bar .button,#admin-dashboard #updates .numeric,#admin-dashboard #popularity .stat,#admin-topbar #admin-mode-toggle,#admin-topbar #admin-lang-toggle{position:relative;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-o-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.button{display:inline-block;padding:0.3rem 1.5rem;font-weight:300;-webkit-font-smoothing:auto;cursor:pointer;vertical-align:middle;font-family:"Lato","Helvetica","Tahoma","Geneva","Arial",sans-serif}.button:active{margin:1px 0 -1px 0}.button i{margin-right:5px}.button-small.button{padding:2px 10px;font-size:1rem}.button-x-small.button{padding:2px 8px 2px 5px;font-size:0.9rem}html,body{height:100%}body{background:#314D5B;color:#fff;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{color:#0082BA}a:hover{color:#003b54}b,strong{font-weight:600}.bigger{font-size:1.2rem}.button-bar{text-align:right;float:right;z-index:2}.secondary-accent{background:#349886;color:#fff}.secondary-accent .button-bar{background:#349886}.secondary-accent .button{background:#41bea8}.tertiary-accent{background:#2693B7;color:#fff}.tertiary-accent .button-bar{background:#2693B7}.tertiary-accent .button{background:#2aa4cc;background:#3aafd6;color:rgba(255,255,255,0.85);border-radius:4px}.tertiary-accent .button:hover{background:#4fb8da;color:#fff}.tertiary-accent .button.dropdown-toggle{background:#4fb8da;border-left:1px solid #2aa4cc}.alert{font-size:1.1rem;padding:1rem 3rem}.info{background:#9055AF;color:#fff}.info a{color:#e6e6e6}.info a:hover{color:#fff}.info-reverse{color:#9055AF}.notice{background:#2693B7;color:#fff}.notice a{color:#e6e6e6}.notice a:hover{color:#fff}.error{background:#DA4B46;color:#fff}.error a{color:#e6e6e6}.error a:hover{color:#fff}.badge{display:inline-block;font-size:0.9rem;font-family:"Lato","Helvetica","Tahoma","Geneva","Arial",sans-serif;font-weight:700;border-radius:10px;padding:0px 6px;min-width:20px;line-height:20px;text-align:center}.empty-state{margin:0 auto;text-align:center;padding-top:100px}@font-face{font-family:"rockettheme-apps";font-weight:normal;font-style:normal;src:url("../fonts/rockettheme-apps/rockettheme-apps.eot");src:url("../fonts/rockettheme-apps/rockettheme-apps.eot?#iefix") format("embedded-opentype"),url("../fonts/rockettheme-apps/rockettheme-apps.woff") format("woff"),url("../fonts/rockettheme-apps/rockettheme-apps.ttf") format("truetype"),url("../fonts/rockettheme-apps/rockettheme-apps.svg#rockettheme-apps") format("svg")}i.fa-grav,i.fa-grav-spaceman,i.fa-grav-text,i.fa-grav-full,i.fa-grav-logo,i.fa-grav-symbol,i.fa-grav-logo-both,i.fa-grav-both,i.fa-gantry,i.fa-gantry-logo,i.fa-gantry-symbol,i.fa-gantry-logo-both,i.fa-gantry-both{font-family:'rockettheme-apps';speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-grav-logo:before,.fa-grav-text:before{content:"\61"}.fa-grav-symbol:before,.fa-grav:before,.fa-grav-spaceman:before{content:"\62"}.fa-grav-logo-both:before,.fa-grav-both:before,.fa-grav-full:before{content:"\66"}.fa-gantry-logo:before{content:"\64"}.fa-gantry:before,.fa-gantry-symbol:before{content:"\63"}.fa-gantry-logo-both:before,.fa-gantry-both:before{content:"\65"}.default-animation,.tab-bar span,.tab-bar a,.form-tabs>label{-webkit-transition:all 0.5s ease;-moz-transition:all 0.5s ease;transition:all 0.5s ease}.default-border-radius{border-radius:4px}.default-glow-shadow{box-shadow:0 0 20px rgba(0,0,0,0.2)}.default-box-shadow{box-shadow:0 10px 20px rgba(0,0,0,0.2)}.padding-horiz{padding-left:7rem;padding-right:7rem}@media only all and (max-width: 59.938em){.padding-horiz{padding-left:4rem;padding-right:4rem}}@media only all and (max-width: 47.938em){.padding-horiz{padding-left:1rem;padding-right:1rem}}.padding-vert{padding-top:3rem;padding-bottom:3rem}body{font-family:"Lato","Helvetica","Tahoma","Geneva","Arial",sans-serif;font-weight:400}h1,h2,h3,h4,h5,h6{font-family:"Montserrat","Helvetica","Tahoma","Geneva","Arial",sans-serif;font-weight:400;text-rendering:optimizeLegibility;letter-spacing:-0px}body.simple-fonts{font-family:'Helvetica Neue', Helvetica, Arial, sans-serif !important}body.simple-fonts h1,body.simple-fonts h2,body.simple-fonts h3,body.simple-fonts h4,body.simple-fonts h5,body.simple-fonts h6,body.simple-fonts #admin-menu li,body.simple-fonts .button,body.simple-fonts .tab-bar,body.simple-fonts .badge,body.simple-fonts #admin-main .grav-mdeditor-preview,body.simple-fonts .form .note,body.simple-fonts .form-tabs,body.simple-fonts input,body.simple-fonts select,body.simple-fonts textarea,body.simple-fonts button,body.simple-fonts .selectize-input,body.simple-fonts .form-order-wrapper ul#ordering li{font-family:'Helvetica Neue', Helvetica, Arial, sans-serif !important}h1{font-size:3.2rem}@media only all and (max-width: 47.938em){h1{font-size:2.5rem;line-height:1.2;margin-bottom:2.5rem}}@media only all and (min-width: 48em) and (max-width: 59.938em){h2{font-size:2.1rem}}@media only all and (max-width: 47.938em){h2{font-size:2rem}}@media only all and (min-width: 48em) and (max-width: 59.938em){h3{font-size:1.7rem}}@media only all and (max-width: 47.938em){h3{font-size:1.6rem}}@media only all and (min-width: 48em) and (max-width: 59.938em){h4{font-size:1.35rem}}@media only all and (max-width: 47.938em){h4{font-size:1.25rem}}h1{letter-spacing:-3px}h2{letter-spacing:-2px}h3{letter-spacing:-1px}blockquote{border-left:10px solid #F0F2F4}blockquote p{font-size:1.1rem;color:#999}blockquote cite{display:block;text-align:right;color:#666;font-size:1.2rem}blockquote>blockquote>blockquote{margin:0}blockquote>blockquote>blockquote p{padding:15px;display:block;font-size:1rem;margin-top:0rem;margin-bottom:0rem}blockquote>blockquote>blockquote>p{margin-left:-71px;border-left:10px solid #F0AD4E;background:#FCF8F2;color:#df8a13}blockquote>blockquote>blockquote>blockquote>p{margin-left:-94px;border-left:10px solid #D9534F;background:#FDF7F7;color:#b52b27}blockquote>blockquote>blockquote>blockquote>blockquote>p{margin-left:-118px;border-left:10px solid #5BC0DE;background:#F4F8FA;color:#28a1c5}blockquote>blockquote>blockquote>blockquote>blockquote>blockquote>p{margin-left:-142px;border-left:10px solid #5CB85C;background:#F1F9F1;color:#3d8b3d}code,kbd,pre,samp{font-family:"Ubuntu Mono",monospace}code{background:#f9f2f4;color:#9c1d3d}pre{padding:2rem;background:#f6f6f6;border:1px solid #ddd;border-radius:3px}pre code{color:#237794;background:inherit}hr{border-bottom:4px solid #F0F2F4}.label{vertical-align:middle;background:#0082BA;border-radius:100%;color:#fff;height:1rem;min-width:1rem;line-height:1rem;display:inline-block;text-align:center;font-size:0.7rem;font-family:"Montserrat","Helvetica","Tahoma","Geneva","Arial",sans-serif;margin-right:0.75rem}.switch-toggle a,.switch-light span span{display:none}@media only screen{.switch-light{display:inline-block;position:relative;overflow:visible;padding:0;margin-left:100px}.switch-light *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.switch-light a{display:block;-webkit-transition:all 0.1s ease-out;-moz-transition:all 0.1s ease-out;transition:all 0.1s ease-out}.switch-light label,.switch-light>span{vertical-align:middle}.switch-light input:focus ~ a,.switch-light input:focus+label{outline:1px dotted #888}.switch-light label{position:relative;z-index:3;display:block;width:100%}.switch-light input{position:absolute;opacity:0;z-index:5}.switch-light input:checked ~ a{right:0%}.switch-light>span{position:absolute;left:-100px;width:100%;margin:0;padding-right:100px;text-align:left}.switch-light>span span{position:absolute;top:0;left:0;z-index:5;display:block;width:50%;margin-left:100px;text-align:center}.switch-light>span span:last-child{left:50%}.switch-light a{position:absolute;right:50%;top:0;z-index:4;display:block;width:50%;height:100%;padding:0}.switch-toggle{display:inline-block;position:relative;padding:0 !important}.switch-toggle *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.switch-toggle a{display:block;-webkit-transition:all 0.1s ease-out;-moz-transition:all 0.1s ease-out;transition:all 0.1s ease-out}.switch-toggle label,.switch-toggle>span{vertical-align:middle}.switch-toggle input:focus ~ a,.switch-toggle input:focus+label{outline:1px dotted #888}.switch-toggle input{position:absolute;opacity:0}.switch-toggle input+label{position:relative;z-index:2;float:left;height:100%;margin:0;text-align:center}.switch-toggle a{position:absolute;top:0;left:0;padding:0;z-index:1;width:50%;height:100%}.switch-toggle input:last-of-type:checked ~ a{left:50%}.switch-toggle.switch-3 label,.switch-toggle.switch-3 a{width:33.33333%}.switch-toggle.switch-3 input:checked:nth-of-type(2) ~ a{left:33.33333%}.switch-toggle.switch-3 input:checked:last-of-type ~ a{left:66.66667%}.switch-toggle.switch-4 label,.switch-toggle.switch-4 a{width:25%}.switch-toggle.switch-4 input:checked:nth-of-type(2) ~ a{left:25%}.switch-toggle.switch-4 input:checked:nth-of-type(3) ~ a{left:50%}.switch-toggle.switch-4 input:checked:last-of-type ~ a{left:75%}.switch-toggle.switch-5 label,.switch-toggle.switch-5 a{width:20%}.switch-toggle.switch-5 input:checked:nth-of-type(2) ~ a{left:20%}.switch-toggle.switch-5 input:checked:nth-of-type(3) ~ a{left:40%}.switch-toggle.switch-5 input:checked:nth-of-type(4) ~ a{left:60%}.switch-toggle.switch-5 input:checked:last-of-type ~ a{left:80%}.switch-grav{background-color:#fff;border:1px solid #d5d5d5;border-radius:4px}.switch-grav label{color:#737C81;-webkit-transition:color 0.2s ease-out;-moz-transition:color 0.2s ease-out;transition:color 0.2s ease-out;padding:5px 20px}.switch-grav>span span{opacity:0;-webkit-transition:all 0.1s;-moz-transition:all 0.1s;transition:all 0.1s}.switch-grav>span span:first-of-type{opacity:1}.switch-grav a{background:#777;border-radius:3px}.switch-grav.switch-toggle input.highlight:checked ~ a{background:#41bea8}.switch-grav.switch-light input:checked ~ a{background-color:#777}.switch-grav.switch-light input:checked ~ span span:first-of-type{opacity:0}.switch-grav.switch-light input:checked ~ span span:last-of-type{opacity:1}.switch-grav input:checked+label{color:#fff}}@media only screen and (-webkit-max-device-pixel-ratio: 2) and (max-device-width: 1280px){.switch-light,.switch-toggle{-webkit-animation:webkitSiblingBugfix infinite 1s}}@-webkit-keyframes webkitSiblingBugfix{from{-webkit-transform:translate3d(0, 0, 0)}to{-webkit-transform:translate3d(0, 0, 0)}}form h1,form h3{color:#314D5B;padding:0 3rem 0.5rem;margin:0 0 1rem;border-bottom:3px solid #e1e1e1;font-size:1.5rem;text-align:left;letter-spacing:-1px}form p{padding:0 3rem}form pre{padding:1.5rem 3rem}form .note{font-family:"Lato","Helvetica","Tahoma","Geneva","Arial",sans-serif;color:#DA4B46}form .form-field{margin-bottom:1rem;padding-left:3rem}form .form-data{padding-right:3rem}form .required{color:#DA4B46;font-family:helvetica, arial;vertical-align:middle;line-height:1;font-size:30px;margin-left:5px}form label{padding:5px 0;font-weight:400;margin:0}form label.toggleable{display:inline}form input,form select,form textarea,form button,form .selectize-input{font-family:"Lato","Helvetica","Tahoma","Geneva","Arial",sans-serif;font-size:1rem;line-height:1.7;border-radius:4px;-webkit-font-smoothing:antialiased}form .selectize-dropdown{z-index:100000}form .form-column>.form-field.grid{display:block}form .form-column>.form-field.grid>.block{-webkit-box-flex:0;-moz-box-flex:0;box-flex:0;-webkit-flex:0;-moz-flex:0;-ms-flex:0;flex:0}form .grid.vertical{-webkit-flex-flow:column;-moz-flex-flow:column;flex-flow:column}form .form-select-wrapper,form .selectize-control.single .selectize-input{position:relative}form .form-select-wrapper:after,form .selectize-control.single .selectize-input:after{margin-top:0;border:0;position:absolute;content:'\f078';font-family:'FontAwesome';right:12px;top:50%;line-height:0;color:#9ba2a6;pointer-events:none}form .selectize-control{height:39px}form .selectize-input{box-shadow:none;color:#737C81;padding:5px 30px 5px 10px;margin:0}form .selectize-input>input{font-size:1rem;line-height:1.7}form .selectize-control.multi .selectize-input{padding:0.425rem 0.425rem}form .selectize-control.multi .selectize-input.has-items{padding-top:6px;padding-bottom:4px}form .selectize-control.multi .selectize-input>div{color:#737C81;border-radius:2px;line-height:1.5}form .selectize-control.multi .selectize-input>div.active{background:#d5d5d5}form .selectize-control.single .selectize-input:after{right:27px}form .selectize-control.single .selectize-input.dropdown-active:after{content:'\f077'}form .x-small{max-width:5rem !important}form .small{max-width:10rem !important}form .medium{max-width:20rem}form .medium textarea{height:7rem}form .large{max-width:30rem !important}form .large textarea{height:10rem}form select{width:100%;border:1px solid #d5d5d5;background:#fff;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:5px 30px 5px 10px;cursor:pointer;margin:0}form input[type=text],form input[type=password],form input[type=email],form input[type=date]{width:100%;border:1px solid #d5d5d5;background:#fff}form input[readonly=readonly]{background:#f2f2f2;font-weight:bold}form textarea{width:100%;border:1px solid #d5d5d5;background:#fff}form .form-frontmatter-wrapper{border:1px solid #d5d5d5;border-radius:4px}form .switch-toggle label{cursor:pointer}form .switch-toggle a,form .switch-toggle label{outline:none !important}form .dynfields input[type=text],form [data-grav-field="array"] input[type=text]{width:40%;float:left;margin:0 5px 5px 0}form .dynfields .form-row,form [data-grav-field="array"] .form-row{display:inline-block}form .dynfields .form-row span,form [data-grav-field="array"] .form-row span{padding:0.5rem;display:inline-block;line-height:1.7;cursor:pointer}form .dynfields .form-row.array-field-value_only,form [data-grav-field="array"] .form-row.array-field-value_only{width:100%}form .button-bar{margin-top:1rem;background:#e6e6e6;padding:1.2rem 3rem;width:100%;border-bottom-left-radius:5px;border-bottom-right-radius:5px}form .checkboxes{display:inline-block;padding:5px 0}form .checkboxes label{display:inline;cursor:pointer;position:relative;padding:0 0 0 2rem;margin-right:15px}form .checkboxes label:before{content:"";display:inline-block;width:1.5rem;height:1.5rem;top:50%;left:0;margin-top:-0.75rem;margin-right:10px;position:absolute;background:#fff;border:1px solid #d5d5d5;border-radius:4px}form .checkboxes input[type=checkbox]{display:none}form .checkboxes input[type=checkbox]:checked+label:before{content:"\f00c";font-family:"FontAwesome";font-size:1.2rem;line-height:1;text-align:center}form .checkboxes.toggleable label{margin-right:0}.form-display-wrapper p{padding-left:0;padding-right:0}.form-display-wrapper p:first-child{margin-top:0}.form-frontmatter-wrapper{margin-bottom:3rem}.form-frontmatter-wrapper .dragbar{height:4px;background:#d5d5d5;cursor:row-resize}#frontmatter+.CodeMirror{border-radius:4px;padding:10px;height:130px}.form-order-wrapper ul#ordering{list-style:none;margin:0;padding:0}.form-order-wrapper ul#ordering li{padding:0.2rem 1rem;border-radius:4px;border:1px solid #d5d5d5;background:#f8f8f8;color:#8d959a;margin:3px 0;position:relative;font-family:"Lato","Helvetica","Tahoma","Geneva","Arial",sans-serif}.form-order-wrapper ul#ordering li.drag-handle{cursor:move;background:#fff;color:#5b6266}.form-order-wrapper ul#ordering li.drag-handle::after{content:'\f0c9';font-family:FontAwesome;position:absolute;right:10px}.form-list-wrapper ul[data-collection-holder]{list-style:none;margin:0;padding:0}.form-list-wrapper ul[data-collection-holder] li{cursor:move;padding:1rem;border-radius:4px;border:1px solid #d5d5d5;background:#f8f8f8;color:#8d959a;margin:3px 0;position:relative;font-family:"Lato","Helvetica","Tahoma","Geneva","Arial",sans-serif}.form-list-wrapper ul[data-collection-holder] li .item-actions{position:absolute;right:10px;top:4px;color:#5b6266}.form-list-wrapper ul[data-collection-holder] li .item-actions .fa-trash-o{cursor:pointer}.form-list-wrapper .collection-actions{text-align:right}.form-label.block{z-index:10000}.form-label.block:hover{z-index:10005}#admin-main .admin-block h2{font-size:1.25rem;margin:0 0 .5rem;letter-spacing:normal}.form-fieldset{background-color:#f7f7f7;border:2px solid #e1e1e1;margin:1rem 2rem}.form-fieldset--label{background-color:#f3f3f3}.form-fieldset--label:hover,.form-fieldset input:checked+.form-fieldset--label{background-color:#eee}.form-fieldset--label label{display:table;font-size:1.25rem;padding:.5rem 1rem;width:100%}.form-fieldset--label h2{margin:0 !important}.form-fieldset--label .actions{font-size:initial;display:table-cell;text-align:right;vertical-align:middle}.form-fieldset--label+.form-data{margin-top:1rem;padding:0}.form-fieldset--cursor{cursor:pointer}.form-fieldset--info{font-size:small}.form-fieldset>input:checked ~ .form-data,.form-fieldset--collapsible .open,.form-fieldset input:checked ~ .form-label .form-fieldset--collapsible .close{display:block}.form-fieldset>.form-data,.form-fieldset--collapsible .close,.form-fieldset input:checked ~ .form-label .form-fieldset--collapsible .open{display:none}table,tbody,thead{display:inline-block;width:100%}.gpm-details{width:100%;-webkit-box-flex:auto;-moz-box-flex:auto;box-flex:auto;-webkit-flex:auto;-moz-flex:auto;-ms-flex:auto;flex:auto}td{border:0;border-bottom:1px solid #e1e1e1}tr{-webkit-transition:all 0.2s ease;-moz-transition:all 0.2s ease;transition:all 0.2s ease;display:-webkit-box;display:-moz-box;display:box;display:-webkit-flex;display:-moz-flex;display:-ms-flexbox;display:flex;-webkit-box-lines:multiple;-moz-box-lines:multiple;box-lines:multiple;-webkit-flex-wrap:wrap;-moz-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}tr th{display:block;-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;-webkit-flex:1;-moz-flex:1;-ms-flex:1;flex:1;font-weight:bold}tr th:first-child{padding-left:3rem}tr th:last-child{padding-right:3rem}tr td{display:block;-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;-webkit-flex:1;-moz-flex:1;-ms-flex:1;flex:1}tr td.double{-webkit-box-flex:2;-moz-box-flex:2;box-flex:2;-webkit-flex:2;-moz-flex:2;-ms-flex:2;flex:2}tr td:first-child{padding-left:3rem}@media only all and (max-width: 47.938em){tr td:first-child{padding-left:.5rem}tr td:first-child .plugin-update-button{float:left}}tr td:last-child,tr td.gpm-actions{padding-right:3rem}tr td.gpm-actions{line-height:1;text-align:right;position:relative}tr td.gpm-actions .gpm-details-expand{position:absolute;top:12px;right:12px}tr td.gpm-details{margin:0;padding:0;background-color:#f7f7f7}@media only all and (max-width: 47.938em){tr td.gpm-details{word-wrap:break-word}}tr td.gpm-details>.table-wrapper{display:none}tr td.gpm-details>.table-wrapper td{border-bottom:0}tr td.gpm-details tbody{width:100%}tr:last-child td{border-bottom:0}tr:hover{background:#f3f3f3}.k-calendar-container table,.k-calendar-container tbody,.k-calendar-container thead{width:100%}.k-calendar-container thead th:first-child{padding-left:0}.k-calendar-container thead th:last-child{padding-right:0.5rem}.button{background:#41bea8;color:rgba(255,255,255,0.85);border-radius:4px}.button:hover{background:#54c5b0;color:#fff}.button.dropdown-toggle{background:#54c5b0;border-left:1px solid #3bab97}.button.dropdown-toggle{border-left:1px solid #3bab97}.button.secondary{background:#2a7a6b;color:rgba(255,255,255,0.85);border-radius:4px}.button.secondary:hover{background:#318d7c;color:#fff}.button.secondary.dropdown-toggle{background:#318d7c;border-left:1px solid #23675a}.button.secondary.dropdown-toggle{border-left:1px solid #318d7c}.button-group{position:relative;display:inline-block;vertical-align:middle}.button-group>.button:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0 !important;border-bottom-right-radius:0 !important}.button-group>.button:first-child{margin-left:0 !important}.button-group>.button{position:relative;float:left}.button-group>.button+.dropdown-toggle{text-align:center;padding-right:8px;padding-left:8px}.button-group>.button+.dropdown-toggle i{margin:0}.button-group>.button:last-child:not(:first-child),.button-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0 !important;border-bottom-left-radius:0 !important}.button-group .button+.button,.button-group .button+.button-group,.button-group .button-group+.button,.button-group .button-group+.button-group{margin-left:-1px}.button-group .dropdown-menu{position:absolute;top:100%;left:0;right:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#41bea8;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #3bab97;border:1px solid rgba(0,0,0,0.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.175);box-shadow:0 6px 12px rgba(0,0,0,0.175)}.button-group .dropdown-menu.language-switcher{min-width:auto}.button-group .dropdown-menu.lang-switcher{min-width:150px;left:inherit}.button-group .dropdown-menu.lang-switcher button{width:100%}.button-group .dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#349886}.button-group .dropdown-menu li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#fff;white-space:nowrap}.button-group .dropdown-menu li>a:focus,.button-group .dropdown-menu li>a:hover{color:#fff;text-decoration:none;background-color:#349886}.button-group .dropdown-menu.language-switcher a.active{background-color:#349886}.open>.dropdown-menu{display:block}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}#error{text-align:center;display:flex;align-items:center;justify-content:center;height:100%;padding-bottom:6rem}#error h1{font-size:5rem}#error p{margin:1rem 0}#admin-login{background:#253A47;max-width:24rem;margin:0 auto}#admin-login.wide{max-width:50rem}#admin-login.wide h1{height:100px}#admin-login.wide form>.padding{padding:3rem 2rem 8rem 2rem}#admin-login.wide form>.padding>div{width:50%;display:inline-block;margin-right:-2px}@media only all and (max-width: 47.938em){#admin-login.wide form>.padding>div{width:100%;margin-right:0}}#admin-login.wide form>.padding .form-field{padding:0 1rem}#admin-login.wide form label{padding:0}#admin-login.wide form input{margin-bottom:1rem;text-align:left}#admin-login.wide form input::-webkit-input-placeholder{color:#83949d;font-size:1rem;line-height:2rem}#admin-login.wide form input::-moz-placeholder{color:#83949d;font-size:1rem;line-height:2rem}#admin-login.wide form input:-moz-placeholder{color:#83949d;font-size:1rem;line-height:2rem}#admin-login.wide form input:-ms-input-placeholder{color:#83949d;font-size:1rem;line-height:2rem}#admin-login.wide .grid{display:block}#admin-login.wide .form-label,#admin-login.wide .form-data{display:block;width:100%;-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;-webkit-flex:1;-moz-flex:1;-ms-flex:1;flex:1}#admin-login .form-field{padding-left:0;margin-bottom:0}#admin-login .form-label{display:none}#admin-login .form-data{padding-right:0}#admin-login .wrapper-spacer{width:100% !important;display:block !important;padding:0 1rem}#admin-login .wrapper-spacer h3{padding-left:1rem;color:rgba(255,255,255,0.4);border-bottom:3px solid rgba(255,255,255,0.1)}#admin-login .instructions{display:block;padding:2rem 3rem 0;margin:0;font-size:1.3rem;color:rgba(255,255,255,0.8)}#admin-login .instructions p{margin:0}#admin-login h1{background:#21333e url(../images/logo.png) 50% 50% no-repeat;font-size:0;color:transparent;height:216px;margin:0}#admin-login form{position:relative}#admin-login form .padding{padding:3rem 3rem 6rem 3rem}#admin-login form input{margin-bottom:2rem;background:#314D5B;color:#fff;font-size:1.4rem;line-height:1.5;text-align:center;font-weight:300;-webkit-font-smoothing:auto;border:1px solid #1e2e39}#admin-login form input::-webkit-input-placeholder{color:#83949d}#admin-login form input::-moz-placeholder{color:#83949d}#admin-login form input:-moz-placeholder{color:#83949d}#admin-login form input:-ms-input-placeholder{color:#83949d}#admin-login form .form-actions{display:block !important;width:100% !important;text-align:center;position:absolute;bottom:0;left:0;right:0;padding:1.5rem 3rem}#admin-login form .form-actions button:first-child{margin-right:1rem}#admin-login .alert{text-align:center;padding:1rem 3rem}#admin-sidebar{position:absolute;left:0;top:0;bottom:0;width:20%;background:#253A47}@media only all and (max-width: 47.938em){#admin-sidebar{display:none;width:75%;z-index:999999}}#admin-sidebar a{color:#ccc}#admin-sidebar a:hover{color:#fff}#admin-logo{background:#21333e;height:4.2rem}#admin-logo h3{text-transform:uppercase;margin:0;text-align:center;font-size:1.2rem}#admin-logo h3 i{font-size:1rem;vertical-align:middle;margin-top:-1px}#admin-user-details,.admin-user-details{padding:2rem;border-bottom:1px solid #21333e;overflow:hidden}#admin-user-details img,.admin-user-details img{-webkit-transition:all 0.5s ease;-moz-transition:all 0.5s ease;transition:all 0.5s ease;border-radius:100%;float:left}@media only all and (min-width: 48em) and (max-width: 59.938em){#admin-user-details img,.admin-user-details img{float:none}}#admin-user-details:hover img,.admin-user-details:hover img{box-shadow:0px 0px 0 50px #2a4251}#admin-user-details .admin-user-names,.admin-user-details .admin-user-names{margin-left:45px}@media only all and (min-width: 48em) and (max-width: 59.938em){#admin-user-details .admin-user-names,.admin-user-details .admin-user-names{margin-left:0}}#admin-user-details .admin-user-names h4,#admin-user-details .admin-user-names h5,.admin-user-details .admin-user-names h4,.admin-user-details .admin-user-names h5{color:#e6e6e6;margin:0;font-size:1rem;line-height:1.3}#admin-user-details .admin-user-names h5,.admin-user-details .admin-user-names h5{font-family:"Lato","Helvetica","Tahoma","Geneva","Arial",sans-serif;color:#afc7d5;font-size:0.9rem}#admin-menu{display:block;margin:0;padding:0;list-style:none}#admin-menu li{font-family:"Montserrat","Helvetica","Tahoma","Geneva","Arial",sans-serif}#admin-menu li .badges{float:right;margin-right:1rem}#admin-menu li .badges .badge{display:inline-block;margin-right:-5px;color:#e6e6e6}#admin-menu li .badges .count{background-color:#365569}#admin-menu li .badges .updates{background-color:#2693B7;display:none}#admin-menu li .badges.with-updates .count{border-bottom-left-radius:0;border-top-left-radius:0}#admin-menu li .badges.with-updates .updates{border-bottom-right-radius:0;border-top-right-radius:0;display:inline-block}#admin-menu li a{-webkit-transition:all 0.2s ease;-moz-transition:all 0.2s ease;transition:all 0.2s ease;display:block;padding-left:25px;padding-top:0.7rem;padding-bottom:0.7rem;color:#d1dee7}@media only all and (min-width: 48em) and (max-width: 59.938em){#admin-menu li a{padding-left:20px}}#admin-menu li a i{-webkit-transition:all 0.2s ease;-moz-transition:all 0.2s ease;transition:all 0.2s ease;color:#afc7d5;margin-right:8px}@media only all and (min-width: 48em) and (max-width: 59.938em){#admin-menu li a i{display:none}}#admin-menu li a:hover{background:#21333e;color:#fff}#admin-menu li a:hover i{font-size:1.2rem}#admin-menu li.selected a{background:#314D5B;color:#fff;padding-left:16px;border-left:9px solid #349886}@media only all and (min-width: 48em) and (max-width: 59.938em){#admin-menu li.selected a{padding-left:11px}}#admin-menu li.selected a i{color:#e1eaf0}#admin-main{margin-left:20%}@media only all and (max-width: 47.938em){#admin-main{width:100%;margin-left:0}}#admin-main .hint:after,#admin-main [data-hint]:after{font-size:0.9rem;width:400px;line-height:inherit;white-space:normal}#admin-main h1{margin:0;font-size:1.5rem;text-align:left;letter-spacing:-1px}#admin-main .padding{padding:3rem}#admin-main .titlebar{position:relative;height:4.2rem;padding:0 3rem}@media only all and (max-width: 47.938em){#admin-main .titlebar{height:7.2rem;margin-top:-5.5rem;position:relative}}@media only all and (max-width: 47.938em){#admin-main .titlebar h1{transform:inherit;top:5px;font-size:1.2rem;display:block;text-align:center;padding:20px 0px;margin-top:-90px;z-index:2}#admin-main .titlebar h1>i:first-child:before{content:"\f0c9"}}@media only all and (max-width: 381px){#admin-main .titlebar h1{margin-top:-138px}}@media only all and (max-width: 47.938em){#admin-main .titlebar h1 .fa-th{cursor:pointer;float:left}}#admin-main .titlebar .button-bar{padding:0}@media only all and (max-width: 47.938em){#admin-main .titlebar .button-bar{text-align:center;display:block;float:none;margin:5rem auto 0px;padding-top:70px}}#admin-main .titlebar .preview{color:#fff;font-size:90%}#admin-main .titlebar .button{padding:0.3rem 0.6rem}@media only all and (max-width: 47.938em){#admin-main .titlebar .button{padding:0.2rem 0.5rem;font-size:0.9rem}}#admin-main .titlebar .button i{font-size:13px}#admin-main .admin-block .grav-update,#admin-main .admin-block .alert{margin-top:-2rem;margin-bottom:2rem}#admin-main .grav-update{padding:0 3rem;margin-top:-3rem;background:#9055AF;color:#fff}#admin-main .grav-update:after{content:"";display:table;clear:both}#admin-main .grav-update.plugins{padding-right:1rem}#admin-main .grav-update .button{float:right;margin-top:0.6rem;margin-left:1rem;line-height:1.5;background:#73448c;color:rgba(255,255,255,0.85);border-radius:4px}#admin-main .grav-update .button:hover{background:#814c9d;color:#fff}#admin-main .grav-update .button.dropdown-toggle{background:#814c9d;border-left:1px solid #653c7b}#admin-main .grav-update p{line-height:3rem;margin:0}#admin-main .grav-update i{padding-right:0.5rem}#admin-main .grav-update .less{color:rgba(255,255,255,0.75)}#admin-main .grav-update.grav{margin-top:0;-webkit-transition:margin-top 0.15s ease-out;-moz-transition:margin-top 0.15s ease-out;transition:margin-top 0.15s ease-out}@media only all and (max-width: 47.938em){#admin-main .grav-update.grav{position:absolute;z-index:9;bottom:0;width:100%}#admin-main .grav-update.grav p *{display:none}#admin-main .grav-update.grav p{font-size:0}#admin-main .grav-update.grav p button{width:95%;display:inherit;position:absolute;top:0;left:0;margin-left:2.5%;margin-right:2.5%;padding-left:0}}#admin-main .grav-update.grav+.content-padding{top:7.2rem;-webkit-transition:top 0.15s ease-out;-moz-transition:top 0.15s ease-out;transition:top 0.15s ease-out}@media only all and (max-width: 47.938em){#admin-main .grav-update.grav+.content-padding{top:7.2rem;padding-bottom:8rem;padding-top:0rem}}#admin-main .content-padding{position:absolute;top:4.2rem;bottom:0;left:20%;right:0;overflow-y:auto;padding:2.5rem}@media only all and (max-width: 47.938em){#admin-main .content-padding{top:7.2rem;left:0}}#admin-main .admin-block{background:#eee;color:#737C81;padding:2rem 0}#admin-main .admin-block h1{color:#314D5B;padding:0 3rem 0.5rem;margin:0 0 1rem;border-bottom:3px solid #e1e1e1}@media only all and (max-width: 47.938em){#admin-main .admin-block h1{padding:0 0 0.5rem;margin:0 0 1rem !important;text-indent:3rem}}#admin-main .admin-block h1.no_underline{border-bottom:0}#admin-main .admin-block .button-bar{margin-right:3rem}@media only all and (max-width: 47.938em){#admin-main .admin-block .button-bar{width:100%;margin:-.5rem 0 1rem 0;text-align:center}#admin-main .admin-block .button-bar .button{width:100%}}#admin-main .flush-bottom.button-bar{margin:1rem -2rem -1rem;height:70px;padding:0 1rem;float:none}@media only all and (max-width: 47.938em){#admin-main .flush-bottom.button-bar{height:auto;padding:2rem 1rem 0rem 1rem}}@media only all and (max-width: 47.938em){#admin-main .flush-bottom.button-bar .button{margin-left:0 !important;margin-bottom:.5rem;width:100%}}#admin-main .danger,#admin-main .success{position:relative}#admin-main .danger.button-bar,#admin-main .success.button-bar{margin:2rem 0 -2rem;height:70px;padding:1rem;float:none;background:#e9e9e9}#admin-main .danger.button-bar .button{background:#DA4B46;color:rgba(255,255,255,0.85);border-radius:4px}#admin-main .danger.button-bar .button:hover{background:#de605b;color:#fff}#admin-main .danger.button-bar .button.dropdown-toggle{background:#de605b;border-left:1px solid #d63631}#admin-dashboard:after{content:"";display:table;clear:both}#admin-dashboard .dashboard-item{float:left;width:50%;margin-bottom:2.5rem}@media only all and (max-width: 47.938em){#admin-dashboard .dashboard-item{width:100%}}#admin-dashboard .dashboard-item>div{padding:1rem 2rem}#admin-dashboard .dashboard-left{padding-right:1.25rem}@media only all and (max-width: 47.938em){#admin-dashboard .dashboard-left{padding-right:0rem}}#admin-dashboard .dashboard-right{padding-left:1.25rem}@media only all and (max-width: 47.938em){#admin-dashboard .dashboard-right{padding-left:0rem}}#admin-dashboard #updates p{text-align:center;color:rgba(255,255,255,0.96);margin:0}#admin-dashboard #updates .updates-chart{width:50%;float:left}#admin-dashboard #updates .chart-wrapper{position:relative}#admin-dashboard #updates .backups-chart{position:relative;width:50%;float:left}#admin-dashboard #updates .numeric{display:block;position:absolute;width:100%;text-align:center;font-size:1.7rem;line-height:1}#admin-dashboard #updates .numeric em{display:block;font-style:normal;font-size:1rem;color:rgba(255,255,255,0.85)}#admin-dashboard #updates .admin-update-charts{min-height:191px}#admin-dashboard #updates .admin-update-charts:after{content:"";display:table;clear:both}#admin-dashboard #updates .button{margin-left:0.5rem}@media only all and (min-width: 48em) and (max-width: 59.938em){#admin-dashboard #updates .button{width:49%;padding:.3rem 0rem;margin-left:0}}#admin-dashboard #popularity p{text-align:center;color:rgba(255,255,255,0.95);margin:0}#admin-dashboard #popularity .button-bar{height:100px;padding:0 1rem}#admin-dashboard #popularity .stat{display:block;float:left;width:33%;text-align:center}#admin-dashboard #popularity .stat b{display:block;font-size:2.5rem;line-height:1;font-weight:300}#admin-dashboard #popularity .stat i{display:block;font-style:normal;color:rgba(255,255,255,0.75)}#admin-dashboard .tertiary-accent{background-color:#2693B7;background-image:-webkit-linear-gradient(#2693B7,#64c0df);background-image:linear-gradient(#2693B7,#64c0df)}#admin-dashboard .secondary-accent{background-color:#349886;background-image:-webkit-linear-gradient(#349886,#67cbb9);background-image:linear-gradient(#349886,#67cbb9)}.no-flick,.card-item{-webkit-transform:translate3d(0, 0, 0)}.card-row{-webkit-box-pack:justify;-moz-box-pack:justify;box-pack:justify;-webkit-justify-content:space-between;-moz-justify-content:space-between;-ms-justify-content:space-between;-o-justify-content:space-between;justify-content:space-between;-ms-flex-pack:justify}.card-item{overflow:hidden;padding:1rem;margin:0;position:relative;width:31%;border:1px solid #e1e1e1;background:#fff;margin-bottom:2rem}@media only all and (min-width: 48em) and (max-width: 59.938em){.card-item{width:48%}}@media only all and (max-width: 47.938em){.card-item{width:100%}}.card-item h4{font-size:1.2rem;line-height:1.2}.user-details{text-align:center}.user-details img{border-radius:100%}.user-details h2{margin:0;font-size:1.8rem}.user-details h5{color:#8d959a;font-size:1.1rem;margin:0}#footer{text-align:center;padding:3rem 0 1rem}.ct-chart .ct-series .ct-bar{stroke-width:20px}.ct-chart .ct-series.ct-series-a .ct-bar{stroke:rgba(255,255,255,0.85) !important}.ct-chart .ct-series.ct-series-a .ct-slice-donut{stroke:#fff !important}.ct-chart .ct-series.ct-series-b .ct-slice-donut{stroke:rgba(255,255,255,0.2) !important}#popularity .ct-chart{margin:0 -10px -10px}#popularity .ct-chart .ct-chart-bar{padding:10px}#latest .page-title,#latest .page-route{overflow:auto}#latest .last-modified{padding-left:10px}#overlay{position:fixed;width:25%;height:100%;z-index:999999;left:75%;top:0;display:none}.gpm-item-info+#blueprints .block-tabs{padding-top:16px}.pages-list{list-style:none;margin:0;padding:0;border-top:1px solid #e1e1e1}.pages-list ul{list-style:none;margin:0;padding:0}.pages-list li{margin:0;padding:0}.pages-list .row{-webkit-transition:all 0.2s ease;-moz-transition:all 0.2s ease;transition:all 0.2s ease;border-bottom:1px solid #e1e1e1;line-height:2.5rem;padding-right:3rem}.pages-list .row:hover{background:#f3f3f3}.pages-list .row p.page-route{display:block;margin:-10px 0 5px 25px;line-height:1;font-size:0.9rem;color:#888;text-shadow:1px 1px 0 #fff}.pages-list .row p.page-route .spacer{color:#d5d5d5;display:inline-block;margin:0 0.3rem}.pages-list .row .hint--bottom:before,.pages-list .row .hint--bottom:after{left:4px}.pages-list .row .hint:after,.pages-list .row [data-hint]:after{border-radius:2px}.pages-list .row .badge.lang{background-color:#aaa;color:white;margin-left:8px}.pages-list .row .badge.lang.info{background-color:#9055AF}.pages-list .page-tools{display:inline-block;float:right;font-size:1.4rem}.pages-list .page-tools i{margin-left:10px}.pages-list .page-home{font-size:1.4rem;margin-left:10px;color:#bbb;vertical-align:middle}.pages-list .page-info{font-size:1.1rem;margin-left:10px;color:#bbb;vertical-align:middle}.pages-list .page-icon{color:#0082BA;font-weight:700}.pages-list .page-icon.children-open:before{content:'\f056'}.pages-list .page-icon.children-closed:before{content:'\f055'}.pages-list .page-icon.not-routable{color:#CE431D}.pages-list .page-icon.not-visible{color:#999}.pages-list .page-icon.modular{color:#9055AF}#page-filtering{margin:-2rem 3rem 1rem}#page-filtering:after{content:"";display:table;clear:both}#page-filtering .page-filters{width:60%;float:left}@media only all and (max-width: 47.938em){#page-filtering .page-filters{width:100%}}#page-filtering .page-search{position:relative;width:40%;float:left;padding-left:2rem;text-indent:2.5rem}#page-filtering .page-search:after{position:absolute;right:15px;top:10px;content:'\f002';font-family:'FontAwesome'}@media only all and (max-width: 47.938em){#page-filtering .page-search{width:100%;padding-top:1rem;padding-left:0rem}#page-filtering .page-search:after{top:1.5rem}}#page-filtering .page-shortcuts{clear:both;padding-top:5px}#page-filtering .page-shortcuts:after{content:"";display:table;clear:both}#page-filtering .page-shortcuts .button{background:#aaa;color:rgba(255,255,255,0.85);border-radius:4px}#page-filtering .page-shortcuts .button:hover{background:#b7b7b7;color:#fff}#page-filtering .page-shortcuts .button.dropdown-toggle{background:#b7b7b7;border-left:1px solid #9d9d9d}#page-filtering .selectize-control.multi .selectize-input{padding:0.425rem 0.425rem}#page-filtering .selectize-control.multi .selectize-input.has-items{padding-top:6px;padding-bottom:4px}#page-filtering .selectize-control.multi .selectize-input input{font-size:1rem;line-height:1.7}#page-filtering .selectize-control.multi .selectize-input>div,#page-filtering .selectize-control.multi .selectize-input>div.active{color:#777;padding:2px 10px}#page-filtering .selectize-control.multi .selectize-input>div[data-value='Routable'],#page-filtering .selectize-control.multi .selectize-input>div.active[data-value='Routable']{background:#CE431D;color:#fff}#page-filtering .selectize-control.multi .selectize-input>div[data-value='NonRoutable'],#page-filtering .selectize-control.multi .selectize-input>div.active[data-value='NonRoutable']{color:#CE431D}#page-filtering .selectize-control.multi .selectize-input>div[data-value='Visible'],#page-filtering .selectize-control.multi .selectize-input>div.active[data-value='Visible']{background:#71B15E;color:#fff}#page-filtering .selectize-control.multi .selectize-input>div[data-value='NonVisible'],#page-filtering .selectize-control.multi .selectize-input>div.active[data-value='NonVisible']{color:#71B15E}#page-filtering .selectize-control.multi .selectize-input>div[data-value='Modular'],#page-filtering .selectize-control.multi .selectize-input>div.active[data-value='Modular']{background:#9055AF;color:#fff}#page-filtering .selectize-control.multi .selectize-input>div[data-value='NonModular'],#page-filtering .selectize-control.multi .selectize-input>div.active[data-value='NonModular']{color:#9055AF}#page-filtering .selectize-control.multi .selectize-input>div[data-value='Published'],#page-filtering .selectize-control.multi .selectize-input>div.active[data-value='Published']{background:#0093B8;color:#fff}#page-filtering .selectize-control.multi .selectize-input>div[data-value='NonPublished'],#page-filtering .selectize-control.multi .selectize-input>div.active[data-value='NonPublished']{color:#0093B8}.admin-form-wrapper{position:relative}#admin-topbar{position:absolute;right:0.5rem;height:3.5rem}@media only all and (max-width: 47.938em){#admin-topbar{width:100%;right:0;top:.25rem;padding:0 .5rem}}#admin-topbar #admin-mode-toggle,#admin-topbar #admin-lang-toggle{height:37px;display:inline-block;vertical-align:inherit}#admin-topbar #admin-lang-toggle{z-index:10}#admin-topbar #admin-lang-toggle button{background:#73448c;color:rgba(255,255,255,0.85);border-radius:4px}#admin-topbar #admin-lang-toggle button:hover{background:#814c9d;color:#fff}#admin-topbar #admin-lang-toggle button.dropdown-toggle{background:#814c9d;border-left:1px solid #653c7b}#admin-topbar #admin-lang-toggle .dropdown-menu{background:#9055AF}#admin-topbar #admin-lang-toggle .dropdown-menu button{background:transparent;color:#fff;width:100%}#admin-topbar .switch-grav{border:0;background-color:#365569}@media only all and (max-width: 47.938em){#admin-topbar .switch-toggle{width:100%}}#admin-topbar .switch-toggle input:checked+label{color:#fff}#admin-topbar .switch-toggle input+label{color:#d1dee7}#admin-topbar .switch-toggle input.highlight:checked ~ a{background:#3aafd6}body .selectize-dropdown .optgroup-header{color:#000;border-bottom:1px solid #eee;background-color:#fafafa}.depth-0 .row{padding-left:3rem}.depth-1 .row{padding-left:6rem}.depth-2 .row{padding-left:9rem}.depth-3 .row{padding-left:12rem}.depth-4 .row{padding-left:15rem}.depth-5 .row{padding-left:18rem}.depth-6 .row{padding-left:21rem}.depth-7 .row{padding-left:24rem}.depth-8 .row{padding-left:27rem}.depth-9 .row{padding-left:30rem}.hidden{display:none !important}.switch-toggle input[type="radio"]{display:none !important}html.remodal-is-locked{overflow:hidden;touch-action:none}.remodal,[data-remodal-id]{display:none}.remodal-overlay{position:fixed;z-index:99999;top:-5000px;right:-5000px;bottom:-5000px;left:-5000px;display:none}.remodal-wrapper{position:fixed;z-index:100000;top:0;right:0;bottom:0;left:0;display:none;overflow:auto;text-align:center;-webkit-overflow-scrolling:touch}.remodal-wrapper:after{display:inline-block;height:100%;margin-left:-0.05em;content:''}.remodal-overlay,.remodal-wrapper{backface-visibility:hidden}.remodal{position:relative;outline:none;text-size-adjust:100%}.remodal-is-initialized{display:inline-block}.remodal-bg.remodal-is-opening,.remodal-bg.remodal-is-opened{-webkit-filter:blur(3px);filter:blur(3px)}.remodal-overlay{background:rgba(43,46,56,0.9)}.remodal-overlay.remodal-is-opening,.remodal-overlay.remodal-is-closing{animation-duration:0.3s;animation-fill-mode:forwards}.remodal-overlay.remodal-is-opening{animation-name:remodal-overlay-opening-keyframes}.remodal-overlay.remodal-is-closing{animation-name:remodal-overlay-closing-keyframes}.remodal-wrapper{padding:10px 10px 0}.remodal{box-sizing:border-box;width:100%;margin-bottom:10px;padding:35px;transform:translate3d(0, 0, 0);color:#2b2e38;background:#fff}.remodal.remodal-is-opening,.remodal.remodal-is-closing{animation-duration:0.3s;animation-fill-mode:forwards}.remodal.remodal-is-opening{animation-name:remodal-opening-keyframes}.remodal.remodal-is-closing{animation-name:remodal-closing-keyframes}.remodal,.remodal-wrapper:after{vertical-align:middle}.remodal-close{position:absolute;top:0;left:0;display:block;overflow:visible;width:35px;height:35px;margin:0;padding:0;cursor:pointer;transition:color 0.2s;text-decoration:none;color:#95979c;border:0;outline:0;background:transparent}.remodal-close:hover,.remodal-close:focus{color:#2b2e38}.remodal-close:before{font-family:Arial, "Helvetica CY", "Nimbus Sans L", sans-serif !important;font-size:25px;line-height:35px;position:absolute;top:0;left:0;display:block;width:35px;content:"\00d7";text-align:center}@keyframes remodal-opening-keyframes{from{transform:scale(1.05);opacity:0}to{transform:none;opacity:1}}@keyframes remodal-closing-keyframes{from{transform:scale(1);opacity:1}to{transform:scale(0.95);opacity:0}}@keyframes remodal-overlay-opening-keyframes{from{opacity:0}to{opacity:1}}@keyframes remodal-overlay-closing-keyframes{from{opacity:1}to{opacity:0}}@media only screen and (min-width: 641px){.remodal{max-width:700px}}.lt-ie9 .remodal-overlay{background:#2b2e38}.lt-ie9 .remodal{width:700px}.remodal{padding:35px 0 0;text-align:left;box-shadow:0 10px 20px rgba(0,0,0,0.3);border-radius:3px}.tab-bar{background:#253A47;margin:0;padding:0;list-style:none;font-family:"Montserrat","Helvetica","Tahoma","Geneva","Arial",sans-serif}.tab-bar:after{content:"";display:table;clear:both}.tab-bar li{display:block;float:left;height:3.5em}.tab-bar li.active span,.tab-bar li.active a{background:#eee;color:#737C81}@media only all and (max-width: 47.938em){.tab-bar li{width:100%}.tab-bar li span,.tab-bar li a{width:100%;text-align:center}}.tab-bar span,.tab-bar a{display:inline-block;padding:0 4rem;line-height:3.5em;color:#d1dee7}.tab-bar span:hover,.tab-bar a:hover{color:#fff;background:#141f25}@-webkit-keyframes show{from{opacity:0}to{opacity:1}}@-moz-keyframes show{from{opacity:0}to{opacity:1}}@keyframes show{from{opacity:0}to{opacity:1}}.form-tabs{background:#253A47;font-family:"Montserrat","Helvetica","Tahoma","Geneva","Arial",sans-serif;margin-top:-4rem}@media only all and (max-width: 47.938em){.form-tabs{padding-top:4rem}}.form-tabs>input[type=radio]{display:none}.form-tabs>input[type=radio]:checked+label{background:#eee;color:#737C81}.form-tabs>label{display:inline-block;cursor:pointer;color:#d1dee7;height:3.5em;text-align:center;line-height:3.5em;padding:0 2rem}@media only all and (max-width: 47.938em){.form-tabs>label{width:100%}}.form-tabs>label:last-of-type{border-bottom:none}.form-tabs>label:hover{color:#fff;background:#2a4251}.tab-body{position:absolute;top:-9999px;opacity:0;width:100%}.tab-body-wrapper{padding-top:3.5em;background:#eee}#tab1:checked ~ .tab-body-wrapper #tab-body-1,#tab2:checked ~ .tab-body-wrapper #tab-body-2,#tab3:checked ~ .tab-body-wrapper #tab-body-3,#tab4:checked ~ .tab-body-wrapper #tab-body-4,#tab5:checked ~ .tab-body-wrapper #tab-body-5,#tab6:checked ~ .tab-body-wrapper #tab-body-6,#tab7:checked ~ .tab-body-wrapper #tab-body-7,#tab8:checked ~ .tab-body-wrapper #tab-body-8,#tab9:checked ~ .tab-body-wrapper #tab-body-9,#tab10:checked ~ .tab-body-wrapper #tab-body-10{position:relative;top:0px;opacity:1}.grav-mdeditor .CodeMirror-scroll{margin-right:-36px;padding-bottom:36px}.grav-mdeditor-fullscreen{position:fixed;top:0;left:0;bottom:0;right:0;z-index:99999}.grav-mdeditor-fullscreen .grav-mdeditor-content,.grav-mdeditor-fullscreen .grav-mdeditor-code,.grav-mdeditor-fullscreen .CodeMirror-wrap,.grav-mdeditor-fullscreen .grav-mdeditor-preview{height:100% !important}.grav-mdeditor-fullscreen .grav-mdeditor-navbar,.grav-mdeditor-fullscreen .grav-mdeditor-navbar ul li:first-child a,.grav-mdeditor-fullscreen .grav-mdeditor-navbar-flip ul li:last-child a{border-radius:0}.grav-mdeditor-navbar{border:1px solid #d5d5d5;border-top-right-radius:4px;border-top-left-radius:4px;background:#fbfbfb}.grav-mdeditor-navbar:after{content:"";display:table;clear:both}.grav-mdeditor-navbar ul{list-style:none;margin:0;padding:0}.grav-mdeditor-navbar ul li{float:left;padding:inherit !important;margin:inherit !important;border-radius:inherit !important;border:inherit !important}.grav-mdeditor-navbar ul li:first-child a{border-top-left-radius:4px}.grav-mdeditor-navbar ul .mdeditor-active a{background:white;cursor:auto;border-left:1px solid #d5d5d5;border-right:1px solid #d5d5d5}.grav-mdeditor-navbar ul .mdeditor-active a:hover{background:#fff}.grav-mdeditor-navbar ul a{display:block;cursor:pointer;line-height:3rem;height:3rem;padding:0 1rem;color:#737C81}.grav-mdeditor-navbar ul a:hover{background:#f3f3f3;color:#5b6266}.grav-mdeditor-navbar-nav{float:left}.grav-mdeditor-navbar-flip{float:right}.grav-mdeditor-navbar-flip ul li:last-child a{border-top-right-radius:4px}.grav-mdeditor-content{cursor:text;border:1px solid #d5d5d5;border-top:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.grav-mdeditor-content:after{content:"";display:table;clear:both}.grav-mdeditor-code .CodeMirror{padding:10px 20px 20px 20px;border-bottom-left-radius:4px}.grav-mdeditor-preview{padding:20px;overflow-y:scroll;position:relative;background:#fbfbfb;border-bottom-right-radius:4px}.grav-mdeditor-navbar p{margin-top:10px;margin-bottom:10px;padding-left:20px}#admin-main .grav-mdeditor-preview{font-family:"Lato","Helvetica","Tahoma","Geneva","Arial",sans-serif}#admin-main .grav-mdeditor-preview h1,#admin-main .grav-mdeditor-preview h2,#admin-main .grav-mdeditor-preview h3,#admin-main .grav-mdeditor-preview h4,#admin-main .grav-mdeditor-preview h5,#admin-main .grav-mdeditor-preview h6{color:#5b6266}#admin-main .grav-mdeditor-preview h1{font-size:2rem;border:0}#admin-main .grav-mdeditor-preview h2{font-size:1.6rem}#admin-main .grav-mdeditor-preview h3{font-size:1.4rem}#admin-main .grav-mdeditor-preview h4{font-size:1.2rem}#admin-main .grav-mdeditor-preview h5{font-size:1.1rem}#admin-main .grav-mdeditor-preview p,#admin-main .grav-mdeditor-preview h1{padding:0}[data-mode=tab][data-active-tab=code] .grav-mdeditor-preview,[data-mode=tab][data-active-tab=preview] .grav-mdeditor-code{display:none}[data-mode=split] .grav-mdeditor-button-code,[data-mode=split] .grav-mdeditor-button-preview{display:none}[data-mode=split] .grav-mdeditor-code{border-right:1px solid #d5d5d5}[data-mode=split] .grav-mdeditor-code,[data-mode=split] .grav-mdeditor-code .grav-mdeditor-preview{float:left;width:50%}.cm-s-paper.CodeMirror{color:#676f74;font-size:14px;line-height:1.4}.cm-s-paper.CodeMirror pre{font-family:"DejaVu Sans Mono", Menlo, Monaco, Consolas, Courier, monospace}.cm-s-paper .cm-link{color:#005e87}.cm-s-paper .cm-comment{color:#80898e}.cm-s-paper .cm-header{color:#4f5559}.cm-s-paper .cm-strong{color:#5b6266}.cm-s-paper .cm-em{color:#4f5559}.cm-s-paper .cm-string{color:#0082BA}.cm-s-paper .cm-tag{color:#349886}.cm-s-paper .cm-bracket{color:#41bea8}.cm-s-paper .cm-variable{color:#4f5559}.cm-s-paper .cm-variable-2{color:#80898e}.cm-s-paper .cm-variable-3{color:#8d959a}.cm-s-paper .cm-hr{color:#d1d4d6;font-weight:bold}.cm-s-paper .cm-keyword{color:#0082BA}.cm-s-paper .cm-atom{color:#9055AF}.cm-s-paper .cm-meta{color:#676f74}.cm-s-paper .cm-number{color:#7f8c8d}.cm-s-paper .cm-def{color:#00f}.cm-s-paper .cm-variable{color:black}.cm-s-paper .cm-variable-2{color:#555}.cm-s-paper .cm-variable-3{color:#085}.cm-s-paper .cm-property{color:black}.cm-s-paper .cm-operator{color:black}.cm-s-paper .cm-string-2{color:#f50}.cm-s-paper .cm-meta{color:#555}.cm-s-paper .cm-error{color:#f00}.cm-s-paper .cm-qualifier{color:#555}.cm-s-paper .cm-builtin{color:#555}.cm-s-paper .cm-attribute{color:#7f8c8d}.cm-s-paper .cm-quote{color:#888}.cm-s-paper .cm-header-1{font-size:140%}.cm-s-paper .cm-header-2{font-size:120%}.cm-s-paper .cm-header-3{font-size:110%}.cm-s-paper .cm-negative{color:#d44}.cm-s-paper .cm-positive{color:#292}.cm-s-paper .cm-header,.cm-s-paper .cm-strong{font-weight:bold}.cm-s-paper .cm-em{font-style:italic}.cm-s-paper .cm-link{text-decoration:underline}.cm-s-paper .cm-invalidchar{color:#f00}.form-uploads-wrapper h3{font-size:1rem;margin:2rem 0 0.5rem 0}.dropzone{position:relative;border:1px #d5d5d5 solid;border-radius:4px;min-height:4rem;background:#fff}.dropzone.dz-clickable{cursor:pointer}.dropzone.dz-drag-hover{border-color:rgba(0,0,0,0.15);background:rgba(0,0,0,0.04)}.dropzone.dz-started .dz-message{display:none}.dropzone .dz-message{opacity:1;-ms-filter:none;filter:none}.dropzone .dz-preview{position:relative;display:inline-block;margin:1rem;vertical-align:top}.dropzone .dz-preview.dz-file-preview [data-dz-thumbnail]{display:none}.dropzone .dz-preview.dz-error .dz-error-mark{display:block}.dropzone .dz-preview.dz-success .dz-success-mark{display:block}.dropzone .dz-preview .dz-success-mark,.dropzone .dz-preview .dz-error-mark{color:#fff;font-family:FontAwesome;display:none;position:absolute;width:22px;height:22px;font-size:18px;line-height:25px;border-radius:100%;text-align:center;right:2px;top:2px}.dropzone .dz-preview .dz-success-mark span,.dropzone .dz-preview .dz-error-mark span{display:none}.dropzone .dz-preview:hover .dz-success-mark,.dropzone .dz-preview:hover .dz-error-mark{display:none}.dropzone .dz-preview .dz-success-mark{background-color:#41bea8}.dropzone .dz-preview .dz-success-mark::after{content:'\f00c'}.dropzone .dz-preview .dz-error-mark{background-color:#D55A4E}.dropzone .dz-preview .dz-error-mark::after{content:'\f12a'}.dropzone .dz-preview .dz-progress{position:absolute;top:100px;left:0px;right:0px;height:4px;background:#d7d7d7;display:none}.dropzone .dz-preview .dz-progress .dz-upload{display:block;position:absolute;top:0;bottom:0;left:0;width:0%;background-color:#41bea8}.dropzone .dz-preview .dz-error-message{display:none;position:absolute;top:0;left:0;right:0;font-size:0.9rem;line-height:1.2;padding:8px 10px;background:#f6f6f6;color:#D55A4E;z-index:500}.dropzone .dz-preview.dz-processing .dz-progress{display:block}.dropzone .dz-preview:hover:not(.hide-backface) .dz-details img{display:none}.dropzone .dz-preview:hover.dz-error .dz-error-message{display:block}.dropzone .dz-preview .dz-remove,.dropzone .dz-preview .dz-insert{display:none}.dropzone .dz-preview:hover .dz-remove,.dropzone .dz-preview:hover .dz-insert{display:block;position:absolute;left:0;right:0;bottom:22px;border:1px solid #e1e1e1;width:50%;text-align:center;cursor:pointer;font-size:0.8rem}.dropzone .dz-preview:hover .dz-remove:hover,.dropzone .dz-preview:hover .dz-insert:hover{background:#eee}.dropzone .dz-preview:hover .dz-remove{left:inherit;border-left:0}.dropzone .dz-preview:hover .dz-insert{right:inherit}.dropzone .dz-preview.dz-processing .dz-details{overflow:hidden}.dropzone .dz-preview.dz-processing .dz-details img{position:absolute;left:50%;top:50%;height:auto;width:100%;-webkit-transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.dropzone .dz-preview .dz-details{width:150px;height:100px;position:relative;background:#f6f6f6;border:1px solid #e1e1e1;font-size:0.8rem;padding:5px;margin-bottom:22px}.dropzone .dz-preview .dz-details .dz-filename{line-height:1.2;overflow:hidden;height:100%}.dropzone .dz-preview .dz-details img{position:absolute;top:0;left:0;width:150px;height:100px}.dropzone .dz-preview .dz-details .dz-size{position:absolute;bottom:-28px;left:0;right:0;text-align:center;font-size:0.8rem;height:28px;line-height:28px}.dropzone.dz-clickable .dz-message,.dropzone.dz-clickable .dz-message span{cursor:pointer;color:#c3c7ca;text-align:center;font-size:1.4rem;line-height:4rem}.dropzone *{cursor:default}.toast-title{font-weight:bold}.toast-message{-ms-word-wrap:break-word;word-wrap:break-word}.toast-message a,.toast-message label{color:#ffffff}.toast-message a:hover{color:#cccccc;text-decoration:none}.toast-close-button{position:relative;right:-0.3em;top:-0.3em;float:right;font-size:20px;font-weight:bold;color:#ffffff;-webkit-text-shadow:0 1px 0 #ffffff;text-shadow:0 1px 0 #ffffff;opacity:0.8;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80);filter:alpha(opacity=80)}.toast-close-button:hover,.toast-close-button:focus{color:#000000;text-decoration:none;cursor:pointer;opacity:0.4;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=40);filter:alpha(opacity=40)}button.toast-close-button{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.toast-top-right{top:5rem;right:1.5rem}#toast-container{position:fixed;z-index:999999}#toast-container *{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#toast-container>div{position:relative;overflow:hidden;margin:0 0 6px;padding:15px 15px 15px 50px;width:300px;border-radius:3px;background-position:15px center;background-repeat:no-repeat;color:#ffffff;opacity:0.9;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=90);filter:alpha(opacity=90)}#toast-container>:hover{opacity:1;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);filter:alpha(opacity=100);cursor:pointer}#toast-container>.toast-info{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=") !important}#toast-container>.toast-error{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=") !important}#toast-container>.toast-success{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==") !important}#toast-container>.toast-warning{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=") !important}#toast-container.toast-top-center>div,#toast-container.toast-bottom-center>div{width:300px;margin:auto}#toast-container.toast-top-full-width>div,#toast-container.toast-bottom-full-width>div{width:96%;margin:auto}.toast{background-color:#030303}.toast-success{background-color:#9055AF}.toast-success .button{background:#9b66b7;background:#a778bf;color:rgba(255,255,255,0.85);border-radius:4px}.toast-success .button:hover{background:#b289c7;color:#fff}.toast-success .button.dropdown-toggle{background:#b289c7;border-left:1px solid #9b66b7}.toast-error{background-color:#DA4B46}.toast-error .button{background-color:#c62d28;background:#9b231f;color:rgba(255,255,255,0.85);border-radius:4px}.toast-error .button:hover{background:#b02823;color:#fff}.toast-error .button.dropdown-toggle{background:#b02823;border-left:1px solid #861e1b}.toast-info{background-color:#2693B7}.toast-info .button{background-color:#1d718d;background:#144f63;color:rgba(255,255,255,0.85);border-radius:4px}.toast-info .button:hover{background:#196078;color:#fff}.toast-info .button.dropdown-toggle{background:#196078;border-left:1px solid #103e4d}.toast-warning{background-color:#f89406}.toast-warning .button{background-color:#c67605;background:#945904;color:rgba(255,255,255,0.85);border-radius:4px}.toast-warning .button:hover{background:#ad6704;color:#fff}.toast-warning .button.dropdown-toggle{background:#ad6704;border-left:1px solid #7c4a03}.toast-progress{position:absolute;left:0;bottom:0;height:4px;background-color:#000000;opacity:0.4;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=40);filter:alpha(opacity=40)}@media all and (max-width: 240px){#toast-container>div{padding:8px 8px 8px 50px;width:11em}#toast-container .toast-close-button{right:-0.2em;top:-0.2em}}@media all and (min-width: 241px) and (max-width: 480px){#toast-container>div{padding:8px 8px 8px 50px;width:18em}#toast-container .toast-close-button{right:-0.2em;top:-0.2em}}@media all and (min-width: 481px) and (max-width: 768px){#toast-container>div{padding:15px 15px 15px 50px;width:25em}}.gpm>table>tbody>tr{border-bottom:1px solid #e1e1e1}.gpm td{border:0}.gpm .gpm-name{white-space:nowrap;color:#b6bbbe}.gpm .gpm-version{padding-left:0.5rem;color:#8d959a;font-size:0.9rem}.gpm .gpm-update .gpm-name{color:#349886}.gpm .gpm-actions .enabled,.gpm .gpm-actions .disabled{font-size:1.6rem}.gpm .gpm-actions .disabled{color:#8d959a}.gpm .gpm-item-info{position:relative;border-bottom:3px solid #e1e1e1;padding-bottom:1rem;margin-bottom:3rem;overflow:hidden}@media only all and (max-width: 47.938em){.gpm .gpm-item-info{word-wrap:break-word}}.gpm .gpm-item-info .gpm-item-icon{color:#e6e6e6;position:absolute;right:3rem;font-size:20rem}.gpm .gpm-item-info table{position:relative}.gpm .gpm-item-info td{border:0;text-align:left !important}.gpm .gpm-item-info td:first-child{color:#9ba2a6;white-space:nowrap;width:25%}.gpm .gpm-item-info tr:hover{background:inherit}.gpm .badge.update{display:inline-block;background:#9055AF;border-radius:4px;padding:2px 10px;color:#fff;margin-left:1rem}.gpm .gpm-ribbon{background-color:#9055AF;overflow:hidden;white-space:nowrap;position:absolute;top:1rem;right:-2rem;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.gpm .gpm-ribbon a{color:#fff;display:block;font-weight:bold;font-size:0.9rem;padding:5px 40px;text-align:center}.gpm .themes{padding:3rem}.gpm .themes .gpm-name{margin-bottom:0.5rem}.gpm .themes .gpm-actions{background:#e9e9e9;margin:1rem -1rem -1rem -1rem;height:4rem;text-align:center;padding:1rem;font-size:1rem;font-weight:bold}.gpm .themes .active-theme .gpm-actions,.gpm .themes.inactive-theme .gpm-actions{line-height:2rem}.gpm .themes .active-theme{border:1px solid #349886}.gpm .themes .active-theme .gpm-actions{background:#349886;color:#eee}.gpm .themes .inactive-theme .gpm-actions{display:block;color:#a2a2a2;font-weight:normal}#phpinfo img{display:none}#phpinfo table{margin:1rem 0 0}#phpinfo tr:hover{background:transparent}#phpinfo th{background:#d9d9d9}#phpinfo td{word-wrap:break-word}#phpinfo td h1{margin:0rem -3rem 0rem !important}#phpinfo td:first-child{color:#349886}#phpinfo hr{border-bottom:0}#phpinfo h1{font-size:2.3rem}#phpinfo h2{font-size:1.7rem;margin:3rem 3rem 0rem !important}
/*# sourceMappingURL=template.css.map */
diff --git a/themes/grav/css-compiled/template.css.map b/themes/grav/css-compiled/template.css.map
index 55d56f82..c0edc374 100644
--- a/themes/grav/css-compiled/template.css.map
+++ b/themes/grav/css-compiled/template.css.map
@@ -1,7 +1,7 @@
{
"version": 3,
-"mappings": "AACQ,kGAA0F,CCSlG,0VAAgB,CACf,QAAQ,CAAE,QAAQ,CAClB,GAAG,CAAE,GAAG,CACR,iBAAiB,CAAE,gBAAgB,CACnC,cAAc,CAAE,gBAAgB,CAChC,YAAY,CAAE,gBAAgB,CAC9B,aAAa,CAAE,gBAAgB,CAC/B,SAAS,CAAE,gBAAgB,CCjB5B,OAAQ,CACP,OAAO,CAAE,YAAY,CACrB,OAAO,CAAE,aAAa,CACnB,WAAW,CAAE,GAAG,CAChB,sBAAsB,CAAE,IAAI,CAC5B,MAAM,CAAE,OAAO,CACf,cAAc,CAAE,MAAM,CAEtB,WAAW,CCPW,uDAA4D,CDSlF,cAAS,CACL,MAAM,CAAE,YAAY,CAGxB,SAAE,CACE,YAAY,CAAE,GAAG,CAGrB,oBAAe,CACX,OAAO,CAAE,QAAQ,CACjB,SAAS,CAAE,IAAI,CAGnB,sBAAiB,CACb,OAAO,CAAE,eAAe,CACxB,SAAS,CAAE,MAAM,CEzBzB,SAAW,CACV,MAAM,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AE,MAAM,CACjB,MAAM,CAAE,yBAAuC",
-"sources": ["../scss/template/_fonts.scss","../scss/nucleus/mixins/_utilities.scss","../scss/template/modules/_buttons.scss","../scss/configuration/template/_typography.scss","../scss/template/_core.scss","../scss/configuration/template/_colors.scss","../scss/configuration/template/_bullets.scss","../scss/configuration/template/_variables.scss","../scss/vendor/bourbon/css3/_font-face.scss","../scss/template/_extensions.scss","../scss/vendor/bourbon/addons/_prefixer.scss","../scss/nucleus/mixins/_breakpoints.scss","../scss/template/_typography.scss","../scss/configuration/nucleus/_typography.scss","../scss/template/modules/_toggle-switch.scss","../scss/template/_forms.scss","../scss/vendor/bourbon/css3/_flex-box.scss","../scss/template/_tables.scss","../scss/template/_buttons.scss","../scss/template/_errors.scss","../scss/template/_login.scss","../scss/vendor/bourbon/css3/_placeholder.scss","../scss/template/_admin.scss","../scss/vendor/bourbon/addons/_clearfix.scss","../scss/vendor/bourbon/css3/_linear-gradient.scss","../scss/template/_pages.scss","../scss/template/_remodal.scss","../scss/vendor/bourbon/css3/_transition.scss","../scss/vendor/bourbon/functions/_transition-property-name.scss","../scss/template/_tabs.scss","../scss/vendor/bourbon/css3/_keyframes.scss","../scss/template/_editor.scss","../scss/template/_dropzone.scss","../scss/template/_toastr.scss","../scss/template/_gpm.scss","../scss/template/_phpinfo.scss"],
+"mappings": "AACQ,kGAA0F,CCSlG,0VAAgB,CACf,QAAQ,CAAE,QAAQ,CAClB,GAAG,CAAE,GAAG,CACR,iBAAiB,CAAE,gBAAgB,CACnC,cAAc,CAAE,gBAAgB,CAChC,YAAY,CAAE,gBAAgB,CAC9B,aAAa,CAAE,gBAAgB,CAC/B,SAAS,CAAE,gBAAgB,CCjB5B,OAAQ,CACP,OAAO,CAAE,YAAY,CACrB,OAAO,CAAE,aAAa,CACnB,WAAW,CAAE,GAAG,CAChB,sBAAsB,CAAE,IAAI,CAC5B,MAAM,CAAE,OAAO,CACf,cAAc,CAAE,MAAM,CAEtB,WAAW,CCPW,uDAA4D,C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c,CACV,MAAM,CAAE,iBAA8B,CACtC,uCAAa,CACT,UAAU,CRxGP,OAAW,CQyGd,KAAK,C3B7GW,IAAO,C2BiH/B,yCAA6B,CACzB,OAAO,CAAE,KAAK,CACd,KAAK,CAAE,OAAwB,CAC/B,WAAW,CAAE,MAAM,CC1I3B,YAAI,CAAE,OAAO,CAAE,IAAI,CAEnB,cAAM,CACF,MAAM,CAAE,QAAQ,CAIhB,iBAAQ,CACJ,UAAU,CAAE,WAAW,CAI/B,WAAG,CACC,UAAU,CAAE,OAAO,CAGvB,WAAG,CACC,SAAS,CAAE,UAAU,CAErB,cAAG,CACC,MAAM,CAAE,0BAAyC,CAErD,uBAAc,CACV,KAAK,CTGE,OAAW,CSE1B,WAAG,CACC,aAAa,CAAE,CAAC,CAGpB,WAAG,CACC,SAAS,CAAE,MAAM,CAGrB,WAAG,CACC,SAAS,CAAE,MAAM,CACjB,MAAM,CAAE,yBAAuC",
+"sources": ["../scss/template/_fonts.scss","../scss/nucleus/mixins/_utilities.scss","../scss/template/modules/_buttons.scss","../scss/configuration/template/_typography.scss","../scss/template/_core.scss","../scss/configuration/template/_colors.scss","../scss/configuration/template/_bullets.scss","../scss/configuration/template/_variables.scss","../scss/vendor/bourbon/css3/_font-face.scss","../scss/template/_extensions.scss","../scss/vendor/bourbon/addons/_prefixer.scss","../scss/nucleus/mixins/_breakpoints.scss","../scss/template/_typography.scss","../scss/configuration/nucleus/_typography.scss","../scss/template/modules/_toggle-switch.scss","../scss/template/_forms.scss","../scss/vendor/bourbon/css3/_flex-box.scss","../scss/template/_tables.scss","../scss/template/_buttons.scss","../scss/template/_errors.scss","../scss/template/_login.scss","../scss/vendor/bourbon/css3/_placeholder.scss","../scss/template/_admin.scss","../scss/vendor/bourbon/addons/_clearfix.scss","../scss/vendor/bourbon/css3/_linear-gradient.scss","../scss/template/_pages.scss","../scss/template/_remodal.scss","../scss/template/_tabs.scss","../scss/vendor/bourbon/css3/_keyframes.scss","../scss/template/_editor.scss","../scss/template/_dropzone.scss","../scss/template/_toastr.scss","../scss/template/_gpm.scss","../scss/template/_phpinfo.scss"],
"names": [],
"file": "template.css"
}
\ No newline at end of file
diff --git a/themes/grav/gulpfile.js b/themes/grav/gulpfile.js
new file mode 100644
index 00000000..a9d90a8b
--- /dev/null
+++ b/themes/grav/gulpfile.js
@@ -0,0 +1,73 @@
+'use strict';
+
+var gulp = require('gulp'),
+ path = require('path'),
+ immutable = require('immutable'),
+ merge = require('merge-stream'),
+ gulpWebpack = require('gulp-webpack'),
+ webpack = require('webpack');
+
+var plugins = {
+ 'Promise': 'imports?this=>global!exports?global.Promise!babel-polyfill',
+ 'fetch': 'imports?this=>global!exports?global.fetch!whatwg-fetch'
+ },
+ base = immutable.fromJS(require('./webpack.conf.js')),
+ options = {
+ dev: base.mergeDeep({
+ devtool: 'source-map',
+ plugins: [
+ new webpack.DefinePlugin({
+ 'process.env': { NODE_ENV: '"development"' }
+ }),
+ new webpack.ProvidePlugin(plugins),
+ new webpack.optimize.CommonsChunkPlugin("vendor", "vendor.js", Infinity)
+ ],
+ output: {
+ filename: 'admin.js'
+ }
+ }),
+
+ prod: base.mergeDeep({
+ plugins: [
+ new webpack.DefinePlugin({
+ 'process.env': { NODE_ENV: '"production"' }
+ }),
+ new webpack.optimize.UglifyJsPlugin({
+ sourceMap: false,
+ compress: {
+ warnings: false
+ }
+ }),
+ new webpack.ProvidePlugin(plugins),
+ new webpack.optimize.CommonsChunkPlugin("vendor", "vendor.min.js", Infinity)
+ ],
+ output: {
+ filename: 'admin.min.js'
+ }
+ })
+ };
+
+var compileJS = function(watch) {
+ var devOpts = options.dev.set('watch', watch),
+ prodOpts = options.prod.set('watch', watch);
+
+ var prod = gulp.src('app/main.js')
+ .pipe(gulpWebpack(prodOpts.toJS()))
+ .pipe(gulp.dest('js/'));
+
+ var dev = gulp.src('app/main.js')
+ .pipe(gulpWebpack(devOpts.toJS()))
+ .pipe(gulp.dest('js/'));
+
+ return merge(prod, dev);
+};
+
+gulp.task('js', function() {
+ compileJS(false);
+});
+
+gulp.task('watch', function() {
+ compileJS(true);
+});
+
+gulp.task('default', ['js']);
diff --git a/themes/grav/js/admin-all.js b/themes/grav/js/admin-all.js
index b66212f2..51389740 100644
--- a/themes/grav/js/admin-all.js
+++ b/themes/grav/js/admin-all.js
@@ -1,4 +1,4 @@
-var getState = function(){
+/*var getState = function(){
var loadValues = [],
ignoreNames = ['page-filter', 'page-search'];
$('input, select, textarea').each(function(index, element){
@@ -9,37 +9,37 @@ var getState = function(){
});
return loadValues.toString();
-};
+};*/
-var bytesToSize = function(bytes) {
+/*var bytesToSize = function(bytes) {
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
if (bytes == 0) return '0 Byte';
var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)));
return Math.round(bytes / Math.pow(1024, i), 2) + ' ' + sizes[i];
-};
+};*/
-var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
+/*var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
var keepAlive = function keepAlive() {
$.post(GravAdmin.config.base_url_relative + '/task' + GravAdmin.config.param_sep + 'keepAlive', {
'admin-nonce': GravAdmin.config.admin_nonce
});
-};
+};*/
$(function () {
- jQuery.substitute = function(str, sub) {
+ /*jQuery.substitute = function(str, sub) {
return str.replace(/\{(.+?)\}/g, function($0, $1) {
return $1 in sub ? sub[$1] : $0;
});
- };
+ };*/
// Set Toastr defaults
- toastr.options = {
+ /*toastr.options = {
"positionClass": "toast-top-right"
- }
+ }*/
// dashboard
- var chart = $('.updates-chart'), UpdatesChart;
+ /*var chart = $('.updates-chart'), UpdatesChart;
if (chart.length) {
var data = {
series: [100, 0]
@@ -60,17 +60,17 @@ $(function () {
if (data.index) { return; }
chart.find('.numeric span').text(Math.round(data.value) + '%');
- var text = translations.PLUGIN_ADMIN.UPDATES_AVAILABLE;
+ var text = GravAdmin.translations.PLUGIN_ADMIN.UPDATES_AVAILABLE;
if (data.value == 100) {
- text = translations.PLUGIN_ADMIN.FULLY_UPDATED;
+ text = GravAdmin.translations.PLUGIN_ADMIN.FULLY_UPDATED;
}
$('.js__updates-available-description').html(text)
$('.updates-chart .hidden').removeClass('hidden');
});
}
-
+*/
// Cache Clear
- $('[data-clear-cache]').on('click', function(e) {
+ /*$('[data-clear-cache]').on('click', function(e) {
$(this).attr('disabled','disabled').find('> .fa').removeClass('fa-trash').addClass('fa-refresh fa-spin');
var url = $(this).data('clearCache');
@@ -85,10 +85,10 @@ $(function () {
}).always(function() {
$('[data-clear-cache]').removeAttr('disabled').find('> .fa').removeClass('fa-refresh fa-spin').addClass('fa-trash');
});
- });
+ });*/
// Plugins list details sliders
- $('.gpm-name, .gpm-actions').on('click', function(e){
+ /*$('.gpm-name, .gpm-actions').on('click', function(e){
var target = $(e.target);
if (target.prop('tagName') == 'A' || target.parent('a').length) { return true; }
@@ -105,10 +105,10 @@ $(function () {
.addClass('fa-chevron-' + (isVisible ? 'up' : 'down'));
}
});
- });
+ });*/
// Update plugins/themes
- $(document).on('click', '[data-maintenance-update]', function(e) {
+ /*$(document).on('click', '[data-maintenance-update]', function(e) {
$(this).attr('disabled','disabled').find('> .fa').removeClass('fa-cloud-download').addClass('fa-refresh fa-spin');
var url = $(this).data('maintenanceUpdate');
@@ -125,9 +125,9 @@ $(function () {
toastr.success(result.message + window.grav_available_version);
$('#footer .grav-version').html(window.grav_available_version);
- /*// hide the update button after successfull update and update the badges
+ /!*!// hide the update button after successfull update and update the badges
$('[data-maintenance-update]').fadeOut();
- $('.badges.with-updates').removeClass('with-updates').find('.badge.updates').remove();*/
+ $('.badges.with-updates').removeClass('with-updates').find('.badge.updates').remove();*!/
} else {
toastr.success(result.message);
}
@@ -139,10 +139,10 @@ $(function () {
GPMRefresh();
$('[data-maintenance-update]').removeAttr('disabled').find('> .fa').removeClass('fa-refresh fa-spin').addClass('fa-cloud-download');
});
- });
+ });*/
// Update plugins/themes
- $('[data-ajax]').on('click', function(e) {
+ /*$('[data-ajax]').on('click', function(e) {
var button = $(this),
icon = button.find('> .fa'),
@@ -182,7 +182,7 @@ $(function () {
}
}
- toastr.success(result.message || translations.PLUGIN_ADMIN.TASK_COMPLETED);
+ toastr.success(result.message || GravAdmin.translations.PLUGIN_ADMIN.TASK_COMPLETED);
for (var setting in toastrBackup) { if (toastrBackup.hasOwnProperty(setting)) {
toastr.options[setting] = toastrBackup[setting];
@@ -191,7 +191,7 @@ $(function () {
if (url.indexOf(task + 'backup') !== -1) {
//Reset backup days count
- $('.backups-chart .numeric').html("0
" + translations.PLUGIN_ADMIN.DAYS + " ");
+ $('.backups-chart .numeric').html("0
" + GravAdmin.translations.PLUGIN_ADMIN.DAYS + " ");
var data = {
series: [0,100]
@@ -214,9 +214,9 @@ $(function () {
button.removeAttr('disabled');
icon.removeClass('fa-refresh fa-spin').addClass(iconClasses.join(' '));
});
- });
+ });*/
- $('[data-gpm-checkupdates]').on('click', function(){
+ /*$('[data-gpm-checkupdates]').on('click', function(){
var element = $(this);
element.find('i').addClass('fa-spin');
GPMRefresh({
@@ -227,21 +227,21 @@ $(function () {
if (payload) {
if (!payload.grav.isUpdatable && !payload.resources.total) {
- toastr.success(translations.PLUGIN_ADMIN.EVERYTHING_UP_TO_DATE);
+ toastr.success(GravAdmin.translations.PLUGIN_ADMIN.EVERYTHING_UP_TO_DATE);
} else {
var grav = payload.grav.isUpdatable ? 'Grav v' + payload.grav.available : '';
- var resources = payload.resources.total ? payload.resources.total + ' ' + translations.PLUGIN_ADMIN.UPDATES_ARE_AVAILABLE: '';
+ var resources = payload.resources.total ? payload.resources.total + ' ' + GravAdmin.translations.PLUGIN_ADMIN.UPDATES_ARE_AVAILABLE: '';
- if (!resources) { grav += ' ' + translations.PLUGIN_ADMIN.IS_AVAILABLE_FOR_UPDATE }
- toastr.info(grav + (grav && resources ? ' ' + translations.PLUGIN_ADMIN.AND + ' ' : '') + resources);
+ if (!resources) { grav += ' ' + GravAdmin.translations.PLUGIN_ADMIN.IS_AVAILABLE_FOR_UPDATE }
+ toastr.info(grav + (grav && resources ? ' ' + GravAdmin.translations.PLUGIN_ADMIN.AND + ' ' : '') + resources);
}
}
}
});
- });
+ });*/
var GPMRefresh = function (options) {
- options = options || {};
+ /*options = options || {};
var data = {
task: 'GPM',
@@ -261,19 +261,19 @@ $(function () {
return;
}
- var grav = response.payload.grav,
+ /!*var grav = response.payload.grav,
installed = response.payload.installed,
resources = response.payload.resources,
task = 'task' + GravAdmin.config.param_sep;
-
+*!/
// grav updatable
- if (grav.isUpdatable) {
+ /!*if (grav.isUpdatable) {
var icon = '
';
- content = 'Grav
v{available} ' + translations.PLUGIN_ADMIN.IS_NOW_AVAILABLE + '!
(' + translations.PLUGIN_ADMIN.CURRENT + ': v{version}) ',
- button = '
' + translations.PLUGIN_ADMIN.UPDATE_GRAV_NOW + ' ';
+ content = 'Grav
v{available} ' + GravAdmin.translations.PLUGIN_ADMIN.IS_NOW_AVAILABLE + '!
(' + GravAdmin.translations.PLUGIN_ADMIN.CURRENT + ': v{version}) ',
+ button = '
' + GravAdmin.translations.PLUGIN_ADMIN.UPDATE_GRAV_NOW + ' ';
if (grav.isSymlink) {
- button = '
';
+ button = '
';
}
content = jQuery.substitute(content, {available: grav.available, version: grav.version});
@@ -282,33 +282,33 @@ $(function () {
}
$('#grav-update-button').on('click', function() {
- $(this).html(translations.PLUGIN_ADMIN.UPDATING_PLEASE_WAIT + ' ' + bytesToSize(grav.assets['grav-update'].size) + '..');
- });
+ $(this).html(GravAdmin.translations.PLUGIN_ADMIN.UPDATING_PLEASE_WAIT + ' ' + bytesToSize(grav.assets['grav-update'].size) + '..');
+ });*!/
// dashboard
- if ($('.updates-chart').length) {
+ /!*if ($('.updates-chart').length) {
var missing = (resources.total + (grav.isUpdatable ? 1 : 0)) * 100 / (installed + (grav.isUpdatable ? 1 : 0)),
updated = 100 - missing;
UpdatesChart.update({series: [updated, missing]});
if (resources.total) {
$('#updates [data-maintenance-update]').fadeIn();
}
- }
+ }*!/
- if (!resources.total) {
+ /!*if (!resources.total) {
$('#updates [data-maintenance-update]').fadeOut();
$('.badges.with-updates').removeClass('with-updates').find('.badge.updates').remove();
} else {
var length,
icon = '
',
- content = '{updates} ' + translations.PLUGIN_ADMIN.OF_YOUR + ' {type} ' + translations.PLUGIN_ADMIN.HAVE_AN_UPDATE_AVAILABLE,
- button = '
' + translations.PLUGIN_ADMIN.UPDATE + ' {Type} ',
+ content = '{updates} ' + GravAdmin.translations.PLUGIN_ADMIN.OF_YOUR + ' {type} ' + GravAdmin.translations.PLUGIN_ADMIN.HAVE_AN_UPDATE_AVAILABLE,
+ button = '
' + GravAdmin.translations.PLUGIN_ADMIN.UPDATE + ' {Type} ',
plugins = $('.grav-update.plugins'),
themes = $('.grav-update.themes'),
sidebar = {plugins: $('#admin-menu a[href$="/plugins"]'), themes: $('#admin-menu a[href$="/themes"]')};
// sidebar
- if (sidebar.plugins.length || sidebar.themes.length) {
+ /!*if (sidebar.plugins.length || sidebar.themes.length) {
var length, badges;
if (sidebar.plugins.length && (length = Object.keys(resources.plugins).length)) {
badges = sidebar.plugins.find('.badges');
@@ -321,7 +321,7 @@ $(function () {
badges.addClass('with-updates');
badges.find('.badge.updates').text(length);
}
- }
+ }*!/
// list page
if (plugins[0] && (length = Object.keys(resources.plugins).length)) {
@@ -334,7 +334,7 @@ $(function () {
plugin = $('[data-gpm-plugin="' + key + '"] .gpm-name');
url = plugin.find('a');
if (!plugin.find('.badge.update').length) {
- plugin.append('
' + translations.PLUGIN_ADMIN.UPDATE_AVAILABLE + '! ');
+ plugin.append('
' + GravAdmin.translations.PLUGIN_ADMIN.UPDATE_AVAILABLE + '! ');
}
});
@@ -349,12 +349,12 @@ $(function () {
$.each(resources.themes, function (key, value) {
theme = $('[data-gpm-theme="' + key + '"]');
url = theme.find('.gpm-name a');
- theme.append('
');
+ theme.append('
');
});
- }
+ }*!/
// details page
- var type = 'plugin',
+ /!*var type = 'plugin',
details = $('.grav-update.plugin')[0];
if (!details) {
@@ -368,7 +368,7 @@ $(function () {
resource = resources[type + 's'][slug];
if (resource) {
- content = '
v{available} ' + translations.PLUGIN_ADMIN.OF_THIS + ' ' + type + ' ' + translations.PLUGIN_ADMIN.IS_NOW_AVAILABLE + '!';
+ content = '
v{available} ' + GravAdmin.translations.PLUGIN_ADMIN.OF_THIS + ' ' + type + ' ' + GravAdmin.translations.PLUGIN_ADMIN.IS_NOW_AVAILABLE + '!';
content = jQuery.substitute(content, { available: resource.available });
button = jQuery.substitute(button, {
Type: Type,
@@ -376,21 +376,21 @@ $(function () {
});
$(details).html('
' + icon + content + button + '
');
}
- }
- }
+ }*!/
+ //}
if (options.callback && typeof options.callback == 'function') options.callback(response);
}
}).always(function() {
$('[data-gpm-checkupdates]').find('i').removeClass('fa-spin');
- });
+ });*/
};
- if (GravAdmin.config.enable_auto_updates_check === '1') {
+ /*if (GravAdmin.config.enable_auto_updates_check === '1') {
GPMRefresh();
- }
+ }*/
- function reIndex (collection) {
+ /*function reIndex (collection) {
var holder = collection.find('[data-collection-holder]'),
addBtn = collection.find('[data-action="add"]'),
prefix = holder.data('collection-holder'),
@@ -469,10 +469,10 @@ $(function () {
MDEditors.add(field);
}
});
- });
+ });*/
// enable the toggleable checkbox when typing in the corresponding textarea/input element
- jQuery(document).on('input propertychange click', '.form-data textarea, .form-data input, .form-data label, .form-data .selectize-input', function() {
+ /*jQuery(document).on('input propertychange click', '.form-data textarea, .form-data input, .form-data label, .form-data .selectize-input', function() {
var item = this;
var checkbox = $(item).parents('.form-field').find('.toggleable input[type="checkbox"]');
@@ -501,26 +501,26 @@ $(function () {
input.siblings('label').css('opacity', on ? 1 : 0.7);
$(this).parents('.form-label').siblings('.form-data').css('opacity', on ? 1 : 0.7);
- });
+ });*/
// Themes Switcher Warning
- $(document).on('mousedown', '[data-remodal-target="theme-switch-warn"]', function(e){
+ /*$(document).on('mousedown', '[data-remodal-target="theme-switch-warn"]', function(e){
var name = $(e.target).closest('[data-gpm-theme]').find('.gpm-name a').text(),
remodal = $('.remodal.theme-switcher');
remodal.find('strong').text(name);
remodal.find('.button.continue').attr('href', $(e.target).attr('href'));
- });
+ });*/
// Setup keep-alive on pages that have at least one element with data-grav-keepalive="true" set
- if ($(document).find('[data-grav-keepalive="true"]').length > 0) {
+ /*if ($(document).find('[data-grav-keepalive="true"]').length > 0) {
setInterval(function() {
keepAlive();
}, (GravAdmin.config.admin_timeout/2)*1000);
- }
+ }*/
// CTRL + S / CMD + S - shortcut for [Save] when available
- var saveTask = $('[name="task"][value="save"]').filter(function(index, element) {
+ /*var saveTask = $('[name="task"][value="save"]').filter(function(index, element) {
return !($(element).parents('.remodal-overlay').length);
});
@@ -532,5 +532,5 @@ $(function () {
saveTask.click();
}
});
- }
+ }*/
});
diff --git a/themes/grav/js/admin.js b/themes/grav/js/admin.js
new file mode 100644
index 00000000..f4300264
--- /dev/null
+++ b/themes/grav/js/admin.js
@@ -0,0 +1,13993 @@
+var Grav =
+webpackJsonpGrav([0],[
+/* 0 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _gpm = __webpack_require__(1);
+
+ var _gpm2 = _interopRequireDefault(_gpm);
+
+ var _keepalive = __webpack_require__(200);
+
+ var _keepalive2 = _interopRequireDefault(_keepalive);
+
+ var _updates = __webpack_require__(201);
+
+ var _updates2 = _interopRequireDefault(_updates);
+
+ var _dashboard = __webpack_require__(206);
+
+ var _dashboard2 = _interopRequireDefault(_dashboard);
+
+ var _pages = __webpack_require__(211);
+
+ var _pages2 = _interopRequireDefault(_pages);
+
+ var _forms = __webpack_require__(227);
+
+ var _forms2 = _interopRequireDefault(_forms);
+
+ __webpack_require__(236);
+
+ __webpack_require__(237);
+
+ __webpack_require__(238);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ // starts the keep alive, auto runs every X seconds
+ _keepalive2.default.start();
+
+ // bootstrap jQuery extensions
+
+ exports.default = {
+ GPM: {
+ GPM: _gpm2.default,
+ Instance: _gpm.Instance
+ },
+ KeepAlive: _keepalive2.default,
+ Dashboard: _dashboard2.default,
+ Pages: _pages2.default,
+ Forms: _forms2.default,
+ Updates: {
+ Updates: _updates2.default,
+ Instance: _updates.Instance
+ }
+ };
+
+/***/ },
+/* 1 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(fetch) {'use strict';
+
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.Instance = undefined;
+
+ var _response2 = __webpack_require__(193);
+
+ var _gravConfig = __webpack_require__(198);
+
+ var _events = __webpack_require__(199);
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+ var GPM = function (_EventEmitter) {
+ _inherits(GPM, _EventEmitter);
+
+ function GPM() {
+ var action = arguments.length <= 0 || arguments[0] === undefined ? 'getUpdates' : arguments[0];
+
+ _classCallCheck(this, GPM);
+
+ var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(GPM).call(this));
+
+ _this.payload = {};
+ _this.raw = {};
+ _this.action = action;
+ return _this;
+ }
+
+ _createClass(GPM, [{
+ key: 'setPayload',
+ value: function setPayload() {
+ var payload = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
+
+ this.payload = payload;
+ this.emit('payload', payload);
+
+ return this;
+ }
+ }, {
+ key: 'setAction',
+ value: function setAction() {
+ var action = arguments.length <= 0 || arguments[0] === undefined ? 'getUpdates' : arguments[0];
+
+ this.action = action;
+ this.emit('action', action);
+
+ return this;
+ }
+ }, {
+ key: 'fetch',
+ value: function (_fetch) {
+ function fetch() {
+ return _fetch.apply(this, arguments);
+ }
+
+ fetch.toString = function () {
+ return _fetch.toString();
+ };
+
+ return fetch;
+ }(function () {
+ var _this2 = this;
+
+ var callback = arguments.length <= 0 || arguments[0] === undefined ? function () {
+ return true;
+ } : arguments[0];
+ var flush = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1];
+
+ var data = new FormData();
+ data.append('task', 'GPM');
+ data.append('action', this.action);
+
+ if (flush) {
+ data.append('flush', true);
+ }
+
+ this.emit('fetching', this);
+
+ fetch(_gravConfig.config.base_url_relative, {
+ credentials: 'same-origin',
+ method: 'post',
+ body: data
+ }).then(function (response) {
+ _this2.raw = response;return response;
+ }).then(_response2.parseStatus).then(_response2.parseJSON).then(function (response) {
+ return _this2.response(response);
+ }).then(function (response) {
+ return callback(response, _this2.raw);
+ }).then(function (response) {
+ return _this2.emit('fetched', _this2.payload, _this2.raw, _this2);
+ }).catch(_response2.userFeedbackError);
+ })
+ }, {
+ key: 'response',
+ value: function response(_response) {
+ this.payload = _response;
+
+ return _response;
+ }
+ }]);
+
+ return GPM;
+ }(_events.EventEmitter);
+
+ exports.default = GPM;
+ var Instance = exports.Instance = new GPM();
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
+
+/***/ },
+/* 2 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(Promise, global) {/*** IMPORTS FROM imports-loader ***/
+ (function() {
+
+ (function() {
+ 'use strict';
+
+ if (self.fetch) {
+ return
+ }
+
+ function normalizeName(name) {
+ if (typeof name !== 'string') {
+ name = String(name)
+ }
+ if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) {
+ throw new TypeError('Invalid character in header field name')
+ }
+ return name.toLowerCase()
+ }
+
+ function normalizeValue(value) {
+ if (typeof value !== 'string') {
+ value = String(value)
+ }
+ return value
+ }
+
+ function Headers(headers) {
+ this.map = {}
+
+ if (headers instanceof Headers) {
+ headers.forEach(function(value, name) {
+ this.append(name, value)
+ }, this)
+
+ } else if (headers) {
+ Object.getOwnPropertyNames(headers).forEach(function(name) {
+ this.append(name, headers[name])
+ }, this)
+ }
+ }
+
+ Headers.prototype.append = function(name, value) {
+ name = normalizeName(name)
+ value = normalizeValue(value)
+ var list = this.map[name]
+ if (!list) {
+ list = []
+ this.map[name] = list
+ }
+ list.push(value)
+ }
+
+ Headers.prototype['delete'] = function(name) {
+ delete this.map[normalizeName(name)]
+ }
+
+ Headers.prototype.get = function(name) {
+ var values = this.map[normalizeName(name)]
+ return values ? values[0] : null
+ }
+
+ Headers.prototype.getAll = function(name) {
+ return this.map[normalizeName(name)] || []
+ }
+
+ Headers.prototype.has = function(name) {
+ return this.map.hasOwnProperty(normalizeName(name))
+ }
+
+ Headers.prototype.set = function(name, value) {
+ this.map[normalizeName(name)] = [normalizeValue(value)]
+ }
+
+ Headers.prototype.forEach = function(callback, thisArg) {
+ Object.getOwnPropertyNames(this.map).forEach(function(name) {
+ this.map[name].forEach(function(value) {
+ callback.call(thisArg, value, name, this)
+ }, this)
+ }, this)
+ }
+
+ function consumed(body) {
+ if (body.bodyUsed) {
+ return Promise.reject(new TypeError('Already read'))
+ }
+ body.bodyUsed = true
+ }
+
+ function fileReaderReady(reader) {
+ return new Promise(function(resolve, reject) {
+ reader.onload = function() {
+ resolve(reader.result)
+ }
+ reader.onerror = function() {
+ reject(reader.error)
+ }
+ })
+ }
+
+ function readBlobAsArrayBuffer(blob) {
+ var reader = new FileReader()
+ reader.readAsArrayBuffer(blob)
+ return fileReaderReady(reader)
+ }
+
+ function readBlobAsText(blob) {
+ var reader = new FileReader()
+ reader.readAsText(blob)
+ return fileReaderReady(reader)
+ }
+
+ var support = {
+ blob: 'FileReader' in self && 'Blob' in self && (function() {
+ try {
+ new Blob();
+ return true
+ } catch(e) {
+ return false
+ }
+ })(),
+ formData: 'FormData' in self,
+ arrayBuffer: 'ArrayBuffer' in self
+ }
+
+ function Body() {
+ this.bodyUsed = false
+
+
+ this._initBody = function(body) {
+ this._bodyInit = body
+ if (typeof body === 'string') {
+ this._bodyText = body
+ } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
+ this._bodyBlob = body
+ } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
+ this._bodyFormData = body
+ } else if (!body) {
+ this._bodyText = ''
+ } else if (support.arrayBuffer && ArrayBuffer.prototype.isPrototypeOf(body)) {
+ // Only support ArrayBuffers for POST method.
+ // Receiving ArrayBuffers happens via Blobs, instead.
+ } else {
+ throw new Error('unsupported BodyInit type')
+ }
+ }
+
+ if (support.blob) {
+ this.blob = function() {
+ var rejected = consumed(this)
+ if (rejected) {
+ return rejected
+ }
+
+ if (this._bodyBlob) {
+ return Promise.resolve(this._bodyBlob)
+ } else if (this._bodyFormData) {
+ throw new Error('could not read FormData body as blob')
+ } else {
+ return Promise.resolve(new Blob([this._bodyText]))
+ }
+ }
+
+ this.arrayBuffer = function() {
+ return this.blob().then(readBlobAsArrayBuffer)
+ }
+
+ this.text = function() {
+ var rejected = consumed(this)
+ if (rejected) {
+ return rejected
+ }
+
+ if (this._bodyBlob) {
+ return readBlobAsText(this._bodyBlob)
+ } else if (this._bodyFormData) {
+ throw new Error('could not read FormData body as text')
+ } else {
+ return Promise.resolve(this._bodyText)
+ }
+ }
+ } else {
+ this.text = function() {
+ var rejected = consumed(this)
+ return rejected ? rejected : Promise.resolve(this._bodyText)
+ }
+ }
+
+ if (support.formData) {
+ this.formData = function() {
+ return this.text().then(decode)
+ }
+ }
+
+ this.json = function() {
+ return this.text().then(JSON.parse)
+ }
+
+ return this
+ }
+
+ // HTTP methods whose capitalization should be normalized
+ var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']
+
+ function normalizeMethod(method) {
+ var upcased = method.toUpperCase()
+ return (methods.indexOf(upcased) > -1) ? upcased : method
+ }
+
+ function Request(input, options) {
+ options = options || {}
+ var body = options.body
+ if (Request.prototype.isPrototypeOf(input)) {
+ if (input.bodyUsed) {
+ throw new TypeError('Already read')
+ }
+ this.url = input.url
+ this.credentials = input.credentials
+ if (!options.headers) {
+ this.headers = new Headers(input.headers)
+ }
+ this.method = input.method
+ this.mode = input.mode
+ if (!body) {
+ body = input._bodyInit
+ input.bodyUsed = true
+ }
+ } else {
+ this.url = input
+ }
+
+ this.credentials = options.credentials || this.credentials || 'omit'
+ if (options.headers || !this.headers) {
+ this.headers = new Headers(options.headers)
+ }
+ this.method = normalizeMethod(options.method || this.method || 'GET')
+ this.mode = options.mode || this.mode || null
+ this.referrer = null
+
+ if ((this.method === 'GET' || this.method === 'HEAD') && body) {
+ throw new TypeError('Body not allowed for GET or HEAD requests')
+ }
+ this._initBody(body)
+ }
+
+ Request.prototype.clone = function() {
+ return new Request(this)
+ }
+
+ function decode(body) {
+ var form = new FormData()
+ body.trim().split('&').forEach(function(bytes) {
+ if (bytes) {
+ var split = bytes.split('=')
+ var name = split.shift().replace(/\+/g, ' ')
+ var value = split.join('=').replace(/\+/g, ' ')
+ form.append(decodeURIComponent(name), decodeURIComponent(value))
+ }
+ })
+ return form
+ }
+
+ function headers(xhr) {
+ var head = new Headers()
+ var pairs = xhr.getAllResponseHeaders().trim().split('\n')
+ pairs.forEach(function(header) {
+ var split = header.trim().split(':')
+ var key = split.shift().trim()
+ var value = split.join(':').trim()
+ head.append(key, value)
+ })
+ return head
+ }
+
+ Body.call(Request.prototype)
+
+ function Response(bodyInit, options) {
+ if (!options) {
+ options = {}
+ }
+
+ this._initBody(bodyInit)
+ this.type = 'default'
+ this.status = options.status
+ this.ok = this.status >= 200 && this.status < 300
+ this.statusText = options.statusText
+ this.headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers)
+ this.url = options.url || ''
+ }
+
+ Body.call(Response.prototype)
+
+ Response.prototype.clone = function() {
+ return new Response(this._bodyInit, {
+ status: this.status,
+ statusText: this.statusText,
+ headers: new Headers(this.headers),
+ url: this.url
+ })
+ }
+
+ Response.error = function() {
+ var response = new Response(null, {status: 0, statusText: ''})
+ response.type = 'error'
+ return response
+ }
+
+ var redirectStatuses = [301, 302, 303, 307, 308]
+
+ Response.redirect = function(url, status) {
+ if (redirectStatuses.indexOf(status) === -1) {
+ throw new RangeError('Invalid status code')
+ }
+
+ return new Response(null, {status: status, headers: {location: url}})
+ }
+
+ self.Headers = Headers;
+ self.Request = Request;
+ self.Response = Response;
+
+ self.fetch = function(input, init) {
+ return new Promise(function(resolve, reject) {
+ var request
+ if (Request.prototype.isPrototypeOf(input) && !init) {
+ request = input
+ } else {
+ request = new Request(input, init)
+ }
+
+ var xhr = new XMLHttpRequest()
+
+ function responseURL() {
+ if ('responseURL' in xhr) {
+ return xhr.responseURL
+ }
+
+ // Avoid security warnings on getResponseHeader when not allowed by CORS
+ if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {
+ return xhr.getResponseHeader('X-Request-URL')
+ }
+
+ return;
+ }
+
+ xhr.onload = function() {
+ var status = (xhr.status === 1223) ? 204 : xhr.status
+ if (status < 100 || status > 599) {
+ reject(new TypeError('Network request failed'))
+ return
+ }
+ var options = {
+ status: status,
+ statusText: xhr.statusText,
+ headers: headers(xhr),
+ url: responseURL()
+ }
+ var body = 'response' in xhr ? xhr.response : xhr.responseText;
+ resolve(new Response(body, options))
+ }
+
+ xhr.onerror = function() {
+ reject(new TypeError('Network request failed'))
+ }
+
+ xhr.open(request.method, request.url, true)
+
+ if (request.credentials === 'include') {
+ xhr.withCredentials = true
+ }
+
+ if ('responseType' in xhr && support.blob) {
+ xhr.responseType = 'blob'
+ }
+
+ request.headers.forEach(function(value, name) {
+ xhr.setRequestHeader(name, value)
+ })
+
+ xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)
+ })
+ }
+ self.fetch.polyfill = true
+ })();
+
+
+ /*** EXPORTS FROM exports-loader ***/
+ module.exports = global.fetch
+ }.call(global));
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3), (function() { return this; }())))
+
+/***/ },
+/* 3 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(global) {/*** IMPORTS FROM imports-loader ***/
+ (function() {
+
+ "use strict";
+
+ __webpack_require__(4);
+
+ __webpack_require__(191);
+
+ if (global._babelPolyfill) {
+ throw new Error("only one instance of babel-polyfill is allowed");
+ }
+ global._babelPolyfill = true;
+
+ /*** EXPORTS FROM exports-loader ***/
+ module.exports = global.Promise
+ }.call(global));
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
+
+/***/ },
+/* 4 */
+/***/ function(module, exports, __webpack_require__) {
+
+ __webpack_require__(5);
+ __webpack_require__(38);
+ __webpack_require__(44);
+ __webpack_require__(46);
+ __webpack_require__(48);
+ __webpack_require__(50);
+ __webpack_require__(52);
+ __webpack_require__(54);
+ __webpack_require__(55);
+ __webpack_require__(56);
+ __webpack_require__(57);
+ __webpack_require__(58);
+ __webpack_require__(59);
+ __webpack_require__(60);
+ __webpack_require__(61);
+ __webpack_require__(62);
+ __webpack_require__(63);
+ __webpack_require__(64);
+ __webpack_require__(65);
+ __webpack_require__(68);
+ __webpack_require__(69);
+ __webpack_require__(70);
+ __webpack_require__(72);
+ __webpack_require__(73);
+ __webpack_require__(74);
+ __webpack_require__(75);
+ __webpack_require__(76);
+ __webpack_require__(77);
+ __webpack_require__(78);
+ __webpack_require__(80);
+ __webpack_require__(81);
+ __webpack_require__(82);
+ __webpack_require__(84);
+ __webpack_require__(85);
+ __webpack_require__(86);
+ __webpack_require__(88);
+ __webpack_require__(89);
+ __webpack_require__(90);
+ __webpack_require__(91);
+ __webpack_require__(92);
+ __webpack_require__(93);
+ __webpack_require__(94);
+ __webpack_require__(95);
+ __webpack_require__(96);
+ __webpack_require__(97);
+ __webpack_require__(98);
+ __webpack_require__(99);
+ __webpack_require__(100);
+ __webpack_require__(101);
+ __webpack_require__(106);
+ __webpack_require__(107);
+ __webpack_require__(111);
+ __webpack_require__(112);
+ __webpack_require__(114);
+ __webpack_require__(115);
+ __webpack_require__(120);
+ __webpack_require__(121);
+ __webpack_require__(124);
+ __webpack_require__(126);
+ __webpack_require__(128);
+ __webpack_require__(130);
+ __webpack_require__(131);
+ __webpack_require__(132);
+ __webpack_require__(134);
+ __webpack_require__(135);
+ __webpack_require__(137);
+ __webpack_require__(138);
+ __webpack_require__(139);
+ __webpack_require__(140);
+ __webpack_require__(147);
+ __webpack_require__(150);
+ __webpack_require__(151);
+ __webpack_require__(153);
+ __webpack_require__(154);
+ __webpack_require__(155);
+ __webpack_require__(156);
+ __webpack_require__(157);
+ __webpack_require__(158);
+ __webpack_require__(159);
+ __webpack_require__(160);
+ __webpack_require__(161);
+ __webpack_require__(162);
+ __webpack_require__(163);
+ __webpack_require__(164);
+ __webpack_require__(166);
+ __webpack_require__(167);
+ __webpack_require__(168);
+ __webpack_require__(169);
+ __webpack_require__(170);
+ __webpack_require__(171);
+ __webpack_require__(173);
+ __webpack_require__(174);
+ __webpack_require__(175);
+ __webpack_require__(176);
+ __webpack_require__(178);
+ __webpack_require__(179);
+ __webpack_require__(181);
+ __webpack_require__(182);
+ __webpack_require__(184);
+ __webpack_require__(185);
+ __webpack_require__(186);
+ __webpack_require__(189);
+ __webpack_require__(190);
+ module.exports = __webpack_require__(9);
+
+/***/ },
+/* 5 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $ = __webpack_require__(6)
+ , $export = __webpack_require__(7)
+ , DESCRIPTORS = __webpack_require__(12)
+ , createDesc = __webpack_require__(11)
+ , html = __webpack_require__(18)
+ , cel = __webpack_require__(19)
+ , has = __webpack_require__(21)
+ , cof = __webpack_require__(22)
+ , invoke = __webpack_require__(23)
+ , fails = __webpack_require__(13)
+ , anObject = __webpack_require__(24)
+ , aFunction = __webpack_require__(17)
+ , isObject = __webpack_require__(20)
+ , toObject = __webpack_require__(25)
+ , toIObject = __webpack_require__(27)
+ , toInteger = __webpack_require__(29)
+ , toIndex = __webpack_require__(30)
+ , toLength = __webpack_require__(31)
+ , IObject = __webpack_require__(28)
+ , IE_PROTO = __webpack_require__(15)('__proto__')
+ , createArrayMethod = __webpack_require__(32)
+ , arrayIndexOf = __webpack_require__(37)(false)
+ , ObjectProto = Object.prototype
+ , ArrayProto = Array.prototype
+ , arraySlice = ArrayProto.slice
+ , arrayJoin = ArrayProto.join
+ , defineProperty = $.setDesc
+ , getOwnDescriptor = $.getDesc
+ , defineProperties = $.setDescs
+ , factories = {}
+ , IE8_DOM_DEFINE;
+
+ if(!DESCRIPTORS){
+ IE8_DOM_DEFINE = !fails(function(){
+ return defineProperty(cel('div'), 'a', {get: function(){ return 7; }}).a != 7;
+ });
+ $.setDesc = function(O, P, Attributes){
+ if(IE8_DOM_DEFINE)try {
+ return defineProperty(O, P, Attributes);
+ } catch(e){ /* empty */ }
+ if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
+ if('value' in Attributes)anObject(O)[P] = Attributes.value;
+ return O;
+ };
+ $.getDesc = function(O, P){
+ if(IE8_DOM_DEFINE)try {
+ return getOwnDescriptor(O, P);
+ } catch(e){ /* empty */ }
+ if(has(O, P))return createDesc(!ObjectProto.propertyIsEnumerable.call(O, P), O[P]);
+ };
+ $.setDescs = defineProperties = function(O, Properties){
+ anObject(O);
+ var keys = $.getKeys(Properties)
+ , length = keys.length
+ , i = 0
+ , P;
+ while(length > i)$.setDesc(O, P = keys[i++], Properties[P]);
+ return O;
+ };
+ }
+ $export($export.S + $export.F * !DESCRIPTORS, 'Object', {
+ // 19.1.2.6 / 15.2.3.3 Object.getOwnPropertyDescriptor(O, P)
+ getOwnPropertyDescriptor: $.getDesc,
+ // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
+ defineProperty: $.setDesc,
+ // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
+ defineProperties: defineProperties
+ });
+
+ // IE 8- don't enum bug keys
+ var keys1 = ('constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,' +
+ 'toLocaleString,toString,valueOf').split(',')
+ // Additional keys for getOwnPropertyNames
+ , keys2 = keys1.concat('length', 'prototype')
+ , keysLen1 = keys1.length;
+
+ // Create object with `null` prototype: use iframe Object with cleared prototype
+ var createDict = function(){
+ // Thrash, waste and sodomy: IE GC bug
+ var iframe = cel('iframe')
+ , i = keysLen1
+ , gt = '>'
+ , iframeDocument;
+ iframe.style.display = 'none';
+ html.appendChild(iframe);
+ iframe.src = 'javascript:'; // eslint-disable-line no-script-url
+ // createDict = iframe.contentWindow.Object;
+ // html.removeChild(iframe);
+ iframeDocument = iframe.contentWindow.document;
+ iframeDocument.open();
+ iframeDocument.write(' i)if(has(O, key = names[i++])){
+ ~arrayIndexOf(result, key) || result.push(key);
+ }
+ return result;
+ };
+ };
+ var Empty = function(){};
+ $export($export.S, 'Object', {
+ // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
+ getPrototypeOf: $.getProto = $.getProto || function(O){
+ O = toObject(O);
+ if(has(O, IE_PROTO))return O[IE_PROTO];
+ if(typeof O.constructor == 'function' && O instanceof O.constructor){
+ return O.constructor.prototype;
+ } return O instanceof Object ? ObjectProto : null;
+ },
+ // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
+ getOwnPropertyNames: $.getNames = $.getNames || createGetKeys(keys2, keys2.length, true),
+ // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
+ create: $.create = $.create || function(O, /*?*/Properties){
+ var result;
+ if(O !== null){
+ Empty.prototype = anObject(O);
+ result = new Empty();
+ Empty.prototype = null;
+ // add "__proto__" for Object.getPrototypeOf shim
+ result[IE_PROTO] = O;
+ } else result = createDict();
+ return Properties === undefined ? result : defineProperties(result, Properties);
+ },
+ // 19.1.2.14 / 15.2.3.14 Object.keys(O)
+ keys: $.getKeys = $.getKeys || createGetKeys(keys1, keysLen1, false)
+ });
+
+ var construct = function(F, len, args){
+ if(!(len in factories)){
+ for(var n = [], i = 0; i < len; i++)n[i] = 'a[' + i + ']';
+ factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');
+ }
+ return factories[len](F, args);
+ };
+
+ // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
+ $export($export.P, 'Function', {
+ bind: function bind(that /*, args... */){
+ var fn = aFunction(this)
+ , partArgs = arraySlice.call(arguments, 1);
+ var bound = function(/* args... */){
+ var args = partArgs.concat(arraySlice.call(arguments));
+ return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);
+ };
+ if(isObject(fn.prototype))bound.prototype = fn.prototype;
+ return bound;
+ }
+ });
+
+ // fallback for not array-like ES3 strings and DOM objects
+ $export($export.P + $export.F * fails(function(){
+ if(html)arraySlice.call(html);
+ }), 'Array', {
+ slice: function(begin, end){
+ var len = toLength(this.length)
+ , klass = cof(this);
+ end = end === undefined ? len : end;
+ if(klass == 'Array')return arraySlice.call(this, begin, end);
+ var start = toIndex(begin, len)
+ , upTo = toIndex(end, len)
+ , size = toLength(upTo - start)
+ , cloned = Array(size)
+ , i = 0;
+ for(; i < size; i++)cloned[i] = klass == 'String'
+ ? this.charAt(start + i)
+ : this[start + i];
+ return cloned;
+ }
+ });
+ $export($export.P + $export.F * (IObject != Object), 'Array', {
+ join: function join(separator){
+ return arrayJoin.call(IObject(this), separator === undefined ? ',' : separator);
+ }
+ });
+
+ // 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
+ $export($export.S, 'Array', {isArray: __webpack_require__(34)});
+
+ var createArrayReduce = function(isRight){
+ return function(callbackfn, memo){
+ aFunction(callbackfn);
+ var O = IObject(this)
+ , length = toLength(O.length)
+ , index = isRight ? length - 1 : 0
+ , i = isRight ? -1 : 1;
+ if(arguments.length < 2)for(;;){
+ if(index in O){
+ memo = O[index];
+ index += i;
+ break;
+ }
+ index += i;
+ if(isRight ? index < 0 : length <= index){
+ throw TypeError('Reduce of empty array with no initial value');
+ }
+ }
+ for(;isRight ? index >= 0 : length > index; index += i)if(index in O){
+ memo = callbackfn(memo, O[index], index, this);
+ }
+ return memo;
+ };
+ };
+
+ var methodize = function($fn){
+ return function(arg1/*, arg2 = undefined */){
+ return $fn(this, arg1, arguments[1]);
+ };
+ };
+
+ $export($export.P, 'Array', {
+ // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])
+ forEach: $.each = $.each || methodize(createArrayMethod(0)),
+ // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])
+ map: methodize(createArrayMethod(1)),
+ // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])
+ filter: methodize(createArrayMethod(2)),
+ // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])
+ some: methodize(createArrayMethod(3)),
+ // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])
+ every: methodize(createArrayMethod(4)),
+ // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])
+ reduce: createArrayReduce(false),
+ // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])
+ reduceRight: createArrayReduce(true),
+ // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])
+ indexOf: methodize(arrayIndexOf),
+ // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])
+ lastIndexOf: function(el, fromIndex /* = @[*-1] */){
+ var O = toIObject(this)
+ , length = toLength(O.length)
+ , index = length - 1;
+ if(arguments.length > 1)index = Math.min(index, toInteger(fromIndex));
+ if(index < 0)index = toLength(length + index);
+ for(;index >= 0; index--)if(index in O)if(O[index] === el)return index;
+ return -1;
+ }
+ });
+
+ // 20.3.3.1 / 15.9.4.4 Date.now()
+ $export($export.S, 'Date', {now: function(){ return +new Date; }});
+
+ var lz = function(num){
+ return num > 9 ? num : '0' + num;
+ };
+
+ // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
+ // PhantomJS / old WebKit has a broken implementations
+ $export($export.P + $export.F * (fails(function(){
+ return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z';
+ }) || !fails(function(){
+ new Date(NaN).toISOString();
+ })), 'Date', {
+ toISOString: function toISOString(){
+ if(!isFinite(this))throw RangeError('Invalid time value');
+ var d = this
+ , y = d.getUTCFullYear()
+ , m = d.getUTCMilliseconds()
+ , s = y < 0 ? '-' : y > 9999 ? '+' : '';
+ return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +
+ '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +
+ 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +
+ ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';
+ }
+ });
+
+/***/ },
+/* 6 */
+/***/ function(module, exports) {
+
+ var $Object = Object;
+ module.exports = {
+ create: $Object.create,
+ getProto: $Object.getPrototypeOf,
+ isEnum: {}.propertyIsEnumerable,
+ getDesc: $Object.getOwnPropertyDescriptor,
+ setDesc: $Object.defineProperty,
+ setDescs: $Object.defineProperties,
+ getKeys: $Object.keys,
+ getNames: $Object.getOwnPropertyNames,
+ getSymbols: $Object.getOwnPropertySymbols,
+ each: [].forEach
+ };
+
+/***/ },
+/* 7 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var global = __webpack_require__(8)
+ , core = __webpack_require__(9)
+ , hide = __webpack_require__(10)
+ , redefine = __webpack_require__(14)
+ , ctx = __webpack_require__(16)
+ , PROTOTYPE = 'prototype';
+
+ var $export = function(type, name, source){
+ var IS_FORCED = type & $export.F
+ , IS_GLOBAL = type & $export.G
+ , IS_STATIC = type & $export.S
+ , IS_PROTO = type & $export.P
+ , IS_BIND = type & $export.B
+ , target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]
+ , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
+ , expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {})
+ , key, own, out, exp;
+ if(IS_GLOBAL)source = name;
+ for(key in source){
+ // contains in native
+ own = !IS_FORCED && target && key in target;
+ // export native or passed
+ out = (own ? target : source)[key];
+ // bind timers to global for call from export context
+ exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
+ // extend global
+ if(target && !own)redefine(target, key, out);
+ // export
+ if(exports[key] != out)hide(exports, key, exp);
+ if(IS_PROTO && expProto[key] != out)expProto[key] = out;
+ }
+ };
+ global.core = core;
+ // type bitmap
+ $export.F = 1; // forced
+ $export.G = 2; // global
+ $export.S = 4; // static
+ $export.P = 8; // proto
+ $export.B = 16; // bind
+ $export.W = 32; // wrap
+ module.exports = $export;
+
+/***/ },
+/* 8 */
+/***/ function(module, exports) {
+
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
+ var global = module.exports = typeof window != 'undefined' && window.Math == Math
+ ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
+ if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
+
+/***/ },
+/* 9 */
+/***/ function(module, exports) {
+
+ var core = module.exports = {version: '1.2.6'};
+ if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
+
+/***/ },
+/* 10 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var $ = __webpack_require__(6)
+ , createDesc = __webpack_require__(11);
+ module.exports = __webpack_require__(12) ? function(object, key, value){
+ return $.setDesc(object, key, createDesc(1, value));
+ } : function(object, key, value){
+ object[key] = value;
+ return object;
+ };
+
+/***/ },
+/* 11 */
+/***/ function(module, exports) {
+
+ module.exports = function(bitmap, value){
+ return {
+ enumerable : !(bitmap & 1),
+ configurable: !(bitmap & 2),
+ writable : !(bitmap & 4),
+ value : value
+ };
+ };
+
+/***/ },
+/* 12 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // Thank's IE8 for his funny defineProperty
+ module.exports = !__webpack_require__(13)(function(){
+ return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
+ });
+
+/***/ },
+/* 13 */
+/***/ function(module, exports) {
+
+ module.exports = function(exec){
+ try {
+ return !!exec();
+ } catch(e){
+ return true;
+ }
+ };
+
+/***/ },
+/* 14 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // add fake Function#toString
+ // for correct work wrapped methods / constructors with methods like LoDash isNative
+ var global = __webpack_require__(8)
+ , hide = __webpack_require__(10)
+ , SRC = __webpack_require__(15)('src')
+ , TO_STRING = 'toString'
+ , $toString = Function[TO_STRING]
+ , TPL = ('' + $toString).split(TO_STRING);
+
+ __webpack_require__(9).inspectSource = function(it){
+ return $toString.call(it);
+ };
+
+ (module.exports = function(O, key, val, safe){
+ if(typeof val == 'function'){
+ val.hasOwnProperty(SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
+ val.hasOwnProperty('name') || hide(val, 'name', key);
+ }
+ if(O === global){
+ O[key] = val;
+ } else {
+ if(!safe)delete O[key];
+ hide(O, key, val);
+ }
+ })(Function.prototype, TO_STRING, function toString(){
+ return typeof this == 'function' && this[SRC] || $toString.call(this);
+ });
+
+/***/ },
+/* 15 */
+/***/ function(module, exports) {
+
+ var id = 0
+ , px = Math.random();
+ module.exports = function(key){
+ return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
+ };
+
+/***/ },
+/* 16 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // optional / simple context binding
+ var aFunction = __webpack_require__(17);
+ module.exports = function(fn, that, length){
+ aFunction(fn);
+ if(that === undefined)return fn;
+ switch(length){
+ case 1: return function(a){
+ return fn.call(that, a);
+ };
+ case 2: return function(a, b){
+ return fn.call(that, a, b);
+ };
+ case 3: return function(a, b, c){
+ return fn.call(that, a, b, c);
+ };
+ }
+ return function(/* ...args */){
+ return fn.apply(that, arguments);
+ };
+ };
+
+/***/ },
+/* 17 */
+/***/ function(module, exports) {
+
+ module.exports = function(it){
+ if(typeof it != 'function')throw TypeError(it + ' is not a function!');
+ return it;
+ };
+
+/***/ },
+/* 18 */
+/***/ function(module, exports, __webpack_require__) {
+
+ module.exports = __webpack_require__(8).document && document.documentElement;
+
+/***/ },
+/* 19 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var isObject = __webpack_require__(20)
+ , document = __webpack_require__(8).document
+ // in old IE typeof document.createElement is 'object'
+ , is = isObject(document) && isObject(document.createElement);
+ module.exports = function(it){
+ return is ? document.createElement(it) : {};
+ };
+
+/***/ },
+/* 20 */
+/***/ function(module, exports) {
+
+ module.exports = function(it){
+ return typeof it === 'object' ? it !== null : typeof it === 'function';
+ };
+
+/***/ },
+/* 21 */
+/***/ function(module, exports) {
+
+ var hasOwnProperty = {}.hasOwnProperty;
+ module.exports = function(it, key){
+ return hasOwnProperty.call(it, key);
+ };
+
+/***/ },
+/* 22 */
+/***/ function(module, exports) {
+
+ var toString = {}.toString;
+
+ module.exports = function(it){
+ return toString.call(it).slice(8, -1);
+ };
+
+/***/ },
+/* 23 */
+/***/ function(module, exports) {
+
+ // fast apply, http://jsperf.lnkit.com/fast-apply/5
+ module.exports = function(fn, args, that){
+ var un = that === undefined;
+ switch(args.length){
+ case 0: return un ? fn()
+ : fn.call(that);
+ case 1: return un ? fn(args[0])
+ : fn.call(that, args[0]);
+ case 2: return un ? fn(args[0], args[1])
+ : fn.call(that, args[0], args[1]);
+ case 3: return un ? fn(args[0], args[1], args[2])
+ : fn.call(that, args[0], args[1], args[2]);
+ case 4: return un ? fn(args[0], args[1], args[2], args[3])
+ : fn.call(that, args[0], args[1], args[2], args[3]);
+ } return fn.apply(that, args);
+ };
+
+/***/ },
+/* 24 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var isObject = __webpack_require__(20);
+ module.exports = function(it){
+ if(!isObject(it))throw TypeError(it + ' is not an object!');
+ return it;
+ };
+
+/***/ },
+/* 25 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 7.1.13 ToObject(argument)
+ var defined = __webpack_require__(26);
+ module.exports = function(it){
+ return Object(defined(it));
+ };
+
+/***/ },
+/* 26 */
+/***/ function(module, exports) {
+
+ // 7.2.1 RequireObjectCoercible(argument)
+ module.exports = function(it){
+ if(it == undefined)throw TypeError("Can't call method on " + it);
+ return it;
+ };
+
+/***/ },
+/* 27 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // to indexed object, toObject with fallback for non-array-like ES3 strings
+ var IObject = __webpack_require__(28)
+ , defined = __webpack_require__(26);
+ module.exports = function(it){
+ return IObject(defined(it));
+ };
+
+/***/ },
+/* 28 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
+ var cof = __webpack_require__(22);
+ module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
+ return cof(it) == 'String' ? it.split('') : Object(it);
+ };
+
+/***/ },
+/* 29 */
+/***/ function(module, exports) {
+
+ // 7.1.4 ToInteger
+ var ceil = Math.ceil
+ , floor = Math.floor;
+ module.exports = function(it){
+ return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
+ };
+
+/***/ },
+/* 30 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var toInteger = __webpack_require__(29)
+ , max = Math.max
+ , min = Math.min;
+ module.exports = function(index, length){
+ index = toInteger(index);
+ return index < 0 ? max(index + length, 0) : min(index, length);
+ };
+
+/***/ },
+/* 31 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 7.1.15 ToLength
+ var toInteger = __webpack_require__(29)
+ , min = Math.min;
+ module.exports = function(it){
+ return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
+ };
+
+/***/ },
+/* 32 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 0 -> Array#forEach
+ // 1 -> Array#map
+ // 2 -> Array#filter
+ // 3 -> Array#some
+ // 4 -> Array#every
+ // 5 -> Array#find
+ // 6 -> Array#findIndex
+ var ctx = __webpack_require__(16)
+ , IObject = __webpack_require__(28)
+ , toObject = __webpack_require__(25)
+ , toLength = __webpack_require__(31)
+ , asc = __webpack_require__(33);
+ module.exports = function(TYPE){
+ var IS_MAP = TYPE == 1
+ , IS_FILTER = TYPE == 2
+ , IS_SOME = TYPE == 3
+ , IS_EVERY = TYPE == 4
+ , IS_FIND_INDEX = TYPE == 6
+ , NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
+ return function($this, callbackfn, that){
+ var O = toObject($this)
+ , self = IObject(O)
+ , f = ctx(callbackfn, that, 3)
+ , length = toLength(self.length)
+ , index = 0
+ , result = IS_MAP ? asc($this, length) : IS_FILTER ? asc($this, 0) : undefined
+ , val, res;
+ for(;length > index; index++)if(NO_HOLES || index in self){
+ val = self[index];
+ res = f(val, index, O);
+ if(TYPE){
+ if(IS_MAP)result[index] = res; // map
+ else if(res)switch(TYPE){
+ case 3: return true; // some
+ case 5: return val; // find
+ case 6: return index; // findIndex
+ case 2: result.push(val); // filter
+ } else if(IS_EVERY)return false; // every
+ }
+ }
+ return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
+ };
+ };
+
+/***/ },
+/* 33 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 9.4.2.3 ArraySpeciesCreate(originalArray, length)
+ var isObject = __webpack_require__(20)
+ , isArray = __webpack_require__(34)
+ , SPECIES = __webpack_require__(35)('species');
+ module.exports = function(original, length){
+ var C;
+ if(isArray(original)){
+ C = original.constructor;
+ // cross-realm fallback
+ if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined;
+ if(isObject(C)){
+ C = C[SPECIES];
+ if(C === null)C = undefined;
+ }
+ } return new (C === undefined ? Array : C)(length);
+ };
+
+/***/ },
+/* 34 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 7.2.2 IsArray(argument)
+ var cof = __webpack_require__(22);
+ module.exports = Array.isArray || function(arg){
+ return cof(arg) == 'Array';
+ };
+
+/***/ },
+/* 35 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var store = __webpack_require__(36)('wks')
+ , uid = __webpack_require__(15)
+ , Symbol = __webpack_require__(8).Symbol;
+ module.exports = function(name){
+ return store[name] || (store[name] =
+ Symbol && Symbol[name] || (Symbol || uid)('Symbol.' + name));
+ };
+
+/***/ },
+/* 36 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var global = __webpack_require__(8)
+ , SHARED = '__core-js_shared__'
+ , store = global[SHARED] || (global[SHARED] = {});
+ module.exports = function(key){
+ return store[key] || (store[key] = {});
+ };
+
+/***/ },
+/* 37 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // false -> Array#indexOf
+ // true -> Array#includes
+ var toIObject = __webpack_require__(27)
+ , toLength = __webpack_require__(31)
+ , toIndex = __webpack_require__(30);
+ module.exports = function(IS_INCLUDES){
+ return function($this, el, fromIndex){
+ var O = toIObject($this)
+ , length = toLength(O.length)
+ , index = toIndex(fromIndex, length)
+ , value;
+ // Array#includes uses SameValueZero equality algorithm
+ if(IS_INCLUDES && el != el)while(length > index){
+ value = O[index++];
+ if(value != value)return true;
+ // Array#toIndex ignores holes, Array#includes - not
+ } else for(;length > index; index++)if(IS_INCLUDES || index in O){
+ if(O[index] === el)return IS_INCLUDES || index;
+ } return !IS_INCLUDES && -1;
+ };
+ };
+
+/***/ },
+/* 38 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // ECMAScript 6 symbols shim
+ var $ = __webpack_require__(6)
+ , global = __webpack_require__(8)
+ , has = __webpack_require__(21)
+ , DESCRIPTORS = __webpack_require__(12)
+ , $export = __webpack_require__(7)
+ , redefine = __webpack_require__(14)
+ , $fails = __webpack_require__(13)
+ , shared = __webpack_require__(36)
+ , setToStringTag = __webpack_require__(39)
+ , uid = __webpack_require__(15)
+ , wks = __webpack_require__(35)
+ , keyOf = __webpack_require__(40)
+ , $names = __webpack_require__(41)
+ , enumKeys = __webpack_require__(42)
+ , isArray = __webpack_require__(34)
+ , anObject = __webpack_require__(24)
+ , toIObject = __webpack_require__(27)
+ , createDesc = __webpack_require__(11)
+ , getDesc = $.getDesc
+ , setDesc = $.setDesc
+ , _create = $.create
+ , getNames = $names.get
+ , $Symbol = global.Symbol
+ , $JSON = global.JSON
+ , _stringify = $JSON && $JSON.stringify
+ , setter = false
+ , HIDDEN = wks('_hidden')
+ , isEnum = $.isEnum
+ , SymbolRegistry = shared('symbol-registry')
+ , AllSymbols = shared('symbols')
+ , useNative = typeof $Symbol == 'function'
+ , ObjectProto = Object.prototype;
+
+ // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
+ var setSymbolDesc = DESCRIPTORS && $fails(function(){
+ return _create(setDesc({}, 'a', {
+ get: function(){ return setDesc(this, 'a', {value: 7}).a; }
+ })).a != 7;
+ }) ? function(it, key, D){
+ var protoDesc = getDesc(ObjectProto, key);
+ if(protoDesc)delete ObjectProto[key];
+ setDesc(it, key, D);
+ if(protoDesc && it !== ObjectProto)setDesc(ObjectProto, key, protoDesc);
+ } : setDesc;
+
+ var wrap = function(tag){
+ var sym = AllSymbols[tag] = _create($Symbol.prototype);
+ sym._k = tag;
+ DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, {
+ configurable: true,
+ set: function(value){
+ if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
+ setSymbolDesc(this, tag, createDesc(1, value));
+ }
+ });
+ return sym;
+ };
+
+ var isSymbol = function(it){
+ return typeof it == 'symbol';
+ };
+
+ var $defineProperty = function defineProperty(it, key, D){
+ if(D && has(AllSymbols, key)){
+ if(!D.enumerable){
+ if(!has(it, HIDDEN))setDesc(it, HIDDEN, createDesc(1, {}));
+ it[HIDDEN][key] = true;
+ } else {
+ if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;
+ D = _create(D, {enumerable: createDesc(0, false)});
+ } return setSymbolDesc(it, key, D);
+ } return setDesc(it, key, D);
+ };
+ var $defineProperties = function defineProperties(it, P){
+ anObject(it);
+ var keys = enumKeys(P = toIObject(P))
+ , i = 0
+ , l = keys.length
+ , key;
+ while(l > i)$defineProperty(it, key = keys[i++], P[key]);
+ return it;
+ };
+ var $create = function create(it, P){
+ return P === undefined ? _create(it) : $defineProperties(_create(it), P);
+ };
+ var $propertyIsEnumerable = function propertyIsEnumerable(key){
+ var E = isEnum.call(this, key);
+ return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key]
+ ? E : true;
+ };
+ var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){
+ var D = getDesc(it = toIObject(it), key);
+ if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;
+ return D;
+ };
+ var $getOwnPropertyNames = function getOwnPropertyNames(it){
+ var names = getNames(toIObject(it))
+ , result = []
+ , i = 0
+ , key;
+ while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN)result.push(key);
+ return result;
+ };
+ var $getOwnPropertySymbols = function getOwnPropertySymbols(it){
+ var names = getNames(toIObject(it))
+ , result = []
+ , i = 0
+ , key;
+ while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]);
+ return result;
+ };
+ var $stringify = function stringify(it){
+ if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined
+ var args = [it]
+ , i = 1
+ , $$ = arguments
+ , replacer, $replacer;
+ while($$.length > i)args.push($$[i++]);
+ replacer = args[1];
+ if(typeof replacer == 'function')$replacer = replacer;
+ if($replacer || !isArray(replacer))replacer = function(key, value){
+ if($replacer)value = $replacer.call(this, key, value);
+ if(!isSymbol(value))return value;
+ };
+ args[1] = replacer;
+ return _stringify.apply($JSON, args);
+ };
+ var buggyJSON = $fails(function(){
+ var S = $Symbol();
+ // MS Edge converts symbol values to JSON as {}
+ // WebKit converts symbol values to JSON as null
+ // V8 throws on boxed symbols
+ return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';
+ });
+
+ // 19.4.1.1 Symbol([description])
+ if(!useNative){
+ $Symbol = function Symbol(){
+ if(isSymbol(this))throw TypeError('Symbol is not a constructor');
+ return wrap(uid(arguments.length > 0 ? arguments[0] : undefined));
+ };
+ redefine($Symbol.prototype, 'toString', function toString(){
+ return this._k;
+ });
+
+ isSymbol = function(it){
+ return it instanceof $Symbol;
+ };
+
+ $.create = $create;
+ $.isEnum = $propertyIsEnumerable;
+ $.getDesc = $getOwnPropertyDescriptor;
+ $.setDesc = $defineProperty;
+ $.setDescs = $defineProperties;
+ $.getNames = $names.get = $getOwnPropertyNames;
+ $.getSymbols = $getOwnPropertySymbols;
+
+ if(DESCRIPTORS && !__webpack_require__(43)){
+ redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
+ }
+ }
+
+ var symbolStatics = {
+ // 19.4.2.1 Symbol.for(key)
+ 'for': function(key){
+ return has(SymbolRegistry, key += '')
+ ? SymbolRegistry[key]
+ : SymbolRegistry[key] = $Symbol(key);
+ },
+ // 19.4.2.5 Symbol.keyFor(sym)
+ keyFor: function keyFor(key){
+ return keyOf(SymbolRegistry, key);
+ },
+ useSetter: function(){ setter = true; },
+ useSimple: function(){ setter = false; }
+ };
+ // 19.4.2.2 Symbol.hasInstance
+ // 19.4.2.3 Symbol.isConcatSpreadable
+ // 19.4.2.4 Symbol.iterator
+ // 19.4.2.6 Symbol.match
+ // 19.4.2.8 Symbol.replace
+ // 19.4.2.9 Symbol.search
+ // 19.4.2.10 Symbol.species
+ // 19.4.2.11 Symbol.split
+ // 19.4.2.12 Symbol.toPrimitive
+ // 19.4.2.13 Symbol.toStringTag
+ // 19.4.2.14 Symbol.unscopables
+ $.each.call((
+ 'hasInstance,isConcatSpreadable,iterator,match,replace,search,' +
+ 'species,split,toPrimitive,toStringTag,unscopables'
+ ).split(','), function(it){
+ var sym = wks(it);
+ symbolStatics[it] = useNative ? sym : wrap(sym);
+ });
+
+ setter = true;
+
+ $export($export.G + $export.W, {Symbol: $Symbol});
+
+ $export($export.S, 'Symbol', symbolStatics);
+
+ $export($export.S + $export.F * !useNative, 'Object', {
+ // 19.1.2.2 Object.create(O [, Properties])
+ create: $create,
+ // 19.1.2.4 Object.defineProperty(O, P, Attributes)
+ defineProperty: $defineProperty,
+ // 19.1.2.3 Object.defineProperties(O, Properties)
+ defineProperties: $defineProperties,
+ // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
+ getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
+ // 19.1.2.7 Object.getOwnPropertyNames(O)
+ getOwnPropertyNames: $getOwnPropertyNames,
+ // 19.1.2.8 Object.getOwnPropertySymbols(O)
+ getOwnPropertySymbols: $getOwnPropertySymbols
+ });
+
+ // 24.3.2 JSON.stringify(value [, replacer [, space]])
+ $JSON && $export($export.S + $export.F * (!useNative || buggyJSON), 'JSON', {stringify: $stringify});
+
+ // 19.4.3.5 Symbol.prototype[@@toStringTag]
+ setToStringTag($Symbol, 'Symbol');
+ // 20.2.1.9 Math[@@toStringTag]
+ setToStringTag(Math, 'Math', true);
+ // 24.3.3 JSON[@@toStringTag]
+ setToStringTag(global.JSON, 'JSON', true);
+
+/***/ },
+/* 39 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var def = __webpack_require__(6).setDesc
+ , has = __webpack_require__(21)
+ , TAG = __webpack_require__(35)('toStringTag');
+
+ module.exports = function(it, tag, stat){
+ if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
+ };
+
+/***/ },
+/* 40 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var $ = __webpack_require__(6)
+ , toIObject = __webpack_require__(27);
+ module.exports = function(object, el){
+ var O = toIObject(object)
+ , keys = $.getKeys(O)
+ , length = keys.length
+ , index = 0
+ , key;
+ while(length > index)if(O[key = keys[index++]] === el)return key;
+ };
+
+/***/ },
+/* 41 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
+ var toIObject = __webpack_require__(27)
+ , getNames = __webpack_require__(6).getNames
+ , toString = {}.toString;
+
+ var windowNames = typeof window == 'object' && Object.getOwnPropertyNames
+ ? Object.getOwnPropertyNames(window) : [];
+
+ var getWindowNames = function(it){
+ try {
+ return getNames(it);
+ } catch(e){
+ return windowNames.slice();
+ }
+ };
+
+ module.exports.get = function getOwnPropertyNames(it){
+ if(windowNames && toString.call(it) == '[object Window]')return getWindowNames(it);
+ return getNames(toIObject(it));
+ };
+
+/***/ },
+/* 42 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // all enumerable object keys, includes symbols
+ var $ = __webpack_require__(6);
+ module.exports = function(it){
+ var keys = $.getKeys(it)
+ , getSymbols = $.getSymbols;
+ if(getSymbols){
+ var symbols = getSymbols(it)
+ , isEnum = $.isEnum
+ , i = 0
+ , key;
+ while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))keys.push(key);
+ }
+ return keys;
+ };
+
+/***/ },
+/* 43 */
+/***/ function(module, exports) {
+
+ module.exports = false;
+
+/***/ },
+/* 44 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.3.1 Object.assign(target, source)
+ var $export = __webpack_require__(7);
+
+ $export($export.S + $export.F, 'Object', {assign: __webpack_require__(45)});
+
+/***/ },
+/* 45 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.1 Object.assign(target, source, ...)
+ var $ = __webpack_require__(6)
+ , toObject = __webpack_require__(25)
+ , IObject = __webpack_require__(28);
+
+ // should work with symbols and should have deterministic property order (V8 bug)
+ module.exports = __webpack_require__(13)(function(){
+ var a = Object.assign
+ , A = {}
+ , B = {}
+ , S = Symbol()
+ , K = 'abcdefghijklmnopqrst';
+ A[S] = 7;
+ K.split('').forEach(function(k){ B[k] = k; });
+ return a({}, A)[S] != 7 || Object.keys(a({}, B)).join('') != K;
+ }) ? function assign(target, source){ // eslint-disable-line no-unused-vars
+ var T = toObject(target)
+ , $$ = arguments
+ , $$len = $$.length
+ , index = 1
+ , getKeys = $.getKeys
+ , getSymbols = $.getSymbols
+ , isEnum = $.isEnum;
+ while($$len > index){
+ var S = IObject($$[index++])
+ , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)
+ , length = keys.length
+ , j = 0
+ , key;
+ while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];
+ }
+ return T;
+ } : Object.assign;
+
+/***/ },
+/* 46 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.3.10 Object.is(value1, value2)
+ var $export = __webpack_require__(7);
+ $export($export.S, 'Object', {is: __webpack_require__(47)});
+
+/***/ },
+/* 47 */
+/***/ function(module, exports) {
+
+ // 7.2.9 SameValue(x, y)
+ module.exports = Object.is || function is(x, y){
+ return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
+ };
+
+/***/ },
+/* 48 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.3.19 Object.setPrototypeOf(O, proto)
+ var $export = __webpack_require__(7);
+ $export($export.S, 'Object', {setPrototypeOf: __webpack_require__(49).set});
+
+/***/ },
+/* 49 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // Works with __proto__ only. Old v8 can't work with null proto objects.
+ /* eslint-disable no-proto */
+ var getDesc = __webpack_require__(6).getDesc
+ , isObject = __webpack_require__(20)
+ , anObject = __webpack_require__(24);
+ var check = function(O, proto){
+ anObject(O);
+ if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!");
+ };
+ module.exports = {
+ set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
+ function(test, buggy, set){
+ try {
+ set = __webpack_require__(16)(Function.call, getDesc(Object.prototype, '__proto__').set, 2);
+ set(test, []);
+ buggy = !(test instanceof Array);
+ } catch(e){ buggy = true; }
+ return function setPrototypeOf(O, proto){
+ check(O, proto);
+ if(buggy)O.__proto__ = proto;
+ else set(O, proto);
+ return O;
+ };
+ }({}, false) : undefined),
+ check: check
+ };
+
+/***/ },
+/* 50 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // 19.1.3.6 Object.prototype.toString()
+ var classof = __webpack_require__(51)
+ , test = {};
+ test[__webpack_require__(35)('toStringTag')] = 'z';
+ if(test + '' != '[object z]'){
+ __webpack_require__(14)(Object.prototype, 'toString', function toString(){
+ return '[object ' + classof(this) + ']';
+ }, true);
+ }
+
+/***/ },
+/* 51 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // getting tag from 19.1.3.6 Object.prototype.toString()
+ var cof = __webpack_require__(22)
+ , TAG = __webpack_require__(35)('toStringTag')
+ // ES3 wrong here
+ , ARG = cof(function(){ return arguments; }()) == 'Arguments';
+
+ module.exports = function(it){
+ var O, T, B;
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
+ // @@toStringTag case
+ : typeof (T = (O = Object(it))[TAG]) == 'string' ? T
+ // builtinTag case
+ : ARG ? cof(O)
+ // ES3 arguments fallback
+ : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
+ };
+
+/***/ },
+/* 52 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.5 Object.freeze(O)
+ var isObject = __webpack_require__(20);
+
+ __webpack_require__(53)('freeze', function($freeze){
+ return function freeze(it){
+ return $freeze && isObject(it) ? $freeze(it) : it;
+ };
+ });
+
+/***/ },
+/* 53 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // most Object methods by ES6 should accept primitives
+ var $export = __webpack_require__(7)
+ , core = __webpack_require__(9)
+ , fails = __webpack_require__(13);
+ module.exports = function(KEY, exec){
+ var fn = (core.Object || {})[KEY] || Object[KEY]
+ , exp = {};
+ exp[KEY] = exec(fn);
+ $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
+ };
+
+/***/ },
+/* 54 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.17 Object.seal(O)
+ var isObject = __webpack_require__(20);
+
+ __webpack_require__(53)('seal', function($seal){
+ return function seal(it){
+ return $seal && isObject(it) ? $seal(it) : it;
+ };
+ });
+
+/***/ },
+/* 55 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.15 Object.preventExtensions(O)
+ var isObject = __webpack_require__(20);
+
+ __webpack_require__(53)('preventExtensions', function($preventExtensions){
+ return function preventExtensions(it){
+ return $preventExtensions && isObject(it) ? $preventExtensions(it) : it;
+ };
+ });
+
+/***/ },
+/* 56 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.12 Object.isFrozen(O)
+ var isObject = __webpack_require__(20);
+
+ __webpack_require__(53)('isFrozen', function($isFrozen){
+ return function isFrozen(it){
+ return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;
+ };
+ });
+
+/***/ },
+/* 57 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.13 Object.isSealed(O)
+ var isObject = __webpack_require__(20);
+
+ __webpack_require__(53)('isSealed', function($isSealed){
+ return function isSealed(it){
+ return isObject(it) ? $isSealed ? $isSealed(it) : false : true;
+ };
+ });
+
+/***/ },
+/* 58 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.11 Object.isExtensible(O)
+ var isObject = __webpack_require__(20);
+
+ __webpack_require__(53)('isExtensible', function($isExtensible){
+ return function isExtensible(it){
+ return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;
+ };
+ });
+
+/***/ },
+/* 59 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
+ var toIObject = __webpack_require__(27);
+
+ __webpack_require__(53)('getOwnPropertyDescriptor', function($getOwnPropertyDescriptor){
+ return function getOwnPropertyDescriptor(it, key){
+ return $getOwnPropertyDescriptor(toIObject(it), key);
+ };
+ });
+
+/***/ },
+/* 60 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.9 Object.getPrototypeOf(O)
+ var toObject = __webpack_require__(25);
+
+ __webpack_require__(53)('getPrototypeOf', function($getPrototypeOf){
+ return function getPrototypeOf(it){
+ return $getPrototypeOf(toObject(it));
+ };
+ });
+
+/***/ },
+/* 61 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.14 Object.keys(O)
+ var toObject = __webpack_require__(25);
+
+ __webpack_require__(53)('keys', function($keys){
+ return function keys(it){
+ return $keys(toObject(it));
+ };
+ });
+
+/***/ },
+/* 62 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.7 Object.getOwnPropertyNames(O)
+ __webpack_require__(53)('getOwnPropertyNames', function(){
+ return __webpack_require__(41).get;
+ });
+
+/***/ },
+/* 63 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var setDesc = __webpack_require__(6).setDesc
+ , createDesc = __webpack_require__(11)
+ , has = __webpack_require__(21)
+ , FProto = Function.prototype
+ , nameRE = /^\s*function ([^ (]*)/
+ , NAME = 'name';
+ // 19.2.4.2 name
+ NAME in FProto || __webpack_require__(12) && setDesc(FProto, NAME, {
+ configurable: true,
+ get: function(){
+ var match = ('' + this).match(nameRE)
+ , name = match ? match[1] : '';
+ has(this, NAME) || setDesc(this, NAME, createDesc(5, name));
+ return name;
+ }
+ });
+
+/***/ },
+/* 64 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $ = __webpack_require__(6)
+ , isObject = __webpack_require__(20)
+ , HAS_INSTANCE = __webpack_require__(35)('hasInstance')
+ , FunctionProto = Function.prototype;
+ // 19.2.3.6 Function.prototype[@@hasInstance](V)
+ if(!(HAS_INSTANCE in FunctionProto))$.setDesc(FunctionProto, HAS_INSTANCE, {value: function(O){
+ if(typeof this != 'function' || !isObject(O))return false;
+ if(!isObject(this.prototype))return O instanceof this;
+ // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:
+ while(O = $.getProto(O))if(this.prototype === O)return true;
+ return false;
+ }});
+
+/***/ },
+/* 65 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $ = __webpack_require__(6)
+ , global = __webpack_require__(8)
+ , has = __webpack_require__(21)
+ , cof = __webpack_require__(22)
+ , toPrimitive = __webpack_require__(66)
+ , fails = __webpack_require__(13)
+ , $trim = __webpack_require__(67).trim
+ , NUMBER = 'Number'
+ , $Number = global[NUMBER]
+ , Base = $Number
+ , proto = $Number.prototype
+ // Opera ~12 has broken Object#toString
+ , BROKEN_COF = cof($.create(proto)) == NUMBER
+ , TRIM = 'trim' in String.prototype;
+
+ // 7.1.3 ToNumber(argument)
+ var toNumber = function(argument){
+ var it = toPrimitive(argument, false);
+ if(typeof it == 'string' && it.length > 2){
+ it = TRIM ? it.trim() : $trim(it, 3);
+ var first = it.charCodeAt(0)
+ , third, radix, maxCode;
+ if(first === 43 || first === 45){
+ third = it.charCodeAt(2);
+ if(third === 88 || third === 120)return NaN; // Number('+0x1') should be NaN, old V8 fix
+ } else if(first === 48){
+ switch(it.charCodeAt(1)){
+ case 66 : case 98 : radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i
+ case 79 : case 111 : radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i
+ default : return +it;
+ }
+ for(var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++){
+ code = digits.charCodeAt(i);
+ // parseInt parses a string to a first unavailable symbol
+ // but ToNumber should return NaN if a string contains unavailable symbols
+ if(code < 48 || code > maxCode)return NaN;
+ } return parseInt(digits, radix);
+ }
+ } return +it;
+ };
+
+ if(!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')){
+ $Number = function Number(value){
+ var it = arguments.length < 1 ? 0 : value
+ , that = this;
+ return that instanceof $Number
+ // check on 1..constructor(foo) case
+ && (BROKEN_COF ? fails(function(){ proto.valueOf.call(that); }) : cof(that) != NUMBER)
+ ? new Base(toNumber(it)) : toNumber(it);
+ };
+ $.each.call(__webpack_require__(12) ? $.getNames(Base) : (
+ // ES3:
+ 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
+ // ES6 (in case, if modules with ES6 Number statics required before):
+ 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
+ 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
+ ).split(','), function(key){
+ if(has(Base, key) && !has($Number, key)){
+ $.setDesc($Number, key, $.getDesc(Base, key));
+ }
+ });
+ $Number.prototype = proto;
+ proto.constructor = $Number;
+ __webpack_require__(14)(global, NUMBER, $Number);
+ }
+
+/***/ },
+/* 66 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 7.1.1 ToPrimitive(input [, PreferredType])
+ var isObject = __webpack_require__(20);
+ // instead of the ES6 spec version, we didn't implement @@toPrimitive case
+ // and the second argument - flag - preferred type is a string
+ module.exports = function(it, S){
+ if(!isObject(it))return it;
+ var fn, val;
+ if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
+ if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
+ if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
+ throw TypeError("Can't convert object to primitive value");
+ };
+
+/***/ },
+/* 67 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var $export = __webpack_require__(7)
+ , defined = __webpack_require__(26)
+ , fails = __webpack_require__(13)
+ , spaces = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
+ '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'
+ , space = '[' + spaces + ']'
+ , non = '\u200b\u0085'
+ , ltrim = RegExp('^' + space + space + '*')
+ , rtrim = RegExp(space + space + '*$');
+
+ var exporter = function(KEY, exec){
+ var exp = {};
+ exp[KEY] = exec(trim);
+ $export($export.P + $export.F * fails(function(){
+ return !!spaces[KEY]() || non[KEY]() != non;
+ }), 'String', exp);
+ };
+
+ // 1 -> String#trimLeft
+ // 2 -> String#trimRight
+ // 3 -> String#trim
+ var trim = exporter.trim = function(string, TYPE){
+ string = String(defined(string));
+ if(TYPE & 1)string = string.replace(ltrim, '');
+ if(TYPE & 2)string = string.replace(rtrim, '');
+ return string;
+ };
+
+ module.exports = exporter;
+
+/***/ },
+/* 68 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.1.2.1 Number.EPSILON
+ var $export = __webpack_require__(7);
+
+ $export($export.S, 'Number', {EPSILON: Math.pow(2, -52)});
+
+/***/ },
+/* 69 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.1.2.2 Number.isFinite(number)
+ var $export = __webpack_require__(7)
+ , _isFinite = __webpack_require__(8).isFinite;
+
+ $export($export.S, 'Number', {
+ isFinite: function isFinite(it){
+ return typeof it == 'number' && _isFinite(it);
+ }
+ });
+
+/***/ },
+/* 70 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.1.2.3 Number.isInteger(number)
+ var $export = __webpack_require__(7);
+
+ $export($export.S, 'Number', {isInteger: __webpack_require__(71)});
+
+/***/ },
+/* 71 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.1.2.3 Number.isInteger(number)
+ var isObject = __webpack_require__(20)
+ , floor = Math.floor;
+ module.exports = function isInteger(it){
+ return !isObject(it) && isFinite(it) && floor(it) === it;
+ };
+
+/***/ },
+/* 72 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.1.2.4 Number.isNaN(number)
+ var $export = __webpack_require__(7);
+
+ $export($export.S, 'Number', {
+ isNaN: function isNaN(number){
+ return number != number;
+ }
+ });
+
+/***/ },
+/* 73 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.1.2.5 Number.isSafeInteger(number)
+ var $export = __webpack_require__(7)
+ , isInteger = __webpack_require__(71)
+ , abs = Math.abs;
+
+ $export($export.S, 'Number', {
+ isSafeInteger: function isSafeInteger(number){
+ return isInteger(number) && abs(number) <= 0x1fffffffffffff;
+ }
+ });
+
+/***/ },
+/* 74 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.1.2.6 Number.MAX_SAFE_INTEGER
+ var $export = __webpack_require__(7);
+
+ $export($export.S, 'Number', {MAX_SAFE_INTEGER: 0x1fffffffffffff});
+
+/***/ },
+/* 75 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.1.2.10 Number.MIN_SAFE_INTEGER
+ var $export = __webpack_require__(7);
+
+ $export($export.S, 'Number', {MIN_SAFE_INTEGER: -0x1fffffffffffff});
+
+/***/ },
+/* 76 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.1.2.12 Number.parseFloat(string)
+ var $export = __webpack_require__(7);
+
+ $export($export.S, 'Number', {parseFloat: parseFloat});
+
+/***/ },
+/* 77 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.1.2.13 Number.parseInt(string, radix)
+ var $export = __webpack_require__(7);
+
+ $export($export.S, 'Number', {parseInt: parseInt});
+
+/***/ },
+/* 78 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.3 Math.acosh(x)
+ var $export = __webpack_require__(7)
+ , log1p = __webpack_require__(79)
+ , sqrt = Math.sqrt
+ , $acosh = Math.acosh;
+
+ // V8 bug https://code.google.com/p/v8/issues/detail?id=3509
+ $export($export.S + $export.F * !($acosh && Math.floor($acosh(Number.MAX_VALUE)) == 710), 'Math', {
+ acosh: function acosh(x){
+ return (x = +x) < 1 ? NaN : x > 94906265.62425156
+ ? Math.log(x) + Math.LN2
+ : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));
+ }
+ });
+
+/***/ },
+/* 79 */
+/***/ function(module, exports) {
+
+ // 20.2.2.20 Math.log1p(x)
+ module.exports = Math.log1p || function log1p(x){
+ return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x);
+ };
+
+/***/ },
+/* 80 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.5 Math.asinh(x)
+ var $export = __webpack_require__(7);
+
+ function asinh(x){
+ return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));
+ }
+
+ $export($export.S, 'Math', {asinh: asinh});
+
+/***/ },
+/* 81 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.7 Math.atanh(x)
+ var $export = __webpack_require__(7);
+
+ $export($export.S, 'Math', {
+ atanh: function atanh(x){
+ return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;
+ }
+ });
+
+/***/ },
+/* 82 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.9 Math.cbrt(x)
+ var $export = __webpack_require__(7)
+ , sign = __webpack_require__(83);
+
+ $export($export.S, 'Math', {
+ cbrt: function cbrt(x){
+ return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3);
+ }
+ });
+
+/***/ },
+/* 83 */
+/***/ function(module, exports) {
+
+ // 20.2.2.28 Math.sign(x)
+ module.exports = Math.sign || function sign(x){
+ return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;
+ };
+
+/***/ },
+/* 84 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.11 Math.clz32(x)
+ var $export = __webpack_require__(7);
+
+ $export($export.S, 'Math', {
+ clz32: function clz32(x){
+ return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32;
+ }
+ });
+
+/***/ },
+/* 85 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.12 Math.cosh(x)
+ var $export = __webpack_require__(7)
+ , exp = Math.exp;
+
+ $export($export.S, 'Math', {
+ cosh: function cosh(x){
+ return (exp(x = +x) + exp(-x)) / 2;
+ }
+ });
+
+/***/ },
+/* 86 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.14 Math.expm1(x)
+ var $export = __webpack_require__(7);
+
+ $export($export.S, 'Math', {expm1: __webpack_require__(87)});
+
+/***/ },
+/* 87 */
+/***/ function(module, exports) {
+
+ // 20.2.2.14 Math.expm1(x)
+ module.exports = Math.expm1 || function expm1(x){
+ return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;
+ };
+
+/***/ },
+/* 88 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.16 Math.fround(x)
+ var $export = __webpack_require__(7)
+ , sign = __webpack_require__(83)
+ , pow = Math.pow
+ , EPSILON = pow(2, -52)
+ , EPSILON32 = pow(2, -23)
+ , MAX32 = pow(2, 127) * (2 - EPSILON32)
+ , MIN32 = pow(2, -126);
+
+ var roundTiesToEven = function(n){
+ return n + 1 / EPSILON - 1 / EPSILON;
+ };
+
+
+ $export($export.S, 'Math', {
+ fround: function fround(x){
+ var $abs = Math.abs(x)
+ , $sign = sign(x)
+ , a, result;
+ if($abs < MIN32)return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;
+ a = (1 + EPSILON32 / EPSILON) * $abs;
+ result = a - (a - $abs);
+ if(result > MAX32 || result != result)return $sign * Infinity;
+ return $sign * result;
+ }
+ });
+
+/***/ },
+/* 89 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.17 Math.hypot([value1[, value2[, … ]]])
+ var $export = __webpack_require__(7)
+ , abs = Math.abs;
+
+ $export($export.S, 'Math', {
+ hypot: function hypot(value1, value2){ // eslint-disable-line no-unused-vars
+ var sum = 0
+ , i = 0
+ , $$ = arguments
+ , $$len = $$.length
+ , larg = 0
+ , arg, div;
+ while(i < $$len){
+ arg = abs($$[i++]);
+ if(larg < arg){
+ div = larg / arg;
+ sum = sum * div * div + 1;
+ larg = arg;
+ } else if(arg > 0){
+ div = arg / larg;
+ sum += div * div;
+ } else sum += arg;
+ }
+ return larg === Infinity ? Infinity : larg * Math.sqrt(sum);
+ }
+ });
+
+/***/ },
+/* 90 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.18 Math.imul(x, y)
+ var $export = __webpack_require__(7)
+ , $imul = Math.imul;
+
+ // some WebKit versions fails with big numbers, some has wrong arity
+ $export($export.S + $export.F * __webpack_require__(13)(function(){
+ return $imul(0xffffffff, 5) != -5 || $imul.length != 2;
+ }), 'Math', {
+ imul: function imul(x, y){
+ var UINT16 = 0xffff
+ , xn = +x
+ , yn = +y
+ , xl = UINT16 & xn
+ , yl = UINT16 & yn;
+ return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);
+ }
+ });
+
+/***/ },
+/* 91 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.21 Math.log10(x)
+ var $export = __webpack_require__(7);
+
+ $export($export.S, 'Math', {
+ log10: function log10(x){
+ return Math.log(x) / Math.LN10;
+ }
+ });
+
+/***/ },
+/* 92 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.20 Math.log1p(x)
+ var $export = __webpack_require__(7);
+
+ $export($export.S, 'Math', {log1p: __webpack_require__(79)});
+
+/***/ },
+/* 93 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.22 Math.log2(x)
+ var $export = __webpack_require__(7);
+
+ $export($export.S, 'Math', {
+ log2: function log2(x){
+ return Math.log(x) / Math.LN2;
+ }
+ });
+
+/***/ },
+/* 94 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.28 Math.sign(x)
+ var $export = __webpack_require__(7);
+
+ $export($export.S, 'Math', {sign: __webpack_require__(83)});
+
+/***/ },
+/* 95 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.30 Math.sinh(x)
+ var $export = __webpack_require__(7)
+ , expm1 = __webpack_require__(87)
+ , exp = Math.exp;
+
+ // V8 near Chromium 38 has a problem with very small numbers
+ $export($export.S + $export.F * __webpack_require__(13)(function(){
+ return !Math.sinh(-2e-17) != -2e-17;
+ }), 'Math', {
+ sinh: function sinh(x){
+ return Math.abs(x = +x) < 1
+ ? (expm1(x) - expm1(-x)) / 2
+ : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2);
+ }
+ });
+
+/***/ },
+/* 96 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.33 Math.tanh(x)
+ var $export = __webpack_require__(7)
+ , expm1 = __webpack_require__(87)
+ , exp = Math.exp;
+
+ $export($export.S, 'Math', {
+ tanh: function tanh(x){
+ var a = expm1(x = +x)
+ , b = expm1(-x);
+ return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));
+ }
+ });
+
+/***/ },
+/* 97 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.34 Math.trunc(x)
+ var $export = __webpack_require__(7);
+
+ $export($export.S, 'Math', {
+ trunc: function trunc(it){
+ return (it > 0 ? Math.floor : Math.ceil)(it);
+ }
+ });
+
+/***/ },
+/* 98 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var $export = __webpack_require__(7)
+ , toIndex = __webpack_require__(30)
+ , fromCharCode = String.fromCharCode
+ , $fromCodePoint = String.fromCodePoint;
+
+ // length should be 1, old FF problem
+ $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {
+ // 21.1.2.2 String.fromCodePoint(...codePoints)
+ fromCodePoint: function fromCodePoint(x){ // eslint-disable-line no-unused-vars
+ var res = []
+ , $$ = arguments
+ , $$len = $$.length
+ , i = 0
+ , code;
+ while($$len > i){
+ code = +$$[i++];
+ if(toIndex(code, 0x10ffff) !== code)throw RangeError(code + ' is not a valid code point');
+ res.push(code < 0x10000
+ ? fromCharCode(code)
+ : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)
+ );
+ } return res.join('');
+ }
+ });
+
+/***/ },
+/* 99 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var $export = __webpack_require__(7)
+ , toIObject = __webpack_require__(27)
+ , toLength = __webpack_require__(31);
+
+ $export($export.S, 'String', {
+ // 21.1.2.4 String.raw(callSite, ...substitutions)
+ raw: function raw(callSite){
+ var tpl = toIObject(callSite.raw)
+ , len = toLength(tpl.length)
+ , $$ = arguments
+ , $$len = $$.length
+ , res = []
+ , i = 0;
+ while(len > i){
+ res.push(String(tpl[i++]));
+ if(i < $$len)res.push(String($$[i]));
+ } return res.join('');
+ }
+ });
+
+/***/ },
+/* 100 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // 21.1.3.25 String.prototype.trim()
+ __webpack_require__(67)('trim', function($trim){
+ return function trim(){
+ return $trim(this, 3);
+ };
+ });
+
+/***/ },
+/* 101 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $at = __webpack_require__(102)(true);
+
+ // 21.1.3.27 String.prototype[@@iterator]()
+ __webpack_require__(103)(String, 'String', function(iterated){
+ this._t = String(iterated); // target
+ this._i = 0; // next index
+ // 21.1.5.2.1 %StringIteratorPrototype%.next()
+ }, function(){
+ var O = this._t
+ , index = this._i
+ , point;
+ if(index >= O.length)return {value: undefined, done: true};
+ point = $at(O, index);
+ this._i += point.length;
+ return {value: point, done: false};
+ });
+
+/***/ },
+/* 102 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var toInteger = __webpack_require__(29)
+ , defined = __webpack_require__(26);
+ // true -> String#at
+ // false -> String#codePointAt
+ module.exports = function(TO_STRING){
+ return function(that, pos){
+ var s = String(defined(that))
+ , i = toInteger(pos)
+ , l = s.length
+ , a, b;
+ if(i < 0 || i >= l)return TO_STRING ? '' : undefined;
+ a = s.charCodeAt(i);
+ return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
+ ? TO_STRING ? s.charAt(i) : a
+ : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
+ };
+ };
+
+/***/ },
+/* 103 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var LIBRARY = __webpack_require__(43)
+ , $export = __webpack_require__(7)
+ , redefine = __webpack_require__(14)
+ , hide = __webpack_require__(10)
+ , has = __webpack_require__(21)
+ , Iterators = __webpack_require__(104)
+ , $iterCreate = __webpack_require__(105)
+ , setToStringTag = __webpack_require__(39)
+ , getProto = __webpack_require__(6).getProto
+ , ITERATOR = __webpack_require__(35)('iterator')
+ , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`
+ , FF_ITERATOR = '@@iterator'
+ , KEYS = 'keys'
+ , VALUES = 'values';
+
+ var returnThis = function(){ return this; };
+
+ module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){
+ $iterCreate(Constructor, NAME, next);
+ var getMethod = function(kind){
+ if(!BUGGY && kind in proto)return proto[kind];
+ switch(kind){
+ case KEYS: return function keys(){ return new Constructor(this, kind); };
+ case VALUES: return function values(){ return new Constructor(this, kind); };
+ } return function entries(){ return new Constructor(this, kind); };
+ };
+ var TAG = NAME + ' Iterator'
+ , DEF_VALUES = DEFAULT == VALUES
+ , VALUES_BUG = false
+ , proto = Base.prototype
+ , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]
+ , $default = $native || getMethod(DEFAULT)
+ , methods, key;
+ // Fix native
+ if($native){
+ var IteratorPrototype = getProto($default.call(new Base));
+ // Set @@toStringTag to native iterators
+ setToStringTag(IteratorPrototype, TAG, true);
+ // FF fix
+ if(!LIBRARY && has(proto, FF_ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);
+ // fix Array#{values, @@iterator}.name in V8 / FF
+ if(DEF_VALUES && $native.name !== VALUES){
+ VALUES_BUG = true;
+ $default = function values(){ return $native.call(this); };
+ }
+ }
+ // Define iterator
+ if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){
+ hide(proto, ITERATOR, $default);
+ }
+ // Plug for library
+ Iterators[NAME] = $default;
+ Iterators[TAG] = returnThis;
+ if(DEFAULT){
+ methods = {
+ values: DEF_VALUES ? $default : getMethod(VALUES),
+ keys: IS_SET ? $default : getMethod(KEYS),
+ entries: !DEF_VALUES ? $default : getMethod('entries')
+ };
+ if(FORCED)for(key in methods){
+ if(!(key in proto))redefine(proto, key, methods[key]);
+ } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
+ }
+ return methods;
+ };
+
+/***/ },
+/* 104 */
+/***/ function(module, exports) {
+
+ module.exports = {};
+
+/***/ },
+/* 105 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $ = __webpack_require__(6)
+ , descriptor = __webpack_require__(11)
+ , setToStringTag = __webpack_require__(39)
+ , IteratorPrototype = {};
+
+ // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
+ __webpack_require__(10)(IteratorPrototype, __webpack_require__(35)('iterator'), function(){ return this; });
+
+ module.exports = function(Constructor, NAME, next){
+ Constructor.prototype = $.create(IteratorPrototype, {next: descriptor(1, next)});
+ setToStringTag(Constructor, NAME + ' Iterator');
+ };
+
+/***/ },
+/* 106 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $export = __webpack_require__(7)
+ , $at = __webpack_require__(102)(false);
+ $export($export.P, 'String', {
+ // 21.1.3.3 String.prototype.codePointAt(pos)
+ codePointAt: function codePointAt(pos){
+ return $at(this, pos);
+ }
+ });
+
+/***/ },
+/* 107 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])
+ 'use strict';
+ var $export = __webpack_require__(7)
+ , toLength = __webpack_require__(31)
+ , context = __webpack_require__(108)
+ , ENDS_WITH = 'endsWith'
+ , $endsWith = ''[ENDS_WITH];
+
+ $export($export.P + $export.F * __webpack_require__(110)(ENDS_WITH), 'String', {
+ endsWith: function endsWith(searchString /*, endPosition = @length */){
+ var that = context(this, searchString, ENDS_WITH)
+ , $$ = arguments
+ , endPosition = $$.length > 1 ? $$[1] : undefined
+ , len = toLength(that.length)
+ , end = endPosition === undefined ? len : Math.min(toLength(endPosition), len)
+ , search = String(searchString);
+ return $endsWith
+ ? $endsWith.call(that, search, end)
+ : that.slice(end - search.length, end) === search;
+ }
+ });
+
+/***/ },
+/* 108 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // helper for String#{startsWith, endsWith, includes}
+ var isRegExp = __webpack_require__(109)
+ , defined = __webpack_require__(26);
+
+ module.exports = function(that, searchString, NAME){
+ if(isRegExp(searchString))throw TypeError('String#' + NAME + " doesn't accept regex!");
+ return String(defined(that));
+ };
+
+/***/ },
+/* 109 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 7.2.8 IsRegExp(argument)
+ var isObject = __webpack_require__(20)
+ , cof = __webpack_require__(22)
+ , MATCH = __webpack_require__(35)('match');
+ module.exports = function(it){
+ var isRegExp;
+ return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');
+ };
+
+/***/ },
+/* 110 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var MATCH = __webpack_require__(35)('match');
+ module.exports = function(KEY){
+ var re = /./;
+ try {
+ '/./'[KEY](re);
+ } catch(e){
+ try {
+ re[MATCH] = false;
+ return !'/./'[KEY](re);
+ } catch(f){ /* empty */ }
+ } return true;
+ };
+
+/***/ },
+/* 111 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 21.1.3.7 String.prototype.includes(searchString, position = 0)
+ 'use strict';
+ var $export = __webpack_require__(7)
+ , context = __webpack_require__(108)
+ , INCLUDES = 'includes';
+
+ $export($export.P + $export.F * __webpack_require__(110)(INCLUDES), 'String', {
+ includes: function includes(searchString /*, position = 0 */){
+ return !!~context(this, searchString, INCLUDES)
+ .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
+ }
+ });
+
+/***/ },
+/* 112 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var $export = __webpack_require__(7);
+
+ $export($export.P, 'String', {
+ // 21.1.3.13 String.prototype.repeat(count)
+ repeat: __webpack_require__(113)
+ });
+
+/***/ },
+/* 113 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var toInteger = __webpack_require__(29)
+ , defined = __webpack_require__(26);
+
+ module.exports = function repeat(count){
+ var str = String(defined(this))
+ , res = ''
+ , n = toInteger(count);
+ if(n < 0 || n == Infinity)throw RangeError("Count can't be negative");
+ for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str;
+ return res;
+ };
+
+/***/ },
+/* 114 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 21.1.3.18 String.prototype.startsWith(searchString [, position ])
+ 'use strict';
+ var $export = __webpack_require__(7)
+ , toLength = __webpack_require__(31)
+ , context = __webpack_require__(108)
+ , STARTS_WITH = 'startsWith'
+ , $startsWith = ''[STARTS_WITH];
+
+ $export($export.P + $export.F * __webpack_require__(110)(STARTS_WITH), 'String', {
+ startsWith: function startsWith(searchString /*, position = 0 */){
+ var that = context(this, searchString, STARTS_WITH)
+ , $$ = arguments
+ , index = toLength(Math.min($$.length > 1 ? $$[1] : undefined, that.length))
+ , search = String(searchString);
+ return $startsWith
+ ? $startsWith.call(that, search, index)
+ : that.slice(index, index + search.length) === search;
+ }
+ });
+
+/***/ },
+/* 115 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var ctx = __webpack_require__(16)
+ , $export = __webpack_require__(7)
+ , toObject = __webpack_require__(25)
+ , call = __webpack_require__(116)
+ , isArrayIter = __webpack_require__(117)
+ , toLength = __webpack_require__(31)
+ , getIterFn = __webpack_require__(118);
+ $export($export.S + $export.F * !__webpack_require__(119)(function(iter){ Array.from(iter); }), 'Array', {
+ // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
+ from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){
+ var O = toObject(arrayLike)
+ , C = typeof this == 'function' ? this : Array
+ , $$ = arguments
+ , $$len = $$.length
+ , mapfn = $$len > 1 ? $$[1] : undefined
+ , mapping = mapfn !== undefined
+ , index = 0
+ , iterFn = getIterFn(O)
+ , length, result, step, iterator;
+ if(mapping)mapfn = ctx(mapfn, $$len > 2 ? $$[2] : undefined, 2);
+ // if object isn't iterable or it's array with default iterator - use simple case
+ if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){
+ for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){
+ result[index] = mapping ? call(iterator, mapfn, [step.value, index], true) : step.value;
+ }
+ } else {
+ length = toLength(O.length);
+ for(result = new C(length); length > index; index++){
+ result[index] = mapping ? mapfn(O[index], index) : O[index];
+ }
+ }
+ result.length = index;
+ return result;
+ }
+ });
+
+
+/***/ },
+/* 116 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // call something on iterator step with safe closing on error
+ var anObject = __webpack_require__(24);
+ module.exports = function(iterator, fn, value, entries){
+ try {
+ return entries ? fn(anObject(value)[0], value[1]) : fn(value);
+ // 7.4.6 IteratorClose(iterator, completion)
+ } catch(e){
+ var ret = iterator['return'];
+ if(ret !== undefined)anObject(ret.call(iterator));
+ throw e;
+ }
+ };
+
+/***/ },
+/* 117 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // check on default Array iterator
+ var Iterators = __webpack_require__(104)
+ , ITERATOR = __webpack_require__(35)('iterator')
+ , ArrayProto = Array.prototype;
+
+ module.exports = function(it){
+ return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
+ };
+
+/***/ },
+/* 118 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var classof = __webpack_require__(51)
+ , ITERATOR = __webpack_require__(35)('iterator')
+ , Iterators = __webpack_require__(104);
+ module.exports = __webpack_require__(9).getIteratorMethod = function(it){
+ if(it != undefined)return it[ITERATOR]
+ || it['@@iterator']
+ || Iterators[classof(it)];
+ };
+
+/***/ },
+/* 119 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var ITERATOR = __webpack_require__(35)('iterator')
+ , SAFE_CLOSING = false;
+
+ try {
+ var riter = [7][ITERATOR]();
+ riter['return'] = function(){ SAFE_CLOSING = true; };
+ Array.from(riter, function(){ throw 2; });
+ } catch(e){ /* empty */ }
+
+ module.exports = function(exec, skipClosing){
+ if(!skipClosing && !SAFE_CLOSING)return false;
+ var safe = false;
+ try {
+ var arr = [7]
+ , iter = arr[ITERATOR]();
+ iter.next = function(){ safe = true; };
+ arr[ITERATOR] = function(){ return iter; };
+ exec(arr);
+ } catch(e){ /* empty */ }
+ return safe;
+ };
+
+/***/ },
+/* 120 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $export = __webpack_require__(7);
+
+ // WebKit Array.of isn't generic
+ $export($export.S + $export.F * __webpack_require__(13)(function(){
+ function F(){}
+ return !(Array.of.call(F) instanceof F);
+ }), 'Array', {
+ // 22.1.2.3 Array.of( ...items)
+ of: function of(/* ...args */){
+ var index = 0
+ , $$ = arguments
+ , $$len = $$.length
+ , result = new (typeof this == 'function' ? this : Array)($$len);
+ while($$len > index)result[index] = $$[index++];
+ result.length = $$len;
+ return result;
+ }
+ });
+
+/***/ },
+/* 121 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var addToUnscopables = __webpack_require__(122)
+ , step = __webpack_require__(123)
+ , Iterators = __webpack_require__(104)
+ , toIObject = __webpack_require__(27);
+
+ // 22.1.3.4 Array.prototype.entries()
+ // 22.1.3.13 Array.prototype.keys()
+ // 22.1.3.29 Array.prototype.values()
+ // 22.1.3.30 Array.prototype[@@iterator]()
+ module.exports = __webpack_require__(103)(Array, 'Array', function(iterated, kind){
+ this._t = toIObject(iterated); // target
+ this._i = 0; // next index
+ this._k = kind; // kind
+ // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
+ }, function(){
+ var O = this._t
+ , kind = this._k
+ , index = this._i++;
+ if(!O || index >= O.length){
+ this._t = undefined;
+ return step(1);
+ }
+ if(kind == 'keys' )return step(0, index);
+ if(kind == 'values')return step(0, O[index]);
+ return step(0, [index, O[index]]);
+ }, 'values');
+
+ // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
+ Iterators.Arguments = Iterators.Array;
+
+ addToUnscopables('keys');
+ addToUnscopables('values');
+ addToUnscopables('entries');
+
+/***/ },
+/* 122 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 22.1.3.31 Array.prototype[@@unscopables]
+ var UNSCOPABLES = __webpack_require__(35)('unscopables')
+ , ArrayProto = Array.prototype;
+ if(ArrayProto[UNSCOPABLES] == undefined)__webpack_require__(10)(ArrayProto, UNSCOPABLES, {});
+ module.exports = function(key){
+ ArrayProto[UNSCOPABLES][key] = true;
+ };
+
+/***/ },
+/* 123 */
+/***/ function(module, exports) {
+
+ module.exports = function(done, value){
+ return {value: value, done: !!done};
+ };
+
+/***/ },
+/* 124 */
+/***/ function(module, exports, __webpack_require__) {
+
+ __webpack_require__(125)('Array');
+
+/***/ },
+/* 125 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var global = __webpack_require__(8)
+ , $ = __webpack_require__(6)
+ , DESCRIPTORS = __webpack_require__(12)
+ , SPECIES = __webpack_require__(35)('species');
+
+ module.exports = function(KEY){
+ var C = global[KEY];
+ if(DESCRIPTORS && C && !C[SPECIES])$.setDesc(C, SPECIES, {
+ configurable: true,
+ get: function(){ return this; }
+ });
+ };
+
+/***/ },
+/* 126 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
+ var $export = __webpack_require__(7);
+
+ $export($export.P, 'Array', {copyWithin: __webpack_require__(127)});
+
+ __webpack_require__(122)('copyWithin');
+
+/***/ },
+/* 127 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
+ 'use strict';
+ var toObject = __webpack_require__(25)
+ , toIndex = __webpack_require__(30)
+ , toLength = __webpack_require__(31);
+
+ module.exports = [].copyWithin || function copyWithin(target/*= 0*/, start/*= 0, end = @length*/){
+ var O = toObject(this)
+ , len = toLength(O.length)
+ , to = toIndex(target, len)
+ , from = toIndex(start, len)
+ , $$ = arguments
+ , end = $$.length > 2 ? $$[2] : undefined
+ , count = Math.min((end === undefined ? len : toIndex(end, len)) - from, len - to)
+ , inc = 1;
+ if(from < to && to < from + count){
+ inc = -1;
+ from += count - 1;
+ to += count - 1;
+ }
+ while(count-- > 0){
+ if(from in O)O[to] = O[from];
+ else delete O[to];
+ to += inc;
+ from += inc;
+ } return O;
+ };
+
+/***/ },
+/* 128 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
+ var $export = __webpack_require__(7);
+
+ $export($export.P, 'Array', {fill: __webpack_require__(129)});
+
+ __webpack_require__(122)('fill');
+
+/***/ },
+/* 129 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
+ 'use strict';
+ var toObject = __webpack_require__(25)
+ , toIndex = __webpack_require__(30)
+ , toLength = __webpack_require__(31);
+ module.exports = [].fill || function fill(value /*, start = 0, end = @length */){
+ var O = toObject(this)
+ , length = toLength(O.length)
+ , $$ = arguments
+ , $$len = $$.length
+ , index = toIndex($$len > 1 ? $$[1] : undefined, length)
+ , end = $$len > 2 ? $$[2] : undefined
+ , endPos = end === undefined ? length : toIndex(end, length);
+ while(endPos > index)O[index++] = value;
+ return O;
+ };
+
+/***/ },
+/* 130 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
+ var $export = __webpack_require__(7)
+ , $find = __webpack_require__(32)(5)
+ , KEY = 'find'
+ , forced = true;
+ // Shouldn't skip holes
+ if(KEY in [])Array(1)[KEY](function(){ forced = false; });
+ $export($export.P + $export.F * forced, 'Array', {
+ find: function find(callbackfn/*, that = undefined */){
+ return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+ }
+ });
+ __webpack_require__(122)(KEY);
+
+/***/ },
+/* 131 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
+ var $export = __webpack_require__(7)
+ , $find = __webpack_require__(32)(6)
+ , KEY = 'findIndex'
+ , forced = true;
+ // Shouldn't skip holes
+ if(KEY in [])Array(1)[KEY](function(){ forced = false; });
+ $export($export.P + $export.F * forced, 'Array', {
+ findIndex: function findIndex(callbackfn/*, that = undefined */){
+ return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+ }
+ });
+ __webpack_require__(122)(KEY);
+
+/***/ },
+/* 132 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var $ = __webpack_require__(6)
+ , global = __webpack_require__(8)
+ , isRegExp = __webpack_require__(109)
+ , $flags = __webpack_require__(133)
+ , $RegExp = global.RegExp
+ , Base = $RegExp
+ , proto = $RegExp.prototype
+ , re1 = /a/g
+ , re2 = /a/g
+ // "new" creates a new object, old webkit buggy here
+ , CORRECT_NEW = new $RegExp(re1) !== re1;
+
+ if(__webpack_require__(12) && (!CORRECT_NEW || __webpack_require__(13)(function(){
+ re2[__webpack_require__(35)('match')] = false;
+ // RegExp constructor can alter flags and IsRegExp works correct with @@match
+ return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i';
+ }))){
+ $RegExp = function RegExp(p, f){
+ var piRE = isRegExp(p)
+ , fiU = f === undefined;
+ return !(this instanceof $RegExp) && piRE && p.constructor === $RegExp && fiU ? p
+ : CORRECT_NEW
+ ? new Base(piRE && !fiU ? p.source : p, f)
+ : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f);
+ };
+ $.each.call($.getNames(Base), function(key){
+ key in $RegExp || $.setDesc($RegExp, key, {
+ configurable: true,
+ get: function(){ return Base[key]; },
+ set: function(it){ Base[key] = it; }
+ });
+ });
+ proto.constructor = $RegExp;
+ $RegExp.prototype = proto;
+ __webpack_require__(14)(global, 'RegExp', $RegExp);
+ }
+
+ __webpack_require__(125)('RegExp');
+
+/***/ },
+/* 133 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // 21.2.5.3 get RegExp.prototype.flags
+ var anObject = __webpack_require__(24);
+ module.exports = function(){
+ var that = anObject(this)
+ , result = '';
+ if(that.global) result += 'g';
+ if(that.ignoreCase) result += 'i';
+ if(that.multiline) result += 'm';
+ if(that.unicode) result += 'u';
+ if(that.sticky) result += 'y';
+ return result;
+ };
+
+/***/ },
+/* 134 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 21.2.5.3 get RegExp.prototype.flags()
+ var $ = __webpack_require__(6);
+ if(__webpack_require__(12) && /./g.flags != 'g')$.setDesc(RegExp.prototype, 'flags', {
+ configurable: true,
+ get: __webpack_require__(133)
+ });
+
+/***/ },
+/* 135 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // @@match logic
+ __webpack_require__(136)('match', 1, function(defined, MATCH){
+ // 21.1.3.11 String.prototype.match(regexp)
+ return function match(regexp){
+ 'use strict';
+ var O = defined(this)
+ , fn = regexp == undefined ? undefined : regexp[MATCH];
+ return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
+ };
+ });
+
+/***/ },
+/* 136 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var hide = __webpack_require__(10)
+ , redefine = __webpack_require__(14)
+ , fails = __webpack_require__(13)
+ , defined = __webpack_require__(26)
+ , wks = __webpack_require__(35);
+
+ module.exports = function(KEY, length, exec){
+ var SYMBOL = wks(KEY)
+ , original = ''[KEY];
+ if(fails(function(){
+ var O = {};
+ O[SYMBOL] = function(){ return 7; };
+ return ''[KEY](O) != 7;
+ })){
+ redefine(String.prototype, KEY, exec(defined, SYMBOL, original));
+ hide(RegExp.prototype, SYMBOL, length == 2
+ // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
+ // 21.2.5.11 RegExp.prototype[@@split](string, limit)
+ ? function(string, arg){ return original.call(string, this, arg); }
+ // 21.2.5.6 RegExp.prototype[@@match](string)
+ // 21.2.5.9 RegExp.prototype[@@search](string)
+ : function(string){ return original.call(string, this); }
+ );
+ }
+ };
+
+/***/ },
+/* 137 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // @@replace logic
+ __webpack_require__(136)('replace', 2, function(defined, REPLACE, $replace){
+ // 21.1.3.14 String.prototype.replace(searchValue, replaceValue)
+ return function replace(searchValue, replaceValue){
+ 'use strict';
+ var O = defined(this)
+ , fn = searchValue == undefined ? undefined : searchValue[REPLACE];
+ return fn !== undefined
+ ? fn.call(searchValue, O, replaceValue)
+ : $replace.call(String(O), searchValue, replaceValue);
+ };
+ });
+
+/***/ },
+/* 138 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // @@search logic
+ __webpack_require__(136)('search', 1, function(defined, SEARCH){
+ // 21.1.3.15 String.prototype.search(regexp)
+ return function search(regexp){
+ 'use strict';
+ var O = defined(this)
+ , fn = regexp == undefined ? undefined : regexp[SEARCH];
+ return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
+ };
+ });
+
+/***/ },
+/* 139 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // @@split logic
+ __webpack_require__(136)('split', 2, function(defined, SPLIT, $split){
+ // 21.1.3.17 String.prototype.split(separator, limit)
+ return function split(separator, limit){
+ 'use strict';
+ var O = defined(this)
+ , fn = separator == undefined ? undefined : separator[SPLIT];
+ return fn !== undefined
+ ? fn.call(separator, O, limit)
+ : $split.call(String(O), separator, limit);
+ };
+ });
+
+/***/ },
+/* 140 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $ = __webpack_require__(6)
+ , LIBRARY = __webpack_require__(43)
+ , global = __webpack_require__(8)
+ , ctx = __webpack_require__(16)
+ , classof = __webpack_require__(51)
+ , $export = __webpack_require__(7)
+ , isObject = __webpack_require__(20)
+ , anObject = __webpack_require__(24)
+ , aFunction = __webpack_require__(17)
+ , strictNew = __webpack_require__(141)
+ , forOf = __webpack_require__(142)
+ , setProto = __webpack_require__(49).set
+ , same = __webpack_require__(47)
+ , SPECIES = __webpack_require__(35)('species')
+ , speciesConstructor = __webpack_require__(143)
+ , asap = __webpack_require__(144)
+ , PROMISE = 'Promise'
+ , process = global.process
+ , isNode = classof(process) == 'process'
+ , P = global[PROMISE]
+ , Wrapper;
+
+ var testResolve = function(sub){
+ var test = new P(function(){});
+ if(sub)test.constructor = Object;
+ return P.resolve(test) === test;
+ };
+
+ var USE_NATIVE = function(){
+ var works = false;
+ function P2(x){
+ var self = new P(x);
+ setProto(self, P2.prototype);
+ return self;
+ }
+ try {
+ works = P && P.resolve && testResolve();
+ setProto(P2, P);
+ P2.prototype = $.create(P.prototype, {constructor: {value: P2}});
+ // actual Firefox has broken subclass support, test that
+ if(!(P2.resolve(5).then(function(){}) instanceof P2)){
+ works = false;
+ }
+ // actual V8 bug, https://code.google.com/p/v8/issues/detail?id=4162
+ if(works && __webpack_require__(12)){
+ var thenableThenGotten = false;
+ P.resolve($.setDesc({}, 'then', {
+ get: function(){ thenableThenGotten = true; }
+ }));
+ works = thenableThenGotten;
+ }
+ } catch(e){ works = false; }
+ return works;
+ }();
+
+ // helpers
+ var sameConstructor = function(a, b){
+ // library wrapper special case
+ if(LIBRARY && a === P && b === Wrapper)return true;
+ return same(a, b);
+ };
+ var getConstructor = function(C){
+ var S = anObject(C)[SPECIES];
+ return S != undefined ? S : C;
+ };
+ var isThenable = function(it){
+ var then;
+ return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
+ };
+ var PromiseCapability = function(C){
+ var resolve, reject;
+ this.promise = new C(function($$resolve, $$reject){
+ if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor');
+ resolve = $$resolve;
+ reject = $$reject;
+ });
+ this.resolve = aFunction(resolve),
+ this.reject = aFunction(reject)
+ };
+ var perform = function(exec){
+ try {
+ exec();
+ } catch(e){
+ return {error: e};
+ }
+ };
+ var notify = function(record, isReject){
+ if(record.n)return;
+ record.n = true;
+ var chain = record.c;
+ asap(function(){
+ var value = record.v
+ , ok = record.s == 1
+ , i = 0;
+ var run = function(reaction){
+ var handler = ok ? reaction.ok : reaction.fail
+ , resolve = reaction.resolve
+ , reject = reaction.reject
+ , result, then;
+ try {
+ if(handler){
+ if(!ok)record.h = true;
+ result = handler === true ? value : handler(value);
+ if(result === reaction.promise){
+ reject(TypeError('Promise-chain cycle'));
+ } else if(then = isThenable(result)){
+ then.call(result, resolve, reject);
+ } else resolve(result);
+ } else reject(value);
+ } catch(e){
+ reject(e);
+ }
+ };
+ while(chain.length > i)run(chain[i++]); // variable length - can't use forEach
+ chain.length = 0;
+ record.n = false;
+ if(isReject)setTimeout(function(){
+ var promise = record.p
+ , handler, console;
+ if(isUnhandled(promise)){
+ if(isNode){
+ process.emit('unhandledRejection', value, promise);
+ } else if(handler = global.onunhandledrejection){
+ handler({promise: promise, reason: value});
+ } else if((console = global.console) && console.error){
+ console.error('Unhandled promise rejection', value);
+ }
+ } record.a = undefined;
+ }, 1);
+ });
+ };
+ var isUnhandled = function(promise){
+ var record = promise._d
+ , chain = record.a || record.c
+ , i = 0
+ , reaction;
+ if(record.h)return false;
+ while(chain.length > i){
+ reaction = chain[i++];
+ if(reaction.fail || !isUnhandled(reaction.promise))return false;
+ } return true;
+ };
+ var $reject = function(value){
+ var record = this;
+ if(record.d)return;
+ record.d = true;
+ record = record.r || record; // unwrap
+ record.v = value;
+ record.s = 2;
+ record.a = record.c.slice();
+ notify(record, true);
+ };
+ var $resolve = function(value){
+ var record = this
+ , then;
+ if(record.d)return;
+ record.d = true;
+ record = record.r || record; // unwrap
+ try {
+ if(record.p === value)throw TypeError("Promise can't be resolved itself");
+ if(then = isThenable(value)){
+ asap(function(){
+ var wrapper = {r: record, d: false}; // wrap
+ try {
+ then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
+ } catch(e){
+ $reject.call(wrapper, e);
+ }
+ });
+ } else {
+ record.v = value;
+ record.s = 1;
+ notify(record, false);
+ }
+ } catch(e){
+ $reject.call({r: record, d: false}, e); // wrap
+ }
+ };
+
+ // constructor polyfill
+ if(!USE_NATIVE){
+ // 25.4.3.1 Promise(executor)
+ P = function Promise(executor){
+ aFunction(executor);
+ var record = this._d = {
+ p: strictNew(this, P, PROMISE), // <- promise
+ c: [], // <- awaiting reactions
+ a: undefined, // <- checked in isUnhandled reactions
+ s: 0, // <- state
+ d: false, // <- done
+ v: undefined, // <- value
+ h: false, // <- handled rejection
+ n: false // <- notify
+ };
+ try {
+ executor(ctx($resolve, record, 1), ctx($reject, record, 1));
+ } catch(err){
+ $reject.call(record, err);
+ }
+ };
+ __webpack_require__(146)(P.prototype, {
+ // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
+ then: function then(onFulfilled, onRejected){
+ var reaction = new PromiseCapability(speciesConstructor(this, P))
+ , promise = reaction.promise
+ , record = this._d;
+ reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
+ reaction.fail = typeof onRejected == 'function' && onRejected;
+ record.c.push(reaction);
+ if(record.a)record.a.push(reaction);
+ if(record.s)notify(record, false);
+ return promise;
+ },
+ // 25.4.5.1 Promise.prototype.catch(onRejected)
+ 'catch': function(onRejected){
+ return this.then(undefined, onRejected);
+ }
+ });
+ }
+
+ $export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: P});
+ __webpack_require__(39)(P, PROMISE);
+ __webpack_require__(125)(PROMISE);
+ Wrapper = __webpack_require__(9)[PROMISE];
+
+ // statics
+ $export($export.S + $export.F * !USE_NATIVE, PROMISE, {
+ // 25.4.4.5 Promise.reject(r)
+ reject: function reject(r){
+ var capability = new PromiseCapability(this)
+ , $$reject = capability.reject;
+ $$reject(r);
+ return capability.promise;
+ }
+ });
+ $export($export.S + $export.F * (!USE_NATIVE || testResolve(true)), PROMISE, {
+ // 25.4.4.6 Promise.resolve(x)
+ resolve: function resolve(x){
+ // instanceof instead of internal slot check because we should fix it without replacement native Promise core
+ if(x instanceof P && sameConstructor(x.constructor, this))return x;
+ var capability = new PromiseCapability(this)
+ , $$resolve = capability.resolve;
+ $$resolve(x);
+ return capability.promise;
+ }
+ });
+ $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(119)(function(iter){
+ P.all(iter)['catch'](function(){});
+ })), PROMISE, {
+ // 25.4.4.1 Promise.all(iterable)
+ all: function all(iterable){
+ var C = getConstructor(this)
+ , capability = new PromiseCapability(C)
+ , resolve = capability.resolve
+ , reject = capability.reject
+ , values = [];
+ var abrupt = perform(function(){
+ forOf(iterable, false, values.push, values);
+ var remaining = values.length
+ , results = Array(remaining);
+ if(remaining)$.each.call(values, function(promise, index){
+ var alreadyCalled = false;
+ C.resolve(promise).then(function(value){
+ if(alreadyCalled)return;
+ alreadyCalled = true;
+ results[index] = value;
+ --remaining || resolve(results);
+ }, reject);
+ });
+ else resolve(results);
+ });
+ if(abrupt)reject(abrupt.error);
+ return capability.promise;
+ },
+ // 25.4.4.4 Promise.race(iterable)
+ race: function race(iterable){
+ var C = getConstructor(this)
+ , capability = new PromiseCapability(C)
+ , reject = capability.reject;
+ var abrupt = perform(function(){
+ forOf(iterable, false, function(promise){
+ C.resolve(promise).then(capability.resolve, reject);
+ });
+ });
+ if(abrupt)reject(abrupt.error);
+ return capability.promise;
+ }
+ });
+
+/***/ },
+/* 141 */
+/***/ function(module, exports) {
+
+ module.exports = function(it, Constructor, name){
+ if(!(it instanceof Constructor))throw TypeError(name + ": use the 'new' operator!");
+ return it;
+ };
+
+/***/ },
+/* 142 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var ctx = __webpack_require__(16)
+ , call = __webpack_require__(116)
+ , isArrayIter = __webpack_require__(117)
+ , anObject = __webpack_require__(24)
+ , toLength = __webpack_require__(31)
+ , getIterFn = __webpack_require__(118);
+ module.exports = function(iterable, entries, fn, that){
+ var iterFn = getIterFn(iterable)
+ , f = ctx(fn, that, entries ? 2 : 1)
+ , index = 0
+ , length, step, iterator;
+ if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!');
+ // fast case for arrays with default iterator
+ if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){
+ entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
+ } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){
+ call(iterator, f, step.value, entries);
+ }
+ };
+
+/***/ },
+/* 143 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 7.3.20 SpeciesConstructor(O, defaultConstructor)
+ var anObject = __webpack_require__(24)
+ , aFunction = __webpack_require__(17)
+ , SPECIES = __webpack_require__(35)('species');
+ module.exports = function(O, D){
+ var C = anObject(O).constructor, S;
+ return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
+ };
+
+/***/ },
+/* 144 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var global = __webpack_require__(8)
+ , macrotask = __webpack_require__(145).set
+ , Observer = global.MutationObserver || global.WebKitMutationObserver
+ , process = global.process
+ , Promise = global.Promise
+ , isNode = __webpack_require__(22)(process) == 'process'
+ , head, last, notify;
+
+ var flush = function(){
+ var parent, domain, fn;
+ if(isNode && (parent = process.domain)){
+ process.domain = null;
+ parent.exit();
+ }
+ while(head){
+ domain = head.domain;
+ fn = head.fn;
+ if(domain)domain.enter();
+ fn(); // <- currently we use it only for Promise - try / catch not required
+ if(domain)domain.exit();
+ head = head.next;
+ } last = undefined;
+ if(parent)parent.enter();
+ };
+
+ // Node.js
+ if(isNode){
+ notify = function(){
+ process.nextTick(flush);
+ };
+ // browsers with MutationObserver
+ } else if(Observer){
+ var toggle = 1
+ , node = document.createTextNode('');
+ new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new
+ notify = function(){
+ node.data = toggle = -toggle;
+ };
+ // environments with maybe non-completely correct, but existent Promise
+ } else if(Promise && Promise.resolve){
+ notify = function(){
+ Promise.resolve().then(flush);
+ };
+ // for other environments - macrotask based on:
+ // - setImmediate
+ // - MessageChannel
+ // - window.postMessag
+ // - onreadystatechange
+ // - setTimeout
+ } else {
+ notify = function(){
+ // strange IE + webpack dev server bug - use .call(global)
+ macrotask.call(global, flush);
+ };
+ }
+
+ module.exports = function asap(fn){
+ var task = {fn: fn, next: undefined, domain: isNode && process.domain};
+ if(last)last.next = task;
+ if(!head){
+ head = task;
+ notify();
+ } last = task;
+ };
+
+/***/ },
+/* 145 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var ctx = __webpack_require__(16)
+ , invoke = __webpack_require__(23)
+ , html = __webpack_require__(18)
+ , cel = __webpack_require__(19)
+ , global = __webpack_require__(8)
+ , process = global.process
+ , setTask = global.setImmediate
+ , clearTask = global.clearImmediate
+ , MessageChannel = global.MessageChannel
+ , counter = 0
+ , queue = {}
+ , ONREADYSTATECHANGE = 'onreadystatechange'
+ , defer, channel, port;
+ var run = function(){
+ var id = +this;
+ if(queue.hasOwnProperty(id)){
+ var fn = queue[id];
+ delete queue[id];
+ fn();
+ }
+ };
+ var listner = function(event){
+ run.call(event.data);
+ };
+ // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
+ if(!setTask || !clearTask){
+ setTask = function setImmediate(fn){
+ var args = [], i = 1;
+ while(arguments.length > i)args.push(arguments[i++]);
+ queue[++counter] = function(){
+ invoke(typeof fn == 'function' ? fn : Function(fn), args);
+ };
+ defer(counter);
+ return counter;
+ };
+ clearTask = function clearImmediate(id){
+ delete queue[id];
+ };
+ // Node.js 0.8-
+ if(__webpack_require__(22)(process) == 'process'){
+ defer = function(id){
+ process.nextTick(ctx(run, id, 1));
+ };
+ // Browsers with MessageChannel, includes WebWorkers
+ } else if(MessageChannel){
+ channel = new MessageChannel;
+ port = channel.port2;
+ channel.port1.onmessage = listner;
+ defer = ctx(port.postMessage, port, 1);
+ // Browsers with postMessage, skip WebWorkers
+ // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
+ } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){
+ defer = function(id){
+ global.postMessage(id + '', '*');
+ };
+ global.addEventListener('message', listner, false);
+ // IE8-
+ } else if(ONREADYSTATECHANGE in cel('script')){
+ defer = function(id){
+ html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){
+ html.removeChild(this);
+ run.call(id);
+ };
+ };
+ // Rest old browsers
+ } else {
+ defer = function(id){
+ setTimeout(ctx(run, id, 1), 0);
+ };
+ }
+ }
+ module.exports = {
+ set: setTask,
+ clear: clearTask
+ };
+
+/***/ },
+/* 146 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var redefine = __webpack_require__(14);
+ module.exports = function(target, src){
+ for(var key in src)redefine(target, key, src[key]);
+ return target;
+ };
+
+/***/ },
+/* 147 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var strong = __webpack_require__(148);
+
+ // 23.1 Map Objects
+ __webpack_require__(149)('Map', function(get){
+ return function Map(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
+ }, {
+ // 23.1.3.6 Map.prototype.get(key)
+ get: function get(key){
+ var entry = strong.getEntry(this, key);
+ return entry && entry.v;
+ },
+ // 23.1.3.9 Map.prototype.set(key, value)
+ set: function set(key, value){
+ return strong.def(this, key === 0 ? 0 : key, value);
+ }
+ }, strong, true);
+
+/***/ },
+/* 148 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $ = __webpack_require__(6)
+ , hide = __webpack_require__(10)
+ , redefineAll = __webpack_require__(146)
+ , ctx = __webpack_require__(16)
+ , strictNew = __webpack_require__(141)
+ , defined = __webpack_require__(26)
+ , forOf = __webpack_require__(142)
+ , $iterDefine = __webpack_require__(103)
+ , step = __webpack_require__(123)
+ , ID = __webpack_require__(15)('id')
+ , $has = __webpack_require__(21)
+ , isObject = __webpack_require__(20)
+ , setSpecies = __webpack_require__(125)
+ , DESCRIPTORS = __webpack_require__(12)
+ , isExtensible = Object.isExtensible || isObject
+ , SIZE = DESCRIPTORS ? '_s' : 'size'
+ , id = 0;
+
+ var fastKey = function(it, create){
+ // return primitive with prefix
+ if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
+ if(!$has(it, ID)){
+ // can't set id to frozen object
+ if(!isExtensible(it))return 'F';
+ // not necessary to add id
+ if(!create)return 'E';
+ // add missing object id
+ hide(it, ID, ++id);
+ // return object id with prefix
+ } return 'O' + it[ID];
+ };
+
+ var getEntry = function(that, key){
+ // fast case
+ var index = fastKey(key), entry;
+ if(index !== 'F')return that._i[index];
+ // frozen object case
+ for(entry = that._f; entry; entry = entry.n){
+ if(entry.k == key)return entry;
+ }
+ };
+
+ module.exports = {
+ getConstructor: function(wrapper, NAME, IS_MAP, ADDER){
+ var C = wrapper(function(that, iterable){
+ strictNew(that, C, NAME);
+ that._i = $.create(null); // index
+ that._f = undefined; // first entry
+ that._l = undefined; // last entry
+ that[SIZE] = 0; // size
+ if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
+ });
+ redefineAll(C.prototype, {
+ // 23.1.3.1 Map.prototype.clear()
+ // 23.2.3.2 Set.prototype.clear()
+ clear: function clear(){
+ for(var that = this, data = that._i, entry = that._f; entry; entry = entry.n){
+ entry.r = true;
+ if(entry.p)entry.p = entry.p.n = undefined;
+ delete data[entry.i];
+ }
+ that._f = that._l = undefined;
+ that[SIZE] = 0;
+ },
+ // 23.1.3.3 Map.prototype.delete(key)
+ // 23.2.3.4 Set.prototype.delete(value)
+ 'delete': function(key){
+ var that = this
+ , entry = getEntry(that, key);
+ if(entry){
+ var next = entry.n
+ , prev = entry.p;
+ delete that._i[entry.i];
+ entry.r = true;
+ if(prev)prev.n = next;
+ if(next)next.p = prev;
+ if(that._f == entry)that._f = next;
+ if(that._l == entry)that._l = prev;
+ that[SIZE]--;
+ } return !!entry;
+ },
+ // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
+ // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
+ forEach: function forEach(callbackfn /*, that = undefined */){
+ var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3)
+ , entry;
+ while(entry = entry ? entry.n : this._f){
+ f(entry.v, entry.k, this);
+ // revert to the last existing entry
+ while(entry && entry.r)entry = entry.p;
+ }
+ },
+ // 23.1.3.7 Map.prototype.has(key)
+ // 23.2.3.7 Set.prototype.has(value)
+ has: function has(key){
+ return !!getEntry(this, key);
+ }
+ });
+ if(DESCRIPTORS)$.setDesc(C.prototype, 'size', {
+ get: function(){
+ return defined(this[SIZE]);
+ }
+ });
+ return C;
+ },
+ def: function(that, key, value){
+ var entry = getEntry(that, key)
+ , prev, index;
+ // change existing entry
+ if(entry){
+ entry.v = value;
+ // create new entry
+ } else {
+ that._l = entry = {
+ i: index = fastKey(key, true), // <- index
+ k: key, // <- key
+ v: value, // <- value
+ p: prev = that._l, // <- previous entry
+ n: undefined, // <- next entry
+ r: false // <- removed
+ };
+ if(!that._f)that._f = entry;
+ if(prev)prev.n = entry;
+ that[SIZE]++;
+ // add to index
+ if(index !== 'F')that._i[index] = entry;
+ } return that;
+ },
+ getEntry: getEntry,
+ setStrong: function(C, NAME, IS_MAP){
+ // add .keys, .values, .entries, [@@iterator]
+ // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
+ $iterDefine(C, NAME, function(iterated, kind){
+ this._t = iterated; // target
+ this._k = kind; // kind
+ this._l = undefined; // previous
+ }, function(){
+ var that = this
+ , kind = that._k
+ , entry = that._l;
+ // revert to the last existing entry
+ while(entry && entry.r)entry = entry.p;
+ // get next entry
+ if(!that._t || !(that._l = entry = entry ? entry.n : that._t._f)){
+ // or finish the iteration
+ that._t = undefined;
+ return step(1);
+ }
+ // return step by kind
+ if(kind == 'keys' )return step(0, entry.k);
+ if(kind == 'values')return step(0, entry.v);
+ return step(0, [entry.k, entry.v]);
+ }, IS_MAP ? 'entries' : 'values' , !IS_MAP, true);
+
+ // add [@@species], 23.1.2.2, 23.2.2.2
+ setSpecies(NAME);
+ }
+ };
+
+/***/ },
+/* 149 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var global = __webpack_require__(8)
+ , $export = __webpack_require__(7)
+ , redefine = __webpack_require__(14)
+ , redefineAll = __webpack_require__(146)
+ , forOf = __webpack_require__(142)
+ , strictNew = __webpack_require__(141)
+ , isObject = __webpack_require__(20)
+ , fails = __webpack_require__(13)
+ , $iterDetect = __webpack_require__(119)
+ , setToStringTag = __webpack_require__(39);
+
+ module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){
+ var Base = global[NAME]
+ , C = Base
+ , ADDER = IS_MAP ? 'set' : 'add'
+ , proto = C && C.prototype
+ , O = {};
+ var fixMethod = function(KEY){
+ var fn = proto[KEY];
+ redefine(proto, KEY,
+ KEY == 'delete' ? function(a){
+ return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
+ } : KEY == 'has' ? function has(a){
+ return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
+ } : KEY == 'get' ? function get(a){
+ return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);
+ } : KEY == 'add' ? function add(a){ fn.call(this, a === 0 ? 0 : a); return this; }
+ : function set(a, b){ fn.call(this, a === 0 ? 0 : a, b); return this; }
+ );
+ };
+ if(typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function(){
+ new C().entries().next();
+ }))){
+ // create collection constructor
+ C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
+ redefineAll(C.prototype, methods);
+ } else {
+ var instance = new C
+ // early implementations not supports chaining
+ , HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance
+ // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
+ , THROWS_ON_PRIMITIVES = fails(function(){ instance.has(1); })
+ // most early implementations doesn't supports iterables, most modern - not close it correctly
+ , ACCEPT_ITERABLES = $iterDetect(function(iter){ new C(iter); }) // eslint-disable-line no-new
+ // for early implementations -0 and +0 not the same
+ , BUGGY_ZERO;
+ if(!ACCEPT_ITERABLES){
+ C = wrapper(function(target, iterable){
+ strictNew(target, C, NAME);
+ var that = new Base;
+ if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
+ return that;
+ });
+ C.prototype = proto;
+ proto.constructor = C;
+ }
+ IS_WEAK || instance.forEach(function(val, key){
+ BUGGY_ZERO = 1 / key === -Infinity;
+ });
+ if(THROWS_ON_PRIMITIVES || BUGGY_ZERO){
+ fixMethod('delete');
+ fixMethod('has');
+ IS_MAP && fixMethod('get');
+ }
+ if(BUGGY_ZERO || HASNT_CHAINING)fixMethod(ADDER);
+ // weak collections should not contains .clear method
+ if(IS_WEAK && proto.clear)delete proto.clear;
+ }
+
+ setToStringTag(C, NAME);
+
+ O[NAME] = C;
+ $export($export.G + $export.W + $export.F * (C != Base), O);
+
+ if(!IS_WEAK)common.setStrong(C, NAME, IS_MAP);
+
+ return C;
+ };
+
+/***/ },
+/* 150 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var strong = __webpack_require__(148);
+
+ // 23.2 Set Objects
+ __webpack_require__(149)('Set', function(get){
+ return function Set(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
+ }, {
+ // 23.2.3.1 Set.prototype.add(value)
+ add: function add(value){
+ return strong.def(this, value = value === 0 ? 0 : value, value);
+ }
+ }, strong);
+
+/***/ },
+/* 151 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $ = __webpack_require__(6)
+ , redefine = __webpack_require__(14)
+ , weak = __webpack_require__(152)
+ , isObject = __webpack_require__(20)
+ , has = __webpack_require__(21)
+ , frozenStore = weak.frozenStore
+ , WEAK = weak.WEAK
+ , isExtensible = Object.isExtensible || isObject
+ , tmp = {};
+
+ // 23.3 WeakMap Objects
+ var $WeakMap = __webpack_require__(149)('WeakMap', function(get){
+ return function WeakMap(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
+ }, {
+ // 23.3.3.3 WeakMap.prototype.get(key)
+ get: function get(key){
+ if(isObject(key)){
+ if(!isExtensible(key))return frozenStore(this).get(key);
+ if(has(key, WEAK))return key[WEAK][this._i];
+ }
+ },
+ // 23.3.3.5 WeakMap.prototype.set(key, value)
+ set: function set(key, value){
+ return weak.def(this, key, value);
+ }
+ }, weak, true, true);
+
+ // IE11 WeakMap frozen keys fix
+ if(new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){
+ $.each.call(['delete', 'has', 'get', 'set'], function(key){
+ var proto = $WeakMap.prototype
+ , method = proto[key];
+ redefine(proto, key, function(a, b){
+ // store frozen objects on leaky map
+ if(isObject(a) && !isExtensible(a)){
+ var result = frozenStore(this)[key](a, b);
+ return key == 'set' ? this : result;
+ // store all the rest on native weakmap
+ } return method.call(this, a, b);
+ });
+ });
+ }
+
+/***/ },
+/* 152 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var hide = __webpack_require__(10)
+ , redefineAll = __webpack_require__(146)
+ , anObject = __webpack_require__(24)
+ , isObject = __webpack_require__(20)
+ , strictNew = __webpack_require__(141)
+ , forOf = __webpack_require__(142)
+ , createArrayMethod = __webpack_require__(32)
+ , $has = __webpack_require__(21)
+ , WEAK = __webpack_require__(15)('weak')
+ , isExtensible = Object.isExtensible || isObject
+ , arrayFind = createArrayMethod(5)
+ , arrayFindIndex = createArrayMethod(6)
+ , id = 0;
+
+ // fallback for frozen keys
+ var frozenStore = function(that){
+ return that._l || (that._l = new FrozenStore);
+ };
+ var FrozenStore = function(){
+ this.a = [];
+ };
+ var findFrozen = function(store, key){
+ return arrayFind(store.a, function(it){
+ return it[0] === key;
+ });
+ };
+ FrozenStore.prototype = {
+ get: function(key){
+ var entry = findFrozen(this, key);
+ if(entry)return entry[1];
+ },
+ has: function(key){
+ return !!findFrozen(this, key);
+ },
+ set: function(key, value){
+ var entry = findFrozen(this, key);
+ if(entry)entry[1] = value;
+ else this.a.push([key, value]);
+ },
+ 'delete': function(key){
+ var index = arrayFindIndex(this.a, function(it){
+ return it[0] === key;
+ });
+ if(~index)this.a.splice(index, 1);
+ return !!~index;
+ }
+ };
+
+ module.exports = {
+ getConstructor: function(wrapper, NAME, IS_MAP, ADDER){
+ var C = wrapper(function(that, iterable){
+ strictNew(that, C, NAME);
+ that._i = id++; // collection id
+ that._l = undefined; // leak store for frozen objects
+ if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
+ });
+ redefineAll(C.prototype, {
+ // 23.3.3.2 WeakMap.prototype.delete(key)
+ // 23.4.3.3 WeakSet.prototype.delete(value)
+ 'delete': function(key){
+ if(!isObject(key))return false;
+ if(!isExtensible(key))return frozenStore(this)['delete'](key);
+ return $has(key, WEAK) && $has(key[WEAK], this._i) && delete key[WEAK][this._i];
+ },
+ // 23.3.3.4 WeakMap.prototype.has(key)
+ // 23.4.3.4 WeakSet.prototype.has(value)
+ has: function has(key){
+ if(!isObject(key))return false;
+ if(!isExtensible(key))return frozenStore(this).has(key);
+ return $has(key, WEAK) && $has(key[WEAK], this._i);
+ }
+ });
+ return C;
+ },
+ def: function(that, key, value){
+ if(!isExtensible(anObject(key))){
+ frozenStore(that).set(key, value);
+ } else {
+ $has(key, WEAK) || hide(key, WEAK, {});
+ key[WEAK][that._i] = value;
+ } return that;
+ },
+ frozenStore: frozenStore,
+ WEAK: WEAK
+ };
+
+/***/ },
+/* 153 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var weak = __webpack_require__(152);
+
+ // 23.4 WeakSet Objects
+ __webpack_require__(149)('WeakSet', function(get){
+ return function WeakSet(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
+ }, {
+ // 23.4.3.1 WeakSet.prototype.add(value)
+ add: function add(value){
+ return weak.def(this, value, true);
+ }
+ }, weak, false, true);
+
+/***/ },
+/* 154 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
+ var $export = __webpack_require__(7)
+ , _apply = Function.apply;
+
+ $export($export.S, 'Reflect', {
+ apply: function apply(target, thisArgument, argumentsList){
+ return _apply.call(target, thisArgument, argumentsList);
+ }
+ });
+
+/***/ },
+/* 155 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 26.1.2 Reflect.construct(target, argumentsList [, newTarget])
+ var $ = __webpack_require__(6)
+ , $export = __webpack_require__(7)
+ , aFunction = __webpack_require__(17)
+ , anObject = __webpack_require__(24)
+ , isObject = __webpack_require__(20)
+ , bind = Function.bind || __webpack_require__(9).Function.prototype.bind;
+
+ // MS Edge supports only 2 arguments
+ // FF Nightly sets third argument as `new.target`, but does not create `this` from it
+ $export($export.S + $export.F * __webpack_require__(13)(function(){
+ function F(){}
+ return !(Reflect.construct(function(){}, [], F) instanceof F);
+ }), 'Reflect', {
+ construct: function construct(Target, args /*, newTarget*/){
+ aFunction(Target);
+ var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
+ if(Target == newTarget){
+ // w/o altered newTarget, optimization for 0-4 arguments
+ if(args != undefined)switch(anObject(args).length){
+ case 0: return new Target;
+ case 1: return new Target(args[0]);
+ case 2: return new Target(args[0], args[1]);
+ case 3: return new Target(args[0], args[1], args[2]);
+ case 4: return new Target(args[0], args[1], args[2], args[3]);
+ }
+ // w/o altered newTarget, lot of arguments case
+ var $args = [null];
+ $args.push.apply($args, args);
+ return new (bind.apply(Target, $args));
+ }
+ // with altered newTarget, not support built-in constructors
+ var proto = newTarget.prototype
+ , instance = $.create(isObject(proto) ? proto : Object.prototype)
+ , result = Function.apply.call(Target, instance, args);
+ return isObject(result) ? result : instance;
+ }
+ });
+
+/***/ },
+/* 156 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)
+ var $ = __webpack_require__(6)
+ , $export = __webpack_require__(7)
+ , anObject = __webpack_require__(24);
+
+ // MS Edge has broken Reflect.defineProperty - throwing instead of returning false
+ $export($export.S + $export.F * __webpack_require__(13)(function(){
+ Reflect.defineProperty($.setDesc({}, 1, {value: 1}), 1, {value: 2});
+ }), 'Reflect', {
+ defineProperty: function defineProperty(target, propertyKey, attributes){
+ anObject(target);
+ try {
+ $.setDesc(target, propertyKey, attributes);
+ return true;
+ } catch(e){
+ return false;
+ }
+ }
+ });
+
+/***/ },
+/* 157 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 26.1.4 Reflect.deleteProperty(target, propertyKey)
+ var $export = __webpack_require__(7)
+ , getDesc = __webpack_require__(6).getDesc
+ , anObject = __webpack_require__(24);
+
+ $export($export.S, 'Reflect', {
+ deleteProperty: function deleteProperty(target, propertyKey){
+ var desc = getDesc(anObject(target), propertyKey);
+ return desc && !desc.configurable ? false : delete target[propertyKey];
+ }
+ });
+
+/***/ },
+/* 158 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // 26.1.5 Reflect.enumerate(target)
+ var $export = __webpack_require__(7)
+ , anObject = __webpack_require__(24);
+ var Enumerate = function(iterated){
+ this._t = anObject(iterated); // target
+ this._i = 0; // next index
+ var keys = this._k = [] // keys
+ , key;
+ for(key in iterated)keys.push(key);
+ };
+ __webpack_require__(105)(Enumerate, 'Object', function(){
+ var that = this
+ , keys = that._k
+ , key;
+ do {
+ if(that._i >= keys.length)return {value: undefined, done: true};
+ } while(!((key = keys[that._i++]) in that._t));
+ return {value: key, done: false};
+ });
+
+ $export($export.S, 'Reflect', {
+ enumerate: function enumerate(target){
+ return new Enumerate(target);
+ }
+ });
+
+/***/ },
+/* 159 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 26.1.6 Reflect.get(target, propertyKey [, receiver])
+ var $ = __webpack_require__(6)
+ , has = __webpack_require__(21)
+ , $export = __webpack_require__(7)
+ , isObject = __webpack_require__(20)
+ , anObject = __webpack_require__(24);
+
+ function get(target, propertyKey/*, receiver*/){
+ var receiver = arguments.length < 3 ? target : arguments[2]
+ , desc, proto;
+ if(anObject(target) === receiver)return target[propertyKey];
+ if(desc = $.getDesc(target, propertyKey))return has(desc, 'value')
+ ? desc.value
+ : desc.get !== undefined
+ ? desc.get.call(receiver)
+ : undefined;
+ if(isObject(proto = $.getProto(target)))return get(proto, propertyKey, receiver);
+ }
+
+ $export($export.S, 'Reflect', {get: get});
+
+/***/ },
+/* 160 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)
+ var $ = __webpack_require__(6)
+ , $export = __webpack_require__(7)
+ , anObject = __webpack_require__(24);
+
+ $export($export.S, 'Reflect', {
+ getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey){
+ return $.getDesc(anObject(target), propertyKey);
+ }
+ });
+
+/***/ },
+/* 161 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 26.1.8 Reflect.getPrototypeOf(target)
+ var $export = __webpack_require__(7)
+ , getProto = __webpack_require__(6).getProto
+ , anObject = __webpack_require__(24);
+
+ $export($export.S, 'Reflect', {
+ getPrototypeOf: function getPrototypeOf(target){
+ return getProto(anObject(target));
+ }
+ });
+
+/***/ },
+/* 162 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 26.1.9 Reflect.has(target, propertyKey)
+ var $export = __webpack_require__(7);
+
+ $export($export.S, 'Reflect', {
+ has: function has(target, propertyKey){
+ return propertyKey in target;
+ }
+ });
+
+/***/ },
+/* 163 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 26.1.10 Reflect.isExtensible(target)
+ var $export = __webpack_require__(7)
+ , anObject = __webpack_require__(24)
+ , $isExtensible = Object.isExtensible;
+
+ $export($export.S, 'Reflect', {
+ isExtensible: function isExtensible(target){
+ anObject(target);
+ return $isExtensible ? $isExtensible(target) : true;
+ }
+ });
+
+/***/ },
+/* 164 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 26.1.11 Reflect.ownKeys(target)
+ var $export = __webpack_require__(7);
+
+ $export($export.S, 'Reflect', {ownKeys: __webpack_require__(165)});
+
+/***/ },
+/* 165 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // all object keys, includes non-enumerable and symbols
+ var $ = __webpack_require__(6)
+ , anObject = __webpack_require__(24)
+ , Reflect = __webpack_require__(8).Reflect;
+ module.exports = Reflect && Reflect.ownKeys || function ownKeys(it){
+ var keys = $.getNames(anObject(it))
+ , getSymbols = $.getSymbols;
+ return getSymbols ? keys.concat(getSymbols(it)) : keys;
+ };
+
+/***/ },
+/* 166 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 26.1.12 Reflect.preventExtensions(target)
+ var $export = __webpack_require__(7)
+ , anObject = __webpack_require__(24)
+ , $preventExtensions = Object.preventExtensions;
+
+ $export($export.S, 'Reflect', {
+ preventExtensions: function preventExtensions(target){
+ anObject(target);
+ try {
+ if($preventExtensions)$preventExtensions(target);
+ return true;
+ } catch(e){
+ return false;
+ }
+ }
+ });
+
+/***/ },
+/* 167 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 26.1.13 Reflect.set(target, propertyKey, V [, receiver])
+ var $ = __webpack_require__(6)
+ , has = __webpack_require__(21)
+ , $export = __webpack_require__(7)
+ , createDesc = __webpack_require__(11)
+ , anObject = __webpack_require__(24)
+ , isObject = __webpack_require__(20);
+
+ function set(target, propertyKey, V/*, receiver*/){
+ var receiver = arguments.length < 4 ? target : arguments[3]
+ , ownDesc = $.getDesc(anObject(target), propertyKey)
+ , existingDescriptor, proto;
+ if(!ownDesc){
+ if(isObject(proto = $.getProto(target))){
+ return set(proto, propertyKey, V, receiver);
+ }
+ ownDesc = createDesc(0);
+ }
+ if(has(ownDesc, 'value')){
+ if(ownDesc.writable === false || !isObject(receiver))return false;
+ existingDescriptor = $.getDesc(receiver, propertyKey) || createDesc(0);
+ existingDescriptor.value = V;
+ $.setDesc(receiver, propertyKey, existingDescriptor);
+ return true;
+ }
+ return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);
+ }
+
+ $export($export.S, 'Reflect', {set: set});
+
+/***/ },
+/* 168 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 26.1.14 Reflect.setPrototypeOf(target, proto)
+ var $export = __webpack_require__(7)
+ , setProto = __webpack_require__(49);
+
+ if(setProto)$export($export.S, 'Reflect', {
+ setPrototypeOf: function setPrototypeOf(target, proto){
+ setProto.check(target, proto);
+ try {
+ setProto.set(target, proto);
+ return true;
+ } catch(e){
+ return false;
+ }
+ }
+ });
+
+/***/ },
+/* 169 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $export = __webpack_require__(7)
+ , $includes = __webpack_require__(37)(true);
+
+ $export($export.P, 'Array', {
+ // https://github.com/domenic/Array.prototype.includes
+ includes: function includes(el /*, fromIndex = 0 */){
+ return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
+ }
+ });
+
+ __webpack_require__(122)('includes');
+
+/***/ },
+/* 170 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // https://github.com/mathiasbynens/String.prototype.at
+ var $export = __webpack_require__(7)
+ , $at = __webpack_require__(102)(true);
+
+ $export($export.P, 'String', {
+ at: function at(pos){
+ return $at(this, pos);
+ }
+ });
+
+/***/ },
+/* 171 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $export = __webpack_require__(7)
+ , $pad = __webpack_require__(172);
+
+ $export($export.P, 'String', {
+ padLeft: function padLeft(maxLength /*, fillString = ' ' */){
+ return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);
+ }
+ });
+
+/***/ },
+/* 172 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // https://github.com/ljharb/proposal-string-pad-left-right
+ var toLength = __webpack_require__(31)
+ , repeat = __webpack_require__(113)
+ , defined = __webpack_require__(26);
+
+ module.exports = function(that, maxLength, fillString, left){
+ var S = String(defined(that))
+ , stringLength = S.length
+ , fillStr = fillString === undefined ? ' ' : String(fillString)
+ , intMaxLength = toLength(maxLength);
+ if(intMaxLength <= stringLength)return S;
+ if(fillStr == '')fillStr = ' ';
+ var fillLen = intMaxLength - stringLength
+ , stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));
+ if(stringFiller.length > fillLen)stringFiller = stringFiller.slice(0, fillLen);
+ return left ? stringFiller + S : S + stringFiller;
+ };
+
+/***/ },
+/* 173 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $export = __webpack_require__(7)
+ , $pad = __webpack_require__(172);
+
+ $export($export.P, 'String', {
+ padRight: function padRight(maxLength /*, fillString = ' ' */){
+ return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
+ }
+ });
+
+/***/ },
+/* 174 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // https://github.com/sebmarkbage/ecmascript-string-left-right-trim
+ __webpack_require__(67)('trimLeft', function($trim){
+ return function trimLeft(){
+ return $trim(this, 1);
+ };
+ });
+
+/***/ },
+/* 175 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // https://github.com/sebmarkbage/ecmascript-string-left-right-trim
+ __webpack_require__(67)('trimRight', function($trim){
+ return function trimRight(){
+ return $trim(this, 2);
+ };
+ });
+
+/***/ },
+/* 176 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // https://github.com/benjamingr/RexExp.escape
+ var $export = __webpack_require__(7)
+ , $re = __webpack_require__(177)(/[\\^$*+?.()|[\]{}]/g, '\\$&');
+
+ $export($export.S, 'RegExp', {escape: function escape(it){ return $re(it); }});
+
+
+/***/ },
+/* 177 */
+/***/ function(module, exports) {
+
+ module.exports = function(regExp, replace){
+ var replacer = replace === Object(replace) ? function(part){
+ return replace[part];
+ } : replace;
+ return function(it){
+ return String(it).replace(regExp, replacer);
+ };
+ };
+
+/***/ },
+/* 178 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // https://gist.github.com/WebReflection/9353781
+ var $ = __webpack_require__(6)
+ , $export = __webpack_require__(7)
+ , ownKeys = __webpack_require__(165)
+ , toIObject = __webpack_require__(27)
+ , createDesc = __webpack_require__(11);
+
+ $export($export.S, 'Object', {
+ getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object){
+ var O = toIObject(object)
+ , setDesc = $.setDesc
+ , getDesc = $.getDesc
+ , keys = ownKeys(O)
+ , result = {}
+ , i = 0
+ , key, D;
+ while(keys.length > i){
+ D = getDesc(O, key = keys[i++]);
+ if(key in result)setDesc(result, key, createDesc(0, D));
+ else result[key] = D;
+ } return result;
+ }
+ });
+
+/***/ },
+/* 179 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // http://goo.gl/XkBrjD
+ var $export = __webpack_require__(7)
+ , $values = __webpack_require__(180)(false);
+
+ $export($export.S, 'Object', {
+ values: function values(it){
+ return $values(it);
+ }
+ });
+
+/***/ },
+/* 180 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var $ = __webpack_require__(6)
+ , toIObject = __webpack_require__(27)
+ , isEnum = $.isEnum;
+ module.exports = function(isEntries){
+ return function(it){
+ var O = toIObject(it)
+ , keys = $.getKeys(O)
+ , length = keys.length
+ , i = 0
+ , result = []
+ , key;
+ while(length > i)if(isEnum.call(O, key = keys[i++])){
+ result.push(isEntries ? [key, O[key]] : O[key]);
+ } return result;
+ };
+ };
+
+/***/ },
+/* 181 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // http://goo.gl/XkBrjD
+ var $export = __webpack_require__(7)
+ , $entries = __webpack_require__(180)(true);
+
+ $export($export.S, 'Object', {
+ entries: function entries(it){
+ return $entries(it);
+ }
+ });
+
+/***/ },
+/* 182 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // https://github.com/DavidBruant/Map-Set.prototype.toJSON
+ var $export = __webpack_require__(7);
+
+ $export($export.P, 'Map', {toJSON: __webpack_require__(183)('Map')});
+
+/***/ },
+/* 183 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // https://github.com/DavidBruant/Map-Set.prototype.toJSON
+ var forOf = __webpack_require__(142)
+ , classof = __webpack_require__(51);
+ module.exports = function(NAME){
+ return function toJSON(){
+ if(classof(this) != NAME)throw TypeError(NAME + "#toJSON isn't generic");
+ var arr = [];
+ forOf(this, false, arr.push, arr);
+ return arr;
+ };
+ };
+
+/***/ },
+/* 184 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // https://github.com/DavidBruant/Map-Set.prototype.toJSON
+ var $export = __webpack_require__(7);
+
+ $export($export.P, 'Set', {toJSON: __webpack_require__(183)('Set')});
+
+/***/ },
+/* 185 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // JavaScript 1.6 / Strawman array statics shim
+ var $ = __webpack_require__(6)
+ , $export = __webpack_require__(7)
+ , $ctx = __webpack_require__(16)
+ , $Array = __webpack_require__(9).Array || Array
+ , statics = {};
+ var setStatics = function(keys, length){
+ $.each.call(keys.split(','), function(key){
+ if(length == undefined && key in $Array)statics[key] = $Array[key];
+ else if(key in [])statics[key] = $ctx(Function.call, [][key], length);
+ });
+ };
+ setStatics('pop,reverse,shift,keys,values,entries', 1);
+ setStatics('indexOf,every,some,forEach,map,filter,find,findIndex,includes', 3);
+ setStatics('join,slice,concat,push,splice,unshift,sort,lastIndexOf,' +
+ 'reduce,reduceRight,copyWithin,fill');
+ $export($export.S, 'Array', statics);
+
+/***/ },
+/* 186 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // ie9- setTimeout & setInterval additional parameters fix
+ var global = __webpack_require__(8)
+ , $export = __webpack_require__(7)
+ , invoke = __webpack_require__(23)
+ , partial = __webpack_require__(187)
+ , navigator = global.navigator
+ , MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check
+ var wrap = function(set){
+ return MSIE ? function(fn, time /*, ...args */){
+ return set(invoke(
+ partial,
+ [].slice.call(arguments, 2),
+ typeof fn == 'function' ? fn : Function(fn)
+ ), time);
+ } : set;
+ };
+ $export($export.G + $export.B + $export.F * MSIE, {
+ setTimeout: wrap(global.setTimeout),
+ setInterval: wrap(global.setInterval)
+ });
+
+/***/ },
+/* 187 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var path = __webpack_require__(188)
+ , invoke = __webpack_require__(23)
+ , aFunction = __webpack_require__(17);
+ module.exports = function(/* ...pargs */){
+ var fn = aFunction(this)
+ , length = arguments.length
+ , pargs = Array(length)
+ , i = 0
+ , _ = path._
+ , holder = false;
+ while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true;
+ return function(/* ...args */){
+ var that = this
+ , $$ = arguments
+ , $$len = $$.length
+ , j = 0, k = 0, args;
+ if(!holder && !$$len)return invoke(fn, pargs, that);
+ args = pargs.slice();
+ if(holder)for(;length > j; j++)if(args[j] === _)args[j] = $$[k++];
+ while($$len > k)args.push($$[k++]);
+ return invoke(fn, args, that);
+ };
+ };
+
+/***/ },
+/* 188 */
+/***/ function(module, exports, __webpack_require__) {
+
+ module.exports = __webpack_require__(8);
+
+/***/ },
+/* 189 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var $export = __webpack_require__(7)
+ , $task = __webpack_require__(145);
+ $export($export.G + $export.B, {
+ setImmediate: $task.set,
+ clearImmediate: $task.clear
+ });
+
+/***/ },
+/* 190 */
+/***/ function(module, exports, __webpack_require__) {
+
+ __webpack_require__(121);
+ var global = __webpack_require__(8)
+ , hide = __webpack_require__(10)
+ , Iterators = __webpack_require__(104)
+ , ITERATOR = __webpack_require__(35)('iterator')
+ , NL = global.NodeList
+ , HTC = global.HTMLCollection
+ , NLProto = NL && NL.prototype
+ , HTCProto = HTC && HTC.prototype
+ , ArrayValues = Iterators.NodeList = Iterators.HTMLCollection = Iterators.Array;
+ if(NLProto && !NLProto[ITERATOR])hide(NLProto, ITERATOR, ArrayValues);
+ if(HTCProto && !HTCProto[ITERATOR])hide(HTCProto, ITERATOR, ArrayValues);
+
+/***/ },
+/* 191 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(global, Promise, process) {/**
+ * Copyright (c) 2014, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
+ * additional grant of patent rights can be found in the PATENTS file in
+ * the same directory.
+ */
+
+ !(function(global) {
+ "use strict";
+
+ var hasOwn = Object.prototype.hasOwnProperty;
+ var undefined; // More compressible than void 0.
+ var iteratorSymbol =
+ typeof Symbol === "function" && Symbol.iterator || "@@iterator";
+
+ var inModule = typeof module === "object";
+ var runtime = global.regeneratorRuntime;
+ if (runtime) {
+ if (inModule) {
+ // If regeneratorRuntime is defined globally and we're in a module,
+ // make the exports object identical to regeneratorRuntime.
+ module.exports = runtime;
+ }
+ // Don't bother evaluating the rest of this file if the runtime was
+ // already defined globally.
+ return;
+ }
+
+ // Define the runtime globally (as expected by generated code) as either
+ // module.exports (if we're in a module) or a new, empty object.
+ runtime = global.regeneratorRuntime = inModule ? module.exports : {};
+
+ function wrap(innerFn, outerFn, self, tryLocsList) {
+ // If outerFn provided, then outerFn.prototype instanceof Generator.
+ var generator = Object.create((outerFn || Generator).prototype);
+ var context = new Context(tryLocsList || []);
+
+ // The ._invoke method unifies the implementations of the .next,
+ // .throw, and .return methods.
+ generator._invoke = makeInvokeMethod(innerFn, self, context);
+
+ return generator;
+ }
+ runtime.wrap = wrap;
+
+ // Try/catch helper to minimize deoptimizations. Returns a completion
+ // record like context.tryEntries[i].completion. This interface could
+ // have been (and was previously) designed to take a closure to be
+ // invoked without arguments, but in all the cases we care about we
+ // already have an existing method we want to call, so there's no need
+ // to create a new function object. We can even get away with assuming
+ // the method takes exactly one argument, since that happens to be true
+ // in every case, so we don't have to touch the arguments object. The
+ // only additional allocation required is the completion record, which
+ // has a stable shape and so hopefully should be cheap to allocate.
+ function tryCatch(fn, obj, arg) {
+ try {
+ return { type: "normal", arg: fn.call(obj, arg) };
+ } catch (err) {
+ return { type: "throw", arg: err };
+ }
+ }
+
+ var GenStateSuspendedStart = "suspendedStart";
+ var GenStateSuspendedYield = "suspendedYield";
+ var GenStateExecuting = "executing";
+ var GenStateCompleted = "completed";
+
+ // Returning this object from the innerFn has the same effect as
+ // breaking out of the dispatch switch statement.
+ var ContinueSentinel = {};
+
+ // Dummy constructor functions that we use as the .constructor and
+ // .constructor.prototype properties for functions that return Generator
+ // objects. For full spec compliance, you may wish to configure your
+ // minifier not to mangle the names of these two functions.
+ function Generator() {}
+ function GeneratorFunction() {}
+ function GeneratorFunctionPrototype() {}
+
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype;
+ GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
+ GeneratorFunctionPrototype.constructor = GeneratorFunction;
+ GeneratorFunction.displayName = "GeneratorFunction";
+
+ // Helper for defining the .next, .throw, and .return methods of the
+ // Iterator interface in terms of a single ._invoke method.
+ function defineIteratorMethods(prototype) {
+ ["next", "throw", "return"].forEach(function(method) {
+ prototype[method] = function(arg) {
+ return this._invoke(method, arg);
+ };
+ });
+ }
+
+ runtime.isGeneratorFunction = function(genFun) {
+ var ctor = typeof genFun === "function" && genFun.constructor;
+ return ctor
+ ? ctor === GeneratorFunction ||
+ // For the native GeneratorFunction constructor, the best we can
+ // do is to check its .name property.
+ (ctor.displayName || ctor.name) === "GeneratorFunction"
+ : false;
+ };
+
+ runtime.mark = function(genFun) {
+ if (Object.setPrototypeOf) {
+ Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
+ } else {
+ genFun.__proto__ = GeneratorFunctionPrototype;
+ }
+ genFun.prototype = Object.create(Gp);
+ return genFun;
+ };
+
+ // Within the body of any async function, `await x` is transformed to
+ // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
+ // `value instanceof AwaitArgument` to determine if the yielded value is
+ // meant to be awaited. Some may consider the name of this method too
+ // cutesy, but they are curmudgeons.
+ runtime.awrap = function(arg) {
+ return new AwaitArgument(arg);
+ };
+
+ function AwaitArgument(arg) {
+ this.arg = arg;
+ }
+
+ function AsyncIterator(generator) {
+ // This invoke function is written in a style that assumes some
+ // calling function (or Promise) will handle exceptions.
+ function invoke(method, arg) {
+ var result = generator[method](arg);
+ var value = result.value;
+ return value instanceof AwaitArgument
+ ? Promise.resolve(value.arg).then(invokeNext, invokeThrow)
+ : Promise.resolve(value).then(function(unwrapped) {
+ // When a yielded Promise is resolved, its final value becomes
+ // the .value of the Promise<{value,done}> result for the
+ // current iteration. If the Promise is rejected, however, the
+ // result for this iteration will be rejected with the same
+ // reason. Note that rejections of yielded Promises are not
+ // thrown back into the generator function, as is the case
+ // when an awaited Promise is rejected. This difference in
+ // behavior between yield and await is important, because it
+ // allows the consumer to decide what to do with the yielded
+ // rejection (swallow it and continue, manually .throw it back
+ // into the generator, abandon iteration, whatever). With
+ // await, by contrast, there is no opportunity to examine the
+ // rejection reason outside the generator function, so the
+ // only option is to throw it from the await expression, and
+ // let the generator function handle the exception.
+ result.value = unwrapped;
+ return result;
+ });
+ }
+
+ if (typeof process === "object" && process.domain) {
+ invoke = process.domain.bind(invoke);
+ }
+
+ var invokeNext = invoke.bind(generator, "next");
+ var invokeThrow = invoke.bind(generator, "throw");
+ var invokeReturn = invoke.bind(generator, "return");
+ var previousPromise;
+
+ function enqueue(method, arg) {
+ function callInvokeWithMethodAndArg() {
+ return invoke(method, arg);
+ }
+
+ return previousPromise =
+ // If enqueue has been called before, then we want to wait until
+ // all previous Promises have been resolved before calling invoke,
+ // so that results are always delivered in the correct order. If
+ // enqueue has not been called before, then it is important to
+ // call invoke immediately, without waiting on a callback to fire,
+ // so that the async generator function has the opportunity to do
+ // any necessary setup in a predictable way. This predictability
+ // is why the Promise constructor synchronously invokes its
+ // executor callback, and why async functions synchronously
+ // execute code before the first await. Since we implement simple
+ // async functions in terms of async generators, it is especially
+ // important to get this right, even though it requires care.
+ previousPromise ? previousPromise.then(
+ callInvokeWithMethodAndArg,
+ // Avoid propagating failures to Promises returned by later
+ // invocations of the iterator.
+ callInvokeWithMethodAndArg
+ ) : new Promise(function (resolve) {
+ resolve(callInvokeWithMethodAndArg());
+ });
+ }
+
+ // Define the unified helper method that is used to implement .next,
+ // .throw, and .return (see defineIteratorMethods).
+ this._invoke = enqueue;
+ }
+
+ defineIteratorMethods(AsyncIterator.prototype);
+
+ // Note that simple async functions are implemented on top of
+ // AsyncIterator objects; they just return a Promise for the value of
+ // the final result produced by the iterator.
+ runtime.async = function(innerFn, outerFn, self, tryLocsList) {
+ var iter = new AsyncIterator(
+ wrap(innerFn, outerFn, self, tryLocsList)
+ );
+
+ return runtime.isGeneratorFunction(outerFn)
+ ? iter // If outerFn is a generator, return the full iterator.
+ : iter.next().then(function(result) {
+ return result.done ? result.value : iter.next();
+ });
+ };
+
+ function makeInvokeMethod(innerFn, self, context) {
+ var state = GenStateSuspendedStart;
+
+ return function invoke(method, arg) {
+ if (state === GenStateExecuting) {
+ throw new Error("Generator is already running");
+ }
+
+ if (state === GenStateCompleted) {
+ if (method === "throw") {
+ throw arg;
+ }
+
+ // Be forgiving, per 25.3.3.3.3 of the spec:
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
+ return doneResult();
+ }
+
+ while (true) {
+ var delegate = context.delegate;
+ if (delegate) {
+ if (method === "return" ||
+ (method === "throw" && delegate.iterator[method] === undefined)) {
+ // A return or throw (when the delegate iterator has no throw
+ // method) always terminates the yield* loop.
+ context.delegate = null;
+
+ // If the delegate iterator has a return method, give it a
+ // chance to clean up.
+ var returnMethod = delegate.iterator["return"];
+ if (returnMethod) {
+ var record = tryCatch(returnMethod, delegate.iterator, arg);
+ if (record.type === "throw") {
+ // If the return method threw an exception, let that
+ // exception prevail over the original return or throw.
+ method = "throw";
+ arg = record.arg;
+ continue;
+ }
+ }
+
+ if (method === "return") {
+ // Continue with the outer return, now that the delegate
+ // iterator has been terminated.
+ continue;
+ }
+ }
+
+ var record = tryCatch(
+ delegate.iterator[method],
+ delegate.iterator,
+ arg
+ );
+
+ if (record.type === "throw") {
+ context.delegate = null;
+
+ // Like returning generator.throw(uncaught), but without the
+ // overhead of an extra function call.
+ method = "throw";
+ arg = record.arg;
+ continue;
+ }
+
+ // Delegate generator ran and handled its own exceptions so
+ // regardless of what the method was, we continue as if it is
+ // "next" with an undefined arg.
+ method = "next";
+ arg = undefined;
+
+ var info = record.arg;
+ if (info.done) {
+ context[delegate.resultName] = info.value;
+ context.next = delegate.nextLoc;
+ } else {
+ state = GenStateSuspendedYield;
+ return info;
+ }
+
+ context.delegate = null;
+ }
+
+ if (method === "next") {
+ context._sent = arg;
+
+ if (state === GenStateSuspendedYield) {
+ context.sent = arg;
+ } else {
+ context.sent = undefined;
+ }
+ } else if (method === "throw") {
+ if (state === GenStateSuspendedStart) {
+ state = GenStateCompleted;
+ throw arg;
+ }
+
+ if (context.dispatchException(arg)) {
+ // If the dispatched exception was caught by a catch block,
+ // then let that catch block handle the exception normally.
+ method = "next";
+ arg = undefined;
+ }
+
+ } else if (method === "return") {
+ context.abrupt("return", arg);
+ }
+
+ state = GenStateExecuting;
+
+ var record = tryCatch(innerFn, self, context);
+ if (record.type === "normal") {
+ // If an exception is thrown from innerFn, we leave state ===
+ // GenStateExecuting and loop back for another invocation.
+ state = context.done
+ ? GenStateCompleted
+ : GenStateSuspendedYield;
+
+ var info = {
+ value: record.arg,
+ done: context.done
+ };
+
+ if (record.arg === ContinueSentinel) {
+ if (context.delegate && method === "next") {
+ // Deliberately forget the last sent value so that we don't
+ // accidentally pass it on to the delegate.
+ arg = undefined;
+ }
+ } else {
+ return info;
+ }
+
+ } else if (record.type === "throw") {
+ state = GenStateCompleted;
+ // Dispatch the exception by looping back around to the
+ // context.dispatchException(arg) call above.
+ method = "throw";
+ arg = record.arg;
+ }
+ }
+ };
+ }
+
+ // Define Generator.prototype.{next,throw,return} in terms of the
+ // unified ._invoke helper method.
+ defineIteratorMethods(Gp);
+
+ Gp[iteratorSymbol] = function() {
+ return this;
+ };
+
+ Gp.toString = function() {
+ return "[object Generator]";
+ };
+
+ function pushTryEntry(locs) {
+ var entry = { tryLoc: locs[0] };
+
+ if (1 in locs) {
+ entry.catchLoc = locs[1];
+ }
+
+ if (2 in locs) {
+ entry.finallyLoc = locs[2];
+ entry.afterLoc = locs[3];
+ }
+
+ this.tryEntries.push(entry);
+ }
+
+ function resetTryEntry(entry) {
+ var record = entry.completion || {};
+ record.type = "normal";
+ delete record.arg;
+ entry.completion = record;
+ }
+
+ function Context(tryLocsList) {
+ // The root entry object (effectively a try statement without a catch
+ // or a finally block) gives us a place to store values thrown from
+ // locations where there is no enclosing try statement.
+ this.tryEntries = [{ tryLoc: "root" }];
+ tryLocsList.forEach(pushTryEntry, this);
+ this.reset(true);
+ }
+
+ runtime.keys = function(object) {
+ var keys = [];
+ for (var key in object) {
+ keys.push(key);
+ }
+ keys.reverse();
+
+ // Rather than returning an object with a next method, we keep
+ // things simple and return the next function itself.
+ return function next() {
+ while (keys.length) {
+ var key = keys.pop();
+ if (key in object) {
+ next.value = key;
+ next.done = false;
+ return next;
+ }
+ }
+
+ // To avoid creating an additional object, we just hang the .value
+ // and .done properties off the next function object itself. This
+ // also ensures that the minifier will not anonymize the function.
+ next.done = true;
+ return next;
+ };
+ };
+
+ function values(iterable) {
+ if (iterable) {
+ var iteratorMethod = iterable[iteratorSymbol];
+ if (iteratorMethod) {
+ return iteratorMethod.call(iterable);
+ }
+
+ if (typeof iterable.next === "function") {
+ return iterable;
+ }
+
+ if (!isNaN(iterable.length)) {
+ var i = -1, next = function next() {
+ while (++i < iterable.length) {
+ if (hasOwn.call(iterable, i)) {
+ next.value = iterable[i];
+ next.done = false;
+ return next;
+ }
+ }
+
+ next.value = undefined;
+ next.done = true;
+
+ return next;
+ };
+
+ return next.next = next;
+ }
+ }
+
+ // Return an iterator with no values.
+ return { next: doneResult };
+ }
+ runtime.values = values;
+
+ function doneResult() {
+ return { value: undefined, done: true };
+ }
+
+ Context.prototype = {
+ constructor: Context,
+
+ reset: function(skipTempReset) {
+ this.prev = 0;
+ this.next = 0;
+ this.sent = undefined;
+ this.done = false;
+ this.delegate = null;
+
+ this.tryEntries.forEach(resetTryEntry);
+
+ if (!skipTempReset) {
+ for (var name in this) {
+ // Not sure about the optimal order of these conditions:
+ if (name.charAt(0) === "t" &&
+ hasOwn.call(this, name) &&
+ !isNaN(+name.slice(1))) {
+ this[name] = undefined;
+ }
+ }
+ }
+ },
+
+ stop: function() {
+ this.done = true;
+
+ var rootEntry = this.tryEntries[0];
+ var rootRecord = rootEntry.completion;
+ if (rootRecord.type === "throw") {
+ throw rootRecord.arg;
+ }
+
+ return this.rval;
+ },
+
+ dispatchException: function(exception) {
+ if (this.done) {
+ throw exception;
+ }
+
+ var context = this;
+ function handle(loc, caught) {
+ record.type = "throw";
+ record.arg = exception;
+ context.next = loc;
+ return !!caught;
+ }
+
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ var record = entry.completion;
+
+ if (entry.tryLoc === "root") {
+ // Exception thrown outside of any try block that could handle
+ // it, so set the completion value of the entire function to
+ // throw the exception.
+ return handle("end");
+ }
+
+ if (entry.tryLoc <= this.prev) {
+ var hasCatch = hasOwn.call(entry, "catchLoc");
+ var hasFinally = hasOwn.call(entry, "finallyLoc");
+
+ if (hasCatch && hasFinally) {
+ if (this.prev < entry.catchLoc) {
+ return handle(entry.catchLoc, true);
+ } else if (this.prev < entry.finallyLoc) {
+ return handle(entry.finallyLoc);
+ }
+
+ } else if (hasCatch) {
+ if (this.prev < entry.catchLoc) {
+ return handle(entry.catchLoc, true);
+ }
+
+ } else if (hasFinally) {
+ if (this.prev < entry.finallyLoc) {
+ return handle(entry.finallyLoc);
+ }
+
+ } else {
+ throw new Error("try statement without catch or finally");
+ }
+ }
+ }
+ },
+
+ abrupt: function(type, arg) {
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ if (entry.tryLoc <= this.prev &&
+ hasOwn.call(entry, "finallyLoc") &&
+ this.prev < entry.finallyLoc) {
+ var finallyEntry = entry;
+ break;
+ }
+ }
+
+ if (finallyEntry &&
+ (type === "break" ||
+ type === "continue") &&
+ finallyEntry.tryLoc <= arg &&
+ arg <= finallyEntry.finallyLoc) {
+ // Ignore the finally entry if control is not jumping to a
+ // location outside the try/catch block.
+ finallyEntry = null;
+ }
+
+ var record = finallyEntry ? finallyEntry.completion : {};
+ record.type = type;
+ record.arg = arg;
+
+ if (finallyEntry) {
+ this.next = finallyEntry.finallyLoc;
+ } else {
+ this.complete(record);
+ }
+
+ return ContinueSentinel;
+ },
+
+ complete: function(record, afterLoc) {
+ if (record.type === "throw") {
+ throw record.arg;
+ }
+
+ if (record.type === "break" ||
+ record.type === "continue") {
+ this.next = record.arg;
+ } else if (record.type === "return") {
+ this.rval = record.arg;
+ this.next = "end";
+ } else if (record.type === "normal" && afterLoc) {
+ this.next = afterLoc;
+ }
+ },
+
+ finish: function(finallyLoc) {
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ if (entry.finallyLoc === finallyLoc) {
+ this.complete(entry.completion, entry.afterLoc);
+ resetTryEntry(entry);
+ return ContinueSentinel;
+ }
+ }
+ },
+
+ "catch": function(tryLoc) {
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ if (entry.tryLoc === tryLoc) {
+ var record = entry.completion;
+ if (record.type === "throw") {
+ var thrown = record.arg;
+ resetTryEntry(entry);
+ }
+ return thrown;
+ }
+ }
+
+ // The context.catch method must only be called with a location
+ // argument that corresponds to a known catch block.
+ throw new Error("illegal catch attempt");
+ },
+
+ delegateYield: function(iterable, resultName, nextLoc) {
+ this.delegate = {
+ iterator: values(iterable),
+ resultName: resultName,
+ nextLoc: nextLoc
+ };
+
+ return ContinueSentinel;
+ }
+ };
+ })(
+ // Among the various tricks for obtaining a reference to the global
+ // object, this seems to be the most reliable technique that does not
+ // use indirect eval (which violates Content Security Policy).
+ typeof global === "object" ? global :
+ typeof window === "object" ? window :
+ typeof self === "object" ? self : this
+ );
+
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(3), __webpack_require__(192)))
+
+/***/ },
+/* 192 */
+/***/ function(module, exports) {
+
+ // shim for using process in browser
+
+ var process = module.exports = {};
+ var queue = [];
+ var draining = false;
+ var currentQueue;
+ var queueIndex = -1;
+
+ function cleanUpNextTick() {
+ draining = false;
+ if (currentQueue.length) {
+ queue = currentQueue.concat(queue);
+ } else {
+ queueIndex = -1;
+ }
+ if (queue.length) {
+ drainQueue();
+ }
+ }
+
+ function drainQueue() {
+ if (draining) {
+ return;
+ }
+ var timeout = setTimeout(cleanUpNextTick);
+ draining = true;
+
+ var len = queue.length;
+ while(len) {
+ currentQueue = queue;
+ queue = [];
+ while (++queueIndex < len) {
+ if (currentQueue) {
+ currentQueue[queueIndex].run();
+ }
+ }
+ queueIndex = -1;
+ len = queue.length;
+ }
+ currentQueue = null;
+ draining = false;
+ clearTimeout(timeout);
+ }
+
+ process.nextTick = function (fun) {
+ var args = new Array(arguments.length - 1);
+ if (arguments.length > 1) {
+ for (var i = 1; i < arguments.length; i++) {
+ args[i - 1] = arguments[i];
+ }
+ }
+ queue.push(new Item(fun, args));
+ if (queue.length === 1 && !draining) {
+ setTimeout(drainQueue, 0);
+ }
+ };
+
+ // v8 likes predictible objects
+ function Item(fun, array) {
+ this.fun = fun;
+ this.array = array;
+ }
+ Item.prototype.run = function () {
+ this.fun.apply(null, this.array);
+ };
+ process.title = 'browser';
+ process.browser = true;
+ process.env = {};
+ process.argv = [];
+ process.version = ''; // empty string to avoid regexp issues
+ process.versions = {};
+
+ function noop() {}
+
+ process.on = noop;
+ process.addListener = noop;
+ process.once = noop;
+ process.off = noop;
+ process.removeListener = noop;
+ process.removeAllListeners = noop;
+ process.emit = noop;
+
+ process.binding = function (name) {
+ throw new Error('process.binding is not supported');
+ };
+
+ process.cwd = function () { return '/' };
+ process.chdir = function (dir) {
+ throw new Error('process.chdir is not supported');
+ };
+ process.umask = function() { return 0; };
+
+
+/***/ },
+/* 193 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.parseStatus = parseStatus;
+ exports.parseJSON = parseJSON;
+ exports.userFeedback = userFeedback;
+ exports.userFeedbackError = userFeedbackError;
+
+ var _toastr = __webpack_require__(194);
+
+ var _toastr2 = _interopRequireDefault(_toastr);
+
+ var _gravConfig = __webpack_require__(198);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ var error = function error(response) {
+ var error = new Error(response.statusText || response || '');
+ error.response = response;
+
+ return error;
+ };
+
+ function parseStatus(response) {
+ if (response.status >= 200 && response.status < 300) {
+ return response;
+ } else {
+ throw error(response);
+ }
+ }
+
+ function parseJSON(response) {
+ return response.json();
+ }
+
+ function userFeedback(response) {
+ var status = response.status;
+ var message = response.message || null;
+ var settings = response.toastr || null;
+ var backup = undefined;
+
+ switch (status) {
+ case 'unauthenticated':
+ document.location.href = _gravConfig.config.base_url_relative;
+ throw error('Logged out');
+ case 'unauthorized':
+ status = 'error';
+ message = message || 'Unauthorized.';
+ break;
+ case 'error':
+ status = 'error';
+ message = message || 'Unknown error.';
+ break;
+ case 'success':
+ status = 'success';
+ message = message || '';
+ break;
+ default:
+ status = 'error';
+ message = message || 'Invalid AJAX response.';
+ break;
+ }
+
+ if (settings) {
+ backup = Object.assign({}, _toastr2.default.options);
+ Object.keys(settings).forEach(function (key) {
+ return _toastr2.default.options[key] = settings[key];
+ });
+ }
+
+ if (message) {
+ _toastr2.default[status === 'success' ? 'success' : 'error'](message);
+ }
+
+ if (settings) {
+ _toastr2.default.options = backup;
+ }
+
+ return response;
+ }
+
+ function userFeedbackError(error) {
+ _toastr2.default.error('Fetch Failed:
' + error.message + '
' + error.stack + '');
+ console.error(error.message + ' at ' + error.stack);
+ }
+
+/***/ },
+/* 194 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _toastr = __webpack_require__(195);
+
+ var _toastr2 = _interopRequireDefault(_toastr);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ _toastr2.default.options.positionClass = 'toast-top-right';
+ _toastr2.default.options.preventDuplicates = true;
+
+ exports.default = _toastr2.default;
+
+/***/ },
+/* 195 */,
+/* 196 */,
+/* 197 */,
+/* 198 */
+/***/ function(module, exports) {
+
+ module.exports = GravAdmin;
+
+/***/ },
+/* 199 */
+/***/ function(module, exports) {
+
+ // Copyright Joyent, Inc. and other Node contributors.
+ //
+ // Permission is hereby granted, free of charge, to any person obtaining a
+ // copy of this software and associated documentation files (the
+ // "Software"), to deal in the Software without restriction, including
+ // without limitation the rights to use, copy, modify, merge, publish,
+ // distribute, sublicense, and/or sell copies of the Software, and to permit
+ // persons to whom the Software is furnished to do so, subject to the
+ // following conditions:
+ //
+ // The above copyright notice and this permission notice shall be included
+ // in all copies or substantial portions of the Software.
+ //
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+ // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ function EventEmitter() {
+ this._events = this._events || {};
+ this._maxListeners = this._maxListeners || undefined;
+ }
+ module.exports = EventEmitter;
+
+ // Backwards-compat with node 0.10.x
+ EventEmitter.EventEmitter = EventEmitter;
+
+ EventEmitter.prototype._events = undefined;
+ EventEmitter.prototype._maxListeners = undefined;
+
+ // By default EventEmitters will print a warning if more than 10 listeners are
+ // added to it. This is a useful default which helps finding memory leaks.
+ EventEmitter.defaultMaxListeners = 10;
+
+ // Obviously not all Emitters should be limited to 10. This function allows
+ // that to be increased. Set to zero for unlimited.
+ EventEmitter.prototype.setMaxListeners = function(n) {
+ if (!isNumber(n) || n < 0 || isNaN(n))
+ throw TypeError('n must be a positive number');
+ this._maxListeners = n;
+ return this;
+ };
+
+ EventEmitter.prototype.emit = function(type) {
+ var er, handler, len, args, i, listeners;
+
+ if (!this._events)
+ this._events = {};
+
+ // If there is no 'error' event listener then throw.
+ if (type === 'error') {
+ if (!this._events.error ||
+ (isObject(this._events.error) && !this._events.error.length)) {
+ er = arguments[1];
+ if (er instanceof Error) {
+ throw er; // Unhandled 'error' event
+ }
+ throw TypeError('Uncaught, unspecified "error" event.');
+ }
+ }
+
+ handler = this._events[type];
+
+ if (isUndefined(handler))
+ return false;
+
+ if (isFunction(handler)) {
+ switch (arguments.length) {
+ // fast cases
+ case 1:
+ handler.call(this);
+ break;
+ case 2:
+ handler.call(this, arguments[1]);
+ break;
+ case 3:
+ handler.call(this, arguments[1], arguments[2]);
+ break;
+ // slower
+ default:
+ args = Array.prototype.slice.call(arguments, 1);
+ handler.apply(this, args);
+ }
+ } else if (isObject(handler)) {
+ args = Array.prototype.slice.call(arguments, 1);
+ listeners = handler.slice();
+ len = listeners.length;
+ for (i = 0; i < len; i++)
+ listeners[i].apply(this, args);
+ }
+
+ return true;
+ };
+
+ EventEmitter.prototype.addListener = function(type, listener) {
+ var m;
+
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ if (!this._events)
+ this._events = {};
+
+ // To avoid recursion in the case that type === "newListener"! Before
+ // adding it to the listeners, first emit "newListener".
+ if (this._events.newListener)
+ this.emit('newListener', type,
+ isFunction(listener.listener) ?
+ listener.listener : listener);
+
+ if (!this._events[type])
+ // Optimize the case of one listener. Don't need the extra array object.
+ this._events[type] = listener;
+ else if (isObject(this._events[type]))
+ // If we've already got an array, just append.
+ this._events[type].push(listener);
+ else
+ // Adding the second element, need to change to array.
+ this._events[type] = [this._events[type], listener];
+
+ // Check for listener leak
+ if (isObject(this._events[type]) && !this._events[type].warned) {
+ if (!isUndefined(this._maxListeners)) {
+ m = this._maxListeners;
+ } else {
+ m = EventEmitter.defaultMaxListeners;
+ }
+
+ if (m && m > 0 && this._events[type].length > m) {
+ this._events[type].warned = true;
+ console.error('(node) warning: possible EventEmitter memory ' +
+ 'leak detected. %d listeners added. ' +
+ 'Use emitter.setMaxListeners() to increase limit.',
+ this._events[type].length);
+ if (typeof console.trace === 'function') {
+ // not supported in IE 10
+ console.trace();
+ }
+ }
+ }
+
+ return this;
+ };
+
+ EventEmitter.prototype.on = EventEmitter.prototype.addListener;
+
+ EventEmitter.prototype.once = function(type, listener) {
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ var fired = false;
+
+ function g() {
+ this.removeListener(type, g);
+
+ if (!fired) {
+ fired = true;
+ listener.apply(this, arguments);
+ }
+ }
+
+ g.listener = listener;
+ this.on(type, g);
+
+ return this;
+ };
+
+ // emits a 'removeListener' event iff the listener was removed
+ EventEmitter.prototype.removeListener = function(type, listener) {
+ var list, position, length, i;
+
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ if (!this._events || !this._events[type])
+ return this;
+
+ list = this._events[type];
+ length = list.length;
+ position = -1;
+
+ if (list === listener ||
+ (isFunction(list.listener) && list.listener === listener)) {
+ delete this._events[type];
+ if (this._events.removeListener)
+ this.emit('removeListener', type, listener);
+
+ } else if (isObject(list)) {
+ for (i = length; i-- > 0;) {
+ if (list[i] === listener ||
+ (list[i].listener && list[i].listener === listener)) {
+ position = i;
+ break;
+ }
+ }
+
+ if (position < 0)
+ return this;
+
+ if (list.length === 1) {
+ list.length = 0;
+ delete this._events[type];
+ } else {
+ list.splice(position, 1);
+ }
+
+ if (this._events.removeListener)
+ this.emit('removeListener', type, listener);
+ }
+
+ return this;
+ };
+
+ EventEmitter.prototype.removeAllListeners = function(type) {
+ var key, listeners;
+
+ if (!this._events)
+ return this;
+
+ // not listening for removeListener, no need to emit
+ if (!this._events.removeListener) {
+ if (arguments.length === 0)
+ this._events = {};
+ else if (this._events[type])
+ delete this._events[type];
+ return this;
+ }
+
+ // emit removeListener for all listeners on all events
+ if (arguments.length === 0) {
+ for (key in this._events) {
+ if (key === 'removeListener') continue;
+ this.removeAllListeners(key);
+ }
+ this.removeAllListeners('removeListener');
+ this._events = {};
+ return this;
+ }
+
+ listeners = this._events[type];
+
+ if (isFunction(listeners)) {
+ this.removeListener(type, listeners);
+ } else if (listeners) {
+ // LIFO order
+ while (listeners.length)
+ this.removeListener(type, listeners[listeners.length - 1]);
+ }
+ delete this._events[type];
+
+ return this;
+ };
+
+ EventEmitter.prototype.listeners = function(type) {
+ var ret;
+ if (!this._events || !this._events[type])
+ ret = [];
+ else if (isFunction(this._events[type]))
+ ret = [this._events[type]];
+ else
+ ret = this._events[type].slice();
+ return ret;
+ };
+
+ EventEmitter.prototype.listenerCount = function(type) {
+ if (this._events) {
+ var evlistener = this._events[type];
+
+ if (isFunction(evlistener))
+ return 1;
+ else if (evlistener)
+ return evlistener.length;
+ }
+ return 0;
+ };
+
+ EventEmitter.listenerCount = function(emitter, type) {
+ return emitter.listenerCount(type);
+ };
+
+ function isFunction(arg) {
+ return typeof arg === 'function';
+ }
+
+ function isNumber(arg) {
+ return typeof arg === 'number';
+ }
+
+ function isObject(arg) {
+ return typeof arg === 'object' && arg !== null;
+ }
+
+ function isUndefined(arg) {
+ return arg === void 0;
+ }
+
+
+/***/ },
+/* 200 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(fetch) {'use strict';
+
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _gravConfig = __webpack_require__(198);
+
+ var _response = __webpack_require__(193);
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ var KeepAlive = function () {
+ function KeepAlive() {
+ _classCallCheck(this, KeepAlive);
+
+ this.active = false;
+ }
+
+ _createClass(KeepAlive, [{
+ key: 'start',
+ value: function start() {
+ var _this = this;
+
+ var timeout = _gravConfig.config.admin_timeout / 1.5 * 1000;
+ this.timer = setInterval(function () {
+ return _this.fetch();
+ }, timeout);
+ this.active = true;
+ }
+ }, {
+ key: 'stop',
+ value: function stop() {
+ clearInterval(this.timer);
+ this.active = false;
+ }
+ }, {
+ key: 'fetch',
+ value: function (_fetch) {
+ function fetch() {
+ return _fetch.apply(this, arguments);
+ }
+
+ fetch.toString = function () {
+ return _fetch.toString();
+ };
+
+ return fetch;
+ }(function () {
+ var data = new FormData();
+ data.append('admin-nonce', _gravConfig.config.admin_nonce);
+
+ fetch(_gravConfig.config.base_url_relative + '/task' + _gravConfig.config.param_sep + 'keepAlive', {
+ credentials: 'same-origin',
+ method: 'post',
+ body: data
+ }).catch(_response.userFeedbackError);
+ })
+ }]);
+
+ return KeepAlive;
+ }();
+
+ exports.default = new KeepAlive();
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
+
+/***/ },
+/* 201 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.Instance = undefined;
+
+ var _jquery = __webpack_require__(196);
+
+ var _jquery2 = _interopRequireDefault(_jquery);
+
+ var _gravConfig = __webpack_require__(198);
+
+ var _formatbytes = __webpack_require__(202);
+
+ var _formatbytes2 = _interopRequireDefault(_formatbytes);
+
+ var _gpm = __webpack_require__(1);
+
+ __webpack_require__(203);
+
+ __webpack_require__(204);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ var Updates = function () {
+ function Updates() {
+ var payload = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
+
+ _classCallCheck(this, Updates);
+
+ this.setPayload(payload);
+ this.task = 'task' + _gravConfig.config.param_sep;
+ }
+
+ _createClass(Updates, [{
+ key: 'setPayload',
+ value: function setPayload() {
+ var payload = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
+
+ this.payload = payload;
+
+ return this;
+ }
+ }, {
+ key: 'fetch',
+ value: function fetch() {
+ var _this = this;
+
+ var force = arguments.length <= 0 || arguments[0] === undefined ? false : arguments[0];
+
+ _gpm.Instance.fetch(function (response) {
+ return _this.setPayload(response);
+ }, force);
+
+ return this;
+ }
+ }, {
+ key: 'maintenance',
+ value: function maintenance() {
+ var mode = arguments.length <= 0 || arguments[0] === undefined ? 'hide' : arguments[0];
+
+ var element = (0, _jquery2.default)('#updates [data-maintenance-update]');
+
+ element[mode === 'show' ? 'fadeIn' : 'fadeOut']();
+
+ if (mode === 'hide') {
+ (0, _jquery2.default)('.badges.with-updates').removeClass('with-updates').find('.badge.updates').remove();
+ }
+
+ return this;
+ }
+ }, {
+ key: 'grav',
+ value: function grav() {
+ var payload = this.payload.grav;
+
+ if (payload.isUpdatable) {
+ var task = this.task;
+ var bar = '\n
\n Grav
v' + payload.available + ' ' + _gravConfig.translations.PLUGIN_ADMIN.IS_NOW_AVAILABLE + '!
(' + _gravConfig.translations.PLUGIN_ADMIN.CURRENT + 'v' + payload.version + ') \n ';
+
+ if (!payload.isSymlink) {
+ bar += '
' + _gravConfig.translations.PLUGIN_ADMIN.UPDATE_GRAV_NOW + ' ';
+ } else {
+ bar += '
';
+ }
+
+ (0, _jquery2.default)('[data-gpm-grav]').addClass('grav').html('
' + bar + '
');
+ }
+
+ (0, _jquery2.default)('#grav-update-button').on('click', function () {
+ (0, _jquery2.default)(this).html(_gravConfig.translations.PLUGIN_ADMIN.UPDATING_PLEASE_WAIT + ' ' + (0, _formatbytes2.default)(payload.assets['grav-update'].size) + '..');
+ });
+
+ return this;
+ }
+ }, {
+ key: 'resources',
+ value: function resources() {
+ if (!this.payload.resources.total) {
+ return this.maintenance('hide');
+ }
+
+ var map = ['plugins', 'themes'];
+ var singles = ['plugin', 'theme'];
+ var task = this.task;
+ var _payload$resources = this.payload.resources;
+ var plugins = _payload$resources.plugins;
+ var themes = _payload$resources.themes;
+
+ if (!this.payload.resources.total) {
+ return this;
+ }
+
+ [plugins, themes].forEach(function (resources, index) {
+ if (!resources || Array.isArray(resources)) {
+ return;
+ }
+ var length = Object.keys(resources).length;
+ var type = map[index];
+
+ // sidebar
+ (0, _jquery2.default)('#admin-menu a[href$="/' + map[index] + '"]').find('.badges').addClass('with-updates').find('.badge.updates').text(length);
+
+ // update all
+ var title = type.charAt(0).toUpperCase() + type.substr(1).toLowerCase();
+ var updateAll = (0, _jquery2.default)('.grav-update.' + type);
+ updateAll.html('\n
\n \n ' + length + ' ' + _gravConfig.translations.PLUGIN_ADMIN.OF_YOUR + ' ' + type + ' ' + _gravConfig.translations.PLUGIN_ADMIN.HAVE_AN_UPDATE_AVAILABLE + '\n ' + _gravConfig.translations.PLUGIN_ADMIN.UPDATE + ' All ' + title + ' \n
\n ');
+
+ Object.keys(resources).forEach(function (item) {
+ // listing page
+ var element = (0, _jquery2.default)('[data-gpm-' + singles[index] + '="' + item + '"] .gpm-name');
+ var url = element.find('a');
+
+ if (type === 'plugins' && !element.find('.badge.update').length) {
+ element.append('
' + _gravConfig.translations.PLUGIN_ADMIN.UPDATE_AVAILABLE + '! ');
+ } else if (type === 'themes') {
+ element.append('
');
+ }
+
+ // details page
+ var details = (0, _jquery2.default)('.grav-update.' + singles[index]);
+ if (details.length) {
+ details.html('\n
\n \n v' + resources[item].available + ' ' + _gravConfig.translations.PLUGIN_ADMIN.OF_THIS + ' ' + singles[index] + ' ' + _gravConfig.translations.PLUGIN_ADMIN.IS_NOW_AVAILABLE + '!\n ' + _gravConfig.translations.PLUGIN_ADMIN.UPDATE + ' ' + (singles[index].charAt(0).toUpperCase() + singles[index].substr(1).toLowerCase()) + ' \n
\n ');
+ }
+ });
+ });
+ }
+ }]);
+
+ return Updates;
+ }();
+
+ exports.default = Updates;
+
+ var Instance = new Updates();
+ exports.Instance = Instance;
+
+ // automatically refresh UI for updates (graph, sidebar, plugin/themes pages) after every fetch
+
+ _gpm.Instance.on('fetched', function (response, raw) {
+ Instance.setPayload(response.payload || {});
+ Instance.grav().resources();
+ });
+
+ if (_gravConfig.config.enable_auto_updates_check === '1') {
+ _gpm.Instance.fetch();
+ }
+
+/***/ },
+/* 202 */
+/***/ function(module, exports) {
+
+ 'use strict';
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.default = formatBytes;
+ var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
+
+ function formatBytes(bytes, decimals) {
+ if (bytes === 0) return '0 Byte';
+
+ var k = 1000;
+ var value = Math.floor(Math.log(bytes) / Math.log(k));
+ var decimal = decimals + 1 || 3;
+
+ return (bytes / Math.pow(k, value)).toPrecision(decimal) + ' ' + sizes[value];
+ }
+
+/***/ },
+/* 203 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var _jquery = __webpack_require__(196);
+
+ var _jquery2 = _interopRequireDefault(_jquery);
+
+ var _gpm = __webpack_require__(1);
+
+ var _gravConfig = __webpack_require__(198);
+
+ var _toastr = __webpack_require__(194);
+
+ var _toastr2 = _interopRequireDefault(_toastr);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ // Check for updates trigger
+ (0, _jquery2.default)('[data-gpm-checkupdates]').on('click', function () {
+ var element = (0, _jquery2.default)(this);
+ element.find('i').addClass('fa-spin');
+
+ _gpm.Instance.fetch(function (response) {
+ element.find('i').removeClass('fa-spin');
+ var payload = response.payload;
+
+ if (!payload) {
+ return;
+ }
+ if (!payload.grav.isUpdatable && !payload.resources.total) {
+ _toastr2.default.success(_gravConfig.translations.PLUGIN_ADMIN.EVERYTHING_UP_TO_DATE);
+ } else {
+ var grav = payload.grav.isUpdatable ? 'Grav v' + payload.grav.available : '';
+ var resources = payload.resources.total ? payload.resources.total + ' ' + _gravConfig.translations.PLUGIN_ADMIN.UPDATES_ARE_AVAILABLE : '';
+
+ if (!resources) {
+ grav += ' ' + _gravConfig.translations.PLUGIN_ADMIN.IS_AVAILABLE_FOR_UPDATE;
+ }
+ _toastr2.default.info(grav + (grav && resources ? ' ' + _gravConfig.translations.PLUGIN_ADMIN.AND + ' ' : '') + resources);
+ }
+ }, true);
+ });
+
+/***/ },
+/* 204 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var _jquery = __webpack_require__(196);
+
+ var _jquery2 = _interopRequireDefault(_jquery);
+
+ var _request = __webpack_require__(205);
+
+ var _request2 = _interopRequireDefault(_request);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ // Dashboard update and Grav update
+ (0, _jquery2.default)('body').on('click', '[data-maintenance-update]', function () {
+ var element = (0, _jquery2.default)(this);
+ var url = element.data('maintenanceUpdate');
+
+ element.attr('disabled', 'disabled').find('> .fa').removeClass('fa-cloud-download').addClass('fa-refresh fa-spin');
+
+ (0, _request2.default)(url, function (response) {
+ if (response.type === 'updategrav') {
+ (0, _jquery2.default)('[data-gpm-grav]').remove();
+ (0, _jquery2.default)('#footer .grav-version').html(response.version);
+ }
+
+ element.removeAttr('disabled').find('> .fa').removeClass('fa-refresh fa-spin').addClass('fa-cloud-download');
+ });
+ });
+
+/***/ },
+/* 205 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(fetch) {'use strict';
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _response = __webpack_require__(193);
+
+ var _gravConfig = __webpack_require__(198);
+
+ var raw = undefined;
+ var request = function request(url) {
+ var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
+ var callback = arguments.length <= 2 || arguments[2] === undefined ? function () {
+ return true;
+ } : arguments[2];
+
+ if (typeof options === 'function') {
+ callback = options;
+ options = {};
+ }
+
+ if (options.method && options.method === 'post' && options.body) {
+ (function () {
+ var data = new FormData();
+
+ options.body = Object.assign({ 'admin-nonce': _gravConfig.config.admin_nonce }, options.body);
+ Object.keys(options.body).map(function (key) {
+ return data.append(key, options.body[key]);
+ });
+ options.body = data;
+ })();
+ }
+
+ options = Object.assign({
+ credentials: 'same-origin',
+ headers: {
+ 'Accept': 'application/json'
+ }
+ }, options);
+
+ return fetch(url, options).then(function (response) {
+ raw = response;
+ return response;
+ }).then(_response.parseStatus).then(_response.parseJSON).then(_response.userFeedback).then(function (response) {
+ return callback(response, raw);
+ }).catch(_response.userFeedbackError);
+ };
+
+ exports.default = request;
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
+
+/***/ },
+/* 206 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _chart = __webpack_require__(207);
+
+ var _chart2 = _interopRequireDefault(_chart);
+
+ var _cache = __webpack_require__(209);
+
+ __webpack_require__(210);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ exports.default = {
+ Chart: {
+ Chart: _chart2.default,
+ UpdatesChart: _chart.UpdatesChart,
+ Instances: _chart.Instances
+ },
+ Cache: _cache.Instance
+ };
+
+/***/ },
+/* 207 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
+
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.Instances = exports.UpdatesChart = exports.defaults = undefined;
+
+ var _jquery = __webpack_require__(196);
+
+ var _jquery2 = _interopRequireDefault(_jquery);
+
+ var _chartist = __webpack_require__(208);
+
+ var _chartist2 = _interopRequireDefault(_chartist);
+
+ var _gravConfig = __webpack_require__(198);
+
+ var _gpm = __webpack_require__(1);
+
+ var _updates = __webpack_require__(201);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
+
+ var defaults = exports.defaults = {
+ data: {
+ series: [100, 0]
+ },
+ options: {
+ Pie: {
+ donut: true,
+ donutWidth: 10,
+ startAngle: 0,
+ total: 100,
+ showLabel: false,
+ height: 150,
+ chartPadding: !isFirefox ? 10 : 25
+ },
+ Bar: {
+ height: 164,
+ chartPadding: !isFirefox ? 5 : 25,
+
+ axisX: {
+ showGrid: false,
+ labelOffset: {
+ x: 0,
+ y: 5
+ }
+ },
+ axisY: {
+ offset: 15,
+ showLabel: true,
+ showGrid: true,
+ labelOffset: {
+ x: 5,
+ y: 5
+ },
+ scaleMinSpace: 20
+ }
+ }
+ }
+ };
+
+ var Chart = function () {
+ function Chart(element) {
+ var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
+ var data = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
+
+ _classCallCheck(this, Chart);
+
+ this.element = (0, _jquery2.default)(element) || [];
+ if (!this.element[0]) {
+ return;
+ }
+
+ var type = (this.element.data('chart-type') || 'pie').toLowerCase();
+ this.type = type.charAt(0).toUpperCase() + type.substr(1).toLowerCase();
+
+ options = Object.assign({}, defaults.options[this.type], options);
+ data = Object.assign({}, defaults.data, data);
+ Object.assign(this, {
+ options: options,
+ data: data
+ });
+ this.chart = _chartist2.default[this.type](this.element.find('.ct-chart')[0], this.data, this.options);
+ }
+
+ _createClass(Chart, [{
+ key: 'updateData',
+ value: function updateData(data) {
+ Object.assign(this.data, data);
+ this.chart.update(this.data);
+ }
+ }]);
+
+ return Chart;
+ }();
+
+ exports.default = Chart;
+ ;
+
+ var UpdatesChart = exports.UpdatesChart = function (_Chart) {
+ _inherits(UpdatesChart, _Chart);
+
+ function UpdatesChart(element) {
+ var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
+ var data = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
+
+ _classCallCheck(this, UpdatesChart);
+
+ var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(UpdatesChart).call(this, element, options, data));
+
+ _this.chart.on('draw', function (data) {
+ return _this.draw(data);
+ });
+
+ _gpm.Instance.on('fetched', function (response) {
+ var payload = response.payload.grav;
+ var missing = (response.payload.resources.total + (payload.isUpdatable ? 1 : 0)) * 100 / (response.payload.installed + (payload.isUpdatable ? 1 : 0));
+ var updated = 100 - missing;
+
+ _this.updateData({ series: [updated, missing] });
+
+ if (response.payload.resources.total) {
+ _updates.Instance.maintenance('show');
+ }
+ });
+ return _this;
+ }
+
+ _createClass(UpdatesChart, [{
+ key: 'draw',
+ value: function draw(data) {
+ if (data.index) {
+ return;
+ }
+
+ var notice = _gravConfig.translations.PLUGIN_ADMIN[data.value === 100 ? 'FULLY_UPDATED' : 'UPDATES_AVAILABLE'];
+ this.element.find('.numeric span').text(Math.round(data.value) + '%');
+ this.element.find('.js__updates-available-description').html(notice);
+ this.element.find('.hidden').removeClass('hidden');
+ }
+ }, {
+ key: 'updateData',
+ value: function updateData(data) {
+ _get(Object.getPrototypeOf(UpdatesChart.prototype), 'updateData', this).call(this, data);
+
+ // missing updates
+ if (this.data.series[0] < 100) {
+ this.element.closest('#updates').find('[data-maintenance-update]').fadeIn();
+ }
+ }
+ }]);
+
+ return UpdatesChart;
+ }(Chart);
+
+ var charts = {};
+
+ (0, _jquery2.default)('[data-chart-name]').each(function () {
+ var element = (0, _jquery2.default)(this);
+ var name = element.data('chart-name') || '';
+ var options = element.data('chart-options') || {};
+ var data = element.data('chart-data') || {};
+
+ if (name === 'updates') {
+ charts[name] = new UpdatesChart(element, options, data);
+ } else {
+ charts[name] = new Chart(element, options, data);
+ }
+ });
+
+ var Instances = exports.Instances = charts;
+
+/***/ },
+/* 208 */,
+/* 209 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.Instance = undefined;
+
+ var _jquery = __webpack_require__(196);
+
+ var _jquery2 = _interopRequireDefault(_jquery);
+
+ var _gravConfig = __webpack_require__(198);
+
+ var _request = __webpack_require__(205);
+
+ var _request2 = _interopRequireDefault(_request);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ var getUrl = function getUrl() {
+ var type = arguments.length <= 0 || arguments[0] === undefined ? '' : arguments[0];
+
+ if (type) {
+ type = 'cleartype:' + type + '/';
+ }
+
+ return _gravConfig.config.base_url_relative + '/cache.json/task:clearCache/' + type + 'admin-nonce:' + _gravConfig.config.admin_nonce;
+ };
+
+ var Cache = function () {
+ function Cache() {
+ var _this = this;
+
+ _classCallCheck(this, Cache);
+
+ this.element = (0, _jquery2.default)('[data-clear-cache]');
+ (0, _jquery2.default)('body').on('click', '[data-clear-cache]', function (event) {
+ return _this.clear(event, event.target);
+ });
+ }
+
+ _createClass(Cache, [{
+ key: 'clear',
+ value: function clear(event, element) {
+ var _this2 = this;
+
+ var type = '';
+
+ if (event && event.preventDefault) {
+ event.preventDefault();
+ }
+ if (typeof event === 'string') {
+ type = event;
+ }
+
+ element = element ? (0, _jquery2.default)(element) : (0, _jquery2.default)('[data-clear-cache-type="' + type + '"]');
+ type = type || (0, _jquery2.default)(element).data('clear-cache-type') || '';
+ var url = element.data('clearCache') || getUrl(event);
+
+ this.disable();
+
+ (0, _request2.default)(url, function () {
+ return _this2.enable();
+ });
+ }
+ }, {
+ key: 'enable',
+ value: function enable() {
+ this.element.removeAttr('disabled').find('> .fa').removeClass('fa-refresh fa-spin').addClass('fa-trash');
+ }
+ }, {
+ key: 'disable',
+ value: function disable() {
+ this.element.attr('disabled', 'disabled').find('> .fa').removeClass('fa-trash').addClass('fa-refresh fa-spin');
+ }
+ }]);
+
+ return Cache;
+ }();
+
+ exports.default = Cache;
+
+ var Instance = new Cache();
+
+ exports.Instance = Instance;
+
+/***/ },
+/* 210 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var _jquery = __webpack_require__(196);
+
+ var _jquery2 = _interopRequireDefault(_jquery);
+
+ var _gravConfig = __webpack_require__(198);
+
+ var _request = __webpack_require__(205);
+
+ var _request2 = _interopRequireDefault(_request);
+
+ var _chart = __webpack_require__(207);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ (0, _jquery2.default)('[data-ajax*="task:backup"]').on('click', function () {
+ var element = (0, _jquery2.default)(this);
+ var url = element.data('ajax');
+
+ element.attr('disabled', 'disabled').find('> .fa').removeClass('fa-database').addClass('fa-spin fa-refresh');
+
+ (0, _request2.default)(url, function () /* response */{
+ if (_chart.Instances && _chart.Instances.backups) {
+ _chart.Instances.backups.updateData({ series: [0, 100] });
+ _chart.Instances.backups.element.find('.numeric').html('0
' + _gravConfig.translations.PLUGIN_ADMIN.DAYS.toLowerCase() + ' ');
+ }
+
+ element.removeAttr('disabled').find('> .fa').removeClass('fa-spin fa-refresh').addClass('fa-database');
+ });
+ });
+
+/***/ },
+/* 211 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _jquery = __webpack_require__(196);
+
+ var _jquery2 = _interopRequireDefault(_jquery);
+
+ var _sortablejs = __webpack_require__(212);
+
+ var _sortablejs2 = _interopRequireDefault(_sortablejs);
+
+ var _filter = __webpack_require__(213);
+
+ var _filter2 = _interopRequireDefault(_filter);
+
+ __webpack_require__(220);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ // Pages Ordering
+ var Ordering = null;
+ var orderingElement = (0, _jquery2.default)('#ordering');
+ if (orderingElement.length) {
+ Ordering = new _sortablejs2.default(orderingElement.get(0), {
+ filter: '.ignore',
+ onUpdate: function onUpdate(event) {
+ var item = (0, _jquery2.default)(event.item);
+ var index = orderingElement.children().index(item) + 1;
+ (0, _jquery2.default)('[data-order]').val(index);
+ }
+ });
+ }
+
+ exports.default = {
+ Ordering: Ordering,
+ PageFilters: {
+ PageFilters: _filter2.default,
+ Instance: _filter.Instance
+ }
+ };
+
+/***/ },
+/* 212 */,
+/* 213 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
+
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.Instance = undefined;
+
+ var _jquery = __webpack_require__(196);
+
+ var _jquery2 = _interopRequireDefault(_jquery);
+
+ var _gravConfig = __webpack_require__(198);
+
+ var _request = __webpack_require__(205);
+
+ var _request2 = _interopRequireDefault(_request);
+
+ var _debounce = __webpack_require__(214);
+
+ var _debounce2 = _interopRequireDefault(_debounce);
+
+ var _tree = __webpack_require__(216);
+
+ __webpack_require__(217);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ /* @formatter:off */
+ /* eslint-disable */
+ var options = [{ flag: 'Modular', key: 'Modular', cat: 'mode' }, { flag: 'Visible', key: 'Visible', cat: 'mode' }, { flag: 'Routable', key: 'Routable', cat: 'mode' }, { flag: 'Published', key: 'Published', cat: 'mode' }, { flag: 'Non-Modular', key: 'NonModular', cat: 'mode' }, { flag: 'Non-Visible', key: 'NonVisible', cat: 'mode' }, { flag: 'Non-Routable', key: 'NonRoutable', cat: 'mode' }, { flag: 'Non-Published', key: 'NonPublished', cat: 'mode' }];
+ /* @formatter:on */
+ /* eslint-enable */
+
+ var PagesFilter = function () {
+ function PagesFilter(filters, search) {
+ var _this = this;
+
+ _classCallCheck(this, PagesFilter);
+
+ this.filters = (0, _jquery2.default)(filters);
+ this.search = (0, _jquery2.default)(search);
+ this.options = options;
+ this.tree = _tree.Instance;
+
+ if (!this.filters.length || !this.search.length) {
+ return;
+ }
+
+ this.labels = this.filters.data('filter-labels');
+
+ this.search.on('input', (0, _debounce2.default)(function () {
+ return _this.filter();
+ }, 250));
+ this.filters.on('change', function () {
+ return _this.filter();
+ });
+
+ this._initSelectize();
+ }
+
+ _createClass(PagesFilter, [{
+ key: 'filter',
+ value: function filter(value) {
+ var _this2 = this;
+
+ var data = { flags: '', query: '' };
+
+ if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {
+ Object.assign(data, value);
+ }
+ if (typeof value === 'string') {
+ data.query = value;
+ }
+ if (typeof value === 'undefined') {
+ data.flags = this.filters.val();
+ data.query = this.search.val();
+ }
+
+ if (!Object.keys(data).filter(function (key) {
+ return data[key] !== '';
+ }).length) {
+ this.resetValues();
+ return;
+ }
+
+ data.flags = data.flags.replace(/(\s{1,})?,(\s{1,})?/g, ',');
+ this.setValues({ flags: data.flags, query: data.query }, 'silent');
+
+ (0, _request2.default)(_gravConfig.config.base_url_relative + '/pages-filter.json/task' + _gravConfig.config.param_sep + 'filterPages', {
+ method: 'post',
+ body: data
+ }, function (response) {
+ _this2.refreshDOM(response);
+ });
+ }
+ }, {
+ key: 'refreshDOM',
+ value: function refreshDOM(response) {
+ var _this3 = this;
+
+ var items = (0, _jquery2.default)('[data-nav-id]');
+
+ if (!response) {
+ items.removeClass('search-match').show();
+ this.tree.restore();
+
+ return;
+ }
+
+ items.removeClass('search-match').hide();
+
+ response.results.forEach(function (page) {
+ var match = items.filter('[data-nav-id="' + page + '"]').addClass('search-match').show();
+ match.parents('[data-nav-id]').addClass('search-match').show();
+
+ _this3.tree.expand(page, 'no-store');
+ });
+ }
+ }, {
+ key: 'setValues',
+ value: function setValues(_ref, silent) {
+ var _ref$flags = _ref.flags;
+ var flags = _ref$flags === undefined ? '' : _ref$flags;
+ var _ref$query = _ref.query;
+ var query = _ref$query === undefined ? '' : _ref$query;
+
+ var flagsArray = flags.replace(/(\s{1,})?,(\s{1,})?/g, ',').split(',');
+ if (this.filters.val() !== flags) {
+ this.filters[0].selectize.setValue(flagsArray, silent);
+ }
+ if (this.search.val() !== query) {
+ this.search.val(query);
+ }
+ }
+ }, {
+ key: 'resetValues',
+ value: function resetValues() {
+ this.setValues('', 'silent');
+ this.refreshDOM();
+ }
+ }, {
+ key: '_initSelectize',
+ value: function _initSelectize() {
+ var _this4 = this;
+
+ var extras = {
+ type: this.filters.data('filter-types') || {},
+ access: this.filters.data('filter-access-levels') || {}
+ };
+
+ Object.keys(extras).forEach(function (cat) {
+ Object.keys(extras[cat]).forEach(function (key) {
+ _this4.options.push({
+ cat: cat,
+ key: key,
+ flag: extras[cat][key]
+ });
+ });
+ });
+
+ this.filters.selectize({
+ maxItems: null,
+ valueField: 'key',
+ labelField: 'flag',
+ searchField: ['flag', 'key'],
+ options: this.options,
+ optgroups: this.labels,
+ optgroupField: 'cat',
+ optgroupLabelField: 'name',
+ optgroupValueField: 'id',
+ optgroupOrder: this.labels.map(function (item) {
+ return item.id;
+ }),
+ plugins: ['optgroup_columns']
+ });
+ }
+ }]);
+
+ return PagesFilter;
+ }();
+
+ exports.default = PagesFilter;
+
+ var Instance = new PagesFilter('input[name="page-filter"]', 'input[name="page-search"]');
+ exports.Instance = Instance;
+
+/***/ },
+/* 214 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+ /**
+ * Module dependencies.
+ */
+
+ var now = __webpack_require__(215);
+
+ /**
+ * Returns a function, that, as long as it continues to be invoked, will not
+ * be triggered. The function will be called after it stops being called for
+ * N milliseconds. If `immediate` is passed, trigger the function on the
+ * leading edge, instead of the trailing.
+ *
+ * @source underscore.js
+ * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/
+ * @param {Function} function to wrap
+ * @param {Number} timeout in ms (`100`)
+ * @param {Boolean} whether to execute at the beginning (`false`)
+ * @api public
+ */
+
+ module.exports = function debounce(func, wait, immediate){
+ var timeout, args, context, timestamp, result;
+ if (null == wait) wait = 100;
+
+ function later() {
+ var last = now() - timestamp;
+
+ if (last < wait && last > 0) {
+ timeout = setTimeout(later, wait - last);
+ } else {
+ timeout = null;
+ if (!immediate) {
+ result = func.apply(context, args);
+ if (!timeout) context = args = null;
+ }
+ }
+ };
+
+ return function debounced() {
+ context = this;
+ args = arguments;
+ timestamp = now();
+ var callNow = immediate && !timeout;
+ if (!timeout) timeout = setTimeout(later, wait);
+ if (callNow) {
+ result = func.apply(context, args);
+ context = args = null;
+ }
+
+ return result;
+ };
+ };
+
+
+/***/ },
+/* 215 */
+/***/ function(module, exports) {
+
+ module.exports = Date.now || now
+
+ function now() {
+ return new Date().getTime()
+ }
+
+
+/***/ },
+/* 216 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.Instance = undefined;
+
+ var _jquery = __webpack_require__(196);
+
+ var _jquery2 = _interopRequireDefault(_jquery);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ var sessionKey = 'grav:admin:pages';
+
+ if (!sessionStorage.getItem(sessionKey)) {
+ sessionStorage.setItem(sessionKey, '{}');
+ }
+
+ var PagesTree = function () {
+ function PagesTree(elements) {
+ var _this = this;
+
+ _classCallCheck(this, PagesTree);
+
+ this.elements = (0, _jquery2.default)(elements);
+ this.session = JSON.parse(sessionStorage.getItem(sessionKey));
+
+ if (!this.elements.length) {
+ return;
+ }
+
+ this.restore();
+
+ this.elements.find('.page-icon').on('click', function (event) {
+ return _this.toggle(event.target);
+ });
+
+ (0, _jquery2.default)('[data-page-toggleall]').on('click', function (event) {
+ var element = (0, _jquery2.default)(event.target).closest('[data-page-toggleall]');
+ var action = element.data('page-toggleall');
+
+ _this[action]();
+ });
+ }
+
+ _createClass(PagesTree, [{
+ key: 'toggle',
+ value: function toggle(elements) {
+ var _this2 = this;
+
+ var dontStore = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1];
+
+ if (typeof elements === 'string') {
+ elements = (0, _jquery2.default)('[data-nav-id="' + elements + '"]').find('[data-toggle="children"]');
+ }
+
+ elements = (0, _jquery2.default)(elements || this.elements);
+ elements.each(function (index, element) {
+ element = (0, _jquery2.default)(element);
+ var state = _this2.getState(element.closest('[data-toggle="children"]'));
+ _this2[state.isOpen ? 'collapse' : 'expand'](state.id, dontStore);
+ });
+ }
+ }, {
+ key: 'collapse',
+ value: function collapse(elements) {
+ var _this3 = this;
+
+ var dontStore = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1];
+
+ if (typeof elements === 'string') {
+ elements = (0, _jquery2.default)('[data-nav-id="' + elements + '"]').find('[data-toggle="children"]');
+ }
+
+ elements = (0, _jquery2.default)(elements || this.elements);
+ elements.each(function (index, element) {
+ element = (0, _jquery2.default)(element);
+ var state = _this3.getState(element);
+
+ if (state.isOpen) {
+ state.children.hide();
+ state.icon.removeClass('children-open').addClass('children-closed');
+ if (!dontStore) {
+ delete _this3.session[state.id];
+ }
+ }
+ });
+
+ if (!dontStore) {
+ this.save();
+ }
+ }
+ }, {
+ key: 'expand',
+ value: function expand(elements) {
+ var _this4 = this;
+
+ var dontStore = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1];
+
+ if (typeof elements === 'string') {
+ var element = (0, _jquery2.default)('[data-nav-id="' + elements + '"]');
+ var parents = element.parents('[data-nav-id]');
+
+ // loop back through parents, we don't want to expand an hidden child
+ if (parents.length) {
+ parents = parents.find('[data-toggle="children"]:first');
+ parents = parents.add(element.find('[data-toggle="children"]:first'));
+ return this.expand(parents, dontStore);
+ }
+
+ elements = element.find('[data-toggle="children"]:first');
+ }
+
+ elements = (0, _jquery2.default)(elements || this.elements);
+ elements.each(function (index, element) {
+ element = (0, _jquery2.default)(element);
+ var state = _this4.getState(element);
+
+ if (!state.isOpen) {
+ state.children.show();
+ state.icon.removeClass('children-closed').addClass('children-open');
+ if (!dontStore) {
+ _this4.session[state.id] = 1;
+ }
+ }
+ });
+
+ if (!dontStore) {
+ this.save();
+ }
+ }
+ }, {
+ key: 'restore',
+ value: function restore() {
+ var _this5 = this;
+
+ this.collapse(null, true);
+
+ Object.keys(this.session).forEach(function (key) {
+ _this5.expand(key, 'no-store');
+ });
+ }
+ }, {
+ key: 'save',
+ value: function save() {
+ return sessionStorage.setItem(sessionKey, JSON.stringify(this.session));
+ }
+ }, {
+ key: 'getState',
+ value: function getState(element) {
+ element = (0, _jquery2.default)(element);
+
+ return {
+ id: element.closest('[data-nav-id]').data('nav-id'),
+ children: element.closest('li.page-item').find('ul:first'),
+ icon: element.find('.page-icon'),
+ get isOpen() {
+ return this.icon.hasClass('children-open');
+ }
+ };
+ }
+ }]);
+
+ return PagesTree;
+ }();
+
+ exports.default = PagesTree;
+
+ var Instance = new PagesTree('[data-toggle="children"]');
+ exports.Instance = Instance;
+
+/***/ },
+/* 217 */,
+/* 218 */,
+/* 219 */,
+/* 220 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var _jquery = __webpack_require__(196);
+
+ var _jquery2 = _interopRequireDefault(_jquery);
+
+ __webpack_require__(221);
+
+ __webpack_require__(222);
+
+ __webpack_require__(223);
+
+ __webpack_require__(224);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ var switcher = (0, _jquery2.default)('input[type="radio"][name="mode-switch"]');
+
+ if (switcher) {
+ (function () {
+ var link = switcher.closest(':checked').data('leave-url');
+ var fakeLink = (0, _jquery2.default)('
');
+
+ switcher.parent().append(fakeLink);
+
+ switcher.siblings('label').on('mousedown touchdown', function (event) {
+ event.preventDefault();
+
+ // let remodal = $.remodal.lookup[$('[data-remodal-id="changes"]').data('remodal')];
+ var confirm = (0, _jquery2.default)('[data-remodal-id="changes"] [data-leave-action="continue"]');
+
+ confirm.one('click', function () {
+ (0, _jquery2.default)(window).on('beforeunload._grav');
+ fakeLink.off('click._grav');
+
+ (0, _jquery2.default)(event.target).trigger('click');
+ });
+
+ fakeLink.trigger('click._grav');
+ });
+
+ switcher.on('change', function (event) {
+ var radio = (0, _jquery2.default)(event.target);
+ link = radio.data('leave-url');
+
+ setTimeout(function () {
+ return fakeLink.attr('href', link).get(0).click();
+ }, 5);
+ });
+ })();
+ }
+
+/***/ },
+/* 221 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var _jquery = __webpack_require__(196);
+
+ var _jquery2 = _interopRequireDefault(_jquery);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ var custom = false;
+ var folder = (0, _jquery2.default)('input[name="folder"]');
+ var title = (0, _jquery2.default)('input[name="title"]');
+
+ title.on('input focus blur', function () {
+ if (custom) {
+ return true;
+ }
+
+ var slug = _jquery2.default.slugify(title.val());
+ folder.val(slug);
+ });
+
+ folder.on('input', function () {
+ var input = folder.get(0);
+ var value = folder.val();
+ var selection = {
+ start: input.selectionStart,
+ end: input.selectionEnd
+ };
+
+ value = value.toLowerCase().replace(/\s/g, '-').replace(/[^a-z0-9_\-]/g, '');
+ folder.val(value);
+ custom = !!value;
+
+ // restore cursor position
+ input.setSelectionRange(selection.start, selection.end);
+ });
+
+ folder.on('focus blur', function () {
+ return title.trigger('input');
+ });
+
+/***/ },
+/* 222 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var _jquery = __webpack_require__(196);
+
+ var _jquery2 = _interopRequireDefault(_jquery);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ (0, _jquery2.default)('[data-page-move] button[name="task"][value="save"]').on('click', function () {
+ var route = (0, _jquery2.default)('form#blueprints:first select[name="route"]');
+ var moveTo = (0, _jquery2.default)('[data-page-move] select').val();
+
+ if (route.length && route.val() !== moveTo) {
+ var selectize = route.data('selectize');
+ route.val(moveTo);
+
+ if (selectize) selectize.setValue(moveTo);
+ }
+ });
+
+/***/ },
+/* 223 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var _jquery = __webpack_require__(196);
+
+ var _jquery2 = _interopRequireDefault(_jquery);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ (0, _jquery2.default)('[data-remodal-target="delete"]').on('click', function () {
+ var confirm = (0, _jquery2.default)('[data-remodal-id="delete"] [data-delete-action]');
+ var link = (0, _jquery2.default)(this).data('delete-url');
+
+ confirm.data('delete-action', link);
+ });
+
+ (0, _jquery2.default)('[data-delete-action]').on('click', function () {
+ var remodal = _jquery2.default.remodal.lookup[(0, _jquery2.default)('[data-remodal-id="delete"]').data('remodal')];
+
+ window.location.href = (0, _jquery2.default)(this).data('delete-action');
+ remodal.close();
+ });
+
+/***/ },
+/* 224 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.Instance = undefined;
+
+ var _jquery = __webpack_require__(196);
+
+ var _jquery2 = _interopRequireDefault(_jquery);
+
+ var _dropzone = __webpack_require__(225);
+
+ var _dropzone2 = _interopRequireDefault(_dropzone);
+
+ var _request = __webpack_require__(205);
+
+ var _request2 = _interopRequireDefault(_request);
+
+ var _gravConfig = __webpack_require__(198);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ _dropzone2.default.autoDiscover = false;
+ _dropzone2.default.options.gravPageDropzone = {};
+ _dropzone2.default.confirm = function (question, accepted, rejected) {
+ var doc = (0, _jquery2.default)(document);
+ var modalSelector = '[data-remodal-id="delete-media"]';
+
+ var removeEvents = function removeEvents() {
+ doc.off('confirm', modalSelector, accept);
+ doc.off('cancel', modalSelector, reject);
+ };
+
+ var accept = function accept() {
+ accepted && accepted();
+ removeEvents();
+ };
+
+ var reject = function reject() {
+ rejected && rejected();
+ removeEvents();
+ };
+
+ _jquery2.default.remodal.lookup[(0, _jquery2.default)(modalSelector).data('remodal')].open();
+ doc.on('confirmation', modalSelector, accept);
+ doc.on('cancellation', modalSelector, reject);
+ };
+
+ var DropzoneMediaConfig = {
+ createImageThumbnails: { thumbnailWidth: 150 },
+ addRemoveLinks: false,
+ dictRemoveFileConfirmation: '[placeholder]',
+ previewTemplate: '\n
'.trim()
+ };
+
+ var PageMedia = function () {
+ function PageMedia() {
+ var _ref = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
+
+ var _ref$form = _ref.form;
+ var form = _ref$form === undefined ? '[data-media-url]' : _ref$form;
+ var _ref$container = _ref.container;
+ var container = _ref$container === undefined ? '#grav-dropzone' : _ref$container;
+ var _ref$options = _ref.options;
+ var options = _ref$options === undefined ? {} : _ref$options;
+
+ _classCallCheck(this, PageMedia);
+
+ this.form = (0, _jquery2.default)(form);
+ this.container = (0, _jquery2.default)(container);
+ if (!this.form.length || !this.container.length) {
+ return;
+ }
+
+ this.options = Object.assign({}, DropzoneMediaConfig, {
+ url: this.form.data('media-url') + '/task' + _gravConfig.config.param_sep + 'addmedia',
+ acceptedFiles: this.form.data('media-types')
+ }, options);
+
+ this.dropzone = new _dropzone2.default(container, this.options);
+ this.dropzone.on('complete', this.onDropzoneComplete.bind(this));
+ this.dropzone.on('success', this.onDropzoneSuccess.bind(this));
+ this.dropzone.on('removedfile', this.onDropzoneRemovedFile.bind(this));
+ this.dropzone.on('sending', this.onDropzoneSending.bind(this));
+
+ this.fetchMedia();
+ }
+
+ _createClass(PageMedia, [{
+ key: 'fetchMedia',
+ value: function fetchMedia() {
+ var _this = this;
+
+ var url = this.form.data('media-url') + '/task' + _gravConfig.config.param_sep + 'listmedia/admin-nonce' + _gravConfig.config.param_sep + _gravConfig.config.admin_nonce;
+
+ (0, _request2.default)(url, function (response) {
+ var results = response.results;
+
+ Object.keys(results).forEach(function (name) {
+ var data = results[name];
+ var mock = { name: name, size: data.size, accepted: true, extras: data };
+
+ _this.dropzone.files.push(mock);
+ _this.dropzone.options.addedfile.call(_this.dropzone, mock);
+
+ if (name.match(/\.(jpg|jpeg|png|gif)$/i)) {
+ _this.dropzone.options.thumbnail.call(_this.dropzone, mock, data.url);
+ }
+ });
+
+ _this.container.find('.dz-preview').prop('draggable', 'true');
+ });
+ }
+ }, {
+ key: 'onDropzoneSending',
+ value: function onDropzoneSending(file, xhr, formData) {
+ formData.append('admin-nonce', _gravConfig.config.admin_nonce);
+ }
+ }, {
+ key: 'onDropzoneSuccess',
+ value: function onDropzoneSuccess(file, response, xhr) {
+ return this.handleError({
+ file: file,
+ data: response,
+ mode: 'removeFile',
+ msg: '
An error occurred while trying to upload the file ' + file.name + '
\n
' + response.message + ' '
+ });
+ }
+ }, {
+ key: 'onDropzoneComplete',
+ value: function onDropzoneComplete(file) {
+ if (!file.accepted) {
+ var data = {
+ status: 'error',
+ message: 'Unsupported file type: ' + file.name.match(/\..+/).join('')
+ };
+
+ return this.handleError({
+ file: file,
+ data: data,
+ mode: 'removeFile',
+ msg: '
An error occurred while trying to add the file ' + file.name + '
\n
' + data.message + ' '
+ });
+ }
+
+ // accepted
+ (0, _jquery2.default)('.dz-preview').prop('draggable', 'true');
+ }
+ }, {
+ key: 'onDropzoneRemovedFile',
+ value: function onDropzoneRemovedFile(file) {
+ var _this2 = this;
+
+ if (!file.accepted || file.rejected) {
+ return;
+ }
+ var url = this.form.data('media-url') + '/task' + _gravConfig.config.param_sep + 'delmedia';
+
+ (0, _request2.default)(url, {
+ method: 'post',
+ body: {
+ filename: file.name
+ }
+ }, function (response) {
+ return _this2.handleError({
+ file: file,
+ data: response,
+ mode: 'addBack',
+ msg: '
An error occurred while trying to remove the file ' + file.name + '
\n
' + response.message + ' '
+ });
+ });
+ }
+ }, {
+ key: 'handleError',
+ value: function handleError(options) {
+ var file = options.file;
+ var data = options.data;
+ var mode = options.mode;
+ var msg = options.msg;
+
+ if (data.status !== 'error' && data.status !== 'unauthorized') {
+ return;
+ }
+
+ switch (mode) {
+ case 'addBack':
+ if (file instanceof File) {
+ this.dropzone.addFile(file);
+ } else {
+ this.dropzone.files.push(file);
+ this.dropzone.options.addedfile.call(this, file);
+ this.dropzone.options.thumbnail.call(this, file, file.extras.url);
+ }
+
+ break;
+ case 'removeFile':
+ file.rejected = true;
+ this.dropzone.removeFile(file);
+
+ break;
+ default:
+ }
+
+ var modal = (0, _jquery2.default)('[data-remodal-id="generic"]');
+ modal.find('.error-content').html(msg);
+ _jquery2.default.remodal.lookup[modal.data('remodal')].open();
+ }
+ }]);
+
+ return PageMedia;
+ }();
+
+ exports.default = PageMedia;
+ var Instance = exports.Instance = new PageMedia();
+
+ // let container = $('[data-media-url]');
+
+ // if (container.length) {
+ /* let URI = container.data('media-url');
+ let dropzone = new Dropzone('#grav-dropzone', {
+ url: `${URI}/task${config.param_sep}addmedia`,
+ createImageThumbnails: { thumbnailWidth: 150 },
+ addRemoveLinks: false,
+ dictRemoveFileConfirmation: '[placeholder]',
+ acceptedFiles: container.data('media-types'),
+ previewTemplate: `
+
`
+ });*/
+
+ /* $.get(URI + '/task{{ config.system.param_sep }}listmedia/admin-nonce{{ config.system.param_sep }}' + GravAdmin.config.admin_nonce, function(data) {
+ $.proxy(modalError, this, {
+ data: data,
+ msg: '
An error occurred while trying to list files
'+data.message+' '
+ })();
+ if (data.results) {
+ $.each(data.results, function(filename, data){
+ var mockFile = { name: filename, size: data.size, accepted: true, extras: data };
+ thisDropzone.files.push(mockFile);
+ thisDropzone.options.addedfile.call(thisDropzone, mockFile);
+ if (filename.toLowerCase().match(/\.(jpg|jpeg|png|gif)$/)) {
+ thisDropzone.options.thumbnail.call(thisDropzone, mockFile, data.url);
+ }
+ });
+ }
+ $('.dz-preview').prop('draggable', 'true');
+ });*/
+
+ // console.log(dropzone);
+ // }
+
+ /*
+ */
+
+/***/ },
+/* 225 */,
+/* 226 */,
+/* 227 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _state = __webpack_require__(228);
+
+ var _state2 = _interopRequireDefault(_state);
+
+ var _form = __webpack_require__(231);
+
+ var _form2 = _interopRequireDefault(_form);
+
+ var _fields = __webpack_require__(232);
+
+ var _fields2 = _interopRequireDefault(_fields);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ exports.default = {
+ Form: {
+ Form: _form2.default,
+ Instance: _form.Instance
+ },
+ Fields: _fields2.default,
+ FormState: {
+ FormState: _state2.default,
+ Instance: _state.Instance
+ }
+ };
+
+/***/ },
+/* 228 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.DOMBehaviors = exports.Instance = undefined;
+
+ var _jquery = __webpack_require__(196);
+
+ var _jquery2 = _interopRequireDefault(_jquery);
+
+ var _immutable = __webpack_require__(229);
+
+ var _immutable2 = _interopRequireDefault(_immutable);
+
+ __webpack_require__(230);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ var FormLoadState = {};
+
+ var DOMBehaviors = {
+ attach: function attach() {
+ this.preventUnload();
+ this.preventClickAway();
+ },
+ preventUnload: function preventUnload() {
+ if (_jquery2.default._data(window, 'events') && (_jquery2.default._data(window, 'events').beforeunload || []).filter(function (event) {
+ return event.namespace === '_grav';
+ })) {
+ return;
+ }
+
+ // Catch browser uri change / refresh attempt and stop it if the form state is dirty
+ (0, _jquery2.default)(window).on('beforeunload._grav', function () {
+ if (Instance.equals() === false) {
+ return 'You have made changes on this page that you have not yet confirmed. If you navigate away from this page you will lose your unsaved changes.';
+ }
+ });
+ },
+ preventClickAway: function preventClickAway() {
+ var selector = 'a[href]:not([href^=#])';
+
+ if (_jquery2.default._data((0, _jquery2.default)(selector).get(0), 'events') && (_jquery2.default._data((0, _jquery2.default)(selector).get(0), 'events').click || []).filter(function (event) {
+ return event.namespace === '_grav';
+ })) {
+ return;
+ }
+
+ // Prevent clicking away if the form state is dirty
+ // instead, display a confirmation before continuing
+ (0, _jquery2.default)(selector).on('click._grav', function (event) {
+ var isClean = Instance.equals();
+ if (isClean === null || isClean) {
+ return true;
+ }
+
+ event.preventDefault();
+
+ var destination = (0, _jquery2.default)(this).attr('href');
+ var modal = (0, _jquery2.default)('[data-remodal-id="changes"]');
+ var lookup = _jquery2.default.remodal.lookup[modal.data('remodal')];
+ var buttons = (0, _jquery2.default)('a.button', modal);
+
+ var handler = function handler(event) {
+ event.preventDefault();
+ var action = (0, _jquery2.default)(this).data('leave-action');
+
+ buttons.off('click', handler);
+ lookup.close();
+
+ if (action === 'continue') {
+ (0, _jquery2.default)(window).off('beforeunload');
+ window.location.href = destination;
+ }
+ };
+
+ buttons.on('click', handler);
+ lookup.open();
+ });
+ }
+ };
+
+ var FormState = function () {
+ function FormState() {
+ var options = arguments.length <= 0 || arguments[0] === undefined ? {
+ ignore: [],
+ form_id: 'blueprints'
+ } : arguments[0];
+
+ _classCallCheck(this, FormState);
+
+ this.options = options;
+ this.refresh();
+
+ if (!this.form || !this.fields.length) {
+ return;
+ }
+ FormLoadState = this.collect();
+ DOMBehaviors.attach();
+ }
+
+ _createClass(FormState, [{
+ key: 'refresh',
+ value: function refresh() {
+ this.form = (0, _jquery2.default)('form#' + this.options.form_id).filter(':noparents(.remodal)');
+ this.fields = (0, _jquery2.default)('form#' + this.options.form_id + ' *, [form="' + this.options.form_id + '"]').filter(':input:not(.no-form)').filter(':noparents(.remodal)');
+
+ return this;
+ }
+ }, {
+ key: 'collect',
+ value: function collect() {
+ var _this = this;
+
+ if (!this.form || !this.fields.length) {
+ return;
+ }
+
+ var values = {};
+ this.refresh().fields.each(function (index, field) {
+ field = (0, _jquery2.default)(field);
+ var name = field.prop('name');
+ var type = field.prop('type');
+ var value = undefined;
+
+ switch (type) {
+ case 'checkbox':
+ case 'radio':
+ value = field.is(':checked');
+ break;
+ default:
+ value = field.val();
+ }
+
+ if (name && ! ~_this.options.ignore.indexOf(name)) {
+ values[name] = value;
+ }
+ });
+
+ return _immutable2.default.OrderedMap(values);
+ }
+
+ // When the form doesn't exist or there are no fields, `equals` returns `null`
+ // for this reason, _NEVER_ check with !Instance.equals(), use Instance.equals() === false
+
+ }, {
+ key: 'equals',
+ value: function equals() {
+ if (!this.form || !this.fields.length) {
+ return null;
+ }
+ return _immutable2.default.is(FormLoadState, this.collect());
+ }
+ }]);
+
+ return FormState;
+ }();
+
+ exports.default = FormState;
+ ;
+
+ var Instance = exports.Instance = new FormState();
+
+ exports.DOMBehaviors = DOMBehaviors;
+
+/***/ },
+/* 229 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Copyright (c) 2014-2015, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ */
+
+ (function (global, factory) {
+ true ? module.exports = factory() :
+ typeof define === 'function' && define.amd ? define(factory) :
+ global.Immutable = factory();
+ }(this, function () { 'use strict';var SLICE$0 = Array.prototype.slice;
+
+ function createClass(ctor, superClass) {
+ if (superClass) {
+ ctor.prototype = Object.create(superClass.prototype);
+ }
+ ctor.prototype.constructor = ctor;
+ }
+
+ function Iterable(value) {
+ return isIterable(value) ? value : Seq(value);
+ }
+
+
+ createClass(KeyedIterable, Iterable);
+ function KeyedIterable(value) {
+ return isKeyed(value) ? value : KeyedSeq(value);
+ }
+
+
+ createClass(IndexedIterable, Iterable);
+ function IndexedIterable(value) {
+ return isIndexed(value) ? value : IndexedSeq(value);
+ }
+
+
+ createClass(SetIterable, Iterable);
+ function SetIterable(value) {
+ return isIterable(value) && !isAssociative(value) ? value : SetSeq(value);
+ }
+
+
+
+ function isIterable(maybeIterable) {
+ return !!(maybeIterable && maybeIterable[IS_ITERABLE_SENTINEL]);
+ }
+
+ function isKeyed(maybeKeyed) {
+ return !!(maybeKeyed && maybeKeyed[IS_KEYED_SENTINEL]);
+ }
+
+ function isIndexed(maybeIndexed) {
+ return !!(maybeIndexed && maybeIndexed[IS_INDEXED_SENTINEL]);
+ }
+
+ function isAssociative(maybeAssociative) {
+ return isKeyed(maybeAssociative) || isIndexed(maybeAssociative);
+ }
+
+ function isOrdered(maybeOrdered) {
+ return !!(maybeOrdered && maybeOrdered[IS_ORDERED_SENTINEL]);
+ }
+
+ Iterable.isIterable = isIterable;
+ Iterable.isKeyed = isKeyed;
+ Iterable.isIndexed = isIndexed;
+ Iterable.isAssociative = isAssociative;
+ Iterable.isOrdered = isOrdered;
+
+ Iterable.Keyed = KeyedIterable;
+ Iterable.Indexed = IndexedIterable;
+ Iterable.Set = SetIterable;
+
+
+ var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';
+ var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';
+ var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';
+ var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';
+
+ // Used for setting prototype methods that IE8 chokes on.
+ var DELETE = 'delete';
+
+ // Constants describing the size of trie nodes.
+ var SHIFT = 5; // Resulted in best performance after ______?
+ var SIZE = 1 << SHIFT;
+ var MASK = SIZE - 1;
+
+ // A consistent shared value representing "not set" which equals nothing other
+ // than itself, and nothing that could be provided externally.
+ var NOT_SET = {};
+
+ // Boolean references, Rough equivalent of `bool &`.
+ var CHANGE_LENGTH = { value: false };
+ var DID_ALTER = { value: false };
+
+ function MakeRef(ref) {
+ ref.value = false;
+ return ref;
+ }
+
+ function SetRef(ref) {
+ ref && (ref.value = true);
+ }
+
+ // A function which returns a value representing an "owner" for transient writes
+ // to tries. The return value will only ever equal itself, and will not equal
+ // the return of any subsequent call of this function.
+ function OwnerID() {}
+
+ // http://jsperf.com/copy-array-inline
+ function arrCopy(arr, offset) {
+ offset = offset || 0;
+ var len = Math.max(0, arr.length - offset);
+ var newArr = new Array(len);
+ for (var ii = 0; ii < len; ii++) {
+ newArr[ii] = arr[ii + offset];
+ }
+ return newArr;
+ }
+
+ function ensureSize(iter) {
+ if (iter.size === undefined) {
+ iter.size = iter.__iterate(returnTrue);
+ }
+ return iter.size;
+ }
+
+ function wrapIndex(iter, index) {
+ // This implements "is array index" which the ECMAString spec defines as:
+ //
+ // A String property name P is an array index if and only if
+ // ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal
+ // to 2^32−1.
+ //
+ // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects
+ if (typeof index !== 'number') {
+ var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32
+ if ('' + uint32Index !== index || uint32Index === 4294967295) {
+ return NaN;
+ }
+ index = uint32Index;
+ }
+ return index < 0 ? ensureSize(iter) + index : index;
+ }
+
+ function returnTrue() {
+ return true;
+ }
+
+ function wholeSlice(begin, end, size) {
+ return (begin === 0 || (size !== undefined && begin <= -size)) &&
+ (end === undefined || (size !== undefined && end >= size));
+ }
+
+ function resolveBegin(begin, size) {
+ return resolveIndex(begin, size, 0);
+ }
+
+ function resolveEnd(end, size) {
+ return resolveIndex(end, size, size);
+ }
+
+ function resolveIndex(index, size, defaultIndex) {
+ return index === undefined ?
+ defaultIndex :
+ index < 0 ?
+ Math.max(0, size + index) :
+ size === undefined ?
+ index :
+ Math.min(size, index);
+ }
+
+ /* global Symbol */
+
+ var ITERATE_KEYS = 0;
+ var ITERATE_VALUES = 1;
+ var ITERATE_ENTRIES = 2;
+
+ var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
+ var FAUX_ITERATOR_SYMBOL = '@@iterator';
+
+ var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL;
+
+
+ function Iterator(next) {
+ this.next = next;
+ }
+
+ Iterator.prototype.toString = function() {
+ return '[Iterator]';
+ };
+
+
+ Iterator.KEYS = ITERATE_KEYS;
+ Iterator.VALUES = ITERATE_VALUES;
+ Iterator.ENTRIES = ITERATE_ENTRIES;
+
+ Iterator.prototype.inspect =
+ Iterator.prototype.toSource = function () { return this.toString(); }
+ Iterator.prototype[ITERATOR_SYMBOL] = function () {
+ return this;
+ };
+
+
+ function iteratorValue(type, k, v, iteratorResult) {
+ var value = type === 0 ? k : type === 1 ? v : [k, v];
+ iteratorResult ? (iteratorResult.value = value) : (iteratorResult = {
+ value: value, done: false
+ });
+ return iteratorResult;
+ }
+
+ function iteratorDone() {
+ return { value: undefined, done: true };
+ }
+
+ function hasIterator(maybeIterable) {
+ return !!getIteratorFn(maybeIterable);
+ }
+
+ function isIterator(maybeIterator) {
+ return maybeIterator && typeof maybeIterator.next === 'function';
+ }
+
+ function getIterator(iterable) {
+ var iteratorFn = getIteratorFn(iterable);
+ return iteratorFn && iteratorFn.call(iterable);
+ }
+
+ function getIteratorFn(iterable) {
+ var iteratorFn = iterable && (
+ (REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) ||
+ iterable[FAUX_ITERATOR_SYMBOL]
+ );
+ if (typeof iteratorFn === 'function') {
+ return iteratorFn;
+ }
+ }
+
+ function isArrayLike(value) {
+ return value && typeof value.length === 'number';
+ }
+
+ createClass(Seq, Iterable);
+ function Seq(value) {
+ return value === null || value === undefined ? emptySequence() :
+ isIterable(value) ? value.toSeq() : seqFromValue(value);
+ }
+
+ Seq.of = function(/*...values*/) {
+ return Seq(arguments);
+ };
+
+ Seq.prototype.toSeq = function() {
+ return this;
+ };
+
+ Seq.prototype.toString = function() {
+ return this.__toString('Seq {', '}');
+ };
+
+ Seq.prototype.cacheResult = function() {
+ if (!this._cache && this.__iterateUncached) {
+ this._cache = this.entrySeq().toArray();
+ this.size = this._cache.length;
+ }
+ return this;
+ };
+
+ // abstract __iterateUncached(fn, reverse)
+
+ Seq.prototype.__iterate = function(fn, reverse) {
+ return seqIterate(this, fn, reverse, true);
+ };
+
+ // abstract __iteratorUncached(type, reverse)
+
+ Seq.prototype.__iterator = function(type, reverse) {
+ return seqIterator(this, type, reverse, true);
+ };
+
+
+
+ createClass(KeyedSeq, Seq);
+ function KeyedSeq(value) {
+ return value === null || value === undefined ?
+ emptySequence().toKeyedSeq() :
+ isIterable(value) ?
+ (isKeyed(value) ? value.toSeq() : value.fromEntrySeq()) :
+ keyedSeqFromValue(value);
+ }
+
+ KeyedSeq.prototype.toKeyedSeq = function() {
+ return this;
+ };
+
+
+
+ createClass(IndexedSeq, Seq);
+ function IndexedSeq(value) {
+ return value === null || value === undefined ? emptySequence() :
+ !isIterable(value) ? indexedSeqFromValue(value) :
+ isKeyed(value) ? value.entrySeq() : value.toIndexedSeq();
+ }
+
+ IndexedSeq.of = function(/*...values*/) {
+ return IndexedSeq(arguments);
+ };
+
+ IndexedSeq.prototype.toIndexedSeq = function() {
+ return this;
+ };
+
+ IndexedSeq.prototype.toString = function() {
+ return this.__toString('Seq [', ']');
+ };
+
+ IndexedSeq.prototype.__iterate = function(fn, reverse) {
+ return seqIterate(this, fn, reverse, false);
+ };
+
+ IndexedSeq.prototype.__iterator = function(type, reverse) {
+ return seqIterator(this, type, reverse, false);
+ };
+
+
+
+ createClass(SetSeq, Seq);
+ function SetSeq(value) {
+ return (
+ value === null || value === undefined ? emptySequence() :
+ !isIterable(value) ? indexedSeqFromValue(value) :
+ isKeyed(value) ? value.entrySeq() : value
+ ).toSetSeq();
+ }
+
+ SetSeq.of = function(/*...values*/) {
+ return SetSeq(arguments);
+ };
+
+ SetSeq.prototype.toSetSeq = function() {
+ return this;
+ };
+
+
+
+ Seq.isSeq = isSeq;
+ Seq.Keyed = KeyedSeq;
+ Seq.Set = SetSeq;
+ Seq.Indexed = IndexedSeq;
+
+ var IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@';
+
+ Seq.prototype[IS_SEQ_SENTINEL] = true;
+
+
+
+ createClass(ArraySeq, IndexedSeq);
+ function ArraySeq(array) {
+ this._array = array;
+ this.size = array.length;
+ }
+
+ ArraySeq.prototype.get = function(index, notSetValue) {
+ return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue;
+ };
+
+ ArraySeq.prototype.__iterate = function(fn, reverse) {
+ var array = this._array;
+ var maxIndex = array.length - 1;
+ for (var ii = 0; ii <= maxIndex; ii++) {
+ if (fn(array[reverse ? maxIndex - ii : ii], ii, this) === false) {
+ return ii + 1;
+ }
+ }
+ return ii;
+ };
+
+ ArraySeq.prototype.__iterator = function(type, reverse) {
+ var array = this._array;
+ var maxIndex = array.length - 1;
+ var ii = 0;
+ return new Iterator(function()
+ {return ii > maxIndex ?
+ iteratorDone() :
+ iteratorValue(type, ii, array[reverse ? maxIndex - ii++ : ii++])}
+ );
+ };
+
+
+
+ createClass(ObjectSeq, KeyedSeq);
+ function ObjectSeq(object) {
+ var keys = Object.keys(object);
+ this._object = object;
+ this._keys = keys;
+ this.size = keys.length;
+ }
+
+ ObjectSeq.prototype.get = function(key, notSetValue) {
+ if (notSetValue !== undefined && !this.has(key)) {
+ return notSetValue;
+ }
+ return this._object[key];
+ };
+
+ ObjectSeq.prototype.has = function(key) {
+ return this._object.hasOwnProperty(key);
+ };
+
+ ObjectSeq.prototype.__iterate = function(fn, reverse) {
+ var object = this._object;
+ var keys = this._keys;
+ var maxIndex = keys.length - 1;
+ for (var ii = 0; ii <= maxIndex; ii++) {
+ var key = keys[reverse ? maxIndex - ii : ii];
+ if (fn(object[key], key, this) === false) {
+ return ii + 1;
+ }
+ }
+ return ii;
+ };
+
+ ObjectSeq.prototype.__iterator = function(type, reverse) {
+ var object = this._object;
+ var keys = this._keys;
+ var maxIndex = keys.length - 1;
+ var ii = 0;
+ return new Iterator(function() {
+ var key = keys[reverse ? maxIndex - ii : ii];
+ return ii++ > maxIndex ?
+ iteratorDone() :
+ iteratorValue(type, key, object[key]);
+ });
+ };
+
+ ObjectSeq.prototype[IS_ORDERED_SENTINEL] = true;
+
+
+ createClass(IterableSeq, IndexedSeq);
+ function IterableSeq(iterable) {
+ this._iterable = iterable;
+ this.size = iterable.length || iterable.size;
+ }
+
+ IterableSeq.prototype.__iterateUncached = function(fn, reverse) {
+ if (reverse) {
+ return this.cacheResult().__iterate(fn, reverse);
+ }
+ var iterable = this._iterable;
+ var iterator = getIterator(iterable);
+ var iterations = 0;
+ if (isIterator(iterator)) {
+ var step;
+ while (!(step = iterator.next()).done) {
+ if (fn(step.value, iterations++, this) === false) {
+ break;
+ }
+ }
+ }
+ return iterations;
+ };
+
+ IterableSeq.prototype.__iteratorUncached = function(type, reverse) {
+ if (reverse) {
+ return this.cacheResult().__iterator(type, reverse);
+ }
+ var iterable = this._iterable;
+ var iterator = getIterator(iterable);
+ if (!isIterator(iterator)) {
+ return new Iterator(iteratorDone);
+ }
+ var iterations = 0;
+ return new Iterator(function() {
+ var step = iterator.next();
+ return step.done ? step : iteratorValue(type, iterations++, step.value);
+ });
+ };
+
+
+
+ createClass(IteratorSeq, IndexedSeq);
+ function IteratorSeq(iterator) {
+ this._iterator = iterator;
+ this._iteratorCache = [];
+ }
+
+ IteratorSeq.prototype.__iterateUncached = function(fn, reverse) {
+ if (reverse) {
+ return this.cacheResult().__iterate(fn, reverse);
+ }
+ var iterator = this._iterator;
+ var cache = this._iteratorCache;
+ var iterations = 0;
+ while (iterations < cache.length) {
+ if (fn(cache[iterations], iterations++, this) === false) {
+ return iterations;
+ }
+ }
+ var step;
+ while (!(step = iterator.next()).done) {
+ var val = step.value;
+ cache[iterations] = val;
+ if (fn(val, iterations++, this) === false) {
+ break;
+ }
+ }
+ return iterations;
+ };
+
+ IteratorSeq.prototype.__iteratorUncached = function(type, reverse) {
+ if (reverse) {
+ return this.cacheResult().__iterator(type, reverse);
+ }
+ var iterator = this._iterator;
+ var cache = this._iteratorCache;
+ var iterations = 0;
+ return new Iterator(function() {
+ if (iterations >= cache.length) {
+ var step = iterator.next();
+ if (step.done) {
+ return step;
+ }
+ cache[iterations] = step.value;
+ }
+ return iteratorValue(type, iterations, cache[iterations++]);
+ });
+ };
+
+
+
+
+ // # pragma Helper functions
+
+ function isSeq(maybeSeq) {
+ return !!(maybeSeq && maybeSeq[IS_SEQ_SENTINEL]);
+ }
+
+ var EMPTY_SEQ;
+
+ function emptySequence() {
+ return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([]));
+ }
+
+ function keyedSeqFromValue(value) {
+ var seq =
+ Array.isArray(value) ? new ArraySeq(value).fromEntrySeq() :
+ isIterator(value) ? new IteratorSeq(value).fromEntrySeq() :
+ hasIterator(value) ? new IterableSeq(value).fromEntrySeq() :
+ typeof value === 'object' ? new ObjectSeq(value) :
+ undefined;
+ if (!seq) {
+ throw new TypeError(
+ 'Expected Array or iterable object of [k, v] entries, '+
+ 'or keyed object: ' + value
+ );
+ }
+ return seq;
+ }
+
+ function indexedSeqFromValue(value) {
+ var seq = maybeIndexedSeqFromValue(value);
+ if (!seq) {
+ throw new TypeError(
+ 'Expected Array or iterable object of values: ' + value
+ );
+ }
+ return seq;
+ }
+
+ function seqFromValue(value) {
+ var seq = maybeIndexedSeqFromValue(value) ||
+ (typeof value === 'object' && new ObjectSeq(value));
+ if (!seq) {
+ throw new TypeError(
+ 'Expected Array or iterable object of values, or keyed object: ' + value
+ );
+ }
+ return seq;
+ }
+
+ function maybeIndexedSeqFromValue(value) {
+ return (
+ isArrayLike(value) ? new ArraySeq(value) :
+ isIterator(value) ? new IteratorSeq(value) :
+ hasIterator(value) ? new IterableSeq(value) :
+ undefined
+ );
+ }
+
+ function seqIterate(seq, fn, reverse, useKeys) {
+ var cache = seq._cache;
+ if (cache) {
+ var maxIndex = cache.length - 1;
+ for (var ii = 0; ii <= maxIndex; ii++) {
+ var entry = cache[reverse ? maxIndex - ii : ii];
+ if (fn(entry[1], useKeys ? entry[0] : ii, seq) === false) {
+ return ii + 1;
+ }
+ }
+ return ii;
+ }
+ return seq.__iterateUncached(fn, reverse);
+ }
+
+ function seqIterator(seq, type, reverse, useKeys) {
+ var cache = seq._cache;
+ if (cache) {
+ var maxIndex = cache.length - 1;
+ var ii = 0;
+ return new Iterator(function() {
+ var entry = cache[reverse ? maxIndex - ii : ii];
+ return ii++ > maxIndex ?
+ iteratorDone() :
+ iteratorValue(type, useKeys ? entry[0] : ii - 1, entry[1]);
+ });
+ }
+ return seq.__iteratorUncached(type, reverse);
+ }
+
+ function fromJS(json, converter) {
+ return converter ?
+ fromJSWith(converter, json, '', {'': json}) :
+ fromJSDefault(json);
+ }
+
+ function fromJSWith(converter, json, key, parentJSON) {
+ if (Array.isArray(json)) {
+ return converter.call(parentJSON, key, IndexedSeq(json).map(function(v, k) {return fromJSWith(converter, v, k, json)}));
+ }
+ if (isPlainObj(json)) {
+ return converter.call(parentJSON, key, KeyedSeq(json).map(function(v, k) {return fromJSWith(converter, v, k, json)}));
+ }
+ return json;
+ }
+
+ function fromJSDefault(json) {
+ if (Array.isArray(json)) {
+ return IndexedSeq(json).map(fromJSDefault).toList();
+ }
+ if (isPlainObj(json)) {
+ return KeyedSeq(json).map(fromJSDefault).toMap();
+ }
+ return json;
+ }
+
+ function isPlainObj(value) {
+ return value && (value.constructor === Object || value.constructor === undefined);
+ }
+
+ /**
+ * An extension of the "same-value" algorithm as [described for use by ES6 Map
+ * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality)
+ *
+ * NaN is considered the same as NaN, however -0 and 0 are considered the same
+ * value, which is different from the algorithm described by
+ * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
+ *
+ * This is extended further to allow Objects to describe the values they
+ * represent, by way of `valueOf` or `equals` (and `hashCode`).
+ *
+ * Note: because of this extension, the key equality of Immutable.Map and the
+ * value equality of Immutable.Set will differ from ES6 Map and Set.
+ *
+ * ### Defining custom values
+ *
+ * The easiest way to describe the value an object represents is by implementing
+ * `valueOf`. For example, `Date` represents a value by returning a unix
+ * timestamp for `valueOf`:
+ *
+ * var date1 = new Date(1234567890000); // Fri Feb 13 2009 ...
+ * var date2 = new Date(1234567890000);
+ * date1.valueOf(); // 1234567890000
+ * assert( date1 !== date2 );
+ * assert( Immutable.is( date1, date2 ) );
+ *
+ * Note: overriding `valueOf` may have other implications if you use this object
+ * where JavaScript expects a primitive, such as implicit string coercion.
+ *
+ * For more complex types, especially collections, implementing `valueOf` may
+ * not be performant. An alternative is to implement `equals` and `hashCode`.
+ *
+ * `equals` takes another object, presumably of similar type, and returns true
+ * if the it is equal. Equality is symmetrical, so the same result should be
+ * returned if this and the argument are flipped.
+ *
+ * assert( a.equals(b) === b.equals(a) );
+ *
+ * `hashCode` returns a 32bit integer number representing the object which will
+ * be used to determine how to store the value object in a Map or Set. You must
+ * provide both or neither methods, one must not exist without the other.
+ *
+ * Also, an important relationship between these methods must be upheld: if two
+ * values are equal, they *must* return the same hashCode. If the values are not
+ * equal, they might have the same hashCode; this is called a hash collision,
+ * and while undesirable for performance reasons, it is acceptable.
+ *
+ * if (a.equals(b)) {
+ * assert( a.hashCode() === b.hashCode() );
+ * }
+ *
+ * All Immutable collections implement `equals` and `hashCode`.
+ *
+ */
+ function is(valueA, valueB) {
+ if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {
+ return true;
+ }
+ if (!valueA || !valueB) {
+ return false;
+ }
+ if (typeof valueA.valueOf === 'function' &&
+ typeof valueB.valueOf === 'function') {
+ valueA = valueA.valueOf();
+ valueB = valueB.valueOf();
+ if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {
+ return true;
+ }
+ if (!valueA || !valueB) {
+ return false;
+ }
+ }
+ if (typeof valueA.equals === 'function' &&
+ typeof valueB.equals === 'function' &&
+ valueA.equals(valueB)) {
+ return true;
+ }
+ return false;
+ }
+
+ function deepEqual(a, b) {
+ if (a === b) {
+ return true;
+ }
+
+ if (
+ !isIterable(b) ||
+ a.size !== undefined && b.size !== undefined && a.size !== b.size ||
+ a.__hash !== undefined && b.__hash !== undefined && a.__hash !== b.__hash ||
+ isKeyed(a) !== isKeyed(b) ||
+ isIndexed(a) !== isIndexed(b) ||
+ isOrdered(a) !== isOrdered(b)
+ ) {
+ return false;
+ }
+
+ if (a.size === 0 && b.size === 0) {
+ return true;
+ }
+
+ var notAssociative = !isAssociative(a);
+
+ if (isOrdered(a)) {
+ var entries = a.entries();
+ return b.every(function(v, k) {
+ var entry = entries.next().value;
+ return entry && is(entry[1], v) && (notAssociative || is(entry[0], k));
+ }) && entries.next().done;
+ }
+
+ var flipped = false;
+
+ if (a.size === undefined) {
+ if (b.size === undefined) {
+ if (typeof a.cacheResult === 'function') {
+ a.cacheResult();
+ }
+ } else {
+ flipped = true;
+ var _ = a;
+ a = b;
+ b = _;
+ }
+ }
+
+ var allEqual = true;
+ var bSize = b.__iterate(function(v, k) {
+ if (notAssociative ? !a.has(v) :
+ flipped ? !is(v, a.get(k, NOT_SET)) : !is(a.get(k, NOT_SET), v)) {
+ allEqual = false;
+ return false;
+ }
+ });
+
+ return allEqual && a.size === bSize;
+ }
+
+ createClass(Repeat, IndexedSeq);
+
+ function Repeat(value, times) {
+ if (!(this instanceof Repeat)) {
+ return new Repeat(value, times);
+ }
+ this._value = value;
+ this.size = times === undefined ? Infinity : Math.max(0, times);
+ if (this.size === 0) {
+ if (EMPTY_REPEAT) {
+ return EMPTY_REPEAT;
+ }
+ EMPTY_REPEAT = this;
+ }
+ }
+
+ Repeat.prototype.toString = function() {
+ if (this.size === 0) {
+ return 'Repeat []';
+ }
+ return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]';
+ };
+
+ Repeat.prototype.get = function(index, notSetValue) {
+ return this.has(index) ? this._value : notSetValue;
+ };
+
+ Repeat.prototype.includes = function(searchValue) {
+ return is(this._value, searchValue);
+ };
+
+ Repeat.prototype.slice = function(begin, end) {
+ var size = this.size;
+ return wholeSlice(begin, end, size) ? this :
+ new Repeat(this._value, resolveEnd(end, size) - resolveBegin(begin, size));
+ };
+
+ Repeat.prototype.reverse = function() {
+ return this;
+ };
+
+ Repeat.prototype.indexOf = function(searchValue) {
+ if (is(this._value, searchValue)) {
+ return 0;
+ }
+ return -1;
+ };
+
+ Repeat.prototype.lastIndexOf = function(searchValue) {
+ if (is(this._value, searchValue)) {
+ return this.size;
+ }
+ return -1;
+ };
+
+ Repeat.prototype.__iterate = function(fn, reverse) {
+ for (var ii = 0; ii < this.size; ii++) {
+ if (fn(this._value, ii, this) === false) {
+ return ii + 1;
+ }
+ }
+ return ii;
+ };
+
+ Repeat.prototype.__iterator = function(type, reverse) {var this$0 = this;
+ var ii = 0;
+ return new Iterator(function()
+ {return ii < this$0.size ? iteratorValue(type, ii++, this$0._value) : iteratorDone()}
+ );
+ };
+
+ Repeat.prototype.equals = function(other) {
+ return other instanceof Repeat ?
+ is(this._value, other._value) :
+ deepEqual(other);
+ };
+
+
+ var EMPTY_REPEAT;
+
+ function invariant(condition, error) {
+ if (!condition) throw new Error(error);
+ }
+
+ createClass(Range, IndexedSeq);
+
+ function Range(start, end, step) {
+ if (!(this instanceof Range)) {
+ return new Range(start, end, step);
+ }
+ invariant(step !== 0, 'Cannot step a Range by 0');
+ start = start || 0;
+ if (end === undefined) {
+ end = Infinity;
+ }
+ step = step === undefined ? 1 : Math.abs(step);
+ if (end < start) {
+ step = -step;
+ }
+ this._start = start;
+ this._end = end;
+ this._step = step;
+ this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1);
+ if (this.size === 0) {
+ if (EMPTY_RANGE) {
+ return EMPTY_RANGE;
+ }
+ EMPTY_RANGE = this;
+ }
+ }
+
+ Range.prototype.toString = function() {
+ if (this.size === 0) {
+ return 'Range []';
+ }
+ return 'Range [ ' +
+ this._start + '...' + this._end +
+ (this._step > 1 ? ' by ' + this._step : '') +
+ ' ]';
+ };
+
+ Range.prototype.get = function(index, notSetValue) {
+ return this.has(index) ?
+ this._start + wrapIndex(this, index) * this._step :
+ notSetValue;
+ };
+
+ Range.prototype.includes = function(searchValue) {
+ var possibleIndex = (searchValue - this._start) / this._step;
+ return possibleIndex >= 0 &&
+ possibleIndex < this.size &&
+ possibleIndex === Math.floor(possibleIndex);
+ };
+
+ Range.prototype.slice = function(begin, end) {
+ if (wholeSlice(begin, end, this.size)) {
+ return this;
+ }
+ begin = resolveBegin(begin, this.size);
+ end = resolveEnd(end, this.size);
+ if (end <= begin) {
+ return new Range(0, 0);
+ }
+ return new Range(this.get(begin, this._end), this.get(end, this._end), this._step);
+ };
+
+ Range.prototype.indexOf = function(searchValue) {
+ var offsetValue = searchValue - this._start;
+ if (offsetValue % this._step === 0) {
+ var index = offsetValue / this._step;
+ if (index >= 0 && index < this.size) {
+ return index
+ }
+ }
+ return -1;
+ };
+
+ Range.prototype.lastIndexOf = function(searchValue) {
+ return this.indexOf(searchValue);
+ };
+
+ Range.prototype.__iterate = function(fn, reverse) {
+ var maxIndex = this.size - 1;
+ var step = this._step;
+ var value = reverse ? this._start + maxIndex * step : this._start;
+ for (var ii = 0; ii <= maxIndex; ii++) {
+ if (fn(value, ii, this) === false) {
+ return ii + 1;
+ }
+ value += reverse ? -step : step;
+ }
+ return ii;
+ };
+
+ Range.prototype.__iterator = function(type, reverse) {
+ var maxIndex = this.size - 1;
+ var step = this._step;
+ var value = reverse ? this._start + maxIndex * step : this._start;
+ var ii = 0;
+ return new Iterator(function() {
+ var v = value;
+ value += reverse ? -step : step;
+ return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii++, v);
+ });
+ };
+
+ Range.prototype.equals = function(other) {
+ return other instanceof Range ?
+ this._start === other._start &&
+ this._end === other._end &&
+ this._step === other._step :
+ deepEqual(this, other);
+ };
+
+
+ var EMPTY_RANGE;
+
+ createClass(Collection, Iterable);
+ function Collection() {
+ throw TypeError('Abstract');
+ }
+
+
+ createClass(KeyedCollection, Collection);function KeyedCollection() {}
+
+ createClass(IndexedCollection, Collection);function IndexedCollection() {}
+
+ createClass(SetCollection, Collection);function SetCollection() {}
+
+
+ Collection.Keyed = KeyedCollection;
+ Collection.Indexed = IndexedCollection;
+ Collection.Set = SetCollection;
+
+ var imul =
+ typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 ?
+ Math.imul :
+ function imul(a, b) {
+ a = a | 0; // int
+ b = b | 0; // int
+ var c = a & 0xffff;
+ var d = b & 0xffff;
+ // Shift by 0 fixes the sign on the high part.
+ return (c * d) + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0) | 0; // int
+ };
+
+ // v8 has an optimization for storing 31-bit signed numbers.
+ // Values which have either 00 or 11 as the high order bits qualify.
+ // This function drops the highest order bit in a signed number, maintaining
+ // the sign bit.
+ function smi(i32) {
+ return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);
+ }
+
+ function hash(o) {
+ if (o === false || o === null || o === undefined) {
+ return 0;
+ }
+ if (typeof o.valueOf === 'function') {
+ o = o.valueOf();
+ if (o === false || o === null || o === undefined) {
+ return 0;
+ }
+ }
+ if (o === true) {
+ return 1;
+ }
+ var type = typeof o;
+ if (type === 'number') {
+ var h = o | 0;
+ if (h !== o) {
+ h ^= o * 0xFFFFFFFF;
+ }
+ while (o > 0xFFFFFFFF) {
+ o /= 0xFFFFFFFF;
+ h ^= o;
+ }
+ return smi(h);
+ }
+ if (type === 'string') {
+ return o.length > STRING_HASH_CACHE_MIN_STRLEN ? cachedHashString(o) : hashString(o);
+ }
+ if (typeof o.hashCode === 'function') {
+ return o.hashCode();
+ }
+ if (type === 'object') {
+ return hashJSObj(o);
+ }
+ if (typeof o.toString === 'function') {
+ return hashString(o.toString());
+ }
+ throw new Error('Value type ' + type + ' cannot be hashed.');
+ }
+
+ function cachedHashString(string) {
+ var hash = stringHashCache[string];
+ if (hash === undefined) {
+ hash = hashString(string);
+ if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) {
+ STRING_HASH_CACHE_SIZE = 0;
+ stringHashCache = {};
+ }
+ STRING_HASH_CACHE_SIZE++;
+ stringHashCache[string] = hash;
+ }
+ return hash;
+ }
+
+ // http://jsperf.com/hashing-strings
+ function hashString(string) {
+ // This is the hash from JVM
+ // The hash code for a string is computed as
+ // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1],
+ // where s[i] is the ith character of the string and n is the length of
+ // the string. We "mod" the result to make it between 0 (inclusive) and 2^31
+ // (exclusive) by dropping high bits.
+ var hash = 0;
+ for (var ii = 0; ii < string.length; ii++) {
+ hash = 31 * hash + string.charCodeAt(ii) | 0;
+ }
+ return smi(hash);
+ }
+
+ function hashJSObj(obj) {
+ var hash;
+ if (usingWeakMap) {
+ hash = weakMap.get(obj);
+ if (hash !== undefined) {
+ return hash;
+ }
+ }
+
+ hash = obj[UID_HASH_KEY];
+ if (hash !== undefined) {
+ return hash;
+ }
+
+ if (!canDefineProperty) {
+ hash = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY];
+ if (hash !== undefined) {
+ return hash;
+ }
+
+ hash = getIENodeHash(obj);
+ if (hash !== undefined) {
+ return hash;
+ }
+ }
+
+ hash = ++objHashUID;
+ if (objHashUID & 0x40000000) {
+ objHashUID = 0;
+ }
+
+ if (usingWeakMap) {
+ weakMap.set(obj, hash);
+ } else if (isExtensible !== undefined && isExtensible(obj) === false) {
+ throw new Error('Non-extensible objects are not allowed as keys.');
+ } else if (canDefineProperty) {
+ Object.defineProperty(obj, UID_HASH_KEY, {
+ 'enumerable': false,
+ 'configurable': false,
+ 'writable': false,
+ 'value': hash
+ });
+ } else if (obj.propertyIsEnumerable !== undefined &&
+ obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable) {
+ // Since we can't define a non-enumerable property on the object
+ // we'll hijack one of the less-used non-enumerable properties to
+ // save our hash on it. Since this is a function it will not show up in
+ // `JSON.stringify` which is what we want.
+ obj.propertyIsEnumerable = function() {
+ return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments);
+ };
+ obj.propertyIsEnumerable[UID_HASH_KEY] = hash;
+ } else if (obj.nodeType !== undefined) {
+ // At this point we couldn't get the IE `uniqueID` to use as a hash
+ // and we couldn't use a non-enumerable property to exploit the
+ // dontEnum bug so we simply add the `UID_HASH_KEY` on the node
+ // itself.
+ obj[UID_HASH_KEY] = hash;
+ } else {
+ throw new Error('Unable to set a non-enumerable property on object.');
+ }
+
+ return hash;
+ }
+
+ // Get references to ES5 object methods.
+ var isExtensible = Object.isExtensible;
+
+ // True if Object.defineProperty works as expected. IE8 fails this test.
+ var canDefineProperty = (function() {
+ try {
+ Object.defineProperty({}, '@', {});
+ return true;
+ } catch (e) {
+ return false;
+ }
+ }());
+
+ // IE has a `uniqueID` property on DOM nodes. We can construct the hash from it
+ // and avoid memory leaks from the IE cloneNode bug.
+ function getIENodeHash(node) {
+ if (node && node.nodeType > 0) {
+ switch (node.nodeType) {
+ case 1: // Element
+ return node.uniqueID;
+ case 9: // Document
+ return node.documentElement && node.documentElement.uniqueID;
+ }
+ }
+ }
+
+ // If possible, use a WeakMap.
+ var usingWeakMap = typeof WeakMap === 'function';
+ var weakMap;
+ if (usingWeakMap) {
+ weakMap = new WeakMap();
+ }
+
+ var objHashUID = 0;
+
+ var UID_HASH_KEY = '__immutablehash__';
+ if (typeof Symbol === 'function') {
+ UID_HASH_KEY = Symbol(UID_HASH_KEY);
+ }
+
+ var STRING_HASH_CACHE_MIN_STRLEN = 16;
+ var STRING_HASH_CACHE_MAX_SIZE = 255;
+ var STRING_HASH_CACHE_SIZE = 0;
+ var stringHashCache = {};
+
+ function assertNotInfinite(size) {
+ invariant(
+ size !== Infinity,
+ 'Cannot perform this action with an infinite size.'
+ );
+ }
+
+ createClass(Map, KeyedCollection);
+
+ // @pragma Construction
+
+ function Map(value) {
+ return value === null || value === undefined ? emptyMap() :
+ isMap(value) && !isOrdered(value) ? value :
+ emptyMap().withMutations(function(map ) {
+ var iter = KeyedIterable(value);
+ assertNotInfinite(iter.size);
+ iter.forEach(function(v, k) {return map.set(k, v)});
+ });
+ }
+
+ Map.prototype.toString = function() {
+ return this.__toString('Map {', '}');
+ };
+
+ // @pragma Access
+
+ Map.prototype.get = function(k, notSetValue) {
+ return this._root ?
+ this._root.get(0, undefined, k, notSetValue) :
+ notSetValue;
+ };
+
+ // @pragma Modification
+
+ Map.prototype.set = function(k, v) {
+ return updateMap(this, k, v);
+ };
+
+ Map.prototype.setIn = function(keyPath, v) {
+ return this.updateIn(keyPath, NOT_SET, function() {return v});
+ };
+
+ Map.prototype.remove = function(k) {
+ return updateMap(this, k, NOT_SET);
+ };
+
+ Map.prototype.deleteIn = function(keyPath) {
+ return this.updateIn(keyPath, function() {return NOT_SET});
+ };
+
+ Map.prototype.update = function(k, notSetValue, updater) {
+ return arguments.length === 1 ?
+ k(this) :
+ this.updateIn([k], notSetValue, updater);
+ };
+
+ Map.prototype.updateIn = function(keyPath, notSetValue, updater) {
+ if (!updater) {
+ updater = notSetValue;
+ notSetValue = undefined;
+ }
+ var updatedValue = updateInDeepMap(
+ this,
+ forceIterator(keyPath),
+ notSetValue,
+ updater
+ );
+ return updatedValue === NOT_SET ? undefined : updatedValue;
+ };
+
+ Map.prototype.clear = function() {
+ if (this.size === 0) {
+ return this;
+ }
+ if (this.__ownerID) {
+ this.size = 0;
+ this._root = null;
+ this.__hash = undefined;
+ this.__altered = true;
+ return this;
+ }
+ return emptyMap();
+ };
+
+ // @pragma Composition
+
+ Map.prototype.merge = function(/*...iters*/) {
+ return mergeIntoMapWith(this, undefined, arguments);
+ };
+
+ Map.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);
+ return mergeIntoMapWith(this, merger, iters);
+ };
+
+ Map.prototype.mergeIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1);
+ return this.updateIn(
+ keyPath,
+ emptyMap(),
+ function(m ) {return typeof m.merge === 'function' ?
+ m.merge.apply(m, iters) :
+ iters[iters.length - 1]}
+ );
+ };
+
+ Map.prototype.mergeDeep = function(/*...iters*/) {
+ return mergeIntoMapWith(this, deepMerger, arguments);
+ };
+
+ Map.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1);
+ return mergeIntoMapWith(this, deepMergerWith(merger), iters);
+ };
+
+ Map.prototype.mergeDeepIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1);
+ return this.updateIn(
+ keyPath,
+ emptyMap(),
+ function(m ) {return typeof m.mergeDeep === 'function' ?
+ m.mergeDeep.apply(m, iters) :
+ iters[iters.length - 1]}
+ );
+ };
+
+ Map.prototype.sort = function(comparator) {
+ // Late binding
+ return OrderedMap(sortFactory(this, comparator));
+ };
+
+ Map.prototype.sortBy = function(mapper, comparator) {
+ // Late binding
+ return OrderedMap(sortFactory(this, comparator, mapper));
+ };
+
+ // @pragma Mutability
+
+ Map.prototype.withMutations = function(fn) {
+ var mutable = this.asMutable();
+ fn(mutable);
+ return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this;
+ };
+
+ Map.prototype.asMutable = function() {
+ return this.__ownerID ? this : this.__ensureOwner(new OwnerID());
+ };
+
+ Map.prototype.asImmutable = function() {
+ return this.__ensureOwner();
+ };
+
+ Map.prototype.wasAltered = function() {
+ return this.__altered;
+ };
+
+ Map.prototype.__iterator = function(type, reverse) {
+ return new MapIterator(this, type, reverse);
+ };
+
+ Map.prototype.__iterate = function(fn, reverse) {var this$0 = this;
+ var iterations = 0;
+ this._root && this._root.iterate(function(entry ) {
+ iterations++;
+ return fn(entry[1], entry[0], this$0);
+ }, reverse);
+ return iterations;
+ };
+
+ Map.prototype.__ensureOwner = function(ownerID) {
+ if (ownerID === this.__ownerID) {
+ return this;
+ }
+ if (!ownerID) {
+ this.__ownerID = ownerID;
+ this.__altered = false;
+ return this;
+ }
+ return makeMap(this.size, this._root, ownerID, this.__hash);
+ };
+
+
+ function isMap(maybeMap) {
+ return !!(maybeMap && maybeMap[IS_MAP_SENTINEL]);
+ }
+
+ Map.isMap = isMap;
+
+ var IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@';
+
+ var MapPrototype = Map.prototype;
+ MapPrototype[IS_MAP_SENTINEL] = true;
+ MapPrototype[DELETE] = MapPrototype.remove;
+ MapPrototype.removeIn = MapPrototype.deleteIn;
+
+
+ // #pragma Trie Nodes
+
+
+
+ function ArrayMapNode(ownerID, entries) {
+ this.ownerID = ownerID;
+ this.entries = entries;
+ }
+
+ ArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) {
+ var entries = this.entries;
+ for (var ii = 0, len = entries.length; ii < len; ii++) {
+ if (is(key, entries[ii][0])) {
+ return entries[ii][1];
+ }
+ }
+ return notSetValue;
+ };
+
+ ArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
+ var removed = value === NOT_SET;
+
+ var entries = this.entries;
+ var idx = 0;
+ for (var len = entries.length; idx < len; idx++) {
+ if (is(key, entries[idx][0])) {
+ break;
+ }
+ }
+ var exists = idx < len;
+
+ if (exists ? entries[idx][1] === value : removed) {
+ return this;
+ }
+
+ SetRef(didAlter);
+ (removed || !exists) && SetRef(didChangeSize);
+
+ if (removed && entries.length === 1) {
+ return; // undefined
+ }
+
+ if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) {
+ return createNodes(ownerID, entries, key, value);
+ }
+
+ var isEditable = ownerID && ownerID === this.ownerID;
+ var newEntries = isEditable ? entries : arrCopy(entries);
+
+ if (exists) {
+ if (removed) {
+ idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());
+ } else {
+ newEntries[idx] = [key, value];
+ }
+ } else {
+ newEntries.push([key, value]);
+ }
+
+ if (isEditable) {
+ this.entries = newEntries;
+ return this;
+ }
+
+ return new ArrayMapNode(ownerID, newEntries);
+ };
+
+
+
+
+ function BitmapIndexedNode(ownerID, bitmap, nodes) {
+ this.ownerID = ownerID;
+ this.bitmap = bitmap;
+ this.nodes = nodes;
+ }
+
+ BitmapIndexedNode.prototype.get = function(shift, keyHash, key, notSetValue) {
+ if (keyHash === undefined) {
+ keyHash = hash(key);
+ }
+ var bit = (1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK));
+ var bitmap = this.bitmap;
+ return (bitmap & bit) === 0 ? notSetValue :
+ this.nodes[popCount(bitmap & (bit - 1))].get(shift + SHIFT, keyHash, key, notSetValue);
+ };
+
+ BitmapIndexedNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
+ if (keyHash === undefined) {
+ keyHash = hash(key);
+ }
+ var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
+ var bit = 1 << keyHashFrag;
+ var bitmap = this.bitmap;
+ var exists = (bitmap & bit) !== 0;
+
+ if (!exists && value === NOT_SET) {
+ return this;
+ }
+
+ var idx = popCount(bitmap & (bit - 1));
+ var nodes = this.nodes;
+ var node = exists ? nodes[idx] : undefined;
+ var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);
+
+ if (newNode === node) {
+ return this;
+ }
+
+ if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) {
+ return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode);
+ }
+
+ if (exists && !newNode && nodes.length === 2 && isLeafNode(nodes[idx ^ 1])) {
+ return nodes[idx ^ 1];
+ }
+
+ if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) {
+ return newNode;
+ }
+
+ var isEditable = ownerID && ownerID === this.ownerID;
+ var newBitmap = exists ? newNode ? bitmap : bitmap ^ bit : bitmap | bit;
+ var newNodes = exists ? newNode ?
+ setIn(nodes, idx, newNode, isEditable) :
+ spliceOut(nodes, idx, isEditable) :
+ spliceIn(nodes, idx, newNode, isEditable);
+
+ if (isEditable) {
+ this.bitmap = newBitmap;
+ this.nodes = newNodes;
+ return this;
+ }
+
+ return new BitmapIndexedNode(ownerID, newBitmap, newNodes);
+ };
+
+
+
+
+ function HashArrayMapNode(ownerID, count, nodes) {
+ this.ownerID = ownerID;
+ this.count = count;
+ this.nodes = nodes;
+ }
+
+ HashArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) {
+ if (keyHash === undefined) {
+ keyHash = hash(key);
+ }
+ var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
+ var node = this.nodes[idx];
+ return node ? node.get(shift + SHIFT, keyHash, key, notSetValue) : notSetValue;
+ };
+
+ HashArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
+ if (keyHash === undefined) {
+ keyHash = hash(key);
+ }
+ var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
+ var removed = value === NOT_SET;
+ var nodes = this.nodes;
+ var node = nodes[idx];
+
+ if (removed && !node) {
+ return this;
+ }
+
+ var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);
+ if (newNode === node) {
+ return this;
+ }
+
+ var newCount = this.count;
+ if (!node) {
+ newCount++;
+ } else if (!newNode) {
+ newCount--;
+ if (newCount < MIN_HASH_ARRAY_MAP_SIZE) {
+ return packNodes(ownerID, nodes, newCount, idx);
+ }
+ }
+
+ var isEditable = ownerID && ownerID === this.ownerID;
+ var newNodes = setIn(nodes, idx, newNode, isEditable);
+
+ if (isEditable) {
+ this.count = newCount;
+ this.nodes = newNodes;
+ return this;
+ }
+
+ return new HashArrayMapNode(ownerID, newCount, newNodes);
+ };
+
+
+
+
+ function HashCollisionNode(ownerID, keyHash, entries) {
+ this.ownerID = ownerID;
+ this.keyHash = keyHash;
+ this.entries = entries;
+ }
+
+ HashCollisionNode.prototype.get = function(shift, keyHash, key, notSetValue) {
+ var entries = this.entries;
+ for (var ii = 0, len = entries.length; ii < len; ii++) {
+ if (is(key, entries[ii][0])) {
+ return entries[ii][1];
+ }
+ }
+ return notSetValue;
+ };
+
+ HashCollisionNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
+ if (keyHash === undefined) {
+ keyHash = hash(key);
+ }
+
+ var removed = value === NOT_SET;
+
+ if (keyHash !== this.keyHash) {
+ if (removed) {
+ return this;
+ }
+ SetRef(didAlter);
+ SetRef(didChangeSize);
+ return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]);
+ }
+
+ var entries = this.entries;
+ var idx = 0;
+ for (var len = entries.length; idx < len; idx++) {
+ if (is(key, entries[idx][0])) {
+ break;
+ }
+ }
+ var exists = idx < len;
+
+ if (exists ? entries[idx][1] === value : removed) {
+ return this;
+ }
+
+ SetRef(didAlter);
+ (removed || !exists) && SetRef(didChangeSize);
+
+ if (removed && len === 2) {
+ return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]);
+ }
+
+ var isEditable = ownerID && ownerID === this.ownerID;
+ var newEntries = isEditable ? entries : arrCopy(entries);
+
+ if (exists) {
+ if (removed) {
+ idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());
+ } else {
+ newEntries[idx] = [key, value];
+ }
+ } else {
+ newEntries.push([key, value]);
+ }
+
+ if (isEditable) {
+ this.entries = newEntries;
+ return this;
+ }
+
+ return new HashCollisionNode(ownerID, this.keyHash, newEntries);
+ };
+
+
+
+
+ function ValueNode(ownerID, keyHash, entry) {
+ this.ownerID = ownerID;
+ this.keyHash = keyHash;
+ this.entry = entry;
+ }
+
+ ValueNode.prototype.get = function(shift, keyHash, key, notSetValue) {
+ return is(key, this.entry[0]) ? this.entry[1] : notSetValue;
+ };
+
+ ValueNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
+ var removed = value === NOT_SET;
+ var keyMatch = is(key, this.entry[0]);
+ if (keyMatch ? value === this.entry[1] : removed) {
+ return this;
+ }
+
+ SetRef(didAlter);
+
+ if (removed) {
+ SetRef(didChangeSize);
+ return; // undefined
+ }
+
+ if (keyMatch) {
+ if (ownerID && ownerID === this.ownerID) {
+ this.entry[1] = value;
+ return this;
+ }
+ return new ValueNode(ownerID, this.keyHash, [key, value]);
+ }
+
+ SetRef(didChangeSize);
+ return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]);
+ };
+
+
+
+ // #pragma Iterators
+
+ ArrayMapNode.prototype.iterate =
+ HashCollisionNode.prototype.iterate = function (fn, reverse) {
+ var entries = this.entries;
+ for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) {
+ if (fn(entries[reverse ? maxIndex - ii : ii]) === false) {
+ return false;
+ }
+ }
+ }
+
+ BitmapIndexedNode.prototype.iterate =
+ HashArrayMapNode.prototype.iterate = function (fn, reverse) {
+ var nodes = this.nodes;
+ for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {
+ var node = nodes[reverse ? maxIndex - ii : ii];
+ if (node && node.iterate(fn, reverse) === false) {
+ return false;
+ }
+ }
+ }
+
+ ValueNode.prototype.iterate = function (fn, reverse) {
+ return fn(this.entry);
+ }
+
+ createClass(MapIterator, Iterator);
+
+ function MapIterator(map, type, reverse) {
+ this._type = type;
+ this._reverse = reverse;
+ this._stack = map._root && mapIteratorFrame(map._root);
+ }
+
+ MapIterator.prototype.next = function() {
+ var type = this._type;
+ var stack = this._stack;
+ while (stack) {
+ var node = stack.node;
+ var index = stack.index++;
+ var maxIndex;
+ if (node.entry) {
+ if (index === 0) {
+ return mapIteratorValue(type, node.entry);
+ }
+ } else if (node.entries) {
+ maxIndex = node.entries.length - 1;
+ if (index <= maxIndex) {
+ return mapIteratorValue(type, node.entries[this._reverse ? maxIndex - index : index]);
+ }
+ } else {
+ maxIndex = node.nodes.length - 1;
+ if (index <= maxIndex) {
+ var subNode = node.nodes[this._reverse ? maxIndex - index : index];
+ if (subNode) {
+ if (subNode.entry) {
+ return mapIteratorValue(type, subNode.entry);
+ }
+ stack = this._stack = mapIteratorFrame(subNode, stack);
+ }
+ continue;
+ }
+ }
+ stack = this._stack = this._stack.__prev;
+ }
+ return iteratorDone();
+ };
+
+
+ function mapIteratorValue(type, entry) {
+ return iteratorValue(type, entry[0], entry[1]);
+ }
+
+ function mapIteratorFrame(node, prev) {
+ return {
+ node: node,
+ index: 0,
+ __prev: prev
+ };
+ }
+
+ function makeMap(size, root, ownerID, hash) {
+ var map = Object.create(MapPrototype);
+ map.size = size;
+ map._root = root;
+ map.__ownerID = ownerID;
+ map.__hash = hash;
+ map.__altered = false;
+ return map;
+ }
+
+ var EMPTY_MAP;
+ function emptyMap() {
+ return EMPTY_MAP || (EMPTY_MAP = makeMap(0));
+ }
+
+ function updateMap(map, k, v) {
+ var newRoot;
+ var newSize;
+ if (!map._root) {
+ if (v === NOT_SET) {
+ return map;
+ }
+ newSize = 1;
+ newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]);
+ } else {
+ var didChangeSize = MakeRef(CHANGE_LENGTH);
+ var didAlter = MakeRef(DID_ALTER);
+ newRoot = updateNode(map._root, map.__ownerID, 0, undefined, k, v, didChangeSize, didAlter);
+ if (!didAlter.value) {
+ return map;
+ }
+ newSize = map.size + (didChangeSize.value ? v === NOT_SET ? -1 : 1 : 0);
+ }
+ if (map.__ownerID) {
+ map.size = newSize;
+ map._root = newRoot;
+ map.__hash = undefined;
+ map.__altered = true;
+ return map;
+ }
+ return newRoot ? makeMap(newSize, newRoot) : emptyMap();
+ }
+
+ function updateNode(node, ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
+ if (!node) {
+ if (value === NOT_SET) {
+ return node;
+ }
+ SetRef(didAlter);
+ SetRef(didChangeSize);
+ return new ValueNode(ownerID, keyHash, [key, value]);
+ }
+ return node.update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter);
+ }
+
+ function isLeafNode(node) {
+ return node.constructor === ValueNode || node.constructor === HashCollisionNode;
+ }
+
+ function mergeIntoNode(node, ownerID, shift, keyHash, entry) {
+ if (node.keyHash === keyHash) {
+ return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]);
+ }
+
+ var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK;
+ var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
+
+ var newNode;
+ var nodes = idx1 === idx2 ?
+ [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] :
+ ((newNode = new ValueNode(ownerID, keyHash, entry)), idx1 < idx2 ? [node, newNode] : [newNode, node]);
+
+ return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes);
+ }
+
+ function createNodes(ownerID, entries, key, value) {
+ if (!ownerID) {
+ ownerID = new OwnerID();
+ }
+ var node = new ValueNode(ownerID, hash(key), [key, value]);
+ for (var ii = 0; ii < entries.length; ii++) {
+ var entry = entries[ii];
+ node = node.update(ownerID, 0, undefined, entry[0], entry[1]);
+ }
+ return node;
+ }
+
+ function packNodes(ownerID, nodes, count, excluding) {
+ var bitmap = 0;
+ var packedII = 0;
+ var packedNodes = new Array(count);
+ for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) {
+ var node = nodes[ii];
+ if (node !== undefined && ii !== excluding) {
+ bitmap |= bit;
+ packedNodes[packedII++] = node;
+ }
+ }
+ return new BitmapIndexedNode(ownerID, bitmap, packedNodes);
+ }
+
+ function expandNodes(ownerID, nodes, bitmap, including, node) {
+ var count = 0;
+ var expandedNodes = new Array(SIZE);
+ for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) {
+ expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined;
+ }
+ expandedNodes[including] = node;
+ return new HashArrayMapNode(ownerID, count + 1, expandedNodes);
+ }
+
+ function mergeIntoMapWith(map, merger, iterables) {
+ var iters = [];
+ for (var ii = 0; ii < iterables.length; ii++) {
+ var value = iterables[ii];
+ var iter = KeyedIterable(value);
+ if (!isIterable(value)) {
+ iter = iter.map(function(v ) {return fromJS(v)});
+ }
+ iters.push(iter);
+ }
+ return mergeIntoCollectionWith(map, merger, iters);
+ }
+
+ function deepMerger(existing, value, key) {
+ return existing && existing.mergeDeep && isIterable(value) ?
+ existing.mergeDeep(value) :
+ is(existing, value) ? existing : value;
+ }
+
+ function deepMergerWith(merger) {
+ return function(existing, value, key) {
+ if (existing && existing.mergeDeepWith && isIterable(value)) {
+ return existing.mergeDeepWith(merger, value);
+ }
+ var nextValue = merger(existing, value, key);
+ return is(existing, nextValue) ? existing : nextValue;
+ };
+ }
+
+ function mergeIntoCollectionWith(collection, merger, iters) {
+ iters = iters.filter(function(x ) {return x.size !== 0});
+ if (iters.length === 0) {
+ return collection;
+ }
+ if (collection.size === 0 && !collection.__ownerID && iters.length === 1) {
+ return collection.constructor(iters[0]);
+ }
+ return collection.withMutations(function(collection ) {
+ var mergeIntoMap = merger ?
+ function(value, key) {
+ collection.update(key, NOT_SET, function(existing )
+ {return existing === NOT_SET ? value : merger(existing, value, key)}
+ );
+ } :
+ function(value, key) {
+ collection.set(key, value);
+ }
+ for (var ii = 0; ii < iters.length; ii++) {
+ iters[ii].forEach(mergeIntoMap);
+ }
+ });
+ }
+
+ function updateInDeepMap(existing, keyPathIter, notSetValue, updater) {
+ var isNotSet = existing === NOT_SET;
+ var step = keyPathIter.next();
+ if (step.done) {
+ var existingValue = isNotSet ? notSetValue : existing;
+ var newValue = updater(existingValue);
+ return newValue === existingValue ? existing : newValue;
+ }
+ invariant(
+ isNotSet || (existing && existing.set),
+ 'invalid keyPath'
+ );
+ var key = step.value;
+ var nextExisting = isNotSet ? NOT_SET : existing.get(key, NOT_SET);
+ var nextUpdated = updateInDeepMap(
+ nextExisting,
+ keyPathIter,
+ notSetValue,
+ updater
+ );
+ return nextUpdated === nextExisting ? existing :
+ nextUpdated === NOT_SET ? existing.remove(key) :
+ (isNotSet ? emptyMap() : existing).set(key, nextUpdated);
+ }
+
+ function popCount(x) {
+ x = x - ((x >> 1) & 0x55555555);
+ x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
+ x = (x + (x >> 4)) & 0x0f0f0f0f;
+ x = x + (x >> 8);
+ x = x + (x >> 16);
+ return x & 0x7f;
+ }
+
+ function setIn(array, idx, val, canEdit) {
+ var newArray = canEdit ? array : arrCopy(array);
+ newArray[idx] = val;
+ return newArray;
+ }
+
+ function spliceIn(array, idx, val, canEdit) {
+ var newLen = array.length + 1;
+ if (canEdit && idx + 1 === newLen) {
+ array[idx] = val;
+ return array;
+ }
+ var newArray = new Array(newLen);
+ var after = 0;
+ for (var ii = 0; ii < newLen; ii++) {
+ if (ii === idx) {
+ newArray[ii] = val;
+ after = -1;
+ } else {
+ newArray[ii] = array[ii + after];
+ }
+ }
+ return newArray;
+ }
+
+ function spliceOut(array, idx, canEdit) {
+ var newLen = array.length - 1;
+ if (canEdit && idx === newLen) {
+ array.pop();
+ return array;
+ }
+ var newArray = new Array(newLen);
+ var after = 0;
+ for (var ii = 0; ii < newLen; ii++) {
+ if (ii === idx) {
+ after = 1;
+ }
+ newArray[ii] = array[ii + after];
+ }
+ return newArray;
+ }
+
+ var MAX_ARRAY_MAP_SIZE = SIZE / 4;
+ var MAX_BITMAP_INDEXED_SIZE = SIZE / 2;
+ var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4;
+
+ createClass(List, IndexedCollection);
+
+ // @pragma Construction
+
+ function List(value) {
+ var empty = emptyList();
+ if (value === null || value === undefined) {
+ return empty;
+ }
+ if (isList(value)) {
+ return value;
+ }
+ var iter = IndexedIterable(value);
+ var size = iter.size;
+ if (size === 0) {
+ return empty;
+ }
+ assertNotInfinite(size);
+ if (size > 0 && size < SIZE) {
+ return makeList(0, size, SHIFT, null, new VNode(iter.toArray()));
+ }
+ return empty.withMutations(function(list ) {
+ list.setSize(size);
+ iter.forEach(function(v, i) {return list.set(i, v)});
+ });
+ }
+
+ List.of = function(/*...values*/) {
+ return this(arguments);
+ };
+
+ List.prototype.toString = function() {
+ return this.__toString('List [', ']');
+ };
+
+ // @pragma Access
+
+ List.prototype.get = function(index, notSetValue) {
+ index = wrapIndex(this, index);
+ if (index >= 0 && index < this.size) {
+ index += this._origin;
+ var node = listNodeFor(this, index);
+ return node && node.array[index & MASK];
+ }
+ return notSetValue;
+ };
+
+ // @pragma Modification
+
+ List.prototype.set = function(index, value) {
+ return updateList(this, index, value);
+ };
+
+ List.prototype.remove = function(index) {
+ return !this.has(index) ? this :
+ index === 0 ? this.shift() :
+ index === this.size - 1 ? this.pop() :
+ this.splice(index, 1);
+ };
+
+ List.prototype.insert = function(index, value) {
+ return this.splice(index, 0, value);
+ };
+
+ List.prototype.clear = function() {
+ if (this.size === 0) {
+ return this;
+ }
+ if (this.__ownerID) {
+ this.size = this._origin = this._capacity = 0;
+ this._level = SHIFT;
+ this._root = this._tail = null;
+ this.__hash = undefined;
+ this.__altered = true;
+ return this;
+ }
+ return emptyList();
+ };
+
+ List.prototype.push = function(/*...values*/) {
+ var values = arguments;
+ var oldSize = this.size;
+ return this.withMutations(function(list ) {
+ setListBounds(list, 0, oldSize + values.length);
+ for (var ii = 0; ii < values.length; ii++) {
+ list.set(oldSize + ii, values[ii]);
+ }
+ });
+ };
+
+ List.prototype.pop = function() {
+ return setListBounds(this, 0, -1);
+ };
+
+ List.prototype.unshift = function(/*...values*/) {
+ var values = arguments;
+ return this.withMutations(function(list ) {
+ setListBounds(list, -values.length);
+ for (var ii = 0; ii < values.length; ii++) {
+ list.set(ii, values[ii]);
+ }
+ });
+ };
+
+ List.prototype.shift = function() {
+ return setListBounds(this, 1);
+ };
+
+ // @pragma Composition
+
+ List.prototype.merge = function(/*...iters*/) {
+ return mergeIntoListWith(this, undefined, arguments);
+ };
+
+ List.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);
+ return mergeIntoListWith(this, merger, iters);
+ };
+
+ List.prototype.mergeDeep = function(/*...iters*/) {
+ return mergeIntoListWith(this, deepMerger, arguments);
+ };
+
+ List.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1);
+ return mergeIntoListWith(this, deepMergerWith(merger), iters);
+ };
+
+ List.prototype.setSize = function(size) {
+ return setListBounds(this, 0, size);
+ };
+
+ // @pragma Iteration
+
+ List.prototype.slice = function(begin, end) {
+ var size = this.size;
+ if (wholeSlice(begin, end, size)) {
+ return this;
+ }
+ return setListBounds(
+ this,
+ resolveBegin(begin, size),
+ resolveEnd(end, size)
+ );
+ };
+
+ List.prototype.__iterator = function(type, reverse) {
+ var index = 0;
+ var values = iterateList(this, reverse);
+ return new Iterator(function() {
+ var value = values();
+ return value === DONE ?
+ iteratorDone() :
+ iteratorValue(type, index++, value);
+ });
+ };
+
+ List.prototype.__iterate = function(fn, reverse) {
+ var index = 0;
+ var values = iterateList(this, reverse);
+ var value;
+ while ((value = values()) !== DONE) {
+ if (fn(value, index++, this) === false) {
+ break;
+ }
+ }
+ return index;
+ };
+
+ List.prototype.__ensureOwner = function(ownerID) {
+ if (ownerID === this.__ownerID) {
+ return this;
+ }
+ if (!ownerID) {
+ this.__ownerID = ownerID;
+ return this;
+ }
+ return makeList(this._origin, this._capacity, this._level, this._root, this._tail, ownerID, this.__hash);
+ };
+
+
+ function isList(maybeList) {
+ return !!(maybeList && maybeList[IS_LIST_SENTINEL]);
+ }
+
+ List.isList = isList;
+
+ var IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@';
+
+ var ListPrototype = List.prototype;
+ ListPrototype[IS_LIST_SENTINEL] = true;
+ ListPrototype[DELETE] = ListPrototype.remove;
+ ListPrototype.setIn = MapPrototype.setIn;
+ ListPrototype.deleteIn =
+ ListPrototype.removeIn = MapPrototype.removeIn;
+ ListPrototype.update = MapPrototype.update;
+ ListPrototype.updateIn = MapPrototype.updateIn;
+ ListPrototype.mergeIn = MapPrototype.mergeIn;
+ ListPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;
+ ListPrototype.withMutations = MapPrototype.withMutations;
+ ListPrototype.asMutable = MapPrototype.asMutable;
+ ListPrototype.asImmutable = MapPrototype.asImmutable;
+ ListPrototype.wasAltered = MapPrototype.wasAltered;
+
+
+
+ function VNode(array, ownerID) {
+ this.array = array;
+ this.ownerID = ownerID;
+ }
+
+ // TODO: seems like these methods are very similar
+
+ VNode.prototype.removeBefore = function(ownerID, level, index) {
+ if (index === level ? 1 << level : 0 || this.array.length === 0) {
+ return this;
+ }
+ var originIndex = (index >>> level) & MASK;
+ if (originIndex >= this.array.length) {
+ return new VNode([], ownerID);
+ }
+ var removingFirst = originIndex === 0;
+ var newChild;
+ if (level > 0) {
+ var oldChild = this.array[originIndex];
+ newChild = oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index);
+ if (newChild === oldChild && removingFirst) {
+ return this;
+ }
+ }
+ if (removingFirst && !newChild) {
+ return this;
+ }
+ var editable = editableVNode(this, ownerID);
+ if (!removingFirst) {
+ for (var ii = 0; ii < originIndex; ii++) {
+ editable.array[ii] = undefined;
+ }
+ }
+ if (newChild) {
+ editable.array[originIndex] = newChild;
+ }
+ return editable;
+ };
+
+ VNode.prototype.removeAfter = function(ownerID, level, index) {
+ if (index === (level ? 1 << level : 0) || this.array.length === 0) {
+ return this;
+ }
+ var sizeIndex = ((index - 1) >>> level) & MASK;
+ if (sizeIndex >= this.array.length) {
+ return this;
+ }
+
+ var newChild;
+ if (level > 0) {
+ var oldChild = this.array[sizeIndex];
+ newChild = oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index);
+ if (newChild === oldChild && sizeIndex === this.array.length - 1) {
+ return this;
+ }
+ }
+
+ var editable = editableVNode(this, ownerID);
+ editable.array.splice(sizeIndex + 1);
+ if (newChild) {
+ editable.array[sizeIndex] = newChild;
+ }
+ return editable;
+ };
+
+
+
+ var DONE = {};
+
+ function iterateList(list, reverse) {
+ var left = list._origin;
+ var right = list._capacity;
+ var tailPos = getTailOffset(right);
+ var tail = list._tail;
+
+ return iterateNodeOrLeaf(list._root, list._level, 0);
+
+ function iterateNodeOrLeaf(node, level, offset) {
+ return level === 0 ?
+ iterateLeaf(node, offset) :
+ iterateNode(node, level, offset);
+ }
+
+ function iterateLeaf(node, offset) {
+ var array = offset === tailPos ? tail && tail.array : node && node.array;
+ var from = offset > left ? 0 : left - offset;
+ var to = right - offset;
+ if (to > SIZE) {
+ to = SIZE;
+ }
+ return function() {
+ if (from === to) {
+ return DONE;
+ }
+ var idx = reverse ? --to : from++;
+ return array && array[idx];
+ };
+ }
+
+ function iterateNode(node, level, offset) {
+ var values;
+ var array = node && node.array;
+ var from = offset > left ? 0 : (left - offset) >> level;
+ var to = ((right - offset) >> level) + 1;
+ if (to > SIZE) {
+ to = SIZE;
+ }
+ return function() {
+ do {
+ if (values) {
+ var value = values();
+ if (value !== DONE) {
+ return value;
+ }
+ values = null;
+ }
+ if (from === to) {
+ return DONE;
+ }
+ var idx = reverse ? --to : from++;
+ values = iterateNodeOrLeaf(
+ array && array[idx], level - SHIFT, offset + (idx << level)
+ );
+ } while (true);
+ };
+ }
+ }
+
+ function makeList(origin, capacity, level, root, tail, ownerID, hash) {
+ var list = Object.create(ListPrototype);
+ list.size = capacity - origin;
+ list._origin = origin;
+ list._capacity = capacity;
+ list._level = level;
+ list._root = root;
+ list._tail = tail;
+ list.__ownerID = ownerID;
+ list.__hash = hash;
+ list.__altered = false;
+ return list;
+ }
+
+ var EMPTY_LIST;
+ function emptyList() {
+ return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT));
+ }
+
+ function updateList(list, index, value) {
+ index = wrapIndex(list, index);
+
+ if (index !== index) {
+ return list;
+ }
+
+ if (index >= list.size || index < 0) {
+ return list.withMutations(function(list ) {
+ index < 0 ?
+ setListBounds(list, index).set(0, value) :
+ setListBounds(list, 0, index + 1).set(index, value)
+ });
+ }
+
+ index += list._origin;
+
+ var newTail = list._tail;
+ var newRoot = list._root;
+ var didAlter = MakeRef(DID_ALTER);
+ if (index >= getTailOffset(list._capacity)) {
+ newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter);
+ } else {
+ newRoot = updateVNode(newRoot, list.__ownerID, list._level, index, value, didAlter);
+ }
+
+ if (!didAlter.value) {
+ return list;
+ }
+
+ if (list.__ownerID) {
+ list._root = newRoot;
+ list._tail = newTail;
+ list.__hash = undefined;
+ list.__altered = true;
+ return list;
+ }
+ return makeList(list._origin, list._capacity, list._level, newRoot, newTail);
+ }
+
+ function updateVNode(node, ownerID, level, index, value, didAlter) {
+ var idx = (index >>> level) & MASK;
+ var nodeHas = node && idx < node.array.length;
+ if (!nodeHas && value === undefined) {
+ return node;
+ }
+
+ var newNode;
+
+ if (level > 0) {
+ var lowerNode = node && node.array[idx];
+ var newLowerNode = updateVNode(lowerNode, ownerID, level - SHIFT, index, value, didAlter);
+ if (newLowerNode === lowerNode) {
+ return node;
+ }
+ newNode = editableVNode(node, ownerID);
+ newNode.array[idx] = newLowerNode;
+ return newNode;
+ }
+
+ if (nodeHas && node.array[idx] === value) {
+ return node;
+ }
+
+ SetRef(didAlter);
+
+ newNode = editableVNode(node, ownerID);
+ if (value === undefined && idx === newNode.array.length - 1) {
+ newNode.array.pop();
+ } else {
+ newNode.array[idx] = value;
+ }
+ return newNode;
+ }
+
+ function editableVNode(node, ownerID) {
+ if (ownerID && node && ownerID === node.ownerID) {
+ return node;
+ }
+ return new VNode(node ? node.array.slice() : [], ownerID);
+ }
+
+ function listNodeFor(list, rawIndex) {
+ if (rawIndex >= getTailOffset(list._capacity)) {
+ return list._tail;
+ }
+ if (rawIndex < 1 << (list._level + SHIFT)) {
+ var node = list._root;
+ var level = list._level;
+ while (node && level > 0) {
+ node = node.array[(rawIndex >>> level) & MASK];
+ level -= SHIFT;
+ }
+ return node;
+ }
+ }
+
+ function setListBounds(list, begin, end) {
+ // Sanitize begin & end using this shorthand for ToInt32(argument)
+ // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32
+ if (begin !== undefined) {
+ begin = begin | 0;
+ }
+ if (end !== undefined) {
+ end = end | 0;
+ }
+ var owner = list.__ownerID || new OwnerID();
+ var oldOrigin = list._origin;
+ var oldCapacity = list._capacity;
+ var newOrigin = oldOrigin + begin;
+ var newCapacity = end === undefined ? oldCapacity : end < 0 ? oldCapacity + end : oldOrigin + end;
+ if (newOrigin === oldOrigin && newCapacity === oldCapacity) {
+ return list;
+ }
+
+ // If it's going to end after it starts, it's empty.
+ if (newOrigin >= newCapacity) {
+ return list.clear();
+ }
+
+ var newLevel = list._level;
+ var newRoot = list._root;
+
+ // New origin might need creating a higher root.
+ var offsetShift = 0;
+ while (newOrigin + offsetShift < 0) {
+ newRoot = new VNode(newRoot && newRoot.array.length ? [undefined, newRoot] : [], owner);
+ newLevel += SHIFT;
+ offsetShift += 1 << newLevel;
+ }
+ if (offsetShift) {
+ newOrigin += offsetShift;
+ oldOrigin += offsetShift;
+ newCapacity += offsetShift;
+ oldCapacity += offsetShift;
+ }
+
+ var oldTailOffset = getTailOffset(oldCapacity);
+ var newTailOffset = getTailOffset(newCapacity);
+
+ // New size might need creating a higher root.
+ while (newTailOffset >= 1 << (newLevel + SHIFT)) {
+ newRoot = new VNode(newRoot && newRoot.array.length ? [newRoot] : [], owner);
+ newLevel += SHIFT;
+ }
+
+ // Locate or create the new tail.
+ var oldTail = list._tail;
+ var newTail = newTailOffset < oldTailOffset ?
+ listNodeFor(list, newCapacity - 1) :
+ newTailOffset > oldTailOffset ? new VNode([], owner) : oldTail;
+
+ // Merge Tail into tree.
+ if (oldTail && newTailOffset > oldTailOffset && newOrigin < oldCapacity && oldTail.array.length) {
+ newRoot = editableVNode(newRoot, owner);
+ var node = newRoot;
+ for (var level = newLevel; level > SHIFT; level -= SHIFT) {
+ var idx = (oldTailOffset >>> level) & MASK;
+ node = node.array[idx] = editableVNode(node.array[idx], owner);
+ }
+ node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail;
+ }
+
+ // If the size has been reduced, there's a chance the tail needs to be trimmed.
+ if (newCapacity < oldCapacity) {
+ newTail = newTail && newTail.removeAfter(owner, 0, newCapacity);
+ }
+
+ // If the new origin is within the tail, then we do not need a root.
+ if (newOrigin >= newTailOffset) {
+ newOrigin -= newTailOffset;
+ newCapacity -= newTailOffset;
+ newLevel = SHIFT;
+ newRoot = null;
+ newTail = newTail && newTail.removeBefore(owner, 0, newOrigin);
+
+ // Otherwise, if the root has been trimmed, garbage collect.
+ } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) {
+ offsetShift = 0;
+
+ // Identify the new top root node of the subtree of the old root.
+ while (newRoot) {
+ var beginIndex = (newOrigin >>> newLevel) & MASK;
+ if (beginIndex !== (newTailOffset >>> newLevel) & MASK) {
+ break;
+ }
+ if (beginIndex) {
+ offsetShift += (1 << newLevel) * beginIndex;
+ }
+ newLevel -= SHIFT;
+ newRoot = newRoot.array[beginIndex];
+ }
+
+ // Trim the new sides of the new root.
+ if (newRoot && newOrigin > oldOrigin) {
+ newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift);
+ }
+ if (newRoot && newTailOffset < oldTailOffset) {
+ newRoot = newRoot.removeAfter(owner, newLevel, newTailOffset - offsetShift);
+ }
+ if (offsetShift) {
+ newOrigin -= offsetShift;
+ newCapacity -= offsetShift;
+ }
+ }
+
+ if (list.__ownerID) {
+ list.size = newCapacity - newOrigin;
+ list._origin = newOrigin;
+ list._capacity = newCapacity;
+ list._level = newLevel;
+ list._root = newRoot;
+ list._tail = newTail;
+ list.__hash = undefined;
+ list.__altered = true;
+ return list;
+ }
+ return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail);
+ }
+
+ function mergeIntoListWith(list, merger, iterables) {
+ var iters = [];
+ var maxSize = 0;
+ for (var ii = 0; ii < iterables.length; ii++) {
+ var value = iterables[ii];
+ var iter = IndexedIterable(value);
+ if (iter.size > maxSize) {
+ maxSize = iter.size;
+ }
+ if (!isIterable(value)) {
+ iter = iter.map(function(v ) {return fromJS(v)});
+ }
+ iters.push(iter);
+ }
+ if (maxSize > list.size) {
+ list = list.setSize(maxSize);
+ }
+ return mergeIntoCollectionWith(list, merger, iters);
+ }
+
+ function getTailOffset(size) {
+ return size < SIZE ? 0 : (((size - 1) >>> SHIFT) << SHIFT);
+ }
+
+ createClass(OrderedMap, Map);
+
+ // @pragma Construction
+
+ function OrderedMap(value) {
+ return value === null || value === undefined ? emptyOrderedMap() :
+ isOrderedMap(value) ? value :
+ emptyOrderedMap().withMutations(function(map ) {
+ var iter = KeyedIterable(value);
+ assertNotInfinite(iter.size);
+ iter.forEach(function(v, k) {return map.set(k, v)});
+ });
+ }
+
+ OrderedMap.of = function(/*...values*/) {
+ return this(arguments);
+ };
+
+ OrderedMap.prototype.toString = function() {
+ return this.__toString('OrderedMap {', '}');
+ };
+
+ // @pragma Access
+
+ OrderedMap.prototype.get = function(k, notSetValue) {
+ var index = this._map.get(k);
+ return index !== undefined ? this._list.get(index)[1] : notSetValue;
+ };
+
+ // @pragma Modification
+
+ OrderedMap.prototype.clear = function() {
+ if (this.size === 0) {
+ return this;
+ }
+ if (this.__ownerID) {
+ this.size = 0;
+ this._map.clear();
+ this._list.clear();
+ return this;
+ }
+ return emptyOrderedMap();
+ };
+
+ OrderedMap.prototype.set = function(k, v) {
+ return updateOrderedMap(this, k, v);
+ };
+
+ OrderedMap.prototype.remove = function(k) {
+ return updateOrderedMap(this, k, NOT_SET);
+ };
+
+ OrderedMap.prototype.wasAltered = function() {
+ return this._map.wasAltered() || this._list.wasAltered();
+ };
+
+ OrderedMap.prototype.__iterate = function(fn, reverse) {var this$0 = this;
+ return this._list.__iterate(
+ function(entry ) {return entry && fn(entry[1], entry[0], this$0)},
+ reverse
+ );
+ };
+
+ OrderedMap.prototype.__iterator = function(type, reverse) {
+ return this._list.fromEntrySeq().__iterator(type, reverse);
+ };
+
+ OrderedMap.prototype.__ensureOwner = function(ownerID) {
+ if (ownerID === this.__ownerID) {
+ return this;
+ }
+ var newMap = this._map.__ensureOwner(ownerID);
+ var newList = this._list.__ensureOwner(ownerID);
+ if (!ownerID) {
+ this.__ownerID = ownerID;
+ this._map = newMap;
+ this._list = newList;
+ return this;
+ }
+ return makeOrderedMap(newMap, newList, ownerID, this.__hash);
+ };
+
+
+ function isOrderedMap(maybeOrderedMap) {
+ return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap);
+ }
+
+ OrderedMap.isOrderedMap = isOrderedMap;
+
+ OrderedMap.prototype[IS_ORDERED_SENTINEL] = true;
+ OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove;
+
+
+
+ function makeOrderedMap(map, list, ownerID, hash) {
+ var omap = Object.create(OrderedMap.prototype);
+ omap.size = map ? map.size : 0;
+ omap._map = map;
+ omap._list = list;
+ omap.__ownerID = ownerID;
+ omap.__hash = hash;
+ return omap;
+ }
+
+ var EMPTY_ORDERED_MAP;
+ function emptyOrderedMap() {
+ return EMPTY_ORDERED_MAP || (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList()));
+ }
+
+ function updateOrderedMap(omap, k, v) {
+ var map = omap._map;
+ var list = omap._list;
+ var i = map.get(k);
+ var has = i !== undefined;
+ var newMap;
+ var newList;
+ if (v === NOT_SET) { // removed
+ if (!has) {
+ return omap;
+ }
+ if (list.size >= SIZE && list.size >= map.size * 2) {
+ newList = list.filter(function(entry, idx) {return entry !== undefined && i !== idx});
+ newMap = newList.toKeyedSeq().map(function(entry ) {return entry[0]}).flip().toMap();
+ if (omap.__ownerID) {
+ newMap.__ownerID = newList.__ownerID = omap.__ownerID;
+ }
+ } else {
+ newMap = map.remove(k);
+ newList = i === list.size - 1 ? list.pop() : list.set(i, undefined);
+ }
+ } else {
+ if (has) {
+ if (v === list.get(i)[1]) {
+ return omap;
+ }
+ newMap = map;
+ newList = list.set(i, [k, v]);
+ } else {
+ newMap = map.set(k, list.size);
+ newList = list.set(list.size, [k, v]);
+ }
+ }
+ if (omap.__ownerID) {
+ omap.size = newMap.size;
+ omap._map = newMap;
+ omap._list = newList;
+ omap.__hash = undefined;
+ return omap;
+ }
+ return makeOrderedMap(newMap, newList);
+ }
+
+ createClass(ToKeyedSequence, KeyedSeq);
+ function ToKeyedSequence(indexed, useKeys) {
+ this._iter = indexed;
+ this._useKeys = useKeys;
+ this.size = indexed.size;
+ }
+
+ ToKeyedSequence.prototype.get = function(key, notSetValue) {
+ return this._iter.get(key, notSetValue);
+ };
+
+ ToKeyedSequence.prototype.has = function(key) {
+ return this._iter.has(key);
+ };
+
+ ToKeyedSequence.prototype.valueSeq = function() {
+ return this._iter.valueSeq();
+ };
+
+ ToKeyedSequence.prototype.reverse = function() {var this$0 = this;
+ var reversedSequence = reverseFactory(this, true);
+ if (!this._useKeys) {
+ reversedSequence.valueSeq = function() {return this$0._iter.toSeq().reverse()};
+ }
+ return reversedSequence;
+ };
+
+ ToKeyedSequence.prototype.map = function(mapper, context) {var this$0 = this;
+ var mappedSequence = mapFactory(this, mapper, context);
+ if (!this._useKeys) {
+ mappedSequence.valueSeq = function() {return this$0._iter.toSeq().map(mapper, context)};
+ }
+ return mappedSequence;
+ };
+
+ ToKeyedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;
+ var ii;
+ return this._iter.__iterate(
+ this._useKeys ?
+ function(v, k) {return fn(v, k, this$0)} :
+ ((ii = reverse ? resolveSize(this) : 0),
+ function(v ) {return fn(v, reverse ? --ii : ii++, this$0)}),
+ reverse
+ );
+ };
+
+ ToKeyedSequence.prototype.__iterator = function(type, reverse) {
+ if (this._useKeys) {
+ return this._iter.__iterator(type, reverse);
+ }
+ var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
+ var ii = reverse ? resolveSize(this) : 0;
+ return new Iterator(function() {
+ var step = iterator.next();
+ return step.done ? step :
+ iteratorValue(type, reverse ? --ii : ii++, step.value, step);
+ });
+ };
+
+ ToKeyedSequence.prototype[IS_ORDERED_SENTINEL] = true;
+
+
+ createClass(ToIndexedSequence, IndexedSeq);
+ function ToIndexedSequence(iter) {
+ this._iter = iter;
+ this.size = iter.size;
+ }
+
+ ToIndexedSequence.prototype.includes = function(value) {
+ return this._iter.includes(value);
+ };
+
+ ToIndexedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;
+ var iterations = 0;
+ return this._iter.__iterate(function(v ) {return fn(v, iterations++, this$0)}, reverse);
+ };
+
+ ToIndexedSequence.prototype.__iterator = function(type, reverse) {
+ var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
+ var iterations = 0;
+ return new Iterator(function() {
+ var step = iterator.next();
+ return step.done ? step :
+ iteratorValue(type, iterations++, step.value, step)
+ });
+ };
+
+
+
+ createClass(ToSetSequence, SetSeq);
+ function ToSetSequence(iter) {
+ this._iter = iter;
+ this.size = iter.size;
+ }
+
+ ToSetSequence.prototype.has = function(key) {
+ return this._iter.includes(key);
+ };
+
+ ToSetSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;
+ return this._iter.__iterate(function(v ) {return fn(v, v, this$0)}, reverse);
+ };
+
+ ToSetSequence.prototype.__iterator = function(type, reverse) {
+ var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
+ return new Iterator(function() {
+ var step = iterator.next();
+ return step.done ? step :
+ iteratorValue(type, step.value, step.value, step);
+ });
+ };
+
+
+
+ createClass(FromEntriesSequence, KeyedSeq);
+ function FromEntriesSequence(entries) {
+ this._iter = entries;
+ this.size = entries.size;
+ }
+
+ FromEntriesSequence.prototype.entrySeq = function() {
+ return this._iter.toSeq();
+ };
+
+ FromEntriesSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;
+ return this._iter.__iterate(function(entry ) {
+ // Check if entry exists first so array access doesn't throw for holes
+ // in the parent iteration.
+ if (entry) {
+ validateEntry(entry);
+ var indexedIterable = isIterable(entry);
+ return fn(
+ indexedIterable ? entry.get(1) : entry[1],
+ indexedIterable ? entry.get(0) : entry[0],
+ this$0
+ );
+ }
+ }, reverse);
+ };
+
+ FromEntriesSequence.prototype.__iterator = function(type, reverse) {
+ var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
+ return new Iterator(function() {
+ while (true) {
+ var step = iterator.next();
+ if (step.done) {
+ return step;
+ }
+ var entry = step.value;
+ // Check if entry exists first so array access doesn't throw for holes
+ // in the parent iteration.
+ if (entry) {
+ validateEntry(entry);
+ var indexedIterable = isIterable(entry);
+ return iteratorValue(
+ type,
+ indexedIterable ? entry.get(0) : entry[0],
+ indexedIterable ? entry.get(1) : entry[1],
+ step
+ );
+ }
+ }
+ });
+ };
+
+
+ ToIndexedSequence.prototype.cacheResult =
+ ToKeyedSequence.prototype.cacheResult =
+ ToSetSequence.prototype.cacheResult =
+ FromEntriesSequence.prototype.cacheResult =
+ cacheResultThrough;
+
+
+ function flipFactory(iterable) {
+ var flipSequence = makeSequence(iterable);
+ flipSequence._iter = iterable;
+ flipSequence.size = iterable.size;
+ flipSequence.flip = function() {return iterable};
+ flipSequence.reverse = function () {
+ var reversedSequence = iterable.reverse.apply(this); // super.reverse()
+ reversedSequence.flip = function() {return iterable.reverse()};
+ return reversedSequence;
+ };
+ flipSequence.has = function(key ) {return iterable.includes(key)};
+ flipSequence.includes = function(key ) {return iterable.has(key)};
+ flipSequence.cacheResult = cacheResultThrough;
+ flipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;
+ return iterable.__iterate(function(v, k) {return fn(k, v, this$0) !== false}, reverse);
+ }
+ flipSequence.__iteratorUncached = function(type, reverse) {
+ if (type === ITERATE_ENTRIES) {
+ var iterator = iterable.__iterator(type, reverse);
+ return new Iterator(function() {
+ var step = iterator.next();
+ if (!step.done) {
+ var k = step.value[0];
+ step.value[0] = step.value[1];
+ step.value[1] = k;
+ }
+ return step;
+ });
+ }
+ return iterable.__iterator(
+ type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES,
+ reverse
+ );
+ }
+ return flipSequence;
+ }
+
+
+ function mapFactory(iterable, mapper, context) {
+ var mappedSequence = makeSequence(iterable);
+ mappedSequence.size = iterable.size;
+ mappedSequence.has = function(key ) {return iterable.has(key)};
+ mappedSequence.get = function(key, notSetValue) {
+ var v = iterable.get(key, NOT_SET);
+ return v === NOT_SET ?
+ notSetValue :
+ mapper.call(context, v, key, iterable);
+ };
+ mappedSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;
+ return iterable.__iterate(
+ function(v, k, c) {return fn(mapper.call(context, v, k, c), k, this$0) !== false},
+ reverse
+ );
+ }
+ mappedSequence.__iteratorUncached = function (type, reverse) {
+ var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);
+ return new Iterator(function() {
+ var step = iterator.next();
+ if (step.done) {
+ return step;
+ }
+ var entry = step.value;
+ var key = entry[0];
+ return iteratorValue(
+ type,
+ key,
+ mapper.call(context, entry[1], key, iterable),
+ step
+ );
+ });
+ }
+ return mappedSequence;
+ }
+
+
+ function reverseFactory(iterable, useKeys) {
+ var reversedSequence = makeSequence(iterable);
+ reversedSequence._iter = iterable;
+ reversedSequence.size = iterable.size;
+ reversedSequence.reverse = function() {return iterable};
+ if (iterable.flip) {
+ reversedSequence.flip = function () {
+ var flipSequence = flipFactory(iterable);
+ flipSequence.reverse = function() {return iterable.flip()};
+ return flipSequence;
+ };
+ }
+ reversedSequence.get = function(key, notSetValue)
+ {return iterable.get(useKeys ? key : -1 - key, notSetValue)};
+ reversedSequence.has = function(key )
+ {return iterable.has(useKeys ? key : -1 - key)};
+ reversedSequence.includes = function(value ) {return iterable.includes(value)};
+ reversedSequence.cacheResult = cacheResultThrough;
+ reversedSequence.__iterate = function (fn, reverse) {var this$0 = this;
+ return iterable.__iterate(function(v, k) {return fn(v, k, this$0)}, !reverse);
+ };
+ reversedSequence.__iterator =
+ function(type, reverse) {return iterable.__iterator(type, !reverse)};
+ return reversedSequence;
+ }
+
+
+ function filterFactory(iterable, predicate, context, useKeys) {
+ var filterSequence = makeSequence(iterable);
+ if (useKeys) {
+ filterSequence.has = function(key ) {
+ var v = iterable.get(key, NOT_SET);
+ return v !== NOT_SET && !!predicate.call(context, v, key, iterable);
+ };
+ filterSequence.get = function(key, notSetValue) {
+ var v = iterable.get(key, NOT_SET);
+ return v !== NOT_SET && predicate.call(context, v, key, iterable) ?
+ v : notSetValue;
+ };
+ }
+ filterSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;
+ var iterations = 0;
+ iterable.__iterate(function(v, k, c) {
+ if (predicate.call(context, v, k, c)) {
+ iterations++;
+ return fn(v, useKeys ? k : iterations - 1, this$0);
+ }
+ }, reverse);
+ return iterations;
+ };
+ filterSequence.__iteratorUncached = function (type, reverse) {
+ var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);
+ var iterations = 0;
+ return new Iterator(function() {
+ while (true) {
+ var step = iterator.next();
+ if (step.done) {
+ return step;
+ }
+ var entry = step.value;
+ var key = entry[0];
+ var value = entry[1];
+ if (predicate.call(context, value, key, iterable)) {
+ return iteratorValue(type, useKeys ? key : iterations++, value, step);
+ }
+ }
+ });
+ }
+ return filterSequence;
+ }
+
+
+ function countByFactory(iterable, grouper, context) {
+ var groups = Map().asMutable();
+ iterable.__iterate(function(v, k) {
+ groups.update(
+ grouper.call(context, v, k, iterable),
+ 0,
+ function(a ) {return a + 1}
+ );
+ });
+ return groups.asImmutable();
+ }
+
+
+ function groupByFactory(iterable, grouper, context) {
+ var isKeyedIter = isKeyed(iterable);
+ var groups = (isOrdered(iterable) ? OrderedMap() : Map()).asMutable();
+ iterable.__iterate(function(v, k) {
+ groups.update(
+ grouper.call(context, v, k, iterable),
+ function(a ) {return (a = a || [], a.push(isKeyedIter ? [k, v] : v), a)}
+ );
+ });
+ var coerce = iterableClass(iterable);
+ return groups.map(function(arr ) {return reify(iterable, coerce(arr))});
+ }
+
+
+ function sliceFactory(iterable, begin, end, useKeys) {
+ var originalSize = iterable.size;
+
+ // Sanitize begin & end using this shorthand for ToInt32(argument)
+ // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32
+ if (begin !== undefined) {
+ begin = begin | 0;
+ }
+ if (end !== undefined) {
+ end = end | 0;
+ }
+
+ if (wholeSlice(begin, end, originalSize)) {
+ return iterable;
+ }
+
+ var resolvedBegin = resolveBegin(begin, originalSize);
+ var resolvedEnd = resolveEnd(end, originalSize);
+
+ // begin or end will be NaN if they were provided as negative numbers and
+ // this iterable's size is unknown. In that case, cache first so there is
+ // a known size and these do not resolve to NaN.
+ if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) {
+ return sliceFactory(iterable.toSeq().cacheResult(), begin, end, useKeys);
+ }
+
+ // Note: resolvedEnd is undefined when the original sequence's length is
+ // unknown and this slice did not supply an end and should contain all
+ // elements after resolvedBegin.
+ // In that case, resolvedSize will be NaN and sliceSize will remain undefined.
+ var resolvedSize = resolvedEnd - resolvedBegin;
+ var sliceSize;
+ if (resolvedSize === resolvedSize) {
+ sliceSize = resolvedSize < 0 ? 0 : resolvedSize;
+ }
+
+ var sliceSeq = makeSequence(iterable);
+
+ // If iterable.size is undefined, the size of the realized sliceSeq is
+ // unknown at this point unless the number of items to slice is 0
+ sliceSeq.size = sliceSize === 0 ? sliceSize : iterable.size && sliceSize || undefined;
+
+ if (!useKeys && isSeq(iterable) && sliceSize >= 0) {
+ sliceSeq.get = function (index, notSetValue) {
+ index = wrapIndex(this, index);
+ return index >= 0 && index < sliceSize ?
+ iterable.get(index + resolvedBegin, notSetValue) :
+ notSetValue;
+ }
+ }
+
+ sliceSeq.__iterateUncached = function(fn, reverse) {var this$0 = this;
+ if (sliceSize === 0) {
+ return 0;
+ }
+ if (reverse) {
+ return this.cacheResult().__iterate(fn, reverse);
+ }
+ var skipped = 0;
+ var isSkipping = true;
+ var iterations = 0;
+ iterable.__iterate(function(v, k) {
+ if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) {
+ iterations++;
+ return fn(v, useKeys ? k : iterations - 1, this$0) !== false &&
+ iterations !== sliceSize;
+ }
+ });
+ return iterations;
+ };
+
+ sliceSeq.__iteratorUncached = function(type, reverse) {
+ if (sliceSize !== 0 && reverse) {
+ return this.cacheResult().__iterator(type, reverse);
+ }
+ // Don't bother instantiating parent iterator if taking 0.
+ var iterator = sliceSize !== 0 && iterable.__iterator(type, reverse);
+ var skipped = 0;
+ var iterations = 0;
+ return new Iterator(function() {
+ while (skipped++ < resolvedBegin) {
+ iterator.next();
+ }
+ if (++iterations > sliceSize) {
+ return iteratorDone();
+ }
+ var step = iterator.next();
+ if (useKeys || type === ITERATE_VALUES) {
+ return step;
+ } else if (type === ITERATE_KEYS) {
+ return iteratorValue(type, iterations - 1, undefined, step);
+ } else {
+ return iteratorValue(type, iterations - 1, step.value[1], step);
+ }
+ });
+ }
+
+ return sliceSeq;
+ }
+
+
+ function takeWhileFactory(iterable, predicate, context) {
+ var takeSequence = makeSequence(iterable);
+ takeSequence.__iterateUncached = function(fn, reverse) {var this$0 = this;
+ if (reverse) {
+ return this.cacheResult().__iterate(fn, reverse);
+ }
+ var iterations = 0;
+ iterable.__iterate(function(v, k, c)
+ {return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$0)}
+ );
+ return iterations;
+ };
+ takeSequence.__iteratorUncached = function(type, reverse) {var this$0 = this;
+ if (reverse) {
+ return this.cacheResult().__iterator(type, reverse);
+ }
+ var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);
+ var iterating = true;
+ return new Iterator(function() {
+ if (!iterating) {
+ return iteratorDone();
+ }
+ var step = iterator.next();
+ if (step.done) {
+ return step;
+ }
+ var entry = step.value;
+ var k = entry[0];
+ var v = entry[1];
+ if (!predicate.call(context, v, k, this$0)) {
+ iterating = false;
+ return iteratorDone();
+ }
+ return type === ITERATE_ENTRIES ? step :
+ iteratorValue(type, k, v, step);
+ });
+ };
+ return takeSequence;
+ }
+
+
+ function skipWhileFactory(iterable, predicate, context, useKeys) {
+ var skipSequence = makeSequence(iterable);
+ skipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;
+ if (reverse) {
+ return this.cacheResult().__iterate(fn, reverse);
+ }
+ var isSkipping = true;
+ var iterations = 0;
+ iterable.__iterate(function(v, k, c) {
+ if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) {
+ iterations++;
+ return fn(v, useKeys ? k : iterations - 1, this$0);
+ }
+ });
+ return iterations;
+ };
+ skipSequence.__iteratorUncached = function(type, reverse) {var this$0 = this;
+ if (reverse) {
+ return this.cacheResult().__iterator(type, reverse);
+ }
+ var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);
+ var skipping = true;
+ var iterations = 0;
+ return new Iterator(function() {
+ var step, k, v;
+ do {
+ step = iterator.next();
+ if (step.done) {
+ if (useKeys || type === ITERATE_VALUES) {
+ return step;
+ } else if (type === ITERATE_KEYS) {
+ return iteratorValue(type, iterations++, undefined, step);
+ } else {
+ return iteratorValue(type, iterations++, step.value[1], step);
+ }
+ }
+ var entry = step.value;
+ k = entry[0];
+ v = entry[1];
+ skipping && (skipping = predicate.call(context, v, k, this$0));
+ } while (skipping);
+ return type === ITERATE_ENTRIES ? step :
+ iteratorValue(type, k, v, step);
+ });
+ };
+ return skipSequence;
+ }
+
+
+ function concatFactory(iterable, values) {
+ var isKeyedIterable = isKeyed(iterable);
+ var iters = [iterable].concat(values).map(function(v ) {
+ if (!isIterable(v)) {
+ v = isKeyedIterable ?
+ keyedSeqFromValue(v) :
+ indexedSeqFromValue(Array.isArray(v) ? v : [v]);
+ } else if (isKeyedIterable) {
+ v = KeyedIterable(v);
+ }
+ return v;
+ }).filter(function(v ) {return v.size !== 0});
+
+ if (iters.length === 0) {
+ return iterable;
+ }
+
+ if (iters.length === 1) {
+ var singleton = iters[0];
+ if (singleton === iterable ||
+ isKeyedIterable && isKeyed(singleton) ||
+ isIndexed(iterable) && isIndexed(singleton)) {
+ return singleton;
+ }
+ }
+
+ var concatSeq = new ArraySeq(iters);
+ if (isKeyedIterable) {
+ concatSeq = concatSeq.toKeyedSeq();
+ } else if (!isIndexed(iterable)) {
+ concatSeq = concatSeq.toSetSeq();
+ }
+ concatSeq = concatSeq.flatten(true);
+ concatSeq.size = iters.reduce(
+ function(sum, seq) {
+ if (sum !== undefined) {
+ var size = seq.size;
+ if (size !== undefined) {
+ return sum + size;
+ }
+ }
+ },
+ 0
+ );
+ return concatSeq;
+ }
+
+
+ function flattenFactory(iterable, depth, useKeys) {
+ var flatSequence = makeSequence(iterable);
+ flatSequence.__iterateUncached = function(fn, reverse) {
+ var iterations = 0;
+ var stopped = false;
+ function flatDeep(iter, currentDepth) {var this$0 = this;
+ iter.__iterate(function(v, k) {
+ if ((!depth || currentDepth < depth) && isIterable(v)) {
+ flatDeep(v, currentDepth + 1);
+ } else if (fn(v, useKeys ? k : iterations++, this$0) === false) {
+ stopped = true;
+ }
+ return !stopped;
+ }, reverse);
+ }
+ flatDeep(iterable, 0);
+ return iterations;
+ }
+ flatSequence.__iteratorUncached = function(type, reverse) {
+ var iterator = iterable.__iterator(type, reverse);
+ var stack = [];
+ var iterations = 0;
+ return new Iterator(function() {
+ while (iterator) {
+ var step = iterator.next();
+ if (step.done !== false) {
+ iterator = stack.pop();
+ continue;
+ }
+ var v = step.value;
+ if (type === ITERATE_ENTRIES) {
+ v = v[1];
+ }
+ if ((!depth || stack.length < depth) && isIterable(v)) {
+ stack.push(iterator);
+ iterator = v.__iterator(type, reverse);
+ } else {
+ return useKeys ? step : iteratorValue(type, iterations++, v, step);
+ }
+ }
+ return iteratorDone();
+ });
+ }
+ return flatSequence;
+ }
+
+
+ function flatMapFactory(iterable, mapper, context) {
+ var coerce = iterableClass(iterable);
+ return iterable.toSeq().map(
+ function(v, k) {return coerce(mapper.call(context, v, k, iterable))}
+ ).flatten(true);
+ }
+
+
+ function interposeFactory(iterable, separator) {
+ var interposedSequence = makeSequence(iterable);
+ interposedSequence.size = iterable.size && iterable.size * 2 -1;
+ interposedSequence.__iterateUncached = function(fn, reverse) {var this$0 = this;
+ var iterations = 0;
+ iterable.__iterate(function(v, k)
+ {return (!iterations || fn(separator, iterations++, this$0) !== false) &&
+ fn(v, iterations++, this$0) !== false},
+ reverse
+ );
+ return iterations;
+ };
+ interposedSequence.__iteratorUncached = function(type, reverse) {
+ var iterator = iterable.__iterator(ITERATE_VALUES, reverse);
+ var iterations = 0;
+ var step;
+ return new Iterator(function() {
+ if (!step || iterations % 2) {
+ step = iterator.next();
+ if (step.done) {
+ return step;
+ }
+ }
+ return iterations % 2 ?
+ iteratorValue(type, iterations++, separator) :
+ iteratorValue(type, iterations++, step.value, step);
+ });
+ };
+ return interposedSequence;
+ }
+
+
+ function sortFactory(iterable, comparator, mapper) {
+ if (!comparator) {
+ comparator = defaultComparator;
+ }
+ var isKeyedIterable = isKeyed(iterable);
+ var index = 0;
+ var entries = iterable.toSeq().map(
+ function(v, k) {return [k, v, index++, mapper ? mapper(v, k, iterable) : v]}
+ ).toArray();
+ entries.sort(function(a, b) {return comparator(a[3], b[3]) || a[2] - b[2]}).forEach(
+ isKeyedIterable ?
+ function(v, i) { entries[i].length = 2; } :
+ function(v, i) { entries[i] = v[1]; }
+ );
+ return isKeyedIterable ? KeyedSeq(entries) :
+ isIndexed(iterable) ? IndexedSeq(entries) :
+ SetSeq(entries);
+ }
+
+
+ function maxFactory(iterable, comparator, mapper) {
+ if (!comparator) {
+ comparator = defaultComparator;
+ }
+ if (mapper) {
+ var entry = iterable.toSeq()
+ .map(function(v, k) {return [v, mapper(v, k, iterable)]})
+ .reduce(function(a, b) {return maxCompare(comparator, a[1], b[1]) ? b : a});
+ return entry && entry[0];
+ } else {
+ return iterable.reduce(function(a, b) {return maxCompare(comparator, a, b) ? b : a});
+ }
+ }
+
+ function maxCompare(comparator, a, b) {
+ var comp = comparator(b, a);
+ // b is considered the new max if the comparator declares them equal, but
+ // they are not equal and b is in fact a nullish value.
+ return (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) || comp > 0;
+ }
+
+
+ function zipWithFactory(keyIter, zipper, iters) {
+ var zipSequence = makeSequence(keyIter);
+ zipSequence.size = new ArraySeq(iters).map(function(i ) {return i.size}).min();
+ // Note: this a generic base implementation of __iterate in terms of
+ // __iterator which may be more generically useful in the future.
+ zipSequence.__iterate = function(fn, reverse) {
+ /* generic:
+ var iterator = this.__iterator(ITERATE_ENTRIES, reverse);
+ var step;
+ var iterations = 0;
+ while (!(step = iterator.next()).done) {
+ iterations++;
+ if (fn(step.value[1], step.value[0], this) === false) {
+ break;
+ }
+ }
+ return iterations;
+ */
+ // indexed:
+ var iterator = this.__iterator(ITERATE_VALUES, reverse);
+ var step;
+ var iterations = 0;
+ while (!(step = iterator.next()).done) {
+ if (fn(step.value, iterations++, this) === false) {
+ break;
+ }
+ }
+ return iterations;
+ };
+ zipSequence.__iteratorUncached = function(type, reverse) {
+ var iterators = iters.map(function(i )
+ {return (i = Iterable(i), getIterator(reverse ? i.reverse() : i))}
+ );
+ var iterations = 0;
+ var isDone = false;
+ return new Iterator(function() {
+ var steps;
+ if (!isDone) {
+ steps = iterators.map(function(i ) {return i.next()});
+ isDone = steps.some(function(s ) {return s.done});
+ }
+ if (isDone) {
+ return iteratorDone();
+ }
+ return iteratorValue(
+ type,
+ iterations++,
+ zipper.apply(null, steps.map(function(s ) {return s.value}))
+ );
+ });
+ };
+ return zipSequence
+ }
+
+
+ // #pragma Helper Functions
+
+ function reify(iter, seq) {
+ return isSeq(iter) ? seq : iter.constructor(seq);
+ }
+
+ function validateEntry(entry) {
+ if (entry !== Object(entry)) {
+ throw new TypeError('Expected [K, V] tuple: ' + entry);
+ }
+ }
+
+ function resolveSize(iter) {
+ assertNotInfinite(iter.size);
+ return ensureSize(iter);
+ }
+
+ function iterableClass(iterable) {
+ return isKeyed(iterable) ? KeyedIterable :
+ isIndexed(iterable) ? IndexedIterable :
+ SetIterable;
+ }
+
+ function makeSequence(iterable) {
+ return Object.create(
+ (
+ isKeyed(iterable) ? KeyedSeq :
+ isIndexed(iterable) ? IndexedSeq :
+ SetSeq
+ ).prototype
+ );
+ }
+
+ function cacheResultThrough() {
+ if (this._iter.cacheResult) {
+ this._iter.cacheResult();
+ this.size = this._iter.size;
+ return this;
+ } else {
+ return Seq.prototype.cacheResult.call(this);
+ }
+ }
+
+ function defaultComparator(a, b) {
+ return a > b ? 1 : a < b ? -1 : 0;
+ }
+
+ function forceIterator(keyPath) {
+ var iter = getIterator(keyPath);
+ if (!iter) {
+ // Array might not be iterable in this environment, so we need a fallback
+ // to our wrapped type.
+ if (!isArrayLike(keyPath)) {
+ throw new TypeError('Expected iterable or array-like: ' + keyPath);
+ }
+ iter = getIterator(Iterable(keyPath));
+ }
+ return iter;
+ }
+
+ createClass(Record, KeyedCollection);
+
+ function Record(defaultValues, name) {
+ var hasInitialized;
+
+ var RecordType = function Record(values) {
+ if (values instanceof RecordType) {
+ return values;
+ }
+ if (!(this instanceof RecordType)) {
+ return new RecordType(values);
+ }
+ if (!hasInitialized) {
+ hasInitialized = true;
+ var keys = Object.keys(defaultValues);
+ setProps(RecordTypePrototype, keys);
+ RecordTypePrototype.size = keys.length;
+ RecordTypePrototype._name = name;
+ RecordTypePrototype._keys = keys;
+ RecordTypePrototype._defaultValues = defaultValues;
+ }
+ this._map = Map(values);
+ };
+
+ var RecordTypePrototype = RecordType.prototype = Object.create(RecordPrototype);
+ RecordTypePrototype.constructor = RecordType;
+
+ return RecordType;
+ }
+
+ Record.prototype.toString = function() {
+ return this.__toString(recordName(this) + ' {', '}');
+ };
+
+ // @pragma Access
+
+ Record.prototype.has = function(k) {
+ return this._defaultValues.hasOwnProperty(k);
+ };
+
+ Record.prototype.get = function(k, notSetValue) {
+ if (!this.has(k)) {
+ return notSetValue;
+ }
+ var defaultVal = this._defaultValues[k];
+ return this._map ? this._map.get(k, defaultVal) : defaultVal;
+ };
+
+ // @pragma Modification
+
+ Record.prototype.clear = function() {
+ if (this.__ownerID) {
+ this._map && this._map.clear();
+ return this;
+ }
+ var RecordType = this.constructor;
+ return RecordType._empty || (RecordType._empty = makeRecord(this, emptyMap()));
+ };
+
+ Record.prototype.set = function(k, v) {
+ if (!this.has(k)) {
+ throw new Error('Cannot set unknown key "' + k + '" on ' + recordName(this));
+ }
+ var newMap = this._map && this._map.set(k, v);
+ if (this.__ownerID || newMap === this._map) {
+ return this;
+ }
+ return makeRecord(this, newMap);
+ };
+
+ Record.prototype.remove = function(k) {
+ if (!this.has(k)) {
+ return this;
+ }
+ var newMap = this._map && this._map.remove(k);
+ if (this.__ownerID || newMap === this._map) {
+ return this;
+ }
+ return makeRecord(this, newMap);
+ };
+
+ Record.prototype.wasAltered = function() {
+ return this._map.wasAltered();
+ };
+
+ Record.prototype.__iterator = function(type, reverse) {var this$0 = this;
+ return KeyedIterable(this._defaultValues).map(function(_, k) {return this$0.get(k)}).__iterator(type, reverse);
+ };
+
+ Record.prototype.__iterate = function(fn, reverse) {var this$0 = this;
+ return KeyedIterable(this._defaultValues).map(function(_, k) {return this$0.get(k)}).__iterate(fn, reverse);
+ };
+
+ Record.prototype.__ensureOwner = function(ownerID) {
+ if (ownerID === this.__ownerID) {
+ return this;
+ }
+ var newMap = this._map && this._map.__ensureOwner(ownerID);
+ if (!ownerID) {
+ this.__ownerID = ownerID;
+ this._map = newMap;
+ return this;
+ }
+ return makeRecord(this, newMap, ownerID);
+ };
+
+
+ var RecordPrototype = Record.prototype;
+ RecordPrototype[DELETE] = RecordPrototype.remove;
+ RecordPrototype.deleteIn =
+ RecordPrototype.removeIn = MapPrototype.removeIn;
+ RecordPrototype.merge = MapPrototype.merge;
+ RecordPrototype.mergeWith = MapPrototype.mergeWith;
+ RecordPrototype.mergeIn = MapPrototype.mergeIn;
+ RecordPrototype.mergeDeep = MapPrototype.mergeDeep;
+ RecordPrototype.mergeDeepWith = MapPrototype.mergeDeepWith;
+ RecordPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;
+ RecordPrototype.setIn = MapPrototype.setIn;
+ RecordPrototype.update = MapPrototype.update;
+ RecordPrototype.updateIn = MapPrototype.updateIn;
+ RecordPrototype.withMutations = MapPrototype.withMutations;
+ RecordPrototype.asMutable = MapPrototype.asMutable;
+ RecordPrototype.asImmutable = MapPrototype.asImmutable;
+
+
+ function makeRecord(likeRecord, map, ownerID) {
+ var record = Object.create(Object.getPrototypeOf(likeRecord));
+ record._map = map;
+ record.__ownerID = ownerID;
+ return record;
+ }
+
+ function recordName(record) {
+ return record._name || record.constructor.name || 'Record';
+ }
+
+ function setProps(prototype, names) {
+ try {
+ names.forEach(setProp.bind(undefined, prototype));
+ } catch (error) {
+ // Object.defineProperty failed. Probably IE8.
+ }
+ }
+
+ function setProp(prototype, name) {
+ Object.defineProperty(prototype, name, {
+ get: function() {
+ return this.get(name);
+ },
+ set: function(value) {
+ invariant(this.__ownerID, 'Cannot set on an immutable record.');
+ this.set(name, value);
+ }
+ });
+ }
+
+ createClass(Set, SetCollection);
+
+ // @pragma Construction
+
+ function Set(value) {
+ return value === null || value === undefined ? emptySet() :
+ isSet(value) && !isOrdered(value) ? value :
+ emptySet().withMutations(function(set ) {
+ var iter = SetIterable(value);
+ assertNotInfinite(iter.size);
+ iter.forEach(function(v ) {return set.add(v)});
+ });
+ }
+
+ Set.of = function(/*...values*/) {
+ return this(arguments);
+ };
+
+ Set.fromKeys = function(value) {
+ return this(KeyedIterable(value).keySeq());
+ };
+
+ Set.prototype.toString = function() {
+ return this.__toString('Set {', '}');
+ };
+
+ // @pragma Access
+
+ Set.prototype.has = function(value) {
+ return this._map.has(value);
+ };
+
+ // @pragma Modification
+
+ Set.prototype.add = function(value) {
+ return updateSet(this, this._map.set(value, true));
+ };
+
+ Set.prototype.remove = function(value) {
+ return updateSet(this, this._map.remove(value));
+ };
+
+ Set.prototype.clear = function() {
+ return updateSet(this, this._map.clear());
+ };
+
+ // @pragma Composition
+
+ Set.prototype.union = function() {var iters = SLICE$0.call(arguments, 0);
+ iters = iters.filter(function(x ) {return x.size !== 0});
+ if (iters.length === 0) {
+ return this;
+ }
+ if (this.size === 0 && !this.__ownerID && iters.length === 1) {
+ return this.constructor(iters[0]);
+ }
+ return this.withMutations(function(set ) {
+ for (var ii = 0; ii < iters.length; ii++) {
+ SetIterable(iters[ii]).forEach(function(value ) {return set.add(value)});
+ }
+ });
+ };
+
+ Set.prototype.intersect = function() {var iters = SLICE$0.call(arguments, 0);
+ if (iters.length === 0) {
+ return this;
+ }
+ iters = iters.map(function(iter ) {return SetIterable(iter)});
+ var originalSet = this;
+ return this.withMutations(function(set ) {
+ originalSet.forEach(function(value ) {
+ if (!iters.every(function(iter ) {return iter.includes(value)})) {
+ set.remove(value);
+ }
+ });
+ });
+ };
+
+ Set.prototype.subtract = function() {var iters = SLICE$0.call(arguments, 0);
+ if (iters.length === 0) {
+ return this;
+ }
+ iters = iters.map(function(iter ) {return SetIterable(iter)});
+ var originalSet = this;
+ return this.withMutations(function(set ) {
+ originalSet.forEach(function(value ) {
+ if (iters.some(function(iter ) {return iter.includes(value)})) {
+ set.remove(value);
+ }
+ });
+ });
+ };
+
+ Set.prototype.merge = function() {
+ return this.union.apply(this, arguments);
+ };
+
+ Set.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);
+ return this.union.apply(this, iters);
+ };
+
+ Set.prototype.sort = function(comparator) {
+ // Late binding
+ return OrderedSet(sortFactory(this, comparator));
+ };
+
+ Set.prototype.sortBy = function(mapper, comparator) {
+ // Late binding
+ return OrderedSet(sortFactory(this, comparator, mapper));
+ };
+
+ Set.prototype.wasAltered = function() {
+ return this._map.wasAltered();
+ };
+
+ Set.prototype.__iterate = function(fn, reverse) {var this$0 = this;
+ return this._map.__iterate(function(_, k) {return fn(k, k, this$0)}, reverse);
+ };
+
+ Set.prototype.__iterator = function(type, reverse) {
+ return this._map.map(function(_, k) {return k}).__iterator(type, reverse);
+ };
+
+ Set.prototype.__ensureOwner = function(ownerID) {
+ if (ownerID === this.__ownerID) {
+ return this;
+ }
+ var newMap = this._map.__ensureOwner(ownerID);
+ if (!ownerID) {
+ this.__ownerID = ownerID;
+ this._map = newMap;
+ return this;
+ }
+ return this.__make(newMap, ownerID);
+ };
+
+
+ function isSet(maybeSet) {
+ return !!(maybeSet && maybeSet[IS_SET_SENTINEL]);
+ }
+
+ Set.isSet = isSet;
+
+ var IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';
+
+ var SetPrototype = Set.prototype;
+ SetPrototype[IS_SET_SENTINEL] = true;
+ SetPrototype[DELETE] = SetPrototype.remove;
+ SetPrototype.mergeDeep = SetPrototype.merge;
+ SetPrototype.mergeDeepWith = SetPrototype.mergeWith;
+ SetPrototype.withMutations = MapPrototype.withMutations;
+ SetPrototype.asMutable = MapPrototype.asMutable;
+ SetPrototype.asImmutable = MapPrototype.asImmutable;
+
+ SetPrototype.__empty = emptySet;
+ SetPrototype.__make = makeSet;
+
+ function updateSet(set, newMap) {
+ if (set.__ownerID) {
+ set.size = newMap.size;
+ set._map = newMap;
+ return set;
+ }
+ return newMap === set._map ? set :
+ newMap.size === 0 ? set.__empty() :
+ set.__make(newMap);
+ }
+
+ function makeSet(map, ownerID) {
+ var set = Object.create(SetPrototype);
+ set.size = map ? map.size : 0;
+ set._map = map;
+ set.__ownerID = ownerID;
+ return set;
+ }
+
+ var EMPTY_SET;
+ function emptySet() {
+ return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap()));
+ }
+
+ createClass(OrderedSet, Set);
+
+ // @pragma Construction
+
+ function OrderedSet(value) {
+ return value === null || value === undefined ? emptyOrderedSet() :
+ isOrderedSet(value) ? value :
+ emptyOrderedSet().withMutations(function(set ) {
+ var iter = SetIterable(value);
+ assertNotInfinite(iter.size);
+ iter.forEach(function(v ) {return set.add(v)});
+ });
+ }
+
+ OrderedSet.of = function(/*...values*/) {
+ return this(arguments);
+ };
+
+ OrderedSet.fromKeys = function(value) {
+ return this(KeyedIterable(value).keySeq());
+ };
+
+ OrderedSet.prototype.toString = function() {
+ return this.__toString('OrderedSet {', '}');
+ };
+
+
+ function isOrderedSet(maybeOrderedSet) {
+ return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet);
+ }
+
+ OrderedSet.isOrderedSet = isOrderedSet;
+
+ var OrderedSetPrototype = OrderedSet.prototype;
+ OrderedSetPrototype[IS_ORDERED_SENTINEL] = true;
+
+ OrderedSetPrototype.__empty = emptyOrderedSet;
+ OrderedSetPrototype.__make = makeOrderedSet;
+
+ function makeOrderedSet(map, ownerID) {
+ var set = Object.create(OrderedSetPrototype);
+ set.size = map ? map.size : 0;
+ set._map = map;
+ set.__ownerID = ownerID;
+ return set;
+ }
+
+ var EMPTY_ORDERED_SET;
+ function emptyOrderedSet() {
+ return EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap()));
+ }
+
+ createClass(Stack, IndexedCollection);
+
+ // @pragma Construction
+
+ function Stack(value) {
+ return value === null || value === undefined ? emptyStack() :
+ isStack(value) ? value :
+ emptyStack().unshiftAll(value);
+ }
+
+ Stack.of = function(/*...values*/) {
+ return this(arguments);
+ };
+
+ Stack.prototype.toString = function() {
+ return this.__toString('Stack [', ']');
+ };
+
+ // @pragma Access
+
+ Stack.prototype.get = function(index, notSetValue) {
+ var head = this._head;
+ index = wrapIndex(this, index);
+ while (head && index--) {
+ head = head.next;
+ }
+ return head ? head.value : notSetValue;
+ };
+
+ Stack.prototype.peek = function() {
+ return this._head && this._head.value;
+ };
+
+ // @pragma Modification
+
+ Stack.prototype.push = function(/*...values*/) {
+ if (arguments.length === 0) {
+ return this;
+ }
+ var newSize = this.size + arguments.length;
+ var head = this._head;
+ for (var ii = arguments.length - 1; ii >= 0; ii--) {
+ head = {
+ value: arguments[ii],
+ next: head
+ };
+ }
+ if (this.__ownerID) {
+ this.size = newSize;
+ this._head = head;
+ this.__hash = undefined;
+ this.__altered = true;
+ return this;
+ }
+ return makeStack(newSize, head);
+ };
+
+ Stack.prototype.pushAll = function(iter) {
+ iter = IndexedIterable(iter);
+ if (iter.size === 0) {
+ return this;
+ }
+ assertNotInfinite(iter.size);
+ var newSize = this.size;
+ var head = this._head;
+ iter.reverse().forEach(function(value ) {
+ newSize++;
+ head = {
+ value: value,
+ next: head
+ };
+ });
+ if (this.__ownerID) {
+ this.size = newSize;
+ this._head = head;
+ this.__hash = undefined;
+ this.__altered = true;
+ return this;
+ }
+ return makeStack(newSize, head);
+ };
+
+ Stack.prototype.pop = function() {
+ return this.slice(1);
+ };
+
+ Stack.prototype.unshift = function(/*...values*/) {
+ return this.push.apply(this, arguments);
+ };
+
+ Stack.prototype.unshiftAll = function(iter) {
+ return this.pushAll(iter);
+ };
+
+ Stack.prototype.shift = function() {
+ return this.pop.apply(this, arguments);
+ };
+
+ Stack.prototype.clear = function() {
+ if (this.size === 0) {
+ return this;
+ }
+ if (this.__ownerID) {
+ this.size = 0;
+ this._head = undefined;
+ this.__hash = undefined;
+ this.__altered = true;
+ return this;
+ }
+ return emptyStack();
+ };
+
+ Stack.prototype.slice = function(begin, end) {
+ if (wholeSlice(begin, end, this.size)) {
+ return this;
+ }
+ var resolvedBegin = resolveBegin(begin, this.size);
+ var resolvedEnd = resolveEnd(end, this.size);
+ if (resolvedEnd !== this.size) {
+ // super.slice(begin, end);
+ return IndexedCollection.prototype.slice.call(this, begin, end);
+ }
+ var newSize = this.size - resolvedBegin;
+ var head = this._head;
+ while (resolvedBegin--) {
+ head = head.next;
+ }
+ if (this.__ownerID) {
+ this.size = newSize;
+ this._head = head;
+ this.__hash = undefined;
+ this.__altered = true;
+ return this;
+ }
+ return makeStack(newSize, head);
+ };
+
+ // @pragma Mutability
+
+ Stack.prototype.__ensureOwner = function(ownerID) {
+ if (ownerID === this.__ownerID) {
+ return this;
+ }
+ if (!ownerID) {
+ this.__ownerID = ownerID;
+ this.__altered = false;
+ return this;
+ }
+ return makeStack(this.size, this._head, ownerID, this.__hash);
+ };
+
+ // @pragma Iteration
+
+ Stack.prototype.__iterate = function(fn, reverse) {
+ if (reverse) {
+ return this.reverse().__iterate(fn);
+ }
+ var iterations = 0;
+ var node = this._head;
+ while (node) {
+ if (fn(node.value, iterations++, this) === false) {
+ break;
+ }
+ node = node.next;
+ }
+ return iterations;
+ };
+
+ Stack.prototype.__iterator = function(type, reverse) {
+ if (reverse) {
+ return this.reverse().__iterator(type);
+ }
+ var iterations = 0;
+ var node = this._head;
+ return new Iterator(function() {
+ if (node) {
+ var value = node.value;
+ node = node.next;
+ return iteratorValue(type, iterations++, value);
+ }
+ return iteratorDone();
+ });
+ };
+
+
+ function isStack(maybeStack) {
+ return !!(maybeStack && maybeStack[IS_STACK_SENTINEL]);
+ }
+
+ Stack.isStack = isStack;
+
+ var IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@';
+
+ var StackPrototype = Stack.prototype;
+ StackPrototype[IS_STACK_SENTINEL] = true;
+ StackPrototype.withMutations = MapPrototype.withMutations;
+ StackPrototype.asMutable = MapPrototype.asMutable;
+ StackPrototype.asImmutable = MapPrototype.asImmutable;
+ StackPrototype.wasAltered = MapPrototype.wasAltered;
+
+
+ function makeStack(size, head, ownerID, hash) {
+ var map = Object.create(StackPrototype);
+ map.size = size;
+ map._head = head;
+ map.__ownerID = ownerID;
+ map.__hash = hash;
+ map.__altered = false;
+ return map;
+ }
+
+ var EMPTY_STACK;
+ function emptyStack() {
+ return EMPTY_STACK || (EMPTY_STACK = makeStack(0));
+ }
+
+ /**
+ * Contributes additional methods to a constructor
+ */
+ function mixin(ctor, methods) {
+ var keyCopier = function(key ) { ctor.prototype[key] = methods[key]; };
+ Object.keys(methods).forEach(keyCopier);
+ Object.getOwnPropertySymbols &&
+ Object.getOwnPropertySymbols(methods).forEach(keyCopier);
+ return ctor;
+ }
+
+ Iterable.Iterator = Iterator;
+
+ mixin(Iterable, {
+
+ // ### Conversion to other types
+
+ toArray: function() {
+ assertNotInfinite(this.size);
+ var array = new Array(this.size || 0);
+ this.valueSeq().__iterate(function(v, i) { array[i] = v; });
+ return array;
+ },
+
+ toIndexedSeq: function() {
+ return new ToIndexedSequence(this);
+ },
+
+ toJS: function() {
+ return this.toSeq().map(
+ function(value ) {return value && typeof value.toJS === 'function' ? value.toJS() : value}
+ ).__toJS();
+ },
+
+ toJSON: function() {
+ return this.toSeq().map(
+ function(value ) {return value && typeof value.toJSON === 'function' ? value.toJSON() : value}
+ ).__toJS();
+ },
+
+ toKeyedSeq: function() {
+ return new ToKeyedSequence(this, true);
+ },
+
+ toMap: function() {
+ // Use Late Binding here to solve the circular dependency.
+ return Map(this.toKeyedSeq());
+ },
+
+ toObject: function() {
+ assertNotInfinite(this.size);
+ var object = {};
+ this.__iterate(function(v, k) { object[k] = v; });
+ return object;
+ },
+
+ toOrderedMap: function() {
+ // Use Late Binding here to solve the circular dependency.
+ return OrderedMap(this.toKeyedSeq());
+ },
+
+ toOrderedSet: function() {
+ // Use Late Binding here to solve the circular dependency.
+ return OrderedSet(isKeyed(this) ? this.valueSeq() : this);
+ },
+
+ toSet: function() {
+ // Use Late Binding here to solve the circular dependency.
+ return Set(isKeyed(this) ? this.valueSeq() : this);
+ },
+
+ toSetSeq: function() {
+ return new ToSetSequence(this);
+ },
+
+ toSeq: function() {
+ return isIndexed(this) ? this.toIndexedSeq() :
+ isKeyed(this) ? this.toKeyedSeq() :
+ this.toSetSeq();
+ },
+
+ toStack: function() {
+ // Use Late Binding here to solve the circular dependency.
+ return Stack(isKeyed(this) ? this.valueSeq() : this);
+ },
+
+ toList: function() {
+ // Use Late Binding here to solve the circular dependency.
+ return List(isKeyed(this) ? this.valueSeq() : this);
+ },
+
+
+ // ### Common JavaScript methods and properties
+
+ toString: function() {
+ return '[Iterable]';
+ },
+
+ __toString: function(head, tail) {
+ if (this.size === 0) {
+ return head + tail;
+ }
+ return head + ' ' + this.toSeq().map(this.__toStringMapper).join(', ') + ' ' + tail;
+ },
+
+
+ // ### ES6 Collection methods (ES6 Array and Map)
+
+ concat: function() {var values = SLICE$0.call(arguments, 0);
+ return reify(this, concatFactory(this, values));
+ },
+
+ includes: function(searchValue) {
+ return this.some(function(value ) {return is(value, searchValue)});
+ },
+
+ entries: function() {
+ return this.__iterator(ITERATE_ENTRIES);
+ },
+
+ every: function(predicate, context) {
+ assertNotInfinite(this.size);
+ var returnValue = true;
+ this.__iterate(function(v, k, c) {
+ if (!predicate.call(context, v, k, c)) {
+ returnValue = false;
+ return false;
+ }
+ });
+ return returnValue;
+ },
+
+ filter: function(predicate, context) {
+ return reify(this, filterFactory(this, predicate, context, true));
+ },
+
+ find: function(predicate, context, notSetValue) {
+ var entry = this.findEntry(predicate, context);
+ return entry ? entry[1] : notSetValue;
+ },
+
+ findEntry: function(predicate, context) {
+ var found;
+ this.__iterate(function(v, k, c) {
+ if (predicate.call(context, v, k, c)) {
+ found = [k, v];
+ return false;
+ }
+ });
+ return found;
+ },
+
+ findLastEntry: function(predicate, context) {
+ return this.toSeq().reverse().findEntry(predicate, context);
+ },
+
+ forEach: function(sideEffect, context) {
+ assertNotInfinite(this.size);
+ return this.__iterate(context ? sideEffect.bind(context) : sideEffect);
+ },
+
+ join: function(separator) {
+ assertNotInfinite(this.size);
+ separator = separator !== undefined ? '' + separator : ',';
+ var joined = '';
+ var isFirst = true;
+ this.__iterate(function(v ) {
+ isFirst ? (isFirst = false) : (joined += separator);
+ joined += v !== null && v !== undefined ? v.toString() : '';
+ });
+ return joined;
+ },
+
+ keys: function() {
+ return this.__iterator(ITERATE_KEYS);
+ },
+
+ map: function(mapper, context) {
+ return reify(this, mapFactory(this, mapper, context));
+ },
+
+ reduce: function(reducer, initialReduction, context) {
+ assertNotInfinite(this.size);
+ var reduction;
+ var useFirst;
+ if (arguments.length < 2) {
+ useFirst = true;
+ } else {
+ reduction = initialReduction;
+ }
+ this.__iterate(function(v, k, c) {
+ if (useFirst) {
+ useFirst = false;
+ reduction = v;
+ } else {
+ reduction = reducer.call(context, reduction, v, k, c);
+ }
+ });
+ return reduction;
+ },
+
+ reduceRight: function(reducer, initialReduction, context) {
+ var reversed = this.toKeyedSeq().reverse();
+ return reversed.reduce.apply(reversed, arguments);
+ },
+
+ reverse: function() {
+ return reify(this, reverseFactory(this, true));
+ },
+
+ slice: function(begin, end) {
+ return reify(this, sliceFactory(this, begin, end, true));
+ },
+
+ some: function(predicate, context) {
+ return !this.every(not(predicate), context);
+ },
+
+ sort: function(comparator) {
+ return reify(this, sortFactory(this, comparator));
+ },
+
+ values: function() {
+ return this.__iterator(ITERATE_VALUES);
+ },
+
+
+ // ### More sequential methods
+
+ butLast: function() {
+ return this.slice(0, -1);
+ },
+
+ isEmpty: function() {
+ return this.size !== undefined ? this.size === 0 : !this.some(function() {return true});
+ },
+
+ count: function(predicate, context) {
+ return ensureSize(
+ predicate ? this.toSeq().filter(predicate, context) : this
+ );
+ },
+
+ countBy: function(grouper, context) {
+ return countByFactory(this, grouper, context);
+ },
+
+ equals: function(other) {
+ return deepEqual(this, other);
+ },
+
+ entrySeq: function() {
+ var iterable = this;
+ if (iterable._cache) {
+ // We cache as an entries array, so we can just return the cache!
+ return new ArraySeq(iterable._cache);
+ }
+ var entriesSequence = iterable.toSeq().map(entryMapper).toIndexedSeq();
+ entriesSequence.fromEntrySeq = function() {return iterable.toSeq()};
+ return entriesSequence;
+ },
+
+ filterNot: function(predicate, context) {
+ return this.filter(not(predicate), context);
+ },
+
+ findLast: function(predicate, context, notSetValue) {
+ return this.toKeyedSeq().reverse().find(predicate, context, notSetValue);
+ },
+
+ first: function() {
+ return this.find(returnTrue);
+ },
+
+ flatMap: function(mapper, context) {
+ return reify(this, flatMapFactory(this, mapper, context));
+ },
+
+ flatten: function(depth) {
+ return reify(this, flattenFactory(this, depth, true));
+ },
+
+ fromEntrySeq: function() {
+ return new FromEntriesSequence(this);
+ },
+
+ get: function(searchKey, notSetValue) {
+ return this.find(function(_, key) {return is(key, searchKey)}, undefined, notSetValue);
+ },
+
+ getIn: function(searchKeyPath, notSetValue) {
+ var nested = this;
+ // Note: in an ES6 environment, we would prefer:
+ // for (var key of searchKeyPath) {
+ var iter = forceIterator(searchKeyPath);
+ var step;
+ while (!(step = iter.next()).done) {
+ var key = step.value;
+ nested = nested && nested.get ? nested.get(key, NOT_SET) : NOT_SET;
+ if (nested === NOT_SET) {
+ return notSetValue;
+ }
+ }
+ return nested;
+ },
+
+ groupBy: function(grouper, context) {
+ return groupByFactory(this, grouper, context);
+ },
+
+ has: function(searchKey) {
+ return this.get(searchKey, NOT_SET) !== NOT_SET;
+ },
+
+ hasIn: function(searchKeyPath) {
+ return this.getIn(searchKeyPath, NOT_SET) !== NOT_SET;
+ },
+
+ isSubset: function(iter) {
+ iter = typeof iter.includes === 'function' ? iter : Iterable(iter);
+ return this.every(function(value ) {return iter.includes(value)});
+ },
+
+ isSuperset: function(iter) {
+ iter = typeof iter.isSubset === 'function' ? iter : Iterable(iter);
+ return iter.isSubset(this);
+ },
+
+ keySeq: function() {
+ return this.toSeq().map(keyMapper).toIndexedSeq();
+ },
+
+ last: function() {
+ return this.toSeq().reverse().first();
+ },
+
+ max: function(comparator) {
+ return maxFactory(this, comparator);
+ },
+
+ maxBy: function(mapper, comparator) {
+ return maxFactory(this, comparator, mapper);
+ },
+
+ min: function(comparator) {
+ return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator);
+ },
+
+ minBy: function(mapper, comparator) {
+ return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator, mapper);
+ },
+
+ rest: function() {
+ return this.slice(1);
+ },
+
+ skip: function(amount) {
+ return this.slice(Math.max(0, amount));
+ },
+
+ skipLast: function(amount) {
+ return reify(this, this.toSeq().reverse().skip(amount).reverse());
+ },
+
+ skipWhile: function(predicate, context) {
+ return reify(this, skipWhileFactory(this, predicate, context, true));
+ },
+
+ skipUntil: function(predicate, context) {
+ return this.skipWhile(not(predicate), context);
+ },
+
+ sortBy: function(mapper, comparator) {
+ return reify(this, sortFactory(this, comparator, mapper));
+ },
+
+ take: function(amount) {
+ return this.slice(0, Math.max(0, amount));
+ },
+
+ takeLast: function(amount) {
+ return reify(this, this.toSeq().reverse().take(amount).reverse());
+ },
+
+ takeWhile: function(predicate, context) {
+ return reify(this, takeWhileFactory(this, predicate, context));
+ },
+
+ takeUntil: function(predicate, context) {
+ return this.takeWhile(not(predicate), context);
+ },
+
+ valueSeq: function() {
+ return this.toIndexedSeq();
+ },
+
+
+ // ### Hashable Object
+
+ hashCode: function() {
+ return this.__hash || (this.__hash = hashIterable(this));
+ }
+
+
+ // ### Internal
+
+ // abstract __iterate(fn, reverse)
+
+ // abstract __iterator(type, reverse)
+ });
+
+ // var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';
+ // var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';
+ // var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';
+ // var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';
+
+ var IterablePrototype = Iterable.prototype;
+ IterablePrototype[IS_ITERABLE_SENTINEL] = true;
+ IterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.values;
+ IterablePrototype.__toJS = IterablePrototype.toArray;
+ IterablePrototype.__toStringMapper = quoteString;
+ IterablePrototype.inspect =
+ IterablePrototype.toSource = function() { return this.toString(); };
+ IterablePrototype.chain = IterablePrototype.flatMap;
+ IterablePrototype.contains = IterablePrototype.includes;
+
+ // Temporary warning about using length
+ (function () {
+ try {
+ Object.defineProperty(IterablePrototype, 'length', {
+ get: function () {
+ if (!Iterable.noLengthWarning) {
+ var stack;
+ try {
+ throw new Error();
+ } catch (error) {
+ stack = error.stack;
+ }
+ if (stack.indexOf('_wrapObject') === -1) {
+ console && console.warn && console.warn(
+ 'iterable.length has been deprecated, '+
+ 'use iterable.size or iterable.count(). '+
+ 'This warning will become a silent error in a future version. ' +
+ stack
+ );
+ return this.size;
+ }
+ }
+ }
+ });
+ } catch (e) {}
+ })();
+
+
+
+ mixin(KeyedIterable, {
+
+ // ### More sequential methods
+
+ flip: function() {
+ return reify(this, flipFactory(this));
+ },
+
+ findKey: function(predicate, context) {
+ var entry = this.findEntry(predicate, context);
+ return entry && entry[0];
+ },
+
+ findLastKey: function(predicate, context) {
+ return this.toSeq().reverse().findKey(predicate, context);
+ },
+
+ keyOf: function(searchValue) {
+ return this.findKey(function(value ) {return is(value, searchValue)});
+ },
+
+ lastKeyOf: function(searchValue) {
+ return this.findLastKey(function(value ) {return is(value, searchValue)});
+ },
+
+ mapEntries: function(mapper, context) {var this$0 = this;
+ var iterations = 0;
+ return reify(this,
+ this.toSeq().map(
+ function(v, k) {return mapper.call(context, [k, v], iterations++, this$0)}
+ ).fromEntrySeq()
+ );
+ },
+
+ mapKeys: function(mapper, context) {var this$0 = this;
+ return reify(this,
+ this.toSeq().flip().map(
+ function(k, v) {return mapper.call(context, k, v, this$0)}
+ ).flip()
+ );
+ }
+
+ });
+
+ var KeyedIterablePrototype = KeyedIterable.prototype;
+ KeyedIterablePrototype[IS_KEYED_SENTINEL] = true;
+ KeyedIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.entries;
+ KeyedIterablePrototype.__toJS = IterablePrototype.toObject;
+ KeyedIterablePrototype.__toStringMapper = function(v, k) {return JSON.stringify(k) + ': ' + quoteString(v)};
+
+
+
+ mixin(IndexedIterable, {
+
+ // ### Conversion to other types
+
+ toKeyedSeq: function() {
+ return new ToKeyedSequence(this, false);
+ },
+
+
+ // ### ES6 Collection methods (ES6 Array and Map)
+
+ filter: function(predicate, context) {
+ return reify(this, filterFactory(this, predicate, context, false));
+ },
+
+ findIndex: function(predicate, context) {
+ var entry = this.findEntry(predicate, context);
+ return entry ? entry[0] : -1;
+ },
+
+ indexOf: function(searchValue) {
+ var key = this.toKeyedSeq().keyOf(searchValue);
+ return key === undefined ? -1 : key;
+ },
+
+ lastIndexOf: function(searchValue) {
+ var key = this.toKeyedSeq().reverse().keyOf(searchValue);
+ return key === undefined ? -1 : key;
+
+ // var index =
+ // return this.toSeq().reverse().indexOf(searchValue);
+ },
+
+ reverse: function() {
+ return reify(this, reverseFactory(this, false));
+ },
+
+ slice: function(begin, end) {
+ return reify(this, sliceFactory(this, begin, end, false));
+ },
+
+ splice: function(index, removeNum /*, ...values*/) {
+ var numArgs = arguments.length;
+ removeNum = Math.max(removeNum | 0, 0);
+ if (numArgs === 0 || (numArgs === 2 && !removeNum)) {
+ return this;
+ }
+ // If index is negative, it should resolve relative to the size of the
+ // collection. However size may be expensive to compute if not cached, so
+ // only call count() if the number is in fact negative.
+ index = resolveBegin(index, index < 0 ? this.count() : this.size);
+ var spliced = this.slice(0, index);
+ return reify(
+ this,
+ numArgs === 1 ?
+ spliced :
+ spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum))
+ );
+ },
+
+
+ // ### More collection methods
+
+ findLastIndex: function(predicate, context) {
+ var key = this.toKeyedSeq().findLastKey(predicate, context);
+ return key === undefined ? -1 : key;
+ },
+
+ first: function() {
+ return this.get(0);
+ },
+
+ flatten: function(depth) {
+ return reify(this, flattenFactory(this, depth, false));
+ },
+
+ get: function(index, notSetValue) {
+ index = wrapIndex(this, index);
+ return (index < 0 || (this.size === Infinity ||
+ (this.size !== undefined && index > this.size))) ?
+ notSetValue :
+ this.find(function(_, key) {return key === index}, undefined, notSetValue);
+ },
+
+ has: function(index) {
+ index = wrapIndex(this, index);
+ return index >= 0 && (this.size !== undefined ?
+ this.size === Infinity || index < this.size :
+ this.indexOf(index) !== -1
+ );
+ },
+
+ interpose: function(separator) {
+ return reify(this, interposeFactory(this, separator));
+ },
+
+ interleave: function(/*...iterables*/) {
+ var iterables = [this].concat(arrCopy(arguments));
+ var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, iterables);
+ var interleaved = zipped.flatten(true);
+ if (zipped.size) {
+ interleaved.size = zipped.size * iterables.length;
+ }
+ return reify(this, interleaved);
+ },
+
+ last: function() {
+ return this.get(-1);
+ },
+
+ skipWhile: function(predicate, context) {
+ return reify(this, skipWhileFactory(this, predicate, context, false));
+ },
+
+ zip: function(/*, ...iterables */) {
+ var iterables = [this].concat(arrCopy(arguments));
+ return reify(this, zipWithFactory(this, defaultZipper, iterables));
+ },
+
+ zipWith: function(zipper/*, ...iterables */) {
+ var iterables = arrCopy(arguments);
+ iterables[0] = this;
+ return reify(this, zipWithFactory(this, zipper, iterables));
+ }
+
+ });
+
+ IndexedIterable.prototype[IS_INDEXED_SENTINEL] = true;
+ IndexedIterable.prototype[IS_ORDERED_SENTINEL] = true;
+
+
+
+ mixin(SetIterable, {
+
+ // ### ES6 Collection methods (ES6 Array and Map)
+
+ get: function(value, notSetValue) {
+ return this.has(value) ? value : notSetValue;
+ },
+
+ includes: function(value) {
+ return this.has(value);
+ },
+
+
+ // ### More sequential methods
+
+ keySeq: function() {
+ return this.valueSeq();
+ }
+
+ });
+
+ SetIterable.prototype.has = IterablePrototype.includes;
+
+
+ // Mixin subclasses
+
+ mixin(KeyedSeq, KeyedIterable.prototype);
+ mixin(IndexedSeq, IndexedIterable.prototype);
+ mixin(SetSeq, SetIterable.prototype);
+
+ mixin(KeyedCollection, KeyedIterable.prototype);
+ mixin(IndexedCollection, IndexedIterable.prototype);
+ mixin(SetCollection, SetIterable.prototype);
+
+
+ // #pragma Helper functions
+
+ function keyMapper(v, k) {
+ return k;
+ }
+
+ function entryMapper(v, k) {
+ return [k, v];
+ }
+
+ function not(predicate) {
+ return function() {
+ return !predicate.apply(this, arguments);
+ }
+ }
+
+ function neg(predicate) {
+ return function() {
+ return -predicate.apply(this, arguments);
+ }
+ }
+
+ function quoteString(value) {
+ return typeof value === 'string' ? JSON.stringify(value) : value;
+ }
+
+ function defaultZipper() {
+ return arrCopy(arguments);
+ }
+
+ function defaultNegComparator(a, b) {
+ return a < b ? 1 : a > b ? -1 : 0;
+ }
+
+ function hashIterable(iterable) {
+ if (iterable.size === Infinity) {
+ return 0;
+ }
+ var ordered = isOrdered(iterable);
+ var keyed = isKeyed(iterable);
+ var h = ordered ? 1 : 0;
+ var size = iterable.__iterate(
+ keyed ?
+ ordered ?
+ function(v, k) { h = 31 * h + hashMerge(hash(v), hash(k)) | 0; } :
+ function(v, k) { h = h + hashMerge(hash(v), hash(k)) | 0; } :
+ ordered ?
+ function(v ) { h = 31 * h + hash(v) | 0; } :
+ function(v ) { h = h + hash(v) | 0; }
+ );
+ return murmurHashOfSize(size, h);
+ }
+
+ function murmurHashOfSize(size, h) {
+ h = imul(h, 0xCC9E2D51);
+ h = imul(h << 15 | h >>> -15, 0x1B873593);
+ h = imul(h << 13 | h >>> -13, 5);
+ h = (h + 0xE6546B64 | 0) ^ size;
+ h = imul(h ^ h >>> 16, 0x85EBCA6B);
+ h = imul(h ^ h >>> 13, 0xC2B2AE35);
+ h = smi(h ^ h >>> 16);
+ return h;
+ }
+
+ function hashMerge(a, b) {
+ return a ^ b + 0x9E3779B9 + (a << 6) + (a >> 2) | 0; // int
+ }
+
+ var Immutable = {
+
+ Iterable: Iterable,
+
+ Seq: Seq,
+ Collection: Collection,
+ Map: Map,
+ OrderedMap: OrderedMap,
+ List: List,
+ Stack: Stack,
+ Set: Set,
+ OrderedSet: OrderedSet,
+
+ Record: Record,
+ Range: Range,
+ Repeat: Repeat,
+
+ is: is,
+ fromJS: fromJS
+
+ };
+
+ return Immutable;
+
+ }));
+
+/***/ },
+/* 230 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var _jquery = __webpack_require__(196);
+
+ var _jquery2 = _interopRequireDefault(_jquery);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ // jQuery no parents filter
+ _jquery2.default.expr[':']['noparents'] = _jquery2.default.expr.createPseudo(function (text) {
+ return function (element) {
+ return (0, _jquery2.default)(element).parents(text).length < 1;
+ };
+ });
+
+/***/ },
+/* 231 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.Instance = undefined;
+
+ var _jquery = __webpack_require__(196);
+
+ var _jquery2 = _interopRequireDefault(_jquery);
+
+ var _toastr = __webpack_require__(194);
+
+ var _toastr2 = _interopRequireDefault(_toastr);
+
+ var _gravConfig = __webpack_require__(198);
+
+ var _state = __webpack_require__(228);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ var Form = function () {
+ function Form(form) {
+ var _this = this;
+
+ _classCallCheck(this, Form);
+
+ this.form = (0, _jquery2.default)(form);
+ if (!this.form.length || this.form.prop('tagName').toLowerCase() !== 'form') {
+ return;
+ }
+
+ this.form.on('submit', function (event) {
+ if (_state.Instance.equals()) {
+ event.preventDefault();
+ _toastr2.default.info(_gravConfig.translations.PLUGIN_ADMIN.NOTHING_TO_SAVE);
+ }
+ });
+
+ this._attachShortcuts();
+ this._attachToggleables();
+ this._attachDisabledFields();
+
+ this.observer = new MutationObserver(this.addedNodes);
+ this.form.each(function (index, form) {
+ return _this.observer.observe(form, { subtree: true, childList: true });
+ });
+ }
+
+ _createClass(Form, [{
+ key: '_attachShortcuts',
+ value: function _attachShortcuts() {
+ // CTRL + S / CMD + S - shortcut for [Save] when available
+ var saveTask = (0, _jquery2.default)('[name="task"][value="save"]').filter(function (index, element) {
+ element = (0, _jquery2.default)(element);
+ return !element.parents('.remodal-overlay').length;
+ });
+
+ if (saveTask.length) {
+ (0, _jquery2.default)(window).on('keydown', function (event) {
+ var key = String.fromCharCode(event.which).toLowerCase();
+ if ((event.ctrlKey || event.metaKey) && key === 's') {
+ event.preventDefault();
+ saveTask.click();
+ }
+ });
+ }
+ }
+ }, {
+ key: '_attachToggleables',
+ value: function _attachToggleables() {
+ var query = '[data-grav-field="toggleable"] input[type="checkbox"]';
+
+ this.form.on('change', query, function (event) {
+ var toggle = (0, _jquery2.default)(event.target);
+ var enabled = toggle.is(':checked');
+ var parent = toggle.parents('.form-field');
+ var label = parent.find('label.toggleable');
+ var fields = parent.find('.form-data');
+ var inputs = fields.find('input, select, textarea');
+
+ label.add(fields).css('opacity', enabled ? '' : 0.7);
+ inputs.map(function (index, input) {
+ var isSelectize = input.selectize;
+ input = (0, _jquery2.default)(input);
+
+ if (isSelectize) {
+ isSelectize[enabled ? 'enable' : 'disable']();
+ } else {
+ input.prop('disabled', !enabled);
+ }
+ });
+ });
+
+ this.form.find(query).trigger('change');
+ }
+ }, {
+ key: '_attachDisabledFields',
+ value: function _attachDisabledFields() {
+ var prefix = '.form-field-toggleable .form-data';
+ var query = [];
+
+ ['input', 'select', 'label[for]', 'textarea', '.selectize-control'].forEach(function (item) {
+ query.push(prefix + ' ' + item);
+ });
+
+ this.form.on('mousedown', query.join(', '), function (event) {
+ var target = (0, _jquery2.default)(event.target);
+ var input = target;
+ var isFor = input.prop('for');
+ var isSelectize = (input.hasClass('selectize-control') || input.parents('.selectize-control')).length;
+
+ if (isFor) {
+ input = (0, _jquery2.default)('[id="' + isFor + '"]');
+ }
+ if (isSelectize) {
+ input = input.closest('.selectize-control').siblings('select[name]');
+ }
+
+ if (!input.prop('disabled')) {
+ return true;
+ }
+
+ var toggle = input.closest('.form-field').find('[data-grav-field="toggleable"] input[type="checkbox"]');
+ toggle.trigger('click');
+ });
+ }
+ }, {
+ key: 'addedNodes',
+ value: function addedNodes(mutations) {
+ var _this2 = this;
+
+ mutations.forEach(function (mutation) {
+ if (mutation.type !== 'childList' || !mutation.addedNodes) {
+ return;
+ }
+
+ (0, _jquery2.default)('body').trigger('mutation._grav', mutation.target, mutation, _this2);
+ });
+ }
+ }]);
+
+ return Form;
+ }();
+
+ exports.default = Form;
+ var Instance = exports.Instance = new Form('form#blueprints');
+
+/***/ },
+/* 232 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _selectize = __webpack_require__(233);
+
+ var _selectize2 = _interopRequireDefault(_selectize);
+
+ var _array = __webpack_require__(234);
+
+ var _array2 = _interopRequireDefault(_array);
+
+ var _collections = __webpack_require__(235);
+
+ var _collections2 = _interopRequireDefault(_collections);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ exports.default = {
+ SelectizeField: {
+ SelectizeField: _selectize2.default,
+ Instance: _selectize.Instance
+ },
+ ArrayField: {
+ ArrayField: _array2.default,
+ Instance: _array.Instance
+ },
+ CollectionsField: {
+ CollectionsField: _collections2.default,
+ Instance: _collections.Instance
+ }
+ };
+
+/***/ },
+/* 233 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.Instance = undefined;
+
+ var _jquery = __webpack_require__(196);
+
+ var _jquery2 = _interopRequireDefault(_jquery);
+
+ __webpack_require__(217);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ var SelectizeField = function () {
+ function SelectizeField() {
+ var _this = this;
+
+ var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
+
+ _classCallCheck(this, SelectizeField);
+
+ this.options = Object.assign({}, options);
+ this.elements = [];
+
+ (0, _jquery2.default)('[data-grav-selectize]').each(function (index, element) {
+ return _this.add(element);
+ });
+ (0, _jquery2.default)('body').on('mutation._grav', this._onAddedNodes.bind(this));
+ }
+
+ _createClass(SelectizeField, [{
+ key: 'add',
+ value: function add(element) {
+ element = (0, _jquery2.default)(element);
+ var tag = element.prop('tagName').toLowerCase();
+ var isInput = tag === 'input' || tag === 'select';
+
+ var data = (isInput ? element.closest('[data-grav-selectize]') : element).data('grav-selectize') || {};
+ var field = isInput ? element : element.find('input, select');
+
+ if (!field.length || field.get(0).selectize) {
+ return;
+ }
+ field.selectize(data);
+
+ this.elements.push(field.data('selectize'));
+ }
+ }, {
+ key: '_onAddedNodes',
+ value: function _onAddedNodes(event, target /* , record, instance */) {
+ var _this2 = this;
+
+ var fields = (0, _jquery2.default)(target).find('select.fancy, input.fancy');
+ if (!fields.length) {
+ return;
+ }
+
+ fields.each(function (index, field) {
+ return _this2.add(field);
+ });
+ }
+ }]);
+
+ return SelectizeField;
+ }();
+
+ exports.default = SelectizeField;
+ var Instance = exports.Instance = new SelectizeField();
+
+/***/ },
+/* 234 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.Instance = undefined;
+
+ var _jquery = __webpack_require__(196);
+
+ var _jquery2 = _interopRequireDefault(_jquery);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ var body = (0, _jquery2.default)('body');
+
+ var Template = function () {
+ function Template(container) {
+ _classCallCheck(this, Template);
+
+ this.container = (0, _jquery2.default)(container);
+
+ if (this.getName() === undefined) {
+ this.container = this.container.closest('[data-grav-array-name]');
+ }
+ }
+
+ _createClass(Template, [{
+ key: 'getName',
+ value: function getName() {
+ return this.container.data('grav-array-name') || '';
+ }
+ }, {
+ key: 'getKeyPlaceholder',
+ value: function getKeyPlaceholder() {
+ return this.container.data('grav-array-keyname') || 'Key';
+ }
+ }, {
+ key: 'getValuePlaceholder',
+ value: function getValuePlaceholder() {
+ return this.container.data('grav-array-valuename') || 'Value';
+ }
+ }, {
+ key: 'isValueOnly',
+ value: function isValueOnly() {
+ return this.container.find('[data-grav-array-mode="value_only"]:first').length || false;
+ }
+ }, {
+ key: 'shouldBeDisabled',
+ value: function shouldBeDisabled() {
+ // check for toggleables, if field is toggleable and it's not enabled, render disabled
+ var toggle = this.container.closest('.form-field').find('[data-grav-field="toggleable"] input[type="checkbox"]');
+ return toggle.length && toggle.is(':not(:checked)');
+ }
+ }, {
+ key: 'getNewRow',
+ value: function getNewRow() {
+ var tpl = '';
+
+ if (this.isValueOnly()) {
+ tpl += '\n
\n
\n ';
+ } else {
+ tpl += '\n
\n \n \n ';
+ }
+
+ tpl += '\n \n \n
';
+
+ return tpl;
+ }
+ }]);
+
+ return Template;
+ }();
+
+ var ArrayField = function () {
+ function ArrayField() {
+ var _this = this;
+
+ _classCallCheck(this, ArrayField);
+
+ body.on('input', '[data-grav-array-type="key"], [data-grav-array-type="value"]', function (event) {
+ return _this.actionInput(event);
+ });
+ body.on('click touch', '[data-grav-array-action]', function (event) {
+ return _this.actionEvent(event);
+ });
+ }
+
+ _createClass(ArrayField, [{
+ key: 'actionInput',
+ value: function actionInput(event) {
+ var element = (0, _jquery2.default)(event.target);
+ var type = element.data('grav-array-type');
+
+ this._setTemplate(element);
+
+ var template = element.data('array-template');
+ var keyElement = type === 'key' ? element : element.siblings('[data-grav-array-type="key"]:first');
+ var valueElement = type === 'value' ? element : element.siblings('[data-grav-array-type="value"]:first');
+
+ var name = template.getName() + '[' + (!template.isValueOnly() ? keyElement.val() : this.getIndexFor(element)) + ']';
+ valueElement.attr('name', !valueElement.val() ? template.getName() : name);
+
+ this.refreshNames(template);
+ }
+ }, {
+ key: 'actionEvent',
+ value: function actionEvent(event) {
+ var element = (0, _jquery2.default)(event.target);
+ var action = element.data('grav-array-action');
+
+ this._setTemplate(element);
+
+ this[action + 'Action'](element);
+ }
+ }, {
+ key: 'addAction',
+ value: function addAction(element) {
+ var template = element.data('array-template');
+ var row = element.closest('[data-grav-array-type="row"]');
+
+ row.after(template.getNewRow());
+ }
+ }, {
+ key: 'remAction',
+ value: function remAction(element) {
+ var template = element.data('array-template');
+ var row = element.closest('[data-grav-array-type="row"]');
+ var isLast = !row.siblings().length;
+
+ if (isLast) {
+ var newRow = (0, _jquery2.default)(template.getNewRow());
+ row.after(newRow);
+ newRow.find('[data-grav-array-type="value"]:last').attr('name', template.getName());
+ }
+
+ row.remove();
+ this.refreshNames(template);
+ }
+ }, {
+ key: 'refreshNames',
+ value: function refreshNames(template) {
+ if (!template.isValueOnly()) {
+ return;
+ }
+
+ var row = template.container.find('> div > [data-grav-array-type="row"]');
+ var inputs = row.find('[name]:not([name=""])');
+
+ inputs.each(function (index, input) {
+ input = (0, _jquery2.default)(input);
+ var name = input.attr('name');
+ name = name.replace(/\[\d+\]$/, '[' + index + ']');
+ input.attr('name', name);
+ });
+
+ if (!inputs.length) {
+ row.find('[data-grav-array-type="value"]').attr('name', template.getName());
+ }
+ }
+ }, {
+ key: 'getIndexFor',
+ value: function getIndexFor(element) {
+ var template = element.data('array-template');
+ var row = element.closest('[data-grav-array-type="row"]');
+
+ return template.container.find((template.isValueOnly() ? '> div ' : '') + ' > [data-grav-array-type="row"]').index(row);
+ }
+ }, {
+ key: '_setTemplate',
+ value: function _setTemplate(element) {
+ if (!element.data('array-template')) {
+ element.data('array-template', new Template(element.closest('[data-grav-array-name]')));
+ }
+ }
+ }]);
+
+ return ArrayField;
+ }();
+
+ exports.default = ArrayField;
+ var Instance = exports.Instance = new ArrayField();
+
+/***/ },
+/* 235 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.Instance = undefined;
+
+ var _jquery = __webpack_require__(196);
+
+ var _jquery2 = _interopRequireDefault(_jquery);
+
+ var _sortablejs = __webpack_require__(212);
+
+ var _sortablejs2 = _interopRequireDefault(_sortablejs);
+
+ __webpack_require__(230);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ var CollectionsField = function () {
+ function CollectionsField() {
+ var _this = this;
+
+ _classCallCheck(this, CollectionsField);
+
+ this.lists = (0, _jquery2.default)();
+
+ (0, _jquery2.default)('[data-type="collection"]').each(function (index, list) {
+ return _this.addList(list);
+ });
+ (0, _jquery2.default)('body').on('mutation._grav', this._onAddedNodes.bind(this));
+ }
+
+ _createClass(CollectionsField, [{
+ key: 'addList',
+ value: function addList(list) {
+ var _this2 = this;
+
+ list = (0, _jquery2.default)(list);
+ this.lists = this.lists.add(list);
+
+ list.on('click', '> .collection-actions [data-action="add"]', function (event) {
+ return _this2.addItem(event);
+ });
+ list.on('click', '> ul > li > .item-actions [data-action="delete"]', function (event) {
+ return _this2.removeItem(event);
+ });
+
+ list.find('[data-collection-holder]').each(function (index, container) {
+ container = (0, _jquery2.default)(container);
+ if (container.data('collection-sort')) {
+ return;
+ }
+
+ container.data('collection-sort', new _sortablejs2.default(container.get(0), {
+ forceFallback: true,
+ animation: 150,
+ onUpdate: function onUpdate() {
+ return _this2.reindex(container);
+ }
+ }));
+ });
+ }
+ }, {
+ key: 'addItem',
+ value: function addItem(event) {
+ var button = (0, _jquery2.default)(event.currentTarget);
+ var list = button.closest('[data-type="collection"]');
+ var template = (0, _jquery2.default)(list.find('> [data-collection-template="new"]').data('collection-template-html'));
+
+ list.find('> [data-collection-holder]').append(template);
+ this.reindex(list);
+ // button.data('key-index', keyIndex + 1);
+
+ // process markdown editors
+ /* var field = template.find('[name]').filter('textarea');
+ if (field.length && field.data('grav-mdeditor') && typeof MDEditors !== 'undefined') {
+ MDEditors.add(field);
+ }*/
+ }
+ }, {
+ key: 'removeItem',
+ value: function removeItem(event) {
+ var button = (0, _jquery2.default)(event.currentTarget);
+ var item = button.closest('[data-collection-item]');
+ var list = button.closest('[data-type="collection"]');
+
+ item.remove();
+ this.reindex(list);
+ }
+ }, {
+ key: 'reindex',
+ value: function reindex(list) {
+ list = (0, _jquery2.default)(list).closest('[data-type="collection"]');
+
+ var items = list.find('> ul > [data-collection-item]');
+
+ items.each(function (index, item) {
+ item = (0, _jquery2.default)(item);
+ item.attr('data-collection-key', index);
+
+ ['name', 'data-grav-field-name', 'id', 'for'].forEach(function (prop) {
+ item.find('[' + prop + ']').each(function () {
+ var element = (0, _jquery2.default)(this);
+ var indexes = [];
+ element.parents('[data-collection-key]').map(function (idx, parent) {
+ return indexes.push((0, _jquery2.default)(parent).attr('data-collection-key'));
+ });
+ indexes.reverse();
+
+ var replaced = element.attr(prop).replace(/\[(\d+|\*)\]/g, function () /* str, p1, offset */{
+ return '[' + indexes.shift() + ']';
+ });
+
+ element.attr(prop, replaced);
+ });
+ });
+ });
+ }
+ }, {
+ key: '_onAddedNodes',
+ value: function _onAddedNodes(event, target /* , record, instance */) {
+ var _this3 = this;
+
+ var collections = (0, _jquery2.default)(target).find('[data-type="collection"]');
+ if (!collections.length) {
+ return;
+ }
+
+ collections.each(function (index, collection) {
+ collection = (0, _jquery2.default)(collection);
+ if (! ~_this3.lists.index(collection)) {
+ _this3.addList(collection);
+ }
+ });
+ }
+ }]);
+
+ return CollectionsField;
+ }();
+
+ exports.default = CollectionsField;
+ var Instance = exports.Instance = new CollectionsField();
+
+/***/ },
+/* 236 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var _jquery = __webpack_require__(196);
+
+ var _jquery2 = _interopRequireDefault(_jquery);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ // Plugins sliders details
+ (0, _jquery2.default)('.gpm-name, .gpm-actions').on('click', function (e) {
+ var element = (0, _jquery2.default)(this);
+ var target = (0, _jquery2.default)(e.target);
+ var tag = target.prop('tagName').toLowerCase();
+
+ if (tag === 'a' || element.parent('a').length) {
+ return true;
+ }
+
+ var wrapper = element.siblings('.gpm-details').find('.table-wrapper');
+
+ wrapper.slideToggle({
+ duration: 350,
+ complete: function complete() {
+ var visible = wrapper.is(':visible');
+ wrapper.closest('tr').find('.gpm-details-expand i').removeClass('fa-chevron-' + (visible ? 'down' : 'up')).addClass('fa-chevron-' + (visible ? 'up' : 'down'));
+ }
+ });
+ });
+
+/***/ },
+/* 237 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var _jquery = __webpack_require__(196);
+
+ var _jquery2 = _interopRequireDefault(_jquery);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ // Themes Switcher Warning
+ (0, _jquery2.default)(document).on('mousedown', '[data-remodal-target="theme-switch-warn"]', function (event) {
+ var name = (0, _jquery2.default)(event.target).closest('[data-gpm-theme]').find('.gpm-name a:first').text();
+ var remodal = (0, _jquery2.default)('.remodal.theme-switcher');
+
+ remodal.find('strong').text(name);
+ remodal.find('.button.continue').attr('href', (0, _jquery2.default)(event.target).attr('href'));
+ });
+
+/***/ }
+]);
+//# sourceMappingURL=admin.js.map
\ No newline at end of file
diff --git a/themes/grav/js/admin.js.map b/themes/grav/js/admin.js.map
new file mode 100644
index 00000000..fe456be7
--- /dev/null
+++ b/themes/grav/js/admin.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["webpack:///./app/main.js","webpack:///./app/utils/gpm.js","webpack:///./~/whatwg-fetch/fetch.js","webpack:///./~/babel-polyfill/lib/index.js","webpack:///./~/core-js/shim.js","webpack:///./~/core-js/modules/es5.js","webpack:///./~/core-js/modules/$.js","webpack:///./~/core-js/modules/$.export.js","webpack:///./~/core-js/modules/$.global.js","webpack:///./~/core-js/modules/$.core.js","webpack:///./~/core-js/modules/$.hide.js","webpack:///./~/core-js/modules/$.property-desc.js","webpack:///./~/core-js/modules/$.descriptors.js","webpack:///./~/core-js/modules/$.fails.js","webpack:///./~/core-js/modules/$.redefine.js","webpack:///./~/core-js/modules/$.uid.js","webpack:///./~/core-js/modules/$.ctx.js","webpack:///./~/core-js/modules/$.a-function.js","webpack:///./~/core-js/modules/$.html.js","webpack:///./~/core-js/modules/$.dom-create.js","webpack:///./~/core-js/modules/$.is-object.js","webpack:///./~/core-js/modules/$.has.js","webpack:///./~/core-js/modules/$.cof.js","webpack:///./~/core-js/modules/$.invoke.js","webpack:///./~/core-js/modules/$.an-object.js","webpack:///./~/core-js/modules/$.to-object.js","webpack:///./~/core-js/modules/$.defined.js","webpack:///./~/core-js/modules/$.to-iobject.js","webpack:///./~/core-js/modules/$.iobject.js","webpack:///./~/core-js/modules/$.to-integer.js","webpack:///./~/core-js/modules/$.to-index.js","webpack:///./~/core-js/modules/$.to-length.js","webpack:///./~/core-js/modules/$.array-methods.js","webpack:///./~/core-js/modules/$.array-species-create.js","webpack:///./~/core-js/modules/$.is-array.js","webpack:///./~/core-js/modules/$.wks.js","webpack:///./~/core-js/modules/$.shared.js","webpack:///./~/core-js/modules/$.array-includes.js","webpack:///./~/core-js/modules/es6.symbol.js","webpack:///./~/core-js/modules/$.set-to-string-tag.js","webpack:///./~/core-js/modules/$.keyof.js","webpack:///./~/core-js/modules/$.get-names.js","webpack:///./~/core-js/modules/$.enum-keys.js","webpack:///./~/core-js/modules/$.library.js","webpack:///./~/core-js/modules/es6.object.assign.js","webpack:///./~/core-js/modules/$.object-assign.js","webpack:///./~/core-js/modules/es6.object.is.js","webpack:///./~/core-js/modules/$.same-value.js","webpack:///./~/core-js/modules/es6.object.set-prototype-of.js","webpack:///./~/core-js/modules/$.set-proto.js","webpack:///./~/core-js/modules/es6.object.to-string.js","webpack:///./~/core-js/modules/$.classof.js","webpack:///./~/core-js/modules/es6.object.freeze.js","webpack:///./~/core-js/modules/$.object-sap.js","webpack:///./~/core-js/modules/es6.object.seal.js","webpack:///./~/core-js/modules/es6.object.prevent-extensions.js","webpack:///./~/core-js/modules/es6.object.is-frozen.js","webpack:///./~/core-js/modules/es6.object.is-sealed.js","webpack:///./~/core-js/modules/es6.object.is-extensible.js","webpack:///./~/core-js/modules/es6.object.get-own-property-descriptor.js","webpack:///./~/core-js/modules/es6.object.get-prototype-of.js","webpack:///./~/core-js/modules/es6.object.keys.js","webpack:///./~/core-js/modules/es6.object.get-own-property-names.js","webpack:///./~/core-js/modules/es6.function.name.js","webpack:///./~/core-js/modules/es6.function.has-instance.js","webpack:///./~/core-js/modules/es6.number.constructor.js","webpack:///./~/core-js/modules/$.to-primitive.js","webpack:///./~/core-js/modules/$.string-trim.js","webpack:///./~/core-js/modules/es6.number.epsilon.js","webpack:///./~/core-js/modules/es6.number.is-finite.js","webpack:///./~/core-js/modules/es6.number.is-integer.js","webpack:///./~/core-js/modules/$.is-integer.js","webpack:///./~/core-js/modules/es6.number.is-nan.js","webpack:///./~/core-js/modules/es6.number.is-safe-integer.js","webpack:///./~/core-js/modules/es6.number.max-safe-integer.js","webpack:///./~/core-js/modules/es6.number.min-safe-integer.js","webpack:///./~/core-js/modules/es6.number.parse-float.js","webpack:///./~/core-js/modules/es6.number.parse-int.js","webpack:///./~/core-js/modules/es6.math.acosh.js","webpack:///./~/core-js/modules/$.math-log1p.js","webpack:///./~/core-js/modules/es6.math.asinh.js","webpack:///./~/core-js/modules/es6.math.atanh.js","webpack:///./~/core-js/modules/es6.math.cbrt.js","webpack:///./~/core-js/modules/$.math-sign.js","webpack:///./~/core-js/modules/es6.math.clz32.js","webpack:///./~/core-js/modules/es6.math.cosh.js","webpack:///./~/core-js/modules/es6.math.expm1.js","webpack:///./~/core-js/modules/$.math-expm1.js","webpack:///./~/core-js/modules/es6.math.fround.js","webpack:///./~/core-js/modules/es6.math.hypot.js","webpack:///./~/core-js/modules/es6.math.imul.js","webpack:///./~/core-js/modules/es6.math.log10.js","webpack:///./~/core-js/modules/es6.math.log1p.js","webpack:///./~/core-js/modules/es6.math.log2.js","webpack:///./~/core-js/modules/es6.math.sign.js","webpack:///./~/core-js/modules/es6.math.sinh.js","webpack:///./~/core-js/modules/es6.math.tanh.js","webpack:///./~/core-js/modules/es6.math.trunc.js","webpack:///./~/core-js/modules/es6.string.from-code-point.js","webpack:///./~/core-js/modules/es6.string.raw.js","webpack:///./~/core-js/modules/es6.string.trim.js","webpack:///./~/core-js/modules/es6.string.iterator.js","webpack:///./~/core-js/modules/$.string-at.js","webpack:///./~/core-js/modules/$.iter-define.js","webpack:///./~/core-js/modules/$.iterators.js","webpack:///./~/core-js/modules/$.iter-create.js","webpack:///./~/core-js/modules/es6.string.code-point-at.js","webpack:///./~/core-js/modules/es6.string.ends-with.js","webpack:///./~/core-js/modules/$.string-context.js","webpack:///./~/core-js/modules/$.is-regexp.js","webpack:///./~/core-js/modules/$.fails-is-regexp.js","webpack:///./~/core-js/modules/es6.string.includes.js","webpack:///./~/core-js/modules/es6.string.repeat.js","webpack:///./~/core-js/modules/$.string-repeat.js","webpack:///./~/core-js/modules/es6.string.starts-with.js","webpack:///./~/core-js/modules/es6.array.from.js","webpack:///./~/core-js/modules/$.iter-call.js","webpack:///./~/core-js/modules/$.is-array-iter.js","webpack:///./~/core-js/modules/core.get-iterator-method.js","webpack:///./~/core-js/modules/$.iter-detect.js","webpack:///./~/core-js/modules/es6.array.of.js","webpack:///./~/core-js/modules/es6.array.iterator.js","webpack:///./~/core-js/modules/$.add-to-unscopables.js","webpack:///./~/core-js/modules/$.iter-step.js","webpack:///./~/core-js/modules/es6.array.species.js","webpack:///./~/core-js/modules/$.set-species.js","webpack:///./~/core-js/modules/es6.array.copy-within.js","webpack:///./~/core-js/modules/$.array-copy-within.js","webpack:///./~/core-js/modules/es6.array.fill.js","webpack:///./~/core-js/modules/$.array-fill.js","webpack:///./~/core-js/modules/es6.array.find.js","webpack:///./~/core-js/modules/es6.array.find-index.js","webpack:///./~/core-js/modules/es6.regexp.constructor.js","webpack:///./~/core-js/modules/$.flags.js","webpack:///./~/core-js/modules/es6.regexp.flags.js","webpack:///./~/core-js/modules/es6.regexp.match.js","webpack:///./~/core-js/modules/$.fix-re-wks.js","webpack:///./~/core-js/modules/es6.regexp.replace.js","webpack:///./~/core-js/modules/es6.regexp.search.js","webpack:///./~/core-js/modules/es6.regexp.split.js","webpack:///./~/core-js/modules/es6.promise.js","webpack:///./~/core-js/modules/$.strict-new.js","webpack:///./~/core-js/modules/$.for-of.js","webpack:///./~/core-js/modules/$.species-constructor.js","webpack:///./~/core-js/modules/$.microtask.js","webpack:///./~/core-js/modules/$.task.js","webpack:///./~/core-js/modules/$.redefine-all.js","webpack:///./~/core-js/modules/es6.map.js","webpack:///./~/core-js/modules/$.collection-strong.js","webpack:///./~/core-js/modules/$.collection.js","webpack:///./~/core-js/modules/es6.set.js","webpack:///./~/core-js/modules/es6.weak-map.js","webpack:///./~/core-js/modules/$.collection-weak.js","webpack:///./~/core-js/modules/es6.weak-set.js","webpack:///./~/core-js/modules/es6.reflect.apply.js","webpack:///./~/core-js/modules/es6.reflect.construct.js","webpack:///./~/core-js/modules/es6.reflect.define-property.js","webpack:///./~/core-js/modules/es6.reflect.delete-property.js","webpack:///./~/core-js/modules/es6.reflect.enumerate.js","webpack:///./~/core-js/modules/es6.reflect.get.js","webpack:///./~/core-js/modules/es6.reflect.get-own-property-descriptor.js","webpack:///./~/core-js/modules/es6.reflect.get-prototype-of.js","webpack:///./~/core-js/modules/es6.reflect.has.js","webpack:///./~/core-js/modules/es6.reflect.is-extensible.js","webpack:///./~/core-js/modules/es6.reflect.own-keys.js","webpack:///./~/core-js/modules/$.own-keys.js","webpack:///./~/core-js/modules/es6.reflect.prevent-extensions.js","webpack:///./~/core-js/modules/es6.reflect.set.js","webpack:///./~/core-js/modules/es6.reflect.set-prototype-of.js","webpack:///./~/core-js/modules/es7.array.includes.js","webpack:///./~/core-js/modules/es7.string.at.js","webpack:///./~/core-js/modules/es7.string.pad-left.js","webpack:///./~/core-js/modules/$.string-pad.js","webpack:///./~/core-js/modules/es7.string.pad-right.js","webpack:///./~/core-js/modules/es7.string.trim-left.js","webpack:///./~/core-js/modules/es7.string.trim-right.js","webpack:///./~/core-js/modules/es7.regexp.escape.js","webpack:///./~/core-js/modules/$.replacer.js","webpack:///./~/core-js/modules/es7.object.get-own-property-descriptors.js","webpack:///./~/core-js/modules/es7.object.values.js","webpack:///./~/core-js/modules/$.object-to-array.js","webpack:///./~/core-js/modules/es7.object.entries.js","webpack:///./~/core-js/modules/es7.map.to-json.js","webpack:///./~/core-js/modules/$.collection-to-json.js","webpack:///./~/core-js/modules/es7.set.to-json.js","webpack:///./~/core-js/modules/js.array.statics.js","webpack:///./~/core-js/modules/web.timers.js","webpack:///./~/core-js/modules/$.partial.js","webpack:///./~/core-js/modules/$.path.js","webpack:///./~/core-js/modules/web.immediate.js","webpack:///./~/core-js/modules/web.dom.iterable.js","webpack:///./~/babel-regenerator-runtime/runtime.js","webpack:///./~/process/browser.js","webpack:///./app/utils/response.js","webpack:///./app/utils/toastr.js","webpack:///external \"GravAdmin\"","webpack:///./~/events/events.js","webpack:///./app/utils/keepalive.js","webpack:///./app/updates/index.js","webpack:///./app/utils/formatbytes.js","webpack:///./app/updates/check.js","webpack:///./app/updates/update.js","webpack:///./app/utils/request.js","webpack:///./app/dashboard/index.js","webpack:///./app/dashboard/chart.js","webpack:///./app/dashboard/cache.js","webpack:///./app/dashboard/backup.js","webpack:///./app/pages/index.js","webpack:///./app/pages/filter.js","webpack:///./~/debounce/index.js","webpack:///./~/date-now/index.js","webpack:///./app/pages/tree.js","webpack:///./app/pages/page/index.js","webpack:///./app/pages/page/add.js","webpack:///./app/pages/page/move.js","webpack:///./app/pages/page/delete.js","webpack:///./app/pages/page/media.js","webpack:///./app/forms/index.js","webpack:///./app/forms/state.js","webpack:///./~/immutable/dist/immutable.js","webpack:///./app/utils/jquery-utils.js","webpack:///./app/forms/form.js","webpack:///./app/forms/fields/index.js","webpack:///./app/forms/fields/selectize.js","webpack:///./app/forms/fields/array.js","webpack:///./app/forms/fields/collections.js","webpack:///./app/plugins/index.js","webpack:///./app/themes/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,qBAAU,KAAK,EAAE;;;AAAC;mBAEH;AACX,QAAG,EAAE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AAO;AACP,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA;AACA,QAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAS;AACT;AACA,UAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAS;AACT;AACA,UAAS;AACT;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA,wCAAuC,0BAA0B;AACjE;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,gCAA+B,0BAA0B,eAAe;AACxE;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAO;;AAEP;AACA,MAAK;AACL;AACA;AACA,EAAC;;;AAGD;AACA;AACA,EAAC,e;;;;;;;ACpYD;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAC,e;;;;;;;AChBD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yC;;;;;;ACvGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6CAA4C,gBAAgB,UAAU,GAAG;AACzE,IAAG;AACH;AACA;AACA;AACA,MAAK,UAAU;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK,UAAU;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,IAAG;AACH;AACA;AACA,EAAC;;AAED;AACA;AACA,2BAA0B,SAAS;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS,UAAU;AACnB;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA,8BAA6B,iCAAiC;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS,sCAAsC;AAC/C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS,WAAW;AACpB;AACA;AACA,EAAC;;AAED;AACA,6BAA4B,gBAAgB,kBAAkB,GAAG;;AAEjE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC;AACD;AACA,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACnRD;AACA;AACA;AACA;AACA,iBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAqF,uBAAuB;AAC5G,oEAAmE;AACnE,iEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAc;AACd,eAAc;AACd,eAAc;AACd,eAAc;AACd,gBAAe;AACf,gBAAe;AACf,0B;;;;;;ACxCA;AACA;AACA;AACA,wCAAuC,gC;;;;;;ACHvC,8BAA6B;AAC7B,sCAAqC,gC;;;;;;ACDrC;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA,G;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACPA;AACA;AACA,kCAAiC,QAAQ,gBAAgB,UAAU,GAAG;AACtE,EAAC,E;;;;;;ACHD;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,G;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,EAAC;AACD;AACA,EAAC,E;;;;;;AC1BD;AACA;AACA;AACA;AACA,G;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACnBA;AACA;AACA;AACA,G;;;;;;ACHA,8E;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACNA;AACA;AACA,G;;;;;;ACFA,wBAAuB;AACvB;AACA;AACA,G;;;;;;ACHA,kBAAiB;;AAEjB;AACA;AACA,G;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,G;;;;;;ACfA;AACA;AACA;AACA;AACA,G;;;;;;ACJA;AACA;AACA;AACA;AACA,G;;;;;;ACJA;AACA;AACA;AACA;AACA,G;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACLA;AACA;AACA;AACA;AACA,G;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACNA;AACA;AACA;AACA;AACA,4DAA2D;AAC3D,G;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS,eAAe;AACxB;AACA;AACA;AACA,uCAAsC;AACtC;AACA,+BAA8B;AAC9B,8BAA6B;AAC7B,gCAA+B;AAC/B,oCAAmC;AACnC,UAAS,+BAA+B;AACxC;AACA;AACA;AACA;AACA,G;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,G;;;;;;ACfA;AACA;AACA;AACA;AACA,G;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACNA;AACA;AACA,oDAAmD;AACnD;AACA,wCAAuC;AACvC,G;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK,WAAW,eAAe;AAC/B;AACA,MAAK;AACL;AACA,G;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,4BAA2B;AAC3B,qBAAoB,4BAA4B,SAAS,IAAI;AAC7D,IAAG;AACH,EAAC;AACD;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,+DAA8D;AAC9D;AACA,MAAK;AACL;AACA,uBAAsB,iCAAiC;AACvD,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAoD,KAAK,QAAQ,iCAAiC;AAClG,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,IAAG;AACH,yBAAwB,eAAe,EAAE;AACzC,yBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;;AAEA,iCAAgC,gBAAgB;;AAEhD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA,8EAA6E,sBAAsB;;AAEnG;AACA;AACA;AACA;AACA;AACA,2C;;;;;;AClOA;AACA;AACA;;AAEA;AACA,mEAAkE,+BAA+B;AACjG,G;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACTA;AACA;AACA;AACA,mBAAkB;;AAElB;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,G;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACbA,wB;;;;;;ACAA;AACA;;AAEA,2CAA0C,gCAAqC,E;;;;;;ACH/E;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC,UAAU,EAAE;AAC9C,cAAa,gCAAgC;AAC7C,EAAC,oCAAoC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC,iB;;;;;;AChCD;AACA;AACA,+BAA8B,4BAA8B,E;;;;;;ACF5D;AACA;AACA;AACA,G;;;;;;ACHA;AACA;AACA,+BAA8B,4CAA6C,E;;;;;;ACF3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA,QAAO,UAAU,cAAc;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,MAAK,GAAG;AACR;AACA,G;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,E;;;;;;ACTA;AACA;AACA;AACA;AACA,0BAAyB,kBAAkB,EAAE;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACfA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACPD;AACA;AACA;AACA;AACA;AACA,+BAA8B;AAC9B;AACA;AACA,oDAAmD,OAAO,EAAE;AAC5D,G;;;;;;ACTA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACPD;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACPD;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACPD;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACPD;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACPD;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACPD;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACPD;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACPD;AACA;AACA;AACA,EAAC,E;;;;;;ACHD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACfD;AACA;AACA;AACA;AACA;AACA;AACA,6EAA4E;AAC5E;AACA;AACA;AACA;AACA;AACA,GAAE,E;;;;;;ACZF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAkD;AAClD,MAAK;AACL;AACA,wCAAuC,cAAc,OAAO;AAC5D,wCAAuC,cAAc,OAAO;AAC5D;AACA;AACA,oEAAmE,OAAO;AAC1E;AACA;AACA;AACA;AACA,QAAO;AACP;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAwC,0BAA0B,EAAE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,E;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,2B;;;;;;AC5BA;AACA;;AAEA,+BAA8B,0BAA0B,E;;;;;;ACHxD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACRD;AACA;;AAEA,+BAA8B,mCAAqC,E;;;;;;ACHnE;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACLA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACPD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACTD;AACA;;AAEA,+BAA8B,mCAAmC,E;;;;;;ACHjE;AACA;;AAEA,+BAA8B,oCAAoC,E;;;;;;ACHlE;AACA;;AAEA,+BAA8B,uBAAuB,E;;;;;;ACHrD;AACA;;AAEA,+BAA8B,mBAAmB,E;;;;;;ACHjD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACbD;AACA;AACA;AACA,G;;;;;;ACHA;AACA;;AAEA;AACA;AACA;;AAEA,6BAA4B,aAAa,E;;;;;;ACPzC;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACPD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACRD;AACA;AACA;AACA,G;;;;;;ACHA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACPD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACRD;AACA;;AAEA,6BAA4B,+BAAiC,E;;;;;;ACH7D;AACA;AACA;AACA,G;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACzBD;AACA;AACA;;AAEA;AACA,yCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,EAAC,E;;;;;;ACzBD;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;AChBD;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACPD;AACA;;AAEA,6BAA4B,+BAAiC,E;;;;;;ACH7D;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACPD;AACA;;AAEA,6BAA4B,8BAA+B,E;;;;;;ACH3D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACdD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACXD;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACPD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,EAAC,E;;;;;;ACvBD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,EAAC,E;;;;;;AClBD;AACA;AACA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACND;AACA;;AAEA;AACA;AACA,8BAA6B;AAC7B,eAAc;AACd;AACA,EAAC;AACD;AACA;AACA;AACA,gCAA+B;AAC/B;AACA;AACA,WAAU;AACV,EAAC,E;;;;;;AChBD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAA4B,aAAa;;AAEzC;AACA;AACA;AACA;AACA;AACA,yCAAwC,oCAAoC;AAC5E,6CAA4C,oCAAoC;AAChF,MAAK,2BAA2B,oCAAoC;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAkB,mBAAmB;AACrC;AACA;AACA,oCAAmC,2BAA2B;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,G;;;;;;ACjEA,qB;;;;;;ACAA;AACA;AACA;AACA;AACA;;AAEA;AACA,4FAAkF,aAAa,EAAE;;AAEjG;AACA,wDAAuD,0BAA0B;AACjF;AACA,G;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACRD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACpBD,uBAAsB;AACtB;AACA;;AAEA;AACA;AACA;AACA,G;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,MAAK,UAAU;AACf,IAAG;AACH,G;;;;;;ACXA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACXD;;AAEA;AACA;AACA;AACA,EAAC,E;;;;;;ACLD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAO,MAAM;AACb;AACA,G;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;AClBD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA2E,kBAAkB,EAAE;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAoD,gCAAgC;AACpF;AACA;AACA,MAAK;AACL;AACA,kCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;;;;;;ACnCD;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,G;;;;;;ACXA;AACA;AACA;AACA;;AAEA;AACA;AACA,G;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACPA;AACA;;AAEA;AACA;AACA,gCAA+B,qBAAqB;AACpD,gCAA+B,SAAS,EAAE;AAC1C,EAAC,UAAU;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA,4BAA2B,aAAa;AACxC,gCAA+B,aAAa;AAC5C;AACA,IAAG,UAAU;AACb;AACA,G;;;;;;ACpBA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;AClBD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iCAAgC;AAChC,eAAc;AACd,kBAAiB;AACjB;AACA,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;;AAEA;AACA;AACA,6B;;;;;;ACjCA;AACA;AACA;AACA,4FAAuF;AACvF;AACA;AACA,G;;;;;;ACNA;AACA,WAAU;AACV,G;;;;;;ACFA,mC;;;;;;ACAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAoB,aAAa;AACjC,IAAG;AACH,G;;;;;;ACZA;AACA;;AAEA,8BAA6B,qCAA6C;;AAE1E,wC;;;;;;ACLA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,G;;;;;;AC1BA;AACA;;AAEA,8BAA6B,+BAAgC;;AAE7D,kC;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,gBAAgB,EAAE;AACxD;AACA;AACA;AACA;AACA,EAAC;AACD,+B;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,gBAAgB,EAAE;AACxD;AACA;AACA;AACA;AACA,EAAC;AACD,+B;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAsB,kBAAkB,EAAE;AAC1C,yBAAwB,gBAAgB;AACxC,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA;;AAEA,oC;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACLD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACTD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,4BAA2B,UAAU;AACrC;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,+BAA8B,yCAAyC;AACvE;AACA;AACA,0BAAyB,oCAAoC;AAC7D;AACA;AACA,G;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACXD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACTD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACXD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gCAA+B;AAC/B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA0C,cAAc,WAAW;AACnE;AACA,yCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA,6BAA4B;AAC5B,yBAAwB,2BAA2B;AACnD,QAAO;AACP;AACA;AACA,IAAG,UAAU,eAAe;AAC5B;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,aAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA,YAAW;AACX,UAAS;AACT,QAAO;AACP;AACA;AACA;AACA,4CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT,oBAAmB,gCAAgC;AACnD,UAAS;AACT;AACA;AACA,QAAO;AACP,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA,+BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA8B;AAC9B;AACA;AACA;AACA;AACA,wBAAuB,qBAAqB;AAC5C;AACA;AACA,UAAS;AACT;AACA;AACA,QAAO;AACP,MAAK;AACL;AACA;AACA;AACA;AACA,IAAG;AACH,mBAAkB,oBAAoB,KAAK;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA,2DAA0D,WAAW;AACrE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;AACD;AACA,oCAAmC;AACnC,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT,QAAO;AACP;AACA,MAAK;AACL;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP,MAAK;AACL;AACA;AACA;AACA,EAAC,E;;;;;;AChSD;AACA;AACA;AACA,G;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAgE,gBAAgB;AAChF;AACA,IAAG,2CAA2C,gCAAgC;AAC9E;AACA;AACA,G;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA,sCAAqC,oBAAoB,EAAE;AAC3D;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAc;AACd;AACA;AACA;AACA;AACA,IAAG;AACH,G;;;;;;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;AC1EA;AACA;AACA;AACA;AACA,G;;;;;;ACJA;AACA;;AAEA;AACA;AACA,yBAAwB,mEAAmE;AAC3F,EAAC;AACD;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,EAAC,gB;;;;;;AChBD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,uBAAsB,OAAO;AAC7B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gCAA+B;AAC/B,2BAA0B;AAC1B,2BAA0B;AAC1B,sBAAqB;AACrB;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,8DAA6D,OAAO;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA;AACA;AACA,0BAAyB;AACzB,sBAAqB;AACrB,2BAA0B;AAC1B,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA,G;;;;;;AC9JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA,QAAO,kCAAkC,gCAAgC,aAAa;AACtF,8BAA6B,mCAAmC,aAAa;AAC7E;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,4DAA2D;AAC3D;AACA,iDAAgD,iBAAiB,EAAE;AACnE;AACA,2DAA0D,aAAa,EAAE;AACzE;AACA;AACA,2B;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA,G;;;;;;AC9EA;AACA;;AAEA;AACA;AACA,yBAAwB,mEAAmE;AAC3F,EAAC;AACD;AACA;AACA;AACA;AACA,EAAC,U;;;;;;ACXD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA4B,mEAAmE;AAC/F,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP,MAAK;AACL,IAAG;AACH,E;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAqB;AACrB,2BAA0B;AAC1B;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,IAAG;AACH;AACA;AACA;AACA,MAAK;AACL,4CAA2C;AAC3C;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA,G;;;;;;ACrFA;AACA;;AAEA;AACA;AACA,6BAA4B,mEAAmE;AAC/F,EAAC;AACD;AACA;AACA;AACA;AACA,EAAC,qB;;;;;;ACXD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACRD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,0CAAyC;AACzC,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACrCD;AACA;AACA;AACA;;AAEA;AACA;AACA,sCAAqC,MAAM,SAAS,OAAO,SAAS;AACpE,EAAC;AACD;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,EAAC,E;;;;;;AClBD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACVD;AACA;AACA;AACA;AACA;AACA,gCAA+B;AAC/B,eAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC;AACtC,IAAG;AACH,WAAU;AACV,EAAC;;AAED;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACzBD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gCAA+B,SAAS,E;;;;;;ACnBxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACTD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACTD;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACPD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACVD;AACA;;AAEA,gCAA+B,kCAAiC,E;;;;;;ACHhE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACRA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,EAAC,E;;;;;;ACfD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gCAA+B,SAAS,E;;;;;;AC5BxC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,EAAC,E;;;;;;ACdD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED,sC;;;;;;ACXA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACTD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACRD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;AChBA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACRD;AACA;AACA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACND;AACA;AACA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACND;AACA;AACA,0DAAwD;;AAExD,+BAA8B,4BAA4B,gBAAgB,GAAG;;;;;;;ACJ7E;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,G;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,EAAC,E;;;;;;ACtBD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACRD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,G;;;;;;ACfA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACRD;AACA;;AAEA,4BAA2B,wCAAiD,E;;;;;;ACH5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACVA;AACA;;AAEA,4BAA2B,wCAAiD,E;;;;;;ACH5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA,sC;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAqE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACnBD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAmB,WAAW;AAC9B;AACA;AACA;AACA,G;;;;;;ACvBA,yC;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACLD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0E;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAgB;AAChB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAc;AACd,MAAK;AACL,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA0C,WAAW;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,4BAA2B;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAS;AACT;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,YAAW;AACX;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,UAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;;AAEA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAiC,kBAAkB;AACnD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,kBAAiB;;AAEjB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,yBAAwB,iBAAiB;AACzC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,aAAY;AACZ;AACA;;AAEA;AACA,aAAY;AACZ;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,+CAA8C,QAAQ;AACtD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAa;AACb;AACA;;AAEA,YAAW;AACX;AACA;AACA;;AAEA,YAAW;AACX;AACA;AACA;;AAEA,YAAW;AACX;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA,+CAA8C,QAAQ;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA,MAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,QAAO;AACP;AACA;AACA,MAAK;;AAEL;AACA,+CAA8C,QAAQ;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA,+CAA8C,QAAQ;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChpBA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA2B;AAC3B;AACA;AACA;AACA,6BAA4B,UAAU;;;;;;;;;;;;SChFtB,WAAW,GAAX,WAAW;SAQX,SAAS,GAAT,SAAS;SAIT,YAAY,GAAZ,YAAY;SA0CZ,iBAAiB,GAAjB,iBAAiB;;;;;;;;;;AA7DjC,KAAI,KAAK,GAAG,eAAS,QAAQ,EAAE;AAC3B,SAAI,KAAK,GAAG,IAAI,KAAK,CAAC,QAAQ,CAAC,UAAU,IAAI,QAAQ,IAAI,EAAE,CAAC,CAAC;AAC7D,UAAK,CAAC,QAAQ,GAAG,Q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,gBAAe,SAAS;AACxB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,IAAG;AACH,qBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;KCtSM,SAAS;AACX,cADE,SAAS,GACG;+BADZ,SAAS;;AAEP,aAAI,CAAC,MAAM,GAAG,KAAK,CAAC;MACvB;;kBAHC,SAAS;;iCAKH;;;AACJ,iBAAI,OAAO,GAAG,YATb,MAAM,CASc,aAAa,GAAG,GAAG,GAAG,IAAI,CAAC;AAChD,iBAAI,CAAC,KAAK,GAAG,WAAW,CAAC;wBAAM,MAAK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C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAgB;AAChB;AACA;;AAEA;AACA;AACA;;AAEA;AACA,wBAAuB;AACvB,oBAAmB;;AAEnB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,qBAAoB,UAAU;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA,8CAA6C,wBAAwB;AACrE;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA,aAAY;AACZ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAmC,KAAK;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;;AAEA;;AAEA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAsB,gBAAgB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAsB,gBAAgB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;;AAEA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;;;;;AAKA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAsB,gBAAgB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;;AAEA;AACA;AACA,wCAAuC,SAAS;AAChD;AACA;;AAEA;AACA;AACA,oFAAmF,yCAAyC;AAC5H;AACA;AACA,kFAAiF,yCAAyC;AAC1H;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C;AAC7C;AACA,0BAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAsB,gBAAgB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA,4DAA2D;AAC3D;AACA;AACA,UAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAsB,gBAAgB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;;AAGA,4CAA2C;;AAE3C,8CAA6C;;AAE7C,0CAAyC;;;AAGzC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAgB;AAChB,iBAAgB;AAChB;AACA;AACA;AACA,8EAA6E;AAC7E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAoB,oBAAoB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA,QAAO;AACP,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,+BAA8B,SAAS;AACvC;AACA,MAAK;AACL;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAwC,qBAAqB;AAC7D,UAAS;AACT;;AAEA;AACA,oCAAmC,KAAK;AACxC;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,2DAA0D,SAAS;AACnE;;AAEA;AACA;AACA;;AAEA;AACA,kDAAiD,eAAe;AAChE;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,iDAAgD;AAChD;AACA;;AAEA,gDAA+C;AAC/C;AACA;AACA;AACA,uBAAsB;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qDAAoD;AACpD;AACA;;AAEA,oDAAmD;AACnD;AACA;AACA;AACA,uBAAsB;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sDAAqD;AACrD;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;;AAGA;;;;AAIA;AACA;AACA;AACA;;AAEA;AACA;AACA,6CAA4C,UAAU;AACtD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,qCAAoC,WAAW;AAC/C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,gBAAe;AACf;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6CAA4C,UAAU;AACtD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qCAAoC,WAAW;AAC/C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,gBAAe;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;AAIA;;AAEA;AACA;AACA;AACA,oDAAmD,gBAAgB;AACnE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kDAAiD,gBAAgB;AACjE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,qBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kDAAiD,UAAU;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA,uCAAsC,iBAAiB;AACvD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wCAAuC,oBAAoB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA,UAAS;AACT;AACA;AACA;AACA,uBAAsB,mBAAmB;AACzC;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAoB,aAAa;AACjC;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAoB,aAAa;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,sBAAsB;AAC5D,QAAO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yBAAwB,oBAAoB;AAC5C;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,yBAAwB,oBAAoB;AAC5C;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,kDAAiD;AACjD;AACA;;AAEA;AACA;AACA;;AAEA,sDAAqD;AACrD;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAwB,kBAAkB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iCAAgC,eAAe;AAC/C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,iBAAiB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAwC,qBAAqB;AAC7D,UAAS;AACT;;AAEA;AACA;AACA;;AAEA;AACA,2CAA0C,KAAK;AAC/C;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,6DAA4D;AAC5D;AACA,2BAA0B,+CAA+C;AACzE;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAwB;AACxB;AACA;AACA;AACA;AACA,sDAAqD,wCAAwC;AAC7F,6DAA4D,gBAAgB;AAC5E;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qDAAoD;AACpD;AACA;AACA,kDAAiD;AACjD;AACA;AACA;;AAEA,gEAA+D;AAC/D;AACA;AACA,gDAA+C;AAC/C;AACA;AACA;;AAEA,kEAAiE;AACjE;AACA;AACA;AACA,4BAA2B,wBAAwB;AACnD;AACA,2BAA0B,4CAA4C;AACtE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;;AAEA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,oEAAmE;AACnE;AACA,iDAAgD,mCAAmC;AACnF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,gEAA+D;AAC/D,iDAAgD,wBAAwB;AACxE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sEAAqE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;;;AAGA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,sCAAqC;AACrC;AACA,2DAA0D;AAC1D,4CAA2C;AAC3C;AACA;AACA,wCAAuC;AACvC,6CAA4C;AAC5C;AACA,8DAA6D;AAC7D,kDAAiD,kCAAkC;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,0CAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,gEAA+D;AAC/D;AACA,6BAA4B,8DAA8D;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,6CAA4C;AAC5C;AACA;AACA;AACA,6CAA4C;AAC5C;AACA;AACA;AACA;AACA,QAAO;AACP;AACA,QAAO;AACP,mDAAkD;AAClD;AACA,0DAAyD;AACzD,kDAAiD,wBAAwB;AACzE;AACA;AACA,iCAAgC;AAChC;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAA+D;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAsB;AACtB;AACA,MAAK;AACL;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAsB;AACtB;AACA,MAAK;AACL;AACA,uCAAsC,oCAAoC;AAC1E;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA,UAAS;AACT;AACA;AACA,QAAO;AACP;;AAEA;AACA;;;AAGA;AACA;AACA,6DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,gEAA+D;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;;;AAGA;AACA;AACA,8DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,gEAA+D;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,QAAO;AACP;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,MAAK,uBAAuB,oBAAoB;;AAEhD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,8CAA6C;AAC7C;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;;;AAGA;AACA;AACA;AACA,wBAAuB;AACvB;AACA;;;AAGA;AACA;AACA;AACA,mEAAkE;AAClE;AACA;AACA,UAAS;AACT,+CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAuB;AACvB;AACA,mCAAkC,6CAA6C;AAC/E;AACA,wBAAuB,uBAAuB,EAAE;AAChD,wBAAuB,mBAAmB;AAC1C;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA8B,mCAAmC;AACjE,kCAAiC,kDAAkD;AACnF;AACA,MAAK;AACL,+CAA8C,4CAA4C;AAC1F;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,8DAA6D,cAAc;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,+CAA8C,gBAAgB;AAC9D,6CAA4C,cAAc;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAqD,eAAe;AACpE;AACA,QAAO;AACP;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,oDAAmD,KAAK;AACxD;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4DAA2D;AAC3D,sEAAqE,qBAAqB;AAC1F;;AAEA,yDAAwD;AACxD,sEAAqE,qBAAqB;AAC1F;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAqC,kBAAkB;AACvD,UAAS;AACT;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAmC,KAAK;AACxC;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,uCAAsC;AACtC,0CAAyC,oBAAoB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAwB,mBAAmB;AAC3C,4DAA2D,sBAAsB;AACjF;AACA,QAAO;AACP;;AAEA,2CAA0C;AAC1C;AACA;AACA;AACA,0CAAyC,yBAAyB;AAClE;AACA;AACA;AACA,6CAA4C,4BAA4B;AACxE;AACA;AACA,UAAS;AACT,QAAO;AACP;;AAEA,0CAAyC;AACzC;AACA;AACA;AACA,0CAAyC,yBAAyB;AAClE;AACA;AACA;AACA,2CAA0C,4BAA4B;AACtE;AACA;AACA,UAAS;AACT,QAAO;AACP;;AAEA;AACA;AACA;;AAEA,iDAAgD;AAChD;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sDAAqD;AACrD,mDAAkD,wBAAwB;AAC1E;;AAEA;AACA,6CAA4C,SAAS;AACrD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAqC,kBAAkB;AACvD,UAAS;AACT;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,2CAA0C,KAAK;AAC/C;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAAyC,SAAS;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;;;AAGA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qCAAoC,oCAAoC;AACxE;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,kDAAiD,cAAc,EAAE;AACjE;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,2BAA0B;AAC1B;AACA,MAAK;;AAEL;AACA;AACA,2BAA0B;AAC1B;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA,uCAAsC,eAAe,EAAE;AACvD;AACA,MAAK;;AAEL;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA,MAAK;;;AAGL;;AAEA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,MAAK;;;AAGL;;AAEA,yBAAwB;AACxB;AACA,MAAK;;AAEL;AACA,0CAAyC,8BAA8B;AACvE,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,QAAO;AACP;AACA,MAAK;;AAEL;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;;AAGL;;AAEA;AACA;AACA,MAAK;;AAEL;AACA,kFAAiF,YAAY;AAC7F,MAAK;;AAEL;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAkD;AAClD;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA,2CAA0C,0BAA0B;AACpE,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,2CAA0C,4BAA4B;AACtE,MAAK;;AAEL;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;;AAGL;;AAEA;AACA;AACA;;;AAGA;;AAEA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA2C,wBAAwB;AACnE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP,MAAK;AACL,IAAG;;;;AAIH;;AAEA;;AAEA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA,6CAA4C,8BAA8B;AAC1E,MAAK;;AAEL;AACA,iDAAgD,8BAA8B;AAC9E,MAAK;;AAEL,4CAA2C;AAC3C;AACA;AACA;AACA,4BAA2B;AAC3B;AACA;AACA,MAAK;;AAEL,yCAAwC;AACxC;AACA;AACA,4BAA2B;AAC3B;AACA;AACA;;AAEA,IAAG;;AAEH;AACA;AACA;AACA;AACA,8DAA6D;;;;AAI7D;;AAEA;;AAEA;AACA;AACA,MAAK;;;AAGL;;AAEA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;;AAGL;;AAEA;AACA;AACA;AACA,MA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AC,aAAa,IAAI,OAAO,GAAG,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC;UAC5D;MACJ,CAAC,CAAC;EACN,CAAC,C;;;;;;;;;;;;;;;ACpBF,uBAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,WAAW,EAAE,2CAA2C,EAAE,UAAC,KAAK,EAAK;AAChF,SAAI,IAAI,GAAG,sBAAE,KAAK,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,IAAI,EAAE,CAAC;AACxF,SAAI,OAAO,GAAG,sBAAE,yBAAyB,CAAC,CAAC;;AAE3C,YAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAClC,YAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,sBAAE,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;EAC/E,CAAC,C","file":"admin.js","sourcesContent":["import GPM, { Instance as gpm } from './utils/gpm';\nimport KeepAlive from './utils/keepalive';\nimport Updates, { Instance as updates } from './updates';\nimport Dashboard from './dashboard';\nimport Pages from './pages';\nimport Forms from './forms';\nimport './plugins';\nimport './themes';\n\n// bootstrap jQuery extensions\nimport 'bootstrap/js/dropdown';\n\n// starts the keep alive, auto runs every X seconds\nKeepAlive.start();\n\nexport default {\n GPM: {\n GPM,\n Instance: gpm\n },\n KeepAlive,\n Dashboard,\n Pages,\n Forms,\n Updates: {\n Updates,\n Instance: updates\n }\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/main.js\n **/","import { parseJSON, parseStatus, userFeedbackError } from './response';\nimport { config } from 'grav-config';\nimport { EventEmitter } from 'events';\n\nexport default class GPM extends EventEmitter {\n constructor(action = 'getUpdates') {\n super();\n this.payload = {};\n this.raw = {};\n this.action = action;\n }\n\n setPayload(payload = {}) {\n this.payload = payload;\n this.emit('payload', payload);\n\n return this;\n }\n\n setAction(action = 'getUpdates') {\n this.action = action;\n this.emit('action', action);\n\n return this;\n }\n\n fetch(callback = () => true, flush = false) {\n let data = new FormData();\n data.append('task', 'GPM');\n data.append('action', this.action);\n\n if (flush) {\n data.append('flush', true);\n }\n\n this.emit('fetching', this);\n\n fetch(config.base_url_relative, {\n credentials: 'same-origin',\n method: 'post',\n body: data\n }).then((response) => { this.raw = response; return response; })\n .then(parseStatus)\n .then(parseJSON)\n .then((response) => this.response(response))\n .then((response) => callback(response, this.raw))\n .then((response) => this.emit('fetched', this.payload, this.raw, this))\n .catch(userFeedbackError);\n }\n\n response(response) {\n this.payload = response;\n\n return response;\n }\n}\n\nexport let Instance = new GPM();\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/utils/gpm.js\n **/","/*** IMPORTS FROM imports-loader ***/\n(function() {\n\n(function() {\n 'use strict';\n\n if (self.fetch) {\n return\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n }\n\n function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var list = this.map[name]\n if (!list) {\n list = []\n this.map[name] = list\n }\n list.push(value)\n }\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n }\n\n Headers.prototype.get = function(name) {\n var values = this.map[normalizeName(name)]\n return values ? values[0] : null\n }\n\n Headers.prototype.getAll = function(name) {\n return this.map[normalizeName(name)] || []\n }\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n }\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = [normalizeValue(value)]\n }\n\n Headers.prototype.forEach = function(callback, thisArg) {\n Object.getOwnPropertyNames(this.map).forEach(function(name) {\n this.map[name].forEach(function(value) {\n callback.call(thisArg, value, name, this)\n }, this)\n }, this)\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n reader.readAsArrayBuffer(blob)\n return fileReaderReady(reader)\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader()\n reader.readAsText(blob)\n return fileReaderReady(reader)\n }\n\n var support = {\n blob: 'FileReader' in self && 'Blob' in self && (function() {\n try {\n new Blob();\n return true\n } catch(e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n }\n\n function Body() {\n this.bodyUsed = false\n\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (!body) {\n this._bodyText = ''\n } else if (support.arrayBuffer && ArrayBuffer.prototype.isPrototypeOf(body)) {\n // Only support ArrayBuffers for POST method.\n // Receiving ArrayBuffers happens via Blobs, instead.\n } else {\n throw new Error('unsupported BodyInit type')\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n } else {\n this.text = function() {\n var rejected = consumed(this)\n return rejected ? rejected : Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return (methods.indexOf(upcased) > -1) ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {}\n var body = options.body\n if (Request.prototype.isPrototypeOf(input)) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n if (!body) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = input\n }\n\n this.credentials = options.credentials || this.credentials || 'omit'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n }\n\n Request.prototype.clone = function() {\n return new Request(this)\n }\n\n function decode(body) {\n var form = new FormData()\n body.trim().split('&').forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n }\n\n function headers(xhr) {\n var head = new Headers()\n var pairs = xhr.getAllResponseHeaders().trim().split('\\n')\n pairs.forEach(function(header) {\n var split = header.trim().split(':')\n var key = split.shift().trim()\n var value = split.join(':').trim()\n head.append(key, value)\n })\n return head\n }\n\n Body.call(Request.prototype)\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this._initBody(bodyInit)\n this.type = 'default'\n this.status = options.status\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = options.statusText\n this.headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers)\n this.url = options.url || ''\n }\n\n Body.call(Response.prototype)\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n }\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''})\n response.type = 'error'\n return response\n }\n\n var redirectStatuses = [301, 302, 303, 307, 308]\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n }\n\n self.Headers = Headers;\n self.Request = Request;\n self.Response = Response;\n\n self.fetch = function(input, init) {\n return new Promise(function(resolve, reject) {\n var request\n if (Request.prototype.isPrototypeOf(input) && !init) {\n request = input\n } else {\n request = new Request(input, init)\n }\n\n var xhr = new XMLHttpRequest()\n\n function responseURL() {\n if ('responseURL' in xhr) {\n return xhr.responseURL\n }\n\n // Avoid security warnings on getResponseHeader when not allowed by CORS\n if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {\n return xhr.getResponseHeader('X-Request-URL')\n }\n\n return;\n }\n\n xhr.onload = function() {\n var status = (xhr.status === 1223) ? 204 : xhr.status\n if (status < 100 || status > 599) {\n reject(new TypeError('Network request failed'))\n return\n }\n var options = {\n status: status,\n statusText: xhr.statusText,\n headers: headers(xhr),\n url: responseURL()\n }\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n resolve(new Response(body, options))\n }\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.open(request.method, request.url, true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n }\n self.fetch.polyfill = true\n})();\n\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = global.fetch\n}.call(global));\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/imports-loader?this=>global!./~/exports-loader?global.fetch!./~/whatwg-fetch/fetch.js\n ** module id = 2\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\n(function() {\n\n\"use strict\";\n\nrequire(\"core-js/shim\");\n\nrequire(\"babel-regenerator-runtime\");\n\nif (global._babelPolyfill) {\n throw new Error(\"only one instance of babel-polyfill is allowed\");\n}\nglobal._babelPolyfill = true;\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = global.Promise\n}.call(global));\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/imports-loader?this=>global!./~/exports-loader?global.Promise!./~/babel-polyfill/lib/index.js\n ** module id = 3\n ** module chunks = 0\n **/","require('./modules/es5');\nrequire('./modules/es6.symbol');\nrequire('./modules/es6.object.assign');\nrequire('./modules/es6.object.is');\nrequire('./modules/es6.object.set-prototype-of');\nrequire('./modules/es6.object.to-string');\nrequire('./modules/es6.object.freeze');\nrequire('./modules/es6.object.seal');\nrequire('./modules/es6.object.prevent-extensions');\nrequire('./modules/es6.object.is-frozen');\nrequire('./modules/es6.object.is-sealed');\nrequire('./modules/es6.object.is-extensible');\nrequire('./modules/es6.object.get-own-property-descriptor');\nrequire('./modules/es6.object.get-prototype-of');\nrequire('./modules/es6.object.keys');\nrequire('./modules/es6.object.get-own-property-names');\nrequire('./modules/es6.function.name');\nrequire('./modules/es6.function.has-instance');\nrequire('./modules/es6.number.constructor');\nrequire('./modules/es6.number.epsilon');\nrequire('./modules/es6.number.is-finite');\nrequire('./modules/es6.number.is-integer');\nrequire('./modules/es6.number.is-nan');\nrequire('./modules/es6.number.is-safe-integer');\nrequire('./modules/es6.number.max-safe-integer');\nrequire('./modules/es6.number.min-safe-integer');\nrequire('./modules/es6.number.parse-float');\nrequire('./modules/es6.number.parse-int');\nrequire('./modules/es6.math.acosh');\nrequire('./modules/es6.math.asinh');\nrequire('./modules/es6.math.atanh');\nrequire('./modules/es6.math.cbrt');\nrequire('./modules/es6.math.clz32');\nrequire('./modules/es6.math.cosh');\nrequire('./modules/es6.math.expm1');\nrequire('./modules/es6.math.fround');\nrequire('./modules/es6.math.hypot');\nrequire('./modules/es6.math.imul');\nrequire('./modules/es6.math.log10');\nrequire('./modules/es6.math.log1p');\nrequire('./modules/es6.math.log2');\nrequire('./modules/es6.math.sign');\nrequire('./modules/es6.math.sinh');\nrequire('./modules/es6.math.tanh');\nrequire('./modules/es6.math.trunc');\nrequire('./modules/es6.string.from-code-point');\nrequire('./modules/es6.string.raw');\nrequire('./modules/es6.string.trim');\nrequire('./modules/es6.string.iterator');\nrequire('./modules/es6.string.code-point-at');\nrequire('./modules/es6.string.ends-with');\nrequire('./modules/es6.string.includes');\nrequire('./modules/es6.string.repeat');\nrequire('./modules/es6.string.starts-with');\nrequire('./modules/es6.array.from');\nrequire('./modules/es6.array.of');\nrequire('./modules/es6.array.iterator');\nrequire('./modules/es6.array.species');\nrequire('./modules/es6.array.copy-within');\nrequire('./modules/es6.array.fill');\nrequire('./modules/es6.array.find');\nrequire('./modules/es6.array.find-index');\nrequire('./modules/es6.regexp.constructor');\nrequire('./modules/es6.regexp.flags');\nrequire('./modules/es6.regexp.match');\nrequire('./modules/es6.regexp.replace');\nrequire('./modules/es6.regexp.search');\nrequire('./modules/es6.regexp.split');\nrequire('./modules/es6.promise');\nrequire('./modules/es6.map');\nrequire('./modules/es6.set');\nrequire('./modules/es6.weak-map');\nrequire('./modules/es6.weak-set');\nrequire('./modules/es6.reflect.apply');\nrequire('./modules/es6.reflect.construct');\nrequire('./modules/es6.reflect.define-property');\nrequire('./modules/es6.reflect.delete-property');\nrequire('./modules/es6.reflect.enumerate');\nrequire('./modules/es6.reflect.get');\nrequire('./modules/es6.reflect.get-own-property-descriptor');\nrequire('./modules/es6.reflect.get-prototype-of');\nrequire('./modules/es6.reflect.has');\nrequire('./modules/es6.reflect.is-extensible');\nrequire('./modules/es6.reflect.own-keys');\nrequire('./modules/es6.reflect.prevent-extensions');\nrequire('./modules/es6.reflect.set');\nrequire('./modules/es6.reflect.set-prototype-of');\nrequire('./modules/es7.array.includes');\nrequire('./modules/es7.string.at');\nrequire('./modules/es7.string.pad-left');\nrequire('./modules/es7.string.pad-right');\nrequire('./modules/es7.string.trim-left');\nrequire('./modules/es7.string.trim-right');\nrequire('./modules/es7.regexp.escape');\nrequire('./modules/es7.object.get-own-property-descriptors');\nrequire('./modules/es7.object.values');\nrequire('./modules/es7.object.entries');\nrequire('./modules/es7.map.to-json');\nrequire('./modules/es7.set.to-json');\nrequire('./modules/js.array.statics');\nrequire('./modules/web.timers');\nrequire('./modules/web.immediate');\nrequire('./modules/web.dom.iterable');\nmodule.exports = require('./modules/$.core');\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/shim.js\n ** module id = 4\n ** module chunks = 0\n **/","'use strict';\nvar $ = require('./$')\n , $export = require('./$.export')\n , DESCRIPTORS = require('./$.descriptors')\n , createDesc = require('./$.property-desc')\n , html = require('./$.html')\n , cel = require('./$.dom-create')\n , has = require('./$.has')\n , cof = require('./$.cof')\n , invoke = require('./$.invoke')\n , fails = require('./$.fails')\n , anObject = require('./$.an-object')\n , aFunction = require('./$.a-function')\n , isObject = require('./$.is-object')\n , toObject = require('./$.to-object')\n , toIObject = require('./$.to-iobject')\n , toInteger = require('./$.to-integer')\n , toIndex = require('./$.to-index')\n , toLength = require('./$.to-length')\n , IObject = require('./$.iobject')\n , IE_PROTO = require('./$.uid')('__proto__')\n , createArrayMethod = require('./$.array-methods')\n , arrayIndexOf = require('./$.array-includes')(false)\n , ObjectProto = Object.prototype\n , ArrayProto = Array.prototype\n , arraySlice = ArrayProto.slice\n , arrayJoin = ArrayProto.join\n , defineProperty = $.setDesc\n , getOwnDescriptor = $.getDesc\n , defineProperties = $.setDescs\n , factories = {}\n , IE8_DOM_DEFINE;\n\nif(!DESCRIPTORS){\n IE8_DOM_DEFINE = !fails(function(){\n return defineProperty(cel('div'), 'a', {get: function(){ return 7; }}).a != 7;\n });\n $.setDesc = function(O, P, Attributes){\n if(IE8_DOM_DEFINE)try {\n return defineProperty(O, P, Attributes);\n } catch(e){ /* empty */ }\n if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');\n if('value' in Attributes)anObject(O)[P] = Attributes.value;\n return O;\n };\n $.getDesc = function(O, P){\n if(IE8_DOM_DEFINE)try {\n return getOwnDescriptor(O, P);\n } catch(e){ /* empty */ }\n if(has(O, P))return createDesc(!ObjectProto.propertyIsEnumerable.call(O, P), O[P]);\n };\n $.setDescs = defineProperties = function(O, Properties){\n anObject(O);\n var keys = $.getKeys(Properties)\n , length = keys.length\n , i = 0\n , P;\n while(length > i)$.setDesc(O, P = keys[i++], Properties[P]);\n return O;\n };\n}\n$export($export.S + $export.F * !DESCRIPTORS, 'Object', {\n // 19.1.2.6 / 15.2.3.3 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $.getDesc,\n // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)\n defineProperty: $.setDesc,\n // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)\n defineProperties: defineProperties\n});\n\n // IE 8- don't enum bug keys\nvar keys1 = ('constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,' +\n 'toLocaleString,toString,valueOf').split(',')\n // Additional keys for getOwnPropertyNames\n , keys2 = keys1.concat('length', 'prototype')\n , keysLen1 = keys1.length;\n\n// Create object with `null` prototype: use iframe Object with cleared prototype\nvar createDict = function(){\n // Thrash, waste and sodomy: IE GC bug\n var iframe = cel('iframe')\n , i = keysLen1\n , gt = '>'\n , iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(' i)if(has(O, key = names[i++])){\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n };\n};\nvar Empty = function(){};\n$export($export.S, 'Object', {\n // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\n getPrototypeOf: $.getProto = $.getProto || function(O){\n O = toObject(O);\n if(has(O, IE_PROTO))return O[IE_PROTO];\n if(typeof O.constructor == 'function' && O instanceof O.constructor){\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n },\n // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $.getNames = $.getNames || createGetKeys(keys2, keys2.length, true),\n // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\n create: $.create = $.create || function(O, /*?*/Properties){\n var result;\n if(O !== null){\n Empty.prototype = anObject(O);\n result = new Empty();\n Empty.prototype = null;\n // add \"__proto__\" for Object.getPrototypeOf shim\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : defineProperties(result, Properties);\n },\n // 19.1.2.14 / 15.2.3.14 Object.keys(O)\n keys: $.getKeys = $.getKeys || createGetKeys(keys1, keysLen1, false)\n});\n\nvar construct = function(F, len, args){\n if(!(len in factories)){\n for(var n = [], i = 0; i < len; i++)n[i] = 'a[' + i + ']';\n factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');\n }\n return factories[len](F, args);\n};\n\n// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)\n$export($export.P, 'Function', {\n bind: function bind(that /*, args... */){\n var fn = aFunction(this)\n , partArgs = arraySlice.call(arguments, 1);\n var bound = function(/* args... */){\n var args = partArgs.concat(arraySlice.call(arguments));\n return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);\n };\n if(isObject(fn.prototype))bound.prototype = fn.prototype;\n return bound;\n }\n});\n\n// fallback for not array-like ES3 strings and DOM objects\n$export($export.P + $export.F * fails(function(){\n if(html)arraySlice.call(html);\n}), 'Array', {\n slice: function(begin, end){\n var len = toLength(this.length)\n , klass = cof(this);\n end = end === undefined ? len : end;\n if(klass == 'Array')return arraySlice.call(this, begin, end);\n var start = toIndex(begin, len)\n , upTo = toIndex(end, len)\n , size = toLength(upTo - start)\n , cloned = Array(size)\n , i = 0;\n for(; i < size; i++)cloned[i] = klass == 'String'\n ? this.charAt(start + i)\n : this[start + i];\n return cloned;\n }\n});\n$export($export.P + $export.F * (IObject != Object), 'Array', {\n join: function join(separator){\n return arrayJoin.call(IObject(this), separator === undefined ? ',' : separator);\n }\n});\n\n// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)\n$export($export.S, 'Array', {isArray: require('./$.is-array')});\n\nvar createArrayReduce = function(isRight){\n return function(callbackfn, memo){\n aFunction(callbackfn);\n var O = IObject(this)\n , length = toLength(O.length)\n , index = isRight ? length - 1 : 0\n , i = isRight ? -1 : 1;\n if(arguments.length < 2)for(;;){\n if(index in O){\n memo = O[index];\n index += i;\n break;\n }\n index += i;\n if(isRight ? index < 0 : length <= index){\n throw TypeError('Reduce of empty array with no initial value');\n }\n }\n for(;isRight ? index >= 0 : length > index; index += i)if(index in O){\n memo = callbackfn(memo, O[index], index, this);\n }\n return memo;\n };\n};\n\nvar methodize = function($fn){\n return function(arg1/*, arg2 = undefined */){\n return $fn(this, arg1, arguments[1]);\n };\n};\n\n$export($export.P, 'Array', {\n // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])\n forEach: $.each = $.each || methodize(createArrayMethod(0)),\n // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])\n map: methodize(createArrayMethod(1)),\n // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])\n filter: methodize(createArrayMethod(2)),\n // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])\n some: methodize(createArrayMethod(3)),\n // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])\n every: methodize(createArrayMethod(4)),\n // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])\n reduce: createArrayReduce(false),\n // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])\n reduceRight: createArrayReduce(true),\n // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])\n indexOf: methodize(arrayIndexOf),\n // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])\n lastIndexOf: function(el, fromIndex /* = @[*-1] */){\n var O = toIObject(this)\n , length = toLength(O.length)\n , index = length - 1;\n if(arguments.length > 1)index = Math.min(index, toInteger(fromIndex));\n if(index < 0)index = toLength(length + index);\n for(;index >= 0; index--)if(index in O)if(O[index] === el)return index;\n return -1;\n }\n});\n\n// 20.3.3.1 / 15.9.4.4 Date.now()\n$export($export.S, 'Date', {now: function(){ return +new Date; }});\n\nvar lz = function(num){\n return num > 9 ? num : '0' + num;\n};\n\n// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()\n// PhantomJS / old WebKit has a broken implementations\n$export($export.P + $export.F * (fails(function(){\n return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z';\n}) || !fails(function(){\n new Date(NaN).toISOString();\n})), 'Date', {\n toISOString: function toISOString(){\n if(!isFinite(this))throw RangeError('Invalid time value');\n var d = this\n , y = d.getUTCFullYear()\n , m = d.getUTCMilliseconds()\n , s = y < 0 ? '-' : y > 9999 ? '+' : '';\n return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +\n '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +\n 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +\n ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es5.js\n ** module id = 5\n ** module chunks = 0\n **/","var $Object = Object;\nmodule.exports = {\n create: $Object.create,\n getProto: $Object.getPrototypeOf,\n isEnum: {}.propertyIsEnumerable,\n getDesc: $Object.getOwnPropertyDescriptor,\n setDesc: $Object.defineProperty,\n setDescs: $Object.defineProperties,\n getKeys: $Object.keys,\n getNames: $Object.getOwnPropertyNames,\n getSymbols: $Object.getOwnPropertySymbols,\n each: [].forEach\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.js\n ** module id = 6\n ** module chunks = 0\n **/","var global = require('./$.global')\n , core = require('./$.core')\n , hide = require('./$.hide')\n , redefine = require('./$.redefine')\n , ctx = require('./$.ctx')\n , PROTOTYPE = 'prototype';\n\nvar $export = function(type, name, source){\n var IS_FORCED = type & $export.F\n , IS_GLOBAL = type & $export.G\n , IS_STATIC = type & $export.S\n , IS_PROTO = type & $export.P\n , IS_BIND = type & $export.B\n , target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]\n , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})\n , expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {})\n , key, own, out, exp;\n if(IS_GLOBAL)source = name;\n for(key in source){\n // contains in native\n own = !IS_FORCED && target && key in target;\n // export native or passed\n out = (own ? target : source)[key];\n // bind timers to global for call from export context\n exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // extend global\n if(target && !own)redefine(target, key, out);\n // export\n if(exports[key] != out)hide(exports, key, exp);\n if(IS_PROTO && expProto[key] != out)expProto[key] = out;\n }\n};\nglobal.core = core;\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\nmodule.exports = $export;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.export.js\n ** module id = 7\n ** module chunks = 0\n **/","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();\nif(typeof __g == 'number')__g = global; // eslint-disable-line no-undef\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.global.js\n ** module id = 8\n ** module chunks = 0\n **/","var core = module.exports = {version: '1.2.6'};\nif(typeof __e == 'number')__e = core; // eslint-disable-line no-undef\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.core.js\n ** module id = 9\n ** module chunks = 0\n **/","var $ = require('./$')\n , createDesc = require('./$.property-desc');\nmodule.exports = require('./$.descriptors') ? function(object, key, value){\n return $.setDesc(object, key, createDesc(1, value));\n} : function(object, key, value){\n object[key] = value;\n return object;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.hide.js\n ** module id = 10\n ** module chunks = 0\n **/","module.exports = function(bitmap, value){\n return {\n enumerable : !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable : !(bitmap & 4),\n value : value\n };\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.property-desc.js\n ** module id = 11\n ** module chunks = 0\n **/","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./$.fails')(function(){\n return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.descriptors.js\n ** module id = 12\n ** module chunks = 0\n **/","module.exports = function(exec){\n try {\n return !!exec();\n } catch(e){\n return true;\n }\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.fails.js\n ** module id = 13\n ** module chunks = 0\n **/","// add fake Function#toString\n// for correct work wrapped methods / constructors with methods like LoDash isNative\nvar global = require('./$.global')\n , hide = require('./$.hide')\n , SRC = require('./$.uid')('src')\n , TO_STRING = 'toString'\n , $toString = Function[TO_STRING]\n , TPL = ('' + $toString).split(TO_STRING);\n\nrequire('./$.core').inspectSource = function(it){\n return $toString.call(it);\n};\n\n(module.exports = function(O, key, val, safe){\n if(typeof val == 'function'){\n val.hasOwnProperty(SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n val.hasOwnProperty('name') || hide(val, 'name', key);\n }\n if(O === global){\n O[key] = val;\n } else {\n if(!safe)delete O[key];\n hide(O, key, val);\n }\n})(Function.prototype, TO_STRING, function toString(){\n return typeof this == 'function' && this[SRC] || $toString.call(this);\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.redefine.js\n ** module id = 14\n ** module chunks = 0\n **/","var id = 0\n , px = Math.random();\nmodule.exports = function(key){\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.uid.js\n ** module id = 15\n ** module chunks = 0\n **/","// optional / simple context binding\nvar aFunction = require('./$.a-function');\nmodule.exports = function(fn, that, length){\n aFunction(fn);\n if(that === undefined)return fn;\n switch(length){\n case 1: return function(a){\n return fn.call(that, a);\n };\n case 2: return function(a, b){\n return fn.call(that, a, b);\n };\n case 3: return function(a, b, c){\n return fn.call(that, a, b, c);\n };\n }\n return function(/* ...args */){\n return fn.apply(that, arguments);\n };\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.ctx.js\n ** module id = 16\n ** module chunks = 0\n **/","module.exports = function(it){\n if(typeof it != 'function')throw TypeError(it + ' is not a function!');\n return it;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.a-function.js\n ** module id = 17\n ** module chunks = 0\n **/","module.exports = require('./$.global').document && document.documentElement;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.html.js\n ** module id = 18\n ** module chunks = 0\n **/","var isObject = require('./$.is-object')\n , document = require('./$.global').document\n // in old IE typeof document.createElement is 'object'\n , is = isObject(document) && isObject(document.createElement);\nmodule.exports = function(it){\n return is ? document.createElement(it) : {};\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.dom-create.js\n ** module id = 19\n ** module chunks = 0\n **/","module.exports = function(it){\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.is-object.js\n ** module id = 20\n ** module chunks = 0\n **/","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function(it, key){\n return hasOwnProperty.call(it, key);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.has.js\n ** module id = 21\n ** module chunks = 0\n **/","var toString = {}.toString;\n\nmodule.exports = function(it){\n return toString.call(it).slice(8, -1);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.cof.js\n ** module id = 22\n ** module chunks = 0\n **/","// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function(fn, args, that){\n var un = that === undefined;\n switch(args.length){\n case 0: return un ? fn()\n : fn.call(that);\n case 1: return un ? fn(args[0])\n : fn.call(that, args[0]);\n case 2: return un ? fn(args[0], args[1])\n : fn.call(that, args[0], args[1]);\n case 3: return un ? fn(args[0], args[1], args[2])\n : fn.call(that, args[0], args[1], args[2]);\n case 4: return un ? fn(args[0], args[1], args[2], args[3])\n : fn.call(that, args[0], args[1], args[2], args[3]);\n } return fn.apply(that, args);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.invoke.js\n ** module id = 23\n ** module chunks = 0\n **/","var isObject = require('./$.is-object');\nmodule.exports = function(it){\n if(!isObject(it))throw TypeError(it + ' is not an object!');\n return it;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.an-object.js\n ** module id = 24\n ** module chunks = 0\n **/","// 7.1.13 ToObject(argument)\nvar defined = require('./$.defined');\nmodule.exports = function(it){\n return Object(defined(it));\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.to-object.js\n ** module id = 25\n ** module chunks = 0\n **/","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function(it){\n if(it == undefined)throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.defined.js\n ** module id = 26\n ** module chunks = 0\n **/","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./$.iobject')\n , defined = require('./$.defined');\nmodule.exports = function(it){\n return IObject(defined(it));\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.to-iobject.js\n ** module id = 27\n ** module chunks = 0\n **/","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./$.cof');\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.iobject.js\n ** module id = 28\n ** module chunks = 0\n **/","// 7.1.4 ToInteger\nvar ceil = Math.ceil\n , floor = Math.floor;\nmodule.exports = function(it){\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.to-integer.js\n ** module id = 29\n ** module chunks = 0\n **/","var toInteger = require('./$.to-integer')\n , max = Math.max\n , min = Math.min;\nmodule.exports = function(index, length){\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.to-index.js\n ** module id = 30\n ** module chunks = 0\n **/","// 7.1.15 ToLength\nvar toInteger = require('./$.to-integer')\n , min = Math.min;\nmodule.exports = function(it){\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.to-length.js\n ** module id = 31\n ** module chunks = 0\n **/","// 0 -> Array#forEach\n// 1 -> Array#map\n// 2 -> Array#filter\n// 3 -> Array#some\n// 4 -> Array#every\n// 5 -> Array#find\n// 6 -> Array#findIndex\nvar ctx = require('./$.ctx')\n , IObject = require('./$.iobject')\n , toObject = require('./$.to-object')\n , toLength = require('./$.to-length')\n , asc = require('./$.array-species-create');\nmodule.exports = function(TYPE){\n var IS_MAP = TYPE == 1\n , IS_FILTER = TYPE == 2\n , IS_SOME = TYPE == 3\n , IS_EVERY = TYPE == 4\n , IS_FIND_INDEX = TYPE == 6\n , NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n return function($this, callbackfn, that){\n var O = toObject($this)\n , self = IObject(O)\n , f = ctx(callbackfn, that, 3)\n , length = toLength(self.length)\n , index = 0\n , result = IS_MAP ? asc($this, length) : IS_FILTER ? asc($this, 0) : undefined\n , val, res;\n for(;length > index; index++)if(NO_HOLES || index in self){\n val = self[index];\n res = f(val, index, O);\n if(TYPE){\n if(IS_MAP)result[index] = res; // map\n else if(res)switch(TYPE){\n case 3: return true; // some\n case 5: return val; // find\n case 6: return index; // findIndex\n case 2: result.push(val); // filter\n } else if(IS_EVERY)return false; // every\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;\n };\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.array-methods.js\n ** module id = 32\n ** module chunks = 0\n **/","// 9.4.2.3 ArraySpeciesCreate(originalArray, length)\nvar isObject = require('./$.is-object')\n , isArray = require('./$.is-array')\n , SPECIES = require('./$.wks')('species');\nmodule.exports = function(original, length){\n var C;\n if(isArray(original)){\n C = original.constructor;\n // cross-realm fallback\n if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined;\n if(isObject(C)){\n C = C[SPECIES];\n if(C === null)C = undefined;\n }\n } return new (C === undefined ? Array : C)(length);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.array-species-create.js\n ** module id = 33\n ** module chunks = 0\n **/","// 7.2.2 IsArray(argument)\nvar cof = require('./$.cof');\nmodule.exports = Array.isArray || function(arg){\n return cof(arg) == 'Array';\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.is-array.js\n ** module id = 34\n ** module chunks = 0\n **/","var store = require('./$.shared')('wks')\n , uid = require('./$.uid')\n , Symbol = require('./$.global').Symbol;\nmodule.exports = function(name){\n return store[name] || (store[name] =\n Symbol && Symbol[name] || (Symbol || uid)('Symbol.' + name));\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.wks.js\n ** module id = 35\n ** module chunks = 0\n **/","var global = require('./$.global')\n , SHARED = '__core-js_shared__'\n , store = global[SHARED] || (global[SHARED] = {});\nmodule.exports = function(key){\n return store[key] || (store[key] = {});\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.shared.js\n ** module id = 36\n ** module chunks = 0\n **/","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./$.to-iobject')\n , toLength = require('./$.to-length')\n , toIndex = require('./$.to-index');\nmodule.exports = function(IS_INCLUDES){\n return function($this, el, fromIndex){\n var O = toIObject($this)\n , length = toLength(O.length)\n , index = toIndex(fromIndex, length)\n , value;\n // Array#includes uses SameValueZero equality algorithm\n if(IS_INCLUDES && el != el)while(length > index){\n value = O[index++];\n if(value != value)return true;\n // Array#toIndex ignores holes, Array#includes - not\n } else for(;length > index; index++)if(IS_INCLUDES || index in O){\n if(O[index] === el)return IS_INCLUDES || index;\n } return !IS_INCLUDES && -1;\n };\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.array-includes.js\n ** module id = 37\n ** module chunks = 0\n **/","'use strict';\n// ECMAScript 6 symbols shim\nvar $ = require('./$')\n , global = require('./$.global')\n , has = require('./$.has')\n , DESCRIPTORS = require('./$.descriptors')\n , $export = require('./$.export')\n , redefine = require('./$.redefine')\n , $fails = require('./$.fails')\n , shared = require('./$.shared')\n , setToStringTag = require('./$.set-to-string-tag')\n , uid = require('./$.uid')\n , wks = require('./$.wks')\n , keyOf = require('./$.keyof')\n , $names = require('./$.get-names')\n , enumKeys = require('./$.enum-keys')\n , isArray = require('./$.is-array')\n , anObject = require('./$.an-object')\n , toIObject = require('./$.to-iobject')\n , createDesc = require('./$.property-desc')\n , getDesc = $.getDesc\n , setDesc = $.setDesc\n , _create = $.create\n , getNames = $names.get\n , $Symbol = global.Symbol\n , $JSON = global.JSON\n , _stringify = $JSON && $JSON.stringify\n , setter = false\n , HIDDEN = wks('_hidden')\n , isEnum = $.isEnum\n , SymbolRegistry = shared('symbol-registry')\n , AllSymbols = shared('symbols')\n , useNative = typeof $Symbol == 'function'\n , ObjectProto = Object.prototype;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function(){\n return _create(setDesc({}, 'a', {\n get: function(){ return setDesc(this, 'a', {value: 7}).a; }\n })).a != 7;\n}) ? function(it, key, D){\n var protoDesc = getDesc(ObjectProto, key);\n if(protoDesc)delete ObjectProto[key];\n setDesc(it, key, D);\n if(protoDesc && it !== ObjectProto)setDesc(ObjectProto, key, protoDesc);\n} : setDesc;\n\nvar wrap = function(tag){\n var sym = AllSymbols[tag] = _create($Symbol.prototype);\n sym._k = tag;\n DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, {\n configurable: true,\n set: function(value){\n if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n }\n });\n return sym;\n};\n\nvar isSymbol = function(it){\n return typeof it == 'symbol';\n};\n\nvar $defineProperty = function defineProperty(it, key, D){\n if(D && has(AllSymbols, key)){\n if(!D.enumerable){\n if(!has(it, HIDDEN))setDesc(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;\n D = _create(D, {enumerable: createDesc(0, false)});\n } return setSymbolDesc(it, key, D);\n } return setDesc(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P){\n anObject(it);\n var keys = enumKeys(P = toIObject(P))\n , i = 0\n , l = keys.length\n , key;\n while(l > i)$defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P){\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key){\n var E = isEnum.call(this, key);\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key]\n ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){\n var D = getDesc(it = toIObject(it), key);\n if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it){\n var names = getNames(toIObject(it))\n , result = []\n , i = 0\n , key;\n while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN)result.push(key);\n return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it){\n var names = getNames(toIObject(it))\n , result = []\n , i = 0\n , key;\n while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]);\n return result;\n};\nvar $stringify = function stringify(it){\n if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined\n var args = [it]\n , i = 1\n , $$ = arguments\n , replacer, $replacer;\n while($$.length > i)args.push($$[i++]);\n replacer = args[1];\n if(typeof replacer == 'function')$replacer = replacer;\n if($replacer || !isArray(replacer))replacer = function(key, value){\n if($replacer)value = $replacer.call(this, key, value);\n if(!isSymbol(value))return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n};\nvar buggyJSON = $fails(function(){\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';\n});\n\n// 19.4.1.1 Symbol([description])\nif(!useNative){\n $Symbol = function Symbol(){\n if(isSymbol(this))throw TypeError('Symbol is not a constructor');\n return wrap(uid(arguments.length > 0 ? arguments[0] : undefined));\n };\n redefine($Symbol.prototype, 'toString', function toString(){\n return this._k;\n });\n\n isSymbol = function(it){\n return it instanceof $Symbol;\n };\n\n $.create = $create;\n $.isEnum = $propertyIsEnumerable;\n $.getDesc = $getOwnPropertyDescriptor;\n $.setDesc = $defineProperty;\n $.setDescs = $defineProperties;\n $.getNames = $names.get = $getOwnPropertyNames;\n $.getSymbols = $getOwnPropertySymbols;\n\n if(DESCRIPTORS && !require('./$.library')){\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n}\n\nvar symbolStatics = {\n // 19.4.2.1 Symbol.for(key)\n 'for': function(key){\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(key){\n return keyOf(SymbolRegistry, key);\n },\n useSetter: function(){ setter = true; },\n useSimple: function(){ setter = false; }\n};\n// 19.4.2.2 Symbol.hasInstance\n// 19.4.2.3 Symbol.isConcatSpreadable\n// 19.4.2.4 Symbol.iterator\n// 19.4.2.6 Symbol.match\n// 19.4.2.8 Symbol.replace\n// 19.4.2.9 Symbol.search\n// 19.4.2.10 Symbol.species\n// 19.4.2.11 Symbol.split\n// 19.4.2.12 Symbol.toPrimitive\n// 19.4.2.13 Symbol.toStringTag\n// 19.4.2.14 Symbol.unscopables\n$.each.call((\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,' +\n 'species,split,toPrimitive,toStringTag,unscopables'\n).split(','), function(it){\n var sym = wks(it);\n symbolStatics[it] = useNative ? sym : wrap(sym);\n});\n\nsetter = true;\n\n$export($export.G + $export.W, {Symbol: $Symbol});\n\n$export($export.S, 'Symbol', symbolStatics);\n\n$export($export.S + $export.F * !useNative, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!useNative || buggyJSON), 'JSON', {stringify: $stringify});\n\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.symbol.js\n ** module id = 38\n ** module chunks = 0\n **/","var def = require('./$').setDesc\n , has = require('./$.has')\n , TAG = require('./$.wks')('toStringTag');\n\nmodule.exports = function(it, tag, stat){\n if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.set-to-string-tag.js\n ** module id = 39\n ** module chunks = 0\n **/","var $ = require('./$')\n , toIObject = require('./$.to-iobject');\nmodule.exports = function(object, el){\n var O = toIObject(object)\n , keys = $.getKeys(O)\n , length = keys.length\n , index = 0\n , key;\n while(length > index)if(O[key = keys[index++]] === el)return key;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.keyof.js\n ** module id = 40\n ** module chunks = 0\n **/","// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = require('./$.to-iobject')\n , getNames = require('./$').getNames\n , toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function(it){\n try {\n return getNames(it);\n } catch(e){\n return windowNames.slice();\n }\n};\n\nmodule.exports.get = function getOwnPropertyNames(it){\n if(windowNames && toString.call(it) == '[object Window]')return getWindowNames(it);\n return getNames(toIObject(it));\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.get-names.js\n ** module id = 41\n ** module chunks = 0\n **/","// all enumerable object keys, includes symbols\nvar $ = require('./$');\nmodule.exports = function(it){\n var keys = $.getKeys(it)\n , getSymbols = $.getSymbols;\n if(getSymbols){\n var symbols = getSymbols(it)\n , isEnum = $.isEnum\n , i = 0\n , key;\n while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))keys.push(key);\n }\n return keys;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.enum-keys.js\n ** module id = 42\n ** module chunks = 0\n **/","module.exports = false;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.library.js\n ** module id = 43\n ** module chunks = 0\n **/","// 19.1.3.1 Object.assign(target, source)\nvar $export = require('./$.export');\n\n$export($export.S + $export.F, 'Object', {assign: require('./$.object-assign')});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.object.assign.js\n ** module id = 44\n ** module chunks = 0\n **/","// 19.1.2.1 Object.assign(target, source, ...)\nvar $ = require('./$')\n , toObject = require('./$.to-object')\n , IObject = require('./$.iobject');\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = require('./$.fails')(function(){\n var a = Object.assign\n , A = {}\n , B = {}\n , S = Symbol()\n , K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function(k){ B[k] = k; });\n return a({}, A)[S] != 7 || Object.keys(a({}, B)).join('') != K;\n}) ? function assign(target, source){ // eslint-disable-line no-unused-vars\n var T = toObject(target)\n , $$ = arguments\n , $$len = $$.length\n , index = 1\n , getKeys = $.getKeys\n , getSymbols = $.getSymbols\n , isEnum = $.isEnum;\n while($$len > index){\n var S = IObject($$[index++])\n , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)\n , length = keys.length\n , j = 0\n , key;\n while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];\n }\n return T;\n} : Object.assign;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.object-assign.js\n ** module id = 45\n ** module chunks = 0\n **/","// 19.1.3.10 Object.is(value1, value2)\nvar $export = require('./$.export');\n$export($export.S, 'Object', {is: require('./$.same-value')});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.object.is.js\n ** module id = 46\n ** module chunks = 0\n **/","// 7.2.9 SameValue(x, y)\nmodule.exports = Object.is || function is(x, y){\n return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.same-value.js\n ** module id = 47\n ** module chunks = 0\n **/","// 19.1.3.19 Object.setPrototypeOf(O, proto)\nvar $export = require('./$.export');\n$export($export.S, 'Object', {setPrototypeOf: require('./$.set-proto').set});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.object.set-prototype-of.js\n ** module id = 48\n ** module chunks = 0\n **/","// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar getDesc = require('./$').getDesc\n , isObject = require('./$.is-object')\n , anObject = require('./$.an-object');\nvar check = function(O, proto){\n anObject(O);\n if(!isObject(proto) && proto !== null)throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function(test, buggy, set){\n try {\n set = require('./$.ctx')(Function.call, getDesc(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch(e){ buggy = true; }\n return function setPrototypeOf(O, proto){\n check(O, proto);\n if(buggy)O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.set-proto.js\n ** module id = 49\n ** module chunks = 0\n **/","'use strict';\n// 19.1.3.6 Object.prototype.toString()\nvar classof = require('./$.classof')\n , test = {};\ntest[require('./$.wks')('toStringTag')] = 'z';\nif(test + '' != '[object z]'){\n require('./$.redefine')(Object.prototype, 'toString', function toString(){\n return '[object ' + classof(this) + ']';\n }, true);\n}\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.object.to-string.js\n ** module id = 50\n ** module chunks = 0\n **/","// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = require('./$.cof')\n , TAG = require('./$.wks')('toStringTag')\n // ES3 wrong here\n , ARG = cof(function(){ return arguments; }()) == 'Arguments';\n\nmodule.exports = function(it){\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = (O = Object(it))[TAG]) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.classof.js\n ** module id = 51\n ** module chunks = 0\n **/","// 19.1.2.5 Object.freeze(O)\nvar isObject = require('./$.is-object');\n\nrequire('./$.object-sap')('freeze', function($freeze){\n return function freeze(it){\n return $freeze && isObject(it) ? $freeze(it) : it;\n };\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.object.freeze.js\n ** module id = 52\n ** module chunks = 0\n **/","// most Object methods by ES6 should accept primitives\nvar $export = require('./$.export')\n , core = require('./$.core')\n , fails = require('./$.fails');\nmodule.exports = function(KEY, exec){\n var fn = (core.Object || {})[KEY] || Object[KEY]\n , exp = {};\n exp[KEY] = exec(fn);\n $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.object-sap.js\n ** module id = 53\n ** module chunks = 0\n **/","// 19.1.2.17 Object.seal(O)\nvar isObject = require('./$.is-object');\n\nrequire('./$.object-sap')('seal', function($seal){\n return function seal(it){\n return $seal && isObject(it) ? $seal(it) : it;\n };\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.object.seal.js\n ** module id = 54\n ** module chunks = 0\n **/","// 19.1.2.15 Object.preventExtensions(O)\nvar isObject = require('./$.is-object');\n\nrequire('./$.object-sap')('preventExtensions', function($preventExtensions){\n return function preventExtensions(it){\n return $preventExtensions && isObject(it) ? $preventExtensions(it) : it;\n };\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.object.prevent-extensions.js\n ** module id = 55\n ** module chunks = 0\n **/","// 19.1.2.12 Object.isFrozen(O)\nvar isObject = require('./$.is-object');\n\nrequire('./$.object-sap')('isFrozen', function($isFrozen){\n return function isFrozen(it){\n return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;\n };\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.object.is-frozen.js\n ** module id = 56\n ** module chunks = 0\n **/","// 19.1.2.13 Object.isSealed(O)\nvar isObject = require('./$.is-object');\n\nrequire('./$.object-sap')('isSealed', function($isSealed){\n return function isSealed(it){\n return isObject(it) ? $isSealed ? $isSealed(it) : false : true;\n };\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.object.is-sealed.js\n ** module id = 57\n ** module chunks = 0\n **/","// 19.1.2.11 Object.isExtensible(O)\nvar isObject = require('./$.is-object');\n\nrequire('./$.object-sap')('isExtensible', function($isExtensible){\n return function isExtensible(it){\n return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;\n };\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.object.is-extensible.js\n ** module id = 58\n ** module chunks = 0\n **/","// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\nvar toIObject = require('./$.to-iobject');\n\nrequire('./$.object-sap')('getOwnPropertyDescriptor', function($getOwnPropertyDescriptor){\n return function getOwnPropertyDescriptor(it, key){\n return $getOwnPropertyDescriptor(toIObject(it), key);\n };\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.object.get-own-property-descriptor.js\n ** module id = 59\n ** module chunks = 0\n **/","// 19.1.2.9 Object.getPrototypeOf(O)\nvar toObject = require('./$.to-object');\n\nrequire('./$.object-sap')('getPrototypeOf', function($getPrototypeOf){\n return function getPrototypeOf(it){\n return $getPrototypeOf(toObject(it));\n };\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.object.get-prototype-of.js\n ** module id = 60\n ** module chunks = 0\n **/","// 19.1.2.14 Object.keys(O)\nvar toObject = require('./$.to-object');\n\nrequire('./$.object-sap')('keys', function($keys){\n return function keys(it){\n return $keys(toObject(it));\n };\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.object.keys.js\n ** module id = 61\n ** module chunks = 0\n **/","// 19.1.2.7 Object.getOwnPropertyNames(O)\nrequire('./$.object-sap')('getOwnPropertyNames', function(){\n return require('./$.get-names').get;\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.object.get-own-property-names.js\n ** module id = 62\n ** module chunks = 0\n **/","var setDesc = require('./$').setDesc\n , createDesc = require('./$.property-desc')\n , has = require('./$.has')\n , FProto = Function.prototype\n , nameRE = /^\\s*function ([^ (]*)/\n , NAME = 'name';\n// 19.2.4.2 name\nNAME in FProto || require('./$.descriptors') && setDesc(FProto, NAME, {\n configurable: true,\n get: function(){\n var match = ('' + this).match(nameRE)\n , name = match ? match[1] : '';\n has(this, NAME) || setDesc(this, NAME, createDesc(5, name));\n return name;\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.function.name.js\n ** module id = 63\n ** module chunks = 0\n **/","'use strict';\nvar $ = require('./$')\n , isObject = require('./$.is-object')\n , HAS_INSTANCE = require('./$.wks')('hasInstance')\n , FunctionProto = Function.prototype;\n// 19.2.3.6 Function.prototype[@@hasInstance](V)\nif(!(HAS_INSTANCE in FunctionProto))$.setDesc(FunctionProto, HAS_INSTANCE, {value: function(O){\n if(typeof this != 'function' || !isObject(O))return false;\n if(!isObject(this.prototype))return O instanceof this;\n // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:\n while(O = $.getProto(O))if(this.prototype === O)return true;\n return false;\n}});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.function.has-instance.js\n ** module id = 64\n ** module chunks = 0\n **/","'use strict';\nvar $ = require('./$')\n , global = require('./$.global')\n , has = require('./$.has')\n , cof = require('./$.cof')\n , toPrimitive = require('./$.to-primitive')\n , fails = require('./$.fails')\n , $trim = require('./$.string-trim').trim\n , NUMBER = 'Number'\n , $Number = global[NUMBER]\n , Base = $Number\n , proto = $Number.prototype\n // Opera ~12 has broken Object#toString\n , BROKEN_COF = cof($.create(proto)) == NUMBER\n , TRIM = 'trim' in String.prototype;\n\n// 7.1.3 ToNumber(argument)\nvar toNumber = function(argument){\n var it = toPrimitive(argument, false);\n if(typeof it == 'string' && it.length > 2){\n it = TRIM ? it.trim() : $trim(it, 3);\n var first = it.charCodeAt(0)\n , third, radix, maxCode;\n if(first === 43 || first === 45){\n third = it.charCodeAt(2);\n if(third === 88 || third === 120)return NaN; // Number('+0x1') should be NaN, old V8 fix\n } else if(first === 48){\n switch(it.charCodeAt(1)){\n case 66 : case 98 : radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i\n case 79 : case 111 : radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i\n default : return +it;\n }\n for(var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++){\n code = digits.charCodeAt(i);\n // parseInt parses a string to a first unavailable symbol\n // but ToNumber should return NaN if a string contains unavailable symbols\n if(code < 48 || code > maxCode)return NaN;\n } return parseInt(digits, radix);\n }\n } return +it;\n};\n\nif(!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')){\n $Number = function Number(value){\n var it = arguments.length < 1 ? 0 : value\n , that = this;\n return that instanceof $Number\n // check on 1..constructor(foo) case\n && (BROKEN_COF ? fails(function(){ proto.valueOf.call(that); }) : cof(that) != NUMBER)\n ? new Base(toNumber(it)) : toNumber(it);\n };\n $.each.call(require('./$.descriptors') ? $.getNames(Base) : (\n // ES3:\n 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +\n // ES6 (in case, if modules with ES6 Number statics required before):\n 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +\n 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'\n ).split(','), function(key){\n if(has(Base, key) && !has($Number, key)){\n $.setDesc($Number, key, $.getDesc(Base, key));\n }\n });\n $Number.prototype = proto;\n proto.constructor = $Number;\n require('./$.redefine')(global, NUMBER, $Number);\n}\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.number.constructor.js\n ** module id = 65\n ** module chunks = 0\n **/","// 7.1.1 ToPrimitive(input [, PreferredType])\r\nvar isObject = require('./$.is-object');\r\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\r\n// and the second argument - flag - preferred type is a string\r\nmodule.exports = function(it, S){\r\n if(!isObject(it))return it;\r\n var fn, val;\r\n if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;\r\n if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;\r\n if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;\r\n throw TypeError(\"Can't convert object to primitive value\");\r\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.to-primitive.js\n ** module id = 66\n ** module chunks = 0\n **/","var $export = require('./$.export')\n , defined = require('./$.defined')\n , fails = require('./$.fails')\n , spaces = '\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003' +\n '\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF'\n , space = '[' + spaces + ']'\n , non = '\\u200b\\u0085'\n , ltrim = RegExp('^' + space + space + '*')\n , rtrim = RegExp(space + space + '*$');\n\nvar exporter = function(KEY, exec){\n var exp = {};\n exp[KEY] = exec(trim);\n $export($export.P + $export.F * fails(function(){\n return !!spaces[KEY]() || non[KEY]() != non;\n }), 'String', exp);\n};\n\n// 1 -> String#trimLeft\n// 2 -> String#trimRight\n// 3 -> String#trim\nvar trim = exporter.trim = function(string, TYPE){\n string = String(defined(string));\n if(TYPE & 1)string = string.replace(ltrim, '');\n if(TYPE & 2)string = string.replace(rtrim, '');\n return string;\n};\n\nmodule.exports = exporter;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.string-trim.js\n ** module id = 67\n ** module chunks = 0\n **/","// 20.1.2.1 Number.EPSILON\nvar $export = require('./$.export');\n\n$export($export.S, 'Number', {EPSILON: Math.pow(2, -52)});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.number.epsilon.js\n ** module id = 68\n ** module chunks = 0\n **/","// 20.1.2.2 Number.isFinite(number)\nvar $export = require('./$.export')\n , _isFinite = require('./$.global').isFinite;\n\n$export($export.S, 'Number', {\n isFinite: function isFinite(it){\n return typeof it == 'number' && _isFinite(it);\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.number.is-finite.js\n ** module id = 69\n ** module chunks = 0\n **/","// 20.1.2.3 Number.isInteger(number)\nvar $export = require('./$.export');\n\n$export($export.S, 'Number', {isInteger: require('./$.is-integer')});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.number.is-integer.js\n ** module id = 70\n ** module chunks = 0\n **/","// 20.1.2.3 Number.isInteger(number)\nvar isObject = require('./$.is-object')\n , floor = Math.floor;\nmodule.exports = function isInteger(it){\n return !isObject(it) && isFinite(it) && floor(it) === it;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.is-integer.js\n ** module id = 71\n ** module chunks = 0\n **/","// 20.1.2.4 Number.isNaN(number)\nvar $export = require('./$.export');\n\n$export($export.S, 'Number', {\n isNaN: function isNaN(number){\n return number != number;\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.number.is-nan.js\n ** module id = 72\n ** module chunks = 0\n **/","// 20.1.2.5 Number.isSafeInteger(number)\nvar $export = require('./$.export')\n , isInteger = require('./$.is-integer')\n , abs = Math.abs;\n\n$export($export.S, 'Number', {\n isSafeInteger: function isSafeInteger(number){\n return isInteger(number) && abs(number) <= 0x1fffffffffffff;\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.number.is-safe-integer.js\n ** module id = 73\n ** module chunks = 0\n **/","// 20.1.2.6 Number.MAX_SAFE_INTEGER\nvar $export = require('./$.export');\n\n$export($export.S, 'Number', {MAX_SAFE_INTEGER: 0x1fffffffffffff});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.number.max-safe-integer.js\n ** module id = 74\n ** module chunks = 0\n **/","// 20.1.2.10 Number.MIN_SAFE_INTEGER\nvar $export = require('./$.export');\n\n$export($export.S, 'Number', {MIN_SAFE_INTEGER: -0x1fffffffffffff});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.number.min-safe-integer.js\n ** module id = 75\n ** module chunks = 0\n **/","// 20.1.2.12 Number.parseFloat(string)\nvar $export = require('./$.export');\n\n$export($export.S, 'Number', {parseFloat: parseFloat});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.number.parse-float.js\n ** module id = 76\n ** module chunks = 0\n **/","// 20.1.2.13 Number.parseInt(string, radix)\nvar $export = require('./$.export');\n\n$export($export.S, 'Number', {parseInt: parseInt});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.number.parse-int.js\n ** module id = 77\n ** module chunks = 0\n **/","// 20.2.2.3 Math.acosh(x)\nvar $export = require('./$.export')\n , log1p = require('./$.math-log1p')\n , sqrt = Math.sqrt\n , $acosh = Math.acosh;\n\n// V8 bug https://code.google.com/p/v8/issues/detail?id=3509\n$export($export.S + $export.F * !($acosh && Math.floor($acosh(Number.MAX_VALUE)) == 710), 'Math', {\n acosh: function acosh(x){\n return (x = +x) < 1 ? NaN : x > 94906265.62425156\n ? Math.log(x) + Math.LN2\n : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.math.acosh.js\n ** module id = 78\n ** module chunks = 0\n **/","// 20.2.2.20 Math.log1p(x)\nmodule.exports = Math.log1p || function log1p(x){\n return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.math-log1p.js\n ** module id = 79\n ** module chunks = 0\n **/","// 20.2.2.5 Math.asinh(x)\nvar $export = require('./$.export');\n\nfunction asinh(x){\n return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));\n}\n\n$export($export.S, 'Math', {asinh: asinh});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.math.asinh.js\n ** module id = 80\n ** module chunks = 0\n **/","// 20.2.2.7 Math.atanh(x)\nvar $export = require('./$.export');\n\n$export($export.S, 'Math', {\n atanh: function atanh(x){\n return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.math.atanh.js\n ** module id = 81\n ** module chunks = 0\n **/","// 20.2.2.9 Math.cbrt(x)\nvar $export = require('./$.export')\n , sign = require('./$.math-sign');\n\n$export($export.S, 'Math', {\n cbrt: function cbrt(x){\n return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3);\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.math.cbrt.js\n ** module id = 82\n ** module chunks = 0\n **/","// 20.2.2.28 Math.sign(x)\nmodule.exports = Math.sign || function sign(x){\n return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.math-sign.js\n ** module id = 83\n ** module chunks = 0\n **/","// 20.2.2.11 Math.clz32(x)\nvar $export = require('./$.export');\n\n$export($export.S, 'Math', {\n clz32: function clz32(x){\n return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32;\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.math.clz32.js\n ** module id = 84\n ** module chunks = 0\n **/","// 20.2.2.12 Math.cosh(x)\nvar $export = require('./$.export')\n , exp = Math.exp;\n\n$export($export.S, 'Math', {\n cosh: function cosh(x){\n return (exp(x = +x) + exp(-x)) / 2;\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.math.cosh.js\n ** module id = 85\n ** module chunks = 0\n **/","// 20.2.2.14 Math.expm1(x)\nvar $export = require('./$.export');\n\n$export($export.S, 'Math', {expm1: require('./$.math-expm1')});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.math.expm1.js\n ** module id = 86\n ** module chunks = 0\n **/","// 20.2.2.14 Math.expm1(x)\nmodule.exports = Math.expm1 || function expm1(x){\n return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.math-expm1.js\n ** module id = 87\n ** module chunks = 0\n **/","// 20.2.2.16 Math.fround(x)\nvar $export = require('./$.export')\n , sign = require('./$.math-sign')\n , pow = Math.pow\n , EPSILON = pow(2, -52)\n , EPSILON32 = pow(2, -23)\n , MAX32 = pow(2, 127) * (2 - EPSILON32)\n , MIN32 = pow(2, -126);\n\nvar roundTiesToEven = function(n){\n return n + 1 / EPSILON - 1 / EPSILON;\n};\n\n\n$export($export.S, 'Math', {\n fround: function fround(x){\n var $abs = Math.abs(x)\n , $sign = sign(x)\n , a, result;\n if($abs < MIN32)return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;\n a = (1 + EPSILON32 / EPSILON) * $abs;\n result = a - (a - $abs);\n if(result > MAX32 || result != result)return $sign * Infinity;\n return $sign * result;\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.math.fround.js\n ** module id = 88\n ** module chunks = 0\n **/","// 20.2.2.17 Math.hypot([value1[, value2[, … ]]])\nvar $export = require('./$.export')\n , abs = Math.abs;\n\n$export($export.S, 'Math', {\n hypot: function hypot(value1, value2){ // eslint-disable-line no-unused-vars\n var sum = 0\n , i = 0\n , $$ = arguments\n , $$len = $$.length\n , larg = 0\n , arg, div;\n while(i < $$len){\n arg = abs($$[i++]);\n if(larg < arg){\n div = larg / arg;\n sum = sum * div * div + 1;\n larg = arg;\n } else if(arg > 0){\n div = arg / larg;\n sum += div * div;\n } else sum += arg;\n }\n return larg === Infinity ? Infinity : larg * Math.sqrt(sum);\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.math.hypot.js\n ** module id = 89\n ** module chunks = 0\n **/","// 20.2.2.18 Math.imul(x, y)\nvar $export = require('./$.export')\n , $imul = Math.imul;\n\n// some WebKit versions fails with big numbers, some has wrong arity\n$export($export.S + $export.F * require('./$.fails')(function(){\n return $imul(0xffffffff, 5) != -5 || $imul.length != 2;\n}), 'Math', {\n imul: function imul(x, y){\n var UINT16 = 0xffff\n , xn = +x\n , yn = +y\n , xl = UINT16 & xn\n , yl = UINT16 & yn;\n return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.math.imul.js\n ** module id = 90\n ** module chunks = 0\n **/","// 20.2.2.21 Math.log10(x)\nvar $export = require('./$.export');\n\n$export($export.S, 'Math', {\n log10: function log10(x){\n return Math.log(x) / Math.LN10;\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.math.log10.js\n ** module id = 91\n ** module chunks = 0\n **/","// 20.2.2.20 Math.log1p(x)\nvar $export = require('./$.export');\n\n$export($export.S, 'Math', {log1p: require('./$.math-log1p')});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.math.log1p.js\n ** module id = 92\n ** module chunks = 0\n **/","// 20.2.2.22 Math.log2(x)\nvar $export = require('./$.export');\n\n$export($export.S, 'Math', {\n log2: function log2(x){\n return Math.log(x) / Math.LN2;\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.math.log2.js\n ** module id = 93\n ** module chunks = 0\n **/","// 20.2.2.28 Math.sign(x)\nvar $export = require('./$.export');\n\n$export($export.S, 'Math', {sign: require('./$.math-sign')});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.math.sign.js\n ** module id = 94\n ** module chunks = 0\n **/","// 20.2.2.30 Math.sinh(x)\nvar $export = require('./$.export')\n , expm1 = require('./$.math-expm1')\n , exp = Math.exp;\n\n// V8 near Chromium 38 has a problem with very small numbers\n$export($export.S + $export.F * require('./$.fails')(function(){\n return !Math.sinh(-2e-17) != -2e-17;\n}), 'Math', {\n sinh: function sinh(x){\n return Math.abs(x = +x) < 1\n ? (expm1(x) - expm1(-x)) / 2\n : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2);\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.math.sinh.js\n ** module id = 95\n ** module chunks = 0\n **/","// 20.2.2.33 Math.tanh(x)\nvar $export = require('./$.export')\n , expm1 = require('./$.math-expm1')\n , exp = Math.exp;\n\n$export($export.S, 'Math', {\n tanh: function tanh(x){\n var a = expm1(x = +x)\n , b = expm1(-x);\n return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.math.tanh.js\n ** module id = 96\n ** module chunks = 0\n **/","// 20.2.2.34 Math.trunc(x)\nvar $export = require('./$.export');\n\n$export($export.S, 'Math', {\n trunc: function trunc(it){\n return (it > 0 ? Math.floor : Math.ceil)(it);\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.math.trunc.js\n ** module id = 97\n ** module chunks = 0\n **/","var $export = require('./$.export')\n , toIndex = require('./$.to-index')\n , fromCharCode = String.fromCharCode\n , $fromCodePoint = String.fromCodePoint;\n\n// length should be 1, old FF problem\n$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {\n // 21.1.2.2 String.fromCodePoint(...codePoints)\n fromCodePoint: function fromCodePoint(x){ // eslint-disable-line no-unused-vars\n var res = []\n , $$ = arguments\n , $$len = $$.length\n , i = 0\n , code;\n while($$len > i){\n code = +$$[i++];\n if(toIndex(code, 0x10ffff) !== code)throw RangeError(code + ' is not a valid code point');\n res.push(code < 0x10000\n ? fromCharCode(code)\n : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)\n );\n } return res.join('');\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.string.from-code-point.js\n ** module id = 98\n ** module chunks = 0\n **/","var $export = require('./$.export')\n , toIObject = require('./$.to-iobject')\n , toLength = require('./$.to-length');\n\n$export($export.S, 'String', {\n // 21.1.2.4 String.raw(callSite, ...substitutions)\n raw: function raw(callSite){\n var tpl = toIObject(callSite.raw)\n , len = toLength(tpl.length)\n , $$ = arguments\n , $$len = $$.length\n , res = []\n , i = 0;\n while(len > i){\n res.push(String(tpl[i++]));\n if(i < $$len)res.push(String($$[i]));\n } return res.join('');\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.string.raw.js\n ** module id = 99\n ** module chunks = 0\n **/","'use strict';\n// 21.1.3.25 String.prototype.trim()\nrequire('./$.string-trim')('trim', function($trim){\n return function trim(){\n return $trim(this, 3);\n };\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.string.trim.js\n ** module id = 100\n ** module chunks = 0\n **/","'use strict';\nvar $at = require('./$.string-at')(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\nrequire('./$.iter-define')(String, 'String', function(iterated){\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function(){\n var O = this._t\n , index = this._i\n , point;\n if(index >= O.length)return {value: undefined, done: true};\n point = $at(O, index);\n this._i += point.length;\n return {value: point, done: false};\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.string.iterator.js\n ** module id = 101\n ** module chunks = 0\n **/","var toInteger = require('./$.to-integer')\n , defined = require('./$.defined');\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function(TO_STRING){\n return function(that, pos){\n var s = String(defined(that))\n , i = toInteger(pos)\n , l = s.length\n , a, b;\n if(i < 0 || i >= l)return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.string-at.js\n ** module id = 102\n ** module chunks = 0\n **/","'use strict';\nvar LIBRARY = require('./$.library')\n , $export = require('./$.export')\n , redefine = require('./$.redefine')\n , hide = require('./$.hide')\n , has = require('./$.has')\n , Iterators = require('./$.iterators')\n , $iterCreate = require('./$.iter-create')\n , setToStringTag = require('./$.set-to-string-tag')\n , getProto = require('./$').getProto\n , ITERATOR = require('./$.wks')('iterator')\n , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`\n , FF_ITERATOR = '@@iterator'\n , KEYS = 'keys'\n , VALUES = 'values';\n\nvar returnThis = function(){ return this; };\n\nmodule.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){\n $iterCreate(Constructor, NAME, next);\n var getMethod = function(kind){\n if(!BUGGY && kind in proto)return proto[kind];\n switch(kind){\n case KEYS: return function keys(){ return new Constructor(this, kind); };\n case VALUES: return function values(){ return new Constructor(this, kind); };\n } return function entries(){ return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator'\n , DEF_VALUES = DEFAULT == VALUES\n , VALUES_BUG = false\n , proto = Base.prototype\n , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]\n , $default = $native || getMethod(DEFAULT)\n , methods, key;\n // Fix native\n if($native){\n var IteratorPrototype = getProto($default.call(new Base));\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // FF fix\n if(!LIBRARY && has(proto, FF_ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);\n // fix Array#{values, @@iterator}.name in V8 / FF\n if(DEF_VALUES && $native.name !== VALUES){\n VALUES_BUG = true;\n $default = function values(){ return $native.call(this); };\n }\n }\n // Define iterator\n if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if(DEFAULT){\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: !DEF_VALUES ? $default : getMethod('entries')\n };\n if(FORCED)for(key in methods){\n if(!(key in proto))redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.iter-define.js\n ** module id = 103\n ** module chunks = 0\n **/","module.exports = {};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.iterators.js\n ** module id = 104\n ** module chunks = 0\n **/","'use strict';\nvar $ = require('./$')\n , descriptor = require('./$.property-desc')\n , setToStringTag = require('./$.set-to-string-tag')\n , IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./$.hide')(IteratorPrototype, require('./$.wks')('iterator'), function(){ return this; });\n\nmodule.exports = function(Constructor, NAME, next){\n Constructor.prototype = $.create(IteratorPrototype, {next: descriptor(1, next)});\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.iter-create.js\n ** module id = 105\n ** module chunks = 0\n **/","'use strict';\nvar $export = require('./$.export')\n , $at = require('./$.string-at')(false);\n$export($export.P, 'String', {\n // 21.1.3.3 String.prototype.codePointAt(pos)\n codePointAt: function codePointAt(pos){\n return $at(this, pos);\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.string.code-point-at.js\n ** module id = 106\n ** module chunks = 0\n **/","// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])\n'use strict';\nvar $export = require('./$.export')\n , toLength = require('./$.to-length')\n , context = require('./$.string-context')\n , ENDS_WITH = 'endsWith'\n , $endsWith = ''[ENDS_WITH];\n\n$export($export.P + $export.F * require('./$.fails-is-regexp')(ENDS_WITH), 'String', {\n endsWith: function endsWith(searchString /*, endPosition = @length */){\n var that = context(this, searchString, ENDS_WITH)\n , $$ = arguments\n , endPosition = $$.length > 1 ? $$[1] : undefined\n , len = toLength(that.length)\n , end = endPosition === undefined ? len : Math.min(toLength(endPosition), len)\n , search = String(searchString);\n return $endsWith\n ? $endsWith.call(that, search, end)\n : that.slice(end - search.length, end) === search;\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.string.ends-with.js\n ** module id = 107\n ** module chunks = 0\n **/","// helper for String#{startsWith, endsWith, includes}\nvar isRegExp = require('./$.is-regexp')\n , defined = require('./$.defined');\n\nmodule.exports = function(that, searchString, NAME){\n if(isRegExp(searchString))throw TypeError('String#' + NAME + \" doesn't accept regex!\");\n return String(defined(that));\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.string-context.js\n ** module id = 108\n ** module chunks = 0\n **/","// 7.2.8 IsRegExp(argument)\nvar isObject = require('./$.is-object')\n , cof = require('./$.cof')\n , MATCH = require('./$.wks')('match');\nmodule.exports = function(it){\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.is-regexp.js\n ** module id = 109\n ** module chunks = 0\n **/","var MATCH = require('./$.wks')('match');\nmodule.exports = function(KEY){\n var re = /./;\n try {\n '/./'[KEY](re);\n } catch(e){\n try {\n re[MATCH] = false;\n return !'/./'[KEY](re);\n } catch(f){ /* empty */ }\n } return true;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.fails-is-regexp.js\n ** module id = 110\n ** module chunks = 0\n **/","// 21.1.3.7 String.prototype.includes(searchString, position = 0)\n'use strict';\nvar $export = require('./$.export')\n , context = require('./$.string-context')\n , INCLUDES = 'includes';\n\n$export($export.P + $export.F * require('./$.fails-is-regexp')(INCLUDES), 'String', {\n includes: function includes(searchString /*, position = 0 */){\n return !!~context(this, searchString, INCLUDES)\n .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.string.includes.js\n ** module id = 111\n ** module chunks = 0\n **/","var $export = require('./$.export');\n\n$export($export.P, 'String', {\n // 21.1.3.13 String.prototype.repeat(count)\n repeat: require('./$.string-repeat')\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.string.repeat.js\n ** module id = 112\n ** module chunks = 0\n **/","'use strict';\nvar toInteger = require('./$.to-integer')\n , defined = require('./$.defined');\n\nmodule.exports = function repeat(count){\n var str = String(defined(this))\n , res = ''\n , n = toInteger(count);\n if(n < 0 || n == Infinity)throw RangeError(\"Count can't be negative\");\n for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str;\n return res;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.string-repeat.js\n ** module id = 113\n ** module chunks = 0\n **/","// 21.1.3.18 String.prototype.startsWith(searchString [, position ])\n'use strict';\nvar $export = require('./$.export')\n , toLength = require('./$.to-length')\n , context = require('./$.string-context')\n , STARTS_WITH = 'startsWith'\n , $startsWith = ''[STARTS_WITH];\n\n$export($export.P + $export.F * require('./$.fails-is-regexp')(STARTS_WITH), 'String', {\n startsWith: function startsWith(searchString /*, position = 0 */){\n var that = context(this, searchString, STARTS_WITH)\n , $$ = arguments\n , index = toLength(Math.min($$.length > 1 ? $$[1] : undefined, that.length))\n , search = String(searchString);\n return $startsWith\n ? $startsWith.call(that, search, index)\n : that.slice(index, index + search.length) === search;\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.string.starts-with.js\n ** module id = 114\n ** module chunks = 0\n **/","'use strict';\nvar ctx = require('./$.ctx')\n , $export = require('./$.export')\n , toObject = require('./$.to-object')\n , call = require('./$.iter-call')\n , isArrayIter = require('./$.is-array-iter')\n , toLength = require('./$.to-length')\n , getIterFn = require('./core.get-iterator-method');\n$export($export.S + $export.F * !require('./$.iter-detect')(function(iter){ Array.from(iter); }), 'Array', {\n // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)\n from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){\n var O = toObject(arrayLike)\n , C = typeof this == 'function' ? this : Array\n , $$ = arguments\n , $$len = $$.length\n , mapfn = $$len > 1 ? $$[1] : undefined\n , mapping = mapfn !== undefined\n , index = 0\n , iterFn = getIterFn(O)\n , length, result, step, iterator;\n if(mapping)mapfn = ctx(mapfn, $$len > 2 ? $$[2] : undefined, 2);\n // if object isn't iterable or it's array with default iterator - use simple case\n if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){\n for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){\n result[index] = mapping ? call(iterator, mapfn, [step.value, index], true) : step.value;\n }\n } else {\n length = toLength(O.length);\n for(result = new C(length); length > index; index++){\n result[index] = mapping ? mapfn(O[index], index) : O[index];\n }\n }\n result.length = index;\n return result;\n }\n});\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.array.from.js\n ** module id = 115\n ** module chunks = 0\n **/","// call something on iterator step with safe closing on error\nvar anObject = require('./$.an-object');\nmodule.exports = function(iterator, fn, value, entries){\n try {\n return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch(e){\n var ret = iterator['return'];\n if(ret !== undefined)anObject(ret.call(iterator));\n throw e;\n }\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.iter-call.js\n ** module id = 116\n ** module chunks = 0\n **/","// check on default Array iterator\nvar Iterators = require('./$.iterators')\n , ITERATOR = require('./$.wks')('iterator')\n , ArrayProto = Array.prototype;\n\nmodule.exports = function(it){\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.is-array-iter.js\n ** module id = 117\n ** module chunks = 0\n **/","var classof = require('./$.classof')\n , ITERATOR = require('./$.wks')('iterator')\n , Iterators = require('./$.iterators');\nmodule.exports = require('./$.core').getIteratorMethod = function(it){\n if(it != undefined)return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/core.get-iterator-method.js\n ** module id = 118\n ** module chunks = 0\n **/","var ITERATOR = require('./$.wks')('iterator')\n , SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function(){ SAFE_CLOSING = true; };\n Array.from(riter, function(){ throw 2; });\n} catch(e){ /* empty */ }\n\nmodule.exports = function(exec, skipClosing){\n if(!skipClosing && !SAFE_CLOSING)return false;\n var safe = false;\n try {\n var arr = [7]\n , iter = arr[ITERATOR]();\n iter.next = function(){ safe = true; };\n arr[ITERATOR] = function(){ return iter; };\n exec(arr);\n } catch(e){ /* empty */ }\n return safe;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.iter-detect.js\n ** module id = 119\n ** module chunks = 0\n **/","'use strict';\nvar $export = require('./$.export');\n\n// WebKit Array.of isn't generic\n$export($export.S + $export.F * require('./$.fails')(function(){\n function F(){}\n return !(Array.of.call(F) instanceof F);\n}), 'Array', {\n // 22.1.2.3 Array.of( ...items)\n of: function of(/* ...args */){\n var index = 0\n , $$ = arguments\n , $$len = $$.length\n , result = new (typeof this == 'function' ? this : Array)($$len);\n while($$len > index)result[index] = $$[index++];\n result.length = $$len;\n return result;\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.array.of.js\n ** module id = 120\n ** module chunks = 0\n **/","'use strict';\nvar addToUnscopables = require('./$.add-to-unscopables')\n , step = require('./$.iter-step')\n , Iterators = require('./$.iterators')\n , toIObject = require('./$.to-iobject');\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = require('./$.iter-define')(Array, 'Array', function(iterated, kind){\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function(){\n var O = this._t\n , kind = this._k\n , index = this._i++;\n if(!O || index >= O.length){\n this._t = undefined;\n return step(1);\n }\n if(kind == 'keys' )return step(0, index);\n if(kind == 'values')return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.array.iterator.js\n ** module id = 121\n ** module chunks = 0\n **/","// 22.1.3.31 Array.prototype[@@unscopables]\nvar UNSCOPABLES = require('./$.wks')('unscopables')\n , ArrayProto = Array.prototype;\nif(ArrayProto[UNSCOPABLES] == undefined)require('./$.hide')(ArrayProto, UNSCOPABLES, {});\nmodule.exports = function(key){\n ArrayProto[UNSCOPABLES][key] = true;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.add-to-unscopables.js\n ** module id = 122\n ** module chunks = 0\n **/","module.exports = function(done, value){\n return {value: value, done: !!done};\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.iter-step.js\n ** module id = 123\n ** module chunks = 0\n **/","require('./$.set-species')('Array');\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.array.species.js\n ** module id = 124\n ** module chunks = 0\n **/","'use strict';\nvar global = require('./$.global')\n , $ = require('./$')\n , DESCRIPTORS = require('./$.descriptors')\n , SPECIES = require('./$.wks')('species');\n\nmodule.exports = function(KEY){\n var C = global[KEY];\n if(DESCRIPTORS && C && !C[SPECIES])$.setDesc(C, SPECIES, {\n configurable: true,\n get: function(){ return this; }\n });\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.set-species.js\n ** module id = 125\n ** module chunks = 0\n **/","// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)\nvar $export = require('./$.export');\n\n$export($export.P, 'Array', {copyWithin: require('./$.array-copy-within')});\n\nrequire('./$.add-to-unscopables')('copyWithin');\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.array.copy-within.js\n ** module id = 126\n ** module chunks = 0\n **/","// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)\n'use strict';\nvar toObject = require('./$.to-object')\n , toIndex = require('./$.to-index')\n , toLength = require('./$.to-length');\n\nmodule.exports = [].copyWithin || function copyWithin(target/*= 0*/, start/*= 0, end = @length*/){\n var O = toObject(this)\n , len = toLength(O.length)\n , to = toIndex(target, len)\n , from = toIndex(start, len)\n , $$ = arguments\n , end = $$.length > 2 ? $$[2] : undefined\n , count = Math.min((end === undefined ? len : toIndex(end, len)) - from, len - to)\n , inc = 1;\n if(from < to && to < from + count){\n inc = -1;\n from += count - 1;\n to += count - 1;\n }\n while(count-- > 0){\n if(from in O)O[to] = O[from];\n else delete O[to];\n to += inc;\n from += inc;\n } return O;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.array-copy-within.js\n ** module id = 127\n ** module chunks = 0\n **/","// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)\nvar $export = require('./$.export');\n\n$export($export.P, 'Array', {fill: require('./$.array-fill')});\n\nrequire('./$.add-to-unscopables')('fill');\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.array.fill.js\n ** module id = 128\n ** module chunks = 0\n **/","// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)\n'use strict';\nvar toObject = require('./$.to-object')\n , toIndex = require('./$.to-index')\n , toLength = require('./$.to-length');\nmodule.exports = [].fill || function fill(value /*, start = 0, end = @length */){\n var O = toObject(this)\n , length = toLength(O.length)\n , $$ = arguments\n , $$len = $$.length\n , index = toIndex($$len > 1 ? $$[1] : undefined, length)\n , end = $$len > 2 ? $$[2] : undefined\n , endPos = end === undefined ? length : toIndex(end, length);\n while(endPos > index)O[index++] = value;\n return O;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.array-fill.js\n ** module id = 129\n ** module chunks = 0\n **/","'use strict';\n// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)\nvar $export = require('./$.export')\n , $find = require('./$.array-methods')(5)\n , KEY = 'find'\n , forced = true;\n// Shouldn't skip holes\nif(KEY in [])Array(1)[KEY](function(){ forced = false; });\n$export($export.P + $export.F * forced, 'Array', {\n find: function find(callbackfn/*, that = undefined */){\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\nrequire('./$.add-to-unscopables')(KEY);\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.array.find.js\n ** module id = 130\n ** module chunks = 0\n **/","'use strict';\n// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)\nvar $export = require('./$.export')\n , $find = require('./$.array-methods')(6)\n , KEY = 'findIndex'\n , forced = true;\n// Shouldn't skip holes\nif(KEY in [])Array(1)[KEY](function(){ forced = false; });\n$export($export.P + $export.F * forced, 'Array', {\n findIndex: function findIndex(callbackfn/*, that = undefined */){\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\nrequire('./$.add-to-unscopables')(KEY);\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.array.find-index.js\n ** module id = 131\n ** module chunks = 0\n **/","var $ = require('./$')\n , global = require('./$.global')\n , isRegExp = require('./$.is-regexp')\n , $flags = require('./$.flags')\n , $RegExp = global.RegExp\n , Base = $RegExp\n , proto = $RegExp.prototype\n , re1 = /a/g\n , re2 = /a/g\n // \"new\" creates a new object, old webkit buggy here\n , CORRECT_NEW = new $RegExp(re1) !== re1;\n\nif(require('./$.descriptors') && (!CORRECT_NEW || require('./$.fails')(function(){\n re2[require('./$.wks')('match')] = false;\n // RegExp constructor can alter flags and IsRegExp works correct with @@match\n return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i';\n}))){\n $RegExp = function RegExp(p, f){\n var piRE = isRegExp(p)\n , fiU = f === undefined;\n return !(this instanceof $RegExp) && piRE && p.constructor === $RegExp && fiU ? p\n : CORRECT_NEW\n ? new Base(piRE && !fiU ? p.source : p, f)\n : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f);\n };\n $.each.call($.getNames(Base), function(key){\n key in $RegExp || $.setDesc($RegExp, key, {\n configurable: true,\n get: function(){ return Base[key]; },\n set: function(it){ Base[key] = it; }\n });\n });\n proto.constructor = $RegExp;\n $RegExp.prototype = proto;\n require('./$.redefine')(global, 'RegExp', $RegExp);\n}\n\nrequire('./$.set-species')('RegExp');\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.regexp.constructor.js\n ** module id = 132\n ** module chunks = 0\n **/","'use strict';\n// 21.2.5.3 get RegExp.prototype.flags\nvar anObject = require('./$.an-object');\nmodule.exports = function(){\n var that = anObject(this)\n , result = '';\n if(that.global) result += 'g';\n if(that.ignoreCase) result += 'i';\n if(that.multiline) result += 'm';\n if(that.unicode) result += 'u';\n if(that.sticky) result += 'y';\n return result;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.flags.js\n ** module id = 133\n ** module chunks = 0\n **/","// 21.2.5.3 get RegExp.prototype.flags()\nvar $ = require('./$');\nif(require('./$.descriptors') && /./g.flags != 'g')$.setDesc(RegExp.prototype, 'flags', {\n configurable: true,\n get: require('./$.flags')\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.regexp.flags.js\n ** module id = 134\n ** module chunks = 0\n **/","// @@match logic\nrequire('./$.fix-re-wks')('match', 1, function(defined, MATCH){\n // 21.1.3.11 String.prototype.match(regexp)\n return function match(regexp){\n 'use strict';\n var O = defined(this)\n , fn = regexp == undefined ? undefined : regexp[MATCH];\n return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));\n };\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.regexp.match.js\n ** module id = 135\n ** module chunks = 0\n **/","'use strict';\nvar hide = require('./$.hide')\n , redefine = require('./$.redefine')\n , fails = require('./$.fails')\n , defined = require('./$.defined')\n , wks = require('./$.wks');\n\nmodule.exports = function(KEY, length, exec){\n var SYMBOL = wks(KEY)\n , original = ''[KEY];\n if(fails(function(){\n var O = {};\n O[SYMBOL] = function(){ return 7; };\n return ''[KEY](O) != 7;\n })){\n redefine(String.prototype, KEY, exec(defined, SYMBOL, original));\n hide(RegExp.prototype, SYMBOL, length == 2\n // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n ? function(string, arg){ return original.call(string, this, arg); }\n // 21.2.5.6 RegExp.prototype[@@match](string)\n // 21.2.5.9 RegExp.prototype[@@search](string)\n : function(string){ return original.call(string, this); }\n );\n }\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.fix-re-wks.js\n ** module id = 136\n ** module chunks = 0\n **/","// @@replace logic\nrequire('./$.fix-re-wks')('replace', 2, function(defined, REPLACE, $replace){\n // 21.1.3.14 String.prototype.replace(searchValue, replaceValue)\n return function replace(searchValue, replaceValue){\n 'use strict';\n var O = defined(this)\n , fn = searchValue == undefined ? undefined : searchValue[REPLACE];\n return fn !== undefined\n ? fn.call(searchValue, O, replaceValue)\n : $replace.call(String(O), searchValue, replaceValue);\n };\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.regexp.replace.js\n ** module id = 137\n ** module chunks = 0\n **/","// @@search logic\nrequire('./$.fix-re-wks')('search', 1, function(defined, SEARCH){\n // 21.1.3.15 String.prototype.search(regexp)\n return function search(regexp){\n 'use strict';\n var O = defined(this)\n , fn = regexp == undefined ? undefined : regexp[SEARCH];\n return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));\n };\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.regexp.search.js\n ** module id = 138\n ** module chunks = 0\n **/","// @@split logic\nrequire('./$.fix-re-wks')('split', 2, function(defined, SPLIT, $split){\n // 21.1.3.17 String.prototype.split(separator, limit)\n return function split(separator, limit){\n 'use strict';\n var O = defined(this)\n , fn = separator == undefined ? undefined : separator[SPLIT];\n return fn !== undefined\n ? fn.call(separator, O, limit)\n : $split.call(String(O), separator, limit);\n };\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.regexp.split.js\n ** module id = 139\n ** module chunks = 0\n **/","'use strict';\nvar $ = require('./$')\n , LIBRARY = require('./$.library')\n , global = require('./$.global')\n , ctx = require('./$.ctx')\n , classof = require('./$.classof')\n , $export = require('./$.export')\n , isObject = require('./$.is-object')\n , anObject = require('./$.an-object')\n , aFunction = require('./$.a-function')\n , strictNew = require('./$.strict-new')\n , forOf = require('./$.for-of')\n , setProto = require('./$.set-proto').set\n , same = require('./$.same-value')\n , SPECIES = require('./$.wks')('species')\n , speciesConstructor = require('./$.species-constructor')\n , asap = require('./$.microtask')\n , PROMISE = 'Promise'\n , process = global.process\n , isNode = classof(process) == 'process'\n , P = global[PROMISE]\n , Wrapper;\n\nvar testResolve = function(sub){\n var test = new P(function(){});\n if(sub)test.constructor = Object;\n return P.resolve(test) === test;\n};\n\nvar USE_NATIVE = function(){\n var works = false;\n function P2(x){\n var self = new P(x);\n setProto(self, P2.prototype);\n return self;\n }\n try {\n works = P && P.resolve && testResolve();\n setProto(P2, P);\n P2.prototype = $.create(P.prototype, {constructor: {value: P2}});\n // actual Firefox has broken subclass support, test that\n if(!(P2.resolve(5).then(function(){}) instanceof P2)){\n works = false;\n }\n // actual V8 bug, https://code.google.com/p/v8/issues/detail?id=4162\n if(works && require('./$.descriptors')){\n var thenableThenGotten = false;\n P.resolve($.setDesc({}, 'then', {\n get: function(){ thenableThenGotten = true; }\n }));\n works = thenableThenGotten;\n }\n } catch(e){ works = false; }\n return works;\n}();\n\n// helpers\nvar sameConstructor = function(a, b){\n // library wrapper special case\n if(LIBRARY && a === P && b === Wrapper)return true;\n return same(a, b);\n};\nvar getConstructor = function(C){\n var S = anObject(C)[SPECIES];\n return S != undefined ? S : C;\n};\nvar isThenable = function(it){\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\nvar PromiseCapability = function(C){\n var resolve, reject;\n this.promise = new C(function($$resolve, $$reject){\n if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve),\n this.reject = aFunction(reject)\n};\nvar perform = function(exec){\n try {\n exec();\n } catch(e){\n return {error: e};\n }\n};\nvar notify = function(record, isReject){\n if(record.n)return;\n record.n = true;\n var chain = record.c;\n asap(function(){\n var value = record.v\n , ok = record.s == 1\n , i = 0;\n var run = function(reaction){\n var handler = ok ? reaction.ok : reaction.fail\n , resolve = reaction.resolve\n , reject = reaction.reject\n , result, then;\n try {\n if(handler){\n if(!ok)record.h = true;\n result = handler === true ? value : handler(value);\n if(result === reaction.promise){\n reject(TypeError('Promise-chain cycle'));\n } else if(then = isThenable(result)){\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch(e){\n reject(e);\n }\n };\n while(chain.length > i)run(chain[i++]); // variable length - can't use forEach\n chain.length = 0;\n record.n = false;\n if(isReject)setTimeout(function(){\n var promise = record.p\n , handler, console;\n if(isUnhandled(promise)){\n if(isNode){\n process.emit('unhandledRejection', value, promise);\n } else if(handler = global.onunhandledrejection){\n handler({promise: promise, reason: value});\n } else if((console = global.console) && console.error){\n console.error('Unhandled promise rejection', value);\n }\n } record.a = undefined;\n }, 1);\n });\n};\nvar isUnhandled = function(promise){\n var record = promise._d\n , chain = record.a || record.c\n , i = 0\n , reaction;\n if(record.h)return false;\n while(chain.length > i){\n reaction = chain[i++];\n if(reaction.fail || !isUnhandled(reaction.promise))return false;\n } return true;\n};\nvar $reject = function(value){\n var record = this;\n if(record.d)return;\n record.d = true;\n record = record.r || record; // unwrap\n record.v = value;\n record.s = 2;\n record.a = record.c.slice();\n notify(record, true);\n};\nvar $resolve = function(value){\n var record = this\n , then;\n if(record.d)return;\n record.d = true;\n record = record.r || record; // unwrap\n try {\n if(record.p === value)throw TypeError(\"Promise can't be resolved itself\");\n if(then = isThenable(value)){\n asap(function(){\n var wrapper = {r: record, d: false}; // wrap\n try {\n then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));\n } catch(e){\n $reject.call(wrapper, e);\n }\n });\n } else {\n record.v = value;\n record.s = 1;\n notify(record, false);\n }\n } catch(e){\n $reject.call({r: record, d: false}, e); // wrap\n }\n};\n\n// constructor polyfill\nif(!USE_NATIVE){\n // 25.4.3.1 Promise(executor)\n P = function Promise(executor){\n aFunction(executor);\n var record = this._d = {\n p: strictNew(this, P, PROMISE), // <- promise\n c: [], // <- awaiting reactions\n a: undefined, // <- checked in isUnhandled reactions\n s: 0, // <- state\n d: false, // <- done\n v: undefined, // <- value\n h: false, // <- handled rejection\n n: false // <- notify\n };\n try {\n executor(ctx($resolve, record, 1), ctx($reject, record, 1));\n } catch(err){\n $reject.call(record, err);\n }\n };\n require('./$.redefine-all')(P.prototype, {\n // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)\n then: function then(onFulfilled, onRejected){\n var reaction = new PromiseCapability(speciesConstructor(this, P))\n , promise = reaction.promise\n , record = this._d;\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n record.c.push(reaction);\n if(record.a)record.a.push(reaction);\n if(record.s)notify(record, false);\n return promise;\n },\n // 25.4.5.1 Promise.prototype.catch(onRejected)\n 'catch': function(onRejected){\n return this.then(undefined, onRejected);\n }\n });\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: P});\nrequire('./$.set-to-string-tag')(P, PROMISE);\nrequire('./$.set-species')(PROMISE);\nWrapper = require('./$.core')[PROMISE];\n\n// statics\n$export($export.S + $export.F * !USE_NATIVE, PROMISE, {\n // 25.4.4.5 Promise.reject(r)\n reject: function reject(r){\n var capability = new PromiseCapability(this)\n , $$reject = capability.reject;\n $$reject(r);\n return capability.promise;\n }\n});\n$export($export.S + $export.F * (!USE_NATIVE || testResolve(true)), PROMISE, {\n // 25.4.4.6 Promise.resolve(x)\n resolve: function resolve(x){\n // instanceof instead of internal slot check because we should fix it without replacement native Promise core\n if(x instanceof P && sameConstructor(x.constructor, this))return x;\n var capability = new PromiseCapability(this)\n , $$resolve = capability.resolve;\n $$resolve(x);\n return capability.promise;\n }\n});\n$export($export.S + $export.F * !(USE_NATIVE && require('./$.iter-detect')(function(iter){\n P.all(iter)['catch'](function(){});\n})), PROMISE, {\n // 25.4.4.1 Promise.all(iterable)\n all: function all(iterable){\n var C = getConstructor(this)\n , capability = new PromiseCapability(C)\n , resolve = capability.resolve\n , reject = capability.reject\n , values = [];\n var abrupt = perform(function(){\n forOf(iterable, false, values.push, values);\n var remaining = values.length\n , results = Array(remaining);\n if(remaining)$.each.call(values, function(promise, index){\n var alreadyCalled = false;\n C.resolve(promise).then(function(value){\n if(alreadyCalled)return;\n alreadyCalled = true;\n results[index] = value;\n --remaining || resolve(results);\n }, reject);\n });\n else resolve(results);\n });\n if(abrupt)reject(abrupt.error);\n return capability.promise;\n },\n // 25.4.4.4 Promise.race(iterable)\n race: function race(iterable){\n var C = getConstructor(this)\n , capability = new PromiseCapability(C)\n , reject = capability.reject;\n var abrupt = perform(function(){\n forOf(iterable, false, function(promise){\n C.resolve(promise).then(capability.resolve, reject);\n });\n });\n if(abrupt)reject(abrupt.error);\n return capability.promise;\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.promise.js\n ** module id = 140\n ** module chunks = 0\n **/","module.exports = function(it, Constructor, name){\n if(!(it instanceof Constructor))throw TypeError(name + \": use the 'new' operator!\");\n return it;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.strict-new.js\n ** module id = 141\n ** module chunks = 0\n **/","var ctx = require('./$.ctx')\n , call = require('./$.iter-call')\n , isArrayIter = require('./$.is-array-iter')\n , anObject = require('./$.an-object')\n , toLength = require('./$.to-length')\n , getIterFn = require('./core.get-iterator-method');\nmodule.exports = function(iterable, entries, fn, that){\n var iterFn = getIterFn(iterable)\n , f = ctx(fn, that, entries ? 2 : 1)\n , index = 0\n , length, step, iterator;\n if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!');\n // fast case for arrays with default iterator\n if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){\n entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);\n } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){\n call(iterator, f, step.value, entries);\n }\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.for-of.js\n ** module id = 142\n ** module chunks = 0\n **/","// 7.3.20 SpeciesConstructor(O, defaultConstructor)\nvar anObject = require('./$.an-object')\n , aFunction = require('./$.a-function')\n , SPECIES = require('./$.wks')('species');\nmodule.exports = function(O, D){\n var C = anObject(O).constructor, S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.species-constructor.js\n ** module id = 143\n ** module chunks = 0\n **/","var global = require('./$.global')\n , macrotask = require('./$.task').set\n , Observer = global.MutationObserver || global.WebKitMutationObserver\n , process = global.process\n , Promise = global.Promise\n , isNode = require('./$.cof')(process) == 'process'\n , head, last, notify;\n\nvar flush = function(){\n var parent, domain, fn;\n if(isNode && (parent = process.domain)){\n process.domain = null;\n parent.exit();\n }\n while(head){\n domain = head.domain;\n fn = head.fn;\n if(domain)domain.enter();\n fn(); // <- currently we use it only for Promise - try / catch not required\n if(domain)domain.exit();\n head = head.next;\n } last = undefined;\n if(parent)parent.enter();\n};\n\n// Node.js\nif(isNode){\n notify = function(){\n process.nextTick(flush);\n };\n// browsers with MutationObserver\n} else if(Observer){\n var toggle = 1\n , node = document.createTextNode('');\n new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new\n notify = function(){\n node.data = toggle = -toggle;\n };\n// environments with maybe non-completely correct, but existent Promise\n} else if(Promise && Promise.resolve){\n notify = function(){\n Promise.resolve().then(flush);\n };\n// for other environments - macrotask based on:\n// - setImmediate\n// - MessageChannel\n// - window.postMessag\n// - onreadystatechange\n// - setTimeout\n} else {\n notify = function(){\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n}\n\nmodule.exports = function asap(fn){\n var task = {fn: fn, next: undefined, domain: isNode && process.domain};\n if(last)last.next = task;\n if(!head){\n head = task;\n notify();\n } last = task;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.microtask.js\n ** module id = 144\n ** module chunks = 0\n **/","var ctx = require('./$.ctx')\n , invoke = require('./$.invoke')\n , html = require('./$.html')\n , cel = require('./$.dom-create')\n , global = require('./$.global')\n , process = global.process\n , setTask = global.setImmediate\n , clearTask = global.clearImmediate\n , MessageChannel = global.MessageChannel\n , counter = 0\n , queue = {}\n , ONREADYSTATECHANGE = 'onreadystatechange'\n , defer, channel, port;\nvar run = function(){\n var id = +this;\n if(queue.hasOwnProperty(id)){\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\nvar listner = function(event){\n run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif(!setTask || !clearTask){\n setTask = function setImmediate(fn){\n var args = [], i = 1;\n while(arguments.length > i)args.push(arguments[i++]);\n queue[++counter] = function(){\n invoke(typeof fn == 'function' ? fn : Function(fn), args);\n };\n defer(counter);\n return counter;\n };\n clearTask = function clearImmediate(id){\n delete queue[id];\n };\n // Node.js 0.8-\n if(require('./$.cof')(process) == 'process'){\n defer = function(id){\n process.nextTick(ctx(run, id, 1));\n };\n // Browsers with MessageChannel, includes WebWorkers\n } else if(MessageChannel){\n channel = new MessageChannel;\n port = channel.port2;\n channel.port1.onmessage = listner;\n defer = ctx(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){\n defer = function(id){\n global.postMessage(id + '', '*');\n };\n global.addEventListener('message', listner, false);\n // IE8-\n } else if(ONREADYSTATECHANGE in cel('script')){\n defer = function(id){\n html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){\n html.removeChild(this);\n run.call(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function(id){\n setTimeout(ctx(run, id, 1), 0);\n };\n }\n}\nmodule.exports = {\n set: setTask,\n clear: clearTask\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.task.js\n ** module id = 145\n ** module chunks = 0\n **/","var redefine = require('./$.redefine');\nmodule.exports = function(target, src){\n for(var key in src)redefine(target, key, src[key]);\n return target;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.redefine-all.js\n ** module id = 146\n ** module chunks = 0\n **/","'use strict';\nvar strong = require('./$.collection-strong');\n\n// 23.1 Map Objects\nrequire('./$.collection')('Map', function(get){\n return function Map(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n // 23.1.3.6 Map.prototype.get(key)\n get: function get(key){\n var entry = strong.getEntry(this, key);\n return entry && entry.v;\n },\n // 23.1.3.9 Map.prototype.set(key, value)\n set: function set(key, value){\n return strong.def(this, key === 0 ? 0 : key, value);\n }\n}, strong, true);\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.map.js\n ** module id = 147\n ** module chunks = 0\n **/","'use strict';\nvar $ = require('./$')\n , hide = require('./$.hide')\n , redefineAll = require('./$.redefine-all')\n , ctx = require('./$.ctx')\n , strictNew = require('./$.strict-new')\n , defined = require('./$.defined')\n , forOf = require('./$.for-of')\n , $iterDefine = require('./$.iter-define')\n , step = require('./$.iter-step')\n , ID = require('./$.uid')('id')\n , $has = require('./$.has')\n , isObject = require('./$.is-object')\n , setSpecies = require('./$.set-species')\n , DESCRIPTORS = require('./$.descriptors')\n , isExtensible = Object.isExtensible || isObject\n , SIZE = DESCRIPTORS ? '_s' : 'size'\n , id = 0;\n\nvar fastKey = function(it, create){\n // return primitive with prefix\n if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if(!$has(it, ID)){\n // can't set id to frozen object\n if(!isExtensible(it))return 'F';\n // not necessary to add id\n if(!create)return 'E';\n // add missing object id\n hide(it, ID, ++id);\n // return object id with prefix\n } return 'O' + it[ID];\n};\n\nvar getEntry = function(that, key){\n // fast case\n var index = fastKey(key), entry;\n if(index !== 'F')return that._i[index];\n // frozen object case\n for(entry = that._f; entry; entry = entry.n){\n if(entry.k == key)return entry;\n }\n};\n\nmodule.exports = {\n getConstructor: function(wrapper, NAME, IS_MAP, ADDER){\n var C = wrapper(function(that, iterable){\n strictNew(that, C, NAME);\n that._i = $.create(null); // index\n that._f = undefined; // first entry\n that._l = undefined; // last entry\n that[SIZE] = 0; // size\n if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);\n });\n redefineAll(C.prototype, {\n // 23.1.3.1 Map.prototype.clear()\n // 23.2.3.2 Set.prototype.clear()\n clear: function clear(){\n for(var that = this, data = that._i, entry = that._f; entry; entry = entry.n){\n entry.r = true;\n if(entry.p)entry.p = entry.p.n = undefined;\n delete data[entry.i];\n }\n that._f = that._l = undefined;\n that[SIZE] = 0;\n },\n // 23.1.3.3 Map.prototype.delete(key)\n // 23.2.3.4 Set.prototype.delete(value)\n 'delete': function(key){\n var that = this\n , entry = getEntry(that, key);\n if(entry){\n var next = entry.n\n , prev = entry.p;\n delete that._i[entry.i];\n entry.r = true;\n if(prev)prev.n = next;\n if(next)next.p = prev;\n if(that._f == entry)that._f = next;\n if(that._l == entry)that._l = prev;\n that[SIZE]--;\n } return !!entry;\n },\n // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)\n // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)\n forEach: function forEach(callbackfn /*, that = undefined */){\n var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3)\n , entry;\n while(entry = entry ? entry.n : this._f){\n f(entry.v, entry.k, this);\n // revert to the last existing entry\n while(entry && entry.r)entry = entry.p;\n }\n },\n // 23.1.3.7 Map.prototype.has(key)\n // 23.2.3.7 Set.prototype.has(value)\n has: function has(key){\n return !!getEntry(this, key);\n }\n });\n if(DESCRIPTORS)$.setDesc(C.prototype, 'size', {\n get: function(){\n return defined(this[SIZE]);\n }\n });\n return C;\n },\n def: function(that, key, value){\n var entry = getEntry(that, key)\n , prev, index;\n // change existing entry\n if(entry){\n entry.v = value;\n // create new entry\n } else {\n that._l = entry = {\n i: index = fastKey(key, true), // <- index\n k: key, // <- key\n v: value, // <- value\n p: prev = that._l, // <- previous entry\n n: undefined, // <- next entry\n r: false // <- removed\n };\n if(!that._f)that._f = entry;\n if(prev)prev.n = entry;\n that[SIZE]++;\n // add to index\n if(index !== 'F')that._i[index] = entry;\n } return that;\n },\n getEntry: getEntry,\n setStrong: function(C, NAME, IS_MAP){\n // add .keys, .values, .entries, [@@iterator]\n // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11\n $iterDefine(C, NAME, function(iterated, kind){\n this._t = iterated; // target\n this._k = kind; // kind\n this._l = undefined; // previous\n }, function(){\n var that = this\n , kind = that._k\n , entry = that._l;\n // revert to the last existing entry\n while(entry && entry.r)entry = entry.p;\n // get next entry\n if(!that._t || !(that._l = entry = entry ? entry.n : that._t._f)){\n // or finish the iteration\n that._t = undefined;\n return step(1);\n }\n // return step by kind\n if(kind == 'keys' )return step(0, entry.k);\n if(kind == 'values')return step(0, entry.v);\n return step(0, [entry.k, entry.v]);\n }, IS_MAP ? 'entries' : 'values' , !IS_MAP, true);\n\n // add [@@species], 23.1.2.2, 23.2.2.2\n setSpecies(NAME);\n }\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.collection-strong.js\n ** module id = 148\n ** module chunks = 0\n **/","'use strict';\nvar global = require('./$.global')\n , $export = require('./$.export')\n , redefine = require('./$.redefine')\n , redefineAll = require('./$.redefine-all')\n , forOf = require('./$.for-of')\n , strictNew = require('./$.strict-new')\n , isObject = require('./$.is-object')\n , fails = require('./$.fails')\n , $iterDetect = require('./$.iter-detect')\n , setToStringTag = require('./$.set-to-string-tag');\n\nmodule.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){\n var Base = global[NAME]\n , C = Base\n , ADDER = IS_MAP ? 'set' : 'add'\n , proto = C && C.prototype\n , O = {};\n var fixMethod = function(KEY){\n var fn = proto[KEY];\n redefine(proto, KEY,\n KEY == 'delete' ? function(a){\n return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'has' ? function has(a){\n return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'get' ? function get(a){\n return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'add' ? function add(a){ fn.call(this, a === 0 ? 0 : a); return this; }\n : function set(a, b){ fn.call(this, a === 0 ? 0 : a, b); return this; }\n );\n };\n if(typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function(){\n new C().entries().next();\n }))){\n // create collection constructor\n C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);\n redefineAll(C.prototype, methods);\n } else {\n var instance = new C\n // early implementations not supports chaining\n , HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance\n // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false\n , THROWS_ON_PRIMITIVES = fails(function(){ instance.has(1); })\n // most early implementations doesn't supports iterables, most modern - not close it correctly\n , ACCEPT_ITERABLES = $iterDetect(function(iter){ new C(iter); }) // eslint-disable-line no-new\n // for early implementations -0 and +0 not the same\n , BUGGY_ZERO;\n if(!ACCEPT_ITERABLES){ \n C = wrapper(function(target, iterable){\n strictNew(target, C, NAME);\n var that = new Base;\n if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);\n return that;\n });\n C.prototype = proto;\n proto.constructor = C;\n }\n IS_WEAK || instance.forEach(function(val, key){\n BUGGY_ZERO = 1 / key === -Infinity;\n });\n if(THROWS_ON_PRIMITIVES || BUGGY_ZERO){\n fixMethod('delete');\n fixMethod('has');\n IS_MAP && fixMethod('get');\n }\n if(BUGGY_ZERO || HASNT_CHAINING)fixMethod(ADDER);\n // weak collections should not contains .clear method\n if(IS_WEAK && proto.clear)delete proto.clear;\n }\n\n setToStringTag(C, NAME);\n\n O[NAME] = C;\n $export($export.G + $export.W + $export.F * (C != Base), O);\n\n if(!IS_WEAK)common.setStrong(C, NAME, IS_MAP);\n\n return C;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.collection.js\n ** module id = 149\n ** module chunks = 0\n **/","'use strict';\nvar strong = require('./$.collection-strong');\n\n// 23.2 Set Objects\nrequire('./$.collection')('Set', function(get){\n return function Set(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n // 23.2.3.1 Set.prototype.add(value)\n add: function add(value){\n return strong.def(this, value = value === 0 ? 0 : value, value);\n }\n}, strong);\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.set.js\n ** module id = 150\n ** module chunks = 0\n **/","'use strict';\nvar $ = require('./$')\n , redefine = require('./$.redefine')\n , weak = require('./$.collection-weak')\n , isObject = require('./$.is-object')\n , has = require('./$.has')\n , frozenStore = weak.frozenStore\n , WEAK = weak.WEAK\n , isExtensible = Object.isExtensible || isObject\n , tmp = {};\n\n// 23.3 WeakMap Objects\nvar $WeakMap = require('./$.collection')('WeakMap', function(get){\n return function WeakMap(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n // 23.3.3.3 WeakMap.prototype.get(key)\n get: function get(key){\n if(isObject(key)){\n if(!isExtensible(key))return frozenStore(this).get(key);\n if(has(key, WEAK))return key[WEAK][this._i];\n }\n },\n // 23.3.3.5 WeakMap.prototype.set(key, value)\n set: function set(key, value){\n return weak.def(this, key, value);\n }\n}, weak, true, true);\n\n// IE11 WeakMap frozen keys fix\nif(new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){\n $.each.call(['delete', 'has', 'get', 'set'], function(key){\n var proto = $WeakMap.prototype\n , method = proto[key];\n redefine(proto, key, function(a, b){\n // store frozen objects on leaky map\n if(isObject(a) && !isExtensible(a)){\n var result = frozenStore(this)[key](a, b);\n return key == 'set' ? this : result;\n // store all the rest on native weakmap\n } return method.call(this, a, b);\n });\n });\n}\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.weak-map.js\n ** module id = 151\n ** module chunks = 0\n **/","'use strict';\nvar hide = require('./$.hide')\n , redefineAll = require('./$.redefine-all')\n , anObject = require('./$.an-object')\n , isObject = require('./$.is-object')\n , strictNew = require('./$.strict-new')\n , forOf = require('./$.for-of')\n , createArrayMethod = require('./$.array-methods')\n , $has = require('./$.has')\n , WEAK = require('./$.uid')('weak')\n , isExtensible = Object.isExtensible || isObject\n , arrayFind = createArrayMethod(5)\n , arrayFindIndex = createArrayMethod(6)\n , id = 0;\n\n// fallback for frozen keys\nvar frozenStore = function(that){\n return that._l || (that._l = new FrozenStore);\n};\nvar FrozenStore = function(){\n this.a = [];\n};\nvar findFrozen = function(store, key){\n return arrayFind(store.a, function(it){\n return it[0] === key;\n });\n};\nFrozenStore.prototype = {\n get: function(key){\n var entry = findFrozen(this, key);\n if(entry)return entry[1];\n },\n has: function(key){\n return !!findFrozen(this, key);\n },\n set: function(key, value){\n var entry = findFrozen(this, key);\n if(entry)entry[1] = value;\n else this.a.push([key, value]);\n },\n 'delete': function(key){\n var index = arrayFindIndex(this.a, function(it){\n return it[0] === key;\n });\n if(~index)this.a.splice(index, 1);\n return !!~index;\n }\n};\n\nmodule.exports = {\n getConstructor: function(wrapper, NAME, IS_MAP, ADDER){\n var C = wrapper(function(that, iterable){\n strictNew(that, C, NAME);\n that._i = id++; // collection id\n that._l = undefined; // leak store for frozen objects\n if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);\n });\n redefineAll(C.prototype, {\n // 23.3.3.2 WeakMap.prototype.delete(key)\n // 23.4.3.3 WeakSet.prototype.delete(value)\n 'delete': function(key){\n if(!isObject(key))return false;\n if(!isExtensible(key))return frozenStore(this)['delete'](key);\n return $has(key, WEAK) && $has(key[WEAK], this._i) && delete key[WEAK][this._i];\n },\n // 23.3.3.4 WeakMap.prototype.has(key)\n // 23.4.3.4 WeakSet.prototype.has(value)\n has: function has(key){\n if(!isObject(key))return false;\n if(!isExtensible(key))return frozenStore(this).has(key);\n return $has(key, WEAK) && $has(key[WEAK], this._i);\n }\n });\n return C;\n },\n def: function(that, key, value){\n if(!isExtensible(anObject(key))){\n frozenStore(that).set(key, value);\n } else {\n $has(key, WEAK) || hide(key, WEAK, {});\n key[WEAK][that._i] = value;\n } return that;\n },\n frozenStore: frozenStore,\n WEAK: WEAK\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.collection-weak.js\n ** module id = 152\n ** module chunks = 0\n **/","'use strict';\nvar weak = require('./$.collection-weak');\n\n// 23.4 WeakSet Objects\nrequire('./$.collection')('WeakSet', function(get){\n return function WeakSet(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n // 23.4.3.1 WeakSet.prototype.add(value)\n add: function add(value){\n return weak.def(this, value, true);\n }\n}, weak, false, true);\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.weak-set.js\n ** module id = 153\n ** module chunks = 0\n **/","// 26.1.1 Reflect.apply(target, thisArgument, argumentsList)\nvar $export = require('./$.export')\n , _apply = Function.apply;\n\n$export($export.S, 'Reflect', {\n apply: function apply(target, thisArgument, argumentsList){\n return _apply.call(target, thisArgument, argumentsList);\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.reflect.apply.js\n ** module id = 154\n ** module chunks = 0\n **/","// 26.1.2 Reflect.construct(target, argumentsList [, newTarget])\nvar $ = require('./$')\n , $export = require('./$.export')\n , aFunction = require('./$.a-function')\n , anObject = require('./$.an-object')\n , isObject = require('./$.is-object')\n , bind = Function.bind || require('./$.core').Function.prototype.bind;\n\n// MS Edge supports only 2 arguments\n// FF Nightly sets third argument as `new.target`, but does not create `this` from it\n$export($export.S + $export.F * require('./$.fails')(function(){\n function F(){}\n return !(Reflect.construct(function(){}, [], F) instanceof F);\n}), 'Reflect', {\n construct: function construct(Target, args /*, newTarget*/){\n aFunction(Target);\n var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);\n if(Target == newTarget){\n // w/o altered newTarget, optimization for 0-4 arguments\n if(args != undefined)switch(anObject(args).length){\n case 0: return new Target;\n case 1: return new Target(args[0]);\n case 2: return new Target(args[0], args[1]);\n case 3: return new Target(args[0], args[1], args[2]);\n case 4: return new Target(args[0], args[1], args[2], args[3]);\n }\n // w/o altered newTarget, lot of arguments case\n var $args = [null];\n $args.push.apply($args, args);\n return new (bind.apply(Target, $args));\n }\n // with altered newTarget, not support built-in constructors\n var proto = newTarget.prototype\n , instance = $.create(isObject(proto) ? proto : Object.prototype)\n , result = Function.apply.call(Target, instance, args);\n return isObject(result) ? result : instance;\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.reflect.construct.js\n ** module id = 155\n ** module chunks = 0\n **/","// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)\nvar $ = require('./$')\n , $export = require('./$.export')\n , anObject = require('./$.an-object');\n\n// MS Edge has broken Reflect.defineProperty - throwing instead of returning false\n$export($export.S + $export.F * require('./$.fails')(function(){\n Reflect.defineProperty($.setDesc({}, 1, {value: 1}), 1, {value: 2});\n}), 'Reflect', {\n defineProperty: function defineProperty(target, propertyKey, attributes){\n anObject(target);\n try {\n $.setDesc(target, propertyKey, attributes);\n return true;\n } catch(e){\n return false;\n }\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.reflect.define-property.js\n ** module id = 156\n ** module chunks = 0\n **/","// 26.1.4 Reflect.deleteProperty(target, propertyKey)\nvar $export = require('./$.export')\n , getDesc = require('./$').getDesc\n , anObject = require('./$.an-object');\n\n$export($export.S, 'Reflect', {\n deleteProperty: function deleteProperty(target, propertyKey){\n var desc = getDesc(anObject(target), propertyKey);\n return desc && !desc.configurable ? false : delete target[propertyKey];\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.reflect.delete-property.js\n ** module id = 157\n ** module chunks = 0\n **/","'use strict';\n// 26.1.5 Reflect.enumerate(target)\nvar $export = require('./$.export')\n , anObject = require('./$.an-object');\nvar Enumerate = function(iterated){\n this._t = anObject(iterated); // target\n this._i = 0; // next index\n var keys = this._k = [] // keys\n , key;\n for(key in iterated)keys.push(key);\n};\nrequire('./$.iter-create')(Enumerate, 'Object', function(){\n var that = this\n , keys = that._k\n , key;\n do {\n if(that._i >= keys.length)return {value: undefined, done: true};\n } while(!((key = keys[that._i++]) in that._t));\n return {value: key, done: false};\n});\n\n$export($export.S, 'Reflect', {\n enumerate: function enumerate(target){\n return new Enumerate(target);\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.reflect.enumerate.js\n ** module id = 158\n ** module chunks = 0\n **/","// 26.1.6 Reflect.get(target, propertyKey [, receiver])\nvar $ = require('./$')\n , has = require('./$.has')\n , $export = require('./$.export')\n , isObject = require('./$.is-object')\n , anObject = require('./$.an-object');\n\nfunction get(target, propertyKey/*, receiver*/){\n var receiver = arguments.length < 3 ? target : arguments[2]\n , desc, proto;\n if(anObject(target) === receiver)return target[propertyKey];\n if(desc = $.getDesc(target, propertyKey))return has(desc, 'value')\n ? desc.value\n : desc.get !== undefined\n ? desc.get.call(receiver)\n : undefined;\n if(isObject(proto = $.getProto(target)))return get(proto, propertyKey, receiver);\n}\n\n$export($export.S, 'Reflect', {get: get});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.reflect.get.js\n ** module id = 159\n ** module chunks = 0\n **/","// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)\nvar $ = require('./$')\n , $export = require('./$.export')\n , anObject = require('./$.an-object');\n\n$export($export.S, 'Reflect', {\n getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey){\n return $.getDesc(anObject(target), propertyKey);\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.reflect.get-own-property-descriptor.js\n ** module id = 160\n ** module chunks = 0\n **/","// 26.1.8 Reflect.getPrototypeOf(target)\nvar $export = require('./$.export')\n , getProto = require('./$').getProto\n , anObject = require('./$.an-object');\n\n$export($export.S, 'Reflect', {\n getPrototypeOf: function getPrototypeOf(target){\n return getProto(anObject(target));\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.reflect.get-prototype-of.js\n ** module id = 161\n ** module chunks = 0\n **/","// 26.1.9 Reflect.has(target, propertyKey)\nvar $export = require('./$.export');\n\n$export($export.S, 'Reflect', {\n has: function has(target, propertyKey){\n return propertyKey in target;\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.reflect.has.js\n ** module id = 162\n ** module chunks = 0\n **/","// 26.1.10 Reflect.isExtensible(target)\nvar $export = require('./$.export')\n , anObject = require('./$.an-object')\n , $isExtensible = Object.isExtensible;\n\n$export($export.S, 'Reflect', {\n isExtensible: function isExtensible(target){\n anObject(target);\n return $isExtensible ? $isExtensible(target) : true;\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.reflect.is-extensible.js\n ** module id = 163\n ** module chunks = 0\n **/","// 26.1.11 Reflect.ownKeys(target)\nvar $export = require('./$.export');\n\n$export($export.S, 'Reflect', {ownKeys: require('./$.own-keys')});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.reflect.own-keys.js\n ** module id = 164\n ** module chunks = 0\n **/","// all object keys, includes non-enumerable and symbols\nvar $ = require('./$')\n , anObject = require('./$.an-object')\n , Reflect = require('./$.global').Reflect;\nmodule.exports = Reflect && Reflect.ownKeys || function ownKeys(it){\n var keys = $.getNames(anObject(it))\n , getSymbols = $.getSymbols;\n return getSymbols ? keys.concat(getSymbols(it)) : keys;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.own-keys.js\n ** module id = 165\n ** module chunks = 0\n **/","// 26.1.12 Reflect.preventExtensions(target)\nvar $export = require('./$.export')\n , anObject = require('./$.an-object')\n , $preventExtensions = Object.preventExtensions;\n\n$export($export.S, 'Reflect', {\n preventExtensions: function preventExtensions(target){\n anObject(target);\n try {\n if($preventExtensions)$preventExtensions(target);\n return true;\n } catch(e){\n return false;\n }\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.reflect.prevent-extensions.js\n ** module id = 166\n ** module chunks = 0\n **/","// 26.1.13 Reflect.set(target, propertyKey, V [, receiver])\nvar $ = require('./$')\n , has = require('./$.has')\n , $export = require('./$.export')\n , createDesc = require('./$.property-desc')\n , anObject = require('./$.an-object')\n , isObject = require('./$.is-object');\n\nfunction set(target, propertyKey, V/*, receiver*/){\n var receiver = arguments.length < 4 ? target : arguments[3]\n , ownDesc = $.getDesc(anObject(target), propertyKey)\n , existingDescriptor, proto;\n if(!ownDesc){\n if(isObject(proto = $.getProto(target))){\n return set(proto, propertyKey, V, receiver);\n }\n ownDesc = createDesc(0);\n }\n if(has(ownDesc, 'value')){\n if(ownDesc.writable === false || !isObject(receiver))return false;\n existingDescriptor = $.getDesc(receiver, propertyKey) || createDesc(0);\n existingDescriptor.value = V;\n $.setDesc(receiver, propertyKey, existingDescriptor);\n return true;\n }\n return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);\n}\n\n$export($export.S, 'Reflect', {set: set});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.reflect.set.js\n ** module id = 167\n ** module chunks = 0\n **/","// 26.1.14 Reflect.setPrototypeOf(target, proto)\nvar $export = require('./$.export')\n , setProto = require('./$.set-proto');\n\nif(setProto)$export($export.S, 'Reflect', {\n setPrototypeOf: function setPrototypeOf(target, proto){\n setProto.check(target, proto);\n try {\n setProto.set(target, proto);\n return true;\n } catch(e){\n return false;\n }\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es6.reflect.set-prototype-of.js\n ** module id = 168\n ** module chunks = 0\n **/","'use strict';\nvar $export = require('./$.export')\n , $includes = require('./$.array-includes')(true);\n\n$export($export.P, 'Array', {\n // https://github.com/domenic/Array.prototype.includes\n includes: function includes(el /*, fromIndex = 0 */){\n return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\nrequire('./$.add-to-unscopables')('includes');\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es7.array.includes.js\n ** module id = 169\n ** module chunks = 0\n **/","'use strict';\n// https://github.com/mathiasbynens/String.prototype.at\nvar $export = require('./$.export')\n , $at = require('./$.string-at')(true);\n\n$export($export.P, 'String', {\n at: function at(pos){\n return $at(this, pos);\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es7.string.at.js\n ** module id = 170\n ** module chunks = 0\n **/","'use strict';\nvar $export = require('./$.export')\n , $pad = require('./$.string-pad');\n\n$export($export.P, 'String', {\n padLeft: function padLeft(maxLength /*, fillString = ' ' */){\n return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es7.string.pad-left.js\n ** module id = 171\n ** module chunks = 0\n **/","// https://github.com/ljharb/proposal-string-pad-left-right\nvar toLength = require('./$.to-length')\n , repeat = require('./$.string-repeat')\n , defined = require('./$.defined');\n\nmodule.exports = function(that, maxLength, fillString, left){\n var S = String(defined(that))\n , stringLength = S.length\n , fillStr = fillString === undefined ? ' ' : String(fillString)\n , intMaxLength = toLength(maxLength);\n if(intMaxLength <= stringLength)return S;\n if(fillStr == '')fillStr = ' ';\n var fillLen = intMaxLength - stringLength\n , stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));\n if(stringFiller.length > fillLen)stringFiller = stringFiller.slice(0, fillLen);\n return left ? stringFiller + S : S + stringFiller;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.string-pad.js\n ** module id = 172\n ** module chunks = 0\n **/","'use strict';\nvar $export = require('./$.export')\n , $pad = require('./$.string-pad');\n\n$export($export.P, 'String', {\n padRight: function padRight(maxLength /*, fillString = ' ' */){\n return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es7.string.pad-right.js\n ** module id = 173\n ** module chunks = 0\n **/","'use strict';\n// https://github.com/sebmarkbage/ecmascript-string-left-right-trim\nrequire('./$.string-trim')('trimLeft', function($trim){\n return function trimLeft(){\n return $trim(this, 1);\n };\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es7.string.trim-left.js\n ** module id = 174\n ** module chunks = 0\n **/","'use strict';\n// https://github.com/sebmarkbage/ecmascript-string-left-right-trim\nrequire('./$.string-trim')('trimRight', function($trim){\n return function trimRight(){\n return $trim(this, 2);\n };\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es7.string.trim-right.js\n ** module id = 175\n ** module chunks = 0\n **/","// https://github.com/benjamingr/RexExp.escape\nvar $export = require('./$.export')\n , $re = require('./$.replacer')(/[\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n\n$export($export.S, 'RegExp', {escape: function escape(it){ return $re(it); }});\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es7.regexp.escape.js\n ** module id = 176\n ** module chunks = 0\n **/","module.exports = function(regExp, replace){\n var replacer = replace === Object(replace) ? function(part){\n return replace[part];\n } : replace;\n return function(it){\n return String(it).replace(regExp, replacer);\n };\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.replacer.js\n ** module id = 177\n ** module chunks = 0\n **/","// https://gist.github.com/WebReflection/9353781\nvar $ = require('./$')\n , $export = require('./$.export')\n , ownKeys = require('./$.own-keys')\n , toIObject = require('./$.to-iobject')\n , createDesc = require('./$.property-desc');\n\n$export($export.S, 'Object', {\n getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object){\n var O = toIObject(object)\n , setDesc = $.setDesc\n , getDesc = $.getDesc\n , keys = ownKeys(O)\n , result = {}\n , i = 0\n , key, D;\n while(keys.length > i){\n D = getDesc(O, key = keys[i++]);\n if(key in result)setDesc(result, key, createDesc(0, D));\n else result[key] = D;\n } return result;\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es7.object.get-own-property-descriptors.js\n ** module id = 178\n ** module chunks = 0\n **/","// http://goo.gl/XkBrjD\nvar $export = require('./$.export')\n , $values = require('./$.object-to-array')(false);\n\n$export($export.S, 'Object', {\n values: function values(it){\n return $values(it);\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es7.object.values.js\n ** module id = 179\n ** module chunks = 0\n **/","var $ = require('./$')\n , toIObject = require('./$.to-iobject')\n , isEnum = $.isEnum;\nmodule.exports = function(isEntries){\n return function(it){\n var O = toIObject(it)\n , keys = $.getKeys(O)\n , length = keys.length\n , i = 0\n , result = []\n , key;\n while(length > i)if(isEnum.call(O, key = keys[i++])){\n result.push(isEntries ? [key, O[key]] : O[key]);\n } return result;\n };\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.object-to-array.js\n ** module id = 180\n ** module chunks = 0\n **/","// http://goo.gl/XkBrjD\nvar $export = require('./$.export')\n , $entries = require('./$.object-to-array')(true);\n\n$export($export.S, 'Object', {\n entries: function entries(it){\n return $entries(it);\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es7.object.entries.js\n ** module id = 181\n ** module chunks = 0\n **/","// https://github.com/DavidBruant/Map-Set.prototype.toJSON\nvar $export = require('./$.export');\n\n$export($export.P, 'Map', {toJSON: require('./$.collection-to-json')('Map')});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es7.map.to-json.js\n ** module id = 182\n ** module chunks = 0\n **/","// https://github.com/DavidBruant/Map-Set.prototype.toJSON\nvar forOf = require('./$.for-of')\n , classof = require('./$.classof');\nmodule.exports = function(NAME){\n return function toJSON(){\n if(classof(this) != NAME)throw TypeError(NAME + \"#toJSON isn't generic\");\n var arr = [];\n forOf(this, false, arr.push, arr);\n return arr;\n };\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.collection-to-json.js\n ** module id = 183\n ** module chunks = 0\n **/","// https://github.com/DavidBruant/Map-Set.prototype.toJSON\nvar $export = require('./$.export');\n\n$export($export.P, 'Set', {toJSON: require('./$.collection-to-json')('Set')});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/es7.set.to-json.js\n ** module id = 184\n ** module chunks = 0\n **/","// JavaScript 1.6 / Strawman array statics shim\nvar $ = require('./$')\n , $export = require('./$.export')\n , $ctx = require('./$.ctx')\n , $Array = require('./$.core').Array || Array\n , statics = {};\nvar setStatics = function(keys, length){\n $.each.call(keys.split(','), function(key){\n if(length == undefined && key in $Array)statics[key] = $Array[key];\n else if(key in [])statics[key] = $ctx(Function.call, [][key], length);\n });\n};\nsetStatics('pop,reverse,shift,keys,values,entries', 1);\nsetStatics('indexOf,every,some,forEach,map,filter,find,findIndex,includes', 3);\nsetStatics('join,slice,concat,push,splice,unshift,sort,lastIndexOf,' +\n 'reduce,reduceRight,copyWithin,fill');\n$export($export.S, 'Array', statics);\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/js.array.statics.js\n ** module id = 185\n ** module chunks = 0\n **/","// ie9- setTimeout & setInterval additional parameters fix\nvar global = require('./$.global')\n , $export = require('./$.export')\n , invoke = require('./$.invoke')\n , partial = require('./$.partial')\n , navigator = global.navigator\n , MSIE = !!navigator && /MSIE .\\./.test(navigator.userAgent); // <- dirty ie9- check\nvar wrap = function(set){\n return MSIE ? function(fn, time /*, ...args */){\n return set(invoke(\n partial,\n [].slice.call(arguments, 2),\n typeof fn == 'function' ? fn : Function(fn)\n ), time);\n } : set;\n};\n$export($export.G + $export.B + $export.F * MSIE, {\n setTimeout: wrap(global.setTimeout),\n setInterval: wrap(global.setInterval)\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/web.timers.js\n ** module id = 186\n ** module chunks = 0\n **/","'use strict';\nvar path = require('./$.path')\n , invoke = require('./$.invoke')\n , aFunction = require('./$.a-function');\nmodule.exports = function(/* ...pargs */){\n var fn = aFunction(this)\n , length = arguments.length\n , pargs = Array(length)\n , i = 0\n , _ = path._\n , holder = false;\n while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true;\n return function(/* ...args */){\n var that = this\n , $$ = arguments\n , $$len = $$.length\n , j = 0, k = 0, args;\n if(!holder && !$$len)return invoke(fn, pargs, that);\n args = pargs.slice();\n if(holder)for(;length > j; j++)if(args[j] === _)args[j] = $$[k++];\n while($$len > k)args.push($$[k++]);\n return invoke(fn, args, that);\n };\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.partial.js\n ** module id = 187\n ** module chunks = 0\n **/","module.exports = require('./$.global');\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/$.path.js\n ** module id = 188\n ** module chunks = 0\n **/","var $export = require('./$.export')\n , $task = require('./$.task');\n$export($export.G + $export.B, {\n setImmediate: $task.set,\n clearImmediate: $task.clear\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/web.immediate.js\n ** module id = 189\n ** module chunks = 0\n **/","require('./es6.array.iterator');\nvar global = require('./$.global')\n , hide = require('./$.hide')\n , Iterators = require('./$.iterators')\n , ITERATOR = require('./$.wks')('iterator')\n , NL = global.NodeList\n , HTC = global.HTMLCollection\n , NLProto = NL && NL.prototype\n , HTCProto = HTC && HTC.prototype\n , ArrayValues = Iterators.NodeList = Iterators.HTMLCollection = Iterators.Array;\nif(NLProto && !NLProto[ITERATOR])hide(NLProto, ITERATOR, ArrayValues);\nif(HTCProto && !HTCProto[ITERATOR])hide(HTCProto, ITERATOR, ArrayValues);\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/modules/web.dom.iterable.js\n ** module id = 190\n ** module chunks = 0\n **/","/**\n * Copyright (c) 2014, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * https://raw.github.com/facebook/regenerator/master/LICENSE file. An\n * additional grant of patent rights can be found in the PATENTS file in\n * the same directory.\n */\n\n!(function(global) {\n \"use strict\";\n\n var hasOwn = Object.prototype.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var iteratorSymbol =\n typeof Symbol === \"function\" && Symbol.iterator || \"@@iterator\";\n\n var inModule = typeof module === \"object\";\n var runtime = global.regeneratorRuntime;\n if (runtime) {\n if (inModule) {\n // If regeneratorRuntime is defined globally and we're in a module,\n // make the exports object identical to regeneratorRuntime.\n module.exports = runtime;\n }\n // Don't bother evaluating the rest of this file if the runtime was\n // already defined globally.\n return;\n }\n\n // Define the runtime globally (as expected by generated code) as either\n // module.exports (if we're in a module) or a new, empty object.\n runtime = global.regeneratorRuntime = inModule ? module.exports : {};\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided, then outerFn.prototype instanceof Generator.\n var generator = Object.create((outerFn || Generator).prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n runtime.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype;\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunction.displayName = \"GeneratorFunction\";\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n prototype[method] = function(arg) {\n return this._invoke(method, arg);\n };\n });\n }\n\n runtime.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n runtime.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `value instanceof AwaitArgument` to determine if the yielded value is\n // meant to be awaited. Some may consider the name of this method too\n // cutesy, but they are curmudgeons.\n runtime.awrap = function(arg) {\n return new AwaitArgument(arg);\n };\n\n function AwaitArgument(arg) {\n this.arg = arg;\n }\n\n function AsyncIterator(generator) {\n // This invoke function is written in a style that assumes some\n // calling function (or Promise) will handle exceptions.\n function invoke(method, arg) {\n var result = generator[method](arg);\n var value = result.value;\n return value instanceof AwaitArgument\n ? Promise.resolve(value.arg).then(invokeNext, invokeThrow)\n : Promise.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration. If the Promise is rejected, however, the\n // result for this iteration will be rejected with the same\n // reason. Note that rejections of yielded Promises are not\n // thrown back into the generator function, as is the case\n // when an awaited Promise is rejected. This difference in\n // behavior between yield and await is important, because it\n // allows the consumer to decide what to do with the yielded\n // rejection (swallow it and continue, manually .throw it back\n // into the generator, abandon iteration, whatever). With\n // await, by contrast, there is no opportunity to examine the\n // rejection reason outside the generator function, so the\n // only option is to throw it from the await expression, and\n // let the generator function handle the exception.\n result.value = unwrapped;\n return result;\n });\n }\n\n if (typeof process === \"object\" && process.domain) {\n invoke = process.domain.bind(invoke);\n }\n\n var invokeNext = invoke.bind(generator, \"next\");\n var invokeThrow = invoke.bind(generator, \"throw\");\n var invokeReturn = invoke.bind(generator, \"return\");\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return invoke(method, arg);\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : new Promise(function (resolve) {\n resolve(callInvokeWithMethodAndArg());\n });\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n runtime.async = function(innerFn, outerFn, self, tryLocsList) {\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList)\n );\n\n return runtime.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n if (method === \"return\" ||\n (method === \"throw\" && delegate.iterator[method] === undefined)) {\n // A return or throw (when the delegate iterator has no throw\n // method) always terminates the yield* loop.\n context.delegate = null;\n\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n var returnMethod = delegate.iterator[\"return\"];\n if (returnMethod) {\n var record = tryCatch(returnMethod, delegate.iterator, arg);\n if (record.type === \"throw\") {\n // If the return method threw an exception, let that\n // exception prevail over the original return or throw.\n method = \"throw\";\n arg = record.arg;\n continue;\n }\n }\n\n if (method === \"return\") {\n // Continue with the outer return, now that the delegate\n // iterator has been terminated.\n continue;\n }\n }\n\n var record = tryCatch(\n delegate.iterator[method],\n delegate.iterator,\n arg\n );\n\n if (record.type === \"throw\") {\n context.delegate = null;\n\n // Like returning generator.throw(uncaught), but without the\n // overhead of an extra function call.\n method = \"throw\";\n arg = record.arg;\n continue;\n }\n\n // Delegate generator ran and handled its own exceptions so\n // regardless of what the method was, we continue as if it is\n // \"next\" with an undefined arg.\n method = \"next\";\n arg = undefined;\n\n var info = record.arg;\n if (info.done) {\n context[delegate.resultName] = info.value;\n context.next = delegate.nextLoc;\n } else {\n state = GenStateSuspendedYield;\n return info;\n }\n\n context.delegate = null;\n }\n\n if (method === \"next\") {\n context._sent = arg;\n\n if (state === GenStateSuspendedYield) {\n context.sent = arg;\n } else {\n context.sent = undefined;\n }\n } else if (method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw arg;\n }\n\n if (context.dispatchException(arg)) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n method = \"next\";\n arg = undefined;\n }\n\n } else if (method === \"return\") {\n context.abrupt(\"return\", arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n var info = {\n value: record.arg,\n done: context.done\n };\n\n if (record.arg === ContinueSentinel) {\n if (context.delegate && method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n arg = undefined;\n }\n } else {\n return info;\n }\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(arg) call above.\n method = \"throw\";\n arg = record.arg;\n }\n }\n };\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n runtime.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n runtime.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n this.sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n return !!caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.next = finallyEntry.finallyLoc;\n } else {\n this.complete(record);\n }\n\n return ContinueSentinel;\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = record.arg;\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n return ContinueSentinel;\n }\n };\n})(\n // Among the various tricks for obtaining a reference to the global\n // object, this seems to be the most reliable technique that does not\n // use indirect eval (which violates Content Security Policy).\n typeof global === \"object\" ? global :\n typeof window === \"object\" ? window :\n typeof self === \"object\" ? self : this\n);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-regenerator-runtime/runtime.js\n ** module id = 191\n ** module chunks = 0\n **/","// shim for using process in browser\n\nvar process = module.exports = {};\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = setTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n clearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n setTimeout(drainQueue, 0);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/process/browser.js\n ** module id = 192\n ** module chunks = 0\n **/","import toastr from './toastr';\nimport { config } from 'grav-config';\n\nlet error = function(response) {\n let error = new Error(response.statusText || response || '');\n error.response = response;\n\n return error;\n};\n\nexport function parseStatus(response) {\n if (response.status >= 200 && response.status < 300) {\n return response;\n } else {\n throw error(response);\n }\n}\n\nexport function parseJSON(response) {\n return response.json();\n}\n\nexport function userFeedback(response) {\n let status = response.status;\n let message = response.message || null;\n let settings = response.toastr || null;\n let backup;\n\n switch (status) {\n case 'unauthenticated':\n document.location.href = config.base_url_relative;\n throw error('Logged out');\n case 'unauthorized':\n status = 'error';\n message = message || 'Unauthorized.';\n break;\n case 'error':\n status = 'error';\n message = message || 'Unknown error.';\n break;\n case 'success':\n status = 'success';\n message = message || '';\n break;\n default:\n status = 'error';\n message = message || 'Invalid AJAX response.';\n break;\n }\n\n if (settings) {\n backup = Object.assign({}, toastr.options);\n Object.keys(settings).forEach((key) => toastr.options[key] = settings[key]);\n }\n\n if (message) { toastr[status === 'success' ? 'success' : 'error'](message); }\n\n if (settings) {\n toastr.options = backup;\n }\n\n return response;\n}\n\nexport function userFeedbackError(error) {\n toastr.error(`Fetch Failed:
${error.message}
${error.stack}`);\n console.error(`${error.message} at ${error.stack}`);\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/utils/response.js\n **/","import toastr from 'toastr';\n\ntoastr.options.positionClass = 'toast-top-right';\ntoastr.options.preventDuplicates = true;\n\nexport default toastr;\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/utils/toastr.js\n **/","module.exports = GravAdmin;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external \"GravAdmin\"\n ** module id = 198\n ** module chunks = 0\n **/","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nfunction EventEmitter() {\n this._events = this._events || {};\n this._maxListeners = this._maxListeners || undefined;\n}\nmodule.exports = EventEmitter;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nEventEmitter.defaultMaxListeners = 10;\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function(n) {\n if (!isNumber(n) || n < 0 || isNaN(n))\n throw TypeError('n must be a positive number');\n this._maxListeners = n;\n return this;\n};\n\nEventEmitter.prototype.emit = function(type) {\n var er, handler, len, args, i, listeners;\n\n if (!this._events)\n this._events = {};\n\n // If there is no 'error' event listener then throw.\n if (type === 'error') {\n if (!this._events.error ||\n (isObject(this._events.error) && !this._events.error.length)) {\n er = arguments[1];\n if (er instanceof Error) {\n throw er; // Unhandled 'error' event\n }\n throw TypeError('Uncaught, unspecified \"error\" event.');\n }\n }\n\n handler = this._events[type];\n\n if (isUndefined(handler))\n return false;\n\n if (isFunction(handler)) {\n switch (arguments.length) {\n // fast cases\n case 1:\n handler.call(this);\n break;\n case 2:\n handler.call(this, arguments[1]);\n break;\n case 3:\n handler.call(this, arguments[1], arguments[2]);\n break;\n // slower\n default:\n args = Array.prototype.slice.call(arguments, 1);\n handler.apply(this, args);\n }\n } else if (isObject(handler)) {\n args = Array.prototype.slice.call(arguments, 1);\n listeners = handler.slice();\n len = listeners.length;\n for (i = 0; i < len; i++)\n listeners[i].apply(this, args);\n }\n\n return true;\n};\n\nEventEmitter.prototype.addListener = function(type, listener) {\n var m;\n\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n if (!this._events)\n this._events = {};\n\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (this._events.newListener)\n this.emit('newListener', type,\n isFunction(listener.listener) ?\n listener.listener : listener);\n\n if (!this._events[type])\n // Optimize the case of one listener. Don't need the extra array object.\n this._events[type] = listener;\n else if (isObject(this._events[type]))\n // If we've already got an array, just append.\n this._events[type].push(listener);\n else\n // Adding the second element, need to change to array.\n this._events[type] = [this._events[type], listener];\n\n // Check for listener leak\n if (isObject(this._events[type]) && !this._events[type].warned) {\n if (!isUndefined(this._maxListeners)) {\n m = this._maxListeners;\n } else {\n m = EventEmitter.defaultMaxListeners;\n }\n\n if (m && m > 0 && this._events[type].length > m) {\n this._events[type].warned = true;\n console.error('(node) warning: possible EventEmitter memory ' +\n 'leak detected. %d listeners added. ' +\n 'Use emitter.setMaxListeners() to increase limit.',\n this._events[type].length);\n if (typeof console.trace === 'function') {\n // not supported in IE 10\n console.trace();\n }\n }\n }\n\n return this;\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.once = function(type, listener) {\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n var fired = false;\n\n function g() {\n this.removeListener(type, g);\n\n if (!fired) {\n fired = true;\n listener.apply(this, arguments);\n }\n }\n\n g.listener = listener;\n this.on(type, g);\n\n return this;\n};\n\n// emits a 'removeListener' event iff the listener was removed\nEventEmitter.prototype.removeListener = function(type, listener) {\n var list, position, length, i;\n\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n if (!this._events || !this._events[type])\n return this;\n\n list = this._events[type];\n length = list.length;\n position = -1;\n\n if (list === listener ||\n (isFunction(list.listener) && list.listener === listener)) {\n delete this._events[type];\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n\n } else if (isObject(list)) {\n for (i = length; i-- > 0;) {\n if (list[i] === listener ||\n (list[i].listener && list[i].listener === listener)) {\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (list.length === 1) {\n list.length = 0;\n delete this._events[type];\n } else {\n list.splice(position, 1);\n }\n\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n }\n\n return this;\n};\n\nEventEmitter.prototype.removeAllListeners = function(type) {\n var key, listeners;\n\n if (!this._events)\n return this;\n\n // not listening for removeListener, no need to emit\n if (!this._events.removeListener) {\n if (arguments.length === 0)\n this._events = {};\n else if (this._events[type])\n delete this._events[type];\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n for (key in this._events) {\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = {};\n return this;\n }\n\n listeners = this._events[type];\n\n if (isFunction(listeners)) {\n this.removeListener(type, listeners);\n } else if (listeners) {\n // LIFO order\n while (listeners.length)\n this.removeListener(type, listeners[listeners.length - 1]);\n }\n delete this._events[type];\n\n return this;\n};\n\nEventEmitter.prototype.listeners = function(type) {\n var ret;\n if (!this._events || !this._events[type])\n ret = [];\n else if (isFunction(this._events[type]))\n ret = [this._events[type]];\n else\n ret = this._events[type].slice();\n return ret;\n};\n\nEventEmitter.prototype.listenerCount = function(type) {\n if (this._events) {\n var evlistener = this._events[type];\n\n if (isFunction(evlistener))\n return 1;\n else if (evlistener)\n return evlistener.length;\n }\n return 0;\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n return emitter.listenerCount(type);\n};\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/events/events.js\n ** module id = 199\n ** module chunks = 0\n **/","import { config } from 'grav-config';\nimport { userFeedbackError } from './response';\n\nclass KeepAlive {\n constructor() {\n this.active = false;\n }\n\n start() {\n let timeout = config.admin_timeout / 1.5 * 1000;\n this.timer = setInterval(() => this.fetch(), timeout);\n this.active = true;\n }\n\n stop() {\n clearInterval(this.timer);\n this.active = false;\n }\n\n fetch() {\n let data = new FormData();\n data.append('admin-nonce', config.admin_nonce);\n\n fetch(`${config.base_url_relative}/task${config.param_sep}keepAlive`, {\n credentials: 'same-origin',\n method: 'post',\n body: data\n }).catch(userFeedbackError);\n }\n}\n\nexport default new KeepAlive();\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/utils/keepalive.js\n **/","import $ from 'jquery';\nimport { config, translations } from 'grav-config';\nimport formatBytes from '../utils/formatbytes';\nimport { Instance as gpm } from '../utils/gpm';\nimport './check';\nimport './update';\n\nexport default class Updates {\n constructor(payload = {}) {\n this.setPayload(payload);\n this.task = `task${config.param_sep}`;\n }\n\n setPayload(payload = {}) {\n this.payload = payload;\n\n return this;\n }\n\n fetch(force = false) {\n gpm.fetch((response) => this.setPayload(response), force);\n\n return this;\n }\n\n maintenance(mode = 'hide') {\n let element = $('#updates [data-maintenance-update]');\n\n element[mode === 'show' ? 'fadeIn' : 'fadeOut']();\n\n if (mode === 'hide') {\n $('.badges.with-updates').removeClass('with-updates').find('.badge.updates').remove();\n }\n\n return this;\n }\n\n grav() {\n let payload = this.payload.grav;\n\n if (payload.isUpdatable) {\n let task = this.task;\n let bar = `\n
\n Grav
v${payload.available} ${translations.PLUGIN_ADMIN.IS_NOW_AVAILABLE}!
(${translations.PLUGIN_ADMIN.CURRENT}v${payload.version}) \n `;\n\n if (!payload.isSymlink) {\n bar += `
${translations.PLUGIN_ADMIN.UPDATE_GRAV_NOW} `;\n } else {\n bar += `
`;\n }\n\n $('[data-gpm-grav]').addClass('grav').html(`
${bar}
`);\n }\n\n $('#grav-update-button').on('click', function() {\n $(this).html(`${translations.PLUGIN_ADMIN.UPDATING_PLEASE_WAIT} ${formatBytes(payload.assets['grav-update'].size)}..`);\n });\n\n return this;\n }\n\n resources() {\n if (!this.payload.resources.total) { return this.maintenance('hide'); }\n\n let map = ['plugins', 'themes'];\n let singles = ['plugin', 'theme'];\n let task = this.task;\n let { plugins, themes } = this.payload.resources;\n\n if (!this.payload.resources.total) { return this; }\n\n [plugins, themes].forEach(function(resources, index) {\n if (!resources || Array.isArray(resources)) { return; }\n let length = Object.keys(resources).length;\n let type = map[index];\n\n // sidebar\n $(`#admin-menu a[href$=\"/${map[index]}\"]`)\n .find('.badges')\n .addClass('with-updates')\n .find('.badge.updates').text(length);\n\n // update all\n let title = type.charAt(0).toUpperCase() + type.substr(1).toLowerCase();\n let updateAll = $(`.grav-update.${type}`);\n updateAll.html(`\n
\n \n ${length} ${translations.PLUGIN_ADMIN.OF_YOUR} ${type} ${translations.PLUGIN_ADMIN.HAVE_AN_UPDATE_AVAILABLE}\n ${translations.PLUGIN_ADMIN.UPDATE} All ${title} \n
\n `);\n\n Object.keys(resources).forEach(function(item) {\n // listing page\n let element = $(`[data-gpm-${singles[index]}=\"${item}\"] .gpm-name`);\n let url = element.find('a');\n\n if (type === 'plugins' && !element.find('.badge.update').length) {\n element.append(`
${translations.PLUGIN_ADMIN.UPDATE_AVAILABLE}! `);\n } else if (type === 'themes') {\n element.append(`
`);\n }\n\n // details page\n let details = $(`.grav-update.${singles[index]}`);\n if (details.length) {\n details.html(`\n
\n \n v${resources[item].available} ${translations.PLUGIN_ADMIN.OF_THIS} ${singles[index]} ${translations.PLUGIN_ADMIN.IS_NOW_AVAILABLE}!\n ${translations.PLUGIN_ADMIN.UPDATE} ${singles[index].charAt(0).toUpperCase() + singles[index].substr(1).toLowerCase()} \n
\n `);\n }\n });\n });\n }\n}\n\nlet Instance = new Updates();\nexport { Instance };\n\n// automatically refresh UI for updates (graph, sidebar, plugin/themes pages) after every fetch\ngpm.on('fetched', (response, raw) => {\n Instance.setPayload(response.payload || {});\n Instance.grav().resources();\n});\n\nif (config.enable_auto_updates_check === '1') {\n gpm.fetch();\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/updates/index.js\n **/","const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n\nexport default function formatBytes(bytes, decimals) {\n if (bytes === 0) return '0 Byte';\n\n let k = 1000;\n let value = Math.floor(Math.log(bytes) / Math.log(k));\n let decimal = decimals + 1 || 3;\n\n return (bytes / Math.pow(k, value)).toPrecision(decimal) + ' ' + sizes[value];\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/utils/formatbytes.js\n **/","import $ from 'jquery';\nimport { Instance as gpm } from '../utils/gpm';\nimport { translations } from 'grav-config';\nimport toastr from '../utils/toastr';\n\n// Check for updates trigger\n$('[data-gpm-checkupdates]').on('click', function() {\n let element = $(this);\n element.find('i').addClass('fa-spin');\n\n gpm.fetch((response) => {\n element.find('i').removeClass('fa-spin');\n let payload = response.payload;\n\n if (!payload) { return; }\n if (!payload.grav.isUpdatable && !payload.resources.total) {\n toastr.success(translations.PLUGIN_ADMIN.EVERYTHING_UP_TO_DATE);\n } else {\n var grav = payload.grav.isUpdatable ? 'Grav v' + payload.grav.available : '';\n var resources = payload.resources.total ? payload.resources.total + ' ' + translations.PLUGIN_ADMIN.UPDATES_ARE_AVAILABLE : '';\n\n if (!resources) { grav += ' ' + translations.PLUGIN_ADMIN.IS_AVAILABLE_FOR_UPDATE; }\n toastr.info(grav + (grav && resources ? ' ' + translations.PLUGIN_ADMIN.AND + ' ' : '') + resources);\n }\n }, true);\n});\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/updates/check.js\n **/","import $ from 'jquery';\nimport request from '../utils/request';\n\n// Dashboard update and Grav update\n$('body').on('click', '[data-maintenance-update]', function() {\n let element = $(this);\n let url = element.data('maintenanceUpdate');\n\n element.attr('disabled', 'disabled').find('> .fa').removeClass('fa-cloud-download').addClass('fa-refresh fa-spin');\n\n request(url, (response) => {\n if (response.type === 'updategrav') {\n $('[data-gpm-grav]').remove();\n $('#footer .grav-version').html(response.version);\n }\n\n element.removeAttr('disabled').find('> .fa').removeClass('fa-refresh fa-spin').addClass('fa-cloud-download');\n });\n});\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/updates/update.js\n **/","import { parseStatus, parseJSON, userFeedback, userFeedbackError } from './response';\nimport { config } from 'grav-config';\n\nlet raw;\nlet request = function(url, options = {}, callback = () => true) {\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n\n if (options.method && options.method === 'post' && options.body) {\n let data = new FormData();\n\n options.body = Object.assign({ 'admin-nonce': config.admin_nonce }, options.body);\n Object.keys(options.body).map((key) => data.append(key, options.body[key]));\n options.body = data;\n }\n\n options = Object.assign({\n credentials: 'same-origin',\n headers: {\n 'Accept': 'application/json'\n }\n }, options);\n\n return fetch(url, options)\n .then((response) => {\n raw = response;\n return response;\n })\n .then(parseStatus)\n .then(parseJSON)\n .then(userFeedback)\n .then((response) => callback(response, raw))\n .catch(userFeedbackError);\n};\n\nexport default request;\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/utils/request.js\n **/","import Chart, { UpdatesChart, Instances } from './chart';\nimport { Instance as Cache } from './cache';\nimport './backup';\n\nexport default {\n Chart: {\n Chart,\n UpdatesChart,\n Instances\n },\n Cache\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/dashboard/index.js\n **/","import $ from 'jquery';\nimport chartist from 'chartist';\nimport { translations } from 'grav-config';\nimport { Instance as gpm } from '../utils/gpm';\nimport { Instance as updates } from '../updates';\n\nlet isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;\n\nexport const defaults = {\n data: {\n series: [100, 0]\n },\n options: {\n Pie: {\n donut: true,\n donutWidth: 10,\n startAngle: 0,\n total: 100,\n showLabel: false,\n height: 150,\n chartPadding: !isFirefox ? 10 : 25\n },\n Bar: {\n height: 164,\n chartPadding: !isFirefox ? 5 : 25,\n\n axisX: {\n showGrid: false,\n labelOffset: {\n x: 0,\n y: 5\n }\n },\n axisY: {\n offset: 15,\n showLabel: true,\n showGrid: true,\n labelOffset: {\n x: 5,\n y: 5\n },\n scaleMinSpace: 20\n }\n }\n }\n};\n\nexport default class Chart {\n constructor(element, options = {}, data = {}) {\n this.element = $(element) || [];\n if (!this.element[0]) { return; }\n\n let type = (this.element.data('chart-type') || 'pie').toLowerCase();\n this.type = type.charAt(0).toUpperCase() + type.substr(1).toLowerCase();\n\n options = Object.assign({}, defaults.options[this.type], options);\n data = Object.assign({}, defaults.data, data);\n Object.assign(this, {\n options,\n data\n });\n this.chart = chartist[this.type](this.element.find('.ct-chart')[0], this.data, this.options);\n }\n\n updateData(data) {\n Object.assign(this.data, data);\n this.chart.update(this.data);\n }\n};\n\nexport class UpdatesChart extends Chart {\n constructor(element, options = {}, data = {}) {\n super(element, options, data);\n\n this.chart.on('draw', (data) => this.draw(data));\n\n gpm.on('fetched', (response) => {\n let payload = response.payload.grav;\n let missing = (response.payload.resources.total + (payload.isUpdatable ? 1 : 0)) * 100 / (response.payload.installed + (payload.isUpdatable ? 1 : 0));\n let updated = 100 - missing;\n\n this.updateData({ series: [updated, missing] });\n\n if (response.payload.resources.total) {\n updates.maintenance('show');\n }\n });\n }\n\n draw(data) {\n if (data.index) { return; }\n\n let notice = translations.PLUGIN_ADMIN[data.value === 100 ? 'FULLY_UPDATED' : 'UPDATES_AVAILABLE'];\n this.element.find('.numeric span').text(`${Math.round(data.value)}%`);\n this.element.find('.js__updates-available-description').html(notice);\n this.element.find('.hidden').removeClass('hidden');\n }\n\n updateData(data) {\n super.updateData(data);\n\n // missing updates\n if (this.data.series[0] < 100) {\n this.element.closest('#updates').find('[data-maintenance-update]').fadeIn();\n }\n }\n}\n\nlet charts = {};\n\n$('[data-chart-name]').each(function() {\n let element = $(this);\n let name = element.data('chart-name') || '';\n let options = element.data('chart-options') || {};\n let data = element.data('chart-data') || {};\n\n if (name === 'updates') {\n charts[name] = new UpdatesChart(element, options, data);\n } else {\n charts[name] = new Chart(element, options, data);\n }\n});\n\nexport let Instances = charts;\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/dashboard/chart.js\n **/","import $ from 'jquery';\nimport { config } from 'grav-config';\nimport request from '../utils/request';\n\nconst getUrl = (type = '') => {\n if (type) {\n type = `cleartype:${type}/`;\n }\n\n return `${config.base_url_relative}/cache.json/task:clearCache/${type}admin-nonce:${config.admin_nonce}`;\n};\n\nexport default class Cache {\n constructor() {\n this.element = $('[data-clear-cache]');\n $('body').on('click', '[data-clear-cache]', (event) => this.clear(event, event.target));\n }\n\n clear(event, element) {\n let type = '';\n\n if (event && event.preventDefault) { event.preventDefault(); }\n if (typeof event === 'string') { type = event; }\n\n element = element ? $(element) : $(`[data-clear-cache-type=\"${type}\"]`);\n type = type || $(element).data('clear-cache-type') || '';\n let url = element.data('clearCache') || getUrl(event);\n\n this.disable();\n\n request(url, () => this.enable());\n }\n\n enable() {\n this.element\n .removeAttr('disabled')\n .find('> .fa').removeClass('fa-refresh fa-spin').addClass('fa-trash');\n }\n\n disable() {\n this.element\n .attr('disabled', 'disabled')\n .find('> .fa').removeClass('fa-trash').addClass('fa-refresh fa-spin');\n }\n}\n\nlet Instance = new Cache();\n\nexport { Instance };\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/dashboard/cache.js\n **/","import $ from 'jquery';\nimport { translations } from 'grav-config';\nimport request from '../utils/request';\nimport { Instances as Charts } from './chart';\n\n$('[data-ajax*=\"task:backup\"]').on('click', function() {\n let element = $(this);\n let url = element.data('ajax');\n\n element\n .attr('disabled', 'disabled')\n .find('> .fa').removeClass('fa-database').addClass('fa-spin fa-refresh');\n\n request(url, (/* response */) => {\n if (Charts && Charts.backups) {\n Charts.backups.updateData({ series: [0, 100] });\n Charts.backups.element.find('.numeric').html(`0
${translations.PLUGIN_ADMIN.DAYS.toLowerCase()} `);\n }\n\n element\n .removeAttr('disabled')\n .find('> .fa').removeClass('fa-spin fa-refresh').addClass('fa-database');\n });\n});\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/dashboard/backup.js\n **/","import $ from 'jquery';\nimport Sortable from 'sortablejs';\nimport PageFilters, { Instance as PageFiltersInstance } from './filter';\nimport './page';\n\n// Pages Ordering\nlet Ordering = null;\nlet orderingElement = $('#ordering');\nif (orderingElement.length) {\n Ordering = new Sortable(orderingElement.get(0), {\n filter: '.ignore',\n onUpdate: function(event) {\n let item = $(event.item);\n let index = orderingElement.children().index(item) + 1;\n $('[data-order]').val(index);\n }\n });\n}\n\nexport default {\n Ordering,\n PageFilters: {\n PageFilters,\n Instance: PageFiltersInstance\n }\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/pages/index.js\n **/","import $ from 'jquery';\nimport { config } from 'grav-config';\nimport request from '../utils/request';\nimport debounce from 'debounce';\nimport { Instance as pagesTree } from './tree';\nimport 'selectize';\n\n/* @formatter:off */\n/* eslint-disable */\nconst options = [\n { flag: 'Modular', key: 'Modular', cat: 'mode' },\n { flag: 'Visible', key: 'Visible', cat: 'mode' },\n { flag: 'Routable', key: 'Routable', cat: 'mode' },\n { flag: 'Published', key: 'Published', cat: 'mode' },\n { flag: 'Non-Modular', key: 'NonModular', cat: 'mode' },\n { flag: 'Non-Visible', key: 'NonVisible', cat: 'mode' },\n { flag: 'Non-Routable', key: 'NonRoutable', cat: 'mode' },\n { flag: 'Non-Published', key: 'NonPublished', cat: 'mode' }\n];\n/* @formatter:on */\n/* eslint-enable */\n\nexport default class PagesFilter {\n constructor(filters, search) {\n this.filters = $(filters);\n this.search = $(search);\n this.options = options;\n this.tree = pagesTree;\n\n if (!this.filters.length || !this.search.length) { return; }\n\n this.labels = this.filters.data('filter-labels');\n\n this.search.on('input', debounce(() => this.filter(), 250));\n this.filters.on('change', () => this.filter());\n\n this._initSelectize();\n }\n\n filter(value) {\n let data = { flags: '', query: '' };\n\n if (typeof value === 'object') {\n Object.assign(data, value);\n }\n if (typeof value === 'string') {\n data.query = value;\n }\n if (typeof value === 'undefined') {\n data.flags = this.filters.val();\n data.query = this.search.val();\n }\n\n if (!Object.keys(data).filter((key) => data[key] !== '').length) {\n this.resetValues();\n return;\n }\n\n data.flags = data.flags.replace(/(\\s{1,})?,(\\s{1,})?/g, ',');\n this.setValues({ flags: data.flags, query: data.query }, 'silent');\n\n request(`${config.base_url_relative}/pages-filter.json/task${config.param_sep}filterPages`, {\n method: 'post',\n body: data\n }, (response) => {\n this.refreshDOM(response);\n });\n }\n\n refreshDOM(response) {\n let items = $('[data-nav-id]');\n\n if (!response) {\n items.removeClass('search-match').show();\n this.tree.restore();\n\n return;\n }\n\n items.removeClass('search-match').hide();\n\n response.results.forEach((page) => {\n let match = items.filter(`[data-nav-id=\"${page}\"]`).addClass('search-match').show();\n match.parents('[data-nav-id]').addClass('search-match').show();\n\n this.tree.expand(page, 'no-store');\n });\n }\n\n setValues({ flags = '', query = ''}, silent) {\n let flagsArray = flags.replace(/(\\s{1,})?,(\\s{1,})?/g, ',').split(',');\n if (this.filters.val() !== flags) { this.filters[0].selectize.setValue(flagsArray, silent); }\n if (this.search.val() !== query) { this.search.val(query); }\n }\n\n resetValues() {\n this.setValues('', 'silent');\n this.refreshDOM();\n }\n\n _initSelectize() {\n let extras = {\n type: this.filters.data('filter-types') || {},\n access: this.filters.data('filter-access-levels') || {}\n };\n\n Object.keys(extras).forEach((cat) => {\n Object.keys(extras[cat]).forEach((key) => {\n this.options.push({\n cat,\n key,\n flag: extras[cat][key]\n });\n });\n });\n\n this.filters.selectize({\n maxItems: null,\n valueField: 'key',\n labelField: 'flag',\n searchField: ['flag', 'key'],\n options: this.options,\n optgroups: this.labels,\n optgroupField: 'cat',\n optgroupLabelField: 'name',\n optgroupValueField: 'id',\n optgroupOrder: this.labels.map((item) => item.id),\n plugins: ['optgroup_columns']\n });\n }\n}\n\nlet Instance = new PagesFilter('input[name=\"page-filter\"]', 'input[name=\"page-search\"]');\nexport { Instance };\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/pages/filter.js\n **/","\n/**\n * Module dependencies.\n */\n\nvar now = require('date-now');\n\n/**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * N milliseconds. If `immediate` is passed, trigger the function on the\n * leading edge, instead of the trailing.\n *\n * @source underscore.js\n * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/\n * @param {Function} function to wrap\n * @param {Number} timeout in ms (`100`)\n * @param {Boolean} whether to execute at the beginning (`false`)\n * @api public\n */\n\nmodule.exports = function debounce(func, wait, immediate){\n var timeout, args, context, timestamp, result;\n if (null == wait) wait = 100;\n\n function later() {\n var last = now() - timestamp;\n\n if (last < wait && last > 0) {\n timeout = setTimeout(later, wait - last);\n } else {\n timeout = null;\n if (!immediate) {\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n }\n }\n };\n\n return function debounced() {\n context = this;\n args = arguments;\n timestamp = now();\n var callNow = immediate && !timeout;\n if (!timeout) timeout = setTimeout(later, wait);\n if (callNow) {\n result = func.apply(context, args);\n context = args = null;\n }\n\n return result;\n };\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/debounce/index.js\n ** module id = 214\n ** module chunks = 0\n **/","module.exports = Date.now || now\n\nfunction now() {\n return new Date().getTime()\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/date-now/index.js\n ** module id = 215\n ** module chunks = 0\n **/","import $ from 'jquery';\n\nconst sessionKey = 'grav:admin:pages';\n\nif (!sessionStorage.getItem(sessionKey)) {\n sessionStorage.setItem(sessionKey, '{}');\n}\n\nexport default class PagesTree {\n constructor(elements) {\n this.elements = $(elements);\n this.session = JSON.parse(sessionStorage.getItem(sessionKey));\n\n if (!this.elements.length) { return; }\n\n this.restore();\n\n this.elements.find('.page-icon').on('click', (event) => this.toggle(event.target));\n\n $('[data-page-toggleall]').on('click', (event) => {\n let element = $(event.target).closest('[data-page-toggleall]');\n let action = element.data('page-toggleall');\n\n this[action]();\n });\n }\n\n toggle(elements, dontStore = false) {\n if (typeof elements === 'string') {\n elements = $(`[data-nav-id=\"${elements}\"]`).find('[data-toggle=\"children\"]');\n }\n\n elements = $(elements || this.elements);\n elements.each((index, element) => {\n element = $(element);\n let state = this.getState(element.closest('[data-toggle=\"children\"]'));\n this[state.isOpen ? 'collapse' : 'expand'](state.id, dontStore);\n });\n }\n\n collapse(elements, dontStore = false) {\n if (typeof elements === 'string') {\n elements = $(`[data-nav-id=\"${elements}\"]`).find('[data-toggle=\"children\"]');\n }\n\n elements = $(elements || this.elements);\n elements.each((index, element) => {\n element = $(element);\n let state = this.getState(element);\n\n if (state.isOpen) {\n state.children.hide();\n state.icon.removeClass('children-open').addClass('children-closed');\n if (!dontStore) { delete this.session[state.id]; }\n }\n });\n\n if (!dontStore) { this.save(); }\n }\n\n expand(elements, dontStore = false) {\n if (typeof elements === 'string') {\n let element = $(`[data-nav-id=\"${elements}\"]`);\n let parents = element.parents('[data-nav-id]');\n\n // loop back through parents, we don't want to expand an hidden child\n if (parents.length) {\n parents = parents.find('[data-toggle=\"children\"]:first');\n parents = parents.add(element.find('[data-toggle=\"children\"]:first'));\n return this.expand(parents, dontStore);\n }\n\n elements = element.find('[data-toggle=\"children\"]:first');\n }\n\n elements = $(elements || this.elements);\n elements.each((index, element) => {\n element = $(element);\n let state = this.getState(element);\n\n if (!state.isOpen) {\n state.children.show();\n state.icon.removeClass('children-closed').addClass('children-open');\n if (!dontStore) { this.session[state.id] = 1; }\n }\n });\n\n if (!dontStore) { this.save(); }\n }\n\n restore() {\n this.collapse(null, true);\n\n Object.keys(this.session).forEach((key) => {\n this.expand(key, 'no-store');\n });\n }\n\n save() {\n return sessionStorage.setItem(sessionKey, JSON.stringify(this.session));\n }\n\n getState(element) {\n element = $(element);\n\n return {\n id: element.closest('[data-nav-id]').data('nav-id'),\n children: element.closest('li.page-item').find('ul:first'),\n icon: element.find('.page-icon'),\n get isOpen() { return this.icon.hasClass('children-open'); }\n };\n }\n}\n\nlet Instance = new PagesTree('[data-toggle=\"children\"]');\nexport { Instance };\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/pages/tree.js\n **/","import $ from 'jquery';\nimport './add';\nimport './move';\nimport './delete';\nimport './media';\n\nconst switcher = $('input[type=\"radio\"][name=\"mode-switch\"]');\n\nif (switcher) {\n let link = switcher.closest(':checked').data('leave-url');\n let fakeLink = $(`
`);\n\n switcher.parent().append(fakeLink);\n\n switcher.siblings('label').on('mousedown touchdown', (event) => {\n event.preventDefault();\n\n // let remodal = $.remodal.lookup[$('[data-remodal-id=\"changes\"]').data('remodal')];\n let confirm = $('[data-remodal-id=\"changes\"] [data-leave-action=\"continue\"]');\n\n confirm.one('click', () => {\n $(window).on('beforeunload._grav');\n fakeLink.off('click._grav');\n\n $(event.target).trigger('click');\n });\n\n fakeLink.trigger('click._grav');\n });\n\n switcher.on('change', (event) => {\n let radio = $(event.target);\n link = radio.data('leave-url');\n\n setTimeout(() => fakeLink.attr('href', link).get(0).click(), 5);\n });\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/pages/page/index.js\n **/","import $ from 'jquery';\n\nlet custom = false;\nlet folder = $('input[name=\"folder\"]');\nlet title = $('input[name=\"title\"]');\n\ntitle.on('input focus blur', () => {\n if (custom) { return true; }\n\n let slug = $.slugify(title.val());\n folder.val(slug);\n});\n\nfolder.on('input', () => {\n let input = folder.get(0);\n let value = folder.val();\n let selection = {\n start: input.selectionStart,\n end: input.selectionEnd\n };\n\n value = value.toLowerCase().replace(/\\s/g, '-').replace(/[^a-z0-9_\\-]/g, '');\n folder.val(value);\n custom = !!value;\n\n // restore cursor position\n input.setSelectionRange(selection.start, selection.end);\n\n});\n\nfolder.on('focus blur', () => title.trigger('input'));\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/pages/page/add.js\n **/","import $ from 'jquery';\n\n$('[data-page-move] button[name=\"task\"][value=\"save\"]').on('click', function() {\n let route = $('form#blueprints:first select[name=\"route\"]');\n let moveTo = $('[data-page-move] select').val();\n\n if (route.length && route.val() !== moveTo) {\n let selectize = route.data('selectize');\n route.val(moveTo);\n\n if (selectize) selectize.setValue(moveTo);\n }\n});\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/pages/page/move.js\n **/","import $ from 'jquery';\n\n$('[data-remodal-target=\"delete\"]').on('click', function() {\n let confirm = $('[data-remodal-id=\"delete\"] [data-delete-action]');\n let link = $(this).data('delete-url');\n\n confirm.data('delete-action', link);\n});\n\n$('[data-delete-action]').on('click', function() {\n let remodal = $.remodal.lookup[$('[data-remodal-id=\"delete\"]').data('remodal')];\n\n window.location.href = $(this).data('delete-action');\n remodal.close();\n});\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/pages/page/delete.js\n **/","import $ from 'jquery';\nimport Dropzone from 'dropzone';\nimport request from '../../utils/request';\nimport { config } from 'grav-config';\n\nDropzone.autoDiscover = false;\nDropzone.options.gravPageDropzone = {};\nDropzone.confirm = (question, accepted, rejected) => {\n let doc = $(document);\n let modalSelector = '[data-remodal-id=\"delete-media\"]';\n\n let removeEvents = () => {\n doc.off('confirm', modalSelector, accept);\n doc.off('cancel', modalSelector, reject);\n };\n\n let accept = () => {\n accepted && accepted();\n removeEvents();\n };\n\n let reject = () => {\n rejected && rejected();\n removeEvents();\n };\n\n $.remodal.lookup[$(modalSelector).data('remodal')].open();\n doc.on('confirmation', modalSelector, accept);\n doc.on('cancellation', modalSelector, reject);\n};\n\nconst DropzoneMediaConfig = {\n createImageThumbnails: { thumbnailWidth: 150 },\n addRemoveLinks: false,\n dictRemoveFileConfirmation: '[placeholder]',\n previewTemplate: `\n
`.trim()\n};\n\nexport default class PageMedia {\n constructor({form = '[data-media-url]', container = '#grav-dropzone', options = {}} = {}) {\n this.form = $(form);\n this.container = $(container);\n if (!this.form.length || !this.container.length) { return; }\n\n this.options = Object.assign({}, DropzoneMediaConfig, {\n url: `${this.form.data('media-url')}/task${config.param_sep}addmedia`,\n acceptedFiles: this.form.data('media-types')\n }, options);\n\n this.dropzone = new Dropzone(container, this.options);\n this.dropzone.on('complete', this.onDropzoneComplete.bind(this));\n this.dropzone.on('success', this.onDropzoneSuccess.bind(this));\n this.dropzone.on('removedfile', this.onDropzoneRemovedFile.bind(this));\n this.dropzone.on('sending', this.onDropzoneSending.bind(this));\n\n this.fetchMedia();\n }\n\n fetchMedia() {\n let url = `${this.form.data('media-url')}/task${config.param_sep}listmedia/admin-nonce${config.param_sep}${config.admin_nonce}`;\n\n request(url, (response) => {\n let results = response.results;\n\n Object.keys(results).forEach((name) => {\n let data = results[name];\n let mock = { name, size: data.size, accepted: true, extras: data };\n\n this.dropzone.files.push(mock);\n this.dropzone.options.addedfile.call(this.dropzone, mock);\n\n if (name.match(/\\.(jpg|jpeg|png|gif)$/i)) {\n this.dropzone.options.thumbnail.call(this.dropzone, mock, data.url);\n }\n });\n\n this.container.find('.dz-preview').prop('draggable', 'true');\n });\n }\n\n onDropzoneSending(file, xhr, formData) {\n formData.append('admin-nonce', config.admin_nonce);\n }\n\n onDropzoneSuccess(file, response, xhr) {\n return this.handleError({\n file,\n data: response,\n mode: 'removeFile',\n msg: `
An error occurred while trying to upload the file ${file.name}
\n
${response.message} `\n });\n }\n\n onDropzoneComplete(file) {\n if (!file.accepted) {\n let data = {\n status: 'error',\n message: `Unsupported file type: ${file.name.match(/\\..+/).join('')}`\n };\n\n return this.handleError({\n file,\n data,\n mode: 'removeFile',\n msg: `
An error occurred while trying to add the file ${file.name}
\n
${data.message} `\n });\n }\n\n // accepted\n $('.dz-preview').prop('draggable', 'true');\n }\n\n onDropzoneRemovedFile(file, ...extra) {\n if (!file.accepted || file.rejected) { return; }\n let url = `${this.form.data('media-url')}/task${config.param_sep}delmedia`;\n\n request(url, {\n method: 'post',\n body: {\n filename: file.name\n }\n }, (response) => {\n return this.handleError({\n file,\n data: response,\n mode: 'addBack',\n msg: `
An error occurred while trying to remove the file ${file.name}
\n
${response.message} `\n });\n });\n }\n\n handleError(options) {\n let { file, data, mode, msg } = options;\n if (data.status !== 'error' && data.status !== 'unauthorized') { return ; }\n\n switch (mode) {\n case 'addBack':\n if (file instanceof File) {\n this.dropzone.addFile(file);\n } else {\n this.dropzone.files.push(file);\n this.dropzone.options.addedfile.call(this, file);\n this.dropzone.options.thumbnail.call(this, file, file.extras.url);\n }\n\n break;\n case 'removeFile':\n file.rejected = true;\n this.dropzone.removeFile(file);\n\n break;\n default:\n }\n\n let modal = $('[data-remodal-id=\"generic\"]');\n modal.find('.error-content').html(msg);\n $.remodal.lookup[modal.data('remodal')].open();\n }\n}\n\nexport let Instance = new PageMedia();\n\n// let container = $('[data-media-url]');\n\n// if (container.length) {\n/* let URI = container.data('media-url');\n let dropzone = new Dropzone('#grav-dropzone', {\n url: `${URI}/task${config.param_sep}addmedia`,\n createImageThumbnails: { thumbnailWidth: 150 },\n addRemoveLinks: false,\n dictRemoveFileConfirmation: '[placeholder]',\n acceptedFiles: container.data('media-types'),\n previewTemplate: `\n
`\n });*/\n\n /* $.get(URI + '/task{{ config.system.param_sep }}listmedia/admin-nonce{{ config.system.param_sep }}' + GravAdmin.config.admin_nonce, function(data) {\n\n $.proxy(modalError, this, {\n data: data,\n msg: '
An error occurred while trying to list files
'+data.message+' '\n })();\n\n if (data.results) {\n $.each(data.results, function(filename, data){\n var mockFile = { name: filename, size: data.size, accepted: true, extras: data };\n thisDropzone.files.push(mockFile);\n thisDropzone.options.addedfile.call(thisDropzone, mockFile);\n\n if (filename.toLowerCase().match(/\\.(jpg|jpeg|png|gif)$/)) {\n thisDropzone.options.thumbnail.call(thisDropzone, mockFile, data.url);\n }\n });\n }\n\n $('.dz-preview').prop('draggable', 'true');\n });*/\n\n // console.log(dropzone);\n// }\n\n/*\n*/\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/pages/page/media.js\n **/","import FormState, { Instance as FormStateInstance } from './state';\nimport Form, { Instance as FormInstance } from './form';\n\nimport Fields from './fields';\n\nexport default {\n Form: {\n Form,\n Instance: FormInstance\n },\n Fields,\n FormState: {\n FormState,\n Instance: FormStateInstance\n }\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/forms/index.js\n **/","import $ from 'jquery';\nimport Immutable from 'immutable';\nimport '../utils/jquery-utils';\n\nlet FormLoadState = {};\n\nconst DOMBehaviors = {\n attach() {\n this.preventUnload();\n this.preventClickAway();\n },\n\n preventUnload() {\n if ($._data(window, 'events') && ($._data(window, 'events').beforeunload || []).filter((event) => event.namespace === '_grav')) {\n return;\n }\n\n // Catch browser uri change / refresh attempt and stop it if the form state is dirty\n $(window).on('beforeunload._grav', () => {\n if (Instance.equals() === false) {\n return `You have made changes on this page that you have not yet confirmed. If you navigate away from this page you will lose your unsaved changes.`;\n }\n });\n },\n\n preventClickAway() {\n let selector = 'a[href]:not([href^=#])';\n\n if ($._data($(selector).get(0), 'events') && ($._data($(selector).get(0), 'events').click || []).filter((event) => event.namespace === '_grav')) {\n return;\n }\n\n // Prevent clicking away if the form state is dirty\n // instead, display a confirmation before continuing\n $(selector).on('click._grav', function(event) {\n let isClean = Instance.equals();\n if (isClean === null || isClean) { return true; }\n\n event.preventDefault();\n\n let destination = $(this).attr('href');\n let modal = $('[data-remodal-id=\"changes\"]');\n let lookup = $.remodal.lookup[modal.data('remodal')];\n let buttons = $('a.button', modal);\n\n let handler = function(event) {\n event.preventDefault();\n let action = $(this).data('leave-action');\n\n buttons.off('click', handler);\n lookup.close();\n\n if (action === 'continue') {\n $(window).off('beforeunload');\n window.location.href = destination;\n }\n };\n\n buttons.on('click', handler);\n lookup.open();\n });\n }\n};\n\nexport default class FormState {\n constructor(options = {\n ignore: [],\n form_id: 'blueprints'\n }) {\n this.options = options;\n this.refresh();\n\n if (!this.form || !this.fields.length) { return; }\n FormLoadState = this.collect();\n DOMBehaviors.attach();\n }\n\n refresh() {\n this.form = $(`form#${this.options.form_id}`).filter(':noparents(.remodal)');\n this.fields = $(`form#${this.options.form_id} *, [form=\"${this.options.form_id}\"]`).filter(':input:not(.no-form)').filter(':noparents(.remodal)');\n\n return this;\n }\n\n collect() {\n if (!this.form || !this.fields.length) { return; }\n\n let values = {};\n this.refresh().fields.each((index, field) => {\n field = $(field);\n let name = field.prop('name');\n let type = field.prop('type');\n let value;\n\n switch (type) {\n case 'checkbox':\n case 'radio':\n value = field.is(':checked');\n break;\n default:\n value = field.val();\n }\n\n if (name && !~this.options.ignore.indexOf(name)) {\n values[name] = value;\n }\n });\n\n return Immutable.OrderedMap(values);\n }\n\n // When the form doesn't exist or there are no fields, `equals` returns `null`\n // for this reason, _NEVER_ check with !Instance.equals(), use Instance.equals() === false\n equals() {\n if (!this.form || !this.fields.length) { return null; }\n return Immutable.is(FormLoadState, this.collect());\n }\n};\n\nexport let Instance = new FormState();\n\nexport { DOMBehaviors };\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/forms/state.js\n **/","/**\n * Copyright (c) 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n global.Immutable = factory();\n}(this, function () { 'use strict';var SLICE$0 = Array.prototype.slice;\n\n function createClass(ctor, superClass) {\n if (superClass) {\n ctor.prototype = Object.create(superClass.prototype);\n }\n ctor.prototype.constructor = ctor;\n }\n\n function Iterable(value) {\n return isIterable(value) ? value : Seq(value);\n }\n\n\n createClass(KeyedIterable, Iterable);\n function KeyedIterable(value) {\n return isKeyed(value) ? value : KeyedSeq(value);\n }\n\n\n createClass(IndexedIterable, Iterable);\n function IndexedIterable(value) {\n return isIndexed(value) ? value : IndexedSeq(value);\n }\n\n\n createClass(SetIterable, Iterable);\n function SetIterable(value) {\n return isIterable(value) && !isAssociative(value) ? value : SetSeq(value);\n }\n\n\n\n function isIterable(maybeIterable) {\n return !!(maybeIterable && maybeIterable[IS_ITERABLE_SENTINEL]);\n }\n\n function isKeyed(maybeKeyed) {\n return !!(maybeKeyed && maybeKeyed[IS_KEYED_SENTINEL]);\n }\n\n function isIndexed(maybeIndexed) {\n return !!(maybeIndexed && maybeIndexed[IS_INDEXED_SENTINEL]);\n }\n\n function isAssociative(maybeAssociative) {\n return isKeyed(maybeAssociative) || isIndexed(maybeAssociative);\n }\n\n function isOrdered(maybeOrdered) {\n return !!(maybeOrdered && maybeOrdered[IS_ORDERED_SENTINEL]);\n }\n\n Iterable.isIterable = isIterable;\n Iterable.isKeyed = isKeyed;\n Iterable.isIndexed = isIndexed;\n Iterable.isAssociative = isAssociative;\n Iterable.isOrdered = isOrdered;\n\n Iterable.Keyed = KeyedIterable;\n Iterable.Indexed = IndexedIterable;\n Iterable.Set = SetIterable;\n\n\n var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';\n var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\n var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';\n var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';\n\n // Used for setting prototype methods that IE8 chokes on.\n var DELETE = 'delete';\n\n // Constants describing the size of trie nodes.\n var SHIFT = 5; // Resulted in best performance after ______?\n var SIZE = 1 << SHIFT;\n var MASK = SIZE - 1;\n\n // A consistent shared value representing \"not set\" which equals nothing other\n // than itself, and nothing that could be provided externally.\n var NOT_SET = {};\n\n // Boolean references, Rough equivalent of `bool &`.\n var CHANGE_LENGTH = { value: false };\n var DID_ALTER = { value: false };\n\n function MakeRef(ref) {\n ref.value = false;\n return ref;\n }\n\n function SetRef(ref) {\n ref && (ref.value = true);\n }\n\n // A function which returns a value representing an \"owner\" for transient writes\n // to tries. The return value will only ever equal itself, and will not equal\n // the return of any subsequent call of this function.\n function OwnerID() {}\n\n // http://jsperf.com/copy-array-inline\n function arrCopy(arr, offset) {\n offset = offset || 0;\n var len = Math.max(0, arr.length - offset);\n var newArr = new Array(len);\n for (var ii = 0; ii < len; ii++) {\n newArr[ii] = arr[ii + offset];\n }\n return newArr;\n }\n\n function ensureSize(iter) {\n if (iter.size === undefined) {\n iter.size = iter.__iterate(returnTrue);\n }\n return iter.size;\n }\n\n function wrapIndex(iter, index) {\n // This implements \"is array index\" which the ECMAString spec defines as:\n //\n // A String property name P is an array index if and only if\n // ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal\n // to 2^32−1.\n //\n // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects\n if (typeof index !== 'number') {\n var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32\n if ('' + uint32Index !== index || uint32Index === 4294967295) {\n return NaN;\n }\n index = uint32Index;\n }\n return index < 0 ? ensureSize(iter) + index : index;\n }\n\n function returnTrue() {\n return true;\n }\n\n function wholeSlice(begin, end, size) {\n return (begin === 0 || (size !== undefined && begin <= -size)) &&\n (end === undefined || (size !== undefined && end >= size));\n }\n\n function resolveBegin(begin, size) {\n return resolveIndex(begin, size, 0);\n }\n\n function resolveEnd(end, size) {\n return resolveIndex(end, size, size);\n }\n\n function resolveIndex(index, size, defaultIndex) {\n return index === undefined ?\n defaultIndex :\n index < 0 ?\n Math.max(0, size + index) :\n size === undefined ?\n index :\n Math.min(size, index);\n }\n\n /* global Symbol */\n\n var ITERATE_KEYS = 0;\n var ITERATE_VALUES = 1;\n var ITERATE_ENTRIES = 2;\n\n var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator';\n\n var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL;\n\n\n function Iterator(next) {\n this.next = next;\n }\n\n Iterator.prototype.toString = function() {\n return '[Iterator]';\n };\n\n\n Iterator.KEYS = ITERATE_KEYS;\n Iterator.VALUES = ITERATE_VALUES;\n Iterator.ENTRIES = ITERATE_ENTRIES;\n\n Iterator.prototype.inspect =\n Iterator.prototype.toSource = function () { return this.toString(); }\n Iterator.prototype[ITERATOR_SYMBOL] = function () {\n return this;\n };\n\n\n function iteratorValue(type, k, v, iteratorResult) {\n var value = type === 0 ? k : type === 1 ? v : [k, v];\n iteratorResult ? (iteratorResult.value = value) : (iteratorResult = {\n value: value, done: false\n });\n return iteratorResult;\n }\n\n function iteratorDone() {\n return { value: undefined, done: true };\n }\n\n function hasIterator(maybeIterable) {\n return !!getIteratorFn(maybeIterable);\n }\n\n function isIterator(maybeIterator) {\n return maybeIterator && typeof maybeIterator.next === 'function';\n }\n\n function getIterator(iterable) {\n var iteratorFn = getIteratorFn(iterable);\n return iteratorFn && iteratorFn.call(iterable);\n }\n\n function getIteratorFn(iterable) {\n var iteratorFn = iterable && (\n (REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) ||\n iterable[FAUX_ITERATOR_SYMBOL]\n );\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n function isArrayLike(value) {\n return value && typeof value.length === 'number';\n }\n\n createClass(Seq, Iterable);\n function Seq(value) {\n return value === null || value === undefined ? emptySequence() :\n isIterable(value) ? value.toSeq() : seqFromValue(value);\n }\n\n Seq.of = function(/*...values*/) {\n return Seq(arguments);\n };\n\n Seq.prototype.toSeq = function() {\n return this;\n };\n\n Seq.prototype.toString = function() {\n return this.__toString('Seq {', '}');\n };\n\n Seq.prototype.cacheResult = function() {\n if (!this._cache && this.__iterateUncached) {\n this._cache = this.entrySeq().toArray();\n this.size = this._cache.length;\n }\n return this;\n };\n\n // abstract __iterateUncached(fn, reverse)\n\n Seq.prototype.__iterate = function(fn, reverse) {\n return seqIterate(this, fn, reverse, true);\n };\n\n // abstract __iteratorUncached(type, reverse)\n\n Seq.prototype.__iterator = function(type, reverse) {\n return seqIterator(this, type, reverse, true);\n };\n\n\n\n createClass(KeyedSeq, Seq);\n function KeyedSeq(value) {\n return value === null || value === undefined ?\n emptySequence().toKeyedSeq() :\n isIterable(value) ?\n (isKeyed(value) ? value.toSeq() : value.fromEntrySeq()) :\n keyedSeqFromValue(value);\n }\n\n KeyedSeq.prototype.toKeyedSeq = function() {\n return this;\n };\n\n\n\n createClass(IndexedSeq, Seq);\n function IndexedSeq(value) {\n return value === null || value === undefined ? emptySequence() :\n !isIterable(value) ? indexedSeqFromValue(value) :\n isKeyed(value) ? value.entrySeq() : value.toIndexedSeq();\n }\n\n IndexedSeq.of = function(/*...values*/) {\n return IndexedSeq(arguments);\n };\n\n IndexedSeq.prototype.toIndexedSeq = function() {\n return this;\n };\n\n IndexedSeq.prototype.toString = function() {\n return this.__toString('Seq [', ']');\n };\n\n IndexedSeq.prototype.__iterate = function(fn, reverse) {\n return seqIterate(this, fn, reverse, false);\n };\n\n IndexedSeq.prototype.__iterator = function(type, reverse) {\n return seqIterator(this, type, reverse, false);\n };\n\n\n\n createClass(SetSeq, Seq);\n function SetSeq(value) {\n return (\n value === null || value === undefined ? emptySequence() :\n !isIterable(value) ? indexedSeqFromValue(value) :\n isKeyed(value) ? value.entrySeq() : value\n ).toSetSeq();\n }\n\n SetSeq.of = function(/*...values*/) {\n return SetSeq(arguments);\n };\n\n SetSeq.prototype.toSetSeq = function() {\n return this;\n };\n\n\n\n Seq.isSeq = isSeq;\n Seq.Keyed = KeyedSeq;\n Seq.Set = SetSeq;\n Seq.Indexed = IndexedSeq;\n\n var IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@';\n\n Seq.prototype[IS_SEQ_SENTINEL] = true;\n\n\n\n createClass(ArraySeq, IndexedSeq);\n function ArraySeq(array) {\n this._array = array;\n this.size = array.length;\n }\n\n ArraySeq.prototype.get = function(index, notSetValue) {\n return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue;\n };\n\n ArraySeq.prototype.__iterate = function(fn, reverse) {\n var array = this._array;\n var maxIndex = array.length - 1;\n for (var ii = 0; ii <= maxIndex; ii++) {\n if (fn(array[reverse ? maxIndex - ii : ii], ii, this) === false) {\n return ii + 1;\n }\n }\n return ii;\n };\n\n ArraySeq.prototype.__iterator = function(type, reverse) {\n var array = this._array;\n var maxIndex = array.length - 1;\n var ii = 0;\n return new Iterator(function() \n {return ii > maxIndex ?\n iteratorDone() :\n iteratorValue(type, ii, array[reverse ? maxIndex - ii++ : ii++])}\n );\n };\n\n\n\n createClass(ObjectSeq, KeyedSeq);\n function ObjectSeq(object) {\n var keys = Object.keys(object);\n this._object = object;\n this._keys = keys;\n this.size = keys.length;\n }\n\n ObjectSeq.prototype.get = function(key, notSetValue) {\n if (notSetValue !== undefined && !this.has(key)) {\n return notSetValue;\n }\n return this._object[key];\n };\n\n ObjectSeq.prototype.has = function(key) {\n return this._object.hasOwnProperty(key);\n };\n\n ObjectSeq.prototype.__iterate = function(fn, reverse) {\n var object = this._object;\n var keys = this._keys;\n var maxIndex = keys.length - 1;\n for (var ii = 0; ii <= maxIndex; ii++) {\n var key = keys[reverse ? maxIndex - ii : ii];\n if (fn(object[key], key, this) === false) {\n return ii + 1;\n }\n }\n return ii;\n };\n\n ObjectSeq.prototype.__iterator = function(type, reverse) {\n var object = this._object;\n var keys = this._keys;\n var maxIndex = keys.length - 1;\n var ii = 0;\n return new Iterator(function() {\n var key = keys[reverse ? maxIndex - ii : ii];\n return ii++ > maxIndex ?\n iteratorDone() :\n iteratorValue(type, key, object[key]);\n });\n };\n\n ObjectSeq.prototype[IS_ORDERED_SENTINEL] = true;\n\n\n createClass(IterableSeq, IndexedSeq);\n function IterableSeq(iterable) {\n this._iterable = iterable;\n this.size = iterable.length || iterable.size;\n }\n\n IterableSeq.prototype.__iterateUncached = function(fn, reverse) {\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterable = this._iterable;\n var iterator = getIterator(iterable);\n var iterations = 0;\n if (isIterator(iterator)) {\n var step;\n while (!(step = iterator.next()).done) {\n if (fn(step.value, iterations++, this) === false) {\n break;\n }\n }\n }\n return iterations;\n };\n\n IterableSeq.prototype.__iteratorUncached = function(type, reverse) {\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterable = this._iterable;\n var iterator = getIterator(iterable);\n if (!isIterator(iterator)) {\n return new Iterator(iteratorDone);\n }\n var iterations = 0;\n return new Iterator(function() {\n var step = iterator.next();\n return step.done ? step : iteratorValue(type, iterations++, step.value);\n });\n };\n\n\n\n createClass(IteratorSeq, IndexedSeq);\n function IteratorSeq(iterator) {\n this._iterator = iterator;\n this._iteratorCache = [];\n }\n\n IteratorSeq.prototype.__iterateUncached = function(fn, reverse) {\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterator = this._iterator;\n var cache = this._iteratorCache;\n var iterations = 0;\n while (iterations < cache.length) {\n if (fn(cache[iterations], iterations++, this) === false) {\n return iterations;\n }\n }\n var step;\n while (!(step = iterator.next()).done) {\n var val = step.value;\n cache[iterations] = val;\n if (fn(val, iterations++, this) === false) {\n break;\n }\n }\n return iterations;\n };\n\n IteratorSeq.prototype.__iteratorUncached = function(type, reverse) {\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = this._iterator;\n var cache = this._iteratorCache;\n var iterations = 0;\n return new Iterator(function() {\n if (iterations >= cache.length) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n cache[iterations] = step.value;\n }\n return iteratorValue(type, iterations, cache[iterations++]);\n });\n };\n\n\n\n\n // # pragma Helper functions\n\n function isSeq(maybeSeq) {\n return !!(maybeSeq && maybeSeq[IS_SEQ_SENTINEL]);\n }\n\n var EMPTY_SEQ;\n\n function emptySequence() {\n return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([]));\n }\n\n function keyedSeqFromValue(value) {\n var seq =\n Array.isArray(value) ? new ArraySeq(value).fromEntrySeq() :\n isIterator(value) ? new IteratorSeq(value).fromEntrySeq() :\n hasIterator(value) ? new IterableSeq(value).fromEntrySeq() :\n typeof value === 'object' ? new ObjectSeq(value) :\n undefined;\n if (!seq) {\n throw new TypeError(\n 'Expected Array or iterable object of [k, v] entries, '+\n 'or keyed object: ' + value\n );\n }\n return seq;\n }\n\n function indexedSeqFromValue(value) {\n var seq = maybeIndexedSeqFromValue(value);\n if (!seq) {\n throw new TypeError(\n 'Expected Array or iterable object of values: ' + value\n );\n }\n return seq;\n }\n\n function seqFromValue(value) {\n var seq = maybeIndexedSeqFromValue(value) ||\n (typeof value === 'object' && new ObjectSeq(value));\n if (!seq) {\n throw new TypeError(\n 'Expected Array or iterable object of values, or keyed object: ' + value\n );\n }\n return seq;\n }\n\n function maybeIndexedSeqFromValue(value) {\n return (\n isArrayLike(value) ? new ArraySeq(value) :\n isIterator(value) ? new IteratorSeq(value) :\n hasIterator(value) ? new IterableSeq(value) :\n undefined\n );\n }\n\n function seqIterate(seq, fn, reverse, useKeys) {\n var cache = seq._cache;\n if (cache) {\n var maxIndex = cache.length - 1;\n for (var ii = 0; ii <= maxIndex; ii++) {\n var entry = cache[reverse ? maxIndex - ii : ii];\n if (fn(entry[1], useKeys ? entry[0] : ii, seq) === false) {\n return ii + 1;\n }\n }\n return ii;\n }\n return seq.__iterateUncached(fn, reverse);\n }\n\n function seqIterator(seq, type, reverse, useKeys) {\n var cache = seq._cache;\n if (cache) {\n var maxIndex = cache.length - 1;\n var ii = 0;\n return new Iterator(function() {\n var entry = cache[reverse ? maxIndex - ii : ii];\n return ii++ > maxIndex ?\n iteratorDone() :\n iteratorValue(type, useKeys ? entry[0] : ii - 1, entry[1]);\n });\n }\n return seq.__iteratorUncached(type, reverse);\n }\n\n function fromJS(json, converter) {\n return converter ?\n fromJSWith(converter, json, '', {'': json}) :\n fromJSDefault(json);\n }\n\n function fromJSWith(converter, json, key, parentJSON) {\n if (Array.isArray(json)) {\n return converter.call(parentJSON, key, IndexedSeq(json).map(function(v, k) {return fromJSWith(converter, v, k, json)}));\n }\n if (isPlainObj(json)) {\n return converter.call(parentJSON, key, KeyedSeq(json).map(function(v, k) {return fromJSWith(converter, v, k, json)}));\n }\n return json;\n }\n\n function fromJSDefault(json) {\n if (Array.isArray(json)) {\n return IndexedSeq(json).map(fromJSDefault).toList();\n }\n if (isPlainObj(json)) {\n return KeyedSeq(json).map(fromJSDefault).toMap();\n }\n return json;\n }\n\n function isPlainObj(value) {\n return value && (value.constructor === Object || value.constructor === undefined);\n }\n\n /**\n * An extension of the \"same-value\" algorithm as [described for use by ES6 Map\n * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality)\n *\n * NaN is considered the same as NaN, however -0 and 0 are considered the same\n * value, which is different from the algorithm described by\n * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).\n *\n * This is extended further to allow Objects to describe the values they\n * represent, by way of `valueOf` or `equals` (and `hashCode`).\n *\n * Note: because of this extension, the key equality of Immutable.Map and the\n * value equality of Immutable.Set will differ from ES6 Map and Set.\n *\n * ### Defining custom values\n *\n * The easiest way to describe the value an object represents is by implementing\n * `valueOf`. For example, `Date` represents a value by returning a unix\n * timestamp for `valueOf`:\n *\n * var date1 = new Date(1234567890000); // Fri Feb 13 2009 ...\n * var date2 = new Date(1234567890000);\n * date1.valueOf(); // 1234567890000\n * assert( date1 !== date2 );\n * assert( Immutable.is( date1, date2 ) );\n *\n * Note: overriding `valueOf` may have other implications if you use this object\n * where JavaScript expects a primitive, such as implicit string coercion.\n *\n * For more complex types, especially collections, implementing `valueOf` may\n * not be performant. An alternative is to implement `equals` and `hashCode`.\n *\n * `equals` takes another object, presumably of similar type, and returns true\n * if the it is equal. Equality is symmetrical, so the same result should be\n * returned if this and the argument are flipped.\n *\n * assert( a.equals(b) === b.equals(a) );\n *\n * `hashCode` returns a 32bit integer number representing the object which will\n * be used to determine how to store the value object in a Map or Set. You must\n * provide both or neither methods, one must not exist without the other.\n *\n * Also, an important relationship between these methods must be upheld: if two\n * values are equal, they *must* return the same hashCode. If the values are not\n * equal, they might have the same hashCode; this is called a hash collision,\n * and while undesirable for performance reasons, it is acceptable.\n *\n * if (a.equals(b)) {\n * assert( a.hashCode() === b.hashCode() );\n * }\n *\n * All Immutable collections implement `equals` and `hashCode`.\n *\n */\n function is(valueA, valueB) {\n if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {\n return true;\n }\n if (!valueA || !valueB) {\n return false;\n }\n if (typeof valueA.valueOf === 'function' &&\n typeof valueB.valueOf === 'function') {\n valueA = valueA.valueOf();\n valueB = valueB.valueOf();\n if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {\n return true;\n }\n if (!valueA || !valueB) {\n return false;\n }\n }\n if (typeof valueA.equals === 'function' &&\n typeof valueB.equals === 'function' &&\n valueA.equals(valueB)) {\n return true;\n }\n return false;\n }\n\n function deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (\n !isIterable(b) ||\n a.size !== undefined && b.size !== undefined && a.size !== b.size ||\n a.__hash !== undefined && b.__hash !== undefined && a.__hash !== b.__hash ||\n isKeyed(a) !== isKeyed(b) ||\n isIndexed(a) !== isIndexed(b) ||\n isOrdered(a) !== isOrdered(b)\n ) {\n return false;\n }\n\n if (a.size === 0 && b.size === 0) {\n return true;\n }\n\n var notAssociative = !isAssociative(a);\n\n if (isOrdered(a)) {\n var entries = a.entries();\n return b.every(function(v, k) {\n var entry = entries.next().value;\n return entry && is(entry[1], v) && (notAssociative || is(entry[0], k));\n }) && entries.next().done;\n }\n\n var flipped = false;\n\n if (a.size === undefined) {\n if (b.size === undefined) {\n if (typeof a.cacheResult === 'function') {\n a.cacheResult();\n }\n } else {\n flipped = true;\n var _ = a;\n a = b;\n b = _;\n }\n }\n\n var allEqual = true;\n var bSize = b.__iterate(function(v, k) {\n if (notAssociative ? !a.has(v) :\n flipped ? !is(v, a.get(k, NOT_SET)) : !is(a.get(k, NOT_SET), v)) {\n allEqual = false;\n return false;\n }\n });\n\n return allEqual && a.size === bSize;\n }\n\n createClass(Repeat, IndexedSeq);\n\n function Repeat(value, times) {\n if (!(this instanceof Repeat)) {\n return new Repeat(value, times);\n }\n this._value = value;\n this.size = times === undefined ? Infinity : Math.max(0, times);\n if (this.size === 0) {\n if (EMPTY_REPEAT) {\n return EMPTY_REPEAT;\n }\n EMPTY_REPEAT = this;\n }\n }\n\n Repeat.prototype.toString = function() {\n if (this.size === 0) {\n return 'Repeat []';\n }\n return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]';\n };\n\n Repeat.prototype.get = function(index, notSetValue) {\n return this.has(index) ? this._value : notSetValue;\n };\n\n Repeat.prototype.includes = function(searchValue) {\n return is(this._value, searchValue);\n };\n\n Repeat.prototype.slice = function(begin, end) {\n var size = this.size;\n return wholeSlice(begin, end, size) ? this :\n new Repeat(this._value, resolveEnd(end, size) - resolveBegin(begin, size));\n };\n\n Repeat.prototype.reverse = function() {\n return this;\n };\n\n Repeat.prototype.indexOf = function(searchValue) {\n if (is(this._value, searchValue)) {\n return 0;\n }\n return -1;\n };\n\n Repeat.prototype.lastIndexOf = function(searchValue) {\n if (is(this._value, searchValue)) {\n return this.size;\n }\n return -1;\n };\n\n Repeat.prototype.__iterate = function(fn, reverse) {\n for (var ii = 0; ii < this.size; ii++) {\n if (fn(this._value, ii, this) === false) {\n return ii + 1;\n }\n }\n return ii;\n };\n\n Repeat.prototype.__iterator = function(type, reverse) {var this$0 = this;\n var ii = 0;\n return new Iterator(function() \n {return ii < this$0.size ? iteratorValue(type, ii++, this$0._value) : iteratorDone()}\n );\n };\n\n Repeat.prototype.equals = function(other) {\n return other instanceof Repeat ?\n is(this._value, other._value) :\n deepEqual(other);\n };\n\n\n var EMPTY_REPEAT;\n\n function invariant(condition, error) {\n if (!condition) throw new Error(error);\n }\n\n createClass(Range, IndexedSeq);\n\n function Range(start, end, step) {\n if (!(this instanceof Range)) {\n return new Range(start, end, step);\n }\n invariant(step !== 0, 'Cannot step a Range by 0');\n start = start || 0;\n if (end === undefined) {\n end = Infinity;\n }\n step = step === undefined ? 1 : Math.abs(step);\n if (end < start) {\n step = -step;\n }\n this._start = start;\n this._end = end;\n this._step = step;\n this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1);\n if (this.size === 0) {\n if (EMPTY_RANGE) {\n return EMPTY_RANGE;\n }\n EMPTY_RANGE = this;\n }\n }\n\n Range.prototype.toString = function() {\n if (this.size === 0) {\n return 'Range []';\n }\n return 'Range [ ' +\n this._start + '...' + this._end +\n (this._step > 1 ? ' by ' + this._step : '') +\n ' ]';\n };\n\n Range.prototype.get = function(index, notSetValue) {\n return this.has(index) ?\n this._start + wrapIndex(this, index) * this._step :\n notSetValue;\n };\n\n Range.prototype.includes = function(searchValue) {\n var possibleIndex = (searchValue - this._start) / this._step;\n return possibleIndex >= 0 &&\n possibleIndex < this.size &&\n possibleIndex === Math.floor(possibleIndex);\n };\n\n Range.prototype.slice = function(begin, end) {\n if (wholeSlice(begin, end, this.size)) {\n return this;\n }\n begin = resolveBegin(begin, this.size);\n end = resolveEnd(end, this.size);\n if (end <= begin) {\n return new Range(0, 0);\n }\n return new Range(this.get(begin, this._end), this.get(end, this._end), this._step);\n };\n\n Range.prototype.indexOf = function(searchValue) {\n var offsetValue = searchValue - this._start;\n if (offsetValue % this._step === 0) {\n var index = offsetValue / this._step;\n if (index >= 0 && index < this.size) {\n return index\n }\n }\n return -1;\n };\n\n Range.prototype.lastIndexOf = function(searchValue) {\n return this.indexOf(searchValue);\n };\n\n Range.prototype.__iterate = function(fn, reverse) {\n var maxIndex = this.size - 1;\n var step = this._step;\n var value = reverse ? this._start + maxIndex * step : this._start;\n for (var ii = 0; ii <= maxIndex; ii++) {\n if (fn(value, ii, this) === false) {\n return ii + 1;\n }\n value += reverse ? -step : step;\n }\n return ii;\n };\n\n Range.prototype.__iterator = function(type, reverse) {\n var maxIndex = this.size - 1;\n var step = this._step;\n var value = reverse ? this._start + maxIndex * step : this._start;\n var ii = 0;\n return new Iterator(function() {\n var v = value;\n value += reverse ? -step : step;\n return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii++, v);\n });\n };\n\n Range.prototype.equals = function(other) {\n return other instanceof Range ?\n this._start === other._start &&\n this._end === other._end &&\n this._step === other._step :\n deepEqual(this, other);\n };\n\n\n var EMPTY_RANGE;\n\n createClass(Collection, Iterable);\n function Collection() {\n throw TypeError('Abstract');\n }\n\n\n createClass(KeyedCollection, Collection);function KeyedCollection() {}\n\n createClass(IndexedCollection, Collection);function IndexedCollection() {}\n\n createClass(SetCollection, Collection);function SetCollection() {}\n\n\n Collection.Keyed = KeyedCollection;\n Collection.Indexed = IndexedCollection;\n Collection.Set = SetCollection;\n\n var imul =\n typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 ?\n Math.imul :\n function imul(a, b) {\n a = a | 0; // int\n b = b | 0; // int\n var c = a & 0xffff;\n var d = b & 0xffff;\n // Shift by 0 fixes the sign on the high part.\n return (c * d) + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0) | 0; // int\n };\n\n // v8 has an optimization for storing 31-bit signed numbers.\n // Values which have either 00 or 11 as the high order bits qualify.\n // This function drops the highest order bit in a signed number, maintaining\n // the sign bit.\n function smi(i32) {\n return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n }\n\n function hash(o) {\n if (o === false || o === null || o === undefined) {\n return 0;\n }\n if (typeof o.valueOf === 'function') {\n o = o.valueOf();\n if (o === false || o === null || o === undefined) {\n return 0;\n }\n }\n if (o === true) {\n return 1;\n }\n var type = typeof o;\n if (type === 'number') {\n var h = o | 0;\n if (h !== o) {\n h ^= o * 0xFFFFFFFF;\n }\n while (o > 0xFFFFFFFF) {\n o /= 0xFFFFFFFF;\n h ^= o;\n }\n return smi(h);\n }\n if (type === 'string') {\n return o.length > STRING_HASH_CACHE_MIN_STRLEN ? cachedHashString(o) : hashString(o);\n }\n if (typeof o.hashCode === 'function') {\n return o.hashCode();\n }\n if (type === 'object') {\n return hashJSObj(o);\n }\n if (typeof o.toString === 'function') {\n return hashString(o.toString());\n }\n throw new Error('Value type ' + type + ' cannot be hashed.');\n }\n\n function cachedHashString(string) {\n var hash = stringHashCache[string];\n if (hash === undefined) {\n hash = hashString(string);\n if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) {\n STRING_HASH_CACHE_SIZE = 0;\n stringHashCache = {};\n }\n STRING_HASH_CACHE_SIZE++;\n stringHashCache[string] = hash;\n }\n return hash;\n }\n\n // http://jsperf.com/hashing-strings\n function hashString(string) {\n // This is the hash from JVM\n // The hash code for a string is computed as\n // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1],\n // where s[i] is the ith character of the string and n is the length of\n // the string. We \"mod\" the result to make it between 0 (inclusive) and 2^31\n // (exclusive) by dropping high bits.\n var hash = 0;\n for (var ii = 0; ii < string.length; ii++) {\n hash = 31 * hash + string.charCodeAt(ii) | 0;\n }\n return smi(hash);\n }\n\n function hashJSObj(obj) {\n var hash;\n if (usingWeakMap) {\n hash = weakMap.get(obj);\n if (hash !== undefined) {\n return hash;\n }\n }\n\n hash = obj[UID_HASH_KEY];\n if (hash !== undefined) {\n return hash;\n }\n\n if (!canDefineProperty) {\n hash = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY];\n if (hash !== undefined) {\n return hash;\n }\n\n hash = getIENodeHash(obj);\n if (hash !== undefined) {\n return hash;\n }\n }\n\n hash = ++objHashUID;\n if (objHashUID & 0x40000000) {\n objHashUID = 0;\n }\n\n if (usingWeakMap) {\n weakMap.set(obj, hash);\n } else if (isExtensible !== undefined && isExtensible(obj) === false) {\n throw new Error('Non-extensible objects are not allowed as keys.');\n } else if (canDefineProperty) {\n Object.defineProperty(obj, UID_HASH_KEY, {\n 'enumerable': false,\n 'configurable': false,\n 'writable': false,\n 'value': hash\n });\n } else if (obj.propertyIsEnumerable !== undefined &&\n obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable) {\n // Since we can't define a non-enumerable property on the object\n // we'll hijack one of the less-used non-enumerable properties to\n // save our hash on it. Since this is a function it will not show up in\n // `JSON.stringify` which is what we want.\n obj.propertyIsEnumerable = function() {\n return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments);\n };\n obj.propertyIsEnumerable[UID_HASH_KEY] = hash;\n } else if (obj.nodeType !== undefined) {\n // At this point we couldn't get the IE `uniqueID` to use as a hash\n // and we couldn't use a non-enumerable property to exploit the\n // dontEnum bug so we simply add the `UID_HASH_KEY` on the node\n // itself.\n obj[UID_HASH_KEY] = hash;\n } else {\n throw new Error('Unable to set a non-enumerable property on object.');\n }\n\n return hash;\n }\n\n // Get references to ES5 object methods.\n var isExtensible = Object.isExtensible;\n\n // True if Object.defineProperty works as expected. IE8 fails this test.\n var canDefineProperty = (function() {\n try {\n Object.defineProperty({}, '@', {});\n return true;\n } catch (e) {\n return false;\n }\n }());\n\n // IE has a `uniqueID` property on DOM nodes. We can construct the hash from it\n // and avoid memory leaks from the IE cloneNode bug.\n function getIENodeHash(node) {\n if (node && node.nodeType > 0) {\n switch (node.nodeType) {\n case 1: // Element\n return node.uniqueID;\n case 9: // Document\n return node.documentElement && node.documentElement.uniqueID;\n }\n }\n }\n\n // If possible, use a WeakMap.\n var usingWeakMap = typeof WeakMap === 'function';\n var weakMap;\n if (usingWeakMap) {\n weakMap = new WeakMap();\n }\n\n var objHashUID = 0;\n\n var UID_HASH_KEY = '__immutablehash__';\n if (typeof Symbol === 'function') {\n UID_HASH_KEY = Symbol(UID_HASH_KEY);\n }\n\n var STRING_HASH_CACHE_MIN_STRLEN = 16;\n var STRING_HASH_CACHE_MAX_SIZE = 255;\n var STRING_HASH_CACHE_SIZE = 0;\n var stringHashCache = {};\n\n function assertNotInfinite(size) {\n invariant(\n size !== Infinity,\n 'Cannot perform this action with an infinite size.'\n );\n }\n\n createClass(Map, KeyedCollection);\n\n // @pragma Construction\n\n function Map(value) {\n return value === null || value === undefined ? emptyMap() :\n isMap(value) && !isOrdered(value) ? value :\n emptyMap().withMutations(function(map ) {\n var iter = KeyedIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function(v, k) {return map.set(k, v)});\n });\n }\n\n Map.prototype.toString = function() {\n return this.__toString('Map {', '}');\n };\n\n // @pragma Access\n\n Map.prototype.get = function(k, notSetValue) {\n return this._root ?\n this._root.get(0, undefined, k, notSetValue) :\n notSetValue;\n };\n\n // @pragma Modification\n\n Map.prototype.set = function(k, v) {\n return updateMap(this, k, v);\n };\n\n Map.prototype.setIn = function(keyPath, v) {\n return this.updateIn(keyPath, NOT_SET, function() {return v});\n };\n\n Map.prototype.remove = function(k) {\n return updateMap(this, k, NOT_SET);\n };\n\n Map.prototype.deleteIn = function(keyPath) {\n return this.updateIn(keyPath, function() {return NOT_SET});\n };\n\n Map.prototype.update = function(k, notSetValue, updater) {\n return arguments.length === 1 ?\n k(this) :\n this.updateIn([k], notSetValue, updater);\n };\n\n Map.prototype.updateIn = function(keyPath, notSetValue, updater) {\n if (!updater) {\n updater = notSetValue;\n notSetValue = undefined;\n }\n var updatedValue = updateInDeepMap(\n this,\n forceIterator(keyPath),\n notSetValue,\n updater\n );\n return updatedValue === NOT_SET ? undefined : updatedValue;\n };\n\n Map.prototype.clear = function() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._root = null;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyMap();\n };\n\n // @pragma Composition\n\n Map.prototype.merge = function(/*...iters*/) {\n return mergeIntoMapWith(this, undefined, arguments);\n };\n\n Map.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return mergeIntoMapWith(this, merger, iters);\n };\n\n Map.prototype.mergeIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1);\n return this.updateIn(\n keyPath,\n emptyMap(),\n function(m ) {return typeof m.merge === 'function' ?\n m.merge.apply(m, iters) :\n iters[iters.length - 1]}\n );\n };\n\n Map.prototype.mergeDeep = function(/*...iters*/) {\n return mergeIntoMapWith(this, deepMerger, arguments);\n };\n\n Map.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return mergeIntoMapWith(this, deepMergerWith(merger), iters);\n };\n\n Map.prototype.mergeDeepIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1);\n return this.updateIn(\n keyPath,\n emptyMap(),\n function(m ) {return typeof m.mergeDeep === 'function' ?\n m.mergeDeep.apply(m, iters) :\n iters[iters.length - 1]}\n );\n };\n\n Map.prototype.sort = function(comparator) {\n // Late binding\n return OrderedMap(sortFactory(this, comparator));\n };\n\n Map.prototype.sortBy = function(mapper, comparator) {\n // Late binding\n return OrderedMap(sortFactory(this, comparator, mapper));\n };\n\n // @pragma Mutability\n\n Map.prototype.withMutations = function(fn) {\n var mutable = this.asMutable();\n fn(mutable);\n return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this;\n };\n\n Map.prototype.asMutable = function() {\n return this.__ownerID ? this : this.__ensureOwner(new OwnerID());\n };\n\n Map.prototype.asImmutable = function() {\n return this.__ensureOwner();\n };\n\n Map.prototype.wasAltered = function() {\n return this.__altered;\n };\n\n Map.prototype.__iterator = function(type, reverse) {\n return new MapIterator(this, type, reverse);\n };\n\n Map.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n var iterations = 0;\n this._root && this._root.iterate(function(entry ) {\n iterations++;\n return fn(entry[1], entry[0], this$0);\n }, reverse);\n return iterations;\n };\n\n Map.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n return makeMap(this.size, this._root, ownerID, this.__hash);\n };\n\n\n function isMap(maybeMap) {\n return !!(maybeMap && maybeMap[IS_MAP_SENTINEL]);\n }\n\n Map.isMap = isMap;\n\n var IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@';\n\n var MapPrototype = Map.prototype;\n MapPrototype[IS_MAP_SENTINEL] = true;\n MapPrototype[DELETE] = MapPrototype.remove;\n MapPrototype.removeIn = MapPrototype.deleteIn;\n\n\n // #pragma Trie Nodes\n\n\n\n function ArrayMapNode(ownerID, entries) {\n this.ownerID = ownerID;\n this.entries = entries;\n }\n\n ArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n var entries = this.entries;\n for (var ii = 0, len = entries.length; ii < len; ii++) {\n if (is(key, entries[ii][0])) {\n return entries[ii][1];\n }\n }\n return notSetValue;\n };\n\n ArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n var removed = value === NOT_SET;\n\n var entries = this.entries;\n var idx = 0;\n for (var len = entries.length; idx < len; idx++) {\n if (is(key, entries[idx][0])) {\n break;\n }\n }\n var exists = idx < len;\n\n if (exists ? entries[idx][1] === value : removed) {\n return this;\n }\n\n SetRef(didAlter);\n (removed || !exists) && SetRef(didChangeSize);\n\n if (removed && entries.length === 1) {\n return; // undefined\n }\n\n if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) {\n return createNodes(ownerID, entries, key, value);\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newEntries = isEditable ? entries : arrCopy(entries);\n\n if (exists) {\n if (removed) {\n idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());\n } else {\n newEntries[idx] = [key, value];\n }\n } else {\n newEntries.push([key, value]);\n }\n\n if (isEditable) {\n this.entries = newEntries;\n return this;\n }\n\n return new ArrayMapNode(ownerID, newEntries);\n };\n\n\n\n\n function BitmapIndexedNode(ownerID, bitmap, nodes) {\n this.ownerID = ownerID;\n this.bitmap = bitmap;\n this.nodes = nodes;\n }\n\n BitmapIndexedNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var bit = (1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK));\n var bitmap = this.bitmap;\n return (bitmap & bit) === 0 ? notSetValue :\n this.nodes[popCount(bitmap & (bit - 1))].get(shift + SHIFT, keyHash, key, notSetValue);\n };\n\n BitmapIndexedNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var bit = 1 << keyHashFrag;\n var bitmap = this.bitmap;\n var exists = (bitmap & bit) !== 0;\n\n if (!exists && value === NOT_SET) {\n return this;\n }\n\n var idx = popCount(bitmap & (bit - 1));\n var nodes = this.nodes;\n var node = exists ? nodes[idx] : undefined;\n var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);\n\n if (newNode === node) {\n return this;\n }\n\n if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) {\n return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode);\n }\n\n if (exists && !newNode && nodes.length === 2 && isLeafNode(nodes[idx ^ 1])) {\n return nodes[idx ^ 1];\n }\n\n if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) {\n return newNode;\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newBitmap = exists ? newNode ? bitmap : bitmap ^ bit : bitmap | bit;\n var newNodes = exists ? newNode ?\n setIn(nodes, idx, newNode, isEditable) :\n spliceOut(nodes, idx, isEditable) :\n spliceIn(nodes, idx, newNode, isEditable);\n\n if (isEditable) {\n this.bitmap = newBitmap;\n this.nodes = newNodes;\n return this;\n }\n\n return new BitmapIndexedNode(ownerID, newBitmap, newNodes);\n };\n\n\n\n\n function HashArrayMapNode(ownerID, count, nodes) {\n this.ownerID = ownerID;\n this.count = count;\n this.nodes = nodes;\n }\n\n HashArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var node = this.nodes[idx];\n return node ? node.get(shift + SHIFT, keyHash, key, notSetValue) : notSetValue;\n };\n\n HashArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var removed = value === NOT_SET;\n var nodes = this.nodes;\n var node = nodes[idx];\n\n if (removed && !node) {\n return this;\n }\n\n var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);\n if (newNode === node) {\n return this;\n }\n\n var newCount = this.count;\n if (!node) {\n newCount++;\n } else if (!newNode) {\n newCount--;\n if (newCount < MIN_HASH_ARRAY_MAP_SIZE) {\n return packNodes(ownerID, nodes, newCount, idx);\n }\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newNodes = setIn(nodes, idx, newNode, isEditable);\n\n if (isEditable) {\n this.count = newCount;\n this.nodes = newNodes;\n return this;\n }\n\n return new HashArrayMapNode(ownerID, newCount, newNodes);\n };\n\n\n\n\n function HashCollisionNode(ownerID, keyHash, entries) {\n this.ownerID = ownerID;\n this.keyHash = keyHash;\n this.entries = entries;\n }\n\n HashCollisionNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n var entries = this.entries;\n for (var ii = 0, len = entries.length; ii < len; ii++) {\n if (is(key, entries[ii][0])) {\n return entries[ii][1];\n }\n }\n return notSetValue;\n };\n\n HashCollisionNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n\n var removed = value === NOT_SET;\n\n if (keyHash !== this.keyHash) {\n if (removed) {\n return this;\n }\n SetRef(didAlter);\n SetRef(didChangeSize);\n return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]);\n }\n\n var entries = this.entries;\n var idx = 0;\n for (var len = entries.length; idx < len; idx++) {\n if (is(key, entries[idx][0])) {\n break;\n }\n }\n var exists = idx < len;\n\n if (exists ? entries[idx][1] === value : removed) {\n return this;\n }\n\n SetRef(didAlter);\n (removed || !exists) && SetRef(didChangeSize);\n\n if (removed && len === 2) {\n return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]);\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newEntries = isEditable ? entries : arrCopy(entries);\n\n if (exists) {\n if (removed) {\n idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());\n } else {\n newEntries[idx] = [key, value];\n }\n } else {\n newEntries.push([key, value]);\n }\n\n if (isEditable) {\n this.entries = newEntries;\n return this;\n }\n\n return new HashCollisionNode(ownerID, this.keyHash, newEntries);\n };\n\n\n\n\n function ValueNode(ownerID, keyHash, entry) {\n this.ownerID = ownerID;\n this.keyHash = keyHash;\n this.entry = entry;\n }\n\n ValueNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n return is(key, this.entry[0]) ? this.entry[1] : notSetValue;\n };\n\n ValueNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n var removed = value === NOT_SET;\n var keyMatch = is(key, this.entry[0]);\n if (keyMatch ? value === this.entry[1] : removed) {\n return this;\n }\n\n SetRef(didAlter);\n\n if (removed) {\n SetRef(didChangeSize);\n return; // undefined\n }\n\n if (keyMatch) {\n if (ownerID && ownerID === this.ownerID) {\n this.entry[1] = value;\n return this;\n }\n return new ValueNode(ownerID, this.keyHash, [key, value]);\n }\n\n SetRef(didChangeSize);\n return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]);\n };\n\n\n\n // #pragma Iterators\n\n ArrayMapNode.prototype.iterate =\n HashCollisionNode.prototype.iterate = function (fn, reverse) {\n var entries = this.entries;\n for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) {\n if (fn(entries[reverse ? maxIndex - ii : ii]) === false) {\n return false;\n }\n }\n }\n\n BitmapIndexedNode.prototype.iterate =\n HashArrayMapNode.prototype.iterate = function (fn, reverse) {\n var nodes = this.nodes;\n for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {\n var node = nodes[reverse ? maxIndex - ii : ii];\n if (node && node.iterate(fn, reverse) === false) {\n return false;\n }\n }\n }\n\n ValueNode.prototype.iterate = function (fn, reverse) {\n return fn(this.entry);\n }\n\n createClass(MapIterator, Iterator);\n\n function MapIterator(map, type, reverse) {\n this._type = type;\n this._reverse = reverse;\n this._stack = map._root && mapIteratorFrame(map._root);\n }\n\n MapIterator.prototype.next = function() {\n var type = this._type;\n var stack = this._stack;\n while (stack) {\n var node = stack.node;\n var index = stack.index++;\n var maxIndex;\n if (node.entry) {\n if (index === 0) {\n return mapIteratorValue(type, node.entry);\n }\n } else if (node.entries) {\n maxIndex = node.entries.length - 1;\n if (index <= maxIndex) {\n return mapIteratorValue(type, node.entries[this._reverse ? maxIndex - index : index]);\n }\n } else {\n maxIndex = node.nodes.length - 1;\n if (index <= maxIndex) {\n var subNode = node.nodes[this._reverse ? maxIndex - index : index];\n if (subNode) {\n if (subNode.entry) {\n return mapIteratorValue(type, subNode.entry);\n }\n stack = this._stack = mapIteratorFrame(subNode, stack);\n }\n continue;\n }\n }\n stack = this._stack = this._stack.__prev;\n }\n return iteratorDone();\n };\n\n\n function mapIteratorValue(type, entry) {\n return iteratorValue(type, entry[0], entry[1]);\n }\n\n function mapIteratorFrame(node, prev) {\n return {\n node: node,\n index: 0,\n __prev: prev\n };\n }\n\n function makeMap(size, root, ownerID, hash) {\n var map = Object.create(MapPrototype);\n map.size = size;\n map._root = root;\n map.__ownerID = ownerID;\n map.__hash = hash;\n map.__altered = false;\n return map;\n }\n\n var EMPTY_MAP;\n function emptyMap() {\n return EMPTY_MAP || (EMPTY_MAP = makeMap(0));\n }\n\n function updateMap(map, k, v) {\n var newRoot;\n var newSize;\n if (!map._root) {\n if (v === NOT_SET) {\n return map;\n }\n newSize = 1;\n newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]);\n } else {\n var didChangeSize = MakeRef(CHANGE_LENGTH);\n var didAlter = MakeRef(DID_ALTER);\n newRoot = updateNode(map._root, map.__ownerID, 0, undefined, k, v, didChangeSize, didAlter);\n if (!didAlter.value) {\n return map;\n }\n newSize = map.size + (didChangeSize.value ? v === NOT_SET ? -1 : 1 : 0);\n }\n if (map.__ownerID) {\n map.size = newSize;\n map._root = newRoot;\n map.__hash = undefined;\n map.__altered = true;\n return map;\n }\n return newRoot ? makeMap(newSize, newRoot) : emptyMap();\n }\n\n function updateNode(node, ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (!node) {\n if (value === NOT_SET) {\n return node;\n }\n SetRef(didAlter);\n SetRef(didChangeSize);\n return new ValueNode(ownerID, keyHash, [key, value]);\n }\n return node.update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter);\n }\n\n function isLeafNode(node) {\n return node.constructor === ValueNode || node.constructor === HashCollisionNode;\n }\n\n function mergeIntoNode(node, ownerID, shift, keyHash, entry) {\n if (node.keyHash === keyHash) {\n return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]);\n }\n\n var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK;\n var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n\n var newNode;\n var nodes = idx1 === idx2 ?\n [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] :\n ((newNode = new ValueNode(ownerID, keyHash, entry)), idx1 < idx2 ? [node, newNode] : [newNode, node]);\n\n return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes);\n }\n\n function createNodes(ownerID, entries, key, value) {\n if (!ownerID) {\n ownerID = new OwnerID();\n }\n var node = new ValueNode(ownerID, hash(key), [key, value]);\n for (var ii = 0; ii < entries.length; ii++) {\n var entry = entries[ii];\n node = node.update(ownerID, 0, undefined, entry[0], entry[1]);\n }\n return node;\n }\n\n function packNodes(ownerID, nodes, count, excluding) {\n var bitmap = 0;\n var packedII = 0;\n var packedNodes = new Array(count);\n for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) {\n var node = nodes[ii];\n if (node !== undefined && ii !== excluding) {\n bitmap |= bit;\n packedNodes[packedII++] = node;\n }\n }\n return new BitmapIndexedNode(ownerID, bitmap, packedNodes);\n }\n\n function expandNodes(ownerID, nodes, bitmap, including, node) {\n var count = 0;\n var expandedNodes = new Array(SIZE);\n for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) {\n expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined;\n }\n expandedNodes[including] = node;\n return new HashArrayMapNode(ownerID, count + 1, expandedNodes);\n }\n\n function mergeIntoMapWith(map, merger, iterables) {\n var iters = [];\n for (var ii = 0; ii < iterables.length; ii++) {\n var value = iterables[ii];\n var iter = KeyedIterable(value);\n if (!isIterable(value)) {\n iter = iter.map(function(v ) {return fromJS(v)});\n }\n iters.push(iter);\n }\n return mergeIntoCollectionWith(map, merger, iters);\n }\n\n function deepMerger(existing, value, key) {\n return existing && existing.mergeDeep && isIterable(value) ?\n existing.mergeDeep(value) :\n is(existing, value) ? existing : value;\n }\n\n function deepMergerWith(merger) {\n return function(existing, value, key) {\n if (existing && existing.mergeDeepWith && isIterable(value)) {\n return existing.mergeDeepWith(merger, value);\n }\n var nextValue = merger(existing, value, key);\n return is(existing, nextValue) ? existing : nextValue;\n };\n }\n\n function mergeIntoCollectionWith(collection, merger, iters) {\n iters = iters.filter(function(x ) {return x.size !== 0});\n if (iters.length === 0) {\n return collection;\n }\n if (collection.size === 0 && !collection.__ownerID && iters.length === 1) {\n return collection.constructor(iters[0]);\n }\n return collection.withMutations(function(collection ) {\n var mergeIntoMap = merger ?\n function(value, key) {\n collection.update(key, NOT_SET, function(existing )\n {return existing === NOT_SET ? value : merger(existing, value, key)}\n );\n } :\n function(value, key) {\n collection.set(key, value);\n }\n for (var ii = 0; ii < iters.length; ii++) {\n iters[ii].forEach(mergeIntoMap);\n }\n });\n }\n\n function updateInDeepMap(existing, keyPathIter, notSetValue, updater) {\n var isNotSet = existing === NOT_SET;\n var step = keyPathIter.next();\n if (step.done) {\n var existingValue = isNotSet ? notSetValue : existing;\n var newValue = updater(existingValue);\n return newValue === existingValue ? existing : newValue;\n }\n invariant(\n isNotSet || (existing && existing.set),\n 'invalid keyPath'\n );\n var key = step.value;\n var nextExisting = isNotSet ? NOT_SET : existing.get(key, NOT_SET);\n var nextUpdated = updateInDeepMap(\n nextExisting,\n keyPathIter,\n notSetValue,\n updater\n );\n return nextUpdated === nextExisting ? existing :\n nextUpdated === NOT_SET ? existing.remove(key) :\n (isNotSet ? emptyMap() : existing).set(key, nextUpdated);\n }\n\n function popCount(x) {\n x = x - ((x >> 1) & 0x55555555);\n x = (x & 0x33333333) + ((x >> 2) & 0x33333333);\n x = (x + (x >> 4)) & 0x0f0f0f0f;\n x = x + (x >> 8);\n x = x + (x >> 16);\n return x & 0x7f;\n }\n\n function setIn(array, idx, val, canEdit) {\n var newArray = canEdit ? array : arrCopy(array);\n newArray[idx] = val;\n return newArray;\n }\n\n function spliceIn(array, idx, val, canEdit) {\n var newLen = array.length + 1;\n if (canEdit && idx + 1 === newLen) {\n array[idx] = val;\n return array;\n }\n var newArray = new Array(newLen);\n var after = 0;\n for (var ii = 0; ii < newLen; ii++) {\n if (ii === idx) {\n newArray[ii] = val;\n after = -1;\n } else {\n newArray[ii] = array[ii + after];\n }\n }\n return newArray;\n }\n\n function spliceOut(array, idx, canEdit) {\n var newLen = array.length - 1;\n if (canEdit && idx === newLen) {\n array.pop();\n return array;\n }\n var newArray = new Array(newLen);\n var after = 0;\n for (var ii = 0; ii < newLen; ii++) {\n if (ii === idx) {\n after = 1;\n }\n newArray[ii] = array[ii + after];\n }\n return newArray;\n }\n\n var MAX_ARRAY_MAP_SIZE = SIZE / 4;\n var MAX_BITMAP_INDEXED_SIZE = SIZE / 2;\n var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4;\n\n createClass(List, IndexedCollection);\n\n // @pragma Construction\n\n function List(value) {\n var empty = emptyList();\n if (value === null || value === undefined) {\n return empty;\n }\n if (isList(value)) {\n return value;\n }\n var iter = IndexedIterable(value);\n var size = iter.size;\n if (size === 0) {\n return empty;\n }\n assertNotInfinite(size);\n if (size > 0 && size < SIZE) {\n return makeList(0, size, SHIFT, null, new VNode(iter.toArray()));\n }\n return empty.withMutations(function(list ) {\n list.setSize(size);\n iter.forEach(function(v, i) {return list.set(i, v)});\n });\n }\n\n List.of = function(/*...values*/) {\n return this(arguments);\n };\n\n List.prototype.toString = function() {\n return this.__toString('List [', ']');\n };\n\n // @pragma Access\n\n List.prototype.get = function(index, notSetValue) {\n index = wrapIndex(this, index);\n if (index >= 0 && index < this.size) {\n index += this._origin;\n var node = listNodeFor(this, index);\n return node && node.array[index & MASK];\n }\n return notSetValue;\n };\n\n // @pragma Modification\n\n List.prototype.set = function(index, value) {\n return updateList(this, index, value);\n };\n\n List.prototype.remove = function(index) {\n return !this.has(index) ? this :\n index === 0 ? this.shift() :\n index === this.size - 1 ? this.pop() :\n this.splice(index, 1);\n };\n\n List.prototype.insert = function(index, value) {\n return this.splice(index, 0, value);\n };\n\n List.prototype.clear = function() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = this._origin = this._capacity = 0;\n this._level = SHIFT;\n this._root = this._tail = null;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyList();\n };\n\n List.prototype.push = function(/*...values*/) {\n var values = arguments;\n var oldSize = this.size;\n return this.withMutations(function(list ) {\n setListBounds(list, 0, oldSize + values.length);\n for (var ii = 0; ii < values.length; ii++) {\n list.set(oldSize + ii, values[ii]);\n }\n });\n };\n\n List.prototype.pop = function() {\n return setListBounds(this, 0, -1);\n };\n\n List.prototype.unshift = function(/*...values*/) {\n var values = arguments;\n return this.withMutations(function(list ) {\n setListBounds(list, -values.length);\n for (var ii = 0; ii < values.length; ii++) {\n list.set(ii, values[ii]);\n }\n });\n };\n\n List.prototype.shift = function() {\n return setListBounds(this, 1);\n };\n\n // @pragma Composition\n\n List.prototype.merge = function(/*...iters*/) {\n return mergeIntoListWith(this, undefined, arguments);\n };\n\n List.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return mergeIntoListWith(this, merger, iters);\n };\n\n List.prototype.mergeDeep = function(/*...iters*/) {\n return mergeIntoListWith(this, deepMerger, arguments);\n };\n\n List.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return mergeIntoListWith(this, deepMergerWith(merger), iters);\n };\n\n List.prototype.setSize = function(size) {\n return setListBounds(this, 0, size);\n };\n\n // @pragma Iteration\n\n List.prototype.slice = function(begin, end) {\n var size = this.size;\n if (wholeSlice(begin, end, size)) {\n return this;\n }\n return setListBounds(\n this,\n resolveBegin(begin, size),\n resolveEnd(end, size)\n );\n };\n\n List.prototype.__iterator = function(type, reverse) {\n var index = 0;\n var values = iterateList(this, reverse);\n return new Iterator(function() {\n var value = values();\n return value === DONE ?\n iteratorDone() :\n iteratorValue(type, index++, value);\n });\n };\n\n List.prototype.__iterate = function(fn, reverse) {\n var index = 0;\n var values = iterateList(this, reverse);\n var value;\n while ((value = values()) !== DONE) {\n if (fn(value, index++, this) === false) {\n break;\n }\n }\n return index;\n };\n\n List.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n this.__ownerID = ownerID;\n return this;\n }\n return makeList(this._origin, this._capacity, this._level, this._root, this._tail, ownerID, this.__hash);\n };\n\n\n function isList(maybeList) {\n return !!(maybeList && maybeList[IS_LIST_SENTINEL]);\n }\n\n List.isList = isList;\n\n var IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@';\n\n var ListPrototype = List.prototype;\n ListPrototype[IS_LIST_SENTINEL] = true;\n ListPrototype[DELETE] = ListPrototype.remove;\n ListPrototype.setIn = MapPrototype.setIn;\n ListPrototype.deleteIn =\n ListPrototype.removeIn = MapPrototype.removeIn;\n ListPrototype.update = MapPrototype.update;\n ListPrototype.updateIn = MapPrototype.updateIn;\n ListPrototype.mergeIn = MapPrototype.mergeIn;\n ListPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;\n ListPrototype.withMutations = MapPrototype.withMutations;\n ListPrototype.asMutable = MapPrototype.asMutable;\n ListPrototype.asImmutable = MapPrototype.asImmutable;\n ListPrototype.wasAltered = MapPrototype.wasAltered;\n\n\n\n function VNode(array, ownerID) {\n this.array = array;\n this.ownerID = ownerID;\n }\n\n // TODO: seems like these methods are very similar\n\n VNode.prototype.removeBefore = function(ownerID, level, index) {\n if (index === level ? 1 << level : 0 || this.array.length === 0) {\n return this;\n }\n var originIndex = (index >>> level) & MASK;\n if (originIndex >= this.array.length) {\n return new VNode([], ownerID);\n }\n var removingFirst = originIndex === 0;\n var newChild;\n if (level > 0) {\n var oldChild = this.array[originIndex];\n newChild = oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index);\n if (newChild === oldChild && removingFirst) {\n return this;\n }\n }\n if (removingFirst && !newChild) {\n return this;\n }\n var editable = editableVNode(this, ownerID);\n if (!removingFirst) {\n for (var ii = 0; ii < originIndex; ii++) {\n editable.array[ii] = undefined;\n }\n }\n if (newChild) {\n editable.array[originIndex] = newChild;\n }\n return editable;\n };\n\n VNode.prototype.removeAfter = function(ownerID, level, index) {\n if (index === (level ? 1 << level : 0) || this.array.length === 0) {\n return this;\n }\n var sizeIndex = ((index - 1) >>> level) & MASK;\n if (sizeIndex >= this.array.length) {\n return this;\n }\n\n var newChild;\n if (level > 0) {\n var oldChild = this.array[sizeIndex];\n newChild = oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index);\n if (newChild === oldChild && sizeIndex === this.array.length - 1) {\n return this;\n }\n }\n\n var editable = editableVNode(this, ownerID);\n editable.array.splice(sizeIndex + 1);\n if (newChild) {\n editable.array[sizeIndex] = newChild;\n }\n return editable;\n };\n\n\n\n var DONE = {};\n\n function iterateList(list, reverse) {\n var left = list._origin;\n var right = list._capacity;\n var tailPos = getTailOffset(right);\n var tail = list._tail;\n\n return iterateNodeOrLeaf(list._root, list._level, 0);\n\n function iterateNodeOrLeaf(node, level, offset) {\n return level === 0 ?\n iterateLeaf(node, offset) :\n iterateNode(node, level, offset);\n }\n\n function iterateLeaf(node, offset) {\n var array = offset === tailPos ? tail && tail.array : node && node.array;\n var from = offset > left ? 0 : left - offset;\n var to = right - offset;\n if (to > SIZE) {\n to = SIZE;\n }\n return function() {\n if (from === to) {\n return DONE;\n }\n var idx = reverse ? --to : from++;\n return array && array[idx];\n };\n }\n\n function iterateNode(node, level, offset) {\n var values;\n var array = node && node.array;\n var from = offset > left ? 0 : (left - offset) >> level;\n var to = ((right - offset) >> level) + 1;\n if (to > SIZE) {\n to = SIZE;\n }\n return function() {\n do {\n if (values) {\n var value = values();\n if (value !== DONE) {\n return value;\n }\n values = null;\n }\n if (from === to) {\n return DONE;\n }\n var idx = reverse ? --to : from++;\n values = iterateNodeOrLeaf(\n array && array[idx], level - SHIFT, offset + (idx << level)\n );\n } while (true);\n };\n }\n }\n\n function makeList(origin, capacity, level, root, tail, ownerID, hash) {\n var list = Object.create(ListPrototype);\n list.size = capacity - origin;\n list._origin = origin;\n list._capacity = capacity;\n list._level = level;\n list._root = root;\n list._tail = tail;\n list.__ownerID = ownerID;\n list.__hash = hash;\n list.__altered = false;\n return list;\n }\n\n var EMPTY_LIST;\n function emptyList() {\n return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT));\n }\n\n function updateList(list, index, value) {\n index = wrapIndex(list, index);\n\n if (index !== index) {\n return list;\n }\n\n if (index >= list.size || index < 0) {\n return list.withMutations(function(list ) {\n index < 0 ?\n setListBounds(list, index).set(0, value) :\n setListBounds(list, 0, index + 1).set(index, value)\n });\n }\n\n index += list._origin;\n\n var newTail = list._tail;\n var newRoot = list._root;\n var didAlter = MakeRef(DID_ALTER);\n if (index >= getTailOffset(list._capacity)) {\n newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter);\n } else {\n newRoot = updateVNode(newRoot, list.__ownerID, list._level, index, value, didAlter);\n }\n\n if (!didAlter.value) {\n return list;\n }\n\n if (list.__ownerID) {\n list._root = newRoot;\n list._tail = newTail;\n list.__hash = undefined;\n list.__altered = true;\n return list;\n }\n return makeList(list._origin, list._capacity, list._level, newRoot, newTail);\n }\n\n function updateVNode(node, ownerID, level, index, value, didAlter) {\n var idx = (index >>> level) & MASK;\n var nodeHas = node && idx < node.array.length;\n if (!nodeHas && value === undefined) {\n return node;\n }\n\n var newNode;\n\n if (level > 0) {\n var lowerNode = node && node.array[idx];\n var newLowerNode = updateVNode(lowerNode, ownerID, level - SHIFT, index, value, didAlter);\n if (newLowerNode === lowerNode) {\n return node;\n }\n newNode = editableVNode(node, ownerID);\n newNode.array[idx] = newLowerNode;\n return newNode;\n }\n\n if (nodeHas && node.array[idx] === value) {\n return node;\n }\n\n SetRef(didAlter);\n\n newNode = editableVNode(node, ownerID);\n if (value === undefined && idx === newNode.array.length - 1) {\n newNode.array.pop();\n } else {\n newNode.array[idx] = value;\n }\n return newNode;\n }\n\n function editableVNode(node, ownerID) {\n if (ownerID && node && ownerID === node.ownerID) {\n return node;\n }\n return new VNode(node ? node.array.slice() : [], ownerID);\n }\n\n function listNodeFor(list, rawIndex) {\n if (rawIndex >= getTailOffset(list._capacity)) {\n return list._tail;\n }\n if (rawIndex < 1 << (list._level + SHIFT)) {\n var node = list._root;\n var level = list._level;\n while (node && level > 0) {\n node = node.array[(rawIndex >>> level) & MASK];\n level -= SHIFT;\n }\n return node;\n }\n }\n\n function setListBounds(list, begin, end) {\n // Sanitize begin & end using this shorthand for ToInt32(argument)\n // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n if (begin !== undefined) {\n begin = begin | 0;\n }\n if (end !== undefined) {\n end = end | 0;\n }\n var owner = list.__ownerID || new OwnerID();\n var oldOrigin = list._origin;\n var oldCapacity = list._capacity;\n var newOrigin = oldOrigin + begin;\n var newCapacity = end === undefined ? oldCapacity : end < 0 ? oldCapacity + end : oldOrigin + end;\n if (newOrigin === oldOrigin && newCapacity === oldCapacity) {\n return list;\n }\n\n // If it's going to end after it starts, it's empty.\n if (newOrigin >= newCapacity) {\n return list.clear();\n }\n\n var newLevel = list._level;\n var newRoot = list._root;\n\n // New origin might need creating a higher root.\n var offsetShift = 0;\n while (newOrigin + offsetShift < 0) {\n newRoot = new VNode(newRoot && newRoot.array.length ? [undefined, newRoot] : [], owner);\n newLevel += SHIFT;\n offsetShift += 1 << newLevel;\n }\n if (offsetShift) {\n newOrigin += offsetShift;\n oldOrigin += offsetShift;\n newCapacity += offsetShift;\n oldCapacity += offsetShift;\n }\n\n var oldTailOffset = getTailOffset(oldCapacity);\n var newTailOffset = getTailOffset(newCapacity);\n\n // New size might need creating a higher root.\n while (newTailOffset >= 1 << (newLevel + SHIFT)) {\n newRoot = new VNode(newRoot && newRoot.array.length ? [newRoot] : [], owner);\n newLevel += SHIFT;\n }\n\n // Locate or create the new tail.\n var oldTail = list._tail;\n var newTail = newTailOffset < oldTailOffset ?\n listNodeFor(list, newCapacity - 1) :\n newTailOffset > oldTailOffset ? new VNode([], owner) : oldTail;\n\n // Merge Tail into tree.\n if (oldTail && newTailOffset > oldTailOffset && newOrigin < oldCapacity && oldTail.array.length) {\n newRoot = editableVNode(newRoot, owner);\n var node = newRoot;\n for (var level = newLevel; level > SHIFT; level -= SHIFT) {\n var idx = (oldTailOffset >>> level) & MASK;\n node = node.array[idx] = editableVNode(node.array[idx], owner);\n }\n node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail;\n }\n\n // If the size has been reduced, there's a chance the tail needs to be trimmed.\n if (newCapacity < oldCapacity) {\n newTail = newTail && newTail.removeAfter(owner, 0, newCapacity);\n }\n\n // If the new origin is within the tail, then we do not need a root.\n if (newOrigin >= newTailOffset) {\n newOrigin -= newTailOffset;\n newCapacity -= newTailOffset;\n newLevel = SHIFT;\n newRoot = null;\n newTail = newTail && newTail.removeBefore(owner, 0, newOrigin);\n\n // Otherwise, if the root has been trimmed, garbage collect.\n } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) {\n offsetShift = 0;\n\n // Identify the new top root node of the subtree of the old root.\n while (newRoot) {\n var beginIndex = (newOrigin >>> newLevel) & MASK;\n if (beginIndex !== (newTailOffset >>> newLevel) & MASK) {\n break;\n }\n if (beginIndex) {\n offsetShift += (1 << newLevel) * beginIndex;\n }\n newLevel -= SHIFT;\n newRoot = newRoot.array[beginIndex];\n }\n\n // Trim the new sides of the new root.\n if (newRoot && newOrigin > oldOrigin) {\n newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift);\n }\n if (newRoot && newTailOffset < oldTailOffset) {\n newRoot = newRoot.removeAfter(owner, newLevel, newTailOffset - offsetShift);\n }\n if (offsetShift) {\n newOrigin -= offsetShift;\n newCapacity -= offsetShift;\n }\n }\n\n if (list.__ownerID) {\n list.size = newCapacity - newOrigin;\n list._origin = newOrigin;\n list._capacity = newCapacity;\n list._level = newLevel;\n list._root = newRoot;\n list._tail = newTail;\n list.__hash = undefined;\n list.__altered = true;\n return list;\n }\n return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail);\n }\n\n function mergeIntoListWith(list, merger, iterables) {\n var iters = [];\n var maxSize = 0;\n for (var ii = 0; ii < iterables.length; ii++) {\n var value = iterables[ii];\n var iter = IndexedIterable(value);\n if (iter.size > maxSize) {\n maxSize = iter.size;\n }\n if (!isIterable(value)) {\n iter = iter.map(function(v ) {return fromJS(v)});\n }\n iters.push(iter);\n }\n if (maxSize > list.size) {\n list = list.setSize(maxSize);\n }\n return mergeIntoCollectionWith(list, merger, iters);\n }\n\n function getTailOffset(size) {\n return size < SIZE ? 0 : (((size - 1) >>> SHIFT) << SHIFT);\n }\n\n createClass(OrderedMap, Map);\n\n // @pragma Construction\n\n function OrderedMap(value) {\n return value === null || value === undefined ? emptyOrderedMap() :\n isOrderedMap(value) ? value :\n emptyOrderedMap().withMutations(function(map ) {\n var iter = KeyedIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function(v, k) {return map.set(k, v)});\n });\n }\n\n OrderedMap.of = function(/*...values*/) {\n return this(arguments);\n };\n\n OrderedMap.prototype.toString = function() {\n return this.__toString('OrderedMap {', '}');\n };\n\n // @pragma Access\n\n OrderedMap.prototype.get = function(k, notSetValue) {\n var index = this._map.get(k);\n return index !== undefined ? this._list.get(index)[1] : notSetValue;\n };\n\n // @pragma Modification\n\n OrderedMap.prototype.clear = function() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._map.clear();\n this._list.clear();\n return this;\n }\n return emptyOrderedMap();\n };\n\n OrderedMap.prototype.set = function(k, v) {\n return updateOrderedMap(this, k, v);\n };\n\n OrderedMap.prototype.remove = function(k) {\n return updateOrderedMap(this, k, NOT_SET);\n };\n\n OrderedMap.prototype.wasAltered = function() {\n return this._map.wasAltered() || this._list.wasAltered();\n };\n\n OrderedMap.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return this._list.__iterate(\n function(entry ) {return entry && fn(entry[1], entry[0], this$0)},\n reverse\n );\n };\n\n OrderedMap.prototype.__iterator = function(type, reverse) {\n return this._list.fromEntrySeq().__iterator(type, reverse);\n };\n\n OrderedMap.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map.__ensureOwner(ownerID);\n var newList = this._list.__ensureOwner(ownerID);\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._map = newMap;\n this._list = newList;\n return this;\n }\n return makeOrderedMap(newMap, newList, ownerID, this.__hash);\n };\n\n\n function isOrderedMap(maybeOrderedMap) {\n return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap);\n }\n\n OrderedMap.isOrderedMap = isOrderedMap;\n\n OrderedMap.prototype[IS_ORDERED_SENTINEL] = true;\n OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove;\n\n\n\n function makeOrderedMap(map, list, ownerID, hash) {\n var omap = Object.create(OrderedMap.prototype);\n omap.size = map ? map.size : 0;\n omap._map = map;\n omap._list = list;\n omap.__ownerID = ownerID;\n omap.__hash = hash;\n return omap;\n }\n\n var EMPTY_ORDERED_MAP;\n function emptyOrderedMap() {\n return EMPTY_ORDERED_MAP || (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList()));\n }\n\n function updateOrderedMap(omap, k, v) {\n var map = omap._map;\n var list = omap._list;\n var i = map.get(k);\n var has = i !== undefined;\n var newMap;\n var newList;\n if (v === NOT_SET) { // removed\n if (!has) {\n return omap;\n }\n if (list.size >= SIZE && list.size >= map.size * 2) {\n newList = list.filter(function(entry, idx) {return entry !== undefined && i !== idx});\n newMap = newList.toKeyedSeq().map(function(entry ) {return entry[0]}).flip().toMap();\n if (omap.__ownerID) {\n newMap.__ownerID = newList.__ownerID = omap.__ownerID;\n }\n } else {\n newMap = map.remove(k);\n newList = i === list.size - 1 ? list.pop() : list.set(i, undefined);\n }\n } else {\n if (has) {\n if (v === list.get(i)[1]) {\n return omap;\n }\n newMap = map;\n newList = list.set(i, [k, v]);\n } else {\n newMap = map.set(k, list.size);\n newList = list.set(list.size, [k, v]);\n }\n }\n if (omap.__ownerID) {\n omap.size = newMap.size;\n omap._map = newMap;\n omap._list = newList;\n omap.__hash = undefined;\n return omap;\n }\n return makeOrderedMap(newMap, newList);\n }\n\n createClass(ToKeyedSequence, KeyedSeq);\n function ToKeyedSequence(indexed, useKeys) {\n this._iter = indexed;\n this._useKeys = useKeys;\n this.size = indexed.size;\n }\n\n ToKeyedSequence.prototype.get = function(key, notSetValue) {\n return this._iter.get(key, notSetValue);\n };\n\n ToKeyedSequence.prototype.has = function(key) {\n return this._iter.has(key);\n };\n\n ToKeyedSequence.prototype.valueSeq = function() {\n return this._iter.valueSeq();\n };\n\n ToKeyedSequence.prototype.reverse = function() {var this$0 = this;\n var reversedSequence = reverseFactory(this, true);\n if (!this._useKeys) {\n reversedSequence.valueSeq = function() {return this$0._iter.toSeq().reverse()};\n }\n return reversedSequence;\n };\n\n ToKeyedSequence.prototype.map = function(mapper, context) {var this$0 = this;\n var mappedSequence = mapFactory(this, mapper, context);\n if (!this._useKeys) {\n mappedSequence.valueSeq = function() {return this$0._iter.toSeq().map(mapper, context)};\n }\n return mappedSequence;\n };\n\n ToKeyedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n var ii;\n return this._iter.__iterate(\n this._useKeys ?\n function(v, k) {return fn(v, k, this$0)} :\n ((ii = reverse ? resolveSize(this) : 0),\n function(v ) {return fn(v, reverse ? --ii : ii++, this$0)}),\n reverse\n );\n };\n\n ToKeyedSequence.prototype.__iterator = function(type, reverse) {\n if (this._useKeys) {\n return this._iter.__iterator(type, reverse);\n }\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n var ii = reverse ? resolveSize(this) : 0;\n return new Iterator(function() {\n var step = iterator.next();\n return step.done ? step :\n iteratorValue(type, reverse ? --ii : ii++, step.value, step);\n });\n };\n\n ToKeyedSequence.prototype[IS_ORDERED_SENTINEL] = true;\n\n\n createClass(ToIndexedSequence, IndexedSeq);\n function ToIndexedSequence(iter) {\n this._iter = iter;\n this.size = iter.size;\n }\n\n ToIndexedSequence.prototype.includes = function(value) {\n return this._iter.includes(value);\n };\n\n ToIndexedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n var iterations = 0;\n return this._iter.__iterate(function(v ) {return fn(v, iterations++, this$0)}, reverse);\n };\n\n ToIndexedSequence.prototype.__iterator = function(type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n var iterations = 0;\n return new Iterator(function() {\n var step = iterator.next();\n return step.done ? step :\n iteratorValue(type, iterations++, step.value, step)\n });\n };\n\n\n\n createClass(ToSetSequence, SetSeq);\n function ToSetSequence(iter) {\n this._iter = iter;\n this.size = iter.size;\n }\n\n ToSetSequence.prototype.has = function(key) {\n return this._iter.includes(key);\n };\n\n ToSetSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return this._iter.__iterate(function(v ) {return fn(v, v, this$0)}, reverse);\n };\n\n ToSetSequence.prototype.__iterator = function(type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n return new Iterator(function() {\n var step = iterator.next();\n return step.done ? step :\n iteratorValue(type, step.value, step.value, step);\n });\n };\n\n\n\n createClass(FromEntriesSequence, KeyedSeq);\n function FromEntriesSequence(entries) {\n this._iter = entries;\n this.size = entries.size;\n }\n\n FromEntriesSequence.prototype.entrySeq = function() {\n return this._iter.toSeq();\n };\n\n FromEntriesSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return this._iter.__iterate(function(entry ) {\n // Check if entry exists first so array access doesn't throw for holes\n // in the parent iteration.\n if (entry) {\n validateEntry(entry);\n var indexedIterable = isIterable(entry);\n return fn(\n indexedIterable ? entry.get(1) : entry[1],\n indexedIterable ? entry.get(0) : entry[0],\n this$0\n );\n }\n }, reverse);\n };\n\n FromEntriesSequence.prototype.__iterator = function(type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n return new Iterator(function() {\n while (true) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n // Check if entry exists first so array access doesn't throw for holes\n // in the parent iteration.\n if (entry) {\n validateEntry(entry);\n var indexedIterable = isIterable(entry);\n return iteratorValue(\n type,\n indexedIterable ? entry.get(0) : entry[0],\n indexedIterable ? entry.get(1) : entry[1],\n step\n );\n }\n }\n });\n };\n\n\n ToIndexedSequence.prototype.cacheResult =\n ToKeyedSequence.prototype.cacheResult =\n ToSetSequence.prototype.cacheResult =\n FromEntriesSequence.prototype.cacheResult =\n cacheResultThrough;\n\n\n function flipFactory(iterable) {\n var flipSequence = makeSequence(iterable);\n flipSequence._iter = iterable;\n flipSequence.size = iterable.size;\n flipSequence.flip = function() {return iterable};\n flipSequence.reverse = function () {\n var reversedSequence = iterable.reverse.apply(this); // super.reverse()\n reversedSequence.flip = function() {return iterable.reverse()};\n return reversedSequence;\n };\n flipSequence.has = function(key ) {return iterable.includes(key)};\n flipSequence.includes = function(key ) {return iterable.has(key)};\n flipSequence.cacheResult = cacheResultThrough;\n flipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n return iterable.__iterate(function(v, k) {return fn(k, v, this$0) !== false}, reverse);\n }\n flipSequence.__iteratorUncached = function(type, reverse) {\n if (type === ITERATE_ENTRIES) {\n var iterator = iterable.__iterator(type, reverse);\n return new Iterator(function() {\n var step = iterator.next();\n if (!step.done) {\n var k = step.value[0];\n step.value[0] = step.value[1];\n step.value[1] = k;\n }\n return step;\n });\n }\n return iterable.__iterator(\n type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES,\n reverse\n );\n }\n return flipSequence;\n }\n\n\n function mapFactory(iterable, mapper, context) {\n var mappedSequence = makeSequence(iterable);\n mappedSequence.size = iterable.size;\n mappedSequence.has = function(key ) {return iterable.has(key)};\n mappedSequence.get = function(key, notSetValue) {\n var v = iterable.get(key, NOT_SET);\n return v === NOT_SET ?\n notSetValue :\n mapper.call(context, v, key, iterable);\n };\n mappedSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n return iterable.__iterate(\n function(v, k, c) {return fn(mapper.call(context, v, k, c), k, this$0) !== false},\n reverse\n );\n }\n mappedSequence.__iteratorUncached = function (type, reverse) {\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n return new Iterator(function() {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var key = entry[0];\n return iteratorValue(\n type,\n key,\n mapper.call(context, entry[1], key, iterable),\n step\n );\n });\n }\n return mappedSequence;\n }\n\n\n function reverseFactory(iterable, useKeys) {\n var reversedSequence = makeSequence(iterable);\n reversedSequence._iter = iterable;\n reversedSequence.size = iterable.size;\n reversedSequence.reverse = function() {return iterable};\n if (iterable.flip) {\n reversedSequence.flip = function () {\n var flipSequence = flipFactory(iterable);\n flipSequence.reverse = function() {return iterable.flip()};\n return flipSequence;\n };\n }\n reversedSequence.get = function(key, notSetValue) \n {return iterable.get(useKeys ? key : -1 - key, notSetValue)};\n reversedSequence.has = function(key )\n {return iterable.has(useKeys ? key : -1 - key)};\n reversedSequence.includes = function(value ) {return iterable.includes(value)};\n reversedSequence.cacheResult = cacheResultThrough;\n reversedSequence.__iterate = function (fn, reverse) {var this$0 = this;\n return iterable.__iterate(function(v, k) {return fn(v, k, this$0)}, !reverse);\n };\n reversedSequence.__iterator =\n function(type, reverse) {return iterable.__iterator(type, !reverse)};\n return reversedSequence;\n }\n\n\n function filterFactory(iterable, predicate, context, useKeys) {\n var filterSequence = makeSequence(iterable);\n if (useKeys) {\n filterSequence.has = function(key ) {\n var v = iterable.get(key, NOT_SET);\n return v !== NOT_SET && !!predicate.call(context, v, key, iterable);\n };\n filterSequence.get = function(key, notSetValue) {\n var v = iterable.get(key, NOT_SET);\n return v !== NOT_SET && predicate.call(context, v, key, iterable) ?\n v : notSetValue;\n };\n }\n filterSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n var iterations = 0;\n iterable.__iterate(function(v, k, c) {\n if (predicate.call(context, v, k, c)) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$0);\n }\n }, reverse);\n return iterations;\n };\n filterSequence.__iteratorUncached = function (type, reverse) {\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n var iterations = 0;\n return new Iterator(function() {\n while (true) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var key = entry[0];\n var value = entry[1];\n if (predicate.call(context, value, key, iterable)) {\n return iteratorValue(type, useKeys ? key : iterations++, value, step);\n }\n }\n });\n }\n return filterSequence;\n }\n\n\n function countByFactory(iterable, grouper, context) {\n var groups = Map().asMutable();\n iterable.__iterate(function(v, k) {\n groups.update(\n grouper.call(context, v, k, iterable),\n 0,\n function(a ) {return a + 1}\n );\n });\n return groups.asImmutable();\n }\n\n\n function groupByFactory(iterable, grouper, context) {\n var isKeyedIter = isKeyed(iterable);\n var groups = (isOrdered(iterable) ? OrderedMap() : Map()).asMutable();\n iterable.__iterate(function(v, k) {\n groups.update(\n grouper.call(context, v, k, iterable),\n function(a ) {return (a = a || [], a.push(isKeyedIter ? [k, v] : v), a)}\n );\n });\n var coerce = iterableClass(iterable);\n return groups.map(function(arr ) {return reify(iterable, coerce(arr))});\n }\n\n\n function sliceFactory(iterable, begin, end, useKeys) {\n var originalSize = iterable.size;\n\n // Sanitize begin & end using this shorthand for ToInt32(argument)\n // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n if (begin !== undefined) {\n begin = begin | 0;\n }\n if (end !== undefined) {\n end = end | 0;\n }\n\n if (wholeSlice(begin, end, originalSize)) {\n return iterable;\n }\n\n var resolvedBegin = resolveBegin(begin, originalSize);\n var resolvedEnd = resolveEnd(end, originalSize);\n\n // begin or end will be NaN if they were provided as negative numbers and\n // this iterable's size is unknown. In that case, cache first so there is\n // a known size and these do not resolve to NaN.\n if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) {\n return sliceFactory(iterable.toSeq().cacheResult(), begin, end, useKeys);\n }\n\n // Note: resolvedEnd is undefined when the original sequence's length is\n // unknown and this slice did not supply an end and should contain all\n // elements after resolvedBegin.\n // In that case, resolvedSize will be NaN and sliceSize will remain undefined.\n var resolvedSize = resolvedEnd - resolvedBegin;\n var sliceSize;\n if (resolvedSize === resolvedSize) {\n sliceSize = resolvedSize < 0 ? 0 : resolvedSize;\n }\n\n var sliceSeq = makeSequence(iterable);\n\n // If iterable.size is undefined, the size of the realized sliceSeq is\n // unknown at this point unless the number of items to slice is 0\n sliceSeq.size = sliceSize === 0 ? sliceSize : iterable.size && sliceSize || undefined;\n\n if (!useKeys && isSeq(iterable) && sliceSize >= 0) {\n sliceSeq.get = function (index, notSetValue) {\n index = wrapIndex(this, index);\n return index >= 0 && index < sliceSize ?\n iterable.get(index + resolvedBegin, notSetValue) :\n notSetValue;\n }\n }\n\n sliceSeq.__iterateUncached = function(fn, reverse) {var this$0 = this;\n if (sliceSize === 0) {\n return 0;\n }\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var skipped = 0;\n var isSkipping = true;\n var iterations = 0;\n iterable.__iterate(function(v, k) {\n if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$0) !== false &&\n iterations !== sliceSize;\n }\n });\n return iterations;\n };\n\n sliceSeq.__iteratorUncached = function(type, reverse) {\n if (sliceSize !== 0 && reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n // Don't bother instantiating parent iterator if taking 0.\n var iterator = sliceSize !== 0 && iterable.__iterator(type, reverse);\n var skipped = 0;\n var iterations = 0;\n return new Iterator(function() {\n while (skipped++ < resolvedBegin) {\n iterator.next();\n }\n if (++iterations > sliceSize) {\n return iteratorDone();\n }\n var step = iterator.next();\n if (useKeys || type === ITERATE_VALUES) {\n return step;\n } else if (type === ITERATE_KEYS) {\n return iteratorValue(type, iterations - 1, undefined, step);\n } else {\n return iteratorValue(type, iterations - 1, step.value[1], step);\n }\n });\n }\n\n return sliceSeq;\n }\n\n\n function takeWhileFactory(iterable, predicate, context) {\n var takeSequence = makeSequence(iterable);\n takeSequence.__iterateUncached = function(fn, reverse) {var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterations = 0;\n iterable.__iterate(function(v, k, c) \n {return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$0)}\n );\n return iterations;\n };\n takeSequence.__iteratorUncached = function(type, reverse) {var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n var iterating = true;\n return new Iterator(function() {\n if (!iterating) {\n return iteratorDone();\n }\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var k = entry[0];\n var v = entry[1];\n if (!predicate.call(context, v, k, this$0)) {\n iterating = false;\n return iteratorDone();\n }\n return type === ITERATE_ENTRIES ? step :\n iteratorValue(type, k, v, step);\n });\n };\n return takeSequence;\n }\n\n\n function skipWhileFactory(iterable, predicate, context, useKeys) {\n var skipSequence = makeSequence(iterable);\n skipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var isSkipping = true;\n var iterations = 0;\n iterable.__iterate(function(v, k, c) {\n if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$0);\n }\n });\n return iterations;\n };\n skipSequence.__iteratorUncached = function(type, reverse) {var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n var skipping = true;\n var iterations = 0;\n return new Iterator(function() {\n var step, k, v;\n do {\n step = iterator.next();\n if (step.done) {\n if (useKeys || type === ITERATE_VALUES) {\n return step;\n } else if (type === ITERATE_KEYS) {\n return iteratorValue(type, iterations++, undefined, step);\n } else {\n return iteratorValue(type, iterations++, step.value[1], step);\n }\n }\n var entry = step.value;\n k = entry[0];\n v = entry[1];\n skipping && (skipping = predicate.call(context, v, k, this$0));\n } while (skipping);\n return type === ITERATE_ENTRIES ? step :\n iteratorValue(type, k, v, step);\n });\n };\n return skipSequence;\n }\n\n\n function concatFactory(iterable, values) {\n var isKeyedIterable = isKeyed(iterable);\n var iters = [iterable].concat(values).map(function(v ) {\n if (!isIterable(v)) {\n v = isKeyedIterable ?\n keyedSeqFromValue(v) :\n indexedSeqFromValue(Array.isArray(v) ? v : [v]);\n } else if (isKeyedIterable) {\n v = KeyedIterable(v);\n }\n return v;\n }).filter(function(v ) {return v.size !== 0});\n\n if (iters.length === 0) {\n return iterable;\n }\n\n if (iters.length === 1) {\n var singleton = iters[0];\n if (singleton === iterable ||\n isKeyedIterable && isKeyed(singleton) ||\n isIndexed(iterable) && isIndexed(singleton)) {\n return singleton;\n }\n }\n\n var concatSeq = new ArraySeq(iters);\n if (isKeyedIterable) {\n concatSeq = concatSeq.toKeyedSeq();\n } else if (!isIndexed(iterable)) {\n concatSeq = concatSeq.toSetSeq();\n }\n concatSeq = concatSeq.flatten(true);\n concatSeq.size = iters.reduce(\n function(sum, seq) {\n if (sum !== undefined) {\n var size = seq.size;\n if (size !== undefined) {\n return sum + size;\n }\n }\n },\n 0\n );\n return concatSeq;\n }\n\n\n function flattenFactory(iterable, depth, useKeys) {\n var flatSequence = makeSequence(iterable);\n flatSequence.__iterateUncached = function(fn, reverse) {\n var iterations = 0;\n var stopped = false;\n function flatDeep(iter, currentDepth) {var this$0 = this;\n iter.__iterate(function(v, k) {\n if ((!depth || currentDepth < depth) && isIterable(v)) {\n flatDeep(v, currentDepth + 1);\n } else if (fn(v, useKeys ? k : iterations++, this$0) === false) {\n stopped = true;\n }\n return !stopped;\n }, reverse);\n }\n flatDeep(iterable, 0);\n return iterations;\n }\n flatSequence.__iteratorUncached = function(type, reverse) {\n var iterator = iterable.__iterator(type, reverse);\n var stack = [];\n var iterations = 0;\n return new Iterator(function() {\n while (iterator) {\n var step = iterator.next();\n if (step.done !== false) {\n iterator = stack.pop();\n continue;\n }\n var v = step.value;\n if (type === ITERATE_ENTRIES) {\n v = v[1];\n }\n if ((!depth || stack.length < depth) && isIterable(v)) {\n stack.push(iterator);\n iterator = v.__iterator(type, reverse);\n } else {\n return useKeys ? step : iteratorValue(type, iterations++, v, step);\n }\n }\n return iteratorDone();\n });\n }\n return flatSequence;\n }\n\n\n function flatMapFactory(iterable, mapper, context) {\n var coerce = iterableClass(iterable);\n return iterable.toSeq().map(\n function(v, k) {return coerce(mapper.call(context, v, k, iterable))}\n ).flatten(true);\n }\n\n\n function interposeFactory(iterable, separator) {\n var interposedSequence = makeSequence(iterable);\n interposedSequence.size = iterable.size && iterable.size * 2 -1;\n interposedSequence.__iterateUncached = function(fn, reverse) {var this$0 = this;\n var iterations = 0;\n iterable.__iterate(function(v, k) \n {return (!iterations || fn(separator, iterations++, this$0) !== false) &&\n fn(v, iterations++, this$0) !== false},\n reverse\n );\n return iterations;\n };\n interposedSequence.__iteratorUncached = function(type, reverse) {\n var iterator = iterable.__iterator(ITERATE_VALUES, reverse);\n var iterations = 0;\n var step;\n return new Iterator(function() {\n if (!step || iterations % 2) {\n step = iterator.next();\n if (step.done) {\n return step;\n }\n }\n return iterations % 2 ?\n iteratorValue(type, iterations++, separator) :\n iteratorValue(type, iterations++, step.value, step);\n });\n };\n return interposedSequence;\n }\n\n\n function sortFactory(iterable, comparator, mapper) {\n if (!comparator) {\n comparator = defaultComparator;\n }\n var isKeyedIterable = isKeyed(iterable);\n var index = 0;\n var entries = iterable.toSeq().map(\n function(v, k) {return [k, v, index++, mapper ? mapper(v, k, iterable) : v]}\n ).toArray();\n entries.sort(function(a, b) {return comparator(a[3], b[3]) || a[2] - b[2]}).forEach(\n isKeyedIterable ?\n function(v, i) { entries[i].length = 2; } :\n function(v, i) { entries[i] = v[1]; }\n );\n return isKeyedIterable ? KeyedSeq(entries) :\n isIndexed(iterable) ? IndexedSeq(entries) :\n SetSeq(entries);\n }\n\n\n function maxFactory(iterable, comparator, mapper) {\n if (!comparator) {\n comparator = defaultComparator;\n }\n if (mapper) {\n var entry = iterable.toSeq()\n .map(function(v, k) {return [v, mapper(v, k, iterable)]})\n .reduce(function(a, b) {return maxCompare(comparator, a[1], b[1]) ? b : a});\n return entry && entry[0];\n } else {\n return iterable.reduce(function(a, b) {return maxCompare(comparator, a, b) ? b : a});\n }\n }\n\n function maxCompare(comparator, a, b) {\n var comp = comparator(b, a);\n // b is considered the new max if the comparator declares them equal, but\n // they are not equal and b is in fact a nullish value.\n return (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) || comp > 0;\n }\n\n\n function zipWithFactory(keyIter, zipper, iters) {\n var zipSequence = makeSequence(keyIter);\n zipSequence.size = new ArraySeq(iters).map(function(i ) {return i.size}).min();\n // Note: this a generic base implementation of __iterate in terms of\n // __iterator which may be more generically useful in the future.\n zipSequence.__iterate = function(fn, reverse) {\n /* generic:\n var iterator = this.__iterator(ITERATE_ENTRIES, reverse);\n var step;\n var iterations = 0;\n while (!(step = iterator.next()).done) {\n iterations++;\n if (fn(step.value[1], step.value[0], this) === false) {\n break;\n }\n }\n return iterations;\n */\n // indexed:\n var iterator = this.__iterator(ITERATE_VALUES, reverse);\n var step;\n var iterations = 0;\n while (!(step = iterator.next()).done) {\n if (fn(step.value, iterations++, this) === false) {\n break;\n }\n }\n return iterations;\n };\n zipSequence.__iteratorUncached = function(type, reverse) {\n var iterators = iters.map(function(i )\n {return (i = Iterable(i), getIterator(reverse ? i.reverse() : i))}\n );\n var iterations = 0;\n var isDone = false;\n return new Iterator(function() {\n var steps;\n if (!isDone) {\n steps = iterators.map(function(i ) {return i.next()});\n isDone = steps.some(function(s ) {return s.done});\n }\n if (isDone) {\n return iteratorDone();\n }\n return iteratorValue(\n type,\n iterations++,\n zipper.apply(null, steps.map(function(s ) {return s.value}))\n );\n });\n };\n return zipSequence\n }\n\n\n // #pragma Helper Functions\n\n function reify(iter, seq) {\n return isSeq(iter) ? seq : iter.constructor(seq);\n }\n\n function validateEntry(entry) {\n if (entry !== Object(entry)) {\n throw new TypeError('Expected [K, V] tuple: ' + entry);\n }\n }\n\n function resolveSize(iter) {\n assertNotInfinite(iter.size);\n return ensureSize(iter);\n }\n\n function iterableClass(iterable) {\n return isKeyed(iterable) ? KeyedIterable :\n isIndexed(iterable) ? IndexedIterable :\n SetIterable;\n }\n\n function makeSequence(iterable) {\n return Object.create(\n (\n isKeyed(iterable) ? KeyedSeq :\n isIndexed(iterable) ? IndexedSeq :\n SetSeq\n ).prototype\n );\n }\n\n function cacheResultThrough() {\n if (this._iter.cacheResult) {\n this._iter.cacheResult();\n this.size = this._iter.size;\n return this;\n } else {\n return Seq.prototype.cacheResult.call(this);\n }\n }\n\n function defaultComparator(a, b) {\n return a > b ? 1 : a < b ? -1 : 0;\n }\n\n function forceIterator(keyPath) {\n var iter = getIterator(keyPath);\n if (!iter) {\n // Array might not be iterable in this environment, so we need a fallback\n // to our wrapped type.\n if (!isArrayLike(keyPath)) {\n throw new TypeError('Expected iterable or array-like: ' + keyPath);\n }\n iter = getIterator(Iterable(keyPath));\n }\n return iter;\n }\n\n createClass(Record, KeyedCollection);\n\n function Record(defaultValues, name) {\n var hasInitialized;\n\n var RecordType = function Record(values) {\n if (values instanceof RecordType) {\n return values;\n }\n if (!(this instanceof RecordType)) {\n return new RecordType(values);\n }\n if (!hasInitialized) {\n hasInitialized = true;\n var keys = Object.keys(defaultValues);\n setProps(RecordTypePrototype, keys);\n RecordTypePrototype.size = keys.length;\n RecordTypePrototype._name = name;\n RecordTypePrototype._keys = keys;\n RecordTypePrototype._defaultValues = defaultValues;\n }\n this._map = Map(values);\n };\n\n var RecordTypePrototype = RecordType.prototype = Object.create(RecordPrototype);\n RecordTypePrototype.constructor = RecordType;\n\n return RecordType;\n }\n\n Record.prototype.toString = function() {\n return this.__toString(recordName(this) + ' {', '}');\n };\n\n // @pragma Access\n\n Record.prototype.has = function(k) {\n return this._defaultValues.hasOwnProperty(k);\n };\n\n Record.prototype.get = function(k, notSetValue) {\n if (!this.has(k)) {\n return notSetValue;\n }\n var defaultVal = this._defaultValues[k];\n return this._map ? this._map.get(k, defaultVal) : defaultVal;\n };\n\n // @pragma Modification\n\n Record.prototype.clear = function() {\n if (this.__ownerID) {\n this._map && this._map.clear();\n return this;\n }\n var RecordType = this.constructor;\n return RecordType._empty || (RecordType._empty = makeRecord(this, emptyMap()));\n };\n\n Record.prototype.set = function(k, v) {\n if (!this.has(k)) {\n throw new Error('Cannot set unknown key \"' + k + '\" on ' + recordName(this));\n }\n var newMap = this._map && this._map.set(k, v);\n if (this.__ownerID || newMap === this._map) {\n return this;\n }\n return makeRecord(this, newMap);\n };\n\n Record.prototype.remove = function(k) {\n if (!this.has(k)) {\n return this;\n }\n var newMap = this._map && this._map.remove(k);\n if (this.__ownerID || newMap === this._map) {\n return this;\n }\n return makeRecord(this, newMap);\n };\n\n Record.prototype.wasAltered = function() {\n return this._map.wasAltered();\n };\n\n Record.prototype.__iterator = function(type, reverse) {var this$0 = this;\n return KeyedIterable(this._defaultValues).map(function(_, k) {return this$0.get(k)}).__iterator(type, reverse);\n };\n\n Record.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return KeyedIterable(this._defaultValues).map(function(_, k) {return this$0.get(k)}).__iterate(fn, reverse);\n };\n\n Record.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map && this._map.__ensureOwner(ownerID);\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._map = newMap;\n return this;\n }\n return makeRecord(this, newMap, ownerID);\n };\n\n\n var RecordPrototype = Record.prototype;\n RecordPrototype[DELETE] = RecordPrototype.remove;\n RecordPrototype.deleteIn =\n RecordPrototype.removeIn = MapPrototype.removeIn;\n RecordPrototype.merge = MapPrototype.merge;\n RecordPrototype.mergeWith = MapPrototype.mergeWith;\n RecordPrototype.mergeIn = MapPrototype.mergeIn;\n RecordPrototype.mergeDeep = MapPrototype.mergeDeep;\n RecordPrototype.mergeDeepWith = MapPrototype.mergeDeepWith;\n RecordPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;\n RecordPrototype.setIn = MapPrototype.setIn;\n RecordPrototype.update = MapPrototype.update;\n RecordPrototype.updateIn = MapPrototype.updateIn;\n RecordPrototype.withMutations = MapPrototype.withMutations;\n RecordPrototype.asMutable = MapPrototype.asMutable;\n RecordPrototype.asImmutable = MapPrototype.asImmutable;\n\n\n function makeRecord(likeRecord, map, ownerID) {\n var record = Object.create(Object.getPrototypeOf(likeRecord));\n record._map = map;\n record.__ownerID = ownerID;\n return record;\n }\n\n function recordName(record) {\n return record._name || record.constructor.name || 'Record';\n }\n\n function setProps(prototype, names) {\n try {\n names.forEach(setProp.bind(undefined, prototype));\n } catch (error) {\n // Object.defineProperty failed. Probably IE8.\n }\n }\n\n function setProp(prototype, name) {\n Object.defineProperty(prototype, name, {\n get: function() {\n return this.get(name);\n },\n set: function(value) {\n invariant(this.__ownerID, 'Cannot set on an immutable record.');\n this.set(name, value);\n }\n });\n }\n\n createClass(Set, SetCollection);\n\n // @pragma Construction\n\n function Set(value) {\n return value === null || value === undefined ? emptySet() :\n isSet(value) && !isOrdered(value) ? value :\n emptySet().withMutations(function(set ) {\n var iter = SetIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function(v ) {return set.add(v)});\n });\n }\n\n Set.of = function(/*...values*/) {\n return this(arguments);\n };\n\n Set.fromKeys = function(value) {\n return this(KeyedIterable(value).keySeq());\n };\n\n Set.prototype.toString = function() {\n return this.__toString('Set {', '}');\n };\n\n // @pragma Access\n\n Set.prototype.has = function(value) {\n return this._map.has(value);\n };\n\n // @pragma Modification\n\n Set.prototype.add = function(value) {\n return updateSet(this, this._map.set(value, true));\n };\n\n Set.prototype.remove = function(value) {\n return updateSet(this, this._map.remove(value));\n };\n\n Set.prototype.clear = function() {\n return updateSet(this, this._map.clear());\n };\n\n // @pragma Composition\n\n Set.prototype.union = function() {var iters = SLICE$0.call(arguments, 0);\n iters = iters.filter(function(x ) {return x.size !== 0});\n if (iters.length === 0) {\n return this;\n }\n if (this.size === 0 && !this.__ownerID && iters.length === 1) {\n return this.constructor(iters[0]);\n }\n return this.withMutations(function(set ) {\n for (var ii = 0; ii < iters.length; ii++) {\n SetIterable(iters[ii]).forEach(function(value ) {return set.add(value)});\n }\n });\n };\n\n Set.prototype.intersect = function() {var iters = SLICE$0.call(arguments, 0);\n if (iters.length === 0) {\n return this;\n }\n iters = iters.map(function(iter ) {return SetIterable(iter)});\n var originalSet = this;\n return this.withMutations(function(set ) {\n originalSet.forEach(function(value ) {\n if (!iters.every(function(iter ) {return iter.includes(value)})) {\n set.remove(value);\n }\n });\n });\n };\n\n Set.prototype.subtract = function() {var iters = SLICE$0.call(arguments, 0);\n if (iters.length === 0) {\n return this;\n }\n iters = iters.map(function(iter ) {return SetIterable(iter)});\n var originalSet = this;\n return this.withMutations(function(set ) {\n originalSet.forEach(function(value ) {\n if (iters.some(function(iter ) {return iter.includes(value)})) {\n set.remove(value);\n }\n });\n });\n };\n\n Set.prototype.merge = function() {\n return this.union.apply(this, arguments);\n };\n\n Set.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return this.union.apply(this, iters);\n };\n\n Set.prototype.sort = function(comparator) {\n // Late binding\n return OrderedSet(sortFactory(this, comparator));\n };\n\n Set.prototype.sortBy = function(mapper, comparator) {\n // Late binding\n return OrderedSet(sortFactory(this, comparator, mapper));\n };\n\n Set.prototype.wasAltered = function() {\n return this._map.wasAltered();\n };\n\n Set.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return this._map.__iterate(function(_, k) {return fn(k, k, this$0)}, reverse);\n };\n\n Set.prototype.__iterator = function(type, reverse) {\n return this._map.map(function(_, k) {return k}).__iterator(type, reverse);\n };\n\n Set.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map.__ensureOwner(ownerID);\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._map = newMap;\n return this;\n }\n return this.__make(newMap, ownerID);\n };\n\n\n function isSet(maybeSet) {\n return !!(maybeSet && maybeSet[IS_SET_SENTINEL]);\n }\n\n Set.isSet = isSet;\n\n var IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';\n\n var SetPrototype = Set.prototype;\n SetPrototype[IS_SET_SENTINEL] = true;\n SetPrototype[DELETE] = SetPrototype.remove;\n SetPrototype.mergeDeep = SetPrototype.merge;\n SetPrototype.mergeDeepWith = SetPrototype.mergeWith;\n SetPrototype.withMutations = MapPrototype.withMutations;\n SetPrototype.asMutable = MapPrototype.asMutable;\n SetPrototype.asImmutable = MapPrototype.asImmutable;\n\n SetPrototype.__empty = emptySet;\n SetPrototype.__make = makeSet;\n\n function updateSet(set, newMap) {\n if (set.__ownerID) {\n set.size = newMap.size;\n set._map = newMap;\n return set;\n }\n return newMap === set._map ? set :\n newMap.size === 0 ? set.__empty() :\n set.__make(newMap);\n }\n\n function makeSet(map, ownerID) {\n var set = Object.create(SetPrototype);\n set.size = map ? map.size : 0;\n set._map = map;\n set.__ownerID = ownerID;\n return set;\n }\n\n var EMPTY_SET;\n function emptySet() {\n return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap()));\n }\n\n createClass(OrderedSet, Set);\n\n // @pragma Construction\n\n function OrderedSet(value) {\n return value === null || value === undefined ? emptyOrderedSet() :\n isOrderedSet(value) ? value :\n emptyOrderedSet().withMutations(function(set ) {\n var iter = SetIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function(v ) {return set.add(v)});\n });\n }\n\n OrderedSet.of = function(/*...values*/) {\n return this(arguments);\n };\n\n OrderedSet.fromKeys = function(value) {\n return this(KeyedIterable(value).keySeq());\n };\n\n OrderedSet.prototype.toString = function() {\n return this.__toString('OrderedSet {', '}');\n };\n\n\n function isOrderedSet(maybeOrderedSet) {\n return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet);\n }\n\n OrderedSet.isOrderedSet = isOrderedSet;\n\n var OrderedSetPrototype = OrderedSet.prototype;\n OrderedSetPrototype[IS_ORDERED_SENTINEL] = true;\n\n OrderedSetPrototype.__empty = emptyOrderedSet;\n OrderedSetPrototype.__make = makeOrderedSet;\n\n function makeOrderedSet(map, ownerID) {\n var set = Object.create(OrderedSetPrototype);\n set.size = map ? map.size : 0;\n set._map = map;\n set.__ownerID = ownerID;\n return set;\n }\n\n var EMPTY_ORDERED_SET;\n function emptyOrderedSet() {\n return EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap()));\n }\n\n createClass(Stack, IndexedCollection);\n\n // @pragma Construction\n\n function Stack(value) {\n return value === null || value === undefined ? emptyStack() :\n isStack(value) ? value :\n emptyStack().unshiftAll(value);\n }\n\n Stack.of = function(/*...values*/) {\n return this(arguments);\n };\n\n Stack.prototype.toString = function() {\n return this.__toString('Stack [', ']');\n };\n\n // @pragma Access\n\n Stack.prototype.get = function(index, notSetValue) {\n var head = this._head;\n index = wrapIndex(this, index);\n while (head && index--) {\n head = head.next;\n }\n return head ? head.value : notSetValue;\n };\n\n Stack.prototype.peek = function() {\n return this._head && this._head.value;\n };\n\n // @pragma Modification\n\n Stack.prototype.push = function(/*...values*/) {\n if (arguments.length === 0) {\n return this;\n }\n var newSize = this.size + arguments.length;\n var head = this._head;\n for (var ii = arguments.length - 1; ii >= 0; ii--) {\n head = {\n value: arguments[ii],\n next: head\n };\n }\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n Stack.prototype.pushAll = function(iter) {\n iter = IndexedIterable(iter);\n if (iter.size === 0) {\n return this;\n }\n assertNotInfinite(iter.size);\n var newSize = this.size;\n var head = this._head;\n iter.reverse().forEach(function(value ) {\n newSize++;\n head = {\n value: value,\n next: head\n };\n });\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n Stack.prototype.pop = function() {\n return this.slice(1);\n };\n\n Stack.prototype.unshift = function(/*...values*/) {\n return this.push.apply(this, arguments);\n };\n\n Stack.prototype.unshiftAll = function(iter) {\n return this.pushAll(iter);\n };\n\n Stack.prototype.shift = function() {\n return this.pop.apply(this, arguments);\n };\n\n Stack.prototype.clear = function() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._head = undefined;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyStack();\n };\n\n Stack.prototype.slice = function(begin, end) {\n if (wholeSlice(begin, end, this.size)) {\n return this;\n }\n var resolvedBegin = resolveBegin(begin, this.size);\n var resolvedEnd = resolveEnd(end, this.size);\n if (resolvedEnd !== this.size) {\n // super.slice(begin, end);\n return IndexedCollection.prototype.slice.call(this, begin, end);\n }\n var newSize = this.size - resolvedBegin;\n var head = this._head;\n while (resolvedBegin--) {\n head = head.next;\n }\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n // @pragma Mutability\n\n Stack.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n return makeStack(this.size, this._head, ownerID, this.__hash);\n };\n\n // @pragma Iteration\n\n Stack.prototype.__iterate = function(fn, reverse) {\n if (reverse) {\n return this.reverse().__iterate(fn);\n }\n var iterations = 0;\n var node = this._head;\n while (node) {\n if (fn(node.value, iterations++, this) === false) {\n break;\n }\n node = node.next;\n }\n return iterations;\n };\n\n Stack.prototype.__iterator = function(type, reverse) {\n if (reverse) {\n return this.reverse().__iterator(type);\n }\n var iterations = 0;\n var node = this._head;\n return new Iterator(function() {\n if (node) {\n var value = node.value;\n node = node.next;\n return iteratorValue(type, iterations++, value);\n }\n return iteratorDone();\n });\n };\n\n\n function isStack(maybeStack) {\n return !!(maybeStack && maybeStack[IS_STACK_SENTINEL]);\n }\n\n Stack.isStack = isStack;\n\n var IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@';\n\n var StackPrototype = Stack.prototype;\n StackPrototype[IS_STACK_SENTINEL] = true;\n StackPrototype.withMutations = MapPrototype.withMutations;\n StackPrototype.asMutable = MapPrototype.asMutable;\n StackPrototype.asImmutable = MapPrototype.asImmutable;\n StackPrototype.wasAltered = MapPrototype.wasAltered;\n\n\n function makeStack(size, head, ownerID, hash) {\n var map = Object.create(StackPrototype);\n map.size = size;\n map._head = head;\n map.__ownerID = ownerID;\n map.__hash = hash;\n map.__altered = false;\n return map;\n }\n\n var EMPTY_STACK;\n function emptyStack() {\n return EMPTY_STACK || (EMPTY_STACK = makeStack(0));\n }\n\n /**\n * Contributes additional methods to a constructor\n */\n function mixin(ctor, methods) {\n var keyCopier = function(key ) { ctor.prototype[key] = methods[key]; };\n Object.keys(methods).forEach(keyCopier);\n Object.getOwnPropertySymbols &&\n Object.getOwnPropertySymbols(methods).forEach(keyCopier);\n return ctor;\n }\n\n Iterable.Iterator = Iterator;\n\n mixin(Iterable, {\n\n // ### Conversion to other types\n\n toArray: function() {\n assertNotInfinite(this.size);\n var array = new Array(this.size || 0);\n this.valueSeq().__iterate(function(v, i) { array[i] = v; });\n return array;\n },\n\n toIndexedSeq: function() {\n return new ToIndexedSequence(this);\n },\n\n toJS: function() {\n return this.toSeq().map(\n function(value ) {return value && typeof value.toJS === 'function' ? value.toJS() : value}\n ).__toJS();\n },\n\n toJSON: function() {\n return this.toSeq().map(\n function(value ) {return value && typeof value.toJSON === 'function' ? value.toJSON() : value}\n ).__toJS();\n },\n\n toKeyedSeq: function() {\n return new ToKeyedSequence(this, true);\n },\n\n toMap: function() {\n // Use Late Binding here to solve the circular dependency.\n return Map(this.toKeyedSeq());\n },\n\n toObject: function() {\n assertNotInfinite(this.size);\n var object = {};\n this.__iterate(function(v, k) { object[k] = v; });\n return object;\n },\n\n toOrderedMap: function() {\n // Use Late Binding here to solve the circular dependency.\n return OrderedMap(this.toKeyedSeq());\n },\n\n toOrderedSet: function() {\n // Use Late Binding here to solve the circular dependency.\n return OrderedSet(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toSet: function() {\n // Use Late Binding here to solve the circular dependency.\n return Set(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toSetSeq: function() {\n return new ToSetSequence(this);\n },\n\n toSeq: function() {\n return isIndexed(this) ? this.toIndexedSeq() :\n isKeyed(this) ? this.toKeyedSeq() :\n this.toSetSeq();\n },\n\n toStack: function() {\n // Use Late Binding here to solve the circular dependency.\n return Stack(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toList: function() {\n // Use Late Binding here to solve the circular dependency.\n return List(isKeyed(this) ? this.valueSeq() : this);\n },\n\n\n // ### Common JavaScript methods and properties\n\n toString: function() {\n return '[Iterable]';\n },\n\n __toString: function(head, tail) {\n if (this.size === 0) {\n return head + tail;\n }\n return head + ' ' + this.toSeq().map(this.__toStringMapper).join(', ') + ' ' + tail;\n },\n\n\n // ### ES6 Collection methods (ES6 Array and Map)\n\n concat: function() {var values = SLICE$0.call(arguments, 0);\n return reify(this, concatFactory(this, values));\n },\n\n includes: function(searchValue) {\n return this.some(function(value ) {return is(value, searchValue)});\n },\n\n entries: function() {\n return this.__iterator(ITERATE_ENTRIES);\n },\n\n every: function(predicate, context) {\n assertNotInfinite(this.size);\n var returnValue = true;\n this.__iterate(function(v, k, c) {\n if (!predicate.call(context, v, k, c)) {\n returnValue = false;\n return false;\n }\n });\n return returnValue;\n },\n\n filter: function(predicate, context) {\n return reify(this, filterFactory(this, predicate, context, true));\n },\n\n find: function(predicate, context, notSetValue) {\n var entry = this.findEntry(predicate, context);\n return entry ? entry[1] : notSetValue;\n },\n\n findEntry: function(predicate, context) {\n var found;\n this.__iterate(function(v, k, c) {\n if (predicate.call(context, v, k, c)) {\n found = [k, v];\n return false;\n }\n });\n return found;\n },\n\n findLastEntry: function(predicate, context) {\n return this.toSeq().reverse().findEntry(predicate, context);\n },\n\n forEach: function(sideEffect, context) {\n assertNotInfinite(this.size);\n return this.__iterate(context ? sideEffect.bind(context) : sideEffect);\n },\n\n join: function(separator) {\n assertNotInfinite(this.size);\n separator = separator !== undefined ? '' + separator : ',';\n var joined = '';\n var isFirst = true;\n this.__iterate(function(v ) {\n isFirst ? (isFirst = false) : (joined += separator);\n joined += v !== null && v !== undefined ? v.toString() : '';\n });\n return joined;\n },\n\n keys: function() {\n return this.__iterator(ITERATE_KEYS);\n },\n\n map: function(mapper, context) {\n return reify(this, mapFactory(this, mapper, context));\n },\n\n reduce: function(reducer, initialReduction, context) {\n assertNotInfinite(this.size);\n var reduction;\n var useFirst;\n if (arguments.length < 2) {\n useFirst = true;\n } else {\n reduction = initialReduction;\n }\n this.__iterate(function(v, k, c) {\n if (useFirst) {\n useFirst = false;\n reduction = v;\n } else {\n reduction = reducer.call(context, reduction, v, k, c);\n }\n });\n return reduction;\n },\n\n reduceRight: function(reducer, initialReduction, context) {\n var reversed = this.toKeyedSeq().reverse();\n return reversed.reduce.apply(reversed, arguments);\n },\n\n reverse: function() {\n return reify(this, reverseFactory(this, true));\n },\n\n slice: function(begin, end) {\n return reify(this, sliceFactory(this, begin, end, true));\n },\n\n some: function(predicate, context) {\n return !this.every(not(predicate), context);\n },\n\n sort: function(comparator) {\n return reify(this, sortFactory(this, comparator));\n },\n\n values: function() {\n return this.__iterator(ITERATE_VALUES);\n },\n\n\n // ### More sequential methods\n\n butLast: function() {\n return this.slice(0, -1);\n },\n\n isEmpty: function() {\n return this.size !== undefined ? this.size === 0 : !this.some(function() {return true});\n },\n\n count: function(predicate, context) {\n return ensureSize(\n predicate ? this.toSeq().filter(predicate, context) : this\n );\n },\n\n countBy: function(grouper, context) {\n return countByFactory(this, grouper, context);\n },\n\n equals: function(other) {\n return deepEqual(this, other);\n },\n\n entrySeq: function() {\n var iterable = this;\n if (iterable._cache) {\n // We cache as an entries array, so we can just return the cache!\n return new ArraySeq(iterable._cache);\n }\n var entriesSequence = iterable.toSeq().map(entryMapper).toIndexedSeq();\n entriesSequence.fromEntrySeq = function() {return iterable.toSeq()};\n return entriesSequence;\n },\n\n filterNot: function(predicate, context) {\n return this.filter(not(predicate), context);\n },\n\n findLast: function(predicate, context, notSetValue) {\n return this.toKeyedSeq().reverse().find(predicate, context, notSetValue);\n },\n\n first: function() {\n return this.find(returnTrue);\n },\n\n flatMap: function(mapper, context) {\n return reify(this, flatMapFactory(this, mapper, context));\n },\n\n flatten: function(depth) {\n return reify(this, flattenFactory(this, depth, true));\n },\n\n fromEntrySeq: function() {\n return new FromEntriesSequence(this);\n },\n\n get: function(searchKey, notSetValue) {\n return this.find(function(_, key) {return is(key, searchKey)}, undefined, notSetValue);\n },\n\n getIn: function(searchKeyPath, notSetValue) {\n var nested = this;\n // Note: in an ES6 environment, we would prefer:\n // for (var key of searchKeyPath) {\n var iter = forceIterator(searchKeyPath);\n var step;\n while (!(step = iter.next()).done) {\n var key = step.value;\n nested = nested && nested.get ? nested.get(key, NOT_SET) : NOT_SET;\n if (nested === NOT_SET) {\n return notSetValue;\n }\n }\n return nested;\n },\n\n groupBy: function(grouper, context) {\n return groupByFactory(this, grouper, context);\n },\n\n has: function(searchKey) {\n return this.get(searchKey, NOT_SET) !== NOT_SET;\n },\n\n hasIn: function(searchKeyPath) {\n return this.getIn(searchKeyPath, NOT_SET) !== NOT_SET;\n },\n\n isSubset: function(iter) {\n iter = typeof iter.includes === 'function' ? iter : Iterable(iter);\n return this.every(function(value ) {return iter.includes(value)});\n },\n\n isSuperset: function(iter) {\n iter = typeof iter.isSubset === 'function' ? iter : Iterable(iter);\n return iter.isSubset(this);\n },\n\n keySeq: function() {\n return this.toSeq().map(keyMapper).toIndexedSeq();\n },\n\n last: function() {\n return this.toSeq().reverse().first();\n },\n\n max: function(comparator) {\n return maxFactory(this, comparator);\n },\n\n maxBy: function(mapper, comparator) {\n return maxFactory(this, comparator, mapper);\n },\n\n min: function(comparator) {\n return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator);\n },\n\n minBy: function(mapper, comparator) {\n return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator, mapper);\n },\n\n rest: function() {\n return this.slice(1);\n },\n\n skip: function(amount) {\n return this.slice(Math.max(0, amount));\n },\n\n skipLast: function(amount) {\n return reify(this, this.toSeq().reverse().skip(amount).reverse());\n },\n\n skipWhile: function(predicate, context) {\n return reify(this, skipWhileFactory(this, predicate, context, true));\n },\n\n skipUntil: function(predicate, context) {\n return this.skipWhile(not(predicate), context);\n },\n\n sortBy: function(mapper, comparator) {\n return reify(this, sortFactory(this, comparator, mapper));\n },\n\n take: function(amount) {\n return this.slice(0, Math.max(0, amount));\n },\n\n takeLast: function(amount) {\n return reify(this, this.toSeq().reverse().take(amount).reverse());\n },\n\n takeWhile: function(predicate, context) {\n return reify(this, takeWhileFactory(this, predicate, context));\n },\n\n takeUntil: function(predicate, context) {\n return this.takeWhile(not(predicate), context);\n },\n\n valueSeq: function() {\n return this.toIndexedSeq();\n },\n\n\n // ### Hashable Object\n\n hashCode: function() {\n return this.__hash || (this.__hash = hashIterable(this));\n }\n\n\n // ### Internal\n\n // abstract __iterate(fn, reverse)\n\n // abstract __iterator(type, reverse)\n });\n\n // var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';\n // var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\n // var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';\n // var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';\n\n var IterablePrototype = Iterable.prototype;\n IterablePrototype[IS_ITERABLE_SENTINEL] = true;\n IterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.values;\n IterablePrototype.__toJS = IterablePrototype.toArray;\n IterablePrototype.__toStringMapper = quoteString;\n IterablePrototype.inspect =\n IterablePrototype.toSource = function() { return this.toString(); };\n IterablePrototype.chain = IterablePrototype.flatMap;\n IterablePrototype.contains = IterablePrototype.includes;\n\n // Temporary warning about using length\n (function () {\n try {\n Object.defineProperty(IterablePrototype, 'length', {\n get: function () {\n if (!Iterable.noLengthWarning) {\n var stack;\n try {\n throw new Error();\n } catch (error) {\n stack = error.stack;\n }\n if (stack.indexOf('_wrapObject') === -1) {\n console && console.warn && console.warn(\n 'iterable.length has been deprecated, '+\n 'use iterable.size or iterable.count(). '+\n 'This warning will become a silent error in a future version. ' +\n stack\n );\n return this.size;\n }\n }\n }\n });\n } catch (e) {}\n })();\n\n\n\n mixin(KeyedIterable, {\n\n // ### More sequential methods\n\n flip: function() {\n return reify(this, flipFactory(this));\n },\n\n findKey: function(predicate, context) {\n var entry = this.findEntry(predicate, context);\n return entry && entry[0];\n },\n\n findLastKey: function(predicate, context) {\n return this.toSeq().reverse().findKey(predicate, context);\n },\n\n keyOf: function(searchValue) {\n return this.findKey(function(value ) {return is(value, searchValue)});\n },\n\n lastKeyOf: function(searchValue) {\n return this.findLastKey(function(value ) {return is(value, searchValue)});\n },\n\n mapEntries: function(mapper, context) {var this$0 = this;\n var iterations = 0;\n return reify(this,\n this.toSeq().map(\n function(v, k) {return mapper.call(context, [k, v], iterations++, this$0)}\n ).fromEntrySeq()\n );\n },\n\n mapKeys: function(mapper, context) {var this$0 = this;\n return reify(this,\n this.toSeq().flip().map(\n function(k, v) {return mapper.call(context, k, v, this$0)}\n ).flip()\n );\n }\n\n });\n\n var KeyedIterablePrototype = KeyedIterable.prototype;\n KeyedIterablePrototype[IS_KEYED_SENTINEL] = true;\n KeyedIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.entries;\n KeyedIterablePrototype.__toJS = IterablePrototype.toObject;\n KeyedIterablePrototype.__toStringMapper = function(v, k) {return JSON.stringify(k) + ': ' + quoteString(v)};\n\n\n\n mixin(IndexedIterable, {\n\n // ### Conversion to other types\n\n toKeyedSeq: function() {\n return new ToKeyedSequence(this, false);\n },\n\n\n // ### ES6 Collection methods (ES6 Array and Map)\n\n filter: function(predicate, context) {\n return reify(this, filterFactory(this, predicate, context, false));\n },\n\n findIndex: function(predicate, context) {\n var entry = this.findEntry(predicate, context);\n return entry ? entry[0] : -1;\n },\n\n indexOf: function(searchValue) {\n var key = this.toKeyedSeq().keyOf(searchValue);\n return key === undefined ? -1 : key;\n },\n\n lastIndexOf: function(searchValue) {\n var key = this.toKeyedSeq().reverse().keyOf(searchValue);\n return key === undefined ? -1 : key;\n\n // var index =\n // return this.toSeq().reverse().indexOf(searchValue);\n },\n\n reverse: function() {\n return reify(this, reverseFactory(this, false));\n },\n\n slice: function(begin, end) {\n return reify(this, sliceFactory(this, begin, end, false));\n },\n\n splice: function(index, removeNum /*, ...values*/) {\n var numArgs = arguments.length;\n removeNum = Math.max(removeNum | 0, 0);\n if (numArgs === 0 || (numArgs === 2 && !removeNum)) {\n return this;\n }\n // If index is negative, it should resolve relative to the size of the\n // collection. However size may be expensive to compute if not cached, so\n // only call count() if the number is in fact negative.\n index = resolveBegin(index, index < 0 ? this.count() : this.size);\n var spliced = this.slice(0, index);\n return reify(\n this,\n numArgs === 1 ?\n spliced :\n spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum))\n );\n },\n\n\n // ### More collection methods\n\n findLastIndex: function(predicate, context) {\n var key = this.toKeyedSeq().findLastKey(predicate, context);\n return key === undefined ? -1 : key;\n },\n\n first: function() {\n return this.get(0);\n },\n\n flatten: function(depth) {\n return reify(this, flattenFactory(this, depth, false));\n },\n\n get: function(index, notSetValue) {\n index = wrapIndex(this, index);\n return (index < 0 || (this.size === Infinity ||\n (this.size !== undefined && index > this.size))) ?\n notSetValue :\n this.find(function(_, key) {return key === index}, undefined, notSetValue);\n },\n\n has: function(index) {\n index = wrapIndex(this, index);\n return index >= 0 && (this.size !== undefined ?\n this.size === Infinity || index < this.size :\n this.indexOf(index) !== -1\n );\n },\n\n interpose: function(separator) {\n return reify(this, interposeFactory(this, separator));\n },\n\n interleave: function(/*...iterables*/) {\n var iterables = [this].concat(arrCopy(arguments));\n var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, iterables);\n var interleaved = zipped.flatten(true);\n if (zipped.size) {\n interleaved.size = zipped.size * iterables.length;\n }\n return reify(this, interleaved);\n },\n\n last: function() {\n return this.get(-1);\n },\n\n skipWhile: function(predicate, context) {\n return reify(this, skipWhileFactory(this, predicate, context, false));\n },\n\n zip: function(/*, ...iterables */) {\n var iterables = [this].concat(arrCopy(arguments));\n return reify(this, zipWithFactory(this, defaultZipper, iterables));\n },\n\n zipWith: function(zipper/*, ...iterables */) {\n var iterables = arrCopy(arguments);\n iterables[0] = this;\n return reify(this, zipWithFactory(this, zipper, iterables));\n }\n\n });\n\n IndexedIterable.prototype[IS_INDEXED_SENTINEL] = true;\n IndexedIterable.prototype[IS_ORDERED_SENTINEL] = true;\n\n\n\n mixin(SetIterable, {\n\n // ### ES6 Collection methods (ES6 Array and Map)\n\n get: function(value, notSetValue) {\n return this.has(value) ? value : notSetValue;\n },\n\n includes: function(value) {\n return this.has(value);\n },\n\n\n // ### More sequential methods\n\n keySeq: function() {\n return this.valueSeq();\n }\n\n });\n\n SetIterable.prototype.has = IterablePrototype.includes;\n\n\n // Mixin subclasses\n\n mixin(KeyedSeq, KeyedIterable.prototype);\n mixin(IndexedSeq, IndexedIterable.prototype);\n mixin(SetSeq, SetIterable.prototype);\n\n mixin(KeyedCollection, KeyedIterable.prototype);\n mixin(IndexedCollection, IndexedIterable.prototype);\n mixin(SetCollection, SetIterable.prototype);\n\n\n // #pragma Helper functions\n\n function keyMapper(v, k) {\n return k;\n }\n\n function entryMapper(v, k) {\n return [k, v];\n }\n\n function not(predicate) {\n return function() {\n return !predicate.apply(this, arguments);\n }\n }\n\n function neg(predicate) {\n return function() {\n return -predicate.apply(this, arguments);\n }\n }\n\n function quoteString(value) {\n return typeof value === 'string' ? JSON.stringify(value) : value;\n }\n\n function defaultZipper() {\n return arrCopy(arguments);\n }\n\n function defaultNegComparator(a, b) {\n return a < b ? 1 : a > b ? -1 : 0;\n }\n\n function hashIterable(iterable) {\n if (iterable.size === Infinity) {\n return 0;\n }\n var ordered = isOrdered(iterable);\n var keyed = isKeyed(iterable);\n var h = ordered ? 1 : 0;\n var size = iterable.__iterate(\n keyed ?\n ordered ?\n function(v, k) { h = 31 * h + hashMerge(hash(v), hash(k)) | 0; } :\n function(v, k) { h = h + hashMerge(hash(v), hash(k)) | 0; } :\n ordered ?\n function(v ) { h = 31 * h + hash(v) | 0; } :\n function(v ) { h = h + hash(v) | 0; }\n );\n return murmurHashOfSize(size, h);\n }\n\n function murmurHashOfSize(size, h) {\n h = imul(h, 0xCC9E2D51);\n h = imul(h << 15 | h >>> -15, 0x1B873593);\n h = imul(h << 13 | h >>> -13, 5);\n h = (h + 0xE6546B64 | 0) ^ size;\n h = imul(h ^ h >>> 16, 0x85EBCA6B);\n h = imul(h ^ h >>> 13, 0xC2B2AE35);\n h = smi(h ^ h >>> 16);\n return h;\n }\n\n function hashMerge(a, b) {\n return a ^ b + 0x9E3779B9 + (a << 6) + (a >> 2) | 0; // int\n }\n\n var Immutable = {\n\n Iterable: Iterable,\n\n Seq: Seq,\n Collection: Collection,\n Map: Map,\n OrderedMap: OrderedMap,\n List: List,\n Stack: Stack,\n Set: Set,\n OrderedSet: OrderedSet,\n\n Record: Record,\n Range: Range,\n Repeat: Repeat,\n\n is: is,\n fromJS: fromJS\n\n };\n\n return Immutable;\n\n}));\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/immutable/dist/immutable.js\n ** module id = 229\n ** module chunks = 0\n **/","import $ from 'jquery';\n\n// jQuery no parents filter\n$.expr[':']['noparents'] = $.expr.createPseudo((text) => (element) => $(element).parents(text).length < 1);\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/utils/jquery-utils.js\n **/","import $ from 'jquery';\nimport toastr from '../utils/toastr';\nimport { translations } from 'grav-config';\nimport { Instance as FormState } from './state';\n\nexport default class Form {\n constructor(form) {\n this.form = $(form);\n if (!this.form.length || this.form.prop('tagName').toLowerCase() !== 'form') { return; }\n\n this.form.on('submit', (event) => {\n if (FormState.equals()) {\n event.preventDefault();\n toastr.info(translations.PLUGIN_ADMIN.NOTHING_TO_SAVE);\n }\n });\n\n this._attachShortcuts();\n this._attachToggleables();\n this._attachDisabledFields();\n\n this.observer = new MutationObserver(this.addedNodes);\n this.form.each((index, form) => this.observer.observe(form, { subtree: true, childList: true }));\n }\n\n _attachShortcuts() {\n // CTRL + S / CMD + S - shortcut for [Save] when available\n let saveTask = $('[name=\"task\"][value=\"save\"]').filter(function(index, element) {\n element = $(element);\n return !(element.parents('.remodal-overlay').length);\n });\n\n if (saveTask.length) {\n $(window).on('keydown', function(event) {\n var key = String.fromCharCode(event.which).toLowerCase();\n if ((event.ctrlKey || event.metaKey) && key === 's') {\n event.preventDefault();\n saveTask.click();\n }\n });\n }\n }\n\n _attachToggleables() {\n let query = '[data-grav-field=\"toggleable\"] input[type=\"checkbox\"]';\n\n this.form.on('change', query, (event) => {\n let toggle = $(event.target);\n let enabled = toggle.is(':checked');\n let parent = toggle.parents('.form-field');\n let label = parent.find('label.toggleable');\n let fields = parent.find('.form-data');\n let inputs = fields.find('input, select, textarea');\n\n label.add(fields).css('opacity', enabled ? '' : 0.7);\n inputs.map((index, input) => {\n let isSelectize = input.selectize;\n input = $(input);\n\n if (isSelectize) {\n isSelectize[enabled ? 'enable' : 'disable']();\n } else {\n input.prop('disabled', !enabled);\n }\n });\n });\n\n this.form.find(query).trigger('change');\n }\n\n _attachDisabledFields() {\n let prefix = '.form-field-toggleable .form-data';\n let query = [];\n\n ['input', 'select', 'label[for]', 'textarea', '.selectize-control'].forEach((item) => {\n query.push(`${prefix} ${item}`);\n });\n\n this.form.on('mousedown', query.join(', '), (event) => {\n let target = $(event.target);\n let input = target;\n let isFor = input.prop('for');\n let isSelectize = (input.hasClass('selectize-control') || input.parents('.selectize-control')).length;\n\n if (isFor) { input = $(`[id=\"${isFor}\"]`); }\n if (isSelectize) { input = input.closest('.selectize-control').siblings('select[name]'); }\n\n if (!input.prop('disabled')) { return true; }\n\n let toggle = input.closest('.form-field').find('[data-grav-field=\"toggleable\"] input[type=\"checkbox\"]');\n toggle.trigger('click');\n });\n }\n\n addedNodes(mutations) {\n mutations.forEach((mutation) => {\n if (mutation.type !== 'childList' || !mutation.addedNodes) { return; }\n\n $('body').trigger('mutation._grav', mutation.target, mutation, this);\n });\n }\n}\n\nexport let Instance = new Form('form#blueprints');\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/forms/form.js\n **/","import SelectizeField, { Instance as SelectizeFieldInstance } from './selectize';\nimport ArrayField, { Instance as ArrayFieldInstance } from './array';\nimport CollectionsField, { Instance as CollectionsFieldInstance } from './collections';\n\nexport default {\n SelectizeField: {\n SelectizeField,\n Instance: SelectizeFieldInstance\n },\n ArrayField: {\n ArrayField,\n Instance: ArrayFieldInstance\n },\n CollectionsField: {\n CollectionsField,\n Instance: CollectionsFieldInstance\n }\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/forms/fields/index.js\n **/","import $ from 'jquery';\nimport 'selectize';\n\nexport default class SelectizeField {\n constructor(options = {}) {\n this.options = Object.assign({}, options);\n this.elements = [];\n\n $('[data-grav-selectize]').each((index, element) => this.add(element));\n $('body').on('mutation._grav', this._onAddedNodes.bind(this));\n }\n\n add(element) {\n element = $(element);\n let tag = element.prop('tagName').toLowerCase();\n let isInput = tag === 'input' || tag === 'select';\n\n let data = (isInput ? element.closest('[data-grav-selectize]') : element).data('grav-selectize') || {};\n let field = (isInput ? element : element.find('input, select'));\n\n if (!field.length || field.get(0).selectize) { return; }\n field.selectize(data);\n\n this.elements.push(field.data('selectize'));\n }\n\n _onAddedNodes(event, target/* , record, instance */) {\n let fields = $(target).find('select.fancy, input.fancy');\n if (!fields.length) { return; }\n\n fields.each((index, field) => this.add(field));\n }\n}\n\nexport let Instance = new SelectizeField();\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/forms/fields/selectize.js\n **/","import $ from 'jquery';\n\nlet body = $('body');\n\nclass Template {\n constructor(container) {\n this.container = $(container);\n\n if (this.getName() === undefined) {\n this.container = this.container.closest('[data-grav-array-name]');\n }\n }\n\n getName() {\n return this.container.data('grav-array-name') || '';\n }\n\n getKeyPlaceholder() {\n return this.container.data('grav-array-keyname') || 'Key';\n }\n\n getValuePlaceholder() {\n return this.container.data('grav-array-valuename') || 'Value';\n }\n\n isValueOnly() {\n return this.container.find('[data-grav-array-mode=\"value_only\"]:first').length || false;\n }\n\n shouldBeDisabled() {\n // check for toggleables, if field is toggleable and it's not enabled, render disabled\n let toggle = this.container.closest('.form-field').find('[data-grav-field=\"toggleable\"] input[type=\"checkbox\"]');\n return toggle.length && toggle.is(':not(:checked)');\n }\n\n getNewRow() {\n let tpl = '';\n\n if (this.isValueOnly()) {\n tpl += `\n
\n
\n `;\n } else {\n tpl += `\n
\n \n \n `;\n }\n\n tpl += `\n \n \n
`;\n\n return tpl;\n }\n}\n\nexport default class ArrayField {\n constructor() {\n body.on('input', '[data-grav-array-type=\"key\"], [data-grav-array-type=\"value\"]', (event) => this.actionInput(event));\n body.on('click touch', '[data-grav-array-action]', (event) => this.actionEvent(event));\n }\n\n actionInput(event) {\n let element = $(event.target);\n let type = element.data('grav-array-type');\n\n this._setTemplate(element);\n\n let template = element.data('array-template');\n let keyElement = type === 'key' ? element : element.siblings('[data-grav-array-type=\"key\"]:first');\n let valueElement = type === 'value' ? element : element.siblings('[data-grav-array-type=\"value\"]:first');\n\n let name = `${template.getName()}[${!template.isValueOnly() ? keyElement.val() : this.getIndexFor(element)}]`;\n valueElement.attr('name', !valueElement.val() ? template.getName() : name);\n\n this.refreshNames(template);\n }\n\n actionEvent(event) {\n let element = $(event.target);\n let action = element.data('grav-array-action');\n\n this._setTemplate(element);\n\n this[`${action}Action`](element);\n }\n\n addAction(element) {\n let template = element.data('array-template');\n let row = element.closest('[data-grav-array-type=\"row\"]');\n\n row.after(template.getNewRow());\n }\n\n remAction(element) {\n let template = element.data('array-template');\n let row = element.closest('[data-grav-array-type=\"row\"]');\n let isLast = !row.siblings().length;\n\n if (isLast) {\n let newRow = $(template.getNewRow());\n row.after(newRow);\n newRow.find('[data-grav-array-type=\"value\"]:last').attr('name', template.getName());\n }\n\n row.remove();\n this.refreshNames(template);\n }\n\n refreshNames(template) {\n if (!template.isValueOnly()) { return; }\n\n let row = template.container.find('> div > [data-grav-array-type=\"row\"]');\n let inputs = row.find('[name]:not([name=\"\"])');\n\n inputs.each((index, input) => {\n input = $(input);\n let name = input.attr('name');\n name = name.replace(/\\[\\d+\\]$/, `[${index}]`);\n input.attr('name', name);\n });\n\n if (!inputs.length) {\n row.find('[data-grav-array-type=\"value\"]').attr('name', template.getName());\n }\n }\n\n getIndexFor(element) {\n let template = element.data('array-template');\n let row = element.closest('[data-grav-array-type=\"row\"]');\n\n return template.container.find(`${template.isValueOnly() ? '> div ' : ''} > [data-grav-array-type=\"row\"]`).index(row);\n }\n\n _setTemplate(element) {\n if (!element.data('array-template')) {\n element.data('array-template', new Template(element.closest('[data-grav-array-name]')));\n }\n }\n}\n\nexport let Instance = new ArrayField();\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/forms/fields/array.js\n **/","import $ from 'jquery';\nimport Sortable from 'sortablejs';\nimport '../../utils/jquery-utils';\n\nexport default class CollectionsField {\n constructor() {\n this.lists = $();\n\n $('[data-type=\"collection\"]').each((index, list) => this.addList(list));\n $('body').on('mutation._grav', this._onAddedNodes.bind(this));\n\n }\n\n addList(list) {\n list = $(list);\n this.lists = this.lists.add(list);\n\n list.on('click', '> .collection-actions [data-action=\"add\"]', (event) => this.addItem(event));\n list.on('click', '> ul > li > .item-actions [data-action=\"delete\"]', (event) => this.removeItem(event));\n\n list.find('[data-collection-holder]').each((index, container) => {\n container = $(container);\n if (container.data('collection-sort')) { return; }\n\n container.data('collection-sort', new Sortable(container.get(0), {\n forceFallback: true,\n animation: 150,\n onUpdate: () => this.reindex(container)\n }));\n });\n }\n\n addItem(event) {\n let button = $(event.currentTarget);\n let list = button.closest('[data-type=\"collection\"]');\n let template = $(list.find('> [data-collection-template=\"new\"]').data('collection-template-html'));\n\n list.find('> [data-collection-holder]').append(template);\n this.reindex(list);\n // button.data('key-index', keyIndex + 1);\n\n // process markdown editors\n /* var field = template.find('[name]').filter('textarea');\n if (field.length && field.data('grav-mdeditor') && typeof MDEditors !== 'undefined') {\n MDEditors.add(field);\n }*/\n }\n\n removeItem(event) {\n let button = $(event.currentTarget);\n let item = button.closest('[data-collection-item]');\n let list = button.closest('[data-type=\"collection\"]');\n\n item.remove();\n this.reindex(list);\n }\n\n reindex(list) {\n list = $(list).closest('[data-type=\"collection\"]');\n\n let items = list.find('> ul > [data-collection-item]');\n\n items.each((index, item) => {\n item = $(item);\n item.attr('data-collection-key', index);\n\n ['name', 'data-grav-field-name', 'id', 'for'].forEach((prop) => {\n item.find('[' + prop + ']').each(function() {\n let element = $(this);\n let indexes = [];\n element.parents('[data-collection-key]').map((idx, parent) => indexes.push($(parent).attr('data-collection-key')));\n indexes.reverse();\n\n let replaced = element.attr(prop).replace(/\\[(\\d+|\\*)\\]/g, (/* str, p1, offset */) => {\n return `[${indexes.shift()}]`;\n });\n\n element.attr(prop, replaced);\n });\n });\n\n });\n }\n\n _onAddedNodes(event, target/* , record, instance */) {\n let collections = $(target).find('[data-type=\"collection\"]');\n if (!collections.length) { return; }\n\n collections.each((index, collection) => {\n collection = $(collection);\n if (!~this.lists.index(collection)) {\n this.addList(collection);\n }\n });\n }\n}\n\nexport let Instance = new CollectionsField();\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/forms/fields/collections.js\n **/","import $ from 'jquery';\n\n// Plugins sliders details\n$('.gpm-name, .gpm-actions').on('click', function(e) {\n let element = $(this);\n let target = $(e.target);\n let tag = target.prop('tagName').toLowerCase();\n\n if (tag === 'a' || element.parent('a').length) { return true; }\n\n let wrapper = element.siblings('.gpm-details').find('.table-wrapper');\n\n wrapper.slideToggle({\n duration: 350,\n complete: () => {\n let visible = wrapper.is(':visible');\n wrapper\n .closest('tr')\n .find('.gpm-details-expand i')\n .removeClass('fa-chevron-' + (visible ? 'down' : 'up'))\n .addClass('fa-chevron-' + (visible ? 'up' : 'down'));\n }\n });\n});\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/plugins/index.js\n **/","import $ from 'jquery';\n\n// Themes Switcher Warning\n$(document).on('mousedown', '[data-remodal-target=\"theme-switch-warn\"]', (event) => {\n let name = $(event.target).closest('[data-gpm-theme]').find('.gpm-name a:first').text();\n let remodal = $('.remodal.theme-switcher');\n\n remodal.find('strong').text(name);\n remodal.find('.button.continue').attr('href', $(event.target).attr('href'));\n});\n\n\n\n/** WEBPACK FOOTER **\n ** ./app/themes/index.js\n **/"],"sourceRoot":""}
\ No newline at end of file
diff --git a/themes/grav/js/admin.min.js b/themes/grav/js/admin.min.js
new file mode 100644
index 00000000..102d6eac
--- /dev/null
+++ b/themes/grav/js/admin.min.js
@@ -0,0 +1,6 @@
+var Grav=webpackJsonpGrav([0],[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i),a=n(200),u=r(a),s=n(201),c=r(s),f=n(206),l=r(f),h=n(211),d=r(h),p=n(227),v=r(p);n(236),n(237),n(238),u["default"].start(),e["default"]={GPM:{GPM:o["default"],Instance:i.Instance},KeepAlive:u["default"],Dashboard:l["default"],Pages:d["default"],Forms:v["default"],Updates:{Updates:c["default"],Instance:s.Instance}}},function(t,e,n){(function(t){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=function(){function t(t,e){for(var n=0;n
-1?e:t}function f(t,e){e=e||{};var n=e.body;if(f.prototype.isPrototypeOf(t)){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new r(t.headers)),this.method=t.method,this.mode=t.mode,n||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=t;if(this.credentials=e.credentials||this.credentials||"omit",(e.headers||!this.headers)&&(this.headers=new r(e.headers)),this.method=c(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function l(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}}),e}function h(t){var e=new r,n=t.getAllResponseHeaders().trim().split("\n");return n.forEach(function(t){var n=t.trim().split(":"),r=n.shift().trim(),i=n.join(":").trim();e.append(r,i)}),e}function d(t,e){e||(e={}),this._initBody(t),this.type="default",this.status=e.status,this.ok=this.status>=200&&this.status<300,this.statusText=e.statusText,this.headers=e.headers instanceof r?e.headers:new r(e.headers),this.url=e.url||""}if(!self.fetch){r.prototype.append=function(e,r){e=t(e),r=n(r);var i=this.map[e];i||(i=[],this.map[e]=i),i.push(r)},r.prototype["delete"]=function(e){delete this.map[t(e)]},r.prototype.get=function(e){var n=this.map[t(e)];return n?n[0]:null},r.prototype.getAll=function(e){return this.map[t(e)]||[]},r.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},r.prototype.set=function(e,r){this.map[t(e)]=[n(r)]},r.prototype.forEach=function(t,e){Object.getOwnPropertyNames(this.map).forEach(function(n){this.map[n].forEach(function(r){t.call(e,r,n,this)},this)},this)};var p={blob:"FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in self,arrayBuffer:"ArrayBuffer"in self},v=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];f.prototype.clone=function(){return new f(this)},s.call(f.prototype),s.call(d.prototype),d.prototype.clone=function(){return new d(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new r(this.headers),url:this.url})},d.error=function(){var t=new d(null,{status:0,statusText:""});return t.type="error",t};var y=[301,302,303,307,308];d.redirect=function(t,e){if(-1===y.indexOf(e))throw new RangeError("Invalid status code");return new d(null,{status:e,headers:{location:t}})},self.Headers=r,self.Request=f,self.Response=d,self.fetch=function(t,n){return new e(function(e,r){function i(){return"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0}var o;o=f.prototype.isPrototypeOf(t)&&!n?t:new f(t,n);var a=new XMLHttpRequest;a.onload=function(){var t=1223===a.status?204:a.status;if(100>t||t>599)return void r(new TypeError("Network request failed"));var n={status:t,statusText:a.statusText,headers:h(a),url:i()},o="response"in a?a.response:a.responseText;e(new d(o,n))},a.onerror=function(){r(new TypeError("Network request failed"))},a.open(o.method,o.url,!0),"include"===o.credentials&&(a.withCredentials=!0),"responseType"in a&&p.blob&&(a.responseType="blob"),o.headers.forEach(function(t,e){a.setRequestHeader(e,t)}),a.send("undefined"==typeof o._bodyInit?null:o._bodyInit)})},self.fetch.polyfill=!0}}(),t.exports=n.fetch}).call(n)}).call(e,n(3),function(){return this}())},function(t,e,n){(function(e){(function(){"use strict";if(n(4),n(191),e._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");e._babelPolyfill=!0,t.exports=e.Promise}).call(e)}).call(e,function(){return this}())},function(t,e,n){n(5),n(38),n(44),n(46),n(48),n(50),n(52),n(54),n(55),n(56),n(57),n(58),n(59),n(60),n(61),n(62),n(63),n(64),n(65),n(68),n(69),n(70),n(72),n(73),n(74),n(75),n(76),n(77),n(78),n(80),n(81),n(82),n(84),n(85),n(86),n(88),n(89),n(90),n(91),n(92),n(93),n(94),n(95),n(96),n(97),n(98),n(99),n(100),n(101),n(106),n(107),n(111),n(112),n(114),n(115),n(120),n(121),n(124),n(126),n(128),n(130),n(131),n(132),n(134),n(135),n(137),n(138),n(139),n(140),n(147),n(150),n(151),n(153),n(154),n(155),n(156),n(157),n(158),n(159),n(160),n(161),n(162),n(163),n(164),n(166),n(167),n(168),n(169),n(170),n(171),n(173),n(174),n(175),n(176),n(178),n(179),n(181),n(182),n(184),n(185),n(186),n(189),n(190),t.exports=n(9)},function(t,e,n){"use strict";var r,i=n(6),o=n(7),a=n(12),u=n(11),s=n(18),c=n(19),f=n(21),l=n(22),h=n(23),d=n(13),p=n(24),v=n(17),y=n(20),g=n(25),_=n(27),m=n(29),b=n(30),w=n(31),S=n(28),I=n(15)("__proto__"),x=n(32),O=n(37)(!1),k=Object.prototype,E=Array.prototype,M=E.slice,A=E.join,z=i.setDesc,D=i.getDesc,j=i.setDescs,P={};a||(r=!d(function(){return 7!=z(c("div"),"a",{get:function(){return 7}}).a}),i.setDesc=function(t,e,n){if(r)try{return z(t,e,n)}catch(i){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(p(t)[e]=n.value),t},i.getDesc=function(t,e){if(r)try{return D(t,e)}catch(n){}return f(t,e)?u(!k.propertyIsEnumerable.call(t,e),t[e]):void 0},i.setDescs=j=function(t,e){p(t);for(var n,r=i.getKeys(e),o=r.length,a=0;o>a;)i.setDesc(t,n=r[a++],e[n]);return t}),o(o.S+o.F*!a,"Object",{getOwnPropertyDescriptor:i.getDesc,defineProperty:i.setDesc,defineProperties:j});var N="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),L=N.concat("length","prototype"),T=N.length,F=function(){var t,e=c("iframe"),n=T,r=">";for(e.style.display="none",s.appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("o;)f(i,r=t[o++])&&(~O(a,r)||a.push(r));return a}},U=function(){};o(o.S,"Object",{getPrototypeOf:i.getProto=i.getProto||function(t){return t=g(t),f(t,I)?t[I]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?k:null},getOwnPropertyNames:i.getNames=i.getNames||C(L,L.length,!0),create:i.create=i.create||function(t,e){var n;return null!==t?(U.prototype=p(t),n=new U,U.prototype=null,n[I]=t):n=F(),void 0===e?n:j(n,e)},keys:i.getKeys=i.getKeys||C(N,T,!1)});var R=function(t,e,n){if(!(e in P)){for(var r=[],i=0;e>i;i++)r[i]="a["+i+"]";P[e]=Function("F,a","return new F("+r.join(",")+")")}return P[e](t,n)};o(o.P,"Function",{bind:function(t){var e=v(this),n=M.call(arguments,1),r=function(){var i=n.concat(M.call(arguments));return this instanceof r?R(e,i.length,i):h(e,i,t)};return y(e.prototype)&&(r.prototype=e.prototype),r}}),o(o.P+o.F*d(function(){s&&M.call(s)}),"Array",{slice:function(t,e){var n=w(this.length),r=l(this);if(e=void 0===e?n:e,"Array"==r)return M.call(this,t,e);for(var i=b(t,n),o=b(e,n),a=w(o-i),u=Array(a),s=0;a>s;s++)u[s]="String"==r?this.charAt(i+s):this[i+s];return u}}),o(o.P+o.F*(S!=Object),"Array",{join:function(t){return A.call(S(this),void 0===t?",":t)}}),o(o.S,"Array",{isArray:n(34)});var q=function(t){return function(e,n){v(e);var r=S(this),i=w(r.length),o=t?i-1:0,a=t?-1:1;if(arguments.length<2)for(;;){if(o in r){n=r[o],o+=a;break}if(o+=a,t?0>o:o>=i)throw TypeError("Reduce of empty array with no initial value")}for(;t?o>=0:i>o;o+=a)o in r&&(n=e(n,r[o],o,this));return n}},B=function(t){return function(e){return t(this,e,arguments[1])}};o(o.P,"Array",{forEach:i.each=i.each||B(x(0)),map:B(x(1)),filter:B(x(2)),some:B(x(3)),every:B(x(4)),reduce:q(!1),reduceRight:q(!0),indexOf:B(O),lastIndexOf:function(t,e){var n=_(this),r=w(n.length),i=r-1;for(arguments.length>1&&(i=Math.min(i,m(e))),0>i&&(i=w(r+i));i>=0;i--)if(i in n&&n[i]===t)return i;return-1}}),o(o.S,"Date",{now:function(){return+new Date}});var G=function(t){return t>9?t:"0"+t};o(o.P+o.F*(d(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!d(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function(){if(!isFinite(this))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=0>e?"-":e>9999?"+":"";return r+("00000"+Math.abs(e)).slice(r?-6:-4)+"-"+G(t.getUTCMonth()+1)+"-"+G(t.getUTCDate())+"T"+G(t.getUTCHours())+":"+G(t.getUTCMinutes())+":"+G(t.getUTCSeconds())+"."+(n>99?n:"0"+G(n))+"Z"}})},function(t,e){var n=Object;t.exports={create:n.create,getProto:n.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:n.getOwnPropertyDescriptor,setDesc:n.defineProperty,setDescs:n.defineProperties,getKeys:n.keys,getNames:n.getOwnPropertyNames,getSymbols:n.getOwnPropertySymbols,each:[].forEach}},function(t,e,n){var r=n(8),i=n(9),o=n(10),a=n(14),u=n(16),s="prototype",c=function(t,e,n){var f,l,h,d,p=t&c.F,v=t&c.G,y=t&c.S,g=t&c.P,_=t&c.B,m=v?r:y?r[e]||(r[e]={}):(r[e]||{})[s],b=v?i:i[e]||(i[e]={}),w=b[s]||(b[s]={});v&&(n=e);for(f in n)l=!p&&m&&f in m,h=(l?m:n)[f],d=_&&l?u(h,r):g&&"function"==typeof h?u(Function.call,h):h,m&&!l&&a(m,f,h),b[f]!=h&&o(b,f,d),g&&w[f]!=h&&(w[f]=h)};r.core=i,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,t.exports=c},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n=t.exports={version:"1.2.6"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(6),i=n(11);t.exports=n(12)?function(t,e,n){return r.setDesc(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){t.exports=!n(13)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},function(t,e,n){var r=n(8),i=n(10),o=n(15)("src"),a="toString",u=Function[a],s=(""+u).split(a);n(9).inspectSource=function(t){return u.call(t)},(t.exports=function(t,e,n,a){"function"==typeof n&&(n.hasOwnProperty(o)||i(n,o,t[e]?""+t[e]:s.join(String(e))),n.hasOwnProperty("name")||i(n,"name",e)),t===r?t[e]=n:(a||delete t[e],i(t,e,n))})(Function.prototype,a,function(){return"function"==typeof this&&this[o]||u.call(this)})},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(17);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){t.exports=n(8).document&&document.documentElement},function(t,e,n){var r=n(20),i=n(8).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var r=n(20);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var r=n(26);t.exports=function(t){return Object(r(t))}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(28),i=n(26);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(22);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(29),i=Math.max,o=Math.min;t.exports=function(t,e){return t=r(t),0>t?i(t+e,0):o(t,e)}},function(t,e,n){var r=n(29),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){var r=n(16),i=n(28),o=n(25),a=n(31),u=n(33);t.exports=function(t){var e=1==t,n=2==t,s=3==t,c=4==t,f=6==t,l=5==t||f;return function(h,d,p){for(var v,y,g=o(h),_=i(g),m=r(d,p,3),b=a(_.length),w=0,S=e?u(h,b):n?u(h,0):void 0;b>w;w++)if((l||w in _)&&(v=_[w],y=m(v,w,g),t))if(e)S[w]=y;else if(y)switch(t){case 3:return!0;case 5:return v;case 6:return w;case 2:S.push(v)}else if(c)return!1;return f?-1:s||c?c:S}}},function(t,e,n){var r=n(20),i=n(34),o=n(35)("species");t.exports=function(t,e){var n;return i(t)&&(n=t.constructor,"function"!=typeof n||n!==Array&&!i(n.prototype)||(n=void 0),r(n)&&(n=n[o],null===n&&(n=void 0))),new(void 0===n?Array:n)(e)}},function(t,e,n){var r=n(22);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(36)("wks"),i=n(15),o=n(8).Symbol;t.exports=function(t){return r[t]||(r[t]=o&&o[t]||(o||i)("Symbol."+t))}},function(t,e,n){var r=n(8),i="__core-js_shared__",o=r[i]||(r[i]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,e,n){var r=n(27),i=n(31),o=n(30);t.exports=function(t){return function(e,n,a){var u,s=r(e),c=i(s.length),f=o(a,c);if(t&&n!=n){for(;c>f;)if(u=s[f++],u!=u)return!0}else for(;c>f;f++)if((t||f in s)&&s[f]===n)return t||f;return!t&&-1}}},function(t,e,n){"use strict";var r=n(6),i=n(8),o=n(21),a=n(12),u=n(7),s=n(14),c=n(13),f=n(36),l=n(39),h=n(15),d=n(35),p=n(40),v=n(41),y=n(42),g=n(34),_=n(24),m=n(27),b=n(11),w=r.getDesc,S=r.setDesc,I=r.create,x=v.get,O=i.Symbol,k=i.JSON,E=k&&k.stringify,M=!1,A=d("_hidden"),z=r.isEnum,D=f("symbol-registry"),j=f("symbols"),P="function"==typeof O,N=Object.prototype,L=a&&c(function(){return 7!=I(S({},"a",{get:function(){return S(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=w(N,e);r&&delete N[e],S(t,e,n),r&&t!==N&&S(N,e,r)}:S,T=function(t){var e=j[t]=I(O.prototype);return e._k=t,a&&M&&L(N,t,{configurable:!0,set:function(e){o(this,A)&&o(this[A],t)&&(this[A][t]=!1),L(this,t,b(1,e))}}),e},F=function(t){return"symbol"==typeof t},C=function(t,e,n){return n&&o(j,e)?(n.enumerable?(o(t,A)&&t[A][e]&&(t[A][e]=!1),n=I(n,{enumerable:b(0,!1)})):(o(t,A)||S(t,A,b(1,{})),t[A][e]=!0),L(t,e,n)):S(t,e,n)},U=function(t,e){_(t);for(var n,r=y(e=m(e)),i=0,o=r.length;o>i;)C(t,n=r[i++],e[n]);return t},R=function(t,e){return void 0===e?I(t):U(I(t),e)},q=function(t){var e=z.call(this,t);return e||!o(this,t)||!o(j,t)||o(this,A)&&this[A][t]?e:!0},B=function(t,e){var n=w(t=m(t),e);return!n||!o(j,e)||o(t,A)&&t[A][e]||(n.enumerable=!0),n},G=function(t){for(var e,n=x(m(t)),r=[],i=0;n.length>i;)o(j,e=n[i++])||e==A||r.push(e);return r},K=function(t){for(var e,n=x(m(t)),r=[],i=0;n.length>i;)o(j,e=n[i++])&&r.push(j[e]);return r},W=function(t){if(void 0!==t&&!F(t)){for(var e,n,r=[t],i=1,o=arguments;o.length>i;)r.push(o[i++]);return e=r[1],"function"==typeof e&&(n=e),(n||!g(e))&&(e=function(t,e){return n&&(e=n.call(this,t,e)),F(e)?void 0:e}),r[1]=e,E.apply(k,r)}},V=c(function(){var t=O();return"[null]"!=E([t])||"{}"!=E({a:t})||"{}"!=E(Object(t))});P||(O=function(){if(F(this))throw TypeError("Symbol is not a constructor");return T(h(arguments.length>0?arguments[0]:void 0))},s(O.prototype,"toString",function(){return this._k}),F=function(t){return t instanceof O},r.create=R,r.isEnum=q,r.getDesc=B,r.setDesc=C,r.setDescs=U,r.getNames=v.get=G,r.getSymbols=K,a&&!n(43)&&s(N,"propertyIsEnumerable",q,!0));var J={"for":function(t){return o(D,t+="")?D[t]:D[t]=O(t)},keyFor:function(t){return p(D,t)},useSetter:function(){M=!0},useSimple:function(){M=!1}};r.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),function(t){var e=d(t);J[t]=P?e:T(e)}),M=!0,u(u.G+u.W,{Symbol:O}),u(u.S,"Symbol",J),u(u.S+u.F*!P,"Object",{create:R,defineProperty:C,defineProperties:U,getOwnPropertyDescriptor:B,getOwnPropertyNames:G,getOwnPropertySymbols:K}),k&&u(u.S+u.F*(!P||V),"JSON",{stringify:W}),l(O,"Symbol"),l(Math,"Math",!0),l(i.JSON,"JSON",!0)},function(t,e,n){var r=n(6).setDesc,i=n(21),o=n(35)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(6),i=n(27);t.exports=function(t,e){for(var n,o=i(t),a=r.getKeys(o),u=a.length,s=0;u>s;)if(o[n=a[s++]]===e)return n}},function(t,e,n){var r=n(27),i=n(6).getNames,o={}.toString,a="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],u=function(t){try{return i(t)}catch(e){return a.slice()}};t.exports.get=function(t){return a&&"[object Window]"==o.call(t)?u(t):i(r(t))}},function(t,e,n){var r=n(6);t.exports=function(t){var e=r.getKeys(t),n=r.getSymbols;if(n)for(var i,o=n(t),a=r.isEnum,u=0;o.length>u;)a.call(t,i=o[u++])&&e.push(i);return e}},function(t,e){t.exports=!1},function(t,e,n){var r=n(7);r(r.S+r.F,"Object",{assign:n(45)})},function(t,e,n){var r=n(6),i=n(25),o=n(28);t.exports=n(13)(function(){var t=Object.assign,e={},n={},r=Symbol(),i="abcdefghijklmnopqrst";return e[r]=7,i.split("").forEach(function(t){n[t]=t}),7!=t({},e)[r]||Object.keys(t({},n)).join("")!=i})?function(t,e){for(var n=i(t),a=arguments,u=a.length,s=1,c=r.getKeys,f=r.getSymbols,l=r.isEnum;u>s;)for(var h,d=o(a[s++]),p=f?c(d).concat(f(d)):c(d),v=p.length,y=0;v>y;)l.call(d,h=p[y++])&&(n[h]=d[h]);return n}:Object.assign},function(t,e,n){var r=n(7);r(r.S,"Object",{is:n(47)})},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}},function(t,e,n){var r=n(7);r(r.S,"Object",{setPrototypeOf:n(49).set})},function(t,e,n){var r=n(6).getDesc,i=n(20),o=n(24),a=function(t,e){if(o(t),!i(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,i){try{i=n(16)(Function.call,r(Object.prototype,"__proto__").set,2),i(t,[]),e=!(t instanceof Array)}catch(o){e=!0}return function(t,n){return a(t,n),e?t.__proto__=n:i(t,n),t}}({},!1):void 0),check:a}},function(t,e,n){"use strict";var r=n(51),i={};i[n(35)("toStringTag")]="z",i+""!="[object z]"&&n(14)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(t,e,n){var r=n(22),i=n(35)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=(e=Object(t))[i])?n:o?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){var r=n(20);n(53)("freeze",function(t){return function(e){return t&&r(e)?t(e):e}})},function(t,e,n){var r=n(7),i=n(9),o=n(13);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},function(t,e,n){var r=n(20);n(53)("seal",function(t){return function(e){return t&&r(e)?t(e):e}})},function(t,e,n){var r=n(20);n(53)("preventExtensions",function(t){return function(e){return t&&r(e)?t(e):e}})},function(t,e,n){var r=n(20);n(53)("isFrozen",function(t){return function(e){return r(e)?t?t(e):!1:!0}})},function(t,e,n){var r=n(20);n(53)("isSealed",function(t){return function(e){return r(e)?t?t(e):!1:!0}})},function(t,e,n){var r=n(20);n(53)("isExtensible",function(t){return function(e){return r(e)?t?t(e):!0:!1}})},function(t,e,n){var r=n(27);n(53)("getOwnPropertyDescriptor",function(t){return function(e,n){return t(r(e),n)}})},function(t,e,n){var r=n(25);n(53)("getPrototypeOf",function(t){return function(e){return t(r(e))}})},function(t,e,n){var r=n(25);n(53)("keys",function(t){return function(e){return t(r(e))}})},function(t,e,n){n(53)("getOwnPropertyNames",function(){return n(41).get})},function(t,e,n){var r=n(6).setDesc,i=n(11),o=n(21),a=Function.prototype,u=/^\s*function ([^ (]*)/,s="name";s in a||n(12)&&r(a,s,{configurable:!0,get:function(){var t=(""+this).match(u),e=t?t[1]:"";return o(this,s)||r(this,s,i(5,e)),e}})},function(t,e,n){"use strict";var r=n(6),i=n(20),o=n(35)("hasInstance"),a=Function.prototype;o in a||r.setDesc(a,o,{value:function(t){if("function"!=typeof this||!i(t))return!1;if(!i(this.prototype))return t instanceof this;for(;t=r.getProto(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,n){"use strict";var r=n(6),i=n(8),o=n(21),a=n(22),u=n(66),s=n(13),c=n(67).trim,f="Number",l=i[f],h=l,d=l.prototype,p=a(r.create(d))==f,v="trim"in String.prototype,y=function(t){var e=u(t,!1);if("string"==typeof e&&e.length>2){e=v?e.trim():c(e,3);var n,r,i,o=e.charCodeAt(0);if(43===o||45===o){if(n=e.charCodeAt(2),88===n||120===n)return NaN}else if(48===o){switch(e.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+e}for(var a,s=e.slice(2),f=0,l=s.length;l>f;f++)if(a=s.charCodeAt(f),48>a||a>i)return NaN;return parseInt(s,r)}}return+e};l(" 0o1")&&l("0b1")&&!l("+0x1")||(l=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof l&&(p?s(function(){d.valueOf.call(n)}):a(n)!=f)?new h(y(e)):y(e)},r.each.call(n(12)?r.getNames(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),function(t){o(h,t)&&!o(l,t)&&r.setDesc(l,t,r.getDesc(h,t))}),l.prototype=d,d.constructor=l,n(14)(i,f,l))},function(t,e,n){var r=n(20);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(7),i=n(26),o=n(13),a=" \n\x0B\f\r \u2028\u2029\ufeff",u="["+a+"]",s="
",c=RegExp("^"+u+u+"*"),f=RegExp(u+u+"*$"),l=function(t,e){var n={};n[t]=e(h),r(r.P+r.F*o(function(){return!!a[t]()||s[t]()!=s}),"String",n)},h=l.trim=function(t,e){return t=String(i(t)),1&e&&(t=t.replace(c,"")),2&e&&(t=t.replace(f,"")),t};t.exports=l},function(t,e,n){var r=n(7);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,n){var r=n(7),i=n(8).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},function(t,e,n){var r=n(7);r(r.S,"Number",{isInteger:n(71)})},function(t,e,n){var r=n(20),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},function(t,e,n){var r=n(7);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,n){var r=n(7),i=n(71),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},function(t,e,n){var r=n(7);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){var r=n(7);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var r=n(7);r(r.S,"Number",{parseFloat:parseFloat})},function(t,e,n){var r=n(7);r(r.S,"Number",{parseInt:parseInt})},function(t,e,n){var r=n(7),i=n(79),o=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+o(t-1)*o(t+1))}})},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&1e-8>t?t-t*t/2:Math.log(1+t)}},function(t,e,n){function r(t){return isFinite(t=+t)&&0!=t?0>t?-r(-t):Math.log(t+Math.sqrt(t*t+1)):t}var i=n(7);i(i.S,"Math",{asinh:r})},function(t,e,n){var r=n(7);r(r.S,"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,n){var r=n(7),i=n(83);r(r.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:0>t?-1:1}},function(t,e,n){var r=n(7);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,n){var r=n(7),i=Math.exp;r(r.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,e,n){var r=n(7);r(r.S,"Math",{expm1:n(87)})},function(t,e){t.exports=Math.expm1||function(t){return 0==(t=+t)?t:t>-1e-6&&1e-6>t?t+t*t/2:Math.exp(t)-1}},function(t,e,n){var r=n(7),i=n(83),o=Math.pow,a=o(2,-52),u=o(2,-23),s=o(2,127)*(2-u),c=o(2,-126),f=function(t){return t+1/a-1/a};r(r.S,"Math",{fround:function(t){var e,n,r=Math.abs(t),o=i(t);return c>r?o*f(r/c/u)*c*u:(e=(1+u/a)*r,n=e-(e-r),n>s||n!=n?o*(1/0):o*n)}})},function(t,e,n){var r=n(7),i=Math.abs;r(r.S,"Math",{hypot:function(t,e){for(var n,r,o=0,a=0,u=arguments,s=u.length,c=0;s>a;)n=i(u[a++]),n>c?(r=c/n,o=o*r*r+1,c=n):n>0?(r=n/c,o+=r*r):o+=n;return c===1/0?1/0:c*Math.sqrt(o)}})},function(t,e,n){var r=n(7),i=Math.imul;r(r.S+r.F*n(13)(function(){return-5!=i(4294967295,5)||2!=i.length}),"Math",{imul:function(t,e){var n=65535,r=+t,i=+e,o=n&r,a=n&i;return 0|o*a+((n&r>>>16)*a+o*(n&i>>>16)<<16>>>0)}})},function(t,e,n){var r=n(7);r(r.S,"Math",{log10:function(t){return Math.log(t)/Math.LN10}})},function(t,e,n){var r=n(7);r(r.S,"Math",{log1p:n(79)})},function(t,e,n){var r=n(7);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,n){var r=n(7);r(r.S,"Math",{sign:n(83)})},function(t,e,n){var r=n(7),i=n(87),o=Math.exp;r(r.S+r.F*n(13)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,e,n){var r=n(7),i=n(87),o=Math.exp;r(r.S,"Math",{tanh:function(t){var e=i(t=+t),n=i(-t);return e==1/0?1:n==1/0?-1:(e-n)/(o(t)+o(-t))}})},function(t,e,n){var r=n(7);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,n){var r=n(7),i=n(30),o=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments,a=r.length,u=0;a>u;){if(e=+r[u++],i(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(65536>e?o(e):o(((e-=65536)>>10)+55296,e%1024+56320))}return n.join("")}})},function(t,e,n){var r=n(7),i=n(27),o=n(31);r(r.S,"String",{raw:function(t){for(var e=i(t.raw),n=o(e.length),r=arguments,a=r.length,u=[],s=0;n>s;)u.push(String(e[s++])),a>s&&u.push(String(r[s]));return u.join("")}})},function(t,e,n){"use strict";n(67)("trim",function(t){return function(){return t(this,3)}})},function(t,e,n){"use strict";var r=n(102)(!0);n(103)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){var r=n(29),i=n(26);t.exports=function(t){return function(e,n){var o,a,u=String(i(e)),s=r(n),c=u.length;return 0>s||s>=c?t?"":void 0:(o=u.charCodeAt(s),55296>o||o>56319||s+1===c||(a=u.charCodeAt(s+1))<56320||a>57343?t?u.charAt(s):o:t?u.slice(s,s+2):(o-55296<<10)+(a-56320)+65536)}}},function(t,e,n){"use strict";var r=n(43),i=n(7),o=n(14),a=n(10),u=n(21),s=n(104),c=n(105),f=n(39),l=n(6).getProto,h=n(35)("iterator"),d=!([].keys&&"next"in[].keys()),p="@@iterator",v="keys",y="values",g=function(){return this};t.exports=function(t,e,n,_,m,b,w){c(n,e,_);var S,I,x=function(t){
+if(!d&&t in M)return M[t];switch(t){case v:return function(){return new n(this,t)};case y:return function(){return new n(this,t)}}return function(){return new n(this,t)}},O=e+" Iterator",k=m==y,E=!1,M=t.prototype,A=M[h]||M[p]||m&&M[m],z=A||x(m);if(A){var D=l(z.call(new t));f(D,O,!0),!r&&u(M,p)&&a(D,h,g),k&&A.name!==y&&(E=!0,z=function(){return A.call(this)})}if(r&&!w||!d&&!E&&M[h]||a(M,h,z),s[e]=z,s[O]=g,m)if(S={values:k?z:x(y),keys:b?z:x(v),entries:k?x("entries"):z},w)for(I in S)I in M||o(M,I,S[I]);else i(i.P+i.F*(d||E),e,S);return S}},function(t,e){t.exports={}},function(t,e,n){"use strict";var r=n(6),i=n(11),o=n(39),a={};n(10)(a,n(35)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r.create(a,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e,n){"use strict";var r=n(7),i=n(102)(!1);r(r.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,e,n){"use strict";var r=n(7),i=n(31),o=n(108),a="endsWith",u=""[a];r(r.P+r.F*n(110)(a),"String",{endsWith:function(t){var e=o(this,t,a),n=arguments,r=n.length>1?n[1]:void 0,s=i(e.length),c=void 0===r?s:Math.min(i(r),s),f=String(t);return u?u.call(e,f,c):e.slice(c-f.length,c)===f}})},function(t,e,n){var r=n(109),i=n(26);t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(t))}},function(t,e,n){var r=n(20),i=n(22),o=n(35)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},function(t,e,n){var r=n(35)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(i){}}return!0}},function(t,e,n){"use strict";var r=n(7),i=n(108),o="includes";r(r.P+r.F*n(110)(o),"String",{includes:function(t){return!!~i(this,t,o).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(7);r(r.P,"String",{repeat:n(113)})},function(t,e,n){"use strict";var r=n(29),i=n(26);t.exports=function(t){var e=String(i(this)),n="",o=r(t);if(0>o||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(n+=e);return n}},function(t,e,n){"use strict";var r=n(7),i=n(31),o=n(108),a="startsWith",u=""[a];r(r.P+r.F*n(110)(a),"String",{startsWith:function(t){var e=o(this,t,a),n=arguments,r=i(Math.min(n.length>1?n[1]:void 0,e.length)),s=String(t);return u?u.call(e,s,r):e.slice(r,r+s.length)===s}})},function(t,e,n){"use strict";var r=n(16),i=n(7),o=n(25),a=n(116),u=n(117),s=n(31),c=n(118);i(i.S+i.F*!n(119)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,i,f,l=o(t),h="function"==typeof this?this:Array,d=arguments,p=d.length,v=p>1?d[1]:void 0,y=void 0!==v,g=0,_=c(l);if(y&&(v=r(v,p>2?d[2]:void 0,2)),void 0==_||h==Array&&u(_))for(e=s(l.length),n=new h(e);e>g;g++)n[g]=y?v(l[g],g):l[g];else for(f=_.call(l),n=new h;!(i=f.next()).done;g++)n[g]=y?a(f,v,[i.value,g],!0):i.value;return n.length=g,n}})},function(t,e,n){var r=n(24);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(o){var a=t["return"];throw void 0!==a&&r(a.call(t)),o}}},function(t,e,n){var r=n(104),i=n(35)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,e,n){var r=n(51),i=n(35)("iterator"),o=n(104);t.exports=n(9).getIteratorMethod=function(t){return void 0!=t?t[i]||t["@@iterator"]||o[r(t)]:void 0}},function(t,e,n){var r=n(35)("iterator"),i=!1;try{var o=[7][r]();o["return"]=function(){i=!0},Array.from(o,function(){throw 2})}catch(a){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){n=!0},o[r]=function(){return a},t(o)}catch(u){}return n}},function(t,e,n){"use strict";var r=n(7);r(r.S+r.F*n(13)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments,n=e.length,r=new("function"==typeof this?this:Array)(n);n>t;)r[t]=e[t++];return r.length=n,r}})},function(t,e,n){"use strict";var r=n(122),i=n(123),o=n(104),a=n(27);t.exports=n(103)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):"keys"==e?i(0,n):"values"==e?i(0,t[n]):i(0,[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e,n){var r=n(35)("unscopables"),i=Array.prototype;void 0==i[r]&&n(10)(i,r,{}),t.exports=function(t){i[r][t]=!0}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){n(125)("Array")},function(t,e,n){"use strict";var r=n(8),i=n(6),o=n(12),a=n(35)("species");t.exports=function(t){var e=r[t];o&&e&&!e[a]&&i.setDesc(e,a,{configurable:!0,get:function(){return this}})}},function(t,e,n){var r=n(7);r(r.P,"Array",{copyWithin:n(127)}),n(122)("copyWithin")},function(t,e,n){"use strict";var r=n(25),i=n(30),o=n(31);t.exports=[].copyWithin||function(t,e){var n=r(this),a=o(n.length),u=i(t,a),s=i(e,a),c=arguments,f=c.length>2?c[2]:void 0,l=Math.min((void 0===f?a:i(f,a))-s,a-u),h=1;for(u>s&&s+l>u&&(h=-1,s+=l-1,u+=l-1);l-- >0;)s in n?n[u]=n[s]:delete n[u],u+=h,s+=h;return n}},function(t,e,n){var r=n(7);r(r.P,"Array",{fill:n(129)}),n(122)("fill")},function(t,e,n){"use strict";var r=n(25),i=n(30),o=n(31);t.exports=[].fill||function(t){for(var e=r(this),n=o(e.length),a=arguments,u=a.length,s=i(u>1?a[1]:void 0,n),c=u>2?a[2]:void 0,f=void 0===c?n:i(c,n);f>s;)e[s++]=t;return e}},function(t,e,n){"use strict";var r=n(7),i=n(32)(5),o="find",a=!0;o in[]&&Array(1)[o](function(){a=!1}),r(r.P+r.F*a,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(122)(o)},function(t,e,n){"use strict";var r=n(7),i=n(32)(6),o="findIndex",a=!0;o in[]&&Array(1)[o](function(){a=!1}),r(r.P+r.F*a,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(122)(o)},function(t,e,n){var r=n(6),i=n(8),o=n(109),a=n(133),u=i.RegExp,s=u,c=u.prototype,f=/a/g,l=/a/g,h=new u(f)!==f;!n(12)||h&&!n(13)(function(){return l[n(35)("match")]=!1,u(f)!=f||u(l)==l||"/a/i"!=u(f,"i")})||(u=function(t,e){var n=o(t),r=void 0===e;return this instanceof u||!n||t.constructor!==u||!r?h?new s(n&&!r?t.source:t,e):s((n=t instanceof u)?t.source:t,n&&r?a.call(t):e):t},r.each.call(r.getNames(s),function(t){t in u||r.setDesc(u,t,{configurable:!0,get:function(){return s[t]},set:function(e){s[t]=e}})}),c.constructor=u,u.prototype=c,n(14)(i,"RegExp",u)),n(125)("RegExp")},function(t,e,n){"use strict";var r=n(24);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){var r=n(6);n(12)&&"g"!=/./g.flags&&r.setDesc(RegExp.prototype,"flags",{configurable:!0,get:n(133)})},function(t,e,n){n(136)("match",1,function(t,e){return function(n){"use strict";var r=t(this),i=void 0==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))}})},function(t,e,n){"use strict";var r=n(10),i=n(14),o=n(13),a=n(26),u=n(35);t.exports=function(t,e,n){var s=u(t),c=""[t];o(function(){var e={};return e[s]=function(){return 7},7!=""[t](e)})&&(i(String.prototype,t,n(a,s,c)),r(RegExp.prototype,s,2==e?function(t,e){return c.call(t,this,e)}:function(t){return c.call(t,this)}))}},function(t,e,n){n(136)("replace",2,function(t,e,n){return function(r,i){"use strict";var o=t(this),a=void 0==r?void 0:r[e];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)}})},function(t,e,n){n(136)("search",1,function(t,e){return function(n){"use strict";var r=t(this),i=void 0==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))}})},function(t,e,n){n(136)("split",2,function(t,e,n){return function(r,i){"use strict";var o=t(this),a=void 0==r?void 0:r[e];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)}})},function(t,e,n){"use strict";var r,i=n(6),o=n(43),a=n(8),u=n(16),s=n(51),c=n(7),f=n(20),l=n(24),h=n(17),d=n(141),p=n(142),v=n(49).set,y=n(47),g=n(35)("species"),_=n(143),m=n(144),b="Promise",w=a.process,S="process"==s(w),I=a[b],x=function(t){var e=new I(function(){});return t&&(e.constructor=Object),I.resolve(e)===e},O=function(){function t(e){var n=new I(e);return v(n,t.prototype),n}var e=!1;try{if(e=I&&I.resolve&&x(),v(t,I),t.prototype=i.create(I.prototype,{constructor:{value:t}}),t.resolve(5).then(function(){})instanceof t||(e=!1),e&&n(12)){var r=!1;I.resolve(i.setDesc({},"then",{get:function(){r=!0}})),e=r}}catch(o){e=!1}return e}(),k=function(t,e){return o&&t===I&&e===r?!0:y(t,e)},E=function(t){var e=l(t)[g];return void 0!=e?e:t},M=function(t){var e;return f(t)&&"function"==typeof(e=t.then)?e:!1},A=function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=h(e),this.reject=h(n)},z=function(t){try{t()}catch(e){return{error:e}}},D=function(t,e){if(!t.n){t.n=!0;var n=t.c;m(function(){for(var r=t.v,i=1==t.s,o=0,u=function(e){var n,o,a=i?e.ok:e.fail,u=e.resolve,s=e.reject;try{a?(i||(t.h=!0),n=a===!0?r:a(r),n===e.promise?s(TypeError("Promise-chain cycle")):(o=M(n))?o.call(n,u,s):u(n)):s(r)}catch(c){s(c)}};n.length>o;)u(n[o++]);n.length=0,t.n=!1,e&&setTimeout(function(){var e,n,i=t.p;j(i)&&(S?w.emit("unhandledRejection",r,i):(e=a.onunhandledrejection)?e({promise:i,reason:r}):(n=a.console)&&n.error&&n.error("Unhandled promise rejection",r)),t.a=void 0},1)})}},j=function(t){var e,n=t._d,r=n.a||n.c,i=0;if(n.h)return!1;for(;r.length>i;)if(e=r[i++],e.fail||!j(e.promise))return!1;return!0},P=function(t){var e=this;e.d||(e.d=!0,e=e.r||e,e.v=t,e.s=2,e.a=e.c.slice(),D(e,!0))},N=function(t){var e,n=this;if(!n.d){n.d=!0,n=n.r||n;try{if(n.p===t)throw TypeError("Promise can't be resolved itself");(e=M(t))?m(function(){var r={r:n,d:!1};try{e.call(t,u(N,r,1),u(P,r,1))}catch(i){P.call(r,i)}}):(n.v=t,n.s=1,D(n,!1))}catch(r){P.call({r:n,d:!1},r)}}};O||(I=function(t){h(t);var e=this._d={p:d(this,I,b),c:[],a:void 0,s:0,d:!1,v:void 0,h:!1,n:!1};try{t(u(N,e,1),u(P,e,1))}catch(n){P.call(e,n)}},n(146)(I.prototype,{then:function(t,e){var n=new A(_(this,I)),r=n.promise,i=this._d;return n.ok="function"==typeof t?t:!0,n.fail="function"==typeof e&&e,i.c.push(n),i.a&&i.a.push(n),i.s&&D(i,!1),r},"catch":function(t){return this.then(void 0,t)}})),c(c.G+c.W+c.F*!O,{Promise:I}),n(39)(I,b),n(125)(b),r=n(9)[b],c(c.S+c.F*!O,b,{reject:function(t){var e=new A(this),n=e.reject;return n(t),e.promise}}),c(c.S+c.F*(!O||x(!0)),b,{resolve:function(t){if(t instanceof I&&k(t.constructor,this))return t;var e=new A(this),n=e.resolve;return n(t),e.promise}}),c(c.S+c.F*!(O&&n(119)(function(t){I.all(t)["catch"](function(){})})),b,{all:function(t){var e=E(this),n=new A(e),r=n.resolve,o=n.reject,a=[],u=z(function(){p(t,!1,a.push,a);var n=a.length,u=Array(n);n?i.each.call(a,function(t,i){var a=!1;e.resolve(t).then(function(t){a||(a=!0,u[i]=t,--n||r(u))},o)}):r(u)});return u&&o(u.error),n.promise},race:function(t){var e=E(this),n=new A(e),r=n.reject,i=z(function(){p(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return i&&r(i.error),n.promise}})},function(t,e){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError(n+": use the 'new' operator!");return t}},function(t,e,n){var r=n(16),i=n(116),o=n(117),a=n(24),u=n(31),s=n(118);t.exports=function(t,e,n,c){var f,l,h,d=s(t),p=r(n,c,e?2:1),v=0;if("function"!=typeof d)throw TypeError(t+" is not iterable!");if(o(d))for(f=u(t.length);f>v;v++)e?p(a(l=t[v])[0],l[1]):p(t[v]);else for(h=d.call(t);!(l=h.next()).done;)i(h,p,l.value,e)}},function(t,e,n){var r=n(24),i=n(17),o=n(35)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||void 0==(n=r(a)[o])?e:i(n)}},function(t,e,n){var r,i,o,a=n(8),u=n(145).set,s=a.MutationObserver||a.WebKitMutationObserver,c=a.process,f=a.Promise,l="process"==n(22)(c),h=function(){var t,e,n;for(l&&(t=c.domain)&&(c.domain=null,t.exit());r;)e=r.domain,n=r.fn,e&&e.enter(),n(),e&&e.exit(),r=r.next;i=void 0,t&&t.enter()};if(l)o=function(){c.nextTick(h)};else if(s){var d=1,p=document.createTextNode("");new s(h).observe(p,{characterData:!0}),o=function(){p.data=d=-d}}else o=f&&f.resolve?function(){f.resolve().then(h)}:function(){u.call(a,h)};t.exports=function(t){var e={fn:t,next:void 0,domain:l&&c.domain};i&&(i.next=e),r||(r=e,o()),i=e}},function(t,e,n){var r,i,o,a=n(16),u=n(23),s=n(18),c=n(19),f=n(8),l=f.process,h=f.setImmediate,d=f.clearImmediate,p=f.MessageChannel,v=0,y={},g="onreadystatechange",_=function(){var t=+this;if(y.hasOwnProperty(t)){var e=y[t];delete y[t],e()}},m=function(t){_.call(t.data)};h&&d||(h=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return y[++v]=function(){u("function"==typeof t?t:Function(t),e)},r(v),v},d=function(t){delete y[t]},"process"==n(22)(l)?r=function(t){l.nextTick(a(_,t,1))}:p?(i=new p,o=i.port2,i.port1.onmessage=m,r=a(o.postMessage,o,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",m,!1)):r=g in c("script")?function(t){s.appendChild(c("script"))[g]=function(){s.removeChild(this),_.call(t)}}:function(t){setTimeout(a(_,t,1),0)}),t.exports={set:h,clear:d}},function(t,e,n){var r=n(14);t.exports=function(t,e){for(var n in e)r(t,n,e[n]);return t}},function(t,e,n){"use strict";var r=n(148);n(149)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(this,t);return e&&e.v},set:function(t,e){return r.def(this,0===t?0:t,e)}},r,!0)},function(t,e,n){"use strict";var r=n(6),i=n(10),o=n(146),a=n(16),u=n(141),s=n(26),c=n(142),f=n(103),l=n(123),h=n(15)("id"),d=n(21),p=n(20),v=n(125),y=n(12),g=Object.isExtensible||p,_=y?"_s":"size",m=0,b=function(t,e){if(!p(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!d(t,h)){if(!g(t))return"F";if(!e)return"E";i(t,h,++m)}return"O"+t[h]},w=function(t,e){var n,r=b(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,i){var f=t(function(t,o){u(t,f,e),t._i=r.create(null),t._f=void 0,t._l=void 0,t[_]=0,void 0!=o&&c(o,n,t[i],t)});return o(f.prototype,{clear:function(){for(var t=this,e=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete e[n.i];t._f=t._l=void 0,t[_]=0},"delete":function(t){var e=this,n=w(e,t);if(n){var r=n.n,i=n.p;delete e._i[n.i],n.r=!0,i&&(i.n=r),r&&(r.p=i),e._f==n&&(e._f=r),e._l==n&&(e._l=i),e[_]--}return!!n},forEach:function(t){for(var e,n=a(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.n:this._f;)for(n(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!w(this,t)}}),y&&r.setDesc(f.prototype,"size",{get:function(){return s(this[_])}}),f},def:function(t,e,n){var r,i,o=w(t,e);return o?o.v=n:(t._l=o={i:i=b(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=o),r&&(r.n=o),t[_]++,"F"!==i&&(t._i[i]=o)),t},getEntry:w,setStrong:function(t,e,n){f(t,e,function(t,e){this._t=t,this._k=e,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?"keys"==e?l(0,n.k):"values"==e?l(0,n.v):l(0,[n.k,n.v]):(t._t=void 0,l(1))},n?"entries":"values",!n,!0),v(e)}}},function(t,e,n){"use strict";var r=n(8),i=n(7),o=n(14),a=n(146),u=n(142),s=n(141),c=n(20),f=n(13),l=n(119),h=n(39);t.exports=function(t,e,n,d,p,v){var y=r[t],g=y,_=p?"set":"add",m=g&&g.prototype,b={},w=function(t){var e=m[t];o(m,t,"delete"==t?function(t){return v&&!c(t)?!1:e.call(this,0===t?0:t)}:"has"==t?function(t){return v&&!c(t)?!1:e.call(this,0===t?0:t)}:"get"==t?function(t){return v&&!c(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof g&&(v||m.forEach&&!f(function(){(new g).entries().next()}))){var S,I=new g,x=I[_](v?{}:-0,1)!=I,O=f(function(){I.has(1)}),k=l(function(t){new g(t)});k||(g=e(function(e,n){s(e,g,t);var r=new y;return void 0!=n&&u(n,p,r[_],r),r}),g.prototype=m,m.constructor=g),v||I.forEach(function(t,e){S=1/e===-(1/0)}),(O||S)&&(w("delete"),w("has"),p&&w("get")),(S||x)&&w(_),v&&m.clear&&delete m.clear}else g=d.getConstructor(e,t,p,_),a(g.prototype,n);return h(g,t),b[t]=g,i(i.G+i.W+i.F*(g!=y),b),v||d.setStrong(g,t,p),g}},function(t,e,n){"use strict";var r=n(148);n(149)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(this,t=0===t?0:t,t)}},r)},function(t,e,n){"use strict";var r=n(6),i=n(14),o=n(152),a=n(20),u=n(21),s=o.frozenStore,c=o.WEAK,f=Object.isExtensible||a,l={},h=n(149)("WeakMap",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){if(a(t)){if(!f(t))return s(this).get(t);if(u(t,c))return t[c][this._i]}},set:function(t,e){return o.def(this,t,e)}},o,!0,!0);7!=(new h).set((Object.freeze||Object)(l),7).get(l)&&r.each.call(["delete","has","get","set"],function(t){var e=h.prototype,n=e[t];i(e,t,function(e,r){if(a(e)&&!f(e)){var i=s(this)[t](e,r);return"set"==t?this:i}return n.call(this,e,r)})})},function(t,e,n){"use strict";var r=n(10),i=n(146),o=n(24),a=n(20),u=n(141),s=n(142),c=n(32),f=n(21),l=n(15)("weak"),h=Object.isExtensible||a,d=c(5),p=c(6),v=0,y=function(t){return t._l||(t._l=new g)},g=function(){this.a=[]},_=function(t,e){return d(t.a,function(t){return t[0]===e})};g.prototype={get:function(t){var e=_(this,t);return e?e[1]:void 0},has:function(t){return!!_(this,t)},set:function(t,e){var n=_(this,t);n?n[1]=e:this.a.push([t,e])},"delete":function(t){var e=p(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,r){var o=t(function(t,i){u(t,o,e),t._i=v++,t._l=void 0,void 0!=i&&s(i,n,t[r],t)});return i(o.prototype,{"delete":function(t){return a(t)?h(t)?f(t,l)&&f(t[l],this._i)&&delete t[l][this._i]:y(this)["delete"](t):!1},has:function(t){return a(t)?h(t)?f(t,l)&&f(t[l],this._i):y(this).has(t):!1}}),o},def:function(t,e,n){return h(o(e))?(f(e,l)||r(e,l,{}),e[l][t._i]=n):y(t).set(e,n),t},frozenStore:y,WEAK:l}},function(t,e,n){"use strict";var r=n(152);n(149)("WeakSet",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(this,t,!0)}},r,!1,!0)},function(t,e,n){var r=n(7),i=Function.apply;r(r.S,"Reflect",{apply:function(t,e,n){return i.call(t,e,n)}})},function(t,e,n){var r=n(6),i=n(7),o=n(17),a=n(24),u=n(20),s=Function.bind||n(9).Function.prototype.bind;i(i.S+i.F*n(13)(function(){function t(){}return!(Reflect.construct(function(){},[],t)instanceof t)}),"Reflect",{construct:function(t,e){o(t);var n=arguments.length<3?t:o(arguments[2]);if(t==n){if(void 0!=e)switch(a(e).length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var i=[null];return i.push.apply(i,e),new(s.apply(t,i))}var c=n.prototype,f=r.create(u(c)?c:Object.prototype),l=Function.apply.call(t,f,e);return u(l)?l:f}})},function(t,e,n){var r=n(6),i=n(7),o=n(24);i(i.S+i.F*n(13)(function(){Reflect.defineProperty(r.setDesc({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(t,e,n){o(t);try{return r.setDesc(t,e,n),!0}catch(i){return!1}}})},function(t,e,n){var r=n(7),i=n(6).getDesc,o=n(24);r(r.S,"Reflect",{deleteProperty:function(t,e){var n=i(o(t),e);return n&&!n.configurable?!1:delete t[e]}})},function(t,e,n){"use strict";var r=n(7),i=n(24),o=function(t){this._t=i(t),this._i=0;var e,n=this._k=[];for(e in t)n.push(e)};n(105)(o,"Object",function(){var t,e=this,n=e._k;do if(e._i>=n.length)return{value:void 0,done:!0};while(!((t=n[e._i++])in e._t));return{value:t,done:!1}}),r(r.S,"Reflect",{enumerate:function(t){return new o(t)}})},function(t,e,n){function r(t,e){var n,a,c=arguments.length<3?t:arguments[2];return s(t)===c?t[e]:(n=i.getDesc(t,e))?o(n,"value")?n.value:void 0!==n.get?n.get.call(c):void 0:u(a=i.getProto(t))?r(a,e,c):void 0}var i=n(6),o=n(21),a=n(7),u=n(20),s=n(24);a(a.S,"Reflect",{get:r})},function(t,e,n){var r=n(6),i=n(7),o=n(24);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return r.getDesc(o(t),e)}})},function(t,e,n){var r=n(7),i=n(6).getProto,o=n(24);r(r.S,"Reflect",{getPrototypeOf:function(t){return i(o(t))}})},function(t,e,n){var r=n(7);r(r.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,n){var r=n(7),i=n(24),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return i(t),o?o(t):!0}})},function(t,e,n){var r=n(7);r(r.S,"Reflect",{ownKeys:n(165)})},function(t,e,n){var r=n(6),i=n(24),o=n(8).Reflect;t.exports=o&&o.ownKeys||function(t){var e=r.getNames(i(t)),n=r.getSymbols;return n?e.concat(n(t)):e}},function(t,e,n){var r=n(7),i=n(24),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){i(t);try{return o&&o(t),!0}catch(e){return!1}}})},function(t,e,n){function r(t,e,n){var a,f,l=arguments.length<4?t:arguments[3],h=i.getDesc(s(t),e);if(!h){if(c(f=i.getProto(t)))return r(f,e,n,l);h=u(0)}return o(h,"value")?h.writable!==!1&&c(l)?(a=i.getDesc(l,e)||u(0),a.value=n,i.setDesc(l,e,a),!0):!1:void 0===h.set?!1:(h.set.call(l,n),!0)}var i=n(6),o=n(21),a=n(7),u=n(11),s=n(24),c=n(20);a(a.S,"Reflect",{set:r})},function(t,e,n){var r=n(7),i=n(49);i&&r(r.S,"Reflect",{setPrototypeOf:function(t,e){i.check(t,e);try{return i.set(t,e),!0}catch(n){return!1}}})},function(t,e,n){"use strict";var r=n(7),i=n(37)(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(122)("includes")},function(t,e,n){"use strict";var r=n(7),i=n(102)(!0);r(r.P,"String",{at:function(t){return i(this,t)}})},function(t,e,n){"use strict";var r=n(7),i=n(172);r(r.P,"String",{padLeft:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,n){var r=n(31),i=n(113),o=n(26);t.exports=function(t,e,n,a){var u=String(o(t)),s=u.length,c=void 0===n?" ":String(n),f=r(e);if(s>=f)return u;""==c&&(c=" ");var l=f-s,h=i.call(c,Math.ceil(l/c.length));return h.length>l&&(h=h.slice(0,l)),a?h+u:u+h}},function(t,e,n){"use strict";var r=n(7),i=n(172);r(r.P,"String",{padRight:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,n){"use strict";n(67)("trimLeft",function(t){return function(){return t(this,1)}})},function(t,e,n){"use strict";n(67)("trimRight",function(t){return function(){return t(this,2)}})},function(t,e,n){var r=n(7),i=n(177)(/[\\^$*+?.()|[\]{}]/g,"\\$&");r(r.S,"RegExp",{escape:function(t){return i(t)}})},function(t,e){t.exports=function(t,e){var n=e===Object(e)?function(t){return e[t]}:e;return function(e){return String(e).replace(t,n)}}},function(t,e,n){var r=n(6),i=n(7),o=n(165),a=n(27),u=n(11);i(i.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,i=a(t),s=r.setDesc,c=r.getDesc,f=o(i),l={},h=0;f.length>h;)n=c(i,e=f[h++]),e in l?s(l,e,u(0,n)):l[e]=n;return l}})},function(t,e,n){var r=n(7),i=n(180)(!1);r(r.S,"Object",{values:function(t){return i(t)}})},function(t,e,n){var r=n(6),i=n(27),o=r.isEnum;t.exports=function(t){return function(e){for(var n,a=i(e),u=r.getKeys(a),s=u.length,c=0,f=[];s>c;)o.call(a,n=u[c++])&&f.push(t?[n,a[n]]:a[n]);return f}}},function(t,e,n){var r=n(7),i=n(180)(!0);r(r.S,"Object",{entries:function(t){return i(t)}})},function(t,e,n){var r=n(7);r(r.P,"Map",{toJSON:n(183)("Map")})},function(t,e,n){var r=n(142),i=n(51);t.exports=function(t){return function(){if(i(this)!=t)throw TypeError(t+"#toJSON isn't generic");var e=[];return r(this,!1,e.push,e),e}}},function(t,e,n){var r=n(7);r(r.P,"Set",{toJSON:n(183)("Set")})},function(t,e,n){var r=n(6),i=n(7),o=n(16),a=n(9).Array||Array,u={},s=function(t,e){r.each.call(t.split(","),function(t){void 0==e&&t in a?u[t]=a[t]:t in[]&&(u[t]=o(Function.call,[][t],e))})};s("pop,reverse,shift,keys,values,entries",1),s("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3),s("join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill"),i(i.S,"Array",u)},function(t,e,n){var r=n(8),i=n(7),o=n(23),a=n(187),u=r.navigator,s=!!u&&/MSIE .\./.test(u.userAgent),c=function(t){return s?function(e,n){return t(o(a,[].slice.call(arguments,2),"function"==typeof e?e:Function(e)),n)}:t};i(i.G+i.B+i.F*s,{setTimeout:c(r.setTimeout),setInterval:c(r.setInterval)})},function(t,e,n){"use strict";var r=n(188),i=n(23),o=n(17);t.exports=function(){for(var t=o(this),e=arguments.length,n=Array(e),a=0,u=r._,s=!1;e>a;)(n[a]=arguments[a++])===u&&(s=!0);return function(){var r,o=this,a=arguments,c=a.length,f=0,l=0;if(!s&&!c)return i(t,n,o);if(r=n.slice(),s)for(;e>f;f++)r[f]===u&&(r[f]=a[l++]);for(;c>l;)r.push(a[l++]);return i(t,r,o)}}},function(t,e,n){t.exports=n(8)},function(t,e,n){var r=n(7),i=n(145);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,e,n){n(121);var r=n(8),i=n(10),o=n(104),a=n(35)("iterator"),u=r.NodeList,s=r.HTMLCollection,c=u&&u.prototype,f=s&&s.prototype,l=o.NodeList=o.HTMLCollection=o.Array;c&&!c[a]&&i(c,a,l),f&&!f[a]&&i(f,a,l)},function(t,e,n){(function(e,n,r){!function(e){"use strict";function i(t,e,n,r){var i=Object.create((e||a).prototype),o=new v(r||[]);return i._invoke=h(t,n,o),i}function o(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(r){return{type:"throw",arg:r}}}function a(){}function u(){}function s(){}function c(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function f(t){this.arg=t}function l(t){function e(e,r){var i=t[e](r),o=i.value;return o instanceof f?n.resolve(o.arg).then(a,u):n.resolve(o).then(function(t){return i.value=t,i})}function i(t,r){function i(){return e(t,r)}return o=o?o.then(i,i):new n(function(t){t(i())})}"object"==typeof r&&r.domain&&(e=r.domain.bind(e));var o,a=e.bind(t,"next"),u=e.bind(t,"throw");e.bind(t,"return");this._invoke=i}function h(t,e,n){var r=I;return function(i,a){if(r===O)throw new Error("Generator is already running");if(r===k){if("throw"===i)throw a;return g()}for(;;){var u=n.delegate;if(u){if("return"===i||"throw"===i&&u.iterator[i]===_){n.delegate=null;var s=u.iterator["return"];if(s){var c=o(s,u.iterator,a);if("throw"===c.type){i="throw",a=c.arg;continue}}if("return"===i)continue}var c=o(u.iterator[i],u.iterator,a);if("throw"===c.type){n.delegate=null,i="throw",a=c.arg;continue}i="next",a=_;var f=c.arg;if(!f.done)return r=x,f;n[u.resultName]=f.value,n.next=u.nextLoc,n.delegate=null}if("next"===i)n._sent=a,r===x?n.sent=a:n.sent=_;else if("throw"===i){if(r===I)throw r=k,a;n.dispatchException(a)&&(i="next",a=_)}else"return"===i&&n.abrupt("return",a);r=O;var c=o(t,e,n);if("normal"===c.type){r=n.done?k:x;var f={value:c.arg,done:n.done};if(c.arg!==E)return f;n.delegate&&"next"===i&&(a=_)}else"throw"===c.type&&(r=k,i="throw",a=c.arg)}}}function d(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function p(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function v(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(d,this),this.reset(!0)}function y(t){if(t){var e=t[b];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function i(){for(;++n=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var a=m.call(i,"catchLoc"),u=m.call(i,"finallyLoc");if(a&&u){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&m.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),p(n),E}},"catch":function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;p(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:y(t),resultName:e,nextLoc:n},E}}}("object"==typeof e?e:"object"==typeof window?window:"object"==typeof self?self:this)}).call(e,function(){return this}(),n(3),n(192))},function(t,e){function n(){c=!1,a.length?s=a.concat(s):f=-1,s.length&&r()}function r(){if(!c){var t=setTimeout(n);c=!0;for(var e=s.length;e;){for(a=s,s=[];++f1)for(var n=1;n=200&&t.status<300)return t;throw l(t)}function o(t){return t.json()}function a(t){var e=t.status,n=t.message||null,r=t.toastr||null,i=void 0;switch(e){case"unauthenticated":throw document.location.href=f.config.base_url_relative,l("Logged out");case"unauthorized":e="error",n=n||"Unauthorized.";break;case"error":e="error",n=n||"Unknown error.";break;case"success":e="success",n=n||"";break;default:e="error",n=n||"Invalid AJAX response."}return r&&(i=Object.assign({},c["default"].options),Object.keys(r).forEach(function(t){return c["default"].options[t]=r[t]})),n&&c["default"]["success"===e?"success":"error"](n),r&&(c["default"].options=i),
+t}function u(t){c["default"].error("Fetch Failed: "+t.message+" "+t.stack+" "),console.error(t.message+" at "+t.stack)}Object.defineProperty(e,"__esModule",{value:!0}),e.parseStatus=i,e.parseJSON=o,e.userFeedback=a,e.userFeedbackError=u;var s=n(194),c=r(s),f=n(198),l=function h(t){var h=new Error(t.statusText||t||"");return h.response=t,h}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(195),o=r(i);o["default"].options.positionClass="toast-top-right",o["default"].options.preventDuplicates=!0,e["default"]=o["default"]},,,,function(t,e){t.exports=GravAdmin},function(t,e){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(t){return"function"==typeof t}function i(t){return"number"==typeof t}function o(t){return"object"==typeof t&&null!==t}function a(t){return void 0===t}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if(!i(t)||0>t||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,n,i,u,s,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[t],a(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:u=Array.prototype.slice.call(arguments,1),n.apply(this,u)}else if(o(n))for(u=Array.prototype.slice.call(arguments,1),c=n.slice(),i=c.length,s=0;i>s;s++)c[s].apply(this,u);return!0},n.prototype.addListener=function(t,e){var i;if(!r(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,r(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,i&&i>0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function n(){this.removeListener(t,n),i||(i=!0,e.apply(this,arguments))}if(!r(e))throw TypeError("listener must be a function");var i=!1;return n.listener=e,this.on(t,n),this},n.prototype.removeListener=function(t,e){var n,i,a,u;if(!r(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],a=n.length,i=-1,n===e||r(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(n)){for(u=a;u-- >0;)if(n[u]===e||n[u].listener&&n[u].listener===e){i=u;break}if(0>i)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],r(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?r(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(r(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,n){(function(t){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n\n Grav v'+t.available+" "+s.translations.PLUGIN_ADMIN.IS_NOW_AVAILABLE+'! ('+s.translations.PLUGIN_ADMIN.CURRENT+"v"+t.version+") \n ";n+=t.isSymlink?' ':''+s.translations.PLUGIN_ADMIN.UPDATE_GRAV_NOW+" ",(0,u["default"])("[data-gpm-grav]").addClass("grav").html(""+n+"
")}return(0,u["default"])("#grav-update-button").on("click",function(){(0,u["default"])(this).html(s.translations.PLUGIN_ADMIN.UPDATING_PLEASE_WAIT+" "+(0,f["default"])(t.assets["grav-update"].size)+"..")}),this}},{key:"resources",value:function(){if(!this.payload.resources.total)return this.maintenance("hide");var t=["plugins","themes"],e=["plugin","theme"],n=this.task,r=this.payload.resources,i=r.plugins,o=r.themes;return this.payload.resources.total?void[i,o].forEach(function(r,i){if(r&&!Array.isArray(r)){var o=Object.keys(r).length,a=t[i];(0,u["default"])('#admin-menu a[href$="/'+t[i]+'"]').find(".badges").addClass("with-updates").find(".badge.updates").text(o);var c=a.charAt(0).toUpperCase()+a.substr(1).toLowerCase(),f=(0,u["default"])(".grav-update."+a);f.html('\n \n \n '+o+" "+s.translations.PLUGIN_ADMIN.OF_YOUR+" "+a+" "+s.translations.PLUGIN_ADMIN.HAVE_AN_UPDATE_AVAILABLE+'\n '+s.translations.PLUGIN_ADMIN.UPDATE+" All "+c+" \n
\n "),Object.keys(r).forEach(function(t){var o=(0,u["default"])("[data-gpm-"+e[i]+'="'+t+'"] .gpm-name'),c=o.find("a");"plugins"!==a||o.find(".badge.update").length?"themes"===a&&o.append('"):o.append(''+s.translations.PLUGIN_ADMIN.UPDATE_AVAILABLE+"! ");var f=(0,u["default"])(".grav-update."+e[i]);f.length&&f.html('\n \n \n v'+r[t].available+" "+s.translations.PLUGIN_ADMIN.OF_THIS+" "+e[i]+" "+s.translations.PLUGIN_ADMIN.IS_NOW_AVAILABLE+'!\n '+s.translations.PLUGIN_ADMIN.UPDATE+" "+(e[i].charAt(0).toUpperCase()+e[i].substr(1).toLowerCase())+" \n
\n ")})}}):this}}]),t}();e["default"]=h;var d=new h;e.Instance=d,l.Instance.on("fetched",function(t,e){d.setPayload(t.payload||{}),d.grav().resources()}),"1"===s.config.enable_auto_updates_check&&l.Instance.fetch()},function(t,e){"use strict";function n(t,e){if(0===t)return"0 Byte";var n=1e3,i=Math.floor(Math.log(t)/Math.log(n)),o=e+1||3;return(t/Math.pow(n,i)).toPrecision(o)+" "+r[i]}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n;var r=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}var i=n(196),o=r(i),a=n(1),u=n(198),s=n(194),c=r(s);(0,o["default"])("[data-gpm-checkupdates]").on("click",function(){var t=(0,o["default"])(this);t.find("i").addClass("fa-spin"),a.Instance.fetch(function(e){t.find("i").removeClass("fa-spin");var n=e.payload;if(n)if(n.grav.isUpdatable||n.resources.total){var r=n.grav.isUpdatable?"Grav v"+n.grav.available:"",i=n.resources.total?n.resources.total+" "+u.translations.PLUGIN_ADMIN.UPDATES_ARE_AVAILABLE:"";i||(r+=" "+u.translations.PLUGIN_ADMIN.IS_AVAILABLE_FOR_UPDATE),c["default"].info(r+(r&&i?" "+u.translations.PLUGIN_ADMIN.AND+" ":"")+i)}else c["default"].success(u.translations.PLUGIN_ADMIN.EVERYTHING_UP_TO_DATE)},!0)})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}var i=n(196),o=r(i),a=n(205),u=r(a);(0,o["default"])("body").on("click","[data-maintenance-update]",function(){var t=(0,o["default"])(this),e=t.data("maintenanceUpdate");t.attr("disabled","disabled").find("> .fa").removeClass("fa-cloud-download").addClass("fa-refresh fa-spin"),(0,u["default"])(e,function(e){"updategrav"===e.type&&((0,o["default"])("[data-gpm-grav]").remove(),(0,o["default"])("#footer .grav-version").html(e.version)),t.removeAttr("disabled").find("> .fa").removeClass("fa-refresh fa-spin").addClass("fa-cloud-download")})})},function(t,e,n){(function(t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(193),i=n(198),o=void 0,a=function(e){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],a=arguments.length<=2||void 0===arguments[2]?function(){return!0}:arguments[2];return"function"==typeof n&&(a=n,n={}),n.method&&"post"===n.method&&n.body&&!function(){var t=new FormData;n.body=Object.assign({"admin-nonce":i.config.admin_nonce},n.body),Object.keys(n.body).map(function(e){return t.append(e,n.body[e])}),n.body=t}(),n=Object.assign({credentials:"same-origin",headers:{Accept:"application/json"}},n),t(e,n).then(function(t){return o=t,t}).then(r.parseStatus).then(r.parseJSON).then(r.userFeedback).then(function(t){return a(t,o)})["catch"](r.userFeedbackError)};e["default"]=a}).call(e,n(2))},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(207),o=r(i),a=n(209);n(210),e["default"]={Chart:{Chart:o["default"],UpdatesChart:i.UpdatesChart,Instances:i.Instances},Cache:a.Instance}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var u=function w(t,e,n){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,e);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:w(i,e,n)}if("value"in r)return r.value;var o=r.get;if(void 0!==o)return o.call(n)},s=function(){function t(t,e){for(var n=0;n-1,g=e.defaults={data:{series:[100,0]},options:{Pie:{donut:!0,donutWidth:10,startAngle:0,total:100,showLabel:!1,height:150,chartPadding:y?25:10},Bar:{height:164,chartPadding:y?25:5,axisX:{showGrid:!1,labelOffset:{x:0,y:5}},axisY:{offset:15,showLabel:!0,showGrid:!0,labelOffset:{x:5,y:5},scaleMinSpace:20}}}},_=function(){function t(e){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];if(a(this,t),this.element=(0,f["default"])(e)||[],this.element[0]){var i=(this.element.data("chart-type")||"pie").toLowerCase();this.type=i.charAt(0).toUpperCase()+i.substr(1).toLowerCase(),n=Object.assign({},g.options[this.type],n),r=Object.assign({},g.data,r),Object.assign(this,{options:n,data:r}),this.chart=h["default"][this.type](this.element.find(".ct-chart")[0],this.data,this.options)}}return s(t,[{key:"updateData",value:function(t){Object.assign(this.data,t),this.chart.update(this.data)}}]),t}();e["default"]=_;var m=e.UpdatesChart=function(t){function e(t){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];a(this,e);var o=i(this,Object.getPrototypeOf(e).call(this,t,n,r));return o.chart.on("draw",function(t){return o.draw(t)}),p.Instance.on("fetched",function(t){var e=t.payload.grav,n=100*(t.payload.resources.total+(e.isUpdatable?1:0))/(t.payload.installed+(e.isUpdatable?1:0)),r=100-n;o.updateData({series:[r,n]}),t.payload.resources.total&&v.Instance.maintenance("show")}),o}return o(e,t),s(e,[{key:"draw",value:function(t){if(!t.index){var e=d.translations.PLUGIN_ADMIN[100===t.value?"FULLY_UPDATED":"UPDATES_AVAILABLE"];this.element.find(".numeric span").text(Math.round(t.value)+"%"),this.element.find(".js__updates-available-description").html(e),this.element.find(".hidden").removeClass("hidden")}}},{key:"updateData",value:function(t){u(Object.getPrototypeOf(e.prototype),"updateData",this).call(this,t),this.data.series[0]<100&&this.element.closest("#updates").find("[data-maintenance-update]").fadeIn()}}]),e}(_),b={};(0,f["default"])("[data-chart-name]").each(function(){var t=(0,f["default"])(this),e=t.data("chart-name")||"",n=t.data("chart-options")||{},r=t.data("chart-data")||{};"updates"===e?b[e]=new m(t,n,r):b[e]=new _(t,n,r)});e.Instances=b},,function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var n=0;n .fa").removeClass("fa-refresh fa-spin").addClass("fa-trash")}},{key:"disable",value:function(){this.element.attr("disabled","disabled").find("> .fa").removeClass("fa-trash").addClass("fa-refresh fa-spin")}}]),t}();e["default"]=h;var d=new h;e.Instance=d},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}var i=n(196),o=r(i),a=n(198),u=n(205),s=r(u),c=n(207);(0,o["default"])('[data-ajax*="task:backup"]').on("click",function(){var t=(0,o["default"])(this),e=t.data("ajax");t.attr("disabled","disabled").find("> .fa").removeClass("fa-database").addClass("fa-spin fa-refresh"),(0,s["default"])(e,function(){c.Instances&&c.Instances.backups&&(c.Instances.backups.updateData({series:[0,100]}),c.Instances.backups.element.find(".numeric").html("0 "+a.translations.PLUGIN_ADMIN.DAYS.toLowerCase()+" ")),t.removeAttr("disabled").find("> .fa").removeClass("fa-spin fa-refresh").addClass("fa-database")})})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(196),o=r(i),a=n(212),u=r(a),s=n(213),c=r(s);n(220);var f=null,l=(0,o["default"])("#ordering");l.length&&(f=new u["default"](l.get(0),{filter:".ignore",onUpdate:function(t){var e=(0,o["default"])(t.item),n=l.children().index(e)+1;(0,o["default"])("[data-order]").val(n)}})),e["default"]={Ordering:f,PageFilters:{PageFilters:c["default"],Instance:s.Instance}}},,function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},a=function(){function t(t,e){for(var n=0;nf&&f>0?o=setTimeout(i,e-f):(o=null,n||(c=t.apply(u,a),o||(u=a=null)))}var o,a,u,s,c;return null==e&&(e=100),function(){u=this,a=arguments,s=r();var f=n&&!o;return o||(o=setTimeout(i,e)),f&&(c=t.apply(u,a),u=a=null),c}}},function(t,e){function n(){return(new Date).getTime()}t.exports=Date.now||n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var n=0;n ');a.parent().append(e),a.siblings("label").on("mousedown touchdown",function(t){t.preventDefault();var n=(0,o["default"])('[data-remodal-id="changes"] [data-leave-action="continue"]');n.one("click",function(){(0,o["default"])(window).on("beforeunload._grav"),e.off("click._grav"),(0,o["default"])(t.target).trigger("click")}),e.trigger("click._grav")}),a.on("change",function(n){var r=(0,o["default"])(n.target);t=r.data("leave-url"),setTimeout(function(){return e.attr("href",t).get(0).click()},5)})}()},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}var i=n(196),o=r(i),a=!1,u=(0,o["default"])('input[name="folder"]'),s=(0,o["default"])('input[name="title"]');s.on("input focus blur",function(){if(a)return!0;var t=o["default"].slugify(s.val());u.val(t)}),u.on("input",function(){var t=u.get(0),e=u.val(),n={start:t.selectionStart,end:t.selectionEnd};e=e.toLowerCase().replace(/\s/g,"-").replace(/[^a-z0-9_\-]/g,""),u.val(e),a=!!e,t.setSelectionRange(n.start,n.end)}),u.on("focus blur",function(){return s.trigger("input")})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}var i=n(196),o=r(i);(0,o["default"])('[data-page-move] button[name="task"][value="save"]').on("click",function(){var t=(0,o["default"])('form#blueprints:first select[name="route"]'),e=(0,o["default"])("[data-page-move] select").val();if(t.length&&t.val()!==e){var n=t.data("selectize");t.val(e),n&&n.setValue(e)}})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}var i=n(196),o=r(i);(0,o["default"])('[data-remodal-target="delete"]').on("click",function(){var t=(0,o["default"])('[data-remodal-id="delete"] [data-delete-action]'),e=(0,o["default"])(this).data("delete-url");t.data("delete-action",e)}),(0,o["default"])("[data-delete-action]").on("click",function(){var t=o["default"].remodal.lookup[(0,o["default"])('[data-remodal-id="delete"]').data("remodal")];window.location.href=(0,o["default"])(this).data("delete-action"),t.close()})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var n=0;n\n \n
\n
\n
\n
\n
\n ✔
\n ✘
\n
\n Delete \n Insert \n '.trim()},p=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=e.form,r=void 0===n?"[data-media-url]":n,o=e.container,a=void 0===o?"#grav-dropzone":o,s=e.options,f=void 0===s?{}:s;i(this,t),this.form=(0,u["default"])(r),this.container=(0,u["default"])(a),this.form.length&&this.container.length&&(this.options=Object.assign({},d,{url:this.form.data("media-url")+"/task"+h.config.param_sep+"addmedia",acceptedFiles:this.form.data("media-types")},f),this.dropzone=new c["default"](a,this.options),this.dropzone.on("complete",this.onDropzoneComplete.bind(this)),this.dropzone.on("success",this.onDropzoneSuccess.bind(this)),this.dropzone.on("removedfile",this.onDropzoneRemovedFile.bind(this)),this.dropzone.on("sending",this.onDropzoneSending.bind(this)),this.fetchMedia())}return o(t,[{key:"fetchMedia",value:function(){var t=this,e=this.form.data("media-url")+"/task"+h.config.param_sep+"listmedia/admin-nonce"+h.config.param_sep+h.config.admin_nonce;(0,l["default"])(e,function(e){var n=e.results;Object.keys(n).forEach(function(e){var r=n[e],i={name:e,size:r.size,accepted:!0,extras:r};t.dropzone.files.push(i),t.dropzone.options.addedfile.call(t.dropzone,i),e.match(/\.(jpg|jpeg|png|gif)$/i)&&t.dropzone.options.thumbnail.call(t.dropzone,i,r.url)}),t.container.find(".dz-preview").prop("draggable","true")})}},{key:"onDropzoneSending",value:function(t,e,n){n.append("admin-nonce",h.config.admin_nonce)}},{key:"onDropzoneSuccess",value:function(t,e,n){return this.handleError({file:t,data:e,
+mode:"removeFile",msg:"
An error occurred while trying to upload the file "+t.name+"
\n
"+e.message+" "})}},{key:"onDropzoneComplete",value:function(t){if(!t.accepted){var e={status:"error",message:"Unsupported file type: "+t.name.match(/\..+/).join("")};return this.handleError({file:t,data:e,mode:"removeFile",msg:"
An error occurred while trying to add the file "+t.name+"
\n
"+e.message+" "})}(0,u["default"])(".dz-preview").prop("draggable","true")}},{key:"onDropzoneRemovedFile",value:function(t){var e=this;if(t.accepted&&!t.rejected){var n=this.form.data("media-url")+"/task"+h.config.param_sep+"delmedia";(0,l["default"])(n,{method:"post",body:{filename:t.name}},function(n){return e.handleError({file:t,data:n,mode:"addBack",msg:"
An error occurred while trying to remove the file "+t.name+"
\n
"+n.message+" "})})}}},{key:"handleError",value:function(t){var e=t.file,n=t.data,r=t.mode,i=t.msg;if("error"===n.status||"unauthorized"===n.status){switch(r){case"addBack":e instanceof File?this.dropzone.addFile(e):(this.dropzone.files.push(e),this.dropzone.options.addedfile.call(this,e),this.dropzone.options.thumbnail.call(this,e,e.extras.url));break;case"removeFile":e.rejected=!0,this.dropzone.removeFile(e)}var o=(0,u["default"])('[data-remodal-id="generic"]');o.find(".error-content").html(i),u["default"].remodal.lookup[o.data("remodal")].open()}}}]),t}();e["default"]=p;e.Instance=new p},,,function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(228),o=r(i),a=n(231),u=r(a),s=n(232),c=r(s);e["default"]={Form:{Form:u["default"],Instance:a.Instance},Fields:c["default"],FormState:{FormState:o["default"],Instance:i.Instance}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var n=0;n
i;i++)r[i]=t[i+e];return r}function p(t){return void 0===t.size&&(t.size=t.__iterate(y)),t.size}function v(t,e){if("number"!=typeof e){var n=e>>>0;if(""+n!==e||4294967295===n)return NaN;e=n}return 0>e?p(t)+e:e}function y(){return!0}function g(t,e,n){return(0===t||void 0!==n&&-n>=t)&&(void 0===e||void 0!==n&&e>=n)}function _(t,e){return b(t,e,0)}function m(t,e){return b(t,e,e)}function b(t,e,n){return void 0===t?n:0>t?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function w(t){this.next=t}function S(t,e,n,r){var i=0===t?e:1===t?n:[e,n];return r?r.value=i:r={value:i,done:!1},r}function I(){return{value:void 0,done:!0}}function x(t){return!!E(t)}function O(t){return t&&"function"==typeof t.next}function k(t){var e=E(t);return e&&e.call(t)}function E(t){var e=t&&(In&&t[In]||t[xn]);return"function"==typeof e?e:void 0}function M(t){return t&&"number"==typeof t.length}function A(t){return null===t||void 0===t?C():o(t)?t.toSeq():q(t)}function z(t){return null===t||void 0===t?C().toKeyedSeq():o(t)?a(t)?t.toSeq():t.fromEntrySeq():U(t)}function D(t){return null===t||void 0===t?C():o(t)?a(t)?t.entrySeq():t.toIndexedSeq():R(t)}function j(t){return(null===t||void 0===t?C():o(t)?a(t)?t.entrySeq():t:R(t)).toSetSeq()}function P(t){this._array=t,this.size=t.length}function N(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function L(t){this._iterable=t,this.size=t.length||t.size}function T(t){this._iterator=t,this._iteratorCache=[]}function F(t){return!(!t||!t[kn])}function C(){return En||(En=new P([]))}function U(t){var e=Array.isArray(t)?new P(t).fromEntrySeq():O(t)?new T(t).fromEntrySeq():x(t)?new L(t).fromEntrySeq():"object"==typeof t?new N(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function R(t){var e=B(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function q(t){var e=B(t)||"object"==typeof t&&new N(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function B(t){return M(t)?new P(t):O(t)?new T(t):x(t)?new L(t):void 0}function G(t,e,n,r){var i=t._cache;if(i){for(var o=i.length-1,a=0;o>=a;a++){var u=i[n?o-a:a];if(e(u[1],r?u[0]:a,t)===!1)return a+1}return a}return t.__iterateUncached(e,n)}function K(t,e,n,r){var i=t._cache;if(i){var o=i.length-1,a=0;return new w(function(){var t=i[n?o-a:a];return a++>o?I():S(e,r?t[0]:a-1,t[1])})}return t.__iteratorUncached(e,n)}function W(t,e){return e?V(e,t,"",{"":t}):J(t)}function V(t,e,n,r){return Array.isArray(e)?t.call(r,n,D(e).map(function(n,r){return V(t,n,r,e)})):H(e)?t.call(r,n,z(e).map(function(n,r){return V(t,n,r,e)})):e}function J(t){return Array.isArray(t)?D(t).map(J).toList():H(t)?z(t).map(J).toMap():t}function H(t){return t&&(t.constructor===Object||void 0===t.constructor)}function Y(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return"function"==typeof t.equals&&"function"==typeof e.equals&&t.equals(e)?!0:!1}function X(t,e){if(t===e)return!0;if(!o(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||a(t)!==a(e)||u(t)!==u(e)||c(t)!==c(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!s(t);if(c(t)){var r=t.entries();return e.every(function(t,e){var i=r.next().value;return i&&Y(i[1],t)&&(n||Y(i[0],e))})&&r.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var f=t;t=e,e=f}var l=!0,h=e.__iterate(function(e,r){return(n?t.has(e):i?Y(e,t.get(r,gn)):Y(t.get(r,gn),e))?void 0:(l=!1,!1)});return l&&t.size===h}function $(t,e){if(!(this instanceof $))return new $(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(Mn)return Mn;Mn=this}}function Z(t,e){if(!t)throw new Error(e)}function Q(t,e,n){if(!(this instanceof Q))return new Q(t,e,n);if(Z(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),n=void 0===n?1:Math.abs(n),t>e&&(n=-n),this._start=t,this._end=e,this._step=n,this.size=Math.max(0,Math.ceil((e-t)/n-1)+1),0===this.size){if(An)return An;An=this}}function tt(){throw TypeError("Abstract")}function et(){}function nt(){}function rt(){}function it(t){return t>>>1&1073741824|3221225471&t}function ot(t){if(t===!1||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(t=t.valueOf(),t===!1||null===t||void 0===t))return 0;if(t===!0)return 1;var e=typeof t;if("number"===e){var n=0|t;for(n!==t&&(n^=4294967295*t);t>4294967295;)t/=4294967295,n^=t;return it(n)}if("string"===e)return t.length>Fn?at(t):ut(t);if("function"==typeof t.hashCode)return t.hashCode();if("object"===e)return st(t);if("function"==typeof t.toString)return ut(t.toString());throw new Error("Value type "+e+" cannot be hashed.")}function at(t){var e=Rn[t];return void 0===e&&(e=ut(t),Un===Cn&&(Un=0,Rn={}),Un++,Rn[t]=e),e}function ut(t){for(var e=0,n=0;n0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function ft(t){Z(t!==1/0,"Cannot perform this action with an infinite size.")}function lt(t){return null===t||void 0===t?St():ht(t)&&!c(t)?t:St().withMutations(function(e){var r=n(t);ft(r.size),r.forEach(function(t,n){return e.set(n,t)})})}function ht(t){return!(!t||!t[qn])}function dt(t,e){this.ownerID=t,this.entries=e}function pt(t,e,n){this.ownerID=t,this.bitmap=e,this.nodes=n}function vt(t,e,n){this.ownerID=t,this.count=e,this.nodes=n}function yt(t,e,n){this.ownerID=t,this.keyHash=e,this.entries=n}function gt(t,e,n){this.ownerID=t,this.keyHash=e,this.entry=n}function _t(t,e,n){this._type=e,this._reverse=n,this._stack=t._root&&bt(t._root)}function mt(t,e){return S(t,e[0],e[1])}function bt(t,e){return{node:t,index:0,__prev:e}}function wt(t,e,n,r){var i=Object.create(Bn);return i.size=t,i._root=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function St(){return Gn||(Gn=wt(0))}function It(t,e,n){var r,i;if(t._root){var o=f(_n),a=f(mn);if(r=xt(t._root,t.__ownerID,0,void 0,e,n,o,a),!a.value)return t;i=t.size+(o.value?n===gn?-1:1:0)}else{if(n===gn)return t;i=1,r=new dt(t.__ownerID,[[e,n]])}return t.__ownerID?(t.size=i,t._root=r,t.__hash=void 0,t.__altered=!0,t):r?wt(i,r):St()}function xt(t,e,n,r,i,o,a,u){return t?t.update(e,n,r,i,o,a,u):o===gn?t:(l(u),l(a),new gt(e,r,[i,o]))}function Ot(t){return t.constructor===gt||t.constructor===yt}function kt(t,e,n,r,i){if(t.keyHash===r)return new yt(e,r,[t.entry,i]);var o,a=(0===n?t.keyHash:t.keyHash>>>n)&yn,u=(0===n?r:r>>>n)&yn,s=a===u?[kt(t,e,n+pn,r,i)]:(o=new gt(e,r,i),u>a?[t,o]:[o,t]);return new pt(e,1<u;u++,s<<=1){var f=e[u];void 0!==f&&u!==r&&(i|=s,a[o++]=f)}return new pt(t,i,a)}function At(t,e,n,r,i){for(var o=0,a=new Array(vn),u=0;0!==n;u++,n>>>=1)a[u]=1&n?e[o++]:void 0;return a[r]=i,new vt(t,o+1,a)}function zt(t,e,r){for(var i=[],a=0;a>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t}function Tt(t,e,n,r){var i=r?t:d(t);return i[e]=n,i}function Ft(t,e,n,r){var i=t.length+1;if(r&&e+1===i)return t[e]=n,t;for(var o=new Array(i),a=0,u=0;i>u;u++)u===e?(o[u]=n,a=-1):o[u]=t[u+a];return o}function Ct(t,e,n){var r=t.length-1;if(n&&e===r)return t.pop(),t;for(var i=new Array(r),o=0,a=0;r>a;a++)a===e&&(o=1),i[a]=t[a+o];return i}function Ut(t){var e=Kt();if(null===t||void 0===t)return e;if(Rt(t))return t;var n=r(t),i=n.size;return 0===i?e:(ft(i),i>0&&vn>i?Gt(0,i,pn,null,new qt(n.toArray())):e.withMutations(function(t){t.setSize(i),n.forEach(function(e,n){return t.set(n,e)})}))}function Rt(t){return!(!t||!t[Jn])}function qt(t,e){this.array=t,this.ownerID=e}function Bt(t,e){function n(t,e,n){return 0===e?r(t,n):i(t,e,n)}function r(t,n){var r=n===u?s&&s.array:t&&t.array,i=n>o?0:o-n,c=a-n;return c>vn&&(c=vn),function(){if(i===c)return Xn;var t=e?--c:i++;return r&&r[t]}}function i(t,r,i){var u,s=t&&t.array,c=i>o?0:o-i>>r,f=(a-i>>r)+1;return f>vn&&(f=vn),function(){for(;;){if(u){var t=u();if(t!==Xn)return t;u=null}if(c===f)return Xn;var o=e?--f:c++;u=n(s&&s[o],r-pn,i+(o<=t.size||0>e)return t.withMutations(function(t){0>e?Yt(t,e).set(0,n):Yt(t,0,e+1).set(e,n)});e+=t._origin;var r=t._tail,i=t._root,o=f(mn);return e>=$t(t._capacity)?r=Vt(r,t.__ownerID,0,e,n,o):i=Vt(i,t.__ownerID,t._level,e,n,o),o.value?t.__ownerID?(t._root=i,t._tail=r,t.__hash=void 0,t.__altered=!0,t):Gt(t._origin,t._capacity,t._level,i,r):t}function Vt(t,e,n,r,i,o){var a=r>>>n&yn,u=t&&a0){var c=t&&t.array[a],f=Vt(c,e,n-pn,r,i,o);return f===c?t:(s=Jt(t,e),s.array[a]=f,s)}return u&&t.array[a]===i?t:(l(o),s=Jt(t,e),void 0===i&&a===s.array.length-1?s.array.pop():s.array[a]=i,s)}function Jt(t,e){return e&&t&&e===t.ownerID?t:new qt(t?t.array.slice():[],e)}function Ht(t,e){if(e>=$t(t._capacity))return t._tail;if(e<1<0;)n=n.array[e>>>r&yn],r-=pn;return n}}function Yt(t,e,n){void 0!==e&&(e=0|e),void 0!==n&&(n=0|n);var r=t.__ownerID||new h,i=t._origin,o=t._capacity,a=i+e,u=void 0===n?o:0>n?o+n:i+n;if(a===i&&u===o)return t;if(a>=u)return t.clear();for(var s=t._level,c=t._root,f=0;0>a+f;)c=new qt(c&&c.array.length?[void 0,c]:[],r),s+=pn,f+=1<=1<d?Ht(t,u-1):d>l?new qt([],r):p;if(p&&d>l&&o>a&&p.array.length){c=Jt(c,r);for(var y=c,g=s;g>pn;g-=pn){var _=l>>>g&yn;y=y.array[_]=Jt(y.array[_],r)}y.array[l>>>pn&yn]=p}if(o>u&&(v=v&&v.removeAfter(r,0,u)),a>=d)a-=d,u-=d,s=pn,c=null,v=v&&v.removeBefore(r,0,a);else if(a>i||l>d){for(f=0;c;){var m=a>>>s&yn;if(m!==d>>>s&yn)break;m&&(f+=(1<i&&(c=c.removeBefore(r,s,a-f)),c&&l>d&&(c=c.removeAfter(r,s,d-f)),f&&(a-=f,u-=f)}return t.__ownerID?(t.size=u-a,t._origin=a,t._capacity=u,t._level=s,t._root=c,t._tail=v,t.__hash=void 0,t.__altered=!0,t):Gt(a,u,s,c,v)}function Xt(t,e,n){for(var i=[],a=0,u=0;ua&&(a=c.size),o(s)||(c=c.map(function(t){return W(t)})),i.push(c)}return a>t.size&&(t=t.setSize(a)),Pt(t,e,i)}function $t(t){return vn>t?0:t-1>>>pn<=vn&&a.size>=2*o.size?(i=a.filter(function(t,e){return void 0!==t&&u!==e}),r=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(r.__ownerID=i.__ownerID=t.__ownerID)):(r=o.remove(e),i=u===a.size-1?a.pop():a.set(u,void 0))}else if(s){if(n===a.get(u)[1])return t;r=o,i=a.set(u,[e,n])}else r=o.set(e,a.size),i=a.set(a.size,[e,n]);return t.__ownerID?(t.size=r.size,t._map=r,t._list=i,t.__hash=void 0,t):te(r,i)}function re(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function ie(t){this._iter=t,this.size=t.size}function oe(t){this._iter=t,this.size=t.size}function ae(t){this._iter=t,this.size=t.size}function ue(t){var e=Me(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=Ae,e.__iterateUncached=function(e,n){var r=this;return t.__iterate(function(t,n){return e(n,t,r)!==!1},n)},e.__iteratorUncached=function(e,n){if(e===Sn){var r=t.__iterator(e,n);return new w(function(){var t=r.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===wn?bn:wn,n)},e}function se(t,e,n){var r=Me(t);return r.size=t.size,r.has=function(e){return t.has(e)},r.get=function(r,i){var o=t.get(r,gn);return o===gn?i:e.call(n,o,r,t)},r.__iterateUncached=function(r,i){var o=this;return t.__iterate(function(t,i,a){return r(e.call(n,t,i,a),i,o)!==!1},i)},r.__iteratorUncached=function(r,i){var o=t.__iterator(Sn,i);return new w(function(){var i=o.next();if(i.done)return i;var a=i.value,u=a[0];return S(r,u,e.call(n,a[1],u,t),i)})},r}function ce(t,e){var n=Me(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=ue(t);return e.reverse=function(){return t.flip()},e}),n.get=function(n,r){return t.get(e?n:-1-n,r)},n.has=function(n){return t.has(e?n:-1-n)},n.includes=function(e){return t.includes(e)},n.cacheResult=Ae,n.__iterate=function(e,n){var r=this;return t.__iterate(function(t,n){return e(t,n,r)},!n)},n.__iterator=function(e,n){return t.__iterator(e,!n)},n}function fe(t,e,n,r){var i=Me(t);return r&&(i.has=function(r){var i=t.get(r,gn);return i!==gn&&!!e.call(n,i,r,t)},i.get=function(r,i){var o=t.get(r,gn);return o!==gn&&e.call(n,o,r,t)?o:i}),i.__iterateUncached=function(i,o){var a=this,u=0;return t.__iterate(function(t,o,s){return e.call(n,t,o,s)?(u++,i(t,r?o:u-1,a)):void 0},o),u},i.__iteratorUncached=function(i,o){var a=t.__iterator(Sn,o),u=0;return new w(function(){for(;;){var o=a.next();if(o.done)return o;var s=o.value,c=s[0],f=s[1];if(e.call(n,f,c,t))return S(i,r?c:u++,f,o)}})},i}function le(t,e,n){var r=lt().asMutable();return t.__iterate(function(i,o){r.update(e.call(n,i,o,t),0,function(t){return t+1})}),r.asImmutable()}function he(t,e,n){var r=a(t),i=(c(t)?Zt():lt()).asMutable();t.__iterate(function(o,a){i.update(e.call(n,o,a,t),function(t){return t=t||[],t.push(r?[a,o]:o),t})});var o=Ee(t);return i.map(function(e){return xe(t,o(e))})}function de(t,e,n,r){var i=t.size;if(void 0!==e&&(e=0|e),void 0!==n&&(n=0|n),g(e,n,i))return t;var o=_(e,i),a=m(n,i);if(o!==o||a!==a)return de(t.toSeq().cacheResult(),e,n,r);var u,s=a-o;s===s&&(u=0>s?0:s);var c=Me(t);return c.size=0===u?u:t.size&&u||void 0,!r&&F(t)&&u>=0&&(c.get=function(e,n){return e=v(this,e),e>=0&&u>e?t.get(e+o,n):n}),c.__iterateUncached=function(e,n){var i=this;if(0===u)return 0;if(n)return this.cacheResult().__iterate(e,n);var a=0,s=!0,c=0;return t.__iterate(function(t,n){return s&&(s=a++u)return I();var t=i.next();return r||e===wn?t:e===bn?S(e,s-1,void 0,t):S(e,s-1,t.value[1],t)})},c}function pe(t,e,n){var r=Me(t);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return t.__iterate(function(t,i,u){return e.call(n,t,i,u)&&++a&&r(t,i,o)}),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=t.__iterator(Sn,i),u=!0;return new w(function(){if(!u)return I();var t=a.next();if(t.done)return t;var i=t.value,s=i[0],c=i[1];return e.call(n,c,s,o)?r===Sn?t:S(r,s,c,t):(u=!1,I())})},r}function ve(t,e,n,r){var i=Me(t);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var u=!0,s=0;return t.__iterate(function(t,o,c){return u&&(u=e.call(n,t,o,c))?void 0:(s++,i(t,r?o:s-1,a))}),s},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var u=t.__iterator(Sn,o),s=!0,c=0;return new w(function(){var t,o,f;do{if(t=u.next(),t.done)return r||i===wn?t:i===bn?S(i,c++,void 0,t):S(i,c++,t.value[1],t);var l=t.value;o=l[0],f=l[1],s&&(s=e.call(n,f,o,a))}while(s);return i===Sn?t:S(i,o,f,t)})},i}function ye(t,e){var r=a(t),i=[t].concat(e).map(function(t){return o(t)?r&&(t=n(t)):t=r?U(t):R(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===i.length)return t;if(1===i.length){var s=i[0];if(s===t||r&&a(s)||u(t)&&u(s))return s}var c=new P(i);return r?c=c.toKeyedSeq():u(t)||(c=c.toSetSeq()),c=c.flatten(!0),c.size=i.reduce(function(t,e){if(void 0!==t){var n=e.size;if(void 0!==n)return t+n}},0),c}function ge(t,e,n){var r=Me(t);return r.__iterateUncached=function(r,i){function a(t,c){var f=this;t.__iterate(function(t,i){return(!e||e>c)&&o(t)?a(t,c+1):r(t,n?i:u++,f)===!1&&(s=!0),!s},i)}var u=0,s=!1;return a(t,0),u},r.__iteratorUncached=function(r,i){var a=t.__iterator(r,i),u=[],s=0;return new w(function(){for(;a;){var t=a.next();if(t.done===!1){var c=t.value;if(r===Sn&&(c=c[1]),e&&!(u.length0}function Ie(t,n,r){var i=Me(t);return i.size=new P(r).map(function(t){return t.size}).min(),i.__iterate=function(t,e){for(var n,r=this.__iterator(wn,e),i=0;!(n=r.next()).done&&t(n.value,i++,this)!==!1;);return i},i.__iteratorUncached=function(t,i){var o=r.map(function(t){return t=e(t),k(i?t.reverse():t)}),a=0,u=!1;return new w(function(){var e;return u||(e=o.map(function(t){return t.next()}),u=e.some(function(t){return t.done})),u?I():S(t,a++,n.apply(null,e.map(function(t){return t.value})))})},i}function xe(t,e){return F(t)?e:t.constructor(e)}function Oe(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function ke(t){return ft(t.size),p(t)}function Ee(t){return a(t)?n:u(t)?r:i}function Me(t){return Object.create((a(t)?z:u(t)?D:j).prototype)}function Ae(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):A.prototype.cacheResult.call(this)}function ze(t,e){return t>e?1:e>t?-1:0}function De(t){var n=k(t);if(!n){if(!M(t))throw new TypeError("Expected iterable or array-like: "+t);n=k(e(t))}return n}function je(t,e){var n,r=function(o){if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var a=Object.keys(t);Le(i,a),i.size=a.length,i._name=e,i._keys=a,i._defaultValues=t}this._map=lt(o)},i=r.prototype=Object.create(Zn);return i.constructor=r,r}function Pe(t,e,n){var r=Object.create(Object.getPrototypeOf(t));return r._map=e,r.__ownerID=n,r}function Ne(t){return t._name||t.constructor.name||"Record"}function Le(t,e){try{e.forEach(Te.bind(void 0,t))}catch(n){}}function Te(t,e){Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){Z(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}function Fe(t){return null===t||void 0===t?qe():Ce(t)&&!c(t)?t:qe().withMutations(function(e){var n=i(t);ft(n.size),n.forEach(function(t){return e.add(t)})})}function Ce(t){return!(!t||!t[Qn])}function Ue(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function Re(t,e){var n=Object.create(tr);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function qe(){return er||(er=Re(St()))}function Be(t){return null===t||void 0===t?We():Ge(t)?t:We().withMutations(function(e){var n=i(t);ft(n.size),n.forEach(function(t){return e.add(t)})})}function Ge(t){return Ce(t)&&c(t)}function Ke(t,e){var n=Object.create(nr);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function We(){return rr||(rr=Ke(ee()))}function Ve(t){return null===t||void 0===t?Ye():Je(t)?t:Ye().unshiftAll(t)}function Je(t){return!(!t||!t[ir])}function He(t,e,n,r){var i=Object.create(or);return i.size=t,i._head=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Ye(){return ar||(ar=He(0))}function Xe(t,e){var n=function(n){t.prototype[n]=e[n]};return Object.keys(e).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n),t}function $e(t,e){return e}function Ze(t,e){return[e,t]}function Qe(t){return function(){return!t.apply(this,arguments)}}function tn(t){return function(){return-t.apply(this,arguments)}}function en(t){return"string"==typeof t?JSON.stringify(t):t}function nn(){return d(arguments)}function rn(t,e){return e>t?1:t>e?-1:0}function on(t){if(t.size===1/0)return 0;var e=c(t),n=a(t),r=e?1:0,i=t.__iterate(n?e?function(t,e){r=31*r+un(ot(t),ot(e))|0}:function(t,e){r=r+un(ot(t),ot(e))|0}:e?function(t){r=31*r+ot(t)|0}:function(t){r=r+ot(t)|0});return an(i,r)}function an(t,e){return e=Dn(e,3432918353),e=Dn(e<<15|e>>>-15,461845907),e=Dn(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=Dn(e^e>>>16,2246822507),e=Dn(e^e>>>13,3266489909),e=it(e^e>>>16)}function un(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var sn=Array.prototype.slice;t(n,e),t(r,e),t(i,e),e.isIterable=o,e.isKeyed=a,e.isIndexed=u,e.isAssociative=s,e.isOrdered=c,e.Keyed=n,e.Indexed=r,e.Set=i;var cn="@@__IMMUTABLE_ITERABLE__@@",fn="@@__IMMUTABLE_KEYED__@@",ln="@@__IMMUTABLE_INDEXED__@@",hn="@@__IMMUTABLE_ORDERED__@@",dn="delete",pn=5,vn=1<=i;i++)if(t(n[e?r-i:i],i,this)===!1)return i+1;return i},P.prototype.__iterator=function(t,e){var n=this._array,r=n.length-1,i=0;return new w(function(){return i>r?I():S(t,i,n[e?r-i++:i++])})},t(N,z),N.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},N.prototype.has=function(t){return this._object.hasOwnProperty(t)},N.prototype.__iterate=function(t,e){for(var n=this._object,r=this._keys,i=r.length-1,o=0;i>=o;o++){var a=r[e?i-o:o];if(t(n[a],a,this)===!1)return o+1}return o},N.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,i=r.length-1,o=0;return new w(function(){var a=r[e?i-o:o];return o++>i?I():S(t,a,n[a])})},N.prototype[hn]=!0,t(L,D),L.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=this._iterable,r=k(n),i=0;if(O(r))for(var o;!(o=r.next()).done&&t(o.value,i++,this)!==!1;);return i},L.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=this._iterable,r=k(n);if(!O(r))return new w(I);var i=0;return new w(function(){var e=r.next();return e.done?e:S(t,i++,e.value)})},t(T,D),T.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var n=this._iterator,r=this._iteratorCache,i=0;i=r.length){var e=n.next();if(e.done)return e;r[i]=e.value}return S(t,i,r[i++])})};var En;t($,D),$.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},$.prototype.get=function(t,e){return this.has(t)?this._value:e},$.prototype.includes=function(t){return Y(this._value,t)},$.prototype.slice=function(t,e){var n=this.size;return g(t,e,n)?this:new $(this._value,m(e,n)-_(t,n))},$.prototype.reverse=function(){return this},$.prototype.indexOf=function(t){return Y(this._value,t)?0:-1},$.prototype.lastIndexOf=function(t){return Y(this._value,t)?this.size:-1},$.prototype.__iterate=function(t,e){for(var n=0;n1?" by "+this._step:"")+" ]"},Q.prototype.get=function(t,e){return this.has(t)?this._start+v(this,t)*this._step:e},Q.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e=e?new Q(0,0):new Q(this.get(t,this._end),this.get(e,this._end),this._step))},Q.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step===0){var n=e/this._step;if(n>=0&&n=o;o++){if(t(i,o,this)===!1)return o+1;i+=e?-r:r}return o},Q.prototype.__iterator=function(t,e){var n=this.size-1,r=this._step,i=e?this._start+n*r:this._start,o=0;return new w(function(){var a=i;return i+=e?-r:r,o>n?I():S(t,o++,a)})},Q.prototype.equals=function(t){return t instanceof Q?this._start===t._start&&this._end===t._end&&this._step===t._step:X(this,t)};var An;t(tt,e),t(et,tt),t(nt,tt),t(rt,tt),tt.Keyed=et,tt.Indexed=nt,tt.Set=rt;var zn,Dn="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){t=0|t,e=0|e;var n=65535&t,r=65535&e;return n*r+((t>>>16)*r+n*(e>>>16)<<16>>>0)|0},jn=Object.isExtensible,Pn=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),Nn="function"==typeof WeakMap;Nn&&(zn=new WeakMap);var Ln=0,Tn="__immutablehash__";"function"==typeof Symbol&&(Tn=Symbol(Tn));var Fn=16,Cn=255,Un=0,Rn={};t(lt,et),lt.prototype.toString=function(){return this.__toString("Map {","}")},lt.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},lt.prototype.set=function(t,e){return It(this,t,e)},lt.prototype.setIn=function(t,e){return this.updateIn(t,gn,function(){return e})},lt.prototype.remove=function(t){return It(this,t,gn)},lt.prototype.deleteIn=function(t){return this.updateIn(t,function(){return gn})},lt.prototype.update=function(t,e,n){return 1===arguments.length?t(this):this.updateIn([t],e,n)},lt.prototype.updateIn=function(t,e,n){n||(n=e,e=void 0);var r=Nt(this,De(t),e,n);return r===gn?void 0:r},lt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):St()},lt.prototype.merge=function(){return zt(this,void 0,arguments)},lt.prototype.mergeWith=function(t){var e=sn.call(arguments,1);return zt(this,t,e)},lt.prototype.mergeIn=function(t){var e=sn.call(arguments,1);return this.updateIn(t,St(),function(t){return"function"==typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},lt.prototype.mergeDeep=function(){return zt(this,Dt,arguments)},lt.prototype.mergeDeepWith=function(t){var e=sn.call(arguments,1);return zt(this,jt(t),e)},lt.prototype.mergeDeepIn=function(t){var e=sn.call(arguments,1);return this.updateIn(t,St(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},lt.prototype.sort=function(t){return Zt(be(this,t))},lt.prototype.sortBy=function(t,e){return Zt(be(this,e,t))},lt.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},lt.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new h)},lt.prototype.asImmutable=function(){return this.__ensureOwner()},lt.prototype.wasAltered=function(){return this.__altered},lt.prototype.__iterator=function(t,e){return new _t(this,t,e)},lt.prototype.__iterate=function(t,e){var n=this,r=0;return this._root&&this._root.iterate(function(e){return r++,t(e[1],e[0],n)},e),r},lt.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?wt(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},lt.isMap=ht;var qn="@@__IMMUTABLE_MAP__@@",Bn=lt.prototype;Bn[qn]=!0,Bn[dn]=Bn.remove,Bn.removeIn=Bn.deleteIn,dt.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,a=i.length;a>o;o++)if(Y(n,i[o][0]))return i[o][1];return r},dt.prototype.update=function(t,e,n,r,i,o,a){for(var u=i===gn,s=this.entries,c=0,f=s.length;f>c&&!Y(r,s[c][0]);c++);var h=f>c;if(h?s[c][1]===i:u)return this;if(l(a),(u||!h)&&l(o),!u||1!==s.length){if(!h&&!u&&s.length>=Kn)return Et(t,s,r,i);var p=t&&t===this.ownerID,v=p?s:d(s);return h?u?c===f-1?v.pop():v[c]=v.pop():v[c]=[r,i]:v.push([r,i]),p?(this.entries=v,this):new dt(t,v)}},pt.prototype.get=function(t,e,n,r){void 0===e&&(e=ot(n));var i=1<<((0===t?e:e>>>t)&yn),o=this.bitmap;return 0===(o&i)?r:this.nodes[Lt(o&i-1)].get(t+pn,e,n,r)},pt.prototype.update=function(t,e,n,r,i,o,a){void 0===n&&(n=ot(r));var u=(0===e?n:n>>>e)&yn,s=1<=Wn)return At(t,h,c,u,p);if(f&&!p&&2===h.length&&Ot(h[1^l]))return h[1^l];if(f&&p&&1===h.length&&Ot(p))return p;var v=t&&t===this.ownerID,y=f?p?c:c^s:c|s,g=f?p?Tt(h,l,p,v):Ct(h,l,v):Ft(h,l,p,v);return v?(this.bitmap=y,this.nodes=g,this):new pt(t,y,g)},vt.prototype.get=function(t,e,n,r){void 0===e&&(e=ot(n));var i=(0===t?e:e>>>t)&yn,o=this.nodes[i];return o?o.get(t+pn,e,n,r):r},vt.prototype.update=function(t,e,n,r,i,o,a){void 0===n&&(n=ot(r));var u=(0===e?n:n>>>e)&yn,s=i===gn,c=this.nodes,f=c[u];if(s&&!f)return this;var l=xt(f,t,e+pn,n,r,i,o,a);if(l===f)return this;var h=this.count;if(f){if(!l&&(h--,Vn>h))return Mt(t,c,h,u)}else h++;var d=t&&t===this.ownerID,p=Tt(c,u,l,d);return d?(this.count=h,this.nodes=p,this):new vt(t,h,p)},yt.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,a=i.length;a>o;o++)if(Y(n,i[o][0]))return i[o][1];return r},yt.prototype.update=function(t,e,n,r,i,o,a){void 0===n&&(n=ot(r));var u=i===gn;if(n!==this.keyHash)return u?this:(l(a),l(o),kt(this,t,e,n,[r,i]));for(var s=this.entries,c=0,f=s.length;f>c&&!Y(r,s[c][0]);c++);var h=f>c;if(h?s[c][1]===i:u)return this;if(l(a),(u||!h)&&l(o),u&&2===f)return new gt(t,this.keyHash,s[1^c]);var p=t&&t===this.ownerID,v=p?s:d(s);return h?u?c===f-1?v.pop():v[c]=v.pop():v[c]=[r,i]:v.push([r,i]),p?(this.entries=v,this):new yt(t,this.keyHash,v)},gt.prototype.get=function(t,e,n,r){return Y(n,this.entry[0])?this.entry[1]:r},gt.prototype.update=function(t,e,n,r,i,o,a){var u=i===gn,s=Y(r,this.entry[0]);return(s?i===this.entry[1]:u)?this:(l(a),u?void l(o):s?t&&t===this.ownerID?(this.entry[1]=i,this):new gt(t,this.keyHash,[r,i]):(l(o),kt(this,t,e,ot(r),[r,i])))},dt.prototype.iterate=yt.prototype.iterate=function(t,e){for(var n=this.entries,r=0,i=n.length-1;i>=r;r++)if(t(n[e?i-r:r])===!1)return!1},pt.prototype.iterate=vt.prototype.iterate=function(t,e){for(var n=this.nodes,r=0,i=n.length-1;i>=r;r++){var o=n[e?i-r:r];if(o&&o.iterate(t,e)===!1)return!1}},gt.prototype.iterate=function(t,e){return t(this.entry)},t(_t,w),_t.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var n,r=e.node,i=e.index++;if(r.entry){if(0===i)return mt(t,r.entry)}else if(r.entries){if(n=r.entries.length-1,n>=i)return mt(t,r.entries[this._reverse?n-i:i])}else if(n=r.nodes.length-1,n>=i){var o=r.nodes[this._reverse?n-i:i];if(o){if(o.entry)return mt(t,o.entry);e=this._stack=bt(o,e)}continue}e=this._stack=this._stack.__prev}return I()};var Gn,Kn=vn/4,Wn=vn/2,Vn=vn/4;t(Ut,nt),Ut.of=function(){return this(arguments)},Ut.prototype.toString=function(){return this.__toString("List [","]")},Ut.prototype.get=function(t,e){if(t=v(this,t),t>=0&&t>>e&yn;if(r>=this.array.length)return new qt([],t);var i,o=0===r;if(e>0){var a=this.array[r];if(i=a&&a.removeBefore(t,e-pn,n),i===a&&o)return this}if(o&&!i)return this;var u=Jt(this,t);if(!o)for(var s=0;r>s;s++)u.array[s]=void 0;return i&&(u.array[r]=i),u},qt.prototype.removeAfter=function(t,e,n){if(n===(e?1<>>e&yn;if(r>=this.array.length)return this;var i;if(e>0){var o=this.array[r];if(i=o&&o.removeAfter(t,e-pn,n),i===o&&r===this.array.length-1)return this}var a=Jt(this,t);return a.array.splice(r+1),i&&(a.array[r]=i),a};var Yn,Xn={};t(Zt,lt),Zt.of=function(){return this(arguments)},Zt.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Zt.prototype.get=function(t,e){var n=this._map.get(t);return void 0!==n?this._list.get(n)[1]:e},Zt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):ee()},Zt.prototype.set=function(t,e){return ne(this,t,e)},Zt.prototype.remove=function(t){return ne(this,t,gn)},Zt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Zt.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],n)},e)},Zt.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},Zt.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),n=this._list.__ensureOwner(t);return t?te(e,n,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=n,this)},Zt.isOrderedMap=Qt,Zt.prototype[hn]=!0,Zt.prototype[dn]=Zt.prototype.remove;var $n;t(re,z),re.prototype.get=function(t,e){return this._iter.get(t,e)},re.prototype.has=function(t){return this._iter.has(t)},re.prototype.valueSeq=function(){return this._iter.valueSeq()},re.prototype.reverse=function(){var t=this,e=ce(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},re.prototype.map=function(t,e){var n=this,r=se(this,t,e);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(t,e)}),r},re.prototype.__iterate=function(t,e){var n,r=this;return this._iter.__iterate(this._useKeys?function(e,n){return t(e,n,r)}:(n=e?ke(this):0,function(i){return t(i,e?--n:n++,r)}),e)},re.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var n=this._iter.__iterator(wn,e),r=e?ke(this):0;return new w(function(){var i=n.next();return i.done?i:S(t,e?--r:r++,i.value,i)})},re.prototype[hn]=!0,t(ie,D),ie.prototype.includes=function(t){return this._iter.includes(t)},ie.prototype.__iterate=function(t,e){var n=this,r=0;return this._iter.__iterate(function(e){return t(e,r++,n)},e)},ie.prototype.__iterator=function(t,e){var n=this._iter.__iterator(wn,e),r=0;return new w(function(){var e=n.next();return e.done?e:S(t,r++,e.value,e)})},t(oe,j),oe.prototype.has=function(t){return this._iter.includes(t)},oe.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){return t(e,e,n)},e)},oe.prototype.__iterator=function(t,e){var n=this._iter.__iterator(wn,e);return new w(function(){var e=n.next();return e.done?e:S(t,e.value,e.value,e)})},t(ae,z),ae.prototype.entrySeq=function(){return this._iter.toSeq()},ae.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){if(e){Oe(e);var r=o(e);return t(r?e.get(1):e[1],r?e.get(0):e[0],n)}},e)},ae.prototype.__iterator=function(t,e){var n=this._iter.__iterator(wn,e);return new w(function(){for(;;){var e=n.next();if(e.done)return e;var r=e.value;if(r){Oe(r);var i=o(r);return S(t,i?r.get(0):r[0],i?r.get(1):r[1],e)}}})},ie.prototype.cacheResult=re.prototype.cacheResult=oe.prototype.cacheResult=ae.prototype.cacheResult=Ae,t(je,et),je.prototype.toString=function(){return this.__toString(Ne(this)+" {","}")},je.prototype.has=function(t){return this._defaultValues.hasOwnProperty(t)},je.prototype.get=function(t,e){if(!this.has(t))return e;var n=this._defaultValues[t];return this._map?this._map.get(t,n):n},je.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var t=this.constructor;return t._empty||(t._empty=Pe(this,St()))},je.prototype.set=function(t,e){if(!this.has(t))throw new Error('Cannot set unknown key "'+t+'" on '+Ne(this));var n=this._map&&this._map.set(t,e);return this.__ownerID||n===this._map?this:Pe(this,n)},je.prototype.remove=function(t){if(!this.has(t))return this;var e=this._map&&this._map.remove(t);return this.__ownerID||e===this._map?this:Pe(this,e)},je.prototype.wasAltered=function(){return this._map.wasAltered()},je.prototype.__iterator=function(t,e){var r=this;return n(this._defaultValues).map(function(t,e){return r.get(e)}).__iterator(t,e)},je.prototype.__iterate=function(t,e){var r=this;return n(this._defaultValues).map(function(t,e){return r.get(e)}).__iterate(t,e)},je.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?Pe(this,e,t):(this.__ownerID=t,this._map=e,this)};var Zn=je.prototype;Zn[dn]=Zn.remove,Zn.deleteIn=Zn.removeIn=Bn.removeIn,Zn.merge=Bn.merge,Zn.mergeWith=Bn.mergeWith,Zn.mergeIn=Bn.mergeIn,Zn.mergeDeep=Bn.mergeDeep,Zn.mergeDeepWith=Bn.mergeDeepWith,Zn.mergeDeepIn=Bn.mergeDeepIn,Zn.setIn=Bn.setIn,Zn.update=Bn.update,Zn.updateIn=Bn.updateIn,Zn.withMutations=Bn.withMutations,Zn.asMutable=Bn.asMutable,Zn.asImmutable=Bn.asImmutable,t(Fe,rt),Fe.of=function(){return this(arguments)},Fe.fromKeys=function(t){return this(n(t).keySeq())},Fe.prototype.toString=function(){return this.__toString("Set {","}")},Fe.prototype.has=function(t){return this._map.has(t)},Fe.prototype.add=function(t){return Ue(this,this._map.set(t,!0))},Fe.prototype.remove=function(t){return Ue(this,this._map.remove(t))},Fe.prototype.clear=function(){return Ue(this,this._map.clear())},Fe.prototype.union=function(){var t=sn.call(arguments,0);return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var n=0;n=0;n--)e={value:arguments[n],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):He(t,e)},Ve.prototype.pushAll=function(t){if(t=r(t),0===t.size)return this;ft(t.size);var e=this.size,n=this._head;return t.reverse().forEach(function(t){e++,n={value:t,next:n}}),this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):He(e,n)},Ve.prototype.pop=function(){return this.slice(1)},Ve.prototype.unshift=function(){return this.push.apply(this,arguments)},Ve.prototype.unshiftAll=function(t){return this.pushAll(t)},Ve.prototype.shift=function(){return this.pop.apply(this,arguments)},Ve.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Ye()},Ve.prototype.slice=function(t,e){if(g(t,e,this.size))return this;var n=_(t,this.size),r=m(e,this.size);if(r!==this.size)return nt.prototype.slice.call(this,t,e);for(var i=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):He(i,o)},Ve.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?He(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Ve.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var n=0,r=this._head;r&&t(r.value,n++,this)!==!1;)r=r.next;return n},Ve.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var n=0,r=this._head;return new w(function(){if(r){var e=r.value;return r=r.next,S(t,n++,e)}return I()})},Ve.isStack=Je;var ir="@@__IMMUTABLE_STACK__@@",or=Ve.prototype;or[ir]=!0,or.withMutations=Bn.withMutations,or.asMutable=Bn.asMutable,or.asImmutable=Bn.asImmutable,or.wasAltered=Bn.wasAltered;var ar;e.Iterator=w,Xe(e,{toArray:function(){ft(this.size);var t=new Array(this.size||0);return this.valueSeq().__iterate(function(e,n){t[n]=e}),t},toIndexedSeq:function(){return new ie(this)},toJS:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJS?t.toJS():t}).__toJS()},toJSON:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJSON?t.toJSON():t}).__toJS()},toKeyedSeq:function(){return new re(this,!0)},toMap:function(){return lt(this.toKeyedSeq())},toObject:function(){ft(this.size);var t={};return this.__iterate(function(e,n){t[n]=e}),t},toOrderedMap:function(){return Zt(this.toKeyedSeq())},toOrderedSet:function(){return Be(a(this)?this.valueSeq():this)},toSet:function(){return Fe(a(this)?this.valueSeq():this)},toSetSeq:function(){return new oe(this)},toSeq:function(){return u(this)?this.toIndexedSeq():a(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Ve(a(this)?this.valueSeq():this)},toList:function(){return Ut(a(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){var t=sn.call(arguments,0);return xe(this,ye(this,t))},includes:function(t){return this.some(function(e){return Y(e,t)})},entries:function(){return this.__iterator(Sn)},every:function(t,e){ft(this.size);var n=!0;return this.__iterate(function(r,i,o){return t.call(e,r,i,o)?void 0:(n=!1,!1)}),n},filter:function(t,e){return xe(this,fe(this,t,e,!0))},find:function(t,e,n){var r=this.findEntry(t,e);return r?r[1]:n},findEntry:function(t,e){var n;return this.__iterate(function(r,i,o){return t.call(e,r,i,o)?(n=[i,r],!1):void 0}),n},findLastEntry:function(t,e){return this.toSeq().reverse().findEntry(t,e)},forEach:function(t,e){return ft(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){ft(this.size),t=void 0!==t?""+t:",";var e="",n=!0;return this.__iterate(function(r){n?n=!1:e+=t,e+=null!==r&&void 0!==r?r.toString():""}),e},keys:function(){return this.__iterator(bn)},map:function(t,e){return xe(this,se(this,t,e))},reduce:function(t,e,n){ft(this.size);var r,i;return arguments.length<2?i=!0:r=e,this.__iterate(function(e,o,a){i?(i=!1,r=e):r=t.call(n,r,e,o,a)}),r},reduceRight:function(t,e,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return xe(this,ce(this,!0))},slice:function(t,e){return xe(this,de(this,t,e,!0))},some:function(t,e){return!this.every(Qe(t),e)},sort:function(t){return xe(this,be(this,t))},values:function(){return this.__iterator(wn)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(t,e){return p(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return le(this,t,e)},equals:function(t){return X(this,t)},entrySeq:function(){var t=this;if(t._cache)return new P(t._cache);var e=t.toSeq().map(Ze).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(Qe(t),e)},findLast:function(t,e,n){return this.toKeyedSeq().reverse().find(t,e,n)},first:function(){return this.find(y)},flatMap:function(t,e){return xe(this,_e(this,t,e))},flatten:function(t){return xe(this,ge(this,t,!0))},fromEntrySeq:function(){return new ae(this)},get:function(t,e){return this.find(function(e,n){return Y(n,t)},void 0,e)},getIn:function(t,e){for(var n,r=this,i=De(t);!(n=i.next()).done;){var o=n.value;if(r=r&&r.get?r.get(o,gn):gn,r===gn)return e}return r},groupBy:function(t,e){return he(this,t,e)},has:function(t){return this.get(t,gn)!==gn},hasIn:function(t){return this.getIn(t,gn)!==gn},isSubset:function(t){return t="function"==typeof t.includes?t:e(t),this.every(function(e){return t.includes(e)})},isSuperset:function(t){return t="function"==typeof t.isSubset?t:e(t),t.isSubset(this)},keySeq:function(){return this.toSeq().map($e).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(t){return we(this,t)},maxBy:function(t,e){return we(this,e,t)},min:function(t){return we(this,t?tn(t):rn)},minBy:function(t,e){return we(this,e?tn(e):rn,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return xe(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return xe(this,ve(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(Qe(t),e)},sortBy:function(t,e){return xe(this,be(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return xe(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return xe(this,pe(this,t,e))},takeUntil:function(t,e){return this.takeWhile(Qe(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=on(this))}});var ur=e.prototype;ur[cn]=!0,ur[On]=ur.values,ur.__toJS=ur.toArray,ur.__toStringMapper=en,ur.inspect=ur.toSource=function(){return this.toString()},ur.chain=ur.flatMap,ur.contains=ur.includes,function(){try{Object.defineProperty(ur,"length",{get:function(){if(!e.noLengthWarning){var t;try{throw new Error}catch(n){t=n.stack}if(-1===t.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+t),this.size}}})}catch(t){}}(),Xe(n,{flip:function(){return xe(this,ue(this))},findKey:function(t,e){var n=this.findEntry(t,e);return n&&n[0]},findLastKey:function(t,e){return this.toSeq().reverse().findKey(t,e)},keyOf:function(t){return this.findKey(function(e){return Y(e,t)})},lastKeyOf:function(t){return this.findLastKey(function(e){return Y(e,t)})},mapEntries:function(t,e){var n=this,r=0;return xe(this,this.toSeq().map(function(i,o){return t.call(e,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(t,e){var n=this;return xe(this,this.toSeq().flip().map(function(r,i){return t.call(e,r,i,n)}).flip())}});var sr=n.prototype;sr[fn]=!0,sr[On]=ur.entries,sr.__toJS=ur.toObject,sr.__toStringMapper=function(t,e){return JSON.stringify(e)+": "+en(t)},Xe(r,{toKeyedSeq:function(){return new re(this,!1)},filter:function(t,e){return xe(this,fe(this,t,e,!1))},findIndex:function(t,e){var n=this.findEntry(t,e);return n?n[0]:-1},indexOf:function(t){var e=this.toKeyedSeq().keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.toKeyedSeq().reverse().keyOf(t);return void 0===e?-1:e},reverse:function(){return xe(this,ce(this,!1))},slice:function(t,e){return xe(this,de(this,t,e,!1))},splice:function(t,e){var n=arguments.length;if(e=Math.max(0|e,0),0===n||2===n&&!e)return this;t=_(t,0>t?this.count():this.size);var r=this.slice(0,t);return xe(this,1===n?r:r.concat(d(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var n=this.toKeyedSeq().findLastKey(t,e);return void 0===n?-1:n},first:function(){return this.get(0)},flatten:function(t){return xe(this,ge(this,t,!1))},get:function(t,e){return t=v(this,t),0>t||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,n){return n===t},void 0,e)},has:function(t){return t=v(this,t),t>=0&&(void 0!==this.size?this.size===1/0||t\n \n ':'\n \n \n \n ',t+='\n \n \n
'}}]),t}(),f=function(){function t(){var e=this;i(this,t),s.on("input",'[data-grav-array-type="key"], [data-grav-array-type="value"]',function(t){return e.actionInput(t)}),s.on("click touch","[data-grav-array-action]",function(t){return e.actionEvent(t)})}return o(t,[{key:"actionInput",value:function(t){var e=(0,u["default"])(t.target),n=e.data("grav-array-type");this._setTemplate(e);var r=e.data("array-template"),i="key"===n?e:e.siblings('[data-grav-array-type="key"]:first'),o="value"===n?e:e.siblings('[data-grav-array-type="value"]:first'),a=r.getName()+"["+(r.isValueOnly()?this.getIndexFor(e):i.val())+"]";o.attr("name",o.val()?a:r.getName()),this.refreshNames(r)}},{key:"actionEvent",value:function(t){var e=(0,u["default"])(t.target),n=e.data("grav-array-action");this._setTemplate(e),this[n+"Action"](e)}},{key:"addAction",value:function(t){var e=t.data("array-template"),n=t.closest('[data-grav-array-type="row"]');n.after(e.getNewRow())}},{key:"remAction",value:function(t){var e=t.data("array-template"),n=t.closest('[data-grav-array-type="row"]'),r=!n.siblings().length;if(r){var i=(0,u["default"])(e.getNewRow());n.after(i),i.find('[data-grav-array-type="value"]:last').attr("name",e.getName())}n.remove(),this.refreshNames(e)}},{key:"refreshNames",value:function(t){if(t.isValueOnly()){var e=t.container.find('> div > [data-grav-array-type="row"]'),n=e.find('[name]:not([name=""])');n.each(function(t,e){e=(0,u["default"])(e);var n=e.attr("name");n=n.replace(/\[\d+\]$/,"["+t+"]"),e.attr("name",n)}),n.length||e.find('[data-grav-array-type="value"]').attr("name",t.getName())}}},{key:"getIndexFor",value:function(t){var e=t.data("array-template"),n=t.closest('[data-grav-array-type="row"]');return e.container.find((e.isValueOnly()?"> div ":"")+' > [data-grav-array-type="row"]').index(n)}},{key:"_setTemplate",value:function(t){t.data("array-template")||t.data("array-template",new c(t.closest("[data-grav-array-name]")))}}]),t}();e["default"]=f;e.Instance=new f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var n=0;n .collection-actions [data-action="add"]',function(t){return e.addItem(t)}),t.on("click",'> ul > li > .item-actions [data-action="delete"]',function(t){return e.removeItem(t)}),t.find("[data-collection-holder]").each(function(t,n){n=(0,u["default"])(n),n.data("collection-sort")||n.data("collection-sort",new c["default"](n.get(0),{forceFallback:!0,animation:150,onUpdate:function(){return e.reindex(n)}}))})}},{key:"addItem",value:function(t){var e=(0,u["default"])(t.currentTarget),n=e.closest('[data-type="collection"]'),r=(0,u["default"])(n.find('> [data-collection-template="new"]').data("collection-template-html"));n.find("> [data-collection-holder]").append(r),this.reindex(n)}},{key:"removeItem",value:function(t){var e=(0,u["default"])(t.currentTarget),n=e.closest("[data-collection-item]"),r=e.closest('[data-type="collection"]');n.remove(),this.reindex(r)}},{key:"reindex",value:function(t){t=(0,u["default"])(t).closest('[data-type="collection"]');var e=t.find("> ul > [data-collection-item]");e.each(function(t,e){e=(0,u["default"])(e),e.attr("data-collection-key",t),["name","data-grav-field-name","id","for"].forEach(function(t){e.find("["+t+"]").each(function(){var e=(0,u["default"])(this),n=[];e.parents("[data-collection-key]").map(function(t,e){return n.push((0,u["default"])(e).attr("data-collection-key"))}),n.reverse();var r=e.attr(t).replace(/\[(\d+|\*)\]/g,function(){return"["+n.shift()+"]"});e.attr(t,r)})})})}},{key:"_onAddedNodes",value:function(t,e){var n=this,r=(0,u["default"])(e).find('[data-type="collection"]');r.length&&r.each(function(t,e){e=(0,u["default"])(e),~n.lists.index(e)||n.addList(e)})}}]),t}();e["default"]=f;e.Instance=new f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}var i=n(196),o=r(i);(0,o["default"])(".gpm-name, .gpm-actions").on("click",function(t){var e=(0,o["default"])(this),n=(0,o["default"])(t.target),r=n.prop("tagName").toLowerCase();if("a"===r||e.parent("a").length)return!0;var i=e.siblings(".gpm-details").find(".table-wrapper");i.slideToggle({duration:350,complete:function(){var t=i.is(":visible");i.closest("tr").find(".gpm-details-expand i").removeClass("fa-chevron-"+(t?"down":"up")).addClass("fa-chevron-"+(t?"up":"down"))}})})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}var i=n(196),o=r(i);(0,o["default"])(document).on("mousedown",'[data-remodal-target="theme-switch-warn"]',function(t){var e=(0,o["default"])(t.target).closest("[data-gpm-theme]").find(".gpm-name a:first").text(),n=(0,o["default"])(".remodal.theme-switcher");n.find("strong").text(e),n.find(".button.continue").attr("href",(0,o["default"])(t.target).attr("href"))})}]);
\ No newline at end of file
diff --git a/themes/grav/js/forms/form.js b/themes/grav/js/forms/form.js
index 92745879..9224425b 100644
--- a/themes/grav/js/forms/form.js
+++ b/themes/grav/js/forms/form.js
@@ -204,7 +204,7 @@
this.scanned = true;
//Refresh root.currentValues as toggleables have been initialized
- root.currentValues = getState();
+ // root.currentValues = getState();
};
Form.factories = {};
diff --git a/themes/grav/js/mdeditor.js b/themes/grav/js/mdeditor.js
index f207ce2f..9487f20a 100644
--- a/themes/grav/js/mdeditor.js
+++ b/themes/grav/js/mdeditor.js
@@ -1,5 +1,5 @@
-((function(){
- var toolbarIdentifiers = [ 'bold', 'italic', 'strike', 'link', 'image', 'blockquote', 'listUl', 'listOl' ];
+((function() {
+ var toolbarIdentifiers = ['bold', 'italic', 'strike', 'link', 'image', 'blockquote', 'listUl', 'listOl'];
if (typeof window.customToolbarElements !== 'undefined') {
window.customToolbarElements.forEach(function(customToolbarElement) {
toolbarIdentifiers.push(customToolbarElement.identifier);
@@ -8,40 +8,40 @@
var toolbarButtons = {
fullscreen: {
- title : 'Fullscreen',
- label : ' '
+ title: 'Fullscreen',
+ label: ' '
},
- bold : {
- title : 'Bold',
- label : ' '
+ bold: {
+ title: 'Bold',
+ label: ' '
},
- italic : {
- title : 'Italic',
- label : ' '
+ italic: {
+ title: 'Italic',
+ label: ' '
},
- strike : {
- title : 'Strikethrough',
- label : ' '
+ strike: {
+ title: 'Strikethrough',
+ label: ' '
},
- blockquote : {
- title : 'Blockquote',
- label : ' '
+ blockquote: {
+ title: 'Blockquote',
+ label: ' '
},
- link : {
- title : 'Link',
- label : ' '
+ link: {
+ title: 'Link',
+ label: ' '
},
- image : {
- title : 'Image',
- label : ' '
+ image: {
+ title: 'Image',
+ label: ' '
},
- listUl : {
- title : 'Unordered List',
- label : ' '
+ listUl: {
+ title: 'Unordered List',
+ label: ' '
},
- listOl : {
- title : 'Ordered List',
- label : ' '
+ listOl: {
+ title: 'Ordered List',
+ label: ' '
}
};
@@ -68,20 +68,34 @@
var template = '';
- var MDEditor = function(editor, options){
+ var MDEditor = function(editor, options) {
var $this = this,
- task = 'task' + GravAdmin.config.param_sep;
+ task = 'task' + GravAdmin.config.param_sep;
var tpl = ''
this.defaults = {
- markdown : false,
- autocomplete : true,
- height : 500,
- codemirror : { mode: 'htmlmixed', theme: 'paper', lineWrapping: true, dragDrop: true, autoCloseTags: true, matchTags: true, autoCloseBrackets: true, matchBrackets: true, indentUnit: 4, indentWithTabs: false, tabSize: 4, hintOptions: {completionSingle:false}, extraKeys: {"Enter": "newlineAndIndentContinueMarkdownList"} },
- toolbar : toolbarIdentifiers,
- lblPreview : ' ',
- lblCodeview : ' ',
+ markdown: false,
+ autocomplete: true,
+ height: 500,
+ codemirror: {
+ mode: 'htmlmixed',
+ theme: 'paper',
+ lineWrapping: true,
+ dragDrop: true,
+ autoCloseTags: true,
+ matchTags: true,
+ autoCloseBrackets: true,
+ matchBrackets: true,
+ indentUnit: 4,
+ indentWithTabs: false,
+ tabSize: 4,
+ hintOptions: { completionSingle: false },
+ extraKeys: { "Enter": "newlineAndIndentContinueMarkdownList" }
+ },
+ toolbar: toolbarIdentifiers,
+ lblPreview: ' ',
+ lblCodeview: ' ',
lblMarkedview: ' '
};
@@ -89,14 +103,14 @@
this.options = $.extend({}, this.defaults, options);
this.CodeMirror = CodeMirror;
- this.buttons = {};
+ this.buttons = {};
template = [
'',
- '
',
- '
',
- '
',
- '
'];
+ '',
+ '
',
+ '
',
+ '
'];
if ($this.element.data('grav-preview-enabled')) {
template.push('{:lblCodeview} ');
@@ -104,15 +118,15 @@
}
template.push(
- ' ',
- ' ',
- '
',
- '
Preview
',
- '
',
- '',
+ ' ',
+ ' ',
+ '
',
+ '
Preview
',
+ '
',
+ '
',
'
'
);
@@ -123,10 +137,10 @@
tpl = tpl.replace(/\{:lblCodeview\}/g, this.options.lblCodeview);
this.mdeditor = $(tpl);
- this.content = this.mdeditor.find('.grav-mdeditor-content');
- this.toolbar = this.mdeditor.find('.grav-mdeditor-toolbar');
- this.preview = this.mdeditor.find('.grav-mdeditor-preview').children().eq(0);
- this.code = this.mdeditor.find('.grav-mdeditor-code');
+ this.content = this.mdeditor.find('.grav-mdeditor-content');
+ this.toolbar = this.mdeditor.find('.grav-mdeditor-toolbar');
+ this.preview = this.mdeditor.find('.grav-mdeditor-preview').children().eq(0);
+ this.code = this.mdeditor.find('.grav-mdeditor-code');
this.element.before(this.mdeditor).appendTo(this.code);
this.editor = this.CodeMirror.fromTextArea(this.element[0], this.options.codemirror);
@@ -170,7 +184,7 @@
method: 'post',
data: $this.element.parents('form').serialize(),
toastErrors: true,
- success: function (response) {
+ success: function(response) {
$this.preview.container.html(response.message);
}
});
@@ -222,11 +236,11 @@
}, 100));
}
- this.debouncedRedraw = debounce(function () { $this.redraw(); }, 5);
+ this.debouncedRedraw = debounce(function() { $this.redraw(); }, 5);
/*this.element.attr('data-grav-check-display', 1).on('grav-check-display', function(e) {
- if($this.mdeditor.is(":visible")) $this.fit();
- });*/
+ if($this.mdeditor.is(":visible")) $this.fit();
+ });*/
MDEditors.editors[this.element.attr('name')] = this;
this.element.data('mdeditor_initialized', true);
@@ -256,7 +270,7 @@
var title = $this.buttons[button].title ? $this.buttons[button].title : button;
var buttonClass = $this.buttons[button].class ? 'class="' + $this.buttons[button].class + '"' : '';
- bar.push(''+$this.buttons[button].label+' ');
+ bar.push('' + $this.buttons[button].label + ' ');
});
this.toolbar.html(bar.join('\n'));
@@ -298,7 +312,7 @@
};
this.getCursorMode = function() {
- var param = { mode: 'html'};
+ var param = { mode: 'html' };
this.element.trigger('cursorMode', [param]);
return param.mode;
};
@@ -361,7 +375,13 @@
var curWord = start != end && curLine.slice(start, end);
if (curWord) {
- this.editor.setSelection({ line: cur.line, ch: start}, { line: cur.line, ch: end });
+ this.editor.setSelection({
+ line: cur.line,
+ ch: start
+ }, {
+ line: cur.line,
+ ch: end
+ });
text = curWord;
} else {
indexOf = replace.indexOf('$1');
@@ -372,10 +392,16 @@
this.editor.replaceSelection(html, 'end');
if (indexOf !== -1) {
- this.editor.setCursor({ line: cur.line, ch: start + indexOf });
+ this.editor.setCursor({
+ line: cur.line,
+ ch: start + indexOf
+ });
} else {
if (action == 'link' || action == 'image') {
- this.editor.setCursor({ line: cur.line, ch: html.length -1 });
+ this.editor.setCursor({
+ line: cur.line,
+ ch: html.length - 1
+ });
}
}
@@ -387,8 +413,17 @@
text = this.editor.getLine(pos.line),
html = replace.replace('$1', text);
- this.editor.replaceRange(html , { line: pos.line, ch: 0 }, { line: pos.line, ch: text.length });
- this.editor.setCursor({ line: pos.line, ch: html.length });
+ this.editor.replaceRange(html, {
+ line: pos.line,
+ ch: 0
+ }, {
+ line: pos.line,
+ ch: text.length
+ });
+ this.editor.setCursor({
+ line: pos.line,
+ ch: html.length
+ });
this.editor.focus();
};
@@ -410,15 +445,24 @@
if (editor.getCursorMode() == 'markdown') {
- var cm = editor.editor,
- pos = cm.getDoc().getCursor(true),
- posend = cm.getDoc().getCursor(false);
+ var cm = editor.editor,
+ pos = cm.getDoc().getCursor(true),
+ posend = cm.getDoc().getCursor(false);
- for (var i=pos.line; i<(posend.line+1);i++) {
- cm.replaceRange('* '+cm.getLine(i), { line: i, ch: 0 }, { line: i, ch: cm.getLine(i).length });
+ for (var i = pos.line; i < (posend.line + 1); i++) {
+ cm.replaceRange('* ' + cm.getLine(i), {
+ line: i,
+ ch: 0
+ }, {
+ line: i,
+ ch: cm.getLine(i).length
+ });
}
- cm.setCursor({ line: posend.line, ch: cm.getLine(posend.line).length });
+ cm.setCursor({
+ line: posend.line,
+ ch: cm.getLine(posend.line).length
+ });
cm.focus();
}
});
@@ -427,25 +471,34 @@
if (editor.getCursorMode() == 'markdown') {
- var cm = editor.editor,
- pos = cm.getDoc().getCursor(true),
- posend = cm.getDoc().getCursor(false),
- prefix = 1;
+ var cm = editor.editor,
+ pos = cm.getDoc().getCursor(true),
+ posend = cm.getDoc().getCursor(false),
+ prefix = 1;
if (pos.line > 0) {
- var prevline = cm.getLine(pos.line-1), matches;
+ var prevline = cm.getLine(pos.line - 1), matches;
- if(matches = prevline.match(/^(\d+)\./)) {
- prefix = Number(matches[1])+1;
+ if (matches = prevline.match(/^(\d+)\./)) {
+ prefix = Number(matches[1]) + 1;
}
}
- for (var i=pos.line; i<(posend.line+1);i++) {
- cm.replaceRange(prefix+'. '+cm.getLine(i), { line: i, ch: 0 }, { line: i, ch: cm.getLine(i).length });
+ for (var i = pos.line; i < (posend.line + 1); i++) {
+ cm.replaceRange(prefix + '. ' + cm.getLine(i), {
+ line: i,
+ ch: 0
+ }, {
+ line: i,
+ ch: cm.getLine(i).length
+ });
prefix++;
}
- cm.setCursor({ line: posend.line, ch: cm.getLine(posend.line).length });
+ cm.setCursor({
+ line: posend.line,
+ ch: cm.getLine(posend.line).length
+ });
cm.focus();
}
});
@@ -485,8 +538,8 @@
// switch markdown mode on event
editor.element.on({
- enableMarkdown : function() { editor.enableMarkdown(); },
- disableMarkdown : function() { editor.disableMarkdown(); }
+ enableMarkdown: function() { editor.enableMarkdown(); },
+ disableMarkdown: function() { editor.disableMarkdown(); }
});
function enableMarkdown() {
@@ -501,16 +554,22 @@
if (editor.mdeditor.hasClass('grav-mdeditor-fullscreen')) {
- editor.editor.state.fullScreenRestore = {scrollTop: window.pageYOffset, scrollLeft: window.pageXOffset, width: wrap.style.width, height: wrap.style.height};
- wrap.style.width = '';
- wrap.style.height = editor.content.height()+'px';
+ editor.editor.state.fullScreenRestore = {
+ scrollTop: window.pageYOffset,
+ scrollLeft: window.pageXOffset,
+ width: wrap.style.width,
+ height: wrap.style.height
+ };
+ wrap.style.width = '';
+ wrap.style.height = editor.content.height() + 'px';
document.documentElement.style.overflow = 'hidden';
} else {
document.documentElement.style.overflow = '';
var info = editor.editor.state.fullScreenRestore;
- wrap.style.width = info.width; wrap.style.height = info.height;
+ wrap.style.width = info.width;
+ wrap.style.height = info.height;
window.scrollTo(info.scrollLeft, info.scrollTop);
}
@@ -525,7 +584,7 @@
editor.addShortcutAction('italic', ['Ctrl-I', 'Cmd-I']);
function addAction(name, replace, mode) {
- editor.element.on('action.'+name, function() {
+ editor.element.on('action.' + name, function() {
if (editor.getCursorMode() == 'markdown') {
editor[mode == 'replaceLine' ? 'replaceLine' : 'replaceSelection'](replace, name);
}
@@ -553,20 +612,24 @@
});
},
- add: function(editor) {
- editor = $(editor);
+ add: function(editors) {
+ editors = $(editors);
- var mdeditor;
- if (!editor.data('mdeditor_initialized')) {
- mdeditor = new MDEditor(editor, JSON.parse(editor.attr('data-grav-mdeditor') || '{}'));
- }
+ var mdeditor = [];
- return mdeditor || MDEditors.editors[editor.attr('name')];
+ editors.each(function(index, editor) {
+ editor = $(editor);
+ if (!editor.data('mdeditor_initialized')) {
+ mdeditor.push(new MDEditor(editor, JSON.parse(editor.attr('data-grav-mdeditor') || '{}')));
+ }
+ });
+
+ return mdeditor || MDEditors.editors[editors.attr('name')];
}
};
// init
- $(function(){
+ $(function() {
MDEditors.init();
});
diff --git a/themes/grav/js/modernizr.custom.71422.js b/themes/grav/js/modernizr.custom.71422.js
deleted file mode 100644
index 63cc6c20..00000000
--- a/themes/grav/js/modernizr.custom.71422.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/* Modernizr 2.7.1 (Custom Build) | MIT & BSD
- * Build: http://modernizr.com/download/#-csstransforms3d-shiv-cssclasses-teststyles-testprop-testallprops-prefixes-domprefixes-load
- */
-;window.Modernizr=function(a,b,c){function z(a){j.cssText=a}function A(a,b){return z(m.join(a+";")+(b||""))}function B(a,b){return typeof a===b}function C(a,b){return!!~(""+a).indexOf(b)}function D(a,b){for(var d in a){var e=a[d];if(!C(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function E(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:B(f,"function")?f.bind(d||b):f}return!1}function F(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+o.join(d+" ")+d).split(" ");return B(b,"string")||B(b,"undefined")?D(e,b):(e=(a+" "+p.join(d+" ")+d).split(" "),E(e,b,c))}var d="2.7.1",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n="Webkit Moz O ms",o=n.split(" "),p=n.toLowerCase().split(" "),q={},r={},s={},t=[],u=t.slice,v,w=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["",'"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},x={}.hasOwnProperty,y;!B(x,"undefined")&&!B(x.call,"undefined")?y=function(a,b){return x.call(a,b)}:y=function(a,b){return b in a&&B(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=u.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(u.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(u.call(arguments)))};return e}),q.csstransforms3d=function(){var a=!!F("perspective");return a&&"webkitPerspective"in g.style&&w("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a};for(var G in q)y(q,G)&&(v=G.toLowerCase(),e[v]=q[G](),t.push((e[v]?"":"no-")+v));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)y(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},z(""),i=k=null,function(a,b){function l(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b)}(this,b),e._version=d,e._prefixes=m,e._domPrefixes=p,e._cssomPrefixes=o,e.testProp=function(a){return D([a])},e.testAllProps=F,e.testStyles=w,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+t.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f= 0; i--) {
+ clearToast($(toastsToClear[i]), options);
+ }
+ }
+
+ function clearToast ($toastElement, options, clearOptions) {
+ var force = clearOptions && clearOptions.force ? clearOptions.force : false;
+ if ($toastElement && (force || $(':focus', $toastElement).length === 0)) {
+ $toastElement[options.hideMethod]({
+ duration: options.hideDuration,
+ easing: options.hideEasing,
+ complete: function () { removeToast($toastElement); }
+ });
+ return true;
+ }
+ return false;
+ }
+
+ function createContainer(options) {
+ $container = $('
')
+ .attr('id', options.containerId)
+ .addClass(options.positionClass)
+ .attr('aria-live', 'polite')
+ .attr('role', 'alert');
+
+ $container.appendTo($(options.target));
+ return $container;
+ }
+
+ function getDefaults() {
+ return {
+ tapToDismiss: true,
+ toastClass: 'toast',
+ containerId: 'toast-container',
+ debug: false,
+
+ showMethod: 'fadeIn', //fadeIn, slideDown, and show are built into jQuery
+ showDuration: 300,
+ showEasing: 'swing', //swing and linear are built into jQuery
+ onShown: undefined,
+ hideMethod: 'fadeOut',
+ hideDuration: 1000,
+ hideEasing: 'swing',
+ onHidden: undefined,
+ closeMethod: false,
+ closeDuration: false,
+ closeEasing: false,
+
+ extendedTimeOut: 1000,
+ iconClasses: {
+ error: 'toast-error',
+ info: 'toast-info',
+ success: 'toast-success',
+ warning: 'toast-warning'
+ },
+ iconClass: 'toast-info',
+ positionClass: 'toast-top-right',
+ timeOut: 5000, // Set timeOut and extendedTimeOut to 0 to make it sticky
+ titleClass: 'toast-title',
+ messageClass: 'toast-message',
+ escapeHtml: false,
+ target: 'body',
+ closeHtml: '× ',
+ newestOnTop: true,
+ preventDuplicates: false,
+ progressBar: false
+ };
+ }
+
+ function publish(args) {
+ if (!listener) { return; }
+ listener(args);
+ }
+
+ function notify(map) {
+ var options = getOptions();
+ var iconClass = map.iconClass || options.iconClass;
+
+ if (typeof (map.optionsOverride) !== 'undefined') {
+ options = $.extend(options, map.optionsOverride);
+ iconClass = map.optionsOverride.iconClass || iconClass;
+ }
+
+ if (shouldExit(options, map)) { return; }
+
+ toastId++;
+
+ $container = getContainer(options, true);
+
+ var intervalId = null;
+ var $toastElement = $('
');
+ var $titleElement = $('
');
+ var $messageElement = $('
');
+ var $progressElement = $('
');
+ var $closeElement = $(options.closeHtml);
+ var progressBar = {
+ intervalId: null,
+ hideEta: null,
+ maxHideTime: null
+ };
+ var response = {
+ toastId: toastId,
+ state: 'visible',
+ startTime: new Date(),
+ options: options,
+ map: map
+ };
+
+ personalizeToast();
+
+ displayToast();
+
+ handleEvents();
+
+ publish(response);
+
+ if (options.debug && console) {
+ console.log(response);
+ }
+
+ return $toastElement;
+
+ function escapeHtml(source) {
+ if (source == null)
+ source = "";
+
+ return new String(source)
+ .replace(/&/g, '&')
+ .replace(/"/g, '"')
+ .replace(/'/g, ''')
+ .replace(/ /g, '>');
+ }
+
+ function personalizeToast() {
+ setIcon();
+ setTitle();
+ setMessage();
+ setCloseButton();
+ setProgressBar();
+ setSequence();
+ }
+
+ function handleEvents() {
+ $toastElement.hover(stickAround, delayedHideToast);
+ if (!options.onclick && options.tapToDismiss) {
+ $toastElement.click(hideToast);
+ }
+
+ if (options.closeButton && $closeElement) {
+ $closeElement.click(function (event) {
+ if (event.stopPropagation) {
+ event.stopPropagation();
+ } else if (event.cancelBubble !== undefined && event.cancelBubble !== true) {
+ event.cancelBubble = true;
+ }
+ hideToast(true);
+ });
+ }
+
+ if (options.onclick) {
+ $toastElement.click(function (event) {
+ options.onclick(event);
+ hideToast();
+ });
+ }
+ }
+
+ function displayToast() {
+ $toastElement.hide();
+
+ $toastElement[options.showMethod](
+ {duration: options.showDuration, easing: options.showEasing, complete: options.onShown}
+ );
+
+ if (options.timeOut > 0) {
+ intervalId = setTimeout(hideToast, options.timeOut);
+ progressBar.maxHideTime = parseFloat(options.timeOut);
+ progressBar.hideEta = new Date().getTime() + progressBar.maxHideTime;
+ if (options.progressBar) {
+ progressBar.intervalId = setInterval(updateProgress, 10);
+ }
+ }
+ }
+
+ function setIcon() {
+ if (map.iconClass) {
+ $toastElement.addClass(options.toastClass).addClass(iconClass);
+ }
+ }
+
+ function setSequence() {
+ if (options.newestOnTop) {
+ $container.prepend($toastElement);
+ } else {
+ $container.append($toastElement);
+ }
+ }
+
+ function setTitle() {
+ if (map.title) {
+ $titleElement.append(!options.escapeHtml ? map.title : escapeHtml(map.title)).addClass(options.titleClass);
+ $toastElement.append($titleElement);
+ }
+ }
+
+ function setMessage() {
+ if (map.message) {
+ $messageElement.append(!options.escapeHtml ? map.message : escapeHtml(map.message)).addClass(options.messageClass);
+ $toastElement.append($messageElement);
+ }
+ }
+
+ function setCloseButton() {
+ if (options.closeButton) {
+ $closeElement.addClass('toast-close-button').attr('role', 'button');
+ $toastElement.prepend($closeElement);
+ }
+ }
+
+ function setProgressBar() {
+ if (options.progressBar) {
+ $progressElement.addClass('toast-progress');
+ $toastElement.prepend($progressElement);
+ }
+ }
+
+ function shouldExit(options, map) {
+ if (options.preventDuplicates) {
+ if (map.message === previousToast) {
+ return true;
+ } else {
+ previousToast = map.message;
+ }
+ }
+ return false;
+ }
+
+ function hideToast(override) {
+ var method = override && options.closeMethod !== false ? options.closeMethod : options.hideMethod;
+ var duration = override && options.closeDuration !== false ?
+ options.closeDuration : options.hideDuration;
+ var easing = override && options.closeEasing !== false ? options.closeEasing : options.hideEasing;
+ if ($(':focus', $toastElement).length && !override) {
+ return;
+ }
+ clearTimeout(progressBar.intervalId);
+ return $toastElement[method]({
+ duration: duration,
+ easing: easing,
+ complete: function () {
+ removeToast($toastElement);
+ if (options.onHidden && response.state !== 'hidden') {
+ options.onHidden();
+ }
+ response.state = 'hidden';
+ response.endTime = new Date();
+ publish(response);
+ }
+ });
+ }
+
+ function delayedHideToast() {
+ if (options.timeOut > 0 || options.extendedTimeOut > 0) {
+ intervalId = setTimeout(hideToast, options.extendedTimeOut);
+ progressBar.maxHideTime = parseFloat(options.extendedTimeOut);
+ progressBar.hideEta = new Date().getTime() + progressBar.maxHideTime;
+ }
+ }
+
+ function stickAround() {
+ clearTimeout(intervalId);
+ progressBar.hideEta = 0;
+ $toastElement.stop(true, true)[options.showMethod](
+ {duration: options.showDuration, easing: options.showEasing}
+ );
+ }
+
+ function updateProgress() {
+ var percentage = ((progressBar.hideEta - (new Date().getTime())) / progressBar.maxHideTime) * 100;
+ $progressElement.width(percentage + '%');
+ }
+ }
+
+ function getOptions() {
+ return $.extend({}, getDefaults(), toastr.options);
+ }
+
+ function removeToast($toastElement) {
+ if (!$container) { $container = getContainer(); }
+ if ($toastElement.is(':visible')) {
+ return;
+ }
+ $toastElement.remove();
+ $toastElement = null;
+ if ($container.children().length === 0) {
+ $container.remove();
+ previousToast = undefined;
+ }
+ }
+
+ })();
+ }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+ }(__webpack_require__(197)));
+
+
+/***/ },
+
+/***/ 196:
+/***/ function(module, exports) {
+
+ module.exports = jQuery;
+
+/***/ },
+
+/***/ 197:
+/***/ function(module, exports) {
+
+ module.exports = function() { throw new Error("define cannot be used indirect"); };
+
+
+/***/ },
+
+/***/ 208:
+/***/ function(module, exports, __webpack_require__) {
+
+ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (root, factory) {
+ if (true) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function () {
+ return (root['Chartist'] = factory());
+ }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory();
+ } else {
+ root['Chartist'] = factory();
+ }
+ }(this, function () {
+
+ /* Chartist.js 0.9.5
+ * Copyright © 2015 Gion Kunz
+ * Free to use under the WTFPL license.
+ * http://www.wtfpl.net/
+ */
+ /**
+ * The core module of Chartist that is mainly providing static functions and higher level functions for chart modules.
+ *
+ * @module Chartist.Core
+ */
+ var Chartist = {
+ version: '0.9.5'
+ };
+
+ (function (window, document, Chartist) {
+ 'use strict';
+
+ /**
+ * Helps to simplify functional style code
+ *
+ * @memberof Chartist.Core
+ * @param {*} n This exact value will be returned by the noop function
+ * @return {*} The same value that was provided to the n parameter
+ */
+ Chartist.noop = function (n) {
+ return n;
+ };
+
+ /**
+ * Generates a-z from a number 0 to 26
+ *
+ * @memberof Chartist.Core
+ * @param {Number} n A number from 0 to 26 that will result in a letter a-z
+ * @return {String} A character from a-z based on the input number n
+ */
+ Chartist.alphaNumerate = function (n) {
+ // Limit to a-z
+ return String.fromCharCode(97 + n % 26);
+ };
+
+ /**
+ * Simple recursive object extend
+ *
+ * @memberof Chartist.Core
+ * @param {Object} target Target object where the source will be merged into
+ * @param {Object...} sources This object (objects) will be merged into target and then target is returned
+ * @return {Object} An object that has the same reference as target but is extended and merged with the properties of source
+ */
+ Chartist.extend = function (target) {
+ target = target || {};
+
+ var sources = Array.prototype.slice.call(arguments, 1);
+ sources.forEach(function(source) {
+ for (var prop in source) {
+ if (typeof source[prop] === 'object' && source[prop] !== null && !(source[prop] instanceof Array)) {
+ target[prop] = Chartist.extend({}, target[prop], source[prop]);
+ } else {
+ target[prop] = source[prop];
+ }
+ }
+ });
+
+ return target;
+ };
+
+ /**
+ * Replaces all occurrences of subStr in str with newSubStr and returns a new string.
+ *
+ * @memberof Chartist.Core
+ * @param {String} str
+ * @param {String} subStr
+ * @param {String} newSubStr
+ * @return {String}
+ */
+ Chartist.replaceAll = function(str, subStr, newSubStr) {
+ return str.replace(new RegExp(subStr, 'g'), newSubStr);
+ };
+
+ /**
+ * Converts a number to a string with a unit. If a string is passed then this will be returned unmodified.
+ *
+ * @memberof Chartist.Core
+ * @param {Number} value
+ * @param {String} unit
+ * @return {String} Returns the passed number value with unit.
+ */
+ Chartist.ensureUnit = function(value, unit) {
+ if(typeof value === 'number') {
+ value = value + unit;
+ }
+
+ return value;
+ };
+
+ /**
+ * Converts a number or string to a quantity object.
+ *
+ * @memberof Chartist.Core
+ * @param {String|Number} input
+ * @return {Object} Returns an object containing the value as number and the unit as string.
+ */
+ Chartist.quantity = function(input) {
+ if (typeof input === 'string') {
+ var match = (/^(\d+)\s*(.*)$/g).exec(input);
+ return {
+ value : +match[1],
+ unit: match[2] || undefined
+ };
+ }
+ return { value: input };
+ };
+
+ /**
+ * This is a wrapper around document.querySelector that will return the query if it's already of type Node
+ *
+ * @memberof Chartist.Core
+ * @param {String|Node} query The query to use for selecting a Node or a DOM node that will be returned directly
+ * @return {Node}
+ */
+ Chartist.querySelector = function(query) {
+ return query instanceof Node ? query : document.querySelector(query);
+ };
+
+ /**
+ * Functional style helper to produce array with given length initialized with undefined values
+ *
+ * @memberof Chartist.Core
+ * @param length
+ * @return {Array}
+ */
+ Chartist.times = function(length) {
+ return Array.apply(null, new Array(length));
+ };
+
+ /**
+ * Sum helper to be used in reduce functions
+ *
+ * @memberof Chartist.Core
+ * @param previous
+ * @param current
+ * @return {*}
+ */
+ Chartist.sum = function(previous, current) {
+ return previous + (current ? current : 0);
+ };
+
+ /**
+ * Multiply helper to be used in `Array.map` for multiplying each value of an array with a factor.
+ *
+ * @memberof Chartist.Core
+ * @param {Number} factor
+ * @returns {Function} Function that can be used in `Array.map` to multiply each value in an array
+ */
+ Chartist.mapMultiply = function(factor) {
+ return function(num) {
+ return num * factor;
+ };
+ };
+
+ /**
+ * Add helper to be used in `Array.map` for adding a addend to each value of an array.
+ *
+ * @memberof Chartist.Core
+ * @param {Number} addend
+ * @returns {Function} Function that can be used in `Array.map` to add a addend to each value in an array
+ */
+ Chartist.mapAdd = function(addend) {
+ return function(num) {
+ return num + addend;
+ };
+ };
+
+ /**
+ * Map for multi dimensional arrays where their nested arrays will be mapped in serial. The output array will have the length of the largest nested array. The callback function is called with variable arguments where each argument is the nested array value (or undefined if there are no more values).
+ *
+ * @memberof Chartist.Core
+ * @param arr
+ * @param cb
+ * @return {Array}
+ */
+ Chartist.serialMap = function(arr, cb) {
+ var result = [],
+ length = Math.max.apply(null, arr.map(function(e) {
+ return e.length;
+ }));
+
+ Chartist.times(length).forEach(function(e, index) {
+ var args = arr.map(function(e) {
+ return e[index];
+ });
+
+ result[index] = cb.apply(null, args);
+ });
+
+ return result;
+ };
+
+ /**
+ * This helper function can be used to round values with certain precision level after decimal. This is used to prevent rounding errors near float point precision limit.
+ *
+ * @memberof Chartist.Core
+ * @param {Number} value The value that should be rounded with precision
+ * @param {Number} [digits] The number of digits after decimal used to do the rounding
+ * @returns {number} Rounded value
+ */
+ Chartist.roundWithPrecision = function(value, digits) {
+ var precision = Math.pow(10, digits || Chartist.precision);
+ return Math.round(value * precision) / precision;
+ };
+
+ /**
+ * Precision level used internally in Chartist for rounding. If you require more decimal places you can increase this number.
+ *
+ * @memberof Chartist.Core
+ * @type {number}
+ */
+ Chartist.precision = 8;
+
+ /**
+ * A map with characters to escape for strings to be safely used as attribute values.
+ *
+ * @memberof Chartist.Core
+ * @type {Object}
+ */
+ Chartist.escapingMap = {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ '\'': '''
+ };
+
+ /**
+ * This function serializes arbitrary data to a string. In case of data that can't be easily converted to a string, this function will create a wrapper object and serialize the data using JSON.stringify. The outcoming string will always be escaped using Chartist.escapingMap.
+ * If called with null or undefined the function will return immediately with null or undefined.
+ *
+ * @memberof Chartist.Core
+ * @param {Number|String|Object} data
+ * @return {String}
+ */
+ Chartist.serialize = function(data) {
+ if(data === null || data === undefined) {
+ return data;
+ } else if(typeof data === 'number') {
+ data = ''+data;
+ } else if(typeof data === 'object') {
+ data = JSON.stringify({data: data});
+ }
+
+ return Object.keys(Chartist.escapingMap).reduce(function(result, key) {
+ return Chartist.replaceAll(result, key, Chartist.escapingMap[key]);
+ }, data);
+ };
+
+ /**
+ * This function de-serializes a string previously serialized with Chartist.serialize. The string will always be unescaped using Chartist.escapingMap before it's returned. Based on the input value the return type can be Number, String or Object. JSON.parse is used with try / catch to see if the unescaped string can be parsed into an Object and this Object will be returned on success.
+ *
+ * @memberof Chartist.Core
+ * @param {String} data
+ * @return {String|Number|Object}
+ */
+ Chartist.deserialize = function(data) {
+ if(typeof data !== 'string') {
+ return data;
+ }
+
+ data = Object.keys(Chartist.escapingMap).reduce(function(result, key) {
+ return Chartist.replaceAll(result, Chartist.escapingMap[key], key);
+ }, data);
+
+ try {
+ data = JSON.parse(data);
+ data = data.data !== undefined ? data.data : data;
+ } catch(e) {}
+
+ return data;
+ };
+
+ /**
+ * Create or reinitialize the SVG element for the chart
+ *
+ * @memberof Chartist.Core
+ * @param {Node} container The containing DOM Node object that will be used to plant the SVG element
+ * @param {String} width Set the width of the SVG element. Default is 100%
+ * @param {String} height Set the height of the SVG element. Default is 100%
+ * @param {String} className Specify a class to be added to the SVG element
+ * @return {Object} The created/reinitialized SVG element
+ */
+ Chartist.createSvg = function (container, width, height, className) {
+ var svg;
+
+ width = width || '100%';
+ height = height || '100%';
+
+ // Check if there is a previous SVG element in the container that contains the Chartist XML namespace and remove it
+ // Since the DOM API does not support namespaces we need to manually search the returned list http://www.w3.org/TR/selectors-api/
+ Array.prototype.slice.call(container.querySelectorAll('svg')).filter(function filterChartistSvgObjects(svg) {
+ return svg.getAttributeNS('http://www.w3.org/2000/xmlns/', Chartist.xmlNs.prefix);
+ }).forEach(function removePreviousElement(svg) {
+ container.removeChild(svg);
+ });
+
+ // Create svg object with width and height or use 100% as default
+ svg = new Chartist.Svg('svg').attr({
+ width: width,
+ height: height
+ }).addClass(className).attr({
+ style: 'width: ' + width + '; height: ' + height + ';'
+ });
+
+ // Add the DOM node to our container
+ container.appendChild(svg._node);
+
+ return svg;
+ };
+
+
+ /**
+ * Reverses the series, labels and series data arrays.
+ *
+ * @memberof Chartist.Core
+ * @param data
+ */
+ Chartist.reverseData = function(data) {
+ data.labels.reverse();
+ data.series.reverse();
+ for (var i = 0; i < data.series.length; i++) {
+ if(typeof(data.series[i]) === 'object' && data.series[i].data !== undefined) {
+ data.series[i].data.reverse();
+ } else if(data.series[i] instanceof Array) {
+ data.series[i].reverse();
+ }
+ }
+ };
+
+ /**
+ * Convert data series into plain array
+ *
+ * @memberof Chartist.Core
+ * @param {Object} data The series object that contains the data to be visualized in the chart
+ * @param {Boolean} reverse If true the whole data is reversed by the getDataArray call. This will modify the data object passed as first parameter. The labels as well as the series order is reversed. The whole series data arrays are reversed too.
+ * @param {Boolean} multi Create a multi dimensional array from a series data array where a value object with `x` and `y` values will be created.
+ * @return {Array} A plain array that contains the data to be visualized in the chart
+ */
+ Chartist.getDataArray = function (data, reverse, multi) {
+ // If the data should be reversed but isn't we need to reverse it
+ // If it's reversed but it shouldn't we need to reverse it back
+ // That's required to handle data updates correctly and to reflect the responsive configurations
+ if(reverse && !data.reversed || !reverse && data.reversed) {
+ Chartist.reverseData(data);
+ data.reversed = !data.reversed;
+ }
+
+ // Recursively walks through nested arrays and convert string values to numbers and objects with value properties
+ // to values. Check the tests in data core -> data normalization for a detailed specification of expected values
+ function recursiveConvert(value) {
+ if(Chartist.isFalseyButZero(value)) {
+ // This is a hole in data and we should return undefined
+ return undefined;
+ } else if((value.data || value) instanceof Array) {
+ return (value.data || value).map(recursiveConvert);
+ } else if(value.hasOwnProperty('value')) {
+ return recursiveConvert(value.value);
+ } else {
+ if(multi) {
+ var multiValue = {};
+
+ // Single series value arrays are assumed to specify the Y-Axis value
+ // For example: [1, 2] => [{x: undefined, y: 1}, {x: undefined, y: 2}]
+ // If multi is a string then it's assumed that it specified which dimension should be filled as default
+ if(typeof multi === 'string') {
+ multiValue[multi] = Chartist.getNumberOrUndefined(value);
+ } else {
+ multiValue.y = Chartist.getNumberOrUndefined(value);
+ }
+
+ multiValue.x = value.hasOwnProperty('x') ? Chartist.getNumberOrUndefined(value.x) : multiValue.x;
+ multiValue.y = value.hasOwnProperty('y') ? Chartist.getNumberOrUndefined(value.y) : multiValue.y;
+
+ return multiValue;
+
+ } else {
+ return Chartist.getNumberOrUndefined(value);
+ }
+ }
+ }
+
+ return data.series.map(recursiveConvert);
+ };
+
+ /**
+ * Converts a number into a padding object.
+ *
+ * @memberof Chartist.Core
+ * @param {Object|Number} padding
+ * @param {Number} [fallback] This value is used to fill missing values if a incomplete padding object was passed
+ * @returns {Object} Returns a padding object containing top, right, bottom, left properties filled with the padding number passed in as argument. If the argument is something else than a number (presumably already a correct padding object) then this argument is directly returned.
+ */
+ Chartist.normalizePadding = function(padding, fallback) {
+ fallback = fallback || 0;
+
+ return typeof padding === 'number' ? {
+ top: padding,
+ right: padding,
+ bottom: padding,
+ left: padding
+ } : {
+ top: typeof padding.top === 'number' ? padding.top : fallback,
+ right: typeof padding.right === 'number' ? padding.right : fallback,
+ bottom: typeof padding.bottom === 'number' ? padding.bottom : fallback,
+ left: typeof padding.left === 'number' ? padding.left : fallback
+ };
+ };
+
+ Chartist.getMetaData = function(series, index) {
+ var value = series.data ? series.data[index] : series[index];
+ return value ? Chartist.serialize(value.meta) : undefined;
+ };
+
+ /**
+ * Calculate the order of magnitude for the chart scale
+ *
+ * @memberof Chartist.Core
+ * @param {Number} value The value Range of the chart
+ * @return {Number} The order of magnitude
+ */
+ Chartist.orderOfMagnitude = function (value) {
+ return Math.floor(Math.log(Math.abs(value)) / Math.LN10);
+ };
+
+ /**
+ * Project a data length into screen coordinates (pixels)
+ *
+ * @memberof Chartist.Core
+ * @param {Object} axisLength The svg element for the chart
+ * @param {Number} length Single data value from a series array
+ * @param {Object} bounds All the values to set the bounds of the chart
+ * @return {Number} The projected data length in pixels
+ */
+ Chartist.projectLength = function (axisLength, length, bounds) {
+ return length / bounds.range * axisLength;
+ };
+
+ /**
+ * Get the height of the area in the chart for the data series
+ *
+ * @memberof Chartist.Core
+ * @param {Object} svg The svg element for the chart
+ * @param {Object} options The Object that contains all the optional values for the chart
+ * @return {Number} The height of the area in the chart for the data series
+ */
+ Chartist.getAvailableHeight = function (svg, options) {
+ return Math.max((Chartist.quantity(options.height).value || svg.height()) - (options.chartPadding.top + options.chartPadding.bottom) - options.axisX.offset, 0);
+ };
+
+ /**
+ * Get highest and lowest value of data array. This Array contains the data that will be visualized in the chart.
+ *
+ * @memberof Chartist.Core
+ * @param {Array} data The array that contains the data to be visualized in the chart
+ * @param {Object} options The Object that contains the chart options
+ * @param {String} dimension Axis dimension 'x' or 'y' used to access the correct value and high / low configuration
+ * @return {Object} An object that contains the highest and lowest value that will be visualized on the chart.
+ */
+ Chartist.getHighLow = function (data, options, dimension) {
+ // TODO: Remove workaround for deprecated global high / low config. Axis high / low configuration is preferred
+ options = Chartist.extend({}, options, dimension ? options['axis' + dimension.toUpperCase()] : {});
+
+ var highLow = {
+ high: options.high === undefined ? -Number.MAX_VALUE : +options.high,
+ low: options.low === undefined ? Number.MAX_VALUE : +options.low
+ };
+ var findHigh = options.high === undefined;
+ var findLow = options.low === undefined;
+
+ // Function to recursively walk through arrays and find highest and lowest number
+ function recursiveHighLow(data) {
+ if(data === undefined) {
+ return undefined;
+ } else if(data instanceof Array) {
+ for (var i = 0; i < data.length; i++) {
+ recursiveHighLow(data[i]);
+ }
+ } else {
+ var value = dimension ? +data[dimension] : +data;
+
+ if (findHigh && value > highLow.high) {
+ highLow.high = value;
+ }
+
+ if (findLow && value < highLow.low) {
+ highLow.low = value;
+ }
+ }
+ }
+
+ // Start to find highest and lowest number recursively
+ if(findHigh || findLow) {
+ recursiveHighLow(data);
+ }
+
+ // Overrides of high / low based on reference value, it will make sure that the invisible reference value is
+ // used to generate the chart. This is useful when the chart always needs to contain the position of the
+ // invisible reference value in the view i.e. for bipolar scales.
+ if (options.referenceValue || options.referenceValue === 0) {
+ highLow.high = Math.max(options.referenceValue, highLow.high);
+ highLow.low = Math.min(options.referenceValue, highLow.low);
+ }
+
+ // If high and low are the same because of misconfiguration or flat data (only the same value) we need
+ // to set the high or low to 0 depending on the polarity
+ if (highLow.high <= highLow.low) {
+ // If both values are 0 we set high to 1
+ if (highLow.low === 0) {
+ highLow.high = 1;
+ } else if (highLow.low < 0) {
+ // If we have the same negative value for the bounds we set bounds.high to 0
+ highLow.high = 0;
+ } else {
+ // If we have the same positive value for the bounds we set bounds.low to 0
+ highLow.low = 0;
+ }
+ }
+
+ return highLow;
+ };
+
+ /**
+ * Checks if the value is a valid number or string with a number.
+ *
+ * @memberof Chartist.Core
+ * @param value
+ * @returns {Boolean}
+ */
+ Chartist.isNum = function(value) {
+ return !isNaN(value) && isFinite(value);
+ };
+
+ /**
+ * Returns true on all falsey values except the numeric value 0.
+ *
+ * @memberof Chartist.Core
+ * @param value
+ * @returns {boolean}
+ */
+ Chartist.isFalseyButZero = function(value) {
+ return !value && value !== 0;
+ };
+
+ /**
+ * Returns a number if the passed parameter is a valid number or the function will return undefined. On all other values than a valid number, this function will return undefined.
+ *
+ * @memberof Chartist.Core
+ * @param value
+ * @returns {*}
+ */
+ Chartist.getNumberOrUndefined = function(value) {
+ return isNaN(+value) ? undefined : +value;
+ };
+
+ /**
+ * Gets a value from a dimension `value.x` or `value.y` while returning value directly if it's a valid numeric value. If the value is not numeric and it's falsey this function will return undefined.
+ *
+ * @param value
+ * @param dimension
+ * @returns {*}
+ */
+ Chartist.getMultiValue = function(value, dimension) {
+ if(Chartist.isNum(value)) {
+ return +value;
+ } else if(value) {
+ return value[dimension || 'y'] || 0;
+ } else {
+ return 0;
+ }
+ };
+
+ /**
+ * Pollard Rho Algorithm to find smallest factor of an integer value. There are more efficient algorithms for factorization, but this one is quite efficient and not so complex.
+ *
+ * @memberof Chartist.Core
+ * @param {Number} num An integer number where the smallest factor should be searched for
+ * @returns {Number} The smallest integer factor of the parameter num.
+ */
+ Chartist.rho = function(num) {
+ if(num === 1) {
+ return num;
+ }
+
+ function gcd(p, q) {
+ if (p % q === 0) {
+ return q;
+ } else {
+ return gcd(q, p % q);
+ }
+ }
+
+ function f(x) {
+ return x * x + 1;
+ }
+
+ var x1 = 2, x2 = 2, divisor;
+ if (num % 2 === 0) {
+ return 2;
+ }
+
+ do {
+ x1 = f(x1) % num;
+ x2 = f(f(x2)) % num;
+ divisor = gcd(Math.abs(x1 - x2), num);
+ } while (divisor === 1);
+
+ return divisor;
+ };
+
+ /**
+ * Calculate and retrieve all the bounds for the chart and return them in one array
+ *
+ * @memberof Chartist.Core
+ * @param {Number} axisLength The length of the Axis used for
+ * @param {Object} highLow An object containing a high and low property indicating the value range of the chart.
+ * @param {Number} scaleMinSpace The minimum projected length a step should result in
+ * @param {Boolean} onlyInteger
+ * @return {Object} All the values to set the bounds of the chart
+ */
+ Chartist.getBounds = function (axisLength, highLow, scaleMinSpace, onlyInteger) {
+ var i,
+ optimizationCounter = 0,
+ newMin,
+ newMax,
+ bounds = {
+ high: highLow.high,
+ low: highLow.low
+ };
+
+ bounds.valueRange = bounds.high - bounds.low;
+ bounds.oom = Chartist.orderOfMagnitude(bounds.valueRange);
+ bounds.step = Math.pow(10, bounds.oom);
+ bounds.min = Math.floor(bounds.low / bounds.step) * bounds.step;
+ bounds.max = Math.ceil(bounds.high / bounds.step) * bounds.step;
+ bounds.range = bounds.max - bounds.min;
+ bounds.numberOfSteps = Math.round(bounds.range / bounds.step);
+
+ // Optimize scale step by checking if subdivision is possible based on horizontalGridMinSpace
+ // If we are already below the scaleMinSpace value we will scale up
+ var length = Chartist.projectLength(axisLength, bounds.step, bounds);
+ var scaleUp = length < scaleMinSpace;
+ var smallestFactor = onlyInteger ? Chartist.rho(bounds.range) : 0;
+
+ // First check if we should only use integer steps and if step 1 is still larger than scaleMinSpace so we can use 1
+ if(onlyInteger && Chartist.projectLength(axisLength, 1, bounds) >= scaleMinSpace) {
+ bounds.step = 1;
+ } else if(onlyInteger && smallestFactor < bounds.step && Chartist.projectLength(axisLength, smallestFactor, bounds) >= scaleMinSpace) {
+ // If step 1 was too small, we can try the smallest factor of range
+ // If the smallest factor is smaller than the current bounds.step and the projected length of smallest factor
+ // is larger than the scaleMinSpace we should go for it.
+ bounds.step = smallestFactor;
+ } else {
+ // Trying to divide or multiply by 2 and find the best step value
+ while (true) {
+ if (scaleUp && Chartist.projectLength(axisLength, bounds.step, bounds) <= scaleMinSpace) {
+ bounds.step *= 2;
+ } else if (!scaleUp && Chartist.projectLength(axisLength, bounds.step / 2, bounds) >= scaleMinSpace) {
+ bounds.step /= 2;
+ if(onlyInteger && bounds.step % 1 !== 0) {
+ bounds.step *= 2;
+ break;
+ }
+ } else {
+ break;
+ }
+
+ if(optimizationCounter++ > 1000) {
+ throw new Error('Exceeded maximum number of iterations while optimizing scale step!');
+ }
+ }
+ }
+
+ // Narrow min and max based on new step
+ newMin = bounds.min;
+ newMax = bounds.max;
+ while(newMin + bounds.step <= bounds.low) {
+ newMin += bounds.step;
+ }
+ while(newMax - bounds.step >= bounds.high) {
+ newMax -= bounds.step;
+ }
+ bounds.min = newMin;
+ bounds.max = newMax;
+ bounds.range = bounds.max - bounds.min;
+
+ bounds.values = [];
+ for (i = bounds.min; i <= bounds.max; i += bounds.step) {
+ bounds.values.push(Chartist.roundWithPrecision(i));
+ }
+
+ return bounds;
+ };
+
+ /**
+ * Calculate cartesian coordinates of polar coordinates
+ *
+ * @memberof Chartist.Core
+ * @param {Number} centerX X-axis coordinates of center point of circle segment
+ * @param {Number} centerY X-axis coordinates of center point of circle segment
+ * @param {Number} radius Radius of circle segment
+ * @param {Number} angleInDegrees Angle of circle segment in degrees
+ * @return {{x:Number, y:Number}} Coordinates of point on circumference
+ */
+ Chartist.polarToCartesian = function (centerX, centerY, radius, angleInDegrees) {
+ var angleInRadians = (angleInDegrees - 90) * Math.PI / 180.0;
+
+ return {
+ x: centerX + (radius * Math.cos(angleInRadians)),
+ y: centerY + (radius * Math.sin(angleInRadians))
+ };
+ };
+
+ /**
+ * Initialize chart drawing rectangle (area where chart is drawn) x1,y1 = bottom left / x2,y2 = top right
+ *
+ * @memberof Chartist.Core
+ * @param {Object} svg The svg element for the chart
+ * @param {Object} options The Object that contains all the optional values for the chart
+ * @param {Number} [fallbackPadding] The fallback padding if partial padding objects are used
+ * @return {Object} The chart rectangles coordinates inside the svg element plus the rectangles measurements
+ */
+ Chartist.createChartRect = function (svg, options, fallbackPadding) {
+ var hasAxis = !!(options.axisX || options.axisY);
+ var yAxisOffset = hasAxis ? options.axisY.offset : 0;
+ var xAxisOffset = hasAxis ? options.axisX.offset : 0;
+ // If width or height results in invalid value (including 0) we fallback to the unitless settings or even 0
+ var width = svg.width() || Chartist.quantity(options.width).value || 0;
+ var height = svg.height() || Chartist.quantity(options.height).value || 0;
+ var normalizedPadding = Chartist.normalizePadding(options.chartPadding, fallbackPadding);
+
+ // If settings were to small to cope with offset (legacy) and padding, we'll adjust
+ width = Math.max(width, yAxisOffset + normalizedPadding.left + normalizedPadding.right);
+ height = Math.max(height, xAxisOffset + normalizedPadding.top + normalizedPadding.bottom);
+
+ var chartRect = {
+ padding: normalizedPadding,
+ width: function () {
+ return this.x2 - this.x1;
+ },
+ height: function () {
+ return this.y1 - this.y2;
+ }
+ };
+
+ if(hasAxis) {
+ if (options.axisX.position === 'start') {
+ chartRect.y2 = normalizedPadding.top + xAxisOffset;
+ chartRect.y1 = Math.max(height - normalizedPadding.bottom, chartRect.y2 + 1);
+ } else {
+ chartRect.y2 = normalizedPadding.top;
+ chartRect.y1 = Math.max(height - normalizedPadding.bottom - xAxisOffset, chartRect.y2 + 1);
+ }
+
+ if (options.axisY.position === 'start') {
+ chartRect.x1 = normalizedPadding.left + yAxisOffset;
+ chartRect.x2 = Math.max(width - normalizedPadding.right, chartRect.x1 + 1);
+ } else {
+ chartRect.x1 = normalizedPadding.left;
+ chartRect.x2 = Math.max(width - normalizedPadding.right - yAxisOffset, chartRect.x1 + 1);
+ }
+ } else {
+ chartRect.x1 = normalizedPadding.left;
+ chartRect.x2 = Math.max(width - normalizedPadding.right, chartRect.x1 + 1);
+ chartRect.y2 = normalizedPadding.top;
+ chartRect.y1 = Math.max(height - normalizedPadding.bottom, chartRect.y2 + 1);
+ }
+
+ return chartRect;
+ };
+
+ /**
+ * Creates a grid line based on a projected value.
+ *
+ * @memberof Chartist.Core
+ * @param position
+ * @param index
+ * @param axis
+ * @param offset
+ * @param length
+ * @param group
+ * @param classes
+ * @param eventEmitter
+ */
+ Chartist.createGrid = function(position, index, axis, offset, length, group, classes, eventEmitter) {
+ var positionalData = {};
+ positionalData[axis.units.pos + '1'] = position;
+ positionalData[axis.units.pos + '2'] = position;
+ positionalData[axis.counterUnits.pos + '1'] = offset;
+ positionalData[axis.counterUnits.pos + '2'] = offset + length;
+
+ var gridElement = group.elem('line', positionalData, classes.join(' '));
+
+ // Event for grid draw
+ eventEmitter.emit('draw',
+ Chartist.extend({
+ type: 'grid',
+ axis: axis,
+ index: index,
+ group: group,
+ element: gridElement
+ }, positionalData)
+ );
+ };
+
+ /**
+ * Creates a label based on a projected value and an axis.
+ *
+ * @memberof Chartist.Core
+ * @param position
+ * @param length
+ * @param index
+ * @param labels
+ * @param axis
+ * @param axisOffset
+ * @param labelOffset
+ * @param group
+ * @param classes
+ * @param useForeignObject
+ * @param eventEmitter
+ */
+ Chartist.createLabel = function(position, length, index, labels, axis, axisOffset, labelOffset, group, classes, useForeignObject, eventEmitter) {
+ var labelElement;
+ var positionalData = {};
+
+ positionalData[axis.units.pos] = position + labelOffset[axis.units.pos];
+ positionalData[axis.counterUnits.pos] = labelOffset[axis.counterUnits.pos];
+ positionalData[axis.units.len] = length;
+ positionalData[axis.counterUnits.len] = axisOffset - 10;
+
+ if(useForeignObject) {
+ // We need to set width and height explicitly to px as span will not expand with width and height being
+ // 100% in all browsers
+ var content = '' +
+ labels[index] + ' ';
+
+ labelElement = group.foreignObject(content, Chartist.extend({
+ style: 'overflow: visible;'
+ }, positionalData));
+ } else {
+ labelElement = group.elem('text', positionalData, classes.join(' ')).text(labels[index]);
+ }
+
+ eventEmitter.emit('draw', Chartist.extend({
+ type: 'label',
+ axis: axis,
+ index: index,
+ group: group,
+ element: labelElement,
+ text: labels[index]
+ }, positionalData));
+ };
+
+ /**
+ * Helper to read series specific options from options object. It automatically falls back to the global option if
+ * there is no option in the series options.
+ *
+ * @param {Object} series Series object
+ * @param {Object} options Chartist options object
+ * @param {string} key The options key that should be used to obtain the options
+ * @returns {*}
+ */
+ Chartist.getSeriesOption = function(series, options, key) {
+ if(series.name && options.series && options.series[series.name]) {
+ var seriesOptions = options.series[series.name];
+ return seriesOptions.hasOwnProperty(key) ? seriesOptions[key] : options[key];
+ } else {
+ return options[key];
+ }
+ };
+
+ /**
+ * Provides options handling functionality with callback for options changes triggered by responsive options and media query matches
+ *
+ * @memberof Chartist.Core
+ * @param {Object} options Options set by user
+ * @param {Array} responsiveOptions Optional functions to add responsive behavior to chart
+ * @param {Object} eventEmitter The event emitter that will be used to emit the options changed events
+ * @return {Object} The consolidated options object from the defaults, base and matching responsive options
+ */
+ Chartist.optionsProvider = function (options, responsiveOptions, eventEmitter) {
+ var baseOptions = Chartist.extend({}, options),
+ currentOptions,
+ mediaQueryListeners = [],
+ i;
+
+ function updateCurrentOptions(preventChangedEvent) {
+ var previousOptions = currentOptions;
+ currentOptions = Chartist.extend({}, baseOptions);
+
+ if (responsiveOptions) {
+ for (i = 0; i < responsiveOptions.length; i++) {
+ var mql = window.matchMedia(responsiveOptions[i][0]);
+ if (mql.matches) {
+ currentOptions = Chartist.extend(currentOptions, responsiveOptions[i][1]);
+ }
+ }
+ }
+
+ if(eventEmitter && !preventChangedEvent) {
+ eventEmitter.emit('optionsChanged', {
+ previousOptions: previousOptions,
+ currentOptions: currentOptions
+ });
+ }
+ }
+
+ function removeMediaQueryListeners() {
+ mediaQueryListeners.forEach(function(mql) {
+ mql.removeListener(updateCurrentOptions);
+ });
+ }
+
+ if (!window.matchMedia) {
+ throw 'window.matchMedia not found! Make sure you\'re using a polyfill.';
+ } else if (responsiveOptions) {
+
+ for (i = 0; i < responsiveOptions.length; i++) {
+ var mql = window.matchMedia(responsiveOptions[i][0]);
+ mql.addListener(updateCurrentOptions);
+ mediaQueryListeners.push(mql);
+ }
+ }
+ // Execute initially so we get the correct options
+ updateCurrentOptions(true);
+
+ return {
+ removeMediaQueryListeners: removeMediaQueryListeners,
+ getCurrentOptions: function getCurrentOptions() {
+ return Chartist.extend({}, currentOptions);
+ }
+ };
+ };
+
+ }(window, document, Chartist));
+ ;/**
+ * Chartist path interpolation functions.
+ *
+ * @module Chartist.Interpolation
+ */
+ /* global Chartist */
+ (function(window, document, Chartist) {
+ 'use strict';
+
+ Chartist.Interpolation = {};
+
+ /**
+ * This interpolation function does not smooth the path and the result is only containing lines and no curves.
+ *
+ * @example
+ * var chart = new Chartist.Line('.ct-chart', {
+ * labels: [1, 2, 3, 4, 5],
+ * series: [[1, 2, 8, 1, 7]]
+ * }, {
+ * lineSmooth: Chartist.Interpolation.none({
+ * fillHoles: false
+ * })
+ * });
+ *
+ *
+ * @memberof Chartist.Interpolation
+ * @return {Function}
+ */
+ Chartist.Interpolation.none = function(options) {
+ var defaultOptions = {
+ fillHoles: false
+ };
+ options = Chartist.extend({}, defaultOptions, options);
+ return function none(pathCoordinates, valueData) {
+ var path = new Chartist.Svg.Path();
+ var hole = true;
+
+ for(var i = 0; i < pathCoordinates.length; i += 2) {
+ var currX = pathCoordinates[i];
+ var currY = pathCoordinates[i + 1];
+ var currData = valueData[i / 2];
+
+ if(currData.value !== undefined) {
+
+ if(hole) {
+ path.move(currX, currY, false, currData);
+ } else {
+ path.line(currX, currY, false, currData);
+ }
+
+ hole = false;
+ } else if(!options.fillHoles) {
+ hole = true;
+ }
+ }
+
+ return path;
+ };
+ };
+
+ /**
+ * Simple smoothing creates horizontal handles that are positioned with a fraction of the length between two data points. You can use the divisor option to specify the amount of smoothing.
+ *
+ * Simple smoothing can be used instead of `Chartist.Smoothing.cardinal` if you'd like to get rid of the artifacts it produces sometimes. Simple smoothing produces less flowing lines but is accurate by hitting the points and it also doesn't swing below or above the given data point.
+ *
+ * All smoothing functions within Chartist are factory functions that accept an options parameter. The simple interpolation function accepts one configuration parameter `divisor`, between 1 and ∞, which controls the smoothing characteristics.
+ *
+ * @example
+ * var chart = new Chartist.Line('.ct-chart', {
+ * labels: [1, 2, 3, 4, 5],
+ * series: [[1, 2, 8, 1, 7]]
+ * }, {
+ * lineSmooth: Chartist.Interpolation.simple({
+ * divisor: 2,
+ * fillHoles: false
+ * })
+ * });
+ *
+ *
+ * @memberof Chartist.Interpolation
+ * @param {Object} options The options of the simple interpolation factory function.
+ * @return {Function}
+ */
+ Chartist.Interpolation.simple = function(options) {
+ var defaultOptions = {
+ divisor: 2,
+ fillHoles: false
+ };
+ options = Chartist.extend({}, defaultOptions, options);
+
+ var d = 1 / Math.max(1, options.divisor);
+
+ return function simple(pathCoordinates, valueData) {
+ var path = new Chartist.Svg.Path();
+ var prevX, prevY, prevData;
+
+ for(var i = 0; i < pathCoordinates.length; i += 2) {
+ var currX = pathCoordinates[i];
+ var currY = pathCoordinates[i + 1];
+ var length = (currX - prevX) * d;
+ var currData = valueData[i / 2];
+
+ if(currData.value !== undefined) {
+
+ if(prevData === undefined) {
+ path.move(currX, currY, false, currData);
+ } else {
+ path.curve(
+ prevX + length,
+ prevY,
+ currX - length,
+ currY,
+ currX,
+ currY,
+ false,
+ currData
+ );
+ }
+
+ prevX = currX;
+ prevY = currY;
+ prevData = currData;
+ } else if(!options.fillHoles) {
+ prevX = currX = prevData = undefined;
+ }
+ }
+
+ return path;
+ };
+ };
+
+ /**
+ * Cardinal / Catmull-Rome spline interpolation is the default smoothing function in Chartist. It produces nice results where the splines will always meet the points. It produces some artifacts though when data values are increased or decreased rapidly. The line may not follow a very accurate path and if the line should be accurate this smoothing function does not produce the best results.
+ *
+ * Cardinal splines can only be created if there are more than two data points. If this is not the case this smoothing will fallback to `Chartist.Smoothing.none`.
+ *
+ * All smoothing functions within Chartist are factory functions that accept an options parameter. The cardinal interpolation function accepts one configuration parameter `tension`, between 0 and 1, which controls the smoothing intensity.
+ *
+ * @example
+ * var chart = new Chartist.Line('.ct-chart', {
+ * labels: [1, 2, 3, 4, 5],
+ * series: [[1, 2, 8, 1, 7]]
+ * }, {
+ * lineSmooth: Chartist.Interpolation.cardinal({
+ * tension: 1,
+ * fillHoles: false
+ * })
+ * });
+ *
+ * @memberof Chartist.Interpolation
+ * @param {Object} options The options of the cardinal factory function.
+ * @return {Function}
+ */
+ Chartist.Interpolation.cardinal = function(options) {
+ var defaultOptions = {
+ tension: 1,
+ fillHoles: false
+ };
+
+ options = Chartist.extend({}, defaultOptions, options);
+
+ var t = Math.min(1, Math.max(0, options.tension)),
+ c = 1 - t;
+
+ // This function will help us to split pathCoordinates and valueData into segments that also contain pathCoordinates
+ // and valueData. This way the existing functions can be reused and the segment paths can be joined afterwards.
+ // This functionality is necessary to treat "holes" in the line charts
+ function splitIntoSegments(pathCoordinates, valueData) {
+ var segments = [];
+ var hole = true;
+
+ for(var i = 0; i < pathCoordinates.length; i += 2) {
+ // If this value is a "hole" we set the hole flag
+ if(valueData[i / 2].value === undefined) {
+ if(!options.fillHoles) {
+ hole = true;
+ }
+ } else {
+ // If it's a valid value we need to check if we're coming out of a hole and create a new empty segment
+ if(hole) {
+ segments.push({
+ pathCoordinates: [],
+ valueData: []
+ });
+ // As we have a valid value now, we are not in a "hole" anymore
+ hole = false;
+ }
+
+ // Add to the segment pathCoordinates and valueData
+ segments[segments.length - 1].pathCoordinates.push(pathCoordinates[i], pathCoordinates[i + 1]);
+ segments[segments.length - 1].valueData.push(valueData[i / 2]);
+ }
+ }
+
+ return segments;
+ }
+
+ return function cardinal(pathCoordinates, valueData) {
+ // First we try to split the coordinates into segments
+ // This is necessary to treat "holes" in line charts
+ var segments = splitIntoSegments(pathCoordinates, valueData);
+
+ // If the split resulted in more that one segment we need to interpolate each segment individually and join them
+ // afterwards together into a single path.
+ if(segments.length > 1) {
+ var paths = [];
+ // For each segment we will recurse the cardinal function
+ segments.forEach(function(segment) {
+ paths.push(cardinal(segment.pathCoordinates, segment.valueData));
+ });
+ // Join the segment path data into a single path and return
+ return Chartist.Svg.Path.join(paths);
+ } else {
+ // If there was only one segment we can proceed regularly by using pathCoordinates and valueData from the first
+ // segment
+ pathCoordinates = segments[0].pathCoordinates;
+ valueData = segments[0].valueData;
+
+ // If less than two points we need to fallback to no smoothing
+ if(pathCoordinates.length <= 4) {
+ return Chartist.Interpolation.none()(pathCoordinates, valueData);
+ }
+
+ var path = new Chartist.Svg.Path().move(pathCoordinates[0], pathCoordinates[1], false, valueData[0]),
+ z;
+
+ for (var i = 0, iLen = pathCoordinates.length; iLen - 2 * !z > i; i += 2) {
+ var p = [
+ {x: +pathCoordinates[i - 2], y: +pathCoordinates[i - 1]},
+ {x: +pathCoordinates[i], y: +pathCoordinates[i + 1]},
+ {x: +pathCoordinates[i + 2], y: +pathCoordinates[i + 3]},
+ {x: +pathCoordinates[i + 4], y: +pathCoordinates[i + 5]}
+ ];
+ if (z) {
+ if (!i) {
+ p[0] = {x: +pathCoordinates[iLen - 2], y: +pathCoordinates[iLen - 1]};
+ } else if (iLen - 4 === i) {
+ p[3] = {x: +pathCoordinates[0], y: +pathCoordinates[1]};
+ } else if (iLen - 2 === i) {
+ p[2] = {x: +pathCoordinates[0], y: +pathCoordinates[1]};
+ p[3] = {x: +pathCoordinates[2], y: +pathCoordinates[3]};
+ }
+ } else {
+ if (iLen - 4 === i) {
+ p[3] = p[2];
+ } else if (!i) {
+ p[0] = {x: +pathCoordinates[i], y: +pathCoordinates[i + 1]};
+ }
+ }
+
+ path.curve(
+ (t * (-p[0].x + 6 * p[1].x + p[2].x) / 6) + (c * p[2].x),
+ (t * (-p[0].y + 6 * p[1].y + p[2].y) / 6) + (c * p[2].y),
+ (t * (p[1].x + 6 * p[2].x - p[3].x) / 6) + (c * p[2].x),
+ (t * (p[1].y + 6 * p[2].y - p[3].y) / 6) + (c * p[2].y),
+ p[2].x,
+ p[2].y,
+ false,
+ valueData[(i + 2) / 2]
+ );
+ }
+
+ return path;
+ }
+ };
+ };
+
+ /**
+ * Step interpolation will cause the line chart to move in steps rather than diagonal or smoothed lines. This interpolation will create additional points that will also be drawn when the `showPoint` option is enabled.
+ *
+ * All smoothing functions within Chartist are factory functions that accept an options parameter. The step interpolation function accepts one configuration parameter `postpone`, that can be `true` or `false`. The default value is `true` and will cause the step to occur where the value actually changes. If a different behaviour is needed where the step is shifted to the left and happens before the actual value, this option can be set to `false`.
+ *
+ * @example
+ * var chart = new Chartist.Line('.ct-chart', {
+ * labels: [1, 2, 3, 4, 5],
+ * series: [[1, 2, 8, 1, 7]]
+ * }, {
+ * lineSmooth: Chartist.Interpolation.step({
+ * postpone: true,
+ * fillHoles: false
+ * })
+ * });
+ *
+ * @memberof Chartist.Interpolation
+ * @param options
+ * @returns {Function}
+ */
+ Chartist.Interpolation.step = function(options) {
+ var defaultOptions = {
+ postpone: true,
+ fillHoles: false
+ };
+
+ options = Chartist.extend({}, defaultOptions, options);
+
+ return function step(pathCoordinates, valueData) {
+ var path = new Chartist.Svg.Path();
+
+ var prevX, prevY, prevData;
+
+ for (var i = 0; i < pathCoordinates.length; i += 2) {
+ var currX = pathCoordinates[i];
+ var currY = pathCoordinates[i + 1];
+ var currData = valueData[i / 2];
+
+ // If the current point is also not a hole we can draw the step lines
+ if(currData.value !== undefined) {
+ if(prevData === undefined) {
+ path.move(currX, currY, false, currData);
+ } else {
+ if(options.postpone) {
+ // If postponed we should draw the step line with the value of the previous value
+ path.line(currX, prevY, false, prevData);
+ } else {
+ // If not postponed we should draw the step line with the value of the current value
+ path.line(prevX, currY, false, currData);
+ }
+ // Line to the actual point (this should only be a Y-Axis movement
+ path.line(currX, currY, false, currData);
+ }
+
+ prevX = currX;
+ prevY = currY;
+ prevData = currData;
+ } else if(!options.fillHoles) {
+ prevX = prevY = prevData = undefined;
+ }
+ }
+
+ return path;
+ };
+ };
+
+ }(window, document, Chartist));
+ ;/**
+ * A very basic event module that helps to generate and catch events.
+ *
+ * @module Chartist.Event
+ */
+ /* global Chartist */
+ (function (window, document, Chartist) {
+ 'use strict';
+
+ Chartist.EventEmitter = function () {
+ var handlers = [];
+
+ /**
+ * Add an event handler for a specific event
+ *
+ * @memberof Chartist.Event
+ * @param {String} event The event name
+ * @param {Function} handler A event handler function
+ */
+ function addEventHandler(event, handler) {
+ handlers[event] = handlers[event] || [];
+ handlers[event].push(handler);
+ }
+
+ /**
+ * Remove an event handler of a specific event name or remove all event handlers for a specific event.
+ *
+ * @memberof Chartist.Event
+ * @param {String} event The event name where a specific or all handlers should be removed
+ * @param {Function} [handler] An optional event handler function. If specified only this specific handler will be removed and otherwise all handlers are removed.
+ */
+ function removeEventHandler(event, handler) {
+ // Only do something if there are event handlers with this name existing
+ if(handlers[event]) {
+ // If handler is set we will look for a specific handler and only remove this
+ if(handler) {
+ handlers[event].splice(handlers[event].indexOf(handler), 1);
+ if(handlers[event].length === 0) {
+ delete handlers[event];
+ }
+ } else {
+ // If no handler is specified we remove all handlers for this event
+ delete handlers[event];
+ }
+ }
+ }
+
+ /**
+ * Use this function to emit an event. All handlers that are listening for this event will be triggered with the data parameter.
+ *
+ * @memberof Chartist.Event
+ * @param {String} event The event name that should be triggered
+ * @param {*} data Arbitrary data that will be passed to the event handler callback functions
+ */
+ function emit(event, data) {
+ // Only do something if there are event handlers with this name existing
+ if(handlers[event]) {
+ handlers[event].forEach(function(handler) {
+ handler(data);
+ });
+ }
+
+ // Emit event to star event handlers
+ if(handlers['*']) {
+ handlers['*'].forEach(function(starHandler) {
+ starHandler(event, data);
+ });
+ }
+ }
+
+ return {
+ addEventHandler: addEventHandler,
+ removeEventHandler: removeEventHandler,
+ emit: emit
+ };
+ };
+
+ }(window, document, Chartist));
+ ;/**
+ * This module provides some basic prototype inheritance utilities.
+ *
+ * @module Chartist.Class
+ */
+ /* global Chartist */
+ (function(window, document, Chartist) {
+ 'use strict';
+
+ function listToArray(list) {
+ var arr = [];
+ if (list.length) {
+ for (var i = 0; i < list.length; i++) {
+ arr.push(list[i]);
+ }
+ }
+ return arr;
+ }
+
+ /**
+ * Method to extend from current prototype.
+ *
+ * @memberof Chartist.Class
+ * @param {Object} properties The object that serves as definition for the prototype that gets created for the new class. This object should always contain a constructor property that is the desired constructor for the newly created class.
+ * @param {Object} [superProtoOverride] By default extens will use the current class prototype or Chartist.class. With this parameter you can specify any super prototype that will be used.
+ * @return {Function} Constructor function of the new class
+ *
+ * @example
+ * var Fruit = Class.extend({
+ * color: undefined,
+ * sugar: undefined,
+ *
+ * constructor: function(color, sugar) {
+ * this.color = color;
+ * this.sugar = sugar;
+ * },
+ *
+ * eat: function() {
+ * this.sugar = 0;
+ * return this;
+ * }
+ * });
+ *
+ * var Banana = Fruit.extend({
+ * length: undefined,
+ *
+ * constructor: function(length, sugar) {
+ * Banana.super.constructor.call(this, 'Yellow', sugar);
+ * this.length = length;
+ * }
+ * });
+ *
+ * var banana = new Banana(20, 40);
+ * console.log('banana instanceof Fruit', banana instanceof Fruit);
+ * console.log('Fruit is prototype of banana', Fruit.prototype.isPrototypeOf(banana));
+ * console.log('bananas prototype is Fruit', Object.getPrototypeOf(banana) === Fruit.prototype);
+ * console.log(banana.sugar);
+ * console.log(banana.eat().sugar);
+ * console.log(banana.color);
+ */
+ function extend(properties, superProtoOverride) {
+ var superProto = superProtoOverride || this.prototype || Chartist.Class;
+ var proto = Object.create(superProto);
+
+ Chartist.Class.cloneDefinitions(proto, properties);
+
+ var constr = function() {
+ var fn = proto.constructor || function () {},
+ instance;
+
+ // If this is linked to the Chartist namespace the constructor was not called with new
+ // To provide a fallback we will instantiate here and return the instance
+ instance = this === Chartist ? Object.create(proto) : this;
+ fn.apply(instance, Array.prototype.slice.call(arguments, 0));
+
+ // If this constructor was not called with new we need to return the instance
+ // This will not harm when the constructor has been called with new as the returned value is ignored
+ return instance;
+ };
+
+ constr.prototype = proto;
+ constr.super = superProto;
+ constr.extend = this.extend;
+
+ return constr;
+ }
+
+ // Variable argument list clones args > 0 into args[0] and retruns modified args[0]
+ function cloneDefinitions() {
+ var args = listToArray(arguments);
+ var target = args[0];
+
+ args.splice(1, args.length - 1).forEach(function (source) {
+ Object.getOwnPropertyNames(source).forEach(function (propName) {
+ // If this property already exist in target we delete it first
+ delete target[propName];
+ // Define the property with the descriptor from source
+ Object.defineProperty(target, propName,
+ Object.getOwnPropertyDescriptor(source, propName));
+ });
+ });
+
+ return target;
+ }
+
+ Chartist.Class = {
+ extend: extend,
+ cloneDefinitions: cloneDefinitions
+ };
+
+ }(window, document, Chartist));
+ ;/**
+ * Base for all chart types. The methods in Chartist.Base are inherited to all chart types.
+ *
+ * @module Chartist.Base
+ */
+ /* global Chartist */
+ (function(window, document, Chartist) {
+ 'use strict';
+
+ // TODO: Currently we need to re-draw the chart on window resize. This is usually very bad and will affect performance.
+ // This is done because we can't work with relative coordinates when drawing the chart because SVG Path does not
+ // work with relative positions yet. We need to check if we can do a viewBox hack to switch to percentage.
+ // See http://mozilla.6506.n7.nabble.com/Specyfing-paths-with-percentages-unit-td247474.html
+ // Update: can be done using the above method tested here: http://codepen.io/gionkunz/pen/KDvLj
+ // The problem is with the label offsets that can't be converted into percentage and affecting the chart container
+ /**
+ * Updates the chart which currently does a full reconstruction of the SVG DOM
+ *
+ * @param {Object} [data] Optional data you'd like to set for the chart before it will update. If not specified the update method will use the data that is already configured with the chart.
+ * @param {Object} [options] Optional options you'd like to add to the previous options for the chart before it will update. If not specified the update method will use the options that have been already configured with the chart.
+ * @param {Boolean} [override] If set to true, the passed options will be used to extend the options that have been configured already. Otherwise the chart default options will be used as the base
+ * @memberof Chartist.Base
+ */
+ function update(data, options, override) {
+ if(data) {
+ this.data = data;
+ // Event for data transformation that allows to manipulate the data before it gets rendered in the charts
+ this.eventEmitter.emit('data', {
+ type: 'update',
+ data: this.data
+ });
+ }
+
+ if(options) {
+ this.options = Chartist.extend({}, override ? this.options : this.defaultOptions, options);
+
+ // If chartist was not initialized yet, we just set the options and leave the rest to the initialization
+ // Otherwise we re-create the optionsProvider at this point
+ if(!this.initializeTimeoutId) {
+ this.optionsProvider.removeMediaQueryListeners();
+ this.optionsProvider = Chartist.optionsProvider(this.options, this.responsiveOptions, this.eventEmitter);
+ }
+ }
+
+ // Only re-created the chart if it has been initialized yet
+ if(!this.initializeTimeoutId) {
+ this.createChart(this.optionsProvider.getCurrentOptions());
+ }
+
+ // Return a reference to the chart object to chain up calls
+ return this;
+ }
+
+ /**
+ * This method can be called on the API object of each chart and will un-register all event listeners that were added to other components. This currently includes a window.resize listener as well as media query listeners if any responsive options have been provided. Use this function if you need to destroy and recreate Chartist charts dynamically.
+ *
+ * @memberof Chartist.Base
+ */
+ function detach() {
+ // Only detach if initialization already occurred on this chart. If this chart still hasn't initialized (therefore
+ // the initializationTimeoutId is still a valid timeout reference, we will clear the timeout
+ if(!this.initializeTimeoutId) {
+ window.removeEventListener('resize', this.resizeListener);
+ this.optionsProvider.removeMediaQueryListeners();
+ } else {
+ window.clearTimeout(this.initializeTimeoutId);
+ }
+
+ return this;
+ }
+
+ /**
+ * Use this function to register event handlers. The handler callbacks are synchronous and will run in the main thread rather than the event loop.
+ *
+ * @memberof Chartist.Base
+ * @param {String} event Name of the event. Check the examples for supported events.
+ * @param {Function} handler The handler function that will be called when an event with the given name was emitted. This function will receive a data argument which contains event data. See the example for more details.
+ */
+ function on(event, handler) {
+ this.eventEmitter.addEventHandler(event, handler);
+ return this;
+ }
+
+ /**
+ * Use this function to un-register event handlers. If the handler function parameter is omitted all handlers for the given event will be un-registered.
+ *
+ * @memberof Chartist.Base
+ * @param {String} event Name of the event for which a handler should be removed
+ * @param {Function} [handler] The handler function that that was previously used to register a new event handler. This handler will be removed from the event handler list. If this parameter is omitted then all event handlers for the given event are removed from the list.
+ */
+ function off(event, handler) {
+ this.eventEmitter.removeEventHandler(event, handler);
+ return this;
+ }
+
+ function initialize() {
+ // Add window resize listener that re-creates the chart
+ window.addEventListener('resize', this.resizeListener);
+
+ // Obtain current options based on matching media queries (if responsive options are given)
+ // This will also register a listener that is re-creating the chart based on media changes
+ this.optionsProvider = Chartist.optionsProvider(this.options, this.responsiveOptions, this.eventEmitter);
+ // Register options change listener that will trigger a chart update
+ this.eventEmitter.addEventHandler('optionsChanged', function() {
+ this.update();
+ }.bind(this));
+
+ // Before the first chart creation we need to register us with all plugins that are configured
+ // Initialize all relevant plugins with our chart object and the plugin options specified in the config
+ if(this.options.plugins) {
+ this.options.plugins.forEach(function(plugin) {
+ if(plugin instanceof Array) {
+ plugin[0](this, plugin[1]);
+ } else {
+ plugin(this);
+ }
+ }.bind(this));
+ }
+
+ // Event for data transformation that allows to manipulate the data before it gets rendered in the charts
+ this.eventEmitter.emit('data', {
+ type: 'initial',
+ data: this.data
+ });
+
+ // Create the first chart
+ this.createChart(this.optionsProvider.getCurrentOptions());
+
+ // As chart is initialized from the event loop now we can reset our timeout reference
+ // This is important if the chart gets initialized on the same element twice
+ this.initializeTimeoutId = undefined;
+ }
+
+ /**
+ * Constructor of chart base class.
+ *
+ * @param query
+ * @param data
+ * @param defaultOptions
+ * @param options
+ * @param responsiveOptions
+ * @constructor
+ */
+ function Base(query, data, defaultOptions, options, responsiveOptions) {
+ this.container = Chartist.querySelector(query);
+ this.data = data;
+ this.defaultOptions = defaultOptions;
+ this.options = options;
+ this.responsiveOptions = responsiveOptions;
+ this.eventEmitter = Chartist.EventEmitter();
+ this.supportsForeignObject = Chartist.Svg.isSupported('Extensibility');
+ this.supportsAnimations = Chartist.Svg.isSupported('AnimationEventsAttribute');
+ this.resizeListener = function resizeListener(){
+ this.update();
+ }.bind(this);
+
+ if(this.container) {
+ // If chartist was already initialized in this container we are detaching all event listeners first
+ if(this.container.__chartist__) {
+ this.container.__chartist__.detach();
+ }
+
+ this.container.__chartist__ = this;
+ }
+
+ // Using event loop for first draw to make it possible to register event listeners in the same call stack where
+ // the chart was created.
+ this.initializeTimeoutId = setTimeout(initialize.bind(this), 0);
+ }
+
+ // Creating the chart base class
+ Chartist.Base = Chartist.Class.extend({
+ constructor: Base,
+ optionsProvider: undefined,
+ container: undefined,
+ svg: undefined,
+ eventEmitter: undefined,
+ createChart: function() {
+ throw new Error('Base chart type can\'t be instantiated!');
+ },
+ update: update,
+ detach: detach,
+ on: on,
+ off: off,
+ version: Chartist.version,
+ supportsForeignObject: false
+ });
+
+ }(window, document, Chartist));
+ ;/**
+ * Chartist SVG module for simple SVG DOM abstraction
+ *
+ * @module Chartist.Svg
+ */
+ /* global Chartist */
+ (function(window, document, Chartist) {
+ 'use strict';
+
+ var svgNs = 'http://www.w3.org/2000/svg',
+ xmlNs = 'http://www.w3.org/2000/xmlns/',
+ xhtmlNs = 'http://www.w3.org/1999/xhtml';
+
+ Chartist.xmlNs = {
+ qualifiedName: 'xmlns:ct',
+ prefix: 'ct',
+ uri: 'http://gionkunz.github.com/chartist-js/ct'
+ };
+
+ /**
+ * Chartist.Svg creates a new SVG object wrapper with a starting element. You can use the wrapper to fluently create sub-elements and modify them.
+ *
+ * @memberof Chartist.Svg
+ * @constructor
+ * @param {String|Element} name The name of the SVG element to create or an SVG dom element which should be wrapped into Chartist.Svg
+ * @param {Object} attributes An object with properties that will be added as attributes to the SVG element that is created. Attributes with undefined values will not be added.
+ * @param {String} className This class or class list will be added to the SVG element
+ * @param {Object} parent The parent SVG wrapper object where this newly created wrapper and it's element will be attached to as child
+ * @param {Boolean} insertFirst If this param is set to true in conjunction with a parent element the newly created element will be added as first child element in the parent element
+ */
+ function Svg(name, attributes, className, parent, insertFirst) {
+ // If Svg is getting called with an SVG element we just return the wrapper
+ if(name instanceof Element) {
+ this._node = name;
+ } else {
+ this._node = document.createElementNS(svgNs, name);
+
+ // If this is an SVG element created then custom namespace
+ if(name === 'svg') {
+ this._node.setAttributeNS(xmlNs, Chartist.xmlNs.qualifiedName, Chartist.xmlNs.uri);
+ }
+ }
+
+ if(attributes) {
+ this.attr(attributes);
+ }
+
+ if(className) {
+ this.addClass(className);
+ }
+
+ if(parent) {
+ if (insertFirst && parent._node.firstChild) {
+ parent._node.insertBefore(this._node, parent._node.firstChild);
+ } else {
+ parent._node.appendChild(this._node);
+ }
+ }
+ }
+
+ /**
+ * Set attributes on the current SVG element of the wrapper you're currently working on.
+ *
+ * @memberof Chartist.Svg
+ * @param {Object|String} attributes An object with properties that will be added as attributes to the SVG element that is created. Attributes with undefined values will not be added. If this parameter is a String then the function is used as a getter and will return the attribute value.
+ * @param {String} ns If specified, the attributes will be set as namespace attributes with ns as prefix.
+ * @return {Object|String} The current wrapper object will be returned so it can be used for chaining or the attribute value if used as getter function.
+ */
+ function attr(attributes, ns) {
+ if(typeof attributes === 'string') {
+ if(ns) {
+ return this._node.getAttributeNS(ns, attributes);
+ } else {
+ return this._node.getAttribute(attributes);
+ }
+ }
+
+ Object.keys(attributes).forEach(function(key) {
+ // If the attribute value is undefined we can skip this one
+ if(attributes[key] === undefined) {
+ return;
+ }
+
+ if(ns) {
+ this._node.setAttributeNS(ns, [Chartist.xmlNs.prefix, ':', key].join(''), attributes[key]);
+ } else {
+ this._node.setAttribute(key, attributes[key]);
+ }
+ }.bind(this));
+
+ return this;
+ }
+
+ /**
+ * Create a new SVG element whose wrapper object will be selected for further operations. This way you can also create nested groups easily.
+ *
+ * @memberof Chartist.Svg
+ * @param {String} name The name of the SVG element that should be created as child element of the currently selected element wrapper
+ * @param {Object} [attributes] An object with properties that will be added as attributes to the SVG element that is created. Attributes with undefined values will not be added.
+ * @param {String} [className] This class or class list will be added to the SVG element
+ * @param {Boolean} [insertFirst] If this param is set to true in conjunction with a parent element the newly created element will be added as first child element in the parent element
+ * @return {Chartist.Svg} Returns a Chartist.Svg wrapper object that can be used to modify the containing SVG data
+ */
+ function elem(name, attributes, className, insertFirst) {
+ return new Chartist.Svg(name, attributes, className, this, insertFirst);
+ }
+
+ /**
+ * Returns the parent Chartist.SVG wrapper object
+ *
+ * @memberof Chartist.Svg
+ * @return {Chartist.Svg} Returns a Chartist.Svg wrapper around the parent node of the current node. If the parent node is not existing or it's not an SVG node then this function will return null.
+ */
+ function parent() {
+ return this._node.parentNode instanceof SVGElement ? new Chartist.Svg(this._node.parentNode) : null;
+ }
+
+ /**
+ * This method returns a Chartist.Svg wrapper around the root SVG element of the current tree.
+ *
+ * @memberof Chartist.Svg
+ * @return {Chartist.Svg} The root SVG element wrapped in a Chartist.Svg element
+ */
+ function root() {
+ var node = this._node;
+ while(node.nodeName !== 'svg') {
+ node = node.parentNode;
+ }
+ return new Chartist.Svg(node);
+ }
+
+ /**
+ * Find the first child SVG element of the current element that matches a CSS selector. The returned object is a Chartist.Svg wrapper.
+ *
+ * @memberof Chartist.Svg
+ * @param {String} selector A CSS selector that is used to query for child SVG elements
+ * @return {Chartist.Svg} The SVG wrapper for the element found or null if no element was found
+ */
+ function querySelector(selector) {
+ var foundNode = this._node.querySelector(selector);
+ return foundNode ? new Chartist.Svg(foundNode) : null;
+ }
+
+ /**
+ * Find the all child SVG elements of the current element that match a CSS selector. The returned object is a Chartist.Svg.List wrapper.
+ *
+ * @memberof Chartist.Svg
+ * @param {String} selector A CSS selector that is used to query for child SVG elements
+ * @return {Chartist.Svg.List} The SVG wrapper list for the element found or null if no element was found
+ */
+ function querySelectorAll(selector) {
+ var foundNodes = this._node.querySelectorAll(selector);
+ return foundNodes.length ? new Chartist.Svg.List(foundNodes) : null;
+ }
+
+ /**
+ * This method creates a foreignObject (see https://developer.mozilla.org/en-US/docs/Web/SVG/Element/foreignObject) that allows to embed HTML content into a SVG graphic. With the help of foreignObjects you can enable the usage of regular HTML elements inside of SVG where they are subject for SVG positioning and transformation but the Browser will use the HTML rendering capabilities for the containing DOM.
+ *
+ * @memberof Chartist.Svg
+ * @param {Node|String} content The DOM Node, or HTML string that will be converted to a DOM Node, that is then placed into and wrapped by the foreignObject
+ * @param {String} [attributes] An object with properties that will be added as attributes to the foreignObject element that is created. Attributes with undefined values will not be added.
+ * @param {String} [className] This class or class list will be added to the SVG element
+ * @param {Boolean} [insertFirst] Specifies if the foreignObject should be inserted as first child
+ * @return {Chartist.Svg} New wrapper object that wraps the foreignObject element
+ */
+ function foreignObject(content, attributes, className, insertFirst) {
+ // If content is string then we convert it to DOM
+ // TODO: Handle case where content is not a string nor a DOM Node
+ if(typeof content === 'string') {
+ var container = document.createElement('div');
+ container.innerHTML = content;
+ content = container.firstChild;
+ }
+
+ // Adding namespace to content element
+ content.setAttribute('xmlns', xhtmlNs);
+
+ // Creating the foreignObject without required extension attribute (as described here
+ // http://www.w3.org/TR/SVG/extend.html#ForeignObjectElement)
+ var fnObj = this.elem('foreignObject', attributes, className, insertFirst);
+
+ // Add content to foreignObjectElement
+ fnObj._node.appendChild(content);
+
+ return fnObj;
+ }
+
+ /**
+ * This method adds a new text element to the current Chartist.Svg wrapper.
+ *
+ * @memberof Chartist.Svg
+ * @param {String} t The text that should be added to the text element that is created
+ * @return {Chartist.Svg} The same wrapper object that was used to add the newly created element
+ */
+ function text(t) {
+ this._node.appendChild(document.createTextNode(t));
+ return this;
+ }
+
+ /**
+ * This method will clear all child nodes of the current wrapper object.
+ *
+ * @memberof Chartist.Svg
+ * @return {Chartist.Svg} The same wrapper object that got emptied
+ */
+ function empty() {
+ while (this._node.firstChild) {
+ this._node.removeChild(this._node.firstChild);
+ }
+
+ return this;
+ }
+
+ /**
+ * This method will cause the current wrapper to remove itself from its parent wrapper. Use this method if you'd like to get rid of an element in a given DOM structure.
+ *
+ * @memberof Chartist.Svg
+ * @return {Chartist.Svg} The parent wrapper object of the element that got removed
+ */
+ function remove() {
+ this._node.parentNode.removeChild(this._node);
+ return this.parent();
+ }
+
+ /**
+ * This method will replace the element with a new element that can be created outside of the current DOM.
+ *
+ * @memberof Chartist.Svg
+ * @param {Chartist.Svg} newElement The new Chartist.Svg object that will be used to replace the current wrapper object
+ * @return {Chartist.Svg} The wrapper of the new element
+ */
+ function replace(newElement) {
+ this._node.parentNode.replaceChild(newElement._node, this._node);
+ return newElement;
+ }
+
+ /**
+ * This method will append an element to the current element as a child.
+ *
+ * @memberof Chartist.Svg
+ * @param {Chartist.Svg} element The Chartist.Svg element that should be added as a child
+ * @param {Boolean} [insertFirst] Specifies if the element should be inserted as first child
+ * @return {Chartist.Svg} The wrapper of the appended object
+ */
+ function append(element, insertFirst) {
+ if(insertFirst && this._node.firstChild) {
+ this._node.insertBefore(element._node, this._node.firstChild);
+ } else {
+ this._node.appendChild(element._node);
+ }
+
+ return this;
+ }
+
+ /**
+ * Returns an array of class names that are attached to the current wrapper element. This method can not be chained further.
+ *
+ * @memberof Chartist.Svg
+ * @return {Array} A list of classes or an empty array if there are no classes on the current element
+ */
+ function classes() {
+ return this._node.getAttribute('class') ? this._node.getAttribute('class').trim().split(/\s+/) : [];
+ }
+
+ /**
+ * Adds one or a space separated list of classes to the current element and ensures the classes are only existing once.
+ *
+ * @memberof Chartist.Svg
+ * @param {String} names A white space separated list of class names
+ * @return {Chartist.Svg} The wrapper of the current element
+ */
+ function addClass(names) {
+ this._node.setAttribute('class',
+ this.classes(this._node)
+ .concat(names.trim().split(/\s+/))
+ .filter(function(elem, pos, self) {
+ return self.indexOf(elem) === pos;
+ }).join(' ')
+ );
+
+ return this;
+ }
+
+ /**
+ * Removes one or a space separated list of classes from the current element.
+ *
+ * @memberof Chartist.Svg
+ * @param {String} names A white space separated list of class names
+ * @return {Chartist.Svg} The wrapper of the current element
+ */
+ function removeClass(names) {
+ var removedClasses = names.trim().split(/\s+/);
+
+ this._node.setAttribute('class', this.classes(this._node).filter(function(name) {
+ return removedClasses.indexOf(name) === -1;
+ }).join(' '));
+
+ return this;
+ }
+
+ /**
+ * Removes all classes from the current element.
+ *
+ * @memberof Chartist.Svg
+ * @return {Chartist.Svg} The wrapper of the current element
+ */
+ function removeAllClasses() {
+ this._node.setAttribute('class', '');
+
+ return this;
+ }
+
+ /**
+ * "Save" way to get property value from svg BoundingBox.
+ * This is a workaround. Firefox throws an NS_ERROR_FAILURE error if getBBox() is called on an invisible node.
+ * See [NS_ERROR_FAILURE: Component returned failure code: 0x80004005](http://jsfiddle.net/sym3tri/kWWDK/)
+ *
+ * @memberof Chartist.Svg
+ * @param {SVGElement} node The svg node to
+ * @param {String} prop The property to fetch (ex.: height, width, ...)
+ * @returns {Number} The value of the given bbox property
+ */
+ function getBBoxProperty(node, prop) {
+ try {
+ return node.getBBox()[prop];
+ } catch(e) {}
+
+ return 0;
+ }
+
+ /**
+ * Get element height with fallback to svg BoundingBox or parent container dimensions:
+ * See [bugzilla.mozilla.org](https://bugzilla.mozilla.org/show_bug.cgi?id=530985)
+ *
+ * @memberof Chartist.Svg
+ * @return {Number} The elements height in pixels
+ */
+ function height() {
+ return this._node.clientHeight || Math.round(getBBoxProperty(this._node, 'height')) || this._node.parentNode.clientHeight;
+ }
+
+ /**
+ * Get element width with fallback to svg BoundingBox or parent container dimensions:
+ * See [bugzilla.mozilla.org](https://bugzilla.mozilla.org/show_bug.cgi?id=530985)
+ *
+ * @memberof Chartist.Core
+ * @return {Number} The elements width in pixels
+ */
+ function width() {
+ return this._node.clientWidth || Math.round(getBBoxProperty(this._node, 'width')) || this._node.parentNode.clientWidth;
+ }
+
+ /**
+ * The animate function lets you animate the current element with SMIL animations. You can add animations for multiple attributes at the same time by using an animation definition object. This object should contain SMIL animation attributes. Please refer to http://www.w3.org/TR/SVG/animate.html for a detailed specification about the available animation attributes. Additionally an easing property can be passed in the animation definition object. This can be a string with a name of an easing function in `Chartist.Svg.Easing` or an array with four numbers specifying a cubic Bézier curve.
+ * **An animations object could look like this:**
+ * ```javascript
+ * element.animate({
+ * opacity: {
+ * dur: 1000,
+ * from: 0,
+ * to: 1
+ * },
+ * x1: {
+ * dur: '1000ms',
+ * from: 100,
+ * to: 200,
+ * easing: 'easeOutQuart'
+ * },
+ * y1: {
+ * dur: '2s',
+ * from: 0,
+ * to: 100
+ * }
+ * });
+ * ```
+ * **Automatic unit conversion**
+ * For the `dur` and the `begin` animate attribute you can also omit a unit by passing a number. The number will automatically be converted to milli seconds.
+ * **Guided mode**
+ * The default behavior of SMIL animations with offset using the `begin` attribute is that the attribute will keep it's original value until the animation starts. Mostly this behavior is not desired as you'd like to have your element attributes already initialized with the animation `from` value even before the animation starts. Also if you don't specify `fill="freeze"` on an animate element or if you delete the animation after it's done (which is done in guided mode) the attribute will switch back to the initial value. This behavior is also not desired when performing simple one-time animations. For one-time animations you'd want to trigger animations immediately instead of relative to the document begin time. That's why in guided mode Chartist.Svg will also use the `begin` property to schedule a timeout and manually start the animation after the timeout. If you're using multiple SMIL definition objects for an attribute (in an array), guided mode will be disabled for this attribute, even if you explicitly enabled it.
+ * If guided mode is enabled the following behavior is added:
+ * - Before the animation starts (even when delayed with `begin`) the animated attribute will be set already to the `from` value of the animation
+ * - `begin` is explicitly set to `indefinite` so it can be started manually without relying on document begin time (creation)
+ * - The animate element will be forced to use `fill="freeze"`
+ * - The animation will be triggered with `beginElement()` in a timeout where `begin` of the definition object is interpreted in milli seconds. If no `begin` was specified the timeout is triggered immediately.
+ * - After the animation the element attribute value will be set to the `to` value of the animation
+ * - The animate element is deleted from the DOM
+ *
+ * @memberof Chartist.Svg
+ * @param {Object} animations An animations object where the property keys are the attributes you'd like to animate. The properties should be objects again that contain the SMIL animation attributes (usually begin, dur, from, and to). The property begin and dur is auto converted (see Automatic unit conversion). You can also schedule multiple animations for the same attribute by passing an Array of SMIL definition objects. Attributes that contain an array of SMIL definition objects will not be executed in guided mode.
+ * @param {Boolean} guided Specify if guided mode should be activated for this animation (see Guided mode). If not otherwise specified, guided mode will be activated.
+ * @param {Object} eventEmitter If specified, this event emitter will be notified when an animation starts or ends.
+ * @return {Chartist.Svg} The current element where the animation was added
+ */
+ function animate(animations, guided, eventEmitter) {
+ if(guided === undefined) {
+ guided = true;
+ }
+
+ Object.keys(animations).forEach(function createAnimateForAttributes(attribute) {
+
+ function createAnimate(animationDefinition, guided) {
+ var attributeProperties = {},
+ animate,
+ timeout,
+ easing;
+
+ // Check if an easing is specified in the definition object and delete it from the object as it will not
+ // be part of the animate element attributes.
+ if(animationDefinition.easing) {
+ // If already an easing Bézier curve array we take it or we lookup a easing array in the Easing object
+ easing = animationDefinition.easing instanceof Array ?
+ animationDefinition.easing :
+ Chartist.Svg.Easing[animationDefinition.easing];
+ delete animationDefinition.easing;
+ }
+
+ // If numeric dur or begin was provided we assume milli seconds
+ animationDefinition.begin = Chartist.ensureUnit(animationDefinition.begin, 'ms');
+ animationDefinition.dur = Chartist.ensureUnit(animationDefinition.dur, 'ms');
+
+ if(easing) {
+ animationDefinition.calcMode = 'spline';
+ animationDefinition.keySplines = easing.join(' ');
+ animationDefinition.keyTimes = '0;1';
+ }
+
+ // Adding "fill: freeze" if we are in guided mode and set initial attribute values
+ if(guided) {
+ animationDefinition.fill = 'freeze';
+ // Animated property on our element should already be set to the animation from value in guided mode
+ attributeProperties[attribute] = animationDefinition.from;
+ this.attr(attributeProperties);
+
+ // In guided mode we also set begin to indefinite so we can trigger the start manually and put the begin
+ // which needs to be in ms aside
+ timeout = Chartist.quantity(animationDefinition.begin || 0).value;
+ animationDefinition.begin = 'indefinite';
+ }
+
+ animate = this.elem('animate', Chartist.extend({
+ attributeName: attribute
+ }, animationDefinition));
+
+ if(guided) {
+ // If guided we take the value that was put aside in timeout and trigger the animation manually with a timeout
+ setTimeout(function() {
+ // If beginElement fails we set the animated attribute to the end position and remove the animate element
+ // This happens if the SMIL ElementTimeControl interface is not supported or any other problems occured in
+ // the browser. (Currently FF 34 does not support animate elements in foreignObjects)
+ try {
+ animate._node.beginElement();
+ } catch(err) {
+ // Set animated attribute to current animated value
+ attributeProperties[attribute] = animationDefinition.to;
+ this.attr(attributeProperties);
+ // Remove the animate element as it's no longer required
+ animate.remove();
+ }
+ }.bind(this), timeout);
+ }
+
+ if(eventEmitter) {
+ animate._node.addEventListener('beginEvent', function handleBeginEvent() {
+ eventEmitter.emit('animationBegin', {
+ element: this,
+ animate: animate._node,
+ params: animationDefinition
+ });
+ }.bind(this));
+ }
+
+ animate._node.addEventListener('endEvent', function handleEndEvent() {
+ if(eventEmitter) {
+ eventEmitter.emit('animationEnd', {
+ element: this,
+ animate: animate._node,
+ params: animationDefinition
+ });
+ }
+
+ if(guided) {
+ // Set animated attribute to current animated value
+ attributeProperties[attribute] = animationDefinition.to;
+ this.attr(attributeProperties);
+ // Remove the animate element as it's no longer required
+ animate.remove();
+ }
+ }.bind(this));
+ }
+
+ // If current attribute is an array of definition objects we create an animate for each and disable guided mode
+ if(animations[attribute] instanceof Array) {
+ animations[attribute].forEach(function(animationDefinition) {
+ createAnimate.bind(this)(animationDefinition, false);
+ }.bind(this));
+ } else {
+ createAnimate.bind(this)(animations[attribute], guided);
+ }
+
+ }.bind(this));
+
+ return this;
+ }
+
+ Chartist.Svg = Chartist.Class.extend({
+ constructor: Svg,
+ attr: attr,
+ elem: elem,
+ parent: parent,
+ root: root,
+ querySelector: querySelector,
+ querySelectorAll: querySelectorAll,
+ foreignObject: foreignObject,
+ text: text,
+ empty: empty,
+ remove: remove,
+ replace: replace,
+ append: append,
+ classes: classes,
+ addClass: addClass,
+ removeClass: removeClass,
+ removeAllClasses: removeAllClasses,
+ height: height,
+ width: width,
+ animate: animate
+ });
+
+ /**
+ * This method checks for support of a given SVG feature like Extensibility, SVG-animation or the like. Check http://www.w3.org/TR/SVG11/feature for a detailed list.
+ *
+ * @memberof Chartist.Svg
+ * @param {String} feature The SVG 1.1 feature that should be checked for support.
+ * @return {Boolean} True of false if the feature is supported or not
+ */
+ Chartist.Svg.isSupported = function(feature) {
+ return document.implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#' + feature, '1.1');
+ };
+
+ /**
+ * This Object contains some standard easing cubic bezier curves. Then can be used with their name in the `Chartist.Svg.animate`. You can also extend the list and use your own name in the `animate` function. Click the show code button to see the available bezier functions.
+ *
+ * @memberof Chartist.Svg
+ */
+ var easingCubicBeziers = {
+ easeInSine: [0.47, 0, 0.745, 0.715],
+ easeOutSine: [0.39, 0.575, 0.565, 1],
+ easeInOutSine: [0.445, 0.05, 0.55, 0.95],
+ easeInQuad: [0.55, 0.085, 0.68, 0.53],
+ easeOutQuad: [0.25, 0.46, 0.45, 0.94],
+ easeInOutQuad: [0.455, 0.03, 0.515, 0.955],
+ easeInCubic: [0.55, 0.055, 0.675, 0.19],
+ easeOutCubic: [0.215, 0.61, 0.355, 1],
+ easeInOutCubic: [0.645, 0.045, 0.355, 1],
+ easeInQuart: [0.895, 0.03, 0.685, 0.22],
+ easeOutQuart: [0.165, 0.84, 0.44, 1],
+ easeInOutQuart: [0.77, 0, 0.175, 1],
+ easeInQuint: [0.755, 0.05, 0.855, 0.06],
+ easeOutQuint: [0.23, 1, 0.32, 1],
+ easeInOutQuint: [0.86, 0, 0.07, 1],
+ easeInExpo: [0.95, 0.05, 0.795, 0.035],
+ easeOutExpo: [0.19, 1, 0.22, 1],
+ easeInOutExpo: [1, 0, 0, 1],
+ easeInCirc: [0.6, 0.04, 0.98, 0.335],
+ easeOutCirc: [0.075, 0.82, 0.165, 1],
+ easeInOutCirc: [0.785, 0.135, 0.15, 0.86],
+ easeInBack: [0.6, -0.28, 0.735, 0.045],
+ easeOutBack: [0.175, 0.885, 0.32, 1.275],
+ easeInOutBack: [0.68, -0.55, 0.265, 1.55]
+ };
+
+ Chartist.Svg.Easing = easingCubicBeziers;
+
+ /**
+ * This helper class is to wrap multiple `Chartist.Svg` elements into a list where you can call the `Chartist.Svg` functions on all elements in the list with one call. This is helpful when you'd like to perform calls with `Chartist.Svg` on multiple elements.
+ * An instance of this class is also returned by `Chartist.Svg.querySelectorAll`.
+ *
+ * @memberof Chartist.Svg
+ * @param {Array|NodeList} nodeList An Array of SVG DOM nodes or a SVG DOM NodeList (as returned by document.querySelectorAll)
+ * @constructor
+ */
+ function SvgList(nodeList) {
+ var list = this;
+
+ this.svgElements = [];
+ for(var i = 0; i < nodeList.length; i++) {
+ this.svgElements.push(new Chartist.Svg(nodeList[i]));
+ }
+
+ // Add delegation methods for Chartist.Svg
+ Object.keys(Chartist.Svg.prototype).filter(function(prototypeProperty) {
+ return ['constructor',
+ 'parent',
+ 'querySelector',
+ 'querySelectorAll',
+ 'replace',
+ 'append',
+ 'classes',
+ 'height',
+ 'width'].indexOf(prototypeProperty) === -1;
+ }).forEach(function(prototypeProperty) {
+ list[prototypeProperty] = function() {
+ var args = Array.prototype.slice.call(arguments, 0);
+ list.svgElements.forEach(function(element) {
+ Chartist.Svg.prototype[prototypeProperty].apply(element, args);
+ });
+ return list;
+ };
+ });
+ }
+
+ Chartist.Svg.List = Chartist.Class.extend({
+ constructor: SvgList
+ });
+ }(window, document, Chartist));
+ ;/**
+ * Chartist SVG path module for SVG path description creation and modification.
+ *
+ * @module Chartist.Svg.Path
+ */
+ /* global Chartist */
+ (function(window, document, Chartist) {
+ 'use strict';
+
+ /**
+ * Contains the descriptors of supported element types in a SVG path. Currently only move, line and curve are supported.
+ *
+ * @memberof Chartist.Svg.Path
+ * @type {Object}
+ */
+ var elementDescriptions = {
+ m: ['x', 'y'],
+ l: ['x', 'y'],
+ c: ['x1', 'y1', 'x2', 'y2', 'x', 'y'],
+ a: ['rx', 'ry', 'xAr', 'lAf', 'sf', 'x', 'y']
+ };
+
+ /**
+ * Default options for newly created SVG path objects.
+ *
+ * @memberof Chartist.Svg.Path
+ * @type {Object}
+ */
+ var defaultOptions = {
+ // The accuracy in digit count after the decimal point. This will be used to round numbers in the SVG path. If this option is set to false then no rounding will be performed.
+ accuracy: 3
+ };
+
+ function element(command, params, pathElements, pos, relative, data) {
+ var pathElement = Chartist.extend({
+ command: relative ? command.toLowerCase() : command.toUpperCase()
+ }, params, data ? { data: data } : {} );
+
+ pathElements.splice(pos, 0, pathElement);
+ }
+
+ function forEachParam(pathElements, cb) {
+ pathElements.forEach(function(pathElement, pathElementIndex) {
+ elementDescriptions[pathElement.command.toLowerCase()].forEach(function(paramName, paramIndex) {
+ cb(pathElement, paramName, pathElementIndex, paramIndex, pathElements);
+ });
+ });
+ }
+
+ /**
+ * Used to construct a new path object.
+ *
+ * @memberof Chartist.Svg.Path
+ * @param {Boolean} close If set to true then this path will be closed when stringified (with a Z at the end)
+ * @param {Object} options Options object that overrides the default objects. See default options for more details.
+ * @constructor
+ */
+ function SvgPath(close, options) {
+ this.pathElements = [];
+ this.pos = 0;
+ this.close = close;
+ this.options = Chartist.extend({}, defaultOptions, options);
+ }
+
+ /**
+ * Gets or sets the current position (cursor) inside of the path. You can move around the cursor freely but limited to 0 or the count of existing elements. All modifications with element functions will insert new elements at the position of this cursor.
+ *
+ * @memberof Chartist.Svg.Path
+ * @param {Number} [pos] If a number is passed then the cursor is set to this position in the path element array.
+ * @return {Chartist.Svg.Path|Number} If the position parameter was passed then the return value will be the path object for easy call chaining. If no position parameter was passed then the current position is returned.
+ */
+ function position(pos) {
+ if(pos !== undefined) {
+ this.pos = Math.max(0, Math.min(this.pathElements.length, pos));
+ return this;
+ } else {
+ return this.pos;
+ }
+ }
+
+ /**
+ * Removes elements from the path starting at the current position.
+ *
+ * @memberof Chartist.Svg.Path
+ * @param {Number} count Number of path elements that should be removed from the current position.
+ * @return {Chartist.Svg.Path} The current path object for easy call chaining.
+ */
+ function remove(count) {
+ this.pathElements.splice(this.pos, count);
+ return this;
+ }
+
+ /**
+ * Use this function to add a new move SVG path element.
+ *
+ * @memberof Chartist.Svg.Path
+ * @param {Number} x The x coordinate for the move element.
+ * @param {Number} y The y coordinate for the move element.
+ * @param {Boolean} [relative] If set to true the move element will be created with relative coordinates (lowercase letter)
+ * @param {*} [data] Any data that should be stored with the element object that will be accessible in pathElement
+ * @return {Chartist.Svg.Path} The current path object for easy call chaining.
+ */
+ function move(x, y, relative, data) {
+ element('M', {
+ x: +x,
+ y: +y
+ }, this.pathElements, this.pos++, relative, data);
+ return this;
+ }
+
+ /**
+ * Use this function to add a new line SVG path element.
+ *
+ * @memberof Chartist.Svg.Path
+ * @param {Number} x The x coordinate for the line element.
+ * @param {Number} y The y coordinate for the line element.
+ * @param {Boolean} [relative] If set to true the line element will be created with relative coordinates (lowercase letter)
+ * @param {*} [data] Any data that should be stored with the element object that will be accessible in pathElement
+ * @return {Chartist.Svg.Path} The current path object for easy call chaining.
+ */
+ function line(x, y, relative, data) {
+ element('L', {
+ x: +x,
+ y: +y
+ }, this.pathElements, this.pos++, relative, data);
+ return this;
+ }
+
+ /**
+ * Use this function to add a new curve SVG path element.
+ *
+ * @memberof Chartist.Svg.Path
+ * @param {Number} x1 The x coordinate for the first control point of the bezier curve.
+ * @param {Number} y1 The y coordinate for the first control point of the bezier curve.
+ * @param {Number} x2 The x coordinate for the second control point of the bezier curve.
+ * @param {Number} y2 The y coordinate for the second control point of the bezier curve.
+ * @param {Number} x The x coordinate for the target point of the curve element.
+ * @param {Number} y The y coordinate for the target point of the curve element.
+ * @param {Boolean} [relative] If set to true the curve element will be created with relative coordinates (lowercase letter)
+ * @param {*} [data] Any data that should be stored with the element object that will be accessible in pathElement
+ * @return {Chartist.Svg.Path} The current path object for easy call chaining.
+ */
+ function curve(x1, y1, x2, y2, x, y, relative, data) {
+ element('C', {
+ x1: +x1,
+ y1: +y1,
+ x2: +x2,
+ y2: +y2,
+ x: +x,
+ y: +y
+ }, this.pathElements, this.pos++, relative, data);
+ return this;
+ }
+
+ /**
+ * Use this function to add a new non-bezier curve SVG path element.
+ *
+ * @memberof Chartist.Svg.Path
+ * @param {Number} rx The radius to be used for the x-axis of the arc.
+ * @param {Number} ry The radius to be used for the y-axis of the arc.
+ * @param {Number} xAr Defines the orientation of the arc
+ * @param {Number} lAf Large arc flag
+ * @param {Number} sf Sweep flag
+ * @param {Number} x The x coordinate for the target point of the curve element.
+ * @param {Number} y The y coordinate for the target point of the curve element.
+ * @param {Boolean} [relative] If set to true the curve element will be created with relative coordinates (lowercase letter)
+ * @param {*} [data] Any data that should be stored with the element object that will be accessible in pathElement
+ * @return {Chartist.Svg.Path} The current path object for easy call chaining.
+ */
+ function arc(rx, ry, xAr, lAf, sf, x, y, relative, data) {
+ element('A', {
+ rx: +rx,
+ ry: +ry,
+ xAr: +xAr,
+ lAf: +lAf,
+ sf: +sf,
+ x: +x,
+ y: +y
+ }, this.pathElements, this.pos++, relative, data);
+ return this;
+ }
+
+ /**
+ * Parses an SVG path seen in the d attribute of path elements, and inserts the parsed elements into the existing path object at the current cursor position. Any closing path indicators (Z at the end of the path) will be ignored by the parser as this is provided by the close option in the options of the path object.
+ *
+ * @memberof Chartist.Svg.Path
+ * @param {String} path Any SVG path that contains move (m), line (l) or curve (c) components.
+ * @return {Chartist.Svg.Path} The current path object for easy call chaining.
+ */
+ function parse(path) {
+ // Parsing the SVG path string into an array of arrays [['M', '10', '10'], ['L', '100', '100']]
+ var chunks = path.replace(/([A-Za-z])([0-9])/g, '$1 $2')
+ .replace(/([0-9])([A-Za-z])/g, '$1 $2')
+ .split(/[\s,]+/)
+ .reduce(function(result, element) {
+ if(element.match(/[A-Za-z]/)) {
+ result.push([]);
+ }
+
+ result[result.length - 1].push(element);
+ return result;
+ }, []);
+
+ // If this is a closed path we remove the Z at the end because this is determined by the close option
+ if(chunks[chunks.length - 1][0].toUpperCase() === 'Z') {
+ chunks.pop();
+ }
+
+ // Using svgPathElementDescriptions to map raw path arrays into objects that contain the command and the parameters
+ // For example {command: 'M', x: '10', y: '10'}
+ var elements = chunks.map(function(chunk) {
+ var command = chunk.shift(),
+ description = elementDescriptions[command.toLowerCase()];
+
+ return Chartist.extend({
+ command: command
+ }, description.reduce(function(result, paramName, index) {
+ result[paramName] = +chunk[index];
+ return result;
+ }, {}));
+ });
+
+ // Preparing a splice call with the elements array as var arg params and insert the parsed elements at the current position
+ var spliceArgs = [this.pos, 0];
+ Array.prototype.push.apply(spliceArgs, elements);
+ Array.prototype.splice.apply(this.pathElements, spliceArgs);
+ // Increase the internal position by the element count
+ this.pos += elements.length;
+
+ return this;
+ }
+
+ /**
+ * This function renders to current SVG path object into a final SVG string that can be used in the d attribute of SVG path elements. It uses the accuracy option to round big decimals. If the close parameter was set in the constructor of this path object then a path closing Z will be appended to the output string.
+ *
+ * @memberof Chartist.Svg.Path
+ * @return {String}
+ */
+ function stringify() {
+ var accuracyMultiplier = Math.pow(10, this.options.accuracy);
+
+ return this.pathElements.reduce(function(path, pathElement) {
+ var params = elementDescriptions[pathElement.command.toLowerCase()].map(function(paramName) {
+ return this.options.accuracy ?
+ (Math.round(pathElement[paramName] * accuracyMultiplier) / accuracyMultiplier) :
+ pathElement[paramName];
+ }.bind(this));
+
+ return path + pathElement.command + params.join(',');
+ }.bind(this), '') + (this.close ? 'Z' : '');
+ }
+
+ /**
+ * Scales all elements in the current SVG path object. There is an individual parameter for each coordinate. Scaling will also be done for control points of curves, affecting the given coordinate.
+ *
+ * @memberof Chartist.Svg.Path
+ * @param {Number} x The number which will be used to scale the x, x1 and x2 of all path elements.
+ * @param {Number} y The number which will be used to scale the y, y1 and y2 of all path elements.
+ * @return {Chartist.Svg.Path} The current path object for easy call chaining.
+ */
+ function scale(x, y) {
+ forEachParam(this.pathElements, function(pathElement, paramName) {
+ pathElement[paramName] *= paramName[0] === 'x' ? x : y;
+ });
+ return this;
+ }
+
+ /**
+ * Translates all elements in the current SVG path object. The translation is relative and there is an individual parameter for each coordinate. Translation will also be done for control points of curves, affecting the given coordinate.
+ *
+ * @memberof Chartist.Svg.Path
+ * @param {Number} x The number which will be used to translate the x, x1 and x2 of all path elements.
+ * @param {Number} y The number which will be used to translate the y, y1 and y2 of all path elements.
+ * @return {Chartist.Svg.Path} The current path object for easy call chaining.
+ */
+ function translate(x, y) {
+ forEachParam(this.pathElements, function(pathElement, paramName) {
+ pathElement[paramName] += paramName[0] === 'x' ? x : y;
+ });
+ return this;
+ }
+
+ /**
+ * This function will run over all existing path elements and then loop over their attributes. The callback function will be called for every path element attribute that exists in the current path.
+ * The method signature of the callback function looks like this:
+ * ```javascript
+ * function(pathElement, paramName, pathElementIndex, paramIndex, pathElements)
+ * ```
+ * If something else than undefined is returned by the callback function, this value will be used to replace the old value. This allows you to build custom transformations of path objects that can't be achieved using the basic transformation functions scale and translate.
+ *
+ * @memberof Chartist.Svg.Path
+ * @param {Function} transformFnc The callback function for the transformation. Check the signature in the function description.
+ * @return {Chartist.Svg.Path} The current path object for easy call chaining.
+ */
+ function transform(transformFnc) {
+ forEachParam(this.pathElements, function(pathElement, paramName, pathElementIndex, paramIndex, pathElements) {
+ var transformed = transformFnc(pathElement, paramName, pathElementIndex, paramIndex, pathElements);
+ if(transformed || transformed === 0) {
+ pathElement[paramName] = transformed;
+ }
+ });
+ return this;
+ }
+
+ /**
+ * This function clones a whole path object with all its properties. This is a deep clone and path element objects will also be cloned.
+ *
+ * @memberof Chartist.Svg.Path
+ * @param {Boolean} [close] Optional option to set the new cloned path to closed. If not specified or false, the original path close option will be used.
+ * @return {Chartist.Svg.Path}
+ */
+ function clone(close) {
+ var c = new Chartist.Svg.Path(close || this.close);
+ c.pos = this.pos;
+ c.pathElements = this.pathElements.slice().map(function cloneElements(pathElement) {
+ return Chartist.extend({}, pathElement);
+ });
+ c.options = Chartist.extend({}, this.options);
+ return c;
+ }
+
+ /**
+ * Split a Svg.Path object by a specific command in the path chain. The path chain will be split and an array of newly created paths objects will be returned. This is useful if you'd like to split an SVG path by it's move commands, for example, in order to isolate chunks of drawings.
+ *
+ * @memberof Chartist.Svg.Path
+ * @param {String} command The command you'd like to use to split the path
+ * @return {Array}
+ */
+ function splitByCommand(command) {
+ var split = [
+ new Chartist.Svg.Path()
+ ];
+
+ this.pathElements.forEach(function(pathElement) {
+ if(pathElement.command === command.toUpperCase() && split[split.length - 1].pathElements.length !== 0) {
+ split.push(new Chartist.Svg.Path());
+ }
+
+ split[split.length - 1].pathElements.push(pathElement);
+ });
+
+ return split;
+ }
+
+ /**
+ * This static function on `Chartist.Svg.Path` is joining multiple paths together into one paths.
+ *
+ * @memberof Chartist.Svg.Path
+ * @param {Array} paths A list of paths to be joined together. The order is important.
+ * @param {boolean} close If the newly created path should be a closed path
+ * @param {Object} options Path options for the newly created path.
+ * @return {Chartist.Svg.Path}
+ */
+
+ function join(paths, close, options) {
+ var joinedPath = new Chartist.Svg.Path(close, options);
+ for(var i = 0; i < paths.length; i++) {
+ var path = paths[i];
+ for(var j = 0; j < path.pathElements.length; j++) {
+ joinedPath.pathElements.push(path.pathElements[j]);
+ }
+ }
+ return joinedPath;
+ }
+
+ Chartist.Svg.Path = Chartist.Class.extend({
+ constructor: SvgPath,
+ position: position,
+ remove: remove,
+ move: move,
+ line: line,
+ curve: curve,
+ arc: arc,
+ scale: scale,
+ translate: translate,
+ transform: transform,
+ parse: parse,
+ stringify: stringify,
+ clone: clone,
+ splitByCommand: splitByCommand
+ });
+
+ Chartist.Svg.Path.elementDescriptions = elementDescriptions;
+ Chartist.Svg.Path.join = join;
+ }(window, document, Chartist));
+ ;/* global Chartist */
+ (function (window, document, Chartist) {
+ 'use strict';
+
+ var axisUnits = {
+ x: {
+ pos: 'x',
+ len: 'width',
+ dir: 'horizontal',
+ rectStart: 'x1',
+ rectEnd: 'x2',
+ rectOffset: 'y2'
+ },
+ y: {
+ pos: 'y',
+ len: 'height',
+ dir: 'vertical',
+ rectStart: 'y2',
+ rectEnd: 'y1',
+ rectOffset: 'x1'
+ }
+ };
+
+ function Axis(units, chartRect, ticks, options) {
+ this.units = units;
+ this.counterUnits = units === axisUnits.x ? axisUnits.y : axisUnits.x;
+ this.chartRect = chartRect;
+ this.axisLength = chartRect[units.rectEnd] - chartRect[units.rectStart];
+ this.gridOffset = chartRect[units.rectOffset];
+ this.ticks = ticks;
+ this.options = options;
+ }
+
+ function createGridAndLabels(gridGroup, labelGroup, useForeignObject, chartOptions, eventEmitter) {
+ var axisOptions = chartOptions['axis' + this.units.pos.toUpperCase()];
+ var projectedValues = this.ticks.map(this.projectValue.bind(this));
+ var labelValues = this.ticks.map(axisOptions.labelInterpolationFnc);
+
+ projectedValues.forEach(function(projectedValue, index) {
+ var labelOffset = {
+ x: 0,
+ y: 0
+ };
+
+ // TODO: Find better solution for solving this problem
+ // Calculate how much space we have available for the label
+ var labelLength;
+ if(projectedValues[index + 1]) {
+ // If we still have one label ahead, we can calculate the distance to the next tick / label
+ labelLength = projectedValues[index + 1] - projectedValue;
+ } else {
+ // If we don't have a label ahead and we have only two labels in total, we just take the remaining distance to
+ // on the whole axis length. We limit that to a minimum of 30 pixel, so that labels close to the border will
+ // still be visible inside of the chart padding.
+ labelLength = Math.max(this.axisLength - projectedValue, 30);
+ }
+
+ // Skip grid lines and labels where interpolated label values are falsey (execpt for 0)
+ if(!labelValues[index] && labelValues[index] !== 0) {
+ return;
+ }
+
+ // Transform to global coordinates using the chartRect
+ // We also need to set the label offset for the createLabel function
+ if(this.units.pos === 'x') {
+ projectedValue = this.chartRect.x1 + projectedValue;
+ labelOffset.x = chartOptions.axisX.labelOffset.x;
+
+ // If the labels should be positioned in start position (top side for vertical axis) we need to set a
+ // different offset as for positioned with end (bottom)
+ if(chartOptions.axisX.position === 'start') {
+ labelOffset.y = this.chartRect.padding.top + chartOptions.axisX.labelOffset.y + (useForeignObject ? 5 : 20);
+ } else {
+ labelOffset.y = this.chartRect.y1 + chartOptions.axisX.labelOffset.y + (useForeignObject ? 5 : 20);
+ }
+ } else {
+ projectedValue = this.chartRect.y1 - projectedValue;
+ labelOffset.y = chartOptions.axisY.labelOffset.y - (useForeignObject ? labelLength : 0);
+
+ // If the labels should be positioned in start position (left side for horizontal axis) we need to set a
+ // different offset as for positioned with end (right side)
+ if(chartOptions.axisY.position === 'start') {
+ labelOffset.x = useForeignObject ? this.chartRect.padding.left + chartOptions.axisY.labelOffset.x : this.chartRect.x1 - 10;
+ } else {
+ labelOffset.x = this.chartRect.x2 + chartOptions.axisY.labelOffset.x + 10;
+ }
+ }
+
+ if(axisOptions.showGrid) {
+ Chartist.createGrid(projectedValue, index, this, this.gridOffset, this.chartRect[this.counterUnits.len](), gridGroup, [
+ chartOptions.classNames.grid,
+ chartOptions.classNames[this.units.dir]
+ ], eventEmitter);
+ }
+
+ if(axisOptions.showLabel) {
+ Chartist.createLabel(projectedValue, labelLength, index, labelValues, this, axisOptions.offset, labelOffset, labelGroup, [
+ chartOptions.classNames.label,
+ chartOptions.classNames[this.units.dir],
+ chartOptions.classNames[axisOptions.position]
+ ], useForeignObject, eventEmitter);
+ }
+ }.bind(this));
+ }
+
+ Chartist.Axis = Chartist.Class.extend({
+ constructor: Axis,
+ createGridAndLabels: createGridAndLabels,
+ projectValue: function(value, index, data) {
+ throw new Error('Base axis can\'t be instantiated!');
+ }
+ });
+
+ Chartist.Axis.units = axisUnits;
+
+ }(window, document, Chartist));
+ ;/**
+ * The auto scale axis uses standard linear scale projection of values along an axis. It uses order of magnitude to find a scale automatically and evaluates the available space in order to find the perfect amount of ticks for your chart.
+ * **Options**
+ * The following options are used by this axis in addition to the default axis options outlined in the axis configuration of the chart default settings.
+ * ```javascript
+ * var options = {
+ * // If high is specified then the axis will display values explicitly up to this value and the computed maximum from the data is ignored
+ * high: 100,
+ * // If low is specified then the axis will display values explicitly down to this value and the computed minimum from the data is ignored
+ * low: 0,
+ * // This option will be used when finding the right scale division settings. The amount of ticks on the scale will be determined so that as many ticks as possible will be displayed, while not violating this minimum required space (in pixel).
+ * scaleMinSpace: 20,
+ * // Can be set to true or false. If set to true, the scale will be generated with whole numbers only.
+ * onlyInteger: true,
+ * // The reference value can be used to make sure that this value will always be on the chart. This is especially useful on bipolar charts where the bipolar center always needs to be part of the chart.
+ * referenceValue: 5
+ * };
+ * ```
+ *
+ * @module Chartist.AutoScaleAxis
+ */
+ /* global Chartist */
+ (function (window, document, Chartist) {
+ 'use strict';
+
+ function AutoScaleAxis(axisUnit, data, chartRect, options) {
+ // Usually we calculate highLow based on the data but this can be overriden by a highLow object in the options
+ var highLow = options.highLow || Chartist.getHighLow(data.normalized, options, axisUnit.pos);
+ this.bounds = Chartist.getBounds(chartRect[axisUnit.rectEnd] - chartRect[axisUnit.rectStart], highLow, options.scaleMinSpace || 20, options.onlyInteger);
+ this.range = {
+ min: this.bounds.min,
+ max: this.bounds.max
+ };
+
+ Chartist.AutoScaleAxis.super.constructor.call(this,
+ axisUnit,
+ chartRect,
+ this.bounds.values,
+ options);
+ }
+
+ function projectValue(value) {
+ return this.axisLength * (+Chartist.getMultiValue(value, this.units.pos) - this.bounds.min) / this.bounds.range;
+ }
+
+ Chartist.AutoScaleAxis = Chartist.Axis.extend({
+ constructor: AutoScaleAxis,
+ projectValue: projectValue
+ });
+
+ }(window, document, Chartist));
+ ;/**
+ * The fixed scale axis uses standard linear projection of values along an axis. It makes use of a divisor option to divide the range provided from the minimum and maximum value or the options high and low that will override the computed minimum and maximum.
+ * **Options**
+ * The following options are used by this axis in addition to the default axis options outlined in the axis configuration of the chart default settings.
+ * ```javascript
+ * var options = {
+ * // If high is specified then the axis will display values explicitly up to this value and the computed maximum from the data is ignored
+ * high: 100,
+ * // If low is specified then the axis will display values explicitly down to this value and the computed minimum from the data is ignored
+ * low: 0,
+ * // If specified then the value range determined from minimum to maximum (or low and high) will be divided by this number and ticks will be generated at those division points. The default divisor is 1.
+ * divisor: 4,
+ * // If ticks is explicitly set, then the axis will not compute the ticks with the divisor, but directly use the data in ticks to determine at what points on the axis a tick need to be generated.
+ * ticks: [1, 10, 20, 30]
+ * };
+ * ```
+ *
+ * @module Chartist.FixedScaleAxis
+ */
+ /* global Chartist */
+ (function (window, document, Chartist) {
+ 'use strict';
+
+ function FixedScaleAxis(axisUnit, data, chartRect, options) {
+ var highLow = options.highLow || Chartist.getHighLow(data.normalized, options, axisUnit.pos);
+ this.divisor = options.divisor || 1;
+ this.ticks = options.ticks || Chartist.times(this.divisor).map(function(value, index) {
+ return highLow.low + (highLow.high - highLow.low) / this.divisor * index;
+ }.bind(this));
+ this.ticks.sort(function(a, b) {
+ return a - b;
+ });
+ this.range = {
+ min: highLow.low,
+ max: highLow.high
+ };
+
+ Chartist.FixedScaleAxis.super.constructor.call(this,
+ axisUnit,
+ chartRect,
+ this.ticks,
+ options);
+
+ this.stepLength = this.axisLength / this.divisor;
+ }
+
+ function projectValue(value) {
+ return this.axisLength * (+Chartist.getMultiValue(value, this.units.pos) - this.range.min) / (this.range.max - this.range.min);
+ }
+
+ Chartist.FixedScaleAxis = Chartist.Axis.extend({
+ constructor: FixedScaleAxis,
+ projectValue: projectValue
+ });
+
+ }(window, document, Chartist));
+ ;/**
+ * The step axis for step based charts like bar chart or step based line charts. It uses a fixed amount of ticks that will be equally distributed across the whole axis length. The projection is done using the index of the data value rather than the value itself and therefore it's only useful for distribution purpose.
+ * **Options**
+ * The following options are used by this axis in addition to the default axis options outlined in the axis configuration of the chart default settings.
+ * ```javascript
+ * var options = {
+ * // Ticks to be used to distribute across the axis length. As this axis type relies on the index of the value rather than the value, arbitrary data that can be converted to a string can be used as ticks.
+ * ticks: ['One', 'Two', 'Three'],
+ * // If set to true the full width will be used to distribute the values where the last value will be at the maximum of the axis length. If false the spaces between the ticks will be evenly distributed instead.
+ * stretch: true
+ * };
+ * ```
+ *
+ * @module Chartist.StepAxis
+ */
+ /* global Chartist */
+ (function (window, document, Chartist) {
+ 'use strict';
+
+ function StepAxis(axisUnit, data, chartRect, options) {
+ Chartist.StepAxis.super.constructor.call(this,
+ axisUnit,
+ chartRect,
+ options.ticks,
+ options);
+
+ this.stepLength = this.axisLength / (options.ticks.length - (options.stretch ? 1 : 0));
+ }
+
+ function projectValue(value, index) {
+ return this.stepLength * index;
+ }
+
+ Chartist.StepAxis = Chartist.Axis.extend({
+ constructor: StepAxis,
+ projectValue: projectValue
+ });
+
+ }(window, document, Chartist));
+ ;/**
+ * The Chartist line chart can be used to draw Line or Scatter charts. If used in the browser you can access the global `Chartist` namespace where you find the `Line` function as a main entry point.
+ *
+ * For examples on how to use the line chart please check the examples of the `Chartist.Line` method.
+ *
+ * @module Chartist.Line
+ */
+ /* global Chartist */
+ (function(window, document, Chartist){
+ 'use strict';
+
+ /**
+ * Default options in line charts. Expand the code view to see a detailed list of options with comments.
+ *
+ * @memberof Chartist.Line
+ */
+ var defaultOptions = {
+ // Options for X-Axis
+ axisX: {
+ // The offset of the labels to the chart area
+ offset: 30,
+ // Position where labels are placed. Can be set to `start` or `end` where `start` is equivalent to left or top on vertical axis and `end` is equivalent to right or bottom on horizontal axis.
+ position: 'end',
+ // Allows you to correct label positioning on this axis by positive or negative x and y offset.
+ labelOffset: {
+ x: 0,
+ y: 0
+ },
+ // If labels should be shown or not
+ showLabel: true,
+ // If the axis grid should be drawn or not
+ showGrid: true,
+ // Interpolation function that allows you to intercept the value from the axis label
+ labelInterpolationFnc: Chartist.noop,
+ // Set the axis type to be used to project values on this axis. If not defined, Chartist.StepAxis will be used for the X-Axis, where the ticks option will be set to the labels in the data and the stretch option will be set to the global fullWidth option. This type can be changed to any axis constructor available (e.g. Chartist.FixedScaleAxis), where all axis options should be present here.
+ type: undefined
+ },
+ // Options for Y-Axis
+ axisY: {
+ // The offset of the labels to the chart area
+ offset: 40,
+ // Position where labels are placed. Can be set to `start` or `end` where `start` is equivalent to left or top on vertical axis and `end` is equivalent to right or bottom on horizontal axis.
+ position: 'start',
+ // Allows you to correct label positioning on this axis by positive or negative x and y offset.
+ labelOffset: {
+ x: 0,
+ y: 0
+ },
+ // If labels should be shown or not
+ showLabel: true,
+ // If the axis grid should be drawn or not
+ showGrid: true,
+ // Interpolation function that allows you to intercept the value from the axis label
+ labelInterpolationFnc: Chartist.noop,
+ // Set the axis type to be used to project values on this axis. If not defined, Chartist.AutoScaleAxis will be used for the Y-Axis, where the high and low options will be set to the global high and low options. This type can be changed to any axis constructor available (e.g. Chartist.FixedScaleAxis), where all axis options should be present here.
+ type: undefined,
+ // This value specifies the minimum height in pixel of the scale steps
+ scaleMinSpace: 20,
+ // Use only integer values (whole numbers) for the scale steps
+ onlyInteger: false
+ },
+ // Specify a fixed width for the chart as a string (i.e. '100px' or '50%')
+ width: undefined,
+ // Specify a fixed height for the chart as a string (i.e. '100px' or '50%')
+ height: undefined,
+ // If the line should be drawn or not
+ showLine: true,
+ // If dots should be drawn or not
+ showPoint: true,
+ // If the line chart should draw an area
+ showArea: false,
+ // The base for the area chart that will be used to close the area shape (is normally 0)
+ areaBase: 0,
+ // Specify if the lines should be smoothed. This value can be true or false where true will result in smoothing using the default smoothing interpolation function Chartist.Interpolation.cardinal and false results in Chartist.Interpolation.none. You can also choose other smoothing / interpolation functions available in the Chartist.Interpolation module, or write your own interpolation function. Check the examples for a brief description.
+ lineSmooth: true,
+ // Overriding the natural low of the chart allows you to zoom in or limit the charts lowest displayed value
+ low: undefined,
+ // Overriding the natural high of the chart allows you to zoom in or limit the charts highest displayed value
+ high: undefined,
+ // Padding of the chart drawing area to the container element and labels as a number or padding object {top: 5, right: 5, bottom: 5, left: 5}
+ chartPadding: {
+ top: 15,
+ right: 15,
+ bottom: 5,
+ left: 10
+ },
+ // When set to true, the last grid line on the x-axis is not drawn and the chart elements will expand to the full available width of the chart. For the last label to be drawn correctly you might need to add chart padding or offset the last label with a draw event handler.
+ fullWidth: false,
+ // If true the whole data is reversed including labels, the series order as well as the whole series data arrays.
+ reverseData: false,
+ // Override the class names that get used to generate the SVG structure of the chart
+ classNames: {
+ chart: 'ct-chart-line',
+ label: 'ct-label',
+ labelGroup: 'ct-labels',
+ series: 'ct-series',
+ line: 'ct-line',
+ point: 'ct-point',
+ area: 'ct-area',
+ grid: 'ct-grid',
+ gridGroup: 'ct-grids',
+ vertical: 'ct-vertical',
+ horizontal: 'ct-horizontal',
+ start: 'ct-start',
+ end: 'ct-end'
+ }
+ };
+
+ /**
+ * Creates a new chart
+ *
+ */
+ function createChart(options) {
+ var data = {
+ raw: this.data,
+ normalized: Chartist.getDataArray(this.data, options.reverseData, true)
+ };
+
+ // Create new svg object
+ this.svg = Chartist.createSvg(this.container, options.width, options.height, options.classNames.chart);
+ // Create groups for labels, grid and series
+ var gridGroup = this.svg.elem('g').addClass(options.classNames.gridGroup);
+ var seriesGroup = this.svg.elem('g');
+ var labelGroup = this.svg.elem('g').addClass(options.classNames.labelGroup);
+
+ var chartRect = Chartist.createChartRect(this.svg, options, defaultOptions.padding);
+ var axisX, axisY;
+
+ if(options.axisX.type === undefined) {
+ axisX = new Chartist.StepAxis(Chartist.Axis.units.x, data, chartRect, Chartist.extend({}, options.axisX, {
+ ticks: data.raw.labels,
+ stretch: options.fullWidth
+ }));
+ } else {
+ axisX = options.axisX.type.call(Chartist, Chartist.Axis.units.x, data, chartRect, options.axisX);
+ }
+
+ if(options.axisY.type === undefined) {
+ axisY = new Chartist.AutoScaleAxis(Chartist.Axis.units.y, data, chartRect, Chartist.extend({}, options.axisY, {
+ high: Chartist.isNum(options.high) ? options.high : options.axisY.high,
+ low: Chartist.isNum(options.low) ? options.low : options.axisY.low
+ }));
+ } else {
+ axisY = options.axisY.type.call(Chartist, Chartist.Axis.units.y, data, chartRect, options.axisY);
+ }
+
+ axisX.createGridAndLabels(gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter);
+ axisY.createGridAndLabels(gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter);
+
+ // Draw the series
+ data.raw.series.forEach(function(series, seriesIndex) {
+ var seriesElement = seriesGroup.elem('g');
+
+ // Write attributes to series group element. If series name or meta is undefined the attributes will not be written
+ seriesElement.attr({
+ 'series-name': series.name,
+ 'meta': Chartist.serialize(series.meta)
+ }, Chartist.xmlNs.uri);
+
+ // Use series class from series data or if not set generate one
+ seriesElement.addClass([
+ options.classNames.series,
+ (series.className || options.classNames.series + '-' + Chartist.alphaNumerate(seriesIndex))
+ ].join(' '));
+
+ var pathCoordinates = [],
+ pathData = [];
+
+ data.normalized[seriesIndex].forEach(function(value, valueIndex) {
+ var p = {
+ x: chartRect.x1 + axisX.projectValue(value, valueIndex, data.normalized[seriesIndex]),
+ y: chartRect.y1 - axisY.projectValue(value, valueIndex, data.normalized[seriesIndex])
+ };
+ pathCoordinates.push(p.x, p.y);
+ pathData.push({
+ value: value,
+ valueIndex: valueIndex,
+ meta: Chartist.getMetaData(series, valueIndex)
+ });
+ }.bind(this));
+
+ var seriesOptions = {
+ lineSmooth: Chartist.getSeriesOption(series, options, 'lineSmooth'),
+ showPoint: Chartist.getSeriesOption(series, options, 'showPoint'),
+ showLine: Chartist.getSeriesOption(series, options, 'showLine'),
+ showArea: Chartist.getSeriesOption(series, options, 'showArea'),
+ areaBase: Chartist.getSeriesOption(series, options, 'areaBase')
+ };
+
+ var smoothing = typeof seriesOptions.lineSmooth === 'function' ?
+ seriesOptions.lineSmooth : (seriesOptions.lineSmooth ? Chartist.Interpolation.cardinal() : Chartist.Interpolation.none());
+ // Interpolating path where pathData will be used to annotate each path element so we can trace back the original
+ // index, value and meta data
+ var path = smoothing(pathCoordinates, pathData);
+
+ // If we should show points we need to create them now to avoid secondary loop
+ // Points are drawn from the pathElements returned by the interpolation function
+ // Small offset for Firefox to render squares correctly
+ if (seriesOptions.showPoint) {
+
+ path.pathElements.forEach(function(pathElement) {
+ var point = seriesElement.elem('line', {
+ x1: pathElement.x,
+ y1: pathElement.y,
+ x2: pathElement.x + 0.01,
+ y2: pathElement.y
+ }, options.classNames.point).attr({
+ 'value': [pathElement.data.value.x, pathElement.data.value.y].filter(function(v) {
+ return v;
+ }).join(','),
+ 'meta': pathElement.data.meta
+ }, Chartist.xmlNs.uri);
+
+ this.eventEmitter.emit('draw', {
+ type: 'point',
+ value: pathElement.data.value,
+ index: pathElement.data.valueIndex,
+ meta: pathElement.data.meta,
+ series: series,
+ seriesIndex: seriesIndex,
+ axisX: axisX,
+ axisY: axisY,
+ group: seriesElement,
+ element: point,
+ x: pathElement.x,
+ y: pathElement.y
+ });
+ }.bind(this));
+ }
+
+ if(seriesOptions.showLine) {
+ var line = seriesElement.elem('path', {
+ d: path.stringify()
+ }, options.classNames.line, true);
+
+ this.eventEmitter.emit('draw', {
+ type: 'line',
+ values: data.normalized[seriesIndex],
+ path: path.clone(),
+ chartRect: chartRect,
+ index: seriesIndex,
+ series: series,
+ seriesIndex: seriesIndex,
+ axisX: axisX,
+ axisY: axisY,
+ group: seriesElement,
+ element: line
+ });
+ }
+
+ // Area currently only works with axes that support a range!
+ if(seriesOptions.showArea && axisY.range) {
+ // If areaBase is outside the chart area (< min or > max) we need to set it respectively so that
+ // the area is not drawn outside the chart area.
+ var areaBase = Math.max(Math.min(seriesOptions.areaBase, axisY.range.max), axisY.range.min);
+
+ // We project the areaBase value into screen coordinates
+ var areaBaseProjected = chartRect.y1 - axisY.projectValue(areaBase);
+
+ // In order to form the area we'll first split the path by move commands so we can chunk it up into segments
+ path.splitByCommand('M').filter(function onlySolidSegments(pathSegment) {
+ // We filter only "solid" segments that contain more than one point. Otherwise there's no need for an area
+ return pathSegment.pathElements.length > 1;
+ }).map(function convertToArea(solidPathSegments) {
+ // Receiving the filtered solid path segments we can now convert those segments into fill areas
+ var firstElement = solidPathSegments.pathElements[0];
+ var lastElement = solidPathSegments.pathElements[solidPathSegments.pathElements.length - 1];
+
+ // Cloning the solid path segment with closing option and removing the first move command from the clone
+ // We then insert a new move that should start at the area base and draw a straight line up or down
+ // at the end of the path we add an additional straight line to the projected area base value
+ // As the closing option is set our path will be automatically closed
+ return solidPathSegments.clone(true)
+ .position(0)
+ .remove(1)
+ .move(firstElement.x, areaBaseProjected)
+ .line(firstElement.x, firstElement.y)
+ .position(solidPathSegments.pathElements.length + 1)
+ .line(lastElement.x, areaBaseProjected);
+
+ }).forEach(function createArea(areaPath) {
+ // For each of our newly created area paths, we'll now create path elements by stringifying our path objects
+ // and adding the created DOM elements to the correct series group
+ var area = seriesElement.elem('path', {
+ d: areaPath.stringify()
+ }, options.classNames.area, true).attr({
+ 'values': data.normalized[seriesIndex]
+ }, Chartist.xmlNs.uri);
+
+ // Emit an event for each area that was drawn
+ this.eventEmitter.emit('draw', {
+ type: 'area',
+ values: data.normalized[seriesIndex],
+ path: areaPath.clone(),
+ series: series,
+ seriesIndex: seriesIndex,
+ axisX: axisX,
+ axisY: axisY,
+ chartRect: chartRect,
+ index: seriesIndex,
+ group: seriesElement,
+ element: area
+ });
+ }.bind(this));
+ }
+ }.bind(this));
+
+ this.eventEmitter.emit('created', {
+ bounds: axisY.bounds,
+ chartRect: chartRect,
+ axisX: axisX,
+ axisY: axisY,
+ svg: this.svg,
+ options: options
+ });
+ }
+
+ /**
+ * This method creates a new line chart.
+ *
+ * @memberof Chartist.Line
+ * @param {String|Node} query A selector query string or directly a DOM element
+ * @param {Object} data The data object that needs to consist of a labels and a series array
+ * @param {Object} [options] The options object with options that override the default options. Check the examples for a detailed list.
+ * @param {Array} [responsiveOptions] Specify an array of responsive option arrays which are a media query and options object pair => [[mediaQueryString, optionsObject],[more...]]
+ * @return {Object} An object which exposes the API for the created chart
+ *
+ * @example
+ * // Create a simple line chart
+ * var data = {
+ * // A labels array that can contain any sort of values
+ * labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
+ * // Our series array that contains series objects or in this case series data arrays
+ * series: [
+ * [5, 2, 4, 2, 0]
+ * ]
+ * };
+ *
+ * // As options we currently only set a static size of 300x200 px
+ * var options = {
+ * width: '300px',
+ * height: '200px'
+ * };
+ *
+ * // In the global name space Chartist we call the Line function to initialize a line chart. As a first parameter we pass in a selector where we would like to get our chart created. Second parameter is the actual data object and as a third parameter we pass in our options
+ * new Chartist.Line('.ct-chart', data, options);
+ *
+ * @example
+ * // Use specific interpolation function with configuration from the Chartist.Interpolation module
+ *
+ * var chart = new Chartist.Line('.ct-chart', {
+ * labels: [1, 2, 3, 4, 5],
+ * series: [
+ * [1, 1, 8, 1, 7]
+ * ]
+ * }, {
+ * lineSmooth: Chartist.Interpolation.cardinal({
+ * tension: 0.2
+ * })
+ * });
+ *
+ * @example
+ * // Create a line chart with responsive options
+ *
+ * var data = {
+ * // A labels array that can contain any sort of values
+ * labels: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'],
+ * // Our series array that contains series objects or in this case series data arrays
+ * series: [
+ * [5, 2, 4, 2, 0]
+ * ]
+ * };
+ *
+ * // In adition to the regular options we specify responsive option overrides that will override the default configutation based on the matching media queries.
+ * var responsiveOptions = [
+ * ['screen and (min-width: 641px) and (max-width: 1024px)', {
+ * showPoint: false,
+ * axisX: {
+ * labelInterpolationFnc: function(value) {
+ * // Will return Mon, Tue, Wed etc. on medium screens
+ * return value.slice(0, 3);
+ * }
+ * }
+ * }],
+ * ['screen and (max-width: 640px)', {
+ * showLine: false,
+ * axisX: {
+ * labelInterpolationFnc: function(value) {
+ * // Will return M, T, W etc. on small screens
+ * return value[0];
+ * }
+ * }
+ * }]
+ * ];
+ *
+ * new Chartist.Line('.ct-chart', data, null, responsiveOptions);
+ *
+ */
+ function Line(query, data, options, responsiveOptions) {
+ Chartist.Line.super.constructor.call(this,
+ query,
+ data,
+ defaultOptions,
+ Chartist.extend({}, defaultOptions, options),
+ responsiveOptions);
+ }
+
+ // Creating line chart type in Chartist namespace
+ Chartist.Line = Chartist.Base.extend({
+ constructor: Line,
+ createChart: createChart
+ });
+
+ }(window, document, Chartist));
+ ;/**
+ * The bar chart module of Chartist that can be used to draw unipolar or bipolar bar and grouped bar charts.
+ *
+ * @module Chartist.Bar
+ */
+ /* global Chartist */
+ (function(window, document, Chartist){
+ 'use strict';
+
+ /**
+ * Default options in bar charts. Expand the code view to see a detailed list of options with comments.
+ *
+ * @memberof Chartist.Bar
+ */
+ var defaultOptions = {
+ // Options for X-Axis
+ axisX: {
+ // The offset of the chart drawing area to the border of the container
+ offset: 30,
+ // Position where labels are placed. Can be set to `start` or `end` where `start` is equivalent to left or top on vertical axis and `end` is equivalent to right or bottom on horizontal axis.
+ position: 'end',
+ // Allows you to correct label positioning on this axis by positive or negative x and y offset.
+ labelOffset: {
+ x: 0,
+ y: 0
+ },
+ // If labels should be shown or not
+ showLabel: true,
+ // If the axis grid should be drawn or not
+ showGrid: true,
+ // Interpolation function that allows you to intercept the value from the axis label
+ labelInterpolationFnc: Chartist.noop,
+ // This value specifies the minimum width in pixel of the scale steps
+ scaleMinSpace: 30,
+ // Use only integer values (whole numbers) for the scale steps
+ onlyInteger: false
+ },
+ // Options for Y-Axis
+ axisY: {
+ // The offset of the chart drawing area to the border of the container
+ offset: 40,
+ // Position where labels are placed. Can be set to `start` or `end` where `start` is equivalent to left or top on vertical axis and `end` is equivalent to right or bottom on horizontal axis.
+ position: 'start',
+ // Allows you to correct label positioning on this axis by positive or negative x and y offset.
+ labelOffset: {
+ x: 0,
+ y: 0
+ },
+ // If labels should be shown or not
+ showLabel: true,
+ // If the axis grid should be drawn or not
+ showGrid: true,
+ // Interpolation function that allows you to intercept the value from the axis label
+ labelInterpolationFnc: Chartist.noop,
+ // This value specifies the minimum height in pixel of the scale steps
+ scaleMinSpace: 20,
+ // Use only integer values (whole numbers) for the scale steps
+ onlyInteger: false
+ },
+ // Specify a fixed width for the chart as a string (i.e. '100px' or '50%')
+ width: undefined,
+ // Specify a fixed height for the chart as a string (i.e. '100px' or '50%')
+ height: undefined,
+ // Overriding the natural high of the chart allows you to zoom in or limit the charts highest displayed value
+ high: undefined,
+ // Overriding the natural low of the chart allows you to zoom in or limit the charts lowest displayed value
+ low: undefined,
+ // Use only integer values (whole numbers) for the scale steps
+ onlyInteger: false,
+ // Padding of the chart drawing area to the container element and labels as a number or padding object {top: 5, right: 5, bottom: 5, left: 5}
+ chartPadding: {
+ top: 15,
+ right: 15,
+ bottom: 5,
+ left: 10
+ },
+ // Specify the distance in pixel of bars in a group
+ seriesBarDistance: 15,
+ // If set to true this property will cause the series bars to be stacked. Check the `stackMode` option for further stacking options.
+ stackBars: false,
+ // If set to 'overlap' this property will force the stacked bars to draw from the zero line.
+ // If set to 'accumulate' this property will form a total for each series point. This will also influence the y-axis and the overall bounds of the chart. In stacked mode the seriesBarDistance property will have no effect.
+ stackMode: 'accumulate',
+ // Inverts the axes of the bar chart in order to draw a horizontal bar chart. Be aware that you also need to invert your axis settings as the Y Axis will now display the labels and the X Axis the values.
+ horizontalBars: false,
+ // If set to true then each bar will represent a series and the data array is expected to be a one dimensional array of data values rather than a series array of series. This is useful if the bar chart should represent a profile rather than some data over time.
+ distributeSeries: false,
+ // If true the whole data is reversed including labels, the series order as well as the whole series data arrays.
+ reverseData: false,
+ // Override the class names that get used to generate the SVG structure of the chart
+ classNames: {
+ chart: 'ct-chart-bar',
+ horizontalBars: 'ct-horizontal-bars',
+ label: 'ct-label',
+ labelGroup: 'ct-labels',
+ series: 'ct-series',
+ bar: 'ct-bar',
+ grid: 'ct-grid',
+ gridGroup: 'ct-grids',
+ vertical: 'ct-vertical',
+ horizontal: 'ct-horizontal',
+ start: 'ct-start',
+ end: 'ct-end'
+ }
+ };
+
+ /**
+ * Creates a new chart
+ *
+ */
+ function createChart(options) {
+ var data = {
+ raw: this.data,
+ normalized: options.distributeSeries ? Chartist.getDataArray(this.data, options.reverseData, options.horizontalBars ? 'x' : 'y').map(function(value) {
+ return [value];
+ }) : Chartist.getDataArray(this.data, options.reverseData, options.horizontalBars ? 'x' : 'y')
+ };
+
+ var highLow;
+
+ // Create new svg element
+ this.svg = Chartist.createSvg(
+ this.container,
+ options.width,
+ options.height,
+ options.classNames.chart + (options.horizontalBars ? ' ' + options.classNames.horizontalBars : '')
+ );
+
+ // Drawing groups in correct order
+ var gridGroup = this.svg.elem('g').addClass(options.classNames.gridGroup);
+ var seriesGroup = this.svg.elem('g');
+ var labelGroup = this.svg.elem('g').addClass(options.classNames.labelGroup);
+
+ if(options.stackBars) {
+ // If stacked bars we need to calculate the high low from stacked values from each series
+ var serialSums = Chartist.serialMap(data.normalized, function serialSums() {
+ return Array.prototype.slice.call(arguments).map(function(value) {
+ return value;
+ }).reduce(function(prev, curr) {
+ return {
+ x: prev.x + curr.x || 0,
+ y: prev.y + curr.y || 0
+ };
+ }, {x: 0, y: 0});
+ });
+
+ highLow = Chartist.getHighLow([serialSums], Chartist.extend({}, options, {
+ referenceValue: 0
+ }), options.horizontalBars ? 'x' : 'y');
+ } else {
+ highLow = Chartist.getHighLow(data.normalized, Chartist.extend({}, options, {
+ referenceValue: 0
+ }), options.horizontalBars ? 'x' : 'y');
+ }
+ // Overrides of high / low from settings
+ highLow.high = +options.high || (options.high === 0 ? 0 : highLow.high);
+ highLow.low = +options.low || (options.low === 0 ? 0 : highLow.low);
+
+ var chartRect = Chartist.createChartRect(this.svg, options, defaultOptions.padding);
+
+ var valueAxis,
+ labelAxisTicks,
+ labelAxis,
+ axisX,
+ axisY;
+
+ // We need to set step count based on some options combinations
+ if(options.distributeSeries && options.stackBars) {
+ // If distributed series are enabled and bars need to be stacked, we'll only have one bar and therefore should
+ // use only the first label for the step axis
+ labelAxisTicks = data.raw.labels.slice(0, 1);
+ } else {
+ // If distributed series are enabled but stacked bars aren't, we should use the series labels
+ // If we are drawing a regular bar chart with two dimensional series data, we just use the labels array
+ // as the bars are normalized
+ labelAxisTicks = data.raw.labels;
+ }
+
+ // Set labelAxis and valueAxis based on the horizontalBars setting. This setting will flip the axes if necessary.
+ if(options.horizontalBars) {
+ if(options.axisX.type === undefined) {
+ valueAxis = axisX = new Chartist.AutoScaleAxis(Chartist.Axis.units.x, data, chartRect, Chartist.extend({}, options.axisX, {
+ highLow: highLow,
+ referenceValue: 0
+ }));
+ } else {
+ valueAxis = axisX = options.axisX.type.call(Chartist, Chartist.Axis.units.x, data, chartRect, Chartist.extend({}, options.axisX, {
+ highLow: highLow,
+ referenceValue: 0
+ }));
+ }
+
+ if(options.axisY.type === undefined) {
+ labelAxis = axisY = new Chartist.StepAxis(Chartist.Axis.units.y, data, chartRect, {
+ ticks: labelAxisTicks
+ });
+ } else {
+ labelAxis = axisY = options.axisY.type.call(Chartist, Chartist.Axis.units.y, data, chartRect, options.axisY);
+ }
+ } else {
+ if(options.axisX.type === undefined) {
+ labelAxis = axisX = new Chartist.StepAxis(Chartist.Axis.units.x, data, chartRect, {
+ ticks: labelAxisTicks
+ });
+ } else {
+ labelAxis = axisX = options.axisX.type.call(Chartist, Chartist.Axis.units.x, data, chartRect, options.axisX);
+ }
+
+ if(options.axisY.type === undefined) {
+ valueAxis = axisY = new Chartist.AutoScaleAxis(Chartist.Axis.units.y, data, chartRect, Chartist.extend({}, options.axisY, {
+ highLow: highLow,
+ referenceValue: 0
+ }));
+ } else {
+ valueAxis = axisY = options.axisY.type.call(Chartist, Chartist.Axis.units.y, data, chartRect, Chartist.extend({}, options.axisY, {
+ highLow: highLow,
+ referenceValue: 0
+ }));
+ }
+ }
+
+ // Projected 0 point
+ var zeroPoint = options.horizontalBars ? (chartRect.x1 + valueAxis.projectValue(0)) : (chartRect.y1 - valueAxis.projectValue(0));
+ // Used to track the screen coordinates of stacked bars
+ var stackedBarValues = [];
+
+ labelAxis.createGridAndLabels(gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter);
+ valueAxis.createGridAndLabels(gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter);
+
+ // Draw the series
+ data.raw.series.forEach(function(series, seriesIndex) {
+ // Calculating bi-polar value of index for seriesOffset. For i = 0..4 biPol will be -1.5, -0.5, 0.5, 1.5 etc.
+ var biPol = seriesIndex - (data.raw.series.length - 1) / 2;
+ // Half of the period width between vertical grid lines used to position bars
+ var periodHalfLength;
+ // Current series SVG element
+ var seriesElement;
+
+ // We need to set periodHalfLength based on some options combinations
+ if(options.distributeSeries && !options.stackBars) {
+ // If distributed series are enabled but stacked bars aren't, we need to use the length of the normaizedData array
+ // which is the series count and divide by 2
+ periodHalfLength = labelAxis.axisLength / data.normalized.length / 2;
+ } else if(options.distributeSeries && options.stackBars) {
+ // If distributed series and stacked bars are enabled we'll only get one bar so we should just divide the axis
+ // length by 2
+ periodHalfLength = labelAxis.axisLength / 2;
+ } else {
+ // On regular bar charts we should just use the series length
+ periodHalfLength = labelAxis.axisLength / data.normalized[seriesIndex].length / 2;
+ }
+
+ // Adding the series group to the series element
+ seriesElement = seriesGroup.elem('g');
+
+ // Write attributes to series group element. If series name or meta is undefined the attributes will not be written
+ seriesElement.attr({
+ 'series-name': series.name,
+ 'meta': Chartist.serialize(series.meta)
+ }, Chartist.xmlNs.uri);
+
+ // Use series class from series data or if not set generate one
+ seriesElement.addClass([
+ options.classNames.series,
+ (series.className || options.classNames.series + '-' + Chartist.alphaNumerate(seriesIndex))
+ ].join(' '));
+
+ data.normalized[seriesIndex].forEach(function(value, valueIndex) {
+ var projected,
+ bar,
+ previousStack,
+ labelAxisValueIndex;
+
+ // We need to set labelAxisValueIndex based on some options combinations
+ if(options.distributeSeries && !options.stackBars) {
+ // If distributed series are enabled but stacked bars aren't, we can use the seriesIndex for later projection
+ // on the step axis for label positioning
+ labelAxisValueIndex = seriesIndex;
+ } else if(options.distributeSeries && options.stackBars) {
+ // If distributed series and stacked bars are enabled, we will only get one bar and therefore always use
+ // 0 for projection on the label step axis
+ labelAxisValueIndex = 0;
+ } else {
+ // On regular bar charts we just use the value index to project on the label step axis
+ labelAxisValueIndex = valueIndex;
+ }
+
+ // We need to transform coordinates differently based on the chart layout
+ if(options.horizontalBars) {
+ projected = {
+ x: chartRect.x1 + valueAxis.projectValue(value && value.x ? value.x : 0, valueIndex, data.normalized[seriesIndex]),
+ y: chartRect.y1 - labelAxis.projectValue(value && value.y ? value.y : 0, labelAxisValueIndex, data.normalized[seriesIndex])
+ };
+ } else {
+ projected = {
+ x: chartRect.x1 + labelAxis.projectValue(value && value.x ? value.x : 0, labelAxisValueIndex, data.normalized[seriesIndex]),
+ y: chartRect.y1 - valueAxis.projectValue(value && value.y ? value.y : 0, valueIndex, data.normalized[seriesIndex])
+ }
+ }
+
+ // If the label axis is a step based axis we will offset the bar into the middle of between two steps using
+ // the periodHalfLength value. Also we do arrange the different series so that they align up to each other using
+ // the seriesBarDistance. If we don't have a step axis, the bar positions can be chosen freely so we should not
+ // add any automated positioning.
+ if(labelAxis instanceof Chartist.StepAxis) {
+ // Offset to center bar between grid lines, but only if the step axis is not stretched
+ if(!labelAxis.options.stretch) {
+ projected[labelAxis.units.pos] += periodHalfLength * (options.horizontalBars ? -1 : 1);
+ }
+ // Using bi-polar offset for multiple series if no stacked bars or series distribution is used
+ projected[labelAxis.units.pos] += (options.stackBars || options.distributeSeries) ? 0 : biPol * options.seriesBarDistance * (options.horizontalBars ? -1 : 1);
+ }
+
+ // Enter value in stacked bar values used to remember previous screen value for stacking up bars
+ previousStack = stackedBarValues[valueIndex] || zeroPoint;
+ stackedBarValues[valueIndex] = previousStack - (zeroPoint - projected[labelAxis.counterUnits.pos]);
+
+ // Skip if value is undefined
+ if(value === undefined) {
+ return;
+ }
+
+ var positions = {};
+ positions[labelAxis.units.pos + '1'] = projected[labelAxis.units.pos];
+ positions[labelAxis.units.pos + '2'] = projected[labelAxis.units.pos];
+
+ if(options.stackBars && (options.stackMode === 'accumulate' || !options.stackMode)) {
+ // Stack mode: accumulate (default)
+ // If bars are stacked we use the stackedBarValues reference and otherwise base all bars off the zero line
+ // We want backwards compatibility, so the expected fallback without the 'stackMode' option
+ // to be the original behaviour (accumulate)
+ positions[labelAxis.counterUnits.pos + '1'] = previousStack;
+ positions[labelAxis.counterUnits.pos + '2'] = stackedBarValues[valueIndex];
+ } else {
+ // Draw from the zero line normally
+ // This is also the same code for Stack mode: overlap
+ positions[labelAxis.counterUnits.pos + '1'] = zeroPoint;
+ positions[labelAxis.counterUnits.pos + '2'] = projected[labelAxis.counterUnits.pos];
+ }
+
+ // Limit x and y so that they are within the chart rect
+ positions.x1 = Math.min(Math.max(positions.x1, chartRect.x1), chartRect.x2);
+ positions.x2 = Math.min(Math.max(positions.x2, chartRect.x1), chartRect.x2);
+ positions.y1 = Math.min(Math.max(positions.y1, chartRect.y2), chartRect.y1);
+ positions.y2 = Math.min(Math.max(positions.y2, chartRect.y2), chartRect.y1);
+
+ // Create bar element
+ bar = seriesElement.elem('line', positions, options.classNames.bar).attr({
+ 'value': [value.x, value.y].filter(function(v) {
+ return v;
+ }).join(','),
+ 'meta': Chartist.getMetaData(series, valueIndex)
+ }, Chartist.xmlNs.uri);
+
+ this.eventEmitter.emit('draw', Chartist.extend({
+ type: 'bar',
+ value: value,
+ index: valueIndex,
+ meta: Chartist.getMetaData(series, valueIndex),
+ series: series,
+ seriesIndex: seriesIndex,
+ axisX: axisX,
+ axisY: axisY,
+ chartRect: chartRect,
+ group: seriesElement,
+ element: bar
+ }, positions));
+ }.bind(this));
+ }.bind(this));
+
+ this.eventEmitter.emit('created', {
+ bounds: valueAxis.bounds,
+ chartRect: chartRect,
+ axisX: axisX,
+ axisY: axisY,
+ svg: this.svg,
+ options: options
+ });
+ }
+
+ /**
+ * This method creates a new bar chart and returns API object that you can use for later changes.
+ *
+ * @memberof Chartist.Bar
+ * @param {String|Node} query A selector query string or directly a DOM element
+ * @param {Object} data The data object that needs to consist of a labels and a series array
+ * @param {Object} [options] The options object with options that override the default options. Check the examples for a detailed list.
+ * @param {Array} [responsiveOptions] Specify an array of responsive option arrays which are a media query and options object pair => [[mediaQueryString, optionsObject],[more...]]
+ * @return {Object} An object which exposes the API for the created chart
+ *
+ * @example
+ * // Create a simple bar chart
+ * var data = {
+ * labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
+ * series: [
+ * [5, 2, 4, 2, 0]
+ * ]
+ * };
+ *
+ * // In the global name space Chartist we call the Bar function to initialize a bar chart. As a first parameter we pass in a selector where we would like to get our chart created and as a second parameter we pass our data object.
+ * new Chartist.Bar('.ct-chart', data);
+ *
+ * @example
+ * // This example creates a bipolar grouped bar chart where the boundaries are limitted to -10 and 10
+ * new Chartist.Bar('.ct-chart', {
+ * labels: [1, 2, 3, 4, 5, 6, 7],
+ * series: [
+ * [1, 3, 2, -5, -3, 1, -6],
+ * [-5, -2, -4, -1, 2, -3, 1]
+ * ]
+ * }, {
+ * seriesBarDistance: 12,
+ * low: -10,
+ * high: 10
+ * });
+ *
+ */
+ function Bar(query, data, options, responsiveOptions) {
+ Chartist.Bar.super.constructor.call(this,
+ query,
+ data,
+ defaultOptions,
+ Chartist.extend({}, defaultOptions, options),
+ responsiveOptions);
+ }
+
+ // Creating bar chart type in Chartist namespace
+ Chartist.Bar = Chartist.Base.extend({
+ constructor: Bar,
+ createChart: createChart
+ });
+
+ }(window, document, Chartist));
+ ;/**
+ * The pie chart module of Chartist that can be used to draw pie, donut or gauge charts
+ *
+ * @module Chartist.Pie
+ */
+ /* global Chartist */
+ (function(window, document, Chartist) {
+ 'use strict';
+
+ /**
+ * Default options in line charts. Expand the code view to see a detailed list of options with comments.
+ *
+ * @memberof Chartist.Pie
+ */
+ var defaultOptions = {
+ // Specify a fixed width for the chart as a string (i.e. '100px' or '50%')
+ width: undefined,
+ // Specify a fixed height for the chart as a string (i.e. '100px' or '50%')
+ height: undefined,
+ // Padding of the chart drawing area to the container element and labels as a number or padding object {top: 5, right: 5, bottom: 5, left: 5}
+ chartPadding: 5,
+ // Override the class names that are used to generate the SVG structure of the chart
+ classNames: {
+ chartPie: 'ct-chart-pie',
+ chartDonut: 'ct-chart-donut',
+ series: 'ct-series',
+ slicePie: 'ct-slice-pie',
+ sliceDonut: 'ct-slice-donut',
+ label: 'ct-label'
+ },
+ // The start angle of the pie chart in degrees where 0 points north. A higher value offsets the start angle clockwise.
+ startAngle: 0,
+ // An optional total you can specify. By specifying a total value, the sum of the values in the series must be this total in order to draw a full pie. You can use this parameter to draw only parts of a pie or gauge charts.
+ total: undefined,
+ // If specified the donut CSS classes will be used and strokes will be drawn instead of pie slices.
+ donut: false,
+ // Specify the donut stroke width, currently done in javascript for convenience. May move to CSS styles in the future.
+ // This option can be set as number or string to specify a relative width (i.e. 100 or '30%').
+ donutWidth: 60,
+ // If a label should be shown or not
+ showLabel: true,
+ // Label position offset from the standard position which is half distance of the radius. This value can be either positive or negative. Positive values will position the label away from the center.
+ labelOffset: 0,
+ // This option can be set to 'inside', 'outside' or 'center'. Positioned with 'inside' the labels will be placed on half the distance of the radius to the border of the Pie by respecting the 'labelOffset'. The 'outside' option will place the labels at the border of the pie and 'center' will place the labels in the absolute center point of the chart. The 'center' option only makes sense in conjunction with the 'labelOffset' option.
+ labelPosition: 'inside',
+ // An interpolation function for the label value
+ labelInterpolationFnc: Chartist.noop,
+ // Label direction can be 'neutral', 'explode' or 'implode'. The labels anchor will be positioned based on those settings as well as the fact if the labels are on the right or left side of the center of the chart. Usually explode is useful when labels are positioned far away from the center.
+ labelDirection: 'neutral',
+ // If true the whole data is reversed including labels, the series order as well as the whole series data arrays.
+ reverseData: false
+ };
+
+ /**
+ * Determines SVG anchor position based on direction and center parameter
+ *
+ * @param center
+ * @param label
+ * @param direction
+ * @return {string}
+ */
+ function determineAnchorPosition(center, label, direction) {
+ var toTheRight = label.x > center.x;
+
+ if(toTheRight && direction === 'explode' ||
+ !toTheRight && direction === 'implode') {
+ return 'start';
+ } else if(toTheRight && direction === 'implode' ||
+ !toTheRight && direction === 'explode') {
+ return 'end';
+ } else {
+ return 'middle';
+ }
+ }
+
+ /**
+ * Creates the pie chart
+ *
+ * @param options
+ */
+ function createChart(options) {
+ var seriesGroups = [],
+ labelsGroup,
+ chartRect,
+ radius,
+ labelRadius,
+ totalDataSum,
+ startAngle = options.startAngle,
+ dataArray = Chartist.getDataArray(this.data, options.reverseData);
+
+ // Create SVG.js draw
+ this.svg = Chartist.createSvg(this.container, options.width, options.height,options.donut ? options.classNames.chartDonut : options.classNames.chartPie);
+ // Calculate charting rect
+ chartRect = Chartist.createChartRect(this.svg, options, defaultOptions.padding);
+ // Get biggest circle radius possible within chartRect
+ radius = Math.min(chartRect.width() / 2, chartRect.height() / 2);
+ // Calculate total of all series to get reference value or use total reference from optional options
+ totalDataSum = options.total || dataArray.reduce(function(previousValue, currentValue) {
+ return previousValue + currentValue;
+ }, 0);
+
+ var donutWidth = Chartist.quantity(options.donutWidth);
+ if (donutWidth.unit === '%') {
+ donutWidth.value *= radius / 100;
+ }
+
+ // If this is a donut chart we need to adjust our radius to enable strokes to be drawn inside
+ // Unfortunately this is not possible with the current SVG Spec
+ // See this proposal for more details: http://lists.w3.org/Archives/Public/www-svg/2003Oct/0000.html
+ radius -= options.donut ? donutWidth.value / 2 : 0;
+
+ // If labelPosition is set to `outside` or a donut chart is drawn then the label position is at the radius,
+ // if regular pie chart it's half of the radius
+ if(options.labelPosition === 'outside' || options.donut) {
+ labelRadius = radius;
+ } else if(options.labelPosition === 'center') {
+ // If labelPosition is center we start with 0 and will later wait for the labelOffset
+ labelRadius = 0;
+ } else {
+ // Default option is 'inside' where we use half the radius so the label will be placed in the center of the pie
+ // slice
+ labelRadius = radius / 2;
+ }
+ // Add the offset to the labelRadius where a negative offset means closed to the center of the chart
+ labelRadius += options.labelOffset;
+
+ // Calculate end angle based on total sum and current data value and offset with padding
+ var center = {
+ x: chartRect.x1 + chartRect.width() / 2,
+ y: chartRect.y2 + chartRect.height() / 2
+ };
+
+ // Check if there is only one non-zero value in the series array.
+ var hasSingleValInSeries = this.data.series.filter(function(val) {
+ return val.hasOwnProperty('value') ? val.value !== 0 : val !== 0;
+ }).length === 1;
+
+ //if we need to show labels we create the label group now
+ if(options.showLabel) {
+ labelsGroup = this.svg.elem('g', null, null, true);
+ }
+
+ // Draw the series
+ // initialize series groups
+ for (var i = 0; i < this.data.series.length; i++) {
+ var series = this.data.series[i];
+ seriesGroups[i] = this.svg.elem('g', null, null, true);
+
+ // If the series is an object and contains a name or meta data we add a custom attribute
+ seriesGroups[i].attr({
+ 'series-name': series.name
+ }, Chartist.xmlNs.uri);
+
+ // Use series class from series data or if not set generate one
+ seriesGroups[i].addClass([
+ options.classNames.series,
+ (series.className || options.classNames.series + '-' + Chartist.alphaNumerate(i))
+ ].join(' '));
+
+ var endAngle = startAngle + dataArray[i] / totalDataSum * 360;
+ // If we need to draw the arc for all 360 degrees we need to add a hack where we close the circle
+ // with Z and use 359.99 degrees
+ if(endAngle - startAngle === 360) {
+ endAngle -= 0.01;
+ }
+
+ var start = Chartist.polarToCartesian(center.x, center.y, radius, startAngle - (i === 0 || hasSingleValInSeries ? 0 : 0.2)),
+ end = Chartist.polarToCartesian(center.x, center.y, radius, endAngle);
+
+ // Create a new path element for the pie chart. If this isn't a donut chart we should close the path for a correct stroke
+ var path = new Chartist.Svg.Path(!options.donut)
+ .move(end.x, end.y)
+ .arc(radius, radius, 0, endAngle - startAngle > 180, 0, start.x, start.y);
+
+ // If regular pie chart (no donut) we add a line to the center of the circle for completing the pie
+ if(!options.donut) {
+ path.line(center.x, center.y);
+ }
+
+ // Create the SVG path
+ // If this is a donut chart we add the donut class, otherwise just a regular slice
+ var pathElement = seriesGroups[i].elem('path', {
+ d: path.stringify()
+ }, options.donut ? options.classNames.sliceDonut : options.classNames.slicePie);
+
+ // Adding the pie series value to the path
+ pathElement.attr({
+ 'value': dataArray[i],
+ 'meta': Chartist.serialize(series.meta)
+ }, Chartist.xmlNs.uri);
+
+ // If this is a donut, we add the stroke-width as style attribute
+ if(options.donut) {
+ pathElement.attr({
+ 'style': 'stroke-width: ' + donutWidth.value + 'px'
+ });
+ }
+
+ // Fire off draw event
+ this.eventEmitter.emit('draw', {
+ type: 'slice',
+ value: dataArray[i],
+ totalDataSum: totalDataSum,
+ index: i,
+ meta: series.meta,
+ series: series,
+ group: seriesGroups[i],
+ element: pathElement,
+ path: path.clone(),
+ center: center,
+ radius: radius,
+ startAngle: startAngle,
+ endAngle: endAngle
+ });
+
+ // If we need to show labels we need to add the label for this slice now
+ if(options.showLabel) {
+ // Position at the labelRadius distance from center and between start and end angle
+ var labelPosition = Chartist.polarToCartesian(center.x, center.y, labelRadius, startAngle + (endAngle - startAngle) / 2),
+ interpolatedValue = options.labelInterpolationFnc(this.data.labels ? this.data.labels[i] : dataArray[i], i);
+
+ if(interpolatedValue || interpolatedValue === 0) {
+ var labelElement = labelsGroup.elem('text', {
+ dx: labelPosition.x,
+ dy: labelPosition.y,
+ 'text-anchor': determineAnchorPosition(center, labelPosition, options.labelDirection)
+ }, options.classNames.label).text('' + interpolatedValue);
+
+ // Fire off draw event
+ this.eventEmitter.emit('draw', {
+ type: 'label',
+ index: i,
+ group: labelsGroup,
+ element: labelElement,
+ text: '' + interpolatedValue,
+ x: labelPosition.x,
+ y: labelPosition.y
+ });
+ }
+ }
+
+ // Set next startAngle to current endAngle. Use slight offset so there are no transparent hairline issues
+ // (except for last slice)
+ startAngle = endAngle;
+ }
+
+ this.eventEmitter.emit('created', {
+ chartRect: chartRect,
+ svg: this.svg,
+ options: options
+ });
+ }
+
+ /**
+ * This method creates a new pie chart and returns an object that can be used to redraw the chart.
+ *
+ * @memberof Chartist.Pie
+ * @param {String|Node} query A selector query string or directly a DOM element
+ * @param {Object} data The data object in the pie chart needs to have a series property with a one dimensional data array. The values will be normalized against each other and don't necessarily need to be in percentage. The series property can also be an array of value objects that contain a value property and a className property to override the CSS class name for the series group.
+ * @param {Object} [options] The options object with options that override the default options. Check the examples for a detailed list.
+ * @param {Array} [responsiveOptions] Specify an array of responsive option arrays which are a media query and options object pair => [[mediaQueryString, optionsObject],[more...]]
+ * @return {Object} An object with a version and an update method to manually redraw the chart
+ *
+ * @example
+ * // Simple pie chart example with four series
+ * new Chartist.Pie('.ct-chart', {
+ * series: [10, 2, 4, 3]
+ * });
+ *
+ * @example
+ * // Drawing a donut chart
+ * new Chartist.Pie('.ct-chart', {
+ * series: [10, 2, 4, 3]
+ * }, {
+ * donut: true
+ * });
+ *
+ * @example
+ * // Using donut, startAngle and total to draw a gauge chart
+ * new Chartist.Pie('.ct-chart', {
+ * series: [20, 10, 30, 40]
+ * }, {
+ * donut: true,
+ * donutWidth: 20,
+ * startAngle: 270,
+ * total: 200
+ * });
+ *
+ * @example
+ * // Drawing a pie chart with padding and labels that are outside the pie
+ * new Chartist.Pie('.ct-chart', {
+ * series: [20, 10, 30, 40]
+ * }, {
+ * chartPadding: 30,
+ * labelOffset: 50,
+ * labelDirection: 'explode'
+ * });
+ *
+ * @example
+ * // Overriding the class names for individual series as well as a name and meta data.
+ * // The name will be written as ct:series-name attribute and the meta data will be serialized and written
+ * // to a ct:meta attribute.
+ * new Chartist.Pie('.ct-chart', {
+ * series: [{
+ * value: 20,
+ * name: 'Series 1',
+ * className: 'my-custom-class-one',
+ * meta: 'Meta One'
+ * }, {
+ * value: 10,
+ * name: 'Series 2',
+ * className: 'my-custom-class-two',
+ * meta: 'Meta Two'
+ * }, {
+ * value: 70,
+ * name: 'Series 3',
+ * className: 'my-custom-class-three',
+ * meta: 'Meta Three'
+ * }]
+ * });
+ */
+ function Pie(query, data, options, responsiveOptions) {
+ Chartist.Pie.super.constructor.call(this,
+ query,
+ data,
+ defaultOptions,
+ Chartist.extend({}, defaultOptions, options),
+ responsiveOptions);
+ }
+
+ // Creating pie chart type in Chartist namespace
+ Chartist.Pie = Chartist.Base.extend({
+ constructor: Pie,
+ createChart: createChart,
+ determineAnchorPosition: determineAnchorPosition
+ });
+
+ }(window, document, Chartist));
+
+ return Chartist;
+
+ }));
+
+
+/***/ },
+
+/***/ 212:
+/***/ function(module, exports, __webpack_require__) {
+
+ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**!
+ * Sortable
+ * @author RubaXa
+ * @license MIT
+ */
+
+
+ (function (factory) {
+ "use strict";
+
+ if (true) {
+ !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+ }
+ else if (typeof module != "undefined" && typeof module.exports != "undefined") {
+ module.exports = factory();
+ }
+ else if (typeof Package !== "undefined") {
+ Sortable = factory(); // export for Meteor.js
+ }
+ else {
+ /* jshint sub:true */
+ window["Sortable"] = factory();
+ }
+ })(function () {
+ "use strict";
+
+ var dragEl,
+ parentEl,
+ ghostEl,
+ cloneEl,
+ rootEl,
+ nextEl,
+
+ scrollEl,
+ scrollParentEl,
+
+ lastEl,
+ lastCSS,
+ lastParentCSS,
+
+ oldIndex,
+ newIndex,
+
+ activeGroup,
+ autoScroll = {},
+
+ tapEvt,
+ touchEvt,
+
+ moved,
+
+ /** @const */
+ RSPACE = /\s+/g,
+
+ expando = 'Sortable' + (new Date).getTime(),
+
+ win = window,
+ document = win.document,
+ parseInt = win.parseInt,
+
+ supportDraggable = !!('draggable' in document.createElement('div')),
+ supportCssPointerEvents = (function (el) {
+ el = document.createElement('x');
+ el.style.cssText = 'pointer-events:auto';
+ return el.style.pointerEvents === 'auto';
+ })(),
+
+ _silent = false,
+
+ abs = Math.abs,
+ slice = [].slice,
+
+ touchDragOverListeners = [],
+
+ _autoScroll = _throttle(function (/**Event*/evt, /**Object*/options, /**HTMLElement*/rootEl) {
+ // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521
+ if (rootEl && options.scroll) {
+ var el,
+ rect,
+ sens = options.scrollSensitivity,
+ speed = options.scrollSpeed,
+
+ x = evt.clientX,
+ y = evt.clientY,
+
+ winWidth = window.innerWidth,
+ winHeight = window.innerHeight,
+
+ vx,
+ vy
+ ;
+
+ // Delect scrollEl
+ if (scrollParentEl !== rootEl) {
+ scrollEl = options.scroll;
+ scrollParentEl = rootEl;
+
+ if (scrollEl === true) {
+ scrollEl = rootEl;
+
+ do {
+ if ((scrollEl.offsetWidth < scrollEl.scrollWidth) ||
+ (scrollEl.offsetHeight < scrollEl.scrollHeight)
+ ) {
+ break;
+ }
+ /* jshint boss:true */
+ } while (scrollEl = scrollEl.parentNode);
+ }
+ }
+
+ if (scrollEl) {
+ el = scrollEl;
+ rect = scrollEl.getBoundingClientRect();
+ vx = (abs(rect.right - x) <= sens) - (abs(rect.left - x) <= sens);
+ vy = (abs(rect.bottom - y) <= sens) - (abs(rect.top - y) <= sens);
+ }
+
+
+ if (!(vx || vy)) {
+ vx = (winWidth - x <= sens) - (x <= sens);
+ vy = (winHeight - y <= sens) - (y <= sens);
+
+ /* jshint expr:true */
+ (vx || vy) && (el = win);
+ }
+
+
+ if (autoScroll.vx !== vx || autoScroll.vy !== vy || autoScroll.el !== el) {
+ autoScroll.el = el;
+ autoScroll.vx = vx;
+ autoScroll.vy = vy;
+
+ clearInterval(autoScroll.pid);
+
+ if (el) {
+ autoScroll.pid = setInterval(function () {
+ if (el === win) {
+ win.scrollTo(win.pageXOffset + vx * speed, win.pageYOffset + vy * speed);
+ } else {
+ vy && (el.scrollTop += vy * speed);
+ vx && (el.scrollLeft += vx * speed);
+ }
+ }, 24);
+ }
+ }
+ }
+ }, 30),
+
+ _prepareGroup = function (options) {
+ var group = options.group;
+
+ if (!group || typeof group != 'object') {
+ group = options.group = {name: group};
+ }
+
+ ['pull', 'put'].forEach(function (key) {
+ if (!(key in group)) {
+ group[key] = true;
+ }
+ });
+
+ options.groups = ' ' + group.name + (group.put.join ? ' ' + group.put.join(' ') : '') + ' ';
+ }
+ ;
+
+
+
+ /**
+ * @class Sortable
+ * @param {HTMLElement} el
+ * @param {Object} [options]
+ */
+ function Sortable(el, options) {
+ if (!(el && el.nodeType && el.nodeType === 1)) {
+ throw 'Sortable: `el` must be HTMLElement, and not ' + {}.toString.call(el);
+ }
+
+ this.el = el; // root element
+ this.options = options = _extend({}, options);
+
+
+ // Export instance
+ el[expando] = this;
+
+
+ // Default options
+ var defaults = {
+ group: Math.random(),
+ sort: true,
+ disabled: false,
+ store: null,
+ handle: null,
+ scroll: true,
+ scrollSensitivity: 30,
+ scrollSpeed: 10,
+ draggable: /[uo]l/i.test(el.nodeName) ? 'li' : '>*',
+ ghostClass: 'sortable-ghost',
+ chosenClass: 'sortable-chosen',
+ ignore: 'a, img',
+ filter: null,
+ animation: 0,
+ setData: function (dataTransfer, dragEl) {
+ dataTransfer.setData('Text', dragEl.textContent);
+ },
+ dropBubble: false,
+ dragoverBubble: false,
+ dataIdAttr: 'data-id',
+ delay: 0,
+ forceFallback: false,
+ fallbackClass: 'sortable-fallback',
+ fallbackOnBody: false
+ };
+
+
+ // Set default options
+ for (var name in defaults) {
+ !(name in options) && (options[name] = defaults[name]);
+ }
+
+ _prepareGroup(options);
+
+ // Bind all private methods
+ for (var fn in this) {
+ if (fn.charAt(0) === '_') {
+ this[fn] = this[fn].bind(this);
+ }
+ }
+
+ // Setup drag mode
+ this.nativeDraggable = options.forceFallback ? false : supportDraggable;
+
+ // Bind events
+ _on(el, 'mousedown', this._onTapStart);
+ _on(el, 'touchstart', this._onTapStart);
+
+ if (this.nativeDraggable) {
+ _on(el, 'dragover', this);
+ _on(el, 'dragenter', this);
+ }
+
+ touchDragOverListeners.push(this._onDragOver);
+
+ // Restore sorting
+ options.store && this.sort(options.store.get(this));
+ }
+
+
+ Sortable.prototype = /** @lends Sortable.prototype */ {
+ constructor: Sortable,
+
+ _onTapStart: function (/** Event|TouchEvent */evt) {
+ var _this = this,
+ el = this.el,
+ options = this.options,
+ type = evt.type,
+ touch = evt.touches && evt.touches[0],
+ target = (touch || evt).target,
+ originalTarget = target,
+ filter = options.filter;
+
+
+ if (type === 'mousedown' && evt.button !== 0 || options.disabled) {
+ return; // only left button or enabled
+ }
+
+ target = _closest(target, options.draggable, el);
+
+ if (!target) {
+ return;
+ }
+
+ // get the index of the dragged element within its parent
+ oldIndex = _index(target);
+
+ // Check filter
+ if (typeof filter === 'function') {
+ if (filter.call(this, evt, target, this)) {
+ _dispatchEvent(_this, originalTarget, 'filter', target, el, oldIndex);
+ evt.preventDefault();
+ return; // cancel dnd
+ }
+ }
+ else if (filter) {
+ filter = filter.split(',').some(function (criteria) {
+ criteria = _closest(originalTarget, criteria.trim(), el);
+
+ if (criteria) {
+ _dispatchEvent(_this, criteria, 'filter', target, el, oldIndex);
+ return true;
+ }
+ });
+
+ if (filter) {
+ evt.preventDefault();
+ return; // cancel dnd
+ }
+ }
+
+
+ if (options.handle && !_closest(originalTarget, options.handle, el)) {
+ return;
+ }
+
+
+ // Prepare `dragstart`
+ this._prepareDragStart(evt, touch, target);
+ },
+
+ _prepareDragStart: function (/** Event */evt, /** Touch */touch, /** HTMLElement */target) {
+ var _this = this,
+ el = _this.el,
+ options = _this.options,
+ ownerDocument = el.ownerDocument,
+ dragStartFn;
+
+ if (target && !dragEl && (target.parentNode === el)) {
+ tapEvt = evt;
+
+ rootEl = el;
+ dragEl = target;
+ parentEl = dragEl.parentNode;
+ nextEl = dragEl.nextSibling;
+ activeGroup = options.group;
+
+ dragStartFn = function () {
+ // Delayed drag has been triggered
+ // we can re-enable the events: touchmove/mousemove
+ _this._disableDelayedDrag();
+
+ // Make the element draggable
+ dragEl.draggable = true;
+
+ // Chosen item
+ _toggleClass(dragEl, _this.options.chosenClass, true);
+
+ // Bind the events: dragstart/dragend
+ _this._triggerDragStart(touch);
+ };
+
+ // Disable "draggable"
+ options.ignore.split(',').forEach(function (criteria) {
+ _find(dragEl, criteria.trim(), _disableDraggable);
+ });
+
+ _on(ownerDocument, 'mouseup', _this._onDrop);
+ _on(ownerDocument, 'touchend', _this._onDrop);
+ _on(ownerDocument, 'touchcancel', _this._onDrop);
+
+ if (options.delay) {
+ // If the user moves the pointer or let go the click or touch
+ // before the delay has been reached:
+ // disable the delayed drag
+ _on(ownerDocument, 'mouseup', _this._disableDelayedDrag);
+ _on(ownerDocument, 'touchend', _this._disableDelayedDrag);
+ _on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);
+ _on(ownerDocument, 'mousemove', _this._disableDelayedDrag);
+ _on(ownerDocument, 'touchmove', _this._disableDelayedDrag);
+
+ _this._dragStartTimer = setTimeout(dragStartFn, options.delay);
+ } else {
+ dragStartFn();
+ }
+ }
+ },
+
+ _disableDelayedDrag: function () {
+ var ownerDocument = this.el.ownerDocument;
+
+ clearTimeout(this._dragStartTimer);
+ _off(ownerDocument, 'mouseup', this._disableDelayedDrag);
+ _off(ownerDocument, 'touchend', this._disableDelayedDrag);
+ _off(ownerDocument, 'touchcancel', this._disableDelayedDrag);
+ _off(ownerDocument, 'mousemove', this._disableDelayedDrag);
+ _off(ownerDocument, 'touchmove', this._disableDelayedDrag);
+ },
+
+ _triggerDragStart: function (/** Touch */touch) {
+ if (touch) {
+ // Touch device support
+ tapEvt = {
+ target: dragEl,
+ clientX: touch.clientX,
+ clientY: touch.clientY
+ };
+
+ this._onDragStart(tapEvt, 'touch');
+ }
+ else if (!this.nativeDraggable) {
+ this._onDragStart(tapEvt, true);
+ }
+ else {
+ _on(dragEl, 'dragend', this);
+ _on(rootEl, 'dragstart', this._onDragStart);
+ }
+
+ try {
+ if (document.selection) {
+ document.selection.empty();
+ } else {
+ window.getSelection().removeAllRanges();
+ }
+ } catch (err) {
+ }
+ },
+
+ _dragStarted: function () {
+ if (rootEl && dragEl) {
+ // Apply effect
+ _toggleClass(dragEl, this.options.ghostClass, true);
+
+ Sortable.active = this;
+
+ // Drag start event
+ _dispatchEvent(this, rootEl, 'start', dragEl, rootEl, oldIndex);
+ }
+ },
+
+ _emulateDragOver: function () {
+ if (touchEvt) {
+ if (this._lastX === touchEvt.clientX && this._lastY === touchEvt.clientY) {
+ return;
+ }
+
+ this._lastX = touchEvt.clientX;
+ this._lastY = touchEvt.clientY;
+
+ if (!supportCssPointerEvents) {
+ _css(ghostEl, 'display', 'none');
+ }
+
+ var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY),
+ parent = target,
+ groupName = ' ' + this.options.group.name + '',
+ i = touchDragOverListeners.length;
+
+ if (parent) {
+ do {
+ if (parent[expando] && parent[expando].options.groups.indexOf(groupName) > -1) {
+ while (i--) {
+ touchDragOverListeners[i]({
+ clientX: touchEvt.clientX,
+ clientY: touchEvt.clientY,
+ target: target,
+ rootEl: parent
+ });
+ }
+
+ break;
+ }
+
+ target = parent; // store last element
+ }
+ /* jshint boss:true */
+ while (parent = parent.parentNode);
+ }
+
+ if (!supportCssPointerEvents) {
+ _css(ghostEl, 'display', '');
+ }
+ }
+ },
+
+
+ _onTouchMove: function (/**TouchEvent*/evt) {
+ if (tapEvt) {
+ // only set the status to dragging, when we are actually dragging
+ if (!Sortable.active) {
+ this._dragStarted();
+ }
+
+ // as well as creating the ghost element on the document body
+ this._appendGhost();
+
+ var touch = evt.touches ? evt.touches[0] : evt,
+ dx = touch.clientX - tapEvt.clientX,
+ dy = touch.clientY - tapEvt.clientY,
+ translate3d = evt.touches ? 'translate3d(' + dx + 'px,' + dy + 'px,0)' : 'translate(' + dx + 'px,' + dy + 'px)';
+
+ moved = true;
+ touchEvt = touch;
+
+ _css(ghostEl, 'webkitTransform', translate3d);
+ _css(ghostEl, 'mozTransform', translate3d);
+ _css(ghostEl, 'msTransform', translate3d);
+ _css(ghostEl, 'transform', translate3d);
+
+ evt.preventDefault();
+ }
+ },
+
+ _appendGhost: function () {
+ if (!ghostEl) {
+ var rect = dragEl.getBoundingClientRect(),
+ css = _css(dragEl),
+ options = this.options,
+ ghostRect;
+
+ ghostEl = dragEl.cloneNode(true);
+
+ _toggleClass(ghostEl, options.ghostClass, false);
+ _toggleClass(ghostEl, options.fallbackClass, true);
+
+ _css(ghostEl, 'top', rect.top - parseInt(css.marginTop, 10));
+ _css(ghostEl, 'left', rect.left - parseInt(css.marginLeft, 10));
+ _css(ghostEl, 'width', rect.width);
+ _css(ghostEl, 'height', rect.height);
+ _css(ghostEl, 'opacity', '0.8');
+ _css(ghostEl, 'position', 'fixed');
+ _css(ghostEl, 'zIndex', '100000');
+ _css(ghostEl, 'pointerEvents', 'none');
+
+ options.fallbackOnBody && document.body.appendChild(ghostEl) || rootEl.appendChild(ghostEl);
+
+ // Fixing dimensions.
+ ghostRect = ghostEl.getBoundingClientRect();
+ _css(ghostEl, 'width', rect.width * 2 - ghostRect.width);
+ _css(ghostEl, 'height', rect.height * 2 - ghostRect.height);
+ }
+ },
+
+ _onDragStart: function (/**Event*/evt, /**boolean*/useFallback) {
+ var dataTransfer = evt.dataTransfer,
+ options = this.options;
+
+ this._offUpEvents();
+
+ if (activeGroup.pull == 'clone') {
+ cloneEl = dragEl.cloneNode(true);
+ _css(cloneEl, 'display', 'none');
+ rootEl.insertBefore(cloneEl, dragEl);
+ }
+
+ if (useFallback) {
+
+ if (useFallback === 'touch') {
+ // Bind touch events
+ _on(document, 'touchmove', this._onTouchMove);
+ _on(document, 'touchend', this._onDrop);
+ _on(document, 'touchcancel', this._onDrop);
+ } else {
+ // Old brwoser
+ _on(document, 'mousemove', this._onTouchMove);
+ _on(document, 'mouseup', this._onDrop);
+ }
+
+ this._loopId = setInterval(this._emulateDragOver, 50);
+ }
+ else {
+ if (dataTransfer) {
+ dataTransfer.effectAllowed = 'move';
+ options.setData && options.setData.call(this, dataTransfer, dragEl);
+ }
+
+ _on(document, 'drop', this);
+ setTimeout(this._dragStarted, 0);
+ }
+ },
+
+ _onDragOver: function (/**Event*/evt) {
+ var el = this.el,
+ target,
+ dragRect,
+ revert,
+ options = this.options,
+ group = options.group,
+ groupPut = group.put,
+ isOwner = (activeGroup === group),
+ canSort = options.sort;
+
+ if (evt.preventDefault !== void 0) {
+ evt.preventDefault();
+ !options.dragoverBubble && evt.stopPropagation();
+ }
+
+ moved = true;
+
+ if (activeGroup && !options.disabled &&
+ (isOwner
+ ? canSort || (revert = !rootEl.contains(dragEl)) // Reverting item into the original list
+ : activeGroup.pull && groupPut && (
+ (activeGroup.name === group.name) || // by Name
+ (groupPut.indexOf && ~groupPut.indexOf(activeGroup.name)) // by Array
+ )
+ ) &&
+ (evt.rootEl === void 0 || evt.rootEl === this.el) // touch fallback
+ ) {
+ // Smart auto-scrolling
+ _autoScroll(evt, options, this.el);
+
+ if (_silent) {
+ return;
+ }
+
+ target = _closest(evt.target, options.draggable, el);
+ dragRect = dragEl.getBoundingClientRect();
+
+ if (revert) {
+ _cloneHide(true);
+
+ if (cloneEl || nextEl) {
+ rootEl.insertBefore(dragEl, cloneEl || nextEl);
+ }
+ else if (!canSort) {
+ rootEl.appendChild(dragEl);
+ }
+
+ return;
+ }
+
+
+ if ((el.children.length === 0) || (el.children[0] === ghostEl) ||
+ (el === evt.target) && (target = _ghostIsLast(el, evt))
+ ) {
+
+ if (target) {
+ if (target.animated) {
+ return;
+ }
+
+ targetRect = target.getBoundingClientRect();
+ }
+
+ _cloneHide(isOwner);
+
+ if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect) !== false) {
+ if (!dragEl.contains(el)) {
+ el.appendChild(dragEl);
+ parentEl = el; // actualization
+ }
+
+ this._animate(dragRect, dragEl);
+ target && this._animate(targetRect, target);
+ }
+ }
+ else if (target && !target.animated && target !== dragEl && (target.parentNode[expando] !== void 0)) {
+ if (lastEl !== target) {
+ lastEl = target;
+ lastCSS = _css(target);
+ lastParentCSS = _css(target.parentNode);
+ }
+
+
+ var targetRect = target.getBoundingClientRect(),
+ width = targetRect.right - targetRect.left,
+ height = targetRect.bottom - targetRect.top,
+ floating = /left|right|inline/.test(lastCSS.cssFloat + lastCSS.display)
+ || (lastParentCSS.display == 'flex' && lastParentCSS['flex-direction'].indexOf('row') === 0),
+ isWide = (target.offsetWidth > dragEl.offsetWidth),
+ isLong = (target.offsetHeight > dragEl.offsetHeight),
+ halfway = (floating ? (evt.clientX - targetRect.left) / width : (evt.clientY - targetRect.top) / height) > 0.5,
+ nextSibling = target.nextElementSibling,
+ moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect),
+ after
+ ;
+
+ if (moveVector !== false) {
+ _silent = true;
+ setTimeout(_unsilent, 30);
+
+ _cloneHide(isOwner);
+
+ if (moveVector === 1 || moveVector === -1) {
+ after = (moveVector === 1);
+ }
+ else if (floating) {
+ var elTop = dragEl.offsetTop,
+ tgTop = target.offsetTop;
+
+ if (elTop === tgTop) {
+ after = (target.previousElementSibling === dragEl) && !isWide || halfway && isWide;
+ } else {
+ after = tgTop > elTop;
+ }
+ } else {
+ after = (nextSibling !== dragEl) && !isLong || halfway && isLong;
+ }
+
+ if (!dragEl.contains(el)) {
+ if (after && !nextSibling) {
+ el.appendChild(dragEl);
+ } else {
+ target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
+ }
+ }
+
+ parentEl = dragEl.parentNode; // actualization
+
+ this._animate(dragRect, dragEl);
+ this._animate(targetRect, target);
+ }
+ }
+ }
+ },
+
+ _animate: function (prevRect, target) {
+ var ms = this.options.animation;
+
+ if (ms) {
+ var currentRect = target.getBoundingClientRect();
+
+ _css(target, 'transition', 'none');
+ _css(target, 'transform', 'translate3d('
+ + (prevRect.left - currentRect.left) + 'px,'
+ + (prevRect.top - currentRect.top) + 'px,0)'
+ );
+
+ target.offsetWidth; // repaint
+
+ _css(target, 'transition', 'all ' + ms + 'ms');
+ _css(target, 'transform', 'translate3d(0,0,0)');
+
+ clearTimeout(target.animated);
+ target.animated = setTimeout(function () {
+ _css(target, 'transition', '');
+ _css(target, 'transform', '');
+ target.animated = false;
+ }, ms);
+ }
+ },
+
+ _offUpEvents: function () {
+ var ownerDocument = this.el.ownerDocument;
+
+ _off(document, 'touchmove', this._onTouchMove);
+ _off(ownerDocument, 'mouseup', this._onDrop);
+ _off(ownerDocument, 'touchend', this._onDrop);
+ _off(ownerDocument, 'touchcancel', this._onDrop);
+ },
+
+ _onDrop: function (/**Event*/evt) {
+ var el = this.el,
+ options = this.options;
+
+ clearInterval(this._loopId);
+ clearInterval(autoScroll.pid);
+ clearTimeout(this._dragStartTimer);
+
+ // Unbind events
+ _off(document, 'mousemove', this._onTouchMove);
+
+ if (this.nativeDraggable) {
+ _off(document, 'drop', this);
+ _off(el, 'dragstart', this._onDragStart);
+ }
+
+ this._offUpEvents();
+
+ if (evt) {
+ if (moved) {
+ evt.preventDefault();
+ !options.dropBubble && evt.stopPropagation();
+ }
+
+ ghostEl && ghostEl.parentNode.removeChild(ghostEl);
+
+ if (dragEl) {
+ if (this.nativeDraggable) {
+ _off(dragEl, 'dragend', this);
+ }
+
+ _disableDraggable(dragEl);
+
+ // Remove class's
+ _toggleClass(dragEl, this.options.ghostClass, false);
+ _toggleClass(dragEl, this.options.chosenClass, false);
+
+ if (rootEl !== parentEl) {
+ newIndex = _index(dragEl);
+
+ if (newIndex >= 0) {
+ // drag from one list and drop into another
+ _dispatchEvent(null, parentEl, 'sort', dragEl, rootEl, oldIndex, newIndex);
+ _dispatchEvent(this, rootEl, 'sort', dragEl, rootEl, oldIndex, newIndex);
+
+ // Add event
+ _dispatchEvent(null, parentEl, 'add', dragEl, rootEl, oldIndex, newIndex);
+
+ // Remove event
+ _dispatchEvent(this, rootEl, 'remove', dragEl, rootEl, oldIndex, newIndex);
+ }
+ }
+ else {
+ // Remove clone
+ cloneEl && cloneEl.parentNode.removeChild(cloneEl);
+
+ if (dragEl.nextSibling !== nextEl) {
+ // Get the index of the dragged element within its parent
+ newIndex = _index(dragEl);
+
+ if (newIndex >= 0) {
+ // drag & drop within the same list
+ _dispatchEvent(this, rootEl, 'update', dragEl, rootEl, oldIndex, newIndex);
+ _dispatchEvent(this, rootEl, 'sort', dragEl, rootEl, oldIndex, newIndex);
+ }
+ }
+ }
+
+ if (Sortable.active) {
+ if (newIndex === null || newIndex === -1) {
+ newIndex = oldIndex;
+ }
+
+ _dispatchEvent(this, rootEl, 'end', dragEl, rootEl, oldIndex, newIndex);
+
+ // Save sorting
+ this.save();
+ }
+ }
+
+ // Nulling
+ rootEl =
+ dragEl =
+ parentEl =
+ ghostEl =
+ nextEl =
+ cloneEl =
+
+ scrollEl =
+ scrollParentEl =
+
+ tapEvt =
+ touchEvt =
+
+ moved =
+ newIndex =
+
+ lastEl =
+ lastCSS =
+
+ activeGroup =
+ Sortable.active = null;
+ }
+ },
+
+
+ handleEvent: function (/**Event*/evt) {
+ var type = evt.type;
+
+ if (type === 'dragover' || type === 'dragenter') {
+ if (dragEl) {
+ this._onDragOver(evt);
+ _globalDragOver(evt);
+ }
+ }
+ else if (type === 'drop' || type === 'dragend') {
+ this._onDrop(evt);
+ }
+ },
+
+
+ /**
+ * Serializes the item into an array of string.
+ * @returns {String[]}
+ */
+ toArray: function () {
+ var order = [],
+ el,
+ children = this.el.children,
+ i = 0,
+ n = children.length,
+ options = this.options;
+
+ for (; i < n; i++) {
+ el = children[i];
+ if (_closest(el, options.draggable, this.el)) {
+ order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));
+ }
+ }
+
+ return order;
+ },
+
+
+ /**
+ * Sorts the elements according to the array.
+ * @param {String[]} order order of the items
+ */
+ sort: function (order) {
+ var items = {}, rootEl = this.el;
+
+ this.toArray().forEach(function (id, i) {
+ var el = rootEl.children[i];
+
+ if (_closest(el, this.options.draggable, rootEl)) {
+ items[id] = el;
+ }
+ }, this);
+
+ order.forEach(function (id) {
+ if (items[id]) {
+ rootEl.removeChild(items[id]);
+ rootEl.appendChild(items[id]);
+ }
+ });
+ },
+
+
+ /**
+ * Save the current sorting
+ */
+ save: function () {
+ var store = this.options.store;
+ store && store.set(this);
+ },
+
+
+ /**
+ * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
+ * @param {HTMLElement} el
+ * @param {String} [selector] default: `options.draggable`
+ * @returns {HTMLElement|null}
+ */
+ closest: function (el, selector) {
+ return _closest(el, selector || this.options.draggable, this.el);
+ },
+
+
+ /**
+ * Set/get option
+ * @param {string} name
+ * @param {*} [value]
+ * @returns {*}
+ */
+ option: function (name, value) {
+ var options = this.options;
+
+ if (value === void 0) {
+ return options[name];
+ } else {
+ options[name] = value;
+
+ if (name === 'group') {
+ _prepareGroup(options);
+ }
+ }
+ },
+
+
+ /**
+ * Destroy
+ */
+ destroy: function () {
+ var el = this.el;
+
+ el[expando] = null;
+
+ _off(el, 'mousedown', this._onTapStart);
+ _off(el, 'touchstart', this._onTapStart);
+
+ if (this.nativeDraggable) {
+ _off(el, 'dragover', this);
+ _off(el, 'dragenter', this);
+ }
+
+ // Remove draggable attributes
+ Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {
+ el.removeAttribute('draggable');
+ });
+
+ touchDragOverListeners.splice(touchDragOverListeners.indexOf(this._onDragOver), 1);
+
+ this._onDrop();
+
+ this.el = el = null;
+ }
+ };
+
+
+ function _cloneHide(state) {
+ if (cloneEl && (cloneEl.state !== state)) {
+ _css(cloneEl, 'display', state ? 'none' : '');
+ !state && cloneEl.state && rootEl.insertBefore(cloneEl, dragEl);
+ cloneEl.state = state;
+ }
+ }
+
+
+ function _closest(/**HTMLElement*/el, /**String*/selector, /**HTMLElement*/ctx) {
+ if (el) {
+ ctx = ctx || document;
+ selector = selector.split('.');
+
+ var tag = selector.shift().toUpperCase(),
+ re = new RegExp('\\s(' + selector.join('|') + ')(?=\\s)', 'g');
+
+ do {
+ if (
+ (tag === '>*' && el.parentNode === ctx) || (
+ (tag === '' || el.nodeName.toUpperCase() == tag) &&
+ (!selector.length || ((' ' + el.className + ' ').match(re) || []).length == selector.length)
+ )
+ ) {
+ return el;
+ }
+ }
+ while (el !== ctx && (el = el.parentNode));
+ }
+
+ return null;
+ }
+
+
+ function _globalDragOver(/**Event*/evt) {
+ if (evt.dataTransfer) {
+ evt.dataTransfer.dropEffect = 'move';
+ }
+ evt.preventDefault();
+ }
+
+
+ function _on(el, event, fn) {
+ el.addEventListener(event, fn, false);
+ }
+
+
+ function _off(el, event, fn) {
+ el.removeEventListener(event, fn, false);
+ }
+
+
+ function _toggleClass(el, name, state) {
+ if (el) {
+ if (el.classList) {
+ el.classList[state ? 'add' : 'remove'](name);
+ }
+ else {
+ var className = (' ' + el.className + ' ').replace(RSPACE, ' ').replace(' ' + name + ' ', ' ');
+ el.className = (className + (state ? ' ' + name : '')).replace(RSPACE, ' ');
+ }
+ }
+ }
+
+
+ function _css(el, prop, val) {
+ var style = el && el.style;
+
+ if (style) {
+ if (val === void 0) {
+ if (document.defaultView && document.defaultView.getComputedStyle) {
+ val = document.defaultView.getComputedStyle(el, '');
+ }
+ else if (el.currentStyle) {
+ val = el.currentStyle;
+ }
+
+ return prop === void 0 ? val : val[prop];
+ }
+ else {
+ if (!(prop in style)) {
+ prop = '-webkit-' + prop;
+ }
+
+ style[prop] = val + (typeof val === 'string' ? '' : 'px');
+ }
+ }
+ }
+
+
+ function _find(ctx, tagName, iterator) {
+ if (ctx) {
+ var list = ctx.getElementsByTagName(tagName), i = 0, n = list.length;
+
+ if (iterator) {
+ for (; i < n; i++) {
+ iterator(list[i], i);
+ }
+ }
+
+ return list;
+ }
+
+ return [];
+ }
+
+
+
+ function _dispatchEvent(sortable, rootEl, name, targetEl, fromEl, startIndex, newIndex) {
+ var evt = document.createEvent('Event'),
+ options = (sortable || rootEl[expando]).options,
+ onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1);
+
+ evt.initEvent(name, true, true);
+
+ evt.to = rootEl;
+ evt.from = fromEl || rootEl;
+ evt.item = targetEl || rootEl;
+ evt.clone = cloneEl;
+
+ evt.oldIndex = startIndex;
+ evt.newIndex = newIndex;
+
+ rootEl.dispatchEvent(evt);
+
+ if (options[onName]) {
+ options[onName].call(sortable, evt);
+ }
+ }
+
+
+ function _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect) {
+ var evt,
+ sortable = fromEl[expando],
+ onMoveFn = sortable.options.onMove,
+ retVal;
+
+ evt = document.createEvent('Event');
+ evt.initEvent('move', true, true);
+
+ evt.to = toEl;
+ evt.from = fromEl;
+ evt.dragged = dragEl;
+ evt.draggedRect = dragRect;
+ evt.related = targetEl || toEl;
+ evt.relatedRect = targetRect || toEl.getBoundingClientRect();
+
+ fromEl.dispatchEvent(evt);
+
+ if (onMoveFn) {
+ retVal = onMoveFn.call(sortable, evt);
+ }
+
+ return retVal;
+ }
+
+
+ function _disableDraggable(el) {
+ el.draggable = false;
+ }
+
+
+ function _unsilent() {
+ _silent = false;
+ }
+
+
+ /** @returns {HTMLElement|false} */
+ function _ghostIsLast(el, evt) {
+ var lastEl = el.lastElementChild,
+ rect = lastEl.getBoundingClientRect();
+
+ return ((evt.clientY - (rect.top + rect.height) > 5) || (evt.clientX - (rect.right + rect.width) > 5)) && lastEl; // min delta
+ }
+
+
+ /**
+ * Generate id
+ * @param {HTMLElement} el
+ * @returns {String}
+ * @private
+ */
+ function _generateId(el) {
+ var str = el.tagName + el.className + el.src + el.href + el.textContent,
+ i = str.length,
+ sum = 0;
+
+ while (i--) {
+ sum += str.charCodeAt(i);
+ }
+
+ return sum.toString(36);
+ }
+
+ /**
+ * Returns the index of an element within its parent
+ * @param {HTMLElement} el
+ * @return {number}
+ */
+ function _index(el) {
+ var index = 0;
+
+ if (!el || !el.parentNode) {
+ return -1;
+ }
+
+ while (el && (el = el.previousElementSibling)) {
+ if (el.nodeName.toUpperCase() !== 'TEMPLATE') {
+ index++;
+ }
+ }
+
+ return index;
+ }
+
+ function _throttle(callback, ms) {
+ var args, _this;
+
+ return function () {
+ if (args === void 0) {
+ args = arguments;
+ _this = this;
+
+ setTimeout(function () {
+ if (args.length === 1) {
+ callback.call(_this, args[0]);
+ } else {
+ callback.apply(_this, args);
+ }
+
+ args = void 0;
+ }, ms);
+ }
+ };
+ }
+
+ function _extend(dst, src) {
+ if (dst && src) {
+ for (var key in src) {
+ if (src.hasOwnProperty(key)) {
+ dst[key] = src[key];
+ }
+ }
+ }
+
+ return dst;
+ }
+
+
+ // Export utils
+ Sortable.utils = {
+ on: _on,
+ off: _off,
+ css: _css,
+ find: _find,
+ is: function (el, selector) {
+ return !!_closest(el, selector, el);
+ },
+ extend: _extend,
+ throttle: _throttle,
+ closest: _closest,
+ toggleClass: _toggleClass,
+ index: _index
+ };
+
+
+ /**
+ * Create sortable instance
+ * @param {HTMLElement} el
+ * @param {Object} [options]
+ */
+ Sortable.create = function (el, options) {
+ return new Sortable(el, options);
+ };
+
+
+ // Export
+ Sortable.version = '1.4.2';
+ return Sortable;
+ });
+
+
+/***/ },
+
+/***/ 217:
+/***/ function(module, exports, __webpack_require__) {
+
+ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
+ * selectize.js (v0.12.1)
+ * Copyright (c) 2013–2015 Brian Reavis & contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
+ * file except in compliance with the License. You may obtain a copy of the License at:
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
+ * ANY KIND, either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ *
+ * @author Brian Reavis
+ */
+
+ /*jshint curly:false */
+ /*jshint browser:true */
+
+ (function(root, factory) {
+ if (true) {
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(196),__webpack_require__(218),__webpack_require__(219)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+ } else if (typeof exports === 'object') {
+ module.exports = factory(require('jquery'), require('sifter'), require('microplugin'));
+ } else {
+ root.Selectize = factory(root.jQuery, root.Sifter, root.MicroPlugin);
+ }
+ }(this, function($, Sifter, MicroPlugin) {
+ 'use strict';
+
+ var highlight = function($element, pattern) {
+ if (typeof pattern === 'string' && !pattern.length) return;
+ var regex = (typeof pattern === 'string') ? new RegExp(pattern, 'i') : pattern;
+
+ var highlight = function(node) {
+ var skip = 0;
+ if (node.nodeType === 3) {
+ var pos = node.data.search(regex);
+ if (pos >= 0 && node.data.length > 0) {
+ var match = node.data.match(regex);
+ var spannode = document.createElement('span');
+ spannode.className = 'highlight';
+ var middlebit = node.splitText(pos);
+ var endbit = middlebit.splitText(match[0].length);
+ var middleclone = middlebit.cloneNode(true);
+ spannode.appendChild(middleclone);
+ middlebit.parentNode.replaceChild(spannode, middlebit);
+ skip = 1;
+ }
+ } else if (node.nodeType === 1 && node.childNodes && !/(script|style)/i.test(node.tagName)) {
+ for (var i = 0; i < node.childNodes.length; ++i) {
+ i += highlight(node.childNodes[i]);
+ }
+ }
+ return skip;
+ };
+
+ return $element.each(function() {
+ highlight(this);
+ });
+ };
+
+ var MicroEvent = function() {};
+ MicroEvent.prototype = {
+ on: function(event, fct){
+ this._events = this._events || {};
+ this._events[event] = this._events[event] || [];
+ this._events[event].push(fct);
+ },
+ off: function(event, fct){
+ var n = arguments.length;
+ if (n === 0) return delete this._events;
+ if (n === 1) return delete this._events[event];
+
+ this._events = this._events || {};
+ if (event in this._events === false) return;
+ this._events[event].splice(this._events[event].indexOf(fct), 1);
+ },
+ trigger: function(event /* , args... */){
+ this._events = this._events || {};
+ if (event in this._events === false) return;
+ for (var i = 0; i < this._events[event].length; i++){
+ this._events[event][i].apply(this, Array.prototype.slice.call(arguments, 1));
+ }
+ }
+ };
+
+ /**
+ * Mixin will delegate all MicroEvent.js function in the destination object.
+ *
+ * - MicroEvent.mixin(Foobar) will make Foobar able to use MicroEvent
+ *
+ * @param {object} the object which will support MicroEvent
+ */
+ MicroEvent.mixin = function(destObject){
+ var props = ['on', 'off', 'trigger'];
+ for (var i = 0; i < props.length; i++){
+ destObject.prototype[props[i]] = MicroEvent.prototype[props[i]];
+ }
+ };
+
+ var IS_MAC = /Mac/.test(navigator.userAgent);
+
+ var KEY_A = 65;
+ var KEY_COMMA = 188;
+ var KEY_RETURN = 13;
+ var KEY_ESC = 27;
+ var KEY_LEFT = 37;
+ var KEY_UP = 38;
+ var KEY_P = 80;
+ var KEY_RIGHT = 39;
+ var KEY_DOWN = 40;
+ var KEY_N = 78;
+ var KEY_BACKSPACE = 8;
+ var KEY_DELETE = 46;
+ var KEY_SHIFT = 16;
+ var KEY_CMD = IS_MAC ? 91 : 17;
+ var KEY_CTRL = IS_MAC ? 18 : 17;
+ var KEY_TAB = 9;
+
+ var TAG_SELECT = 1;
+ var TAG_INPUT = 2;
+
+ // for now, android support in general is too spotty to support validity
+ var SUPPORTS_VALIDITY_API = !/android/i.test(window.navigator.userAgent) && !!document.createElement('form').validity;
+
+ var isset = function(object) {
+ return typeof object !== 'undefined';
+ };
+
+ /**
+ * Converts a scalar to its best string representation
+ * for hash keys and HTML attribute values.
+ *
+ * Transformations:
+ * 'str' -> 'str'
+ * null -> ''
+ * undefined -> ''
+ * true -> '1'
+ * false -> '0'
+ * 0 -> '0'
+ * 1 -> '1'
+ *
+ * @param {string} value
+ * @returns {string|null}
+ */
+ var hash_key = function(value) {
+ if (typeof value === 'undefined' || value === null) return null;
+ if (typeof value === 'boolean') return value ? '1' : '0';
+ return value + '';
+ };
+
+ /**
+ * Escapes a string for use within HTML.
+ *
+ * @param {string} str
+ * @returns {string}
+ */
+ var escape_html = function(str) {
+ return (str + '')
+ .replace(/&/g, '&')
+ .replace(//g, '>')
+ .replace(/"/g, '"');
+ };
+
+ /**
+ * Escapes "$" characters in replacement strings.
+ *
+ * @param {string} str
+ * @returns {string}
+ */
+ var escape_replace = function(str) {
+ return (str + '').replace(/\$/g, '$$$$');
+ };
+
+ var hook = {};
+
+ /**
+ * Wraps `method` on `self` so that `fn`
+ * is invoked before the original method.
+ *
+ * @param {object} self
+ * @param {string} method
+ * @param {function} fn
+ */
+ hook.before = function(self, method, fn) {
+ var original = self[method];
+ self[method] = function() {
+ fn.apply(self, arguments);
+ return original.apply(self, arguments);
+ };
+ };
+
+ /**
+ * Wraps `method` on `self` so that `fn`
+ * is invoked after the original method.
+ *
+ * @param {object} self
+ * @param {string} method
+ * @param {function} fn
+ */
+ hook.after = function(self, method, fn) {
+ var original = self[method];
+ self[method] = function() {
+ var result = original.apply(self, arguments);
+ fn.apply(self, arguments);
+ return result;
+ };
+ };
+
+ /**
+ * Wraps `fn` so that it can only be invoked once.
+ *
+ * @param {function} fn
+ * @returns {function}
+ */
+ var once = function(fn) {
+ var called = false;
+ return function() {
+ if (called) return;
+ called = true;
+ fn.apply(this, arguments);
+ };
+ };
+
+ /**
+ * Wraps `fn` so that it can only be called once
+ * every `delay` milliseconds (invoked on the falling edge).
+ *
+ * @param {function} fn
+ * @param {int} delay
+ * @returns {function}
+ */
+ var debounce = function(fn, delay) {
+ var timeout;
+ return function() {
+ var self = this;
+ var args = arguments;
+ window.clearTimeout(timeout);
+ timeout = window.setTimeout(function() {
+ fn.apply(self, args);
+ }, delay);
+ };
+ };
+
+ /**
+ * Debounce all fired events types listed in `types`
+ * while executing the provided `fn`.
+ *
+ * @param {object} self
+ * @param {array} types
+ * @param {function} fn
+ */
+ var debounce_events = function(self, types, fn) {
+ var type;
+ var trigger = self.trigger;
+ var event_args = {};
+
+ // override trigger method
+ self.trigger = function() {
+ var type = arguments[0];
+ if (types.indexOf(type) !== -1) {
+ event_args[type] = arguments;
+ } else {
+ return trigger.apply(self, arguments);
+ }
+ };
+
+ // invoke provided function
+ fn.apply(self, []);
+ self.trigger = trigger;
+
+ // trigger queued events
+ for (type in event_args) {
+ if (event_args.hasOwnProperty(type)) {
+ trigger.apply(self, event_args[type]);
+ }
+ }
+ };
+
+ /**
+ * A workaround for http://bugs.jquery.com/ticket/6696
+ *
+ * @param {object} $parent - Parent element to listen on.
+ * @param {string} event - Event name.
+ * @param {string} selector - Descendant selector to filter by.
+ * @param {function} fn - Event handler.
+ */
+ var watchChildEvent = function($parent, event, selector, fn) {
+ $parent.on(event, selector, function(e) {
+ var child = e.target;
+ while (child && child.parentNode !== $parent[0]) {
+ child = child.parentNode;
+ }
+ e.currentTarget = child;
+ return fn.apply(this, [e]);
+ });
+ };
+
+ /**
+ * Determines the current selection within a text input control.
+ * Returns an object containing:
+ * - start
+ * - length
+ *
+ * @param {object} input
+ * @returns {object}
+ */
+ var getSelection = function(input) {
+ var result = {};
+ if ('selectionStart' in input) {
+ result.start = input.selectionStart;
+ result.length = input.selectionEnd - result.start;
+ } else if (document.selection) {
+ input.focus();
+ var sel = document.selection.createRange();
+ var selLen = document.selection.createRange().text.length;
+ sel.moveStart('character', -input.value.length);
+ result.start = sel.text.length - selLen;
+ result.length = selLen;
+ }
+ return result;
+ };
+
+ /**
+ * Copies CSS properties from one element to another.
+ *
+ * @param {object} $from
+ * @param {object} $to
+ * @param {array} properties
+ */
+ var transferStyles = function($from, $to, properties) {
+ var i, n, styles = {};
+ if (properties) {
+ for (i = 0, n = properties.length; i < n; i++) {
+ styles[properties[i]] = $from.css(properties[i]);
+ }
+ } else {
+ styles = $from.css();
+ }
+ $to.css(styles);
+ };
+
+ /**
+ * Measures the width of a string within a
+ * parent element (in pixels).
+ *
+ * @param {string} str
+ * @param {object} $parent
+ * @returns {int}
+ */
+ var measureString = function(str, $parent) {
+ if (!str) {
+ return 0;
+ }
+
+ var $test = $('').css({
+ position: 'absolute',
+ top: -99999,
+ left: -99999,
+ width: 'auto',
+ padding: 0,
+ whiteSpace: 'pre'
+ }).text(str).appendTo('body');
+
+ transferStyles($parent, $test, [
+ 'letterSpacing',
+ 'fontSize',
+ 'fontFamily',
+ 'fontWeight',
+ 'textTransform'
+ ]);
+
+ var width = $test.width();
+ $test.remove();
+
+ return width;
+ };
+
+ /**
+ * Sets up an input to grow horizontally as the user
+ * types. If the value is changed manually, you can
+ * trigger the "update" handler to resize:
+ *
+ * $input.trigger('update');
+ *
+ * @param {object} $input
+ */
+ var autoGrow = function($input) {
+ var currentWidth = null;
+
+ var update = function(e, options) {
+ var value, keyCode, printable, placeholder, width;
+ var shift, character, selection;
+ e = e || window.event || {};
+ options = options || {};
+
+ if (e.metaKey || e.altKey) return;
+ if (!options.force && $input.data('grow') === false) return;
+
+ value = $input.val();
+ if (e.type && e.type.toLowerCase() === 'keydown') {
+ keyCode = e.keyCode;
+ printable = (
+ (keyCode >= 97 && keyCode <= 122) || // a-z
+ (keyCode >= 65 && keyCode <= 90) || // A-Z
+ (keyCode >= 48 && keyCode <= 57) || // 0-9
+ keyCode === 32 // space
+ );
+
+ if (keyCode === KEY_DELETE || keyCode === KEY_BACKSPACE) {
+ selection = getSelection($input[0]);
+ if (selection.length) {
+ value = value.substring(0, selection.start) + value.substring(selection.start + selection.length);
+ } else if (keyCode === KEY_BACKSPACE && selection.start) {
+ value = value.substring(0, selection.start - 1) + value.substring(selection.start + 1);
+ } else if (keyCode === KEY_DELETE && typeof selection.start !== 'undefined') {
+ value = value.substring(0, selection.start) + value.substring(selection.start + 1);
+ }
+ } else if (printable) {
+ shift = e.shiftKey;
+ character = String.fromCharCode(e.keyCode);
+ if (shift) character = character.toUpperCase();
+ else character = character.toLowerCase();
+ value += character;
+ }
+ }
+
+ placeholder = $input.attr('placeholder');
+ if (!value && placeholder) {
+ value = placeholder;
+ }
+
+ width = measureString(value, $input) + 4;
+ if (width !== currentWidth) {
+ currentWidth = width;
+ $input.width(width);
+ $input.triggerHandler('resize');
+ }
+ };
+
+ $input.on('keydown keyup update blur', update);
+ update();
+ };
+
+ var Selectize = function($input, settings) {
+ var key, i, n, dir, input, self = this;
+ input = $input[0];
+ input.selectize = self;
+
+ // detect rtl environment
+ var computedStyle = window.getComputedStyle && window.getComputedStyle(input, null);
+ dir = computedStyle ? computedStyle.getPropertyValue('direction') : input.currentStyle && input.currentStyle.direction;
+ dir = dir || $input.parents('[dir]:first').attr('dir') || '';
+
+ // setup default state
+ $.extend(self, {
+ order : 0,
+ settings : settings,
+ $input : $input,
+ tabIndex : $input.attr('tabindex') || '',
+ tagType : input.tagName.toLowerCase() === 'select' ? TAG_SELECT : TAG_INPUT,
+ rtl : /rtl/i.test(dir),
+
+ eventNS : '.selectize' + (++Selectize.count),
+ highlightedValue : null,
+ isOpen : false,
+ isDisabled : false,
+ isRequired : $input.is('[required]'),
+ isInvalid : false,
+ isLocked : false,
+ isFocused : false,
+ isInputHidden : false,
+ isSetup : false,
+ isShiftDown : false,
+ isCmdDown : false,
+ isCtrlDown : false,
+ ignoreFocus : false,
+ ignoreBlur : false,
+ ignoreHover : false,
+ hasOptions : false,
+ currentResults : null,
+ lastValue : '',
+ caretPos : 0,
+ loading : 0,
+ loadedSearches : {},
+
+ $activeOption : null,
+ $activeItems : [],
+
+ optgroups : {},
+ options : {},
+ userOptions : {},
+ items : [],
+ renderCache : {},
+ onSearchChange : settings.loadThrottle === null ? self.onSearchChange : debounce(self.onSearchChange, settings.loadThrottle)
+ });
+
+ // search system
+ self.sifter = new Sifter(this.options, {diacritics: settings.diacritics});
+
+ // build options table
+ if (self.settings.options) {
+ for (i = 0, n = self.settings.options.length; i < n; i++) {
+ self.registerOption(self.settings.options[i]);
+ }
+ delete self.settings.options;
+ }
+
+ // build optgroup table
+ if (self.settings.optgroups) {
+ for (i = 0, n = self.settings.optgroups.length; i < n; i++) {
+ self.registerOptionGroup(self.settings.optgroups[i]);
+ }
+ delete self.settings.optgroups;
+ }
+
+ // option-dependent defaults
+ self.settings.mode = self.settings.mode || (self.settings.maxItems === 1 ? 'single' : 'multi');
+ if (typeof self.settings.hideSelected !== 'boolean') {
+ self.settings.hideSelected = self.settings.mode === 'multi';
+ }
+
+ self.initializePlugins(self.settings.plugins);
+ self.setupCallbacks();
+ self.setupTemplates();
+ self.setup();
+ };
+
+ // mixins
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+ MicroEvent.mixin(Selectize);
+ MicroPlugin.mixin(Selectize);
+
+ // methods
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+ $.extend(Selectize.prototype, {
+
+ /**
+ * Creates all elements and sets up event bindings.
+ */
+ setup: function() {
+ var self = this;
+ var settings = self.settings;
+ var eventNS = self.eventNS;
+ var $window = $(window);
+ var $document = $(document);
+ var $input = self.$input;
+
+ var $wrapper;
+ var $control;
+ var $control_input;
+ var $dropdown;
+ var $dropdown_content;
+ var $dropdown_parent;
+ var inputMode;
+ var timeout_blur;
+ var timeout_focus;
+ var classes;
+ var classes_plugins;
+
+ inputMode = self.settings.mode;
+ classes = $input.attr('class') || '';
+
+ $wrapper = $('').addClass(settings.wrapperClass).addClass(classes).addClass(inputMode);
+ $control = $('
').addClass(settings.inputClass).addClass('items').appendTo($wrapper);
+ $control_input = $('
').appendTo($control).attr('tabindex', $input.is(':disabled') ? '-1' : self.tabIndex);
+ $dropdown_parent = $(settings.dropdownParent || $wrapper);
+ $dropdown = $('
').addClass(settings.dropdownClass).addClass(inputMode).hide().appendTo($dropdown_parent);
+ $dropdown_content = $('
').addClass(settings.dropdownContentClass).appendTo($dropdown);
+
+ if(self.settings.copyClassesToDropdown) {
+ $dropdown.addClass(classes);
+ }
+
+ $wrapper.css({
+ width: $input[0].style.width
+ });
+
+ if (self.plugins.names.length) {
+ classes_plugins = 'plugin-' + self.plugins.names.join(' plugin-');
+ $wrapper.addClass(classes_plugins);
+ $dropdown.addClass(classes_plugins);
+ }
+
+ if ((settings.maxItems === null || settings.maxItems > 1) && self.tagType === TAG_SELECT) {
+ $input.attr('multiple', 'multiple');
+ }
+
+ if (self.settings.placeholder) {
+ $control_input.attr('placeholder', settings.placeholder);
+ }
+
+ // if splitOn was not passed in, construct it from the delimiter to allow pasting universally
+ if (!self.settings.splitOn && self.settings.delimiter) {
+ var delimiterEscaped = self.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
+ self.settings.splitOn = new RegExp('\\s*' + delimiterEscaped + '+\\s*');
+ }
+
+ if ($input.attr('autocorrect')) {
+ $control_input.attr('autocorrect', $input.attr('autocorrect'));
+ }
+
+ if ($input.attr('autocapitalize')) {
+ $control_input.attr('autocapitalize', $input.attr('autocapitalize'));
+ }
+
+ self.$wrapper = $wrapper;
+ self.$control = $control;
+ self.$control_input = $control_input;
+ self.$dropdown = $dropdown;
+ self.$dropdown_content = $dropdown_content;
+
+ $dropdown.on('mouseenter', '[data-selectable]', function() { return self.onOptionHover.apply(self, arguments); });
+ $dropdown.on('mousedown click', '[data-selectable]', function() { return self.onOptionSelect.apply(self, arguments); });
+ watchChildEvent($control, 'mousedown', '*:not(input)', function() { return self.onItemSelect.apply(self, arguments); });
+ autoGrow($control_input);
+
+ $control.on({
+ mousedown : function() { return self.onMouseDown.apply(self, arguments); },
+ click : function() { return self.onClick.apply(self, arguments); }
+ });
+
+ $control_input.on({
+ mousedown : function(e) { e.stopPropagation(); },
+ keydown : function() { return self.onKeyDown.apply(self, arguments); },
+ keyup : function() { return self.onKeyUp.apply(self, arguments); },
+ keypress : function() { return self.onKeyPress.apply(self, arguments); },
+ resize : function() { self.positionDropdown.apply(self, []); },
+ blur : function() { return self.onBlur.apply(self, arguments); },
+ focus : function() { self.ignoreBlur = false; return self.onFocus.apply(self, arguments); },
+ paste : function() { return self.onPaste.apply(self, arguments); }
+ });
+
+ $document.on('keydown' + eventNS, function(e) {
+ self.isCmdDown = e[IS_MAC ? 'metaKey' : 'ctrlKey'];
+ self.isCtrlDown = e[IS_MAC ? 'altKey' : 'ctrlKey'];
+ self.isShiftDown = e.shiftKey;
+ });
+
+ $document.on('keyup' + eventNS, function(e) {
+ if (e.keyCode === KEY_CTRL) self.isCtrlDown = false;
+ if (e.keyCode === KEY_SHIFT) self.isShiftDown = false;
+ if (e.keyCode === KEY_CMD) self.isCmdDown = false;
+ });
+
+ $document.on('mousedown' + eventNS, function(e) {
+ if (self.isFocused) {
+ // prevent events on the dropdown scrollbar from causing the control to blur
+ if (e.target === self.$dropdown[0] || e.target.parentNode === self.$dropdown[0]) {
+ return false;
+ }
+ // blur on click outside
+ if (!self.$control.has(e.target).length && e.target !== self.$control[0]) {
+ self.blur(e.target);
+ }
+ }
+ });
+
+ $window.on(['scroll' + eventNS, 'resize' + eventNS].join(' '), function() {
+ if (self.isOpen) {
+ self.positionDropdown.apply(self, arguments);
+ }
+ });
+ $window.on('mousemove' + eventNS, function() {
+ self.ignoreHover = false;
+ });
+
+ // store original children and tab index so that they can be
+ // restored when the destroy() method is called.
+ this.revertSettings = {
+ $children : $input.children().detach(),
+ tabindex : $input.attr('tabindex')
+ };
+
+ $input.attr('tabindex', -1).hide().after(self.$wrapper);
+
+ if ($.isArray(settings.items)) {
+ self.setValue(settings.items);
+ delete settings.items;
+ }
+
+ // feature detect for the validation API
+ if (SUPPORTS_VALIDITY_API) {
+ $input.on('invalid' + eventNS, function(e) {
+ e.preventDefault();
+ self.isInvalid = true;
+ self.refreshState();
+ });
+ }
+
+ self.updateOriginalInput();
+ self.refreshItems();
+ self.refreshState();
+ self.updatePlaceholder();
+ self.isSetup = true;
+
+ if ($input.is(':disabled')) {
+ self.disable();
+ }
+
+ self.on('change', this.onChange);
+
+ $input.data('selectize', self);
+ $input.addClass('selectized');
+ self.trigger('initialize');
+
+ // preload options
+ if (settings.preload === true) {
+ self.onSearchChange('');
+ }
+
+ },
+
+ /**
+ * Sets up default rendering functions.
+ */
+ setupTemplates: function() {
+ var self = this;
+ var field_label = self.settings.labelField;
+ var field_optgroup = self.settings.optgroupLabelField;
+
+ var templates = {
+ 'optgroup': function(data) {
+ return '
' + data.html + '
';
+ },
+ 'optgroup_header': function(data, escape) {
+ return '';
+ },
+ 'option': function(data, escape) {
+ return '
' + escape(data[field_label]) + '
';
+ },
+ 'item': function(data, escape) {
+ return '
' + escape(data[field_label]) + '
';
+ },
+ 'option_create': function(data, escape) {
+ return '
Add ' + escape(data.input) + ' …
';
+ }
+ };
+
+ self.settings.render = $.extend({}, templates, self.settings.render);
+ },
+
+ /**
+ * Maps fired events to callbacks provided
+ * in the settings used when creating the control.
+ */
+ setupCallbacks: function() {
+ var key, fn, callbacks = {
+ 'initialize' : 'onInitialize',
+ 'change' : 'onChange',
+ 'item_add' : 'onItemAdd',
+ 'item_remove' : 'onItemRemove',
+ 'clear' : 'onClear',
+ 'option_add' : 'onOptionAdd',
+ 'option_remove' : 'onOptionRemove',
+ 'option_clear' : 'onOptionClear',
+ 'optgroup_add' : 'onOptionGroupAdd',
+ 'optgroup_remove' : 'onOptionGroupRemove',
+ 'optgroup_clear' : 'onOptionGroupClear',
+ 'dropdown_open' : 'onDropdownOpen',
+ 'dropdown_close' : 'onDropdownClose',
+ 'type' : 'onType',
+ 'load' : 'onLoad',
+ 'focus' : 'onFocus',
+ 'blur' : 'onBlur'
+ };
+
+ for (key in callbacks) {
+ if (callbacks.hasOwnProperty(key)) {
+ fn = this.settings[callbacks[key]];
+ if (fn) this.on(key, fn);
+ }
+ }
+ },
+
+ /**
+ * Triggered when the main control element
+ * has a click event.
+ *
+ * @param {object} e
+ * @return {boolean}
+ */
+ onClick: function(e) {
+ var self = this;
+
+ // necessary for mobile webkit devices (manual focus triggering
+ // is ignored unless invoked within a click event)
+ if (!self.isFocused) {
+ self.focus();
+ e.preventDefault();
+ }
+ },
+
+ /**
+ * Triggered when the main control element
+ * has a mouse down event.
+ *
+ * @param {object} e
+ * @return {boolean}
+ */
+ onMouseDown: function(e) {
+ var self = this;
+ var defaultPrevented = e.isDefaultPrevented();
+ var $target = $(e.target);
+
+ if (self.isFocused) {
+ // retain focus by preventing native handling. if the
+ // event target is the input it should not be modified.
+ // otherwise, text selection within the input won't work.
+ if (e.target !== self.$control_input[0]) {
+ if (self.settings.mode === 'single') {
+ // toggle dropdown
+ self.isOpen ? self.close() : self.open();
+ } else if (!defaultPrevented) {
+ self.setActiveItem(null);
+ }
+ return false;
+ }
+ } else {
+ // give control focus
+ if (!defaultPrevented) {
+ window.setTimeout(function() {
+ self.focus();
+ }, 0);
+ }
+ }
+ },
+
+ /**
+ * Triggered when the value of the control has been changed.
+ * This should propagate the event to the original DOM
+ * input / select element.
+ */
+ onChange: function() {
+ this.$input.trigger('change');
+ },
+
+ /**
+ * Triggered on
paste.
+ *
+ * @param {object} e
+ * @returns {boolean}
+ */
+ onPaste: function(e) {
+ var self = this;
+ if (self.isFull() || self.isInputHidden || self.isLocked) {
+ e.preventDefault();
+ } else {
+ // If a regex or string is included, this will split the pasted
+ // input and create Items for each separate value
+ if (self.settings.splitOn) {
+ setTimeout(function() {
+ var splitInput = $.trim(self.$control_input.val() || '').split(self.settings.splitOn);
+ for (var i = 0, n = splitInput.length; i < n; i++) {
+ self.createItem(splitInput[i]);
+ }
+ }, 0);
+ }
+ }
+ },
+
+ /**
+ * Triggered on
keypress.
+ *
+ * @param {object} e
+ * @returns {boolean}
+ */
+ onKeyPress: function(e) {
+ if (this.isLocked) return e && e.preventDefault();
+ var character = String.fromCharCode(e.keyCode || e.which);
+ if (this.settings.create && this.settings.mode === 'multi' && character === this.settings.delimiter) {
+ this.createItem();
+ e.preventDefault();
+ return false;
+ }
+ },
+
+ /**
+ * Triggered on
keydown.
+ *
+ * @param {object} e
+ * @returns {boolean}
+ */
+ onKeyDown: function(e) {
+ var isInput = e.target === this.$control_input[0];
+ var self = this;
+
+ if (self.isLocked) {
+ if (e.keyCode !== KEY_TAB) {
+ e.preventDefault();
+ }
+ return;
+ }
+
+ switch (e.keyCode) {
+ case KEY_A:
+ if (self.isCmdDown) {
+ self.selectAll();
+ return;
+ }
+ break;
+ case KEY_ESC:
+ if (self.isOpen) {
+ e.preventDefault();
+ e.stopPropagation();
+ self.close();
+ }
+ return;
+ case KEY_N:
+ if (!e.ctrlKey || e.altKey) break;
+ case KEY_DOWN:
+ if (!self.isOpen && self.hasOptions) {
+ self.open();
+ } else if (self.$activeOption) {
+ self.ignoreHover = true;
+ var $next = self.getAdjacentOption(self.$activeOption, 1);
+ if ($next.length) self.setActiveOption($next, true, true);
+ }
+ e.preventDefault();
+ return;
+ case KEY_P:
+ if (!e.ctrlKey || e.altKey) break;
+ case KEY_UP:
+ if (self.$activeOption) {
+ self.ignoreHover = true;
+ var $prev = self.getAdjacentOption(self.$activeOption, -1);
+ if ($prev.length) self.setActiveOption($prev, true, true);
+ }
+ e.preventDefault();
+ return;
+ case KEY_RETURN:
+ if (self.isOpen && self.$activeOption) {
+ self.onOptionSelect({currentTarget: self.$activeOption});
+ e.preventDefault();
+ }
+ return;
+ case KEY_LEFT:
+ self.advanceSelection(-1, e);
+ return;
+ case KEY_RIGHT:
+ self.advanceSelection(1, e);
+ return;
+ case KEY_TAB:
+ if (self.settings.selectOnTab && self.isOpen && self.$activeOption) {
+ self.onOptionSelect({currentTarget: self.$activeOption});
+
+ // Default behaviour is to jump to the next field, we only want this
+ // if the current field doesn't accept any more entries
+ if (!self.isFull()) {
+ e.preventDefault();
+ }
+ }
+ if (self.settings.create && self.createItem()) {
+ e.preventDefault();
+ }
+ return;
+ case KEY_BACKSPACE:
+ case KEY_DELETE:
+ self.deleteSelection(e);
+ return;
+ }
+
+ if ((self.isFull() || self.isInputHidden) && !(IS_MAC ? e.metaKey : e.ctrlKey)) {
+ e.preventDefault();
+ return;
+ }
+ },
+
+ /**
+ * Triggered on
keyup.
+ *
+ * @param {object} e
+ * @returns {boolean}
+ */
+ onKeyUp: function(e) {
+ var self = this;
+
+ if (self.isLocked) return e && e.preventDefault();
+ var value = self.$control_input.val() || '';
+ if (self.lastValue !== value) {
+ self.lastValue = value;
+ self.onSearchChange(value);
+ self.refreshOptions();
+ self.trigger('type', value);
+ }
+ },
+
+ /**
+ * Invokes the user-provide option provider / loader.
+ *
+ * Note: this function is debounced in the Selectize
+ * constructor (by `settings.loadDelay` milliseconds)
+ *
+ * @param {string} value
+ */
+ onSearchChange: function(value) {
+ var self = this;
+ var fn = self.settings.load;
+ if (!fn) return;
+ if (self.loadedSearches.hasOwnProperty(value)) return;
+ self.loadedSearches[value] = true;
+ self.load(function(callback) {
+ fn.apply(self, [value, callback]);
+ });
+ },
+
+ /**
+ * Triggered on
focus.
+ *
+ * @param {object} e (optional)
+ * @returns {boolean}
+ */
+ onFocus: function(e) {
+ var self = this;
+ var wasFocused = self.isFocused;
+
+ if (self.isDisabled) {
+ self.blur();
+ e && e.preventDefault();
+ return false;
+ }
+
+ if (self.ignoreFocus) return;
+ self.isFocused = true;
+ if (self.settings.preload === 'focus') self.onSearchChange('');
+
+ if (!wasFocused) self.trigger('focus');
+
+ if (!self.$activeItems.length) {
+ self.showInput();
+ self.setActiveItem(null);
+ self.refreshOptions(!!self.settings.openOnFocus);
+ }
+
+ self.refreshState();
+ },
+
+ /**
+ * Triggered on
blur.
+ *
+ * @param {object} e
+ * @param {Element} dest
+ */
+ onBlur: function(e, dest) {
+ var self = this;
+ if (!self.isFocused) return;
+ self.isFocused = false;
+
+ if (self.ignoreFocus) {
+ return;
+ } else if (!self.ignoreBlur && document.activeElement === self.$dropdown_content[0]) {
+ // necessary to prevent IE closing the dropdown when the scrollbar is clicked
+ self.ignoreBlur = true;
+ self.onFocus(e);
+ return;
+ }
+
+ var deactivate = function() {
+ self.close();
+ self.setTextboxValue('');
+ self.setActiveItem(null);
+ self.setActiveOption(null);
+ self.setCaret(self.items.length);
+ self.refreshState();
+
+ // IE11 bug: element still marked as active
+ (dest || document.body).focus();
+
+ self.ignoreFocus = false;
+ self.trigger('blur');
+ };
+
+ self.ignoreFocus = true;
+ if (self.settings.create && self.settings.createOnBlur) {
+ self.createItem(null, false, deactivate);
+ } else {
+ deactivate();
+ }
+ },
+
+ /**
+ * Triggered when the user rolls over
+ * an option in the autocomplete dropdown menu.
+ *
+ * @param {object} e
+ * @returns {boolean}
+ */
+ onOptionHover: function(e) {
+ if (this.ignoreHover) return;
+ this.setActiveOption(e.currentTarget, false);
+ },
+
+ /**
+ * Triggered when the user clicks on an option
+ * in the autocomplete dropdown menu.
+ *
+ * @param {object} e
+ * @returns {boolean}
+ */
+ onOptionSelect: function(e) {
+ var value, $target, $option, self = this;
+
+ if (e.preventDefault) {
+ e.preventDefault();
+ e.stopPropagation();
+ }
+
+ $target = $(e.currentTarget);
+ if ($target.hasClass('create')) {
+ self.createItem(null, function() {
+ if (self.settings.closeAfterSelect) {
+ self.close();
+ }
+ });
+ } else {
+ value = $target.attr('data-value');
+ if (typeof value !== 'undefined') {
+ self.lastQuery = null;
+ self.setTextboxValue('');
+ self.addItem(value);
+ if (self.settings.closeAfterSelect) {
+ self.close();
+ } else if (!self.settings.hideSelected && e.type && /mouse/.test(e.type)) {
+ self.setActiveOption(self.getOption(value));
+ }
+ }
+ }
+ },
+
+ /**
+ * Triggered when the user clicks on an item
+ * that has been selected.
+ *
+ * @param {object} e
+ * @returns {boolean}
+ */
+ onItemSelect: function(e) {
+ var self = this;
+
+ if (self.isLocked) return;
+ if (self.settings.mode === 'multi') {
+ e.preventDefault();
+ self.setActiveItem(e.currentTarget, e);
+ }
+ },
+
+ /**
+ * Invokes the provided method that provides
+ * results to a callback---which are then added
+ * as options to the control.
+ *
+ * @param {function} fn
+ */
+ load: function(fn) {
+ var self = this;
+ var $wrapper = self.$wrapper.addClass(self.settings.loadingClass);
+
+ self.loading++;
+ fn.apply(self, [function(results) {
+ self.loading = Math.max(self.loading - 1, 0);
+ if (results && results.length) {
+ self.addOption(results);
+ self.refreshOptions(self.isFocused && !self.isInputHidden);
+ }
+ if (!self.loading) {
+ $wrapper.removeClass(self.settings.loadingClass);
+ }
+ self.trigger('load', results);
+ }]);
+ },
+
+ /**
+ * Sets the input field of the control to the specified value.
+ *
+ * @param {string} value
+ */
+ setTextboxValue: function(value) {
+ var $input = this.$control_input;
+ var changed = $input.val() !== value;
+ if (changed) {
+ $input.val(value).triggerHandler('update');
+ this.lastValue = value;
+ }
+ },
+
+ /**
+ * Returns the value of the control. If multiple items
+ * can be selected (e.g.
), this returns
+ * an array. If only one item can be selected, this
+ * returns a string.
+ *
+ * @returns {mixed}
+ */
+ getValue: function() {
+ if (this.tagType === TAG_SELECT && this.$input.attr('multiple')) {
+ return this.items;
+ } else {
+ return this.items.join(this.settings.delimiter);
+ }
+ },
+
+ /**
+ * Resets the selected items to the given value.
+ *
+ * @param {mixed} value
+ */
+ setValue: function(value, silent) {
+ var events = silent ? [] : ['change'];
+
+ debounce_events(this, events, function() {
+ this.clear(silent);
+ this.addItems(value, silent);
+ });
+ },
+
+ /**
+ * Sets the selected item.
+ *
+ * @param {object} $item
+ * @param {object} e (optional)
+ */
+ setActiveItem: function($item, e) {
+ var self = this;
+ var eventName;
+ var i, idx, begin, end, item, swap;
+ var $last;
+
+ if (self.settings.mode === 'single') return;
+ $item = $($item);
+
+ // clear the active selection
+ if (!$item.length) {
+ $(self.$activeItems).removeClass('active');
+ self.$activeItems = [];
+ if (self.isFocused) {
+ self.showInput();
+ }
+ return;
+ }
+
+ // modify selection
+ eventName = e && e.type.toLowerCase();
+
+ if (eventName === 'mousedown' && self.isShiftDown && self.$activeItems.length) {
+ $last = self.$control.children('.active:last');
+ begin = Array.prototype.indexOf.apply(self.$control[0].childNodes, [$last[0]]);
+ end = Array.prototype.indexOf.apply(self.$control[0].childNodes, [$item[0]]);
+ if (begin > end) {
+ swap = begin;
+ begin = end;
+ end = swap;
+ }
+ for (i = begin; i <= end; i++) {
+ item = self.$control[0].childNodes[i];
+ if (self.$activeItems.indexOf(item) === -1) {
+ $(item).addClass('active');
+ self.$activeItems.push(item);
+ }
+ }
+ e.preventDefault();
+ } else if ((eventName === 'mousedown' && self.isCtrlDown) || (eventName === 'keydown' && this.isShiftDown)) {
+ if ($item.hasClass('active')) {
+ idx = self.$activeItems.indexOf($item[0]);
+ self.$activeItems.splice(idx, 1);
+ $item.removeClass('active');
+ } else {
+ self.$activeItems.push($item.addClass('active')[0]);
+ }
+ } else {
+ $(self.$activeItems).removeClass('active');
+ self.$activeItems = [$item.addClass('active')[0]];
+ }
+
+ // ensure control has focus
+ self.hideInput();
+ if (!this.isFocused) {
+ self.focus();
+ }
+ },
+
+ /**
+ * Sets the selected item in the dropdown menu
+ * of available options.
+ *
+ * @param {object} $object
+ * @param {boolean} scroll
+ * @param {boolean} animate
+ */
+ setActiveOption: function($option, scroll, animate) {
+ var height_menu, height_item, y;
+ var scroll_top, scroll_bottom;
+ var self = this;
+
+ if (self.$activeOption) self.$activeOption.removeClass('active');
+ self.$activeOption = null;
+
+ $option = $($option);
+ if (!$option.length) return;
+
+ self.$activeOption = $option.addClass('active');
+
+ if (scroll || !isset(scroll)) {
+
+ height_menu = self.$dropdown_content.height();
+ height_item = self.$activeOption.outerHeight(true);
+ scroll = self.$dropdown_content.scrollTop() || 0;
+ y = self.$activeOption.offset().top - self.$dropdown_content.offset().top + scroll;
+ scroll_top = y;
+ scroll_bottom = y - height_menu + height_item;
+
+ if (y + height_item > height_menu + scroll) {
+ self.$dropdown_content.stop().animate({scrollTop: scroll_bottom}, animate ? self.settings.scrollDuration : 0);
+ } else if (y < scroll) {
+ self.$dropdown_content.stop().animate({scrollTop: scroll_top}, animate ? self.settings.scrollDuration : 0);
+ }
+
+ }
+ },
+
+ /**
+ * Selects all items (CTRL + A).
+ */
+ selectAll: function() {
+ var self = this;
+ if (self.settings.mode === 'single') return;
+
+ self.$activeItems = Array.prototype.slice.apply(self.$control.children(':not(input)').addClass('active'));
+ if (self.$activeItems.length) {
+ self.hideInput();
+ self.close();
+ }
+ self.focus();
+ },
+
+ /**
+ * Hides the input element out of view, while
+ * retaining its focus.
+ */
+ hideInput: function() {
+ var self = this;
+
+ self.setTextboxValue('');
+ self.$control_input.css({opacity: 0, position: 'absolute', left: self.rtl ? 10000 : -10000});
+ self.isInputHidden = true;
+ },
+
+ /**
+ * Restores input visibility.
+ */
+ showInput: function() {
+ this.$control_input.css({opacity: 1, position: 'relative', left: 0});
+ this.isInputHidden = false;
+ },
+
+ /**
+ * Gives the control focus.
+ */
+ focus: function() {
+ var self = this;
+ if (self.isDisabled) return;
+
+ self.ignoreFocus = true;
+ self.$control_input[0].focus();
+ window.setTimeout(function() {
+ self.ignoreFocus = false;
+ self.onFocus();
+ }, 0);
+ },
+
+ /**
+ * Forces the control out of focus.
+ *
+ * @param {Element} dest
+ */
+ blur: function(dest) {
+ this.$control_input[0].blur();
+ this.onBlur(null, dest);
+ },
+
+ /**
+ * Returns a function that scores an object
+ * to show how good of a match it is to the
+ * provided query.
+ *
+ * @param {string} query
+ * @param {object} options
+ * @return {function}
+ */
+ getScoreFunction: function(query) {
+ return this.sifter.getScoreFunction(query, this.getSearchOptions());
+ },
+
+ /**
+ * Returns search options for sifter (the system
+ * for scoring and sorting results).
+ *
+ * @see https://github.com/brianreavis/sifter.js
+ * @return {object}
+ */
+ getSearchOptions: function() {
+ var settings = this.settings;
+ var sort = settings.sortField;
+ if (typeof sort === 'string') {
+ sort = [{field: sort}];
+ }
+
+ return {
+ fields : settings.searchField,
+ conjunction : settings.searchConjunction,
+ sort : sort
+ };
+ },
+
+ /**
+ * Searches through available options and returns
+ * a sorted array of matches.
+ *
+ * Returns an object containing:
+ *
+ * - query {string}
+ * - tokens {array}
+ * - total {int}
+ * - items {array}
+ *
+ * @param {string} query
+ * @returns {object}
+ */
+ search: function(query) {
+ var i, value, score, result, calculateScore;
+ var self = this;
+ var settings = self.settings;
+ var options = this.getSearchOptions();
+
+ // validate user-provided result scoring function
+ if (settings.score) {
+ calculateScore = self.settings.score.apply(this, [query]);
+ if (typeof calculateScore !== 'function') {
+ throw new Error('Selectize "score" setting must be a function that returns a function');
+ }
+ }
+
+ // perform search
+ if (query !== self.lastQuery) {
+ self.lastQuery = query;
+ result = self.sifter.search(query, $.extend(options, {score: calculateScore}));
+ self.currentResults = result;
+ } else {
+ result = $.extend(true, {}, self.currentResults);
+ }
+
+ // filter out selected items
+ if (settings.hideSelected) {
+ for (i = result.items.length - 1; i >= 0; i--) {
+ if (self.items.indexOf(hash_key(result.items[i].id)) !== -1) {
+ result.items.splice(i, 1);
+ }
+ }
+ }
+
+ return result;
+ },
+
+ /**
+ * Refreshes the list of available options shown
+ * in the autocomplete dropdown menu.
+ *
+ * @param {boolean} triggerDropdown
+ */
+ refreshOptions: function(triggerDropdown) {
+ var i, j, k, n, groups, groups_order, option, option_html, optgroup, optgroups, html, html_children, has_create_option;
+ var $active, $active_before, $create;
+
+ if (typeof triggerDropdown === 'undefined') {
+ triggerDropdown = true;
+ }
+
+ var self = this;
+ var query = $.trim(self.$control_input.val());
+ var results = self.search(query);
+ var $dropdown_content = self.$dropdown_content;
+ var active_before = self.$activeOption && hash_key(self.$activeOption.attr('data-value'));
+
+ // build markup
+ n = results.items.length;
+ if (typeof self.settings.maxOptions === 'number') {
+ n = Math.min(n, self.settings.maxOptions);
+ }
+
+ // render and group available options individually
+ groups = {};
+ groups_order = [];
+
+ for (i = 0; i < n; i++) {
+ option = self.options[results.items[i].id];
+ option_html = self.render('option', option);
+ optgroup = option[self.settings.optgroupField] || '';
+ optgroups = $.isArray(optgroup) ? optgroup : [optgroup];
+
+ for (j = 0, k = optgroups && optgroups.length; j < k; j++) {
+ optgroup = optgroups[j];
+ if (!self.optgroups.hasOwnProperty(optgroup)) {
+ optgroup = '';
+ }
+ if (!groups.hasOwnProperty(optgroup)) {
+ groups[optgroup] = [];
+ groups_order.push(optgroup);
+ }
+ groups[optgroup].push(option_html);
+ }
+ }
+
+ // sort optgroups
+ if (this.settings.lockOptgroupOrder) {
+ groups_order.sort(function(a, b) {
+ var a_order = self.optgroups[a].$order || 0;
+ var b_order = self.optgroups[b].$order || 0;
+ return a_order - b_order;
+ });
+ }
+
+ // render optgroup headers & join groups
+ html = [];
+ for (i = 0, n = groups_order.length; i < n; i++) {
+ optgroup = groups_order[i];
+ if (self.optgroups.hasOwnProperty(optgroup) && groups[optgroup].length) {
+ // render the optgroup header and options within it,
+ // then pass it to the wrapper template
+ html_children = self.render('optgroup_header', self.optgroups[optgroup]) || '';
+ html_children += groups[optgroup].join('');
+ html.push(self.render('optgroup', $.extend({}, self.optgroups[optgroup], {
+ html: html_children
+ })));
+ } else {
+ html.push(groups[optgroup].join(''));
+ }
+ }
+
+ $dropdown_content.html(html.join(''));
+
+ // highlight matching terms inline
+ if (self.settings.highlight && results.query.length && results.tokens.length) {
+ for (i = 0, n = results.tokens.length; i < n; i++) {
+ highlight($dropdown_content, results.tokens[i].regex);
+ }
+ }
+
+ // add "selected" class to selected options
+ if (!self.settings.hideSelected) {
+ for (i = 0, n = self.items.length; i < n; i++) {
+ self.getOption(self.items[i]).addClass('selected');
+ }
+ }
+
+ // add create option
+ has_create_option = self.canCreate(query);
+ if (has_create_option) {
+ $dropdown_content.prepend(self.render('option_create', {input: query}));
+ $create = $($dropdown_content[0].childNodes[0]);
+ }
+
+ // activate
+ self.hasOptions = results.items.length > 0 || has_create_option;
+ if (self.hasOptions) {
+ if (results.items.length > 0) {
+ $active_before = active_before && self.getOption(active_before);
+ if ($active_before && $active_before.length) {
+ $active = $active_before;
+ } else if (self.settings.mode === 'single' && self.items.length) {
+ $active = self.getOption(self.items[0]);
+ }
+ if (!$active || !$active.length) {
+ if ($create && !self.settings.addPrecedence) {
+ $active = self.getAdjacentOption($create, 1);
+ } else {
+ $active = $dropdown_content.find('[data-selectable]:first');
+ }
+ }
+ } else {
+ $active = $create;
+ }
+ self.setActiveOption($active);
+ if (triggerDropdown && !self.isOpen) { self.open(); }
+ } else {
+ self.setActiveOption(null);
+ if (triggerDropdown && self.isOpen) { self.close(); }
+ }
+ },
+
+ /**
+ * Adds an available option. If it already exists,
+ * nothing will happen. Note: this does not refresh
+ * the options list dropdown (use `refreshOptions`
+ * for that).
+ *
+ * Usage:
+ *
+ * this.addOption(data)
+ *
+ * @param {object|array} data
+ */
+ addOption: function(data) {
+ var i, n, value, self = this;
+
+ if ($.isArray(data)) {
+ for (i = 0, n = data.length; i < n; i++) {
+ self.addOption(data[i]);
+ }
+ return;
+ }
+
+ if (value = self.registerOption(data)) {
+ self.userOptions[value] = true;
+ self.lastQuery = null;
+ self.trigger('option_add', value, data);
+ }
+ },
+
+ /**
+ * Registers an option to the pool of options.
+ *
+ * @param {object} data
+ * @return {boolean|string}
+ */
+ registerOption: function(data) {
+ var key = hash_key(data[this.settings.valueField]);
+ if (!key || this.options.hasOwnProperty(key)) return false;
+ data.$order = data.$order || ++this.order;
+ this.options[key] = data;
+ return key;
+ },
+
+ /**
+ * Registers an option group to the pool of option groups.
+ *
+ * @param {object} data
+ * @return {boolean|string}
+ */
+ registerOptionGroup: function(data) {
+ var key = hash_key(data[this.settings.optgroupValueField]);
+ if (!key) return false;
+
+ data.$order = data.$order || ++this.order;
+ this.optgroups[key] = data;
+ return key;
+ },
+
+ /**
+ * Registers a new optgroup for options
+ * to be bucketed into.
+ *
+ * @param {string} id
+ * @param {object} data
+ */
+ addOptionGroup: function(id, data) {
+ data[this.settings.optgroupValueField] = id;
+ if (id = this.registerOptionGroup(data)) {
+ this.trigger('optgroup_add', id, data);
+ }
+ },
+
+ /**
+ * Removes an existing option group.
+ *
+ * @param {string} id
+ */
+ removeOptionGroup: function(id) {
+ if (this.optgroups.hasOwnProperty(id)) {
+ delete this.optgroups[id];
+ this.renderCache = {};
+ this.trigger('optgroup_remove', id);
+ }
+ },
+
+ /**
+ * Clears all existing option groups.
+ */
+ clearOptionGroups: function() {
+ this.optgroups = {};
+ this.renderCache = {};
+ this.trigger('optgroup_clear');
+ },
+
+ /**
+ * Updates an option available for selection. If
+ * it is visible in the selected items or options
+ * dropdown, it will be re-rendered automatically.
+ *
+ * @param {string} value
+ * @param {object} data
+ */
+ updateOption: function(value, data) {
+ var self = this;
+ var $item, $item_new;
+ var value_new, index_item, cache_items, cache_options, order_old;
+
+ value = hash_key(value);
+ value_new = hash_key(data[self.settings.valueField]);
+
+ // sanity checks
+ if (value === null) return;
+ if (!self.options.hasOwnProperty(value)) return;
+ if (typeof value_new !== 'string') throw new Error('Value must be set in option data');
+
+ order_old = self.options[value].$order;
+
+ // update references
+ if (value_new !== value) {
+ delete self.options[value];
+ index_item = self.items.indexOf(value);
+ if (index_item !== -1) {
+ self.items.splice(index_item, 1, value_new);
+ }
+ }
+ data.$order = data.$order || order_old;
+ self.options[value_new] = data;
+
+ // invalidate render cache
+ cache_items = self.renderCache['item'];
+ cache_options = self.renderCache['option'];
+
+ if (cache_items) {
+ delete cache_items[value];
+ delete cache_items[value_new];
+ }
+ if (cache_options) {
+ delete cache_options[value];
+ delete cache_options[value_new];
+ }
+
+ // update the item if it's selected
+ if (self.items.indexOf(value_new) !== -1) {
+ $item = self.getItem(value);
+ $item_new = $(self.render('item', data));
+ if ($item.hasClass('active')) $item_new.addClass('active');
+ $item.replaceWith($item_new);
+ }
+
+ // invalidate last query because we might have updated the sortField
+ self.lastQuery = null;
+
+ // update dropdown contents
+ if (self.isOpen) {
+ self.refreshOptions(false);
+ }
+ },
+
+ /**
+ * Removes a single option.
+ *
+ * @param {string} value
+ * @param {boolean} silent
+ */
+ removeOption: function(value, silent) {
+ var self = this;
+ value = hash_key(value);
+
+ var cache_items = self.renderCache['item'];
+ var cache_options = self.renderCache['option'];
+ if (cache_items) delete cache_items[value];
+ if (cache_options) delete cache_options[value];
+
+ delete self.userOptions[value];
+ delete self.options[value];
+ self.lastQuery = null;
+ self.trigger('option_remove', value);
+ self.removeItem(value, silent);
+ },
+
+ /**
+ * Clears all options.
+ */
+ clearOptions: function() {
+ var self = this;
+
+ self.loadedSearches = {};
+ self.userOptions = {};
+ self.renderCache = {};
+ self.options = self.sifter.items = {};
+ self.lastQuery = null;
+ self.trigger('option_clear');
+ self.clear();
+ },
+
+ /**
+ * Returns the jQuery element of the option
+ * matching the given value.
+ *
+ * @param {string} value
+ * @returns {object}
+ */
+ getOption: function(value) {
+ return this.getElementWithValue(value, this.$dropdown_content.find('[data-selectable]'));
+ },
+
+ /**
+ * Returns the jQuery element of the next or
+ * previous selectable option.
+ *
+ * @param {object} $option
+ * @param {int} direction can be 1 for next or -1 for previous
+ * @return {object}
+ */
+ getAdjacentOption: function($option, direction) {
+ var $options = this.$dropdown.find('[data-selectable]');
+ var index = $options.index($option) + direction;
+
+ return index >= 0 && index < $options.length ? $options.eq(index) : $();
+ },
+
+ /**
+ * Finds the first element with a "data-value" attribute
+ * that matches the given value.
+ *
+ * @param {mixed} value
+ * @param {object} $els
+ * @return {object}
+ */
+ getElementWithValue: function(value, $els) {
+ value = hash_key(value);
+
+ if (typeof value !== 'undefined' && value !== null) {
+ for (var i = 0, n = $els.length; i < n; i++) {
+ if ($els[i].getAttribute('data-value') === value) {
+ return $($els[i]);
+ }
+ }
+ }
+
+ return $();
+ },
+
+ /**
+ * Returns the jQuery element of the item
+ * matching the given value.
+ *
+ * @param {string} value
+ * @returns {object}
+ */
+ getItem: function(value) {
+ return this.getElementWithValue(value, this.$control.children());
+ },
+
+ /**
+ * "Selects" multiple items at once. Adds them to the list
+ * at the current caret position.
+ *
+ * @param {string} value
+ * @param {boolean} silent
+ */
+ addItems: function(values, silent) {
+ var items = $.isArray(values) ? values : [values];
+ for (var i = 0, n = items.length; i < n; i++) {
+ this.isPending = (i < n - 1);
+ this.addItem(items[i], silent);
+ }
+ },
+
+ /**
+ * "Selects" an item. Adds it to the list
+ * at the current caret position.
+ *
+ * @param {string} value
+ * @param {boolean} silent
+ */
+ addItem: function(value, silent) {
+ var events = silent ? [] : ['change'];
+
+ debounce_events(this, events, function() {
+ var $item, $option, $options;
+ var self = this;
+ var inputMode = self.settings.mode;
+ var i, active, value_next, wasFull;
+ value = hash_key(value);
+
+ if (self.items.indexOf(value) !== -1) {
+ if (inputMode === 'single') self.close();
+ return;
+ }
+
+ if (!self.options.hasOwnProperty(value)) return;
+ if (inputMode === 'single') self.clear(silent);
+ if (inputMode === 'multi' && self.isFull()) return;
+
+ $item = $(self.render('item', self.options[value]));
+ wasFull = self.isFull();
+ self.items.splice(self.caretPos, 0, value);
+ self.insertAtCaret($item);
+ if (!self.isPending || (!wasFull && self.isFull())) {
+ self.refreshState();
+ }
+
+ if (self.isSetup) {
+ $options = self.$dropdown_content.find('[data-selectable]');
+
+ // update menu / remove the option (if this is not one item being added as part of series)
+ if (!self.isPending) {
+ $option = self.getOption(value);
+ value_next = self.getAdjacentOption($option, 1).attr('data-value');
+ self.refreshOptions(self.isFocused && inputMode !== 'single');
+ if (value_next) {
+ self.setActiveOption(self.getOption(value_next));
+ }
+ }
+
+ // hide the menu if the maximum number of items have been selected or no options are left
+ if (!$options.length || self.isFull()) {
+ self.close();
+ } else {
+ self.positionDropdown();
+ }
+
+ self.updatePlaceholder();
+ self.trigger('item_add', value, $item);
+ self.updateOriginalInput({silent: silent});
+ }
+ });
+ },
+
+ /**
+ * Removes the selected item matching
+ * the provided value.
+ *
+ * @param {string} value
+ */
+ removeItem: function(value, silent) {
+ var self = this;
+ var $item, i, idx;
+
+ $item = (typeof value === 'object') ? value : self.getItem(value);
+ value = hash_key($item.attr('data-value'));
+ i = self.items.indexOf(value);
+
+ if (i !== -1) {
+ $item.remove();
+ if ($item.hasClass('active')) {
+ idx = self.$activeItems.indexOf($item[0]);
+ self.$activeItems.splice(idx, 1);
+ }
+
+ self.items.splice(i, 1);
+ self.lastQuery = null;
+ if (!self.settings.persist && self.userOptions.hasOwnProperty(value)) {
+ self.removeOption(value, silent);
+ }
+
+ if (i < self.caretPos) {
+ self.setCaret(self.caretPos - 1);
+ }
+
+ self.refreshState();
+ self.updatePlaceholder();
+ self.updateOriginalInput({silent: silent});
+ self.positionDropdown();
+ self.trigger('item_remove', value, $item);
+ }
+ },
+
+ /**
+ * Invokes the `create` method provided in the
+ * selectize options that should provide the data
+ * for the new item, given the user input.
+ *
+ * Once this completes, it will be added
+ * to the item list.
+ *
+ * @param {string} value
+ * @param {boolean} [triggerDropdown]
+ * @param {function} [callback]
+ * @return {boolean}
+ */
+ createItem: function(input, triggerDropdown) {
+ var self = this;
+ var caret = self.caretPos;
+ input = input || $.trim(self.$control_input.val() || '');
+
+ var callback = arguments[arguments.length - 1];
+ if (typeof callback !== 'function') callback = function() {};
+
+ if (typeof triggerDropdown !== 'boolean') {
+ triggerDropdown = true;
+ }
+
+ if (!self.canCreate(input)) {
+ callback();
+ return false;
+ }
+
+ self.lock();
+
+ var setup = (typeof self.settings.create === 'function') ? this.settings.create : function(input) {
+ var data = {};
+ data[self.settings.labelField] = input;
+ data[self.settings.valueField] = input;
+ return data;
+ };
+
+ var create = once(function(data) {
+ self.unlock();
+
+ if (!data || typeof data !== 'object') return callback();
+ var value = hash_key(data[self.settings.valueField]);
+ if (typeof value !== 'string') return callback();
+
+ self.setTextboxValue('');
+ self.addOption(data);
+ self.setCaret(caret);
+ self.addItem(value);
+ self.refreshOptions(triggerDropdown && self.settings.mode !== 'single');
+ callback(data);
+ });
+
+ var output = setup.apply(this, [input, create]);
+ if (typeof output !== 'undefined') {
+ create(output);
+ }
+
+ return true;
+ },
+
+ /**
+ * Re-renders the selected item lists.
+ */
+ refreshItems: function() {
+ this.lastQuery = null;
+
+ if (this.isSetup) {
+ this.addItem(this.items);
+ }
+
+ this.refreshState();
+ this.updateOriginalInput();
+ },
+
+ /**
+ * Updates all state-dependent attributes
+ * and CSS classes.
+ */
+ refreshState: function() {
+ var invalid, self = this;
+ if (self.isRequired) {
+ if (self.items.length) self.isInvalid = false;
+ self.$control_input.prop('required', invalid);
+ }
+ self.refreshClasses();
+ },
+
+ /**
+ * Updates all state-dependent CSS classes.
+ */
+ refreshClasses: function() {
+ var self = this;
+ var isFull = self.isFull();
+ var isLocked = self.isLocked;
+
+ self.$wrapper
+ .toggleClass('rtl', self.rtl);
+
+ self.$control
+ .toggleClass('focus', self.isFocused)
+ .toggleClass('disabled', self.isDisabled)
+ .toggleClass('required', self.isRequired)
+ .toggleClass('invalid', self.isInvalid)
+ .toggleClass('locked', isLocked)
+ .toggleClass('full', isFull).toggleClass('not-full', !isFull)
+ .toggleClass('input-active', self.isFocused && !self.isInputHidden)
+ .toggleClass('dropdown-active', self.isOpen)
+ .toggleClass('has-options', !$.isEmptyObject(self.options))
+ .toggleClass('has-items', self.items.length > 0);
+
+ self.$control_input.data('grow', !isFull && !isLocked);
+ },
+
+ /**
+ * Determines whether or not more items can be added
+ * to the control without exceeding the user-defined maximum.
+ *
+ * @returns {boolean}
+ */
+ isFull: function() {
+ return this.settings.maxItems !== null && this.items.length >= this.settings.maxItems;
+ },
+
+ /**
+ * Refreshes the original or
+ * element to reflect the current state.
+ */
+ updateOriginalInput: function(opts) {
+ var i, n, options, label, self = this;
+ opts = opts || {};
+
+ if (self.tagType === TAG_SELECT) {
+ options = [];
+ for (i = 0, n = self.items.length; i < n; i++) {
+ label = self.options[self.items[i]][self.settings.labelField] || '';
+ options.push('' + escape_html(label) + ' ');
+ }
+ if (!options.length && !this.$input.attr('multiple')) {
+ options.push(' ');
+ }
+ self.$input.html(options.join(''));
+ } else {
+ self.$input.val(self.getValue());
+ self.$input.attr('value',self.$input.val());
+ }
+
+ if (self.isSetup) {
+ if (!opts.silent) {
+ self.trigger('change', self.$input.val());
+ }
+ }
+ },
+
+ /**
+ * Shows/hide the input placeholder depending
+ * on if there items in the list already.
+ */
+ updatePlaceholder: function() {
+ if (!this.settings.placeholder) return;
+ var $input = this.$control_input;
+
+ if (this.items.length) {
+ $input.removeAttr('placeholder');
+ } else {
+ $input.attr('placeholder', this.settings.placeholder);
+ }
+ $input.triggerHandler('update', {force: true});
+ },
+
+ /**
+ * Shows the autocomplete dropdown containing
+ * the available options.
+ */
+ open: function() {
+ var self = this;
+
+ if (self.isLocked || self.isOpen || (self.settings.mode === 'multi' && self.isFull())) return;
+ self.focus();
+ self.isOpen = true;
+ self.refreshState();
+ self.$dropdown.css({visibility: 'hidden', display: 'block'});
+ self.positionDropdown();
+ self.$dropdown.css({visibility: 'visible'});
+ self.trigger('dropdown_open', self.$dropdown);
+ },
+
+ /**
+ * Closes the autocomplete dropdown menu.
+ */
+ close: function() {
+ var self = this;
+ var trigger = self.isOpen;
+
+ if (self.settings.mode === 'single' && self.items.length) {
+ self.hideInput();
+ }
+
+ self.isOpen = false;
+ self.$dropdown.hide();
+ self.setActiveOption(null);
+ self.refreshState();
+
+ if (trigger) self.trigger('dropdown_close', self.$dropdown);
+ },
+
+ /**
+ * Calculates and applies the appropriate
+ * position of the dropdown.
+ */
+ positionDropdown: function() {
+ var $control = this.$control;
+ var offset = this.settings.dropdownParent === 'body' ? $control.offset() : $control.position();
+ offset.top += $control.outerHeight(true);
+
+ this.$dropdown.css({
+ width : $control.outerWidth(),
+ top : offset.top,
+ left : offset.left
+ });
+ },
+
+ /**
+ * Resets / clears all selected items
+ * from the control.
+ *
+ * @param {boolean} silent
+ */
+ clear: function(silent) {
+ var self = this;
+
+ if (!self.items.length) return;
+ self.$control.children(':not(input)').remove();
+ self.items = [];
+ self.lastQuery = null;
+ self.setCaret(0);
+ self.setActiveItem(null);
+ self.updatePlaceholder();
+ self.updateOriginalInput({silent: silent});
+ self.refreshState();
+ self.showInput();
+ self.trigger('clear');
+ },
+
+ /**
+ * A helper method for inserting an element
+ * at the current caret position.
+ *
+ * @param {object} $el
+ */
+ insertAtCaret: function($el) {
+ var caret = Math.min(this.caretPos, this.items.length);
+ if (caret === 0) {
+ this.$control.prepend($el);
+ } else {
+ $(this.$control[0].childNodes[caret]).before($el);
+ }
+ this.setCaret(caret + 1);
+ },
+
+ /**
+ * Removes the current selected item(s).
+ *
+ * @param {object} e (optional)
+ * @returns {boolean}
+ */
+ deleteSelection: function(e) {
+ var i, n, direction, selection, values, caret, option_select, $option_select, $tail;
+ var self = this;
+
+ direction = (e && e.keyCode === KEY_BACKSPACE) ? -1 : 1;
+ selection = getSelection(self.$control_input[0]);
+
+ if (self.$activeOption && !self.settings.hideSelected) {
+ option_select = self.getAdjacentOption(self.$activeOption, -1).attr('data-value');
+ }
+
+ // determine items that will be removed
+ values = [];
+
+ if (self.$activeItems.length) {
+ $tail = self.$control.children('.active:' + (direction > 0 ? 'last' : 'first'));
+ caret = self.$control.children(':not(input)').index($tail);
+ if (direction > 0) { caret++; }
+
+ for (i = 0, n = self.$activeItems.length; i < n; i++) {
+ values.push($(self.$activeItems[i]).attr('data-value'));
+ }
+ if (e) {
+ e.preventDefault();
+ e.stopPropagation();
+ }
+ } else if ((self.isFocused || self.settings.mode === 'single') && self.items.length) {
+ if (direction < 0 && selection.start === 0 && selection.length === 0) {
+ values.push(self.items[self.caretPos - 1]);
+ } else if (direction > 0 && selection.start === self.$control_input.val().length) {
+ values.push(self.items[self.caretPos]);
+ }
+ }
+
+ // allow the callback to abort
+ if (!values.length || (typeof self.settings.onDelete === 'function' && self.settings.onDelete.apply(self, [values]) === false)) {
+ return false;
+ }
+
+ // perform removal
+ if (typeof caret !== 'undefined') {
+ self.setCaret(caret);
+ }
+ while (values.length) {
+ self.removeItem(values.pop());
+ }
+
+ self.showInput();
+ self.positionDropdown();
+ self.refreshOptions(true);
+
+ // select previous option
+ if (option_select) {
+ $option_select = self.getOption(option_select);
+ if ($option_select.length) {
+ self.setActiveOption($option_select);
+ }
+ }
+
+ return true;
+ },
+
+ /**
+ * Selects the previous / next item (depending
+ * on the `direction` argument).
+ *
+ * > 0 - right
+ * < 0 - left
+ *
+ * @param {int} direction
+ * @param {object} e (optional)
+ */
+ advanceSelection: function(direction, e) {
+ var tail, selection, idx, valueLength, cursorAtEdge, $tail;
+ var self = this;
+
+ if (direction === 0) return;
+ if (self.rtl) direction *= -1;
+
+ tail = direction > 0 ? 'last' : 'first';
+ selection = getSelection(self.$control_input[0]);
+
+ if (self.isFocused && !self.isInputHidden) {
+ valueLength = self.$control_input.val().length;
+ cursorAtEdge = direction < 0
+ ? selection.start === 0 && selection.length === 0
+ : selection.start === valueLength;
+
+ if (cursorAtEdge && !valueLength) {
+ self.advanceCaret(direction, e);
+ }
+ } else {
+ $tail = self.$control.children('.active:' + tail);
+ if ($tail.length) {
+ idx = self.$control.children(':not(input)').index($tail);
+ self.setActiveItem(null);
+ self.setCaret(direction > 0 ? idx + 1 : idx);
+ }
+ }
+ },
+
+ /**
+ * Moves the caret left / right.
+ *
+ * @param {int} direction
+ * @param {object} e (optional)
+ */
+ advanceCaret: function(direction, e) {
+ var self = this, fn, $adj;
+
+ if (direction === 0) return;
+
+ fn = direction > 0 ? 'next' : 'prev';
+ if (self.isShiftDown) {
+ $adj = self.$control_input[fn]();
+ if ($adj.length) {
+ self.hideInput();
+ self.setActiveItem($adj);
+ e && e.preventDefault();
+ }
+ } else {
+ self.setCaret(self.caretPos + direction);
+ }
+ },
+
+ /**
+ * Moves the caret to the specified index.
+ *
+ * @param {int} i
+ */
+ setCaret: function(i) {
+ var self = this;
+
+ if (self.settings.mode === 'single') {
+ i = self.items.length;
+ } else {
+ i = Math.max(0, Math.min(self.items.length, i));
+ }
+
+ if(!self.isPending) {
+ // the input must be moved by leaving it in place and moving the
+ // siblings, due to the fact that focus cannot be restored once lost
+ // on mobile webkit devices
+ var j, n, fn, $children, $child;
+ $children = self.$control.children(':not(input)');
+ for (j = 0, n = $children.length; j < n; j++) {
+ $child = $($children[j]).detach();
+ if (j < i) {
+ self.$control_input.before($child);
+ } else {
+ self.$control.append($child);
+ }
+ }
+ }
+
+ self.caretPos = i;
+ },
+
+ /**
+ * Disables user input on the control. Used while
+ * items are being asynchronously created.
+ */
+ lock: function() {
+ this.close();
+ this.isLocked = true;
+ this.refreshState();
+ },
+
+ /**
+ * Re-enables user input on the control.
+ */
+ unlock: function() {
+ this.isLocked = false;
+ this.refreshState();
+ },
+
+ /**
+ * Disables user input on the control completely.
+ * While disabled, it cannot receive focus.
+ */
+ disable: function() {
+ var self = this;
+ self.$input.prop('disabled', true);
+ self.$control_input.prop('disabled', true).prop('tabindex', -1);
+ self.isDisabled = true;
+ self.lock();
+ },
+
+ /**
+ * Enables the control so that it can respond
+ * to focus and user input.
+ */
+ enable: function() {
+ var self = this;
+ self.$input.prop('disabled', false);
+ self.$control_input.prop('disabled', false).prop('tabindex', self.tabIndex);
+ self.isDisabled = false;
+ self.unlock();
+ },
+
+ /**
+ * Completely destroys the control and
+ * unbinds all event listeners so that it can
+ * be garbage collected.
+ */
+ destroy: function() {
+ var self = this;
+ var eventNS = self.eventNS;
+ var revertSettings = self.revertSettings;
+
+ self.trigger('destroy');
+ self.off();
+ self.$wrapper.remove();
+ self.$dropdown.remove();
+
+ self.$input
+ .html('')
+ .append(revertSettings.$children)
+ .removeAttr('tabindex')
+ .removeClass('selectized')
+ .attr({tabindex: revertSettings.tabindex})
+ .show();
+
+ self.$control_input.removeData('grow');
+ self.$input.removeData('selectize');
+
+ $(window).off(eventNS);
+ $(document).off(eventNS);
+ $(document.body).off(eventNS);
+
+ delete self.$input[0].selectize;
+ },
+
+ /**
+ * A helper method for rendering "item" and
+ * "option" templates, given the data.
+ *
+ * @param {string} templateName
+ * @param {object} data
+ * @returns {string}
+ */
+ render: function(templateName, data) {
+ var value, id, label;
+ var html = '';
+ var cache = false;
+ var self = this;
+ var regex_tag = /^[\t \r\n]*<([a-z][a-z0-9\-_]*(?:\:[a-z][a-z0-9\-_]*)?)/i;
+
+ if (templateName === 'option' || templateName === 'item') {
+ value = hash_key(data[self.settings.valueField]);
+ cache = !!value;
+ }
+
+ // pull markup from cache if it exists
+ if (cache) {
+ if (!isset(self.renderCache[templateName])) {
+ self.renderCache[templateName] = {};
+ }
+ if (self.renderCache[templateName].hasOwnProperty(value)) {
+ return self.renderCache[templateName][value];
+ }
+ }
+
+ // render markup
+ html = self.settings.render[templateName].apply(this, [data, escape_html]);
+
+ // add mandatory attributes
+ if (templateName === 'option' || templateName === 'option_create') {
+ html = html.replace(regex_tag, '<$1 data-selectable');
+ }
+ if (templateName === 'optgroup') {
+ id = data[self.settings.optgroupValueField] || '';
+ html = html.replace(regex_tag, '<$1 data-group="' + escape_replace(escape_html(id)) + '"');
+ }
+ if (templateName === 'option' || templateName === 'item') {
+ html = html.replace(regex_tag, '<$1 data-value="' + escape_replace(escape_html(value || '')) + '"');
+ }
+
+ // update cache
+ if (cache) {
+ self.renderCache[templateName][value] = html;
+ }
+
+ return html;
+ },
+
+ /**
+ * Clears the render cache for a template. If
+ * no template is given, clears all render
+ * caches.
+ *
+ * @param {string} templateName
+ */
+ clearCache: function(templateName) {
+ var self = this;
+ if (typeof templateName === 'undefined') {
+ self.renderCache = {};
+ } else {
+ delete self.renderCache[templateName];
+ }
+ },
+
+ /**
+ * Determines whether or not to display the
+ * create item prompt, given a user input.
+ *
+ * @param {string} input
+ * @return {boolean}
+ */
+ canCreate: function(input) {
+ var self = this;
+ if (!self.settings.create) return false;
+ var filter = self.settings.createFilter;
+ return input.length
+ && (typeof filter !== 'function' || filter.apply(self, [input]))
+ && (typeof filter !== 'string' || new RegExp(filter).test(input))
+ && (!(filter instanceof RegExp) || filter.test(input));
+ }
+
+ });
+
+
+ Selectize.count = 0;
+ Selectize.defaults = {
+ options: [],
+ optgroups: [],
+
+ plugins: [],
+ delimiter: ',',
+ splitOn: null, // regexp or string for splitting up values from a paste command
+ persist: true,
+ diacritics: true,
+ create: false,
+ createOnBlur: false,
+ createFilter: null,
+ highlight: true,
+ openOnFocus: true,
+ maxOptions: 1000,
+ maxItems: null,
+ hideSelected: null,
+ addPrecedence: false,
+ selectOnTab: false,
+ preload: false,
+ allowEmptyOption: false,
+ closeAfterSelect: false,
+
+ scrollDuration: 60,
+ loadThrottle: 300,
+ loadingClass: 'loading',
+
+ dataAttr: 'data-data',
+ optgroupField: 'optgroup',
+ valueField: 'value',
+ labelField: 'text',
+ optgroupLabelField: 'label',
+ optgroupValueField: 'value',
+ lockOptgroupOrder: false,
+
+ sortField: '$order',
+ searchField: ['text'],
+ searchConjunction: 'and',
+
+ mode: null,
+ wrapperClass: 'selectize-control',
+ inputClass: 'selectize-input',
+ dropdownClass: 'selectize-dropdown',
+ dropdownContentClass: 'selectize-dropdown-content',
+
+ dropdownParent: null,
+
+ copyClassesToDropdown: true,
+
+ /*
+ load : null, // function(query, callback) { ... }
+ score : null, // function(search) { ... }
+ onInitialize : null, // function() { ... }
+ onChange : null, // function(value) { ... }
+ onItemAdd : null, // function(value, $item) { ... }
+ onItemRemove : null, // function(value) { ... }
+ onClear : null, // function() { ... }
+ onOptionAdd : null, // function(value, data) { ... }
+ onOptionRemove : null, // function(value) { ... }
+ onOptionClear : null, // function() { ... }
+ onOptionGroupAdd : null, // function(id, data) { ... }
+ onOptionGroupRemove : null, // function(id) { ... }
+ onOptionGroupClear : null, // function() { ... }
+ onDropdownOpen : null, // function($dropdown) { ... }
+ onDropdownClose : null, // function($dropdown) { ... }
+ onType : null, // function(str) { ... }
+ onDelete : null, // function(values) { ... }
+ */
+
+ render: {
+ /*
+ item: null,
+ optgroup: null,
+ optgroup_header: null,
+ option: null,
+ option_create: null
+ */
+ }
+ };
+
+
+ $.fn.selectize = function(settings_user) {
+ var defaults = $.fn.selectize.defaults;
+ var settings = $.extend({}, defaults, settings_user);
+ var attr_data = settings.dataAttr;
+ var field_label = settings.labelField;
+ var field_value = settings.valueField;
+ var field_optgroup = settings.optgroupField;
+ var field_optgroup_label = settings.optgroupLabelField;
+ var field_optgroup_value = settings.optgroupValueField;
+
+ /**
+ * Initializes selectize from a element.
+ *
+ * @param {object} $input
+ * @param {object} settings_element
+ */
+ var init_textbox = function($input, settings_element) {
+ var i, n, values, option;
+
+ var data_raw = $input.attr(attr_data);
+
+ if (!data_raw) {
+ var value = $.trim($input.val() || '');
+ if (!settings.allowEmptyOption && !value.length) return;
+ values = value.split(settings.delimiter);
+ for (i = 0, n = values.length; i < n; i++) {
+ option = {};
+ option[field_label] = values[i];
+ option[field_value] = values[i];
+ settings_element.options.push(option);
+ }
+ settings_element.items = values;
+ } else {
+ settings_element.options = JSON.parse(data_raw);
+ for (i = 0, n = settings_element.options.length; i < n; i++) {
+ settings_element.items.push(settings_element.options[i][field_value]);
+ }
+ }
+ };
+
+ /**
+ * Initializes selectize from a element.
+ *
+ * @param {object} $input
+ * @param {object} settings_element
+ */
+ var init_select = function($input, settings_element) {
+ var i, n, tagName, $children, order = 0;
+ var options = settings_element.options;
+ var optionsMap = {};
+
+ var readData = function($el) {
+ var data = attr_data && $el.attr(attr_data);
+ if (typeof data === 'string' && data.length) {
+ return JSON.parse(data);
+ }
+ return null;
+ };
+
+ var addOption = function($option, group) {
+ $option = $($option);
+
+ var value = hash_key($option.attr('value'));
+ if (!value && !settings.allowEmptyOption) return;
+
+ // if the option already exists, it's probably been
+ // duplicated in another optgroup. in this case, push
+ // the current group to the "optgroup" property on the
+ // existing option so that it's rendered in both places.
+ if (optionsMap.hasOwnProperty(value)) {
+ if (group) {
+ var arr = optionsMap[value][field_optgroup];
+ if (!arr) {
+ optionsMap[value][field_optgroup] = group;
+ } else if (!$.isArray(arr)) {
+ optionsMap[value][field_optgroup] = [arr, group];
+ } else {
+ arr.push(group);
+ }
+ }
+ return;
+ }
+
+ var option = readData($option) || {};
+ option[field_label] = option[field_label] || $option.text();
+ option[field_value] = option[field_value] || value;
+ option[field_optgroup] = option[field_optgroup] || group;
+
+ optionsMap[value] = option;
+ options.push(option);
+
+ if ($option.is(':selected')) {
+ settings_element.items.push(value);
+ }
+ };
+
+ var addGroup = function($optgroup) {
+ var i, n, id, optgroup, $options;
+
+ $optgroup = $($optgroup);
+ id = $optgroup.attr('label');
+
+ if (id) {
+ optgroup = readData($optgroup) || {};
+ optgroup[field_optgroup_label] = id;
+ optgroup[field_optgroup_value] = id;
+ settings_element.optgroups.push(optgroup);
+ }
+
+ $options = $('option', $optgroup);
+ for (i = 0, n = $options.length; i < n; i++) {
+ addOption($options[i], id);
+ }
+ };
+
+ settings_element.maxItems = $input.attr('multiple') ? null : 1;
+
+ $children = $input.children();
+ for (i = 0, n = $children.length; i < n; i++) {
+ tagName = $children[i].tagName.toLowerCase();
+ if (tagName === 'optgroup') {
+ addGroup($children[i]);
+ } else if (tagName === 'option') {
+ addOption($children[i]);
+ }
+ }
+ };
+
+ return this.each(function() {
+ if (this.selectize) return;
+
+ var instance;
+ var $input = $(this);
+ var tag_name = this.tagName.toLowerCase();
+ var placeholder = $input.attr('placeholder') || $input.attr('data-placeholder');
+ if (!placeholder && !settings.allowEmptyOption) {
+ placeholder = $input.children('option[value=""]').text();
+ }
+
+ var settings_element = {
+ 'placeholder' : placeholder,
+ 'options' : [],
+ 'optgroups' : [],
+ 'items' : []
+ };
+
+ if (tag_name === 'select') {
+ init_select($input, settings_element);
+ } else {
+ init_textbox($input, settings_element);
+ }
+
+ instance = new Selectize($input, $.extend(true, {}, defaults, settings_element, settings_user));
+ });
+ };
+
+ $.fn.selectize.defaults = Selectize.defaults;
+ $.fn.selectize.support = {
+ validity: SUPPORTS_VALIDITY_API
+ };
+
+
+ Selectize.define('drag_drop', function(options) {
+ if (!$.fn.sortable) throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');
+ if (this.settings.mode !== 'multi') return;
+ var self = this;
+
+ self.lock = (function() {
+ var original = self.lock;
+ return function() {
+ var sortable = self.$control.data('sortable');
+ if (sortable) sortable.disable();
+ return original.apply(self, arguments);
+ };
+ })();
+
+ self.unlock = (function() {
+ var original = self.unlock;
+ return function() {
+ var sortable = self.$control.data('sortable');
+ if (sortable) sortable.enable();
+ return original.apply(self, arguments);
+ };
+ })();
+
+ self.setup = (function() {
+ var original = self.setup;
+ return function() {
+ original.apply(this, arguments);
+
+ var $control = self.$control.sortable({
+ items: '[data-value]',
+ forcePlaceholderSize: true,
+ disabled: self.isLocked,
+ start: function(e, ui) {
+ ui.placeholder.css('width', ui.helper.css('width'));
+ $control.css({overflow: 'visible'});
+ },
+ stop: function() {
+ $control.css({overflow: 'hidden'});
+ var active = self.$activeItems ? self.$activeItems.slice() : null;
+ var values = [];
+ $control.children('[data-value]').each(function() {
+ values.push($(this).attr('data-value'));
+ });
+ self.setValue(values);
+ self.setActiveItem(active);
+ }
+ });
+ };
+ })();
+
+ });
+
+ Selectize.define('dropdown_header', function(options) {
+ var self = this;
+
+ options = $.extend({
+ title : 'Untitled',
+ headerClass : 'selectize-dropdown-header',
+ titleRowClass : 'selectize-dropdown-header-title',
+ labelClass : 'selectize-dropdown-header-label',
+ closeClass : 'selectize-dropdown-header-close',
+
+ html: function(data) {
+ return (
+ ''
+ );
+ }
+ }, options);
+
+ self.setup = (function() {
+ var original = self.setup;
+ return function() {
+ original.apply(self, arguments);
+ self.$dropdown_header = $(options.html(options));
+ self.$dropdown.prepend(self.$dropdown_header);
+ };
+ })();
+
+ });
+
+ Selectize.define('optgroup_columns', function(options) {
+ var self = this;
+
+ options = $.extend({
+ equalizeWidth : true,
+ equalizeHeight : true
+ }, options);
+
+ this.getAdjacentOption = function($option, direction) {
+ var $options = $option.closest('[data-group]').find('[data-selectable]');
+ var index = $options.index($option) + direction;
+
+ return index >= 0 && index < $options.length ? $options.eq(index) : $();
+ };
+
+ this.onKeyDown = (function() {
+ var original = self.onKeyDown;
+ return function(e) {
+ var index, $option, $options, $optgroup;
+
+ if (this.isOpen && (e.keyCode === KEY_LEFT || e.keyCode === KEY_RIGHT)) {
+ self.ignoreHover = true;
+ $optgroup = this.$activeOption.closest('[data-group]');
+ index = $optgroup.find('[data-selectable]').index(this.$activeOption);
+
+ if(e.keyCode === KEY_LEFT) {
+ $optgroup = $optgroup.prev('[data-group]');
+ } else {
+ $optgroup = $optgroup.next('[data-group]');
+ }
+
+ $options = $optgroup.find('[data-selectable]');
+ $option = $options.eq(Math.min($options.length - 1, index));
+ if ($option.length) {
+ this.setActiveOption($option);
+ }
+ return;
+ }
+
+ return original.apply(this, arguments);
+ };
+ })();
+
+ var getScrollbarWidth = function() {
+ var div;
+ var width = getScrollbarWidth.width;
+ var doc = document;
+
+ if (typeof width === 'undefined') {
+ div = doc.createElement('div');
+ div.innerHTML = '';
+ div = div.firstChild;
+ doc.body.appendChild(div);
+ width = getScrollbarWidth.width = div.offsetWidth - div.clientWidth;
+ doc.body.removeChild(div);
+ }
+ return width;
+ };
+
+ var equalizeSizes = function() {
+ var i, n, height_max, width, width_last, width_parent, $optgroups;
+
+ $optgroups = $('[data-group]', self.$dropdown_content);
+ n = $optgroups.length;
+ if (!n || !self.$dropdown_content.width()) return;
+
+ if (options.equalizeHeight) {
+ height_max = 0;
+ for (i = 0; i < n; i++) {
+ height_max = Math.max(height_max, $optgroups.eq(i).height());
+ }
+ $optgroups.css({height: height_max});
+ }
+
+ if (options.equalizeWidth) {
+ width_parent = self.$dropdown_content.innerWidth() - getScrollbarWidth();
+ width = Math.round(width_parent / n);
+ $optgroups.css({width: width});
+ if (n > 1) {
+ width_last = width_parent - width * (n - 1);
+ $optgroups.eq(n - 1).css({width: width_last});
+ }
+ }
+ };
+
+ if (options.equalizeHeight || options.equalizeWidth) {
+ hook.after(this, 'positionDropdown', equalizeSizes);
+ hook.after(this, 'refreshOptions', equalizeSizes);
+ }
+
+
+ });
+
+ Selectize.define('remove_button', function(options) {
+ if (this.settings.mode === 'single') return;
+
+ options = $.extend({
+ label : '×',
+ title : 'Remove',
+ className : 'remove',
+ append : true
+ }, options);
+
+ var self = this;
+ var html = '' + options.label + ' ';
+
+ /**
+ * Appends an element as a child (with raw HTML).
+ *
+ * @param {string} html_container
+ * @param {string} html_element
+ * @return {string}
+ */
+ var append = function(html_container, html_element) {
+ var pos = html_container.search(/(<\/[^>]+>\s*)$/);
+ return html_container.substring(0, pos) + html_element + html_container.substring(pos);
+ };
+
+ this.setup = (function() {
+ var original = self.setup;
+ return function() {
+ // override the item rendering method to add the button to each
+ if (options.append) {
+ var render_item = self.settings.render.item;
+ self.settings.render.item = function(data) {
+ return append(render_item.apply(this, arguments), html);
+ };
+ }
+
+ original.apply(this, arguments);
+
+ // add event listener
+ this.$control.on('click', '.' + options.className, function(e) {
+ e.preventDefault();
+ if (self.isLocked) return;
+
+ var $item = $(e.currentTarget).parent();
+ self.setActiveItem($item);
+ if (self.deleteSelection()) {
+ self.setCaret(self.items.length);
+ }
+ });
+
+ };
+ })();
+
+ });
+
+ Selectize.define('restore_on_backspace', function(options) {
+ var self = this;
+
+ options.text = options.text || function(option) {
+ return option[this.settings.labelField];
+ };
+
+ this.onKeyDown = (function() {
+ var original = self.onKeyDown;
+ return function(e) {
+ var index, option;
+ if (e.keyCode === KEY_BACKSPACE && this.$control_input.val() === '' && !this.$activeItems.length) {
+ index = this.caretPos - 1;
+ if (index >= 0 && index < this.items.length) {
+ option = this.options[this.items[index]];
+ if (this.deleteSelection(e)) {
+ this.setTextboxValue(options.text.apply(this, [option]));
+ this.refreshOptions(true);
+ }
+ e.preventDefault();
+ return;
+ }
+ }
+ return original.apply(this, arguments);
+ };
+ })();
+ });
+
+
+ return Selectize;
+ }));
+
+/***/ },
+
+/***/ 218:
+/***/ function(module, exports, __webpack_require__) {
+
+ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
+ * sifter.js
+ * Copyright (c) 2013 Brian Reavis & contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
+ * file except in compliance with the License. You may obtain a copy of the License at:
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
+ * ANY KIND, either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ *
+ * @author Brian Reavis
+ */
+
+ (function(root, factory) {
+ if (true) {
+ !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+ } else if (typeof exports === 'object') {
+ module.exports = factory();
+ } else {
+ root.Sifter = factory();
+ }
+ }(this, function() {
+
+ /**
+ * Textually searches arrays and hashes of objects
+ * by property (or multiple properties). Designed
+ * specifically for autocomplete.
+ *
+ * @constructor
+ * @param {array|object} items
+ * @param {object} items
+ */
+ var Sifter = function(items, settings) {
+ this.items = items;
+ this.settings = settings || {diacritics: true};
+ };
+
+ /**
+ * Splits a search string into an array of individual
+ * regexps to be used to match results.
+ *
+ * @param {string} query
+ * @returns {array}
+ */
+ Sifter.prototype.tokenize = function(query) {
+ query = trim(String(query || '').toLowerCase());
+ if (!query || !query.length) return [];
+
+ var i, n, regex, letter;
+ var tokens = [];
+ var words = query.split(/ +/);
+
+ for (i = 0, n = words.length; i < n; i++) {
+ regex = escape_regex(words[i]);
+ if (this.settings.diacritics) {
+ for (letter in DIACRITICS) {
+ if (DIACRITICS.hasOwnProperty(letter)) {
+ regex = regex.replace(new RegExp(letter, 'g'), DIACRITICS[letter]);
+ }
+ }
+ }
+ tokens.push({
+ string : words[i],
+ regex : new RegExp(regex, 'i')
+ });
+ }
+
+ return tokens;
+ };
+
+ /**
+ * Iterates over arrays and hashes.
+ *
+ * ```
+ * this.iterator(this.items, function(item, id) {
+ * // invoked for each item
+ * });
+ * ```
+ *
+ * @param {array|object} object
+ */
+ Sifter.prototype.iterator = function(object, callback) {
+ var iterator;
+ if (is_array(object)) {
+ iterator = Array.prototype.forEach || function(callback) {
+ for (var i = 0, n = this.length; i < n; i++) {
+ callback(this[i], i, this);
+ }
+ };
+ } else {
+ iterator = function(callback) {
+ for (var key in this) {
+ if (this.hasOwnProperty(key)) {
+ callback(this[key], key, this);
+ }
+ }
+ };
+ }
+
+ iterator.apply(object, [callback]);
+ };
+
+ /**
+ * Returns a function to be used to score individual results.
+ *
+ * Good matches will have a higher score than poor matches.
+ * If an item is not a match, 0 will be returned by the function.
+ *
+ * @param {object|string} search
+ * @param {object} options (optional)
+ * @returns {function}
+ */
+ Sifter.prototype.getScoreFunction = function(search, options) {
+ var self, fields, tokens, token_count;
+
+ self = this;
+ search = self.prepareSearch(search, options);
+ tokens = search.tokens;
+ fields = search.options.fields;
+ token_count = tokens.length;
+
+ /**
+ * Calculates how close of a match the
+ * given value is against a search token.
+ *
+ * @param {mixed} value
+ * @param {object} token
+ * @return {number}
+ */
+ var scoreValue = function(value, token) {
+ var score, pos;
+
+ if (!value) return 0;
+ value = String(value || '');
+ pos = value.search(token.regex);
+ if (pos === -1) return 0;
+ score = token.string.length / value.length;
+ if (pos === 0) score += 0.5;
+ return score;
+ };
+
+ /**
+ * Calculates the score of an object
+ * against the search query.
+ *
+ * @param {object} token
+ * @param {object} data
+ * @return {number}
+ */
+ var scoreObject = (function() {
+ var field_count = fields.length;
+ if (!field_count) {
+ return function() { return 0; };
+ }
+ if (field_count === 1) {
+ return function(token, data) {
+ return scoreValue(data[fields[0]], token);
+ };
+ }
+ return function(token, data) {
+ for (var i = 0, sum = 0; i < field_count; i++) {
+ sum += scoreValue(data[fields[i]], token);
+ }
+ return sum / field_count;
+ };
+ })();
+
+ if (!token_count) {
+ return function() { return 0; };
+ }
+ if (token_count === 1) {
+ return function(data) {
+ return scoreObject(tokens[0], data);
+ };
+ }
+
+ if (search.options.conjunction === 'and') {
+ return function(data) {
+ var score;
+ for (var i = 0, sum = 0; i < token_count; i++) {
+ score = scoreObject(tokens[i], data);
+ if (score <= 0) return 0;
+ sum += score;
+ }
+ return sum / token_count;
+ };
+ } else {
+ return function(data) {
+ for (var i = 0, sum = 0; i < token_count; i++) {
+ sum += scoreObject(tokens[i], data);
+ }
+ return sum / token_count;
+ };
+ }
+ };
+
+ /**
+ * Returns a function that can be used to compare two
+ * results, for sorting purposes. If no sorting should
+ * be performed, `null` will be returned.
+ *
+ * @param {string|object} search
+ * @param {object} options
+ * @return function(a,b)
+ */
+ Sifter.prototype.getSortFunction = function(search, options) {
+ var i, n, self, field, fields, fields_count, multiplier, multipliers, get_field, implicit_score, sort;
+
+ self = this;
+ search = self.prepareSearch(search, options);
+ sort = (!search.query && options.sort_empty) || options.sort;
+
+ /**
+ * Fetches the specified sort field value
+ * from a search result item.
+ *
+ * @param {string} name
+ * @param {object} result
+ * @return {mixed}
+ */
+ get_field = function(name, result) {
+ if (name === '$score') return result.score;
+ return self.items[result.id][name];
+ };
+
+ // parse options
+ fields = [];
+ if (sort) {
+ for (i = 0, n = sort.length; i < n; i++) {
+ if (search.query || sort[i].field !== '$score') {
+ fields.push(sort[i]);
+ }
+ }
+ }
+
+ // the "$score" field is implied to be the primary
+ // sort field, unless it's manually specified
+ if (search.query) {
+ implicit_score = true;
+ for (i = 0, n = fields.length; i < n; i++) {
+ if (fields[i].field === '$score') {
+ implicit_score = false;
+ break;
+ }
+ }
+ if (implicit_score) {
+ fields.unshift({field: '$score', direction: 'desc'});
+ }
+ } else {
+ for (i = 0, n = fields.length; i < n; i++) {
+ if (fields[i].field === '$score') {
+ fields.splice(i, 1);
+ break;
+ }
+ }
+ }
+
+ multipliers = [];
+ for (i = 0, n = fields.length; i < n; i++) {
+ multipliers.push(fields[i].direction === 'desc' ? -1 : 1);
+ }
+
+ // build function
+ fields_count = fields.length;
+ if (!fields_count) {
+ return null;
+ } else if (fields_count === 1) {
+ field = fields[0].field;
+ multiplier = multipliers[0];
+ return function(a, b) {
+ return multiplier * cmp(
+ get_field(field, a),
+ get_field(field, b)
+ );
+ };
+ } else {
+ return function(a, b) {
+ var i, result, a_value, b_value, field;
+ for (i = 0; i < fields_count; i++) {
+ field = fields[i].field;
+ result = multipliers[i] * cmp(
+ get_field(field, a),
+ get_field(field, b)
+ );
+ if (result) return result;
+ }
+ return 0;
+ };
+ }
+ };
+
+ /**
+ * Parses a search query and returns an object
+ * with tokens and fields ready to be populated
+ * with results.
+ *
+ * @param {string} query
+ * @param {object} options
+ * @returns {object}
+ */
+ Sifter.prototype.prepareSearch = function(query, options) {
+ if (typeof query === 'object') return query;
+
+ options = extend({}, options);
+
+ var option_fields = options.fields;
+ var option_sort = options.sort;
+ var option_sort_empty = options.sort_empty;
+
+ if (option_fields && !is_array(option_fields)) options.fields = [option_fields];
+ if (option_sort && !is_array(option_sort)) options.sort = [option_sort];
+ if (option_sort_empty && !is_array(option_sort_empty)) options.sort_empty = [option_sort_empty];
+
+ return {
+ options : options,
+ query : String(query || '').toLowerCase(),
+ tokens : this.tokenize(query),
+ total : 0,
+ items : []
+ };
+ };
+
+ /**
+ * Searches through all items and returns a sorted array of matches.
+ *
+ * The `options` parameter can contain:
+ *
+ * - fields {string|array}
+ * - sort {array}
+ * - score {function}
+ * - filter {bool}
+ * - limit {integer}
+ *
+ * Returns an object containing:
+ *
+ * - options {object}
+ * - query {string}
+ * - tokens {array}
+ * - total {int}
+ * - items {array}
+ *
+ * @param {string} query
+ * @param {object} options
+ * @returns {object}
+ */
+ Sifter.prototype.search = function(query, options) {
+ var self = this, value, score, search, calculateScore;
+ var fn_sort;
+ var fn_score;
+
+ search = this.prepareSearch(query, options);
+ options = search.options;
+ query = search.query;
+
+ // generate result scoring function
+ fn_score = options.score || self.getScoreFunction(search);
+
+ // perform search and sort
+ if (query.length) {
+ self.iterator(self.items, function(item, id) {
+ score = fn_score(item);
+ if (options.filter === false || score > 0) {
+ search.items.push({'score': score, 'id': id});
+ }
+ });
+ } else {
+ self.iterator(self.items, function(item, id) {
+ search.items.push({'score': 1, 'id': id});
+ });
+ }
+
+ fn_sort = self.getSortFunction(search, options);
+ if (fn_sort) search.items.sort(fn_sort);
+
+ // apply limits
+ search.total = search.items.length;
+ if (typeof options.limit === 'number') {
+ search.items = search.items.slice(0, options.limit);
+ }
+
+ return search;
+ };
+
+ // utilities
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+ var cmp = function(a, b) {
+ if (typeof a === 'number' && typeof b === 'number') {
+ return a > b ? 1 : (a < b ? -1 : 0);
+ }
+ a = asciifold(String(a || ''));
+ b = asciifold(String(b || ''));
+ if (a > b) return 1;
+ if (b > a) return -1;
+ return 0;
+ };
+
+ var extend = function(a, b) {
+ var i, n, k, object;
+ for (i = 1, n = arguments.length; i < n; i++) {
+ object = arguments[i];
+ if (!object) continue;
+ for (k in object) {
+ if (object.hasOwnProperty(k)) {
+ a[k] = object[k];
+ }
+ }
+ }
+ return a;
+ };
+
+ var trim = function(str) {
+ return (str + '').replace(/^\s+|\s+$|/g, '');
+ };
+
+ var escape_regex = function(str) {
+ return (str + '').replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1');
+ };
+
+ var is_array = Array.isArray || (typeof $ !== 'undefined' && $.isArray) || function(object) {
+ return Object.prototype.toString.call(object) === '[object Array]';
+ };
+
+ var DIACRITICS = {
+ 'a': '[aÀÁÂÃÄÅàáâãäåĀāąĄ]',
+ 'c': '[cÇçćĆčČ]',
+ 'd': '[dđĐďĎð]',
+ 'e': '[eÈÉÊËèéêëěĚĒēęĘ]',
+ 'i': '[iÌÍÎÏìíîïĪī]',
+ 'l': '[lłŁ]',
+ 'n': '[nÑñňŇńŃ]',
+ 'o': '[oÒÓÔÕÕÖØòóôõöøŌō]',
+ 'r': '[rřŘ]',
+ 's': '[sŠšśŚ]',
+ 't': '[tťŤ]',
+ 'u': '[uÙÚÛÜùúûüůŮŪū]',
+ 'y': '[yŸÿýÝ]',
+ 'z': '[zŽžżŻźŹ]'
+ };
+
+ var asciifold = (function() {
+ var i, n, k, chunk;
+ var foreignletters = '';
+ var lookup = {};
+ for (k in DIACRITICS) {
+ if (DIACRITICS.hasOwnProperty(k)) {
+ chunk = DIACRITICS[k].substring(2, DIACRITICS[k].length - 1);
+ foreignletters += chunk;
+ for (i = 0, n = chunk.length; i < n; i++) {
+ lookup[chunk.charAt(i)] = k;
+ }
+ }
+ }
+ var regexp = new RegExp('[' + foreignletters + ']', 'g');
+ return function(str) {
+ return str.replace(regexp, function(foreignletter) {
+ return lookup[foreignletter];
+ }).toLowerCase();
+ };
+ })();
+
+
+ // export
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+ return Sifter;
+ }));
+
+
+
+/***/ },
+
+/***/ 219:
+/***/ function(module, exports, __webpack_require__) {
+
+ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
+ * microplugin.js
+ * Copyright (c) 2013 Brian Reavis & contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
+ * file except in compliance with the License. You may obtain a copy of the License at:
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
+ * ANY KIND, either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ *
+ * @author Brian Reavis
+ */
+
+ (function(root, factory) {
+ if (true) {
+ !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+ } else if (typeof exports === 'object') {
+ module.exports = factory();
+ } else {
+ root.MicroPlugin = factory();
+ }
+ }(this, function() {
+ var MicroPlugin = {};
+
+ MicroPlugin.mixin = function(Interface) {
+ Interface.plugins = {};
+
+ /**
+ * Initializes the listed plugins (with options).
+ * Acceptable formats:
+ *
+ * List (without options):
+ * ['a', 'b', 'c']
+ *
+ * List (with options):
+ * [{'name': 'a', options: {}}, {'name': 'b', options: {}}]
+ *
+ * Hash (with options):
+ * {'a': { ... }, 'b': { ... }, 'c': { ... }}
+ *
+ * @param {mixed} plugins
+ */
+ Interface.prototype.initializePlugins = function(plugins) {
+ var i, n, key;
+ var self = this;
+ var queue = [];
+
+ self.plugins = {
+ names : [],
+ settings : {},
+ requested : {},
+ loaded : {}
+ };
+
+ if (utils.isArray(plugins)) {
+ for (i = 0, n = plugins.length; i < n; i++) {
+ if (typeof plugins[i] === 'string') {
+ queue.push(plugins[i]);
+ } else {
+ self.plugins.settings[plugins[i].name] = plugins[i].options;
+ queue.push(plugins[i].name);
+ }
+ }
+ } else if (plugins) {
+ for (key in plugins) {
+ if (plugins.hasOwnProperty(key)) {
+ self.plugins.settings[key] = plugins[key];
+ queue.push(key);
+ }
+ }
+ }
+
+ while (queue.length) {
+ self.require(queue.shift());
+ }
+ };
+
+ Interface.prototype.loadPlugin = function(name) {
+ var self = this;
+ var plugins = self.plugins;
+ var plugin = Interface.plugins[name];
+
+ if (!Interface.plugins.hasOwnProperty(name)) {
+ throw new Error('Unable to find "' + name + '" plugin');
+ }
+
+ plugins.requested[name] = true;
+ plugins.loaded[name] = plugin.fn.apply(self, [self.plugins.settings[name] || {}]);
+ plugins.names.push(name);
+ };
+
+ /**
+ * Initializes a plugin.
+ *
+ * @param {string} name
+ */
+ Interface.prototype.require = function(name) {
+ var self = this;
+ var plugins = self.plugins;
+
+ if (!self.plugins.loaded.hasOwnProperty(name)) {
+ if (plugins.requested[name]) {
+ throw new Error('Plugin has circular dependency ("' + name + '")');
+ }
+ self.loadPlugin(name);
+ }
+
+ return plugins.loaded[name];
+ };
+
+ /**
+ * Registers a plugin.
+ *
+ * @param {string} name
+ * @param {function} fn
+ */
+ Interface.define = function(name, fn) {
+ Interface.plugins[name] = {
+ 'name' : name,
+ 'fn' : fn
+ };
+ };
+ };
+
+ var utils = {
+ isArray: Array.isArray || function(vArg) {
+ return Object.prototype.toString.call(vArg) === '[object Array]';
+ }
+ };
+
+ return MicroPlugin;
+ }));
+
+/***/ },
+
+/***/ 225:
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(module) {
+ /*
+ *
+ * More info at [www.dropzonejs.com](http://www.dropzonejs.com)
+ *
+ * Copyright (c) 2012, Matias Meno
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ */
+
+ (function() {
+ var Dropzone, Emitter, camelize, contentLoaded, detectVerticalSquash, drawImageIOSFix, noop, without,
+ __slice = [].slice,
+ __hasProp = {}.hasOwnProperty,
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
+
+ noop = function() {};
+
+ Emitter = (function() {
+ function Emitter() {}
+
+ Emitter.prototype.addEventListener = Emitter.prototype.on;
+
+ Emitter.prototype.on = function(event, fn) {
+ this._callbacks = this._callbacks || {};
+ if (!this._callbacks[event]) {
+ this._callbacks[event] = [];
+ }
+ this._callbacks[event].push(fn);
+ return this;
+ };
+
+ Emitter.prototype.emit = function() {
+ var args, callback, callbacks, event, _i, _len;
+ event = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
+ this._callbacks = this._callbacks || {};
+ callbacks = this._callbacks[event];
+ if (callbacks) {
+ for (_i = 0, _len = callbacks.length; _i < _len; _i++) {
+ callback = callbacks[_i];
+ callback.apply(this, args);
+ }
+ }
+ return this;
+ };
+
+ Emitter.prototype.removeListener = Emitter.prototype.off;
+
+ Emitter.prototype.removeAllListeners = Emitter.prototype.off;
+
+ Emitter.prototype.removeEventListener = Emitter.prototype.off;
+
+ Emitter.prototype.off = function(event, fn) {
+ var callback, callbacks, i, _i, _len;
+ if (!this._callbacks || arguments.length === 0) {
+ this._callbacks = {};
+ return this;
+ }
+ callbacks = this._callbacks[event];
+ if (!callbacks) {
+ return this;
+ }
+ if (arguments.length === 1) {
+ delete this._callbacks[event];
+ return this;
+ }
+ for (i = _i = 0, _len = callbacks.length; _i < _len; i = ++_i) {
+ callback = callbacks[i];
+ if (callback === fn) {
+ callbacks.splice(i, 1);
+ break;
+ }
+ }
+ return this;
+ };
+
+ return Emitter;
+
+ })();
+
+ Dropzone = (function(_super) {
+ var extend, resolveOption;
+
+ __extends(Dropzone, _super);
+
+ Dropzone.prototype.Emitter = Emitter;
+
+
+ /*
+ This is a list of all available events you can register on a dropzone object.
+
+ You can register an event handler like this:
+
+ dropzone.on("dragEnter", function() { });
+ */
+
+ Dropzone.prototype.events = ["drop", "dragstart", "dragend", "dragenter", "dragover", "dragleave", "addedfile", "addedfiles", "removedfile", "thumbnail", "error", "errormultiple", "processing", "processingmultiple", "uploadprogress", "totaluploadprogress", "sending", "sendingmultiple", "success", "successmultiple", "canceled", "canceledmultiple", "complete", "completemultiple", "reset", "maxfilesexceeded", "maxfilesreached", "queuecomplete"];
+
+ Dropzone.prototype.defaultOptions = {
+ url: null,
+ method: "post",
+ withCredentials: false,
+ parallelUploads: 2,
+ uploadMultiple: false,
+ maxFilesize: 256,
+ paramName: "file",
+ createImageThumbnails: true,
+ maxThumbnailFilesize: 10,
+ thumbnailWidth: 120,
+ thumbnailHeight: 120,
+ filesizeBase: 1000,
+ maxFiles: null,
+ params: {},
+ clickable: true,
+ ignoreHiddenFiles: true,
+ acceptedFiles: null,
+ acceptedMimeTypes: null,
+ autoProcessQueue: true,
+ autoQueue: true,
+ addRemoveLinks: false,
+ previewsContainer: null,
+ hiddenInputContainer: "body",
+ capture: null,
+ dictDefaultMessage: "Drop files here to upload",
+ dictFallbackMessage: "Your browser does not support drag'n'drop file uploads.",
+ dictFallbackText: "Please use the fallback form below to upload your files like in the olden days.",
+ dictFileTooBig: "File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",
+ dictInvalidFileType: "You can't upload files of this type.",
+ dictResponseError: "Server responded with {{statusCode}} code.",
+ dictCancelUpload: "Cancel upload",
+ dictCancelUploadConfirmation: "Are you sure you want to cancel this upload?",
+ dictRemoveFile: "Remove file",
+ dictRemoveFileConfirmation: null,
+ dictMaxFilesExceeded: "You can not upload any more files.",
+ accept: function(file, done) {
+ return done();
+ },
+ init: function() {
+ return noop;
+ },
+ forceFallback: false,
+ fallback: function() {
+ var child, messageElement, span, _i, _len, _ref;
+ this.element.className = "" + this.element.className + " dz-browser-not-supported";
+ _ref = this.element.getElementsByTagName("div");
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ child = _ref[_i];
+ if (/(^| )dz-message($| )/.test(child.className)) {
+ messageElement = child;
+ child.className = "dz-message";
+ continue;
+ }
+ }
+ if (!messageElement) {
+ messageElement = Dropzone.createElement("
");
+ this.element.appendChild(messageElement);
+ }
+ span = messageElement.getElementsByTagName("span")[0];
+ if (span) {
+ if (span.textContent != null) {
+ span.textContent = this.options.dictFallbackMessage;
+ } else if (span.innerText != null) {
+ span.innerText = this.options.dictFallbackMessage;
+ }
+ }
+ return this.element.appendChild(this.getFallbackForm());
+ },
+ resize: function(file) {
+ var info, srcRatio, trgRatio;
+ info = {
+ srcX: 0,
+ srcY: 0,
+ srcWidth: file.width,
+ srcHeight: file.height
+ };
+ srcRatio = file.width / file.height;
+ info.optWidth = this.options.thumbnailWidth;
+ info.optHeight = this.options.thumbnailHeight;
+ if ((info.optWidth == null) && (info.optHeight == null)) {
+ info.optWidth = info.srcWidth;
+ info.optHeight = info.srcHeight;
+ } else if (info.optWidth == null) {
+ info.optWidth = srcRatio * info.optHeight;
+ } else if (info.optHeight == null) {
+ info.optHeight = (1 / srcRatio) * info.optWidth;
+ }
+ trgRatio = info.optWidth / info.optHeight;
+ if (file.height < info.optHeight || file.width < info.optWidth) {
+ info.trgHeight = info.srcHeight;
+ info.trgWidth = info.srcWidth;
+ } else {
+ if (srcRatio > trgRatio) {
+ info.srcHeight = file.height;
+ info.srcWidth = info.srcHeight * trgRatio;
+ } else {
+ info.srcWidth = file.width;
+ info.srcHeight = info.srcWidth / trgRatio;
+ }
+ }
+ info.srcX = (file.width - info.srcWidth) / 2;
+ info.srcY = (file.height - info.srcHeight) / 2;
+ return info;
+ },
+
+ /*
+ Those functions register themselves to the events on init and handle all
+ the user interface specific stuff. Overwriting them won't break the upload
+ but can break the way it's displayed.
+ You can overwrite them if you don't like the default behavior. If you just
+ want to add an additional event handler, register it on the dropzone object
+ and don't overwrite those options.
+ */
+ drop: function(e) {
+ return this.element.classList.remove("dz-drag-hover");
+ },
+ dragstart: noop,
+ dragend: function(e) {
+ return this.element.classList.remove("dz-drag-hover");
+ },
+ dragenter: function(e) {
+ return this.element.classList.add("dz-drag-hover");
+ },
+ dragover: function(e) {
+ return this.element.classList.add("dz-drag-hover");
+ },
+ dragleave: function(e) {
+ return this.element.classList.remove("dz-drag-hover");
+ },
+ paste: noop,
+ reset: function() {
+ return this.element.classList.remove("dz-started");
+ },
+ addedfile: function(file) {
+ var node, removeFileEvent, removeLink, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _results;
+ if (this.element === this.previewsContainer) {
+ this.element.classList.add("dz-started");
+ }
+ if (this.previewsContainer) {
+ file.previewElement = Dropzone.createElement(this.options.previewTemplate.trim());
+ file.previewTemplate = file.previewElement;
+ this.previewsContainer.appendChild(file.previewElement);
+ _ref = file.previewElement.querySelectorAll("[data-dz-name]");
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ node = _ref[_i];
+ node.textContent = file.name;
+ }
+ _ref1 = file.previewElement.querySelectorAll("[data-dz-size]");
+ for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
+ node = _ref1[_j];
+ node.innerHTML = this.filesize(file.size);
+ }
+ if (this.options.addRemoveLinks) {
+ file._removeLink = Dropzone.createElement("" + this.options.dictRemoveFile + " ");
+ file.previewElement.appendChild(file._removeLink);
+ }
+ removeFileEvent = (function(_this) {
+ return function(e) {
+ e.preventDefault();
+ e.stopPropagation();
+ if (file.status === Dropzone.UPLOADING) {
+ return Dropzone.confirm(_this.options.dictCancelUploadConfirmation, function() {
+ return _this.removeFile(file);
+ });
+ } else {
+ if (_this.options.dictRemoveFileConfirmation) {
+ return Dropzone.confirm(_this.options.dictRemoveFileConfirmation, function() {
+ return _this.removeFile(file);
+ });
+ } else {
+ return _this.removeFile(file);
+ }
+ }
+ };
+ })(this);
+ _ref2 = file.previewElement.querySelectorAll("[data-dz-remove]");
+ _results = [];
+ for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
+ removeLink = _ref2[_k];
+ _results.push(removeLink.addEventListener("click", removeFileEvent));
+ }
+ return _results;
+ }
+ },
+ removedfile: function(file) {
+ var _ref;
+ if (file.previewElement) {
+ if ((_ref = file.previewElement) != null) {
+ _ref.parentNode.removeChild(file.previewElement);
+ }
+ }
+ return this._updateMaxFilesReachedClass();
+ },
+ thumbnail: function(file, dataUrl) {
+ var thumbnailElement, _i, _len, _ref;
+ if (file.previewElement) {
+ file.previewElement.classList.remove("dz-file-preview");
+ _ref = file.previewElement.querySelectorAll("[data-dz-thumbnail]");
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ thumbnailElement = _ref[_i];
+ thumbnailElement.alt = file.name;
+ thumbnailElement.src = dataUrl;
+ }
+ return setTimeout(((function(_this) {
+ return function() {
+ return file.previewElement.classList.add("dz-image-preview");
+ };
+ })(this)), 1);
+ }
+ },
+ error: function(file, message) {
+ var node, _i, _len, _ref, _results;
+ if (file.previewElement) {
+ file.previewElement.classList.add("dz-error");
+ if (typeof message !== "String" && message.error) {
+ message = message.error;
+ }
+ _ref = file.previewElement.querySelectorAll("[data-dz-errormessage]");
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ node = _ref[_i];
+ _results.push(node.textContent = message);
+ }
+ return _results;
+ }
+ },
+ errormultiple: noop,
+ processing: function(file) {
+ if (file.previewElement) {
+ file.previewElement.classList.add("dz-processing");
+ if (file._removeLink) {
+ return file._removeLink.textContent = this.options.dictCancelUpload;
+ }
+ }
+ },
+ processingmultiple: noop,
+ uploadprogress: function(file, progress, bytesSent) {
+ var node, _i, _len, _ref, _results;
+ if (file.previewElement) {
+ _ref = file.previewElement.querySelectorAll("[data-dz-uploadprogress]");
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ node = _ref[_i];
+ if (node.nodeName === 'PROGRESS') {
+ _results.push(node.value = progress);
+ } else {
+ _results.push(node.style.width = "" + progress + "%");
+ }
+ }
+ return _results;
+ }
+ },
+ totaluploadprogress: noop,
+ sending: noop,
+ sendingmultiple: noop,
+ success: function(file) {
+ if (file.previewElement) {
+ return file.previewElement.classList.add("dz-success");
+ }
+ },
+ successmultiple: noop,
+ canceled: function(file) {
+ return this.emit("error", file, "Upload canceled.");
+ },
+ canceledmultiple: noop,
+ complete: function(file) {
+ if (file._removeLink) {
+ file._removeLink.textContent = this.options.dictRemoveFile;
+ }
+ if (file.previewElement) {
+ return file.previewElement.classList.add("dz-complete");
+ }
+ },
+ completemultiple: noop,
+ maxfilesexceeded: noop,
+ maxfilesreached: noop,
+ queuecomplete: noop,
+ addedfiles: noop,
+ previewTemplate: "\n
\n
\n
\n
\n
\n
\n Check \n \n \n \n \n \n
\n
\n
\n Error \n \n \n \n \n \n \n \n
\n
"
+ };
+
+ extend = function() {
+ var key, object, objects, target, val, _i, _len;
+ target = arguments[0], objects = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
+ for (_i = 0, _len = objects.length; _i < _len; _i++) {
+ object = objects[_i];
+ for (key in object) {
+ val = object[key];
+ target[key] = val;
+ }
+ }
+ return target;
+ };
+
+ function Dropzone(element, options) {
+ var elementOptions, fallback, _ref;
+ this.element = element;
+ this.version = Dropzone.version;
+ this.defaultOptions.previewTemplate = this.defaultOptions.previewTemplate.replace(/\n*/g, "");
+ this.clickableElements = [];
+ this.listeners = [];
+ this.files = [];
+ if (typeof this.element === "string") {
+ this.element = document.querySelector(this.element);
+ }
+ if (!(this.element && (this.element.nodeType != null))) {
+ throw new Error("Invalid dropzone element.");
+ }
+ if (this.element.dropzone) {
+ throw new Error("Dropzone already attached.");
+ }
+ Dropzone.instances.push(this);
+ this.element.dropzone = this;
+ elementOptions = (_ref = Dropzone.optionsForElement(this.element)) != null ? _ref : {};
+ this.options = extend({}, this.defaultOptions, elementOptions, options != null ? options : {});
+ if (this.options.forceFallback || !Dropzone.isBrowserSupported()) {
+ return this.options.fallback.call(this);
+ }
+ if (this.options.url == null) {
+ this.options.url = this.element.getAttribute("action");
+ }
+ if (!this.options.url) {
+ throw new Error("No URL provided.");
+ }
+ if (this.options.acceptedFiles && this.options.acceptedMimeTypes) {
+ throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");
+ }
+ if (this.options.acceptedMimeTypes) {
+ this.options.acceptedFiles = this.options.acceptedMimeTypes;
+ delete this.options.acceptedMimeTypes;
+ }
+ this.options.method = this.options.method.toUpperCase();
+ if ((fallback = this.getExistingFallback()) && fallback.parentNode) {
+ fallback.parentNode.removeChild(fallback);
+ }
+ if (this.options.previewsContainer !== false) {
+ if (this.options.previewsContainer) {
+ this.previewsContainer = Dropzone.getElement(this.options.previewsContainer, "previewsContainer");
+ } else {
+ this.previewsContainer = this.element;
+ }
+ }
+ if (this.options.clickable) {
+ if (this.options.clickable === true) {
+ this.clickableElements = [this.element];
+ } else {
+ this.clickableElements = Dropzone.getElements(this.options.clickable, "clickable");
+ }
+ }
+ this.init();
+ }
+
+ Dropzone.prototype.getAcceptedFiles = function() {
+ var file, _i, _len, _ref, _results;
+ _ref = this.files;
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ file = _ref[_i];
+ if (file.accepted) {
+ _results.push(file);
+ }
+ }
+ return _results;
+ };
+
+ Dropzone.prototype.getRejectedFiles = function() {
+ var file, _i, _len, _ref, _results;
+ _ref = this.files;
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ file = _ref[_i];
+ if (!file.accepted) {
+ _results.push(file);
+ }
+ }
+ return _results;
+ };
+
+ Dropzone.prototype.getFilesWithStatus = function(status) {
+ var file, _i, _len, _ref, _results;
+ _ref = this.files;
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ file = _ref[_i];
+ if (file.status === status) {
+ _results.push(file);
+ }
+ }
+ return _results;
+ };
+
+ Dropzone.prototype.getQueuedFiles = function() {
+ return this.getFilesWithStatus(Dropzone.QUEUED);
+ };
+
+ Dropzone.prototype.getUploadingFiles = function() {
+ return this.getFilesWithStatus(Dropzone.UPLOADING);
+ };
+
+ Dropzone.prototype.getAddedFiles = function() {
+ return this.getFilesWithStatus(Dropzone.ADDED);
+ };
+
+ Dropzone.prototype.getActiveFiles = function() {
+ var file, _i, _len, _ref, _results;
+ _ref = this.files;
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ file = _ref[_i];
+ if (file.status === Dropzone.UPLOADING || file.status === Dropzone.QUEUED) {
+ _results.push(file);
+ }
+ }
+ return _results;
+ };
+
+ Dropzone.prototype.init = function() {
+ var eventName, noPropagation, setupHiddenFileInput, _i, _len, _ref, _ref1;
+ if (this.element.tagName === "form") {
+ this.element.setAttribute("enctype", "multipart/form-data");
+ }
+ if (this.element.classList.contains("dropzone") && !this.element.querySelector(".dz-message")) {
+ this.element.appendChild(Dropzone.createElement("" + this.options.dictDefaultMessage + "
"));
+ }
+ if (this.clickableElements.length) {
+ setupHiddenFileInput = (function(_this) {
+ return function() {
+ if (_this.hiddenFileInput) {
+ _this.hiddenFileInput.parentNode.removeChild(_this.hiddenFileInput);
+ }
+ _this.hiddenFileInput = document.createElement("input");
+ _this.hiddenFileInput.setAttribute("type", "file");
+ if ((_this.options.maxFiles == null) || _this.options.maxFiles > 1) {
+ _this.hiddenFileInput.setAttribute("multiple", "multiple");
+ }
+ _this.hiddenFileInput.className = "dz-hidden-input";
+ if (_this.options.acceptedFiles != null) {
+ _this.hiddenFileInput.setAttribute("accept", _this.options.acceptedFiles);
+ }
+ if (_this.options.capture != null) {
+ _this.hiddenFileInput.setAttribute("capture", _this.options.capture);
+ }
+ _this.hiddenFileInput.style.visibility = "hidden";
+ _this.hiddenFileInput.style.position = "absolute";
+ _this.hiddenFileInput.style.top = "0";
+ _this.hiddenFileInput.style.left = "0";
+ _this.hiddenFileInput.style.height = "0";
+ _this.hiddenFileInput.style.width = "0";
+ document.querySelector(_this.options.hiddenInputContainer).appendChild(_this.hiddenFileInput);
+ return _this.hiddenFileInput.addEventListener("change", function() {
+ var file, files, _i, _len;
+ files = _this.hiddenFileInput.files;
+ if (files.length) {
+ for (_i = 0, _len = files.length; _i < _len; _i++) {
+ file = files[_i];
+ _this.addFile(file);
+ }
+ }
+ _this.emit("addedfiles", files);
+ return setupHiddenFileInput();
+ });
+ };
+ })(this);
+ setupHiddenFileInput();
+ }
+ this.URL = (_ref = window.URL) != null ? _ref : window.webkitURL;
+ _ref1 = this.events;
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+ eventName = _ref1[_i];
+ this.on(eventName, this.options[eventName]);
+ }
+ this.on("uploadprogress", (function(_this) {
+ return function() {
+ return _this.updateTotalUploadProgress();
+ };
+ })(this));
+ this.on("removedfile", (function(_this) {
+ return function() {
+ return _this.updateTotalUploadProgress();
+ };
+ })(this));
+ this.on("canceled", (function(_this) {
+ return function(file) {
+ return _this.emit("complete", file);
+ };
+ })(this));
+ this.on("complete", (function(_this) {
+ return function(file) {
+ if (_this.getAddedFiles().length === 0 && _this.getUploadingFiles().length === 0 && _this.getQueuedFiles().length === 0) {
+ return setTimeout((function() {
+ return _this.emit("queuecomplete");
+ }), 0);
+ }
+ };
+ })(this));
+ noPropagation = function(e) {
+ e.stopPropagation();
+ if (e.preventDefault) {
+ return e.preventDefault();
+ } else {
+ return e.returnValue = false;
+ }
+ };
+ this.listeners = [
+ {
+ element: this.element,
+ events: {
+ "dragstart": (function(_this) {
+ return function(e) {
+ return _this.emit("dragstart", e);
+ };
+ })(this),
+ "dragenter": (function(_this) {
+ return function(e) {
+ noPropagation(e);
+ return _this.emit("dragenter", e);
+ };
+ })(this),
+ "dragover": (function(_this) {
+ return function(e) {
+ var efct;
+ try {
+ efct = e.dataTransfer.effectAllowed;
+ } catch (_error) {}
+ e.dataTransfer.dropEffect = 'move' === efct || 'linkMove' === efct ? 'move' : 'copy';
+ noPropagation(e);
+ return _this.emit("dragover", e);
+ };
+ })(this),
+ "dragleave": (function(_this) {
+ return function(e) {
+ return _this.emit("dragleave", e);
+ };
+ })(this),
+ "drop": (function(_this) {
+ return function(e) {
+ noPropagation(e);
+ return _this.drop(e);
+ };
+ })(this),
+ "dragend": (function(_this) {
+ return function(e) {
+ return _this.emit("dragend", e);
+ };
+ })(this)
+ }
+ }
+ ];
+ this.clickableElements.forEach((function(_this) {
+ return function(clickableElement) {
+ return _this.listeners.push({
+ element: clickableElement,
+ events: {
+ "click": function(evt) {
+ if ((clickableElement !== _this.element) || (evt.target === _this.element || Dropzone.elementInside(evt.target, _this.element.querySelector(".dz-message")))) {
+ _this.hiddenFileInput.click();
+ }
+ return true;
+ }
+ }
+ });
+ };
+ })(this));
+ this.enable();
+ return this.options.init.call(this);
+ };
+
+ Dropzone.prototype.destroy = function() {
+ var _ref;
+ this.disable();
+ this.removeAllFiles(true);
+ if ((_ref = this.hiddenFileInput) != null ? _ref.parentNode : void 0) {
+ this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput);
+ this.hiddenFileInput = null;
+ }
+ delete this.element.dropzone;
+ return Dropzone.instances.splice(Dropzone.instances.indexOf(this), 1);
+ };
+
+ Dropzone.prototype.updateTotalUploadProgress = function() {
+ var activeFiles, file, totalBytes, totalBytesSent, totalUploadProgress, _i, _len, _ref;
+ totalBytesSent = 0;
+ totalBytes = 0;
+ activeFiles = this.getActiveFiles();
+ if (activeFiles.length) {
+ _ref = this.getActiveFiles();
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ file = _ref[_i];
+ totalBytesSent += file.upload.bytesSent;
+ totalBytes += file.upload.total;
+ }
+ totalUploadProgress = 100 * totalBytesSent / totalBytes;
+ } else {
+ totalUploadProgress = 100;
+ }
+ return this.emit("totaluploadprogress", totalUploadProgress, totalBytes, totalBytesSent);
+ };
+
+ Dropzone.prototype._getParamName = function(n) {
+ if (typeof this.options.paramName === "function") {
+ return this.options.paramName(n);
+ } else {
+ return "" + this.options.paramName + (this.options.uploadMultiple ? "[" + n + "]" : "");
+ }
+ };
+
+ Dropzone.prototype.getFallbackForm = function() {
+ var existingFallback, fields, fieldsString, form;
+ if (existingFallback = this.getExistingFallback()) {
+ return existingFallback;
+ }
+ fieldsString = "";
+ fields = Dropzone.createElement(fieldsString);
+ if (this.element.tagName !== "FORM") {
+ form = Dropzone.createElement("");
+ form.appendChild(fields);
+ } else {
+ this.element.setAttribute("enctype", "multipart/form-data");
+ this.element.setAttribute("method", this.options.method);
+ }
+ return form != null ? form : fields;
+ };
+
+ Dropzone.prototype.getExistingFallback = function() {
+ var fallback, getFallback, tagName, _i, _len, _ref;
+ getFallback = function(elements) {
+ var el, _i, _len;
+ for (_i = 0, _len = elements.length; _i < _len; _i++) {
+ el = elements[_i];
+ if (/(^| )fallback($| )/.test(el.className)) {
+ return el;
+ }
+ }
+ };
+ _ref = ["div", "form"];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ tagName = _ref[_i];
+ if (fallback = getFallback(this.element.getElementsByTagName(tagName))) {
+ return fallback;
+ }
+ }
+ };
+
+ Dropzone.prototype.setupEventListeners = function() {
+ var elementListeners, event, listener, _i, _len, _ref, _results;
+ _ref = this.listeners;
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ elementListeners = _ref[_i];
+ _results.push((function() {
+ var _ref1, _results1;
+ _ref1 = elementListeners.events;
+ _results1 = [];
+ for (event in _ref1) {
+ listener = _ref1[event];
+ _results1.push(elementListeners.element.addEventListener(event, listener, false));
+ }
+ return _results1;
+ })());
+ }
+ return _results;
+ };
+
+ Dropzone.prototype.removeEventListeners = function() {
+ var elementListeners, event, listener, _i, _len, _ref, _results;
+ _ref = this.listeners;
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ elementListeners = _ref[_i];
+ _results.push((function() {
+ var _ref1, _results1;
+ _ref1 = elementListeners.events;
+ _results1 = [];
+ for (event in _ref1) {
+ listener = _ref1[event];
+ _results1.push(elementListeners.element.removeEventListener(event, listener, false));
+ }
+ return _results1;
+ })());
+ }
+ return _results;
+ };
+
+ Dropzone.prototype.disable = function() {
+ var file, _i, _len, _ref, _results;
+ this.clickableElements.forEach(function(element) {
+ return element.classList.remove("dz-clickable");
+ });
+ this.removeEventListeners();
+ _ref = this.files;
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ file = _ref[_i];
+ _results.push(this.cancelUpload(file));
+ }
+ return _results;
+ };
+
+ Dropzone.prototype.enable = function() {
+ this.clickableElements.forEach(function(element) {
+ return element.classList.add("dz-clickable");
+ });
+ return this.setupEventListeners();
+ };
+
+ Dropzone.prototype.filesize = function(size) {
+ var cutoff, i, selectedSize, selectedUnit, unit, units, _i, _len;
+ selectedSize = 0;
+ selectedUnit = "b";
+ if (size > 0) {
+ units = ['TB', 'GB', 'MB', 'KB', 'b'];
+ for (i = _i = 0, _len = units.length; _i < _len; i = ++_i) {
+ unit = units[i];
+ cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10;
+ if (size >= cutoff) {
+ selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i);
+ selectedUnit = unit;
+ break;
+ }
+ }
+ selectedSize = Math.round(10 * selectedSize) / 10;
+ }
+ return "" + selectedSize + " " + selectedUnit;
+ };
+
+ Dropzone.prototype._updateMaxFilesReachedClass = function() {
+ if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) {
+ if (this.getAcceptedFiles().length === this.options.maxFiles) {
+ this.emit('maxfilesreached', this.files);
+ }
+ return this.element.classList.add("dz-max-files-reached");
+ } else {
+ return this.element.classList.remove("dz-max-files-reached");
+ }
+ };
+
+ Dropzone.prototype.drop = function(e) {
+ var files, items;
+ if (!e.dataTransfer) {
+ return;
+ }
+ this.emit("drop", e);
+ files = e.dataTransfer.files;
+ this.emit("addedfiles", files);
+ if (files.length) {
+ items = e.dataTransfer.items;
+ if (items && items.length && (items[0].webkitGetAsEntry != null)) {
+ this._addFilesFromItems(items);
+ } else {
+ this.handleFiles(files);
+ }
+ }
+ };
+
+ Dropzone.prototype.paste = function(e) {
+ var items, _ref;
+ if ((e != null ? (_ref = e.clipboardData) != null ? _ref.items : void 0 : void 0) == null) {
+ return;
+ }
+ this.emit("paste", e);
+ items = e.clipboardData.items;
+ if (items.length) {
+ return this._addFilesFromItems(items);
+ }
+ };
+
+ Dropzone.prototype.handleFiles = function(files) {
+ var file, _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = files.length; _i < _len; _i++) {
+ file = files[_i];
+ _results.push(this.addFile(file));
+ }
+ return _results;
+ };
+
+ Dropzone.prototype._addFilesFromItems = function(items) {
+ var entry, item, _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = items.length; _i < _len; _i++) {
+ item = items[_i];
+ if ((item.webkitGetAsEntry != null) && (entry = item.webkitGetAsEntry())) {
+ if (entry.isFile) {
+ _results.push(this.addFile(item.getAsFile()));
+ } else if (entry.isDirectory) {
+ _results.push(this._addFilesFromDirectory(entry, entry.name));
+ } else {
+ _results.push(void 0);
+ }
+ } else if (item.getAsFile != null) {
+ if ((item.kind == null) || item.kind === "file") {
+ _results.push(this.addFile(item.getAsFile()));
+ } else {
+ _results.push(void 0);
+ }
+ } else {
+ _results.push(void 0);
+ }
+ }
+ return _results;
+ };
+
+ Dropzone.prototype._addFilesFromDirectory = function(directory, path) {
+ var dirReader, entriesReader;
+ dirReader = directory.createReader();
+ entriesReader = (function(_this) {
+ return function(entries) {
+ var entry, _i, _len;
+ for (_i = 0, _len = entries.length; _i < _len; _i++) {
+ entry = entries[_i];
+ if (entry.isFile) {
+ entry.file(function(file) {
+ if (_this.options.ignoreHiddenFiles && file.name.substring(0, 1) === '.') {
+ return;
+ }
+ file.fullPath = "" + path + "/" + file.name;
+ return _this.addFile(file);
+ });
+ } else if (entry.isDirectory) {
+ _this._addFilesFromDirectory(entry, "" + path + "/" + entry.name);
+ }
+ }
+ };
+ })(this);
+ return dirReader.readEntries(entriesReader, function(error) {
+ return typeof console !== "undefined" && console !== null ? typeof console.log === "function" ? console.log(error) : void 0 : void 0;
+ });
+ };
+
+ Dropzone.prototype.accept = function(file, done) {
+ if (file.size > this.options.maxFilesize * 1024 * 1024) {
+ return done(this.options.dictFileTooBig.replace("{{filesize}}", Math.round(file.size / 1024 / 10.24) / 100).replace("{{maxFilesize}}", this.options.maxFilesize));
+ } else if (!Dropzone.isValidFile(file, this.options.acceptedFiles)) {
+ return done(this.options.dictInvalidFileType);
+ } else if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) {
+ done(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}", this.options.maxFiles));
+ return this.emit("maxfilesexceeded", file);
+ } else {
+ return this.options.accept.call(this, file, done);
+ }
+ };
+
+ Dropzone.prototype.addFile = function(file) {
+ file.upload = {
+ progress: 0,
+ total: file.size,
+ bytesSent: 0
+ };
+ this.files.push(file);
+ file.status = Dropzone.ADDED;
+ this.emit("addedfile", file);
+ this._enqueueThumbnail(file);
+ return this.accept(file, (function(_this) {
+ return function(error) {
+ if (error) {
+ file.accepted = false;
+ _this._errorProcessing([file], error);
+ } else {
+ file.accepted = true;
+ if (_this.options.autoQueue) {
+ _this.enqueueFile(file);
+ }
+ }
+ return _this._updateMaxFilesReachedClass();
+ };
+ })(this));
+ };
+
+ Dropzone.prototype.enqueueFiles = function(files) {
+ var file, _i, _len;
+ for (_i = 0, _len = files.length; _i < _len; _i++) {
+ file = files[_i];
+ this.enqueueFile(file);
+ }
+ return null;
+ };
+
+ Dropzone.prototype.enqueueFile = function(file) {
+ if (file.status === Dropzone.ADDED && file.accepted === true) {
+ file.status = Dropzone.QUEUED;
+ if (this.options.autoProcessQueue) {
+ return setTimeout(((function(_this) {
+ return function() {
+ return _this.processQueue();
+ };
+ })(this)), 0);
+ }
+ } else {
+ throw new Error("This file can't be queued because it has already been processed or was rejected.");
+ }
+ };
+
+ Dropzone.prototype._thumbnailQueue = [];
+
+ Dropzone.prototype._processingThumbnail = false;
+
+ Dropzone.prototype._enqueueThumbnail = function(file) {
+ if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1024 * 1024) {
+ this._thumbnailQueue.push(file);
+ return setTimeout(((function(_this) {
+ return function() {
+ return _this._processThumbnailQueue();
+ };
+ })(this)), 0);
+ }
+ };
+
+ Dropzone.prototype._processThumbnailQueue = function() {
+ if (this._processingThumbnail || this._thumbnailQueue.length === 0) {
+ return;
+ }
+ this._processingThumbnail = true;
+ return this.createThumbnail(this._thumbnailQueue.shift(), (function(_this) {
+ return function() {
+ _this._processingThumbnail = false;
+ return _this._processThumbnailQueue();
+ };
+ })(this));
+ };
+
+ Dropzone.prototype.removeFile = function(file) {
+ if (file.status === Dropzone.UPLOADING) {
+ this.cancelUpload(file);
+ }
+ this.files = without(this.files, file);
+ this.emit("removedfile", file);
+ if (this.files.length === 0) {
+ return this.emit("reset");
+ }
+ };
+
+ Dropzone.prototype.removeAllFiles = function(cancelIfNecessary) {
+ var file, _i, _len, _ref;
+ if (cancelIfNecessary == null) {
+ cancelIfNecessary = false;
+ }
+ _ref = this.files.slice();
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ file = _ref[_i];
+ if (file.status !== Dropzone.UPLOADING || cancelIfNecessary) {
+ this.removeFile(file);
+ }
+ }
+ return null;
+ };
+
+ Dropzone.prototype.createThumbnail = function(file, callback) {
+ var fileReader;
+ fileReader = new FileReader;
+ fileReader.onload = (function(_this) {
+ return function() {
+ if (file.type === "image/svg+xml") {
+ _this.emit("thumbnail", file, fileReader.result);
+ if (callback != null) {
+ callback();
+ }
+ return;
+ }
+ return _this.createThumbnailFromUrl(file, fileReader.result, callback);
+ };
+ })(this);
+ return fileReader.readAsDataURL(file);
+ };
+
+ Dropzone.prototype.createThumbnailFromUrl = function(file, imageUrl, callback, crossOrigin) {
+ var img;
+ img = document.createElement("img");
+ if (crossOrigin) {
+ img.crossOrigin = crossOrigin;
+ }
+ img.onload = (function(_this) {
+ return function() {
+ var canvas, ctx, resizeInfo, thumbnail, _ref, _ref1, _ref2, _ref3;
+ file.width = img.width;
+ file.height = img.height;
+ resizeInfo = _this.options.resize.call(_this, file);
+ if (resizeInfo.trgWidth == null) {
+ resizeInfo.trgWidth = resizeInfo.optWidth;
+ }
+ if (resizeInfo.trgHeight == null) {
+ resizeInfo.trgHeight = resizeInfo.optHeight;
+ }
+ canvas = document.createElement("canvas");
+ ctx = canvas.getContext("2d");
+ canvas.width = resizeInfo.trgWidth;
+ canvas.height = resizeInfo.trgHeight;
+ drawImageIOSFix(ctx, img, (_ref = resizeInfo.srcX) != null ? _ref : 0, (_ref1 = resizeInfo.srcY) != null ? _ref1 : 0, resizeInfo.srcWidth, resizeInfo.srcHeight, (_ref2 = resizeInfo.trgX) != null ? _ref2 : 0, (_ref3 = resizeInfo.trgY) != null ? _ref3 : 0, resizeInfo.trgWidth, resizeInfo.trgHeight);
+ thumbnail = canvas.toDataURL("image/png");
+ _this.emit("thumbnail", file, thumbnail);
+ if (callback != null) {
+ return callback();
+ }
+ };
+ })(this);
+ if (callback != null) {
+ img.onerror = callback;
+ }
+ return img.src = imageUrl;
+ };
+
+ Dropzone.prototype.processQueue = function() {
+ var i, parallelUploads, processingLength, queuedFiles;
+ parallelUploads = this.options.parallelUploads;
+ processingLength = this.getUploadingFiles().length;
+ i = processingLength;
+ if (processingLength >= parallelUploads) {
+ return;
+ }
+ queuedFiles = this.getQueuedFiles();
+ if (!(queuedFiles.length > 0)) {
+ return;
+ }
+ if (this.options.uploadMultiple) {
+ return this.processFiles(queuedFiles.slice(0, parallelUploads - processingLength));
+ } else {
+ while (i < parallelUploads) {
+ if (!queuedFiles.length) {
+ return;
+ }
+ this.processFile(queuedFiles.shift());
+ i++;
+ }
+ }
+ };
+
+ Dropzone.prototype.processFile = function(file) {
+ return this.processFiles([file]);
+ };
+
+ Dropzone.prototype.processFiles = function(files) {
+ var file, _i, _len;
+ for (_i = 0, _len = files.length; _i < _len; _i++) {
+ file = files[_i];
+ file.processing = true;
+ file.status = Dropzone.UPLOADING;
+ this.emit("processing", file);
+ }
+ if (this.options.uploadMultiple) {
+ this.emit("processingmultiple", files);
+ }
+ return this.uploadFiles(files);
+ };
+
+ Dropzone.prototype._getFilesWithXhr = function(xhr) {
+ var file, files;
+ return files = (function() {
+ var _i, _len, _ref, _results;
+ _ref = this.files;
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ file = _ref[_i];
+ if (file.xhr === xhr) {
+ _results.push(file);
+ }
+ }
+ return _results;
+ }).call(this);
+ };
+
+ Dropzone.prototype.cancelUpload = function(file) {
+ var groupedFile, groupedFiles, _i, _j, _len, _len1, _ref;
+ if (file.status === Dropzone.UPLOADING) {
+ groupedFiles = this._getFilesWithXhr(file.xhr);
+ for (_i = 0, _len = groupedFiles.length; _i < _len; _i++) {
+ groupedFile = groupedFiles[_i];
+ groupedFile.status = Dropzone.CANCELED;
+ }
+ file.xhr.abort();
+ for (_j = 0, _len1 = groupedFiles.length; _j < _len1; _j++) {
+ groupedFile = groupedFiles[_j];
+ this.emit("canceled", groupedFile);
+ }
+ if (this.options.uploadMultiple) {
+ this.emit("canceledmultiple", groupedFiles);
+ }
+ } else if ((_ref = file.status) === Dropzone.ADDED || _ref === Dropzone.QUEUED) {
+ file.status = Dropzone.CANCELED;
+ this.emit("canceled", file);
+ if (this.options.uploadMultiple) {
+ this.emit("canceledmultiple", [file]);
+ }
+ }
+ if (this.options.autoProcessQueue) {
+ return this.processQueue();
+ }
+ };
+
+ resolveOption = function() {
+ var args, option;
+ option = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
+ if (typeof option === 'function') {
+ return option.apply(this, args);
+ }
+ return option;
+ };
+
+ Dropzone.prototype.uploadFile = function(file) {
+ return this.uploadFiles([file]);
+ };
+
+ Dropzone.prototype.uploadFiles = function(files) {
+ var file, formData, handleError, headerName, headerValue, headers, i, input, inputName, inputType, key, method, option, progressObj, response, updateProgress, url, value, xhr, _i, _j, _k, _l, _len, _len1, _len2, _len3, _m, _ref, _ref1, _ref2, _ref3, _ref4, _ref5;
+ xhr = new XMLHttpRequest();
+ for (_i = 0, _len = files.length; _i < _len; _i++) {
+ file = files[_i];
+ file.xhr = xhr;
+ }
+ method = resolveOption(this.options.method, files);
+ url = resolveOption(this.options.url, files);
+ xhr.open(method, url, true);
+ xhr.withCredentials = !!this.options.withCredentials;
+ response = null;
+ handleError = (function(_this) {
+ return function() {
+ var _j, _len1, _results;
+ _results = [];
+ for (_j = 0, _len1 = files.length; _j < _len1; _j++) {
+ file = files[_j];
+ _results.push(_this._errorProcessing(files, response || _this.options.dictResponseError.replace("{{statusCode}}", xhr.status), xhr));
+ }
+ return _results;
+ };
+ })(this);
+ updateProgress = (function(_this) {
+ return function(e) {
+ var allFilesFinished, progress, _j, _k, _l, _len1, _len2, _len3, _results;
+ if (e != null) {
+ progress = 100 * e.loaded / e.total;
+ for (_j = 0, _len1 = files.length; _j < _len1; _j++) {
+ file = files[_j];
+ file.upload = {
+ progress: progress,
+ total: e.total,
+ bytesSent: e.loaded
+ };
+ }
+ } else {
+ allFilesFinished = true;
+ progress = 100;
+ for (_k = 0, _len2 = files.length; _k < _len2; _k++) {
+ file = files[_k];
+ if (!(file.upload.progress === 100 && file.upload.bytesSent === file.upload.total)) {
+ allFilesFinished = false;
+ }
+ file.upload.progress = progress;
+ file.upload.bytesSent = file.upload.total;
+ }
+ if (allFilesFinished) {
+ return;
+ }
+ }
+ _results = [];
+ for (_l = 0, _len3 = files.length; _l < _len3; _l++) {
+ file = files[_l];
+ _results.push(_this.emit("uploadprogress", file, progress, file.upload.bytesSent));
+ }
+ return _results;
+ };
+ })(this);
+ xhr.onload = (function(_this) {
+ return function(e) {
+ var _ref;
+ if (files[0].status === Dropzone.CANCELED) {
+ return;
+ }
+ if (xhr.readyState !== 4) {
+ return;
+ }
+ response = xhr.responseText;
+ if (xhr.getResponseHeader("content-type") && ~xhr.getResponseHeader("content-type").indexOf("application/json")) {
+ try {
+ response = JSON.parse(response);
+ } catch (_error) {
+ e = _error;
+ response = "Invalid JSON response from server.";
+ }
+ }
+ updateProgress();
+ if (!((200 <= (_ref = xhr.status) && _ref < 300))) {
+ return handleError();
+ } else {
+ return _this._finished(files, response, e);
+ }
+ };
+ })(this);
+ xhr.onerror = (function(_this) {
+ return function() {
+ if (files[0].status === Dropzone.CANCELED) {
+ return;
+ }
+ return handleError();
+ };
+ })(this);
+ progressObj = (_ref = xhr.upload) != null ? _ref : xhr;
+ progressObj.onprogress = updateProgress;
+ headers = {
+ "Accept": "application/json",
+ "Cache-Control": "no-cache",
+ "X-Requested-With": "XMLHttpRequest"
+ };
+ if (this.options.headers) {
+ extend(headers, this.options.headers);
+ }
+ for (headerName in headers) {
+ headerValue = headers[headerName];
+ if (headerValue) {
+ xhr.setRequestHeader(headerName, headerValue);
+ }
+ }
+ formData = new FormData();
+ if (this.options.params) {
+ _ref1 = this.options.params;
+ for (key in _ref1) {
+ value = _ref1[key];
+ formData.append(key, value);
+ }
+ }
+ for (_j = 0, _len1 = files.length; _j < _len1; _j++) {
+ file = files[_j];
+ this.emit("sending", file, xhr, formData);
+ }
+ if (this.options.uploadMultiple) {
+ this.emit("sendingmultiple", files, xhr, formData);
+ }
+ if (this.element.tagName === "FORM") {
+ _ref2 = this.element.querySelectorAll("input, textarea, select, button");
+ for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
+ input = _ref2[_k];
+ inputName = input.getAttribute("name");
+ inputType = input.getAttribute("type");
+ if (input.tagName === "SELECT" && input.hasAttribute("multiple")) {
+ _ref3 = input.options;
+ for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) {
+ option = _ref3[_l];
+ if (option.selected) {
+ formData.append(inputName, option.value);
+ }
+ }
+ } else if (!inputType || ((_ref4 = inputType.toLowerCase()) !== "checkbox" && _ref4 !== "radio") || input.checked) {
+ formData.append(inputName, input.value);
+ }
+ }
+ }
+ for (i = _m = 0, _ref5 = files.length - 1; 0 <= _ref5 ? _m <= _ref5 : _m >= _ref5; i = 0 <= _ref5 ? ++_m : --_m) {
+ formData.append(this._getParamName(i), files[i], files[i].name);
+ }
+ return this.submitRequest(xhr, formData, files);
+ };
+
+ Dropzone.prototype.submitRequest = function(xhr, formData, files) {
+ return xhr.send(formData);
+ };
+
+ Dropzone.prototype._finished = function(files, responseText, e) {
+ var file, _i, _len;
+ for (_i = 0, _len = files.length; _i < _len; _i++) {
+ file = files[_i];
+ file.status = Dropzone.SUCCESS;
+ this.emit("success", file, responseText, e);
+ this.emit("complete", file);
+ }
+ if (this.options.uploadMultiple) {
+ this.emit("successmultiple", files, responseText, e);
+ this.emit("completemultiple", files);
+ }
+ if (this.options.autoProcessQueue) {
+ return this.processQueue();
+ }
+ };
+
+ Dropzone.prototype._errorProcessing = function(files, message, xhr) {
+ var file, _i, _len;
+ for (_i = 0, _len = files.length; _i < _len; _i++) {
+ file = files[_i];
+ file.status = Dropzone.ERROR;
+ this.emit("error", file, message, xhr);
+ this.emit("complete", file);
+ }
+ if (this.options.uploadMultiple) {
+ this.emit("errormultiple", files, message, xhr);
+ this.emit("completemultiple", files);
+ }
+ if (this.options.autoProcessQueue) {
+ return this.processQueue();
+ }
+ };
+
+ return Dropzone;
+
+ })(Emitter);
+
+ Dropzone.version = "4.2.0";
+
+ Dropzone.options = {};
+
+ Dropzone.optionsForElement = function(element) {
+ if (element.getAttribute("id")) {
+ return Dropzone.options[camelize(element.getAttribute("id"))];
+ } else {
+ return void 0;
+ }
+ };
+
+ Dropzone.instances = [];
+
+ Dropzone.forElement = function(element) {
+ if (typeof element === "string") {
+ element = document.querySelector(element);
+ }
+ if ((element != null ? element.dropzone : void 0) == null) {
+ throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");
+ }
+ return element.dropzone;
+ };
+
+ Dropzone.autoDiscover = true;
+
+ Dropzone.discover = function() {
+ var checkElements, dropzone, dropzones, _i, _len, _results;
+ if (document.querySelectorAll) {
+ dropzones = document.querySelectorAll(".dropzone");
+ } else {
+ dropzones = [];
+ checkElements = function(elements) {
+ var el, _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = elements.length; _i < _len; _i++) {
+ el = elements[_i];
+ if (/(^| )dropzone($| )/.test(el.className)) {
+ _results.push(dropzones.push(el));
+ } else {
+ _results.push(void 0);
+ }
+ }
+ return _results;
+ };
+ checkElements(document.getElementsByTagName("div"));
+ checkElements(document.getElementsByTagName("form"));
+ }
+ _results = [];
+ for (_i = 0, _len = dropzones.length; _i < _len; _i++) {
+ dropzone = dropzones[_i];
+ if (Dropzone.optionsForElement(dropzone) !== false) {
+ _results.push(new Dropzone(dropzone));
+ } else {
+ _results.push(void 0);
+ }
+ }
+ return _results;
+ };
+
+ Dropzone.blacklistedBrowsers = [/opera.*Macintosh.*version\/12/i];
+
+ Dropzone.isBrowserSupported = function() {
+ var capableBrowser, regex, _i, _len, _ref;
+ capableBrowser = true;
+ if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) {
+ if (!("classList" in document.createElement("a"))) {
+ capableBrowser = false;
+ } else {
+ _ref = Dropzone.blacklistedBrowsers;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ regex = _ref[_i];
+ if (regex.test(navigator.userAgent)) {
+ capableBrowser = false;
+ continue;
+ }
+ }
+ }
+ } else {
+ capableBrowser = false;
+ }
+ return capableBrowser;
+ };
+
+ without = function(list, rejectedItem) {
+ var item, _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = list.length; _i < _len; _i++) {
+ item = list[_i];
+ if (item !== rejectedItem) {
+ _results.push(item);
+ }
+ }
+ return _results;
+ };
+
+ camelize = function(str) {
+ return str.replace(/[\-_](\w)/g, function(match) {
+ return match.charAt(1).toUpperCase();
+ });
+ };
+
+ Dropzone.createElement = function(string) {
+ var div;
+ div = document.createElement("div");
+ div.innerHTML = string;
+ return div.childNodes[0];
+ };
+
+ Dropzone.elementInside = function(element, container) {
+ if (element === container) {
+ return true;
+ }
+ while (element = element.parentNode) {
+ if (element === container) {
+ return true;
+ }
+ }
+ return false;
+ };
+
+ Dropzone.getElement = function(el, name) {
+ var element;
+ if (typeof el === "string") {
+ element = document.querySelector(el);
+ } else if (el.nodeType != null) {
+ element = el;
+ }
+ if (element == null) {
+ throw new Error("Invalid `" + name + "` option provided. Please provide a CSS selector or a plain HTML element.");
+ }
+ return element;
+ };
+
+ Dropzone.getElements = function(els, name) {
+ var e, el, elements, _i, _j, _len, _len1, _ref;
+ if (els instanceof Array) {
+ elements = [];
+ try {
+ for (_i = 0, _len = els.length; _i < _len; _i++) {
+ el = els[_i];
+ elements.push(this.getElement(el, name));
+ }
+ } catch (_error) {
+ e = _error;
+ elements = null;
+ }
+ } else if (typeof els === "string") {
+ elements = [];
+ _ref = document.querySelectorAll(els);
+ for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {
+ el = _ref[_j];
+ elements.push(el);
+ }
+ } else if (els.nodeType != null) {
+ elements = [els];
+ }
+ if (!((elements != null) && elements.length)) {
+ throw new Error("Invalid `" + name + "` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");
+ }
+ return elements;
+ };
+
+ Dropzone.confirm = function(question, accepted, rejected) {
+ if (window.confirm(question)) {
+ return accepted();
+ } else if (rejected != null) {
+ return rejected();
+ }
+ };
+
+ Dropzone.isValidFile = function(file, acceptedFiles) {
+ var baseMimeType, mimeType, validType, _i, _len;
+ if (!acceptedFiles) {
+ return true;
+ }
+ acceptedFiles = acceptedFiles.split(",");
+ mimeType = file.type;
+ baseMimeType = mimeType.replace(/\/.*$/, "");
+ for (_i = 0, _len = acceptedFiles.length; _i < _len; _i++) {
+ validType = acceptedFiles[_i];
+ validType = validType.trim();
+ if (validType.charAt(0) === ".") {
+ if (file.name.toLowerCase().indexOf(validType.toLowerCase(), file.name.length - validType.length) !== -1) {
+ return true;
+ }
+ } else if (/\/\*$/.test(validType)) {
+ if (baseMimeType === validType.replace(/\/.*$/, "")) {
+ return true;
+ }
+ } else {
+ if (mimeType === validType) {
+ return true;
+ }
+ }
+ }
+ return false;
+ };
+
+ if (typeof jQuery !== "undefined" && jQuery !== null) {
+ jQuery.fn.dropzone = function(options) {
+ return this.each(function() {
+ return new Dropzone(this, options);
+ });
+ };
+ }
+
+ if (typeof module !== "undefined" && module !== null) {
+ module.exports = Dropzone;
+ } else {
+ window.Dropzone = Dropzone;
+ }
+
+ Dropzone.ADDED = "added";
+
+ Dropzone.QUEUED = "queued";
+
+ Dropzone.ACCEPTED = Dropzone.QUEUED;
+
+ Dropzone.UPLOADING = "uploading";
+
+ Dropzone.PROCESSING = Dropzone.UPLOADING;
+
+ Dropzone.CANCELED = "canceled";
+
+ Dropzone.ERROR = "error";
+
+ Dropzone.SUCCESS = "success";
+
+
+ /*
+
+ Bugfix for iOS 6 and 7
+ Source: http://stackoverflow.com/questions/11929099/html5-canvas-drawimage-ratio-bug-ios
+ based on the work of https://github.com/stomita/ios-imagefile-megapixel
+ */
+
+ detectVerticalSquash = function(img) {
+ var alpha, canvas, ctx, data, ey, ih, iw, py, ratio, sy;
+ iw = img.naturalWidth;
+ ih = img.naturalHeight;
+ canvas = document.createElement("canvas");
+ canvas.width = 1;
+ canvas.height = ih;
+ ctx = canvas.getContext("2d");
+ ctx.drawImage(img, 0, 0);
+ data = ctx.getImageData(0, 0, 1, ih).data;
+ sy = 0;
+ ey = ih;
+ py = ih;
+ while (py > sy) {
+ alpha = data[(py - 1) * 4 + 3];
+ if (alpha === 0) {
+ ey = py;
+ } else {
+ sy = py;
+ }
+ py = (ey + sy) >> 1;
+ }
+ ratio = py / ih;
+ if (ratio === 0) {
+ return 1;
+ } else {
+ return ratio;
+ }
+ };
+
+ drawImageIOSFix = function(ctx, img, sx, sy, sw, sh, dx, dy, dw, dh) {
+ var vertSquashRatio;
+ vertSquashRatio = detectVerticalSquash(img);
+ return ctx.drawImage(img, sx, sy, sw, sh, dx, dy, dw, dh / vertSquashRatio);
+ };
+
+
+ /*
+ * contentloaded.js
+ *
+ * Author: Diego Perini (diego.perini at gmail.com)
+ * Summary: cross-browser wrapper for DOMContentLoaded
+ * Updated: 20101020
+ * License: MIT
+ * Version: 1.2
+ *
+ * URL:
+ * http://javascript.nwbox.com/ContentLoaded/
+ * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE
+ */
+
+ contentLoaded = function(win, fn) {
+ var add, doc, done, init, poll, pre, rem, root, top;
+ done = false;
+ top = true;
+ doc = win.document;
+ root = doc.documentElement;
+ add = (doc.addEventListener ? "addEventListener" : "attachEvent");
+ rem = (doc.addEventListener ? "removeEventListener" : "detachEvent");
+ pre = (doc.addEventListener ? "" : "on");
+ init = function(e) {
+ if (e.type === "readystatechange" && doc.readyState !== "complete") {
+ return;
+ }
+ (e.type === "load" ? win : doc)[rem](pre + e.type, init, false);
+ if (!done && (done = true)) {
+ return fn.call(win, e.type || e);
+ }
+ };
+ poll = function() {
+ var e;
+ try {
+ root.doScroll("left");
+ } catch (_error) {
+ e = _error;
+ setTimeout(poll, 50);
+ return;
+ }
+ return init("poll");
+ };
+ if (doc.readyState !== "complete") {
+ if (doc.createEventObject && root.doScroll) {
+ try {
+ top = !win.frameElement;
+ } catch (_error) {}
+ if (top) {
+ poll();
+ }
+ }
+ doc[add](pre + "DOMContentLoaded", init, false);
+ doc[add](pre + "readystatechange", init, false);
+ return win[add](pre + "load", init, false);
+ }
+ };
+
+ Dropzone._autoDiscoverFunction = function() {
+ if (Dropzone.autoDiscover) {
+ return Dropzone.discover();
+ }
+ };
+
+ contentLoaded(window, Dropzone._autoDiscoverFunction);
+
+ }).call(this);
+
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(226)(module)))
+
+/***/ },
+
+/***/ 226:
+/***/ function(module, exports) {
+
+ module.exports = function(module) {
+ if(!module.webpackPolyfill) {
+ module.deprecate = function() {};
+ module.paths = [];
+ // module.parent = undefined by default
+ module.children = [];
+ module.webpackPolyfill = 1;
+ }
+ return module;
+ }
+
+
+/***/ },
+
+/***/ 238:
+/***/ function(module, exports) {
+
+ /* ========================================================================
+ * Bootstrap: dropdown.js v3.3.6
+ * http://getbootstrap.com/javascript/#dropdowns
+ * ========================================================================
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
+ +function ($) {
+ 'use strict';
+
+ // DROPDOWN CLASS DEFINITION
+ // =========================
+
+ var backdrop = '.dropdown-backdrop'
+ var toggle = '[data-toggle="dropdown"]'
+ var Dropdown = function (element) {
+ $(element).on('click.bs.dropdown', this.toggle)
+ }
+
+ Dropdown.VERSION = '3.3.6'
+
+ function getParent($this) {
+ var selector = $this.attr('data-target')
+
+ if (!selector) {
+ selector = $this.attr('href')
+ selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
+ }
+
+ var $parent = selector && $(selector)
+
+ return $parent && $parent.length ? $parent : $this.parent()
+ }
+
+ function clearMenus(e) {
+ if (e && e.which === 3) return
+ $(backdrop).remove()
+ $(toggle).each(function () {
+ var $this = $(this)
+ var $parent = getParent($this)
+ var relatedTarget = { relatedTarget: this }
+
+ if (!$parent.hasClass('open')) return
+
+ if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return
+
+ $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
+
+ if (e.isDefaultPrevented()) return
+
+ $this.attr('aria-expanded', 'false')
+ $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))
+ })
+ }
+
+ Dropdown.prototype.toggle = function (e) {
+ var $this = $(this)
+
+ if ($this.is('.disabled, :disabled')) return
+
+ var $parent = getParent($this)
+ var isActive = $parent.hasClass('open')
+
+ clearMenus()
+
+ if (!isActive) {
+ if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
+ // if mobile we use a backdrop because click events don't delegate
+ $(document.createElement('div'))
+ .addClass('dropdown-backdrop')
+ .insertAfter($(this))
+ .on('click', clearMenus)
+ }
+
+ var relatedTarget = { relatedTarget: this }
+ $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
+
+ if (e.isDefaultPrevented()) return
+
+ $this
+ .trigger('focus')
+ .attr('aria-expanded', 'true')
+
+ $parent
+ .toggleClass('open')
+ .trigger($.Event('shown.bs.dropdown', relatedTarget))
+ }
+
+ return false
+ }
+
+ Dropdown.prototype.keydown = function (e) {
+ if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
+
+ var $this = $(this)
+
+ e.preventDefault()
+ e.stopPropagation()
+
+ if ($this.is('.disabled, :disabled')) return
+
+ var $parent = getParent($this)
+ var isActive = $parent.hasClass('open')
+
+ if (!isActive && e.which != 27 || isActive && e.which == 27) {
+ if (e.which == 27) $parent.find(toggle).trigger('focus')
+ return $this.trigger('click')
+ }
+
+ var desc = ' li:not(.disabled):visible a'
+ var $items = $parent.find('.dropdown-menu' + desc)
+
+ if (!$items.length) return
+
+ var index = $items.index(e.target)
+
+ if (e.which == 38 && index > 0) index-- // up
+ if (e.which == 40 && index < $items.length - 1) index++ // down
+ if (!~index) index = 0
+
+ $items.eq(index).trigger('focus')
+ }
+
+
+ // DROPDOWN PLUGIN DEFINITION
+ // ==========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.dropdown')
+
+ if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
+ if (typeof option == 'string') data[option].call($this)
+ })
+ }
+
+ var old = $.fn.dropdown
+
+ $.fn.dropdown = Plugin
+ $.fn.dropdown.Constructor = Dropdown
+
+
+ // DROPDOWN NO CONFLICT
+ // ====================
+
+ $.fn.dropdown.noConflict = function () {
+ $.fn.dropdown = old
+ return this
+ }
+
+
+ // APPLY TO STANDARD DROPDOWN ELEMENTS
+ // ===================================
+
+ $(document)
+ .on('click.bs.dropdown.data-api', clearMenus)
+ .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
+ .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
+ .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
+ .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
+
+ }(jQuery);
+
+
+/***/ },
+
+/***/ 239:
+/***/ function(module, exports, __webpack_require__) {
+
+ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
+ * Remodal - v1.0.6
+ * Responsive, lightweight, fast, synchronized with CSS animations, fully customizable modal window plugin with declarative configuration and hash tracking.
+ * http://vodkabears.github.io/remodal/
+ *
+ * Made by Ilya Makarov
+ * Under MIT License
+ */
+
+ !(function(root, factory) {
+ if (true) {
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(196)], __WEBPACK_AMD_DEFINE_RESULT__ = function($) {
+ return factory(root, $);
+ }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+ } else if (typeof exports === 'object') {
+ factory(root, require('jquery'));
+ } else {
+ factory(root, root.jQuery || root.Zepto);
+ }
+ })(this, function(global, $) {
+
+ 'use strict';
+
+ /**
+ * Name of the plugin
+ * @private
+ * @const
+ * @type {String}
+ */
+ var PLUGIN_NAME = 'remodal';
+
+ /**
+ * Namespace for CSS and events
+ * @private
+ * @const
+ * @type {String}
+ */
+ var NAMESPACE = global.REMODAL_GLOBALS && global.REMODAL_GLOBALS.NAMESPACE || PLUGIN_NAME;
+
+ /**
+ * Animationstart event with vendor prefixes
+ * @private
+ * @const
+ * @type {String}
+ */
+ var ANIMATIONSTART_EVENTS = $.map(
+ ['animationstart', 'webkitAnimationStart', 'MSAnimationStart', 'oAnimationStart'],
+
+ function(eventName) {
+ return eventName + '.' + NAMESPACE;
+ }
+
+ ).join(' ');
+
+ /**
+ * Animationend event with vendor prefixes
+ * @private
+ * @const
+ * @type {String}
+ */
+ var ANIMATIONEND_EVENTS = $.map(
+ ['animationend', 'webkitAnimationEnd', 'MSAnimationEnd', 'oAnimationEnd'],
+
+ function(eventName) {
+ return eventName + '.' + NAMESPACE;
+ }
+
+ ).join(' ');
+
+ /**
+ * Default settings
+ * @private
+ * @const
+ * @type {Object}
+ */
+ var DEFAULTS = $.extend({
+ hashTracking: true,
+ closeOnConfirm: true,
+ closeOnCancel: true,
+ closeOnEscape: true,
+ closeOnOutsideClick: true,
+ modifier: ''
+ }, global.REMODAL_GLOBALS && global.REMODAL_GLOBALS.DEFAULTS);
+
+ /**
+ * States of the Remodal
+ * @private
+ * @const
+ * @enum {String}
+ */
+ var STATES = {
+ CLOSING: 'closing',
+ CLOSED: 'closed',
+ OPENING: 'opening',
+ OPENED: 'opened'
+ };
+
+ /**
+ * Reasons of the state change.
+ * @private
+ * @const
+ * @enum {String}
+ */
+ var STATE_CHANGE_REASONS = {
+ CONFIRMATION: 'confirmation',
+ CANCELLATION: 'cancellation'
+ };
+
+ /**
+ * Is animation supported?
+ * @private
+ * @const
+ * @type {Boolean}
+ */
+ var IS_ANIMATION = (function() {
+ var style = document.createElement('div').style;
+
+ return style.animationName !== undefined ||
+ style.WebkitAnimationName !== undefined ||
+ style.MozAnimationName !== undefined ||
+ style.msAnimationName !== undefined ||
+ style.OAnimationName !== undefined;
+ })();
+
+ /**
+ * Is iOS?
+ * @private
+ * @const
+ * @type {Boolean}
+ */
+ var IS_IOS = /iPad|iPhone|iPod/.test(navigator.platform);
+
+ /**
+ * Current modal
+ * @private
+ * @type {Remodal}
+ */
+ var current;
+
+ /**
+ * Scrollbar position
+ * @private
+ * @type {Number}
+ */
+ var scrollTop;
+
+ /**
+ * Returns an animation duration
+ * @private
+ * @param {jQuery} $elem
+ * @returns {Number}
+ */
+ function getAnimationDuration($elem) {
+ if (
+ IS_ANIMATION &&
+ $elem.css('animation-name') === 'none' &&
+ $elem.css('-webkit-animation-name') === 'none' &&
+ $elem.css('-moz-animation-name') === 'none' &&
+ $elem.css('-o-animation-name') === 'none' &&
+ $elem.css('-ms-animation-name') === 'none'
+ ) {
+ return 0;
+ }
+
+ var duration = $elem.css('animation-duration') ||
+ $elem.css('-webkit-animation-duration') ||
+ $elem.css('-moz-animation-duration') ||
+ $elem.css('-o-animation-duration') ||
+ $elem.css('-ms-animation-duration') ||
+ '0s';
+
+ var delay = $elem.css('animation-delay') ||
+ $elem.css('-webkit-animation-delay') ||
+ $elem.css('-moz-animation-delay') ||
+ $elem.css('-o-animation-delay') ||
+ $elem.css('-ms-animation-delay') ||
+ '0s';
+
+ var iterationCount = $elem.css('animation-iteration-count') ||
+ $elem.css('-webkit-animation-iteration-count') ||
+ $elem.css('-moz-animation-iteration-count') ||
+ $elem.css('-o-animation-iteration-count') ||
+ $elem.css('-ms-animation-iteration-count') ||
+ '1';
+
+ var max;
+ var len;
+ var num;
+ var i;
+
+ duration = duration.split(', ');
+ delay = delay.split(', ');
+ iterationCount = iterationCount.split(', ');
+
+ // The 'duration' size is the same as the 'delay' size
+ for (i = 0, len = duration.length, max = Number.NEGATIVE_INFINITY; i < len; i++) {
+ num = parseFloat(duration[i]) * parseInt(iterationCount[i], 10) + parseFloat(delay[i]);
+
+ if (num > max) {
+ max = num;
+ }
+ }
+
+ return num;
+ }
+
+ /**
+ * Returns a scrollbar width
+ * @private
+ * @returns {Number}
+ */
+ function getScrollbarWidth() {
+ if ($(document.body).height() <= $(window).height()) {
+ return 0;
+ }
+
+ var outer = document.createElement('div');
+ var inner = document.createElement('div');
+ var widthNoScroll;
+ var widthWithScroll;
+
+ outer.style.visibility = 'hidden';
+ outer.style.width = '100px';
+ document.body.appendChild(outer);
+
+ widthNoScroll = outer.offsetWidth;
+
+ // Force scrollbars
+ outer.style.overflow = 'scroll';
+
+ // Add inner div
+ inner.style.width = '100%';
+ outer.appendChild(inner);
+
+ widthWithScroll = inner.offsetWidth;
+
+ // Remove divs
+ outer.parentNode.removeChild(outer);
+
+ return widthNoScroll - widthWithScroll;
+ }
+
+ /**
+ * Locks the screen
+ * @private
+ */
+ function lockScreen() {
+ if (IS_IOS) {
+ return;
+ }
+
+ var $html = $('html');
+ var lockedClass = namespacify('is-locked');
+ var paddingRight;
+ var $body;
+
+ if (!$html.hasClass(lockedClass)) {
+ $body = $(document.body);
+
+ // Zepto does not support '-=', '+=' in the `css` method
+ paddingRight = parseInt($body.css('padding-right'), 10) + getScrollbarWidth();
+
+ $body.css('padding-right', paddingRight + 'px');
+ $html.addClass(lockedClass);
+ }
+ }
+
+ /**
+ * Unlocks the screen
+ * @private
+ */
+ function unlockScreen() {
+ if (IS_IOS) {
+ return;
+ }
+
+ var $html = $('html');
+ var lockedClass = namespacify('is-locked');
+ var paddingRight;
+ var $body;
+
+ if ($html.hasClass(lockedClass)) {
+ $body = $(document.body);
+
+ // Zepto does not support '-=', '+=' in the `css` method
+ paddingRight = parseInt($body.css('padding-right'), 10) - getScrollbarWidth();
+
+ $body.css('padding-right', paddingRight + 'px');
+ $html.removeClass(lockedClass);
+ }
+ }
+
+ /**
+ * Sets a state for an instance
+ * @private
+ * @param {Remodal} instance
+ * @param {STATES} state
+ * @param {Boolean} isSilent If true, Remodal does not trigger events
+ * @param {String} Reason of a state change.
+ */
+ function setState(instance, state, isSilent, reason) {
+
+ var newState = namespacify('is', state);
+ var allStates = [namespacify('is', STATES.CLOSING),
+ namespacify('is', STATES.OPENING),
+ namespacify('is', STATES.CLOSED),
+ namespacify('is', STATES.OPENED)].join(' ');
+
+ instance.$bg
+ .removeClass(allStates)
+ .addClass(newState);
+
+ instance.$overlay
+ .removeClass(allStates)
+ .addClass(newState);
+
+ instance.$wrapper
+ .removeClass(allStates)
+ .addClass(newState);
+
+ instance.$modal
+ .removeClass(allStates)
+ .addClass(newState);
+
+ instance.state = state;
+ !isSilent && instance.$modal.trigger({
+ type: state,
+ reason: reason
+ }, [{ reason: reason }]);
+ }
+
+ /**
+ * Synchronizes with the animation
+ * @param {Function} doBeforeAnimation
+ * @param {Function} doAfterAnimation
+ * @param {Remodal} instance
+ */
+ function syncWithAnimation(doBeforeAnimation, doAfterAnimation, instance) {
+ var runningAnimationsCount = 0;
+
+ var handleAnimationStart = function(e) {
+ if (e.target !== this) {
+ return;
+ }
+
+ runningAnimationsCount++;
+ };
+
+ var handleAnimationEnd = function(e) {
+ if (e.target !== this) {
+ return;
+ }
+
+ if (--runningAnimationsCount === 0) {
+
+ // Remove event listeners
+ $.each(['$bg', '$overlay', '$wrapper', '$modal'], function(index, elemName) {
+ instance[elemName].off(ANIMATIONSTART_EVENTS + ' ' + ANIMATIONEND_EVENTS);
+ });
+
+ doAfterAnimation();
+ }
+ };
+
+ $.each(['$bg', '$overlay', '$wrapper', '$modal'], function(index, elemName) {
+ instance[elemName]
+ .on(ANIMATIONSTART_EVENTS, handleAnimationStart)
+ .on(ANIMATIONEND_EVENTS, handleAnimationEnd);
+ });
+
+ doBeforeAnimation();
+
+ // If the animation is not supported by a browser or its duration is 0
+ if (
+ getAnimationDuration(instance.$bg) === 0 &&
+ getAnimationDuration(instance.$overlay) === 0 &&
+ getAnimationDuration(instance.$wrapper) === 0 &&
+ getAnimationDuration(instance.$modal) === 0
+ ) {
+
+ // Remove event listeners
+ $.each(['$bg', '$overlay', '$wrapper', '$modal'], function(index, elemName) {
+ instance[elemName].off(ANIMATIONSTART_EVENTS + ' ' + ANIMATIONEND_EVENTS);
+ });
+
+ doAfterAnimation();
+ }
+ }
+
+ /**
+ * Closes immediately
+ * @private
+ * @param {Remodal} instance
+ */
+ function halt(instance) {
+ if (instance.state === STATES.CLOSED) {
+ return;
+ }
+
+ $.each(['$bg', '$overlay', '$wrapper', '$modal'], function(index, elemName) {
+ instance[elemName].off(ANIMATIONSTART_EVENTS + ' ' + ANIMATIONEND_EVENTS);
+ });
+
+ instance.$bg.removeClass(instance.settings.modifier);
+ instance.$overlay.removeClass(instance.settings.modifier).hide();
+ instance.$wrapper.hide();
+ unlockScreen();
+ setState(instance, STATES.CLOSED, true);
+ }
+
+ /**
+ * Parses a string with options
+ * @private
+ * @param str
+ * @returns {Object}
+ */
+ function parseOptions(str) {
+ var obj = {};
+ var arr;
+ var len;
+ var val;
+ var i;
+
+ // Remove spaces before and after delimiters
+ str = str.replace(/\s*:\s*/g, ':').replace(/\s*,\s*/g, ',');
+
+ // Parse a string
+ arr = str.split(',');
+ for (i = 0, len = arr.length; i < len; i++) {
+ arr[i] = arr[i].split(':');
+ val = arr[i][1];
+
+ // Convert a string value if it is like a boolean
+ if (typeof val === 'string' || val instanceof String) {
+ val = val === 'true' || (val === 'false' ? false : val);
+ }
+
+ // Convert a string value if it is like a number
+ if (typeof val === 'string' || val instanceof String) {
+ val = !isNaN(val) ? +val : val;
+ }
+
+ obj[arr[i][0]] = val;
+ }
+
+ return obj;
+ }
+
+ /**
+ * Generates a string separated by dashes and prefixed with NAMESPACE
+ * @private
+ * @param {...String}
+ * @returns {String}
+ */
+ function namespacify() {
+ var result = NAMESPACE;
+
+ for (var i = 0; i < arguments.length; ++i) {
+ result += '-' + arguments[i];
+ }
+
+ return result;
+ }
+
+ /**
+ * Handles the hashchange event
+ * @private
+ * @listens hashchange
+ */
+ function handleHashChangeEvent() {
+ var id = location.hash.replace('#', '');
+ var instance;
+ var $elem;
+
+ if (!id) {
+
+ // Check if we have currently opened modal and animation was completed
+ if (current && current.state === STATES.OPENED && current.settings.hashTracking) {
+ current.close();
+ }
+ } else {
+
+ // Catch syntax error if your hash is bad
+ try {
+ $elem = $(
+ '[data-' + PLUGIN_NAME + '-id="' + id + '"]'
+ );
+ } catch (err) {}
+
+ if ($elem && $elem.length) {
+ instance = $[PLUGIN_NAME].lookup[$elem.data(PLUGIN_NAME)];
+
+ if (instance && instance.settings.hashTracking) {
+ instance.open();
+ }
+ }
+
+ }
+ }
+
+ /**
+ * Remodal constructor
+ * @constructor
+ * @param {jQuery} $modal
+ * @param {Object} options
+ */
+ function Remodal($modal, options) {
+ var $body = $(document.body);
+ var remodal = this;
+
+ remodal.settings = $.extend({}, DEFAULTS, options);
+ remodal.index = $[PLUGIN_NAME].lookup.push(remodal) - 1;
+ remodal.state = STATES.CLOSED;
+
+ remodal.$overlay = $('.' + namespacify('overlay'));
+
+ if (!remodal.$overlay.length) {
+ remodal.$overlay = $('').addClass(namespacify('overlay') + ' ' + namespacify('is', STATES.CLOSED)).hide();
+ $body.append(remodal.$overlay);
+ }
+
+ remodal.$bg = $('.' + namespacify('bg')).addClass(namespacify('is', STATES.CLOSED));
+
+ remodal.$modal = $modal
+ .addClass(
+ NAMESPACE + ' ' +
+ namespacify('is-initialized') + ' ' +
+ remodal.settings.modifier + ' ' +
+ namespacify('is', STATES.CLOSED))
+ .attr('tabindex', '-1');
+
+ remodal.$wrapper = $('
')
+ .addClass(
+ namespacify('wrapper') + ' ' +
+ remodal.settings.modifier + ' ' +
+ namespacify('is', STATES.CLOSED))
+ .hide()
+ .append(remodal.$modal);
+ $body.append(remodal.$wrapper);
+
+ // Add the event listener for the close button
+ remodal.$wrapper.on('click.' + NAMESPACE, '[data-' + PLUGIN_NAME + '-action="close"]', function(e) {
+ e.preventDefault();
+
+ remodal.close();
+ });
+
+ // Add the event listener for the cancel button
+ remodal.$wrapper.on('click.' + NAMESPACE, '[data-' + PLUGIN_NAME + '-action="cancel"]', function(e) {
+ e.preventDefault();
+
+ remodal.$modal.trigger(STATE_CHANGE_REASONS.CANCELLATION);
+
+ if (remodal.settings.closeOnCancel) {
+ remodal.close(STATE_CHANGE_REASONS.CANCELLATION);
+ }
+ });
+
+ // Add the event listener for the confirm button
+ remodal.$wrapper.on('click.' + NAMESPACE, '[data-' + PLUGIN_NAME + '-action="confirm"]', function(e) {
+ e.preventDefault();
+
+ remodal.$modal.trigger(STATE_CHANGE_REASONS.CONFIRMATION);
+
+ if (remodal.settings.closeOnConfirm) {
+ remodal.close(STATE_CHANGE_REASONS.CONFIRMATION);
+ }
+ });
+
+ // Add the event listener for the overlay
+ remodal.$wrapper.on('click.' + NAMESPACE, function(e) {
+ var $target = $(e.target);
+
+ if (!$target.hasClass(namespacify('wrapper'))) {
+ return;
+ }
+
+ if (remodal.settings.closeOnOutsideClick) {
+ remodal.close();
+ }
+ });
+ }
+
+ /**
+ * Opens a modal window
+ * @public
+ */
+ Remodal.prototype.open = function() {
+ var remodal = this;
+ var id;
+
+ // Check if the animation was completed
+ if (remodal.state === STATES.OPENING || remodal.state === STATES.CLOSING) {
+ return;
+ }
+
+ id = remodal.$modal.attr('data-' + PLUGIN_NAME + '-id');
+
+ if (id && remodal.settings.hashTracking) {
+ scrollTop = $(window).scrollTop();
+ location.hash = id;
+ }
+
+ if (current && current !== remodal) {
+ halt(current);
+ }
+
+ current = remodal;
+ lockScreen();
+ remodal.$bg.addClass(remodal.settings.modifier);
+ remodal.$overlay.addClass(remodal.settings.modifier).show();
+ remodal.$wrapper.show().scrollTop(0);
+ remodal.$modal.focus();
+
+ syncWithAnimation(
+ function() {
+ setState(remodal, STATES.OPENING);
+ },
+
+ function() {
+ setState(remodal, STATES.OPENED);
+ },
+
+ remodal);
+ };
+
+ /**
+ * Closes a modal window
+ * @public
+ * @param {String} reason
+ */
+ Remodal.prototype.close = function(reason) {
+ var remodal = this;
+
+ // Check if the animation was completed
+ if (remodal.state === STATES.OPENING || remodal.state === STATES.CLOSING) {
+ return;
+ }
+
+ if (
+ remodal.settings.hashTracking &&
+ remodal.$modal.attr('data-' + PLUGIN_NAME + '-id') === location.hash.substr(1)
+ ) {
+ location.hash = '';
+ $(window).scrollTop(scrollTop);
+ }
+
+ syncWithAnimation(
+ function() {
+ setState(remodal, STATES.CLOSING, false, reason);
+ },
+
+ function() {
+ remodal.$bg.removeClass(remodal.settings.modifier);
+ remodal.$overlay.removeClass(remodal.settings.modifier).hide();
+ remodal.$wrapper.hide();
+ unlockScreen();
+
+ setState(remodal, STATES.CLOSED, false, reason);
+ },
+
+ remodal);
+ };
+
+ /**
+ * Returns a current state of a modal
+ * @public
+ * @returns {STATES}
+ */
+ Remodal.prototype.getState = function() {
+ return this.state;
+ };
+
+ /**
+ * Destroys a modal
+ * @public
+ */
+ Remodal.prototype.destroy = function() {
+ var lookup = $[PLUGIN_NAME].lookup;
+ var instanceCount;
+
+ halt(this);
+ this.$wrapper.remove();
+
+ delete lookup[this.index];
+ instanceCount = $.grep(lookup, function(instance) {
+ return !!instance;
+ }).length;
+
+ if (instanceCount === 0) {
+ this.$overlay.remove();
+ this.$bg.removeClass(
+ namespacify('is', STATES.CLOSING) + ' ' +
+ namespacify('is', STATES.OPENING) + ' ' +
+ namespacify('is', STATES.CLOSED) + ' ' +
+ namespacify('is', STATES.OPENED));
+ }
+ };
+
+ /**
+ * Special plugin object for instances
+ * @public
+ * @type {Object}
+ */
+ $[PLUGIN_NAME] = {
+ lookup: []
+ };
+
+ /**
+ * Plugin constructor
+ * @constructor
+ * @param {Object} options
+ * @returns {JQuery}
+ */
+ $.fn[PLUGIN_NAME] = function(opts) {
+ var instance;
+ var $elem;
+
+ this.each(function(index, elem) {
+ $elem = $(elem);
+
+ if ($elem.data(PLUGIN_NAME) == null) {
+ instance = new Remodal($elem, opts);
+ $elem.data(PLUGIN_NAME, instance.index);
+
+ if (
+ instance.settings.hashTracking &&
+ $elem.attr('data-' + PLUGIN_NAME + '-id') === location.hash.substr(1)
+ ) {
+ instance.open();
+ }
+ } else {
+ instance = $[PLUGIN_NAME].lookup[$elem.data(PLUGIN_NAME)];
+ }
+ });
+
+ return instance;
+ };
+
+ $(document).ready(function() {
+
+ // data-remodal-target opens a modal window with the special Id
+ $(document).on('click', '[data-' + PLUGIN_NAME + '-target]', function(e) {
+ e.preventDefault();
+
+ var elem = e.currentTarget;
+ var id = elem.getAttribute('data-' + PLUGIN_NAME + '-target');
+ var $target = $('[data-' + PLUGIN_NAME + '-id="' + id + '"]');
+
+ $[PLUGIN_NAME].lookup[$target.data(PLUGIN_NAME)].open();
+ });
+
+ // Auto initialization of modal windows
+ // They should have the 'remodal' class attribute
+ // Also you can write the `data-remodal-options` attribute to pass params into the modal
+ $(document).find('.' + NAMESPACE).each(function(i, container) {
+ var $container = $(container);
+ var options = $container.data(PLUGIN_NAME + '-options');
+
+ if (!options) {
+ options = {};
+ } else if (typeof options === 'string' || options instanceof String) {
+ options = parseOptions(options);
+ }
+
+ $container[PLUGIN_NAME](options);
+ });
+
+ // Handles the keydown event
+ $(document).on('keydown.' + NAMESPACE, function(e) {
+ if (current && current.settings.closeOnEscape && current.state === STATES.OPENED && e.keyCode === 27) {
+ current.close();
+ }
+ });
+
+ // Handles the hashchange event
+ $(window).on('hashchange.' + NAMESPACE, handleHashChangeEvent);
+ });
+ });
+
+
+/***/ },
+
+/***/ 240:
+/***/ function(module, exports, __webpack_require__) {
+
+ // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
+ __webpack_require__(241)
+ __webpack_require__(242)
+ __webpack_require__(243)
+ __webpack_require__(244)
+ __webpack_require__(245)
+ __webpack_require__(238)
+ __webpack_require__(246)
+ __webpack_require__(247)
+ __webpack_require__(248)
+ __webpack_require__(249)
+ __webpack_require__(250)
+ __webpack_require__(251)
+
+/***/ },
+
+/***/ 241:
+/***/ function(module, exports) {
+
+ /* ========================================================================
+ * Bootstrap: transition.js v3.3.6
+ * http://getbootstrap.com/javascript/#transitions
+ * ========================================================================
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
+ +function ($) {
+ 'use strict';
+
+ // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
+ // ============================================================
+
+ function transitionEnd() {
+ var el = document.createElement('bootstrap')
+
+ var transEndEventNames = {
+ WebkitTransition : 'webkitTransitionEnd',
+ MozTransition : 'transitionend',
+ OTransition : 'oTransitionEnd otransitionend',
+ transition : 'transitionend'
+ }
+
+ for (var name in transEndEventNames) {
+ if (el.style[name] !== undefined) {
+ return { end: transEndEventNames[name] }
+ }
+ }
+
+ return false // explicit for ie8 ( ._.)
+ }
+
+ // http://blog.alexmaccaw.com/css-transitions
+ $.fn.emulateTransitionEnd = function (duration) {
+ var called = false
+ var $el = this
+ $(this).one('bsTransitionEnd', function () { called = true })
+ var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
+ setTimeout(callback, duration)
+ return this
+ }
+
+ $(function () {
+ $.support.transition = transitionEnd()
+
+ if (!$.support.transition) return
+
+ $.event.special.bsTransitionEnd = {
+ bindType: $.support.transition.end,
+ delegateType: $.support.transition.end,
+ handle: function (e) {
+ if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
+ }
+ }
+ })
+
+ }(jQuery);
+
+
+/***/ },
+
+/***/ 242:
+/***/ function(module, exports) {
+
+ /* ========================================================================
+ * Bootstrap: alert.js v3.3.6
+ * http://getbootstrap.com/javascript/#alerts
+ * ========================================================================
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
+ +function ($) {
+ 'use strict';
+
+ // ALERT CLASS DEFINITION
+ // ======================
+
+ var dismiss = '[data-dismiss="alert"]'
+ var Alert = function (el) {
+ $(el).on('click', dismiss, this.close)
+ }
+
+ Alert.VERSION = '3.3.6'
+
+ Alert.TRANSITION_DURATION = 150
+
+ Alert.prototype.close = function (e) {
+ var $this = $(this)
+ var selector = $this.attr('data-target')
+
+ if (!selector) {
+ selector = $this.attr('href')
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
+ }
+
+ var $parent = $(selector)
+
+ if (e) e.preventDefault()
+
+ if (!$parent.length) {
+ $parent = $this.closest('.alert')
+ }
+
+ $parent.trigger(e = $.Event('close.bs.alert'))
+
+ if (e.isDefaultPrevented()) return
+
+ $parent.removeClass('in')
+
+ function removeElement() {
+ // detach from parent, fire event then clean up data
+ $parent.detach().trigger('closed.bs.alert').remove()
+ }
+
+ $.support.transition && $parent.hasClass('fade') ?
+ $parent
+ .one('bsTransitionEnd', removeElement)
+ .emulateTransitionEnd(Alert.TRANSITION_DURATION) :
+ removeElement()
+ }
+
+
+ // ALERT PLUGIN DEFINITION
+ // =======================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.alert')
+
+ if (!data) $this.data('bs.alert', (data = new Alert(this)))
+ if (typeof option == 'string') data[option].call($this)
+ })
+ }
+
+ var old = $.fn.alert
+
+ $.fn.alert = Plugin
+ $.fn.alert.Constructor = Alert
+
+
+ // ALERT NO CONFLICT
+ // =================
+
+ $.fn.alert.noConflict = function () {
+ $.fn.alert = old
+ return this
+ }
+
+
+ // ALERT DATA-API
+ // ==============
+
+ $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
+
+ }(jQuery);
+
+
+/***/ },
+
+/***/ 243:
+/***/ function(module, exports) {
+
+ /* ========================================================================
+ * Bootstrap: button.js v3.3.6
+ * http://getbootstrap.com/javascript/#buttons
+ * ========================================================================
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
+ +function ($) {
+ 'use strict';
+
+ // BUTTON PUBLIC CLASS DEFINITION
+ // ==============================
+
+ var Button = function (element, options) {
+ this.$element = $(element)
+ this.options = $.extend({}, Button.DEFAULTS, options)
+ this.isLoading = false
+ }
+
+ Button.VERSION = '3.3.6'
+
+ Button.DEFAULTS = {
+ loadingText: 'loading...'
+ }
+
+ Button.prototype.setState = function (state) {
+ var d = 'disabled'
+ var $el = this.$element
+ var val = $el.is('input') ? 'val' : 'html'
+ var data = $el.data()
+
+ state += 'Text'
+
+ if (data.resetText == null) $el.data('resetText', $el[val]())
+
+ // push to event loop to allow forms to submit
+ setTimeout($.proxy(function () {
+ $el[val](data[state] == null ? this.options[state] : data[state])
+
+ if (state == 'loadingText') {
+ this.isLoading = true
+ $el.addClass(d).attr(d, d)
+ } else if (this.isLoading) {
+ this.isLoading = false
+ $el.removeClass(d).removeAttr(d)
+ }
+ }, this), 0)
+ }
+
+ Button.prototype.toggle = function () {
+ var changed = true
+ var $parent = this.$element.closest('[data-toggle="buttons"]')
+
+ if ($parent.length) {
+ var $input = this.$element.find('input')
+ if ($input.prop('type') == 'radio') {
+ if ($input.prop('checked')) changed = false
+ $parent.find('.active').removeClass('active')
+ this.$element.addClass('active')
+ } else if ($input.prop('type') == 'checkbox') {
+ if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
+ this.$element.toggleClass('active')
+ }
+ $input.prop('checked', this.$element.hasClass('active'))
+ if (changed) $input.trigger('change')
+ } else {
+ this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
+ this.$element.toggleClass('active')
+ }
+ }
+
+
+ // BUTTON PLUGIN DEFINITION
+ // ========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.button')
+ var options = typeof option == 'object' && option
+
+ if (!data) $this.data('bs.button', (data = new Button(this, options)))
+
+ if (option == 'toggle') data.toggle()
+ else if (option) data.setState(option)
+ })
+ }
+
+ var old = $.fn.button
+
+ $.fn.button = Plugin
+ $.fn.button.Constructor = Button
+
+
+ // BUTTON NO CONFLICT
+ // ==================
+
+ $.fn.button.noConflict = function () {
+ $.fn.button = old
+ return this
+ }
+
+
+ // BUTTON DATA-API
+ // ===============
+
+ $(document)
+ .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
+ var $btn = $(e.target)
+ if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
+ Plugin.call($btn, 'toggle')
+ if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault()
+ })
+ .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
+ $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
+ })
+
+ }(jQuery);
+
+
+/***/ },
+
+/***/ 244:
+/***/ function(module, exports) {
+
+ /* ========================================================================
+ * Bootstrap: carousel.js v3.3.6
+ * http://getbootstrap.com/javascript/#carousel
+ * ========================================================================
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
+ +function ($) {
+ 'use strict';
+
+ // CAROUSEL CLASS DEFINITION
+ // =========================
+
+ var Carousel = function (element, options) {
+ this.$element = $(element)
+ this.$indicators = this.$element.find('.carousel-indicators')
+ this.options = options
+ this.paused = null
+ this.sliding = null
+ this.interval = null
+ this.$active = null
+ this.$items = null
+
+ this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
+
+ this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
+ .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
+ .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
+ }
+
+ Carousel.VERSION = '3.3.6'
+
+ Carousel.TRANSITION_DURATION = 600
+
+ Carousel.DEFAULTS = {
+ interval: 5000,
+ pause: 'hover',
+ wrap: true,
+ keyboard: true
+ }
+
+ Carousel.prototype.keydown = function (e) {
+ if (/input|textarea/i.test(e.target.tagName)) return
+ switch (e.which) {
+ case 37: this.prev(); break
+ case 39: this.next(); break
+ default: return
+ }
+
+ e.preventDefault()
+ }
+
+ Carousel.prototype.cycle = function (e) {
+ e || (this.paused = false)
+
+ this.interval && clearInterval(this.interval)
+
+ this.options.interval
+ && !this.paused
+ && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
+
+ return this
+ }
+
+ Carousel.prototype.getItemIndex = function (item) {
+ this.$items = item.parent().children('.item')
+ return this.$items.index(item || this.$active)
+ }
+
+ Carousel.prototype.getItemForDirection = function (direction, active) {
+ var activeIndex = this.getItemIndex(active)
+ var willWrap = (direction == 'prev' && activeIndex === 0)
+ || (direction == 'next' && activeIndex == (this.$items.length - 1))
+ if (willWrap && !this.options.wrap) return active
+ var delta = direction == 'prev' ? -1 : 1
+ var itemIndex = (activeIndex + delta) % this.$items.length
+ return this.$items.eq(itemIndex)
+ }
+
+ Carousel.prototype.to = function (pos) {
+ var that = this
+ var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
+
+ if (pos > (this.$items.length - 1) || pos < 0) return
+
+ if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
+ if (activeIndex == pos) return this.pause().cycle()
+
+ return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
+ }
+
+ Carousel.prototype.pause = function (e) {
+ e || (this.paused = true)
+
+ if (this.$element.find('.next, .prev').length && $.support.transition) {
+ this.$element.trigger($.support.transition.end)
+ this.cycle(true)
+ }
+
+ this.interval = clearInterval(this.interval)
+
+ return this
+ }
+
+ Carousel.prototype.next = function () {
+ if (this.sliding) return
+ return this.slide('next')
+ }
+
+ Carousel.prototype.prev = function () {
+ if (this.sliding) return
+ return this.slide('prev')
+ }
+
+ Carousel.prototype.slide = function (type, next) {
+ var $active = this.$element.find('.item.active')
+ var $next = next || this.getItemForDirection(type, $active)
+ var isCycling = this.interval
+ var direction = type == 'next' ? 'left' : 'right'
+ var that = this
+
+ if ($next.hasClass('active')) return (this.sliding = false)
+
+ var relatedTarget = $next[0]
+ var slideEvent = $.Event('slide.bs.carousel', {
+ relatedTarget: relatedTarget,
+ direction: direction
+ })
+ this.$element.trigger(slideEvent)
+ if (slideEvent.isDefaultPrevented()) return
+
+ this.sliding = true
+
+ isCycling && this.pause()
+
+ if (this.$indicators.length) {
+ this.$indicators.find('.active').removeClass('active')
+ var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
+ $nextIndicator && $nextIndicator.addClass('active')
+ }
+
+ var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
+ if ($.support.transition && this.$element.hasClass('slide')) {
+ $next.addClass(type)
+ $next[0].offsetWidth // force reflow
+ $active.addClass(direction)
+ $next.addClass(direction)
+ $active
+ .one('bsTransitionEnd', function () {
+ $next.removeClass([type, direction].join(' ')).addClass('active')
+ $active.removeClass(['active', direction].join(' '))
+ that.sliding = false
+ setTimeout(function () {
+ that.$element.trigger(slidEvent)
+ }, 0)
+ })
+ .emulateTransitionEnd(Carousel.TRANSITION_DURATION)
+ } else {
+ $active.removeClass('active')
+ $next.addClass('active')
+ this.sliding = false
+ this.$element.trigger(slidEvent)
+ }
+
+ isCycling && this.cycle()
+
+ return this
+ }
+
+
+ // CAROUSEL PLUGIN DEFINITION
+ // ==========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.carousel')
+ var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
+ var action = typeof option == 'string' ? option : options.slide
+
+ if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
+ if (typeof option == 'number') data.to(option)
+ else if (action) data[action]()
+ else if (options.interval) data.pause().cycle()
+ })
+ }
+
+ var old = $.fn.carousel
+
+ $.fn.carousel = Plugin
+ $.fn.carousel.Constructor = Carousel
+
+
+ // CAROUSEL NO CONFLICT
+ // ====================
+
+ $.fn.carousel.noConflict = function () {
+ $.fn.carousel = old
+ return this
+ }
+
+
+ // CAROUSEL DATA-API
+ // =================
+
+ var clickHandler = function (e) {
+ var href
+ var $this = $(this)
+ var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
+ if (!$target.hasClass('carousel')) return
+ var options = $.extend({}, $target.data(), $this.data())
+ var slideIndex = $this.attr('data-slide-to')
+ if (slideIndex) options.interval = false
+
+ Plugin.call($target, options)
+
+ if (slideIndex) {
+ $target.data('bs.carousel').to(slideIndex)
+ }
+
+ e.preventDefault()
+ }
+
+ $(document)
+ .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
+ .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
+
+ $(window).on('load', function () {
+ $('[data-ride="carousel"]').each(function () {
+ var $carousel = $(this)
+ Plugin.call($carousel, $carousel.data())
+ })
+ })
+
+ }(jQuery);
+
+
+/***/ },
+
+/***/ 245:
+/***/ function(module, exports) {
+
+ /* ========================================================================
+ * Bootstrap: collapse.js v3.3.6
+ * http://getbootstrap.com/javascript/#collapse
+ * ========================================================================
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
+ +function ($) {
+ 'use strict';
+
+ // COLLAPSE PUBLIC CLASS DEFINITION
+ // ================================
+
+ var Collapse = function (element, options) {
+ this.$element = $(element)
+ this.options = $.extend({}, Collapse.DEFAULTS, options)
+ this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
+ '[data-toggle="collapse"][data-target="#' + element.id + '"]')
+ this.transitioning = null
+
+ if (this.options.parent) {
+ this.$parent = this.getParent()
+ } else {
+ this.addAriaAndCollapsedClass(this.$element, this.$trigger)
+ }
+
+ if (this.options.toggle) this.toggle()
+ }
+
+ Collapse.VERSION = '3.3.6'
+
+ Collapse.TRANSITION_DURATION = 350
+
+ Collapse.DEFAULTS = {
+ toggle: true
+ }
+
+ Collapse.prototype.dimension = function () {
+ var hasWidth = this.$element.hasClass('width')
+ return hasWidth ? 'width' : 'height'
+ }
+
+ Collapse.prototype.show = function () {
+ if (this.transitioning || this.$element.hasClass('in')) return
+
+ var activesData
+ var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
+
+ if (actives && actives.length) {
+ activesData = actives.data('bs.collapse')
+ if (activesData && activesData.transitioning) return
+ }
+
+ var startEvent = $.Event('show.bs.collapse')
+ this.$element.trigger(startEvent)
+ if (startEvent.isDefaultPrevented()) return
+
+ if (actives && actives.length) {
+ Plugin.call(actives, 'hide')
+ activesData || actives.data('bs.collapse', null)
+ }
+
+ var dimension = this.dimension()
+
+ this.$element
+ .removeClass('collapse')
+ .addClass('collapsing')[dimension](0)
+ .attr('aria-expanded', true)
+
+ this.$trigger
+ .removeClass('collapsed')
+ .attr('aria-expanded', true)
+
+ this.transitioning = 1
+
+ var complete = function () {
+ this.$element
+ .removeClass('collapsing')
+ .addClass('collapse in')[dimension]('')
+ this.transitioning = 0
+ this.$element
+ .trigger('shown.bs.collapse')
+ }
+
+ if (!$.support.transition) return complete.call(this)
+
+ var scrollSize = $.camelCase(['scroll', dimension].join('-'))
+
+ this.$element
+ .one('bsTransitionEnd', $.proxy(complete, this))
+ .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
+ }
+
+ Collapse.prototype.hide = function () {
+ if (this.transitioning || !this.$element.hasClass('in')) return
+
+ var startEvent = $.Event('hide.bs.collapse')
+ this.$element.trigger(startEvent)
+ if (startEvent.isDefaultPrevented()) return
+
+ var dimension = this.dimension()
+
+ this.$element[dimension](this.$element[dimension]())[0].offsetHeight
+
+ this.$element
+ .addClass('collapsing')
+ .removeClass('collapse in')
+ .attr('aria-expanded', false)
+
+ this.$trigger
+ .addClass('collapsed')
+ .attr('aria-expanded', false)
+
+ this.transitioning = 1
+
+ var complete = function () {
+ this.transitioning = 0
+ this.$element
+ .removeClass('collapsing')
+ .addClass('collapse')
+ .trigger('hidden.bs.collapse')
+ }
+
+ if (!$.support.transition) return complete.call(this)
+
+ this.$element
+ [dimension](0)
+ .one('bsTransitionEnd', $.proxy(complete, this))
+ .emulateTransitionEnd(Collapse.TRANSITION_DURATION)
+ }
+
+ Collapse.prototype.toggle = function () {
+ this[this.$element.hasClass('in') ? 'hide' : 'show']()
+ }
+
+ Collapse.prototype.getParent = function () {
+ return $(this.options.parent)
+ .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
+ .each($.proxy(function (i, element) {
+ var $element = $(element)
+ this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
+ }, this))
+ .end()
+ }
+
+ Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
+ var isOpen = $element.hasClass('in')
+
+ $element.attr('aria-expanded', isOpen)
+ $trigger
+ .toggleClass('collapsed', !isOpen)
+ .attr('aria-expanded', isOpen)
+ }
+
+ function getTargetFromTrigger($trigger) {
+ var href
+ var target = $trigger.attr('data-target')
+ || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
+
+ return $(target)
+ }
+
+
+ // COLLAPSE PLUGIN DEFINITION
+ // ==========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.collapse')
+ var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
+
+ if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
+ if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ var old = $.fn.collapse
+
+ $.fn.collapse = Plugin
+ $.fn.collapse.Constructor = Collapse
+
+
+ // COLLAPSE NO CONFLICT
+ // ====================
+
+ $.fn.collapse.noConflict = function () {
+ $.fn.collapse = old
+ return this
+ }
+
+
+ // COLLAPSE DATA-API
+ // =================
+
+ $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
+ var $this = $(this)
+
+ if (!$this.attr('data-target')) e.preventDefault()
+
+ var $target = getTargetFromTrigger($this)
+ var data = $target.data('bs.collapse')
+ var option = data ? 'toggle' : $this.data()
+
+ Plugin.call($target, option)
+ })
+
+ }(jQuery);
+
+
+/***/ },
+
+/***/ 246:
+/***/ function(module, exports) {
+
+ /* ========================================================================
+ * Bootstrap: modal.js v3.3.6
+ * http://getbootstrap.com/javascript/#modals
+ * ========================================================================
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
+ +function ($) {
+ 'use strict';
+
+ // MODAL CLASS DEFINITION
+ // ======================
+
+ var Modal = function (element, options) {
+ this.options = options
+ this.$body = $(document.body)
+ this.$element = $(element)
+ this.$dialog = this.$element.find('.modal-dialog')
+ this.$backdrop = null
+ this.isShown = null
+ this.originalBodyPad = null
+ this.scrollbarWidth = 0
+ this.ignoreBackdropClick = false
+
+ if (this.options.remote) {
+ this.$element
+ .find('.modal-content')
+ .load(this.options.remote, $.proxy(function () {
+ this.$element.trigger('loaded.bs.modal')
+ }, this))
+ }
+ }
+
+ Modal.VERSION = '3.3.6'
+
+ Modal.TRANSITION_DURATION = 300
+ Modal.BACKDROP_TRANSITION_DURATION = 150
+
+ Modal.DEFAULTS = {
+ backdrop: true,
+ keyboard: true,
+ show: true
+ }
+
+ Modal.prototype.toggle = function (_relatedTarget) {
+ return this.isShown ? this.hide() : this.show(_relatedTarget)
+ }
+
+ Modal.prototype.show = function (_relatedTarget) {
+ var that = this
+ var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
+
+ this.$element.trigger(e)
+
+ if (this.isShown || e.isDefaultPrevented()) return
+
+ this.isShown = true
+
+ this.checkScrollbar()
+ this.setScrollbar()
+ this.$body.addClass('modal-open')
+
+ this.escape()
+ this.resize()
+
+ this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
+
+ this.$dialog.on('mousedown.dismiss.bs.modal', function () {
+ that.$element.one('mouseup.dismiss.bs.modal', function (e) {
+ if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
+ })
+ })
+
+ this.backdrop(function () {
+ var transition = $.support.transition && that.$element.hasClass('fade')
+
+ if (!that.$element.parent().length) {
+ that.$element.appendTo(that.$body) // don't move modals dom position
+ }
+
+ that.$element
+ .show()
+ .scrollTop(0)
+
+ that.adjustDialog()
+
+ if (transition) {
+ that.$element[0].offsetWidth // force reflow
+ }
+
+ that.$element.addClass('in')
+
+ that.enforceFocus()
+
+ var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
+
+ transition ?
+ that.$dialog // wait for modal to slide in
+ .one('bsTransitionEnd', function () {
+ that.$element.trigger('focus').trigger(e)
+ })
+ .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
+ that.$element.trigger('focus').trigger(e)
+ })
+ }
+
+ Modal.prototype.hide = function (e) {
+ if (e) e.preventDefault()
+
+ e = $.Event('hide.bs.modal')
+
+ this.$element.trigger(e)
+
+ if (!this.isShown || e.isDefaultPrevented()) return
+
+ this.isShown = false
+
+ this.escape()
+ this.resize()
+
+ $(document).off('focusin.bs.modal')
+
+ this.$element
+ .removeClass('in')
+ .off('click.dismiss.bs.modal')
+ .off('mouseup.dismiss.bs.modal')
+
+ this.$dialog.off('mousedown.dismiss.bs.modal')
+
+ $.support.transition && this.$element.hasClass('fade') ?
+ this.$element
+ .one('bsTransitionEnd', $.proxy(this.hideModal, this))
+ .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
+ this.hideModal()
+ }
+
+ Modal.prototype.enforceFocus = function () {
+ $(document)
+ .off('focusin.bs.modal') // guard against infinite focus loop
+ .on('focusin.bs.modal', $.proxy(function (e) {
+ if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
+ this.$element.trigger('focus')
+ }
+ }, this))
+ }
+
+ Modal.prototype.escape = function () {
+ if (this.isShown && this.options.keyboard) {
+ this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
+ e.which == 27 && this.hide()
+ }, this))
+ } else if (!this.isShown) {
+ this.$element.off('keydown.dismiss.bs.modal')
+ }
+ }
+
+ Modal.prototype.resize = function () {
+ if (this.isShown) {
+ $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
+ } else {
+ $(window).off('resize.bs.modal')
+ }
+ }
+
+ Modal.prototype.hideModal = function () {
+ var that = this
+ this.$element.hide()
+ this.backdrop(function () {
+ that.$body.removeClass('modal-open')
+ that.resetAdjustments()
+ that.resetScrollbar()
+ that.$element.trigger('hidden.bs.modal')
+ })
+ }
+
+ Modal.prototype.removeBackdrop = function () {
+ this.$backdrop && this.$backdrop.remove()
+ this.$backdrop = null
+ }
+
+ Modal.prototype.backdrop = function (callback) {
+ var that = this
+ var animate = this.$element.hasClass('fade') ? 'fade' : ''
+
+ if (this.isShown && this.options.backdrop) {
+ var doAnimate = $.support.transition && animate
+
+ this.$backdrop = $(document.createElement('div'))
+ .addClass('modal-backdrop ' + animate)
+ .appendTo(this.$body)
+
+ this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
+ if (this.ignoreBackdropClick) {
+ this.ignoreBackdropClick = false
+ return
+ }
+ if (e.target !== e.currentTarget) return
+ this.options.backdrop == 'static'
+ ? this.$element[0].focus()
+ : this.hide()
+ }, this))
+
+ if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
+
+ this.$backdrop.addClass('in')
+
+ if (!callback) return
+
+ doAnimate ?
+ this.$backdrop
+ .one('bsTransitionEnd', callback)
+ .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
+ callback()
+
+ } else if (!this.isShown && this.$backdrop) {
+ this.$backdrop.removeClass('in')
+
+ var callbackRemove = function () {
+ that.removeBackdrop()
+ callback && callback()
+ }
+ $.support.transition && this.$element.hasClass('fade') ?
+ this.$backdrop
+ .one('bsTransitionEnd', callbackRemove)
+ .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
+ callbackRemove()
+
+ } else if (callback) {
+ callback()
+ }
+ }
+
+ // these following methods are used to handle overflowing modals
+
+ Modal.prototype.handleUpdate = function () {
+ this.adjustDialog()
+ }
+
+ Modal.prototype.adjustDialog = function () {
+ var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
+
+ this.$element.css({
+ paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
+ paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
+ })
+ }
+
+ Modal.prototype.resetAdjustments = function () {
+ this.$element.css({
+ paddingLeft: '',
+ paddingRight: ''
+ })
+ }
+
+ Modal.prototype.checkScrollbar = function () {
+ var fullWindowWidth = window.innerWidth
+ if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
+ var documentElementRect = document.documentElement.getBoundingClientRect()
+ fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
+ }
+ this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
+ this.scrollbarWidth = this.measureScrollbar()
+ }
+
+ Modal.prototype.setScrollbar = function () {
+ var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
+ this.originalBodyPad = document.body.style.paddingRight || ''
+ if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
+ }
+
+ Modal.prototype.resetScrollbar = function () {
+ this.$body.css('padding-right', this.originalBodyPad)
+ }
+
+ Modal.prototype.measureScrollbar = function () { // thx walsh
+ var scrollDiv = document.createElement('div')
+ scrollDiv.className = 'modal-scrollbar-measure'
+ this.$body.append(scrollDiv)
+ var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
+ this.$body[0].removeChild(scrollDiv)
+ return scrollbarWidth
+ }
+
+
+ // MODAL PLUGIN DEFINITION
+ // =======================
+
+ function Plugin(option, _relatedTarget) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.modal')
+ var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
+
+ if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
+ if (typeof option == 'string') data[option](_relatedTarget)
+ else if (options.show) data.show(_relatedTarget)
+ })
+ }
+
+ var old = $.fn.modal
+
+ $.fn.modal = Plugin
+ $.fn.modal.Constructor = Modal
+
+
+ // MODAL NO CONFLICT
+ // =================
+
+ $.fn.modal.noConflict = function () {
+ $.fn.modal = old
+ return this
+ }
+
+
+ // MODAL DATA-API
+ // ==============
+
+ $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
+ var $this = $(this)
+ var href = $this.attr('href')
+ var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
+ var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
+
+ if ($this.is('a')) e.preventDefault()
+
+ $target.one('show.bs.modal', function (showEvent) {
+ if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
+ $target.one('hidden.bs.modal', function () {
+ $this.is(':visible') && $this.trigger('focus')
+ })
+ })
+ Plugin.call($target, option, this)
+ })
+
+ }(jQuery);
+
+
+/***/ },
+
+/***/ 247:
+/***/ function(module, exports) {
+
+ /* ========================================================================
+ * Bootstrap: tooltip.js v3.3.6
+ * http://getbootstrap.com/javascript/#tooltip
+ * Inspired by the original jQuery.tipsy by Jason Frame
+ * ========================================================================
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
+ +function ($) {
+ 'use strict';
+
+ // TOOLTIP PUBLIC CLASS DEFINITION
+ // ===============================
+
+ var Tooltip = function (element, options) {
+ this.type = null
+ this.options = null
+ this.enabled = null
+ this.timeout = null
+ this.hoverState = null
+ this.$element = null
+ this.inState = null
+
+ this.init('tooltip', element, options)
+ }
+
+ Tooltip.VERSION = '3.3.6'
+
+ Tooltip.TRANSITION_DURATION = 150
+
+ Tooltip.DEFAULTS = {
+ animation: true,
+ placement: 'top',
+ selector: false,
+ template: '
',
+ trigger: 'hover focus',
+ title: '',
+ delay: 0,
+ html: false,
+ container: false,
+ viewport: {
+ selector: 'body',
+ padding: 0
+ }
+ }
+
+ Tooltip.prototype.init = function (type, element, options) {
+ this.enabled = true
+ this.type = type
+ this.$element = $(element)
+ this.options = this.getOptions(options)
+ this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
+ this.inState = { click: false, hover: false, focus: false }
+
+ if (this.$element[0] instanceof document.constructor && !this.options.selector) {
+ throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
+ }
+
+ var triggers = this.options.trigger.split(' ')
+
+ for (var i = triggers.length; i--;) {
+ var trigger = triggers[i]
+
+ if (trigger == 'click') {
+ this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
+ } else if (trigger != 'manual') {
+ var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
+ var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
+
+ this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
+ this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
+ }
+ }
+
+ this.options.selector ?
+ (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
+ this.fixTitle()
+ }
+
+ Tooltip.prototype.getDefaults = function () {
+ return Tooltip.DEFAULTS
+ }
+
+ Tooltip.prototype.getOptions = function (options) {
+ options = $.extend({}, this.getDefaults(), this.$element.data(), options)
+
+ if (options.delay && typeof options.delay == 'number') {
+ options.delay = {
+ show: options.delay,
+ hide: options.delay
+ }
+ }
+
+ return options
+ }
+
+ Tooltip.prototype.getDelegateOptions = function () {
+ var options = {}
+ var defaults = this.getDefaults()
+
+ this._options && $.each(this._options, function (key, value) {
+ if (defaults[key] != value) options[key] = value
+ })
+
+ return options
+ }
+
+ Tooltip.prototype.enter = function (obj) {
+ var self = obj instanceof this.constructor ?
+ obj : $(obj.currentTarget).data('bs.' + this.type)
+
+ if (!self) {
+ self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
+ $(obj.currentTarget).data('bs.' + this.type, self)
+ }
+
+ if (obj instanceof $.Event) {
+ self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true
+ }
+
+ if (self.tip().hasClass('in') || self.hoverState == 'in') {
+ self.hoverState = 'in'
+ return
+ }
+
+ clearTimeout(self.timeout)
+
+ self.hoverState = 'in'
+
+ if (!self.options.delay || !self.options.delay.show) return self.show()
+
+ self.timeout = setTimeout(function () {
+ if (self.hoverState == 'in') self.show()
+ }, self.options.delay.show)
+ }
+
+ Tooltip.prototype.isInStateTrue = function () {
+ for (var key in this.inState) {
+ if (this.inState[key]) return true
+ }
+
+ return false
+ }
+
+ Tooltip.prototype.leave = function (obj) {
+ var self = obj instanceof this.constructor ?
+ obj : $(obj.currentTarget).data('bs.' + this.type)
+
+ if (!self) {
+ self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
+ $(obj.currentTarget).data('bs.' + this.type, self)
+ }
+
+ if (obj instanceof $.Event) {
+ self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false
+ }
+
+ if (self.isInStateTrue()) return
+
+ clearTimeout(self.timeout)
+
+ self.hoverState = 'out'
+
+ if (!self.options.delay || !self.options.delay.hide) return self.hide()
+
+ self.timeout = setTimeout(function () {
+ if (self.hoverState == 'out') self.hide()
+ }, self.options.delay.hide)
+ }
+
+ Tooltip.prototype.show = function () {
+ var e = $.Event('show.bs.' + this.type)
+
+ if (this.hasContent() && this.enabled) {
+ this.$element.trigger(e)
+
+ var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
+ if (e.isDefaultPrevented() || !inDom) return
+ var that = this
+
+ var $tip = this.tip()
+
+ var tipId = this.getUID(this.type)
+
+ this.setContent()
+ $tip.attr('id', tipId)
+ this.$element.attr('aria-describedby', tipId)
+
+ if (this.options.animation) $tip.addClass('fade')
+
+ var placement = typeof this.options.placement == 'function' ?
+ this.options.placement.call(this, $tip[0], this.$element[0]) :
+ this.options.placement
+
+ var autoToken = /\s?auto?\s?/i
+ var autoPlace = autoToken.test(placement)
+ if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
+
+ $tip
+ .detach()
+ .css({ top: 0, left: 0, display: 'block' })
+ .addClass(placement)
+ .data('bs.' + this.type, this)
+
+ this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
+ this.$element.trigger('inserted.bs.' + this.type)
+
+ var pos = this.getPosition()
+ var actualWidth = $tip[0].offsetWidth
+ var actualHeight = $tip[0].offsetHeight
+
+ if (autoPlace) {
+ var orgPlacement = placement
+ var viewportDim = this.getPosition(this.$viewport)
+
+ placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' :
+ placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' :
+ placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' :
+ placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' :
+ placement
+
+ $tip
+ .removeClass(orgPlacement)
+ .addClass(placement)
+ }
+
+ var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
+
+ this.applyPlacement(calculatedOffset, placement)
+
+ var complete = function () {
+ var prevHoverState = that.hoverState
+ that.$element.trigger('shown.bs.' + that.type)
+ that.hoverState = null
+
+ if (prevHoverState == 'out') that.leave(that)
+ }
+
+ $.support.transition && this.$tip.hasClass('fade') ?
+ $tip
+ .one('bsTransitionEnd', complete)
+ .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
+ complete()
+ }
+ }
+
+ Tooltip.prototype.applyPlacement = function (offset, placement) {
+ var $tip = this.tip()
+ var width = $tip[0].offsetWidth
+ var height = $tip[0].offsetHeight
+
+ // manually read margins because getBoundingClientRect includes difference
+ var marginTop = parseInt($tip.css('margin-top'), 10)
+ var marginLeft = parseInt($tip.css('margin-left'), 10)
+
+ // we must check for NaN for ie 8/9
+ if (isNaN(marginTop)) marginTop = 0
+ if (isNaN(marginLeft)) marginLeft = 0
+
+ offset.top += marginTop
+ offset.left += marginLeft
+
+ // $.fn.offset doesn't round pixel values
+ // so we use setOffset directly with our own function B-0
+ $.offset.setOffset($tip[0], $.extend({
+ using: function (props) {
+ $tip.css({
+ top: Math.round(props.top),
+ left: Math.round(props.left)
+ })
+ }
+ }, offset), 0)
+
+ $tip.addClass('in')
+
+ // check to see if placing tip in new offset caused the tip to resize itself
+ var actualWidth = $tip[0].offsetWidth
+ var actualHeight = $tip[0].offsetHeight
+
+ if (placement == 'top' && actualHeight != height) {
+ offset.top = offset.top + height - actualHeight
+ }
+
+ var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
+
+ if (delta.left) offset.left += delta.left
+ else offset.top += delta.top
+
+ var isVertical = /top|bottom/.test(placement)
+ var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
+ var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
+
+ $tip.offset(offset)
+ this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
+ }
+
+ Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
+ this.arrow()
+ .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
+ .css(isVertical ? 'top' : 'left', '')
+ }
+
+ Tooltip.prototype.setContent = function () {
+ var $tip = this.tip()
+ var title = this.getTitle()
+
+ $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
+ $tip.removeClass('fade in top bottom left right')
+ }
+
+ Tooltip.prototype.hide = function (callback) {
+ var that = this
+ var $tip = $(this.$tip)
+ var e = $.Event('hide.bs.' + this.type)
+
+ function complete() {
+ if (that.hoverState != 'in') $tip.detach()
+ that.$element
+ .removeAttr('aria-describedby')
+ .trigger('hidden.bs.' + that.type)
+ callback && callback()
+ }
+
+ this.$element.trigger(e)
+
+ if (e.isDefaultPrevented()) return
+
+ $tip.removeClass('in')
+
+ $.support.transition && $tip.hasClass('fade') ?
+ $tip
+ .one('bsTransitionEnd', complete)
+ .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
+ complete()
+
+ this.hoverState = null
+
+ return this
+ }
+
+ Tooltip.prototype.fixTitle = function () {
+ var $e = this.$element
+ if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {
+ $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
+ }
+ }
+
+ Tooltip.prototype.hasContent = function () {
+ return this.getTitle()
+ }
+
+ Tooltip.prototype.getPosition = function ($element) {
+ $element = $element || this.$element
+
+ var el = $element[0]
+ var isBody = el.tagName == 'BODY'
+
+ var elRect = el.getBoundingClientRect()
+ if (elRect.width == null) {
+ // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
+ elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
+ }
+ var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
+ var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
+ var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
+
+ return $.extend({}, elRect, scroll, outerDims, elOffset)
+ }
+
+ Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
+ return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
+ placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
+ placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
+ /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
+
+ }
+
+ Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
+ var delta = { top: 0, left: 0 }
+ if (!this.$viewport) return delta
+
+ var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
+ var viewportDimensions = this.getPosition(this.$viewport)
+
+ if (/right|left/.test(placement)) {
+ var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll
+ var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
+ if (topEdgeOffset < viewportDimensions.top) { // top overflow
+ delta.top = viewportDimensions.top - topEdgeOffset
+ } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
+ delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
+ }
+ } else {
+ var leftEdgeOffset = pos.left - viewportPadding
+ var rightEdgeOffset = pos.left + viewportPadding + actualWidth
+ if (leftEdgeOffset < viewportDimensions.left) { // left overflow
+ delta.left = viewportDimensions.left - leftEdgeOffset
+ } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
+ delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
+ }
+ }
+
+ return delta
+ }
+
+ Tooltip.prototype.getTitle = function () {
+ var title
+ var $e = this.$element
+ var o = this.options
+
+ title = $e.attr('data-original-title')
+ || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
+
+ return title
+ }
+
+ Tooltip.prototype.getUID = function (prefix) {
+ do prefix += ~~(Math.random() * 1000000)
+ while (document.getElementById(prefix))
+ return prefix
+ }
+
+ Tooltip.prototype.tip = function () {
+ if (!this.$tip) {
+ this.$tip = $(this.options.template)
+ if (this.$tip.length != 1) {
+ throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
+ }
+ }
+ return this.$tip
+ }
+
+ Tooltip.prototype.arrow = function () {
+ return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
+ }
+
+ Tooltip.prototype.enable = function () {
+ this.enabled = true
+ }
+
+ Tooltip.prototype.disable = function () {
+ this.enabled = false
+ }
+
+ Tooltip.prototype.toggleEnabled = function () {
+ this.enabled = !this.enabled
+ }
+
+ Tooltip.prototype.toggle = function (e) {
+ var self = this
+ if (e) {
+ self = $(e.currentTarget).data('bs.' + this.type)
+ if (!self) {
+ self = new this.constructor(e.currentTarget, this.getDelegateOptions())
+ $(e.currentTarget).data('bs.' + this.type, self)
+ }
+ }
+
+ if (e) {
+ self.inState.click = !self.inState.click
+ if (self.isInStateTrue()) self.enter(self)
+ else self.leave(self)
+ } else {
+ self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
+ }
+ }
+
+ Tooltip.prototype.destroy = function () {
+ var that = this
+ clearTimeout(this.timeout)
+ this.hide(function () {
+ that.$element.off('.' + that.type).removeData('bs.' + that.type)
+ if (that.$tip) {
+ that.$tip.detach()
+ }
+ that.$tip = null
+ that.$arrow = null
+ that.$viewport = null
+ })
+ }
+
+
+ // TOOLTIP PLUGIN DEFINITION
+ // =========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.tooltip')
+ var options = typeof option == 'object' && option
+
+ if (!data && /destroy|hide/.test(option)) return
+ if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ var old = $.fn.tooltip
+
+ $.fn.tooltip = Plugin
+ $.fn.tooltip.Constructor = Tooltip
+
+
+ // TOOLTIP NO CONFLICT
+ // ===================
+
+ $.fn.tooltip.noConflict = function () {
+ $.fn.tooltip = old
+ return this
+ }
+
+ }(jQuery);
+
+
+/***/ },
+
+/***/ 248:
+/***/ function(module, exports) {
+
+ /* ========================================================================
+ * Bootstrap: popover.js v3.3.6
+ * http://getbootstrap.com/javascript/#popovers
+ * ========================================================================
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
+ +function ($) {
+ 'use strict';
+
+ // POPOVER PUBLIC CLASS DEFINITION
+ // ===============================
+
+ var Popover = function (element, options) {
+ this.init('popover', element, options)
+ }
+
+ if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
+
+ Popover.VERSION = '3.3.6'
+
+ Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
+ placement: 'right',
+ trigger: 'click',
+ content: '',
+ template: '
'
+ })
+
+
+ // NOTE: POPOVER EXTENDS tooltip.js
+ // ================================
+
+ Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
+
+ Popover.prototype.constructor = Popover
+
+ Popover.prototype.getDefaults = function () {
+ return Popover.DEFAULTS
+ }
+
+ Popover.prototype.setContent = function () {
+ var $tip = this.tip()
+ var title = this.getTitle()
+ var content = this.getContent()
+
+ $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
+ $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
+ this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
+ ](content)
+
+ $tip.removeClass('fade top bottom left right in')
+
+ // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
+ // this manually by checking the contents.
+ if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
+ }
+
+ Popover.prototype.hasContent = function () {
+ return this.getTitle() || this.getContent()
+ }
+
+ Popover.prototype.getContent = function () {
+ var $e = this.$element
+ var o = this.options
+
+ return $e.attr('data-content')
+ || (typeof o.content == 'function' ?
+ o.content.call($e[0]) :
+ o.content)
+ }
+
+ Popover.prototype.arrow = function () {
+ return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
+ }
+
+
+ // POPOVER PLUGIN DEFINITION
+ // =========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.popover')
+ var options = typeof option == 'object' && option
+
+ if (!data && /destroy|hide/.test(option)) return
+ if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ var old = $.fn.popover
+
+ $.fn.popover = Plugin
+ $.fn.popover.Constructor = Popover
+
+
+ // POPOVER NO CONFLICT
+ // ===================
+
+ $.fn.popover.noConflict = function () {
+ $.fn.popover = old
+ return this
+ }
+
+ }(jQuery);
+
+
+/***/ },
+
+/***/ 249:
+/***/ function(module, exports) {
+
+ /* ========================================================================
+ * Bootstrap: scrollspy.js v3.3.6
+ * http://getbootstrap.com/javascript/#scrollspy
+ * ========================================================================
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
+ +function ($) {
+ 'use strict';
+
+ // SCROLLSPY CLASS DEFINITION
+ // ==========================
+
+ function ScrollSpy(element, options) {
+ this.$body = $(document.body)
+ this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
+ this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
+ this.selector = (this.options.target || '') + ' .nav li > a'
+ this.offsets = []
+ this.targets = []
+ this.activeTarget = null
+ this.scrollHeight = 0
+
+ this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
+ this.refresh()
+ this.process()
+ }
+
+ ScrollSpy.VERSION = '3.3.6'
+
+ ScrollSpy.DEFAULTS = {
+ offset: 10
+ }
+
+ ScrollSpy.prototype.getScrollHeight = function () {
+ return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
+ }
+
+ ScrollSpy.prototype.refresh = function () {
+ var that = this
+ var offsetMethod = 'offset'
+ var offsetBase = 0
+
+ this.offsets = []
+ this.targets = []
+ this.scrollHeight = this.getScrollHeight()
+
+ if (!$.isWindow(this.$scrollElement[0])) {
+ offsetMethod = 'position'
+ offsetBase = this.$scrollElement.scrollTop()
+ }
+
+ this.$body
+ .find(this.selector)
+ .map(function () {
+ var $el = $(this)
+ var href = $el.data('target') || $el.attr('href')
+ var $href = /^#./.test(href) && $(href)
+
+ return ($href
+ && $href.length
+ && $href.is(':visible')
+ && [[$href[offsetMethod]().top + offsetBase, href]]) || null
+ })
+ .sort(function (a, b) { return a[0] - b[0] })
+ .each(function () {
+ that.offsets.push(this[0])
+ that.targets.push(this[1])
+ })
+ }
+
+ ScrollSpy.prototype.process = function () {
+ var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
+ var scrollHeight = this.getScrollHeight()
+ var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()
+ var offsets = this.offsets
+ var targets = this.targets
+ var activeTarget = this.activeTarget
+ var i
+
+ if (this.scrollHeight != scrollHeight) {
+ this.refresh()
+ }
+
+ if (scrollTop >= maxScroll) {
+ return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
+ }
+
+ if (activeTarget && scrollTop < offsets[0]) {
+ this.activeTarget = null
+ return this.clear()
+ }
+
+ for (i = offsets.length; i--;) {
+ activeTarget != targets[i]
+ && scrollTop >= offsets[i]
+ && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])
+ && this.activate(targets[i])
+ }
+ }
+
+ ScrollSpy.prototype.activate = function (target) {
+ this.activeTarget = target
+
+ this.clear()
+
+ var selector = this.selector +
+ '[data-target="' + target + '"],' +
+ this.selector + '[href="' + target + '"]'
+
+ var active = $(selector)
+ .parents('li')
+ .addClass('active')
+
+ if (active.parent('.dropdown-menu').length) {
+ active = active
+ .closest('li.dropdown')
+ .addClass('active')
+ }
+
+ active.trigger('activate.bs.scrollspy')
+ }
+
+ ScrollSpy.prototype.clear = function () {
+ $(this.selector)
+ .parentsUntil(this.options.target, '.active')
+ .removeClass('active')
+ }
+
+
+ // SCROLLSPY PLUGIN DEFINITION
+ // ===========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.scrollspy')
+ var options = typeof option == 'object' && option
+
+ if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ var old = $.fn.scrollspy
+
+ $.fn.scrollspy = Plugin
+ $.fn.scrollspy.Constructor = ScrollSpy
+
+
+ // SCROLLSPY NO CONFLICT
+ // =====================
+
+ $.fn.scrollspy.noConflict = function () {
+ $.fn.scrollspy = old
+ return this
+ }
+
+
+ // SCROLLSPY DATA-API
+ // ==================
+
+ $(window).on('load.bs.scrollspy.data-api', function () {
+ $('[data-spy="scroll"]').each(function () {
+ var $spy = $(this)
+ Plugin.call($spy, $spy.data())
+ })
+ })
+
+ }(jQuery);
+
+
+/***/ },
+
+/***/ 250:
+/***/ function(module, exports) {
+
+ /* ========================================================================
+ * Bootstrap: tab.js v3.3.6
+ * http://getbootstrap.com/javascript/#tabs
+ * ========================================================================
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
+ +function ($) {
+ 'use strict';
+
+ // TAB CLASS DEFINITION
+ // ====================
+
+ var Tab = function (element) {
+ // jscs:disable requireDollarBeforejQueryAssignment
+ this.element = $(element)
+ // jscs:enable requireDollarBeforejQueryAssignment
+ }
+
+ Tab.VERSION = '3.3.6'
+
+ Tab.TRANSITION_DURATION = 150
+
+ Tab.prototype.show = function () {
+ var $this = this.element
+ var $ul = $this.closest('ul:not(.dropdown-menu)')
+ var selector = $this.data('target')
+
+ if (!selector) {
+ selector = $this.attr('href')
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
+ }
+
+ if ($this.parent('li').hasClass('active')) return
+
+ var $previous = $ul.find('.active:last a')
+ var hideEvent = $.Event('hide.bs.tab', {
+ relatedTarget: $this[0]
+ })
+ var showEvent = $.Event('show.bs.tab', {
+ relatedTarget: $previous[0]
+ })
+
+ $previous.trigger(hideEvent)
+ $this.trigger(showEvent)
+
+ if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
+
+ var $target = $(selector)
+
+ this.activate($this.closest('li'), $ul)
+ this.activate($target, $target.parent(), function () {
+ $previous.trigger({
+ type: 'hidden.bs.tab',
+ relatedTarget: $this[0]
+ })
+ $this.trigger({
+ type: 'shown.bs.tab',
+ relatedTarget: $previous[0]
+ })
+ })
+ }
+
+ Tab.prototype.activate = function (element, container, callback) {
+ var $active = container.find('> .active')
+ var transition = callback
+ && $.support.transition
+ && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
+
+ function next() {
+ $active
+ .removeClass('active')
+ .find('> .dropdown-menu > .active')
+ .removeClass('active')
+ .end()
+ .find('[data-toggle="tab"]')
+ .attr('aria-expanded', false)
+
+ element
+ .addClass('active')
+ .find('[data-toggle="tab"]')
+ .attr('aria-expanded', true)
+
+ if (transition) {
+ element[0].offsetWidth // reflow for transition
+ element.addClass('in')
+ } else {
+ element.removeClass('fade')
+ }
+
+ if (element.parent('.dropdown-menu').length) {
+ element
+ .closest('li.dropdown')
+ .addClass('active')
+ .end()
+ .find('[data-toggle="tab"]')
+ .attr('aria-expanded', true)
+ }
+
+ callback && callback()
+ }
+
+ $active.length && transition ?
+ $active
+ .one('bsTransitionEnd', next)
+ .emulateTransitionEnd(Tab.TRANSITION_DURATION) :
+ next()
+
+ $active.removeClass('in')
+ }
+
+
+ // TAB PLUGIN DEFINITION
+ // =====================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.tab')
+
+ if (!data) $this.data('bs.tab', (data = new Tab(this)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ var old = $.fn.tab
+
+ $.fn.tab = Plugin
+ $.fn.tab.Constructor = Tab
+
+
+ // TAB NO CONFLICT
+ // ===============
+
+ $.fn.tab.noConflict = function () {
+ $.fn.tab = old
+ return this
+ }
+
+
+ // TAB DATA-API
+ // ============
+
+ var clickHandler = function (e) {
+ e.preventDefault()
+ Plugin.call($(this), 'show')
+ }
+
+ $(document)
+ .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
+ .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
+
+ }(jQuery);
+
+
+/***/ },
+
+/***/ 251:
+/***/ function(module, exports) {
+
+ /* ========================================================================
+ * Bootstrap: affix.js v3.3.6
+ * http://getbootstrap.com/javascript/#affix
+ * ========================================================================
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
+ +function ($) {
+ 'use strict';
+
+ // AFFIX CLASS DEFINITION
+ // ======================
+
+ var Affix = function (element, options) {
+ this.options = $.extend({}, Affix.DEFAULTS, options)
+
+ this.$target = $(this.options.target)
+ .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
+ .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
+
+ this.$element = $(element)
+ this.affixed = null
+ this.unpin = null
+ this.pinnedOffset = null
+
+ this.checkPosition()
+ }
+
+ Affix.VERSION = '3.3.6'
+
+ Affix.RESET = 'affix affix-top affix-bottom'
+
+ Affix.DEFAULTS = {
+ offset: 0,
+ target: window
+ }
+
+ Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
+ var scrollTop = this.$target.scrollTop()
+ var position = this.$element.offset()
+ var targetHeight = this.$target.height()
+
+ if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
+
+ if (this.affixed == 'bottom') {
+ if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
+ return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
+ }
+
+ var initializing = this.affixed == null
+ var colliderTop = initializing ? scrollTop : position.top
+ var colliderHeight = initializing ? targetHeight : height
+
+ if (offsetTop != null && scrollTop <= offsetTop) return 'top'
+ if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
+
+ return false
+ }
+
+ Affix.prototype.getPinnedOffset = function () {
+ if (this.pinnedOffset) return this.pinnedOffset
+ this.$element.removeClass(Affix.RESET).addClass('affix')
+ var scrollTop = this.$target.scrollTop()
+ var position = this.$element.offset()
+ return (this.pinnedOffset = position.top - scrollTop)
+ }
+
+ Affix.prototype.checkPositionWithEventLoop = function () {
+ setTimeout($.proxy(this.checkPosition, this), 1)
+ }
+
+ Affix.prototype.checkPosition = function () {
+ if (!this.$element.is(':visible')) return
+
+ var height = this.$element.height()
+ var offset = this.options.offset
+ var offsetTop = offset.top
+ var offsetBottom = offset.bottom
+ var scrollHeight = Math.max($(document).height(), $(document.body).height())
+
+ if (typeof offset != 'object') offsetBottom = offsetTop = offset
+ if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
+ if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
+
+ var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
+
+ if (this.affixed != affix) {
+ if (this.unpin != null) this.$element.css('top', '')
+
+ var affixType = 'affix' + (affix ? '-' + affix : '')
+ var e = $.Event(affixType + '.bs.affix')
+
+ this.$element.trigger(e)
+
+ if (e.isDefaultPrevented()) return
+
+ this.affixed = affix
+ this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
+
+ this.$element
+ .removeClass(Affix.RESET)
+ .addClass(affixType)
+ .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
+ }
+
+ if (affix == 'bottom') {
+ this.$element.offset({
+ top: scrollHeight - height - offsetBottom
+ })
+ }
+ }
+
+
+ // AFFIX PLUGIN DEFINITION
+ // =======================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.affix')
+ var options = typeof option == 'object' && option
+
+ if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ var old = $.fn.affix
+
+ $.fn.affix = Plugin
+ $.fn.affix.Constructor = Affix
+
+
+ // AFFIX NO CONFLICT
+ // =================
+
+ $.fn.affix.noConflict = function () {
+ $.fn.affix = old
+ return this
+ }
+
+
+ // AFFIX DATA-API
+ // ==============
+
+ $(window).on('load', function () {
+ $('[data-spy="affix"]').each(function () {
+ var $spy = $(this)
+ var data = $spy.data()
+
+ data.offset = data.offset || {}
+
+ if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
+ if (data.offsetTop != null) data.offset.top = data.offsetTop
+
+ Plugin.call($spy, data)
+ })
+ })
+
+ }(jQuery);
+
+
+/***/ },
+
+/***/ 252:
+/***/ function(module, exports) {
+
+ /*! jquery-slugify - v1.2.3 - 2015-12-23
+ * Copyright (c) 2015 madflow; Licensed */
+ !function(a){a.fn.slugify=function(b,c){return this.each(function(){var d=a(this),e=a(b);d.on("keyup change",function(){""!==d.val()&&void 0!==d.val()?d.data("locked",!0):d.data("locked",!1)}),e.on("keyup change",function(){!0!==d.data("locked")&&(d.is("input")||d.is("textarea")?d.val(a.slugify(e.val(),c)):d.text(a.slugify(e.val(),c)))})})},a.slugify=function(b,c){return c=a.extend({},a.slugify.options,c),c.lang=c.lang||a("html").prop("lang"),"function"==typeof c.preSlug&&(b=c.preSlug(b)),b=c.slugFunc(b,c),"function"==typeof c.postSlug&&(b=c.postSlug(b)),b},a.slugify.options={preSlug:null,postSlug:null,slugFunc:function(a,b){return window.getSlug(a,b)}}}(jQuery);
+
+/***/ }
+
+/******/ });
+//# sourceMappingURL=vendor.js.map
\ No newline at end of file
diff --git a/themes/grav/js/vendor.js.map b/themes/grav/js/vendor.js.map
new file mode 100644
index 00000000..b20a5ce2
--- /dev/null
+++ b/themes/grav/js/vendor.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["webpack:///webpack/bootstrap 802adff72a392671ec29","webpack:///./~/toastr/toastr.js","webpack:///external \"jQuery\"","webpack:///(webpack)/buildin/amd-define.js","webpack:///./~/chartist/dist/chartist.js","webpack:///./~/sortablejs/Sortable.js","webpack:///./~/selectize/dist/js/selectize.js","webpack:///./~/sifter/sifter.js","webpack:///./~/microplugin/src/microplugin.js","webpack:///./~/dropzone/dist/dropzone.js","webpack:///(webpack)/buildin/module.js","webpack:///./~/bootstrap/js/dropdown.js","webpack:///./~/remodal/dist/remodal.js","webpack:///./~/bootstrap/dist/js/npm.js","webpack:///./~/bootstrap/js/transition.js","webpack:///./~/bootstrap/js/alert.js","webpack:///./~/bootstrap/js/button.js","webpack:///./~/bootstrap/js/carousel.js","webpack:///./~/bootstrap/js/collapse.js","webpack:///./~/bootstrap/js/modal.js","webpack:///./~/bootstrap/js/tooltip.js","webpack:///./~/bootstrap/js/popover.js","webpack:///./~/bootstrap/js/scrollspy.js","webpack:///./~/bootstrap/js/tab.js","webpack:///./~/bootstrap/js/affix.js","webpack:///./~/jquery-slugify/dist/slugify.min.js"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAQ,oBAAoB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA2B;AAC3B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB;AACjB;;AAEA;AACA,gCAA+B,wBAAwB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB;AACjB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB;AACjB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB;AACjB;;AAEA;AACA;AACA,mCAAkC,uBAAuB;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA,mCAAkC,uBAAuB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uDAAsD,QAAQ;AAC9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gDAA+C,4BAA4B;AAC3E,sBAAqB;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA6D;AAC7D;AACA;AACA;AACA;AACA;;AAEA;AACA,iCAAgC,QAAQ;AACxC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,gDAA+C,QAAQ;;AAEvD;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,8CAA6C;AAC7C,+CAA8C;AAC9C,8CAA6C;AAC7C,6CAA4C;AAC5C,6CAA4C;AAC5C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,8BAA6B;AAC7B;AACA;AACA;AACA,0BAAyB;AACzB;;AAEA;AACA;AACA;AACA;AACA,0BAAyB;AACzB;AACA;;AAEA;AACA;;AAEA;AACA,0BAAyB;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAqB;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,0BAAyB;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,0BAAyB;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,mCAAkC;AAClC;;AAEA;AACA,mCAAkC,6BAA6B;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,UAAS;AACT,MAAK;AACL,EAAC,yBAMA;;;;;;;;AClbD,yB;;;;;;;ACAA,8BAA6B,mDAAmD;;;;;;;;ACAhF;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,EAAE;AACf,eAAc,EAAE;AAChB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,eAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,UAAU;AACvB,eAAc,OAAO;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,4CAA2C;AAC3C,UAAS;AACT;AACA;AACA;AACA,MAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,eAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,eAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,cAAc;AAC3B,eAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA,cAAa,YAAY;AACzB,eAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,gBAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,gBAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAc;AACd;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA,QAAO;;AAEP;AACA,MAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,gBAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA,gBAAe;AACf,eAAc;AACd,eAAc;AACd,iBAAgB;AAChB,kBAAiB;AACjB;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAa,qBAAqB;AAClC,eAAc;AACd;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL,8BAA6B,WAAW;AACxC;;AAEA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,eAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA,MAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,KAAK;AAClB,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,eAAc,OAAO;AACrB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA,MAAK;AACL,oCAAmC,wBAAwB;AAC3D,MAAK;;AAEL;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAmB,wBAAwB;AAC3C;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,QAAQ;AACrB,cAAa,QAAQ;AACrB,eAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA;;AAEA;AACA,uCAAsC,mBAAmB,GAAG,mBAAmB;AAC/E;AACA;AACA;AACA,YAAW;AACX;AACA;;AAEA;AACA;;AAEA;;AAEA,UAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,cAAc;AAC3B,cAAa,OAAO;AACpB,gBAAe,OAAO;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,eAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,eAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,eAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,MAAM;AACnB,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,eAAc,OAAO;AACrB;AACA;AACA;AACA,iCAAgC,qEAAqE;;AAErG;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP,wBAAuB,iBAAiB;AACxC;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAe;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAe;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAe;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAe;AACf;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,gBAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,QAAQ;AACrB,eAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yBAAwB,iBAAiB;AACzC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,gBAAe,oBAAoB;AACnC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,eAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kFAAiF;AACjF;AACA;;AAEA;AACA,mCAAkC;AAClC,QAAO;AACP,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,gBAAe;AACf;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,MAAM;AACnB,cAAa,OAAO;AACpB,eAAc,OAAO;AACrB;AACA;AACA,yCAAwC;AACxC;AACA;AACA;;AAEA;AACA;AACA,0CAAyC;;AAEzC;AACA,oBAAmB,8BAA8B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;;AAEA;AACA;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA,MAAK;;AAEL,kBAAiB,8BAA8B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kCAAiC;AACjC;AACA;AACA;;AAEA,EAAC;AACD,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA,SAAQ;AACR,OAAM;AACN;AACA;AACA;AACA,eAAc;AACd;AACA;AACA;AACA;AACA;AACA,iCAAgC;AAChC;AACA;AACA;;AAEA,qBAAoB,4BAA4B;AAChD;AACA;AACA;;AAEA;;AAEA;AACA;AACA,YAAW;AACX;AACA;;AAEA;AACA,UAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA,SAAQ;AACR,OAAM;AACN;AACA;AACA;AACA,cAAa,OAAO;AACpB,eAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,iCAAgC;;AAEhC;;AAEA;AACA;AACA;;AAEA,qBAAoB,4BAA4B;AAChD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA,SAAQ;AACR,OAAM;AACN;AACA;AACA,cAAa,OAAO;AACpB,eAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAgC;;AAEhC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,qBAAoB,4BAA4B;AAChD;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,uDAAsD,mBAAmB;AACzE;AACA,cAAa,uDAAuD;AACpE,cAAa,mDAAmD;AAChE,cAAa,uDAAuD;AACpE,cAAa;AACb;AACA;AACA;AACA,uBAAsB;AACtB,cAAa;AACb,uBAAsB;AACtB,cAAa;AACb,uBAAsB;AACtB,uBAAsB;AACtB;AACA,YAAW;AACX;AACA;AACA,cAAa;AACb,uBAAsB;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA,SAAQ;AACR,OAAM;AACN;AACA;AACA;AACA,gBAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAgC;;AAEhC;AACA;;AAEA;;AAEA,sBAAqB,4BAA4B;AACjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA,EAAC;AACD,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAe,OAAO;AACtB,gBAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAe,OAAO;AACtB,gBAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAe,OAAO;AACtB,gBAAe,EAAE;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;;AAEA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;AACD,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,eAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA;AACA,SAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,mDAAkD;AAClD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP,MAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;;AAEA,EAAC;AACD,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;;AAEA;AACA,wCAAuC;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH,EAAC;AACD,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAa,eAAe;AAC5B,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,cAAc;AAC3B,cAAa,OAAO;AACpB,eAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAO;AACP;AACA;AACA,MAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,QAAQ;AACrB,eAAc,aAAa;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAc,aAAa;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAc,aAAa;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,eAAc,aAAa;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,eAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,YAAY;AACzB,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,QAAQ;AACrB,eAAc,aAAa;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,eAAc,aAAa;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAc,aAAa;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAc,aAAa;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,aAAa;AAC1B,eAAc,aAAa;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,aAAa;AAC1B,cAAa,QAAQ;AACrB,eAAc,aAAa;AAC3B;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAc,MAAM;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,eAAc,aAAa;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,eAAc,aAAa;AAC3B;AACA;AACA;;AAEA;AACA;AACA,MAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAc,aAAa;AAC3B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa,WAAW;AACxB,cAAa,OAAO;AACpB,gBAAe,OAAO;AACtB;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAQ;AACR;AACA;AACA;AACA;AACA;AACA,SAAQ;AACR;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,QAAQ;AACrB,cAAa,OAAO;AACpB,eAAc,aAAa;AAC3B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,qCAAoC;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,6CAA4C;AAC5C;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb,YAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;;AAEA;AACA;AACA;AACA;AACA,UAAS;AACT,QAAO;AACP;AACA;;AAEA,MAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,eAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAa,qBAAqB;AAClC;AACA;AACA;AACA;;AAEA;AACA,mBAAkB,qBAAqB;AACvC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA,IAAG;AACH,EAAC;AACD,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK,kBAAkB,aAAa,KAAK;;AAEzC;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,cAAa,QAAQ;AACrB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,sCAAqC;AACrC;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,eAAc,yBAAyB;AACvC;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,eAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,QAAQ;AACrB,cAAa,EAAE;AACf,eAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,QAAQ;AACrB,cAAa,EAAE;AACf,eAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,QAAQ;AACrB,cAAa,EAAE;AACf,eAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,QAAQ;AACrB,cAAa,EAAE;AACf,eAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,eAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAO;;AAEP;AACA;AACA;AACA;;AAEA;AACA,qBAAoB;AACpB;AACA;AACA;;AAEA;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS,IAAI;AACb,QAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA,QAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,eAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,eAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa,SAAS;AACtB,eAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,QAAQ;AACrB,eAAc;AACd;AACA;AACA;AACA;AACA;AACA,gCAA+B;AAC/B,MAAK;AACL,mCAAkC;AAClC;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,eAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,MAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,yBAAyB;AACtC,cAAa,QAAQ;AACrB,cAAa,OAAO;AACpB,eAAc;AACd;;AAEA;AACA;AACA,mBAAkB,kBAAkB;AACpC;AACA,qBAAoB,8BAA8B;AAClD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA,EAAC;AACD,EAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;;AAEA,EAAC;AACD,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH,EAAC;AACD,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH,EAAC;AACD,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH,EAAC;AACD,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6GAA4G;AAC5G;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,+FAA8F;AAC9F;AACA;AACA,QAAO;AACP,MAAK;AACL;AACA;;AAEA;AACA,oGAAmG;AACnG;AACA;AACA,QAAO;AACP,MAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;;AAEP;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT,QAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA,gBAAe;AACf;AACA,YAAW;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX,UAAS;AACT;;AAEA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,UAAS;AACT;AACA;AACA;AACA;AACA,YAAW;AACX;AACA,YAAW;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX,UAAS;AACT;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,cAAa,YAAY;AACzB,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,MAAM;AACnB,eAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA,SAAQ;AACR,OAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAwB;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;;AAEH,EAAC;AACD,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6GAA4G;AAC5G;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,UAAS,GAAG,WAAW;AACvB,QAAO;;AAEP,qEAAoE;AACpE;AACA,QAAO;AACP,MAAK;AACL,wEAAuE;AACvE;AACA,QAAO;AACP;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kHAAiH;AACjH;AACA;AACA,UAAS;AACT,QAAO;AACP,yHAAwH;AACxH;AACA;AACA,UAAS;AACT;;AAEA;AACA;AACA;AACA,UAAS;AACT,QAAO;AACP;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,UAAS;AACT,QAAO;AACP;AACA;;AAEA;AACA,kHAAiH;AACjH;AACA;AACA,UAAS;AACT,QAAO;AACP,yHAAwH;AACxH;AACA;AACA,UAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;;AAEP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT,QAAO;AACP,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,cAAa,YAAY;AACzB,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,MAAM;AACnB,eAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAwB;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;;AAEH,EAAC;AACD,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6GAA4G;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAmB,6BAA6B;AAChD;AACA;;AAEA;AACA;AACA;AACA,QAAO;;AAEP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;;AAEP;AACA;AACA;AACA;AACA,QAAO;;AAEP;AACA;AACA;AACA;AACA,UAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;;AAEP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAW;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,cAAa,YAAY;AACzB,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,cAAa,MAAM;AACnB,eAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA,OAAM;AACN;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAQ;AACR;AACA;AACA;AACA;AACA,SAAQ;AACR;AACA;AACA;AACA;AACA,SAAQ;AACR,OAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,yBAAwB;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH,EAAC;;AAED;;AAEA,EAAC;;;;;;;;ACvhID;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,EAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAiB;;AAEjB;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAQ;AACR;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA,8BAA6B;AAC7B;;AAEA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;;;;AAIA;AACA;AACA,cAAa,YAAY;AACzB,cAAa,OAAO;AACpB;AACA;AACA;AACA,6DAA4D;AAC5D;;AAEA,gBAAe;AACf,sCAAqC;;;AAGrC;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,YAAW;AACX;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA,aAAY;AACZ;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAK;AACL;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,KAAI;AACJ;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;;AAEA;AACA;;AAEA,uBAAsB;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;;;AAGH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,sBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAQ;AACR;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA,SAAQ;AACR;AACA;AACA;;AAEA,oCAAmC;;AAEnC;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,wBAAuB;;AAEvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;;AAGH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;;AAGH;AACA;AACA,gBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,UAAS,OAAO;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;;;AAGH;AACA;AACA,eAAc,SAAS;AACvB;AACA;AACA,kBAAiB;;AAEjB;AACA;;AAEA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ,IAAG;;;AAGH;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;;AAGH;AACA;AACA,gBAAe,YAAY;AAC3B,gBAAe,OAAO;AACtB,gBAAe;AACf;AACA;AACA;AACA,IAAG;;;AAGH;AACA;AACA,gBAAe,OAAO;AACtB,gBAAe,EAAE;AACjB,gBAAe;AACf;AACA;AACA;;AAEA;AACA;AACA,KAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA,IAAG;;;AAGH;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAI;;AAEJ;;AAEA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA,WAAU,OAAO;AACjB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;;AAIA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA,gBAAe,kBAAkB;AACjC;AACA;AACA;;AAEA,oHAAmH;AACnH;;;AAGA;AACA;AACA,eAAc,YAAY;AAC1B,eAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,cAAa,YAAY;AACzB,cAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAM;AACN;AACA;;AAEA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,aAAY,YAAY;AACxB,aAAY,OAAO;AACnB;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,EAAC;;;;;;;;AChuCD;AACA;AACA;AACA;AACA,mEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAE;AACF;AACA,GAAE;AACF;AACA;AACA,EAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ,oBAAmB,4BAA4B;AAC/C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,mBAAkB,gCAAgC;AAClD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAY,OAAO;AACnB;AACA;AACA;AACA,kBAAiB,kBAAkB;AACnC;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAY,OAAO;AACnB,eAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAY,OAAO;AACnB,eAAc;AACd;AACA;AACA;AACA,yBAAwB;AACxB,wBAAuB;AACvB,wBAAuB;AACvB,0BAAyB;AACzB;;AAEA;AACA;AACA;AACA,aAAY,OAAO;AACnB,eAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,aAAY,OAAO;AACnB,aAAY,OAAO;AACnB,aAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAY,OAAO;AACnB,aAAY,OAAO;AACnB,aAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAY,SAAS;AACrB,eAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAY,SAAS;AACrB,aAAY,IAAI;AAChB,eAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAY,OAAO;AACnB,aAAY,MAAM;AAClB,aAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAY,OAAO;AACnB,aAAY,OAAO;AACnB,aAAY,OAAO;AACnB,aAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAY,OAAO;AACnB,eAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAY,OAAO;AACnB,aAAY,OAAO;AACnB,aAAY,MAAM;AAClB;AACA;AACA;AACA;AACA,sCAAqC,OAAO;AAC5C;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAY,OAAO;AACnB,aAAY,OAAO;AACnB,eAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAY,OAAO;AACnB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA,OAAM;AACN;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAwB;;AAExB;AACA;;AAEA,yBAAwB;AACxB,yBAAwB;AACxB,yBAAwB;AACxB;AACA,yBAAwB;AACxB;AACA,IAAG;;AAEH;AACA,2CAA0C,gCAAgC;;AAE1E;AACA;AACA,iDAAgD,OAAO;AACvD;AACA;AACA;AACA;;AAEA;AACA;AACA,mDAAkD,OAAO;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,iFAAgF;AAChF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,gEAA+D,kDAAkD,EAAE;AACnH,qEAAoE,mDAAmD,EAAE;AACzH,uEAAsE,iDAAiD,EAAE;AACzH;;AAEA;AACA,6BAA4B,gDAAgD,EAAE;AAC9E,6BAA4B,4CAA4C;AACxE,KAAI;;AAEJ;AACA,8BAA6B,qBAAqB,EAAE;AACpD,6BAA4B,8CAA8C,EAAE;AAC5E,6BAA4B,4CAA4C,EAAE;AAC1E,6BAA4B,+CAA+C,EAAE;AAC7E,6BAA4B,uCAAuC,EAAE;AACrE,6BAA4B,2CAA2C,EAAE;AACzE,6BAA4B,yBAAyB,4CAA4C,EAAE;AACnG,6BAA4B,4CAA4C;AACxE,KAAI;;AAEJ;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA,yFAAwF;AACxF;AACA;;AAEA,sCAAqC;AACrC,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,eAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,eAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,cAAa,OAAO;AACpB,gBAAe;AACf;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA,6CAA4C,OAAO;AACnD;AACA;AACA,OAAM;AACN;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,cAAa,OAAO;AACpB,gBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,cAAa,OAAO;AACpB,gBAAe;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA2B,kCAAkC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA2B,kCAAkC;;AAE7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,cAAa,OAAO;AACpB,gBAAe;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ,IAAG;;AAEH;AACA;AACA;AACA,cAAa,OAAO;AACpB,gBAAe;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,gBAAe;AACf;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,gBAAe;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,gBAAe;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,cAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ,IAAG;;AAEH;AACA;AACA;AACA,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,gBAAe;AACf;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,cAAa,MAAM;AACnB;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ,IAAG;;AAEH;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAmB,UAAU;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,KAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,QAAQ;AACrB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA4C,yBAAyB;AACrE,MAAK;AACL,6CAA4C,sBAAsB;AAClE;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6BAA4B,kEAAkE;AAC9F;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,6BAA4B,0CAA0C;AACtE;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ,IAAG;;AAEH;AACA;AACA;AACA,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,eAAc;AACd;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,eAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAa,YAAY;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,iBAAgB;AAChB,kBAAiB;AACjB,iBAAgB;AAChB,iBAAgB;AAChB;AACA,cAAa,OAAO;AACpB,gBAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2DAA0D,sBAAsB;AAChF;AACA,KAAI;AACJ,+BAA8B;AAC9B;;AAEA;AACA;AACA,sCAAqC,QAAQ;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA,mDAAkD,OAAO;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA,wCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,mDAAkD;AAClD;AACA,OAAM;AACN,MAAK;AACL;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2CAA0C,OAAO;AACjD;AACA;AACA;;AAEA;AACA;AACA,uCAAsC,OAAO;AAC7C;AACA;AACA;;AAEA;AACA;AACA;AACA,6DAA4D,aAAa;AACzE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,2CAA0C,aAAa;AACvD,KAAI;AACJ;AACA,0CAAyC,cAAc;AACvD;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa,aAAa;AAC1B;AACA;AACA;;AAEA;AACA,iCAAgC,OAAO;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,cAAa,OAAO;AACpB,eAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,cAAa,OAAO;AACpB,eAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,gBAAe;AACf;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,IAAI;AACjB,eAAc;AACd;AACA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,cAAa,MAAM;AACnB,cAAa,OAAO;AACpB,eAAc;AACd;AACA;AACA;;AAEA;AACA,qCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,gBAAe;AACf;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,QAAQ;AACrB;AACA;AACA;AACA,qCAAoC,OAAO;AAC3C;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAM;AACN;AACA;;AAEA;AACA;AACA,gCAA+B,eAAe;AAC9C;AACA,KAAI;AACJ,IAAG;;AAEH;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,+BAA8B,eAAe;AAC7C;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,QAAQ;AACrB,cAAa,SAAS;AACtB,eAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,gBAAe;AACf;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uCAAsC,OAAO;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAI;AACJ;AACA;AACA,qCAAoC,YAAY;AAChD,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wBAAuB,uCAAuC;AAC9D;AACA,wBAAuB,sBAAsB;AAC7C;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAI;AACJ,IAAG;;AAEH;AACA;AACA;AACA;AACA,cAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA6B,eAAe;AAC5C;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,cAAa,OAAO;AACpB,gBAAe;AACf;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,yBAAwB,SAAS;;AAEjC,8CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa,IAAI;AACjB,cAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,cAAa,IAAI;AACjB,cAAa,OAAO;AACpB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,cAAa,IAAI;AACjB;AACA;AACA;;AAEA;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAqC,OAAO;AAC5C;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAW,kCAAkC;AAC7C;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,gBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,eAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,8DAA6D;AAC7D,qDAAoD;AACpD,+CAA8C;AAC9C,oDAAmD;AACnD,2DAA0D;AAC1D,oDAAmD;AACnD,+CAA8C;AAC9C,0DAAyD;AACzD,oDAAmD;AACnD,+CAA8C;AAC9C,uDAAsD;AACtD,iDAAgD;AAChD,+CAA8C;AAC9C,wDAAuD;AACvD,wDAAuD;AACvD,kDAAiD;AACjD,qDAAoD;AACpD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,yCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,mCAAkC,OAAO;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA,qDAAoD,OAAO;AAC3D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAoC,OAAO;AAC3C;AACA;AACA;;AAEA;;AAEA;AACA,qCAAoC,OAAO;AAC3C;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAI;AACJ;AACA;;AAEA,sDAAqD;AACrD,IAAG;AACH;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAoB,oBAAoB;AACxC,OAAM;AACN;AACA,qBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,MAAK;AACL;AACA,IAAG;;AAEH,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,6EAA4E;AAC5E;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA,6CAA4C,YAAY,kBAAkB,WAAW,UAAU,cAAc,wBAAwB,aAAa;AAClJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,gBAAe,OAAO;AACtB;AACA;AACA,qBAAoB,mBAAmB;AACvC;;AAEA;AACA;AACA;AACA,qBAAoB,aAAa;AACjC;AACA;AACA,gCAA+B,kBAAkB;AACjD;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA,GAAE;;AAEF;AACA;;AAEA;AACA,wBAAuB;AACvB;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,eAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA,IAAG;;AAEH,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA,EAAC,G;;;;;;;ACj/FD;AACA;AACA;AACA;AACA,mEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;AACF;AACA,GAAE;AACF;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,aAAY,aAAa;AACzB,aAAY,OAAO;AACnB;AACA;AACA;AACA,gCAA+B;AAC/B;;AAEA;AACA;AACA;AACA;AACA,aAAY,OAAO;AACnB,eAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,gCAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,aAAY,aAAa;AACzB;AACA;AACA;AACA;AACA;AACA,qCAAoC,OAAO;AAC3C;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAY,cAAc;AAC1B,aAAY,OAAO;AACnB,eAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,MAAM;AACnB,cAAa,OAAO;AACpB,eAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB,eAAc;AACd;AACA;AACA;AACA;AACA,wBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA4B,iBAAiB;AAC7C;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA,uBAAsB,UAAU;AAChC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,6BAA4B,iBAAiB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,6BAA4B,iBAAiB;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAY,cAAc;AAC1B,aAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB,eAAc,OAAO;AACrB,eAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAiC,OAAO;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,qBAAoB,mCAAmC;AACvD;AACA,IAAG;AACH,kCAAiC,OAAO;AACxC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iCAAgC,OAAO;AACvC;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,gBAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAY,OAAO;AACnB,aAAY,OAAO;AACnB,eAAc;AACd;AACA;AACA;;AAEA,sBAAqB;;AAErB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAgB;AAChB,eAAc;AACd,gBAAe;AACf,iBAAgB;AAChB,gBAAe;AACf;AACA;AACA;AACA,kBAAiB;AACjB,gBAAe;AACf,iBAAgB;AAChB,gBAAe;AACf,gBAAe;AACf;AACA,aAAY,OAAO;AACnB,aAAY,OAAO;AACnB,eAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yBAAwB,yBAAyB;AACjD;AACA,KAAI;AACJ,IAAG;AACH;AACA,wBAAuB,qBAAqB;AAC5C,KAAI;AACJ;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,+CAA8C;AAC9C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAiC,OAAO;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA,EAAC;;;;;;;;;ACrdD;AACA;AACA;AACA;AACA,mEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;AACF;AACA,GAAE;AACF;AACA;AACA,EAAC;AACD;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS,yBAAyB,GAAG,yBAAyB;AAC9D;AACA;AACA,SAAQ,MAAM,MAAM,QAAQ,MAAM,QAAQ;AAC1C;AACA,cAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAkB;AAClB,mBAAkB;AAClB;AACA;;AAEA;AACA,oCAAmC,OAAO;AAC1C;AACA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mFAAkF;AAClF;AACA;;AAEA;AACA;AACA;AACA,cAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAC,G;;;;;;;;ACrID;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAkB;AAClB,0CAAyC,0BAA0B,2DAA2D,EAAE,kBAAkB,0BAA0B,EAAE,mCAAmC,8BAA8B,oCAAoC,cAAc;;AAEjS;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,WAAW;AACxD;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAA+C,WAAW;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,IAAG;;AAEH;AACA;;AAEA;;AAEA;;;AAGA;AACA;;AAEA;;AAEA,8CAA6C,EAAE;AAC/C;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA0C,UAAU,sBAAsB,aAAa;AACvF;AACA,mDAAkD,YAAY;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA,yCAAwC,WAAW;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,QAAO;AACP;AACA;AACA,QAAO;AACP;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA0C,WAAW;AACrD;AACA;AACA;AACA;AACA,6CAA4C,YAAY;AACxD;AACA;AACA;AACA;AACA,2GAA0G;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB;AACjB,gBAAe;AACf;AACA;AACA;AACA,oBAAmB;AACnB,kBAAiB;AACjB;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA,6CAA4C,YAAY;AACxD;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA,2CAA0C,WAAW;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA0C,WAAW;AACrD;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,2CAA0C,WAAW;AACrD;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,0CAAyC,WAAW;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA8B,qEAAqE;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAsC,WAAW;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAsC,WAAW;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAsC,WAAW;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAsC,WAAW;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAiD,WAAW;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,wCAAuC,WAAW;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA,QAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAwC,WAAW;AACnD;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6CAA4C,WAAW;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,WAAW;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAsC,WAAW;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAsC,WAAW;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,uCAAsC,WAAW;AACjD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,WAAW;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wCAAuC,WAAW;AAClD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wCAAuC,WAAW;AAClD;AACA;AACA;AACA;AACA,YAAW;AACX;AACA,YAAW;AACX;AACA;AACA,UAAS;AACT;AACA;AACA,YAAW;AACX;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,WAAW;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAe;AACf,cAAa;AACb;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA,4DAA2D,UAAU,0DAA0D,aAAa;AAC5I,QAAO;AACP;AACA,QAAO;AACP,2DAA0D,UAAU;AACpE;AACA,QAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA,wCAAuC,WAAW;AAClD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA,QAAO;AACP;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,WAAW;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,wCAAuC,WAAW;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAwC,WAAW;AACnD;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,iDAAgD,WAAW;AAC3D;AACA;AACA;AACA;AACA,kDAAiD,YAAY;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,wCAAuC,WAAW;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA4C,YAAY;AACxD;AACA,gHAA+G,YAAY;AAC3H;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA,+CAA8C,YAAY;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA,+CAA8C,YAAY;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA4C,YAAY;AACxD;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAwC,YAAY;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA0C,YAAY;AACtD;AACA;AACA;AACA;AACA;AACA,+CAA8C,YAAY;AAC1D;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,iDAAgD,wCAAwC;AACxF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,wCAAuC,WAAW;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wCAAuC,WAAW;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,IAAG;;AAEH;;AAEA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,6CAA4C,WAAW;AACvD;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAAyC,WAAW;AACpD;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA,yCAAwC,WAAW;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qCAAoC,WAAW;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,wCAAuC,WAAW;AAClD;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,wCAAuC,YAAY;AACnD;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,WAAW;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,EAAC;;;;;;;;;ACvtDD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA2B;;AAE3B;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA,MAAK;AACL;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,4BAA2B;AAC3B;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAK;AACL;;AAEA;;AAEA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA,uEAAsE,sBAAsB;AAC5F;AACA;AACA;;AAEA,EAAC;;;;;;;;ACpKD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA,aAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA,aAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA,cAAa,OAAO;AACpB,gBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,uEAAsE,SAAS;AAC/E;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,gBAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAa,QAAQ;AACrB,cAAa,OAAO;AACpB,cAAa,QAAQ;AACrB,cAAa,OAAO;AACpB;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK,IAAI,iBAAiB;AAC1B;;AAEA;AACA;AACA,cAAa,SAAS;AACtB,cAAa,SAAS;AACtB,cAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAO;;AAEP;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kCAAiC,SAAS;AAC1C;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,cAAa;AACb,gBAAe;AACf;AACA;AACA;;AAEA,oBAAmB,sBAAsB;AACzC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,QAAO;;AAEP;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,cAAa,OAAO;AACpB,cAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA,mCAAkC;AAClC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,MAAK;;AAEL;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAO;;AAEP;AACA;AACA,QAAO;;AAEP;AACA;;AAEA;AACA;AACA;AACA,cAAa,OAAO;AACpB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAO;;AAEP;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAO;;AAEP;AACA;;AAEA;AACA;AACA;AACA,gBAAe;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAa,OAAO;AACpB,gBAAe;AACf;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,MAAK;;AAEL;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA,IAAG;AACH,EAAC;;;;;;;;AC1wBD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yB;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAgB;AAChB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,iDAAgD,gBAAgB;AAChE,iCAAgC;AAChC;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH,EAAC;;;;;;;;AC1DD;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAK;AACL;;AAEA;;AAEA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA,EAAC;;;;;;;;AC7FD;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,iCAAgC;AAChC;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,MAAK;AACL;;AAEA;;AAEA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;;AAEL,EAAC;;;;;;;;ACvHD;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,4BAA2B;AAC3B,4BAA2B;AAC3B;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,uFAAsF,eAAe;AACrG;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,kDAAiD,qDAAqD;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX,UAAS;AACT;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA,gCAA+B;AAC/B;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;;AAEA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,8BAA6B;AAC7B;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH,EAAC;;;;;;;;AC5OD;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,qCAAoC;AACpC;AACA;AACA;;AAEA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA,gCAA+B;;AAE/B;AACA;AACA;AACA,MAAK;AACL;;AAEA;;AAEA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH,EAAC;;;;;;;;AClND;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,0CAAyC,gCAAgC;;AAEzE;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,QAAO;AACP,MAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA,0CAAyC,gCAAgC;;AAEzE;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA,MAAK;AACL;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;;AAEP;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAK;AACL;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA,4BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA,gCAA+B;;AAE/B;AACA;AACA;AACA,MAAK;AACL;;AAEA;;AAEA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA,mEAAkE,kCAAkC;;AAEpG;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP,MAAK;AACL;AACA,IAAG;;AAEH,EAAC;;;;;;;;AChVD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAsB;;AAEtB;AACA;AACA;;AAEA;;AAEA,kCAAiC,KAAK;AACtC;;AAEA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mCAAkC,iBAAiB,kCAAkC;AACrF;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0BAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA,MAAK;AACL;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,eAAc,oCAAoC;AAClD;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA,MAAK;;AAEL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,wEAAuE;AACvE,2BAA0B,WAAW,wEAAwE;AAC7G;AACA,+BAA8B,kBAAkB;AAChD,sBAAqB;AACrB,+BAA8B,uDAAuD;;AAErF,uBAAsB;AACtB;;AAEA;AACA,qCAAoC,gFAAgF;AACpH,qCAAoC,gFAAgF;AACpH,qCAAoC,iFAAiF;AACrH,qCAAoC;;AAEpC;;AAEA;AACA,kBAAiB;AACjB;;AAEA;AACA;;AAEA;AACA;AACA;AACA,oDAAmD;AACnD;AACA,QAAO,kFAAkF;AACzF;AACA;AACA,MAAK;AACL;AACA;AACA,sDAAqD;AACrD;AACA,QAAO,uDAAuD;AAC9D;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;;AAEA;;AAEA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,EAAC;;;;;;;;ACjgBD;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA,iCAAgC;AAChC;AACA;AACA;AACA;AACA,IAAG;;;AAGH;AACA;;AAEA,kCAAiC;;AAEjC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;;AAEA;;AAEA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,EAAC;;;;;;;;AC3GD;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,sCAAqC;AACrC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP,8BAA6B,qBAAqB;AAClD;AACA;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,6BAA4B,KAAK;AACjC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAK;AACL;;AAEA;;AAEA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH,EAAC;;;;;;;;AC3KD;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;;AAEL;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,QAAO;AACP,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAK;AACL;;AAEA;;AAEA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,EAAC;;;;;;;;AC1JD;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA,+BAA8B;;AAE9B;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAO;AACP;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAK;AACL;;AAEA;;AAEA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,MAAK;AACL,IAAG;;AAEH,EAAC;;;;;;;;ACjKD;AACA,8BAA6B;AAC7B,cAAa,2BAA2B,4BAA4B,qBAAqB,+BAA+B,uEAAuE,iCAAiC,kHAAkH,EAAE,EAAE,yBAAyB,oBAAoB,gLAAgL,oBAAoB,kDAAkD,6BAA6B,S","file":"vendor.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonpGrav\"];\n \twindow[\"webpackJsonpGrav\"] = function webpackJsonpCallback(chunkIds, moreModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, callbacks = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId])\n \t\t\t\tcallbacks.push.apply(callbacks, installedChunks[chunkId]);\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules);\n \t\twhile(callbacks.length)\n \t\t\tcallbacks.shift().call(null, __webpack_require__);\n \t\tif(moreModules[0]) {\n \t\t\tinstalledModules[0] = 0;\n \t\t\treturn __webpack_require__(0);\n \t\t}\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// \"0\" means \"already loaded\"\n \t// Array means \"loading\", array contains callbacks\n \tvar installedChunks = {\n \t\t1:0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId, callback) {\n \t\t// \"0\" is the signal for \"already loaded\"\n \t\tif(installedChunks[chunkId] === 0)\n \t\t\treturn callback.call(null, __webpack_require__);\n\n \t\t// an array means \"currently loading\".\n \t\tif(installedChunks[chunkId] !== undefined) {\n \t\t\tinstalledChunks[chunkId].push(callback);\n \t\t} else {\n \t\t\t// start chunk loading\n \t\t\tinstalledChunks[chunkId] = [callback];\n \t\t\tvar head = document.getElementsByTagName('head')[0];\n \t\t\tvar script = document.createElement('script');\n \t\t\tscript.type = 'text/javascript';\n \t\t\tscript.charset = 'utf-8';\n \t\t\tscript.async = true;\n\n \t\t\tscript.src = __webpack_require__.p + \"\" + chunkId + \".admin.js\";\n \t\t\thead.appendChild(script);\n \t\t}\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 802adff72a392671ec29\n **/","/*\n * Toastr\n * Copyright 2012-2015\n * Authors: John Papa, Hans Fjällemark, and Tim Ferrell.\n * All Rights Reserved.\n * Use, reproduction, distribution, and modification of this code is subject to the terms and\n * conditions of the MIT license, available at http://www.opensource.org/licenses/mit-license.php\n *\n * ARIA Support: Greta Krafsig\n *\n * Project: https://github.com/CodeSeven/toastr\n */\n/* global define */\n; (function (define) {\n define(['jquery'], function ($) {\n return (function () {\n var $container;\n var listener;\n var toastId = 0;\n var toastType = {\n error: 'error',\n info: 'info',\n success: 'success',\n warning: 'warning'\n };\n\n var toastr = {\n clear: clear,\n remove: remove,\n error: error,\n getContainer: getContainer,\n info: info,\n options: {},\n subscribe: subscribe,\n success: success,\n version: '2.1.2',\n warning: warning\n };\n\n var previousToast;\n\n return toastr;\n\n ////////////////\n\n function error(message, title, optionsOverride) {\n return notify({\n type: toastType.error,\n iconClass: getOptions().iconClasses.error,\n message: message,\n optionsOverride: optionsOverride,\n title: title\n });\n }\n\n function getContainer(options, create) {\n if (!options) { options = getOptions(); }\n $container = $('#' + options.containerId);\n if ($container.length) {\n return $container;\n }\n if (create) {\n $container = createContainer(options);\n }\n return $container;\n }\n\n function info(message, title, optionsOverride) {\n return notify({\n type: toastType.info,\n iconClass: getOptions().iconClasses.info,\n message: message,\n optionsOverride: optionsOverride,\n title: title\n });\n }\n\n function subscribe(callback) {\n listener = callback;\n }\n\n function success(message, title, optionsOverride) {\n return notify({\n type: toastType.success,\n iconClass: getOptions().iconClasses.success,\n message: message,\n optionsOverride: optionsOverride,\n title: title\n });\n }\n\n function warning(message, title, optionsOverride) {\n return notify({\n type: toastType.warning,\n iconClass: getOptions().iconClasses.warning,\n message: message,\n optionsOverride: optionsOverride,\n title: title\n });\n }\n\n function clear($toastElement, clearOptions) {\n var options = getOptions();\n if (!$container) { getContainer(options); }\n if (!clearToast($toastElement, options, clearOptions)) {\n clearContainer(options);\n }\n }\n\n function remove($toastElement) {\n var options = getOptions();\n if (!$container) { getContainer(options); }\n if ($toastElement && $(':focus', $toastElement).length === 0) {\n removeToast($toastElement);\n return;\n }\n if ($container.children().length) {\n $container.remove();\n }\n }\n\n // internal functions\n\n function clearContainer (options) {\n var toastsToClear = $container.children();\n for (var i = toastsToClear.length - 1; i >= 0; i--) {\n clearToast($(toastsToClear[i]), options);\n }\n }\n\n function clearToast ($toastElement, options, clearOptions) {\n var force = clearOptions && clearOptions.force ? clearOptions.force : false;\n if ($toastElement && (force || $(':focus', $toastElement).length === 0)) {\n $toastElement[options.hideMethod]({\n duration: options.hideDuration,\n easing: options.hideEasing,\n complete: function () { removeToast($toastElement); }\n });\n return true;\n }\n return false;\n }\n\n function createContainer(options) {\n $container = $('
')\n .attr('id', options.containerId)\n .addClass(options.positionClass)\n .attr('aria-live', 'polite')\n .attr('role', 'alert');\n\n $container.appendTo($(options.target));\n return $container;\n }\n\n function getDefaults() {\n return {\n tapToDismiss: true,\n toastClass: 'toast',\n containerId: 'toast-container',\n debug: false,\n\n showMethod: 'fadeIn', //fadeIn, slideDown, and show are built into jQuery\n showDuration: 300,\n showEasing: 'swing', //swing and linear are built into jQuery\n onShown: undefined,\n hideMethod: 'fadeOut',\n hideDuration: 1000,\n hideEasing: 'swing',\n onHidden: undefined,\n closeMethod: false,\n closeDuration: false,\n closeEasing: false,\n\n extendedTimeOut: 1000,\n iconClasses: {\n error: 'toast-error',\n info: 'toast-info',\n success: 'toast-success',\n warning: 'toast-warning'\n },\n iconClass: 'toast-info',\n positionClass: 'toast-top-right',\n timeOut: 5000, // Set timeOut and extendedTimeOut to 0 to make it sticky\n titleClass: 'toast-title',\n messageClass: 'toast-message',\n escapeHtml: false,\n target: 'body',\n closeHtml: '
× ',\n newestOnTop: true,\n preventDuplicates: false,\n progressBar: false\n };\n }\n\n function publish(args) {\n if (!listener) { return; }\n listener(args);\n }\n\n function notify(map) {\n var options = getOptions();\n var iconClass = map.iconClass || options.iconClass;\n\n if (typeof (map.optionsOverride) !== 'undefined') {\n options = $.extend(options, map.optionsOverride);\n iconClass = map.optionsOverride.iconClass || iconClass;\n }\n\n if (shouldExit(options, map)) { return; }\n\n toastId++;\n\n $container = getContainer(options, true);\n\n var intervalId = null;\n var $toastElement = $('
');\n var $titleElement = $('
');\n var $messageElement = $('
');\n var $progressElement = $('
');\n var $closeElement = $(options.closeHtml);\n var progressBar = {\n intervalId: null,\n hideEta: null,\n maxHideTime: null\n };\n var response = {\n toastId: toastId,\n state: 'visible',\n startTime: new Date(),\n options: options,\n map: map\n };\n\n personalizeToast();\n\n displayToast();\n\n handleEvents();\n\n publish(response);\n\n if (options.debug && console) {\n console.log(response);\n }\n\n return $toastElement;\n\n function escapeHtml(source) {\n if (source == null)\n source = \"\";\n\n return new String(source)\n .replace(/&/g, '&')\n .replace(/\"/g, '"')\n .replace(/'/g, ''')\n .replace(//g, '>');\n }\n\n function personalizeToast() {\n setIcon();\n setTitle();\n setMessage();\n setCloseButton();\n setProgressBar();\n setSequence();\n }\n\n function handleEvents() {\n $toastElement.hover(stickAround, delayedHideToast);\n if (!options.onclick && options.tapToDismiss) {\n $toastElement.click(hideToast);\n }\n\n if (options.closeButton && $closeElement) {\n $closeElement.click(function (event) {\n if (event.stopPropagation) {\n event.stopPropagation();\n } else if (event.cancelBubble !== undefined && event.cancelBubble !== true) {\n event.cancelBubble = true;\n }\n hideToast(true);\n });\n }\n\n if (options.onclick) {\n $toastElement.click(function (event) {\n options.onclick(event);\n hideToast();\n });\n }\n }\n\n function displayToast() {\n $toastElement.hide();\n\n $toastElement[options.showMethod](\n {duration: options.showDuration, easing: options.showEasing, complete: options.onShown}\n );\n\n if (options.timeOut > 0) {\n intervalId = setTimeout(hideToast, options.timeOut);\n progressBar.maxHideTime = parseFloat(options.timeOut);\n progressBar.hideEta = new Date().getTime() + progressBar.maxHideTime;\n if (options.progressBar) {\n progressBar.intervalId = setInterval(updateProgress, 10);\n }\n }\n }\n\n function setIcon() {\n if (map.iconClass) {\n $toastElement.addClass(options.toastClass).addClass(iconClass);\n }\n }\n\n function setSequence() {\n if (options.newestOnTop) {\n $container.prepend($toastElement);\n } else {\n $container.append($toastElement);\n }\n }\n\n function setTitle() {\n if (map.title) {\n $titleElement.append(!options.escapeHtml ? map.title : escapeHtml(map.title)).addClass(options.titleClass);\n $toastElement.append($titleElement);\n }\n }\n\n function setMessage() {\n if (map.message) {\n $messageElement.append(!options.escapeHtml ? map.message : escapeHtml(map.message)).addClass(options.messageClass);\n $toastElement.append($messageElement);\n }\n }\n\n function setCloseButton() {\n if (options.closeButton) {\n $closeElement.addClass('toast-close-button').attr('role', 'button');\n $toastElement.prepend($closeElement);\n }\n }\n\n function setProgressBar() {\n if (options.progressBar) {\n $progressElement.addClass('toast-progress');\n $toastElement.prepend($progressElement);\n }\n }\n\n function shouldExit(options, map) {\n if (options.preventDuplicates) {\n if (map.message === previousToast) {\n return true;\n } else {\n previousToast = map.message;\n }\n }\n return false;\n }\n\n function hideToast(override) {\n var method = override && options.closeMethod !== false ? options.closeMethod : options.hideMethod;\n var duration = override && options.closeDuration !== false ?\n options.closeDuration : options.hideDuration;\n var easing = override && options.closeEasing !== false ? options.closeEasing : options.hideEasing;\n if ($(':focus', $toastElement).length && !override) {\n return;\n }\n clearTimeout(progressBar.intervalId);\n return $toastElement[method]({\n duration: duration,\n easing: easing,\n complete: function () {\n removeToast($toastElement);\n if (options.onHidden && response.state !== 'hidden') {\n options.onHidden();\n }\n response.state = 'hidden';\n response.endTime = new Date();\n publish(response);\n }\n });\n }\n\n function delayedHideToast() {\n if (options.timeOut > 0 || options.extendedTimeOut > 0) {\n intervalId = setTimeout(hideToast, options.extendedTimeOut);\n progressBar.maxHideTime = parseFloat(options.extendedTimeOut);\n progressBar.hideEta = new Date().getTime() + progressBar.maxHideTime;\n }\n }\n\n function stickAround() {\n clearTimeout(intervalId);\n progressBar.hideEta = 0;\n $toastElement.stop(true, true)[options.showMethod](\n {duration: options.showDuration, easing: options.showEasing}\n );\n }\n\n function updateProgress() {\n var percentage = ((progressBar.hideEta - (new Date().getTime())) / progressBar.maxHideTime) * 100;\n $progressElement.width(percentage + '%');\n }\n }\n\n function getOptions() {\n return $.extend({}, getDefaults(), toastr.options);\n }\n\n function removeToast($toastElement) {\n if (!$container) { $container = getContainer(); }\n if ($toastElement.is(':visible')) {\n return;\n }\n $toastElement.remove();\n $toastElement = null;\n if ($container.children().length === 0) {\n $container.remove();\n previousToast = undefined;\n }\n }\n\n })();\n });\n}(typeof define === 'function' && define.amd ? define : function (deps, factory) {\n if (typeof module !== 'undefined' && module.exports) { //Node\n module.exports = factory(require('jquery'));\n } else {\n window.toastr = factory(window.jQuery);\n }\n}));\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/toastr/toastr.js\n ** module id = 195\n ** module chunks = 1\n **/","module.exports = jQuery;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external \"jQuery\"\n ** module id = 196\n ** module chunks = 1\n **/","module.exports = function() { throw new Error(\"define cannot be used indirect\"); };\r\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** (webpack)/buildin/amd-define.js\n ** module id = 197\n ** module chunks = 1\n **/","(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module unless amdModuleId is set\n define([], function () {\n return (root['Chartist'] = factory());\n });\n } else if (typeof exports === 'object') {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Node.\n module.exports = factory();\n } else {\n root['Chartist'] = factory();\n }\n}(this, function () {\n\n/* Chartist.js 0.9.5\n * Copyright © 2015 Gion Kunz\n * Free to use under the WTFPL license.\n * http://www.wtfpl.net/\n */\n/**\n * The core module of Chartist that is mainly providing static functions and higher level functions for chart modules.\n *\n * @module Chartist.Core\n */\nvar Chartist = {\n version: '0.9.5'\n};\n\n(function (window, document, Chartist) {\n 'use strict';\n\n /**\n * Helps to simplify functional style code\n *\n * @memberof Chartist.Core\n * @param {*} n This exact value will be returned by the noop function\n * @return {*} The same value that was provided to the n parameter\n */\n Chartist.noop = function (n) {\n return n;\n };\n\n /**\n * Generates a-z from a number 0 to 26\n *\n * @memberof Chartist.Core\n * @param {Number} n A number from 0 to 26 that will result in a letter a-z\n * @return {String} A character from a-z based on the input number n\n */\n Chartist.alphaNumerate = function (n) {\n // Limit to a-z\n return String.fromCharCode(97 + n % 26);\n };\n\n /**\n * Simple recursive object extend\n *\n * @memberof Chartist.Core\n * @param {Object} target Target object where the source will be merged into\n * @param {Object...} sources This object (objects) will be merged into target and then target is returned\n * @return {Object} An object that has the same reference as target but is extended and merged with the properties of source\n */\n Chartist.extend = function (target) {\n target = target || {};\n\n var sources = Array.prototype.slice.call(arguments, 1);\n sources.forEach(function(source) {\n for (var prop in source) {\n if (typeof source[prop] === 'object' && source[prop] !== null && !(source[prop] instanceof Array)) {\n target[prop] = Chartist.extend({}, target[prop], source[prop]);\n } else {\n target[prop] = source[prop];\n }\n }\n });\n\n return target;\n };\n\n /**\n * Replaces all occurrences of subStr in str with newSubStr and returns a new string.\n *\n * @memberof Chartist.Core\n * @param {String} str\n * @param {String} subStr\n * @param {String} newSubStr\n * @return {String}\n */\n Chartist.replaceAll = function(str, subStr, newSubStr) {\n return str.replace(new RegExp(subStr, 'g'), newSubStr);\n };\n\n /**\n * Converts a number to a string with a unit. If a string is passed then this will be returned unmodified.\n *\n * @memberof Chartist.Core\n * @param {Number} value\n * @param {String} unit\n * @return {String} Returns the passed number value with unit.\n */\n Chartist.ensureUnit = function(value, unit) {\n if(typeof value === 'number') {\n value = value + unit;\n }\n\n return value;\n };\n\n /**\n * Converts a number or string to a quantity object.\n *\n * @memberof Chartist.Core\n * @param {String|Number} input\n * @return {Object} Returns an object containing the value as number and the unit as string.\n */\n Chartist.quantity = function(input) {\n if (typeof input === 'string') {\n var match = (/^(\\d+)\\s*(.*)$/g).exec(input);\n return {\n value : +match[1],\n unit: match[2] || undefined\n };\n }\n return { value: input };\n };\n\n /**\n * This is a wrapper around document.querySelector that will return the query if it's already of type Node\n *\n * @memberof Chartist.Core\n * @param {String|Node} query The query to use for selecting a Node or a DOM node that will be returned directly\n * @return {Node}\n */\n Chartist.querySelector = function(query) {\n return query instanceof Node ? query : document.querySelector(query);\n };\n\n /**\n * Functional style helper to produce array with given length initialized with undefined values\n *\n * @memberof Chartist.Core\n * @param length\n * @return {Array}\n */\n Chartist.times = function(length) {\n return Array.apply(null, new Array(length));\n };\n\n /**\n * Sum helper to be used in reduce functions\n *\n * @memberof Chartist.Core\n * @param previous\n * @param current\n * @return {*}\n */\n Chartist.sum = function(previous, current) {\n return previous + (current ? current : 0);\n };\n\n /**\n * Multiply helper to be used in `Array.map` for multiplying each value of an array with a factor.\n *\n * @memberof Chartist.Core\n * @param {Number} factor\n * @returns {Function} Function that can be used in `Array.map` to multiply each value in an array\n */\n Chartist.mapMultiply = function(factor) {\n return function(num) {\n return num * factor;\n };\n };\n\n /**\n * Add helper to be used in `Array.map` for adding a addend to each value of an array.\n *\n * @memberof Chartist.Core\n * @param {Number} addend\n * @returns {Function} Function that can be used in `Array.map` to add a addend to each value in an array\n */\n Chartist.mapAdd = function(addend) {\n return function(num) {\n return num + addend;\n };\n };\n\n /**\n * Map for multi dimensional arrays where their nested arrays will be mapped in serial. The output array will have the length of the largest nested array. The callback function is called with variable arguments where each argument is the nested array value (or undefined if there are no more values).\n *\n * @memberof Chartist.Core\n * @param arr\n * @param cb\n * @return {Array}\n */\n Chartist.serialMap = function(arr, cb) {\n var result = [],\n length = Math.max.apply(null, arr.map(function(e) {\n return e.length;\n }));\n\n Chartist.times(length).forEach(function(e, index) {\n var args = arr.map(function(e) {\n return e[index];\n });\n\n result[index] = cb.apply(null, args);\n });\n\n return result;\n };\n\n /**\n * This helper function can be used to round values with certain precision level after decimal. This is used to prevent rounding errors near float point precision limit.\n *\n * @memberof Chartist.Core\n * @param {Number} value The value that should be rounded with precision\n * @param {Number} [digits] The number of digits after decimal used to do the rounding\n * @returns {number} Rounded value\n */\n Chartist.roundWithPrecision = function(value, digits) {\n var precision = Math.pow(10, digits || Chartist.precision);\n return Math.round(value * precision) / precision;\n };\n\n /**\n * Precision level used internally in Chartist for rounding. If you require more decimal places you can increase this number.\n *\n * @memberof Chartist.Core\n * @type {number}\n */\n Chartist.precision = 8;\n\n /**\n * A map with characters to escape for strings to be safely used as attribute values.\n *\n * @memberof Chartist.Core\n * @type {Object}\n */\n Chartist.escapingMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n '\\'': '''\n };\n\n /**\n * This function serializes arbitrary data to a string. In case of data that can't be easily converted to a string, this function will create a wrapper object and serialize the data using JSON.stringify. The outcoming string will always be escaped using Chartist.escapingMap.\n * If called with null or undefined the function will return immediately with null or undefined.\n *\n * @memberof Chartist.Core\n * @param {Number|String|Object} data\n * @return {String}\n */\n Chartist.serialize = function(data) {\n if(data === null || data === undefined) {\n return data;\n } else if(typeof data === 'number') {\n data = ''+data;\n } else if(typeof data === 'object') {\n data = JSON.stringify({data: data});\n }\n\n return Object.keys(Chartist.escapingMap).reduce(function(result, key) {\n return Chartist.replaceAll(result, key, Chartist.escapingMap[key]);\n }, data);\n };\n\n /**\n * This function de-serializes a string previously serialized with Chartist.serialize. The string will always be unescaped using Chartist.escapingMap before it's returned. Based on the input value the return type can be Number, String or Object. JSON.parse is used with try / catch to see if the unescaped string can be parsed into an Object and this Object will be returned on success.\n *\n * @memberof Chartist.Core\n * @param {String} data\n * @return {String|Number|Object}\n */\n Chartist.deserialize = function(data) {\n if(typeof data !== 'string') {\n return data;\n }\n\n data = Object.keys(Chartist.escapingMap).reduce(function(result, key) {\n return Chartist.replaceAll(result, Chartist.escapingMap[key], key);\n }, data);\n\n try {\n data = JSON.parse(data);\n data = data.data !== undefined ? data.data : data;\n } catch(e) {}\n\n return data;\n };\n\n /**\n * Create or reinitialize the SVG element for the chart\n *\n * @memberof Chartist.Core\n * @param {Node} container The containing DOM Node object that will be used to plant the SVG element\n * @param {String} width Set the width of the SVG element. Default is 100%\n * @param {String} height Set the height of the SVG element. Default is 100%\n * @param {String} className Specify a class to be added to the SVG element\n * @return {Object} The created/reinitialized SVG element\n */\n Chartist.createSvg = function (container, width, height, className) {\n var svg;\n\n width = width || '100%';\n height = height || '100%';\n\n // Check if there is a previous SVG element in the container that contains the Chartist XML namespace and remove it\n // Since the DOM API does not support namespaces we need to manually search the returned list http://www.w3.org/TR/selectors-api/\n Array.prototype.slice.call(container.querySelectorAll('svg')).filter(function filterChartistSvgObjects(svg) {\n return svg.getAttributeNS('http://www.w3.org/2000/xmlns/', Chartist.xmlNs.prefix);\n }).forEach(function removePreviousElement(svg) {\n container.removeChild(svg);\n });\n\n // Create svg object with width and height or use 100% as default\n svg = new Chartist.Svg('svg').attr({\n width: width,\n height: height\n }).addClass(className).attr({\n style: 'width: ' + width + '; height: ' + height + ';'\n });\n\n // Add the DOM node to our container\n container.appendChild(svg._node);\n\n return svg;\n };\n\n\n /**\n * Reverses the series, labels and series data arrays.\n *\n * @memberof Chartist.Core\n * @param data\n */\n Chartist.reverseData = function(data) {\n data.labels.reverse();\n data.series.reverse();\n for (var i = 0; i < data.series.length; i++) {\n if(typeof(data.series[i]) === 'object' && data.series[i].data !== undefined) {\n data.series[i].data.reverse();\n } else if(data.series[i] instanceof Array) {\n data.series[i].reverse();\n }\n }\n };\n\n /**\n * Convert data series into plain array\n *\n * @memberof Chartist.Core\n * @param {Object} data The series object that contains the data to be visualized in the chart\n * @param {Boolean} reverse If true the whole data is reversed by the getDataArray call. This will modify the data object passed as first parameter. The labels as well as the series order is reversed. The whole series data arrays are reversed too.\n * @param {Boolean} multi Create a multi dimensional array from a series data array where a value object with `x` and `y` values will be created.\n * @return {Array} A plain array that contains the data to be visualized in the chart\n */\n Chartist.getDataArray = function (data, reverse, multi) {\n // If the data should be reversed but isn't we need to reverse it\n // If it's reversed but it shouldn't we need to reverse it back\n // That's required to handle data updates correctly and to reflect the responsive configurations\n if(reverse && !data.reversed || !reverse && data.reversed) {\n Chartist.reverseData(data);\n data.reversed = !data.reversed;\n }\n\n // Recursively walks through nested arrays and convert string values to numbers and objects with value properties\n // to values. Check the tests in data core -> data normalization for a detailed specification of expected values\n function recursiveConvert(value) {\n if(Chartist.isFalseyButZero(value)) {\n // This is a hole in data and we should return undefined\n return undefined;\n } else if((value.data || value) instanceof Array) {\n return (value.data || value).map(recursiveConvert);\n } else if(value.hasOwnProperty('value')) {\n return recursiveConvert(value.value);\n } else {\n if(multi) {\n var multiValue = {};\n\n // Single series value arrays are assumed to specify the Y-Axis value\n // For example: [1, 2] => [{x: undefined, y: 1}, {x: undefined, y: 2}]\n // If multi is a string then it's assumed that it specified which dimension should be filled as default\n if(typeof multi === 'string') {\n multiValue[multi] = Chartist.getNumberOrUndefined(value);\n } else {\n multiValue.y = Chartist.getNumberOrUndefined(value);\n }\n\n multiValue.x = value.hasOwnProperty('x') ? Chartist.getNumberOrUndefined(value.x) : multiValue.x;\n multiValue.y = value.hasOwnProperty('y') ? Chartist.getNumberOrUndefined(value.y) : multiValue.y;\n\n return multiValue;\n\n } else {\n return Chartist.getNumberOrUndefined(value);\n }\n }\n }\n\n return data.series.map(recursiveConvert);\n };\n\n /**\n * Converts a number into a padding object.\n *\n * @memberof Chartist.Core\n * @param {Object|Number} padding\n * @param {Number} [fallback] This value is used to fill missing values if a incomplete padding object was passed\n * @returns {Object} Returns a padding object containing top, right, bottom, left properties filled with the padding number passed in as argument. If the argument is something else than a number (presumably already a correct padding object) then this argument is directly returned.\n */\n Chartist.normalizePadding = function(padding, fallback) {\n fallback = fallback || 0;\n\n return typeof padding === 'number' ? {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n } : {\n top: typeof padding.top === 'number' ? padding.top : fallback,\n right: typeof padding.right === 'number' ? padding.right : fallback,\n bottom: typeof padding.bottom === 'number' ? padding.bottom : fallback,\n left: typeof padding.left === 'number' ? padding.left : fallback\n };\n };\n\n Chartist.getMetaData = function(series, index) {\n var value = series.data ? series.data[index] : series[index];\n return value ? Chartist.serialize(value.meta) : undefined;\n };\n\n /**\n * Calculate the order of magnitude for the chart scale\n *\n * @memberof Chartist.Core\n * @param {Number} value The value Range of the chart\n * @return {Number} The order of magnitude\n */\n Chartist.orderOfMagnitude = function (value) {\n return Math.floor(Math.log(Math.abs(value)) / Math.LN10);\n };\n\n /**\n * Project a data length into screen coordinates (pixels)\n *\n * @memberof Chartist.Core\n * @param {Object} axisLength The svg element for the chart\n * @param {Number} length Single data value from a series array\n * @param {Object} bounds All the values to set the bounds of the chart\n * @return {Number} The projected data length in pixels\n */\n Chartist.projectLength = function (axisLength, length, bounds) {\n return length / bounds.range * axisLength;\n };\n\n /**\n * Get the height of the area in the chart for the data series\n *\n * @memberof Chartist.Core\n * @param {Object} svg The svg element for the chart\n * @param {Object} options The Object that contains all the optional values for the chart\n * @return {Number} The height of the area in the chart for the data series\n */\n Chartist.getAvailableHeight = function (svg, options) {\n return Math.max((Chartist.quantity(options.height).value || svg.height()) - (options.chartPadding.top + options.chartPadding.bottom) - options.axisX.offset, 0);\n };\n\n /**\n * Get highest and lowest value of data array. This Array contains the data that will be visualized in the chart.\n *\n * @memberof Chartist.Core\n * @param {Array} data The array that contains the data to be visualized in the chart\n * @param {Object} options The Object that contains the chart options\n * @param {String} dimension Axis dimension 'x' or 'y' used to access the correct value and high / low configuration\n * @return {Object} An object that contains the highest and lowest value that will be visualized on the chart.\n */\n Chartist.getHighLow = function (data, options, dimension) {\n // TODO: Remove workaround for deprecated global high / low config. Axis high / low configuration is preferred\n options = Chartist.extend({}, options, dimension ? options['axis' + dimension.toUpperCase()] : {});\n\n var highLow = {\n high: options.high === undefined ? -Number.MAX_VALUE : +options.high,\n low: options.low === undefined ? Number.MAX_VALUE : +options.low\n };\n var findHigh = options.high === undefined;\n var findLow = options.low === undefined;\n\n // Function to recursively walk through arrays and find highest and lowest number\n function recursiveHighLow(data) {\n if(data === undefined) {\n return undefined;\n } else if(data instanceof Array) {\n for (var i = 0; i < data.length; i++) {\n recursiveHighLow(data[i]);\n }\n } else {\n var value = dimension ? +data[dimension] : +data;\n\n if (findHigh && value > highLow.high) {\n highLow.high = value;\n }\n\n if (findLow && value < highLow.low) {\n highLow.low = value;\n }\n }\n }\n\n // Start to find highest and lowest number recursively\n if(findHigh || findLow) {\n recursiveHighLow(data);\n }\n\n // Overrides of high / low based on reference value, it will make sure that the invisible reference value is\n // used to generate the chart. This is useful when the chart always needs to contain the position of the\n // invisible reference value in the view i.e. for bipolar scales.\n if (options.referenceValue || options.referenceValue === 0) {\n highLow.high = Math.max(options.referenceValue, highLow.high);\n highLow.low = Math.min(options.referenceValue, highLow.low);\n }\n\n // If high and low are the same because of misconfiguration or flat data (only the same value) we need\n // to set the high or low to 0 depending on the polarity\n if (highLow.high <= highLow.low) {\n // If both values are 0 we set high to 1\n if (highLow.low === 0) {\n highLow.high = 1;\n } else if (highLow.low < 0) {\n // If we have the same negative value for the bounds we set bounds.high to 0\n highLow.high = 0;\n } else {\n // If we have the same positive value for the bounds we set bounds.low to 0\n highLow.low = 0;\n }\n }\n\n return highLow;\n };\n\n /**\n * Checks if the value is a valid number or string with a number.\n *\n * @memberof Chartist.Core\n * @param value\n * @returns {Boolean}\n */\n Chartist.isNum = function(value) {\n return !isNaN(value) && isFinite(value);\n };\n\n /**\n * Returns true on all falsey values except the numeric value 0.\n *\n * @memberof Chartist.Core\n * @param value\n * @returns {boolean}\n */\n Chartist.isFalseyButZero = function(value) {\n return !value && value !== 0;\n };\n\n /**\n * Returns a number if the passed parameter is a valid number or the function will return undefined. On all other values than a valid number, this function will return undefined.\n *\n * @memberof Chartist.Core\n * @param value\n * @returns {*}\n */\n Chartist.getNumberOrUndefined = function(value) {\n return isNaN(+value) ? undefined : +value;\n };\n\n /**\n * Gets a value from a dimension `value.x` or `value.y` while returning value directly if it's a valid numeric value. If the value is not numeric and it's falsey this function will return undefined.\n *\n * @param value\n * @param dimension\n * @returns {*}\n */\n Chartist.getMultiValue = function(value, dimension) {\n if(Chartist.isNum(value)) {\n return +value;\n } else if(value) {\n return value[dimension || 'y'] || 0;\n } else {\n return 0;\n }\n };\n\n /**\n * Pollard Rho Algorithm to find smallest factor of an integer value. There are more efficient algorithms for factorization, but this one is quite efficient and not so complex.\n *\n * @memberof Chartist.Core\n * @param {Number} num An integer number where the smallest factor should be searched for\n * @returns {Number} The smallest integer factor of the parameter num.\n */\n Chartist.rho = function(num) {\n if(num === 1) {\n return num;\n }\n\n function gcd(p, q) {\n if (p % q === 0) {\n return q;\n } else {\n return gcd(q, p % q);\n }\n }\n\n function f(x) {\n return x * x + 1;\n }\n\n var x1 = 2, x2 = 2, divisor;\n if (num % 2 === 0) {\n return 2;\n }\n\n do {\n x1 = f(x1) % num;\n x2 = f(f(x2)) % num;\n divisor = gcd(Math.abs(x1 - x2), num);\n } while (divisor === 1);\n\n return divisor;\n };\n\n /**\n * Calculate and retrieve all the bounds for the chart and return them in one array\n *\n * @memberof Chartist.Core\n * @param {Number} axisLength The length of the Axis used for\n * @param {Object} highLow An object containing a high and low property indicating the value range of the chart.\n * @param {Number} scaleMinSpace The minimum projected length a step should result in\n * @param {Boolean} onlyInteger\n * @return {Object} All the values to set the bounds of the chart\n */\n Chartist.getBounds = function (axisLength, highLow, scaleMinSpace, onlyInteger) {\n var i,\n optimizationCounter = 0,\n newMin,\n newMax,\n bounds = {\n high: highLow.high,\n low: highLow.low\n };\n\n bounds.valueRange = bounds.high - bounds.low;\n bounds.oom = Chartist.orderOfMagnitude(bounds.valueRange);\n bounds.step = Math.pow(10, bounds.oom);\n bounds.min = Math.floor(bounds.low / bounds.step) * bounds.step;\n bounds.max = Math.ceil(bounds.high / bounds.step) * bounds.step;\n bounds.range = bounds.max - bounds.min;\n bounds.numberOfSteps = Math.round(bounds.range / bounds.step);\n\n // Optimize scale step by checking if subdivision is possible based on horizontalGridMinSpace\n // If we are already below the scaleMinSpace value we will scale up\n var length = Chartist.projectLength(axisLength, bounds.step, bounds);\n var scaleUp = length < scaleMinSpace;\n var smallestFactor = onlyInteger ? Chartist.rho(bounds.range) : 0;\n\n // First check if we should only use integer steps and if step 1 is still larger than scaleMinSpace so we can use 1\n if(onlyInteger && Chartist.projectLength(axisLength, 1, bounds) >= scaleMinSpace) {\n bounds.step = 1;\n } else if(onlyInteger && smallestFactor < bounds.step && Chartist.projectLength(axisLength, smallestFactor, bounds) >= scaleMinSpace) {\n // If step 1 was too small, we can try the smallest factor of range\n // If the smallest factor is smaller than the current bounds.step and the projected length of smallest factor\n // is larger than the scaleMinSpace we should go for it.\n bounds.step = smallestFactor;\n } else {\n // Trying to divide or multiply by 2 and find the best step value\n while (true) {\n if (scaleUp && Chartist.projectLength(axisLength, bounds.step, bounds) <= scaleMinSpace) {\n bounds.step *= 2;\n } else if (!scaleUp && Chartist.projectLength(axisLength, bounds.step / 2, bounds) >= scaleMinSpace) {\n bounds.step /= 2;\n if(onlyInteger && bounds.step % 1 !== 0) {\n bounds.step *= 2;\n break;\n }\n } else {\n break;\n }\n\n if(optimizationCounter++ > 1000) {\n throw new Error('Exceeded maximum number of iterations while optimizing scale step!');\n }\n }\n }\n\n // Narrow min and max based on new step\n newMin = bounds.min;\n newMax = bounds.max;\n while(newMin + bounds.step <= bounds.low) {\n newMin += bounds.step;\n }\n while(newMax - bounds.step >= bounds.high) {\n newMax -= bounds.step;\n }\n bounds.min = newMin;\n bounds.max = newMax;\n bounds.range = bounds.max - bounds.min;\n\n bounds.values = [];\n for (i = bounds.min; i <= bounds.max; i += bounds.step) {\n bounds.values.push(Chartist.roundWithPrecision(i));\n }\n\n return bounds;\n };\n\n /**\n * Calculate cartesian coordinates of polar coordinates\n *\n * @memberof Chartist.Core\n * @param {Number} centerX X-axis coordinates of center point of circle segment\n * @param {Number} centerY X-axis coordinates of center point of circle segment\n * @param {Number} radius Radius of circle segment\n * @param {Number} angleInDegrees Angle of circle segment in degrees\n * @return {{x:Number, y:Number}} Coordinates of point on circumference\n */\n Chartist.polarToCartesian = function (centerX, centerY, radius, angleInDegrees) {\n var angleInRadians = (angleInDegrees - 90) * Math.PI / 180.0;\n\n return {\n x: centerX + (radius * Math.cos(angleInRadians)),\n y: centerY + (radius * Math.sin(angleInRadians))\n };\n };\n\n /**\n * Initialize chart drawing rectangle (area where chart is drawn) x1,y1 = bottom left / x2,y2 = top right\n *\n * @memberof Chartist.Core\n * @param {Object} svg The svg element for the chart\n * @param {Object} options The Object that contains all the optional values for the chart\n * @param {Number} [fallbackPadding] The fallback padding if partial padding objects are used\n * @return {Object} The chart rectangles coordinates inside the svg element plus the rectangles measurements\n */\n Chartist.createChartRect = function (svg, options, fallbackPadding) {\n var hasAxis = !!(options.axisX || options.axisY);\n var yAxisOffset = hasAxis ? options.axisY.offset : 0;\n var xAxisOffset = hasAxis ? options.axisX.offset : 0;\n // If width or height results in invalid value (including 0) we fallback to the unitless settings or even 0\n var width = svg.width() || Chartist.quantity(options.width).value || 0;\n var height = svg.height() || Chartist.quantity(options.height).value || 0;\n var normalizedPadding = Chartist.normalizePadding(options.chartPadding, fallbackPadding);\n\n // If settings were to small to cope with offset (legacy) and padding, we'll adjust\n width = Math.max(width, yAxisOffset + normalizedPadding.left + normalizedPadding.right);\n height = Math.max(height, xAxisOffset + normalizedPadding.top + normalizedPadding.bottom);\n\n var chartRect = {\n padding: normalizedPadding,\n width: function () {\n return this.x2 - this.x1;\n },\n height: function () {\n return this.y1 - this.y2;\n }\n };\n\n if(hasAxis) {\n if (options.axisX.position === 'start') {\n chartRect.y2 = normalizedPadding.top + xAxisOffset;\n chartRect.y1 = Math.max(height - normalizedPadding.bottom, chartRect.y2 + 1);\n } else {\n chartRect.y2 = normalizedPadding.top;\n chartRect.y1 = Math.max(height - normalizedPadding.bottom - xAxisOffset, chartRect.y2 + 1);\n }\n\n if (options.axisY.position === 'start') {\n chartRect.x1 = normalizedPadding.left + yAxisOffset;\n chartRect.x2 = Math.max(width - normalizedPadding.right, chartRect.x1 + 1);\n } else {\n chartRect.x1 = normalizedPadding.left;\n chartRect.x2 = Math.max(width - normalizedPadding.right - yAxisOffset, chartRect.x1 + 1);\n }\n } else {\n chartRect.x1 = normalizedPadding.left;\n chartRect.x2 = Math.max(width - normalizedPadding.right, chartRect.x1 + 1);\n chartRect.y2 = normalizedPadding.top;\n chartRect.y1 = Math.max(height - normalizedPadding.bottom, chartRect.y2 + 1);\n }\n\n return chartRect;\n };\n\n /**\n * Creates a grid line based on a projected value.\n *\n * @memberof Chartist.Core\n * @param position\n * @param index\n * @param axis\n * @param offset\n * @param length\n * @param group\n * @param classes\n * @param eventEmitter\n */\n Chartist.createGrid = function(position, index, axis, offset, length, group, classes, eventEmitter) {\n var positionalData = {};\n positionalData[axis.units.pos + '1'] = position;\n positionalData[axis.units.pos + '2'] = position;\n positionalData[axis.counterUnits.pos + '1'] = offset;\n positionalData[axis.counterUnits.pos + '2'] = offset + length;\n\n var gridElement = group.elem('line', positionalData, classes.join(' '));\n\n // Event for grid draw\n eventEmitter.emit('draw',\n Chartist.extend({\n type: 'grid',\n axis: axis,\n index: index,\n group: group,\n element: gridElement\n }, positionalData)\n );\n };\n\n /**\n * Creates a label based on a projected value and an axis.\n *\n * @memberof Chartist.Core\n * @param position\n * @param length\n * @param index\n * @param labels\n * @param axis\n * @param axisOffset\n * @param labelOffset\n * @param group\n * @param classes\n * @param useForeignObject\n * @param eventEmitter\n */\n Chartist.createLabel = function(position, length, index, labels, axis, axisOffset, labelOffset, group, classes, useForeignObject, eventEmitter) {\n var labelElement;\n var positionalData = {};\n\n positionalData[axis.units.pos] = position + labelOffset[axis.units.pos];\n positionalData[axis.counterUnits.pos] = labelOffset[axis.counterUnits.pos];\n positionalData[axis.units.len] = length;\n positionalData[axis.counterUnits.len] = axisOffset - 10;\n\n if(useForeignObject) {\n // We need to set width and height explicitly to px as span will not expand with width and height being\n // 100% in all browsers\n var content = '
' +\n labels[index] + ' ';\n\n labelElement = group.foreignObject(content, Chartist.extend({\n style: 'overflow: visible;'\n }, positionalData));\n } else {\n labelElement = group.elem('text', positionalData, classes.join(' ')).text(labels[index]);\n }\n\n eventEmitter.emit('draw', Chartist.extend({\n type: 'label',\n axis: axis,\n index: index,\n group: group,\n element: labelElement,\n text: labels[index]\n }, positionalData));\n };\n\n /**\n * Helper to read series specific options from options object. It automatically falls back to the global option if\n * there is no option in the series options.\n *\n * @param {Object} series Series object\n * @param {Object} options Chartist options object\n * @param {string} key The options key that should be used to obtain the options\n * @returns {*}\n */\n Chartist.getSeriesOption = function(series, options, key) {\n if(series.name && options.series && options.series[series.name]) {\n var seriesOptions = options.series[series.name];\n return seriesOptions.hasOwnProperty(key) ? seriesOptions[key] : options[key];\n } else {\n return options[key];\n }\n };\n\n /**\n * Provides options handling functionality with callback for options changes triggered by responsive options and media query matches\n *\n * @memberof Chartist.Core\n * @param {Object} options Options set by user\n * @param {Array} responsiveOptions Optional functions to add responsive behavior to chart\n * @param {Object} eventEmitter The event emitter that will be used to emit the options changed events\n * @return {Object} The consolidated options object from the defaults, base and matching responsive options\n */\n Chartist.optionsProvider = function (options, responsiveOptions, eventEmitter) {\n var baseOptions = Chartist.extend({}, options),\n currentOptions,\n mediaQueryListeners = [],\n i;\n\n function updateCurrentOptions(preventChangedEvent) {\n var previousOptions = currentOptions;\n currentOptions = Chartist.extend({}, baseOptions);\n\n if (responsiveOptions) {\n for (i = 0; i < responsiveOptions.length; i++) {\n var mql = window.matchMedia(responsiveOptions[i][0]);\n if (mql.matches) {\n currentOptions = Chartist.extend(currentOptions, responsiveOptions[i][1]);\n }\n }\n }\n\n if(eventEmitter && !preventChangedEvent) {\n eventEmitter.emit('optionsChanged', {\n previousOptions: previousOptions,\n currentOptions: currentOptions\n });\n }\n }\n\n function removeMediaQueryListeners() {\n mediaQueryListeners.forEach(function(mql) {\n mql.removeListener(updateCurrentOptions);\n });\n }\n\n if (!window.matchMedia) {\n throw 'window.matchMedia not found! Make sure you\\'re using a polyfill.';\n } else if (responsiveOptions) {\n\n for (i = 0; i < responsiveOptions.length; i++) {\n var mql = window.matchMedia(responsiveOptions[i][0]);\n mql.addListener(updateCurrentOptions);\n mediaQueryListeners.push(mql);\n }\n }\n // Execute initially so we get the correct options\n updateCurrentOptions(true);\n\n return {\n removeMediaQueryListeners: removeMediaQueryListeners,\n getCurrentOptions: function getCurrentOptions() {\n return Chartist.extend({}, currentOptions);\n }\n };\n };\n\n}(window, document, Chartist));\n;/**\n * Chartist path interpolation functions.\n *\n * @module Chartist.Interpolation\n */\n/* global Chartist */\n(function(window, document, Chartist) {\n 'use strict';\n\n Chartist.Interpolation = {};\n\n /**\n * This interpolation function does not smooth the path and the result is only containing lines and no curves.\n *\n * @example\n * var chart = new Chartist.Line('.ct-chart', {\n * labels: [1, 2, 3, 4, 5],\n * series: [[1, 2, 8, 1, 7]]\n * }, {\n * lineSmooth: Chartist.Interpolation.none({\n * fillHoles: false\n * })\n * });\n *\n *\n * @memberof Chartist.Interpolation\n * @return {Function}\n */\n Chartist.Interpolation.none = function(options) {\n var defaultOptions = {\n fillHoles: false\n };\n options = Chartist.extend({}, defaultOptions, options);\n return function none(pathCoordinates, valueData) {\n var path = new Chartist.Svg.Path();\n var hole = true;\n\n for(var i = 0; i < pathCoordinates.length; i += 2) {\n var currX = pathCoordinates[i];\n var currY = pathCoordinates[i + 1];\n var currData = valueData[i / 2];\n\n if(currData.value !== undefined) {\n\n if(hole) {\n path.move(currX, currY, false, currData);\n } else {\n path.line(currX, currY, false, currData);\n }\n\n hole = false;\n } else if(!options.fillHoles) {\n hole = true;\n }\n }\n\n return path;\n };\n };\n\n /**\n * Simple smoothing creates horizontal handles that are positioned with a fraction of the length between two data points. You can use the divisor option to specify the amount of smoothing.\n *\n * Simple smoothing can be used instead of `Chartist.Smoothing.cardinal` if you'd like to get rid of the artifacts it produces sometimes. Simple smoothing produces less flowing lines but is accurate by hitting the points and it also doesn't swing below or above the given data point.\n *\n * All smoothing functions within Chartist are factory functions that accept an options parameter. The simple interpolation function accepts one configuration parameter `divisor`, between 1 and ∞, which controls the smoothing characteristics.\n *\n * @example\n * var chart = new Chartist.Line('.ct-chart', {\n * labels: [1, 2, 3, 4, 5],\n * series: [[1, 2, 8, 1, 7]]\n * }, {\n * lineSmooth: Chartist.Interpolation.simple({\n * divisor: 2,\n * fillHoles: false\n * })\n * });\n *\n *\n * @memberof Chartist.Interpolation\n * @param {Object} options The options of the simple interpolation factory function.\n * @return {Function}\n */\n Chartist.Interpolation.simple = function(options) {\n var defaultOptions = {\n divisor: 2,\n fillHoles: false\n };\n options = Chartist.extend({}, defaultOptions, options);\n\n var d = 1 / Math.max(1, options.divisor);\n\n return function simple(pathCoordinates, valueData) {\n var path = new Chartist.Svg.Path();\n var prevX, prevY, prevData;\n\n for(var i = 0; i < pathCoordinates.length; i += 2) {\n var currX = pathCoordinates[i];\n var currY = pathCoordinates[i + 1];\n var length = (currX - prevX) * d;\n var currData = valueData[i / 2];\n\n if(currData.value !== undefined) {\n\n if(prevData === undefined) {\n path.move(currX, currY, false, currData);\n } else {\n path.curve(\n prevX + length,\n prevY,\n currX - length,\n currY,\n currX,\n currY,\n false,\n currData\n );\n }\n\n prevX = currX;\n prevY = currY;\n prevData = currData;\n } else if(!options.fillHoles) {\n prevX = currX = prevData = undefined;\n }\n }\n\n return path;\n };\n };\n\n /**\n * Cardinal / Catmull-Rome spline interpolation is the default smoothing function in Chartist. It produces nice results where the splines will always meet the points. It produces some artifacts though when data values are increased or decreased rapidly. The line may not follow a very accurate path and if the line should be accurate this smoothing function does not produce the best results.\n *\n * Cardinal splines can only be created if there are more than two data points. If this is not the case this smoothing will fallback to `Chartist.Smoothing.none`.\n *\n * All smoothing functions within Chartist are factory functions that accept an options parameter. The cardinal interpolation function accepts one configuration parameter `tension`, between 0 and 1, which controls the smoothing intensity.\n *\n * @example\n * var chart = new Chartist.Line('.ct-chart', {\n * labels: [1, 2, 3, 4, 5],\n * series: [[1, 2, 8, 1, 7]]\n * }, {\n * lineSmooth: Chartist.Interpolation.cardinal({\n * tension: 1,\n * fillHoles: false\n * })\n * });\n *\n * @memberof Chartist.Interpolation\n * @param {Object} options The options of the cardinal factory function.\n * @return {Function}\n */\n Chartist.Interpolation.cardinal = function(options) {\n var defaultOptions = {\n tension: 1,\n fillHoles: false\n };\n\n options = Chartist.extend({}, defaultOptions, options);\n\n var t = Math.min(1, Math.max(0, options.tension)),\n c = 1 - t;\n\n // This function will help us to split pathCoordinates and valueData into segments that also contain pathCoordinates\n // and valueData. This way the existing functions can be reused and the segment paths can be joined afterwards.\n // This functionality is necessary to treat \"holes\" in the line charts\n function splitIntoSegments(pathCoordinates, valueData) {\n var segments = [];\n var hole = true;\n\n for(var i = 0; i < pathCoordinates.length; i += 2) {\n // If this value is a \"hole\" we set the hole flag\n if(valueData[i / 2].value === undefined) {\n if(!options.fillHoles) {\n hole = true;\n }\n } else {\n // If it's a valid value we need to check if we're coming out of a hole and create a new empty segment\n if(hole) {\n segments.push({\n pathCoordinates: [],\n valueData: []\n });\n // As we have a valid value now, we are not in a \"hole\" anymore\n hole = false;\n }\n\n // Add to the segment pathCoordinates and valueData\n segments[segments.length - 1].pathCoordinates.push(pathCoordinates[i], pathCoordinates[i + 1]);\n segments[segments.length - 1].valueData.push(valueData[i / 2]);\n }\n }\n\n return segments;\n }\n\n return function cardinal(pathCoordinates, valueData) {\n // First we try to split the coordinates into segments\n // This is necessary to treat \"holes\" in line charts\n var segments = splitIntoSegments(pathCoordinates, valueData);\n\n // If the split resulted in more that one segment we need to interpolate each segment individually and join them\n // afterwards together into a single path.\n if(segments.length > 1) {\n var paths = [];\n // For each segment we will recurse the cardinal function\n segments.forEach(function(segment) {\n paths.push(cardinal(segment.pathCoordinates, segment.valueData));\n });\n // Join the segment path data into a single path and return\n return Chartist.Svg.Path.join(paths);\n } else {\n // If there was only one segment we can proceed regularly by using pathCoordinates and valueData from the first\n // segment\n pathCoordinates = segments[0].pathCoordinates;\n valueData = segments[0].valueData;\n\n // If less than two points we need to fallback to no smoothing\n if(pathCoordinates.length <= 4) {\n return Chartist.Interpolation.none()(pathCoordinates, valueData);\n }\n\n var path = new Chartist.Svg.Path().move(pathCoordinates[0], pathCoordinates[1], false, valueData[0]),\n z;\n\n for (var i = 0, iLen = pathCoordinates.length; iLen - 2 * !z > i; i += 2) {\n var p = [\n {x: +pathCoordinates[i - 2], y: +pathCoordinates[i - 1]},\n {x: +pathCoordinates[i], y: +pathCoordinates[i + 1]},\n {x: +pathCoordinates[i + 2], y: +pathCoordinates[i + 3]},\n {x: +pathCoordinates[i + 4], y: +pathCoordinates[i + 5]}\n ];\n if (z) {\n if (!i) {\n p[0] = {x: +pathCoordinates[iLen - 2], y: +pathCoordinates[iLen - 1]};\n } else if (iLen - 4 === i) {\n p[3] = {x: +pathCoordinates[0], y: +pathCoordinates[1]};\n } else if (iLen - 2 === i) {\n p[2] = {x: +pathCoordinates[0], y: +pathCoordinates[1]};\n p[3] = {x: +pathCoordinates[2], y: +pathCoordinates[3]};\n }\n } else {\n if (iLen - 4 === i) {\n p[3] = p[2];\n } else if (!i) {\n p[0] = {x: +pathCoordinates[i], y: +pathCoordinates[i + 1]};\n }\n }\n\n path.curve(\n (t * (-p[0].x + 6 * p[1].x + p[2].x) / 6) + (c * p[2].x),\n (t * (-p[0].y + 6 * p[1].y + p[2].y) / 6) + (c * p[2].y),\n (t * (p[1].x + 6 * p[2].x - p[3].x) / 6) + (c * p[2].x),\n (t * (p[1].y + 6 * p[2].y - p[3].y) / 6) + (c * p[2].y),\n p[2].x,\n p[2].y,\n false,\n valueData[(i + 2) / 2]\n );\n }\n\n return path;\n }\n };\n };\n\n /**\n * Step interpolation will cause the line chart to move in steps rather than diagonal or smoothed lines. This interpolation will create additional points that will also be drawn when the `showPoint` option is enabled.\n *\n * All smoothing functions within Chartist are factory functions that accept an options parameter. The step interpolation function accepts one configuration parameter `postpone`, that can be `true` or `false`. The default value is `true` and will cause the step to occur where the value actually changes. If a different behaviour is needed where the step is shifted to the left and happens before the actual value, this option can be set to `false`.\n *\n * @example\n * var chart = new Chartist.Line('.ct-chart', {\n * labels: [1, 2, 3, 4, 5],\n * series: [[1, 2, 8, 1, 7]]\n * }, {\n * lineSmooth: Chartist.Interpolation.step({\n * postpone: true,\n * fillHoles: false\n * })\n * });\n *\n * @memberof Chartist.Interpolation\n * @param options\n * @returns {Function}\n */\n Chartist.Interpolation.step = function(options) {\n var defaultOptions = {\n postpone: true,\n fillHoles: false\n };\n\n options = Chartist.extend({}, defaultOptions, options);\n\n return function step(pathCoordinates, valueData) {\n var path = new Chartist.Svg.Path();\n\n var prevX, prevY, prevData;\n\n for (var i = 0; i < pathCoordinates.length; i += 2) {\n var currX = pathCoordinates[i];\n var currY = pathCoordinates[i + 1];\n var currData = valueData[i / 2];\n\n // If the current point is also not a hole we can draw the step lines\n if(currData.value !== undefined) {\n if(prevData === undefined) {\n path.move(currX, currY, false, currData);\n } else {\n if(options.postpone) {\n // If postponed we should draw the step line with the value of the previous value\n path.line(currX, prevY, false, prevData);\n } else {\n // If not postponed we should draw the step line with the value of the current value\n path.line(prevX, currY, false, currData);\n }\n // Line to the actual point (this should only be a Y-Axis movement\n path.line(currX, currY, false, currData);\n }\n\n prevX = currX;\n prevY = currY;\n prevData = currData;\n } else if(!options.fillHoles) {\n prevX = prevY = prevData = undefined;\n }\n }\n\n return path;\n };\n };\n\n}(window, document, Chartist));\n;/**\n * A very basic event module that helps to generate and catch events.\n *\n * @module Chartist.Event\n */\n/* global Chartist */\n(function (window, document, Chartist) {\n 'use strict';\n\n Chartist.EventEmitter = function () {\n var handlers = [];\n\n /**\n * Add an event handler for a specific event\n *\n * @memberof Chartist.Event\n * @param {String} event The event name\n * @param {Function} handler A event handler function\n */\n function addEventHandler(event, handler) {\n handlers[event] = handlers[event] || [];\n handlers[event].push(handler);\n }\n\n /**\n * Remove an event handler of a specific event name or remove all event handlers for a specific event.\n *\n * @memberof Chartist.Event\n * @param {String} event The event name where a specific or all handlers should be removed\n * @param {Function} [handler] An optional event handler function. If specified only this specific handler will be removed and otherwise all handlers are removed.\n */\n function removeEventHandler(event, handler) {\n // Only do something if there are event handlers with this name existing\n if(handlers[event]) {\n // If handler is set we will look for a specific handler and only remove this\n if(handler) {\n handlers[event].splice(handlers[event].indexOf(handler), 1);\n if(handlers[event].length === 0) {\n delete handlers[event];\n }\n } else {\n // If no handler is specified we remove all handlers for this event\n delete handlers[event];\n }\n }\n }\n\n /**\n * Use this function to emit an event. All handlers that are listening for this event will be triggered with the data parameter.\n *\n * @memberof Chartist.Event\n * @param {String} event The event name that should be triggered\n * @param {*} data Arbitrary data that will be passed to the event handler callback functions\n */\n function emit(event, data) {\n // Only do something if there are event handlers with this name existing\n if(handlers[event]) {\n handlers[event].forEach(function(handler) {\n handler(data);\n });\n }\n\n // Emit event to star event handlers\n if(handlers['*']) {\n handlers['*'].forEach(function(starHandler) {\n starHandler(event, data);\n });\n }\n }\n\n return {\n addEventHandler: addEventHandler,\n removeEventHandler: removeEventHandler,\n emit: emit\n };\n };\n\n}(window, document, Chartist));\n;/**\n * This module provides some basic prototype inheritance utilities.\n *\n * @module Chartist.Class\n */\n/* global Chartist */\n(function(window, document, Chartist) {\n 'use strict';\n\n function listToArray(list) {\n var arr = [];\n if (list.length) {\n for (var i = 0; i < list.length; i++) {\n arr.push(list[i]);\n }\n }\n return arr;\n }\n\n /**\n * Method to extend from current prototype.\n *\n * @memberof Chartist.Class\n * @param {Object} properties The object that serves as definition for the prototype that gets created for the new class. This object should always contain a constructor property that is the desired constructor for the newly created class.\n * @param {Object} [superProtoOverride] By default extens will use the current class prototype or Chartist.class. With this parameter you can specify any super prototype that will be used.\n * @return {Function} Constructor function of the new class\n *\n * @example\n * var Fruit = Class.extend({\n * color: undefined,\n * sugar: undefined,\n *\n * constructor: function(color, sugar) {\n * this.color = color;\n * this.sugar = sugar;\n * },\n *\n * eat: function() {\n * this.sugar = 0;\n * return this;\n * }\n * });\n *\n * var Banana = Fruit.extend({\n * length: undefined,\n *\n * constructor: function(length, sugar) {\n * Banana.super.constructor.call(this, 'Yellow', sugar);\n * this.length = length;\n * }\n * });\n *\n * var banana = new Banana(20, 40);\n * console.log('banana instanceof Fruit', banana instanceof Fruit);\n * console.log('Fruit is prototype of banana', Fruit.prototype.isPrototypeOf(banana));\n * console.log('bananas prototype is Fruit', Object.getPrototypeOf(banana) === Fruit.prototype);\n * console.log(banana.sugar);\n * console.log(banana.eat().sugar);\n * console.log(banana.color);\n */\n function extend(properties, superProtoOverride) {\n var superProto = superProtoOverride || this.prototype || Chartist.Class;\n var proto = Object.create(superProto);\n\n Chartist.Class.cloneDefinitions(proto, properties);\n\n var constr = function() {\n var fn = proto.constructor || function () {},\n instance;\n\n // If this is linked to the Chartist namespace the constructor was not called with new\n // To provide a fallback we will instantiate here and return the instance\n instance = this === Chartist ? Object.create(proto) : this;\n fn.apply(instance, Array.prototype.slice.call(arguments, 0));\n\n // If this constructor was not called with new we need to return the instance\n // This will not harm when the constructor has been called with new as the returned value is ignored\n return instance;\n };\n\n constr.prototype = proto;\n constr.super = superProto;\n constr.extend = this.extend;\n\n return constr;\n }\n\n // Variable argument list clones args > 0 into args[0] and retruns modified args[0]\n function cloneDefinitions() {\n var args = listToArray(arguments);\n var target = args[0];\n\n args.splice(1, args.length - 1).forEach(function (source) {\n Object.getOwnPropertyNames(source).forEach(function (propName) {\n // If this property already exist in target we delete it first\n delete target[propName];\n // Define the property with the descriptor from source\n Object.defineProperty(target, propName,\n Object.getOwnPropertyDescriptor(source, propName));\n });\n });\n\n return target;\n }\n\n Chartist.Class = {\n extend: extend,\n cloneDefinitions: cloneDefinitions\n };\n\n}(window, document, Chartist));\n;/**\n * Base for all chart types. The methods in Chartist.Base are inherited to all chart types.\n *\n * @module Chartist.Base\n */\n/* global Chartist */\n(function(window, document, Chartist) {\n 'use strict';\n\n // TODO: Currently we need to re-draw the chart on window resize. This is usually very bad and will affect performance.\n // This is done because we can't work with relative coordinates when drawing the chart because SVG Path does not\n // work with relative positions yet. We need to check if we can do a viewBox hack to switch to percentage.\n // See http://mozilla.6506.n7.nabble.com/Specyfing-paths-with-percentages-unit-td247474.html\n // Update: can be done using the above method tested here: http://codepen.io/gionkunz/pen/KDvLj\n // The problem is with the label offsets that can't be converted into percentage and affecting the chart container\n /**\n * Updates the chart which currently does a full reconstruction of the SVG DOM\n *\n * @param {Object} [data] Optional data you'd like to set for the chart before it will update. If not specified the update method will use the data that is already configured with the chart.\n * @param {Object} [options] Optional options you'd like to add to the previous options for the chart before it will update. If not specified the update method will use the options that have been already configured with the chart.\n * @param {Boolean} [override] If set to true, the passed options will be used to extend the options that have been configured already. Otherwise the chart default options will be used as the base\n * @memberof Chartist.Base\n */\n function update(data, options, override) {\n if(data) {\n this.data = data;\n // Event for data transformation that allows to manipulate the data before it gets rendered in the charts\n this.eventEmitter.emit('data', {\n type: 'update',\n data: this.data\n });\n }\n\n if(options) {\n this.options = Chartist.extend({}, override ? this.options : this.defaultOptions, options);\n\n // If chartist was not initialized yet, we just set the options and leave the rest to the initialization\n // Otherwise we re-create the optionsProvider at this point\n if(!this.initializeTimeoutId) {\n this.optionsProvider.removeMediaQueryListeners();\n this.optionsProvider = Chartist.optionsProvider(this.options, this.responsiveOptions, this.eventEmitter);\n }\n }\n\n // Only re-created the chart if it has been initialized yet\n if(!this.initializeTimeoutId) {\n this.createChart(this.optionsProvider.getCurrentOptions());\n }\n\n // Return a reference to the chart object to chain up calls\n return this;\n }\n\n /**\n * This method can be called on the API object of each chart and will un-register all event listeners that were added to other components. This currently includes a window.resize listener as well as media query listeners if any responsive options have been provided. Use this function if you need to destroy and recreate Chartist charts dynamically.\n *\n * @memberof Chartist.Base\n */\n function detach() {\n // Only detach if initialization already occurred on this chart. If this chart still hasn't initialized (therefore\n // the initializationTimeoutId is still a valid timeout reference, we will clear the timeout\n if(!this.initializeTimeoutId) {\n window.removeEventListener('resize', this.resizeListener);\n this.optionsProvider.removeMediaQueryListeners();\n } else {\n window.clearTimeout(this.initializeTimeoutId);\n }\n\n return this;\n }\n\n /**\n * Use this function to register event handlers. The handler callbacks are synchronous and will run in the main thread rather than the event loop.\n *\n * @memberof Chartist.Base\n * @param {String} event Name of the event. Check the examples for supported events.\n * @param {Function} handler The handler function that will be called when an event with the given name was emitted. This function will receive a data argument which contains event data. See the example for more details.\n */\n function on(event, handler) {\n this.eventEmitter.addEventHandler(event, handler);\n return this;\n }\n\n /**\n * Use this function to un-register event handlers. If the handler function parameter is omitted all handlers for the given event will be un-registered.\n *\n * @memberof Chartist.Base\n * @param {String} event Name of the event for which a handler should be removed\n * @param {Function} [handler] The handler function that that was previously used to register a new event handler. This handler will be removed from the event handler list. If this parameter is omitted then all event handlers for the given event are removed from the list.\n */\n function off(event, handler) {\n this.eventEmitter.removeEventHandler(event, handler);\n return this;\n }\n\n function initialize() {\n // Add window resize listener that re-creates the chart\n window.addEventListener('resize', this.resizeListener);\n\n // Obtain current options based on matching media queries (if responsive options are given)\n // This will also register a listener that is re-creating the chart based on media changes\n this.optionsProvider = Chartist.optionsProvider(this.options, this.responsiveOptions, this.eventEmitter);\n // Register options change listener that will trigger a chart update\n this.eventEmitter.addEventHandler('optionsChanged', function() {\n this.update();\n }.bind(this));\n\n // Before the first chart creation we need to register us with all plugins that are configured\n // Initialize all relevant plugins with our chart object and the plugin options specified in the config\n if(this.options.plugins) {\n this.options.plugins.forEach(function(plugin) {\n if(plugin instanceof Array) {\n plugin[0](this, plugin[1]);\n } else {\n plugin(this);\n }\n }.bind(this));\n }\n\n // Event for data transformation that allows to manipulate the data before it gets rendered in the charts\n this.eventEmitter.emit('data', {\n type: 'initial',\n data: this.data\n });\n\n // Create the first chart\n this.createChart(this.optionsProvider.getCurrentOptions());\n\n // As chart is initialized from the event loop now we can reset our timeout reference\n // This is important if the chart gets initialized on the same element twice\n this.initializeTimeoutId = undefined;\n }\n\n /**\n * Constructor of chart base class.\n *\n * @param query\n * @param data\n * @param defaultOptions\n * @param options\n * @param responsiveOptions\n * @constructor\n */\n function Base(query, data, defaultOptions, options, responsiveOptions) {\n this.container = Chartist.querySelector(query);\n this.data = data;\n this.defaultOptions = defaultOptions;\n this.options = options;\n this.responsiveOptions = responsiveOptions;\n this.eventEmitter = Chartist.EventEmitter();\n this.supportsForeignObject = Chartist.Svg.isSupported('Extensibility');\n this.supportsAnimations = Chartist.Svg.isSupported('AnimationEventsAttribute');\n this.resizeListener = function resizeListener(){\n this.update();\n }.bind(this);\n\n if(this.container) {\n // If chartist was already initialized in this container we are detaching all event listeners first\n if(this.container.__chartist__) {\n this.container.__chartist__.detach();\n }\n\n this.container.__chartist__ = this;\n }\n\n // Using event loop for first draw to make it possible to register event listeners in the same call stack where\n // the chart was created.\n this.initializeTimeoutId = setTimeout(initialize.bind(this), 0);\n }\n\n // Creating the chart base class\n Chartist.Base = Chartist.Class.extend({\n constructor: Base,\n optionsProvider: undefined,\n container: undefined,\n svg: undefined,\n eventEmitter: undefined,\n createChart: function() {\n throw new Error('Base chart type can\\'t be instantiated!');\n },\n update: update,\n detach: detach,\n on: on,\n off: off,\n version: Chartist.version,\n supportsForeignObject: false\n });\n\n}(window, document, Chartist));\n;/**\n * Chartist SVG module for simple SVG DOM abstraction\n *\n * @module Chartist.Svg\n */\n/* global Chartist */\n(function(window, document, Chartist) {\n 'use strict';\n\n var svgNs = 'http://www.w3.org/2000/svg',\n xmlNs = 'http://www.w3.org/2000/xmlns/',\n xhtmlNs = 'http://www.w3.org/1999/xhtml';\n\n Chartist.xmlNs = {\n qualifiedName: 'xmlns:ct',\n prefix: 'ct',\n uri: 'http://gionkunz.github.com/chartist-js/ct'\n };\n\n /**\n * Chartist.Svg creates a new SVG object wrapper with a starting element. You can use the wrapper to fluently create sub-elements and modify them.\n *\n * @memberof Chartist.Svg\n * @constructor\n * @param {String|Element} name The name of the SVG element to create or an SVG dom element which should be wrapped into Chartist.Svg\n * @param {Object} attributes An object with properties that will be added as attributes to the SVG element that is created. Attributes with undefined values will not be added.\n * @param {String} className This class or class list will be added to the SVG element\n * @param {Object} parent The parent SVG wrapper object where this newly created wrapper and it's element will be attached to as child\n * @param {Boolean} insertFirst If this param is set to true in conjunction with a parent element the newly created element will be added as first child element in the parent element\n */\n function Svg(name, attributes, className, parent, insertFirst) {\n // If Svg is getting called with an SVG element we just return the wrapper\n if(name instanceof Element) {\n this._node = name;\n } else {\n this._node = document.createElementNS(svgNs, name);\n\n // If this is an SVG element created then custom namespace\n if(name === 'svg') {\n this._node.setAttributeNS(xmlNs, Chartist.xmlNs.qualifiedName, Chartist.xmlNs.uri);\n }\n }\n\n if(attributes) {\n this.attr(attributes);\n }\n\n if(className) {\n this.addClass(className);\n }\n\n if(parent) {\n if (insertFirst && parent._node.firstChild) {\n parent._node.insertBefore(this._node, parent._node.firstChild);\n } else {\n parent._node.appendChild(this._node);\n }\n }\n }\n\n /**\n * Set attributes on the current SVG element of the wrapper you're currently working on.\n *\n * @memberof Chartist.Svg\n * @param {Object|String} attributes An object with properties that will be added as attributes to the SVG element that is created. Attributes with undefined values will not be added. If this parameter is a String then the function is used as a getter and will return the attribute value.\n * @param {String} ns If specified, the attributes will be set as namespace attributes with ns as prefix.\n * @return {Object|String} The current wrapper object will be returned so it can be used for chaining or the attribute value if used as getter function.\n */\n function attr(attributes, ns) {\n if(typeof attributes === 'string') {\n if(ns) {\n return this._node.getAttributeNS(ns, attributes);\n } else {\n return this._node.getAttribute(attributes);\n }\n }\n\n Object.keys(attributes).forEach(function(key) {\n // If the attribute value is undefined we can skip this one\n if(attributes[key] === undefined) {\n return;\n }\n\n if(ns) {\n this._node.setAttributeNS(ns, [Chartist.xmlNs.prefix, ':', key].join(''), attributes[key]);\n } else {\n this._node.setAttribute(key, attributes[key]);\n }\n }.bind(this));\n\n return this;\n }\n\n /**\n * Create a new SVG element whose wrapper object will be selected for further operations. This way you can also create nested groups easily.\n *\n * @memberof Chartist.Svg\n * @param {String} name The name of the SVG element that should be created as child element of the currently selected element wrapper\n * @param {Object} [attributes] An object with properties that will be added as attributes to the SVG element that is created. Attributes with undefined values will not be added.\n * @param {String} [className] This class or class list will be added to the SVG element\n * @param {Boolean} [insertFirst] If this param is set to true in conjunction with a parent element the newly created element will be added as first child element in the parent element\n * @return {Chartist.Svg} Returns a Chartist.Svg wrapper object that can be used to modify the containing SVG data\n */\n function elem(name, attributes, className, insertFirst) {\n return new Chartist.Svg(name, attributes, className, this, insertFirst);\n }\n\n /**\n * Returns the parent Chartist.SVG wrapper object\n *\n * @memberof Chartist.Svg\n * @return {Chartist.Svg} Returns a Chartist.Svg wrapper around the parent node of the current node. If the parent node is not existing or it's not an SVG node then this function will return null.\n */\n function parent() {\n return this._node.parentNode instanceof SVGElement ? new Chartist.Svg(this._node.parentNode) : null;\n }\n\n /**\n * This method returns a Chartist.Svg wrapper around the root SVG element of the current tree.\n *\n * @memberof Chartist.Svg\n * @return {Chartist.Svg} The root SVG element wrapped in a Chartist.Svg element\n */\n function root() {\n var node = this._node;\n while(node.nodeName !== 'svg') {\n node = node.parentNode;\n }\n return new Chartist.Svg(node);\n }\n\n /**\n * Find the first child SVG element of the current element that matches a CSS selector. The returned object is a Chartist.Svg wrapper.\n *\n * @memberof Chartist.Svg\n * @param {String} selector A CSS selector that is used to query for child SVG elements\n * @return {Chartist.Svg} The SVG wrapper for the element found or null if no element was found\n */\n function querySelector(selector) {\n var foundNode = this._node.querySelector(selector);\n return foundNode ? new Chartist.Svg(foundNode) : null;\n }\n\n /**\n * Find the all child SVG elements of the current element that match a CSS selector. The returned object is a Chartist.Svg.List wrapper.\n *\n * @memberof Chartist.Svg\n * @param {String} selector A CSS selector that is used to query for child SVG elements\n * @return {Chartist.Svg.List} The SVG wrapper list for the element found or null if no element was found\n */\n function querySelectorAll(selector) {\n var foundNodes = this._node.querySelectorAll(selector);\n return foundNodes.length ? new Chartist.Svg.List(foundNodes) : null;\n }\n\n /**\n * This method creates a foreignObject (see https://developer.mozilla.org/en-US/docs/Web/SVG/Element/foreignObject) that allows to embed HTML content into a SVG graphic. With the help of foreignObjects you can enable the usage of regular HTML elements inside of SVG where they are subject for SVG positioning and transformation but the Browser will use the HTML rendering capabilities for the containing DOM.\n *\n * @memberof Chartist.Svg\n * @param {Node|String} content The DOM Node, or HTML string that will be converted to a DOM Node, that is then placed into and wrapped by the foreignObject\n * @param {String} [attributes] An object with properties that will be added as attributes to the foreignObject element that is created. Attributes with undefined values will not be added.\n * @param {String} [className] This class or class list will be added to the SVG element\n * @param {Boolean} [insertFirst] Specifies if the foreignObject should be inserted as first child\n * @return {Chartist.Svg} New wrapper object that wraps the foreignObject element\n */\n function foreignObject(content, attributes, className, insertFirst) {\n // If content is string then we convert it to DOM\n // TODO: Handle case where content is not a string nor a DOM Node\n if(typeof content === 'string') {\n var container = document.createElement('div');\n container.innerHTML = content;\n content = container.firstChild;\n }\n\n // Adding namespace to content element\n content.setAttribute('xmlns', xhtmlNs);\n\n // Creating the foreignObject without required extension attribute (as described here\n // http://www.w3.org/TR/SVG/extend.html#ForeignObjectElement)\n var fnObj = this.elem('foreignObject', attributes, className, insertFirst);\n\n // Add content to foreignObjectElement\n fnObj._node.appendChild(content);\n\n return fnObj;\n }\n\n /**\n * This method adds a new text element to the current Chartist.Svg wrapper.\n *\n * @memberof Chartist.Svg\n * @param {String} t The text that should be added to the text element that is created\n * @return {Chartist.Svg} The same wrapper object that was used to add the newly created element\n */\n function text(t) {\n this._node.appendChild(document.createTextNode(t));\n return this;\n }\n\n /**\n * This method will clear all child nodes of the current wrapper object.\n *\n * @memberof Chartist.Svg\n * @return {Chartist.Svg} The same wrapper object that got emptied\n */\n function empty() {\n while (this._node.firstChild) {\n this._node.removeChild(this._node.firstChild);\n }\n\n return this;\n }\n\n /**\n * This method will cause the current wrapper to remove itself from its parent wrapper. Use this method if you'd like to get rid of an element in a given DOM structure.\n *\n * @memberof Chartist.Svg\n * @return {Chartist.Svg} The parent wrapper object of the element that got removed\n */\n function remove() {\n this._node.parentNode.removeChild(this._node);\n return this.parent();\n }\n\n /**\n * This method will replace the element with a new element that can be created outside of the current DOM.\n *\n * @memberof Chartist.Svg\n * @param {Chartist.Svg} newElement The new Chartist.Svg object that will be used to replace the current wrapper object\n * @return {Chartist.Svg} The wrapper of the new element\n */\n function replace(newElement) {\n this._node.parentNode.replaceChild(newElement._node, this._node);\n return newElement;\n }\n\n /**\n * This method will append an element to the current element as a child.\n *\n * @memberof Chartist.Svg\n * @param {Chartist.Svg} element The Chartist.Svg element that should be added as a child\n * @param {Boolean} [insertFirst] Specifies if the element should be inserted as first child\n * @return {Chartist.Svg} The wrapper of the appended object\n */\n function append(element, insertFirst) {\n if(insertFirst && this._node.firstChild) {\n this._node.insertBefore(element._node, this._node.firstChild);\n } else {\n this._node.appendChild(element._node);\n }\n\n return this;\n }\n\n /**\n * Returns an array of class names that are attached to the current wrapper element. This method can not be chained further.\n *\n * @memberof Chartist.Svg\n * @return {Array} A list of classes or an empty array if there are no classes on the current element\n */\n function classes() {\n return this._node.getAttribute('class') ? this._node.getAttribute('class').trim().split(/\\s+/) : [];\n }\n\n /**\n * Adds one or a space separated list of classes to the current element and ensures the classes are only existing once.\n *\n * @memberof Chartist.Svg\n * @param {String} names A white space separated list of class names\n * @return {Chartist.Svg} The wrapper of the current element\n */\n function addClass(names) {\n this._node.setAttribute('class',\n this.classes(this._node)\n .concat(names.trim().split(/\\s+/))\n .filter(function(elem, pos, self) {\n return self.indexOf(elem) === pos;\n }).join(' ')\n );\n\n return this;\n }\n\n /**\n * Removes one or a space separated list of classes from the current element.\n *\n * @memberof Chartist.Svg\n * @param {String} names A white space separated list of class names\n * @return {Chartist.Svg} The wrapper of the current element\n */\n function removeClass(names) {\n var removedClasses = names.trim().split(/\\s+/);\n\n this._node.setAttribute('class', this.classes(this._node).filter(function(name) {\n return removedClasses.indexOf(name) === -1;\n }).join(' '));\n\n return this;\n }\n\n /**\n * Removes all classes from the current element.\n *\n * @memberof Chartist.Svg\n * @return {Chartist.Svg} The wrapper of the current element\n */\n function removeAllClasses() {\n this._node.setAttribute('class', '');\n\n return this;\n }\n\n /**\n * \"Save\" way to get property value from svg BoundingBox.\n * This is a workaround. Firefox throws an NS_ERROR_FAILURE error if getBBox() is called on an invisible node.\n * See [NS_ERROR_FAILURE: Component returned failure code: 0x80004005](http://jsfiddle.net/sym3tri/kWWDK/)\n *\n * @memberof Chartist.Svg\n * @param {SVGElement} node The svg node to\n * @param {String} prop The property to fetch (ex.: height, width, ...)\n * @returns {Number} The value of the given bbox property\n */\n function getBBoxProperty(node, prop) {\n try {\n return node.getBBox()[prop];\n } catch(e) {}\n\n return 0;\n }\n\n /**\n * Get element height with fallback to svg BoundingBox or parent container dimensions:\n * See [bugzilla.mozilla.org](https://bugzilla.mozilla.org/show_bug.cgi?id=530985)\n *\n * @memberof Chartist.Svg\n * @return {Number} The elements height in pixels\n */\n function height() {\n return this._node.clientHeight || Math.round(getBBoxProperty(this._node, 'height')) || this._node.parentNode.clientHeight;\n }\n\n /**\n * Get element width with fallback to svg BoundingBox or parent container dimensions:\n * See [bugzilla.mozilla.org](https://bugzilla.mozilla.org/show_bug.cgi?id=530985)\n *\n * @memberof Chartist.Core\n * @return {Number} The elements width in pixels\n */\n function width() {\n return this._node.clientWidth || Math.round(getBBoxProperty(this._node, 'width')) || this._node.parentNode.clientWidth;\n }\n\n /**\n * The animate function lets you animate the current element with SMIL animations. You can add animations for multiple attributes at the same time by using an animation definition object. This object should contain SMIL animation attributes. Please refer to http://www.w3.org/TR/SVG/animate.html for a detailed specification about the available animation attributes. Additionally an easing property can be passed in the animation definition object. This can be a string with a name of an easing function in `Chartist.Svg.Easing` or an array with four numbers specifying a cubic Bézier curve.\n * **An animations object could look like this:**\n * ```javascript\n * element.animate({\n * opacity: {\n * dur: 1000,\n * from: 0,\n * to: 1\n * },\n * x1: {\n * dur: '1000ms',\n * from: 100,\n * to: 200,\n * easing: 'easeOutQuart'\n * },\n * y1: {\n * dur: '2s',\n * from: 0,\n * to: 100\n * }\n * });\n * ```\n * **Automatic unit conversion**\n * For the `dur` and the `begin` animate attribute you can also omit a unit by passing a number. The number will automatically be converted to milli seconds.\n * **Guided mode**\n * The default behavior of SMIL animations with offset using the `begin` attribute is that the attribute will keep it's original value until the animation starts. Mostly this behavior is not desired as you'd like to have your element attributes already initialized with the animation `from` value even before the animation starts. Also if you don't specify `fill=\"freeze\"` on an animate element or if you delete the animation after it's done (which is done in guided mode) the attribute will switch back to the initial value. This behavior is also not desired when performing simple one-time animations. For one-time animations you'd want to trigger animations immediately instead of relative to the document begin time. That's why in guided mode Chartist.Svg will also use the `begin` property to schedule a timeout and manually start the animation after the timeout. If you're using multiple SMIL definition objects for an attribute (in an array), guided mode will be disabled for this attribute, even if you explicitly enabled it.\n * If guided mode is enabled the following behavior is added:\n * - Before the animation starts (even when delayed with `begin`) the animated attribute will be set already to the `from` value of the animation\n * - `begin` is explicitly set to `indefinite` so it can be started manually without relying on document begin time (creation)\n * - The animate element will be forced to use `fill=\"freeze\"`\n * - The animation will be triggered with `beginElement()` in a timeout where `begin` of the definition object is interpreted in milli seconds. If no `begin` was specified the timeout is triggered immediately.\n * - After the animation the element attribute value will be set to the `to` value of the animation\n * - The animate element is deleted from the DOM\n *\n * @memberof Chartist.Svg\n * @param {Object} animations An animations object where the property keys are the attributes you'd like to animate. The properties should be objects again that contain the SMIL animation attributes (usually begin, dur, from, and to). The property begin and dur is auto converted (see Automatic unit conversion). You can also schedule multiple animations for the same attribute by passing an Array of SMIL definition objects. Attributes that contain an array of SMIL definition objects will not be executed in guided mode.\n * @param {Boolean} guided Specify if guided mode should be activated for this animation (see Guided mode). If not otherwise specified, guided mode will be activated.\n * @param {Object} eventEmitter If specified, this event emitter will be notified when an animation starts or ends.\n * @return {Chartist.Svg} The current element where the animation was added\n */\n function animate(animations, guided, eventEmitter) {\n if(guided === undefined) {\n guided = true;\n }\n\n Object.keys(animations).forEach(function createAnimateForAttributes(attribute) {\n\n function createAnimate(animationDefinition, guided) {\n var attributeProperties = {},\n animate,\n timeout,\n easing;\n\n // Check if an easing is specified in the definition object and delete it from the object as it will not\n // be part of the animate element attributes.\n if(animationDefinition.easing) {\n // If already an easing Bézier curve array we take it or we lookup a easing array in the Easing object\n easing = animationDefinition.easing instanceof Array ?\n animationDefinition.easing :\n Chartist.Svg.Easing[animationDefinition.easing];\n delete animationDefinition.easing;\n }\n\n // If numeric dur or begin was provided we assume milli seconds\n animationDefinition.begin = Chartist.ensureUnit(animationDefinition.begin, 'ms');\n animationDefinition.dur = Chartist.ensureUnit(animationDefinition.dur, 'ms');\n\n if(easing) {\n animationDefinition.calcMode = 'spline';\n animationDefinition.keySplines = easing.join(' ');\n animationDefinition.keyTimes = '0;1';\n }\n\n // Adding \"fill: freeze\" if we are in guided mode and set initial attribute values\n if(guided) {\n animationDefinition.fill = 'freeze';\n // Animated property on our element should already be set to the animation from value in guided mode\n attributeProperties[attribute] = animationDefinition.from;\n this.attr(attributeProperties);\n\n // In guided mode we also set begin to indefinite so we can trigger the start manually and put the begin\n // which needs to be in ms aside\n timeout = Chartist.quantity(animationDefinition.begin || 0).value;\n animationDefinition.begin = 'indefinite';\n }\n\n animate = this.elem('animate', Chartist.extend({\n attributeName: attribute\n }, animationDefinition));\n\n if(guided) {\n // If guided we take the value that was put aside in timeout and trigger the animation manually with a timeout\n setTimeout(function() {\n // If beginElement fails we set the animated attribute to the end position and remove the animate element\n // This happens if the SMIL ElementTimeControl interface is not supported or any other problems occured in\n // the browser. (Currently FF 34 does not support animate elements in foreignObjects)\n try {\n animate._node.beginElement();\n } catch(err) {\n // Set animated attribute to current animated value\n attributeProperties[attribute] = animationDefinition.to;\n this.attr(attributeProperties);\n // Remove the animate element as it's no longer required\n animate.remove();\n }\n }.bind(this), timeout);\n }\n\n if(eventEmitter) {\n animate._node.addEventListener('beginEvent', function handleBeginEvent() {\n eventEmitter.emit('animationBegin', {\n element: this,\n animate: animate._node,\n params: animationDefinition\n });\n }.bind(this));\n }\n\n animate._node.addEventListener('endEvent', function handleEndEvent() {\n if(eventEmitter) {\n eventEmitter.emit('animationEnd', {\n element: this,\n animate: animate._node,\n params: animationDefinition\n });\n }\n\n if(guided) {\n // Set animated attribute to current animated value\n attributeProperties[attribute] = animationDefinition.to;\n this.attr(attributeProperties);\n // Remove the animate element as it's no longer required\n animate.remove();\n }\n }.bind(this));\n }\n\n // If current attribute is an array of definition objects we create an animate for each and disable guided mode\n if(animations[attribute] instanceof Array) {\n animations[attribute].forEach(function(animationDefinition) {\n createAnimate.bind(this)(animationDefinition, false);\n }.bind(this));\n } else {\n createAnimate.bind(this)(animations[attribute], guided);\n }\n\n }.bind(this));\n\n return this;\n }\n\n Chartist.Svg = Chartist.Class.extend({\n constructor: Svg,\n attr: attr,\n elem: elem,\n parent: parent,\n root: root,\n querySelector: querySelector,\n querySelectorAll: querySelectorAll,\n foreignObject: foreignObject,\n text: text,\n empty: empty,\n remove: remove,\n replace: replace,\n append: append,\n classes: classes,\n addClass: addClass,\n removeClass: removeClass,\n removeAllClasses: removeAllClasses,\n height: height,\n width: width,\n animate: animate\n });\n\n /**\n * This method checks for support of a given SVG feature like Extensibility, SVG-animation or the like. Check http://www.w3.org/TR/SVG11/feature for a detailed list.\n *\n * @memberof Chartist.Svg\n * @param {String} feature The SVG 1.1 feature that should be checked for support.\n * @return {Boolean} True of false if the feature is supported or not\n */\n Chartist.Svg.isSupported = function(feature) {\n return document.implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#' + feature, '1.1');\n };\n\n /**\n * This Object contains some standard easing cubic bezier curves. Then can be used with their name in the `Chartist.Svg.animate`. You can also extend the list and use your own name in the `animate` function. Click the show code button to see the available bezier functions.\n *\n * @memberof Chartist.Svg\n */\n var easingCubicBeziers = {\n easeInSine: [0.47, 0, 0.745, 0.715],\n easeOutSine: [0.39, 0.575, 0.565, 1],\n easeInOutSine: [0.445, 0.05, 0.55, 0.95],\n easeInQuad: [0.55, 0.085, 0.68, 0.53],\n easeOutQuad: [0.25, 0.46, 0.45, 0.94],\n easeInOutQuad: [0.455, 0.03, 0.515, 0.955],\n easeInCubic: [0.55, 0.055, 0.675, 0.19],\n easeOutCubic: [0.215, 0.61, 0.355, 1],\n easeInOutCubic: [0.645, 0.045, 0.355, 1],\n easeInQuart: [0.895, 0.03, 0.685, 0.22],\n easeOutQuart: [0.165, 0.84, 0.44, 1],\n easeInOutQuart: [0.77, 0, 0.175, 1],\n easeInQuint: [0.755, 0.05, 0.855, 0.06],\n easeOutQuint: [0.23, 1, 0.32, 1],\n easeInOutQuint: [0.86, 0, 0.07, 1],\n easeInExpo: [0.95, 0.05, 0.795, 0.035],\n easeOutExpo: [0.19, 1, 0.22, 1],\n easeInOutExpo: [1, 0, 0, 1],\n easeInCirc: [0.6, 0.04, 0.98, 0.335],\n easeOutCirc: [0.075, 0.82, 0.165, 1],\n easeInOutCirc: [0.785, 0.135, 0.15, 0.86],\n easeInBack: [0.6, -0.28, 0.735, 0.045],\n easeOutBack: [0.175, 0.885, 0.32, 1.275],\n easeInOutBack: [0.68, -0.55, 0.265, 1.55]\n };\n\n Chartist.Svg.Easing = easingCubicBeziers;\n\n /**\n * This helper class is to wrap multiple `Chartist.Svg` elements into a list where you can call the `Chartist.Svg` functions on all elements in the list with one call. This is helpful when you'd like to perform calls with `Chartist.Svg` on multiple elements.\n * An instance of this class is also returned by `Chartist.Svg.querySelectorAll`.\n *\n * @memberof Chartist.Svg\n * @param {Array
|NodeList} nodeList An Array of SVG DOM nodes or a SVG DOM NodeList (as returned by document.querySelectorAll)\n * @constructor\n */\n function SvgList(nodeList) {\n var list = this;\n\n this.svgElements = [];\n for(var i = 0; i < nodeList.length; i++) {\n this.svgElements.push(new Chartist.Svg(nodeList[i]));\n }\n\n // Add delegation methods for Chartist.Svg\n Object.keys(Chartist.Svg.prototype).filter(function(prototypeProperty) {\n return ['constructor',\n 'parent',\n 'querySelector',\n 'querySelectorAll',\n 'replace',\n 'append',\n 'classes',\n 'height',\n 'width'].indexOf(prototypeProperty) === -1;\n }).forEach(function(prototypeProperty) {\n list[prototypeProperty] = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n list.svgElements.forEach(function(element) {\n Chartist.Svg.prototype[prototypeProperty].apply(element, args);\n });\n return list;\n };\n });\n }\n\n Chartist.Svg.List = Chartist.Class.extend({\n constructor: SvgList\n });\n}(window, document, Chartist));\n;/**\n * Chartist SVG path module for SVG path description creation and modification.\n *\n * @module Chartist.Svg.Path\n */\n/* global Chartist */\n(function(window, document, Chartist) {\n 'use strict';\n\n /**\n * Contains the descriptors of supported element types in a SVG path. Currently only move, line and curve are supported.\n *\n * @memberof Chartist.Svg.Path\n * @type {Object}\n */\n var elementDescriptions = {\n m: ['x', 'y'],\n l: ['x', 'y'],\n c: ['x1', 'y1', 'x2', 'y2', 'x', 'y'],\n a: ['rx', 'ry', 'xAr', 'lAf', 'sf', 'x', 'y']\n };\n\n /**\n * Default options for newly created SVG path objects.\n *\n * @memberof Chartist.Svg.Path\n * @type {Object}\n */\n var defaultOptions = {\n // The accuracy in digit count after the decimal point. This will be used to round numbers in the SVG path. If this option is set to false then no rounding will be performed.\n accuracy: 3\n };\n\n function element(command, params, pathElements, pos, relative, data) {\n var pathElement = Chartist.extend({\n command: relative ? command.toLowerCase() : command.toUpperCase()\n }, params, data ? { data: data } : {} );\n\n pathElements.splice(pos, 0, pathElement);\n }\n\n function forEachParam(pathElements, cb) {\n pathElements.forEach(function(pathElement, pathElementIndex) {\n elementDescriptions[pathElement.command.toLowerCase()].forEach(function(paramName, paramIndex) {\n cb(pathElement, paramName, pathElementIndex, paramIndex, pathElements);\n });\n });\n }\n\n /**\n * Used to construct a new path object.\n *\n * @memberof Chartist.Svg.Path\n * @param {Boolean} close If set to true then this path will be closed when stringified (with a Z at the end)\n * @param {Object} options Options object that overrides the default objects. See default options for more details.\n * @constructor\n */\n function SvgPath(close, options) {\n this.pathElements = [];\n this.pos = 0;\n this.close = close;\n this.options = Chartist.extend({}, defaultOptions, options);\n }\n\n /**\n * Gets or sets the current position (cursor) inside of the path. You can move around the cursor freely but limited to 0 or the count of existing elements. All modifications with element functions will insert new elements at the position of this cursor.\n *\n * @memberof Chartist.Svg.Path\n * @param {Number} [pos] If a number is passed then the cursor is set to this position in the path element array.\n * @return {Chartist.Svg.Path|Number} If the position parameter was passed then the return value will be the path object for easy call chaining. If no position parameter was passed then the current position is returned.\n */\n function position(pos) {\n if(pos !== undefined) {\n this.pos = Math.max(0, Math.min(this.pathElements.length, pos));\n return this;\n } else {\n return this.pos;\n }\n }\n\n /**\n * Removes elements from the path starting at the current position.\n *\n * @memberof Chartist.Svg.Path\n * @param {Number} count Number of path elements that should be removed from the current position.\n * @return {Chartist.Svg.Path} The current path object for easy call chaining.\n */\n function remove(count) {\n this.pathElements.splice(this.pos, count);\n return this;\n }\n\n /**\n * Use this function to add a new move SVG path element.\n *\n * @memberof Chartist.Svg.Path\n * @param {Number} x The x coordinate for the move element.\n * @param {Number} y The y coordinate for the move element.\n * @param {Boolean} [relative] If set to true the move element will be created with relative coordinates (lowercase letter)\n * @param {*} [data] Any data that should be stored with the element object that will be accessible in pathElement\n * @return {Chartist.Svg.Path} The current path object for easy call chaining.\n */\n function move(x, y, relative, data) {\n element('M', {\n x: +x,\n y: +y\n }, this.pathElements, this.pos++, relative, data);\n return this;\n }\n\n /**\n * Use this function to add a new line SVG path element.\n *\n * @memberof Chartist.Svg.Path\n * @param {Number} x The x coordinate for the line element.\n * @param {Number} y The y coordinate for the line element.\n * @param {Boolean} [relative] If set to true the line element will be created with relative coordinates (lowercase letter)\n * @param {*} [data] Any data that should be stored with the element object that will be accessible in pathElement\n * @return {Chartist.Svg.Path} The current path object for easy call chaining.\n */\n function line(x, y, relative, data) {\n element('L', {\n x: +x,\n y: +y\n }, this.pathElements, this.pos++, relative, data);\n return this;\n }\n\n /**\n * Use this function to add a new curve SVG path element.\n *\n * @memberof Chartist.Svg.Path\n * @param {Number} x1 The x coordinate for the first control point of the bezier curve.\n * @param {Number} y1 The y coordinate for the first control point of the bezier curve.\n * @param {Number} x2 The x coordinate for the second control point of the bezier curve.\n * @param {Number} y2 The y coordinate for the second control point of the bezier curve.\n * @param {Number} x The x coordinate for the target point of the curve element.\n * @param {Number} y The y coordinate for the target point of the curve element.\n * @param {Boolean} [relative] If set to true the curve element will be created with relative coordinates (lowercase letter)\n * @param {*} [data] Any data that should be stored with the element object that will be accessible in pathElement\n * @return {Chartist.Svg.Path} The current path object for easy call chaining.\n */\n function curve(x1, y1, x2, y2, x, y, relative, data) {\n element('C', {\n x1: +x1,\n y1: +y1,\n x2: +x2,\n y2: +y2,\n x: +x,\n y: +y\n }, this.pathElements, this.pos++, relative, data);\n return this;\n }\n\n /**\n * Use this function to add a new non-bezier curve SVG path element.\n *\n * @memberof Chartist.Svg.Path\n * @param {Number} rx The radius to be used for the x-axis of the arc.\n * @param {Number} ry The radius to be used for the y-axis of the arc.\n * @param {Number} xAr Defines the orientation of the arc\n * @param {Number} lAf Large arc flag\n * @param {Number} sf Sweep flag\n * @param {Number} x The x coordinate for the target point of the curve element.\n * @param {Number} y The y coordinate for the target point of the curve element.\n * @param {Boolean} [relative] If set to true the curve element will be created with relative coordinates (lowercase letter)\n * @param {*} [data] Any data that should be stored with the element object that will be accessible in pathElement\n * @return {Chartist.Svg.Path} The current path object for easy call chaining.\n */\n function arc(rx, ry, xAr, lAf, sf, x, y, relative, data) {\n element('A', {\n rx: +rx,\n ry: +ry,\n xAr: +xAr,\n lAf: +lAf,\n sf: +sf,\n x: +x,\n y: +y\n }, this.pathElements, this.pos++, relative, data);\n return this;\n }\n\n /**\n * Parses an SVG path seen in the d attribute of path elements, and inserts the parsed elements into the existing path object at the current cursor position. Any closing path indicators (Z at the end of the path) will be ignored by the parser as this is provided by the close option in the options of the path object.\n *\n * @memberof Chartist.Svg.Path\n * @param {String} path Any SVG path that contains move (m), line (l) or curve (c) components.\n * @return {Chartist.Svg.Path} The current path object for easy call chaining.\n */\n function parse(path) {\n // Parsing the SVG path string into an array of arrays [['M', '10', '10'], ['L', '100', '100']]\n var chunks = path.replace(/([A-Za-z])([0-9])/g, '$1 $2')\n .replace(/([0-9])([A-Za-z])/g, '$1 $2')\n .split(/[\\s,]+/)\n .reduce(function(result, element) {\n if(element.match(/[A-Za-z]/)) {\n result.push([]);\n }\n\n result[result.length - 1].push(element);\n return result;\n }, []);\n\n // If this is a closed path we remove the Z at the end because this is determined by the close option\n if(chunks[chunks.length - 1][0].toUpperCase() === 'Z') {\n chunks.pop();\n }\n\n // Using svgPathElementDescriptions to map raw path arrays into objects that contain the command and the parameters\n // For example {command: 'M', x: '10', y: '10'}\n var elements = chunks.map(function(chunk) {\n var command = chunk.shift(),\n description = elementDescriptions[command.toLowerCase()];\n\n return Chartist.extend({\n command: command\n }, description.reduce(function(result, paramName, index) {\n result[paramName] = +chunk[index];\n return result;\n }, {}));\n });\n\n // Preparing a splice call with the elements array as var arg params and insert the parsed elements at the current position\n var spliceArgs = [this.pos, 0];\n Array.prototype.push.apply(spliceArgs, elements);\n Array.prototype.splice.apply(this.pathElements, spliceArgs);\n // Increase the internal position by the element count\n this.pos += elements.length;\n\n return this;\n }\n\n /**\n * This function renders to current SVG path object into a final SVG string that can be used in the d attribute of SVG path elements. It uses the accuracy option to round big decimals. If the close parameter was set in the constructor of this path object then a path closing Z will be appended to the output string.\n *\n * @memberof Chartist.Svg.Path\n * @return {String}\n */\n function stringify() {\n var accuracyMultiplier = Math.pow(10, this.options.accuracy);\n\n return this.pathElements.reduce(function(path, pathElement) {\n var params = elementDescriptions[pathElement.command.toLowerCase()].map(function(paramName) {\n return this.options.accuracy ?\n (Math.round(pathElement[paramName] * accuracyMultiplier) / accuracyMultiplier) :\n pathElement[paramName];\n }.bind(this));\n\n return path + pathElement.command + params.join(',');\n }.bind(this), '') + (this.close ? 'Z' : '');\n }\n\n /**\n * Scales all elements in the current SVG path object. There is an individual parameter for each coordinate. Scaling will also be done for control points of curves, affecting the given coordinate.\n *\n * @memberof Chartist.Svg.Path\n * @param {Number} x The number which will be used to scale the x, x1 and x2 of all path elements.\n * @param {Number} y The number which will be used to scale the y, y1 and y2 of all path elements.\n * @return {Chartist.Svg.Path} The current path object for easy call chaining.\n */\n function scale(x, y) {\n forEachParam(this.pathElements, function(pathElement, paramName) {\n pathElement[paramName] *= paramName[0] === 'x' ? x : y;\n });\n return this;\n }\n\n /**\n * Translates all elements in the current SVG path object. The translation is relative and there is an individual parameter for each coordinate. Translation will also be done for control points of curves, affecting the given coordinate.\n *\n * @memberof Chartist.Svg.Path\n * @param {Number} x The number which will be used to translate the x, x1 and x2 of all path elements.\n * @param {Number} y The number which will be used to translate the y, y1 and y2 of all path elements.\n * @return {Chartist.Svg.Path} The current path object for easy call chaining.\n */\n function translate(x, y) {\n forEachParam(this.pathElements, function(pathElement, paramName) {\n pathElement[paramName] += paramName[0] === 'x' ? x : y;\n });\n return this;\n }\n\n /**\n * This function will run over all existing path elements and then loop over their attributes. The callback function will be called for every path element attribute that exists in the current path.\n * The method signature of the callback function looks like this:\n * ```javascript\n * function(pathElement, paramName, pathElementIndex, paramIndex, pathElements)\n * ```\n * If something else than undefined is returned by the callback function, this value will be used to replace the old value. This allows you to build custom transformations of path objects that can't be achieved using the basic transformation functions scale and translate.\n *\n * @memberof Chartist.Svg.Path\n * @param {Function} transformFnc The callback function for the transformation. Check the signature in the function description.\n * @return {Chartist.Svg.Path} The current path object for easy call chaining.\n */\n function transform(transformFnc) {\n forEachParam(this.pathElements, function(pathElement, paramName, pathElementIndex, paramIndex, pathElements) {\n var transformed = transformFnc(pathElement, paramName, pathElementIndex, paramIndex, pathElements);\n if(transformed || transformed === 0) {\n pathElement[paramName] = transformed;\n }\n });\n return this;\n }\n\n /**\n * This function clones a whole path object with all its properties. This is a deep clone and path element objects will also be cloned.\n *\n * @memberof Chartist.Svg.Path\n * @param {Boolean} [close] Optional option to set the new cloned path to closed. If not specified or false, the original path close option will be used.\n * @return {Chartist.Svg.Path}\n */\n function clone(close) {\n var c = new Chartist.Svg.Path(close || this.close);\n c.pos = this.pos;\n c.pathElements = this.pathElements.slice().map(function cloneElements(pathElement) {\n return Chartist.extend({}, pathElement);\n });\n c.options = Chartist.extend({}, this.options);\n return c;\n }\n\n /**\n * Split a Svg.Path object by a specific command in the path chain. The path chain will be split and an array of newly created paths objects will be returned. This is useful if you'd like to split an SVG path by it's move commands, for example, in order to isolate chunks of drawings.\n *\n * @memberof Chartist.Svg.Path\n * @param {String} command The command you'd like to use to split the path\n * @return {Array}\n */\n function splitByCommand(command) {\n var split = [\n new Chartist.Svg.Path()\n ];\n\n this.pathElements.forEach(function(pathElement) {\n if(pathElement.command === command.toUpperCase() && split[split.length - 1].pathElements.length !== 0) {\n split.push(new Chartist.Svg.Path());\n }\n\n split[split.length - 1].pathElements.push(pathElement);\n });\n\n return split;\n }\n\n /**\n * This static function on `Chartist.Svg.Path` is joining multiple paths together into one paths.\n *\n * @memberof Chartist.Svg.Path\n * @param {Array} paths A list of paths to be joined together. The order is important.\n * @param {boolean} close If the newly created path should be a closed path\n * @param {Object} options Path options for the newly created path.\n * @return {Chartist.Svg.Path}\n */\n\n function join(paths, close, options) {\n var joinedPath = new Chartist.Svg.Path(close, options);\n for(var i = 0; i < paths.length; i++) {\n var path = paths[i];\n for(var j = 0; j < path.pathElements.length; j++) {\n joinedPath.pathElements.push(path.pathElements[j]);\n }\n }\n return joinedPath;\n }\n\n Chartist.Svg.Path = Chartist.Class.extend({\n constructor: SvgPath,\n position: position,\n remove: remove,\n move: move,\n line: line,\n curve: curve,\n arc: arc,\n scale: scale,\n translate: translate,\n transform: transform,\n parse: parse,\n stringify: stringify,\n clone: clone,\n splitByCommand: splitByCommand\n });\n\n Chartist.Svg.Path.elementDescriptions = elementDescriptions;\n Chartist.Svg.Path.join = join;\n}(window, document, Chartist));\n;/* global Chartist */\n(function (window, document, Chartist) {\n 'use strict';\n\n var axisUnits = {\n x: {\n pos: 'x',\n len: 'width',\n dir: 'horizontal',\n rectStart: 'x1',\n rectEnd: 'x2',\n rectOffset: 'y2'\n },\n y: {\n pos: 'y',\n len: 'height',\n dir: 'vertical',\n rectStart: 'y2',\n rectEnd: 'y1',\n rectOffset: 'x1'\n }\n };\n\n function Axis(units, chartRect, ticks, options) {\n this.units = units;\n this.counterUnits = units === axisUnits.x ? axisUnits.y : axisUnits.x;\n this.chartRect = chartRect;\n this.axisLength = chartRect[units.rectEnd] - chartRect[units.rectStart];\n this.gridOffset = chartRect[units.rectOffset];\n this.ticks = ticks;\n this.options = options;\n }\n\n function createGridAndLabels(gridGroup, labelGroup, useForeignObject, chartOptions, eventEmitter) {\n var axisOptions = chartOptions['axis' + this.units.pos.toUpperCase()];\n var projectedValues = this.ticks.map(this.projectValue.bind(this));\n var labelValues = this.ticks.map(axisOptions.labelInterpolationFnc);\n\n projectedValues.forEach(function(projectedValue, index) {\n var labelOffset = {\n x: 0,\n y: 0\n };\n\n // TODO: Find better solution for solving this problem\n // Calculate how much space we have available for the label\n var labelLength;\n if(projectedValues[index + 1]) {\n // If we still have one label ahead, we can calculate the distance to the next tick / label\n labelLength = projectedValues[index + 1] - projectedValue;\n } else {\n // If we don't have a label ahead and we have only two labels in total, we just take the remaining distance to\n // on the whole axis length. We limit that to a minimum of 30 pixel, so that labels close to the border will\n // still be visible inside of the chart padding.\n labelLength = Math.max(this.axisLength - projectedValue, 30);\n }\n\n // Skip grid lines and labels where interpolated label values are falsey (execpt for 0)\n if(!labelValues[index] && labelValues[index] !== 0) {\n return;\n }\n\n // Transform to global coordinates using the chartRect\n // We also need to set the label offset for the createLabel function\n if(this.units.pos === 'x') {\n projectedValue = this.chartRect.x1 + projectedValue;\n labelOffset.x = chartOptions.axisX.labelOffset.x;\n\n // If the labels should be positioned in start position (top side for vertical axis) we need to set a\n // different offset as for positioned with end (bottom)\n if(chartOptions.axisX.position === 'start') {\n labelOffset.y = this.chartRect.padding.top + chartOptions.axisX.labelOffset.y + (useForeignObject ? 5 : 20);\n } else {\n labelOffset.y = this.chartRect.y1 + chartOptions.axisX.labelOffset.y + (useForeignObject ? 5 : 20);\n }\n } else {\n projectedValue = this.chartRect.y1 - projectedValue;\n labelOffset.y = chartOptions.axisY.labelOffset.y - (useForeignObject ? labelLength : 0);\n\n // If the labels should be positioned in start position (left side for horizontal axis) we need to set a\n // different offset as for positioned with end (right side)\n if(chartOptions.axisY.position === 'start') {\n labelOffset.x = useForeignObject ? this.chartRect.padding.left + chartOptions.axisY.labelOffset.x : this.chartRect.x1 - 10;\n } else {\n labelOffset.x = this.chartRect.x2 + chartOptions.axisY.labelOffset.x + 10;\n }\n }\n\n if(axisOptions.showGrid) {\n Chartist.createGrid(projectedValue, index, this, this.gridOffset, this.chartRect[this.counterUnits.len](), gridGroup, [\n chartOptions.classNames.grid,\n chartOptions.classNames[this.units.dir]\n ], eventEmitter);\n }\n\n if(axisOptions.showLabel) {\n Chartist.createLabel(projectedValue, labelLength, index, labelValues, this, axisOptions.offset, labelOffset, labelGroup, [\n chartOptions.classNames.label,\n chartOptions.classNames[this.units.dir],\n chartOptions.classNames[axisOptions.position]\n ], useForeignObject, eventEmitter);\n }\n }.bind(this));\n }\n\n Chartist.Axis = Chartist.Class.extend({\n constructor: Axis,\n createGridAndLabels: createGridAndLabels,\n projectValue: function(value, index, data) {\n throw new Error('Base axis can\\'t be instantiated!');\n }\n });\n\n Chartist.Axis.units = axisUnits;\n\n}(window, document, Chartist));\n;/**\n * The auto scale axis uses standard linear scale projection of values along an axis. It uses order of magnitude to find a scale automatically and evaluates the available space in order to find the perfect amount of ticks for your chart.\n * **Options**\n * The following options are used by this axis in addition to the default axis options outlined in the axis configuration of the chart default settings.\n * ```javascript\n * var options = {\n * // If high is specified then the axis will display values explicitly up to this value and the computed maximum from the data is ignored\n * high: 100,\n * // If low is specified then the axis will display values explicitly down to this value and the computed minimum from the data is ignored\n * low: 0,\n * // This option will be used when finding the right scale division settings. The amount of ticks on the scale will be determined so that as many ticks as possible will be displayed, while not violating this minimum required space (in pixel).\n * scaleMinSpace: 20,\n * // Can be set to true or false. If set to true, the scale will be generated with whole numbers only.\n * onlyInteger: true,\n * // The reference value can be used to make sure that this value will always be on the chart. This is especially useful on bipolar charts where the bipolar center always needs to be part of the chart.\n * referenceValue: 5\n * };\n * ```\n *\n * @module Chartist.AutoScaleAxis\n */\n/* global Chartist */\n(function (window, document, Chartist) {\n 'use strict';\n\n function AutoScaleAxis(axisUnit, data, chartRect, options) {\n // Usually we calculate highLow based on the data but this can be overriden by a highLow object in the options\n var highLow = options.highLow || Chartist.getHighLow(data.normalized, options, axisUnit.pos);\n this.bounds = Chartist.getBounds(chartRect[axisUnit.rectEnd] - chartRect[axisUnit.rectStart], highLow, options.scaleMinSpace || 20, options.onlyInteger);\n this.range = {\n min: this.bounds.min,\n max: this.bounds.max\n };\n\n Chartist.AutoScaleAxis.super.constructor.call(this,\n axisUnit,\n chartRect,\n this.bounds.values,\n options);\n }\n\n function projectValue(value) {\n return this.axisLength * (+Chartist.getMultiValue(value, this.units.pos) - this.bounds.min) / this.bounds.range;\n }\n\n Chartist.AutoScaleAxis = Chartist.Axis.extend({\n constructor: AutoScaleAxis,\n projectValue: projectValue\n });\n\n}(window, document, Chartist));\n;/**\n * The fixed scale axis uses standard linear projection of values along an axis. It makes use of a divisor option to divide the range provided from the minimum and maximum value or the options high and low that will override the computed minimum and maximum.\n * **Options**\n * The following options are used by this axis in addition to the default axis options outlined in the axis configuration of the chart default settings.\n * ```javascript\n * var options = {\n * // If high is specified then the axis will display values explicitly up to this value and the computed maximum from the data is ignored\n * high: 100,\n * // If low is specified then the axis will display values explicitly down to this value and the computed minimum from the data is ignored\n * low: 0,\n * // If specified then the value range determined from minimum to maximum (or low and high) will be divided by this number and ticks will be generated at those division points. The default divisor is 1.\n * divisor: 4,\n * // If ticks is explicitly set, then the axis will not compute the ticks with the divisor, but directly use the data in ticks to determine at what points on the axis a tick need to be generated.\n * ticks: [1, 10, 20, 30]\n * };\n * ```\n *\n * @module Chartist.FixedScaleAxis\n */\n/* global Chartist */\n(function (window, document, Chartist) {\n 'use strict';\n\n function FixedScaleAxis(axisUnit, data, chartRect, options) {\n var highLow = options.highLow || Chartist.getHighLow(data.normalized, options, axisUnit.pos);\n this.divisor = options.divisor || 1;\n this.ticks = options.ticks || Chartist.times(this.divisor).map(function(value, index) {\n return highLow.low + (highLow.high - highLow.low) / this.divisor * index;\n }.bind(this));\n this.ticks.sort(function(a, b) {\n return a - b;\n });\n this.range = {\n min: highLow.low,\n max: highLow.high\n };\n\n Chartist.FixedScaleAxis.super.constructor.call(this,\n axisUnit,\n chartRect,\n this.ticks,\n options);\n\n this.stepLength = this.axisLength / this.divisor;\n }\n\n function projectValue(value) {\n return this.axisLength * (+Chartist.getMultiValue(value, this.units.pos) - this.range.min) / (this.range.max - this.range.min);\n }\n\n Chartist.FixedScaleAxis = Chartist.Axis.extend({\n constructor: FixedScaleAxis,\n projectValue: projectValue\n });\n\n}(window, document, Chartist));\n;/**\n * The step axis for step based charts like bar chart or step based line charts. It uses a fixed amount of ticks that will be equally distributed across the whole axis length. The projection is done using the index of the data value rather than the value itself and therefore it's only useful for distribution purpose.\n * **Options**\n * The following options are used by this axis in addition to the default axis options outlined in the axis configuration of the chart default settings.\n * ```javascript\n * var options = {\n * // Ticks to be used to distribute across the axis length. As this axis type relies on the index of the value rather than the value, arbitrary data that can be converted to a string can be used as ticks.\n * ticks: ['One', 'Two', 'Three'],\n * // If set to true the full width will be used to distribute the values where the last value will be at the maximum of the axis length. If false the spaces between the ticks will be evenly distributed instead.\n * stretch: true\n * };\n * ```\n *\n * @module Chartist.StepAxis\n */\n/* global Chartist */\n(function (window, document, Chartist) {\n 'use strict';\n\n function StepAxis(axisUnit, data, chartRect, options) {\n Chartist.StepAxis.super.constructor.call(this,\n axisUnit,\n chartRect,\n options.ticks,\n options);\n\n this.stepLength = this.axisLength / (options.ticks.length - (options.stretch ? 1 : 0));\n }\n\n function projectValue(value, index) {\n return this.stepLength * index;\n }\n\n Chartist.StepAxis = Chartist.Axis.extend({\n constructor: StepAxis,\n projectValue: projectValue\n });\n\n}(window, document, Chartist));\n;/**\n * The Chartist line chart can be used to draw Line or Scatter charts. If used in the browser you can access the global `Chartist` namespace where you find the `Line` function as a main entry point.\n *\n * For examples on how to use the line chart please check the examples of the `Chartist.Line` method.\n *\n * @module Chartist.Line\n */\n/* global Chartist */\n(function(window, document, Chartist){\n 'use strict';\n\n /**\n * Default options in line charts. Expand the code view to see a detailed list of options with comments.\n *\n * @memberof Chartist.Line\n */\n var defaultOptions = {\n // Options for X-Axis\n axisX: {\n // The offset of the labels to the chart area\n offset: 30,\n // Position where labels are placed. Can be set to `start` or `end` where `start` is equivalent to left or top on vertical axis and `end` is equivalent to right or bottom on horizontal axis.\n position: 'end',\n // Allows you to correct label positioning on this axis by positive or negative x and y offset.\n labelOffset: {\n x: 0,\n y: 0\n },\n // If labels should be shown or not\n showLabel: true,\n // If the axis grid should be drawn or not\n showGrid: true,\n // Interpolation function that allows you to intercept the value from the axis label\n labelInterpolationFnc: Chartist.noop,\n // Set the axis type to be used to project values on this axis. If not defined, Chartist.StepAxis will be used for the X-Axis, where the ticks option will be set to the labels in the data and the stretch option will be set to the global fullWidth option. This type can be changed to any axis constructor available (e.g. Chartist.FixedScaleAxis), where all axis options should be present here.\n type: undefined\n },\n // Options for Y-Axis\n axisY: {\n // The offset of the labels to the chart area\n offset: 40,\n // Position where labels are placed. Can be set to `start` or `end` where `start` is equivalent to left or top on vertical axis and `end` is equivalent to right or bottom on horizontal axis.\n position: 'start',\n // Allows you to correct label positioning on this axis by positive or negative x and y offset.\n labelOffset: {\n x: 0,\n y: 0\n },\n // If labels should be shown or not\n showLabel: true,\n // If the axis grid should be drawn or not\n showGrid: true,\n // Interpolation function that allows you to intercept the value from the axis label\n labelInterpolationFnc: Chartist.noop,\n // Set the axis type to be used to project values on this axis. If not defined, Chartist.AutoScaleAxis will be used for the Y-Axis, where the high and low options will be set to the global high and low options. This type can be changed to any axis constructor available (e.g. Chartist.FixedScaleAxis), where all axis options should be present here.\n type: undefined,\n // This value specifies the minimum height in pixel of the scale steps\n scaleMinSpace: 20,\n // Use only integer values (whole numbers) for the scale steps\n onlyInteger: false\n },\n // Specify a fixed width for the chart as a string (i.e. '100px' or '50%')\n width: undefined,\n // Specify a fixed height for the chart as a string (i.e. '100px' or '50%')\n height: undefined,\n // If the line should be drawn or not\n showLine: true,\n // If dots should be drawn or not\n showPoint: true,\n // If the line chart should draw an area\n showArea: false,\n // The base for the area chart that will be used to close the area shape (is normally 0)\n areaBase: 0,\n // Specify if the lines should be smoothed. This value can be true or false where true will result in smoothing using the default smoothing interpolation function Chartist.Interpolation.cardinal and false results in Chartist.Interpolation.none. You can also choose other smoothing / interpolation functions available in the Chartist.Interpolation module, or write your own interpolation function. Check the examples for a brief description.\n lineSmooth: true,\n // Overriding the natural low of the chart allows you to zoom in or limit the charts lowest displayed value\n low: undefined,\n // Overriding the natural high of the chart allows you to zoom in or limit the charts highest displayed value\n high: undefined,\n // Padding of the chart drawing area to the container element and labels as a number or padding object {top: 5, right: 5, bottom: 5, left: 5}\n chartPadding: {\n top: 15,\n right: 15,\n bottom: 5,\n left: 10\n },\n // When set to true, the last grid line on the x-axis is not drawn and the chart elements will expand to the full available width of the chart. For the last label to be drawn correctly you might need to add chart padding or offset the last label with a draw event handler.\n fullWidth: false,\n // If true the whole data is reversed including labels, the series order as well as the whole series data arrays.\n reverseData: false,\n // Override the class names that get used to generate the SVG structure of the chart\n classNames: {\n chart: 'ct-chart-line',\n label: 'ct-label',\n labelGroup: 'ct-labels',\n series: 'ct-series',\n line: 'ct-line',\n point: 'ct-point',\n area: 'ct-area',\n grid: 'ct-grid',\n gridGroup: 'ct-grids',\n vertical: 'ct-vertical',\n horizontal: 'ct-horizontal',\n start: 'ct-start',\n end: 'ct-end'\n }\n };\n\n /**\n * Creates a new chart\n *\n */\n function createChart(options) {\n var data = {\n raw: this.data,\n normalized: Chartist.getDataArray(this.data, options.reverseData, true)\n };\n\n // Create new svg object\n this.svg = Chartist.createSvg(this.container, options.width, options.height, options.classNames.chart);\n // Create groups for labels, grid and series\n var gridGroup = this.svg.elem('g').addClass(options.classNames.gridGroup);\n var seriesGroup = this.svg.elem('g');\n var labelGroup = this.svg.elem('g').addClass(options.classNames.labelGroup);\n\n var chartRect = Chartist.createChartRect(this.svg, options, defaultOptions.padding);\n var axisX, axisY;\n\n if(options.axisX.type === undefined) {\n axisX = new Chartist.StepAxis(Chartist.Axis.units.x, data, chartRect, Chartist.extend({}, options.axisX, {\n ticks: data.raw.labels,\n stretch: options.fullWidth\n }));\n } else {\n axisX = options.axisX.type.call(Chartist, Chartist.Axis.units.x, data, chartRect, options.axisX);\n }\n\n if(options.axisY.type === undefined) {\n axisY = new Chartist.AutoScaleAxis(Chartist.Axis.units.y, data, chartRect, Chartist.extend({}, options.axisY, {\n high: Chartist.isNum(options.high) ? options.high : options.axisY.high,\n low: Chartist.isNum(options.low) ? options.low : options.axisY.low\n }));\n } else {\n axisY = options.axisY.type.call(Chartist, Chartist.Axis.units.y, data, chartRect, options.axisY);\n }\n\n axisX.createGridAndLabels(gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter);\n axisY.createGridAndLabels(gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter);\n\n // Draw the series\n data.raw.series.forEach(function(series, seriesIndex) {\n var seriesElement = seriesGroup.elem('g');\n\n // Write attributes to series group element. If series name or meta is undefined the attributes will not be written\n seriesElement.attr({\n 'series-name': series.name,\n 'meta': Chartist.serialize(series.meta)\n }, Chartist.xmlNs.uri);\n\n // Use series class from series data or if not set generate one\n seriesElement.addClass([\n options.classNames.series,\n (series.className || options.classNames.series + '-' + Chartist.alphaNumerate(seriesIndex))\n ].join(' '));\n\n var pathCoordinates = [],\n pathData = [];\n\n data.normalized[seriesIndex].forEach(function(value, valueIndex) {\n var p = {\n x: chartRect.x1 + axisX.projectValue(value, valueIndex, data.normalized[seriesIndex]),\n y: chartRect.y1 - axisY.projectValue(value, valueIndex, data.normalized[seriesIndex])\n };\n pathCoordinates.push(p.x, p.y);\n pathData.push({\n value: value,\n valueIndex: valueIndex,\n meta: Chartist.getMetaData(series, valueIndex)\n });\n }.bind(this));\n\n var seriesOptions = {\n lineSmooth: Chartist.getSeriesOption(series, options, 'lineSmooth'),\n showPoint: Chartist.getSeriesOption(series, options, 'showPoint'),\n showLine: Chartist.getSeriesOption(series, options, 'showLine'),\n showArea: Chartist.getSeriesOption(series, options, 'showArea'),\n areaBase: Chartist.getSeriesOption(series, options, 'areaBase')\n };\n\n var smoothing = typeof seriesOptions.lineSmooth === 'function' ?\n seriesOptions.lineSmooth : (seriesOptions.lineSmooth ? Chartist.Interpolation.cardinal() : Chartist.Interpolation.none());\n // Interpolating path where pathData will be used to annotate each path element so we can trace back the original\n // index, value and meta data\n var path = smoothing(pathCoordinates, pathData);\n\n // If we should show points we need to create them now to avoid secondary loop\n // Points are drawn from the pathElements returned by the interpolation function\n // Small offset for Firefox to render squares correctly\n if (seriesOptions.showPoint) {\n\n path.pathElements.forEach(function(pathElement) {\n var point = seriesElement.elem('line', {\n x1: pathElement.x,\n y1: pathElement.y,\n x2: pathElement.x + 0.01,\n y2: pathElement.y\n }, options.classNames.point).attr({\n 'value': [pathElement.data.value.x, pathElement.data.value.y].filter(function(v) {\n return v;\n }).join(','),\n 'meta': pathElement.data.meta\n }, Chartist.xmlNs.uri);\n\n this.eventEmitter.emit('draw', {\n type: 'point',\n value: pathElement.data.value,\n index: pathElement.data.valueIndex,\n meta: pathElement.data.meta,\n series: series,\n seriesIndex: seriesIndex,\n axisX: axisX,\n axisY: axisY,\n group: seriesElement,\n element: point,\n x: pathElement.x,\n y: pathElement.y\n });\n }.bind(this));\n }\n\n if(seriesOptions.showLine) {\n var line = seriesElement.elem('path', {\n d: path.stringify()\n }, options.classNames.line, true);\n\n this.eventEmitter.emit('draw', {\n type: 'line',\n values: data.normalized[seriesIndex],\n path: path.clone(),\n chartRect: chartRect,\n index: seriesIndex,\n series: series,\n seriesIndex: seriesIndex,\n axisX: axisX,\n axisY: axisY,\n group: seriesElement,\n element: line\n });\n }\n\n // Area currently only works with axes that support a range!\n if(seriesOptions.showArea && axisY.range) {\n // If areaBase is outside the chart area (< min or > max) we need to set it respectively so that\n // the area is not drawn outside the chart area.\n var areaBase = Math.max(Math.min(seriesOptions.areaBase, axisY.range.max), axisY.range.min);\n\n // We project the areaBase value into screen coordinates\n var areaBaseProjected = chartRect.y1 - axisY.projectValue(areaBase);\n\n // In order to form the area we'll first split the path by move commands so we can chunk it up into segments\n path.splitByCommand('M').filter(function onlySolidSegments(pathSegment) {\n // We filter only \"solid\" segments that contain more than one point. Otherwise there's no need for an area\n return pathSegment.pathElements.length > 1;\n }).map(function convertToArea(solidPathSegments) {\n // Receiving the filtered solid path segments we can now convert those segments into fill areas\n var firstElement = solidPathSegments.pathElements[0];\n var lastElement = solidPathSegments.pathElements[solidPathSegments.pathElements.length - 1];\n\n // Cloning the solid path segment with closing option and removing the first move command from the clone\n // We then insert a new move that should start at the area base and draw a straight line up or down\n // at the end of the path we add an additional straight line to the projected area base value\n // As the closing option is set our path will be automatically closed\n return solidPathSegments.clone(true)\n .position(0)\n .remove(1)\n .move(firstElement.x, areaBaseProjected)\n .line(firstElement.x, firstElement.y)\n .position(solidPathSegments.pathElements.length + 1)\n .line(lastElement.x, areaBaseProjected);\n\n }).forEach(function createArea(areaPath) {\n // For each of our newly created area paths, we'll now create path elements by stringifying our path objects\n // and adding the created DOM elements to the correct series group\n var area = seriesElement.elem('path', {\n d: areaPath.stringify()\n }, options.classNames.area, true).attr({\n 'values': data.normalized[seriesIndex]\n }, Chartist.xmlNs.uri);\n\n // Emit an event for each area that was drawn\n this.eventEmitter.emit('draw', {\n type: 'area',\n values: data.normalized[seriesIndex],\n path: areaPath.clone(),\n series: series,\n seriesIndex: seriesIndex,\n axisX: axisX,\n axisY: axisY,\n chartRect: chartRect,\n index: seriesIndex,\n group: seriesElement,\n element: area\n });\n }.bind(this));\n }\n }.bind(this));\n\n this.eventEmitter.emit('created', {\n bounds: axisY.bounds,\n chartRect: chartRect,\n axisX: axisX,\n axisY: axisY,\n svg: this.svg,\n options: options\n });\n }\n\n /**\n * This method creates a new line chart.\n *\n * @memberof Chartist.Line\n * @param {String|Node} query A selector query string or directly a DOM element\n * @param {Object} data The data object that needs to consist of a labels and a series array\n * @param {Object} [options] The options object with options that override the default options. Check the examples for a detailed list.\n * @param {Array} [responsiveOptions] Specify an array of responsive option arrays which are a media query and options object pair => [[mediaQueryString, optionsObject],[more...]]\n * @return {Object} An object which exposes the API for the created chart\n *\n * @example\n * // Create a simple line chart\n * var data = {\n * // A labels array that can contain any sort of values\n * labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],\n * // Our series array that contains series objects or in this case series data arrays\n * series: [\n * [5, 2, 4, 2, 0]\n * ]\n * };\n *\n * // As options we currently only set a static size of 300x200 px\n * var options = {\n * width: '300px',\n * height: '200px'\n * };\n *\n * // In the global name space Chartist we call the Line function to initialize a line chart. As a first parameter we pass in a selector where we would like to get our chart created. Second parameter is the actual data object and as a third parameter we pass in our options\n * new Chartist.Line('.ct-chart', data, options);\n *\n * @example\n * // Use specific interpolation function with configuration from the Chartist.Interpolation module\n *\n * var chart = new Chartist.Line('.ct-chart', {\n * labels: [1, 2, 3, 4, 5],\n * series: [\n * [1, 1, 8, 1, 7]\n * ]\n * }, {\n * lineSmooth: Chartist.Interpolation.cardinal({\n * tension: 0.2\n * })\n * });\n *\n * @example\n * // Create a line chart with responsive options\n *\n * var data = {\n * // A labels array that can contain any sort of values\n * labels: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'],\n * // Our series array that contains series objects or in this case series data arrays\n * series: [\n * [5, 2, 4, 2, 0]\n * ]\n * };\n *\n * // In adition to the regular options we specify responsive option overrides that will override the default configutation based on the matching media queries.\n * var responsiveOptions = [\n * ['screen and (min-width: 641px) and (max-width: 1024px)', {\n * showPoint: false,\n * axisX: {\n * labelInterpolationFnc: function(value) {\n * // Will return Mon, Tue, Wed etc. on medium screens\n * return value.slice(0, 3);\n * }\n * }\n * }],\n * ['screen and (max-width: 640px)', {\n * showLine: false,\n * axisX: {\n * labelInterpolationFnc: function(value) {\n * // Will return M, T, W etc. on small screens\n * return value[0];\n * }\n * }\n * }]\n * ];\n *\n * new Chartist.Line('.ct-chart', data, null, responsiveOptions);\n *\n */\n function Line(query, data, options, responsiveOptions) {\n Chartist.Line.super.constructor.call(this,\n query,\n data,\n defaultOptions,\n Chartist.extend({}, defaultOptions, options),\n responsiveOptions);\n }\n\n // Creating line chart type in Chartist namespace\n Chartist.Line = Chartist.Base.extend({\n constructor: Line,\n createChart: createChart\n });\n\n}(window, document, Chartist));\n;/**\n * The bar chart module of Chartist that can be used to draw unipolar or bipolar bar and grouped bar charts.\n *\n * @module Chartist.Bar\n */\n/* global Chartist */\n(function(window, document, Chartist){\n 'use strict';\n\n /**\n * Default options in bar charts. Expand the code view to see a detailed list of options with comments.\n *\n * @memberof Chartist.Bar\n */\n var defaultOptions = {\n // Options for X-Axis\n axisX: {\n // The offset of the chart drawing area to the border of the container\n offset: 30,\n // Position where labels are placed. Can be set to `start` or `end` where `start` is equivalent to left or top on vertical axis and `end` is equivalent to right or bottom on horizontal axis.\n position: 'end',\n // Allows you to correct label positioning on this axis by positive or negative x and y offset.\n labelOffset: {\n x: 0,\n y: 0\n },\n // If labels should be shown or not\n showLabel: true,\n // If the axis grid should be drawn or not\n showGrid: true,\n // Interpolation function that allows you to intercept the value from the axis label\n labelInterpolationFnc: Chartist.noop,\n // This value specifies the minimum width in pixel of the scale steps\n scaleMinSpace: 30,\n // Use only integer values (whole numbers) for the scale steps\n onlyInteger: false\n },\n // Options for Y-Axis\n axisY: {\n // The offset of the chart drawing area to the border of the container\n offset: 40,\n // Position where labels are placed. Can be set to `start` or `end` where `start` is equivalent to left or top on vertical axis and `end` is equivalent to right or bottom on horizontal axis.\n position: 'start',\n // Allows you to correct label positioning on this axis by positive or negative x and y offset.\n labelOffset: {\n x: 0,\n y: 0\n },\n // If labels should be shown or not\n showLabel: true,\n // If the axis grid should be drawn or not\n showGrid: true,\n // Interpolation function that allows you to intercept the value from the axis label\n labelInterpolationFnc: Chartist.noop,\n // This value specifies the minimum height in pixel of the scale steps\n scaleMinSpace: 20,\n // Use only integer values (whole numbers) for the scale steps\n onlyInteger: false\n },\n // Specify a fixed width for the chart as a string (i.e. '100px' or '50%')\n width: undefined,\n // Specify a fixed height for the chart as a string (i.e. '100px' or '50%')\n height: undefined,\n // Overriding the natural high of the chart allows you to zoom in or limit the charts highest displayed value\n high: undefined,\n // Overriding the natural low of the chart allows you to zoom in or limit the charts lowest displayed value\n low: undefined,\n // Use only integer values (whole numbers) for the scale steps\n onlyInteger: false,\n // Padding of the chart drawing area to the container element and labels as a number or padding object {top: 5, right: 5, bottom: 5, left: 5}\n chartPadding: {\n top: 15,\n right: 15,\n bottom: 5,\n left: 10\n },\n // Specify the distance in pixel of bars in a group\n seriesBarDistance: 15,\n // If set to true this property will cause the series bars to be stacked. Check the `stackMode` option for further stacking options.\n stackBars: false,\n // If set to 'overlap' this property will force the stacked bars to draw from the zero line.\n // If set to 'accumulate' this property will form a total for each series point. This will also influence the y-axis and the overall bounds of the chart. In stacked mode the seriesBarDistance property will have no effect.\n stackMode: 'accumulate',\n // Inverts the axes of the bar chart in order to draw a horizontal bar chart. Be aware that you also need to invert your axis settings as the Y Axis will now display the labels and the X Axis the values.\n horizontalBars: false,\n // If set to true then each bar will represent a series and the data array is expected to be a one dimensional array of data values rather than a series array of series. This is useful if the bar chart should represent a profile rather than some data over time.\n distributeSeries: false,\n // If true the whole data is reversed including labels, the series order as well as the whole series data arrays.\n reverseData: false,\n // Override the class names that get used to generate the SVG structure of the chart\n classNames: {\n chart: 'ct-chart-bar',\n horizontalBars: 'ct-horizontal-bars',\n label: 'ct-label',\n labelGroup: 'ct-labels',\n series: 'ct-series',\n bar: 'ct-bar',\n grid: 'ct-grid',\n gridGroup: 'ct-grids',\n vertical: 'ct-vertical',\n horizontal: 'ct-horizontal',\n start: 'ct-start',\n end: 'ct-end'\n }\n };\n\n /**\n * Creates a new chart\n *\n */\n function createChart(options) {\n var data = {\n raw: this.data,\n normalized: options.distributeSeries ? Chartist.getDataArray(this.data, options.reverseData, options.horizontalBars ? 'x' : 'y').map(function(value) {\n return [value];\n }) : Chartist.getDataArray(this.data, options.reverseData, options.horizontalBars ? 'x' : 'y')\n };\n\n var highLow;\n\n // Create new svg element\n this.svg = Chartist.createSvg(\n this.container,\n options.width,\n options.height,\n options.classNames.chart + (options.horizontalBars ? ' ' + options.classNames.horizontalBars : '')\n );\n\n // Drawing groups in correct order\n var gridGroup = this.svg.elem('g').addClass(options.classNames.gridGroup);\n var seriesGroup = this.svg.elem('g');\n var labelGroup = this.svg.elem('g').addClass(options.classNames.labelGroup);\n\n if(options.stackBars) {\n // If stacked bars we need to calculate the high low from stacked values from each series\n var serialSums = Chartist.serialMap(data.normalized, function serialSums() {\n return Array.prototype.slice.call(arguments).map(function(value) {\n return value;\n }).reduce(function(prev, curr) {\n return {\n x: prev.x + curr.x || 0,\n y: prev.y + curr.y || 0\n };\n }, {x: 0, y: 0});\n });\n\n highLow = Chartist.getHighLow([serialSums], Chartist.extend({}, options, {\n referenceValue: 0\n }), options.horizontalBars ? 'x' : 'y');\n } else {\n highLow = Chartist.getHighLow(data.normalized, Chartist.extend({}, options, {\n referenceValue: 0\n }), options.horizontalBars ? 'x' : 'y');\n }\n // Overrides of high / low from settings\n highLow.high = +options.high || (options.high === 0 ? 0 : highLow.high);\n highLow.low = +options.low || (options.low === 0 ? 0 : highLow.low);\n\n var chartRect = Chartist.createChartRect(this.svg, options, defaultOptions.padding);\n\n var valueAxis,\n labelAxisTicks,\n labelAxis,\n axisX,\n axisY;\n\n // We need to set step count based on some options combinations\n if(options.distributeSeries && options.stackBars) {\n // If distributed series are enabled and bars need to be stacked, we'll only have one bar and therefore should\n // use only the first label for the step axis\n labelAxisTicks = data.raw.labels.slice(0, 1);\n } else {\n // If distributed series are enabled but stacked bars aren't, we should use the series labels\n // If we are drawing a regular bar chart with two dimensional series data, we just use the labels array\n // as the bars are normalized\n labelAxisTicks = data.raw.labels;\n }\n\n // Set labelAxis and valueAxis based on the horizontalBars setting. This setting will flip the axes if necessary.\n if(options.horizontalBars) {\n if(options.axisX.type === undefined) {\n valueAxis = axisX = new Chartist.AutoScaleAxis(Chartist.Axis.units.x, data, chartRect, Chartist.extend({}, options.axisX, {\n highLow: highLow,\n referenceValue: 0\n }));\n } else {\n valueAxis = axisX = options.axisX.type.call(Chartist, Chartist.Axis.units.x, data, chartRect, Chartist.extend({}, options.axisX, {\n highLow: highLow,\n referenceValue: 0\n }));\n }\n\n if(options.axisY.type === undefined) {\n labelAxis = axisY = new Chartist.StepAxis(Chartist.Axis.units.y, data, chartRect, {\n ticks: labelAxisTicks\n });\n } else {\n labelAxis = axisY = options.axisY.type.call(Chartist, Chartist.Axis.units.y, data, chartRect, options.axisY);\n }\n } else {\n if(options.axisX.type === undefined) {\n labelAxis = axisX = new Chartist.StepAxis(Chartist.Axis.units.x, data, chartRect, {\n ticks: labelAxisTicks\n });\n } else {\n labelAxis = axisX = options.axisX.type.call(Chartist, Chartist.Axis.units.x, data, chartRect, options.axisX);\n }\n\n if(options.axisY.type === undefined) {\n valueAxis = axisY = new Chartist.AutoScaleAxis(Chartist.Axis.units.y, data, chartRect, Chartist.extend({}, options.axisY, {\n highLow: highLow,\n referenceValue: 0\n }));\n } else {\n valueAxis = axisY = options.axisY.type.call(Chartist, Chartist.Axis.units.y, data, chartRect, Chartist.extend({}, options.axisY, {\n highLow: highLow,\n referenceValue: 0\n }));\n }\n }\n\n // Projected 0 point\n var zeroPoint = options.horizontalBars ? (chartRect.x1 + valueAxis.projectValue(0)) : (chartRect.y1 - valueAxis.projectValue(0));\n // Used to track the screen coordinates of stacked bars\n var stackedBarValues = [];\n\n labelAxis.createGridAndLabels(gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter);\n valueAxis.createGridAndLabels(gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter);\n\n // Draw the series\n data.raw.series.forEach(function(series, seriesIndex) {\n // Calculating bi-polar value of index for seriesOffset. For i = 0..4 biPol will be -1.5, -0.5, 0.5, 1.5 etc.\n var biPol = seriesIndex - (data.raw.series.length - 1) / 2;\n // Half of the period width between vertical grid lines used to position bars\n var periodHalfLength;\n // Current series SVG element\n var seriesElement;\n\n // We need to set periodHalfLength based on some options combinations\n if(options.distributeSeries && !options.stackBars) {\n // If distributed series are enabled but stacked bars aren't, we need to use the length of the normaizedData array\n // which is the series count and divide by 2\n periodHalfLength = labelAxis.axisLength / data.normalized.length / 2;\n } else if(options.distributeSeries && options.stackBars) {\n // If distributed series and stacked bars are enabled we'll only get one bar so we should just divide the axis\n // length by 2\n periodHalfLength = labelAxis.axisLength / 2;\n } else {\n // On regular bar charts we should just use the series length\n periodHalfLength = labelAxis.axisLength / data.normalized[seriesIndex].length / 2;\n }\n\n // Adding the series group to the series element\n seriesElement = seriesGroup.elem('g');\n\n // Write attributes to series group element. If series name or meta is undefined the attributes will not be written\n seriesElement.attr({\n 'series-name': series.name,\n 'meta': Chartist.serialize(series.meta)\n }, Chartist.xmlNs.uri);\n\n // Use series class from series data or if not set generate one\n seriesElement.addClass([\n options.classNames.series,\n (series.className || options.classNames.series + '-' + Chartist.alphaNumerate(seriesIndex))\n ].join(' '));\n\n data.normalized[seriesIndex].forEach(function(value, valueIndex) {\n var projected,\n bar,\n previousStack,\n labelAxisValueIndex;\n\n // We need to set labelAxisValueIndex based on some options combinations\n if(options.distributeSeries && !options.stackBars) {\n // If distributed series are enabled but stacked bars aren't, we can use the seriesIndex for later projection\n // on the step axis for label positioning\n labelAxisValueIndex = seriesIndex;\n } else if(options.distributeSeries && options.stackBars) {\n // If distributed series and stacked bars are enabled, we will only get one bar and therefore always use\n // 0 for projection on the label step axis\n labelAxisValueIndex = 0;\n } else {\n // On regular bar charts we just use the value index to project on the label step axis\n labelAxisValueIndex = valueIndex;\n }\n\n // We need to transform coordinates differently based on the chart layout\n if(options.horizontalBars) {\n projected = {\n x: chartRect.x1 + valueAxis.projectValue(value && value.x ? value.x : 0, valueIndex, data.normalized[seriesIndex]),\n y: chartRect.y1 - labelAxis.projectValue(value && value.y ? value.y : 0, labelAxisValueIndex, data.normalized[seriesIndex])\n };\n } else {\n projected = {\n x: chartRect.x1 + labelAxis.projectValue(value && value.x ? value.x : 0, labelAxisValueIndex, data.normalized[seriesIndex]),\n y: chartRect.y1 - valueAxis.projectValue(value && value.y ? value.y : 0, valueIndex, data.normalized[seriesIndex])\n }\n }\n\n // If the label axis is a step based axis we will offset the bar into the middle of between two steps using\n // the periodHalfLength value. Also we do arrange the different series so that they align up to each other using\n // the seriesBarDistance. If we don't have a step axis, the bar positions can be chosen freely so we should not\n // add any automated positioning.\n if(labelAxis instanceof Chartist.StepAxis) {\n // Offset to center bar between grid lines, but only if the step axis is not stretched\n if(!labelAxis.options.stretch) {\n projected[labelAxis.units.pos] += periodHalfLength * (options.horizontalBars ? -1 : 1);\n }\n // Using bi-polar offset for multiple series if no stacked bars or series distribution is used\n projected[labelAxis.units.pos] += (options.stackBars || options.distributeSeries) ? 0 : biPol * options.seriesBarDistance * (options.horizontalBars ? -1 : 1);\n }\n\n // Enter value in stacked bar values used to remember previous screen value for stacking up bars\n previousStack = stackedBarValues[valueIndex] || zeroPoint;\n stackedBarValues[valueIndex] = previousStack - (zeroPoint - projected[labelAxis.counterUnits.pos]);\n\n // Skip if value is undefined\n if(value === undefined) {\n return;\n }\n\n var positions = {};\n positions[labelAxis.units.pos + '1'] = projected[labelAxis.units.pos];\n positions[labelAxis.units.pos + '2'] = projected[labelAxis.units.pos];\n\n if(options.stackBars && (options.stackMode === 'accumulate' || !options.stackMode)) {\n // Stack mode: accumulate (default)\n // If bars are stacked we use the stackedBarValues reference and otherwise base all bars off the zero line\n // We want backwards compatibility, so the expected fallback without the 'stackMode' option\n // to be the original behaviour (accumulate)\n positions[labelAxis.counterUnits.pos + '1'] = previousStack;\n positions[labelAxis.counterUnits.pos + '2'] = stackedBarValues[valueIndex];\n } else {\n // Draw from the zero line normally\n // This is also the same code for Stack mode: overlap\n positions[labelAxis.counterUnits.pos + '1'] = zeroPoint;\n positions[labelAxis.counterUnits.pos + '2'] = projected[labelAxis.counterUnits.pos];\n }\n\n // Limit x and y so that they are within the chart rect\n positions.x1 = Math.min(Math.max(positions.x1, chartRect.x1), chartRect.x2);\n positions.x2 = Math.min(Math.max(positions.x2, chartRect.x1), chartRect.x2);\n positions.y1 = Math.min(Math.max(positions.y1, chartRect.y2), chartRect.y1);\n positions.y2 = Math.min(Math.max(positions.y2, chartRect.y2), chartRect.y1);\n\n // Create bar element\n bar = seriesElement.elem('line', positions, options.classNames.bar).attr({\n 'value': [value.x, value.y].filter(function(v) {\n return v;\n }).join(','),\n 'meta': Chartist.getMetaData(series, valueIndex)\n }, Chartist.xmlNs.uri);\n\n this.eventEmitter.emit('draw', Chartist.extend({\n type: 'bar',\n value: value,\n index: valueIndex,\n meta: Chartist.getMetaData(series, valueIndex),\n series: series,\n seriesIndex: seriesIndex,\n axisX: axisX,\n axisY: axisY,\n chartRect: chartRect,\n group: seriesElement,\n element: bar\n }, positions));\n }.bind(this));\n }.bind(this));\n\n this.eventEmitter.emit('created', {\n bounds: valueAxis.bounds,\n chartRect: chartRect,\n axisX: axisX,\n axisY: axisY,\n svg: this.svg,\n options: options\n });\n }\n\n /**\n * This method creates a new bar chart and returns API object that you can use for later changes.\n *\n * @memberof Chartist.Bar\n * @param {String|Node} query A selector query string or directly a DOM element\n * @param {Object} data The data object that needs to consist of a labels and a series array\n * @param {Object} [options] The options object with options that override the default options. Check the examples for a detailed list.\n * @param {Array} [responsiveOptions] Specify an array of responsive option arrays which are a media query and options object pair => [[mediaQueryString, optionsObject],[more...]]\n * @return {Object} An object which exposes the API for the created chart\n *\n * @example\n * // Create a simple bar chart\n * var data = {\n * labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],\n * series: [\n * [5, 2, 4, 2, 0]\n * ]\n * };\n *\n * // In the global name space Chartist we call the Bar function to initialize a bar chart. As a first parameter we pass in a selector where we would like to get our chart created and as a second parameter we pass our data object.\n * new Chartist.Bar('.ct-chart', data);\n *\n * @example\n * // This example creates a bipolar grouped bar chart where the boundaries are limitted to -10 and 10\n * new Chartist.Bar('.ct-chart', {\n * labels: [1, 2, 3, 4, 5, 6, 7],\n * series: [\n * [1, 3, 2, -5, -3, 1, -6],\n * [-5, -2, -4, -1, 2, -3, 1]\n * ]\n * }, {\n * seriesBarDistance: 12,\n * low: -10,\n * high: 10\n * });\n *\n */\n function Bar(query, data, options, responsiveOptions) {\n Chartist.Bar.super.constructor.call(this,\n query,\n data,\n defaultOptions,\n Chartist.extend({}, defaultOptions, options),\n responsiveOptions);\n }\n\n // Creating bar chart type in Chartist namespace\n Chartist.Bar = Chartist.Base.extend({\n constructor: Bar,\n createChart: createChart\n });\n\n}(window, document, Chartist));\n;/**\n * The pie chart module of Chartist that can be used to draw pie, donut or gauge charts\n *\n * @module Chartist.Pie\n */\n/* global Chartist */\n(function(window, document, Chartist) {\n 'use strict';\n\n /**\n * Default options in line charts. Expand the code view to see a detailed list of options with comments.\n *\n * @memberof Chartist.Pie\n */\n var defaultOptions = {\n // Specify a fixed width for the chart as a string (i.e. '100px' or '50%')\n width: undefined,\n // Specify a fixed height for the chart as a string (i.e. '100px' or '50%')\n height: undefined,\n // Padding of the chart drawing area to the container element and labels as a number or padding object {top: 5, right: 5, bottom: 5, left: 5}\n chartPadding: 5,\n // Override the class names that are used to generate the SVG structure of the chart\n classNames: {\n chartPie: 'ct-chart-pie',\n chartDonut: 'ct-chart-donut',\n series: 'ct-series',\n slicePie: 'ct-slice-pie',\n sliceDonut: 'ct-slice-donut',\n label: 'ct-label'\n },\n // The start angle of the pie chart in degrees where 0 points north. A higher value offsets the start angle clockwise.\n startAngle: 0,\n // An optional total you can specify. By specifying a total value, the sum of the values in the series must be this total in order to draw a full pie. You can use this parameter to draw only parts of a pie or gauge charts.\n total: undefined,\n // If specified the donut CSS classes will be used and strokes will be drawn instead of pie slices.\n donut: false,\n // Specify the donut stroke width, currently done in javascript for convenience. May move to CSS styles in the future.\n // This option can be set as number or string to specify a relative width (i.e. 100 or '30%').\n donutWidth: 60,\n // If a label should be shown or not\n showLabel: true,\n // Label position offset from the standard position which is half distance of the radius. This value can be either positive or negative. Positive values will position the label away from the center.\n labelOffset: 0,\n // This option can be set to 'inside', 'outside' or 'center'. Positioned with 'inside' the labels will be placed on half the distance of the radius to the border of the Pie by respecting the 'labelOffset'. The 'outside' option will place the labels at the border of the pie and 'center' will place the labels in the absolute center point of the chart. The 'center' option only makes sense in conjunction with the 'labelOffset' option.\n labelPosition: 'inside',\n // An interpolation function for the label value\n labelInterpolationFnc: Chartist.noop,\n // Label direction can be 'neutral', 'explode' or 'implode'. The labels anchor will be positioned based on those settings as well as the fact if the labels are on the right or left side of the center of the chart. Usually explode is useful when labels are positioned far away from the center.\n labelDirection: 'neutral',\n // If true the whole data is reversed including labels, the series order as well as the whole series data arrays.\n reverseData: false\n };\n\n /**\n * Determines SVG anchor position based on direction and center parameter\n *\n * @param center\n * @param label\n * @param direction\n * @return {string}\n */\n function determineAnchorPosition(center, label, direction) {\n var toTheRight = label.x > center.x;\n\n if(toTheRight && direction === 'explode' ||\n !toTheRight && direction === 'implode') {\n return 'start';\n } else if(toTheRight && direction === 'implode' ||\n !toTheRight && direction === 'explode') {\n return 'end';\n } else {\n return 'middle';\n }\n }\n\n /**\n * Creates the pie chart\n *\n * @param options\n */\n function createChart(options) {\n var seriesGroups = [],\n labelsGroup,\n chartRect,\n radius,\n labelRadius,\n totalDataSum,\n startAngle = options.startAngle,\n dataArray = Chartist.getDataArray(this.data, options.reverseData);\n\n // Create SVG.js draw\n this.svg = Chartist.createSvg(this.container, options.width, options.height,options.donut ? options.classNames.chartDonut : options.classNames.chartPie);\n // Calculate charting rect\n chartRect = Chartist.createChartRect(this.svg, options, defaultOptions.padding);\n // Get biggest circle radius possible within chartRect\n radius = Math.min(chartRect.width() / 2, chartRect.height() / 2);\n // Calculate total of all series to get reference value or use total reference from optional options\n totalDataSum = options.total || dataArray.reduce(function(previousValue, currentValue) {\n return previousValue + currentValue;\n }, 0);\n\n var donutWidth = Chartist.quantity(options.donutWidth);\n if (donutWidth.unit === '%') {\n donutWidth.value *= radius / 100;\n }\n\n // If this is a donut chart we need to adjust our radius to enable strokes to be drawn inside\n // Unfortunately this is not possible with the current SVG Spec\n // See this proposal for more details: http://lists.w3.org/Archives/Public/www-svg/2003Oct/0000.html\n radius -= options.donut ? donutWidth.value / 2 : 0;\n\n // If labelPosition is set to `outside` or a donut chart is drawn then the label position is at the radius,\n // if regular pie chart it's half of the radius\n if(options.labelPosition === 'outside' || options.donut) {\n labelRadius = radius;\n } else if(options.labelPosition === 'center') {\n // If labelPosition is center we start with 0 and will later wait for the labelOffset\n labelRadius = 0;\n } else {\n // Default option is 'inside' where we use half the radius so the label will be placed in the center of the pie\n // slice\n labelRadius = radius / 2;\n }\n // Add the offset to the labelRadius where a negative offset means closed to the center of the chart\n labelRadius += options.labelOffset;\n\n // Calculate end angle based on total sum and current data value and offset with padding\n var center = {\n x: chartRect.x1 + chartRect.width() / 2,\n y: chartRect.y2 + chartRect.height() / 2\n };\n\n // Check if there is only one non-zero value in the series array.\n var hasSingleValInSeries = this.data.series.filter(function(val) {\n return val.hasOwnProperty('value') ? val.value !== 0 : val !== 0;\n }).length === 1;\n\n //if we need to show labels we create the label group now\n if(options.showLabel) {\n labelsGroup = this.svg.elem('g', null, null, true);\n }\n\n // Draw the series\n // initialize series groups\n for (var i = 0; i < this.data.series.length; i++) {\n var series = this.data.series[i];\n seriesGroups[i] = this.svg.elem('g', null, null, true);\n\n // If the series is an object and contains a name or meta data we add a custom attribute\n seriesGroups[i].attr({\n 'series-name': series.name\n }, Chartist.xmlNs.uri);\n\n // Use series class from series data or if not set generate one\n seriesGroups[i].addClass([\n options.classNames.series,\n (series.className || options.classNames.series + '-' + Chartist.alphaNumerate(i))\n ].join(' '));\n\n var endAngle = startAngle + dataArray[i] / totalDataSum * 360;\n // If we need to draw the arc for all 360 degrees we need to add a hack where we close the circle\n // with Z and use 359.99 degrees\n if(endAngle - startAngle === 360) {\n endAngle -= 0.01;\n }\n\n var start = Chartist.polarToCartesian(center.x, center.y, radius, startAngle - (i === 0 || hasSingleValInSeries ? 0 : 0.2)),\n end = Chartist.polarToCartesian(center.x, center.y, radius, endAngle);\n\n // Create a new path element for the pie chart. If this isn't a donut chart we should close the path for a correct stroke\n var path = new Chartist.Svg.Path(!options.donut)\n .move(end.x, end.y)\n .arc(radius, radius, 0, endAngle - startAngle > 180, 0, start.x, start.y);\n\n // If regular pie chart (no donut) we add a line to the center of the circle for completing the pie\n if(!options.donut) {\n path.line(center.x, center.y);\n }\n\n // Create the SVG path\n // If this is a donut chart we add the donut class, otherwise just a regular slice\n var pathElement = seriesGroups[i].elem('path', {\n d: path.stringify()\n }, options.donut ? options.classNames.sliceDonut : options.classNames.slicePie);\n\n // Adding the pie series value to the path\n pathElement.attr({\n 'value': dataArray[i],\n 'meta': Chartist.serialize(series.meta)\n }, Chartist.xmlNs.uri);\n\n // If this is a donut, we add the stroke-width as style attribute\n if(options.donut) {\n pathElement.attr({\n 'style': 'stroke-width: ' + donutWidth.value + 'px'\n });\n }\n\n // Fire off draw event\n this.eventEmitter.emit('draw', {\n type: 'slice',\n value: dataArray[i],\n totalDataSum: totalDataSum,\n index: i,\n meta: series.meta,\n series: series,\n group: seriesGroups[i],\n element: pathElement,\n path: path.clone(),\n center: center,\n radius: radius,\n startAngle: startAngle,\n endAngle: endAngle\n });\n\n // If we need to show labels we need to add the label for this slice now\n if(options.showLabel) {\n // Position at the labelRadius distance from center and between start and end angle\n var labelPosition = Chartist.polarToCartesian(center.x, center.y, labelRadius, startAngle + (endAngle - startAngle) / 2),\n interpolatedValue = options.labelInterpolationFnc(this.data.labels ? this.data.labels[i] : dataArray[i], i);\n\n if(interpolatedValue || interpolatedValue === 0) {\n var labelElement = labelsGroup.elem('text', {\n dx: labelPosition.x,\n dy: labelPosition.y,\n 'text-anchor': determineAnchorPosition(center, labelPosition, options.labelDirection)\n }, options.classNames.label).text('' + interpolatedValue);\n\n // Fire off draw event\n this.eventEmitter.emit('draw', {\n type: 'label',\n index: i,\n group: labelsGroup,\n element: labelElement,\n text: '' + interpolatedValue,\n x: labelPosition.x,\n y: labelPosition.y\n });\n }\n }\n\n // Set next startAngle to current endAngle. Use slight offset so there are no transparent hairline issues\n // (except for last slice)\n startAngle = endAngle;\n }\n\n this.eventEmitter.emit('created', {\n chartRect: chartRect,\n svg: this.svg,\n options: options\n });\n }\n\n /**\n * This method creates a new pie chart and returns an object that can be used to redraw the chart.\n *\n * @memberof Chartist.Pie\n * @param {String|Node} query A selector query string or directly a DOM element\n * @param {Object} data The data object in the pie chart needs to have a series property with a one dimensional data array. The values will be normalized against each other and don't necessarily need to be in percentage. The series property can also be an array of value objects that contain a value property and a className property to override the CSS class name for the series group.\n * @param {Object} [options] The options object with options that override the default options. Check the examples for a detailed list.\n * @param {Array} [responsiveOptions] Specify an array of responsive option arrays which are a media query and options object pair => [[mediaQueryString, optionsObject],[more...]]\n * @return {Object} An object with a version and an update method to manually redraw the chart\n *\n * @example\n * // Simple pie chart example with four series\n * new Chartist.Pie('.ct-chart', {\n * series: [10, 2, 4, 3]\n * });\n *\n * @example\n * // Drawing a donut chart\n * new Chartist.Pie('.ct-chart', {\n * series: [10, 2, 4, 3]\n * }, {\n * donut: true\n * });\n *\n * @example\n * // Using donut, startAngle and total to draw a gauge chart\n * new Chartist.Pie('.ct-chart', {\n * series: [20, 10, 30, 40]\n * }, {\n * donut: true,\n * donutWidth: 20,\n * startAngle: 270,\n * total: 200\n * });\n *\n * @example\n * // Drawing a pie chart with padding and labels that are outside the pie\n * new Chartist.Pie('.ct-chart', {\n * series: [20, 10, 30, 40]\n * }, {\n * chartPadding: 30,\n * labelOffset: 50,\n * labelDirection: 'explode'\n * });\n *\n * @example\n * // Overriding the class names for individual series as well as a name and meta data.\n * // The name will be written as ct:series-name attribute and the meta data will be serialized and written\n * // to a ct:meta attribute.\n * new Chartist.Pie('.ct-chart', {\n * series: [{\n * value: 20,\n * name: 'Series 1',\n * className: 'my-custom-class-one',\n * meta: 'Meta One'\n * }, {\n * value: 10,\n * name: 'Series 2',\n * className: 'my-custom-class-two',\n * meta: 'Meta Two'\n * }, {\n * value: 70,\n * name: 'Series 3',\n * className: 'my-custom-class-three',\n * meta: 'Meta Three'\n * }]\n * });\n */\n function Pie(query, data, options, responsiveOptions) {\n Chartist.Pie.super.constructor.call(this,\n query,\n data,\n defaultOptions,\n Chartist.extend({}, defaultOptions, options),\n responsiveOptions);\n }\n\n // Creating pie chart type in Chartist namespace\n Chartist.Pie = Chartist.Base.extend({\n constructor: Pie,\n createChart: createChart,\n determineAnchorPosition: determineAnchorPosition\n });\n\n}(window, document, Chartist));\n\nreturn Chartist;\n\n}));\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/chartist/dist/chartist.js\n ** module id = 208\n ** module chunks = 1\n **/","/**!\n * Sortable\n * @author\tRubaXa \n * @license MIT\n */\n\n\n(function (factory) {\n\t\"use strict\";\n\n\tif (typeof define === \"function\" && define.amd) {\n\t\tdefine(factory);\n\t}\n\telse if (typeof module != \"undefined\" && typeof module.exports != \"undefined\") {\n\t\tmodule.exports = factory();\n\t}\n\telse if (typeof Package !== \"undefined\") {\n\t\tSortable = factory(); // export for Meteor.js\n\t}\n\telse {\n\t\t/* jshint sub:true */\n\t\twindow[\"Sortable\"] = factory();\n\t}\n})(function () {\n\t\"use strict\";\n\n\tvar dragEl,\n\t\tparentEl,\n\t\tghostEl,\n\t\tcloneEl,\n\t\trootEl,\n\t\tnextEl,\n\n\t\tscrollEl,\n\t\tscrollParentEl,\n\n\t\tlastEl,\n\t\tlastCSS,\n\t\tlastParentCSS,\n\n\t\toldIndex,\n\t\tnewIndex,\n\n\t\tactiveGroup,\n\t\tautoScroll = {},\n\n\t\ttapEvt,\n\t\ttouchEvt,\n\n\t\tmoved,\n\n\t\t/** @const */\n\t\tRSPACE = /\\s+/g,\n\n\t\texpando = 'Sortable' + (new Date).getTime(),\n\n\t\twin = window,\n\t\tdocument = win.document,\n\t\tparseInt = win.parseInt,\n\n\t\tsupportDraggable = !!('draggable' in document.createElement('div')),\n\t\tsupportCssPointerEvents = (function (el) {\n\t\t\tel = document.createElement('x');\n\t\t\tel.style.cssText = 'pointer-events:auto';\n\t\t\treturn el.style.pointerEvents === 'auto';\n\t\t})(),\n\n\t\t_silent = false,\n\n\t\tabs = Math.abs,\n\t\tslice = [].slice,\n\n\t\ttouchDragOverListeners = [],\n\n\t\t_autoScroll = _throttle(function (/**Event*/evt, /**Object*/options, /**HTMLElement*/rootEl) {\n\t\t\t// Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521\n\t\t\tif (rootEl && options.scroll) {\n\t\t\t\tvar el,\n\t\t\t\t\trect,\n\t\t\t\t\tsens = options.scrollSensitivity,\n\t\t\t\t\tspeed = options.scrollSpeed,\n\n\t\t\t\t\tx = evt.clientX,\n\t\t\t\t\ty = evt.clientY,\n\n\t\t\t\t\twinWidth = window.innerWidth,\n\t\t\t\t\twinHeight = window.innerHeight,\n\n\t\t\t\t\tvx,\n\t\t\t\t\tvy\n\t\t\t\t;\n\n\t\t\t\t// Delect scrollEl\n\t\t\t\tif (scrollParentEl !== rootEl) {\n\t\t\t\t\tscrollEl = options.scroll;\n\t\t\t\t\tscrollParentEl = rootEl;\n\n\t\t\t\t\tif (scrollEl === true) {\n\t\t\t\t\t\tscrollEl = rootEl;\n\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\tif ((scrollEl.offsetWidth < scrollEl.scrollWidth) ||\n\t\t\t\t\t\t\t\t(scrollEl.offsetHeight < scrollEl.scrollHeight)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/* jshint boss:true */\n\t\t\t\t\t\t} while (scrollEl = scrollEl.parentNode);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (scrollEl) {\n\t\t\t\t\tel = scrollEl;\n\t\t\t\t\trect = scrollEl.getBoundingClientRect();\n\t\t\t\t\tvx = (abs(rect.right - x) <= sens) - (abs(rect.left - x) <= sens);\n\t\t\t\t\tvy = (abs(rect.bottom - y) <= sens) - (abs(rect.top - y) <= sens);\n\t\t\t\t}\n\n\n\t\t\t\tif (!(vx || vy)) {\n\t\t\t\t\tvx = (winWidth - x <= sens) - (x <= sens);\n\t\t\t\t\tvy = (winHeight - y <= sens) - (y <= sens);\n\n\t\t\t\t\t/* jshint expr:true */\n\t\t\t\t\t(vx || vy) && (el = win);\n\t\t\t\t}\n\n\n\t\t\t\tif (autoScroll.vx !== vx || autoScroll.vy !== vy || autoScroll.el !== el) {\n\t\t\t\t\tautoScroll.el = el;\n\t\t\t\t\tautoScroll.vx = vx;\n\t\t\t\t\tautoScroll.vy = vy;\n\n\t\t\t\t\tclearInterval(autoScroll.pid);\n\n\t\t\t\t\tif (el) {\n\t\t\t\t\t\tautoScroll.pid = setInterval(function () {\n\t\t\t\t\t\t\tif (el === win) {\n\t\t\t\t\t\t\t\twin.scrollTo(win.pageXOffset + vx * speed, win.pageYOffset + vy * speed);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tvy && (el.scrollTop += vy * speed);\n\t\t\t\t\t\t\t\tvx && (el.scrollLeft += vx * speed);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 24);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}, 30),\n\n\t\t_prepareGroup = function (options) {\n\t\t\tvar group = options.group;\n\n\t\t\tif (!group || typeof group != 'object') {\n\t\t\t\tgroup = options.group = {name: group};\n\t\t\t}\n\n\t\t\t['pull', 'put'].forEach(function (key) {\n\t\t\t\tif (!(key in group)) {\n\t\t\t\t\tgroup[key] = true;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\toptions.groups = ' ' + group.name + (group.put.join ? ' ' + group.put.join(' ') : '') + ' ';\n\t\t}\n\t;\n\n\n\n\t/**\n\t * @class Sortable\n\t * @param {HTMLElement} el\n\t * @param {Object} [options]\n\t */\n\tfunction Sortable(el, options) {\n\t\tif (!(el && el.nodeType && el.nodeType === 1)) {\n\t\t\tthrow 'Sortable: `el` must be HTMLElement, and not ' + {}.toString.call(el);\n\t\t}\n\n\t\tthis.el = el; // root element\n\t\tthis.options = options = _extend({}, options);\n\n\n\t\t// Export instance\n\t\tel[expando] = this;\n\n\n\t\t// Default options\n\t\tvar defaults = {\n\t\t\tgroup: Math.random(),\n\t\t\tsort: true,\n\t\t\tdisabled: false,\n\t\t\tstore: null,\n\t\t\thandle: null,\n\t\t\tscroll: true,\n\t\t\tscrollSensitivity: 30,\n\t\t\tscrollSpeed: 10,\n\t\t\tdraggable: /[uo]l/i.test(el.nodeName) ? 'li' : '>*',\n\t\t\tghostClass: 'sortable-ghost',\n\t\t\tchosenClass: 'sortable-chosen',\n\t\t\tignore: 'a, img',\n\t\t\tfilter: null,\n\t\t\tanimation: 0,\n\t\t\tsetData: function (dataTransfer, dragEl) {\n\t\t\t\tdataTransfer.setData('Text', dragEl.textContent);\n\t\t\t},\n\t\t\tdropBubble: false,\n\t\t\tdragoverBubble: false,\n\t\t\tdataIdAttr: 'data-id',\n\t\t\tdelay: 0,\n\t\t\tforceFallback: false,\n\t\t\tfallbackClass: 'sortable-fallback',\n\t\t\tfallbackOnBody: false\n\t\t};\n\n\n\t\t// Set default options\n\t\tfor (var name in defaults) {\n\t\t\t!(name in options) && (options[name] = defaults[name]);\n\t\t}\n\n\t\t_prepareGroup(options);\n\n\t\t// Bind all private methods\n\t\tfor (var fn in this) {\n\t\t\tif (fn.charAt(0) === '_') {\n\t\t\t\tthis[fn] = this[fn].bind(this);\n\t\t\t}\n\t\t}\n\n\t\t// Setup drag mode\n\t\tthis.nativeDraggable = options.forceFallback ? false : supportDraggable;\n\n\t\t// Bind events\n\t\t_on(el, 'mousedown', this._onTapStart);\n\t\t_on(el, 'touchstart', this._onTapStart);\n\n\t\tif (this.nativeDraggable) {\n\t\t\t_on(el, 'dragover', this);\n\t\t\t_on(el, 'dragenter', this);\n\t\t}\n\n\t\ttouchDragOverListeners.push(this._onDragOver);\n\n\t\t// Restore sorting\n\t\toptions.store && this.sort(options.store.get(this));\n\t}\n\n\n\tSortable.prototype = /** @lends Sortable.prototype */ {\n\t\tconstructor: Sortable,\n\n\t\t_onTapStart: function (/** Event|TouchEvent */evt) {\n\t\t\tvar _this = this,\n\t\t\t\tel = this.el,\n\t\t\t\toptions = this.options,\n\t\t\t\ttype = evt.type,\n\t\t\t\ttouch = evt.touches && evt.touches[0],\n\t\t\t\ttarget = (touch || evt).target,\n\t\t\t\toriginalTarget = target,\n\t\t\t\tfilter = options.filter;\n\n\n\t\t\tif (type === 'mousedown' && evt.button !== 0 || options.disabled) {\n\t\t\t\treturn; // only left button or enabled\n\t\t\t}\n\n\t\t\ttarget = _closest(target, options.draggable, el);\n\n\t\t\tif (!target) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// get the index of the dragged element within its parent\n\t\t\toldIndex = _index(target);\n\n\t\t\t// Check filter\n\t\t\tif (typeof filter === 'function') {\n\t\t\t\tif (filter.call(this, evt, target, this)) {\n\t\t\t\t\t_dispatchEvent(_this, originalTarget, 'filter', target, el, oldIndex);\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\treturn; // cancel dnd\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (filter) {\n\t\t\t\tfilter = filter.split(',').some(function (criteria) {\n\t\t\t\t\tcriteria = _closest(originalTarget, criteria.trim(), el);\n\n\t\t\t\t\tif (criteria) {\n\t\t\t\t\t\t_dispatchEvent(_this, criteria, 'filter', target, el, oldIndex);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif (filter) {\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\treturn; // cancel dnd\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\tif (options.handle && !_closest(originalTarget, options.handle, el)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\n\t\t\t// Prepare `dragstart`\n\t\t\tthis._prepareDragStart(evt, touch, target);\n\t\t},\n\n\t\t_prepareDragStart: function (/** Event */evt, /** Touch */touch, /** HTMLElement */target) {\n\t\t\tvar _this = this,\n\t\t\t\tel = _this.el,\n\t\t\t\toptions = _this.options,\n\t\t\t\townerDocument = el.ownerDocument,\n\t\t\t\tdragStartFn;\n\n\t\t\tif (target && !dragEl && (target.parentNode === el)) {\n\t\t\t\ttapEvt = evt;\n\n\t\t\t\trootEl = el;\n\t\t\t\tdragEl = target;\n\t\t\t\tparentEl = dragEl.parentNode;\n\t\t\t\tnextEl = dragEl.nextSibling;\n\t\t\t\tactiveGroup = options.group;\n\n\t\t\t\tdragStartFn = function () {\n\t\t\t\t\t// Delayed drag has been triggered\n\t\t\t\t\t// we can re-enable the events: touchmove/mousemove\n\t\t\t\t\t_this._disableDelayedDrag();\n\n\t\t\t\t\t// Make the element draggable\n\t\t\t\t\tdragEl.draggable = true;\n\n\t\t\t\t\t// Chosen item\n\t\t\t\t\t_toggleClass(dragEl, _this.options.chosenClass, true);\n\n\t\t\t\t\t// Bind the events: dragstart/dragend\n\t\t\t\t\t_this._triggerDragStart(touch);\n\t\t\t\t};\n\n\t\t\t\t// Disable \"draggable\"\n\t\t\t\toptions.ignore.split(',').forEach(function (criteria) {\n\t\t\t\t\t_find(dragEl, criteria.trim(), _disableDraggable);\n\t\t\t\t});\n\n\t\t\t\t_on(ownerDocument, 'mouseup', _this._onDrop);\n\t\t\t\t_on(ownerDocument, 'touchend', _this._onDrop);\n\t\t\t\t_on(ownerDocument, 'touchcancel', _this._onDrop);\n\n\t\t\t\tif (options.delay) {\n\t\t\t\t\t// If the user moves the pointer or let go the click or touch\n\t\t\t\t\t// before the delay has been reached:\n\t\t\t\t\t// disable the delayed drag\n\t\t\t\t\t_on(ownerDocument, 'mouseup', _this._disableDelayedDrag);\n\t\t\t\t\t_on(ownerDocument, 'touchend', _this._disableDelayedDrag);\n\t\t\t\t\t_on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);\n\t\t\t\t\t_on(ownerDocument, 'mousemove', _this._disableDelayedDrag);\n\t\t\t\t\t_on(ownerDocument, 'touchmove', _this._disableDelayedDrag);\n\n\t\t\t\t\t_this._dragStartTimer = setTimeout(dragStartFn, options.delay);\n\t\t\t\t} else {\n\t\t\t\t\tdragStartFn();\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t_disableDelayedDrag: function () {\n\t\t\tvar ownerDocument = this.el.ownerDocument;\n\n\t\t\tclearTimeout(this._dragStartTimer);\n\t\t\t_off(ownerDocument, 'mouseup', this._disableDelayedDrag);\n\t\t\t_off(ownerDocument, 'touchend', this._disableDelayedDrag);\n\t\t\t_off(ownerDocument, 'touchcancel', this._disableDelayedDrag);\n\t\t\t_off(ownerDocument, 'mousemove', this._disableDelayedDrag);\n\t\t\t_off(ownerDocument, 'touchmove', this._disableDelayedDrag);\n\t\t},\n\n\t\t_triggerDragStart: function (/** Touch */touch) {\n\t\t\tif (touch) {\n\t\t\t\t// Touch device support\n\t\t\t\ttapEvt = {\n\t\t\t\t\ttarget: dragEl,\n\t\t\t\t\tclientX: touch.clientX,\n\t\t\t\t\tclientY: touch.clientY\n\t\t\t\t};\n\n\t\t\t\tthis._onDragStart(tapEvt, 'touch');\n\t\t\t}\n\t\t\telse if (!this.nativeDraggable) {\n\t\t\t\tthis._onDragStart(tapEvt, true);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t_on(dragEl, 'dragend', this);\n\t\t\t\t_on(rootEl, 'dragstart', this._onDragStart);\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tif (document.selection) {\n\t\t\t\t\tdocument.selection.empty();\n\t\t\t\t} else {\n\t\t\t\t\twindow.getSelection().removeAllRanges();\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t}\n\t\t},\n\n\t\t_dragStarted: function () {\n\t\t\tif (rootEl && dragEl) {\n\t\t\t\t// Apply effect\n\t\t\t\t_toggleClass(dragEl, this.options.ghostClass, true);\n\n\t\t\t\tSortable.active = this;\n\n\t\t\t\t// Drag start event\n\t\t\t\t_dispatchEvent(this, rootEl, 'start', dragEl, rootEl, oldIndex);\n\t\t\t}\n\t\t},\n\n\t\t_emulateDragOver: function () {\n\t\t\tif (touchEvt) {\n\t\t\t\tif (this._lastX === touchEvt.clientX && this._lastY === touchEvt.clientY) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis._lastX = touchEvt.clientX;\n\t\t\t\tthis._lastY = touchEvt.clientY;\n\n\t\t\t\tif (!supportCssPointerEvents) {\n\t\t\t\t\t_css(ghostEl, 'display', 'none');\n\t\t\t\t}\n\n\t\t\t\tvar target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY),\n\t\t\t\t\tparent = target,\n\t\t\t\t\tgroupName = ' ' + this.options.group.name + '',\n\t\t\t\t\ti = touchDragOverListeners.length;\n\n\t\t\t\tif (parent) {\n\t\t\t\t\tdo {\n\t\t\t\t\t\tif (parent[expando] && parent[expando].options.groups.indexOf(groupName) > -1) {\n\t\t\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\t\t\ttouchDragOverListeners[i]({\n\t\t\t\t\t\t\t\t\tclientX: touchEvt.clientX,\n\t\t\t\t\t\t\t\t\tclientY: touchEvt.clientY,\n\t\t\t\t\t\t\t\t\ttarget: target,\n\t\t\t\t\t\t\t\t\trootEl: parent\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttarget = parent; // store last element\n\t\t\t\t\t}\n\t\t\t\t\t/* jshint boss:true */\n\t\t\t\t\twhile (parent = parent.parentNode);\n\t\t\t\t}\n\n\t\t\t\tif (!supportCssPointerEvents) {\n\t\t\t\t\t_css(ghostEl, 'display', '');\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\n\t\t_onTouchMove: function (/**TouchEvent*/evt) {\n\t\t\tif (tapEvt) {\n\t\t\t\t// only set the status to dragging, when we are actually dragging\n\t\t\t\tif (!Sortable.active) {\n\t\t\t\t\tthis._dragStarted();\n\t\t\t\t}\n\n\t\t\t\t// as well as creating the ghost element on the document body\n\t\t\t\tthis._appendGhost();\n\n\t\t\t\tvar touch = evt.touches ? evt.touches[0] : evt,\n\t\t\t\t\tdx = touch.clientX - tapEvt.clientX,\n\t\t\t\t\tdy = touch.clientY - tapEvt.clientY,\n\t\t\t\t\ttranslate3d = evt.touches ? 'translate3d(' + dx + 'px,' + dy + 'px,0)' : 'translate(' + dx + 'px,' + dy + 'px)';\n\n\t\t\t\tmoved = true;\n\t\t\t\ttouchEvt = touch;\n\n\t\t\t\t_css(ghostEl, 'webkitTransform', translate3d);\n\t\t\t\t_css(ghostEl, 'mozTransform', translate3d);\n\t\t\t\t_css(ghostEl, 'msTransform', translate3d);\n\t\t\t\t_css(ghostEl, 'transform', translate3d);\n\n\t\t\t\tevt.preventDefault();\n\t\t\t}\n\t\t},\n\n\t\t_appendGhost: function () {\n\t\t\tif (!ghostEl) {\n\t\t\t\tvar rect = dragEl.getBoundingClientRect(),\n\t\t\t\t\tcss = _css(dragEl),\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\tghostRect;\n\n\t\t\t\tghostEl = dragEl.cloneNode(true);\n\n\t\t\t\t_toggleClass(ghostEl, options.ghostClass, false);\n\t\t\t\t_toggleClass(ghostEl, options.fallbackClass, true);\n\n\t\t\t\t_css(ghostEl, 'top', rect.top - parseInt(css.marginTop, 10));\n\t\t\t\t_css(ghostEl, 'left', rect.left - parseInt(css.marginLeft, 10));\n\t\t\t\t_css(ghostEl, 'width', rect.width);\n\t\t\t\t_css(ghostEl, 'height', rect.height);\n\t\t\t\t_css(ghostEl, 'opacity', '0.8');\n\t\t\t\t_css(ghostEl, 'position', 'fixed');\n\t\t\t\t_css(ghostEl, 'zIndex', '100000');\n\t\t\t\t_css(ghostEl, 'pointerEvents', 'none');\n\n\t\t\t\toptions.fallbackOnBody && document.body.appendChild(ghostEl) || rootEl.appendChild(ghostEl);\n\n\t\t\t\t// Fixing dimensions.\n\t\t\t\tghostRect = ghostEl.getBoundingClientRect();\n\t\t\t\t_css(ghostEl, 'width', rect.width * 2 - ghostRect.width);\n\t\t\t\t_css(ghostEl, 'height', rect.height * 2 - ghostRect.height);\n\t\t\t}\n\t\t},\n\n\t\t_onDragStart: function (/**Event*/evt, /**boolean*/useFallback) {\n\t\t\tvar dataTransfer = evt.dataTransfer,\n\t\t\t\toptions = this.options;\n\n\t\t\tthis._offUpEvents();\n\n\t\t\tif (activeGroup.pull == 'clone') {\n\t\t\t\tcloneEl = dragEl.cloneNode(true);\n\t\t\t\t_css(cloneEl, 'display', 'none');\n\t\t\t\trootEl.insertBefore(cloneEl, dragEl);\n\t\t\t}\n\n\t\t\tif (useFallback) {\n\n\t\t\t\tif (useFallback === 'touch') {\n\t\t\t\t\t// Bind touch events\n\t\t\t\t\t_on(document, 'touchmove', this._onTouchMove);\n\t\t\t\t\t_on(document, 'touchend', this._onDrop);\n\t\t\t\t\t_on(document, 'touchcancel', this._onDrop);\n\t\t\t\t} else {\n\t\t\t\t\t// Old brwoser\n\t\t\t\t\t_on(document, 'mousemove', this._onTouchMove);\n\t\t\t\t\t_on(document, 'mouseup', this._onDrop);\n\t\t\t\t}\n\n\t\t\t\tthis._loopId = setInterval(this._emulateDragOver, 50);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (dataTransfer) {\n\t\t\t\t\tdataTransfer.effectAllowed = 'move';\n\t\t\t\t\toptions.setData && options.setData.call(this, dataTransfer, dragEl);\n\t\t\t\t}\n\n\t\t\t\t_on(document, 'drop', this);\n\t\t\t\tsetTimeout(this._dragStarted, 0);\n\t\t\t}\n\t\t},\n\n\t\t_onDragOver: function (/**Event*/evt) {\n\t\t\tvar el = this.el,\n\t\t\t\ttarget,\n\t\t\t\tdragRect,\n\t\t\t\trevert,\n\t\t\t\toptions = this.options,\n\t\t\t\tgroup = options.group,\n\t\t\t\tgroupPut = group.put,\n\t\t\t\tisOwner = (activeGroup === group),\n\t\t\t\tcanSort = options.sort;\n\n\t\t\tif (evt.preventDefault !== void 0) {\n\t\t\t\tevt.preventDefault();\n\t\t\t\t!options.dragoverBubble && evt.stopPropagation();\n\t\t\t}\n\n\t\t\tmoved = true;\n\n\t\t\tif (activeGroup && !options.disabled &&\n\t\t\t\t(isOwner\n\t\t\t\t\t? canSort || (revert = !rootEl.contains(dragEl)) // Reverting item into the original list\n\t\t\t\t\t: activeGroup.pull && groupPut && (\n\t\t\t\t\t\t(activeGroup.name === group.name) || // by Name\n\t\t\t\t\t\t(groupPut.indexOf && ~groupPut.indexOf(activeGroup.name)) // by Array\n\t\t\t\t\t)\n\t\t\t\t) &&\n\t\t\t\t(evt.rootEl === void 0 || evt.rootEl === this.el) // touch fallback\n\t\t\t) {\n\t\t\t\t// Smart auto-scrolling\n\t\t\t\t_autoScroll(evt, options, this.el);\n\n\t\t\t\tif (_silent) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\ttarget = _closest(evt.target, options.draggable, el);\n\t\t\t\tdragRect = dragEl.getBoundingClientRect();\n\n\t\t\t\tif (revert) {\n\t\t\t\t\t_cloneHide(true);\n\n\t\t\t\t\tif (cloneEl || nextEl) {\n\t\t\t\t\t\trootEl.insertBefore(dragEl, cloneEl || nextEl);\n\t\t\t\t\t}\n\t\t\t\t\telse if (!canSort) {\n\t\t\t\t\t\trootEl.appendChild(dragEl);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\n\t\t\t\tif ((el.children.length === 0) || (el.children[0] === ghostEl) ||\n\t\t\t\t\t(el === evt.target) && (target = _ghostIsLast(el, evt))\n\t\t\t\t) {\n\n\t\t\t\t\tif (target) {\n\t\t\t\t\t\tif (target.animated) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttargetRect = target.getBoundingClientRect();\n\t\t\t\t\t}\n\n\t\t\t\t\t_cloneHide(isOwner);\n\n\t\t\t\t\tif (_onMove(rootEl, el, dragEl, dragRect, target, targetRect) !== false) {\n\t\t\t\t\t\tif (!dragEl.contains(el)) {\n\t\t\t\t\t\t\tel.appendChild(dragEl);\n\t\t\t\t\t\t\tparentEl = el; // actualization\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis._animate(dragRect, dragEl);\n\t\t\t\t\t\ttarget && this._animate(targetRect, target);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (target && !target.animated && target !== dragEl && (target.parentNode[expando] !== void 0)) {\n\t\t\t\t\tif (lastEl !== target) {\n\t\t\t\t\t\tlastEl = target;\n\t\t\t\t\t\tlastCSS = _css(target);\n\t\t\t\t\t\tlastParentCSS = _css(target.parentNode);\n\t\t\t\t\t}\n\n\n\t\t\t\t\tvar targetRect = target.getBoundingClientRect(),\n\t\t\t\t\t\twidth = targetRect.right - targetRect.left,\n\t\t\t\t\t\theight = targetRect.bottom - targetRect.top,\n\t\t\t\t\t\tfloating = /left|right|inline/.test(lastCSS.cssFloat + lastCSS.display)\n\t\t\t\t\t\t\t|| (lastParentCSS.display == 'flex' && lastParentCSS['flex-direction'].indexOf('row') === 0),\n\t\t\t\t\t\tisWide = (target.offsetWidth > dragEl.offsetWidth),\n\t\t\t\t\t\tisLong = (target.offsetHeight > dragEl.offsetHeight),\n\t\t\t\t\t\thalfway = (floating ? (evt.clientX - targetRect.left) / width : (evt.clientY - targetRect.top) / height) > 0.5,\n\t\t\t\t\t\tnextSibling = target.nextElementSibling,\n\t\t\t\t\t\tmoveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect),\n\t\t\t\t\t\tafter\n\t\t\t\t\t;\n\n\t\t\t\t\tif (moveVector !== false) {\n\t\t\t\t\t\t_silent = true;\n\t\t\t\t\t\tsetTimeout(_unsilent, 30);\n\n\t\t\t\t\t\t_cloneHide(isOwner);\n\n\t\t\t\t\t\tif (moveVector === 1 || moveVector === -1) {\n\t\t\t\t\t\t\tafter = (moveVector === 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (floating) {\n\t\t\t\t\t\t\tvar elTop = dragEl.offsetTop,\n\t\t\t\t\t\t\t\ttgTop = target.offsetTop;\n\n\t\t\t\t\t\t\tif (elTop === tgTop) {\n\t\t\t\t\t\t\t\tafter = (target.previousElementSibling === dragEl) && !isWide || halfway && isWide;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tafter = tgTop > elTop;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tafter = (nextSibling !== dragEl) && !isLong || halfway && isLong;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!dragEl.contains(el)) {\n\t\t\t\t\t\t\tif (after && !nextSibling) {\n\t\t\t\t\t\t\t\tel.appendChild(dragEl);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ttarget.parentNode.insertBefore(dragEl, after ? nextSibling : target);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tparentEl = dragEl.parentNode; // actualization\n\n\t\t\t\t\t\tthis._animate(dragRect, dragEl);\n\t\t\t\t\t\tthis._animate(targetRect, target);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t_animate: function (prevRect, target) {\n\t\t\tvar ms = this.options.animation;\n\n\t\t\tif (ms) {\n\t\t\t\tvar currentRect = target.getBoundingClientRect();\n\n\t\t\t\t_css(target, 'transition', 'none');\n\t\t\t\t_css(target, 'transform', 'translate3d('\n\t\t\t\t\t+ (prevRect.left - currentRect.left) + 'px,'\n\t\t\t\t\t+ (prevRect.top - currentRect.top) + 'px,0)'\n\t\t\t\t);\n\n\t\t\t\ttarget.offsetWidth; // repaint\n\n\t\t\t\t_css(target, 'transition', 'all ' + ms + 'ms');\n\t\t\t\t_css(target, 'transform', 'translate3d(0,0,0)');\n\n\t\t\t\tclearTimeout(target.animated);\n\t\t\t\ttarget.animated = setTimeout(function () {\n\t\t\t\t\t_css(target, 'transition', '');\n\t\t\t\t\t_css(target, 'transform', '');\n\t\t\t\t\ttarget.animated = false;\n\t\t\t\t}, ms);\n\t\t\t}\n\t\t},\n\n\t\t_offUpEvents: function () {\n\t\t\tvar ownerDocument = this.el.ownerDocument;\n\n\t\t\t_off(document, 'touchmove', this._onTouchMove);\n\t\t\t_off(ownerDocument, 'mouseup', this._onDrop);\n\t\t\t_off(ownerDocument, 'touchend', this._onDrop);\n\t\t\t_off(ownerDocument, 'touchcancel', this._onDrop);\n\t\t},\n\n\t\t_onDrop: function (/**Event*/evt) {\n\t\t\tvar el = this.el,\n\t\t\t\toptions = this.options;\n\n\t\t\tclearInterval(this._loopId);\n\t\t\tclearInterval(autoScroll.pid);\n\t\t\tclearTimeout(this._dragStartTimer);\n\n\t\t\t// Unbind events\n\t\t\t_off(document, 'mousemove', this._onTouchMove);\n\n\t\t\tif (this.nativeDraggable) {\n\t\t\t\t_off(document, 'drop', this);\n\t\t\t\t_off(el, 'dragstart', this._onDragStart);\n\t\t\t}\n\n\t\t\tthis._offUpEvents();\n\n\t\t\tif (evt) {\n\t\t\t\tif (moved) {\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\t!options.dropBubble && evt.stopPropagation();\n\t\t\t\t}\n\n\t\t\t\tghostEl && ghostEl.parentNode.removeChild(ghostEl);\n\n\t\t\t\tif (dragEl) {\n\t\t\t\t\tif (this.nativeDraggable) {\n\t\t\t\t\t\t_off(dragEl, 'dragend', this);\n\t\t\t\t\t}\n\n\t\t\t\t\t_disableDraggable(dragEl);\n\n\t\t\t\t\t// Remove class's\n\t\t\t\t\t_toggleClass(dragEl, this.options.ghostClass, false);\n\t\t\t\t\t_toggleClass(dragEl, this.options.chosenClass, false);\n\n\t\t\t\t\tif (rootEl !== parentEl) {\n\t\t\t\t\t\tnewIndex = _index(dragEl);\n\n\t\t\t\t\t\tif (newIndex >= 0) {\n\t\t\t\t\t\t\t// drag from one list and drop into another\n\t\t\t\t\t\t\t_dispatchEvent(null, parentEl, 'sort', dragEl, rootEl, oldIndex, newIndex);\n\t\t\t\t\t\t\t_dispatchEvent(this, rootEl, 'sort', dragEl, rootEl, oldIndex, newIndex);\n\n\t\t\t\t\t\t\t// Add event\n\t\t\t\t\t\t\t_dispatchEvent(null, parentEl, 'add', dragEl, rootEl, oldIndex, newIndex);\n\n\t\t\t\t\t\t\t// Remove event\n\t\t\t\t\t\t\t_dispatchEvent(this, rootEl, 'remove', dragEl, rootEl, oldIndex, newIndex);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// Remove clone\n\t\t\t\t\t\tcloneEl && cloneEl.parentNode.removeChild(cloneEl);\n\n\t\t\t\t\t\tif (dragEl.nextSibling !== nextEl) {\n\t\t\t\t\t\t\t// Get the index of the dragged element within its parent\n\t\t\t\t\t\t\tnewIndex = _index(dragEl);\n\n\t\t\t\t\t\t\tif (newIndex >= 0) {\n\t\t\t\t\t\t\t\t// drag & drop within the same list\n\t\t\t\t\t\t\t\t_dispatchEvent(this, rootEl, 'update', dragEl, rootEl, oldIndex, newIndex);\n\t\t\t\t\t\t\t\t_dispatchEvent(this, rootEl, 'sort', dragEl, rootEl, oldIndex, newIndex);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (Sortable.active) {\n\t\t\t\t\t\tif (newIndex === null || newIndex === -1) {\n\t\t\t\t\t\t\tnewIndex = oldIndex;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t_dispatchEvent(this, rootEl, 'end', dragEl, rootEl, oldIndex, newIndex);\n\n\t\t\t\t\t\t// Save sorting\n\t\t\t\t\t\tthis.save();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Nulling\n\t\t\t\trootEl =\n\t\t\t\tdragEl =\n\t\t\t\tparentEl =\n\t\t\t\tghostEl =\n\t\t\t\tnextEl =\n\t\t\t\tcloneEl =\n\n\t\t\t\tscrollEl =\n\t\t\t\tscrollParentEl =\n\n\t\t\t\ttapEvt =\n\t\t\t\ttouchEvt =\n\n\t\t\t\tmoved =\n\t\t\t\tnewIndex =\n\n\t\t\t\tlastEl =\n\t\t\t\tlastCSS =\n\n\t\t\t\tactiveGroup =\n\t\t\t\tSortable.active = null;\n\t\t\t}\n\t\t},\n\n\n\t\thandleEvent: function (/**Event*/evt) {\n\t\t\tvar type = evt.type;\n\n\t\t\tif (type === 'dragover' || type === 'dragenter') {\n\t\t\t\tif (dragEl) {\n\t\t\t\t\tthis._onDragOver(evt);\n\t\t\t\t\t_globalDragOver(evt);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (type === 'drop' || type === 'dragend') {\n\t\t\t\tthis._onDrop(evt);\n\t\t\t}\n\t\t},\n\n\n\t\t/**\n\t\t * Serializes the item into an array of string.\n\t\t * @returns {String[]}\n\t\t */\n\t\ttoArray: function () {\n\t\t\tvar order = [],\n\t\t\t\tel,\n\t\t\t\tchildren = this.el.children,\n\t\t\t\ti = 0,\n\t\t\t\tn = children.length,\n\t\t\t\toptions = this.options;\n\n\t\t\tfor (; i < n; i++) {\n\t\t\t\tel = children[i];\n\t\t\t\tif (_closest(el, options.draggable, this.el)) {\n\t\t\t\t\torder.push(el.getAttribute(options.dataIdAttr) || _generateId(el));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn order;\n\t\t},\n\n\n\t\t/**\n\t\t * Sorts the elements according to the array.\n\t\t * @param {String[]} order order of the items\n\t\t */\n\t\tsort: function (order) {\n\t\t\tvar items = {}, rootEl = this.el;\n\n\t\t\tthis.toArray().forEach(function (id, i) {\n\t\t\t\tvar el = rootEl.children[i];\n\n\t\t\t\tif (_closest(el, this.options.draggable, rootEl)) {\n\t\t\t\t\titems[id] = el;\n\t\t\t\t}\n\t\t\t}, this);\n\n\t\t\torder.forEach(function (id) {\n\t\t\t\tif (items[id]) {\n\t\t\t\t\trootEl.removeChild(items[id]);\n\t\t\t\t\trootEl.appendChild(items[id]);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\n\t\t/**\n\t\t * Save the current sorting\n\t\t */\n\t\tsave: function () {\n\t\t\tvar store = this.options.store;\n\t\t\tstore && store.set(this);\n\t\t},\n\n\n\t\t/**\n\t\t * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.\n\t\t * @param {HTMLElement} el\n\t\t * @param {String} [selector] default: `options.draggable`\n\t\t * @returns {HTMLElement|null}\n\t\t */\n\t\tclosest: function (el, selector) {\n\t\t\treturn _closest(el, selector || this.options.draggable, this.el);\n\t\t},\n\n\n\t\t/**\n\t\t * Set/get option\n\t\t * @param {string} name\n\t\t * @param {*} [value]\n\t\t * @returns {*}\n\t\t */\n\t\toption: function (name, value) {\n\t\t\tvar options = this.options;\n\n\t\t\tif (value === void 0) {\n\t\t\t\treturn options[name];\n\t\t\t} else {\n\t\t\t\toptions[name] = value;\n\n\t\t\t\tif (name === 'group') {\n\t\t\t\t\t_prepareGroup(options);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\n\t\t/**\n\t\t * Destroy\n\t\t */\n\t\tdestroy: function () {\n\t\t\tvar el = this.el;\n\n\t\t\tel[expando] = null;\n\n\t\t\t_off(el, 'mousedown', this._onTapStart);\n\t\t\t_off(el, 'touchstart', this._onTapStart);\n\n\t\t\tif (this.nativeDraggable) {\n\t\t\t\t_off(el, 'dragover', this);\n\t\t\t\t_off(el, 'dragenter', this);\n\t\t\t}\n\n\t\t\t// Remove draggable attributes\n\t\t\tArray.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {\n\t\t\t\tel.removeAttribute('draggable');\n\t\t\t});\n\n\t\t\ttouchDragOverListeners.splice(touchDragOverListeners.indexOf(this._onDragOver), 1);\n\n\t\t\tthis._onDrop();\n\n\t\t\tthis.el = el = null;\n\t\t}\n\t};\n\n\n\tfunction _cloneHide(state) {\n\t\tif (cloneEl && (cloneEl.state !== state)) {\n\t\t\t_css(cloneEl, 'display', state ? 'none' : '');\n\t\t\t!state && cloneEl.state && rootEl.insertBefore(cloneEl, dragEl);\n\t\t\tcloneEl.state = state;\n\t\t}\n\t}\n\n\n\tfunction _closest(/**HTMLElement*/el, /**String*/selector, /**HTMLElement*/ctx) {\n\t\tif (el) {\n\t\t\tctx = ctx || document;\n\t\t\tselector = selector.split('.');\n\n\t\t\tvar tag = selector.shift().toUpperCase(),\n\t\t\t\tre = new RegExp('\\\\s(' + selector.join('|') + ')(?=\\\\s)', 'g');\n\n\t\t\tdo {\n\t\t\t\tif (\n\t\t\t\t\t(tag === '>*' && el.parentNode === ctx) || (\n\t\t\t\t\t\t(tag === '' || el.nodeName.toUpperCase() == tag) &&\n\t\t\t\t\t\t(!selector.length || ((' ' + el.className + ' ').match(re) || []).length == selector.length)\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\treturn el;\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile (el !== ctx && (el = el.parentNode));\n\t\t}\n\n\t\treturn null;\n\t}\n\n\n\tfunction _globalDragOver(/**Event*/evt) {\n\t\tif (evt.dataTransfer) {\n\t\t\tevt.dataTransfer.dropEffect = 'move';\n\t\t}\n\t\tevt.preventDefault();\n\t}\n\n\n\tfunction _on(el, event, fn) {\n\t\tel.addEventListener(event, fn, false);\n\t}\n\n\n\tfunction _off(el, event, fn) {\n\t\tel.removeEventListener(event, fn, false);\n\t}\n\n\n\tfunction _toggleClass(el, name, state) {\n\t\tif (el) {\n\t\t\tif (el.classList) {\n\t\t\t\tel.classList[state ? 'add' : 'remove'](name);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvar className = (' ' + el.className + ' ').replace(RSPACE, ' ').replace(' ' + name + ' ', ' ');\n\t\t\t\tel.className = (className + (state ? ' ' + name : '')).replace(RSPACE, ' ');\n\t\t\t}\n\t\t}\n\t}\n\n\n\tfunction _css(el, prop, val) {\n\t\tvar style = el && el.style;\n\n\t\tif (style) {\n\t\t\tif (val === void 0) {\n\t\t\t\tif (document.defaultView && document.defaultView.getComputedStyle) {\n\t\t\t\t\tval = document.defaultView.getComputedStyle(el, '');\n\t\t\t\t}\n\t\t\t\telse if (el.currentStyle) {\n\t\t\t\t\tval = el.currentStyle;\n\t\t\t\t}\n\n\t\t\t\treturn prop === void 0 ? val : val[prop];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!(prop in style)) {\n\t\t\t\t\tprop = '-webkit-' + prop;\n\t\t\t\t}\n\n\t\t\t\tstyle[prop] = val + (typeof val === 'string' ? '' : 'px');\n\t\t\t}\n\t\t}\n\t}\n\n\n\tfunction _find(ctx, tagName, iterator) {\n\t\tif (ctx) {\n\t\t\tvar list = ctx.getElementsByTagName(tagName), i = 0, n = list.length;\n\n\t\t\tif (iterator) {\n\t\t\t\tfor (; i < n; i++) {\n\t\t\t\t\titerator(list[i], i);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn list;\n\t\t}\n\n\t\treturn [];\n\t}\n\n\n\n\tfunction _dispatchEvent(sortable, rootEl, name, targetEl, fromEl, startIndex, newIndex) {\n\t\tvar evt = document.createEvent('Event'),\n\t\t\toptions = (sortable || rootEl[expando]).options,\n\t\t\tonName = 'on' + name.charAt(0).toUpperCase() + name.substr(1);\n\n\t\tevt.initEvent(name, true, true);\n\n\t\tevt.to = rootEl;\n\t\tevt.from = fromEl || rootEl;\n\t\tevt.item = targetEl || rootEl;\n\t\tevt.clone = cloneEl;\n\n\t\tevt.oldIndex = startIndex;\n\t\tevt.newIndex = newIndex;\n\n\t\trootEl.dispatchEvent(evt);\n\n\t\tif (options[onName]) {\n\t\t\toptions[onName].call(sortable, evt);\n\t\t}\n\t}\n\n\n\tfunction _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect) {\n\t\tvar evt,\n\t\t\tsortable = fromEl[expando],\n\t\t\tonMoveFn = sortable.options.onMove,\n\t\t\tretVal;\n\n\t\tevt = document.createEvent('Event');\n\t\tevt.initEvent('move', true, true);\n\n\t\tevt.to = toEl;\n\t\tevt.from = fromEl;\n\t\tevt.dragged = dragEl;\n\t\tevt.draggedRect = dragRect;\n\t\tevt.related = targetEl || toEl;\n\t\tevt.relatedRect = targetRect || toEl.getBoundingClientRect();\n\n\t\tfromEl.dispatchEvent(evt);\n\n\t\tif (onMoveFn) {\n\t\t\tretVal = onMoveFn.call(sortable, evt);\n\t\t}\n\n\t\treturn retVal;\n\t}\n\n\n\tfunction _disableDraggable(el) {\n\t\tel.draggable = false;\n\t}\n\n\n\tfunction _unsilent() {\n\t\t_silent = false;\n\t}\n\n\n\t/** @returns {HTMLElement|false} */\n\tfunction _ghostIsLast(el, evt) {\n\t\tvar lastEl = el.lastElementChild,\n\t\t\t\trect = lastEl.getBoundingClientRect();\n\n\t\treturn ((evt.clientY - (rect.top + rect.height) > 5) || (evt.clientX - (rect.right + rect.width) > 5)) && lastEl; // min delta\n\t}\n\n\n\t/**\n\t * Generate id\n\t * @param {HTMLElement} el\n\t * @returns {String}\n\t * @private\n\t */\n\tfunction _generateId(el) {\n\t\tvar str = el.tagName + el.className + el.src + el.href + el.textContent,\n\t\t\ti = str.length,\n\t\t\tsum = 0;\n\n\t\twhile (i--) {\n\t\t\tsum += str.charCodeAt(i);\n\t\t}\n\n\t\treturn sum.toString(36);\n\t}\n\n\t/**\n\t * Returns the index of an element within its parent\n\t * @param {HTMLElement} el\n\t * @return {number}\n\t */\n\tfunction _index(el) {\n\t\tvar index = 0;\n\n\t\tif (!el || !el.parentNode) {\n\t\t\treturn -1;\n\t\t}\n\n\t\twhile (el && (el = el.previousElementSibling)) {\n\t\t\tif (el.nodeName.toUpperCase() !== 'TEMPLATE') {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\n\t\treturn index;\n\t}\n\n\tfunction _throttle(callback, ms) {\n\t\tvar args, _this;\n\n\t\treturn function () {\n\t\t\tif (args === void 0) {\n\t\t\t\targs = arguments;\n\t\t\t\t_this = this;\n\n\t\t\t\tsetTimeout(function () {\n\t\t\t\t\tif (args.length === 1) {\n\t\t\t\t\t\tcallback.call(_this, args[0]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcallback.apply(_this, args);\n\t\t\t\t\t}\n\n\t\t\t\t\targs = void 0;\n\t\t\t\t}, ms);\n\t\t\t}\n\t\t};\n\t}\n\n\tfunction _extend(dst, src) {\n\t\tif (dst && src) {\n\t\t\tfor (var key in src) {\n\t\t\t\tif (src.hasOwnProperty(key)) {\n\t\t\t\t\tdst[key] = src[key];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn dst;\n\t}\n\n\n\t// Export utils\n\tSortable.utils = {\n\t\ton: _on,\n\t\toff: _off,\n\t\tcss: _css,\n\t\tfind: _find,\n\t\tis: function (el, selector) {\n\t\t\treturn !!_closest(el, selector, el);\n\t\t},\n\t\textend: _extend,\n\t\tthrottle: _throttle,\n\t\tclosest: _closest,\n\t\ttoggleClass: _toggleClass,\n\t\tindex: _index\n\t};\n\n\n\t/**\n\t * Create sortable instance\n\t * @param {HTMLElement} el\n\t * @param {Object} [options]\n\t */\n\tSortable.create = function (el, options) {\n\t\treturn new Sortable(el, options);\n\t};\n\n\n\t// Export\n\tSortable.version = '1.4.2';\n\treturn Sortable;\n});\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/sortablejs/Sortable.js\n ** module id = 212\n ** module chunks = 1\n **/","/**\n * selectize.js (v0.12.1)\n * Copyright (c) 2013–2015 Brian Reavis & contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this\n * file except in compliance with the License. You may obtain a copy of the License at:\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF\n * ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n *\n * @author Brian Reavis \n */\n\n/*jshint curly:false */\n/*jshint browser:true */\n\n(function(root, factory) {\n\tif (typeof define === 'function' && define.amd) {\n\t\tdefine(['jquery','sifter','microplugin'], factory);\n\t} else if (typeof exports === 'object') {\n\t\tmodule.exports = factory(require('jquery'), require('sifter'), require('microplugin'));\n\t} else {\n\t\troot.Selectize = factory(root.jQuery, root.Sifter, root.MicroPlugin);\n\t}\n}(this, function($, Sifter, MicroPlugin) {\n\t'use strict';\n\n\tvar highlight = function($element, pattern) {\n\t\tif (typeof pattern === 'string' && !pattern.length) return;\n\t\tvar regex = (typeof pattern === 'string') ? new RegExp(pattern, 'i') : pattern;\n\t\n\t\tvar highlight = function(node) {\n\t\t\tvar skip = 0;\n\t\t\tif (node.nodeType === 3) {\n\t\t\t\tvar pos = node.data.search(regex);\n\t\t\t\tif (pos >= 0 && node.data.length > 0) {\n\t\t\t\t\tvar match = node.data.match(regex);\n\t\t\t\t\tvar spannode = document.createElement('span');\n\t\t\t\t\tspannode.className = 'highlight';\n\t\t\t\t\tvar middlebit = node.splitText(pos);\n\t\t\t\t\tvar endbit = middlebit.splitText(match[0].length);\n\t\t\t\t\tvar middleclone = middlebit.cloneNode(true);\n\t\t\t\t\tspannode.appendChild(middleclone);\n\t\t\t\t\tmiddlebit.parentNode.replaceChild(spannode, middlebit);\n\t\t\t\t\tskip = 1;\n\t\t\t\t}\n\t\t\t} else if (node.nodeType === 1 && node.childNodes && !/(script|style)/i.test(node.tagName)) {\n\t\t\t\tfor (var i = 0; i < node.childNodes.length; ++i) {\n\t\t\t\t\ti += highlight(node.childNodes[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn skip;\n\t\t};\n\t\n\t\treturn $element.each(function() {\n\t\t\thighlight(this);\n\t\t});\n\t};\n\t\n\tvar MicroEvent = function() {};\n\tMicroEvent.prototype = {\n\t\ton: function(event, fct){\n\t\t\tthis._events = this._events || {};\n\t\t\tthis._events[event] = this._events[event] || [];\n\t\t\tthis._events[event].push(fct);\n\t\t},\n\t\toff: function(event, fct){\n\t\t\tvar n = arguments.length;\n\t\t\tif (n === 0) return delete this._events;\n\t\t\tif (n === 1) return delete this._events[event];\n\t\n\t\t\tthis._events = this._events || {};\n\t\t\tif (event in this._events === false) return;\n\t\t\tthis._events[event].splice(this._events[event].indexOf(fct), 1);\n\t\t},\n\t\ttrigger: function(event /* , args... */){\n\t\t\tthis._events = this._events || {};\n\t\t\tif (event in this._events === false) return;\n\t\t\tfor (var i = 0; i < this._events[event].length; i++){\n\t\t\t\tthis._events[event][i].apply(this, Array.prototype.slice.call(arguments, 1));\n\t\t\t}\n\t\t}\n\t};\n\t\n\t/**\n\t * Mixin will delegate all MicroEvent.js function in the destination object.\n\t *\n\t * - MicroEvent.mixin(Foobar) will make Foobar able to use MicroEvent\n\t *\n\t * @param {object} the object which will support MicroEvent\n\t */\n\tMicroEvent.mixin = function(destObject){\n\t\tvar props = ['on', 'off', 'trigger'];\n\t\tfor (var i = 0; i < props.length; i++){\n\t\t\tdestObject.prototype[props[i]] = MicroEvent.prototype[props[i]];\n\t\t}\n\t};\n\t\n\tvar IS_MAC = /Mac/.test(navigator.userAgent);\n\t\n\tvar KEY_A = 65;\n\tvar KEY_COMMA = 188;\n\tvar KEY_RETURN = 13;\n\tvar KEY_ESC = 27;\n\tvar KEY_LEFT = 37;\n\tvar KEY_UP = 38;\n\tvar KEY_P = 80;\n\tvar KEY_RIGHT = 39;\n\tvar KEY_DOWN = 40;\n\tvar KEY_N = 78;\n\tvar KEY_BACKSPACE = 8;\n\tvar KEY_DELETE = 46;\n\tvar KEY_SHIFT = 16;\n\tvar KEY_CMD = IS_MAC ? 91 : 17;\n\tvar KEY_CTRL = IS_MAC ? 18 : 17;\n\tvar KEY_TAB = 9;\n\t\n\tvar TAG_SELECT = 1;\n\tvar TAG_INPUT = 2;\n\t\n\t// for now, android support in general is too spotty to support validity\n\tvar SUPPORTS_VALIDITY_API = !/android/i.test(window.navigator.userAgent) && !!document.createElement('form').validity;\n\t\n\tvar isset = function(object) {\n\t\treturn typeof object !== 'undefined';\n\t};\n\t\n\t/**\n\t * Converts a scalar to its best string representation\n\t * for hash keys and HTML attribute values.\n\t *\n\t * Transformations:\n\t * 'str' -> 'str'\n\t * null -> ''\n\t * undefined -> ''\n\t * true -> '1'\n\t * false -> '0'\n\t * 0 -> '0'\n\t * 1 -> '1'\n\t *\n\t * @param {string} value\n\t * @returns {string|null}\n\t */\n\tvar hash_key = function(value) {\n\t\tif (typeof value === 'undefined' || value === null) return null;\n\t\tif (typeof value === 'boolean') return value ? '1' : '0';\n\t\treturn value + '';\n\t};\n\t\n\t/**\n\t * Escapes a string for use within HTML.\n\t *\n\t * @param {string} str\n\t * @returns {string}\n\t */\n\tvar escape_html = function(str) {\n\t\treturn (str + '')\n\t\t\t.replace(/&/g, '&')\n\t\t\t.replace(//g, '>')\n\t\t\t.replace(/\"/g, '"');\n\t};\n\t\n\t/**\n\t * Escapes \"$\" characters in replacement strings.\n\t *\n\t * @param {string} str\n\t * @returns {string}\n\t */\n\tvar escape_replace = function(str) {\n\t\treturn (str + '').replace(/\\$/g, '$$$$');\n\t};\n\t\n\tvar hook = {};\n\t\n\t/**\n\t * Wraps `method` on `self` so that `fn`\n\t * is invoked before the original method.\n\t *\n\t * @param {object} self\n\t * @param {string} method\n\t * @param {function} fn\n\t */\n\thook.before = function(self, method, fn) {\n\t\tvar original = self[method];\n\t\tself[method] = function() {\n\t\t\tfn.apply(self, arguments);\n\t\t\treturn original.apply(self, arguments);\n\t\t};\n\t};\n\t\n\t/**\n\t * Wraps `method` on `self` so that `fn`\n\t * is invoked after the original method.\n\t *\n\t * @param {object} self\n\t * @param {string} method\n\t * @param {function} fn\n\t */\n\thook.after = function(self, method, fn) {\n\t\tvar original = self[method];\n\t\tself[method] = function() {\n\t\t\tvar result = original.apply(self, arguments);\n\t\t\tfn.apply(self, arguments);\n\t\t\treturn result;\n\t\t};\n\t};\n\t\n\t/**\n\t * Wraps `fn` so that it can only be invoked once.\n\t *\n\t * @param {function} fn\n\t * @returns {function}\n\t */\n\tvar once = function(fn) {\n\t\tvar called = false;\n\t\treturn function() {\n\t\t\tif (called) return;\n\t\t\tcalled = true;\n\t\t\tfn.apply(this, arguments);\n\t\t};\n\t};\n\t\n\t/**\n\t * Wraps `fn` so that it can only be called once\n\t * every `delay` milliseconds (invoked on the falling edge).\n\t *\n\t * @param {function} fn\n\t * @param {int} delay\n\t * @returns {function}\n\t */\n\tvar debounce = function(fn, delay) {\n\t\tvar timeout;\n\t\treturn function() {\n\t\t\tvar self = this;\n\t\t\tvar args = arguments;\n\t\t\twindow.clearTimeout(timeout);\n\t\t\ttimeout = window.setTimeout(function() {\n\t\t\t\tfn.apply(self, args);\n\t\t\t}, delay);\n\t\t};\n\t};\n\t\n\t/**\n\t * Debounce all fired events types listed in `types`\n\t * while executing the provided `fn`.\n\t *\n\t * @param {object} self\n\t * @param {array} types\n\t * @param {function} fn\n\t */\n\tvar debounce_events = function(self, types, fn) {\n\t\tvar type;\n\t\tvar trigger = self.trigger;\n\t\tvar event_args = {};\n\t\n\t\t// override trigger method\n\t\tself.trigger = function() {\n\t\t\tvar type = arguments[0];\n\t\t\tif (types.indexOf(type) !== -1) {\n\t\t\t\tevent_args[type] = arguments;\n\t\t\t} else {\n\t\t\t\treturn trigger.apply(self, arguments);\n\t\t\t}\n\t\t};\n\t\n\t\t// invoke provided function\n\t\tfn.apply(self, []);\n\t\tself.trigger = trigger;\n\t\n\t\t// trigger queued events\n\t\tfor (type in event_args) {\n\t\t\tif (event_args.hasOwnProperty(type)) {\n\t\t\t\ttrigger.apply(self, event_args[type]);\n\t\t\t}\n\t\t}\n\t};\n\t\n\t/**\n\t * A workaround for http://bugs.jquery.com/ticket/6696\n\t *\n\t * @param {object} $parent - Parent element to listen on.\n\t * @param {string} event - Event name.\n\t * @param {string} selector - Descendant selector to filter by.\n\t * @param {function} fn - Event handler.\n\t */\n\tvar watchChildEvent = function($parent, event, selector, fn) {\n\t\t$parent.on(event, selector, function(e) {\n\t\t\tvar child = e.target;\n\t\t\twhile (child && child.parentNode !== $parent[0]) {\n\t\t\t\tchild = child.parentNode;\n\t\t\t}\n\t\t\te.currentTarget = child;\n\t\t\treturn fn.apply(this, [e]);\n\t\t});\n\t};\n\t\n\t/**\n\t * Determines the current selection within a text input control.\n\t * Returns an object containing:\n\t * - start\n\t * - length\n\t *\n\t * @param {object} input\n\t * @returns {object}\n\t */\n\tvar getSelection = function(input) {\n\t\tvar result = {};\n\t\tif ('selectionStart' in input) {\n\t\t\tresult.start = input.selectionStart;\n\t\t\tresult.length = input.selectionEnd - result.start;\n\t\t} else if (document.selection) {\n\t\t\tinput.focus();\n\t\t\tvar sel = document.selection.createRange();\n\t\t\tvar selLen = document.selection.createRange().text.length;\n\t\t\tsel.moveStart('character', -input.value.length);\n\t\t\tresult.start = sel.text.length - selLen;\n\t\t\tresult.length = selLen;\n\t\t}\n\t\treturn result;\n\t};\n\t\n\t/**\n\t * Copies CSS properties from one element to another.\n\t *\n\t * @param {object} $from\n\t * @param {object} $to\n\t * @param {array} properties\n\t */\n\tvar transferStyles = function($from, $to, properties) {\n\t\tvar i, n, styles = {};\n\t\tif (properties) {\n\t\t\tfor (i = 0, n = properties.length; i < n; i++) {\n\t\t\t\tstyles[properties[i]] = $from.css(properties[i]);\n\t\t\t}\n\t\t} else {\n\t\t\tstyles = $from.css();\n\t\t}\n\t\t$to.css(styles);\n\t};\n\t\n\t/**\n\t * Measures the width of a string within a\n\t * parent element (in pixels).\n\t *\n\t * @param {string} str\n\t * @param {object} $parent\n\t * @returns {int}\n\t */\n\tvar measureString = function(str, $parent) {\n\t\tif (!str) {\n\t\t\treturn 0;\n\t\t}\n\t\n\t\tvar $test = $('').css({\n\t\t\tposition: 'absolute',\n\t\t\ttop: -99999,\n\t\t\tleft: -99999,\n\t\t\twidth: 'auto',\n\t\t\tpadding: 0,\n\t\t\twhiteSpace: 'pre'\n\t\t}).text(str).appendTo('body');\n\t\n\t\ttransferStyles($parent, $test, [\n\t\t\t'letterSpacing',\n\t\t\t'fontSize',\n\t\t\t'fontFamily',\n\t\t\t'fontWeight',\n\t\t\t'textTransform'\n\t\t]);\n\t\n\t\tvar width = $test.width();\n\t\t$test.remove();\n\t\n\t\treturn width;\n\t};\n\t\n\t/**\n\t * Sets up an input to grow horizontally as the user\n\t * types. If the value is changed manually, you can\n\t * trigger the \"update\" handler to resize:\n\t *\n\t * $input.trigger('update');\n\t *\n\t * @param {object} $input\n\t */\n\tvar autoGrow = function($input) {\n\t\tvar currentWidth = null;\n\t\n\t\tvar update = function(e, options) {\n\t\t\tvar value, keyCode, printable, placeholder, width;\n\t\t\tvar shift, character, selection;\n\t\t\te = e || window.event || {};\n\t\t\toptions = options || {};\n\t\n\t\t\tif (e.metaKey || e.altKey) return;\n\t\t\tif (!options.force && $input.data('grow') === false) return;\n\t\n\t\t\tvalue = $input.val();\n\t\t\tif (e.type && e.type.toLowerCase() === 'keydown') {\n\t\t\t\tkeyCode = e.keyCode;\n\t\t\t\tprintable = (\n\t\t\t\t\t(keyCode >= 97 && keyCode <= 122) || // a-z\n\t\t\t\t\t(keyCode >= 65 && keyCode <= 90) || // A-Z\n\t\t\t\t\t(keyCode >= 48 && keyCode <= 57) || // 0-9\n\t\t\t\t\tkeyCode === 32 // space\n\t\t\t\t);\n\t\n\t\t\t\tif (keyCode === KEY_DELETE || keyCode === KEY_BACKSPACE) {\n\t\t\t\t\tselection = getSelection($input[0]);\n\t\t\t\t\tif (selection.length) {\n\t\t\t\t\t\tvalue = value.substring(0, selection.start) + value.substring(selection.start + selection.length);\n\t\t\t\t\t} else if (keyCode === KEY_BACKSPACE && selection.start) {\n\t\t\t\t\t\tvalue = value.substring(0, selection.start - 1) + value.substring(selection.start + 1);\n\t\t\t\t\t} else if (keyCode === KEY_DELETE && typeof selection.start !== 'undefined') {\n\t\t\t\t\t\tvalue = value.substring(0, selection.start) + value.substring(selection.start + 1);\n\t\t\t\t\t}\n\t\t\t\t} else if (printable) {\n\t\t\t\t\tshift = e.shiftKey;\n\t\t\t\t\tcharacter = String.fromCharCode(e.keyCode);\n\t\t\t\t\tif (shift) character = character.toUpperCase();\n\t\t\t\t\telse character = character.toLowerCase();\n\t\t\t\t\tvalue += character;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tplaceholder = $input.attr('placeholder');\n\t\t\tif (!value && placeholder) {\n\t\t\t\tvalue = placeholder;\n\t\t\t}\n\t\n\t\t\twidth = measureString(value, $input) + 4;\n\t\t\tif (width !== currentWidth) {\n\t\t\t\tcurrentWidth = width;\n\t\t\t\t$input.width(width);\n\t\t\t\t$input.triggerHandler('resize');\n\t\t\t}\n\t\t};\n\t\n\t\t$input.on('keydown keyup update blur', update);\n\t\tupdate();\n\t};\n\t\n\tvar Selectize = function($input, settings) {\n\t\tvar key, i, n, dir, input, self = this;\n\t\tinput = $input[0];\n\t\tinput.selectize = self;\n\t\n\t\t// detect rtl environment\n\t\tvar computedStyle = window.getComputedStyle && window.getComputedStyle(input, null);\n\t\tdir = computedStyle ? computedStyle.getPropertyValue('direction') : input.currentStyle && input.currentStyle.direction;\n\t\tdir = dir || $input.parents('[dir]:first').attr('dir') || '';\n\t\n\t\t// setup default state\n\t\t$.extend(self, {\n\t\t\torder : 0,\n\t\t\tsettings : settings,\n\t\t\t$input : $input,\n\t\t\ttabIndex : $input.attr('tabindex') || '',\n\t\t\ttagType : input.tagName.toLowerCase() === 'select' ? TAG_SELECT : TAG_INPUT,\n\t\t\trtl : /rtl/i.test(dir),\n\t\n\t\t\teventNS : '.selectize' + (++Selectize.count),\n\t\t\thighlightedValue : null,\n\t\t\tisOpen : false,\n\t\t\tisDisabled : false,\n\t\t\tisRequired : $input.is('[required]'),\n\t\t\tisInvalid : false,\n\t\t\tisLocked : false,\n\t\t\tisFocused : false,\n\t\t\tisInputHidden : false,\n\t\t\tisSetup : false,\n\t\t\tisShiftDown : false,\n\t\t\tisCmdDown : false,\n\t\t\tisCtrlDown : false,\n\t\t\tignoreFocus : false,\n\t\t\tignoreBlur : false,\n\t\t\tignoreHover : false,\n\t\t\thasOptions : false,\n\t\t\tcurrentResults : null,\n\t\t\tlastValue : '',\n\t\t\tcaretPos : 0,\n\t\t\tloading : 0,\n\t\t\tloadedSearches : {},\n\t\n\t\t\t$activeOption : null,\n\t\t\t$activeItems : [],\n\t\n\t\t\toptgroups : {},\n\t\t\toptions : {},\n\t\t\tuserOptions : {},\n\t\t\titems : [],\n\t\t\trenderCache : {},\n\t\t\tonSearchChange : settings.loadThrottle === null ? self.onSearchChange : debounce(self.onSearchChange, settings.loadThrottle)\n\t\t});\n\t\n\t\t// search system\n\t\tself.sifter = new Sifter(this.options, {diacritics: settings.diacritics});\n\t\n\t\t// build options table\n\t\tif (self.settings.options) {\n\t\t\tfor (i = 0, n = self.settings.options.length; i < n; i++) {\n\t\t\t\tself.registerOption(self.settings.options[i]);\n\t\t\t}\n\t\t\tdelete self.settings.options;\n\t\t}\n\t\n\t\t// build optgroup table\n\t\tif (self.settings.optgroups) {\n\t\t\tfor (i = 0, n = self.settings.optgroups.length; i < n; i++) {\n\t\t\t\tself.registerOptionGroup(self.settings.optgroups[i]);\n\t\t\t}\n\t\t\tdelete self.settings.optgroups;\n\t\t}\n\t\n\t\t// option-dependent defaults\n\t\tself.settings.mode = self.settings.mode || (self.settings.maxItems === 1 ? 'single' : 'multi');\n\t\tif (typeof self.settings.hideSelected !== 'boolean') {\n\t\t\tself.settings.hideSelected = self.settings.mode === 'multi';\n\t\t}\n\t\n\t\tself.initializePlugins(self.settings.plugins);\n\t\tself.setupCallbacks();\n\t\tself.setupTemplates();\n\t\tself.setup();\n\t};\n\t\n\t// mixins\n\t// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\t\n\tMicroEvent.mixin(Selectize);\n\tMicroPlugin.mixin(Selectize);\n\t\n\t// methods\n\t// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\t\n\t$.extend(Selectize.prototype, {\n\t\n\t\t/**\n\t\t * Creates all elements and sets up event bindings.\n\t\t */\n\t\tsetup: function() {\n\t\t\tvar self = this;\n\t\t\tvar settings = self.settings;\n\t\t\tvar eventNS = self.eventNS;\n\t\t\tvar $window = $(window);\n\t\t\tvar $document = $(document);\n\t\t\tvar $input = self.$input;\n\t\n\t\t\tvar $wrapper;\n\t\t\tvar $control;\n\t\t\tvar $control_input;\n\t\t\tvar $dropdown;\n\t\t\tvar $dropdown_content;\n\t\t\tvar $dropdown_parent;\n\t\t\tvar inputMode;\n\t\t\tvar timeout_blur;\n\t\t\tvar timeout_focus;\n\t\t\tvar classes;\n\t\t\tvar classes_plugins;\n\t\n\t\t\tinputMode = self.settings.mode;\n\t\t\tclasses = $input.attr('class') || '';\n\t\n\t\t\t$wrapper = $('').addClass(settings.wrapperClass).addClass(classes).addClass(inputMode);\n\t\t\t$control = $('
').addClass(settings.inputClass).addClass('items').appendTo($wrapper);\n\t\t\t$control_input = $('
').appendTo($control).attr('tabindex', $input.is(':disabled') ? '-1' : self.tabIndex);\n\t\t\t$dropdown_parent = $(settings.dropdownParent || $wrapper);\n\t\t\t$dropdown = $('
').addClass(settings.dropdownClass).addClass(inputMode).hide().appendTo($dropdown_parent);\n\t\t\t$dropdown_content = $('
').addClass(settings.dropdownContentClass).appendTo($dropdown);\n\t\n\t\t\tif(self.settings.copyClassesToDropdown) {\n\t\t\t\t$dropdown.addClass(classes);\n\t\t\t}\n\t\n\t\t\t$wrapper.css({\n\t\t\t\twidth: $input[0].style.width\n\t\t\t});\n\t\n\t\t\tif (self.plugins.names.length) {\n\t\t\t\tclasses_plugins = 'plugin-' + self.plugins.names.join(' plugin-');\n\t\t\t\t$wrapper.addClass(classes_plugins);\n\t\t\t\t$dropdown.addClass(classes_plugins);\n\t\t\t}\n\t\n\t\t\tif ((settings.maxItems === null || settings.maxItems > 1) && self.tagType === TAG_SELECT) {\n\t\t\t\t$input.attr('multiple', 'multiple');\n\t\t\t}\n\t\n\t\t\tif (self.settings.placeholder) {\n\t\t\t\t$control_input.attr('placeholder', settings.placeholder);\n\t\t\t}\n\t\n\t\t\t// if splitOn was not passed in, construct it from the delimiter to allow pasting universally\n\t\t\tif (!self.settings.splitOn && self.settings.delimiter) {\n\t\t\t\tvar delimiterEscaped = self.settings.delimiter.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n\t\t\t\tself.settings.splitOn = new RegExp('\\\\s*' + delimiterEscaped + '+\\\\s*');\n\t\t\t}\n\t\n\t\t\tif ($input.attr('autocorrect')) {\n\t\t\t\t$control_input.attr('autocorrect', $input.attr('autocorrect'));\n\t\t\t}\n\t\n\t\t\tif ($input.attr('autocapitalize')) {\n\t\t\t\t$control_input.attr('autocapitalize', $input.attr('autocapitalize'));\n\t\t\t}\n\t\n\t\t\tself.$wrapper = $wrapper;\n\t\t\tself.$control = $control;\n\t\t\tself.$control_input = $control_input;\n\t\t\tself.$dropdown = $dropdown;\n\t\t\tself.$dropdown_content = $dropdown_content;\n\t\n\t\t\t$dropdown.on('mouseenter', '[data-selectable]', function() { return self.onOptionHover.apply(self, arguments); });\n\t\t\t$dropdown.on('mousedown click', '[data-selectable]', function() { return self.onOptionSelect.apply(self, arguments); });\n\t\t\twatchChildEvent($control, 'mousedown', '*:not(input)', function() { return self.onItemSelect.apply(self, arguments); });\n\t\t\tautoGrow($control_input);\n\t\n\t\t\t$control.on({\n\t\t\t\tmousedown : function() { return self.onMouseDown.apply(self, arguments); },\n\t\t\t\tclick : function() { return self.onClick.apply(self, arguments); }\n\t\t\t});\n\t\n\t\t\t$control_input.on({\n\t\t\t\tmousedown : function(e) { e.stopPropagation(); },\n\t\t\t\tkeydown : function() { return self.onKeyDown.apply(self, arguments); },\n\t\t\t\tkeyup : function() { return self.onKeyUp.apply(self, arguments); },\n\t\t\t\tkeypress : function() { return self.onKeyPress.apply(self, arguments); },\n\t\t\t\tresize : function() { self.positionDropdown.apply(self, []); },\n\t\t\t\tblur : function() { return self.onBlur.apply(self, arguments); },\n\t\t\t\tfocus : function() { self.ignoreBlur = false; return self.onFocus.apply(self, arguments); },\n\t\t\t\tpaste : function() { return self.onPaste.apply(self, arguments); }\n\t\t\t});\n\t\n\t\t\t$document.on('keydown' + eventNS, function(e) {\n\t\t\t\tself.isCmdDown = e[IS_MAC ? 'metaKey' : 'ctrlKey'];\n\t\t\t\tself.isCtrlDown = e[IS_MAC ? 'altKey' : 'ctrlKey'];\n\t\t\t\tself.isShiftDown = e.shiftKey;\n\t\t\t});\n\t\n\t\t\t$document.on('keyup' + eventNS, function(e) {\n\t\t\t\tif (e.keyCode === KEY_CTRL) self.isCtrlDown = false;\n\t\t\t\tif (e.keyCode === KEY_SHIFT) self.isShiftDown = false;\n\t\t\t\tif (e.keyCode === KEY_CMD) self.isCmdDown = false;\n\t\t\t});\n\t\n\t\t\t$document.on('mousedown' + eventNS, function(e) {\n\t\t\t\tif (self.isFocused) {\n\t\t\t\t\t// prevent events on the dropdown scrollbar from causing the control to blur\n\t\t\t\t\tif (e.target === self.$dropdown[0] || e.target.parentNode === self.$dropdown[0]) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t// blur on click outside\n\t\t\t\t\tif (!self.$control.has(e.target).length && e.target !== self.$control[0]) {\n\t\t\t\t\t\tself.blur(e.target);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\n\t\t\t$window.on(['scroll' + eventNS, 'resize' + eventNS].join(' '), function() {\n\t\t\t\tif (self.isOpen) {\n\t\t\t\t\tself.positionDropdown.apply(self, arguments);\n\t\t\t\t}\n\t\t\t});\n\t\t\t$window.on('mousemove' + eventNS, function() {\n\t\t\t\tself.ignoreHover = false;\n\t\t\t});\n\t\n\t\t\t// store original children and tab index so that they can be\n\t\t\t// restored when the destroy() method is called.\n\t\t\tthis.revertSettings = {\n\t\t\t\t$children : $input.children().detach(),\n\t\t\t\ttabindex : $input.attr('tabindex')\n\t\t\t};\n\t\n\t\t\t$input.attr('tabindex', -1).hide().after(self.$wrapper);\n\t\n\t\t\tif ($.isArray(settings.items)) {\n\t\t\t\tself.setValue(settings.items);\n\t\t\t\tdelete settings.items;\n\t\t\t}\n\t\n\t\t\t// feature detect for the validation API\n\t\t\tif (SUPPORTS_VALIDITY_API) {\n\t\t\t\t$input.on('invalid' + eventNS, function(e) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tself.isInvalid = true;\n\t\t\t\t\tself.refreshState();\n\t\t\t\t});\n\t\t\t}\n\t\n\t\t\tself.updateOriginalInput();\n\t\t\tself.refreshItems();\n\t\t\tself.refreshState();\n\t\t\tself.updatePlaceholder();\n\t\t\tself.isSetup = true;\n\t\n\t\t\tif ($input.is(':disabled')) {\n\t\t\t\tself.disable();\n\t\t\t}\n\t\n\t\t\tself.on('change', this.onChange);\n\t\n\t\t\t$input.data('selectize', self);\n\t\t\t$input.addClass('selectized');\n\t\t\tself.trigger('initialize');\n\t\n\t\t\t// preload options\n\t\t\tif (settings.preload === true) {\n\t\t\t\tself.onSearchChange('');\n\t\t\t}\n\t\n\t\t},\n\t\n\t\t/**\n\t\t * Sets up default rendering functions.\n\t\t */\n\t\tsetupTemplates: function() {\n\t\t\tvar self = this;\n\t\t\tvar field_label = self.settings.labelField;\n\t\t\tvar field_optgroup = self.settings.optgroupLabelField;\n\t\n\t\t\tvar templates = {\n\t\t\t\t'optgroup': function(data) {\n\t\t\t\t\treturn '
' + data.html + '
';\n\t\t\t\t},\n\t\t\t\t'optgroup_header': function(data, escape) {\n\t\t\t\t\treturn '';\n\t\t\t\t},\n\t\t\t\t'option': function(data, escape) {\n\t\t\t\t\treturn '
' + escape(data[field_label]) + '
';\n\t\t\t\t},\n\t\t\t\t'item': function(data, escape) {\n\t\t\t\t\treturn '
' + escape(data[field_label]) + '
';\n\t\t\t\t},\n\t\t\t\t'option_create': function(data, escape) {\n\t\t\t\t\treturn '
Add ' + escape(data.input) + ' …
';\n\t\t\t\t}\n\t\t\t};\n\t\n\t\t\tself.settings.render = $.extend({}, templates, self.settings.render);\n\t\t},\n\t\n\t\t/**\n\t\t * Maps fired events to callbacks provided\n\t\t * in the settings used when creating the control.\n\t\t */\n\t\tsetupCallbacks: function() {\n\t\t\tvar key, fn, callbacks = {\n\t\t\t\t'initialize' : 'onInitialize',\n\t\t\t\t'change' : 'onChange',\n\t\t\t\t'item_add' : 'onItemAdd',\n\t\t\t\t'item_remove' : 'onItemRemove',\n\t\t\t\t'clear' : 'onClear',\n\t\t\t\t'option_add' : 'onOptionAdd',\n\t\t\t\t'option_remove' : 'onOptionRemove',\n\t\t\t\t'option_clear' : 'onOptionClear',\n\t\t\t\t'optgroup_add' : 'onOptionGroupAdd',\n\t\t\t\t'optgroup_remove' : 'onOptionGroupRemove',\n\t\t\t\t'optgroup_clear' : 'onOptionGroupClear',\n\t\t\t\t'dropdown_open' : 'onDropdownOpen',\n\t\t\t\t'dropdown_close' : 'onDropdownClose',\n\t\t\t\t'type' : 'onType',\n\t\t\t\t'load' : 'onLoad',\n\t\t\t\t'focus' : 'onFocus',\n\t\t\t\t'blur' : 'onBlur'\n\t\t\t};\n\t\n\t\t\tfor (key in callbacks) {\n\t\t\t\tif (callbacks.hasOwnProperty(key)) {\n\t\t\t\t\tfn = this.settings[callbacks[key]];\n\t\t\t\t\tif (fn) this.on(key, fn);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * Triggered when the main control element\n\t\t * has a click event.\n\t\t *\n\t\t * @param {object} e\n\t\t * @return {boolean}\n\t\t */\n\t\tonClick: function(e) {\n\t\t\tvar self = this;\n\t\n\t\t\t// necessary for mobile webkit devices (manual focus triggering\n\t\t\t// is ignored unless invoked within a click event)\n\t\t\tif (!self.isFocused) {\n\t\t\t\tself.focus();\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * Triggered when the main control element\n\t\t * has a mouse down event.\n\t\t *\n\t\t * @param {object} e\n\t\t * @return {boolean}\n\t\t */\n\t\tonMouseDown: function(e) {\n\t\t\tvar self = this;\n\t\t\tvar defaultPrevented = e.isDefaultPrevented();\n\t\t\tvar $target = $(e.target);\n\t\n\t\t\tif (self.isFocused) {\n\t\t\t\t// retain focus by preventing native handling. if the\n\t\t\t\t// event target is the input it should not be modified.\n\t\t\t\t// otherwise, text selection within the input won't work.\n\t\t\t\tif (e.target !== self.$control_input[0]) {\n\t\t\t\t\tif (self.settings.mode === 'single') {\n\t\t\t\t\t\t// toggle dropdown\n\t\t\t\t\t\tself.isOpen ? self.close() : self.open();\n\t\t\t\t\t} else if (!defaultPrevented) {\n\t\t\t\t\t\tself.setActiveItem(null);\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// give control focus\n\t\t\t\tif (!defaultPrevented) {\n\t\t\t\t\twindow.setTimeout(function() {\n\t\t\t\t\t\tself.focus();\n\t\t\t\t\t}, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * Triggered when the value of the control has been changed.\n\t\t * This should propagate the event to the original DOM\n\t\t * input / select element.\n\t\t */\n\t\tonChange: function() {\n\t\t\tthis.$input.trigger('change');\n\t\t},\n\t\n\t\t/**\n\t\t * Triggered on
paste.\n\t\t *\n\t\t * @param {object} e\n\t\t * @returns {boolean}\n\t\t */\n\t\tonPaste: function(e) {\n\t\t\tvar self = this;\n\t\t\tif (self.isFull() || self.isInputHidden || self.isLocked) {\n\t\t\t\te.preventDefault();\n\t\t\t} else {\n\t\t\t\t// If a regex or string is included, this will split the pasted\n\t\t\t\t// input and create Items for each separate value\n\t\t\t\tif (self.settings.splitOn) {\n\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\tvar splitInput = $.trim(self.$control_input.val() || '').split(self.settings.splitOn);\n\t\t\t\t\t\tfor (var i = 0, n = splitInput.length; i < n; i++) {\n\t\t\t\t\t\t\tself.createItem(splitInput[i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * Triggered on
keypress.\n\t\t *\n\t\t * @param {object} e\n\t\t * @returns {boolean}\n\t\t */\n\t\tonKeyPress: function(e) {\n\t\t\tif (this.isLocked) return e && e.preventDefault();\n\t\t\tvar character = String.fromCharCode(e.keyCode || e.which);\n\t\t\tif (this.settings.create && this.settings.mode === 'multi' && character === this.settings.delimiter) {\n\t\t\t\tthis.createItem();\n\t\t\t\te.preventDefault();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * Triggered on
keydown.\n\t\t *\n\t\t * @param {object} e\n\t\t * @returns {boolean}\n\t\t */\n\t\tonKeyDown: function(e) {\n\t\t\tvar isInput = e.target === this.$control_input[0];\n\t\t\tvar self = this;\n\t\n\t\t\tif (self.isLocked) {\n\t\t\t\tif (e.keyCode !== KEY_TAB) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tswitch (e.keyCode) {\n\t\t\t\tcase KEY_A:\n\t\t\t\t\tif (self.isCmdDown) {\n\t\t\t\t\t\tself.selectAll();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase KEY_ESC:\n\t\t\t\t\tif (self.isOpen) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\tself.close();\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\tcase KEY_N:\n\t\t\t\t\tif (!e.ctrlKey || e.altKey) break;\n\t\t\t\tcase KEY_DOWN:\n\t\t\t\t\tif (!self.isOpen && self.hasOptions) {\n\t\t\t\t\t\tself.open();\n\t\t\t\t\t} else if (self.$activeOption) {\n\t\t\t\t\t\tself.ignoreHover = true;\n\t\t\t\t\t\tvar $next = self.getAdjacentOption(self.$activeOption, 1);\n\t\t\t\t\t\tif ($next.length) self.setActiveOption($next, true, true);\n\t\t\t\t\t}\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\tcase KEY_P:\n\t\t\t\t\tif (!e.ctrlKey || e.altKey) break;\n\t\t\t\tcase KEY_UP:\n\t\t\t\t\tif (self.$activeOption) {\n\t\t\t\t\t\tself.ignoreHover = true;\n\t\t\t\t\t\tvar $prev = self.getAdjacentOption(self.$activeOption, -1);\n\t\t\t\t\t\tif ($prev.length) self.setActiveOption($prev, true, true);\n\t\t\t\t\t}\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\tcase KEY_RETURN:\n\t\t\t\t\tif (self.isOpen && self.$activeOption) {\n\t\t\t\t\t\tself.onOptionSelect({currentTarget: self.$activeOption});\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\tcase KEY_LEFT:\n\t\t\t\t\tself.advanceSelection(-1, e);\n\t\t\t\t\treturn;\n\t\t\t\tcase KEY_RIGHT:\n\t\t\t\t\tself.advanceSelection(1, e);\n\t\t\t\t\treturn;\n\t\t\t\tcase KEY_TAB:\n\t\t\t\t\tif (self.settings.selectOnTab && self.isOpen && self.$activeOption) {\n\t\t\t\t\t\tself.onOptionSelect({currentTarget: self.$activeOption});\n\t\n\t\t\t\t\t\t// Default behaviour is to jump to the next field, we only want this\n\t\t\t\t\t\t// if the current field doesn't accept any more entries\n\t\t\t\t\t\tif (!self.isFull()) {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (self.settings.create && self.createItem()) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\tcase KEY_BACKSPACE:\n\t\t\t\tcase KEY_DELETE:\n\t\t\t\t\tself.deleteSelection(e);\n\t\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tif ((self.isFull() || self.isInputHidden) && !(IS_MAC ? e.metaKey : e.ctrlKey)) {\n\t\t\t\te.preventDefault();\n\t\t\t\treturn;\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * Triggered on
keyup.\n\t\t *\n\t\t * @param {object} e\n\t\t * @returns {boolean}\n\t\t */\n\t\tonKeyUp: function(e) {\n\t\t\tvar self = this;\n\t\n\t\t\tif (self.isLocked) return e && e.preventDefault();\n\t\t\tvar value = self.$control_input.val() || '';\n\t\t\tif (self.lastValue !== value) {\n\t\t\t\tself.lastValue = value;\n\t\t\t\tself.onSearchChange(value);\n\t\t\t\tself.refreshOptions();\n\t\t\t\tself.trigger('type', value);\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * Invokes the user-provide option provider / loader.\n\t\t *\n\t\t * Note: this function is debounced in the Selectize\n\t\t * constructor (by `settings.loadDelay` milliseconds)\n\t\t *\n\t\t * @param {string} value\n\t\t */\n\t\tonSearchChange: function(value) {\n\t\t\tvar self = this;\n\t\t\tvar fn = self.settings.load;\n\t\t\tif (!fn) return;\n\t\t\tif (self.loadedSearches.hasOwnProperty(value)) return;\n\t\t\tself.loadedSearches[value] = true;\n\t\t\tself.load(function(callback) {\n\t\t\t\tfn.apply(self, [value, callback]);\n\t\t\t});\n\t\t},\n\t\n\t\t/**\n\t\t * Triggered on
focus.\n\t\t *\n\t\t * @param {object} e (optional)\n\t\t * @returns {boolean}\n\t\t */\n\t\tonFocus: function(e) {\n\t\t\tvar self = this;\n\t\t\tvar wasFocused = self.isFocused;\n\t\n\t\t\tif (self.isDisabled) {\n\t\t\t\tself.blur();\n\t\t\t\te && e.preventDefault();\n\t\t\t\treturn false;\n\t\t\t}\n\t\n\t\t\tif (self.ignoreFocus) return;\n\t\t\tself.isFocused = true;\n\t\t\tif (self.settings.preload === 'focus') self.onSearchChange('');\n\t\n\t\t\tif (!wasFocused) self.trigger('focus');\n\t\n\t\t\tif (!self.$activeItems.length) {\n\t\t\t\tself.showInput();\n\t\t\t\tself.setActiveItem(null);\n\t\t\t\tself.refreshOptions(!!self.settings.openOnFocus);\n\t\t\t}\n\t\n\t\t\tself.refreshState();\n\t\t},\n\t\n\t\t/**\n\t\t * Triggered on
blur.\n\t\t *\n\t\t * @param {object} e\n\t\t * @param {Element} dest\n\t\t */\n\t\tonBlur: function(e, dest) {\n\t\t\tvar self = this;\n\t\t\tif (!self.isFocused) return;\n\t\t\tself.isFocused = false;\n\t\n\t\t\tif (self.ignoreFocus) {\n\t\t\t\treturn;\n\t\t\t} else if (!self.ignoreBlur && document.activeElement === self.$dropdown_content[0]) {\n\t\t\t\t// necessary to prevent IE closing the dropdown when the scrollbar is clicked\n\t\t\t\tself.ignoreBlur = true;\n\t\t\t\tself.onFocus(e);\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tvar deactivate = function() {\n\t\t\t\tself.close();\n\t\t\t\tself.setTextboxValue('');\n\t\t\t\tself.setActiveItem(null);\n\t\t\t\tself.setActiveOption(null);\n\t\t\t\tself.setCaret(self.items.length);\n\t\t\t\tself.refreshState();\n\t\n\t\t\t\t// IE11 bug: element still marked as active\n\t\t\t\t(dest || document.body).focus();\n\t\n\t\t\t\tself.ignoreFocus = false;\n\t\t\t\tself.trigger('blur');\n\t\t\t};\n\t\n\t\t\tself.ignoreFocus = true;\n\t\t\tif (self.settings.create && self.settings.createOnBlur) {\n\t\t\t\tself.createItem(null, false, deactivate);\n\t\t\t} else {\n\t\t\t\tdeactivate();\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * Triggered when the user rolls over\n\t\t * an option in the autocomplete dropdown menu.\n\t\t *\n\t\t * @param {object} e\n\t\t * @returns {boolean}\n\t\t */\n\t\tonOptionHover: function(e) {\n\t\t\tif (this.ignoreHover) return;\n\t\t\tthis.setActiveOption(e.currentTarget, false);\n\t\t},\n\t\n\t\t/**\n\t\t * Triggered when the user clicks on an option\n\t\t * in the autocomplete dropdown menu.\n\t\t *\n\t\t * @param {object} e\n\t\t * @returns {boolean}\n\t\t */\n\t\tonOptionSelect: function(e) {\n\t\t\tvar value, $target, $option, self = this;\n\t\n\t\t\tif (e.preventDefault) {\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopPropagation();\n\t\t\t}\n\t\n\t\t\t$target = $(e.currentTarget);\n\t\t\tif ($target.hasClass('create')) {\n\t\t\t\tself.createItem(null, function() {\n\t\t\t\t\tif (self.settings.closeAfterSelect) {\n\t\t\t\t\t\tself.close();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tvalue = $target.attr('data-value');\n\t\t\t\tif (typeof value !== 'undefined') {\n\t\t\t\t\tself.lastQuery = null;\n\t\t\t\t\tself.setTextboxValue('');\n\t\t\t\t\tself.addItem(value);\n\t\t\t\t\tif (self.settings.closeAfterSelect) {\n\t\t\t\t\t\tself.close();\n\t\t\t\t\t} else if (!self.settings.hideSelected && e.type && /mouse/.test(e.type)) {\n\t\t\t\t\t\tself.setActiveOption(self.getOption(value));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * Triggered when the user clicks on an item\n\t\t * that has been selected.\n\t\t *\n\t\t * @param {object} e\n\t\t * @returns {boolean}\n\t\t */\n\t\tonItemSelect: function(e) {\n\t\t\tvar self = this;\n\t\n\t\t\tif (self.isLocked) return;\n\t\t\tif (self.settings.mode === 'multi') {\n\t\t\t\te.preventDefault();\n\t\t\t\tself.setActiveItem(e.currentTarget, e);\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * Invokes the provided method that provides\n\t\t * results to a callback---which are then added\n\t\t * as options to the control.\n\t\t *\n\t\t * @param {function} fn\n\t\t */\n\t\tload: function(fn) {\n\t\t\tvar self = this;\n\t\t\tvar $wrapper = self.$wrapper.addClass(self.settings.loadingClass);\n\t\n\t\t\tself.loading++;\n\t\t\tfn.apply(self, [function(results) {\n\t\t\t\tself.loading = Math.max(self.loading - 1, 0);\n\t\t\t\tif (results && results.length) {\n\t\t\t\t\tself.addOption(results);\n\t\t\t\t\tself.refreshOptions(self.isFocused && !self.isInputHidden);\n\t\t\t\t}\n\t\t\t\tif (!self.loading) {\n\t\t\t\t\t$wrapper.removeClass(self.settings.loadingClass);\n\t\t\t\t}\n\t\t\t\tself.trigger('load', results);\n\t\t\t}]);\n\t\t},\n\t\n\t\t/**\n\t\t * Sets the input field of the control to the specified value.\n\t\t *\n\t\t * @param {string} value\n\t\t */\n\t\tsetTextboxValue: function(value) {\n\t\t\tvar $input = this.$control_input;\n\t\t\tvar changed = $input.val() !== value;\n\t\t\tif (changed) {\n\t\t\t\t$input.val(value).triggerHandler('update');\n\t\t\t\tthis.lastValue = value;\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * Returns the value of the control. If multiple items\n\t\t * can be selected (e.g.
), this returns\n\t\t * an array. If only one item can be selected, this\n\t\t * returns a string.\n\t\t *\n\t\t * @returns {mixed}\n\t\t */\n\t\tgetValue: function() {\n\t\t\tif (this.tagType === TAG_SELECT && this.$input.attr('multiple')) {\n\t\t\t\treturn this.items;\n\t\t\t} else {\n\t\t\t\treturn this.items.join(this.settings.delimiter);\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * Resets the selected items to the given value.\n\t\t *\n\t\t * @param {mixed} value\n\t\t */\n\t\tsetValue: function(value, silent) {\n\t\t\tvar events = silent ? [] : ['change'];\n\t\n\t\t\tdebounce_events(this, events, function() {\n\t\t\t\tthis.clear(silent);\n\t\t\t\tthis.addItems(value, silent);\n\t\t\t});\n\t\t},\n\t\n\t\t/**\n\t\t * Sets the selected item.\n\t\t *\n\t\t * @param {object} $item\n\t\t * @param {object} e (optional)\n\t\t */\n\t\tsetActiveItem: function($item, e) {\n\t\t\tvar self = this;\n\t\t\tvar eventName;\n\t\t\tvar i, idx, begin, end, item, swap;\n\t\t\tvar $last;\n\t\n\t\t\tif (self.settings.mode === 'single') return;\n\t\t\t$item = $($item);\n\t\n\t\t\t// clear the active selection\n\t\t\tif (!$item.length) {\n\t\t\t\t$(self.$activeItems).removeClass('active');\n\t\t\t\tself.$activeItems = [];\n\t\t\t\tif (self.isFocused) {\n\t\t\t\t\tself.showInput();\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\t// modify selection\n\t\t\teventName = e && e.type.toLowerCase();\n\t\n\t\t\tif (eventName === 'mousedown' && self.isShiftDown && self.$activeItems.length) {\n\t\t\t\t$last = self.$control.children('.active:last');\n\t\t\t\tbegin = Array.prototype.indexOf.apply(self.$control[0].childNodes, [$last[0]]);\n\t\t\t\tend = Array.prototype.indexOf.apply(self.$control[0].childNodes, [$item[0]]);\n\t\t\t\tif (begin > end) {\n\t\t\t\t\tswap = begin;\n\t\t\t\t\tbegin = end;\n\t\t\t\t\tend = swap;\n\t\t\t\t}\n\t\t\t\tfor (i = begin; i <= end; i++) {\n\t\t\t\t\titem = self.$control[0].childNodes[i];\n\t\t\t\t\tif (self.$activeItems.indexOf(item) === -1) {\n\t\t\t\t\t\t$(item).addClass('active');\n\t\t\t\t\t\tself.$activeItems.push(item);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\te.preventDefault();\n\t\t\t} else if ((eventName === 'mousedown' && self.isCtrlDown) || (eventName === 'keydown' && this.isShiftDown)) {\n\t\t\t\tif ($item.hasClass('active')) {\n\t\t\t\t\tidx = self.$activeItems.indexOf($item[0]);\n\t\t\t\t\tself.$activeItems.splice(idx, 1);\n\t\t\t\t\t$item.removeClass('active');\n\t\t\t\t} else {\n\t\t\t\t\tself.$activeItems.push($item.addClass('active')[0]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$(self.$activeItems).removeClass('active');\n\t\t\t\tself.$activeItems = [$item.addClass('active')[0]];\n\t\t\t}\n\t\n\t\t\t// ensure control has focus\n\t\t\tself.hideInput();\n\t\t\tif (!this.isFocused) {\n\t\t\t\tself.focus();\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * Sets the selected item in the dropdown menu\n\t\t * of available options.\n\t\t *\n\t\t * @param {object} $object\n\t\t * @param {boolean} scroll\n\t\t * @param {boolean} animate\n\t\t */\n\t\tsetActiveOption: function($option, scroll, animate) {\n\t\t\tvar height_menu, height_item, y;\n\t\t\tvar scroll_top, scroll_bottom;\n\t\t\tvar self = this;\n\t\n\t\t\tif (self.$activeOption) self.$activeOption.removeClass('active');\n\t\t\tself.$activeOption = null;\n\t\n\t\t\t$option = $($option);\n\t\t\tif (!$option.length) return;\n\t\n\t\t\tself.$activeOption = $option.addClass('active');\n\t\n\t\t\tif (scroll || !isset(scroll)) {\n\t\n\t\t\t\theight_menu = self.$dropdown_content.height();\n\t\t\t\theight_item = self.$activeOption.outerHeight(true);\n\t\t\t\tscroll = self.$dropdown_content.scrollTop() || 0;\n\t\t\t\ty = self.$activeOption.offset().top - self.$dropdown_content.offset().top + scroll;\n\t\t\t\tscroll_top = y;\n\t\t\t\tscroll_bottom = y - height_menu + height_item;\n\t\n\t\t\t\tif (y + height_item > height_menu + scroll) {\n\t\t\t\t\tself.$dropdown_content.stop().animate({scrollTop: scroll_bottom}, animate ? self.settings.scrollDuration : 0);\n\t\t\t\t} else if (y < scroll) {\n\t\t\t\t\tself.$dropdown_content.stop().animate({scrollTop: scroll_top}, animate ? self.settings.scrollDuration : 0);\n\t\t\t\t}\n\t\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * Selects all items (CTRL + A).\n\t\t */\n\t\tselectAll: function() {\n\t\t\tvar self = this;\n\t\t\tif (self.settings.mode === 'single') return;\n\t\n\t\t\tself.$activeItems = Array.prototype.slice.apply(self.$control.children(':not(input)').addClass('active'));\n\t\t\tif (self.$activeItems.length) {\n\t\t\t\tself.hideInput();\n\t\t\t\tself.close();\n\t\t\t}\n\t\t\tself.focus();\n\t\t},\n\t\n\t\t/**\n\t\t * Hides the input element out of view, while\n\t\t * retaining its focus.\n\t\t */\n\t\thideInput: function() {\n\t\t\tvar self = this;\n\t\n\t\t\tself.setTextboxValue('');\n\t\t\tself.$control_input.css({opacity: 0, position: 'absolute', left: self.rtl ? 10000 : -10000});\n\t\t\tself.isInputHidden = true;\n\t\t},\n\t\n\t\t/**\n\t\t * Restores input visibility.\n\t\t */\n\t\tshowInput: function() {\n\t\t\tthis.$control_input.css({opacity: 1, position: 'relative', left: 0});\n\t\t\tthis.isInputHidden = false;\n\t\t},\n\t\n\t\t/**\n\t\t * Gives the control focus.\n\t\t */\n\t\tfocus: function() {\n\t\t\tvar self = this;\n\t\t\tif (self.isDisabled) return;\n\t\n\t\t\tself.ignoreFocus = true;\n\t\t\tself.$control_input[0].focus();\n\t\t\twindow.setTimeout(function() {\n\t\t\t\tself.ignoreFocus = false;\n\t\t\t\tself.onFocus();\n\t\t\t}, 0);\n\t\t},\n\t\n\t\t/**\n\t\t * Forces the control out of focus.\n\t\t *\n\t\t * @param {Element} dest\n\t\t */\n\t\tblur: function(dest) {\n\t\t\tthis.$control_input[0].blur();\n\t\t\tthis.onBlur(null, dest);\n\t\t},\n\t\n\t\t/**\n\t\t * Returns a function that scores an object\n\t\t * to show how good of a match it is to the\n\t\t * provided query.\n\t\t *\n\t\t * @param {string} query\n\t\t * @param {object} options\n\t\t * @return {function}\n\t\t */\n\t\tgetScoreFunction: function(query) {\n\t\t\treturn this.sifter.getScoreFunction(query, this.getSearchOptions());\n\t\t},\n\t\n\t\t/**\n\t\t * Returns search options for sifter (the system\n\t\t * for scoring and sorting results).\n\t\t *\n\t\t * @see https://github.com/brianreavis/sifter.js\n\t\t * @return {object}\n\t\t */\n\t\tgetSearchOptions: function() {\n\t\t\tvar settings = this.settings;\n\t\t\tvar sort = settings.sortField;\n\t\t\tif (typeof sort === 'string') {\n\t\t\t\tsort = [{field: sort}];\n\t\t\t}\n\t\n\t\t\treturn {\n\t\t\t\tfields : settings.searchField,\n\t\t\t\tconjunction : settings.searchConjunction,\n\t\t\t\tsort : sort\n\t\t\t};\n\t\t},\n\t\n\t\t/**\n\t\t * Searches through available options and returns\n\t\t * a sorted array of matches.\n\t\t *\n\t\t * Returns an object containing:\n\t\t *\n\t\t * - query {string}\n\t\t * - tokens {array}\n\t\t * - total {int}\n\t\t * - items {array}\n\t\t *\n\t\t * @param {string} query\n\t\t * @returns {object}\n\t\t */\n\t\tsearch: function(query) {\n\t\t\tvar i, value, score, result, calculateScore;\n\t\t\tvar self = this;\n\t\t\tvar settings = self.settings;\n\t\t\tvar options = this.getSearchOptions();\n\t\n\t\t\t// validate user-provided result scoring function\n\t\t\tif (settings.score) {\n\t\t\t\tcalculateScore = self.settings.score.apply(this, [query]);\n\t\t\t\tif (typeof calculateScore !== 'function') {\n\t\t\t\t\tthrow new Error('Selectize \"score\" setting must be a function that returns a function');\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// perform search\n\t\t\tif (query !== self.lastQuery) {\n\t\t\t\tself.lastQuery = query;\n\t\t\t\tresult = self.sifter.search(query, $.extend(options, {score: calculateScore}));\n\t\t\t\tself.currentResults = result;\n\t\t\t} else {\n\t\t\t\tresult = $.extend(true, {}, self.currentResults);\n\t\t\t}\n\t\n\t\t\t// filter out selected items\n\t\t\tif (settings.hideSelected) {\n\t\t\t\tfor (i = result.items.length - 1; i >= 0; i--) {\n\t\t\t\t\tif (self.items.indexOf(hash_key(result.items[i].id)) !== -1) {\n\t\t\t\t\t\tresult.items.splice(i, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\treturn result;\n\t\t},\n\t\n\t\t/**\n\t\t * Refreshes the list of available options shown\n\t\t * in the autocomplete dropdown menu.\n\t\t *\n\t\t * @param {boolean} triggerDropdown\n\t\t */\n\t\trefreshOptions: function(triggerDropdown) {\n\t\t\tvar i, j, k, n, groups, groups_order, option, option_html, optgroup, optgroups, html, html_children, has_create_option;\n\t\t\tvar $active, $active_before, $create;\n\t\n\t\t\tif (typeof triggerDropdown === 'undefined') {\n\t\t\t\ttriggerDropdown = true;\n\t\t\t}\n\t\n\t\t\tvar self = this;\n\t\t\tvar query = $.trim(self.$control_input.val());\n\t\t\tvar results = self.search(query);\n\t\t\tvar $dropdown_content = self.$dropdown_content;\n\t\t\tvar active_before = self.$activeOption && hash_key(self.$activeOption.attr('data-value'));\n\t\n\t\t\t// build markup\n\t\t\tn = results.items.length;\n\t\t\tif (typeof self.settings.maxOptions === 'number') {\n\t\t\t\tn = Math.min(n, self.settings.maxOptions);\n\t\t\t}\n\t\n\t\t\t// render and group available options individually\n\t\t\tgroups = {};\n\t\t\tgroups_order = [];\n\t\n\t\t\tfor (i = 0; i < n; i++) {\n\t\t\t\toption = self.options[results.items[i].id];\n\t\t\t\toption_html = self.render('option', option);\n\t\t\t\toptgroup = option[self.settings.optgroupField] || '';\n\t\t\t\toptgroups = $.isArray(optgroup) ? optgroup : [optgroup];\n\t\n\t\t\t\tfor (j = 0, k = optgroups && optgroups.length; j < k; j++) {\n\t\t\t\t\toptgroup = optgroups[j];\n\t\t\t\t\tif (!self.optgroups.hasOwnProperty(optgroup)) {\n\t\t\t\t\t\toptgroup = '';\n\t\t\t\t\t}\n\t\t\t\t\tif (!groups.hasOwnProperty(optgroup)) {\n\t\t\t\t\t\tgroups[optgroup] = [];\n\t\t\t\t\t\tgroups_order.push(optgroup);\n\t\t\t\t\t}\n\t\t\t\t\tgroups[optgroup].push(option_html);\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// sort optgroups\n\t\t\tif (this.settings.lockOptgroupOrder) {\n\t\t\t\tgroups_order.sort(function(a, b) {\n\t\t\t\t\tvar a_order = self.optgroups[a].$order || 0;\n\t\t\t\t\tvar b_order = self.optgroups[b].$order || 0;\n\t\t\t\t\treturn a_order - b_order;\n\t\t\t\t});\n\t\t\t}\n\t\n\t\t\t// render optgroup headers & join groups\n\t\t\thtml = [];\n\t\t\tfor (i = 0, n = groups_order.length; i < n; i++) {\n\t\t\t\toptgroup = groups_order[i];\n\t\t\t\tif (self.optgroups.hasOwnProperty(optgroup) && groups[optgroup].length) {\n\t\t\t\t\t// render the optgroup header and options within it,\n\t\t\t\t\t// then pass it to the wrapper template\n\t\t\t\t\thtml_children = self.render('optgroup_header', self.optgroups[optgroup]) || '';\n\t\t\t\t\thtml_children += groups[optgroup].join('');\n\t\t\t\t\thtml.push(self.render('optgroup', $.extend({}, self.optgroups[optgroup], {\n\t\t\t\t\t\thtml: html_children\n\t\t\t\t\t})));\n\t\t\t\t} else {\n\t\t\t\t\thtml.push(groups[optgroup].join(''));\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t$dropdown_content.html(html.join(''));\n\t\n\t\t\t// highlight matching terms inline\n\t\t\tif (self.settings.highlight && results.query.length && results.tokens.length) {\n\t\t\t\tfor (i = 0, n = results.tokens.length; i < n; i++) {\n\t\t\t\t\thighlight($dropdown_content, results.tokens[i].regex);\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// add \"selected\" class to selected options\n\t\t\tif (!self.settings.hideSelected) {\n\t\t\t\tfor (i = 0, n = self.items.length; i < n; i++) {\n\t\t\t\t\tself.getOption(self.items[i]).addClass('selected');\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// add create option\n\t\t\thas_create_option = self.canCreate(query);\n\t\t\tif (has_create_option) {\n\t\t\t\t$dropdown_content.prepend(self.render('option_create', {input: query}));\n\t\t\t\t$create = $($dropdown_content[0].childNodes[0]);\n\t\t\t}\n\t\n\t\t\t// activate\n\t\t\tself.hasOptions = results.items.length > 0 || has_create_option;\n\t\t\tif (self.hasOptions) {\n\t\t\t\tif (results.items.length > 0) {\n\t\t\t\t\t$active_before = active_before && self.getOption(active_before);\n\t\t\t\t\tif ($active_before && $active_before.length) {\n\t\t\t\t\t\t$active = $active_before;\n\t\t\t\t\t} else if (self.settings.mode === 'single' && self.items.length) {\n\t\t\t\t\t\t$active = self.getOption(self.items[0]);\n\t\t\t\t\t}\n\t\t\t\t\tif (!$active || !$active.length) {\n\t\t\t\t\t\tif ($create && !self.settings.addPrecedence) {\n\t\t\t\t\t\t\t$active = self.getAdjacentOption($create, 1);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$active = $dropdown_content.find('[data-selectable]:first');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$active = $create;\n\t\t\t\t}\n\t\t\t\tself.setActiveOption($active);\n\t\t\t\tif (triggerDropdown && !self.isOpen) { self.open(); }\n\t\t\t} else {\n\t\t\t\tself.setActiveOption(null);\n\t\t\t\tif (triggerDropdown && self.isOpen) { self.close(); }\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * Adds an available option. If it already exists,\n\t\t * nothing will happen. Note: this does not refresh\n\t\t * the options list dropdown (use `refreshOptions`\n\t\t * for that).\n\t\t *\n\t\t * Usage:\n\t\t *\n\t\t * this.addOption(data)\n\t\t *\n\t\t * @param {object|array} data\n\t\t */\n\t\taddOption: function(data) {\n\t\t\tvar i, n, value, self = this;\n\t\n\t\t\tif ($.isArray(data)) {\n\t\t\t\tfor (i = 0, n = data.length; i < n; i++) {\n\t\t\t\t\tself.addOption(data[i]);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tif (value = self.registerOption(data)) {\n\t\t\t\tself.userOptions[value] = true;\n\t\t\t\tself.lastQuery = null;\n\t\t\t\tself.trigger('option_add', value, data);\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * Registers an option to the pool of options.\n\t\t *\n\t\t * @param {object} data\n\t\t * @return {boolean|string}\n\t\t */\n\t\tregisterOption: function(data) {\n\t\t\tvar key = hash_key(data[this.settings.valueField]);\n\t\t\tif (!key || this.options.hasOwnProperty(key)) return false;\n\t\t\tdata.$order = data.$order || ++this.order;\n\t\t\tthis.options[key] = data;\n\t\t\treturn key;\n\t\t},\n\t\n\t\t/**\n\t\t * Registers an option group to the pool of option groups.\n\t\t *\n\t\t * @param {object} data\n\t\t * @return {boolean|string}\n\t\t */\n\t\tregisterOptionGroup: function(data) {\n\t\t\tvar key = hash_key(data[this.settings.optgroupValueField]);\n\t\t\tif (!key) return false;\n\t\n\t\t\tdata.$order = data.$order || ++this.order;\n\t\t\tthis.optgroups[key] = data;\n\t\t\treturn key;\n\t\t},\n\t\n\t\t/**\n\t\t * Registers a new optgroup for options\n\t\t * to be bucketed into.\n\t\t *\n\t\t * @param {string} id\n\t\t * @param {object} data\n\t\t */\n\t\taddOptionGroup: function(id, data) {\n\t\t\tdata[this.settings.optgroupValueField] = id;\n\t\t\tif (id = this.registerOptionGroup(data)) {\n\t\t\t\tthis.trigger('optgroup_add', id, data);\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * Removes an existing option group.\n\t\t *\n\t\t * @param {string} id\n\t\t */\n\t\tremoveOptionGroup: function(id) {\n\t\t\tif (this.optgroups.hasOwnProperty(id)) {\n\t\t\t\tdelete this.optgroups[id];\n\t\t\t\tthis.renderCache = {};\n\t\t\t\tthis.trigger('optgroup_remove', id);\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * Clears all existing option groups.\n\t\t */\n\t\tclearOptionGroups: function() {\n\t\t\tthis.optgroups = {};\n\t\t\tthis.renderCache = {};\n\t\t\tthis.trigger('optgroup_clear');\n\t\t},\n\t\n\t\t/**\n\t\t * Updates an option available for selection. If\n\t\t * it is visible in the selected items or options\n\t\t * dropdown, it will be re-rendered automatically.\n\t\t *\n\t\t * @param {string} value\n\t\t * @param {object} data\n\t\t */\n\t\tupdateOption: function(value, data) {\n\t\t\tvar self = this;\n\t\t\tvar $item, $item_new;\n\t\t\tvar value_new, index_item, cache_items, cache_options, order_old;\n\t\n\t\t\tvalue = hash_key(value);\n\t\t\tvalue_new = hash_key(data[self.settings.valueField]);\n\t\n\t\t\t// sanity checks\n\t\t\tif (value === null) return;\n\t\t\tif (!self.options.hasOwnProperty(value)) return;\n\t\t\tif (typeof value_new !== 'string') throw new Error('Value must be set in option data');\n\t\n\t\t\torder_old = self.options[value].$order;\n\t\n\t\t\t// update references\n\t\t\tif (value_new !== value) {\n\t\t\t\tdelete self.options[value];\n\t\t\t\tindex_item = self.items.indexOf(value);\n\t\t\t\tif (index_item !== -1) {\n\t\t\t\t\tself.items.splice(index_item, 1, value_new);\n\t\t\t\t}\n\t\t\t}\n\t\t\tdata.$order = data.$order || order_old;\n\t\t\tself.options[value_new] = data;\n\t\n\t\t\t// invalidate render cache\n\t\t\tcache_items = self.renderCache['item'];\n\t\t\tcache_options = self.renderCache['option'];\n\t\n\t\t\tif (cache_items) {\n\t\t\t\tdelete cache_items[value];\n\t\t\t\tdelete cache_items[value_new];\n\t\t\t}\n\t\t\tif (cache_options) {\n\t\t\t\tdelete cache_options[value];\n\t\t\t\tdelete cache_options[value_new];\n\t\t\t}\n\t\n\t\t\t// update the item if it's selected\n\t\t\tif (self.items.indexOf(value_new) !== -1) {\n\t\t\t\t$item = self.getItem(value);\n\t\t\t\t$item_new = $(self.render('item', data));\n\t\t\t\tif ($item.hasClass('active')) $item_new.addClass('active');\n\t\t\t\t$item.replaceWith($item_new);\n\t\t\t}\n\t\n\t\t\t// invalidate last query because we might have updated the sortField\n\t\t\tself.lastQuery = null;\n\t\n\t\t\t// update dropdown contents\n\t\t\tif (self.isOpen) {\n\t\t\t\tself.refreshOptions(false);\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * Removes a single option.\n\t\t *\n\t\t * @param {string} value\n\t\t * @param {boolean} silent\n\t\t */\n\t\tremoveOption: function(value, silent) {\n\t\t\tvar self = this;\n\t\t\tvalue = hash_key(value);\n\t\n\t\t\tvar cache_items = self.renderCache['item'];\n\t\t\tvar cache_options = self.renderCache['option'];\n\t\t\tif (cache_items) delete cache_items[value];\n\t\t\tif (cache_options) delete cache_options[value];\n\t\n\t\t\tdelete self.userOptions[value];\n\t\t\tdelete self.options[value];\n\t\t\tself.lastQuery = null;\n\t\t\tself.trigger('option_remove', value);\n\t\t\tself.removeItem(value, silent);\n\t\t},\n\t\n\t\t/**\n\t\t * Clears all options.\n\t\t */\n\t\tclearOptions: function() {\n\t\t\tvar self = this;\n\t\n\t\t\tself.loadedSearches = {};\n\t\t\tself.userOptions = {};\n\t\t\tself.renderCache = {};\n\t\t\tself.options = self.sifter.items = {};\n\t\t\tself.lastQuery = null;\n\t\t\tself.trigger('option_clear');\n\t\t\tself.clear();\n\t\t},\n\t\n\t\t/**\n\t\t * Returns the jQuery element of the option\n\t\t * matching the given value.\n\t\t *\n\t\t * @param {string} value\n\t\t * @returns {object}\n\t\t */\n\t\tgetOption: function(value) {\n\t\t\treturn this.getElementWithValue(value, this.$dropdown_content.find('[data-selectable]'));\n\t\t},\n\t\n\t\t/**\n\t\t * Returns the jQuery element of the next or\n\t\t * previous selectable option.\n\t\t *\n\t\t * @param {object} $option\n\t\t * @param {int} direction can be 1 for next or -1 for previous\n\t\t * @return {object}\n\t\t */\n\t\tgetAdjacentOption: function($option, direction) {\n\t\t\tvar $options = this.$dropdown.find('[data-selectable]');\n\t\t\tvar index = $options.index($option) + direction;\n\t\n\t\t\treturn index >= 0 && index < $options.length ? $options.eq(index) : $();\n\t\t},\n\t\n\t\t/**\n\t\t * Finds the first element with a \"data-value\" attribute\n\t\t * that matches the given value.\n\t\t *\n\t\t * @param {mixed} value\n\t\t * @param {object} $els\n\t\t * @return {object}\n\t\t */\n\t\tgetElementWithValue: function(value, $els) {\n\t\t\tvalue = hash_key(value);\n\t\n\t\t\tif (typeof value !== 'undefined' && value !== null) {\n\t\t\t\tfor (var i = 0, n = $els.length; i < n; i++) {\n\t\t\t\t\tif ($els[i].getAttribute('data-value') === value) {\n\t\t\t\t\t\treturn $($els[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\treturn $();\n\t\t},\n\t\n\t\t/**\n\t\t * Returns the jQuery element of the item\n\t\t * matching the given value.\n\t\t *\n\t\t * @param {string} value\n\t\t * @returns {object}\n\t\t */\n\t\tgetItem: function(value) {\n\t\t\treturn this.getElementWithValue(value, this.$control.children());\n\t\t},\n\t\n\t\t/**\n\t\t * \"Selects\" multiple items at once. Adds them to the list\n\t\t * at the current caret position.\n\t\t *\n\t\t * @param {string} value\n\t\t * @param {boolean} silent\n\t\t */\n\t\taddItems: function(values, silent) {\n\t\t\tvar items = $.isArray(values) ? values : [values];\n\t\t\tfor (var i = 0, n = items.length; i < n; i++) {\n\t\t\t\tthis.isPending = (i < n - 1);\n\t\t\t\tthis.addItem(items[i], silent);\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * \"Selects\" an item. Adds it to the list\n\t\t * at the current caret position.\n\t\t *\n\t\t * @param {string} value\n\t\t * @param {boolean} silent\n\t\t */\n\t\taddItem: function(value, silent) {\n\t\t\tvar events = silent ? [] : ['change'];\n\t\n\t\t\tdebounce_events(this, events, function() {\n\t\t\t\tvar $item, $option, $options;\n\t\t\t\tvar self = this;\n\t\t\t\tvar inputMode = self.settings.mode;\n\t\t\t\tvar i, active, value_next, wasFull;\n\t\t\t\tvalue = hash_key(value);\n\t\n\t\t\t\tif (self.items.indexOf(value) !== -1) {\n\t\t\t\t\tif (inputMode === 'single') self.close();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\n\t\t\t\tif (!self.options.hasOwnProperty(value)) return;\n\t\t\t\tif (inputMode === 'single') self.clear(silent);\n\t\t\t\tif (inputMode === 'multi' && self.isFull()) return;\n\t\n\t\t\t\t$item = $(self.render('item', self.options[value]));\n\t\t\t\twasFull = self.isFull();\n\t\t\t\tself.items.splice(self.caretPos, 0, value);\n\t\t\t\tself.insertAtCaret($item);\n\t\t\t\tif (!self.isPending || (!wasFull && self.isFull())) {\n\t\t\t\t\tself.refreshState();\n\t\t\t\t}\n\t\n\t\t\t\tif (self.isSetup) {\n\t\t\t\t\t$options = self.$dropdown_content.find('[data-selectable]');\n\t\n\t\t\t\t\t// update menu / remove the option (if this is not one item being added as part of series)\n\t\t\t\t\tif (!self.isPending) {\n\t\t\t\t\t\t$option = self.getOption(value);\n\t\t\t\t\t\tvalue_next = self.getAdjacentOption($option, 1).attr('data-value');\n\t\t\t\t\t\tself.refreshOptions(self.isFocused && inputMode !== 'single');\n\t\t\t\t\t\tif (value_next) {\n\t\t\t\t\t\t\tself.setActiveOption(self.getOption(value_next));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// hide the menu if the maximum number of items have been selected or no options are left\n\t\t\t\t\tif (!$options.length || self.isFull()) {\n\t\t\t\t\t\tself.close();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.positionDropdown();\n\t\t\t\t\t}\n\t\n\t\t\t\t\tself.updatePlaceholder();\n\t\t\t\t\tself.trigger('item_add', value, $item);\n\t\t\t\t\tself.updateOriginalInput({silent: silent});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\n\t\t/**\n\t\t * Removes the selected item matching\n\t\t * the provided value.\n\t\t *\n\t\t * @param {string} value\n\t\t */\n\t\tremoveItem: function(value, silent) {\n\t\t\tvar self = this;\n\t\t\tvar $item, i, idx;\n\t\n\t\t\t$item = (typeof value === 'object') ? value : self.getItem(value);\n\t\t\tvalue = hash_key($item.attr('data-value'));\n\t\t\ti = self.items.indexOf(value);\n\t\n\t\t\tif (i !== -1) {\n\t\t\t\t$item.remove();\n\t\t\t\tif ($item.hasClass('active')) {\n\t\t\t\t\tidx = self.$activeItems.indexOf($item[0]);\n\t\t\t\t\tself.$activeItems.splice(idx, 1);\n\t\t\t\t}\n\t\n\t\t\t\tself.items.splice(i, 1);\n\t\t\t\tself.lastQuery = null;\n\t\t\t\tif (!self.settings.persist && self.userOptions.hasOwnProperty(value)) {\n\t\t\t\t\tself.removeOption(value, silent);\n\t\t\t\t}\n\t\n\t\t\t\tif (i < self.caretPos) {\n\t\t\t\t\tself.setCaret(self.caretPos - 1);\n\t\t\t\t}\n\t\n\t\t\t\tself.refreshState();\n\t\t\t\tself.updatePlaceholder();\n\t\t\t\tself.updateOriginalInput({silent: silent});\n\t\t\t\tself.positionDropdown();\n\t\t\t\tself.trigger('item_remove', value, $item);\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * Invokes the `create` method provided in the\n\t\t * selectize options that should provide the data\n\t\t * for the new item, given the user input.\n\t\t *\n\t\t * Once this completes, it will be added\n\t\t * to the item list.\n\t\t *\n\t\t * @param {string} value\n\t\t * @param {boolean} [triggerDropdown]\n\t\t * @param {function} [callback]\n\t\t * @return {boolean}\n\t\t */\n\t\tcreateItem: function(input, triggerDropdown) {\n\t\t\tvar self = this;\n\t\t\tvar caret = self.caretPos;\n\t\t\tinput = input || $.trim(self.$control_input.val() || '');\n\t\n\t\t\tvar callback = arguments[arguments.length - 1];\n\t\t\tif (typeof callback !== 'function') callback = function() {};\n\t\n\t\t\tif (typeof triggerDropdown !== 'boolean') {\n\t\t\t\ttriggerDropdown = true;\n\t\t\t}\n\t\n\t\t\tif (!self.canCreate(input)) {\n\t\t\t\tcallback();\n\t\t\t\treturn false;\n\t\t\t}\n\t\n\t\t\tself.lock();\n\t\n\t\t\tvar setup = (typeof self.settings.create === 'function') ? this.settings.create : function(input) {\n\t\t\t\tvar data = {};\n\t\t\t\tdata[self.settings.labelField] = input;\n\t\t\t\tdata[self.settings.valueField] = input;\n\t\t\t\treturn data;\n\t\t\t};\n\t\n\t\t\tvar create = once(function(data) {\n\t\t\t\tself.unlock();\n\t\n\t\t\t\tif (!data || typeof data !== 'object') return callback();\n\t\t\t\tvar value = hash_key(data[self.settings.valueField]);\n\t\t\t\tif (typeof value !== 'string') return callback();\n\t\n\t\t\t\tself.setTextboxValue('');\n\t\t\t\tself.addOption(data);\n\t\t\t\tself.setCaret(caret);\n\t\t\t\tself.addItem(value);\n\t\t\t\tself.refreshOptions(triggerDropdown && self.settings.mode !== 'single');\n\t\t\t\tcallback(data);\n\t\t\t});\n\t\n\t\t\tvar output = setup.apply(this, [input, create]);\n\t\t\tif (typeof output !== 'undefined') {\n\t\t\t\tcreate(output);\n\t\t\t}\n\t\n\t\t\treturn true;\n\t\t},\n\t\n\t\t/**\n\t\t * Re-renders the selected item lists.\n\t\t */\n\t\trefreshItems: function() {\n\t\t\tthis.lastQuery = null;\n\t\n\t\t\tif (this.isSetup) {\n\t\t\t\tthis.addItem(this.items);\n\t\t\t}\n\t\n\t\t\tthis.refreshState();\n\t\t\tthis.updateOriginalInput();\n\t\t},\n\t\n\t\t/**\n\t\t * Updates all state-dependent attributes\n\t\t * and CSS classes.\n\t\t */\n\t\trefreshState: function() {\n\t\t\tvar invalid, self = this;\n\t\t\tif (self.isRequired) {\n\t\t\t\tif (self.items.length) self.isInvalid = false;\n\t\t\t\tself.$control_input.prop('required', invalid);\n\t\t\t}\n\t\t\tself.refreshClasses();\n\t\t},\n\t\n\t\t/**\n\t\t * Updates all state-dependent CSS classes.\n\t\t */\n\t\trefreshClasses: function() {\n\t\t\tvar self = this;\n\t\t\tvar isFull = self.isFull();\n\t\t\tvar isLocked = self.isLocked;\n\t\n\t\t\tself.$wrapper\n\t\t\t\t.toggleClass('rtl', self.rtl);\n\t\n\t\t\tself.$control\n\t\t\t\t.toggleClass('focus', self.isFocused)\n\t\t\t\t.toggleClass('disabled', self.isDisabled)\n\t\t\t\t.toggleClass('required', self.isRequired)\n\t\t\t\t.toggleClass('invalid', self.isInvalid)\n\t\t\t\t.toggleClass('locked', isLocked)\n\t\t\t\t.toggleClass('full', isFull).toggleClass('not-full', !isFull)\n\t\t\t\t.toggleClass('input-active', self.isFocused && !self.isInputHidden)\n\t\t\t\t.toggleClass('dropdown-active', self.isOpen)\n\t\t\t\t.toggleClass('has-options', !$.isEmptyObject(self.options))\n\t\t\t\t.toggleClass('has-items', self.items.length > 0);\n\t\n\t\t\tself.$control_input.data('grow', !isFull && !isLocked);\n\t\t},\n\t\n\t\t/**\n\t\t * Determines whether or not more items can be added\n\t\t * to the control without exceeding the user-defined maximum.\n\t\t *\n\t\t * @returns {boolean}\n\t\t */\n\t\tisFull: function() {\n\t\t\treturn this.settings.maxItems !== null && this.items.length >= this.settings.maxItems;\n\t\t},\n\t\n\t\t/**\n\t\t * Refreshes the original or \n\t\t * element to reflect the current state.\n\t\t */\n\t\tupdateOriginalInput: function(opts) {\n\t\t\tvar i, n, options, label, self = this;\n\t\t\topts = opts || {};\n\t\n\t\t\tif (self.tagType === TAG_SELECT) {\n\t\t\t\toptions = [];\n\t\t\t\tfor (i = 0, n = self.items.length; i < n; i++) {\n\t\t\t\t\tlabel = self.options[self.items[i]][self.settings.labelField] || '';\n\t\t\t\t\toptions.push('' + escape_html(label) + ' ');\n\t\t\t\t}\n\t\t\t\tif (!options.length && !this.$input.attr('multiple')) {\n\t\t\t\t\toptions.push(' ');\n\t\t\t\t}\n\t\t\t\tself.$input.html(options.join(''));\n\t\t\t} else {\n\t\t\t\tself.$input.val(self.getValue());\n\t\t\t\tself.$input.attr('value',self.$input.val());\n\t\t\t}\n\t\n\t\t\tif (self.isSetup) {\n\t\t\t\tif (!opts.silent) {\n\t\t\t\t\tself.trigger('change', self.$input.val());\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * Shows/hide the input placeholder depending\n\t\t * on if there items in the list already.\n\t\t */\n\t\tupdatePlaceholder: function() {\n\t\t\tif (!this.settings.placeholder) return;\n\t\t\tvar $input = this.$control_input;\n\t\n\t\t\tif (this.items.length) {\n\t\t\t\t$input.removeAttr('placeholder');\n\t\t\t} else {\n\t\t\t\t$input.attr('placeholder', this.settings.placeholder);\n\t\t\t}\n\t\t\t$input.triggerHandler('update', {force: true});\n\t\t},\n\t\n\t\t/**\n\t\t * Shows the autocomplete dropdown containing\n\t\t * the available options.\n\t\t */\n\t\topen: function() {\n\t\t\tvar self = this;\n\t\n\t\t\tif (self.isLocked || self.isOpen || (self.settings.mode === 'multi' && self.isFull())) return;\n\t\t\tself.focus();\n\t\t\tself.isOpen = true;\n\t\t\tself.refreshState();\n\t\t\tself.$dropdown.css({visibility: 'hidden', display: 'block'});\n\t\t\tself.positionDropdown();\n\t\t\tself.$dropdown.css({visibility: 'visible'});\n\t\t\tself.trigger('dropdown_open', self.$dropdown);\n\t\t},\n\t\n\t\t/**\n\t\t * Closes the autocomplete dropdown menu.\n\t\t */\n\t\tclose: function() {\n\t\t\tvar self = this;\n\t\t\tvar trigger = self.isOpen;\n\t\n\t\t\tif (self.settings.mode === 'single' && self.items.length) {\n\t\t\t\tself.hideInput();\n\t\t\t}\n\t\n\t\t\tself.isOpen = false;\n\t\t\tself.$dropdown.hide();\n\t\t\tself.setActiveOption(null);\n\t\t\tself.refreshState();\n\t\n\t\t\tif (trigger) self.trigger('dropdown_close', self.$dropdown);\n\t\t},\n\t\n\t\t/**\n\t\t * Calculates and applies the appropriate\n\t\t * position of the dropdown.\n\t\t */\n\t\tpositionDropdown: function() {\n\t\t\tvar $control = this.$control;\n\t\t\tvar offset = this.settings.dropdownParent === 'body' ? $control.offset() : $control.position();\n\t\t\toffset.top += $control.outerHeight(true);\n\t\n\t\t\tthis.$dropdown.css({\n\t\t\t\twidth : $control.outerWidth(),\n\t\t\t\ttop : offset.top,\n\t\t\t\tleft : offset.left\n\t\t\t});\n\t\t},\n\t\n\t\t/**\n\t\t * Resets / clears all selected items\n\t\t * from the control.\n\t\t *\n\t\t * @param {boolean} silent\n\t\t */\n\t\tclear: function(silent) {\n\t\t\tvar self = this;\n\t\n\t\t\tif (!self.items.length) return;\n\t\t\tself.$control.children(':not(input)').remove();\n\t\t\tself.items = [];\n\t\t\tself.lastQuery = null;\n\t\t\tself.setCaret(0);\n\t\t\tself.setActiveItem(null);\n\t\t\tself.updatePlaceholder();\n\t\t\tself.updateOriginalInput({silent: silent});\n\t\t\tself.refreshState();\n\t\t\tself.showInput();\n\t\t\tself.trigger('clear');\n\t\t},\n\t\n\t\t/**\n\t\t * A helper method for inserting an element\n\t\t * at the current caret position.\n\t\t *\n\t\t * @param {object} $el\n\t\t */\n\t\tinsertAtCaret: function($el) {\n\t\t\tvar caret = Math.min(this.caretPos, this.items.length);\n\t\t\tif (caret === 0) {\n\t\t\t\tthis.$control.prepend($el);\n\t\t\t} else {\n\t\t\t\t$(this.$control[0].childNodes[caret]).before($el);\n\t\t\t}\n\t\t\tthis.setCaret(caret + 1);\n\t\t},\n\t\n\t\t/**\n\t\t * Removes the current selected item(s).\n\t\t *\n\t\t * @param {object} e (optional)\n\t\t * @returns {boolean}\n\t\t */\n\t\tdeleteSelection: function(e) {\n\t\t\tvar i, n, direction, selection, values, caret, option_select, $option_select, $tail;\n\t\t\tvar self = this;\n\t\n\t\t\tdirection = (e && e.keyCode === KEY_BACKSPACE) ? -1 : 1;\n\t\t\tselection = getSelection(self.$control_input[0]);\n\t\n\t\t\tif (self.$activeOption && !self.settings.hideSelected) {\n\t\t\t\toption_select = self.getAdjacentOption(self.$activeOption, -1).attr('data-value');\n\t\t\t}\n\t\n\t\t\t// determine items that will be removed\n\t\t\tvalues = [];\n\t\n\t\t\tif (self.$activeItems.length) {\n\t\t\t\t$tail = self.$control.children('.active:' + (direction > 0 ? 'last' : 'first'));\n\t\t\t\tcaret = self.$control.children(':not(input)').index($tail);\n\t\t\t\tif (direction > 0) { caret++; }\n\t\n\t\t\t\tfor (i = 0, n = self.$activeItems.length; i < n; i++) {\n\t\t\t\t\tvalues.push($(self.$activeItems[i]).attr('data-value'));\n\t\t\t\t}\n\t\t\t\tif (e) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t}\n\t\t\t} else if ((self.isFocused || self.settings.mode === 'single') && self.items.length) {\n\t\t\t\tif (direction < 0 && selection.start === 0 && selection.length === 0) {\n\t\t\t\t\tvalues.push(self.items[self.caretPos - 1]);\n\t\t\t\t} else if (direction > 0 && selection.start === self.$control_input.val().length) {\n\t\t\t\t\tvalues.push(self.items[self.caretPos]);\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// allow the callback to abort\n\t\t\tif (!values.length || (typeof self.settings.onDelete === 'function' && self.settings.onDelete.apply(self, [values]) === false)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\n\t\t\t// perform removal\n\t\t\tif (typeof caret !== 'undefined') {\n\t\t\t\tself.setCaret(caret);\n\t\t\t}\n\t\t\twhile (values.length) {\n\t\t\t\tself.removeItem(values.pop());\n\t\t\t}\n\t\n\t\t\tself.showInput();\n\t\t\tself.positionDropdown();\n\t\t\tself.refreshOptions(true);\n\t\n\t\t\t// select previous option\n\t\t\tif (option_select) {\n\t\t\t\t$option_select = self.getOption(option_select);\n\t\t\t\tif ($option_select.length) {\n\t\t\t\t\tself.setActiveOption($option_select);\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\treturn true;\n\t\t},\n\t\n\t\t/**\n\t\t * Selects the previous / next item (depending\n\t\t * on the `direction` argument).\n\t\t *\n\t\t * > 0 - right\n\t\t * < 0 - left\n\t\t *\n\t\t * @param {int} direction\n\t\t * @param {object} e (optional)\n\t\t */\n\t\tadvanceSelection: function(direction, e) {\n\t\t\tvar tail, selection, idx, valueLength, cursorAtEdge, $tail;\n\t\t\tvar self = this;\n\t\n\t\t\tif (direction === 0) return;\n\t\t\tif (self.rtl) direction *= -1;\n\t\n\t\t\ttail = direction > 0 ? 'last' : 'first';\n\t\t\tselection = getSelection(self.$control_input[0]);\n\t\n\t\t\tif (self.isFocused && !self.isInputHidden) {\n\t\t\t\tvalueLength = self.$control_input.val().length;\n\t\t\t\tcursorAtEdge = direction < 0\n\t\t\t\t\t? selection.start === 0 && selection.length === 0\n\t\t\t\t\t: selection.start === valueLength;\n\t\n\t\t\t\tif (cursorAtEdge && !valueLength) {\n\t\t\t\t\tself.advanceCaret(direction, e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$tail = self.$control.children('.active:' + tail);\n\t\t\t\tif ($tail.length) {\n\t\t\t\t\tidx = self.$control.children(':not(input)').index($tail);\n\t\t\t\t\tself.setActiveItem(null);\n\t\t\t\t\tself.setCaret(direction > 0 ? idx + 1 : idx);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * Moves the caret left / right.\n\t\t *\n\t\t * @param {int} direction\n\t\t * @param {object} e (optional)\n\t\t */\n\t\tadvanceCaret: function(direction, e) {\n\t\t\tvar self = this, fn, $adj;\n\t\n\t\t\tif (direction === 0) return;\n\t\n\t\t\tfn = direction > 0 ? 'next' : 'prev';\n\t\t\tif (self.isShiftDown) {\n\t\t\t\t$adj = self.$control_input[fn]();\n\t\t\t\tif ($adj.length) {\n\t\t\t\t\tself.hideInput();\n\t\t\t\t\tself.setActiveItem($adj);\n\t\t\t\t\te && e.preventDefault();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tself.setCaret(self.caretPos + direction);\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * Moves the caret to the specified index.\n\t\t *\n\t\t * @param {int} i\n\t\t */\n\t\tsetCaret: function(i) {\n\t\t\tvar self = this;\n\t\n\t\t\tif (self.settings.mode === 'single') {\n\t\t\t\ti = self.items.length;\n\t\t\t} else {\n\t\t\t\ti = Math.max(0, Math.min(self.items.length, i));\n\t\t\t}\n\t\n\t\t\tif(!self.isPending) {\n\t\t\t\t// the input must be moved by leaving it in place and moving the\n\t\t\t\t// siblings, due to the fact that focus cannot be restored once lost\n\t\t\t\t// on mobile webkit devices\n\t\t\t\tvar j, n, fn, $children, $child;\n\t\t\t\t$children = self.$control.children(':not(input)');\n\t\t\t\tfor (j = 0, n = $children.length; j < n; j++) {\n\t\t\t\t\t$child = $($children[j]).detach();\n\t\t\t\t\tif (j < i) {\n\t\t\t\t\t\tself.$control_input.before($child);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.$control.append($child);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tself.caretPos = i;\n\t\t},\n\t\n\t\t/**\n\t\t * Disables user input on the control. Used while\n\t\t * items are being asynchronously created.\n\t\t */\n\t\tlock: function() {\n\t\t\tthis.close();\n\t\t\tthis.isLocked = true;\n\t\t\tthis.refreshState();\n\t\t},\n\t\n\t\t/**\n\t\t * Re-enables user input on the control.\n\t\t */\n\t\tunlock: function() {\n\t\t\tthis.isLocked = false;\n\t\t\tthis.refreshState();\n\t\t},\n\t\n\t\t/**\n\t\t * Disables user input on the control completely.\n\t\t * While disabled, it cannot receive focus.\n\t\t */\n\t\tdisable: function() {\n\t\t\tvar self = this;\n\t\t\tself.$input.prop('disabled', true);\n\t\t\tself.$control_input.prop('disabled', true).prop('tabindex', -1);\n\t\t\tself.isDisabled = true;\n\t\t\tself.lock();\n\t\t},\n\t\n\t\t/**\n\t\t * Enables the control so that it can respond\n\t\t * to focus and user input.\n\t\t */\n\t\tenable: function() {\n\t\t\tvar self = this;\n\t\t\tself.$input.prop('disabled', false);\n\t\t\tself.$control_input.prop('disabled', false).prop('tabindex', self.tabIndex);\n\t\t\tself.isDisabled = false;\n\t\t\tself.unlock();\n\t\t},\n\t\n\t\t/**\n\t\t * Completely destroys the control and\n\t\t * unbinds all event listeners so that it can\n\t\t * be garbage collected.\n\t\t */\n\t\tdestroy: function() {\n\t\t\tvar self = this;\n\t\t\tvar eventNS = self.eventNS;\n\t\t\tvar revertSettings = self.revertSettings;\n\t\n\t\t\tself.trigger('destroy');\n\t\t\tself.off();\n\t\t\tself.$wrapper.remove();\n\t\t\tself.$dropdown.remove();\n\t\n\t\t\tself.$input\n\t\t\t\t.html('')\n\t\t\t\t.append(revertSettings.$children)\n\t\t\t\t.removeAttr('tabindex')\n\t\t\t\t.removeClass('selectized')\n\t\t\t\t.attr({tabindex: revertSettings.tabindex})\n\t\t\t\t.show();\n\t\n\t\t\tself.$control_input.removeData('grow');\n\t\t\tself.$input.removeData('selectize');\n\t\n\t\t\t$(window).off(eventNS);\n\t\t\t$(document).off(eventNS);\n\t\t\t$(document.body).off(eventNS);\n\t\n\t\t\tdelete self.$input[0].selectize;\n\t\t},\n\t\n\t\t/**\n\t\t * A helper method for rendering \"item\" and\n\t\t * \"option\" templates, given the data.\n\t\t *\n\t\t * @param {string} templateName\n\t\t * @param {object} data\n\t\t * @returns {string}\n\t\t */\n\t\trender: function(templateName, data) {\n\t\t\tvar value, id, label;\n\t\t\tvar html = '';\n\t\t\tvar cache = false;\n\t\t\tvar self = this;\n\t\t\tvar regex_tag = /^[\\t \\r\\n]*<([a-z][a-z0-9\\-_]*(?:\\:[a-z][a-z0-9\\-_]*)?)/i;\n\t\n\t\t\tif (templateName === 'option' || templateName === 'item') {\n\t\t\t\tvalue = hash_key(data[self.settings.valueField]);\n\t\t\t\tcache = !!value;\n\t\t\t}\n\t\n\t\t\t// pull markup from cache if it exists\n\t\t\tif (cache) {\n\t\t\t\tif (!isset(self.renderCache[templateName])) {\n\t\t\t\t\tself.renderCache[templateName] = {};\n\t\t\t\t}\n\t\t\t\tif (self.renderCache[templateName].hasOwnProperty(value)) {\n\t\t\t\t\treturn self.renderCache[templateName][value];\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// render markup\n\t\t\thtml = self.settings.render[templateName].apply(this, [data, escape_html]);\n\t\n\t\t\t// add mandatory attributes\n\t\t\tif (templateName === 'option' || templateName === 'option_create') {\n\t\t\t\thtml = html.replace(regex_tag, '<$1 data-selectable');\n\t\t\t}\n\t\t\tif (templateName === 'optgroup') {\n\t\t\t\tid = data[self.settings.optgroupValueField] || '';\n\t\t\t\thtml = html.replace(regex_tag, '<$1 data-group=\"' + escape_replace(escape_html(id)) + '\"');\n\t\t\t}\n\t\t\tif (templateName === 'option' || templateName === 'item') {\n\t\t\t\thtml = html.replace(regex_tag, '<$1 data-value=\"' + escape_replace(escape_html(value || '')) + '\"');\n\t\t\t}\n\t\n\t\t\t// update cache\n\t\t\tif (cache) {\n\t\t\t\tself.renderCache[templateName][value] = html;\n\t\t\t}\n\t\n\t\t\treturn html;\n\t\t},\n\t\n\t\t/**\n\t\t * Clears the render cache for a template. If\n\t\t * no template is given, clears all render\n\t\t * caches.\n\t\t *\n\t\t * @param {string} templateName\n\t\t */\n\t\tclearCache: function(templateName) {\n\t\t\tvar self = this;\n\t\t\tif (typeof templateName === 'undefined') {\n\t\t\t\tself.renderCache = {};\n\t\t\t} else {\n\t\t\t\tdelete self.renderCache[templateName];\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * Determines whether or not to display the\n\t\t * create item prompt, given a user input.\n\t\t *\n\t\t * @param {string} input\n\t\t * @return {boolean}\n\t\t */\n\t\tcanCreate: function(input) {\n\t\t\tvar self = this;\n\t\t\tif (!self.settings.create) return false;\n\t\t\tvar filter = self.settings.createFilter;\n\t\t\treturn input.length\n\t\t\t\t&& (typeof filter !== 'function' || filter.apply(self, [input]))\n\t\t\t\t&& (typeof filter !== 'string' || new RegExp(filter).test(input))\n\t\t\t\t&& (!(filter instanceof RegExp) || filter.test(input));\n\t\t}\n\t\n\t});\n\t\n\t\n\tSelectize.count = 0;\n\tSelectize.defaults = {\n\t\toptions: [],\n\t\toptgroups: [],\n\t\n\t\tplugins: [],\n\t\tdelimiter: ',',\n\t\tsplitOn: null, // regexp or string for splitting up values from a paste command\n\t\tpersist: true,\n\t\tdiacritics: true,\n\t\tcreate: false,\n\t\tcreateOnBlur: false,\n\t\tcreateFilter: null,\n\t\thighlight: true,\n\t\topenOnFocus: true,\n\t\tmaxOptions: 1000,\n\t\tmaxItems: null,\n\t\thideSelected: null,\n\t\taddPrecedence: false,\n\t\tselectOnTab: false,\n\t\tpreload: false,\n\t\tallowEmptyOption: false,\n\t\tcloseAfterSelect: false,\n\t\n\t\tscrollDuration: 60,\n\t\tloadThrottle: 300,\n\t\tloadingClass: 'loading',\n\t\n\t\tdataAttr: 'data-data',\n\t\toptgroupField: 'optgroup',\n\t\tvalueField: 'value',\n\t\tlabelField: 'text',\n\t\toptgroupLabelField: 'label',\n\t\toptgroupValueField: 'value',\n\t\tlockOptgroupOrder: false,\n\t\n\t\tsortField: '$order',\n\t\tsearchField: ['text'],\n\t\tsearchConjunction: 'and',\n\t\n\t\tmode: null,\n\t\twrapperClass: 'selectize-control',\n\t\tinputClass: 'selectize-input',\n\t\tdropdownClass: 'selectize-dropdown',\n\t\tdropdownContentClass: 'selectize-dropdown-content',\n\t\n\t\tdropdownParent: null,\n\t\n\t\tcopyClassesToDropdown: true,\n\t\n\t\t/*\n\t\tload : null, // function(query, callback) { ... }\n\t\tscore : null, // function(search) { ... }\n\t\tonInitialize : null, // function() { ... }\n\t\tonChange : null, // function(value) { ... }\n\t\tonItemAdd : null, // function(value, $item) { ... }\n\t\tonItemRemove : null, // function(value) { ... }\n\t\tonClear : null, // function() { ... }\n\t\tonOptionAdd : null, // function(value, data) { ... }\n\t\tonOptionRemove : null, // function(value) { ... }\n\t\tonOptionClear : null, // function() { ... }\n\t\tonOptionGroupAdd : null, // function(id, data) { ... }\n\t\tonOptionGroupRemove : null, // function(id) { ... }\n\t\tonOptionGroupClear : null, // function() { ... }\n\t\tonDropdownOpen : null, // function($dropdown) { ... }\n\t\tonDropdownClose : null, // function($dropdown) { ... }\n\t\tonType : null, // function(str) { ... }\n\t\tonDelete : null, // function(values) { ... }\n\t\t*/\n\t\n\t\trender: {\n\t\t\t/*\n\t\t\titem: null,\n\t\t\toptgroup: null,\n\t\t\toptgroup_header: null,\n\t\t\toption: null,\n\t\t\toption_create: null\n\t\t\t*/\n\t\t}\n\t};\n\t\n\t\n\t$.fn.selectize = function(settings_user) {\n\t\tvar defaults = $.fn.selectize.defaults;\n\t\tvar settings = $.extend({}, defaults, settings_user);\n\t\tvar attr_data = settings.dataAttr;\n\t\tvar field_label = settings.labelField;\n\t\tvar field_value = settings.valueField;\n\t\tvar field_optgroup = settings.optgroupField;\n\t\tvar field_optgroup_label = settings.optgroupLabelField;\n\t\tvar field_optgroup_value = settings.optgroupValueField;\n\t\n\t\t/**\n\t\t * Initializes selectize from a element.\n\t\t *\n\t\t * @param {object} $input\n\t\t * @param {object} settings_element\n\t\t */\n\t\tvar init_textbox = function($input, settings_element) {\n\t\t\tvar i, n, values, option;\n\t\n\t\t\tvar data_raw = $input.attr(attr_data);\n\t\n\t\t\tif (!data_raw) {\n\t\t\t\tvar value = $.trim($input.val() || '');\n\t\t\t\tif (!settings.allowEmptyOption && !value.length) return;\n\t\t\t\tvalues = value.split(settings.delimiter);\n\t\t\t\tfor (i = 0, n = values.length; i < n; i++) {\n\t\t\t\t\toption = {};\n\t\t\t\t\toption[field_label] = values[i];\n\t\t\t\t\toption[field_value] = values[i];\n\t\t\t\t\tsettings_element.options.push(option);\n\t\t\t\t}\n\t\t\t\tsettings_element.items = values;\n\t\t\t} else {\n\t\t\t\tsettings_element.options = JSON.parse(data_raw);\n\t\t\t\tfor (i = 0, n = settings_element.options.length; i < n; i++) {\n\t\t\t\t\tsettings_element.items.push(settings_element.options[i][field_value]);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\n\t\t/**\n\t\t * Initializes selectize from a element.\n\t\t *\n\t\t * @param {object} $input\n\t\t * @param {object} settings_element\n\t\t */\n\t\tvar init_select = function($input, settings_element) {\n\t\t\tvar i, n, tagName, $children, order = 0;\n\t\t\tvar options = settings_element.options;\n\t\t\tvar optionsMap = {};\n\t\n\t\t\tvar readData = function($el) {\n\t\t\t\tvar data = attr_data && $el.attr(attr_data);\n\t\t\t\tif (typeof data === 'string' && data.length) {\n\t\t\t\t\treturn JSON.parse(data);\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t};\n\t\n\t\t\tvar addOption = function($option, group) {\n\t\t\t\t$option = $($option);\n\t\n\t\t\t\tvar value = hash_key($option.attr('value'));\n\t\t\t\tif (!value && !settings.allowEmptyOption) return;\n\t\n\t\t\t\t// if the option already exists, it's probably been\n\t\t\t\t// duplicated in another optgroup. in this case, push\n\t\t\t\t// the current group to the \"optgroup\" property on the\n\t\t\t\t// existing option so that it's rendered in both places.\n\t\t\t\tif (optionsMap.hasOwnProperty(value)) {\n\t\t\t\t\tif (group) {\n\t\t\t\t\t\tvar arr = optionsMap[value][field_optgroup];\n\t\t\t\t\t\tif (!arr) {\n\t\t\t\t\t\t\toptionsMap[value][field_optgroup] = group;\n\t\t\t\t\t\t} else if (!$.isArray(arr)) {\n\t\t\t\t\t\t\toptionsMap[value][field_optgroup] = [arr, group];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tarr.push(group);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\n\t\t\t\tvar option = readData($option) || {};\n\t\t\t\toption[field_label] = option[field_label] || $option.text();\n\t\t\t\toption[field_value] = option[field_value] || value;\n\t\t\t\toption[field_optgroup] = option[field_optgroup] || group;\n\t\n\t\t\t\toptionsMap[value] = option;\n\t\t\t\toptions.push(option);\n\t\n\t\t\t\tif ($option.is(':selected')) {\n\t\t\t\t\tsettings_element.items.push(value);\n\t\t\t\t}\n\t\t\t};\n\t\n\t\t\tvar addGroup = function($optgroup) {\n\t\t\t\tvar i, n, id, optgroup, $options;\n\t\n\t\t\t\t$optgroup = $($optgroup);\n\t\t\t\tid = $optgroup.attr('label');\n\t\n\t\t\t\tif (id) {\n\t\t\t\t\toptgroup = readData($optgroup) || {};\n\t\t\t\t\toptgroup[field_optgroup_label] = id;\n\t\t\t\t\toptgroup[field_optgroup_value] = id;\n\t\t\t\t\tsettings_element.optgroups.push(optgroup);\n\t\t\t\t}\n\t\n\t\t\t\t$options = $('option', $optgroup);\n\t\t\t\tfor (i = 0, n = $options.length; i < n; i++) {\n\t\t\t\t\taddOption($options[i], id);\n\t\t\t\t}\n\t\t\t};\n\t\n\t\t\tsettings_element.maxItems = $input.attr('multiple') ? null : 1;\n\t\n\t\t\t$children = $input.children();\n\t\t\tfor (i = 0, n = $children.length; i < n; i++) {\n\t\t\t\ttagName = $children[i].tagName.toLowerCase();\n\t\t\t\tif (tagName === 'optgroup') {\n\t\t\t\t\taddGroup($children[i]);\n\t\t\t\t} else if (tagName === 'option') {\n\t\t\t\t\taddOption($children[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\n\t\treturn this.each(function() {\n\t\t\tif (this.selectize) return;\n\t\n\t\t\tvar instance;\n\t\t\tvar $input = $(this);\n\t\t\tvar tag_name = this.tagName.toLowerCase();\n\t\t\tvar placeholder = $input.attr('placeholder') || $input.attr('data-placeholder');\n\t\t\tif (!placeholder && !settings.allowEmptyOption) {\n\t\t\t\tplaceholder = $input.children('option[value=\"\"]').text();\n\t\t\t}\n\t\n\t\t\tvar settings_element = {\n\t\t\t\t'placeholder' : placeholder,\n\t\t\t\t'options' : [],\n\t\t\t\t'optgroups' : [],\n\t\t\t\t'items' : []\n\t\t\t};\n\t\n\t\t\tif (tag_name === 'select') {\n\t\t\t\tinit_select($input, settings_element);\n\t\t\t} else {\n\t\t\t\tinit_textbox($input, settings_element);\n\t\t\t}\n\t\n\t\t\tinstance = new Selectize($input, $.extend(true, {}, defaults, settings_element, settings_user));\n\t\t});\n\t};\n\t\n\t$.fn.selectize.defaults = Selectize.defaults;\n\t$.fn.selectize.support = {\n\t\tvalidity: SUPPORTS_VALIDITY_API\n\t};\n\t\n\t\n\tSelectize.define('drag_drop', function(options) {\n\t\tif (!$.fn.sortable) throw new Error('The \"drag_drop\" plugin requires jQuery UI \"sortable\".');\n\t\tif (this.settings.mode !== 'multi') return;\n\t\tvar self = this;\n\t\n\t\tself.lock = (function() {\n\t\t\tvar original = self.lock;\n\t\t\treturn function() {\n\t\t\t\tvar sortable = self.$control.data('sortable');\n\t\t\t\tif (sortable) sortable.disable();\n\t\t\t\treturn original.apply(self, arguments);\n\t\t\t};\n\t\t})();\n\t\n\t\tself.unlock = (function() {\n\t\t\tvar original = self.unlock;\n\t\t\treturn function() {\n\t\t\t\tvar sortable = self.$control.data('sortable');\n\t\t\t\tif (sortable) sortable.enable();\n\t\t\t\treturn original.apply(self, arguments);\n\t\t\t};\n\t\t})();\n\t\n\t\tself.setup = (function() {\n\t\t\tvar original = self.setup;\n\t\t\treturn function() {\n\t\t\t\toriginal.apply(this, arguments);\n\t\n\t\t\t\tvar $control = self.$control.sortable({\n\t\t\t\t\titems: '[data-value]',\n\t\t\t\t\tforcePlaceholderSize: true,\n\t\t\t\t\tdisabled: self.isLocked,\n\t\t\t\t\tstart: function(e, ui) {\n\t\t\t\t\t\tui.placeholder.css('width', ui.helper.css('width'));\n\t\t\t\t\t\t$control.css({overflow: 'visible'});\n\t\t\t\t\t},\n\t\t\t\t\tstop: function() {\n\t\t\t\t\t\t$control.css({overflow: 'hidden'});\n\t\t\t\t\t\tvar active = self.$activeItems ? self.$activeItems.slice() : null;\n\t\t\t\t\t\tvar values = [];\n\t\t\t\t\t\t$control.children('[data-value]').each(function() {\n\t\t\t\t\t\t\tvalues.push($(this).attr('data-value'));\n\t\t\t\t\t\t});\n\t\t\t\t\t\tself.setValue(values);\n\t\t\t\t\t\tself.setActiveItem(active);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t};\n\t\t})();\n\t\n\t});\n\t\n\tSelectize.define('dropdown_header', function(options) {\n\t\tvar self = this;\n\t\n\t\toptions = $.extend({\n\t\t\ttitle : 'Untitled',\n\t\t\theaderClass : 'selectize-dropdown-header',\n\t\t\ttitleRowClass : 'selectize-dropdown-header-title',\n\t\t\tlabelClass : 'selectize-dropdown-header-label',\n\t\t\tcloseClass : 'selectize-dropdown-header-close',\n\t\n\t\t\thtml: function(data) {\n\t\t\t\treturn (\n\t\t\t\t\t'' +\n\t\t\t\t\t\t'
' +\n\t\t\t\t\t\t\t'
' + data.title + ' ' +\n\t\t\t\t\t\t\t'
× ' +\n\t\t\t\t\t\t'
' +\n\t\t\t\t\t'
'\n\t\t\t\t);\n\t\t\t}\n\t\t}, options);\n\t\n\t\tself.setup = (function() {\n\t\t\tvar original = self.setup;\n\t\t\treturn function() {\n\t\t\t\toriginal.apply(self, arguments);\n\t\t\t\tself.$dropdown_header = $(options.html(options));\n\t\t\t\tself.$dropdown.prepend(self.$dropdown_header);\n\t\t\t};\n\t\t})();\n\t\n\t});\n\t\n\tSelectize.define('optgroup_columns', function(options) {\n\t\tvar self = this;\n\t\n\t\toptions = $.extend({\n\t\t\tequalizeWidth : true,\n\t\t\tequalizeHeight : true\n\t\t}, options);\n\t\n\t\tthis.getAdjacentOption = function($option, direction) {\n\t\t\tvar $options = $option.closest('[data-group]').find('[data-selectable]');\n\t\t\tvar index = $options.index($option) + direction;\n\t\n\t\t\treturn index >= 0 && index < $options.length ? $options.eq(index) : $();\n\t\t};\n\t\n\t\tthis.onKeyDown = (function() {\n\t\t\tvar original = self.onKeyDown;\n\t\t\treturn function(e) {\n\t\t\t\tvar index, $option, $options, $optgroup;\n\t\n\t\t\t\tif (this.isOpen && (e.keyCode === KEY_LEFT || e.keyCode === KEY_RIGHT)) {\n\t\t\t\t\tself.ignoreHover = true;\n\t\t\t\t\t$optgroup = this.$activeOption.closest('[data-group]');\n\t\t\t\t\tindex = $optgroup.find('[data-selectable]').index(this.$activeOption);\n\t\n\t\t\t\t\tif(e.keyCode === KEY_LEFT) {\n\t\t\t\t\t\t$optgroup = $optgroup.prev('[data-group]');\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$optgroup = $optgroup.next('[data-group]');\n\t\t\t\t\t}\n\t\n\t\t\t\t\t$options = $optgroup.find('[data-selectable]');\n\t\t\t\t\t$option = $options.eq(Math.min($options.length - 1, index));\n\t\t\t\t\tif ($option.length) {\n\t\t\t\t\t\tthis.setActiveOption($option);\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\n\t\t\t\treturn original.apply(this, arguments);\n\t\t\t};\n\t\t})();\n\t\n\t\tvar getScrollbarWidth = function() {\n\t\t\tvar div;\n\t\t\tvar width = getScrollbarWidth.width;\n\t\t\tvar doc = document;\n\t\n\t\t\tif (typeof width === 'undefined') {\n\t\t\t\tdiv = doc.createElement('div');\n\t\t\t\tdiv.innerHTML = '';\n\t\t\t\tdiv = div.firstChild;\n\t\t\t\tdoc.body.appendChild(div);\n\t\t\t\twidth = getScrollbarWidth.width = div.offsetWidth - div.clientWidth;\n\t\t\t\tdoc.body.removeChild(div);\n\t\t\t}\n\t\t\treturn width;\n\t\t};\n\t\n\t\tvar equalizeSizes = function() {\n\t\t\tvar i, n, height_max, width, width_last, width_parent, $optgroups;\n\t\n\t\t\t$optgroups = $('[data-group]', self.$dropdown_content);\n\t\t\tn = $optgroups.length;\n\t\t\tif (!n || !self.$dropdown_content.width()) return;\n\t\n\t\t\tif (options.equalizeHeight) {\n\t\t\t\theight_max = 0;\n\t\t\t\tfor (i = 0; i < n; i++) {\n\t\t\t\t\theight_max = Math.max(height_max, $optgroups.eq(i).height());\n\t\t\t\t}\n\t\t\t\t$optgroups.css({height: height_max});\n\t\t\t}\n\t\n\t\t\tif (options.equalizeWidth) {\n\t\t\t\twidth_parent = self.$dropdown_content.innerWidth() - getScrollbarWidth();\n\t\t\t\twidth = Math.round(width_parent / n);\n\t\t\t\t$optgroups.css({width: width});\n\t\t\t\tif (n > 1) {\n\t\t\t\t\twidth_last = width_parent - width * (n - 1);\n\t\t\t\t\t$optgroups.eq(n - 1).css({width: width_last});\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\n\t\tif (options.equalizeHeight || options.equalizeWidth) {\n\t\t\thook.after(this, 'positionDropdown', equalizeSizes);\n\t\t\thook.after(this, 'refreshOptions', equalizeSizes);\n\t\t}\n\t\n\t\n\t});\n\t\n\tSelectize.define('remove_button', function(options) {\n\t\tif (this.settings.mode === 'single') return;\n\t\n\t\toptions = $.extend({\n\t\t\tlabel : '×',\n\t\t\ttitle : 'Remove',\n\t\t\tclassName : 'remove',\n\t\t\tappend : true\n\t\t}, options);\n\t\n\t\tvar self = this;\n\t\tvar html = '' + options.label + ' ';\n\t\n\t\t/**\n\t\t * Appends an element as a child (with raw HTML).\n\t\t *\n\t\t * @param {string} html_container\n\t\t * @param {string} html_element\n\t\t * @return {string}\n\t\t */\n\t\tvar append = function(html_container, html_element) {\n\t\t\tvar pos = html_container.search(/(<\\/[^>]+>\\s*)$/);\n\t\t\treturn html_container.substring(0, pos) + html_element + html_container.substring(pos);\n\t\t};\n\t\n\t\tthis.setup = (function() {\n\t\t\tvar original = self.setup;\n\t\t\treturn function() {\n\t\t\t\t// override the item rendering method to add the button to each\n\t\t\t\tif (options.append) {\n\t\t\t\t\tvar render_item = self.settings.render.item;\n\t\t\t\t\tself.settings.render.item = function(data) {\n\t\t\t\t\t\treturn append(render_item.apply(this, arguments), html);\n\t\t\t\t\t};\n\t\t\t\t}\n\t\n\t\t\t\toriginal.apply(this, arguments);\n\t\n\t\t\t\t// add event listener\n\t\t\t\tthis.$control.on('click', '.' + options.className, function(e) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tif (self.isLocked) return;\n\t\n\t\t\t\t\tvar $item = $(e.currentTarget).parent();\n\t\t\t\t\tself.setActiveItem($item);\n\t\t\t\t\tif (self.deleteSelection()) {\n\t\t\t\t\t\tself.setCaret(self.items.length);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\n\t\t\t};\n\t\t})();\n\t\n\t});\n\t\n\tSelectize.define('restore_on_backspace', function(options) {\n\t\tvar self = this;\n\t\n\t\toptions.text = options.text || function(option) {\n\t\t\treturn option[this.settings.labelField];\n\t\t};\n\t\n\t\tthis.onKeyDown = (function() {\n\t\t\tvar original = self.onKeyDown;\n\t\t\treturn function(e) {\n\t\t\t\tvar index, option;\n\t\t\t\tif (e.keyCode === KEY_BACKSPACE && this.$control_input.val() === '' && !this.$activeItems.length) {\n\t\t\t\t\tindex = this.caretPos - 1;\n\t\t\t\t\tif (index >= 0 && index < this.items.length) {\n\t\t\t\t\t\toption = this.options[this.items[index]];\n\t\t\t\t\t\tif (this.deleteSelection(e)) {\n\t\t\t\t\t\t\tthis.setTextboxValue(options.text.apply(this, [option]));\n\t\t\t\t\t\t\tthis.refreshOptions(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn original.apply(this, arguments);\n\t\t\t};\n\t\t})();\n\t});\n\t\n\n\treturn Selectize;\n}));\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/selectize/dist/js/selectize.js\n ** module id = 217\n ** module chunks = 1\n **/","/**\n * sifter.js\n * Copyright (c) 2013 Brian Reavis & contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this\n * file except in compliance with the License. You may obtain a copy of the License at:\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF\n * ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n *\n * @author Brian Reavis \n */\n\n(function(root, factory) {\n\tif (typeof define === 'function' && define.amd) {\n\t\tdefine(factory);\n\t} else if (typeof exports === 'object') {\n\t\tmodule.exports = factory();\n\t} else {\n\t\troot.Sifter = factory();\n\t}\n}(this, function() {\n\n\t/**\n\t * Textually searches arrays and hashes of objects\n\t * by property (or multiple properties). Designed\n\t * specifically for autocomplete.\n\t *\n\t * @constructor\n\t * @param {array|object} items\n\t * @param {object} items\n\t */\n\tvar Sifter = function(items, settings) {\n\t\tthis.items = items;\n\t\tthis.settings = settings || {diacritics: true};\n\t};\n\n\t/**\n\t * Splits a search string into an array of individual\n\t * regexps to be used to match results.\n\t *\n\t * @param {string} query\n\t * @returns {array}\n\t */\n\tSifter.prototype.tokenize = function(query) {\n\t\tquery = trim(String(query || '').toLowerCase());\n\t\tif (!query || !query.length) return [];\n\n\t\tvar i, n, regex, letter;\n\t\tvar tokens = [];\n\t\tvar words = query.split(/ +/);\n\n\t\tfor (i = 0, n = words.length; i < n; i++) {\n\t\t\tregex = escape_regex(words[i]);\n\t\t\tif (this.settings.diacritics) {\n\t\t\t\tfor (letter in DIACRITICS) {\n\t\t\t\t\tif (DIACRITICS.hasOwnProperty(letter)) {\n\t\t\t\t\t\tregex = regex.replace(new RegExp(letter, 'g'), DIACRITICS[letter]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttokens.push({\n\t\t\t\tstring : words[i],\n\t\t\t\tregex : new RegExp(regex, 'i')\n\t\t\t});\n\t\t}\n\n\t\treturn tokens;\n\t};\n\n\t/**\n\t * Iterates over arrays and hashes.\n\t *\n\t * ```\n\t * this.iterator(this.items, function(item, id) {\n\t * // invoked for each item\n\t * });\n\t * ```\n\t *\n\t * @param {array|object} object\n\t */\n\tSifter.prototype.iterator = function(object, callback) {\n\t\tvar iterator;\n\t\tif (is_array(object)) {\n\t\t\titerator = Array.prototype.forEach || function(callback) {\n\t\t\t\tfor (var i = 0, n = this.length; i < n; i++) {\n\t\t\t\t\tcallback(this[i], i, this);\n\t\t\t\t}\n\t\t\t};\n\t\t} else {\n\t\t\titerator = function(callback) {\n\t\t\t\tfor (var key in this) {\n\t\t\t\t\tif (this.hasOwnProperty(key)) {\n\t\t\t\t\t\tcallback(this[key], key, this);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\titerator.apply(object, [callback]);\n\t};\n\n\t/**\n\t * Returns a function to be used to score individual results.\n\t *\n\t * Good matches will have a higher score than poor matches.\n\t * If an item is not a match, 0 will be returned by the function.\n\t *\n\t * @param {object|string} search\n\t * @param {object} options (optional)\n\t * @returns {function}\n\t */\n\tSifter.prototype.getScoreFunction = function(search, options) {\n\t\tvar self, fields, tokens, token_count;\n\n\t\tself = this;\n\t\tsearch = self.prepareSearch(search, options);\n\t\ttokens = search.tokens;\n\t\tfields = search.options.fields;\n\t\ttoken_count = tokens.length;\n\n\t\t/**\n\t\t * Calculates how close of a match the\n\t\t * given value is against a search token.\n\t\t *\n\t\t * @param {mixed} value\n\t\t * @param {object} token\n\t\t * @return {number}\n\t\t */\n\t\tvar scoreValue = function(value, token) {\n\t\t\tvar score, pos;\n\n\t\t\tif (!value) return 0;\n\t\t\tvalue = String(value || '');\n\t\t\tpos = value.search(token.regex);\n\t\t\tif (pos === -1) return 0;\n\t\t\tscore = token.string.length / value.length;\n\t\t\tif (pos === 0) score += 0.5;\n\t\t\treturn score;\n\t\t};\n\n\t\t/**\n\t\t * Calculates the score of an object\n\t\t * against the search query.\n\t\t *\n\t\t * @param {object} token\n\t\t * @param {object} data\n\t\t * @return {number}\n\t\t */\n\t\tvar scoreObject = (function() {\n\t\t\tvar field_count = fields.length;\n\t\t\tif (!field_count) {\n\t\t\t\treturn function() { return 0; };\n\t\t\t}\n\t\t\tif (field_count === 1) {\n\t\t\t\treturn function(token, data) {\n\t\t\t\t\treturn scoreValue(data[fields[0]], token);\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn function(token, data) {\n\t\t\t\tfor (var i = 0, sum = 0; i < field_count; i++) {\n\t\t\t\t\tsum += scoreValue(data[fields[i]], token);\n\t\t\t\t}\n\t\t\t\treturn sum / field_count;\n\t\t\t};\n\t\t})();\n\n\t\tif (!token_count) {\n\t\t\treturn function() { return 0; };\n\t\t}\n\t\tif (token_count === 1) {\n\t\t\treturn function(data) {\n\t\t\t\treturn scoreObject(tokens[0], data);\n\t\t\t};\n\t\t}\n\n\t\tif (search.options.conjunction === 'and') {\n\t\t\treturn function(data) {\n\t\t\t\tvar score;\n\t\t\t\tfor (var i = 0, sum = 0; i < token_count; i++) {\n\t\t\t\t\tscore = scoreObject(tokens[i], data);\n\t\t\t\t\tif (score <= 0) return 0;\n\t\t\t\t\tsum += score;\n\t\t\t\t}\n\t\t\t\treturn sum / token_count;\n\t\t\t};\n\t\t} else {\n\t\t\treturn function(data) {\n\t\t\t\tfor (var i = 0, sum = 0; i < token_count; i++) {\n\t\t\t\t\tsum += scoreObject(tokens[i], data);\n\t\t\t\t}\n\t\t\t\treturn sum / token_count;\n\t\t\t};\n\t\t}\n\t};\n\n\t/**\n\t * Returns a function that can be used to compare two\n\t * results, for sorting purposes. If no sorting should\n\t * be performed, `null` will be returned.\n\t *\n\t * @param {string|object} search\n\t * @param {object} options\n\t * @return function(a,b)\n\t */\n\tSifter.prototype.getSortFunction = function(search, options) {\n\t\tvar i, n, self, field, fields, fields_count, multiplier, multipliers, get_field, implicit_score, sort;\n\n\t\tself = this;\n\t\tsearch = self.prepareSearch(search, options);\n\t\tsort = (!search.query && options.sort_empty) || options.sort;\n\n\t\t/**\n\t\t * Fetches the specified sort field value\n\t\t * from a search result item.\n\t\t *\n\t\t * @param {string} name\n\t\t * @param {object} result\n\t\t * @return {mixed}\n\t\t */\n\t\tget_field = function(name, result) {\n\t\t\tif (name === '$score') return result.score;\n\t\t\treturn self.items[result.id][name];\n\t\t};\n\n\t\t// parse options\n\t\tfields = [];\n\t\tif (sort) {\n\t\t\tfor (i = 0, n = sort.length; i < n; i++) {\n\t\t\t\tif (search.query || sort[i].field !== '$score') {\n\t\t\t\t\tfields.push(sort[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// the \"$score\" field is implied to be the primary\n\t\t// sort field, unless it's manually specified\n\t\tif (search.query) {\n\t\t\timplicit_score = true;\n\t\t\tfor (i = 0, n = fields.length; i < n; i++) {\n\t\t\t\tif (fields[i].field === '$score') {\n\t\t\t\t\timplicit_score = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (implicit_score) {\n\t\t\t\tfields.unshift({field: '$score', direction: 'desc'});\n\t\t\t}\n\t\t} else {\n\t\t\tfor (i = 0, n = fields.length; i < n; i++) {\n\t\t\t\tif (fields[i].field === '$score') {\n\t\t\t\t\tfields.splice(i, 1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tmultipliers = [];\n\t\tfor (i = 0, n = fields.length; i < n; i++) {\n\t\t\tmultipliers.push(fields[i].direction === 'desc' ? -1 : 1);\n\t\t}\n\n\t\t// build function\n\t\tfields_count = fields.length;\n\t\tif (!fields_count) {\n\t\t\treturn null;\n\t\t} else if (fields_count === 1) {\n\t\t\tfield = fields[0].field;\n\t\t\tmultiplier = multipliers[0];\n\t\t\treturn function(a, b) {\n\t\t\t\treturn multiplier * cmp(\n\t\t\t\t\tget_field(field, a),\n\t\t\t\t\tget_field(field, b)\n\t\t\t\t);\n\t\t\t};\n\t\t} else {\n\t\t\treturn function(a, b) {\n\t\t\t\tvar i, result, a_value, b_value, field;\n\t\t\t\tfor (i = 0; i < fields_count; i++) {\n\t\t\t\t\tfield = fields[i].field;\n\t\t\t\t\tresult = multipliers[i] * cmp(\n\t\t\t\t\t\tget_field(field, a),\n\t\t\t\t\t\tget_field(field, b)\n\t\t\t\t\t);\n\t\t\t\t\tif (result) return result;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t};\n\t\t}\n\t};\n\n\t/**\n\t * Parses a search query and returns an object\n\t * with tokens and fields ready to be populated\n\t * with results.\n\t *\n\t * @param {string} query\n\t * @param {object} options\n\t * @returns {object}\n\t */\n\tSifter.prototype.prepareSearch = function(query, options) {\n\t\tif (typeof query === 'object') return query;\n\n\t\toptions = extend({}, options);\n\n\t\tvar option_fields = options.fields;\n\t\tvar option_sort = options.sort;\n\t\tvar option_sort_empty = options.sort_empty;\n\n\t\tif (option_fields && !is_array(option_fields)) options.fields = [option_fields];\n\t\tif (option_sort && !is_array(option_sort)) options.sort = [option_sort];\n\t\tif (option_sort_empty && !is_array(option_sort_empty)) options.sort_empty = [option_sort_empty];\n\n\t\treturn {\n\t\t\toptions : options,\n\t\t\tquery : String(query || '').toLowerCase(),\n\t\t\ttokens : this.tokenize(query),\n\t\t\ttotal : 0,\n\t\t\titems : []\n\t\t};\n\t};\n\n\t/**\n\t * Searches through all items and returns a sorted array of matches.\n\t *\n\t * The `options` parameter can contain:\n\t *\n\t * - fields {string|array}\n\t * - sort {array}\n\t * - score {function}\n\t * - filter {bool}\n\t * - limit {integer}\n\t *\n\t * Returns an object containing:\n\t *\n\t * - options {object}\n\t * - query {string}\n\t * - tokens {array}\n\t * - total {int}\n\t * - items {array}\n\t *\n\t * @param {string} query\n\t * @param {object} options\n\t * @returns {object}\n\t */\n\tSifter.prototype.search = function(query, options) {\n\t\tvar self = this, value, score, search, calculateScore;\n\t\tvar fn_sort;\n\t\tvar fn_score;\n\n\t\tsearch = this.prepareSearch(query, options);\n\t\toptions = search.options;\n\t\tquery = search.query;\n\n\t\t// generate result scoring function\n\t\tfn_score = options.score || self.getScoreFunction(search);\n\n\t\t// perform search and sort\n\t\tif (query.length) {\n\t\t\tself.iterator(self.items, function(item, id) {\n\t\t\t\tscore = fn_score(item);\n\t\t\t\tif (options.filter === false || score > 0) {\n\t\t\t\t\tsearch.items.push({'score': score, 'id': id});\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tself.iterator(self.items, function(item, id) {\n\t\t\t\tsearch.items.push({'score': 1, 'id': id});\n\t\t\t});\n\t\t}\n\n\t\tfn_sort = self.getSortFunction(search, options);\n\t\tif (fn_sort) search.items.sort(fn_sort);\n\n\t\t// apply limits\n\t\tsearch.total = search.items.length;\n\t\tif (typeof options.limit === 'number') {\n\t\t\tsearch.items = search.items.slice(0, options.limit);\n\t\t}\n\n\t\treturn search;\n\t};\n\n\t// utilities\n\t// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\n\tvar cmp = function(a, b) {\n\t\tif (typeof a === 'number' && typeof b === 'number') {\n\t\t\treturn a > b ? 1 : (a < b ? -1 : 0);\n\t\t}\n\t\ta = asciifold(String(a || ''));\n\t\tb = asciifold(String(b || ''));\n\t\tif (a > b) return 1;\n\t\tif (b > a) return -1;\n\t\treturn 0;\n\t};\n\n\tvar extend = function(a, b) {\n\t\tvar i, n, k, object;\n\t\tfor (i = 1, n = arguments.length; i < n; i++) {\n\t\t\tobject = arguments[i];\n\t\t\tif (!object) continue;\n\t\t\tfor (k in object) {\n\t\t\t\tif (object.hasOwnProperty(k)) {\n\t\t\t\t\ta[k] = object[k];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn a;\n\t};\n\n\tvar trim = function(str) {\n\t\treturn (str + '').replace(/^\\s+|\\s+$|/g, '');\n\t};\n\n\tvar escape_regex = function(str) {\n\t\treturn (str + '').replace(/([.?*+^$[\\]\\\\(){}|-])/g, '\\\\$1');\n\t};\n\n\tvar is_array = Array.isArray || (typeof $ !== 'undefined' && $.isArray) || function(object) {\n\t\treturn Object.prototype.toString.call(object) === '[object Array]';\n\t};\n\n\tvar DIACRITICS = {\n\t\t'a': '[aÀÁÂÃÄÅàáâãäåĀāąĄ]',\n\t\t'c': '[cÇçćĆčČ]',\n\t\t'd': '[dđĐďĎð]',\n\t\t'e': '[eÈÉÊËèéêëěĚĒēęĘ]',\n\t\t'i': '[iÌÍÎÏìíîïĪī]',\n\t\t'l': '[lłŁ]',\n\t\t'n': '[nÑñňŇńŃ]',\n\t\t'o': '[oÒÓÔÕÕÖØòóôõöøŌō]',\n\t\t'r': '[rřŘ]',\n\t\t's': '[sŠšśŚ]',\n\t\t't': '[tťŤ]',\n\t\t'u': '[uÙÚÛÜùúûüůŮŪū]',\n\t\t'y': '[yŸÿýÝ]',\n\t\t'z': '[zŽžżŻźŹ]'\n\t};\n\n\tvar asciifold = (function() {\n\t\tvar i, n, k, chunk;\n\t\tvar foreignletters = '';\n\t\tvar lookup = {};\n\t\tfor (k in DIACRITICS) {\n\t\t\tif (DIACRITICS.hasOwnProperty(k)) {\n\t\t\t\tchunk = DIACRITICS[k].substring(2, DIACRITICS[k].length - 1);\n\t\t\t\tforeignletters += chunk;\n\t\t\t\tfor (i = 0, n = chunk.length; i < n; i++) {\n\t\t\t\t\tlookup[chunk.charAt(i)] = k;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tvar regexp = new RegExp('[' + foreignletters + ']', 'g');\n\t\treturn function(str) {\n\t\t\treturn str.replace(regexp, function(foreignletter) {\n\t\t\t\treturn lookup[foreignletter];\n\t\t\t}).toLowerCase();\n\t\t};\n\t})();\n\n\n\t// export\n\t// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\n\treturn Sifter;\n}));\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/sifter/sifter.js\n ** module id = 218\n ** module chunks = 1\n **/","/**\n * microplugin.js\n * Copyright (c) 2013 Brian Reavis & contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this\n * file except in compliance with the License. You may obtain a copy of the License at:\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF\n * ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n *\n * @author Brian Reavis \n */\n\n(function(root, factory) {\n\tif (typeof define === 'function' && define.amd) {\n\t\tdefine(factory);\n\t} else if (typeof exports === 'object') {\n\t\tmodule.exports = factory();\n\t} else {\n\t\troot.MicroPlugin = factory();\n\t}\n}(this, function() {\n\tvar MicroPlugin = {};\n\n\tMicroPlugin.mixin = function(Interface) {\n\t\tInterface.plugins = {};\n\n\t\t/**\n\t\t * Initializes the listed plugins (with options).\n\t\t * Acceptable formats:\n\t\t *\n\t\t * List (without options):\n\t\t * ['a', 'b', 'c']\n\t\t *\n\t\t * List (with options):\n\t\t * [{'name': 'a', options: {}}, {'name': 'b', options: {}}]\n\t\t *\n\t\t * Hash (with options):\n\t\t * {'a': { ... }, 'b': { ... }, 'c': { ... }}\n\t\t *\n\t\t * @param {mixed} plugins\n\t\t */\n\t\tInterface.prototype.initializePlugins = function(plugins) {\n\t\t\tvar i, n, key;\n\t\t\tvar self = this;\n\t\t\tvar queue = [];\n\n\t\t\tself.plugins = {\n\t\t\t\tnames : [],\n\t\t\t\tsettings : {},\n\t\t\t\trequested : {},\n\t\t\t\tloaded : {}\n\t\t\t};\n\n\t\t\tif (utils.isArray(plugins)) {\n\t\t\t\tfor (i = 0, n = plugins.length; i < n; i++) {\n\t\t\t\t\tif (typeof plugins[i] === 'string') {\n\t\t\t\t\t\tqueue.push(plugins[i]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.plugins.settings[plugins[i].name] = plugins[i].options;\n\t\t\t\t\t\tqueue.push(plugins[i].name);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (plugins) {\n\t\t\t\tfor (key in plugins) {\n\t\t\t\t\tif (plugins.hasOwnProperty(key)) {\n\t\t\t\t\t\tself.plugins.settings[key] = plugins[key];\n\t\t\t\t\t\tqueue.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twhile (queue.length) {\n\t\t\t\tself.require(queue.shift());\n\t\t\t}\n\t\t};\n\n\t\tInterface.prototype.loadPlugin = function(name) {\n\t\t\tvar self = this;\n\t\t\tvar plugins = self.plugins;\n\t\t\tvar plugin = Interface.plugins[name];\n\n\t\t\tif (!Interface.plugins.hasOwnProperty(name)) {\n\t\t\t\tthrow new Error('Unable to find \"' + name + '\" plugin');\n\t\t\t}\n\n\t\t\tplugins.requested[name] = true;\n\t\t\tplugins.loaded[name] = plugin.fn.apply(self, [self.plugins.settings[name] || {}]);\n\t\t\tplugins.names.push(name);\n\t\t};\n\n\t\t/**\n\t\t * Initializes a plugin.\n\t\t *\n\t\t * @param {string} name\n\t\t */\n\t\tInterface.prototype.require = function(name) {\n\t\t\tvar self = this;\n\t\t\tvar plugins = self.plugins;\n\n\t\t\tif (!self.plugins.loaded.hasOwnProperty(name)) {\n\t\t\t\tif (plugins.requested[name]) {\n\t\t\t\t\tthrow new Error('Plugin has circular dependency (\"' + name + '\")');\n\t\t\t\t}\n\t\t\t\tself.loadPlugin(name);\n\t\t\t}\n\n\t\t\treturn plugins.loaded[name];\n\t\t};\n\n\t\t/**\n\t\t * Registers a plugin.\n\t\t *\n\t\t * @param {string} name\n\t\t * @param {function} fn\n\t\t */\n\t\tInterface.define = function(name, fn) {\n\t\t\tInterface.plugins[name] = {\n\t\t\t\t'name' : name,\n\t\t\t\t'fn' : fn\n\t\t\t};\n\t\t};\n\t};\n\n\tvar utils = {\n\t\tisArray: Array.isArray || function(vArg) {\n\t\t\treturn Object.prototype.toString.call(vArg) === '[object Array]';\n\t\t}\n\t};\n\n\treturn MicroPlugin;\n}));\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/microplugin/src/microplugin.js\n ** module id = 219\n ** module chunks = 1\n **/","\n/*\n *\n * More info at [www.dropzonejs.com](http://www.dropzonejs.com)\n *\n * Copyright (c) 2012, Matias Meno\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n */\n\n(function() {\n var Dropzone, Emitter, camelize, contentLoaded, detectVerticalSquash, drawImageIOSFix, noop, without,\n __slice = [].slice,\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n\n noop = function() {};\n\n Emitter = (function() {\n function Emitter() {}\n\n Emitter.prototype.addEventListener = Emitter.prototype.on;\n\n Emitter.prototype.on = function(event, fn) {\n this._callbacks = this._callbacks || {};\n if (!this._callbacks[event]) {\n this._callbacks[event] = [];\n }\n this._callbacks[event].push(fn);\n return this;\n };\n\n Emitter.prototype.emit = function() {\n var args, callback, callbacks, event, _i, _len;\n event = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];\n this._callbacks = this._callbacks || {};\n callbacks = this._callbacks[event];\n if (callbacks) {\n for (_i = 0, _len = callbacks.length; _i < _len; _i++) {\n callback = callbacks[_i];\n callback.apply(this, args);\n }\n }\n return this;\n };\n\n Emitter.prototype.removeListener = Emitter.prototype.off;\n\n Emitter.prototype.removeAllListeners = Emitter.prototype.off;\n\n Emitter.prototype.removeEventListener = Emitter.prototype.off;\n\n Emitter.prototype.off = function(event, fn) {\n var callback, callbacks, i, _i, _len;\n if (!this._callbacks || arguments.length === 0) {\n this._callbacks = {};\n return this;\n }\n callbacks = this._callbacks[event];\n if (!callbacks) {\n return this;\n }\n if (arguments.length === 1) {\n delete this._callbacks[event];\n return this;\n }\n for (i = _i = 0, _len = callbacks.length; _i < _len; i = ++_i) {\n callback = callbacks[i];\n if (callback === fn) {\n callbacks.splice(i, 1);\n break;\n }\n }\n return this;\n };\n\n return Emitter;\n\n })();\n\n Dropzone = (function(_super) {\n var extend, resolveOption;\n\n __extends(Dropzone, _super);\n\n Dropzone.prototype.Emitter = Emitter;\n\n\n /*\n This is a list of all available events you can register on a dropzone object.\n \n You can register an event handler like this:\n \n dropzone.on(\"dragEnter\", function() { });\n */\n\n Dropzone.prototype.events = [\"drop\", \"dragstart\", \"dragend\", \"dragenter\", \"dragover\", \"dragleave\", \"addedfile\", \"addedfiles\", \"removedfile\", \"thumbnail\", \"error\", \"errormultiple\", \"processing\", \"processingmultiple\", \"uploadprogress\", \"totaluploadprogress\", \"sending\", \"sendingmultiple\", \"success\", \"successmultiple\", \"canceled\", \"canceledmultiple\", \"complete\", \"completemultiple\", \"reset\", \"maxfilesexceeded\", \"maxfilesreached\", \"queuecomplete\"];\n\n Dropzone.prototype.defaultOptions = {\n url: null,\n method: \"post\",\n withCredentials: false,\n parallelUploads: 2,\n uploadMultiple: false,\n maxFilesize: 256,\n paramName: \"file\",\n createImageThumbnails: true,\n maxThumbnailFilesize: 10,\n thumbnailWidth: 120,\n thumbnailHeight: 120,\n filesizeBase: 1000,\n maxFiles: null,\n params: {},\n clickable: true,\n ignoreHiddenFiles: true,\n acceptedFiles: null,\n acceptedMimeTypes: null,\n autoProcessQueue: true,\n autoQueue: true,\n addRemoveLinks: false,\n previewsContainer: null,\n hiddenInputContainer: \"body\",\n capture: null,\n dictDefaultMessage: \"Drop files here to upload\",\n dictFallbackMessage: \"Your browser does not support drag'n'drop file uploads.\",\n dictFallbackText: \"Please use the fallback form below to upload your files like in the olden days.\",\n dictFileTooBig: \"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.\",\n dictInvalidFileType: \"You can't upload files of this type.\",\n dictResponseError: \"Server responded with {{statusCode}} code.\",\n dictCancelUpload: \"Cancel upload\",\n dictCancelUploadConfirmation: \"Are you sure you want to cancel this upload?\",\n dictRemoveFile: \"Remove file\",\n dictRemoveFileConfirmation: null,\n dictMaxFilesExceeded: \"You can not upload any more files.\",\n accept: function(file, done) {\n return done();\n },\n init: function() {\n return noop;\n },\n forceFallback: false,\n fallback: function() {\n var child, messageElement, span, _i, _len, _ref;\n this.element.className = \"\" + this.element.className + \" dz-browser-not-supported\";\n _ref = this.element.getElementsByTagName(\"div\");\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n child = _ref[_i];\n if (/(^| )dz-message($| )/.test(child.className)) {\n messageElement = child;\n child.className = \"dz-message\";\n continue;\n }\n }\n if (!messageElement) {\n messageElement = Dropzone.createElement(\"
\");\n this.element.appendChild(messageElement);\n }\n span = messageElement.getElementsByTagName(\"span\")[0];\n if (span) {\n if (span.textContent != null) {\n span.textContent = this.options.dictFallbackMessage;\n } else if (span.innerText != null) {\n span.innerText = this.options.dictFallbackMessage;\n }\n }\n return this.element.appendChild(this.getFallbackForm());\n },\n resize: function(file) {\n var info, srcRatio, trgRatio;\n info = {\n srcX: 0,\n srcY: 0,\n srcWidth: file.width,\n srcHeight: file.height\n };\n srcRatio = file.width / file.height;\n info.optWidth = this.options.thumbnailWidth;\n info.optHeight = this.options.thumbnailHeight;\n if ((info.optWidth == null) && (info.optHeight == null)) {\n info.optWidth = info.srcWidth;\n info.optHeight = info.srcHeight;\n } else if (info.optWidth == null) {\n info.optWidth = srcRatio * info.optHeight;\n } else if (info.optHeight == null) {\n info.optHeight = (1 / srcRatio) * info.optWidth;\n }\n trgRatio = info.optWidth / info.optHeight;\n if (file.height < info.optHeight || file.width < info.optWidth) {\n info.trgHeight = info.srcHeight;\n info.trgWidth = info.srcWidth;\n } else {\n if (srcRatio > trgRatio) {\n info.srcHeight = file.height;\n info.srcWidth = info.srcHeight * trgRatio;\n } else {\n info.srcWidth = file.width;\n info.srcHeight = info.srcWidth / trgRatio;\n }\n }\n info.srcX = (file.width - info.srcWidth) / 2;\n info.srcY = (file.height - info.srcHeight) / 2;\n return info;\n },\n\n /*\n Those functions register themselves to the events on init and handle all\n the user interface specific stuff. Overwriting them won't break the upload\n but can break the way it's displayed.\n You can overwrite them if you don't like the default behavior. If you just\n want to add an additional event handler, register it on the dropzone object\n and don't overwrite those options.\n */\n drop: function(e) {\n return this.element.classList.remove(\"dz-drag-hover\");\n },\n dragstart: noop,\n dragend: function(e) {\n return this.element.classList.remove(\"dz-drag-hover\");\n },\n dragenter: function(e) {\n return this.element.classList.add(\"dz-drag-hover\");\n },\n dragover: function(e) {\n return this.element.classList.add(\"dz-drag-hover\");\n },\n dragleave: function(e) {\n return this.element.classList.remove(\"dz-drag-hover\");\n },\n paste: noop,\n reset: function() {\n return this.element.classList.remove(\"dz-started\");\n },\n addedfile: function(file) {\n var node, removeFileEvent, removeLink, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _results;\n if (this.element === this.previewsContainer) {\n this.element.classList.add(\"dz-started\");\n }\n if (this.previewsContainer) {\n file.previewElement = Dropzone.createElement(this.options.previewTemplate.trim());\n file.previewTemplate = file.previewElement;\n this.previewsContainer.appendChild(file.previewElement);\n _ref = file.previewElement.querySelectorAll(\"[data-dz-name]\");\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n node = _ref[_i];\n node.textContent = file.name;\n }\n _ref1 = file.previewElement.querySelectorAll(\"[data-dz-size]\");\n for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {\n node = _ref1[_j];\n node.innerHTML = this.filesize(file.size);\n }\n if (this.options.addRemoveLinks) {\n file._removeLink = Dropzone.createElement(\"\" + this.options.dictRemoveFile + \" \");\n file.previewElement.appendChild(file._removeLink);\n }\n removeFileEvent = (function(_this) {\n return function(e) {\n e.preventDefault();\n e.stopPropagation();\n if (file.status === Dropzone.UPLOADING) {\n return Dropzone.confirm(_this.options.dictCancelUploadConfirmation, function() {\n return _this.removeFile(file);\n });\n } else {\n if (_this.options.dictRemoveFileConfirmation) {\n return Dropzone.confirm(_this.options.dictRemoveFileConfirmation, function() {\n return _this.removeFile(file);\n });\n } else {\n return _this.removeFile(file);\n }\n }\n };\n })(this);\n _ref2 = file.previewElement.querySelectorAll(\"[data-dz-remove]\");\n _results = [];\n for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {\n removeLink = _ref2[_k];\n _results.push(removeLink.addEventListener(\"click\", removeFileEvent));\n }\n return _results;\n }\n },\n removedfile: function(file) {\n var _ref;\n if (file.previewElement) {\n if ((_ref = file.previewElement) != null) {\n _ref.parentNode.removeChild(file.previewElement);\n }\n }\n return this._updateMaxFilesReachedClass();\n },\n thumbnail: function(file, dataUrl) {\n var thumbnailElement, _i, _len, _ref;\n if (file.previewElement) {\n file.previewElement.classList.remove(\"dz-file-preview\");\n _ref = file.previewElement.querySelectorAll(\"[data-dz-thumbnail]\");\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n thumbnailElement = _ref[_i];\n thumbnailElement.alt = file.name;\n thumbnailElement.src = dataUrl;\n }\n return setTimeout(((function(_this) {\n return function() {\n return file.previewElement.classList.add(\"dz-image-preview\");\n };\n })(this)), 1);\n }\n },\n error: function(file, message) {\n var node, _i, _len, _ref, _results;\n if (file.previewElement) {\n file.previewElement.classList.add(\"dz-error\");\n if (typeof message !== \"String\" && message.error) {\n message = message.error;\n }\n _ref = file.previewElement.querySelectorAll(\"[data-dz-errormessage]\");\n _results = [];\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n node = _ref[_i];\n _results.push(node.textContent = message);\n }\n return _results;\n }\n },\n errormultiple: noop,\n processing: function(file) {\n if (file.previewElement) {\n file.previewElement.classList.add(\"dz-processing\");\n if (file._removeLink) {\n return file._removeLink.textContent = this.options.dictCancelUpload;\n }\n }\n },\n processingmultiple: noop,\n uploadprogress: function(file, progress, bytesSent) {\n var node, _i, _len, _ref, _results;\n if (file.previewElement) {\n _ref = file.previewElement.querySelectorAll(\"[data-dz-uploadprogress]\");\n _results = [];\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n node = _ref[_i];\n if (node.nodeName === 'PROGRESS') {\n _results.push(node.value = progress);\n } else {\n _results.push(node.style.width = \"\" + progress + \"%\");\n }\n }\n return _results;\n }\n },\n totaluploadprogress: noop,\n sending: noop,\n sendingmultiple: noop,\n success: function(file) {\n if (file.previewElement) {\n return file.previewElement.classList.add(\"dz-success\");\n }\n },\n successmultiple: noop,\n canceled: function(file) {\n return this.emit(\"error\", file, \"Upload canceled.\");\n },\n canceledmultiple: noop,\n complete: function(file) {\n if (file._removeLink) {\n file._removeLink.textContent = this.options.dictRemoveFile;\n }\n if (file.previewElement) {\n return file.previewElement.classList.add(\"dz-complete\");\n }\n },\n completemultiple: noop,\n maxfilesexceeded: noop,\n maxfilesreached: noop,\n queuecomplete: noop,\n addedfiles: noop,\n previewTemplate: \"\\n
\\n
\\n
\\n
\\n
\\n
\\n Check \\n \\n \\n \\n \\n \\n
\\n
\\n
\\n Error \\n \\n \\n \\n \\n \\n \\n \\n
\\n
\"\n };\n\n extend = function() {\n var key, object, objects, target, val, _i, _len;\n target = arguments[0], objects = 2 <= arguments.length ? __slice.call(arguments, 1) : [];\n for (_i = 0, _len = objects.length; _i < _len; _i++) {\n object = objects[_i];\n for (key in object) {\n val = object[key];\n target[key] = val;\n }\n }\n return target;\n };\n\n function Dropzone(element, options) {\n var elementOptions, fallback, _ref;\n this.element = element;\n this.version = Dropzone.version;\n this.defaultOptions.previewTemplate = this.defaultOptions.previewTemplate.replace(/\\n*/g, \"\");\n this.clickableElements = [];\n this.listeners = [];\n this.files = [];\n if (typeof this.element === \"string\") {\n this.element = document.querySelector(this.element);\n }\n if (!(this.element && (this.element.nodeType != null))) {\n throw new Error(\"Invalid dropzone element.\");\n }\n if (this.element.dropzone) {\n throw new Error(\"Dropzone already attached.\");\n }\n Dropzone.instances.push(this);\n this.element.dropzone = this;\n elementOptions = (_ref = Dropzone.optionsForElement(this.element)) != null ? _ref : {};\n this.options = extend({}, this.defaultOptions, elementOptions, options != null ? options : {});\n if (this.options.forceFallback || !Dropzone.isBrowserSupported()) {\n return this.options.fallback.call(this);\n }\n if (this.options.url == null) {\n this.options.url = this.element.getAttribute(\"action\");\n }\n if (!this.options.url) {\n throw new Error(\"No URL provided.\");\n }\n if (this.options.acceptedFiles && this.options.acceptedMimeTypes) {\n throw new Error(\"You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.\");\n }\n if (this.options.acceptedMimeTypes) {\n this.options.acceptedFiles = this.options.acceptedMimeTypes;\n delete this.options.acceptedMimeTypes;\n }\n this.options.method = this.options.method.toUpperCase();\n if ((fallback = this.getExistingFallback()) && fallback.parentNode) {\n fallback.parentNode.removeChild(fallback);\n }\n if (this.options.previewsContainer !== false) {\n if (this.options.previewsContainer) {\n this.previewsContainer = Dropzone.getElement(this.options.previewsContainer, \"previewsContainer\");\n } else {\n this.previewsContainer = this.element;\n }\n }\n if (this.options.clickable) {\n if (this.options.clickable === true) {\n this.clickableElements = [this.element];\n } else {\n this.clickableElements = Dropzone.getElements(this.options.clickable, \"clickable\");\n }\n }\n this.init();\n }\n\n Dropzone.prototype.getAcceptedFiles = function() {\n var file, _i, _len, _ref, _results;\n _ref = this.files;\n _results = [];\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n file = _ref[_i];\n if (file.accepted) {\n _results.push(file);\n }\n }\n return _results;\n };\n\n Dropzone.prototype.getRejectedFiles = function() {\n var file, _i, _len, _ref, _results;\n _ref = this.files;\n _results = [];\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n file = _ref[_i];\n if (!file.accepted) {\n _results.push(file);\n }\n }\n return _results;\n };\n\n Dropzone.prototype.getFilesWithStatus = function(status) {\n var file, _i, _len, _ref, _results;\n _ref = this.files;\n _results = [];\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n file = _ref[_i];\n if (file.status === status) {\n _results.push(file);\n }\n }\n return _results;\n };\n\n Dropzone.prototype.getQueuedFiles = function() {\n return this.getFilesWithStatus(Dropzone.QUEUED);\n };\n\n Dropzone.prototype.getUploadingFiles = function() {\n return this.getFilesWithStatus(Dropzone.UPLOADING);\n };\n\n Dropzone.prototype.getAddedFiles = function() {\n return this.getFilesWithStatus(Dropzone.ADDED);\n };\n\n Dropzone.prototype.getActiveFiles = function() {\n var file, _i, _len, _ref, _results;\n _ref = this.files;\n _results = [];\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n file = _ref[_i];\n if (file.status === Dropzone.UPLOADING || file.status === Dropzone.QUEUED) {\n _results.push(file);\n }\n }\n return _results;\n };\n\n Dropzone.prototype.init = function() {\n var eventName, noPropagation, setupHiddenFileInput, _i, _len, _ref, _ref1;\n if (this.element.tagName === \"form\") {\n this.element.setAttribute(\"enctype\", \"multipart/form-data\");\n }\n if (this.element.classList.contains(\"dropzone\") && !this.element.querySelector(\".dz-message\")) {\n this.element.appendChild(Dropzone.createElement(\"\" + this.options.dictDefaultMessage + \"
\"));\n }\n if (this.clickableElements.length) {\n setupHiddenFileInput = (function(_this) {\n return function() {\n if (_this.hiddenFileInput) {\n _this.hiddenFileInput.parentNode.removeChild(_this.hiddenFileInput);\n }\n _this.hiddenFileInput = document.createElement(\"input\");\n _this.hiddenFileInput.setAttribute(\"type\", \"file\");\n if ((_this.options.maxFiles == null) || _this.options.maxFiles > 1) {\n _this.hiddenFileInput.setAttribute(\"multiple\", \"multiple\");\n }\n _this.hiddenFileInput.className = \"dz-hidden-input\";\n if (_this.options.acceptedFiles != null) {\n _this.hiddenFileInput.setAttribute(\"accept\", _this.options.acceptedFiles);\n }\n if (_this.options.capture != null) {\n _this.hiddenFileInput.setAttribute(\"capture\", _this.options.capture);\n }\n _this.hiddenFileInput.style.visibility = \"hidden\";\n _this.hiddenFileInput.style.position = \"absolute\";\n _this.hiddenFileInput.style.top = \"0\";\n _this.hiddenFileInput.style.left = \"0\";\n _this.hiddenFileInput.style.height = \"0\";\n _this.hiddenFileInput.style.width = \"0\";\n document.querySelector(_this.options.hiddenInputContainer).appendChild(_this.hiddenFileInput);\n return _this.hiddenFileInput.addEventListener(\"change\", function() {\n var file, files, _i, _len;\n files = _this.hiddenFileInput.files;\n if (files.length) {\n for (_i = 0, _len = files.length; _i < _len; _i++) {\n file = files[_i];\n _this.addFile(file);\n }\n }\n _this.emit(\"addedfiles\", files);\n return setupHiddenFileInput();\n });\n };\n })(this);\n setupHiddenFileInput();\n }\n this.URL = (_ref = window.URL) != null ? _ref : window.webkitURL;\n _ref1 = this.events;\n for (_i = 0, _len = _ref1.length; _i < _len; _i++) {\n eventName = _ref1[_i];\n this.on(eventName, this.options[eventName]);\n }\n this.on(\"uploadprogress\", (function(_this) {\n return function() {\n return _this.updateTotalUploadProgress();\n };\n })(this));\n this.on(\"removedfile\", (function(_this) {\n return function() {\n return _this.updateTotalUploadProgress();\n };\n })(this));\n this.on(\"canceled\", (function(_this) {\n return function(file) {\n return _this.emit(\"complete\", file);\n };\n })(this));\n this.on(\"complete\", (function(_this) {\n return function(file) {\n if (_this.getAddedFiles().length === 0 && _this.getUploadingFiles().length === 0 && _this.getQueuedFiles().length === 0) {\n return setTimeout((function() {\n return _this.emit(\"queuecomplete\");\n }), 0);\n }\n };\n })(this));\n noPropagation = function(e) {\n e.stopPropagation();\n if (e.preventDefault) {\n return e.preventDefault();\n } else {\n return e.returnValue = false;\n }\n };\n this.listeners = [\n {\n element: this.element,\n events: {\n \"dragstart\": (function(_this) {\n return function(e) {\n return _this.emit(\"dragstart\", e);\n };\n })(this),\n \"dragenter\": (function(_this) {\n return function(e) {\n noPropagation(e);\n return _this.emit(\"dragenter\", e);\n };\n })(this),\n \"dragover\": (function(_this) {\n return function(e) {\n var efct;\n try {\n efct = e.dataTransfer.effectAllowed;\n } catch (_error) {}\n e.dataTransfer.dropEffect = 'move' === efct || 'linkMove' === efct ? 'move' : 'copy';\n noPropagation(e);\n return _this.emit(\"dragover\", e);\n };\n })(this),\n \"dragleave\": (function(_this) {\n return function(e) {\n return _this.emit(\"dragleave\", e);\n };\n })(this),\n \"drop\": (function(_this) {\n return function(e) {\n noPropagation(e);\n return _this.drop(e);\n };\n })(this),\n \"dragend\": (function(_this) {\n return function(e) {\n return _this.emit(\"dragend\", e);\n };\n })(this)\n }\n }\n ];\n this.clickableElements.forEach((function(_this) {\n return function(clickableElement) {\n return _this.listeners.push({\n element: clickableElement,\n events: {\n \"click\": function(evt) {\n if ((clickableElement !== _this.element) || (evt.target === _this.element || Dropzone.elementInside(evt.target, _this.element.querySelector(\".dz-message\")))) {\n _this.hiddenFileInput.click();\n }\n return true;\n }\n }\n });\n };\n })(this));\n this.enable();\n return this.options.init.call(this);\n };\n\n Dropzone.prototype.destroy = function() {\n var _ref;\n this.disable();\n this.removeAllFiles(true);\n if ((_ref = this.hiddenFileInput) != null ? _ref.parentNode : void 0) {\n this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput);\n this.hiddenFileInput = null;\n }\n delete this.element.dropzone;\n return Dropzone.instances.splice(Dropzone.instances.indexOf(this), 1);\n };\n\n Dropzone.prototype.updateTotalUploadProgress = function() {\n var activeFiles, file, totalBytes, totalBytesSent, totalUploadProgress, _i, _len, _ref;\n totalBytesSent = 0;\n totalBytes = 0;\n activeFiles = this.getActiveFiles();\n if (activeFiles.length) {\n _ref = this.getActiveFiles();\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n file = _ref[_i];\n totalBytesSent += file.upload.bytesSent;\n totalBytes += file.upload.total;\n }\n totalUploadProgress = 100 * totalBytesSent / totalBytes;\n } else {\n totalUploadProgress = 100;\n }\n return this.emit(\"totaluploadprogress\", totalUploadProgress, totalBytes, totalBytesSent);\n };\n\n Dropzone.prototype._getParamName = function(n) {\n if (typeof this.options.paramName === \"function\") {\n return this.options.paramName(n);\n } else {\n return \"\" + this.options.paramName + (this.options.uploadMultiple ? \"[\" + n + \"]\" : \"\");\n }\n };\n\n Dropzone.prototype.getFallbackForm = function() {\n var existingFallback, fields, fieldsString, form;\n if (existingFallback = this.getExistingFallback()) {\n return existingFallback;\n }\n fieldsString = \"\";\n fields = Dropzone.createElement(fieldsString);\n if (this.element.tagName !== \"FORM\") {\n form = Dropzone.createElement(\"\");\n form.appendChild(fields);\n } else {\n this.element.setAttribute(\"enctype\", \"multipart/form-data\");\n this.element.setAttribute(\"method\", this.options.method);\n }\n return form != null ? form : fields;\n };\n\n Dropzone.prototype.getExistingFallback = function() {\n var fallback, getFallback, tagName, _i, _len, _ref;\n getFallback = function(elements) {\n var el, _i, _len;\n for (_i = 0, _len = elements.length; _i < _len; _i++) {\n el = elements[_i];\n if (/(^| )fallback($| )/.test(el.className)) {\n return el;\n }\n }\n };\n _ref = [\"div\", \"form\"];\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n tagName = _ref[_i];\n if (fallback = getFallback(this.element.getElementsByTagName(tagName))) {\n return fallback;\n }\n }\n };\n\n Dropzone.prototype.setupEventListeners = function() {\n var elementListeners, event, listener, _i, _len, _ref, _results;\n _ref = this.listeners;\n _results = [];\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n elementListeners = _ref[_i];\n _results.push((function() {\n var _ref1, _results1;\n _ref1 = elementListeners.events;\n _results1 = [];\n for (event in _ref1) {\n listener = _ref1[event];\n _results1.push(elementListeners.element.addEventListener(event, listener, false));\n }\n return _results1;\n })());\n }\n return _results;\n };\n\n Dropzone.prototype.removeEventListeners = function() {\n var elementListeners, event, listener, _i, _len, _ref, _results;\n _ref = this.listeners;\n _results = [];\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n elementListeners = _ref[_i];\n _results.push((function() {\n var _ref1, _results1;\n _ref1 = elementListeners.events;\n _results1 = [];\n for (event in _ref1) {\n listener = _ref1[event];\n _results1.push(elementListeners.element.removeEventListener(event, listener, false));\n }\n return _results1;\n })());\n }\n return _results;\n };\n\n Dropzone.prototype.disable = function() {\n var file, _i, _len, _ref, _results;\n this.clickableElements.forEach(function(element) {\n return element.classList.remove(\"dz-clickable\");\n });\n this.removeEventListeners();\n _ref = this.files;\n _results = [];\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n file = _ref[_i];\n _results.push(this.cancelUpload(file));\n }\n return _results;\n };\n\n Dropzone.prototype.enable = function() {\n this.clickableElements.forEach(function(element) {\n return element.classList.add(\"dz-clickable\");\n });\n return this.setupEventListeners();\n };\n\n Dropzone.prototype.filesize = function(size) {\n var cutoff, i, selectedSize, selectedUnit, unit, units, _i, _len;\n selectedSize = 0;\n selectedUnit = \"b\";\n if (size > 0) {\n units = ['TB', 'GB', 'MB', 'KB', 'b'];\n for (i = _i = 0, _len = units.length; _i < _len; i = ++_i) {\n unit = units[i];\n cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10;\n if (size >= cutoff) {\n selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i);\n selectedUnit = unit;\n break;\n }\n }\n selectedSize = Math.round(10 * selectedSize) / 10;\n }\n return \"\" + selectedSize + \" \" + selectedUnit;\n };\n\n Dropzone.prototype._updateMaxFilesReachedClass = function() {\n if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) {\n if (this.getAcceptedFiles().length === this.options.maxFiles) {\n this.emit('maxfilesreached', this.files);\n }\n return this.element.classList.add(\"dz-max-files-reached\");\n } else {\n return this.element.classList.remove(\"dz-max-files-reached\");\n }\n };\n\n Dropzone.prototype.drop = function(e) {\n var files, items;\n if (!e.dataTransfer) {\n return;\n }\n this.emit(\"drop\", e);\n files = e.dataTransfer.files;\n this.emit(\"addedfiles\", files);\n if (files.length) {\n items = e.dataTransfer.items;\n if (items && items.length && (items[0].webkitGetAsEntry != null)) {\n this._addFilesFromItems(items);\n } else {\n this.handleFiles(files);\n }\n }\n };\n\n Dropzone.prototype.paste = function(e) {\n var items, _ref;\n if ((e != null ? (_ref = e.clipboardData) != null ? _ref.items : void 0 : void 0) == null) {\n return;\n }\n this.emit(\"paste\", e);\n items = e.clipboardData.items;\n if (items.length) {\n return this._addFilesFromItems(items);\n }\n };\n\n Dropzone.prototype.handleFiles = function(files) {\n var file, _i, _len, _results;\n _results = [];\n for (_i = 0, _len = files.length; _i < _len; _i++) {\n file = files[_i];\n _results.push(this.addFile(file));\n }\n return _results;\n };\n\n Dropzone.prototype._addFilesFromItems = function(items) {\n var entry, item, _i, _len, _results;\n _results = [];\n for (_i = 0, _len = items.length; _i < _len; _i++) {\n item = items[_i];\n if ((item.webkitGetAsEntry != null) && (entry = item.webkitGetAsEntry())) {\n if (entry.isFile) {\n _results.push(this.addFile(item.getAsFile()));\n } else if (entry.isDirectory) {\n _results.push(this._addFilesFromDirectory(entry, entry.name));\n } else {\n _results.push(void 0);\n }\n } else if (item.getAsFile != null) {\n if ((item.kind == null) || item.kind === \"file\") {\n _results.push(this.addFile(item.getAsFile()));\n } else {\n _results.push(void 0);\n }\n } else {\n _results.push(void 0);\n }\n }\n return _results;\n };\n\n Dropzone.prototype._addFilesFromDirectory = function(directory, path) {\n var dirReader, entriesReader;\n dirReader = directory.createReader();\n entriesReader = (function(_this) {\n return function(entries) {\n var entry, _i, _len;\n for (_i = 0, _len = entries.length; _i < _len; _i++) {\n entry = entries[_i];\n if (entry.isFile) {\n entry.file(function(file) {\n if (_this.options.ignoreHiddenFiles && file.name.substring(0, 1) === '.') {\n return;\n }\n file.fullPath = \"\" + path + \"/\" + file.name;\n return _this.addFile(file);\n });\n } else if (entry.isDirectory) {\n _this._addFilesFromDirectory(entry, \"\" + path + \"/\" + entry.name);\n }\n }\n };\n })(this);\n return dirReader.readEntries(entriesReader, function(error) {\n return typeof console !== \"undefined\" && console !== null ? typeof console.log === \"function\" ? console.log(error) : void 0 : void 0;\n });\n };\n\n Dropzone.prototype.accept = function(file, done) {\n if (file.size > this.options.maxFilesize * 1024 * 1024) {\n return done(this.options.dictFileTooBig.replace(\"{{filesize}}\", Math.round(file.size / 1024 / 10.24) / 100).replace(\"{{maxFilesize}}\", this.options.maxFilesize));\n } else if (!Dropzone.isValidFile(file, this.options.acceptedFiles)) {\n return done(this.options.dictInvalidFileType);\n } else if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) {\n done(this.options.dictMaxFilesExceeded.replace(\"{{maxFiles}}\", this.options.maxFiles));\n return this.emit(\"maxfilesexceeded\", file);\n } else {\n return this.options.accept.call(this, file, done);\n }\n };\n\n Dropzone.prototype.addFile = function(file) {\n file.upload = {\n progress: 0,\n total: file.size,\n bytesSent: 0\n };\n this.files.push(file);\n file.status = Dropzone.ADDED;\n this.emit(\"addedfile\", file);\n this._enqueueThumbnail(file);\n return this.accept(file, (function(_this) {\n return function(error) {\n if (error) {\n file.accepted = false;\n _this._errorProcessing([file], error);\n } else {\n file.accepted = true;\n if (_this.options.autoQueue) {\n _this.enqueueFile(file);\n }\n }\n return _this._updateMaxFilesReachedClass();\n };\n })(this));\n };\n\n Dropzone.prototype.enqueueFiles = function(files) {\n var file, _i, _len;\n for (_i = 0, _len = files.length; _i < _len; _i++) {\n file = files[_i];\n this.enqueueFile(file);\n }\n return null;\n };\n\n Dropzone.prototype.enqueueFile = function(file) {\n if (file.status === Dropzone.ADDED && file.accepted === true) {\n file.status = Dropzone.QUEUED;\n if (this.options.autoProcessQueue) {\n return setTimeout(((function(_this) {\n return function() {\n return _this.processQueue();\n };\n })(this)), 0);\n }\n } else {\n throw new Error(\"This file can't be queued because it has already been processed or was rejected.\");\n }\n };\n\n Dropzone.prototype._thumbnailQueue = [];\n\n Dropzone.prototype._processingThumbnail = false;\n\n Dropzone.prototype._enqueueThumbnail = function(file) {\n if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1024 * 1024) {\n this._thumbnailQueue.push(file);\n return setTimeout(((function(_this) {\n return function() {\n return _this._processThumbnailQueue();\n };\n })(this)), 0);\n }\n };\n\n Dropzone.prototype._processThumbnailQueue = function() {\n if (this._processingThumbnail || this._thumbnailQueue.length === 0) {\n return;\n }\n this._processingThumbnail = true;\n return this.createThumbnail(this._thumbnailQueue.shift(), (function(_this) {\n return function() {\n _this._processingThumbnail = false;\n return _this._processThumbnailQueue();\n };\n })(this));\n };\n\n Dropzone.prototype.removeFile = function(file) {\n if (file.status === Dropzone.UPLOADING) {\n this.cancelUpload(file);\n }\n this.files = without(this.files, file);\n this.emit(\"removedfile\", file);\n if (this.files.length === 0) {\n return this.emit(\"reset\");\n }\n };\n\n Dropzone.prototype.removeAllFiles = function(cancelIfNecessary) {\n var file, _i, _len, _ref;\n if (cancelIfNecessary == null) {\n cancelIfNecessary = false;\n }\n _ref = this.files.slice();\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n file = _ref[_i];\n if (file.status !== Dropzone.UPLOADING || cancelIfNecessary) {\n this.removeFile(file);\n }\n }\n return null;\n };\n\n Dropzone.prototype.createThumbnail = function(file, callback) {\n var fileReader;\n fileReader = new FileReader;\n fileReader.onload = (function(_this) {\n return function() {\n if (file.type === \"image/svg+xml\") {\n _this.emit(\"thumbnail\", file, fileReader.result);\n if (callback != null) {\n callback();\n }\n return;\n }\n return _this.createThumbnailFromUrl(file, fileReader.result, callback);\n };\n })(this);\n return fileReader.readAsDataURL(file);\n };\n\n Dropzone.prototype.createThumbnailFromUrl = function(file, imageUrl, callback, crossOrigin) {\n var img;\n img = document.createElement(\"img\");\n if (crossOrigin) {\n img.crossOrigin = crossOrigin;\n }\n img.onload = (function(_this) {\n return function() {\n var canvas, ctx, resizeInfo, thumbnail, _ref, _ref1, _ref2, _ref3;\n file.width = img.width;\n file.height = img.height;\n resizeInfo = _this.options.resize.call(_this, file);\n if (resizeInfo.trgWidth == null) {\n resizeInfo.trgWidth = resizeInfo.optWidth;\n }\n if (resizeInfo.trgHeight == null) {\n resizeInfo.trgHeight = resizeInfo.optHeight;\n }\n canvas = document.createElement(\"canvas\");\n ctx = canvas.getContext(\"2d\");\n canvas.width = resizeInfo.trgWidth;\n canvas.height = resizeInfo.trgHeight;\n drawImageIOSFix(ctx, img, (_ref = resizeInfo.srcX) != null ? _ref : 0, (_ref1 = resizeInfo.srcY) != null ? _ref1 : 0, resizeInfo.srcWidth, resizeInfo.srcHeight, (_ref2 = resizeInfo.trgX) != null ? _ref2 : 0, (_ref3 = resizeInfo.trgY) != null ? _ref3 : 0, resizeInfo.trgWidth, resizeInfo.trgHeight);\n thumbnail = canvas.toDataURL(\"image/png\");\n _this.emit(\"thumbnail\", file, thumbnail);\n if (callback != null) {\n return callback();\n }\n };\n })(this);\n if (callback != null) {\n img.onerror = callback;\n }\n return img.src = imageUrl;\n };\n\n Dropzone.prototype.processQueue = function() {\n var i, parallelUploads, processingLength, queuedFiles;\n parallelUploads = this.options.parallelUploads;\n processingLength = this.getUploadingFiles().length;\n i = processingLength;\n if (processingLength >= parallelUploads) {\n return;\n }\n queuedFiles = this.getQueuedFiles();\n if (!(queuedFiles.length > 0)) {\n return;\n }\n if (this.options.uploadMultiple) {\n return this.processFiles(queuedFiles.slice(0, parallelUploads - processingLength));\n } else {\n while (i < parallelUploads) {\n if (!queuedFiles.length) {\n return;\n }\n this.processFile(queuedFiles.shift());\n i++;\n }\n }\n };\n\n Dropzone.prototype.processFile = function(file) {\n return this.processFiles([file]);\n };\n\n Dropzone.prototype.processFiles = function(files) {\n var file, _i, _len;\n for (_i = 0, _len = files.length; _i < _len; _i++) {\n file = files[_i];\n file.processing = true;\n file.status = Dropzone.UPLOADING;\n this.emit(\"processing\", file);\n }\n if (this.options.uploadMultiple) {\n this.emit(\"processingmultiple\", files);\n }\n return this.uploadFiles(files);\n };\n\n Dropzone.prototype._getFilesWithXhr = function(xhr) {\n var file, files;\n return files = (function() {\n var _i, _len, _ref, _results;\n _ref = this.files;\n _results = [];\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n file = _ref[_i];\n if (file.xhr === xhr) {\n _results.push(file);\n }\n }\n return _results;\n }).call(this);\n };\n\n Dropzone.prototype.cancelUpload = function(file) {\n var groupedFile, groupedFiles, _i, _j, _len, _len1, _ref;\n if (file.status === Dropzone.UPLOADING) {\n groupedFiles = this._getFilesWithXhr(file.xhr);\n for (_i = 0, _len = groupedFiles.length; _i < _len; _i++) {\n groupedFile = groupedFiles[_i];\n groupedFile.status = Dropzone.CANCELED;\n }\n file.xhr.abort();\n for (_j = 0, _len1 = groupedFiles.length; _j < _len1; _j++) {\n groupedFile = groupedFiles[_j];\n this.emit(\"canceled\", groupedFile);\n }\n if (this.options.uploadMultiple) {\n this.emit(\"canceledmultiple\", groupedFiles);\n }\n } else if ((_ref = file.status) === Dropzone.ADDED || _ref === Dropzone.QUEUED) {\n file.status = Dropzone.CANCELED;\n this.emit(\"canceled\", file);\n if (this.options.uploadMultiple) {\n this.emit(\"canceledmultiple\", [file]);\n }\n }\n if (this.options.autoProcessQueue) {\n return this.processQueue();\n }\n };\n\n resolveOption = function() {\n var args, option;\n option = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];\n if (typeof option === 'function') {\n return option.apply(this, args);\n }\n return option;\n };\n\n Dropzone.prototype.uploadFile = function(file) {\n return this.uploadFiles([file]);\n };\n\n Dropzone.prototype.uploadFiles = function(files) {\n var file, formData, handleError, headerName, headerValue, headers, i, input, inputName, inputType, key, method, option, progressObj, response, updateProgress, url, value, xhr, _i, _j, _k, _l, _len, _len1, _len2, _len3, _m, _ref, _ref1, _ref2, _ref3, _ref4, _ref5;\n xhr = new XMLHttpRequest();\n for (_i = 0, _len = files.length; _i < _len; _i++) {\n file = files[_i];\n file.xhr = xhr;\n }\n method = resolveOption(this.options.method, files);\n url = resolveOption(this.options.url, files);\n xhr.open(method, url, true);\n xhr.withCredentials = !!this.options.withCredentials;\n response = null;\n handleError = (function(_this) {\n return function() {\n var _j, _len1, _results;\n _results = [];\n for (_j = 0, _len1 = files.length; _j < _len1; _j++) {\n file = files[_j];\n _results.push(_this._errorProcessing(files, response || _this.options.dictResponseError.replace(\"{{statusCode}}\", xhr.status), xhr));\n }\n return _results;\n };\n })(this);\n updateProgress = (function(_this) {\n return function(e) {\n var allFilesFinished, progress, _j, _k, _l, _len1, _len2, _len3, _results;\n if (e != null) {\n progress = 100 * e.loaded / e.total;\n for (_j = 0, _len1 = files.length; _j < _len1; _j++) {\n file = files[_j];\n file.upload = {\n progress: progress,\n total: e.total,\n bytesSent: e.loaded\n };\n }\n } else {\n allFilesFinished = true;\n progress = 100;\n for (_k = 0, _len2 = files.length; _k < _len2; _k++) {\n file = files[_k];\n if (!(file.upload.progress === 100 && file.upload.bytesSent === file.upload.total)) {\n allFilesFinished = false;\n }\n file.upload.progress = progress;\n file.upload.bytesSent = file.upload.total;\n }\n if (allFilesFinished) {\n return;\n }\n }\n _results = [];\n for (_l = 0, _len3 = files.length; _l < _len3; _l++) {\n file = files[_l];\n _results.push(_this.emit(\"uploadprogress\", file, progress, file.upload.bytesSent));\n }\n return _results;\n };\n })(this);\n xhr.onload = (function(_this) {\n return function(e) {\n var _ref;\n if (files[0].status === Dropzone.CANCELED) {\n return;\n }\n if (xhr.readyState !== 4) {\n return;\n }\n response = xhr.responseText;\n if (xhr.getResponseHeader(\"content-type\") && ~xhr.getResponseHeader(\"content-type\").indexOf(\"application/json\")) {\n try {\n response = JSON.parse(response);\n } catch (_error) {\n e = _error;\n response = \"Invalid JSON response from server.\";\n }\n }\n updateProgress();\n if (!((200 <= (_ref = xhr.status) && _ref < 300))) {\n return handleError();\n } else {\n return _this._finished(files, response, e);\n }\n };\n })(this);\n xhr.onerror = (function(_this) {\n return function() {\n if (files[0].status === Dropzone.CANCELED) {\n return;\n }\n return handleError();\n };\n })(this);\n progressObj = (_ref = xhr.upload) != null ? _ref : xhr;\n progressObj.onprogress = updateProgress;\n headers = {\n \"Accept\": \"application/json\",\n \"Cache-Control\": \"no-cache\",\n \"X-Requested-With\": \"XMLHttpRequest\"\n };\n if (this.options.headers) {\n extend(headers, this.options.headers);\n }\n for (headerName in headers) {\n headerValue = headers[headerName];\n if (headerValue) {\n xhr.setRequestHeader(headerName, headerValue);\n }\n }\n formData = new FormData();\n if (this.options.params) {\n _ref1 = this.options.params;\n for (key in _ref1) {\n value = _ref1[key];\n formData.append(key, value);\n }\n }\n for (_j = 0, _len1 = files.length; _j < _len1; _j++) {\n file = files[_j];\n this.emit(\"sending\", file, xhr, formData);\n }\n if (this.options.uploadMultiple) {\n this.emit(\"sendingmultiple\", files, xhr, formData);\n }\n if (this.element.tagName === \"FORM\") {\n _ref2 = this.element.querySelectorAll(\"input, textarea, select, button\");\n for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {\n input = _ref2[_k];\n inputName = input.getAttribute(\"name\");\n inputType = input.getAttribute(\"type\");\n if (input.tagName === \"SELECT\" && input.hasAttribute(\"multiple\")) {\n _ref3 = input.options;\n for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) {\n option = _ref3[_l];\n if (option.selected) {\n formData.append(inputName, option.value);\n }\n }\n } else if (!inputType || ((_ref4 = inputType.toLowerCase()) !== \"checkbox\" && _ref4 !== \"radio\") || input.checked) {\n formData.append(inputName, input.value);\n }\n }\n }\n for (i = _m = 0, _ref5 = files.length - 1; 0 <= _ref5 ? _m <= _ref5 : _m >= _ref5; i = 0 <= _ref5 ? ++_m : --_m) {\n formData.append(this._getParamName(i), files[i], files[i].name);\n }\n return this.submitRequest(xhr, formData, files);\n };\n\n Dropzone.prototype.submitRequest = function(xhr, formData, files) {\n return xhr.send(formData);\n };\n\n Dropzone.prototype._finished = function(files, responseText, e) {\n var file, _i, _len;\n for (_i = 0, _len = files.length; _i < _len; _i++) {\n file = files[_i];\n file.status = Dropzone.SUCCESS;\n this.emit(\"success\", file, responseText, e);\n this.emit(\"complete\", file);\n }\n if (this.options.uploadMultiple) {\n this.emit(\"successmultiple\", files, responseText, e);\n this.emit(\"completemultiple\", files);\n }\n if (this.options.autoProcessQueue) {\n return this.processQueue();\n }\n };\n\n Dropzone.prototype._errorProcessing = function(files, message, xhr) {\n var file, _i, _len;\n for (_i = 0, _len = files.length; _i < _len; _i++) {\n file = files[_i];\n file.status = Dropzone.ERROR;\n this.emit(\"error\", file, message, xhr);\n this.emit(\"complete\", file);\n }\n if (this.options.uploadMultiple) {\n this.emit(\"errormultiple\", files, message, xhr);\n this.emit(\"completemultiple\", files);\n }\n if (this.options.autoProcessQueue) {\n return this.processQueue();\n }\n };\n\n return Dropzone;\n\n })(Emitter);\n\n Dropzone.version = \"4.2.0\";\n\n Dropzone.options = {};\n\n Dropzone.optionsForElement = function(element) {\n if (element.getAttribute(\"id\")) {\n return Dropzone.options[camelize(element.getAttribute(\"id\"))];\n } else {\n return void 0;\n }\n };\n\n Dropzone.instances = [];\n\n Dropzone.forElement = function(element) {\n if (typeof element === \"string\") {\n element = document.querySelector(element);\n }\n if ((element != null ? element.dropzone : void 0) == null) {\n throw new Error(\"No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.\");\n }\n return element.dropzone;\n };\n\n Dropzone.autoDiscover = true;\n\n Dropzone.discover = function() {\n var checkElements, dropzone, dropzones, _i, _len, _results;\n if (document.querySelectorAll) {\n dropzones = document.querySelectorAll(\".dropzone\");\n } else {\n dropzones = [];\n checkElements = function(elements) {\n var el, _i, _len, _results;\n _results = [];\n for (_i = 0, _len = elements.length; _i < _len; _i++) {\n el = elements[_i];\n if (/(^| )dropzone($| )/.test(el.className)) {\n _results.push(dropzones.push(el));\n } else {\n _results.push(void 0);\n }\n }\n return _results;\n };\n checkElements(document.getElementsByTagName(\"div\"));\n checkElements(document.getElementsByTagName(\"form\"));\n }\n _results = [];\n for (_i = 0, _len = dropzones.length; _i < _len; _i++) {\n dropzone = dropzones[_i];\n if (Dropzone.optionsForElement(dropzone) !== false) {\n _results.push(new Dropzone(dropzone));\n } else {\n _results.push(void 0);\n }\n }\n return _results;\n };\n\n Dropzone.blacklistedBrowsers = [/opera.*Macintosh.*version\\/12/i];\n\n Dropzone.isBrowserSupported = function() {\n var capableBrowser, regex, _i, _len, _ref;\n capableBrowser = true;\n if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) {\n if (!(\"classList\" in document.createElement(\"a\"))) {\n capableBrowser = false;\n } else {\n _ref = Dropzone.blacklistedBrowsers;\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n regex = _ref[_i];\n if (regex.test(navigator.userAgent)) {\n capableBrowser = false;\n continue;\n }\n }\n }\n } else {\n capableBrowser = false;\n }\n return capableBrowser;\n };\n\n without = function(list, rejectedItem) {\n var item, _i, _len, _results;\n _results = [];\n for (_i = 0, _len = list.length; _i < _len; _i++) {\n item = list[_i];\n if (item !== rejectedItem) {\n _results.push(item);\n }\n }\n return _results;\n };\n\n camelize = function(str) {\n return str.replace(/[\\-_](\\w)/g, function(match) {\n return match.charAt(1).toUpperCase();\n });\n };\n\n Dropzone.createElement = function(string) {\n var div;\n div = document.createElement(\"div\");\n div.innerHTML = string;\n return div.childNodes[0];\n };\n\n Dropzone.elementInside = function(element, container) {\n if (element === container) {\n return true;\n }\n while (element = element.parentNode) {\n if (element === container) {\n return true;\n }\n }\n return false;\n };\n\n Dropzone.getElement = function(el, name) {\n var element;\n if (typeof el === \"string\") {\n element = document.querySelector(el);\n } else if (el.nodeType != null) {\n element = el;\n }\n if (element == null) {\n throw new Error(\"Invalid `\" + name + \"` option provided. Please provide a CSS selector or a plain HTML element.\");\n }\n return element;\n };\n\n Dropzone.getElements = function(els, name) {\n var e, el, elements, _i, _j, _len, _len1, _ref;\n if (els instanceof Array) {\n elements = [];\n try {\n for (_i = 0, _len = els.length; _i < _len; _i++) {\n el = els[_i];\n elements.push(this.getElement(el, name));\n }\n } catch (_error) {\n e = _error;\n elements = null;\n }\n } else if (typeof els === \"string\") {\n elements = [];\n _ref = document.querySelectorAll(els);\n for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {\n el = _ref[_j];\n elements.push(el);\n }\n } else if (els.nodeType != null) {\n elements = [els];\n }\n if (!((elements != null) && elements.length)) {\n throw new Error(\"Invalid `\" + name + \"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.\");\n }\n return elements;\n };\n\n Dropzone.confirm = function(question, accepted, rejected) {\n if (window.confirm(question)) {\n return accepted();\n } else if (rejected != null) {\n return rejected();\n }\n };\n\n Dropzone.isValidFile = function(file, acceptedFiles) {\n var baseMimeType, mimeType, validType, _i, _len;\n if (!acceptedFiles) {\n return true;\n }\n acceptedFiles = acceptedFiles.split(\",\");\n mimeType = file.type;\n baseMimeType = mimeType.replace(/\\/.*$/, \"\");\n for (_i = 0, _len = acceptedFiles.length; _i < _len; _i++) {\n validType = acceptedFiles[_i];\n validType = validType.trim();\n if (validType.charAt(0) === \".\") {\n if (file.name.toLowerCase().indexOf(validType.toLowerCase(), file.name.length - validType.length) !== -1) {\n return true;\n }\n } else if (/\\/\\*$/.test(validType)) {\n if (baseMimeType === validType.replace(/\\/.*$/, \"\")) {\n return true;\n }\n } else {\n if (mimeType === validType) {\n return true;\n }\n }\n }\n return false;\n };\n\n if (typeof jQuery !== \"undefined\" && jQuery !== null) {\n jQuery.fn.dropzone = function(options) {\n return this.each(function() {\n return new Dropzone(this, options);\n });\n };\n }\n\n if (typeof module !== \"undefined\" && module !== null) {\n module.exports = Dropzone;\n } else {\n window.Dropzone = Dropzone;\n }\n\n Dropzone.ADDED = \"added\";\n\n Dropzone.QUEUED = \"queued\";\n\n Dropzone.ACCEPTED = Dropzone.QUEUED;\n\n Dropzone.UPLOADING = \"uploading\";\n\n Dropzone.PROCESSING = Dropzone.UPLOADING;\n\n Dropzone.CANCELED = \"canceled\";\n\n Dropzone.ERROR = \"error\";\n\n Dropzone.SUCCESS = \"success\";\n\n\n /*\n \n Bugfix for iOS 6 and 7\n Source: http://stackoverflow.com/questions/11929099/html5-canvas-drawimage-ratio-bug-ios\n based on the work of https://github.com/stomita/ios-imagefile-megapixel\n */\n\n detectVerticalSquash = function(img) {\n var alpha, canvas, ctx, data, ey, ih, iw, py, ratio, sy;\n iw = img.naturalWidth;\n ih = img.naturalHeight;\n canvas = document.createElement(\"canvas\");\n canvas.width = 1;\n canvas.height = ih;\n ctx = canvas.getContext(\"2d\");\n ctx.drawImage(img, 0, 0);\n data = ctx.getImageData(0, 0, 1, ih).data;\n sy = 0;\n ey = ih;\n py = ih;\n while (py > sy) {\n alpha = data[(py - 1) * 4 + 3];\n if (alpha === 0) {\n ey = py;\n } else {\n sy = py;\n }\n py = (ey + sy) >> 1;\n }\n ratio = py / ih;\n if (ratio === 0) {\n return 1;\n } else {\n return ratio;\n }\n };\n\n drawImageIOSFix = function(ctx, img, sx, sy, sw, sh, dx, dy, dw, dh) {\n var vertSquashRatio;\n vertSquashRatio = detectVerticalSquash(img);\n return ctx.drawImage(img, sx, sy, sw, sh, dx, dy, dw, dh / vertSquashRatio);\n };\n\n\n /*\n * contentloaded.js\n *\n * Author: Diego Perini (diego.perini at gmail.com)\n * Summary: cross-browser wrapper for DOMContentLoaded\n * Updated: 20101020\n * License: MIT\n * Version: 1.2\n *\n * URL:\n * http://javascript.nwbox.com/ContentLoaded/\n * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE\n */\n\n contentLoaded = function(win, fn) {\n var add, doc, done, init, poll, pre, rem, root, top;\n done = false;\n top = true;\n doc = win.document;\n root = doc.documentElement;\n add = (doc.addEventListener ? \"addEventListener\" : \"attachEvent\");\n rem = (doc.addEventListener ? \"removeEventListener\" : \"detachEvent\");\n pre = (doc.addEventListener ? \"\" : \"on\");\n init = function(e) {\n if (e.type === \"readystatechange\" && doc.readyState !== \"complete\") {\n return;\n }\n (e.type === \"load\" ? win : doc)[rem](pre + e.type, init, false);\n if (!done && (done = true)) {\n return fn.call(win, e.type || e);\n }\n };\n poll = function() {\n var e;\n try {\n root.doScroll(\"left\");\n } catch (_error) {\n e = _error;\n setTimeout(poll, 50);\n return;\n }\n return init(\"poll\");\n };\n if (doc.readyState !== \"complete\") {\n if (doc.createEventObject && root.doScroll) {\n try {\n top = !win.frameElement;\n } catch (_error) {}\n if (top) {\n poll();\n }\n }\n doc[add](pre + \"DOMContentLoaded\", init, false);\n doc[add](pre + \"readystatechange\", init, false);\n return win[add](pre + \"load\", init, false);\n }\n };\n\n Dropzone._autoDiscoverFunction = function() {\n if (Dropzone.autoDiscover) {\n return Dropzone.discover();\n }\n };\n\n contentLoaded(window, Dropzone._autoDiscoverFunction);\n\n}).call(this);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/dropzone/dist/dropzone.js\n ** module id = 225\n ** module chunks = 1\n **/","module.exports = function(module) {\r\n\tif(!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tmodule.children = [];\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n}\r\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** (webpack)/buildin/module.js\n ** module id = 226\n ** module chunks = 1\n **/","/* ========================================================================\n * Bootstrap: dropdown.js v3.3.6\n * http://getbootstrap.com/javascript/#dropdowns\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // DROPDOWN CLASS DEFINITION\n // =========================\n\n var backdrop = '.dropdown-backdrop'\n var toggle = '[data-toggle=\"dropdown\"]'\n var Dropdown = function (element) {\n $(element).on('click.bs.dropdown', this.toggle)\n }\n\n Dropdown.VERSION = '3.3.6'\n\n function getParent($this) {\n var selector = $this.attr('data-target')\n\n if (!selector) {\n selector = $this.attr('href')\n selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\\s]*$)/, '') // strip for ie7\n }\n\n var $parent = selector && $(selector)\n\n return $parent && $parent.length ? $parent : $this.parent()\n }\n\n function clearMenus(e) {\n if (e && e.which === 3) return\n $(backdrop).remove()\n $(toggle).each(function () {\n var $this = $(this)\n var $parent = getParent($this)\n var relatedTarget = { relatedTarget: this }\n\n if (!$parent.hasClass('open')) return\n\n if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return\n\n $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))\n\n if (e.isDefaultPrevented()) return\n\n $this.attr('aria-expanded', 'false')\n $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))\n })\n }\n\n Dropdown.prototype.toggle = function (e) {\n var $this = $(this)\n\n if ($this.is('.disabled, :disabled')) return\n\n var $parent = getParent($this)\n var isActive = $parent.hasClass('open')\n\n clearMenus()\n\n if (!isActive) {\n if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {\n // if mobile we use a backdrop because click events don't delegate\n $(document.createElement('div'))\n .addClass('dropdown-backdrop')\n .insertAfter($(this))\n .on('click', clearMenus)\n }\n\n var relatedTarget = { relatedTarget: this }\n $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))\n\n if (e.isDefaultPrevented()) return\n\n $this\n .trigger('focus')\n .attr('aria-expanded', 'true')\n\n $parent\n .toggleClass('open')\n .trigger($.Event('shown.bs.dropdown', relatedTarget))\n }\n\n return false\n }\n\n Dropdown.prototype.keydown = function (e) {\n if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return\n\n var $this = $(this)\n\n e.preventDefault()\n e.stopPropagation()\n\n if ($this.is('.disabled, :disabled')) return\n\n var $parent = getParent($this)\n var isActive = $parent.hasClass('open')\n\n if (!isActive && e.which != 27 || isActive && e.which == 27) {\n if (e.which == 27) $parent.find(toggle).trigger('focus')\n return $this.trigger('click')\n }\n\n var desc = ' li:not(.disabled):visible a'\n var $items = $parent.find('.dropdown-menu' + desc)\n\n if (!$items.length) return\n\n var index = $items.index(e.target)\n\n if (e.which == 38 && index > 0) index-- // up\n if (e.which == 40 && index < $items.length - 1) index++ // down\n if (!~index) index = 0\n\n $items.eq(index).trigger('focus')\n }\n\n\n // DROPDOWN PLUGIN DEFINITION\n // ==========================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.dropdown')\n\n if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\n if (typeof option == 'string') data[option].call($this)\n })\n }\n\n var old = $.fn.dropdown\n\n $.fn.dropdown = Plugin\n $.fn.dropdown.Constructor = Dropdown\n\n\n // DROPDOWN NO CONFLICT\n // ====================\n\n $.fn.dropdown.noConflict = function () {\n $.fn.dropdown = old\n return this\n }\n\n\n // APPLY TO STANDARD DROPDOWN ELEMENTS\n // ===================================\n\n $(document)\n .on('click.bs.dropdown.data-api', clearMenus)\n .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })\n .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)\n .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)\n .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)\n\n}(jQuery);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/bootstrap/js/dropdown.js\n ** module id = 238\n ** module chunks = 1\n **/","/*\n * Remodal - v1.0.6\n * Responsive, lightweight, fast, synchronized with CSS animations, fully customizable modal window plugin with declarative configuration and hash tracking.\n * http://vodkabears.github.io/remodal/\n *\n * Made by Ilya Makarov\n * Under MIT License\n */\n\n!(function(root, factory) {\n if (typeof define === 'function' && define.amd) {\n define(['jquery'], function($) {\n return factory(root, $);\n });\n } else if (typeof exports === 'object') {\n factory(root, require('jquery'));\n } else {\n factory(root, root.jQuery || root.Zepto);\n }\n})(this, function(global, $) {\n\n 'use strict';\n\n /**\n * Name of the plugin\n * @private\n * @const\n * @type {String}\n */\n var PLUGIN_NAME = 'remodal';\n\n /**\n * Namespace for CSS and events\n * @private\n * @const\n * @type {String}\n */\n var NAMESPACE = global.REMODAL_GLOBALS && global.REMODAL_GLOBALS.NAMESPACE || PLUGIN_NAME;\n\n /**\n * Animationstart event with vendor prefixes\n * @private\n * @const\n * @type {String}\n */\n var ANIMATIONSTART_EVENTS = $.map(\n ['animationstart', 'webkitAnimationStart', 'MSAnimationStart', 'oAnimationStart'],\n\n function(eventName) {\n return eventName + '.' + NAMESPACE;\n }\n\n ).join(' ');\n\n /**\n * Animationend event with vendor prefixes\n * @private\n * @const\n * @type {String}\n */\n var ANIMATIONEND_EVENTS = $.map(\n ['animationend', 'webkitAnimationEnd', 'MSAnimationEnd', 'oAnimationEnd'],\n\n function(eventName) {\n return eventName + '.' + NAMESPACE;\n }\n\n ).join(' ');\n\n /**\n * Default settings\n * @private\n * @const\n * @type {Object}\n */\n var DEFAULTS = $.extend({\n hashTracking: true,\n closeOnConfirm: true,\n closeOnCancel: true,\n closeOnEscape: true,\n closeOnOutsideClick: true,\n modifier: ''\n }, global.REMODAL_GLOBALS && global.REMODAL_GLOBALS.DEFAULTS);\n\n /**\n * States of the Remodal\n * @private\n * @const\n * @enum {String}\n */\n var STATES = {\n CLOSING: 'closing',\n CLOSED: 'closed',\n OPENING: 'opening',\n OPENED: 'opened'\n };\n\n /**\n * Reasons of the state change.\n * @private\n * @const\n * @enum {String}\n */\n var STATE_CHANGE_REASONS = {\n CONFIRMATION: 'confirmation',\n CANCELLATION: 'cancellation'\n };\n\n /**\n * Is animation supported?\n * @private\n * @const\n * @type {Boolean}\n */\n var IS_ANIMATION = (function() {\n var style = document.createElement('div').style;\n\n return style.animationName !== undefined ||\n style.WebkitAnimationName !== undefined ||\n style.MozAnimationName !== undefined ||\n style.msAnimationName !== undefined ||\n style.OAnimationName !== undefined;\n })();\n\n /**\n * Is iOS?\n * @private\n * @const\n * @type {Boolean}\n */\n var IS_IOS = /iPad|iPhone|iPod/.test(navigator.platform);\n\n /**\n * Current modal\n * @private\n * @type {Remodal}\n */\n var current;\n\n /**\n * Scrollbar position\n * @private\n * @type {Number}\n */\n var scrollTop;\n\n /**\n * Returns an animation duration\n * @private\n * @param {jQuery} $elem\n * @returns {Number}\n */\n function getAnimationDuration($elem) {\n if (\n IS_ANIMATION &&\n $elem.css('animation-name') === 'none' &&\n $elem.css('-webkit-animation-name') === 'none' &&\n $elem.css('-moz-animation-name') === 'none' &&\n $elem.css('-o-animation-name') === 'none' &&\n $elem.css('-ms-animation-name') === 'none'\n ) {\n return 0;\n }\n\n var duration = $elem.css('animation-duration') ||\n $elem.css('-webkit-animation-duration') ||\n $elem.css('-moz-animation-duration') ||\n $elem.css('-o-animation-duration') ||\n $elem.css('-ms-animation-duration') ||\n '0s';\n\n var delay = $elem.css('animation-delay') ||\n $elem.css('-webkit-animation-delay') ||\n $elem.css('-moz-animation-delay') ||\n $elem.css('-o-animation-delay') ||\n $elem.css('-ms-animation-delay') ||\n '0s';\n\n var iterationCount = $elem.css('animation-iteration-count') ||\n $elem.css('-webkit-animation-iteration-count') ||\n $elem.css('-moz-animation-iteration-count') ||\n $elem.css('-o-animation-iteration-count') ||\n $elem.css('-ms-animation-iteration-count') ||\n '1';\n\n var max;\n var len;\n var num;\n var i;\n\n duration = duration.split(', ');\n delay = delay.split(', ');\n iterationCount = iterationCount.split(', ');\n\n // The 'duration' size is the same as the 'delay' size\n for (i = 0, len = duration.length, max = Number.NEGATIVE_INFINITY; i < len; i++) {\n num = parseFloat(duration[i]) * parseInt(iterationCount[i], 10) + parseFloat(delay[i]);\n\n if (num > max) {\n max = num;\n }\n }\n\n return num;\n }\n\n /**\n * Returns a scrollbar width\n * @private\n * @returns {Number}\n */\n function getScrollbarWidth() {\n if ($(document.body).height() <= $(window).height()) {\n return 0;\n }\n\n var outer = document.createElement('div');\n var inner = document.createElement('div');\n var widthNoScroll;\n var widthWithScroll;\n\n outer.style.visibility = 'hidden';\n outer.style.width = '100px';\n document.body.appendChild(outer);\n\n widthNoScroll = outer.offsetWidth;\n\n // Force scrollbars\n outer.style.overflow = 'scroll';\n\n // Add inner div\n inner.style.width = '100%';\n outer.appendChild(inner);\n\n widthWithScroll = inner.offsetWidth;\n\n // Remove divs\n outer.parentNode.removeChild(outer);\n\n return widthNoScroll - widthWithScroll;\n }\n\n /**\n * Locks the screen\n * @private\n */\n function lockScreen() {\n if (IS_IOS) {\n return;\n }\n\n var $html = $('html');\n var lockedClass = namespacify('is-locked');\n var paddingRight;\n var $body;\n\n if (!$html.hasClass(lockedClass)) {\n $body = $(document.body);\n\n // Zepto does not support '-=', '+=' in the `css` method\n paddingRight = parseInt($body.css('padding-right'), 10) + getScrollbarWidth();\n\n $body.css('padding-right', paddingRight + 'px');\n $html.addClass(lockedClass);\n }\n }\n\n /**\n * Unlocks the screen\n * @private\n */\n function unlockScreen() {\n if (IS_IOS) {\n return;\n }\n\n var $html = $('html');\n var lockedClass = namespacify('is-locked');\n var paddingRight;\n var $body;\n\n if ($html.hasClass(lockedClass)) {\n $body = $(document.body);\n\n // Zepto does not support '-=', '+=' in the `css` method\n paddingRight = parseInt($body.css('padding-right'), 10) - getScrollbarWidth();\n\n $body.css('padding-right', paddingRight + 'px');\n $html.removeClass(lockedClass);\n }\n }\n\n /**\n * Sets a state for an instance\n * @private\n * @param {Remodal} instance\n * @param {STATES} state\n * @param {Boolean} isSilent If true, Remodal does not trigger events\n * @param {String} Reason of a state change.\n */\n function setState(instance, state, isSilent, reason) {\n\n var newState = namespacify('is', state);\n var allStates = [namespacify('is', STATES.CLOSING),\n namespacify('is', STATES.OPENING),\n namespacify('is', STATES.CLOSED),\n namespacify('is', STATES.OPENED)].join(' ');\n\n instance.$bg\n .removeClass(allStates)\n .addClass(newState);\n\n instance.$overlay\n .removeClass(allStates)\n .addClass(newState);\n\n instance.$wrapper\n .removeClass(allStates)\n .addClass(newState);\n\n instance.$modal\n .removeClass(allStates)\n .addClass(newState);\n\n instance.state = state;\n !isSilent && instance.$modal.trigger({\n type: state,\n reason: reason\n }, [{ reason: reason }]);\n }\n\n /**\n * Synchronizes with the animation\n * @param {Function} doBeforeAnimation\n * @param {Function} doAfterAnimation\n * @param {Remodal} instance\n */\n function syncWithAnimation(doBeforeAnimation, doAfterAnimation, instance) {\n var runningAnimationsCount = 0;\n\n var handleAnimationStart = function(e) {\n if (e.target !== this) {\n return;\n }\n\n runningAnimationsCount++;\n };\n\n var handleAnimationEnd = function(e) {\n if (e.target !== this) {\n return;\n }\n\n if (--runningAnimationsCount === 0) {\n\n // Remove event listeners\n $.each(['$bg', '$overlay', '$wrapper', '$modal'], function(index, elemName) {\n instance[elemName].off(ANIMATIONSTART_EVENTS + ' ' + ANIMATIONEND_EVENTS);\n });\n\n doAfterAnimation();\n }\n };\n\n $.each(['$bg', '$overlay', '$wrapper', '$modal'], function(index, elemName) {\n instance[elemName]\n .on(ANIMATIONSTART_EVENTS, handleAnimationStart)\n .on(ANIMATIONEND_EVENTS, handleAnimationEnd);\n });\n\n doBeforeAnimation();\n\n // If the animation is not supported by a browser or its duration is 0\n if (\n getAnimationDuration(instance.$bg) === 0 &&\n getAnimationDuration(instance.$overlay) === 0 &&\n getAnimationDuration(instance.$wrapper) === 0 &&\n getAnimationDuration(instance.$modal) === 0\n ) {\n\n // Remove event listeners\n $.each(['$bg', '$overlay', '$wrapper', '$modal'], function(index, elemName) {\n instance[elemName].off(ANIMATIONSTART_EVENTS + ' ' + ANIMATIONEND_EVENTS);\n });\n\n doAfterAnimation();\n }\n }\n\n /**\n * Closes immediately\n * @private\n * @param {Remodal} instance\n */\n function halt(instance) {\n if (instance.state === STATES.CLOSED) {\n return;\n }\n\n $.each(['$bg', '$overlay', '$wrapper', '$modal'], function(index, elemName) {\n instance[elemName].off(ANIMATIONSTART_EVENTS + ' ' + ANIMATIONEND_EVENTS);\n });\n\n instance.$bg.removeClass(instance.settings.modifier);\n instance.$overlay.removeClass(instance.settings.modifier).hide();\n instance.$wrapper.hide();\n unlockScreen();\n setState(instance, STATES.CLOSED, true);\n }\n\n /**\n * Parses a string with options\n * @private\n * @param str\n * @returns {Object}\n */\n function parseOptions(str) {\n var obj = {};\n var arr;\n var len;\n var val;\n var i;\n\n // Remove spaces before and after delimiters\n str = str.replace(/\\s*:\\s*/g, ':').replace(/\\s*,\\s*/g, ',');\n\n // Parse a string\n arr = str.split(',');\n for (i = 0, len = arr.length; i < len; i++) {\n arr[i] = arr[i].split(':');\n val = arr[i][1];\n\n // Convert a string value if it is like a boolean\n if (typeof val === 'string' || val instanceof String) {\n val = val === 'true' || (val === 'false' ? false : val);\n }\n\n // Convert a string value if it is like a number\n if (typeof val === 'string' || val instanceof String) {\n val = !isNaN(val) ? +val : val;\n }\n\n obj[arr[i][0]] = val;\n }\n\n return obj;\n }\n\n /**\n * Generates a string separated by dashes and prefixed with NAMESPACE\n * @private\n * @param {...String}\n * @returns {String}\n */\n function namespacify() {\n var result = NAMESPACE;\n\n for (var i = 0; i < arguments.length; ++i) {\n result += '-' + arguments[i];\n }\n\n return result;\n }\n\n /**\n * Handles the hashchange event\n * @private\n * @listens hashchange\n */\n function handleHashChangeEvent() {\n var id = location.hash.replace('#', '');\n var instance;\n var $elem;\n\n if (!id) {\n\n // Check if we have currently opened modal and animation was completed\n if (current && current.state === STATES.OPENED && current.settings.hashTracking) {\n current.close();\n }\n } else {\n\n // Catch syntax error if your hash is bad\n try {\n $elem = $(\n '[data-' + PLUGIN_NAME + '-id=\"' + id + '\"]'\n );\n } catch (err) {}\n\n if ($elem && $elem.length) {\n instance = $[PLUGIN_NAME].lookup[$elem.data(PLUGIN_NAME)];\n\n if (instance && instance.settings.hashTracking) {\n instance.open();\n }\n }\n\n }\n }\n\n /**\n * Remodal constructor\n * @constructor\n * @param {jQuery} $modal\n * @param {Object} options\n */\n function Remodal($modal, options) {\n var $body = $(document.body);\n var remodal = this;\n\n remodal.settings = $.extend({}, DEFAULTS, options);\n remodal.index = $[PLUGIN_NAME].lookup.push(remodal) - 1;\n remodal.state = STATES.CLOSED;\n\n remodal.$overlay = $('.' + namespacify('overlay'));\n\n if (!remodal.$overlay.length) {\n remodal.$overlay = $('').addClass(namespacify('overlay') + ' ' + namespacify('is', STATES.CLOSED)).hide();\n $body.append(remodal.$overlay);\n }\n\n remodal.$bg = $('.' + namespacify('bg')).addClass(namespacify('is', STATES.CLOSED));\n\n remodal.$modal = $modal\n .addClass(\n NAMESPACE + ' ' +\n namespacify('is-initialized') + ' ' +\n remodal.settings.modifier + ' ' +\n namespacify('is', STATES.CLOSED))\n .attr('tabindex', '-1');\n\n remodal.$wrapper = $('
')\n .addClass(\n namespacify('wrapper') + ' ' +\n remodal.settings.modifier + ' ' +\n namespacify('is', STATES.CLOSED))\n .hide()\n .append(remodal.$modal);\n $body.append(remodal.$wrapper);\n\n // Add the event listener for the close button\n remodal.$wrapper.on('click.' + NAMESPACE, '[data-' + PLUGIN_NAME + '-action=\"close\"]', function(e) {\n e.preventDefault();\n\n remodal.close();\n });\n\n // Add the event listener for the cancel button\n remodal.$wrapper.on('click.' + NAMESPACE, '[data-' + PLUGIN_NAME + '-action=\"cancel\"]', function(e) {\n e.preventDefault();\n\n remodal.$modal.trigger(STATE_CHANGE_REASONS.CANCELLATION);\n\n if (remodal.settings.closeOnCancel) {\n remodal.close(STATE_CHANGE_REASONS.CANCELLATION);\n }\n });\n\n // Add the event listener for the confirm button\n remodal.$wrapper.on('click.' + NAMESPACE, '[data-' + PLUGIN_NAME + '-action=\"confirm\"]', function(e) {\n e.preventDefault();\n\n remodal.$modal.trigger(STATE_CHANGE_REASONS.CONFIRMATION);\n\n if (remodal.settings.closeOnConfirm) {\n remodal.close(STATE_CHANGE_REASONS.CONFIRMATION);\n }\n });\n\n // Add the event listener for the overlay\n remodal.$wrapper.on('click.' + NAMESPACE, function(e) {\n var $target = $(e.target);\n\n if (!$target.hasClass(namespacify('wrapper'))) {\n return;\n }\n\n if (remodal.settings.closeOnOutsideClick) {\n remodal.close();\n }\n });\n }\n\n /**\n * Opens a modal window\n * @public\n */\n Remodal.prototype.open = function() {\n var remodal = this;\n var id;\n\n // Check if the animation was completed\n if (remodal.state === STATES.OPENING || remodal.state === STATES.CLOSING) {\n return;\n }\n\n id = remodal.$modal.attr('data-' + PLUGIN_NAME + '-id');\n\n if (id && remodal.settings.hashTracking) {\n scrollTop = $(window).scrollTop();\n location.hash = id;\n }\n\n if (current && current !== remodal) {\n halt(current);\n }\n\n current = remodal;\n lockScreen();\n remodal.$bg.addClass(remodal.settings.modifier);\n remodal.$overlay.addClass(remodal.settings.modifier).show();\n remodal.$wrapper.show().scrollTop(0);\n remodal.$modal.focus();\n\n syncWithAnimation(\n function() {\n setState(remodal, STATES.OPENING);\n },\n\n function() {\n setState(remodal, STATES.OPENED);\n },\n\n remodal);\n };\n\n /**\n * Closes a modal window\n * @public\n * @param {String} reason\n */\n Remodal.prototype.close = function(reason) {\n var remodal = this;\n\n // Check if the animation was completed\n if (remodal.state === STATES.OPENING || remodal.state === STATES.CLOSING) {\n return;\n }\n\n if (\n remodal.settings.hashTracking &&\n remodal.$modal.attr('data-' + PLUGIN_NAME + '-id') === location.hash.substr(1)\n ) {\n location.hash = '';\n $(window).scrollTop(scrollTop);\n }\n\n syncWithAnimation(\n function() {\n setState(remodal, STATES.CLOSING, false, reason);\n },\n\n function() {\n remodal.$bg.removeClass(remodal.settings.modifier);\n remodal.$overlay.removeClass(remodal.settings.modifier).hide();\n remodal.$wrapper.hide();\n unlockScreen();\n\n setState(remodal, STATES.CLOSED, false, reason);\n },\n\n remodal);\n };\n\n /**\n * Returns a current state of a modal\n * @public\n * @returns {STATES}\n */\n Remodal.prototype.getState = function() {\n return this.state;\n };\n\n /**\n * Destroys a modal\n * @public\n */\n Remodal.prototype.destroy = function() {\n var lookup = $[PLUGIN_NAME].lookup;\n var instanceCount;\n\n halt(this);\n this.$wrapper.remove();\n\n delete lookup[this.index];\n instanceCount = $.grep(lookup, function(instance) {\n return !!instance;\n }).length;\n\n if (instanceCount === 0) {\n this.$overlay.remove();\n this.$bg.removeClass(\n namespacify('is', STATES.CLOSING) + ' ' +\n namespacify('is', STATES.OPENING) + ' ' +\n namespacify('is', STATES.CLOSED) + ' ' +\n namespacify('is', STATES.OPENED));\n }\n };\n\n /**\n * Special plugin object for instances\n * @public\n * @type {Object}\n */\n $[PLUGIN_NAME] = {\n lookup: []\n };\n\n /**\n * Plugin constructor\n * @constructor\n * @param {Object} options\n * @returns {JQuery}\n */\n $.fn[PLUGIN_NAME] = function(opts) {\n var instance;\n var $elem;\n\n this.each(function(index, elem) {\n $elem = $(elem);\n\n if ($elem.data(PLUGIN_NAME) == null) {\n instance = new Remodal($elem, opts);\n $elem.data(PLUGIN_NAME, instance.index);\n\n if (\n instance.settings.hashTracking &&\n $elem.attr('data-' + PLUGIN_NAME + '-id') === location.hash.substr(1)\n ) {\n instance.open();\n }\n } else {\n instance = $[PLUGIN_NAME].lookup[$elem.data(PLUGIN_NAME)];\n }\n });\n\n return instance;\n };\n\n $(document).ready(function() {\n\n // data-remodal-target opens a modal window with the special Id\n $(document).on('click', '[data-' + PLUGIN_NAME + '-target]', function(e) {\n e.preventDefault();\n\n var elem = e.currentTarget;\n var id = elem.getAttribute('data-' + PLUGIN_NAME + '-target');\n var $target = $('[data-' + PLUGIN_NAME + '-id=\"' + id + '\"]');\n\n $[PLUGIN_NAME].lookup[$target.data(PLUGIN_NAME)].open();\n });\n\n // Auto initialization of modal windows\n // They should have the 'remodal' class attribute\n // Also you can write the `data-remodal-options` attribute to pass params into the modal\n $(document).find('.' + NAMESPACE).each(function(i, container) {\n var $container = $(container);\n var options = $container.data(PLUGIN_NAME + '-options');\n\n if (!options) {\n options = {};\n } else if (typeof options === 'string' || options instanceof String) {\n options = parseOptions(options);\n }\n\n $container[PLUGIN_NAME](options);\n });\n\n // Handles the keydown event\n $(document).on('keydown.' + NAMESPACE, function(e) {\n if (current && current.settings.closeOnEscape && current.state === STATES.OPENED && e.keyCode === 27) {\n current.close();\n }\n });\n\n // Handles the hashchange event\n $(window).on('hashchange.' + NAMESPACE, handleHashChangeEvent);\n });\n});\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/remodal/dist/remodal.js\n ** module id = 239\n ** module chunks = 1\n **/","// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.\nrequire('../../js/transition.js')\nrequire('../../js/alert.js')\nrequire('../../js/button.js')\nrequire('../../js/carousel.js')\nrequire('../../js/collapse.js')\nrequire('../../js/dropdown.js')\nrequire('../../js/modal.js')\nrequire('../../js/tooltip.js')\nrequire('../../js/popover.js')\nrequire('../../js/scrollspy.js')\nrequire('../../js/tab.js')\nrequire('../../js/affix.js')\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/bootstrap/dist/js/npm.js\n ** module id = 240\n ** module chunks = 1\n **/","/* ========================================================================\n * Bootstrap: transition.js v3.3.6\n * http://getbootstrap.com/javascript/#transitions\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)\n // ============================================================\n\n function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n WebkitTransition : 'webkitTransitionEnd',\n MozTransition : 'transitionend',\n OTransition : 'oTransitionEnd otransitionend',\n transition : 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return { end: transEndEventNames[name] }\n }\n }\n\n return false // explicit for ie8 ( ._.)\n }\n\n // http://blog.alexmaccaw.com/css-transitions\n $.fn.emulateTransitionEnd = function (duration) {\n var called = false\n var $el = this\n $(this).one('bsTransitionEnd', function () { called = true })\n var callback = function () { if (!called) $($el).trigger($.support.transition.end) }\n setTimeout(callback, duration)\n return this\n }\n\n $(function () {\n $.support.transition = transitionEnd()\n\n if (!$.support.transition) return\n\n $.event.special.bsTransitionEnd = {\n bindType: $.support.transition.end,\n delegateType: $.support.transition.end,\n handle: function (e) {\n if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)\n }\n }\n })\n\n}(jQuery);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/bootstrap/js/transition.js\n ** module id = 241\n ** module chunks = 1\n **/","/* ========================================================================\n * Bootstrap: alert.js v3.3.6\n * http://getbootstrap.com/javascript/#alerts\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // ALERT CLASS DEFINITION\n // ======================\n\n var dismiss = '[data-dismiss=\"alert\"]'\n var Alert = function (el) {\n $(el).on('click', dismiss, this.close)\n }\n\n Alert.VERSION = '3.3.6'\n\n Alert.TRANSITION_DURATION = 150\n\n Alert.prototype.close = function (e) {\n var $this = $(this)\n var selector = $this.attr('data-target')\n\n if (!selector) {\n selector = $this.attr('href')\n selector = selector && selector.replace(/.*(?=#[^\\s]*$)/, '') // strip for ie7\n }\n\n var $parent = $(selector)\n\n if (e) e.preventDefault()\n\n if (!$parent.length) {\n $parent = $this.closest('.alert')\n }\n\n $parent.trigger(e = $.Event('close.bs.alert'))\n\n if (e.isDefaultPrevented()) return\n\n $parent.removeClass('in')\n\n function removeElement() {\n // detach from parent, fire event then clean up data\n $parent.detach().trigger('closed.bs.alert').remove()\n }\n\n $.support.transition && $parent.hasClass('fade') ?\n $parent\n .one('bsTransitionEnd', removeElement)\n .emulateTransitionEnd(Alert.TRANSITION_DURATION) :\n removeElement()\n }\n\n\n // ALERT PLUGIN DEFINITION\n // =======================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.alert')\n\n if (!data) $this.data('bs.alert', (data = new Alert(this)))\n if (typeof option == 'string') data[option].call($this)\n })\n }\n\n var old = $.fn.alert\n\n $.fn.alert = Plugin\n $.fn.alert.Constructor = Alert\n\n\n // ALERT NO CONFLICT\n // =================\n\n $.fn.alert.noConflict = function () {\n $.fn.alert = old\n return this\n }\n\n\n // ALERT DATA-API\n // ==============\n\n $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)\n\n}(jQuery);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/bootstrap/js/alert.js\n ** module id = 242\n ** module chunks = 1\n **/","/* ========================================================================\n * Bootstrap: button.js v3.3.6\n * http://getbootstrap.com/javascript/#buttons\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // BUTTON PUBLIC CLASS DEFINITION\n // ==============================\n\n var Button = function (element, options) {\n this.$element = $(element)\n this.options = $.extend({}, Button.DEFAULTS, options)\n this.isLoading = false\n }\n\n Button.VERSION = '3.3.6'\n\n Button.DEFAULTS = {\n loadingText: 'loading...'\n }\n\n Button.prototype.setState = function (state) {\n var d = 'disabled'\n var $el = this.$element\n var val = $el.is('input') ? 'val' : 'html'\n var data = $el.data()\n\n state += 'Text'\n\n if (data.resetText == null) $el.data('resetText', $el[val]())\n\n // push to event loop to allow forms to submit\n setTimeout($.proxy(function () {\n $el[val](data[state] == null ? this.options[state] : data[state])\n\n if (state == 'loadingText') {\n this.isLoading = true\n $el.addClass(d).attr(d, d)\n } else if (this.isLoading) {\n this.isLoading = false\n $el.removeClass(d).removeAttr(d)\n }\n }, this), 0)\n }\n\n Button.prototype.toggle = function () {\n var changed = true\n var $parent = this.$element.closest('[data-toggle=\"buttons\"]')\n\n if ($parent.length) {\n var $input = this.$element.find('input')\n if ($input.prop('type') == 'radio') {\n if ($input.prop('checked')) changed = false\n $parent.find('.active').removeClass('active')\n this.$element.addClass('active')\n } else if ($input.prop('type') == 'checkbox') {\n if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false\n this.$element.toggleClass('active')\n }\n $input.prop('checked', this.$element.hasClass('active'))\n if (changed) $input.trigger('change')\n } else {\n this.$element.attr('aria-pressed', !this.$element.hasClass('active'))\n this.$element.toggleClass('active')\n }\n }\n\n\n // BUTTON PLUGIN DEFINITION\n // ========================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.button')\n var options = typeof option == 'object' && option\n\n if (!data) $this.data('bs.button', (data = new Button(this, options)))\n\n if (option == 'toggle') data.toggle()\n else if (option) data.setState(option)\n })\n }\n\n var old = $.fn.button\n\n $.fn.button = Plugin\n $.fn.button.Constructor = Button\n\n\n // BUTTON NO CONFLICT\n // ==================\n\n $.fn.button.noConflict = function () {\n $.fn.button = old\n return this\n }\n\n\n // BUTTON DATA-API\n // ===============\n\n $(document)\n .on('click.bs.button.data-api', '[data-toggle^=\"button\"]', function (e) {\n var $btn = $(e.target)\n if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')\n Plugin.call($btn, 'toggle')\n if (!($(e.target).is('input[type=\"radio\"]') || $(e.target).is('input[type=\"checkbox\"]'))) e.preventDefault()\n })\n .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^=\"button\"]', function (e) {\n $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))\n })\n\n}(jQuery);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/bootstrap/js/button.js\n ** module id = 243\n ** module chunks = 1\n **/","/* ========================================================================\n * Bootstrap: carousel.js v3.3.6\n * http://getbootstrap.com/javascript/#carousel\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // CAROUSEL CLASS DEFINITION\n // =========================\n\n var Carousel = function (element, options) {\n this.$element = $(element)\n this.$indicators = this.$element.find('.carousel-indicators')\n this.options = options\n this.paused = null\n this.sliding = null\n this.interval = null\n this.$active = null\n this.$items = null\n\n this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))\n\n this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element\n .on('mouseenter.bs.carousel', $.proxy(this.pause, this))\n .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))\n }\n\n Carousel.VERSION = '3.3.6'\n\n Carousel.TRANSITION_DURATION = 600\n\n Carousel.DEFAULTS = {\n interval: 5000,\n pause: 'hover',\n wrap: true,\n keyboard: true\n }\n\n Carousel.prototype.keydown = function (e) {\n if (/input|textarea/i.test(e.target.tagName)) return\n switch (e.which) {\n case 37: this.prev(); break\n case 39: this.next(); break\n default: return\n }\n\n e.preventDefault()\n }\n\n Carousel.prototype.cycle = function (e) {\n e || (this.paused = false)\n\n this.interval && clearInterval(this.interval)\n\n this.options.interval\n && !this.paused\n && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))\n\n return this\n }\n\n Carousel.prototype.getItemIndex = function (item) {\n this.$items = item.parent().children('.item')\n return this.$items.index(item || this.$active)\n }\n\n Carousel.prototype.getItemForDirection = function (direction, active) {\n var activeIndex = this.getItemIndex(active)\n var willWrap = (direction == 'prev' && activeIndex === 0)\n || (direction == 'next' && activeIndex == (this.$items.length - 1))\n if (willWrap && !this.options.wrap) return active\n var delta = direction == 'prev' ? -1 : 1\n var itemIndex = (activeIndex + delta) % this.$items.length\n return this.$items.eq(itemIndex)\n }\n\n Carousel.prototype.to = function (pos) {\n var that = this\n var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))\n\n if (pos > (this.$items.length - 1) || pos < 0) return\n\n if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, \"slid\"\n if (activeIndex == pos) return this.pause().cycle()\n\n return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))\n }\n\n Carousel.prototype.pause = function (e) {\n e || (this.paused = true)\n\n if (this.$element.find('.next, .prev').length && $.support.transition) {\n this.$element.trigger($.support.transition.end)\n this.cycle(true)\n }\n\n this.interval = clearInterval(this.interval)\n\n return this\n }\n\n Carousel.prototype.next = function () {\n if (this.sliding) return\n return this.slide('next')\n }\n\n Carousel.prototype.prev = function () {\n if (this.sliding) return\n return this.slide('prev')\n }\n\n Carousel.prototype.slide = function (type, next) {\n var $active = this.$element.find('.item.active')\n var $next = next || this.getItemForDirection(type, $active)\n var isCycling = this.interval\n var direction = type == 'next' ? 'left' : 'right'\n var that = this\n\n if ($next.hasClass('active')) return (this.sliding = false)\n\n var relatedTarget = $next[0]\n var slideEvent = $.Event('slide.bs.carousel', {\n relatedTarget: relatedTarget,\n direction: direction\n })\n this.$element.trigger(slideEvent)\n if (slideEvent.isDefaultPrevented()) return\n\n this.sliding = true\n\n isCycling && this.pause()\n\n if (this.$indicators.length) {\n this.$indicators.find('.active').removeClass('active')\n var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])\n $nextIndicator && $nextIndicator.addClass('active')\n }\n\n var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, \"slid\"\n if ($.support.transition && this.$element.hasClass('slide')) {\n $next.addClass(type)\n $next[0].offsetWidth // force reflow\n $active.addClass(direction)\n $next.addClass(direction)\n $active\n .one('bsTransitionEnd', function () {\n $next.removeClass([type, direction].join(' ')).addClass('active')\n $active.removeClass(['active', direction].join(' '))\n that.sliding = false\n setTimeout(function () {\n that.$element.trigger(slidEvent)\n }, 0)\n })\n .emulateTransitionEnd(Carousel.TRANSITION_DURATION)\n } else {\n $active.removeClass('active')\n $next.addClass('active')\n this.sliding = false\n this.$element.trigger(slidEvent)\n }\n\n isCycling && this.cycle()\n\n return this\n }\n\n\n // CAROUSEL PLUGIN DEFINITION\n // ==========================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.carousel')\n var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)\n var action = typeof option == 'string' ? option : options.slide\n\n if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))\n if (typeof option == 'number') data.to(option)\n else if (action) data[action]()\n else if (options.interval) data.pause().cycle()\n })\n }\n\n var old = $.fn.carousel\n\n $.fn.carousel = Plugin\n $.fn.carousel.Constructor = Carousel\n\n\n // CAROUSEL NO CONFLICT\n // ====================\n\n $.fn.carousel.noConflict = function () {\n $.fn.carousel = old\n return this\n }\n\n\n // CAROUSEL DATA-API\n // =================\n\n var clickHandler = function (e) {\n var href\n var $this = $(this)\n var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\\s]+$)/, '')) // strip for ie7\n if (!$target.hasClass('carousel')) return\n var options = $.extend({}, $target.data(), $this.data())\n var slideIndex = $this.attr('data-slide-to')\n if (slideIndex) options.interval = false\n\n Plugin.call($target, options)\n\n if (slideIndex) {\n $target.data('bs.carousel').to(slideIndex)\n }\n\n e.preventDefault()\n }\n\n $(document)\n .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)\n .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)\n\n $(window).on('load', function () {\n $('[data-ride=\"carousel\"]').each(function () {\n var $carousel = $(this)\n Plugin.call($carousel, $carousel.data())\n })\n })\n\n}(jQuery);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/bootstrap/js/carousel.js\n ** module id = 244\n ** module chunks = 1\n **/","/* ========================================================================\n * Bootstrap: collapse.js v3.3.6\n * http://getbootstrap.com/javascript/#collapse\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // COLLAPSE PUBLIC CLASS DEFINITION\n // ================================\n\n var Collapse = function (element, options) {\n this.$element = $(element)\n this.options = $.extend({}, Collapse.DEFAULTS, options)\n this.$trigger = $('[data-toggle=\"collapse\"][href=\"#' + element.id + '\"],' +\n '[data-toggle=\"collapse\"][data-target=\"#' + element.id + '\"]')\n this.transitioning = null\n\n if (this.options.parent) {\n this.$parent = this.getParent()\n } else {\n this.addAriaAndCollapsedClass(this.$element, this.$trigger)\n }\n\n if (this.options.toggle) this.toggle()\n }\n\n Collapse.VERSION = '3.3.6'\n\n Collapse.TRANSITION_DURATION = 350\n\n Collapse.DEFAULTS = {\n toggle: true\n }\n\n Collapse.prototype.dimension = function () {\n var hasWidth = this.$element.hasClass('width')\n return hasWidth ? 'width' : 'height'\n }\n\n Collapse.prototype.show = function () {\n if (this.transitioning || this.$element.hasClass('in')) return\n\n var activesData\n var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')\n\n if (actives && actives.length) {\n activesData = actives.data('bs.collapse')\n if (activesData && activesData.transitioning) return\n }\n\n var startEvent = $.Event('show.bs.collapse')\n this.$element.trigger(startEvent)\n if (startEvent.isDefaultPrevented()) return\n\n if (actives && actives.length) {\n Plugin.call(actives, 'hide')\n activesData || actives.data('bs.collapse', null)\n }\n\n var dimension = this.dimension()\n\n this.$element\n .removeClass('collapse')\n .addClass('collapsing')[dimension](0)\n .attr('aria-expanded', true)\n\n this.$trigger\n .removeClass('collapsed')\n .attr('aria-expanded', true)\n\n this.transitioning = 1\n\n var complete = function () {\n this.$element\n .removeClass('collapsing')\n .addClass('collapse in')[dimension]('')\n this.transitioning = 0\n this.$element\n .trigger('shown.bs.collapse')\n }\n\n if (!$.support.transition) return complete.call(this)\n\n var scrollSize = $.camelCase(['scroll', dimension].join('-'))\n\n this.$element\n .one('bsTransitionEnd', $.proxy(complete, this))\n .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])\n }\n\n Collapse.prototype.hide = function () {\n if (this.transitioning || !this.$element.hasClass('in')) return\n\n var startEvent = $.Event('hide.bs.collapse')\n this.$element.trigger(startEvent)\n if (startEvent.isDefaultPrevented()) return\n\n var dimension = this.dimension()\n\n this.$element[dimension](this.$element[dimension]())[0].offsetHeight\n\n this.$element\n .addClass('collapsing')\n .removeClass('collapse in')\n .attr('aria-expanded', false)\n\n this.$trigger\n .addClass('collapsed')\n .attr('aria-expanded', false)\n\n this.transitioning = 1\n\n var complete = function () {\n this.transitioning = 0\n this.$element\n .removeClass('collapsing')\n .addClass('collapse')\n .trigger('hidden.bs.collapse')\n }\n\n if (!$.support.transition) return complete.call(this)\n\n this.$element\n [dimension](0)\n .one('bsTransitionEnd', $.proxy(complete, this))\n .emulateTransitionEnd(Collapse.TRANSITION_DURATION)\n }\n\n Collapse.prototype.toggle = function () {\n this[this.$element.hasClass('in') ? 'hide' : 'show']()\n }\n\n Collapse.prototype.getParent = function () {\n return $(this.options.parent)\n .find('[data-toggle=\"collapse\"][data-parent=\"' + this.options.parent + '\"]')\n .each($.proxy(function (i, element) {\n var $element = $(element)\n this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)\n }, this))\n .end()\n }\n\n Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {\n var isOpen = $element.hasClass('in')\n\n $element.attr('aria-expanded', isOpen)\n $trigger\n .toggleClass('collapsed', !isOpen)\n .attr('aria-expanded', isOpen)\n }\n\n function getTargetFromTrigger($trigger) {\n var href\n var target = $trigger.attr('data-target')\n || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\\s]+$)/, '') // strip for ie7\n\n return $(target)\n }\n\n\n // COLLAPSE PLUGIN DEFINITION\n // ==========================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }\n\n var old = $.fn.collapse\n\n $.fn.collapse = Plugin\n $.fn.collapse.Constructor = Collapse\n\n\n // COLLAPSE NO CONFLICT\n // ====================\n\n $.fn.collapse.noConflict = function () {\n $.fn.collapse = old\n return this\n }\n\n\n // COLLAPSE DATA-API\n // =================\n\n $(document).on('click.bs.collapse.data-api', '[data-toggle=\"collapse\"]', function (e) {\n var $this = $(this)\n\n if (!$this.attr('data-target')) e.preventDefault()\n\n var $target = getTargetFromTrigger($this)\n var data = $target.data('bs.collapse')\n var option = data ? 'toggle' : $this.data()\n\n Plugin.call($target, option)\n })\n\n}(jQuery);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/bootstrap/js/collapse.js\n ** module id = 245\n ** module chunks = 1\n **/","/* ========================================================================\n * Bootstrap: modal.js v3.3.6\n * http://getbootstrap.com/javascript/#modals\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // MODAL CLASS DEFINITION\n // ======================\n\n var Modal = function (element, options) {\n this.options = options\n this.$body = $(document.body)\n this.$element = $(element)\n this.$dialog = this.$element.find('.modal-dialog')\n this.$backdrop = null\n this.isShown = null\n this.originalBodyPad = null\n this.scrollbarWidth = 0\n this.ignoreBackdropClick = false\n\n if (this.options.remote) {\n this.$element\n .find('.modal-content')\n .load(this.options.remote, $.proxy(function () {\n this.$element.trigger('loaded.bs.modal')\n }, this))\n }\n }\n\n Modal.VERSION = '3.3.6'\n\n Modal.TRANSITION_DURATION = 300\n Modal.BACKDROP_TRANSITION_DURATION = 150\n\n Modal.DEFAULTS = {\n backdrop: true,\n keyboard: true,\n show: true\n }\n\n Modal.prototype.toggle = function (_relatedTarget) {\n return this.isShown ? this.hide() : this.show(_relatedTarget)\n }\n\n Modal.prototype.show = function (_relatedTarget) {\n var that = this\n var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })\n\n this.$element.trigger(e)\n\n if (this.isShown || e.isDefaultPrevented()) return\n\n this.isShown = true\n\n this.checkScrollbar()\n this.setScrollbar()\n this.$body.addClass('modal-open')\n\n this.escape()\n this.resize()\n\n this.$element.on('click.dismiss.bs.modal', '[data-dismiss=\"modal\"]', $.proxy(this.hide, this))\n\n this.$dialog.on('mousedown.dismiss.bs.modal', function () {\n that.$element.one('mouseup.dismiss.bs.modal', function (e) {\n if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true\n })\n })\n\n this.backdrop(function () {\n var transition = $.support.transition && that.$element.hasClass('fade')\n\n if (!that.$element.parent().length) {\n that.$element.appendTo(that.$body) // don't move modals dom position\n }\n\n that.$element\n .show()\n .scrollTop(0)\n\n that.adjustDialog()\n\n if (transition) {\n that.$element[0].offsetWidth // force reflow\n }\n\n that.$element.addClass('in')\n\n that.enforceFocus()\n\n var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })\n\n transition ?\n that.$dialog // wait for modal to slide in\n .one('bsTransitionEnd', function () {\n that.$element.trigger('focus').trigger(e)\n })\n .emulateTransitionEnd(Modal.TRANSITION_DURATION) :\n that.$element.trigger('focus').trigger(e)\n })\n }\n\n Modal.prototype.hide = function (e) {\n if (e) e.preventDefault()\n\n e = $.Event('hide.bs.modal')\n\n this.$element.trigger(e)\n\n if (!this.isShown || e.isDefaultPrevented()) return\n\n this.isShown = false\n\n this.escape()\n this.resize()\n\n $(document).off('focusin.bs.modal')\n\n this.$element\n .removeClass('in')\n .off('click.dismiss.bs.modal')\n .off('mouseup.dismiss.bs.modal')\n\n this.$dialog.off('mousedown.dismiss.bs.modal')\n\n $.support.transition && this.$element.hasClass('fade') ?\n this.$element\n .one('bsTransitionEnd', $.proxy(this.hideModal, this))\n .emulateTransitionEnd(Modal.TRANSITION_DURATION) :\n this.hideModal()\n }\n\n Modal.prototype.enforceFocus = function () {\n $(document)\n .off('focusin.bs.modal') // guard against infinite focus loop\n .on('focusin.bs.modal', $.proxy(function (e) {\n if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {\n this.$element.trigger('focus')\n }\n }, this))\n }\n\n Modal.prototype.escape = function () {\n if (this.isShown && this.options.keyboard) {\n this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {\n e.which == 27 && this.hide()\n }, this))\n } else if (!this.isShown) {\n this.$element.off('keydown.dismiss.bs.modal')\n }\n }\n\n Modal.prototype.resize = function () {\n if (this.isShown) {\n $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))\n } else {\n $(window).off('resize.bs.modal')\n }\n }\n\n Modal.prototype.hideModal = function () {\n var that = this\n this.$element.hide()\n this.backdrop(function () {\n that.$body.removeClass('modal-open')\n that.resetAdjustments()\n that.resetScrollbar()\n that.$element.trigger('hidden.bs.modal')\n })\n }\n\n Modal.prototype.removeBackdrop = function () {\n this.$backdrop && this.$backdrop.remove()\n this.$backdrop = null\n }\n\n Modal.prototype.backdrop = function (callback) {\n var that = this\n var animate = this.$element.hasClass('fade') ? 'fade' : ''\n\n if (this.isShown && this.options.backdrop) {\n var doAnimate = $.support.transition && animate\n\n this.$backdrop = $(document.createElement('div'))\n .addClass('modal-backdrop ' + animate)\n .appendTo(this.$body)\n\n this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {\n if (this.ignoreBackdropClick) {\n this.ignoreBackdropClick = false\n return\n }\n if (e.target !== e.currentTarget) return\n this.options.backdrop == 'static'\n ? this.$element[0].focus()\n : this.hide()\n }, this))\n\n if (doAnimate) this.$backdrop[0].offsetWidth // force reflow\n\n this.$backdrop.addClass('in')\n\n if (!callback) return\n\n doAnimate ?\n this.$backdrop\n .one('bsTransitionEnd', callback)\n .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :\n callback()\n\n } else if (!this.isShown && this.$backdrop) {\n this.$backdrop.removeClass('in')\n\n var callbackRemove = function () {\n that.removeBackdrop()\n callback && callback()\n }\n $.support.transition && this.$element.hasClass('fade') ?\n this.$backdrop\n .one('bsTransitionEnd', callbackRemove)\n .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :\n callbackRemove()\n\n } else if (callback) {\n callback()\n }\n }\n\n // these following methods are used to handle overflowing modals\n\n Modal.prototype.handleUpdate = function () {\n this.adjustDialog()\n }\n\n Modal.prototype.adjustDialog = function () {\n var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight\n\n this.$element.css({\n paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',\n paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''\n })\n }\n\n Modal.prototype.resetAdjustments = function () {\n this.$element.css({\n paddingLeft: '',\n paddingRight: ''\n })\n }\n\n Modal.prototype.checkScrollbar = function () {\n var fullWindowWidth = window.innerWidth\n if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8\n var documentElementRect = document.documentElement.getBoundingClientRect()\n fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)\n }\n this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth\n this.scrollbarWidth = this.measureScrollbar()\n }\n\n Modal.prototype.setScrollbar = function () {\n var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)\n this.originalBodyPad = document.body.style.paddingRight || ''\n if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)\n }\n\n Modal.prototype.resetScrollbar = function () {\n this.$body.css('padding-right', this.originalBodyPad)\n }\n\n Modal.prototype.measureScrollbar = function () { // thx walsh\n var scrollDiv = document.createElement('div')\n scrollDiv.className = 'modal-scrollbar-measure'\n this.$body.append(scrollDiv)\n var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth\n this.$body[0].removeChild(scrollDiv)\n return scrollbarWidth\n }\n\n\n // MODAL PLUGIN DEFINITION\n // =======================\n\n function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }\n\n var old = $.fn.modal\n\n $.fn.modal = Plugin\n $.fn.modal.Constructor = Modal\n\n\n // MODAL NO CONFLICT\n // =================\n\n $.fn.modal.noConflict = function () {\n $.fn.modal = old\n return this\n }\n\n\n // MODAL DATA-API\n // ==============\n\n $(document).on('click.bs.modal.data-api', '[data-toggle=\"modal\"]', function (e) {\n var $this = $(this)\n var href = $this.attr('href')\n var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\\s]+$)/, ''))) // strip for ie7\n var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())\n\n if ($this.is('a')) e.preventDefault()\n\n $target.one('show.bs.modal', function (showEvent) {\n if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown\n $target.one('hidden.bs.modal', function () {\n $this.is(':visible') && $this.trigger('focus')\n })\n })\n Plugin.call($target, option, this)\n })\n\n}(jQuery);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/bootstrap/js/modal.js\n ** module id = 246\n ** module chunks = 1\n **/","/* ========================================================================\n * Bootstrap: tooltip.js v3.3.6\n * http://getbootstrap.com/javascript/#tooltip\n * Inspired by the original jQuery.tipsy by Jason Frame\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // TOOLTIP PUBLIC CLASS DEFINITION\n // ===============================\n\n var Tooltip = function (element, options) {\n this.type = null\n this.options = null\n this.enabled = null\n this.timeout = null\n this.hoverState = null\n this.$element = null\n this.inState = null\n\n this.init('tooltip', element, options)\n }\n\n Tooltip.VERSION = '3.3.6'\n\n Tooltip.TRANSITION_DURATION = 150\n\n Tooltip.DEFAULTS = {\n animation: true,\n placement: 'top',\n selector: false,\n template: '
',\n trigger: 'hover focus',\n title: '',\n delay: 0,\n html: false,\n container: false,\n viewport: {\n selector: 'body',\n padding: 0\n }\n }\n\n Tooltip.prototype.init = function (type, element, options) {\n this.enabled = true\n this.type = type\n this.$element = $(element)\n this.options = this.getOptions(options)\n this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))\n this.inState = { click: false, hover: false, focus: false }\n\n if (this.$element[0] instanceof document.constructor && !this.options.selector) {\n throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')\n }\n\n var triggers = this.options.trigger.split(' ')\n\n for (var i = triggers.length; i--;) {\n var trigger = triggers[i]\n\n if (trigger == 'click') {\n this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))\n } else if (trigger != 'manual') {\n var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'\n var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'\n\n this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))\n this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))\n }\n }\n\n this.options.selector ?\n (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :\n this.fixTitle()\n }\n\n Tooltip.prototype.getDefaults = function () {\n return Tooltip.DEFAULTS\n }\n\n Tooltip.prototype.getOptions = function (options) {\n options = $.extend({}, this.getDefaults(), this.$element.data(), options)\n\n if (options.delay && typeof options.delay == 'number') {\n options.delay = {\n show: options.delay,\n hide: options.delay\n }\n }\n\n return options\n }\n\n Tooltip.prototype.getDelegateOptions = function () {\n var options = {}\n var defaults = this.getDefaults()\n\n this._options && $.each(this._options, function (key, value) {\n if (defaults[key] != value) options[key] = value\n })\n\n return options\n }\n\n Tooltip.prototype.enter = function (obj) {\n var self = obj instanceof this.constructor ?\n obj : $(obj.currentTarget).data('bs.' + this.type)\n\n if (!self) {\n self = new this.constructor(obj.currentTarget, this.getDelegateOptions())\n $(obj.currentTarget).data('bs.' + this.type, self)\n }\n\n if (obj instanceof $.Event) {\n self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true\n }\n\n if (self.tip().hasClass('in') || self.hoverState == 'in') {\n self.hoverState = 'in'\n return\n }\n\n clearTimeout(self.timeout)\n\n self.hoverState = 'in'\n\n if (!self.options.delay || !self.options.delay.show) return self.show()\n\n self.timeout = setTimeout(function () {\n if (self.hoverState == 'in') self.show()\n }, self.options.delay.show)\n }\n\n Tooltip.prototype.isInStateTrue = function () {\n for (var key in this.inState) {\n if (this.inState[key]) return true\n }\n\n return false\n }\n\n Tooltip.prototype.leave = function (obj) {\n var self = obj instanceof this.constructor ?\n obj : $(obj.currentTarget).data('bs.' + this.type)\n\n if (!self) {\n self = new this.constructor(obj.currentTarget, this.getDelegateOptions())\n $(obj.currentTarget).data('bs.' + this.type, self)\n }\n\n if (obj instanceof $.Event) {\n self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false\n }\n\n if (self.isInStateTrue()) return\n\n clearTimeout(self.timeout)\n\n self.hoverState = 'out'\n\n if (!self.options.delay || !self.options.delay.hide) return self.hide()\n\n self.timeout = setTimeout(function () {\n if (self.hoverState == 'out') self.hide()\n }, self.options.delay.hide)\n }\n\n Tooltip.prototype.show = function () {\n var e = $.Event('show.bs.' + this.type)\n\n if (this.hasContent() && this.enabled) {\n this.$element.trigger(e)\n\n var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])\n if (e.isDefaultPrevented() || !inDom) return\n var that = this\n\n var $tip = this.tip()\n\n var tipId = this.getUID(this.type)\n\n this.setContent()\n $tip.attr('id', tipId)\n this.$element.attr('aria-describedby', tipId)\n\n if (this.options.animation) $tip.addClass('fade')\n\n var placement = typeof this.options.placement == 'function' ?\n this.options.placement.call(this, $tip[0], this.$element[0]) :\n this.options.placement\n\n var autoToken = /\\s?auto?\\s?/i\n var autoPlace = autoToken.test(placement)\n if (autoPlace) placement = placement.replace(autoToken, '') || 'top'\n\n $tip\n .detach()\n .css({ top: 0, left: 0, display: 'block' })\n .addClass(placement)\n .data('bs.' + this.type, this)\n\n this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)\n this.$element.trigger('inserted.bs.' + this.type)\n\n var pos = this.getPosition()\n var actualWidth = $tip[0].offsetWidth\n var actualHeight = $tip[0].offsetHeight\n\n if (autoPlace) {\n var orgPlacement = placement\n var viewportDim = this.getPosition(this.$viewport)\n\n placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' :\n placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' :\n placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' :\n placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' :\n placement\n\n $tip\n .removeClass(orgPlacement)\n .addClass(placement)\n }\n\n var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)\n\n this.applyPlacement(calculatedOffset, placement)\n\n var complete = function () {\n var prevHoverState = that.hoverState\n that.$element.trigger('shown.bs.' + that.type)\n that.hoverState = null\n\n if (prevHoverState == 'out') that.leave(that)\n }\n\n $.support.transition && this.$tip.hasClass('fade') ?\n $tip\n .one('bsTransitionEnd', complete)\n .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :\n complete()\n }\n }\n\n Tooltip.prototype.applyPlacement = function (offset, placement) {\n var $tip = this.tip()\n var width = $tip[0].offsetWidth\n var height = $tip[0].offsetHeight\n\n // manually read margins because getBoundingClientRect includes difference\n var marginTop = parseInt($tip.css('margin-top'), 10)\n var marginLeft = parseInt($tip.css('margin-left'), 10)\n\n // we must check for NaN for ie 8/9\n if (isNaN(marginTop)) marginTop = 0\n if (isNaN(marginLeft)) marginLeft = 0\n\n offset.top += marginTop\n offset.left += marginLeft\n\n // $.fn.offset doesn't round pixel values\n // so we use setOffset directly with our own function B-0\n $.offset.setOffset($tip[0], $.extend({\n using: function (props) {\n $tip.css({\n top: Math.round(props.top),\n left: Math.round(props.left)\n })\n }\n }, offset), 0)\n\n $tip.addClass('in')\n\n // check to see if placing tip in new offset caused the tip to resize itself\n var actualWidth = $tip[0].offsetWidth\n var actualHeight = $tip[0].offsetHeight\n\n if (placement == 'top' && actualHeight != height) {\n offset.top = offset.top + height - actualHeight\n }\n\n var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)\n\n if (delta.left) offset.left += delta.left\n else offset.top += delta.top\n\n var isVertical = /top|bottom/.test(placement)\n var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight\n var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'\n\n $tip.offset(offset)\n this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)\n }\n\n Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {\n this.arrow()\n .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')\n .css(isVertical ? 'top' : 'left', '')\n }\n\n Tooltip.prototype.setContent = function () {\n var $tip = this.tip()\n var title = this.getTitle()\n\n $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)\n $tip.removeClass('fade in top bottom left right')\n }\n\n Tooltip.prototype.hide = function (callback) {\n var that = this\n var $tip = $(this.$tip)\n var e = $.Event('hide.bs.' + this.type)\n\n function complete() {\n if (that.hoverState != 'in') $tip.detach()\n that.$element\n .removeAttr('aria-describedby')\n .trigger('hidden.bs.' + that.type)\n callback && callback()\n }\n\n this.$element.trigger(e)\n\n if (e.isDefaultPrevented()) return\n\n $tip.removeClass('in')\n\n $.support.transition && $tip.hasClass('fade') ?\n $tip\n .one('bsTransitionEnd', complete)\n .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :\n complete()\n\n this.hoverState = null\n\n return this\n }\n\n Tooltip.prototype.fixTitle = function () {\n var $e = this.$element\n if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {\n $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')\n }\n }\n\n Tooltip.prototype.hasContent = function () {\n return this.getTitle()\n }\n\n Tooltip.prototype.getPosition = function ($element) {\n $element = $element || this.$element\n\n var el = $element[0]\n var isBody = el.tagName == 'BODY'\n\n var elRect = el.getBoundingClientRect()\n if (elRect.width == null) {\n // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093\n elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })\n }\n var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()\n var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }\n var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null\n\n return $.extend({}, elRect, scroll, outerDims, elOffset)\n }\n\n Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {\n return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :\n placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :\n placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :\n /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }\n\n }\n\n Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {\n var delta = { top: 0, left: 0 }\n if (!this.$viewport) return delta\n\n var viewportPadding = this.options.viewport && this.options.viewport.padding || 0\n var viewportDimensions = this.getPosition(this.$viewport)\n\n if (/right|left/.test(placement)) {\n var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll\n var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight\n if (topEdgeOffset < viewportDimensions.top) { // top overflow\n delta.top = viewportDimensions.top - topEdgeOffset\n } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow\n delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset\n }\n } else {\n var leftEdgeOffset = pos.left - viewportPadding\n var rightEdgeOffset = pos.left + viewportPadding + actualWidth\n if (leftEdgeOffset < viewportDimensions.left) { // left overflow\n delta.left = viewportDimensions.left - leftEdgeOffset\n } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow\n delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset\n }\n }\n\n return delta\n }\n\n Tooltip.prototype.getTitle = function () {\n var title\n var $e = this.$element\n var o = this.options\n\n title = $e.attr('data-original-title')\n || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)\n\n return title\n }\n\n Tooltip.prototype.getUID = function (prefix) {\n do prefix += ~~(Math.random() * 1000000)\n while (document.getElementById(prefix))\n return prefix\n }\n\n Tooltip.prototype.tip = function () {\n if (!this.$tip) {\n this.$tip = $(this.options.template)\n if (this.$tip.length != 1) {\n throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')\n }\n }\n return this.$tip\n }\n\n Tooltip.prototype.arrow = function () {\n return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))\n }\n\n Tooltip.prototype.enable = function () {\n this.enabled = true\n }\n\n Tooltip.prototype.disable = function () {\n this.enabled = false\n }\n\n Tooltip.prototype.toggleEnabled = function () {\n this.enabled = !this.enabled\n }\n\n Tooltip.prototype.toggle = function (e) {\n var self = this\n if (e) {\n self = $(e.currentTarget).data('bs.' + this.type)\n if (!self) {\n self = new this.constructor(e.currentTarget, this.getDelegateOptions())\n $(e.currentTarget).data('bs.' + this.type, self)\n }\n }\n\n if (e) {\n self.inState.click = !self.inState.click\n if (self.isInStateTrue()) self.enter(self)\n else self.leave(self)\n } else {\n self.tip().hasClass('in') ? self.leave(self) : self.enter(self)\n }\n }\n\n Tooltip.prototype.destroy = function () {\n var that = this\n clearTimeout(this.timeout)\n this.hide(function () {\n that.$element.off('.' + that.type).removeData('bs.' + that.type)\n if (that.$tip) {\n that.$tip.detach()\n }\n that.$tip = null\n that.$arrow = null\n that.$viewport = null\n })\n }\n\n\n // TOOLTIP PLUGIN DEFINITION\n // =========================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.tooltip')\n var options = typeof option == 'object' && option\n\n if (!data && /destroy|hide/.test(option)) return\n if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }\n\n var old = $.fn.tooltip\n\n $.fn.tooltip = Plugin\n $.fn.tooltip.Constructor = Tooltip\n\n\n // TOOLTIP NO CONFLICT\n // ===================\n\n $.fn.tooltip.noConflict = function () {\n $.fn.tooltip = old\n return this\n }\n\n}(jQuery);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/bootstrap/js/tooltip.js\n ** module id = 247\n ** module chunks = 1\n **/","/* ========================================================================\n * Bootstrap: popover.js v3.3.6\n * http://getbootstrap.com/javascript/#popovers\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // POPOVER PUBLIC CLASS DEFINITION\n // ===============================\n\n var Popover = function (element, options) {\n this.init('popover', element, options)\n }\n\n if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')\n\n Popover.VERSION = '3.3.6'\n\n Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {\n placement: 'right',\n trigger: 'click',\n content: '',\n template: '
'\n })\n\n\n // NOTE: POPOVER EXTENDS tooltip.js\n // ================================\n\n Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)\n\n Popover.prototype.constructor = Popover\n\n Popover.prototype.getDefaults = function () {\n return Popover.DEFAULTS\n }\n\n Popover.prototype.setContent = function () {\n var $tip = this.tip()\n var title = this.getTitle()\n var content = this.getContent()\n\n $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)\n $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events\n this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'\n ](content)\n\n $tip.removeClass('fade top bottom left right in')\n\n // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do\n // this manually by checking the contents.\n if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()\n }\n\n Popover.prototype.hasContent = function () {\n return this.getTitle() || this.getContent()\n }\n\n Popover.prototype.getContent = function () {\n var $e = this.$element\n var o = this.options\n\n return $e.attr('data-content')\n || (typeof o.content == 'function' ?\n o.content.call($e[0]) :\n o.content)\n }\n\n Popover.prototype.arrow = function () {\n return (this.$arrow = this.$arrow || this.tip().find('.arrow'))\n }\n\n\n // POPOVER PLUGIN DEFINITION\n // =========================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && /destroy|hide/.test(option)) return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }\n\n var old = $.fn.popover\n\n $.fn.popover = Plugin\n $.fn.popover.Constructor = Popover\n\n\n // POPOVER NO CONFLICT\n // ===================\n\n $.fn.popover.noConflict = function () {\n $.fn.popover = old\n return this\n }\n\n}(jQuery);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/bootstrap/js/popover.js\n ** module id = 248\n ** module chunks = 1\n **/","/* ========================================================================\n * Bootstrap: scrollspy.js v3.3.6\n * http://getbootstrap.com/javascript/#scrollspy\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // SCROLLSPY CLASS DEFINITION\n // ==========================\n\n function ScrollSpy(element, options) {\n this.$body = $(document.body)\n this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)\n this.options = $.extend({}, ScrollSpy.DEFAULTS, options)\n this.selector = (this.options.target || '') + ' .nav li > a'\n this.offsets = []\n this.targets = []\n this.activeTarget = null\n this.scrollHeight = 0\n\n this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))\n this.refresh()\n this.process()\n }\n\n ScrollSpy.VERSION = '3.3.6'\n\n ScrollSpy.DEFAULTS = {\n offset: 10\n }\n\n ScrollSpy.prototype.getScrollHeight = function () {\n return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)\n }\n\n ScrollSpy.prototype.refresh = function () {\n var that = this\n var offsetMethod = 'offset'\n var offsetBase = 0\n\n this.offsets = []\n this.targets = []\n this.scrollHeight = this.getScrollHeight()\n\n if (!$.isWindow(this.$scrollElement[0])) {\n offsetMethod = 'position'\n offsetBase = this.$scrollElement.scrollTop()\n }\n\n this.$body\n .find(this.selector)\n .map(function () {\n var $el = $(this)\n var href = $el.data('target') || $el.attr('href')\n var $href = /^#./.test(href) && $(href)\n\n return ($href\n && $href.length\n && $href.is(':visible')\n && [[$href[offsetMethod]().top + offsetBase, href]]) || null\n })\n .sort(function (a, b) { return a[0] - b[0] })\n .each(function () {\n that.offsets.push(this[0])\n that.targets.push(this[1])\n })\n }\n\n ScrollSpy.prototype.process = function () {\n var scrollTop = this.$scrollElement.scrollTop() + this.options.offset\n var scrollHeight = this.getScrollHeight()\n var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()\n var offsets = this.offsets\n var targets = this.targets\n var activeTarget = this.activeTarget\n var i\n\n if (this.scrollHeight != scrollHeight) {\n this.refresh()\n }\n\n if (scrollTop >= maxScroll) {\n return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)\n }\n\n if (activeTarget && scrollTop < offsets[0]) {\n this.activeTarget = null\n return this.clear()\n }\n\n for (i = offsets.length; i--;) {\n activeTarget != targets[i]\n && scrollTop >= offsets[i]\n && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])\n && this.activate(targets[i])\n }\n }\n\n ScrollSpy.prototype.activate = function (target) {\n this.activeTarget = target\n\n this.clear()\n\n var selector = this.selector +\n '[data-target=\"' + target + '\"],' +\n this.selector + '[href=\"' + target + '\"]'\n\n var active = $(selector)\n .parents('li')\n .addClass('active')\n\n if (active.parent('.dropdown-menu').length) {\n active = active\n .closest('li.dropdown')\n .addClass('active')\n }\n\n active.trigger('activate.bs.scrollspy')\n }\n\n ScrollSpy.prototype.clear = function () {\n $(this.selector)\n .parentsUntil(this.options.target, '.active')\n .removeClass('active')\n }\n\n\n // SCROLLSPY PLUGIN DEFINITION\n // ===========================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.scrollspy')\n var options = typeof option == 'object' && option\n\n if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }\n\n var old = $.fn.scrollspy\n\n $.fn.scrollspy = Plugin\n $.fn.scrollspy.Constructor = ScrollSpy\n\n\n // SCROLLSPY NO CONFLICT\n // =====================\n\n $.fn.scrollspy.noConflict = function () {\n $.fn.scrollspy = old\n return this\n }\n\n\n // SCROLLSPY DATA-API\n // ==================\n\n $(window).on('load.bs.scrollspy.data-api', function () {\n $('[data-spy=\"scroll\"]').each(function () {\n var $spy = $(this)\n Plugin.call($spy, $spy.data())\n })\n })\n\n}(jQuery);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/bootstrap/js/scrollspy.js\n ** module id = 249\n ** module chunks = 1\n **/","/* ========================================================================\n * Bootstrap: tab.js v3.3.6\n * http://getbootstrap.com/javascript/#tabs\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // TAB CLASS DEFINITION\n // ====================\n\n var Tab = function (element) {\n // jscs:disable requireDollarBeforejQueryAssignment\n this.element = $(element)\n // jscs:enable requireDollarBeforejQueryAssignment\n }\n\n Tab.VERSION = '3.3.6'\n\n Tab.TRANSITION_DURATION = 150\n\n Tab.prototype.show = function () {\n var $this = this.element\n var $ul = $this.closest('ul:not(.dropdown-menu)')\n var selector = $this.data('target')\n\n if (!selector) {\n selector = $this.attr('href')\n selector = selector && selector.replace(/.*(?=#[^\\s]*$)/, '') // strip for ie7\n }\n\n if ($this.parent('li').hasClass('active')) return\n\n var $previous = $ul.find('.active:last a')\n var hideEvent = $.Event('hide.bs.tab', {\n relatedTarget: $this[0]\n })\n var showEvent = $.Event('show.bs.tab', {\n relatedTarget: $previous[0]\n })\n\n $previous.trigger(hideEvent)\n $this.trigger(showEvent)\n\n if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return\n\n var $target = $(selector)\n\n this.activate($this.closest('li'), $ul)\n this.activate($target, $target.parent(), function () {\n $previous.trigger({\n type: 'hidden.bs.tab',\n relatedTarget: $this[0]\n })\n $this.trigger({\n type: 'shown.bs.tab',\n relatedTarget: $previous[0]\n })\n })\n }\n\n Tab.prototype.activate = function (element, container, callback) {\n var $active = container.find('> .active')\n var transition = callback\n && $.support.transition\n && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)\n\n function next() {\n $active\n .removeClass('active')\n .find('> .dropdown-menu > .active')\n .removeClass('active')\n .end()\n .find('[data-toggle=\"tab\"]')\n .attr('aria-expanded', false)\n\n element\n .addClass('active')\n .find('[data-toggle=\"tab\"]')\n .attr('aria-expanded', true)\n\n if (transition) {\n element[0].offsetWidth // reflow for transition\n element.addClass('in')\n } else {\n element.removeClass('fade')\n }\n\n if (element.parent('.dropdown-menu').length) {\n element\n .closest('li.dropdown')\n .addClass('active')\n .end()\n .find('[data-toggle=\"tab\"]')\n .attr('aria-expanded', true)\n }\n\n callback && callback()\n }\n\n $active.length && transition ?\n $active\n .one('bsTransitionEnd', next)\n .emulateTransitionEnd(Tab.TRANSITION_DURATION) :\n next()\n\n $active.removeClass('in')\n }\n\n\n // TAB PLUGIN DEFINITION\n // =====================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.tab')\n\n if (!data) $this.data('bs.tab', (data = new Tab(this)))\n if (typeof option == 'string') data[option]()\n })\n }\n\n var old = $.fn.tab\n\n $.fn.tab = Plugin\n $.fn.tab.Constructor = Tab\n\n\n // TAB NO CONFLICT\n // ===============\n\n $.fn.tab.noConflict = function () {\n $.fn.tab = old\n return this\n }\n\n\n // TAB DATA-API\n // ============\n\n var clickHandler = function (e) {\n e.preventDefault()\n Plugin.call($(this), 'show')\n }\n\n $(document)\n .on('click.bs.tab.data-api', '[data-toggle=\"tab\"]', clickHandler)\n .on('click.bs.tab.data-api', '[data-toggle=\"pill\"]', clickHandler)\n\n}(jQuery);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/bootstrap/js/tab.js\n ** module id = 250\n ** module chunks = 1\n **/","/* ========================================================================\n * Bootstrap: affix.js v3.3.6\n * http://getbootstrap.com/javascript/#affix\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // AFFIX CLASS DEFINITION\n // ======================\n\n var Affix = function (element, options) {\n this.options = $.extend({}, Affix.DEFAULTS, options)\n\n this.$target = $(this.options.target)\n .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))\n .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))\n\n this.$element = $(element)\n this.affixed = null\n this.unpin = null\n this.pinnedOffset = null\n\n this.checkPosition()\n }\n\n Affix.VERSION = '3.3.6'\n\n Affix.RESET = 'affix affix-top affix-bottom'\n\n Affix.DEFAULTS = {\n offset: 0,\n target: window\n }\n\n Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {\n var scrollTop = this.$target.scrollTop()\n var position = this.$element.offset()\n var targetHeight = this.$target.height()\n\n if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false\n\n if (this.affixed == 'bottom') {\n if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'\n return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'\n }\n\n var initializing = this.affixed == null\n var colliderTop = initializing ? scrollTop : position.top\n var colliderHeight = initializing ? targetHeight : height\n\n if (offsetTop != null && scrollTop <= offsetTop) return 'top'\n if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'\n\n return false\n }\n\n Affix.prototype.getPinnedOffset = function () {\n if (this.pinnedOffset) return this.pinnedOffset\n this.$element.removeClass(Affix.RESET).addClass('affix')\n var scrollTop = this.$target.scrollTop()\n var position = this.$element.offset()\n return (this.pinnedOffset = position.top - scrollTop)\n }\n\n Affix.prototype.checkPositionWithEventLoop = function () {\n setTimeout($.proxy(this.checkPosition, this), 1)\n }\n\n Affix.prototype.checkPosition = function () {\n if (!this.$element.is(':visible')) return\n\n var height = this.$element.height()\n var offset = this.options.offset\n var offsetTop = offset.top\n var offsetBottom = offset.bottom\n var scrollHeight = Math.max($(document).height(), $(document.body).height())\n\n if (typeof offset != 'object') offsetBottom = offsetTop = offset\n if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)\n if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)\n\n var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)\n\n if (this.affixed != affix) {\n if (this.unpin != null) this.$element.css('top', '')\n\n var affixType = 'affix' + (affix ? '-' + affix : '')\n var e = $.Event(affixType + '.bs.affix')\n\n this.$element.trigger(e)\n\n if (e.isDefaultPrevented()) return\n\n this.affixed = affix\n this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null\n\n this.$element\n .removeClass(Affix.RESET)\n .addClass(affixType)\n .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')\n }\n\n if (affix == 'bottom') {\n this.$element.offset({\n top: scrollHeight - height - offsetBottom\n })\n }\n }\n\n\n // AFFIX PLUGIN DEFINITION\n // =======================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.affix')\n var options = typeof option == 'object' && option\n\n if (!data) $this.data('bs.affix', (data = new Affix(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }\n\n var old = $.fn.affix\n\n $.fn.affix = Plugin\n $.fn.affix.Constructor = Affix\n\n\n // AFFIX NO CONFLICT\n // =================\n\n $.fn.affix.noConflict = function () {\n $.fn.affix = old\n return this\n }\n\n\n // AFFIX DATA-API\n // ==============\n\n $(window).on('load', function () {\n $('[data-spy=\"affix\"]').each(function () {\n var $spy = $(this)\n var data = $spy.data()\n\n data.offset = data.offset || {}\n\n if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom\n if (data.offsetTop != null) data.offset.top = data.offsetTop\n\n Plugin.call($spy, data)\n })\n })\n\n}(jQuery);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/bootstrap/js/affix.js\n ** module id = 251\n ** module chunks = 1\n **/","/*! jquery-slugify - v1.2.3 - 2015-12-23\n* Copyright (c) 2015 madflow; Licensed */\n!function(a){a.fn.slugify=function(b,c){return this.each(function(){var d=a(this),e=a(b);d.on(\"keyup change\",function(){\"\"!==d.val()&&void 0!==d.val()?d.data(\"locked\",!0):d.data(\"locked\",!1)}),e.on(\"keyup change\",function(){!0!==d.data(\"locked\")&&(d.is(\"input\")||d.is(\"textarea\")?d.val(a.slugify(e.val(),c)):d.text(a.slugify(e.val(),c)))})})},a.slugify=function(b,c){return c=a.extend({},a.slugify.options,c),c.lang=c.lang||a(\"html\").prop(\"lang\"),\"function\"==typeof c.preSlug&&(b=c.preSlug(b)),b=c.slugFunc(b,c),\"function\"==typeof c.postSlug&&(b=c.postSlug(b)),b},a.slugify.options={preSlug:null,postSlug:null,slugFunc:function(a,b){return window.getSlug(a,b)}}}(jQuery);\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/jquery-slugify/dist/slugify.min.js\n ** module id = 252\n ** module chunks = 1\n **/"],"sourceRoot":""}
\ No newline at end of file
diff --git a/themes/grav/js/vendor.min.js b/themes/grav/js/vendor.min.js
new file mode 100644
index 00000000..bcd014f4
--- /dev/null
+++ b/themes/grav/js/vendor.min.js
@@ -0,0 +1,13 @@
+var Grav=function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return t[i].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i=window.webpackJsonpGrav;window.webpackJsonpGrav=function(s,r){for(var a,l,c=0,u=[];c
=0;n--)u(t(i[n]),e)}function u(e,i,n){var o=n&&n.force?n.force:!1;return e&&(o||0===t(":focus",e).length)?(e[i.hideMethod]({duration:i.hideDuration,easing:i.hideEasing,complete:function(){m(e)}}),!0):!1}function d(e){return v=t("
").attr("id",e.containerId).addClass(e.positionClass).attr("aria-live","polite").attr("role","alert"),v.appendTo(t(e.target)),v}function p(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'× ',newestOnTop:!0,preventDuplicates:!1,progressBar:!1}}function h(t){y&&y(t)}function f(e){function n(t){return null==t&&(t=""),new String(t).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function o(){a(),c(),u(),d(),p(),l()}function s(){T.hover(C,x),!O.onclick&&O.tapToDismiss&&T.click(y),O.closeButton&&I&&I.click(function(t){t.stopPropagation?t.stopPropagation():void 0!==t.cancelBubble&&t.cancelBubble!==!0&&(t.cancelBubble=!0),y(!0)}),O.onclick&&T.click(function(t){O.onclick(t),y()})}function r(){T.hide(),T[O.showMethod]({duration:O.showDuration,easing:O.showEasing,complete:O.onShown}),O.timeOut>0&&($=setTimeout(y,O.timeOut),_.maxHideTime=parseFloat(O.timeOut),_.hideEta=(new Date).getTime()+_.maxHideTime,O.progressBar&&(_.intervalId=setInterval(E,10)))}function a(){e.iconClass&&T.addClass(O.toastClass).addClass(S)}function l(){O.newestOnTop?v.prepend(T):v.append(T)}function c(){e.title&&(D.append(O.escapeHtml?n(e.title):e.title).addClass(O.titleClass),T.append(D))}function u(){e.message&&(A.append(O.escapeHtml?n(e.message):e.message).addClass(O.messageClass),T.append(A))}function d(){O.closeButton&&(I.addClass("toast-close-button").attr("role","button"),T.prepend(I))}function p(){O.progressBar&&(k.addClass("toast-progress"),T.prepend(k))}function f(t,e){if(t.preventDuplicates){if(e.message===b)return!0;b=e.message}return!1}function y(e){var i=e&&O.closeMethod!==!1?O.closeMethod:O.hideMethod,n=e&&O.closeDuration!==!1?O.closeDuration:O.hideDuration,o=e&&O.closeEasing!==!1?O.closeEasing:O.hideEasing;return!t(":focus",T).length||e?(clearTimeout(_.intervalId),T[i]({duration:n,easing:o,complete:function(){m(T),O.onHidden&&"hidden"!==N.state&&O.onHidden(),N.state="hidden",N.endTime=new Date,h(N)}})):void 0}function x(){(O.timeOut>0||O.extendedTimeOut>0)&&($=setTimeout(y,O.extendedTimeOut),_.maxHideTime=parseFloat(O.extendedTimeOut),_.hideEta=(new Date).getTime()+_.maxHideTime)}function C(){clearTimeout($),_.hideEta=0,T.stop(!0,!0)[O.showMethod]({duration:O.showDuration,easing:O.showEasing})}function E(){var t=(_.hideEta-(new Date).getTime())/_.maxHideTime*100;k.width(t+"%")}var O=g(),S=e.iconClass||O.iconClass;if("undefined"!=typeof e.optionsOverride&&(O=t.extend(O,e.optionsOverride),S=e.optionsOverride.iconClass||S),!f(O,e)){w++,v=i(O,!0);var $=null,T=t("
"),D=t("
"),A=t("
"),k=t("
"),I=t(O.closeHtml),_={intervalId:null,hideEta:null,maxHideTime:null},N={toastId:w,state:"visible",startTime:new Date,options:O,map:e};return o(),r(),s(),h(N),O.debug&&console&&console.log(N),T}}function g(){return t.extend({},p(),C.options)}function m(t){v||(v=i()),t.is(":visible")||(t.remove(),t=null,0===v.children().length&&(v.remove(),b=void 0))}var v,y,b,w=0,x={error:"error",info:"info",success:"success",warning:"warning"},C={clear:a,remove:l,error:e,getContainer:i,info:n,options:{},subscribe:o,success:s,version:"2.1.2",warning:r};return C}()}.apply(e,n),!(void 0!==o&&(t.exports=o))}(i(197))},196:function(t,e){t.exports=jQuery},197:function(t,e){t.exports=function(){throw new Error("define cannot be used indirect")}},208:function(t,e,i){var n,o;!function(i,s){n=[],o=function(){return i.Chartist=s()}.apply(e,n),!(void 0!==o&&(t.exports=o))}(this,function(){var t={version:"0.9.5"};return function(t,e,i){"use strict";i.noop=function(t){return t},i.alphaNumerate=function(t){return String.fromCharCode(97+t%26)},i.extend=function(t){t=t||{};var e=Array.prototype.slice.call(arguments,1);return e.forEach(function(e){for(var n in e)"object"!=typeof e[n]||null===e[n]||e[n]instanceof Array?t[n]=e[n]:t[n]=i.extend({},t[n],e[n])}),t},i.replaceAll=function(t,e,i){return t.replace(new RegExp(e,"g"),i)},i.ensureUnit=function(t,e){return"number"==typeof t&&(t+=e),t},i.quantity=function(t){if("string"==typeof t){var e=/^(\d+)\s*(.*)$/g.exec(t);return{value:+e[1],unit:e[2]||void 0}}return{value:t}},i.querySelector=function(t){return t instanceof Node?t:e.querySelector(t)},i.times=function(t){return Array.apply(null,new Array(t))},i.sum=function(t,e){return t+(e?e:0)},i.mapMultiply=function(t){return function(e){return e*t}},i.mapAdd=function(t){return function(e){return e+t}},i.serialMap=function(t,e){var n=[],o=Math.max.apply(null,t.map(function(t){return t.length}));return i.times(o).forEach(function(i,o){var s=t.map(function(t){return t[o]});n[o]=e.apply(null,s)}),n},i.roundWithPrecision=function(t,e){var n=Math.pow(10,e||i.precision);return Math.round(t*n)/n},i.precision=8,i.escapingMap={"&":"&","<":"<",">":">",'"':""","'":"'"},i.serialize=function(t){return null===t||void 0===t?t:("number"==typeof t?t=""+t:"object"==typeof t&&(t=JSON.stringify({data:t})),Object.keys(i.escapingMap).reduce(function(t,e){return i.replaceAll(t,e,i.escapingMap[e])},t))},i.deserialize=function(t){if("string"!=typeof t)return t;t=Object.keys(i.escapingMap).reduce(function(t,e){return i.replaceAll(t,i.escapingMap[e],e)},t);try{t=JSON.parse(t),t=void 0!==t.data?t.data:t}catch(e){}return t},i.createSvg=function(t,e,n,o){var s;return e=e||"100%",n=n||"100%",Array.prototype.slice.call(t.querySelectorAll("svg")).filter(function(t){return t.getAttributeNS("http://www.w3.org/2000/xmlns/",i.xmlNs.prefix)}).forEach(function(e){t.removeChild(e)}),s=new i.Svg("svg").attr({width:e,height:n}).addClass(o).attr({style:"width: "+e+"; height: "+n+";"}),t.appendChild(s._node),s},i.reverseData=function(t){t.labels.reverse(),t.series.reverse();for(var e=0;es.high&&(s.high=i),a&&iu,p=o?i.rho(c.range):0;if(o&&i.projectLength(t,1,c)>=n)c.step=1;else if(o&&p=n)c.step=p;else for(;;){if(d&&i.projectLength(t,c.step,c)<=n)c.step*=2;else{if(d||!(i.projectLength(t,c.step/2,c)>=n))break;if(c.step/=2,o&&c.step%1!==0){c.step*=2;break}}if(l++>1e3)throw new Error("Exceeded maximum number of iterations while optimizing scale step!")}for(r=c.min,a=c.max;r+c.step<=c.low;)r+=c.step;for(;a-c.step>=c.high;)a-=c.step;for(c.min=r,c.max=a,c.range=c.max-c.min,c.values=[],s=c.min;s<=c.max;s+=c.step)c.values.push(i.roundWithPrecision(s));return c},i.polarToCartesian=function(t,e,i,n){var o=(n-90)*Math.PI/180;return{x:t+i*Math.cos(o),y:e+i*Math.sin(o)}},i.createChartRect=function(t,e,n){var o=!(!e.axisX&&!e.axisY),s=o?e.axisY.offset:0,r=o?e.axisX.offset:0,a=t.width()||i.quantity(e.width).value||0,l=t.height()||i.quantity(e.height).value||0,c=i.normalizePadding(e.chartPadding,n);a=Math.max(a,s+c.left+c.right),l=Math.max(l,r+c.top+c.bottom);var u={padding:c,width:function(){return this.x2-this.x1},height:function(){return this.y1-this.y2}};return o?("start"===e.axisX.position?(u.y2=c.top+r,u.y1=Math.max(l-c.bottom,u.y2+1)):(u.y2=c.top,u.y1=Math.max(l-c.bottom-r,u.y2+1)),"start"===e.axisY.position?(u.x1=c.left+s,u.x2=Math.max(a-c.right,u.x1+1)):(u.x1=c.left,u.x2=Math.max(a-c.right-s,u.x1+1))):(u.x1=c.left,u.x2=Math.max(a-c.right,u.x1+1),u.y2=c.top,u.y1=Math.max(l-c.bottom,u.y2+1)),u},i.createGrid=function(t,e,n,o,s,r,a,l){var c={};c[n.units.pos+"1"]=t,c[n.units.pos+"2"]=t,c[n.counterUnits.pos+"1"]=o,c[n.counterUnits.pos+"2"]=o+s;var u=r.elem("line",c,a.join(" "));l.emit("draw",i.extend({type:"grid",axis:n,index:e,group:r,element:u},c))},i.createLabel=function(t,e,n,o,s,r,a,l,c,u,d){var p,h={};if(h[s.units.pos]=t+a[s.units.pos],h[s.counterUnits.pos]=a[s.counterUnits.pos],h[s.units.len]=e,h[s.counterUnits.len]=r-10,u){var f=''+o[n]+" ";p=l.foreignObject(f,i.extend({style:"overflow: visible;"},h))}else p=l.elem("text",h,c.join(" ")).text(o[n]);d.emit("draw",i.extend({type:"label",axis:s,index:n,group:l,element:p,text:o[n]},h))},i.getSeriesOption=function(t,e,i){if(t.name&&e.series&&e.series[t.name]){var n=e.series[t.name];return n.hasOwnProperty(i)?n[i]:e[i]}return e[i]},i.optionsProvider=function(e,n,o){function s(e){var s=a;if(a=i.extend({},c),n)for(l=0;l1){var l=[];return a.forEach(function(t){l.push(r(t.pathCoordinates,t.valueData))}),i.Svg.Path.join(l)}if(t=a[0].pathCoordinates,n=a[0].valueData,t.length<=4)return i.Interpolation.none()(t,n);for(var c,u=(new i.Svg.Path).move(t[0],t[1],!1,n[0]),d=0,p=t.length;p-2*!c>d;d+=2){var h=[{x:+t[d-2],y:+t[d-1]},{x:+t[d],y:+t[d+1]},{x:+t[d+2],y:+t[d+3]},{x:+t[d+4],y:+t[d+5]}];c?d?p-4===d?h[3]={x:+t[0],y:+t[1]}:p-2===d&&(h[2]={x:+t[0],y:+t[1]},h[3]={x:+t[2],y:+t[3]}):h[0]={x:+t[p-2],y:+t[p-1]}:p-4===d?h[3]=h[2]:d||(h[0]={x:+t[d],y:+t[d+1]}),u.curve(o*(-h[0].x+6*h[1].x+h[2].x)/6+s*h[2].x,o*(-h[0].y+6*h[1].y+h[2].y)/6+s*h[2].y,o*(h[1].x+6*h[2].x-h[3].x)/6+s*h[2].x,o*(h[1].y+6*h[2].y-h[3].y)/6+s*h[2].y,h[2].x,h[2].y,!1,n[(d+2)/2])}return u}},i.Interpolation.step=function(t){var e={postpone:!0,fillHoles:!1};return t=i.extend({},e,t),function(e,n){for(var o,s,r,a=new i.Svg.Path,l=0;l1}).map(function(t){var e=t.pathElements[0],i=t.pathElements[t.pathElements.length-1];return t.clone(!0).position(0).remove(1).move(e.x,v).line(e.x,e.y).position(t.pathElements.length+1).line(i.x,v)}).forEach(function(a){var u=l.elem("path",{d:a.stringify()},t.classNames.area,!0).attr({values:e.normalized[r]},i.xmlNs.uri);this.eventEmitter.emit("draw",{type:"area",values:e.normalized[r],path:a.clone(),series:s,seriesIndex:r,axisX:n,axisY:o,chartRect:c,index:r,group:l,element:u})}.bind(this))}}.bind(this)),this.eventEmitter.emit("created",{bounds:o.bounds,chartRect:c,axisX:n,axisY:o,svg:this.svg,options:t})}function o(t,e,n,o){i.Line["super"].constructor.call(this,t,e,s,i.extend({},s,n),o)}var s={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:i.noop,type:void 0},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:i.noop,type:void 0,scaleMinSpace:20,onlyInteger:!1},width:void 0,height:void 0,showLine:!0,showPoint:!0,showArea:!1,areaBase:0,lineSmooth:!0,low:void 0,high:void 0,chartPadding:{top:15,right:15,bottom:5,left:10},fullWidth:!1,reverseData:!1,classNames:{chart:"ct-chart-line",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",line:"ct-line",point:"ct-point",area:"ct-area",grid:"ct-grid",gridGroup:"ct-grids",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};i.Line=i.Base.extend({constructor:o,createChart:n})}(window,document,t),function(t,e,i){"use strict";function n(t){var e,n={raw:this.data,normalized:t.distributeSeries?i.getDataArray(this.data,t.reverseData,t.horizontalBars?"x":"y").map(function(t){return[t]}):i.getDataArray(this.data,t.reverseData,t.horizontalBars?"x":"y")};this.svg=i.createSvg(this.container,t.width,t.height,t.classNames.chart+(t.horizontalBars?" "+t.classNames.horizontalBars:""));var o=this.svg.elem("g").addClass(t.classNames.gridGroup),r=this.svg.elem("g"),a=this.svg.elem("g").addClass(t.classNames.labelGroup);if(t.stackBars){var l=i.serialMap(n.normalized,function(){return Array.prototype.slice.call(arguments).map(function(t){return t}).reduce(function(t,e){return{x:t.x+e.x||0,y:t.y+e.y||0}},{x:0,y:0})});e=i.getHighLow([l],i.extend({},t,{referenceValue:0}),t.horizontalBars?"x":"y")}else e=i.getHighLow(n.normalized,i.extend({},t,{referenceValue:0}),t.horizontalBars?"x":"y");e.high=+t.high||(0===t.high?0:e.high),e.low=+t.low||(0===t.low?0:e.low);var c,u,d,p,h,f=i.createChartRect(this.svg,t,s.padding);u=t.distributeSeries&&t.stackBars?n.raw.labels.slice(0,1):n.raw.labels,t.horizontalBars?(c=p=void 0===t.axisX.type?new i.AutoScaleAxis(i.Axis.units.x,n,f,i.extend({},t.axisX,{highLow:e,referenceValue:0})):t.axisX.type.call(i,i.Axis.units.x,n,f,i.extend({},t.axisX,{highLow:e,referenceValue:0})),d=h=void 0===t.axisY.type?new i.StepAxis(i.Axis.units.y,n,f,{ticks:u}):t.axisY.type.call(i,i.Axis.units.y,n,f,t.axisY)):(d=p=void 0===t.axisX.type?new i.StepAxis(i.Axis.units.x,n,f,{ticks:u}):t.axisX.type.call(i,i.Axis.units.x,n,f,t.axisX),c=h=void 0===t.axisY.type?new i.AutoScaleAxis(i.Axis.units.y,n,f,i.extend({},t.axisY,{highLow:e,referenceValue:0})):t.axisY.type.call(i,i.Axis.units.y,n,f,i.extend({},t.axisY,{highLow:e,referenceValue:0})));var g=t.horizontalBars?f.x1+c.projectValue(0):f.y1-c.projectValue(0),m=[];d.createGridAndLabels(o,a,this.supportsForeignObject,t,this.eventEmitter),c.createGridAndLabels(o,a,this.supportsForeignObject,t,this.eventEmitter),n.raw.series.forEach(function(e,o){var s,a,l=o-(n.raw.series.length-1)/2;s=t.distributeSeries&&!t.stackBars?d.axisLength/n.normalized.length/2:t.distributeSeries&&t.stackBars?d.axisLength/2:d.axisLength/n.normalized[o].length/2,a=r.elem("g"),a.attr({"series-name":e.name,meta:i.serialize(e.meta)},i.xmlNs.uri),a.addClass([t.classNames.series,e.className||t.classNames.series+"-"+i.alphaNumerate(o)].join(" ")),n.normalized[o].forEach(function(r,u){var v,y,b,w;if(w=t.distributeSeries&&!t.stackBars?o:t.distributeSeries&&t.stackBars?0:u,v=t.horizontalBars?{x:f.x1+c.projectValue(r&&r.x?r.x:0,u,n.normalized[o]),y:f.y1-d.projectValue(r&&r.y?r.y:0,w,n.normalized[o])}:{x:f.x1+d.projectValue(r&&r.x?r.x:0,w,n.normalized[o]),y:f.y1-c.projectValue(r&&r.y?r.y:0,u,n.normalized[o])},d instanceof i.StepAxis&&(d.options.stretch||(v[d.units.pos]+=s*(t.horizontalBars?-1:1)),v[d.units.pos]+=t.stackBars||t.distributeSeries?0:l*t.seriesBarDistance*(t.horizontalBars?-1:1)),b=m[u]||g,m[u]=b-(g-v[d.counterUnits.pos]),void 0!==r){var x={};x[d.units.pos+"1"]=v[d.units.pos],x[d.units.pos+"2"]=v[d.units.pos],!t.stackBars||"accumulate"!==t.stackMode&&t.stackMode?(x[d.counterUnits.pos+"1"]=g,x[d.counterUnits.pos+"2"]=v[d.counterUnits.pos]):(x[d.counterUnits.pos+"1"]=b,x[d.counterUnits.pos+"2"]=m[u]),x.x1=Math.min(Math.max(x.x1,f.x1),f.x2),x.x2=Math.min(Math.max(x.x2,f.x1),f.x2),x.y1=Math.min(Math.max(x.y1,f.y2),f.y1),x.y2=Math.min(Math.max(x.y2,f.y2),f.y1),y=a.elem("line",x,t.classNames.bar).attr({value:[r.x,r.y].filter(function(t){return t}).join(","),meta:i.getMetaData(e,u)},i.xmlNs.uri),this.eventEmitter.emit("draw",i.extend({type:"bar",value:r,index:u,meta:i.getMetaData(e,u),series:e,seriesIndex:o,axisX:p,axisY:h,chartRect:f,group:a,element:y},x))}}.bind(this))}.bind(this)),this.eventEmitter.emit("created",{bounds:c.bounds,chartRect:f,axisX:p,axisY:h,svg:this.svg,options:t})}function o(t,e,n,o){i.Bar["super"].constructor.call(this,t,e,s,i.extend({},s,n),o)}var s={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:i.noop,scaleMinSpace:30,onlyInteger:!1},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:i.noop,scaleMinSpace:20,onlyInteger:!1},width:void 0,height:void 0,high:void 0,low:void 0,onlyInteger:!1,chartPadding:{top:15,right:15,bottom:5,left:10},seriesBarDistance:15,stackBars:!1,stackMode:"accumulate",horizontalBars:!1,distributeSeries:!1,reverseData:!1,classNames:{chart:"ct-chart-bar",horizontalBars:"ct-horizontal-bars",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",bar:"ct-bar",grid:"ct-grid",gridGroup:"ct-grids",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};i.Bar=i.Base.extend({constructor:o,createChart:n})}(window,document,t),function(t,e,i){"use strict";function n(t,e,i){var n=e.x>t.x;return n&&"explode"===i||!n&&"implode"===i?"start":n&&"implode"===i||!n&&"explode"===i?"end":"middle"}function o(t){var e,o,s,a,l,c=[],u=t.startAngle,d=i.getDataArray(this.data,t.reverseData);this.svg=i.createSvg(this.container,t.width,t.height,t.donut?t.classNames.chartDonut:t.classNames.chartPie),o=i.createChartRect(this.svg,t,r.padding),s=Math.min(o.width()/2,o.height()/2),l=t.total||d.reduce(function(t,e){return t+e},0);var p=i.quantity(t.donutWidth);"%"===p.unit&&(p.value*=s/100),s-=t.donut?p.value/2:0,a="outside"===t.labelPosition||t.donut?s:"center"===t.labelPosition?0:s/2,a+=t.labelOffset;var h={x:o.x1+o.width()/2,y:o.y2+o.height()/2},f=1===this.data.series.filter(function(t){return t.hasOwnProperty("value")?0!==t.value:0!==t}).length;t.showLabel&&(e=this.svg.elem("g",null,null,!0));for(var g=0;g180,0,y.x,y.y);t.donut||w.line(h.x,h.y);var x=c[g].elem("path",{d:w.stringify()},t.donut?t.classNames.sliceDonut:t.classNames.slicePie);if(x.attr({value:d[g],meta:i.serialize(m.meta)},i.xmlNs.uri),t.donut&&x.attr({style:"stroke-width: "+p.value+"px"}),this.eventEmitter.emit("draw",{type:"slice",value:d[g],totalDataSum:l,index:g,meta:m.meta,series:m,group:c[g],element:x,path:w.clone(),center:h,radius:s,startAngle:u,endAngle:v}),t.showLabel){var C=i.polarToCartesian(h.x,h.y,a,u+(v-u)/2),E=t.labelInterpolationFnc(this.data.labels?this.data.labels[g]:d[g],g);if(E||0===E){var O=e.elem("text",{dx:C.x,dy:C.y,"text-anchor":n(h,C,t.labelDirection)},t.classNames.label).text(""+E);this.eventEmitter.emit("draw",{type:"label",index:g,group:e,element:O,text:""+E,x:C.x,y:C.y})}}u=v}this.eventEmitter.emit("created",{chartRect:o,svg:this.svg,options:t})}function s(t,e,n,o){i.Pie["super"].constructor.call(this,t,e,r,i.extend({},r,n),o)}var r={width:void 0,height:void 0,chartPadding:5,classNames:{chartPie:"ct-chart-pie",chartDonut:"ct-chart-donut",series:"ct-series",slicePie:"ct-slice-pie",sliceDonut:"ct-slice-donut",label:"ct-label"},startAngle:0,total:void 0,donut:!1,donutWidth:60,showLabel:!0,labelOffset:0,labelPosition:"inside",labelInterpolationFnc:i.noop,labelDirection:"neutral",reverseData:!1};i.Pie=i.Base.extend({constructor:s,createChart:o,determineAnchorPosition:n})}(window,document,t),t})},212:function(t,e,i){var n,o;/**!
+ * Sortable
+ * @author RubaXa
+ * @license MIT
+ */
+!function(s){"use strict";n=s,o="function"==typeof n?n.call(e,i,e,t):n,!(void 0!==o&&(t.exports=o))}(function(){"use strict";function t(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be HTMLElement, and not "+{}.toString.call(t);this.el=t,this.options=e=v({},e),t[P]=this;var i={group:Math.random(),sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,draggable:/[uo]l/i.test(t.nodeName)?"li":">*",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",ignore:"a, img",filter:null,animation:0,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1};for(var n in i)!(n in e)&&(e[n]=i[n]);G(e);for(var s in this)"_"===s.charAt(0)&&(this[s]=this[s].bind(this));this.nativeDraggable=e.forceFallback?!1:U,o(t,"mousedown",this._onTapStart),o(t,"touchstart",this._onTapStart),this.nativeDraggable&&(o(t,"dragover",this),o(t,"dragenter",this)),W.push(this._onDragOver),e.store&&this.sort(e.store.get(this))}function e(t){x&&x.state!==t&&(a(x,"display",t?"none":""),!t&&x.state&&C.insertBefore(x,y),x.state=t)}function i(t,e,i){if(t){i=i||R,e=e.split(".");var n=e.shift().toUpperCase(),o=new RegExp("\\s("+e.join("|")+")(?=\\s)","g");do if(">*"===n&&t.parentNode===i||(""===n||t.nodeName.toUpperCase()==n)&&(!e.length||((" "+t.className+" ").match(o)||[]).length==e.length))return t;while(t!==i&&(t=t.parentNode))}return null}function n(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.preventDefault()}function o(t,e,i){t.addEventListener(e,i,!1)}function s(t,e,i){t.removeEventListener(e,i,!1)}function r(t,e,i){if(t)if(t.classList)t.classList[i?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(z," ").replace(" "+e+" "," ");t.className=(n+(i?" "+e:"")).replace(z," ")}}function a(t,e,i){var n=t&&t.style;if(n){if(void 0===i)return R.defaultView&&R.defaultView.getComputedStyle?i=R.defaultView.getComputedStyle(t,""):t.currentStyle&&(i=t.currentStyle),void 0===e?i:i[e];e in n||(e="-webkit-"+e),n[e]=i+("string"==typeof i?"":"px")}}function l(t,e,i){if(t){var n=t.getElementsByTagName(e),o=0,s=n.length;if(i)for(;s>o;o++)i(n[o],o);return n}return[]}function c(t,e,i,n,o,s,r){var a=R.createEvent("Event"),l=(t||e[P]).options,c="on"+i.charAt(0).toUpperCase()+i.substr(1);a.initEvent(i,!0,!0),a.to=e,a.from=o||e,a.item=n||e,a.clone=x,a.oldIndex=s,a.newIndex=r,e.dispatchEvent(a),l[c]&&l[c].call(t,a)}function u(t,e,i,n,o,s){var r,a,l=t[P],c=l.options.onMove;return r=R.createEvent("Event"),r.initEvent("move",!0,!0),r.to=e,r.from=t,r.dragged=i,r.draggedRect=n,r.related=o||e,r.relatedRect=s||e.getBoundingClientRect(),t.dispatchEvent(r),c&&(a=c.call(l,r)),a}function d(t){t.draggable=!1}function p(){H=!1}function h(t,e){var i=t.lastElementChild,n=i.getBoundingClientRect();return(e.clientY-(n.top+n.height)>5||e.clientX-(n.right+n.width)>5)&&i}function f(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,i=e.length,n=0;i--;)n+=e.charCodeAt(i);return n.toString(36)}function g(t){var e=0;if(!t||!t.parentNode)return-1;for(;t&&(t=t.previousElementSibling);)"TEMPLATE"!==t.nodeName.toUpperCase()&&e++;return e}function m(t,e){var i,n;return function(){void 0===i&&(i=arguments,n=this,setTimeout(function(){1===i.length?t.call(n,i[0]):t.apply(n,i),i=void 0},e))}}function v(t,e){if(t&&e)for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}var y,b,w,x,C,E,O,S,$,T,D,A,k,I,_,N,F,L={},z=/\s+/g,P="Sortable"+(new Date).getTime(),M=window,R=M.document,j=M.parseInt,U=!!("draggable"in R.createElement("div")),B=function(t){return t=R.createElement("x"),t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}(),H=!1,q=Math.abs,W=([].slice,[]),V=m(function(t,e,i){if(i&&e.scroll){var n,o,s,r,a=e.scrollSensitivity,l=e.scrollSpeed,c=t.clientX,u=t.clientY,d=window.innerWidth,p=window.innerHeight;if(S!==i&&(O=e.scroll,S=i,O===!0)){O=i;do if(O.offsetWidth=d-c)-(a>=c),r=(a>=p-u)-(a>=u),(s||r)&&(n=M)),(L.vx!==s||L.vy!==r||L.el!==n)&&(L.el=n,L.vx=s,L.vy=r,clearInterval(L.pid),n&&(L.pid=setInterval(function(){n===M?M.scrollTo(M.pageXOffset+s*l,M.pageYOffset+r*l):(r&&(n.scrollTop+=r*l),s&&(n.scrollLeft+=s*l))},24)))}},30),G=function(t){var e=t.group;e&&"object"==typeof e||(e=t.group={name:e}),["pull","put"].forEach(function(t){t in e||(e[t]=!0)}),t.groups=" "+e.name+(e.put.join?" "+e.put.join(" "):"")+" "};return t.prototype={constructor:t,_onTapStart:function(t){var e=this,n=this.el,o=this.options,s=t.type,r=t.touches&&t.touches[0],a=(r||t).target,l=a,u=o.filter;if(!("mousedown"===s&&0!==t.button||o.disabled)&&(a=i(a,o.draggable,n))){if(A=g(a),"function"==typeof u){if(u.call(this,t,a,this))return c(e,l,"filter",a,n,A),void t.preventDefault()}else if(u&&(u=u.split(",").some(function(t){return t=i(l,t.trim(),n),t?(c(e,t,"filter",a,n,A),!0):void 0})))return void t.preventDefault();(!o.handle||i(l,o.handle,n))&&this._prepareDragStart(t,r,a)}},_prepareDragStart:function(t,e,i){var n,s=this,a=s.el,c=s.options,u=a.ownerDocument;i&&!y&&i.parentNode===a&&(_=t,C=a,y=i,b=y.parentNode,E=y.nextSibling,I=c.group,n=function(){s._disableDelayedDrag(),y.draggable=!0,r(y,s.options.chosenClass,!0),s._triggerDragStart(e)},c.ignore.split(",").forEach(function(t){l(y,t.trim(),d)}),o(u,"mouseup",s._onDrop),o(u,"touchend",s._onDrop),o(u,"touchcancel",s._onDrop),c.delay?(o(u,"mouseup",s._disableDelayedDrag),o(u,"touchend",s._disableDelayedDrag),o(u,"touchcancel",s._disableDelayedDrag),o(u,"mousemove",s._disableDelayedDrag),o(u,"touchmove",s._disableDelayedDrag),s._dragStartTimer=setTimeout(n,c.delay)):n())},_disableDelayedDrag:function(){var t=this.el.ownerDocument;clearTimeout(this._dragStartTimer),s(t,"mouseup",this._disableDelayedDrag),s(t,"touchend",this._disableDelayedDrag),s(t,"touchcancel",this._disableDelayedDrag),s(t,"mousemove",this._disableDelayedDrag),s(t,"touchmove",this._disableDelayedDrag)},_triggerDragStart:function(t){t?(_={target:y,clientX:t.clientX,clientY:t.clientY},this._onDragStart(_,"touch")):this.nativeDraggable?(o(y,"dragend",this),o(C,"dragstart",this._onDragStart)):this._onDragStart(_,!0);try{R.selection?R.selection.empty():window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(){C&&y&&(r(y,this.options.ghostClass,!0),t.active=this,c(this,C,"start",y,C,A))},_emulateDragOver:function(){if(N){if(this._lastX===N.clientX&&this._lastY===N.clientY)return;this._lastX=N.clientX,this._lastY=N.clientY,B||a(w,"display","none");var t=R.elementFromPoint(N.clientX,N.clientY),e=t,i=" "+this.options.group.name,n=W.length;if(e)do{if(e[P]&&e[P].options.groups.indexOf(i)>-1){for(;n--;)W[n]({clientX:N.clientX,clientY:N.clientY,target:t,rootEl:e});break}t=e}while(e=e.parentNode);B||a(w,"display","")}},_onTouchMove:function(e){if(_){t.active||this._dragStarted(),this._appendGhost();var i=e.touches?e.touches[0]:e,n=i.clientX-_.clientX,o=i.clientY-_.clientY,s=e.touches?"translate3d("+n+"px,"+o+"px,0)":"translate("+n+"px,"+o+"px)";F=!0,N=i,a(w,"webkitTransform",s),a(w,"mozTransform",s),a(w,"msTransform",s),a(w,"transform",s),e.preventDefault()}},_appendGhost:function(){if(!w){var t,e=y.getBoundingClientRect(),i=a(y),n=this.options;w=y.cloneNode(!0),r(w,n.ghostClass,!1),r(w,n.fallbackClass,!0),a(w,"top",e.top-j(i.marginTop,10)),a(w,"left",e.left-j(i.marginLeft,10)),a(w,"width",e.width),a(w,"height",e.height),a(w,"opacity","0.8"),a(w,"position","fixed"),a(w,"zIndex","100000"),a(w,"pointerEvents","none"),n.fallbackOnBody&&R.body.appendChild(w)||C.appendChild(w),t=w.getBoundingClientRect(),a(w,"width",2*e.width-t.width),a(w,"height",2*e.height-t.height)}},_onDragStart:function(t,e){var i=t.dataTransfer,n=this.options;this._offUpEvents(),"clone"==I.pull&&(x=y.cloneNode(!0),a(x,"display","none"),C.insertBefore(x,y)),e?("touch"===e?(o(R,"touchmove",this._onTouchMove),o(R,"touchend",this._onDrop),o(R,"touchcancel",this._onDrop)):(o(R,"mousemove",this._onTouchMove),o(R,"mouseup",this._onDrop)),this._loopId=setInterval(this._emulateDragOver,50)):(i&&(i.effectAllowed="move",n.setData&&n.setData.call(this,i,y)),o(R,"drop",this),setTimeout(this._dragStarted,0))},_onDragOver:function(t){var n,o,s,r=this.el,l=this.options,c=l.group,d=c.put,f=I===c,g=l.sort;if(void 0!==t.preventDefault&&(t.preventDefault(),!l.dragoverBubble&&t.stopPropagation()),F=!0,I&&!l.disabled&&(f?g||(s=!C.contains(y)):I.pull&&d&&(I.name===c.name||d.indexOf&&~d.indexOf(I.name)))&&(void 0===t.rootEl||t.rootEl===this.el)){if(V(t,l,this.el),H)return;if(n=i(t.target,l.draggable,r),o=y.getBoundingClientRect(),s)return e(!0),void(x||E?C.insertBefore(y,x||E):g||C.appendChild(y));if(0===r.children.length||r.children[0]===w||r===t.target&&(n=h(r,t))){if(n){if(n.animated)return;v=n.getBoundingClientRect()}e(f),u(C,r,y,o,n,v)!==!1&&(y.contains(r)||(r.appendChild(y),b=r),this._animate(o,y),n&&this._animate(v,n))}else if(n&&!n.animated&&n!==y&&void 0!==n.parentNode[P]){$!==n&&($=n,T=a(n),D=a(n.parentNode));var m,v=n.getBoundingClientRect(),O=v.right-v.left,S=v.bottom-v.top,A=/left|right|inline/.test(T.cssFloat+T.display)||"flex"==D.display&&0===D["flex-direction"].indexOf("row"),k=n.offsetWidth>y.offsetWidth,_=n.offsetHeight>y.offsetHeight,N=(A?(t.clientX-v.left)/O:(t.clientY-v.top)/S)>.5,L=n.nextElementSibling,z=u(C,r,y,o,n,v);if(z!==!1){if(H=!0,setTimeout(p,30),e(f),1===z||-1===z)m=1===z;else if(A){var M=y.offsetTop,R=n.offsetTop;m=M===R?n.previousElementSibling===y&&!k||N&&k:R>M}else m=L!==y&&!_||N&&_;y.contains(r)||(m&&!L?r.appendChild(y):n.parentNode.insertBefore(y,m?L:n)),b=y.parentNode,this._animate(o,y),this._animate(v,n)}}}},_animate:function(t,e){var i=this.options.animation;if(i){var n=e.getBoundingClientRect();a(e,"transition","none"),a(e,"transform","translate3d("+(t.left-n.left)+"px,"+(t.top-n.top)+"px,0)"),e.offsetWidth,a(e,"transition","all "+i+"ms"),a(e,"transform","translate3d(0,0,0)"),clearTimeout(e.animated),e.animated=setTimeout(function(){a(e,"transition",""),a(e,"transform",""),e.animated=!1},i)}},_offUpEvents:function(){var t=this.el.ownerDocument;s(R,"touchmove",this._onTouchMove),s(t,"mouseup",this._onDrop),s(t,"touchend",this._onDrop),s(t,"touchcancel",this._onDrop)},_onDrop:function(e){var i=this.el,n=this.options;clearInterval(this._loopId),clearInterval(L.pid),clearTimeout(this._dragStartTimer),s(R,"mousemove",this._onTouchMove),this.nativeDraggable&&(s(R,"drop",this),s(i,"dragstart",this._onDragStart)),this._offUpEvents(),e&&(F&&(e.preventDefault(),!n.dropBubble&&e.stopPropagation()),w&&w.parentNode.removeChild(w),y&&(this.nativeDraggable&&s(y,"dragend",this),d(y),r(y,this.options.ghostClass,!1),r(y,this.options.chosenClass,!1),C!==b?(k=g(y),k>=0&&(c(null,b,"sort",y,C,A,k),c(this,C,"sort",y,C,A,k),c(null,b,"add",y,C,A,k),c(this,C,"remove",y,C,A,k))):(x&&x.parentNode.removeChild(x),y.nextSibling!==E&&(k=g(y),k>=0&&(c(this,C,"update",y,C,A,k),c(this,C,"sort",y,C,A,k)))),t.active&&((null===k||-1===k)&&(k=A),c(this,C,"end",y,C,A,k),this.save())),C=y=b=w=E=x=O=S=_=N=F=k=$=T=I=t.active=null)},handleEvent:function(t){var e=t.type;"dragover"===e||"dragenter"===e?y&&(this._onDragOver(t),n(t)):("drop"===e||"dragend"===e)&&this._onDrop(t)},toArray:function(){for(var t,e=[],n=this.el.children,o=0,s=n.length,r=this.options;s>o;o++)t=n[o],i(t,r.draggable,this.el)&&e.push(t.getAttribute(r.dataIdAttr)||f(t));return e},sort:function(t){var e={},n=this.el;this.toArray().forEach(function(t,o){var s=n.children[o];i(s,this.options.draggable,n)&&(e[t]=s)},this),t.forEach(function(t){e[t]&&(n.removeChild(e[t]),n.appendChild(e[t]))})},save:function(){var t=this.options.store;t&&t.set(this)},closest:function(t,e){return i(t,e||this.options.draggable,this.el)},option:function(t,e){var i=this.options;return void 0===e?i[t]:(i[t]=e,void("group"===t&&G(i)))},destroy:function(){var t=this.el;t[P]=null,s(t,"mousedown",this._onTapStart),s(t,"touchstart",this._onTapStart),this.nativeDraggable&&(s(t,"dragover",this),s(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),W.splice(W.indexOf(this._onDragOver),1),this._onDrop(),this.el=t=null}},t.utils={on:o,off:s,css:a,find:l,is:function(t,e){return!!i(t,e,t)},extend:v,throttle:m,closest:i,toggleClass:r,index:g},t.create=function(e,i){return new t(e,i)},t.version="1.4.2",t})},217:function(t,e,i){var n,o,s;!function(r,a){o=[i(196),i(218),i(219)],n=a,s="function"==typeof n?n.apply(e,o):n,!(void 0!==s&&(t.exports=s))}(this,function(t,e,i){"use strict";var n=function(t,e){if("string"!=typeof e||e.length){var i="string"==typeof e?new RegExp(e,"i"):e,n=function(t){var e=0;if(3===t.nodeType){var o=t.data.search(i);if(o>=0&&t.data.length>0){var s=t.data.match(i),r=document.createElement("span");r.className="highlight";var a=t.splitText(o),l=(a.splitText(s[0].length),a.cloneNode(!0));r.appendChild(l),a.parentNode.replaceChild(r,a),e=1}}else if(1===t.nodeType&&t.childNodes&&!/(script|style)/i.test(t.tagName))for(var c=0;c /g,">").replace(/"/g,""")},T=function(t){return(t+"").replace(/\$/g,"$$$$")},D={};D.before=function(t,e,i){var n=t[e];t[e]=function(){return i.apply(t,arguments),n.apply(t,arguments)}},D.after=function(t,e,i){var n=t[e];t[e]=function(){var e=n.apply(t,arguments);return i.apply(t,arguments),e}};var A=function(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}},k=function(t,e){var i;return function(){var n=this,o=arguments;window.clearTimeout(i),i=window.setTimeout(function(){t.apply(n,o)},e)}},I=function(t,e,i){var n,o=t.trigger,s={};t.trigger=function(){var i=arguments[0];return-1===e.indexOf(i)?o.apply(t,arguments):void(s[i]=arguments)},i.apply(t,[]),t.trigger=o;for(n in s)s.hasOwnProperty(n)&&o.apply(t,s[n])},_=function(t,e,i,n){t.on(e,i,function(e){for(var i=e.target;i&&i.parentNode!==t[0];)i=i.parentNode;return e.currentTarget=i,n.apply(this,[e])})},N=function(t){var e={};if("selectionStart"in t)e.start=t.selectionStart,e.length=t.selectionEnd-e.start;else if(document.selection){t.focus();var i=document.selection.createRange(),n=document.selection.createRange().text.length;i.moveStart("character",-t.value.length),e.start=i.text.length-n,e.length=n}return e},F=function(t,e,i){var n,o,s={};if(i)for(n=0,o=i.length;o>n;n++)s[i[n]]=t.css(i[n]);else s=t.css();e.css(s)},L=function(e,i){if(!e)return 0;var n=t("").css({position:"absolute",top:-99999,left:-99999,width:"auto",padding:0,whiteSpace:"pre"}).text(e).appendTo("body");F(i,n,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]);var o=n.width();return n.remove(),o},z=function(t){var e=null,i=function(i,n){var o,s,r,a,l,c,u,d;i=i||window.event||{},n=n||{},i.metaKey||i.altKey||(n.force||t.data("grow")!==!1)&&(o=t.val(),i.type&&"keydown"===i.type.toLowerCase()&&(s=i.keyCode,r=s>=97&&122>=s||s>=65&&90>=s||s>=48&&57>=s||32===s,s===m||s===g?(d=N(t[0]),d.length?o=o.substring(0,d.start)+o.substring(d.start+d.length):s===g&&d.start?o=o.substring(0,d.start-1)+o.substring(d.start+1):s===m&&"undefined"!=typeof d.start&&(o=o.substring(0,d.start)+o.substring(d.start+1))):r&&(c=i.shiftKey,u=String.fromCharCode(i.keyCode),u=c?u.toUpperCase():u.toLowerCase(),o+=u)),a=t.attr("placeholder"),!o&&a&&(o=a),l=L(o,t)+4,l!==e&&(e=l,t.width(l),t.triggerHandler("resize")))};t.on("keydown keyup update blur",i),i()},P=function(i,n){var o,s,r,a,l=this;a=i[0],a.selectize=l;var c=window.getComputedStyle&&window.getComputedStyle(a,null);if(r=c?c.getPropertyValue("direction"):a.currentStyle&&a.currentStyle.direction,r=r||i.parents("[dir]:first").attr("dir")||"",t.extend(l,{order:0,settings:n,$input:i,tabIndex:i.attr("tabindex")||"",tagType:"select"===a.tagName.toLowerCase()?x:C,rtl:/rtl/i.test(r),eventNS:".selectize"+ ++P.count,highlightedValue:null,isOpen:!1,isDisabled:!1,isRequired:i.is("[required]"),isInvalid:!1,isLocked:!1,isFocused:!1,isInputHidden:!1,isSetup:!1,isShiftDown:!1,isCmdDown:!1,isCtrlDown:!1,ignoreFocus:!1,ignoreBlur:!1,ignoreHover:!1,hasOptions:!1,currentResults:null,lastValue:"",caretPos:0,loading:0,loadedSearches:{},$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:[],renderCache:{},onSearchChange:null===n.loadThrottle?l.onSearchChange:k(l.onSearchChange,n.loadThrottle)}),l.sifter=new e(this.options,{diacritics:n.diacritics}),l.settings.options){for(o=0,s=l.settings.options.length;s>o;o++)l.registerOption(l.settings.options[o]);delete l.settings.options}if(l.settings.optgroups){for(o=0,s=l.settings.optgroups.length;s>o;o++)l.registerOptionGroup(l.settings.optgroups[o]);delete l.settings.optgroups}l.settings.mode=l.settings.mode||(1===l.settings.maxItems?"single":"multi"),"boolean"!=typeof l.settings.hideSelected&&(l.settings.hideSelected="multi"===l.settings.mode),l.initializePlugins(l.settings.plugins),l.setupCallbacks(),l.setupTemplates(),l.setup()};return o.mixin(P),i.mixin(P),t.extend(P.prototype,{setup:function(){var e,i,n,o,r,a,l,c,u,d=this,p=d.settings,h=d.eventNS,f=t(window),g=t(document),m=d.$input;if(l=d.settings.mode,c=m.attr("class")||"",e=t("").addClass(p.wrapperClass).addClass(c).addClass(l),i=t("
").addClass(p.inputClass).addClass("items").appendTo(e),n=t('
').appendTo(i).attr("tabindex",m.is(":disabled")?"-1":d.tabIndex),a=t(p.dropdownParent||e),o=t("
").addClass(p.dropdownClass).addClass(l).hide().appendTo(a),r=t("
").addClass(p.dropdownContentClass).appendTo(o),d.settings.copyClassesToDropdown&&o.addClass(c),e.css({width:m[0].style.width}),d.plugins.names.length&&(u="plugin-"+d.plugins.names.join(" plugin-"),e.addClass(u),o.addClass(u)),(null===p.maxItems||p.maxItems>1)&&d.tagType===x&&m.attr("multiple","multiple"),d.settings.placeholder&&n.attr("placeholder",p.placeholder),!d.settings.splitOn&&d.settings.delimiter){var w=d.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");d.settings.splitOn=new RegExp("\\s*"+w+"+\\s*")}m.attr("autocorrect")&&n.attr("autocorrect",m.attr("autocorrect")),m.attr("autocapitalize")&&n.attr("autocapitalize",m.attr("autocapitalize")),d.$wrapper=e,d.$control=i,d.$control_input=n,d.$dropdown=o,d.$dropdown_content=r,o.on("mouseenter","[data-selectable]",function(){return d.onOptionHover.apply(d,arguments)}),o.on("mousedown click","[data-selectable]",function(){return d.onOptionSelect.apply(d,arguments)}),_(i,"mousedown","*:not(input)",function(){return d.onItemSelect.apply(d,arguments)}),z(n),i.on({mousedown:function(){return d.onMouseDown.apply(d,arguments)},click:function(){return d.onClick.apply(d,arguments)}}),n.on({mousedown:function(t){t.stopPropagation()},keydown:function(){return d.onKeyDown.apply(d,arguments)},keyup:function(){return d.onKeyUp.apply(d,arguments)},keypress:function(){return d.onKeyPress.apply(d,arguments)},resize:function(){d.positionDropdown.apply(d,[])},blur:function(){return d.onBlur.apply(d,arguments)},focus:function(){return d.ignoreBlur=!1,d.onFocus.apply(d,arguments)},paste:function(){return d.onPaste.apply(d,arguments)}}),g.on("keydown"+h,function(t){d.isCmdDown=t[s?"metaKey":"ctrlKey"],d.isCtrlDown=t[s?"altKey":"ctrlKey"],d.isShiftDown=t.shiftKey}),g.on("keyup"+h,function(t){t.keyCode===b&&(d.isCtrlDown=!1),t.keyCode===v&&(d.isShiftDown=!1),t.keyCode===y&&(d.isCmdDown=!1)}),g.on("mousedown"+h,function(t){if(d.isFocused){if(t.target===d.$dropdown[0]||t.target.parentNode===d.$dropdown[0])return!1;d.$control.has(t.target).length||t.target===d.$control[0]||d.blur(t.target)}}),f.on(["scroll"+h,"resize"+h].join(" "),function(){d.isOpen&&d.positionDropdown.apply(d,arguments)}),f.on("mousemove"+h,function(){d.ignoreHover=!1}),this.revertSettings={$children:m.children().detach(),tabindex:m.attr("tabindex")},m.attr("tabindex",-1).hide().after(d.$wrapper),t.isArray(p.items)&&(d.setValue(p.items),delete p.items),E&&m.on("invalid"+h,function(t){t.preventDefault(),d.isInvalid=!0,d.refreshState()}),d.updateOriginalInput(),d.refreshItems(),d.refreshState(),d.updatePlaceholder(),d.isSetup=!0,m.is(":disabled")&&d.disable(),d.on("change",this.onChange),m.data("selectize",d),m.addClass("selectized"),d.trigger("initialize"),p.preload===!0&&d.onSearchChange("")},setupTemplates:function(){var e=this,i=e.settings.labelField,n=e.settings.optgroupLabelField,o={optgroup:function(t){return'
'+t.html+"
"},optgroup_header:function(t,e){return'"},option:function(t,e){return'
'+e(t[i])+"
"},item:function(t,e){return'
'+e(t[i])+"
"},option_create:function(t,e){return'
Add '+e(t.input)+" …
"}};e.settings.render=t.extend({},o,e.settings.render)},setupCallbacks:function(){var t,e,i={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(t in i)i.hasOwnProperty(t)&&(e=this.settings[i[t]],e&&this.on(t,e))},onClick:function(t){var e=this;e.isFocused||(e.focus(),t.preventDefault())},onMouseDown:function(e){var i=this,n=e.isDefaultPrevented();t(e.target);if(i.isFocused){if(e.target!==i.$control_input[0])return"single"===i.settings.mode?i.isOpen?i.close():i.open():n||i.setActiveItem(null),!1}else n||window.setTimeout(function(){i.focus()},0)},onChange:function(){this.$input.trigger("change")},onPaste:function(e){var i=this;i.isFull()||i.isInputHidden||i.isLocked?e.preventDefault():i.settings.splitOn&&setTimeout(function(){for(var e=t.trim(i.$control_input.val()||"").split(i.settings.splitOn),n=0,o=e.length;o>n;n++)i.createItem(e[n])},0)},onKeyPress:function(t){if(this.isLocked)return t&&t.preventDefault();var e=String.fromCharCode(t.keyCode||t.which);return this.settings.create&&"multi"===this.settings.mode&&e===this.settings.delimiter?(this.createItem(),t.preventDefault(),!1):void 0},onKeyDown:function(t){var e=(t.target===this.$control_input[0],this);if(e.isLocked)return void(t.keyCode!==w&&t.preventDefault());switch(t.keyCode){case r:if(e.isCmdDown)return void e.selectAll();break;case l:return void(e.isOpen&&(t.preventDefault(),t.stopPropagation(),e.close()));case f:if(!t.ctrlKey||t.altKey)break;case h:if(!e.isOpen&&e.hasOptions)e.open();else if(e.$activeOption){e.ignoreHover=!0;var i=e.getAdjacentOption(e.$activeOption,1);i.length&&e.setActiveOption(i,!0,!0)}return void t.preventDefault();case d:if(!t.ctrlKey||t.altKey)break;case u:if(e.$activeOption){e.ignoreHover=!0;var n=e.getAdjacentOption(e.$activeOption,-1);n.length&&e.setActiveOption(n,!0,!0)}return void t.preventDefault();case a:return void(e.isOpen&&e.$activeOption&&(e.onOptionSelect({currentTarget:e.$activeOption}),t.preventDefault()));case c:return void e.advanceSelection(-1,t);case p:return void e.advanceSelection(1,t);case w:return e.settings.selectOnTab&&e.isOpen&&e.$activeOption&&(e.onOptionSelect({currentTarget:e.$activeOption}),e.isFull()||t.preventDefault()),void(e.settings.create&&e.createItem()&&t.preventDefault());case g:case m:return void e.deleteSelection(t)}return!e.isFull()&&!e.isInputHidden||(s?t.metaKey:t.ctrlKey)?void 0:void t.preventDefault()},onKeyUp:function(t){var e=this;if(e.isLocked)return t&&t.preventDefault();var i=e.$control_input.val()||"";e.lastValue!==i&&(e.lastValue=i,e.onSearchChange(i),e.refreshOptions(),e.trigger("type",i))},onSearchChange:function(t){var e=this,i=e.settings.load;i&&(e.loadedSearches.hasOwnProperty(t)||(e.loadedSearches[t]=!0,e.load(function(n){i.apply(e,[t,n])})))},onFocus:function(t){var e=this,i=e.isFocused;return e.isDisabled?(e.blur(),t&&t.preventDefault(),!1):void(e.ignoreFocus||(e.isFocused=!0,"focus"===e.settings.preload&&e.onSearchChange(""),i||e.trigger("focus"),e.$activeItems.length||(e.showInput(),e.setActiveItem(null),e.refreshOptions(!!e.settings.openOnFocus)),e.refreshState()))},onBlur:function(t,e){var i=this;if(i.isFocused&&(i.isFocused=!1,!i.ignoreFocus)){if(!i.ignoreBlur&&document.activeElement===i.$dropdown_content[0])return i.ignoreBlur=!0,void i.onFocus(t);var n=function(){i.close(),i.setTextboxValue(""),i.setActiveItem(null),i.setActiveOption(null),i.setCaret(i.items.length),i.refreshState(),(e||document.body).focus(),i.ignoreFocus=!1,i.trigger("blur")};i.ignoreFocus=!0,i.settings.create&&i.settings.createOnBlur?i.createItem(null,!1,n):n()}},onOptionHover:function(t){this.ignoreHover||this.setActiveOption(t.currentTarget,!1)},onOptionSelect:function(e){var i,n,o=this;e.preventDefault&&(e.preventDefault(),e.stopPropagation()),n=t(e.currentTarget),n.hasClass("create")?o.createItem(null,function(){o.settings.closeAfterSelect&&o.close()}):(i=n.attr("data-value"),"undefined"!=typeof i&&(o.lastQuery=null,o.setTextboxValue(""),o.addItem(i),o.settings.closeAfterSelect?o.close():!o.settings.hideSelected&&e.type&&/mouse/.test(e.type)&&o.setActiveOption(o.getOption(i))))},onItemSelect:function(t){var e=this;e.isLocked||"multi"===e.settings.mode&&(t.preventDefault(),e.setActiveItem(t.currentTarget,t))},load:function(t){var e=this,i=e.$wrapper.addClass(e.settings.loadingClass);e.loading++,t.apply(e,[function(t){e.loading=Math.max(e.loading-1,0),t&&t.length&&(e.addOption(t),e.refreshOptions(e.isFocused&&!e.isInputHidden)),e.loading||i.removeClass(e.settings.loadingClass),e.trigger("load",t)}])},setTextboxValue:function(t){var e=this.$control_input,i=e.val()!==t;i&&(e.val(t).triggerHandler("update"),this.lastValue=t)},getValue:function(){return this.tagType===x&&this.$input.attr("multiple")?this.items:this.items.join(this.settings.delimiter)},setValue:function(t,e){var i=e?[]:["change"];I(this,i,function(){this.clear(e),this.addItems(t,e)})},setActiveItem:function(e,i){var n,o,s,r,a,l,c,u,d=this;if("single"!==d.settings.mode){if(e=t(e),!e.length)return t(d.$activeItems).removeClass("active"),d.$activeItems=[],void(d.isFocused&&d.showInput());if(n=i&&i.type.toLowerCase(),"mousedown"===n&&d.isShiftDown&&d.$activeItems.length){for(u=d.$control.children(".active:last"),r=Array.prototype.indexOf.apply(d.$control[0].childNodes,[u[0]]),a=Array.prototype.indexOf.apply(d.$control[0].childNodes,[e[0]]),r>a&&(c=r,r=a,a=c),o=r;a>=o;o++)l=d.$control[0].childNodes[o],-1===d.$activeItems.indexOf(l)&&(t(l).addClass("active"),d.$activeItems.push(l));i.preventDefault()}else"mousedown"===n&&d.isCtrlDown||"keydown"===n&&this.isShiftDown?e.hasClass("active")?(s=d.$activeItems.indexOf(e[0]),d.$activeItems.splice(s,1),e.removeClass("active")):d.$activeItems.push(e.addClass("active")[0]):(t(d.$activeItems).removeClass("active"),d.$activeItems=[e.addClass("active")[0]]);d.hideInput(),this.isFocused||d.focus()}},setActiveOption:function(e,i,n){var o,s,r,a,l,c=this;c.$activeOption&&c.$activeOption.removeClass("active"),c.$activeOption=null,e=t(e),e.length&&(c.$activeOption=e.addClass("active"),(i||!O(i))&&(o=c.$dropdown_content.height(),s=c.$activeOption.outerHeight(!0),i=c.$dropdown_content.scrollTop()||0,r=c.$activeOption.offset().top-c.$dropdown_content.offset().top+i,a=r,l=r-o+s,r+s>o+i?c.$dropdown_content.stop().animate({scrollTop:l},n?c.settings.scrollDuration:0):i>r&&c.$dropdown_content.stop().animate({scrollTop:a},n?c.settings.scrollDuration:0)))},selectAll:function(){var t=this;"single"!==t.settings.mode&&(t.$activeItems=Array.prototype.slice.apply(t.$control.children(":not(input)").addClass("active")),t.$activeItems.length&&(t.hideInput(),t.close()),t.focus())},hideInput:function(){var t=this;t.setTextboxValue(""),t.$control_input.css({opacity:0,position:"absolute",left:t.rtl?1e4:-1e4}),t.isInputHidden=!0},showInput:function(){this.$control_input.css({opacity:1,position:"relative",left:0}),this.isInputHidden=!1},focus:function(){var t=this;t.isDisabled||(t.ignoreFocus=!0,t.$control_input[0].focus(),window.setTimeout(function(){t.ignoreFocus=!1,t.onFocus()},0))},blur:function(t){this.$control_input[0].blur(),this.onBlur(null,t)},getScoreFunction:function(t){return this.sifter.getScoreFunction(t,this.getSearchOptions())},getSearchOptions:function(){var t=this.settings,e=t.sortField;return"string"==typeof e&&(e=[{field:e}]),{fields:t.searchField,conjunction:t.searchConjunction,sort:e}},search:function(e){var i,n,o,s=this,r=s.settings,a=this.getSearchOptions();if(r.score&&(o=s.settings.score.apply(this,[e]),"function"!=typeof o))throw new Error('Selectize "score" setting must be a function that returns a function');if(e!==s.lastQuery?(s.lastQuery=e,n=s.sifter.search(e,t.extend(a,{score:o})),s.currentResults=n):n=t.extend(!0,{},s.currentResults),r.hideSelected)for(i=n.items.length-1;i>=0;i--)-1!==s.items.indexOf(S(n.items[i].id))&&n.items.splice(i,1);return n},refreshOptions:function(e){var i,o,s,r,a,l,c,u,d,p,h,f,g,m,v,y;"undefined"==typeof e&&(e=!0);var b=this,w=t.trim(b.$control_input.val()),x=b.search(w),C=b.$dropdown_content,E=b.$activeOption&&S(b.$activeOption.attr("data-value"));for(r=x.items.length,"number"==typeof b.settings.maxOptions&&(r=Math.min(r,b.settings.maxOptions)),a={},l=[],i=0;r>i;i++)for(c=b.options[x.items[i].id],u=b.render("option",c),d=c[b.settings.optgroupField]||"",p=t.isArray(d)?d:[d],o=0,s=p&&p.length;s>o;o++)d=p[o],b.optgroups.hasOwnProperty(d)||(d=""),a.hasOwnProperty(d)||(a[d]=[],l.push(d)),a[d].push(u);for(this.settings.lockOptgroupOrder&&l.sort(function(t,e){var i=b.optgroups[t].$order||0,n=b.optgroups[e].$order||0;return i-n}),h=[],i=0,r=l.length;r>i;i++)d=l[i],b.optgroups.hasOwnProperty(d)&&a[d].length?(f=b.render("optgroup_header",b.optgroups[d])||"",f+=a[d].join(""),h.push(b.render("optgroup",t.extend({},b.optgroups[d],{html:f})))):h.push(a[d].join(""));if(C.html(h.join("")),b.settings.highlight&&x.query.length&&x.tokens.length)for(i=0,r=x.tokens.length;r>i;i++)n(C,x.tokens[i].regex);if(!b.settings.hideSelected)for(i=0,r=b.items.length;r>i;i++)b.getOption(b.items[i]).addClass("selected");g=b.canCreate(w),g&&(C.prepend(b.render("option_create",{input:w})),y=t(C[0].childNodes[0])),b.hasOptions=x.items.length>0||g,b.hasOptions?(x.items.length>0?(v=E&&b.getOption(E),v&&v.length?m=v:"single"===b.settings.mode&&b.items.length&&(m=b.getOption(b.items[0])),m&&m.length||(m=y&&!b.settings.addPrecedence?b.getAdjacentOption(y,1):C.find("[data-selectable]:first"))):m=y,b.setActiveOption(m),e&&!b.isOpen&&b.open()):(b.setActiveOption(null),e&&b.isOpen&&b.close())},addOption:function(e){var i,n,o,s=this;if(t.isArray(e))for(i=0,n=e.length;n>i;i++)s.addOption(e[i]);else(o=s.registerOption(e))&&(s.userOptions[o]=!0,s.lastQuery=null,s.trigger("option_add",o,e))},registerOption:function(t){
+var e=S(t[this.settings.valueField]);return!e||this.options.hasOwnProperty(e)?!1:(t.$order=t.$order||++this.order,this.options[e]=t,e)},registerOptionGroup:function(t){var e=S(t[this.settings.optgroupValueField]);return e?(t.$order=t.$order||++this.order,this.optgroups[e]=t,e):!1},addOptionGroup:function(t,e){e[this.settings.optgroupValueField]=t,(t=this.registerOptionGroup(e))&&this.trigger("optgroup_add",t,e)},removeOptionGroup:function(t){this.optgroups.hasOwnProperty(t)&&(delete this.optgroups[t],this.renderCache={},this.trigger("optgroup_remove",t))},clearOptionGroups:function(){this.optgroups={},this.renderCache={},this.trigger("optgroup_clear")},updateOption:function(e,i){var n,o,s,r,a,l,c,u=this;if(e=S(e),s=S(i[u.settings.valueField]),null!==e&&u.options.hasOwnProperty(e)){if("string"!=typeof s)throw new Error("Value must be set in option data");c=u.options[e].$order,s!==e&&(delete u.options[e],r=u.items.indexOf(e),-1!==r&&u.items.splice(r,1,s)),i.$order=i.$order||c,u.options[s]=i,a=u.renderCache.item,l=u.renderCache.option,a&&(delete a[e],delete a[s]),l&&(delete l[e],delete l[s]),-1!==u.items.indexOf(s)&&(n=u.getItem(e),o=t(u.render("item",i)),n.hasClass("active")&&o.addClass("active"),n.replaceWith(o)),u.lastQuery=null,u.isOpen&&u.refreshOptions(!1)}},removeOption:function(t,e){var i=this;t=S(t);var n=i.renderCache.item,o=i.renderCache.option;n&&delete n[t],o&&delete o[t],delete i.userOptions[t],delete i.options[t],i.lastQuery=null,i.trigger("option_remove",t),i.removeItem(t,e)},clearOptions:function(){var t=this;t.loadedSearches={},t.userOptions={},t.renderCache={},t.options=t.sifter.items={},t.lastQuery=null,t.trigger("option_clear"),t.clear()},getOption:function(t){return this.getElementWithValue(t,this.$dropdown_content.find("[data-selectable]"))},getAdjacentOption:function(e,i){var n=this.$dropdown.find("[data-selectable]"),o=n.index(e)+i;return o>=0&&o
n;n++)if(i[n].getAttribute("data-value")===e)return t(i[n]);return t()},getItem:function(t){return this.getElementWithValue(t,this.$control.children())},addItems:function(e,i){for(var n=t.isArray(e)?e:[e],o=0,s=n.length;s>o;o++)this.isPending=s-1>o,this.addItem(n[o],i)},addItem:function(e,i){var n=i?[]:["change"];I(this,n,function(){var n,o,s,r,a,l=this,c=l.settings.mode;return e=S(e),-1!==l.items.indexOf(e)?void("single"===c&&l.close()):void(l.options.hasOwnProperty(e)&&("single"===c&&l.clear(i),"multi"===c&&l.isFull()||(n=t(l.render("item",l.options[e])),a=l.isFull(),l.items.splice(l.caretPos,0,e),l.insertAtCaret(n),(!l.isPending||!a&&l.isFull())&&l.refreshState(),l.isSetup&&(s=l.$dropdown_content.find("[data-selectable]"),l.isPending||(o=l.getOption(e),r=l.getAdjacentOption(o,1).attr("data-value"),l.refreshOptions(l.isFocused&&"single"!==c),r&&l.setActiveOption(l.getOption(r))),!s.length||l.isFull()?l.close():l.positionDropdown(),l.updatePlaceholder(),l.trigger("item_add",e,n),l.updateOriginalInput({silent:i})))))})},removeItem:function(t,e){var i,n,o,s=this;i="object"==typeof t?t:s.getItem(t),t=S(i.attr("data-value")),n=s.items.indexOf(t),-1!==n&&(i.remove(),i.hasClass("active")&&(o=s.$activeItems.indexOf(i[0]),s.$activeItems.splice(o,1)),s.items.splice(n,1),s.lastQuery=null,!s.settings.persist&&s.userOptions.hasOwnProperty(t)&&s.removeOption(t,e),n0),e.$control_input.data("grow",!i&&!n)},isFull:function(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems},updateOriginalInput:function(t){var e,i,n,o,s=this;if(t=t||{},s.tagType===x){for(n=[],e=0,i=s.items.length;i>e;e++)o=s.options[s.items[e]][s.settings.labelField]||"",n.push(''+$(o)+" ");n.length||this.$input.attr("multiple")||n.push(' '),s.$input.html(n.join(""))}else s.$input.val(s.getValue()),s.$input.attr("value",s.$input.val());s.isSetup&&(t.silent||s.trigger("change",s.$input.val()))},updatePlaceholder:function(){if(this.settings.placeholder){var t=this.$control_input;this.items.length?t.removeAttr("placeholder"):t.attr("placeholder",this.settings.placeholder),t.triggerHandler("update",{force:!0})}},open:function(){var t=this;t.isLocked||t.isOpen||"multi"===t.settings.mode&&t.isFull()||(t.focus(),t.isOpen=!0,t.refreshState(),t.$dropdown.css({visibility:"hidden",display:"block"}),t.positionDropdown(),t.$dropdown.css({visibility:"visible"}),t.trigger("dropdown_open",t.$dropdown))},close:function(){var t=this,e=t.isOpen;"single"===t.settings.mode&&t.items.length&&t.hideInput(),t.isOpen=!1,t.$dropdown.hide(),t.setActiveOption(null),t.refreshState(),e&&t.trigger("dropdown_close",t.$dropdown)},positionDropdown:function(){var t=this.$control,e="body"===this.settings.dropdownParent?t.offset():t.position();e.top+=t.outerHeight(!0),this.$dropdown.css({width:t.outerWidth(),top:e.top,left:e.left})},clear:function(t){var e=this;e.items.length&&(e.$control.children(":not(input)").remove(),e.items=[],e.lastQuery=null,e.setCaret(0),e.setActiveItem(null),e.updatePlaceholder(),e.updateOriginalInput({silent:t}),e.refreshState(),e.showInput(),e.trigger("clear"))},insertAtCaret:function(e){var i=Math.min(this.caretPos,this.items.length);0===i?this.$control.prepend(e):t(this.$control[0].childNodes[i]).before(e),this.setCaret(i+1)},deleteSelection:function(e){var i,n,o,s,r,a,l,c,u,d=this;if(o=e&&e.keyCode===g?-1:1,s=N(d.$control_input[0]),d.$activeOption&&!d.settings.hideSelected&&(l=d.getAdjacentOption(d.$activeOption,-1).attr("data-value")),r=[],d.$activeItems.length){for(u=d.$control.children(".active:"+(o>0?"last":"first")),a=d.$control.children(":not(input)").index(u),o>0&&a++,i=0,n=d.$activeItems.length;n>i;i++)r.push(t(d.$activeItems[i]).attr("data-value"));e&&(e.preventDefault(),e.stopPropagation())}else(d.isFocused||"single"===d.settings.mode)&&d.items.length&&(0>o&&0===s.start&&0===s.length?r.push(d.items[d.caretPos-1]):o>0&&s.start===d.$control_input.val().length&&r.push(d.items[d.caretPos]));if(!r.length||"function"==typeof d.settings.onDelete&&d.settings.onDelete.apply(d,[r])===!1)return!1;for("undefined"!=typeof a&&d.setCaret(a);r.length;)d.removeItem(r.pop());return d.showInput(),d.positionDropdown(),d.refreshOptions(!0),l&&(c=d.getOption(l),c.length&&d.setActiveOption(c)),!0},advanceSelection:function(t,e){var i,n,o,s,r,a,l=this;0!==t&&(l.rtl&&(t*=-1),i=t>0?"last":"first",n=N(l.$control_input[0]),l.isFocused&&!l.isInputHidden?(s=l.$control_input.val().length,r=0>t?0===n.start&&0===n.length:n.start===s,r&&!s&&l.advanceCaret(t,e)):(a=l.$control.children(".active:"+i),a.length&&(o=l.$control.children(":not(input)").index(a),l.setActiveItem(null),l.setCaret(t>0?o+1:o))))},advanceCaret:function(t,e){var i,n,o=this;0!==t&&(i=t>0?"next":"prev",o.isShiftDown?(n=o.$control_input[i](),n.length&&(o.hideInput(),o.setActiveItem(n),e&&e.preventDefault())):o.setCaret(o.caretPos+t))},setCaret:function(e){var i=this;if(e="single"===i.settings.mode?i.items.length:Math.max(0,Math.min(i.items.length,e)),!i.isPending){var n,o,s,r;for(s=i.$control.children(":not(input)"),n=0,o=s.length;o>n;n++)r=t(s[n]).detach(),e>n?i.$control_input.before(r):i.$control.append(r)}i.caretPos=e},lock:function(){this.close(),this.isLocked=!0,this.refreshState()},unlock:function(){this.isLocked=!1,this.refreshState()},disable:function(){var t=this;t.$input.prop("disabled",!0),t.$control_input.prop("disabled",!0).prop("tabindex",-1),t.isDisabled=!0,t.lock()},enable:function(){var t=this;t.$input.prop("disabled",!1),t.$control_input.prop("disabled",!1).prop("tabindex",t.tabIndex),t.isDisabled=!1,t.unlock()},destroy:function(){var e=this,i=e.eventNS,n=e.revertSettings;e.trigger("destroy"),e.off(),e.$wrapper.remove(),e.$dropdown.remove(),e.$input.html("").append(n.$children).removeAttr("tabindex").removeClass("selectized").attr({tabindex:n.tabindex}).show(),e.$control_input.removeData("grow"),e.$input.removeData("selectize"),t(window).off(i),t(document).off(i),t(document.body).off(i),delete e.$input[0].selectize},render:function(t,e){var i,n,o="",s=!1,r=this,a=/^[\t \r\n]*<([a-z][a-z0-9\-_]*(?:\:[a-z][a-z0-9\-_]*)?)/i;return("option"===t||"item"===t)&&(i=S(e[r.settings.valueField]),s=!!i),s&&(O(r.renderCache[t])||(r.renderCache[t]={}),r.renderCache[t].hasOwnProperty(i))?r.renderCache[t][i]:(o=r.settings.render[t].apply(this,[e,$]),("option"===t||"option_create"===t)&&(o=o.replace(a,"<$1 data-selectable")),"optgroup"===t&&(n=e[r.settings.optgroupValueField]||"",o=o.replace(a,'<$1 data-group="'+T($(n))+'"')),("option"===t||"item"===t)&&(o=o.replace(a,'<$1 data-value="'+T($(i||""))+'"')),s&&(r.renderCache[t][i]=o),o)},clearCache:function(t){var e=this;"undefined"==typeof t?e.renderCache={}:delete e.renderCache[t]},canCreate:function(t){var e=this;if(!e.settings.create)return!1;var i=e.settings.createFilter;return t.length&&("function"!=typeof i||i.apply(e,[t]))&&("string"!=typeof i||new RegExp(i).test(t))&&(!(i instanceof RegExp)||i.test(t))}}),P.count=0,P.defaults={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:!1,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,maxOptions:1e3,maxItems:null,hideSelected:null,addPrecedence:!1,selectOnTab:!1,preload:!1,allowEmptyOption:!1,closeAfterSelect:!1,scrollDuration:60,loadThrottle:300,loadingClass:"loading",dataAttr:"data-data",optgroupField:"optgroup",valueField:"value",labelField:"text",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"selectize-control",inputClass:"selectize-input",dropdownClass:"selectize-dropdown",dropdownContentClass:"selectize-dropdown-content",dropdownParent:null,copyClassesToDropdown:!0,render:{}},t.fn.selectize=function(e){var i=t.fn.selectize.defaults,n=t.extend({},i,e),o=n.dataAttr,s=n.labelField,r=n.valueField,a=n.optgroupField,l=n.optgroupLabelField,c=n.optgroupValueField,u=function(e,i){var a,l,c,u,d=e.attr(o);if(d)for(i.options=JSON.parse(d),a=0,l=i.options.length;l>a;a++)i.items.push(i.options[a][r]);else{var p=t.trim(e.val()||"");if(!n.allowEmptyOption&&!p.length)return;for(c=p.split(n.delimiter),a=0,l=c.length;l>a;a++)u={},u[s]=c[a],u[r]=c[a],i.options.push(u);i.items=c}},d=function(e,i){var u,d,p,h,f=i.options,g={},m=function(t){var e=o&&t.attr(o);return"string"==typeof e&&e.length?JSON.parse(e):null},v=function(e,o){e=t(e);var l=S(e.attr("value"));if(l||n.allowEmptyOption)if(g.hasOwnProperty(l)){if(o){var c=g[l][a];c?t.isArray(c)?c.push(o):g[l][a]=[c,o]:g[l][a]=o}}else{var u=m(e)||{};u[s]=u[s]||e.text(),u[r]=u[r]||l,u[a]=u[a]||o,g[l]=u,f.push(u),e.is(":selected")&&i.items.push(l)}},y=function(e){var n,o,s,r,a;for(e=t(e),s=e.attr("label"),s&&(r=m(e)||{},r[l]=s,r[c]=s,i.optgroups.push(r)),a=t("option",e),n=0,o=a.length;o>n;n++)v(a[n],s)};for(i.maxItems=e.attr("multiple")?null:1,h=e.children(),u=0,d=h.length;d>u;u++)p=h[u].tagName.toLowerCase(),"optgroup"===p?y(h[u]):"option"===p&&v(h[u])};return this.each(function(){if(!this.selectize){var o,s=t(this),r=this.tagName.toLowerCase(),a=s.attr("placeholder")||s.attr("data-placeholder");a||n.allowEmptyOption||(a=s.children('option[value=""]').text());var l={placeholder:a,options:[],optgroups:[],items:[]};"select"===r?d(s,l):u(s,l),o=new P(s,t.extend(!0,{},i,l,e))}})},t.fn.selectize.defaults=P.defaults,t.fn.selectize.support={validity:E},P.define("drag_drop",function(e){if(!t.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');if("multi"===this.settings.mode){var i=this;i.lock=function(){var t=i.lock;return function(){var e=i.$control.data("sortable");return e&&e.disable(),t.apply(i,arguments)}}(),i.unlock=function(){var t=i.unlock;return function(){var e=i.$control.data("sortable");return e&&e.enable(),t.apply(i,arguments)}}(),i.setup=function(){var e=i.setup;return function(){e.apply(this,arguments);var n=i.$control.sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:i.isLocked,start:function(t,e){e.placeholder.css("width",e.helper.css("width")),n.css({overflow:"visible"})},stop:function(){n.css({overflow:"hidden"});var e=i.$activeItems?i.$activeItems.slice():null,o=[];n.children("[data-value]").each(function(){o.push(t(this).attr("data-value"))}),i.setValue(o),i.setActiveItem(e)}})}}()}}),P.define("dropdown_header",function(e){var i=this;e=t.extend({title:"Untitled",headerClass:"selectize-dropdown-header",titleRowClass:"selectize-dropdown-header-title",labelClass:"selectize-dropdown-header-label",closeClass:"selectize-dropdown-header-close",html:function(t){return''}},e),i.setup=function(){var n=i.setup;return function(){n.apply(i,arguments),i.$dropdown_header=t(e.html(e)),i.$dropdown.prepend(i.$dropdown_header)}}()}),P.define("optgroup_columns",function(e){var i=this;e=t.extend({equalizeWidth:!0,equalizeHeight:!0},e),this.getAdjacentOption=function(e,i){var n=e.closest("[data-group]").find("[data-selectable]"),o=n.index(e)+i;return o>=0&&o
',t=t.firstChild,i.body.appendChild(t),e=n.width=t.offsetWidth-t.clientWidth,i.body.removeChild(t)),e},o=function(){var o,s,r,a,l,c,u;if(u=t("[data-group]",i.$dropdown_content),s=u.length,s&&i.$dropdown_content.width()){if(e.equalizeHeight){for(r=0,o=0;s>o;o++)r=Math.max(r,u.eq(o).height());u.css({height:r})}e.equalizeWidth&&(c=i.$dropdown_content.innerWidth()-n(),a=Math.round(c/s),u.css({width:a}),s>1&&(l=c-a*(s-1),u.eq(s-1).css({width:l})))}};(e.equalizeHeight||e.equalizeWidth)&&(D.after(this,"positionDropdown",o),D.after(this,"refreshOptions",o))}),P.define("remove_button",function(e){if("single"!==this.settings.mode){e=t.extend({label:"×",title:"Remove",className:"remove",append:!0},e);var i=this,n='
'+e.label+" ",o=function(t,e){var i=t.search(/(<\/[^>]+>\s*)$/);return t.substring(0,i)+e+t.substring(i)};this.setup=function(){var s=i.setup;return function(){if(e.append){var r=i.settings.render.item;i.settings.render.item=function(t){return o(r.apply(this,arguments),n)}}s.apply(this,arguments),this.$control.on("click","."+e.className,function(e){if(e.preventDefault(),!i.isLocked){var n=t(e.currentTarget).parent();i.setActiveItem(n),i.deleteSelection()&&i.setCaret(i.items.length)}})}}()}}),P.define("restore_on_backspace",function(t){var e=this;t.text=t.text||function(t){return t[this.settings.labelField]},this.onKeyDown=function(){var i=e.onKeyDown;return function(e){var n,o;return e.keyCode===g&&""===this.$control_input.val()&&!this.$activeItems.length&&(n=this.caretPos-1,n>=0&&n
e;e++){if(s=o(c[e]),this.settings.diacritics)for(a in r)r.hasOwnProperty(a)&&(s=s.replace(new RegExp(a,"g"),r[a]));l.push({string:c[e],regex:new RegExp(s,"i")})}return l},t.prototype.iterator=function(t,e){var i;i=s(t)?Array.prototype.forEach||function(t){for(var e=0,i=this.length;i>e;e++)t(this[e],e,this)}:function(t){for(var e in this)this.hasOwnProperty(e)&&t(this[e],e,this)},i.apply(t,[e])},t.prototype.getScoreFunction=function(t,e){var i,n,o,s;i=this,t=i.prepareSearch(t,e),o=t.tokens,n=t.options.fields,s=o.length;var r=function(t,e){var i,n;return t?(t=String(t||""),n=t.search(e.regex),-1===n?0:(i=e.string.length/t.length,0===n&&(i+=.5),i)):0},a=function(){var t=n.length;return t?1===t?function(t,e){return r(e[n[0]],t)}:function(e,i){for(var o=0,s=0;t>o;o++)s+=r(i[n[o]],e);return s/t}:function(){return 0}}();return s?1===s?function(t){return a(o[0],t)}:"and"===t.options.conjunction?function(t){for(var e,i=0,n=0;s>i;i++){if(e=a(o[i],t),0>=e)return 0;n+=e}return n/s}:function(t){for(var e=0,i=0;s>e;e++)i+=a(o[e],t);return i/s}:function(){return 0}},t.prototype.getSortFunction=function(t,i){var n,o,s,r,a,l,c,u,d,p,h;if(s=this,t=s.prepareSearch(t,i),h=!t.query&&i.sort_empty||i.sort,d=function(t,e){return"$score"===t?e.score:s.items[e.id][t]},a=[],h)for(n=0,o=h.length;o>n;n++)(t.query||"$score"!==h[n].field)&&a.push(h[n]);if(t.query){for(p=!0,n=0,o=a.length;o>n;n++)if("$score"===a[n].field){p=!1;break}p&&a.unshift({field:"$score",direction:"desc"})}else for(n=0,o=a.length;o>n;n++)if("$score"===a[n].field){a.splice(n,1);break}for(u=[],n=0,o=a.length;o>n;n++)u.push("desc"===a[n].direction?-1:1);return l=a.length,l?1===l?(r=a[0].field,c=u[0],function(t,i){return c*e(d(r,t),d(r,i))}):function(t,i){var n,o,s;for(n=0;l>n;n++)if(s=a[n].field,o=u[n]*e(d(s,t),d(s,i)))return o;return 0}:null},t.prototype.prepareSearch=function(t,e){if("object"==typeof t)return t;e=i({},e);var n=e.fields,o=e.sort,r=e.sort_empty;return n&&!s(n)&&(e.fields=[n]),o&&!s(o)&&(e.sort=[o]),r&&!s(r)&&(e.sort_empty=[r]),{options:e,query:String(t||"").toLowerCase(),tokens:this.tokenize(t),total:0,items:[]}},t.prototype.search=function(t,e){var i,n,o,s,r=this;return n=this.prepareSearch(t,e),e=n.options,t=n.query,s=e.score||r.getScoreFunction(n),t.length?r.iterator(r.items,function(t,o){i=s(t),(e.filter===!1||i>0)&&n.items.push({score:i,id:o})}):r.iterator(r.items,function(t,e){n.items.push({score:1,id:e})}),o=r.getSortFunction(n,e),o&&n.items.sort(o),n.total=n.items.length,"number"==typeof e.limit&&(n.items=n.items.slice(0,e.limit)),n};var e=function(t,e){return"number"==typeof t&&"number"==typeof e?t>e?1:e>t?-1:0:(t=a(String(t||"")),e=a(String(e||"")),t>e?1:e>t?-1:0)},i=function(t,e){var i,n,o,s;for(i=1,n=arguments.length;n>i;i++)if(s=arguments[i])for(o in s)s.hasOwnProperty(o)&&(t[o]=s[o]);return t},n=function(t){return(t+"").replace(/^\s+|\s+$|/g,"")},o=function(t){return(t+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")},s=Array.isArray||"undefined"!=typeof $&&$.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},r={a:"[aÀÁÂÃÄÅàáâãäåĀāąĄ]",c:"[cÇçćĆčČ]",d:"[dđĐďĎð]",e:"[eÈÉÊËèéêëěĚĒēęĘ]",i:"[iÌÍÎÏìíîïĪī]",l:"[lłŁ]",n:"[nÑñňŇńŃ]",o:"[oÒÓÔÕÕÖØòóôõöøŌō]",r:"[rřŘ]",s:"[sŠšśŚ]",t:"[tťŤ]",u:"[uÙÚÛÜùúûüůŮŪū]",y:"[yŸÿýÝ]",z:"[zŽžżŻźŹ]"},a=function(){var t,e,i,n,o="",s={};for(i in r)if(r.hasOwnProperty(i))for(n=r[i].substring(2,r[i].length-1),o+=n,t=0,e=n.length;e>t;t++)s[n.charAt(t)]=i;var a=new RegExp("["+o+"]","g");return function(t){return t.replace(a,function(t){return s[t]}).toLowerCase()}}();return t})},219:function(t,e,i){var n,o;!function(s,r){n=r,o="function"==typeof n?n.call(e,i,e,t):n,!(void 0!==o&&(t.exports=o))}(this,function(){var t={};t.mixin=function(t){t.plugins={},t.prototype.initializePlugins=function(t){var i,n,o,s=this,r=[];if(s.plugins={names:[],settings:{},requested:{},loaded:{}},e.isArray(t))for(i=0,n=t.length;n>i;i++)"string"==typeof t[i]?r.push(t[i]):(s.plugins.settings[t[i].name]=t[i].options,r.push(t[i].name));else if(t)for(o in t)t.hasOwnProperty(o)&&(s.plugins.settings[o]=t[o],r.push(o));for(;r.length;)s.require(r.shift())},t.prototype.loadPlugin=function(e){var i=this,n=i.plugins,o=t.plugins[e];if(!t.plugins.hasOwnProperty(e))throw new Error('Unable to find "'+e+'" plugin');n.requested[e]=!0,n.loaded[e]=o.fn.apply(i,[i.plugins.settings[e]||{}]),n.names.push(e)},t.prototype.require=function(t){var e=this,i=e.plugins;if(!e.plugins.loaded.hasOwnProperty(t)){if(i.requested[t])throw new Error('Plugin has circular dependency ("'+t+'")');e.loadPlugin(t)}return i.loaded[t]},t.define=function(e,i){t.plugins[e]={name:e,fn:i}}};var e={isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}};return t})},225:function(t,e,i){(function(t){(function(){var e,i,n,o,s,r,a,l,c=[].slice,u={}.hasOwnProperty,d=function(t,e){function i(){this.constructor=t}for(var n in e)u.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t};a=function(){},i=function(){function t(){}return t.prototype.addEventListener=t.prototype.on,t.prototype.on=function(t,e){return this._callbacks=this._callbacks||{},this._callbacks[t]||(this._callbacks[t]=[]),this._callbacks[t].push(e),this},t.prototype.emit=function(){var t,e,i,n,o,s;if(n=arguments[0],t=2<=arguments.length?c.call(arguments,1):[],this._callbacks=this._callbacks||{},i=this._callbacks[n])for(o=0,s=i.length;s>o;o++)e=i[o],e.apply(this,t);return this},t.prototype.removeListener=t.prototype.off,t.prototype.removeAllListeners=t.prototype.off,t.prototype.removeEventListener=t.prototype.off,t.prototype.off=function(t,e){var i,n,o,s,r;if(!this._callbacks||0===arguments.length)return this._callbacks={},this;if(n=this._callbacks[t],!n)return this;if(1===arguments.length)return delete this._callbacks[t],this;for(o=s=0,r=n.length;r>s;o=++s)if(i=n[o],i===e){n.splice(o,1);break}return this},t}(),e=function(t){function e(t,i){var o,s,r;if(this.element=t,this.version=e.version,this.defaultOptions.previewTemplate=this.defaultOptions.previewTemplate.replace(/\n*/g,""),this.clickableElements=[],this.listeners=[],this.files=[],"string"==typeof this.element&&(this.element=document.querySelector(this.element)),!this.element||null==this.element.nodeType)throw new Error("Invalid dropzone element.");if(this.element.dropzone)throw new Error("Dropzone already attached.");if(e.instances.push(this),this.element.dropzone=this,o=null!=(r=e.optionsForElement(this.element))?r:{},this.options=n({},this.defaultOptions,o,null!=i?i:{}),this.options.forceFallback||!e.isBrowserSupported())return this.options.fallback.call(this);if(null==this.options.url&&(this.options.url=this.element.getAttribute("action")),!this.options.url)throw new Error("No URL provided.");if(this.options.acceptedFiles&&this.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");this.options.acceptedMimeTypes&&(this.options.acceptedFiles=this.options.acceptedMimeTypes,delete this.options.acceptedMimeTypes),this.options.method=this.options.method.toUpperCase(),(s=this.getExistingFallback())&&s.parentNode&&s.parentNode.removeChild(s),this.options.previewsContainer!==!1&&(this.options.previewsContainer?this.previewsContainer=e.getElement(this.options.previewsContainer,"previewsContainer"):this.previewsContainer=this.element),this.options.clickable&&(this.options.clickable===!0?this.clickableElements=[this.element]:this.clickableElements=e.getElements(this.options.clickable,"clickable")),this.init()}var n,o;return d(e,t),e.prototype.Emitter=i,e.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],e.prototype.defaultOptions={url:null,method:"post",withCredentials:!1,parallelUploads:2,uploadMultiple:!1,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,filesizeBase:1e3,maxFiles:null,params:{},clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,hiddenInputContainer:"body",capture:null,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",accept:function(t,e){return e()},init:function(){return a},forceFallback:!1,fallback:function(){var t,i,n,o,s,r;for(this.element.className=""+this.element.className+" dz-browser-not-supported",r=this.element.getElementsByTagName("div"),o=0,s=r.length;s>o;o++)t=r[o],/(^| )dz-message($| )/.test(t.className)&&(i=t,t.className="dz-message");return i||(i=e.createElement('
'),this.element.appendChild(i)),n=i.getElementsByTagName("span")[0],n&&(null!=n.textContent?n.textContent=this.options.dictFallbackMessage:null!=n.innerText&&(n.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(t){var e,i,n;return e={srcX:0,srcY:0,srcWidth:t.width,srcHeight:t.height},i=t.width/t.height,e.optWidth=this.options.thumbnailWidth,e.optHeight=this.options.thumbnailHeight,null==e.optWidth&&null==e.optHeight?(e.optWidth=e.srcWidth,e.optHeight=e.srcHeight):null==e.optWidth?e.optWidth=i*e.optHeight:null==e.optHeight&&(e.optHeight=1/i*e.optWidth),n=e.optWidth/e.optHeight,t.heightn?(e.srcHeight=t.height,e.srcWidth=e.srcHeight*n):(e.srcWidth=t.width,e.srcHeight=e.srcWidth/n),e.srcX=(t.width-e.srcWidth)/2,e.srcY=(t.height-e.srcHeight)/2,e},drop:function(t){return this.element.classList.remove("dz-drag-hover")},dragstart:a,dragend:function(t){return this.element.classList.remove("dz-drag-hover")},dragenter:function(t){return this.element.classList.add("dz-drag-hover")},dragover:function(t){return this.element.classList.add("dz-drag-hover")},dragleave:function(t){return this.element.classList.remove("dz-drag-hover")},paste:a,reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(t){var i,n,o,s,r,a,l,c,u,d,p,h,f;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){for(t.previewElement=e.createElement(this.options.previewTemplate.trim()),t.previewTemplate=t.previewElement,this.previewsContainer.appendChild(t.previewElement),d=t.previewElement.querySelectorAll("[data-dz-name]"),s=0,l=d.length;l>s;s++)i=d[s],i.textContent=t.name;for(p=t.previewElement.querySelectorAll("[data-dz-size]"),r=0,c=p.length;c>r;r++)i=p[r],i.innerHTML=this.filesize(t.size);for(this.options.addRemoveLinks&&(t._removeLink=e.createElement(''+this.options.dictRemoveFile+" "),t.previewElement.appendChild(t._removeLink)),n=function(i){return function(n){return n.preventDefault(),n.stopPropagation(),t.status===e.UPLOADING?e.confirm(i.options.dictCancelUploadConfirmation,function(){return i.removeFile(t)}):i.options.dictRemoveFileConfirmation?e.confirm(i.options.dictRemoveFileConfirmation,function(){return i.removeFile(t)}):i.removeFile(t)}}(this),h=t.previewElement.querySelectorAll("[data-dz-remove]"),f=[],a=0,u=h.length;u>a;a++)o=h[a],f.push(o.addEventListener("click",n));return f}},removedfile:function(t){var e;return t.previewElement&&null!=(e=t.previewElement)&&e.parentNode.removeChild(t.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(t,e){var i,n,o,s;if(t.previewElement){for(t.previewElement.classList.remove("dz-file-preview"),s=t.previewElement.querySelectorAll("[data-dz-thumbnail]"),n=0,o=s.length;o>n;n++)i=s[n],i.alt=t.name,i.src=e;return setTimeout(function(e){return function(){return t.previewElement.classList.add("dz-image-preview")}}(this),1)}},error:function(t,e){var i,n,o,s,r;if(t.previewElement){for(t.previewElement.classList.add("dz-error"),"String"!=typeof e&&e.error&&(e=e.error),s=t.previewElement.querySelectorAll("[data-dz-errormessage]"),r=[],n=0,o=s.length;o>n;n++)i=s[n],r.push(i.textContent=e);return r}},errormultiple:a,processing:function(t){return t.previewElement&&(t.previewElement.classList.add("dz-processing"),t._removeLink)?t._removeLink.textContent=this.options.dictCancelUpload:void 0},processingmultiple:a,uploadprogress:function(t,e,i){var n,o,s,r,a;if(t.previewElement){for(r=t.previewElement.querySelectorAll("[data-dz-uploadprogress]"),a=[],o=0,s=r.length;s>o;o++)n=r[o],"PROGRESS"===n.nodeName?a.push(n.value=e):a.push(n.style.width=""+e+"%");return a}},totaluploadprogress:a,sending:a,sendingmultiple:a,success:function(t){return t.previewElement?t.previewElement.classList.add("dz-success"):void 0},successmultiple:a,canceled:function(t){return this.emit("error",t,"Upload canceled.")},canceledmultiple:a,complete:function(t){return t._removeLink&&(t._removeLink.textContent=this.options.dictRemoveFile),t.previewElement?t.previewElement.classList.add("dz-complete"):void 0},completemultiple:a,maxfilesexceeded:a,maxfilesreached:a,queuecomplete:a,addedfiles:a,previewTemplate:'\n
\n
\n
\n
\n
\n
\n Check \n \n \n \n \n \n
\n
\n
\n Error \n \n \n \n \n \n \n \n
\n
'
+},n=function(){var t,e,i,n,o,s,r;for(n=arguments[0],i=2<=arguments.length?c.call(arguments,1):[],s=0,r=i.length;r>s;s++){e=i[s];for(t in e)o=e[t],n[t]=o}return n},e.prototype.getAcceptedFiles=function(){var t,e,i,n,o;for(n=this.files,o=[],e=0,i=n.length;i>e;e++)t=n[e],t.accepted&&o.push(t);return o},e.prototype.getRejectedFiles=function(){var t,e,i,n,o;for(n=this.files,o=[],e=0,i=n.length;i>e;e++)t=n[e],t.accepted||o.push(t);return o},e.prototype.getFilesWithStatus=function(t){var e,i,n,o,s;for(o=this.files,s=[],i=0,n=o.length;n>i;i++)e=o[i],e.status===t&&s.push(e);return s},e.prototype.getQueuedFiles=function(){return this.getFilesWithStatus(e.QUEUED)},e.prototype.getUploadingFiles=function(){return this.getFilesWithStatus(e.UPLOADING)},e.prototype.getAddedFiles=function(){return this.getFilesWithStatus(e.ADDED)},e.prototype.getActiveFiles=function(){var t,i,n,o,s;for(o=this.files,s=[],i=0,n=o.length;n>i;i++)t=o[i],(t.status===e.UPLOADING||t.status===e.QUEUED)&&s.push(t);return s},e.prototype.init=function(){var t,i,n,o,s,r,a;for("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(e.createElement(''+this.options.dictDefaultMessage+"
")),this.clickableElements.length&&(n=function(t){return function(){return t.hiddenFileInput&&t.hiddenFileInput.parentNode.removeChild(t.hiddenFileInput),t.hiddenFileInput=document.createElement("input"),t.hiddenFileInput.setAttribute("type","file"),(null==t.options.maxFiles||t.options.maxFiles>1)&&t.hiddenFileInput.setAttribute("multiple","multiple"),t.hiddenFileInput.className="dz-hidden-input",null!=t.options.acceptedFiles&&t.hiddenFileInput.setAttribute("accept",t.options.acceptedFiles),null!=t.options.capture&&t.hiddenFileInput.setAttribute("capture",t.options.capture),t.hiddenFileInput.style.visibility="hidden",t.hiddenFileInput.style.position="absolute",t.hiddenFileInput.style.top="0",t.hiddenFileInput.style.left="0",t.hiddenFileInput.style.height="0",t.hiddenFileInput.style.width="0",document.querySelector(t.options.hiddenInputContainer).appendChild(t.hiddenFileInput),t.hiddenFileInput.addEventListener("change",function(){var e,i,o,s;if(i=t.hiddenFileInput.files,i.length)for(o=0,s=i.length;s>o;o++)e=i[o],t.addFile(e);return t.emit("addedfiles",i),n()})}}(this))(),this.URL=null!=(r=window.URL)?r:window.webkitURL,a=this.events,o=0,s=a.length;s>o;o++)t=a[o],this.on(t,this.options[t]);return this.on("uploadprogress",function(t){return function(){return t.updateTotalUploadProgress()}}(this)),this.on("removedfile",function(t){return function(){return t.updateTotalUploadProgress()}}(this)),this.on("canceled",function(t){return function(e){return t.emit("complete",e)}}(this)),this.on("complete",function(t){return function(e){return 0===t.getAddedFiles().length&&0===t.getUploadingFiles().length&&0===t.getQueuedFiles().length?setTimeout(function(){return t.emit("queuecomplete")},0):void 0}}(this)),i=function(t){return t.stopPropagation(),t.preventDefault?t.preventDefault():t.returnValue=!1},this.listeners=[{element:this.element,events:{dragstart:function(t){return function(e){return t.emit("dragstart",e)}}(this),dragenter:function(t){return function(e){return i(e),t.emit("dragenter",e)}}(this),dragover:function(t){return function(e){var n;try{n=e.dataTransfer.effectAllowed}catch(o){}return e.dataTransfer.dropEffect="move"===n||"linkMove"===n?"move":"copy",i(e),t.emit("dragover",e)}}(this),dragleave:function(t){return function(e){return t.emit("dragleave",e)}}(this),drop:function(t){return function(e){return i(e),t.drop(e)}}(this),dragend:function(t){return function(e){return t.emit("dragend",e)}}(this)}}],this.clickableElements.forEach(function(t){return function(i){return t.listeners.push({element:i,events:{click:function(n){return(i!==t.element||n.target===t.element||e.elementInside(n.target,t.element.querySelector(".dz-message")))&&t.hiddenFileInput.click(),!0}}})}}(this)),this.enable(),this.options.init.call(this)},e.prototype.destroy=function(){var t;return this.disable(),this.removeAllFiles(!0),(null!=(t=this.hiddenFileInput)?t.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,e.instances.splice(e.instances.indexOf(this),1)},e.prototype.updateTotalUploadProgress=function(){var t,e,i,n,o,s,r,a;if(n=0,i=0,t=this.getActiveFiles(),t.length){for(a=this.getActiveFiles(),s=0,r=a.length;r>s;s++)e=a[s],n+=e.upload.bytesSent,i+=e.upload.total;o=100*n/i}else o=100;return this.emit("totaluploadprogress",o,i,n)},e.prototype._getParamName=function(t){return"function"==typeof this.options.paramName?this.options.paramName(t):""+this.options.paramName+(this.options.uploadMultiple?"["+t+"]":"")},e.prototype.getFallbackForm=function(){var t,i,n,o;return(t=this.getExistingFallback())?t:(n='',i=e.createElement(n),"FORM"!==this.element.tagName?(o=e.createElement(''),o.appendChild(i)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=o?o:i)},e.prototype.getExistingFallback=function(){var t,e,i,n,o,s;for(e=function(t){var e,i,n;for(i=0,n=t.length;n>i;i++)if(e=t[i],/(^| )fallback($| )/.test(e.className))return e},s=["div","form"],n=0,o=s.length;o>n;n++)if(i=s[n],t=e(this.element.getElementsByTagName(i)))return t},e.prototype.setupEventListeners=function(){var t,e,i,n,o,s,r;for(s=this.listeners,r=[],n=0,o=s.length;o>n;n++)t=s[n],r.push(function(){var n,o;n=t.events,o=[];for(e in n)i=n[e],o.push(t.element.addEventListener(e,i,!1));return o}());return r},e.prototype.removeEventListeners=function(){var t,e,i,n,o,s,r;for(s=this.listeners,r=[],n=0,o=s.length;o>n;n++)t=s[n],r.push(function(){var n,o;n=t.events,o=[];for(e in n)i=n[e],o.push(t.element.removeEventListener(e,i,!1));return o}());return r},e.prototype.disable=function(){var t,e,i,n,o;for(this.clickableElements.forEach(function(t){return t.classList.remove("dz-clickable")}),this.removeEventListeners(),n=this.files,o=[],e=0,i=n.length;i>e;e++)t=n[e],o.push(this.cancelUpload(t));return o},e.prototype.enable=function(){return this.clickableElements.forEach(function(t){return t.classList.add("dz-clickable")}),this.setupEventListeners()},e.prototype.filesize=function(t){var e,i,n,o,s,r,a,l;if(n=0,o="b",t>0){for(r=["TB","GB","MB","KB","b"],i=a=0,l=r.length;l>a;i=++a)if(s=r[i],e=Math.pow(this.options.filesizeBase,4-i)/10,t>=e){n=t/Math.pow(this.options.filesizeBase,4-i),o=s;break}n=Math.round(10*n)/10}return""+n+" "+o},e.prototype._updateMaxFilesReachedClass=function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")},e.prototype.drop=function(t){var e,i;t.dataTransfer&&(this.emit("drop",t),e=t.dataTransfer.files,this.emit("addedfiles",e),e.length&&(i=t.dataTransfer.items,i&&i.length&&null!=i[0].webkitGetAsEntry?this._addFilesFromItems(i):this.handleFiles(e)))},e.prototype.paste=function(t){var e,i;if(null!=(null!=t&&null!=(i=t.clipboardData)?i.items:void 0))return this.emit("paste",t),e=t.clipboardData.items,e.length?this._addFilesFromItems(e):void 0},e.prototype.handleFiles=function(t){var e,i,n,o;for(o=[],i=0,n=t.length;n>i;i++)e=t[i],o.push(this.addFile(e));return o},e.prototype._addFilesFromItems=function(t){var e,i,n,o,s;for(s=[],n=0,o=t.length;o>n;n++)i=t[n],null!=i.webkitGetAsEntry&&(e=i.webkitGetAsEntry())?e.isFile?s.push(this.addFile(i.getAsFile())):e.isDirectory?s.push(this._addFilesFromDirectory(e,e.name)):s.push(void 0):null!=i.getAsFile&&(null==i.kind||"file"===i.kind)?s.push(this.addFile(i.getAsFile())):s.push(void 0);return s},e.prototype._addFilesFromDirectory=function(t,e){var i,n;return i=t.createReader(),n=function(t){return function(i){var n,o,s;for(o=0,s=i.length;s>o;o++)n=i[o],n.isFile?n.file(function(i){return t.options.ignoreHiddenFiles&&"."===i.name.substring(0,1)?void 0:(i.fullPath=""+e+"/"+i.name,t.addFile(i))}):n.isDirectory&&t._addFilesFromDirectory(n,""+e+"/"+n.name)}}(this),i.readEntries(n,function(t){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.log?console.log(t):void 0})},e.prototype.accept=function(t,i){return t.size>1024*this.options.maxFilesize*1024?i(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(t.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):e.isValidFile(t,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(i(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",t)):this.options.accept.call(this,t,i):i(this.options.dictInvalidFileType)},e.prototype.addFile=function(t){return t.upload={progress:0,total:t.size,bytesSent:0},this.files.push(t),t.status=e.ADDED,this.emit("addedfile",t),this._enqueueThumbnail(t),this.accept(t,function(e){return function(i){return i?(t.accepted=!1,e._errorProcessing([t],i)):(t.accepted=!0,e.options.autoQueue&&e.enqueueFile(t)),e._updateMaxFilesReachedClass()}}(this))},e.prototype.enqueueFiles=function(t){var e,i,n;for(i=0,n=t.length;n>i;i++)e=t[i],this.enqueueFile(e);return null},e.prototype.enqueueFile=function(t){if(t.status!==e.ADDED||t.accepted!==!0)throw new Error("This file can't be queued because it has already been processed or was rejected.");return t.status=e.QUEUED,this.options.autoProcessQueue?setTimeout(function(t){return function(){return t.processQueue()}}(this),0):void 0},e.prototype._thumbnailQueue=[],e.prototype._processingThumbnail=!1,e.prototype._enqueueThumbnail=function(t){return this.options.createImageThumbnails&&t.type.match(/image.*/)&&t.size<=1024*this.options.maxThumbnailFilesize*1024?(this._thumbnailQueue.push(t),setTimeout(function(t){return function(){return t._processThumbnailQueue()}}(this),0)):void 0},e.prototype._processThumbnailQueue=function(){return this._processingThumbnail||0===this._thumbnailQueue.length?void 0:(this._processingThumbnail=!0,this.createThumbnail(this._thumbnailQueue.shift(),function(t){return function(){return t._processingThumbnail=!1,t._processThumbnailQueue()}}(this)))},e.prototype.removeFile=function(t){return t.status===e.UPLOADING&&this.cancelUpload(t),this.files=l(this.files,t),this.emit("removedfile",t),0===this.files.length?this.emit("reset"):void 0},e.prototype.removeAllFiles=function(t){var i,n,o,s;for(null==t&&(t=!1),s=this.files.slice(),n=0,o=s.length;o>n;n++)i=s[n],(i.status!==e.UPLOADING||t)&&this.removeFile(i);return null},e.prototype.createThumbnail=function(t,e){var i;return i=new FileReader,i.onload=function(n){return function(){return"image/svg+xml"===t.type?(n.emit("thumbnail",t,i.result),void(null!=e&&e())):n.createThumbnailFromUrl(t,i.result,e)}}(this),i.readAsDataURL(t)},e.prototype.createThumbnailFromUrl=function(t,e,i,n){var o;return o=document.createElement("img"),n&&(o.crossOrigin=n),o.onload=function(e){return function(){var n,s,a,l,c,u,d,p;return t.width=o.width,t.height=o.height,a=e.options.resize.call(e,t),null==a.trgWidth&&(a.trgWidth=a.optWidth),null==a.trgHeight&&(a.trgHeight=a.optHeight),n=document.createElement("canvas"),s=n.getContext("2d"),n.width=a.trgWidth,n.height=a.trgHeight,r(s,o,null!=(c=a.srcX)?c:0,null!=(u=a.srcY)?u:0,a.srcWidth,a.srcHeight,null!=(d=a.trgX)?d:0,null!=(p=a.trgY)?p:0,a.trgWidth,a.trgHeight),l=n.toDataURL("image/png"),e.emit("thumbnail",t,l),null!=i?i():void 0}}(this),null!=i&&(o.onerror=i),o.src=e},e.prototype.processQueue=function(){var t,e,i,n;if(e=this.options.parallelUploads,i=this.getUploadingFiles().length,t=i,!(i>=e)&&(n=this.getQueuedFiles(),n.length>0)){if(this.options.uploadMultiple)return this.processFiles(n.slice(0,e-i));for(;e>t;){if(!n.length)return;this.processFile(n.shift()),t++}}},e.prototype.processFile=function(t){return this.processFiles([t])},e.prototype.processFiles=function(t){var i,n,o;for(n=0,o=t.length;o>n;n++)i=t[n],i.processing=!0,i.status=e.UPLOADING,this.emit("processing",i);return this.options.uploadMultiple&&this.emit("processingmultiple",t),this.uploadFiles(t)},e.prototype._getFilesWithXhr=function(t){var e,i;return i=function(){var i,n,o,s;for(o=this.files,s=[],i=0,n=o.length;n>i;i++)e=o[i],e.xhr===t&&s.push(e);return s}.call(this)},e.prototype.cancelUpload=function(t){var i,n,o,s,r,a,l;if(t.status===e.UPLOADING){for(n=this._getFilesWithXhr(t.xhr),o=0,r=n.length;r>o;o++)i=n[o],i.status=e.CANCELED;for(t.xhr.abort(),s=0,a=n.length;a>s;s++)i=n[s],this.emit("canceled",i);this.options.uploadMultiple&&this.emit("canceledmultiple",n)}else((l=t.status)===e.ADDED||l===e.QUEUED)&&(t.status=e.CANCELED,this.emit("canceled",t),this.options.uploadMultiple&&this.emit("canceledmultiple",[t]));return this.options.autoProcessQueue?this.processQueue():void 0},o=function(){var t,e;return e=arguments[0],t=2<=arguments.length?c.call(arguments,1):[],"function"==typeof e?e.apply(this,t):e},e.prototype.uploadFile=function(t){return this.uploadFiles([t])},e.prototype.uploadFiles=function(t){var i,s,r,a,l,c,u,d,p,h,f,g,m,v,y,b,w,x,C,E,O,S,$,T,D,A,k,I,_,N,F,L,z,P;for(C=new XMLHttpRequest,E=0,T=t.length;T>E;E++)i=t[E],i.xhr=C;g=o(this.options.method,t),w=o(this.options.url,t),C.open(g,w,!0),C.withCredentials=!!this.options.withCredentials,y=null,r=function(e){return function(){var n,o,s;for(s=[],n=0,o=t.length;o>n;n++)i=t[n],s.push(e._errorProcessing(t,y||e.options.dictResponseError.replace("{{statusCode}}",C.status),C));return s}}(this),b=function(e){return function(n){var o,s,r,a,l,c,u,d,p;if(null!=n)for(s=100*n.loaded/n.total,r=0,c=t.length;c>r;r++)i=t[r],i.upload={progress:s,total:n.total,bytesSent:n.loaded};else{for(o=!0,s=100,a=0,u=t.length;u>a;a++)i=t[a],(100!==i.upload.progress||i.upload.bytesSent!==i.upload.total)&&(o=!1),i.upload.progress=s,i.upload.bytesSent=i.upload.total;if(o)return}for(p=[],l=0,d=t.length;d>l;l++)i=t[l],p.push(e.emit("uploadprogress",i,s,i.upload.bytesSent));return p}}(this),C.onload=function(i){return function(n){var o;if(t[0].status!==e.CANCELED&&4===C.readyState){if(y=C.responseText,C.getResponseHeader("content-type")&&~C.getResponseHeader("content-type").indexOf("application/json"))try{y=JSON.parse(y)}catch(s){n=s,y="Invalid JSON response from server."}return b(),200<=(o=C.status)&&300>o?i._finished(t,y,n):r()}}}(this),C.onerror=function(i){return function(){return t[0].status!==e.CANCELED?r():void 0}}(this),v=null!=(_=C.upload)?_:C,v.onprogress=b,c={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"},this.options.headers&&n(c,this.options.headers);for(a in c)l=c[a],l&&C.setRequestHeader(a,l);if(s=new FormData,this.options.params){N=this.options.params;for(f in N)x=N[f],s.append(f,x)}for(O=0,D=t.length;D>O;O++)i=t[O],this.emit("sending",i,C,s);if(this.options.uploadMultiple&&this.emit("sendingmultiple",t,C,s),"FORM"===this.element.tagName)for(F=this.element.querySelectorAll("input, textarea, select, button"),S=0,A=F.length;A>S;S++)if(d=F[S],p=d.getAttribute("name"),h=d.getAttribute("type"),"SELECT"===d.tagName&&d.hasAttribute("multiple"))for(L=d.options,$=0,k=L.length;k>$;$++)m=L[$],m.selected&&s.append(p,m.value);else(!h||"checkbox"!==(z=h.toLowerCase())&&"radio"!==z||d.checked)&&s.append(p,d.value);for(u=I=0,P=t.length-1;P>=0?P>=I:I>=P;u=P>=0?++I:--I)s.append(this._getParamName(u),t[u],t[u].name);return this.submitRequest(C,s,t)},e.prototype.submitRequest=function(t,e,i){return t.send(e)},e.prototype._finished=function(t,i,n){var o,s,r;for(s=0,r=t.length;r>s;s++)o=t[s],o.status=e.SUCCESS,this.emit("success",o,i,n),this.emit("complete",o);return this.options.uploadMultiple&&(this.emit("successmultiple",t,i,n),this.emit("completemultiple",t)),this.options.autoProcessQueue?this.processQueue():void 0},e.prototype._errorProcessing=function(t,i,n){var o,s,r;for(s=0,r=t.length;r>s;s++)o=t[s],o.status=e.ERROR,this.emit("error",o,i,n),this.emit("complete",o);return this.options.uploadMultiple&&(this.emit("errormultiple",t,i,n),this.emit("completemultiple",t)),this.options.autoProcessQueue?this.processQueue():void 0},e}(i),e.version="4.2.0",e.options={},e.optionsForElement=function(t){return t.getAttribute("id")?e.options[n(t.getAttribute("id"))]:void 0},e.instances=[],e.forElement=function(t){if("string"==typeof t&&(t=document.querySelector(t)),null==(null!=t?t.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return t.dropzone},e.autoDiscover=!0,e.discover=function(){var t,i,n,o,s,r;for(document.querySelectorAll?n=document.querySelectorAll(".dropzone"):(n=[],t=function(t){var e,i,o,s;for(s=[],i=0,o=t.length;o>i;i++)e=t[i],/(^| )dropzone($| )/.test(e.className)?s.push(n.push(e)):s.push(void 0);return s},t(document.getElementsByTagName("div")),t(document.getElementsByTagName("form"))),r=[],o=0,s=n.length;s>o;o++)i=n[o],e.optionsForElement(i)!==!1?r.push(new e(i)):r.push(void 0);return r},e.blacklistedBrowsers=[/opera.*Macintosh.*version\/12/i],e.isBrowserSupported=function(){var t,i,n,o,s;if(t=!0,window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a"))for(s=e.blacklistedBrowsers,n=0,o=s.length;o>n;n++)i=s[n],i.test(navigator.userAgent)&&(t=!1);else t=!1;else t=!1;return t},l=function(t,e){var i,n,o,s;for(s=[],n=0,o=t.length;o>n;n++)i=t[n],i!==e&&s.push(i);return s},n=function(t){return t.replace(/[\-_](\w)/g,function(t){return t.charAt(1).toUpperCase()})},e.createElement=function(t){var e;return e=document.createElement("div"),e.innerHTML=t,e.childNodes[0]},e.elementInside=function(t,e){if(t===e)return!0;for(;t=t.parentNode;)if(t===e)return!0;return!1},e.getElement=function(t,e){var i;if("string"==typeof t?i=document.querySelector(t):null!=t.nodeType&&(i=t),null==i)throw new Error("Invalid `"+e+"` option provided. Please provide a CSS selector or a plain HTML element.");return i},e.getElements=function(t,e){var i,n,o,s,r,a,l,c;if(t instanceof Array){o=[];try{for(s=0,a=t.length;a>s;s++)n=t[s],o.push(this.getElement(n,e))}catch(u){i=u,o=null}}else if("string"==typeof t)for(o=[],c=document.querySelectorAll(t),r=0,l=c.length;l>r;r++)n=c[r],o.push(n);else null!=t.nodeType&&(o=[t]);if(null==o||!o.length)throw new Error("Invalid `"+e+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");return o},e.confirm=function(t,e,i){return window.confirm(t)?e():null!=i?i():void 0},e.isValidFile=function(t,e){var i,n,o,s,r;if(!e)return!0;for(e=e.split(","),n=t.type,i=n.replace(/\/.*$/,""),s=0,r=e.length;r>s;s++)if(o=e[s],o=o.trim(),"."===o.charAt(0)){if(-1!==t.name.toLowerCase().indexOf(o.toLowerCase(),t.name.length-o.length))return!0}else if(/\/\*$/.test(o)){if(i===o.replace(/\/.*$/,""))return!0}else if(n===o)return!0;return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(t){return this.each(function(){return new e(this,t)})}),"undefined"!=typeof t&&null!==t?t.exports=e:window.Dropzone=e,e.ADDED="added",e.QUEUED="queued",e.ACCEPTED=e.QUEUED,e.UPLOADING="uploading",e.PROCESSING=e.UPLOADING,e.CANCELED="canceled",e.ERROR="error",e.SUCCESS="success",s=function(t){var e,i,n,o,s,r,a,l,c,u;for(a=t.naturalWidth,r=t.naturalHeight,i=document.createElement("canvas"),i.width=1,i.height=r,n=i.getContext("2d"),n.drawImage(t,0,0),o=n.getImageData(0,0,1,r).data,u=0,s=r,l=r;l>u;)e=o[4*(l-1)+3],0===e?s=l:u=l,l=s+u>>1;return c=l/r,0===c?1:c},r=function(t,e,i,n,o,r,a,l,c,u){var d;return d=s(e),t.drawImage(e,i,n,o,r,a,l,c,u/d)},o=function(t,e){var i,n,o,s,r,a,l,c,u;if(o=!1,u=!0,n=t.document,c=n.documentElement,i=n.addEventListener?"addEventListener":"attachEvent",l=n.addEventListener?"removeEventListener":"detachEvent",a=n.addEventListener?"":"on",s=function(i){return"readystatechange"!==i.type||"complete"===n.readyState?(("load"===i.type?t:n)[l](a+i.type,s,!1),!o&&(o=!0)?e.call(t,i.type||i):void 0):void 0},r=function(){var t;try{c.doScroll("left")}catch(e){return t=e,void setTimeout(r,50)}return s("poll")},"complete"!==n.readyState){if(n.createEventObject&&c.doScroll){try{u=!t.frameElement}catch(d){}u&&r()}return n[i](a+"DOMContentLoaded",s,!1),n[i](a+"readystatechange",s,!1),t[i](a+"load",s,!1)}},e._autoDiscoverFunction=function(){return e.autoDiscover?e.discover():void 0},o(window,e._autoDiscoverFunction)}).call(this)}).call(e,i(226)(t))},226:function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},238:function(t,e){+function(t){"use strict";function e(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var n=i&&t(i);return n&&n.length?n:e.parent()}function i(i){i&&3===i.which||(t(o).remove(),t(s).each(function(){var n=t(this),o=e(n),s={relatedTarget:this};o.hasClass("open")&&(i&&"click"==i.type&&/input|textarea/i.test(i.target.tagName)&&t.contains(o[0],i.target)||(o.trigger(i=t.Event("hide.bs.dropdown",s)),i.isDefaultPrevented()||(n.attr("aria-expanded","false"),o.removeClass("open").trigger(t.Event("hidden.bs.dropdown",s)))))}))}function n(e){return this.each(function(){var i=t(this),n=i.data("bs.dropdown");n||i.data("bs.dropdown",n=new r(this)),"string"==typeof e&&n[e].call(i)})}var o=".dropdown-backdrop",s='[data-toggle="dropdown"]',r=function(e){t(e).on("click.bs.dropdown",this.toggle)};r.VERSION="3.3.6",r.prototype.toggle=function(n){var o=t(this);if(!o.is(".disabled, :disabled")){var s=e(o),r=s.hasClass("open");if(i(),!r){"ontouchstart"in document.documentElement&&!s.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",i);var a={relatedTarget:this};if(s.trigger(n=t.Event("show.bs.dropdown",a)),n.isDefaultPrevented())return;o.trigger("focus").attr("aria-expanded","true"),s.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},r.prototype.keydown=function(i){if(/(38|40|27|32)/.test(i.which)&&!/input|textarea/i.test(i.target.tagName)){var n=t(this);if(i.preventDefault(),i.stopPropagation(),!n.is(".disabled, :disabled")){var o=e(n),r=o.hasClass("open");if(!r&&27!=i.which||r&&27==i.which)return 27==i.which&&o.find(s).trigger("focus"),n.trigger("click");var a=" li:not(.disabled):visible a",l=o.find(".dropdown-menu"+a);if(l.length){var c=l.index(i.target);38==i.which&&c>0&&c--,40==i.which&&co;o++)n=parseFloat(s[o])*parseInt(a[o],10)+parseFloat(r[o]),n>e&&(e=n);return n}function n(){if(e(document.body).height()<=e(window).height())return 0;var t,i,n=document.createElement("div"),o=document.createElement("div");return n.style.visibility="hidden",n.style.width="100px",document.body.appendChild(n),t=n.offsetWidth,n.style.overflow="scroll",o.style.width="100%",n.appendChild(o),i=o.offsetWidth,n.parentNode.removeChild(n),t-i}function o(){if(!E){var t,i,o=e("html"),s=u("is-locked");o.hasClass(s)||(i=e(document.body),t=parseInt(i.css("padding-right"),10)+n(),i.css("padding-right",t+"px"),o.addClass(s))}}function s(){if(!E){var t,i,o=e("html"),s=u("is-locked");o.hasClass(s)&&(i=e(document.body),t=parseInt(i.css("padding-right"),10)-n(),i.css("padding-right",t+"px"),o.removeClass(s))}}function r(t,e,i,n){var o=u("is",e),s=[u("is",w.CLOSING),u("is",w.OPENING),u("is",w.CLOSED),u("is",w.OPENED)].join(" ");t.$bg.removeClass(s).addClass(o),t.$overlay.removeClass(s).addClass(o),t.$wrapper.removeClass(s).addClass(o),t.$modal.removeClass(s).addClass(o),t.state=e,!i&&t.$modal.trigger({type:e,reason:n},[{reason:n}])}function a(t,n,o){var s=0,r=function(t){t.target===this&&s++},a=function(t){t.target===this&&0===--s&&(e.each(["$bg","$overlay","$wrapper","$modal"],function(t,e){o[e].off(v+" "+y)}),n())};e.each(["$bg","$overlay","$wrapper","$modal"],function(t,e){o[e].on(v,r).on(y,a)}),t(),0===i(o.$bg)&&0===i(o.$overlay)&&0===i(o.$wrapper)&&0===i(o.$modal)&&(e.each(["$bg","$overlay","$wrapper","$modal"],function(t,e){o[e].off(v+" "+y)}),n())}function l(t){t.state!==w.CLOSED&&(e.each(["$bg","$overlay","$wrapper","$modal"],function(e,i){t[i].off(v+" "+y)}),t.$bg.removeClass(t.settings.modifier),t.$overlay.removeClass(t.settings.modifier).hide(),t.$wrapper.hide(),s(),r(t,w.CLOSED,!0))}function c(t){var e,i,n,o,s={};for(t=t.replace(/\s*:\s*/g,":").replace(/\s*,\s*/g,","),e=t.split(","),o=0,i=e.length;i>o;o++)e[o]=e[o].split(":"),n=e[o][1],("string"==typeof n||n instanceof String)&&(n="true"===n||("false"===n?!1:n)),("string"==typeof n||n instanceof String)&&(n=isNaN(n)?n:+n),s[e[o][0]]=n;return s}function u(){for(var t=m,e=0;e").addClass(u("overlay")+" "+u("is",w.CLOSED)).hide(),n.append(o.$overlay)),o.$bg=e("."+u("bg")).addClass(u("is",w.CLOSED)),o.$modal=t.addClass(m+" "+u("is-initialized")+" "+o.settings.modifier+" "+u("is",w.CLOSED)).attr("tabindex","-1"),o.$wrapper=e("").addClass(u("wrapper")+" "+o.settings.modifier+" "+u("is",w.CLOSED)).hide().append(o.$modal),n.append(o.$wrapper),o.$wrapper.on("click."+m,"[data-"+g+'-action="close"]',function(t){t.preventDefault(),o.close()}),o.$wrapper.on("click."+m,"[data-"+g+'-action="cancel"]',function(t){t.preventDefault(),o.$modal.trigger(x.CANCELLATION),o.settings.closeOnCancel&&o.close(x.CANCELLATION)}),o.$wrapper.on("click."+m,"[data-"+g+'-action="confirm"]',function(t){t.preventDefault(),o.$modal.trigger(x.CONFIRMATION),o.settings.closeOnConfirm&&o.close(x.CONFIRMATION)}),o.$wrapper.on("click."+m,function(t){var i=e(t.target);i.hasClass(u("wrapper"))&&o.settings.closeOnOutsideClick&&o.close()})}var h,f,g="remodal",m=t.REMODAL_GLOBALS&&t.REMODAL_GLOBALS.NAMESPACE||g,v=e.map(["animationstart","webkitAnimationStart","MSAnimationStart","oAnimationStart"],function(t){return t+"."+m}).join(" "),y=e.map(["animationend","webkitAnimationEnd","MSAnimationEnd","oAnimationEnd"],function(t){return t+"."+m}).join(" "),b=e.extend({hashTracking:!0,closeOnConfirm:!0,closeOnCancel:!0,closeOnEscape:!0,closeOnOutsideClick:!0,modifier:""},t.REMODAL_GLOBALS&&t.REMODAL_GLOBALS.DEFAULTS),w={CLOSING:"closing",CLOSED:"closed",OPENING:"opening",OPENED:"opened"},x={CONFIRMATION:"confirmation",CANCELLATION:"cancellation"},C=function(){var t=document.createElement("div").style;return void 0!==t.animationName||void 0!==t.WebkitAnimationName||void 0!==t.MozAnimationName||void 0!==t.msAnimationName||void 0!==t.OAnimationName}(),E=/iPad|iPhone|iPod/.test(navigator.platform);p.prototype.open=function(){var t,i=this;i.state!==w.OPENING&&i.state!==w.CLOSING&&(t=i.$modal.attr("data-"+g+"-id"),t&&i.settings.hashTracking&&(f=e(window).scrollTop(),location.hash=t),h&&h!==i&&l(h),h=i,o(),i.$bg.addClass(i.settings.modifier),i.$overlay.addClass(i.settings.modifier).show(),i.$wrapper.show().scrollTop(0),i.$modal.focus(),a(function(){r(i,w.OPENING)},function(){r(i,w.OPENED)},i))},p.prototype.close=function(t){var i=this;i.state!==w.OPENING&&i.state!==w.CLOSING&&(i.settings.hashTracking&&i.$modal.attr("data-"+g+"-id")===location.hash.substr(1)&&(location.hash="",e(window).scrollTop(f)),a(function(){r(i,w.CLOSING,!1,t)},function(){i.$bg.removeClass(i.settings.modifier),i.$overlay.removeClass(i.settings.modifier).hide(),i.$wrapper.hide(),s(),r(i,w.CLOSED,!1,t)},i))},p.prototype.getState=function(){return this.state},p.prototype.destroy=function(){var t,i=e[g].lookup;l(this),this.$wrapper.remove(),delete i[this.index],t=e.grep(i,function(t){return!!t}).length,0===t&&(this.$overlay.remove(),this.$bg.removeClass(u("is",w.CLOSING)+" "+u("is",w.OPENING)+" "+u("is",w.CLOSED)+" "+u("is",w.OPENED)))},e[g]={lookup:[]},e.fn[g]=function(t){var i,n;return this.each(function(o,s){n=e(s),null==n.data(g)?(i=new p(n,t),n.data(g,i.index),i.settings.hashTracking&&n.attr("data-"+g+"-id")===location.hash.substr(1)&&i.open()):i=e[g].lookup[n.data(g)]}),i},e(document).ready(function(){e(document).on("click","[data-"+g+"-target]",function(t){t.preventDefault();var i=t.currentTarget,n=i.getAttribute("data-"+g+"-target"),o=e("[data-"+g+'-id="'+n+'"]');e[g].lookup[o.data(g)].open()}),e(document).find("."+m).each(function(t,i){var n=e(i),o=n.data(g+"-options");o?("string"==typeof o||o instanceof String)&&(o=c(o)):o={},n[g](o)}),e(document).on("keydown."+m,function(t){h&&h.settings.closeOnEscape&&h.state===w.OPENED&&27===t.keyCode&&h.close()}),e(window).on("hashchange."+m,d)})})},240:function(t,e,i){i(241),i(242),i(243),i(244),i(245),i(238),i(246),i(247),i(248),i(249),i(250),i(251)},241:function(t,e){+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,n=this;t(this).one("bsTransitionEnd",function(){i=!0});var o=function(){i||t(n).trigger(t.support.transition.end)};return setTimeout(o,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery)},242:function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.alert");
+o||i.data("bs.alert",o=new n(this)),"string"==typeof e&&o[e].call(i)})}var i='[data-dismiss="alert"]',n=function(e){t(e).on("click",i,this.close)};n.VERSION="3.3.6",n.TRANSITION_DURATION=150,n.prototype.close=function(e){function i(){r.detach().trigger("closed.bs.alert").remove()}var o=t(this),s=o.attr("data-target");s||(s=o.attr("href"),s=s&&s.replace(/.*(?=#[^\s]*$)/,""));var r=t(s);e&&e.preventDefault(),r.length||(r=o.closest(".alert")),r.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(r.removeClass("in"),t.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",i).emulateTransitionEnd(n.TRANSITION_DURATION):i())};var o=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=n,t.fn.alert.noConflict=function(){return t.fn.alert=o,this},t(document).on("click.bs.alert.data-api",i,n.prototype.close)}(jQuery)},243:function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.button"),s="object"==typeof e&&e;o||n.data("bs.button",o=new i(this,s)),"toggle"==e?o.toggle():e&&o.setState(e)})}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.isLoading=!1};i.VERSION="3.3.6",i.DEFAULTS={loadingText:"loading..."},i.prototype.setState=function(e){var i="disabled",n=this.$element,o=n.is("input")?"val":"html",s=n.data();e+="Text",null==s.resetText&&n.data("resetText",n[o]()),setTimeout(t.proxy(function(){n[o](null==s[e]?this.options[e]:s[e]),"loadingText"==e?(this.isLoading=!0,n.addClass(i).attr(i,i)):this.isLoading&&(this.isLoading=!1,n.removeClass(i).removeAttr(i))},this),0)},i.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")?(i.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==i.prop("type")&&(i.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),i.prop("checked",this.$element.hasClass("active")),t&&i.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var n=t.fn.button;t.fn.button=e,t.fn.button.Constructor=i,t.fn.button.noConflict=function(){return t.fn.button=n,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(i){var n=t(i.target);n.hasClass("btn")||(n=n.closest(".btn")),e.call(n,"toggle"),t(i.target).is('input[type="radio"]')||t(i.target).is('input[type="checkbox"]')||i.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery)},244:function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.carousel"),s=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e),r="string"==typeof e?e:s.slide;o||n.data("bs.carousel",o=new i(this,s)),"number"==typeof e?o.to(e):r?o[r]():s.interval&&o.pause().cycle()})}var i=function(e,i){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};i.VERSION="3.3.6",i.TRANSITION_DURATION=600,i.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},i.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},i.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},i.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},i.prototype.getItemForDirection=function(t,e){var i=this.getItemIndex(e),n="prev"==t&&0===i||"next"==t&&i==this.$items.length-1;if(n&&!this.options.wrap)return e;var o="prev"==t?-1:1,s=(i+o)%this.$items.length;return this.$items.eq(s)},i.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));return t>this.$items.length-1||0>t?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",this.$items.eq(t))},i.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},i.prototype.next=function(){return this.sliding?void 0:this.slide("next")},i.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},i.prototype.slide=function(e,n){var o=this.$element.find(".item.active"),s=n||this.getItemForDirection(e,o),r=this.interval,a="next"==e?"left":"right",l=this;if(s.hasClass("active"))return this.sliding=!1;var c=s[0],u=t.Event("slide.bs.carousel",{relatedTarget:c,direction:a});if(this.$element.trigger(u),!u.isDefaultPrevented()){if(this.sliding=!0,r&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var d=t(this.$indicators.children()[this.getItemIndex(s)]);d&&d.addClass("active")}var p=t.Event("slid.bs.carousel",{relatedTarget:c,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(s.addClass(e),s[0].offsetWidth,o.addClass(a),s.addClass(a),o.one("bsTransitionEnd",function(){s.removeClass([e,a].join(" ")).addClass("active"),o.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(p)},0)}).emulateTransitionEnd(i.TRANSITION_DURATION)):(o.removeClass("active"),s.addClass("active"),this.sliding=!1,this.$element.trigger(p)),r&&this.cycle(),this}};var n=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=i,t.fn.carousel.noConflict=function(){return t.fn.carousel=n,this};var o=function(i){var n,o=t(this),s=t(o.attr("data-target")||(n=o.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""));if(s.hasClass("carousel")){var r=t.extend({},s.data(),o.data()),a=o.attr("data-slide-to");a&&(r.interval=!1),e.call(s,r),a&&s.data("bs.carousel").to(a),i.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",o).on("click.bs.carousel.data-api","[data-slide-to]",o),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var i=t(this);e.call(i,i.data())})})}(jQuery)},245:function(t,e){+function(t){"use strict";function e(e){var i,n=e.attr("data-target")||(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return t(n)}function i(e){return this.each(function(){var i=t(this),o=i.data("bs.collapse"),s=t.extend({},n.DEFAULTS,i.data(),"object"==typeof e&&e);!o&&s.toggle&&/show|hide/.test(e)&&(s.toggle=!1),o||i.data("bs.collapse",o=new n(this,s)),"string"==typeof e&&o[e]()})}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};n.VERSION="3.3.6",n.TRANSITION_DURATION=350,n.DEFAULTS={toggle:!0},n.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},n.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,o=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(o&&o.length&&(e=o.data("bs.collapse"),e&&e.transitioning))){var s=t.Event("show.bs.collapse");if(this.$element.trigger(s),!s.isDefaultPrevented()){o&&o.length&&(i.call(o,"hide"),e||o.data("bs.collapse",null));var r=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[r](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[r](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var l=t.camelCase(["scroll",r].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(n.TRANSITION_DURATION)[r](this.$element[0][l])}}}},n.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var o=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[i](0).one("bsTransitionEnd",t.proxy(o,this)).emulateTransitionEnd(n.TRANSITION_DURATION):o.call(this)}}},n.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},n.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(i,n){var o=t(n);this.addAriaAndCollapsedClass(e(o),o)},this)).end()},n.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var o=t.fn.collapse;t.fn.collapse=i,t.fn.collapse.Constructor=n,t.fn.collapse.noConflict=function(){return t.fn.collapse=o,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(n){var o=t(this);o.attr("data-target")||n.preventDefault();var s=e(o),r=s.data("bs.collapse"),a=r?"toggle":o.data();i.call(s,a)})}(jQuery)},246:function(t,e){+function(t){"use strict";function e(e,n){return this.each(function(){var o=t(this),s=o.data("bs.modal"),r=t.extend({},i.DEFAULTS,o.data(),"object"==typeof e&&e);s||o.data("bs.modal",s=new i(this,r)),"string"==typeof e?s[e](n):r.show&&s.show(n)})}var i=function(e,i){this.options=i,this.$body=t(document.body),this.$element=t(e),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};i.VERSION="3.3.6",i.TRANSITION_DURATION=300,i.BACKDROP_TRANSITION_DURATION=150,i.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},i.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},i.prototype.show=function(e){var n=this,o=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(o),this.isShown||o.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){n.$element.one("mouseup.dismiss.bs.modal",function(e){t(e.target).is(n.$element)&&(n.ignoreBackdropClick=!0)})}),this.backdrop(function(){var o=t.support.transition&&n.$element.hasClass("fade");n.$element.parent().length||n.$element.appendTo(n.$body),n.$element.show().scrollTop(0),n.adjustDialog(),o&&n.$element[0].offsetWidth,n.$element.addClass("in"),n.enforceFocus();var s=t.Event("shown.bs.modal",{relatedTarget:e});o?n.$dialog.one("bsTransitionEnd",function(){n.$element.trigger("focus").trigger(s)}).emulateTransitionEnd(i.TRANSITION_DURATION):n.$element.trigger("focus").trigger(s)}))},i.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(i.TRANSITION_DURATION):this.hideModal())},i.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},i.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},i.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},i.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},i.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},i.prototype.backdrop=function(e){var n=this,o=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var s=t.support.transition&&o;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+o).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy(function(t){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),s&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;s?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var r=function(){n.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",r).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):r()}else e&&e()},i.prototype.handleUpdate=function(){this.adjustDialog()},i.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},i.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},i.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},i.prototype.init=function(e,i,n){if(this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),s=o.length;s--;){var r=o[s];if("click"==r)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=r){var a="hover"==r?"mouseenter":"focusin",l="hover"==r?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},i.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,n){i[t]!=n&&(e[t]=n)}),e},i.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusin"==e.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState?void(i.hoverState="in"):(clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show())},i.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},i.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusout"==e.type?"focus":"hover"]=!1),i.isInStateTrue()?void 0:(clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide())},i.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var n=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!n)return;var o=this,s=this.tip(),r=this.getUID(this.type);this.setContent(),s.attr("id",r),this.$element.attr("aria-describedby",r),this.options.animation&&s.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,s[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,c=l.test(a);c&&(a=a.replace(l,"")||"top"),s.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?s.appendTo(this.options.container):s.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var u=this.getPosition(),d=s[0].offsetWidth,p=s[0].offsetHeight;if(c){var h=a,f=this.getPosition(this.$viewport);a="bottom"==a&&u.bottom+p>f.bottom?"top":"top"==a&&u.top-pf.width?"left":"left"==a&&u.left-dr.top+r.height&&(o.top=r.top+r.height-l)}else{var c=e.left-s,u=e.left+s+i;cr.right&&(o.left=r.left+r.width-u)}return o},i.prototype.getTitle=function(){var t,e=this.$element,i=this.options;return t=e.attr("data-original-title")||("function"==typeof i.title?i.title.call(e[0]):i.title)},i.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},i.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},i.prototype.enable=function(){this.enabled=!0},i.prototype.disable=function(){this.enabled=!1},i.prototype.toggleEnabled=function(){this.enabled=!this.enabled},i.prototype.toggle=function(e){var i=this;e&&(i=t(e.currentTarget).data("bs."+this.type),i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i))),e?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)},i.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null})};var n=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=i,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=n,this}}(jQuery)},248:function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.popover"),s="object"==typeof e&&e;(o||!/destroy|hide/.test(e))&&(o||n.data("bs.popover",o=new i(this,s)),"string"==typeof e&&o[e]())})}var i=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");i.VERSION="3.3.6",i.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),i.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),i.prototype.constructor=i,i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof i?"html":"append":"text"](i),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},i.prototype.hasContent=function(){return this.getTitle()||this.getContent()},i.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var n=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=i,t.fn.popover.noConflict=function(){return t.fn.popover=n,this}}(jQuery)},249:function(t,e){+function(t){"use strict";function e(i,n){this.$body=t(document.body),this.$scrollElement=t(t(i).is(document.body)?window:i),this.options=t.extend({},e.DEFAULTS,n),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function i(i){return this.each(function(){var n=t(this),o=n.data("bs.scrollspy"),s="object"==typeof i&&i;o||n.data("bs.scrollspy",o=new e(this,s)),"string"==typeof i&&o[i]()})}e.VERSION="3.3.6",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,i="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(i="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),o=e.data("target")||e.attr("href"),s=/^#./.test(o)&&t(o);return s&&s.length&&s.is(":visible")&&[[s[i]().top+n,o]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),n=this.options.offset+i-this.$scrollElement.height(),o=this.offsets,s=this.targets,r=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),e>=n)return r!=(t=s[s.length-1])&&this.activate(t);if(r&&e=o[t]&&(void 0===o[t+1]||e .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),o&&o()}var r=n.find("> .active"),a=o&&t.support.transition&&(r.length&&r.hasClass("fade")||!!n.find("> .fade").length);r.length&&a?r.one("bsTransitionEnd",s).emulateTransitionEnd(i.TRANSITION_DURATION):s(),r.removeClass("in")};var n=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=n,this};var o=function(i){i.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',o).on("click.bs.tab.data-api",'[data-toggle="pill"]',o)}(jQuery)},251:function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.affix"),s="object"==typeof e&&e;o||n.data("bs.affix",o=new i(this,s)),"string"==typeof e&&o[e]()})}var i=function(e,n){this.options=t.extend({},i.DEFAULTS,n),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};i.VERSION="3.3.6",i.RESET="affix affix-top affix-bottom",i.DEFAULTS={offset:0,target:window},i.prototype.getState=function(t,e,i,n){var o=this.$target.scrollTop(),s=this.$element.offset(),r=this.$target.height();if(null!=i&&"top"==this.affixed)return i>o?"top":!1;if("bottom"==this.affixed)return null!=i?o+this.unpin<=s.top?!1:"bottom":t-n>=o+r?!1:"bottom";var a=null==this.affixed,l=a?o:s.top,c=a?r:e;return null!=i&&i>=o?"top":null!=n&&l+c>=t-n?"bottom":!1},i.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;
+this.$element.removeClass(i.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},i.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},i.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),n=this.options.offset,o=n.top,s=n.bottom,r=Math.max(t(document).height(),t(document.body).height());"object"!=typeof n&&(s=o=n),"function"==typeof o&&(o=n.top(this.$element)),"function"==typeof s&&(s=n.bottom(this.$element));var a=this.getState(r,e,o,s);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var l="affix"+(a?"-"+a:""),c=t.Event(l+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(i.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:r-e-s})}};var n=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=i,t.fn.affix.noConflict=function(){return t.fn.affix=n,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var i=t(this),n=i.data();n.offset=n.offset||{},null!=n.offsetBottom&&(n.offset.bottom=n.offsetBottom),null!=n.offsetTop&&(n.offset.top=n.offsetTop),e.call(i,n)})})}(jQuery)},252:function(t,e){/*! jquery-slugify - v1.2.3 - 2015-12-23
+ * Copyright (c) 2015 madflow; Licensed */
+!function(t){t.fn.slugify=function(e,i){return this.each(function(){var n=t(this),o=t(e);n.on("keyup change",function(){""!==n.val()&&void 0!==n.val()?n.data("locked",!0):n.data("locked",!1)}),o.on("keyup change",function(){!0!==n.data("locked")&&(n.is("input")||n.is("textarea")?n.val(t.slugify(o.val(),i)):n.text(t.slugify(o.val(),i)))})})},t.slugify=function(e,i){return i=t.extend({},t.slugify.options,i),i.lang=i.lang||t("html").prop("lang"),"function"==typeof i.preSlug&&(e=i.preSlug(e)),e=i.slugFunc(e,i),"function"==typeof i.postSlug&&(e=i.postSlug(e)),e},t.slugify.options={preSlug:null,postSlug:null,slugFunc:function(t,e){return window.getSlug(t,e)}}}(jQuery)}});
\ No newline at end of file
diff --git a/themes/grav/package.json b/themes/grav/package.json
new file mode 100644
index 00000000..3a931608
--- /dev/null
+++ b/themes/grav/package.json
@@ -0,0 +1,43 @@
+{
+ "name": "grav-admin",
+ "version": "1.0.0",
+ "description": "Grav Admin",
+ "repository": "https://github.com/getgrav/grav-admin",
+ "main": "app/main.js",
+ "scripts": {
+ "watch": "webpack --watch --progress --colors --config webpack.conf.js",
+ "dev": "webpack --progress --colors --config webpack.conf.js",
+ "prod": "NODE_ENV=production webpack -p --config webpack.conf.js",
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "author": "RocketTheme, LLC",
+ "license": "MIT",
+ "dependencies": {
+ "bootstrap": "^3.3.6",
+ "chartist": "^0.9.5",
+ "debounce": "^1.0.0",
+ "dropzone": "^4.2.0",
+ "eonasdan-bootstrap-datetimepicker": "^4.15.35",
+ "immutable": "^3.7.6",
+ "jquery-slugify": "^1.2.3",
+ "remodal": "^1.0.6",
+ "selectize": "^0.12.1",
+ "sortablejs": "^1.4.2",
+ "toastr": "^2.1.2",
+ "whatwg-fetch": "^0.10.1"
+ },
+ "devDependencies": {
+ "babel-core": "^6.3.26",
+ "babel-loader": "^6.2.0",
+ "babel-polyfill": "^6.3.14",
+ "babel-preset-es2015": "^6.3.13",
+ "eslint": "^1.10.3",
+ "eslint-loader": "^1.1.1",
+ "exports-loader": "^0.6.2",
+ "gulp": "^3.9.0",
+ "gulp-webpack": "^1.5.0",
+ "imports-loader": "^0.6.5",
+ "merge-stream": "^1.0.0",
+ "webpack": "^1.12.9"
+ }
+}
diff --git a/themes/grav/scss/template/_remodal.scss b/themes/grav/scss/template/_remodal.scss
index fbae69bd..034a0c2b 100644
--- a/themes/grav/scss/template/_remodal.scss
+++ b/themes/grav/scss/template/_remodal.scss
@@ -13,101 +13,146 @@
/* Hide scroll bar */
-html.remodal_lock, body.remodal_lock {
+html.remodal-is-locked {
overflow: hidden;
+
+ touch-action: none;
}
/* Anti FOUC */
.remodal, [data-remodal-id] {
- visibility: hidden;
+ display: none;
}
/* Overlay necessary styles */
.remodal-overlay {
position: fixed;
+ z-index: 99999;
+ top: -5000px;
+ right: -5000px;
+ bottom: -5000px;
+ left: -5000px;
+
+ display: none;
+}
+
+/* Necessary styles of the wrapper */
+
+.remodal-wrapper {
+ position: fixed;
+ z-index: 100000;
top: 0;
- left: 0;
right: 0;
bottom: 0;
- z-index: 10000;
+ left: 0;
display: none;
overflow: auto;
- -webkit-overflow-scrolling: touch;
+
text-align: center;
+ -webkit-overflow-scrolling: touch;
+
&:after {
- display: inline-block;
+ display: inline-block;
+
height: 100%;
margin-left: -0.05em;
- content: '';
- }
- /* Fix iPad, iPhone glitches */
- > * {
- -webkit-transform: translateZ(0px);
+ content: '';
}
}
+/* Fix iPad, iPhone glitches */
+
+.remodal-overlay,
+.remodal-wrapper {
+ backface-visibility: hidden;
+}
/* Modal dialog necessary styles */
.remodal {
position: relative;
+ outline: none;
+ text-size-adjust: 100%;
+}
+
+.remodal-is-initialized {
+ /* Disable Anti-FOUC */
display: inline-block;
- text-align: left;
}
-/* Background for effects */
+/* ==========================================================================
+ Remodal's default mobile first theme
+ ========================================================================== */
-.remodal-bg {
- @include transition-property (filter);
- @include transition-duration(0.2s);
- @include transition-timing-function(linear);
+/* Default theme styles for the background */
+
+.remodal-bg.remodal-is-opening,
+.remodal-bg.remodal-is-opened {
+ @include filter(blur(3px));
}
-// body.remodal_active .remodal-bg {
-// @include filter(blur(5px));
-// }
-
-/* Overlay default theme styles */
+/* Default theme styles of the overlay */
.remodal-overlay {
- opacity: 0;
- background: rgba(33, 36, 46, 0.8);
- @include transition(opacity 0.2s linear);
+ background: rgba(43, 46, 56, 0.9);
}
-body.remodal_active .remodal-overlay {
- opacity: 1;
+.remodal-overlay.remodal-is-opening,
+.remodal-overlay.remodal-is-closing {
+ animation-duration: 0.3s;
+ animation-fill-mode: forwards;
}
-/* Modal dialog default theme styles */
+.remodal-overlay.remodal-is-opening {
+ animation-name: remodal-overlay-opening-keyframes;
+}
+
+.remodal-overlay.remodal-is-closing {
+ animation-name: remodal-overlay-closing-keyframes;
+}
+
+/* Default theme styles of the wrapper */
+
+.remodal-wrapper {
+ padding: 10px 10px 0;
+}
+
+/* Default theme styles of the modal dialog */
.remodal {
+ box-sizing: border-box;
width: 100%;
- min-height: 100%;
- padding-top: 2rem;
- @include box-sizing(border-box);
- font-size: 16px;
- background: $content-bg;
- background-clip: padding-box;
- color: $content-fg;
- box-shadow: 0 10px 20px rgba(0,0,0,0.5);
- @include transform(scale(0.95));
- @include transition-property (transform);
- @include transition-duration(0.2s);
- @include transition-timing-function(linear);
+ margin-bottom: 10px;
+ padding: 35px;
+ transform: translate3d(0, 0, 0);
+
+ color: #2b2e38;
+ background: #fff;
}
-body.remodal_active .remodal {
- @include transform(scale(1));
+.remodal.remodal-is-opening,
+.remodal.remodal-is-closing {
+ animation-duration: 0.3s;
+ animation-fill-mode: forwards;
}
-/* Modal dialog vertical align */
-.remodal, .remodal-overlay:after {
+.remodal.remodal-is-opening {
+ animation-name: remodal-opening-keyframes;
+}
+
+.remodal.remodal-is-closing {
+ animation-name: remodal-closing-keyframes;
+}
+
+/* Vertical align of the modal dialog */
+
+.remodal,
+.remodal-wrapper:after {
vertical-align: middle;
}
@@ -115,42 +160,174 @@ body.remodal_active .remodal {
.remodal-close {
position: absolute;
- top: 10px;
- right: 10px;
- color: $content-fg;
+ top: 0;
+ left: 0;
- text-decoration: none;
- text-align: center;
-
- @include transition(background 0.2s linear);
-}
-
-.remodal-close:after {
display: block;
- font-family: FontAwesome;
- content: "\f00d";
+ overflow: visible;
+
+ width: 35px;
+ height: 35px;
+ margin: 0;
+ padding: 0;
- font-size: 28px;
- line-height: 28px;
cursor: pointer;
+ transition: color 0.2s;
text-decoration: none;
+ color: #95979c;
+ border: 0;
+ outline: 0;
+ background: transparent;
}
-.remodal-close:hover, .remodal-close:active {
- color: darken($content-fg, 20%);
+.remodal-close:hover,
+.remodal-close:focus {
+ color: #2b2e38;
}
+.remodal-close:before {
+ font-family: Arial, "Helvetica CY", "Nimbus Sans L", sans-serif !important;
+ font-size: 25px;
+ line-height: 35px;
+ position: absolute;
+ top: 0;
+ left: 0;
+
+ display: block;
+
+ width: 35px;
+
+ content: "\00d7";
+ text-align: center;
+}
+
+/* Dialog buttons */
+
+/*.remodal-confirm,
+.remodal-cancel {
+ font: inherit;
+
+ display: inline-block;
+ overflow: visible;
+
+ min-width: 110px;
+ margin: 0;
+ padding: 12px 0;
+
+ cursor: pointer;
+ transition: background 0.2s;
+ text-align: center;
+ vertical-align: middle;
+ text-decoration: none;
+
+ border: 0;
+ outline: 0;
+}
+
+.remodal-confirm {
+ color: #fff;
+ background: #81c784;
+}
+
+.remodal-confirm:hover,
+.remodal-confirm:focus {
+ background: #66bb6a;
+}
+
+.remodal-cancel {
+ color: #fff;
+ background: #e57373;
+}
+
+.remodal-cancel:hover,
+.remodal-cancel:focus {
+ background: #ef5350;
+}
+
+!* Remove inner padding and border in Firefox 4+ for the button tag. *!
+
+.remodal-confirm::-moz-focus-inner,
+.remodal-cancel::-moz-focus-inner,
+.remodal-close::-moz-focus-inner {
+ padding: 0;
+
+ border: 0;
+}*/
+
+/* Keyframes
+ ========================================================================== */
+
+@keyframes remodal-opening-keyframes {
+ from {
+ transform: scale(1.05);
+
+ opacity: 0;
+ }
+ to {
+ transform: none;
+
+ opacity: 1;
+ }
+}
+
+@keyframes remodal-closing-keyframes {
+ from {
+ transform: scale(1);
+
+ opacity: 1;
+ }
+ to {
+ transform: scale(0.95);
+
+ opacity: 0;
+ }
+}
+
+@keyframes remodal-overlay-opening-keyframes {
+ from {
+ opacity: 0;
+ }
+ to {
+ opacity: 1;
+ }
+}
+
+@keyframes remodal-overlay-closing-keyframes {
+ from {
+ opacity: 1;
+ }
+ to {
+ opacity: 0;
+ }
+}
/* Media queries
========================================================================== */
-@media only screen and (min-width: 40.063em) /* min-width 641px */ {
+@media only screen and (min-width: 641px) {
.remodal {
max-width: 700px;
- margin: 20px auto;
- min-height: 0;
- border-radius: 6px;
}
}
+
+/* IE8
+ ========================================================================== */
+
+.lt-ie9 .remodal-overlay {
+ background: #2b2e38;
+}
+
+.lt-ie9 .remodal {
+ width: 700px;
+}
+
+/********* GRAV CUSTOM ********/
+
+.remodal {
+ padding: 35px 0 0;
+ text-align: left;
+ box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
+ border-radius: 3px;
+}
diff --git a/themes/grav/templates/config.html.twig b/themes/grav/templates/config.html.twig
index ad567767..407a5e9e 100644
--- a/themes/grav/templates/config.html.twig
+++ b/themes/grav/templates/config.html.twig
@@ -15,8 +15,8 @@
{% endblock %}
{% block javascripts %}
- {% do assets.addJs(theme_url~'/js/codemirror-compressed.js') %}
- {% do assets.addJs(theme_url~'/js/mdeditor.js') %}
+ {#{% do assets.addJs(theme_url~'/js/codemirror-compressed.js') %}
+ {% do assets.addJs(theme_url~'/js/mdeditor.js') %}#}
{{ parent() }}
{% endblock %}
@@ -30,7 +30,7 @@
{% block content_top %}
{{ "PLUGIN_ADMIN.SAVE_LOCATION"|tu }}: {{ data.file.filename|replace({(base_path):''}) }}
-
+
{% if config_slug == 'system' %}{% else %}{% endif %}
{{ "PLUGIN_ADMIN.SYSTEM"|tu }}
@@ -41,7 +41,7 @@
{{ "PLUGIN_ADMIN.SITE"|tu }}
{% if config_slug == 'site' %} {% else %}{% endif %}
-
+
{% for configuration in admin.configurations %}
{% set current_blueprints = admin.data('config/' ~ configuration).blueprints.toArray() %}
{% if configuration != 'system' and configuration != 'site' and not current_blueprints.form.hidden and current_blueprints.form.fields is not empty %}
@@ -69,5 +69,19 @@
{% else %}
{% include 'partials/blueprints.html.twig' with { blueprints: data.blueprints, data: data } %}
{% endif %}
+
+
{% endblock %}
diff --git a/themes/grav/templates/dashboard.html.twig b/themes/grav/templates/dashboard.html.twig
index d128b6af..ac514389 100644
--- a/themes/grav/templates/dashboard.html.twig
+++ b/themes/grav/templates/dashboard.html.twig
@@ -6,15 +6,15 @@
{% if authorize(['admin.maintenance', 'admin.super']) %}
- {{ "PLUGIN_ADMIN.CLEAR_CACHE"|tu }}
+ {{ "PLUGIN_ADMIN.CLEAR_CACHE"|tu }}
diff --git a/themes/grav/templates/forms/field.html.twig b/themes/grav/templates/forms/field.html.twig
index 52fedda8..4d44a859 100644
--- a/themes/grav/templates/forms/field.html.twig
+++ b/themes/grav/templates/forms/field.html.twig
@@ -1,4 +1,6 @@
{% set originalValue = originalValue is defined ? originalValue : value %}
+{% set toggleableChecked = field.toggleable and (originalValue is not null and originalValue is not empty) %}
+{% set isDisabledToggleable = field.toggleable and not toggleableChecked %}
{% set value = (value is null ? field.default : value) %}
{% set vertical = field.style == 'vertical' %}
@@ -7,21 +9,21 @@
{% endif %}
{% block field %}
-
diff --git a/themes/grav/templates/forms/fields/pagemedia/pagemedia.html.twig b/themes/grav/templates/forms/fields/pagemedia/pagemedia.html.twig
index 47fd5287..e9ff8ab5 100644
--- a/themes/grav/templates/forms/fields/pagemedia/pagemedia.html.twig
+++ b/themes/grav/templates/forms/fields/pagemedia/pagemedia.html.twig
@@ -4,158 +4,8 @@
{% else %}
diff --git a/themes/grav/templates/forms/fields/pagemediaselect/pagemediaselect.html.twig b/themes/grav/templates/forms/fields/pagemediaselect/pagemediaselect.html.twig
index 9d8bd13e..e00234fd 100644
--- a/themes/grav/templates/forms/fields/pagemediaselect/pagemediaselect.html.twig
+++ b/themes/grav/templates/forms/fields/pagemediaselect/pagemediaselect.html.twig
@@ -24,7 +24,7 @@
{% if field.classes is defined %}class="{{ field.classes }}" {% endif %}
{% if field.id is defined %}id="{{ field.id|e }}" {% endif %}
{% if field.style is defined %}style="{{ field.style|e }}" {% endif %}
- {% if field.disabled or files is empty %}disabled="disabled"{% endif %}
+ {% if field.disabled or files is empty or isDisabledToggleable %}disabled="disabled"{% endif %}
{% if field.autofocus in ['on', 'true', 1] %}autofocus="autofocus"{% endif %}
{% if field.novalidate in ['on', 'true', 1] %}novalidate="novalidate"{% endif %}
{% if field.validate.required in ['on', 'true', 1] %}required="required"{% endif %}
diff --git a/themes/grav/templates/forms/fields/pages/pages.html.twig b/themes/grav/templates/forms/fields/pages/pages.html.twig
index ff4f9b49..2e35101c 100644
--- a/themes/grav/templates/forms/fields/pages/pages.html.twig
+++ b/themes/grav/templates/forms/fields/pages/pages.html.twig
@@ -7,7 +7,7 @@
{{ value|t }}
{% endfor %}
{% endif %}
-
+
{% if field.show_root and depth == 0 %}
/ (Root)
{% set depth = depth +1 %}
@@ -43,6 +43,7 @@
{% if field.novalidate in ['on', 'true', 1] %}novalidate="novalidate"{% endif %}
{% if field.validate.required in ['on', 'true', 1] %}required="required"{% endif %}
{% if field.multiple in ['on', 'true', 1] %}multiple="multiple"{% endif %}
+ {% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}
>
{{ _self.options(field,pages,value, 0) }}
diff --git a/themes/grav/templates/forms/fields/tabs/tabs.html.twig b/themes/grav/templates/forms/fields/tabs/tabs.html.twig
index f28d87c0..17f5879c 100644
--- a/themes/grav/templates/forms/fields/tabs/tabs.html.twig
+++ b/themes/grav/templates/forms/fields/tabs/tabs.html.twig
@@ -9,7 +9,7 @@
{% endif %}
{% if field.fields %}
- {% for tab in field.fields %}
{% if grav.twig.twig.filters['tu'] is defined %}{{ tab.title|tu }}{% else %}{{ tab.title|t }}{% endif %} {% endfor %}
+ {% for tab in field.fields %}
{% if grav.twig.twig.filters['tu'] is defined %}{{ tab.title|tu }}{% else %}{{ tab.title|t }}{% endif %} {% endfor %}
{% for field in field.fields %}
{% set value = data.value(field.name) %}
diff --git a/themes/grav/templates/forms/fields/themeselect/themeselect.html.twig b/themes/grav/templates/forms/fields/themeselect/themeselect.html.twig
index 78e2d5e6..edbc92bb 100644
--- a/themes/grav/templates/forms/fields/themeselect/themeselect.html.twig
+++ b/themes/grav/templates/forms/fields/themeselect/themeselect.html.twig
@@ -20,7 +20,7 @@
{% if field.novalidate in ['on', 'true', 1] %}novalidate="novalidate"{% endif %}
{% if field.validate.required in ['on', 'true', 1] %}required="required"{% endif %}
{% if field.multiple in ['on', 'true', 1] %}multiple="multiple"{% endif %}
- >
+ {% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}>
{% for key, text in options %}
{{ text }}
{% endfor %}
diff --git a/themes/grav/templates/forms/fields/toggle/toggle.html.twig b/themes/grav/templates/forms/fields/toggle/toggle.html.twig
index 76f85371..29ff794a 100644
--- a/themes/grav/templates/forms/fields/toggle/toggle.html.twig
+++ b/themes/grav/templates/forms/fields/toggle/toggle.html.twig
@@ -39,6 +39,7 @@
{% if field.highlight is defined %}
class="{{ field.highlight == '' ~ key ? 'highlight' : '' }}"
{% endif %}
+ {% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}
{% if field.toggleable %}
{% if '' ~ key == '' ~ value %}checked="checked" {% endif %}
{% if value is defined and (key == 1 or key == '1') %}checked="checked" {% endif %}
diff --git a/themes/grav/templates/pages.html.twig b/themes/grav/templates/pages.html.twig
index b6e17908..c7d18726 100644
--- a/themes/grav/templates/pages.html.twig
+++ b/themes/grav/templates/pages.html.twig
@@ -40,14 +40,14 @@
{% endblock %}
{% block javascripts %}
- {% do assets.addJs(theme_url~'/js/pages-all.js') %}
+ {#{% do assets.addJs(theme_url~'/js/pages-all.js') %}
{% do assets.addJs(theme_url~'/js/speakingurl.min.js') %}
{% do assets.addJs(theme_url~'/js/slugify.min.js') %}
{% if mode == 'edit' %}
{% do assets.addJs(theme_url~'/js/codemirror-compressed.js') %}
{% do assets.addJs(theme_url~'/js/mdeditor.js') %}
{% do assets.addJs(theme_url~'/js/dropzone.min.js') %}
- {% endif %}
+ {% endif %}#}
{{ parent() }}
{% endblock %}
@@ -260,7 +260,7 @@
{% else %}
{% endif %}
{% endfor %}
-
+{{ dump(data.extra) }}
{% if data.extra %}
{% for name, value in data.extra %}
{% if name not in ['_json','task','admin-nonce'] %}
diff --git a/themes/grav/templates/partials/dashboard-maintenance.html.twig b/themes/grav/templates/partials/dashboard-maintenance.html.twig
index 4c040ece..a1068968 100644
--- a/themes/grav/templates/partials/dashboard-maintenance.html.twig
+++ b/themes/grav/templates/partials/dashboard-maintenance.html.twig
@@ -5,40 +5,25 @@
{{ "PLUGIN_ADMIN.MAINTENANCE"|tu }}
-
+
- {{ "PLUGIN_ADMIN.UPDATED"|tu|lower }}
-
+
-
{{ backup.days }}{{ "PLUGIN_ADMIN.DAYS"|tu|lower }}
{{ "PLUGIN_ADMIN.LAST_BACKUP"|tu }}
- {{ "PLUGIN_ADMIN.UPDATE"|tu }}
+ {{ "PLUGIN_ADMIN.UPDATE"|tu }}
{{ "PLUGIN_ADMIN.BACKUP"|tu }}
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/themes/grav/templates/partials/dashboard-statistics.html.twig b/themes/grav/templates/partials/dashboard-statistics.html.twig
index db3402fa..901c5e0e 100644
--- a/themes/grav/templates/partials/dashboard-statistics.html.twig
+++ b/themes/grav/templates/partials/dashboard-statistics.html.twig
@@ -1,39 +1,8 @@
{% if authorize(['admin.statistics', 'admin.super']) %}
-
+
{{ "PLUGIN_ADMIN.STATISTICS"|tu }}
-
{{ popularity.getDailyTotal }}
@@ -50,4 +19,4 @@
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/themes/grav/templates/partials/page-move.html.twig b/themes/grav/templates/partials/page-move.html.twig
index 6f576560..4ab50ade 100644
--- a/themes/grav/templates/partials/page-move.html.twig
+++ b/themes/grav/templates/partials/page-move.html.twig
@@ -11,7 +11,7 @@
{% endfor %}
diff --git a/themes/grav/templates/partials/plugins-details.html.twig b/themes/grav/templates/partials/plugins-details.html.twig
index 78148045..089a844d 100644
--- a/themes/grav/templates/partials/plugins-details.html.twig
+++ b/themes/grav/templates/partials/plugins-details.html.twig
@@ -42,3 +42,17 @@
{{ "PLUGIN_ADMIN.INSTALL_PLUGIN"|tu }}
{% endif %}
+
+
diff --git a/themes/grav/templates/partials/themes-details.html.twig b/themes/grav/templates/partials/themes-details.html.twig
index 3cd5c71f..94093c6e 100644
--- a/themes/grav/templates/partials/themes-details.html.twig
+++ b/themes/grav/templates/partials/themes-details.html.twig
@@ -111,6 +111,16 @@
{% endif %}
-
-
-
+
diff --git a/themes/grav/templates/partials/themes-list.html.twig b/themes/grav/templates/partials/themes-list.html.twig
index 3e6e4f54..1a58737f 100644
--- a/themes/grav/templates/partials/themes-list.html.twig
+++ b/themes/grav/templates/partials/themes-list.html.twig
@@ -58,7 +58,7 @@
diff --git a/themes/grav/templates/plugins.html.twig b/themes/grav/templates/plugins.html.twig
index 3d8b17d0..21b1f04a 100644
--- a/themes/grav/templates/plugins.html.twig
+++ b/themes/grav/templates/plugins.html.twig
@@ -24,8 +24,8 @@
{% endblock %}
{% block javascripts %}
- {% do assets.addJs(theme_url~'/js/codemirror-compressed.js') %}
- {% do assets.addJs(theme_url~'/js/mdeditor.js') %}
+ {#{% do assets.addJs(theme_url~'/js/codemirror-compressed.js') %}
+ {% do assets.addJs(theme_url~'/js/mdeditor.js') %}#}
{{ parent() }}
{% endblock %}
{% endif %}
diff --git a/themes/grav/templates/themes.html.twig b/themes/grav/templates/themes.html.twig
index 36631310..e5377c1b 100644
--- a/themes/grav/templates/themes.html.twig
+++ b/themes/grav/templates/themes.html.twig
@@ -24,8 +24,8 @@
{% endblock %}
{% block javascripts %}
- {% do assets.addJs(theme_url~'/js/codemirror-compressed.js') %}
- {% do assets.addJs(theme_url~'/js/mdeditor.js') %}
+ {#{% do assets.addJs(theme_url~'/js/codemirror-compressed.js') %}
+ {% do assets.addJs(theme_url~'/js/mdeditor.js') %}#}
{{ parent() }}
{% endblock %}
{% endif %}
diff --git a/themes/grav/webpack.conf.js b/themes/grav/webpack.conf.js
new file mode 100644
index 00000000..aa64aedc
--- /dev/null
+++ b/themes/grav/webpack.conf.js
@@ -0,0 +1,44 @@
+var path = require('path'),
+ webpack = require('webpack');
+
+module.exports = {
+ entry: {
+ app: './app/main.js',
+ vendor: [
+ 'chartist',
+ 'selectize',
+ 'remodal',
+ 'toastr',
+ 'bootstrap',
+ 'sortablejs',
+ 'jquery-slugify',
+ 'dropzone',
+ 'eonasdan-bootstrap-datetimepicker'
+ ]
+ },
+ output: {
+ path: path.resolve(__dirname, 'js'),
+ library: 'Grav'
+ },
+ externals: {
+ jquery: 'jQuery',
+ 'grav-config': 'GravAdmin'
+ },
+ module: {
+ preLoaders: [
+ {
+ test: /\.js$/,
+ loader: 'eslint',
+ exclude: /node_modules/
+ }
+ ],
+ loaders: [
+ {
+ test: /\.js$/,
+ loader: 'babel',
+ exclude: /node_modules/,
+ query: { presets: ['es2015'] }
+ }
+ ]
+ }
+};