{"version":3,"file":"js/20459-3bc8c6cf573225ac4291.js","mappings":"uGAAAA,EAAQ,MAARA,CAAkEA,EAAQ,S,sBCA1E,EAAQ,MAAR,CAAkE,EAAQ,S,sBCA1E,EAAQ,MAAR,CAAkE,EAAQ,S,sBCA1E,EAAQ,MAAR,CAAkE,EAAQ,S,sBCA1E,EAAQ,MAAR,CAAkE,EAAQ,S,sBCA1E,EAAQ,MAAR,CAAkE,EAAQ,S,kBCA1EC,EAAOC,QAAU,wt9E,kBCAjBD,EAAOC,QAAU,40iB,kBCAjBD,EAAOC,QAAU,o2nD,kBCAjBD,EAAOC,QAAU,6o0E,kBCAjBD,EAAOC,QAAU,29qB,kBCAjBD,EAAOC,QAAU","sources":["webpack://StravaModern/./node_modules/@strava/autotrack/autotrack.js","webpack://StravaModern/./node_modules/blueimp-load-image/js/load-image.all.min.js","webpack://StravaModern/./node_modules/dexie/dist/dexie.min.js","webpack://StravaModern/./node_modules/dropzone/dist/dropzone.js","webpack://StravaModern/./node_modules/intersection-observer/intersection-observer.js","webpack://StravaModern/./node_modules/leaflet/dist/leaflet.js","webpack://StravaModern/./node_modules/@strava/autotrack/autotrack.js?e2d5","webpack://StravaModern/./node_modules/blueimp-load-image/js/load-image.all.min.js?c2bb","webpack://StravaModern/./node_modules/dexie/dist/dexie.min.js?dd6c","webpack://StravaModern/./node_modules/dropzone/dist/dropzone.js?4d8c","webpack://StravaModern/./node_modules/intersection-observer/intersection-observer.js?efd3","webpack://StravaModern/./node_modules/leaflet/dist/leaflet.js?982a"],"sourcesContent":["require(\"!!/usr/src/app/node_modules/script-loader/addScript.js\")(require(\"!!/usr/src/app/node_modules/script-loader/node_modules/raw-loader/index.js!/usr/src/app/node_modules/@strava/autotrack/autotrack.js\"))","require(\"!!/usr/src/app/node_modules/script-loader/addScript.js\")(require(\"!!/usr/src/app/node_modules/script-loader/node_modules/raw-loader/index.js!/usr/src/app/node_modules/blueimp-load-image/js/load-image.all.min.js\"))","require(\"!!/usr/src/app/node_modules/script-loader/addScript.js\")(require(\"!!/usr/src/app/node_modules/script-loader/node_modules/raw-loader/index.js!/usr/src/app/node_modules/dexie/dist/dexie.min.js\"))","require(\"!!/usr/src/app/node_modules/script-loader/addScript.js\")(require(\"!!/usr/src/app/node_modules/script-loader/node_modules/raw-loader/index.js!/usr/src/app/node_modules/dropzone/dist/dropzone.js\"))","require(\"!!/usr/src/app/node_modules/script-loader/addScript.js\")(require(\"!!/usr/src/app/node_modules/script-loader/node_modules/raw-loader/index.js!/usr/src/app/node_modules/intersection-observer/intersection-observer.js\"))","require(\"!!/usr/src/app/node_modules/script-loader/addScript.js\")(require(\"!!/usr/src/app/node_modules/script-loader/node_modules/raw-loader/index.js!/usr/src/app/node_modules/leaflet/dist/leaflet.js\"))","module.exports = \"(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\\\"function\\\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\\\"Cannot find module '\\\"+o+\\\"'\\\");throw f.code=\\\"MODULE_NOT_FOUND\\\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\\\"function\\\"&&require;for(var o=0;o 0 || i.bottom > 0 || i.left > 0 || i.right > 0;\\n }\\n else {\\n return record.intersectionRatio >= threshold;\\n }\\n}\\n\\n},{\\\"../provide\\\":12,\\\"../usage\\\":13,\\\"../utilities\\\":14,\\\"object-assign\\\":23}],6:[function(require,module,exports){\\n/**\\n * Copyright 2016 Google Inc. All Rights Reserved.\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n\\nvar assign = require('object-assign');\\nvar debounce = require('debounce');\\nvar constants = require('../constants');\\nvar provide = require('../provide');\\nvar usage = require('../usage');\\nvar createFieldsObj = require('../utilities').createFieldsObj;\\nvar isObject = require('../utilities').isObject;\\nvar toArray = require('../utilities').toArray;\\n\\n\\n/**\\n * Declares the MediaQueryListener instance cache.\\n */\\nvar mediaMap = {};\\n\\n\\n/**\\n * Registers media query tracking.\\n * @constructor\\n * @param {Object} tracker Passed internally by analytics.js\\n * @param {?Object} opts Passed by the require command.\\n */\\nfunction MediaQueryTracker(tracker, opts) {\\n\\n usage.track(tracker, usage.plugins.MEDIA_QUERY_TRACKER);\\n\\n // Feature detects to prevent errors in unsupporting browsers.\\n if (!window.matchMedia) return;\\n\\n this.opts = assign({\\n definitions: null,\\n changeTemplate: this.changeTemplate,\\n changeTimeout: 1000,\\n fieldsObj: {},\\n hitFilter: null\\n }, opts);\\n\\n // Exits early if media query data doesn't exist.\\n if (!isObject(this.opts.definitions)) return;\\n\\n this.opts.definitions = toArray(this.opts.definitions);\\n this.tracker = tracker;\\n this.changeListeners = [];\\n\\n this.processMediaQueries();\\n}\\n\\n\\n/**\\n * Loops through each media query definition, sets the custom dimenion data,\\n * and adds the change listeners.\\n */\\nMediaQueryTracker.prototype.processMediaQueries = function() {\\n this.opts.definitions.forEach(function(definition) {\\n // Only processes definitions with a name and index.\\n if (definition.name && definition.dimensionIndex) {\\n var mediaName = this.getMatchName(definition);\\n this.tracker.set('dimension' + definition.dimensionIndex, mediaName);\\n\\n this.addChangeListeners(definition);\\n }\\n }.bind(this));\\n};\\n\\n\\n/**\\n * Takes a definition object and return the name of the matching media item.\\n * If no match is found, the NULL_DIMENSION value is returned.\\n * @param {Object} definition A set of named media queries associated\\n * with a single custom dimension.\\n * @return {string} The name of the matched media or NULL_DIMENSION.\\n */\\nMediaQueryTracker.prototype.getMatchName = function(definition) {\\n var match;\\n\\n definition.items.forEach(function(item) {\\n if (getMediaListener(item.media).matches) {\\n match = item;\\n }\\n });\\n return match ? match.name : constants.NULL_DIMENSION;\\n};\\n\\n\\n/**\\n * Adds change listeners to each media query in the definition list.\\n * Debounces the changes to prevent unnecessary hits from being sent.\\n * @param {Object} definition A set of named media queries associated\\n * with a single custom dimension\\n */\\nMediaQueryTracker.prototype.addChangeListeners = function(definition) {\\n definition.items.forEach(function(item) {\\n var mql = getMediaListener(item.media);\\n var fn = debounce(function() {\\n this.handleChanges(definition);\\n }.bind(this), this.opts.changeTimeout);\\n\\n mql.addListener(fn);\\n this.changeListeners.push({mql: mql, fn: fn});\\n }.bind(this));\\n};\\n\\n\\n/**\\n * Handles changes to the matched media. When the new value differs from\\n * the old value, a change event is sent.\\n * @param {Object} definition A set of named media queries associated\\n * with a single custom dimension\\n */\\nMediaQueryTracker.prototype.handleChanges = function(definition) {\\n var newValue = this.getMatchName(definition);\\n var oldValue = this.tracker.get('dimension' + definition.dimensionIndex);\\n\\n if (newValue !== oldValue) {\\n this.tracker.set('dimension' + definition.dimensionIndex, newValue);\\n\\n var defaultFields = {\\n eventCategory: definition.name,\\n eventAction: 'change',\\n eventLabel: this.opts.changeTemplate(oldValue, newValue)\\n };\\n this.tracker.send('event', createFieldsObj(\\n defaultFields, this.opts.fieldsObj, this.tracker, this.opts.hitFilter));\\n }\\n};\\n\\n\\n/**\\n * Removes all event listeners and instance properties.\\n */\\nMediaQueryTracker.prototype.remove = function() {\\n for (var i = 0, listener; listener = this.changeListeners[i]; i++) {\\n listener.mql.removeListener(listener.fn);\\n }\\n};\\n\\n\\n/**\\n * Sets the default formatting of the change event label.\\n * This can be overridden by setting the `changeTemplate` option.\\n * @param {string} oldValue The value of the media query prior to the change.\\n * @param {string} newValue The value of the media query after the change.\\n * @return {string} The formatted event label.\\n */\\nMediaQueryTracker.prototype.changeTemplate = function(oldValue, newValue) {\\n return oldValue + ' => ' + newValue;\\n};\\n\\n\\n/**\\n * Accepts a media query and returns a MediaQueryListener object.\\n * Caches the values to avoid multiple unnecessary instances.\\n * @param {string} media A media query value.\\n * @return {MediaQueryListener} The matched media.\\n */\\nfunction getMediaListener(media) {\\n // Returns early if the media is cached.\\n if (mediaMap[media]) return mediaMap[media];\\n\\n mediaMap[media] = window.matchMedia(media);\\n return mediaMap[media];\\n}\\n\\n\\nprovide('mediaQueryTracker', MediaQueryTracker);\\n\\n},{\\\"../constants\\\":1,\\\"../provide\\\":12,\\\"../usage\\\":13,\\\"../utilities\\\":14,\\\"debounce\\\":16,\\\"object-assign\\\":23}],7:[function(require,module,exports){\\n/**\\n * Copyright 2016 Google Inc. All Rights Reserved.\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n\\nvar assign = require('object-assign');\\nvar delegate = require('dom-utils/lib/delegate');\\nvar parseUrl = require('dom-utils/lib/parse-url');\\nvar provide = require('../provide');\\nvar usage = require('../usage');\\nvar createFieldsObj = require('../utilities').createFieldsObj;\\nvar getAttributeFields = require('../utilities').getAttributeFields;\\nvar withTimeout = require('../utilities').withTimeout;\\n\\n\\n/**\\n * Registers outbound form tracking.\\n * @constructor\\n * @param {Object} tracker Passed internally by analytics.js\\n * @param {?Object} opts Passed by the require command.\\n */\\nfunction OutboundFormTracker(tracker, opts) {\\n\\n usage.track(tracker, usage.plugins.OUTBOUND_FORM_TRACKER);\\n\\n // Feature detects to prevent errors in unsupporting browsers.\\n if (!window.addEventListener) return;\\n\\n this.opts = assign({\\n formSelector: 'form',\\n shouldTrackOutboundForm: this.shouldTrackOutboundForm,\\n fieldsObj: {},\\n attributePrefix: 'ga-',\\n hitFilter: null\\n }, opts);\\n\\n this.tracker = tracker;\\n\\n this.delegate = delegate(document, 'submit', 'form',\\n this.handleFormSubmits.bind(this), {composed: true, useCapture: true});\\n}\\n\\n\\n/**\\n * Handles all submits on form elements. A form submit is considered outbound\\n * if its action attribute starts with http and does not contain\\n * location.hostname.\\n * When the beacon transport method is not available, the event's default\\n * action is prevented and re-emitted after the hit is sent.\\n * @param {Event} event The DOM submit event.\\n * @param {Element} form The delegated event target.\\n */\\nOutboundFormTracker.prototype.handleFormSubmits = function(event, form) {\\n\\n var action = parseUrl(form.action).href;\\n var defaultFields = {\\n transport: 'beacon',\\n eventCategory: 'Outbound Form',\\n eventAction: 'submit',\\n eventLabel: action\\n };\\n\\n if (this.opts.shouldTrackOutboundForm(form, parseUrl)) {\\n\\n if (!navigator.sendBeacon) {\\n // Stops the submit and waits until the hit is complete (with timeout)\\n // for browsers that don't support beacon.\\n event.preventDefault();\\n defaultFields.hitCallback = withTimeout(function() {\\n form.submit();\\n });\\n }\\n\\n var userFields = assign({}, this.opts.fieldsObj,\\n getAttributeFields(form, this.opts.attributePrefix));\\n\\n this.tracker.send('event', createFieldsObj(\\n defaultFields, userFields, this.tracker, this.opts.hitFilter, form));\\n }\\n};\\n\\n\\n/**\\n * Determines whether or not the tracker should send a hit when a form is\\n * submitted. By default, forms with an action attribute that starts with\\n * \\\"http\\\" and doesn't contain the current hostname are tracked.\\n * @param {Element} form The form that was submitted.\\n * @param {Function} parseUrl A cross-browser utility method for url parsing.\\n * @return {boolean} Whether or not the form should be tracked.\\n */\\nOutboundFormTracker.prototype.shouldTrackOutboundForm =\\n function(form, parseUrl) {\\n\\n var url = parseUrl(form.action);\\n return url.hostname != location.hostname &&\\n url.protocol.slice(0, 4) == 'http';\\n};\\n\\n\\n/**\\n * Removes all event listeners and instance properties.\\n */\\nOutboundFormTracker.prototype.remove = function() {\\n this.delegate.destroy();\\n};\\n\\n\\nprovide('outboundFormTracker', OutboundFormTracker);\\n\\n},{\\\"../provide\\\":12,\\\"../usage\\\":13,\\\"../utilities\\\":14,\\\"dom-utils/lib/delegate\\\":18,\\\"dom-utils/lib/parse-url\\\":22,\\\"object-assign\\\":23}],8:[function(require,module,exports){\\n/**\\n * Copyright 2016 Google Inc. All Rights Reserved.\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n\\nvar assign = require('object-assign');\\nvar delegate = require('dom-utils/lib/delegate');\\nvar parseUrl = require('dom-utils/lib/parse-url');\\nvar provide = require('../provide');\\nvar usage = require('../usage');\\nvar createFieldsObj = require('../utilities').createFieldsObj;\\nvar getAttributeFields = require('../utilities').getAttributeFields;\\n\\n\\n/**\\n * Registers outbound link tracking on a tracker object.\\n * @constructor\\n * @param {Object} tracker Passed internally by analytics.js\\n * @param {?Object} opts Passed by the require command.\\n */\\nfunction OutboundLinkTracker(tracker, opts) {\\n\\n usage.track(tracker, usage.plugins.OUTBOUND_LINK_TRACKER);\\n\\n // Feature detects to prevent errors in unsupporting browsers.\\n if (!window.addEventListener) return;\\n\\n this.opts = assign({\\n events: ['click'],\\n linkSelector: 'a, area',\\n shouldTrackOutboundLink: this.shouldTrackOutboundLink,\\n fieldsObj: {},\\n attributePrefix: 'ga-',\\n hitFilter: null\\n }, opts);\\n\\n this.tracker = tracker;\\n\\n // Binds methods.\\n this.handleLinkInteractions = this.handleLinkInteractions.bind(this);\\n\\n // Creates a mapping of events to their delegates\\n this.delegates = {};\\n this.opts.events.forEach(function(event) {\\n this.delegates[event] = delegate(document, event, this.opts.linkSelector,\\n this.handleLinkInteractions, {composed: true, useCapture: true});\\n }.bind(this));\\n}\\n\\n\\n/**\\n * Handles all interactions on link elements. A link is considered an outbound\\n * link if its hostname property does not match location.hostname. When the\\n * beacon transport method is not available, the links target is set to\\n * \\\"_blank\\\" to ensure the hit can be sent.\\n * @param {Event} event The DOM click event.\\n * @param {Element} link The delegated event target.\\n */\\nOutboundLinkTracker.prototype.handleLinkInteractions = function(event, link) {\\n\\n if (this.opts.shouldTrackOutboundLink(link, parseUrl)) {\\n // Opens outbound links in a new tab if the browser doesn't support\\n // the beacon transport method.\\n if (!navigator.sendBeacon) {\\n link.target = '_blank';\\n }\\n\\n var href = link.getAttribute('href') || link.getAttribute('xlink:href');\\n var url = parseUrl(href);\\n\\n var defaultFields = {\\n transport: 'beacon',\\n eventCategory: 'Outbound Link',\\n eventAction: event.type,\\n eventLabel: url.href\\n };\\n\\n var userFields = assign({}, this.opts.fieldsObj,\\n getAttributeFields(link, this.opts.attributePrefix));\\n\\n this.tracker.send('event', createFieldsObj(\\n defaultFields, userFields, this.tracker, this.opts.hitFilter, link));\\n }\\n};\\n\\n\\n/**\\n * Determines whether or not the tracker should send a hit when a link is\\n * clicked. By default links with a hostname property not equal to the current\\n * hostname are tracked.\\n * @param {Element} link The link that was clicked on.\\n * @param {Function} parseUrl A cross-browser utility method for url parsing.\\n * @return {boolean} Whether or not the link should be tracked.\\n */\\nOutboundLinkTracker.prototype.shouldTrackOutboundLink =\\n function(link, parseUrl) {\\n\\n var href = link.getAttribute('href') || link.getAttribute('xlink:href');\\n var url = parseUrl(href);\\n return url.hostname != location.hostname &&\\n url.protocol.slice(0, 4) == 'http';\\n};\\n\\n\\n/**\\n * Removes all event listeners and instance properties.\\n */\\nOutboundLinkTracker.prototype.remove = function() {\\n Object.keys(this.delegates).forEach(function(key) {\\n this.delegates[key].destroy();\\n }.bind(this));\\n};\\n\\n\\nprovide('outboundLinkTracker', OutboundLinkTracker);\\n\\n},{\\\"../provide\\\":12,\\\"../usage\\\":13,\\\"../utilities\\\":14,\\\"dom-utils/lib/delegate\\\":18,\\\"dom-utils/lib/parse-url\\\":22,\\\"object-assign\\\":23}],9:[function(require,module,exports){\\n/**\\n * Copyright 2016 Google Inc. All Rights Reserved.\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n\\nvar assign = require('object-assign');\\nvar provide = require('../provide');\\nvar usage = require('../usage');\\nvar createFieldsObj = require('../utilities').createFieldsObj;\\nvar isObject = require('../utilities').isObject;\\n\\n\\nvar DEFAULT_SESSION_TIMEOUT = 30; // 30 minutes.\\n\\n\\n/**\\n * Registers outbound link tracking on tracker object.\\n * @constructor\\n * @param {Object} tracker Passed internally by analytics.js\\n * @param {?Object} opts Passed by the require command.\\n */\\nfunction PageVisibilityTracker(tracker, opts) {\\n\\n usage.track(tracker, usage.plugins.PAGE_VISIBILITY_TRACKER);\\n\\n // Feature detects to prevent errors in unsupporting browsers.\\n if (!window.addEventListener) return;\\n\\n this.opts = assign({\\n sessionTimeout: DEFAULT_SESSION_TIMEOUT,\\n changeTemplate: this.changeTemplate,\\n hiddenMetricIndex: null,\\n visibleMetricIndex: null,\\n fieldsObj: {},\\n hitFilter: null\\n }, opts);\\n\\n this.tracker = tracker;\\n this.visibilityState = document.visibilityState;\\n\\n // Consider the plugin creation to be the start of the visibility change\\n // time calculations.\\n this.lastVisibilityChangeTime = +new Date;\\n\\n // Binds methods to `this`.\\n this.handleVisibilityStateChange =\\n this.handleVisibilityStateChange.bind(this);\\n\\n this.overrideTrackerSendMethod();\\n this.overrideTrackerSendHitTask();\\n\\n document.addEventListener(\\n 'visibilitychange', this.handleVisibilityStateChange);\\n}\\n\\n\\n/**\\n * Handles changes to `document.visibilityState`. This method sends events when\\n * the visibility state changes during active sessions (active meaning the\\n * session has not timed out). If the session has timed out, a return to a\\n * visibility state of visible will trigger a new pageview (instead of a\\n * visibility change event). Lastly, this method keeps track of the elapsed\\n * time a document's visibility state was visible and sends that as the event\\n * value for hidden events, allowing you to more accurately derive how long\\n * a user spent active during a session.\\n */\\nPageVisibilityTracker.prototype.handleVisibilityStateChange = function() {\\n\\n var defaultFields;\\n this.prevVisibilityState = this.visibilityState;\\n this.visibilityState = document.visibilityState;\\n\\n if (this.sessionHasTimedOut()) {\\n // Prevents sending 'hidden' state hits when the session has timed out.\\n if (this.visibilityState == 'hidden') return;\\n\\n if (this.visibilityState == 'visible') {\\n // If the session has timed out, a transition to \\\"visible\\\" should be\\n // considered a new pageview and a new session.\\n defaultFields = {transport: 'beacon'};\\n this.tracker.send('pageview', createFieldsObj(defaultFields,\\n this.opts.fieldsObj, this.tracker, this.opts.hitFilter));\\n }\\n }\\n else {\\n // Rounds the time up to the nearest second. If the rounded value is zero\\n // use 1 instead since unset metrics default to 0.\\n var timeDeltaInSeconds = Math.round(\\n (new Date - this.lastVisibilityChangeTime) / 1000) || 1;\\n\\n defaultFields = {\\n transport: 'beacon',\\n eventCategory: 'Page Visibility',\\n eventAction: 'change',\\n eventLabel: this.opts.changeTemplate(\\n this.prevVisibilityState, this.visibilityState),\\n eventValue: timeDeltaInSeconds\\n };\\n\\n // Changes to hidden are non interaction hits by default\\n if (this.visibilityState == 'hidden') defaultFields.nonInteraction = true;\\n\\n // If a custom metric was specified for the current visibility state,\\n // give it the same as the event value.\\n var metric = this.opts[this.prevVisibilityState + 'MetricIndex'];\\n if (metric) defaultFields['metric' + metric] = timeDeltaInSeconds;\\n\\n this.tracker.send('event', createFieldsObj(defaultFields,\\n this.opts.fieldsObj, this.tracker, this.opts.hitFilter));\\n }\\n\\n // Updates the time the last visibility state change event occurred, so\\n // change events can report the delta.\\n this.lastVisibilityChangeTime = +new Date;\\n};\\n\\n\\n/**\\n * Returns true if the session has not timed out. A session timeout occurs when\\n * more than `this.opts.sessionTimeout` minutes has elapsed since the\\n * tracker sent the previous hit.\\n * @return {boolean} True if the session has timed out.\\n */\\nPageVisibilityTracker.prototype.sessionHasTimedOut = function() {\\n var minutesSinceLastHit = (new Date - this.lastHitTime) / (60 * 1000);\\n return this.opts.sessionTimeout < minutesSinceLastHit;\\n};\\n\\n\\n/**\\n * Overrides the `tracker.send` method to send a pageview hit before the\\n * current hit being sent if the session has timed out and the current hit is\\n * not a pageview itself.\\n */\\nPageVisibilityTracker.prototype.overrideTrackerSendMethod = function() {\\n this.originalTrackerSendMethod = this.tracker.send;\\n\\n this.tracker.send = function() {\\n var args = Array.prototype.slice.call(arguments);\\n var firstArg = args[0];\\n var hitType = isObject(firstArg) ? firstArg.hitType : firstArg;\\n var isPageview = hitType == 'pageview';\\n\\n if (!isPageview && this.sessionHasTimedOut()) {\\n var defaultFields = {transport: 'beacon'};\\n this.originalTrackerSendMethod.call(this.tracker, 'pageview',\\n createFieldsObj(defaultFields, this.opts.fieldsObj,\\n this.tracker, this.opts.hitFilter));\\n }\\n\\n this.originalTrackerSendMethod.apply(this.tracker, args);\\n }.bind(this);\\n};\\n\\n\\n/**\\n * Overrides the tracker's `sendHitTask` to record the time of the previous\\n * hit. This is used to determine whether or not a session has timed out.\\n */\\nPageVisibilityTracker.prototype.overrideTrackerSendHitTask = function() {\\n this.originalTrackerSendHitTask = this.tracker.get('sendHitTask');\\n this.lastHitTime = +new Date;\\n\\n this.tracker.set('sendHitTask', function(model) {\\n this.originalTrackerSendHitTask(model);\\n this.lastHitTime = +new Date;\\n }.bind(this));\\n};\\n\\n\\n/**\\n * Sets the default formatting of the change event label.\\n * This can be overridden by setting the `changeTemplate` option.\\n * @param {string} oldValue The value of the media query prior to the change.\\n * @param {string} newValue The value of the media query after the change.\\n * @return {string} The formatted event label.\\n */\\nPageVisibilityTracker.prototype.changeTemplate = function(oldValue, newValue) {\\n return oldValue + ' => ' + newValue;\\n};\\n\\n\\n/**\\n * Removes all event listeners and instance properties.\\n */\\n PageVisibilityTracker.prototype.remove = function() {\\n this.tracker.set('sendHitTask', this.originalTrackerSendHitTask);\\n this.tracker.send = this.originalTrackerSendMethod;\\n\\n document.removeEventListener(\\n 'visibilitychange', this.handleVisibilityStateChange);\\n};\\n\\n\\nprovide('pageVisibilityTracker', PageVisibilityTracker);\\n\\n},{\\\"../provide\\\":12,\\\"../usage\\\":13,\\\"../utilities\\\":14,\\\"object-assign\\\":23}],10:[function(require,module,exports){\\n/**\\n * Copyright 2016 Google Inc. All Rights Reserved.\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n\\n/* global FB, twttr */\\n\\n\\nvar assign = require('object-assign');\\nvar provide = require('../provide');\\nvar usage = require('../usage');\\nvar createFieldsObj = require('../utilities').createFieldsObj;\\n\\n\\n/**\\n * Registers social tracking on tracker object.\\n * Supports both declarative social tracking via HTML attributes as well as\\n * tracking for social events when using official Twitter or Facebook widgets.\\n * @constructor\\n * @param {Object} tracker Passed internally by analytics.js\\n * @param {?Object} opts Passed by the require command.\\n */\\nfunction SocialWidgetTracker(tracker, opts) {\\n\\n usage.track(tracker, usage.plugins.SOCIAL_WIDGET_TRACKER);\\n\\n // Feature detects to prevent errors in unsupporting browsers.\\n if (!window.addEventListener) return;\\n\\n this.opts = assign({\\n fieldsObj: {},\\n hitFilter: null\\n }, opts);\\n\\n this.tracker = tracker;\\n\\n // Binds methods to `this`.\\n this.addWidgetListeners = this.addWidgetListeners.bind(this);\\n this.addTwitterEventHandlers = this.addTwitterEventHandlers.bind(this);\\n this.handleTweetEvents = this.handleTweetEvents.bind(this);\\n this.handleFollowEvents = this.handleFollowEvents.bind(this);\\n this.handleLikeEvents = this.handleLikeEvents.bind(this);\\n this.handleUnlikeEvents = this.handleUnlikeEvents.bind(this);\\n\\n if (document.readyState != 'complete') {\\n // Adds the widget listeners after the window's `load` event fires.\\n // If loading widgets using the officially recommended snippets, they\\n // will be available at `window.load`. If not users can call the\\n // `addWidgetListeners` method manually.\\n window.addEventListener('load', this.addWidgetListeners);\\n }\\n else {\\n this.addWidgetListeners();\\n }\\n}\\n\\n\\n/**\\n * Invokes the methods to add Facebook and Twitter widget event listeners.\\n * Ensures the respective global namespaces are present before adding.\\n */\\nSocialWidgetTracker.prototype.addWidgetListeners = function() {\\n if (window.FB) this.addFacebookEventHandlers();\\n if (window.twttr) this.addTwitterEventHandlers();\\n};\\n\\n\\n/**\\n * Adds event handlers for the \\\"tweet\\\" and \\\"follow\\\" events emitted by the\\n * official tweet and follow buttons. Note: this does not capture tweet or\\n * follow events emitted by other Twitter widgets (tweet, timeline, etc.).\\n */\\nSocialWidgetTracker.prototype.addTwitterEventHandlers = function() {\\n try {\\n twttr.ready(function() {\\n twttr.events.bind('tweet', this.handleTweetEvents);\\n twttr.events.bind('follow', this.handleFollowEvents);\\n }.bind(this));\\n } catch(err) {}\\n};\\n\\n\\n/**\\n * Removes event handlers for the \\\"tweet\\\" and \\\"follow\\\" events emitted by the\\n * official tweet and follow buttons.\\n */\\nSocialWidgetTracker.prototype.removeTwitterEventHandlers = function() {\\n try {\\n twttr.ready(function() {\\n twttr.events.unbind('tweet', this.handleTweetEvents);\\n twttr.events.unbind('follow', this.handleFollowEvents);\\n }.bind(this));\\n } catch(err) {}\\n};\\n\\n\\n/**\\n * Adds event handlers for the \\\"like\\\" and \\\"unlike\\\" events emitted by the\\n * official Facebook like button.\\n */\\nSocialWidgetTracker.prototype.addFacebookEventHandlers = function() {\\n try {\\n FB.Event.subscribe('edge.create', this.handleLikeEvents);\\n FB.Event.subscribe('edge.remove', this.handleUnlikeEvents);\\n } catch(err) {}\\n};\\n\\n\\n/**\\n * Removes event handlers for the \\\"like\\\" and \\\"unlike\\\" events emitted by the\\n * official Facebook like button.\\n */\\nSocialWidgetTracker.prototype.removeFacebookEventHandlers = function() {\\n try {\\n FB.Event.unsubscribe('edge.create', this.handleLikeEvents);\\n FB.Event.unsubscribe('edge.remove', this.handleUnlikeEvents);\\n } catch(err) {}\\n};\\n\\n\\n/**\\n * Handles `tweet` events emitted by the Twitter JS SDK.\\n * @param {Object} event The Twitter event object passed to the handler.\\n */\\nSocialWidgetTracker.prototype.handleTweetEvents = function(event) {\\n // Ignores tweets from widgets that aren't the tweet button.\\n if (event.region != 'tweet') return;\\n\\n var url = event.data.url || event.target.getAttribute('data-url') ||\\n location.href;\\n\\n var defaultFields = {\\n transport: 'beacon',\\n socialNetwork: 'Twitter',\\n socialAction: 'tweet',\\n socialTarget: url\\n };\\n this.tracker.send('social', createFieldsObj(defaultFields,\\n this.opts.fieldsObj, this.tracker, this.opts.hitFilter));\\n};\\n\\n\\n/**\\n * Handles `follow` events emitted by the Twitter JS SDK.\\n * @param {Object} event The Twitter event object passed to the handler.\\n */\\nSocialWidgetTracker.prototype.handleFollowEvents = function(event) {\\n // Ignore follows from widgets that aren't the follow button.\\n if (event.region != 'follow') return;\\n\\n var screenName = event.data.screen_name ||\\n event.target.getAttribute('data-screen-name');\\n\\n var defaultFields = {\\n transport: 'beacon',\\n socialNetwork: 'Twitter',\\n socialAction: 'follow',\\n socialTarget: screenName\\n };\\n this.tracker.send('social', createFieldsObj(defaultFields,\\n this.opts.fieldsObj, this.tracker, this.opts.hitFilter));\\n};\\n\\n\\n/**\\n * Handles `like` events emitted by the Facebook JS SDK.\\n * @param {string} url The URL corresponding to the like event.\\n */\\nSocialWidgetTracker.prototype.handleLikeEvents = function(url) {\\n var defaultFields = {\\n transport: 'beacon',\\n socialNetwork: 'Facebook',\\n socialAction: 'like',\\n socialTarget: url\\n };\\n this.tracker.send('social', createFieldsObj(defaultFields,\\n this.opts.fieldsObj, this.tracker, this.opts.hitFilter));\\n};\\n\\n\\n/**\\n * Handles `unlike` events emitted by the Facebook JS SDK.\\n * @param {string} url The URL corresponding to the unlike event.\\n */\\nSocialWidgetTracker.prototype.handleUnlikeEvents = function(url) {\\n var defaultFields = {\\n transport: 'beacon',\\n socialNetwork: 'Facebook',\\n socialAction: 'unlike',\\n socialTarget: url\\n };\\n this.tracker.send('social', createFieldsObj(defaultFields,\\n this.opts.fieldsObj, this.tracker, this.opts.hitFilter));\\n};\\n\\n\\n/**\\n * Removes all event listeners and instance properties.\\n */\\nSocialWidgetTracker.prototype.remove = function() {\\n window.removeEventListener('load', this.addWidgetListeners);\\n this.removeFacebookEventHandlers();\\n this.removeTwitterEventHandlers();\\n};\\n\\n\\nprovide('socialWidgetTracker', SocialWidgetTracker);\\n\\n},{\\\"../provide\\\":12,\\\"../usage\\\":13,\\\"../utilities\\\":14,\\\"object-assign\\\":23}],11:[function(require,module,exports){\\n/**\\n * Copyright 2016 Google Inc. All Rights Reserved.\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n\\nvar assign = require('object-assign');\\nvar provide = require('../provide');\\nvar usage = require('../usage');\\nvar createFieldsObj = require('../utilities').createFieldsObj;\\nvar isObject = require('../utilities').isObject;\\n\\n\\n/**\\n * Adds handler for the history API methods\\n * @constructor\\n * @param {Object} tracker Passed internally by analytics.js\\n * @param {?Object} opts Passed by the require command.\\n */\\nfunction UrlChangeTracker(tracker, opts) {\\n\\n usage.track(tracker, usage.plugins.URL_CHANGE_TRACKER);\\n\\n // Feature detects to prevent errors in unsupporting browsers.\\n if (!history.pushState || !window.addEventListener) return;\\n\\n this.opts = assign({\\n shouldTrackUrlChange: this.shouldTrackUrlChange,\\n fieldsObj: {},\\n hitFilter: null\\n }, opts);\\n\\n this.tracker = tracker;\\n\\n // Sets the initial page field.\\n // Don't set this on the tracker yet so campaign data can be retreived\\n // from the location field.\\n this.path = getPath();\\n\\n this.updateTrackerData = this.updateTrackerData.bind(this);\\n\\n // Overrides history.pushState.\\n this.originalPushState = history.pushState;\\n history.pushState = function(state, title) {\\n // Sets the document title for reference later.\\n // TODO(philipwalton): consider using WeakMap for this to not conflict\\n // with any user-defined property also called \\\"title\\\".\\n if (isObject(state) && title) state.title = title;\\n\\n this.originalPushState.apply(history, arguments);\\n this.updateTrackerData();\\n }.bind(this);\\n\\n // Overrides history.repaceState.\\n this.originalReplaceState = history.replaceState;\\n history.replaceState = function(state, title) {\\n // Sets the document title for reference later.\\n // TODO(philipwalton): consider using WeakMap for this to not conflict\\n // with any user-defined property also called \\\"title\\\".\\n if (isObject(state) && title) state.title = title;\\n\\n this.originalReplaceState.apply(history, arguments);\\n this.updateTrackerData(false);\\n }.bind(this);\\n\\n // Handles URL changes via user interaction.\\n window.addEventListener('popstate', this.updateTrackerData);\\n}\\n\\n\\n/**\\n * Updates the page and title fields on the tracker if necessary and\\n * optionally sends a pageview.\\n * @param {boolean} shouldSendPageview Indicates whether the tracker should\\n * send a pageview after updating the URL.\\n */\\nUrlChangeTracker.prototype.updateTrackerData = function(shouldSendPageview) {\\n\\n // Sets the default.\\n shouldSendPageview = shouldSendPageview === false ? false : true;\\n\\n // Calls the update logic asychronously to help ensure user callbacks\\n // happen first.\\n setTimeout(function() {\\n\\n var oldPath = this.path;\\n var newPath = getPath();\\n\\n if (oldPath != newPath &&\\n this.opts.shouldTrackUrlChange.call(this, newPath, oldPath)) {\\n\\n this.path = newPath;\\n this.tracker.set({\\n page: newPath,\\n title: isObject(history.state) && history.state.title || document.title\\n });\\n\\n if (shouldSendPageview) {\\n var defaultFields = {transport: 'beacon'};\\n this.tracker.send('pageview', createFieldsObj(defaultFields,\\n this.opts.fieldsObj, this.tracker, this.opts.hitFilter));\\n }\\n }\\n }.bind(this), 0);\\n};\\n\\n\\n/**\\n * Determines whether or not the tracker should send a hit with the new page\\n * data. This default implementation can be overrided in the config options.\\n * @param {string} newPath The path prior to the URL change.\\n * @param {string} oldPath The path after the URL change.\\n * @return {boolean} Whether or not the URL change should be tracked.\\n */\\nUrlChangeTracker.prototype.shouldTrackUrlChange = function(newPath, oldPath) {\\n return newPath && oldPath;\\n};\\n\\n\\n/**\\n * Removes all event listeners and instance properties.\\n */\\nUrlChangeTracker.prototype.remove = function() {\\n window.removeEventListener('popstate', this.updateTrackerData);\\n history.replaceState = this.originalReplaceState;\\n history.pushState = this.originalPushState;\\n\\n this.tracker = null;\\n this.opts = null;\\n this.path = null;\\n\\n this.updateTrackerData = null;\\n this.originalReplaceState = null;\\n this.originalPushState = null;\\n};\\n\\n\\n/**\\n * @return {string} The path value of the current URL.\\n */\\nfunction getPath() {\\n return location.pathname + location.search;\\n}\\n\\n\\nprovide('urlChangeTracker', UrlChangeTracker);\\n\\n},{\\\"../provide\\\":12,\\\"../usage\\\":13,\\\"../utilities\\\":14,\\\"object-assign\\\":23}],12:[function(require,module,exports){\\n/**\\n * Copyright 2016 Google Inc. All Rights Reserved.\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n\\nvar constants = require('./constants');\\nvar utilities = require('./utilities');\\n\\n\\n// Adds the dev ID to the list of dev IDs if any plugin is used.\\n(window.gaDevIds = window.gaDevIds || []).push(constants.DEV_ID);\\n\\n\\n/**\\n * Provides a plugin for use with analytics.js, accounting for the possibility\\n * that the global command queue has been renamed or not yet defined.\\n * @param {string} pluginName The plugin name identifier.\\n * @param {Function} pluginConstructor The plugin constructor function.\\n */\\nmodule.exports = function providePlugin(pluginName, pluginConstructor) {\\n var gaAlias = window['GoogleAnalyticsObject'] || 'ga';\\n window[gaAlias] = window[gaAlias] || function() {\\n (window[gaAlias]['q'] = window[gaAlias]['q'] || []).push(arguments);\\n };\\n\\n // Formally provides the plugin for use with analytics.js.\\n window[gaAlias]('provide', pluginName, pluginConstructor);\\n\\n // Registers the plugin on the global gaplugins object.\\n window.gaplugins = window.gaplugins || {};\\n window.gaplugins[utilities.capitalize(pluginName)] = pluginConstructor;\\n};\\n\\n},{\\\"./constants\\\":1,\\\"./utilities\\\":14}],13:[function(require,module,exports){\\n/**\\n * Copyright 2016 Google Inc. All Rights Reserved.\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n\\nvar constants = require('./constants');\\n\\n\\nvar plugins = {\\n CLEAN_URL_TRACKER: 1,\\n EVENT_TRACKER: 2,\\n IMPRESSION_TRACKER: 3,\\n MEDIA_QUERY_TRACKER: 4,\\n OUTBOUND_FORM_TRACKER: 5,\\n OUTBOUND_LINK_TRACKER: 6,\\n PAGE_VISIBILITY_TRACKER: 7,\\n SOCIAL_WIDGET_TRACKER: 8,\\n URL_CHANGE_TRACKER: 9\\n};\\nvar PLUGIN_COUNT = 9;\\n\\n\\n/**\\n * Converts a hexadecimal string to a binary string.\\n * @param {string} hex A hexadecimal numeric string.\\n * @return {string} a binary numeric string.\\n */\\nfunction convertHexToBin(hex) {\\n return parseInt(hex || '0', 16).toString(2);\\n}\\n\\n\\n/**\\n * Converts a binary string to a hexadecimal string.\\n * @param {string} bin A binary numeric string.\\n * @return {string} a hexadecimal numeric string.\\n */\\nfunction convertBinToHex(bin) {\\n return parseInt(bin || '0', 2).toString(16);\\n}\\n\\n\\n/**\\n * Adds leading zeros to a string if it's less than a minimum length.\\n * @param {string} str A string to pad.\\n * @param {number} len The minimum length of the string\\n * @return {string} The padded string.\\n */\\nfunction padZeros(str, len) {\\n if (str.length < len) {\\n var toAdd = len - str.length;\\n while (toAdd) {\\n str = '0' + str;\\n toAdd--;\\n }\\n }\\n return str;\\n}\\n\\n\\n/**\\n * Accepts a binary numeric string and flips the digit from 0 to 1 at the\\n * specified index.\\n * @param {string} str The binary numeric string.\\n * @param {number} index The index to flip the bit.\\n * @return {string} The new binary string with the bit flipped on\\n */\\nfunction flipBitOn(str, index) {\\n return str.substr(0, index) + 1 + str.substr(index + 1);\\n}\\n\\n\\n/**\\n * Accepts a tracker and a plugin index and flips the bit at the specified\\n * index on the tracker's usage parameter.\\n * @param {Object} tracker An analytics.js tracker.\\n * @param {number} pluginIndex The index of the plugin in the global list.\\n */\\nfunction trackPlugin(tracker, pluginIndex) {\\n var usageHex = tracker.get(constants.USAGE_PARAM);\\n var usageBin = padZeros(convertHexToBin(usageHex), PLUGIN_COUNT);\\n\\n // Flip the bit of the plugin being tracked.\\n usageBin = flipBitOn(usageBin, PLUGIN_COUNT - pluginIndex);\\n\\n // Stores the modified usage string back on the tracker.\\n tracker.set(constants.USAGE_PARAM, convertBinToHex(usageBin));\\n}\\n\\n\\n/**\\n * Accepts a tracker and adds the current version to the version param.\\n * @param {Object} tracker An analytics.js tracker.\\n */\\nfunction trackVersion(tracker) {\\n tracker.set(constants.VERSION_PARAM, constants.VERSION);\\n}\\n\\n\\nmodule.exports = {\\n track: function(tracker, plugin) {\\n trackVersion(tracker);\\n trackPlugin(tracker, plugin);\\n },\\n plugins: plugins\\n};\\n\\n},{\\\"./constants\\\":1}],14:[function(require,module,exports){\\n/**\\n * Copyright 2016 Google Inc. All Rights Reserved.\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n\\nvar assign = require('object-assign');\\nvar getAttributes = require('dom-utils/lib/get-attributes');\\n\\n\\nvar utilities = {\\n\\n\\n /**\\n * Accepts default and user override fields and an optional tracker, hit\\n * filter, and target element and returns a single object that can be used in\\n * `ga('send', ...)` commands.\\n * @param {Object} defaultFields The default fields to return.\\n * @param {Object} userFields Fields set by the user to override the defaults.\\n * @param {Object} opt_tracker The tracker object to apply the hit filter to.\\n * @param {Function} opt_hitFilter A filter function that gets\\n * called with the tracker model right before the `buildHitTask`. It can\\n * be used to modify the model for the current hit only.\\n * @param {Element} opt_target If the hit originated from an interaction\\n * with a DOM element, hitFilter is invoked with that element as the\\n * second argument.\\n * @return {Object} The final fields object.\\n */\\n createFieldsObj: function(\\n defaultFields, userFields, opt_tracker, opt_hitFilter, opt_target) {\\n\\n if (typeof opt_hitFilter == 'function') {\\n var originalBuildHitTask = opt_tracker.get('buildHitTask');\\n return {\\n buildHitTask: function(model) {\\n model.set(defaultFields, null, true);\\n model.set(userFields, null, true);\\n opt_hitFilter(model, opt_target);\\n originalBuildHitTask(model);\\n }\\n };\\n }\\n else {\\n return assign({}, defaultFields, userFields);\\n }\\n },\\n\\n\\n /**\\n * Retrieves the attributes from an DOM element and returns a fields object\\n * for all attributes matching the passed prefix string.\\n * @param {Element} element The DOM element to get attributes from.\\n * @param {string} prefix An attribute prefix. Only the attributes matching\\n * the prefix will be returned on the fields object.\\n * @return {Object} An object of analytics.js fields and values\\n */\\n getAttributeFields: function(element, prefix) {\\n var attributes = getAttributes(element);\\n var attributeFields = {};\\n\\n Object.keys(attributes).forEach(function(attribute) {\\n\\n // The `on` prefix is used for event handling but isn't a field.\\n if (attribute.indexOf(prefix) === 0 && attribute != prefix + 'on') {\\n\\n var value = attributes[attribute];\\n\\n // Detects Boolean value strings.\\n if (value == 'true') value = true;\\n if (value == 'false') value = false;\\n\\n var field = utilities.camelCase(attribute.slice(prefix.length));\\n attributeFields[field] = value;\\n }\\n });\\n\\n return attributeFields;\\n },\\n\\n\\n domReady: function(callback) {\\n if (document.readyState == 'loading') {\\n document.addEventListener('DOMContentLoaded', function fn() {\\n document.removeEventListener('DOMContentLoaded', fn);\\n callback();\\n });\\n } else {\\n callback();\\n }\\n },\\n\\n\\n /**\\n * Accepts a function and returns a wrapped version of the function that is\\n * expected to be called elsewhere in the system. If it's not called\\n * elsewhere after the timeout period, it's called regardless. The wrapper\\n * function also prevents the callback from being called more than once.\\n * @param {Function} callback The function to call.\\n * @param {number} wait How many milliseconds to wait before invoking\\n * the callback.\\n * @returns {Function} The wrapped version of the passed function.\\n */\\n withTimeout: function(callback, wait) {\\n var called = false;\\n setTimeout(callback, wait || 2000);\\n return function() {\\n if (!called) {\\n called = true;\\n callback();\\n }\\n };\\n },\\n\\n\\n /**\\n * Accepts a string containing hyphen or underscore word separators and\\n * converts it to camelCase.\\n * @param {string} str The string to camelCase.\\n * @return {string} The camelCased version of the string.\\n */\\n camelCase: function(str) {\\n return str.replace(/[\\\\-\\\\_]+(\\\\w?)/g, function(match, p1) {\\n return p1.toUpperCase();\\n });\\n },\\n\\n\\n /**\\n * Capitalizes the first letter of a string.\\n * @param {string} str The input string.\\n * @return {string} The capitalized string\\n */\\n capitalize: function(str) {\\n return str.charAt(0).toUpperCase() + str.slice(1);\\n },\\n\\n\\n /**\\n * Indicates whether the passed variable is a JavaScript object.\\n * @param {*} value The input variable to test.\\n * @return {boolean} Whether or not the test is an object.\\n */\\n isObject: function(value) {\\n return typeof value == 'object' && value !== null;\\n },\\n\\n\\n /**\\n * Indicates whether the passed variable is a JavaScript array.\\n * @param {*} value The input variable to test.\\n * @return {boolean} Whether or not the value is an array.\\n */\\n isArray: Array.isArray || function(value) {\\n return Object.prototype.toString.call(value) === '[object Array]';\\n },\\n\\n\\n /**\\n * Accepts a value that may or may not be an array. If it is not an array,\\n * it is returned as the first item in a single-item array.\\n * @param {*} value The value to convert to an array if it is not.\\n * @return {Array} The array-ified value.\\n */\\n toArray: function(value) {\\n return utilities.isArray(value) ? value : [value];\\n }\\n};\\n\\nmodule.exports = utilities;\\n\\n},{\\\"dom-utils/lib/get-attributes\\\":19,\\\"object-assign\\\":23}],15:[function(require,module,exports){\\nmodule.exports = Date.now || now\\n\\nfunction now() {\\n return new Date().getTime()\\n}\\n\\n},{}],16:[function(require,module,exports){\\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},{\\\"date-now\\\":15}],17:[function(require,module,exports){\\nvar matches = require('./matches');\\nvar parents = require('./parents');\\n\\n/**\\n * Gets the closest parent element that matches the passed selector.\\n * @param {Element} element The element whose parents to check.\\n * @param {string} selector The CSS selector to match against.\\n * @param {boolean} shouldCheckSelf True if the selector should test against\\n * the passed element itself.\\n * @return {?Element} The matching element or undefined.\\n */\\nmodule.exports = function closest(element, selector, shouldCheckSelf) {\\n if (!(element && element.nodeType == 1 && selector)) return;\\n\\n var parentElements =\\n (shouldCheckSelf ? [element] : []).concat(parents(element));\\n\\n for (var i = 0, parent; parent = parentElements[i]; i++) {\\n if (matches(parent, selector)) return parent;\\n }\\n};\\n\\n},{\\\"./matches\\\":20,\\\"./parents\\\":21}],18:[function(require,module,exports){\\nvar closest = require('./closest');\\nvar matches = require('./matches');\\n\\n/**\\n * Delegates the handling of events for an element matching a selector to an\\n * ancestor of the matching element.\\n * @param {Element} ancestor The ancestor element to add the listener to.\\n * @param {string} eventType The event type to listen to.\\n * @param {string} selector A CSS selector to match against child elements.\\n * @param {Function} callback A function to run any time the event happens.\\n * @param {Object} opts A configuration options object. The available options:\\n * - useCapture: If true, bind to the event capture phase.\\n * - deep: If true, delegate into shadow trees.\\n * @return {Object} The delegate object. It contains a destroy method.\\n */\\n module.exports = function delegate(\\n ancestor, eventType, selector, callback, opts) {\\n\\n opts = opts || {};\\n\\n // Defines the event listener.\\n var listener = function(event) {\\n\\n // If opts.composed is true and the event originated from inside a Shadow\\n // tree, check the composed path nodes.\\n if (opts.composed && typeof event.composedPath == 'function') {\\n var composedPath = event.composedPath();\\n for (var i = 0, node; node = composedPath[i]; i++) {\\n if (node.nodeType == 1 && matches(node, selector)) {\\n delegateTarget = node;\\n }\\n }\\n }\\n // Otherwise check the parents.\\n else {\\n var delegateTarget = closest(event.target, selector, true);\\n }\\n\\n if (delegateTarget) {\\n callback.call(delegateTarget, event, delegateTarget);\\n }\\n };\\n\\n ancestor.addEventListener(eventType, listener, opts.useCapture);\\n\\n return {\\n destroy: function() {\\n ancestor.removeEventListener(eventType, listener, opts.useCapture);\\n }\\n };\\n};\\n\\n},{\\\"./closest\\\":17,\\\"./matches\\\":20}],19:[function(require,module,exports){\\n/**\\n * Gets all attributes of an element as a plain JavaScriot object.\\n * @param {Element} element The element whose attributes to get.\\n * @return {Object} An object whose keys are the attribute keys and whose\\n * values are the attribute values. If no attributes exist, an empty\\n * object is returned.\\n */\\nmodule.exports = function getAttributes(element) {\\n var attrs = {};\\n\\n // Validate input.\\n if (!(element && element.nodeType == 1)) return attrs;\\n\\n // Return an empty object if there are no attributes.\\n var map = element.attributes;\\n if (map.length === 0) return {};\\n\\n for (var i = 0, attr; attr = map[i]; i++) {\\n attrs[attr.name] = attr.value;\\n }\\n return attrs;\\n};\\n\\n},{}],20:[function(require,module,exports){\\nvar proto = window.Element.prototype;\\nvar nativeMatches = proto.matches ||\\n proto.matchesSelector ||\\n proto.webkitMatchesSelector ||\\n proto.mozMatchesSelector ||\\n proto.msMatchesSelector ||\\n proto.oMatchesSelector;\\n\\n\\n/**\\n * Tests whether a DOM element matches a selector. This polyfills the native\\n * Element.prototype.matches method across browsers.\\n * @param {Element} element The DOM element to test.\\n * @param {string} selector The CSS selector to test element against.\\n * @return {boolean} True if the selector matches.\\n */\\n function matchesSelector(element, selector) {\\n if (typeof selector != 'string') return false;\\n if (nativeMatches) return nativeMatches.call(element, selector);\\n var nodes = element.parentNode.querySelectorAll(selector);\\n for (var i = 0, node; node = nodes[i]; i++) {\\n if (node == element) return true;\\n }\\n return false;\\n}\\n\\n\\n/**\\n * Tests if a DOM elements matches any of the test DOM elements or selectors.\\n * @param {Element} element The DOM element to test.\\n * @param {Element|string|Array} test A DOM element, a CSS\\n * selector, or an array of DOM elements or CSS selectors to match against.\\n * @return {boolean} True of any part of the test matches.\\n */\\nmodule.exports = function matches(element, test) {\\n // Validate input.\\n if (element && element.nodeType == 1 && test) {\\n // if test is a string or DOM element test it.\\n if (typeof test == 'string' || test.nodeType == 1) {\\n return element == test || matchesSelector(element, test);\\n }\\n // if it has a length property iterate over the items\\n // and return true if any match.\\n else if ('length' in test) {\\n for (var i = 0, item; item = test[i]; i++) {\\n if (element == item || matchesSelector(element, item)) return true;\\n }\\n }\\n }\\n // Still here? Return false\\n return false;\\n};\\n\\n},{}],21:[function(require,module,exports){\\n/**\\n * Returns an array of a DOM element's parent elements.\\n * @param {Element} element The DOM element whose parents to get.\\n * @return {Array} An array of all parent elemets, or an empty array if no\\n * parent elements are found.\\n */\\nmodule.exports = function parents(element) {\\n var list = [];\\n while (element && element.parentNode && element.parentNode.nodeType == 1) {\\n list.push(element = element.parentNode);\\n }\\n return list;\\n};\\n\\n},{}],22:[function(require,module,exports){\\nvar HTTP_PORT = '80';\\nvar HTTPS_PORT = '443';\\nvar DEFAULT_PORT = RegExp(':(' + HTTP_PORT + '|' + HTTPS_PORT + ')$');\\n\\n\\nvar a = document.createElement('a');\\nvar cache = {};\\n\\n\\n/**\\n * Parses the given url and returns an object mimicing a `Location` object.\\n * @param {string} url The url to parse.\\n * @return {Object} An object with the same properties as a `Location`\\n * plus the convience properties `path` and `query`.\\n */\\nmodule.exports = function parseUrl(url) {\\n\\n // All falsy values (as well as \\\".\\\") should map to the current URL.\\n url = (!url || url == '.') ? location.href : url;\\n\\n if (cache[url]) return cache[url];\\n\\n a.href = url;\\n\\n // When parsing file relative paths (e.g. `../index.html`), IE will correctly\\n // resolve the `href` property but will keep the `..` in the `path` property.\\n // To workaround this, we reparse with the full URL from the `href` property.\\n if (url.charAt(0) == '.') return parseUrl(a.href);\\n\\n // Sometimes IE will return no port or just a colon, especially for things\\n // like relative port URLs (e.g. \\\"//google.com\\\").\\n var protocol = !a.protocol || ':' == a.protocol ?\\n location.protocol : a.protocol;\\n\\n // Don't include default ports.\\n var port = (a.port == HTTP_PORT || a.port == HTTPS_PORT) ? '' : a.port;\\n\\n // PhantomJS sets the port to \\\"0\\\" when using the file: protocol.\\n port = port == '0' ? '' : port;\\n\\n // IE will return an empty string for host and hostname with a relative URL.\\n var host = a.host == '' ? location.host : a.host;\\n var hostname = a.hostname == '' ? location.hostname : a.hostname;\\n\\n // Sometimes IE incorrectly includes a port for default ports\\n // (e.g. `:80` or `:443`) even when no port is specified in the URL.\\n // http://bit.ly/1rQNoMg\\n host = host.replace(DEFAULT_PORT, '');\\n\\n // Not all browser support `origin` so we have to build it.\\n var origin = a.origin ? a.origin : protocol + '//' + host;\\n\\n // Sometimes IE doesn't include the leading slash for pathname.\\n // http://bit.ly/1rQNoMg\\n var pathname = a.pathname.charAt(0) == '/' ? a.pathname : '/' + a.pathname;\\n\\n return cache[url] = {\\n hash: a.hash,\\n host: host,\\n hostname: hostname,\\n href: a.href,\\n origin: origin,\\n\\n pathname: pathname,\\n port: port,\\n protocol: protocol,\\n search: a.search,\\n\\n // Expose additional helpful properties not part of the Location object.\\n fragment: a.hash.slice(1), // The hash without the starting \\\"#\\\".\\n path: pathname + a.search, // The pathname and the search query (w/o hash).\\n query: a.search.slice(1) // The search without the starting \\\"?\\\".\\n };\\n};\\n\\n},{}],23:[function(require,module,exports){\\n'use strict';\\n/* eslint-disable no-unused-vars */\\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\\n\\nfunction toObject(val) {\\n\\tif (val === null || val === undefined) {\\n\\t\\tthrow new TypeError('Object.assign cannot be called with null or undefined');\\n\\t}\\n\\n\\treturn Object(val);\\n}\\n\\nfunction shouldUseNative() {\\n\\ttry {\\n\\t\\tif (!Object.assign) {\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\n\\t\\t// Detect buggy property enumeration order in older V8 versions.\\n\\n\\t\\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\\n\\t\\tvar test1 = new String('abc'); // eslint-disable-line\\n\\t\\ttest1[5] = 'de';\\n\\t\\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\n\\t\\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\\n\\t\\tvar test2 = {};\\n\\t\\tfor (var i = 0; i < 10; i++) {\\n\\t\\t\\ttest2['_' + String.fromCharCode(i)] = i;\\n\\t\\t}\\n\\t\\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\\n\\t\\t\\treturn test2[n];\\n\\t\\t});\\n\\t\\tif (order2.join('') !== '0123456789') {\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\n\\t\\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\\n\\t\\tvar test3 = {};\\n\\t\\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\\n\\t\\t\\ttest3[letter] = letter;\\n\\t\\t});\\n\\t\\tif (Object.keys(Object.assign({}, test3)).join('') !==\\n\\t\\t\\t\\t'abcdefghijklmnopqrst') {\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\n\\t\\treturn true;\\n\\t} catch (e) {\\n\\t\\t// We don't expect any of the above to throw, but better to be safe.\\n\\t\\treturn false;\\n\\t}\\n}\\n\\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\\n\\tvar from;\\n\\tvar to = toObject(target);\\n\\tvar symbols;\\n\\n\\tfor (var s = 1; s < arguments.length; s++) {\\n\\t\\tfrom = Object(arguments[s]);\\n\\n\\t\\tfor (var key in from) {\\n\\t\\t\\tif (hasOwnProperty.call(from, key)) {\\n\\t\\t\\t\\tto[key] = from[key];\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\tif (Object.getOwnPropertySymbols) {\\n\\t\\t\\tsymbols = Object.getOwnPropertySymbols(from);\\n\\t\\t\\tfor (var i = 0; i < symbols.length; i++) {\\n\\t\\t\\t\\tif (propIsEnumerable.call(from, symbols[i])) {\\n\\t\\t\\t\\t\\tto[symbols[i]] = from[symbols[i]];\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\treturn to;\\n};\\n\\n},{}],24:[function(require,module,exports){\\n/**\\n * Copyright 2016 Google Inc. All Rights Reserved.\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n\\n// Imports all sub-plugins.\\nrequire('./plugins/clean-url-tracker');\\nrequire('./plugins/event-tracker');\\nrequire('./plugins/impression-tracker');\\nrequire('./plugins/media-query-tracker');\\nrequire('./plugins/outbound-form-tracker');\\nrequire('./plugins/outbound-link-tracker');\\nrequire('./plugins/page-visibility-tracker');\\nrequire('./plugins/social-widget-tracker');\\nrequire('./plugins/url-change-tracker');\\n\\n// Imports the deprecated autotrack plugin for backwards compatibility.\\nrequire('./plugins/autotrack');\\n\\n},{\\\"./plugins/autotrack\\\":2,\\\"./plugins/clean-url-tracker\\\":3,\\\"./plugins/event-tracker\\\":4,\\\"./plugins/impression-tracker\\\":5,\\\"./plugins/media-query-tracker\\\":6,\\\"./plugins/outbound-form-tracker\\\":7,\\\"./plugins/outbound-link-tracker\\\":8,\\\"./plugins/page-visibility-tracker\\\":9,\\\"./plugins/social-widget-tracker\\\":10,\\\"./plugins/url-change-tracker\\\":11}]},{},[24])\\n\\n\\n//# sourceMappingURL=autotrack.js.map\\n\"","module.exports = \"!function(e){\\\"use strict\\\";function t(e,i,a){var o,n=document.createElement(\\\"img\\\");return n.onerror=function(o){return t.onerror(n,o,e,i,a)},n.onload=function(o){return t.onload(n,o,e,i,a)},\\\"string\\\"==typeof e?(t.fetchBlob(e,function(i){i?(e=i,o=t.createObjectURL(e)):(o=e,a&&a.crossOrigin&&(n.crossOrigin=a.crossOrigin)),n.src=o},a),n):t.isInstanceOf(\\\"Blob\\\",e)||t.isInstanceOf(\\\"File\\\",e)?(o=n._objectURL=t.createObjectURL(e))?(n.src=o,n):t.readFile(e,function(e){var t=e.target;t&&t.result?n.src=t.result:i&&i(e)}):void 0}function i(e,i){!e._objectURL||i&&i.noRevoke||(t.revokeObjectURL(e._objectURL),delete e._objectURL)}var a=e.createObjectURL&&e||e.URL&&URL.revokeObjectURL&&URL||e.webkitURL&&webkitURL;t.fetchBlob=function(e,t,i){t()},t.isInstanceOf=function(e,t){return Object.prototype.toString.call(t)===\\\"[object \\\"+e+\\\"]\\\"},t.transform=function(e,t,i,a,o){i(e,o)},t.onerror=function(e,t,a,o,n){i(e,n),o&&o.call(e,t)},t.onload=function(e,a,o,n,r){i(e,r),n&&t.transform(e,r,n,o,{})},t.createObjectURL=function(e){return!!a&&a.createObjectURL(e)},t.revokeObjectURL=function(e){return!!a&&a.revokeObjectURL(e)},t.readFile=function(t,i,a){if(e.FileReader){var o=new FileReader;if(o.onload=o.onerror=i,a=a||\\\"readAsDataURL\\\",o[a])return o[a](t),o}return!1},\\\"function\\\"==typeof define&&define.amd?define(function(){return t}):\\\"object\\\"==typeof module&&module.exports?module.exports=t:e.loadImage=t}(\\\"undefined\\\"!=typeof window&&window||this),function(e){\\\"use strict\\\";\\\"function\\\"==typeof define&&define.amd?define([\\\"./load-image\\\"],e):e(\\\"object\\\"==typeof module&&module.exports?require(\\\"./load-image\\\"):window.loadImage)}(function(e){\\\"use strict\\\";var t=e.transform;e.transform=function(i,a,o,n,r){t.call(e,e.scale(i,a,r),a,o,n,r)},e.transformCoordinates=function(){},e.getTransformedOptions=function(e,t){var i,a,o,n,r=t.aspectRatio;if(!r)return t;i={};for(a in t)t.hasOwnProperty(a)&&(i[a]=t[a]);return i.crop=!0,o=e.naturalWidth||e.width,n=e.naturalHeight||e.height,o/n>r?(i.maxWidth=n*r,i.maxHeight=n):(i.maxWidth=o,i.maxHeight=o/r),i},e.renderImageToCanvas=function(e,t,i,a,o,n,r,s,l,d){return e.getContext(\\\"2d\\\").drawImage(t,i,a,o,n,r,s,l,d),e},e.hasCanvasOption=function(e){return e.canvas||e.crop||!!e.aspectRatio},e.scale=function(t,i,a){function o(){var e=Math.max((l||v)/v,(d||P)/P);e>1&&(v*=e,P*=e)}function n(){var e=Math.min((r||v)/v,(s||P)/P);e<1&&(v*=e,P*=e)}i=i||{};var r,s,l,d,c,u,f,g,h,m,p,S=document.createElement(\\\"canvas\\\"),b=t.getContext||e.hasCanvasOption(i)&&S.getContext,y=t.naturalWidth||t.width,x=t.naturalHeight||t.height,v=y,P=x;if(b&&(f=(i=e.getTransformedOptions(t,i,a)).left||0,g=i.top||0,i.sourceWidth?(c=i.sourceWidth,void 0!==i.right&&void 0===i.left&&(f=y-c-i.right)):c=y-f-(i.right||0),i.sourceHeight?(u=i.sourceHeight,void 0!==i.bottom&&void 0===i.top&&(g=x-u-i.bottom)):u=x-g-(i.bottom||0),v=c,P=u),r=i.maxWidth,s=i.maxHeight,l=i.minWidth,d=i.minHeight,b&&r&&s&&i.crop?(v=r,P=s,(p=c/u-r/s)<0?(u=s*c/r,void 0===i.top&&void 0===i.bottom&&(g=(x-u)/2)):p>0&&(c=r*u/s,void 0===i.left&&void 0===i.right&&(f=(y-c)/2))):((i.contain||i.cover)&&(l=r=r||l,d=s=s||d),i.cover?(n(),o()):(o(),n())),b){if((h=i.pixelRatio)>1&&(S.style.width=v+\\\"px\\\",S.style.height=P+\\\"px\\\",v*=h,P*=h,S.getContext(\\\"2d\\\").scale(h,h)),(m=i.downsamplingRatio)>0&&m<1&&vv;)S.width=c*m,S.height=u*m,e.renderImageToCanvas(S,t,f,g,c,u,0,0,S.width,S.height),f=0,g=0,c=S.width,u=S.height,(t=document.createElement(\\\"canvas\\\")).width=c,t.height=u,e.renderImageToCanvas(t,S,0,0,c,u,0,0,c,u);return S.width=v,S.height=P,e.transformCoordinates(S,i),e.renderImageToCanvas(S,t,f,g,c,u,0,0,v,P)}return t.width=v,t.height=P,t}}),function(e){\\\"use strict\\\";\\\"function\\\"==typeof define&&define.amd?define([\\\"./load-image\\\"],e):e(\\\"object\\\"==typeof module&&module.exports?require(\\\"./load-image\\\"):window.loadImage)}(function(e){\\\"use strict\\\";var t=\\\"undefined\\\"!=typeof Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice);e.blobSlice=t&&function(){return(this.slice||this.webkitSlice||this.mozSlice).apply(this,arguments)},e.metaDataParsers={jpeg:{65505:[]}},e.parseMetaData=function(t,i,a,o){a=a||{},o=o||{};var n=this,r=a.maxMetaDataSize||262144;!!(\\\"undefined\\\"!=typeof DataView&&t&&t.size>=12&&\\\"image/jpeg\\\"===t.type&&e.blobSlice)&&e.readFile(e.blobSlice.call(t,0,r),function(t){if(t.target.error)return console.log(t.target.error),void i(o);var r,s,l,d,c=t.target.result,u=new DataView(c),f=2,g=u.byteLength-4,h=f;if(65496===u.getUint16(0)){for(;f=65504&&r<=65519||65534===r);){if(s=u.getUint16(f+2)+2,f+s>u.byteLength){console.log(\\\"Invalid meta data: Invalid segment size.\\\");break}if(l=e.metaDataParsers.jpeg[r])for(d=0;d6&&(c.slice?o.imageHead=c.slice(0,h):o.imageHead=new Uint8Array(c).subarray(0,h))}else console.log(\\\"Invalid JPEG file: Missing JPEG marker.\\\");i(o)},\\\"readAsArrayBuffer\\\")||i(o)},e.hasMetaOption=function(e){return e&&e.meta};var i=e.transform;e.transform=function(t,a,o,n,r){e.hasMetaOption(a)?e.parseMetaData(n,function(r){i.call(e,t,a,o,n,r)},a,r):i.apply(e,arguments)}}),function(e){\\\"use strict\\\";\\\"function\\\"==typeof define&&define.amd?define([\\\"./load-image\\\",\\\"./load-image-meta\\\"],e):\\\"object\\\"==typeof module&&module.exports?e(require(\\\"./load-image\\\"),require(\\\"./load-image-meta\\\")):e(window.loadImage)}(function(e){\\\"use strict\\\";\\\"undefined\\\"!=typeof fetch&&\\\"undefined\\\"!=typeof Request&&(e.fetchBlob=function(t,i,a){if(e.hasMetaOption(a))return fetch(new Request(t,a)).then(function(e){return e.blob()}).then(i).catch(function(e){console.log(e),i()});i()})}),function(e){\\\"use strict\\\";\\\"function\\\"==typeof define&&define.amd?define([\\\"./load-image\\\",\\\"./load-image-meta\\\"],e):\\\"object\\\"==typeof module&&module.exports?e(require(\\\"./load-image\\\"),require(\\\"./load-image-meta\\\")):e(window.loadImage)}(function(e){\\\"use strict\\\";e.ExifMap=function(){return this},e.ExifMap.prototype.map={Orientation:274},e.ExifMap.prototype.get=function(e){return this[e]||this[this.map[e]]},e.getExifThumbnail=function(e,t,i){var a,o,n;{if(i&&!(t+i>e.byteLength)){for(a=[],o=0;o4?i+t.getUint32(a+8,r):a+8)+s>t.byteLength)){if(1===n)return g.getValue(t,l,r);for(d=[],c=0;ce.byteLength)console.log(\\\"Invalid Exif data: Invalid directory offset.\\\");else{if(n=e.getUint16(i,a),!((r=i+2+12*n)+4>e.byteLength)){for(s=0;st.byteLength)console.log(\\\"Invalid Exif data: Invalid segment size.\\\");else if(0===t.getUint16(i+8)){switch(t.getUint16(d)){case 18761:r=!0;break;case 19789:r=!1;break;default:return void console.log(\\\"Invalid Exif data: Invalid byte alignment marker.\\\")}42===t.getUint16(d+2,r)?(s=t.getUint32(d+4,r),o.exif=new e.ExifMap,(s=e.parseExifTags(t,d,d+s,r,o))&&!n.disableExifThumbnail&&(l={exif:{}},s=e.parseExifTags(t,d,d+s,r,l),l.exif[513]&&(o.exif.Thumbnail=e.getExifThumbnail(t,d+l.exif[513],l.exif[514]))),o.exif[34665]&&!n.disableExifSub&&e.parseExifTags(t,d,d+o.exif[34665],r,o),o.exif[34853]&&!n.disableExifGps&&e.parseExifTags(t,d,d+o.exif[34853],r,o)):console.log(\\\"Invalid Exif data: Missing TIFF marker.\\\")}else console.log(\\\"Invalid Exif data: Missing byte alignment offset.\\\")}},e.metaDataParsers.jpeg[65505].push(e.parseExifData)}),function(e){\\\"use strict\\\";\\\"function\\\"==typeof define&&define.amd?define([\\\"./load-image\\\",\\\"./load-image-exif\\\"],e):\\\"object\\\"==typeof module&&module.exports?e(require(\\\"./load-image\\\"),require(\\\"./load-image-exif\\\")):e(window.loadImage)}(function(e){\\\"use strict\\\";e.ExifMap.prototype.tags={256:\\\"ImageWidth\\\",257:\\\"ImageHeight\\\",34665:\\\"ExifIFDPointer\\\",34853:\\\"GPSInfoIFDPointer\\\",40965:\\\"InteroperabilityIFDPointer\\\",258:\\\"BitsPerSample\\\",259:\\\"Compression\\\",262:\\\"PhotometricInterpretation\\\",274:\\\"Orientation\\\",277:\\\"SamplesPerPixel\\\",284:\\\"PlanarConfiguration\\\",530:\\\"YCbCrSubSampling\\\",531:\\\"YCbCrPositioning\\\",282:\\\"XResolution\\\",283:\\\"YResolution\\\",296:\\\"ResolutionUnit\\\",273:\\\"StripOffsets\\\",278:\\\"RowsPerStrip\\\",279:\\\"StripByteCounts\\\",513:\\\"JPEGInterchangeFormat\\\",514:\\\"JPEGInterchangeFormatLength\\\",301:\\\"TransferFunction\\\",318:\\\"WhitePoint\\\",319:\\\"PrimaryChromaticities\\\",529:\\\"YCbCrCoefficients\\\",532:\\\"ReferenceBlackWhite\\\",306:\\\"DateTime\\\",270:\\\"ImageDescription\\\",271:\\\"Make\\\",272:\\\"Model\\\",305:\\\"Software\\\",315:\\\"Artist\\\",33432:\\\"Copyright\\\",36864:\\\"ExifVersion\\\",40960:\\\"FlashpixVersion\\\",40961:\\\"ColorSpace\\\",40962:\\\"PixelXDimension\\\",40963:\\\"PixelYDimension\\\",42240:\\\"Gamma\\\",37121:\\\"ComponentsConfiguration\\\",37122:\\\"CompressedBitsPerPixel\\\",37500:\\\"MakerNote\\\",37510:\\\"UserComment\\\",40964:\\\"RelatedSoundFile\\\",36867:\\\"DateTimeOriginal\\\",36868:\\\"DateTimeDigitized\\\",37520:\\\"SubSecTime\\\",37521:\\\"SubSecTimeOriginal\\\",37522:\\\"SubSecTimeDigitized\\\",33434:\\\"ExposureTime\\\",33437:\\\"FNumber\\\",34850:\\\"ExposureProgram\\\",34852:\\\"SpectralSensitivity\\\",34855:\\\"PhotographicSensitivity\\\",34856:\\\"OECF\\\",34864:\\\"SensitivityType\\\",34865:\\\"StandardOutputSensitivity\\\",34866:\\\"RecommendedExposureIndex\\\",34867:\\\"ISOSpeed\\\",34868:\\\"ISOSpeedLatitudeyyy\\\",34869:\\\"ISOSpeedLatitudezzz\\\",37377:\\\"ShutterSpeedValue\\\",37378:\\\"ApertureValue\\\",37379:\\\"BrightnessValue\\\",37380:\\\"ExposureBias\\\",37381:\\\"MaxApertureValue\\\",37382:\\\"SubjectDistance\\\",37383:\\\"MeteringMode\\\",37384:\\\"LightSource\\\",37385:\\\"Flash\\\",37396:\\\"SubjectArea\\\",37386:\\\"FocalLength\\\",41483:\\\"FlashEnergy\\\",41484:\\\"SpatialFrequencyResponse\\\",41486:\\\"FocalPlaneXResolution\\\",41487:\\\"FocalPlaneYResolution\\\",41488:\\\"FocalPlaneResolutionUnit\\\",41492:\\\"SubjectLocation\\\",41493:\\\"ExposureIndex\\\",41495:\\\"SensingMethod\\\",41728:\\\"FileSource\\\",41729:\\\"SceneType\\\",41730:\\\"CFAPattern\\\",41985:\\\"CustomRendered\\\",41986:\\\"ExposureMode\\\",41987:\\\"WhiteBalance\\\",41988:\\\"DigitalZoomRatio\\\",41989:\\\"FocalLengthIn35mmFilm\\\",41990:\\\"SceneCaptureType\\\",41991:\\\"GainControl\\\",41992:\\\"Contrast\\\",41993:\\\"Saturation\\\",41994:\\\"Sharpness\\\",41995:\\\"DeviceSettingDescription\\\",41996:\\\"SubjectDistanceRange\\\",42016:\\\"ImageUniqueID\\\",42032:\\\"CameraOwnerName\\\",42033:\\\"BodySerialNumber\\\",42034:\\\"LensSpecification\\\",42035:\\\"LensMake\\\",42036:\\\"LensModel\\\",42037:\\\"LensSerialNumber\\\",0:\\\"GPSVersionID\\\",1:\\\"GPSLatitudeRef\\\",2:\\\"GPSLatitude\\\",3:\\\"GPSLongitudeRef\\\",4:\\\"GPSLongitude\\\",5:\\\"GPSAltitudeRef\\\",6:\\\"GPSAltitude\\\",7:\\\"GPSTimeStamp\\\",8:\\\"GPSSatellites\\\",9:\\\"GPSStatus\\\",10:\\\"GPSMeasureMode\\\",11:\\\"GPSDOP\\\",12:\\\"GPSSpeedRef\\\",13:\\\"GPSSpeed\\\",14:\\\"GPSTrackRef\\\",15:\\\"GPSTrack\\\",16:\\\"GPSImgDirectionRef\\\",17:\\\"GPSImgDirection\\\",18:\\\"GPSMapDatum\\\",19:\\\"GPSDestLatitudeRef\\\",20:\\\"GPSDestLatitude\\\",21:\\\"GPSDestLongitudeRef\\\",22:\\\"GPSDestLongitude\\\",23:\\\"GPSDestBearingRef\\\",24:\\\"GPSDestBearing\\\",25:\\\"GPSDestDistanceRef\\\",26:\\\"GPSDestDistance\\\",27:\\\"GPSProcessingMethod\\\",28:\\\"GPSAreaInformation\\\",29:\\\"GPSDateStamp\\\",30:\\\"GPSDifferential\\\",31:\\\"GPSHPositioningError\\\"},e.ExifMap.prototype.stringValues={ExposureProgram:{0:\\\"Undefined\\\",1:\\\"Manual\\\",2:\\\"Normal program\\\",3:\\\"Aperture priority\\\",4:\\\"Shutter priority\\\",5:\\\"Creative program\\\",6:\\\"Action program\\\",7:\\\"Portrait mode\\\",8:\\\"Landscape mode\\\"},MeteringMode:{0:\\\"Unknown\\\",1:\\\"Average\\\",2:\\\"CenterWeightedAverage\\\",3:\\\"Spot\\\",4:\\\"MultiSpot\\\",5:\\\"Pattern\\\",6:\\\"Partial\\\",255:\\\"Other\\\"},LightSource:{0:\\\"Unknown\\\",1:\\\"Daylight\\\",2:\\\"Fluorescent\\\",3:\\\"Tungsten (incandescent light)\\\",4:\\\"Flash\\\",9:\\\"Fine weather\\\",10:\\\"Cloudy weather\\\",11:\\\"Shade\\\",12:\\\"Daylight fluorescent (D 5700 - 7100K)\\\",13:\\\"Day white fluorescent (N 4600 - 5400K)\\\",14:\\\"Cool white fluorescent (W 3900 - 4500K)\\\",15:\\\"White fluorescent (WW 3200 - 3700K)\\\",17:\\\"Standard light A\\\",18:\\\"Standard light B\\\",19:\\\"Standard light C\\\",20:\\\"D55\\\",21:\\\"D65\\\",22:\\\"D75\\\",23:\\\"D50\\\",24:\\\"ISO studio tungsten\\\",255:\\\"Other\\\"},Flash:{0:\\\"Flash did not fire\\\",1:\\\"Flash fired\\\",5:\\\"Strobe return light not detected\\\",7:\\\"Strobe return light detected\\\",9:\\\"Flash fired, compulsory flash mode\\\",13:\\\"Flash fired, compulsory flash mode, return light not detected\\\",15:\\\"Flash fired, compulsory flash mode, return light detected\\\",16:\\\"Flash did not fire, compulsory flash mode\\\",24:\\\"Flash did not fire, auto mode\\\",25:\\\"Flash fired, auto mode\\\",29:\\\"Flash fired, auto mode, return light not detected\\\",31:\\\"Flash fired, auto mode, return light detected\\\",32:\\\"No flash function\\\",65:\\\"Flash fired, red-eye reduction mode\\\",69:\\\"Flash fired, red-eye reduction mode, return light not detected\\\",71:\\\"Flash fired, red-eye reduction mode, return light detected\\\",73:\\\"Flash fired, compulsory flash mode, red-eye reduction mode\\\",77:\\\"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected\\\",79:\\\"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected\\\",89:\\\"Flash fired, auto mode, red-eye reduction mode\\\",93:\\\"Flash fired, auto mode, return light not detected, red-eye reduction mode\\\",95:\\\"Flash fired, auto mode, return light detected, red-eye reduction mode\\\"},SensingMethod:{1:\\\"Undefined\\\",2:\\\"One-chip color area sensor\\\",3:\\\"Two-chip color area sensor\\\",4:\\\"Three-chip color area sensor\\\",5:\\\"Color sequential area sensor\\\",7:\\\"Trilinear sensor\\\",8:\\\"Color sequential linear sensor\\\"},SceneCaptureType:{0:\\\"Standard\\\",1:\\\"Landscape\\\",2:\\\"Portrait\\\",3:\\\"Night scene\\\"},SceneType:{1:\\\"Directly photographed\\\"},CustomRendered:{0:\\\"Normal process\\\",1:\\\"Custom process\\\"},WhiteBalance:{0:\\\"Auto white balance\\\",1:\\\"Manual white balance\\\"},GainControl:{0:\\\"None\\\",1:\\\"Low gain up\\\",2:\\\"High gain up\\\",3:\\\"Low gain down\\\",4:\\\"High gain down\\\"},Contrast:{0:\\\"Normal\\\",1:\\\"Soft\\\",2:\\\"Hard\\\"},Saturation:{0:\\\"Normal\\\",1:\\\"Low saturation\\\",2:\\\"High saturation\\\"},Sharpness:{0:\\\"Normal\\\",1:\\\"Soft\\\",2:\\\"Hard\\\"},SubjectDistanceRange:{0:\\\"Unknown\\\",1:\\\"Macro\\\",2:\\\"Close view\\\",3:\\\"Distant view\\\"},FileSource:{3:\\\"DSC\\\"},ComponentsConfiguration:{0:\\\"\\\",1:\\\"Y\\\",2:\\\"Cb\\\",3:\\\"Cr\\\",4:\\\"R\\\",5:\\\"G\\\",6:\\\"B\\\"},Orientation:{1:\\\"top-left\\\",2:\\\"top-right\\\",3:\\\"bottom-right\\\",4:\\\"bottom-left\\\",5:\\\"left-top\\\",6:\\\"right-top\\\",7:\\\"right-bottom\\\",8:\\\"left-bottom\\\"}},e.ExifMap.prototype.getText=function(e){var t=this.get(e);switch(e){case\\\"LightSource\\\":case\\\"Flash\\\":case\\\"MeteringMode\\\":case\\\"ExposureProgram\\\":case\\\"SensingMethod\\\":case\\\"SceneCaptureType\\\":case\\\"SceneType\\\":case\\\"CustomRendered\\\":case\\\"WhiteBalance\\\":case\\\"GainControl\\\":case\\\"Contrast\\\":case\\\"Saturation\\\":case\\\"Sharpness\\\":case\\\"SubjectDistanceRange\\\":case\\\"FileSource\\\":case\\\"Orientation\\\":return this.stringValues[e][t];case\\\"ExifVersion\\\":case\\\"FlashpixVersion\\\":if(!t)return;return String.fromCharCode(t[0],t[1],t[2],t[3]);case\\\"ComponentsConfiguration\\\":if(!t)return;return this.stringValues[e][t[0]]+this.stringValues[e][t[1]]+this.stringValues[e][t[2]]+this.stringValues[e][t[3]];case\\\"GPSVersionID\\\":if(!t)return;return t[0]+\\\".\\\"+t[1]+\\\".\\\"+t[2]+\\\".\\\"+t[3]}return String(t)},function(e){var t,i=e.tags,a=e.map;for(t in i)i.hasOwnProperty(t)&&(a[i[t]]=t)}(e.ExifMap.prototype),e.ExifMap.prototype.getAll=function(){var e,t,i={};for(e in this)this.hasOwnProperty(e)&&(t=this.tags[e])&&(i[t]=this.getText(t));return i}}),function(e){\\\"use strict\\\";\\\"function\\\"==typeof define&&define.amd?define([\\\"./load-image\\\",\\\"./load-image-scale\\\",\\\"./load-image-meta\\\"],e):\\\"object\\\"==typeof module&&module.exports?e(require(\\\"./load-image\\\"),require(\\\"./load-image-scale\\\"),require(\\\"./load-image-meta\\\")):e(window.loadImage)}(function(e){\\\"use strict\\\";var t=e.hasCanvasOption,i=e.hasMetaOption,a=e.transformCoordinates,o=e.getTransformedOptions;e.hasCanvasOption=function(i){return!!i.orientation||t.call(e,i)},e.hasMetaOption=function(t){return t&&!0===t.orientation||i.call(e,t)},e.transformCoordinates=function(t,i){a.call(e,t,i);var o=t.getContext(\\\"2d\\\"),n=t.width,r=t.height,s=t.style.width,l=t.style.height,d=i.orientation;if(d&&!(d>8))switch(d>4&&(t.width=r,t.height=n,t.style.width=l,t.style.height=s),d){case 2:o.translate(n,0),o.scale(-1,1);break;case 3:o.translate(n,r),o.rotate(Math.PI);break;case 4:o.translate(0,r),o.scale(1,-1);break;case 5:o.rotate(.5*Math.PI),o.scale(1,-1);break;case 6:o.rotate(.5*Math.PI),o.translate(0,-r);break;case 7:o.rotate(.5*Math.PI),o.translate(n,-r),o.scale(-1,1);break;case 8:o.rotate(-.5*Math.PI),o.translate(-n,0)}},e.getTransformedOptions=function(t,i,a){var n,r,s=o.call(e,t,i),l=s.orientation;if(!0===l&&a&&a.exif&&(l=a.exif.get(\\\"Orientation\\\")),!l||l>8||1===l)return s;n={};for(r in s)s.hasOwnProperty(r)&&(n[r]=s[r]);switch(n.orientation=l,l){case 2:n.left=s.right,n.right=s.left;break;case 3:n.left=s.right,n.top=s.bottom,n.right=s.left,n.bottom=s.top;break;case 4:n.top=s.bottom,n.bottom=s.top;break;case 5:n.left=s.top,n.top=s.left,n.right=s.bottom,n.bottom=s.right;break;case 6:n.left=s.top,n.top=s.right,n.right=s.bottom,n.bottom=s.left;break;case 7:n.left=s.bottom,n.top=s.right,n.right=s.top,n.bottom=s.left;break;case 8:n.left=s.bottom,n.top=s.left,n.right=s.top,n.bottom=s.right}return n.orientation>4&&(n.maxWidth=s.maxHeight,n.maxHeight=s.maxWidth,n.minWidth=s.minHeight,n.minHeight=s.minWidth,n.sourceWidth=s.sourceHeight,n.sourceHeight=s.sourceWidth),n}});\\n//# sourceMappingURL=load-image.all.min.js.map\"","module.exports = \"!function(n,t){\\\"object\\\"==typeof exports&&\\\"undefined\\\"!=typeof module?module.exports=t():\\\"function\\\"==typeof define&&define.amd?define(t):n.Dexie=t()}(this,function(){\\\"use strict\\\";function n(n,t){An=n,En=t}function t(){if(In)try{throw t.arguments,new Error}catch(n){return n}return new Error}function e(n,t){var e=n.stack;return e?(t=t||0,0===e.indexOf(n.name)&&(t+=(n.name+n.message).split(\\\"\\\\n\\\").length),e.split(\\\"\\\\n\\\").slice(t).filter(En).map(function(n){return\\\"\\\\n\\\"+n}).join(\\\"\\\")):\\\"\\\"}function r(){}function i(n){return n}function o(n,t){return null==n||n===i?t:function(e){return t(n(e))}}function u(n,t){return function(){n.apply(this,arguments),t.apply(this,arguments)}}function a(n,t){return n===r?t:function(){var e=n.apply(this,arguments);void 0!==e&&(arguments[0]=e);var r=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var o=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?u(r,this.onsuccess):r),i&&(this.onerror=this.onerror?u(i,this.onerror):i),void 0!==o?o:e}}function c(n,t){return n===r?t:function(){n.apply(this,arguments);var e=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),e&&(this.onsuccess=this.onsuccess?u(e,this.onsuccess):e),r&&(this.onerror=this.onerror?u(r,this.onerror):r)}}function s(n,t){return n===r?t:function(e){var r=n.apply(this,arguments);h(e,r);var i=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return i&&(this.onsuccess=this.onsuccess?u(i,this.onsuccess):i),o&&(this.onerror=this.onerror?u(o,this.onerror):o),void 0===r?void 0===a?void 0:a:h(r,a)}}function f(n,t){return n===r?t:function(){return t.apply(this,arguments)===!1?!1:n.apply(this,arguments)}}function l(n,t){return n===r?t:function(){var e=n.apply(this,arguments);if(e&&\\\"function\\\"==typeof e.then){for(var r=this,i=arguments.length,o=new Array(i);i--;)o[i]=arguments[i];return e.then(function(){return t.apply(r,o)})}return t.apply(this,arguments)}}function h(n,t){return\\\"object\\\"!=typeof t?n:(On(t).forEach(function(e){n[e]=t[e]}),n)}function d(n,t){return Dn.call(n,t)}function v(n,t){\\\"function\\\"==typeof t&&(t=t(Pn(n))),On(t).forEach(function(e){p(n,e,t[e])})}function p(n,t,e,r){Object.defineProperty(n,t,h(e&&d(e,\\\"get\\\")&&\\\"function\\\"==typeof e.get?{get:e.get,set:e.set,configurable:!0}:{value:e,configurable:!0,writable:!0},r))}function y(n){return{from:function(t){return n.prototype=Object.create(t.prototype),p(n.prototype,\\\"constructor\\\",n),{extend:v.bind(null,n.prototype)}}}}function m(n,t){var e,r=Sn(n,t);return r||(e=Pn(n))&&m(e,t)}function g(n,t,e){return Tn.call(n,t,e)}function b(n,t){return t(n)}function _(n){var t=setTimeout(n,1e3);clearTimeout(t)}function w(n){if(!n)throw new Ln.Internal(\\\"Assertion failed\\\")}function k(n){jn.setImmediate?setImmediate(n):setTimeout(n,0)}function x(n,t){return n.reduce(function(n,e,r){var i=t(e,r);return i&&(n[i[0]]=i[1]),n},{})}function A(n,t){return function(){try{n.apply(this,arguments)}catch(e){t(e)}}}function E(n,t,e){try{n.apply(null,e)}catch(r){t&&t(r)}}function I(n,t){var e=U.reject(n);return t?e.uncaught(t):e}function O(n,t){if(d(n,t))return n[t];if(!t)return n;if(\\\"string\\\"!=typeof t){for(var e=[],r=0,i=t.length;i>r;++r){var o=O(n,t[r]);e.push(o)}return e}var u=t.indexOf(\\\".\\\");if(-1!==u){var a=n[t.substr(0,u)];return void 0===a?void 0:O(a,t.substr(u+1))}}function C(n,t,e){if(n&&void 0!==t&&!(\\\"isFrozen\\\"in Object&&Object.isFrozen(n)))if(\\\"string\\\"!=typeof t&&\\\"length\\\"in t){w(\\\"string\\\"!=typeof e&&\\\"length\\\"in e);for(var r=0,i=t.length;i>r;++r)C(n,t[r],e[r])}else{var o=t.indexOf(\\\".\\\");if(-1!==o){var u=t.substr(0,o),a=t.substr(o+1);if(\\\"\\\"===a)void 0===e?delete n[u]:n[u]=e;else{var c=n[u];c||(c=n[u]={}),C(c,a,e)}}else void 0===e?delete n[t]:n[t]=e}}function j(n,t){\\\"string\\\"==typeof t?C(n,t,void 0):\\\"length\\\"in t&&[].map.call(t,function(t){C(n,t,void 0)})}function P(n){var t={};for(var e in n)d(n,e)&&(t[e]=n[e]);return t}function D(n){if(!n||\\\"object\\\"!=typeof n)return n;var t;if(Cn(n)){t=[];for(var e=0,r=n.length;r>e;++e)t.push(D(n[e]))}else if(n instanceof Date)t=new Date,t.setTime(n.getTime());else{t=n.constructor?Object.create(n.constructor.prototype):{};for(var i in n)d(n,i)&&(t[i]=D(n[i]))}return t}function S(n,t,e,r){return e=e||{},r=r||\\\"\\\",On(n).forEach(function(i){if(d(t,i)){var o=n[i],u=t[i];\\\"object\\\"==typeof o&&\\\"object\\\"==typeof u&&o&&u&&o.constructor===u.constructor?S(o,u,e,r+i+\\\".\\\"):o!==u&&(e[r+i]=t[i])}else e[r+i]=void 0}),On(t).forEach(function(i){d(n,i)||(e[r+i]=t[i])}),e}function T(n){var t,e,r,i;if(1===arguments.length){if(Cn(n))return n.slice();if(this===Mn&&\\\"string\\\"==typeof n)return[n];if(i=Bn(n)){for(e=[];r=i.next(),!r.done;)e.push(r.value);return e}if(null==n)return[n];if(t=n.length,\\\"number\\\"==typeof t){for(e=new Array(t);t--;)e[t]=n[t];return e}return[n]}for(t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return e}function K(n){return Nn.apply([],n)}function B(n,e){this._e=t(),this.name=n,this.message=e}function M(n,t){return n+\\\". Errors: \\\"+t.map(function(n){return n.toString()}).filter(function(n,t,e){return e.indexOf(n)===t}).join(\\\"\\\\n\\\")}function N(n,e,r,i){this._e=t(),this.failures=e,this.failedKeys=i,this.successCount=r}function q(n,e){this._e=t(),this.name=\\\"BulkError\\\",this.failures=e,this.message=M(n,e)}function F(n,t){if(!n||n instanceof B||n instanceof TypeError||n instanceof SyntaxError||!n.name||!Wn[n.name])return n;var e=new Wn[n.name](t||n.message,n);return\\\"stack\\\"in n&&p(e,\\\"stack\\\",{get:function(){return this.inner.stack}}),e}function R(n){function t(n,t,i){if(\\\"object\\\"==typeof n)return e(n);t||(t=f),i||(i=r);var a={subscribers:[],fire:i,subscribe:function(n){-1===a.subscribers.indexOf(n)&&(a.subscribers.push(n),a.fire=t(a.fire,n))},unsubscribe:function(n){a.subscribers=a.subscribers.filter(function(t){return t!==n}),a.fire=a.subscribers.reduce(t,i)}};return o[n]=u[n]=a,a}function e(n){On(n).forEach(function(e){var r=n[e];if(Cn(r))t(e,n[e][0],n[e][1]);else{if(\\\"asap\\\"!==r)throw new Ln.InvalidArgument(\\\"Invalid event config\\\");var o=t(e,i,function(){for(var n=arguments.length,t=new Array(n);n--;)t[n]=arguments[n];o.subscribers.forEach(function(n){k(function(){n.apply(null,t)})})})}})}var o={},u=function(t,e){if(e){for(var r=arguments.length,i=new Array(r-1);--r;)i[r-1]=arguments[r];return o[t].subscribe.apply(null,i),n}return\\\"string\\\"==typeof t?o[t]:void 0};u.addEventType=t;for(var a=1,c=arguments.length;c>a;++a)t(arguments[a]);return u}function U(n){if(\\\"object\\\"!=typeof this)throw new TypeError(\\\"Promises must be constructed via new\\\");this._listeners=[],this.onuncatched=r,this._lib=!1;var e=this._PSD=ut;if(An&&(this._stackHolder=t(),this._prev=null,this._numPrev=0,Q(this,rt)),\\\"function\\\"!=typeof n){if(n!==Gn)throw new TypeError(\\\"Not a function\\\");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&L(this,this._value))}this._state=null,this._value=null,++e.ref,V(this,n)}function z(n,t,e,r){this.onFulfilled=\\\"function\\\"==typeof n?n:null,this.onRejected=\\\"function\\\"==typeof t?t:null,this.resolve=e,this.reject=r,this.psd=ut}function V(n,t){try{t(function(t){if(null===n._state){if(t===n)throw new TypeError(\\\"A promise cannot be resolved with itself.\\\");var e=n._lib&&$();t&&\\\"function\\\"==typeof t.then?V(n,function(n,e){t instanceof U?t._then(n,e):t.then(n,e)}):(n._state=!0,n._value=t,W(n)),e&&X()}},L.bind(null,n))}catch(e){L(n,e)}}function L(n,t){if(et.push(t),null===n._state){var e=n._lib&&$();t=it(t),n._state=!1,n._value=t,An&&null!==t&&\\\"object\\\"==typeof t&&!t._promise&&E(function(){var e=m(t,\\\"stack\\\");t._promise=n,p(t,\\\"stack\\\",{get:function(){return Yn?e&&(e.get?e.get.apply(t):e.value):n.stack}})}),tn(n),W(n),e&&X()}}function W(n){var t=n._listeners;n._listeners=[];for(var e=0,r=t.length;r>e;++e)H(n,t[e]);var i=n._PSD;--i.ref||i.finalize(),0===ct&&(++ct,Xn(function(){0===--ct&&Z()},[]))}function H(n,t){if(null===n._state)return void n._listeners.push(t);var e=n._state?t.onFulfilled:t.onRejected;if(null===e)return(n._state?t.resolve:t.reject)(n._value);var r=t.psd;++r.ref,++ct,Xn(G,[e,n,t])}function G(n,t,e){var r=ut,i=e.psd;try{i!==r&&(ut=i),rt=t;var o,u=t._value;t._state?o=n(u):(et.length&&(et=[]),o=n(u),-1===et.indexOf(u)&&en(t)),e.resolve(o)}catch(a){e.reject(a)}finally{i!==r&&(ut=r),rt=null,0===--ct&&Z(),--i.ref||i.finalize()}}function J(n,t,r){if(t.length===r)return t;var i=\\\"\\\";if(n._state===!1){var o,u,a=n._value;null!=a?(o=a.name||\\\"Error\\\",u=a.message||a,i=e(a,0)):(o=a,u=\\\"\\\"),t.push(o+(u?\\\": \\\"+u:\\\"\\\")+i)}return An&&(i=e(n._stackHolder,2),i&&-1===t.indexOf(i)&&t.push(i),n._prev&&J(n._prev,t,r)),t}function Q(n,t){var e=t?t._numPrev+1:0;Jn>e&&(n._prev=t,n._numPrev=e)}function Y(){$()&&X()}function $(){var n=Zn;return Zn=!1,nt=!1,n}function X(){var n,t,e;do for(;at.length>0;)for(n=at,at=[],e=n.length,t=0;e>t;++t){var r=n[t];r[0].apply(null,r[1])}while(at.length>0);Zn=!0,nt=!0}function Z(){var n=tt;tt=[],n.forEach(function(n){n._PSD.onunhandled.call(null,n._value,n)});for(var t=st.slice(0),e=t.length;e;)t[--e]()}function nn(n){function t(){n(),st.splice(st.indexOf(t),1)}st.push(t),++ct,Xn(function(){0===--ct&&Z()},[])}function tn(n){tt.some(function(t){return t._value===n._value})||tt.push(n)}function en(n){for(var t=tt.length;t;)if(tt[--t]._value===n._value)return void tt.splice(t,1)}function rn(n){console.warn(\\\"Unhandled rejection: \\\"+(n.stack||n))}function on(n){return new U(Gn,!1,n)}function un(n,t){var e=ut;return function(){var r=$(),i=ut;try{return i!==e&&(ut=e),n.apply(this,arguments)}catch(o){t&&t(o)}finally{i!==e&&(ut=i),r&&X()}}}function an(n,t,e,r){var i=ut,o=Object.create(i);o.parent=i,o.ref=0,o.global=!1,++i.ref,o.finalize=function(){--this.parent.ref||this.parent.finalize()};var u=cn(o,n,t,e,r);return 0===o.ref&&o.finalize(),u}function cn(n,t,e,r,i){var o=ut;try{return n!==o&&(ut=n),t(e,r,i)}finally{n!==o&&(ut=o)}}function sn(n,t){var e;try{e=t.onuncatched(n)}catch(r){}if(e!==!1)try{U.on.error.fire(n,t)}catch(r){}}function fn(n,e){function u(){et.on(\\\"versionchange\\\",function(n){n.newVersion>0?console.warn(\\\"Another connection wants to upgrade database '\\\"+et.name+\\\"'. Closing db now to resume the upgrade.\\\"):console.warn(\\\"Another connection wants to delete database '\\\"+et.name+\\\"'. Closing db now to resume the delete request.\\\"),et.close()}),et.on(\\\"blocked\\\",function(n){!n.newVersion||n.newVersionn});return a.forEach(function(n){i.push(function(){var r=Hn,i=n._cfg.dbschema;Tn(r,e),Tn(i,e),Hn=et._dbSchema=i;var o=j(r,i);return o.add.forEach(function(n){B(e,n[0],n[1].primKey,n[1].indexes)}),o.change.forEach(function(n){if(n.recreate)throw new Ln.Upgrade(\\\"Not yet support for changing primary key\\\");var t=e.objectStore(n.name);n.add.forEach(function(n){z(t,n)}),n.change.forEach(function(n){t.deleteIndex(n.name),z(t,n)}),n.del.forEach(function(n){t.deleteIndex(n)})}),n._cfg.contentUpgrade?(u=!0,U.follow(function(){n._cfg.contentUpgrade(t)})):void 0}),i.push(function(t){if(!u||!mt){var e=n._cfg.dbschema;F(e,t)}})}),r().then(function(){M(Hn,e)})}function j(n,t){var e={del:[],add:[],change:[]};for(var r in n)t[r]||e.del.push(r);for(r in t){var i=n[r],o=t[r];if(i){var u={name:r,def:o,recreate:!1,del:[],add:[],change:[]};if(i.primKey.src!==o.primKey.src)u.recreate=!0,e.change.push(u);else{var a=i.idxByName,c=o.idxByName;for(var s in a)c[s]||u.del.push(s);for(s in c){var f=a[s],l=c[s];f?f.src!==l.src&&u.change.push(l):u.add.push(l)}(u.del.length>0||u.add.length>0||u.change.length>0)&&e.change.push(u)}}else e.add.push([r,o])}return e}function B(n,t,e,r){var i=n.db.createObjectStore(t,e.keyPath?{keyPath:e.keyPath,autoIncrement:e.auto}:{autoIncrement:e.auto});return r.forEach(function(n){z(i,n)}),i}function M(n,t){On(n).forEach(function(e){t.db.objectStoreNames.contains(e)||B(t,e,n[e].primKey,n[e].indexes)})}function F(n,t){for(var e=0;er;++r){s={onsuccess:null,onerror:null};var u=e[r];i.call(s,u[0],u[1],t);var h=n[\\\"delete\\\"](u[0]);h._hookCtx=s,h.onerror=f,r===c?h.onsuccess=vn(o):h.onsuccess=l}},function(n){throw s.onerror&&s.onerror(n),n})}else for(var h=0;a>h;++h){var d=n[\\\"delete\\\"](e[h]);d.onerror=un(pn(u)),h===c&&(d.onsuccess=un(function(){return o()}))}}).uncaught(V)}function Q(n,t,e,r){var i=this;this.db=et,this.mode=n,this.storeNames=t,this.idbtrans=null,this.on=R(this,\\\"complete\\\",\\\"error\\\",\\\"abort\\\"),this.parent=r||null,this.active=!0,this._tables=null,this._reculock=0,this._blockedFuncs=[],this._psd=null,this._dbschema=e,this._resolve=null,this._reject=null,this._completion=new U(function(n,t){i._resolve=n,i._reject=t}).uncaught(V),this._completion.then(function(){i.on.complete.fire()},function(n){return i.on.error.fire(n),i.parent?i.parent._reject(n):i.active&&i.idbtrans&&i.idbtrans.abort(),i.active=!1,I(n)})}function Y(n,t,e){this._ctx={table:n,index:\\\":id\\\"===t?null:t,collClass:n._collClass,or:e}}function $(n,t){var e=null,r=null;if(t)try{e=t()}catch(i){r=i}var o=n._ctx,u=o.table;this._ctx={table:u,index:o.index,isPrimKey:!o.index||u.schema.primKey.keyPath&&o.index===u.schema.primKey.name,range:e,keysOnly:!1,dir:\\\"next\\\",unique:\\\"\\\",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:o.or,valueMapper:u.hook.reading.fire}}function X(n,t){return!(n.filter||n.algorithm||n.or)&&(t?n.justLimit:!n.replayFilter)}function Z(){$.apply(this,arguments)}function nn(n,t){return n._cfg.version-t._cfg.version}function tn(n,t,e,r){t.forEach(function(t){var i=et._tableFactory(e,r[t]);n.forEach(function(n){t in n||(n[t]=i)})})}function en(n){n.forEach(function(n){for(var t in n)n[t]instanceof W&&delete n[t]})}function rn(n,t,e,r,i,o){var u=o?function(n,t,r){return e(o(n),t,r)}:e,a=un(u,i);n.onerror||(n.onerror=pn(i)),t?n.onsuccess=A(function(){var e=n.result;if(e){var o=function(){e[\\\"continue\\\"]()};t(e,function(n){o=n},r,i)&&a(e.value,e,function(n){o=n}),o()}else r()},i):n.onsuccess=A(function(){var t=n.result;if(t){var e=function(){t[\\\"continue\\\"]()};a(t.value,t,function(n){e=n}),e()}else r()},i)}function on(n){var t=[];return n.split(\\\",\\\").forEach(function(n){n=n.trim();var e=n.replace(/([&*]|\\\\+\\\\+)/g,\\\"\\\"),r=/^\\\\[/.test(e)?e.match(/^\\\\[(.*)\\\\]$/)[1].split(\\\"+\\\"):e;t.push(new _n(e,r||null,/\\\\&/.test(n),/\\\\*/.test(n),/\\\\+\\\\+/.test(n),Cn(r),/\\\\./.test(n)))}),t}function cn(n,t){return Vn.cmp(n,t)}function sn(n,t){return cn(n,t)<0?n:t}function ln(n,t){return cn(n,t)>0?n:t}function En(n,t){return Vn.cmp(n,t)}function In(n,t){return Vn.cmp(t,n)}function jn(n,t){return t>n?-1:n===t?0:1}function Pn(n,t){return n>t?-1:n===t?0:1}function Dn(n,t){return n?t?function(){return n.apply(this,arguments)&&t.apply(this,arguments)}:n:t}function Sn(){if(et.verno=Yn.version/10,et._dbSchema=Hn={},Jn=g(Yn.objectStoreNames,0),0!==Jn.length){var n=Yn.transaction(kn(Jn),\\\"readonly\\\");Jn.forEach(function(t){for(var e=n.objectStore(t),r=e.keyPath,i=r&&\\\"string\\\"==typeof r&&-1!==r.indexOf(\\\".\\\"),o=new _n(r,r||\\\"\\\",!1,!1,!!e.autoIncrement,r&&\\\"string\\\"!=typeof r,i),u=[],a=0;a0&&(ot=!1),!Vn)throw new Ln.MissingAPI(\\\"indexedDB API not found. If using IE10+, make sure to run your code on a server URL (not locally). If using old Safari versions, make sure to include indexedDB polyfill.\\\");var i=ot?Vn.open(n):Vn.open(n,Math.round(10*et.verno));if(!i)throw new Ln.MissingAPI(\\\"IndexedDB API not available\\\");i.onerror=un(pn(e)),i.onblocked=un(Kn),i.onupgradeneeded=un(function(t){if(r=i.transaction,ot&&!et._allowEmptyDB){i.onerror=mn,r.abort(),i.result.close();var o=Vn.deleteDatabase(n);o.onsuccess=o.onerror=un(function(){e(new Ln.NoSuchDatabase(\\\"Database \\\"+n+\\\" doesnt exist\\\"))})}else{r.onerror=un(pn(e));var u=t.oldVersion>Math.pow(2,62)?0:t.oldVersion;m(u/10,r,e,i)}},e),i.onsuccess=un(function(){if(r=null,Yn=i.result,pt.push(et),ot)Sn();else if(Yn.objectStoreNames.length>0)try{Tn(Hn,Yn.transaction(kn(Yn.objectStoreNames),nt))}catch(e){}Yn.onversionchange=un(function(n){et._vcFired=!0,et.on(\\\"versionchange\\\").fire(n)}),at||gn(function(t){return-1===t.indexOf(n)?t.push(n):void 0}),t()},e)})]).then(function(){return fn.vip(et.on.ready.fire)}).then(function(){return Xn=!1,et})[\\\"catch\\\"](function(n){try{r&&r.abort()}catch(t){}return Xn=!1,et.close(),$n=n,I($n,V)})[\\\"finally\\\"](function(){Zn=!0,e()})},this.close=function(){var n=pt.indexOf(et);if(n>=0&&pt.splice(n,1),Yn){try{Yn.close()}catch(t){}Yn=null}zn=!1,$n=new Ln.DatabaseClosed,Xn&&Nn($n),rt=new U(function(n){Bn=n}),it=new U(function(n,t){Nn=t})},this[\\\"delete\\\"]=function(){var t=arguments.length>0;return new U(function(e,r){function i(){et.close();var t=Vn.deleteDatabase(n);t.onsuccess=un(function(){at||gn(function(t){var e=t.indexOf(n);return e>=0?t.splice(e,1):void 0}),e()}),t.onerror=un(pn(r)),t.onblocked=Kn}if(t)throw new Ln.InvalidArgument(\\\"Arguments not allowed in db.delete()\\\");Xn?rt.then(i):i()}).uncaught(V)},this.backendDB=function(){return Yn},this.isOpen=function(){return null!==Yn},this.hasFailed=function(){return null!==$n},this.dynamicallyOpened=function(){return ot},this.name=n,p(this,\\\"tables\\\",{get:function(){return On(Qn).map(function(n){return Qn[n]})}}),this.on=R(this,\\\"error\\\",\\\"populate\\\",\\\"blocked\\\",\\\"versionchange\\\",{ready:[l,r]}),this.on.ready.subscribe=b(this.on.ready.subscribe,function(n){return function(t,e){fn.vip(function(){Zn?(U.resolve().then(t),e&&n(t)):(n(t),e||n(function r(){et.on.ready.unsubscribe(t),et.on.ready.unsubscribe(r)}))})}}),_t(function(){et.on(\\\"populate\\\").fire(et._createTransaction(tt,Jn,Hn)),et.on(\\\"error\\\").fire(new Error)}),this.transaction=function(n,t,e){function r(t){var r=ut;t(U.resolve().then(function(){return an(function(){ut.transless=ut.transless||r;var t=et._createTransaction(n,s,Hn,a);ut.trans=t,a?t.idbtrans=a.idbtrans:t.create();var i=s.map(function(n){return t.tables[n]});i.push(t);var o;return U.follow(function(){if(o=e.apply(t,i))if(\\\"function\\\"==typeof o.next&&\\\"function\\\"==typeof o[\\\"throw\\\"])o=bn(o);else if(\\\"function\\\"==typeof o.then&&!d(o,\\\"_PSD\\\"))throw new Ln.IncompatiblePromise(\\\"Incompatible Promise returned from transaction scope (read more at http://tinyurl.com/znyqjqc). Transaction scope: \\\"+e.toString())}).uncaught(V).then(function(){return a&&t._resolve(),t._completion}).then(function(){return o})[\\\"catch\\\"](function(n){return t._reject(n),I(n)})})}))}var i=arguments.length;if(2>i)throw new Ln.InvalidArgument(\\\"Too few arguments\\\");for(var o=new Array(i-1);--i;)o[i-1]=arguments[i];e=o.pop();var u=K(o),a=ut.trans;a&&a.db===et&&-1===n.indexOf(\\\"!\\\")||(a=null);var c=-1!==n.indexOf(\\\"?\\\");n=n.replace(\\\"!\\\",\\\"\\\").replace(\\\"?\\\",\\\"\\\");try{var s=u.map(function(n){var t=n instanceof W?n.name:n;if(\\\"string\\\"!=typeof t)throw new TypeError(\\\"Invalid table argument to Dexie.transaction(). Only Table or String are allowed\\\");return t});if(\\\"r\\\"==n||n==nt)n=nt;else{if(\\\"rw\\\"!=n&&n!=tt)throw new Ln.InvalidArgument(\\\"Invalid transaction mode: \\\"+n);n=tt}if(a){if(a.mode===nt&&n===tt){if(!c)throw new Ln.SubTransaction(\\\"Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY\\\");a=null}a&&s.forEach(function(n){if(!d(a.tables,n)){if(!c)throw new Ln.SubTransaction(\\\"Table \\\"+n+\\\" not included in parent transaction.\\\");a=null}})}}catch(f){return a?a._promise(null,function(n,t){t(f)}):I(f,V)}return a?a._promise(n,r,\\\"lock\\\"):et._whenReady(r)},this.table=function(n){if(wt&&ot)return new H(n);if(!d(Qn,n))throw new Ln.InvalidTable(\\\"Table \\\"+n+\\\" does not exist\\\");return Qn[n]},v(W.prototype,{_trans:function(n,t,e){var r=ut.trans;return r&&r.db===et?r._promise(n,t,e):L(n,[this.name],t)},_idbstore:function(n,t,e){function r(n,e,r){t(n,e,r.idbtrans.objectStore(o),r)}if(wt)return new U(t);var i=ut.trans,o=this.name;return i&&i.db===et?i._promise(n,r,e):L(n,[this.name],r)},get:function(n,t){var e=this;return this._idbstore(nt,function(t,r,i){wt&&t(e.schema.instanceTemplate);var o=i.get(n);o.onerror=pn(r),o.onsuccess=function(){t(e.hook.reading.fire(o.result))}}).then(t)},where:function(n){return new Y(this,n)},count:function(n){return this.toCollection().count(n)},offset:function(n){return this.toCollection().offset(n)},limit:function(n){return this.toCollection().limit(n)},reverse:function(){return this.toCollection().reverse()},filter:function(n){return this.toCollection().and(n)},each:function(n){return this.toCollection().each(n)},toArray:function(n){return this.toCollection().toArray(n)},orderBy:function(n){return new this._collClass(new Y(this,n))},toCollection:function(){return new this._collClass(new Y(this))},mapToClass:function(n,t){this.schema.mappedClass=n;var e=Object.create(n.prototype);t&&hn(e,t),this.schema.instanceTemplate=e;var r=function(t){if(!t)return t;var e=Object.create(n.prototype);for(var r in t)d(t,r)&&(e[r]=t[r]);return e};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=r,this.hook(\\\"reading\\\",r),n},defineClass:function(n){return this.mapToClass(fn.defineClass(n),n)}}),y(H).from(W).extend({bulkDelete:function(n){return this.hook.deleting.fire===r?this._idbstore(tt,function(t,e,i,o){t(J(i,o,n,!1,r))}):this.where(\\\":id\\\").anyOf(n)[\\\"delete\\\"]().then(function(){})},bulkPut:function(n,t){var e=this;return this._idbstore(tt,function(i,o,u){if(!u.keyPath&&!e.schema.primKey.auto&&!t)throw new Ln.InvalidArgument(\\\"bulkPut() with non-inbound keys requires keys array in second argument\\\");if(u.keyPath&&t)throw new Ln.InvalidArgument(\\\"bulkPut(): keys argument invalid on tables with inbound keys\\\");if(t&&t.length!==n.length)throw new Ln.InvalidArgument(\\\"Arguments objects and keys must have the same length\\\");if(0===n.length)return i();var a,c,s=function(n){0===f.length?i(n):o(new q(e.name+\\\".bulkPut(): \\\"+f.length+\\\" of \\\"+l+\\\" operations failed\\\",f))},f=[],l=n.length,h=e;if(e.hook.creating.fire===r&&e.hook.updating.fire===r){c=G(f);for(var d=0,v=n.length;v>d;++d)a=t?u.put(n[d],t[d]):u.put(n[d]),a.onerror=c;a.onerror=G(f,s),a.onsuccess=dn(s)}else{var p=t||u.keyPath&&n.map(function(n){return O(n,u.keyPath)}),y=p&&x(p,function(t,e){return null!=t&&[t,n[e]]}),m=p?h.where(\\\":id\\\").anyOf(p.filter(function(n){return null!=n})).modify(function(){this.value=y[this.primKey],y[this.primKey]=null})[\\\"catch\\\"](N,function(n){f=n.failures}).then(function(){for(var e=[],r=t&&[],i=p.length-1;i>=0;--i){var o=p[i];(null==o||y[o])&&(e.push(n[i]),t&&r.push(o),null!=o&&(y[o]=null))}return e.reverse(),t&&r.reverse(),h.bulkAdd(e,r)}).then(function(n){var t=p[p.length-1];return null!=t?t:n}):h.bulkAdd(n);m.then(s)[\\\"catch\\\"](q,function(n){f=f.concat(n.failures),s()})[\\\"catch\\\"](o)}},\\\"locked\\\")},bulkAdd:function(n,t){var e=this,i=this.hook.creating.fire;return this._idbstore(tt,function(o,u,a,c){function s(n){0===d.length?o(n):u(new q(e.name+\\\".bulkAdd(): \\\"+d.length+\\\" of \\\"+v+\\\" operations failed\\\",d))}if(!a.keyPath&&!e.schema.primKey.auto&&!t)throw new Ln.InvalidArgument(\\\"bulkAdd() with non-inbound keys requires keys array in second argument\\\");if(a.keyPath&&t)throw new Ln.InvalidArgument(\\\"bulkAdd(): keys argument invalid on tables with inbound keys\\\");if(t&&t.length!==n.length)throw new Ln.InvalidArgument(\\\"Arguments objects and keys must have the same length\\\");if(0===n.length)return o();var f,l,h,d=[],v=n.length;if(i!==r){var p,y=a.keyPath;l=G(d,null,!0),h=vn(null),E(function(){for(var e=0,r=n.length;r>e;++e){p={onerror:null,onsuccess:null};var o=t&&t[e],u=n[e],s=t?o:y?O(u,y):void 0,d=i.call(p,s,u,c);null==s&&null!=d&&(y?(u=D(u),C(u,y,d)):o=d),f=null!=o?a.add(u,o):a.add(u),f._hookCtx=p,r-1>e&&(f.onerror=l,p.onsuccess&&(f.onsuccess=h))}},function(n){throw p.onerror&&p.onerror(n),n}),f.onerror=G(d,s,!0),f.onsuccess=vn(s)}else{l=G(d);for(var m=0,g=n.length;g>m;++m)f=t?a.add(n[m],t[m]):a.add(n[m]),f.onerror=l;f.onerror=G(d,s),f.onsuccess=dn(s)}})},add:function(n,t){var e=this.hook.creating.fire;return this._idbstore(tt,function(i,o,u,a){var c={onsuccess:null,onerror:null};if(e!==r){var s=null!=t?t:u.keyPath?O(n,u.keyPath):void 0,f=e.call(c,s,n,a);null==s&&null!=f&&(u.keyPath?C(n,u.keyPath,f):t=f)}try{var l=null!=t?u.add(n,t):u.add(n);l._hookCtx=c,l.onerror=yn(o),l.onsuccess=vn(function(t){var e=u.keyPath;e&&C(n,e,t),i(t)})}catch(h){throw c.onerror&&c.onerror(h),h}})},put:function(n,t){var e=this,i=this.hook.creating.fire,o=this.hook.updating.fire;return i!==r||o!==r?this._trans(tt,function(r,i,o){var u=void 0!==t?t:e.schema.primKey.keyPath&&O(n,e.schema.primKey.keyPath);null==u?o.tables[e.name].add(n).then(r,i):(o._lock(),n=D(n),o.tables[e.name].where(\\\":id\\\").equals(u).modify(function(){this.value=n}).then(function(r){return 0===r?o.tables[e.name].add(n,t):u})[\\\"finally\\\"](function(){o._unlock()}).then(r,i))}):this._idbstore(tt,function(e,r,i){var o=void 0!==t?i.put(n,t):i.put(n);o.onerror=pn(r),o.onsuccess=function(t){var r=i.keyPath;r&&C(n,r,t.target.result),e(o.result)}})},\\\"delete\\\":function(n){return this.hook.deleting.subscribers.length?this.where(\\\":id\\\").equals(n)[\\\"delete\\\"]():this._idbstore(tt,function(t,e,r){var i=r[\\\"delete\\\"](n);i.onerror=pn(e),i.onsuccess=function(){t(i.result)}})},clear:function(){return this.hook.deleting.subscribers.length?this.toCollection()[\\\"delete\\\"]():this._idbstore(tt,function(n,t,e){var r=e.clear();r.onerror=pn(t),r.onsuccess=function(){n(r.result)}})},update:function(n,t){if(\\\"object\\\"!=typeof t||Cn(t))throw new Ln.InvalidArgument(\\\"Modifications must be an object.\\\");if(\\\"object\\\"!=typeof n||Cn(n))return this.where(\\\":id\\\").equals(n).modify(t);On(t).forEach(function(e){C(n,e,t[e])});var e=O(n,this.schema.primKey.keyPath);return void 0===e?I(new Ln.InvalidArgument(\\\"Given object does not contain its primary key\\\"),V):this.where(\\\":id\\\").equals(e).modify(t)}}),v(Q.prototype,{_lock:function(){return w(!ut.global),++this._reculock,1!==this._reculock||ut.global||(ut.lockOwnerFor=this),this},_unlock:function(){if(w(!ut.global),0===--this._reculock)for(ut.global||(ut.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var n=this._blockedFuncs.shift();try{n()}catch(t){}}return this},_locked:function(){return this._reculock&&ut.lockOwnerFor!==this},create:function(n){var t=this;if(w(!this.idbtrans),!n&&!Yn)switch($n&&$n.name){case\\\"DatabaseClosedError\\\":throw new Ln.DatabaseClosed($n);case\\\"MissingAPIError\\\":throw new Ln.MissingAPI($n.message,$n);default:throw new Ln.OpenFailed($n)}if(!this.active)throw new Ln.TransactionInactive;return w(null===this._completion._state),n=this.idbtrans=n||Yn.transaction(kn(this.storeNames),this.mode),n.onerror=un(function(e){mn(e),t._reject(n.error)}),n.onabort=un(function(n){mn(n),t.active&&t._reject(new Ln.Abort),t.active=!1,t.on(\\\"abort\\\").fire(n)}),n.oncomplete=un(function(){t.active=!1,t._resolve()}),this},_promise:function(n,t,e){var r=this;return an(function(){var i;return r._locked()?i=new U(function(i,o){r._blockedFuncs.push(function(){r._promise(n,t,e).then(i,o)})}):(i=r.active?new U(function(i,o){if(n===tt&&r.mode!==tt)throw new Ln.ReadOnly(\\\"Transaction is readonly\\\");!r.idbtrans&&n&&r.create(),e&&r._lock(),t(i,o,r)}):I(new Ln.TransactionInactive),r.active&&e&&i[\\\"finally\\\"](function(){r._unlock()})),i._lib=!0,i.uncaught(V)})},abort:function(){this.active&&this._reject(new Ln.Abort),this.active=!1},tables:{get:function(){return this._tables?this._tables:this._tables=x(this.storeNames,function(n){return[n,Qn[n]]})}},complete:function(n){return this.on(\\\"complete\\\",n)},error:function(n){return this.on(\\\"error\\\",n)},table:function(n){if(-1===this.storeNames.indexOf(n))throw new Ln.InvalidTable(\\\"Table \\\"+n+\\\" not in transaction\\\");return Qn[n]}}),v(Y.prototype,function(){function n(n,t,e){var r=n instanceof Y?new n._ctx.collClass(n):n;\\nreturn r._ctx.error=e?new e(t):new TypeError(t),r}function t(n){return new n._ctx.collClass(n,function(){return Wn.only(\\\"\\\")}).limit(0)}function e(n){return\\\"next\\\"===n?function(n){return n.toUpperCase()}:function(n){return n.toLowerCase()}}function r(n){return\\\"next\\\"===n?function(n){return n.toLowerCase()}:function(n){return n.toUpperCase()}}function i(n,t,e,r,i,o){for(var u=Math.min(n.length,r.length),a=-1,c=0;u>c;++c){var s=t[c];if(s!==r[c])return i(n[c],e[c])<0?n.substr(0,c)+e[c]+e.substr(c+1):i(n[c],r[c])<0?n.substr(0,c)+r[c]+e.substr(c+1):a>=0?n.substr(0,a)+t[a]+e.substr(a+1):null;i(n[c],s)<0&&(a=c)}return ua?null:n.substr(0,a)+r[a]+e.substr(a+1)}function o(t,o,u,a){function c(n){s=e(n),f=r(n),l=\\\"next\\\"===n?jn:Pn;var t=u.map(function(n){return{lower:f(n),upper:s(n)}}).sort(function(n,t){return l(n.lower,t.lower)});h=t.map(function(n){return n.upper}),d=t.map(function(n){return n.lower}),v=n,p=\\\"next\\\"===n?\\\"\\\":a}var s,f,l,h,d,v,p,y=u.length;if(!u.every(function(n){return\\\"string\\\"==typeof n}))return n(t,vt);c(\\\"next\\\");var m=new t._ctx.collClass(t,function(){return Wn.bound(h[0],d[y-1]+a)});m._ondirectionchange=function(n){c(n)};var g=0;return m._addAlgorithm(function(n,t,e){var r=n.key;if(\\\"string\\\"!=typeof r)return!1;var u=f(r);if(o(u,d,g))return!0;for(var a=null,c=g;y>c;++c){var s=i(r,u,h[c],d[c],l,v);null===s&&null===a?g=c+1:(null===a||l(a,s)>0)&&(a=s)}return t(null!==a?function(){n[\\\"continue\\\"](a+p)}:e),!1}),m}return{between:function(e,r,i,o){i=i!==!1,o=o===!0;try{return cn(e,r)>0||0===cn(e,r)&&(i||o)&&(!i||!o)?t(this):new this._ctx.collClass(this,function(){return Wn.bound(e,r,!i,!o)})}catch(u){return n(this,dt)}},equals:function(n){return new this._ctx.collClass(this,function(){return Wn.only(n)})},above:function(n){return new this._ctx.collClass(this,function(){return Wn.lowerBound(n,!0)})},aboveOrEqual:function(n){return new this._ctx.collClass(this,function(){return Wn.lowerBound(n)})},below:function(n){return new this._ctx.collClass(this,function(){return Wn.upperBound(n,!0)})},belowOrEqual:function(n){return new this._ctx.collClass(this,function(){return Wn.upperBound(n)})},startsWith:function(t){return\\\"string\\\"!=typeof t?n(this,vt):this.between(t,t+lt,!0,!0)},startsWithIgnoreCase:function(n){return\\\"\\\"===n?this.startsWith(n):o(this,function(n,t){return 0===n.indexOf(t[0])},[n],lt)},equalsIgnoreCase:function(n){return o(this,function(n,t){return n===t[0]},[n],\\\"\\\")},anyOfIgnoreCase:function(){var n=T.apply(Mn,arguments);return 0===n.length?t(this):o(this,function(n,t){return-1!==t.indexOf(n)},n,\\\"\\\")},startsWithAnyOfIgnoreCase:function(){var n=T.apply(Mn,arguments);return 0===n.length?t(this):o(this,function(n,t){return t.some(function(t){return 0===n.indexOf(t)})},n,lt)},anyOf:function(){var e=T.apply(Mn,arguments),r=En;try{e.sort(r)}catch(i){return n(this,dt)}if(0===e.length)return t(this);var o=new this._ctx.collClass(this,function(){return Wn.bound(e[0],e[e.length-1])});o._ondirectionchange=function(n){r=\\\"next\\\"===n?En:In,e.sort(r)};var u=0;return o._addAlgorithm(function(n,t,i){for(var o=n.key;r(o,e[u])>0;)if(++u,u===e.length)return t(i),!1;return 0===r(o,e[u])?!0:(t(function(){n[\\\"continue\\\"](e[u])}),!1)}),o},notEqual:function(n){return this.inAnyRange([[-(1/0),n],[n,ht]],{includeLowers:!1,includeUppers:!1})},noneOf:function(){var t=T.apply(Mn,arguments);if(0===t.length)return new this._ctx.collClass(this);try{t.sort(En)}catch(e){return n(this,dt)}var r=t.reduce(function(n,t){return n?n.concat([[n[n.length-1][1],t]]):[[-(1/0),t]]},null);return r.push([t[t.length-1],ht]),this.inAnyRange(r,{includeLowers:!1,includeUppers:!1})},inAnyRange:function(e,r){function i(n,t){for(var e=0,r=n.length;r>e;++e){var i=n[e];if(cn(t[0],i[1])<0&&cn(t[1],i[0])>0){i[0]=sn(i[0],t[0]),i[1]=ln(i[1],t[1]);break}}return e===r&&n.push(t),n}function o(n,t){return l(n[0],t[0])}function u(n){return!v(n)&&!p(n)}var a=this._ctx;if(0===e.length)return t(this);if(!e.every(function(n){return void 0!==n[0]&&void 0!==n[1]&&En(n[0],n[1])<=0}))return n(this,\\\"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower\\\",Ln.InvalidArgument);var c,s=!r||r.includeLowers!==!1,f=r&&r.includeUppers===!0,l=En;try{c=e.reduce(i,[]),c.sort(o)}catch(h){return n(this,dt)}var d=0,v=f?function(n){return En(n,c[d][1])>0}:function(n){return En(n,c[d][1])>=0},p=s?function(n){return In(n,c[d][0])>0}:function(n){return In(n,c[d][0])>=0},y=v,m=new a.collClass(this,function(){return Wn.bound(c[0][0],c[c.length-1][1],!s,!f)});return m._ondirectionchange=function(n){\\\"next\\\"===n?(y=v,l=En):(y=p,l=In),c.sort(o)},m._addAlgorithm(function(n,t,e){for(var r=n.key;y(r);)if(++d,d===c.length)return t(e),!1;return u(r)?!0:0===cn(r,c[d][1])||0===cn(r,c[d][0])?!1:(t(function(){l===En?n[\\\"continue\\\"](c[d][0]):n[\\\"continue\\\"](c[d][1])}),!1)}),m},startsWithAnyOf:function(){var e=T.apply(Mn,arguments);return e.every(function(n){return\\\"string\\\"==typeof n})?0===e.length?t(this):this.inAnyRange(e.map(function(n){return[n,n+lt]})):n(this,\\\"startsWithAnyOf() only works with strings\\\")}}}),v($.prototype,function(){function n(n,t){n.filter=Dn(n.filter,t)}function t(n,t,e){var r=n.replayFilter;n.replayFilter=r?function(){return Dn(r(),t())}:t,n.justLimit=e&&!r}function e(n,t){n.isMatch=Dn(n.isMatch,t)}function r(n,t){if(n.isPrimKey)return t;var e=n.table.schema.idxByName[n.index];if(!e)throw new Ln.Schema(\\\"KeyPath \\\"+n.index+\\\" on object store \\\"+t.name+\\\" is not indexed\\\");return t.index(e.name)}function o(n,t){var e=r(n,t);return n.keysOnly&&\\\"openKeyCursor\\\"in e?e.openKeyCursor(n.range||null,n.dir+n.unique):e.openCursor(n.range||null,n.dir+n.unique)}function u(n,t,e,r,i){var u=n.replayFilter?Dn(n.filter,n.replayFilter()):n.filter;n.or?function(){function a(){2===++f&&e()}function c(n,e,i){if(!u||u(e,i,a,r)){var o=e.primaryKey.toString();d(s,o)||(s[o]=!0,t(n,e,i))}}var s={},f=0;n.or._iterate(c,a,r,i),rn(o(n,i),n.algorithm,c,a,r,!n.keysOnly&&n.valueMapper)}():rn(o(n,i),Dn(n.algorithm,u),t,e,r,!n.keysOnly&&n.valueMapper)}function a(n){return n.table.schema.instanceTemplate}return{_read:function(n,t){var e=this._ctx;return e.error?e.table._trans(null,function(n,t){t(e.error)}):e.table._idbstore(nt,n).then(t)},_write:function(n){var t=this._ctx;return t.error?t.table._trans(null,function(n,e){e(t.error)}):t.table._idbstore(tt,n,\\\"locked\\\")},_addAlgorithm:function(n){var t=this._ctx;t.algorithm=Dn(t.algorithm,n)},_iterate:function(n,t,e,r){return u(this._ctx,n,t,e,r)},clone:function(n){var t=Object.create(this.constructor.prototype),e=Object.create(this._ctx);return n&&h(e,n),t._ctx=e,t},raw:function(){return this._ctx.valueMapper=null,this},each:function(n){var t=this._ctx;if(wt){var e=a(t),r=t.table.schema.primKey.keyPath,i=O(e,t.index?t.table.schema.idxByName[t.index].keyPath:r),o=O(e,r);n(e,{key:i,primaryKey:o})}return this._read(function(e,r,i){u(t,n,e,r,i)})},count:function(n){if(wt)return U.resolve(0).then(n);var t=this._ctx;if(X(t,!0))return this._read(function(n,e,i){var o=r(t,i),u=t.range?o.count(t.range):o.count();u.onerror=pn(e),u.onsuccess=function(e){n(Math.min(e.target.result,t.limit))}},n);var e=0;return this._read(function(n,r,i){u(t,function(){return++e,!1},function(){n(e)},r,i)},n)},sortBy:function(n,t){function e(n,t){return t?e(n[i[t]],t-1):n[o]}function r(n,t){var r=e(n,u),i=e(t,u);return i>r?-a:r>i?a:0}var i=n.split(\\\".\\\").reverse(),o=i[0],u=i.length-1,a=\\\"next\\\"===this._ctx.dir?1:-1;return this.toArray(function(n){return n.sort(r)}).then(t)},toArray:function(n){var t=this._ctx;return this._read(function(n,e,o){if(wt&&n([a(t)]),qn&&\\\"next\\\"===t.dir&&X(t,!0)&&t.limit>0){var c=t.table.hook.reading.fire,s=r(t,o),f=t.limit<1/0?s.getAll(t.range,t.limit):s.getAll(t.range);f.onerror=pn(e),f.onsuccess=c===i?dn(n):un(dn(function(t){n(t.map(c))}))}else{var l=[];u(t,function(n){l.push(n)},function(){n(l)},e,o)}},n)},offset:function(n){var e=this._ctx;return 0>=n?this:(e.offset+=n,X(e)?t(e,function(){var t=n;return function(n,e){return 0===t?!0:1===t?(--t,!1):(e(function(){n.advance(t),t=0}),!1)}}):t(e,function(){var t=n;return function(){return--t<0}}),this)},limit:function(n){return this._ctx.limit=Math.min(this._ctx.limit,n),t(this._ctx,function(){var t=n;return function(n,e,r){return--t<=0&&e(r),t>=0}},!0),this},until:function(t,e){var r=this._ctx;return wt&&t(a(r)),n(this._ctx,function(n,r,i){return t(n.value)?(r(i),e):!0}),this},first:function(n){return this.limit(1).toArray(function(n){return n[0]}).then(n)},last:function(n){return this.reverse().first(n)},filter:function(t){return wt&&t(a(this._ctx)),n(this._ctx,function(n){return t(n.value)}),e(this._ctx,t),this},and:function(n){return this.filter(n)},or:function(n){return new Y(this._ctx.table,n,this)},reverse:function(){return this._ctx.dir=\\\"prev\\\"===this._ctx.dir?\\\"next\\\":\\\"prev\\\",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},desc:function(){return this.reverse()},eachKey:function(n){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,e){n(e.key,e)})},eachUniqueKey:function(n){return this._ctx.unique=\\\"unique\\\",this.eachKey(n)},eachPrimaryKey:function(n){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,e){n(e.primaryKey,e)})},keys:function(n){var t=this._ctx;t.keysOnly=!t.isMatch;var e=[];return this.each(function(n,t){e.push(t.key)}).then(function(){return e}).then(n)},primaryKeys:function(n){var t=this._ctx;if(qn&&\\\"next\\\"===t.dir&&X(t,!0)&&t.limit>0)return this._read(function(n,e,i){var o=r(t,i),u=t.limit<1/0?o.getAllKeys(t.range,t.limit):o.getAllKeys(t.range);u.onerror=pn(e),u.onsuccess=dn(n)}).then(n);t.keysOnly=!t.isMatch;var e=[];return this.each(function(n,t){e.push(t.primaryKey)}).then(function(){return e}).then(n)},uniqueKeys:function(n){return this._ctx.unique=\\\"unique\\\",this.keys(n)},firstKey:function(n){return this.limit(1).keys(function(n){return n[0]}).then(n)},lastKey:function(n){return this.reverse().firstKey(n)},distinct:function(){var t=this._ctx,e=t.index&&t.table.schema.idxByName[t.index];if(!e||!e.multi)return this;var r={};return n(this._ctx,function(n){var t=n.primaryKey.toString(),e=d(r,t);return r[t]=!0,!e}),this}}}),y(Z).from($).extend({modify:function(n){var t=this,e=this._ctx,i=e.table.hook,o=i.updating.fire,u=i.deleting.fire;return wt&&\\\"function\\\"==typeof n&&n.call({value:e.table.schema.instanceTemplate},e.table.schema.instanceTemplate),this._write(function(e,i,a,c){function s(n,t){function e(n){return w.push(n),k.push(r.primKey),l(),!0}x=t.primaryKey;var r={primKey:t.primaryKey,value:n,onsuccess:null,onerror:null};if(v.call(r,n,r)!==!1){var i=!d(r,\\\"value\\\");++g,E(function(){var n=i?t[\\\"delete\\\"]():t.update(r.value);n._hookCtx=r,n.onerror=yn(e),n.onsuccess=vn(function(){++b,l()})},e)}else r.onsuccess&&r.onsuccess(r.value)}function f(n){return n&&(w.push(n),k.push(x)),i(new N(\\\"Error modifying one or more objects\\\",w,b,k))}function l(){_&&b+w.length===g&&(w.length>0?f():e(b))}var v;if(\\\"function\\\"==typeof n)v=o===r&&u===r?n:function(t){var e=D(t);if(n.call(this,t,this)===!1)return!1;if(d(this,\\\"value\\\")){var r=S(e,this.value),i=o.call(this,r,this.primKey,e,c);i&&(t=this.value,On(i).forEach(function(n){C(t,n,i[n])}))}else u.call(this,this.primKey,t,c)};else if(o===r){var p=On(n),y=p.length;v=function(t){for(var e=!1,r=0;y>r;++r){var i=p[r],o=n[i];O(t,i)!==o&&(C(t,i,o),e=!0)}return e}}else{var m=n;n=P(m),v=function(t){var e=!1,r=o.call(this,n,this.primKey,D(t),c);return r&&h(n,r),On(n).forEach(function(r){var i=n[r];O(t,r)!==i&&(C(t,r,i),e=!0)}),r&&(n=P(m)),e}}var g=0,b=0,_=!1,w=[],k=[],x=null;t.clone().raw()._iterate(s,function(){_=!0,l()},f,a)})},\\\"delete\\\":function(){var n=this,t=this._ctx,e=t.range,i=t.table.hook.deleting.fire,o=i!==r;if(!o&&X(t)&&(t.isPrimKey&&!gt||!e))return this._write(function(n,t,r){var i=pn(t),o=e?r.count(e):r.count();o.onerror=i,o.onsuccess=function(){var u=o.result;E(function(){var t=e?r[\\\"delete\\\"](e):r.clear();t.onerror=i,t.onsuccess=function(){return n(u)}},function(n){return t(n)})}});var u=o?2e3:1e4;return this._write(function(e,r,a,c){var s=0,f=n.clone({keysOnly:!t.isMatch&&!o}).distinct().limit(u).raw(),l=[],h=function(){return f.each(o?function(n,t){l.push([t.primaryKey,t.value])}:function(n,t){l.push(t.primaryKey)}).then(function(){return o?l.sort(function(n,t){return En(n[0],t[0])}):l.sort(En),J(a,c,l,o,i)}).then(function(){var n=l.length;return s+=n,l=[],u>n?s:h()})};e(h())})}}),h(this,{Collection:$,Table:W,Transaction:Q,Version:f,WhereClause:Y,WriteableCollection:Z,WriteableTable:H}),u(),Un.forEach(function(n){n(et)})}function ln(n){if(\\\"function\\\"==typeof n)return new n;if(Cn(n))return[ln(n[0])];if(n&&\\\"object\\\"==typeof n){var t={};return hn(t,n),t}return n}function hn(n,t){return On(t).forEach(function(e){var r=ln(t[e]);n[e]=r}),n}function dn(n){return function(t){n(t.target.result)}}function vn(n){return un(function(t){var e=t.target,r=e.result,i=e._hookCtx,o=i&&i.onsuccess;o&&o(r),n&&n(r)},n)}function pn(n){return function(t){return mn(t),n(t.target.error),!1}}function yn(n){return un(function(t){var e=t.target,r=e.error,i=e._hookCtx,o=i&&i.onerror;return o&&o(r),mn(t),n(r),!1})}function mn(n){n.stopPropagation&&n.stopPropagation(),n.preventDefault&&n.preventDefault()}function gn(n){var t,e=fn.dependencies.localStorage;if(!e)return n([]);try{t=JSON.parse(e.getItem(\\\"Dexie.DatabaseNames\\\")||\\\"[]\\\")}catch(r){t=[]}n(t)&&e.setItem(\\\"Dexie.DatabaseNames\\\",JSON.stringify(t))}function bn(n){function t(n){return function(t){var e=n(t),r=e.value;return e.done?r:r&&\\\"function\\\"==typeof r.then?r.then(i,o):Cn(r)?U.all(r).then(i,o):i(r)}}var e=function(t){return n.next(t)},r=function(t){return n[\\\"throw\\\"](t)},i=t(e),o=t(r);return t(e)()}function _n(n,t,e,r,i,o,u){this.name=n,this.keyPath=t,this.unique=e,this.multi=r,this.auto=i,this.compound=o,this.dotted=u;var a=\\\"string\\\"==typeof t?t:t&&\\\"[\\\"+[].join.call(t,\\\"+\\\")+\\\"]\\\";this.src=(e?\\\"&\\\":\\\"\\\")+(r?\\\"*\\\":\\\"\\\")+(i?\\\"++\\\":\\\"\\\")+a}function wn(n,t,e,r){this.name=n,this.primKey=t||new _n,this.indexes=e||[new _n],this.instanceTemplate=r,this.mappedClass=null,this.idxByName=x(e,function(n){return[n.name,n]})}function kn(n){return 1===n.length?n[0]:n}function xn(n){var t=n&&(n.getDatabaseNames||n.webkitGetDatabaseNames);return t&&t.bind(n)}var An=\\\"undefined\\\"!=typeof location&&/^(http|https):\\\\/\\\\/(localhost|127\\\\.0\\\\.0\\\\.1)/.test(location.href),En=function(){return!0},In=!new Error(\\\"\\\").stack,On=Object.keys,Cn=Array.isArray,jn=\\\"undefined\\\"!=typeof self?self:\\\"undefined\\\"!=typeof window?window:global,Pn=Object.getPrototypeOf,Dn={}.hasOwnProperty,Sn=Object.getOwnPropertyDescriptor,Tn=[].slice,Kn=\\\"undefined\\\"!=typeof Symbol&&Symbol.iterator,Bn=Kn?function(n){var t;return null!=n&&(t=n[Kn])&&t.apply(n)}:function(){return null},Mn={},Nn=[].concat,qn=[\\\"Modify\\\",\\\"Bulk\\\",\\\"OpenFailed\\\",\\\"VersionChange\\\",\\\"Schema\\\",\\\"Upgrade\\\",\\\"InvalidTable\\\",\\\"MissingAPI\\\",\\\"NoSuchDatabase\\\",\\\"InvalidArgument\\\",\\\"SubTransaction\\\",\\\"Unsupported\\\",\\\"Internal\\\",\\\"DatabaseClosed\\\",\\\"IncompatiblePromise\\\"],Fn=[\\\"Unknown\\\",\\\"Constraint\\\",\\\"Data\\\",\\\"TransactionInactive\\\",\\\"ReadOnly\\\",\\\"Version\\\",\\\"NotFound\\\",\\\"InvalidState\\\",\\\"InvalidAccess\\\",\\\"Abort\\\",\\\"Timeout\\\",\\\"QuotaExceeded\\\",\\\"Syntax\\\",\\\"DataClone\\\"],Rn=qn.concat(Fn),Un={VersionChanged:\\\"Database version changed by other database connection\\\",DatabaseClosed:\\\"Database has been closed\\\",Abort:\\\"Transaction aborted\\\",TransactionInactive:\\\"Transaction has already completed or failed\\\"};y(B).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+\\\": \\\"+this.message+e(this._e,2))}},toString:function(){return this.name+\\\": \\\"+this.message}}),y(N).from(B),y(q).from(B);var zn=Rn.reduce(function(n,t){return n[t]=t+\\\"Error\\\",n},{}),Vn=B,Ln=Rn.reduce(function(n,e){function r(n,r){this._e=t(),this.name=i,n?\\\"string\\\"==typeof n?(this.message=n,this.inner=r||null):\\\"object\\\"==typeof n&&(this.message=n.name+\\\" \\\"+n.message,this.inner=n):(this.message=Un[e]||i,this.inner=null)}var i=e+\\\"Error\\\";return y(r).from(Vn),n[e]=r,n},{});Ln.Syntax=SyntaxError,Ln.Type=TypeError,Ln.Range=RangeError;var Wn=Fn.reduce(function(n,t){return n[t+\\\"Error\\\"]=Ln[t],n},{}),Hn=Rn.reduce(function(n,t){return-1===[\\\"Syntax\\\",\\\"Type\\\",\\\"Range\\\"].indexOf(t)&&(n[t+\\\"Error\\\"]=Ln[t]),n},{});Hn.ModifyError=N,Hn.DexieError=B,Hn.BulkError=q;var Gn={},Jn=100,Qn=20,Yn=!1,$n=jn.setImmediate?setImmediate.bind(null,Y):jn.MutationObserver?function(){var n=document.createElement(\\\"div\\\");new MutationObserver(function(){Y(),n=null}).observe(n,{attributes:!0}),n.setAttribute(\\\"i\\\",\\\"1\\\")}:function(){setTimeout(Y,0)},Xn=function(n,t){at.push([n,t]),nt&&($n(),nt=!1)},Zn=!0,nt=!0,tt=[],et=[],rt=null,it=i,ot={global:!0,ref:0,unhandleds:[],onunhandled:sn,finalize:function(){this.unhandleds.forEach(function(n){try{sn(n[0],n[1])}catch(t){}})}},ut=ot,at=[],ct=0,st=[];v(U.prototype,{then:function(n,t){var e=this,r=new U(function(r,i){H(e,new z(n,t,r,i))});return An&&(!this._prev||null===this._state)&&Q(r,this),r},_then:function(n,t){H(this,new z(null,null,n,t))},\\\"catch\\\":function(n){if(1===arguments.length)return this.then(null,n);var t=arguments[0],e=arguments[1];return\\\"function\\\"==typeof t?this.then(null,function(n){return n instanceof t?e(n):on(n)}):this.then(null,function(n){return n&&n.name===t?e(n):on(n)})},\\\"finally\\\":function(n){return this.then(function(t){return n(),t},function(t){return n(),on(t)})},uncaught:function(n){var t=this;return this.onuncatched=f(this.onuncatched,n),this._state===!1&&-1===tt.indexOf(this)&&tt.some(function(n,e,r){return n._value===t._value&&(r[e]=t)}),this},stack:{get:function(){if(this._stack)return this._stack;try{Yn=!0;var n=J(this,[],Qn),t=n.join(\\\"\\\\nFrom previous: \\\");return null!==this._state&&(this._stack=t),t}finally{Yn=!1}}}}),v(U,{all:function(){var n=T.apply(null,arguments);return new U(function(t,e){0===n.length&&t([]);var r=n.length;n.forEach(function(i,o){return U.resolve(i).then(function(e){n[o]=e,--r||t(n)},e)})})},resolve:function(n){return n&&\\\"function\\\"==typeof n.then?n:new U(Gn,!0,n)},reject:on,race:function(){var n=T.apply(null,arguments);return new U(function(t,e){n.map(function(n){return U.resolve(n).then(t,e)})})},PSD:{get:function(){return ut},set:function(n){return ut=n}},newPSD:an,usePSD:cn,scheduler:{get:function(){return Xn},set:function(n){Xn=n}},rejectionMapper:{get:function(){return it},set:function(n){it=n}},follow:function(n){return new U(function(t,e){return an(function(t,e){var r=ut;r.unhandleds=[],r.onunhandled=e,r.finalize=u(function(){var n=this;nn(function(){0===n.unhandleds.length?t():e(n.unhandleds[0])})},r.finalize),n()},t,e)})},on:R(null,{error:[f,rn]})}),_(function(){Xn=function(n,t){setTimeout(function(){n.apply(null,t)},0)}});var ft=\\\"1.4.2\\\",lt=String.fromCharCode(65535),ht=function(){try{return IDBKeyRange.only([[]]),[[]]}catch(n){return lt}}(),dt=\\\"Invalid key provided. Keys must be of type string, number, Date or Array.\\\",vt=\\\"String expected.\\\",pt=[],yt=\\\"undefined\\\"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),mt=yt,gt=yt,bt=function(n){return!/(dexie\\\\.js|dexie\\\\.min\\\\.js)/.test(n)};n(An,bt);var _t=function(){},wt=!1,kt=jn.idbModules&&jn.idbModules.shimIndexedDB?jn.idbModules:{};return v(fn,Hn),v(fn,{\\\"delete\\\":function(n){var t=new fn(n),e=t[\\\"delete\\\"]();return e.onblocked=function(n){return t.on(\\\"blocked\\\",n),this},e},exists:function(n){return new fn(n).open().then(function(n){return n.close(),!0})[\\\"catch\\\"](fn.NoSuchDatabaseError,function(){return!1})},getDatabaseNames:function(n){return new U(function(n,t){var e=xn(indexedDB);if(e){var r=e();r.onsuccess=function(t){n(g(t.target.result,0))},r.onerror=pn(t)}else gn(function(t){return n(t),!1})}).then(n)},defineClass:function(n){function t(t){t?h(this,t):wt&&hn(this,n)}return t},applyStructure:hn,ignoreTransaction:function(n){return ut.trans?cn(ut.transless,n):n()},vip:function(n){return an(function(){return ut.letThrough=!0,n()})},async:function(n){return function(){try{var t=bn(n.apply(this,arguments));return t&&\\\"function\\\"==typeof t.then?t:U.resolve(t)}catch(e){return I(e)}}},spawn:function(n,t,e){try{var r=bn(n.apply(e,t||[]));return r&&\\\"function\\\"==typeof r.then?r:U.resolve(r)}catch(i){return I(i)}},currentTransaction:{get:function(){return ut.trans||null}},Promise:U,debug:{get:function(){return An},set:function(t){n(t,\\\"dexie\\\"===t?function(){return!0}:bt)}},derive:y,extend:h,props:v,override:b,Events:R,events:R,getByKeyPath:O,setByKeyPath:C,delByKeyPath:j,shallowClone:P,deepClone:D,getObjectDiff:S,asap:k,maxKey:ht,addons:[],connections:pt,MultiModifyError:Ln.Modify,errnames:zn,IndexSpec:_n,TableSchema:wn,dependencies:{indexedDB:kt.shimIndexedDB||jn.indexedDB||jn.mozIndexedDB||jn.webkitIndexedDB||jn.msIndexedDB,IDBKeyRange:kt.IDBKeyRange||jn.IDBKeyRange||jn.webkitIDBKeyRange},semVer:ft,version:ft.split(\\\".\\\").map(function(n){return parseInt(n)}).reduce(function(n,t,e){return n+t/Math.pow(10,2*e)}),fakeAutoComplete:_t,\\\"default\\\":fn}),E(function(){fn.dependencies.localStorage=null!=(\\\"undefined\\\"!=typeof chrome&&null!==chrome?chrome.storage:void 0)?null:jn.localStorage}),U.rejectionMapper=F,_(function(){fn.fakeAutoComplete=_t=_,fn.fake=wt=!0}),fn});\\n//# sourceMappingURL=dist/dexie.min.js.map\"","module.exports = \"\\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, ExifRestore, camelize, contentLoaded, detectVerticalSquash, drawImageIOSFix, noop, without,\\n slice = [].slice,\\n extend1 = 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 hasProp = {}.hasOwnProperty;\\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, j, 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 (j = 0, len = callbacks.length; j < len; j++) {\\n callback = callbacks[j];\\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, j, 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 = j = 0, len = callbacks.length; j < len; i = ++j) {\\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(superClass) {\\n var extend, resolveOption;\\n\\n extend1(Dropzone, superClass);\\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 timeout: 30000,\\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 thumbnailMethod: 'crop',\\n resizeWidth: null,\\n resizeHeight: null,\\n resizeMimeType: null,\\n resizeQuality: 0.8,\\n resizeMethod: 'contain',\\n filesizeBase: 1000,\\n maxFiles: null,\\n params: {},\\n headers: null,\\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 renameFilename: null,\\n renameFile: null,\\n forceFallback: false,\\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 dictFileSizeUnits: {\\n tb: \\\"TB\\\",\\n gb: \\\"GB\\\",\\n mb: \\\"MB\\\",\\n kb: \\\"KB\\\",\\n b: \\\"b\\\"\\n },\\n init: function() {\\n return noop;\\n },\\n accept: function(file, done) {\\n return done();\\n },\\n fallback: function() {\\n var child, j, len, messageElement, ref, span;\\n this.element.className = this.element.className + \\\" dz-browser-not-supported\\\";\\n ref = this.element.getElementsByTagName(\\\"div\\\");\\n for (j = 0, len = ref.length; j < len; j++) {\\n child = ref[j];\\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, width, height, resizeMethod) {\\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 if ((width == null) && (height == null)) {\\n width = info.srcWidth;\\n height = info.srcHeight;\\n } else if (width == null) {\\n width = height * srcRatio;\\n } else if (height == null) {\\n height = width / srcRatio;\\n }\\n width = Math.min(width, info.srcWidth);\\n height = Math.min(height, info.srcHeight);\\n trgRatio = width / height;\\n if (info.srcWidth > width || info.srcHeight > height) {\\n if (resizeMethod === 'crop') {\\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 } else if (resizeMethod === 'contain') {\\n if (srcRatio > trgRatio) {\\n height = width / srcRatio;\\n } else {\\n width = height * srcRatio;\\n }\\n } else {\\n throw new Error(\\\"Unknown resizeMethod '\\\" + resizeMethod + \\\"'\\\");\\n }\\n }\\n info.srcX = (file.width - info.srcWidth) / 2;\\n info.srcY = (file.height - info.srcHeight) / 2;\\n info.trgWidth = width;\\n info.trgHeight = height;\\n return info;\\n },\\n transformFile: function(file, done) {\\n if ((this.options.resizeWidth || this.options.resizeHeight) && file.type.match(/image.*/)) {\\n return this.resizeImage(file, this.options.resizeWidth, this.options.resizeHeight, this.options.resizeMethod, done);\\n } else {\\n return done(file);\\n }\\n },\\n previewTemplate: \\\"
\\\\n
\\\\n
\\\\n
\\\\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 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 j, k, l, len, len1, len2, node, ref, ref1, ref2, removeFileEvent, removeLink, 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 (j = 0, len = ref.length; j < len; j++) {\\n node = ref[j];\\n node.textContent = file.name;\\n }\\n ref1 = file.previewElement.querySelectorAll(\\\"[data-dz-size]\\\");\\n for (k = 0, len1 = ref1.length; k < len1; k++) {\\n node = ref1[k];\\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 (l = 0, len2 = ref2.length; l < len2; l++) {\\n removeLink = ref2[l];\\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 j, len, ref, thumbnailElement;\\n if (file.previewElement) {\\n file.previewElement.classList.remove(\\\"dz-file-preview\\\");\\n ref = file.previewElement.querySelectorAll(\\\"[data-dz-thumbnail]\\\");\\n for (j = 0, len = ref.length; j < len; j++) {\\n thumbnailElement = ref[j];\\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 j, len, node, 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 (j = 0, len = ref.length; j < len; j++) {\\n node = ref[j];\\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 j, len, node, ref, results;\\n if (file.previewElement) {\\n ref = file.previewElement.querySelectorAll(\\\"[data-dz-uploadprogress]\\\");\\n results = [];\\n for (j = 0, len = ref.length; j < len; j++) {\\n node = ref[j];\\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 };\\n\\n extend = function() {\\n var j, key, len, object, objects, target, val;\\n target = arguments[0], objects = 2 <= arguments.length ? slice.call(arguments, 1) : [];\\n for (j = 0, len = objects.length; j < len; j++) {\\n object = objects[j];\\n for (key in object) {\\n val = object[key];\\n target[key] = val;\\n }\\n }\\n return target;\\n };\\n\\n function Dropzone(element1, options) {\\n var elementOptions, fallback, ref;\\n this.element = element1;\\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 if (this.options.renameFilename != null) {\\n this.options.renameFile = (function(_this) {\\n return function(file) {\\n return _this.options.renameFilename.call(_this, file.name, file);\\n };\\n })(this);\\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, j, len, ref, results;\\n ref = this.files;\\n results = [];\\n for (j = 0, len = ref.length; j < len; j++) {\\n file = ref[j];\\n if (file.accepted) {\\n results.push(file);\\n }\\n }\\n return results;\\n };\\n\\n Dropzone.prototype.getRejectedFiles = function() {\\n var file, j, len, ref, results;\\n ref = this.files;\\n results = [];\\n for (j = 0, len = ref.length; j < len; j++) {\\n file = ref[j];\\n if (!file.accepted) {\\n results.push(file);\\n }\\n }\\n return results;\\n };\\n\\n Dropzone.prototype.getFilesWithStatus = function(status) {\\n var file, j, len, ref, results;\\n ref = this.files;\\n results = [];\\n for (j = 0, len = ref.length; j < len; j++) {\\n file = ref[j];\\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, j, len, ref, results;\\n ref = this.files;\\n results = [];\\n for (j = 0, len = ref.length; j < len; j++) {\\n file = ref[j];\\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, j, len, noPropagation, ref, ref1, setupHiddenFileInput;\\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, j, len;\\n files = _this.hiddenFileInput.files;\\n if (files.length) {\\n for (j = 0, len = files.length; j < len; j++) {\\n file = files[j];\\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 (j = 0, len = ref1.length; j < len; j++) {\\n eventName = ref1[j];\\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 (undefined) {}\\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, j, len, ref, totalBytes, totalBytesSent, totalUploadProgress;\\n totalBytesSent = 0;\\n totalBytes = 0;\\n activeFiles = this.getActiveFiles();\\n if (activeFiles.length) {\\n ref = this.getActiveFiles();\\n for (j = 0, len = ref.length; j < len; j++) {\\n file = ref[j];\\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._renameFile = function(file) {\\n if (typeof this.options.renameFile !== \\\"function\\\") {\\n return file.name;\\n }\\n return this.options.renameFile(file);\\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 if (this.options.dictFallbackText) {\\n fieldsString += \\\"

\\\" + this.options.dictFallbackText + \\\"

\\\";\\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, j, len, ref, tagName;\\n getFallback = function(elements) {\\n var el, j, len;\\n for (j = 0, len = elements.length; j < len; j++) {\\n el = elements[j];\\n if (/(^| )fallback($| )/.test(el.className)) {\\n return el;\\n }\\n }\\n };\\n ref = [\\\"div\\\", \\\"form\\\"];\\n for (j = 0, len = ref.length; j < len; j++) {\\n tagName = ref[j];\\n if (fallback = getFallback(this.element.getElementsByTagName(tagName))) {\\n return fallback;\\n }\\n }\\n };\\n\\n Dropzone.prototype.setupEventListeners = function() {\\n var elementListeners, event, j, len, listener, ref, results;\\n ref = this.listeners;\\n results = [];\\n for (j = 0, len = ref.length; j < len; j++) {\\n elementListeners = ref[j];\\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, j, len, listener, ref, results;\\n ref = this.listeners;\\n results = [];\\n for (j = 0, len = ref.length; j < len; j++) {\\n elementListeners = ref[j];\\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, j, 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 (j = 0, len = ref.length; j < len; j++) {\\n file = ref[j];\\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, j, len, selectedSize, selectedUnit, unit, units;\\n selectedSize = 0;\\n selectedUnit = \\\"b\\\";\\n if (size > 0) {\\n units = ['tb', 'gb', 'mb', 'kb', 'b'];\\n for (i = j = 0, len = units.length; j < len; i = ++j) {\\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 + \\\" \\\" + this.options.dictFileSizeUnits[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, j, len, results;\\n results = [];\\n for (j = 0, len = files.length; j < len; j++) {\\n file = files[j];\\n results.push(this.addFile(file));\\n }\\n return results;\\n };\\n\\n Dropzone.prototype._addFilesFromItems = function(items) {\\n var entry, item, j, len, results;\\n results = [];\\n for (j = 0, len = items.length; j < len; j++) {\\n item = items[j];\\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, errorHandler, readEntries;\\n dirReader = directory.createReader();\\n errorHandler = function(error) {\\n return typeof console !== \\\"undefined\\\" && console !== null ? typeof console.log === \\\"function\\\" ? console.log(error) : void 0 : void 0;\\n };\\n readEntries = (function(_this) {\\n return function() {\\n return dirReader.readEntries(function(entries) {\\n var entry, j, len;\\n if (entries.length > 0) {\\n for (j = 0, len = entries.length; j < len; j++) {\\n entry = entries[j];\\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 readEntries();\\n }\\n return null;\\n }, errorHandler);\\n };\\n })(this);\\n return readEntries();\\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 filename: this._renameFile(file)\\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, j, len;\\n for (j = 0, len = files.length; j < len; j++) {\\n file = files[j];\\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 var file;\\n if (this._processingThumbnail || this._thumbnailQueue.length === 0) {\\n return;\\n }\\n this._processingThumbnail = true;\\n file = this._thumbnailQueue.shift();\\n return this.createThumbnail(file, this.options.thumbnailWidth, this.options.thumbnailHeight, this.options.thumbnailMethod, true, (function(_this) {\\n return function(dataUrl) {\\n _this.emit(\\\"thumbnail\\\", file, dataUrl);\\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, j, len, ref;\\n if (cancelIfNecessary == null) {\\n cancelIfNecessary = false;\\n }\\n ref = this.files.slice();\\n for (j = 0, len = ref.length; j < len; j++) {\\n file = ref[j];\\n if (file.status !== Dropzone.UPLOADING || cancelIfNecessary) {\\n this.removeFile(file);\\n }\\n }\\n return null;\\n };\\n\\n Dropzone.prototype.resizeImage = function(file, width, height, resizeMethod, callback) {\\n return this.createThumbnail(file, width, height, resizeMethod, false, (function(_this) {\\n return function(dataUrl, canvas) {\\n var resizeMimeType, resizedDataURL;\\n if (canvas === null) {\\n return callback(file);\\n } else {\\n resizeMimeType = _this.options.resizeMimeType;\\n if (resizeMimeType == null) {\\n resizeMimeType = file.type;\\n }\\n resizedDataURL = canvas.toDataURL(resizeMimeType, _this.options.resizeQuality);\\n if (resizeMimeType === 'image/jpeg' || resizeMimeType === 'image/jpg') {\\n resizedDataURL = ExifRestore.restore(file.dataURL, resizedDataURL);\\n }\\n return callback(Dropzone.dataURItoBlob(resizedDataURL));\\n }\\n };\\n })(this));\\n };\\n\\n Dropzone.prototype.createThumbnail = function(file, width, height, resizeMethod, fixOrientation, callback) {\\n var fileReader;\\n fileReader = new FileReader;\\n fileReader.onload = (function(_this) {\\n return function() {\\n file.dataURL = fileReader.result;\\n if (file.type === \\\"image/svg+xml\\\") {\\n if (callback != null) {\\n callback(fileReader.result);\\n }\\n return;\\n }\\n return _this.createThumbnailFromUrl(file, width, height, resizeMethod, fixOrientation, callback);\\n };\\n })(this);\\n return fileReader.readAsDataURL(file);\\n };\\n\\n Dropzone.prototype.createThumbnailFromUrl = function(file, width, height, resizeMethod, fixOrientation, 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 loadExif;\\n loadExif = function(callback) {\\n return callback(1);\\n };\\n if ((typeof EXIF !== \\\"undefined\\\" && EXIF !== null) && fixOrientation) {\\n loadExif = function(callback) {\\n return EXIF.getData(img, function() {\\n return callback(EXIF.getTag(this, 'Orientation'));\\n });\\n };\\n }\\n return loadExif(function(orientation) {\\n var canvas, ctx, ref, ref1, ref2, ref3, resizeInfo, thumbnail;\\n file.width = img.width;\\n file.height = img.height;\\n resizeInfo = _this.options.resize.call(_this, file, width, height, resizeMethod);\\n canvas = document.createElement(\\\"canvas\\\");\\n ctx = canvas.getContext(\\\"2d\\\");\\n canvas.width = resizeInfo.trgWidth;\\n canvas.height = resizeInfo.trgHeight;\\n if (orientation > 4) {\\n canvas.width = resizeInfo.trgHeight;\\n canvas.height = resizeInfo.trgWidth;\\n }\\n switch (orientation) {\\n case 2:\\n ctx.translate(canvas.width, 0);\\n ctx.scale(-1, 1);\\n break;\\n case 3:\\n ctx.translate(canvas.width, canvas.height);\\n ctx.rotate(Math.PI);\\n break;\\n case 4:\\n ctx.translate(0, canvas.height);\\n ctx.scale(1, -1);\\n break;\\n case 5:\\n ctx.rotate(0.5 * Math.PI);\\n ctx.scale(1, -1);\\n break;\\n case 6:\\n ctx.rotate(0.5 * Math.PI);\\n ctx.translate(0, -canvas.height);\\n break;\\n case 7:\\n ctx.rotate(0.5 * Math.PI);\\n ctx.translate(canvas.width, -canvas.height);\\n ctx.scale(-1, 1);\\n break;\\n case 8:\\n ctx.rotate(-0.5 * Math.PI);\\n ctx.translate(-canvas.width, 0);\\n }\\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 if (callback != null) {\\n return callback(thumbnail, canvas);\\n }\\n });\\n };\\n })(this);\\n if (callback != null) {\\n img.onerror = callback;\\n }\\n return img.src = file.dataURL;\\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, j, len;\\n for (j = 0, len = files.length; j < len; j++) {\\n file = files[j];\\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 j, len, ref, results;\\n ref = this.files;\\n results = [];\\n for (j = 0, len = ref.length; j < len; j++) {\\n file = ref[j];\\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, j, k, len, len1, ref;\\n if (file.status === Dropzone.UPLOADING) {\\n groupedFiles = this._getFilesWithXhr(file.xhr);\\n for (j = 0, len = groupedFiles.length; j < len; j++) {\\n groupedFile = groupedFiles[j];\\n groupedFile.status = Dropzone.CANCELED;\\n }\\n file.xhr.abort();\\n for (k = 0, len1 = groupedFiles.length; k < len1; k++) {\\n groupedFile = groupedFiles[k];\\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 doneCounter, doneFunction, file, formData, handleError, headerName, headerValue, headers, i, input, inputName, inputType, j, k, key, l, len, len1, len2, len3, m, method, o, option, progressObj, ref, ref1, ref2, ref3, ref4, ref5, response, results, updateProgress, url, value, xhr;\\n xhr = new XMLHttpRequest();\\n for (j = 0, len = files.length; j < len; j++) {\\n file = files[j];\\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.timeout = resolveOption(this.options.timeout, files);\\n xhr.withCredentials = !!this.options.withCredentials;\\n response = null;\\n handleError = (function(_this) {\\n return function() {\\n var k, len1, results;\\n results = [];\\n for (k = 0, len1 = files.length; k < len1; k++) {\\n file = files[k];\\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, k, l, len1, len2, len3, m, progress, results;\\n if (e != null) {\\n progress = 100 * e.loaded / e.total;\\n for (k = 0, len1 = files.length; k < len1; k++) {\\n file = files[k];\\n file.upload.progress = progress;\\n file.upload.total = e.total;\\n file.upload.bytesSent = e.loaded;\\n }\\n } else {\\n allFilesFinished = true;\\n progress = 100;\\n for (l = 0, len2 = files.length; l < len2; l++) {\\n file = files[l];\\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 (m = 0, len3 = files.length; m < len3; m++) {\\n file = files[m];\\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 error1, ref;\\n if (files[0].status === Dropzone.CANCELED) {\\n return;\\n }\\n if (xhr.readyState !== 4) {\\n return;\\n }\\n if (xhr.responseType !== 'arraybuffer' && xhr.responseType !== 'blob') {\\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 (error1) {\\n e = error1;\\n response = \\\"Invalid JSON response from server.\\\";\\n }\\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 (k = 0, len1 = files.length; k < len1; k++) {\\n file = files[k];\\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 (l = 0, len2 = ref2.length; l < len2; l++) {\\n input = ref2[l];\\n inputName = input.getAttribute(\\\"name\\\");\\n inputType = input.getAttribute(\\\"type\\\");\\n if (input.tagName === \\\"SELECT\\\" && input.hasAttribute(\\\"multiple\\\")) {\\n ref3 = input.options;\\n for (m = 0, len3 = ref3.length; m < len3; m++) {\\n option = ref3[m];\\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 doneCounter = 0;\\n results = [];\\n for (i = o = 0, ref5 = files.length - 1; 0 <= ref5 ? o <= ref5 : o >= ref5; i = 0 <= ref5 ? ++o : --o) {\\n doneFunction = (function(_this) {\\n return function(file, paramName, fileName) {\\n return function(transformedFile) {\\n formData.append(paramName, transformedFile, fileName);\\n if (++doneCounter === files.length) {\\n return _this.submitRequest(xhr, formData, files);\\n }\\n };\\n };\\n })(this);\\n results.push(this.options.transformFile.call(this, files[i], doneFunction(files[i], this._getParamName(i), files[i].upload.filename)));\\n }\\n return results;\\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, j, len;\\n for (j = 0, len = files.length; j < len; j++) {\\n file = files[j];\\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, j, len;\\n for (j = 0, len = files.length; j < len; j++) {\\n file = files[j];\\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 = \\\"5.1.1\\\";\\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, j, len, results;\\n if (document.querySelectorAll) {\\n dropzones = document.querySelectorAll(\\\".dropzone\\\");\\n } else {\\n dropzones = [];\\n checkElements = function(elements) {\\n var el, j, len, results;\\n results = [];\\n for (j = 0, len = elements.length; j < len; j++) {\\n el = elements[j];\\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 (j = 0, len = dropzones.length; j < len; j++) {\\n dropzone = dropzones[j];\\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, j, len, ref, regex;\\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 (j = 0, len = ref.length; j < len; j++) {\\n regex = ref[j];\\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 Dropzone.dataURItoBlob = function(dataURI) {\\n var ab, byteString, i, ia, j, mimeString, ref;\\n byteString = atob(dataURI.split(',')[1]);\\n mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];\\n ab = new ArrayBuffer(byteString.length);\\n ia = new Uint8Array(ab);\\n for (i = j = 0, ref = byteString.length; 0 <= ref ? j <= ref : j >= ref; i = 0 <= ref ? ++j : --j) {\\n ia[i] = byteString.charCodeAt(i);\\n }\\n return new Blob([ab], {\\n type: mimeString\\n });\\n };\\n\\n without = function(list, rejectedItem) {\\n var item, j, len, results;\\n results = [];\\n for (j = 0, len = list.length; j < len; j++) {\\n item = list[j];\\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, error1, j, k, len, len1, ref;\\n if (els instanceof Array) {\\n elements = [];\\n try {\\n for (j = 0, len = els.length; j < len; j++) {\\n el = els[j];\\n elements.push(this.getElement(el, name));\\n }\\n } catch (error1) {\\n e = error1;\\n elements = null;\\n }\\n } else if (typeof els === \\\"string\\\") {\\n elements = [];\\n ref = document.querySelectorAll(els);\\n for (k = 0, len1 = ref.length; k < len1; k++) {\\n el = ref[k];\\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, j, len, mimeType, validType;\\n if (!acceptedFiles) {\\n return true;\\n }\\n acceptedFiles = acceptedFiles.split(\\\",\\\");\\n mimeType = file.type;\\n baseMimeType = mimeType.replace(/\\\\/.*$/, \\\"\\\");\\n for (j = 0, len = acceptedFiles.length; j < len; j++) {\\n validType = acceptedFiles[j];\\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(1, 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 ExifRestore = (function() {\\n function ExifRestore() {}\\n\\n ExifRestore.KEY_STR = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\\n\\n ExifRestore.encode64 = function(input) {\\n var chr1, chr2, chr3, enc1, enc2, enc3, enc4, i, output;\\n output = '';\\n chr1 = void 0;\\n chr2 = void 0;\\n chr3 = '';\\n enc1 = void 0;\\n enc2 = void 0;\\n enc3 = void 0;\\n enc4 = '';\\n i = 0;\\n while (true) {\\n chr1 = input[i++];\\n chr2 = input[i++];\\n chr3 = input[i++];\\n enc1 = chr1 >> 2;\\n enc2 = (chr1 & 3) << 4 | chr2 >> 4;\\n enc3 = (chr2 & 15) << 2 | chr3 >> 6;\\n enc4 = chr3 & 63;\\n if (isNaN(chr2)) {\\n enc3 = enc4 = 64;\\n } else if (isNaN(chr3)) {\\n enc4 = 64;\\n }\\n output = output + this.KEY_STR.charAt(enc1) + this.KEY_STR.charAt(enc2) + this.KEY_STR.charAt(enc3) + this.KEY_STR.charAt(enc4);\\n chr1 = chr2 = chr3 = '';\\n enc1 = enc2 = enc3 = enc4 = '';\\n if (!(i < input.length)) {\\n break;\\n }\\n }\\n return output;\\n };\\n\\n ExifRestore.restore = function(origFileBase64, resizedFileBase64) {\\n var image, rawImage, segments;\\n if (!origFileBase64.match('data:image/jpeg;base64,')) {\\n return resizedFileBase64;\\n }\\n rawImage = this.decode64(origFileBase64.replace('data:image/jpeg;base64,', ''));\\n segments = this.slice2Segments(rawImage);\\n image = this.exifManipulation(resizedFileBase64, segments);\\n return 'data:image/jpeg;base64,' + this.encode64(image);\\n };\\n\\n ExifRestore.exifManipulation = function(resizedFileBase64, segments) {\\n var aBuffer, exifArray, newImageArray;\\n exifArray = this.getExifArray(segments);\\n newImageArray = this.insertExif(resizedFileBase64, exifArray);\\n aBuffer = new Uint8Array(newImageArray);\\n return aBuffer;\\n };\\n\\n ExifRestore.getExifArray = function(segments) {\\n var seg, x;\\n seg = void 0;\\n x = 0;\\n while (x < segments.length) {\\n seg = segments[x];\\n if (seg[0] === 255 & seg[1] === 225) {\\n return seg;\\n }\\n x++;\\n }\\n return [];\\n };\\n\\n ExifRestore.insertExif = function(resizedFileBase64, exifArray) {\\n var array, ato, buf, imageData, mae, separatePoint;\\n imageData = resizedFileBase64.replace('data:image/jpeg;base64,', '');\\n buf = this.decode64(imageData);\\n separatePoint = buf.indexOf(255, 3);\\n mae = buf.slice(0, separatePoint);\\n ato = buf.slice(separatePoint);\\n array = mae;\\n array = array.concat(exifArray);\\n array = array.concat(ato);\\n return array;\\n };\\n\\n ExifRestore.slice2Segments = function(rawImageArray) {\\n var endPoint, head, length, seg, segments;\\n head = 0;\\n segments = [];\\n while (true) {\\n if (rawImageArray[head] === 255 & rawImageArray[head + 1] === 218) {\\n break;\\n }\\n if (rawImageArray[head] === 255 & rawImageArray[head + 1] === 216) {\\n head += 2;\\n } else {\\n length = rawImageArray[head + 2] * 256 + rawImageArray[head + 3];\\n endPoint = head + length + 2;\\n seg = rawImageArray.slice(head, endPoint);\\n segments.push(seg);\\n head = endPoint;\\n }\\n if (head > rawImageArray.length) {\\n break;\\n }\\n }\\n return segments;\\n };\\n\\n ExifRestore.decode64 = function(input) {\\n var base64test, buf, chr1, chr2, chr3, enc1, enc2, enc3, enc4, i, output;\\n output = '';\\n chr1 = void 0;\\n chr2 = void 0;\\n chr3 = '';\\n enc1 = void 0;\\n enc2 = void 0;\\n enc3 = void 0;\\n enc4 = '';\\n i = 0;\\n buf = [];\\n base64test = /[^A-Za-z0-9\\\\+\\\\/\\\\=]/g;\\n if (base64test.exec(input)) {\\n console.warning('There were invalid base64 characters in the input text.\\\\n' + 'Valid base64 characters are A-Z, a-z, 0-9, \\\\'+\\\\', \\\\'/\\\\',and \\\\'=\\\\'\\\\n' + 'Expect errors in decoding.');\\n }\\n input = input.replace(/[^A-Za-z0-9\\\\+\\\\/\\\\=]/g, '');\\n while (true) {\\n enc1 = this.KEY_STR.indexOf(input.charAt(i++));\\n enc2 = this.KEY_STR.indexOf(input.charAt(i++));\\n enc3 = this.KEY_STR.indexOf(input.charAt(i++));\\n enc4 = this.KEY_STR.indexOf(input.charAt(i++));\\n chr1 = enc1 << 2 | enc2 >> 4;\\n chr2 = (enc2 & 15) << 4 | enc3 >> 2;\\n chr3 = (enc3 & 3) << 6 | enc4;\\n buf.push(chr1);\\n if (enc3 !== 64) {\\n buf.push(chr2);\\n }\\n if (enc4 !== 64) {\\n buf.push(chr3);\\n }\\n chr1 = chr2 = chr3 = '';\\n enc1 = enc2 = enc3 = enc4 = '';\\n if (!(i < input.length)) {\\n break;\\n }\\n }\\n return buf;\\n };\\n\\n return ExifRestore;\\n\\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, error1;\\n try {\\n root.doScroll(\\\"left\\\");\\n } catch (error1) {\\n e = error1;\\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 (undefined) {}\\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\"","module.exports = \"/**\\n * Copyright 2016 Google Inc. All Rights Reserved.\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n(function(window, document) {\\n\\n\\n// Exits early if all IntersectionObserver and IntersectionObserverEntry\\n// features are natively supported.\\nif ('IntersectionObserver' in window &&\\n 'IntersectionObserverEntry' in window &&\\n 'intersectionRatio' in window.IntersectionObserverEntry.prototype) {\\n return;\\n}\\n\\n\\n/**\\n * An IntersectionObserver registry. This registry exists to hold a strong\\n * reference to IntersectionObserver instances currently observering a target\\n * element. Without this registry, instances without another reference may be\\n * garbage collected.\\n */\\nvar registry = [];\\n\\n\\n/**\\n * Creates the global IntersectionObserverEntry constructor.\\n * https://wicg.github.io/IntersectionObserver/#intersection-observer-entry\\n * @param {Object} entry A dictionary of instance properties.\\n * @constructor\\n */\\nfunction IntersectionObserverEntry(entry) {\\n this.time = entry.time;\\n this.rootBounds = entry.rootBounds;\\n this.boundingClientRect = entry.boundingClientRect;\\n this.intersectionRect = entry.intersectionRect;\\n this.target = entry.target;\\n\\n // Calculates the intersection ratio. Sets it to 0 if the target area is 0.\\n var targetRect = this.boundingClientRect;\\n var targetArea = targetRect.width * targetRect.height;\\n var intersectionRect = this.intersectionRect;\\n var intersectionArea = intersectionRect.width * intersectionRect.height;\\n this.intersectionRatio = targetArea ? (intersectionArea / targetArea) : 0;\\n}\\n\\n\\n/**\\n * Creates the global IntersectionObserver constructor.\\n * https://wicg.github.io/IntersectionObserver/#intersection-observer-interface\\n * @param {Function} callback The function to be invoked after intersection\\n * changes have queued. The function is not invoked if the queue has\\n * been emptied by calling the `takeRecords` method.\\n * @param {Object=} opt_options Optional configuration options.\\n * @constructor\\n */\\nfunction IntersectionObserver(callback, opt_options) {\\n\\n var options = opt_options || {};\\n\\n if (typeof callback != 'function') {\\n throw new Error('callback must be a function');\\n }\\n\\n if (options.root && options.root.nodeType != 1) {\\n throw new Error('root must be an Element');\\n }\\n\\n // Binds and throttles `this._checkForIntersections`.\\n this._checkForIntersections = throttle(\\n this._checkForIntersections.bind(this), this.THROTTLE_TIMEOUT);\\n\\n // Private properties.\\n this._callback = callback;\\n this._observationTargets = [];\\n this._queuedEntries = [];\\n this._rootMarginValues = this._parseRootMargin(options.rootMargin);\\n\\n // Public properties.\\n this.thresholds = this._initThresholds(options.threshold);\\n this.root = options.root || null;\\n this.rootMargin = this._rootMarginValues.map(function(margin) {\\n return margin.value + margin.unit;\\n }).join(' ');\\n}\\n\\n\\n/**\\n * The minimum interval within which the document will be checked for\\n * intersection changes.\\n */\\nIntersectionObserver.prototype.THROTTLE_TIMEOUT = 100;\\n\\n\\n/**\\n * The frequency in which the polyfill polls for intersection changes.\\n * this can be updated on a per instance basis and must be set prior to\\n * calling `observe` on the first target.\\n */\\nIntersectionObserver.prototype.POLL_INTERVAL = null;\\n\\n\\n/**\\n * Starts observing a target element for intersection changes based on\\n * the thresholds values.\\n * @param {Element} target The DOM element to observe.\\n */\\nIntersectionObserver.prototype.observe = function(target) {\\n // If the target is already being observed, do nothing.\\n if (this._observationTargets.some(function(item) {\\n return item.element == target;\\n })) {\\n return;\\n }\\n\\n if (!(target && target.nodeType == 1)) {\\n throw new Error('target must be an Element');\\n }\\n\\n this._registerInstance();\\n this._observationTargets.push({element: target, entry: null});\\n this._monitorIntersections();\\n};\\n\\n\\n/**\\n * Stops observing a target element for intersection changes.\\n * @param {Element} target The DOM element to observe.\\n */\\nIntersectionObserver.prototype.unobserve = function(target) {\\n this._observationTargets =\\n this._observationTargets.filter(function(item) {\\n\\n return item.element != target;\\n });\\n if (!this._observationTargets.length) {\\n this._unmonitorIntersections();\\n this._unregisterInstance();\\n }\\n};\\n\\n\\n/**\\n * Stops observing all target elements for intersection changes.\\n */\\nIntersectionObserver.prototype.disconnect = function() {\\n this._observationTargets = [];\\n this._unmonitorIntersections();\\n this._unregisterInstance();\\n};\\n\\n\\n/**\\n * Returns any queue entries that have not yet been reported to the\\n * callback and clears the queue. This can be used in conjunction with the\\n * callback to obtain the absolute most up-to-date intersection information.\\n * @return {Array} The currently queued entries.\\n */\\nIntersectionObserver.prototype.takeRecords = function() {\\n var records = this._queuedEntries.slice();\\n this._queuedEntries = [];\\n return records;\\n};\\n\\n\\n/**\\n * Accepts the threshold value from the user configuration object and\\n * returns a sorted array of unique threshold values. If a value is not\\n * between 0 and 1 and error is thrown.\\n * @private\\n * @param {Array|number=} opt_threshold An optional threshold value or\\n * a list of threshold values, defaulting to [0].\\n * @return {Array} A sorted list of unique and valid threshold values.\\n */\\nIntersectionObserver.prototype._initThresholds = function(opt_threshold) {\\n var threshold = opt_threshold || [0];\\n if (!isArray(threshold)) threshold = [threshold];\\n\\n return threshold.sort().filter(function(t, i, a) {\\n if (typeof t != 'number' || isNaN(t) || t < 0 || t > 1) {\\n throw new Error('threshold must be a number between 0 and 1 inclusively');\\n }\\n return t !== a[i - 1];\\n });\\n};\\n\\n\\n/**\\n * Accepts the rootMargin value from the user configuration object\\n * and returns an array of the four margin values as an object containing\\n * the value and unit properties. If any of the values are not properly\\n * formatted or use a unit other than px or %, and error is thrown.\\n * @private\\n * @param {string=} opt_rootMargin An optional rootMargin value,\\n * defaulting to '0px'.\\n * @return {Array} An array of margin objects with the keys\\n * value and unit.\\n */\\nIntersectionObserver.prototype._parseRootMargin = function(opt_rootMargin) {\\n var marginString = opt_rootMargin || '0px';\\n var margins = marginString.split(/\\\\s+/).map(function(margin) {\\n var parts = /^(-?\\\\d*\\\\.?\\\\d+)(px|%)$/.exec(margin);\\n if (!parts) {\\n throw new Error('rootMargin must be specified in pixels or percent');\\n }\\n return {value: parseFloat(parts[1]), unit: parts[2]};\\n });\\n\\n // Handles shorthand.\\n margins[1] = margins[1] || margins[0];\\n margins[2] = margins[2] || margins[0];\\n margins[3] = margins[3] || margins[1];\\n\\n return margins;\\n};\\n\\n\\n/**\\n * Starts polling for intersection changes if the polling is not already\\n * happening, and if the page's visibilty state is visible.\\n * @private\\n */\\nIntersectionObserver.prototype._monitorIntersections = function() {\\n if (!this._monitoringIntersections) {\\n this._monitoringIntersections = true;\\n\\n this._checkForIntersections();\\n\\n // If a poll interval is set, use polling instead of listening to\\n // resize and scroll events or DOM mutations.\\n if (this.POLL_INTERVAL) {\\n this._monitoringInterval = setInterval(\\n this._checkForIntersections, this.POLL_INTERVAL);\\n }\\n else {\\n addEvent(window, 'resize', this._checkForIntersections, true);\\n addEvent(document, 'scroll', this._checkForIntersections, true);\\n\\n if ('MutationObserver' in window) {\\n this._domObserver = new MutationObserver(this._checkForIntersections);\\n this._domObserver.observe(document, {\\n attributes: true,\\n childList: true,\\n characterData: true,\\n subtree: true\\n });\\n }\\n }\\n }\\n};\\n\\n\\n/**\\n * Stops polling for intersection changes.\\n * @private\\n */\\nIntersectionObserver.prototype._unmonitorIntersections = function() {\\n if (this._monitoringIntersections) {\\n this._monitoringIntersections = false;\\n\\n clearInterval(this._monitoringInterval);\\n this._monitoringInterval = null;\\n\\n removeEvent(window, 'resize', this._checkForIntersections, true);\\n removeEvent(document, 'scroll', this._checkForIntersections, true);\\n\\n if (this._domObserver) {\\n this._domObserver.disconnect();\\n this._domObserver = null;\\n }\\n }\\n};\\n\\n\\n/**\\n * Scans each observation target for intersection changes and adds them\\n * to the internal entries queue. If new entries are found, it\\n * schedules the callback to be invoked.\\n * @private\\n */\\nIntersectionObserver.prototype._checkForIntersections = function() {\\n var rootIsInDom = this._rootIsInDom();\\n var rootRect = rootIsInDom ? this._getRootRect() : getEmptyRect();\\n\\n this._observationTargets.forEach(function(item) {\\n var target = item.element;\\n var targetRect = getBoundingClientRect(target);\\n var rootContainsTarget = this._rootContainsTarget(target);\\n var oldEntry = item.entry;\\n var newEntry = item.entry = new IntersectionObserverEntry({\\n time: now(),\\n target: target,\\n boundingClientRect: targetRect,\\n rootBounds: rootRect,\\n intersectionRect: (rootIsInDom && rootContainsTarget) ?\\n this._computeTargetAndRootIntersection(target, rootRect) :\\n getEmptyRect()\\n });\\n\\n if (rootIsInDom && rootContainsTarget) {\\n // If the new entry intersection ratio has crossed any of the\\n // thresholds, add a new entry.\\n if (this._hasCrossedThreshold(oldEntry, newEntry)) {\\n this._queuedEntries.push(newEntry);\\n }\\n } else {\\n // If the root is not in the DOM or target is not contained within\\n // root but the previous entry for this target had an intersection,\\n // add a new record indicating removal.\\n if (oldEntry && hasIntersection(oldEntry.intersectionRect)) {\\n this._queuedEntries.push(newEntry);\\n }\\n }\\n }.bind(this));\\n\\n if (this._queuedEntries.length) {\\n this._callback(this.takeRecords(), this);\\n }\\n};\\n\\n\\n/**\\n * Accepts a target and root rect computes the intersection between then\\n * following the algorithm in the spec.\\n * TODO(philipwalton): at this time clip-path is not considered.\\n * https://wicg.github.io/IntersectionObserver/#calculate-intersection-rect-algo\\n * @param {Element} target The target DOM element\\n * @param {Object} rootRect The bounding rect of the root after being\\n * expanded by the rootMargin value.\\n * @return {Object} The final intersection rect object.\\n * @private\\n */\\nIntersectionObserver.prototype._computeTargetAndRootIntersection =\\n function(target, rootRect) {\\n\\n var targetRect = getBoundingClientRect(target);\\n var intersectionRect = targetRect;\\n var parent = target.parentNode;\\n var atRoot = false;\\n\\n while (!atRoot) {\\n var parentRect = null;\\n\\n // If we're at the root element, set parentRect to the already\\n // calculated rootRect.\\n if (parent == this.root || parent.nodeType != 1) {\\n atRoot = true;\\n parentRect = rootRect;\\n }\\n // Otherwise check to see if the parent element hides overflow,\\n // and if so update parentRect.\\n else {\\n var style = window.getComputedStyle(parent);\\n if (style.overflow != 'visible') {\\n parentRect = getBoundingClientRect(parent);\\n }\\n }\\n // If either of the above conditionals set a new parentRect,\\n // calculate new intersection data.\\n if (parentRect) {\\n intersectionRect = computeRectIntersection(\\n parentRect, intersectionRect);\\n\\n if (!hasIntersection(intersectionRect)) break;\\n }\\n parent = parent.parentNode;\\n }\\n return intersectionRect;\\n};\\n\\n\\n/**\\n * Returns the root rect after being expanded by the rootMargin value.\\n * @return {Object} The expanded root rect.\\n * @private\\n */\\nIntersectionObserver.prototype._getRootRect = function() {\\n var rootRect;\\n if (this.root) {\\n rootRect = getBoundingClientRect(this.root);\\n } else {\\n // Use / instead of window since scroll bars affect size.\\n var html = document.documentElement;\\n var body = document.body;\\n rootRect = {\\n top: 0,\\n left: 0,\\n right: html.clientWidth || body.clientWidth,\\n width: html.clientWidth || body.clientWidth,\\n bottom: html.clientHeight || body.clientHeight,\\n height: html.clientHeight || body.clientHeight\\n };\\n }\\n return this._expandRectByRootMargin(rootRect);\\n};\\n\\n\\n/**\\n * Accepts a rect and expands it by the rootMargin value.\\n * @param {Object} rect The rect object to expand.\\n * @return {Object} The expanded rect.\\n * @private\\n */\\nIntersectionObserver.prototype._expandRectByRootMargin = function(rect) {\\n var margins = this._rootMarginValues.map(function(margin, i) {\\n return margin.unit == 'px' ? margin.value :\\n margin.value * (i % 2 ? rect.width : rect.height) / 100;\\n });\\n var newRect = {\\n top: rect.top - margins[0],\\n right: rect.right + margins[1],\\n bottom: rect.bottom + margins[2],\\n left: rect.left - margins[3]\\n };\\n newRect.width = newRect.right - newRect.left;\\n newRect.height = newRect.bottom - newRect.top;\\n\\n return newRect;\\n};\\n\\n\\n/**\\n * Accepts an old and new entry and returns true if at least one of the\\n * threshold values has been crossed.\\n * @param {?IntersectionObserverEntry} oldEntry The previous entry for a\\n * particular target element or null if no previous entry exists.\\n * @param {IntersectionObserverEntry} newEntry The current entry for a\\n * particular target element.\\n * @return {boolean} Returns true if a any threshold has been crossed.\\n * @private\\n */\\nIntersectionObserver.prototype._hasCrossedThreshold =\\n function(oldEntry, newEntry) {\\n\\n // To make comparing easier, a entry that has a ratio of 0\\n // but does not actually intersect is given a value of -1\\n var oldRatio = oldEntry && hasIntersection(oldEntry.intersectionRect) ?\\n oldEntry.intersectionRatio || 0 : -1;\\n var newRatio = hasIntersection(newEntry.intersectionRect) ?\\n newEntry.intersectionRatio || 0 : -1;\\n\\n // Ignore unchanged ratios\\n if (oldRatio === newRatio) return;\\n\\n for (var i = 0; i < this.thresholds.length; i++) {\\n var threshold = this.thresholds[i];\\n\\n // Return true if an entry matches a threshold or if the new ratio\\n // and the old ratio are on the opposite sides of a threshold.\\n if (threshold == oldRatio || threshold == newRatio ||\\n threshold < oldRatio !== threshold < newRatio) {\\n return true;\\n }\\n }\\n};\\n\\n\\n/**\\n * Returns whether or not the root element is an element and is in the DOM.\\n * @return {boolean} True if the root element is an element and is in the DOM.\\n * @private\\n */\\nIntersectionObserver.prototype._rootIsInDom = function() {\\n return !this.root || contains(document, this.root);\\n};\\n\\n\\n/**\\n * Returns whether or not the target element is a child of root.\\n * @param {Element} target The target element to check.\\n * @return {boolean} True if the target element is a child of root.\\n * @private\\n */\\nIntersectionObserver.prototype._rootContainsTarget = function(target) {\\n return contains(this.root || document, target);\\n};\\n\\n\\n/**\\n * Adds the instance to the global IntersectionObserver registry if it isn't\\n * already present.\\n * @private\\n */\\nIntersectionObserver.prototype._registerInstance = function() {\\n if (registry.indexOf(this) < 0) {\\n registry.push(this);\\n }\\n};\\n\\n\\n/**\\n * Removes the instance from the global IntersectionObserver registry.\\n * @private\\n */\\nIntersectionObserver.prototype._unregisterInstance = function() {\\n registry = registry.filter(function(instance) {\\n return instance !== this;\\n }.bind(this));\\n};\\n\\n\\n/**\\n * Returns the result of the performance.now() method or null in browsers\\n * that don't support the API.\\n * @return {number} The elapsed time since the page was requested.\\n */\\nfunction now() {\\n return window.performance && performance.now && performance.now();\\n}\\n\\n\\n/**\\n * Throttles a function and delays its executiong, so it's only called at most\\n * once within a given time period.\\n * @param {Function} fn The function to throttle.\\n * @param {number} timeout The amount of time that must pass before the\\n * function can be called again.\\n * @return {Function} The throttled function.\\n */\\nfunction throttle(fn, timeout) {\\n var timer = null;\\n return function () {\\n if (!timer) {\\n timer = setTimeout(function() {\\n fn();\\n timer = null;\\n }, timeout);\\n }\\n };\\n}\\n\\n\\n/**\\n * Adds an event handler to a DOM node ensuring cross-browser compatibility.\\n * @param {Node} node The DOM node to add the event handler to.\\n * @param {string} event The event name.\\n * @param {Function} fn The event handler to add.\\n * @param {boolean} opt_useCapture Optionally adds the even to the capture\\n * phase. Note: this only works in modern browsers.\\n */\\nfunction addEvent(node, event, fn, opt_useCapture) {\\n if (typeof node.addEventListener == 'function') {\\n node.addEventListener(event, fn, opt_useCapture || false);\\n }\\n else if (typeof node.attachEvent == 'function') {\\n node.attachEvent(event, fn);\\n }\\n}\\n\\n\\n/**\\n * Removes a previously added event handler from a DOM node.\\n * @param {Node} node The DOM node to remove the event handler from.\\n * @param {string} event The event name.\\n * @param {Function} fn The event handler to remove.\\n * @param {boolean} opt_useCapture If the event handler was added with this\\n * flag set to true, it should be set to true here in order to remove it.\\n */\\nfunction removeEvent(node, event, fn, opt_useCapture) {\\n if (typeof node.removeEventListener == 'function') {\\n node.addEventListener(event, fn, opt_useCapture || false);\\n }\\n else if (typeof node.detatchEvent == 'function') {\\n node.detatchEvent(event, fn);\\n }\\n}\\n\\n\\n/**\\n * Returns the intersection between two rect objects.\\n * @param {Object} rect1 The first rect.\\n * @param {Object} rect2 The second rect.\\n * @return {Object} The intersection rect.\\n */\\nfunction computeRectIntersection(rect1, rect2) {\\n var top = Math.max(rect1.top, rect2.top);\\n var bottom = Math.min(rect1.bottom, rect2.bottom);\\n var left = Math.max(rect1.left, rect2.left);\\n var right = Math.min(rect1.right, rect2.right);\\n var width = right - left;\\n var height = bottom - top;\\n\\n // Returns the intersection or an emptry rect if no intersection is found.\\n return (width < 0 || height < 0) ? getEmptyRect() : {\\n top: top,\\n bottom: bottom,\\n left: left,\\n right: right,\\n width: width,\\n height: height\\n };\\n}\\n\\n\\n/**\\n * Returns true if an rect was passed and any of its properties are not zero.\\n * TODO(philipwalton): the current native implementation sets the\\n * intersectionRect value of a change entry to (0, 0, 0, 0) when no\\n * intersection is detected. This may change in the future:\\n * https://github.com/WICG/IntersectionObserver/issues/142\\n * @param {Object} rect The intersection rect to check.\\n * @return {boolean} True if an intersection exists, false otherwise.\\n */\\nfunction hasIntersection(rect) {\\n return rect.top > 0 || rect.bottom > 0 || rect.left > 0 || rect.right > 0;\\n}\\n\\n\\n/**\\n * Shims the native getBoundingClientRect for compatibility with older IE.\\n * @param {Element} el The element whose bounding rect to get.\\n * @return {Object} The (possibly shimmed) rect of the element.\\n */\\nfunction getBoundingClientRect(el) {\\n var rect = el.getBoundingClientRect();\\n if (!rect) return;\\n\\n // Older IE\\n if (!rect.width || !rect.height) {\\n rect = {\\n top: rect.top,\\n right: rect.right,\\n bottom: rect.bottom,\\n left: rect.left,\\n width: rect.right - rect.left,\\n height: rect.bottom - rect.top\\n };\\n }\\n return rect;\\n}\\n\\n\\n/**\\n * Returns an empty rect object. An empty rect is returned when an element\\n * is not in the DOM.\\n * @return {Object} The empty rect.\\n */\\nfunction getEmptyRect() {\\n return {\\n top: 0,\\n bottom: 0,\\n left: 0,\\n right: 0,\\n width: 0,\\n height: 0\\n };\\n}\\n\\n\\n/**\\n * Determines if a root elements contains a target element as a descendant.\\n * @param {Element} root The root element.\\n * @param {Element} target The target to check.\\n * @return {boolean} True if the target is a descendant of root.\\n */\\nfunction contains(root, target) {\\n var parent = target.parentNode;\\n while (parent) {\\n if (root == parent) return true;\\n parent = parent.parentNode;\\n }\\n}\\n\\n\\n/**\\n * Determins if a value is a JavaScript array.\\n * @param {*} value Any JavaScript value.\\n * @return {boolean} True if the passed value is an array.\\n */\\nfunction isArray(value) {\\n return Object.prototype.toString.call(value) == '[object Array]';\\n}\\n\\n\\n// Exposes the constructors globally.\\nwindow.IntersectionObserver = IntersectionObserver;\\nwindow.IntersectionObserverEntry = IntersectionObserverEntry;\\n\\n}(window, document));\\n\"","module.exports = \"/*\\n Leaflet, a JavaScript library for mobile-friendly interactive maps. http://leafletjs.com\\n (c) 2010-2013, Vladimir Agafonkin\\n (c) 2010-2011, CloudMade\\n*/\\n!function(t,e,i){var n=t.L,o={};o.version=\\\"0.7.7\\\",\\\"object\\\"==typeof module&&\\\"object\\\"==typeof module.exports?module.exports=o:\\\"function\\\"==typeof define&&define.amd&&define(o),o.noConflict=function(){return t.L=n,this},t.L=o,o.Util={extend:function(t){var e,i,n,o,s=Array.prototype.slice.call(arguments,1);for(i=0,n=s.length;n>i;i++){o=s[i]||{};for(e in o)o.hasOwnProperty(e)&&(t[e]=o[e])}return t},bind:function(t,e){var i=arguments.length>2?Array.prototype.slice.call(arguments,2):null;return function(){return t.apply(e,i||arguments)}},stamp:function(){var t=0,e=\\\"_leaflet_id\\\";return function(i){return i[e]=i[e]||++t,i[e]}}(),invokeEach:function(t,e,i){var n,o;if(\\\"object\\\"==typeof t){o=Array.prototype.slice.call(arguments,3);for(n in t)e.apply(i,[n,t[n]].concat(o));return!0}return!1},limitExecByInterval:function(t,e,i){var n,o;return function s(){var a=arguments;return n?void(o=!0):(n=!0,setTimeout(function(){n=!1,o&&(s.apply(i,a),o=!1)},e),void t.apply(i,a))}},falseFn:function(){return!1},formatNum:function(t,e){var i=Math.pow(10,e||5);return Math.round(t*i)/i},trim:function(t){return t.trim?t.trim():t.replace(/^\\\\s+|\\\\s+$/g,\\\"\\\")},splitWords:function(t){return o.Util.trim(t).split(/\\\\s+/)},setOptions:function(t,e){return t.options=o.extend({},t.options,e),t.options},getParamString:function(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+\\\"=\\\"+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf(\\\"?\\\")?\\\"&\\\":\\\"?\\\")+n.join(\\\"&\\\")},template:function(t,e){return t.replace(/\\\\{ *([\\\\w_]+) *\\\\}/g,function(t,n){var o=e[n];if(o===i)throw new Error(\\\"No value provided for variable \\\"+t);return\\\"function\\\"==typeof o&&(o=o(e)),o})},isArray:Array.isArray||function(t){return\\\"[object Array]\\\"===Object.prototype.toString.call(t)},emptyImageUrl:\\\"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=\\\"},function(){function e(e){var i,n,o=[\\\"webkit\\\",\\\"moz\\\",\\\"o\\\",\\\"ms\\\"];for(i=0;it;t++)n._initHooks[t].call(this)}},e},o.Class.include=function(t){o.extend(this.prototype,t)},o.Class.mergeOptions=function(t){o.extend(this.prototype.options,t)},o.Class.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i=\\\"function\\\"==typeof t?t:function(){this[t].apply(this,e)};this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i)};var s=\\\"_leaflet_events\\\";o.Mixin={},o.Mixin.Events={addEventListener:function(t,e,i){if(o.Util.invokeEach(t,this.addEventListener,this,e,i))return this;var n,a,r,h,l,u,c,d=this[s]=this[s]||{},p=i&&i!==this&&o.stamp(i);for(t=o.Util.splitWords(t),n=0,a=t.length;a>n;n++)r={action:e,context:i||this},h=t[n],p?(l=h+\\\"_idx\\\",u=l+\\\"_len\\\",c=d[l]=d[l]||{},c[p]||(c[p]=[],d[u]=(d[u]||0)+1),c[p].push(r)):(d[h]=d[h]||[],d[h].push(r));return this},hasEventListeners:function(t){var e=this[s];return!!e&&(t in e&&e[t].length>0||t+\\\"_idx\\\"in e&&e[t+\\\"_idx_len\\\"]>0)},removeEventListener:function(t,e,i){if(!this[s])return this;if(!t)return this.clearAllEventListeners();if(o.Util.invokeEach(t,this.removeEventListener,this,e,i))return this;var n,a,r,h,l,u,c,d,p,_=this[s],m=i&&i!==this&&o.stamp(i);for(t=o.Util.splitWords(t),n=0,a=t.length;a>n;n++)if(r=t[n],u=r+\\\"_idx\\\",c=u+\\\"_len\\\",d=_[u],e){if(h=m&&d?d[m]:_[r]){for(l=h.length-1;l>=0;l--)h[l].action!==e||i&&h[l].context!==i||(p=h.splice(l,1),p[0].action=o.Util.falseFn);i&&d&&0===h.length&&(delete d[m],_[c]--)}}else delete _[r],delete _[u],delete _[c];return this},clearAllEventListeners:function(){return delete this[s],this},fireEvent:function(t,e){if(!this.hasEventListeners(t))return this;var i,n,a,r,h,l=o.Util.extend({},e,{type:t,target:this}),u=this[s];if(u[t])for(i=u[t].slice(),n=0,a=i.length;a>n;n++)i[n].action.call(i[n].context,l);r=u[t+\\\"_idx\\\"];for(h in r)if(i=r[h].slice())for(n=0,a=i.length;a>n;n++)i[n].action.call(i[n].context,l);return this},addOneTimeEventListener:function(t,e,i){if(o.Util.invokeEach(t,this.addOneTimeEventListener,this,e,i))return this;var n=o.bind(function(){this.removeEventListener(t,e,i).removeEventListener(t,n,i)},this);return this.addEventListener(t,e,i).addEventListener(t,n,i)}},o.Mixin.Events.on=o.Mixin.Events.addEventListener,o.Mixin.Events.off=o.Mixin.Events.removeEventListener,o.Mixin.Events.once=o.Mixin.Events.addOneTimeEventListener,o.Mixin.Events.fire=o.Mixin.Events.fireEvent,function(){var n=\\\"ActiveXObject\\\"in t,s=n&&!e.addEventListener,a=navigator.userAgent.toLowerCase(),r=-1!==a.indexOf(\\\"webkit\\\"),h=-1!==a.indexOf(\\\"chrome\\\"),l=-1!==a.indexOf(\\\"phantom\\\"),u=-1!==a.indexOf(\\\"android\\\"),c=-1!==a.search(\\\"android [23]\\\"),d=-1!==a.indexOf(\\\"gecko\\\"),p=typeof orientation!=i+\\\"\\\",_=!t.PointerEvent&&t.MSPointerEvent,m=t.PointerEvent&&t.navigator.pointerEnabled||_,f=\\\"devicePixelRatio\\\"in t&&t.devicePixelRatio>1||\\\"matchMedia\\\"in t&&t.matchMedia(\\\"(min-resolution:144dpi)\\\")&&t.matchMedia(\\\"(min-resolution:144dpi)\\\").matches,g=e.documentElement,v=n&&\\\"transition\\\"in g.style,y=\\\"WebKitCSSMatrix\\\"in t&&\\\"m11\\\"in new t.WebKitCSSMatrix&&!c,P=\\\"MozPerspective\\\"in g.style,L=\\\"OTransition\\\"in g.style,x=!t.L_DISABLE_3D&&(v||y||P||L)&&!l,w=!t.L_NO_TOUCH&&!l&&(m||\\\"ontouchstart\\\"in t||t.DocumentTouch&&e instanceof t.DocumentTouch);o.Browser={ie:n,ielt9:s,webkit:r,gecko:d&&!r&&!t.opera&&!n,android:u,android23:c,chrome:h,ie3d:v,webkit3d:y,gecko3d:P,opera3d:L,any3d:x,mobile:p,mobileWebkit:p&&r,mobileWebkit3d:p&&y,mobileOpera:p&&t.opera,touch:w,msPointer:_,pointer:m,retina:f}}(),o.Point=function(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e},o.Point.prototype={clone:function(){return new o.Point(this.x,this.y)},add:function(t){return this.clone()._add(o.point(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(o.point(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},distanceTo:function(t){t=o.point(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=o.point(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=o.point(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return\\\"Point(\\\"+o.Util.formatNum(this.x)+\\\", \\\"+o.Util.formatNum(this.y)+\\\")\\\"}},o.point=function(t,e,n){return t instanceof o.Point?t:o.Util.isArray(t)?new o.Point(t[0],t[1]):t===i||null===t?t:new o.Point(t,e,n)},o.Bounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;o>n;n++)this.extend(i[n])},o.Bounds.prototype={extend:function(t){return t=o.point(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new o.Point((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new o.Point(this.min.x,this.max.y)},getTopRight:function(){return new o.Point(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return t=\\\"number\\\"==typeof t[0]||t instanceof o.Point?o.point(t):o.bounds(t),t instanceof o.Bounds?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=o.bounds(t);var e=this.min,i=this.max,n=t.min,s=t.max,a=s.x>=e.x&&n.x<=i.x,r=s.y>=e.y&&n.y<=i.y;return a&&r},isValid:function(){return!(!this.min||!this.max)}},o.bounds=function(t,e){return!t||t instanceof o.Bounds?t:new o.Bounds(t,e)},o.Transformation=function(t,e,i,n){this._a=t,this._b=e,this._c=i,this._d=n},o.Transformation.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new o.Point((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}},o.DomUtil={get:function(t){return\\\"string\\\"==typeof t?e.getElementById(t):t},getStyle:function(t,i){var n=t.style[i];if(!n&&t.currentStyle&&(n=t.currentStyle[i]),(!n||\\\"auto\\\"===n)&&e.defaultView){var o=e.defaultView.getComputedStyle(t,null);n=o?o[i]:null}return\\\"auto\\\"===n?null:n},getViewportOffset:function(t){var i,n=0,s=0,a=t,r=e.body,h=e.documentElement;do{if(n+=a.offsetTop||0,s+=a.offsetLeft||0,n+=parseInt(o.DomUtil.getStyle(a,\\\"borderTopWidth\\\"),10)||0,s+=parseInt(o.DomUtil.getStyle(a,\\\"borderLeftWidth\\\"),10)||0,i=o.DomUtil.getStyle(a,\\\"position\\\"),a.offsetParent===r&&\\\"absolute\\\"===i)break;if(\\\"fixed\\\"===i){n+=r.scrollTop||h.scrollTop||0,s+=r.scrollLeft||h.scrollLeft||0;break}if(\\\"relative\\\"===i&&!a.offsetLeft){var l=o.DomUtil.getStyle(a,\\\"width\\\"),u=o.DomUtil.getStyle(a,\\\"max-width\\\"),c=a.getBoundingClientRect();(\\\"none\\\"!==l||\\\"none\\\"!==u)&&(s+=c.left+a.clientLeft),n+=c.top+(r.scrollTop||h.scrollTop||0);break}a=a.offsetParent}while(a);a=t;do{if(a===r)break;n-=a.scrollTop||0,s-=a.scrollLeft||0,a=a.parentNode}while(a);return new o.Point(s,n)},documentIsLtr:function(){return o.DomUtil._docIsLtrCached||(o.DomUtil._docIsLtrCached=!0,o.DomUtil._docIsLtr=\\\"ltr\\\"===o.DomUtil.getStyle(e.body,\\\"direction\\\")),o.DomUtil._docIsLtr},create:function(t,i,n){var o=e.createElement(t);return o.className=i,n&&n.appendChild(o),o},hasClass:function(t,e){if(t.classList!==i)return t.classList.contains(e);var n=o.DomUtil._getClass(t);return n.length>0&&new RegExp(\\\"(^|\\\\\\\\s)\\\"+e+\\\"(\\\\\\\\s|$)\\\").test(n)},addClass:function(t,e){if(t.classList!==i)for(var n=o.Util.splitWords(e),s=0,a=n.length;a>s;s++)t.classList.add(n[s]);else if(!o.DomUtil.hasClass(t,e)){var r=o.DomUtil._getClass(t);o.DomUtil._setClass(t,(r?r+\\\" \\\":\\\"\\\")+e)}},removeClass:function(t,e){t.classList!==i?t.classList.remove(e):o.DomUtil._setClass(t,o.Util.trim((\\\" \\\"+o.DomUtil._getClass(t)+\\\" \\\").replace(\\\" \\\"+e+\\\" \\\",\\\" \\\")))},_setClass:function(t,e){t.className.baseVal===i?t.className=e:t.className.baseVal=e},_getClass:function(t){return t.className.baseVal===i?t.className:t.className.baseVal},setOpacity:function(t,e){if(\\\"opacity\\\"in t.style)t.style.opacity=e;else if(\\\"filter\\\"in t.style){var i=!1,n=\\\"DXImageTransform.Microsoft.Alpha\\\";try{i=t.filters.item(n)}catch(o){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=\\\" progid:\\\"+n+\\\"(opacity=\\\"+e+\\\")\\\"}},testProp:function(t){for(var i=e.documentElement.style,n=0;ni||i===e?e:t),new o.LatLng(this.lat,i)}},o.latLng=function(t,e){return t instanceof o.LatLng?t:o.Util.isArray(t)?\\\"number\\\"==typeof t[0]||\\\"string\\\"==typeof t[0]?new o.LatLng(t[0],t[1],t[2]):null:t===i||null===t?t:\\\"object\\\"==typeof t&&\\\"lat\\\"in t?new o.LatLng(t.lat,\\\"lng\\\"in t?t.lng:t.lon):e===i?null:new o.LatLng(t,e)},o.LatLngBounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;o>n;n++)this.extend(i[n])},o.LatLngBounds.prototype={extend:function(t){if(!t)return this;var e=o.latLng(t);return t=null!==e?e:o.latLngBounds(t),t instanceof o.LatLng?this._southWest||this._northEast?(this._southWest.lat=Math.min(t.lat,this._southWest.lat),this._southWest.lng=Math.min(t.lng,this._southWest.lng),this._northEast.lat=Math.max(t.lat,this._northEast.lat),this._northEast.lng=Math.max(t.lng,this._northEast.lng)):(this._southWest=new o.LatLng(t.lat,t.lng),this._northEast=new o.LatLng(t.lat,t.lng)):t instanceof o.LatLngBounds&&(this.extend(t._southWest),this.extend(t._northEast)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,s=Math.abs(e.lng-i.lng)*t;return new o.LatLngBounds(new o.LatLng(e.lat-n,e.lng-s),new o.LatLng(i.lat+n,i.lng+s))},getCenter:function(){return new o.LatLng((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new o.LatLng(this.getNorth(),this.getWest())},getSouthEast:function(){return new o.LatLng(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t=\\\"number\\\"==typeof t[0]||t instanceof o.LatLng?o.latLng(t):o.latLngBounds(t);var e,i,n=this._southWest,s=this._northEast;return t instanceof o.LatLngBounds?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=s.lat&&e.lng>=n.lng&&i.lng<=s.lng},intersects:function(t){t=o.latLngBounds(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),a=s.lat>=e.lat&&n.lat<=i.lat,r=s.lng>=e.lng&&n.lng<=i.lng;return a&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(\\\",\\\")},equals:function(t){return t?(t=o.latLngBounds(t),this._southWest.equals(t.getSouthWest())&&this._northEast.equals(t.getNorthEast())):!1},isValid:function(){return!(!this._southWest||!this._northEast)}},o.latLngBounds=function(t,e){return!t||t instanceof o.LatLngBounds?t:new o.LatLngBounds(t,e)},o.Projection={},o.Projection.SphericalMercator={MAX_LATITUDE:85.0511287798,project:function(t){var e=o.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=t.lng*e,a=n*e;return a=Math.log(Math.tan(Math.PI/4+a/2)),new o.Point(s,a)},unproject:function(t){var e=o.LatLng.RAD_TO_DEG,i=t.x*e,n=(2*Math.atan(Math.exp(t.y))-Math.PI/2)*e;return new o.LatLng(n,i)}},o.Projection.LonLat={project:function(t){return new o.Point(t.lng,t.lat)},unproject:function(t){return new o.LatLng(t.y,t.x)}},o.CRS={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},scale:function(t){return 256*Math.pow(2,t)},getSize:function(t){var e=this.scale(t);return o.point(e,e)}},o.CRS.Simple=o.extend({},o.CRS,{projection:o.Projection.LonLat,transformation:new o.Transformation(1,0,-1,0),scale:function(t){return Math.pow(2,t)}}),o.CRS.EPSG3857=o.extend({},o.CRS,{code:\\\"EPSG:3857\\\",projection:o.Projection.SphericalMercator,transformation:new o.Transformation(.5/Math.PI,.5,-.5/Math.PI,.5),project:function(t){var e=this.projection.project(t),i=6378137;return e.multiplyBy(i)}}),o.CRS.EPSG900913=o.extend({},o.CRS.EPSG3857,{code:\\\"EPSG:900913\\\"}),o.CRS.EPSG4326=o.extend({},o.CRS,{code:\\\"EPSG:4326\\\",projection:o.Projection.LonLat,transformation:new o.Transformation(1/360,.5,-1/360,.5)}),o.Map=o.Class.extend({includes:o.Mixin.Events,options:{crs:o.CRS.EPSG3857,fadeAnimation:o.DomUtil.TRANSITION&&!o.Browser.android23,trackResize:!0,markerZoomAnimation:o.DomUtil.TRANSITION&&o.Browser.any3d},initialize:function(t,e){e=o.setOptions(this,e),this._initContainer(t),this._initLayout(),this._onResize=o.bind(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.center&&e.zoom!==i&&this.setView(o.latLng(e.center),e.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._tileLayersNum=0,this.callInitHooks(),this._addLayers(e.layers)},setView:function(t,e){return e=e===i?this.getZoom():e,this._resetView(o.latLng(t),this._limitZoom(e)),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=this._limitZoom(t),this)},zoomIn:function(t,e){return this.setZoom(this._zoom+(t||1),e)},zoomOut:function(t,e){return this.setZoom(this._zoom-(t||1),e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),s=this.getSize().divideBy(2),a=t instanceof o.Point?t:this.latLngToContainerPoint(t),r=a.subtract(s).multiplyBy(1-1/n),h=this.containerPointToLatLng(s.add(r));return this.setView(h,e,{zoom:i})},fitBounds:function(t,e){e=e||{},t=t.getBounds?t.getBounds():o.latLngBounds(t);var i=o.point(e.paddingTopLeft||e.padding||[0,0]),n=o.point(e.paddingBottomRight||e.padding||[0,0]),s=this.getBoundsZoom(t,!1,i.add(n));s=e.maxZoom?Math.min(e.maxZoom,s):s;var a=n.subtract(i).divideBy(2),r=this.project(t.getSouthWest(),s),h=this.project(t.getNorthEast(),s),l=this.unproject(r.add(h).divideBy(2).add(a),s);return this.setView(l,s,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t){return this.fire(\\\"movestart\\\"),this._rawPanBy(o.point(t)),this.fire(\\\"move\\\"),this.fire(\\\"moveend\\\")},setMaxBounds:function(t){return t=o.latLngBounds(t),this.options.maxBounds=t,t?(this._loaded&&this._panInsideMaxBounds(),this.on(\\\"moveend\\\",this._panInsideMaxBounds,this)):this.off(\\\"moveend\\\",this._panInsideMaxBounds,this)},panInsideBounds:function(t,e){var i=this.getCenter(),n=this._limitCenter(i,this._zoom,t);return i.equals(n)?this:this.panTo(n,e)},addLayer:function(t){var e=o.stamp(t);return this._layers[e]?this:(this._layers[e]=t,!t.options||isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[e]=t,this._updateZoomLevels()),this.options.zoomAnimation&&o.TileLayer&&t instanceof o.TileLayer&&(this._tileLayersNum++,this._tileLayersToLoad++,t.on(\\\"load\\\",this._onTileLayerLoad,this)),this._loaded&&this._layerAdd(t),this)},removeLayer:function(t){var e=o.stamp(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&this.fire(\\\"layerremove\\\",{layer:t}),this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels()),this.options.zoomAnimation&&o.TileLayer&&t instanceof o.TileLayer&&(this._tileLayersNum--,this._tileLayersToLoad--,t.off(\\\"load\\\",this._onTileLayerLoad,this)),this):this},hasLayer:function(t){return t?o.stamp(t)in this._layers:!1},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},invalidateSize:function(t){if(!this._loaded)return this;t=o.extend({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._initialCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),s=i.divideBy(2).round(),a=n.subtract(s);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire(\\\"move\\\"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o.bind(this.fire,this,\\\"moveend\\\"),200)):this.fire(\\\"moveend\\\")),this.fire(\\\"resize\\\",{oldSize:e,newSize:i})):this},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){this._loaded&&this.fire(\\\"unload\\\"),this._initEvents(\\\"off\\\");try{delete this._container._leaflet}catch(t){this._container._leaflet=i}return this._clearPanes(),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this},getCenter:function(){return this._checkIfLoaded(),this._initialCenter&&!this._moved()?this._initialCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new o.LatLngBounds(e,i)},getMinZoom:function(){return this.options.minZoom===i?this._layersMinZoom===i?0:this._layersMinZoom:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===i?this._layersMaxZoom===i?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=o.latLngBounds(t);var n,s=this.getMinZoom()-(e?1:0),a=this.getMaxZoom(),r=this.getSize(),h=t.getNorthWest(),l=t.getSouthEast(),u=!0;i=o.point(i||[0,0]);do s++,n=this.project(l,s).subtract(this.project(h,s)).add(i),u=e?n.x=s);return u&&e?null:e?s:s-1},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new o.Point(this._container.clientWidth,this._container.clientHeight),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(){var t=this._getTopLeftPoint();return new o.Bounds(t,t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._initialTopLeftPoint},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t){var e=this.options.crs;return e.scale(t)/e.scale(this._zoom)},getScaleZoom:function(t){return this._zoom+Math.log(t)/Math.LN2},project:function(t,e){return e=e===i?this._zoom:e,this.options.crs.latLngToPoint(o.latLng(t),e)},unproject:function(t,e){return e=e===i?this._zoom:e,this.options.crs.pointToLatLng(o.point(t),e)},layerPointToLatLng:function(t){var e=o.point(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(o.latLng(t))._round();return e._subtract(this.getPixelOrigin())},containerPointToLayerPoint:function(t){return o.point(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return o.point(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(o.point(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(o.latLng(t)))},mouseEventToContainerPoint:function(t){return o.DomEvent.getMousePosition(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=o.DomUtil.get(t);if(!e)throw new Error(\\\"Map container not found.\\\");if(e._leaflet)throw new Error(\\\"Map container is already initialized.\\\");e._leaflet=!0},_initLayout:function(){var t=this._container;o.DomUtil.addClass(t,\\\"leaflet-container\\\"+(o.Browser.touch?\\\" leaflet-touch\\\":\\\"\\\")+(o.Browser.retina?\\\" leaflet-retina\\\":\\\"\\\")+(o.Browser.ielt9?\\\" leaflet-oldie\\\":\\\"\\\")+(this.options.fadeAnimation?\\\" leaflet-fade-anim\\\":\\\"\\\"));var e=o.DomUtil.getStyle(t,\\\"position\\\");\\\"absolute\\\"!==e&&\\\"relative\\\"!==e&&\\\"fixed\\\"!==e&&(t.style.position=\\\"relative\\\"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._mapPane=t.mapPane=this._createPane(\\\"leaflet-map-pane\\\",this._container),this._tilePane=t.tilePane=this._createPane(\\\"leaflet-tile-pane\\\",this._mapPane),t.objectsPane=this._createPane(\\\"leaflet-objects-pane\\\",this._mapPane),t.shadowPane=this._createPane(\\\"leaflet-shadow-pane\\\"),t.overlayPane=this._createPane(\\\"leaflet-overlay-pane\\\"),t.markerPane=this._createPane(\\\"leaflet-marker-pane\\\"),t.popupPane=this._createPane(\\\"leaflet-popup-pane\\\");var e=\\\" leaflet-zoom-hide\\\";this.options.markerZoomAnimation||(o.DomUtil.addClass(t.markerPane,e),o.DomUtil.addClass(t.shadowPane,e),o.DomUtil.addClass(t.popupPane,e))},_createPane:function(t,e){return o.DomUtil.create(\\\"div\\\",t,e||this._panes.objectsPane)},_clearPanes:function(){this._container.removeChild(this._mapPane)},_addLayers:function(t){t=t?o.Util.isArray(t)?t:[t]:[];for(var e=0,i=t.length;i>e;e++)this.addLayer(t[e])},_resetView:function(t,e,i,n){var s=this._zoom!==e;n||(this.fire(\\\"movestart\\\"),s&&this.fire(\\\"zoomstart\\\")),this._zoom=e,this._initialCenter=t,this._initialTopLeftPoint=this._getNewTopLeftPoint(t),i?this._initialTopLeftPoint._add(this._getMapPanePos()):o.DomUtil.setPosition(this._mapPane,new o.Point(0,0)),this._tileLayersToLoad=this._tileLayersNum;var a=!this._loaded;this._loaded=!0,this.fire(\\\"viewreset\\\",{hard:!i}),a&&(this.fire(\\\"load\\\"),this.eachLayer(this._layerAdd,this)),this.fire(\\\"move\\\"),(s||n)&&this.fire(\\\"zoomend\\\"),this.fire(\\\"moveend\\\",{hard:!i})},_rawPanBy:function(t){o.DomUtil.setPosition(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_updateZoomLevels:function(){var t,e=1/0,n=-(1/0),o=this._getZoomSpan();for(t in this._zoomBoundLayers){var s=this._zoomBoundLayers[t];isNaN(s.options.minZoom)||(e=Math.min(e,s.options.minZoom)),isNaN(s.options.maxZoom)||(n=Math.max(n,s.options.maxZoom))}t===i?this._layersMaxZoom=this._layersMinZoom=i:(this._layersMaxZoom=n,this._layersMinZoom=e),o!==this._getZoomSpan()&&this.fire(\\\"zoomlevelschange\\\")},_panInsideMaxBounds:function(){this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error(\\\"Set map center and zoom first.\\\")},_initEvents:function(e){if(o.DomEvent){e=e||\\\"on\\\",o.DomEvent[e](this._container,\\\"click\\\",this._onMouseClick,this);var i,n,s=[\\\"dblclick\\\",\\\"mousedown\\\",\\\"mouseup\\\",\\\"mouseenter\\\",\\\"mouseleave\\\",\\\"mousemove\\\",\\\"contextmenu\\\"];for(i=0,n=s.length;n>i;i++)o.DomEvent[e](this._container,s[i],this._fireMouseEvent,this);this.options.trackResize&&o.DomEvent[e](t,\\\"resize\\\",this._onResize,this)}},_onResize:function(){o.Util.cancelAnimFrame(this._resizeRequest),this._resizeRequest=o.Util.requestAnimFrame(function(){this.invalidateSize({debounceMoveend:!0})},this,!1,this._container)},_onMouseClick:function(t){!this._loaded||!t._simulated&&(this.dragging&&this.dragging.moved()||this.boxZoom&&this.boxZoom.moved())||o.DomEvent._skipped(t)||(this.fire(\\\"preclick\\\"),this._fireMouseEvent(t))},_fireMouseEvent:function(t){if(this._loaded&&!o.DomEvent._skipped(t)){var e=t.type;if(e=\\\"mouseenter\\\"===e?\\\"mouseover\\\":\\\"mouseleave\\\"===e?\\\"mouseout\\\":e,this.hasEventListeners(e)){\\\"contextmenu\\\"===e&&o.DomEvent.preventDefault(t);var i=this.mouseEventToContainerPoint(t),n=this.containerPointToLayerPoint(i),s=this.layerPointToLatLng(n);this.fire(e,{latlng:s,layerPoint:n,containerPoint:i,originalEvent:t})}}},_onTileLayerLoad:function(){this._tileLayersToLoad--,this._tileLayersNum&&!this._tileLayersToLoad&&this.fire(\\\"tilelayersload\\\")},_clearHandlers:function(){for(var t=0,e=this._handlers.length;e>t;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,this):this.on(\\\"load\\\",t,e),this},_layerAdd:function(t){t.onAdd(this),this.fire(\\\"layeradd\\\",{layer:t})},_getMapPanePos:function(){return o.DomUtil.getPosition(this._mapPane)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(){return this.getPixelOrigin().subtract(this._getMapPanePos())},_getNewTopLeftPoint:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewTopLeftPoint(i,e).add(this._getMapPanePos());return this.project(t,e)._subtract(n)},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),s=this.getSize().divideBy(2),a=new o.Bounds(n.subtract(s),n.add(s)),r=this._getBoundsOffset(a,i,e);return this.unproject(n.add(r),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new o.Bounds(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=this.project(e.getNorthWest(),i).subtract(t.min),s=this.project(e.getSouthEast(),i).subtract(t.max),a=this._rebound(n.x,-s.x),r=this._rebound(n.y,-s.y);return new o.Point(a,r)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom();return Math.max(e,Math.min(i,t))}}),o.map=function(t,e){return new o.Map(t,e)},o.Projection.Mercator={MAX_LATITUDE:85.0840591556,R_MINOR:6356752.314245179,R_MAJOR:6378137,project:function(t){var e=o.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=this.R_MAJOR,a=this.R_MINOR,r=t.lng*e*s,h=n*e,l=a/s,u=Math.sqrt(1-l*l),c=u*Math.sin(h);c=Math.pow((1-c)/(1+c),.5*u);var d=Math.tan(.5*(.5*Math.PI-h))/c;return h=-s*Math.log(d),new o.Point(r,h)},unproject:function(t){for(var e,i=o.LatLng.RAD_TO_DEG,n=this.R_MAJOR,s=this.R_MINOR,a=t.x*i/n,r=s/n,h=Math.sqrt(1-r*r),l=Math.exp(-t.y/n),u=Math.PI/2-2*Math.atan(l),c=15,d=1e-7,p=c,_=.1;Math.abs(_)>d&&--p>0;)e=h*Math.sin(u),_=Math.PI/2-2*Math.atan(l*Math.pow((1-e)/(1+e),.5*h))-u,u+=_;return new o.LatLng(u*i,a)}},o.CRS.EPSG3395=o.extend({},o.CRS,{code:\\\"EPSG:3395\\\",projection:o.Projection.Mercator,\\ntransformation:function(){var t=o.Projection.Mercator,e=t.R_MAJOR,i=.5/(Math.PI*e);return new o.Transformation(i,.5,-i,.5)}()}),o.TileLayer=o.Class.extend({includes:o.Mixin.Events,options:{minZoom:0,maxZoom:18,tileSize:256,subdomains:\\\"abc\\\",errorTileUrl:\\\"\\\",attribution:\\\"\\\",zoomOffset:0,opacity:1,unloadInvisibleTiles:o.Browser.mobile,updateWhenIdle:o.Browser.mobile},initialize:function(t,e){e=o.setOptions(this,e),e.detectRetina&&o.Browser.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomOffset++,e.minZoom>0&&e.minZoom--,this.options.maxZoom--),e.bounds&&(e.bounds=o.latLngBounds(e.bounds)),this._url=t;var i=this.options.subdomains;\\\"string\\\"==typeof i&&(this.options.subdomains=i.split(\\\"\\\"))},onAdd:function(t){this._map=t,this._animated=t._zoomAnimated,this._initContainer(),t.on({viewreset:this._reset,moveend:this._update},this),this._animated&&t.on({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||(this._limitedUpdate=o.Util.limitExecByInterval(this._update,150,this),t.on(\\\"move\\\",this._limitedUpdate,this)),this._reset(),this._update()},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this._container.parentNode.removeChild(this._container),t.off({viewreset:this._reset,moveend:this._update},this),this._animated&&t.off({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||t.off(\\\"move\\\",this._limitedUpdate,this),this._container=null,this._map=null},bringToFront:function(){var t=this._map._panes.tilePane;return this._container&&(t.appendChild(this._container),this._setAutoZIndex(t,Math.max)),this},bringToBack:function(){var t=this._map._panes.tilePane;return this._container&&(t.insertBefore(this._container,t.firstChild),this._setAutoZIndex(t,Math.min)),this},getAttribution:function(){return this.options.attribution},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},redraw:function(){return this._map&&(this._reset({hard:!0}),this._update()),this},_updateZIndex:function(){this._container&&this.options.zIndex!==i&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t,e){var i,n,o,s=t.children,a=-e(1/0,-(1/0));for(n=0,o=s.length;o>n;n++)s[n]!==this._container&&(i=parseInt(s[n].style.zIndex,10),isNaN(i)||(a=e(a,i)));this.options.zIndex=this._container.style.zIndex=(isFinite(a)?a:0)+e(1,-1)},_updateOpacity:function(){var t,e=this._tiles;if(o.Browser.ielt9)for(t in e)o.DomUtil.setOpacity(e[t],this.options.opacity);else o.DomUtil.setOpacity(this._container,this.options.opacity)},_initContainer:function(){var t=this._map._panes.tilePane;if(!this._container){if(this._container=o.DomUtil.create(\\\"div\\\",\\\"leaflet-layer\\\"),this._updateZIndex(),this._animated){var e=\\\"leaflet-tile-container\\\";this._bgBuffer=o.DomUtil.create(\\\"div\\\",e,this._container),this._tileContainer=o.DomUtil.create(\\\"div\\\",e,this._container)}else this._tileContainer=this._container;t.appendChild(this._container),this.options.opacity<1&&this._updateOpacity()}},_reset:function(t){for(var e in this._tiles)this.fire(\\\"tileunload\\\",{tile:this._tiles[e]});this._tiles={},this._tilesToLoad=0,this.options.reuseTiles&&(this._unusedTiles=[]),this._tileContainer.innerHTML=\\\"\\\",this._animated&&t&&t.hard&&this._clearBgBuffer(),this._initContainer()},_getTileSize:function(){var t=this._map,e=t.getZoom()+this.options.zoomOffset,i=this.options.maxNativeZoom,n=this.options.tileSize;return i&&e>i&&(n=Math.round(t.getZoomScale(e)/t.getZoomScale(i)*n)),n},_update:function(){if(this._map){var t=this._map,e=t.getPixelBounds(),i=t.getZoom(),n=this._getTileSize();if(!(i>this.options.maxZoom||in;n++)this._addTile(a[n],l);this._tileContainer.appendChild(l)}},_tileShouldBeLoaded:function(t){if(t.x+\\\":\\\"+t.y in this._tiles)return!1;var e=this.options;if(!e.continuousWorld){var i=this._getWrapTileNum();if(e.noWrap&&(t.x<0||t.x>=i.x)||t.y<0||t.y>=i.y)return!1}if(e.bounds){var n=this._getTileSize(),o=t.multiplyBy(n),s=o.add([n,n]),a=this._map.unproject(o),r=this._map.unproject(s);if(e.continuousWorld||e.noWrap||(a=a.wrap(),r=r.wrap()),!e.bounds.intersects([a,r]))return!1}return!0},_removeOtherTiles:function(t){var e,i,n,o;for(o in this._tiles)e=o.split(\\\":\\\"),i=parseInt(e[0],10),n=parseInt(e[1],10),(it.max.x||nt.max.y)&&this._removeTile(o)},_removeTile:function(t){var e=this._tiles[t];this.fire(\\\"tileunload\\\",{tile:e,url:e.src}),this.options.reuseTiles?(o.DomUtil.removeClass(e,\\\"leaflet-tile-loaded\\\"),this._unusedTiles.push(e)):e.parentNode===this._tileContainer&&this._tileContainer.removeChild(e),o.Browser.android||(e.onload=null,e.src=o.Util.emptyImageUrl),delete this._tiles[t]},_addTile:function(t,e){var i=this._getTilePos(t),n=this._getTile();o.DomUtil.setPosition(n,i,o.Browser.chrome),this._tiles[t.x+\\\":\\\"+t.y]=n,this._loadTile(n,t),n.parentNode!==this._tileContainer&&e.appendChild(n)},_getZoomForUrl:function(){var t=this.options,e=this._map.getZoom();return t.zoomReverse&&(e=t.maxZoom-e),e+=t.zoomOffset,t.maxNativeZoom?Math.min(e,t.maxNativeZoom):e},_getTilePos:function(t){var e=this._map.getPixelOrigin(),i=this._getTileSize();return t.multiplyBy(i).subtract(e)},getTileUrl:function(t){return o.Util.template(this._url,o.extend({s:this._getSubdomain(t),z:t.z,x:t.x,y:t.y},this.options))},_getWrapTileNum:function(){var t=this._map.options.crs,e=t.getSize(this._map.getZoom());return e.divideBy(this._getTileSize())._floor()},_adjustTilePoint:function(t){var e=this._getWrapTileNum();this.options.continuousWorld||this.options.noWrap||(t.x=(t.x%e.x+e.x)%e.x),this.options.tms&&(t.y=e.y-t.y-1),t.z=this._getZoomForUrl()},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_getTile:function(){if(this.options.reuseTiles&&this._unusedTiles.length>0){var t=this._unusedTiles.pop();return this._resetTile(t),t}return this._createTile()},_resetTile:function(){},_createTile:function(){var t=o.DomUtil.create(\\\"img\\\",\\\"leaflet-tile\\\");return t.style.width=t.style.height=this._getTileSize()+\\\"px\\\",t.galleryimg=\\\"no\\\",t.onselectstart=t.onmousemove=o.Util.falseFn,o.Browser.ielt9&&this.options.opacity!==i&&o.DomUtil.setOpacity(t,this.options.opacity),o.Browser.mobileWebkit3d&&(t.style.WebkitBackfaceVisibility=\\\"hidden\\\"),t},_loadTile:function(t,e){t._layer=this,t.onload=this._tileOnLoad,t.onerror=this._tileOnError,this._adjustTilePoint(e),t.src=this.getTileUrl(e),this.fire(\\\"tileloadstart\\\",{tile:t,url:t.src})},_tileLoaded:function(){this._tilesToLoad--,this._animated&&o.DomUtil.addClass(this._tileContainer,\\\"leaflet-zoom-animated\\\"),this._tilesToLoad||(this.fire(\\\"load\\\"),this._animated&&(clearTimeout(this._clearBgBufferTimer),this._clearBgBufferTimer=setTimeout(o.bind(this._clearBgBuffer,this),500)))},_tileOnLoad:function(){var t=this._layer;this.src!==o.Util.emptyImageUrl&&(o.DomUtil.addClass(this,\\\"leaflet-tile-loaded\\\"),t.fire(\\\"tileload\\\",{tile:this,url:this.src})),t._tileLoaded()},_tileOnError:function(){var t=this._layer;t.fire(\\\"tileerror\\\",{tile:this,url:this.src});var e=t.options.errorTileUrl;e&&(this.src=e),t._tileLoaded()}}),o.tileLayer=function(t,e){return new o.TileLayer(t,e)},o.TileLayer.WMS=o.TileLayer.extend({defaultWmsParams:{service:\\\"WMS\\\",request:\\\"GetMap\\\",version:\\\"1.1.1\\\",layers:\\\"\\\",styles:\\\"\\\",format:\\\"image/jpeg\\\",transparent:!1},initialize:function(t,e){this._url=t;var i=o.extend({},this.defaultWmsParams),n=e.tileSize||this.options.tileSize;e.detectRetina&&o.Browser.retina?i.width=i.height=2*n:i.width=i.height=n;for(var s in e)this.options.hasOwnProperty(s)||\\\"crs\\\"===s||(i[s]=e[s]);this.wmsParams=i,o.setOptions(this,e)},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?\\\"crs\\\":\\\"srs\\\";this.wmsParams[e]=this._crs.code,o.TileLayer.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._map,i=this.options.tileSize,n=t.multiplyBy(i),s=n.add([i,i]),a=this._crs.project(e.unproject(n,t.z)),r=this._crs.project(e.unproject(s,t.z)),h=this._wmsVersion>=1.3&&this._crs===o.CRS.EPSG4326?[r.y,a.x,a.y,r.x].join(\\\",\\\"):[a.x,r.y,r.x,a.y].join(\\\",\\\"),l=o.Util.template(this._url,{s:this._getSubdomain(t)});return l+o.Util.getParamString(this.wmsParams,l,!0)+\\\"&BBOX=\\\"+h},setParams:function(t,e){return o.extend(this.wmsParams,t),e||this.redraw(),this}}),o.tileLayer.wms=function(t,e){return new o.TileLayer.WMS(t,e)},o.TileLayer.Canvas=o.TileLayer.extend({options:{async:!1},initialize:function(t){o.setOptions(this,t)},redraw:function(){this._map&&(this._reset({hard:!0}),this._update());for(var t in this._tiles)this._redrawTile(this._tiles[t]);return this},_redrawTile:function(t){this.drawTile(t,t._tilePoint,this._map._zoom)},_createTile:function(){var t=o.DomUtil.create(\\\"canvas\\\",\\\"leaflet-tile\\\");return t.width=t.height=this.options.tileSize,t.onselectstart=t.onmousemove=o.Util.falseFn,t},_loadTile:function(t,e){t._layer=this,t._tilePoint=e,this._redrawTile(t),this.options.async||this.tileDrawn(t)},drawTile:function(){},tileDrawn:function(t){this._tileOnLoad.call(t)}}),o.tileLayer.canvas=function(t){return new o.TileLayer.Canvas(t)},o.ImageOverlay=o.Class.extend({includes:o.Mixin.Events,options:{opacity:1},initialize:function(t,e,i){this._url=t,this._bounds=o.latLngBounds(e),o.setOptions(this,i)},onAdd:function(t){this._map=t,this._image||this._initImage(),t._panes.overlayPane.appendChild(this._image),t.on(\\\"viewreset\\\",this._reset,this),t.options.zoomAnimation&&o.Browser.any3d&&t.on(\\\"zoomanim\\\",this._animateZoom,this),this._reset()},onRemove:function(t){t.getPanes().overlayPane.removeChild(this._image),t.off(\\\"viewreset\\\",this._reset,this),t.options.zoomAnimation&&t.off(\\\"zoomanim\\\",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},bringToFront:function(){return this._image&&this._map._panes.overlayPane.appendChild(this._image),this},bringToBack:function(){var t=this._map._panes.overlayPane;return this._image&&t.insertBefore(this._image,t.firstChild),this},setUrl:function(t){this._url=t,this._image.src=this._url},getAttribution:function(){return this.options.attribution},_initImage:function(){this._image=o.DomUtil.create(\\\"img\\\",\\\"leaflet-image-layer\\\"),this._map.options.zoomAnimation&&o.Browser.any3d?o.DomUtil.addClass(this._image,\\\"leaflet-zoom-animated\\\"):o.DomUtil.addClass(this._image,\\\"leaflet-zoom-hide\\\"),this._updateOpacity(),o.extend(this._image,{galleryimg:\\\"no\\\",onselectstart:o.Util.falseFn,onmousemove:o.Util.falseFn,onload:o.bind(this._onImageLoad,this),src:this._url})},_animateZoom:function(t){var e=this._map,i=this._image,n=e.getZoomScale(t.zoom),s=this._bounds.getNorthWest(),a=this._bounds.getSouthEast(),r=e._latLngToNewLayerPoint(s,t.zoom,t.center),h=e._latLngToNewLayerPoint(a,t.zoom,t.center)._subtract(r),l=r._add(h._multiplyBy(.5*(1-1/n)));i.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(l)+\\\" scale(\\\"+n+\\\") \\\"},_reset:function(){var t=this._image,e=this._map.latLngToLayerPoint(this._bounds.getNorthWest()),i=this._map.latLngToLayerPoint(this._bounds.getSouthEast())._subtract(e);o.DomUtil.setPosition(t,e),t.style.width=i.x+\\\"px\\\",t.style.height=i.y+\\\"px\\\"},_onImageLoad:function(){this.fire(\\\"load\\\")},_updateOpacity:function(){o.DomUtil.setOpacity(this._image,this.options.opacity)}}),o.imageOverlay=function(t,e,i){return new o.ImageOverlay(t,e,i)},o.Icon=o.Class.extend({options:{className:\\\"\\\"},initialize:function(t){o.setOptions(this,t)},createIcon:function(t){return this._createIcon(\\\"icon\\\",t)},createShadow:function(t){return this._createIcon(\\\"shadow\\\",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if(\\\"icon\\\"===t)throw new Error(\\\"iconUrl not set in Icon options (see the docs).\\\");return null}var n;return n=e&&\\\"IMG\\\"===e.tagName?this._createImg(i,e):this._createImg(i),this._setIconStyles(n,t),n},_setIconStyles:function(t,e){var i,n=this.options,s=o.point(n[e+\\\"Size\\\"]);i=\\\"shadow\\\"===e?o.point(n.shadowAnchor||n.iconAnchor):o.point(n.iconAnchor),!i&&s&&(i=s.divideBy(2,!0)),t.className=\\\"leaflet-marker-\\\"+e+\\\" \\\"+n.className,i&&(t.style.marginLeft=-i.x+\\\"px\\\",t.style.marginTop=-i.y+\\\"px\\\"),s&&(t.style.width=s.x+\\\"px\\\",t.style.height=s.y+\\\"px\\\")},_createImg:function(t,i){return i=i||e.createElement(\\\"img\\\"),i.src=t,i},_getIconUrl:function(t){return o.Browser.retina&&this.options[t+\\\"RetinaUrl\\\"]?this.options[t+\\\"RetinaUrl\\\"]:this.options[t+\\\"Url\\\"]}}),o.icon=function(t){return new o.Icon(t)},o.Icon.Default=o.Icon.extend({options:{iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]},_getIconUrl:function(t){var e=t+\\\"Url\\\";if(this.options[e])return this.options[e];o.Browser.retina&&\\\"icon\\\"===t&&(t+=\\\"-2x\\\");var i=o.Icon.Default.imagePath;if(!i)throw new Error(\\\"Couldn't autodetect L.Icon.Default.imagePath, set it manually.\\\");return i+\\\"/marker-\\\"+t+\\\".png\\\"}}),o.Icon.Default.imagePath=function(){var t,i,n,o,s,a=e.getElementsByTagName(\\\"script\\\"),r=/[\\\\/^]leaflet[\\\\-\\\\._]?([\\\\w\\\\-\\\\._]*)\\\\.js\\\\??/;for(t=0,i=a.length;i>t;t++)if(n=a[t].src,o=n.match(r))return s=n.split(r)[0],(s?s+\\\"/\\\":\\\"\\\")+\\\"images\\\"}(),o.Marker=o.Class.extend({includes:o.Mixin.Events,options:{icon:new o.Icon.Default,title:\\\"\\\",alt:\\\"\\\",clickable:!0,draggable:!1,keyboard:!0,zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250},initialize:function(t,e){o.setOptions(this,e),this._latlng=o.latLng(t)},onAdd:function(t){this._map=t,t.on(\\\"viewreset\\\",this.update,this),this._initIcon(),this.update(),this.fire(\\\"add\\\"),t.options.zoomAnimation&&t.options.markerZoomAnimation&&t.on(\\\"zoomanim\\\",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this.dragging&&this.dragging.disable(),this._removeIcon(),this._removeShadow(),this.fire(\\\"remove\\\"),t.off({viewreset:this.update,zoomanim:this._animateZoom},this),this._map=null},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=o.latLng(t),this.update(),this.fire(\\\"move\\\",{latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update(),this},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup),this},update:function(){return this._icon&&this._setPos(this._map.latLngToLayerPoint(this._latlng).round()),this},_initIcon:function(){var t=this.options,e=this._map,i=e.options.zoomAnimation&&e.options.markerZoomAnimation,n=i?\\\"leaflet-zoom-animated\\\":\\\"leaflet-zoom-hide\\\",s=t.icon.createIcon(this._icon),a=!1;s!==this._icon&&(this._icon&&this._removeIcon(),a=!0,t.title&&(s.title=t.title),t.alt&&(s.alt=t.alt)),o.DomUtil.addClass(s,n),t.keyboard&&(s.tabIndex=\\\"0\\\"),this._icon=s,this._initInteraction(),t.riseOnHover&&o.DomEvent.on(s,\\\"mouseover\\\",this._bringToFront,this).on(s,\\\"mouseout\\\",this._resetZIndex,this);var r=t.icon.createShadow(this._shadow),h=!1;r!==this._shadow&&(this._removeShadow(),h=!0),r&&o.DomUtil.addClass(r,n),this._shadow=r,t.opacity<1&&this._updateOpacity();var l=this._map._panes;a&&l.markerPane.appendChild(this._icon),r&&h&&l.shadowPane.appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&o.DomEvent.off(this._icon,\\\"mouseover\\\",this._bringToFront).off(this._icon,\\\"mouseout\\\",this._resetZIndex),this._map._panes.markerPane.removeChild(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&this._map._panes.shadowPane.removeChild(this._shadow),this._shadow=null},_setPos:function(t){o.DomUtil.setPosition(this._icon,t),this._shadow&&o.DomUtil.setPosition(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.clickable){var t=this._icon,e=[\\\"dblclick\\\",\\\"mousedown\\\",\\\"mouseover\\\",\\\"mouseout\\\",\\\"contextmenu\\\"];o.DomUtil.addClass(t,\\\"leaflet-clickable\\\"),o.DomEvent.on(t,\\\"click\\\",this._onMouseClick,this),o.DomEvent.on(t,\\\"keypress\\\",this._onKeyPress,this);for(var i=0;is?(e.height=s+\\\"px\\\",o.DomUtil.addClass(t,a)):o.DomUtil.removeClass(t,a),this._containerWidth=this._container.offsetWidth},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=this._animated,i=o.point(this.options.offset);e&&o.DomUtil.setPosition(this._container,t),this._containerBottom=-i.y-(e?0:t.y),this._containerLeft=-Math.round(this._containerWidth/2)+i.x+(e?0:t.x),this._container.style.bottom=this._containerBottom+\\\"px\\\",this._container.style.left=this._containerLeft+\\\"px\\\"}},_zoomAnimation:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);o.DomUtil.setPosition(this._container,e)},_adjustPan:function(){if(this.options.autoPan){var t=this._map,e=this._container.offsetHeight,i=this._containerWidth,n=new o.Point(this._containerLeft,-e-this._containerBottom);this._animated&&n._add(o.DomUtil.getPosition(this._container));var s=t.layerPointToContainerPoint(n),a=o.point(this.options.autoPanPadding),r=o.point(this.options.autoPanPaddingTopLeft||a),h=o.point(this.options.autoPanPaddingBottomRight||a),l=t.getSize(),u=0,c=0;s.x+i+h.x>l.x&&(u=s.x+i-l.x+h.x),s.x-u-r.x<0&&(u=s.x-r.x),s.y+e+h.y>l.y&&(c=s.y+e-l.y+h.y),s.y-c-r.y<0&&(c=s.y-r.y),(u||c)&&t.fire(\\\"autopanstart\\\").panBy([u,c])}},_onCloseButtonClick:function(t){this._close(),o.DomEvent.stop(t)}}),o.popup=function(t,e){return new o.Popup(t,e)},o.Map.include({openPopup:function(t,e,i){if(this.closePopup(),!(t instanceof o.Popup)){var n=t;t=new o.Popup(i).setLatLng(e).setContent(n)}return t._isOpen=!0,this._popup=t,this.addLayer(t)},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&(this.removeLayer(t),t._isOpen=!1),this}}),o.Marker.include({openPopup:function(){return this._popup&&this._map&&!this._map.hasLayer(this._popup)&&(this._popup.setLatLng(this._latlng),this._map.openPopup(this._popup)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(){return this._popup&&(this._popup._isOpen?this.closePopup():this.openPopup()),this},bindPopup:function(t,e){var i=o.point(this.options.icon.options.popupAnchor||[0,0]);return i=i.add(o.Popup.prototype.options.offset),e&&e.offset&&(i=i.add(e.offset)),e=o.extend({offset:i},e),this._popupHandlersAdded||(this.on(\\\"click\\\",this.togglePopup,this).on(\\\"remove\\\",this.closePopup,this).on(\\\"move\\\",this._movePopup,this),this._popupHandlersAdded=!0),t instanceof o.Popup?(o.setOptions(t,e),this._popup=t,t._source=this):this._popup=new o.Popup(e,this).setContent(t),this},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off(\\\"click\\\",this.togglePopup,this).off(\\\"remove\\\",this.closePopup,this).off(\\\"move\\\",this._movePopup,this),this._popupHandlersAdded=!1),this},getPopup:function(){return this._popup},_movePopup:function(t){this._popup.setLatLng(t.latlng)}}),o.LayerGroup=o.Class.extend({initialize:function(t){this._layers={};var e,i;if(t)for(e=0,i=t.length;i>e;e++)this.addLayer(t[e])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return t?t in this._layers||this.getLayerId(t)in this._layers:!1},clearLayers:function(){return this.eachLayer(this.removeLayer,this),this},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)i=this._layers[e],i[t]&&i[t].apply(i,n);return this},onAdd:function(t){this._map=t,this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t),this._map=null},addTo:function(t){return t.addLayer(this),this},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];for(var e in this._layers)t.push(this._layers[e]);return t},setZIndex:function(t){return this.invoke(\\\"setZIndex\\\",t)},getLayerId:function(t){return o.stamp(t)}}),o.layerGroup=function(t){return new o.LayerGroup(t)},o.FeatureGroup=o.LayerGroup.extend({includes:o.Mixin.Events,statics:{EVENTS:\\\"click dblclick mouseover mouseout mousemove contextmenu popupopen popupclose\\\"},addLayer:function(t){return this.hasLayer(t)?this:(\\\"on\\\"in t&&t.on(o.FeatureGroup.EVENTS,this._propagateEvent,this),o.LayerGroup.prototype.addLayer.call(this,t),this._popupContent&&t.bindPopup&&t.bindPopup(this._popupContent,this._popupOptions),this.fire(\\\"layeradd\\\",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),\\\"off\\\"in t&&t.off(o.FeatureGroup.EVENTS,this._propagateEvent,this),o.LayerGroup.prototype.removeLayer.call(this,t),this._popupContent&&this.invoke(\\\"unbindPopup\\\"),this.fire(\\\"layerremove\\\",{layer:t})):this},bindPopup:function(t,e){return this._popupContent=t,this._popupOptions=e,this.invoke(\\\"bindPopup\\\",t,e)},openPopup:function(t){for(var e in this._layers){this._layers[e].openPopup(t);break}return this},setStyle:function(t){return this.invoke(\\\"setStyle\\\",t)},bringToFront:function(){return this.invoke(\\\"bringToFront\\\")},bringToBack:function(){return this.invoke(\\\"bringToBack\\\")},getBounds:function(){var t=new o.LatLngBounds;return this.eachLayer(function(e){t.extend(e instanceof o.Marker?e.getLatLng():e.getBounds())}),t},_propagateEvent:function(t){t=o.extend({layer:t.target,target:this},t),this.fire(t.type,t)}}),o.featureGroup=function(t){return new o.FeatureGroup(t)},o.Path=o.Class.extend({includes:[o.Mixin.Events],statics:{CLIP_PADDING:function(){var e=o.Browser.mobile?1280:2e3,i=(e/Math.max(t.outerWidth,t.outerHeight)-1)/2;return Math.max(0,Math.min(.5,i))}()},options:{stroke:!0,color:\\\"#0033ff\\\",dashArray:null,lineCap:null,lineJoin:null,weight:5,opacity:.5,fill:!1,fillColor:null,fillOpacity:.2,clickable:!0},initialize:function(t){o.setOptions(this,t)},onAdd:function(t){this._map=t,this._container||(this._initElements(),this._initEvents()),this.projectLatlngs(),this._updatePath(),this._container&&this._map._pathRoot.appendChild(this._container),this.fire(\\\"add\\\"),t.on({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){t._pathRoot.removeChild(this._container),this.fire(\\\"remove\\\"),this._map=null,o.Browser.vml&&(this._container=null,this._stroke=null,this._fill=null),t.off({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},projectLatlngs:function(){},setStyle:function(t){return o.setOptions(this,t),this._container&&this._updateStyle(),this},redraw:function(){return this._map&&(this.projectLatlngs(),this._updatePath()),this}}),o.Map.include({_updatePathViewport:function(){var t=o.Path.CLIP_PADDING,e=this.getSize(),i=o.DomUtil.getPosition(this._mapPane),n=i.multiplyBy(-1)._subtract(e.multiplyBy(t)._round()),s=n.add(e.multiplyBy(1+2*t)._round());this._pathViewport=new o.Bounds(n,s)}}),o.Path.SVG_NS=\\\"http://www.w3.org/2000/svg\\\",o.Browser.svg=!(!e.createElementNS||!e.createElementNS(o.Path.SVG_NS,\\\"svg\\\").createSVGRect),o.Path=o.Path.extend({statics:{SVG:o.Browser.svg},bringToFront:function(){var t=this._map._pathRoot,e=this._container;return e&&t.lastChild!==e&&t.appendChild(e),this},bringToBack:function(){var t=this._map._pathRoot,e=this._container,i=t.firstChild;return e&&i!==e&&t.insertBefore(e,i),this},getPathString:function(){},_createElement:function(t){return e.createElementNS(o.Path.SVG_NS,t)},_initElements:function(){this._map._initPathRoot(),this._initPath(),this._initStyle()},_initPath:function(){this._container=this._createElement(\\\"g\\\"),this._path=this._createElement(\\\"path\\\"),this.options.className&&o.DomUtil.addClass(this._path,this.options.className),this._container.appendChild(this._path)},_initStyle:function(){this.options.stroke&&(this._path.setAttribute(\\\"stroke-linejoin\\\",\\\"round\\\"),this._path.setAttribute(\\\"stroke-linecap\\\",\\\"round\\\")),this.options.fill&&this._path.setAttribute(\\\"fill-rule\\\",\\\"evenodd\\\"),this.options.pointerEvents&&this._path.setAttribute(\\\"pointer-events\\\",this.options.pointerEvents),this.options.clickable||this.options.pointerEvents||this._path.setAttribute(\\\"pointer-events\\\",\\\"none\\\"),this._updateStyle()},_updateStyle:function(){this.options.stroke?(this._path.setAttribute(\\\"stroke\\\",this.options.color),this._path.setAttribute(\\\"stroke-opacity\\\",this.options.opacity),this._path.setAttribute(\\\"stroke-width\\\",this.options.weight),this.options.dashArray?this._path.setAttribute(\\\"stroke-dasharray\\\",this.options.dashArray):this._path.removeAttribute(\\\"stroke-dasharray\\\"),this.options.lineCap&&this._path.setAttribute(\\\"stroke-linecap\\\",this.options.lineCap),this.options.lineJoin&&this._path.setAttribute(\\\"stroke-linejoin\\\",this.options.lineJoin)):this._path.setAttribute(\\\"stroke\\\",\\\"none\\\"),this.options.fill?(this._path.setAttribute(\\\"fill\\\",this.options.fillColor||this.options.color),this._path.setAttribute(\\\"fill-opacity\\\",this.options.fillOpacity)):this._path.setAttribute(\\\"fill\\\",\\\"none\\\")},_updatePath:function(){var t=this.getPathString();t||(t=\\\"M0 0\\\"),this._path.setAttribute(\\\"d\\\",t)},_initEvents:function(){if(this.options.clickable){(o.Browser.svg||!o.Browser.vml)&&o.DomUtil.addClass(this._path,\\\"leaflet-clickable\\\"),o.DomEvent.on(this._container,\\\"click\\\",this._onMouseClick,this);for(var t=[\\\"dblclick\\\",\\\"mousedown\\\",\\\"mouseover\\\",\\\"mouseout\\\",\\\"mousemove\\\",\\\"contextmenu\\\"],e=0;e';var i=t.firstChild;return i.style.behavior=\\\"url(#default#VML)\\\",i&&\\\"object\\\"==typeof i.adj}catch(n){return!1}}(),o.Path=o.Browser.svg||!o.Browser.vml?o.Path:o.Path.extend({statics:{VML:!0,CLIP_PADDING:.02},_createElement:function(){try{return e.namespaces.add(\\\"lvml\\\",\\\"urn:schemas-microsoft-com:vml\\\"),function(t){return e.createElement(\\\"')}}catch(t){return function(t){return e.createElement(\\\"<\\\"+t+' xmlns=\\\"urn:schemas-microsoft.com:vml\\\" class=\\\"lvml\\\">')}}}(),_initPath:function(){var t=this._container=this._createElement(\\\"shape\\\");o.DomUtil.addClass(t,\\\"leaflet-vml-shape\\\"+(this.options.className?\\\" \\\"+this.options.className:\\\"\\\")),this.options.clickable&&o.DomUtil.addClass(t,\\\"leaflet-clickable\\\"),t.coordsize=\\\"1 1\\\",this._path=this._createElement(\\\"path\\\"),t.appendChild(this._path),this._map._pathRoot.appendChild(t)},_initStyle:function(){this._updateStyle()},_updateStyle:function(){var t=this._stroke,e=this._fill,i=this.options,n=this._container;n.stroked=i.stroke,n.filled=i.fill,i.stroke?(t||(t=this._stroke=this._createElement(\\\"stroke\\\"),t.endcap=\\\"round\\\",n.appendChild(t)),t.weight=i.weight+\\\"px\\\",t.color=i.color,t.opacity=i.opacity,i.dashArray?t.dashStyle=o.Util.isArray(i.dashArray)?i.dashArray.join(\\\" \\\"):i.dashArray.replace(/( *, *)/g,\\\" \\\"):t.dashStyle=\\\"\\\",i.lineCap&&(t.endcap=i.lineCap.replace(\\\"butt\\\",\\\"flat\\\")),i.lineJoin&&(t.joinstyle=i.lineJoin)):t&&(n.removeChild(t),this._stroke=null),i.fill?(e||(e=this._fill=this._createElement(\\\"fill\\\"),n.appendChild(e)),e.color=i.fillColor||i.color,e.opacity=i.fillOpacity):e&&(n.removeChild(e),this._fill=null)},_updatePath:function(){var t=this._container.style;t.display=\\\"none\\\",this._path.v=this.getPathString()+\\\" \\\",t.display=\\\"\\\"}}),o.Map.include(o.Browser.svg||!o.Browser.vml?{}:{_initPathRoot:function(){if(!this._pathRoot){var t=this._pathRoot=e.createElement(\\\"div\\\");t.className=\\\"leaflet-vml-container\\\",this._panes.overlayPane.appendChild(t),this.on(\\\"moveend\\\",this._updatePathViewport),this._updatePathViewport()}}}),o.Browser.canvas=function(){return!!e.createElement(\\\"canvas\\\").getContext}(),o.Path=o.Path.SVG&&!t.L_PREFER_CANVAS||!o.Browser.canvas?o.Path:o.Path.extend({statics:{CANVAS:!0,SVG:!1},redraw:function(){return this._map&&(this.projectLatlngs(),this._requestUpdate()),this},setStyle:function(t){return o.setOptions(this,t),this._map&&(this._updateStyle(),this._requestUpdate()),this},onRemove:function(t){t.off(\\\"viewreset\\\",this.projectLatlngs,this).off(\\\"moveend\\\",this._updatePath,this),this.options.clickable&&(this._map.off(\\\"click\\\",this._onClick,this),this._map.off(\\\"mousemove\\\",this._onMouseMove,this)),this._requestUpdate(),this.fire(\\\"remove\\\"),this._map=null},_requestUpdate:function(){this._map&&!o.Path._updateRequest&&(o.Path._updateRequest=o.Util.requestAnimFrame(this._fireMapMoveEnd,this._map))},_fireMapMoveEnd:function(){o.Path._updateRequest=null,this.fire(\\\"moveend\\\")},_initElements:function(){this._map._initPathRoot(),this._ctx=this._map._canvasCtx},_updateStyle:function(){var t=this.options;t.stroke&&(this._ctx.lineWidth=t.weight,this._ctx.strokeStyle=t.color),t.fill&&(this._ctx.fillStyle=t.fillColor||t.color),t.lineCap&&(this._ctx.lineCap=t.lineCap),t.lineJoin&&(this._ctx.lineJoin=t.lineJoin)},_drawPath:function(){var t,e,i,n,s,a;for(this._ctx.beginPath(),t=0,i=this._parts.length;i>t;t++){for(e=0,n=this._parts[t].length;n>e;e++)s=this._parts[t][e],a=(0===e?\\\"move\\\":\\\"line\\\")+\\\"To\\\",this._ctx[a](s.x,s.y);this instanceof o.Polygon&&this._ctx.closePath()}},_checkIfEmpty:function(){return!this._parts.length},_updatePath:function(){if(!this._checkIfEmpty()){var t=this._ctx,e=this.options;this._drawPath(),t.save(),this._updateStyle(),e.fill&&(t.globalAlpha=e.fillOpacity,t.fill(e.fillRule||\\\"evenodd\\\")),e.stroke&&(t.globalAlpha=e.opacity,t.stroke()),t.restore()}},_initEvents:function(){this.options.clickable&&(this._map.on(\\\"mousemove\\\",this._onMouseMove,this),this._map.on(\\\"click dblclick contextmenu\\\",this._fireMouseEvent,this))},_fireMouseEvent:function(t){this._containsPoint(t.layerPoint)&&this.fire(t.type,t)},_onMouseMove:function(t){this._map&&!this._map._animatingZoom&&(this._containsPoint(t.layerPoint)?(this._ctx.canvas.style.cursor=\\\"pointer\\\",this._mouseInside=!0,this.fire(\\\"mouseover\\\",t)):this._mouseInside&&(this._ctx.canvas.style.cursor=\\\"\\\",this._mouseInside=!1,this.fire(\\\"mouseout\\\",t)))}}),o.Map.include(o.Path.SVG&&!t.L_PREFER_CANVAS||!o.Browser.canvas?{}:{_initPathRoot:function(){var t,i=this._pathRoot;i||(i=this._pathRoot=e.createElement(\\\"canvas\\\"),i.style.position=\\\"absolute\\\",t=this._canvasCtx=i.getContext(\\\"2d\\\"),t.lineCap=\\\"round\\\",t.lineJoin=\\\"round\\\",this._panes.overlayPane.appendChild(i),this.options.zoomAnimation&&(this._pathRoot.className=\\\"leaflet-zoom-animated\\\",this.on(\\\"zoomanim\\\",this._animatePathZoom),this.on(\\\"zoomend\\\",this._endPathZoom)),this.on(\\\"moveend\\\",this._updateCanvasViewport),this._updateCanvasViewport())},_updateCanvasViewport:function(){if(!this._pathZooming){this._updatePathViewport();var t=this._pathViewport,e=t.min,i=t.max.subtract(e),n=this._pathRoot;o.DomUtil.setPosition(n,e),n.width=i.x,n.height=i.y,n.getContext(\\\"2d\\\").translate(-e.x,-e.y)}}}),o.LineUtil={simplify:function(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=this._reducePoints(t,i),t=this._simplifyDP(t,i)},pointToSegmentDistance:function(t,e,i){return Math.sqrt(this._sqClosestPointOnSegment(t,e,i,!0))},closestPointOnSegment:function(t,e,i){return this._sqClosestPointOnSegment(t,e,i)},_simplifyDP:function(t,e){var n=t.length,o=typeof Uint8Array!=i+\\\"\\\"?Uint8Array:Array,s=new o(n);s[0]=s[n-1]=1,this._simplifyDPStep(t,s,e,0,n-1);var a,r=[];for(a=0;n>a;a++)s[a]&&r.push(t[a]);return r},_simplifyDPStep:function(t,e,i,n,o){var s,a,r,h=0;for(a=n+1;o-1>=a;a++)r=this._sqClosestPointOnSegment(t[a],t[n],t[o],!0),r>h&&(s=a,h=r);h>i&&(e[s]=1,this._simplifyDPStep(t,e,i,n,s),this._simplifyDPStep(t,e,i,s,o))},_reducePoints:function(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;s>n;n++)this._sqDist(t[n],t[o])>e&&(i.push(t[n]),o=n);return s-1>o&&i.push(t[s-1]),i},clipSegment:function(t,e,i,n){var o,s,a,r=n?this._lastCode:this._getBitCode(t,i),h=this._getBitCode(e,i);for(this._lastCode=h;;){if(!(r|h))return[t,e];if(r&h)return!1;o=r||h,s=this._getEdgeIntersection(t,e,o,i),a=this._getBitCode(s,i),o===r?(t=s,r=a):(e=s,h=a)}},_getEdgeIntersection:function(t,e,i,n){var s=e.x-t.x,a=e.y-t.y,r=n.min,h=n.max;return 8&i?new o.Point(t.x+s*(h.y-t.y)/a,h.y):4&i?new o.Point(t.x+s*(r.y-t.y)/a,r.y):2&i?new o.Point(h.x,t.y+a*(h.x-t.x)/s):1&i?new o.Point(r.x,t.y+a*(r.x-t.x)/s):void 0},_getBitCode:function(t,e){var i=0;return t.xe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},_sqClosestPointOnSegment:function(t,e,i,n){var s,a=e.x,r=e.y,h=i.x-a,l=i.y-r,u=h*h+l*l;return u>0&&(s=((t.x-a)*h+(t.y-r)*l)/u,s>1?(a=i.x,r=i.y):s>0&&(a+=h*s,r+=l*s)),h=t.x-a,l=t.y-r,n?h*h+l*l:new o.Point(a,r)}},o.Polyline=o.Path.extend({initialize:function(t,e){o.Path.prototype.initialize.call(this,e),this._latlngs=this._convertLatLngs(t)},options:{smoothFactor:1,noClip:!1},projectLatlngs:function(){this._originalPoints=[];for(var t=0,e=this._latlngs.length;e>t;t++)this._originalPoints[t]=this._map.latLngToLayerPoint(this._latlngs[t])},getPathString:function(){for(var t=0,e=this._parts.length,i=\\\"\\\";e>t;t++)i+=this._getPathPartStr(this._parts[t]);return i},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._latlngs=this._convertLatLngs(t),this.redraw()},addLatLng:function(t){return this._latlngs.push(o.latLng(t)),this.redraw()},spliceLatLngs:function(){var t=[].splice.apply(this._latlngs,arguments);return this._convertLatLngs(this._latlngs,!0),this.redraw(),t},closestLayerPoint:function(t){for(var e,i,n=1/0,s=this._parts,a=null,r=0,h=s.length;h>r;r++)for(var l=s[r],u=1,c=l.length;c>u;u++){e=l[u-1],i=l[u];var d=o.LineUtil._sqClosestPointOnSegment(t,e,i,!0);n>d&&(n=d,a=o.LineUtil._sqClosestPointOnSegment(t,e,i))}return a&&(a.distance=Math.sqrt(n)),a},getBounds:function(){return new o.LatLngBounds(this.getLatLngs())},_convertLatLngs:function(t,e){var i,n,s=e?t:[];for(i=0,n=t.length;n>i;i++){if(o.Util.isArray(t[i])&&\\\"number\\\"!=typeof t[i][0])return;s[i]=o.latLng(t[i])}return s},_initEvents:function(){o.Path.prototype._initEvents.call(this)},_getPathPartStr:function(t){for(var e,i=o.Path.VML,n=0,s=t.length,a=\\\"\\\";s>n;n++)e=t[n],i&&e._round(),a+=(n?\\\"L\\\":\\\"M\\\")+e.x+\\\" \\\"+e.y;return a},_clipPoints:function(){var t,e,i,n=this._originalPoints,s=n.length;if(this.options.noClip)return void(this._parts=[n]);this._parts=[];var a=this._parts,r=this._map._pathViewport,h=o.LineUtil;for(t=0,e=0;s-1>t;t++)i=h.clipSegment(n[t],n[t+1],r,t),i&&(a[e]=a[e]||[],a[e].push(i[0]),(i[1]!==n[t+1]||t===s-2)&&(a[e].push(i[1]),e++))},_simplifyPoints:function(){for(var t=this._parts,e=o.LineUtil,i=0,n=t.length;n>i;i++)t[i]=e.simplify(t[i],this.options.smoothFactor)},_updatePath:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),o.Path.prototype._updatePath.call(this))}}),o.polyline=function(t,e){return new o.Polyline(t,e)},o.PolyUtil={},o.PolyUtil.clipPolygon=function(t,e){var i,n,s,a,r,h,l,u,c,d=[1,4,2,8],p=o.LineUtil;for(n=0,l=t.length;l>n;n++)t[n]._code=p._getBitCode(t[n],e);for(a=0;4>a;a++){for(u=d[a],i=[],n=0,l=t.length,s=l-1;l>n;s=n++)r=t[n],h=t[s],r._code&u?h._code&u||(c=p._getEdgeIntersection(h,r,u,e),c._code=p._getBitCode(c,e),i.push(c)):(h._code&u&&(c=p._getEdgeIntersection(h,r,u,e),c._code=p._getBitCode(c,e),i.push(c)),i.push(r));t=i}return t},o.Polygon=o.Polyline.extend({options:{fill:!0},initialize:function(t,e){o.Polyline.prototype.initialize.call(this,t,e),this._initWithHoles(t)},_initWithHoles:function(t){var e,i,n;if(t&&o.Util.isArray(t[0])&&\\\"number\\\"!=typeof t[0][0])for(this._latlngs=this._convertLatLngs(t[0]),this._holes=t.slice(1),e=0,i=this._holes.length;i>e;e++)n=this._holes[e]=this._convertLatLngs(this._holes[e]),n[0].equals(n[n.length-1])&&n.pop();t=this._latlngs,t.length>=2&&t[0].equals(t[t.length-1])&&t.pop()},projectLatlngs:function(){if(o.Polyline.prototype.projectLatlngs.call(this),this._holePoints=[],this._holes){var t,e,i,n;for(t=0,i=this._holes.length;i>t;t++)for(this._holePoints[t]=[],e=0,n=this._holes[t].length;n>e;e++)this._holePoints[t][e]=this._map.latLngToLayerPoint(this._holes[t][e])}},setLatLngs:function(t){return t&&o.Util.isArray(t[0])&&\\\"number\\\"!=typeof t[0][0]?(this._initWithHoles(t),this.redraw()):o.Polyline.prototype.setLatLngs.call(this,t)},_clipPoints:function(){var t=this._originalPoints,e=[];if(this._parts=[t].concat(this._holePoints),!this.options.noClip){for(var i=0,n=this._parts.length;n>i;i++){var s=o.PolyUtil.clipPolygon(this._parts[i],this._map._pathViewport);s.length&&e.push(s)}this._parts=e}},_getPathPartStr:function(t){var e=o.Polyline.prototype._getPathPartStr.call(this,t);return e+(o.Browser.svg?\\\"z\\\":\\\"x\\\")}}),o.polygon=function(t,e){return new o.Polygon(t,e)},function(){function t(t){return o.FeatureGroup.extend({initialize:function(t,e){this._layers={},this._options=e,this.setLatLngs(t)},setLatLngs:function(e){var i=0,n=e.length;for(this.eachLayer(function(t){n>i?t.setLatLngs(e[i++]):this.removeLayer(t)},this);n>i;)this.addLayer(new t(e[i++],this._options));return this},getLatLngs:function(){var t=[];return this.eachLayer(function(e){t.push(e.getLatLngs())}),t}})}o.MultiPolyline=t(o.Polyline),o.MultiPolygon=t(o.Polygon),o.multiPolyline=function(t,e){return new o.MultiPolyline(t,e)},o.multiPolygon=function(t,e){return new o.MultiPolygon(t,e)}}(),o.Rectangle=o.Polygon.extend({initialize:function(t,e){o.Polygon.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=o.latLngBounds(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}}),o.rectangle=function(t,e){return new o.Rectangle(t,e)},o.Circle=o.Path.extend({initialize:function(t,e,i){o.Path.prototype.initialize.call(this,i),this._latlng=o.latLng(t),this._mRadius=e},options:{fill:!0},setLatLng:function(t){return this._latlng=o.latLng(t),this.redraw()},setRadius:function(t){return this._mRadius=t,this.redraw()},projectLatlngs:function(){var t=this._getLngRadius(),e=this._latlng,i=this._map.latLngToLayerPoint([e.lat,e.lng-t]);this._point=this._map.latLngToLayerPoint(e),this._radius=Math.max(this._point.x-i.x,1)},getBounds:function(){var t=this._getLngRadius(),e=this._mRadius/40075017*360,i=this._latlng;return new o.LatLngBounds([i.lat-e,i.lng-t],[i.lat+e,i.lng+t])},getLatLng:function(){return this._latlng},getPathString:function(){var t=this._point,e=this._radius;return this._checkIfEmpty()?\\\"\\\":o.Browser.svg?\\\"M\\\"+t.x+\\\",\\\"+(t.y-e)+\\\"A\\\"+e+\\\",\\\"+e+\\\",0,1,1,\\\"+(t.x-.1)+\\\",\\\"+(t.y-e)+\\\" z\\\":(t._round(),e=Math.round(e),\\\"AL \\\"+t.x+\\\",\\\"+t.y+\\\" \\\"+e+\\\",\\\"+e+\\\" 0,23592600\\\")},getRadius:function(){return this._mRadius},_getLatRadius:function(){return this._mRadius/40075017*360},_getLngRadius:function(){return this._getLatRadius()/Math.cos(o.LatLng.DEG_TO_RAD*this._latlng.lat)},_checkIfEmpty:function(){if(!this._map)return!1;var t=this._map._pathViewport,e=this._radius,i=this._point;return i.x-e>t.max.x||i.y-e>t.max.y||i.x+ei;i++)for(l=this._parts[i],n=0,r=l.length,s=r-1;r>n;s=n++)if((e||0!==n)&&(h=o.LineUtil.pointToSegmentDistance(t,l[s],l[n]),u>=h))return!0;return!1}}:{}),o.Polygon.include(o.Path.CANVAS?{_containsPoint:function(t){var e,i,n,s,a,r,h,l,u=!1;if(o.Polyline.prototype._containsPoint.call(this,t,!0))return!0;for(s=0,h=this._parts.length;h>s;s++)for(e=this._parts[s],a=0,l=e.length,r=l-1;l>a;r=a++)i=e[a],n=e[r],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(u=!u);return u}}:{}),o.Circle.include(o.Path.CANVAS?{_drawPath:function(){var t=this._point;this._ctx.beginPath(),this._ctx.arc(t.x,t.y,this._radius,0,2*Math.PI,!1)},_containsPoint:function(t){var e=this._point,i=this.options.stroke?this.options.weight/2:0;return t.distanceTo(e)<=this._radius+i}}:{}),o.CircleMarker.include(o.Path.CANVAS?{_updateStyle:function(){o.Path.prototype._updateStyle.call(this)}}:{}),o.GeoJSON=o.FeatureGroup.extend({initialize:function(t,e){o.setOptions(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,s=o.Util.isArray(t)?t:t.features;if(s){for(e=0,i=s.length;i>e;e++)n=s[e],(n.geometries||n.geometry||n.features||n.coordinates)&&this.addData(s[e]);return this}var a=this.options;if(!a.filter||a.filter(t)){var r=o.GeoJSON.geometryToLayer(t,a.pointToLayer,a.coordsToLatLng,a);return r.feature=o.GeoJSON.asFeature(t),r.defaultOptions=r.options,this.resetStyle(r),a.onEachFeature&&a.onEachFeature(t,r),this.addLayer(r)}},resetStyle:function(t){var e=this.options.style;e&&(o.Util.extend(t.options,t.defaultOptions),this._setLayerStyle(t,e))},setStyle:function(t){this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){\\\"function\\\"==typeof e&&(e=e(t.feature)),t.setStyle&&t.setStyle(e)}}),o.extend(o.GeoJSON,{geometryToLayer:function(t,e,i,n){var s,a,r,h,l=\\\"Feature\\\"===t.type?t.geometry:t,u=l.coordinates,c=[];switch(i=i||this.coordsToLatLng,l.type){case\\\"Point\\\":return s=i(u),e?e(t,s):new o.Marker(s);case\\\"MultiPoint\\\":for(r=0,h=u.length;h>r;r++)s=i(u[r]),c.push(e?e(t,s):new o.Marker(s));return new o.FeatureGroup(c);case\\\"LineString\\\":return a=this.coordsToLatLngs(u,0,i),new o.Polyline(a,n);case\\\"Polygon\\\":if(2===u.length&&!u[1].length)throw new Error(\\\"Invalid GeoJSON object.\\\");return a=this.coordsToLatLngs(u,1,i),new o.Polygon(a,n);case\\\"MultiLineString\\\":return a=this.coordsToLatLngs(u,1,i),new o.MultiPolyline(a,n);case\\\"MultiPolygon\\\":return a=this.coordsToLatLngs(u,2,i),new o.MultiPolygon(a,n);case\\\"GeometryCollection\\\":for(r=0,h=l.geometries.length;h>r;r++)c.push(this.geometryToLayer({geometry:l.geometries[r],type:\\\"Feature\\\",properties:t.properties},e,i,n));return new o.FeatureGroup(c);default:throw new Error(\\\"Invalid GeoJSON object.\\\")}},coordsToLatLng:function(t){return new o.LatLng(t[1],t[0],t[2])},coordsToLatLngs:function(t,e,i){var n,o,s,a=[];for(o=0,s=t.length;s>o;o++)n=e?this.coordsToLatLngs(t[o],e-1,i):(i||this.coordsToLatLng)(t[o]),a.push(n);return a},latLngToCoords:function(t){var e=[t.lng,t.lat];return t.alt!==i&&e.push(t.alt),e},latLngsToCoords:function(t){for(var e=[],i=0,n=t.length;n>i;i++)e.push(o.GeoJSON.latLngToCoords(t[i]));return e},getFeature:function(t,e){return t.feature?o.extend({},t.feature,{geometry:e}):o.GeoJSON.asFeature(e)},asFeature:function(t){return\\\"Feature\\\"===t.type?t:{type:\\\"Feature\\\",properties:{},geometry:t}}});var a={toGeoJSON:function(){return o.GeoJSON.getFeature(this,{type:\\\"Point\\\",coordinates:o.GeoJSON.latLngToCoords(this.getLatLng())})}};o.Marker.include(a),o.Circle.include(a),o.CircleMarker.include(a),o.Polyline.include({toGeoJSON:function(){return o.GeoJSON.getFeature(this,{type:\\\"LineString\\\",coordinates:o.GeoJSON.latLngsToCoords(this.getLatLngs())})}}),o.Polygon.include({toGeoJSON:function(){var t,e,i,n=[o.GeoJSON.latLngsToCoords(this.getLatLngs())];if(n[0].push(n[0][0]),this._holes)for(t=0,e=this._holes.length;e>t;t++)i=o.GeoJSON.latLngsToCoords(this._holes[t]),i.push(i[0]),n.push(i);return o.GeoJSON.getFeature(this,{type:\\\"Polygon\\\",coordinates:n})}}),function(){function t(t){return function(){var e=[];return this.eachLayer(function(t){e.push(t.toGeoJSON().geometry.coordinates)}),o.GeoJSON.getFeature(this,{type:t,coordinates:e})}}o.MultiPolyline.include({toGeoJSON:t(\\\"MultiLineString\\\")}),o.MultiPolygon.include({toGeoJSON:t(\\\"MultiPolygon\\\")}),o.LayerGroup.include({toGeoJSON:function(){var e,i=this.feature&&this.feature.geometry,n=[];if(i&&\\\"MultiPoint\\\"===i.type)return t(\\\"MultiPoint\\\").call(this);var s=i&&\\\"GeometryCollection\\\"===i.type;return this.eachLayer(function(t){t.toGeoJSON&&(e=t.toGeoJSON(),n.push(s?e.geometry:o.GeoJSON.asFeature(e)))}),s?o.GeoJSON.getFeature(this,{geometries:n,type:\\\"GeometryCollection\\\"}):{type:\\\"FeatureCollection\\\",features:n}}})}(),o.geoJson=function(t,e){return new o.GeoJSON(t,e)},o.DomEvent={addListener:function(t,e,i,n){var s,a,r,h=o.stamp(i),l=\\\"_leaflet_\\\"+e+h;return t[l]?this:(s=function(e){return i.call(n||t,e||o.DomEvent._getEvent())},o.Browser.pointer&&0===e.indexOf(\\\"touch\\\")?this.addPointerListener(t,e,s,h):(o.Browser.touch&&\\\"dblclick\\\"===e&&this.addDoubleTapListener&&this.addDoubleTapListener(t,s,h),\\\"addEventListener\\\"in t?\\\"mousewheel\\\"===e?(t.addEventListener(\\\"DOMMouseScroll\\\",s,!1),t.addEventListener(e,s,!1)):\\\"mouseenter\\\"===e||\\\"mouseleave\\\"===e?(a=s,r=\\\"mouseenter\\\"===e?\\\"mouseover\\\":\\\"mouseout\\\",s=function(e){return o.DomEvent._checkMouse(t,e)?a(e):void 0},t.addEventListener(r,s,!1)):\\\"click\\\"===e&&o.Browser.android?(a=s,s=function(t){return o.DomEvent._filterClick(t,a)},t.addEventListener(e,s,!1)):t.addEventListener(e,s,!1):\\\"attachEvent\\\"in t&&t.attachEvent(\\\"on\\\"+e,s),t[l]=s,this))},removeListener:function(t,e,i){var n=o.stamp(i),s=\\\"_leaflet_\\\"+e+n,a=t[s];return a?(o.Browser.pointer&&0===e.indexOf(\\\"touch\\\")?this.removePointerListener(t,e,n):o.Browser.touch&&\\\"dblclick\\\"===e&&this.removeDoubleTapListener?this.removeDoubleTapListener(t,n):\\\"removeEventListener\\\"in t?\\\"mousewheel\\\"===e?(t.removeEventListener(\\\"DOMMouseScroll\\\",a,!1),t.removeEventListener(e,a,!1)):\\\"mouseenter\\\"===e||\\\"mouseleave\\\"===e?t.removeEventListener(\\\"mouseenter\\\"===e?\\\"mouseover\\\":\\\"mouseout\\\",a,!1):t.removeEventListener(e,a,!1):\\\"detachEvent\\\"in t&&t.detachEvent(\\\"on\\\"+e,a),t[s]=null,this):this},stopPropagation:function(t){return t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,o.DomEvent._skipped(t),this},disableScrollPropagation:function(t){var e=o.DomEvent.stopPropagation;return o.DomEvent.on(t,\\\"mousewheel\\\",e).on(t,\\\"MozMousePixelScroll\\\",e)},disableClickPropagation:function(t){for(var e=o.DomEvent.stopPropagation,i=o.Draggable.START.length-1;i>=0;i--)o.DomEvent.on(t,o.Draggable.START[i],e);return o.DomEvent.on(t,\\\"click\\\",o.DomEvent._fakeStop).on(t,\\\"dblclick\\\",e)},preventDefault:function(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this},stop:function(t){return o.DomEvent.preventDefault(t).stopPropagation(t)},getMousePosition:function(t,e){if(!e)return new o.Point(t.clientX,t.clientY);var i=e.getBoundingClientRect();return new o.Point(t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop)},getWheelDelta:function(t){var e=0;return t.wheelDelta&&(e=t.wheelDelta/120),t.detail&&(e=-t.detail/3),e},_skipEvents:{},_fakeStop:function(t){o.DomEvent._skipEvents[t.type]=!0},_skipped:function(t){var e=this._skipEvents[t.type];return this._skipEvents[t.type]=!1,e},_checkMouse:function(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(n){return!1}return i!==t},_getEvent:function(){var e=t.event;if(!e)for(var i=arguments.callee.caller;i&&(e=i.arguments[0],!e||t.Event!==e.constructor);)i=i.caller;return e},_filterClick:function(t,e){var i=t.timeStamp||t.originalEvent.timeStamp,n=o.DomEvent._lastClick&&i-o.DomEvent._lastClick;return n&&n>100&&500>n||t.target._simulatedClick&&!t._simulated?void o.DomEvent.stop(t):(o.DomEvent._lastClick=i,e(t))}},o.DomEvent.on=o.DomEvent.addListener,o.DomEvent.off=o.DomEvent.removeListener,o.Draggable=o.Class.extend({includes:o.Mixin.Events,statics:{START:o.Browser.touch?[\\\"touchstart\\\",\\\"mousedown\\\"]:[\\\"mousedown\\\"],END:{mousedown:\\\"mouseup\\\",touchstart:\\\"touchend\\\",pointerdown:\\\"touchend\\\",MSPointerDown:\\\"touchend\\\"},MOVE:{mousedown:\\\"mousemove\\\",touchstart:\\\"touchmove\\\",pointerdown:\\\"touchmove\\\",MSPointerDown:\\\"touchmove\\\"}},initialize:function(t,e){this._element=t,this._dragStartTarget=e||t},enable:function(){if(!this._enabled){for(var t=o.Draggable.START.length-1;t>=0;t--)o.DomEvent.on(this._dragStartTarget,o.Draggable.START[t],this._onDown,this);this._enabled=!0}},disable:function(){if(this._enabled){for(var t=o.Draggable.START.length-1;t>=0;t--)o.DomEvent.off(this._dragStartTarget,o.Draggable.START[t],this._onDown,this);this._enabled=!1,this._moved=!1}},_onDown:function(t){if(this._moved=!1,!t.shiftKey&&(1===t.which||1===t.button||t.touches)&&(o.DomEvent.stopPropagation(t),!o.Draggable._disabled&&(o.DomUtil.disableImageDrag(),o.DomUtil.disableTextSelection(),!this._moving))){var i=t.touches?t.touches[0]:t;this._startPoint=new o.Point(i.clientX,i.clientY),this._startPos=this._newPos=o.DomUtil.getPosition(this._element),o.DomEvent.on(e,o.Draggable.MOVE[t.type],this._onMove,this).on(e,o.Draggable.END[t.type],this._onUp,this)}},_onMove:function(t){if(t.touches&&t.touches.length>1)return void(this._moved=!0);var i=t.touches&&1===t.touches.length?t.touches[0]:t,n=new o.Point(i.clientX,i.clientY),s=n.subtract(this._startPoint);(s.x||s.y)&&(o.Browser.touch&&Math.abs(s.x)+Math.abs(s.y)<3||(o.DomEvent.preventDefault(t),this._moved||(this.fire(\\\"dragstart\\\"),this._moved=!0,this._startPos=o.DomUtil.getPosition(this._element).subtract(s),o.DomUtil.addClass(e.body,\\\"leaflet-dragging\\\"),this._lastTarget=t.target||t.srcElement,o.DomUtil.addClass(this._lastTarget,\\\"leaflet-drag-target\\\")),this._newPos=this._startPos.add(s),this._moving=!0,o.Util.cancelAnimFrame(this._animRequest),this._animRequest=o.Util.requestAnimFrame(this._updatePosition,this,!0,this._dragStartTarget)))},_updatePosition:function(){this.fire(\\\"predrag\\\"),o.DomUtil.setPosition(this._element,this._newPos),this.fire(\\\"drag\\\")},_onUp:function(){o.DomUtil.removeClass(e.body,\\\"leaflet-dragging\\\"),this._lastTarget&&(o.DomUtil.removeClass(this._lastTarget,\\\"leaflet-drag-target\\\"),this._lastTarget=null);for(var t in o.Draggable.MOVE)o.DomEvent.off(e,o.Draggable.MOVE[t],this._onMove).off(e,o.Draggable.END[t],this._onUp);o.DomUtil.enableImageDrag(),o.DomUtil.enableTextSelection(),this._moved&&this._moving&&(o.Util.cancelAnimFrame(this._animRequest),this.fire(\\\"dragend\\\",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1}}),o.Handler=o.Class.extend({initialize:function(t){this._map=t},enable:function(){this._enabled||(this._enabled=!0,this.addHooks())},disable:function(){this._enabled&&(this._enabled=!1,this.removeHooks())},enabled:function(){return!!this._enabled}}),o.Map.mergeOptions({dragging:!0,inertia:!o.Browser.android23,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,inertiaThreshold:o.Browser.touch?32:18,easeLinearity:.25,worldCopyJump:!1}),o.Map.Drag=o.Handler.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new o.Draggable(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),t.options.worldCopyJump&&(this._draggable.on(\\\"predrag\\\",this._onPreDrag,this),t.on(\\\"viewreset\\\",this._onViewReset,this),t.whenReady(this._onViewReset,this))}this._draggable.enable()},removeHooks:function(){this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){var t=this._map;t._panAnim&&t._panAnim.stop(),t.fire(\\\"movestart\\\").fire(\\\"dragstart\\\"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(){if(this._map.options.inertia){var t=this._lastTime=+new Date,e=this._lastPos=this._draggable._newPos;this._positions.push(e),this._times.push(t),t-this._times[0]>200&&(this._positions.shift(),this._times.shift())}this._map.fire(\\\"move\\\").fire(\\\"drag\\\")},_onViewReset:function(){var t=this._map.getSize()._divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.project([0,180]).x},_onPreDrag:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,a=Math.abs(o+i)i.inertiaThreshold||!this._positions[0];if(e.fire(\\\"dragend\\\",t),s)e.fire(\\\"moveend\\\");else{var a=this._lastPos.subtract(this._positions[0]),r=(this._lastTime+n-this._times[0])/1e3,h=i.easeLinearity,l=a.multiplyBy(h/r),u=l.distanceTo([0,0]),c=Math.min(i.inertiaMaxSpeed,u),d=l.multiplyBy(c/u),p=c/(i.inertiaDeceleration*h),_=d.multiplyBy(-p/2).round();_.x&&_.y?(_=e._limitOffset(_,e.options.maxBounds),o.Util.requestAnimFrame(function(){e.panBy(_,{duration:p,easeLinearity:h,noMoveStart:!0})})):e.fire(\\\"moveend\\\")}}}),o.Map.addInitHook(\\\"addHandler\\\",\\\"dragging\\\",o.Map.Drag),o.Map.mergeOptions({doubleClickZoom:!0}),o.Map.DoubleClickZoom=o.Handler.extend({addHooks:function(){this._map.on(\\\"dblclick\\\",this._onDoubleClick,this)},removeHooks:function(){this._map.off(\\\"dblclick\\\",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom()+(t.originalEvent.shiftKey?-1:1);\\\"center\\\"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}}),o.Map.addInitHook(\\\"addHandler\\\",\\\"doubleClickZoom\\\",o.Map.DoubleClickZoom),o.Map.mergeOptions({scrollWheelZoom:!0}),o.Map.ScrollWheelZoom=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,\\\"mousewheel\\\",this._onWheelScroll,this),o.DomEvent.on(this._map._container,\\\"MozMousePixelScroll\\\",o.DomEvent.preventDefault),this._delta=0},removeHooks:function(){o.DomEvent.off(this._map._container,\\\"mousewheel\\\",this._onWheelScroll),o.DomEvent.off(this._map._container,\\\"MozMousePixelScroll\\\",o.DomEvent.preventDefault)},_onWheelScroll:function(t){var e=o.DomEvent.getWheelDelta(t);this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(40-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o.bind(this._performZoom,this),i),o.DomEvent.preventDefault(t),o.DomEvent.stopPropagation(t)},_performZoom:function(){var t=this._map,e=this._delta,i=t.getZoom();e=e>0?Math.ceil(e):Math.floor(e),e=Math.max(Math.min(e,4),-4),e=t._limitZoom(i+e)-i,this._delta=0,this._startTime=null,e&&(\\\"center\\\"===t.options.scrollWheelZoom?t.setZoom(i+e):t.setZoomAround(this._lastMousePos,i+e))}}),o.Map.addInitHook(\\\"addHandler\\\",\\\"scrollWheelZoom\\\",o.Map.ScrollWheelZoom),o.extend(o.DomEvent,{_touchstart:o.Browser.msPointer?\\\"MSPointerDown\\\":o.Browser.pointer?\\\"pointerdown\\\":\\\"touchstart\\\",_touchend:o.Browser.msPointer?\\\"MSPointerUp\\\":o.Browser.pointer?\\\"pointerup\\\":\\\"touchend\\\",addDoubleTapListener:function(t,i,n){function s(t){var e;if(o.Browser.pointer?(_.push(t.pointerId),e=_.length):e=t.touches.length,!(e>1)){var i=Date.now(),n=i-(r||i);h=t.touches?t.touches[0]:t,l=n>0&&u>=n,r=i}}function a(t){if(o.Browser.pointer){var e=_.indexOf(t.pointerId);if(-1===e)return;_.splice(e,1)}if(l){if(o.Browser.pointer){var n,s={};for(var a in h)n=h[a],\\\"function\\\"==typeof n?s[a]=n.bind(h):s[a]=n;h=s}h.type=\\\"dblclick\\\",i(h),r=null}}var r,h,l=!1,u=250,c=\\\"_leaflet_\\\",d=this._touchstart,p=this._touchend,_=[];t[c+d+n]=s,t[c+p+n]=a;var m=o.Browser.pointer?e.documentElement:t;return t.addEventListener(d,s,!1),m.addEventListener(p,a,!1),o.Browser.pointer&&m.addEventListener(o.DomEvent.POINTER_CANCEL,a,!1),this},removeDoubleTapListener:function(t,i){var n=\\\"_leaflet_\\\";return t.removeEventListener(this._touchstart,t[n+this._touchstart+i],!1),(o.Browser.pointer?e.documentElement:t).removeEventListener(this._touchend,t[n+this._touchend+i],!1),o.Browser.pointer&&e.documentElement.removeEventListener(o.DomEvent.POINTER_CANCEL,t[n+this._touchend+i],!1),this}}),o.extend(o.DomEvent,{POINTER_DOWN:o.Browser.msPointer?\\\"MSPointerDown\\\":\\\"pointerdown\\\",POINTER_MOVE:o.Browser.msPointer?\\\"MSPointerMove\\\":\\\"pointermove\\\",POINTER_UP:o.Browser.msPointer?\\\"MSPointerUp\\\":\\\"pointerup\\\",POINTER_CANCEL:o.Browser.msPointer?\\\"MSPointerCancel\\\":\\\"pointercancel\\\",_pointers:[],_pointerDocumentListener:!1,addPointerListener:function(t,e,i,n){switch(e){case\\\"touchstart\\\":return this.addPointerListenerStart(t,e,i,n);\\ncase\\\"touchend\\\":return this.addPointerListenerEnd(t,e,i,n);case\\\"touchmove\\\":return this.addPointerListenerMove(t,e,i,n);default:throw\\\"Unknown touch event type\\\"}},addPointerListenerStart:function(t,i,n,s){var a=\\\"_leaflet_\\\",r=this._pointers,h=function(t){\\\"mouse\\\"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&o.DomEvent.preventDefault(t);for(var e=!1,i=0;i1))&&(this._moved||(o.DomUtil.addClass(e._mapPane,\\\"leaflet-touching\\\"),e.fire(\\\"movestart\\\").fire(\\\"zoomstart\\\"),this._moved=!0),o.Util.cancelAnimFrame(this._animRequest),this._animRequest=o.Util.requestAnimFrame(this._updateOnMove,this,!0,this._map._container),o.DomEvent.preventDefault(t))}},_updateOnMove:function(){var t=this._map,e=this._getScaleOrigin(),i=t.layerPointToLatLng(e),n=t.getScaleZoom(this._scale);t._animateZoom(i,n,this._startCenter,this._scale,this._delta,!1,!0)},_onTouchEnd:function(){if(!this._moved||!this._zooming)return void(this._zooming=!1);var t=this._map;this._zooming=!1,o.DomUtil.removeClass(t._mapPane,\\\"leaflet-touching\\\"),o.Util.cancelAnimFrame(this._animRequest),o.DomEvent.off(e,\\\"touchmove\\\",this._onTouchMove).off(e,\\\"touchend\\\",this._onTouchEnd);var i=this._getScaleOrigin(),n=t.layerPointToLatLng(i),s=t.getZoom(),a=t.getScaleZoom(this._scale)-s,r=a>0?Math.ceil(a):Math.floor(a),h=t._limitZoom(s+r),l=t.getZoomScale(h)/this._scale;t._animateZoom(n,h,i,l)},_getScaleOrigin:function(){var t=this._centerOffset.subtract(this._delta).divideBy(this._scale);return this._startCenter.add(t)}}),o.Map.addInitHook(\\\"addHandler\\\",\\\"touchZoom\\\",o.Map.TouchZoom),o.Map.mergeOptions({tap:!0,tapTolerance:15}),o.Map.Tap=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,\\\"touchstart\\\",this._onDown,this)},removeHooks:function(){o.DomEvent.off(this._map._container,\\\"touchstart\\\",this._onDown,this)},_onDown:function(t){if(t.touches){if(o.DomEvent.preventDefault(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var i=t.touches[0],n=i.target;this._startPos=this._newPos=new o.Point(i.clientX,i.clientY),n.tagName&&\\\"a\\\"===n.tagName.toLowerCase()&&o.DomUtil.addClass(n,\\\"leaflet-active\\\"),this._holdTimeout=setTimeout(o.bind(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent(\\\"contextmenu\\\",i))},this),1e3),o.DomEvent.on(e,\\\"touchmove\\\",this._onMove,this).on(e,\\\"touchend\\\",this._onUp,this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),o.DomEvent.off(e,\\\"touchmove\\\",this._onMove,this).off(e,\\\"touchend\\\",this._onUp,this),this._fireClick&&t&&t.changedTouches){var i=t.changedTouches[0],n=i.target;n&&n.tagName&&\\\"a\\\"===n.tagName.toLowerCase()&&o.DomUtil.removeClass(n,\\\"leaflet-active\\\"),this._isTapValid()&&this._simulateEvent(\\\"click\\\",i)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new o.Point(e.clientX,e.clientY)},_simulateEvent:function(i,n){var o=e.createEvent(\\\"MouseEvents\\\");o._simulated=!0,n.target._simulatedClick=!0,o.initMouseEvent(i,!0,!0,t,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),n.target.dispatchEvent(o)}}),o.Browser.touch&&!o.Browser.pointer&&o.Map.addInitHook(\\\"addHandler\\\",\\\"tap\\\",o.Map.Tap),o.Map.mergeOptions({boxZoom:!0}),o.Map.BoxZoom=o.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._moved=!1},addHooks:function(){o.DomEvent.on(this._container,\\\"mousedown\\\",this._onMouseDown,this)},removeHooks:function(){o.DomEvent.off(this._container,\\\"mousedown\\\",this._onMouseDown),this._moved=!1},moved:function(){return this._moved},_onMouseDown:function(t){return this._moved=!1,!t.shiftKey||1!==t.which&&1!==t.button?!1:(o.DomUtil.disableTextSelection(),o.DomUtil.disableImageDrag(),this._startLayerPoint=this._map.mouseEventToLayerPoint(t),void o.DomEvent.on(e,\\\"mousemove\\\",this._onMouseMove,this).on(e,\\\"mouseup\\\",this._onMouseUp,this).on(e,\\\"keydown\\\",this._onKeyDown,this))},_onMouseMove:function(t){this._moved||(this._box=o.DomUtil.create(\\\"div\\\",\\\"leaflet-zoom-box\\\",this._pane),o.DomUtil.setPosition(this._box,this._startLayerPoint),this._container.style.cursor=\\\"crosshair\\\",this._map.fire(\\\"boxzoomstart\\\"));var e=this._startLayerPoint,i=this._box,n=this._map.mouseEventToLayerPoint(t),s=n.subtract(e),a=new o.Point(Math.min(n.x,e.x),Math.min(n.y,e.y));o.DomUtil.setPosition(i,a),this._moved=!0,i.style.width=Math.max(0,Math.abs(s.x)-4)+\\\"px\\\",i.style.height=Math.max(0,Math.abs(s.y)-4)+\\\"px\\\"},_finish:function(){this._moved&&(this._pane.removeChild(this._box),this._container.style.cursor=\\\"\\\"),o.DomUtil.enableTextSelection(),o.DomUtil.enableImageDrag(),o.DomEvent.off(e,\\\"mousemove\\\",this._onMouseMove).off(e,\\\"mouseup\\\",this._onMouseUp).off(e,\\\"keydown\\\",this._onKeyDown)},_onMouseUp:function(t){this._finish();var e=this._map,i=e.mouseEventToLayerPoint(t);if(!this._startLayerPoint.equals(i)){var n=new o.LatLngBounds(e.layerPointToLatLng(this._startLayerPoint),e.layerPointToLatLng(i));e.fitBounds(n),e.fire(\\\"boxzoomend\\\",{boxZoomBounds:n})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}}),o.Map.addInitHook(\\\"addHandler\\\",\\\"boxZoom\\\",o.Map.BoxZoom),o.Map.mergeOptions({keyboard:!0,keyboardPanOffset:80,keyboardZoomOffset:1}),o.Map.Keyboard=o.Handler.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,173]},initialize:function(t){this._map=t,this._setPanOffset(t.options.keyboardPanOffset),this._setZoomOffset(t.options.keyboardZoomOffset)},addHooks:function(){var t=this._map._container;-1===t.tabIndex&&(t.tabIndex=\\\"0\\\"),o.DomEvent.on(t,\\\"focus\\\",this._onFocus,this).on(t,\\\"blur\\\",this._onBlur,this).on(t,\\\"mousedown\\\",this._onMouseDown,this),this._map.on(\\\"focus\\\",this._addHooks,this).on(\\\"blur\\\",this._removeHooks,this)},removeHooks:function(){this._removeHooks();var t=this._map._container;o.DomEvent.off(t,\\\"focus\\\",this._onFocus,this).off(t,\\\"blur\\\",this._onBlur,this).off(t,\\\"mousedown\\\",this._onMouseDown,this),this._map.off(\\\"focus\\\",this._addHooks,this).off(\\\"blur\\\",this._removeHooks,this)},_onMouseDown:function(){if(!this._focused){var i=e.body,n=e.documentElement,o=i.scrollTop||n.scrollTop,s=i.scrollLeft||n.scrollLeft;this._map._container.focus(),t.scrollTo(s,o)}},_onFocus:function(){this._focused=!0,this._map.fire(\\\"focus\\\")},_onBlur:function(){this._focused=!1,this._map.fire(\\\"blur\\\")},_setPanOffset:function(t){var e,i,n=this._panKeys={},o=this.keyCodes;for(e=0,i=o.left.length;i>e;e++)n[o.left[e]]=[-1*t,0];for(e=0,i=o.right.length;i>e;e++)n[o.right[e]]=[t,0];for(e=0,i=o.down.length;i>e;e++)n[o.down[e]]=[0,t];for(e=0,i=o.up.length;i>e;e++)n[o.up[e]]=[0,-1*t]},_setZoomOffset:function(t){var e,i,n=this._zoomKeys={},o=this.keyCodes;for(e=0,i=o.zoomIn.length;i>e;e++)n[o.zoomIn[e]]=t;for(e=0,i=o.zoomOut.length;i>e;e++)n[o.zoomOut[e]]=-t},_addHooks:function(){o.DomEvent.on(e,\\\"keydown\\\",this._onKeyDown,this)},_removeHooks:function(){o.DomEvent.off(e,\\\"keydown\\\",this._onKeyDown,this)},_onKeyDown:function(t){var e=t.keyCode,i=this._map;if(e in this._panKeys){if(i._panAnim&&i._panAnim._inProgress)return;i.panBy(this._panKeys[e]),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds)}else{if(!(e in this._zoomKeys))return;i.setZoom(i.getZoom()+this._zoomKeys[e])}o.DomEvent.stop(t)}}),o.Map.addInitHook(\\\"addHandler\\\",\\\"keyboard\\\",o.Map.Keyboard),o.Handler.MarkerDrag=o.Handler.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new o.Draggable(t,t)),this._draggable.on(\\\"dragstart\\\",this._onDragStart,this).on(\\\"drag\\\",this._onDrag,this).on(\\\"dragend\\\",this._onDragEnd,this),this._draggable.enable(),o.DomUtil.addClass(this._marker._icon,\\\"leaflet-marker-draggable\\\")},removeHooks:function(){this._draggable.off(\\\"dragstart\\\",this._onDragStart,this).off(\\\"drag\\\",this._onDrag,this).off(\\\"dragend\\\",this._onDragEnd,this),this._draggable.disable(),o.DomUtil.removeClass(this._marker._icon,\\\"leaflet-marker-draggable\\\")},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){this._marker.closePopup().fire(\\\"movestart\\\").fire(\\\"dragstart\\\")},_onDrag:function(){var t=this._marker,e=t._shadow,i=o.DomUtil.getPosition(t._icon),n=t._map.layerPointToLatLng(i);e&&o.DomUtil.setPosition(e,i),t._latlng=n,t.fire(\\\"move\\\",{latlng:n}).fire(\\\"drag\\\")},_onDragEnd:function(t){this._marker.fire(\\\"moveend\\\").fire(\\\"dragend\\\",t)}}),o.Control=o.Class.extend({options:{position:\\\"topright\\\"},initialize:function(t){o.setOptions(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return o.DomUtil.addClass(e,\\\"leaflet-control\\\"),-1!==i.indexOf(\\\"bottom\\\")?n.insertBefore(e,n.firstChild):n.appendChild(e),this},removeFrom:function(t){var e=this.getPosition(),i=t._controlCorners[e];return i.removeChild(this._container),this._map=null,this.onRemove&&this.onRemove(t),this},_refocusOnMap:function(){this._map&&this._map.getContainer().focus()}}),o.control=function(t){return new o.Control(t)},o.Map.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.removeFrom(this),this},_initControlPos:function(){function t(t,s){var a=i+t+\\\" \\\"+i+s;e[t+s]=o.DomUtil.create(\\\"div\\\",a,n)}var e=this._controlCorners={},i=\\\"leaflet-\\\",n=this._controlContainer=o.DomUtil.create(\\\"div\\\",i+\\\"control-container\\\",this._container);t(\\\"top\\\",\\\"left\\\"),t(\\\"top\\\",\\\"right\\\"),t(\\\"bottom\\\",\\\"left\\\"),t(\\\"bottom\\\",\\\"right\\\")},_clearControlPos:function(){this._container.removeChild(this._controlContainer)}}),o.Control.Zoom=o.Control.extend({options:{position:\\\"topleft\\\",zoomInText:\\\"+\\\",zoomInTitle:\\\"Zoom in\\\",zoomOutText:\\\"-\\\",zoomOutTitle:\\\"Zoom out\\\"},onAdd:function(t){var e=\\\"leaflet-control-zoom\\\",i=o.DomUtil.create(\\\"div\\\",e+\\\" leaflet-bar\\\");return this._map=t,this._zoomInButton=this._createButton(this.options.zoomInText,this.options.zoomInTitle,e+\\\"-in\\\",i,this._zoomIn,this),this._zoomOutButton=this._createButton(this.options.zoomOutText,this.options.zoomOutTitle,e+\\\"-out\\\",i,this._zoomOut,this),this._updateDisabled(),t.on(\\\"zoomend zoomlevelschange\\\",this._updateDisabled,this),i},onRemove:function(t){t.off(\\\"zoomend zoomlevelschange\\\",this._updateDisabled,this)},_zoomIn:function(t){this._map.zoomIn(t.shiftKey?3:1)},_zoomOut:function(t){this._map.zoomOut(t.shiftKey?3:1)},_createButton:function(t,e,i,n,s,a){var r=o.DomUtil.create(\\\"a\\\",i,n);r.innerHTML=t,r.href=\\\"#\\\",r.title=e;var h=o.DomEvent.stopPropagation;return o.DomEvent.on(r,\\\"click\\\",h).on(r,\\\"mousedown\\\",h).on(r,\\\"dblclick\\\",h).on(r,\\\"click\\\",o.DomEvent.preventDefault).on(r,\\\"click\\\",s,a).on(r,\\\"click\\\",this._refocusOnMap,a),r},_updateDisabled:function(){var t=this._map,e=\\\"leaflet-disabled\\\";o.DomUtil.removeClass(this._zoomInButton,e),o.DomUtil.removeClass(this._zoomOutButton,e),t._zoom===t.getMinZoom()&&o.DomUtil.addClass(this._zoomOutButton,e),t._zoom===t.getMaxZoom()&&o.DomUtil.addClass(this._zoomInButton,e)}}),o.Map.mergeOptions({zoomControl:!0}),o.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new o.Control.Zoom,this.addControl(this.zoomControl))}),o.control.zoom=function(t){return new o.Control.Zoom(t)},o.Control.Attribution=o.Control.extend({options:{position:\\\"bottomright\\\",prefix:'Leaflet'},initialize:function(t){o.setOptions(this,t),this._attributions={}},onAdd:function(t){this._container=o.DomUtil.create(\\\"div\\\",\\\"leaflet-control-attribution\\\"),o.DomEvent.disableClickPropagation(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return t.on(\\\"layeradd\\\",this._onLayerAdd,this).on(\\\"layerremove\\\",this._onLayerRemove,this),this._update(),this._container},onRemove:function(t){t.off(\\\"layeradd\\\",this._onLayerAdd).off(\\\"layerremove\\\",this._onLayerRemove)},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):void 0},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):void 0},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(\\\", \\\")),this._container.innerHTML=i.join(\\\" | \\\")}},_onLayerAdd:function(t){t.layer.getAttribution&&this.addAttribution(t.layer.getAttribution())},_onLayerRemove:function(t){t.layer.getAttribution&&this.removeAttribution(t.layer.getAttribution())}}),o.Map.mergeOptions({attributionControl:!0}),o.Map.addInitHook(function(){this.options.attributionControl&&(this.attributionControl=(new o.Control.Attribution).addTo(this))}),o.control.attribution=function(t){return new o.Control.Attribution(t)},o.Control.Scale=o.Control.extend({options:{position:\\\"bottomleft\\\",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1},onAdd:function(t){this._map=t;var e=\\\"leaflet-control-scale\\\",i=o.DomUtil.create(\\\"div\\\",e),n=this.options;return this._addScales(n,e,i),t.on(n.updateWhenIdle?\\\"moveend\\\":\\\"move\\\",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?\\\"moveend\\\":\\\"move\\\",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=o.DomUtil.create(\\\"div\\\",e+\\\"-line\\\",i)),t.imperial&&(this._iScale=o.DomUtil.create(\\\"div\\\",e+\\\"-line\\\",i))},_update:function(){var t=this._map.getBounds(),e=t.getCenter().lat,i=6378137*Math.PI*Math.cos(e*Math.PI/180),n=i*(t.getNorthEast().lng-t.getSouthWest().lng)/180,o=this._map.getSize(),s=this.options,a=0;o.x>0&&(a=n*(s.maxWidth/o.x)),this._updateScales(s,a)},_updateScales:function(t,e){t.metric&&e&&this._updateMetric(e),t.imperial&&e&&this._updateImperial(e)},_updateMetric:function(t){var e=this._getRoundNum(t);this._mScale.style.width=this._getScaleWidth(e/t)+\\\"px\\\",this._mScale.innerHTML=1e3>e?e+\\\" m\\\":e/1e3+\\\" km\\\"},_updateImperial:function(t){var e,i,n,o=3.2808399*t,s=this._iScale;o>5280?(e=o/5280,i=this._getRoundNum(e),s.style.width=this._getScaleWidth(i/e)+\\\"px\\\",s.innerHTML=i+\\\" mi\\\"):(n=this._getRoundNum(o),s.style.width=this._getScaleWidth(n/o)+\\\"px\\\",s.innerHTML=n+\\\" ft\\\")},_getScaleWidth:function(t){return Math.round(this.options.maxWidth*t)-10},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+\\\"\\\").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),o.control.scale=function(t){return new o.Control.Scale(t)},o.Control.Layers=o.Control.extend({options:{collapsed:!0,position:\\\"topright\\\",autoZIndex:!0},initialize:function(t,e,i){o.setOptions(this,i),this._layers={},this._lastZIndex=0,this._handlingClick=!1;for(var n in t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){return this._initLayout(),this._update(),t.on(\\\"layeradd\\\",this._onLayerChange,this).on(\\\"layerremove\\\",this._onLayerChange,this),this._container},onRemove:function(t){t.off(\\\"layeradd\\\",this._onLayerChange,this).off(\\\"layerremove\\\",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._update(),this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._update(),this},removeLayer:function(t){var e=o.stamp(t);return delete this._layers[e],this._update(),this},_initLayout:function(){var t=\\\"leaflet-control-layers\\\",e=this._container=o.DomUtil.create(\\\"div\\\",t);e.setAttribute(\\\"aria-haspopup\\\",!0),o.Browser.touch?o.DomEvent.on(e,\\\"click\\\",o.DomEvent.stopPropagation):o.DomEvent.disableClickPropagation(e).disableScrollPropagation(e);var i=this._form=o.DomUtil.create(\\\"form\\\",t+\\\"-list\\\");if(this.options.collapsed){o.Browser.android||o.DomEvent.on(e,\\\"mouseover\\\",this._expand,this).on(e,\\\"mouseout\\\",this._collapse,this);var n=this._layersLink=o.DomUtil.create(\\\"a\\\",t+\\\"-toggle\\\",e);n.href=\\\"#\\\",n.title=\\\"Layers\\\",o.Browser.touch?o.DomEvent.on(n,\\\"click\\\",o.DomEvent.stop).on(n,\\\"click\\\",this._expand,this):o.DomEvent.on(n,\\\"focus\\\",this._expand,this),o.DomEvent.on(i,\\\"click\\\",function(){setTimeout(o.bind(this._onInputClick,this),0)},this),this._map.on(\\\"click\\\",this._collapse,this)}else this._expand();this._baseLayersList=o.DomUtil.create(\\\"div\\\",t+\\\"-base\\\",i),this._separator=o.DomUtil.create(\\\"div\\\",t+\\\"-separator\\\",i),this._overlaysList=o.DomUtil.create(\\\"div\\\",t+\\\"-overlays\\\",i),e.appendChild(i)},_addLayer:function(t,e,i){var n=o.stamp(t);this._layers[n]={layer:t,name:e,overlay:i},this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex))},_update:function(){if(this._container){this._baseLayersList.innerHTML=\\\"\\\",this._overlaysList.innerHTML=\\\"\\\";var t,e,i=!1,n=!1;for(t in this._layers)e=this._layers[t],this._addItem(e),n=n||e.overlay,i=i||!e.overlay;this._separator.style.display=n&&i?\\\"\\\":\\\"none\\\"}},_onLayerChange:function(t){var e=this._layers[o.stamp(t.layer)];if(e){this._handlingClick||this._update();var i=e.overlay?\\\"layeradd\\\"===t.type?\\\"overlayadd\\\":\\\"overlayremove\\\":\\\"layeradd\\\"===t.type?\\\"baselayerchange\\\":null;i&&this._map.fire(i,e)}},_createRadioElement:function(t,i){var n='\\\";var o=e.createElement(\\\"div\\\");return o.innerHTML=n,o.firstChild},_addItem:function(t){var i,n=e.createElement(\\\"label\\\"),s=this._map.hasLayer(t.layer);t.overlay?(i=e.createElement(\\\"input\\\"),i.type=\\\"checkbox\\\",i.className=\\\"leaflet-control-layers-selector\\\",i.defaultChecked=s):i=this._createRadioElement(\\\"leaflet-base-layers\\\",s),i.layerId=o.stamp(t.layer),o.DomEvent.on(i,\\\"click\\\",this._onInputClick,this);var a=e.createElement(\\\"span\\\");a.innerHTML=\\\" \\\"+t.name,n.appendChild(i),n.appendChild(a);var r=t.overlay?this._overlaysList:this._baseLayersList;return r.appendChild(n),n},_onInputClick:function(){var t,e,i,n=this._form.getElementsByTagName(\\\"input\\\"),o=n.length;for(this._handlingClick=!0,t=0;o>t;t++)e=n[t],i=this._layers[e.layerId],e.checked&&!this._map.hasLayer(i.layer)?this._map.addLayer(i.layer):!e.checked&&this._map.hasLayer(i.layer)&&this._map.removeLayer(i.layer);this._handlingClick=!1,this._refocusOnMap()},_expand:function(){o.DomUtil.addClass(this._container,\\\"leaflet-control-layers-expanded\\\")},_collapse:function(){this._container.className=this._container.className.replace(\\\" leaflet-control-layers-expanded\\\",\\\"\\\")}}),o.control.layers=function(t,e,i){return new o.Control.Layers(t,e,i)},o.PosAnimation=o.Class.extend({includes:o.Mixin.Events,run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._newPos=e,this.fire(\\\"start\\\"),t.style[o.DomUtil.TRANSITION]=\\\"all \\\"+(i||.25)+\\\"s cubic-bezier(0,0,\\\"+(n||.5)+\\\",1)\\\",o.DomEvent.on(t,o.DomUtil.TRANSITION_END,this._onTransitionEnd,this),o.DomUtil.setPosition(t,e),o.Util.falseFn(t.offsetWidth),this._stepTimer=setInterval(o.bind(this._onStep,this),50)},stop:function(){this._inProgress&&(o.DomUtil.setPosition(this._el,this._getPos()),this._onTransitionEnd(),o.Util.falseFn(this._el.offsetWidth))},_onStep:function(){var t=this._getPos();return t?(this._el._leaflet_pos=t,void this.fire(\\\"step\\\")):void this._onTransitionEnd()},_transformRe:/([-+]?(?:\\\\d*\\\\.)?\\\\d+)\\\\D*, ([-+]?(?:\\\\d*\\\\.)?\\\\d+)\\\\D*\\\\)/,_getPos:function(){var e,i,n,s=this._el,a=t.getComputedStyle(s);if(o.Browser.any3d){if(n=a[o.DomUtil.TRANSFORM].match(this._transformRe),!n)return;e=parseFloat(n[1]),i=parseFloat(n[2])}else e=parseFloat(a.left),i=parseFloat(a.top);return new o.Point(e,i,!0)},_onTransitionEnd:function(){o.DomEvent.off(this._el,o.DomUtil.TRANSITION_END,this._onTransitionEnd,this),this._inProgress&&(this._inProgress=!1,this._el.style[o.DomUtil.TRANSITION]=\\\"\\\",this._el._leaflet_pos=this._newPos,clearInterval(this._stepTimer),this.fire(\\\"step\\\").fire(\\\"end\\\"))}}),o.Map.include({setView:function(t,e,n){if(e=e===i?this._zoom:this._limitZoom(e),t=this._limitCenter(o.latLng(t),e,this.options.maxBounds),n=n||{},this._panAnim&&this._panAnim.stop(),this._loaded&&!n.reset&&n!==!0){n.animate!==i&&(n.zoom=o.extend({animate:n.animate},n.zoom),n.pan=o.extend({animate:n.animate},n.pan));var s=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan);if(s)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e),this},panBy:function(t,e){if(t=o.point(t).round(),e=e||{},!t.x&&!t.y)return this;if(this._panAnim||(this._panAnim=new o.PosAnimation,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire(\\\"movestart\\\"),e.animate!==!1){o.DomUtil.addClass(this._mapPane,\\\"leaflet-pan-anim\\\");var i=this._getMapPanePos().subtract(t);this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire(\\\"move\\\").fire(\\\"moveend\\\");return this},_onPanTransitionStep:function(){this.fire(\\\"move\\\")},_onPanTransitionEnd:function(){o.DomUtil.removeClass(this._mapPane,\\\"leaflet-pan-anim\\\"),this.fire(\\\"moveend\\\")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._floor();return(e&&e.animate)===!0||this.getSize().contains(i)?(this.panBy(i,e),!0):!1}}),o.PosAnimation=o.DomUtil.TRANSITION?o.PosAnimation:o.PosAnimation.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=o.DomUtil.getPosition(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire(\\\"start\\\"),this._animate()},stop:function(){this._inProgress&&(this._step(),this._complete())},_animate:function(){this._animId=o.Util.requestAnimFrame(this._animate,this),this._step()},_step:function(){var t=+new Date-this._startTime,e=1e3*this._duration;e>t?this._runFrame(this._easeOut(t/e)):(this._runFrame(1),this._complete())},_runFrame:function(t){var e=this._startPos.add(this._offset.multiplyBy(t));o.DomUtil.setPosition(this._el,e),this.fire(\\\"step\\\")},_complete:function(){o.Util.cancelAnimFrame(this._animId),this._inProgress=!1,this.fire(\\\"end\\\")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),o.Map.mergeOptions({zoomAnimation:!0,zoomAnimationThreshold:4}),o.DomUtil.TRANSITION&&o.Map.addInitHook(function(){this._zoomAnimated=this.options.zoomAnimation&&o.DomUtil.TRANSITION&&o.Browser.any3d&&!o.Browser.android23&&!o.Browser.mobileOpera,this._zoomAnimated&&o.DomEvent.on(this._mapPane,o.DomUtil.TRANSITION_END,this._catchTransitionEnd,this)}),o.Map.include(o.DomUtil.TRANSITION?{_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf(\\\"transform\\\")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName(\\\"leaflet-zoom-animated\\\").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n),s=this._getCenterLayerPoint()._add(o);return i.animate===!0||this.getSize().contains(o)?(this.fire(\\\"movestart\\\").fire(\\\"zoomstart\\\"),this._animateZoom(t,e,s,n,null,!0),!0):!1},_animateZoom:function(t,e,i,n,s,a,r){r||(this._animatingZoom=!0),o.DomUtil.addClass(this._mapPane,\\\"leaflet-zoom-anim\\\"),this._animateToCenter=t,this._animateToZoom=e,o.Draggable&&(o.Draggable._disabled=!0),o.Util.requestAnimFrame(function(){this.fire(\\\"zoomanim\\\",{center:t,zoom:e,origin:i,scale:n,delta:s,backwards:a}),setTimeout(o.bind(this._onZoomTransitionEnd,this),250)},this)},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._animatingZoom=!1,o.DomUtil.removeClass(this._mapPane,\\\"leaflet-zoom-anim\\\"),o.Util.requestAnimFrame(function(){this._resetView(this._animateToCenter,this._animateToZoom,!0,!0),o.Draggable&&(o.Draggable._disabled=!1)},this))}}:{}),o.TileLayer.include({_animateZoom:function(t){this._animating||(this._animating=!0,this._prepareBgBuffer());var e=this._bgBuffer,i=o.DomUtil.TRANSFORM,n=t.delta?o.DomUtil.getTranslateString(t.delta):e.style[i],s=o.DomUtil.getScaleString(t.scale,t.origin);e.style[i]=t.backwards?s+\\\" \\\"+n:n+\\\" \\\"+s},_endZoomAnim:function(){var t=this._tileContainer,e=this._bgBuffer;t.style.visibility=\\\"\\\",t.parentNode.appendChild(t),o.Util.falseFn(e.offsetWidth);var i=this._map.getZoom();(i>this.options.maxZoom||i.5&&.5>n?(t.style.visibility=\\\"hidden\\\",void this._stopLoadingImages(t)):(e.style.visibility=\\\"hidden\\\",e.style[o.DomUtil.TRANSFORM]=\\\"\\\",this._tileContainer=e,e=this._bgBuffer=t,this._stopLoadingImages(e),void clearTimeout(this._clearBgBufferTimer))},_getLoadedTilesPercentage:function(t){var e,i,n=t.getElementsByTagName(\\\"img\\\"),o=0;for(e=0,i=n.length;i>e;e++)n[e].complete&&o++;return o/i},_stopLoadingImages:function(t){var e,i,n,s=Array.prototype.slice.call(t.getElementsByTagName(\\\"img\\\"));for(e=0,i=s.length;i>e;e++)n=s[e],n.complete||(n.onload=o.Util.falseFn,n.onerror=o.Util.falseFn,n.src=o.Util.emptyImageUrl,n.parentNode.removeChild(n))}}),o.Map.include({_defaultLocateOptions:{watch:!1,setView:!1,maxZoom:1/0,timeout:1e4,maximumAge:0,enableHighAccuracy:!1},locate:function(t){if(t=this._locateOptions=o.extend(this._defaultLocateOptions,t),!navigator.geolocation)return this._handleGeolocationError({code:0,message:\\\"Geolocation not supported.\\\"}),this;var e=o.bind(this._handleGeolocationResponse,this),i=o.bind(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,i=t.message||(1===e?\\\"permission denied\\\":2===e?\\\"position unavailable\\\":\\\"timeout\\\");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire(\\\"locationerror\\\",{code:e,message:\\\"Geolocation error: \\\"+i+\\\".\\\"})},_handleGeolocationResponse:function(t){var e=t.coords.latitude,i=t.coords.longitude,n=new o.LatLng(e,i),s=180*t.coords.accuracy/40075017,a=s/Math.cos(o.LatLng.DEG_TO_RAD*e),r=o.latLngBounds([e-s,i-a],[e+s,i+a]),h=this._locateOptions;if(h.setView){var l=Math.min(this.getBoundsZoom(r),h.maxZoom);this.setView(n,l)}var u={latlng:n,bounds:r,timestamp:t.timestamp};for(var c in t.coords)\\\"number\\\"==typeof t.coords[c]&&(u[c]=t.coords[c]);this.fire(\\\"locationfound\\\",u)}})}(window,document);\""],"names":["require","module","exports"],"sourceRoot":""}